1(self.webpackChunkcorporate_prototype=self.webpackChunkcorporate_prototype||[]).push([[1931],{9821:(t,e,n)=>{"use strict";n.d(e,{A:()=>De});var r=n(9950),o=n(48738),i=n.n(o),a=n(71207),s=n(75503),l=n(80123),c=n(91396),u=n(5741),p=n(19389),d=n(95656),f=n(9415),h=n(77643),g=n(65059),m=n(93457),v=n(93597),y=n(23072),b=n(60436),_=n(22507),T=n(13511),C=n(58168),w=n(5544),E=n(80045),S=n(64467),x=n(89379),O=n(82284),A=n(15207),k=n(41929),P=n(2144),N=function(t,e){if(!t)return null;var n={left:t.offsetLeft,right:t.parentElement.clientWidth-t.clientWidth-t.offsetLeft,width:t.clientWidth,top:t.offsetTop,bottom:t.parentElement.clientHeight-t.clientHeight-t.offsetTop,height:t.clientHeight};return e?{left:0,right:0,width:0,top:n.top,bottom:n.bottom,height:n.height}:{left:n.left,right:n.right,width:n.width,top:0,bottom:0,height:0}},M=function(t){return void 0!==t?"".concat(t,"px"):void 0};function L(t){var e=t.prefixCls,n=t.containerRef,o=t.value,a=t.getValueIndex,s=t.motionName,l=t.onMotionStart,c=t.onMotionEnd,u=t.direction,p=t.vertical,d=void 0!==p&&p,f=r.useRef(null),h=r.useState(o),g=(0,w.A)(h,2),m=g[0],v=g[1],y=function(t){var r,o=a(t),i=null===(r=n.current)||void 0===r?void 0:r.querySelectorAll(".".concat(e,"-item"))[o];return(null===i||void 0===i?void 0:i.offsetParent)&&i},b=r.useState(null),_=(0,w.A)(b,2),C=_[0],E=_[1],S=r.useState(null),O=(0,w.A)(S,2),A=O[0],L=O[1];(0,T.A)(function(){if(m!==o){var t=y(m),e=y(o),n=N(t,d),r=N(e,d);v(o),E(n),L(r),t&&e?l():c()}},[o]);var I=r.useMemo(function(){var t;return M(d?null!==(t=null===C||void 0===C?void 0:C.top)&&void 0!==t?t:0:"rtl"===u?-(null===C||void 0===C?void 0:C.right):null===C||void 0===C?void 0:C.left)},[d,u,C]),D=r.useMemo(function(){var t;return M(d?null!==(t=null===A||void 0===A?void 0:A.top)&&void 0!==t?t:0:"rtl"===u?-(null===A||void 0===A?void 0:A.right):null===A||void 0===A?void 0:A.left)},[d,u,A]);return C&&A?r.createElement(P.Ay,{visible:!0,motionName:s,motionAppear:!0,onAppearStart:function(){return d?{transform:"translateY(var(--thumb-start-top))",height:"var(--thumb-start-height)"}:{transform:"translateX(var(--thumb-start-left))",width:"var(--thumb-start-width)"}},onAppearActive:function(){return d?{transform:"translateY(var(--thumb-active-top))",height:"var(--thumb-active-height)"}:{transform:"translateX(var(--thumb-active-left))",width:"var(--thumb-active-width)"}},onVisibleChanged:function(){E(null),L(null),c()}},function(t,n){var o=t.className,a=t.style,s=(0,x.A)((0,x.A)({},a),{},{"--thumb-start-left":I,"--thumb-start-width":M(null===C||void 0===C?void 0:C.width),"--thumb-active-left":D,"--thumb-active-width":M(null===A||void 0===A?void 0:A.width),"--thumb-start-top":I,"--thumb-start-height":M(null===C||void 0===C?void 0:C.height),"--thumb-active-top":D,"--thumb-active-height":M(null===A||void 0===A?void 0:A.height)}),l={ref:(0,k.K4)(f,n),style:s,className:i()("".concat(e,"-thumb"),o)};return r.createElement("div",l)}):null}var I=["prefixCls","direction","vertical","options","disabled","defaultValue","value","name","onChange","className","motionName"];function D(t){return t.map(function(t){if("object"===(0,O.A)(t)&&null!==t){var e=function(t){return"undefined"!==typeof t.title?t.title:"object"!==(0,O.A)(t.label)?null===(e=t.label)||void 0===e?void 0:e.toString():void 0;var e}(t);return(0,x.A)((0,x.A)({},t),{},{title:e})}return{label:null===t||void 0===t?void 0:t.toString(),title:null===t||void 0===t?void 0:t.toString(),value:t}})}var R=function(t){var e=t.prefixCls,n=t.className,o=t.disabled,a=t.checked,s=t.label,l=t.title,c=t.value,u=t.name,p=t.onChange,d=t.onFocus,f=t.onBlur,h=t.onKeyDown,g=t.onKeyUp,m=t.onMouseDown;return r.createElement("label",{className:i()(n,(0,S.A)({},"".concat(e,"-item-disabled"),o)),onMouseDown:m},r.createElement("input",{name:u,className:"".concat(e,"-item-input"),type:"radio",disabled:o,checked:a,onChange:function(t){o||p(t,c)},onFocus:d,onBlur:f,onKeyDown:h,onKeyUp:g}),r.createElement("div",{className:"".concat(e,"-item-label"),title:l,"aria-selected":a},s))};const j=r.forwardRef(function(t,e){var n,o,s=t.prefixCls,l=void 0===s?"rc-segmented":s,c=t.direction,u=t.vertical,p=t.options,d=void 0===p?[]:p,f=t.disabled,h=t.defaultValue,g=t.value,m=t.name,v=t.onChange,y=t.className,b=void 0===y?""
1:y,_=t.motionName,T=void 0===_?"thumb-motion":_,x=(0,E.A)(t,I),O=r.useRef(null),P=r.useMemo(function(){return(0,k.K4)(O,e)},[O,e]),N=r.useMemo(function(){return D(d)},[d]),M=(0,a.A)(null===(n=N[0])||void 0===n?void 0:n.value,{value:g,defaultValue:h}),j=(0,w.A)(M,2),H=j[0],F=j[1],B=r.useState(!1),V=(0,w.A)(B,2),U=V[0],z=V[1],G=function(t,e){F(e),null===v||void 0===v||v(e)},$=(0,A.A)(x,["children"]),q=r.useState(!1),W=(0,w.A)(q,2),K=W[0],Y=W[1],X=r.useState(!1),Z=(0,w.A)(X,2),Q=Z[0],J=Z[1],tt=function(){J(!0)},et=function(){J(!1)},nt=function(){Y(!1)},rt=function(t){"Tab"===t.key&&Y(!0)},ot=function(t){var e=N.findIndex(function(t){return t.value===H}),n=N.length,r=N[(e+t+n)%n];r&&(F(r.value),null===v||void 0===v||v(r.value))},it=function(t){switch(t.key){case"ArrowLeft":case"ArrowUp":ot(-1);break;case"ArrowRight":case"ArrowDown":ot(1)}};return r.createElement("div",(0,C.A)({role:"radiogroup","aria-label":"segmented control",tabIndex:f?void 0:0},$,{className:i()(l,(o={},(0,S.A)(o,"".concat(l,"-rtl"),"rtl"===c),(0,S.A)(o,"".concat(l,"-disabled"),f),(0,S.A)(o,"".concat(l,"-vertical"),u),o),b),ref:P}),r.createElement("div",{className:"".concat(l,"-group")},r.createElement(L,{vertical:u,prefixCls:l,value:H,containerRef:O,motionName:"".concat(l,"-").concat(T),direction:c,getValueIndex:function(t){return N.findIndex(function(e){return e.value===t})},onMotionStart:function(){z(!0)},onMotionEnd:function(){z(!1)}}),N.map(function(t){var e;return r.createElement(R,(0,C.A)({},t,{name:m,key:t.value,prefixCls:l,className:i()(t.className,"".concat(l,"-item"),(e={},(0,S.A)(e,"".concat(l,"-item-selected"),t.value===H&&!U),(0,S.A)(e,"".concat(l,"-item-focused"),Q&&K&&t.value===H),e)),checked:t.value===H,onChange:G,onFocus:tt,onBlur:et,onKeyDown:it,onKeyUp:rt,onMouseDown:nt,disabled:!!f||!!t.disabled}))})))});var H=n(80001),F=n(47864),B=n(45343),V=n(31900),U=n(77261);function z(t,e){return{[`${t}, ${t}:hover, ${t}:focus`]:{color:e.colorTextDisabled,cursor:"not-allowed"}}}function G(t){return{backgroundColor:t.itemSelectedBg,boxShadow:t.boxShadowTertiary}}const $=Object.assign({overflow:"hidden"},B.L9),q=t=>{const{componentCls:e}=t,n=t.calc(t.controlHeight).sub(t.calc(t.trackPadding).mul(2)).equal(),r=t.calc(t.controlHeightLG).sub(t.calc(t.trackPadding).mul(2)).equal(),o=t.calc(t.controlHeightSM).sub(t.calc(t.trackPadding).mul(2)).equal();return{[e]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,B.dF)(t)),{display:"inline-block",padding:t.trackPadding,color:t.itemColor,background:t.trackBg,borderRadius:t.borderRadius,transition:`all ${t.motionDurationMid} ${t.motionEaseInOut}`}),(0,B.K8)(t)),{[`${e}-group`]:{position:"relative",display:"flex",alignItems:"stretch",justifyItems:"flex-start",flexDirection:"row",width:"100%"},[`&${e}-rtl`]:{direction:"rtl"},[`&${e}-vertical`]:{[`${e}-group`]:{flexDirection:"column"},[`${e}-thumb`]:{width:"100%",height:0,padding:`0 ${(0,F.zA)(t.paddingXXS)}`}},[`&${e}-block`]:{display:"flex"},[`&${e}-block ${e}-item`]:{flex:1,minWidth:0},[`${e}-item`]:{position:"relative",textAlign:"center",cursor:"pointer",transition:`color ${t.motionDurationMid} ${t.motionEaseInOut}`,borderRadius:t.borderRadiusSM,transform:"translateZ(0)","&-selected":Object.assign(Object.assign({},G(t)),{color:t.itemSelectedColor}),"&-focused":Object.assign({},(0,B.jk)(t)),"&::after":{content:'""',position:"absolute",zIndex:-1,width:"100%",height:"100%",top:0,insetInlineStart:0,borderRadius:"inherit",opacity:0,transition:`opacity ${t.motionDurationMid}`,pointerEvents:"none"},[`&:hover:not(${e}-item-selected):not(${e}-item-disabled)`]:{color:t.itemHoverColor,"&::after":{opacity:1,backgroundColor:t.itemHoverBg}},[`&:active:not(${e}-item-selected):not(${e}-item-disabled)`]:{color:t.itemHoverColor,"&::after":{opacity:1,backgroundColor:t.itemActiveBg}},"&-label":Object.assign({minHeight:n,lineHeight:(0,F.zA)(n),padding:`0 ${(0,F.zA)(t.segmentedPaddingHorizontal)}`},$),"&-icon + *":{marginInlineStart:t.calc(t.marginSM).div(2).equal()},"&-input":{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:0,opacity:0,pointerEvents:"none"}},[`${e}-thumb`]:Object.assign(Object.assign({},G(t)),{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:"100%",padding:`${(0,F.zA)(t.paddingXXS)} 0`,borderRadius:t.borderRadiusSM,transition:`transform ${t.motionDurationSlow} ${t.motionEaseInOut}, height ${t.motionDurationSlow} ${t.motionEaseInOut}`,[`& ~ ${e}-item:not(${e}-item-selected):not(${e}-item-disabled)::after`]:{backgroundColor:"transparent"}}),[`&${e}-lg`]:{borderRadius:t.borderRadiusLG,[`${e}-item-label`]:{minHeight:r,lineHeight:(0,F.zA)(r),padding:`0 ${(0,F.zA)(t.segmentedPaddingHorizontal)}`,fontSize:t.fontSizeLG},[`${e}-item, ${e}-thumb`]:{borderRadius:t.borderRadius}},[`&${e}-sm`]:{borderRadius:t.borderRadiusSM,[`${e}-item-label`]:{minHeight:o,lineHeight:(0,F.zA)(o),padding:`0 ${(0,F.zA)(t.segmentedPaddingHorizontalSM)}`},[`${e}-item, ${e}-thumb`]:{borderRadius:t.borderRadiusXS}}}),z(`&-disabled ${e}-item`,t)),z(`${e}-item-disabled`,t)),{[`${e}-thumb-motion-appear-active`]:{transition:`transform ${t.motionDurationSlow} ${t.motionEaseInOut}, width ${t.motionDurationSlow} ${t.motionEaseInOut}`,willChange:"transform, width"},[`&${e}-shape-round`]:{borderRadius:9999,[`${e}-item, ${e}-thumb`]:{borderRadius:9999}}})}},W=(0,V.OF)("Segmented",t=>{const{lineWidth:e,calc:n}=t,r=(0,U.oX)(t,{segmentedPaddingHorizontal:n(t.controlPaddingHorizontal).sub(e).equal(),segmentedPaddingHorizontalSM:n(t.controlPaddingHorizontalSM).sub(e).equal()});return[q(r)]},t=>{const{colorTextLabel:e,colorText:n,colorFillSecondary:r,colorBgElevated:o,colorFill:i,lineWidthBold:a,colorBgLayout:s}=t;return{trackPadding:a,trackBg:s,itemColor:e,itemHoverColor:n,itemHoverBg:r,itemSelectedBg:o,itemActiveBg:i,itemSelectedColor:n}});var K=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const Y=r.forwardRef((t,e)=>{const n=(0,H.A)(),{prefixCls:o,className:a,rootClassName:s,block:l,options:c=[],size:p="middle",style:d,vertical:h,shape:g="default",name:m=n}=t,v=K(t,["prefixCls","className","rootClassName","block","options","size","style","vertical","shape","name"]),{getPrefixCls:y,direction:b,className:_,style:T}=(0,u.TP)("segmented"),C=y("segmented",o),[w,E,S]=W(C),x=(0,f.A)(p),O=r.useMemo(()=>c.map(t=>{if(function(t){return"object"===typeof t&&!!(null===t||void 0===t?void 0:t.icon)}(t)){const{icon:e,label:n}=t,o=K(t,["icon","label"]);return Object.assign(Object.assign({},o),{label:r.createElement(r.Fragment,null,r.createElement("span",{className:`${C}-item-icon`},e),n&&r.createElement("span",null,n))})}return t}),[c,C]),A=i()(a,s,_,{[`${C}-block`]:l,[`${C}-sm`]:"small"===x,[`${C}-lg`]:"large"===x,[`${C}
1-vertical`]:h,[`${C}-shape-${g}`]:"round"===g},E,S),k=Object.assign(Object.assign({},T),d);return w(r.createElement(j,Object.assign({},v,{name:m,className:A,style:k,options:O,ref:e,prefixCls:C,direction:b,vertical:h})))});const X=Y,Z=r.createContext({}),Q=r.createContext({});var J=n(64724);const tt=t=>{let{prefixCls:e,value:n,onChange:o}=t;return r.createElement("div",{className:`${e}-clear`,onClick:()=>{if(o&&n&&!n.cleared){const t=n.toHsb();t.a=0;const e=(0,J.Z6)(t);e.cleared=!0,o(e)}}})};var et=n(99674);const nt="hex",rt="rgb",ot="hsb";var it=n(73106);const at=t=>{let{prefixCls:e,min:n=0,max:o=100,value:a,onChange:s,className:l,formatter:c}=t;const u=`${e}-steppers`,[p,d]=(0,r.useState)(0),f=Number.isNaN(a)?p:a;return r.createElement(it.A,{className:i()(u,l),min:n,max:o,value:f,formatter:c,size:"small",onChange:t=>{d(t||0),null===s||void 0===s||s(t)}})},st=t=>{let{prefixCls:e,value:n,onChange:o}=t;const i=`${e}-alpha-input`,[a,s]=(0,r.useState)(()=>(0,J.Z6)(n||"#000")),l=n||a;return r.createElement(at,{value:(0,J.Gp)(l),prefixCls:e,formatter:t=>`${t}%`,className:i,onChange:t=>{const e=l.toHsb();e.a=(t||0)/100;const n=(0,J.Z6)(e);s(n),null===o||void 0===o||o(n)}})};var lt=n(66583);const ct=/(^#[\da-f]{6}$)|(^#[\da-f]{8}$)/i,ut=t=>{let{prefixCls:e,value:n,onChange:o}=t;const i=`${e}-hex-input`,[a,s]=(0,r.useState)(()=>n?(0,v.Ol)(n.toHexString()):void 0);(0,r.useEffect)(()=>{n&&s((0,v.Ol)(n.toHexString()))},[n]);return r.createElement(lt.A,{className:i,value:a,prefix:"#",onChange:t=>{const e=t.target.value;var n;s((0,v.Ol)(e)),n=(0,v.Ol)(e,!0),ct.test(`#${n}`)&&(null===o||void 0===o||o((0,J.Z6)(e)))},size:"small"})},pt=t=>{let{prefixCls:e,value:n,onChange:o}=t;const i=`${e}-hsb-input`,[a,s]=(0,r.useState)(()=>(0,J.Z6)(n||"#000")),l=n||a,c=(t,e)=>{const n=l.toHsb();n[e]="h"===e?t:(t||0)/100;const r=(0,J.Z6)(n);s(r),null===o||void 0===o||o(r)};return r.createElement("div",{className:i},r.createElement(at,{max:360,min:0,value:Number(l.toHsb().h),prefixCls:e,className:i,formatter:t=>(0,J.W)(t||0).toString(),onChange:t=>c(Number(t),"h")}),r.createElement(at,{max:100,min:0,value:100*Number(l.toHsb().s),prefixCls:e,className:i,formatter:t=>`${(0,J.W)(t||0)}%`,onChange:t=>c(Number(t),"s")}),r.createElement(at,{max:100,min:0,value:100*Number(l.toHsb().b),prefixCls:e,className:i,formatter:t=>`${(0,J.W)(t||0)}%`,onChange:t=>c(Number(t),"b")}))},dt=t=>{let{prefixCls:e,value:n,onChange:o}=t;const i=`${e}-rgb-input`,[a,s]=(0,r.useState)(()=>(0,J.Z6)(n||"#000")),l=n||a,c=(t,e)=>{const n=l.toRgb();n[e]=t||0;const r=(0,J.Z6)(n);s(r),null===o||void 0===o||o(r)};return r.createElement("div",{className:i},r.createElement(at,{max:255,min:0,value:Number(l.toRgb().r),prefixCls:e,className:i,onChange:t=>c(Number(t),"r")}),r.createElement(at,{max:255,min:0,value:Number(l.toRgb().g),prefixCls:e,className:i,onChange:t=>c(Number(t),"g")}),r.createElement(at,{max:255,min:0,value:Number(l.toRgb().b),prefixCls:e,className:i,onChange:t=>c(Number(t),"b")}))},ft=[nt,ot,rt].map(t=>({value:t,label:t.toUpperCase()})),ht=t=>{const{prefixCls:e,format:n,value:o,disabledAlpha:i,onFormatChange:s,onChange:l,disabledFormat:c}=t,[u,p]=(0,a.A)(nt,{value:n,onChange:s}),d=`${e}-input`,f=(0,r.useMemo)(()=>{const t={value:o,prefixCls:e,onChange:l};switch(u){case ot:return r.createElement(pt,Object.assign({},t));case rt:return r.createElement(dt,Object.assign({},t));default:return r.createElement(ut,Object.assign({},t))}},[u,e,o,l]);return r.createElement("div",{className:`${d}-container`},!c&&r.createElement(et.A,{value:u,variant:"borderless",getPopupContainer:t=>t,popupMatchSelectWidth:68,placement:"bottomRight",onChange:t=>{p(t)},className:`${e}-format-select`,size:"small",options:ft}),r.createElement("div",{className:d},f),!i&&r.createElement(st,{prefixCls:e,value:o,onChange:l}))};var gt=n(20490),mt=n(41216),vt=n(99424),yt=n(17119);function bt(t,e,n){return(t-e)/(n-e)}function _t(t,e,n,r){var o=bt(e,n,r),i={};switch(t){case"rtl":i.right="".concat(100*o,"%"),i.transform="translateX(50%)";break;case"btt":i.bottom="".concat(100*o,"%"),i.transform="translateY(50%)";break;case"ttb":i.top="".concat(100*o,"%"),i.transform="translateY(-50%)";break;
1default:i.left="".concat(100*o,"%"),i.transform="translateX(-50%)"}return i}function Tt(t,e){return Array.isArray(t)?t[e]:t}var Ct=n(91478);const wt=r.createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0,keyboard:!0,styles:{},classNames:{}});var Et=r.createContext({}),St=["prefixCls","value","valueIndex","onStartMove","onDelete","style","render","dragging","draggingDelete","onOffsetChange","onChangeComplete","onFocus","onMouseEnter"],xt=r.forwardRef(function(t,e){var n,o=t.prefixCls,a=t.value,s=t.valueIndex,l=t.onStartMove,c=t.onDelete,u=t.style,p=t.render,d=t.dragging,f=t.draggingDelete,h=t.onOffsetChange,g=t.onChangeComplete,m=t.onFocus,v=t.onMouseEnter,y=(0,E.A)(t,St),b=r.useContext(wt),_=b.min,T=b.max,w=b.direction,O=b.disabled,A=b.keyboard,k=b.range,P=b.tabIndex,N=b.ariaLabelForHandle,M=b.ariaLabelledByForHandle,L=b.ariaRequired,I=b.ariaValueTextFormatterForHandle,D=b.styles,R=b.classNames,j="".concat(o,"-handle"),H=function(t){O||l(t,s)},F=_t(w,a,_,T),B={};null!==s&&(B={tabIndex:O?null:Tt(P,s),role:"slider","aria-valuemin":_,"aria-valuemax":T,"aria-valuenow":a,"aria-disabled":O,"aria-label":Tt(N,s),"aria-labelledby":Tt(M,s),"aria-required":Tt(L,s),"aria-valuetext":null===(n=Tt(I,s))||void 0===n?void 0:n(a),"aria-orientation":"ltr"===w||"rtl"===w?"horizontal":"vertical",onMouseDown:H,onTouchStart:H,onFocus:function(t){null===m||void 0===m||m(t,s)},onMouseEnter:function(t){v(t,s)},onKeyDown:function(t){if(!O&&A){var e=null;switch(t.which||t.keyCode){case Ct.A.LEFT:e="ltr"===w||"btt"===w?-1:1;break;case Ct.A.RIGHT:e="ltr"===w||"btt"===w?1:-1;break;case Ct.A.UP:e="ttb"!==w?1:-1;break;case Ct.A.DOWN:e="ttb"!==w?-1:1;break;case Ct.A.HOME:e="min";break;case Ct.A.END:e="max";break;case Ct.A.PAGE_UP:e=2;break;case Ct.A.PAGE_DOWN:e=-2;break;case Ct.A.BACKSPACE:case Ct.A.DELETE:c(s)}null!==e&&(t.preventDefault(),h(e,s))}},onKeyUp:function(t){switch(t.which||t.keyCode){case Ct.A.LEFT:case Ct.A.RIGHT:case Ct.A.UP:case Ct.A.DOWN:case Ct.A.HOME:case Ct.A.END:case Ct.A.PAGE_UP:case Ct.A.PAGE_DOWN:null===g||void 0===g||g()}}});var V=r.createElement("div",(0,C.A)({ref:e,className:i()(j,(0,S.A)((0,S.A)((0,S.A)({},"".concat(j,"-").concat(s+1),null!==s&&k),"".concat(j,"-dragging"),d),"".concat(j,"-dragging-delete"),f),R.handle),style:(0,x.A)((0,x.A)((0,x.A)({},F),u),D.handle)},B,y));return p&&(V=p(V,{index:s,prefixCls:o,value:a,dragging:d,draggingDelete:f})),V});const Ot=xt;var At=["prefixCls","style","onStartMove","onOffsetChange","values","handleRender","activeHandleRender","draggingIndex","draggingDelete","onF
1ocus"],kt=r.forwardRef(function(t,e){var n=t.prefixCls,o=t.style,i=t.onStartMove,a=t.onOffsetChange,s=t.values,l=t.handleRender,c=t.activeHandleRender,u=t.draggingIndex,p=t.draggingDelete,d=t.onFocus,f=(0,E.A)(t,At),h=r.useRef({}),g=r.useState(!1),m=(0,w.A)(g,2),v=m[0],y=m[1],b=r.useState(-1),_=(0,w.A)(b,2),T=_[0],S=_[1],O=function(t){S(t),y(!0)};r.useImperativeHandle(e,function(){return{focus:function(t){var e;null===(e=h.current[t])||void 0===e||e.focus()},hideHelp:function(){(0,yt.flushSync)(function(){y(!1)})}}});var A=(0,x.A)({prefixCls:n,onStartMove:i,onOffsetChange:a,render:l,onFocus:function(t,e){O(e),null===d||void 0===d||d(t)},onMouseEnter:function(t,e){O(e)}},f);return r.createElement(r.Fragment,null,s.map(function(t,e){var n=u===e;return r.createElement(Ot,(0,C.A)({ref:function(t){t?h.current[e]=t:delete h.current[e]},dragging:n,draggingDelete:n&&p,style:Tt(o,e),key:e,value:t,valueIndex:e},A))}),c&&v&&r.createElement(Ot,(0,C.A)({key:"a11y"},A,{value:s[T],valueIndex:null,dragging:-1!==u,draggingDelete:p,render:c,style:{pointerEvents:"none"},tabIndex:null,"aria-hidden":!0})))});const Pt=kt;const Nt=function(t){var e=t.prefixCls,n=t.style,o=t.children,a=t.value,s=t.onClick,l=r.useContext(wt),c=l.min,u=l.max,p=l.direction,d=l.includedStart,f=l.includedEnd,h=l.included,g="".concat(e,"-text"),m=_t(p,a,c,u);return r.createElement("span",{className:i()(g,(0,S.A)({},"".concat(g,"-active"),h&&d<=a&&a<=f)),style:(0,x.A)((0,x.A)({},m),n),onMouseDown:function(t){t.stopPropagation()},onClick:function(){s(a)}},o)};const Mt=function(t){var e=t.prefixCls,n=t.marks,o=t.onClick,i="".concat(e,"-mark");return n.length?r.createElement("div",{className:i},n.map(function(t){var e=t.value,n=t.style,a=t.label;return r.createElement(Nt,{key:e,prefixCls:i,style:n,value:e,onClick:o},a)})):null};const Lt=function(t){var e=t.prefixCls,n=t.value,o=t.style,a=t.activeStyle,s=r.useContext(wt),l=s.min,c=s.max,u=s.direction,p=s.included,d=s.includedStart,f=s.includedEnd,h="".concat(e,"-dot"),g=p&&d<=n&&n<=f,m=(0,x.A)((0,x.A)({},_t(u,n,l,c)),"function"===typeof o?o(n):o);return g&&(m=(0,x.A)((0,x.A)({},m),"function"===typeof a?a(n):a)),r.createElement("span",{className:i()(h,(0,S.A)({},"".concat(h,"-active"),g)),style:m})};const It=function(t){var e=t.prefixCls,n=t.marks,o=t.dots,i=t.style,a=t.activeStyle,s=r.useContext(wt),l=s.min,c=s.max,u=s.step,p=r.useMemo(function(){var t=new Set;if(n.forEach(function(e){t.add(e.value)}),o&&null!==u)for(var e=l;e<=c;)t.add(e),e+=u;return Array.from(t)},[l,c,u,o,n]);return r.createElement("div",{className:"".concat(e,"-step")},p.map(function(t){return r.createElement(Lt,{prefixCls:e,key:t,value:t,style:i,activeStyle:a})}))};const Dt=function(t){var e=t.prefixCls,n=t.style,o=t.start,a=t.end,s=t.index,l=t.onStartMove,c=t.replaceCls,u=r.useContext(wt),p=u.direction,d=u.min,f=u.max,h=u.disabled,g=u.range,m=u.classNames,v="".concat(e,"-track"),y=bt(o,d,f),b=bt(a,d,f),_=function(t){!h&&l&&l(t,-1)},T={};switch(p){case"rtl":T.right="".concat(100*y,"%"),T.width="".concat(100*b-100*y,"%");break;case"btt":T.bottom="".concat(100*y,"%"),T.height="".concat(100*b-100*y,"%");break;case"ttb":T.top="".concat(100*y,"%"),T.height="".concat(100*b-100*y,"%");break;default:T.left="".concat(100*y,"%"),T.width="".concat(100*b-100*y,"%")}var C=c||i()(v,(0,S.A)((0,S.A)({},"".concat(v,"-").concat(s+1),null!==s&&g),"".concat(e,"-track-draggable"),l),m.track);return r.createElement("div",{className:C,style:(0,x.A)((0,x.A)({},T),n),onMouseDown:_,onTouchStart:_})};const Rt=function(t){var e=t.prefixCls,n=t.style,o=t.values,a=t.startPoint,s=t.onStartMove,l=r.useContext(wt),c=l.included,u=l.range,p=l.min,d=l.styles,f=l.classNames,h=r.useMemo(function(){if(!u){if(0===o.length)return[];var t=null!==a&&void 0!==a?a:p,e=o[0];return[{start:Math.min(t,e),end:Math.max(t,e)}]}for(var n=[],r=0;r<o.length-1;r+=1)n.push({start:o[r],end:o[r+1]});return n},[o,u,a,p]);if(!c)return null;var g=null!==h&&void 0!==h&&h.length&&(f.tracks||d.tracks)?r.createElement(Dt,{index:null,prefixCls:e,start:h[0].start,end:h[h.length-1].end,replaceCls:i()(f.tracks,"".concat(e,"-tracks")),style:d.tracks}):null;return r.createElement(r.Fragment,null,g,h.map(function(t,o){var i=t.start,a=t.end;return r.createElement(Dt,{index:o,prefixCls:e,style:(0,x.A)((0,x.A)({},Tt(n,o)),d.track),start:i,end:a,key:o,onStartMove:s})}))};function jt(t){var e="targetTouches"in t?t.targetTouches[0]:t;return{pageX:e.pageX,pageY:e.pageY}}const Ht=function(t,e,n,o,i,a,s,l,c,u,p){var d=r.useState(null),f=(0,w.A)(d,2),h=f[0],g=f[1],m=r.useState(-1),v=(0,w.A)(m,2),y=v[0],_=v[1],C=r.useState(!1),E=(0,w.A)(C,2),S=E[0],x=E[1],O=r.useState(n),A=(0,w.A)(O,2),k=A[0],P=A[1],N=r.useState(n),M=(0,w.A)(N,2),L=M[0],I=M[1],D=r.useRef(null),R=r.useRef(null),j=r.useRef(null),H=r.useContext(Et),F=H.onDragStart,B=H.onDragChange;(0,T.A)(function(){-1===y&&P(n)},[n,y]),r.useEffect(function(){return function(){document.removeEventListener("mousemove",D.current),document.removeEventListener("mouseup",R.current),j.current&&(j.current.removeEventListener("touchmove",D.current),j.current.removeEventListener("touchend",R.current))}},[]);var V=function(t,e,n){void 0!==e&&g(e),P(t);var r=t;n&&(r=t.filter(function(t,e){return e!==y})),s(r),B&&B({rawValues:t,deleteIndex:n?y:-1,draggingIndex:y,draggingValue:e})},U=(0,gt.A)(function(t,e,n){if(-1===t){var r=L[0],s=L[L.length-1],l=o-r,u=i-s,p=e*(i-o);p=Math.max(p,l),p=Math.min(p,u);var d=a(r+p);p=d-r;var f=L.map(function(t){return t+p});V(f)}else{var h=(i-o)*e,g=(0,b.A)(k);g[t]=L[t];var m=c(g,h,t,"dist");V(m.values,m.value,n)}}),z=r.useMemo(function(){var t=(0,b.A)(n).sort(function(t,e){return t-e}),e=(0,b.A)(k).sort(function(t,e){return t-e}),r={};e.forEach(function(t){r[t]=(r[t]||0)+1}),t.forEach(function(t){r[t]=(r[t]||0)-1});var o=u?1:0;return Object.values(r).reduce(function(t,e){return t+Math.abs(e)},0)<=o?k:n},[n,k,u]);return[y,h,S,z,function(r,o,i){r.stopPropagation();var a=i||n,s=a[o];_(o),g(s),I(a),P(a),x(!1);var c=jt(r),d=c.pageX,f=c.pageY,h=!1;F&&F({rawValues:a,draggingIndex:o,draggingValue:s});var m=function(n){n.preventDefault();var r,i,a=jt(n),s=a.pageX,l=a.pageY,c=s-d,g=l-f,m=t.current.getBoundingClientRect(),v=m.width,y=m.height;switch(e){case"btt":r=-g/y,i=c;break;case"ttb":r=g/y,i=c;break;case"rtl":r=-c/v,i=g;break;default:r=c/v,i=g}h=!!u&&(Math.abs(i)>130&&p<k.length),x(h),U(o,r,h)},v=function t(e){e.preventDefault(),document.removeEventListener("mouseup",t),document.removeEventListener("mousemove",m),j.current&&(j.current.removeEventListener("touchmove",D.current),j.current.removeEventListener("touchend",R.current)),D.current=null,R.current=null,j.current=null,l(h),_(-1),x(!1)};document.addEventListener("mouseup",v),document.addEventListener("mousemove",m),r.currentTarget.addEventListener("touchend",v),r.currentTarget.addEventListener("touchmove",m),D.current=m,R.current=v,j.current=r.currentTarget}]};var Ft=r.forwardRef(function(t,e){var n=t.prefixCls,o=void 0===n?"rc-slider":n,s=t.className,l=t.style,c=t.classNames,u=t.styles,p=t.id,d=t.disabled,f=void 0!==d&&d,h=t.keyboard,g=void 0===h||h,m=t.autoFocus,v=t.onFocus,y=t.onBlur,_=t.min,T=void 0===_?0:_,C=t.max,E=void 0===C?100:C,A=t.step,k=void 0===A?1:A,P=t.value,N=t.defaultValue,M=t.range,L=t.count,I=t.onChange,D=t.onBeforeChange,R=t.onAfterChange,j=t.onChangeComplete,H=t.allowCross,F=void 0===H||H,B=t.pushable,V=void 0!==B&&B,U=t.reverse,z=t.vertical,G=t.included,$=void 0===G||G,q=t.startPoint,W=t.trackStyle,K=t.handleStyle,Y=t.railStyle,X=t.dotStyle,Z=t.activeDotStyle,Q=t.marks,J=t.dots,tt=t.handleRender,et=t.activeHandleRender,nt=t.track,rt=t.tabIndex,ot=void 0===rt?0:rt,it=t.ariaLabelForHandle,at=t.ariaLabelledByForHandle,st=t.ariaRequired,lt=t.ariaValueTextFormatterForHandle,ct=r.useRef(null),ut=r.useRef(null),pt=r.useMemo(function(){return z?U?"ttb":"btt":U?"rtl":"ltr"},[U,z]),dt=function(t){return(0,r.useMemo)(function(){if(!0===t||!t)return[!!t,!1,!1,0];var e=t.editable,n=t.draggableTrack;return[!0,e,!e&&n,t.minCount||0,t.maxCount]},[t])}(M),ft=(0,w.A)(dt,5),ht=ft[0],yt=ft[1],bt=ft[2],_t=ft[3],Tt=ft[4],Ct=r.useMemo(function(){return isFinite(T)?T:0},[T]),Et=r.useMemo(function(){return isFinite(E)?E:100},[E]),St=r.useMemo(function(){return null!==k&&k<=0?1:k},[k]),xt=r.useMemo(function(){return"boolean"===typeof V?!!V&&St:V>=0&&V},[V,St]),Ot=r.useMemo(function(){return Object.keys(Q||{}).map(function(t){var e=Q[t],n={value:Number(t)};return e&&"object"===(0,O.A)(e)&&!r.isValidElement(e)&&("label"in e||"style"in e)?(n.style=e.style,n.label=e.label):n.label=e,n}).filter(function(t){var e=t.label;return e||"number"===typeof e}).sort(function(t,e){return t.value-e.value})},[Q]),At=function(t,e,n,o,i,a){var s=r.useCallback(function(n){return Math.max(t,Math.min(e,n))},[t,e]),l=r.useCallback(function(r){if(null!==n){var o=t+Math.round((s(r)-t)/n)*n,i=function(t){return(String(t).split(".")[1]||"").length},a=Math.max(i(n),i(e),i(t)),l=Number(o.toFixed(a));return t<=l&&l<=e?l:null}return null},[n,t,e,s]),c=r.useCallback(function(r){var i=s(r),a=o.map(function(t){return t.value});null!==n&&a.push(l(r)),a.push(t,e);var c=a[0],u=e-t;return a.forEach(function(t){var e=Math.abs(i-t);e<=u&&(c=t,u=e)}),c},[t,e,o,n,s,l]),u=function r(i,a,s){var c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unit";if("number"===typeof a){var u,p=i[s],d=p+a,f=[];o.forEach(function(t){f.push(t.value)}
1),f.push(t,e),f.push(l(p));var h=a>0?1:-1;"unit"===c?f.push(l(p+h*n)):f.push(l(d)),f=f.filter(function(t){return null!==t}).filter(function(t){return a<0?t<=p:t>=p}),"unit"===c&&(f=f.filter(function(t){return t!==p}));var g="unit"===c?p:d;u=f[0];var m=Math.abs(u-g);if(f.forEach(function(t){var e=Math.abs(t-g);e<m&&(u=t,m=e)}),void 0===u)return a<0?t:e;if("dist"===c)return u;if(Math.abs(a)>1){var v=(0,b.A)(i);return v[s]=u,r(v,a-h,s,c)}return u}return"min"===a?t:"max"===a?e:void 0},p=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unit",o=t[n],i=u(t,e,n,r);return{value:i,changed:i!==o}},d=function(t){return null===a&&0===t||"number"===typeof a&&t<a};return[c,function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unit",o=t.map(c),s=o[n],l=u(o,e,n,r);if(o[n]=l,!1===i){var f=a||0;n>0&&o[n-1]!==s&&(o[n]=Math.max(o[n],o[n-1]+f)),n<o.length-1&&o[n+1]!==s&&(o[n]=Math.min(o[n],o[n+1]-f))}else if("number"===typeof a||null===a){for(var h=n+1;h<o.length;h+=1)for(var g=!0;d(o[h]-o[h-1])&&g;){var m=p(o,1,h);o[h]=m.value,g=m.changed}for(var v=n;v>0;v-=1)for(var y=!0;d(o[v]-o[v-1])&&y;){var b=p(o,-1,v-1);o[v-1]=b.value,y=b.changed}for(var _=o.length-1;_>0;_-=1)for(var T=!0;d(o[_]-o[_-1])&&T;){var C=p(o,-1,_-1);o[_-1]=C.value,T=C.changed}for(var w=0;w<o.length-1;w+=1)for(var E=!0;d(o[w+1]-o[w])&&E;){var S=p(o,1,w+1);o[w+1]=S.value,E=S.changed}}return{value:o[n],values:o}}]}(Ct,Et,St,Ot,F,xt),kt=(0,w.A)(At,2),Nt=kt[0],Lt=kt[1],Dt=(0,a.A)(N,{value:P}),jt=(0,w.A)(Dt,2),Ft=jt[0],Bt=jt[1],Vt=r.useMemo(function(){var t=null===Ft||void 0===Ft?[]:Array.isArray(Ft)?Ft:[Ft],e=(0,w.A)(t,1)[0],n=null===Ft?[]:[void 0===e?Ct:e];if(ht){if(n=(0,b.A)(t),L||void 0===Ft){var r=L>=0?L+1:2;for(n=n.slice(0,r);n.length<r;){var o;n.push(null!==(o=n[n.length-1])&&void 0!==o?o:Ct)}}n.sort(function(t,e){return t-e})}return n.forEach(function(t,e){n[e]=Nt(t)}),n},[Ft,ht,Ct,L,Nt]),Ut=function(t){return ht?t:t[0]},zt=(0,gt.A)(function(t){var e=(0,b.A)(t).sort(function(t,e){return t-e});I&&!(0,mt.A)(e,Vt,!0)&&I(Ut(e)),Bt(e)}),Gt=(0,gt.A)(function(t){t&&ct.current.hideHelp();var e=Ut(Vt);null===R||void 0===R||R(e),(0,vt.Ay)(!R,"[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."),null===j||void 0===j||j(e)}),$t=Ht(ut,pt,Vt,Ct,Et,Nt,zt,Gt,Lt,yt,_t),qt=(0,w.A)($t,5),Wt=qt[0],Kt=qt[1],Yt=qt[2],Xt=qt[3],Zt=qt[4],Qt=function(t,e){if(!f){var n=(0,b.A)(Vt),r=0,o=0,i=Et-Ct;Vt.forEach(function(e,n){var a=Math.abs(t-e);a<=i&&(i=a,r=n),e<t&&(o=n)});var a=r;yt&&0!==i&&(!Tt||Vt.length<Tt)?(n.splice(o+1,0,t),a=o+1):n[r]=t,ht&&!Vt.length&&void 0===L&&n.push(t);var s,l,c=Ut(n);if(null===D||void 0===D||D(c),zt(n),e)null===(s=document.activeElement)||void 0===s||null===(l=s.blur)||void 0===l||l.call(s),ct.current.focus(a),Zt(e,a,n);else null===R||void 0===R||R(c),(0,vt.Ay)(!R,"[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."),null===j||void 0===j||j(c)}},Jt=r.useState(null),te=(0,w.A)(Jt,2),ee=te[0],ne=te[1];r.useEffect(function(){if(null!==ee){var t=Vt.indexOf(ee);t>=0&&ct.current.focus(t)}ne(null)},[ee]);var re=r.useMemo(function(){return(!bt||null!==St)&&bt},[bt,St]),oe=(0,gt.A)(function(t,e){Zt(t,e),null===D||void 0===D||D(Ut(Vt))}),ie=-1!==Wt;r.useEffect(function(){if(!ie){var t=Vt.lastIndexOf(Kt);ct.current.focus(t)}},[ie]);var ae=r.useMemo(function(){return(0,b.A)(Xt).sort(function(t,e){return t-e})},[Xt]),se=r.useMemo(function(){return ht?[ae[0],ae[ae.length-1]]:[Ct,ae[0]]},[ae,ht,Ct]),le=(0,w.A)(se,2),ce=le[0],ue=le[1];r.useImperativeHandle(e,function(){return{focus:function(){ct.current.focus(0)},blur:function(){var t,e=document.activeElement;null!==(t=ut.current)&&void 0!==t&&t.contains(e)&&(null===e||void 0===e||e.blur())}}}),r.useEffect(function(){m&&ct.current.focus(0)},[]);var pe=r.useMemo(function(){return{min:Ct,max:Et,direction:pt,disabled:f,keyboard:g,step:St,included:$,includedStart:ce,includedEnd:ue,range:ht,tabIndex:ot,ariaLabelForHandle:it,ariaLabelledByForHandle:at,ariaRequired:st,ariaValueTextFormatterForHandle:lt,styles:u||{},classNames:c||{}}},[Ct,Et,pt,f,g,St,$,ce,ue,ht,ot,it,at,st,lt,u,c]);return r.createElement(wt.Provider,{value:pe},r.createElement("div",{ref:ut,className:i()(o,s,(0,S.A)((0,S.A)((0,S.A)((0,S.A)({},"".concat(o,"-disabled"),f),"".concat(o,"-vertical"),z),"".concat(o,"-horizontal"),!z),"".concat(o,"-with-marks"),Ot.length)),style:l,onMouseDown:function(t){t.preventDefault();var e,n=ut.current.getBoundingClientRect(),r=n.width,o=n.height,i=n.left,a=n.top,s=n.bottom,l=n.right,c=t.clientX,u=t.clientY;switch(pt){case"btt":e=(s-u)/o;break;case"ttb":e=(u-a)/o;break;case"rtl":e=(l-c)/r;break;default:e=(c-i)/r}Qt(Nt(Ct+e*(Et-Ct)),t)},id:p},r.createElement("div",{className:i()("".concat(o,"-rail"),null===c||void 0===c?void 0:c.rail),style:(0,x.A)((0,x.A)({},Y),null===u||void 0===u?void 0:u.rail)}),!1!==nt&&r.createElement(Rt,{prefixCls:o,style:W,values:Vt,startPoint:q,onStartMove:re?oe:void 0}),r.createElement(It,{prefixCls:o,marks:Ot,dots:J,style:X,activeStyle:Z}),r.createElement(Pt,{ref:ct,prefixCls:o,style:K,values:Xt,draggingIndex:Wt,draggingDelete:Yt,onStartMove:oe,onOffsetChange:function(t,e){if(!f){var n=Lt(Vt,t,e);null===D||void 0===D||D(Ut(Vt)),zt(n.values),ne(n.value)}},onFocus:v,onBlur:y,handleRender:tt,activeHandleRender:et,onChangeComplete:Gt,onDelete:yt?function(t){if(!(f||!yt||Vt.length<=_t)){var e=(0,b.A)(Vt);e.splice(t,1),null===D||void 0===D||D(Ut(e)),zt(e);var n=Math.max(0,t-1);ct.current.hideHelp(),ct.current.focus(n)}}:void 0}),r.createElement(Mt,{prefixCls:o,marks:Ot,onClick:Qt})))});const Bt=Ft;var Vt=n(7261);const Ut=(0,r.createContext)({});var zt=n(22748);const Gt=r.forwardRef((t,e)=>{const{open:n,draggingDelete:o,value:i}=t,a=(0,r.useRef)(null),s=n&&!o,l=(0,r.useRef)(null);function c(){Vt.A.cancel(l.current),l.current=null}return r.useEffect(()=>(s?l.current=(0,Vt.A)(()=>{var t;null===(t=a.current)||void 0===t||t.forceAlign(),l.current=null}):c(),c),[s,t.title,i]),r.createElement(zt.A,Object.assign({ref:(0,k.K4)(a,e)},t,{open:s}))});var $t=n(58850);const qt=t=>{const{componentCls:e,antCls:n,controlSize:r,dotSize:o,marginFull:i,marginPart:a,colorFillContentHover:s,handleColorDisabled:l,calc:c,handleSize:u,handleSizeHover:p,handleActiveColor:d,handleActiveOutlineColor:f,handleLineWidth:h,handleLineWidthHover:g,motionDurationMid:m}=t;return{[e]:Object.assign(Object.assign({},(0,B.dF)(t)),{position:"relative",height:r,margin:`${(0,F.zA)(a)} ${(0,F.zA)(i)}`,padding:0,cursor:"pointer",touchAction:"none","&-vertical":{margin:`${(0,F.zA)(i)} ${(0,F.zA)(a)}`},[`${e}-rail`]:{position:"absolute",backgroundColor:t.railBg,borderRadius:t.borderRadiusXS,transition:`background-color ${m}`},[`${e}-track,${e}-tracks`]:{position:"absolute",transition:`background-color ${m}`},[`${e}-track`]:{backgroundColor:t.trackBg,borderRadius:t.borderRadiusXS},[`${e}-track-draggable`]:{boxSizing:"content-box",backgroundClip:"content-box",border:"solid rgba(0,0,0,0)"},"&:hover":{[`${e}-rail`]:{backgroundColor:t.railHoverBg},[`${e}-track`]:{backgroundColor:t.trackHoverBg},[`${e}-dot`]:{borderColor:s},[`${e}-handle::after`]:{boxShadow:`0 0 0 ${(0,F.zA)(h)} ${t.colorPrimaryBorderHover}`},[`${e}-dot-active`]:{borderColor:t.dotActiveBorderColor}},[`${e}-handle`]:{position:"absolute",width:u,height:u,outline:"none",userSelect:"none","&-dragging-delete":{opacity:0}
1,"&::before":{content:'""',position:"absolute",insetInlineStart:c(h).mul(-1).equal(),insetBlockStart:c(h).mul(-1).equal(),width:c(u).add(c(h).mul(2)).equal(),height:c(u).add(c(h).mul(2)).equal(),backgroundColor:"transparent"},"&::after":{content:'""',position:"absolute",insetBlockStart:0,insetInlineStart:0,width:u,height:u,backgroundColor:t.colorBgElevated,boxShadow:`0 0 0 ${(0,F.zA)(h)} ${t.handleColor}`,outline:"0px solid transparent",borderRadius:"50%",cursor:"pointer",transition:`\n inset-inline-start ${m},\n inset-block-start ${m},\n width ${m},\n height ${m},\n box-shadow ${m},\n outline ${m}\n `},"&:hover, &:active, &:focus":{"&::before":{insetInlineStart:c(p).sub(u).div(2).add(g).mul(-1).equal(),insetBlockStart:c(p).sub(u).div(2).add(g).mul(-1).equal(),width:c(p).add(c(g).mul(2)).equal(),height:c(p).add(c(g).mul(2)).equal()},"&::after":{boxShadow:`0 0 0 ${(0,F.zA)(g)} ${d}`,outline:`6px solid ${f}`,width:p,height:p,insetInlineStart:t.calc(u).sub(p).div(2).equal(),insetBlockStart:t.calc(u).sub(p).div(2).equal()}}},[`&-lock ${e}-handle`]:{"&::before, &::after":{transition:"none"}},[`${e}-mark`]:{position:"absolute",fontSize:t.fontSize},[`${e}-mark-text`]:{position:"absolute",display:"inline-block",color:t.colorTextDescription,textAlign:"center",wordBreak:"keep-all",cursor:"pointer",userSelect:"none","&-active":{color:t.colorText}},[`${e}-step`]:{position:"absolute",background:"transparent",pointerEvents:"none"},[`${e}-dot`]:{position:"absolute",width:o,height:o,backgroundColor:t.colorBgElevated,border:`${(0,F.zA)(h)} solid ${t.dotBorderColor}`,borderRadius:"50%",cursor:"pointer",transition:`border-color ${t.motionDurationSlow}`,pointerEvents:"auto","&-active":{borderColor:t.dotActiveBorderColor}},[`&${e}-disabled`]:{cursor:"not-allowed",[`${e}-rail`]:{backgroundColor:`${t.railBg} !important`},[`${e}-track`]:{backgroundColor:`${t.trackBgDisabled} !important`},[`\n ${e}-dot\n `]:{backgroundColor:t.colorBgElevated,borderColor:t.trackBgDisabled,boxShadow:"none",cursor:"not-allowed"},[`${e}-handle::after`]:{backgroundColor:t.colorBgElevated,cursor:"not-allowed",width:u,height:u,boxShadow:`0 0 0 ${(0,F.zA)(h)} ${l}`,insetInlineStart:0,insetBlockStart:0},[`\n ${e}-mark-text,\n ${e}-dot\n `]:{cursor:"not-allowed !important"}},[`&-tooltip ${n}-tooltip-inner`]:{minWidth:"unset"}})}},Wt=(t,e)=>{const{componentCls:n,railSize:r,handleSize:o,dotSize:i,marginFull:a,calc:s}=t,l=e?"paddingBlock":"paddingInline",c=e?"width":"height",u=e?"height":"width",p=e?"insetBlockStart":"insetInlineStart",d=e?"top":"insetInlineStart",f=s(r).mul(3).sub(o).div(2).equal(),h=s(o).sub(r).div(2).equal(),g=e?{borderWidth:`${(0,F.zA)(h)} 0`,transform:`translateY(${(0,F.zA)(s(h).mul(-1).equal())})`}:{borderWidth:`0 ${(0,F.zA)(h)}`,transform:`translateX(${(0,F.zA)(t.calc(h).mul(-1).equal())})`};return{[l]:r,[u]:s(r).mul(3).equal(),[`${n}-rail`]:{[c]:"100%",[u]:r},[`${n}-track,${n}-tracks`]:{[u]:r},[`${n}-track-draggable`]:Object.assign({},g),[`${n}-handle`]:{[p]:f},[`${n}-mark`]:{insetInlineStart:0,top:0,[d]:s(r).mul(3).add(e?0:a).equal(),[c]:"100%"},[`${n}-step`]:{insetInlineStart:0,top:0,[d]:r,[c]:"100%",[u]:r},[`${n}-dot`]:{position:"absolute",[p]:s(r).sub(i).div(2).equal()}}},Kt=t=>{const{componentCls:e,marginPartWithMark:n}=t;return{[`${e}-horizontal`]:Object.assign(Object.assign({},Wt(t,!0)),{[`&${e}-with-marks`]:{marginBottom:n}})}},Yt=t=>{const{componentCls:e}=t;return{[`${e}-vertical`]:Object.assign(Object.assign({},Wt(t,!1)),{height:"100%"})}},Xt=(0,V.OF)("Slider",t=>{const e=(0,U.oX)(t,{marginPart:t.calc(t.controlHeight).sub(t.controlSize).div(2).equal(),marginFull:t.calc(t.controlSize).div(2).equal(),marginPartWithMark:t.calc(t.controlHeightLG).sub(t.controlSize).equal()});return[qt(e),Kt(e),Yt(e)]},t=>{const e=t.controlHeightLG/4,n=t.controlHeightSM/2,r=t.lineWidth+1,o=t.lineWidth+1.5,i=t.colorPrimary,a=new $t.Y(i).setA(.2).toRgbString();return{controlSize:e,railSize:4,handleSize:e,handleSizeHover:n,dotSize:8,handleLineWidth:r,handleLineWidthHover:o,railBg:t.colorFillTertiary,railHoverBg:t.colorFillSecondary,trackBg:t.colorPrimaryBorder,trackHoverBg:t.colorPrimaryBorderHover,handleColor:t.colorPrimaryBorder,handleActiveColor:i,handleActiveOutlineColor:a,handleColorDisabled:new $t.Y(t.colorTextDisabled).onBackgroun
1d(t.colorBgContainer).toHexString(),dotBorderColor:t.colorBorderSecondary,dotActiveBorderColor:t.colorPrimaryBorder,trackBgDisabled:t.colorBgContainerDisabled}});function Zt(){const[t,e]=r.useState(!1),n=r.useRef(null),o=()=>{Vt.A.cancel(n.current)};return r.useEffect(()=>o,[]),[t,t=>{o(),t?e(t):n.current=(0,Vt.A)(()=>{e(t)})}]}var Qt=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const Jt=r.forwardRef((t,e)=>{const{prefixCls:n,range:o,className:a,rootClassName:s,style:l,disabled:c,tooltipPrefixCls:d,tipFormatter:f,tooltipVisible:h,getTooltipPopupContainer:g,tooltipPlacement:m,tooltip:v={},onChangeComplete:y,classNames:b,styles:_}=t,T=Qt(t,["prefixCls","range","className","rootClassName","style","disabled","tooltipPrefixCls","tipFormatter","tooltipVisible","getTooltipPopupContainer","tooltipPlacement","tooltip","onChangeComplete","classNames","styles"]),{vertical:C}=t,{getPrefixCls:w,direction:E,className:S,style:x,classNames:O,styles:A,getPopupContainer:k}=(0,u.TP)("slider"),P=r.useContext(p.A),N=null!==c&&void 0!==c?c:P,{handleRender:M,direction:L}=r.useContext(Ut),I="rtl"===(L||E),[D,R]=Zt(),[j,H]=Zt(),F=Object.assign({},v),{open:B,placement:V,getPopupContainer:U,prefixCls:z,formatter:G}=F,$=null!==B&&void 0!==B?B:h,q=(D||j)&&!1!==$,W=function(t,e){return t||null===t?t:e||null===e?e:t=>"number"===typeof t?t.toString():""}(G,f),[K,Y]=Zt(),X=(t,e)=>t||(e?I?"left":"right":"top"),Z=w("slider",n),[Q,J,tt]=Xt(Z),et=i()(a,S,O.root,null===b||void 0===b?void 0:b.root,s,{[`${Z}-rtl`]:I,[`${Z}-lock`]:K},J,tt);I&&!T.vertical&&(T.reverse=!T.reverse),r.useEffect(()=>{const t=()=>{(0,Vt.A)(()=>{H(!1)},1)};return document.addEventListener("mouseup",t),()=>{document.removeEventListener("mouseup",t)}},[]);const nt=o&&!$,rt=M||((t,e)=>{const{index:n}=e,o=t.props;function i(t,e,n){var r,i,a,s;n&&(null===(i=(r=T)[t])||void 0===i||i.call(r,e)),null===(s=(a=o)[t])||void 0===s||s.call(a,e)}const a=Object.assign(Object.assign({},o),{onMouseEnter:t=>{R(!0),i("onMouseEnter",t)},onMouseLeave:t=>{R(!1),i("onMouseLeave",t)},onMouseDown:t=>{H(!0),Y(!0),i("onMouseDown",t)},onFocus:t=>{var e;H(!0),null===(e=T.onFocus)||void 0===e||e.call(T,t),i("onFocus",t,!0)},onBlur:t=>{var e;H(!1),null===(e=T.onBlur)||void 0===e||e.call(T,t),i("onBlur",t,!0)}}),s=r.cloneElement(t,a),l=(!!$||q)&&null!==W;return nt?s:r.createElement(Gt,Object.assign({},F,{prefixCls:w("tooltip",null!==z&&void 0!==z?z:d),title:W?W(e.value):"",value:e.value,open:l,placement:X(null!==V&&void 0!==V?V:m,C),key:n,classNames:{root:`${Z}-tooltip`},getPopupContainer:U||g||k}),s)}),ot=nt?(t,e)=>{const n=r.cloneElement(t,{style:Object.assign(Object.assign({},t.props.style),{visibility:"hidden"})});return r.createElement(Gt,Object.assign({},F,{prefixCls:w("tooltip",null!==z&&void 0!==z?z:d),title:W?W(e.value):"",open:null!==W&&q,placement:X(null!==V&&void 0!==V?V:m,C),key:"tooltip",classNames:{root:`${Z}-tooltip`},getPopupContainer:U||g||k,draggingDelete:e.draggingDelete}),n)}:void 0,it=Object.assign(Object.assign(Object.assign(Object.assign({},A.root),x),null===_||void 0===_?void 0:_.root),l),at=Object.assign(Object.assign({},A.tracks),null===_||void 0===_?void 0:_.tracks),st=i()(O.tracks,null===b||void 0===b?void 0:b.tracks);return Q(r.createElement(Bt,Object.assign({},T,{classNames:Object.assign({handle:i()(O.handle,null===b||void 0===b?void 0:b.handle),rail:i()(O.rail,null===b||void 0===b?void 0:b.rail),track:i()(O.track,null===b||void 0===b?void 0:b.track)},st?{tracks:st}:{}),styles:Object.assign({handle:Object.assign(Object.assign({},A.handle),null===_||void 0===_?void 0:_.handle),rail:Object.assign(Object.assign({},A.rail),null===_||void 0===_?void 0:_.rail),track:Object.assign(Object.assign({},A.track),null===_||void 0===_?void 0:_.track)},Object.keys(at).length?{tracks:at}:{}),step:T.step,range:o,className:et,style:it,disabled:N,ref:e,prefixCls:Z,handleRender:rt,activeHandleRender:ot,onChangeComplete:t=>{null===y||void 0===y||y(t),Y(!1)}})))});const te=Jt;var ee=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const ne=t=>{const{prefixCls:e,colors:n,type:o,color:a,range:s=!1,className:l,activeIndex:c,onActive:u,onDragStart:p,onDragChange:d,onKeyDelete:f}=t,h=ee(t,["prefixCls","colors","type","color","range","className","activeIndex","onActive","onDragStart","onDrag
1Change","onKeyDelete"]),g=Object.assign(Object.assign({},h),{track:!1}),m=r.useMemo(()=>`linear-gradient(90deg, ${n.map(t=>`${t.color} ${t.percent}%`).join(", ")})`,[n]),v=r.useMemo(()=>a&&o?"alpha"===o?a.toRgbString():`hsl(${a.toHsb().h}, 100%, 50%)`:null,[a,o]),y=(0,gt.A)(p),b=(0,gt.A)(d),_=r.useMemo(()=>({onDragStart:y,onDragChange:b}),[]),T=(0,gt.A)((t,a)=>{const{onFocus:s,style:l,className:p,onKeyDown:d}=t.props,h=Object.assign({},l);return"gradient"===o&&(h.background=(0,J.PU)(n,a.value)),r.cloneElement(t,{onFocus:t=>{null===u||void 0===u||u(a.index),null===s||void 0===s||s(t)},style:h,className:i()(p,{[`${e}-slider-handle-active`]:c===a.index}),onKeyDown:t=>{"Delete"!==t.key&&"Backspace"!==t.key||!f||f(a.index),null===d||void 0===d||d(t)}})}),C=r.useMemo(()=>({direction:"ltr",handleRender:T}),[]);return r.createElement(Ut.Provider,{value:C},r.createElement(Et.Provider,{value:_},r.createElement(te,Object.assign({},g,{className:i()(l,`${e}-slider`),tooltip:{open:!1},range:{editable:s,minCount:2},styles:{rail:{background:m},handle:v?{background:v}:{}},classNames:{rail:`${e}-slider-rail`,handle:`${e}-slider-handle`}}))))},re=t=>{const{value:e,onChange:n,onChangeComplete:o}=t;return r.createElement(ne,Object.assign({},t,{value:[e],onChange:t=>n(t[0]),onChangeComplete:t=>o(t[0])}))};function oe(t){return(0,b.A)(t).sort((t,e)=>t.percent-e.percent)}const ie=t=>{const{prefixCls:e,mode:n,onChange:o,onChangeComplete:i,onActive:a,activeIndex:s,onGradientDragging:l,colors:c}=t,u="gradient"===n,p=r.useMemo(()=>c.map(t=>({percent:t.percent,color:t.color.toRgbString()})),[c]),d=r.useMemo(()=>p.map(t=>t.percent),[p]),f=r.useRef(p);return u?r.createElement(ne,{min:0,max:100,prefixCls:e,className:`${e}-gradient-slider`,colors:p,color:null,value:d,range:!0,onChangeComplete:t=>{i(new v.kf(p)),s>=t.length&&a(t.length-1),l(!1)},disabled:!1,type:"gradient",activeIndex:s,onActive:a,onDragStart:t=>{let{rawValues:e,draggingIndex:n,draggingValue:r}=t;if(e.length>p.length){const t=(0,J.PU)(p,r),e=(0,b.A)(p);e.splice(n,0,{percent:r,color:t}),f.current=e}else f.current=p;l(!0),o(new v.kf(oe(f.current)),!0)},onDragChange:t=>{let{deleteIndex:e,draggingIndex:n,draggingValue:r}=t,i=(0,b.A)(f.current);-1!==e?i.splice(e,1):(i[n]=Object.assign(Object.assign({},i[n]),{percent:r}),i=oe(i)),o(new v.kf(i),!0)},onKeyDelete:t=>{const e=(0,b.A)(p);e.splice(t,1);const n=new v.kf(e);o(n),i(n)}}):null},ae=r.memo(ie);var se=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const le={slider:re},ce=()=>{const t=(0,r.useContext)(Z),{mode:e,onModeChange:n,modeOptions:o,prefixCls:i,allowClear:a,value:s,disabledAlpha:l,onChange:c,onClear:u,onChangeComplete:p,activeIndex:d,gradientDragging:f}=t,h=se(t,["mode","onModeChange","modeOptions","prefixCls","allowClear","value","disabledAlpha","onChange","onClear","onChangeComplete","activeIndex","gradientDragging"]),g=r.useMemo(()=>s.cleared?[{percent:0,color:new v.kf("")},{percent:100,color:new v.kf("")}]:s.getColors(),[s]),m=!s.isGradient(),[y,C]=r.useState(s);(0,T.A)(()=>{var t;m||C(null===(t=g[d])||void 0===t?void 0:t.color)},[f,d]);const w=r.useMemo(()=>{var t;return m?s:f?y:null===(t=g[d])||void 0===t?void 0:t.color},[s,d,m,y,f]),[E,S]=r.useState(w),[x,O]=r.useState(0),A=(null===E||void 0===E?void 0:E.equals(w))?w:E;(0,T.A)(()=>{S(w)},[x,null===w||void 0===w?void 0:w.toHexString()]);const k=(t,n)=>{let r=(0,J.Z6)(t);if(s.cleared){const t=r.toRgb();if(t.r||t.g||t.b||!n)r=(0,J.E)(r);else{const{type:t,value:e=0}=n;r=new v.kf({h:"hue"===t?e:0,s:1,b:1,a:"alpha"===t?e/100:1})}}if("single"===e)return r;const o=(0,b.A)(g);return o[d]=Object.assign(Object.assign({},o[d]),{color:r}),new v.kf(o)};let P=null;const N=o.length>1;return(a||N)&&(P=r.createElement("div",{className:`${i}-operation`},N&&r.createElement(X,{size:"small",options:o,value:e,onChange:n}),r.createElement(tt,Object.assign({prefixCls:i,value:s,onChange:t=>{c(t),null===u||void 0===u||u()}},h)))),r.createElement(r.Fragment,null,P,r.createElement(ae,Object.assign({},t,{colors:g})),r.createElement(_.Ay,{prefixCls:i,value:null===A||void 0===A?void 0:A.toHsb(),disabledAlpha:l,onChange:(t,e)=>{((t,e,n)=>{const r=k(t,n);S(r.isGradient()?r.getColors()[d].color:r),c(r,e)})(t,!0,e)},onChangeComplete:(t,e)=>{((t,e)=>{p(k(t,e)),O(t=>t+1)})(t,e)},components:le}),r.createElement(ht,Object.assign({value:w,onChange:t=>{c(k(t))},prefixCls:i,disabledAlpha:l}
1,h)))};var ue=n(25418);const pe=()=>{const{prefixCls:t,value:e,presets:n,onChange:o}=(0,r.useContext)(Q);return Array.isArray(n)?r.createElement(ue.A,{value:e,presets:n,prefixCls:t,onChange:o}):null};const de=t=>{const{prefixCls:e,presets:n,panelRender:o,value:i,onChange:a,onClear:s,allowClear:l,disabledAlpha:c,mode:u,onModeChange:p,modeOptions:d,onChangeComplete:f,activeIndex:h,onActive:g,format:m,onFormatChange:v,gradientDragging:b,onGradientDragging:_,disabledFormat:T}=t,C=`${e}-inner`,w=r.useMemo(()=>({prefixCls:e,value:i,onChange:a,onClear:s,allowClear:l,disabledAlpha:c,mode:u,onModeChange:p,modeOptions:d,onChangeComplete:f,activeIndex:h,onActive:g,format:m,onFormatChange:v,gradientDragging:b,onGradientDragging:_,disabledFormat:T}),[e,i,a,s,l,c,u,p,d,f,h,g,m,v,b,_,T]),E=r.useMemo(()=>({prefixCls:e,value:i,presets:n,onChange:a}),[e,i,n,a]),S=r.createElement("div",{className:`${C}-content`},r.createElement(ce,null),Array.isArray(n)&&r.createElement(y.A,null),r.createElement(pe,null));return r.createElement(Z.Provider,{value:w},r.createElement(Q.Provider,{value:E},r.createElement("div",{className:C},"function"===typeof o?o(S,{components:{Picker:ce,Presets:pe}}):S)))};var fe=n(82795),he=n(54777),ge=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const me=(0,r.forwardRef)((t,e)=>{const{color:n,prefixCls:o,open:a,disabled:s,format:l,className:c,showText:u,activeIndex:p}=t,d=ge(t,["color","prefixCls","open","disabled","format","className","showText","activeIndex"]),f=`${o}-trigger`,h=`${f}-text`,g=`${h}-cell`,[m]=(0,he.A)("ColorPicker"),v=r.useMemo(()=>{if(!u)return"";if("function"===typeof u)return u(n);if(n.cleared)return m.transparent;if(n.isGradient())return n.getColors().map((t,e)=>{const n=-1!==p&&p!==e;return r.createElement("span",{key:e,className:i()(g,n&&`${g}-inactive`)},t.color.toRgbString()," ",t.percent,"%")});const t=n.toHexString().toUpperCase(),e=(0,J.Gp)(n);switch(l){case"rgb":return n.toRgbString();case"hsb":return n.toHsbString();default:return e<100?`${t.slice(0,7)},${e}%`:t}},[n,l,u,p]),y=(0,r.useMemo)(()=>n.cleared?r.createElement(tt,{prefixCls:o}):r.createElement(_.ZC,{prefixCls:o,color:n.toCssString()}),[n,o]);return r.createElement("div",Object.assign({ref:e,className:i()(f,c,{[`${f}-active`]:a,[`${f}-disabled`]:s})},(0,fe.A)(d)),y,u&&r.createElement("div",{className:h},v))}),ve=me;var ye=n(33792);const be=(t,e)=>({backgroundImage:`conic-gradient(${e} 25%, transparent 25% 50%, ${e} 50% 75%, transparent 75% 100%)`,backgroundSize:`${t} ${t}`}),_e=(t,e)=>{const{componentCls:n,borderRadiusSM:r,colorPickerInsetShadow:o,lineWidth:i,colorFillSecondary:a}=t;return{[`${n}-color-block`]:Object.assign(Object.assign({position:"relative",borderRadius:r,width:e,height:e,boxShadow:o,flex:"none"},be("50%",t.colorFillSecondary)),{[`${n}-color-block-inner`]:{width:"100%",height:"100%",boxShadow:`inset 0 0 0 ${(0,F.zA)(i)} ${a}`,borderRadius:"inherit"}})}},Te=t=>{const{componentCls:e,antCls:n,fontSizeSM:r,lineHeightSM:o,colorPickerAlphaInputWidth:i,marginXXS:a,paddingXXS:s,controlHeightSM:l,marginXS:c,fontSizeIcon:u,paddingXS:p,colorTextPlaceholder:d,colorPickerInputNumberHandleWidth:f,lineWidth:h}=t;return{[`${e}-input-container`]:{display:"flex",[`${e}-steppers${n}-input-number`]:{fontSize:r,lineHeight:o,[`${n}-input-number-input`]:{paddingInlineStart:s,paddingInlineEnd:0},[`${n}-input-number-handler-wrap`]:{width:f}},[`${e}-steppers${e}-alpha-input`]:{flex:`0 0 ${(0,F.zA)(i)}`,marginInlineStart:a},[`${e}-format-select${n}-select`]:{marginInlineEnd:c,width:"auto","&-single":{[`${n}-select-selector`]:{padding:0,border:0},[`${n}-select-arrow`]:{insetInlineEnd:0},[`${n}-select-selection-item`]:{paddingInlineEnd:t.calc(u).add(a).equal(),fontSize:r,lineHeight:(0,F.zA)(l)},[`${n}-select-item-option-content`]:{fontSize:r,lineHeight:o},[`${n}-select-dropdown`]:{[`${n}-select-item`]:{minHeight:"auto"}}}},[`${e}-input`]:{gap:a,alignItems:"center",flex:1,width:0,[`${e}-hsb-input,${e}-rgb-input`]:{display:"flex",gap:a,alignItems:"center"},[`${e}-steppers`]:{flex:1},[`${e}-hex-input${n}-input-affix-wrapper`]:{flex:1,padding:`0 ${(0,F.zA)(p)}`,[`${n}-input`]:{fontSize:r,textTransform:"uppercase",lineHeight:(0,F.zA)(t.calc(l).sub(t.calc(h).mul(2)).equal())},[`${n}-input-prefix`]:{color:d}}}}}},Ce=t=>{const{componentCls:e,controlHeightLG:n,borderRadiusSM:r,colorPickerInsetShadow:o,marginSM:i,colorBgElevated:a,colorFillSecondary:s,lineWidthBold:l,colorPickerHandlerSize:c}=t;return{userSelect:"none",[`${e}-select`]:{[`${e}-palette`]:{minHeight:t.calc(n).mul(4).equal(),overflow:"hidden",borderRadius:r},[`${e}-saturation`]:{position:"absolute",borderRadius:"inherit",boxShadow:o,inset:0},marginBottom:i},[`${e}-handler`]:{width:c,height:c,border:`${(0,F.zA)(l)} solid ${a}`,position:"relative",borderRadius:"50%",cursor:"pointer",boxShadow:`${o}, 0 0 0 1px ${s}`}}},we=t=>{const{componentCls:e,antCls:n,colorTextQuaternary:r,paddingXXS:o,colorPickerPresetColorSize:i,fontSizeSM:a,colorText:s,lineHeightSM:l,lineWidth:c,borderRadius:u,colorFill:p,colorWhite:d,marginXXS:f,paddingXS:h,fontHeightSM:g}=t;return{[`${e}-presets`]:{[`${n}-collapse-item > ${n}-collapse-header`]:{padding:0,[`${n}-collapse-expand-icon`]:{height:g,color:r,paddingInlineEnd:o}},[`${n}-collapse`]:{display:"flex",flexDirection:"column",gap:f},[`${n}-collapse-item > ${n}-collapse-content > ${n}-collapse-content-box`]:{padding:`${(0,F.zA)(h)} 0`}
1,"&-label":{fontSize:a,color:s,lineHeight:l},"&-items":{display:"flex",flexWrap:"wrap",gap:t.calc(f).mul(1.5).equal(),[`${e}-presets-color`]:{position:"relative",cursor:"pointer",width:i,height:i,"&::before":{content:'""',pointerEvents:"none",width:t.calc(i).add(t.calc(c).mul(4)).equal(),height:t.calc(i).add(t.calc(c).mul(4)).equal(),position:"absolute",top:t.calc(c).mul(-2).equal(),insetInlineStart:t.calc(c).mul(-2).equal(),borderRadius:u,border:`${(0,F.zA)(c)} solid transparent`,transition:`border-color ${t.motionDurationMid} ${t.motionEaseInBack}`},"&:hover::before":{borderColor:p},"&::after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:t.calc(i).div(13).mul(5).equal(),height:t.calc(i).div(13).mul(8).equal(),border:`${(0,F.zA)(t.lineWidthBold)} solid ${t.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${t.motionDurationFast} ${t.motionEaseInBack}, opacity ${t.motionDurationFast}`},[`&${e}-presets-color-checked`]:{"&::after":{opacity:1,borderColor:d,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`transform ${t.motionDurationMid} ${t.motionEaseOutBack} ${t.motionDurationFast}`},[`&${e}-presets-color-bright`]:{"&::after":{borderColor:"rgba(0, 0, 0, 0.45)"}}}}},"&-empty":{fontSize:a,color:r}}}},Ee=t=>{const{componentCls:e,colorPickerInsetShadow:n,colorBgElevated:r,colorFillSecondary:o,lineWidthBold:i,colorPickerHandlerSizeSM:a,colorPickerSliderHeight:s,marginSM:l,marginXS:c}=t,u=t.calc(a).sub(t.calc(i).mul(2).equal()).equal(),p=t.calc(a).add(t.calc(i).mul(2).equal()).equal(),d={"&:after":{transform:"scale(1)",boxShadow:`${n}, 0 0 0 1px ${t.colorPrimaryActive}`}};return{[`${e}-slider`]:[be((0,F.zA)(s),t.colorFillSecondary),{margin:0,padding:0,height:s,borderRadius:t.calc(s).div(2).equal(),"&-rail":{height:s,borderRadius:t.calc(s).div(2).equal(),boxShadow:n},[`& ${e}-slider-handle`]:{width:u,height:u,top:0,borderRadius:"100%","&:before":{display:"block",position:"absolute",background:"transparent",left:{_skip_check_:!0,value:"50%"},top:"50%",transform:"translate(-50%, -50%)",width:p,height:p,borderRadius:"100%"},"&:after":{width:a,height:a,border:`${(0,F.zA)(i)} solid ${r}`,boxShadow:`${n}, 0 0 0 1px ${o}`,outline:"none",insetInlineStart:t.calc(i).mul(-1).equal(),top:t.calc(i).mul(-1).equal(),background:"transparent",transition:"none"},"&:focus":d}}],[`${e}-slider-container`]:{display:"flex",gap:l,marginBottom:l,[`${e}-slider-group`]:{flex:1,flexDirection:"column",justifyContent:"space-between",display:"flex","&-disabled-alpha":{justifyContent:"center"}}},[`${e}-gradient-slider`]:{marginBottom:c,[`& ${e}-slider-handle`]:{"&:after":{transform:"scale(0.8)"},"&-active, &:focus":d}}}},Se=(t,e,n)=>({borderInlineEndWidth:t.lineWidth,borderColor:e,boxShadow:`0 0 0 ${(0,F.zA)(t.controlOutlineWidth)} ${n}`,outline:0}),xe=t=>{const{componentCls:e}=t;return{"&-rtl":{[`${e}-presets-color`]:{"&::after":{direction:"ltr"}},[`${e}-clear`]:{"&::after":{direction:"ltr"}}}}},Oe=(t,e,n)=>{const{componentCls:r,borderRadiusSM:o,lineWidth:i,colorSplit:a,colorBorder:s,red6:l}=t;return{[`${r}-clear`]:Object.assign(Object.assign({width:e,height:e,borderRadius:o,border:`${(0,F.zA)(i)} solid ${a}`,position:"relative",overflow:"hidden",cursor:"inherit",transition:`all ${t.motionDurationFast}`},n),{"&::after":{content:'""',position:"absolute",insetInlineEnd:t.calc(i).mul(-1).equal(),top:t.calc(i).mul(-1).equal(),display:"block",width:40,height:2,transformOrigin:"calc(100% - 1px) 1px",transform:"rotate(-45deg)",backgroundColor:l},"&:hover":{borderColor:s}})}},Ae=t=>{const{componentCls:e,colorError:n,colorWarning:r,colorErrorHover:o,colorWarningHover:i,colorErrorOutline:a,colorWarningOutline:s}=t;return{[`&${e}-status-error`]:{borderColor:n,"&:hover":{borderColor:o},[`&${e}-trigger-active`]:Object.assign({},Se(t,n,a))},[`&${e}-status-warning`]:{borderColor:r,"&:hover":{borderColor:i},[`&${e}-trigger-active`]:Object.assign({},Se(t,r,s))}}},ke=t=>{const{componentCls:e,controlHeightLG:n,controlHeightSM:r,controlHeight:o,c
1ontrolHeightXS:i,borderRadius:a,borderRadiusSM:s,borderRadiusXS:l,borderRadiusLG:c,fontSizeLG:u}=t;return{[`&${e}-lg`]:{minWidth:n,minHeight:n,borderRadius:c,[`${e}-color-block, ${e}-clear`]:{width:o,height:o,borderRadius:a},[`${e}-trigger-text`]:{fontSize:u}},[`&${e}-sm`]:{minWidth:r,minHeight:r,borderRadius:s,[`${e}-color-block, ${e}-clear`]:{width:i,height:i,borderRadius:l},[`${e}-trigger-text`]:{lineHeight:(0,F.zA)(i)}}}},Pe=t=>{const{antCls:e,componentCls:n,colorPickerWidth:r,colorPrimary:o,motionDurationMid:i,colorBgElevated:a,colorTextDisabled:s,colorText:l,colorBgContainerDisabled:c,borderRadius:u,marginXS:p,marginSM:d,controlHeight:f,controlHeightSM:h,colorBgTextActive:g,colorPickerPresetColorSize:m,colorPickerPreviewSize:v,lineWidth:y,colorBorder:b,paddingXXS:_,fontSize:T,colorPrimaryHover:C,controlOutline:w}=t;return[{[n]:Object.assign({[`${n}-inner`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({"&-content":{display:"flex",flexDirection:"column",width:r,[`& > ${e}-divider`]:{margin:`${(0,F.zA)(d)} 0 ${(0,F.zA)(p)}`}},[`${n}-panel`]:Object.assign({},Ce(t))},Ee(t)),_e(t,v)),Te(t)),we(t)),Oe(t,m,{marginInlineStart:"auto"})),{[`${n}-operation`]:{display:"flex",justifyContent:"space-between",marginBottom:p}}),"&-trigger":Object.assign(Object.assign(Object.assign(Object.assign({minWidth:f,minHeight:f,borderRadius:u,border:`${(0,F.zA)(y)} solid ${b}`,cursor:"pointer",display:"inline-flex",alignItems:"flex-start",justifyContent:"center",transition:`all ${i}`,background:a,padding:t.calc(_).sub(y).equal(),[`${n}-trigger-text`]:{marginInlineStart:p,marginInlineEnd:t.calc(p).sub(t.calc(_).sub(y)).equal(),fontSize:T,color:l,alignSelf:"center","&-cell":{"&:not(:last-child):after":{content:'", "'},"&-inactive":{color:s}}},"&:hover":{borderColor:C},[`&${n}-trigger-active`]:Object.assign({},Se(t,o,w)),"&-disabled":{color:s,background:c,cursor:"not-allowed","&:hover":{borderColor:g},[`${n}-trigger-text`]:{color:s}}},Oe(t,h)),_e(t,h)),Ae(t)),ke(t))},xe(t))},(0,ye.G)(t,{focusElCls:`${n}-trigger-active`})]},Ne=(0,V.OF)("ColorPicker",t=>{const{colorTextQuaternary:e,marginSM:n}=t,r=(0,U.oX)(t,{colorPickerWidth:234,colorPickerHandlerSize:16,colorPickerHandlerSizeSM:12,colorPickerAlphaInputWidth:44,colorPickerInputNumberHandleWidth:16,colorPickerPresetColorSize:24,colorPickerInsetShadow:`inset 0 0 1px 0 ${e}`,colorPickerSliderHeight:8,colorPickerPreviewSize:t.calc(8).mul(2).add(n).equal()});return[Pe(r)]});var Me=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const Le=t=>{const{mode:e,value:n,defaultValue:o,format:l,defaultFormat:y,allowClear:b=!1,presets:_,children:T,trigger:C="click",open:w,disabled:E,placement:S="bottomLeft",arrow:x=!0,panelRender:O,showText:A,style:k,className:P,size:N,rootClassName:M,prefixCls:L,styles:I,disabledAlpha:D=!1,onFormatChange:R,onChange:j,onClear:H,onOpenChange:F,onChangeComplete:B,getPopupContainer:V,autoAdjustOverflow:U=!0,destroyTooltipOnHide:z,destroyOnHidden:G,disabledFormat:$}=t,q=Me(t,["mode","value","defaultValue","format","defaultFormat","allowClear","presets","children","trigger","open","disabled","placement","arrow","panelRender","showText","style","className","size","rootClassName","prefixCls","styles","disabledAlpha","onFormatChange","onChange","onClear","onOpenChange","onChangeComplete","getPopupContainer","autoAdjustOverflow","destroyTooltipOnHide","destroyOnHidden","disabledFormat"]),{getPrefixCls:W,direction:K,colorPicker:Y}=(0,r.useContext)(u.QO),X=(0,r.useContext)(p.A),Z=null!==E&&void 0!==E?E:X,[Q,tt]=(0,a.A)(!1,{value:w,postState:t=>!Z&&t,onChange:F}),[et,nt]=(0,a.A)(l,{value:l,defaultValue:y,onChange:R}),rt=W("color-picker",L),[ot,it,at,st,lt]=function(t,e,n){const[o]=(0,he.A)("ColorPicker"),[i,s]=(0,a.A)(t,{value:e}),[l,c]=r.useState("single"),[u,p]=r.useMemo(()=>{const t=(Array.isArray(n)?n:[n]).filter(t=>t);t.length||t.push("single");const e=new Set(t),r=[],i=(t,n)=>{e.has(t)&&r.push({label:n,value:t})};return i("single",o.singleColor),i("gradient",o.gradientColor),[r,e]},[n]),[d,f]=r.useState(null),h=(0,gt.A)(t=>{f(t),s(t)}),g=r.useMemo(()=>{const t=(0,J.Z6)(i||"");return t.equals(d)?d:t},[i,d]),m=r.useMemo(()=>{var t;return p.has(l)?l:null===(t=u[0])||void 0===t?void 0:t.value},[p,l,u]);return r.useEffect(()=>{c(g.isGradient()?"gradient":"single")},[g]),[g,h,m,c,u]}(o,n,e),ct=(0,r.useMemo)(()=>(0,J.Gp)(ot)<100,[ot]),[ut,pt]=r.useState(null),dt=t=>{if(B){let e=(0,J.Z6)(t);D&&ct&&(e=(0,J.E)(t)),B(e)}}
1,ft=(t,e)=>{let n=(0,J.Z6)(t);D&&ct&&(n=(0,J.E)(n)),it(n),pt(null),j&&j(n,n.toCssString()),e||dt(n)},[ht,mt]=r.useState(0),[vt,yt]=r.useState(!1),{status:bt}=r.useContext(h.$W),{compactSize:_t,compactItemClassnames:Tt}=(0,m.RQ)(rt,K),Ct=(0,f.A)(t=>{var e;return null!==(e=null!==N&&void 0!==N?N:_t)&&void 0!==e?e:t}),wt=(0,d.A)(rt),[Et,St,xt]=Ne(rt,wt),Ot={[`${rt}-rtl`]:K},At=i()(M,xt,wt,Ot),kt=i()((0,c.L)(rt,bt),{[`${rt}-sm`]:"small"===Ct,[`${rt}-lg`]:"large"===Ct},Tt,null===Y||void 0===Y?void 0:Y.className,At,P,St),Pt=i()(rt,At);const Nt={open:Q,trigger:C,placement:S,arrow:x,rootClassName:M,getPopupContainer:V,autoAdjustOverflow:U,destroyOnHidden:null!==G&&void 0!==G?G:!!z},Mt=Object.assign(Object.assign({},null===Y||void 0===Y?void 0:Y.style),k);return Et(r.createElement(g.A,Object.assign({style:null===I||void 0===I?void 0:I.popup,styles:{body:null===I||void 0===I?void 0:I.popupOverlayInner},onOpenChange:t=>{t&&Z||tt(t)},content:r.createElement(s.A,{form:!0},r.createElement(de,{mode:at,onModeChange:t=>{if(st(t),"single"===t&&ot.isGradient())mt(0),ft(new v.kf(ot.getColors()[0].color)),pt(ot);else if("gradient"===t&&!ot.isGradient()){const t=ct?(0,J.E)(ot):ot;ft(new v.kf(ut||[{percent:0,color:t},{percent:100,color:t}]))}},modeOptions:lt,prefixCls:rt,value:ot,allowClear:b,disabled:Z,disabledAlpha:D,presets:_,panelRender:O,format:et,onFormatChange:nt,onChange:ft,onChangeComplete:dt,onClear:H,activeIndex:ht,onActive:mt,gradientDragging:vt,onGradientDragging:yt,disabledFormat:$})),classNames:{root:Pt}},Nt),T||r.createElement(ve,Object.assign({activeIndex:Q?ht:-1,open:Q,className:kt,style:Mt,prefixCls:rt,disabled:Z,showText:A,format:et},q,{color:ot}))))};const Ie=(0,l.A)(Le,void 0,t=>Object.assign(Object.assign({},t),{placement:"bottom",autoAdjustOverflow:!1}),"color-picker",t=>t);Le._InternalPanelDoNotUseOrYouWillBeFired=Ie;const De=Le},40911:function(t,e,n){var r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window&&window,r=()=>(()=>{var t={410:(t,e,n)=>{var r,o,i;o=[n(50),n(316)],void 0===(i="function"==typeof(r=function(t,e){var n=Array.prototype.slice;function r(t,e,n){return n.length<=4?t.call(e,n[0],n[1],n[2],n[3]):t.apply(e,n)}function o(t,e){return n.call(t,e)}function i(e,n){return null!=e&&(t.isArray(n)||(n=o(arguments,1)),t.all(n,function(t){return t in e}))}var a=function(){var e=!1,n=-1;return function(){return e||(n++,e=!0,t.defer(function(){e=!1})),n}}();function s(){this.registeredObjects=[],this.cidIndexes=[]}function l(e,n,r,o){for(var i,a=0,s=n.length;a<s;a++)if(i=n[a]){if("on"===e){if(!o.objectRegistry.register(i))continue}else if(!o.objectRegistry.unregister(i))continue;t.isFunction(i[e])&&i[e]("all",r,o)}}function c(e,n){var r=n.type,o=n.undoTypes,i=!o[r]||o[r][e];t.isFunction(i)&&i(n.object,n.before,n.after,n.options)}function u(e,r,o,i,a){if(!(o.isCurrentlyUndoRedoing||"undo"===e&&-1===o.pointer||"redo"===e&&o.pointer===o.length-1)){o.isCurrentlyUndoRedoing=!0;var s,l,c="undo"===e;for(a?l=c&&o.pointer===o.length-1||!c&&-1===o.pointer?t.clone(o.models):n.apply(o.models,c?[0,o.pointer]:[o.pointer,o.length-1]):(s=o.at(c?o.pointer:o.pointer+1),l=i?o.where({magicFusionIndex:s.get("magicFusionIndex")}):[s]),o.pointer+=(c?-1:1)*l.length;s=c?l.pop():l.shift();)s[e]();o.isCurrentlyUndoRedoing=!1,r.trigger(e,r)}}function p(t,e,n,o){if(t.track&&!t.isCurrentlyUndoRedoing&&e in o&&function(t,e){var n=t.condition,o=typeof n;return"function"===o?!!r(n,t,e):"boolean"!==o||n}(o[e],n)){var s=r(o[e].on,o[e],n);if(i(s,"object","before","after")){if(s.type=e,s.magicFusionIndex=a(),s.undoTypes=o,t.pointer<t.length-1)for(var l=t.length-t.pointer-1;l--;)t.pop();t.pointer=t.length,t.add(s),t.length>t.maximumStackLength&&(t.shift(),t.pointer--)}}}s.prototype={isRegistered:function(e){return e&&e.cid?this.registeredObjects[e.cid]:t.contains(this.registeredObjects,e)},register:function(t){return!this.isRegistered(t)&&(t&&t.cid?(this.registeredObjects[t.cid]=t,this.cidIndexes.push(t.cid)):this.registeredObjects.push(t),!0)},unregister:function(e){if(this.isRegistered(e)){if(e&&e.cid)delete this.registeredObjects[e.cid],this.cidIndexes.splice(t.indexOf(this.cidIndexes,e.cid),1);else{var n=t.indexOf(this.registeredObjects,e);this.registeredObjects.splice(n,1)}return!0}return!1},get:function(){return t.map(this.cidIndexes,function(t){return this.registeredObjects[t]},this).concat(this.registeredObjects)}};var d={add:{undo:function(t,e,n,r){t.remove(n,r)},redo:function(t,e,n,r){r.index&&(r.at=r.index),t.add(n,r)},on:function(e,n,r){return{object:n,before:void 0,after:e,options:t.clone(r)}}},remove:{undo:function(t,e,n,r){"index"in r&&(r.at=r.index),t.add(e,r)},redo:function(t,e,n,r){t.remove(e,r)},on:function(e,n,r){return{object:n,before:e,after:void 0,options:t.clone(r)}}},change:{undo:function(e,n,r,o){t.isEmpty(n)?t.each(t.keys(r),e.unset,e):(e.set(n),o&&o.unsetData&&o.unsetData.before&&o.unsetData.before.length&&t.each(o.unsetData.before,e.unset,e))},redo:function(e,n,r,o){t.isEmpty(r)?t.each(t.keys(n),e.unset,e):(e.set(r),o&&o.unsetData&&o.unsetData.after&&o.unsetData.after.length&&t.each(o.unsetData.after,e.unset,e))},on:function(e,n){var r=e.changedAttributes(),o=t.keys(r),i=t.pick(e.previousAttributes(),o),a=t.keys(i),s=(n||(n={})).unsetData={after:[],before:[]};return o.length!=a.length&&(o.length>a.length?t.each(o,function(t){t in i||s.before.push(t)},this):t.each(a,function(t){t in r||s.after.push(t)})),{object:e,before:i,after:r,options:t.clone(n)}}},reset:{undo:function(t,e,n){t.reset(e)},redo:function(t,e,n){t.reset(n)},on:function(e,n){return{object:e,before:n.previousModels,after:t.clone(e.models)}}}};function f(){}function h(e,n,r,o){if("object"==typeof n)return t.each(n,function(t,n){2===e?h(e,t,r,o):h(e,n,t,r)});switch(e){case 0:i(r,"undo","redo","on")&&t.all(t.pick(r,"undo","redo","on"),t.isFunction)&&(o[n]=r);break;case 1:o[n]&&t.isObject(r)&&(o[n]=t.extend({},o[n],r));break;case 2:delete o[n]}return this}f.prototype=d;var g=e.Model.extend({defaults:{type:null,object:null,before:null,after:null,magicFusionIndex:null},undo:function(t){c("undo",this.attributes)},redo:function(t){c("redo",this.attributes)}}),m=e.Collection.extend({model:g,pointer:-1,track:!1,isCurrentlyUndoRedoing:!1,maximumStackLength:1/0,setMaxLength:function(t){this.maximumStackLength=t}}),v=e.Model.extend({defaults:{maximumStackLength:1/0,track:!1},initialize:function(e){this.stack=new m,this.objectRegistry=new s,this.undoTypes=new f,this.stack.setMaxLength(this.get("maximumStackLength")),this.on("change:maximumStackLength",function(t,e){this.stack.setMaxLength(e)},this),e&&e.track&&this.startTracking(),e&&e.register&&(t.isArray(e.register)||t.isArguments(e.register)?r(this.register,this,e.register):this.register(e.register))},startTracking:function(){this.set("track",!0),this.stack.track=!0},stopTracking:function(){this.set("track",!1),this.stack.track=!1},isTracking:function(){return this.get("track")}
1,_addToStack:function(t){p(this.stack,t,o(arguments,1),this.undoTypes)},register:function(){l("on",arguments,this._addToStack,this)},unregister:function(){l("off",arguments,this._addToStack,this)},unregisterAll:function(){r(this.unregister,this,this.objectRegistry.get())},undo:function(t){u("undo",this,this.stack,t)},undoAll:function(){u("undo",this,this.stack,!1,!0)},redo:function(t){u("redo",this,this.stack,t)},redoAll:function(){u("redo",this,this.stack,!1,!0)},isAvailable:function(t){var e=this.stack,n=e.length;switch(t){case"undo":return n>0&&e.pointer>-1;case"redo":return n>0&&e.pointer<n-1;default:return!1}},merge:function(e){for(var n,r=t.isArray(e)?e:o(arguments);n=r.pop();)n instanceof v&&n.stack instanceof m&&(n.stack=this.stack)},addUndoType:function(t,e){h(0,t,e,this.undoTypes)},changeUndoType:function(t,e){h(1,t,e,this.undoTypes)},removeUndoType:function(t){h(2,t,void 0,this.undoTypes)},clear:function(){this.stack.reset(),this.stack.pointer=-1}});return t.extend(v,{defaults:function(e){t.extend(v.prototype.defaults,e)},addUndoType:function(t,e){h(0,t,e,d)},changeUndoType:function(t,e){h(1,t,e,d)},removeUndoType:function(t){h(2,t,void 0,d)}}),e.UndoManager=v})?r.apply(e,o):r)||(t.exports=i)},316:(t,e,n)=>{var r,o;!function(){var i="object"==typeof self&&self.self===self&&self||"object"==typeof n.g&&n.g.global===n.g&&n.g;r=[n(50),n(895),e],o=function(t,e,n){i.Backbone=function(t,e,n,r){var o=t.Backbone,i=Array.prototype.slice;e.VERSION="1.4.1",e.$=r,e.noConflict=function(){return t.Backbone=o,this},e.emulateHTTP=!1,e.emulateJSON=!1;var a,s=e.Events={},l=/\s+/,c=function(t,e,r,o,i){var a,s=0;if(r&&"object"==typeof r){void 0!==o&&"context"in i&&void 0===i.context&&(i.context=o);for(a=n.keys(r);s<a.length;s++)e=c(t,e,a[s],r[a[s]],i)}else if(r&&l.test(r))for(a=r.split(l);s<a.length;s++)e=t(e,a[s],o,i);else e=t(e,r,o,i);return e};s.on=function(t,e,n){return this._events=c(u,this._events||{},t,e,{context:n,ctx:this,listening:a}),a&&((this._listeners||(this._listeners={}))[a.id]=a,a.interop=!1),this},s.listenTo=function(t,e,r){if(!t)return this;var o=t._listenId||(t._listenId=n.uniqueId("l")),i=this._listeningTo||(this._listeningTo={}),s=a=i[o];s||(this._listenId||(this._listenId=n.uniqueId("l")),s=a=i[o]=new m(this,t));var l=p(t,e,r,this);if(a=void 0,l)throw l;return s.interop&&s.on(e,r),this};var u=function(t,e,n,r){if(n){var o=t[e]||(t[e]=[]),i=r.context,a=r.ctx,s=r.listening;s&&s.count++,o.push({callback:n,context:i,ctx:i||a,listening:s})}return t},p=function(t,e,n,r){try{t.on(e,n,r)}catch(t){return t}};s.off=function(t,e,n){return this._events?(this._events=c(d,this._events,t,e,{context:n,listeners:this._listeners}),this):this},s.stopListening=function(t,e,r){var o=this._listeningTo;if(!o)return this;for(var i=t?[t._listenId]:n.keys(o),a=0;a<i.length;a++){var s=o[i[a]];if(!s)break;s.obj.off(e,r,this),s.interop&&s.off(e,r)}return n.isEmpty(o)&&(this._listeningTo=void 0),this};var d=function(t,e,r,o){if(t){var i,a=o.context,s=o.listeners,l=0;if(e||a||r){for(i=e?[e]:n.keys(t);l<i.length;l++){var c=t[e=i[l]];if(!c)break;for(var u=[],p=0;p<c.length;p++){var d=c[p];if(r&&r!==d.callback&&r!==d.callback._callback||a&&a!==d.context)u.push(d);else{var f=d.listening;f&&f.off(e,r)}}u.length?t[e]=u:delete t[e]}return t}for(i=n.keys(s);l<i.length;l++)s[i[l]].cleanup()}};s.once=function(t,e,n){var r=c(f,{},t,e,this.off.bind(this));return"string"==typeof t&&null==n&&(e=void 0),this.on(r,e,n)},s.listenToOnce=function(t,e,n){var r=c(f,{},e,n,this.stopListening.bind(this,t));return this.listenTo(t,r)};var f=function(t,e,r,o){if(r){var i=t[e]=n.once(function(){o(e,i),r.apply(this,arguments)});i._callback=r}return t};s.trigger=function(t){if(!this._events)return this;for(var e=Math.max(0,arguments.length-1),n=Array(e),r=0;r<e;r++)n[r]=arguments[r+1];return c(h,this._events,t,void 0,n),this};var h=function(t,e,n,r){if(t){var o=t[e],i=t.all;o&&i&&(i=i.slice()),o&&g(o,r),i&&g(i,[e].concat(r))}return t},g=function(t,e){var n,r=-1,o=t.length,i=e[0],a=e[1],s=e[2];switch(e.length){case 0:for(;++r<o;)(n=t[r]).callback.call(n.ctx);return;case 1:for(;++r<o;)(n=t[r]).callback.call(n.ctx,i);return;case 2:for(;++r<o;)(n=t[r]).callback.call(n.ctx,i,a);return;case 3:for(;++r<o;)(n=t[r]).callback.call(n.ctx,i,a,s);return;default:for(;++r<o;)(n=t[r]).callback.apply(n.ctx,e);return}},m=function(t,e){this.id=t._listenId,this.listener=t,this.obj=e,this.interop=!0,this.count=0,this._events=void 0};m.prototype.on=s.on,m.prototype.off=function(t,e){var n;this.interop?(this._events=c(d,this._events,t,e,{context:void 0,listeners:void 0}),n=!this._events):(this.count--,n=0===this.count),n&&this.cleanup()},m.prototype.cleanup=function(){delete this.listener._listeningTo[this.obj._listenId],this.interop||delete this.obj._listeners[this.id]},s.bind=s.on,s.unbind=s.off,n.extend(e,s);var v=e.Model=function(t,e){var r=t||{};e||(e={}),this.preinitialize.apply(this,arguments),this.cid=n.uniqueId(this.cidPrefix),this.attributes={},e.collection&&(this.collection=e.collection),e.parse&&(r=this.parse(r,e)||{});var o=n.result(this,"defaults");r=n.defaults(n.extend({},o,r),o),this.set(r,e),this.changed={},this.initialize.apply(this,arguments)};n.extend(v.prototype,s,{changed:null,validationError:null,idAttribute:"id",cidPrefix:"c",preinitialize:function(){},initialize:function(){},toJSON:function(t){return n.clone(this.attributes)},sync:function(){return e.sync.apply(this,arguments)},get:function(t){return this.attributes[t]},escape:function(t){return n.escape(this.get(t))},has:function(t){return null!=this.get(t)},matches:function(t){return!!n.iteratee(t,this)(this.attributes)},set:function(t,e,r){if(null==t)return this;var o;if("object"==typeof t?(o=t,r=e):(o={})[t]=e,r||(r={}
1),!this._validate(o,r))return!1;var i=r.unset,a=r.silent,s=[],l=this._changing;this._changing=!0,l||(this._previousAttributes=n.clone(this.attributes),this.changed={});var c=this.attributes,u=this.changed,p=this._previousAttributes;for(var d in o)e=o[d],n.isEqual(c[d],e)||s.push(d),n.isEqual(p[d],e)?delete u[d]:u[d]=e,i?delete c[d]:c[d]=e;if(this.idAttribute in o){var f=this.id;this.id=this.get(this.idAttribute),this.trigger("changeId",this,f,r)}if(!a){s.length&&(this._pending=r);for(var h=0;h<s.length;h++)this.trigger("change:"+s[h],this,c[s[h]],r)}if(l)return this;if(!a)for(;this._pending;)r=this._pending,this._pending=!1,this.trigger("change",this,r);return this._pending=!1,this._changing=!1,this},unset:function(t,e){return this.set(t,void 0,n.extend({},e,{unset:!0}))},clear:function(t){var e={};for(var r in this.attributes)e[r]=void 0;return this.set(e,n.extend({},t,{unset:!0}))},hasChanged:function(t){return null==t?!n.isEmpty(this.changed):n.has(this.changed,t)},changedAttributes:function(t){if(!t)return!!this.hasChanged()&&n.clone(this.changed);var e,r=this._changing?this._previousAttributes:this.attributes,o={};for(var i in t){var a=t[i];n.isEqual(r[i],a)||(o[i]=a,e=!0)}return!!e&&o},previous:function(t){return null!=t&&this._previousAttributes?this._previousAttributes[t]:null},previousAttributes:function(){return n.clone(this._previousAttributes)},fetch:function(t){t=n.extend({parse:!0},t);var e=this,r=t.success;return t.success=function(n){var o=t.parse?e.parse(n,t):n;if(!e.set(o,t))return!1;r&&r.call(t.context,e,n,t),e.trigger("sync",e,n,t)},G(this,t),this.sync("read",this,t)},save:function(t,e,r){var o;null==t||"object"==typeof t?(o=t,r=e):(o={})[t]=e;var i=(r=n.extend({validate:!0,parse:!0},r)).wait;if(o&&!i){if(!this.set(o,r))return!1}else if(!this._validate(o,r))return!1;var a=this,s=r.success,l=this.attributes;r.success=function(t){a.attributes=l;var e=r.parse?a.parse(t,r):t;if(i&&(e=n.extend({},o,e)),e&&!a.set(e,r))return!1;s&&s.call(r.context,a,t,r),a.trigger("sync",a,t,r)},G(this,r),o&&i&&(this.attributes=n.extend({},l,o));var c=this.isNew()?"create":r.patch?"patch":"update";"patch"!==c||r.attrs||(r.attrs=o);var u=this.sync(c,this,r);return this.attributes=l,u},destroy:function(t){t=t?n.clone(t):{};var e=this,r=t.success,o=t.wait,i=function(){e.stopListening(),e.trigger("destroy",e,e.collection,t)};t.success=function(n){o&&i(),r&&r.call(t.context,e,n,t),e.isNew()||e.trigger("sync",e,n,t)};var a=!1;return this.isNew()?n.defer(t.success):(G(this,t),a=this.sync("delete",this,t)),o||i(),a},url:function(){var t=n.result(this,"urlRoot")||n.result(this.collection,"url")||z();if(this.isNew())return t;var e=this.get(this.idAttribute);return t.replace(/[^\/]$/,"$&/")+encodeURIComponent(e)},parse:function(t,e){return t},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(t){return this._validate({},n.extend({},t,{validate:!0}))},_validate:function(t,e){if(!e.validate||!this.validate)return!0;t=n.extend({},this.attributes,t);var r=this.validationError=this.validate(t,e)||null;return!r||(this.trigger("invalid",this,r,n.extend(e,{validationError:r})),!1)}});var y=e.Collection=function(t,e){e||(e={}),this.preinitialize.apply(this,arguments),e.model&&(this.model=e.model),void 0!==e.comparator&&(this.comparator=e.comparator),this._reset(),this.initialize.apply(this,arguments),t&&this.reset(t,n.extend({silent:!0},e))},b={add:!0,remove:!0,merge:!0},_={add:!0,remove:!1},T=function(t,e,n){n=Math.min(Math.max(n,0),t.length);var r,o=Array(t.length-n),i=e.length;for(r=0;r<o.length;r++)o[r]=t[r+n];for(r=0;r<i;r++)t[r+n]=e[r];for(r=0;r<o.length;r++)t[r+i+n]=o[r]};n.extend(y.prototype,s,{model:v,preinitialize:function(){},initialize:function(){},toJSON:function(t){return this.map(function(e){return e.toJSON(t)})},sync:function(){return e.sync.apply(this,arguments)},add:function(t,e){return this.set(t,n.extend({merge:!1},e,_))},remove:function(t,e){e=n.extend({},e);var r=!n.isArray(t);t=r?[t]:t.slice();var o=this._removeModels(t,e);return!e.silent&&o.length&&(e.changes={added:[],merged:[],removed:o},this.trigger("update",this,e)),r?o[0]:o},set:function(t,e){if(null!=t){(e=n.extend({},b,e)).parse&&!this._isModel(t)&&(t=this.parse(t,e)||[]);var r=!n.isArray(t);t=r?[t]:t.slice();var o=e.at;null!=o&&(o=+o),o>this.length&&(o=this.length),o<0&&(o+=this.length+1);var i,a,s=[],l=[],c=[],u=[],p={},d=e.add,f=e.merge,h=e.remove,g=!1,m=this.comparator&&null==o&&!1!==e.sort,v=n.isString(this.comparator)?this.comparator:null;for(a=0;a<t.length;a++){i=t[a];var y=this.get(i);if(y){if(f&&i!==y){var _=this._isModel(i)?i.attributes:i;e.parse&&(_=y.parse(_,e)),y.set(_,e),c.push(y),m&&!g&&(g=y.hasChanged(v))}p[y.cid]||(p[y.cid]=!0,s.push(y)),t[a]=y}else d&&(i=t[a]=this._prepareModel(i,e))&&(l.push(i),this._addReference(i,e),p[i.cid]=!0,s.push(i))}if(h){for(a=0;a<this.length;a++)p[(i=this.models[a]).cid]||u.push(i);u.length&&this._removeModels(u,e)}var C=!1,w=!m&&d&&h;if(s.length&&w?(C=this.length!==s.length||n.some(this.models,function(t,e){return t!==s[e]}),this.models.length=0,T(this.models,s,0),this.length=this.models.length):l.length&&(m&&(g=!0),T(this.models,l,null==o?this.length:o),this.length=this.models.length),g&&this.sort({silent:!0}),!e.silent){for(a=0;a<l.length;a++)null!=o&&(e.index=o+a),(i=l[a]).trigger("add",i,this,e);(g||C)&&this.trigger("sort",this,e),(l.length||u.length||c.length)&&(e.changes={added:l,removed:u,merged:c},this.trigger("update",this,e))}return r?t[0]:t}},reset:function(t,e){e=e?n.clone(e):{};for(var r=0;r<this.models.length;r++)this._removeReference(this.models[r],e);return e.previousModels=this.models,this._reset(),t=this.add(t,n.extend({silent:!0},e)),e.silent||this.trigger("reset",this,e),t},push:function(t,e){return this.add(t,n.extend({at:this.length},e))},pop:function(t){var e=this.at(this.length-1);return this.remove(e,t)},unshift:function(t,e){return this.add(t,n.extend({at:0},e))},shift:function(t){var e=this.at(0);return this.remove(e,t)},slice:function(){return i.apply(this.models,arguments)},get:function(t){if(null!=t)return this._byId[t]||this._byId[this.modelId(this._isModel(t)?t.attributes:t,t.idAttribute)]||t.cid&&this._byId[t.cid]},has:function(t){return null!=this.get(t)},at:function(t){return t<0&&(t+=this.length),this.models[t]},where:function(t,e){return this[e?"find":"filter"](t)},findWhere:function(t){return this.where(t,!0)},sort:function(t){var e=this.comparator;if(!e)throw new Error("Cannot sort a set without a comparator");t||(t={});var r=e.length;return n.isFunction(e)&&(e=e.bind(this)),1===r||n.isString(e)?this.models=this.sortBy(e):this.models.sort(e),t.silent||this.trigger("sort",this,t),this},pluck:function(t){return this.map(t+"")},fetch:function(t){var e=(t=n.extend({parse:!0},t)).success,r=this;return t.success=function(n){var o=t.reset?"reset":"set";r[o](n,t),e&&e.call(t.context,r,n,t),r.trigger("sync",r,n,t)},G(this,t),this.sync("read",this,t)},create:function(t,e){var r=(e=e?n.clone(e):{}).wait;if(!(t=this._prepareModel(t,e)))return!1;r||this.add(t,e);var o=this,i=e.success;return e.success=function(t,e,n){r&&o.add(t,n),i&&i.call(n.context,t,e,n)},t.save(null,e),t},parse:function(t,e){return t},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(t,e){return t[e||this.model.prototype.idAttribute||"id"]},values:function(){return new w(this,E)},keys:function(){return new w(this,S)},entries:function(){return new w(this,x)},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(t,e){return this._isModel(t)?(t.collection||(t.collection=this),t):((e=e?n.clone(e):{}).collection=this,(r=this.model.prototype?new this.model(t,e):this.model(t,e)).validationError?(this.trigger("invalid",this,r.validationError,e),!1):r);var r},_removeModels:function(t,e){for(var n=[],r=0;r<t.length;r++){var o=this.get(t[r]);if(o){var i=this.indexOf(o);this.models.splice(i,1),this.length--,delete this._byId[o.cid];var a=this.modelId(o.attributes,o.idAttribute);null!=a&&delete this._byId[a],e.silent||(e.index=i,o.trigger("remove",o,this,e)),n.push(o),this._removeReference(o,e)}}return n},_isModel:function(t){return t instanceof v},_addReference:function(t,e){this._byId[t.cid]=t;var n=this.modelId(t.attributes,t.idAttribute);null!=n&&(this._byId[n]=t),t.on("all",this._onModelEvent,this)},_removeReference:function(t,e){delete this._byId[t.cid];var n=this.modelId(t.attributes,t.idAttribute);null!=n&&delete this._byId[n],this===t.collection&&delete t.collection,t.off("all",this._onModelEvent,this)},_onModelEvent:function(t,e,n,r){if(e){if(("add"===t||"remove"===t)&&n!==this)return;if("destroy"===t&&this.remove(e,r),"changeId"===t){var o=this.modelId(e.previousAttributes(),e.idAttribute),i=this.modelId(e.attributes,e.idAttribute);null!=o&&delete this._byId[o],null!=i&&(this._byId[i]=e)}}this.trigger.apply(this,arguments)}});var C="function"==typeof Symbol&&Symbol.iterator;C&&(y.prototype[C]=y.prototype.values);var w=function(t,e){this._collection=t,this._kind=e,this._index=0},E=1,S=2,x=3;C&&(w.prototype[C]=function(){return this}),w.prototype.next=function(){if(this._collection){if(this._index<this._collection.length){var t,e=this._collection.at(this._index);if(this._index++,this._kind===E)t=e;else{var n=this._collection.modelId(e.attributes,e.idAttribute);t=this._kind===S?n:[n,e]}return{value:t,done:!1}}this._collection=void 0}return{value:void 0,done:!0}};var O=e.View=function(t){this.cid=n.uniqueId("view"),this.preinitialize.apply(this,arguments),n.extend(this,n.pick(t,k)),this._ensureElement(),this.initialize.apply(this,arguments)},A=/^(\S+)\s*(.*)$/,k=["model","collection","el","id","attributes","className","tagName","events"];n.extend(O.prototype,s,{tagName:"div",$:function(t){return this.$el.find(t)},preinitialize:function(){},initialize:function(){},render:function(){return this},remove:function(){return this._removeElement(),this.stopListening(),this},_removeElement:function(){this.$el.remove()},setElement:function(t){return this.undelegateEvents(),this._setElement(t),this.delegateEvents(),this},_setElement:function(t){this.$el=t instanceof e.$?t:e.$(t),this.el=this.$el[0]},delegateEvents:function(t){if(t||(t=n.result(this,"events")),!t)return this;for(var e in this.undelegateEvents(),t){var r=t[e];if(n.isFunction(r)||(r=this[r]),r){var o=e.match(A);this.delegate(o[1],o[2],r.bind(this))}}return this},delegate:function(t,e,n){return this.$el.on(t+".delegateEvents"+this.cid,e,n),this},undelegateEvents:function(){return this.$el&&this.$el.off(".delegateEvents"+this.cid),this},undelegate:function(t,e,n){return this.$el.off(t+".delegateEvents"+this.cid,e,n),this},_createElement:function(t){return document.createElement(t)},_ensureElement:function(){if(this.el)this.setElement(n.result(this,"el"));else{var t=n.extend({},n.result(this,"attributes"));this.id&&(t.id=n.result(this,"id")),this.className&&(t.class=n.result(this,"className")),this.setElement(this._createElement(n.result(this,"tagName"))),this._setAttributes(t)}},_setAttributes:function(t){this.$el.attr(t)}});var P=function(t,e,r,o){n.each(r,function(n,r){e[r]&&(t.prototype[r]=function(t,e,n,r){switch(e){case 1:return function(){return t[n](this[r])};case 2:return function(e){return t[n](this[r],e)};case 3:return function(e,o){return t[n](this[r],N(e,this),o)};case 4:return function(e,o,i){return t[n](this[r],N(e,this),o,i)};default:return function(){var e=i.call(arguments);return e.unshift(this[r]),t[n].apply(t,e)}}}(e,n,r,o))})},N=function(t,e){return n.isFunction(t)?t:n.isObject(t)&&!e._isModel(t)?M(t):n.isString(t)?function(e){return e.get(t)}:t},M=function(t){var e=n.matches(t);return function(t){return e(t.attributes)}};n.each([[y,{forEach:3,each:3,map:3,collect:3,reduce:0,foldl:0,inject:0,reduceRight:0,foldr:0,find:3,detect:3,filter:3,select:3,reject:3,every:3,all:3,some:3,any:3,include:3,includes:3,contains:3,invoke:0,max:3,min:3,toArray:1,size:1,first:3,head:3,take:3,initial:3,rest:3,tail:3,drop:3,last:3,without:0,difference:0,indexOf:3,shuffle:1,lastIndexOf:3,isEmpty:1,chain:1,sample:3,partition:3,groupBy:3,countBy:3,sortBy:3,indexBy:3,findIndex:3,findLastIndex:3},"models"],[v,{keys:1,values:1,pairs:1,invert:1,pick:0,omit:0,chain:1,isEmpty:1},"attributes"]],function(t){var e=t[0],r=t[1],o=t[2];e.mixin=function(t){var r=n.reduce(n.functions(t),function(t,e){return t[e]=0,t},{});P(e,t,r,o)},P(e,n,r,o)}),e.sync=function(t,r,o){var i=L[t];n.defaults(o||(o={}),{emulateHTTP:e.emulateHTTP,emulateJSON:e.emulateJSON});var a={type:i,dataType:"json"};if(o.url||(a.url=n.result(r,"url")||z()),null!=o.data||!r||"create"!==t&&"update"!==t&&"patch"!==t||(a.contentType="application/json",a.data=JSON.stringify(o.attrs||r.toJSON(o))),o.emulateJSON&&(a.contentType="application/x-www-form-urlencoded",a.data=a.data?{model:a.data}:{}),o.emulateHTTP&&("PUT"===i||"DELETE"===i||"PATCH"===i)){a.type="POST",o.emulateJSON&&(a.data._method=i);var s=o.beforeSend;o.beforeSend=function(t){if(t.setRequestHeader("X-HTTP-Method-Override",i),s)return s.apply(this,arguments)}}"GET"===a.type||o.emulateJSON||(a.processData=!1);var l=o.error;o.error=function(t,e,n){o.textStatus=e,o.errorThrown=n,l&&l.call(o.context,t,e,n)};var c=o.xhr=e.ajax(n.extend(a,o));return r.trigger("request",r,c,o),c};var L={create:"POST",update:"PUT",patch:"PATCH",delete:"DELETE",read:"GET"};e.ajax=function(){return e.$.ajax.apply(e.$,arguments)};var I=e.Router=function(t){t||(t={}),this.preinitialize.apply(this,arguments),t.routes&&(this.routes=t.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},D=/\((.*?)\)/g,R=/(\(\?)?:\w+/g,j=/\*\w+/g,H=/[\-{}\[\]+?.,\\\^$|#\s]/g;n.extend(I.prototype,s,{preinitialize:function(){},initialize:function(){},route:function(t,r,o){n.isRegExp(t)||(t=this._routeToRegExp(t)),n.isFunction(r)&&(o=r,r=""),o||(o=this[r]);var i=this;return e.history.route(t,function(n){var a=i._extractParameters(t,n);!1!==i.execute(o,a,r)&&(i.trigger.apply(i,["route:"+r].concat(a)),i.trigger("route",r,a),e.history.trigger("route",i,r,a))}),this},execute:function(t,e,n){t&&t.apply(this,e)},navigate:function(t,n){return e.history.navigate(t,n),this},_bindRoutes:function(){if(this.routes){this.routes=n.result(this,"routes");for(var t,e=n.keys(this.routes);null!=(t=e.pop());)this.route(t,this.routes[t])}},_routeToRegExp:function(t){return t=t.replace(H,"\\$&").replace(D,"(?:$1)?").replace(R,function(t,e){return e?t:"([^/?]+)"}).replace(j,"([^?]*?)"),new RegExp("^"+t+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(t,e){var r=t.exec(e).slice(1);return n.map(r,function(t,e){return e===r.length-1?t||null:t?decodeURIComponent(t):null})}});var F=e.History=function(){this.handlers=[],this.checkUrl=this.checkUrl.bind(this),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},B=/^[#\/]|\s+$/g,V=/^\/+|\/+$/g,U=/#.*$/;F.started=!1,n.extend(F.prototype,s,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root&&!this.getSearch()},matchRoot:function(){return this.decodeFragment(this.location.pathname).slice(0,this.root.length-1)+"/"===this.root},decodeFragment:function(t){return decodeURI(t.replace(/%25/g,"%2525"))},getSearch:function(){var t=this.location.href.replace(/#.*/,"").match(/\?.+/);return t?t[0]:""},getHash:function(t){var e=(t||this).location.href.match(/#(.*)$/);return e?e[1]:""},getPath:function(){var t=this.decodeFragment(this.location.pathname+this.getSearch()).slice(this.root.length-1);return"/"===t.charAt(0)?t.slice(1):t},getFragment:function(t){return null==t&&(t=this._usePushState||!this._wantsHashChange?this.getPath():this.getHash()),t.replace(B,"")},start:function(t){if(F.started)throw new Error("Backbone.history has already been started");if(F.started=!0,this.options=n.extend({root:"/"},this.options,t),this.root=this.options.root,this._wantsHashChange=!1!==this.options.hashChange,this._hasHashChange="onhashchange"in window&&(void 0===document.documentMode||document.documentMode>7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||
1!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(V,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var e=this.root.slice(0,-1)||"/";return this.location.replace(e+"#"+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1;var r=document.body,o=r.insertBefore(this.iframe,r.firstChild).contentWindow;o.document.open(),o.document.close(),o.location.hash="#"+this.fragment}var i=window.addEventListener||function(t,e){return attachEvent("on"+t,e)};if(this._usePushState?i("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?i("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var t=window.removeEventListener||function(t,e){return detachEvent("on"+t,e)};this._usePushState?t("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&t("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),F.started=!1},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();if(e===this.fragment&&this.iframe&&(e=this.getHash(this.iframe.contentWindow)),e===this.fragment)return!1;this.iframe&&this.navigate(e),this.loadUrl()},loadUrl:function(t){return!!this.matchRoot()&&(t=this.fragment=this.getFragment(t),n.some(this.handlers,function(e){if(e.route.test(t))return e.callback(t),!0}))},navigate:function(t,e){if(!F.started)return!1;e&&!0!==e||(e={trigger:!!e}),t=this.getFragment(t||"");var n=this.root;""!==t&&"?"!==t.charAt(0)||(n=n.slice(0,-1)||"/");var r=n+t;t=t.replace(U,"");var o=this.decodeFragment(t);if(this.fragment!==o){if(this.fragment=o,this._usePushState)this.history[e.replace?"replaceState":"pushState"]({},document.title,r);else{if(!this._wantsHashChange)return this.location.assign(r);if(this._updateHash(this.location,t,e.replace),this.iframe&&t!==this.getHash(this.iframe.contentWindow)){var i=this.iframe.contentWindow;e.replace||(i.document.open(),i.document.close()),this._updateHash(i.location,t,e.replace)}}return e.trigger?this.loadUrl(t):void 0}},_updateHash:function(t,e,n){if(n){var r=t.href.replace(/(javascript:|#).*$/,"");t.replace(r+"#"+e)}else t.hash="#"+e}}),e.history=new F,v.extend=y.extend=I.extend=O.extend=F.extend=function(t,e){var r,o=this;return r=t&&n.has(t,"constructor")?t.constructor:function(){return o.apply(this,arguments)},n.extend(r,o,e),r.prototype=n.create(o.prototype,t),r.prototype.constructor=r,r.__super__=o.prototype,r};var z=function(){throw new Error('A "url" property or function must be specified')},G=function(t,e){var n=e.error;e.error=function(r){n&&n.call(e.context,t,r,e),t.trigger("error",t,r,e)}};return e}(i,n,t,e)}.apply(e,r),void 0===o||(t.exports=o)}()},210:(t,e,n)=>{!function(t){t.extendMode("css",{commentStart:"/*",commentEnd:"*/",newlineAfterToken:function(t,e){return/^[;{}]$/.test(e)}}),t.extendMode("javascript",{commentStart:"/*",commentEnd:"*/",newlineAfterToken:function(t,e,n,r){return this.jsonMode?/^[\[,{]$/.test(e)||/^}/.test(n):(";"!=e||!r.lexical||")"!=r.lexical.type)&&/^[;{}]$/.test(e)&&!/^;/.test(n)}});var e=/^(a|abbr|acronym|area|base|bdo|big|br|button|caption|cite|code|col|colgroup|dd|del|dfn|em|frame|hr|iframe|img|input|ins|kbd|label|legend|link|map|object|optgroup|option|param|q|samp|script|select|small|span|strong|sub|sup|textarea|tt|var)$/;t.extendMode("xml",{commentStart:"\x3c!--",commentEnd:"--\x3e",newlineAfterToken:function(t,n,r,o){var i=!1;return"html"==this.configuration&&(i=!!o.context&&e.test(o.context.tagName)),!i&&("tag"==t&&/>$/.test(n)&&o.context||/^</.test(r))}}),t.defineExtension("commentRange",function(e,n,r){var o=this,i=t.innerMode(o.getMode(),o.getTokenAt(n).state).mode;o.operation(function(){if(e)o.replaceRange(i.commentEnd,r),o.replaceRange(i.commentStart,n),n.line==r.line&&n.ch==r.ch&&o.setCursor(n.line,n.ch+i.commentStart.length);else{var t=o.getRange(n,r),a=t.indexOf(i.commentStart),s=t.lastIndexOf(i.commentEnd);a>-1&&s>-1&&s>a&&(t=t.substr(0,a)+t.substring(a+i.commentStart.length,s)+t.substr(s+i.commentEnd.length)),o.replaceRange(t,n,r)}})}),t.defineExtension("autoIndentRange",function(t,e){var n=this;this.operation(function(){for(var r=t.line;r<=e.line;r++)n.indentLine(r,"smart")})}),t.defineExtension("autoFormatRange",function(e,n){var r=this,o=r.getMode(),i=r.getRange(e,n).split("\n"),a=t.copyState(o,r.getTokenAt(e).state),s=r.getOption("tabSize"),l="",c=0,u=0===e.ch;function p(){l+="\n",u=!0,++c}for(var d=0;d<i.length;++d){for(var f=new t.StringStream(i[d],s);!f.eol();){var h=t.innerMode(o,a),g=o.token(f,a),m=f.current();f.start=f.pos,u&&!/\S/.test(m)||(l+=m,u=!1),!u&&h.mode.newlineAfterToken&&h.mode.newlineAfterToken(g,m,f.string.slice(f.pos)||i[d+1]||"",h.state)&&p()}!f.pos&&o.blankLine&&o.blankLine(a),!u&&d<i.length-1&&p()}r.operation(function(){r.replaceRange(l,e,n);for(var t=e.line+1,o=e.line+c;t<=o;++t)r.indentLine(t,"smart");r.setSelection(e,r.getCursor(!1))})})}(n(631))},631:function(t){t.exports=function(){"use strict";var t=navigator.userAgent,e=navigator.platform,n=/gecko\/\d/i.test(t),r=/MSIE \d/.test(t),o=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(t),i=/Edge\/(\d+)/.exec(t),a=r||o||i,s=a&&(r?document.documentMode||6:+(i||o)[1]),l=!i&&/WebKit\//.test(t),c=l&&/Qt\/\d+\.\d+/.test(t),u=!i&&/Chrome\/(\d+)/.exec(t),p=u&&+u[1],d=/Opera\//.test(t),f=/Apple Computer/.test(navigator.vendor),h=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(t),g=/PhantomJS/.test(t),m=f&&(/Mobile\/\w+/.test(t)||navigator.maxTouchPoints>2),v=/Android/.test(t),y=m||v||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),b=m||/Mac/.test(e),_=/\bCrOS\b/.test(t),T=/win/i.test(e),C=d&&t.match(/Version\/(\d*\.\d*)/);C&&(C=Number(C[1])),C&&C>=15&&(d=!1,l=!0);var w=b&&(c||d&&(null==C||C<12.11)),E=n||a&&s>=9;function S(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}var x,O=function(t,e){var n=t.className,r=S(e).exec(n);if(r){var o=n.slice(r.index+r[0].length);t.className=n.slice(0,r.index)+(o?r[1]+o:"")}};function A(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function k(t,e){return A(t).appendChild(e)}function P(t,e,n,r){var o=document.createElement(t);if(n&&(o.className=n),r&&(o.style.cssText=r),"string"==typeof e)o.appendChild(document.createTextNode(e));else if(e)for(var i=0;i<e.length;++i)o.appendChild(e[i]);return o}function N(t,e,n,r){var o=P(t,e,n,r);return o.setAttribute("role","presentation"),o}function M(t,e){if(3==e.nodeType&&(e=e.parentNode),t.contains)return t.contains(e);do{if(11==e.nodeType&&(e=e.host),e==t)return!0}while(e=e.parentNode)}function L(){var t;try{t=document.activeElement}catch(e){t=document.body||null}for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function I(t,e){var n=t.className;S(e).test(n)||(t.className+=(n?" ":"")+e)}function D(t,e){for(var n=t.split(" "),r=0;r<n.length;r++)n[r]&&!S(n[r]).test(e)&&(e+=" "+n[r]);return e}x=document.createRange?function(t,e,n,r){var o=document.createRange();return o.setEnd(r||t,n),o.setStart(t,e),o}:function(t,e,n){var r=document.body.createTextRange();try{r.moveToElementText(t.parentNode)}catch(t){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",e),r};var R=function(t){t.select()};
vendor: 31,471 bytes, line 1
1function j(t){var e=Array.prototype.slice.call(arguments,1);return function(){return t.apply(null,e)}}function H(t,e,n){for(var r in e||(e={}),t)!t.hasOwnProperty(r)||!1===n&&e.hasOwnProperty(r)||(e[r]=t[r]);return e}function F(t,e,n,r,o){null==e&&-1==(e=t.search(/[^\s\u00a0]/))&&(e=t.length);for(var i=r||0,a=o||0;;){var s=t.indexOf("\t",i);if(s<0||s>=e)return a+(e-i);a+=s-i,a+=n-a%n,i=s+1}}m?R=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:a&&(R=function(t){try{t.select()}catch(t){}});var B=function(){this.id=null,this.f=null,this.time=0,this.handler=j(this.onTimeout,this)};function V(t,e){for(var n=0;n<t.length;++n)if(t[n]==e)return n;return-1}B.prototype.onTimeout=function(t){t.id=0,t.time<=+new Date?t.f():setTimeout(t.handler,t.time-+new Date)},B.prototype.set=function(t,e){this.f=e;var n=+new Date+t;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,t),this.time=n)};var U={toString:function(){return"CodeMirror.Pass"}},z={scroll:!1},G={origin:"*mouse"},$={origin:"+move"};function q(t,e,n){for(var r=0,o=0;;){var i=t.indexOf("\t",r);-1==i&&(i=t.length);var a=i-r;if(i==t.length||o+a>=e)return r+Math.min(a,e-o);if(o+=i-r,r=i+1,(o+=n-o%n)>=e)return r}}var W=[""];function K(t){for(;W.length<=t;)W.push(Y(W)+" ");return W[t]}function Y(t){return t[t.length-1]}function X(t,e){for(var n=[],r=0;r<t.length;r++)n[r]=e(t[r],r);return n}function Z(){}function Q(t,e){var n;return Object.create?n=Object.create(t):(Z.prototype=t,n=new Z),e&&H(e,n),n}var J=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function tt(t){return/\w/.test(t)||t>"\x80"&&(t.toUpperCase()!=t.toLowerCase()||J.test(t))}function et(t,e){return e?!!(e.source.indexOf("\\w")>-1&&tt(t))||e.test(t):tt(t)}function nt(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}var rt=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ot(t){return t.charCodeAt(0)>=768&&rt.test(t)}function it(t,e,n){for(;(n<0?e>0:e<t.length)&&ot(t.charAt(e));)e+=n;return e}function at(t,e,n){for(var r=e>n?-1:1;;){if(e==n)return e;var o=(e+n)/2,i=r<0?Math.ceil(o):Math.floor(o);if(i==e)return t(i)?e:n;t(i)?n=i:e=i+r}}var st=null;function lt(t,e,n){var r;st=null;for(var o=0;o<t.length;++o){var i=t[o];if(i.from<e&&i.to>e)return o;i.to==e&&(i.from!=i.to&&"before"==n?r=o:st=o),i.from==e&&(i.from!=i.to&&"before"!=n?r=o:st=o)}return null!=r?r:st}var ct=function(){function t(t){return t<=247?"bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN".charAt(t):1424<=t&&t<=1524?"R":1536<=t&&t<=1785?"nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111".charAt(t-1536):1774<=t&&t<=2220?"r":8192<=t&&t<=8203?"w":8204==t?"b":"L"}var e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,n=/[stwN]/,r=/[LRr]/,o=/[Lb1n]/,i=/[1n]/;function a(t,e,n){this.level=t,this.from=e,this.to=n}return function(s,l){var c="ltr"==l?"L":"R";if(0==s.length||"ltr"==l&&!e.test(s))return!1;for(var u=s.length,p=[],d=0;d<u;++d)p.push(t(s.charCodeAt(d)));for(var f=0,h=c;f<u;++f){var g=p[f];"m"==g?p[f]=h:h=g}for(var m=0,v=c;m<u;++m){var y=p[m];"1"==y&&"r"==v?p[m]="n":r.test(y)&&(v=y,"r"==y&&(p[m]="R"))}for(var b=1,_=p[0];b<u-1;++b){var T=p[b];"+"==T&&"1"==_&&"1"==p[b+1]?p[b]="1":","!=T||_!=p[b+1]||"1"!=_&&"n"!=_||(p[b]=_),_=T}for(var C=0;C<u;++C){var w=p[C];if(","==w)p[C]="N";else if("%"==w){var E=void 0;for(E=C+1;E<u&&"%"==p[E];++E);for(var S=C&&"!"==p[C-1]||E<u&&"1"==p[E]?"1":"N",x=C;x<E;++x)p[x]=S;C=E-1}}for(var O=0,A=c;O<u;++O){var k=p[O];"L"==A&&"1"==k?p[O]="L":r.test(k)&&(A=k)}for(var P=0;P<u;++P)if(n.test(p[P])){var N=void 0;for(N=P+1;N<u&&n.test(p[N]);++N);for(var M="L"==(P?p[P-1]:c),L=M==("L"==(N<u?p[N]:c))?M?"L":"R":c,I=P;I<N;++I)p[I]=L;P=N-1}for(var D,R=[],j=0;j<u;)if(o.test(p[j])){var H=j;for(++j;j<u&&o.test(p[j]);++j);R.push(new a(0,H,j))}else{var F=j,B=R.length,V="rtl"==l?1:0;for(++j;j<u&&"L"!=p[j];++j);for(var U=F;U<j;)if(i.test(p[U])){F<U&&(R.splice(B,0,new a(1,F,U)),B+=V);var z=U;for(++U;U<j&&i.test(p[U]);++U);R.splice(B,0,new a(2,z,U)),B+=V,F=U}else++U;F<j&&R.splice(B,0,new a(1,F,j))}return"ltr"==l&&(1==R[0].level&&(D=s.match(/^\s+/))&&(R[0].from=D[0].length,R.unshift(new a(0,0,D[0].length))),1==Y(R).level&&(D=s.match(/\s+$/))&&(Y(R).to-=D[0].length,R.push(new a(0,u-D[0].length,u)))),"rtl"==l?R.reverse():R}}();function ut(t,e){var n=t.order;return null==n&&(n=t.order=ct(t.text,e)),n}var pt=[],dt=function(t,e,n){if(t.addEventListener)t.addEventListener(e,n,!1);else if(t.attachEvent)t.attachEvent("on"+e,n);else{var r=t._handlers||(t._handlers={});r[e]=(r[e]||pt).concat(n)}};function ft(t,e){return t._handlers&&t._handlers[e]||pt}function ht(t,e,n){if(t.removeEventListener)t.removeEventListener(e,n,!1);else if(t.detachEvent)t.detachEvent("on"+e,n);else{var r=t._handlers,o=r&&r[e];if(o){var i=V(o,n);i>-1&&(r[e]=o.slice(0,i).concat(o.slice(i+1)))}}}function gt(t,e){var n=ft(t,e);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),o=0;o<n.length;++o)n[o].apply(null,r)}function mt(t,e,n){return"string"==typeof e&&(e={type:e,preventDefault:function(){this.defaultPrevented=!0}}),gt(t,n||e.type,t,e),Ct(e)||e.codemirrorIgnore}function vt(t){var e=t._handlers&&t._handlers.cursorActivity;if(e)for(var n=t.curOp.cursorActivityHandlers||(t.curOp.cursorActivityHandlers=[]),r=0;r<e.length;++r)-1==V(n,e[r])&&n.push(e[r])}function yt(t,e){return ft(t,e).length>0}function bt(t){t.prototype.on=function(t,e){dt(this,t,e)},t.prototype.off=function(t,e){ht(this,t,e)}}function _t(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function Tt(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function Ct(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function wt(t){_t(t),Tt(t)}function Et(t){return t.target||t.srcElement}function St(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),b&&t.ctrlKey&&1==e&&(e=3),e}var xt,Ot,At=function(){if(a&&s<9)return!1;var t=P("div");return"draggable"in t||"dragDrop"in t}();function kt(t){if(null==xt){var e=P("span","\u200b");k(t,P("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(xt=e.offsetWidth<=1&&e.offsetHeight>2&&!(a&&s<8))}var n=xt?P("span","\u200b"):P("span","\xa0",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Pt(t){if(null!=Ot)return Ot;var e=k(t,document.createTextNode("A\u062eA")),n=x(e,0,1).getBoundingClientRect(),r=x(e,1,2).getBoundingClientRect();return A(t),!(!n||n.left==n.right)&&(Ot=r.right-n.right<3)}var Nt,Mt=3!="\n\nb".split(/\n/).length?function(t){for(var e=0,n=[],r=t.length;e<=r;){var o=t.indexOf("\n",e);-1==o&&(o=t.length);var i=t.slice(e,"\r"==t.charAt(o-1)?o-1:o),a=i.indexOf("\r");-1!=a?(n.push(i.slice(0,a)),e+=a+1):(n.push(i),e=o+1)}return n}:function(t){return t.split(/\r\n?|\n/)},Lt=window.getSelection?function(t){try{return t.selectionStart!=t.selectionEnd}catch(t){return!1}}:function(t){var e;try{e=t.ownerDocument.selection.createRange()}catch(t){}return!(!e||e.parentElement()!=t)&&0!=e.compareEndPoints("StartToEnd",e)},It="oncopy"in(Nt=P("div"))||(Nt.setAttribute("oncopy","return;"),"function"==typeof Nt.oncopy),Dt=null,Rt={},jt={};function Ht(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),Rt[t]=e}function Ft(t){if("string"==typeof t&&jt.hasOwnProperty(t))t=jt[t];else if(t&&"string"==typeof t.name&&jt.hasOwnProperty(t.name)){var e=jt[t.name];"string"==typeof e&&(e={name:e}),(t=Q(e,t)).name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return Ft("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return Ft("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function Bt(t,e){e=Ft(e);var n=Rt[e.name];if(!n)return Bt(t,"text/plain");var r=n(t,e);if(Vt.hasOwnProperty(e.name)){var o=Vt[e.name];for(var i in o)o.hasOwnProperty(i)&&(r.hasOwnProperty(i)&&(r["_"+i]=r[i]),r[i]=o[i])}if(r.name=e.name,e.helperType&&(r.helperType=e.helperType),e.modeProps)for(var a in e.modeProps)r[a]=e.modeProps[a];return r}var Vt={};function Ut(t,e){H(e,Vt.hasOwnProperty(t)?Vt[t]:Vt[t]={})}function zt(t,e){if(!0===e)return e;if(t.copyState)return t.copyState(e);var n={};for(var r in e){var o=e[r];o instanceof Array&&(o=o.concat([])),n[r]=o}return n}function Gt(t,e){for(var n;t.innerMode&&(n=t.innerMode(e))&&n.mode!=t;)e=n.state,t=n.mode;return n||{mode:t,state:e}}function $t(t,e,n){return!t.startState||t.startState(e,n)}var qt=function(t,e,n){this.pos=this.start=0,this.string=t,this.tabSize=e||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Wt(t,e){if((e-=t.first)<0||e>=t.size)throw new Error("There is no line "+(e+t.first)+" in the document.");for(var n=t;!n.lines;)for(var r=0;;++r){var o=n.children[r],i=o.chunkSize();if(e<i){n=o;break}e-=i}return n.lines[e]}function Kt(t,e,n){var r=[],o=e.line;return t.iter(e.line,n.line+1,function(t){var i=t.text;o==n.line&&(i=i.slice(0,n.ch)),o==e.line&&(i=i.slice(e.ch)),r.push(i),++o}),r}function Yt(t,e,n){var r=[];return t.iter(e,n,function(t){r.push(t.text)}),r}function Xt(t,e){var n=e-t.height;if(n)for(var r=t;r;r=r.parent)r.height+=n}function Zt(t){if(null==t.parent)return null;for(var e=t.parent,n=V(e.lines,t),r=e.parent;r;e=r,r=r.parent)for(var o=0;r.children[o]!=e;++o)n+=r.children[o].chunkSize();return n+e.first}function Qt(t,e){var n=t.first;t:do{for(var r=0;r<t.children.length;++r){var o=t.children[r],i=o.height;if(e<i){t=o;continue t}e-=i,n+=o.chunkSize()}return n}while(!t.lines);for(var a=0;a<t.lines.length;++a){var s=t.lines[a].height;if(e<s)break;e-=s}return n+a}function Jt(t,e){return e>=t.first&&e<t.first+t.size}function te(t,e){return String(t.lineNumberFormatter(e+t.firstLineNumber))}function ee(t,e,n){if(void 0===n&&(n=null),!(this instanceof ee))return new ee(t,e,n);this.line=t,this.ch=e,this.sticky=n}function ne(t,e){return t.line-e.line||t.ch-e.ch}function re(t,e){return t.sticky==e.sticky&&0==ne(t,e)}function oe(t){return ee(t.line,t.ch)}function ie(t,e){return ne(t,e)<0?e:t}function ae(t,e){return ne(t,e)<0?t:e}function se(t,e){return Math.max(t.first,Math.min(e,t.first+t.size-1))}function le(t,e){if(e.line<t.first)return ee(t.first,0);var n=t.first+t.size-1;return e.line>n?ee(n,Wt(t,n).text.length):function(t,e){var n=t.ch;return null==n||n>e?ee(t.line,e):n<0?ee(t.line,0):t}(e,Wt(t,e.line).text.length)}function ce(t,e){for(var n=[],r=0;r<e.length;r++)n[r]=le(t,e[r]);return n}qt.prototype.eol=function(){return this.pos>=this.string.length},qt.prototype.sol=function(){return this.pos==this.lineStart},qt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},qt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},qt.prototype.eat=function(t){var e=this.string.charAt(this.pos);if("string"==typeof t?e==t:e&&(t.test?t.test(e):t(e)))return++this.pos,e},qt.prototype.eatWhile=function(t){for(var e=this.pos;this.eat(t););return this.pos>e},qt.prototype.eatSpace=function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},qt.prototype.skipToEnd=function(){this.pos=this.string.length},qt.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},qt.prototype.backUp=function(t){this.pos-=t},qt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=F(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?F(this.string,this.lineStart,this.tabSize):0)},qt.prototype.indentation=function(){return F(this.string,null,this.tabSize)-(this.lineStart?F(this.string,this.lineStart,this.tabSize):0)},qt.prototype.match=function(t,e,n){if("string"!=typeof t){var r=this.string.slice(this.pos).match(t);return r&&r.index>0?null:(r&&!1!==e&&(this.pos+=r[0].length),r)}var o=function(t){return n?t.toLowerCase():t};if(o(this.string.substr(this.pos,t.length))==o(t))return!1!==e&&(this.pos+=t.length),!0},qt.prototype.current=function(){return this.string.slice(this.start,this.pos)},qt.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},qt.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)},qt.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};var ue=function(t,e){this.state=t,this.lookAhead=e},pe=function(t,e,n,r){this.state=e,this.doc=t,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function de(t,e,n,r){var o=[t.state.modeGen],i={};Te(t,e.text,t.doc.mode,n,function(t,e){return o.push(t,e)},i,r);for(var a=n.state,s=function(r){n.baseTokens=o;var s=t.state.overlays[r],l=1,c=0;n.state=!0,Te(t,e.text,s.mode,n,function(t,e){for(var n=l;c<t;){var r=o[l];r>t&&o.splice(l,1,t,o[l+1],r),l+=2,c=Math.min(t,r)}if(e)if(s.opaque)o.splice(n,l-n,t,"overlay "+e),l=n+2;else for(;n<l;n+=2){var i=o[n+1];o[n+1]=(i?i+" ":"")+"overlay "+e}},i),n.state=a,n.baseTokens=null,n.baseTokenPos=1},l=0;l<t.state.overlays.length;++l)s(l);return{styles:o,classes:i.bgClass||i.textClass?i:null}}function fe(t,e,n){if(!e.styles||e.styles[0]!=t.state.modeGen){var r=he(t,Zt(e)),o=e.text.length>t.options.maxHighlightLength&&zt(t.doc.mode,r.state),i=de(t,e,r);o&&(r.state=o),e.stateAfter=r.save(!o),e.styles=i.styles,i.classes?e.styleClasses=i.classes:e.styleClasses&&(e.styleClasses=null),n===t.doc.highlightFrontier&&(t.doc.modeFrontier=Math.max(t.doc.modeFrontier,++t.doc.highlightFrontier))}return e.styles}function he(t,e,n){var r=t.doc,o=t.display;if(!r.mode.startState)return new pe(r,!0,e);var i=function(t,e,n){for(var r,o,i=t.doc,a=n?-1:e-(t.doc.mode.innerMode?1e3:100),s=e;s>a;--s){if(s<=i.first)return i.first;var l=Wt(i,s-1),c=l.stateAfter;if(c&&(!n||s+(c instanceof ue?c.lookAhead:0)<=i.modeFrontier))return s;var u=F(l.text,null,t.options.tabSize);(null==o||r>u)&&(o=s-1,r=u)}return o}(t,e,n),a=i>r.first&&Wt(r,i-1).stateAfter,s=a?pe.fromSaved(r,a,i):new pe(r,$t(r.mode),i);return r.iter(i,e,function(n){ge(t,n.text,s);var r=s.line;n.stateAfter=r==e-1||r%5==0||r>=o.viewFrom&&r<o.viewTo?s.save():null,s.nextLine()}),n&&(r.modeFrontier=s.line),s}function ge(t,e,n,r){var o=t.doc.mode,i=new qt(e,t.options.tabSize,n);for(i.start=i.pos=r||0,""==e&&me(o,n.state);!i.eol();)ve(o,i,n.state),i.start=i.pos}function me(t,e){if(t.blankLine)return t.blankLine(e);if(t.innerMode){var n=Gt(t,e);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function ve(t,e,n,r){for(var o=0;o<10;o++){r&&(r[0]=Gt(t,n).mode);var i=t.token(e,n);if(e.pos>e.start)return i}throw new Error("Mode "+t.name+" failed to advance stream.")}pe.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},pe.prototype.baseToken=function(t){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=t;)this.baseTokenPos+=2;var e=this.baseTokens[this.baseTokenPos+1];return{type:e&&e.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-t}},pe.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},pe.fromSaved=function(t,e,n){return e instanceof ue?new pe(t,zt(t.mode,e.state),n,e.lookAhead):new pe(t,zt(t.mode,e),n)},pe.prototype.save=function(t){var e=!1!==t?zt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ue(e,this.maxLookAhead):e};var ye=function(t,e,n){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=n};function be(t,e,n,r){var o,i,a=t.doc,s=a.mode,l=Wt(a,(e=le(a,e)).line),c=he(t,e.line,n),u=new qt(l.text,t.options.tabSize,c);for(r&&(i=[]);(r||u.pos<e.ch)&&!u.eol();)u.start=u.pos,o=ve(s,u,c.state),r&&i.push(new ye(u,o,zt(a.mode,c.state)));return r?i:new ye(u,o,c.state)}function _e(t,e){if(t)for(;;){var n=t.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;t=t.slice(0,n.index)+t.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";null==e[r]?e[r]=n[2]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(e[r])||(e[r]+=" "+n[2])}return t}function Te(t,e,n,r,o,i,a){var s=n.flattenSpans;null==s&&(s=t.options.flattenSpans);var l,c=0,u=null,p=new qt(e,t.options.tabSize,r),d=t.options.addModeClass&&[null];for(""==e&&_e(me(n,r.state),i);!p.eol();){if(p.pos>t.options.maxHighlightLength?(s=!1,a&&ge(t,e,r,p.pos),p.pos=e.length,l=null):l=_e(ve(n,p,r.state,d),i),d){var f=d[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!s||u!=l){for(;c<p.start;)o(c=Math.min(p.start,c+5e3),u);u=l}p.start=p.pos}for(;c<p.pos;){var h=Math.min(p.pos,c+5e3);o(h,u),c=h}}var Ce=!1,we=!1;function Ee(t,e,n){this.marker=t,this.from=e,this.to=n}function Se(t,e){if(t)for(var n=0;n<t.length;++n){var r=t[n];if(r.marker==e)return r}}function xe(t,e){for(var n,r=0;r<t.length;++r)t[r]!=e&&(n||(n=[])).push(t[r]);return n}function Oe(t,e){if(e.full)return null;var n=Jt(t,e.from.line)&&Wt(t,e.from.line).markedSpans,r=Jt(t,e.to.line)&&Wt(t,e.to.line).markedSpans;if(!n&&!r)return null;var o=e.from.ch,i=e.to.ch,a=0==ne(e.from,e.to),s=function(t,e,n){var r;if(t)for(var o=0;o<t.length;++o){var i=t[o],a=i.marker;if(null==i.from||(a.inclusiveLeft?i.from<=e:i.from<e)||i.from==e&&"bookmark"==a.type&&(!n||!i.marker.insertLeft)){var s=null==i.to||(a.inclusiveRight?i.to>=e:i.to>e);(r||(r=[])).push(new Ee(a,i.from,s?null:i.to))}}return r}(n,o,a),l=function(t,e,n){var r;if(t)for(var o=0;o<t.length;++o){var i=t[o],a=i.marker;if(null==i.to||(a.inclusiveRight?i.to>=e:i.to>e)||i.from==e&&"bookmark"==a.type&&(!n||i.marker.insertLeft)){var s=null==i.from||(a.inclusiveLeft?i.from<=e:i.from<e);(r||(r=[])).push(new Ee(a,s?null:i.from-e,null==i.to?null:i.to-e))}}return r}(r,i,a),c=1==e.text.length,u=Y(e.text).length+(c?o:0);if(s)for(var p=0;p<s.length;++p){var d=s[p];if(null==d.to){var f=Se(l,d.marker);f?c&&(d.to=null==f.to?null:f.to+u):d.to=o}}if(l)for(var h=0;h<l.length;++h){var g=l[h];null!=g.to&&(g.to+=u),null==g.from?Se(s,g.marker)||(g.from=u,c&&(s||(s=[])).push(g)):(g.from+=u,c&&(s||(s=[])).push(g))}s&&(s=Ae(s)),l&&l!=s&&(l=Ae(l));var m=[s];if(!c){var v,y=e.text.length-2;if(y>0&&s)for(var b=0;b<s.length;++b)null==s[b].to&&(v||(v=[])).push(new Ee(s[b].marker,null,null));for(var _=0;_<y;++_)m.push(v);m.push(l)}return m}function Ae(t){for(var e=0;e<t.length;++e){var n=t[e];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&t.splice(e--,1)}return t.length?t:null}function ke(t){var e=t.markedSpans;if(e){for(var n=0;n<e.length;++n)e[n].marker.detachLine(t);t.markedSpans=null}}function Pe(t,e){if(e){for(var n=0;n<e.length;++n)e[n].marker.attachLine(t);t.markedSpans=e}}function Ne(t){return t.inclusiveLeft?-1:0}function Me(t){return t.inclusiveRight?1:0}function Le(t,e){var n=t.lines.length-e.lines.length;if(0!=n)return n;var r=t.find(),o=e.find(),i=ne(r.from,o.from)||Ne(t)-Ne(e);return i?-i:ne(r.to,o.to)||Me(t)-Me(e)||e.id-t.id}function Ie(t,e){var n,r=we&&t.markedSpans;if(r)for(var o=void 0,i=0;i<r.length;++i)(o=r[i]).marker.collapsed&&null==(e?o.from:o.to)&&(!n||Le(n,o.marker)<0)&&(n=o.marker);return n}function De(t){return Ie(t,!0)}function Re(t){return Ie(t,!1)}function je(t,e){var n,r=we&&t.markedSpans;if(r)for(var o=0;o<r.length;++o){var i=r[o];i.marker.collapsed&&(null==i.from||i.from<e)&&(null==i.to||i.to>e)&&(!n||Le(n,i.marker)<0)&&(n=i.marker)}return n}function He(t,e,n,r,o){var i=Wt(t,e),a=we&&i.markedSpans;if(a)for(var s=0;s<a.length;++s){var l=a[s];if(l.marker.collapsed){var c=l.marker.find(0),u=ne(c.from,n)||Ne(l.marker)-Ne(o),p=ne(c.to,r)||Me(l.marker)-Me(o);if(!(u>=0&&p<=0||u<=0&&p>=0)&&(u<=0&&(l.marker.inclusiveRight&&o.inclusiveLeft?ne(c.to,n)>=0:ne(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&o.inclusiveLeft?ne(c.from,r)<=0:ne(c.from,r)<0)))return!0}}}function Fe(t){for(var e;e=De(t);)t=e.find(-1,!0).line;return t}function Be(t,e){var n=Wt(t,e),r=Fe(n);return n==r?e:Zt(r)}function Ve(t,e){if(e>t.lastLine())return e;var n,r=Wt(t,e);if(!Ue(t,r))return e;for(;n=Re(r);)r=n.find(1,!0).line;return Zt(r)+1}function Ue(t,e){var n=we&&e.markedSpans;if(n)for(var r=void 0,o=0;o<n.length;++o)if((r=n[o]).marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&ze(t,e,r))return!0}}function ze(t,e,n){if(null==n.to){var r=n.marker.find(1,!0);return ze(t,r.line,Se(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==e.text.length)return!0;for(var o=void 0,i=0;i<e.markedSpans.length;++i)if((o=e.markedSpans[i]).marker.collapsed&&!o.marker.widgetNode&&o.from==n.to&&(null==o.to||o.to!=n.from)&&(o.marker.inclusiveLeft||n.marker.inclusiveRight)&&ze(t,e,o))return!0}function Ge(t){for(var e=0,n=(t=Fe(t)).parent,r=0;r<n.lines.length;++r){var o=n.lines[r];if(o==t)break;e+=o.height}for(var i=n.parent;i;i=(n=i).parent)for(var a=0;a<i.children.length;++a){var s=i.children[a];if(s==n)break;e+=s.height}return e}function $e(t){if(0==t.height)return 0;for(var e,n=t.text.length,r=t;e=De(r);){var o=e.find(0,!0);r=o.from.line,n+=o.from.ch-o.to.ch}for(r=t;e=Re(r);){var i=e.find(0,!0);n-=r.text.length-i.from.ch,n+=(r=i.to.line).text.length-i.to.ch}return n}function qe(t){var e=t.display,n=t.doc;e.maxLine=Wt(n,n.first),e.maxLineLength=$e(e.maxLine),e.maxLineChanged=!0,n.iter(function(t){var n=$e(t);n>e.maxLineLength&&(e.maxLineLength=n,e.maxLine=t)})}var We=function(t,e,n){this.text=t,Pe(this,e),this.height=n?n(this):1};function Ke(t){t.parent=null,ke(t)}We.prototype.lineNo=function(){return Zt(this)},bt(We);var Ye={},Xe={};function Ze(t,e){if(!t||/^\s*$/.test(t))return null;var n=e.addModeClass?Xe:Ye;return n[t]||(n[t]=t.replace(/\S+/g,"cm-$&"))}function Qe(t,e){var n=N("span",null,null,l?"padding-right: .1px":null),r={pre:N("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:t,trailingSpace:!1,splitSpaces:t.getOption("lineWrapping")};e.measure={};for(var o=0;o<=(e.rest?e.rest.length:0);o++){var i=o?e.rest[o-1]:e.line,a=void 0;r.pos=0,r.addToken=tn,Pt(t.display.measure)&&(a=ut(i,t.doc.direction))&&(r.addToken=en(r.addToken,a)),r.map=[],rn(i,r,fe(t,i,e!=t.display.externalMeasured&&Zt(i))),i.styleClasses&&(i.styleClasses.bgClass&&(r.bgClass=D(i.styleClasses.bgClass,r.bgClass||"")),i.styleClasses.textClass&&(r.textClass=D(i.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(kt(t.display.measure))),0==o?(e.measure.map=r.map,e.measure.cache={}):((e.measure.maps||(e.measure.maps=[])).push(r.map),(e.measure.caches||(e.measure.caches=[])).push({}))}if(l){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return gt(t,"renderLine",t,e.line,r.pre),r.pre.className&&(r.textClass=D(r.pre.className,r.textClass||"")),r}function Je(t){var e=P("span","\u2022","cm-invalidchar");return e.title="\\u"+t.charCodeAt(0).toString(16),e.setAttribute("aria-label",e.title),e}function tn(t,e,n,r,o,i,l){if(e){var c,u=t.splitSpaces?function(t,e){if(t.length>1&&!/ /.test(t))return t;for(var n=e,r="",o=0;o<t.length;o++){var i=t.charAt(o);" "!=i||!n||o!=t.length-1&&32!=t.charCodeAt(o+1)||(i="\xa0"),r+=i,n=" "==i}return r}(e,t.trailingSpace):e,p=t.cm.state.specialChars,d=!1;if(p.test(e)){c=document.createDocumentFragment();for(var f=0;;){p.lastIndex=f;var h=p.exec(e),g=h?h.index-f:e.length-f;if(g){var m=document.createTextNode(u.slice(f,f+g));a&&s<9?c.appendChild(P("span",[m])):c.appendChild(m),t.map.push(t.pos,t.pos+g,m),t.col+=g,t.pos+=g}if(!h)break;f+=g+1;var v=void 0;if("\t"==h[0]){var y=t.cm.options.tabSize,b=y-t.col%y;(v=c.appendChild(P("span",K(b),"cm-tab"))).setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),t.col+=b}else"\r"==h[0]||"\n"==h[0]?((v=c.appendChild(P("span","\r"==h[0]?"\u240d":"\u2424","cm-invalidchar"))).setAttribute("cm-text",h[0]),t.col+=1):((v=t.cm.options.specialCharPlaceholder(h[0])).setAttribute("cm-text",h[0]),a&&s<9?c.appendChild(P("span",[v])):c.appendChild(v),t.col+=1);t.map.push(t.pos,t.pos+1,v),t.pos++}}else t.col+=e.length,c=document.createTextNode(u),t.map.push(t.pos,t.pos+e.length,c),a&&s<9&&(d=!0),t.pos+=e.length;if(t.trailingSpace=32==u.charCodeAt(e.length-1),n||r||o||d||i||l){var _=n||"";r&&(_+=r),o&&(_+=o);var T=P("span",[c],_,i);if(l)for(var C in l)l.hasOwnProperty(C)&&"style"!=C&&"class"!=C&&T.setAttribute(C,l[C]);return t.content.appendChild(T)}t.content.appendChild(c)}}function en(t,e){return function(n,r,o,i,a,s,l){o=o?o+" cm-force-border":"cm-force-border";for(var c=n.pos,u=c+r.length;;){for(var p=void 0,d=0;d<e.length&&!((p=e[d]).to>c&&p.from<=c);d++);if(p.to>=u)return t(n,r,o,i,a,s,l);t(n,r.slice(0,p.to-c),o,i,null,s,l),i=null,r=r.slice(p.to-c),c=p.to}}}function nn(t,e,n,r){var o=!r&&n.widgetNode;o&&t.map.push(t.pos,t.pos+e,o),!r&&t.cm.display.input.needsContentAttribute&&(o||(o=t.content.appendChild(document.createElement("span"))),o.setAttribute("cm-marker",n.id)),o&&(t.cm.display.input.setUneditable(o),t.content.appendChild(o)),t.pos+=e,t.trailingSpace=!1}function rn(t,e,n){var r=t.markedSpans,o=t.text,i=0;if(r)for(var a,s,l,c,u,p,d,f=o.length,h=0,g=1,m="",v=0;;){if(v==h){l=c=u=s="",d=null,p=null,v=1/0;for(var y=[],b=void 0,_=0;_<r.length;++_){var T=r[_],C=T.marker;if("bookmark"==C.type&&T.from==h&&C.widgetNode)y.push(C);else if(T.from<=h&&(null==T.to||T.to>h||C.collapsed&&T.to==h&&T.from==h)){if(null!=T.to&&T.to!=h&&v>T.to&&(v=T.to,c=""),C.className&&(l+=" "+C.className),C.css&&(s=(s?s+";":"")+C.css),C.startStyle&&T.from==h&&(u+=" "+C.startStyle),C.endStyle&&T.to==v&&(b||(b=[])).push(C.endStyle,T.to),C.title&&((d||(d={})).title=C.title),C.attributes)for(var w in C.attributes)(d||(d={}))[w]=C.attributes[w];C.collapsed&&(!p||Le(p.marker,C)<0)&&(p=T)}else T.from>h&&v>T.from&&(v=T.from)}if(b)for(var E=0;E<b.length;E+=2)b[E+1]==v&&(c+=" "+b[E]);if(!p||p.from==h)for(var S=0;S<y.length;++S)nn(e,0,y[S]);if(p&&(p.from||0)==h){if(nn(e,(null==p.to?f+1:p.to)-h,p.marker,null==p.from),null==p.to)return;p.to==h&&(p=!1)}}if(h>=f)break;for(var x=Math.min(f,v);;){if(m){var O=h+m.length;if(!p){var A=O>x?m.slice(0,x-h):m;e.addToken(e,A,a?a+l:l,u,h+A.length==v?c:"",s,d)}if(O>=x){m=m.slice(x-h),h=x;break}h=O,u=""}m=o.slice(i,i=n[g++]),a=Ze(n[g++],e.cm.options)}}else for(var k=1;k<n.length;k+=2)e.addToken(e,o.slice(i,i=n[k]),Ze(n[k+1],e.cm.options))}function on(t,e,n){this.line=e,this.rest=function(t){for(var e,n;e=Re(t);)t=e.find(1,!0).line,(n||(n=[])).push(t);return n}(e),this.size=this.rest?Zt(Y(this.rest))-n+1:1,this.node=this.text=null,this.hidden=Ue(t,e)}function an(t,e,n){for(var r,o=[],i=e;i<n;i=r){var a=new on(t.doc,Wt(t.doc,i),i);r=i+a.size,o.push(a)}return o}var sn=null,ln=null;function cn(t,e){var n=ft(t,e);if(n.length){var r,o=Array.prototype.slice.call(arguments,2);sn?r=sn.delayedCallbacks:ln?r=ln:(r=ln=[],setTimeout(un,0));for(var i=function(t){r.push(function(){return n[t].apply(null,o)})},a=0;a<n.length;++a)i(a)}}function un(){var t=ln;ln=null;for(var e=0;e<t.length;++e)t[e]()}function pn(t,e,n,r){for(var o=0;o<e.changes.length;o++){var i=e.changes[o];"text"==i?hn(t,e):"gutter"==i?mn(t,e,n,r):"class"==i?gn(t,e):"widget"==i&&vn(t,e,r)}e.changes=null}function dn(t){return t.node==t.text&&(t.node=P("div",null,null,"position: relative"),t.text.parentNode&&t.text.parentNode.replaceChild(t.node,t.text),t.node.appendChild(t.text),a&&s<8&&(t.node.style.zIndex=2)),t.node}function fn(t,e){var n=t.display.externalMeasured;return n&&n.line==e.line?(t.display.externalMeasured=null,e.measure=n.measure,n.built):Qe(t,e)}function hn(t,e){var n=e.text.className,r=fn(t,e);e.text==e.node&&(e.node=r.pre),e.text.parentNode.replaceChild(r.pre,e.text),e.text=r.pre,r.bgClass!=e.bgClass||r.textClass!=e.textClass?(e.bgClass=r.bgClass,e.textClass=r.textClass,gn(t,e)):n&&(e.text.className=n)}function gn(t,e){(function(t,e){var n=e.bgClass?e.bgClass+" "+(e.line.bgClass||""):e.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),e.background)n?e.background.className=n:(e.background.parentNode.removeChild(e.background),e.background=null);else if(n){var r=dn(e);e.background=r.insertBefore(P("div",null,n),r.firstChild),t.display.input.setUneditable(e.background)}})(t,e),e.line.wrapClass?dn(e).className=e.line.wrapClass:e.node!=e.text&&(e.node.className="");var n=e.textClass?e.textClass+" "+(e.line.textClass||""):e.line.textClass;e.text.className=n||""}function mn(t,e,n,r){if(e.gutter&&(e.node.removeChild(e.gutter),e.gutter=null),e.gutterBackground&&(e.node.removeChild(e.gutterBackground),e.gutterBackground=null),e.line.gutterClass){var o=dn(e);e.gutterBackground=P("div",null,"CodeMirror-gutter-background "+e.line.gutterClass,"left: "+(t.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),t.display.input.setUneditable(e.gutterBackground),o.insertBefore(e.gutterBackground,e.text)}var i=e.line.gutterMarkers;if(t.options.lineNumbers||i){var a=dn(e),s=e.gutter=P("div",null,"CodeMirror-gutter-wrapper","left: "+(t.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(s.setAttribute("aria-hidden","true"),t.display.input.setUneditable(s),a.insertBefore(s,e.text),e.line.gutterClass&&(s.className+=" "+e.line.gutterClass),!t.options.lineNumbers||i&&i["CodeMirror-linenumbers"]||(e.lineNumber=s.appendChild(P("div",te(t.options,n),"CodeMirror-linenumber C
1odeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+t.display.lineNumInnerWidth+"px"))),i)for(var l=0;l<t.display.gutterSpecs.length;++l){var c=t.display.gutterSpecs[l].className,u=i.hasOwnProperty(c)&&i[c];u&&s.appendChild(P("div",[u],"CodeMirror-gutter-elt","left: "+r.gutterLeft[c]+"px; width: "+r.gutterWidth[c]+"px"))}}}function vn(t,e,n){e.alignable&&(e.alignable=null);for(var r=S("CodeMirror-linewidget"),o=e.node.firstChild,i=void 0;o;o=i)i=o.nextSibling,r.test(o.className)&&e.node.removeChild(o);bn(t,e,n)}function yn(t,e,n,r){var o=fn(t,e);return e.text=e.node=o.pre,o.bgClass&&(e.bgClass=o.bgClass),o.textClass&&(e.textClass=o.textClass),gn(t,e),mn(t,e,n,r),bn(t,e,r),e.node}function bn(t,e,n){if(_n(t,e.line,e,n,!0),e.rest)for(var r=0;r<e.rest.length;r++)_n(t,e.rest[r],e,n,!1)}function _n(t,e,n,r,o){if(e.widgets)for(var i=dn(n),a=0,s=e.widgets;a<s.length;++a){var l=s[a],c=P("div",[l.node],"CodeMirror-linewidget"+(l.className?" "+l.className:""));l.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),Tn(l,c,n,r),t.display.input.setUneditable(c),o&&l.above?i.insertBefore(c,n.gutter||n.text):i.appendChild(c),cn(l,"redraw")}}function Tn(t,e,n,r){if(t.noHScroll){(n.alignable||(n.alignable=[])).push(e);
vendor: 81,684 bytes, line 1
1var o=r.wrapperWidth;e.style.left=r.fixedPos+"px",t.coverGutter||(o-=r.gutterTotalWidth,e.style.paddingLeft=r.gutterTotalWidth+"px"),e.style.width=o+"px"}t.coverGutter&&(e.style.zIndex=5,e.style.position="relative",t.noHScroll||(e.style.marginLeft=-r.gutterTotalWidth+"px"))}function Cn(t){if(null!=t.height)return t.height;var e=t.doc.cm;if(!e)return 0;if(!M(document.body,t.node)){var n="position: relative;";t.coverGutter&&(n+="margin-left: -"+e.display.gutters.offsetWidth+"px;"),t.noHScroll&&(n+="width: "+e.display.wrapper.clientWidth+"px;"),k(e.display.measure,P("div",[t.node],null,n))}return t.height=t.node.parentNode.offsetHeight}function wn(t,e){for(var n=Et(e);n!=t.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==t.sizer&&n!=t.mover)return!0}function En(t){return t.lineSpace.offsetTop}function Sn(t){return t.mover.offsetHeight-t.lineSpace.offsetHeight}function xn(t){if(t.cachedPaddingH)return t.cachedPaddingH;var e=k(t.measure,P("pre","x","CodeMirror-line-like")),n=window.getComputedStyle?window.getComputedStyle(e):e.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(r.left)||isNaN(r.right)||(t.cachedPaddingH=r),r}function On(t){return 50-t.display.nativeBarWidth}function An(t){return t.display.scroller.clientWidth-On(t)-t.display.barWidth}function kn(t){return t.display.scroller.clientHeight-On(t)-t.display.barHeight}function Pn(t,e,n){if(t.line==e)return{map:t.measure.map,cache:t.measure.cache};if(t.rest){for(var r=0;r<t.rest.length;r++)if(t.rest[r]==e)return{map:t.measure.maps[r],cache:t.measure.caches[r]};for(var o=0;o<t.rest.length;o++)if(Zt(t.rest[o])>n)return{map:t.measure.maps[o],cache:t.measure.caches[o],before:!0}}}function Nn(t,e,n,r){return In(t,Ln(t,e),n,r)}function Mn(t,e){if(e>=t.display.viewFrom&&e<t.display.viewTo)return t.display.view[dr(t,e)];var n=t.display.externalMeasured;return n&&e>=n.lineN&&e<n.lineN+n.size?n:void 0}function Ln(t,e){var n=Zt(e),r=Mn(t,n);r&&!r.text?r=null:r&&r.changes&&(pn(t,r,n,sr(t)),t.curOp.forceUpdate=!0),r||(r=function(t,e){var n=Zt(e=Fe(e)),r=t.display.externalMeasured=new on(t.doc,e,n);r.lineN=n;var o=r.built=Qe(t,r);return r.text=o.pre,k(t.display.lineMeasure,o.pre),r}(t,e));var o=Pn(r,e,n);return{line:e,view:r,rect:null,map:o.map,cache:o.cache,before:o.before,hasHeights:!1}}function In(t,e,n,r,o){e.before&&(n=-1);var i,a=n+(r||"");return e.cache.hasOwnProperty(a)?i=e.cache[a]:(e.rect||(e.rect=e.view.text.getBoundingClientRect()),e.hasHeights||(function(t,e,n){var r=t.options.lineWrapping,o=r&&An(t);if(!e.measure.heights||r&&e.measure.width!=o){var i=e.measure.heights=[];if(r){e.measure.width=o;for(var a=e.text.firstChild.getClientRects(),s=0;s<a.length-1;s++){var l=a[s],c=a[s+1];Math.abs(l.bottom-c.bottom)>2&&i.push((l.bottom+c.top)/2-n.top)}}i.push(n.bottom-n.top)}}(t,e.view,e.rect),e.hasHeights=!0),(i=Fn(t,e,n,r)).bogus||(e.cache[a]=i)),{left:i.left,right:i.right,top:o?i.rtop:i.top,bottom:o?i.rbottom:i.bottom}}var Dn,Rn={left:0,right:0,top:0,bottom:0};function jn(t,e,n){for(var r,o,i,a,s,l,c=0;c<t.length;c+=3)if(s=t[c],l=t[c+1],e<s?(o=0,i=1,a="left"):e<l?i=1+(o=e-s):(c==t.length-3||e==l&&t[c+3]>e)&&(o=(i=l-s)-1,e>=l&&(a="right")),null!=o){if(r=t[c+2],s==l&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==o)for(;c&&t[c-2]==t[c-3]&&t[c-1].insertLeft;)r=t[2+(c-=3)],a="left";if("right"==n&&o==l-s)for(;c<t.length-3&&t[c+3]==t[c+4]&&!t[c+5].insertLeft;)r=t[(c+=3)+2],a="right";break}return{node:r,start:o,end:i,collapse:a,coverStart:s,coverEnd:l}}function Hn(t,e){var n=Rn;if("left"==e)for(var r=0;r<t.length&&(n=t[r]).left==n.right;r++);else for(var o=t.length-1;o>=0&&(n=t[o]).left==n.right;o--);return n}function Fn(t,e,n,r){var o,i=jn(e.map,n,r),l=i.node,c=i.start,u=i.end,p=i.collapse;if(3==l.nodeType){for(var d=0;d<4;d++){for(;c&&ot(e.line.text.charAt(i.coverStart+c));)--c;for(;i.coverStart+u<i.coverEnd&&ot(e.line.text.charAt(i.coverStart+u));)++u;if((o=a&&s<9&&0==c&&u==i.coverEnd-i.coverStart?l.parentNode.getBoundingClientRect():Hn(x(l,c,u).getClientRects(),r)).left||o.right||0==c)break;u=c,c-=1,p="right"}a&&s<11&&(o=function(t,e){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(t){if(null!=Dt)return Dt;var e=k(t,P("span","x")),n=e.getBoundingClientRect(),r=x(e,0,1).getBoundingClientRect();return Dt=Math.abs(n.left-r.left)>1}(t))return e;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:e.left*n,right:e.right*n,top:e.top*r,bottom:e.bottom*r}}(t.display.measure,o))}else{var f;c>0&&(p=r="right"),o=t.options.lineWrapping&&(f=l.getClientRects()).length>1?f["right"==r?f.length-1:0]:l.getBoundingClientRect()}if(a&&s<9&&!c&&(!o||!o.left&&!o.right)){var h=l.parentNode.getClientRects()[0];o=h?{left:h.left,right:h.left+ar(t.display),top:h.top,bottom:h.bottom}:Rn}for(var g=o.top-e.rect.top,m=o.bottom-e.rect.top,v=(g+m)/2,y=e.view.measure.heights,b=0;b<y.length-1&&!(v<y[b]);b++);var _=b?y[b-1]:0,T=y[b],C={left:("right"==p?o.right:o.left)-e.rect.left,right:("left"==p?o.left:o.right)-e.rect.left,top:_,bottom:T};return o.left||o.right||(C.bogus=!0),t.options.singleCursorHeightPerLine||(C.rtop=g,C.rbottom=m),C}function Bn(t){if(t.measure&&(t.measure.cache={},t.measure.heights=null,t.rest))for(var e=0;e<t.rest.length;e++)t.measure.caches[e]={}}function Vn(t){t.display.externalMeasure=null,A(t.display.lineMeasure);for(var e=0;e<t.display.view.length;e++)Bn(t.display.view[e])}function Un(t){Vn(t),t.display.cachedCharWidth=t.display.cachedTextHeight=t.display.cachedPaddingH=null,t.options.lineWrapping||(t.display.maxLineChanged=!0),t.display.lineNumChars=null}function zn(){return u&&v?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Gn(){return u&&v?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function $n(t){var e=Fe(t).widgets,n=0;if(e)for(var r=0;r<e.length;++r)e[r].above&&(n+=Cn(e[r]));return n}function qn(t,e,n,r,o){if(!o){var i=$n(e);n.top+=i,n.bottom+=i}if("line"==r)return n;r||(r="local");var a=Ge(e);if("local"==r?a+=En(t.display):a-=t.display.viewOffset,"page"==r||"window"==r){var s=t.display.lineSpace.getBoundingClientRect();a+=s.top+("window"==r?0:Gn());var l=s.left+("window"==r?0:zn());n.left+=l,n.right+=l}return n.top+=a,n.bottom+=a,n}function Wn(t,e,n){if("div"==n)return e;var r=e.left,o=e.top;if("page"==n)r-=zn(),o-=Gn();else if("local"==n||!n){var i=t.display.sizer.getBoundingClientRect();r+=i.left,o+=i.top}var a=t.display.lineSpace.getBoundingClientRect();return{left:r-a.left,top:o-a.top}}function Kn(t,e,n,r,o){return r||(r=Wt(t.doc,e.line)),qn(t,r,Nn(t,r,e.ch,o),n)}function Yn(t,e,n,r,o,i){function a(e,a){var s=In(t,o,e,a?"right":"left",i);return a?s.left=s.right:s.right=s.left,qn(t,r,s,n)}r=r||Wt(t.doc,e.line),o||(o=Ln(t,r));var s=ut(r,t.doc.direction),l=e.ch,c=e.sticky;if(l>=r.text.length?(l=r.text.length,c="before"):l<=0&&(l=0,c="after"),!s)return a("before"==c?l-1:l,"before"==c);function u(t,e,n){return a(n?t-1:t,1==s[e].level!=n)}var p=lt(s,l,c),d=st,f=u(l,p,"before"==c);return null!=d&&(f.other=u(l,d,"before"!=c)),f}function Xn(t,e){var n=0;e=le(t.doc,e),t.options.lineWrapping||(n=ar(t.display)*e.ch);var r=Wt(t.doc,e.line),o=Ge(r)+En(t.display);return{left:n,right:n,top:o,bottom:o+r.height}}function Zn(t,e,n,r,o){var i=ee(t,e,n);return i.xRel=o,r&&(i.outside=r),i}function Qn(t,e,n){var r=t.doc;if((n+=t.display.viewOffset)<0)return Zn(r.first,0,null,-1,-1);var o=Qt(r,n),i=r.first+r.size-1;if(o>i)return Zn(r.first+r.size-1,Wt(r,i).text.length,null,1,1);e<0&&(e=0);for(var a=Wt(r,o);;){var s=nr(t,a,o,e,n),l=je(a,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var c=l.find(1);if(c.line==o)return c;a=Wt(r,o=c.line)}}function Jn(t,e,n,r){r-=$n(e);var o=e.text.length,i=at(function(e){return In(t,n,e-1).bottom<=r},o,0);return{begin:i,end:o=at(function(e){return In(t,n,e).top>r},i,o)}}function tr(t,e,n,r){return n||(n=Ln(t,e)),Jn(t,e,n,qn(t,e,In(t,n,r),"line").top)}function er(t,e,n,r){return!(t.bottom<=n)&&(t.top>n||(r?t.left:t.right)>e)}function nr(t,e,n,r,o){o-=Ge(e);var i=Ln(t,e),a=$n(e),s=0,l=e.text.length,c=!0,u=ut(e,t.doc.direction);if(u){var p=(t.options.lineWrapping?or:rr)(t,e,n,i,u,r,o);s=(c=1!=p.level)?p.from:p.to-1,l=c?p.to:p.from-1}var d,f,h=null,g=null,m=at(function(e){var n=In(t,i,e);return n.top+=a,n.bottom+=a,!!er(n,r,o,!1)&&(n.top<=o&&n.left<=r&&(h=e,g=n),!0)},s,l),v=!1;if(g){var y=r-g.left<g.right-r,b=y==c;m=h+(b?0:1),f=b?"after":"before",d=y?g.left:g.right}else{c||m!=l&&m!=s||m++,f=0==m?"after":m==e.text.length?"before":In(t,i,m-(c?1:0)).bottom+a<=o==c?"after":"before";var _=Yn(t,ee(n,m,f),"line",e,i);d=_.left,v=o<_.top?-1:o>=_.bottom?1:0}return Zn(n,m=it(e.text,m,1),f,v,r-d)}function rr(t,e,n,r,o,i,a){var s=at(function(s){var l=o[s],c=1!=l.level;return er(Yn(t,ee(n,c?l.to:l.from,c?"before":"after"),"line",e,r),i,a,!0)},0,o.length-1),l=o[s];if(s>0){var c=1!=l.level,u=Yn(t,ee(n,c?l.from:l.to,c?"after":"before"),"line",e,r);er(u,i,a,!0)&&u.top>a&&(l=o[s-1])}return l}function or(t,e,n,r,o,i,a){var s=Jn(t,e,r,a),l=s.begin,c=s.end;/\s/.test(e.text.charAt(c-1))&&c--;for(var u=null,p=null,d=0;d<o.length;d++){var f=o[d];if(!(f.from>=c||f.to<=l)){var h=In(t,r,1!=f.level?Math.min(c,f.to)-1:Math.max(l,f.from)).right,g=h<i?i-h+1e9:h-i;(!u||p>g)&&(u=f,p=g)}}return u||(u=o[o.length-1]),u.from<l&&(u={from:l,to:u.to,level:u.level}),u.to>c&&(u={from:u.from,to:c,level:u.level}),u}function ir(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==Dn){Dn=P("pre",null,"CodeMirror-line-like");for(var e=0;e<49;++e)Dn.appendChild(document.createTextNode("x")),Dn.appendChild(P("br"));Dn.appendChild(document.createTextNode("x"))}k(t.measure,Dn);var n=Dn.offsetHeight/50;return n>3&&(t.cachedTextHeight=n),A(t.measure),n||1}function ar(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=P("span","xxxxxxxxxx"),n=P("pre",[e],"CodeMirror-line-like");k(t.measure,n);var r=e.getBoundingClientRect(),o=(r.right-r.left)/10;return o>2&&(t.cachedCharWidth=o),o||10}function sr(t){for(var e=t.display,n={},r={},o=e.gutters.clientLeft,i=e.gutters.firstChild,a=0;i;i=i.nextSibling,++a){var s=t.display.gutterSpecs[a].className;n[s]=i.offsetLeft+i.clientLeft+o,r[s]=i.clientWidth}return{fixedPos:lr(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:e.wrapper.clientWidth}}function lr(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function cr(t){var e=ir(t.display),n=t.options.lineWrapping,r=n&&Math.max(5,t.display.scroller.clientWidth/ar(t.display)-3);return function(o){if(Ue(t.doc,o))return 0;var i=0;if(o.widgets)for(var a=0;a<o.widgets.length;a++)o.widgets[a].height&&(i+=o.widgets[a].height);return n?i+(Math.ceil(o.text.length/r)||1)*e:i+e}}function ur(t){var e=t.doc,n=cr(t);e.iter(function(t){var e=n(t);e!=t.height&&Xt(t,e)})}function pr(t,e,n,r){var o=t.display;if(!n&&"true"==Et(e).getAttribute("cm-not-content"))return null;var i,a,s=o.lineSpace.getBoundingClientRect();try{i=e.clientX-s.left,a=e.clientY-s.top}catch(t){return null}var l,c=Qn(t,i,a);if(r&&c.xRel>0&&(l=Wt(t.doc,c.line).text).length==c.ch){var u=F(l,l.length,t.options.tabSize)-l.length;c=ee(c.line,Math.max(0,Math.round((i-xn(t.display).left)/ar(t.display))-u))}return c}function dr(t,e){if(e>=t.display.viewTo)return null;if((e-=t.display.viewFrom)<0)return null;for(var n=t.display.view,r=0;r<n.length;r++)if((e-=n[r].size)<0)return r}function fr(t,e,n,r){null==e&&(e=t.doc.first),null==n&&(n=t.doc.first+t.doc.size),r||(r=0);var o=t.display;if(r&&n<o.viewTo&&(null==o.updateLineNumbers||o.updateLineNumbers>e)&&(o.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=o.viewTo)we&&Be(t.doc,e)<o.viewTo&&gr(t);else if(n<=o.viewFrom)we&&Ve(t.doc,n+r)>o.viewFrom?gr(t):(o.viewFrom+=r,o.viewTo+=r);else if(e<=o.viewFrom&&n>=o.viewTo)gr(t);else if(e<=o.viewFrom){var i=mr(t,n,n+r,1);i?(o.view=o.view.slice(i.index),o.viewFrom=i.lineN,o.viewTo+=r):gr(t)}else if(n>=o.viewTo){var a=mr(t,e,e,-1);a?(o.view=o.view.slice(0,a.index),o.viewTo=a.lineN):gr(t)}else{var s=mr(t,e,e,-1),l=mr(t,n,n+r,1);s&&l?(o.view=o.view.slice(0,s.index).concat(an(t,s.lineN,l.lineN)).concat(o.view.slice(l.index)),o.viewTo+=r):gr(t)}var c=o.externalMeasured;c&&(n<c.lineN?c.lineN+=r:e<c.lineN+c.size&&(o.externalMeasured=null))}function hr(t,e,n){t.curOp.viewChanged=!0;var r=t.display,o=t.display.externalMeasured;if(o&&e>=o.lineN&&e<o.lineN+o.size&&(r.externalMeasured=null),!(e<r.viewFrom||e>=r.viewTo)){var i=r.view[dr(t,e)];if(null!=i.node){var a=i.changes||(i.changes=[]);-1==V(a,n)&&a.push(n)}}}function gr(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function mr(t,e,n,r){var o,i=dr(t,e),a=t.display.view;if(!we||n==t.doc.first+t.doc.size)return{index:i,lineN:n};for(var s=t.display.viewFrom,l=0;l<i;l++)s+=a[l].size;if(s!=e){if(r>0){if(i==a.length-1)return null;o=s+a[i].size-e,i++}else o=s-e;e+=o,n+=o}for(;Be(t.doc,n)!=n;){if(i==(r<0?0:a.length-1))return null;n+=r*a[i-(r<0?1:0)].size,i+=r}return{index:i,lineN:n}}function vr(t){for(var e=t.display.view,n=0,r=0;r<e.length;r++){var o=e[r];o.hidden||o.node&&!o.changes||++n}return n}function yr(t){t.display.input.showSelection(t.display.input.prepareSelection())}function br(t,e){void 0===e&&(e=!0);var n=t.doc,r={},o=r.cursors=document.createDocumentFragment(),i=r.selection=document.createDocumentFragment(),a=t.options.$customCursor;a&&(e=!0);for(var s=0;s<n.sel.ranges.length;s++)if(e||s!=n.sel.primIndex){var l=n.sel.ranges[s];if(!(l.from().line>=t.display.viewTo||l.to().line<t.display.viewFrom)){var c=l.empty();if(a){var u=a(t,l);u&&_r(t,u,o)}else(c||t.options.showCursorWhenSelecting)&&_r(t,l.head,o);c||Cr(t,l,i)}}return r}function _r(t,e,n){var r=Yn(t,e,"div",null,null,!t.options.singleCursorHeightPerLine),o=n.appendChild(P("div","\xa0","CodeMirror-cursor"));if(o.style.left=r.left+"px",o.style.top=r.top+"px",o.style.height=Math.max(0,r.bottom-r.top)*t.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(t.getWrapperElement().className)){var i=Kn(t,e,"div",null,null),a=i.right-i.left;o.style.width=(a>0?a:t.defaultCharWidth())+"px"}if(r.other){var s=n.appendChild(P("div","\xa0","CodeMirror-cursor CodeMirror-secondarycursor"));s.style.display="",s.style.left=r.other.left+"px",s.style.top=r.other.top+"px",s.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function Tr(t,e){return t.top-e.top||t.left-e.left}function Cr(t,e,n){var r=t.display,o=t.doc,i=document.createDocumentFragment(),a=xn(t.display),s=a.left,l=Math.max(r.sizerWidth,An(t)-r.sizer.offsetLeft)-a.right,c="ltr"==o.direction;function u(t,e,n,r){e<0&&(e=0),e=Math.round(e),r=Math.round(r),i.appendChild(P("div",null,"CodeMirror-selected","position: absolute; left: "+t+"px;\n top: "+e+"px; width: "+(null==n?l-t:n)+"px;\n height: "+(r-e)+"px"))}function p(e,n,r){var i,a,p=Wt(o,e),d=p.text.length;function f(n,r){return Kn(t,ee(e,n),"div",p,r)}function h(e,n,r){var o=tr(t,p,null,e),i="ltr"==n==("after"==r)?"left":"right";return f("after"==r?o.begin:o.end-(/\s/.test(p.text.charAt(o.end-1))?2:1),i)[i]}var g=ut(p,o.direction);return function(t,e,n,r){if(!t)return r(e,n,"ltr",0);for(var o=!1,i=0;i<t.length;++i){var a=t[i];(a.from<n&&a.to>e||e==n&&a.to==e)&&(r(Math.max(a.from,e),Math.min(a.to,n),1==a.level?"rtl":"ltr",i),o=!0)}o||r(e,n,"ltr")}(g,n||0,null==r?d:r,function(t,e,o,p){var m="ltr"==o,v=f(t,m?"left":"right"),y=f(e-1,m?"right":"left"),b=null==n&&0==t,_=null==r&&e==d,T=0==p,C=!g||p==g.length-1;if(y.top-v.top<=3){var w=(c?_:b)&&C,E=(c?b:_)&&T?s:(m?v:y).left,S=w?l:(m?y:v).right;u(E,v.top,S-E,v.bottom)}else{var x,O,A,k;m?(x=c&&b&&T?s:v.left,O=c?l:h(t,o,"before"),A=c?s:h(e,o,"after"),k=c&&_&&C?l:y.right):(x=c?h(t,o,"before"):s,O=!c&&b&&T?l:v.right,A=!c&&_&&C?s:y.left,k=c?h(e,o,"after"):l),u(x,v.top,O-x,v.bottom),v.bottom<y.top&&u(s,v.bottom,null,y.top),u(A,y.top,k-A,y.bottom)}(!i||Tr(v,i)<0)&&(i=v),Tr(y,i)<0&&(i=y),(!a||Tr(v,a)<0)&&(a=v),Tr(y,a)<0&&(a=y)}),{start:i,end:a}}var d=e.from(),f=e.to();if(d.line==f.line)p(d.line,d.ch,f.ch);else{var h=Wt(o,d.line),g=Wt(o,f.line),m=Fe(h)==Fe(g),v=p(d.line,d.ch,m?h.text.length+1:null).end,y=p(f.line,m?0:null,f.ch).start;m&&(v.top<y.top-2?(u(v.right,v.top,null,v.bottom),u(s,y.top,y.left,y.bottom)):u(v.right,v.top,y.left-v.right,v.bottom)),v.bottom<y.top&&u(s,v.bottom,null,y.top)}n.appendChild(i)}function wr(t){if(t.state.focused){var e=t.display;clearInterval(e.blinker);var n=!0;e.cursorDiv.style.visibility="",t.options.cursorBlinkRate>0?e.blinker=setInterval(function(){t.hasFocus()||Or(t),e.cursorDiv.style.visibility=(n=!n)?"":"hidden"},t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function Er(t){t.hasFocus()||(t.display.input.focus(),t.state.focused||xr(t))}function Sr(t){t.state.delayingBlurEvent=!0,setTimeout(function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,t.state.focused&&Or(t))},100)}function xr(t,e){t.state.delayingBlurEvent&&!t.state.draggingText&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(gt(t,"focus",t,e),t.state.focused=!0,I(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),l&&setTimeout(function(){return t.display.input.reset(!0)},20)),t.display.input.receivedFocus()),wr(t))}function Or(t,e){t.state.delayingBlurEvent||(t.state.focused&&(gt(t,"blur",t,e),t.state.focused=!1,O(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout(function(){t.state.focused||(t.display.shift=!1)},150))}function Ar(t){for(var e=t.display,n=e.lineDiv.offsetTop,r=Math.max(0,e.scroller.getBoundingClientRect().top),o=e.lineDiv.getBoundingClientRect().top,i=0,l=0;l<e.view.length;l++){var c=e.view[l],u=t.options.lineWrapping,p=void 0,d=0;if(!c.hidden){if(o+=c.line.height,a&&s<8){var f=c.node.offsetTop+c.node.offsetHeight;p=f-n,n=f}else{var h=c.node.getBoundingClientRect();p=h.bottom-h.top,!u&&c.text.firstChild&&(d=c.text.firstChild.getBoundingClientRect().right-h.left-1)}var g=c.line.height-p;if((g>.005||g<-.005)&&(o<r&&(i-=g),Xt(c.line,p),kr(c.line),c.rest))for(var m=0;m<c.rest.length;m++)kr(c.rest[m]);if(d>t.display.sizerWidth){var v=Math.ceil(d/ar(t.display));v>t.display.maxLineLength&&(t.display.maxLineLength=v,t.display.maxLine=c.line,t.display.maxLineChanged=!0)}}}Math.abs(i)>2&&(e.scroller.scrollTop+=i)}function kr(t){if(t.widgets)for(var e=0;e<t.widgets.length;++e){var n=t.widgets[e],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function Pr(t,e,n){var r=n&&null!=n.top?Math.max(0,n.top):t.scroller.scrollTop;r=Math.floor(r-En(t));var o=n&&null!=n.bottom?n.bottom:r+t.wrapper.clientHeight,i=Qt(e,r),a=Qt(e,o);if(n&&n.ensure){var s=n.ensure.from.line,l=n.ensure.to.line;s<i?(i=s,a=Qt(e,Ge(Wt(e,s))+t.wrapper.clientHeight)):Math.min(l,e.lastLine())>=a&&(i=Qt(e,Ge(Wt(e,l))-t.wrapper.clientHeight),a=l)}return{from:i,to:Math.max(a,i+1)}}function Nr(t,e){var n=t.display,r=ir(t.display);e.top<0&&(e.top=0);var o=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:n.scroller.scrollTop,i=kn(t),a={};e.bottom-e.top>i&&(e.bottom=e.top+i);var s=t.doc.height+Sn(n),l=e.top<r,c=e.bottom>s-r;if(e.top<o)a.scrollTop=l?0:e.top;else if(e.bottom>o+i){var u=Math.min(e.top,(c?s:e.bottom)-i);u!=o&&(a.scrollTop=u)}var p=t.options.fixedGutter?0:n.gutters.offsetWidth,d=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:n.scroller.scrollLeft-p,f=An(t)-n.gutters.offsetWidth,h=e.right-e.left>f;return h&&(e.right=e.left+f),e.left<10?a.scrollLeft=0:e.left<d?a.scrollLeft=Math.max(0,e.left+p-(h?0:10)):e.right>f+d-3&&(a.scrollLeft=e.right+(h?0:10)-f),a}function Mr(t,e){null!=e&&(Dr(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function Lr(t){Dr(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function Ir(t,e,n){null==e&&null==n||Dr(t),null!=e&&(t.curOp.scrollLeft=e),null!=n&&(t.curOp.scrollTop=n)}function Dr(t){var e=t.curOp.scrollToPos;e&&(t.curOp.scrollToPos=null,Rr(t,Xn(t,e.from),Xn(t,e.to),e.margin))}function Rr(t,e,n,r){var o=Nr(t,{left:Math.min(e.left,n.left),top:Math.min(e.top,n.top)-r,right:Math.max(e.right,n.right),bottom:Math.max(e.bottom,n.bottom)+r});Ir(t,o.scrollLeft,o.scrollTop)}function jr(t,e){Math.abs(t.doc.scrollTop-e)<2||(n||uo(t,{top:e}),Hr(t,e,!0),n&&uo(t),io(t,100))}function Hr(t,e,n){e=Math.max(0,Math.min(t.display.scroller.scrollHeight-t.display.scroller.clientHeight,e)),(t.display.scroller.scrollTop!=e||n)&&(t.doc.scrollTop=e,t.display.scrollbars.setScrollTop(e),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e))}function Fr(t,e,n,r){e=Math.max(0,Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth)),(n?e==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-e)<2)&&!r||(t.doc.scrollLeft=e,go(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function Br(t){var e=t.display,n=e.gutters.offsetWidth,r=Math.round(t.doc.height+Sn(t.display));return{clientHeight:e.scroller.clientHeight,viewHeight:e.wrapper.clientHeight,scrollWidth:e.scroller.scrollWidth,clientWidth:e.scroller.clientWidth,viewWidth:e.wrapper.clientWidth,barLeft:t.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+On(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:n}}var Vr=function(t,e,n){this.cm=n;var r=this.vert=P("div",[P("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=P("div",[P("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=o.tabIndex=-1,t(r),t(o),dt(r,"scroll",function(){r.clientHeight&&e(r.scrollTop,"vertical")}),dt(o,"scroll",function(){o.clientWidth&&e(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Vr.prototype.update=function(t){var e=t.scrollWidth>t.clientWidth+1,n=t.scrollHeight>t.clientHeight+1,r=t.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=e?r+"px":"0";var o=t.viewHeight-(e?r:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+o)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(e){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=t.barLeft+"px";var i=t.viewWidth-t.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+i)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:e?r:0}},Vr.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Vr.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Vr.prototype.zeroWidthHack=function(){var t=b&&!h?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new B,this.disableVert=new B},Vr.prototype.enableZeroWidthBar=function(t,e,n){t.style.visibility="",e.set(1e3,function r(){var o=t.getBoundingClientRect();("vert"==n?document.elementFromPoint(o.right-1,(o.top+o.bottom)/2):document.elementFromPoint((o.right+o.left)/2,o.bottom-1))!=t?t.style.visibility="hidden":e.set(1e3,r)})},Vr.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var Ur=function(){};function zr(t,e){e||(e=Br(t));var n=t.display.barWidth,r=t.display.barHeight;Gr(t,e);for(var o=0;o<4&&n!=t.display.barWidth||r!=t.display.barHeight;o++)n!=t.display.barWidth&&t.options.lineWrapping&&Ar(t),Gr(t,Br(t)),n=t.display.barWidth,r=t.display.barHeight}function Gr(t,e){var n=t.display,r=n.scrollbars.update(e);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=e.gutterWidth+"px"):n.gutterFiller.style.display=""}Ur.prototype.update=function(){return{bottom:0,right:0}},Ur.prototype.setScrollLeft=function(){},Ur.prototype.setScrollTop=function(){},Ur.prototype.clear=function(){};var $r={native:Vr,null:Ur};function qr(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&O(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new $r[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),dt(e,"mousedown",function(){t.state.focused&&setTimeout(function(){return t.display.input.focus()},0)}),e.setAttribute("cm-not-content","true")},function(e,n){"horizontal"==n?Fr(t,e):jr(t,e)},t),t.display.scrollbars.addClass&&I(t.display.wrapper,t.display.scrollbars.addClass)}var Wr=0;function Kr(t){t.curOp={cm:t,viewChanged:!1,startHeight:t.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Wr,markArrays:null},function(t){sn?sn.ops.push(t):t.ownsGroup=sn={ops:[t],delayedCallbacks:[]}}(t.curOp)}function Yr(t){var e=t.curOp;e&&function(t,e){var n=t.ownsGroup;if(n)try{!function(t){var e=t.delayedCallbacks,n=0;do{for(;n<e.length;n++)e[n].call(null);for(var r=0;r<t.ops.length;r++){var o=t.ops[r];if(o.cursorActivityHandlers)for(;o.cursorActivityCalled<o.cursorActivityHandlers.length;)o.cursorActivityHandlers[o.cursorActivityCalled++].call(null,o.cm)}}while(n<e.length)}(n)}finally{sn=null,e(n)}}(e,function(t){for(var e=0;e<t.ops.length;e++)t.ops[e].cm.curOp=null;!function(t){for(var e=t.ops,n=0;n<e.length;n++)Xr(e[n]);for(var r=0;r<e.length;r++)Zr(e[r]);for(var o=0;o<e.length;o++)Qr(e[o]);for(var i=0;i<e.length;i++)Jr(e[i]);for(var a=0;a<e.length;a++)to(e[a])}(t)})}function Xr(t){var e=t.cm,n=e.display;(function(t){var e=t.display;!e.scrollbarsClipped&&e.scroller.offsetWidth&&(e.nativeBarWidth=e.scroller.offsetWidth-e.scroller.clientWidth,e.heightForcer.style.height=On(t)+"px",e.sizer.style.marginBottom=-e.nativeBarWidth+"px",e.sizer.style.borderRightWidth=On(t)+"px",e.scrollbarsClipped=!0)})(e),t.updateMaxLine&&qe(e),t.mustUpdate=t.viewChanged||t.forceUpdate||null!=t.scrollTop||t.scrollToPos&&(t.scrollToPos.from.line<n.viewFrom||t.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new so(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function Zr(t){t.updatedDisplay=t.mustUpdate&&lo(t.cm,t.update)}function Qr(t){var e=t.cm,n=e.display;t.updatedDisplay&&Ar(e),t.barMeasure=Br(e),n.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=Nn(e,n.maxLine,n.maxLine.text.length).left+3,e.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+t.adjustWidthTo+On(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+t.adjustWidthTo-An(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=n.input.prepareSelection())}function Jr(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft<e.doc.scrollLeft&&Fr(e,Math.min(e.display.scroller.scrollLeft,t.maxScrollLeft),!0),e.display.maxLineChanged=!1);var n=t.focus&&t.focus==L();t.preparedSelection&&e.display.input.showSelection(t.preparedSelection,n),(t.updatedDisplay||t.startHeight!=e.doc.height)&&zr(e,t.barMeasure),t.updatedDisplay&&ho(e,t.barMeasure),t.selectionChanged&&wr(e),e.state.focused&&t.updateInput&&e.display.input.reset(t.typing),n&&Er(t.cm)}function to(t){var e=t.cm,n=e.display,r=e.doc;t.updatedDisplay&&co(e,t.update),null==n.wheelStartX||null==t.scrollTop&&null==t.scrollLeft&&!t.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null!=t.scrollTop&&Hr(e,t.scrollTop,t.forceScroll),null!=t.scrollLeft&&Fr(e,t.scrollLeft,!0,!0),t.scrollToPos&&function(t,e){if(!mt(t,"scrollCursorIntoView")){var n=t.display,r=n.sizer.getBoundingClientRect(),o=null;if(e.top+r.top<0?o=!0:e.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!g){var i=P("div","\u200b",null,"position: absolute;\n top: "+(e.top-n.viewOffset-En(t.display))+"px;\n height: "+(e.bottom-e.top+On(t)+n.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(i),i.scrollIntoView(o),t.display.lineSpace.removeChild(i)}}}(e,function(t,e,n,r){var o;null==r&&(r=0),t.options.lineWrapping||e!=n||(n="before"==e.sticky?ee(e.line,e.ch+1,"before"):e,e=e.ch?ee(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e);for(var i=0;i<5;i++){var a=!1,s=Yn(t,e),l=n&&n!=e?Yn(t,n):s,c=Nr(t,o={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-r,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+r}),u=t.doc.scrollTop,p=t.doc.scrollLeft;if(null!=c.scrollTop&&(jr(t,c.scrollTop),Math.abs(t.doc.scrollTop-u)>1&&(a=!0)),null!=c.scrollLeft&&(Fr(t,c.scrollLeft),Math.abs(t.doc.scrollLeft-p)>1&&(a=!0)),!a)break}return o}(e,le(r,t.scrollToPos.from),le(r,t.scrollToPos.to),t.scrollToPos.margin));var o=t.maybeHiddenMarkers,i=t.maybeUnhiddenMarkers;if(o)for(var a=0;a<o.length;++a)o[a].lines.length||gt(o[a],"hide");if(i)for(var s=0;s<i.length;++s)i[s].lines.length&>(i[s],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=e.display.scroller.scrollTop),t.changeObjs&>(e,"changes",e,t.changeObjs),t.update&&t.update.finish()}function eo(t,e){if(t.curOp)return e();Kr(t);try{return e()}finally{Yr(t)}}function no(t,e){return function(){if(t.curOp)return e.apply(t,arguments);Kr(t);try{return e.apply(t,arguments)}finally{Yr(t)}}}function ro(t){return function(){if(this.curOp)return t.apply(this,arguments);Kr(this);try{return t.apply(this,arguments)}finally{Yr(this)}}}function oo(t){return function(){var e=this.cm;if(!e||e.curOp)return t.apply(this,arguments);Kr(e);try{return t.apply(this,arguments)}finally{Yr(e)}}}function io(t,e){t.doc.highlightFrontier<t.display.viewTo&&t.state.highlight.set(e,j(ao,t))}function ao(t){var e=t.doc;if(!(e.highlightFrontier>=t.display.viewTo)){var n=+new Date+t.options.workTime,r=he(t,e.highlightFrontier),o=[];e.iter(r.line,Math.min(e.first+e.size,t.display.viewTo+500),function(i){if(r.line>=t.display.viewFrom){var a=i.styles,s=i.text.length>t.options.maxHighlightLength?zt(e.mode,r.state):null,l=de(t,i,r,!0);s&&(r.state=s),i.styles=l.styles;var c=i.styleClasses,u=l.classes;u?i.styleClasses=u:c&&(i.styleClasses=null);for(var p=!a||a.length!=i.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),d=0;!p&&d<a.length;++d)p=a[d]!=i.styles[d];p&&o.push(r.line),i.stateAfter=r.save(),r.nextLine()}else i.text.length<=t.options.maxHighlightLength&&ge(t,i.text,r),i.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return io(t,t.options.workDelay),!0}),e.highlightFrontier=r.line,e.modeFrontier=Math.max(e.modeFrontier,r.line),o.length&&eo(t,function(){for(var e=0;e<o.length;e++)hr(t,o[e],"text")})}}var so=function(t,e,n){var r=t.display;this.viewport=e,this.visible=Pr(r,t.doc,e),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=An(t),this.force=n,this.dims=sr(t),this.events=[]};function lo(t,e){var n=t.display,r=t.doc;if(e.editorIsHidden)return gr(t),!1;if(!e.force&&e.visible.from>=n.viewFrom&&e.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==vr(t))return!1;mo(t)&&(gr(t),e.dims=sr(t));var o=r.first+r.size,i=Math.max(e.visible.from-t.options.viewportMargin,r.first),a=Math.min(o,e.visible.to+t.options.viewportMargin);n.viewFrom<i&&i-n.viewFrom<20&&(i=Math.max(r.first,n.viewFrom)),n.viewTo>a&&n.viewTo-a<20&&(a=Math.min(o,n.viewTo)),we&&(i=Be(t.doc,i),a=Ve(t.doc,a));var s=i!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=e.wrapperHeight||n.lastWrapWidth!=e.wrapperWidth;(function(t,e,n){var r=t.display;0==r.view.length||e>=r.viewTo||n<=r.viewFrom?(r.view=an(t,e,n),r.viewFrom=e):(r.viewFrom>e?r.view=an(t,e,r.viewFrom).concat(r.view):r.viewFrom<e&&(r.view=r.view.slice(dr(t,e))),r.viewFrom=e,r.viewTo<n?r.view=r.view.concat(an(t,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,dr(t,n)))),r.viewTo=n})(t,i,a),n.viewOffset=Ge(Wt(t.doc,n.viewFrom)),t.display.mover.style.top=n.viewOffset+"px";var l=vr(t);if(!s&&0==l&&!e.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var c=function(t){if(t.hasFocus())return null;var e=L();if(!e||!M(t.display.lineDiv,e))return null;var n={activeElt:e};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&M(t.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(t);return l>4&&(n.lineDiv.style.display="none"),po(t,n.updateLineNumbers,e.dims),l>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(t){if(t&&t.activeElt&&t.activeElt!=L()&&(t.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(t.activeElt.nodeName)&&t.anchorNode&&M(document.body,t.anchorNode)&&M(document.body,t.focusNode))){var e=window.getSelection(),n=document.createRange();n.setEnd(t.anchorNode,t.anchorOffset),n.collapse(!1),e.removeAllRanges(),e.addRange(n),e.extend(t.focusNode,t.focusOffset)}}(c),A(n.cursorDiv),A(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=e.wrapperHeight,n.lastWrapWidth=e.wrapperWidth,io(t,400)),n.updateLineNumbers=null,!0}function co(t,e){for(var n=e.viewport,r=!0;;r=!1){if(r&&t.options.lineWrapping&&e.oldDisplayWidth!=An(t))r&&(e.visible=Pr(t.display,t.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(t.doc.height+Sn(t.display)-kn(t),n.top)}),e.visible=Pr(t.display,t.doc,n),e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)break;if(!lo(t,e))break;Ar(t);var o=Br(t);yr(t),zr(t,o),ho(t,o),e.force=!1}e.signal(t,"update",t),t.display.viewFrom==t.display.reportedViewFrom&&t.display.viewTo==t.display.reportedViewTo||(e.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function uo(t,e){var n=new so(t,e);if(lo(t,n)){Ar(t),co(t,n);var r=Br(t);yr(t),zr(t,r),ho(t,r),n.finish()}}function po(t,e,n){var r=t.display,o=t.options.lineNumbers,i=r.lineDiv,a=i.firstChild;function s(e){var n=e.nextSibling;return l&&b&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),n}for(var c=r.view,u=r.viewFrom,p=0;p<c.length;p++){var d=c[p];if(d.hidden);else if(d.node&&d.node.parentNode==i){for(;a!=d.node;)a=s(a);var f=o&&null!=e&&e<=u&&d.lineNumber;d.changes&&(V(d.changes,"gutter")>-1&&(f=!1),pn(t,d,u,n)),f&&(A(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(te(t.options,u)))),a=d.node.nextSibling}else{var h=yn(t,d,u,n);i.insertBefore(h,a)}u+=d.size}for(;a;)a=s(a)}function fo(t){var e=t.gutters.offsetWidth;t.sizer.style.marginLeft=e+"px",cn(t,"gutterChanged",t)}function ho(t,e){t.display.sizer.style.minHeight=e.docHeight+"px",t.display.heightForcer.style.top=e.docHeight+"px",t.display.gutters.style.height=e.docHeight+t.display.barHeight+On(t)+"px"}function go(t){var e=t.display,n=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var r=lr(e)-e.scroller.scrollLeft+t.doc.scrollLeft,o=e.gutters.offsetWidth,i=r+"px",a=0;a<n.length;a++)if(!n[a].hidden){t.options.fixedGutter&&(n[a].gutter&&(n[a].gutter.style.left=i),n[a].gutterBackground&&(n[a].gutterBackground.style.left=i));var s=n[a].alignable;if(s)for(var l=0;l<s.length;l++)s[l].style.left=i}t.options.fixedGutter&&(e.gutters.style.left=r+o+"px")}}function mo(t){if(!t.options.lineNumbers)return!1;var e=t.doc,n=te(t.options,e.first+e.size-1),r=t.display;if(n.length!=r.lineNumChars){var o=r.measure.appendChild(P("div",[P("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),i=o.firstChild.offsetWidth,a=o.offsetWidth-i;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(i,r.lineGutter.offsetWidth-a)+1,r.lineNumWidth=r.lineNumInnerWidth+a,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",fo(t.display),!0}return!1}function vo(t,e){for(var n=[],r=!1,o=0;o<t.length;o++){var i=t[o],a=null;if("string"!=typeof i&&(a=i.style,i=i.className),"CodeMirror-linenumbers"==i){if(!e)continue;r=!0}n.push({className:i,style:a})}return e&&!r&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function yo(t){var e=t.gutters,n=t.gutterSpecs;A(e),t.lineGutter=null;for(var r=0;r<n.length;++r){var o=n[r],i=o.className,a=o.style,s=e.appendChild(P("div",null,"CodeMirror-gutter "+i));a&&(s.style.cssText=a),"CodeMirror-linenumbers"==i&&(t.lineGutter=s,s.style.width=(t.lineNumWidth||1)+"px")}e.style.display=n.length?"":"none",fo(t)}function bo(t){yo(t.display),fr(t),go(t)}function _o(t,e,r,o){var i=this;this.input=r,i.scrollbarFiller=P("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=P("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=N("div",null,"CodeMirror-code"),i.selectionDiv=P("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=P("div",null,"CodeMirror-cursors"),i.measure=P("div",null,"CodeMirror-measure"),i.lineMeasure=P("div",null,"CodeMirror-measure"),i.lineSpace=N("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var c=N("div",[i.lineSpace],"CodeMirror-lines");i.mover=P("div",[c],null,"position: relative"),i.sizer=P("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=P("div",null,null,"position: absolute; height: 50px; width: 1px;"),i.gutters=P("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=P("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=P("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),i.wrapper.setAttribute("translate","no"),a&&s<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),l||n&&y||(i.scroller.draggable=!0),t&&(t.appendChild?t.appendChild(i.wrapper):t(i.wrapper)),i.viewFrom=i.viewTo=e.first,i.reportedViewFrom=i.reportedViewTo=e.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,i.gutterSpecs=vo(o.gutters,o.lineNumbers),yo(i),r.init(i)}so.prototype.signal=function(t,e){yt(t,e)&&this.events.push(arguments)},so.prototype.finish=function(){for(var t=0;t<this.events.length;t++)gt.apply(null,this.events[t])};var To=0,Co=null;function wo(t){var e=t.wheelDeltaX,n=t.wheelDeltaY;return null==e&&t.detail&&t.axis==t.HORIZONTAL_AXIS&&(e=t.detail),null==n&&t.detail&&t.axis==t.VERTICAL_AXIS?n=t.detail:null==n&&(n=t.wheelDelta),{x:e,y:n}}function Eo(t){var e=wo(t);return e.x*=Co,e.y*=Co,e}function So(t,e){u&&p>=102&&(null==t.display.chromeScrollHack?t.display.sizer.style.pointerEvents="none":clearTimeout(t.display.chromeScrollHack),t.display.chromeScrollHack=setTimeout(function(){t.display.chromeScrollHack=null,t.display.sizer.style.pointerEvents=""},100));var r=wo(e),o=r.x,i=r.y,a=Co;0===e.deltaMode&&(o=e.deltaX,i=e.deltaY,a=1);var s=t.display,c=s.scroller,f=c.scrollWidth>c.clientWidth,h=c.scrollHeight>c.clientHeight;if(o&&f||i&&h){if(i&&b&&l)t:for(var g=e.target,m=s.view;g!=c;g=g.parentNode)for(var v=0;v<m.length;v++)if(m[v].node==g){t.display.currentWheelTarget=g;break t}if(o&&!n&&!d&&null!=a)return i&&h&&jr(t,Math.max(0,c.scrollTop+i*a)),Fr(t,Math.max(0,c.scrollLeft+o*a)),(!i||i&&h)&&_t(e),void(s.wheelStartX=null);if(i&&null!=a){var y=i*a,_=t.doc.scrollTop,T=_+s.wrapper.clientHeight;y<0?_=Math.max(0,_+y-50):T=Math.min(t.doc.height,T+y+50),uo(t,{top:_,bottom:T})}To<20&&0!==e.deltaMode&&(null==s.wheelStartX?(s.wheelStartX=c.scrollLeft,s.wheelStartY=c.scrollTop,s.wheelDX=o,s.wheelDY=i,setTimeout(function(){if(null!=s.wheelStartX){var t=c.scrollLeft-s.wheelStartX,e=c.scrollTop-s.wheelStartY,n=e&&s.wheelDY&&e/s.wheelDY||t&&s.wheelDX&&t/s.wheelDX;s.wheelStartX=s.wheelStartY=null,n&&(Co=(Co*To+n)/(To+1),++To)}},200)):(s.wheelDX+=o,s.wheelDY+=i))}}a?Co=-.53:n?Co=15:u?Co=-.7:f&&(Co=-1/3);var xo=function(t,e){this.ranges=t,this.primIndex=e};xo.prototype.primary=function(){return this.ranges[this.primIndex]},xo.prototype.equals=function(t){if(t==this)return!0;if(t.primIndex!=this.primIndex||t.ranges.length!=this.ranges.length)return!1;for(var e=0;e<this.ranges.length;e++){var n=this.ranges[e],r=t.ranges[e];if(!re(n.anchor,r.anchor)||!re(n.head,r.head))return!1}return!0},xo.prototype.deepCopy=function(){for(var t=[],e=0;e<this.ranges.length;e++)t[e]=new Oo(oe(this.ranges[e].anchor),oe(this.ranges[e].head));return new xo(t,this.primIndex)},xo.prototype.somethingSelected=function(){for(var t=0;t<this.ranges.length;t++)if(!this.ranges[t].empty())return!0;return!1},xo.prototype.contains=function(t,e){e||(e=t);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(ne(e,r.from())>=0&&ne(t,r.to())<=0)return n}return-1};var Oo=function(t,e){this.anchor=t,this.head=e};function Ao(t,e,n){var r=t&&t.options.selectionsMayTouch,o=e[n];e.sort(function(t,e){return ne(t.from(),e.from())}),n=V(e,o);for(var i=1;i<e.length;i++){var a=e[i],s=e[i-1],l=ne(s.to(),a.from());if(r&&!a.empty()?l>0:l>=0){var c=ae(s.from(),a.from()),u=ie(s.to(),a.to()),p=s.empty()?a.from()==a.head:s.from()==s.head;i<=n&&--n,e.splice(--i,2,new Oo(p?u:c,p?c:u))}}return new xo(e,n)}function ko(t,e){return new xo([new Oo(t,e||t)],0)}function Po(t){return t.text?ee(t.from.line+t.text.length-1,Y(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function No(t,e){if(ne(t,e.from)<0)return t;if(ne(t,e.to)<=0)return Po(e);var n=t.line+e.text.length-(e.to.line-e.from.line)-1,r=t.ch;return t.line==e.to.line&&(r+=Po(e).ch-e.to.ch),ee(n,r)}function Mo(t,e){for(var n=[],r=0;r<t.sel.ranges.length;r++){var o=t.sel.ranges[r];n.push(new Oo(No(o.anchor,e),No(o.head,e)))}return Ao(t.cm,n,t.sel.primIndex)}function Lo(t,e,n){return t.line==e.line?ee(n.line,t.ch-e.ch+n.ch):ee(n.line+(t.line-e.line),t.ch)}function Io(t){t.doc.mode=Bt(t.options,t.doc.modeOption),Do(t)}function Do(t){t.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),t.doc.modeFrontier=t.doc.highlightFrontier=t.doc.first,io(t,100),t.state.modeGen++,t.curOp&&fr(t)}function Ro(t,e){return 0==e.from.ch&&0==e.to.ch&&""==Y(e.text)&&(!t.cm||t.cm.options.wholeLineUpdateBefore)}function jo(t,e,n,r){function o(t){return n?n[t]:null}function i(t,n,o){(function(t,e,n,r){t.text=e,t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null),null!=t.order&&(t.order=null),ke(t),Pe(t,n);var o=r?r(t):1;o!=t.height&&Xt(t,o)})(t,n,o,r),cn(t,"change",t,e)}function a(t,e){for(var n=[],i=t;i<e;++i)n.push(new We(c[i],o(i),r));return n}var s=e.from,l=e.to,c=e.text,u=Wt(t,s.line),p=Wt(t,l.line),d=Y(c),f=o(c.length-1),h=l.line-s.line;if(e.full)t.insert(0,a(0,c.length)),t.remove(c.length,t.size-c.length);else if(Ro(t,e)){var g=a(0,c.length-1);i(p,p.text,f),h&&t.remove(s.line,h),g.length&&t.insert(s.line,g)}else if(u==p)if(1==c.length)i(u,u.text.slice(0,s.ch)+d+u.text.slice(l.ch),f);else{var m=a(1,c.length-1);m.push(new We(d+u.text.slice(l.ch),f,r)),i(u,u.text.slice(0,s.ch)+c[0],o(0)),t.insert(s.line+1,m)}else if(1==c.length)i(u,u.text.slice(0,s.ch)+c[0]+p.text.slice(l.ch),o(0)),t.remove(s.line+1,h);else{i(u,u.text.slice(0,s.ch)+c[0],o(0)),i(p,d+p.text.slice(l.ch),f);var v=a(1,c.length-1);h>1&&t.remove(s.line+1,h-1),t.insert(s.line+1,v)}cn(t,"change",t,e)}function Ho(t,e,n){!function t(r,o,i){if(r.linked)for(var a=0;a<r.linked.length;++a){var s=r.linked[a];if(s.doc!=o){var l=i&&s.sharedHist;n&&!l||(e(s.doc,l),t(s.doc,r,l))}}}(t,null,!0)}function Fo(t,e){if(e.cm)throw new Error("This document is already in use.");t.doc=e,e.cm=t,ur(t),Io(t),Bo(t),t.options.direction=e.direction,t.options.lineWrapping||qe(t),t.options.mode=e.modeOption,fr(t)}function Bo(t){("rtl"==t.doc.direction?I:O)(t.display.lineDiv,"CodeMirror-rtl")}function Vo(t){this.done=[],this.undone=[],this.undoDepth=t?t.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=t?t.maxGeneration:1}function Uo(t,e){var n={from:oe(e.from),to:Po(e),text:Kt(t,e.from,e.to)};return Wo(t,n,e.from.line,e.to.line+1),Ho(t,function(t){return Wo(t,n,e.from.line,e.to.line+1)},!0),n}function zo(t){for(;t.length&&Y(t).ranges;)t.pop()}function Go(t,e,n,r){var o=t.history;o.undone.length=0;var i,a,s=+new Date;if((o.lastOp==r||o.lastOrigin==e.origin&&e.origin&&("+"==e.origin.charAt(0)&&o.lastModTime>s-(t.cm?t.cm.options.historyEventDelay:500)||"*"==e.origin.charAt(0)))&&(i=function(t,e){return e?(zo(t.done),Y(t.done)):t.done.length&&!Y(t.done).ranges?Y(t.done):t.done.length>1&&!t.done[t.done.length-2].ranges?(t.done.pop(),Y(t.done)):void 0}(o,o.lastOp==r)))a=Y(i.changes),0==ne(e.from,e.to)&&0==ne(e.from,a.to)?a.to=Po(e):i.changes.push(Uo(t,e));else{var l=Y(o.done);for(l&&l.ranges||qo(t.sel,o.done),i={changes:[Uo(t,e)],generation:o.generation},o.done.push(i);o.done.length>o.undoDepth;)o.done.shift(),o.done[0].ranges||o.done.shift()}o.done.push(n),o.generation=++o.maxGeneration,o.lastModTime=o.lastSelTime=s,o.lastOp=o.lastSelOp=r,o.lastOrigin=o.lastSelOrigin=e.origin,a||gt(t,"historyAdded")}function $o(t,e,n,r){var o=t.history,i=r&&r.origin;n==o.lastSelOp||i&&o.lastSelOrigin==i&&(o.lastModTime==o.lastSelTime&&o.lastOrigin==i||function(t,e,n,r){var o=e.charAt(0);return"*"==o||"+"==o&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}(t,i,Y(o.done),e))?o.done[o.done.length-1]=e:qo(e,o.done),o.lastSelTime=+new Date,o.lastSelOrigin=i,o.lastSelOp=n,r&&!1!==r.clearRedo&&zo(o.undone)}function qo(t,e){var n=Y(e);n&&n.ranges&&n.equals(t)||e.push(t)}function Wo(t,e,n,r){var o=e["spans_"+t.id],i=0;t.iter(Math.max(t.first,n),Math.min(t.first+t.size,r),function(n){n.markedSpans&&((o||(o=e["spans_"+t.id]={}))[i]=n.markedSpans),++i})}function Ko(t){if(!t)return null;for(var e,n=0;n<t.length;++n)t[n].marker.explicitlyCleared?e||(e=t.slice(0,n)):e&&e.push(t[n]);return e?e.length?e:null:t}function Yo(t,e){var n=function(t,e){var n=e["spans_"+t.id];if(!n)return null;for(var r=[],o=0;o<e.text.length;++o)r.push(Ko(n[o]));return r}(t,e),r=Oe(t,e);if(!n)return r;if(!r)return n;for(var o=0;o<n.length;++o){var i=n[o],a=r[o];if(i&&a)t:for(var s=0;s<a.length;++s){for(var l=a[s],c=0;c<i.length;++c)if(i[c].marker==l.marker)continue t;i.push(l)}else a&&(n[o]=a)}return n}function Xo(t,e,n){for(var r=[],o=0;o<t.length;++o){var i=t[o];if(i.ranges)r.push(n?xo.prototype.deepCopy.call(i):i);else{var a=i.changes,s=[];r.push({changes:s});for(var l=0;l<a.length;++l){var c=a[l],u=void 0;if(s.push({from:c.from,to:c.to,text:c.text}),e)for(var p in c)(u=p.match(/^spans_(\d+)$/))&&V(e,Number(u[1]))>-1&&(Y(s)[p]=c[p],delete c[p])}}}return r}function Zo(t,e,n,r){if(r){var o=t.anchor;if(n){var i=ne(e,o)<0;i!=ne(n,o)<0?(o=e,e=n):i!=ne(e,n)<0&&(e=n)}return new Oo(o,e)}return new Oo(n||e,e)}function Qo(t,e,n,r,o){null==o&&(o=t.cm&&(t.cm.display.shift||t.extend)),ri(t,new xo([Zo(t.sel.primary(),e,n,o)],0),r)}function Jo(t,e,n){for(var r=[],o=t.cm&&(t.cm.display.shift||t.extend),i=0;i<t.sel.ranges.length;i++)r[i]=Zo(t.sel.ranges[i],e[i],null,o);ri(t,Ao(t.cm,r,t.sel.primIndex),n)}function ti(t,e,n,r){var o=t.sel.ranges.slice(0);o[e]=n,ri(t,Ao(t.cm,o,t.sel.primIndex),r)}function ei(t,e,n,r){ri(t,ko(e,n),r)}function ni(t,e,n){var r=t.history.done,o=Y(r);o&&o.ranges?(r[r.length-1]=e,oi(t,e,n)):ri(t,e,n)}function ri(t,e,n){oi(t,e,n),$o(t,t.sel,t.cm?t.cm.curOp.id:NaN,n)}function oi(t,e,n){(yt(t,"beforeSelectionChange")||t.cm&&yt(t.cm,"beforeSelectionChange"))&&(e=function(t,e,n){var r={ranges:e.ranges,update:function(e){this.ranges=[];for(var n=0;n<e.length;n++)this.ranges[n]=new Oo(le(t,e[n].anchor),le(t,e[n].head))},origin:n&&n.origin};return gt(t,"beforeSelectionChange",t,r),t.cm&>(t.cm,"beforeSelectionChange",t.cm,r),r.ranges!=e.ranges?Ao(t.cm,r.ranges,r.ranges.length-1):e}(t,e,n));var r=n&&n.bias||(ne(e.primary().head,t.sel.primary().head)<0?-1:1);ii(t,si(t,e,r,!0)),n&&!1===n.scroll||!t.cm||"nocursor"==t.cm.getOption("readOnly")||Lr(t.cm)}function ii(t,e){e.equals(t.sel)||(t.sel=e,t.cm&&(t.cm.curOp.updateInput=1,t.cm.curOp.selectionChanged=!0,vt(t.cm)),cn(t,"cursorActivity",t))}function ai(t){ii(t,si(t,t.sel,null,!1))}function si(t,e,n,r){for(var o,i=0;i<e.ranges.length;i++){var a=e.ranges[i],s=e.ranges.length==t.sel.ranges.length&&t.sel.ranges[i],l=ci(t,a.anchor,s&&s.anchor,n,r),c=a.head==a.anchor?l:ci(t,a.head,s&&s.head,n,r);(o||l!=a.anchor||c!=a.head)&&(o||(o=e.ranges.slice(0,i)),o[i]=new Oo(l,c))}return o?Ao(t.cm,o,e.primIndex):e}function li(t,e,n,r,o){var i=Wt(t,e.line);if(i.markedSpans)for(var a=0;a<i.markedSpans.length;++a){var s=i.markedSpans[a],l=s.marker,c="selectLeft"in l?!l.selectLeft:l.inclusiveLeft,u="selectRight"in l?!l.selectRight:l.inclusiveRight;if((null==s.from||(c?s.from<=e.ch:s.from<e.ch))&&(null==s.to||(u?s.to>=e.ch:s.to>e.ch))){if(o&&(gt(l,"beforeCursorEnter"),l.explicitlyCleared)){if(i.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var p=l.find(r<0?1:-1),d=void 0;if((r<0?u:c)&&(p=ui(t,p,-r,p&&p.line==e.line?i:null)),p&&p.line==e.line&&(d=ne(p,n))&&(r<0?d<0:d>0))return li(t,p,e,r,o)}var f=l.find(r<0?-1:1);return(r<0?c:u)&&(f=ui(t,f,r,f.line==e.line?i:null)),f?li(t,f,e,r,o):null}}return e}function ci(t,e,n,r,o){var i=r||1;return li(t,e,n,i,o)||!o&&li(t,e,n,i,!0)||li(t,e,n,-i,o)||!o&&li(t,e,n,-i,!0)||(t.cantEdit=!0,ee(t.first,0))}function ui(t,e,n,r){return n<0&&0==e.ch?e.line>t.first?le(t,ee(e.line-1)):null:n>0&&e.ch==(r||Wt(t,e.line)).text.length?e.line<t.first+t.size-1?ee(e.line+1,0):null:new ee(e.line,e.ch+n)}function pi(t){t.setSelection(ee(t.firstLine(),0),ee(t.lastLine()),z)}function di(t,e,n){var r={canceled:!1,from:e.from,to:e.to,text:e.text,origin:e.origin,cancel:function(){return r.canceled=!0}};return n&&(r.update=function(e,n,o,i){e&&(r.from=le(t,e)),n&&(r.to=le(t,n)),o&&(r.text=o),void 0!==i&&(r.origin=i)}),gt(t,"beforeChange",t,r),t.cm&>(t.cm,"beforeChange",t.cm,r),r.canceled?(t.cm&&(t.cm.curOp.updateInput=2),null):{from:r.from,to:r.to,text:r.text,origin:r.origin}}function fi(t,e,n){if(t.cm){if(!t.cm.curOp)return no(t.cm,fi)(t,e,n);if(t.cm.state.suppressEdits)return}if(!(yt(t,"beforeChange")||t.cm&&yt(t.cm,"beforeChange"))||(e=di(t,e,!0))){var r=Ce&&!n&&function(t,e,n){var r=null;if(t.iter(e.line,n.line+1,function(t){if(t.markedSpans)for(var e=0;e<t.markedSpans.length;++e){var n=t.markedSpans[e].marker;!n.readOnly||r&&-1!=V(r,n)||(r||(r=[])).push(n)}}),!r)return null;for(var o=[{from:e,to:n}],i=0;i<r.length;++i)for(var a=r[i],s=a.find(0),l=0;l<o.length;++l){var c=o[l];if(!(ne(c.to,s.from)<0||ne(c.from,s.to)>0)){var u=[l,1],p=ne(c.from,s.from),d=ne(c.to,s.to);(p<0||!a.inclusiveLeft&&!p)&&u.push({from:c.from,to:s.from}),(d>0||!a.inclusiveRight&&!d)&&u.push({from:s.to,to:c.to}),o.splice.apply(o,u),l+=u.length-3}}return o}(t,e.from,e.to);if(r)for(var o=r.length-1;o>=0;--o)hi(t,{from:r[o].from,to:r[o].to,text:o?[""]:e.text,origin:e.origin});else hi(t,e)}}function hi(t,e){if(1!=e.text.length||""!=e.text[0]||0!=ne(e.from,e.to)){var n=Mo(t,e);Go(t,e,n,t.cm?t.cm.curOp.id:NaN),vi(t,e,n,Oe(t,e));var r=[];Ho(t,function(t,n){n||-1!=V(r,t.history)||(Ti(t.history,e),r.push(t.history)),vi(t,e,null,Oe(t,e))})}}function gi(t,e,n){var r=t.cm&&t.cm.state.suppressEdits;if(!r||n){for(var o,i=t.history,a=t.sel,s="undo"==e?i.done:i.undone,l="undo"==e?i.undone:i.done,c=0;c<s.length&&(o=s[c],n?!o.ranges||o.equals(t.sel):o.ranges);c++);if(c!=s.length){for(i.lastOrigin=i.lastSelOrigin=null;;){if(!(o=s.pop()).ranges){if(r)return void s.push(o);break}if(qo(o,l),n&&!o.equals(t.sel))return void ri(t,o,{clearRedo:!1});a=o}var u=[];qo(a,l),l.push({changes:u,generation:i.generation}),i.generation=o.generation||++i.maxGeneration;for(var p=yt(t,"beforeChange")||t.cm&&yt(t.cm,"beforeChange"),d=function(n){var r=o.changes[n];if(r.origin=e,p&&!di(t,r,!1))return s.length=0,{};u.push(Uo(t,r));var i=n?Mo(t,r):Y(s);vi(t,r,i,Yo(t,r)),!n&&t.cm&&t.cm.scrollIntoView({from:r.from,to:Po(r)});var a=[];Ho(t,function(t,e){e||-1!=V(a,t.history)||(Ti(t.history,r),a.push(t.history)),vi(t,r,null,Yo(t,r))})},f=o.changes.length-1;f>=0;--f){var h=d(f);if(h)return h.v}}}}function mi(t,e){if(0!=e&&(t.first+=e,t.sel=new xo(X(t.sel.ranges,function(t){return new Oo(ee(t.anchor.line+e,t.anchor.ch),ee(t.head.line+e,t.head.ch))}),t.sel.primIndex),t.cm)){fr(t.cm,t.first,t.first-e,e);for(var n=t.cm.display,r=n.viewFrom;r<n.viewTo;r++)hr(t.cm,r,"gutter")}}function vi(t,e,n,r){if(t.cm&&!t.cm.curOp)return no(t.cm,vi)(t,e,n,r);if(e.to.line<t.first)mi(t,e.text.length-1-(e.to.line-e.from.line));else if(!(e.from.line>t.lastLine())){if(e.from.line<t.first){var o=e.text.length-1-(t.first-e.from.line);mi(t,o),e={from:ee(t.first,0),to:ee(e.to.line+o,e.to.ch),text:[Y(e.text)],origin:e.origin}}var i=t.lastLine();e.to.line>i&&(e={from:e.from,to:ee(i,Wt(t,i).text.length),text:[e.text[0]],origin:e.origin}),e.removed=Kt(t,e.from,e.to),n||(n=Mo(t,e)),t.cm?function(t,e,n){var r=t.doc,o=t.display,i=e.from,a=e.to,s=!1,l=i.line;t.options.lineWrapping||(l=Zt(Fe(Wt(r,i.line))),r.iter(l,a.line+1,function(t){if(t==o.maxLine)return s=!0,!0})),r.sel.contains(e.from,e.to)>-1&&vt(t),jo(r,e,n,cr(t)),t.options.lineWrapping||(r.iter(l,i.line+e.text.length,function(t){var e=$e(t);e>o.maxLineLength&&(o.maxLine=t,o.maxLineLength=e,o.maxLineChanged=!0,s=!1)}),s&&(t.curOp.updateMaxLine=!0)),function(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontier<e-10)){for(var n=t.first,r=e-1;r>n;r--){var o=Wt(t,r).stateAfter;if(o&&(!(o instanceof ue)||r+o.lookAhead<e)){n=r+1;break}}t.highlightFrontier=Math.min(t.highlightFrontier,n)}}(r,i.line),io(t,400);var c=e.text.length-(a.line-i.line)-1;e.full?fr(t):i.line!=a.line||1!=e.text.length||Ro(t.doc,e)?fr(t,i.line,a.line+1,c):hr(t,i.line,"text");var u=yt(t,"changes"),p=yt(t,"change");if(p||u){var d={from:i,to:a,text:e.text,removed:e.removed,origin:e.origin};p&&cn(t,"change",t,d),u&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(d)}t.display.selForContextMenu=null}(t.cm,e,r):jo(t,e,r),oi(t,n,z),t.cantEdit&&ci(t,ee(t.firstLine(),0))&&(t.cantEdit=!1)}}function yi(t,e,n,r,o){var i;r||(r=n),ne(r,n)<0&&(n=(i=[r,n])[0],r=i[1]),"string"==typeof e&&(e=t.splitLines(e)),fi(t,{from:n,to:r,text:e,origin:o})}function bi(t,e,n,r){n<t.line?t.line+=r:e<t.line&&(t.line=e,t.ch=0)}function _i(t,e,n,r){for(var o=0;o<t.length;++o){var i=t[o],a=!0;if(i.ranges){i.copied||((i=t[o]=i.deepCopy()).copied=!0);for(var s=0;s<i.ranges.length;s++)bi(i.ranges[s].anchor,e,n,r),bi(i.ranges[s].head,e,n,r)}else{for(var l=0;l<i.changes.length;++l){var c=i.changes[l];if(n<c.from.line)c.from=ee(c.from.line+r,c.from.ch),c.to=ee(c.to.line+r,c.to.ch);else if(e<=c.to.line){a=!1;break}}a||(t.splice(0,o+1),o=0)}}}function Ti(t,e){var n=e.from.line,r=e.to.line,o=e.text.length-(r-n)-1;_i(t.done,n,r,o),_i(t.undone,n,r,o)}function Ci(t,e,n,r){var o=e,i=e;return"number"==typeof e?i=Wt(t,se(t,e)):o=Zt(e),null==o?null:(r(i,o)&&t.cm&&hr(t.cm,o,n),i)}function wi(t){this.lines=t,this.parent=null;for(var e=0,n=0;n<t.length;++n)t[n].parent=this,e+=t[n].height;this.height=e}function Ei(t){this.children=t;for(var e=0,n=0,r=0;r<t.length;++r){var o=t[r];e+=o.chunkSize(),n+=o.height,o.parent=this}this.size=e,this.height=n,this.parent=null}Oo.prototype.from=function(){return ae(this.anchor,this.head)},Oo.prototype.to=function(){return ie(this.anchor,this.head)},Oo.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},wi.prototype={chunkSize:function(){return this.lines.length},removeInner:function(t,e){for(var n=t,r=t+e;n<r;++n){var o=this.lines[n];this.height-=o.height,Ke(o),cn(o,"delete")}this.lines.splice(t,e)},collapse:function(t){t.push.apply(t,this.lines)},insertInner:function(t,e,n){this.height+=n,this.lines=this.lines.slice(0,t).concat(e).concat(this.lines.slice(t));for(var r=0;r<e.length;++r)e[r].parent=this},iterN:function(t,e,n){for(var r=t+e;t<r;++t)if(n(this.lines[t]))return!0}},Ei.prototype={chunkSize:function(){return this.size},removeInner:function(t,e){this.size-=e;for(var n=0;n<this.children.length;++n){var r=this.children[n],o=r.chunkSize();if(t<o){var i=Math.min(e,o-t),a=r.height;if(r.removeInner(t,i),this.height-=a-r.height,o==i&&(this.children.splice(n--,1),r.parent=null),0==(e-=i))break;t=0}else t-=o}if(this.size-e<25&&(this.children.length>1||!(this.children[0]instanceof wi))){var s=[];this.collapse(s),this.children=[new wi(s)],this.children[0].parent=this}},collapse:function(t){for(var e=0;e<this.children.length;++e)this.children[e].collapse(t)},insertInner:function(t,e,n){this.size+=e.length,this.height+=n;for(var r=0;r<this.children.length;++r){var o=this.children[r],i=o.chunkSize();if(t<=i){if(o.insertInner(t,e,n),o.lines&&o.lines.length>50){for(var a=o.lines.length%25+25,s=a;s<o.lines.length;){var l=new wi(o.lines.slice(s,s+=25));o.height-=l.height,this.children.splice(++r,0,l),l.parent=this}o.lines=o.lines.slice(0,a),this.maybeSpill()}break}t-=i}},maybeSpill:function(){if(!(this.children.length<=10)){var t=this;do{var e=new Ei(t.children.splice(t.children.length-5,5));if(t.parent){t.size-=e.size,t.height-=e.height;var n=V(t.parent.children,t);t.parent.children.splice(n+1,0,e)}else{var r=new Ei(t.children);r.parent=t,t.children=[r,e],t=r}e.parent=t.parent}while(t.children.length>10);t.parent.maybeSpill()}},iterN:function(t,e,n){for(var r=0;r<this.children.length;++r){var o=this.children[r],i=o.chunkSize();if(t<i){var a=Math.min(e,i-t);if(o.iterN(t,a,n))return!0;if(0==(e-=a))break;t=0}else t-=i}}};var Si=function(t,e,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=t,this.node=e};function xi(t,e,n){Ge(e)<(t.curOp&&t.curOp.scrollTop||t.doc.scrollTop)&&Mr(t,n)}Si.prototype.clear=function(){var t=this.doc.cm,e=this.line.widgets,n=this.line,r=Zt(n);if(null!=r&&e){for(var o=0;o<e.length;++o)e[o]==this&&e.splice(o--,1);e.length||(n.widgets=null);var i=Cn(this);Xt(n,Math.max(0,n.height-i)),t&&(eo(t,function(){xi(t,n,-i),hr(t,r,"widget")}),cn(t,"lineWidgetCleared",t,this,r))}},Si.prototype.changed=function(){var t=this,e=this.height,n=this.doc.cm,r=this.line;this.height=null;var o=Cn(this)-e;o&&(Ue(this.doc,r)||Xt(r,r.height+o),n&&eo(n,function(){n.curOp.forceUpdate=!0,xi(n,r,o),cn(n,"lineWidgetChanged",n,t,Zt(r))}))},bt(Si);var Oi=0,Ai=function(t,e){this.lines=[],this.type=e,this.doc=t,this.id=++Oi};function ki(t,e,n,r,o){if(r&&r.shared)return function(t,e,n,r,o){(r=H(r)).shared=!1;var i=[ki(t,e,n,r,o)],a=i[0],s=r.widgetNode;return Ho(t,function(t){s&&(r.widgetNode=s.cloneNode(!0)),i.push(ki(t,le(t,e),le(t,n),r,o));for(var l=0;l<t.linked.length;++l)if(t.linked[l].isParent)return;a=Y(i)}),new Pi(i,a)}(t,e,n,r,o);if(t.cm&&!t.cm.curOp)return no(t.cm,ki)(t,e,n,r,o);var i=new Ai(t,o),a=ne(e,n);if(r&&H(r,i,!1),a>0||0==a&&!1!==i.clearWhenEmpty)return i;if(i.replacedWith&&(i.collapsed=!0,i.widgetNode=N("span",[i.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||i.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(i.widgetNode.insertLeft=!0)),i.collapsed){if(He(t,e.line,e,n,i)||e.line!=n.line&&He(t,n.line,e,n,i))throw new Error("Inserting collapsed marker partially overlapping an existing one");we=!0}i.addToHistory&&Go(t,{from:e,to:n,origin:"markText"},t.sel,NaN);var s,l=e.line,c=t.cm;if(t.iter(l,n.line+1,function(r){c&&i.collapsed&&!c.options.lineWrapping&&Fe(r)==c.display.maxLine&&(s=!0),i.collapsed&&l!=e.line&&Xt(r,0),function(t,e,n){var r=n&&window.WeakSet&&(n.markedSpans||(n.markedSpans=new WeakSet));r&&t.markedSpans&&r.has(t.markedSpans)?t.markedSpans.push(e):(t.markedSpans=t.markedSpans?t.markedSpans.concat([e]):[e],r&&r.add(t.markedSpans)),e.marker.attachLine(t)}(r,new Ee(i,l==e.line?e.ch:null,l==n.line?n.ch:null),t.cm&&t.cm.curOp),++l}),i.collapsed&&t.iter(e.line,n.line+1,function(e){Ue(t,e)&&Xt(e,0)}),i.clearOnEnter&&dt(i,"beforeCursorEnter",function(){return i.clear()}),i.readOnly&&(Ce=!0,(t.history.done.length||t.history.undone.length)&&t.clearHistory()),i.collapsed&&(i.id=++Oi,i.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),i.collapsed)fr(c,e.line,n.line+1);else if(i.className||i.startStyle||i.endStyle||i.css||i.attributes||i.title)for(var u=e.line;u<=n.line;u++)hr(c,u,"text");i.atomic&&ai(c.doc),cn(c,"markerAdded",c,i)}return i}Ai.prototype.clear=function(){if(!this.explicitlyCleared){var t=this.doc.cm,e=t&&!t.curOp;if(e&&Kr(t),yt(this,"clear")){var n=this.find();n&&cn(this,"clear",n.from,n.to)}for(var r=null,o=null,i=0;i<this.lines.length;++i){var a=this.lines[i],s=Se(a.markedSpans,this);t&&!this.collapsed?hr(t,Zt(a),"text"):t&&(null!=s.to&&(o=Zt(a)),null!=s.from&&(r=Zt(a))),a.markedSpans=xe(a.markedSpans,s),null==s.from&&this.collapsed&&!Ue(this.doc,a)&&t&&Xt(a,ir(t.display))}if(t&&this.collapsed&&!t.options.lineWrapping)for(var l=0;l<this.lines.length;++l){var c=Fe(this.lines[l]),u=$e(c);u>t.display.maxLineLength&&(t.display.maxLine=c,t.display.maxLineLength=u,t.display.maxLineChanged=!0)}null!=r&&t&&this.collapsed&&fr(t,r,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&ai(t.doc)),t&&cn(t,"markerCleared",t,this,r,o),e&&Yr(t),this.parent&&this.parent.clear()}},Ai.prototype.find=function(t,e){var n,r;null==t&&"bookmark"==this.type&&(t=1);for(var o=0;o<this.lines.length;++o){var i=this.lines[o],a=Se(i.markedSpans,this);if(null!=a.from&&(n=ee(e?i:Zt(i),a.from),-1==t))return n;if(null!=a.to&&(r=ee(e?i:Zt(i),a.to),1==t))return r}return n&&{from:n,to:r}},Ai.prototype.changed=function(){var t=this,e=this.find(-1,!0),n=this,r=this.doc.cm;e&&r&&eo(r,function(){var o=e.line,i=Zt(e.line),a=Mn(r,i);if(a&&(Bn(a),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!Ue(n.doc,o)&&null!=n.height){var s=n.height;n.height=null;var l=Cn(n)-s;l&&Xt(o,o.height+l)}cn(r,"markerChanged",r,t)})},Ai.prototype.attachLine=function(t){if(!this.lines.length&&this.doc.cm){var e=this.doc.cm.curOp;e.maybeHiddenMarkers&&-1!=V(e.maybeHiddenMarkers,this)||(e.maybeUnhiddenMarkers||(e.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(t)},Ai.prototype.detachLine=function(t){if(this.lines.splice(V(this.lines,t),1),!this.lines.length&&this.doc.cm){var e=this.doc.cm.curOp;(e.maybeHiddenMarkers||(e.maybeHiddenMarkers=[])).push(this)}},bt(Ai);var Pi=function(t,e){this.markers=t,this.primary=e;for(var n=0;n<t.length;++n)t[n].parent=this};function Ni(t){return t.findMarks(ee(t.first,0),t.clipPos(ee(t.lastLine())),function(t){return t.parent})}function Mi(t){for(var e=function(e){var n=t[e],r=[n.primary.doc];Ho(n.primary.doc,function(t){return r.push(t)});for(var o=0;o<n.markers.length;o++){var i=n.markers[o];-1==V(r,i.doc)&&(i.parent=null,n.markers.splice(o--,1))}},n=0;n<t.length;n++)e(n)}Pi.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var t=0;t<this.markers.length;++t)this.markers[t].clear();cn(this,"clear")}},Pi.prototype.find=function(t,e){return this.primary.find(t,e)},bt(Pi);var Li=0,Ii=function(t,e,n,r,o){if(!(this instanceof Ii))return new Ii(t,e,n,r,o);null==n&&(n=0),Ei.call(this,[new wi([new We("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var i=ee(n,0);this.sel=ko(i),this.history=new Vo(null),this.id=++Li,this.modeOption=e,this.lineSep=r,this.direction="rtl"==o?"rtl":"ltr",this.extend=!1,"string"==typeof t&&(t=this.splitLines(t)),jo(this,{from:i,to:i,text:t}),ri(this,ko(i),z)};Ii.prototype=Q(Ei.prototype,{constructor:Ii,iter:function(t,e,n){n?this.iterN(t-this.first,e-t,n):this.iterN(this.first,this.first+this.size,t)},insert:function(t,e){for(var n=0,r=0;r<e.length;++r)n+=e[r].height;this.insertInner(t-this.first,e,n)},remove:function(t,e){this.removeInner(t-this.first,e)},getValue:function(t){var e=Yt(this,this.first,this.first+this.size);return!1===t?e:e.join(t||this.lineSeparator())},setValue:oo(function(t){var e=ee(this.first,0),n=this.first+this.size-1;fi(this,{from:e,to:ee(n,Wt(this,n).text.length),text:this.splitLines(t),origin:"setValue",full:!0},!0),this.cm&&Ir(this.cm,0,0),ri(this,ko(e),z)}),replaceRange:function(t,e,n,r){yi(this,t,e=le(this,e),n=n?le(this,n):e,r)},getRange:function(t,e,n){var r=Kt(this,le(this,t),le(this,e));return!1===n?r:""===n?r.join(""):r.join(n||this.lineSeparator())},getLine:function(t){var e=this.getLineHandle(t);return e&&e.text},getLineHandle:function(t){if(Jt(this,t))return Wt(this,t)},getLineNumber:function(t){return Zt(t)},getLineHandleVisualStart:function(t){return"number"==typeof t&&(t=Wt(this,t)),Fe(t)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(t){return le(this,t)},getCursor:function(t){var e=this.sel.primary();return null==t||"head"==t?e.head:"anchor"==t?e.anchor:"end"==t||"to"==t||!1===t?e.to():e.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:oo(function(t,e,n){ei(this,le(this,"number"==typeof t?ee(t,e||0):t),null,n)}),setSelection:oo(function(t,e,n){ei(this,le(this,t),le(this,e||t),n)}),extendSelection:oo(function(t,e,n){Qo(this,le(this,t),e&&le(this,e),n)}),extendSelections:oo(function(t,e){Jo(this,ce(this,t),e)}),extendSelectionsBy:oo(function(t,e){Jo(this,ce(this,X(this.sel.ranges,t)),e)}),setSelections:oo(function(t,e,n){if(t.length){for(var r=[],o=0;o<t.length;o++)r[o]=new Oo(le(this,t[o].anchor),le(this,t[o].head||t[o].anchor));null==e&&(e=Math.min(t.length-1,this.sel.primIndex)),ri(this,Ao(this.cm,r,e),n)}}),addSelection:oo(function(t,e,n){var r=this.sel.ranges.slice(0);r.push(new Oo(le(this,t),le(this,e||t))),ri(this,Ao(this.cm,r,r.length-1),n)}),getSelection:function(t){for(var e,n=this.sel.ranges,r=0;r<n.length;r++){var o=Kt(this,n[r].from(),n[r].to());e=e?e.concat(o):o}return!1===t?e:e.join(t||this.lineSeparator())},getSelections:function(t){for(var e=[],n=this.sel.ranges,r=0;r<n.length;r++){var o=Kt(this,n[r].from(),n[r].to());!1!==t&&(o=o.join(t||this.lineSeparator())),e[r]=o}return e},replaceSelection:function(t,e,n){for(var r=[],o=0;o<this.sel.ranges.length;o++)r[o]=t;this.replaceSelections(r,e,n||"+input")},replaceSelections:oo(function(t,e,n){for(var r=[],o=this.sel,i=0;i<o.ranges.length;i++){var a=o.ranges[i];r[i]={from:a.from(),to:a.to(),text:this.splitLines(t[i]),origin:n}}for(var s=e&&"end"!=e&&function(t,e,n){for(var r=[],o=ee(t.first,0),i=o,a=0;a<e.length;a++){var s=e[a],l=Lo(s.from,o,i),c=Lo(Po(s),o,i);if(o=s.to,i=c,"around"==n){var u=t.sel.ranges[a],p=ne(u.head,u.anchor)<0;r[a]=new Oo(p?c:l,p?l:c)}else r[a]=new Oo(l,l)}return new xo(r,t.sel.primIndex)}(this,r,e),l=r.length-1;l>=0;l--)fi(this,r[l]);s?ni(this,s):this.cm&&Lr(this.cm)}),undo:oo(function(){gi(this,"undo")}),redo:oo(function(){gi(this,"redo")}),undoSelection:oo(function(){gi(this,"undo",!0)}),redoSelection:oo(function(){gi(this,"redo",!0)}),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,e=0,n=0,r=0;r<t.done.length;r++)t.done[r].ranges||++e;for(var o=0;o<t.undone.length;o++)t.undone[o].ranges||++n;return{undo:e,redo:n}},clearHistory:function(){var t=this;this.history=new Vo(this.history),Ho(this,function(e){return e.history=t.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(t){return t&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(t){return this.history.generation==(t||this.cleanGeneration)},getHistory:function(){return{done:Xo(this.history.done),undone:Xo(this.history.undone)}},setHistory:function(t){var e=this.history=new Vo(this.history);e.done=Xo(t.done.slice(0),null,!0),e.undone=Xo(t.undone.slice(0),null,!0)},setGutterMarker:oo(function(t,e,n){return Ci(this,t,"gutter",function(t){var r=t.gutterMarkers||(t.gutterMarkers={});return r[e]=n,!n&&nt(r)&&(t.gutterMarkers=null),!0})}),clearGutter:oo(function(t){var e=this;this.iter(function(n){n.gutterMarkers&&n.gutterMarkers[t]&&Ci(e,n,"gutter",function(){return n.gutterMarkers[t]=null,nt(n.gutterMarkers)&&(n.gutterMarkers=null),!0})})}),lineInfo:function(t){var e;if("number"==typeof t){if(!Jt(this,t))return null;if(e=t,!(t=Wt(this,t)))return null}else if(null==(e=Zt(t)))return null;return{line:e,handle:t,text:t.text,gutterMarkers:t.gutterMarkers,textClass:t.textClass,bgClass:t.bgClass,wrapClass:t.wrapClass,widgets:t.widgets}},addLineClass:oo(function(t,e,n){return Ci(this,t,"gutter"==e?"gutter":"class",function(t){var r="text"==e?"textClass":"background"==e?"bgClass":"gutter"==e?"gutterClass":"wrapClass";if(t[r]){if(S(n).test(t[r]))return!1;t[r]+=" "+n}else t[r]=n;return!0})}),removeLineClass:oo(function(t,e,n){return Ci(this,t,"gutter"==e?"gutter":"class",function(t){var r="text"==e?"textClass":"background"==e?"bgClass":"gutter"==e?"gutterClass":"wrapClass",o=t[r];if(!o)return!1;if(null==n)t[r]=null;else{var i=o.match(S(n));if(!i)return!1;var a=i.index+i[0].length;t[r]=o.slice(0,i.index)+(i.index&&a!=o.length?" ":"")+o.slice(a)||null}return!0})}),addLineWidget:oo(function(t,e,n){return function(t,e,n,r){var o=new Si(t,n,r),i=t.cm;return i&&o.noHScroll&&(i.display.alignWidgets=!0),Ci(t,e,"widget",function(e){var n=e.widgets||(e.widgets=[]);if(null==o.insertAt?n.push(o):n.splice(Math.min(n.length,Math.max(0,o.insertAt)),0,o),o.line=e,i&&!Ue(t,e)){var r=Ge(e)<t.scrollTop;Xt(e,e.height+Cn(o)),r&&Mr(i,o.height),i.curOp.forceUpdate=!0}return!0}),i&&cn(i,"lineWidgetAdded",i,o,"number"==typeof e?e:Zt(e)),o}(this,t,e,n)}),removeLineWidget:function(t){t.clear()},markText:function(t,e,n){return ki(this,le(this,t),le(this,e),n,n&&n.type||"range")},setBookmark:function(t,e){var n={replacedWith:e&&(null==e.nodeType?e.widget:e),insertLeft:e&&e.insertLeft,clearWhenEmpty:!1,shared:e&&e.shared,handleMouseEvents:e&&e.handleMouseEvents};return ki(this,t=le(this,t),t,n,"bookmark")},findMarksAt:function(t){var e=[],n=Wt(this,(t=le(this,t)).line).markedSpans;if(n)for(var r=0;r<n.length;++r){var o=n[r];(null==o.from||o.from<=t.ch)&&(null==o.to||o.to>=t.ch)&&e.push(o.marker.parent||o.marker)}return e},findMarks:function(t,e,n){t=le(this,t),e=le(this,e);var r=[],o=t.line;return this.iter(t.line,e.line+1,function(i){var a=i.markedSpans;if(a)for(var s=0;s<a.length;s++){var l=a[s];null!=l.to&&o==t.line&&t.ch>=l.to||null==l.from&&o!=t.line||null!=l.from&&o==e.line&&l.from>=e.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++o}),r},getAllMarks:function(){var t=[];return this.iter(function(e){var n=e.markedSpans;if(n)for(var r=0;r<n.length;++r)null!=n[r].from&&t.push(n[r].marker)}),t},posFromIndex:function(t){var e,n=this.first,r=this.lineSeparator().length;return this.iter(function(o){var i=o.text.length+r;if(i>t)return e=t,!0;t-=i,++n}),le(this,ee(n,e))},indexFromPos:function(t){var e=(t=le(this,t)).ch;if(t.line<this.first||t.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,t.line,function(t){e+=t.text.length+n}),e},copy:function(t){var e=new Ii(Yt(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return e.scrollTop=this.scrollTop,e.scrollLeft=this.scrollLeft,e.sel=this.sel,e.extend=!1,t&&(e.history.undoDepth=this.history.undoDepth,e.setHistory(this.getHistory())),e},linkedDoc:function(t){t||(t={});var e=this.first,n=this.first+this.size;null!=t.from&&t.from>e&&(e=t.from),null!=t.to&&t.to<n&&(n=t.to);var r=new Ii(Yt(this,e,n),t.mode||this.modeOption,e,this.lineSep,this.direction);return t.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:t.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:t.sharedHist}],function(t,e){for(var n=0;n<e.length;n++){var r=e[n],o=r.find(),i=t.clipPos(o.from),a=t.clipPos(o.to);if(ne(i,a)){var s=ki(t,i,a,r.primary,r.primary.type);r.markers.push(s),s.parent=r}}}(r,Ni(this)),r},unlinkDoc:function(t){if(t instanceof Na&&(t=t.doc),this.linked)for(var e=0;e<this.linked.length;++e)if(this.linked[e].doc==t){this.linked.splice(e,1),t.unlinkDoc(this),Mi(Ni(this));break}if(t.history==this.history){var n=[t.id];Ho(t,function(t){return n.push(t.id)},!0),t.history=new Vo(null),t.history.done=Xo(this.history.done,n),t.history.undone=Xo(this.history.undone,n)}},iterLinkedDocs:function(t){Ho(this,t)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(t){return this.lineSep?t.split(this.lineSep):Mt(t)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:oo(function(t){"rtl"!=t&&(t="ltr"),t!=this.direction&&(this.direction=t,this.iter(function(t){return t.order=null}),this.cm&&function(t){eo(t,function(){Bo(t),fr(t)})}(this.cm))})}),Ii.prototype.eachLine=Ii.prototype.iter;var Di=0;function Ri(t){var e=this;if(ji(e),!mt(e,t)&&!wn(e.display,t)){_t(t),a&&(Di=+new Date);var n=pr(e,t,!0),r=t.dataTransfer.files;if(n&&!e.isReadOnly())if(r&&r.length&&window.FileReader&&window.File)for(var o=r.length,i=Array(o),s=0,l=function(){++s==o&&no(e,function(){var t={from:n=le(e.doc,n),to:n,text:e.doc.splitLines(i.filter(function(t){return null!=t}).join(e.doc.lineSeparator())),origin:"paste"};fi(e.doc,t),ni(e.doc,ko(le(e.doc,n),le(e.doc,Po(t))))})()},c=function(t,n){if(e.options.allowDropFileTypes&&-1==V(e.options.allowDropFileTypes,t.type))l();else{var r=new FileReader;r.onerror=function(){return l()},r.onload=function(){var t=r.result;/[\x00-\x08\x0e-\x1f]{2}/.test(t)||(i[n]=t),l()},r.readAsText(t)}},u=0;u<r.length;u++)c(r[u],u);else{if(e.state.draggingText&&e.doc.sel.contains(n)>-1)return e.state.draggingText(t),void setTimeout(function(){return e.display.input.focus()},20);try{var p=t.dataTransfer.getData("Text");if(p){var d;if(e.state.draggingText&&!e.state.draggingText.copy&&(d=e.listSelections()),oi(e.doc,ko(n,n)),d)for(var f=0;f<d.length;++f)yi(e.doc,"",d[f].anchor,d[f].head,"drag");e.replaceSelection(p,"around","paste"),e.display.input.focus()}}catch(t){}}}}function ji(t){t.display.dragCursor&&(t.display.lineSpace.removeChild(t.display.dragCursor),t.display.dragCursor=null)}function Hi(t){if(document.getElementsByClassName){for(var e=document.getElementsByClassName("CodeMirror"),n=[],r=0;r<e.length;r++){var o=e[r].CodeMirror;o&&n.push(o)}n.length&&n[0].operation(function(){for(var e=0;e<n.length;e++)t(n[e])})}}var Fi=!1;function Bi(){Fi||(function(){var t;dt(window,"resize",function(){null==t&&(t=setTimeout(function(){t=null,Hi(Vi)},100))}),dt(window,"blur",function(){return Hi(Or)})}(),Fi=!0)}function Vi(t){var e=t.display;e.cachedCharWidth=e.cachedTextHeight=e.cachedPaddingH=null,e.scrollbarsClipped=!1,t.setSize()}for(var Ui={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},zi=0;zi<10;zi++)Ui[zi+48]=Ui[zi+96]=String(zi);for(var Gi=65;Gi<=90;Gi++)Ui[Gi]=String.fromCharCode(Gi);for(var $i=1;$i<=12;$i++)Ui[$i+111]=Ui[$i+63235]="F"+$i;var qi={};function Wi(t){var e,n,r,o,i=t.split(/-(?!$)/);t=i[i.length-1];for(var a=0;a<i.length-1;a++){var s=i[a];if(/^(cmd|meta|m)$/i.test(s))o=!0;else if(/^a(lt)?$/i.test(s))e=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else{if(!/^s(hift)?$/i.test(s))throw new Error("Unrecognized modifier name: "+s);r=!0}}return e&&(t="Alt-"+t),n&&(t="Ctrl-"+t),o&&(t="Cmd-"+t),r&&(t="Shift-"+t),t}function Ki(t){var e={};for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete t[n];continue}for(var o=X(n.split(" "),Wi),i=0;i<o.length;i++){var a=void 0,s=void 0;i==o.length-1?(s=o.join(" "),a=r):(s=o.slice(0,i+1).join(" "),a="...");var l=e[s];if(l){if(l!=a)throw new Error("Inconsistent bindings for "+s)}else e[s]=a}delete t[n]}for(var c in e)t[c]=e[c];return t}function Yi(t,e,n,r){var o=(e=Ji(e)).call?e.call(t,r):e[t];if(!1===o)return"nothing";if("..."===o)return"multi";if(null!=o&&n(o))return"handled";if(e.fallthrough){if("[object Array]"!=Object.prototype.toString.call(e.fallthrough))return Yi(t,e.fallthrough,n,r);for(var i=0;i<e.fallthrough.length;i++){var a=Yi(t,e.fallthrough[i],n,r);if(a)return a}}}function Xi(t){var e="string"==typeof t?t:Ui[t.keyCode];return"Ctrl"==e||"Alt"==e||"Shift"==e||"Mod"==e}function Zi(t,e,n){var r=t;return e.altKey&&"Alt"!=r&&(t="Alt-"+t),(w?e.metaKey:e.ctrlKey)&&"Ctrl"!=r&&(t="Ctrl-"+t),(w?e.ctrlKey:e.metaKey)&&"Mod"!=r&&(t="Cmd-"+t),!n&&e.shiftKey&&"Shift"!=r&&(t="Shift-"+t),t}function Qi(t,e){if(d&&34==t.keyCode&&t.char)return!1;var n=Ui[t.keyCode];return null!=n&&!t.altGraphKey&&(3==t.keyCode&&t.code&&(n=t.code),Zi(n,t,e))}function Ji(t){return"string"==typeof t?qi[t]:t}function ta(t,e){for(var n=t.doc.sel.ranges,r=[],o=0;o<n.length;o++){for(var i=e(n[o]);r.length&&ne(i.from,Y(r).to)<=0;){var a=r.pop();if(ne(a.from,i.from)<0){i.from=a.from;break}}r.push(i)}eo(t,function(){for(var e=r.length-1;e>=0;e--)yi(t.doc,"",r[e].from,r[e].to,"+delete");Lr(t)})}function ea(t,e,n){var r=it(t.text,e+n,n);return r<0||r>t.text.length?null:r}function na(t,e,n){var r=ea(t,e.ch,n);return null==r?null:new ee(e.line,r,n<0?"after":"before")}function ra(t,e,n,r,o){if(t){"rtl"==e.doc.direction&&(o=-o);var i=ut(n,e.doc.direction);if(i){var a,s=o<0?Y(i):i[0],l=o<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==e.doc.direction){var c=Ln(e,n);a=o<0?n.text.length-1:0;var u=In(e,c,a).top;a=at(function(t){return In(e,c,t).top==u},o<0==(1==s.level)?s.from:s.to-1,a),"before"==l&&(a=ea(n,a,1))}else a=o<0?s.to:s.from;return new ee(r,a,l)}}return new ee(r,o<0?n.text.length:0,o<0?"before":"after")}qi.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},qi.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},qi.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},qi.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},qi.default=b?qi.macDefault:qi.pcDefault;var oa={selectAll:pi,singleSelection:function(t){return t.setSelection(t.getCursor("anch
1or"),t.getCursor("head"),z)},killLine:function(t){return ta(t,function(e){if(e.empty()){var n=Wt(t.doc,e.head.line).text.length;return e.head.ch==n&&e.head.line<t.lastLine()?{from:e.head,to:ee(e.head.line+1,0)}:{from:e.head,to:ee(e.head.line,n)}}return{from:e.from(),to:e.to()}})},deleteLine:function(t){return ta(t,function(e){return{from:ee(e.from().line,0),to:le(t.doc,ee(e.to().line+1,0))}})},delLineLeft:function(t){return ta(t,function(t){return{from:ee(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(t){return ta(t,function(e){var n=t.charCoords(e.head,"div").top+5;return{from:t.coordsChar({left:0,top:n},"div"),to:e.from()}})},delWrappedLineRight:function(t){return ta(t,function(e){var n=t.charCoords(e.head,"div").top+5,r=t.coordsChar({left:t.display.lineDiv.offsetWidth+100,top:n},"div");return{from:e.from(),to:r}})},undo:function(t){return t.undo()},redo:function(t){return t.redo()},undoSelection:function(t){return t.undoSelection()},redoSelection:function(t){return t.redoSelection()},goDocStart:function(t){return t.extendSelection(ee(t.firstLine(),0))},goDocEnd:function(t){return t.extendSelection(ee(t.lastLine()))},goLineStart:function(t){return t.extendSelectionsBy(function(e){return ia(t,e.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(t){return t.extendSelectionsBy(function(e){return aa(t,e.head)},{origin:"+move",bias:1})},goLineEnd:function(t){return t.extendSelectionsBy(function(e){return function(t,e){var n=Wt(t.doc,e),r=function(t){for(var e;e=Re(t);)t=e.find(1,!0).line;return t}(n);return r!=n&&(e=Zt(r)),ra(!0,t,n,e,-1)}(t,e.head.line)},{origin:"+move",bias:-1})},goLineRight:function(t){return t.extendSelectionsBy(function(e){var n=t.cursorCoords(e.head,"div").top+5;return t.coordsChar({left:t.display.lineDiv.offsetWidth+100,top:n},"div")},$)},goLineLeft:function(t){return t.extendSelectionsBy(function(e){var n=t.cursorCoords(e.head,"div").top+5;return t.coordsChar({left:0,top:n},"div")},$)},goLineLeftSmart:function(t){return t.extendSelectionsBy(function(e){var n=t.cursorCoords(e.head,"div").top+5,r=t.coordsChar({left:0,top:n},"div");return r.ch<t.getLine(r.line).search(/\S/)?aa(t,e.head):r},$)},goLineUp:function(t){return t.moveV(-1,"line")},goLineDown:function(t){return t.moveV(1,"line")},goPageUp:function(t){return t.moveV(-1,"page")},goPageDown:function(t){return t.moveV(1,"page")},goCharLeft:function(t){return t.moveH(-1,"char")},goCharRight:function(t){return t.moveH(1,"char")},goColumnLeft:function(t){return t.moveH(-1,"column")},goColumnRight:function(t){return t.moveH(1,"column")},goWordLeft:function(t){return t.moveH(-1,"word")},goGroupRight:function(t){return t.moveH(1,"group")},goGroupLeft:function(t){return t.moveH(-1,"group")},goWordRight:function(t){return t.moveH(1,"word")},delCharBefore:function(t){return t.deleteH(-1,"codepoint")},delCharAfter:function(t){return t.deleteH(1,"char")},delWordBefore:function(t){return t.deleteH(-1,"word")},delWordAfter:function(t){return t.deleteH(1,"word")},delGroupBefore:function(t){return t.deleteH(-1,"group")},delGroupAfter:function(t){return t.deleteH(1,"group")},indentAuto:function(t){return t.indentSelection("smart")},indentMore:function(t){return t.indentSelection("add")},indentLess:function(t){return t.indentSelection("subtract")},insertTab:function(t){return t.replaceSelection("\t")},insertSoftTab:function(t){for(var e=[],n=t.listSelections(),r=t.options.tabSize,o=0;o<n.length;o++){var i=n[o].from(),a=F(t.getLine(i.line),i.ch,r);e.push(K(r-a%r))}t.replaceSelections(e)},defaultTab:function(t){t.somethingSelected()?t.indentSelection("add"):t.execCommand("insertTab")},transposeChars:function(t){return eo(t,function(){for(var e=t.listSelections(),n=[],r=0;r<e.length;r++)if(e[r].empty()){var o=e[r].head,i=Wt(t.doc,o.line).text;if(i)if(o.ch==i.length&&(o=new ee(o.line,o.ch-1)),o.ch>0)o=new ee(o.line,o.ch+1),t.replaceRange(i.charAt(o.ch-1)+i.charAt(o.ch-2),ee(o.line,o.ch-2),o,"+transpose");else if(o.line>t.doc.first){var a=Wt(t.doc,o.line-1).text;a&&(o=new ee(o.line,1),t.replaceRange(i.charAt(0)+t.doc.lineSeparator()+a.charAt(a.length-1),ee(o.line-1,a.length-1),o,"+transpose"))}n.push(new Oo(o,o))}t.setSelections(n)})},newlineAndIndent:function(t){return eo(t,function(){for(var e=t.listSelections(),n=e.length-1;n>=0;n--)t.replaceRange(t.doc.lineSeparator(),e[n].anchor,e[n].head,"+input");e=t.listSelections();for(var r=0;r<e.length;r++)t.indentLine(e[r].from().line,null,!0);Lr(t)})},openLine:function(t){return t.replaceSelection("\n","start")},toggleOverwrite:function(t){return t.toggleOverwrite()}};function ia(t,e){var n=Wt(t.doc,e),r=Fe(n);return r!=n&&(e=Zt(r)),ra(!0,t,r,e,1)}function aa(t,e){var n=ia(t,e.line),r=Wt(t.doc,n.line),o=ut(r,t.doc.direction);if(!o||0==o[0].level){var i=Math.max(n.ch,r.text.search(/\S/)),a=e.line==n.line&&e.ch<=i&&e.ch;return ee(n.line,a?0:i,n.sticky)}return n}function sa(t,e,n){if("string"==typeof e&&!(e=oa[e]))return!1;t.display.input.ensurePolled();var r=t.display.shift,o=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),n&&(t.display.shift=!1),o=e(t)!=U}finally{t.display.shift=r,t.state.suppressEdits=!1}return o}var la=new B;function ca(t,e,n,r){var o=t.state.keySeq;if(o){if(Xi(e))return"handled";if(/\'$/.test(e)?t.state.keySeq=null:la.set(50,function(){t.state.keySeq==o&&(t.state.keySeq=null,t.display.input.reset())}),ua(t,o+" "+e,n,r))return!0}return ua(t,e,n,r)}function ua(t,e,n,r){var o=function(t,e,n){for(var r=0;r<t.state.keyMaps.length;r++){var o=Yi(e,t.state.keyMaps[r],n,t);
1if(o)return o}return t.options.extraKeys&&Yi(e,t.options.extraKeys,n,t)||Yi(e,t.options.keyMap,n,t)}(t,e,r);return"multi"==o&&(t.state.keySeq=e),"handled"==o&&cn(t,"keyHandled",t,e,n),"handled"!=o&&"multi"!=o||(_t(n),wr(t)),!!o}function pa(t,e){var n=Qi(e,!0);return!!n&&(e.shiftKey&&!t.state.keySeq?ca(t,"Shift-"+n,e,function(e){return sa(t,e,!0)})||ca(t,n,e,function(e){if("string"==typeof e?/^go[A-Z]/.test(e):e.motion)return sa(t,e)}):ca(t,n,e,function(e){return sa(t,e)}))}var da=null;function fa(t){var e=this;if(!(t.target&&t.target!=e.display.input.getField()||(e.curOp.focus=L(),mt(e,t)))){a&&s<11&&27==t.keyCode&&(t.returnValue=!1);var r=t.keyCode;e.display.shift=16==r||t.shiftKey;var o=pa(e,t);d&&(da=o?r:null,o||88!=r||It||!(b?t.metaKey:t.ctrlKey)||e.replaceSelection("",null,"cut")),n&&!b&&!o&&46==r&&t.shiftKey&&!t.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=r||/\bCodeMirror-crosshair\b/.test(e.display.lineDiv.className)||function(t){var e=t.display.lineDiv;function n(t){18!=t.keyCode&&t.altKey||(O(e,"CodeMirror-crosshair"),ht(document,"keyup",n),ht(document,"mouseover",n))}I(e,"CodeMirror-crosshair"),dt(document,"keyup",n),dt(document,"mouseover",n)}(e)}}function ha(t){16==t.keyCode&&(this.doc.sel.shift=!1),mt(this,t)}function ga(t){var e=this;if(!(t.target&&t.target!=e.display.input.getField()||wn(e.display,t)||mt(e,t)||t.ctrlKey&&!t.altKey||b&&t.metaKey)){var n=t.keyCode,r=t.charCode;if(d&&n==da)return da=null,void _t(t);if(!d||t.which&&!(t.which<10)||!pa(e,t)){var o=String.fromCharCode(null==r?n:r);"\b"!=o&&(function(t,e,n){return ca(t,"'"+n+"'",e,function(e){return sa(t,e,!0)})}(e,t,o)||e.display.input.onKeyPress(t))}}}var ma,va,ya=function(t,e,n){this.time=t,this.pos=e,this.button=n};function ba(t){var e=this,n=e.display;if(!(mt(e,t)||n.activeTouch&&n.input.supportsTouch()))if(n.input.ensurePolled(),n.shift=t.shiftKey,wn(n,t))l||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));else if(!wa(e,t)){var r=pr(e,t),o=St(t),i=r?function(t,e){var n=+new Date;return va&&va.compare(n,t,e)?(ma=va=null,"triple"):ma&&ma.compare(n,t,e)?(va=new ya(n,t,e),ma=null,"double"):(ma=new ya(n,t,e),va=null,"single")}(r,o):"single";window.focus(),1==o&&e.state.selectingText&&e.state.selectingText(t),r&&function(t,e,n,r,o){var i="Click";return"double"==r?i="Double"+i:"triple"==r&&(i="Triple"+i),ca(t,Zi(i=(1==e?"Left":2==e?"Middle":"Right")+i,o),o,function(e){if("string"==typeof e&&(e=oa[e]),!e)return!1;var r=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),r=e(t,n)!=U}finally{t.state.suppressEdits=!1}return r})}(e,o,r,i,t)||(1==o?r?function(t,e,n,r){a?setTimeout(j(Er,t),0):t.curOp.focus=L();var o,i=function(t,e,n){var r=t.getOption("configureMouse"),o=r?r(t,e,n):{};if(null==o.unit){var i=_?n.shiftKey&&n.metaKey:n.altKey;o.unit=i?"rectangle":"single"==e?"char":"double"==e?"word":"line"}return(null==o.extend||t.doc.extend)&&(o.extend=t.doc.extend||n.shiftKey),null==o.addNew&&(o.addNew=b?n.metaKey:n.ctrlKey),null==o.moveOnDrag&&(o.moveOnDrag=!(b?n.altKey:n.ctrlKey)),o}(t,n,r),s=t.doc.sel;t.options.dragDrop&&At&&!t.isReadOnly()&&"single"==n&&(o=s.contains(e))>-1&&(ne((o=s.ranges[o]).from(),e)<0||e.xRel>0)&&(ne(o.to(),e)>0||e.xRel<0)?_a(t,r,e,i):function(t,e,n,r){a&&Sr(t);var o=t.display,i=t.doc;_t(e);var s,l,c=i.sel,u=c.ranges;if(r.addNew&&!r.extend?(l=i.sel.contains(n),s=l>-1?u[l]:new Oo(n,n)):(s=i.sel.primary(),l=i.sel.primIndex),"rectangle"==r.unit)r.addNew||(s=new Oo(n,n)),n=pr(t,e,!0,!0),l=-1;else{var p=Ta(t,n,r.unit);s=r.extend?Zo(s,p.anchor,p.head,r.extend):p}r.addNew?-1==l?(l=u.length,ri(i,Ao(t,u.concat([s]),l),{scroll:!1,origin:"*mouse"})):u.length>1&&u[l].empty()&&"char"==r.unit&&!r.extend?(ri(i,Ao(t,u.slice(0,l).concat(u.slice(l+1)),0),{scroll:!1,origin:"*mouse"}
vendor: 16,251 bytes, line 1
1),c=i.sel):ti(i,l,s,G):(l=0,ri(i,new xo([s],0),G),c=i.sel);var d=n;function f(e){if(0!=ne(d,e))if(d=e,"rectangle"==r.unit){for(var o=[],a=t.options.tabSize,u=F(Wt(i,n.line).text,n.ch,a),p=F(Wt(i,e.line).text,e.ch,a),f=Math.min(u,p),h=Math.max(u,p),g=Math.min(n.line,e.line),m=Math.min(t.lastLine(),Math.max(n.line,e.line));g<=m;g++){var v=Wt(i,g).text,y=q(v,f,a);f==h?o.push(new Oo(ee(g,y),ee(g,y))):v.length>y&&o.push(new Oo(ee(g,y),ee(g,q(v,h,a))))}o.length||o.push(new Oo(n,n)),ri(i,Ao(t,c.ranges.slice(0,l).concat(o),l),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var b,_=s,T=Ta(t,e,r.unit),C=_.anchor;ne(T.anchor,C)>0?(b=T.head,C=ae(_.from(),T.anchor)):(b=T.anchor,C=ie(_.to(),T.head));var w=c.ranges.slice(0);w[l]=function(t,e){var n=e.anchor,r=e.head,o=Wt(t.doc,n.line);if(0==ne(n,r)&&n.sticky==r.sticky)return e;var i=ut(o);if(!i)return e;var a=lt(i,n.ch,n.sticky),s=i[a];if(s.from!=n.ch&&s.to!=n.ch)return e;var l,c=a+(s.from==n.ch==(1!=s.level)?0:1);if(0==c||c==i.length)return e;if(r.line!=n.line)l=(r.line-n.line)*("ltr"==t.doc.direction?1:-1)>0;else{var u=lt(i,r.ch,r.sticky),p=u-a||(r.ch-n.ch)*(1==s.level?-1:1);l=u==c-1||u==c?p<0:p>0}var d=i[c+(l?-1:0)],f=l==(1==d.level),h=f?d.from:d.to,g=f?"after":"before";return n.ch==h&&n.sticky==g?e:new Oo(new ee(n.line,h,g),r)}(t,new Oo(le(i,C),b)),ri(i,Ao(t,w,l),G)}}var h=o.wrapper.getBoundingClientRect(),g=0;function m(e){var n=++g,a=pr(t,e,!0,"rectangle"==r.unit);if(a)if(0!=ne(a,d)){t.curOp.focus=L(),f(a);var s=Pr(o,i);(a.line>=s.to||a.line<s.from)&&setTimeout(no(t,function(){g==n&&m(e)}),150)}else{var l=e.clientY<h.top?-20:e.clientY>h.bottom?20:0;l&&setTimeout(no(t,function(){g==n&&(o.scroller.scrollTop+=l,m(e))}),50)}}function v(e){t.state.selectingText=!1,g=1/0,e&&(_t(e),o.input.focus()),ht(o.wrapper.ownerDocument,"mousemove",y),ht(o.wrapper.ownerDocument,"mouseup",b),i.history.lastSelOrigin=null}var y=no(t,function(t){0!==t.buttons&&St(t)?m(t):v(t)}),b=no(t,v);t.state.selectingText=b,dt(o.wrapper.ownerDocument,"mousemove",y),dt(o.wrapper.ownerDocument,"mouseup",b)}(t,r,e,i)}(e,r,i,t):Et(t)==n.scroller&&_t(t):2==o?(r&&Qo(e.doc,r),setTimeout(function(){return n.input.focus()},20)):3==o&&(E?e.display.input.onContextMenu(t):Sr(e)))}}function _a(t,e,n,r){var o=t.display,i=!1,c=no(t,function(e){l&&(o.scroller.draggable=!1),t.state.draggingText=!1,t.state.delayingBlurEvent&&(t.hasFocus()?t.state.delayingBlurEvent=!1:Sr(t)),ht(o.wrapper.ownerDocument,"mouseup",c),ht(o.wrapper.ownerDocument,"mousemove",u),ht(o.scroller,"dragstart",p),ht(o.scroller,"drop",c),i||(_t(e),r.addNew||Qo(t.doc,n,null,null,r.extend),l&&!f||a&&9==s?setTimeout(function(){o.wrapper.ownerDocument.body.focus({preventScroll:!0}),o.input.focus()},20):o.input.focus())}),u=function(t){i=i||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},p=function(){return i=!0};l&&(o.scroller.draggable=!0),t.state.draggingText=c,c.copy=!r.moveOnDrag,dt(o.wrapper.ownerDocument,"mouseup",c),dt(o.wrapper.ownerDocument,"mousemove",u),dt(o.scroller,"dragstart",p),dt(o.scroller,"drop",c),t.state.delayingBlurEvent=!0,setTimeout(function(){return o.input.focus()},20),o.scroller.dragDrop&&o.scroller.dragDrop()}function Ta(t,e,n){if("char"==n)return new Oo(e,e);if("word"==n)return t.findWordAt(e);if("line"==n)return new Oo(ee(e.line,0),le(t.doc,ee(e.line+1,0)));var r=n(t,e);return new Oo(r.from,r.to)}function Ca(t,e,n,r){var o,i;if(e.touches)o=e.touches[0].clientX,i=e.touches[0].clientY;else try{o=e.clientX,i=e.clientY}catch(t){return!1}if(o>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;r&&_t(e);var a=t.display,s=a.lineDiv.getBoundingClientRect();if(i>s.bottom||!yt(t,n))return Ct(e);i-=s.top-a.viewOffset;for(var l=0;l<t.display.gutterSpecs.length;++l){var c=a.gutters.childNodes[l];if(c&&c.getBoundingClientRect().right>=o)return gt(t,n,t,Qt(t.doc,i),t.display.gutterSpecs[l].className,e),Ct(e)}}function wa(t,e){return Ca(t,e,"gutterClick",!0)}function Ea(t,e){wn(t.display,e)||function(t,e){return!!yt(t,"gutterContextMenu")&&Ca(t,e,"gutterContextMenu",!1)}(t,e)||mt(t,e,"contextmenu")||E||t.display.input.onContextMenu(e)}function Sa(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Un(t)}ya.prototype.compare=function(t,e,n){return this.time+400>t&&0==ne(e,this.pos)&&n==this.button};var xa={toString:function(){return"CodeMirror.Init"}},Oa={},Aa={};function ka(t,e,n){if(!e!=!(n&&n!=xa)){var r=t.display.dragFunctions,o=e?dt:ht;o(t.display.scroller,"dragstart",r.start),o(t.display.scroller,"dragenter",r.enter),o(t.display.scroller,"dragover",r.over),o(t.display.scroller,"dragleave",r.leave),o(t.display.scroller,"drop",r.drop)}}function Pa(t){t.options.lineWrapping?(I(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(O(t.display.wrapper,"CodeMirror-wrap"),qe(t)),ur(t),fr(t),Un(t),setTimeout(function(){return zr(t)},100)}function Na(t,e){var n=this;if(!(this instanceof Na))return new Na(t,e);this.options=e=e?H(e):{},H(Oa,e,!1);var r=e.value;"string"==typeof r?r=new Ii(r,e.mode,null,e.lineSeparator,e.direction):e.mode&&(r.modeOption=e.mode),this.doc=r;var o=new Na.inputStyles[e.inputStyle](this),i=this.display=new _o(t,r,o,e);for(var c in i.wrapper.CodeMirror=this,Sa(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),qr(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new B,keySeq:null,specialChars:null},e.autofocus&&!y&&i.input.focus(),a&&s<11&&setTimeout(function(){return n.display.input.reset(!0)},20),function(t){var e=t.display;dt(e.scroller,"mousedown",no(t,ba)),dt(e.scroller,"dblclick",a&&s<11?no(t,function(e){if(!mt(t,e)){var n=pr(t,e);if(n&&!wa(t,e)&&!wn(t.display,e)){_t(e);var r=t.findWordAt(n);Qo(t.doc,r.anchor,r.head)}}}):function(e){return mt(t,e)||_t(e)}),dt(e.scroller,"contextmenu",function(e){return Ea(t,e)}),dt(e.input.getField(),"contextmenu",function(n){e.scroller.contains(n.target)||Ea(t,n)});var n,r={end:0};function o(){e.activeTouch&&(n=setTimeout(function(){return e.activeTouch=null},1e3),(r=e.activeTouch).end=+new Date)}function i(t){if(1!=t.touches.length)return!1;var e=t.touches[0];return e.radiusX<=1&&e.radiusY<=1}function l(t,e){if(null==e.left)return!0;var n=e.left-t.left,r=e.top-t.top;return n*n+r*r>400}dt(e.scroller,"touchstart",function(o){if(!mt(t,o)&&!i(o)&&!wa(t,o)){e.input.ensurePolled(),clearTimeout(n);var a=+new Date;e.activeTouch={start:a,moved:!1,prev:a-r.end<=300?r:null},1==o.touches.length&&(e.activeTouch.left=o.touches[0].pageX,e.activeTouch.top=o.touches[0].pageY)}}),dt(e.scroller,"touchmove",function(){e.activeTouch&&(e.activeTouch.moved=!0)}),dt(e.scroller,"touchend",function(n){var r=e.activeTouch;if(r&&!wn(e,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var i,a=t.coordsChar(e.activeTouch,"page");i=!r.prev||l(r,r.prev)?new Oo(a,a):!r.prev.prev||l(r,r.prev.prev)?t.findWordAt(a):new Oo(ee(a.line,0),le(t.doc,ee(a.line+1,0))),t.setSelection(i.anchor,i.head),t.focus(),_t(n)}o()}),dt(e.scroller,"touchcancel",o),dt(e.scroller,"scroll",function(){e.scroller.clientHeight&&(jr(t,e.scroller.scrollTop),Fr(t,e.scroller.scrollLeft,!0),gt(t,"scroll",t))}),dt(e.scroller,"mousewheel",function(e){return So(t,e)}),dt(e.scroller,"DOMMouseScroll",function(e){return So(t,e)}),dt(e.wrapper,"scroll",function(){return e.wrapper.scrollTop=e.wrapper.scrollLeft=0}),e.dragFunctions={enter:function(e){mt(t,e)||wt(e)},over:function(e){mt(t,e)||(function(t,e){var n=pr(t,e);if(n){var r=document.createDocumentFragment();_r(t,n,r),t.display.dragCursor||(t.display.dragCursor=P("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),t.display.lineSpace.insertBefore(t.display.dragCursor,t.display.cursorDiv)),k(t.display.dragCursor,r)}}(t,e),wt(e))},start:function(e){return function(t,e){if(a&&(!t.state.draggingText||+new Date-Di<100))wt(e);else if(!mt(t,e)&&!wn(t.display,e)&&(e.dataTransfer.setData("Text",t.getSelection()),e.dataTransfer.effectAllowed="copyMove",e.dataTransfer.setDragImage&&!f)){var n=P("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d&&(n.width=n.height=1,t.display.wrapper.appendChild(n),n._top=n.offsetTop),e.dataTransfer.setDragImage(n,0,0),d&&n.parentNode.removeChild(n)}}(t,e)},drop:no(t,Ri),leave:function(e){mt(t,e)||ji(t)}};var c=e.input.getField();dt(c,"keyup",function(e){return ha.call(t,e)}),dt(c,"keydown",no(t,fa)),dt(c,"keypress",no(t,ga)),dt(c,"focus",function(e){return xr(t,e)}),dt(c,"blur",function(e){return Or(t,e)})}(this),Bi(),Kr(this),this.curOp.forceUpdate=!0,Fo(this,r),e.autofocus&&!y||this.hasFocus()?setTimeout(function(){n.hasFocus()&&!n.state.focused&&xr(n)},20):Or(this),Aa)Aa.hasOwnProperty(c)&&Aa[c](this,e[c],xa);mo(this),e.finishInit&&e.finishInit(this);for(var u=0;u<Ma.length;++u)Ma[u](this);Yr(this),l&&e.lineWrapping&&"optimizelegibility"==getComputedStyle(i.lineDiv).textRendering&&(i.lineDiv.style.textRendering="auto")}Na.defaults=Oa,Na.optionHandlers=Aa;var Ma=[];function La(t,e,n,r){var o,i=t.doc;null==n&&(n="add"),"smart"==n&&(i.mode.indent?o=he(t,e).state:n="prev");var a=t.options.tabSize,s=Wt(i,e),l=F(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var c,u=s.text.match(/^\s*/)[0];if(r||/\S/.test(s.text)){if("smart"==n&&((c=i.mode.indent(o,s.text.slice(u.length),s.text))==U||c>150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=e>i.first?F(Wt(i,e-1).text,null,a):0:"add"==n?c=l+t.options.indentUnit:"subtract"==n?c=l-t.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var p="",d=0;if(t.options.indentWithTabs)for(var f=Math.floor(c/a);f;--f)d+=a,p+="\t";if(d<c&&(p+=K(c-d)),p!=u)return yi(i,p,ee(e,0),ee(e,u.length),"+input"),s.stateAfter=null,!0;for(var h=0;h<i.sel.ranges.length;h++){var g=i.sel.ranges[h];if(g.head.line==e&&g.head.ch<u.length){var m=ee(e,u.length);ti(i,h,new Oo(m,m));break}}}Na.defineInitHook=function(t){return Ma.push(t)};var Ia=null;function Da(t){Ia=t}function Ra(t,e,n,r,o){var i=t.doc;t.display.shift=!1,r||(r=i.sel);var a=+new Date-200,s="paste"==o||t.state.pasteIncoming>a,l=Mt(e),c=null;if(s&&r.ranges.length>1)if(Ia&&Ia.text.join("\n")==e){if(r.ranges.length%Ia.text.length==0){c=[];for(var u=0;u<Ia.text.length;u++)c.push(i.splitLines(Ia.text[u]))}}else l.length==r.ranges.length&&t.options.pasteLinesPerSelection&&(c=X(l,function(t){return[t]}));for(var p=t.curOp.updateInput,d=r.ranges.length-1;d>=0;d--){var f=r.ranges[d],h=f.from(),g=f.to();f.empty()&&(n&&n>0?h=ee(h.line,h.ch-n):t.state.overwrite&&!s?g=ee(g.line,Math.min(Wt(i,g.line).text.length,g.ch+Y(l).length)):s&&Ia&&Ia.lineWise&&Ia.text.join("\n")==l.join("\n")&&(h=g=ee(h.line,0)));var m={from:h,to:g,text:c?c[d%c.length]:l,origin:o||(s?"paste":t.state.cutIncoming>a?"cut":"+input")};fi(t.doc,m),cn(t,"inputRead",t,m)}e&&!s&&Ha(t,e),Lr(t),t.curOp.updateInput<2&&(t.curOp.updateInput=p),t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=-1}function ja(t,e){var n=t.clipboardData&&t.clipboardData.getData("Text");if(n)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||!e.hasFocus()||eo(e,function(){return Ra(e,n,0,null,"paste")}),!0}function Ha(t,e){if(t.options.electricChars&&t.options.smartIndent)for(var n=t.doc.sel,r=n.ranges.length-1;r>=0;r--){var o=n.ranges[r];if(!(o.head.ch>100||r&&n.ranges[r-1].head.line==o.head.line)){var i=t.getModeAt(o.head),a=!1;if(i.electricChars){for(var s=0;s<i.electricChars.length;s++)if(e.indexOf(i.electricChars.charAt(s))>-1){a=La(t,o.head.line,"smart");break}}else i.electricInput&&i.electricInput.test(Wt(t.doc,o.head.line).text.slice(0,o.head.ch))&&(a=La(t,o.head.line,"smart"));a&&cn(t,"electricInput",t,o.head.line)}}}function Fa(t){for(var e=[],n=[],r=0;r<t.doc.sel.ranges.length;r++){var o=t.doc.sel.ranges[r].head.line,i={anchor:ee(o,0),head:ee(o+1,0)};n.push(i),e.push(t.getRange(i.anchor,i.head))}return{text:e,ranges:n}}function Ba(t,e,n,r){t.setAttribute("autocorrect",n?"":"off"),t.setAttribute("autocapitalize",r?"":"off"),t.setAttribute("spellcheck",!!e)}function Va(){var t=P("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),e=P("div",[t],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return l?t.style.width="1000px":t.setAttribute("wrap","off"),m&&(t.style.border="1px solid black"),Ba(t),e}function Ua(t,e,n,r,o){var i=e,a=n,s=Wt(t,e.line),l=o&&"rtl"==t.direction?-n:n;function c(i){var a;if("codepoint"==r){var c=s.text.charCodeAt(e.ch+(n>0?0:-1));if(isNaN(c))a=null;else{var u=n>0?c>=55296&&c<56320:c>=56320&&c<57343;a=new ee(e.line,Math.max(0,Math.min(s.text.length,e.ch+n*(u?2:1))),-n)}}else a=o?function(t,e,n,r){var o=ut(e,t.doc.direction);if(!o)return na(e,n,r);n.ch>=e.text.length?(n.ch=e.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var i=lt(o,n.ch,n.sticky),a=o[i];if("ltr"==t.doc.direction&&a.level%2==0&&(r>0?a.to>n.ch:a.from<n.ch))return na(e,n,r);var s,l=function(t,n){return ea(e,t instanceof ee?t.ch:t,n)},c=function(n){return t.options.lineWrapping?(s=s||Ln(t,e),tr(t,e,s,n)):{begin:0,end:e.text.length}},u=c("before"==n.sticky?l(n,-1):n.ch);if("rtl"==t.doc.direction||1==a.level){var p=1==a.level==r<0,d=l(n,p?1:-1);if(null!=d&&(p?d<=a.to&&d<=u.end:d>=a.from&&d>=u.begin)){var f=p?"before":"after";return new ee(n.line,d,f)}}var h=function(t,e,r){for(var i=function(t,e){return e?new ee(n.line,l(t,1),"before"):new ee(n.line,t,"after")};t>=0&&t<o.length;t+=e){var a=o[t],s=e>0==(1!=a.level),c=s?r.begin:l(r.end,-1);if(a.from<=c&&c<a.to)return i(c,s);if(c=s?a.from:l(a.to,-1),r.begin<=c&&c<r.end)return i(c,s)}},g=h(i+r,r,u);if(g)return g;var m=r>0?u.end:l(u.begin,-1);return null==m||r>0&&m==e.text.length||!(g=h(r>0?0:o.length-1,r,c(m)))?null:g}(t.cm,s,e,n):na(s,e,n);if(null==a){if(i||!function(){var n=e.line+l;return!(n<t.first||n>=t.first+t.size)&&(e=new ee(n,e.ch,e.sticky),s=Wt(t,n))}())return!1;e=ra(o,t.cm,s,e.line,l)}else e=a;return!0}if("char"==r||"codepoint"==r)c();else if("column"==r)c(!0);else if("word"==r||"group"==r)for(var u=null,p="group"==r,d=t.cm&&t.cm.getHelper(e,"wordChars"),f=!0;!(n<0)||c(!f);f=!1){var h=s.text.charAt(e.ch)||"\n",g=et(h,d)?"w":p&&"\n"==h?"n":!p||/\s/.test(h)?null:"p";if(!p||f||g||(g="s"),u&&u!=g){n<0&&(n=1,c(),e.sticky="after");break}if(g&&(u=g),n>0&&!c(!f))break}var m=ci(t,e,i,a,!0);return re(i,m)&&(m.hitSide=!0),m}function za(t,e,n,r){var o,i,a=t.doc,s=e.left;if("page"==r){var l=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*ir(t.display),3);o=(n>0?e.bottom:e.top)+n*c}else"line"==r&&(o=n>0?e.bottom+3:e.top-3);for(;(i=Qn(t,s,o)).outside;){if(n<0?o<=0:o>=a.height){i.hitSide=!0;break}o+=5*n}return i}var Ga=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new B,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function $a(t,e){var n=Mn(t,e.line);if(!n||n.hidden)return null;var r=Wt(t.doc,e.line),o=Pn(n,r,e.line),i=ut(r,t.doc.direction),a="left";i&&(a=lt(i,e.ch)%2?"right":"left");var s=jn(o.map,e.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function qa(t,e){return e&&(t.bad=!0),t}function Wa(t,e,n){var r;if(e==t.display.lineDiv){if(!(r=t.display.lineDiv.childNodes[n]))return qa(t.clipPos(ee(t.display.viewTo-1)),!0);e=null,n=0}else for(r=e;;r=r.parentNode){if(!r||r==t.display.lineDiv)return null;if(r.parentNode&&r.parentNode==t.display.lineDiv)break}for(var o=0;o<t.display.view.length;o++){var i=t.display.view[o];if(i.node==r)return Ka(i,e,n)}}function Ka(t,e,n){var r=t.text.firstChild,o=!1;if(!e||!M(r,e))return qa(ee(Zt(t.line),0),!0);if(e==r&&(o=!0,e=r.childNodes[n],n=0,!e)){var i=t.rest?Y(t.rest):t.line;return qa(ee(Zt(i),i.text.length),o)}var a=3==e.nodeType?e:null,s=e;for(a||1!=e.childNodes.length||3!=e.firstChild.nodeType||(a=e.firstChild,n&&(n=a.nodeValue.length));s.parentNode!=r;)s=s.parentNode;var l=t.measure,c=l.maps;function u(e,n,r){for(var o=-1;o<(c?c.length:0);o++)for(var i=o<0?l.map:c[o],a=0;a<i.length;a+=3){var s=i[a+2];
1if(s==e||s==n){var u=Zt(o<0?t.line:t.rest[o]),p=i[a]+r;return(r<0||s!=e)&&(p=i[a+(r?1:0)]),ee(u,p)}}}var p=u(a,s,n);if(p)return qa(p,o);for(var d=s.nextSibling,f=a?a.nodeValue.length-n:0;d;d=d.nextSibling){if(p=u(d,d.firstChild,0))return qa(ee(p.line,p.ch-f),o);f+=d.textContent.length}for(var h=s.previousSibling,g=n;h;h=h.previousSibling){if(p=u(h,h.firstChild,-1))return qa(ee(p.line,p.ch+g),o);g+=h.textContent.length}}Ga.prototype.init=function(t){var e=this,n=this,r=n.cm,o=n.div=t.lineDiv;function i(t){for(var e=t.target;e;e=e.parentNode){if(e==o)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(e.className))break}return!1}function a(t){if(i(t)&&!mt(r,t)){if(r.somethingSelected())Da({lineWise:!1,text:r.getSelections()}),"cut"==t.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var e=Fa(r);Da({lineWise:!0,text:e.text}),"cut"==t.type&&r.operation(function(){r.setSelections(e.ranges,0,z),r.replaceSelection("",null,"cut")})}if(t.clipboardData){t.clipboardData.clearData();var a=Ia.text.join("\n");if(t.clipboardData.setData("Text",a),t.clipboardData.getData("Text")==a)return void t.preventDefault()}var s=Va(),l=s.firstChild;r.display.lineSpace.insertBefore(s,r.display.lineSpace.firstChild),l.value=Ia.text.join("\n");var c=L();R(l),setTimeout(function(){r.display.lineSpace.removeChild(s),c.focus(),c==o&&n.showPrimarySelection()},50)}}o.contentEditable=!0,Ba(o,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize),dt(o,"paste",function(t){!i(t)||mt(r,t)||ja(t,r)||s<=11&&setTimeout(no(r,function(){return e.updateFromDOM()}),20)}),dt(o,"compositionstart",function(t){e.composing={data:t.data,done:!1}}),dt(o,"compositionupdate",function(t){e.composing||(e.composing={data:t.data,done:!1})}
vendor: 9,499 bytes, line 1
1),dt(o,"compositionend",function(t){e.composing&&(t.data!=e.composing.data&&e.readFromDOMSoon(),e.composing.done=!0)}),dt(o,"touchstart",function(){return n.forceCompositionEnd()}),dt(o,"input",function(){e.composing||e.readFromDOMSoon()}),dt(o,"copy",a),dt(o,"cut",a)},Ga.prototype.screenReaderLabelChanged=function(t){t?this.div.setAttribute("aria-label",t):this.div.removeAttribute("aria-label")},Ga.prototype.prepareSelection=function(){var t=br(this.cm,!1);return t.focus=L()==this.div,t},Ga.prototype.showSelection=function(t,e){t&&this.cm.display.view.length&&((t.focus||e)&&this.showPrimarySelection(),this.showMultipleSelections(t))},Ga.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Ga.prototype.showPrimarySelection=function(){var t=this.getSelection(),e=this.cm,r=e.doc.sel.primary(),o=r.from(),i=r.to();if(e.display.viewTo==e.display.viewFrom||o.line>=e.display.viewTo||i.line<e.display.viewFrom)t.removeAllRanges();else{var a=Wa(e,t.anchorNode,t.anchorOffset),s=Wa(e,t.focusNode,t.focusOffset);if(!a||a.bad||!s||s.bad||0!=ne(ae(a,s),o)||0!=ne(ie(a,s),i)){var l=e.display.view,c=o.line>=e.display.viewFrom&&$a(e,o)||{node:l[0].measure.map[2],offset:0},u=i.line<e.display.viewTo&&$a(e,i);if(!u){var p=l[l.length-1].measure,d=p.maps?p.maps[p.maps.length-1]:p.map;u={node:d[d.length-1],offset:d[d.length-2]-d[d.length-3]}}if(c&&u){var f,h=t.rangeCount&&t.getRangeAt(0);try{f=x(c.node,c.offset,u.offset,u.node)}catch(t){}f&&(!n&&e.state.focused?(t.collapse(c.node,c.offset),f.collapsed||(t.removeAllRanges(),t.addRange(f))):(t.removeAllRanges(),t.addRange(f)),h&&null==t.anchorNode?t.addRange(h):n&&this.startGracePeriod()),this.rememberSelection()}else t.removeAllRanges()}}},Ga.prototype.startGracePeriod=function(){var t=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){t.gracePeriod=!1,t.selectionChanged()&&t.cm.operation(function(){return t.cm.curOp.selectionChanged=!0})},20)},Ga.prototype.showMultipleSelections=function(t){k(this.cm.display.cursorDiv,t.cursors),k(this.cm.display.selectionDiv,t.selection)},Ga.prototype.rememberSelection=function(){var t=this.getSelection();this.lastAnchorNode=t.anchorNode,this.lastAnchorOffset=t.anchorOffset,this.lastFocusNode=t.focusNode,this.lastFocusOffset=t.focusOffset},Ga.prototype.selectionInEditor=function(){var t=this.getSelection();if(!t.rangeCount)return!1;var e=t.getRangeAt(0).commonAncestorContainer;return M(this.div,e)},Ga.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&L()==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ga.prototype.blur=function(){this.div.blur()},Ga.prototype.getField=function(){return this.div},Ga.prototype.supportsTouch=function(){return!0},Ga.prototype.receivedFocus=function(){var t=this,e=this;this.selectionInEditor()?setTimeout(function(){return t.pollSelection()},20):eo(this.cm,function(){return e.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))})},Ga.prototype.selectionChanged=function(){var t=this.getSelection();return t.anchorNode!=this.lastAnchorNode||t.anchorOffset!=this.lastAnchorOffset||t.focusNode!=this.lastFocusNode||t.focusOffset!=this.lastFocusOffset},Ga.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var t=this.getSelection(),e=this.cm;if(v&&u&&this.cm.display.gutterSpecs.length&&function(t){for(var e=t;e;e=e.parentNode)if(/CodeMirror-gutter-wrapper/.test(e.className))return!0;return!1}(t.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var n=Wa(e,t.anchorNode,t.anchorOffset),r=Wa(e,t.focusNode,t.focusOffset);n&&r&&eo(e,function(){ri(e.doc,ko(n,r),z),(n.bad||r.bad)&&(e.curOp.selectionChanged=!0)})}}},Ga.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var t,e,n,r=this.cm,o=r.display,i=r.doc.sel.primary(),a=i.from(),s=i.to();if(0==a.ch&&a.line>r.firstLine()&&(a=ee(a.line-1,Wt(r.doc,a.line-1).length)),s.ch==Wt(r.doc,s.line).text.length&&s.line<r.lastLine()&&(s=ee(s.line+1,0)),a.line<o.viewFrom||s.line>o.viewTo-1)return!1;a.line==o.viewFrom||0==(t=dr(r,a.line))?(e=Zt(o.view[0].line),n=o.view[0].node):(e=Zt(o.view[t].line),n=o.view[t-1].node.nextSibling);var l,c,u=dr(r,s.line);if(u==o.view.length-1?(l=o.viewTo-1,c=o.lineDiv.lastChild):(l=Zt(o.view[u+1].line)-1,c=o.view[u+1].node.previousSibling),!n)return!1;for(var p=r.doc.splitLines(function(t,e,n,r,o){var i="",a=!1,s=t.doc.lineSeparator(),l=!1;function c(){a&&(i+=s,l&&(i+=s),a=l=!1)}function u(t){t&&(c(),i+=t)}function p(e){if(1==e.nodeType){var n=e.getAttribute("cm-text");if(n)return void u(n);var i,d=e.getAttribute("cm-marker");if(d){var f=t.findMarks(ee(r,0),ee(o+1,0),function(t){return function(e){return e.id==t}}(+d));return void(f.length&&(i=f[0].find(0))&&u(Kt(t.doc,i.from,i.to).join(s)))}if("false"==e.getAttribute("contenteditable"))return;var h=/^(pre|div|p|li|table|br)$/i.test(e.nodeName);if(!/^br$/i.test(e.nodeName)&&0==e.textContent.length)return;h&&c();for(var g=0;g<e.childNodes.length;g++)p(e.childNodes[g]);/^(pre|p)$/i.test(e.nodeName)&&(l=!0),h&&(a=!0)}else 3==e.nodeType&&u(e.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;p(e),e!=n;)e=e.nextSibling,l=!1;return i}(r,n,c,e,l)),d=Kt(r.doc,ee(e,0),ee(l,Wt(r.doc,l).text.length));p.length>1&&d.length>1;)if(Y(p)==Y(d))p.pop(),d.pop(),l--;else{if(p[0]!=d[0])break;p.shift(),d.shift(),e++}for(var f=0,h=0,g=p[0],m=d[0],v=Math.min(g.length,m.length);f<v&&g.charCodeAt(f)==m.charCodeAt(f);)++f;for(var y=Y(p),b=Y(d),_=Math.min(y.length-(1==p.length?f:0),b.length-(1==d.length?f:0));h<_&&y.charCodeAt(y.length-h-1)==b.charCodeAt(b.length-h-1);)++h;if(1==p.length&&1==d.length&&e==a.line)for(;f&&f>a.ch&&y.charCodeAt(y.length-h-1)==b.charCodeAt(b.length-h-1);)f--,h++;p[p.length-1]=y.slice(0,y.length-h).replace(/^\u200b+/,""),p[0]=p[0].slice(f).replace(/\u200b+$/,"");var T=ee(e,f),C=ee(l,d.length?Y(d).length-h:0);return p.length>1||p[0]||ne(T,C)?(yi(r.doc,p,T,C,"+input"),!0):void 0},Ga.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ga.prototype.reset=function(){this.forceCompositionEnd()},Ga.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ga.prototype.readFromDOMSoon=function(){var t=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(t.readDOMTimeout=null,t.composing){if(!t.composing.done)return;t.composing=null}t.updateFromDOM()},80))},Ga.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||eo(this.cm,function(){return fr(t.cm)})},Ga.prototype.setUneditable=function(t){t.contentEditable="false"},Ga.prototype.onKeyPress=function(t){0==t.charCode||this.composing||(t.preventDefault(),this.cm.isReadOnly()||no(this.cm,Ra)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},Ga.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},Ga.prototype.onContextMenu=function(){},Ga.prototype.resetPosition=function(){},Ga.prototype.needsContentAttribute=!0;var Ya=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new B,this.hasSelection=!1,this.composing=null};Ya.prototype.init=function(t){var e=this,n=this,r=this.cm;this.createField(t);var o=this.textarea;function i(t){if(!mt(r,t)){if(r.somethingSelected())Da({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var e=Fa(r);Da({lineWise:!0,text:e.text}),"cut"==t.type?r.setSelections(e.ranges,null,z):(n.prevInput="",o.value=e.text.join("\n"),R(o))}"cut"==t.type&&(r.state.cutIncoming=+new Date)}}t.wrapper.insertBefore(this.wrapper,t.wrapper.firstChild),m&&(o.style.width="0px"),dt(o,"input",function(){a&&s>=9&&e.hasSelection&&(e.hasSelection=null),n.poll()}),dt(o,"paste",function(t){mt(r,t)||ja(t,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())}),dt(o,"cut",i),dt(o,"copy",i),dt(t.scroller,"paste",function(e){if(!wn(t,e)&&!mt(r,e)){if(!o.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var i=new Event("paste");i.clipboardData=e.clipboardData,o.dispatchEvent(i)}}),dt(t.lineSpace,"selectstart",function(e){wn(t,e)||_t(e)}),dt(o,"compositionstart",function(){var t=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:t,range:r.markText(t,r.getCursor("to"),{className:"CodeMirror-composing"})}}),dt(o,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},Ya.prototype.createField=function(t){this.wrapper=Va(),this.textarea=this.wrapper.firstChild},Ya.prototype.screenReaderLabelChanged=function(t){t?this.textarea.setAttribute("aria-label",t):this.textarea.removeAttribute("aria-label")},Ya.prototype.prepareSelection=function(){var t=this.cm,e=t.display,n=t.doc,r=br(t);if(t.options.moveInputWithCursor){var o=Yn(t,n.sel.primary().head,"div"),i=e.wrapper.getBoundingClientRect(),a=e.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,o.top+a.top-i.top)),r.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,o.left+a.left-i.left))}return r},Ya.prototype.showSelection=function(t){var e=this.cm.display;
1k(e.cursorDiv,t.cursors),k(e.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},Ya.prototype.reset=function(t){if(!this.contextMenuPending&&!this.composing){var e=this.cm;if(e.somethingSelected()){this.prevInput="";var n=e.getSelection();this.textarea.value=n,e.state.focused&&R(this.textarea),a&&s>=9&&(this.hasSelection=n)}else t||(this.prevInput=this.textarea.value="",a&&s>=9&&(this.hasSelection=null))}},Ya.prototype.getField=function(){return this.textarea},Ya.prototype.supportsTouch=function(){return!1},Ya.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!y||L()!=this.textarea))try{this.textarea.focus()}catch(t){}},Ya.prototype.blur=function(){this.textarea.blur()},Ya.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ya.prototype.receivedFocus=function(){this.slowPoll()},Ya.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){t.poll(),t.cm.state.focused&&t.slowPoll()})},Ya.prototype.fastPoll=function(){var t=!1,e=this;e.pollingFast=!0,e.polling.set(20,function n(){e.poll()||t?(e.pollingFast=!1,e.slowPoll()):(t=!0,e.polling.set(60,n))})},Ya.prototype.poll=function(){var t=this,e=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!e.state.focused||Lt(n)&&!r&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var o=n.value;if(o==r&&!e.somethingSelected())return!1;if(a&&s>=9&&this.hasSelection===o||b&&/[\uf700-\uf7ff]/.test(o))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var i=o.charCodeAt(0);if(8203!=i||r||(r="\u200b"),8666==i)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(r.length,o.length);l<c&&r.charCodeAt(l)==o.charCodeAt(l);)++l;return eo(e,function(){Ra(e,o.slice(l),r.length-l,null,t.composing?"*compose":null),o.length>1e3||o.indexOf("\n")>-1?n.value=t.prevInput="":t.prevInput=o,t.composing&&(t.composing.range.clear(),t.composing.range=e.markText(t.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Ya.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ya.prototype.onKeyPress=function(){a&&s>=9&&(this.hasSelection=null),this.fastPoll()},Ya.prototype.onContextMenu=function(t){var e=this,n=e.cm,r=n.display,o=e.textarea;e.contextMenuPending&&e.contextMenuPending();var i=pr(n,t),c=r.scroller.scrollTop;if(i&&!d){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(i)&&no(n,ri)(n.doc,ko(i),z);var u,p=o.style.cssText,f=e.wrapper.style.cssText,h=e.wrapper.offsetParent.getBoundingClientRect();if(e.wrapper.style.cssText="position: static",o.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-h.top-5)+"px; left: "+(t.clientX-h.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(u=window.scrollY),r.input.focus(),l&&window.scrollTo(null,u),r.input.reset(),n.somethingSelected()||(o.value=e.prevInput=" "),e.contextMenuPending=v,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),a&&s>=9&&m(),E){wt(t);var g=function(){ht(window,"mouseup",g),setTimeout(v,20)};dt(window,"mouseup",g)}else setTimeout(v,50)}function m(){if(null!=o.selectionStart){var t=n.somethingSelected(),i="\u200b"+(t?o.value:"");o.value="\u21da",o.value=i,e.prevInput=t?"":"\u200b",o.selectionStart=1,o.selectionEnd=i.length,r.selForContextMenu=n.doc.sel}}function v(){if(e.contextMenuPending==v&&(e.contextMenuPending=!1,e.wrapper.style.cssText=f,o.style.cssText=p,a&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=o.selectionStart)){(!a||a&&s<9)&&m();var t=0,i=function(){r.selForContextMenu==n.doc.sel&&0==o.selectionStart&&o.selectionEnd>0&&"\u200b"==e.prevInput?no(n,pi)(n):t++<10?r.detectingSelectAll=setTimeout(i,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(i,200)}}},Ya.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t,this.textarea.readOnly=!!t},Ya.prototype.setUneditable=function(){},Ya.prototype.needsContentAttribute=!1,function(t){var e=t.optionHandlers;function n(n,r,o,i){t.defaults[n]=r,o&&(e[n]=i?function(t,e,n){n!=xa&&o(t,e,n)}:o)}t.defineOption=n,t.Init=xa,n("value","",function(t,e){return t.setValue(e)},!0),n("mode",null,function(t,e){t.doc.modeOption=e,Io(t)},!0),n("indentUnit",2,Io,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,function(t){Do(t),Un(t),fr(t)},!0),n("lineSeparator",null,function(t,e){if(t.doc.lineSep=e,e){var n=[],r=t.doc.first;t.doc.iter(function(t){for(var o=0;;){var i=t.text.indexOf(e,o);if(-1==i)break;o=i+e.length,n.push(ee(r,i))}r++});for(var o=n.length-1;o>=0;o--)yi(t.doc,e,n[o],ee(n[o].line,n[o].ch+e.length))}}),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(t,e,n){t.state.specialChars=new RegExp(e.source+(e.test("\t")?"":"|\t"),"g"),n!=xa&&t.refresh()}),n("specialCharPlaceholder",Je,function(t){return t.refresh()},!0),n("electricChars",!0),n("inputStyle",y?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),n("spellcheck",!1,function(t,e){return t.getInputField().spellcheck=e},!0),n("autocorrect",!1,function(t,e){return t.getInputField().autocorrect=e},!0),n("autocapitalize",!1,function(t,e){return t.getInputField().autocapitalize=e},!0),n("rtlMoveVisually",!T),n("wholeLineUpdateBefore",!0),n("theme","default",function(t){Sa(t),bo(t)},!0),n("keyMap","default",function(t,e,n){var r=Ji(e),o=n!=xa&&Ji(n);o&&o.detach&&o.detach(t,r),r.attach&&r.attach(t,o||null)}),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Pa,!0),n("gutters",[],function(t,e){t.display.gutterSpecs=vo(e,t.options.lineNumbers),bo(t)},!0),n("fixedGutter",!0,function(t,e){t.display.gutters.style.left=e?lr(t.display)+"px":"0",t.refresh()},!0),n("coverGutterNextToScrollbar",!1,function(t){return zr(t)},!0),n("scrollbarStyle","native",function(t){qr(t),zr(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.dis
vendor: 11,036 bytes, line 1
1play.scrollbars.setScrollLeft(t.doc.scrollLeft)},!0),n("lineNumbers",!1,function(t,e){t.display.gutterSpecs=vo(t.options.gutters,e),bo(t)},!0),n("firstLineNumber",1,bo,!0),n("lineNumberFormatter",function(t){return t},bo,!0),n("showCursorWhenSelecting",!1,yr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,function(t,e){"nocursor"==e&&(Or(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)}),n("screenReaderLabel",null,function(t,e){e=""===e?null:e,t.display.input.screenReaderLabelChanged(e)}),n("disableInput",!1,function(t,e){e||t.display.input.reset()},!0),n("dragDrop",!0,ka),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,yr,!0),n("singleCursorHeightPerLine",!0,yr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Do,!0),n("addModeClass",!1,Do,!0),n("pollInterval",100),n("undoDepth",200,function(t,e){return t.doc.history.undoDepth=e}),n("historyEventDelay",1250),n("viewportMargin",10,function(t){return t.refresh()},!0),n("maxHighlightLength",1e4,Do,!0),n("moveInputWithCursor",!0,function(t,e){e||t.display.input.resetPosition()}),n("tabindex",null,function(t,e){return t.display.input.getField().tabIndex=e||""}),n("autofocus",null),n("direction","ltr",function(t,e){return t.doc.setDirection(e)},!0),n("phrases",null)}(Na),function(t){var e=t.optionHandlers,n=t.helpers={};t.prototype={constructor:t,focus:function(){window.focus(),this.display.input.focus()},setOption:function(t,n){var r=this.options,o=r[t];r[t]==n&&"mode"!=t||(r[t]=n,e.hasOwnProperty(t)&&no(this,e[t])(this,n,o),gt(this,"optionChange",this,t))},getOption:function(t){return this.options[t]},getDoc:function(){return this.doc},addKeyMap:function(t,e){this.state.keyMaps[e?"push":"unshift"](Ji(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,n=0;n<e.length;++n)if(e[n]==t||e[n].name==t)return e.splice(n,1),!0},addOverlay:ro(function(e,n){var r=e.token?e:t.getMode(this.options,e);if(r.startState)throw new Error("Overlays may not be stateful.");(function(t,e,n){for(var r=0,o=n(e);r<t.length&&n(t[r])<=o;)r++;t.splice(r,0,e)})(this.state.overlays,{mode:r,modeSpec:e,opaque:n&&n.opaque,priority:n&&n.priority||0},function(t){return t.priority}),this.state.modeGen++,fr(this)}),removeOverlay:ro(function(t){for(var e=this.state.overlays,n=0;n<e.length;++n){var r=e[n].modeSpec;if(r==t||"string"==typeof t&&r.name==t)return e.splice(n,1),this.state.modeGen++,void fr(this)}}),indentLine:ro(function(t,e,n){"string"!=typeof e&&"number"!=typeof e&&(e=null==e?this.options.smartIndent?"smart":"prev":e?"add":"subtract"),Jt(this.doc,t)&&La(this,t,e,n)}),indentSelection:ro(function(t){for(var e=this.doc.sel.ranges,n=-1,r=0;r<e.length;r++){var o=e[r];if(o.empty())o.head.line>n&&(La(this,o.head.line,t,!0),n=o.head.line,r==this.doc.sel.primIndex&&Lr(this));else{var i=o.from(),a=o.to(),s=Math.max(n,i.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;l<n;++l)La(this,l,t);var c=this.doc.sel.ranges;0==i.ch&&e.length==c.length&&c[r].from().ch>0&&ti(this.doc,r,new Oo(i,c[r].to()),z)}}}),getTokenAt:function(t,e){return be(this,t,e)},getLineTokens:function(t,e){return be(this,ee(t),e,!0)},getTokenTypeAt:function(t){t=le(this.doc,t);var e,n=fe(this,Wt(this.doc,t.line)),r=0,o=(n.length-1)/2,i=t.ch;if(0==i)e=n[2];else for(;;){var a=r+o>>1;if((a?n[2*a-1]:0)>=i)o=a;else{if(!(n[2*a+1]<i)){e=n[2*a+2];break}r=a+1}}var s=e?e.indexOf("overlay "):-1;return s<0?e:0==s?null:e.slice(0,s-1)},getModeAt:function(e){var n=this.doc.mode;return n.innerMode?t.innerMode(n,this.getTokenAt(e).state).mode:n},getHelper:function(t,e){return this.getHelpers(t,e)[0]},getHelpers:function(t,e){var r=[];if(!n.hasOwnProperty(e))return r;var o=n[e],i=this.getModeAt(t);if("string"==typeof i[e])o[i[e]]&&r.push(o[i[e]]);else if(i[e])for(var a=0;a<i[e].length;a++){var s=o[i[e][a]];s&&r.push(s)}else i.helperType&&o[i.helperType]?r.push(o[i.helperType]):o[i.name]&&r.push(o[i.name]);for(var l=0;l<o._global.length;l++){var c=o._global[l];c.pred(i,this)&&-1==V(r,c.val)&&r.push(c.val)}return r},getStateAfter:function(t,e){var n=this.doc;return he(this,(t=se(n,null==t?n.first+n.size-1:t))+1,e).state},cursorCoords:function(t,e){var n=this.doc.sel.primary();return Yn(this,null==t?n.head:"object"==typeof t?le(this.doc,t):t?n.from():n.to(),e||"page")},charCoords:function(t,e){return Kn(this,le(this.doc,t),e||"page")},coordsChar:function(t,e){return Qn(this,(t=Wn(this,t,e||"page")).left,t.top)},lineAtHeight:function(t,e){return t=Wn(this,{top:t,left:0},e||"page").top,Qt(this.doc,t+this.display.viewOffset)},heightAtLine:function(t,e,n){var r,o=!1;if("number"==typeof t){var i=this.doc.first+this.doc.size-1;t<this.doc.first?t=this.doc.first:t>i&&(t=i,o=!0),r=Wt(this.doc,t)}else r=t;return qn(this,r,{top:0,left:0},e||"page",n||o).top+(o?this.doc.height-Ge(r):0)},defaultTextHeight:function(){return ir(this.display)},defaultCharWidth:function(){return ar(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,n,r,o){var i=this.display,a=(t=Yn(this,le(this.doc,t))).bottom,s=t.left;if(e.style.position="absolute",e.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(e),i.sizer.appendChild(e),"over"==r)a=t.top;else if("above"==r||"near"==r){var l=Math.max(i.wrapper.clientHeight,this.doc.height),c=Math.max(i.sizer.clientWidth,i.lineSpace.clientWidth);("above"==r||t.bottom+e.offsetHeight>l)&&t.top>e.offsetHeight?a=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=l&&(a=t.bottom),s+e.offsetWidth>c&&(s=c-e.offsetWidth)}e.style.top=a+"px",e.style.left=e.style.right="","right"==o?(s=i.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==o?s=0:"middle"==o&&(s=(i.sizer.clientWidth-e.offsetWidth)/2),e.style.left=s+"px"),n&&function(t,e){var n=Nr(t,e);null!=n.scrollTop&&jr(t,n.scrollTop),null!=n.scrollLeft&&Fr(t,n.scrollLeft)}(this,{left:s,top:a,right:s+e.offsetWidth,bottom:a+e.offsetHeight})},triggerOnKeyDown:ro(fa),triggerOnKeyPress:ro(ga),triggerOnKeyUp:ha,triggerOnMouseDown:ro(ba),execCommand:function(t){if(oa.hasOwnProperty(t))return oa[t].call(null,this)},triggerElectric:ro(function(t){Ha(this,t)}),findPosH:function(t,e,n,r){var o=1;e<0&&(o=-1,e=-e);for(var i=le(this.doc,t),a=0;a<e&&!(i=Ua(this.doc,i,o,n,r)).hitSide;++a);return i},moveH:ro(function(t,e){var n=this;this.extendSelectionsBy(function(r){return n.display.shift||n.doc.extend||r.empty()?Ua(n.doc,r.head,t,e,n.options.rtlMoveVisually):t<0?r.from():r.to()},$)}),deleteH:ro(function(t,e){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):ta(this,function(n){var o=Ua(r,n.head,t,e,!1);return t<0?{from:o,to:n.head}:{from:n.head,to:o}})}),findPosV:function(t,e,n,r){var o=1,i=r;e<0&&(o=-1,e=-e);for(var a=le(this.doc,t),s=0;s<e;++s){var l=Yn(this,a,"div");if(null==i?i=l.left:l.left=i,(a=za(this,l,o,n)).hitSide)break}return a},moveV:ro(function(t,e){var n=this,r=this.doc,o=[],i=!this.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy(function(a){if(i)return t<0?a.from():a.to();var s=Yn(n,a.head,"div");null!=a.goalColumn&&(s.left=a.goalColumn),o.push(s.left);var l=za(n,s,t,e);return"page"==e&&a==r.sel.primary()&&Mr(n,Kn(n,l,"div").top-s.top),l},$),o.length)for(var a=0;a<r.sel.ranges.length;a++)r.sel.ranges[a].goalColumn=o[a]}),findWordAt:function(t){var e=Wt(this.doc,t.line).text,n=t.ch,r=t.ch;if(e){var o=this.getHelper(t,"wordChars");"before"!=t.sticky&&r!=e.length||!n?++r:--n;for(var i=e.charAt(n),a=et(i,o)?function(t){return et(t,o)}:/\s/.test(i)?function(t){return/\s/.test(t)}:function(t){return!/\s/.test(t)&&!et(t)};n>0&&a(e.charAt(n-1));)--n;for(;r<e.length&&a(e.charAt(r));)++r}return new Oo(ee(t.line,n),ee(t.line,r))},toggleOverwrite:function(t){null!=t&&t==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?I(this.display.cursorDiv,"CodeMirror-overwrite"):O(this.display.cursorDiv,"CodeMirror-overwrite"),gt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==L()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:ro(function(t,e){Ir(this,t,e)}),getScrollInfo:function(){var t=this.display.scroller;return{left:t.scrollLeft,top:t.scrollTop,height:t.scrollHeight-On(this)-this.display.barHeight,width:t.scrollWidth-On(this)-this.display.barWidth,clientHeight:kn(this),clientWidth:An(this)}},scrollIntoView:ro(function(t,e){null==t?(t={from:this.doc.sel.primary().head,to:null},null==e&&(e=this.options.cursorScrollMargin)):"number"==typeof t?t={from:ee(t,0),to:null}:null==t.from&&(t={from:t,to:null}),t.to||(t.to=t.from),t.margin=e||0,null!=t.from.line?function(t,e){Dr(t),t.curOp.scrollToPos=e}(this,t):Rr(this,t.from,t.to,t.margin)}),setSize:ro(function(t,e){var n=this,r=function(t){return"number"==typeof t||/^\d+$/.test(String(t))?t+"px":t};null!=t&&(this.display.wrapper.style.width=r(t)),null!=e&&(this.display.wrapper.style.height=r(e)),this.options.lineWrapping&&Vn(this);var o=this.display.viewFrom;this.doc.iter(o,this.display.viewTo,function(t){if(t.widgets)for(var e=0;e<t.widgets.length;e++)if(t.widgets[e].noHScroll){hr(n,o,"widget");break}++o}),this.curOp.forceUpdate=!0,gt(this,"refresh",this)}),operation:function(t){return eo(this,t)},startOperation:function(){return Kr(this)},endOperation:function(){return Yr(this)},refresh:ro(function(){var t=this.display.cachedTextHeight;fr(this),this.curOp.forceUpdate=!0,Un(this),Ir(this,this.doc.scrollLeft,this.doc.scrollTop),fo(this.display),(null==t||Math.abs(t-ir(this.display))>.5||this.options.lineWrapping)&&ur(this),gt(this,"refresh",this)}),swapDoc:ro(function(t){var e=this.doc;return e.cm=null,this.state.selectingText&&this.state.selectingText(),Fo(this,t),Un(this),this.display.input.reset(),Ir(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,cn(this,"swapDoc",this,e),e}),phrase:function(t){var e=this.options.phrases;return e&&Object.prototype.hasOwnProperty.call(e,t)?e[t]:t},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},bt(t),t.registerHelper=function(e,r,o){n.hasOwnProperty(e)||(n[e]=t[e]={_global:[]}),n[e][r]=o},t.registerGlobalHelper=function(e,r,o,i){t.registerHelper(e,r,i),n[e]._global.push({pred:o,val:i})}}(Na);var Xa="iter insert remove copy getEditor constructor".split(" ");for(var Za in Ii.prototype)Ii.prototype.hasOwnProperty(Za)&&V(Xa,Za)<0&&(Na.prototype[Za]=function(t){return function(){return t.apply(this.doc,arguments)}}(Ii.prototype[Za]));return bt(Ii),Na.inputStyles={textarea:Ya,contenteditable:Ga},Na.defineMode=function(t){Na.defaults.mode||"null"==t||(Na.defaults.mode=t),Ht.apply(this,arguments)},Na.defineMIME=function(t,e){jt[t]=e},Na.defineMode("null",function(){return{token:function(t){return t.skipToEnd()}}}
1),Na.defineMIME("text/plain","null"),Na.defineExtension=function(t,e){Na.prototype[t]=e},Na.defineDocExtension=function(t,e){Ii.prototype[t]=e},Na.fromTextArea=function(t,e){if((e=e?H(e):{}).value=t.value,!e.tabindex&&t.tabIndex&&(e.tabindex=t.tabIndex),!e.placeholder&&t.placeholder&&(e.placeholder=t.placeholder),null==e.autofocus){var n=L();e.autofocus=n==t||null!=t.getAttribute("autofocus")&&n==document.body}function r(){t.value=s.getValue()}var o;if(t.form&&(dt(t.form,"submit",r),!e.leaveSubmitMethodAlone)){var i=t.form;o=i.submit;try{var a=i.submit=function(){r(),i.submit=o,i.submit(),i.submit=a}}catch(t){}}e.finishInit=function(n){n.save=r,n.getTextArea=function(){return t},n.toTextArea=function(){n.toTextArea=isNaN,r(),t.parentNode.removeChild(n.getWrapperElement()),t.style.display="",t.form&&(ht(t.form,"submit",r),e.leaveSubmitMethodAlone||"function"!=typeof t.form.submit||(t.form.submit=o))}},t.style.display="none";var s=Na(function(e){return t.parentNode.insertBefore(e,t.nextSibling)},e);return s},function(t){t.off=ht,t.on=dt,t.wheelEventPixels=Eo,t.Doc=Ii,t.splitLines=Mt,t.countColumn=F,t.findColumn=q,t.isWordChar=tt,t.Pass=U,t.signal=gt,t.Line=We,t.changeEnd=Po,t.scrollbarModel=$r,t.Pos=ee,t.cmpPos=ne,t.modes=Rt,t.mimeModes=jt,t.resolveMode=Ft,t.getMode=Bt,t.modeExtensions=Vt,t.extendMode=Ut,t.copyState=zt,t.startState=$t,t.innerMode=Gt,t.commands=oa,t.keyMap=qi,t.keyName=Qi,t.isModifierKey=Xi,t.lookupKey=Yi,t.normalizeKeyMap=Ki,t.StringStream=qt,t.SharedTextMarker=Pi,t.TextMarker=Ai,t.LineWidget=Si,t.e_preventDefault=_t,t.e_stopPropagation=Tt,t.e_stop=wt,t.addClass=I,t.contains=M,t.rmClass=O,t.keyNames=Ui}(Na),Na.version="5.65.6",Na}()},629:(t,e,n)=>{!function(t){"use strict";function e(t){for(var e={},n=0;n<t.length;++n)e[t[n].toLowerCase()]=!0;return e}t.defineMode("css",function(e,n){var r=n.inline;n.propertyKeywords||(n=t.resolveMode("text/css"));var o,i,a=e.indentUnit,s=n.tokenHooks,l=n.documentTypes||{},c=n.mediaTypes||{},u=n.mediaFeatures||{},p=n.mediaValueKeywords||{},d=n.propertyKeywords||{},f=n.nonStandardPropertyKeywords||{},h=n.fontProperties||{},g=n.counterDescriptors||{},m=n.colorKeywords||{},v=n.valueKeywords||{},y=n.allowNested,b=n.lineComment,_=!0===n.supportsAtComponent,T=!1!==e.highlightNonStandardPropertyKeywords;function C(t,e){return o=e,t}function w(t,e){var n=t.next();if(s[n]){var r=s[n](t,e);if(!1!==r)return r}return"@"==n?(t.eatWhile(/[\w\\\-]/),C("def",t.current())):"="==n||("~"==n||"|"==n)&&t.eat("=")?C(null,"compare"):'"'==n||"'"==n?(e.tokenize=E(n),e.tokenize(t,e)):"#"==n?(t.eatWhile(/[\w\\\-]/),C("atom","hash")):"!"==n?(t.match(/^\s*\w*/),C("keyword","important")):/\d/.test(n)||"."==n&&t.eat(/\d/)?(t.eatWhile(/[\w.%]/),C("number","unit")):"-"!==n?/[,+>*\/]/.test(n)?C(null,"select-op"):"."==n&&t.match(/^-?[_a-z][_a-z0-9-]*/i)?C("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?C(null,n):t.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(t.current())&&(e.tokenize=S),C("variable callee","variable")):/[\w\\\-]/.test(n)?(t.eatWhile(/[\w\\\-]/),C("property","word")):C(null,null):/[\d.]/.test(t.peek())?(t.eatWhile(/[\w.%]/),C("number","unit")):t.match(/^-[\w\\\-]*/)?(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1)?C("variable-2","variable-definition"):C("variable-2","variable")):t.match(/^\w+-/)?C("meta","meta"):void 0}function E(t){return function(e,n){for(var r,o=!1;null!=(r=e.next());){if(r==t&&!o){")"==t&&e.backUp(1);break}o=!o&&"\\"==r}return(r==t||!o&&")"!=t)&&(n.tokenize=null),C("string","string")}}function S(t,e){return t.next(),t.match(/^\s*[\"\')]/,!1)?e.tokenize=null:e.tokenize=E(")"),C(null,"(")}function x(t,e,n){this.type=t,this.indent=e,this.prev=n}function O(t,e,n,r){return t.context=new x(n,e.indentation()+(!1===r?0:a),t.context),n}function A(t){return t.context.prev&&(t.context=t.context.prev),t.context.type}function k(t,e,n){return M[n.context.type](t,e,n)}function P(t,e,n,r){for(var o=r||1;o>0;o--)n.context=n.context.prev;return k(t,e,n)}function N(t){var e=t.current().toLowerCase();i=v.hasOwnProperty(e)?"atom":m.hasOwnProperty(e)?"keyword":"variable"}var M={top:function(t,e,n){if("{"==t)return O(n,e,"block");if("}"==t&&n.context.prev)return A(n);if(_&&/@component/i.test(t))return O(n,e,"atComponentBlock");if(/^@(-moz-)?document$/i.test(t))return O(n,e,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(t))return O(n,e,"atBlock");if(/^@(font-face|counter-style)/i.test(t))return n.stateArg=t,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(t))return"keyframes";if(t&&"@"==t.charAt(0))return O(n,e,"at");if("hash"==t)i="builtin";else if("word"==t)i="tag";else{if("variable-definition"==t)return"maybeprop";if("interpolation"==t)return O(n,e,"interpolation");if(":"==t)return"pseudo";if(y&&"("==t)return O(n,e,"parens")}return n.context.type},block:function(t,e,n){if("word"==t){var r=e.current().toLowerCase();return d.hasOwnProperty(r)?(i="property","maybeprop"):f.hasOwnProperty(r)?(i=T?"string-2":"property","maybeprop"):y?(i=e.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(i+=" error","maybeprop")}return"meta"==t?"block":y||"hash"!=t&&"qualifier"!=t?M.top(t,e,n):(i="error","block")},maybeprop:function(t,e,n){return":"==t?O(n,e,"prop"):k(t,e,n)},prop:function(t,e,n){if(";"==t)return A(n);if("{"==t&&y)return O(n,e,"propBlock");if("}"==t||"{"==t)return P(t,e,n);
1if("("==t)return O(n,e,"parens");if("hash"!=t||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(e.current())){if("word"==t)N(e);else if("interpolation"==t)return O(n,e,"interpolation")}else i+=" error";return"prop"},propBlock:function(t,e,n){return"}"==t?A(n):"word"==t?(i="property","maybeprop"):n.context.type},parens:function(t,e,n){return"{"==t||"}"==t?P(t,e,n):")"==t?A(n):"("==t?O(n,e,"parens"):"interpolation"==t?O(n,e,"interpolation"):("word"==t&&N(e),"parens")},pseudo:function(t,e,n){return"meta"==t?"pseudo":"word"==t?(i="variable-3",n.context.type):k(t,e,n)},documentTypes:function(t,e,n){return"word"==t&&l.hasOwnProperty(e.current())?(i="tag",n.context.type):M.atBlock(t,e,n)},atBlock:function(t,e,n){if("("==t)return O(n,e,"atBlock_parens");if("}"==t||";"==t)return P(t,e,n);if("{"==t)return A(n)&&O(n,e,y?"block":"top");if("interpolation"==t)return O(n,e,"interpolation");if("word"==t){var r=e.current().toLowerCase();i="only"==r||"not"==r||"and"==r||"or"==r?"keyword":c.hasOwnProperty(r)?"attribute":u.hasOwnProperty(r)?"property":p.hasOwnProperty(r)?"keyword":d.hasOwnProperty(r)?"property":f.hasOwnProperty(r)?T?"string-2":"property":v.hasOwnProperty(r)?"atom":m.hasOwnProperty(r)?"keyword":"error"}return n.context.type},atComponentBlock:function(t,e,n){return"}"==t?P(t,e,n):"{"==t?A(n)&&O(n,e,y?"block":"top",!1):("word"==t&&(i="error"),n.context.type)},atBlock_parens:function(t,e,n){return")"==t?A(n):"{"==t||"}"==t?P(t,e,n,2):M.atBlock(t,e,n)},restricted_atBlock_before:function(t,e,n){return"{"==t?O(n,e,"restricted_atBlock"):"word"==t&&"@counter-style"==n.stateArg?(i="variable","restricted_atBlock_before"):k(t,e,n)},restricted_atBlock:function(t,e,n){return"}"==t?(n.stateArg=null,A(n)):"word"==t?(i="@font-face"==n.stateArg&&!h.hasOwnProperty(e.current().toLowerCase())||"@counter-style"==n.stateArg&&!g.hasOwnProperty(e.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},keyframes:function(t,e,n){return"word"==t?(i="variable","keyframes"):"{"==t?O(n,e,"top"):k(t,e,n)},at:function(t,e,n){return";"==t?A(n):"{"==t||"}"==t?P(t,e,n):("word"==t?i="tag":"hash"==t&&(i="builtin"),"at")},interpolation:function(t,e,n){return"}"==t?A(n):"{"==t||";"==t?P(t,e,n):("word"==t?i="variable":"variable"!=t&&"("!=t&&")"!=t&&(i="error"),"interpolation")}};return{startState:function(t){return{tokenize:null,state:r?"block":"top",stateArg:null,context:new x(r?"block":"top",t||0,null)}},token:function(t,e){if(!e.tokenize&&t.eatSpace())return null;var n=(e.tokenize||w)(t,e);return n&&"object"==typeof n&&(o=n[1],n=n[0]),i=n,"comment"!=o&&(e.state=M[e.state](o,t,e)),i},indent:function(t,e){var n=t.context,r=e&&e.charAt(0),o=n.indent;return"prop"!=n.type||"}"!=r&&")"!=r||(n=n.prev),n.prev&&("}"!=r||"block"!=n.type&&"top"!=n.type&&"interpolation"!=n.type&&"restricted_atBlock"!=n.type?(")"!=r||"parens"!=n.type&&"atBlock_parens"!=n.type)&&("{"!=r||"at"!=n.type&&"atBlock"!=n.type)||(o=Math.max(0,n.indent-a)):o=(n=n.prev).indent),o},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:b,fold:"brace"}});var n=["domain","regexp","url","url-prefix"],r=e(n),o=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],i=e(o),a=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover","prefers-color-scheme","dynamic-range","video-dynamic-range"],s=e(a),l=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light","standard","high"],c=e(l),u=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","all","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","binding","bleed","block-size","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-content","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-height-step","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","move-to","nav-down","nav-index","
1nav-left","nav-right","nav-up","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotate","rotation","rotation-point","row-gap","ruby-align","ruby-overhang","ruby-position","ruby-span","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-type","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-orientation","text-outline","text-overflow","text-rendering","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","touch-action","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","paint-order","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],p=e(u),d=["accent-color","aspect-ratio","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","content-visibility","margin-block","margin-block-end","margin-block-start","margin-inline","margin-inline-end","margin-inline-start","overflow-anchor","overscroll-behavior","padding-block","padding-block-end","padding-block-start","padding-inline","padding-inline-end","padding-inline-start","scroll-snap-stop","scrollbar-3d-light-color","scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-track-color","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","shape-inside","zoom"],f=e(d),h=e(["font-display","font-family","src","unicode
1-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),g=e(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),m=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],v=e(m),y=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","blur","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","brightness","bullets","button","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","conic-gradient","contain","content","contents","content-box","context-menu","continuous","contrast","copy","counter","counters","cover","crop","cross","crosshair","cubic-bezier","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","drop-shadow","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","grayscale","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","hue-rotate","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","
1initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","manipulation","match","matrix","matrix3d","media-play-button","media-slider","media-sliderthumb","media-volume-slider","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiple_mask_images","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeating-conic-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturate","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","sepia","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],b=e(y),_=n.concat(o).concat(a).concat(l).concat(u).concat(d).concat(m).concat(y);function T(t,e){for(var n,r=!1;null!=(n=t.next());){if(r&&"/"==n){e.tokenize=null;break}r="*"==n}return["comment","comment"]}t.registerHelper("hintWords","css",_),t.defineMIME("text/css",{documentTypes:r,mediaTypes:i,mediaFeatures:s,mediaValueKeywords:c,propertyKeywords:p,nonStandardPropertyKeywords:f,fontProperties:h,c
1ounterDescriptors:g,colorKeywords:v,valueKeywords:b,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=T,T(t,e))}},name:"css"}),t.defineMIME("text/x-scss",{mediaTypes:i,mediaFeatures:s,mediaValueKeywords:c,propertyKeywords:p,nonStandardPropertyKeywords:f,colorKeywords:v,valueKeywords:b,fontProperties:h,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=T,T(t,e)):["operator","operator"]},":":function(t){return!!t.match(/^\s*\{/,!1)&&[null,null]},$:function(t){return t.match(/^[\w-]+/),t.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(t){return!!t.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),t.defineMIME("text/x-less",{mediaTypes:i,mediaFeatures:s,mediaValueKeywords:c,propertyKeywords:p,nonStandardPropertyKeywords:f,colorKeywords:v,valueKeywords:b,fontProperties:h,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=T,T(t,e)):["operator","operator"]},"@":function(t){return t.eat("{")?[null,"interpolation"]:!t.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),t.defineMIME("text/x-gss",{documentTypes:r,mediaTypes:i,mediaFeatures:s,propertyKeywords:p,nonStandardPropertyKeywords:f,fontProperties:h,counterDescriptors:g,colorKeywords:v,valueKeywords:b,supportsAtComponent:!0,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=T,T(t,e))}},name:"css",helperType:"gss"})}(n(631))},531:(t,e,n)=>{!function(t){"use strict";var e={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]},n={};function r(t,e){var r=t.match(function(t){return n[t]||(n[t]=new RegExp("\\s+"+t+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}(e));return r?/^\s*(.*?)\s*$/.exec(r[2])[1]:""}function o(t,e){return new RegExp((e?"^":"")+"</\\s*"+t+"\\s*>","i")}function i(t,e){for(var n in t)for(var r=e[n]||(e[n]=[]),o=t[n],i=o.length-1;i>=0;i--)r.unshift(o[i])}function a(t,e){for(var n=0;n<t.length;n++){var o=t[n];if(!o[0]||o[1].test(r(e,o[0])))return o[2]}}t.defineMode("htmlmixed",function(n,r){var s=t.getMode(n,{name:"xml",htmlMode:!0,multilineTagIndentFactor:r.multilineTagIndentFactor,multilineTagIndentPastTag:r.multilineTagIndentPastTag,allowMissingTagName:r.allowMissingTagName}),l={},c=r&&r.tags,u=r&&r.scriptTypes;if(i(e,l),c&&i(c,l),u)for(var p=u.length-1;p>=0;p--)l.script.unshift(["type",u[p].matches,u[p].mode]);function d(e,r){var i,c=s.token(e,r.htmlState),u=/\btag\b/.test(c);if(u&&!/[<>\s\/]/.test(e.current())&&(i=r.htmlState.tagName&&r.htmlState.tagName.toLowerCase())&&l.hasOwnProperty(i))r.inTag=i+" ";else if(r.inTag&&u&&/>$/.test(e.current())){var p=/^([\S]+) (.*)/.exec(r.inTag);r.inTag=null;var f=">"==e.current()&&a(l[p[1]],p[2]),h=t.getMode(n,f),g=o(p[1],!0),m=o(p[1],!1);r.token=function(t,e){return t.match(g,!1)?(e.token=d,e.localState=e.localMode=null,null):function(t,e,n){var r=t.current(),o=r.search(e);return o>-1?t.backUp(r.length-o):r.match(/<\/?$/)&&(t.backUp(r.length),t.match(e,!1)||t.match(r)),n}(t,m,e.localMode.token(t,e.localState))},r.localMode=h,r.localState=t.startState(h,s.indent(r.htmlState,"",""))}else r.inTag&&(r.inTag+=e.current(),e.eol()&&(r.inTag+=" "));return c}return{startState:function(){return{token:d,inTag:null,localMode:null,localState:null,htmlState:t.startState(s)}},copyState:function(e){var n;return e.localState&&(n=t.copyState(e.localMode,e.localState)),{token:e.token,inTag:e.inTag,localMode:e.localMode,localState:n,htmlState:t.copyState(s,e.htmlState)}},token:function(t,e){return e.token(t,e)},indent:function(e,n,r){return!e.localMode||/^\s*<\//.test(n)?s.indent(e.htmlState,n,r):e.localMode.indent?e.localMode.indent(e.localState,n,r):t.Pass},innerMode:function(t){return{state:t.localState||t.htmlState,mode:t.localMode||s}}}},"xml","javascript","css"),t.defineMIME("text/html","htmlmixed")}(n(631),n(589),n(876),n(629))},876:(t,e,n)=>{!function(t){"use strict";t.defineMode("javascript",function(e,n){var r,o,i=e.indentUnit,a=n.statementIndent,s=n.jsonld,l=n.json||s,c=!1!==n.trackScope,u=n.typescript,p=n.wordCharacters||/[\w$\xa1-\uffff]/,d=function(){function t(t){return{type:t,style:"keyword"}}
1var e=t("keyword a"),n=t("keyword b"),r=t("keyword c"),o=t("keyword d"),i=t("operator"),a={type:"atom",style:"atom"};return{if:t("if"),while:e,with:e,else:n,do:n,try:n,finally:n,return:o,break:o,continue:o,new:t("new"),delete:r,void:r,throw:r,debugger:t("debugger"),var:t("var"),const:t("var"),let:t("var"),function:t("function"),catch:t("catch"),for:t("for"),switch:t("switch"),case:t("case"),default:t("default"),in:i,typeof:i,instanceof:i,true:a,false:a,null:a,undefined:a,NaN:a,Infinity:a,this:t("this"),class:t("class"),super:t("atom"),yield:r,export:t("export"),import:t("import"),extends:r,await:r}}(),f=/[+\-*&%=<>!?|~^@]/,h=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function g(t,e,n){return r=t,o=n,e}function m(t,e){var n=t.next();if('"'==n||"'"==n)return e.tokenize=function(t){return function(e,n){var r,o=!1;if(s&&"@"==e.peek()&&e.match(h))return n.tokenize=m,g("jsonld-keyword","meta");for(;null!=(r=e.next())&&(r!=t||o);)o=!o&&"\\"==r;return o||(n.tokenize=m),g("string","string")}}(n),e.tokenize(t,e);if("."==n&&t.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return g("number","number");if("."==n&&t.match(".."))return g("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return g(n);if("="==n&&t.eat(">"))return g("=>","operator");if("0"==n&&t.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return g("number","number");if(/\d/.test(n))return t.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),g("number","number");if("/"==n)return t.eat("*")?(e.tokenize=v,v(t,e)):t.eat("/")?(t.skipToEnd(),g("comment","comment")):Jt(t,e,1)?(function(t){for(var e,n=!1,r=!1;null!=(e=t.next());
1){if(!n){if("/"==e&&!r)return;"["==e?r=!0:r&&"]"==e&&(r=!1)}n=!n&&"\\"==e}}(t),t.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),g("regexp","string-2")):(t.eat("="),g("operator","operator",t.current()));if("`"==n)return e.tokenize=y,y(t,e);if("#"==n&&"!"==t.peek())return t.skipToEnd(),g("meta","meta");if("#"==n&&t.eatWhile(p))return g("variable","property");if("<"==n&&t.match("!--")||"-"==n&&t.match("->")&&!/\S/.test(t.string.slice(0,t.start)))return t.skipToEnd(),g("comment","comment");if(f.test(n))return">"==n&&e.lexical&&">"==e.lexical.type||(t.eat("=")?"!"!=n&&"="!=n||t.eat("="):/[<>*+\-|&?]/.test(n)&&(t.eat(n),">"==n&&t.eat(n))),"?"==n&&t.eat(".")?g("."):g("operator","operator",t.current());if(p.test(n)){t.eatWhile(p);var r=t.current();if("."!=e.lastType){if(d.propertyIsEnumerable(r)){var o=d[r];return g(o.type,o.style,r)}if("async"==r&&t.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return g("async","keyword",r)}return g("variable","variable",r)}}function v(t,e){for(var n,r=!1;n=t.next();){if("/"==n&&r){e.tokenize=m;break}r="*"==n}return g("comment","comment")}function y(t,e){for(var n,r=!1;null!=(n=t.next());){if(!r&&("`"==n||"$"==n&&t.eat("{"))){e.tokenize=m;break}r=!r&&"\\"==n}return g("quasi","string-2",t.current())}function b(t,e){e.fatArrowAt&&(e.fatArrowAt=null);var n=t.string.indexOf("=>",t.start);if(!(n<0)){if(u){var r=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(t.string.slice(t.start,n));r&&(n=r.index)}for(var o=0,i=!1,a=n-1;a>=0;--a){var s=t.string.charAt(a),l="([{}])".indexOf(s);if(l>=0&&l<3){if(!o){++a;break}if(0==--o){"("==s&&(i=!0);break}}else if(l>=3&&l<6)++o;else if(p.test(s))i=!0;else if(/["'\/`]/.test(s))for(;;--a){if(0==a)return;if(t.string.charAt(a-1)==s&&"\\"!=t.string.charAt(a-2)){a--;break}}else if(i&&!o){++a;break}}i&&!o&&(e.fatArrowAt=a)}}var _={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function T(t,e,n,r,o,i){this.indented=t,this.column=e,this.type=n,this.prev=o,this.info=i,null!=r&&(this.align=r)}function C(t,e){if(!c)return!1;for(var n=t.localVars;n;n=n.next)if(n.name==e)return!0;for(var r=t.context;r;r=r.prev)for(n=r.vars;n;n=n.next)if(n.name==e)return!0}function w(t,e,n,r,o){var i=t.cc;for(E.state=t,E.stream=o,E.marked=null,E.cc=i,E.style=e,t.lexical.hasOwnProperty("align")||(t.lexical.align=!0);;)if((i.length?i.pop():l?U:B)(n,r)){for(;i.length&&i[i.length-1].lex;)i.pop()();return E.marked?E.marked:"variable"==n&&C(t,r)?"variable-2":e}}var E={state:null,column:null,marked:null,cc:null};function S(){for(var t=arguments.length-1;t>=0;t--)E.cc.push(arguments[t])}function x(){return S.apply(null,arguments),!0}function O(t,e){for(var n=e;n;n=n.next)if(n.name==t)return!0;return!1}function A(t){var e=E.state;if(E.marked="def",c){if(e.context)if("var"==e.lexical.info&&e.context&&e.context.block){var r=k(t,e.context);if(null!=r)return void(e.context=r)}else if(!O(t,e.localVars))return void(e.localVars=new M(t,e.localVars));n.globalVars&&!O(t,e.globalVars)&&(e.globalVars=new M(t,e.globalVars))}}function k(t,e){if(e){if(e.block){var n=k(t,e.prev);return n?n==e.prev?e:new N(n,e.vars,!0):null}return O(t,e.vars)?e:new N(e.prev,new M(t,e.vars),!1)}return null}function P(t){return"public"==t||"private"==t||"protected"==t||"abstract"==t||"readonly"==t}function N(t,e,n){this.prev=t,this.vars=e,this.block=n}function M(t,e){this.name=t,this.next=e}var L=new M("this",new M("arguments",null));function I(){E.state.context=new N(E.state.context,E.state.localVars,!1),E.state.localVars=L}function D(){E.state.context=new N(E.state.context,E.state.localVars,!0),E.state.localVars=null}function R(){E.state.localVars=E.state.context.vars,E.state.context=E.state.context.prev}function j(t,e){var n=function(){var n=E.state,r=n.indented;if("stat"==n.lexical.type)r=n.lexical.indented;else for(var o=n.lexical;o&&")"==o.type&&o.align;o=o.prev)r=o.indented;n.lexical=new T(r,E.stream.column(),t,null,n.lexical,e)};return n.lex=!0,n}function H(){var t=E.state;t.lexical.prev&&(")"==t.lexical.type&&(t.indented=t.lexical.indented),t.lexical=t.lexical.prev)}function F(t){return function e(n){return n==t?x():";"==t||"}"==n||")"==n||"]"==n?S():x(e)}}function B(t,e){return"var"==t?x(j("vardef",e),Et,F(";"),H):"keyword a"==t?x(j("form"),G,B,H):"keyword b"==t?x(j("form"),B,H):"keyword d"==t?E.stream.match(/^\s*$/,!1)?x():x(j("stat"),q,F(";"),H):"debugger"==t?x(F(";")):"{"==t?x(j("}"),D,lt,H,R):";"==t?x():"if"==t?("else"==E.state.lexical.info&&E.state.cc[E.state.cc.length-1]==H&&E.state.cc.pop()(),x(j("form"),G,B,H,Pt)):"function"==t?x(It):"for"==t?x(j("form"),D,Nt,B,R,H):"class"==t||u&&"interface"==e?(E.marked="keyword",x(j("form","class"==t?t:e),Ft,H)):"variable"==t?u&&"declare"==e?(E.marked="keyword",x(B)):u&&("module"==e||"enum"==e||"type"==e)&&E.stream.match(/^\s*\w/,!1)?(E.marked="keyword","enum"==e?x(Zt):"type"==e?x(Rt,F("operator"),ft,F(";")):x(j("form"),St,F("{"),j("}
1"),lt,H,H)):u&&"namespace"==e?(E.marked="keyword",x(j("form"),U,B,H)):u&&"abstract"==e?(E.marked="keyword",x(B)):x(j("stat"),et):"switch"==t?x(j("form"),G,F("{"),j("}","switch"),D,lt,H,H,R):"case"==t?x(U,F(":")):"default"==t?x(F(":")):"catch"==t?x(j("form"),I,V,B,H,R):"export"==t?x(j("stat"),zt,H):"import"==t?x(j("stat"),$t,H):"async"==t?x(B):"@"==e?x(U,B):S(j("stat"),U,F(";"),H)}function V(t){if("("==t)return x(jt,F(")"))}function U(t,e){return $(t,e,!1)}function z(t,e){return $(t,e,!0)}function G(t){return"("!=t?S():x(j(")"),q,F(")"),H)}function $(t,e,n){if(E.state.fatArrowAt==E.stream.start){var r=n?Q:Z;if("("==t)return x(I,j(")"),at(jt,")"),H,F("=>"),r,R);if("variable"==t)return S(I,St,F("=>"),r,R)}var o=n?K:W;return _.hasOwnProperty(t)?x(o):"function"==t?x(It,o):"class"==t||u&&"interface"==e?(E.marked="keyword",x(j("form"),Ht,H)):"keyword c"==t||"async"==t?x(n?z:U):"("==t?x(j(")"),q,F(")"),H,o):"operator"==t||"spread"==t?x(n?z:U):"["==t?x(j("]"),Xt,H,o):"{"==t?st(rt,"}",null,o):"quasi"==t?S(Y,o):"new"==t?x(function(t){return function(e){return"."==e?x(t?tt:J):"variable"==e&&u?x(Tt,t?K:W):S(t?z:U)}}(n)):x()}function q(t){return t.match(/[;\}\)\],]/)?S():S(U)}function W(t,e){return","==t?x(q):K(t,e,!1)}function K(t,e,n){var r=0==n?W:K,o=0==n?U:z;return"=>"==t?x(I,n?Q:Z,R):"operator"==t?/\+\+|--/.test(e)||u&&"!"==e?x(r):u&&"<"==e&&E.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?x(j(">"),at(ft,">"),H,r):"?"==e?x(U,F(":"),o):x(o):"quasi"==t?S(Y,r):";"!=t?"("==t?st(z,")","call",r):"."==t?x(nt,r):"["==t?x(j("]"),q,F("]"),H,r):u&&"as"==e?(E.marked="keyword",x(ft,r)):"regexp"==t?(E.state.lastType=E.marked="operator",E.stream.backUp(E.stream.pos-E.stream.start-1),x(o)):void 0:void 0}function Y(t,e){return"quasi"!=t?S():"${"!=e.slice(e.length-2)?x(Y):x(q,X)}function X(t){if("}"==t)return E.marked="string-2",E.state.tokenize=y,x(Y)}function Z(t){return b(E.stream,E.state),S("{"==t?B:U)}function Q(t){return b(E.stream,E.state),S("{"==t?B:z)}function J(t,e){if("target"==e)return E.marked="keyword",x(W)}function tt(t,e){if("target"==e)return E.marked="keyword",x(K)}function et(t){return":"==t?x(H,B):S(W,F(";"),H)}function nt(t){if("variable"==t)return E.marked="property",x()}function rt(t,e){return"async"==t?(E.marked="property",x(rt)):"variable"==t||"keyword"==E.style?(E.marked="property","get"==e||"set"==e?x(ot):(u&&E.state.fatArrowAt==E.stream.start&&(n=E.stream.match(/^\s*:\s*/,!1))&&(E.state.fatArrowAt=E.stream.pos+n[0].length),x(it))):"number"==t||"string"==t?(E.marked=s?"property":E.style+" property",x(it)):"jsonld-keyword"==t?x(it):u&&P(e)?(E.marked="keyword",x(rt)):"["==t?x(U,ct,F("]"),it):"spread"==t?x(z,it):"*"==e?(E.marked="keyword",x(rt)):":"==t?S(it):void 0;var n}function ot(t){return"variable"!=t?S(it):(E.marked="property",x(It))}function it(t){return":"==t?x(z):"("==t?S(It):void 0}function at(t,e,n){function r(o,i){if(n?n.indexOf(o)>-1:","==o){var a=E.state.lexical;return"call"==a.info&&(a.pos=(a.pos||0)+1),x(function(n,r){return n==e||r==e?S():S(t)},r)}return o==e||i==e?x():n&&n.indexOf(";")>-1?S(t):x(F(e))}return function(n,o){return n==e||o==e?x():S(t,r)}}function st(t,e,n){for(var r=3;r<arguments.length;r++)E.cc.push(arguments[r]);return x(j(e,n),at(t,e),H)}function lt(t){return"}"==t?x():S(B,lt)}function ct(t,e){if(u){if(":"==t)return x(ft);if("?"==e)return x(ct)}}function ut(t,e){if(u&&(":"==t||"in"==e))return x(ft)}function pt(t){if(u&&":"==t)return E.stream.match(/^\s*\w+\s+is\b/,!1)?x(U,dt,ft):x(ft)}function dt(t,e){if("is"==e)return E.marked="keyword",x()}function ft(t,e){return"keyof"==e||"typeof"==e||"infer"==e||"readonly"==e?(E.marked="keyword",x("typeof"==e?z:ft)):"variable"==t||"void"==e?(E.marked="type",x(_t)):"|"==e||"&"==e?x(ft):"string"==t||"number"==t||"atom"==t?x(_t):"["==t?x(j("]"),at(ft,"]",","),H,_t):"{"==t?x(j("}"),gt,H,_t):"("==t?x(at(bt,")"),ht,_t):"<"==t?x(at(ft,">"),ft):"quasi"==t?S(vt,_t):void 0}function ht(t){if("=>"==t)return x(ft)}function gt(t){return t.match(/[\}\)\]]/)?x():","==t||";"==t?x(gt):S(mt,gt)}function mt(t,e){return"variable"==t||"keyword"==E.style?(E.marked="property",x(mt)):"?"==e||"number"==t||"string"==t?x(mt):":"==t?x(ft):"["==t?x(F("variable"),ut,F("]"),mt):"("==t?S(Dt,mt):t.match(/[;\}\)\],]/)?void 0:x()}function vt(t,e){return"quasi"!=t?S():"${"!=e.slice(e.length-2)?x(vt):x(ft,
1yt)}function yt(t){if("}"==t)return E.marked="string-2",E.state.tokenize=y,x(vt)}function bt(t,e){return"variable"==t&&E.stream.match(/^\s*[?:]/,!1)||"?"==e?x(bt):":"==t?x(ft):"spread"==t?x(bt):S(ft)}function _t(t,e){return"<"==e?x(j(">"),at(ft,">"),H,_t):"|"==e||"."==t||"&"==e?x(ft):"["==t?x(ft,F("]"),_t):"extends"==e||"implements"==e?(E.marked="keyword",x(ft)):"?"==e?x(ft,F(":"),ft):void 0}function Tt(t,e){if("<"==e)return x(j(">"),at(ft,">"),H,_t)}function Ct(){return S(ft,wt)}function wt(t,e){if("="==e)return x(ft)}function Et(t,e){return"enum"==e?(E.marked="keyword",x(Zt)):S(St,ct,At,kt)}function St(t,e){return u&&P(e)?(E.marked="keyword",x(St)):"variable"==t?(A(e),x()):"spread"==t?x(St):"["==t?st(Ot,"]"):"{"==t?st(xt,"}"):void 0}function xt(t,e){return"variable"!=t||E.stream.match(/^\s*:/,!1)?("variable"==t&&(E.marked="property"),"spread"==t?x(St):"}"==t?S():"["==t?x(U,F("]"),F(":"),xt):x(F(":"),St,At)):(A(e),x(At))}function Ot(){return S(St,At)}function At(t,e){if("="==e)return x(z)}function kt(t){if(","==t)return x(Et)}function Pt(t,e){if("keyword b"==t&&"else"==e)return x(j("form","else"),B,H)}function Nt(t,e){return"await"==e?x(Nt):"("==t?x(j(")"),Mt,H):void 0}function Mt(t){return"var"==t?x(Et,Lt):"variable"==t?x(Lt):S(Lt)}function Lt(t,e){return")"==t?x():";"==t?x(Lt):"in"==e||"of"==e?(E.marked="keyword",x(U,Lt)):S(U,Lt)}function It(t,e){return"*"==e?(E.marked="keyword",x(It)):"variable"==t?(A(e),x(It)):"("==t?x(I,j(")"),at(jt,")"),H,pt,B,R):u&&"<"==e?x(j(">"),at(Ct,">"),H,It):void 0}function Dt(t,e){return"*"==e?(E.marked="keyword",x(Dt)):"variable"==t?(A(e),x(Dt)):"("==t?x(I,j(")"),at(jt,")"),H,pt,R):u&&"<"==e?x(j(">"),at(Ct,">"),H,Dt):void 0}function Rt(t,e){return"keyword"==t||"variable"==t?(E.marked="type",x(Rt)):"<"==e?x(j(">"),at(Ct,">"),H):void 0}function jt(t,e){return"@"==e&&x(U,jt),"spread"==t?x(jt):u&&P(e)?(E.marked="keyword",x(jt)):u&&"this"==t?x(ct,At):S(St,ct,At)}function Ht(t,e){return"variable"==t?Ft(t,e):Bt(t,e)}function Ft(t,e){if("variable"==t)return A(e),x(Bt)}function Bt(t,e){return"<"==e?x(j(">"),at(Ct,">"),H,Bt):"extends"==e||"implements"==e||u&&","==t?("implements"==e&&(E.marked="keyword"),x(u?ft:U,Bt)):"{"==t?x(j("}"),Vt,H):void 0}function Vt(t,e){return"async"==t||"variable"==t&&("static"==e||"get"==e||"set"==e||u&&P(e))&&E.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(E.marked="keyword",x(Vt)):"variable"==t||"keyword"==E.style?(E.marked="property",x(Ut,Vt)):"number"==t||"string"==t?x(Ut,Vt):"["==t?x(U,ct,F("]"),Ut,Vt):"*"==e?(E.marked="keyword",x(Vt)):u&&"("==t?S(Dt,Vt):";"==t||","==t?x(Vt):"}"==t?x():"@"==e?x(U,Vt):void 0}function Ut(t,e){if("!"==e)return x(Ut);if("?"==e)return x(Ut);if(":"==t)return x(ft,At);if("="==e)return x(z);var n=E.state.lexical.prev;return S(n&&"interface"==n.info?Dt:It)}function zt(t,e){return"*"==e?(E.marked="keyword",x(Yt,F(";"))):"default"==e?(E.marked="keyword",x(U,F(";"))):"{"==t?x(at(Gt,"}"),Yt,F(";")):S(B)}function Gt(t,e){return"as"==e?(E.marked="keyword",x(F("variable"))):"variable"==t?S(z,Gt):void 0}function $t(t){return"string"==t?x():"("==t?S(U):"."==t?S(W):S(qt,Wt,Yt)}function qt(t,e){return"{"==t?st(qt,"}"):("variable"==t&&A(e),"*"==e&&(E.marked="keyword"),x(Kt))}function Wt(t){if(","==t)return x(qt,Wt)}function Kt(t,e){if("as"==e)return E.marked="keyword",x(qt)}function Yt(t,e){if("from"==e)return E.marked="keyword",x(U)}function Xt(t){return"]"==t?x():S(at(z,"]"))}function Zt(){return S(j("form"),St,F("{"),j("}"),at(Qt,"}"),H,H)}function Qt(){return S(St,At)}function Jt(t,e,n){return e.tokenize==m&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(e.lastType)||"quasi"==e.lastType&&/\{\s*$/.test(t.string.slice(0,t.pos-(n||0)))}return I.lex=D.lex=!0,R.lex=!0,H.lex=!0,{startState:function(t){var e={tokenize:m,lastType:"sof",cc:[],lexical:new T((t||0)-i,0,"block",!1),localVars:n.localVars,context:n.localVars&&new N(null,null,!1),indented:t||0};return n.globalVars&&"object"==typeof n.globalVars&&(e.globalVars=n.globalVars),e},token:function(t,e){if(t.sol()&&(e.lexical.hasOwnProperty("align")||(e.lexical.align=!1),e.indented=t.indentation(),b(t,e)),e.tokenize!=v&&t.eatSpace())return null;var n=e.tokenize(t,e);return"comment"==r?n:(e.lastType="operator"!=r||"++"!=o&&"--"!=o?r:"incdec",w(e,n,r,o,t))},indent:function(e,r){if(e.tokenize==v||e.tokenize==y)return t.Pass;if(e.tokenize!=m)return 0;var o,s=r&&r.charAt(0),l=e.lexical;if(!/^\s*else\b/.test(r))for(var c=e.cc.length-1;c>=0;--c){var u=e.cc[c];if(u==H)l=l.prev;else if(u!=Pt&&u!=R)break}for(;("stat"==l.type||"form"==l.type)&&("}"==s||(o=e.cc[e.cc.length-1])&&(o==W||o==K)&&!/^[,\.=+\-*:?[\(]/.test(r));)l=l.prev;a&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var p=l.type,d=s==p;return"vardef"==p?l.indented+("operator"==e.lastType||","==e.lastType?l.info.length+1:0):"form"==p&&"{"==s?l.indented:"form"==p?l.indented+i:"stat"==p?l.indented+(function(t,e){return"operator"==t.lastType||","==t.lastType||f.test(e.charAt(0))||/[,.]/.test(e.charAt(0))}(e,r)?a||i:0):"switch"!=l.info||d||0==n.doubleIndentSwitch?l.align?l.column+(d?0:1):l.indented+(d?0:i):l.indented+(/^(?:case|default)\b/.test(r)?i:2*i)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:l?null:"/*",blockCommentEnd:l?null:"*/",blockCommentContinue:l?null:" * ",lineComment:l?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:l?"json":"javascript",jsonldMode:s,jsonMode:l,expressionAllowed:Jt,skipExpression:function(e){w(e,"atom","atom","true",new t.StringStream("",2,null))}}}),t.registerHelper("wordChars","javascript",/[\w$]/),t.defineMIME("text/javascript","javascript"),t.defineMIME("text/ecmascript","javascript"),t.defineMIME("application/javascript","javascript"),t.defineMIME("application/x-javascript","javascript"),t.defineMIME("application/ecmascript","javascript"),t.defineMIME("application/json",{name:"javascript",json:!0}),t.defineMIME("application/x-json",{name:"javascript",json:!0}),t.defineMIME("application/manifest+json",{name:"javascript",json:!0}),t.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),t.defineMIME("text/typescript",{name:"javascript",typescript:!0}),t.defineMIME("application/typescript",{name:"javascript",typescript:!0})}(n(631))},589:(t,e,n)=>{!function(t){"use strict";var e={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0}
vendor: 4,189 bytes, line 1
1,optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};t.defineMode("xml",function(r,o){var i,a,s=r.indentUnit,l={},c=o.htmlMode?e:n;for(var u in c)l[u]=c[u];for(var u in o)l[u]=o[u];function p(t,e){function n(n){return e.tokenize=n,n(t,e)}var r=t.next();return"<"==r?t.eat("!")?t.eat("[")?t.match("CDATA[")?n(f("atom","]]>")):null:t.match("--")?n(f("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),n(h(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),e.tokenize=f("meta","?>"),"meta"):(i=t.eat("/")?"closeTag":"openTag",e.tokenize=d,"tag bracket"):"&"==r?(t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"))?"atom":"error":(t.eatWhile(/[^&<]/),null)}function d(t,e){var n=t.next();if(">"==n||"/"==n&&t.eat(">"))return e.tokenize=p,i=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return i="equals",null;if("<"==n){e.tokenize=p,e.state=b,e.tagName=e.tagStart=null;var r=e.tokenize(t,e);return r?r+" tag error":"tag error"}return/[\'\"]/.test(n)?(e.tokenize=function(t){var e=function(e,n){for(;!e.eol();)if(e.next()==t){n.tokenize=d;break}return"string"};return e.isInAttribute=!0,e}(n),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function f(t,e){return function(n,r){for(;!n.eol();){if(n.match(e)){r.tokenize=p;break}n.next()}return t}}function h(t){return function(e,n){for(var r;null!=(r=e.next());){if("<"==r)return n.tokenize=h(t+1),n.tokenize(e,n);if(">"==r){if(1==t){n.tokenize=p;break}return n.tokenize=h(t-1),n.tokenize(e,n)}}return"meta"}}function g(t){return t&&t.toLowerCase()}function m(t,e,n){this.prev=t.context,this.tagName=e||"",this.indent=t.indented,this.startOfLine=n,(l.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function v(t){t.context&&(t.context=t.context.prev)}function y(t,e){for(var n;;){if(!t.context)return;if(n=t.context.tagName,!l.contextGrabbers.hasOwnProperty(g(n))||!l.contextGrabbers[g(n)].hasOwnProperty(g(e)))return;v(t)}}function b(t,e,n){return"openTag"==t?(n.tagStart=e.column(),_):"closeTag"==t?T:b}function _(t,e,n){return"word"==t?(n.tagName=e.current(),a="tag",E):l.allowMissingTagName&&"endTag"==t?(a="tag bracket",E(t,0,n)):(a="error",_)}function T(t,e,n){if("word"==t){var r=e.current();return n.context&&n.context.tagName!=r&&l.implicitlyClosed.hasOwnProperty(g(n.context.tagName))&&v(n),n.context&&n.context.tagName==r||!1===l.matchClosing?(a="tag",C):(a="tag error",w)}return l.allowMissingTagName&&"endTag"==t?(a="tag bracket",C(t,0,n)):(a="error",w)}function C(t,e,n){return"endTag"!=t?(a="error",C):(v(n),b)}function w(t,e,n){return a="error",C(t,0,n)}function E(t,e,n){if("word"==t)return a="attribute",S;if("endTag"==t||"selfcloseTag"==t){var r=n.tagName,o=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==t||l.autoSelfClosers.hasOwnProperty(g(r))?y(n,r):(y(n,r),n.context=new m(n,r,o==n.indented)),b}return a="error",E}function S(t,e,n){return"equals"==t?x:(l.allowMissing||(a="error"),E(t,0,n))}function x(t,e,n){return"string"==t?O:"word"==t&&l.allowUnquoted?(a="string",E):(a="error",E(t,0,n))}function O(t,e,n){return"string"==t?O:E(t,0,n)}return p.isInText=!0,{startState:function(t){var e={tokenize:p,state:b,indented:t||0,tagName:null,tagStart:null,context:null};return null!=t&&(e.baseIndent=t),e},token:function(t,e){if(!e.tagName&&t.sol()&&(e.indented=t.indentation()),t.eatSpace())return null;i=null;var n=e.tokenize(t,e);return(n||i)&&"comment"!=n&&(a=null,e.state=e.state(i||n,t,e),a&&(n="error"==a?n+" error":a)),n},indent:function(e,n,r){var o=e.context;
1if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+s;if(o&&o.noIndent)return t.Pass;if(e.tokenize!=d&&e.tokenize!=p)return r?r.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==l.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+s*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/<!\[CDATA\[/.test(n))return 0;var i=n&&/^<(\/)?([\w_:\.-]*)/.exec(n);if(i&&i[1])for(;o;){if(o.tagName==i[2]){o=o.prev;break}if(!l.implicitlyClosed.hasOwnProperty(g(o.tagName)))break;o=o.prev}else if(i)for(;o;){var a=l.contextGrabbers[g(o.tagName)];if(!a||!a.hasOwnProperty(g(i[2])))break;o=o.prev}for(;o&&o.prev&&!o.startOfLine;)o=o.prev;return o?o.indent+s:e.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(t){t.state==x&&(t.state=E)},xmlCurrentTag:function(t){return t.tagName?{name:t.tagName,close:"closeTag"==t.type}:null},xmlCurrentContext:function(t){for(var e=[],n=t.context;n;n=n.prev)e.push(n.tagName);return e.reverse()}}}),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})}(n(631))},858:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r={run:function(t){t.DomComponents.clear(),t.CssComposer.clear()}}},884:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>a});var r=n(50),o=n(163),i=n(668);const a={run:function(t){(0,r.bindAll)(this,"onKeyUp","enableDragger","disableDragger"),this.editor=t,this.canvasModel=this.canvas.getCanvasView().model,this.toggleMove(1)},stop:function(t){this.toggleMove(),this.disableDragger()},onKeyUp:function(t){" "===(0,o.getKeyChar)(t)&&this.editor.stopCommand(this.id)},enableDragger:function(t){this.toggleDragger(1,t)},disableDragger:function(t){this.toggleDragger(0,t)},toggleDragger:function(t,e){var n=this.canvasModel,r=this.em,o=this.dragger,a=t?"add":"remove";this.getCanvas().classList[a]("".concat(this.ppfx,"is__grabbing")),o||(o=new i.Z({getPosition:function(){return{x:n.get("x"),y:n.get("y")}},setPosition:function(t){var e=t.x,r=t.y;n.set({x:e,y:r})},onStart:function(t,e){r.trigger("canvas:move:start",e)},onDrag:function(t,e){r.trigger("canvas:move",e)},onEnd:function(t,e){r.trigger("canvas:move:end",e)}}),this.dragger=o),t?o.start(e):o.stop()},toggleMove:function(t){var e=this.ppfx,n=t?"add":"remove",r=t?"on":"off",i={on:o.on,off:o.off},a=this.getCanvas(),s=["".concat(e,"is__grab")];
1!t&&s.push("".concat(e,"is__grabbing")),s.forEach(function(t){return a.classList[n](t)}),i[r](document,"keyup",this.onKeyUp),i[r](a,"mousedown",this.enableDragger),i[r](document,"mouseup",this.disableDragger)}}},790:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>s,defineCommand:()=>a});var r,o=n(346),i=(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function a(t){return t}const s=function(t){function e(e){var n=t.call(this,0)||this;n.config=e||{},n.em=n.config.em||{};var r=n.config.stylePrefix;return n.pfx=r,n.ppfx=n.config.pStylePrefix,n.hoverClass="".concat(r,"hover"),n.badgeClass="".concat(r,"badge"),n.plhClass="".concat(r,"placeholder"),n.freezClass="".concat(n.ppfx,"freezed"),n.canvas=n.em.Canvas,n.init(n.config),n}return i(e,t),e.prototype.onFrameScroll=function(t){},e.prototype.getCanvas=function(){return this.canvas.getElement()},e.prototype.getCanvasBody=function(){return this.canvas.getBody()},e.prototype.getCanvasTools=function(){return this.canvas.getToolsEl()},e.prototype.offset=function(t){var e=t.getBoundingClientRect();return{top:e.top+t.ownerDocument.body.scrollTop,left:e.left+t.ownerDocument.body.scrollLeft}},e.prototype.init=function(t){},e.prototype.callRun=function(t,e){void 0===e&&(e={});var n=this.id;if(t.trigger("run:".concat(n,":before"),e),!e||!e.abort){var r=e.sender||t,o=this.run(t,r,e);return t.trigger("run:".concat(n),o,e),t.trigger("run",n,o,e),o}t.trigger("abort:".concat(n),e)},e.prototype.callStop=function(t,e){void 0===e&&(e={});var n=this.id,r=e.sender||t;t.trigger("stop:".concat(n,":before"),e);var o=this.stop(t,r,e);return t.trigger("stop:".concat(n),o,e),t.trigger("stop",n,o,e),o},e.prototype.stopCommand=function(t){this.em.Commands.stop(this.id,t)},e.prototype.run=function(t,e,n){},e.prototype.stop=function(t,e,n){},e}(o.Hn)},180:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>i});var r=n(50),o=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))};const i={run:function(t,e,n){var i=this;void 0===n&&(n={});var a=[],s=n.component||t.getSelectedAll();return(s=(0,r.isArray)(s)?o([],s,!0):[s]).filter(Boolean).forEach(function(t){if(!t.get("removable"))return a.push(t),i.em.logWarning("The element is not removable",{component:t});t.remove()}),t.select(a),s}}},544:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>s});var r=n(50),o=n(668),i=function(){return i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},i.apply(this,arguments)},a="dmode";const s={run:function(t,e,n){var s=this;void 0===n&&(n={}),(0,r.bindAll)(this,"setPosition","onStart","onDrag","onEnd","getPosition","getGuidesStatic","renderGuide","getGuidesTarget");var l=n.target,c=n.event,u=n.mode,p=n.dragger,d=void 0===p?{}:p,f=l.getEl(),h=i({doc:f.ownerDocument,onStart:this.onStart,onEnd:this.onEnd,onDrag:this.onDrag,getPosition:this.getPosition,setPosition:this.setPosition,guidesStatic:function(){return s.guidesStatic},guidesTarget:function(){return s.guidesTarget}},d);this.setupGuides(),this.opts=n,this.editor=t,this.em=t.getModel(),this.target=l,this.isTran="translate"==u,this.guidesContainer=this.getGuidesContainer(),this.guidesTarget=this.getGuidesTarget(),this.guidesStatic=this.getGuidesStatic();var g=this.dragger;return g?g.setOptions(h):(g=new o.Z(h),this.dragger=g),c&&g.start(c),this.toggleDrag(1),this.em.trigger("".concat(a,":start"),this.getEventOpts()),g},getEventOpts:function(){return{mode:this.opts.mode,target:this.target,guidesTarget:this.guidesTarget,guidesStatic:this.guidesStatic}},stop:function(){this.toggleDrag()}
1,setupGuides:function(){(this.guides||[]).forEach(function(t){var e=t.guide;e&&e.parentNode.removeChild(e)}),this.guides=[]},getGuidesContainer:function(){var t=this,e=this.guidesEl;if(!e){var n=this,o=n.editor,i=n.em,a=n.opts,s=o.getConfig().stylePrefix,l=document.createElement("div"),c=document.createElement("div"),u='<div class="'.concat(s,"guide-info__line ").concat(s,'danger-bg">\n <div class="').concat(s,"guide-info__content ").concat(s,'danger-color"></div>\n </div>');(e=document.createElement("div")).className="".concat(s,"guides"),l.className="".concat(s,"guide-info ").concat(s,"guide-info__x"),c.className="".concat(s,"guide-info ").concat(s,"guide-info__y"),l.innerHTML=u,c.innerHTML=u,e.appendChild(l),e.appendChild(c),o.Canvas.getGlobalToolsEl().appendChild(e),this.guidesEl=e,this.elGuideInfoX=l,this.elGuideInfoY=c,this.elGuideInfoContentX=l.querySelector(".".concat(s,"guide-info__content")),this.elGuideInfoContentY=c.querySelector(".".concat(s,"guide-info__content")),i.on("canvas:update frame:scroll",(0,r.debounce)(function(){var e;t.updateGuides(),a.debug&&(null===(e=t.guides)||void 0===e||e.forEach(function(e){return t.renderGuide(e)}))},200))}return e},getGuidesStatic:function(){var t=this,e=[],n=this.target.getEl(),o=n.parentNode,i=void 0===o?{}:o;return(0,r.each)(i.children,function(r){return e=e.concat(n!==r?t.getElementGuides(r):[])}),e.concat(this.getElementGuides(i))},getGuidesTarget:function(){return this.getElementGuides(this.target.getEl())},updateGuides:function(t){var e,n,o=this;(t||this.guides).forEach(function(t){var i=t.origin,a=e===i?n:o.getElementPos(i);e=i,n=a,(0,r.each)(o.getGuidePosUpdate(t,a),function(e,n){return t[n]=e}),t.originRect=a})},getGuidePosUpdate:function(t,e){var n={},r=e.top,o=e.height,i=e.left,a=e.width;switch(t.type){case"t":n.y=r;break;case"b":n.y=r+o;break;case"l":n.x=i;break;case"r":n.x=i+a;break;case"x":n.x=i+a/2;break;case"y":n.y=r+o/2}return n},renderGuide:function(t){void 0===t&&(t={});var e=t.guide||document.createElement("div"),n="px",r=t.active?2:1,o=e.children[0];return e.style="position: absolute; background-color: ".concat(t.active?"green":"red",";"),e.children.length||((o=document.createElement("div")).style="position: absolute; color: red; padding: 5px; top: 0; left: 0;",e.appendChild(o)),t.y?(e.style.width="100%",e.style.height="".concat(r).concat(n),e.style.top="".concat(t.y).concat(n),e.style.left=0):(e.style.width="".concat(r).concat(n),e.style.height="100%",e.style.left="".concat(t.x).concat(n),e.style.top="0".concat(n)),!t.guide&&this.guidesContainer.appendChild(e),e},getElementPos:function(t){return this.editor.Canvas.getElementPos(t,{noScroll:1})},getElementGuides:function(t){var e=this,n=this.opts,r=this.getElementPos(t),o=r.top,a=r.height,s=r.left,l=r.width,c=[{type:"t",y:o},{type:"b",y:o+a},{type:"l",x:s},{type:"r",x:s+l},{type:"x",x:s+l/2},{type:"y",y:o+a/2}].map(function(o){return i(i({},o),{origin:t,originRect:r,guide:n.debug&&e.renderGuide(o)})});return c.forEach(function(t){var n;return null===(n=e.guides)||void 0===n?void 0:n.push(t)}),c},getTranslate:function(t,e){void 0===e&&(e="x");var n=0;return(t||"").split(" ").forEach(function(t){var r=t.trim(),o="translate".concat(e.toUpperCase(),"(");0===r.indexOf(o)&&(n=parseFloat(r.replace(o,"")))}),n},setTranslate:function(t,e,n){var r="translate".concat(e.toUpperCase(),"("),o="".concat(r).concat(n,")"),i=(t||"").split(" ").map(function(t){return 0===t.trim().indexOf(r)&&(t=o),t}).join(" ");return i.indexOf(r)<0&&(i+=" ".concat(o)),i},getPosition:function(){var t=this.target,e=this.isTran,n=t.getStyle(),r=n.left,o=n.top,i=n.transform,a=0,s=0;return e?(a=this.getTranslate(i),s=this.getTranslate(i,"y")):(a=parseFloat(r||0),s=parseFloat(o||0)),{x:a,y:s}},setPosition:function(t){var e=t.x,n=t.y,o=t.end,i=t.position,a=t.width,s=t.height,l=this,c=l.target,u=l.isTran,p=l.em,d=!o,f="".concat(parseInt(e,10)).concat("px"),h="".concat(parseInt(n,10)).concat("px"),g={};if(u){var m=c.getStyle().transform||"";m=this.setTranslate(m,"x",f),g={transform:m=this.setTranslate(m,"y",h),__p:d},c.addStyle(g,{avoidStore:!o})}else{var v={position:i,width:a,height:s},y={left:f,top:h,__p:d};(0,r.keys)(v).forEach(function(t){var e=v[t];e&&(y[t]=e)}),g=y,c.addStyle(g,{avoidStore:!o})}null==p||p.Styles.__emitCmpStyleUpdate(g,{components:p.getSelected()})},_getDragData:function(){var t=this.target;return{target:t,parent:t.parent(),index:t.index()}},onStart:function(t){var e=this,n=e.target,r=e.editor,o=e.isTran,i=e.opts,a=i.center,s=i.onStart,l=r.Canvas,c=n.getStyle(),u="absolute",p=[u,"relative"];if(s&&s(this._getDragData()),!o&&c.position!==u){var d=l.offset(n.getEl()),f=d.left,h=d.top,g=d.width,m=d.height,v=n.parent(),y=void 0;do{var b=v.getStyle();y=p.indexOf(b.position)>=0?v:null,v=v.parent()}while(v&&!y);if(a){var _=l.getMouseRelativeCanvas(t);f=_.x,h=_.y}else if(y){var T=l.offset(y.getEl());f-=T.left,h-=T.top}this.setPosition({x:f,y:h,width:"".concat(g,"px"),height:"".concat(m,"px"),position:u})}},onDrag:function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=this.guidesTarget,o=this.opts,i=o.onDrag;this.updateGuides(r),o.debug&&r.forEach(function(e){return t.renderGuide(e)}),o.guidesInfo&&this.renderGuideInfo(r.filter(function(t){return t.active})),i&&i(this._getDragData())},onEnd:function(t,e,n){void 0===n&&(n={});var r=this,o=r.editor,s=r.opts,l=r.id,c=s.onEnd;c&&c(t,n,i(i({event:t},n),this._getDragData())),o.stopCommand(l),this.hideGuidesInfo(),this.em.trigger("".concat(a,":end"),this.getEventOpts())},hideGuidesInfo:function(){var t=this;
1["X","Y"].forEach(function(e){var n=t["elGuideInfo".concat(e)];n&&(n.style.display="none")})},renderGuideInfo:function(t){var e=this;void 0===t&&(t=[]);var n=this.guidesStatic;this.hideGuidesInfo(),t.forEach(function(t){var o=t.origin,s=t.x,l=e.getElementPos(o),c=(0,r.isUndefined)(s)?"y":"x",u="y"===c,p=l[u?"left":"top"],d=l.rect[u?"left":"top"],f=u?p+l.width:p+l.height,h=u?d+l.rect.width:d+l.rect.height,g=e["elGuideInfo".concat(c.toUpperCase())],m=e["elGuideInfoContent".concat(c.toUpperCase())],v=g.style,y=null==n?void 0:n.filter(function(e){return e.type===t.type}).map(function(t){var e=t.originRect,n=e.left,r=e.width,o=e.top,i=e.height,a=u?n+r:o+i;return{gap:a<p?p-a:(u?n:o)-f,guide:t}}).filter(function(t){return t.gap>0}).sort(function(t,e){return t.gap-e.gap}).map(function(t){return t.guide})[0];if(y){var b=y.originRect,_=b.left,T=b.width,C=b.top,w=b.height,E=b.rect,S=u?_<l.left:C<l.top,x=u?_:C,O=u?E.left:E.top,A=u?_+T:C+w,k=u?E.left+E.width:E.top+E.height,P=u?t.y:t.x,N=S?A:f,M="".concat(P,"px"),L=S?p-A:x-f,I=S?d-k:O-h;v.display="",v[u?"top":"left"]=M,v[u?"left":"top"]="".concat(N,"px"),v[u?"width":"height"]="".concat(L,"px"),m.innerHTML="".concat(Math.round(I),"px"),e.em.trigger("".concat(a,":active"),i(i({},e.getEventOpts()),{guide:t,guidesStatic:n,matched:y,posFirst:P,posSecond:N,size:L,sizeRaw:I,elGuideInfo:g,elGuideInfoCnt:m}))}})},toggleDrag:function(t){var e=this.ppfx,n=this.editor,r=t?"add":"remove",o=["".concat(e,"is__grabbing")],i=n.Canvas,a=i.getBody();o.forEach(function(t){return a.classList[r](t)}),i[t?"startAutoscroll":"stopAutoscroll"]()}}},236:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r={run:function(t){if(t.Canvas.hasFocus()){var e=[];t.getSelectedAll().forEach(function(t){var n=t.components(),r=n&&n.filter(function(t){return t.get("selectable")})[0];r&&e.push(r)}),e.length&&t.select(e)}}}},368:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r={run:function(t,e,n){if(void 0===n&&(n={}),t.Canvas.hasFocus()||n.force){var r=[];t.getSelectedAll().forEach(function(t){for(var e=t.parent();e&&!e.get("selectable");)e=e.parent();e&&r.push(e)}),r.length&&t.select(r)}}}},243:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r={run:function(t){if(t.Canvas.hasFocus()){var e=[];t.getSelectedAll().forEach(function(t){var n=t.parent();if(n){var r,o=n.components().length,i=0,a=0;do{i++,r=(a=t.index()+i)<=o?n.getChildAt(a):null}while(r&&!r.get("selectable"));e.push(r||t)}}),e.length&&t.select(e)}}}},400:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r={run:function(t){if(t.Canvas.hasFocus()){var e=[];t.getSelectedAll().forEach(function(t){var n=t.parent();if(n){var r,o=0,i=0;do{o++,r=(i=t.index()-o)>=0?n.getChildAt(i):null}while(r&&!r.get("selectable"));e.push(r||t)}}),e.length&&t.select(e)}}}},910:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>o});var r=n(50);const o={run:function(t,e,n){void 0===n&&(n={});var o=n.target,i=[];if(!o.get("styles"))return i;var a=o.get("type"),s=t.Pages.getAllWrappers();if(!(0,r.flatten)(s.map(function(t){return t.findType(a)})).length){var l=t.CssComposer.getAll();i=l.filter(function(t){return t.get("group")==="cmp:".concat(a)}),l.remove(i)}return i}}},744:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>o});var r=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))};const o={run:function(t){var e=t.getModel(),n=r([],t.getSelectedAll(),!0);n.length&&e.set("clipboard",n)}}},517:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>a});var r=n(50),o=n(895),i=n(407);const a=(0,r.extend)({},i.default,{init:function(){(0,r.bindAll)(this,"startDelete","stopDelete","onDelete"),this.hoverClass=this.pfx+"hover-delete",this.badgeClass=this.pfx+"badge-red"},enable:function(){this.$el.find("*").mouseover(this.startDelete).mouseout(this.stopDelete).click(this.onDelete)},startDelete:function(t){t.stopPropagation();var e=(0,o.default)(t.target);e.data("model").get("removable")&&(e.addClass(this.hoverClass),this.attachBadge(e.get(0)))},stopDelete:function(t){t.stopPropagation(),(0,o.default)(t.target).removeClass(this.hoverClass),this.badge&&this.badge.css({left:-1e3,top:-1e3})},onDelete:function(t){t.stopPropagation();var e=(0,o.default)(t.target);e.data("model").get("removable")&&(e.data("model").destroy(),this.removeBadge(),this.clean())},updateBadgeLabel:function(t){this.badge.html("Remove "+t.getName())}})},457:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>o});var r=n(491);const o={run:function(t,e,n){var o=this;void 0===n&&(n={}),e&&e.set&&e.set("active",0);var i=t.getConfig(),a=t.Modal,s=i.stylePrefix;if(this.cm=t.CodeManager||null,!this.editors){var l=this.buildEditor("htmlmi
1xed","hopscotch","HTML"),c=this.buildEditor("css","hopscotch","CSS");this.htmlEditor=l.model,this.cssEditor=c.model;var u=(0,r.ut)("div",{class:"".concat(s,"export-dl")});u.appendChild(l.el),u.appendChild(c.el),this.editors=u}a.open({title:i.textViewCode,content:this.editors}).getModel().once("change:open",function(){return t.stopCommand("".concat(o.id))}),this.htmlEditor.setContent(t.getHtml(n.optsHtml)),this.cssEditor.setContent(t.getCss(n.optsCss))},stop:function(t){var e=t.Modal;e&&e.close()},buildEditor:function(t,e,n){var r=this.em.CodeManager,o=r.createViewer({label:n,codeName:t,theme:e});return{model:o,el:new r.EditorView({model:o,config:r.getConfig()}).render().el}}}},975:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>o});var r=n(50);const o={isEnabled:function(){var t=document;return!!(t.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement)},enable:function(t){var e="";return t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?(e="webkit",t.webkitRequestFullscreen()):t.mozRequestFullScreen?(e="moz",t.mozRequestFullScreen()):t.msRequestFullscreen&&t.msRequestFullscreen(),e},disable:function(){var t=document;this.isEnabled()&&(t.exitFullscreen?t.exitFullscreen():t.webkitExitFullscreen?t.webkitExitFullscreen():t.mozCancelFullScreen?t.mozCancelFullScreen():t.msExitFullscreen&&t.msExitFullscreen())},fsChanged:function(t){this.isEnabled()||(this.stopCommand({sender:this.sender}),document.removeEventListener("".concat(t||"","fullscreenchange"),this.fsChanged))},run:function(t,e,n){void 0===n&&(n={}),this.sender=e;var o=n.target,i=(0,r.isElement)(o)?o:document.querySelector(o),a=this.enable(i||t.getContainer());this.fsChanged=this.fsChanged.bind(this,a),document.addEventListener(a+"fullscreenchange",this.fsChanged),t.trigger("change:canvasOffset")},stop:function(t,e){e&&e.set&&e.set("active",!1),this.disable(),t&&t.trigger("change:canvasOffset")}}},191:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>l});var r=n(50),o=n(895),i=n(163),a=n(407),s=n(189);const l=(0,r.extend)({},s.default,a.default,{init:function(t){a.default.init.apply(this,arguments),(0,r.bindAll)(this,"initSorter","rollback","onEndMove"),this.opt=t,this.hoverClass=this.ppfx+"highlighter-warning",this.badgeClass=this.ppfx+"badge-warning",this.noSelClass=this.ppfx+"no-select"},enable:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];a.default.enable.apply(this,t),this.getBadgeEl().addClass(this.badgeClass),this.getHighlighterEl().addClass(this.hoverClass);var n=this.$wrapper;n.css("cursor","move"),n.on("mousedown",this.initSorter),n.addClass(this.noSelClass)},toggleClipboard:function(){},initSorter:function(t){var e=(0,o.default)(t.target).data("model").get("draggable");e&&(this.cacheEl=null,this.startSelectPosition(t.target,this.frameEl.contentDocument),this.sorter.draggable=e,this.sorter.onEndMove=this.onEndMove.bind(this),this.stopSelectComponent(),this.$wrapper.off("mousedown",this.initSorter),(0,i.on)(this.getContentWindow(),"keydown",this.rollback))},initSorterFromModel:function(t){var e=t.get("draggable");if(e){this.cacheEl=null;var n=t.view.el;this.startSelectPosition(n,this.frameEl.contentDocument),this.sorter.draggable=e,this.sorter.onEndMove=this.onEndMoveFromModel.bind(this),this.stopSelectComponent(),(0,i.on)(this.getContentWindow(),"keydown",this.rollback)}},initSorterFromModels:function(t){this.cacheEl=null;var e=t[t.length-1],n=(this.em.get("currentFrame")||{}).model,r=e.getEl(n),o=r.ownerDocument;this.startSelectPosition(r,o,{onStart:this.onStart}),this.sorter.draggable=e.get("draggable"),this.sorter.toMove=t,this.sorter.onMoveClb=this.onDrag,this.sorter.onEndMove=this.onEndMoveFromModel.bind(this),this.stopSelectComponent(),(0,i.on)(this.getContentWindow(),"keydown",this.rollback)},onEndMoveFromModel:function(){(0,i.off)(this.getContentWindow(),"keydown",this.rollback)},onEndMove:function(){this.enable(),(0,i.off)(this.getContentWindow(),"keydown",this.rollback)},onSelect:function(t,e){},rollback:function(t,e){(27==(t.which||t.keyCode)||e)&&(this.sorter.moved=!1,this.sorter.endMove())},getBadgeEl:function(){return this.$badge||(this.$badge=(0,o.default)(this.getBadge())),this.$badge},getHighlighterEl:function(){return this.$hl||(this.$hl=(0,o.default)(this.canvas.getHighlighter())),this.$hl},stop:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];a.default.stop.apply(this,t),this.getBadgeEl().removeClass(this.badgeClass),this.getHighlighterEl().removeClass(this.hoverClass),this.$wrapper.css("cursor","").unbind().removeClass(this.noSelClass)}})},912:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>i});var r=n(50),o=n(491);const i={open:function(t){var e=this,n=this,o=n.editor,i=n.title,a=n.config,s=n.am,l=a.custom;if((0,r.isFunction)(l.open))return l.open(s.__customData());o.Modal.open({title:i,content:t}).onceClose(function(){return o.stopCommand(e.id)})},close:function(){var t=this.config.custom;if((0,r.isFunction)(t.close))return t.close(this.am.__customData());var e=this.editor.Modal;e&&e.close()},run:function(t,e,n){void 0===n&&(n={});var r=t.AssetManager,i=r.getConfig(),a=n.types,s=void 0===a?[]:a,l=n.accept,c=n.select;if(this.title=n.modalTitle||t.t("assetManager.modalTitle")||"",this.editor=t,this.config=i,this.am=r,r.setTarget(n.target),r.onClick(n.onClick),r.onDblClick(n.onDblClick),r.onSelect(n.onSelect),r.__behaviour({select:c,types:s,options:n}),i.custom)this.rendered=this.rendered||(0,o.ut)("div"),this.rendered.className="".concat(i.stylePrefix,"custom-wrp"),r.__behaviour({container:this.rendered}),r.__trgCustom();else{if(!this.rendered||s){var u=r.getAll().filter(function(t){return t});s&&s.length&&(u=u.filter(function(t){return-1!==s.indexOf(t.get("type"))})),r.render(u),this.rendered=r.getContainer()}if(l){var p=this.rendered.querySelector("input#".concat(i.stylePrefix,"uploadFile"));p&&p.setAttribute("accept",l)}}return this.open(this.rendered),this},stop:function(t){this.editor=t,this.close(this.rendered)}}},117:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>i});var r=n(50),o=n(491);const i={open:function(){var t=this,e=t.container,n=t.editor,o=t.bm,i=t.config,a=i.custom,s=i.appendTo;if((0,r.isFunction)(a.open))return a.open(o.__customData());
1if(this.firstRender&&!s){var l="views-container",c=n.Panels;(c.getPanel(l)||c.addPanel({id:l})).set("appendContent",e).trigger("change:appendContent"),a||e.appendChild(o.render())}e&&(e.style.display="block")},close:function(){var t=this.container,e=this.config.custom;if((0,r.isFunction)(e.close))return e.close(this.bm.__customData());t&&(t.style.display="none")},run:function(t){var e=t.Blocks;this.config=e.getConfig(),this.firstRender=!this.container,this.container=this.container||(0,o.ut)("div"),this.editor=t,this.bm=e;var n=this.container;e.__behaviour({container:n}),this.config.custom&&e.__trgCustom(),this.open()},stop:function(){this.close()}}},614:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r={run:function(t){var e=t.LayerManager,n=t.Panels,r=e.getConfig();if(!r.appendTo){if(!this.layers){var o="views-container",i=document.createElement("div"),a=n.getPanel(o)||n.addPanel({id:o});r.custom?e.__trgCustom({container:i}):i.appendChild(e.render()),a.set("appendContent",i).trigger("change:appendContent"),this.layers=i}this.layers.style.display="block"}},stop:function(){var t=this.layers;t&&(t.style.display="none")}}},801:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>o});var r=n(895);const o={run:function(t,e){if(this.sender=e,!this.$cnt){var n=t.getConfig(),o=t.Panels,i=t.DeviceManager,a=t.SelectorManager,s=t.StyleManager,l="change:appendContent",c=(0,r.default)("<div></div>"),u=(0,r.default)("<div></div>"),p=(0,r.default)("<div></div>"),d=(0,r.default)("<div></div>");if(this.$cnt=c,this.$cntInner=u,u.append(p),u.append(d),c.append(u),i&&n.showDevices){var f=o.addPanel({id:"devices-c"}),h=i.render();f.set("appendContent",h).trigger(l)}var g=a.getConfig();g.custom?a.__trgCustom({container:p.get(0)}):g.appendTo||p.append(a.render([])),this.sm=s;var m=s.getConfig(),v=m.stylePrefix;this.$header=(0,r.default)('<div class="'.concat(v,'header">').concat(t.t("styleManager.empty"),"</div>")),c.append(this.$header),m.custom?s.__trgCustom({container:d.get(0)}):m.appendTo||d.append(s.render());var y="views-container";(o.getPanel(y)||o.addPanel({id:y})).set("appendContent",c).trigger(l);var b=t.getModel();this.listenTo(b,s.events.target,this.toggleSm)}this.toggleSm()},toggleSm:function(){var t=this,e=t.sender,n=t.sm,r=t.$cntInner,o=t.$header;e&&e.get&&!e.get("active")||!n||(n.getSelected()?(null==r||r.show(),null==o||o.hide()):(null==r||r.hide(),null==o||o.show()))},stop:function(){var t,e;null===(t=this.$cntInner)||void 0===t||t.hide(),null===(e=this.$header)||void 0===e||e.hide()}}},395:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>o});var r=n(895);const o={run:function(t,e){this.sender=e;var n,o=t.getModel(),i=t.Config.stylePrefix,a=t.TraitManager,s=a.getConfig();if(!s.appendTo){if(!this.$cn){this.$cn=(0,r.default)("<div></div>"),this.$cn2=(0,r.default)("<div></div>"),this.$cn.append(this.$cn2),this.$header=(0,r.default)("<div>").append('<div class="'.concat(s.stylePrefix,'header">').concat(o.t("traitManager.empty"),"</div>")),this.$cn.append(this.$header),s.custom?a.__trgCustom({container:this.$cn2.get(0)}):(this.$cn2.append('<div class="'.concat(i,'traits-label">').concat(o.t("traitManager.label"),"</div>")),this.$cn2.append(a.render()));var l=t.Panels;null==(n=l.getPanel("views-container")?l.getPanel("views-container"):l.addPanel({id:"views-container"}))||n.set("appendContent",this.$cn.get(0)).trigger("change:appendContent"),this.target=t.getModel(),this.listenTo(this.target,"component:toggled",this.toggleTm)}this.toggleTm()}},toggleTm:function(){var t=this.sender;t&&t.get&&!t.get("active")||(1===this.target.getSelectedAll().length?(this.$cn2.show(),this.$header.hide()):(this.$cn2.hide(),this.$header.show()))},stop:function(){this.$cn2&&this.$cn2.hide(),this.$header&&this.$header.hide()}}},98:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>o});var r=n(50);const o={run:function(t,e,n){void 0===n&&(n={});var o=t.getModel().get("clipboard"),i=t.getSelected();o&&i&&(t.getSelectedAll().forEach(function(e){var i=e.collection;if(i){var a,s={at:e.index()+1,action:n.action||"paste-component"};if((0,r.contains)(o,e)&&e.get("copyable"))a=i.add(e.clone(),s);
1else{var l=o.filter(function(t){return t.get("copyable")}).filter(function(n){return t.Components.canMove(e.parent(),n).result});a=i.add(l.map(function(t){return t.clone()}),s)}(a=(0,r.isArray)(a)?a:[a]).forEach(function(e){return t.trigger("component:paste",e)})}}),i.emitUpdate())}}},129:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>a});var r=n(50),o=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},i="core:component-outline";const a={getPanels:function(t){return this.panels||(this.panels=t.Panels.getPanels()),this.panels},preventDrag:function(t){t.abort=1},tglEffects:function(t){var e=this.em,n=t?"on":"off";if(e){var o=e.Canvas,i=o.getBody(),a=o.getToolbarEl();a&&(a.style.display=t?"none":"");var s=i.querySelectorAll(".".concat(this.ppfx,"no-pointer"));(0,r.each)(s,function(e){return e.style.pointerEvents=t?"all":""}),e[n]("run:tlb-move:before",this.preventDrag)}},run:function(t,e){var n=this;this.sender=e,this.selected=o([],t.getSelectedAll(),!0),t.select(),this.shouldRunSwVisibility||(this.shouldRunSwVisibility=t.Commands.isActive(i)),this.shouldRunSwVisibility&&t.stopCommand(i),t.getModel().stopDefault();var r=this.getPanels(t),a=t.Canvas.getElement(),s=t.getEl(),l=t.Config.stylePrefix;if(!this.helper){var c=document.createElement("span");c.className="".concat(l,"off-prv fa fa-eye-slash"),s.appendChild(c),c.onclick=function(){return n.stopCommand()},this.helper=c}this.helper.style.display="inline-block",r.forEach(function(t){return t.set("visible",!1)});var u=a.style;u.width="100%",u.height="100%",u.top="0",u.left="0",u.padding="0",u.margin="0",t.refresh(),this.tglEffects(1)},stop:function(t){var e=this.sender,n=void 0===e?{}:e,r=this.selected;n.set&&n.set("active",0);var o=this.getPanels(t);this.shouldRunSwVisibility&&(t.runCommand(i),this.shouldRunSwVisibility=!1),t.getModel().runDefault(),o.forEach(function(t){return t.set("visible",!0)}),t.Canvas.getElement().setAttribute("style",""),r&&t.select(r),delete this.selected,this.helper&&(this.helper.style.display="none"),t.refresh(),this.tglEffects()}}},116:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>o});var r=function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)};const o={run:function(t,e,n){var o=n||{},i=t.Canvas,a=i.getCanvasView(),s=r({appendTo:i.getResizerEl(),prefix:t.getConfig().stylePrefix,posFetcher:a.getElementPos.bind(a),mousePosFetcher:i.getMouseRelativePos},o.options||{}),l=this.canvasResizer;return l&&!o.forceNew||(this.canvasResizer=new t.Utils.Resizer(s),l=this.canvasResizer),l.setOptions(s,!0),l.blur(),l.focus(o.el),l},stop:function(){var t;null===(t=this.canvasResizer)||void 0===t||t.blur()}}},407:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>w});var r,o=n(50),i=n(895),a=n(346),s=(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});const l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e.prototype.defaults=function(){return{command:"",attributes:{}}},e}(a.Hn);var c=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e}(a.FE);const p=u;u.prototype.model=l;var d=n(330),f=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),h=function(){return h=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},h.apply(this,arguments)};const g=function(t){function e(e){var n=t.call(this,e)||this;return n.em=e.config.em,n}return f(e,t),e.prototype.events=function(){return this.model.get("events")||{mousedown:"handleClick"}},e.prototype.attributes=function(){return this.model.get("attributes")},e.prototype.handleClick=function(t){t.preventDefault(),t.stopPropagation();var e=this.em,n=e.Canvas.getFrameEl().getBoundingClientRect(),r=n.left,o=n.top,i=h(h({},t),{clientX:t.clientX-r,clientY:t.clientY-o});e.trigger("toolbar:run:before",{event:i}),this.execCommand(i)},e.prototype.execCommand=function(t){var e=this.em,n={event:t},r=this.model.get("command"),i=e.Editor;
1(0,o.isFunction)(r)&&r(i,null,n),(0,o.isString)(r)&&i.runCommand(r,n)},e.prototype.render=function(){var t=this,e=t.em,n=t.$el,r=t.model,o=r.get("id"),i=r.get("label"),a=e.getConfig().stylePrefix;return n.addClass("".concat(a,"toolbar-item")),o&&n.addClass("".concat(a,"toolbar-item__").concat(o)),i&&n.append(i),this},e}(a.G7);var m=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),v=function(t){function e(e){var n=t.call(this,e)||this,r=e.em;return n.em=r,n.config={em:r},n.listenTo(n.collection,"reset",n.render),n}return m(e,t),e.prototype.onRender=function(){var t=this.em.config.stylePrefix;this.el.className="".concat(t,"toolbar-items")},e}(d.Z);const y=v;v.prototype.itemView=g;var b,_=n(491),T=n(163),C=function(){return C=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},C.apply(this,arguments)};const w={init:function(t){(0,o.bindAll)(this,"onHover","onOut","onClick","onFrameScroll","onFrameUpdated","onContainerChange")},enable:function(){this.frameOff=this.canvasOff=this.adjScroll=null,this.startSelectComponent(),b=!0},startSelectComponent:function(){this.toggleSelectComponent(1),this.em.getSelected()&&this.onSelect()},stopSelectComponent:function(){this.toggleSelectComponent()},toggleSelectComponent:function(t){var e=this,n=this.em,r=n.getConfig().listenToEl,o=n.getContainer().parentNode,i=t?"on":"off",a={on:T.on,off:T.off};!r.length&&o&&r.push(o),a[i](window,"resize",this.onFrameUpdated),a[i](r,"scroll",this.onContainerChange),n[i]("component:toggled component:update undo redo",this.onSelect,this),n[i]("change:componentHovered",this.onHovered,this),n[i]("component:resize styleable:change component:input",this.updateGlobalPos,this),n[i]("component:update:toolbar",this._upToolbar,this),n[i]("change:canvasOffset",this.updateAttached,this),n[i]("frame:updated",this.onFrameUpdated,this),n[i]("canvas:updateTools",this.onFrameUpdated,this),n.Canvas.getFrames().forEach(function(t){var n=t.view,r=null==n?void 0:n.getWindow();r&&function(t,n){a[i](n,"mouseover",e.onHover),a[i](n,"mouseleave",e.onOut),a[i](n,"click",e.onClick),a[i](t,"scroll",e.onFrameScroll,!0)}(r,null==n?void 0:n.getBody())})},onHover:function(t){t.stopPropagation();var e=this.em,n=t.target,r=(0,T.getViewEl)(n),o=r&&r._getFrame(),a=(0,i.default)(n),s=a.data("model");if(!s)for(var l=a.parent();!s&&l.length&&!(0,_.Mx)(l[0]);)s=l.data("model"),l=l.parent();this.currentDoc=n.ownerDocument,e.setHovered(s,{useValid:!0}),o&&e.set("currentFrame",o)},onFrameUpdated:function(){this.updateLocalPos(),this.updateGlobalPos()},onHovered:function(t,e){var n,r=this,o={};e?null===(n=e.views)||void 0===n||n.forEach(function(t){var n=t.el,i=r.getElementPos(n);o={el:n,pos:i,component:e,view:(0,T.getViewEl)(n)},r.updateToolsLocal(o),n.ownerDocument===r.currentDoc&&(r.elHovered=o)}):(this.currentDoc=null,this.elHovered=0,this.updateToolsLocal(),this.canvas.getFrames().forEach(function(t){var e=t.view,n=e&&e.getToolsEl();n&&r.toggleToolsEl(0,0,{el:n})}))},onSelect:(0,o.debounce)(function(){var t=this.em,e=t.getSelected(),n=t.get("currentFrame")||{},r=e&&e.getView(n.model),o=r&&r.el,i={};o&&(0,_.pn)(o)&&(i={el:o,pos:this.getElementPos(o),component:e,view:(0,T.getViewEl)(o)}),this.elSelected=i,this.updateToolsGlobal(),this.updateLocalPos(i),this.initResize(e)},0),updateGlobalPos:function(){var t=this.getElSelected();t.el&&(t.pos=this.getElementPos(t.el),this.updateToolsGlobal())},updateLocalPos:function(t){var e=this.getElHovered();e.el&&(e.pos=this.getElementPos(e.el),this.updateToolsLocal(t))},getElHovered:function(){return this.elHovered||{}},getElSelected:function(){return this.elSelected||{}},onOut:function(){this.em.setHovered(0)},toggleToolsEl:function(t,e,n){void 0===n&&(n={});var r=n.el||this.canvas.getToolsEl(e);return r&&(r.style.display=t?"":"none"),r||{}},showElementOffset:function(t,e,n){void 0===n&&(n={}),b&&this.editor.runCommand("show-offset",{el:t,elPos:e,view:n.view,force:1,top:0,left:0})},hideElementOffset:function(t){this.editor.stopCommand("show-offset",{view:t})},showFixedElementOffset:function(t,e){this.editor.runCommand("show-offset",{el:t,elPos:e,state:"Fixed"})},hideFixedElementOffset:function(){this.editor&&this.editor.stopCommand("show-offset",{state:"Fixed"})},hideHighlighter:function(t){this.canvas.getHighlighter(t).style.opacity=0},onClick:function(t){t.stopPropagation(),t.preventDefault();var e=this.em;if(e.get("_cmpDrag"))return e.set("_cmpDrag");var n=(0,i.default)(t.target),r=n.data("model");if(!r)for(var o=n.parent();!r&&o.length&&!(0,_.Mx)(o[0]);)r=o.data("model"),o=o.parent();if(r){if(e.isEditing()&&!r.get("textable")&&r.isChildOf("text"))return;this.select(r,t)}},select:function(t,e){void 0===e&&(e={}),t&&(this.editor.select(t,{event:e,useValid:!0}),this.initResize(t))},updateBadge:function(t,e,n){void 0===n&&(n={});var r=this.canvas,o=(0,i.default)(t).data("model");if(o&&o.get("badgable")){var a=this.getBadge(n);if(!n.posOnly){var s=this.canvas.getConfig(),l=o.getIcon(),c=s.pStylePrefix||"",u="".concat(c,"badge"),p=s.customBadgeLabel,d="".concat(l?'<div class="'.concat(u,'__icon">').concat(l,"</div>"):"",'\n <div class="').concat(u,'__name">').concat(o.getName(),"</div>");a.innerHTML=p?p(o):d}var f=a.style;f.display="block";var h=r.getTargetToElementFixed(t,a,{pos:e}).top,g=n.leftOff<0?-n.leftOff:0;f.top=h+"px",f.left=g+"px"}},showHighlighter:function(t){this.canvas.getHighlighter(t).style.opacity=""},initResize:function(t){var e,n=this.em,r=this.canvas,i=null==n?void 0:n.Editor,a=(null==n?void 0:n.config).stylePrefix||"",s="".concat(a,"resizing"),l=!(0,o.isElement)(t)&&(0,T.isTaggableNode)(t)?t:n.getSelected(),c=l&&l.get("resizable"),u={},p=function(t,e,n){var r=n.docs;r&&r.forEach(function(e){var n=e.body,r=n.className||"";n.className=("add"==t?"".concat(r," ").concat(s):r.replace(s,"")).trim()})};if(i&&c){var d=(0,o.isElement)(t)?t:l.getEl();u={onStart:function(t,o){void 0===o&&(o={});var i=o.el,a=o.config,s=o.resizer,c=a.keyHeight,u=a.keyWidth,d=a.currentUnit,f=a.keepAutoHeight,h=a.keepAutoWidth;p("add",0,o),e=n.Styles.getModelToStyle(l),r.toggleFramesEvents(!1);var g=getComputedStyle(i),m=e.getStyle(),v=m[u];a.autoWidth=h&&"auto"===v,isNaN(parseFloat(v))&&(v=g[u]);var y=m[c];a.autoHeight=f&&"auto"===y,isNaN(parseFloat(y))&&(y=g[c]),s.startDim.w=p
1arseFloat(v),s.startDim.h=parseFloat(y),b=!1,d&&(a.unitHeight=(0,T.getUnitFromValue)(y),a.unitWidth=(0,T.getUnitFromValue)(v))},onMove:function(){i.trigger("component:resize")},onEnd:function(t,e){p("remove",0,e),i.trigger("component:resize"),r.toggleFramesEvents(!0),b=!0},updateTarget:function(t,o,i){if(void 0===i&&(i={}),e){var a=i.store,s=i.selectedHandler,c=i.config,u=c.keyHeight,p=c.keyWidth,d=c.autoHeight,f=c.autoWidth,h=c.unitWidth,g=c.unitHeight,m=["tc","bc"].indexOf(s)>=0,v=["cl","cr"].indexOf(s)>=0,y={};if(!m){var b=r.getBody().offsetWidth,_=o.w<b?o.w:b;y[p]=f?"auto":"".concat(_).concat(h)}v||(y[u]=d?"auto":"".concat(o.h).concat(g)),n.getDragMode(l)&&(y.top="".concat(o.t).concat(g),y.left="".concat(o.l).concat(h));var T=C(C({},y),{__p:!a});e.addStyle(T,{avoidStore:!a}),n.Styles.__emitCmpStyleUpdate(T,{components:n.getSelected()})}}},"object"==typeof c&&(u=C(C(C({},u),c),{parent:u})),this.resizer=i.runCommand("resize",{el:d,options:u,force:1})}else i.stopCommand("resize"),this.resizer=null},updateToolbar:function(t){var e=this.config.em,n=t==e?e.getSelected():t,r=this.canvas.getToolbarEl(),o=r.style,i=n.get("toolbar"),a=e.config.showToolbar;if(n&&a&&i&&i.length){if(o.display="",!this.toolbar){r.innerHTML="",this.toolbar=new p(i);var s=new y({collection:this.toolbar,em:e});r.appendChild(s.render().el)}this.toolbar.reset(i),o.top="-100px",o.left="0"}else o.display="none"},updateToolbarPos:function(t){var e=this.canvas.getToolbarEl().style;e.top="".concat(t.top).concat("px"),e.left="".concat(t.left).concat("px"),e.opacity=""},getCanvasPosition:function(){return this.canvas.getCanvasView().getPosition()},getBadge:function(t){return void 0===t&&(t={}),this.canvas.getBadgeEl(t.view)},onFrameScroll:function(){this.updateTools()},updateTools:function(){this.updateLocalPos(),this.updateGlobalPos()},isCompSelected:function(t){return t&&"selected"===t.get("status")},updateToolsLocal:function(t){var e=this.em.getConfig(),n=t||this.getElHovered(),r=n.el,o=n.pos,i=n.view,a=n.component;if(r){var s=a.get("hoverable"),l=this.lastHovered!==r,c=l?{}:{posOnly:1};l&&s&&(this.lastHovered=r,this.showHighlighter(i),this.showElementOffset(r,o,{view:i})),this.isCompSelected(a)&&(this.hideHighlighter(i),!e.showOffsetsSelected&&this.hideElementOffset(i));var u="px",p=this.toggleToolsEl(1,i),d=p.style,f=this.canvas.canvasRectOffset(r,o),h=f.top,g=f.left;this.updateBadge(r,o,C(C({},c),{view:i,topOff:h,leftOff:g})),d.top=h+u,d.left=g+u,d.width=o.width+u,d.height=o.height+u,this._trgToolUp("local",{component:a,el:p,top:h,left:g,width:o.width,height:o.height})}else this.lastHovered=0},_upToolbar:(0,o.debounce)(function(){this.updateToolsGlobal({force:1})},0),_trgToolUp:function(t,e){void 0===e&&(e={}),this.em.trigger("canvas:tools:update",C({type:t},e))},updateToolsGlobal:function(t){void 0===t&&(t={});var e=this.getElSelected(),n=e.el,r=e.pos,o=e.component;if(!n)return this.toggleToolsEl(),void(this.lastSelected=0);var i=this.canvas;(this.lastSelected!==n||t.force)&&(this.lastSelected=n,this.updateToolbar(o));var a="px",s=this.toggleToolsEl(1),l=s.style,c=i.getTargetToElementFixed(n,i.getToolbarEl(),{pos:r}),u=c.canvasOffsetTop,p=c.canvasOffsetLeft;l.top=u+a,l.left=p+a,l.width=r.width+a,l.height=r.height+a,this.updateToolbarPos({top:c.top,left:c.left}),this._trgToolUp("global",{component:o,el:s,top:u,left:p,width:r.width,height:r.height})},updateAttached:(0,o.debounce)(function(){this.updateGlobalPos()},0),onContainerChange:(0,o.debounce)(function(){this.em.refreshCanvas()},150),getElementPos:function(t){return this.canvas.getCanvasView().getElementPos(t,{noScroll:!0})},hideBadge:function(){this.getBadge().style.display="none"},cleanPrevious:function(t){t&&t.set({status:"",state:""})},getContentWindow:function(){return this.canvas.getWindow()},run:function(t){(0,T.hasWin)()&&(this.editor=t&&t.get("Editor"),this.enable())},stop:function(t,e,n){if(void 0===n&&(n={}),(0,T.hasWin)()){var r=this.em,o=this.editor;this.onHovered(),this.stopSelectComponent(),!n.preserveSelected&&r.setSelected(),this.toggleToolsEl(),o&&o.stopCommand("resize")}}}},189:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>o});var r=n(895);const o={startSelectPosition:function(t,e,n){var r=this;void 0===n&&(n={}),this.isPointed=!1;var o=this.em.Utils,i=t.ownerDocument.body;o&&!this.sorter&&(this.sorter=new o.Sorter({container:i,placer:this.canvas.getPlacerEl(),containerSel:"*",itemSel:"*",pfx:this.ppfx,direction:"a",document:e,wmargin:1,nested:1,em:this.em,canvasRelative:1,scale:function(){return r.em.getZoomDecimal()}})),n.onStart&&(this.sorter.onStart=n.onStart),t&&this.sorter.startSort(t,{container:i})},getOffsetDim:function(){var t=this.offset(this.canvas.getFrameEl()),e=this.offset(this.canvas.getElement());
1return{top:t.top-e.top,left:t.left-e.left}},stopSelectPosition:function(){this.posTargetCollection=null,this.posIndex="after"==this.posMethod&&0!==this.cDim.length?this.posIndex+1:this.posIndex,this.sorter&&(this.sorter.moved=0,this.sorter.endMove()),this.cDim&&(this.posIsLastEl=0!==this.cDim.length&&"after"==this.posMethod&&this.posIndex==this.cDim.length,this.posTargetEl=0===this.cDim.length?(0,r.default)(this.outsideElem):!this.posIsLastEl&&this.cDim[this.posIndex]?(0,r.default)(this.cDim[this.posIndex][5]).parent():(0,r.default)(this.outsideElem),this.posTargetModel=this.posTargetEl.data("model"),this.posTargetCollection=this.posTargetEl.data("model-comp"))},enable:function(){this.startSelectPosition()},nearFloat:function(t,e,n){var r=t||0,o=e||"before",i=n.length,a=0!==i&&"after"==o&&r==i;return 0!==i&&(!a&&!n[r][4]||n[r-1]&&!n[r-1][4]||a&&!n[r-1][4])?1:0},run:function(){this.enable()},stop:function(){this.stopSelectPosition(),this.$wrapper.css("cursor",""),this.$wrapper.unbind()}}},804:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>s});var r=n(50),o=n(895),i=n(163),a=function(){return a=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},a.apply(this,arguments)};const s={getOffsetMethod:function(t){return"get"+(t||"")+"OffsetViewerEl"},run:function(t,e,n){var s=n||{},l=s.state||"",c=t.getConfig(),u=this.em.getZoomDecimal(),p=s.el||"";if(!c.showOffsets||(0,i.isTextNode)(p)||!c.showOffsetsSelected&&"Fixed"==l)t.stopCommand("".concat(this.id),n);else{var d=t.Canvas,f=a({},s.elPos||d.getElementPos(p));(0,r.isUndefined)(s.top)||(f.top=s.top),(0,r.isUndefined)(s.left)||(f.left=s.left);var h=window.getComputedStyle(p),g=this.ppfx,m=l+"State",v=d[this.getOffsetMethod(l)](n.view);v.style.opacity="";var y=this["marginT"+l],b=this["marginB"+l],_=this["marginL"+l],T=this["marginR"+l],C=this["padT"+l],w=this["padB"+l],E=this["padL"+l],S=this["padR"+l];if(v.childNodes.length&&(this[m]="1",y=v.querySelector("[data-offset-m-t]"),b=v.querySelector("[data-offset-m-b]"),_=v.querySelector("[data-offset-m-l]"),T=v.querySelector("[data-offset-m-r]"),C=v.querySelector("[data-offset-p-t]"),w=v.querySelector("[data-offset-p-b]"),E=v.querySelector("[data-offset-p-l]"),S=v.querySelector("[data-offset-p-r]")),!this[m]){var x=l.toLowerCase(),O=x+"margin-v",A=x+"padding-v",k=(0,o.default)('<div class="'.concat(g,'marginName">')).get(0),P=(0,o.default)('<div class="'.concat(g,'paddingName">')).get(0),N=g+A+"-el",M="".concat(g+O+"-el"," ").concat(g+O),L="".concat(N," ").concat(g+A);y=(0,o.default)('<div class="'.concat(M,'-top"></div>')).get(0),b=(0,o.default)('<div class="'.concat(M,'-bottom"></div>')).get(0),_=(0,o.default)('<div class="'.concat(M,'-left"></div>')).get(0),T=(0,o.default)('<div class="'.concat(M,'-right"></div>')).get(0),C=(0,o.default)('<div class="'.concat(L,'-top"></div>')).get(0),w=(0,o.default)('<div class="'.concat(L,'-bottom"></div>')).get(0),E=(0,o.default)('<div class="'.concat(L,'-left"></div>')).get(0),S=(0,o.default)('<div class="'.concat(L,'-right"></div>')).get(0),this["marginT"+l]=y,this["marginB"+l]=b,this["marginL"+l]=_,this["marginR"+l]=T,this["padT"+l]=C,this["padB"+l]=w,this["padL"+l]=E,this["padR"+l]=S,k.appendChild(y),k.appendChild(b),k.appendChild(_),k.appendChild(T),P.appendChild(C),P.appendChild(w),P.appendChild(E),P.appendChild(S),v.appendChild(k),v.appendChild(P),this[m]="1"}var I="px",D=parseFloat(h.marginLeft.replace(I,""))*u,R=parseFloat(h.marginRight.replace(I,""))*u,j=parseFloat(h.marginTop.replace(I,""))*u,H=parseFloat(h.marginBottom.replace(I,""))*u,F=y.style,B=b.style,V=_.style,U=T.style,z=C.style,G=w.style,$=E.style,q=S.style,W=parseFloat(f.left),K=parseFloat(h.width)*u+I;F.height=j+I,F.width=K,F.top=f.top-j+I,F.left=W+I,B.height=H+I,B.width=K,B.top=f.top+f.height+I,B.left=W+I;var Y=f.height+j+H+I,X=f.top-j+I;V.height=Y,V.width=D+I,V.top=X,V.left=W-D+I,U.height=Y,U.width=R+I,U.top=X,U.left=W+f.width+I;var Z=parseFloat(h.paddingTop)*u;z.height=Z+I;var Q=parseFloat(h.paddingBottom)*u;G.height=Q+I;var J=f.height-Q-Z+I,tt=f.top+Z+I;$.height=J,$.width=parseFloat(h.paddingLeft)*u+I,$.top=tt;var et=parseFloat(h.paddingRight)*u;q.height=J,q.width=et+I,q.top=tt}},stop:function(t,e,n){void 0===n&&(n={});var r=(n||{}).state||"",o=this.getOffsetMethod(r);t.Canvas[o](n.view).style.opacity=0}}},434:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>o});var r=n(50);const o={init:function(){(0,r.bindAll)(this,"_onFramesChange")},run:function(t){this.toggleVis(t)},stop:function(t){this.toggleVis(t,0)},toggleVis:function(t,e){var n=this;if(void 0===e&&(e=1),!t.Commands.isActive("preview")){var r=t.Canvas,o=e?"on":"off",i=r.getModel();
1r.getFrames().forEach(function(t){return n._upFrame(t,e)}),i[o]("change:frames",this._onFramesChange)}},_onFramesChange:function(t,e){var n=this;e.forEach(function(t){var e,r=function(){return n._upFrame(t,!0)};(null===(e=t.view)||void 0===e?void 0:e.loaded)?r():t.once("loaded",r)})},_upFrame:function(t,e){var n,r=e?"add":"remove",o="".concat(this.ppfx,"dashed");null===(n=t.view)||void 0===n||n.getBody().classList[r](o)}}},346:(t,e,n)=>{"use strict";n.d(e,{FE:()=>l,G7:()=>c,Hn:()=>s});var r,o=n(316),i=n.n(o),a=(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e}(i().Model),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e}(i().Collection),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e}(i().View)},330:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var r,o=n(50),i=n(346),a=(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=function(t){function e(e,n,r){void 0===e&&(e={}),void 0===r&&(r=!1);var o=t.call(this,e)||this;return o.itemsView="",o.itemType="type",o.reuseView=!1,o.config=n||e.config||{},r&&o.listenTo(o.collection,"add",o.addTo),o.items=[],o}return a(e,t),e.prototype.addTo=function(t){this.add(t)},e.prototype.itemViewNotFound=function(t){var e=this.config,n=this.ns,r=e.em,o="".concat(n?"[".concat(n,"]: "):"","'").concat(t,"' type not found");r&&r.logWarning(o)},e.prototype.add=function(t,e){var n,r=this,i=r.config,a=r.reuseView,s=r.items,l=this.itemsView||{},c=e||null,u=this.itemView,p=t.get(this.itemType);l[p]?u=l[p]:!p||l[p]||(0,o.includes)(["button","checkbox","color","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"],p)||this.itemViewNotFound(p),n=t.view&&a?t.view:new u({model:t,config:i},i),s&&s.push(n);var d=n.render().el;c?c.appendChild(d):this.$el.append(d)},e.prototype.render=function(){var t=document.createDocumentFragment();return this.clearItems(),this.$el.empty(),this.collection.length&&this.collection.each(function(e){this.add(e,t)},this),this.$el.append(t),this.onRender(),this},e.prototype.onRender=function(){},e.prototype.onRemoveBefore=function(t,e){},e.prototype.onRemove=function(t,e){},e.prototype.remove=function(e){void 0===e&&(e={});var n=this.items;return this.onRemoveBefore(n,e),this.clearItems(),t.prototype.remove.call(this),this.onRemove(n,e),this},e.prototype.clearItems=function(){this.items},e}(i.G7);const l=s;s.prototype.itemView=""},668:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var r=n(50),o=n(163),i=function(){return i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},i.apply(this,arguments)},a=["x","y"];const s=function(){function t(t){return void 0===t&&(t={}),this.opts={snapOffset:5,scale:1},(0,r.bindAll)(this,"drag","stop","keyHandle","handleScroll"),this.setOptions(t),this.delta={x:0,y:0},this.lastScroll={x:0,y:0},this.lastScrollDiff={x:0,y:0},this.startPointer={x:0,y:0},this.startPosition={x:0,y:0},this.globScrollDiff={x:0,y:0},this.currentPointer={x:0,y:0},this.position={x:0,y:0},this.guidesStatic=[],this.guidesTarget=[],this.docs=[],this}return t.prototype.setOptions=function(t){void 0===t&&(t={}),this.opts=i(i({},this.opts),t)},t.prototype.toggleDrag=function(t){var e=this.getDocumentEl(),n=this.getContainerEl(),r=this.getWindowEl(),i=t?"on":"off",a={on:o.on,off:o.off};a[i](n,"mousemove dragover",this.drag),a[i](e,"mouseup dragend touchend",this.stop),a[i](e,"keydown",this.keyHandle),a[i](r,"scroll",this.handleScroll)},t.prototype.handleScroll=function(){var t=this.lastScroll,e=this.delta,n=this.getScrollInfo(),r={x:n.x-t.x,y:n.y-t.y};this.move(e.x+r.x,e.y+r.y),this.lastScrollDiff=r},t.prototype.start=function(t){var e=this.opts,n=e.onStart;this.toggleDrag(!0),this.startPointer=this.getPointerPos(t),this.guidesStatic=(0,r.result)(e,"guidesStatic")||[],this.guidesTarget=(0,r.result)(e,"guidesTarget")||[],(0,r.isFunction)(n)&&n(t,this),this.startPosition=this.getStartPosition(),this.lastScrollDiff={x:0,y:0},this.globScrollDiff={x:0,y:0},this.drag(t)},t.prototype.drag=function(t){var e=this,n=this,o=n.opts,s=n.lastScrollDiff,l=n.globScrollDiff,c=o.onDrag,u=this.startPointer,p=this.getPointerPos(t),d={x:l.x+s.x,y:l.y+s.y};this.globScrollDiff=d;var f={x:p.x-u.x+d.x,y:p.y-u.y+d.y};this.lastScrollDiff={x:0,y:0};var h=this.lockedAxis;"x"===(h=t.shiftKey?!h&&this.detectAxisLock(f.x,f.y):null)?f.x=u.x:"y"===h&&(f.y=u.
1y);var g=function(n){a.forEach(function(t){return n[t]=n[t]*(0,r.result)(o,"scale")}),e.delta=n,e.move(n.x,n.y),(0,r.isFunction)(c)&&c(t,e)},m=i({},f);if(this.currentPointer=p,this.lockedAxis=h,this.lastScroll=this.getScrollInfo(),g(f),this.guidesTarget.length){var v=this.snapGuides(m),y=v.newDelta,b=v.trgX,_=v.trgY;(b||_)&&g(y)}0===t.which&&this.stop(t)},t.prototype.snapGuides=function(t){var e=this,n=t,o=this.trgX,i=this.trgY;return this.guidesTarget.forEach(function(n){n.x&&e.trgX||n.y&&e.trgY||(n.active=!1,e.guidesStatic.forEach(function(a){if(!(n.y&&a.x||n.x&&a.y)){var s=n.y&&a.y,l=s?"y":"x",c=n[l],u=a[l],p=t[l],d=s?i:o;if(e.isPointIn(c,u)&&(0,r.isUndefined)(d)){var f=p-(c-u);e.setGuideLock(n,f)}}}))}),o=this.trgX,i=this.trgY,a.forEach(function(o){var i=o.toUpperCase(),a=e["trg".concat(i)];a&&!e.isPointIn(t[o],a.lock)&&(e.setGuideLock(a,null),a=null),a&&!(0,r.isUndefined)(a.lock)&&(n[o]=a.lock)}),{newDelta:n,trgX:this.trgX,trgY:this.trgY}},t.prototype.isPointIn=function(t,e,n){var r=(void 0===n?{}:n).offset||this.opts.snapOffset||0;return t>=e&&t<=e+r||t<=e&&t>=e-r},t.prototype.setGuideLock=function(t,e){var n=(0,r.isUndefined)(t.x)?"Y":"X",o="trg".concat(n);return null!==e?(t.active=!0,t.lock=e,this[o]=t):(delete t.active,delete t.lock,delete this[o]),t},t.prototype.stop=function(t,e){void 0===e&&(e={});var n=this.delta,o=!!e.cancel,i=o?0:n.x,a=o?0:n.y;this.toggleDrag(),this.lockedAxis=null,this.move(i,a,!0);var s=this.opts.onEnd;(0,r.isFunction)(s)&&s(t,this,{cancelled:o})},t.prototype.keyHandle=function(t){(0,o.isEscKey)(t)&&this.stop(t,{cancel:!0})},t.prototype.move=function(t,e,n){var o=this.el,i=this.opts,a=this.startPosition;if(a){var s=i.setPosition,l=a.x+t,c=a.y+e;this.position={x:l,y:c,end:n},(0,r.isFunction)(s)&&s(this.position),o&&(o.style.left="".concat(l,"px"),o.style.top="".concat(c,"px"))}},t.prototype.getContainerEl=function(){var t=this.opts.container;return t?[t]:this.getDocumentEl()},t.prototype.getWindowEl=function(){return this.getContainerEl().map(function(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow})},t.prototype.getDocumentEl=function(t){var e=this.opts.doc;if(t=t||this.el,!this.docs.length){var n=[document];t&&n.push(t.ownerDocument),e&&n.push(e),this.docs=n}return this.docs},t.prototype.getPointerPos=function(t){var e=this.opts.getPointerPosition,n=(0,o.getPointerEvent)(t);return e?e(t):{x:n.clientX,y:n.clientY}},t.prototype.getStartPosition=function(){var t=this.el,e=this.opts.getPosition,n={x:0,y:0};return(0,r.isFunction)(e)?n=e():t&&(n={x:parseFloat(t.style.left),y:parseFloat(t.style.top)}),n},t.prototype.getScrollInfo=function(){var t=this.opts.doc,e=t&&t.body;return{y:e?e.scrollTop:0,x:e?e.scrollLeft:0}},t.prototype.detectAxisLock=function(t,e){var n=t,r=e,o=Math.abs(n),i=Math.abs(r);return r>=o||r<=-o?"x":n>i||n<-i?"y":void 0},t}()},895:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>gt});var r="undefined"!=typeof document?document:null,o="undefined"!=typeof window?window:null,i=Array.prototype,a=i.filter,s=i.indexOf,l=i.map,c=i.push,u=i.reverse,p=i.slice,d=i.splice,f=/^#[\w-]*$/,h=/^\.[\w-]*$/,g=/<.+>/,m=/^\w+$/;function v(t,e){return void 0===e&&(e=r),h.test(t)?e.getElementsByClassName(t.slice(1)):m.test(t)?e.getElementsByTagName(t):e.querySelectorAll(t)}function y(t,e){if(void 0===e&&(e=r),t){if(t.__cash)return t;var n=t;if(A(t)){if(e.__cash&&(e=e[0]),!(n=f.test(t)?e.getElementById(t.slice(1)):g.test(t)?dt(t):v(t,e)))return}else if(O(t))return this.ready(t);(n.nodeType||n===o)&&(n=[n]),this.length=n.length;for(var i=0,a=this.length;i<a;i++)this[i]=n[i]}}function b(t,e){return new y(t,e)}var _=b.fn=b.prototype=y.prototype={constructor:b,__cash:!0,length:0,splice:d};_.get=function(t){return void 0===t?p.call(this):this[t<0?t+this.length:t]},_.eq=function(t){return b(this.get(t))},_.first=function(){return this.eq(0)},_.last=function(){return this.eq(-1)},_.map=function(t){return b(l.call(this,function(e,n){return t.call(e,n,e)}))},_.slice=function(){return b(p.apply(this,arguments))};var T=/(?:^\w|[A-Z]|\b\w)/g,C=/[\s-_]+/g;function w(t){return t.replace(T,function(t,e){return t[e?"toUpperCase":"toLowerCase"]()}).replace(C,"")}function E(t,e){for(var n=0,r=t.length;n<r&&!1!==e.call(t[n],t[n],n,t);n++);}b.camelCase=w,b.each=E,_.each=function(t){return E(this,function(e,n){return t.call(e,n,e)}),this},_.removeProp=function(t){return this.each(function(e,n){delete n[t]})},b.extend=_.extend=function(t){void 0===t&&(t=this);for(var e=arguments,n=e.length,r=n<2?0:1;r<n;r++)for(var o in e[r])t[o]=e[r][o];return t};var S=1;function x(t,e){var n=t&&(t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector);return!!n&&n.call(t,e)}function O(t){return"function"==typeof t}function A(t){return"string"==typeof t}function k(t){return!isNaN(parseFloat(t))&&isFinite(t)}
1b.guid=S,b.matches=x,b.isFunction=O,b.isString=A,b.isNumeric=k;var P=Array.isArray;function N(t){return A(t)?function(e,n){return x(n,t)}:t.__cash?function(e,n){return t.is(n)}:function(t,e,n){return e===n}}b.isArray=P,_.prop=function(t,e){if(t){if(A(t))return arguments.length<2?this[0]&&this[0][t]:this.each(function(n,r){r[t]=e});for(var n in t)this.prop(n,t[n]);return this}},_.filter=function(t){if(!t)return b();var e=O(t)?t:N(t);return b(a.call(this,function(n,r){return e.call(n,r,n,t)}))};var M=/\S+/g;function L(t){return A(t)&&t.match(M)||[]}function I(t){return t.filter(function(t,e,n){return n.indexOf(t)===e})}function D(t,e,n){if(1===t.nodeType){var r=o.getComputedStyle(t,null);return e?n?r.getPropertyValue(e):r[e]:r}}function R(t,e){return parseInt(D(t,e),10)||0}_.hasClass=function(t){var e=L(t),n=!1;return e.length&&this.each(function(t,r){return!(n=r.classList.contains(e[0]))}),n},_.removeAttr=function(t){var e=L(t);return e.length?this.each(function(t,n){E(e,function(t){n.removeAttribute(t)})}):this},_.attr=function(t,e){if(t){if(A(t)){if(arguments.length<2){if(!this[0])return;var n=this[0].getAttribute(t);return null===n?void 0:n}return null===e?this.removeAttr(t):this.each(function(n,r){r.setAttribute(t,e)})}for(var r in t)this.attr(r,t[r]);return this}},_.toggleClass=function(t,e){var n=L(t),r=void 0!==e;return n.length?this.each(function(t,o){E(n,function(t){r?e?o.classList.add(t):o.classList.remove(t):o.classList.toggle(t)})}):this},_.addClass=function(t){return this.toggleClass(t,!0)},_.removeClass=function(t){return arguments.length?this.toggleClass(t,!1):this.attr("class","")},b.unique=I,_.add=function(t,e){return b(I(this.get().concat(b(t,e).get())))};var j=/^--/;function H(t){return j.test(t)}var F={},B=r&&r.createElement("div"),V=B?B.style:{},U=["webkit","moz","ms","o"];function z(t,e){if(void 0===e&&(e=H(t)),e)return t;if(!F[t]){var n=w(t),r=""+n.charAt(0).toUpperCase()+n.slice(1);E((n+" "+U.join(r+" ")+r).split(" "),function(e){if(e in V)return F[t]=e,!1})}return F[t]}b.prefixedProp=z;var G={animationIterationCount:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0};function $(t,e,n){return void 0===n&&(n=H(t)),n||G[t]||!k(e)?e:e+"px"}_.css=function(t,e){if(A(t)){var n=H(t);return t=z(t,n),arguments.length<2?this[0]&&D(this[0],t,n):t?(e=$(t,e,n),this.each(function(r,o){1===o.nodeType&&(n?o.style.setProperty(t,e):o.style[t]=e)})):this}for(var r in t)this.css(r,t[r]);return this};var q="__cashData",W=/^data-(.*)/;function K(t){return t[q]=t[q]||{}}function Y(t,e){var n=K(t);if(e){if(!(e in n)){var r=t.dataset?t.dataset[e]||t.dataset[w(e)]:b(t).attr("data-"+e);if(void 0!==r){try{r=JSON.parse(r)}catch(t){}n[e]=r}}return n[e]}return n}function X(t,e){return R(t,"border"+(e?"Left":"Top")+"Width")+R(t,"padding"+(e?"Left":"Top"))+R(t,"padding"+(e?"Right":"Bottom"))+R(t,"border"+(e?"Right":"Bottom")+"Width")}function Z(t,e){for(var n=0,r=e.length;n<r;n++)if(t.indexOf(e[n])<0)return!1;return!0}function Q(t,e,n){E(t[n],function(t){t[0];var r=t[1];e.removeEventListener(n,r)}),delete t[n]}b.hasData=function(t){return q in t},_.data=function(t,e){var n=this;if(!t){if(!this[0])return;return E(this[0].attributes,function(t){var e=t.name.match(W);e&&n.data(e[1])}),Y(this[0])}if(A(t))return void 0===e?this[0]&&Y(this[0],t):this.each(function(n,r){return function(t,e,n){K(t)[e]=n}(r,t,e)});for(var r in t)this.data(r,t[r]);return this},_.removeData=function(t){return this.each(function(e,n){return function(t,e){void 0===e?delete t[q]:delete K(t)[e]}(n,t)})},E(["Width","Height"],function(t){_["inner"+t]=function(){if(this[0])return this[0]===o?o["inner"+t]:this[0]["client"+t]}}),E(["width","height"],function(t,e){_[t]=function(n){return this[0]?arguments.length?(n=parseInt(n,10),this.each(function(r,o){if(1===o.nodeType){var i=D(o,"boxSizing");o.style[t]=$(t,n+("border-box"===i?X(o,!e):0))}})):this[0]===o?this[0][w("outer-"+t)]:this[0].getBoundingClientRect()[t]-X(this[0],!e):void 0===n?void 0:this}}),E(["Width","Height"],function(t,e){_["outer"+t]=function(n){if(this[0])return this[0]===o?o["outer"+t]:this[0]["offset"+t]+(n?R(this[0],"margin"+(e?"Top":"Left"))+R(this[0],"margin"+(e?"Bottom":"Right")):0)}});var J="__cashEvents";function tt(t){return t[J]=t[J]||{}}function et(t){var e=t.split(".");return[e[0],e.slice(1).sort()]}function nt(t,e,n,r){var o=tt(t);if(e){var i=o[e];if(!i)return;r&&(r.guid=r.guid||S++),o[e]=i.filter(function(o){var i=o[0],a=o[1];if(r&&a.guid!==r.guid||!Z(i,n))return!0;t.removeEventListener(e,a)})}else if(n&&n.length)for(e in o)nt(t,e,n,r);else for(e in o)Q(o,t,e)}_.off=function(t,e){var n=this;return void 0===t?this.each(function(t,e){return nt(e)}):E(L(t),function(t){var r=et(t),o=r[0],i=r[1];n.each(function(t,n){return nt(n,o,i,e)})}),this},_.on=function(t,e,n,r){var o=this;if(!A(t)){for(var i in t)this.on(i,e,t[i]);return this}return O(e)&&(n=e,e=!1),E(L(t),function(t){var i=et(t),a=i[0],s=i[1];o.each(function(t,o){var i=function t(i){if(!i.namespace||Z(s,i.namespace.split("."))){var l=o;if(e){for(var c=i.target;!x(c,e);){if(c===o)return;if(!(c=c.parentNode))return}l=c}i.namespace=i.namespace||"";var u=n.call(l,i,i.data);
1r&&nt(o,a,s,t),!1===u&&(i.preventDefault(),i.stopPropagation())}};i.guid=n.guid=n.guid||S++,function(t,e,n,r){r.guid=r.guid||S++;var o=tt(t);o[e]=o[e]||[],o[e].push([n,r]),t.addEventListener(e,r)}(o,a,s,i)})}),this},_.one=function(t,e,n){return this.on(t,e,n,!0)},_.ready=function(t){var e=function(){return t(b)};return"loading"!==r.readyState?setTimeout(e):r.addEventListener("DOMContentLoaded",e),this},_.trigger=function(t,e){var n=t;if(A(t)){var o=et(t),i=o[0],a=o[1];(n=r.createEvent("HTMLEvents")).initEvent(i,!0,!0),n.namespace=a.join(".")}return n.data=e,this.each(function(t,e){e.dispatchEvent(n)})};var rt=/select-one/i,ot=/select-multiple/i;function it(t){var e=t.type;return rt.test(e)?function(t){return t.selectedIndex<0?null:t.options[t.selectedIndex].value}(t):ot.test(e)?function(t){var e=[];return E(t.options,function(t){!t.selected||t.disabled||t.parentNode.disabled||e.push(t.value)}),e}(t):t.value}var at=/%20/g,st=/file|reset|submit|button|image/i,lt=/radio|checkbox/i;_.serialize=function(){var t="";return this.each(function(e,n){E(n.elements||[n],function(e){if(!e.disabled&&e.name&&"FIELDSET"!==e.tagName&&!st.test(e.type)&&(!lt.test(e.type)||e.checked)){var n=it(e);void 0!==n&&E(P(n)?n:[n],function(n){t+=function(t,e){return"&"+encodeURIComponent(t)+"="+encodeURIComponent(e).replace(at,"+")}(e.name,n)})}})}),t.substr(1)},_.val=function(t){return void 0===t?this[0]&&it(this[0]):this.each(function(e,n){var r=ot.test(n.type),o=null===t?r?[]:"":t;r&&P(o)?E(n.options,function(t){t.selected=o.indexOf(t.value)>=0}):n.value=o})},_.clone=function(){return this.map(function(t,e){return e.cloneNode(!0)})},_.detach=function(){return this.each(function(t,e){e.parentNode&&e.parentNode.removeChild(e)})};var ct,ut=/^\s*<(\w+)[^>]*>/,pt=/^\s*<(\w+)\s*\/?>(?:<\/\1>)?\s*$/;function dt(t){if(function(){if(!ct){var t=r.createElement("table"),e=r.createElement("tr");ct={"*":r.createElement("div"),tr:r.createElement("tbody"),td:e,th:e,thead:t,tbody:t,tfoot:t}}}(),!A(t))return[];if(pt.test(t))return[r.createElement(RegExp.$1)];var e=ut.test(t)&&RegExp.$1,n=ct[e]||ct["*"];return n.innerHTML=t,b(n.childNodes).detach().get()}function ft(t,e,n){if(void 0!==e){var r=A(e);!r&&e.length?E(e,function(e){return ft(t,e,n)}):E(t,r?function(t){t.insertAdjacentHTML(n?"afterbegin":"beforeend",e)}:function(t,r){return function(t,e,n){n?t.insertBefore(e,t.childNodes[0]):t.appendChild(e)}(t,r?e.cloneNode(!0):e,n)})}}b.parseHTML=dt,_.empty=function(){var t=this[0];if(t)for(;t.firstChild;)t.removeChild(t.firstChild);return this},_.append=function(){var t=this;return E(arguments,function(e){ft(t,e)}),this},_.appendTo=function(t){return ft(b(t),this),this},_.html=function(t){if(void 0===t)return this[0]&&this[0].innerHTML;var e=t.nodeType?t[0].outerHTML:t;return this.each(function(t,n){n.innerHTML=e})},_.insertAfter=function(t){var e=this;return b(t).each(function(t,n){var r=n.parentNode;e.each(function(e,o){r.insertBefore(t?o.cloneNode(!0):o,n.nextSibling)})}),this},_.after=function(){var t=this;return E(u.apply(arguments),function(e){u.apply(b(e).slice()).insertAfter(t)}),this},_.insertBefore=function(t){var e=this;return b(t).each(function(t,n){var r=n.parentNode;e.each(function(e,o){r.insertBefore(t?o.cloneNode(!0):o,n)})}),this},_.before=function(){var t=this;return E(arguments,function(e){b(e).insertBefore(t)}),this},_.prepend=function(){var t=this;return E(arguments,function(e){ft(t,e,!0)}),this},_.prependTo=function(t){return ft(b(t),u.apply(this.slice()),!0),this},_.remove=function(){return this.detach().off()},_.replaceWith=function(t){var e=this;return this.each(function(n,r){var o=r.parentNode;if(o){var i=n?b(t).clone():b(t);if(!i[0])return e.remove(),!1;o.replaceChild(i[0],r),b(i[0]).after(i.slice(1))}})},_.replaceAll=function(t){return b(t).replaceWith(this),this},_.text=function(t){return void 0===t?this[0]?this[0].textContent:"":this.each(function(e,n){
1n.textContent=t})};var ht=r&&r.documentElement;_.offset=function(){var t=this[0];if(t){var e=t.getBoundingClientRect();return{top:e.top+o.pageYOffset-ht.clientTop,left:e.left+o.pageXOffset-ht.clientLeft}}},_.offsetParent=function(){return b(this[0]&&this[0].offsetParent)},_.position=function(){var t=this[0];if(t)return{left:t.offsetLeft,top:t.offsetTop}},_.children=function(t){var e=[];return this.each(function(t,n){c.apply(e,n.children)}),e=b(I(e)),t?e.filter(function(e,n){return x(n,t)}):e},_.contents=function(){var t=[];return this.each(function(e,n){c.apply(t,"IFRAME"===n.tagName?[n.contentDocument]:n.childNodes)}),b(t.length&&I(t))},_.find=function(t){for(var e=[],n=0,r=this.length;n<r;n++){var o=v(t,this[n]);o.length&&c.apply(e,o)}return b(e.length&&I(e))},_.has=function(t){var e=A(t)?function(e,n){return!!v(t,n).length}:function(e,n){return n.contains(t)};return this.filter(e)},_.is=function(t){if(!t||!this[0])return!1;var e=N(t),n=!1;return this.each(function(r,o){return!(n=e(r,o,t))}),n},_.next=function(){return b(this[0]&&this[0].nextElementSibling)},_.not=function(t){if(!t||!this[0])return this;var e=N(t);return this.filter(function(n,r){return!e(n,r,t)})},_.parent=function(){var t=[];
1return this.each(function(e,n){n&&n.parentNode&&t.push(n.parentNode)}),b(I(t))},_.index=function(t){var e=t?b(t)[0]:this[0],n=t?this:b(e).parent().children();return s.call(n,e)},_.closest=function(t){return t&&this[0]?this.is(t)?this.filter(t):this.parent().closest(t):b()},_.parents=function(t){var e,n=[];return this.each(function(o,i){for(e=i;e&&e.parentNode&&e!==r.body.parentNode;)e=e.parentNode,(!t||t&&x(e,t))&&n.push(e)}),b(I(n))},_.prev=function(){return b(this[0]&&this[0].previousElementSibling)},_.siblings=function(){var t=this[0];return this.parent().children().filter(function(e,n){return n!==t})};const gt=b},491:(t,e,n)=>{"use strict";n.d(e,{$Q:()=>f,FW:()=>u,G1:()=>i,GX:()=>b,L_:()=>s,Mx:()=>a,R3:()=>h,SJ:()=>y,cx:()=>l,dL:()=>d,pn:()=>p,rw:()=>m,sE:()=>c,t3:()=>v,ut:()=>g});var r=n(50),o=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},i="transitionend oTransitionEnd transitionend webkitTransitionEnd",a=function(t){return t&&9===t.nodeType},s=function(t){var e=t&&t.parentNode;e&&e.removeChild(t)};function l(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(Array.isArray(t[0])?t[0]:o([],t,!0)).filter(Boolean).join(" ")}var c=function(t,e){return t.querySelectorAll(e)},u=function(t,e){return void 0===e&&(e={}),t&&t.setAttribute&&(0,r.each)(e,function(e,n){return t.setAttribute(n,e)})},p=function(t){return t&&!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},d=function(t,e){var n;null===(n=t.parentNode)||void 0===n||n.replaceChild(e,t)},f=function(t,e,n){var o=t.childNodes,i=o.length,a=(0,r.isUndefined)(n)?i:n;(0,r.isString)(e)&&(t.insertAdjacentHTML("beforeEnd",e),e=t.lastChild,t.removeChild(e)),a>=i?t.appendChild(e):t.insertBefore(e,o[a])},h=function(t,e){return f(t,e)},g=function(t,e,n){void 0===e&&(e={});var o=document.createElement(t);return e&&(0,r.each)(e,function(t,e){return o.setAttribute(e,t)}),n&&((0,r.isString)(n)?o.innerHTML=n:o.appendChild(n)),o},m=function(t){return document.createTextNode(t)},v=function(t,e){var n,r=t.type;try{n=new window[e](r,t)}catch(t){(n=document.createEvent(e)).initEvent(r,!0,!0)}return n._parentEvent=t,0===r.indexOf("key")&&(n.keyCodeVal=t.keyCode,["keyCode","which"].forEach(function(t){Object.defineProperty(n,t,{get:function(){return this.keyCodeVal}})})),n},y=function(t,e){void 0===e&&(e=[]),(Array.isArray(e)?e:[e]).forEach(function(e){var n=e.tag||"div",o=e.attributes||{},i=document.createElement(n);(0,r.each)(o,function(t,e){i.setAttribute(e,t)}),t.appendChild(i)})},b=function(t){var e=(null==t?void 0:t.ownerDocument)||document,n=e.documentElement,r=e.defaultView||window;return{x:(r.pageXOffset||n.scrollLeft||0)-(n.clientLeft||0),y:(r.pageYOffset||n.scrollTop||0)-(n.clientTop||0)}}},163:(t,e,n)=>{"use strict";n.r(e),n.d(e,{appendStyles:()=>f,buildBase64UrlFromSvg:()=>$,camelCase:()=>b,capitalize:()=>F,createId:()=>G,deepMerge:()=>k,escape:()=>O,escapeNodeContent:()=>A,find:()=>x,getElRect:()=>N,getElement:()=>C,getGlobal:()=>l,getKeyChar:()=>I,getKeyCode:()=>L,getModel:()=>P,getPointerEvent:()=>M,getUiClass:()=>d,getUnitFromValue:()=>v,getViewEl:()=>U,hasDnd:()=>T,hasWin:()=>s,isCommentNode:()=>E,isComponent:()=>B,isDef:()=>a,isEmptyObj:()=>H,isEnterKey:()=>R,isEscKey:()=>D,isObject:()=>j,isRule:()=>V,isTaggableNode:()=>S,isTextNode:()=>w,matches:()=>p,normalizeFloat:()=>_,off:()=>m,on:()=>g,setViewEl:()=>z,shallowDiff:()=>h,toLowerCase:()=>c,upFirst:()=>y});var r=n(50),o=function(){return o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},o.apply(this,arguments)},i=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},a=function(t){return void 0!==t},s=function(){return"undefined"!=typeof window},l=function(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:n.g},c=function(t){return(t||"").toLowerCase()},u=s()?window.Element.prototype:{},p=u.matches||u.webkitMatchesSelector||u.mozMatchesSelector||u.msMatchesSelector,d=function(t,e){var n=t.getConfig(),r=n.stylePrefix;return[n.customUI&&"".concat(r,"cui"),e].filter(function(t){return t}).join(" ")},f=function(t,e){void 0===e&&(e={});var n=(0,r.isArray)(t)?i([],t,!0):[t];if(n.length){var o=n.shift();if(o&&(!e.unique||!document.querySelector('link[href="'.concat(o,'"]')))){var a=document.head,s=document.createElement("link");s.href=o,s.rel="stylesheet",e.prepand?a.insertBefore(s,a.firstChild):a.appendChild(s)}f(n)}},h=function(t,e){var n={},o=(0,r.keys)(e);for(var i in t)if(t.hasOwnProperty(i)){var a=t[i],s=e[i];o.indexOf(i)>=0?a!==s&&(n[i]=s):n[i]=null}for(var i in e)e.hasOwnProperty(i)&&(0,r.isUndefined)(t[i])&&(n[i]=e[i]);return n},g=function(t,e,n,r){var o=e.split(/\s+/);t=t instanceof Array?t:[t];for(var i=function(e){t.forEach(function(t){return t&&t.addEventListener(o[e],n,r)})},a=0;a<o.length;++a)i(a)},m=function(t,e,n,r){var o=e.split(/\s+/);t=t instanceof Array?t:[t];for(var i=function(e){t.forEach(function(t){return t&&t.removeEventListener(o[e],n,r)})},a=0;a<o.length;++a)i(a)},v=function(t){return t.replace(parseFloat(t),"")},y=function(t){return t[0].toUpperCase()+t.toLowerCase().slice(1)},b=function(t){return t.replace(/-./g,function(t){return t[1].toUpperCase()})},_=function(t,e,n){void 0===e&&(e=1),void 0===n&&(n=0);var r=0;if(isNaN(t))return n;if(t=parseFloat(t),Math.floor(t)!==t){var o=e.toString().split(".")[1];r=o?o.length:0}return r?parseFloat(t.toFixed(r)):t},T=function(t){return"draggable"in document.createElement("i")&&(!t||t.config.nativeDnD)},C=function(t){return(0,r.isElement)(t)||w(t)?t:t&&t.getEl?t.getEl():void 0},w=function(t){return t&&3===t.nodeType},E=function(t){return t&&8===t.nodeType},S=function(t){return t&&!w(t)&&!E(t)},x=function(t,e){var n=null;return t.some(function(r,o){return e(r,o,t)?(n=r,1):0}),n}
1,O=function(t){return void 0===t&&(t=""),"".concat(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/`/g,"`")},A=function(t){return void 0===t&&(t=""),"".concat(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")},k=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=o({},t[0]),r=1;r<t.length;r++){var i=o({},t[r]);for(var a in i){var s=n[a],l=i[a];j(s)&&j(l)?n[a]=k(s,l):n[a]=l}}return n},P=function(t,e){var n=t;return!e&&t&&t.__cashData?n=t.__cashData.model:(0,r.isElement)(t)&&(n=e(t).data("model")),n},N=function(t){var e,n={top:0,left:0,width:0,height:0};if(!t)return n;if(w(t)){var r=document.createRange();r.selectNode(t),e=r.getBoundingClientRect(),r.detach()}return e||(t.getBoundingClientRect?t.getBoundingClientRect():n)},M=function(t){return t.touches&&t.touches[0]?t.touches[0]:t},L=function(t){return t.which||t.keyCode},I=function(t){return String.fromCharCode(L(t))},D=function(t){return 27===L(t)},R=function(t){return 13===L(t)},j=function(t){return null!==t&&!Array.isArray(t)&&"object"==typeof t},H=function(t){return Object.keys(t).length<=0},F=function(t){return void 0===t&&(t=""),t&&t.charAt(0).toUpperCase()+t.substring(1)},B=function(t){return t&&t.toHTML},V=function(t){return t&&t.toCSS},U=function(t){return t.__gjsv},z=function(t,e){t.__gjsv=e},G=function(t){void 0===t&&(t=16);for(var e="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=0;r<t;r++)e+=n.charAt(Math.floor(62*Math.random()));return e},$=function(t){if(t&&"<svg"===t.substr(0,4)){var e="";return s()?e=window.btoa(t):"undefined"!=typeof Buffer&&(e=Buffer.from(t,"utf8").toString("base64")),e?"data:image/svg+xml;base64,".concat(e):t}return t}},828:(t,e,n)=>{var r={"./CanvasClear":858,"./CanvasClear.ts":858,"./CanvasMove":884,"./CanvasMove.ts":884,"./CommandAbstract":790,"./CommandAbstract.ts":790,"./ComponentDelete":180,"./ComponentDelete.ts":180,"./ComponentDrag":544,"./ComponentDrag.ts":544,"./ComponentEnter":236,"./ComponentEnter.ts":236,"./ComponentExit":368,"./ComponentExit.ts":368,"./ComponentNext":243,"./ComponentNext.ts":243,"./ComponentPrev":400,"./ComponentPrev.ts":400,"./ComponentStyleClear":910,"./ComponentStyleClear.ts":910,"./CopyComponent":744,"./CopyComponent.ts":744,"./DeleteComponent":517,"./DeleteComponent.ts":517,"./ExportTemplate":457,"./ExportTemplate.ts":457,"./Fullscreen":975,"./Fullscreen.ts":975,"./MoveComponent":191,"./MoveComponent.ts":191,"./OpenAssets":912,"./OpenAssets.ts":912,"./OpenBlocks":117,"./OpenBlocks.ts":117,"./OpenLayers":614,"./OpenLayers.ts":614,"./OpenStyleManager":801,"./OpenStyleManager.ts":801,"./OpenTraitManager":395,"./OpenTraitManager.ts":395,"./PasteComponent":98,"./PasteComponent.ts":98,"./Preview":129,"./Preview.ts":129,"./Resize":116,"./Resize.ts":116,"./SelectComponent":407,"./SelectComponent.ts":407,"./SelectPosition":189,"./SelectPosition.ts":189,"./ShowOffset":804,"./ShowOffset.ts":804,"./SwitchVisibility":434,"./SwitchVisibility.ts":434};function o(t){var e=i(t);return n(e)}function i(t){if(!n.o(r,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return r[t]}o.keys=function(){return Object.keys(r)},o.resolve=i,t.exports=o,o.id=828},50:(t,e,r)=>{"use strict";r.r(e),r.d(e,{VERSION:()=>i,after:()=>De,all:()=>en,allKeys:()=>vt,any:()=>nn,assign:()=>Dt,before:()=>Re,bind:()=>we,bindAll:()=>xe,chain:()=>be,chunk:()=>Fn,clone:()=>Ft,collect:()=>Ye,compact:()=>An,compose:()=>Ie,constant:()=>J,contains:()=>rn,countBy:()=>yn,create:()=>Ht,debounce:()=>Ne,default:()=>Gn,defaults:()=>Rt,defer:()=>ke,delay:()=>Ae,detect:()=>qe,difference:()=>Pn,drop:()=>xn,each:()=>Ke,escape:()=>se,every:()=>en,extend:()=>It,extendOwn:()=>Dt,filter:()=>Je,find:()=>qe,findIndex:()=>Be,findKey:()=>He,findLastIndex:()=>Ve,findWhere:()=>We,first:()=>Sn,flatten:()=>kn,foldl:()=>Ze,foldr:()=>Qe,forEach:()=>Ke,functions:()=>Mt,get:()=>Gt,groupBy:()=>mn,has:()=>$t,head:()=>Sn,identity:()=>qt,include:()=>rn,includes:()=>rn,indexBy:()=>vn,indexOf:()=>Ge,initial:()=>En,inject:()=>Ze,intersection:()=>In,invert:()=>Nt,invoke:()=>on,isArguments:()=>X,isArray:()=>W,isArrayBuffer:()=>H,isBoolean:()=>k,isDataView:()=>q,isDate:()=>I,isElement:()=>P,isEmpty:()=>ct,isEqual:()=>mt,isError:()=>R,isFinite:()=>Z,isFunction:()=>V,isMap:()=>St,isMatch:()=>ut,isNaN:()=>Q,isNull:()=>O,isNumber:()=>L,isObject:()=>x,isRegExp:()=>D,isSet:()=>Ot,isString:()=>M,isSymbol:()=>j,isTypedArray:()=>it,isUndefined:()=>A,isWeakMap:()=>xt,isWeakSet:()=>At,iteratee:()=>Zt,keys:()=>lt,last:()=>On,lastIndexOf:()=>$e,map:()=>Ye,mapObject:()=>Jt,matcher:()=>Wt,matches:()=>Wt,max:()=>ln,memoize:()=>Oe,methods:()=>Mt,min:()=>cn,mixin:()=>Vn,negate:()=>Le,noop:()=>te,now:()=>oe,object:()=>jn,omit:()=>wn,once:()=>je,pairs:()=>Pt,partial:()=>Ce,partition:()=>bn,pick:()=>Cn,pluck:()=>an,property:()=>Kt,propertyOf:()=>ee,random:()=>re,range:()=>Hn,reduce:()=>Ze,reduceRight:()=>Qe,reject:()=>tn,rest:()=>xn,restArguments:()=>S,result:()=>me,sample:()=>dn,select:()=>Je,shuffle:()=>fn,size:()=>_n,some:()=>nn,sortBy:()=>hn,sortedIndex:()=>Ue,tail:()=>xn,take:()=>Sn,tap:()=>Bt,template:()=>ge,templateSettings:()=>ce,throttle:()=>Pe,times:()=>ne,toArray:()=>pn,toPath:()=>Vt,transpose:()=>Dn,unescape:()=>le,union:()=>Ln,uniq:()=>Mn,unique:()=>Mn,uniqueId:()=>ye,unzip:()=>Dn,values:()=>kt,where:()=>sn,without:()=>Nn,wrap:()=>Me,zip:()=>Rn});var o={};r.r(o),r.d(o,{VERSION:()=>i,after:()=>De,all:()=>en,allKeys:()=>vt,any:()=>nn,assign:()=>Dt,before:()=>Re,bind:()=>we,bindAll:()=>xe,chain:()=>be,chunk:()=>Fn,clone:()=>Ft,collect:()=>Ye,compact:()=>An,compose:()=>Ie,constant:()=>J,contains:()=>rn,countBy:()=>yn,create:()=>Ht,debounce:()=>Ne,default:()=>Un,defaults:()=>Rt,defer:()=>ke,delay:()=>Ae,detect:()=>qe,difference:()=>Pn,drop:()=>xn,each:()=>Ke,escape:()=>se,every:()=>en,extend:()=>It,extendOwn:()=>Dt,filter:()=>Je,find:()=>qe,findIndex:()=>Be,findKey:()=>He,findLastIndex:()=>Ve,findWhere:()=>We,first:()=>Sn,flatten:()=>kn,foldl:()=>Ze,foldr:()=>Qe,forEach:()=>Ke,functions:()=>Mt,get:()=>Gt,groupBy:()=>mn,has:()=>$t,head:()=>Sn,identity:()=>qt,include:()=>rn,includes:()=>rn,indexBy:()=>vn,indexOf:()=>Ge,initial:()=>En,inject:()=>Ze,intersection:()=>In,invert:()=>Nt,invoke:()=>on,isArguments:()=>X,isArray:()=>W,isArrayBuffer:()=>H,isBoolean:()=>k,isDataView:()=>q,isDate:()=>I,isElement:()=>P,isEmpty:()=>ct,isEqual:()=>mt,isError:()=>R,isFinite:()=>Z,isFunction:()=>V,isMap:()=>St,isMatch:()=>ut,isNaN:()=>Q,isNull:()=>O,isNumber:()=>L,isObject:()=>x,isRegExp:()=>D,isSet:()=>Ot,isString:()=>M,isSymbol:()=>j,isTypedArray:()=>it,isUndefined:()=>A,isWeakMap:()=>xt,isWeakSet:()=>At,iteratee:()=>Zt,keys:()=>lt,last:()=>On,lastIndexOf:()=>$e,map:()=>Ye,mapObject:()=>Jt,matcher:()=>Wt,matches:()=>Wt,max:()=>ln,memoize:()=>Oe,methods:()=>Mt,min:()=>cn,mixin:()=>Vn,negate:()=>Le,noop:()=>te,now:()=>oe,object:()=>jn,omit:()=>wn,once:()=>je,pairs:()=>Pt,partial:()=>Ce,partition:()=>bn,pick:()=>Cn,pluck:()=>an,property:()=>Kt,propertyOf:()=>ee,random:()=>re,range:()=>Hn,reduce:()=>Ze,reduceRight:()=>Qe,reject:()=>tn,rest:()=>xn,restArguments:()=>S,result:()=>me,sample:()=>dn,select:()=>Je,shuffle:()=>fn,size:()=>_n,some:()=>nn,sortBy:()=>hn,sortedIndex:()=>Ue,tail:()=>xn,take:()=>Sn,tap:()=>Bt,template:()=>ge,templateSettings:()=>ce,throttle:()=>Pe,times:()=>ne,toArray:()=>pn,toPath:()=>Vt,transpose:()=>Dn,unescape:()=>le,union:()=>Ln,uniq:()=>Mn,unique:()=>Mn,uniqueId:()=>ye,unzip:()=>Dn,values:()=>kt,where:()=>sn,without:()=>Nn,wrap:()=>Me,zip:()=>Rn});var i="1.13.4",a="object"==typeof self&&self.self===self&&self||"object"==typeof n.g&&n.g.global===n.g&&n.g||Function("return this")()||{},s=Array.prototype,l=Object.prototype,c="undefined"!=typeof Symbol?Symbol.prototype:null,u=s.push,p=s.slice,d=l.toString,f=l.hasOwnProperty,h="undefined"!=typeof ArrayBuffer,g="undefined"!=typeof DataView,m=Array.isArray,v=Object.keys,y=Object.create,b=h&&ArrayBuffer.isView,_=isNaN,T=isFinite,C=!{toString:null}.propertyIsEnumerable("toString"),w=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleStr
1ing"],E=Math.pow(2,53)-1;function S(t,e){return e=null==e?t.length-1:+e,function(){for(var n=Math.max(arguments.length-e,0),r=Array(n),o=0;o<n;o++)r[o]=arguments[o+e];switch(e){case 0:return t.call(this,r);case 1:return t.call(this,arguments[0],r);case 2:return t.call(this,arguments[0],arguments[1],r)}var i=Array(e+1);for(o=0;o<e;o++)i[o]=arguments[o];return i[e]=r,t.apply(this,i)}}function x(t){var e=typeof t;return"function"===e||"object"===e&&!!t}function O(t){return null===t}function A(t){return void 0===t}function k(t){return!0===t||!1===t||"[object Boolean]"===d.call(t)}function P(t){return!(!t||1!==t.nodeType)}function N(t){var e="[object "+t+"]";return function(t){return d.call(t)===e}}const M=N("String"),L=N("Number"),I=N("Date"),D=N("RegExp"),R=N("Error"),j=N("Symbol"),H=N("ArrayBuffer");var F=N("Function"),B=a.document&&a.document.childNodes;"object"!=typeof Int8Array&&"function"!=typeof B&&(F=function(t){return"function"==typeof t||!1});const V=F,U=N("Object");var z=g&&U(new DataView(new ArrayBuffer(8))),G="undefined"!=typeof Map&&U(new Map),$=N("DataView");const q=z?function(t){return null!=t&&V(t.getInt8)&&H(t.buffer)}:$,W=m||N("Array");function K(t,e){return null!=t&&f.call(t,e)}var Y=N("Arguments");!function(){Y(arguments)||(Y=function(t){return K(t,"callee")})}();const X=Y;function Z(t){return!j(t)&&T(t)&&!isNaN(parseFloat(t))}function Q(t){return L(t)&&_(t)}function J(t){return function(){return t}}function tt(t){return function(e){var n=t(e);return"number"==typeof n&&n>=0&&n<=E}}function et(t){return function(e){return null==e?void 0:e[t]}}const nt=et("byteLength"),rt=tt(nt);var ot=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;const it=h?function(t){return b?b(t)&&!q(t):rt(t)&&ot.test(d.call(t))}:J(!1),at=et("length");function st(t,e){e=function(t){for(var e={},n=t.length,r=0;r<n;++r)e[t[r]]=!0;return{contains:function(t){return!0===e[t]},push:function(n){return e[n]=!0,t.push(n)}}}(e);var n=w.length,r=t.constructor,o=V(r)&&r.prototype||l,i="constructor";for(K(t,i)&&!e.contains(i)&&e.push(i);n--;)(i=w[n])in t&&t[i]!==o[i]&&!e.contains(i)&&e.push(i)}function lt(t){if(!x(t))return[];if(v)return v(t);var e=[];for(var n in t)K(t,n)&&e.push(n);return C&&st(t,e),e}function ct(t){if(null==t)return!0;var e=at(t);return"number"==typeof e&&(W(t)||M(t)||X(t))?0===e:0===at(lt(t))}function ut(t,e){var n=lt(e),r=n.length;if(null==t)return!r;for(var o=Object(t),i=0;i<r;i++){var a=n[i];if(e[a]!==o[a]||!(a in o))return!1}return!0}function pt(t){return t instanceof pt?t:this instanceof pt?void(this._wrapped=t):new pt(t)}function dt(t){return new Uint8Array(t.buffer||t,t.byteOffset||0,nt(t))}pt.VERSION=i,pt.prototype.value=function(){return this._wrapped},pt.prototype.valueOf=pt.prototype.toJSON=pt.prototype.value,pt.prototype.toString=function(){return String(this._wrapped)};var ft="[object DataView]";function ht(t,e,n,r){if(t===e)return 0!==t||1/t==1/e;if(null==t||null==e)return!1;if(t!=t)return e!=e;var o=typeof t;return("function"===o||"object"===o||"object"==typeof e)&>(t,e,n,r)}function gt(t,e,n,r){t instanceof pt&&(t=t._wrapped),e instanceof pt&&(e=e._wrapped);var o=d.call(t);if(o!==d.call(e))return!1;if(z&&"[object Object]"==o&&q(t)){if(!q(e))return!1;o=ft}switch(o){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!=+t?+e!=+e:0==+t?1/+t==1/e:+t==+e;case"[object Date]":case"[object Boolean]":return+t==+e;case"[object Symbol]":return c.valueOf.call(t)===c.valueOf.call(e);case"[object ArrayBuffer]":case ft:return gt(dt(t),dt(e),n,r)}var i="[object Array]"===o;if(!i&&it(t)){if(nt(t)!==nt(e))return!1;if(t.buffer===e.buffer&&t.byteOffset===e.byteOffset)return!0;i=!0}if(!i){if("object"!=typeof t||"object"!=typeof e)return!1;var a=t.constructor,s=e.constructor;if(a!==s&&!(V(a)&&a instanceof a&&V(s)&&s instanceof s)&&"constructor"in t&&"constructor"in e)return!1}r=r||[];for(var l=(n=n||[]).length;l--;)if(n[l]===t)return r[l]===e;if(n.push(t),r.push(e),i){if((l=t.length)!==e.length)return!1;for(;l--;)if(!ht(t[l],e[l],n,r))return!1}else{var u,p=lt(t);if(l=p.length,lt(e).length!==l)return!1;for(;l--;)if(!K(e,u=p[l])||!ht(t[u],e[u],n,r))return!1}return n.pop(),r.pop(),!0}function mt(t,e){return ht(t,e)}function vt(t){if(!x(t))return[];var e=[];for(var n in t)e.push(n);return C&&st(t,e),e}function yt(t){var e=at(t);return function(n){if(null==n)return!1;var r=vt(n);if(at(r))return!1;for(var o=0;o<e;o++)if(!V(n[t[o]]))return!1;return t!==wt||!V(n[bt])}}var bt="forEach",_t=["clear","delete"],Tt=["get","has","set"],Ct=_t.concat(bt,Tt),wt=_t.concat(Tt),Et=["add"].concat(_t,bt,"has");const St=G?yt(Ct):N("Map"),xt=G?yt(wt):N("WeakMap"),Ot=G?yt(Et):N("Set"),At=N("WeakSet");function kt(t){for(var e=lt(t),n=e.length,r=Array(n),o=0;o<n;o++)r[o]=t[e[o]];return r}function Pt(t){for(var e=lt(t),n=e.length,r=Array(n),o=0;o<n;o++)r[o]=[e[o],t[e[o]]];return r}function Nt(t){for(var e={},n=lt(t),r=0,o=n.length;r<o;r++)e[t[n[r]]]=n[r];return e}function Mt(t){var e=[];for(var n in t)V(t[n])&&e.push(n);return e.sort()}function Lt(t,e){return function(n){var r=arguments.length;if(e&&(n=Object(n)),r<2||null==n)return n;for(var o=1;o<r;o++)for(var i=arguments[o],a=t(i),s=a.length,l=0;l<s;l++){var c=a[l];e&&void 0!==n[c]||(n[c]=i[c])}return n}}const It=Lt(vt),Dt=Lt(lt),Rt=Lt(vt,!0);function jt(t){if(!x(t))return{};if(y)return y(t);var e=function(){};e.prototype=t;var n=new e;return e.prototype=null,n}function Ht(t,e){var n=jt(t);return e&&Dt(n,e),n}function Ft(t){return x(t)?W(t)?t.slice():It({},t):t}function Bt(t,e){return e(t),t}function Vt(t){return W(t)?t:[t]}function Ut(t){return pt.toPath(t)}function zt(t,e){for(var n=e.length,r=0;r<n;r++){if(null==t)return;t=t[e[r]]}return n?t:void 0}function Gt(t,e,n){var r=zt(t,Ut(e));return A(r)?n:r}function $t(t,e){for(var n=(e=Ut(e)).length,r=0;r<n;r++){var o=e[r];if(!K(t,o))return!1;t=t[o]}return!!n}function qt(t){return t}function Wt(t){return t=Dt({},t),function(e){return ut(e,t)}}function Kt(t){return t=Ut(t),function(e){return zt(e,t)}}function Yt(t,e,n){if(void 0===e)return t;switch(null==n?3:n){case 1:return function(n){return t.call(e,n)};case 3:return function(n,r,o){return t.call(e,n,r,o)};case 4:return function(n,r,o,i){return t.call(e,n,r,o,i)}}return function(){return t.apply(e,arguments)}}function Xt(t,e,n){return null==t?qt:V(t)?Yt(t,e,n):x(t)&&!W(t)?Wt(t):Kt(t)}function Zt(t,e){return Xt(t,e,1/0)}function Qt(t,e,n){return pt.iteratee!==Zt?pt.iteratee(t,e):Xt(t,e,n)}function Jt(t,e,n){e=Qt(e,n);for(var r=lt(t),o=r.length,i={},a=0;a<o;a++){var s=r[a];i[s]=e(t[s],s,t)}return i}function te(){}function ee(t){return null==t?te:function(e){return Gt(t,e)}}function ne(t,e,n){var r=Array(Math.max(0,t));e=Yt(e,n,1);for(var o=0;o<t;o++)r[o]=e(o);return r}function re(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))}pt.toPath=Vt,pt.iteratee=Zt;const oe=Date.now||function(){return(new Date).getTime()};function ie(t){var e=function(e){return t[e]},n="(?:"+lt(t).join("|")+")",r=RegExp(n),o=RegExp(n,"g");return function(t){return t=null==t?"":""+t,r.test(t)?t.replace(o,e):t}}const ae={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},se=ie(ae),le=ie(Nt(ae)),ce=pt.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var ue=/(.)^/,pe={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},de=/\\|'|\r|\n|\u2028|\u2029/g;function fe(t){return"\\"+pe[t]}var he=/^\s*(\w|\$)+\s*$/;function ge(t,e,n){!e&&n&&(e=n),e=Rt({},e,pt.templateSettings);var r=RegExp([(e.escape||ue).source,(e.interpolate||ue).source,(e.evaluate||ue).source].join("|")+"|$","g"),o=0,i="__p+='";t.replace(r,function(e,n,r,a,s){return i+=t.slice(o,s).replace(de,fe),o=s+e.length,n?i+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?i+="'+\n((__t=("+r+"))==null?'':__t)+\n'":a&&(i+="';\n"+a+"\n__p+='"),e}),i+="';\n";var a,s=e.variable;if(s){if(!he.test(s))throw new Error("variable is not a bare identifier: "+s)}else i="with(obj||{}){\n"+i+"}\n",s="obj";i="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+i+"return __p;\n";try{a=new Function(s,"_",i)}catch(t){throw t.source=i,t}var l=function(t){return a.call(this,t,pt)};return l.source="function("+s+"){\n"+i+"}",l}function me(t,e,n){var r=(e=Ut(e)).length;if(!r)return V(n)?n.call(t):n;for(var o=0;o<r;o++){var i=null==t?void 0:t[e[o]];void 0===i&&(i=n,o=r),t=V(i)?i.call(t):i}return t}var ve=0;function ye(t){var e=++ve+"";return t?t+e:e}function be(t){var e=pt(t);return e._chain=!0,e}function _e(t,e,n,r,o){if(!(r instanceof e))return t.apply(n,o);var i=jt(t.prototype),a=t.apply(i,o);return x(a)?a:i}var Te=S(function(t,e){var n=Te.placeholder,r=function(){for(var o=0,i=e.length,a=Array(i),s=0;s<i;s++)a[s]=e[s]===n?arguments[o++]:e[s];for(;o<arguments.length;)a.push(arguments[o++]);return _e(t,r,this,this,a)};return r});Te.placeholder=pt;const Ce=Te,we=S(function(t,e,n){if(!V(t))throw new TypeError("Bind must be called on a function");var r=S(function(o){return _e(t,r,e,this,n.concat(o))});return r}),Ee=tt(at);function Se(t,e,n,r){if(r=r||[],e||0===e){if(e<=0)return r.concat(t)}else e=1/0;for(var o=r.length,i=0,a=at(t);i<a;i++){var s=t[i];if(Ee(s)&&(W(s)||X(s)))if(e>1)Se(s,e-1,n,r),o=r.length;else for(var l=0,c=s.length;l<c;)r[o++]=s[l++];else n||(r[o++]=s)}return r}const xe=S(function(t,e){var n=(e=Se(e,!1,!1)).length;if(n<1)throw new Error("bindAll must be passed function names");for(;n--;){var r=e[n];t[r]=we(t[r],t)}return t});function Oe(t,e){var n=function(r){var o=n.cache,i=""+(e?e.apply(this,arguments):r);return K(o,i)||(o[i]=t.apply(this,arguments)),o[i]};return n.cache={},n}const Ae=S(function(t,e,n){return setTimeout(function(){return t.apply(null,n)},e)}),ke=Ce(Ae,pt,1);function Pe(t,e,n){var r,o,i,a,s=0;n||(n={});
vendor: 6,027 bytes, line 1
1var l=function(){s=!1===n.leading?0:oe(),r=null,a=t.apply(o,i),r||(o=i=null)},c=function(){var c=oe();s||!1!==n.leading||(s=c);var u=e-(c-s);return o=this,i=arguments,u<=0||u>e?(r&&(clearTimeout(r),r=null),s=c,a=t.apply(o,i),r||(o=i=null)):r||!1===n.trailing||(r=setTimeout(l,u)),a};return c.cancel=function(){clearTimeout(r),s=0,r=o=i=null},c}function Ne(t,e,n){var r,o,i,a,s,l=function(){var c=oe()-o;e>c?r=setTimeout(l,e-c):(r=null,n||(a=t.apply(s,i)),r||(i=s=null))},c=S(function(c){return s=this,i=c,o=oe(),r||(r=setTimeout(l,e),n&&(a=t.apply(s,i))),a});return c.cancel=function(){clearTimeout(r),r=i=s=null},c}function Me(t,e){return Ce(e,t)}function Le(t){return function(){return!t.apply(this,arguments)}}function Ie(){var t=arguments,e=t.length-1;return function(){for(var n=e,r=t[e].apply(this,arguments);n--;)r=t[n].call(this,r);return r}}function De(t,e){return function(){if(--t<1)return e.apply(this,arguments)}}function Re(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}}const je=Ce(Re,2);function He(t,e,n){e=Qt(e,n);for(var r,o=lt(t),i=0,a=o.length;i<a;i++)if(e(t[r=o[i]],r,t))return r}function Fe(t){return function(e,n,r){n=Qt(n,r);for(var o=at(e),i=t>0?0:o-1;i>=0&&i<o;i+=t)if(n(e[i],i,e))return i;return-1}}const Be=Fe(1),Ve=Fe(-1);function Ue(t,e,n,r){for(var o=(n=Qt(n,r,1))(e),i=0,a=at(t);i<a;){var s=Math.floor((i+a)/2);n(t[s])<o?i=s+1:a=s}return i}function ze(t,e,n){return function(r,o,i){var a=0,s=at(r);if("number"==typeof i)t>0?a=i>=0?i:Math.max(i+s,a):s=i>=0?Math.min(i+1,s):i+s+1;else if(n&&i&&s)return r[i=n(r,o)]===o?i:-1;if(o!=o)return(i=e(p.call(r,a,s),Q))>=0?i+a:-1;for(i=t>0?a:s-1;i>=0&&i<s;i+=t)if(r[i]===o)return i;return-1}}const Ge=ze(1,Be,Ue),$e=ze(-1,Ve);function qe(t,e,n){var r=(Ee(t)?Be:He)(t,e,n);if(void 0!==r&&-1!==r)return t[r]}function We(t,e){return qe(t,Wt(e))}function Ke(t,e,n){var r,o;if(e=Yt(e,n),Ee(t))for(r=0,o=t.length;r<o;r++)e(t[r],r,t);else{var i=lt(t);for(r=0,o=i.length;r<o;r++)e(t[i[r]],i[r],t)}return t}function Ye(t,e,n){e=Qt(e,n);for(var r=!Ee(t)&<(t),o=(r||t).length,i=Array(o),a=0;a<o;a++){var s=r?r[a]:a;i[a]=e(t[s],s,t)}return i}function Xe(t){var e=function(e,n,r,o){var i=!Ee(e)&<(e),a=(i||e).length,s=t>0?0:a-1;for(o||(r=e[i?i[s]:s],s+=t);s>=0&&s<a;s+=t){var l=i?i[s]:s;r=n(r,e[l],l,e)}return r};return function(t,n,r,o){var i=arguments.length>=3;return e(t,Yt(n,o,4),r,i)}}const Ze=Xe(1),Qe=Xe(-1);function Je(t,e,n){var r=[];return e=Qt(e,n),Ke(t,function(t,n,o){e(t,n,o)&&r.push(t)}),r}function tn(t,e,n){return Je(t,Le(Qt(e)),n)}function en(t,e,n){e=Qt(e,n);for(var r=!Ee(t)&<(t),o=(r||t).length,i=0;i<o;i++){var a=r?r[i]:i;if(!e(t[a],a,t))return!1}return!0}function nn(t,e,n){e=Qt(e,n);for(var r=!Ee(t)&<(t),o=(r||t).length,i=0;i<o;i++){var a=r?r[i]:i;if(e(t[a],a,t))return!0}return!1}function rn(t,e,n,r){return Ee(t)||(t=kt(t)),("number"!=typeof n||r)&&(n=0),Ge(t,e,n)>=0}const on=S(function(t,e,n){var r,o;return V(e)?o=e:(e=Ut(e),r=e.slice(0,-1),e=e[e.length-1]),Ye(t,function(t){var i=o;if(!i){if(r&&r.length&&(t=zt(t,r)),null==t)return;i=t[e]}return null==i?i:i.apply(t,n)})});function an(t,e){return Ye(t,Kt(e))}function sn(t,e){return Je(t,Wt(e))}function ln(t,e,n){var r,o,i=-1/0,a=-1/0;if(null==e||"number"==typeof e&&"object"!=typeof t[0]&&null!=t)for(var s=0,l=(t=Ee(t)?t:kt(t)).length;s<l;s++)null!=(r=t[s])&&r>i&&(i=r);else e=Qt(e,n),Ke(t,function(t,n,r){((o=e(t,n,r))>a||o===-1/0&&i===-1/0)&&(i=t,a=o)});return i}function cn(t,e,n){var r,o,i=1/0,a=1/0;if(null==e||"number"==typeof e&&"object"!=typeof t[0]&&null!=t)for(var s=0,l=(t=Ee(t)?t:kt(t)).length;s<l;s++)null!=(r=t[s])&&r<i&&(i=r);else e=Qt(e,n),Ke(t,function(t,n,r){((o=e(t,n,r))<a||o===1/0&&i===1/0)&&(i=t,a=o)});return i}var un=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function pn(t){return t?W(t)?p.call(t):M(t)?t.match(un):Ee(t)?Ye(t,qt):kt(t):[]}function dn(t,e,n){if(null==e||n)return Ee(t)||(t=kt(t)),t[re(t.length-1)];var r=pn(t),o=at(r);e=Math.max(Math.min(e,o),0);for(var i=o-1,a=0;a<e;a++){var s=re(a,i),l=r[a];r[a]=r[s],r[s]=l}return r.slice(0,e)}function fn(t){return dn(t,1/0)}function hn(t,e,n){var r=0;return e=Qt(e,n),an(Ye(t,function(t,n,o){return{value:t,index:r++,criteria:e(t,n,o)}}).sort(function(t,e){var n=t.criteria,r=e.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(n<r||void 0===r)return-1}return t.index-e.index}),"value")}function gn(t,e){return function(n,r,o){var i=e?[[],[]]:{};return r=Qt(r,o),Ke(n,function(e,o){var a=r(e,o,n);t(i,e,a)}),i}}const mn=gn(function(t,e,n){K(t,n)?t[n].push(e):t[n]=[e]}),vn=gn(function(t,e,n){t[n]=e}),yn=gn(function(t,e,n){K(t,n)?t[n]++:t[n]=1}),bn=gn(function(t,e,n){t[n?0:1].push(e)},!0);function _n(t){return null==t?0:Ee(t)?t.length:lt(t).length}function Tn(t,e,n){return e in n}const Cn=S(function(t,e){var n={},r=e[0];if(null==t)return n;V(r)?(e.length>1&&(r=Yt(r,e[1])),e=vt(t)):(r=Tn,e=Se(e,!1,!1),t=Object(t));for(var o=0,i=e.length;o<i;o++){var a=e[o],s=t[a];r(s,a,t)&&(n[a]=s)}return n}),wn=S(function(t,e){var n,r=e[0];return V(r)?(r=Le(r),e.length>1&&(n=e[1])):(e=Ye(Se(e,!1,!1),String),r=function(t,n){return!rn(e,n)}),Cn(t,r,n)});function En(t,e,n){return p.call(t,0,Math.max(0,t.length-(null==e||n?1:e)))}function Sn(t,e,n){return null==t||t.length<1?null==e||n?void 0:[]:null==e||n?t[0]:En(t,t.length-e)}function xn(t,e,n){return p.call(t,null==e||n?1:e)}function On(t,e,n){return null==t||t.length<1?null==e||n?void 0:[]:null==e||n?t[t.length-1]:xn(t,Math.max(0,t.length-e))}function An(t){return Je(t,Boolean)}function kn(t,e){return Se(t,e,!1)}const Pn=S(function(t,e){return e=Se(e,!0,!0),Je(t,function(t){return!rn(e,t)})}),Nn=S(function(t,e){return Pn(t,e)});function Mn(t,e,n,r){k(e)||(r=n,n=e,e=!1),null!=n&&(n=Qt(n,r));for(var o=[],i=[],a=0,s=at(t);a<s;a++){var l=t[a],c=n?n(l,a,t):l;e&&!n?(a&&i===c||o.push(l),i=c):n?rn(i,c)||(i.push(c),o.push(l)):rn(o,l)||o.push(l)}return o}const Ln=S(function(t){return Mn(Se(t,!0,!0))});function In(t){for(var e=[],n=arguments.length,r=0,o=at(t);r<o;r++){var i=t[r];
1if(!rn(e,i)){var a;for(a=1;a<n&&rn(arguments[a],i);a++);a===n&&e.push(i)}}return e}function Dn(t){for(var e=t&&ln(t,at).length||0,n=Array(e),r=0;r<e;r++)n[r]=an(t,r);return n}const Rn=S(Dn);function jn(t,e){for(var n={},r=0,o=at(t);r<o;r++)e?n[t[r]]=e[r]:n[t[r][0]]=t[r][1];return n}function Hn(t,e,n){null==e&&(e=t||0,t=0),n||(n=e<t?-1:1);for(var r=Math.max(Math.ceil((e-t)/n),0),o=Array(r),i=0;i<r;i++,t+=n)o[i]=t;return o}function Fn(t,e){if(null==e||e<1)return[];for(var n=[],r=0,o=t.length;r<o;)n.push(p.call(t,r,r+=e));return n}function Bn(t,e){return t._chain?pt(e).chain():e}function Vn(t){return Ke(Mt(t),function(e){var n=pt[e]=t[e];pt.prototype[e]=function(){var t=[this._wrapped];return u.apply(t,arguments),Bn(this,n.apply(pt,t))}}),pt}Ke(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=s[t];pt.prototype[t]=function(){var n=this._wrapped;return null!=n&&(e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0]),Bn(this,n)}}),Ke(["concat","join","slice"],function(t){var e=s[t];pt.prototype[t]=function(){var t=this._wrapped;return null!=t&&(t=e.apply(t,arguments)),Bn(this,t)}});const Un=pt;var zn=Vn(o);zn._=zn;const Gn=zn}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n].call(i.exports,i,i.exports,r),i.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};return(()=>{"use strict";r.r(o),r.d(o,{default:()=>bh,grapesjs:()=>yh,usePlugin:()=>vh});var t=r(50),e=r(163);function n(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=t.raw;return o.reduce(function(t,r,i){var a=n[i-1],s=o[i-1];return Array.isArray(a)?a=a.join(""):s&&"$"===s.slice(-1)?t=t.slice(0,-1):a=(0,e.escape)(a),t+a+r})}const i={stylePrefix:"gjs-",components:"",style:"",fromElement:!1,projectData:void 0,noticeOnUnload:!0,showOffsets:!1,showOffsetsSelected:!1,forceClass:!0,height:"900px",width:"100%",log:["warning","error"],baseCss:"",protectedCss:"* { box-sizing: border-box; } body {margin: 0;}",canvasCss:"",defaultCommand:"select-comp",showToolbar:!0,showDevices:!0,devicePreviewMode:!1,mediaCondition:"max-width",tagVarStart:"{[ ",tagVarEnd:" ]}",keepEmptyTextNodes:!1,jsInHtml:!0,nativeDnD:!0,multipleSelection:!0,optsHtml:{},optsCss:{},avoidInlineStyle:!0,avoidDefaults:!0,clearStyles:!1,listenToEl:[],cssIcons:"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css",icons:{close:'<svg viewBox="0 0 24 24"><path fill="currentColor" d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"></path></svg>',move:'<svg viewBox="0 0 24 24"><path fill="currentColor" d="M13,6V11H18V7.75L22.25,12L18,16.25V13H13V18H16.25L12,22.25L7.75,18H11V13H6V16.25L1.75,12L6,7.75V11H11V6H7.75L12,1.75L16.25,6H13Z"/></svg>',plus:'<svg viewBox="0 0 24 24"><path fill="currentColor" d="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z" /></svg>',caret:'<svg viewBox="0 0 24 24"><path fill="currentColor" d="M7,10L12,15L17,10H7Z" /></svg>',delete:'<svg viewBox="0 0 24 24"><path fill="currentColor" d="M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z" /></svg>',copy:'<svg viewBox="0 0 24 24"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z" /></svg>',arrowUp:'<svg viewBox="0 0 24 24"><path fill="currentColor" d="M13,20H11V8L5.5,13.5L4.08,12.08L12,4.16L19.92,12.08L18.5,13.5L13,8V20Z" /></svg>',chevron:'<svg viewBox="0 0 24 24"><path fill="currentColor" d="M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z" /></svg>',eye:'<svg viewBox="0 0 24 24">
1<path fill="currentColor" d="M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z" /></svg>',eyeOff:'<svg viewBox="0 0 24 24"><path fill="currentColor" d="M11.83,9L15,12.16C15,12.11 15,12.05 15,12A3,3 0 0,0 12,9C11.94,9 11.89,9 11.83,9M7.53,9.8L9.08,11.35C9.03,11.56 9,11.77 9,12A3,3 0 0,0 12,15C12.22,15 12.44,14.97 12.65,14.92L14.2,16.47C13.53,16.8 12.79,17 12,17A5,5 0 0,1 7,12C7,11.21 7.2,10.47 7.53,9.8M2,4.27L4.28,6.55L4.73,7C3.08,8.3 1.78,10 1,12C2.73,16.39 7,19.5 12,19.5C13.55,19.5 15.03,19.2 16.38,18.66L16.81,19.08L19.73,22L21,20.73L3.27,3M12,7A5,5 0 0,1 17,12C17,12.64 16.87,13.26 16.64,13.82L19.57,16.75C21.07,15.5 22.27,13.86 23,12C21.27,7.61 17,4.5 12,4.5C10.6,4.5 9.26,4.75 8,5.2L10.17,7.35C10.74,7.13 11.35,7 12,7Z" /></svg>'},i18n:{},undoManager:{},assetManager:{},canvas:{},layerManager:{},storageManager:{},richTextEditor:{},domComponents:{},modal:{},codeManager:{},panels:{},commands:{},cssComposer:{},selectorManager:{},deviceManager:{},styleManager:{},blockManager:{},traitManager:{},textViewCode:"Code",keepUnusedStyles:!1,multiFrames:!1,customUI:!1};var a,s=r(316),l=r.n(s),c=r(895),u=r(346),p=(a=function(t,e){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},a(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}a(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),d=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p(e,t),e}(u.Hn);const f=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return p(n,e),n.prototype.getByComponent=function(t){var e=this;return this.filter(function(n){return e.getComponent(n)===t})[0]},n.prototype.addComponent=function(e,n){var r=this,o=((0,t.isArray)(e)?e:[e]).filter(function(t){return!r.hasComponent(t)}).map(function(t){return new d({component:t})})[0];return this.push(o,n)},n.prototype.getComponent=function(t){return t.get("component")},n.prototype.hasComponent=function(t){var e=this.getByComponent(t);return e&&this.contains(e)},n.prototype.lastComponent=function(){var t=this.last();return t?this.getComponent(t):void 0},n.prototype.allComponents=function(){var t=this;return this.map(function(e){return t.getComponent(e)}).filter(function(t){return t})},n.prototype.removeComponent=function(e,n){var r=this,o=((0,t.isArray)(e)?e:[e]).map(function(t){return r.getByComponent(t)});return this.remove(o,n)},n}(u.FE);var h=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),g=function(){return g=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},g.apply(this,arguments)},m=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},v=function(){function n(n,r,o){this.cls=[],this._em=n,this._name=r;var i=this.name.charAt(0).toLowerCase()+this.name.slice(1),a=(0,t.isUndefined)(n.config[i])?n.config[this.name]:n.config[i],s=!0===a?{}:a||{};s.pStylePrefix=n.config.pStylePrefix||"",(0,t.isUndefined)(a)||a||(s._disable=1),s.em=n,this._config=(0,e.deepMerge)(o||{},s)}return Object.defineProperty(n.prototype,"em",{get:function(){return this._em}
1,enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"config",{get:function(){return this._config},enumerable:!1,configurable:!0}),n.prototype.render=function(t){},n.prototype.postLoad=function(t){},Object.defineProperty(n.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),n.prototype.getConfig=function(t){return t?this.config[t]:this.config},n.prototype.__logWarn=function(t,e){void 0===e&&(e={}),this.em.logWarning("[".concat(this.name,"]: ").concat(t),e)},n.prototype.__appendTo=function(){var e=this.getConfig().appendTo;if(e){var n=(0,t.isElement)(e)?e:document.querySelector(e);if(!n)return this.__logWarn('"appendTo" element not found');n.appendChild(this.render())}},n}();const y=v;var b=function(n){function r(t,e,r,o,i,a){void 0===a&&(a={});var s=n.call(this,t,e,i)||this;return s.cls=[],s.private=!1,s.all=r,s.events=o,!a.skipListen&&s.__initListen(),s}return h(r,n),r.prototype.postLoad=function(t){},r.prototype.render=function(t){},r.prototype.getProjectData=function(t){var e={},n=this.storageKey;return n&&(e[n]=t||this.getAll()),e},r.prototype.loadProjectData=function(t,n){void 0===t&&(t={}),void 0===n&&(n={});var r=n.all,o=n.onResult,i=n.reset,a=this.storageKey,s={action:"load"},l=r||this.all,c=t[a];if("string"==typeof c)try{c=JSON.parse(c)}catch(t){this.__logWarn("Data parsing failed",{input:c})}return i&&c&&l.reset(void 0,s),o?c&&o(c,s):c&&(0,e.isDef)(c.length)&&l.reset(c,s),c},r.prototype.clear=function(t){void 0===t&&(t={});var e=this.all;return e&&e.reset(void 0,t),this},r.prototype.getAll=function(){return m([],this.all.models,!0)},r.prototype.getAllMap=function(){return this.getAll().reduce(function(t,e){return t[e.get(e.idAttribute)]=e,t},{})},r.prototype.__initListen=function(t){void 0===t&&(t={});var e=this,n=e.all,r=e.em,o=e.events;n&&r&&n.on("add",function(t,e,n){return r.trigger(o.add,t,n)}).on("remove",function(t,e,n){return r.trigger(o.remove,t,n)}).on("change",function(t,e){return r.trigger(o.update,t,t.changedAttributes(),e)}).on("all",this.__catchAllEvent,this),this.cls=[n].concat(t.collections||[]),(t.propagate||[]).forEach(function(t){var e=t.entity,o=t.event;e.on("all",function(t,e,i,a){var s=g({event:t},a||i);[r,n].map(function(t){return t.trigger(o,e,s)})})})},r.prototype.__remove=function(e,n){var r=this;void 0===n&&(n={});var o=this.em,i=(0,t.isString)(e)?this.get(e):e,a=function(){return i&&r.all.remove(i,n),i};return!n.silent&&(null==o||o.trigger(this.events.removeBefore,i,a,n)),!n.abort&&a()},r.prototype.__catchAllEvent=function(t,e,n,r){var o=this.em,i=this.events,a=r||n;o&&i.all&&o.trigger(i.all,{event:t,model:e,options:a}),this.__onAllEvent()},r.prototype.__appendTo=function(e){var n=this.config.appendTo;if(n){var r=(0,t.isElement)(n)?n:document.querySelector(n);if(!r)return this.__logWarn('"appendTo" element not found');r.appendChild(this.render(e))}},r.prototype.__onAllEvent=function(){},r.prototype._createId=function(t){void 0===t&&(t=16);var n,r=this.getAll().length+t,o=this.getAllMap();do{n=(0,e.createId)(r)}while(o[n]);return n},r.prototype.__listenAdd=function(t,e){var n=this;t.on("add",function(t,r,o){return n.em.trigger(e,t,o)})},r.prototype.__listenRemove=function(t,e){var n=this;t.on("remove",function(t,r,o){return n.em.trigger(e,t,o)})},r.prototype.__listenUpdate=function(t,e){var n=this;t.on("change",function(t,r){return n.em.trigger(e,t,t.changedAttributes(),r)})},r.prototype.__destroy=function(){var t;this.cls.forEach(function(t){t.stopListening(),t.reset()}),null===(t=this.view)||void 0===t||t.remove(),this.view=void 0},r}(v);const _={stylePrefix:"cv-",scripts:[],styles:[],customBadgeLabel:void 0,autoscrollLimit:50,extHl:!1,frameContent:"<!DOCTYPE html>",frameStyle:"\n body { background-color: #fff }\n * ::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.1) }\n * ::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2) }\n * ::-webkit-scrollbar { width: 10px }\n ",notTextable:["button","a","input[type=checkbox]","input[type=radio]"]};var T=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const C=function(t){function e(e,n,r){var o=t.call(this,n,r)||this;return o._module=e,o}return T(e,t),Object.defineProperty(e.prototype,"module",{get:function(){return this._module}
1,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"config",{get:function(){return this._module.config},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"em",{get:function(){return this._module.em},enumerable:!1,configurable:!0}),e}(u.Hn);var w=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const E=function(e){function n(t,n,r){return e.call(this,n,{module:t,modelConstructor:r})||this}return w(n,e),n.prototype.add=function(n,r){var o,i=this,a=(0,t.isArray)(n)?n:(0,t.isUndefined)(n)?void 0:[n];return a=null!==(o=null==a?void 0:a.map(function(t){return t instanceof i.newModel?t:new i.newModel(i.module,t)}))&&void 0!==o?o:[void 0],e.prototype.add.call(this,(0,t.isArray)(n)?a:a[0],r)},n.prototype.preinitialize=function(t,e){this.newModel=e.modelConstructor,this.module=e.module},n}(u.FE);var S=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),x=function(){return x=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},x.apply(this,arguments)},O=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},A="__aw",k="__ah",P=function(n){function r(r,o){var i=n.call(this,r,o)||this,a=i.em,s=i.attributes,l=s.styles,c=s.component,u=a.Components,p=u.getConfig(),d=a.Css.getAll(),f={},h={em:a,config:p,frame:i,idMap:f};if(!(0,e.isComponent)(c)){var g=(0,e.isObject)(c)?c:{components:c};!g.type&&(g.type="wrapper");var m=u.getType("wrapper").model;i.set("component",new m(g,h))}return l?(0,e.isObject)(l)||(Object.keys(f).length&&Array.isArray(l)&&l.forEach(function(e){var n=e.selectors;if(n&&1==n.length){var r=n[0],o=r.name&&2===r.type&&r;if(o&&f[o.name])o.name=f[o.name];else if((0,t.isString)(r)&&"#"===r[0]){var i=r.substring(1);i&&f[i]&&(n[0]="#".concat(f[i]))}}}),d.add(l),i.set("styles",d)):i.set("styles",d),!o.width&&i.set(A,1),!o.height&&i.set(k,1),i}return S(r,n),r.prototype.defaults=function(){return{x:0,y:0,changesCount:0,attributes:{},width:null,height:null,head:[],component:"",styles:"",_undo:!0,_undoexc:["changesCount"]}},Object.defineProperty(r.prototype,"head",{get:function(){return this.get("head")},enumerable:!1,configurable:!0}),r.prototype.onRemove=function(){this.getComponent().remove({root:1})},r.prototype.changesUp=function(t){void 0===t&&(t={}),t.temporary||t.noCount||t.avoidStore||this.set("changesCount",this.get("changesCount")+1)},r.prototype.getComponent=function(){return this.get("component")},r.prototype.getStyles=function(){return this.get("styles")},r.prototype.disable=function(){this.trigger("disable")},r.prototype.remove=function(){this.view=void 0;var t=this.collection;return t&&t.remove(this)},r.prototype.getHead=function(){return O([],this.head,!0)},r.prototype.setHead=function(t){return this.set("head",O([],t,!0))},r.prototype.addHeadItem=function(t){this.head.push(t)},r.prototype.getHeadByAttr=function(t,e,n){return this.head.filter(function(r){return r.attributes&&r.attributes[t]==e&&(!n||n===r.tag)})[0]},r.prototype.removeHeadByAttr=function(t,e,n){var r=this.getHeadByAttr(t,e,n),o=this.head.indexOf(r);o>=0&&this.head.splice(o,1)},r.prototype.addLink=function(t){var e="link";!this.getHeadByAttr("href",t,e)&&this.addHeadItem({tag:e,attributes:{href:t,rel:"stylesheet"}})},r.prototype.removeLink=function(t){this.removeHeadByAttr("href",t,"link")},r.prototype.addScript=function(t){var e="script";!this.getHeadByAttr("src",t,e)&&this.addHeadItem({tag:e,attributes:{src:t}}
1)},r.prototype.removeScript=function(t){this.removeHeadByAttr("src",t,"script")},r.prototype.getPage=function(){var t;return null===(t=this.collection)||void 0===t?void 0:t.page},r.prototype._emitUpdated=function(t){void 0===t&&(t={}),this.em.trigger("frame:updated",x({frame:this},t))},r.prototype.toJSON=function(e){void 0===e&&(e={});var n=C.prototype.toJSON.call(this,e),r=(0,t.result)(this,"defaults");return e.fromUndo&&delete n.component,delete n.styles,delete n.changesCount,n[A]&&delete n.width,n[k]&&delete n.height,(0,t.forEach)(n,function(t,e){0===e.indexOf("_")&&delete n[e]}),(0,t.forEach)(r,function(t,e){n[e]===t&&delete n[e]}),(0,t.forEach)(["attributes","head"],function(e){(0,t.isEmpty)(n[e])&&delete n[e]}),n},r}(C);const N=P;var M=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const L=function(e){function n(n,r){void 0===r&&(r=[]);var o=e.call(this,n,r,N)||this;return o.loadedItems=0,o.itemsToLoad=0,(0,t.bindAll)(o,"itemLoaded"),o.on("reset",o.onReset),o.on("remove",o.onRemove),o}return M(n,e),n.prototype.onReset=function(t,e){var n=this;((null==e?void 0:e.previousModels)||[]).map(function(t){return n.onRemove(t)})},n.prototype.onRemove=function(t){null==t||t.onRemove()},n.prototype.itemLoaded=function(){this.loadedItems++,this.loadedItems>=this.itemsToLoad&&(this.trigger("loaded:all"),this.listenToLoadItems(!1))},n.prototype.listenToLoad=function(){this.loadedItems=0,this.itemsToLoad=this.length,this.listenToLoadItems(!0)},n.prototype.listenToLoadItems=function(t){var e=this;this.forEach(function(n){return n[t?"on":"off"]("loaded",e.itemLoaded)})},n}(E);var I=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const D=function(e){function n(t,n){void 0===n&&(n={});var r=e.call(this,t,n)||this,o=n.em,i={};r.em=o,t.frames||(i.component=t.component,i.styles=t.styles,["component","styles"].map(function(t){return r.unset(t)}));var a=t.frames||[i],s=new L(o.Canvas,a);s.page=r,r.set("frames",s),!r.getId()&&r.set("id",null==o?void 0:o.get("PageManager")._createId());var l=null==o?void 0:o.get("UndoManager");return null==l||l.add(s),r}return I(n,e),n.prototype.defaults=function(){return{name:"",frames:[],_undo:!0}},n.prototype.onRemove=function(){this.getFrames().reset()},n.prototype.getFrames=function(){return this.get("frames")},n.prototype.getId=function(){return this.id},n.prototype.getName=function(){return this.get("name")},n.prototype.setName=function(t){return this.set({name:t})},n.prototype.getAllFrames=function(){return this.getFrames().models||[]},n.prototype.getMainFrame=function(){return this.getFrames().at(0)},n.prototype.getMainComponent=function(){var t=this.getMainFrame();return null==t?void 0:t.getComponent()},n.prototype.toJSON=function(e){void 0===e&&(e={});var n=u.Hn.prototype.toJSON.call(this,e),r=(0,t.result)(this,"defaults");return(0,t.forEach)(n,function(t,e){0===e.indexOf("_")&&delete n[e]}),(0,t.forEach)(r,function(t,e){n[e]===t&&delete n[e]}),n},n}(u.Hn);var R=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),j=function(){return j=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},j.apply(this,arguments)};const H=function(t){function e(e,n){var r=t.call(this,e)||this;return r.on("reset",r.onReset),r.on("remove",r.onRemove),r.model=function(t,e){return void 0===e&&(e={}),new D(t,j(j({},e),{em:n}))},r}return R(e,t),e.prototype.onReset=function(t,e){var n,r=this;null===(n=null==e?void 0:e.previousModels)||void 0===n||n.map(function(t){return r.onRemove(t)})},e.prototype.onRemove=function(t){null==t||t.onRemove()},e}(u.FE);var F=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),B=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},V="page",U="".concat(V,":"),z="".concat(U,"select"),G="".concat(z,":before"),$="".concat(U,"update"),q="".concat(U,"add"),W="".concat(q,":before"),K="".concat(U,"remove"),Y="".concat(K,":before"),X="change:selected",Z="main",Q={all:V,select:z,selectBefore:G,update:$,add:q,addBefore:W,remove:K,removeBefore:Y},J=function(n){function r(e){var r=n.call(this,e,"PageManager",new H([],e),Q)||this;r.storageKey="pages",(0,t.bindAll)(r,"_onPageChange");var o=new C({_undo:!0});return r.model=o,r.pages.on("reset",function(t){return t.at(0)&&r.select(t.at(0))}),r.pages.on("all",r.__onChange,r),o.on(X,r._onPageChange),r}return F(r,n),Object.defineProperty(r.prototype,"pages",{get:function(){return this.all}
1,enumerable:!1,configurable:!0}),r.prototype.getAll=function(){return B([],this.all.models,!0)},r.prototype.__onChange=function(t,e,n,r){var o=r||n;this.em.trigger(V,{event:t,page:e,options:o})},r.prototype.onLoad=function(){var t,e=this,n=this.pages,r={silent:!0};n.add((null===(t=this.config.pages)||void 0===t?void 0:t.map(function(t){return new D(t,{em:e.em,config:e.config})}))||[],r);var o=n.length?this.getMain():this.add({type:Z},r);o&&this.select(o,r)},r.prototype._onPageChange=function(t,e,n){var r=this.em,o=r.Layers,i=e.getMainComponent();o&&i&&o.setRoot(i),r.trigger(z,e,t.previous("selected")),this.__onChange(X,e,n)},r.prototype.postLoad=function(){var t=this,e=t.em,n=t.model,r=t.pages,o=e.UndoManager;o.add(n),o.add(r),r.on("add remove reset change",function(t,n,r){return e.changesUp(r||n)})},r.prototype.add=function(t,e){var n=this;void 0===e&&(e={});var r=this.em;t.id=t.id||this._createId();var o=function(){var r=n.pages.add(new D(t,{em:n.em,config:n.config}),e);return e.select&&n.select(r),r};return!e.silent&&r.trigger(W,t,o,e),!e.abort&&o()},r.prototype.remove=function(e,n){var r=this;void 0===n&&(n={});var o=this.em,i=(0,t.isString)(e)?this.get(e):e,a=function(){return i&&r.pages.remove(i,n),i};return!n.silent&&o.trigger(Y,i,a,n),!n.abort&&a()},r.prototype.get=function(t){return this.pages.filter(function(e){return e.get(e.idAttribute)===t})[0]},r.prototype.getMain=function(){var t=this.pages;return t.filter(function(t){return t.get("type")===Z})[0]||t.at(0)},r.prototype.getAllWrappers=function(){var e=this.getAll();return(0,t.unique)((0,t.flatten)(e.map(function(t){return t.getAllFrames().map(function(t){return t.getComponent()})})))},r.prototype.select=function(e,n){void 0===n&&(n={});var r=(0,t.isString)(e)?this.get(e):e;return r&&(this.em.trigger(G,r,n),this.model.set("selected",r,n)),this},r.prototype.getSelected=function(){return this.model.get("selected")},r.prototype.destroy=function(){var t=this;this.pages.off().reset(),this.model.stopListening(),this.model.clear({silent:!0}),["selected","model"].map(function(e){return t[e]=0})},r.prototype.store=function(){return this.getProjectData()},r.prototype.load=function(t){return this.loadProjectData(t,{all:this.pages,reset:!0})},r.prototype._createId=function(){var t,n=this.getAll().length+16,r=this.getAllMap();do{t=(0,e.createId)(n)}while(r[t]);return t},r}(b);const tt=J,et={default:"",devices:[{id:"desktop",name:"Desktop",width:""},{id:"tablet",name:"Tablet",width:"770px",widthMedia:"992px"},{id:"mobileLandscape",name:"Mobile landscape",width:"568px",widthMedia:"768px"},{id:"mobilePortrait",name:"Mobile portrait",width:"320px",widthMedia:"480px"}]};var nt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const rt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return nt(e,t),e.prototype.defaults=function(){return{name:"",width:null,height:"",widthMedia:null,priority:null}},e.prototype.initialize=function(){var t=this;null===this.get("widthMedia")&&this.set("widthMedia",this.get("width")),null===this.get("width")&&this.set("width",this.get("widthMedia")),!this.get("priority")&&this.set("priority",parseFloat(this.get("widthMedia"))||0),["width","height","widthMedia"].forEach(function(e){return t.checkUnit(e)})},e.prototype.checkUnit=function(t){var e=this.get(t)||"";(parseFloat(e)||0).toString()===e.toString()&&this.set(t,"".concat(e,"px"))},e.prototype.getName=function(){return this.get("name")||this.get("id")},e.prototype.getWidthMedia=function(){return this.get("widthMedia")||""},e}(u.Hn);var ot=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),it=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ot(e,t),e}(u.FE);const at=it;it.prototype.model=rt;var st=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),lt=function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t};const ct=function(t){function e(e){var n=t.call(this,e)||this;return n.config=e.config||{},n.em=n.config.em,n.ppfx=n.config.pStylePrefix||"",n.listenTo(n.em,"change:device",n.updateSelect),n}return st(e,t),e.prototype.template=function(t){var e=t.ppfx,r=t.label;return n(ut||(ut=lt(['\n <div class="','device-label">','</div>\n <div class="',"field ",'select">
1\n <span id="','input-holder">\n <select class="','devices"></select>\n </span>\n <div class="','sel-arrow">\n <div class="','d-s-arrow"></div>\n </div>\n </div>\n <button style="display:none" class="','add-trasp" data-add-trasp>+</button>\n '],['\n <div class="','device-label">','</div>\n <div class="',"field ",'select">\n <span id="','input-holder">\n <select class="','devices"></select>\n </span>\n <div class="','sel-arrow">\n <div class="','d-s-arrow"></div>\n </div>\n </div>\n <button style="display:none" class="','add-trasp" data-add-trasp>+</button>\n '])),e,r,e,e,e,e,e,e,e)},e.prototype.events=function(){return{change:"updateDevice","click [data-add-trasp]":"startAdd"}},e.prototype.startAdd=function(){},e.prototype.updateDevice=function(){var t=this.em;if(t){var e=this.devicesEl;t.set("device",e?e.val():"")}},e.prototype.updateSelect=function(){var t=this.em,e=this.devicesEl;if(t&&t.getDeviceModel&&e){var n=t.getDeviceModel();e.val(n?n.get("id"):"")}},e.prototype.getOptions=function(){var t=this.collection,e=this.em,n="";return t.forEach(function(t){var r=t.attributes,o=r.name,i=r.id,a=e&&e.t&&e.t("deviceManager.devices.".concat(i))||o;n+='<option value="'.concat(i||o,'">').concat(a,"</option>")}),n},e.prototype.render=function(){var t=this,e=t.em,n=t.ppfx,r=t.$el,o=t.el,i=e&&e.t&&e.t("deviceManager.device");return r.html(this.template({ppfx:n,label:i})),this.devicesEl=r.find(".".concat(n,"devices")),this.devicesEl.append(this.getOptions()),this.devicesEl.val(e.get("device")),o.className="".concat(n,"devices-c"),this},e}(u.G7);var ut,pt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),dt=function(){return dt=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},dt.apply(this,arguments)},ft="device",ht="".concat(ft,":"),gt="".concat(ht,"select"),mt=("".concat(gt,":before"),"".concat(ht,"update")),vt="".concat(ht,"add"),yt=("".concat(vt,":before"),"".concat(ht,"remove")),bt="".concat(yt,":before"),_t={all:ft,select:gt,update:mt,add:vt,remove:yt,removeBefore:bt},Tt=function(e){function n(t){var n,r=this;return(r=e.call(this,t,"DeviceManager",new at,_t,et)||this).Device=rt,r.Devices=at,r.storageKey="",r.devices=r.all,null===(n=r.config.devices)||void 0===n||n.forEach(function(t){return r.add(t,{silent:!0})}),r.select(r.config.default||r.devices.at(0)),t.on("change:device",r._onSelect,r),r}return pt(n,e),n.prototype._onSelect=function(t,e,n){var r=this.em,o=this.events,i=t.previous("device"),a=this.get(e),s=o.select;r.trigger(s,a,this.get(i)),this.__catchAllEvent(s,a,n)},n.prototype.add=function(e,n){var r;void 0===n&&(n={});var o=n;if((0,t.isString)(e)){var i=n;r=dt(dt({},o=arguments[2]||{}),{id:e,name:o.name||e,width:i})}else r=e;return r.id||(r.id=r.name||this._createId()),this.devices.add(r,o)},n.prototype.get=function(t){return this.getAll().filter(function(e){return e.get("name")===t})[0]||this.devices.get(t)||null},n.prototype.remove=function(t,e){return void 0===e&&(e={}),this.__remove(t,e)},n.prototype.getDevices=function(){return this.devices.models},n.prototype.select=function(e,n){void 0===n&&(n={});var r=(0,t.isString)(e)?this.get(e):e;return r&&this.em.set("device",r.get("id"),n),this},n.prototype.getSelected=function(){return this.get(this.em.get("device"))},n.prototype.getAll=function(){return this.devices},n.prototype.render=function(){var t,e=this.em;return null===(t=this.view)||void 0===t||t.remove(),this.view=new ct({collection:this.devices,config:dt({em:e},this.config)}),this.view.render().el},n.prototype.destroy=function(){this.__destroy()},n}(b);const Ct=Tt;var wt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Et=function(t){function e(e){var n=this,r=e.em,o=e.config,i=o.scripts,a=o.styles;return(n=t.call(this,e,{scripts:i,styles:a})||this).set("frames",new L(e)),n.listenTo(n,"change:zoom",n.onZoomChange),n.listenTo(r,"change:device ".concat(mt),n.updateDevice),n.listenTo(r,z,n._pageUpdated),n}return wt(e,t),e.prototype.defaults=function(){return{frame:"",frames:[],rulers:!1,zoom:100,x:0,y:0,scripts:[],styles:[]}}
1,Object.defineProperty(e.prototype,"frames",{get:function(){return this.get("frames")},enumerable:!1,configurable:!0}),e.prototype.init=function(){var t=this.em.Pages.getMain();this.set("frames",t.getFrames()),this.updateDevice({frame:t.getMainFrame()})},e.prototype._pageUpdated=function(t,e){var n=this.em;n.setSelected(),n.get("readyCanvas")&&n.stopDefault(),null==e||e.getFrames().map(function(t){return t.disable()}),this.set("frames",t.getFrames()),this.updateDevice({frame:t.getMainFrame()})},e.prototype.updateDevice=function(t){void 0===t&&(t={});var e=this.em,n=e.getDeviceModel(),r=t.frame||e.getCurrentFrameModel();if(r&&n){var o=n.attributes,i=o.width,a=o.height;r.set({width:i,height:a},{noUndo:1})}},e.prototype.onZoomChange=function(){this.get("zoom")<1&&this.set("zoom",1)},e}(C);const St=Et;var xt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const Ot=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return xt(e,t),Object.defineProperty(e.prototype,"pfx",{get:function(){return this.ppfx+this.config.stylePrefix||""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ppfx",{get:function(){return this.em.config.stylePrefix||""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"module",{get:function(){var t,e;return null!==(e=null===(t=this.model)||void 0===t?void 0:t.module)&&void 0!==e?e:this.collection.module},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"em",{get:function(){return this.module.em},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"config",{get:function(){return this.module.config},enumerable:!1,configurable:!0}),e.prototype.preinitialize=function(t){this.className=""},e}(u.G7);var At=r(491),kt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const Pt=function(t){function e(e,n){void 0===e&&(e={}),void 0===n&&(n=!1);var r=t.call(this,e)||this;return r.itemsView="",r.itemType="type",r.reuseView=!1,r.viewCollection=[],n&&r.listenTo(r.collection,"add",r.addTo),r}return kt(e,t),e.prototype.addTo=function(t){this.add(t)},e.prototype.itemViewNotFound=function(t){},e.prototype.add=function(t,e){var n,r=this,o=r.reuseView,i=r.viewCollection,a=(r.itemsView,e||null),s=t.get(this.itemType);n=t.view&&o?t.view:this.renderView(t,s),i.push(n);var l=n.render().el;a?a.appendChild(l):this.$el.append(l)},e.prototype.render=function(){var t=this,e=document.createDocumentFragment();return this.clearItems(),this.$el.empty(),this.collection.length&&this.collection.each(function(n){return t.add(n,e)}),this.$el.append(e),this.onRender(),this},e.prototype.onRender=function(){},e.prototype.onRemoveBefore=function(t,e){},e.prototype.onRemove=function(t,e){},e.prototype.remove=function(t){void 0===t&&(t={});var e=this.viewCollection;return this.onRemoveBefore(e,t),this.clearItems(),u.G7.prototype.remove.apply(this,t),this.onRemove(e,t),this},e.prototype.clearItems=function(){this.viewCollection},e}(Ot);var Nt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const Mt=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,e)||this;n.config=e.config||{};var r=n.model;return n.listenTo(r,"change",n.render),n.listenTo(r,"destroy remove",n.remove),n.listenTo(r.get("selectors"),"change",n.render),n}return Nt(e,t),e.prototype.tagName=function(){return"style"},e.prototype.render=function(){var t=this.model,e=this.el,n=t.get("important");return e.innerHTML=t.toCSS({important:n}),this},e}(u.G7);var Lt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const It=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Lt(e,t),e.prototype._createElement=function(){return document.createTextNode("")},e.prototype.render=function(){var t=this.model,e=t.get("important");return this.el.textContent=t.getDeclaration({important:e}),this},e}(Mt);var Dt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Rt=function(t,e){return"".concat(t).concat(e?"-".concat(parseFloat(e)):"")},jt=function(e){function n(n){var r=e.call(this,n)||this;(0,t.bindAll)(r,"sortRules");var o=n.config||{};r.atRules={},r.config=o,r.em=o.em,r.pfx=o.stylePrefix||"",r.className=r.pfx+"rules";var i=r.collection;return r.listenTo(i,"add",r.addTo),r.listenTo(i,"reset",r.render),r}return Dt(n,e),n.prototype.addTo=function(t){this.addToCollection(t)},n.prototype.addToCollection=function(t,e){if(this.renderStarted){var n,r,o=e||null,i={model:t,config:this.config};if("keyframes"===t.get("atRuleType")){var a=t.getAtRule(),s=this.atRules[a];if(!s){var l=document.createElement("style");s=document.createTextNode(""),l.appendChild(document.createTextNode("".concat(a,"{"))),l.appendChild(s),l.appendChild(document.createTextNode("}")),this.atRules[a]=s,n=l}r=new It(i),s.appendData(r.render().el.textContent)}else n=(r=new Mt(i)).render().el;var c=this.className,u=t.get("mediaText"),p=Rt(c),d=p;if(u&&(d=Rt(c,this.getMediaWidth(u))),n){var f=o||this.el,h=void 0;try{h=f.querySelector("#".concat(d))}catch(t){}h||(h=f.querySelector("#".concat(p))),null==h||h.appendChild(n)}return n}},n.prototype.getMediaWidth=function(t){return t&&t.replace("(".concat(this.em.getConfig().mediaCondition,": "),"").replace(")","")},n.prototype.sortRules=function(t,e){var n=-1!==(this.em.getConfig().mediaCondition||"").indexOf("min-width");return n?(n?t:e)-(n?e:t):0},n.prototype.render=function(){var t=this;this.renderStarted=!0,this.atRules={};var e=this,n=e.em,r=e.$el,o=e.collection,i=this.className,a=document.createDocumentFragment();r.empty();var s=n.Devices.getAll().pluck("priority").sort(this.sortRules);return s.every(function(t){return t}
1)&&s.unshift(0),s.forEach(function(t){return a.appendChild((0,At.ut)("div",{id:Rt(i,t)}))}),o.each(function(e){return t.addToCollection(e,a)}),r.append(a),r.attr("class",i),this},n}(u.G7);const Ht=jt;var Ft=function(){return Ft=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Ft.apply(this,arguments)},Bt=function(){function n(e,n){var r=this;this.em=e,this.canvas=e.Canvas;var o=n||this.canvas.getFrames().map(function(t){return t.getComponent().getEl()}),i=Array.isArray(o)?o:[o];this.el=i[0],this.counter=0,(0,t.bindAll)(this,"handleDragEnter","handleDragOver","handleDrop","handleDragLeave"),i.forEach(function(t){return r.toggleEffects(t,!0)})}return n.prototype.toggleEffects=function(t,n){var r={on:e.on,off:e.off},o=n?"on":"off";r[o](t,"dragenter",this.handleDragEnter),r[o](t,"dragover",this.handleDragOver),r[o](t,"drop",this.handleDrop),r[o](t,"dragleave",this.handleDragLeave)},n.prototype.__customTglEff=function(t){var n,r=t?e.on:e.off,o=this.el.ownerDocument,i=null===(n=o.defaultView)||void 0===n?void 0:n.frameElement;this.sortOpts=t?{onStart:function(t){var n=t.sorter;(0,e.on)(i,"pointermove",n.onMove)},onEnd:function(t){var n=t.sorter;(0,e.off)(i,"pointermove",n.onMove)},customTarget:function(t){var e=t.event;return o.elementFromPoint(e.clientX,e.clientY)}}:null,r(i,"pointerenter",this.handleDragEnter),r(i,"pointermove",this.handleDragOver),r(document,"pointerup",this.handleDrop),r(i,"pointerout",this.handleDragLeave)},n.prototype.startCustom=function(){this.__customTglEff(!0)},n.prototype.endCustom=function(t){this.over?this.endDrop(t):this.__customTglEff(!1)},n.prototype.endDrop=function(t,e){var n=this.em,r=this.dragStop;this.counter=0,r&&r(t),this.__customTglEff(!1),n.trigger("canvas:dragend",e)},n.prototype.handleDragLeave=function(t){this.updateCounter(-1,t)},n.prototype.updateCounter=function(t,e){this.counter+=t,0===this.counter&&this.endDrop(!0,e)},n.prototype.handleDragEnter=function(t){var e=this,n=this.em,r=this.canvas,o=t.dataTransfer;if(this.updateCounter(1,t),!this.over){this.over=!0;var i,a,s=n.Utils,l=n.get("dragContent")||"<br>";if(n.stopDefault(),n.inAbsoluteMode()){var c=n.Components.getWrapper(),u=c.append({})[0],p=n.Commands.run("core:component-drag",{event:t,guidesInfo:1,center:1,target:u,onEnd:function(t,n,i){var a;if(!i.cancelled){a=c.append(l)[0];var s=r.getOffset(),p=u.getStyle(),d=p.top,f=p.left,h=p.position,g=(0,At.GX)(t.target),m=parseInt("".concat(parseFloat(f)+g.x-s.left),10),v=parseInt("".concat(parseFloat(d)+g.y-s.top),10);a.addStyle({left:m+"px",top:v+"px",position:h})}e.handleDragEnd(a,o),u.remove()}});i=function(e){return p.stop(t,{cancel:e})},a=function(t){return l=t}}else{var d=new s.Sorter(Ft({em:n,wmargin:1,nested:1,canvasRelative:1,direction:"a",container:this.el,placer:r.getPlacerEl(),containerSel:"*",itemSel:"*",pfx:"gjs-",onEndMove:function(t){return e.handleDragEnd(t,o)},document:this.el.ownerDocument},this.sortOpts||{}));d.setDropContent(l),d.startSort(),this.sorter=d,i=function(t){t&&(d.moved=!1),d.endMove()},a=function(t){return d.setDropContent(t)}}this.dragStop=i,this.dragContent=a,n.trigger("canvas:dragenter",o,l)}},n.prototype.handleDragEnd=function(t,e){var n=this.em;this.over=!1,t&&(n.set("dragResult",t),n.trigger("canvas:drop",e,t)),n.runDefault({preserveSelected:1})},n.prototype.handleDragOver=function(t){t.preventDefault(),this.em.trigger("canvas:dragover",t)},n.prototype.handleDrop=function(t){t.preventDefault();var e=this.dragContent,n=t.dataTransfer,r=this.getContentByData(n).content;t.target.style.border="",r&&e&&e(r),this.endDrop(!r,t)},n.prototype.getContentByData=function(e){var n=this.em,r=e&&e.types,o=e&&e.files||[],i=n.get("dragContent"),a=e&&e.getData("text");if(o.length){a=[];for(var s=0;s<o.length;s++){var l=o[s],c=l.type.split("/")[0];"image"==c&&a.push({type:c,file:l,attributes:{alt:l.name}})}}else if(i)a=i;else if((0,t.indexOf)(r,"text/html")>=0)a=e&&e.getData("text/html").replace(/<\/?meta[^>]*>/g,"");
1else if((0,t.indexOf)(r,"text/uri-list")>=0)a={type:"link",attributes:{href:a},content:a};else if((0,t.indexOf)(r,"text/json")>=0){var u=e&&e.getData("text/json");u&&(a=JSON.parse(u))}else 1===r.length&&"text/plain"===r[0]&&(a="<div>".concat(a,"</div>"));var p={content:a};return n.trigger("canvas:dragdata",e,p),p},n}();const Vt=Bt;var Ut=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),zt=function(){return zt=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},zt.apply(this,arguments)},Gt=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},$t=function(n){function r(r,o){var i=n.call(this,{model:r})||this;i.dragging=!1,i.loaded=!1,i.lastMaxHeight=0,i.tools={},(0,t.bindAll)(i,"updateClientY","stopAutoscroll","autoscroll","_emitUpdate");var a=i,s=a.el;a.em,i.module._config=zt(zt({},i.config||{}),{frameView:i}),i.frameWrapView=o,i.showGlobalTools=(0,t.debounce)(i.showGlobalTools.bind(i),50);var l=i.getCanvasModel();return i.listenTo(r,"change:head",i.updateHead),i.listenTo(l,"change:styles",i.renderStyles),r.view=i,(0,e.setViewEl)(s,i),i}return Ut(r,n),Object.defineProperty(r.prototype,"tagName",{get:function(){return"iframe"},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"attributes",{get:function(){return{allowfullscreen:"allowfullscreen"}},enumerable:!1,configurable:!0}),r.prototype.updateHead=function(){var t=this.model,e=this.getHead(),n=[],r=[],o=t.head,i=t.previous("head"),a=function(t){return void 0===t&&(t={}),Object.keys(t).sort().map(function(e){return"[".concat(e,'="').concat(t[e],'"]')}).join("")},s=function(t,e,n){t.forEach(function(t){var r=t.tag,o=t.attributes;!e.some(function(t){return t.tag===r&&a(t.attributes)===a(o)})&&n.push(t)})};s(o,i,r),s(i,o,n),n.forEach(function(t){var n,r=e.querySelector("".concat(t.tag).concat(a(t.attributes)));null===(n=null==r?void 0:r.parentNode)||void 0===n||n.removeChild(r)}),(0,At.SJ)(e,r)},r.prototype.getEl=function(){return this.el},r.prototype.getCanvasModel=function(){return this.em.Canvas.getModel()},r.prototype.getWindow=function(){return this.getEl().contentWindow},r.prototype.getDoc=function(){return this.getEl().contentDocument},r.prototype.getHead=function(){return this.getDoc().querySelector("head")},r.prototype.getBody=function(){return this.getDoc().querySelector("body")},r.prototype.getWrapper=function(){return this.getBody().querySelector("[data-gjs-type=wrapper]")},r.prototype.getJsContainer=function(){return this.jsContainer||(this.jsContainer=(0,At.ut)("div",{class:"".concat(this.ppfx,"js-cont")})),this.jsContainer},r.prototype.getToolsEl=function(){var t;return null===(t=this.frameWrapView)||void 0===t?void 0:t.elTools},r.prototype.getGlobalToolsEl=function(){return this.em.Canvas.getGlobalToolsEl()},r.prototype.getHighlighter=function(){return this._getTool("[data-hl]")},r.prototype.getBadgeEl=function(){return this._getTool("[data-badge]")},r.prototype.getOffsetViewerEl=function(){return this._getTool("[data-offset]")},r.prototype.getRect=function(){return this.rect||(this.rect=this.el.getBoundingClientRect()),this.rect},r.prototype.getOffsetRect=function(){var t=this.el,e=this.getBody(),n=e.scrollTop,r=e.scrollLeft,o=t.offsetHeight,i=t.offsetWidth;return{top:t.offsetTop,left:t.offsetLeft,height:o,width:i,scrollTop:n,scrollLeft:r,scrollBottom:n+o,scrollRight:r+i}},r.prototype._getTool=function(t){var e=this.tools,n=this.getToolsEl();return e[t]||(e[t]=n.querySelector(t)),e[t]},r.prototype.remove=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this.wrapper;return this._toggleEffects(!1),this.tools={},n&&n.remove(),Ot.prototype.remove.apply(this,t),this},r.prototype.startAutoscroll=function(){var t=this;this.lastMaxHeight=this.getWrapper().offsetHeight-this.el.offsetHeight,setTimeout(function(){t._toggleAutoscrollFx(!0),requestAnimationFrame(t.autoscroll)},0)},r.prototype.autoscroll=function(){if(this.dragging){var e=this.lastClientY,n=this.em.Canvas,r=this.getWindow(),o=r.pageYOffset,i=e||0,a=n.getConfig().autoscrollLimit,s=this.getRect().height-a,l=o;i<a&&(l-=a-i),i>s&&(l+=i-s),!(0,t.isUndefined)(e)&&l!==o&&l>0&&l<this.lastMaxHeight&&(this.getGlobalToolsEl().style.opacity="0",this.showGlobalTools(),r.scrollTo(0,l)),requestAnimationFrame(this.autoscroll)}},r.prototype.updateClientY=function(t){t.preventDefault(),this.lastClientY=(0,e.getPointerEvent)(t).clientY*this.em.getZoomDecimal()},r.prototype.showGlobalTools=function(){this.getGlobalToolsEl().style.opacity=""},r.prototype.stopAutoscroll=function(){this.dragging&&this._toggleAutoscrollFx(!1)},r.prototype._toggleAutoscrollFx=function(t){this.dragging=t;var n=this.getWindow(),r=t?"on":"off",o={on:e.on,off:e.off};o[r](n,"mousemove dragover",this.updateClientY),o[r](n,"mouseup",this.stopAutoscroll)},r.prototype.render=function(){var t=this.$el,e=this.ppfx;return t.attr({class:"".concat(e,"frame")}),this.renderScripts(),this},r.prototype.renderScripts=function(){var e=this,n=this,r=n.el,o=n.model,i=n.em,a="frame:load",s={el:r,model:o,view:this},l=this.getCanvasModel(),c=function(n){var o;if(n.length>0){var l=n.shift(),u=(0,At.ut)("script",zt({type:"text/javascript"},(0,t.isString)(l)?{src:l}:l));u.onerror=u.onload=c.bind(null,n),null===(o=r.contentDocument)||void 0===o||o.head.appendChild(u)}else e.renderBody(),i&&i.trigger(a,s)};r.onload=function(){var t=e.config.frameContent;if(t){var n=e.getDoc();n.open(),n.write(t),n.close()}i&&i.trigger("".concat(a,":before"),s),c(Gt([],l.get("scripts"),!0))}},r.prototype.renderStyles=function(e){void 0===e&&(e={});var n=this.getHead(),r=this.getCanvasModel(),o=function(e){return e.map(function(e){return{tag:"link",attributes:zt({rel:"stylesheet"},(0,t.isString)(e)?{href:e}:e)}})},i=o(e.prev||r.previous("styles")),a=o(r.get("styles")),s=[],l=[],c=function(t,e,n){t.forEach(function(t){var r=t.attributes.href;!e.some(function(t){return t.attributes.href===r})&&n.push(t)})};
1c(a,i,l),c(i,a,s),s.forEach(function(t){var e,r=n.querySelector('link[href="'.concat(t.attributes.href,'"]'));null===(e=null==r?void 0:r.parentNode)||void 0===e||e.removeChild(r)}),(0,At.SJ)(n,l)},r.prototype.renderBody=function(){var t,n,r=this,o=this,i=o.config,a=o.em,s=o.model,l=o.ppfx,c=this.getDoc(),u=this.getBody(),p=this.getWindow(),d=a.config;p._isEditor=!0,this.renderStyles({prev:[]}),(0,At.R3)(u,"<style>\n ".concat(d.baseCss||i.frameStyle||"",'\n\n [data-gjs-type="wrapper"] {\n min-height: 100vh;\n padding-top: 0.001em;\n }\n\n .').concat(l,"dashed *[data-gjs-highlightable] {\n outline: 1px dashed rgba(170,170,170,0.7);\n outline-offset: -2px;\n }\n\n .").concat(l,"selected {\n outline: 2px solid #3b97e3 !important;\n outline-offset: -2px;\n }\n\n .").concat(l,"selected-parent {\n outline: 2px solid ").concat("#ffca6f"," !important\n }\n\n .").concat(l,"no-select {\n user-select: none;\n -webkit-user-select:none;\n -moz-user-select: none;\n }\n\n .").concat(l,"freezed {\n opacity: 0.5;\n pointer-events: none;\n }\n\n .").concat(l,"no-pointer {\n pointer-events: none;\n }\n\n .").concat(l,"plh-image {\n background: #f5f5f5;\n border: none;\n height: 100px;\n width: 100px;\n display: block;\n outline: 3px solid #ffca6f;\n cursor: pointer;\n outline-offset: -2px\n }\n\n .").concat(l,"grabbing {\n cursor: grabbing;\n cursor: -webkit-grabbing;\n }\n\n .").concat(l,"is__grabbing {\n overflow-x: hidden;\n }\n\n .").concat(l,"is__grabbing,\n .").concat(l,"is__grabbing * {\n cursor: grabbing !important;\n }\n\n ").concat(d.canvasCss||"","\n ").concat(d.protectedCss||"","\n </style>"));var f=s.getComponent(),h=a.Components.getType("wrapper").view;this.wrapper=new h({model:f,config:zt(zt({},f.config),{em:a,frameView:this})}).render(),(0,At.R3)(u,null===(t=this.wrapper)||void 0===t?void 0:t.el),(0,At.R3)(u,new Ht({collection:s.getStyles(),config:zt(zt({},a.Css.getConfig()),{frameView:this})}).render().el),(0,At.R3)(u,this.getJsContainer()),(0,e.on)(u,"click",function(t){var e;return t&&"A"==(null===(e=t.target)||void 0===e?void 0:e.tagName)&&t.preventDefault()}),(0,e.on)(u,"submit",function(t){return t&&t.preventDefault()}),[{event:"keydown keyup keypress",class:"KeyboardEvent"},{event:"mousedown mousemove mouseup",class:"MouseEvent"},{event:"pointerdown pointermove pointerup",class:"PointerEvent"},{event:"wheel",class:"WheelEvent"}].forEach(function(t){return t.event.split(" ").forEach(function(e){c.addEventListener(e,function(e){return r.el.dispatchEvent((0,At.t3)(e,t.class))})})}),this._toggleEffects(!0),(0,e.hasDnd)(a)&&(this.droppable=new Vt(a,null===(n=this.wrapper)||void 0===n?void 0:n.el)),s.trigger("loaded"),this.loaded=!0},r.prototype._toggleEffects=function(t){var n=t?e.on:e.off,r=this.getWindow();r&&n(r,"".concat(At.G1," resize"),this._emitUpdate)},r.prototype._emitUpdate=function(){this.model._emitUpdated()},r}(Ot);const qt=$t;var Wt=r(668),Kt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Yt=function(){return Yt=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Yt.apply(this,arguments)};const Xt=function(e){function n(n,r){var o=e.call(this,{model:n})||this;return(0,t.bindAll)(o,"onScroll","frameLoaded","updateOffset","remove","startDrag"),Yt(Yt({},n.config),{frameWrapView:o}),o.cv=r,o.frame=new qt(n,o),o.classAnim="".concat(o.ppfx,"frame-wrapper--anim"),o.updateOffset=(0,t.debounce)(o.updateOffset.bind(o),0),o.updateSize=(0,t.debounce)(o.updateSize.bind(o),0),o.listenTo(n,"loaded",o.frameLoaded),o.listenTo(n,"change:x change:y",o.updatePos),o.listenTo(n,"change:width change:height",o.updateSize),o.listenTo(n,"destroy remove",o.remove),o.updatePos(),o.setupDragger(),o}return Kt(n,e),n.prototype.events=function(){return{"click [data-action-remove]":"remove","mousedown [data-action-move]":"startDrag"}},n.prototype.setupDragger=function(){var t,e,n,r=this,o=this.module,i=this.model,a=function(t){o.toggleFramesEvents(t)};this.dragger=new Wt.Z({onStart:function(){var o=i.attributes,s=o.x,l=o.y;n=r.em.getZoomMultiplier(),t=s,e=l,a(!1)},onEnd:function(){return a(!0)},setPosition:function(r){i.set({x:t+r.x*n,y:e+r.y*n})}})},n.prototype.startDrag=function(t){var e;t&&(null===(e=this.dragger)||void 0===e||e.start(t))},n.prototype.__clear=function(t){var e=this.frame;e&&e.remove(t),(0,At.L_)(this.elTools)},n.prototype.remove=function(t){var e=this;return this.__clear(t),Ot.prototype.remove.apply(this,t),["frame","dragger","cv","elTools"].forEach(function(t){return e[t]=0}),this},n.prototype.updateOffset=function(){var t,e=this,n=e.em,r=e.$el,o=e.frame;n&&!n.destroyed&&(n.runDefault({preserveSelected:1}),r.removeClass(this.classAnim),null===(t=null==o?void 0:o.model)||void 0===t||t._emitUpdated())},n.prototype.updatePos=function(t){var e=this.model,n=this.el,r=e.attributes,o=r.x,i=r.y,a=n.style;this.frame.rect=void 0,a.left=isNaN(o)?o:"".concat(o,"px"),a.top=isNaN(i)?i:"".concat(i,"px"),t&&this.updateOffset()},n.prototype.updateSize=function(){this.updateDim()},n.prototype.updateDim=function(){var e=this,n=e.em,r=e.el,o=e.$el,i=e.model,a=e.classAnim,s=e.frame;if(s){s.rect=void 0,o.addClass(a);var l=this.__handleSize(),c=l.noChanges,u=l.width,p=l.height;((0,t.isNull)(u)||(0,t.isNull)(p))&&i.set(Yt(Yt({},u?{}:{width:r.offsetWidth}),p?{}:{height:r.offsetHeight}),{silent:1}),n.stopDefault({preserveSelected:1}),c?this.updateOffset():setTimeout(this.updateOffset,350)}},n.prototype.onScroll=function(){var t=this.frame;this.em.trigger("frame:scroll",{frame:t,body:t.getBody(),target:t.getW
1indow()})},n.prototype.frameLoaded=function(){this.frame.getWindow().onscroll=this.onScroll,this.updateDim()},n.prototype.__handleSize=function(){var e=this.model,n=this.el.style,r=e.attributes,o=r.width,i=r.height,a=n.width||"",s=n.height||"",l=o||"",c=i||"",u=a==l&&s==c;return n.width=(0,t.isNumber)(l)?"".concat(l).concat("px"):l,n.height=(0,t.isNumber)(c)?"".concat(c).concat("px"):c,{noChanges:u,width:o,height:i,newW:l,newH:c}},n.prototype.render=function(){var t=this,e=t.frame,n=t.$el,r=t.ppfx,o=t.cv,i=t.model,a=t.el,s=i.attributes.onRender;this.__clear(),this.__handleSize(),e.render(),n.empty().attr({class:"".concat(r,"frame-wrapper")}).append('\n <div class="'.concat(r,'frame-wrapper__top gjs-two-color" data-frame-top>\n <div class="').concat(r,'frame-wrapper__name" data-action-move>\n ').concat(i.get("name")||"",'\n </div>\n <div class="').concat(r,'frame-wrapper__top-r">\n <div class="').concat(r,'frame-wrapper__icon" data-action-remove style="display: none">\n <svg viewBox="0 0 24 24"><path d="M19 4h-3.5l-1-1h-5l-1 1H5v2h14M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12z"></path></svg>\n </div>\n </div>\n </div>\n <div class="').concat(r,'frame-wrapper__right" data-frame-right></div>\n <div class="').concat(r,'frame-wrapper__left" data-frame-left></div>\n <div class="').concat(r,'frame-wrapper__bottom" data-frame-bottom></div>\n ')).append(e.el);var l=(0,At.ut)("div",{class:"".concat(r,"tools"),style:"pointer-events:none; display: none"},'\n <div class="'.concat(r,'highlighter" data-hl></div>\n <div class="').concat(r,'badge" data-badge></div>\n <div class="').concat(r,'placeholder">\n <div class="').concat(r,'placeholder-int"></div>\n </div>\n <div class="').concat(r,'ghost"></div>\n <div class="').concat(r,'toolbar" style="pointer-events:all"></div>\n <div class="').concat(r,'resizer"></div>\n <div class="').concat(r,'offset-v" data-offset>\n <div class="gjs-marginName" data-offset-m>\n <div class="gjs-margin-v-el gjs-margin-v-top" data-offset-m-t></div>\n <div class="gjs-margin-v-el gjs-margin-v-bottom" data-offset-m-b></div>\n <div class="gjs-margin-v-el gjs-margin-v-left" data-offset-m-l></div>\n <div class="gjs-margin-v-el gjs-margin-v-right" data-offset-m-r></div>\n </div>\n <div class="gjs-paddingName" data-offset-m>\n <div class="gjs-padding-v-el gjs-padding-v-top" data-offset-p-t></div>\n <div class="gjs-padding-v-el gjs-padding-v-bottom" data-offset-p-b></div>\n <div class="gjs-padding-v-el gjs-padding-v-left" data-offset-p-l></div>\n <div class="gjs-padding-v-el gjs-padding-v-right" data-offset-p-r></div>\n </div>\n </div>\n <div class="').concat(r,'offset-fixed-v"></div>\n '));this.elTools=l;var c=null==o?void 0:o.toolsWrapper;return c&&c.appendChild(l),s&&s({el:a,elTop:a.querySelector("[data-frame-top]"),elRight:a.querySelector("[data-frame-right]"),elBottom:a.querySelector("[data-frame-bottom]"),elLeft:a.querySelector("[data-frame-left]"),frame:i,frameWrapperView:this,remove:this.remove,startDrag:this.startDrag}),this},n}(Ot);var Zt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Qt=function(t){function e(e,n){void 0===e&&(e={});var r=t.call(this,e,!0)||this;return r.listenTo(r.collection,"reset",r.render),r.canvasView=n.canvasView,r._module=n.module,r}return Zt(e,t),e.prototype.onRemoveBefore=function(t,e){void 0===e&&(e={}),t.forEach(function(t){return t.remove(e)})},e.prototype.onRender=function(){var t=this.$el,e=this.ppfx;t.attr({class:"".concat(e,"frames")})},e.prototype.renderView=function(t,e){return new Xt(t,this.canvasView)},e}(Pt);const Jt=Qt;var te=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ee=function(){return ee=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},ee.apply(this,arguments)},ne=function(n){function r(e){var r=n.call(this,{model:e})||this;r.ready=!1,(0,t.bindAll)(r,"clearOff","onKeyPress","onCanvasMove");var o=r,i=o.em,a=o.pfx;return r.className="".concat(a,"canvas").concat(i.config.customUI?"":" ".concat(a,"canvas-bg")),r._initFrames(),r.listenTo(i,"change:canvasOffset",r.clearOff),r.listenTo(i,"component:selected",r.checkSelected),r.listenTo(e,"change:zoom change:x change:y",r.updateFrames),r.listenTo(e,"change:frames",r._onFramesUpdate),r.toggleListeners(!0),r}return te(r,n),r.prototype.events=function(){return{wheel:"onWheel"}},r.prototype.template=function(){var t=this.pfx;return'\n <div class="'.concat(t,'canvas__frames" data-frames></div>\n <div id="').concat(t,'tools" class="').concat(t,'canvas__tools" data-tools></div>\n ')},r.prototype._onFramesUpdate=function(){this._initFrames(),this._renderFrames()},r.prototype._initFrames=function(){var t=this,e=t.frames,n=t.model,r=t.config,o=t.em,i=n.frames;o.set("readyCanvas",0),i.once("loaded:all",function(){return o.set("readyCanvas",1)}),null==e||e.remove(),this.frames=new Jt({collection:i},ee(ee({},r),{canvasView:this}))},r.prototype.checkSelected=function(t,e){var n;void 0===e&&(e={});var r=e.scroll,o=this.em.get("currentFrame");
1r&&(null===(n=t.views)||void 0===n||n.forEach(function(t){t._getFrame()===o&&t.scrollIntoView(r)}))},r.prototype.remove=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return null===(t=this.frames)||void 0===t||t.remove(),this.frames=void 0,Ot.prototype.remove.apply(this,e),this.toggleListeners(!1),this},r.prototype.preventDefault=function(t){var e;t&&(t.preventDefault(),null===(e=t._parentEvent)||void 0===e||e.preventDefault())},r.prototype.onCanvasMove=function(t){},r.prototype.toggleListeners=function(t){this.el;var n=t?e.on:e.off;n(document,"keypress",this.onKeyPress),n(window,"scroll resize",this.clearOff)},r.prototype.onKeyPress=function(t){var n=this.em;" "!==(0,e.getKeyChar)(t)||1===n.getZoomDecimal()||n.Canvas.isInputFocused()||(this.preventDefault(t),n.Editor.runCommand("core:canvas-move"))},r.prototype.onWheel=function(t){if((t.ctrlKey||t.metaKey)&&this.em.getConfig().multiFrames){this.preventDefault(t);var e=this.model,n=Math.max(-1,Math.min(1,t.wheelDelta||-t.detail)),r=e.get("zoom");e.set("zoom",r+2*n)}},r.prototype.updateFrames=function(t){var e=this.em,n=this.model.attributes,r=n.x,o=n.y,i=this.getZoom(),a={preserveSelected:1},s=i?1/i:1;this.framesArea.style.transform="scale(".concat(i,") translate(").concat(r*s,"px, ").concat(o*s,"px)"),this.clearOff(),e.stopDefault(a),e.trigger("canvas:update",t),this.timerZoom&&clearTimeout(this.timerZoom),this.timerZoom=setTimeout(function(){return e.runDefault(a)},300)},r.prototype.getZoom=function(){return this.em.getZoomDecimal()},r.prototype.isElInViewport=function(t){var n=(0,e.getElement)(t),r=(0,e.getElRect)(n),o=this.getFrameOffset(n),i=r.top,a=r.left;return i>=0&&a>=0&&i<=o.height&&a<=o.width},r.prototype.offset=function(t,n){void 0===n&&(n={});var r=n.noScroll,o=(0,e.getElRect)(t),i=r?{x:0,y:0}:(0,At.GX)(t);return{top:o.top+i.y,left:o.left+i.x,width:o.width,height:o.height}},r.prototype.clearOff=function(){this.frmOff=void 0,this.cvsOff=void 0},r.prototype.getFrameOffset=function(t){var e;if(!this.frmOff||t){var n=null===(e=this.frame)||void 0===e?void 0:e.el,r=null==t?void 0:t.ownerDocument.defaultView,o=r?r.frameElement:n;this.frmOff=this.offset(o||n)}return this.frmOff},r.prototype.getCanvasOffset=function(){return this.cvsOff||(this.cvsOff=this.offset(this.el)),this.cvsOff},r.prototype.getElementPos=function(t,e){void 0===e&&(e={});var n=this.getZoom(),r=this.getFrameOffset(t),o=this.el,i=this.getCanvasOffset(),a=this.offset(t,e),s=e.avoidFrameOffset?0:r.top,l=e.avoidFrameOffset?0:r.left,c=e.avoidFrameZoom?a.top:a.top*n,u=e.avoidFrameZoom?a.left:a.left*n;return{top:e.avoidFrameOffset?c:c+s-i.top+o.scrollTop,left:e.avoidFrameOffset?u:u+l-i.left+o.scrollLeft,height:e.avoidFrameZoom?a.height:a.height*n,width:e.avoidFrameZoom?a.width:a.width*n,zoom:n,rect:a}},r.prototype.getElementOffsets=function(t){var n=this;if(!t||(0,e.isTextNode)(t))return{};var r={},o=window.getComputedStyle(t);return["marginTop","marginRight","marginBottom","marginLeft","paddingTop","paddingRight","paddingBottom","paddingLeft"].forEach(function(t){r[t]=parseFloat(o[t])*n.getZoom()}),r},r.prototype.getPosition=function(t){var e;void 0===t&&(t={});var n=null===(e=this.frame)||void 0===e?void 0:e.el.contentDocument;if(!n)return{top:0,left:0,width:0,height:0};var r=n.body,o=this.getZoom(),i=this.getFrameOffset(),a=this.getCanvasOffset(),s=t.noScroll;return{top:i.top+(s?0:r.scrollTop)*o-a.top,left:i.left+(s?0:r.scrollLeft)*o-a.left,width:a.width,height:a.height}},r.prototype.updateScript=function(t){var e=t.model,n=e.getId();t.scriptContainer||(t.scriptContainer=(0,At.ut)("div",{"data-id":n}),this.getJsContainer().appendChild(t.scriptContainer)),t.el.id=n,t.scriptContainer.innerHTML="";var r=document.createElement("script"),o=e.getScriptString(),i=e.get("script-props")?o:"function(){\n".concat(o,"\n;}"),a=JSON.stringify(e.__getScriptProps());r.innerHTML="\n setTimeout(function() {\n var item = document.getElementById('".concat(n,"');\n if (!item) return;\n (").concat(i,".bind(item))(").concat(a,")\n }, 1);"),setTimeout(function(){var e=t.scriptContainer;null==e||e.appendChild(r)},0)},r.prototype.getJsContainer=function(t){var e=this.getFrameView(t);return e&&e.getJsContainer()},r.prototype.getFrameView=function(t){return(null==t?void 0:t._getFrame())||this.em.get("currentFrame")},r.prototype._renderFrames=function(){if(this.ready){var t=this,e=t.model,n=t.frames,r=t.em,o=t.framesArea,i=e.frames;i.listenToLoad(),n.render();var a=i.at(0),s=null==a?void 0:a.view;r.setCurrentFrame(s),null==o||o.appendChild(n.el),this.frame=s}},r.prototype.render=function(){var t=this,n=t.el,r=t.$el,o=t.ppfx,i=t.config,a=t.em;r.html(this.template());var s=r.find("[data-frames]");this.framesArea=s.get(0);var l=r.find("[data-tools]");return this.toolsWrapper=l.get(0),l.append('\n <div class="'.concat(o,"tools ").concat(o,'tools-gl" style="pointer-events:none">\n <div class="').concat(o,'placeholder">\n <div class="').concat(o,'placeholder-int"></div>\n </div>\n </div>\n <div id="').concat(o,'tools" style="pointer-events:none">\n ').concat(i.extHl?'<div class="'.concat(o,'highlighter-sel"></div>'):"",'\n <div class="').concat(o,'badge"></div>\n <div class="').concat(o,'ghost"></div>\n <div class="').concat(o,'toolbar" style="pointer-events:all"></div>\n <div class="').concat(o,'resizer"></div>\n <div class="').concat(o,'offset-v"></div>\n <div class="').concat(o,'offset-fixed-v"></div>\n </div>\n ')),this.toolsEl=n.querySelector("#".concat(o,"tools")),this.hlEl=n.querySelector(".".concat(o,"highlighter")),this.badgeEl=n.querySelector(".".concat(o,"badge")),this.placerEl=n.querySelector(".".concat(o,"placeholder")),this.ghostEl=n.querySelector(".".concat(o,"ghost")),this.toolbarEl=n.querySelector(".".concat(o,"toolbar")),this.resizerEl=n.querySelector(".".concat(o,"resizer")),this.offsetEl=n.querySelector(".".concat(o,"offset-v")),this.fixedOffsetEl=n.querySelector(".".concat(o,"offset-fixed-v")),this.toolsGlobEl=n.querySelector(".".concat(o,"tools-gl")),this.el.className=(0,e.getUiClass)(a,this.className),this.ready=!0,this._renderFrames(),this},r}(Ot);const re=ne;var oe=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ie=function(){return ie=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},ie.apply(this,arguments)},ae=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},se=function(n){function r(t){var e=n.call(this,t,"Canvas",_)||this;return e.canvas=new St(e),e.model=e.canvas,e.startAutoscroll=e.startAutoscroll.bind(e),e.stopAutoscroll=e.stopAutoscroll.bind(e),e}return oe(r,n),r.prototype.getCanvasView=function(){return this.canvasView},r.prototype.onLoad=function(){this.model.init()},r.prototype.getModel=function(){return this.canvas},r.prototype.getElement=function(){return this.getCanvasView().el},r.prototype.getFrame=function(t){return this.getFrames()[t||0]},r.prototype.getFrameEl=function(){var t=(this.canvasView||{}).frame;return null==t?void 0:t.el},r.prototype.getFramesEl=function(){var t;return null===(t=this.canvasView)||void 0===t?void 0:t.framesArea},r.prototype.getWindow=function(){var t=(this.canvasView||{}).frame;return null==t?void 0:t.getWindow()},r.prototype.getDocument=function(){var t=this.getFrameEl();return null==t?void 0:t.contentDocument},r.prototype.getBody=function(){var t=this.getDocument();return null==t?void 0:t.body},r.prototype._getLocalEl=function(t,e,n){var r=t,o=null==e?void 0:e._getFrame();return o?o[n]():r},r.prototype.getGlobalToolsEl=function(){var t;return null===(t=this.canvasView)||void 0===t?void 0:t.toolsGlobEl},r.prototype.getToolsEl=function(t){return this._getLocalEl(this.getCanvasView().toolsEl,t,"getToolsEl")},r.prototype.getHighlighter=function(t){return this._getLocalEl(this.getCanvasView().hlEl,t,"getHighlighter")},r.prototype.getBadgeEl=function(t){return this._getLocalEl(this.getCanvasView().badgeEl,t,"getBadgeEl")},r.prototype.getPlacerEl=function(){return this.getCanvasView().placerEl},r.prototype.getGhostEl=function(){return this.getCanvasView().ghostEl},r.prototype.getToolbarEl=function(){return this.getCanvasView().toolbarEl},r.prototype.getResizerEl=function(){return this.getCanvasView().resizerEl},r.prototype.getOffsetViewerEl=function(t){return this._getLocalEl(this.getCanvasView().offsetEl,t,"getOffsetViewerEl")},r.prototype.getFixedOffsetViewerEl=function(){return this.getCanvasView().fixedOffsetEl},r.prototype.render=function(){var t;return null===(t=this.canvasView)||void 0===t||t.remove(),this.canvasView=new re(this.canvas),this.canvasView.render().el},r.prototype.getOffset=function(){var t=this.offset(this.getFrameEl()),e=this.offset(this.getElement());
1return{top:t.top-e.top,left:t.left-e.left}},r.prototype.offset=function(t){return this.getCanvasView().offset(t)},r.prototype.setCustomBadgeLabel=function(t){this.config.customBadgeLabel=t},r.prototype.getElementPos=function(t,e){return this.getCanvasView().getElementPos(t,e)},r.prototype.getElementOffsets=function(t){return this.getCanvasView().getElementOffsets(t)},r.prototype.getRect=function(){var t,e=null!==(t=this.getCanvasView().getPosition())&&void 0!==t?t:{},n=e.top,r=void 0===n?0:n,o=e.left,i=void 0===o?0:o;return ie(ie({},this.getCanvasView().getCanvasOffset()),{topScroll:r,leftScroll:i})},r.prototype.getTargetToElementDim=function(t,e,n){void 0===n&&(n={});var r=n||{},o=this.getCanvasView().getPosition();if(o){var i=r.elPos||this.getCanvasView().getElementPos(e),a=n.toRight||0,s=r.targetHeight||t.offsetHeight,l=r.targetWidth||t.offsetWidth,c=r.event||null,u=i.top-s,p=i.left;p+=a?i.width:0;var d=(p=a?p-l:p)<o.left?o.left:p,f=u<o.top?o.top:u,h={top:f=f>i.top+i.height?i.top+i.height:f,left:d,elementTop:i.top,elementLeft:i.left,elementWidth:i.width,elementHeight:i.height,targetWidth:t.offsetWidth,targetHeight:t.offsetHeight,canvasTop:o.top,canvasLeft:o.left,canvasWidth:o.width,canvasHeight:o.height};return c&&this.em&&this.em.trigger(c,h),h}},r.prototype.canvasRectOffset=function(t,e,n){var r=this;void 0===n&&(n={});var o=function(t,e,o){void 0===e&&(e=1);var i=r.em.getZoomDecimal(),a=e?"top":"left",s=t.ownerDocument,l=n.offset?function(t){var e=t.defaultView;return null==e?void 0:e.frameElement}(s):{},c=l.offsetTop,u=void 0===c?0:c,p=l.offsetLeft,d=void 0===p?0:p,f=s.body||{},h=f.scrollTop,g=void 0===h?0:h,m=f.scrollLeft,v=e?g:void 0===m?0:m,y=e?u:d;return o[a]-(v-y)*i};return{top:o(t,1,e),left:o(t,0,e)}},r.prototype.getTargetToElementFixed=function(e,n,r){void 0===r&&(r={});var o=r.pos||this.getElementPos(e,{noScroll:!0}),i=r.canvasOff||this.canvasRectOffset(e,o),a=n.offsetHeight||0,s=n.offsetWidth||0,l=o.left+o.width,c=this.getCanvasView(),u=c.getPosition(),p=c.getFrameOffset(e),d=r.event,f=-a,h=(0,t.isUndefined)(r.left)?o.width-s:r.left;if(h=o.left<-h?-o.left:h,h=l>u.width?h-(l-u.width):h,i.top<a){var g=o.height+a;g<p.height?f+=g:f=-i.top<o.height?-i.top:o.height}var m={top:f,left:h,canvasOffsetTop:i.top,canvasOffsetLeft:i.left,elRect:o,canvasOffset:i,canvasRect:u,targetWidth:s,targetHeight:a};return d&&this.em.trigger(d,m),m},r.prototype.getMouseRelativePos=function(t,e){void 0===e&&(e={});var n=0,r=0,o=e.subWinOffset,i=t.target.ownerDocument,a=i.defaultView||i.parentWindow,s=a.frameElement,l=o?a.pageYOffset:0,c=o?a.pageXOffset:0;if(s){var u=s.getBoundingClientRect();n=u.top||0,r=u.left||0}return{y:t.clientY+n-l,x:t.clientX+r-c}},r.prototype.getMouseRelativeCanvas=function(t,e){var n,r=this.getZoomDecimal(),o=null!==(n=this.getCanvasView().getPosition(e))&&void 0!==n?n:{},i=o.top,a=void 0===i?0:i,s=o.left,l=void 0===s?0:s;return{y:t.clientY*r+a,x:t.clientX*r+l}},r.prototype.hasFocus=function(){return this.getDocument().hasFocus()},r.prototype.isInputFocused=function(){var t=this.getDocument(),e=this.getFrameEl(),n=ae(["body"],this.config.notTextable,!0),r=e&&document.activeElement===e?t&&t.activeElement:document.activeElement;return r&&!n.some(function(t){return r.matches(t)})},r.prototype.scrollTo=function(t,n){void 0===n&&(n={});var r=(0,e.getElement)(t),o=r&&(0,e.getViewEl)(r);o&&o.scrollIntoView(n)},r.prototype.startAutoscroll=function(t){var e=t&&t.view||this.em.getCurrentFrame();e&&e.startAutoscroll()},r.prototype.stopAutoscroll=function(t){var e=t&&t.view||this.em.getCurrentFrame();e&&e.stopAutoscroll()},r.prototype.setZoom=function(t){return this.canvas.set("zoom","string"==typeof t?parseFloat(t):t),this},r.prototype.getZoom=function(){return parseFloat(this.canvas.get("zoom"))},r.prototype.setCoords=function(t,e){return this.canvas.set({x:parseFloat(t),y:parseFloat(e)}),this},r.prototype.getCoords=function(){var t=this.canvas.attributes;return{x:t.x,y:t.y}},r.prototype.getZoomDecimal=function(){return this.getZoom()/100},r.prototype.getZoomMultiplier=function(){var t=this.getZoomDecimal();return t?1/t:1},r.prototype.toggleFramesEvents=function(t){this.getFramesEl().style.pointerEvents=t?"":"none"},r.prototype.getFrames=function(){return this.canvas.frames.map(function(t){return t})},r.prototype.addFrame=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),this.canvas.frames.add(new N(this,ie({},t)),e)},r.prototype.destroy=function(){var t,e=this;this.canvas.stopListening(),null===(t=this.canvasView)||void 0===t||t.remove(),["model","droppable"].forEach(function(t){return e[t]={}})},r}(y);const le=se,ce={stylePrefix:"comp-",components:[],draggableComponents:!0,disableTextInnerChilds:!1,processor:void 0,voidElements:["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"]};var ue="text/html",pe=ue,de=function(){return de=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},de.apply(this,arguments)},fe="parse:html";const he=function(e,n){return void 0===n&&(n={}),{compTypes:"",modelAttrStart:"data-gjs-",getPropAttribute:function(t,e){var n=t.replace(this.modelAttrStart,""),r=(null==e?void 0:e.length)||0,o=null==e?void 0:e.substring(0,1),i=null==e?void 0:e.substring(r-1),a="true"===e||"false"!==e&&e;
1try{a="{"==o&&"}"==i||"["==o&&"]"==i?JSON.parse(a):a}catch(t){}return{name:n,value:a}},splitPropsFromAttr:function(e){var n=this;void 0===e&&(e={});var r={},o={};return(0,t.each)(e,function(t,e){if(0===e.indexOf(n.modelAttrStart)){var i=n.getPropAttribute(e,t);r[i.name]=i.value}else o[e]=t}),{props:r,attrs:o}},parseStyle:function(t){for(var e={},n=t.split(";"),r=0,o=n.length;r<o;r++){var i=n[r].trim();if(i){var a=i.split(":");e[a[0].trim()]=a.slice(1).join(":").trim()}}return e},parseClass:function(t){for(var e=[],n=t.split(" "),r=0,o=n.length;r<o;r++){var i=n[r].trim();i&&e.push(i)}return e},parseNode:function(t,e){void 0===e&&(e={});for(var r=[],o=t.childNodes,i=0,a=o.length;i<a;i++){var s=o[i],l=s.attributes||[],c=l.length,u=r[r.length-1],p=s.childNodes.length,d=this.compTypes,f={};if(d){var h="",g=s.getAttribute&&s.getAttribute("".concat(this.modelAttrStart,"type"));if(g)f={type:g};else{for(var m=0;m<d.length;m++){var v=d[m];if(h=v.model.isComponent(s,e)){"object"!=typeof h&&(h={type:v.id});break}}f=h}}if(!f.tagName){var y=s.tagName||"",b=s.namespaceURI||"";f.tagName=y&&"http://www.w3.org/1999/xhtml"===b?y.toLowerCase():y}c&&(f.attributes={});for(var _=0;_<c;_++){var T=l[_].nodeName,C=l[_].nodeValue;if("style"==T)f.style=this.parseStyle(C);else if("class"==T)f.classes=this.parseClass(C);else{if("contenteditable"==T)continue;if(0===T.indexOf(this.modelAttrStart)){var w=this.getPropAttribute(T,C);f[w.name]=w.value}else""===C&&!0===s[T]&&(C=!0),f.attributes[T]=C}}if(p&&!f.components){var E=s.childNodes[0];1===p&&3===E.nodeType?(!f.type&&(f.type="text"),f.components={type:"textnode",content:E.nodeValue}):f.components=this.parseNode(s,de(de({},e),{inSvg:e.inSvg||"svg"===f.type}))}if("textnode"==f.type){if(u&&"textnode"==u.type){u.content+=f.content;continue}if(!e.keepEmptyTextNodes){var S=s.nodeValue;if(" "!=S&&!S.trim())continue}}p||"/>"!=="".concat(s.outerHTML).slice(-2)||(f.void=!0);var x=f.components;if(!f.type&&x){for(var O=1,A=0,k=0;k<x.length;k++){var P=x[k],N=P.type;if(["text","textnode"].indexOf(N)<0&&n.textTags.indexOf(P.tagName)<0){O=0;break}"textnode"==N&&(A=1)}O&&A&&(f.type="text")}(f.tagName||"textnode"==f.type)&&r.push(f)}return r},parse:function(r,o,i){var a;void 0===i&&(i={});var s=(null==e?void 0:e.get("Config"))||{},l={},c=de(de({},n),i),u=de(de(de({},n.optionsHtml),{htmlType:(null===(a=n.optionsHtml)||void 0===a?void 0:a.htmlType)||n.htmlType}),i),p=(0,t.isFunction)(c.parserHtml)?c.parserHtml(r,u):function(e,n){void 0===n&&(n={});
1var r,o=new DOMParser,i=n.htmlType||pe,a=i===ue,s=a?e:"<div>".concat(e,"</div>"),l=o.parseFromString(s,i);if(a){var c=l.head,u=l.body,p=c.querySelectorAll("script");(0,t.each)(p,function(t){return u.appendChild(t)});var d=[];(0,t.each)(c.children,function(t){return d.push(t)}),(0,t.each)(d,function(t,e){return u.insertBefore(t,u.children[e])}),r=u}else r=l.firstChild;return r}(r,u),d=p.querySelectorAll("script"),f=d.length;if(!((0,t.isUndefined)(s.allowScripts)?u.allowScripts:s.allowScripts))for(;f--;)d[f].parentNode.removeChild(d[f]);if(u.allowUnsafeAttr||this.__clearUnsafeAttr(p),o){for(var h=p.querySelectorAll("style"),g=h.length,m="";g--;)m=h[g].innerHTML+m,h[g].parentNode.removeChild(h[g]);m&&(l.css=o.parse(m))}e&&e.trigger("".concat(fe,":root"),{input:r,root:p});var v=this.parseNode(p,c),y=1!==v.length||c.returnArray?v:v[0];return l.html=y,e&&e.trigger(fe,{input:r,output:l}),l},__clearUnsafeAttr:function(e){var n=this,r=e.attributes||[],o=e.childNodes||[],i=[];(0,t.each)(r,function(t){var e=t.nodeName||"";0===e.indexOf("on")&&i.push(e)}),i.map(function(t){return e.removeAttribute(t)}),(0,t.each)(o,function(t){return n.__clearUnsafeAttr(t)})}}};var ge=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),me=function(){return me=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},me.apply(this,arguments)},ve=he();const ye=function(n){function r(){return null!==n&&n.apply(this,arguments)||this}return ge(r,n),r.prototype.parseStyle=function(t){return ve.parseStyle(t)},r.prototype.extendStyle=function(t){return me(me({},this.getStyle()),t)},r.prototype.getStyle=function(e){var n=this.get("style")||{},r=me({},n);return e&&(0,t.isString)(e)?r[e]:r},r.prototype.setStyle=function(n,r){var o=this;void 0===n&&(n={}),void 0===r&&(r={}),(0,t.isString)(n)&&(n=this.parseStyle(n));var i=this.getStyle(r),a=me({},n),s=me({},a);(0,t.keys)(s).forEach(function(t){""===s[t]&&delete s[t]}),this.set("style",s,r);var l=(0,e.shallowDiff)(i,a);return delete l.__p,(0,t.keys)(l).forEach(function(t){var e=o.em;r.noEvent||(o.trigger("change:style:".concat(t)),e&&(e.trigger("styleable:change",o,t,r),e.trigger("styleable:change:".concat(t),o,t,r)))}),a},r.prototype.addStyle=function(t,e,n){var r;void 0===e&&(e=""),void 0===n&&(n={}),"string"==typeof t?((r={})[t]=e,t=r):n=e||{},t=this.extendStyle(t),this.setStyle(t,n)},r.prototype.removeStyle=function(t){var e=this.getStyle();delete e[t],this.setStyle(e)},r.prototype.styleToString=function(e){void 0===e&&(e={});var n=[],r=this.getStyle(e);for(var o in r){var i=e.important,a=(0,t.isArray)(i)?i.indexOf(o)>=0:i,s="".concat(r[o]).concat(a?" !important":""),l="__"==o.substr(0,2);s&&!l&&n.push("".concat(o,":").concat(s,";"))}return n.join("")},r.prototype.getSelectors=function(){return this.get("selectors")||this.get("classes")},r.prototype.getSelectorsString=function(t){return this.selectorsToString?this.selectorsToString(t):this.getSelectors().getFullString()},r}(u.Hn);var be=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_e=function(){return _e=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},_e.apply(this,arguments)},Te=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n},Ce=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},we=function(e,n){return void 0===n&&(n=[]),e?(((0,t.isArray)(e)||(0,t.isFunction)(e.map)?e:[e]).map(function(t){n.push(t.getId()),we(t.components().models,n)}),n):[]},Ee=function(e,n,r){void 0===n&&(n={}),void 0===r&&(r={}),r.visitedCmps=r.visitedCmps||{};var o=r.visitedCmps;return((0,t.isArray)(e)?e:[e]).map(function(e){var i=e.attributes,a=void 0===i?{}:i,s=e.components,l=e.tagName,c=a.id,u=(a.draggable,Te(a,["id","draggable"])),p=e;if(c&&(o[c]?(o[c].push(p),c=Je.getNewId(n),p.attributes.id=c):(o[c]=[],n[c]&&(p=n[c],l&&p.set({tagName:l},_e(_e({},r),{silent:!0})),(0,t.keys)(u).length&&p.addAttributes(u,_e({},r))))),s){var d=Ee(s,n);if((0,t.isFunction)(p.components)){var f=p.components();f.length>0&&f.reset(d,r)}else p.components=d}return p})},Se=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return be(n,e),n.prototype.initialize=function(t,e){void 0===e&&(e={}),this.opt=e,this.listenTo(this,"add",this.onAdd),this.listenTo(this,"remove",this.removeChildren),this.listenTo(this,"reset",this.resetChildren);var n=e.em,r=e.config;this.config=r,this.em=n,this.domc=e.domc||(null==n?void 0:n.Components)},n.prototype.resetChildren=function(t,e){var n=this;void 0===e&&(e={});var r=this,o=e.previousModels||[],i=o.filter(function(e){return!t.get(e.cid)}),a=we(t),s=we(o).filter(function(t){return a.indexOf(t)>=0});
1e.keepIds=(e.keepIds||[]).concat(s),i.forEach(function(t){return n.removeChildren(t,r,e)}),t.each(function(t){return n.onAdd(t)})},n.prototype.resetFromString=function(t,e){var n,r;void 0===t&&(t=""),void 0===e&&(e={}),e.keepIds=we(this);var o=this,i=o.domc,a=o.em,s=o.parent,l=null==a?void 0:a.Css,c=(null==i?void 0:i.allById())||{},u=this.parseString(t,e),p=Ee(u,c,e),d=e.visitedCmps,f=void 0===d?{}:d;Object.keys(f).forEach(function(t){var e=f[t];if(e.length){var n=(null==l?void 0:l.getRules("#".concat(t)))||[];n.length&&e.forEach(function(t){n.forEach(function(e){var n=e.clone();n.set("selectors",["#".concat(t.attributes.id)]),l.getAll().add(n)})})}}),this.reset(p,e),null==a||a.trigger("component:content",s,e,t),null===(r=(n=s).__checkInnerChilds)||void 0===r||r.call(n)},n.prototype.removeChildren=function(t,e,n){var r=this;if(void 0===n&&(n={}),t){var o=this.domc,i=this.em,a=n.temporary||n.fromUndo;if(t.prevColl=this,!a){var s=t.getId(),l=i.Selectors.getAll(),c=i.Css.getAll(),u=(n.keepIds||[]).indexOf(s)<0;delete(o?o.allById():{})[s];var p=u?c.remove(c.filter(function(t){return t.getSelectors().getFullString()==="#".concat(s)}),n):[];l.remove(p.map(function(t){return t.getSelectors().at(0)})),t.opt.temporary||(i.Commands.run("core:component-style-clear",{target:t}),t.removed(),t.trigger("removed"),i.trigger("component:remove",t)),t.components().forEach(function(t){return r.removeChildren(t,e,n)})}var d=t.components();i.stopListening(d),i.stopListening(t),i.stopListening(t.get("classes")),t.__postRemove()}},n.prototype.model=function(t,e){var n,r=e.collection.opt,o=r.em,i=o.Components.componentTypes;e.em=o,e.config=r.config,e.componentTypes=i,e.domc=r.domc;for(var a=0;a<i.length;a++)if(i[a].id==t.type){n=i[a].model;break}return n||(n=i[i.length-1].model,o&&t.type&&o.logWarning("Component type '".concat(t.type,"' not found"),{attrs:t,options:e})),new n(t,e)},n.prototype.parseString=function(t,e){void 0===e&&(e={});var n=this.em,r=this.domc,o=n.Css,i=n.Parser.parseHtml(t);if(Je.checkId(i.html,i.css,r.componentsById,e),i.css&&o&&!e.temporary){e.at;var a=Te(e,["at"]);o.addCollection(i.css,_e(_e({},a),{extend:1}))}return i.html},n.prototype.add=function(e,n){var r=this;void 0===n&&(n={}),n.keepIds=Ce(Ce([],n.keepIds||[],!0),we(n.previousModels),!0),(0,t.isString)(e)?e=this.parseString(e,n):(0,t.isArray)(e)&&(e=Ce([],e,!0)).forEach(function(o,i){if((0,t.isString)(o)){var a=r.parseString(o,n);e[i]=(0,t.isArray)(a)&&!a.length?null:a}});var o=(0,t.isArray)(e);e=(o?e:[e]).filter(Boolean).map(function(t){return r.processDef(t)}),e=o?(0,t.flatten)(e,1):e[0];var i=u.FE.prototype.add.apply(this,[e,n]);return this.__firstAdd=i,i},n.prototype.processDef=function(e){if(e.cid&&e.ccid)return e;var n=this.em,r=this.config,o=(void 0===r?{}:r).processor,i=e;if(o){var a=o(i=_e({},i));a&&((0,t.each)(i,function(t,e){return delete i[e]}),(0,t.extend)(i,a))}if(i.$$typeof&&"object"==typeof i.props){(i=_e({},i)).props=_e({},i.props);var s=n.Components,l=n.Parser.parserHtml;(0,t.each)(i,function(e,n){(0,t.includes)(["props","type"],n)||delete i[n]});var c=i.props,u=c.children;delete c.children,delete i.props;var p=l.splitPropsFromAttr(c);i.attributes=p.attrs,u&&(i.components=u),i.type?s.getType(i.type)||(i.tagName=i.type,delete i.type):i.type="textnode",(0,t.extend)(i,p.props)}return i},n.prototype.onAdd=function(e,n,r){void 0===r&&(r={});var o=this.domc,i=this.em,a=e.getStyle(),s=i&&i.getConfig().avoidInlineStyle;if(o&&o.Component.ensureInList(e),!(0,t.isEmpty)(a)&&!s&&i&&i.get&&i.getConfig().forceClass&&!r.temporary){var l=e.cid;i.Css.setClassRule(l,a),e.setStyle({}),e.addClass(l)}e.__postAdd({recursive:!0})},n}(u.FE);const xe=Se;var Oe=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ae=function(e){function n(t,r){void 0===r&&(r={});var o=e.call(this,t,r)||this,i=r.config,a=void 0===i?{}:i,s=o.get("name"),l=o.get("label");s?l||o.set("label",s):o.set("name",l);var c=o.get("name"),u=a.escapeName,p=u?u(c):n.escapeName(c);return o.set("name",p),o.em=r.em,o}return Oe(n,e),n.prototype.defaults=function(){return{name:"",label:"",type:1,active:!0,private:!1,protected:!1,_und
1o:!0}},n.prototype.isId=function(){return 2===this.get("type")},n.prototype.isClass=function(){return 1===this.get("type")},n.prototype.getFullName=function(t){void 0===t&&(t={});var e=t.escape,n=this.get("name"),r="";switch(this.get("type")){case 1:r=".";break;case 2:r="#"}return r+(e?e(n):n)},n.prototype.toString=function(){return this.getFullName()},n.prototype.getLabel=function(){return this.get("label")},n.prototype.setLabel=function(t){return this.set("label",t)},n.prototype.getActive=function(){return this.get("active")},n.prototype.setActive=function(t){return this.set("active",t)},n.prototype.toJSON=function(e){void 0===e&&(e={});var n=this.em,r=u.Hn.prototype.toJSON.call(this,[e]),o=(0,t.result)(this,"defaults");if(n&&n.getConfig().avoidDefaults){(0,t.forEach)(o,function(t,e){r[e]===t&&delete r[e]}),r.label===r.name&&delete r.label;var i=(0,t.keys)(r).length;1===i&&r.name&&(r=r.name),2===i&&r.name&&r.type&&(r=this.getFullName())}return r},n.escapeName=function(t){return"".concat(t).trim().replace(/([^a-z0-9\w-\:@]+)/gi,"-")},n.TYPE_CLASS=1,n.TYPE_ID=2,n}(u.Hn);const ke=Ae;Ae.prototype.idAttribute="name";var Pe=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ne=function(t,e){return t.reduce(function(n,r,o){return n.concat(Ne(t.slice(o+1),"".concat(e).concat(r)))},[e])},Me=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return Pe(n,e),n.prototype.modelId=function(t){return"".concat(t.name,"_").concat(t.type||ke.TYPE_CLASS)},n.prototype.getStyleable=function(){return(0,t.filter)(this.models,function(t){return t.get("active")&&!t.get("private")})},n.prototype.getValid=function(e){var n=(void 0===e?{}:e).noDisabled;return(0,t.filter)(this.models,function(t){return!t.get("private")}).filter(function(t){return n?t.get("active"):1})},n.prototype.getFullString=function(t,e){void 0===e&&(e={});var n=[];return(t||this).forEach(function(t){return n.push(t.getFullName(e))}),e.sort&&n.sort(),n.join("").trim()},n.prototype.getFullName=function(t){void 0===t&&(t={});var e=t.combination,n=t.array,r=[],o=this.map(function(e){return e.getFullName(t)}).sort();return e?o.forEach(function(t,e){r=r.concat(Ne(o.slice(e+1),t))}):r=o,n?r:e?r.join(","):r.join("")},n}(u.FE);const Le=Me;Me.prototype.model=ke;var Ie=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),De=function(){return De=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},De.apply(this,arguments)};const Re=function(n){function r(t,e){var r=n.call(this,t)||this,o=r.attributes,i=o.target,a=o.name;return!r.get("id")&&r.set("id",a),i&&r.setTarget(i),r.em=e,r}return Ie(r,n),r.prototype.defaults=function(){return{type:"text",label:"",name:"",unit:"",step:1,value:"",default:"",placeholder:"",changeProp:!1,options:[]}},r.prototype.setTarget=function(e){if(e){var n=this.attributes,r=n.name,o=n.changeProp,i=n.value;this.target=e,this.unset("target");var a=o?"change:".concat(r):"change:attributes:".concat(r);this.listenTo(e,a,this.targetUpdated);var s=i||this.getValue();!(0,t.isUndefined)(s)&&this.set({value:s},{silent:!0})}},r.prototype.getId=function(){return this.get("id")},r.prototype.getType=function(){return this.get("type")},r.prototype.getName=function(){return this.get("name")},r.prototype.getLabel=function(t){var e;void 0===t&&(t={});var n=t.locale,r=void 0===n||n,o=this.getId(),i=this.get("label")||this.getName();return r&&(null===(e=this.em)||void 0===e?void 0:e.t("traitManager.traits.labels.".concat(o)))||i},r.prototype.getValue=function(){return this.getTargetValue()},r.prototype.setValue=function(t,e){var n;void 0===e&&(e={});var r={},o=this.get("setValue");o?o({value:t,editor:null===(n=this.em)||void 0===n?void 0:n.getEditor(),trait:this,component:this.target,partial:!!e.partial}):(e.partial&&(r.avoidStore=!0),this.setTargetValue(t,r),!1===e.partial&&(this.setTargetValue(""),this.setTargetValue(t)))},r.prototype.getDefault=function(){return this.get("default")},r.prototype.getOptions=function(){return this.get("options")||[]},r.prototype.getOption=function(t){var n=this,r=(0,e.isDef)(t)?t:this.getValue();return this.getOptions().filter(function(t){return n.getOptionId(t)===r})[0]},r.prototype.getOptionId=function(t){return t.id||t.value},r.prototype.getOptionLabel=function(e,n){var r;void 0===n&&(n={});var o=n.locale,i=void 0===o||o,a=(0,t.isString)(e)?this.getOption(e):e,s=this.getOptionId(a),l=a.label||a.name||s,c=this.getName();return i&&(null===(r=this.em)||void 0===r?void 0:r.t("traitManager.traits.options.".concat(c,".").concat(s)))||l},r.prototype.props=function(){return this.attributes},r.prototype.targetUpdated=function(){var t,e=this.getTargetValue();this.set({value:e},{fromTarget:1}),null===(t=this.em)||void 0===t||t.trigger("trait:update",{trait:this,component:this.target})},r.prototype.getTargetValue=function(){var e,n,r=this.getName(),o=this.target,i=this.get("getValue");return n=i?i({editor:null===(e=this.em)||void 0===e?void 0:e.getEditor(),trait:this,component:o}):this.get("changeProp")?o.get(r):o.getAttributes()[r],(0,t.isUndefined)(n)?"":n},r.prototype.setTargetValue=function(e,n){var r;void 0===n&&(n={});var o=this.target,i=this.attributes,a=this.getName();if(!(0,t.isUndefined)(e)){var s=e;if("false"===e?s=!1:"true"===e&&(s=!0),"checkbox"===this.getType()){var l=i.valueTrue,c=i.valueFalse;s&&!(0,t.isUndefined)(l)&&(s=l),s||(0,t.isUndefined)(c)||(s=c)}this.get("changeProp")?o.set(a,s,n):o.addAttributes(((r={})[a]=s,r),n)}},r.prototype.setValueFromInput=function(t,e,n){void 0===e&&(e=!0),void 0===n&&(n={});var r={value:t};this.set(r,De(De({},n),{avoidStore:1}
1)),e&&(this.set("value","",n),this.set(r,n))},r.prototype.getInitValue=function(){var t,e=this.target,n=this.getName();if(e){var r=e.get("attributes");t=this.get("changeProp")?e.get(n):r[n]}return t||this.get("value")||this.get("default")},r}(u.Hn);var je=function(){function e(t){void 0===t&&(t={}),this.config=t}return e.prototype.build=function(e,n){return(0,t.isString)(e)?this.buildFromString(e,n):new Re(e,n)},e.prototype.buildFromString=function(t,e){var n={name:t,type:"text"};return"target"===t&&(n.type="select",n.default=!1,n.options=this.config.optionsTarget),new Re(n,e)},e}();const He=je;var Fe=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const Be=function(e){function n(t,n){var r,o=this;(o=e.call(this,t)||this).em=n.em,o.listenTo(o,"add",o.handleAdd),o.listenTo(o,"reset",o.handleReset);var i=null===(r=o.em)||void 0===r?void 0:r.Traits,a=null==i?void 0:i.getConfig();return o.tf=new He(a),o}return Fe(n,e),n.prototype.handleReset=function(t,e){var n=(void 0===e?{}:e).previousModels;(void 0===n?[]:n).forEach(function(t){return t.trigger("remove")})},n.prototype.handleAdd=function(t){t.em=this.em;var e=this.target;e&&(t.target=e)},n.prototype.setTarget=function(t){this.target=t,this.models.forEach(function(e){return e.setTarget(t)})},n.prototype.add=function(n,r){if(null!=n){var o=this.target,i=this.em;if((0,t.isArray)(n)){for(var a=[],s=0,l=n.length;s<l;s++){var c=n[s];a[s]=c instanceof Re?c:this.tf.build(c,i),a[s].setTarget(o)}return e.prototype.add.call(this,a,r)}var u=n instanceof Re?n:this.tf.build(n,i);return u.setTarget(o),e.prototype.add.call(this,u,r)}},n}(u.FE);var Ve=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ue=function(){return Ue=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Ue.apply(this,arguments)},ze=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},Ge=function(t){return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")},$e=function(t){return!!(null==t?void 0:t.getConfig().avoidInlineStyle)},qe="component:drag",We="__symbols",Ke="__symbol",Ye="__symbol_ovrd",Xe="component:update",Ze="".concat(Xe,"-inside"),Qe=function(n){function r(){return null!==n&&n.apply(this,arguments)||this}return Ve(r,n),Object.defineProperty(r.prototype,"defaults",{get:function(){var t;return(t={tagName:"div",type:"",name:"",removable:!0,draggable:!0,droppable:!0,badgable:!0,stylable:!0,"stylable-require":"","style-signature":"",unstylable:"",highlightable:!0,copyable:!0,resizable:!1,editable:!1,layerable:!0,selectable:!0,hoverable:!0,locked:!1,void:!1,state:"",status:"",content:"",icon:"",style:"",styles:"",classes:"",script:"","script-props":"","script-export":"",attributes:{},traits:["id","title"],propagate:"",dmode:"",toolbar:null})[Ke]=0,t[We]=0,t[Ye]=0,t._undo=!0,t._undoexc=["status","open"],t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"classes",{get:function(){return this.get("classes")},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"traits",{get:function(){return this.get("traits")}
1,enumerable:!1,configurable:!0}),r.prototype.init=function(){},r.prototype.updated=function(t,e,n){},r.prototype.removed=function(){},r.prototype.initialize=function(e,n){var o=this;void 0===e&&(e={}),void 0===n&&(n={}),(0,t.bindAll)(this,"__upSymbProps","__upSymbCls","__upSymbComps");var i=n.em,a=this.parent(),s=null==a?void 0:a.attributes,l=this.get("propagate");if(l&&this.set("propagate",(0,t.isArray)(l)?l:[l]),s&&s.propagate&&!l){var c={},u=s.propagate;u.forEach(function(t){return c[t]=a.get(t)}),c.propagate=u,this.set(Ue(Ue({},c),e))}if(n&&n.config&&n.config.voidElements.indexOf(this.get("tagName"))>=0&&this.set("void",!0),n.em=i,this.opt=n,this.em=i,this.frame=n.frame,this.config=n.config||{},this.set("attributes",Ue(Ue({},(0,t.result)(this,"defaults").attributes||{}),this.get("attributes")||{})),this.ccid=r.createId(this,n),this.initClasses(),this.initComponents(),this.initTraits(),this.initToolbar(),this.initScriptProps(),this.listenTo(this,"change:script",this.scriptUpdated),this.listenTo(this,"change:tagName",this.tagUpdated),this.listenTo(this,"change:attributes",this.attrUpdated),this.listenTo(this,"change:attributes:id",this._idUpdated),this.on("change:toolbar",this.__emitUpdateTlb),this.on("change",this.__onChange),this.on(Ze,this.__propToParent),this.set("status",""),this.views=[],["classes","traits","components"].forEach(function(t){var e="add remove ".concat("components"!==t?"change":"");o.listenTo(o.get(t),e.trim(),function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return o.emitUpdate.apply(o,ze([t],e,!1))})}),!n.temporary){var p=i&&i.Css,d=this.attributes,f=d.styles,h=d.type;f&&p&&p.addCollection(f,{avoidUpdateStyle:!0},{group:"cmp:".concat(h)}),this.__postAdd(),this.init(),this.__isSymbolOrInst()&&this.__initSymb(),i&&i.trigger("component:create",this)}},r.prototype.__postAdd=function(t){void 0===t&&(t={});var e=this.em,n=null==e?void 0:e.UndoManager,r=this.components();n&&!this.__hasUm&&(n.add(r),n.add(this.getSelectors()),this.__hasUm=!0),t.recursive&&r.map(function(e){return e.__postAdd(t)})},r.prototype.__postRemove=function(){var t=this.em,e=null==t?void 0:t.get("UndoManager");e&&(e.remove(this.components()),e.remove(this.getSelectors()),delete this.__hasUm)},r.prototype.__onChange=function(n,r){var o=this,i=this.changedAttributes()||{};(0,t.keys)(i).forEach(function(t){return o.emitUpdate(t)}),["status","open","toolbar","traits"].forEach(function(t){return delete i[t]}),(0,e.isEmptyObj)(i)||(this.__changesUp(r),this.__propSelfToParent({component:this,changed:i,options:r}))},r.prototype.__changesUp=function(t){var e=this.em;[this.frame,e].forEach(function(e){return e&&e.changesUp(t)})},r.prototype.__propSelfToParent=function(t){this.trigger(Xe,t),this.__propToParent(t)},r.prototype.__propToParent=function(t){var e=this.parent();e&&e.trigger(Ze,t)},r.prototype.__emitUpdateTlb=function(){this.emitUpdate("toolbar")},r.prototype.is=function(t){return!(this.get("type")!=t)},r.prototype.props=function(){return this.attributes},r.prototype.index=function(){var t=this.collection;return t?t.indexOf(this):0},r.prototype.setDragMode=function(t){return this.set("dmode",t)},r.prototype.getDragMode=function(){return this.get("dmode")||""},r.prototype.find=function(t){var e,n=[],r=null===(e=this.view)||void 0===e?void 0:e.$el.find(t);return null==r||r.each(function(t){var e=r.eq(t).data("model");e&&n.push(e)}),n},r.prototype.findType=function(t){var e=[],n=function(r){return r.forEach(function(r){r.is(t)&&e.push(r),n(r.components())})};return n(this.components()),e},r.prototype.closest=function(t){var e,n=null===(e=this.view)||void 0===e?void 0:e.$el.closest(t);return(null==n?void 0:n.length)?n.data("model"):void 0},r.prototype.closestType=function(t){for(var e=this.parent();e&&!e.is(t);)e=e.parent();return e},r.prototype.contains=function(t){var e=!1;if(!t)return e;var n=function(r){!e&&r.forEach(function(r){r===t&&(e=!0),!e&&n(r.components())})};return n(this.components()),e},r.prototype.tagUpdated=function(){this.trigger("rerender")},r.prototype.replaceWith=function(t){var e=this.collection,n=e.indexOf(this);return e.remove(this),e.add(t,{at:n})},r.prototype.attrUpdated=function(n,r,o){var i=this;void 0===o&&(o={});var a=this.get("attributes"),s=a.class;s&&this.setClass(s),delete a.class;var l=a.style;l&&this.setStyle(l),delete a.style;var c=Ue({},this.previous("attributes")),u=(0,e.shallowDiff)(c,this.get("attributes"));(0,t.keys)(u).forEach(function(t){return i.trigger("change:attributes:".concat(t),i,u[t],o)})},r.prototype.setAttributes=function(t,e){return void 0===e&&(e={}),this.set("attributes",Ue({},t),e),this},r.prototype.addAttributes=function(t,e){return void 0===e&&(e={}),this.setAttributes(Ue(Ue({},this.getAttributes({noClass:!0})),t),e)},r.prototype.removeAttributes=function(t,e){void 0===t&&(t=[]),void 0===e&&(e={});var n=Array.isArray(t)?t:[t],r=this.getAttributes();return n.map(function(t){return delete r[t]}),this.setAttributes(r,e)},r.prototype.getStyle=function(e,r){void 0===e&&(e={}),void 0===r&&(r={});var o=this.em,i=(0,t.isString)(e)?e:"",a=i?r:e;if($e(o)&&!a.inline){var s=o.get("state"),l=o.Css.getIdRule(this.getId(),Ue({state:s},a));if(this.rule=l,l)return l.getStyle(i)}return n.prototype.getStyle.call(this,i)},r.prototype.setStyle=function(r,o){var i=this;void 0===r&&(r={}),void 0===o&&(o={});var a=this.opt,s=this.em;if(!$e(s)||a.temporary||o.inline)r=n.prototype.setStyle.apply(this,arguments);else{var l=this.get("style")||{};r=(0,t.isString)(r)?this.parseStyle(r):r,r=Ue(Ue({},r),l);var c=s.get("state"),u=s.Css,p=this.getStyle(o);this.rule=u.setIdRule(this.getId(),r,Ue(Ue({},o),{state:c}));var d=(0,e.shallowDiff)(p,r);this.set("style","",{silent:!0}
1),(0,t.keys)(d).forEach(function(t){return i.trigger("change:style:".concat(t))})}return r},r.prototype.getAttributes=function(n){void 0===n&&(n={});var r=this.em,o=[],i=Ue({},this.get("attributes")),a=null==r?void 0:r.Selectors,s=this.getId();if(n.noClass?delete i.class:(this.classes.forEach(function(e){return o.push((0,t.isString)(e)?e:e.get("name"))}),o.length&&(i.class=o.join(" "))),!n.noStyle){var l=this.get("style");(0,e.isObject)(l)&&!(0,e.isEmptyObj)(l)&&(i.style=this.styleToString({inline:1}))}if(!(0,t.has)(i,"id")){var c=!1;!$e(r)&&(0,t.isEmpty)(this.getStyle())||(c=!!(null==a?void 0:a.get(s,a.Selector.TYPE_ID))),(this.__getSymbol()||this.__getSymbols())&&(c=!0),c&&(i.id=s)}return i},r.prototype.addClass=function(t){var e=this.em.Selectors.addClass(t);return this.classes.add(e)},r.prototype.setClass=function(t){return this.classes.reset(),this.addClass(t)},r.prototype.removeClass=function(e){var n=[];e=(0,t.isArray)(e)?e:[e];var r=this.classes,o=ke.TYPE_CLASS;return e.forEach(function(t){t.split(" ").forEach(function(t){var e=r.where({name:t,type:o})[0];e&&n.push(r.remove(e))})}),n},r.prototype.getClasses=function(){var t=this.getAttributes().class;return t?t.split(" "):[]},r.prototype.__logSymbol=function(t,e,n){void 0===n&&(n={});var r=this.__getSymbol(),o=this.__getSymbols();(r||o)&&this.em.log(t,{model:this,toUp:e,context:"symbols",opts:n})},r.prototype.__initSymb=function(){this.__symbReady||(this.on("change",this.__upSymbProps),this.__symbReady=!0)}
1,r.prototype.__isSymbol=function(){return(0,t.isArray)(this.get(We))},r.prototype.__isSymbolOrInst=function(){return!(!this.__isSymbol()&&!this.get(Ke))},r.prototype.__isSymbolTop=function(){var t=this.parent();return this.__isSymbolOrInst()&&(!t||t&&!t.__isSymbol()&&!t.__getSymbol())},r.prototype.__isSymbolNested=function(){if(!this.__isSymbolOrInst()||this.__isSymbolTop())return!1;var t=(this.__isSymbol()?this:this.__getSymbol()).__getSymbTop(),e=this.__getSymbTop();return(e.__isSymbol()?e:e.__getSymbol())!==t},r.prototype.__getAllById=function(){var t=this.em;return t?t.Components.allById():{}},r.prototype.__getSymbol=function(){var e=this.get(Ke);if(e&&(0,t.isString)(e)){var n=this.__getAllById()[e];n?(e=n,this.set(Ke,n)):e=0}return e},r.prototype.__getSymbols=function(){var e=this,n=this.get(We);return n&&(0,t.isArray)(n)&&(n.forEach(function(r,o){r&&(0,t.isString)(r)&&(n[o]=e.__getAllById()[r])}),n=n.filter(function(e){return e&&!(0,t.isString)(e)})),n},r.prototype.__isSymbOvrd=function(e){void 0===e&&(e="");var n=this.get(Ye),r=e.split(":")[0],o=e!==r?[e,r]:[e];return!0===n||(0,t.isArray)(n)&&o.some(function(t){return n.indexOf(t)>=0})},r.prototype.__getSymbToUp=function(t){var e=this;void 0===t&&(t={});var n=[],r=t.changed;if(t.fromInstance||t.noPropagate||t.fromUndo||r&&this.__isSymbOvrd(r))return n;var o=this.__getSymbols()||[],i=this.__getSymbol();return(i?ze([i],i.__getSymbols()||[],!0):o).filter(function(t){return t!==e}).filter(function(t){return!(r&&t.__isSymbOvrd(r))})},r.prototype.__getSymbTop=function(t){for(var e=this,n=this.parent(t);n&&(n.__isSymbol()||n.__getSymbol());)e=n,n=n.parent(t);return e},r.prototype.__upSymbProps=function(n,r){var o=this;void 0===r&&(r={});var i=this.changedAttributes()||{},a=i.attributes||{};if(delete i.status,delete i.open,delete i[We],delete i[Ke],delete i[Ye],delete i.attributes,delete a.id,(0,e.isEmptyObj)(a)||(i.attributes=a),!(0,e.isEmptyObj)(i)){var s=this.__getSymbToUp(r);(0,t.keys)(i).map(function(t){o.__isSymbOvrd(t)&&delete i[t]}),this.__logSymbol("props",s,{opts:r,changed:i}),s.forEach(function(e){var n=Ue({},i);(0,t.keys)(n).map(function(t){e.__isSymbOvrd(t)&&delete n[t]}),e.set(n,Ue({fromInstance:o},r))})}},r.prototype.__upSymbCls=function(t,e,n){var r=this;void 0===n&&(n={});var o=this.__getSymbToUp(n);this.__logSymbol("classes",o,{opts:n}),o.forEach(function(t){t.set("classes",r.get("classes"),{fromInstance:r})}),this.__changesUp(n)},r.prototype.__upSymbComps=function(t,e,n){var r=this,o=n||e||{},i={fromInstance:o.fromInstance,fromUndo:o.fromUndo},a=t.opt.temporary;if(n)if(n.add){var s=[],l=!!this.__getSymbols();if((v=this.__getSymbToUp(Ue(Ue({},i),{changed:"components:add"}))).length){var c=t.__getSymbol();s=(c?c.__getSymbols():t.__getSymbols())||[],(s=ze([],s,!0)).push(c||t)}!a&&this.__logSymbol("add",v,{opts:n,addedInstances:s.map(function(t){return t.cid}),added:t.cid}),v.forEach(function(e){var o=e.__getSymbTop(),i=s.filter(function(t){var e=t.__getSymbTop({prev:1});return o&&e&&e===o})[0]||t.clone({symbol:!0,symbolInv:l});e.append(i,Ue({fromInstance:r},n))})}else{var u=t.__getSymbol();if(u&&!n.temporary&&u.set(We,u.__getSymbols().filter(function(e){return e!==t})),!t.__isSymbolTop()){var p="components:remove",d=n.index,f=t.parent(),h=Ue({fromInstance:t},n),g=t.__isSymbolNested(),m=function(t){var e=t.parent();e&&!e.__isSymbOvrd(p)&&t.remove(h)};v=(null==f?void 0:f.__isSymbOvrd(p))?[]:t.__getSymbToUp(i),g&&(v=null==f?void 0:f.__getSymbToUp(Ue(Ue({},i),{changed:p})),m=function(t){var e=t.components().at(d);e&&e.remove(Ue({fromInstance:f},h))}),!a&&this.__logSymbol("remove",v,{opts:n,removed:t.cid,isSymbNested:g}),v.forEach(m)}}else{var v=this.__getSymbToUp(Ue(Ue({},i),{changed:"components:reset"})),y=t.models;this.__logSymbol("reset",v,{components:y}),v.forEach(function(t){var n=y.map(function(t){return t.clone({symbol:!0})});t.components().reset(n,Ue({fromInstance:r},e))})}this.__changesUp(o)},r.prototype.initClasses=function(e,n,r){void 0===r&&(r={});var o=this.get("attributes").class||[],i=[this,"change:classes",this.initClasses],a=this.get("classes")||o,s=(0,t.isString)(a)?a.split(" "):a;this.stopListening.apply(this,i);var l=this.normalizeClasses(s),c=new Le([]);return this.set("classes",c,r),c.add(l),c.on("add remove reset",this.__upSymbCls),this.listenTo.apply(this,i),this},r.prototype.initComponents=function(){var e=[this,"change:components",this.initComponents];this.stopListening.apply(this,e);var n=new xe([],this.opt);n.parent=this;var r=this.get("components"),o=!this.opt.avoidChildren;return this.set("components",n),o&&r&&n.add((0,t.isFunction)(r)?r(this):r,this.opt),n.on("add remove reset",this.__upSymbComps),this.listenTo.apply(this,e),this},r.prototype.initTraits=function(t){var e=this.em,n="change:traits";this.off(n,this.initTraits),this.__loadTraits();var r=Ue({},this.get("attributes")),o=this.traits;return o.each(function(t){if(!t.get("changeProp")){var e=t.get("name"),n=t.getInitValue();e&&n&&(r[e]=n)}}),o.length&&this.set("attributes",r),this.on(n,this.initTraits),t&&e&&e.trigger("component:toggled"),this},r.prototype.initScriptProps=function(){if(!this.opt.temporary){var t="script-props",e=["change:".concat(t),this.initScriptProps];this.off.apply(this,e);var n=this.previous(t)||[],r=this.get(t)||[],o=n.map(function(t){return"change:".concat(t)}).join(" "),i=r.map(function(t){return"change:".concat(t)}).join(" ");o&&this.off(o,this.__scriptPropsChange),i&&this.on(i,this.__scriptPropsChange),this.on.apply(this,e)}},r.prototype.__scriptPropsChange=function(t,e,n){void 0===n&&(n={}),n.avoidStore||this.trigger("rerender")},r.prototype.append=function(e,n){void 0===n&&(n={});
1var r=((0,t.isArray)(e)?ze([],e,!0):[e]).map(function(e){return(0,t.isString)(e)||e.collection&&e.collection.remove(e,{temporary:!0}),e}),o=this.components().add(r,n);return(0,t.isArray)(o)?o:[o]},r.prototype.components=function(e,n){void 0===n&&(n={});var r=this.get("components");return(0,t.isUndefined)(e)?r:(r.reset(void 0,n),e?this.append(e,n):[])},r.prototype.getChildAt=function(t){return this.components().at(t||0)||void 0},r.prototype.getLastChild=function(){var t=this.components();return t.at(t.length-1)||null},r.prototype.empty=function(t){return void 0===t&&(t={}),this.components().reset(void 0,t),this},r.prototype.parent=function(t){void 0===t&&(t={});var e=this.collection||t.prev&&this.prevColl;return e?e.parent:void 0},r.prototype.parents=function(){var t=this.parent();return t?[t].concat(t.parents()):[]},r.prototype.scriptUpdated=function(){this.set("scriptUpdated",1)},r.prototype.initToolbar=function(){var t=this.em,e=this,n=t&&t.getConfig().stylePrefix||"";if(!e.get("toolbar")&&t){var r=[];e.collection&&r.push({label:t.getIcon("arrowUp"),command:function(t){return t.runCommand("core:component-exit",{force:1})}}),e.get("draggable")&&r.push({attributes:{class:"".concat(n,"no-touch-actions"),draggable:!0},label:t.getIcon("move"),command:"tlb-move"}),e.get("copyable")&&r.push({label:t.getIcon("copy"),command:"tlb-clone"}),e.get("removable")&&r.push({label:t.getIcon("delete"),command:"tlb-delete"}),e.set("toolbar",r)}},r.prototype.__loadTraits=function(e,n){void 0===n&&(n={});var r=e||this.traits;if(!(r instanceof Be)){r=(0,t.isFunction)(r)?r(this):r;var o=new Be([],this.opt);o.setTarget(this),r.length&&(r.forEach(function(t){return t.attributes&&delete t.attributes.value}),o.add(r)),this.set({traits:o},n)}return this},r.prototype.getTraits=function(){return this.__loadTraits(),ze([],this.traits.models,!0)},r.prototype.setTraits=function(e){var n=(0,t.isArray)(e)?e:[e];return this.set({traits:n}),this.getTraits()},r.prototype.getTrait=function(t){return this.getTraits().filter(function(e){return e.get("id")===t||e.get("name")===t})[0]||null},r.prototype.updateTrait=function(t,e){var n,r=this.getTrait(t);return r&&r.set(e),null===(n=this.em)||void 0===n||n.trigger("component:toggled"),this},r.prototype.getTraitIndex=function(t){var e=this.getTrait(t);return e?this.traits.indexOf(e):-1},r.prototype.removeTrait=function(e){var n,r=this,o=((0,t.isArray)(e)?e:[e]).map(function(t){return r.getTrait(t)}),i=this.traits,a=o.length?i.remove(o):[];return null===(n=this.em)||void 0===n||n.trigger("component:toggled"),(0,t.isArray)(a)?a:[a]},r.prototype.addTrait=function(e,n){var r;void 0===n&&(n={}),this.__loadTraits();var o=this.traits.add(e,n);return null===(r=this.em)||void 0===r||r.trigger("component:toggled"),(0,t.isArray)(o)?o:[o]},r.prototype.normalizeClasses=function(t){var e=[],n=this.em,r=null==n?void 0:n.Selectors;return r?t.models?ze([],t.models,!0):(t.forEach(function(t){return e.push(r.add(t))}),e):[]},r.prototype.clone=function(t){void 0===t&&(t={});var e=this.em,n=Ue({},this.attributes),r=Ue({},this.opt),o=this.getId(),i=null==e?void 0:e.Css;n.attributes=Ue({},n.attributes),delete n.attributes.id,n.components=[],n.classes=[],n.traits=[],this.__isSymbolTop()&&(t.symbol=!0),this.get("components").each(function(e,r){n.components[r]=e.clone(Ue(Ue({},t),{_inner:1}))}),this.get("traits").each(function(t,e){n.traits[e]=t.clone()}),this.get("classes").each(function(t,e){n.classes[e]=t.get("name")}),n.status="",r.collection=null;var a=new this.constructor(n,r),s="#".concat(a.getId());(i?i.getRules("#".concat(o)):[]).forEach(function(t){var e=t.clone();e.set("selectors",[s]),i.getAll().add(e)}),a.set(We,0);var l=this.__getSymbol(),c=this.__getSymbols();t.symbol||!l&&!c?l?(l.set(We,ze(ze([],l.__getSymbols(),!0),[a],!1)),a.__initSymb()):t.symbol&&(this.__isSymbol()?(this.set(We,ze(ze([],c,!0),[a],!1)),a.set(Ke,this),a.__initSymb()):t.symbolInv?(this.set(We,[a]),a.set(Ke,this),[this,a].map(function(t){return t.__initSymb()})):(a.set(We,[this]),[this,a].map(function(t){return t.__initSymb()}),this.set(Ke,a))):(a.set(Ke,0),a.set(We,0));var u="component:clone";return e&&e.trigger(u,a),this.trigger(u,a),a},r.prototype.getName=function(t){void 0===t&&(t={});var n=this.em,r=this.attributes,o=r.type,i=r.tagName,a=r.name,s=o||i,l=o?"":i,c="domComponents.names.",u=a&&(null==n?void 0:n.t("".concat(c).concat(a))),p=l&&(null==n?void 0:n.t("".concat(c).concat(l))),d=n&&(n.t("".concat(c).concat(o))||n.t("".concat(c).concat(i))),f=this.get("custom-name");return(t.noCustom?"":f)||u||a||p||(0,e.capitalize)(l)||d||(0,e.capitalize)(s)},r.prototype.getIcon=function(){var t=this.get("icon");return t?t+" ":""},r.prototype.toHTML=function(n){void 0===n&&(n={});var r=this,o=[],i=n.tag||r.get("tagName"),a=r.get("void"),s=n.attributes,l=this.getAttrToHTML();if(delete n.tag,s&&((0,t.isFunction)(s)?l=s(r,l)||{}:(0,e.isObject)(s)&&(l=s)),n.withProps){var c=this.toJSON();(0,t.forEach)(c,function(n,r){"_"!==r[0]&&["classes","attributes","components"].indexOf(r)<0&&(l["data-gjs-".concat(r)]=(0,t.isArray)(n)||(0,e.isObject)(n)?JSON.stringify(n):n)})}for(var u in l){var p=l[u];if(!(0,t.isUndefined)(p)&&null!==p)if((0,t.isBoolean)(p))p&&o.push(u);else{var d="";if(n.altQuoteAttr&&(0,t.isString)(p)&&p.indexOf('"')>=0)d="'".concat(p.replace(/'/g,"'"),"'");else{var f=(0,t.isString)(p)?p.replace(/"/g,"""):p;d='"'.concat(f,'"')}o.push("".concat(u,"=").concat(d))}}var h=o.length?" ".concat(o.join(" ")):"",g=r.getInnerHTML(n),m="<".concat(i).c
1oncat(h).concat(a?"/":"",">").concat(g);return!a&&(m+="</".concat(i,">")),m},r.prototype.getInnerHTML=function(t){return this.__innerHTML(t)},r.prototype.__innerHTML=function(t){void 0===t&&(t={});var e=this.components();return e.length?e.map(function(e){return e.toHTML(t)}).join(""):this.get("content")},r.prototype.getAttrToHTML=function(){var t=this.getAttributes();return $e(this.em)&&delete t.style,t},r.prototype.toJSON=function(e){void 0===e&&(e={});var n=s.Model.prototype.toJSON.call(this,e);if(n.attributes=this.getAttributes(),delete n.attributes.class,delete n.toolbar,delete n.traits,delete n.status,delete n.open,delete n._undoexc,!e.fromUndo){var r=n[Ke],o=n[We];o&&(0,t.isArray)(o)&&(n[We]=o.filter(function(t){return t}).map(function(t){return t.getId?t.getId():t})),r&&!(0,t.isString)(r)&&(n[Ke]=r.getId())}return this.em.getConfig().avoidDefaults&&this.getChangedProps(n),n},r.prototype.getChangedProps=function(e){var n=e||s.Model.prototype.toJSON.apply(this),r=(0,t.result)(this,"defaults");return(0,t.forEach)(r,function(t,e){-1===["type"].indexOf(e)&&n[e]===t&&delete n[e]}),(0,t.isEmpty)(n.type)&&delete n.type,(0,t.forEach)(["attributes","style"],function(e){(0,t.isEmpty)(r[e])&&(0,t.isEmpty)(n[e])&&delete n[e]}),(0,t.forEach)(["classes","components"],function(e){(!n[e]||(0,t.isEmpty)(r[e])&&!n[e].length)&&delete n[e]}),n},r.prototype.getId=function(){return(this.get("attributes")||{}).id||this.ccid||this.cid},r.prototype.setId=function(t,e){var n=Ue({},this.get("attributes"));return n.id=t,this.set("attributes",n,e),this},r.prototype.getEl=function(t){void 0===t&&(t=void 0);var e=this.getView(t);return e&&e.el},r.prototype.getView=function(t){var e=this.view,n=this.views;return t&&(e=n.filter(function(e){return e._getFrame()===t.view})[0]),e},r.prototype.getCurrentView=function(){var t=(this.em.get("currentFrame")||{}).model;return this.getView(t)},r.prototype.__getScriptProps=function(){var t=this.props();return(this.get("script-props")||[]).reduce(function(e,n){return e[n]=t[n],e},{})},r.prototype.getScriptString=function(e){var n=this,r=e||this.get("script")||"";if(!r)return r;if(this.get("script-props"))r=r.toString().trim();else{if("function"==typeof r){var o=r.toString().trim();r=(o=o.replace(/^function[\s\w]*\(\)\s?\{/,"").replace(/\}$/,"")).trim()}var i=this.em.getConfig(),a=Ge(i.tagVarStart||"{[ "),s=Ge(i.tagVarEnd||" ]}"),l=new RegExp("".concat(a,"([\\w\\d-]*)").concat(s),"g");r=r.replace(l,function(e,r){n.scriptUpdated();var o=n.attributes[r]||"";return(0,t.isArray)(o)||"object"==typeof o?JSON.stringify(o):o})}return r},r.prototype.emitUpdate=function(t){for(var e,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=this.em,i=Xe+(t?":".concat(t):""),a=t&&this.get(t);t&&this.updated.apply(this,ze([t,a,t&&this.previous(t)],n,!1)),this.trigger.apply(this,ze([i],n,!1)),o&&o.trigger.apply(o,ze([i,this],n,!1)),["components","classes"].indexOf(t)>=0&&this.__propSelfToParent({component:this,changed:(e={},e[t]=a,e),options:n[2]||n[1]||{}})},r.prototype.onAll=function(e){return(0,t.isFunction)(e)&&(e(this),this.components().forEach(function(t){return t.onAll(e)})),this},r.prototype.forEachChild=function(e){(0,t.isFunction)(e)&&this.components().forEach(function(t){e(t),t.forEachChild(e)})},r.prototype.remove=function(t){var e=this;void 0===t&&(t={});var n=this.em,r=this.collection,o=function(){r&&r.remove(e,Ue(Ue({},t),{action:"remove-component"})),r||(e.components("",t),e.components().removeChildren(e,void 0,t))},i=Ue({},t);return[this,n].map(function(t){return t.trigger("component:remove:before",e,o,i)}),!i.abort&&o(),this},r.prototype.move=function(t,e){if(void 0===e&&(e={}),t){var n=e.at,r=this.index(),o=t===this.parent();o&&(r===n||r===n-1)||(o&&n&&n>r&&(e.at=n-1),this.remove({temporary:1}),t.append(this,e),this.emitUpdate())}return this},r.prototype.isInstanceOf=function(t){var e,n,r=null===(n=null===(e=this.em)||void 0===e?void 0:e.Components.getType(t))||void 0===n?void 0:n.model;return!!r&&this instanceof r},r.prototype.isChildOf=function(e){for(var n=(0,t.isString)(e),r=this.parent();r;){if(n){if(r.isInstanceOf(e))return!0}else if(r===e)return!0;r=r.parent()}return!1},r.prototype.resetId=function(t){void 0===t&&(t={});var e=this.em,n=this.getId();if(!n)return this;var o=r.createId(this);this.setId(o);var i=null==e?void 0:e.Css.getIdRule(n),a=null==i?void 0:i.get("selectors").at(0);return null==a||a.set("name",o),this},r.prototype._getStyleRule=function(t){var e=(void 0===t?{}:t).id,n=this.em,r=e||this.getId();return null==n?void 0:n.Css.getIdRule(r)},r.prototype._getStyleSelector=function(t){var e=this._getStyleRule(t);return null==e?void 0:e.get("selectors").at(0)},r.prototype._idUpdated=function(t,e,n){if(void 0===n&&(n={}),!n.idUpdate){var o=this.ccid,i=(this.get("attributes")||{}).id,a=(this.previous("attributes")||{}).id||o,s=r.getList(this);if(s[i]||!i&&a)return this.setId(a,{idUpdate:!0});delete s[a],s[i]=this,this.ccid=i;var l=this._getStyleSelector({id:a});l&&l.set({name:i,label:i})}},r.getDefaults=function(){return(0,t.result)(this.prototype,"defaults")},r.isComponent=function(t){return{tagName:(0,e.toLowerCase)(t.tagName)}},r.ensureInList=function(t){var e=r.getList(t),n=t.getId(),o=e[n];if(o){if(o!==t){var i=r.getIncrementId(n,e);t.setId(i),e[i]=t}}else e[n]=t;
1t.components().forEach(function(t){return r.ensureInList(t)})},r.createId=function(t,e){void 0===e&&(e={});var n,o=r.getList(t),i=e.idMap,a=void 0===i?{}:i,s=t.get("attributes").id;return s?(n=r.getIncrementId(s,o,e),t.setId(n),s!==n&&(a[s]=n)):n=r.getNewId(o),o[n]=t,n},r.getNewId=function(t){for(var e=Object.keys(t).length.toString().length+2,n=(Math.random()+1.1).toString(36).slice(-e),o="i".concat(n);t[o];)o=r.getNewId(t);return o},r.getIncrementId=function(t,e,n){void 0===n&&(n={});var r=n.keepIds,o=1,i=t;if((void 0===r?[]:r).indexOf(t)<0)for(;e[i];)o++,i="".concat(t,"-").concat(o);return i},r.getList=function(t){var e=t.opt,n=void 0===e?{}:e,r=n.domc,o=n.em,i=r||(null==o?void 0:o.Components);return i?i.componentsById:{}},r.checkId=function(e,n,o,i){void 0===n&&(n=[]),void 0===o&&(o={}),void 0===i&&(i={});var a=(0,t.isArray)(e)?e:[e],s=i.keepIds,l=void 0===s?[]:s;a.forEach(function(e){e.attributes;var a=e.attributes,s=void 0===a?{}:a,c=e.components,u=s.id;if(u&&o[u]&&l.indexOf(u)<0){var p=r.getIncrementId(u,o);s.id=p,(0,t.isArray)(n)&&n.forEach(function(t){var e=t.selectors;e.forEach(function(t,n){t==="#".concat(u)&&(e[n]="#".concat(p))})})}c&&r.checkId(c,n,o,i)})},r}(ye);const Je=Qe;var tn=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),en=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.compView=sn,t}return tn(n,e),n.prototype.initialize=function(t){this.opts=t||{},this.config=t.config||{},this.em=this.config.em;var e=this.collection;this.listenTo(e,"add",this.addTo),this.listenTo(e,"reset",this.resetChildren),this.listenTo(e,"remove",this.removeChildren)},n.prototype.removeChildren=function(t,e,n){var r=this;void 0===n&&(n={}),t.views.forEach(function(t){if(t){var e=t.childrenView,n=t.scriptContainer;e&&e.stopListening(),(0,At.L_)(n),t.remove.apply(t)}}),t.components().forEach(function(t){return r.removeChildren(t,e,n)})},n.prototype.addTo=function(t,e,n){void 0===e&&(e={}),void 0===n&&(n={});var r=this.em,o=this.collection.indexOf(t);if(this.addToCollection(t,null,o),r&&!n.temporary){var i=function(t){r.trigger("component:add",t),t.components().forEach(function(t){return i(t)})};i(t)}},n.prototype.addToCollection=function(e,n,r){for(var o=this,i=o.config,a=o.opts,s=o.em,l=n||null,c=i.frameView,u=(null==c?void 0:c.model)&&e.getView(c.model),p=a.componentTypes||(null==s?void 0:s.Components.getTypes()),d=e.get("type")||"default",f=this.compView,h=0;h<p.length;h++)if(p[h].id==d){f=p[h].view;break}var g,m=u||new f({model:e,config:i,componentTypes:p});try{g=m.render().el}catch(t){g=document.createTextNode(""),s.logError(t)}if(l)l.appendChild(g);else{var v=this.parentEl,y=v.childNodes;if((0,t.isUndefined)(r))v.appendChild(g);else{var b=y.length==r;b&&r--,b||!y.length?v.appendChild(g):v.insertBefore(g,y[r])}}return e.opt.temporary||null==s||s.trigger("component:mount",e),g},n.prototype.resetChildren=function(t,e){var n=this,r=(void 0===e?{}:e).previousModels,o=void 0===r?[]:r;this.parentEl.innerHTML="",o.forEach(function(t){return n.removeChildren(t,n.collection)}),t.each(function(t){return n.addToCollection(t)})},n.prototype.render=function(t){var e=this,n=this.el,r=document.createDocumentFragment();return this.parentEl=t||this.el,this.collection.each(function(t){return e.addToCollection(t,r)}),n.innerHTML="",n.appendChild(r),this},n}(u.G7);const nn=en;var rn=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),on=function(){return on=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},on.apply(this,arguments)},an=function(n){function r(){return null!==n&&n.apply(this,arguments)||this}return rn(r,n),r.prototype.className=function(){return this.getClasses()},r.prototype.tagName=function(){return this.model.get("tagName")},r.prototype.initialize=function(t){void 0===t&&(t={});var n=this.model,r=t.config||{},o=r.em,i=n.opt||{},a=this.$el,s=this.el;this.opts=t,this.modelOpt=i,this.config=r,this.em=o,this.pfx=r.stylePrefix||"",this.ppfx=r.pStylePrefix||"",this.attr=n.get("attributes"),this.classe=this.attr.class||[],this.listenTo(n,"change:style",this.updateStyle),this.listenTo(n,"change:attributes",this.renderAttributes),this.listenTo(n,"change:highlightable",this.updateHighlight),this.listenTo(n,"change:status change:locked",this.updateStatus),this.listenTo(n,"change:script rerender",this.reset),this.listenTo(n,"change:content",this.updateContent),this.listenTo(n,"change",this.handleChange),this.listenTo(n,"active",this.onActive),this.listenTo(n,"disable",this.onDisable),a.data("model",n),(0,e.setViewEl)(s,this),n.view=this,this._getFrame()&&n.views.push(this),this.initClasses(),this.initComponents({avoidRender:!0}),this.events=on(on({},this.constructor.getEvents()),{dragstart:"handleDragStart"}),this.delegateEvents(),!i.temporary&&this.init(this._clbObj())},r.prototype.__isDraggable=function(){var t=this.model,e=this.config,n=t.attributes.draggable;return e.draggableComponents&&n},r.prototype._clbObj=function(){var t=this,e=t.em,n=t.model,r=t.el;return{editor:null==e?void 0:e.getEditor(),model:n,el:r}},r.prototype.init=function(t){},r.prototype.removed=function(t){},r.prototype.onRender=function(t){},r.prototype.onActive=function(t){},r.prototype.onDisable=function(){},r.prototype.remove=function(){var t;n.prototype.remove.call(this);var e=this.model,r=this.$el,o=e.views,i=this._getFrame()||{};
1return e.components().forEach(function(t){var e=t.getView(i.model);null==e||e.remove()}),null===(t=this.childrenView)||void 0===t||t.remove(),o.splice(o.indexOf(this),1),this.removed(this._clbObj()),r.data({model:"",collection:"",view:""}),this},r.prototype.handleDragStart=function(t){if(!this.__isDraggable())return!1;t.stopPropagation(),t.preventDefault(),this.em.Commands.run("tlb-move",{target:this.model,event:t})},r.prototype.initClasses=function(){var t=this.model,e="change:classes",n=t.get("classes");n instanceof Le&&(this.stopListening(t,e,this.initClasses),this.listenTo(t,e,this.initClasses),this.listenTo(n,"add remove change",this.updateClasses),n.length&&this.importClasses())},r.prototype.initComponents=function(t){void 0===t&&(t={});var e=this,n=e.model,r=e.$el,o=e.childrenView,i=n.get("components"),a=[n,"change:components",this.initComponents];i instanceof xe&&(r.data("collection",i),o&&o.remove(),this.stopListening.apply(this,a),!t.avoidRender&&this.renderChildren(),this.listenTo.apply(this,a))},r.prototype.handleChange=function(){var e=this.model,n=(0,t.keys)(e.changed);if(1!==n.length||"status"!==n[0])for(var r in e.emitUpdate(),e.changed)e.emitUpdate(r)},r.prototype.importClasses=function(){var t=this.em.Selectors;t&&this.model.classes.each(function(e){t.add(e.get("name"))})},r.prototype.updateStatus=function(t){void 0===t&&(t={});var e=this,n=e.em,r=e.el,o=e.ppfx,i=e.model,a=null==n?void 0:n.Canvas.getConfig().extHl,s=i.get("status"),l="".concat(o,"selected"),c="".concat(l,"-parent"),u="".concat(o,"freezed"),p="".concat(o,"hovered"),d="".concat(o,"no-pointer"),f=[l,c,u,p,d],h=a&&!t.noExtHl?"":l;this.$el.removeClass(f.join(" "));var g=[r.getAttribute("class")||""];switch(s){case"selected":g.push(h);break;case"selected-parent":g.push(c);break;case"freezed":g.push(u);break;case"freezed-selected":g.push(u,h);break;case"hovered":!t.avoidHover&&g.push(p)}i.get("locked")&&g.push(d);var m=g.filter(Boolean).join(" ");m&&r.setAttribute("class",m)},r.prototype.updateHighlight=function(){var t=this.model,e=t.get("textable"),n=t.get("highlightable")&&(e||!t.isChildOf("text"));this.setAttribute("data-gjs-highlightable",!!n||"")},r.prototype.updateStyle=function(e,n,r){void 0===r&&(r={});var o=this.model,i=this.em;if(i&&i.getConfig().avoidInlineStyle&&!r.inline){var a=o.getStyle();!(0,t.isEmpty)(a)&&o.setStyle(a)}else this.setAttribute("style",o.styleToString(r))},r.prototype.updateClasses=function(){var t=this.model.classes.pluck("name").join(" ");this.setAttribute("class",t),this.updateStatus(),this.onAttrUpdate()},r.prototype.setAttribute=function(t,e){var n=this.$el;e?n.attr(t,e):n.removeAttr(t)},r.prototype.getClasses=function(){return this.model.getClasses().join(" ")},r.prototype.updateAttributes=function(){var e=[],n=this,r=n.model,o=n.$el,i=n.el,a=r.attributes,s=a.textable,l=a.type,c=on(on({id:r.getId(),"data-gjs-type":l||"default"},this.__isDraggable()&&{draggable:!0}),s&&{contenteditable:"false"});(0,t.each)(i.attributes,function(t){return e.push(t.nodeName)}),e.forEach(function(t){return o.removeAttr(t)}),this.updateStyle(),this.updateHighlight();var u=on(on({},c),r.getAttributes());(0,t.keys)(u).forEach(function(t){return!1===u[t]&&delete u[t]}),o.attr(u)},r.prototype.updateContent=function(){var t=this.model.get("content"),e=this.model.components().length;this.getChildrenContainer().innerHTML=e?"":t},r.prototype.prevDef=function(t){t.preventDefault()},r.prototype.updateScript=function(){var t=this.model,e=this.em;t.get("script")&&(null==e||e.Canvas.getCanvasView().updateScript(this))},r.prototype.getChildrenContainer=function(){var t=this.el;return"function"==typeof this.getChildrenSelector?t=this.el.querySelector(this.getChildrenSelector()):this.getTemplate,t},r.prototype.getOffsetRect=function(){var t={},e=this.el,n=0,r=0,o=function(i){var a=i.offsetParent;a?(n+=a.offsetTop,r+=a.offsetLeft,o(a)):(t.top=e.offsetTop+n,t.left=e.offsetLeft+r,t.bottom=t.top+e.offsetHeight,t.right=t.left+e.offsetWidth)};return o(e),t},r.prototype.isInViewport=function(t){var e,n=(void 0===t?{}:t).rect,r=this.el.ownerDocument,o=r.body,i=null===(e=r.defaultView)||void 0===e?void 0:e.frameElement,a=n||this.getOffsetRect(),s=a.top,l=a.left,c=this._getFrame().getOffsetRect();return s>=c.scrollTop&&l>=c.scrollLeft&&s<=c.scrollBottom&&l<=(null==i?void 0:i.offsetWidth)+o.scrollLeft},r.prototype.scrollIntoView=function(t){var e;void 0===t&&(t={});var n=this.getOffsetRect();if(!this.isInViewport({rect:n})||t.force){var r=this.el;"smooth"!==t.behavior?null===(e=r.ownerDocument.defaultView)||void 0===e||e.scrollTo(0,n.top):r.scrollIntoView(on({behavior:"smooth",block:"nearest"},t))}},r.prototype.reset=function(){var t=this.el;this.el="",this._ensureElement(),this._setData(),(0,At.dL)(t,this.el),this.render()},r.prototype._setData=function(){var t=this.model,e=t.components();this.$el.data({model:t,collection:e,view:this})},r.prototype._getFrame=function(){var t;return null===(t=this.em)||void 0===t?void 0:t.get("Canvas").config.frameView},r.prototype.renderChildren=function(){this.updateContent();var t=this.getChildrenContainer(),e=this.childrenView||new nn({collection:this.model.get("components"),config:this.config,componentTypes:this.opts.componentTypes});e.render(t),this.childrenView=e;for(var n=Array.prototype.slice.call(e.el.childNodes),r=0,o=n.length;r<o;r++)t.appendChild(n.shift())},r.prototype.renderAttributes=function(){this.updateAttributes(),this.updateClasses()},r.prototype.onAttrUpdate=function(){},r.prototype.render=function(){return this.renderAttributes(),this.modelOpt.temporary||(this.renderChildren(),this.updateScript(),(0,e.setViewEl)(this.el,this),this.postRender()),this},r.prototype.postRender=function(){this.modelOpt.temporary||this.onRender(this._clbObj())},r.getEvents=function(){return(0,t.result)(this.prototype,"events")},r}(u.G7);const sn=an;var ln=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const cn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ln(e,t),e.prototype.tagName=function(){return"div"},e}(sn);var un=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),pn=function(){return pn=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},pn.apply(this,arguments)};const dn=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return un(n,t),Object.defineProperty(n.prototype,"defaults",{get:function(){return pn(pn({},t.prototype.defaults),{type:"cell",tagName:"td",draggable:["tr"]})}
1,enumerable:!1,configurable:!0}),n.isComponent=function(t){return["td","th"].indexOf((0,e.toLowerCase)(t.tagName))>=0},n}(Je);var fn=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const hn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return fn(e,t),e}(sn);var gn=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),mn=function(){return mn=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},mn.apply(this,arguments)};const vn=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return gn(n,t),Object.defineProperty(n.prototype,"defaults",{get:function(){return mn(mn({},t.prototype.defaults),{tagName:"tr",draggable:["thead","tbody","tfoot"],droppable:["th","td"]})},enumerable:!1,configurable:!0}),n.isComponent=function(t){return"tr"===(0,e.toLowerCase)(t.tagName)},n}(Je);var yn=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const bn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return yn(e,t),e}(sn);var _n=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Tn=function(){return Tn=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Tn.apply(this,arguments)},Cn="table";const wn=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return _n(n,t),Object.defineProperty(n.prototype,"defaults",{get:function(){return Tn(Tn({},t.prototype.defaults),{type:Cn,tagName:Cn,droppable:["tbody","thead","tfoot"]})},enumerable:!1,configurable:!0}),n.prototype.initialize=function(e,n){t.prototype.initialize.call(this,e,n);var r=this.get("components");!r.length&&r.add({type:"tbody"})},n.isComponent=function(t){return(0,e.toLowerCase)(t.tagName)===Cn},n}(Je),En=sn.extend({events:{}});var Sn=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),xn=function(){return xn=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},xn.apply(this,arguments)},On="tbody";const An=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return Sn(n,t),Object.defineProperty(n.prototype,"defaults",{get:function(){return xn(xn({},t.prototype.defaults),{type:On,tagName:On,draggable:["table"],droppable:["tr"],columns:1,rows:1})}
1,enumerable:!1,configurable:!0}),n.prototype.initialize=function(e,n){t.prototype.initialize.call(this,e,n);var r=this.get("components"),o=this.get("columns"),i=this.get("rows");if(!r.length){for(var a=[];i--;){for(var s=[],l=o;l--;)s.push({type:"cell",classes:["cell"]});a.push({type:"row",classes:["row"],components:s})}r.add(a)}},n.isComponent=function(t){return(0,e.toLowerCase)(t.tagName)===On},n}(Je);var kn=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Pn=function(){return Pn=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Pn.apply(this,arguments)},Nn="thead";const Mn=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return kn(n,t),Object.defineProperty(n.prototype,"defaults",{get:function(){return Pn(Pn({},t.prototype.defaults),{type:Nn,tagName:Nn})},enumerable:!1,configurable:!0}),n.isComponent=function(t){return(0,e.toLowerCase)(t.tagName)===Nn},n}(An);var Ln=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const In=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ln(e,t),e}(sn);var Dn=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const Rn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Dn(e,t),e}(sn);var jn=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Hn=function(){return Hn=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Hn.apply(this,arguments)},Fn="tfoot";const Bn=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return jn(n,t),Object.defineProperty(n.prototype,"defaults",{get:function(){return Hn(Hn({},t.prototype.defaults),{type:Fn,tagName:Fn})},enumerable:!1,configurable:!0}),n.isComponent=function(t){return(0,e.toLowerCase)(t.tagName)===Fn},n}(An);var Vn=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const Un=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Vn(e,t),e}(sn);var zn=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Gn=function(){return Gn=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Gn.apply(this,arguments)}
1,$n='xmlns="http://www.w3.org/2000/svg" width="100" viewBox="0 0 24 24" style="fill: rgba(0,0,0,0.15); transform: scale(0.75)"',qn=function(n){function r(){return null!==n&&n.apply(this,arguments)||this}return zn(r,n),Object.defineProperty(r.prototype,"defaults",{get:function(){return Gn(Gn({},n.prototype.defaults),{type:"image",tagName:"img",void:!0,droppable:0,editable:1,highlightable:0,resizable:{ratioDefault:1},traits:["alt"],src:"<svg ".concat($n,'>\n <path d="M8.5 13.5l2.5 3 3.5-4.5 4.5 6H5m16 1V5a2 2 0 0 0-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2z"></path>\n </svg>'),fallback:"<svg ".concat($n,'>\n <path d="M2.28 3L1 4.27l2 2V19c0 1.1.9 2 2 2h12.73l2 2L21 21.72 2.28 3m2.55 0L21 19.17V5a2 2 0 0 0-2-2H4.83M8.5 13.5l2.5 3 1-1.25L14.73 18H5l3.5-4.5z"></path>\n </svg>'),file:""})},enumerable:!1,configurable:!0}),r.prototype.initialize=function(r,o){n.prototype.initialize.call(this,r,o);var i=this.get("attributes").src;i&&(0,e.buildBase64UrlFromSvg)((0,t.result)(this,"defaults").src)!==i&&this.set("src",i,{silent:!0})},r.prototype.initToolbar=function(){n.prototype.initToolbar.call(this);var t=this.em;if(t){var e="image-editor";if(t.Commands.has(e)){for(var r=!1,o=this.get("toolbar"),i=0;i<o.length;i++)if("image-editor"===o[i].command){r=!0;break}r||(o.push({attributes:{class:"fa fa-pencil"},command:e}),this.set("toolbar",o))}}},r.prototype.getAttrToHTML=function(){var t=n.prototype.getAttrToHTML.call(this),e=this.getSrcResult();return e&&(t.src=e),t},r.prototype.getSrcResult=function(t){void 0===t&&(t={});var n=this.get(t.fallback?"fallback":"src")||"",r=n;return n&&"<svg"===n.substr(0,4)&&(r=(0,e.buildBase64UrlFromSvg)(n)),r},r.prototype.isDefaultSrc=function(){var n=this.get("src"),r=(0,t.result)(this,"defaults").src;return n===r||n===(0,e.buildBase64UrlFromSvg)(r)},r.prototype.toJSON=function(t){var e=n.prototype.toJSON.call(this,t),r=e.attributes;return r&&e.src===r.src&&delete e.src,e},r.prototype.parseUri=function(t){var n={};if((0,e.hasWin)())(n=document.createElement("a")).href=t;else if("undefined"!=typeof URL)try{n=new URL(t)}catch(t){}return{hostname:n.hostname||"",pathname:n.pathname||"",protocol:n.protocol||"",search:n.search||"",hash:n.hash||"",port:n.port||"",query:function(t){void 0===t&&(t="");for(var e={},n=t.substring(1).split("&"),r=0;r<n.length;r++){var o=n[r].split("="),i=decodeURIComponent(o[0]);i&&(e[i]=decodeURIComponent(o[1]||""))}return e}(n.search)}},r.isComponent=function(t){return"img"===(0,e.toLowerCase)(t.tagName)},r}(Je);const Wn=qn;var Kn=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Yn=function(){return Yn=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Yn.apply(this,arguments)},Xn=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return Kn(n,t),Object.defineProperty(n.prototype,"defaults",{get:function(){var e=t.prototype.defaults;return Yn(Yn({},e),{type:"map",src:"",void:!1,mapUrl:"https://maps.google.com/maps",tagName:"iframe",mapType:"q",address:"",zoom:"1",attributes:{frameborder:0},toolbar:e.toolbar,traits:[{label:"Address",name:"address",placeholder:"eg. London, UK",changeProp:1},{type:"select",label:"Map type",name:"mapType",changeProp:1,options:[{value:"q",name:"Roadmap"},{value:"w",name:"Satellite"}]},{label:"Zoom",name:"zoom",type:"range",min:"1",max:"20",changeProp:1}]})},enumerable:!1,configurable:!0}),n.prototype.initialize=function(e,n){this.get("src")?this.parseFromSrc():this.updateSrc(),t.prototype.initialize.call(this,e,n),this.listenTo(this,"change:address change:zoom change:mapType",this.updateSrc)},n.prototype.updateSrc=function(){this.set("src",this.getMapUrl())},n.prototype.getMapUrl=function(){var t=this.get("address"),e=this.get("zoom"),n=this.get("mapType");return t=t?"&q="+t:"",e=e?"&z="+e:"",n=n?"&t="+n:"",this.get("mapUrl")+"?"+t+e+n+"&output=embed"},n.prototype.parseFromSrc=function(){var t=this.parseUri(this.get("src")).query;t.q&&this.set("address",t.q),t.z&&this.set("zoom",t.z),t.t&&this.set("mapType",t.t)},n.isComponent=function(t){if("iframe"==(0,e.toLowerCase)(t.tagName)&&/maps\.google\.com/.test(t.src))return{type:"map",src:t.src}},n}(Wn);const Zn=Xn;var Qn=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Jn=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return Qn(n,e),n.prototype.tagName=function(){return"img"},n.prototype.events=function(){return{dblclick:"onActive",click:"initResize",error:"onError",load:"onLoad",dragstart:"noDrag"}},n.prototype.initialize=function(t){e.prototype.initialize.call(this,t),this.listenTo(this.model,"change:src",this.updateSrc),this.classEmpty="".concat(this.ppfx,"plh-image"),this.fetchFile()},n.prototype.fetchFile=function(){if(!this.modelOpt.temporary){var e=this.model,n=this.em,r=e.get("file");if(r&&n){var o=n.Assets.FileUploader();null==o||o.uploadFile({dataTransfer:{files:[r]}},function(n){var r=n&&n.data&&n.data[0],o=r&&((0,t.isString)(r)?r:r.src);o&&e.set({src:o})}),e.set("file","")}}},n.prototype.updateSrc=function(){var t=this.model;t.addAttributes({src:t.getSrcResult()}),this.updateClasses()},n.prototype.updateClasses=function(){e.prototype.updateClasses.call(this);var t=this,n=t.el,r=t.classEmpty,o=t.model,i=o.getSrcResult()&&!o.isDefaultSrc()?"remove":"add";n.classList[i](r)},n.prototype.onActive=function(t){null==t||t.stopPropagation();var e=this.em,n=this.model,r=null==e?void 0:e.Assets;r&&n.get("editable")&&r.open({select:function(t,e){n.set({src:t.getSrc()}),e&&r.close()},target:n,types:["image"],accept:"image/*"})},n.prototype.onError=function(){var t=this.model.getSrcResult({fallback:!0});t&&(this.el.src=t)},n.prototype.onLoad=function(){this.em.trigger("change:canvasOffset")},n.prototype.noDrag=function(t){return t.preventDefault(),!1},n.prototype.render=function(){if(this.renderAttributes(),this.modelOpt.temporary)return this;this.updateSrc();var t=this.$el,e=this.model,n=t.attr("class")||"";return!e.get("src")&&t.attr("class","".concat(n," ").concat(this.classEmpty).trim()),this.postRender(),this},n}(sn);const tr=Jn;var er=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const nr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return er(e,t),e.prototype.tagName=function(){return"div"},e.prototype.events=function(){return{}},e.prototype.initialize=function(e){t.prototype.initialize.call(this,e),this.classEmpty=this.ppfx+"plh-map"},e.prototype.updateSrc=function(){this.getIframe().src=this.model.get("src")},e.prototype.getIframe=function(){if(!this.iframe){var t=document.createElement("iframe");t.src=this.model.get("src"),t.frameBorder="0",t.style.height="100%",t.style.width="100%",t.className=this.ppfx+"no-pointer",this.iframe=t}return this.iframe},e.prototype.render=function(){return t.prototype.render.call(this),this.updateClasses(),this.el.appendChild(this.getIframe()),this},e}(tr);var rr=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),or=function(){return or=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},or.apply(this,arguments)};const ir=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return rr(n,e),Object.defineProperty(n.prototype,"defaults",{get:function(){return or(or({},e.prototype.defaults),{type:"text",droppable:!1,editable:!0})}
1,enumerable:!1,configurable:!0}),n.prototype.initialize=function(t,n){e.prototype.initialize.call(this,t,n),this.__checkInnerChilds()},n.prototype.__checkInnerChilds=function(){var e=this.em.Components.config.disableTextInnerChilds;if(e){var n=function(t){t.isInstanceOf("textnode")||t.set({locked:!0,layerable:!1})};(0,t.isFunction)(e)?this.forEachChild(function(t){e(t)&&n(t)}):this.forEachChild(n)}},n}(Je);var ar=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),sr=function(){return sr=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},sr.apply(this,arguments)},lr="link",cr=function(n){function r(){return null!==n&&n.apply(this,arguments)||this}return ar(r,n),Object.defineProperty(r.prototype,"defaults",{get:function(){return sr(sr({},n.prototype.defaults),{type:lr,tagName:"a",traits:["title","href","target"]})},enumerable:!1,configurable:!0}),r.isComponent=function(n,r){var o;if(void 0===r&&(r={}),"a"===(0,e.toLowerCase)(n.tagName)){var i=r.textTags||[];o={type:lr,editable:!1};var a=n.childNodes;a.length||delete o.editable,(0,t.forEach)(a,function(t){var n=t.tagName;(3==t.nodeType&&""!==t.textContent.trim()||n&&i.indexOf((0,e.toLowerCase)(n))>=0)&&delete o.editable})}return o},r}(ir);const ur=cr;var pr=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),dr=function(){return dr=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},dr.apply(this,arguments)},fr=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,s)}l((r=r.apply(t,e||[])).next())})},hr=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}},gr=function(n){function r(){return null!==n&&n.apply(this,arguments)||this}return pr(r,n),r.prototype.events=function(){return{dblclick:"onActive",input:"onInput"}},r.prototype.initialize=function(e){n.prototype.initialize.call(this,e),(0,t.bindAll)(this,"disableEditing","onDisable");var r=this.model,o=this.em;this.listenTo(r,"focus",this.onActive),this.listenTo(r,"change:content",this.updateContentText),this.listenTo(r,"sync:content",this.syncContent),this.rte=null==o?void 0:o.RichTextEditor},r.prototype.updateContentText=function(t,e,n){void 0===n&&(n={}),!n.fromDisable&&this.disableEditing()},r.prototype.canActivate=function(){var t,e=this,n=e.model,r=e.rteEnabled,o=e.em,i=(null==o?void 0:o.getEditing())===n,a=!0,s=!1;if((r||!n.get("editable")||i||(s=n.isChildOf("text")))&&(a=!1,s&&!n.get("textable"))){for(var l=n.parent();l&&!l.isInstanceOf("text");)l=l.parent();l&&l.get("editable")?t=l:a=!0}return{result:a,delegate:t}},r.prototype.onActive=function(t){var e,n;return fr(this,void 0,void 0,function(){var r,o,i,a,s,l,c,u,p;return hr(this,function(d){switch(d.label){case 0:return o=(r=this).rte,i=r.em,a=this.canActivate(),s=a.result,l=a.delegate,s?(null===(n=null==t?void 0:t.stopPropagation)||void 0===n||n.call(t),c=this,[4,this.getContent()]):(l&&(null===(e=null==t?void 0:t.stopPropagation)||void 0===e||e.call(t),i.setSelected(l),l.trigger("active",t)),[2]);case 1:if(c.lastContent=d.sent(),!o)return[3,5];d.label=2;case 2:return d.trys.push([2,4,,5]),u=this,[4,o.enable(this,this.activeRte,{event:t})];case 3:return u.activeRte=d.sent(),[3,5];case 4:return p=d.sent(),i.logError(p),[3,5];case 5:return this.toggleEvents(!0),[2]}})})},r.prototype.onDisable=function(){this.disableEditing()},r.prototype.disableEditing=function(t){return void 0===t&&(t={}),fr(this,void 0,void 0,function(){var e,n,r,o,i,a,s,l;return hr(this,function(c){switch(c.label){case 0:if(n=(e=this).model,r=e.rte,o=e.activeRte,i=e.em,a=n&&n.get("editable"),!r)return[3,8];c.label=1;case 1:return c.trys.push([1,3,,4]),[4,r.disable(this,o)];case 2:return c.sent(),[3,4];case 3:return s=c.sent(),i.logError(s),[3,4];case 4:return(l=a)?[4,this.getContent()]:[3,6];case 5:l=c.sent()!==this.lastContent,c.label=6;case 6:return l?[4,this.syncContent(t)]:[3,8];case 7:c.sent(),this.lastContent="",c.label=8;case 8:return this.toggleEvents(),[2]}})})},r.prototype.getContent=function(){return fr(this,void 0,void 0,function(){var t,e,n,r;return hr(this,function(o){switch(o.label){case 0:return e=(t=this).rte,n=t.activeRte,r="",e?[4,e.getContent(this,n)]:[3,2];case 1:r=o.sent(),o.label=2;case 2:return[2,r]}})})},r.prototype.syncContent=function(t){return void 0===t&&(t={}),fr(this,void 0,void 0,function(){var e,n,r,o,i,a;return hr(this,function(s){switch(s.label){case 0:return n=(e=this).model,r=e.rte,e.rteEnabled||t.force?[4,this.getContent()]:[2];case 1:return o=s.sent(),i=n.components(),a=dr({fromDisable:1},t),n.set("content","",a),(null==r?void 0:r.customRte)&&!r.customRte.parseContent?(i.length&&i.reset(void 0,dr(dr({},t),{keepIds:we(i)})),n.set("content",o,a)):i.resetFromString(o,t),[2]}})})},r.prototype.insertComponent=function(t,n){var r;void 0===n&&(n={});var o=this.model,i=this.el.ownerDocument.getSelection();if(null==i?void 0:i.rangeCount){var a=i.getRangeAt(0),s=a.startContainer,l=a.startOffset,c=(0,e.getModel)(s),u=[];
1if(c&&(null===(r=c.is)||void 0===r?void 0:r.call(c,"textnode"))){var p=c.collection;p.forEach(function(e){if(e===c){var n="textnode",r=e.get("content")||"";u.push({type:n,content:r.slice(0,l)}),u.push(t),u.push({type:n,content:r.slice(l)})}else u.push(e)});var d=u.filter(Boolean),f=d.indexOf(t);return p.reset(d,n),p.at(f)}}return o.append(t,n)},r.prototype.onInput=function(){var t=this.em,e="component",n=["".concat(e,":update"),"".concat(e,":input")].join(" ");t&&t.trigger(n,this.model)},r.prototype.disablePropagation=function(t){t.stopPropagation()},r.prototype.toggleEvents=function(t){var n=this,r=n.em,o=n.model,i=n.$el,a={on:e.on,off:e.off},s=t?"on":"off";r.setEditing(!!t&&this),this.rteEnabled=!!t;var l=[this.el.ownerDocument,document];if(a.off(l,"mousedown",this.onDisable),a[s](l,"mousedown",this.onDisable),r[s]("toolbar:run:before",this.onDisable),o&&(o[s]("removed",this.onDisable),o.trigger("rte:".concat(t?"enable":"disable"))),null==i||i.off("mousedown",this.disablePropagation),i&&i[s]("mousedown",this.disablePropagation),this.config.draggableComponents)for(var c=this.el;c;)c.draggable=!t,(c=c.parentNode)&&"BODY"==c.tagName&&(c=0)},r}(sn);const mr=gr;var vr=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const yr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return vr(e,t),e.prototype.render=function(){return t.prototype.render.call(this),this.el.addEventListener("click",this.prevDef,!0),this},e}(mr);var br=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_r=function(){return _r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},_r.apply(this,arguments)},Tr="label";const Cr=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return br(n,t),Object.defineProperty(n.prototype,"defaults",{get:function(){return _r(_r({},t.prototype.defaults),{type:Tr,tagName:Tr,traits:["id","title","for"]})},enumerable:!1,configurable:!0}),n.isComponent=function(t){return(0,e.toLowerCase)(t.tagName)===Tr},n}(ir);var wr=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const Er=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return wr(e,t),e}(yr);var Sr=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),xr=function(){return xr=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},xr.apply(this,arguments)},Or="video",Ar="yt",kr="vi",Pr="ytnc",Nr=function(t){return t&&"0"!==t},Mr=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return Sr(n,t),Object.defineProperty(n.prototype,"defaults",{get:function(){return xr(xr({},t.prototype.defaults),{type:Or,tagName:Or,videoId:"",void:!1,provider:"so",ytUrl:"https://www.youtube.com/embed/",ytncUrl:"https://www.youtube-nocookie.com/embed/",viUrl:"https://player.vimeo.com/video/",loop:0,poster:"",muted:0,autoplay:0,controls:1,color:"",list:"",rel:1,modestbranding:0,sources:[],attributes:{allowfullscreen:"allowfullscreen"}})}
1,enumerable:!1,configurable:!0}),n.prototype.initialize=function(e,n){this.em=n.em,this.get("src")&&this.parseFromSrc(),this.updateTraits(),this.listenTo(this,"change:provider",this.updateTraits),this.listenTo(this,"change:videoId change:provider",this.updateSrc),t.prototype.initialize.call(this,e,n)},n.prototype.updateTraits=function(){var t,e=this.em,n="iframe";switch(this.get("provider")){case Ar:case Pr:t=this.getYoutubeTraits();break;case kr:t=this.getVimeoTraits();break;default:n="video",t=this.getSourceTraits()}this.set({tagName:n},{silent:!0}),this.set({traits:t}),e.get("ready")&&e.trigger("component:toggled")},n.prototype.parseFromSrc=function(){var t=this.get("provider"),e=this.parseUri(this.get("src")),n=e.query;switch(t){case Ar:case Pr:case kr:this.set("videoId",e.pathname.split("/").pop()),n.list&&this.set("list",n.list),Nr(n.autoplay)&&this.set("autoplay",1),Nr(n.loop)&&this.set("loop",1),0===parseInt(n.controls)&&this.set("controls",0),Nr(n.color)&&this.set("color",n.color),"0"===n.rel&&this.set("rel",0),"1"===n.modestbranding&&this.set("modestbranding",1)}},n.prototype.updateSrc=function(){var t="";switch(this.get("provider")){case Ar:t=this.getYoutubeSrc();break;case Pr:t=this.getYoutubeNoCookieSrc();break;case kr:t=this.getVimeoSrc()}this.set({src:t})},n.prototype.getAttrToHTML=function(){var e=t.prototype.getAttrToHTML.call(this);switch(this.get("provider")){case Ar:case Pr:case kr:break;default:this.get("loop")&&(e.loop="loop"),this.get("autoplay")&&(e.autoplay="autoplay"),this.get("controls")&&(e.controls="controls")}return e},n.prototype.getProviderTrait=function(){return{type:"select",label:"Provider",name:"provider",changeProp:!0,options:[{value:"so",name:"HTML5 Source"},{value:Ar,name:"Youtube"},{value:Pr,name:"Youtube (no cookie)"},{value:kr,name:"Vimeo"}]}},n.prototype.getSourceTraits=function(){return[this.getProviderTrait(),{label:"Source",name:"src",placeholder:"eg. ./media/video.mp4",changeProp:!0},{label:"Poster",name:"poster",placeholder:"eg. ./media/image.jpg"},this.getAutoplayTrait(),this.getLoopTrait(),this.getControlsTrait()]},n.prototype.getYoutubeTraits=function(){return[this.getProviderTrait(),{label:"Video ID",name:"videoId",placeholder:"eg. jNQXAC9IVRw",changeProp:!0},this.getAutoplayTrait(),this.getLoopTrait(),this.getControlsTrait(),{type:"checkbox",label:"Related",name:"rel",changeProp:!0},{type:"checkbox",label:"Modest",name:"modestbranding",changeProp:!0}]},n.prototype.getVimeoTraits=function(){return[this.getProviderTrait(),{label:"Video ID",name:"videoId",placeholder:"eg. 123456789",changeProp:!0},{label:"Color",name:"color",placeholder:"eg. FF0000",changeProp:!0},this.getAutoplayTrait(),this.getLoopTrait()]},n.prototype.getAutoplayTrait=function(){return{type:"checkbox",label:"Autoplay",name:"autoplay",changeProp:!0}},n.prototype.getLoopTrait=function(){return{type:"checkbox",label:"Loop",name:"loop",changeProp:!0}},n.prototype.getControlsTrait=function(){return{type:"checkbox",label:"Controls",name:"controls",changeProp:!0}},n.prototype.getYoutubeSrc=function(){var t=this.get("videoId"),e=this.get("ytUrl"),n=this.get("list");return e+=t+(t.indexOf("?")<0?"?":""),e+=n?"&list=".concat(n):"",e+=this.get("autoplay")?"&autoplay=1":"",e+=this.get("controls")?"":"&controls=0&showinfo=0",e+=this.get("loop")?"&loop=1&playlist=".concat(t):"",(e+=this.get("rel")?"":"&rel=0")+(this.get("modestbranding")?"&modestbranding=1":"")},n.prototype.getYoutubeNoCookieSrc=function(){var t=this.getYoutubeSrc();return t.replace(this.get("ytUrl"),this.get("ytncUrl"))},n.prototype.getVimeoSrc=function(){var t=this.get("viUrl");return t+=this.get("videoId")+"?",t+=this.get("autoplay")?"&autoplay=1":"",t+=this.get("loop")?"&loop=1":"",(t+=this.get("controls")?"":"&title=0&portrait=0&badge=0")+(this.get("color")?"&color="+this.get("color"):"")},n.isComponent=function(t){var n=t.tagName,r=t.src,o=/youtube\.com\/embed/.test(r),i=/youtube-nocookie\.com\/embed/.test(r),a=/player\.vimeo\.com\/video/.test(r),s=o||i||a;if((0,e.toLowerCase)(n)==Or||"iframe"==(0,e.toLowerCase)(n)&&s){var l={type:"video"};return r&&(l.src=r),s&&(o?l.provider=Ar:i?l.provider=Pr:a&&(l.provider=kr)),l}},n}(Wn);const Lr=Mr;var Ir=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Dr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ir(e,t),e.prototype.tagName=function(){return"div"},e.prototype.events=function(){return{}},e.prototype.initialize=function(){sn.prototype.initialize.apply(this,arguments);
1var t=this.model,e=["loop","autoplay","controls","color","rel","modestbranding","poster"].map(function(t){return"change:".concat(t)}).join(" ");this.listenTo(t,"change:provider",this.updateProvider),this.listenTo(t,"change:src",this.updateSrc),this.listenTo(t,e,this.updateVideo)},e.prototype.updateProvider=function(){var t=this.model.get("provider");this.el.innerHTML="",this.el.appendChild(this.renderByProvider(t))},e.prototype.updateSrc=function(){var t=this.model,e=this.videoEl;if(e){var n=t.get("provider"),r=t.get("src");switch(n){case"yt":r=t.getYoutubeSrc();break;case"ytnc":r=t.getYoutubeNoCookieSrc();break;case"vi":r=t.getVimeoSrc()}e.src=r}},e.prototype.updateVideo=function(){var t=this.model,e=this.videoEl;switch(t.get("provider")){case"yt":case"ytnc":case"vi":t.trigger("change:videoId");break;default:if(e){var n=e;n.loop=t.get("loop"),n.autoplay=t.get("autoplay"),n.controls=t.get("controls"),n.poster=t.get("poster")}}},e.prototype.renderByProvider=function(t){var e;switch(t){case"yt":e=this.renderYoutube();break;case"ytnc":e=this.renderYoutubeNoCookie();break;case"vi":e=this.renderVimeo();break;default:e=this.renderSource()}return this.videoEl=e,e},e.prototype.renderSource=function(){var t=document.createElement("video");return t.src=this.model.get("src"),this.initVideoEl(t),t},e.prototype.renderYoutube=function(){var t=document.createElement("iframe");return t.src=this.model.getYoutubeSrc(),t.frameBorder="0",t.setAttribute("allowfullscreen","true"),this.initVideoEl(t),t},e.prototype.renderYoutubeNoCookie=function(){var t=document.createElement("iframe");return t.src=this.model.getYoutubeNoCookieSrc(),t.frameBorder="0",t.setAttribute("allowfullscreen","true"),this.initVideoEl(t),t},e.prototype.renderVimeo=function(){var t=document.createElement("iframe");return t.src=this.model.getVimeoSrc(),t.frameBorder="0",t.setAttribute("allowfullscreen","true"),this.initVideoEl(t),t},e.prototype.initVideoEl=function(t){t.className=this.ppfx+"no-pointer",t.style.height="100%",t.style.width="100%"},e.prototype.render=function(){sn.prototype.render.apply(this),this.updateClasses();var t=this.model.get("provider");return this.el.appendChild(this.renderByProvider(t)),this.updateVideo(),this},e}(tr);const Rr=Dr;var jr=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Hr=function(){return Hr=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Hr.apply(this,arguments)},Fr="script";const Br=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return jr(n,t),Object.defineProperty(n.prototype,"defaults",{get:function(){return Hr(Hr({},t.prototype.defaults),{type:Fr,tagName:Fr,droppable:!1,draggable:!1,layerable:!1})},enumerable:!1,configurable:!0}),n.isComponent=function(t){if((0,e.toLowerCase)(t.tagName)==Fr){var n={type:Fr};return t.src&&(n.src=t.src,n.onload=t.onload),n}},n}(Je);var Vr=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ur=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Vr(e,t),e.prototype.tagName=function(){return"script"},e.prototype.events=function(){return{}},e.prototype.render=function(){var t=this.model,e=this.em,n=t.get("src"),r=e&&e.get("scriptCount")||0,o="";if(n){var i=t.get("onload"),a="script".concat(r),s="script".concat(r+1),l="".concat(a,"Start"),c="".concat(s,"Start");o="\n var ".concat(a," = document.createElement('script');
1\n ").concat(a,".onload = function() {\n ").concat(i?"".concat(i,"();\n"):"","\n typeof ").concat(c," == 'function' && ").concat(c,"();\n };\n ").concat(a,".src = '").concat(n,"';\n function ").concat(l,"() { document.body.appendChild(").concat(a,"); };\n ").concat(r?"":"".concat(l,"();"),"\n "),e&&e.set("scriptCount",r+1)}else o=t.__innerHTML();return this.el.innerHTML=o,this.postRender(),this},e}(tr);const zr=Ur;var Gr=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),$r=function(){return $r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},$r.apply(this,arguments)},qr="svg";const Wr=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return Gr(n,t),Object.defineProperty(n.prototype,"defaults",{get:function(){return $r($r({},t.prototype.defaults),{type:qr,tagName:qr,highlightable:!1,resizable:{ratioDefault:!0}})},enumerable:!1,configurable:!0}),n.prototype.getName=function(){var t=this.get("tagName"),e=this.get("custom-name");return t=t.charAt(0).toUpperCase()+t.slice(1),e||t},n.isComponent=function(t){return(0,e.toLowerCase)(t.tagName)===qr},n}(Je);var Kr=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Yr=function(){return Yr=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Yr.apply(this,arguments)};const Xr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Kr(e,t),Object.defineProperty(e.prototype,"defaults",{get:function(){return Yr(Yr({},t.prototype.defaults),{selectable:!1,hoverable:!1,layerable:!1})},enumerable:!1,configurable:!0}),e.isComponent=function(t,e){return void 0===e&&(e={}),!!e.inSvg},e}(Wr);var Zr=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Qr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Zr(e,t),e.prototype._createElement=function(t){return document.createElementNS("http://www.w3.org/2000/svg",t)},e}(sn);const Jr=Qr;var to=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),eo=function(){return eo=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},eo.apply(this,arguments)};const no=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return to(n,t),Object.defineProperty(n.prototype,"defaults",{get:function(){return eo(eo({},t.prototype.defaults),{tagName:"",droppable:!1,layerable:!1,selectable:!1,editable:!0})}
1,enumerable:!1,configurable:!0}),n.prototype.toHTML=function(){var t=this.parent(),e=this.get("content");return(null==t?void 0:t.is("script"))?e:this.__escapeContent(e)},n.prototype.__escapeContent=function(t){return(0,e.escapeNodeContent)(t)},n.isComponent=function(t){if(3===t.nodeType)return{type:"textnode",content:t.textContent}},n}(Je);var ro=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),oo=function(){return oo=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},oo.apply(this,arguments)};const io=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ro(e,t),Object.defineProperty(e.prototype,"defaults",{get:function(){return oo({},t.prototype.defaults)},enumerable:!1,configurable:!0}),e.prototype.toHTML=function(){return"\x3c!--".concat(this.get("content"),"--\x3e")}
1,e.isComponent=function(t){if(8==t.nodeType)return{tagName:"NULL",type:"comment",content:t.textContent}},e}(no);var ao=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const so=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ao(e,t),e.prototype._setAttributes=function(){},e.prototype.renderAttributes=function(){},e.prototype.updateStatus=function(){},e.prototype.updateClasses=function(){},e.prototype.setAttribute=function(){},e.prototype.updateAttributes=function(){},e.prototype.initClasses=function(){},e.prototype.initComponents=function(){},e.prototype.delegateEvents=function(){return this},e.prototype._createElement=function(){return document.createTextNode("")},e.prototype.render=function(){var t=this.model,e=this.el;return t.opt.temporary||(e.textContent=t.get("content")),this},e}(sn);var lo=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const co=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return lo(e,t),e.prototype._createElement=function(){return document.createComment(this.model.get("content"))},e}(so);var uo=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),po=function(){return po=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},po.apply(this,arguments)};const fo=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return uo(e,t),Object.defineProperty(e.prototype,"defaults",{get:function(){return po(po({},t.prototype.defaults),{tagName:"body",removable:!1,copyable:!1,draggable:!1,components:[],traits:[],stylable:["background","background-color","background-image","background-repeat","background-attachment","background-position","background-size"]})},enumerable:!1,configurable:!0}),e.prototype.__postAdd=function(){var e,n=null===(e=this.em)||void 0===e?void 0:e.UndoManager;return!this.__hasUm&&(null==n||n.add(this)),t.prototype.__postAdd.call(this)},e.prototype.__postRemove=function(){var e,n=null===(e=this.em)||void 0===e?void 0:e.UndoManager;return null==n||n.remove(this),t.prototype.__postRemove.call(this)},e.isComponent=function(){return!1},e}(Je);var ho=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),go=function(){return go=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},go.apply(this,arguments)},mo="iframe";const vo=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return ho(n,t),Object.defineProperty(n.prototype,"defaults",{get:function(){return go(go({},t.prototype.defaults),{type:mo,tagName:mo,droppable:!1,resizable:!0,traits:["id","title","src"],attributes:{frameborder:"0"}})}
1,enumerable:!1,configurable:!0}),n.isComponent=function(t){return(0,e.toLowerCase)(t.tagName)===mo},n}(Je);var yo=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const bo=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return yo(e,t),e.prototype.tagName=function(){return"div"},e.prototype.initialize=function(e){t.prototype.initialize.call(this,e),this.listenTo(this.model,"change:attributes:src",this.updateSrc)},e.prototype.updateSrc=function(){var t=(0,At.sE)(this.el,"iframe")[0];t&&(0,At.FW)(t,{src:this.__getSrc()})},e.prototype.render=function(){t.prototype.render.call(this);var e=(0,At.ut)("iframe",{class:"".concat(this.ppfx,"no-pointer"),style:"width: 100%; height: 100%; border: none",src:this.__getSrc()});return this.el.appendChild(e),this},e.prototype.__getSrc=function(){return this.model.getAttributes().src||""},e}(sn);var _o=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),To=function(){return To=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},To.apply(this,arguments)},Co=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n},wo=function(e){function n(t){var n=e.call(this,t,"DomComponents",new xe(void 0,{em:t}))||this;for(var r in n.componentTypes=[{id:"cell",model:dn,view:hn},{id:"row",model:vn,view:bn},{id:"table",model:wn,view:En},{id:"thead",model:Mn,view:In},{id:"tbody",model:An,view:Rn},{id:"tfoot",model:Bn,view:Un},{id:"map",model:Zn,view:nr},{id:"link",model:ur,view:yr},{id:"label",model:Cr,view:Er},{id:"video",model:Lr,view:Rr},{id:"image",model:Wn,view:tr},{id:"script",model:Br,view:zr},{id:"svg-in",model:Xr,view:Jr},{id:"svg",model:Wr,view:Jr},{id:"iframe",model:vo,view:bo},{id:"comment",model:io,view:co},{id:"textnode",model:no,view:so},{id:"text",model:ir,view:mr},{id:"wrapper",model:fo,view:cn},{id:"default",model:Je,view:sn}],n.componentsById={},n.Component=Je,n.Components=xe,n.ComponentsView=nn,n.storageKey="components",t&&(n.config.components=t.config.components||n.config.components),ce)r in n.config||(n.config[r]=ce[r]);var o=n.config.pStylePrefix;if(o&&(n.config.stylePrefix=o+n.config.stylePrefix),t){t.get("Parser").compTypes=n.componentTypes,t.on("change:componentHovered",n.componentHovered,n);var i=t.get("selected");t.listenTo(i,"add",function(t,e,r){return n.selectAdd(i.getComponent(t),r)}),t.listenTo(i,"remove",function(t,e,r){return n.selectRemove(i.getComponent(t),r)})}return n}return _o(n,e),n.prototype.load=function(e){var n=this;return this.loadProjectData(e,{onResult:function(e){var r=n.getWrapper();if(r||(n.em.Pages.add({},{select:!0}),r=n.getWrapper()),(0,t.isArray)(e))e.length&&r.components(e);else{var o=e.components,i=void 0===o?[]:o,a=Co(e,["components"]);r.set(a),r.components(i)}}})},n.prototype.store=function(){return{}},n.prototype.getComponent=function(){var t=this.em.Pages.getSelected(),e=null==t?void 0:t.getMainFrame();return null==e?void 0:e.getComponent()},n.prototype.getWrapper=function(){return this.getComponent()},n.prototype.getComponents=function(){var t=this.getWrapper();return null==t?void 0:t.components()},n.prototype.addComponent=function(t,e){return void 0===e&&(e={}),this.getComponents().add(t,e)},n.prototype.render=function(){var t;return null===(t=this.componentView)||void 0===t?void 0:t.render().el},n.prototype.clear=function(t){void 0===t&&(t={});var e=this.getComponents();
1return null==e||e.filter(Boolean).forEach(function(e){return e.remove(t)}),this},n.prototype.setComponents=function(t,e){void 0===e&&(e={}),this.clear(e).addComponent(t,e)},n.prototype.addType=function(e,n){var r=this.em,o=n.model,i=void 0===o?{}:o,a=n.view,s=void 0===a?{}:a,l=n.isComponent,c=n.extend,u=n.extendView,p=n.extendFn,d=void 0===p?[]:p,f=n.extendFnView,h=void 0===f?[]:f,g=this.getType(e),m=this.getType(c),v=this.getType(u),y=m||g||this.getType("default"),b=y.model,_=v?v.view:y.view,T=function(t,e,n){return t.reduce(function(t,r){var o=e[r],i=n.prototype[r];return o&&i&&(t[r]=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];i.bind(this).apply(void 0,t),o.bind(this).apply(void 0,t)}),t},{})};if("object"==typeof i){var C={defaults:i.defaults};delete i.defaults,n.model=b.extend(To(To({},i),T(d,i,b)),{isComponent:!g||m||l?l||function(){return 0}:b.isComponent}),Object.defineProperty(n.model.prototype,"defaults",{get:function(){return To(To({},(0,t.result)(b.prototype,"defaults")||{}),(0,t.result)(C,"defaults")||{})}})}"object"==typeof s&&(n.view=_.extend(To(To({},s),T(h,s,_)))),g?(g.model=n.model,g.view=n.view):(n.id=e,this.componentTypes.unshift(n));var w="component:type:".concat(g?"update":"add");return null==r||r.trigger(w,g||n),this},n.prototype.getType=function(t){for(var e=this.componentTypes,n=0;n<e.length;n++)if(e[n].id==t)return e[n]},n.prototype.removeType=function(t){var e=this.componentTypes,n=this.getType(t);if(n){var r=e.indexOf(n);return e.splice(r,1),n}},n.prototype.getTypes=function(){return this.componentTypes},n.prototype.selectAdd=function(t,e){var n=this;void 0===e&&(e={}),t&&(t.set({status:"selected"}),["component:selected","component:toggled"].forEach(function(r){return n.em.trigger(r,t,e)}))},n.prototype.selectRemove=function(t,e){var n=this;void 0===e&&(e={}),t&&(this.em,t.set({status:"",state:""}),["component:deselected","component:toggled"].forEach(function(r){return n.em.trigger(r,t,e)}))},n.prototype.componentHovered=function(){var e=this.em,n=e.get("componentHovered"),r=e.previous("componentHovered"),o="hovered";r&&r.get("status")==o&&r.set({status:"",state:""}),n&&(0,t.isEmpty)(n.get("status"))&&n.set("status",o)},n.prototype.getShallowWrapper=function(){var e=this.shallow,n=this.em;if(!e&&n){var r=n.shallow;if(!r)return;var o=r.Components;if(o.componentTypes=this.componentTypes,e=o.getWrapper()){var i=[Xe,Ze].join(" ");e.on(i,(0,t.debounce)(function(){return null==e?void 0:e.components("")},100))}this.shallow=e}return e},n.prototype.canMove=function(e,n,r){var o=r||0===r?r:null,i={result:!1,reason:0,target:e,source:null};if(!n||!e)return i;var a=n.toHTML?n:null;if(!a){var s=this.getShallowWrapper();a=(null==s?void 0:s.append(n)[0])||null}if(i.source=a,!a)return i;var l=a.get("draggable");if((0,t.isFunction)(l))l=!!l(a,e,o);else{var c=e.getEl();l=(0,t.isArray)(l)?l.join(","):l,l=(0,t.isString)(l)?null==c?void 0:c.matches(l):l}if(!l)return To(To({},i),{reason:1});var u=e.get("droppable");(0,t.isFunction)(u)?u=!!u(a,e,o):!1===u&&e.isInstanceOf("text")&&a.get("textable")?u=!0:(c=a.getEl(),u=(0,t.isArray)(u)?u.join(","):u,u=(0,t.isString)(u)?null==c?void 0:c.matches(u):u);var p=[e].concat(e.parents()).indexOf(a)>-1;return To(To({},i),!u||p?{reason:2}:{result:!0})},n.prototype.allById=function(){return this.componentsById},n.prototype.getById=function(t){return this.componentsById[t]||null},n.prototype.destroy=function(){var t,e=this.allById();Object.keys(e).forEach(function(t){return e[t]&&e[t].remove()}),null===(t=this.componentView)||void 0===t||t.remove(),[this.em,this.componentsById,this.componentView].forEach(function(t){return{}})},n}(b);const Eo=wo,So={stylePrefix:"css-",rules:[]};var xo=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Oo=Number.MAX_VALUE,Ao=function(n){function r(){var e=n.call(this)||this;return(0,t.bindAll)(e,"sortRules"),e.compCls=[],e.ids=[],e}return xo(r,n),r.prototype.buildFromModel=function(t,e){var n=this;void 0===e&&(e={});var r="",o=this.em,i=o&&o.getConfig().avoidInlineStyle,a=t.styleToString(),s=t.classes;
1return this.ids.push("#".concat(t.getId())),s.forEach(function(t){return n.compCls.push(t.getFullName())}),!i&&a&&(r="#".concat(t.getId(),"{").concat(a,"}")),t.components().forEach(function(t){return r+=n.buildFromModel(t,e)}),r},r.prototype.build=function(n,r){var o=this;void 0===r&&(r={});var i=r.json,a=r.em,s=r.cssc||(null==a?void 0:a.Css);this.em=a,this.compCls=[],this.ids=[],this.model=n;var l=[],c=n?this.buildFromModel(n,r):"",u=(0,t.isUndefined)(r.clearStyles)&&a?a.getConfig().clearStyles:r.clearStyles;if(s){var p=r.rules||s.getAll(),d={},f=[];r.onlyMatched&&n&&(0,e.hasWin)()&&(p=this.matchedRules(n,p)),p.forEach(function(t){var e=t.getAtRule();if(e){var n=d[e];n?n.push(t):d[e]=[t]}else{var a=o.buildFromRule(t,f,r);i?l.push(a):c+=a}}),this.sortMediaObject(d).forEach(function(t){var e="",n=t.key;t.value.forEach(function(t){var a=o.buildFromRule(t,f,r);t.get("singleAtRule")?c+="".concat(n,"{").concat(a,"}"):e+=a,i&&l.push(a)}),e&&(c+="".concat(n,"{").concat(e,"}"))}),a&&u&&p.remove&&p.remove(f)}return i?l.filter(function(t){return t}):c},r.prototype.buildFromRule=function(t,e,n){var r,o=this;void 0===n&&(n={});var i,a="",s=this.model,l=t.selectorsToString({skipAdd:1}),c=t.get("selectorsAdd"),u=t.get("singleAtRule");if(null===(r=t.get("selectors"))||void 0===r||r.forEach(function(t){var e=t.getFullName();(o.compCls.indexOf(e)>=0||o.ids.indexOf(e)>=0||n.keepUnusedStyles)&&(i=1)}),l&&i||c||u||!s){var p=t.getDeclaration({body:1});p&&(n.json?a=t:a+=p)}else e.push(t);return a},r.prototype.matchedRules=function(t,e){var n=this,r=t.getEl(),o=[];return e.forEach(function(t){try{t.selectorsToString().split(",").some(function(t){return null==r?void 0:r.matches(n.__cleanSelector(t))})&&o.push(t)}catch(t){}}),t.components().forEach(function(t){o=o.concat(n.matchedRules(t,e))}),o=o.filter(function(t,e){return o.indexOf(t)===e})},r.prototype.getQueryLength=function(t){var e=/(-?\d*\.?\d+)\w{0,}/.exec(t);return e?parseFloat(e[1]):Oo},r.prototype.sortMediaObject=function(e){var n=this;void 0===e&&(e={});var r=[];return(0,t.each)(e,function(t,e){return r.push({key:e,value:t})}
1),r.sort(function(t,e){var r=[t.key,e.key].every(function(t){return-1!==t.indexOf("min-width")}),o=r?t.key:e.key,i=r?e.key:t.key;return n.getQueryLength(o)-n.getQueryLength(i)})},r.prototype.sortRules=function(t,e){var n=function(t){return t.get("mediaText")||""},r=[n(t),n(e)].every(function(t){return-1!==t.indexOf("min-width")}),o=n(r?t:e),i=n(r?e:t);return this.getQueryLength(o)-this.getQueryLength(i)},r.prototype.__cleanSelector=function(t){return t.split(" ").map(function(t){return t.split(":")[0]}).join(" ")},r}(u.Hn);const ko=Ao;var Po=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),No=function(){return No=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},No.apply(this,arguments)},Mo=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},Lo=((0,e.hasWin)()?window:{}).CSS,Io=function(n){function r(t,e){void 0===e&&(e={});var r=n.call(this,t)||this;return r.config=t||{},r.opt=e,r.em=e.em,r.ensureSelectors(null,null,{}),r.on("change",r.__onChange),r}return Po(r,n),r.prototype.defaults=function(){return{selectors:[],selectorsAdd:"",style:{},mediaText:"",state:"",stylable:!0,atRuleType:"",singleAtRule:!1,important:!1,group:"",shallow:!1,_undo:!0}},r.prototype.__onChange=function(t,n){var r=this.em,o=this.changedAttributes();o&&!(0,e.isEmptyObj)(o)&&(null==r||r.changesUp(n))},r.prototype.clone=function(){var t=No({},this.opt),e=No({},this.attributes);return e.selectors=this.get("selectors").map(function(t){return t.clone()}),new this.constructor(e,t)},r.prototype.ensureSelectors=function(e,n,r){var o=this.em,i=null==o?void 0:o.get("SelectorManager"),a=[this,"change:selectors",this.ensureSelectors],s=this.getSelectors();if(this.stopListening.apply(this,a),s.models&&(s=Mo([],s.models,!0)),s=(0,t.isString)(s)?[s]:s,Array.isArray(s)){var l=s.filter(function(t){return t}).map(function(t){return i?i.add(t):t});s=new Le(l)}this.set("selectors",s,r),this.listenTo.apply(this,a)},r.prototype.getAtRule=function(){var t=this.get("atRuleType"),e=this.get("mediaText"),n=t?"@".concat(t):e?"@media":"";return n+(e&&n?" ".concat(e):"")},r.prototype.selectorsToString=function(t){void 0===t&&(t={});var e=[],n=this.get("state"),r=this.get("selectorsAdd"),o={escape:function(t){return Lo&&Lo.escape?Lo.escape(t):t}},i=this.get("selectors").getFullString(0,o),a=n&&!t.skipState?":".concat(n):"";return i&&e.push("".concat(i).concat(a)),r&&!t.skipAdd&&e.push(r),e.join(", ")},r.prototype.getDeclaration=function(t){void 0===t&&(t={});var e="",n=this.attributes.important,r=this.selectorsToString(t),o=this.styleToString(No({important:n},t)),i=this.get("singleAtRule");return(r||i)&&(o||t.allowEmpty)&&(e=i?o:"".concat(r,"{").concat(o,"}")),e},r.prototype.getDevice=function(){var t=this.em,e=this.attributes,n=e.atRuleType,r=e.mediaText,o=(null==t?void 0:t.get("DeviceManager").getDevices())||[],i=o.filter(function(t){return""===t.getWidthMedia()})[0];return"media"===n&&r?o.filter(function(t){return t.getWidthMedia()===((e=/(-?\d*\.?\d+)\w{0,}/.exec(r))?e[0]:"");var e})[0]||null:i||null},r.prototype.getState=function(){var t=this.em,e=this.get("state");return((null==t?void 0:t.get("SelectorManager").getStates())||[]).filter(function(t){return t.getName()===e})[0]||null},r.prototype.getComponent=function(){var t,e=this.getSelectors(),n=1==e.length&&e.at(0),r=n&&n.isId()&&n.get("name");return r&&(null===(t=this.em)||void 0===t?void 0:t.get("DomComponents").getById(r))||null},r.prototype.toCSS=function(t){void 0===t&&(t={});var e="",n=this.getAtRule(),r=this.getDeclaration(t);return(r||t.allowEmpty)&&(e=r),n&&e&&(e="".concat(n,"{").concat(e,"}")),e},r.prototype.toJSON=function(){for(var e,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=u.Hn.prototype.toJSON.apply(this,n);if(null===(e=this.em)||void 0===e?void 0:e.getConfig().avoidDefaults){var i=this.defaults();(0,t.forEach)(i,function(t,e){o[e]===t&&delete o[e]}),delete o.style.__p,(0,t.isEmpty)(o.selectors)&&delete o.selectors,(0,t.isEmpty)(o.style)&&delete o.style}return o},r.prototype.compare=function(e,n,r,o){var i;void 0===o&&(o={});var a=n||"",s=r||"",l=o.selectorsAdd||"",c=o.atRuleType||"";s&&!c&&(c="media");var u=((0,t.isArray)(e)||e.models?e.models||e:[e]).map(function(t){return t.getFullName()}),p=null===(i=this.get("selectors"))||void 0===i?void 0:i.map(function(t){return t.getFullName()}),d=u.slice().sort(),f=p.slice().sort();return!(u.length!==p.length||!d.every(function(t,e){return t===f[e]}))&&this.get("state")===a&&this.get("mediaText")===s&&this.get("selectorsAdd")===l&&this.get("atRuleType")===c},r}(ye);const Do=Io;var Ro=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),jo=function(t){function e(e,n){var r=t.call(this,e)||this;return r.editor=null==n?void 0:n.em,setTimeout(function(){r.on("remove",r.onRemove),r.on("add",r.onAdd)}),r}return Ro(e,t),e.prototype.toJSON=function(t){return u.FE.prototype.toJSON.call(this,t).filter(function(t){return t.style&&!t.shallow})},e.prototype.onAdd=function(t,e,n){t.ensureSelectors(t,e,n)},e.prototype.onRemove=function(t){var e=this.editor;e.stopListening(t),e.UndoManager.remove(t)},e.prototype.add=function(t,e){return void 0===e&&(e={}),"string"==typeof t&&(t=this.editor.get("Parser").parseCss(t)),e.em=this.editor,u.FE.prototype.add.apply(this,[t,e])},e}(u.FE);const Ho=jo;jo.prototype.model=Do;var Fo=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Bo=function(){return Bo=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Bo.apply(this,arguments)},Vo=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},Uo=function(n){function r(t){var e=n.call(this,t,"CssComposer",null,{},So)||this;e.Selectors=Le,e.storageKey="styles";var r=e.config,o=r.pStylePrefix;return o&&(r.stylePrefix=o+r.stylePrefix),r.rules=e.em.config.style||r.rules||"",e.rules=new Ho([],r),e}return Fo(r,n),r.prototype.onLoad=function(){this.rules.add(this.config.rules,{silent:!0})},r.prototype.postLoad=function(){var t,e=null===(t=this.em)||void 0===t?void 0:t.get("UndoManager");e&&e.add(this.getAll())},r.prototype.store=function(){return this.getProjectData()},r.prototype.load=function(t){return this.loadProjectData(t,{all:this.rules})},r.prototype.add=function(t,e,n,r,o){void 0===r&&(r={}),void 0===o&&(o={});var i=e||"",a=n||"",s=Bo({},r),l=this.get(t,i,a,s);return l&&l.config&&!l.config.singleAtRule||(s.state=i,s.mediaText=a,s.selectors=[],a&&!s.atRuleType&&(s.atRuleType="media"),(l=new Do(s,this.config)).get("selectors").add(t,o),this.rules.add(l,o)),l},r.prototype.get=function(e,n,r,o){var i=e;if((0,t.isString)(e)){var a=this.em.Selectors,s=e.split(",")[0].trim(),l=this.em.Parser.parserCss.checkNode({selectors:s})[0];i=a.get(l.selectors)}return this.rules.find(function(t){return t.compare(i,n,r,o)})||null},r.prototype.getAll=function(){return this.rules},r.prototype.addCollection=function(n,r,o){void 0===r&&(r={}),void 0===o&&(o={});var i=this.em,a=[];(0,t.isString)(n)&&(n=i.Parser.parseCss(n));for(var s=n instanceof Array?n:[n],l=0,c=s.length;l<c;l++){var u=s[l]||{};if(u.selectors){var p=null==i?void 0:i.Selectors;p||console.warn("Selector Manager not found");for(var d=u.selectors,f=d instanceof Array?d:[d],h=[],g=0,m=f.length;g<m;g++){var v=p.add(f[g]);h.push(v)}var y=this.get(h,u.state,u.mediaText,u),b=this.add(h,u.state,u.mediaText,u,r),_=!y||!r.avoidUpdateStyle,T=u.style||{};if((0,e.isObject)(o)&&b.set(o,r),_){var C=r.extend?Bo(Bo({},b.get("style")),T):T;b.set("style",C,r)}a.push(b)}}return a},r.prototype.addRules=function(t){return this.addCollection(t)},r.prototype.setRule=function(t,e,n){void 0===e&&(e={}),void 0===n&&(n={});var r=n.atRuleType,o=n.atRuleParams,i=this.em.Parser.parserCss.checkNode({selectors:t,style:e})[0],a=i.state,s=i.selectorsAdd,l=this.em.Selectors.add(i.selectors),c=this.add(l,a,o,{selectorsAdd:s,atRule:r});return n.addStyles?c.addStyle(e,n):c.setStyle(e,n),c},r.prototype.getRule=function(t,e){void 0===e&&(e={});var n=this.em,r=n.Selectors,o=n.Parser.parserCss.checkNode({selectors:t})[0],i=r.get(o.selectors),a=o.state,s=o.selectorsAdd,l=e.atRuleType,c=e.atRuleParams;return i?this.get(i,a,c,{selectorsAdd:s,atRuleType:l}):void 0},r.prototype.getRules=function(e){var n=this.getAll();if(!e)return Vo([],n.models,!0);var r={sort:!0},o=(0,t.isString)(e)?e.split(",").map(function(t){return t.trim()}):e;return n.filter(function(t){return o.indexOf(t.getSelectors().getFullString(null,r))>=0})},r.prototype.setIdRule=function(e,n,r){void 0===n&&(n={}),void 0===r&&(r={});var o=r.addOpts,i=void 0===o?{}:o,a=r.mediaText,s=r.state||"",l=(0,t.isUndefined)(a)?this.em.getCurrentMedia():a,c=this.em.Selectors.add({name:e,type:ke.TYPE_ID},i),u=this.add(c,s,l,{},i);return u.setStyle(n,Bo(Bo({},r),i)),u},r.prototype.getIdRule=function(e,n){void 0===n&&(n={});var r=n.mediaText,o=n.state||"",i=(0,t.isUndefined)(r)?this.em.getCurrentMedia():r,a=this.em.Selectors.get(e,ke.TYPE_ID);return a&&this.get(a,o,i)},r.prototype.setClassRule=function(t,e,n){void 0===e&&(e={}),void 0===n&&(n={});var r=n.state||"",o=n.mediaText||this.em.getCurrentMedia(),i=this.em.Selectors.add({name:t,type:ke.TYPE_CLASS}),a=this.add(i,r,o);return a.setStyle(e,n),a},r.prototype.getClassRule=function(t,e){void 0===e&&(e={});var n=e.state||"",r=e.mediaText||this.em.getCurrentMedia(),o=this.em.Selectors.get(t,ke.TYPE_CLASS);return o&&this.get(o,n,r)},r.prototype.remove=function(e,n){var r=(0,t.isString)(e)?this.getRules(e):e,o=this.getAll().remove(r,n);return(0,t.isArray)(o)?o:[o]},r.prototype.clear=function(t){return void 0===t&&(t={}),this.getAll().reset([],t),this},r.prototype.getComponentRules=function(e,n){void 0===n&&(n={});var r=n.state,o=n.mediaText;n.current&&(r=this.em.get("state")||"",o=this.em.getCurrentMedia());var i=e.getId();return this.getAll().filter(function(e){return!(!(0,t.isUndefined)(r)&&e.get("state")!==r)&&!(!(0,t.isUndefined)(o)&&e.get("mediaText")!==o)&&e.getSelectorsString()==="#".concat(i)})},r.prototype.render=function(){var t;return null===(t=this.rulesView)||void 0===t||t.remove(),this.rulesView=new Ht({collection:this.rules,config:this.config}),this.rulesView.render().el},r.prototype.destroy=function(){var t;this.rules.reset(),this.rules.stopListening(),null===(t=this.rulesView)||void 0===t||t.remove()},r}(b);const zo=Uo,Go={appendTo:"",blocks:[],appendOnClick:!1,custom:!1};var $o=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const qo=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return $o(n,e),n.prototype.defaults=function(){return{label:"",content:"",media:"",category:"",activate:!1,select:void 0,resetId:!1,disable:!1,onClick:void 0,attributes:{}}},n.prototype.getId=function(){return this.id},n.prototype.getLabel=function(){return this.get("label")},n.prototype.getMedia=function(){return this.get("media")},n.prototype.getContent=function(){return this.get("content")},n.prototype.getCategoryLabel=function(){var e=this.get("category");return(0,t.isFunction)(null==e?void 0:e.get)?e.get("label"):(null==e?void 0:e.label)?null==e?void 0:e.label:e},n}(u.Hn);var Wo=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ko=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Wo(e,t),e}(u.FE);const Yo=Ko;Ko.prototype.model=qo;var Xo=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const Zo=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Xo(e,t),e.prototype.defaults=function(){return{id:"",label:"",open:!0,attributes:{}}},e}(u.Hn);var Qo=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Jo=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Qo(e,t),e}(u.FE);const ti=Jo;Jo.prototype.model=Zo;var ei=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ni=function(n){function r(t,e){void 0===e&&(e={});var r=n.call(this,t)||this,o=r.model;return r.em=e.em,r.config=e,r.endDrag=r.endDrag.bind(r),r.ppfx=e.pStylePrefix||"",r.listenTo(o,"destroy remove",r.remove),r.listenTo(o,"change",r.render),r}return ei(r,n),r.prototype.events=function(){return{click:"handleClick",mousedown:"startDrag",dragstart:"handleDragStart",drag:"handleDrag",dragend:"handleDragEnd"}},r.prototype.__getModule=function(){return this.em.Blocks},r.prototype.handleClick=function(e){var n=this,r=n.config,o=n.model,i=n.em,a=o.get("onClick")||r.appendOnClick;if(i.trigger("block:click",o,e),a){if((0,t.isFunction)(a))return a(o,null==i?void 0:i.getEditor(),{event:e});
1var s,l,c=r.getSorter(),u=o.get("content"),p=i.getSelected();if(c.setDropContent(u),p)if(c.validTarget(p.getEl(),u).valid)s=p;else{var d=p.parent();d&&c.validTarget(d.getEl(),u).valid&&(s=d,l=d.components().indexOf(p)+1)}if(!s){var f=i.getWrapper();c.validTarget(f.getEl(),u).valid&&(s=f)}var h=s&&s.append(u,{at:l})[0];h&&i.setSelected(h,{scroll:1})}},r.prototype.startDrag=function(t){var n=this,r=n.config,o=n.em,i=n.model,a=i.get("disable");if(0===t.button&&r.getSorter&&!this.el.draggable&&!a){o.refreshCanvas();var s=r.getSorter();s.__currentBlock=i,s.setDragHelper(this.el,t),s.setDropContent(this.model.get("content")),s.startSort(this.el),(0,e.on)(document,"mouseup",this.endDrag)}},r.prototype.handleDragStart=function(t){this.__getModule().__startDrag(this.model,t)},r.prototype.handleDrag=function(t){this.__getModule().__drag(t)},r.prototype.handleDragEnd=function(){this.__getModule().__endDrag()},r.prototype.endDrag=function(){(0,e.off)(document,"mouseup",this.endDrag);var t=this.config.getSorter();t.moved=0,t.endMove()},r.prototype.render=function(){var t,n=this,r=n.em,o=n.el,i=n.$el,a=n.ppfx,s=n.model,l=s.get("disable"),c=s.get("attributes")||{},u=c.class||"",p="".concat(a,"block"),d=r&&r.t("blockManager.labels.".concat(s.id))||s.get("label"),f=s.get("render"),h=s.get("media"),g=l?"".concat(p,"--disable"):"".concat(a,"four-color-h");i.attr(c),o.className="".concat(u," ").concat(p," ").concat(a,"one-bg ").concat(g).trim(),o.innerHTML="\n ".concat(h?'<div class="'.concat(p,'__media">').concat(h,"</div>"):"",'\n <div class="').concat(p,'-label">').concat(d,"</div>\n "),o.title=c.title||(null===(t=o.textContent)||void 0===t?void 0:t.trim()),o.setAttribute("draggable","".concat(!(!(0,e.hasDnd)(r)||l)));var m=f&&f({el:o,model:s,className:p,prefix:a});return m&&(o.innerHTML=m),this},r}(u.G7);const ri=ni;var oi=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ii=function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t},ai=function(t){function e(e,n){var r=t.call(this,e)||this;r.config=n;var o=n.pStylePrefix||"";return r.em=n.em,r.pfx=o,r.caretR="fa fa-caret-right",r.caretD="fa fa-caret-down",r.iconClass="".concat(o,"caret-icon"),r.activeClass="".concat(o,"open"),r.className="".concat(o,"block-category"),r.listenTo(r.model,"change:open",r.updateVisibility),r.model.view=r,r}return oi(e,t),e.prototype.events=function(){return{"click [data-title]":"toggle"}},e.prototype.template=function(t){var e=t.pfx,r=t.label;return n(li||(li=ii(['\n <div class="','title" data-title>\n <i class="','caret-icon"></i>\n ','\n </div>\n <div class="','blocks-c"></div>\n '],['\n <div class="','title" data-title>\n <i class="','caret-icon"></i>\n ','\n </div>\n <div class="','blocks-c"></div>\n '])),e,e,r,e)},e.prototype.attributes=function(){return this.model.get("attributes")||{}},e.prototype.updateVisibility=function(){this.model.get("open")?this.open():this.close()},e.prototype.open=function(){this.$el.addClass(this.activeClass),this.getIconEl().className="".concat(this.iconClass," ").concat(this.caretD),this.getBlocksEl().style.display=""},e.prototype.close=function(){this.$el.removeClass(this.activeClass),this.getIconEl().className="".concat(this.iconClass," ").concat(this.caretR),this.getBlocksEl().style.display="none"},e.prototype.toggle=function(){var t=this.model;t.set("open",!t.get("open"))},e.prototype.getIconEl=function(){return this.iconEl||(this.iconEl=this.el.querySelector(".".concat(this.iconClass))),this.iconEl},e.prototype.getBlocksEl=function(){return this.blocksEl||(this.blocksEl=this.el.querySelector(".".concat(this.pfx,"blocks-c"))),this.blocksEl},e.prototype.append=function(t){this.getBlocksEl().appendChild(t)},e.prototype.render=function(){var t=this,e=t.em,n=t.el,r=t.$el,o=t.model,i=t.pfx,a=e.t("blockManager.categories.".concat(o.id))||o.get("label");return n.innerHTML=this.template({pfx:i,label:a}),r.addClass(this.className),r.css({order:o.get("order")}),this.updateVisibility(),this},e}(u.G7);const si=ai;var li,ci=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ui=function(){return ui=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},ui.apply(this,arguments)},pi=function(e){function n(n,r){var o=e.call(this,n)||this;(0,t.bindAll)(o,"getSorter","onDrag","onDrop","onMove"),o.config=r||{},o.categories=n.categories||"",o.renderedCategories={};var i=o.config.pStylePrefix||"";o.ppfx=i,o.noCatClass="".concat(i,"blocks-no-cat"),o.blockContClass="".concat(i,"blocks-c"),o.catsClass="".concat(i,"block-categories");var a=o.collection;return o.listenTo(a,"add",o.addTo),o.listenTo(a,"reset",o.render),o.em=o.config.em,o.em&&(o.config.getSorter=o.getSorter),o}return ci(n,e),n.prototype.__getModule=function(){return this.em.Blocks},n.prototype.updateConfig=function(t){void 0===t&&(t={}),this.config=ui(ui({},this.config),t)},n.prototype.getSorter=function(){var t=this.em;if(t){if(!this.sorter){var e=t.Utils,n=t.Canvas;this.sorter=new e.Sorter({container:n.getBody(),placer:n.getPlacerEl(),containerSel:"*",itemSel:"*",pfx:this.ppfx,onStart:this.onDrag,onEndMove:this.onDrop,onMove:this.onMove,document:n.getFrameEl().contentDocument,direction:"a",wmargin:1,nested:1,em:t,canvasRelative:1})}return this.sorter}},n.prototype.onDrag=function(t){this.em.stopDefault(),this.__getModule().__startDrag(this.sorter.__currentBlock,t)},n.prototype.onMove=function(t){this.__getModule().__drag(t),this.em.trigger("block:drag:move",t)},n.prototype.onDrop=function(t){this.em.runDefault(),this.__getModule().__endDrag({component:t}),delete this.sorter.__currentBlock},n.prototype.addTo=function(t){this.add(t)},n.prototype.add=function(e,n){var r=this.config,o=new ri({model:e,attributes:e.get("attributes")}
1,r).render().el,i=e.get("category");if(i&&this.categories&&!r.ignoreCategories){(0,t.isString)(i)?i={id:i,label:i}:(0,t.isObject)(i)&&!i.id&&(i.id=i.label);var a=this.categories.add(i),s=a.get("id"),l=this.getCategoriesEl(),c=this.renderedCategories[s];return e.set("category",a,{silent:!0}),!c&&l&&(c=new si({model:a},r).render(),this.renderedCategories[s]=c,l.appendChild(c.el)),void(c&&c.append(o))}n?n.appendChild(o):this.append(o)},n.prototype.getCategoriesEl=function(){return this.catsEl||(this.catsEl=this.el.querySelector(".".concat(this.catsClass))),this.catsEl},n.prototype.getBlocksEl=function(){return this.blocksEl||(this.blocksEl=this.el.querySelector(".".concat(this.noCatClass," .").concat(this.blockContClass))),this.blocksEl},n.prototype.append=function(t){var e=this.getBlocksEl();e&&e.appendChild(t)},n.prototype.render=function(){var t=this,e=this.ppfx,n=document.createDocumentFragment();delete this.catsEl,delete this.blocksEl,this.renderedCategories={},this.el.innerHTML='\n <div class="'.concat(this.catsClass,'"></div>\n <div class="').concat(this.noCatClass,'">\n <div class="').concat(this.blockContClass,'"></div>\n </div>\n '),this.collection.each(function(e){return t.add(e,n)}),this.append(n);var r="".concat(this.blockContClass,"s ").concat(e,"one-bg ").concat(e,"two-color");return this.$el.addClass(r),this.rendered=!0,this},n}(u.G7);const di=pi;var fi=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),hi=function(){return hi=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},hi.apply(this,arguments)},gi="block",mi="".concat(gi,":"),vi="".concat(mi,"add"),yi="".concat(mi,"update"),bi="".concat(mi,"remove"),_i="".concat(bi,":before"),Ti="".concat(mi,"drag"),Ci={all:gi,update:yi,add:vi,remove:bi,removeBefore:_i,drag:Ti,dragStart:"".concat(Ti,":start"),dragEnd:"".concat(Ti,":stop"),custom:"".concat(mi,"custom")},wi=function(e){function n(n){var r,o=this;return(o=e.call(this,n,"BlockManager",new Yo((null===(r=n.config.blockManager)||void 0===r?void 0:r.blocks)||[]),Ci,Go)||this).Block=qo,o.Blocks=Yo,o.Category=Zo,o.Categories=ti,o.storageKey="",o.blocks=o.all,o.blocksVisible=new Yo(o.blocks.models),o.categories=new ti,o.blocks.on("add",function(t){return o.blocksVisible.add(t)}),o.blocks.on("remove",function(t){return o.blocksVisible.remove(t)}),o.blocks.on("reset",function(t){return o.blocksVisible.reset(t.models)}),o.__onAllEvent=(0,t.debounce)(function(){return o.__trgCustom()},0),o}return fi(n,e),n.prototype.__trgCustom=function(){this.em.trigger(this.events.custom,this.__customData())},n.prototype.__customData=function(){var t=this,e=this.__getBehaviour();return{bm:this,blocks:this.getAll().models,container:e.container,dragStart:function(e,n){return t.startDrag(e,n)},drag:function(e){return t.__drag(e)},dragStop:function(e){return t.endDrag(e)}}},n.prototype.__startDrag=function(t,e){var n=this,r=n.em,o=n.events,i=n.blocks,a=t.getContent?t.getContent():t;this._dragBlock=t,r.set({dragResult:null,dragContent:a}),[r,i].map(function(n){return n.trigger(o.dragStart,t,e)})},n.prototype.__drag=function(t){var e=this,n=e.em,r=e.events,o=e.blocks,i=this._dragBlock;[n,o].map(function(e){return e.trigger(r.drag,i,t)})},n.prototype.__endDrag=function(e){void 0===e&&(e={});var n=this,r=n.em,o=n.events,i=n.blocks,a=this._dragBlock,s=e.component||r.get("dragResult");if(delete this._dragBlock,s&&a){var l="activeOnRender",c=s.get&&s.get(l),u=a.get("activate")||c,p=a.get("select"),d=(0,t.isArray)(s)?s[0]:s;(p||u&&!1!==p)&&r.setSelected(d),u&&(d.trigger("active"),c&&d.unset(l)),a.get("resetId")&&d.onAll(function(t){return t.resetId()})}r.set({dragResult:null,dragContent:null}),a&&[r,i].map(function(t){return t.trigger(o.dragEnd,s,a)})},n.prototype.__getFrameViews=function(){return this.em.get("Canvas").getFrames().map(function(t){return t.view})},n.prototype.__behaviour=function(t){return void 0===t&&(t={}),this._bhv=hi(hi({},this._bhv||{}),t)},n.prototype.__getBehaviour=function(){return this._bhv||{}},n.prototype.startDrag=function(t,e){this.__startDrag(t,e),this.__getFrameViews().forEac
1h(function(t){return t.droppable.startCustom()})},n.prototype.endDrag=function(t){this.__getFrameViews().forEach(function(e){return e.droppable.endCustom(t)}),this.__endDrag()},n.prototype.postRender=function(){var t=this,e=t.categories,n=t.config,r=t.em,o=this.blocksVisible;this.blocksView=new di({collection:o,categories:e},hi(hi({},n),{em:r})),this.__appendTo(o.models),this.__trgCustom()},n.prototype.add=function(t,e,n){void 0===n&&(n={});var r=e||{};return r.id=t,this.blocks.add(r,n)},n.prototype.get=function(t){return this.blocks.get(t)},n.prototype.getAll=function(){return this.blocks},n.prototype.getAllVisible=function(){return this.blocksVisible},n.prototype.remove=function(t,e){return void 0===e&&(e={}),this.__remove(t,e)},n.prototype.getCategories=function(){return this.categories},n.prototype.getContainer=function(){var t;return null===(t=this.blocksView)||void 0===t?void 0:t.el},n.prototype.render=function(t,e){void 0===e&&(e={});var n=this,r=n.categories,o=n.config,i=n.em,a=t||this.getAll().models;if(e.external){var s=new Yo(a);return new di({collection:s,categories:r},hi(hi({em:i},o),e)).render().el}return this.blocksView&&(this.blocksView.updateConfig(e),this.blocksView.collection.reset(a),this.blocksView.rendered||(this.blocksView.render(),this.blocksView.rendered=!0)),this.getContainer()},n.prototype.destroy=function(){var t,e=[this.blocks,this.blocksVisible,this.categories];e.map(function(t){return t.stopListening()}),e.map(function(t){return t.reset()}),null===(t=this.blocksView)||void 0===t||t.remove()},n}(b);const Ei=wi,Si={stylePrefix:"clm-",appendTo:"",selectors:[],states:[{name:"hover"},{name:"active"},{name:"nth-of-type(2n)"}],iconAdd:'<svg viewBox="0 0 24 24"><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path></svg>',iconSync:'<svg viewBox="0 0 24 24"><path d="M12 18c-3.31 0-6-2.69-6-6 0-1 .25-1.97.7-2.8L5.24 7.74A7.93 7.93 0 0 0 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4m0-11V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1-.25 1.97-.7 2.8l1.46 1.46A7.93 7.93 0 0 0 20 12c0-4.42-3.58-8-8-8z"></path></svg>',iconTagOn:'<svg viewBox="0 0 24 24"><path d="M19 19H5V5h10V3H5c-1.11 0-2 .89-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8h-2m-11.09-.92L6.5 11.5 11 16 21 6l-1.41-1.42L11 13.17l-3.09-3.09z"></path></svg>',iconTagOff:'<svg viewBox="0 0 24 24"><path d="M19 3H5c-1.11 0-2 .89-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5a2 2 0 0 0-2-2m0 2v14H5V5h14z"></path></svg>',iconTagRemove:'<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"></path></svg>',componentFirst:!1,custom:!1};var xi=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Oi=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return xi(e,t),e.prototype.defaults=function(){return{name:"",label:""}},e.prototype.getName=function(){return this.get("name")},e.prototype.getLabel=function(){return this.get("label")||this.getName()},e}(u.Hn);const Ai=Oi;Oi.prototype.idAttribute="name";var ki=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Pi=function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t},Ni="contentEditable",Mi=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,e)||this,r=e.config||{};return n.config=r,n.module=e.module,n.coll=e.coll||null,n.pfx=r.stylePrefix||"",n.ppfx=r.pStylePrefix||"",n.em=r.em,n.listenTo(n.model,"change:active",n.updateStatus),n}return ki(e,t),e.prototype.template=function(){var t=this,e=t.pfx,r=t.model,o=t.config,i=r.get("label")||"";
1return n(Ii||(Ii=Pi(['\n <span id="','checkbox" class="','tag-status" data-tag-status></span>\n <span id="','tag-label" data-tag-name>','</span>\n <span id="','close" class="','tag-close" data-tag-remove> $'," </span>\n "],['\n <span id="','checkbox" class="','tag-status" data-tag-status></span>\n <span id="','tag-label" data-tag-name>','</span>\n <span id="','close" class="','tag-close" data-tag-remove> $'," </span>\n "])),e,e,e,i,e,e,o.iconTagRemove)},e.prototype.events=function(){return{"click [data-tag-remove]":"removeTag","click [data-tag-status]":"changeStatus","dblclick [data-tag-name]":"startEditTag","focusout [data-tag-name]":"endEditTag"}},e.prototype.getInputEl=function(){return this.inputEl||(this.inputEl=this.el.querySelector("[data-tag-name]")),this.inputEl},e.prototype.startEditTag=function(){var t=this.em,e=this.getInputEl();e[Ni]="true",e.focus(),null==t||t.setEditing(!0)},e.prototype.endEditTag=function(){var t=this.model,e=this.em,n=this.getInputEl(),r=n.textContent||"",o=null==e?void 0:e.Selectors;n[Ni]="false",null==e||e.setEditing(!1),o&&o.rename(t,r)!==t&&(n.innerText=t.get("label"))},e.prototype.changeStatus=function(){var t=this.model;t.set("active",!t.get("active"))},e.prototype.removeTag=function(){this.module.removeSelected(this.model)},e.prototype.updateStatus=function(){var t=this,e=t.model,n=t.$el,r=t.config,o=r.iconTagOn,i=r.iconTagOff,a=n.find("[data-tag-status]");e.get("active")?(a.html(o),n.removeClass("opac50")):(a.html(i),n.addClass("opac50"))},e.prototype.render=function(){var t=this.pfx,e=this.ppfx;return this.$el.html(this.template()),this.$el.attr("class","".concat(t,"tag ").concat(e,"three-bg")),this.updateStatus(),this},e}(u.G7);const Li=Mi;var Ii,Di=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ri=function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t},ji=function(e){function r(n){void 0===n&&(n={});var r=e.call(this,n)||this;r.config=n.config||{},r.pfx=r.config.stylePrefix||"",r.ppfx=r.config.pStylePrefix||"",r.className=r.pfx+"tags",r.stateInputId=r.pfx+"states",r.stateInputC=r.pfx+"input-c",r.states=r.config.states||[];var o=r.config.em,i=r.collection;r.target=o;var a=o.Selectors;return r.module=a,r.em=o,r.componentChanged=(0,t.debounce)(r.componentChanged.bind(r),
10),r.checkSync=(0,t.debounce)(r.checkSync.bind(r),0),r.listenTo(o,"component:toggled component:update:classes",r.componentChanged),r.listenTo(o,"styleManager:update",r.componentChanged),r.listenTo(o,"component:update:classes change:state",r.__handleStateChange),r.listenTo(o,"styleable:change change:device",r.checkSync),r.listenTo(i,"add",r.addNew),r.listenTo(i,"reset",r.renderClasses),r.listenTo(i,"remove",r.tagRemoved),r.listenTo(a.getAll(),a.events.state,(0,t.debounce)(function(){return r.renderStates()},0)),r.delegateEvents(),r}return Di(r,e),r.prototype.template=function(t){var e=t.labelInfo,r=t.labelHead,o=t.iconSync,i=t.iconAdd,a=t.pfx,s=t.ppfx;return n(Fi||(Fi=Ri([' <div id="','up" class="','header">\n <div id="','label" class="','header-label">','</div>\n <div id="','status-c" class="','header-status">\n <span id="','input-c" data-states-c>\n <div class="',"field ",'select">\n <span id="','input-holder">\n <select id="','states" data-states></select>\n </span>\n <div class="','sel-arrow">\n <div class="','d-s-arrow"></div>\n </div>\n </div>\n </span>\n </div>\n </div>\n <div id="','tags-field" class="','field">\n <div id="','tags-c" data-selectors></div>\n <input id="','new" data-input />\n <span id="','add-tag" class="',"tags-btn ",'tags-btn__add" data-add> $',' </span>\n <span class="',"tags-btn ",'tags-btn__sync" style="display: none" data-sync-style> $',' </span>\n </div>\n <div class="','sels-info">\n <div class="','label-sel">',':</div>\n <div class="','sels" data-selected></div>\n </div>'],[' <div id="','up" class="','header">\n <div id="','label" class="','header-label">','</div>\n <div id="','status-c" class="','header-status">\n <span id="','input-c" data-states-c>\n <div class="',"field ",'select">\n <span id="','input-holder">\n <select id="','states" data-states></select>\n </span>\n <div class="','sel-arrow">\n <div class="','d-s-arrow"></div>\n </div>\n </div>\n </span>\n </div>\n </div>\n <div id="','tags-field" class="','field">\n <div id="','tags-c" data-selectors></div>\n <input id="','new" data-input />\n <span id="','add-tag" class="',"tags-btn ",'tags-btn__add" data-add> $',' </span>\n <span class="',"tags-btn ",'tags-btn__sync" style="display: none" data-sync-style> $',' </span>\n </div>\n <div class="','sels-info">\n <div class="','label-sel">',':</div>\n <div class="','sels" data-selected></div>\n </div>'])),a,a,a,a,r,a,a,a,s,s,s,a,s,s,a,s,a,a,a,a,a,i,a,a,o,a,a,e,a)},r.prototype.events=function(){return{"change [data-states]":"stateChanged","click [data-add]":"startNewTag","focusout [data-input]":"endNewTag","keyup [data-input]":"onInputKeyUp","click [data-sync-style]":"syncStyle"}},r.prototype.syncStyle=function(){var t,e=this.em,n=this.getTarget(),r=e.Css,o=this.getCommonSelectors({opts:{noDisabled:1}}),i=e.get("state"),a=e.getCurrentMedia(),s=[],l=r.get(o,i,a)||r.add(o,i,a);this.getTargets().forEach(function(e){var n=r.getIdRule(e.getId(),{state:i,mediaText:a});t=n.getStyle(),n.setStyle({}),s.push(n)}),t&&l.addStyle(t),e.trigger("component:toggled"),e.trigger("component:sync-style",{component:n,selectors:o,mediaText:a,rule:l,ruleComponents:s,state:i})},r.prototype.tagRemoved=function(t){this.updateStateVis()},r.prototype.addNew=function(t){this.addToClasses(t)},r.prototype.startNewTag=function(){var t,e;null===(t=this.$addBtn)||void 0===t||t.css({display:"none"}),null===(e=this.$input)||void 0===e||e.show().focus()},r.prototype.endNewTag=function(){var t,e;null===(t=this.$addBtn)||void 0===t||t.css({display:""}),null===(e=this.$input)||void 0===e||e.hide().val("")},r.prototype.onInputKeyUp=function(t){var e;13===t.keyCode?(t.preventDefault(),this.addNewTag(null===(e=this.$input)||void 0===e?void 0:e.val())):27===t.keyCode&&this.endNewTag()},r.prototype.checkStates=function(){var t=this.em.getState(),e=this.getStates();e&&e.val(t)},r.prototype.componentChanged=function(t){var e=(void 0===t?{}:t).targets;this.updateSelection(e)},r.prototype.updateSelection=function(e){var n=e||this.getTargets(),r=[];return(n=(0,t.isArray)(n)?n:[n])&&n.length&&(r=this.getCommonSelectors({targets:n}),this.checkSync({validSelectors:r})),this.collection.reset(r),this.updateStateVis(n),this.module.__trgCustom(),r},r.prototype.getCommonSelectors=function(t){var e=void 0===t?{}:t,n=e.targets,r=e.opts,o=void 0===r?{}:r,i=n||this.getTargets();return this.module.__getCommonSelectors(i,o)},r.prototype._commonSelectors=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=this.module).__common.apply(t,e)},r.prototype.checkSync=function(){var e,n=this,r=n.$btnSyncEl,o=n.config,i=n.collection,a=this.getTarget();if(a&&o.componentFirst&&i.length){var s=a.getStyle();e=!(0,t.isEmpty)(s)}r&&r[e?"show":"hide"]()},r.prototype.getTarget=function(){return this.target.getSelected()},r.prototype.getTargets=function(){return this.target.getSelectedAll()},r.prototype.updateStateVis=function(t){var e=this.em,n=e&&e.getConfig().avoidInlineStyle,r=this.collection.length||n?"":"none";
1this.getStatesC().css("display",r),this.updateSelector(t)},r.prototype.__handleStateChange=function(){this.updateSelector(this.getTargets())},r.prototype.updateSelector=function(e){var n=this,r=this.el.querySelector("[data-selected]"),o=[],i=e||this.getTargets();(i=(0,t.isArray)(i)?i:[i]).forEach(function(t){return o.push(n.__getName(t))}),r&&(r.innerHTML=o.join(", ")),this.checkStates()},r.prototype.__getName=function(e){var r,o=this,i=o.pfx,a=o.config,s=o.em,l=a.selectedName,c=a.componentFirst;if((0,t.isString)(e))r=n(Bi||(Bi=Ri(['<span class="','sel-gen">',"</span>"],['<span class="','sel-gen">',"</span>"])),i,e);else{var u=null==e?void 0:e.getSelectors();if(!u)return"";var p=u.getStyleable(),d=s.get("state"),f=e.getId?n(Vi||(Vi=Ri(['<span class="','sel-cmp">','</span>\n <span class="','sel-id">#',"</span>"],['<span class="','sel-cmp">','</span>\n <span class="','sel-id">#',"</span>"])),i,e.getName(),i,e.getId()):"";r=(r=this.collection.getFullString(p))?n(Ui||(Ui=Ri(['<span class="','sel-rule">',"</span>"],['<span class="','sel-rule">',"</span>"])),i,r):e.get("selectorsAdd")||f,r=c&&f?f:r,r+=d?n(zi||(zi=Ri(['<span class="','sel-state">:',"</span>"],['<span class="','sel-state">:',"</span>"])),i,d):"",r=l?l({result:r,state:d,target:e}):r}return r&&'<span class="'.concat(i,'sel">').concat(r,"</span>")},r.prototype.stateChanged=function(t){var e=this.em,n=t.target.value;e.set("state",n)},r.prototype.addNewTag=function(t){var e=t.trim();e&&(this.module.addSelected({label:e}),this.endNewTag())},r.prototype.addToClasses=function(t,e){var n=e,r=this.getClasses(),o=new Li({model:t,config:this.config,coll:this.collection,module:this.module}).render().el;return n?n.appendChild(o):r.append(o),o},r.prototype.renderClasses=function(){var t=this,e=document.createDocumentFragment(),n=this.getClasses();n.empty(),this.collection.each(function(n){return t.addToClasses(n,e)}),n.append(e)},r.prototype.getClasses=function(){return this.$el.find("[data-selectors]")},r.prototype.getStates=function(){if(!this.$states){var t=this.$el.find("[data-states]");this.$states=t[0]&&t}return this.$states},r.prototype.getStatesC=function(){return this.$statesC||(this.$statesC=this.$el.find("#"+this.stateInputC)),this.$statesC},r.prototype.renderStates=function(){var t=this.module,e=this.em,n=e.t("selectorManager.emptyState"),r=t.getStates().map(function(t){var n=e.t("selectorManager.states.".concat(t.id))||t.getLabel()||t.id;return'<option value="'.concat(t.id,'">').concat(n,"</option>")}).join(""),o=this.getStates();o&&o.html('<option value="">'.concat(n,"</option>").concat(r)),this.checkStates()},r.prototype.render=function(){var t=this,e=t.em,n=t.pfx,r=t.ppfx,o=t.config,i=t.$el,a=t.el,s=o.render,l={iconSync:o.iconSync,iconAdd:o.iconAdd,labelHead:e.t("selectorManager.label"),labelInfo:e.t("selectorManager.selected"),ppfx:r,pfx:n,el:a};i.html(this.template(l));var c=s&&s(l);return c&&c!==a&&i.empty().append(c),this.$input=i.find("[data-input]"),this.$addBtn=i.find("[data-add]"),this.$classes=i.find("#"+n+"tags-c"),this.$btnSyncEl=i.find("[data-sync-style]"),this.$input.hide(),this.renderStates(),this.renderClasses(),i.attr("class","".concat(this.className," ").concat(r,"one-bg ").concat(r,"two-color")),this},r}(u.G7);const Hi=ji;var Fi,Bi,Vi,Ui,zi,Gi=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),$i=function(){return $i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},$i.apply(this,arguments)},qi=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},Wi=function(e){return(0,t.isString)(e)&&"#"==e[0]},Ki=function(e){return(0,t.isString)(e)&&"."==e[0]},Yi="selector",Xi="".concat(Yi,":"),Zi="".concat(Xi,"add"),Qi="".concat(Xi,"update"),Ji="".concat(Xi,"remove"),ta="".concat(Ji,":before"),ea="".concat(Xi,"custom"),na="".concat(Xi,"state"),ra={all:Yi,update:Qi,add:Zi,remove:Ji,removeBefore:ta,state:na,custom:ea},oa=function(n){function r(e){var r=n.call(this,e,"SelectorManager",new Le([]),ra,Si,{skipListen:!0})||this;r.Selector=ke,r.Selectors=Le,r.storageKey="",(0,t.bindAll)(r,"__updateSelectedByComponents");var o=r.config,i=o.pStylePrefix;return i&&(o.stylePrefix=i+o.stylePrefix),r.all=new Le(o.selectors),r.selected=new Le([],{em:e,config:o}),r.states=new u.FE(o.states.map(function(t){return new Ai(t)}),{model:Ai}),r.model=new u.Hn({cFirst:o.componentFirst,_undo:!0}),r.__update=(0,t.debounce)(function(){return r.__trgCustom()},0),r.__initListen({collections:[r.states,r.selected],propagate:[{entity:r.states,event:r.events.state}]}),e.on("change:state",function(t,n){return e.trigger(na,n)}),r.model.on("change:cFirst",function(t,n){return e.trigger("selector:type",n)}),e.on("component:toggled component:update:classes",r.__updateSelectedByComponents),r.model.listenTo(e,"component:toggled component:update:classes change:device styleManager:update selector:state selector:type style:target",function(){return r.__update()}),r}return Gi(r,n),r.prototype.__trgCustom=function(t){this.em.trigger(this.events.custom,this.__customData(t))},r.prototype.getAll=function(t){return void 0===t&&(t={}),this.all?t.array?qi([],this.all.models,!0):this.all:[]},r.prototype.__customData=function(t){return void 0===t&&(t={}),this.__ctn=this.__ctn||t.container,{states:this.getStates(),selected:this.getSelected(),container:this.__ctn}},r.prototype.postRender=function(){this.__appendTo(),this.__trgCustom()},r.prototype.select=function(t,n){void 0===n&&(n={});var r=Array.isArray(t)?t:[t],o=this.em.Styles.select(r,n);this.selected.reset(this.__getCommonSelectors(o));var i=this.selectorTags,a=o.filter(function(t){return t}).map(function(t){return(0,e.isComponent)(t)||(0,e.isRule)(t)&&!t.get("selectorsAdd")?t:t.getSelectorsString()});
1return i&&i.componentChanged({targets:a}),this},r.prototype.addSelector=function(e,n,r){void 0===n&&(n={}),void 0===r&&(r={});var o=$i({},n);(0,t.isObject)(e)?o=e:o.name=e,Wi(o.name)?(o.name=o.name.substr(1),o.type=ke.TYPE_ID):Ki(o.name)&&(o.name=o.name.substr(1)),o.label&&!o.name&&(o.name=this.escapeName(o.label));var i=o.name,a=this.getConfig(),s=this.all,l=this.em,c=i?this.get(i,o.type):s.where(o)[0];if(!c){var u=o instanceof ke?o:new ke(o,$i($i({},r),{config:a,em:l}));return s.add(u,r)}return c},r.prototype.getSelector=function(t,e){return void 0===e&&(e=ke.TYPE_CLASS),Wi(t)?(t=t.substr(1),e=ke.TYPE_ID):Ki(t)&&(t=t.substr(1)),this.all.where({name:t,type:e})[0]},r.prototype.add=function(e,n){var r=this;void 0===n&&(n={});var o=(0,t.isString)(e)?{}:n;return(0,t.isArray)(e)?e.map(function(t){return r.addSelector(t,n,o)}):this.addSelector(e,n,o)},r.prototype.addClass=function(e){var n=this,r=[];return(0,t.isString)(e)&&(e=e.trim().split(" ")),e.forEach(function(t){return r.push(n.addSelector(t))}),r},r.prototype.get=function(e,n){var r=this;if((0,t.isArray)(e)){var o=[];return e.map(function(t){return r.getSelector(t)}).filter(Boolean).forEach(function(t){return o.indexOf(t)<0&&o.push(t)}),o}return this.getSelector(e,n)},r.prototype.remove=function(t,e){return this.__remove(t,e)},r.prototype.rename=function(t,e,n){var r=this.escapeName(e);return this.get(r)||t.set({name:r,label:e},n)},r.prototype.setState=function(t){return this.em.setState(t),this},r.prototype.getState=function(){return this.em.getState()},r.prototype.getStates=function(){return qi([],this.states.models,!0)},r.prototype.setStates=function(t,e){return this.states.reset(t.map(function(t){return new Ai(t)}),e)},r.prototype.getSelected=function(){return this.__getCommon()},r.prototype.getSelectedAll=function(){return qi([],this.selected.models,!0)},r.prototype.addSelected=function(t){var e=this.add(t);this.em.getSelectedAll().forEach(function(t){t.getSelectors().add(e)})},r.prototype.removeSelected=function(t){this.em.getSelectedAll().forEach(function(e){!t.get("protected")&&e&&e.getSelectors().remove(t)})},r.prototype.duplicateSelected=function(t,e){var n=this;void 0===e&&(e={});var r=this.em,o=this.getSelected();if(!(o.indexOf(t)<0)){var i=this.getState(),a=r.getCurrentMedia(),s=r.Css.get(o,i,a),l=null==s?void 0:s.getStyle();r.getSelectedAll().forEach(function(r){var o=r.getSelectors();if(o.includes(t)){var i=e.suffix||" copy",a=t.getLabel(),s=n.addSelector("".concat(a).concat(i)),l=o.indexOf(t);o.remove(t),o.add(s,{at:l})}}),l&&r.Css.add(this.getSelected(),i,a).setStyle(l)}},r.prototype.getSelectedTargets=function(){return this.em.Styles.getSelectedAll()},r.prototype.setComponentFirst=function(t){this.getConfig().componentFirst=t,this.model.set({cFirst:t})},r.prototype.getComponentFirst=function(){return this.getConfig().componentFirst},r.prototype.escapeName=function(t){var e=this.getConfig().escapeName;return e?e(t):ke.escapeName(t)},r.prototype.render=function(t){var e=this.selectorTags,n=this.getConfig(),r=null==e?void 0:e.el;return this.selected.reset(t),this.selectorTags=new Hi({el:r,collection:this.selected,module:this,config:n}),this.selectorTags.render().el},r.prototype.destroy=function(){var t=this.selectorTags;this.model.stopListening(),this.__update.cancel(),this.__destroy(),null==t||t.remove(),this.selectorTags=void 0},r.prototype.__getCommon=function(){return this.__getCommonSelectors(this.em.getSelectedAll())},r.prototype.__getCommonSelectors=function(t,e){void 0===e&&(e={});var n=t.map(function(t){return t.getSelectors&&t.getSelectors().getValid(e)}).filter(Boolean);return this.__common.apply(this,n)},r.prototype.__common=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return e.length?1===e.length?e[0]:2===e.length?e[0].filter(function(t){return e[1].indexOf(t)>=0}):e.slice(1).reduce(function(e,n){return t.__common(e,n)},e[0]):[]},r.prototype.__updateSelectedByComponents=function(){this.selected.reset(this.__getCommon())},r}(b);const ia=oa,aa={textTags:["br","b","i","u","a","ul","ol"],parserCss:void 0,parserHtml:void 0,optionsHtml:{htmlType:"text/html",allowScripts:!1,allowUnsafeAttr:!1,keepEmptyTextNodes:!1}};var sa={4:"media",5:"font-face",6:"page",7:"keyframes",11:"counter-style",12:"supports",13:"document",14:"font-feature-values",15:"viewport"},la=(0,t.keys)(sa),ca=["5","6","11","15"],ua=["font-face","page","counter-style","viewport"],pa=function(t){void 0===t&&(t="");for(var e=[],n=[],r=t.split(","),o=0,i=r.length;o<i;o++){var a=r[o].trim();if(/^(\.{1}[\w\-]+)+(:{1,2}[\w\-()]+)?$/gi.test(a)||/^(#{1}[\w\-]+){1}(:{1,2}
1[\w\-()]+)?$/gi.test(a)){var s=a.split(".").filter(Boolean);n.push(s)}else e.push(a)}return{result:n,add:e}},da=function(t){for(var e=t.style,n={},r=0,o=e.length;r<o;r++){var i=e[r],a=e.getPropertyValue(i),s=e.getPropertyPriority(i);n[i]="".concat(a).concat(s?" !".concat(s):"")}return n},fa=function(t){return(t.conditionText||t.media&&t.media.mediaText||t.name||t.selectorText||"").trim()},ha=function(t,e,n){void 0===e&&(e={}),void 0===n&&(n={});var r={},o=t.length,i=t[o-1],a=i?i.split(/:(.+)/):[],s=a[1],l=n.atRule,c=n.selectorsAdd,u=n.mediaText;return ua.indexOf(l)>=0&&(r.singleAtRule=!0),l&&(r.atRuleType=l),c&&(r.selectorsAdd=c),u&&(r.mediaText=u),s&&(t[o-1]=a[0],r.state=s,a.splice(a.length-1,1)),r.selectors=t,r.style=e,r},ga=function(t){for(var e=[],n=t.cssRules||[],r=0,o=n.length;r<o;r++){var i=n[r],a=i.type.toString(),s=!1,l="",c="",u=i.selectorText||i.keyText,p=ca.indexOf(a)>=0;if(p)s=!0,l=sa[a],c=fa(i);else if(la.indexOf(a)>=0){var d=ga(i);c=fa(i);for(var f=0,h=d.length;f<h;f++){var g=d[f];c&&(g.mediaText=c),g.atRuleType=sa[a]}e=e.concat(d)}if(u||p){for(var m=da(i),v=pa(u),y=v.add,b=v.result,_=void 0,T=0,C=b.length;T<C;T++){var w=ha(b[T],m,{atRule:sa[a]});e.push(w),_=w}if(y.length){var E=y.join(", ");_?_.selectorsAdd=E:(w={selectors:[],selectorsAdd:E,style:m},s&&(w.singleAtRule=s),l&&(w.atRuleType=l),c&&(w.mediaText=c),e.push(w))}}}return e};const ma=function(e,n){return void 0===n&&(n={}),{parse:function(t){var r=this,o=[],i=n.parserCss,a=null==e?void 0:e.Editor,s=i?i(t,a):function(t){var e=document.createElement("style");e.innerHTML=t,document.head.appendChild(e);var n=e.sheet;return document.head.removeChild(e),ga(n)}(t);return s.forEach(function(t){return o=o.concat(r.checkNode(t))}),null==e||e.trigger("parse:css",{input:t,output:o}),o},checkNode:function(e){var n=e.selectors,r=e.style,o=[e];if((0,t.isString)(n)){var i=[],a=e,s=pa(n),l=s.result,c=s.add.join(", "),u={atRule:a.atRule,mediaText:a.params};l.length?l.forEach(function(t){i.push(ha(t,r,u))}):i.push(ha([],r,u)),c&&(i[i.length-1].selectorsAdd=c),o=i}return o}}};var va=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ya=function(t){function e(e){var n=t.call(this,e,"Parser",aa)||this,r=n.config;return n.parserCss=ma(e,r),n.parserHtml=he(e,r),n}return va(e,t),e.prototype.parseHtml=function(t,e){void 0===e&&(e={});var n=this.em,r=this.parserHtml;return r.compTypes=n.Components.getTypes()||{},r.parse(t,this.parserCss,e)},e.prototype.parseCss=function(t){return this.parserCss.parse(t)},e.prototype.destroy=function(){},e}(y);const ba=ya,_a={id:"gjs-",type:"local",autosave:!0,autoload:!0,stepsBeforeSave:1,recovery:!1,onStore:function(t){return t},onLoad:function(t){return t},options:{local:{key:"gjsProject",checkLocal:!0},remote:{headers:{},urlStore:"",urlLoad:"",contentTypeJson:!0,fetchOptions:"",credentials:"include",onStore:function(t){return t},onLoad:function(t){return t}}}};var Ta=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,s)}l((r=r.apply(t,e||[])).next())})},Ca=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}};const wa=function(){function t(){}return t.prototype.store=function(t,e){return void 0===e&&(e={}),Ta(this,void 0,void 0,function(){return Ca(this,function(n){return this.hasLocal(e,!0)&&localStorage.setItem(e.key,JSON.stringify(t)),[2,t]})})},t.prototype.load=function(t){return void 0===t&&(t={}),Ta(this,void 0,void 0,function(){var e;return Ca(this,function(n){return e={},this.hasLocal(t,!0)&&(e=JSON.parse(localStorage.getItem(t.key)||"{}")),[2,e]})})},t.prototype.hasLocal=function(t,n){if(void 0===t&&(t={}),t.checkLocal&&(!(0,e.hasWin)()||!localStorage)){if(n)throw new Error("localStorage not available");return!1}return!0},t}();function Ea(t){return Ea="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ea(t)}function Sa(t,e){this.name="AggregateError",this.errors=t,this.message=e||""}Sa.prototype=Error.prototype;var xa=setTimeout;function Oa(t){return Boolean(t&&void 0!==t.length)}function Aa(){}function ka(t){if(!(this instanceof ka))throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],Da(t,this)}function Pa(t,e){for(;3===t._state;)t=t._value;0!==t._state?(t._handled=!0,ka._immediateFn(function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null!==n){var r;try{r=n(t._value)}catch(t){return void Ma(e.promise,t)}Na(e.promise,r)}else(1===t._state?Na:Ma)(e.promise,t._value)})):t._deferreds.push(e)}function Na(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"===Ea(e)||"function"==typeof e)){var n=e.then;if(e instanceof ka)return t._state=3,t._value=e,void La(t);if("function"==typeof n)return void Da((r=n,o=e,function(){r.apply(o,arguments)}),t)}t._state=1,t._value=e,La(t)}catch(e){Ma(t,e)}var r,o}function Ma(t,e){t._state=2,t._value=e,La(t)}function La(t){2===t._state&&0===t._deferreds.length&&ka._immediateFn(function(){t._handled||ka._unhandledRejectionFn(t._value)});for(var e=0,n=t._deferreds.length;e<n;e++)Pa(t,t._deferreds[e]);t._deferreds=null}function Ia(t,e,n){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=n}function Da(t,e){var n=!1;try{t(function(t){n||(n=!0,Na(e,t))},function(t){n||(n=!0,Ma(e,t))})}catch(t){if(n)return;n=!0,Ma(e,t)}}ka.prototype.catch=function(t){return this.then(null,t)},ka.prototype.then=function(t,e){var n=new this.constructor(Aa);return Pa(this,new Ia(t,e,n)),n},ka.prototype.finally=function(t){var e=this.constructor;return this.then(function(n){return e.resolve(t()).then(function(){return n})},function(n){return e.resolve(t()).then(function(){return e.reject(n)})})},ka.all=function(t){return new ka(function(e,n){if(!Oa(t))return n(new TypeError("Promise.all accepts an array"));var r=Array.prototype.slice.call(t);if(0===r.length)return e([]);var o=r.length;
1function i(t,a){try{if(a&&("object"===Ea(a)||"function"==typeof a)){var s=a.then;if("function"==typeof s)return void s.call(a,function(e){i(t,e)},n)}r[t]=a,0==--o&&e(r)}catch(t){n(t)}}for(var a=0;a<r.length;a++)i(a,r[a])})},ka.any=function(t){var e=this;return new e(function(n,r){if(!t||void 0===t.length)return r(new TypeError("Promise.any accepts an array"));var o=Array.prototype.slice.call(t);if(0===o.length)return r();for(var i=[],a=0;a<o.length;a++)try{e.resolve(o[a]).then(n).catch(function(t){i.push(t),i.length===o.length&&r(new Sa(i,"All promises were rejected"))})}catch(t){r(t)}})},ka.allSettled=function(t){return new this(function(e,n){if(!t||void 0===t.length)return n(new TypeError(Ea(t)+" "+t+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var r=Array.prototype.slice.call(t);if(0===r.length)return e([]);var o=r.length;function i(t,n){if(n&&("object"===Ea(n)||"function"==typeof n)){var a=n.then;if("function"==typeof a)return void a.call(n,function(e){i(t,e)},function(n){r[t]={status:"rejected",reason:n},0==--o&&e(r)})}r[t]={status:"fulfilled",value:n},0==--o&&e(r)}for(var a=0;a<r.length;a++)i(a,r[a])})},ka.resolve=function(t){return t&&"object"===Ea(t)&&t.constructor===ka?t:new ka(function(e){e(t)})}
1,ka.reject=function(t){return new ka(function(e,n){n(t)})},ka.race=function(t){return new ka(function(e,n){if(!Oa(t))return n(new TypeError("Promise.race accepts an array"));for(var r=0,o=t.length;r<o;r++)ka.resolve(t[r]).then(e,n)})},ka._immediateFn="function"==typeof setImmediate&&function(t){setImmediate(t)}||function(t){xa(t,0)},ka._unhandledRejectionFn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)};const Ra=ka;(0,e.hasWin)()&&(window.Promise=window.Promise||Ra);const ja="function"==typeof fetch?fetch.bind():function(t,e){return new Ra(function(n,r){var o=new XMLHttpRequest;for(var i in o.open(e.method||"get",t),o.withCredentials="include"==e.credentials,e.headers||{})o.setRequestHeader(i,e.headers[i]);o.onload=function(t){return n({status:o.status,statusText:o.statusText,text:function(){return Ra.resolve(o.responseText)}})},o.onerror=r,o.upload&&e.onProgress&&(o.upload.onprogress=e.onProgress),e.body?o.send(e.body):o.send()})};var Ha=function(){return Ha=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Ha.apply(this,arguments)},Fa=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,s)}l((r=r.apply(t,e||[])).next())})},Ba=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}};const Va=function(){function e(){}return e.prototype.store=function(t,e){return void 0===e&&(e={}),Fa(this,void 0,void 0,function(){return Ba(this,function(n){switch(n.label){case 0:return[4,this.request(e.urlStore,this.__props(e,t),e)];case 1:return[2,n.sent()]}})})},e.prototype.load=function(t){return void 0===t&&(t={}),Fa(this,void 0,void 0,function(){return Ba(this,function(e){switch(e.label){case 0:return[4,this.request(t.urlLoad,this.__props(t),t)];case 1:return[2,e.sent()]}})})},e.prototype.request=function(e,n,r){return void 0===n&&(n={}),void 0===r&&(r={}),ja(e,n).then(function(t){var e=t.text();return 1==(t.status/200|0)?e:e.then(Promise.reject)}).then(function(e){var n=e&&(0,t.isString)(e);return r.contentTypeJson&&n?JSON.parse(e):e})},e.prototype.__props=function(e,n){void 0===e&&(e={});var r,o=e.contentTypeJson,i=e.headers||{},a=e.fetchOptions||{},s="X-Requested-With",l="Content-Type";if((0,t.isUndefined)(i[s])&&(i[s]="XMLHttpRequest"),(0,t.isUndefined)(i[l])&&o&&(i[l]="application/json; charset=utf-8"),n)if(o)r=JSON.stringify(n);else for(var c in r=new FormData,n)r.append(c,n[c]);var u={method:r?"POST":"GET",credentials:e.credentials,headers:i,body:r};return Ha(Ha({},u),(0,t.isFunction)(a)?a(u):a)},e}();var Ua=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),za=function(){return za=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},za.apply(this,arguments)}
1,Ga=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,s)}l((r=r.apply(t,e||[])).next())})},$a=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}},qa="storage:start",Wa="storage:after",Ka="storage:end",Ya="storage:error",Xa="local",Za="remote",Qa=function(e){function n(t){var n=e.call(this,t,"StorageManager",_a)||this;n.storages={};var r=n.config;return r._disable&&(r.type=void 0),n.storages={},n.add(Xa,new wa),n.add(Za,new Va),n.setCurrent(r.type),n}return Ua(n,e),n.prototype.isAutosave=function(){return!!this.config.autosave},n.prototype.setAutosave=function(t){return this.config.autosave=!!t,this},n.prototype.getStepsBeforeSave=function(){return this.config.stepsBeforeSave},n.prototype.setStepsBeforeSave=function(t){return this.config.stepsBeforeSave=t,this},n.prototype.add=function(t,e){return this.storages[t]=e,this},n.prototype.get=function(t){return this.storages[t]},n.prototype.getStorages=function(){return this.storages},n.prototype.getCurrent=function(){return this.config.currentStorage},n.prototype.setCurrent=function(t){return this.getConfig().currentStorage=t,this},n.prototype.getCurrentStorage=function(){return this.get(this.getCurrent())},n.prototype.getStorageOptions=function(t){return this.getCurrentOptions(t)},n.prototype.store=function(t,e){return void 0===e&&(e={}),Ga(this,void 0,void 0,function(){var n,r,o,i,a;return $a(this,function(s){switch(s.label){case 0:n=this.getCurrentStorage(),r=za(za({},this.getCurrentOptions()),e),o=this.getRecoveryStorage(),i=this.getCurrentOptions(Xa),s.label=1;case 1:return s.trys.push([1,5,,9]),[4,this.__exec(n,r,t)];case 2:return s.sent(),o?[4,this.__exec(o,i,{})]:[3,4];case 3:s.sent(),s.label=4;case 4:return[3,9];case 5:return a=s.sent(),o?[4,this.__exec(o,i,t)]:[3,7];case 6:return s.sent(),[3,8];case 7:throw a;case 8:return[3,9];case 9:return[2,t]}})})},n.prototype.load=function(e){return void 0===e&&(e={}),Ga(this,void 0,void 0,function(){var n,r,o,i,a;return $a(this,function(s){switch(s.label){case 0:return n=this.getCurrentStorage(),r=za(za({},this.getCurrentOptions()),e),(o=this.getRecoveryStorage())?[4,this.__exec(o,this.getCurrentOptions(Xa))]:[3,5];case 1:if(a=s.sent(),(0,t.isEmpty)(a))return[3,5];s.label=2;case 2:return s.trys.push([2,4,,5]),[4,this.__askRecovery()];case 3:return s.sent(),i=a,[3,5];case 4:return s.sent(),[3,5];case 5:return i?[3,7]:[4,this.__exec(n,r)];case 6:i=s.sent(),s.label=7;case 7:return[2,i||{}]}})})},n.prototype.__askRecovery=function(){var e=this.em,n=this.getRecovery();return new Promise(function(r,o){(0,t.isFunction)(n)?n(r,o,null==e?void 0:e.getEditor()):confirm(null==e?void 0:e.t("storageManager.recover"))?r(null):o()})},n.prototype.getRecovery=function(){return this.config.recovery},n.prototype.getRecoveryStorage=function(){return this.getRecovery()&&this.getCurrent()===Za&&this.get(Xa)},n.prototype.__exec=function(t,e,n){var r;return Ga(this,void 0,void 0,function(){var o,i,a,s,l,c,u,p,d,f,h,g,m;return $a(this,function(v){switch(v.label){case 0:if(o=n?"store":"load",i=this.getConfig(),a=i.onStore,s=i.onLoad,this.onStart(o,n),!t)return[2,n||{}];v.label=1;case 1:return v.trys.push([1,14,,15]),c=null===(r=this.em)||void 0===r?void 0:r.getEditor(),u=void 0,n?(d=a)?[4,a(n,c)]:[3,3]:[3,7];case 2:d=v.sent(),v.label=3;case 3:return p=d||n,(f=e.onStore)?[4,e.onStore(p,c)]:[3,5];case 4:f=v.sent(),v.label=5;case 5:return p=f||p,[4,t.store(p,e)];case 6:return u=v.sent(),l=n,[3,13];case 7:return[4,t.load(e)];case 8:return u=v.sent(),l=this.__clearKeys(u),(h=e.onLoad)?[4,e.onLoad(l,c)]:[3,10];case 9:h=v.sent(),v.label=10;case 10:return l=h||l,(g=s)?[4,s(l,c)]:[3,12];case 11:g=v.sent(),v.label=12;case 12:l=g||l,v.label=13;case 13:return this.onAfter(o,l,u),this.onEnd(o,l),[3,15];case 14:throw m=v.sent(),this.onError(o,m),m;case 15:return[2,l]}})})},n.prototype.__clearKeys=function(t){void 0===t&&(t={});var e=this.getConfig(),n=new RegExp("^".concat(e.id)),r={};for(var o in t)r[o.replace(n,"")]=t[o];return r},n.prototype.getCurrentOptions=function(t){var e=this.getConfig(),n=t||this.getCurrent();return e.options[n]||{}},n.prototype.onStart=function(t,e){var n=this.em;n&&(n.trigger(qa),t&&n.trigger("".concat(qa,":").concat(t),e))},n.prototype.onAfter=function(t,e,n){var r=this.em;r&&(r.trigger(Wa),r.trigger("".concat(Wa,":").concat(t),e,n),r.trigger("storage:".concat(t),e,n))},n.prototype.onEnd=function(t,e){var n=this.em;n&&(n.trigger(Ka),t&&n.trigger("".concat(Ka,":").concat(t),e))},n.prototype.onError=function(t,e){var n=this.em;n&&(n.trigger(Ya,e),t&&n.trigger("".concat(Ya,":").concat(t),e),this.onEnd(t,e))},n.prototype.canAutoload=function(){return!!this.getCurrentStorage()&&!!this.config.autoload},n.prototype.destroy=function(){this.storages={}},n}(y);const Ja=Qa,ts={stylePrefix:"trt-",appendTo:"",optionsTarget:[{value:!1},{value:"_blank"}],custom:!1};var es=r(330),ns=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),rs=function(){return rs=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},rs.apply(this,arguments)},os=function(n){function r(t){void 0===t&&(t={});var e=n.call(this,t)||this;e.events={}
1,e.appendInput=!0;var r=t.config,o=void 0===r?{}:r,i=e,a=i.model,s=i.eventCapture,l=a.target,c=a.attributes.type;e.config=o,e.em=o.em,e.ppfx=o.pStylePrefix||"",e.pfx=e.ppfx+o.stylePrefix||"",e.target=l;var u=e.ppfx;return e.clsField="".concat(u,"field ").concat(u,"field-").concat(c),[["change:value",e.onValueChange],["remove",e.removeView]].forEach(function(t){var n=t[0],r=t[1];a.off(n,r),e.listenTo(a,n,r)}),a.view=e,e.listenTo(a,"change:label",e.render),e.listenTo(a,"change:placeholder",e.rerender),e.events={},s.forEach(function(t){return e.events[t]="onChange"}),e.delegateEvents(),e.init(),e}return ns(r,n),r.prototype.attributes=function(){return this.model.get("attributes")||{}},r.prototype.templateLabel=function(t){var e=this.ppfx,n=this.getLabel();return'<div class="'.concat(e,'label" title="').concat(n,'">').concat(n,"</div>")},r.prototype.templateInput=function(t){var e=this.clsField;return'<div class="'.concat(e,'" data-input></div>')},r.prototype.getClbOpts=function(){return{component:this.target,trait:this.model,elInput:this.getInputElem()}},r.prototype.removeView=function(){this.remove(),this.removed()},r.prototype.init=function(){},r.prototype.removed=function(){},r.prototype.onRender=function(t){},r.prototype.onUpdate=function(t){},r.prototype.onEvent=function(t){},r.prototype.onChange=function(e){var n=this.getInputElem();n&&!(0,t.isUndefined)(n.value)&&this.model.set("value",n.value),this.onEvent(rs(rs({},this.getClbOpts()),{event:e}))},r.prototype.getValueForTarget=function(){return this.model.get("value")},r.prototype.setInputValue=function(t){var e=this.getInputElem();e&&(e.value=t)},r.prototype.onValueChange=function(t,e,n){if(void 0===n&&(n={}),n.fromTarget)this.setInputValue(t.get("value")),this.postUpdate();else{var r=this.getValueForTarget();t.setTargetValue(r,n)}},r.prototype.renderLabel=function(){var t=this.$el,e=this.target,n=this.getLabel(),r=this.templateLabel(e);this.createLabel&&(r=this.createLabel({label:n,component:e,trait:this})||""),t.find("[data-label]").append(r)},r.prototype.getLabel=function(){var t=this.em,n=this.model.attributes,r=n.label,o=n.name;return t.t("traitManager.traits.labels.".concat(o))||(0,e.capitalize)(r||o).replace(/-/g," ")},r.prototype.getComponent=function(){return this.target},r.prototype.getInputEl=function(){if(!this.$input){var e=this.em,n=this.model,r=n,o=n.attributes.name,i=r.get("placeholder")||r.get("default")||"",a=r.get("type")||"text",s=r.get("min"),l=r.get("max"),u=this.getModelValue(),p=(0,c.default)('<input type="'.concat(a,'">')),d=e.t("traitManager.traits.attributes.".concat(o))||{};p.attr(rs({placeholder:i},d)),(0,t.isUndefined)(u)||(r.set({value:u},{silent:!0}),p.prop("value",u)),s&&p.prop("min",s),l&&p.prop("max",l),this.$input=p}return this.$input.get(0)},r.prototype.getInputElem=function(){var t=this.input,e=this.$input;return t||e&&e.get&&e.get(0)||this.getElInput()},r.prototype.getModelValue=function(){var e,n=this.model,r=this.target,o=n.getName();if(n.get("changeProp"))e=r.get(o);else{var i=r.get("attributes");e=n.get("value")||i[o]}return(0,t.isUndefined)(e)?"":e},r.prototype.getElInput=function(){return this.elInput},r.prototype.renderField=function(){var e=this,n=e.$el,r=e.appendInput,o=e.model,i=n.find("[data-input]"),a=i[i.length-1],s=o.el;s||(s=this.createInput?this.createInput(this.getClbOpts()):this.getInputEl()),(0,t.isString)(s)?(a.innerHTML=s,this.elInput=a.firstChild):(r?a.appendChild(s):a.insertBefore(s,a.firstChild),this.elInput=s),o.el=this.elInput},r.prototype.hasLabel=function(){var t=this.model.attributes.label;return!this.noLabel&&!1!==t},r.prototype.rerender=function(){delete this.model.el,this.render()},r.prototype.postUpdate=function(){this.onUpdate(this.getClbOpts())},r.prototype.render=function(){var e=this,n=e.$el,r=e.pfx,o=e.ppfx,i=e.model.attributes,a=i.type,s=i.id,l=this.hasLabel&&this.hasLabel(),c="".concat(r,"trait");delete this.$input;var u='<div class="'.concat(c," ").concat(c,"--").concat(a,'">\n ').concat(l?'<div class="'.concat(o,'label-wrp" data-label></div>'):"",'\n <div class="').concat(o,"field-wrp ").concat(o,"field-wrp--").concat(a,'" data-input>\n ').concat(this.templateInput?(0,t.isFunction)(this.templateInput)?this.templateInput(this.getClbOpts()):this.templateInput:"","\n </div>\n </div>");return n.empty().append(u),l&&this.renderLabel(),this.renderField(),this.el.className="".concat(c,"__wrp ").concat(c,"__wrp-").concat(s),this.postUpdate(),this.onRender(this.getClbOpts()),this},r}(u.G7);const is=os;os.prototype.eventCapture=["change"];var as=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ss=function(t){function e(e,n){void 0===e&&(e={});var r=t.call(this,e)||this;r.reuseView=!0,r.itemsView=n;var o=e.config||{},i=e.editor;return r.config=o,r.em=i,r.ppfx=o.pStylePrefix||"",r.pfx=r.ppfx+o.stylePrefix||"",r.className="".concat(r.pfx,"traits"),r.listenTo(i,"component:toggled",r.updatedCollection),r.updatedCollection(),r}return as(e,t),e.prototype.updatedCollection=function(){var t=this,e=t.ppfx,n=t.className,r=t.em.getSelected();this.el.className="".concat(n," ").concat(e,"one-bg ").concat(e,"two-color"),this.collection=r?r.traits:[],this.render()},e}(es.Z);const ls=ss;
1ss.prototype.itemView=is;var cs=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const us=function(e){function n(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.listenTo(n.model,"change:options",n.rerender),n}return cs(n,e),n.prototype.templateInput=function(){var t=this.ppfx,e=this.clsField;return'<div class="'.concat(e,'">\n <div data-input></div>\n <div class="').concat(t,'sel-arrow">\n <div class="').concat(t,'d-s-arrow"></div>\n </div>\n </div>')},n.prototype.getInputEl=function(){if(!this.$input){var e=this.model,n=this.em,r=e.get("name"),o=e.get("options")||[],i=[],a="<select>";o.forEach(function(e){var o,s,l,c="";(0,t.isString)(e)?(o=e,s=e):(o=e.name||e.label||e.value,s="".concat((0,t.isUndefined)(e.value)?e.id:e.value).replace(/"/g,"""),c+=(l=e.style?e.style.replace(/"/g,"""):"")?' style="'.concat(l,'"'):"");var u=n.t("traitManager.traits.options.".concat(r,".").concat(s))||o;a+='<option value="'.concat(s,'"').concat(c,">").concat(u,"</option>"),i.push(s)}),a+="</select>",this.$input=(0,c.default)(a);var s=e.getTargetValue(),l=i.indexOf(s)>=0?s:e.get("default");!(0,t.isUndefined)(l)&&this.$input.val(l)}return this.$input.get(0)},n}(is);var ps=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const ds=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.appendInput=!1,t}return ps(n,e),n.prototype.templateInput=function(){var t=this.ppfx,e=this.clsField;return'<label class="'.concat(e,'" data-input>\n <i class="').concat(t,'chk-icon"></i>\n </label>')},n.prototype.onChange=function(){this.model.set("value",this.getInputElem().checked)},n.prototype.setInputValue=function(t){var e=this.getInputElem();e&&(e.checked=!!t)},n.prototype.getInputEl=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=!this.$input,o=is.prototype.getInputEl.apply(this,e);if(r){var i=void 0,a=void 0,s=this.model,l=this.target,c=s.attributes.valueFalse,u=s.getName();s.get("changeProp")?a=i=l.get(u):i=!(!(a=l.get("attributes")[u])&&""!==a),(0,t.isUndefined)(c)||a!==c||(i=!1),o.checked=i}return o},n}(is);var fs=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),hs=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,e)||this,r=e.ppfx||"";return n.opts=e,n.ppfx=r,n.em=e.target||{},!e.onChange&&n.listenTo(n.model,"change:value",n.handleModelChange),n}return fs(e,t),e.prototype.template=function(){return'<span class="'.concat(this.holderClass(),'"></span>')},e.prototype.inputClass=function(){return"".concat(this.ppfx,"field")},e.prototype.holderClass=function(){return"".concat(this.ppfx,"input-holder")},e.prototype.elementUpdated=function(){this.model.trigger("el:change")},e.prototype.setValue=function(t,e){var n=this.model,r=t||n.get("defaults"),o=this.getInputEl();o&&(o.value=r)},e.prototype.handleModelChange=function(t,e,n){this.setValue(e,n)},e.prototype.handleChange=function(t){t.stopPropagation();var e=this.getInputEl().value;this.__onInputChange(e),this.elementUpdated()},e.prototype.__onInputChange=function(t){this.model.set({value:t},{fromInput:1})},e.prototype.getInputEl=function(){if(!this.inputEl){var t=this.model,e=this.opts.type||"text",n=t.get("placeholder")||t.get("defaults")||t.get("default")||"";this.inputEl=(0,c.default)('<input type="'.concat(e,'" placeholder="').concat(n,'">'))}return this.inputEl.get(0)},e.prototype.render=function(){this.inputEl=null;var t=this.$el;return t.addClass(this.inputClass()),t.html(this.template()),t.find(".".concat(this.holderClass())).append(this.getInputEl()),this},e}(u.G7);const gs=hs;hs.prototype.events={change:"handleChange"};var ms=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),vs=function(n){function r(e){void 0===e&&(e={});var r=n.call(this,e)||this;return(0,t.bindAll)(r,"moveIncrement","upIncrement"),r.doc=document,r.listenTo(r.model,"change:unit",r.handleModelChange),r}return ms(r,n),r.prototype.template=function(){var t=this.ppfx;
1return'\n <span class="'.concat(t,'input-holder"></span>\n <span class="').concat(t,'field-units"></span>\n <div class="').concat(t,'field-arrows" data-arrows>\n <div class="').concat(t,'field-arrow-u" data-arrow-up></div>\n <div class="').concat(t,'field-arrow-d" data-arrow-down></div>\n </div>\n ')},r.prototype.inputClass=function(){var t=this.ppfx;return this.opts.contClass||"".concat(t,"field ").concat(t,"field-integer")},r.prototype.setValue=function(t,e){var n=e||{},r=this.validateInputValue(t,{deepCheck:1}),o={value:r.value,unit:""};(r.unit||r.force)&&(o.unit=r.unit),this.model.set(o,n),n.silent&&this.handleModelChange()},r.prototype.handleChange=function(t){t.stopPropagation(),this.setValue(this.getInputEl().value),this.elementUpdated()},r.prototype.handleUnitChange=function(t){t.stopPropagation();var e=this.getUnitEl().value;this.model.set("unit",e),this.elementUpdated()},r.prototype.handleKeyDown=function(t){"ArrowUp"===t.key&&(t.preventDefault(),this.upArrowClick()),"ArrowDown"===t.key&&(t.preventDefault(),this.downArrowClick())},r.prototype.elementUpdated=function(){this.model.trigger("el:change")},r.prototype.handleModelChange=function(){var t=this.model;this.getInputEl().value=t.get("value");var e=this.getUnitEl();e&&(e.value=t.get("unit")||"")},r.prototype.getUnitEl=function(){if(!this.unitEl){var t=this.model,e=t.get("units")||[];if(e.length){var n=['<option value="" disabled hidden>-</option>'];e.forEach(function(e){var r=e==t.get("unit")?"selected":"";n.push("<option ".concat(r,">").concat(e,"</option>"))});var r=document.createElement("div");r.innerHTML='<select class="'.concat(this.ppfx,'input-unit">').concat(n.join(""),"</select>"),this.unitEl=r.firstChild}}return this.unitEl},r.prototype.upArrowClick=function(){var t=this.model,e=t.get("step"),n=parseFloat(t.get("value"));this.setValue(this.normalizeValue(n+e)),this.elementUpdated()},r.prototype.downArrowClick=function(){var t=this.model,e=t.get("step"),n=parseFloat(t.get("value"));this.setValue(this.normalizeValue(n-e)),this.elementUpdated()},r.prototype.downIncrement=function(t){t.preventDefault(),this.moved=!1;var n=this.model.get("value")||0;n=this.normalizeValue(n),this.current={y:t.pageY,val:n},(0,e.on)(this.doc,"mousemove",this.moveIncrement),(0,e.on)(this.doc,"mouseup",this.upIncrement)},r.prototype.moveIncrement=function(t){this.moved=!0;var e=this.model,n=e.get("step"),r=this.current,o=this.normalizeValue(r.val+(r.y-t.pageY)*n),i=this.validateInputValue(o),a=i.value,s=i.unit;return this.prValue=a,e.set({value:a,unit:s},{avoidStore:1}),!1},r.prototype.upIncrement=function(){var t=this.model,n=t.get("step");if((0,e.off)(this.doc,"mouseup",this.upIncrement),(0,e.off)(this.doc,"mousemove",this.moveIncrement),this.prValue&&this.moved){var r=this.prValue-n;t.set("value",r,{avoidStore:1}).set("value",r+n),this.elementUpdated()}},r.prototype.normalizeValue=function(t,e){void 0===e&&(e=0);var n=this.model.get("step"),r=0;if(isNaN(t))return e;if(t=parseFloat(t),Math.floor(t)!==t){var o=n.toString().split(".")[1];r=o?o.length:0}return r?parseFloat(t.toFixed(r)):t},r.prototype.validateInputValue=function(e,n){void 0===n&&(n={});var r=0,o=n||{},i=this.model,a=(0,t.isUndefined)(e)?"":e,s=n.units||i.get("units")||[],l=i.get("unit")||s.length&&s[0]||"",c=(0,t.isUndefined)(n.max)?i.get("max"):n.max,u=(0,t.isUndefined)(n.min)?i.get("min"):n.min,p=!!i.get("limitlessMax"),d=!!i.get("limitlessMin");if(o.deepCheck){var f=i.get("fixedValues")||[];if(""===a&&(l=""),a){var h=new RegExp("^"+f.join("|"),"g");if(f.length&&h.test(a))a=a.match(h)[0],l="",r=1;else{var g=a+"";a+="",a=parseFloat(a.replace(",",".")),a=isNaN(a)?"":a;var m=g.replace(a,"");(0,t.indexOf)(s,m)>=0&&(l=m)}}}return p||(0,t.isUndefined)(c)||""===c||(a=a>c?c:a),d||(0,t.isUndefined)(u)||""===u||(a=a<u?u:a),{force:r,value:a,unit:l}},r.prototype.render=function(){gs.prototype.render.call(this),this.unitEl=null;var t=this.getUnitEl();return t&&this.$el.find(".".concat(this.ppfx,"field-units")).get(0).appendChild(t),this},r}(gs);const ys=vs;vs.prototype.events={"change input":"handleChange","change select":"handleUnit
1Change","click [data-arrow-up]":"upArrowClick","click [data-arrow-down]":"downArrowClick","mousedown [data-arrows]":"downIncrement",keydown:"handleKeyDown"};var bs=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const _s=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return bs(n,e),n.prototype.getValueForTarget=function(){var e=this.model,n=e.attributes,r=n.value,o=n.unit;return(0,t.isUndefined)(r)||""===r?e.get("default"):r+o},n.prototype.getInputEl=function(){if(!this.input){var t=this.ppfx,e=this.model,n=this.getModelValue(),r=new ys({contClass:"".concat(t,"field-int"),type:"number",model:e,ppfx:t});r.render(),this.$input=r.inputEl,this.$unit=r.unitEl,e.set("value",n,{fromTarget:!0}),this.$input.val(n),this.input=r.el}return this.input},n}(is);var Ts=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Cs=function(){return Cs=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Cs.apply(this,arguments)};c.default&&function(t,n){if((0,e.hasWin)()){var r={beforeShow:O,move:O,change:O,show:O,hide:O,color:!1,flat:!1,showInput:!1,allowEmpty:!1,showButtons:!0,clickoutFiresChange:!0,showInitial:!1,showPalette:!1,showPaletteOnly:!1,hideAfterPaletteSelect:!1,togglePaletteOnly:!1,showSelectionPalette:!0,localStorageKey:!1,appendTo:"body",maxSelectionSize:7,cancelText:"cancel",chooseText:"choose",togglePaletteMoreText:"more",togglePaletteLessText:"less",clearText:"Clear Color Selection",noColorSelectedText:"No Color Selected",preferredFormat:!1,className:"",containerClassName:"",replacerClassName:"",showAlpha:!1,theme:"sp-light",palette:[["#ffffff","#000000","#ff0000","#ff8000","#ffff00","#008000","#0000ff","#4b0082","#9400d3"]],selectionPalette:[],disabled:!1,offset:null},o=[],i=!!/msie/i.exec(window.navigator.userAgent),a=function(){function t(t,e){return!!~(""+t).indexOf(e)}var e=document.createElement("div").style;return e.cssText="background-color:rgba(0,0,0,.5)",t(e.backgroundColor,"rgba")||t(e.backgroundColor,"hsla")}(),s=["<div class='sp-replacer'>","<div class='sp-preview'><div class='sp-preview-inner'></div></div>","<div class='sp-dd'>▼</div>","</div>"].join(""),l=function(){var t="";if(i)for(var e=1;e<=6;e++)t+="<div class='sp-"+e+"'></div>";return["<div class='sp-container sp-hidden'>","<div class='sp-palette-container'>","<div class='sp-palette sp-thumb sp-cf'></div>","<div class='sp-palette-button-container sp-cf'>","<button type='button' class='sp-palette-toggle'></button>","</div>","</div>","<div class='sp-picker-container'>","<div class='sp-top sp-cf'>","<div class='sp-fill'></div>","<div class='sp-top-inner'>","<div class='sp-color'>","<div class='sp-sat'>","<div class='sp-val'>","<div class='sp-dragger'></div>","</div>","</div>","</div>","<div class='sp-clear sp-clear-display'>","</div>","<div class='sp-hue'>","<div class='sp-slider'></div>",t,"</div>","</div>","<div class='sp-alpha'><div class='sp-alpha-inner'><div class='sp-alpha-handle'></div></div></div>","</div>","<div class='sp-input-container sp-cf'>","<input class='sp-input' type='text' spellcheck='false' />","</div>","<div class='sp-initial sp-thumb sp-cf'></div>","<div class='sp-button-container sp-cf'>","<a class='sp-cancel' href='#'></a>","<button type='button' class='sp-choose'></button>","</div>","</div>","</div>"].join("")}(),c="spectrum.id";t.fn.spectrum=function(e,n){if("string"==typeof e){var r=this,i=Array.prototype.slice.call(arguments,1
vendor: 5,247 bytes, line 1
1);return this.each(function(){var n=o[t(this).data(c)];if(n){var a=n[e];if(!a)throw new Error("Spectrum: no such method: '"+e+"'");"get"==e?r=n.get():"container"==e?r=n.container:"option"==e?r=n.option.apply(n,i):"destroy"==e?(n.destroy(),t(this).removeData(c)):a.apply(n,i)}}),r}return this.spectrum("destroy").each(function(){var n=x(this,t.extend({},e,t(this).data()));t(this).data(c,n.id)})},t.fn.spectrum.load=!0,t.fn.spectrum.loadOpts={},t.fn.spectrum.draggable=P,t.fn.spectrum.defaults=r,t.fn.spectrum.inputTypeColorSupport=function e(){if(void 0===e._cachedResult){var n=t("<input type='color'/>")[0];e._cachedResult="color"===n.type&&""!==n.value}return e._cachedResult},t.spectrum={},t.spectrum.localization={},t.spectrum.palettes={},t.fn.spectrum.processNativeColorInputs=function(){var e=t("input[type=color]");e.length&&!N()&&e.spectrum({preferredFormat:"hex6"})};var u=/^[\s,#]+/,p=/\s+$/,d=0,f=Math,h=f.round,g=f.min,m=f.max,v=f.random,y=function(t,e){if(e=e||{},(t=t||"")instanceof y)return t;if(!(this instanceof y))return new y(t,e);var n=function(t){var e,n,r,o={r:0,g:0,b:0},i=1,a=!1,s=!1;return"string"==typeof t&&(t=function(t){t=t.replace(u,"").replace(p,"").toLowerCase();var e,n=!1;if(C[t])t=C[t],n=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};return(e=E.rgb.exec(t))?{r:e[1],g:e[2],b:e[3]}:(e=E.rgba.exec(t))?{r:e[1],g:e[2],b:e[3],a:e[4]}:(e=E.hsl.exec(t))?{h:e[1],s:e[2],l:e[3]}:(e=E.hsla.exec(t))?{h:e[1],s:e[2],l:e[3],a:e[4]}:(e=E.hsv.exec(t))?{h:e[1],s:e[2],v:e[3]}:(e=E.hsva.exec(t))?{h:e[1],s:e[2],v:e[3],a:e[4]}:(e=E.hex8.exec(t))?{a:et(e[1]),r:Q(e[2]),g:Q(e[3]),b:Q(e[4]),format:n?"name":"hex8"}:(e=E.hex6.exec(t))?{r:Q(e[1]),g:Q(e[2]),b:Q(e[3]),format:n?"name":"hex"}:!!(e=E.hex3.exec(t))&&{r:Q(e[1]+""+e[1]),g:Q(e[2]+""+e[2]),b:Q(e[3]+""+e[3]),format:n?"name":"hex"}}(t)),"object"==typeof t&&(t.hasOwnProperty("r")&&t.hasOwnProperty("g")&&t.hasOwnProperty("b")?(e=t.r,n=t.g,r=t.b,o={r:255*X(e,255),g:255*X(n,255),b:255*X(r,255)},a=!0,s="%"===String(t.r).substr(-1)?"prgb":"rgb"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("v")?(t.s=tt(t.s),t.v=tt(t.v),o=function(t,e,n){t=6*X(t,360),e=X(e,100),n=X(n,100);var r=f.floor(t),o=t-r,i=n*(1-e),a=n*(1-o*e),s=n*(1-(1-o)*e),l=r%6;return{r:255*[n,a,i,i,s,n][l],g:255*[s,n,n,a,i,i][l],b:255*[i,i,s,n,n,a][l]}}(t.h,t.s,t.v),a=!0,s="hsv"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("l")&&(t.s=tt(t.s),t.l=tt(t.l),o=function(t,e,n){var r,o,i;function a(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}if(t=X(t,360),e=X(e,100),n=X(n,100),0===e)r=o=i=n;else{var s=n<.5?n*(1+e):n+e-n*e,l=2*n-s;r=a(l,s,t+1/3),o=a(l,s,t),i=a(l,s,t-1/3)}return{r:255*r,g:255*o,b:255*i}}(t.h,t.s,t.l),a=!0,s="hsl"),t.hasOwnProperty("a")&&(i=t.a)),i=Y(i),{ok:a,format:t.format||s,r:g(255,m(o.r,0)),g:g(255,m(o.g,0)),b:g(255,m(o.b,0)),a:i}}(t);this._originalInput=t,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=h(100*this._a)/100,this._format=e.format||n.format,this._gradientType=e.gradientType,this._r<1&&(this._r=h(this._r)),this._g<1&&(this._g=h(this._g)),this._b<1&&(this._b=h(this._b)),this._ok=n.ok,this._tc_id=d++};y.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},setAlpha:function(t){return this._a=Y(t),this._roundA=h(100*this._a)/100,this},toHsv:function(){var t=L(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=L(this._r,this._g,this._b),e=h(360*t.h),n=h(100*t.s),r=h(100*t.v);return 1==this._a?"hsv("+e+", "+n+"%, "+r+"%)":"hsva("+e+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var t=M(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=M(this._r,this._g,this._b),e=h(360*t.h),n=h(100*t.s),r=h(100*t.l);return 1==this._a?"hsl("+e+", "+n+"%, "+r+"%)":"hsla("+e+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(t){return I(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(){return D(this._r,this._g,this._b,this._a)},toHex8String:function(){return"#"+this.toHex8()},toRgb:function(){return{r:h(this._r),g:h(this._g),b:h(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+h(this._r)+", "+h(this._g)+", "+h(this._b)+")":"rgba("+h(this._r)+", "+h(this._g)+", "+h(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:h(100*X(this._r,255))+"%",g:h(100*X(this._g,255))+"%",b:h(100*X(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+h(100*X(this._r,255))+"%, "+h(100*X(this._g,255))+"%, "+h(100*X(this._b,255))+"%)":"rgba("+h(100*X(this._r,255))+"%, "+h(100*X(this._g,255))+"%, "+h(100*X(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(w[I(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+D(this._r,this._g,this._b,this._a),n=e,r=this._gradientType?"GradientType = 1, ":"";
vendor: 4,219 bytes, line 1
1return t&&(n=y(t).toHex8String()),"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+e+",endColorstr="+n+")"},toString:function(t){var e=!!t;t=t||this._format;var n=!1,r=this._a<1&&this._a>=0;return e||!r||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"name"!==t?("rgb"===t&&(n=this.toRgbString()),"prgb"===t&&(n=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(n=this.toHexString()),"hex3"===t&&(n=this.toHexString(!0)),"hex8"===t&&(n=this.toHex8String()),"name"===t&&(n=this.toName()),"hsl"===t&&(n=this.toHslString()),"hsv"===t&&(n=this.toHsvString()),n||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},_applyModification:function(t,e){var n=t.apply(null,[this].concat([].slice.call(e)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(F,arguments)},brighten:function(){return this._applyModification(B,arguments)},darken:function(){return this._applyModification(V,arguments)},desaturate:function(){return this._applyModification(R,arguments)},saturate:function(){return this._applyModification(j,arguments)},greyscale:function(){return this._applyModification(H,arguments)},spin:function(){return this._applyModification(U,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(W,arguments)},complement:function(){return this._applyCombination(z,arguments)},monochromatic:function(){return this._applyCombination(K,arguments)},splitcomplement:function(){return this._applyCombination(q,arguments)},triad:function(){return this._applyCombination(G,arguments)},tetrad:function(){return this._applyCombination($,arguments)}},y.fromRatio=function(t,e){if("object"==typeof t){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]="a"===r?t[r]:tt(t[r]));t=n}return y(t,e)},y.equals=function(t,e){return!(!t||!e)&&y(t).toRgbString()==y(e).toRgbString()},y.random=function(){return y.fromRatio({r:v(),g:v(),b:v()})},y.mix=function(t,e,n){n=0===n?0:n||50;var r,o=y(t).toRgb(),i=y(e).toRgb(),a=n/100,s=2*a-1,l=i.a-o.a,c=1-(r=((r=s*l==-1?s:(s+l)/(1+s*l))+1)/2),u={r:i.r*r+o.r*c,g:i.g*r+o.g*c,b:i.b*r+o.b*c,a:i.a*a+o.a*(1-a)};return y(u)},y.readability=function(t,e){var n=y(t),r=y(e),o=n.toRgb(),i=r.toRgb(),a=n.getBrightness(),s=r.getBrightness(),l=Math.max(o.r,i.r)-Math.min(o.r,i.r)+Math.max(o.g,i.g)-Math.min(o.g,i.g)+Math.max(o.b,i.b)-Math.min(o.b,i.b);return{brightness:Math.abs(a-s),color:l}},y.isReadable=function(t,e){var n=y.readability(t,e);return n.brightness>125&&n.color>500},y.mostReadable=function(t,e){for(var n=null,r=0,o=!1,i=0;i<e.length;i++){var a=y.readability(t,e[i]),s=a.brightness>125&&a.color>500,l=a.brightness/125*3+a.color/500;(s&&!o||s&&o&&l>r||!s&&!o&&l>r)&&(o=s,r=l,n=y(e[i]))}return n};var b,_,T,C=y.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee9
10",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},w=y.hexNames=function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}(C),E=(_="[\\s|\\(]+("+(b="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+b+")[,|\\s]+("+b+")\\s*\\)?",T="[\\s|\\(]+("+b+")[,|\\s]+("+b+")[,|\\s]+("+b+")[,|\\s]+("+b+")\\s*\\)?",{rgb:new RegExp("rgb"+_),rgba:new RegExp("rgba"+T),hsl:new RegExp("hsl"+_),hsla:new RegExp("hsla"+T),hsv:new RegExp("hsv"+_),hsva:new RegExp("hsva"
1+T),hex3:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex8:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});window.tinycolor=y,t(function(){t.fn.spectrum.load&&t.fn.spectrum.processNativeColorInputs()})}function S(e,n,r,o){for(var i=[],s=0;s<e.length;s++){var l=e[s];if(l){var c=y(l),u=c.toHsl().l<.5?"sp-thumb-el sp-thumb-dark":"sp-thumb-el sp-thumb-light";u+=y.equals(n,l)?" sp-thumb-active":"";var p=c.toString(o.preferredFormat||"rgb"),d=a?"background-color:"+c.toRgbString():"filter:"+c.toFilter();i.push('<span title="'+p+'" data-color="'+c.toRgbString()+'" class="'+u+'"><span class="sp-thumb-inner" style="'+d+';"></span></span>')}else i.push(t("<div />").append(t('<span data-color="" style="background-color:transparent;" class="sp-clear-display"></span>').attr("title",o.noColorSelectedText)).html())}return"<div class='sp-cf "+r+"'>"+i.join("")+"</div>"}function x(e,c){var u,p,d=function(e,n){var o=t.extend({},r,e);return o.callbacks={move:k(o.move,n),change:k(o.change,n),show:k(o.show,n),hide:k(o.hide,n),beforeShow:k(o.beforeShow,n)},o}(c,e),f=d.flat,h=d.showSelectionPalette,g=d.localStorageKey,m=d.theme,v=d.callbacks,b=(u=zt,function(){var t=this,e=arguments;p||(p=setTimeout(function(){p=null,u.apply(t,e)},10))}),_=!1,T=!1,C=!0,w=0,E=0,x=0,O=0,M=0,L=0,I=0,D=0,R=0,j=0,H=1,F=[],B=[],V={},U=d.selectionPalette.slice(0),z=d.maxSelectionSize,G="sp-dragging",$=null,q=e.ownerDocument,W=(q.body,t(e)),K=!1,Y=t(l,q).addClass(m),X=Y.find(".sp-picker-container"),Z=Y.find(".sp-color"),Q=Y.find(".sp-dragger"),J=Y.find(".sp-hue"),tt=Y.find(".sp-slider"),et=Y.find(".sp-alpha-inner"),nt=Y.find(".sp-alpha"),rt=Y.find(".sp-alpha-handle"),ot=Y.find(".sp-input"),it=Y.find(".sp-palette"),at=Y.find(".sp-initial"),st=Y.find(".sp-cancel"),lt=Y.find(".sp-clear"),ct=Y.find(".sp-choose"),ut=Y.find(".sp-palette-toggle"),pt=W.is("input"),dt=pt&&"color"===W.attr("type")&&N(),ft=pt&&!f,ht=ft?t(s).addClass(m).addClass(d.className).addClass(d.replacerClassName):t([]),gt=ft?ht:W,mt=ht.find(".sp-preview-inner"),vt=d.color||pt&&W.val(),yt=!1,bt=d.preferredFormat,_t=!d.showButtons||d.clickoutFiresChange,Tt=!vt,Ct=d.allowEmpty&&!dt;function wt(){if(d.showPaletteOnly&&(d.showPalette=!0),ut.text(d.showPaletteOnly?d.togglePaletteMoreText:d.togglePaletteLessText),d.palette){F=d.palette.slice(0),B=t.isArray(F[0])?F:[F],V={};for(var e=0;e<B.length;e++)for(var n=0;n<B[e].length;n++){var r=y(B[e][n]).toRgbString();V[r]=!0}}Y.toggleClass("sp-flat",f),Y.toggleClass("sp-input-disabled",!d.showInput),Y.toggleClass("sp-alpha-enabled",d.showAlpha),Y.toggleClass("sp-clear-enabled",Ct),Y.toggleClass("sp-buttons-disabled",!d.showButtons),Y.toggleClass("sp-palette-buttons-disabled",!d.togglePaletteOnly),Y.toggleClass("sp-palette-disabled",!d.showPalette),Y.toggleClass("sp-palette-only",d.showPaletteOnly),Y.toggleClass("sp-initial-disabled",!d.showInitial),Y.addClass(d.className).addClass(d.containerClassName),zt()}function Et(){if(g&&window.localStorage){try{var e=window.localStorage[g].split(",#");e.length>1&&(delete window.localStorage[g],t.each(e,function(t,e){St(e)}))}catch(t){}try{U=window.localStorage[g].split(";")}catch(t){}}}function St(e){if(h){var n=y(e).toRgbString();if(!V[n]&&-1===t.inArray(n,U))for(U.push(n);U.length>z;)U.shift();if(g&&window.localStorage)try{window.localStorage[g]=U.join(";")}catch(t){}}}function xt(){var e=Ht(),n=t.map(B,function(t,n){return S(t,e,"sp-palette-row sp-palette-row-"+n,d)});Et(),U&&n.push(S(function(){var t=[];if(d.showPalette)for(var e=0;e<U.length;e++){var n=y(U[e]).toRgbString();V[n]||t.push(U[e])}return t.reverse().slice(0,d.maxSelectionSize)}(),e,"sp-palette-row sp-palette-row-selection",d)),it.html(n.join(""))}function Ot(){if(d.showInitial){var t=yt,e=Ht();at.html(S([t,e],e,"sp-palette-row-initial",d))}}function At(){(E<=0||w<=0||O<=0)&&zt(),T=!0,Y.addClass(G),$=null,W.trigger("dragstart.spectrum",[Ht()])}function kt(){T=!1,Y.removeClass(G),W.trigger("dragstop.spectrum",[Ht()])}function Pt(){var t=ot.val();if(null!==t&&""!==t||!Ct){var e=y(t);e.isValid()?(jt(e),Ut(!0)):ot.addClass("sp-validation-error")}else jt(null),Ut(!0)}function Nt(){_?Dt():Mt()}function Mt(){var e=t.Event("beforeShow.spectrum");if(_)zt();else if(W.trigger("beforeShow.spectrum",[Ht()]),!1!==v.beforeShow(Ht())&&!e.isDefaultPrevented()){!function(){for(var t=0;t<o.length;t++)o[t]&&o[t].hide()}(),_=!0;var n=t(q);n.bind("keydown.spectrum",Lt),n.bind("click.spectrum",It),t(window).bind("resize.spectrum",b),ht.addClass("sp-active"),Y.removeClass("sp-hidden"),zt(),Bt(),yt=Ht(),Ot(),v.show(yt),W.trigger("show.spectrum",[yt])}}function Lt(t){27===t.keyCode&&Dt()}function It(t){2!=t.button&&(T||(_t?Ut(!0):Rt(),Dt()))}
1function Dt(){_&&!f&&(_=!1,t(q).unbind("keydown.spectrum",Lt),t(q).unbind("click.spectrum",It),t(window).unbind("resize.spectrum",b),ht.removeClass("sp-active"),Y.addClass("sp-hidden"),v.hide(Ht()),W.trigger("hide.spectrum",[Ht()]))}function Rt(){jt(yt,!0)}function jt(t,e){var n,r;y.equals(t,Ht())?Bt():(!t&&Ct?Tt=!0:(Tt=!1,C=!t,r=(n=y(t)).toHsv(),D=r.h%360/360,R=r.s,j=r.v,H=r.a),Bt(),n&&n.isValid()&&!e&&(bt=d.preferredFormat||n.getFormat()))}function Ht(t){return t=t||{},Ct&&Tt?null:y.fromRatio({h:D,s:R,v:j,a:Math.round(100*H)/100},{format:t.format||bt})}function Ft(){Bt(),v.move(Ht()),W.trigger("move.spectrum",[Ht()])}function Bt(){ot.removeClass("sp-validation-error"),Vt();var t=y.fromRatio({h:D,s:1,v:1});Z.css("background-color",t.toHexString());var e=bt;H<1&&(0!==H||"name"!==e)&&("hex"!==e&&"hex3"!==e&&"hex6"!==e&&"name"!==e||(e="rgb"));var n=Ht({format:e}),r="";if(mt.removeClass("sp-clear-display"),mt.css("background-color","transparent"),!n&&Ct)mt.addClass("sp-clear-display");else{var o=n.toHexString(),s=n.toRgbString();if(a||1===n.alpha?mt.css("background-color",s):(mt.css("background-color","transparent"),mt.css("filter",n.toFilter())),d.showAlpha){var l=n.toRgb();l.a=0;var c=y(l).toRgbString(),u="linear-gradient(left, "+c+", "+o+")";i?et.css("filter",y(c).toFilter({gradientType:1},o)):(et.css("background","-webkit-"+u),et.css("background","-moz-"+u),et.css("background","-ms-"+u),et.css("background","linear-gradient(to right, "+c+", "+o+")"))}r=n.toString(e)}d.showInput&&ot.val(r),d.showPalette&&xt(),Ot()}function Vt(){var t=R,e=j;if(Ct&&Tt)rt.hide(),tt.hide(),Q.hide();else{rt.show(),tt.show(),Q.show();var n=t*w,r=E-e*E;n=Math.max(-x,Math.min(w-x,n-x)),r=Math.max(-x,Math.min(E-x,r-x)),Q.css({top:r+"px",left:n+"px"});var o=H*M;rt.css({left:o-L/2+"px"});var i=D*O;tt.css({top:i-I+"px"})}}function Ut(t){var e=Ht(),n="",r=!!C||!y.equals(e,yt);e&&(n=e.toString(bt),!_&&St(e)),pt&&W.val(n),t&&r&&(v.change(e),W.trigger("change",[e]))}function zt(){_&&(w=Z.width(),E=Z.height(),x=Q.height(),J.width(),O=J.height(),I=tt.height(),M=nt.width(),L=rt.width(),f||(Y.css("position","absolute"),d.offset?Y.offset(d.offset):Y.offset(function(e,n){var r=e.outerWidth(),o=e.outerHeight(),i=n.outerHeight(),a=e[0].ownerDocument,s=a.documentElement,l=s.clientWidth,c=s.clientHeight,u=l+t(a).scrollLeft(),p=c+t(a).scrollTop(),d=n.offset();return d.top+=i,d.left-=Math.min(d.left,d.left+r>u&&u>r?Math.abs(d.left+r-u):0),d.top-=Math.min(d.top,d.top+o>p&&p>o?Math.abs(o+i-0):0),d}(Y,gt))),Vt(),d.showPalette&&xt(),W.trigger("reflow.spectrum"))}function Gt(){Dt(),K=!0,W.attr("disabled",!0),gt.addClass("sp-disabled")}!function(){if(i&&Y.find("*:not(input)").attr("unselectable","on"),wt(),ft&&W.after(ht).hide(),Ct||lt.hide(),f)W.after(Y).hide();else{var e="parent"===d.appendTo?W.parent():t(d.appendTo);1!==e.length&&(e=t("body")),e.append(Y)}function n(e){return e.data&&e.data.ignore?(jt(t(e.target).closest(".sp-thumb-el").data("color")),Ft()):(jt(t(e.target).closest(".sp-thumb-el").data("color")),Ft(),d.hideAfterPaletteSelect&&(Ut(!0),Dt())),!1}Et(),gt.bind("click.spectrum touchstart.spectrum",function(e){K||Nt(),e.stopPropagation(),t(e.target).is("input")||e.preventDefault()}),(W.is(":disabled")||!0===d.disabled)&&Gt(),Y.click(A),ot.change(Pt),ot.bind("paste",function(){setTimeout(Pt,1)}),ot.keydown(function(t){13==t.keyCode&&Pt()}),st.text(d.cancelText),st.bind("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),Rt(),Dt()}),lt.attr("title",d.clearText),lt.bind("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),Tt=!0,Ft(),f&&Ut(!0)}),ct.text(d.chooseText),ct.bind("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),i&&ot.is(":focus")&&ot.trigger("change"),ot.hasClass("sp-validation-error")||(Ut(!0),Dt())}),ut.text(d.showPaletteOnly?d.togglePaletteMoreText:d.togglePaletteLessText),ut.bind("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),d.showPaletteOnly=!d.showPaletteOnly,d.showPaletteOnly||f||Y.css("left","-="+(X.outerWidth(!0)+5)),wt()}),P(nt,function(t,e,n){H=t/M,Tt=!1,n.shiftKey&&(H=Math.round(10*H)/10),Ft()},At,kt),P(J,function(t,e){D=parseFloat(e/O),Tt=!1,d.showAlpha||(H=1),Ft()},At,kt),P(Z,function(t,e,n){if(n.shiftKey){if(!$){var r=R*w,o=E-j*E,i=Math.abs(t-r)>Math.abs(e-o);$=i?"x":"y"}}else $=null;var a=!$||"y"===$;(!$||"x"===$)&&(R=parseFloat(t/w)),a&&(j=parseFloat((E-e)/E)),Tt=!1,d.showAlpha||(H=1),Ft()},At,kt),vt?(jt(vt),Bt(),bt=d.preferredFormat||y(vt).getFormat(),St(vt)):Bt(),f&&Mt();var r=i?"mousedown.spectrum":"click.spectrum touchstart.spectrum";
vendor: 4,275 bytes, line 1
1it.delegate(".sp-thumb-el",r,n),at.delegate(".sp-thumb-el:nth-child(1)",r,{ignore:!0},n)}();var $t={show:Mt,hide:Dt,toggle:Nt,reflow:zt,option:function(e,r){return e===n?t.extend({},d):r===n?d[e]:(d[e]=r,"preferredFormat"===e&&(bt=d.preferredFormat),void wt())},enable:function(){K=!1,W.attr("disabled",!1),gt.removeClass("sp-disabled")},disable:Gt,offset:function(t){d.offset=t,zt()},set:function(t){jt(t),Ut()},get:Ht,destroy:function(){W.show(),gt.unbind("click.spectrum touchstart.spectrum"),Y.remove(),ht.remove(),o[$t.id]=null},container:Y};return $t.id=o.push($t)-1,$t}function O(){}function A(t){t.stopPropagation()}function k(t,e){var n=Array.prototype.slice,r=n.call(arguments,2);return function(){return t.apply(e,r.concat(n.call(arguments)))}}function P(e,n,r,o){n=n||function(){},r=r||function(){},o=o||function(){};var a=document,s=!1,l={},c=0,u=0,p="ontouchstart"in window,d={};function f(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),t.returnValue=!1}function h(t){if(s){if(i&&a.documentMode<9&&!t.button)return g();var r=t&&t.touches&&t.touches[0],o=r&&r.pageX||t.pageX,d=r&&r.pageY||t.pageY,h=Math.max(0,Math.min(o-l.left,u)),m=Math.max(0,Math.min(d-l.top,c));p&&f(t),n.apply(e,[h,m,t])}}function g(){s&&(t(a).unbind(d),t(a.body).removeClass("sp-dragging"),setTimeout(function(){o.apply(e,arguments)},0)),s=!1}d.selectstart=f,d.dragstart=f,d["touchmove mousemove"]=h,d["touchend mouseup"]=g,t(e).bind("touchstart mousedown",function(n){(n.which?3==n.which:2==n.button)||s||!1!==r.apply(e,arguments)&&(s=!0,c=t(e).height(),u=t(e).width(),l=t(e).offset(),t(a).bind(d),t(a.body).addClass("sp-dragging"),h(n),f(n))})}function N(){return t.fn.spectrum.inputTypeColorSupport()}function M(t,e,n){t=X(t,255),e=X(e,255),n=X(n,255);var r,o,i=m(t,e,n),a=g(t,e,n),s=(i+a)/2;if(i==a)r=o=0;else{var l=i-a;switch(o=s>.5?l/(2-i-a):l/(i+a),i){case t:r=(e-n)/l+(e<n?6:0);break;case e:r=(n-t)/l+2;break;case n:r=(t-e)/l+4}r/=6}return{h:r,s:o,l:s}}function L(t,e,n){t=X(t,255),e=X(e,255),n=X(n,255);var r,o,i=m(t,e,n),a=g(t,e,n),s=i,l=i-a;if(o=0===i?0:l/i,i==a)r=0;else{switch(i){case t:r=(e-n)/l+(e<n?6:0);break;case e:r=(n-t)/l+2;break;case n:r=(t-e)/l+4}r/=6}return{h:r,s:o,v:s}}function I(t,e,n,r){var o=[J(h(t).toString(16)),J(h(e).toString(16)),J(h(n).toString(16))];return r&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function D(t,e,n,r){var o;return[J((o=r,Math.round(255*parseFloat(o)).toString(16))),J(h(t).toString(16)),J(h(e).toString(16)),J(h(n).toString(16))].join("")}function R(t,e){e=0===e?0:e||10;var n=y(t).toHsl();return n.s-=e/100,n.s=Z(n.s),y(n)}function j(t,e){e=0===e?0:e||10;var n=y(t).toHsl();return n.s+=e/100,n.s=Z(n.s),y(n)}function H(t){return y(t).desaturate(100)}function F(t,e){e=0===e?0:e||10;var n=y(t).toHsl();return n.l+=e/100,n.l=Z(n.l),y(n)}function B(t,e){e=0===e?0:e||10;var n=y(t).toRgb();return n.r=m(0,g(255,n.r-h(-e/100*255))),n.g=m(0,g(255,n.g-h(-e/100*255))),n.b=m(0,g(255,n.b-h(-e/100*255))),y(n)}function V(t,e){e=0===e?0:e||10;var n=y(t).toHsl();return n.l-=e/100,n.l=Z(n.l),y(n)}function U(t,e){var n=y(t).toHsl(),r=(h(n.h)+e)%360;return n.h=r<0?360+r:r,y(n)}function z(t){var e=y(t).toHsl();return e.h=(e.h+180)%360,y(e)}function G(t){var e=y(t).toHsl(),n=e.h;return[y(t),y({h:(n+120)%360,s:e.s,l:e.l}),y({h:(n+240)%360,s:e.s,l:e.l})]}function $(t){var e=y(t).toHsl(),n=e.h;return[y(t),y({h:(n+90)%360,s:e.s,l:e.l}),y({h:(n+180)%360,s:e.s,l:e.l}),y({h:(n+270)%360,s:e.s,l:e.l})]}function q(t){var e=y(t).toHsl(),n=e.h;return[y(t),y({h:(n+72)%360,s:e.s,l:e.l}),y({h:(n+216)%360,s:e.s,l:e.l})]}function W(t,e,n){e=e||6,n=n||30;var r=y(t).toHsl(),o=360/n,i=[y(t)];for(r.h=(r.h-(o*e>>1)+720)%360;--e;)r.h=(r.h+o)%360,i.push(y(r));return i}function K(t,e){e=e||6;for(var n=y(t).toHsv(),r=n.h,o=n.s,i=n.v,a=[],s=1/e;e--;)a.push(y({h:r,s:o,v:i})),i=(i+s)%1;return a}function Y(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function X(t,e){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var n=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(t);return t=g(e,m(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),f.abs(t-e)<1e-6?1:t
1%e/parseFloat(e)}function Z(t){return g(1,m(0,t))}function Q(t){return parseInt(t,16)}function J(t){return 1==t.length?"0"+t:""+t}function tt(t){return t<=1&&(t=100*t+"%"),t}function et(t){return Q(t)/255}}(c.default);var ws=function(t){var e="name"===t.getFormat()&&t.toName(),n=1==t.getAlpha()?t.toHexString():t.toRgbString();return e||n.replace(/ /g,"")};const Es=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return Ts(n,e),n.prototype.template=function(){var t=this.ppfx;return'\n <div class="'.concat(this.holderClass(),'"></div>\n <div class="').concat(t,'field-colorp">\n <div class="').concat(t,'field-colorp-c" data-colorp-c>\n <div class="').concat(t,'checker-bg"></div>\n </div>\n </div>\n ')},n.prototype.inputClass=function(){var t=this.ppfx;return"".concat(t,"field ").concat(t,"field-color")},n.prototype.holderClass=function(){return"".concat(this.ppfx,"input-holder")},n.prototype.remove=function(){return e.prototype.remove.call(this),this.colorEl.spectrum("destroy"),this},n.prototype.handleChange=function(e){e.stopPropagation();var n=e.target.value;(0,t.isUndefined)(n)||this.__onInputChange(n)},n.prototype.__onInputChange=function(t){var e=this.model,n=this.opts.onChange,r=t,o=this.getColorEl();if(o){o.spectrum("set",r);var i=o.spectrum("get"),a=r&&ws(i);a&&(r=a)}n?n(r):e.set({value:r},{fromInput:1})},n.prototype.setValue=function(e,n){void 0===n&&(n={});var r=this.model,o=(0,t.isUndefined)(n.def)?r.get("defaults"):n.def,i=(0,t.isUndefined)(e)?(0,t.isUndefined)(o)?"":o:e,a=this.getInputEl(),s=this.getColorEl(),l="none"!=i?i:"";a.value=i,s.get(0).style.backgroundColor=l,(n.fromTarget||n.fromInput&&!n.avoidStore)&&(s.spectrum("set",l),this.noneColor="none"==i,this.movedColor=l)},n.prototype.getColorEl=function(){var t=this;if(!this.colorEl){var e=this,n=e.em,r=e.model,o=e.opts,i=this.ppfx,a=o.onChange,s=(0,c.default)('<div class="'.concat(this.ppfx,'field-color-picker"></div>')),l=s.get(0).style,u=n&&n.config?n.config.el:"",p=n&&n.getConfig&&n.getConfig().colorPicker||{};this.movedColor="";var d,f=!1;this.$el.find("[data-colorp-c]").append(s);var h=function(t,e){void 0===e&&(e=!0),a?a(t,!e):(e&&r.setValueFromInput(0,!1),r.setValueFromInput(t,e))};s.spectrum(Cs(Cs(Cs({color:r.getValue()||!1,containerClassName:"".concat(i,"one-bg ").concat(i,"two-color"),appendTo:u||"body",maxSelectionSize:8,showPalette:!0,showAlpha:!0,chooseText:"Ok",cancelText:"\u2a2f",palette:[]},p),r.get("colorPicker")||{}),{move:function(e){var n=ws(e);t.movedColor=n,l.backgroundColor=n,h(n,!1)},change:function(e){f=!0;var n=ws(e);l.backgroundColor=n,h(n),t.noneColor=!1},show:function(e){f=!1,t.movedColor="",d=a?r.getValue({noDefault:!0}):ws(e)},hide:function(){f||!d&&!a||(t.noneColor&&(d=""),l.backgroundColor=d,s.spectrum("set",d),h(d,!1))}})),n&&n.on&&this.listenTo(n,"component:selected",function(){t.movedColor&&h(t.movedColor),f=!0,t.movedColor="",s.spectrum("hide")}),this.colorEl=s}return this.colorEl},n.prototype.render=function(){return gs.prototype.render.call(this),this.getColorEl(),this},n}(gs);var Ss=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const xs=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ss(e,t),e.prototype.templateInput=function(){return""},e.prototype.getInputEl=function(){if(!this.input){var t=this.model,e=this.getModelValue(),n=new Es({model:t,target:this.config.em,contClass:this.ppfx+"field-color",ppfx:this.ppfx}).render();n.setValue(e,{fromTarget:1}),this.input=n.el}return this.input},e}(is);var Os=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),As=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return Os(n,e),n.prototype.templateInput=function(){return""},n.prototype.onChange=function(){this.handleClick()},n.prototype.handleClick=function(){var e=this.model,n=this.em,r=e.get("command");r&&((0,t.isString)(r)?n.Commands.run(r):r(n.Editor,e))},n.prototype.renderLabel=function(){this.model.get("label")&&is.prototype.renderLabel.apply(this)},n.prototype.getInputEl=function(){var t=this.model,e=this.ppfx,n=t.props(),r=n.labelButton,o=n.text,i=n.full,a=r||o,s="".concat(e,"btn");return'<button type="button" class="'.concat(s,"-prim").concat(i?" ".concat(s,"--full"):"",'">').concat(a,"</button>")},n}(is);const ks=As;As.prototype.eventCapture=["click button"];var Ps=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ns="trait",Ms="".concat(Ns,":"),Ls="".concat(Ms,"custom"),Is={text:is,number:_s,select:us,checkbox:ds,color:xs,button:ks},Ds=function(e){function n(n){var r=e.call(this,n,"TraitManager",ts)||this;r.TraitsView=ls,r.events={all:Ns,custom:Ls};var o=new u.Hn;r.model=o,r.types=Is;var i=(0,t.debounce)(function(){return r.__upSel()},0);o.listenTo(n,"component:toggled",i);var a=(0,t.debounce)(function(){return r.__onUp()},0);return o.listenTo(n,"trait:update",a),r}return Ps(n,e),n.prototype.__upSel=function(){this.select(this.em.getSelected())},n.prototype.__onUp=function(){this.select(this.getSelected())},n.prototype.select=function(t){var e=t?t.getTraits():[];this.model.set({component:t,traits:e}),this.__trgCustom()},n.prototype.getSelected=function(){return this.model.get("component")},n.prototype.getCurrent=function(){return this.model.get("traits")||[]},n.prototype.__trgCustom=function(t){void 0===t&&(t={}),this.__ctn=this.__ctn||t.container,this.em.trigger(this.events.custom,{container:this.__ctn})},n.prototype.postRender=function(){this.__appendTo()},n.prototype.getTraitsViewer=function(){return this.view},n.prototype.addType=function(t,e){var n=this.getType("text");this.types[t]=n.extend(e)},n.prototype.getType=function(t){return this.getTypes()[t]},n.prototype.getTypes=function(){return this.types},n.prototype.render=function(){var t=this.view,e=this.em,n=this.getConfig(),r=t&&t.el;return t=new ls({el:r,collection:[],editor:e,config:n},this.getTypes()),this.view=t,t.el},n.prototype.destroy=function(){this.model.stopListening(),this.model.clear()},n}(y);const Rs=Ds,js={stylePrefix:"",appendTo:"",sortable:!0,hidable:!0,hideTextnode:!0,root:"",showWrapper:!0,showHover:!0,scrollCanvas:{behavior:"smooth",block:"nearest"},scrollLayers:{behavior:"auto",block:"nearest"},highlightHover:!0,custom:!1,onInit:function(){},onRender:function(){},extend:{}};var Hs=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fs=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,e)||this;n.items=[],n.opt=e;var r=e.config||{};n.config=r,n.parentView=e.parentView;var o=r.stylePrefix||"",i=r.pStylePrefix||"",a=n.collection;n.listenTo(a,"add",n.addTo),n.listenTo(a,"reset resetNavigator",n.render),n.listenTo(a,"remove",n.removeChildren),n.className="".concat(o,"layers");var s=r.em;if(r.sortable&&!n.opt.sorter){var l=s.Utils;n.opt.sorter=new l.Sorter({container:r.sortContainer||n.el,containerSel:".".concat(n.className),itemSel:".".concat(o,"layer"),ignoreViewChildren:1,onEndMove:function(t,e,n){var r=e.getSourceModel();s.setSelected(r,{forceChange:1}),s.trigger("".concat(qe,":end"),n)},avoidSelectOnEnd:1,nested:1,ppfx:i,pfx:o})}return n.$el.data("collection",a),e.parent&&n.$el.data("model",e.parent),n}return Hs(e,t),e.prototype.removeChildren=function(t){var e=t.viewLayer;e&&(e.remove(),delete t.viewLayer)},e.prototype.addTo=function(t){var e=this.collection.indexOf(t);this.addToCollection(t,null,e)},e.prototype.addToCollection=function(t,e,n){var r=this,o=r.parentView,i=r.opt,a=r.config,s=i.ItemView,l=i.opened,c=i.module,u=e||null,p=new s({ItemView:s,level:i.level,model:t,parentView:o,config:a,sorter:i.sorter,opened:l,module:c}),d=p.render().el;if(u)u.appendChild(d);else if(void 0!==n){var f="before";this.$el.children().length==n&&(n--,f="after"),n<0?this.$el.append(d):this.$el.children().eq(n)[f](d)}else this.$el.append(d);return this.items.push(p),d},e.prototype.remove=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return u.G7.prototype.remove.apply(this,t),this.items.map(function(t){return t.remove()}),this},e.prototype.render=function(){var t=this,e=document.createDocumentFragment(),n=this.el;return n.innerHTML="",this.collection.each(function(n){return t.addToCollection(n,e)}),n.appendChild(e),n.className=this.className,this},e}(u.G7);const Bs=Fs;var Vs=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Us="contentEditable",zs=function(n){function r(e){var r=n.call(this,e)||this;(0,t.bindAll)(r,"__render"),r.opt=e,r.module=e.module,r.config=e.config||{},r.sorter=e.sorter||"",r.parentView=e.parentView;var o=r,i=o.model,a=o.pfx,s=o.ppfx,l=i.get("type")||"default";return r.className="".concat(a,"layer ").concat(a,"layer__t-").concat(l," no-select ").concat(s,"two-color"),r.inputNameCls="".concat(s,"layer-name"),r.clsTitleC="".concat(a,"layer-title-c"),r.clsTitle="".concat(a,"layer-title"),r.clsCaret="".concat(a,"layer-caret"),r.clsCount="".concat(a,"layer-count"),r.clsMove="".concat(a,"layer-move"),r.clsChildren="".concat(a,"layer-children"),r.clsNoChild="".concat(a,"layer-no-chld"),r.clsEdit="".concat(r.inputNameCls,"--edit"),r.clsNoEdit="".concat(r.inputNameCls,"--no-edit"),r.initComponent(),r}return Vs(r,n),r.prototype.events=function(){return{"mousedown [data-toggle-move]":"startSort","touchstart [data-toggle-move]":"startSort","click [data-toggle-visible]":"toggleVisibility","click [data-toggle-open]":"toggleOpening","click [data-toggle-select]":"handleSelect","mouseover [data-toggle-select]":"handleHover","mouseout [data-toggle-select]":"handleHoverOut","dblclick [data-name]":"handleEdit","keydown [data-name]":"handleEditKey","focusout [data-name]":"handleEditEnd"}},r.prototype.template=function(t){var e=this,n=e.pfx,r=e.ppfx,o=e.config,i=e.clsNoEdit,a=e.module,s=e.opt,l=e.em,c=o.hidable,u=a.getComponents(t).length,p=u?"":this.clsNoChild,d="".concat(this.clsTitle," ").concat(p),f="".concat(this.clsTitleC," ").concat(r,"one-bg"),h="".concat(this.inputNameCls," ").concat(i," ").concat(r,"no-app"),g=s.level+1,m="".concat(30+10*g,"px"),v=t.getName(),y=t.getIcon(),b="".concat(n,"layer"),_=(null==l?void 0:l.getConfig()).icons,T=_.move,C=_.eye,w=_.eyeOff,E=_.chevron;return"\n ".concat(c?'<i class="'.concat(n,'layer-vis" data-toggle-visible>\n <i class="').concat(n,'layer-vis-on">').concat(C,'</i>\n <i class="').concat(n,'layer-vis-off">').concat(w,"</i>\n </i>"):"",'\n <div class="').concat(f,'">\n <div class="').concat(d,'" style="padding-left: ').concat(m,'" data-toggle-select>\n <div class="').concat(n,'layer-title-inn" title="').concat(v,'">\n <i class="').concat(this.clsCaret,'" data-toggle-open>').concat(E,"</i>\n ").concat(y?'<span class="'.concat(b,'__icon">').concat(y,"</span>
1"):"",'\n <span class="').concat(h,'" data-name>').concat(v,'</span>\n </div>\n </div>\n </div>\n <div class="').concat(this.clsCount,'" data-count>').concat(u||"",'</div>\n <div class="').concat(this.clsMove,'" data-toggle-move>').concat(T||"",'</div>\n <div class="').concat(this.clsChildren,'"></div>')},Object.defineProperty(r.prototype,"em",{get:function(){return this.module.em},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"ppfx",{get:function(){return this.em.getConfig().stylePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"pfx",{get:function(){return this.config.stylePrefix},enumerable:!1,configurable:!0}),r.prototype.initComponent=function(){var t=this,e=this.model,n=this.config.onInit,r=e.components();this.listenTo(r,"remove add reset",this.checkChildren),[["change:status",this.updateStatus],["change:open",this.updateOpening],["change:layerable",this.updateLayerable],["change:style:display",this.updateVisibility],["rerender:layer",this.render],["change:name change:custom-name",this.updateName]].forEach(function(n){return t.listenTo(e,n[0],n[1])}),this.$el.data("model",e),this.$el.data("collection",r),e.viewLayer=this,n.bind(this)({component:e,render:this.__render,listenTo:this.listenTo})},r.prototype.updateName=function(){this.getInputName().innerText=this.model.getName()},r.prototype.getVisibilityEl=function(){return this.eyeEl||(this.eyeEl=this.$el.children(".".concat(this.pfx,"layer-vis"))),this.eyeEl},r.prototype.updateVisibility=function(){var t=this,e=t.pfx,n=t.model,r=t.module,o="".concat(e,"layer-hidden"),i=r.isVisible(n)?"removeClass":"addClass";this.$el[i](o),this.getVisibilityEl()[i]("".concat(e,"layer-off"))},r.prototype.toggleVisibility=function(t){null==t||t.stopPropagation();var e=this.module,n=this.model;e.setVisible(n,!e.isVisible(n))},r.prototype.handleEdit=function(t){null==t||t.stopPropagation();var e=this,n=e.em,r=e.$el,o=e.clsNoEdit,i=e.clsEdit,a=this.getInputName();a[Us]="true",a.focus(),document.execCommand("selectAll",!1),n.setEditing(!0),r.find(".".concat(this.inputNameCls)).removeClass(o).addClass(i)},r.prototype.handleEditKey=function(t){t.stopPropagation(),((0,e.isEscKey)(t)||(0,e.isEnterKey)(t))&&this.handleEditEnd(t)},r.prototype.handleEditEnd=function(t){null==t||t.stopPropagation();var e=this,n=e.em,r=e.$el,o=e.clsNoEdit,i=e.clsEdit,a=this.getInputName(),s=a.textContent;a.scrollLeft=0,a[Us]="false",this.setName(s,{component:this.model,propName:"custom-name"}),n.setEditing(!1),r.find(".".concat(this.inputNameCls)).addClass(o).removeClass(i),this.updateName()},r.prototype.setName=function(t,e){var n=e.propName;this.model.set(n,t)},r.prototype.getInputName=function(){return this.inputName||(this.inputName=this.el.querySelector(".".concat(this.inputNameCls))),this.inputName},r.prototype.updateOpening=function(){var t=this,e=t.$el,n=t.model,r=t.pfx,o="open",i="".concat(r,"layer-open"),a=this.getCaret();this.module.isOpen(n)?(e.addClass(o),a.addClass(i)):(e.removeClass(o),a.removeClass(i))},r.prototype.toggleOpening=function(t){var e=this.model,n=this.module;null==t||t.stopImmediatePropagation(),e.get("components").length&&n.setOpen(e,!n.isOpen(e))},r.prototype.handleSelect=function(t){null==t||t.stopPropagation();var e=this.module,n=this.model;e.setLayerData(n,{selected:!0},{event:t})},r.prototype.handleHover=function(t){null==t||t.stopPropagation();var e=this.module,n=this.model;e.setLayerData(n,{hovered:!0})},r.prototype.handleHoverOut=function(t){null==t||t.stopPropagation();var e=this.module,n=this.model;e.setLayerData(n,{hovered:!1})},r.prototype.startSort=function(t){t.stopPropagation();var e=this.em,n=this.sorter;t.button&&0!==t.button||n&&(n.onStart=function(t){return e.trigger("".concat(qe,":start"),t)},n.onMoveClb=function(t){return e.trigger(qe,t)},n.startSort(t.target))},r.prototype.updateStatus=function(){sn.prototype.updateStatus.apply(this,[{avoidHover:!this.config.highlightHover,noExtHl:!0}])},r.prototype.checkChildren=function(){var t=this,e=t.model,n=t.clsNoChild,r=t.$el,o=t.module,i=o.getComponents(e).length,a=r.children(".".concat(this.clsTitleC)).children(".".concat(this.clsTitle)),s=this.cnt;s||(s=r.children("[data-count]").get(0),this.cnt=s),a[i?"removeClass":"addClass"](n),s&&(s.innerHTML=i||""),!i&&o.setOpen(e,!1)},r.prototype.getCaret=function(){return this.caret&&this.caret.length||(this.caret=this.$el.children(".".concat(this.clsTitleC)).find(".".concat(this.clsCaret))),this.caret},r.prototype.setRoot=function(n){var r;n=(0,t.isString)(n)?null===(r=this.em.getWrapper())||void 0===r?void 0:r.find(n)[0]:n;var o=(0,e.getModel)(n,0);o&&(this.stopListening(),this.model=o,this.initComponent(),this._rendered&&this.render())},r.prototype.updateLayerable=function(){(this.parentView||this).render()},r.prototype.__clearItems=function(){var t;null===(t=this.items)||void 0===t||t.remove()},r.prototype.remove=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return u.G7.prototype.remove.apply(this,t),this.__clearItems(),this},r.prototype.render=function(){var t=this,e=t.model,n=t.config,r=t.pfx,o=t.ppfx,i=t.opt,a=t.sorter;this.__clearItems();var s=i.opened,l=i.module,c=i.ItemView,u=!l.__isLayerable(e),p=this.$el.empty(),d=i.level+1;delete this.inputName,this.items=new Bs({ItemView:c,collection:e.get("
1components"),config:n,sorter:a,opened:s,parentView:this,parent:e,level:d,module:l});var f=this.items.render().$el;return n.showWrapper||1!==d?(p.html(this.template(e)),p.find(".".concat(this.clsChildren)).append(f)):p.append(f),e.get("draggable")&&n.sortable||p.children(".".concat(this.clsMove)).remove(),!l.isVisible(e)&&(this.className+=" ".concat(r,"hide")),u&&(this.className+=" ".concat(o,"hidden")),p.attr("class",this.className),this.updateStatus(),this.updateOpening(),this.updateVisibility(),this.__render(),this._rendered=!0,this},r.prototype.__render=function(){var t=this,e=t.model,n=t.config,r={component:e,el:t.el};n.onRender.bind(this)(r),this.em.trigger("layer:render",r)},r}(u.G7);const Gs=zs;var $s=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),qs=function(){return qs=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},qs.apply(this,arguments)},Ws="layer",Ks="".concat(Ws,":"),Ys="".concat(Ks,"root"),Xs="".concat(Ks,"component"),Zs="".concat(Ks,"custom"),Qs={all:Ws,root:Ys,component:Xs,custom:Zs},Js={mediaText:""},tl=["open","status","locked","custom-name","components","classes"].map(function(t){return"component:update:".concat(t)}).join(" "),el=function(n){function r(e){var r=n.call(this,e,"LayerManager",js)||this;return r.events=Qs,(0,t.bindAll)(r,"componentChanged","__onRootChange","__onComponent"),r.model=new C(r,{opened:{}}),r.config.stylePrefix=r.config.pStylePrefix,r}return $s(r,n),r.prototype.onLoad=function(){var t=this,e=this,n=e.em,r=e.config,o=e.model;o.listenTo(n,"component:selected",this.componentChanged),o.on("change:root",this.__onRootChange),o.listenTo(n,tl,this.__onComponent),this.componentChanged(),o.listenToOnce(n,"load",function(){t.setRoot(r.root),t.__appendTo()})},r.prototype.setRoot=function(n){var r=this.em.getWrapper(),o=(0,e.isComponent)(n)?n:r;return n&&(0,t.isString)(n)&&(0,e.hasWin)()&&(o=r.find(n)[0]||r),this.model.set("root",o),o},r.prototype.getRoot=function(){return this.model.get("root")},r.prototype.getComponents=function(t){var e=this;return t.components().filter(function(t){return e.__isLayerable(t)})},r.prototype.setOpen=function(t,e){t.set("open",e)},r.prototype.isOpen=function(t){return!!t.get("open")},r.prototype.setVisible=function(t,e){var n="__prev-display",r=t.getStyle(Js),o=r.display;if(e){var i=t.get(n);delete r.display,i&&(r.display=i,t.unset(n))}else o&&t.set(n,o),r.display="none";t.setStyle(r,Js),this.updateLayer(t),this.em.trigger("component:toggled")},r.prototype.isVisible=function(t){return void 0===(e=t.getStyle(Js))&&(e={}),!(0===(e.display||"").trim().indexOf("none"));var e},r.prototype.setLocked=function(t,e){t.set("locked",e)},r.prototype.isLocked=function(t){return!!t.get("locked")},r.prototype.setName=function(t,e){t.set("custom-name",e)},r.prototype.getName=function(t){return t.getName()},r.prototype.getLayerData=function(t){var e=t.get("status");return{name:t.getName(),open:this.isOpen(t),selected:"selected"===e,hovered:"hovered"===e,visible:this.isVisible(t),locked:this.isLocked(t),components:this.getComponents(t)}},r.prototype.setLayerData=function(t,n,r){var o;void 0===r&&(r={});var i=this.em,a=this.config,s=n.open,l=n.selected,c=n.hovered,u=n.visible,p=n.locked,d=n.name,f=qs({fromLayers:!0},r);if((0,e.isDef)(s)&&this.setOpen(t,s),(0,e.isDef)(l))if(l){i.setSelected(t,f);var h=a.scrollCanvas;h&&(null===(o=t.views)||void 0===o||o.forEach(function(t){return t.scrollIntoView(h)}))}else i.removeSelected(t,f);(0,e.isDef)(c)&&a.showHover&&(c?i.setHovered(t,f):i.setHovered(null,f)),(0,e.isDef)(u)&&u!==this.isVisible(t)&&this.setVisible(t,u),(0,e.isDef)(p)&&this.setLocked(t,p),(0,e.isDef)(d)&&this.setName(t,d)},r.prototype.componentChanged=function(t,e){var n;if(void 0===e&&(e={}),!e.fromLayers){var r=this.em,o=this.config.scrollLayers,i=this.model.get("opened"),a=r.getSelected(),s=null==a?void 0:a.parent();for(var l in i)i[l].set("open",!1),delete i[l];for(;s;)s.set("open",!0),i[s.cid]=s,s=s.parent();if(a&&o){var c=null===(n=a.viewLayer)||void 0===n?void 0:n.el;null==c||c.scrollIntoView(o)}}},r.prototype.getAll=function(){return this.view},r.prototype.render=function(){var t,e,n=this.config,r=this.model,o=Gs.extend(n.extend);return this.view=new o({el:null===(t=this.view)||void 0===t?void 0:t.el,ItemView:o,level:0,config:n,opened:r.get("opened"),model:this.getRoot(),module:this}),null===(e=this.view)||void 0===e?void 0:e.render().el},r.prototype.destroy=function(){var t;null===(t=this.view)||void 0===t||t.remove()},r.prototype.__onRootChange=function(){var t,e=this.getRoot();null===(t=this.view)||void 0===t||t.setRoot(e),this.em.trigger(Ys,e)},r.prototype.__onComponent=function(t){this.updateLayer(t)},r.prototype.__isLayerable=function(t){var e=t.get("tagName");return(!this.config.hideTextnode||!t.is("textnode")&&"br"!==e)&&t.get("layerable")},r.prototype.__trgCustom=function(t){this.em.trigger(this.events.custom,{container:t.container,root:this.getRoot()})},r.prototype.updateLayer=function(t,e){this.em.trigger(Xs,t,e)},r}(y);const nl=el,rl={assets:[],noAssets:"",stylePrefix:"am-",upload:"",uploadName:"files",headers:{},params:{},credentials:"include",multiUpload:!0,autoAdd:!0,customFetch:void 0,uploadFile:void 0,embedAsBase64:!0,handleAdd:void 0,beforeUpload:void 0,showUrlInput:!0,custom:!1,dropzone:!1,openAssetsOnDrop:!0,dropzoneContent:""};var ol=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),il=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return ol(n,e),n.getDefaults=function(){return(0,t.result)(this.prototype,"defaults")},n.prototype.defaults=function(){return{type:"",src:""}},n.prototype.getType=function(){return this.get("type")},n.prototype.getSrc=function(){return this.get("src")},n.prototype.getFilename=function(){return this.get("src").split("/").pop().split("?").shift()},n.prototype.getExtension=function(){return this.getFilename().split(".").pop()},n}(u.Hn);const al=il;il.prototype.idAttribute="src";var sl=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ll=function(){return ll=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},ll.apply(this,arguments)};const cl=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return sl(e,t),e.prototype.defaults=function(){return ll(ll({},al.getDefaults()),{type:"image",unitDim:"px",height:0,width:0})},e}(al);var ul=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),pl=function(e){function n(t){var n=e.call(this,t)||this;n.options=t,n.collection=t.collection;var r=t.config||{};n.config=r,n.pfx=r.stylePrefix||"",n.ppfx=r.pStylePrefix||"",n.em=r.em,n.className=n.pfx+"asset",n.listenTo(n.model,"de
1stroy remove",n.remove),n.model.view=n;var o=n.init&&n.init.bind(n);return o&&o(t),n}return ul(n,e),n.prototype.__getBhv=function(){var t=this.em,e=null==t?void 0:t.Assets;return(null==e?void 0:e.__getBehaviour())||{}},n.prototype.template=function(t,e){var n=this.pfx;return'\n <div class="'.concat(n,'preview-cont">\n ').concat(this.getPreview(),'\n </div>\n <div class="').concat(n,'meta">\n ').concat(this.getInfo(),'\n </div>\n <div class="').concat(n,'close" data-toggle="asset-remove">\n ⨯\n </div>\n ')},n.prototype.updateTarget=function(e){e&&e.set&&(e.set("attributes",(0,t.clone)(e.get("attributes"))),e.set("src",this.model.get("src")))},n.prototype.getPreview=function(){return""},n.prototype.getInfo=function(){return""},n.prototype.render=function(){var t=this.el;return t.innerHTML=this.template(this,this.model),t.className=this.className,this},n}(u.G7);const dl=pl;var fl=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),hl=function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t},gl=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return fl(r,e),r.prototype.getPreview=function(){var t=this,e=t.pfx,r=t.ppfx,o=t.model.get("src");return n(vl||(vl=hl(['\n <div class="','preview" style="background-image: url(\'','\');"></div>\n <div class="',"preview-bg ",'checker-bg"></div>\n '],['\n <div class="','preview" style="background-image: url(\'','\');"></div>\n <div class="',"preview-bg ",'checker-bg"></div>\n '])),e,o,e,r)},r.prototype.getInfo=function(){var t=this.pfx,e=this.model,r=e.get("name"),o=e.get("width"),i=e.get("height"),a=e.get("unitDim"),s=o&&i?"".concat(o,"x").concat(i).concat(a):"";return r=r||e.getFilename(),n(yl||(yl=hl(['\n <div class="','name">','</div>\n <div class="','dimensions">',"</div>\n "],['\n <div class="','name">','</div>\n <div class="','dimensions">',"</div>\n "])),t,r,t,s)},r.prototype.init=function(t){var e=this.pfx;this.className+=" ".concat(e,"asset-image")},r.prototype.onClick=function(){var e=this.model,n=this.pfx,r=this.__getBhv().select,o=this.config.onClick,i=this.collection;i.trigger("deselectAll"),this.$el.addClass(n+"highlight"),(0,t.isFunction)(r)?r(e,!1):(0,t.isFunction)(o)?o(e):this.updateTarget(i.target)},r.prototype.onDblClick=function(){var e=this.em,n=this.model,r=this.__getBhv().select,o=this.config.onDblClick,i=this.collection,a=i.target,s=i.onSelect;(0,t.isFunction)(r)?r(n,!0):(0,t.isFunction)(o)?o(n):(this.updateTarget(a),null==e||e.Modal.close()),(0,t.isFunction)(s)&&s(n)},r.prototype.onRemove=function(t){t.stopImmediatePropagation(),this.model.collection.remove(this.model)},r}(dl);const ml=gl;var vl,yl;gl.prototype.events={"click [data-toggle=asset-remove]":"onRemove",click:"onClick",dblclick:"onDblClick"};var bl=function(){return bl=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},bl.apply(this,arguments)},_l={types:[],initialize:function(t,e){var n=this;void 0===e&&(e={});var r=e.em;this.em=r,this.opts=e,this.model=function(t,e){var o,i,a;if(void 0===t&&(t={}),void 0===e&&(e={}),t&&t.type){var s=n.getBaseType();o=(a=n.getType(t.type))?a.model:s.model,i=a?a.view:s.view}else{var l=n.recognizeType(t);o=(a=l.type).model,i=a.view,t=l.attributes}var c=new o(t,bl(bl({},e),{em:r}));return c.typeView=i,c};var o=this.init&&this.init.bind(this);o&&o()},recognizeType:function(t){for(var e=this.getTypes(),n=0;n<e.length;n++){var r=e[n],o=r.isType(t);if(o="boolean"==typeof o&&o?{type:r.id}:o)return{type:r,attributes:o}}return{type:this.getBaseType(),attributes:t}},getBaseType:function(){var t=this.getTypes();return t[t.length-1]},getTypes:function(){return this.types},getType:function(t){for(var e=this.getTypes(),n=0;n<e.length;n++){var r=e[n];if(r.id===t)return r}},addType:function(e,n){var r=this.getType(e),o=this.getBaseType(),i=r?r.model:o.model,a=r?r.view:o.view,s=n.model,l=n.view,c=n.isType;s=s instanceof u.Hn||(0,t.isFunction)(s)?s:i.extend(s||{}),l=l instanceof u.G7||(0,t.isFunction)(l)?l:a.extend(l||{}),!this.extendViewApi||n.model||n.view||(l=l.extend(n)),r?(r.model=s,r.view=l,r.isType=c||r.isType):(n.id=e,n.model=s,n.view=l,n.isType=c||function(t){if(t&&t.type==e)return!0},this.getTypes().unshift(n))}};const Tl=_l;var Cl=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),wl=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Cl(e,t),e}(u.FE.extend(Tl));const El=wl;wl.prototype.types=[{id:"image",model:cl,view:ml,isType:function(t){return"string"==typeof t?{type:"image",src:t}:t}}];var Sl=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),xl=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,e)||this;n.options=e,n.config=e.config,n.pfx=n.config.stylePrefix||"",n.ppfx=n.config.pStylePrefix||"",n.em=n.config.em;var r=n.collection;return n.listenTo(r,"reset",n.renderAssets),n.listenTo(r,"add",n.addToAsset),n.listenTo(r,"remove",n.removedAsset),n.listenTo(r,"deselectAll",n.deselectAll),n}return Sl(e,t),e.prototype.template=function(t){var e=t.pfx,n=t.ppfx,r=t.em,o="";return this.config.showUrlInput&&(o='\n <form class="'.concat(e,'add-asset">\n <div class="').concat(n,"field ").concat(e,'add-field">\n <input placeholder="').concat(null==r?void 0:r.t("assetManager.inputPlh"),'"/>\n </div>\n <button class="').concat(n,'btn-prim">').concat(null==r?void 0:r.t("assetManager.addButton"),'</button>\n <div style="clear:both"></div>\n </form>\n ')),'\n <div class="'.concat(e,'assets-cont">\n <div class="').concat(e,'assets-header">\n ').concat(o,'\n </div>\n <div class="').concat(e,'assets" data-el="assets"></div>\n <div style="clear:both"></div>\n </div>\n ')},e.prototype.handleSubmit=function(t){t.preventDefault();
1var e=this.getAddInput(),n=e&&e.value.trim(),r=this.config.handleAdd;if(n){e.value="";var o=this.getAssetsEl();o&&(o.scrollTop=0),r?r.bind(this)(n):this.options.globalCollection.add(n,{at:0})}},e.prototype.getAssetsEl=function(){return this.el.querySelector(".".concat(this.pfx,"assets"))},e.prototype.getAddInput=function(){return this.inputUrl&&this.inputUrl.value||(this.inputUrl=this.el.querySelector(".".concat(this.pfx,"add-asset input"))),this.inputUrl},e.prototype.removedAsset=function(t){this.collection.length||this.toggleNoAssets()},e.prototype.addToAsset=function(t){1==this.collection.length&&this.toggleNoAssets(!0),this.addAsset(t)},e.prototype.addAsset=function(t,e){void 0===e&&(e=null);var n=e,r=this.collection,o=this.config,i=new t.typeView({model:t,collection:r,config:o}).render().el;if(n)n.appendChild(i);else{var a=this.getAssetsEl();a&&a.insertBefore(i,a.firstChild)}return i},e.prototype.toggleNoAssets=function(t){void 0===t&&(t=!1);var e=this.$el.find(".".concat(this.pfx,"assets"));if(t)e.empty();else{var n=this.config.noAssets;n&&e.append(n)}},e.prototype.deselectAll=function(){var t=this.pfx;this.$el.find(".".concat(t,"highlight")).removeClass("".concat(t,"highlight"))},e.prototype.renderAssets=function(){var t=this,e=document.createDocumentFragment(),n=this.$el.find(".".concat(this.pfx,"assets"));n.empty(),this.toggleNoAssets(!!this.collection.length),this.collection.each(function(n){return t.addAsset(n,e)}),n.append(e)},e.prototype.render=function(){var t=this.options.fu.render().el;return this.$el.empty(),this.$el.append(t).append(this.template(this)),this.el.className="".concat(this.ppfx,"asset-manager"),this.renderAssets(),this},e}(u.G7);const Ol=xl;xl.prototype.events={submit:"handleSubmit"};var Al=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),kl=function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t},Pl=function(t){function e(n){void 0===n&&(n={});var r=t.call(this,n)||this;r.options=n;var o=n.config||{};r.module=n.module,r.config=o,r.em=r.config.em,r.pfx=o.stylePrefix||"",r.ppfx=o.pStylePrefix||"",r.target=r.options.globalCollection||{},r.uploadId=r.pfx+"uploadFile",r.disabled=void 0!==o.disableUpload?o.disableUpload:!o.upload&&!o.embedAsBase64,r.multiUpload=void 0===o.multiUpload||o.multiUpload;var i=o.uploadFile;return i?r.uploadFile=i.bind(r):!o.upload&&o.embedAsBase64&&(r.uploadFile=e.embedAsBase64),r.delegateEvents(),r}return Al(e,t),e.prototype.template=function(t){var e=t.pfx,r=t.title,o=t.uploadId,i=t.disabled,a=t.multiUpload;return n(Ml||(Ml=kl(['\n <form>\n <div id="','title">','</div>\n <input\n data-input\n type="file"\n id="','"\n name="file"\n accept="*/*"\n ',"\n ",'\n />\n <div style="clear:both;"></div>\n </form>\n '],['\n <form>\n <div id="','title">','</div>\n <input\n data-input\n type="file"\n id="','"\n name="file"\n accept="*/*"\n ',"\n ",'\n />\n <div style="clear:both;"></div>\n </form>\n '])),e,r,o,i?"disabled":"",a?"multiple":"")},e.prototype.events=function(){return{"change [data-input]":"uploadFile"}},e.prototype.onUploadStart=function(){var t=this.module;t&&t.__propEv("asset:upload:start")},e.prototype.onUploadEnd=function(t){var e=this.$el,n=this.module;n&&n.__propEv("asset:upload:end",t);var r=e.find("input");r&&r.val("")},e.prototype.onUploadError=function(t){var e=this.module;console.error(t),this.onUploadEnd(t),e&&e.__propEv("asset:upload:error",t)},e.prototype.onUploadResponse=function(t,e){var n,r=this,o=r.module,i=r.config,a=r.target;try{n="string"==typeof t?JSON.parse(t):t}catch(e){n=t}o&&o.__propEv("asset:upload:response",n),i.autoAdd&&a&&a.add(n.data,{at:0}),this.onUploadEnd(t),null==e||e(n)},e.prototype.uploadFile=function(t,e){var n=this,r=t.dataTransfer?t.dataTransfer.files:t.target.files,o=this.config,i=o.beforeUpload;if(!1!==(i&&i(r))){var a=new FormData,s=o.params,l=o.customFetch,c=o.fetchOptions;for(var u in s)a.append(u,s[u]);if(this.multiUpload)for(var p=0;p<r.length;p++)a.append("".concat(o.uploadName,"[]"),r[p]);else r.length&&a.append(o.uploadName,r[0]);var d=o.upload,f=o.headers,h="X-Requested-With";if(void 0===f[h]&&(f[h]="XMLHttpRequest"),d){this.onUploadStart();var g={method:"post",credentials:o.credentials||"include",headers:f,body:a},m=(null==c?void 0:c(g))||g;return(l?l(d,m):ja(d,m).then(function(t){return 1==(t.status/200|0)?t.text():t.text().then(function(t){return Promise.reject(t)})})).then(function(t){return n.onUploadResponse(t,e)}).catch(function(t){return n.onUploadError(t)})}}},e.prototype.initDrop=function(){var t=this;if(!this.uploadForm){this.uploadForm=this.$el.find("form").get(0);var e=this.uploadForm;"draggable"in e&&(this.uploadForm.ondragover=function(){return e.className=t.pfx+"hover",!1},this.uploadForm.ondragleave=function(){return e.className="",!1},this.uploadForm.ondrop=function(n){e.className="",n.preventDefault(),t.uploadFile(n)})}},e.prototype.initDropzone=function(t){var e=this,n=0,r=this.config,o=t.model,i=t.el,a=o.Editor,s=o.Canvas.getBody(),l=this.ppfx,c="".concat(l,"dropzone-active"),u="".concat(l,"dropzone"),p=function(){i.className=i.className.replace(c,"").trim(),n=0},d=function(){return n||(i.className+=" ".concat(c),n=1),!1},f=function(){return p(),!1},h=function(t){if(p(),t.preventDefault(),t.stopPropagation(),e.uploadFile(t),r.openAssetsOnDrop&&a){var n=a.getSelected();a.runCommand("open-assets",{target:n,onSelect:function(){a.Modal.close(),a.AssetManager.setTarget(null)}})}return!1};t.$el.append('<div class="'.concat(u,'">').concat(r.dropzoneContent,"</div>
1")),p(),"draggable"in i&&[i,s].forEach(function(t){t.ondragover=d,t.ondragleave=f,t.ondrop=h})},e.prototype.render=function(){var t=this,e=t.$el,n=t.pfx,r=t.em;return e.html(this.template({title:r&&r.t("assetManager.uploadTitle"),uploadId:this.uploadId,disabled:this.disabled,multiUpload:this.multiUpload,pfx:n})),this.initDrop(),e.attr("class",n+"file-uploader"),this},e.embedAsBase64=function(t,e){var n=this,r=t.dataTransfer?t.dataTransfer.files:t.target.files,o={data:[]};if(FileReader){for(var i=[],a=/^(.+)\/(.+)$/,s=function(t){var e=new Promise(function(e,n){var r=new FileReader;r.addEventListener("load",function(o){var i,s=t.name,l=a.exec(t.type);if("image"===(i=l?l[1]:t.type)){var c={src:r.result,name:s,type:i,height:0,width:0},u=new Image;u.addEventListener("error",function(t){n(t)}),u.addEventListener("load",function(){c.height=u.height,c.width=u.width,e(c)}),u.src=c.src}else e(i?{src:r.result,name:s,type:i}:r.result)}),r.addEventListener("error",function(t){n(t)}),r.addEventListener("abort",function(t){n("Aborted")}),r.readAsDataURL(t)});i.push(e)},l=0,c=r;l<c.length;l++)s(c[l]);return Promise.all(i).then(function(t){o.data=t,n.onUploadResponse(o,e)},function(t){n.onUploadError(t)})}this.onUploadError(new Error("Unsupported platform, FileReader is not defined"))},e}(u.G7);const Nl=Pl;var Ml,Ll=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Il=function(){return Il=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Il.apply(this,arguments)},Dl=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},Rl="asset",jl="".concat(Rl,":"),Hl="".concat(jl,"select"),Fl="".concat(jl,"update"),Bl="".concat(jl,"add"),Vl="".concat(jl,"remove"),Ul="".concat(Vl,":before"),zl="".concat(jl,"custom"),Gl="".concat(jl,"open"),$l="".concat(jl,"close"),ql="".concat(jl,"upload"),Wl="".concat(ql,":start"),Kl="".concat(ql,":end"),Yl="".concat(ql,":error"),Xl="".concat(ql,":response"),Zl="open-assets",Ql={all:Rl,select:Hl,update:Fl,add:Bl,remove:Vl,removeBefore:Ul,custom:zl,open:Gl,close:$l,uploadStart:Wl,uploadEnd:Kl,uploadError:Yl,uploadResponse:Xl},Jl=function(e){function n(n){var r=e.call(this,n,"AssetManager",new El([],n),Ql,rl)||this;r.storageKey="assets",r.Asset=al,r.Assets=El;var o=r,i=o.all,a=o.config;r.assetsVis=new El([]);var s=a.pStylePrefix;return s&&(a.stylePrefix="".concat(s).concat(a.stylePrefix)),i.on("add",function(t){return r.getAllVisible().add(t)}),i.on("remove",function(t){return r.getAllVisible().remove(t)}),r.__onAllEvent=(0,t.debounce)(function(){return r.__trgCustom()},0),r}return Ll(n,e),n.prototype.__propEv=function(t){for(var e,n,r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];(e=this.em).trigger.apply(e,Dl([t],r,!1)),(n=this.getAll()).trigger.apply(n,Dl([t],r,!1))},n.prototype.__trgCustom=function(){var t=this.__getBehaviour(),e=this.getConfig().custom;(t.container||e.open)&&this.em.trigger(this.events.custom,this.__customData())},n.prototype.__customData=function(){var e=this,n=this.__getBehaviour();return{am:this,open:this.isOpen(),assets:this.getAll().models,types:n.types||[],container:n.container,close:function(){return e.close()},remove:function(t,n){return e.remove(t,n)},select:function(r,o){var i=e.add(r);(0,t.isFunction)(n.select)&&n.select(i,o)},options:n.options||{}}},n.prototype.open=function(t){void 0===t&&(t={}),this.em.Commands.run(Zl,Il({types:["image"],select:function(){}},t))},n.prototype.close=function(){this.em.Commands.stop(Zl)},n.prototype.isOpen=function(){var t=this.em.Commands;return!!(null==t?void 0:t.isActive(Zl))},n.prototype.add=function(t,e){return void 0===e&&(e={}),void 0===e.at&&(e.at=0),this.all.add(t,e)},n.prototype.get=function(t){return this.all.where({src:t})[0]||null},n.prototype.getAll=function(){return this.all},n.prototype.getAllVisible=function(){return this.assetsVis},n.prototype.remove=function(t,e){return this.__remove(t,e)},n.prototype.store=function(){return this.getProjectData()},n.prototype.load=function(t){return this.loadProjectData(t)},n.prototype.getContainer=function(){var t;return this.__getBehaviour().container||(null===(t=this.am)||void 0===t?void 0:t.el)},n.prototype.getAssetsEl=function(){var t;return null===(t=this.am)||void 0===t?void 0:t.el.querySelector("[data-el=assets]")},n.prototype.render=function(t){if(!this.getConfig().custom){var e=t||this.getAll().models;if(!this.am){var n=this.__viewParams();n.fu=this.FileUploader(),this.am=new Ol(Il({},n)),this.am.render()}return this.assetsVis.reset(e),this.getContainer()}},n.prototype.__viewParams=function(){return{collection:this.assetsVis,globalCollection:this.all,config:this.config,module:this,fu:void 0}}
1,n.prototype.addType=function(t,e){this.getAll().addType(t,e)},n.prototype.getType=function(t){return this.getAll().getType(t)},n.prototype.getTypes=function(){return this.getAll().getTypes()},n.prototype.AssetsView=function(){return this.am},n.prototype.FileUploader=function(){return this.fu||(this.fu=new Nl(this.__viewParams())),this.fu},n.prototype.onLoad=function(){var t=this;this.getAll().reset(this.config.assets);var e=this.em,n=this.events;e.on("run:".concat(Zl),function(){return t.__propEv(n.open)}),e.on("stop:".concat(Zl),function(){return t.__propEv(n.close)})},n.prototype.postRender=function(t){var e;this.config.dropzone&&(null===(e=this.fu)||void 0===e||e.initDropzone(t))},n.prototype.setTarget=function(t){this.assetsVis.target=t},n.prototype.onSelect=function(t){this.assetsVis.onSelect=t},n.prototype.onClick=function(t){this.config.onClick=t},n.prototype.onDblClick=function(t){this.config.onDblClick=t},n.prototype.__behaviour=function(t){return void 0===t&&(t={}),this._bhv=Il(Il({},this._bhv||{}),t)},n.prototype.__getBehaviour=function(t){return void 0===t&&(t={}),this._bhv||{}},n.prototype.destroy=function(){var t,e;this.all.stopListening(),this.all.reset(),this.assetsVis.stopListening(),this.assetsVis.reset(),null===(t=this.fu)||void 0===t||t.remove(),null===(e=this.am)||void 0===e||e.remove(),this._bhv={}},n}(b);const tc=Jl;var ec={placeholder:"eg. Text here"};const nc={locale:"en",localeFallback:"en",detectLocale:!0,debug:!1,messages:{en:{assetManager:{addButton:"Add image",inputPlh:"http://path/to/the/image.jpg",modalTitle:"Select Image",uploadTitle:"Drop files here or click to upload"},blockManager:{labels:{},categories:{}},domComponents:{names:{"":"Box",wrapper:"Body",text:"Text",comment:"Comment",image:"Image",video:"Video",label:"Label",link:"Link",map:"Map",tfoot:"Table foot",tbody:"Table body",thead:"Table head",table:"Table",row:"Table row",cell:"Table cell"}},deviceManager:{device:"Device",devices:{desktop:"Desktop",tablet:"Tablet",mobileLandscape:"Mobile Landscape",mobilePortrait:"Mobile Portrait"}},panels:{buttons:{titles:{preview:"Preview",fullscreen:"Fullscreen","sw-visibility":"View components","export-template":"View code","open-sm":"Open Style Manager","open-tm":"Settings","open-layers":"Open Layer Manager","open-blocks":"Open Blocks"}}},selectorManager:{label:"Classes",selected:"Selected",emptyState:"- State -",states:{hover:"Hover",active:"Click","nth-of-type(2n)":"Even/Odd"}},styleManager:{empty:"Select an element before using Style Manager",layer:"Layer",fileButton:"Images",sectors:{general:"General",layout:"Layout",typography:"Typography",decorations:"Decorations",extra:"Extra",flex:"Flex",dimension:"Dimension"},properties:{"text-shadow-h":"X","text-shadow-v":"Y","text-shadow-blur":"Blur","text-shadow-color":"Color","box-shadow-h":"X","box-shadow-v":"Y","box-shadow-blur":"Blur","box-shadow-spread":"Spread","box-shadow-color":"Color","box-shadow-type":"Type","margin-top-sub":"Top","margin-right-sub":"Right","margin-bottom-sub":"Bottom","margin-left-sub":"Left","padding-top-sub":"Top","padding-right-sub":"Right","padding-bottom-sub":"Bottom","padding-left-sub":"Left","border-width-sub":"Width","border-style-sub":"Style","border-color-sub":"Color","border-top-left-radius-sub":"Top Left","border-top-right-radius-sub":"Top Right","border-bottom-right-radius-sub":"Bottom Right","border-bottom-left-radius-sub":"Bottom Left","transform-rotate-x":"Rotate X","transform-rotate-y":"Rotate Y","transform-rotate-z":"Rotate Z","transform-scale-x":"Scale X","transform-scale-y":"Scale Y","transform-scale-z":"Scale Z","transition-property-sub":"Property","transition-duration-sub":"Duration","transition-timing-function-sub":"Timing","background-image-sub":"Image","background-repeat-sub":"Repeat","background-position-sub":"Position","background-attachment-sub":"Attachment","background-size-sub":"Size"}},traitManager:{empty:"Select an element before using Trait Manager",label:"Component settings",traits:{labels:{},attributes:{id:ec,alt:ec,title:ec,href:{placeholder:"eg. https://google.com"}},options:{target:{false:"This window",_blank:"New window"}}}}
1,storageManager:{recover:"Do you want to recover unsaved changes?"}}},messagesAdd:void 0};var rc=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),oc=function(n){function r(t){var e=n.call(this,t,"I18n",nc)||this,r=e.config.messagesAdd;return r&&e.addMessages(r),e.config.detectLocale&&(e.config.locale=e._localLang()),e}return rc(r,n),r.prototype.setLocale=function(t){var e=this.em,n=this.config,r={value:t,valuePrev:n.locale};return e&&e.trigger("i18n:locale",r),n.locale=t,this},r.prototype.getLocale=function(){return this.config.locale},r.prototype.getMessages=function(t,e){void 0===e&&(e={});var n=this.config.messages;return t&&!n[t]&&this._debug("'".concat(t,"' i18n lang not found"),e),t?n[t]:n},r.prototype.setMessages=function(t){var e=this.em;return this.config.messages=t,e&&e.trigger("i18n:update",t),this},r.prototype.addMessages=function(t){var n=this.em,r=this.config.messages;return n&&n.trigger("i18n:add",t),this.setMessages((0,e.deepMerge)(r,t)),this},r.prototype.t=function(e,n){void 0===n&&(n={});var r=this.config,o=n.params||{},i=n.l||this.getLocale(),a=n.lFlb||r.localeFallback,s=this._getMsg(e,i,n);return s||(s=this._getMsg(e,a,n)),!s&&this._debug("'".concat(e,"' i18n key not found in '").concat(i,"' lang"),n),s&&(0,t.isString)(s)?this._addParams(s,o):s},r.prototype._localLang=function(){var t=(0,e.hasWin)()&&window.navigator||{},n=t.language||t.userLanguage;return n?n.split("-")[0]:"en"},r.prototype._addParams=function(t,e){var n=new RegExp("{([\\w\\d-]*)}","g");return t.replace(n,function(t,n){return e[n]||""}).trim()},r.prototype._getMsg=function(e,n,r){void 0===r&&(r={});var o=this.getMessages(n,r);if(o){var i=o[e];return!i&&e.indexOf(".")>0&&(i=e.split(".").reduce(function(e,n){if(!(0,t.isUndefined)(e))return e[n]},o)),i}},r.prototype._debug=function(t,e){void 0===e&&(e={});var n=this.em,r=this.config;(e.debug||r.debug)&&n&&n.logWarning(t)},r.prototype.destroy=function(){},r}(y);const ic=oc;var ac=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),sc=function(){return sc=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},sc.apply(this,arguments)},lc=function(){},cc=function(n){function r(){return null!==n&&n.apply(this,arguments)||this}return ac(r,n),r.prototype.initialize=function(e){void 0===e&&(e={}),this.opt=e||{},(0,t.bindAll)(this,"startSort","onMove","endMove","rollback","updateOffset","moveDragHelper");var n=e||{};this.elT=0,this.elL=0,this.borderOffset=n.borderOffset||10;var r=n.container;this.el="string"==typeof r?document.querySelector(r):r,this.$el=(0,c.default)(this.el),this.containerSel=n.containerSel||"div",this.itemSel=n.itemSel||"div",this.draggable=n.draggable||!0,this.nested=!!n.nested,this.pfx=n.pfx||"",this.ppfx=n.ppfx||"",this.freezeClass=n.freezeClass||this.pfx+"freezed",this.onStart=n.onStart||lc,this.onEndMove=n.onEndMove,this.customTarget=n.customTarget,this.onEnd=n.onEnd,this.direction=n.direction||"v",this.onMoveClb=n.onMove,this.relative=n.relative||!1,this.ignoreViewChildren=!!n.ignoreViewChildren,this.plh=n.placer,this.wmargin=n.wmargin||0,this.offTop=n.offsetTop||0,this.offLeft=n.offsetLeft||0,this.document=n.document||document,this.em=n.em,this.canvasRelative=!!n.canvasRelative,this.selectOnEnd=!n.avoidSelectOnEnd,this.scale=n.scale,this.em&&this.em.on&&(this.em.on("change:canvasOffset",this.updateOffset),this.updateOffset())},r.prototype.getScale=function(){return(0,t.result)(this,"scale")||1},r.prototype.getContainerEl=function(t){if(t&&(this.el=t),!this.el){var e=this.opt.container;this.el="string"==typeof e?document.querySelector(e):e,this.$el=(0,c.default)(this.el)}return this.el},r.prototype.getDocuments=function(t){var e=this.em,n=t?t.ownerDocument:null==e?void 0:e.Canvas.getBody().ownerDocument,r=[document];return n&&r.push(n),r},r.prototype.updateOffset=function(){var t,e=(null===(t=this.em)||void 0===t?void 0:t.get("canvasOffset"))||{};this.offTop=e.top,this.offLeft=e.left},r.prototype.setDropContent=function(t){delete this.dropModel,this.dropContent=t},r.prototype.updateTextViewCursorPosition=function(t){var n=this.em;if(n){var r=n.get("Canvas"),o=r.getDocument(),i=null;if(o.caretRangeFromPoint){var a=(0,e.getPointerEvent)(t);
1i=o.caretRangeFromPoint(a.clientX,a.clientY)}else t.rangeParent&&(i=o.createRange()).setStart(t.rangeParent,t.rangeOffset);var s=r.getWindow().getSelection();r.getFrameEl().focus(),s.removeAllRanges(),i&&s.addRange(i),this.setContentEditable(this.activeTextModel,!0)}},r.prototype.setContentEditable=function(t,e){if(t){var n=t.getEl();n.contentEditable!=e&&(n.contentEditable=e)}},r.prototype.toggleSortCursor=function(t){var e=this.em,n=e&&e.get("Canvas");n&&(t?n.startAutoscroll():n.stopAutoscroll())},r.prototype.setDragHelper=function(t,e){for(var n=e||"",r=t.cloneNode(!0),o=t.getBoundingClientRect(),i=getComputedStyle(t),a="",s=0;s<i.length;s++){var l=i[s];a+="".concat(l,":").concat(i.getPropertyValue(l),";")}document.body.appendChild(r),r.className+=" ".concat(this.pfx,"bdrag"),r.setAttribute("style",a),this.dragHelper=r,r.style.width="".concat(o.width,"px"),r.style.height="".concat(o.height,"px"),n&&this.moveDragHelper(n),this.em&&(0,c.default)(this.em.Canvas.getBody().ownerDocument).off("mousemove",this.moveDragHelper).on("mousemove",this.moveDragHelper),(0,c.default)(document).off("mousemove",this.moveDragHelper).on("mousemove",this.moveDragHelper)},r.prototype.moveDragHelper=function(t){var e=t.target.ownerDocument;if(this.dragHelper&&e){var n=t.pageY,r=t.pageX,o=0,i=0,a=(e.defaultView||e.parentWindow).frameElement,s=this.dragHelper.style;if(a){var l=a.getBoundingClientRect();o=l.top+document.documentElement.scrollTop,i=l.left+document.documentElement.scrollLeft,n=t.clientY,r=t.clientX}s.top=n+o+"px",s.left=r+i+"px"}},r.prototype.matches=function(t,n){return e.matches.call(t,n)},r.prototype.closest=function(t,e){if(t)for(var n=t.parentNode;n&&1===n.nodeType;){if(this.matches(n,e))return n;n=n.parentNode}},r.prototype.offset=function(t){var e=t.getBoundingClientRect();return{top:e.top+document.body.scrollTop,left:e.left+document.body.scrollLeft}},r.prototype.createPlaceholder=function(){var t=this.pfx,e=document.createElement("div"),n=document.createElement("div");return e.className=t+"placeholder",e.style.display="none",e.style.pointerEvents="none",n.className=t+"placeholder-int",e.appendChild(n),e},r.prototype.startSort=function(t,n){var r,o;void 0===n&&(n={});var i,a=this,s=a.em,l=a.itemSel,c=a.containerSel,u=a.plh,p=this.getContainerEl(n.container),d=this.getDocuments(t);delete this.dropModel,delete this.target,delete this.prevTarget,this.moved=!1,t&&!this.matches(t,"".concat(l,", ").concat(c))&&(t=this.closest(t,l)),this.sourceEl=t,u||(this.plh=this.createPlaceholder(),p.appendChild(this.plh)),t&&((i=this.getSourceModel(t))&&i.set&&i.set("status","freezed"),this.srcModel=i),(0,e.on)(p,"mousemove dragover",this.onMove),(0,e.on)(d,"mouseup dragend touchend",this.endMove),(0,e.on)(d,"keydown",this.rollback),this.onStart({sorter:this,target:i,parent:i&&(null===(r=i.parent)||void 0===r?void 0:r.call(i)),index:i&&(null===(o=i.index)||void 0===o?void 0:o.call(i))}),null==s||s.clearSelection(),this.toggleSortCursor(!0),null==s||s.trigger("sorter:drag:start",t,i)},r.prototype.getTargetModel=function(t){var e=t||this.target;return(0,c.default)(e).data("model")},r.prototype.getSourceModel=function(t,e){var n=this,r=void 0===e?{}:e,o=r.target,i=r.avoidChildren,a=void 0===i?1:i,s=this.em,l=this.sourceEl,u=t||l,p=this.dropModel,d=this.dropContent,f=function(t){return t&&o&&t.opt&&t.opt.avoidChildren&&n.isTextableActive(t,o)};if(d&&s){if(f(p)&&(p=void 0),!p){var h=s.Components.getComponents(),g={avoidChildren:a,avoidStore:1,avoidUpdateStyle:1},m=h.add(d,sc(sc({},g),{temporary:!0}));if(p=(p=h.remove(m,g))instanceof Array?p[0]:p,this.dropModel=p,f(p))return this.getSourceModel(u,{target:o,avoidChildren:0})}return p}return u&&(0,c.default)(u).data("model")},r.prototype.selectTargetModel=function(t,e){if(!(t instanceof u.FE||e&&e===t)){var n=this.targetModel;n&&n!==this.srcModel&&n.set("status",""),t&&t.set&&(t.set("status","selected-parent"),this.targetModel=t)}},r.prototype.onMove=function(e){var n=e,r=this,o=r.em,i=r.onMoveClb,a=r.plh,s=r.customTarget;this.moved=!0;var l=a.style.display;l&&"none"!==l||(a.style.display="block");var u=this.offset(this.el);this.elT=this.wmargin?Math.abs(u.top):u.top,this.elL=this.wmargin?Math.abs(u.left):u.left;var p=e.pageY-this.elT+this.el.scrollTop,d=e.pageX-this.elL+this.el.scrollLeft;if(this.canvasRelative&&o){var f=o.get("Canvas").getMouseRelativeCanvas(e,{noScroll:1});d=f.x,p=f.y}this.rX=d,this.rY=p,this.eventMove=e;
1var h=this.getSourceModel(),g=s?s({sorter:this,event:e}):e.target,m=this.dimsFromTarget(g,d,p),v=this.target,y=v&&this.getTargetModel(v);if(this.selectTargetModel(y,h),y||(a.style.display="none"),v){this.lastDims=m;var b=this.findPosition(m,d,p);this.isTextableActive(h,y)?(this.activeTextModel=y,a.style.display="none",this.lastPos=b,this.updateTextViewCursorPosition(n)):(this.disableTextable(),delete this.activeTextModel,this.lastPos&&this.lastPos.index==b.index&&this.lastPos.method==b.method||(this.movePlaceholder(this.plh,m,b,this.prevTargetDim),this.$plh||(this.$plh=(0,c.default)(this.plh)),this.canvasRelative||(this.offTop&&this.$plh.css("top","+="+this.offTop+"px"),this.offLeft&&this.$plh.css("left","+="+this.offLeft+"px")),this.lastPos=b)),(0,t.isFunction)(i)&&i({event:e,target:h,parent:y,index:b.index+("after"==b.method?1:0)}),o&&o.trigger("sorter:drag",{target:v,targetModel:y,sourceModel:h,dims:m,pos:b,x:d,y:p})}},r.prototype.isTextableActive=function(t,e){var n;return(null===(n=null==t?void 0:t.get)||void 0===n?void 0:n.call(t,"textable"))&&(null==e?void 0:e.isInstanceOf("text"))},r.prototype.disableTextable=function(){var t=this.activeTextModel;null==t||t.getView().disableEditing(),this.setContentEditable(t,!1)},r.prototype.isInFlow=function(t,e){if(!t)return!1;e=e||document.body;var n=t;return n.offsetHeight,!!this.styleInFlow(n,e)},r.prototype.styleInFlow=function(t,n){if(!(0,e.isTextNode)(t)){var r=t.style||{},o=(0,c.default)(t),i=n&&(0,c.default)(n);if(!r.overflow||"visible"===r.overflow){var a=o.css("float");if(!(a&&"none"!==a||i&&"flex"==i.css("display")&&"column"!==i.css("flex-direction"))){switch(r.position){case"static":case"relative":case"":break;default:return}switch(t.tagName){case"TR":case"TBODY":case"THEAD":case"TFOOT":return!0}switch(o.css("display")){case"block":case"list-item":case"table":case"flex":case"grid":return!0}}}}},r.prototype.validTarget=function(e,n){var r=this.getTargetModel(e),o=this.getSourceModel(n,{target:r}),i={valid:!0,src:n=o&&o.view&&o.view.el,srcModel:o,trg:e=r&&r.view&&r.view.el,trgModel:r,draggable:!1,droppable:!1,dragInfo:"",dropInfo:""};if(!n||!e)return i.valid=!1,i;var a=o.get("draggable");if((0,t.isFunction)(a)){var s=a(o,r);i.dragInfo=s,i.draggable=s,a=s}else a=a instanceof Array?a.join(", "):a,i.dragInfo=a,a=(0,t.isString)(a)?this.matches(e,a):a,i.draggable=a;var l=r.get("droppable");return(0,t.isFunction)(l)?(s=l(o,r),i.droppable=s,i.dropInfo=s,l=s):(l=(l=l instanceof u.FE?1:l)instanceof Array?l.join(", "):l,i.dropInfo=l,l=(0,t.isString)(l)?this.matches(n,l):l,l=a&&this.isTextableActive(o,r)?1:l,i.droppable=l),l&&a||(i.valid=!1),i},r.prototype.dimsFromTarget=function(t,e,n){var r=this.em,o=[];if(!t)return o;if(this.matches(t,"".concat(this.itemSel,", ").concat(this.containerSel))||(t=this.closest(t,this.itemSel)),this.draggable instanceof Array&&(t=this.closest(t,this.draggable.join(","))),!t)return o;if(this.prevTarget&&this.prevTarget!=t&&delete this.prevTarget,!this.prevTarget){this.targetP=this.closest(t,this.containerSel);var i=this.validTarget(t);if(r&&r.trigger("sorter:drag:validation",i),!i.valid&&this.targetP)return this.dimsFromTarget(this.targetP,e,n);this.prevTarget=t,this.prevTargetDim=this.getDim(t),this.cacheDimsP=this.getChildrenDim(this.targetP),this.cacheDims=this.getChildrenDim(t)}if(this.prevTarget==t&&(o=this.cacheDims),this.target=this.prevTarget,this.nearBorders(this.prevTargetDim,e,n)||!this.nested&&!this.cacheDims.length){var a=this.targetP;a&&this.validTarget(a).valid&&(o=this.cacheDimsP,this.target=a)}return delete this.lastPos,o},r.prototype.getTargetFromEl=function(t){var e,n=t,r=this.targetPrev,o=this.em,i=this.containerSel,a=this.itemSel;if(this.matches(n,"".concat(a,", ").concat(i))||(n=this.closest(n,a)),this.draggable instanceof Array&&(n=this.closest(n,this.draggable.join(","))),r&&r!=n&&delete this.targetPrev,!this.targetPrev){e=this.closest(n,i);var s=this.validTarget(n);if(o&&o.trigger("sorter:drag:validation",s),!s.valid&&e)return this.getTargetFromEl(e);this.targetPrev=n}return this.nearElBorders(n)&&(e=this.closest(n,i))&&this.validTarget(e).valid&&(n=e),n},r.prototype.nearElBorders=function(t){var e=t.getBoundingClientRect(),n=t.ownerDocument.body,r=this.getCurrentPos(),o=r.x,i=r.y,a=e.top+n.scrollTop,s=e.left+n.scrollLeft,l=e.width,c=e.height;if(i<a+10||i>a+c-10||o<s+10||o>s+l-10)return 1},r.prototype.getCurrentPos=function(){var t=this.eventMove;return{x:(null==t?void 0:t.pageX)||0,y:(null==t?void 0:t.pageY)||0}},r.prototype.getDim=function(t){var e,n,r,o,i=this.em,a=this.canvasRelative,s=null==i?void 0:i.Canvas,l=s?s.getElementOffsets(t):{};if(a&&i){var c=s.getElementPos(t,{noScroll:1});e=c.top,n=c.left,r=c.height,o=c.width}else{var u=this.offset(t);e=this.relative?t.offsetTop:u.top-(this.wmargin?-1:1)*this.elT,n=this.relative?t.offsetLeft:u.left-(this.wmargin?-1:1)*this.elL,r=t.offsetHeight,o=t.offsetWidth}return{top:e,left:n,height:r,width:o,offsets:l}},r.prototype.getChildrenDim=function(n){var r=this,o=[];if(!n)return o;var i=this.getTargetModel(n);if(i&&i.view&&!this.ignoreViewChildren){var a=i.getCurrentView?i.getCurrentView():i.view;n=a.getChildrenContainer()}return(0,t.each)(n.children,function(t,i){var a=t,s=(0,e.getModel)(a,c.default),l=s&&s.index?s.index():i;if((0,e.isTextNode)(a)||r.matches(a,r.itemSel)){var u,p=r.getDim(a),d=r.direction;u="v"==d||"h"!=d&&r.isInFlow(a,n),p.dir=u,p.el=a,p.indexEl=l,o.push(p)}}),o},r.prototype.nearBorders=function(t,e,n){var r=!1,o=this.borderOffset,i=e||0,a=n||0,s=t.top,l=t.left,c=t.height,u=t.width;return(s+o>a||a>s+c-o||l+o>i||i>l+u-o)&&(r=!0),r},r.prototype.findPosition=function(t,e,n){for(var r,o={index:0,indexEl:0,method:"before"},i=0,a=0,s=0,l=0,c=0,u=0,p=0,d=t.length;p<d;p++){var f=(r=t[p]).top,h=r.left,g=r.height,m=r.width;if(u=f+g,l=h+m/2,c=f+g/2,!(a&&h>a||s&&c>
1=s||i&&h+m<i))if(o.index=p,o.indexEl=r.indexEl,r.dir){if(n<c){o.method="before";break}o.method="after"}else n<u&&(s=u),e<l?(a=l,o.method="before"):(i=l,o.method="after")}return o},r.prototype.movePlaceholder=function(t,e,n,r){var o=0,i=0,a="",s="",l="px",c=n.method,u=e[n.index];if(t.classList.remove("vertical"),t.classList.add("horizontal"),u){var p=u.top,d=u.left,f=u.height,h=u.width;u.dir?(a=h+l,s="auto",o="before"==c?p-0:p+f-0,i=d):(a="auto",s=f-0+l,o=p+0,i="before"==c?d-0:d+h-0,t.classList.remove("horizontal"),t.classList.add("vertical"))}else{if(!this.nested)return void(t.style.display="none");if(r){var g=r.offsets||{},m=g.paddingTop||5,v=g.paddingLeft||5;o=r.top+m,i=r.left+v,a=parseInt("".concat(r.width))-2*v+l,s="auto"}}t.style.top=o+l,t.style.left=i+l,a&&(t.style.width=a),s&&(t.style.height=s)},r.prototype.parents=function(t){return t?[t].concat(this.parents(t.parent())):[]},r.prototype.sort=function(t,e){var n=t.parents.filter(function(t){return e.parents.includes(t)})[0];if(!n)return e.model.index()-t.model.index();var r=t.parents[t.parents.indexOf(n)-1];return e.parents[e.parents.indexOf(n)-1].index()-r.index()},r.prototype.endMove=function(){var n,r=this,o=this.sourceEl,i=[],a=this.getDocuments(),s=this.getContainerEl(),l=this.onEndMove,c=this.onEnd,u=this.target,p=this.lastPos;if((0,e.off)(s,"mousemove dragover",this.onMove),(0,e.off)(a,"mouseup dragend touchend",this.endMove),(0,e.off)(a,"keydown",this.rollback),this.plh.style.display="none",o&&(n=this.getSourceModel(),this.selectOnEnd&&n&&n.set&&(n.set("status",""),n.set("status","selected"))),this.moved&&u){var d=this.toMove,f=(0,t.isArray)(d)?d:d?[d]:[o],h=0;1===f.length?i.push(this.move(u,f[0],p)):f.map(function(t){return{model:t,parents:r.parents(t)}}).sort(this.sort).forEach(function(t){var e=t.model,n=e.index(),o=e.parent().getEl();i.push(r.move(u,e,sc(sc({},p),{indexEl:p.indexEl-h,index:p.index-h}))),o===u&&n<=p.index&&h++})}this.plh&&(this.plh.style.display="none");var g=this.dragHelper;if(g&&(g.parentNode.removeChild(g),delete this.dragHelper),this.disableTextable(),this.selectTargetModel(),this.toggleSortCursor(),delete this.toMove,delete this.eventMove,delete this.dropModel,(0,t.isFunction)(l)){var m={target:n,parent:n&&n.parent(),index:n&&n.index()};i.length?i.forEach(function(t){return l(t,r,m)}):l(null,this,sc(sc({},m),{cancelled:1}))}(0,t.isFunction)(c)&&c({sorter:this})},r.prototype.move=function(n,r,o){var i,a,s=this.em,l=this.dropContent,p=(0,e.getElement)(r),d=[],f="after"===o.method?o.indexEl+1:o.indexEl,h=this.validTarget(n,p),g=(0,c.default)(n).data("collection"),m=h.trgModel,v=h.srcModel,y=h.draggable,b=m instanceof u.FE?1:h.droppable;if(g&&b&&y){var _={at:f,action:"move-component"},T=this.isTextableActive(v,m);if(l)i=(0,t.isFunction)(l)?l():l,_.avoidUpdateStyle=!0,_.action="add-component";else{var C=v.collection.indexOf(v),w=g===v.collection;(!w||C!==f&&C!==f-1||T)&&(i=v.collection.remove(v,{temporary:!0}),w&&f>C&&(_.at=f-1))}i&&(T?(delete _.at,a=m.getView().insertComponent(i,_)):a=g.add(i,_)),delete this.dropContent,delete this.prevTarget}else if(s){var E=h.dropInfo||(null==m?void 0:m.get("droppable")),S=h.dragInfo||(null==v?void 0:v.get("draggable"));!g&&d.push("Target collection not found"),!b&&E&&d.push("Target is not droppable, accepts [".concat(E,"]")),!y&&S&&d.push("Component not draggable, acceptable by [".concat(S,"]")),s.logWarning("Invalid target position",{errors:d,model:v,context:"sorter",target:m})}return null==s||s.trigger("sorter:drag:end",{targetCollection:g,modelToDrop:i,warns:d,validResult:h,dst:n,srcEl:p}),a},r.prototype.rollback=function(t){(0,e.off)(this.getDocuments(),"keydown",this.rollback),27==(t.which||t.keyCode)&&(this.moved=!1,this.endMove())},r}(u.G7);const uc=cc;var pc=function(){return pc=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},pc.apply(this,arguments)},dc=function(){function n(e){void 0===e&&(e={}),this.defOpts={ratioDefault:!1,onUpdateContainer:function(){},step:1,minDim:10,maxDim:1/0,unitHeight:"px",unitWidth:"px",keyHeight:"height",keyWidth:"width",currentUnit:!0,silentFrames:!1,avoidContainerUpdate:!1,keepAutoHeight:!1,keepAutoWidth:!1,autoHeight:!1,autoWidth:!1,tl:!0,tc:!0,tr:!0,cl:!0,cr:!0,bl:!0,bc:!0,br:!0},this.opts=pc({},this.defOpts),this.setOptions(e),(0,t.bindAll)(this,"handleKeyDown","handleMouseDown","move","stop")}return n.prototype.getConfig=function(){return this.opts},n.prototype.setOptions=function(t,e){void 0===t&&(t={}),this.opts=pc(pc({},e?this.defOpts:this.opts),t),this.setup()},n.prototype.setup=function(){var t=this.opts,e=t.prefix||"",n=t.appendTo||document.body,r=this.container;for(r||((r=document.createElement("div")).className="".concat(e,"resizer-c"),n.appendChild(r),this.container=r);r.firstChild;)r.removeChild(r.firstChild);var o={};for(var i in["tl","tc","tr","cl","cr","bl","bc","br"].forEach(function(e){return o[e]=t[e]?function(t,e){void 0===e&&(e={});var n=e.prefix||"",r=document.createElement("i");return r.className=n+"resizer-h "+n+"resizer-h-"+t,r.setAttribute("data-"+n+"handler",t),r}(e,t):null}),o){var a=o[i];a&&r.appendChild(a)}this.handlers=o,this.mousePosFetcher=t.mousePosFetcher,this.updateTarget=t.updateTarget,this.posFetcher=t.posFetcher,this.onStart=t.onStart,this.onMove=t.onMove,this.onEnd=t.onEnd,this.onUpdateContainer=t.onUpdateContainer},n.prototype.toggleFrames=function(e){if(this.opts.silentFrames){var n=document.querySelectorAll("iframe");(0,t.each)(n,function(t){return t.style.pointerEvents=e?"none":""})}},n.prototype.isHandler=function(t){var e=this.handlers;for(var n in e)if(e[n]===t)return!0;return!1},n.prototype.getFocusedEl=function(){return this.el},n.prototype.getParentEl=function(){var t;return null===(t=this.el)||void 0===t?void 0:t.parentElement},n.prototype.getDocumentEl=function(){return[this.el.ownerDocument,document]},n.prototype.getElementPos=function(t,e){void 0===e&&(e={});var n=this.posFetcher;return n?n(t,e):function(t){var e=window,n=t.getBoundingClientRect();return{left:n.left+e.pageXOffset,top:n.top+e.pageYOffset,width:n.width,height:n.height}}(t)}
1,n.prototype.focus=function(t){t&&t===this.el||(this.el=t,this.updateContainer({forceShow:!0}),(0,e.on)(this.getDocumentEl(),"pointerdown",this.handleMouseDown))},n.prototype.blur=function(){this.container.style.display="none",this.el&&((0,e.off)(this.getDocumentEl(),"pointerdown",this.handleMouseDown),delete this.el)},n.prototype.start=function(n){var r=n;if(0===r.button){r.preventDefault(),r.stopPropagation();var o=this.el,i=this.getParentEl(),a=this.opts||{},s=this.mousePosFetcher,l="data-"+a.prefix+"handler",c=this.getElementPos(o,{avoidFrameZoom:!0,avoidFrameOffset:!0}),u=this.getElementPos(i),p=r.target;this.handlerAttr=p.getAttribute(l),this.clickedHandler=p,this.startDim={t:c.top,l:c.left,w:c.width,h:c.height},this.rectDim={t:c.top,l:c.left,w:c.width,h:c.height},this.startPos=s?s(r):{x:r.clientX,y:r.clientY},this.parentDim={t:u.top,l:u.left,w:u.width,h:u.height};var d=this.getDocumentEl();this.docs=d,(0,e.on)(d,"pointermove",this.move),(0,e.on)(d,"keydown",this.handleKeyDown),(0,e.on)(d,"pointerup",this.stop),(0,t.isFunction)(this.onStart)&&this.onStart(r,{docs:d,config:a,el:o,resizer:this}),this.toggleFrames(!0),this.move(r)}},n.prototype.move=function(t){var e=t,n=this.onMove,r=this.mousePosFetcher,o=r?r(e):{x:e.clientX,y:e.clientY};this.currentPos=o,this.delta={x:o.x-this.startPos.x,y:o.y-this.startPos.y},this.keys={shift:e.shiftKey,ctrl:e.ctrlKey,alt:e.altKey},this.rectDim=this.calc(this),this.updateRect(!1),n&&n(e)},n.prototype.stop=function(n){var r=this.el,o=this.opts,i=this.docs||this.getDocumentEl();(0,e.off)(i,"pointermove",this.move),(0,e.off)(i,"keydown",this.handleKeyDown),(0,e.off)(i,"pointerup",this.stop),this.updateRect(!0),this.toggleFrames(),(0,t.isFunction)(this.onEnd)&&this.onEnd(n,{docs:i,config:o,el:r,resizer:this}),delete this.docs},n.prototype.updateRect=function(e){var n=this.el,r=this.opts,o=this.rectDim,i=this.updateTarget,a=this.getSelectedHandler(),s=r.unitHeight,l=r.unitWidth,c=r.keyWidth,u=r.keyHeight;if((0,t.isFunction)(i))i(n,o,{store:e,selectedHandler:a,resizer:this,config:r});else{var p=n.style;p[c]=o.w+l,p[u]=o.h+s,p.top=o.t+s,p.left=o.l+l}this.updateContainer()},n.prototype.updateContainer=function(t){var e;void 0===t&&(t={});var n=this,r=n.opts,o=n.container,i=n.el,a=o.style;!r.avoidContainerUpdate&&i&&t.forceShow&&(a.display="block"),null===(e=this.onUpdateContainer)||void 0===e||e.call(this,{el:o,resizer:this,opts:pc(pc({},r),t)})},n.prototype.getSelectedHandler=function(){var t=this.handlers;if(this.selectedHandler)for(var e in t)if(t[e]===this.selectedHandler)return e},n.prototype.handleKeyDown=function(t){27===t.keyCode&&(this.rectDim=this.startDim,this.stop(t))},n.prototype.handleMouseDown=function(t){var e=t.target;this.isHandler(e)?(this.selectedHandler=e,this.start(t)):e!==this.el&&(delete this.selectedHandler,this.blur())},n.prototype.calc=function(t){var n,r=this.opts||{},o=r.step,i=this.startDim,a=r.minDim,s=r.maxDim,l=t.delta.x,c=t.delta.y,u=this.parentDim.w,p=this.parentDim.h,d=this.opts.unitWidth,f=this.opts.unitHeight,h="%"===d?i.w/100*u:i.w,g="%"===f?i.h/100*p:i.h,m={t:i.t,l:i.l,w:h,h:g};
1if(t){var v=t.handlerAttr;~v.indexOf("r")&&(n="%"===d?(0,e.normalizeFloat)((h+l*o)/u*100,.01):(0,e.normalizeFloat)(h+l*o,o),n=Math.max(a,n),s&&(n=Math.min(s,n)),m.w=n),~v.indexOf("b")&&(n="%"===f?(0,e.normalizeFloat)((g+c*o)/p*100,.01):(0,e.normalizeFloat)(g+c*o,o),n=Math.max(a,n),s&&(n=Math.min(s,n)),m.h=n),~v.indexOf("l")&&(n="%"===d?(0,e.normalizeFloat)((h-l*o)/u*100,.01):(0,e.normalizeFloat)(h-l*o,o),n=Math.max(a,n),s&&(n=Math.min(s,n)),m.w=n),~v.indexOf("t")&&(n="%"===f?(0,e.normalizeFloat)((g-c*o)/p*100,.01):(0,e.normalizeFloat)(g-c*o,o),n=Math.max(a,n),s&&(n=Math.min(s,n)),m.h=n);var y=r.ratioDefault?!t.keys.shift:t.keys.shift;if(v.indexOf("c")<0&&y){var b=i.w/i.h;m.w/m.h>b?m.h=Math.round(m.w/b):m.w=Math.round(m.h*b)}for(var _ in~v.indexOf("l")&&(m.l+=i.w-m.w),~v.indexOf("t")&&(m.t+=i.h-m.h),m){var T=_;m[T]=parseInt("".concat(m[T]),10)}return m}},n}();const fc=dc;var hc=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),gc=function(){return gc=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},gc.apply(this,arguments)};const mc=function(t){function n(n){var r=t.call(this,n,"Utils")||this;return r.Sorter=uc,r.Resizer=fc,r.Dragger=Wt.Z,r.helpers=gc({},e),r}return hc(n,t),n.prototype.destroy=function(){},n}(y);var vc,yc={},bc={16:!1,18:!1,17:!1,91:!1},_c="all",Tc={"\u21e7":16,shift:16,"\u2325":18,alt:18,option:18,"\u2303":17,ctrl:17,control:17,"\u2318":91,command:91},Cc={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,home:36,end:35,pageup:33,pagedown:34,",":188,".":190,"/":191,"`":192,"-":189,"=":187,";":186,"'":222,"[":219,"]":221,"\\":220},wc=function(t){return Cc[t]||t.toUpperCase().charCodeAt(0)},Ec=[];for(vc=1;vc<20;vc++)Cc["f"+vc]=111+vc;function Sc(t,e){for(var n=t.length;n--;)if(t[n]===e)return n;return-1}function xc(t,e){if(t.length!=e.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}var Oc={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey"};function Ac(t){var e,n=t.keyCode,r=Sc(Ec,n);if(r>=0&&Ec.splice(r,1),93!=n&&224!=n||(n=91),n in bc)for(e in bc[n]=!1,Tc)Tc[e]==n&&(Pc[e]=!1)}function kc(){for(vc in bc)bc[vc]=!1;for(vc in Tc)Pc[vc]=!1}function Pc(t,e,n){var r,o;r=Mc(t),void 0===n&&(n=e,e="all");for(var i=0;i<r.length;i++)o=[],(t=r[i].split("+")).length>1&&(o=Lc(t),t=[t[t.length-1]]),t=t[0],(t=wc(t))in yc||(yc[t]=[]),yc[t].push({shortcut:r[i],scope:e,method:n,key:r[i],mods:o})}for(vc in Tc)Pc[vc]=!1;function Nc(){return _c||"all"}function Mc(t){var e;return""==(e=(t=t.replace(/\s/g,"")).split(","))[e.length-1]&&(e[e.length-2]+=","),e}function Lc(t){for(var e=t.slice(0,t.length-1),n=0;n<e.length;n++)e[n]=Tc[e[n]];return e}function Ic(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent&&t.attachEvent("on"+e,function(){n(window.event)})}Pc.setScope=function(t){_c=t||"all"},Pc.getScope=Nc,Pc.deleteScope=function(t){var e,n,r;for(e in yc)for(n=yc[e],r=0;r<n.length;)n[r].scope===t?n.splice(r,1):r++},Pc.filter=function(t){var e=(t.target||t.srcElement).tagName;return!("INPUT"==e||"SELECT"==e||"TEXTAREA"==e)},Pc.isPressed=function(t){return"string"==typeof t&&(t=wc(t)),-1!=Sc(Ec,t)},Pc.getPressedKeyCodes=function(){return Ec.slice(0)},Pc.unbind=function(t,e){var n,r,o,i,a,s=[];for(n=Mc(t),i=0;i<n.length;i++){if((r=n[i].split("+")).length>1&&(s=Lc(r)),t=r[r.length-1],t=wc(t),void 0===e&&(e=Nc()),!yc[t])return;for(o=0;o<yc[t].length;o++)(a=yc[t][o]).scope===e&&xc(a.mods,s)&&(yc[t][o]={})}},Pc.handlers=yc,Pc.init=function(t){Ic(t.document,"keydown",function(t){!function(t){var e,n,r,o,i,a;if(e=t.keyCode,-1==Sc(Ec,e)&&Ec.push(e),93!=e&&224!=e||(e=91),e in bc)for(r in bc[e]=!0,Tc
1)Tc[r]==e&&(Pc[r]=!0);else if(function(t){for(vc in bc)bc[vc]=t[Oc[vc]]}(t),Pc.filter.call(this,t)&&e in yc)for(a=Nc(),o=0;o<yc[e].length;o++)if((n=yc[e][o]).scope==a||"all"==n.scope){for(r in i=n.mods.length>0,bc)(!bc[r]&&Sc(n.mods,+r)>-1||bc[r]&&-1==Sc(n.mods,+r))&&(i=!1);(0!=n.mods.length||bc[16]||bc[18]||bc[17]||bc[91])&&!i||!1===n.method(t,n)&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0))}}(t)}),Ic(t.document,"keyup",Ac),Ic(t,"focus",kc)};const Dc=Pc,Rc={defaults:{"core:undo":{keys:"\u2318+z, ctrl+z",handler:"core:undo"},"core:redo":{keys:"\u2318+shift+z, ctrl+shift+z",handler:"core:redo"},"core:copy":{keys:"\u2318+c, ctrl+c",handler:"core:copy"},"core:paste":{keys:"\u2318+v, ctrl+v",handler:"core:paste"},"core:component-next":{keys:"s",handler:"core:component-next"},"core:component-prev":{keys:"w",handler:"core:component-prev"},"core:component-enter":{keys:"d",handler:"core:component-enter"},"core:component-exit":{keys:"a",handler:"core:component-exit"},"core:component-delete":{keys:"backspace, delete",handler:"core:component-delete",opts:{prevent:!0}}}};var jc=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Hc=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))};(0,e.hasWin)()&&Dc.init(window);var Fc=function(e){function n(t){var n=e.call(this,t,"Keymaps",Rc)||this;return n.keymaster=Dc,n.keymaps={},n}return jc(n,e),n.prototype.onLoad=function(){var t=this.config.defaults;for(var e in t){var n=t[e];this.add(e,n.keys,n.handler,n.opts||{})}},n.prototype.add=function(e,n,r,o){void 0===o&&(o={});var i=this.em,a=i.Commands,s=i.getEditor(),l=i.Canvas,c={id:e,keys:n,handler:r};return this.keymaps[e]&&this.remove(e),this.keymaps[e]=c,Dc(n,function(n,c){var u={event:n,h:c},p=(0,t.isString)(r)?a.get(r):r;if(!i.isEditing()&&!s.Canvas.isInputFocused()||o.force){o.prevent&&l.getCanvasView().preventDefault(n),(0,t.isFunction)(p)?p(s,0,u):a.runCommand(p,u);var d=[e,c.shortcut,n];i.trigger.apply(i,Hc(["keymap:emit"],d,!1)),i.trigger.apply(i,Hc(["keymap:emit:".concat(e)],d,!1))}},void 0),i.trigger("keymap:add",c),c},n.prototype.get=function(t){return this.keymaps[t]},n.prototype.getAll=function(){return this.keymaps},n.prototype.remove=function(t){var e=this.em,n=this.get(t);if(n)return delete this.keymaps[t],n.keys.split(", ").forEach(function(t){Dc.unbind(t.trim())}),null==e||e.trigger("keymap:remove",n),n},n.prototype.removeAll=function(){var t=this;return Object.keys(this.keymaps).forEach(function(e){return t.remove(e)}),Dc.handlers={},this},n.prototype.destroy=function(){this.removeAll(),this.keymaps={}},n}(y);const Bc=Fc,Vc={stylePrefix:"mdl-",title:"",content:"",backdrop:!0,custom:!1,extend:{}};var Uc=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const zc=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Uc(e,t),e.prototype.defaults=function(){return{title:"",content:"",attributes:{},open:!1}},e.prototype.open=function(){this.set("open",!0)},e.prototype.close=function(){this.set("open",!1)},e}(C);var Gc=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),$c=function(){return $c=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},$c.apply(this,arguments)};const qc=function(t){function e(e){var n=t.call(this,e)||this,r=n.model;return n.listenTo(r,"change:open",n.updateOpen),n.listenTo(r,"change:title",n.updateTitle),n.listenTo(r,"change:content",n.updateContent),n}return Gc(e,t),e.prototype.template=function(t){var e=t.pfx,n=t.ppfx,r=t.content,o=t.title;return'<div class="'.concat(e,"dialog ").concat(n,"one-bg ").concat(n,'two-color">\n <div class="').concat(e,'header">\n <div class="').concat(e,'title">').concat(o,'</div>\n <div class="').concat(e,'btn-close" data-close-modal>⨯</div>\n </div>\n <div class="').concat(e,'content">\n <div id="').concat(e,'c">').concat(r,'</div>\n <div style="clear:both"></div>\n </div>\n </div>\n <div class="').concat(e,'collector" style="display: none"></div>')},e.prototype.events=function(){return{click:"onClick","click [data-close-modal]":"hide"}},e.prototype.onClick=function(t){this.config.backdrop&&t.target===this.el&&this.hide()},e.prototype.getCollector=function(){return this.$collector||(this.$collector=this.$el.find("."+this.pfx+"collector")),this.$collector},e.prototype.getContent=function(){var t=this.pfx;return this.$content||(this.$content=this.$el.find(".".concat(t,"content #").concat(t,"c"))),this.$content},e.prototype.getTitle=function(t){return void 0===t&&(t={}),this.$title||(this.$title=this.$el.find("."+this.pfx+"title")),t.$?this.$title:this.$title.get(0)},e.prototype.updateContent=function(){var t=this.getContent(),e=t.children(),n=this.getCollector(),r=this.model.get("content");e.length&&n.append(e),t.empty().append(r)},e.prototype.updateTitle=function(){var t=this.getTitle({$:!0});t&&t.empty().append(this.model.get("title"))},e.prototype.updateOpen=function(){this.el.style.display=this.model.get("open")?"":"none"},e.prototype.hide=function(){this.model.close()},e.prototype.show=function(){this.model.open()},e.prototype.updateAttr=function(t){var e=this,n=e.pfx,r=e.$el,o=e.el,i=[].slice.call(o.attributes).map(function(t){return t.name});r.removeAttr(i.join(" ")),r.attr($c($c({},t||{}),{class:"".concat(n,"container ").concat(t&&t.class||"").trim()}))},e.prototype.render=function(){var t=this.$el,e=this.model.toJSON();return e.pfx=this.pfx,e.ppfx=this.ppfx,t.html(this.template(e)),this.updateAttr(),this.updateOpen(),this},e}(Ot);var Wc=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const Kc=function(e){function n(n){var r=e.call(this,n,"Modal",Vc)||this;return r.model=new zc(r),r.model.on("change:open",function(t,e){n.trigger("modal:".concat(e?"open":"close"))}),r.model.on("change",(0,t.debounce)(function(){var e=r._evData(),o=r.config.custom;(0,t.isFunction)(o)&&o(e),n.trigger("modal",e)},0)),r}return Wc(n,e),n.prototype._evData=function(){var e=this,n=this.getTitle(),r=this.getContent(),o=this.model.attributes;return{open:o.open,attributes:o.attributes,title:(0,t.isString)(n)?(0,At.rw)(n):n,content:(0,t.isString)(r)?(0,At.rw)(r):r.get?r.get(0):r,close:function(){e.close()}}},n.prototype.postRender=function(t){var e=t.model.config.el||t.el,n=this.render();n&&(null==e||e.appendChild(n))},n.prototype.open=function(t){void 0===t&&(t={});var e=t.attributes||{};return t.title&&this.setTitle(t.title),t.content&&this.setContent(t.content),this.model.set("attributes",e),this.model.open(),this.modal&&this.modal.updateAttr(e),this},n.prototype.close=function(){return this.model.close(),this},n.prototype.onceClose=function(t){return this.em.once("modal:close",t),this},n.prototype.onceOpen=function(t){return this.em.once("modal:open",t),this},n.prototype.isOpen=function(){return!!this.model.get("open")},n.prototype.setTitle=function(t){return this.model.set("title",t),this},n.prototype.getTitle=function(){return this.model.get("title")},n.prototype.setContent=function(t){return this.model.set("content"," "),this.model.set("content",t),this},n.prototype.getContent=function(){return this.model.get("content")},n.prototype.getContentEl=function(){var t;return null===(t=this.modal)||void 0===t?void 0:t.getContent().get(0)},n.prototype.getModel=function(){return this.model},n.prototype.render=function(){var t;if(!this.config.custom){var e=qc.extend(this.config.extend),n=this.modal&&this.modal.el;return this.modal=new e({el:n,model:this.model,config:this.config}),null===(t=this.modal)||void 0===t?void 0:t.render().el}},n.prototype.destroy=function(){var t;null===(t=this.modal)||void 0===t||t.remove()},n}(y);var Yc="sw-visibility",Xc="export-template",Zc="open-sm",Qc="open-tm",Jc="open-layers",tu="open-blocks",eu="fullscreen",nu="preview";
1const ru={stylePrefix:"pn-",defaults:[{id:"commands",buttons:[{}]},{id:"options",buttons:[{active:!0,id:Yc,className:"fa fa-square-o",command:"core:component-outline",context:Yc,attributes:{title:"View components"}},{id:nu,className:"fa fa-eye",command:nu,context:nu,attributes:{title:"Preview"}},{id:eu,className:"fa fa-arrows-alt",command:eu,context:eu,attributes:{title:"Fullscreen"}},{id:Xc,className:"fa fa-code",command:Xc,attributes:{title:"View code"}}]},{id:"views",buttons:[{id:Zc,className:"fa fa-paint-brush",command:Zc,active:!0,togglable:!1,attributes:{title:"Open Style Manager"}},{id:Qc,className:"fa fa-cog",command:Qc,togglable:!1,attributes:{title:"Settings"}},{id:Jc,className:"fa fa-bars",command:Jc,togglable:!1,attributes:{title:"Open Layer Manager"}},{id:tu,className:"fa fa-th-large",command:tu,togglable:!1,attributes:{title:"Open Blocks"}}]}]};var ou=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const iu=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.get("buttons").length&&r.set("buttons",new lu(r.module,r.get("buttons"))),r}return ou(e,t),e.prototype.defaults=function(){return{id:"",label:"",tagName:"span",className:"",command:"",context:"",buttons:[],attributes:{},options:{},active:!1,dragDrop:!1,togglable:!0,runDefaultCommand:!0,stopDefaultCommand:!1,disable:!1}},Object.defineProperty(e.prototype,"className",{get:function(){return this.get("className")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"command",{get:function(){return this.get("command")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"active",{get:function(){return this.get("active")},set:function(t){this.set("active",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"togglable",{get:function(){return this.get("togglable")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"runDefaultCommand",{get:function(){return this.get("runDefaultCommand")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"stopDefaultCommand",{get:function(){return this.get("stopDefaultCommand")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"disable",{get:function(){return this.get("disable")},enumerable:!1,configurable:!0}),e}(C);var au=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),su=function(t){function e(e,n){return t.call(this,e,n,iu)||this}return au(e,t),e.prototype.deactivateAllExceptOne=function(t,e){this.forEach(function(n,r){n!==t&&(n.set("active",!1),e&&n.get("buttons").length&&n.get("buttons").deactivateAllExceptOne(t,e))})},e.prototype.deactivateAll=function(t,e){var n=t||"";this.forEach(function(t){t.get("context")==n&&t!==e&&t.set("active",!1,{fromCollection:!0}
1)})},e.prototype.disableAllButtons=function(t){var e=t||"";this.forEach(function(t,n){t.get("context")==e&&t.set("disable",!0)})},e.prototype.disableAllButtonsExceptOne=function(t,e){this.forEach(function(n,r){n!==t&&(n.set("disable",!0),e&&n.get("buttons").length&&n.get("buttons").disableAllButtonsExceptOne(t,e))})},e}(E);const lu=su;su.prototype.model=iu;var cu=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const uu=function(t){function e(e,n){var r=t.call(this,e,n)||this,o=r.get("buttons")||[];return r.buttons=new lu(e,o),r}return cu(e,t),e.prototype.defaults=function(){return{id:"",content:"",visible:!0,buttons:[],attributes:{}}},Object.defineProperty(e.prototype,"buttons",{get:function(){return this.get("buttons")},set:function(t){this.set("buttons",t)},enumerable:!1,configurable:!0}),e}(C);var pu=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),du=function(t){function e(e,n){return t.call(this,e,n,uu)||this}return pu(e,t),e}(E);const fu=du;du.prototype.model=uu;var hu=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),gu=function(){return gu=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},gu.apply(this,arguments)},mu=function(e){function n(n){var r=e.call(this,n)||this,o=r,i=o.model,a=o.em,s=o.pfx,l=o.ppfx,c=i.className,u=i.attributes,p=u.command,d=u.listen;if(r.id=s+i.get("id"),r.activeCls="".concat(s,"active ").concat(l,"four-color"),r.disableCls="".concat(l,"disabled"),r.btnsVisCls="".concat(s,"visible"),r.className=s+"btn"+(c?" "+c:""),r.listenTo(i,"change",r.render),r.listenTo(i,"change:active updateActive",r.updateActive),r.listenTo(i,"checkActive",r.checkActive),r.listenTo(i,"change:bntsVis",r.updateBtnsVis),r.listenTo(i,"change:attributes",r.updateAttributes),r.listenTo(i,"change:className",r.updateClassName),r.listenTo(i,"change:disable",r.updateDisable),a&&(0,t.isString)(p)&&d){var f={fromListen:!0};r.listenTo(a,"run:".concat(p),function(){return i.set("active",!0,f)}),r.listenTo(a,"stop:".concat(p),function(){return i.set("active",!1,f)})}return a&&a.get&&(r.commands=a.get("Commands")),r}return hu(n,e),n.prototype.tagName=function(){return this.model.get("tagName")},n.prototype.events=function(){return{click:"clicked"}},n.prototype.updateClassName=function(){var t=this.model,e=this.pfx,n=t.className,r=t.get("attributes").class,o="".concat(r||""," ").concat(e,"btn ").concat(n||"");this.$el.attr("class",o.trim())},n.prototype.updateAttributes=function(){var t=this,e=t.em,n=t.model,r=t.$el,o=n.get("attributes")||{},i=e&&e.t&&e.t("panels.buttons.titles.".concat(n.id));r.attr(o),i&&r.attr({title:i}),this.updateClassName()},n.prototype.updateBtnsVis=function(){this.$buttons&&(this.model.get("bntsVis")?this.$buttons.addClass(this.btnsVisCls):this.$buttons.removeClass(this.btnsVisCls))},n.prototype.updateActive=function(e,n,r){var o;void 0===r&&(r={});var i=this,a=i.model,s=i.commands,l=i.$el,c=i.activeCls,u=r.fromCollection,p=r.fromListen,d=a.get("context"),f=a.get("options"),h=a.command,g={};h&&(s&&(0,t.isString)(h)?g=s.get(h)||{}:(0,t.isFunction)(h)?g=s.create({run:h}):null!==h&&(0,t.isObject)(h)&&(g=s.create(h)),a.active?(!u&&(null===(o=a.collection)||void 0===o||o.deactivateAll(d,a)),a.set("active",!0,{silent:!0}).trigger("checkActive"),!p&&s.runCommand(g,gu(gu({},f),{sender:a})),g.noStop&&a.set("active",!1)):(l.removeClass(c),!p&&s.stopCommand(g,gu(gu({},f),{sender:a,force:1}))))},n.prototype.updateDisable=function(){var t=this.disableCls,e=this.model.disable;this.$el[e?"addClass":"removeClass"](t)},n.prototype.checkActive=function(){var t=this,e=t.model,n=t.$el,r=t.activeCls;e.active?n.addClass(r):n.removeClass(r)},n.prototype.clicked=function(t){var e=this.model;e.get("bntsVis")||e.disable||!e.command||this.toggleActive()},n.prototype.toggleActive=function(){var t=this.model,e=this.em,n=t.active,r=t.togglable;n&&!r||(t.active=!n,n?t.runDefaultCommand&&e.runDefault():t.stopDefaultCommand&&e.stopDefault())},n.prototype.render=function(){var t=this.model,e=t.get("label"),n=this.$el;return!t.get("el")&&n.empty(),this.updateAttributes(),e&&n.append(e),this.checkActive(),this.updateDisable(),this},n}(Ot);const vu=mu;var yu=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const bu=function(e){function n(t){var n=e.call(this,{collection:t})||this;return n.listenTo(n.collection,"add",n.addTo),n.listenTo(n.collection,"reset remove",n.render),n.className=n.pfx+"buttons",n}return yu(n,e),n.prototype.addTo=function(t){this.addToCollection(t)},n.prototype.addToCollection=function(t,e){var n=e||null,r=t.get("el"),o=new vu({el:r,model:t}).render().el;return n?n.appendChild(o):this.$el.append(o),o},n.prototype.render=function(){var e=this,n=document.createDocumentFragment();return this.$el.empty(),this.collection.each(function(t){return e.addToCollection(t,n)}),this.$el.append(n),this.$el.attr("class",(0,t.result)(this,"className")),this},n}(Ot);var _u=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Tu=function(){return Tu=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Tu.apply(this,arguments)},Cu=function(t){function e(e){var n=t.call(this,{model:e,el:e.get("el")})||this;return n.className=n.pfx+"panel",n.id=n.pfx+e.get("id"),n.listenTo(e,"change:appendContent",n.appendContent),n.listenTo(e,"change:content",n.updateContent),n.listenTo(e,"change:visible",n.toggleVisible),e.view=n,n}return _u(e,t),e.prototype.appendContent=function(){this.$el.append(this.model.get("appendContent"))},e.prototype.updateContent=function(){this.$el.html(this.model.get("content"))},e.prototype.toggleVisible=function(){this.model.get("visible")?this.$el.removeClass("".concat(this.ppfx,"hidden")):this.$el.addClass("".concat(this.ppfx,"hidden"))},e.prototype.attributes=function(){return this.model.get("attributes")},e.prototype.initResize=function(){var t=this.em,e=null==t?void 0:t.Editor,n=this.model.get("resizable");if(e&&n){var r=!0===n?[!0,!0,!0,!0]:n,o=r.length,i=void 0,a=void 0,s=void 0,l=!1;if(2==o)i=(c=r)[0],s=c[0],a=c[1],l=c[1];else if(4==o){var c;i=(c=r)[0],a=c[1],s=c[2],l=c[3]}var u=new e.Utils.Resizer(Tu({tc:i,cr:a,bc:s,cl:l,tl:!1,tr:!1,bl:!1,br:!1,appendTo:this.el,silentFrames:!0,avoidContainerUpdate:!0,prefix:e.getConfig().stylePrefix,onEnd:function(){t&&t.trigger("change:canvasOffset")},posFetcher:function(t,e){var n=e.target,r=t.style,o=u.getConfig(),i=o.keyWidth,a=o.keyHeight,s=t.getBoundingClientRect(),l="container"==n,c=r[i],p=r[a];return{left:0,top:0,width:c&&!l?parseFloat(c):s.width,height:p&&!l?parseFloat(p):s.height}}},n&&"boolean"!=typeof n?n:{}));u.blur=function(){},u.focus(this.el)}},e.prototype.render=function(){var t=this.model.buttons,e=this.$el,n=this.ppfx,r="".concat(this.className," ").concat(this.id," ").concat(n,"one-bg ").concat(n,"two-color");
1if(e.addClass(r),this.toggleVisible(),t.length){var o=new bu(t);e.append(o.render().el)}return e.append(this.model.get("content")),this},e}(Ot);const wu=Cu;var Eu=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const Su=function(t){function e(e){var n=t.call(this,{collection:e})||this;return n.listenTo(e,"add",n.addTo),n.listenTo(e,"reset",n.render),n.listenTo(e,"remove",n.onRemove),n.className=n.pfx+"panels",n}return Eu(e,t),e.prototype.onRemove=function(t){var e=t.view;e&&e.remove()},e.prototype.addTo=function(t){this.addToCollection(t)},e.prototype.addToCollection=function(t,e){var n=e||null,r=t.get("el"),o=new wu(t),i=o.render().el,a=t.get("appendTo");if(r);else if(a){var s=document.querySelector(a);null==s||s.appendChild(i)}else n?n.appendChild(i):this.$el.append(i);return o.initResize(),i},e.prototype.render=function(){var t=this,e=this.$el,n=document.createDocumentFragment();return e.empty(),this.collection.each(function(e){return t.addToCollection(e,n)}),e.append(n),e.attr("class",this.className),this},e}(Ot);var xu=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const Ou=function(t){function e(e){var n=t.call(this,e,"Panels",ru)||this;for(var r in n.panels=new fu(n,n.config.defaults),ru)r in n.config||(n.config[r]=ru[r]);return n}return xu(e,t),e.prototype.getPanels=function(){return this.panels},e.prototype.getPanelsEl=function(){var t;return null===(t=this.PanelsViewObj)||void 0===t?void 0:t.el},e.prototype.addPanel=function(t){return this.panels.add(t)},e.prototype.removePanel=function(t){return this.panels.remove(t)},e.prototype.getPanel=function(t){var e=this.panels.where({id:t});return e.length?e[0]:null},e.prototype.addButton=function(t,e){var n=this.getPanel(t);return n?n.buttons.add(e):null},e.prototype.removeButton=function(t,e){var n=this.getPanel(t);return n&&n.buttons.remove(e)},e.prototype.getButton=function(t,e){var n=this.getPanel(t);if(n){var r=n.buttons.where({id:e});return r.length?r[0]:null}return null},e.prototype.render=function(){var t;return null===(t=this.PanelsViewObj)||void 0===t||t.remove(),this.PanelsViewObj=new Su(this.panels),this.PanelsViewObj.render().el},e.prototype.active=function(){this.getPanels().each(function(t){t.buttons.each(function(t){t.get("active")&&t.trigger("updateActive")})})},e.prototype.disableButtons=function(){this.getPanels().each(function(t){t.buttons.each(function(t){t.get("disable")&&t.trigger("change:disable")})})},e.prototype.destroy=function(){this.panels.reset(),this.panels.stopListening(),this.PanelsViewObj&&this.PanelsViewObj.remove()},e}(y),Au={stylePrefix:"cm-",optsCodeViewer:{}};var ku=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Pu=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};const Nu=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ku(e,t),e.prototype.build=function(t,e){void 0===e&&(e={});var n=e.em,r=Pu(e,["em"]);if(e.cleanId&&n){var o=n.Css.getAll().toJSON().map(function(t){var e=t.selectors,n=e&&1===e.length&&e.models[0];return n&&n.isId()&&n.get("name")}
1).filter(Boolean);r.attributes||(r.attributes=function(t,e){var n=e.id;return n&&"i"===n[0]&&!t.get("script")&&!t.get("attributes").id&&o.indexOf(n)<0&&delete e.id,e})}return t.toHTML(r)},e}(u.Hn);var Mu=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Lu=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return Mu(n,e),n.prototype.build=function(e){var n=this,r=e.toJSON();return this.beforeEach(r),(0,t.each)(r,function(t,e){var o=r[e];if(o instanceof u.Hn)r[e]=n.build(o);else if(o instanceof u.FE){var i=o;r[e]=[],i.length&&i.forEach(function(t,o){r[e][o]=n.build(t)})}}),r},n.prototype.beforeEach=function(t){delete t.status},n}(u.Hn);const Iu=Lu;var Du=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ru=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return Du(n,e),n.prototype.mapModel=function(e){var n,r=this,o="",i=e.get("script-export")||e.get("script"),a=e.get("type"),s=e.get("
1components"),l=e.getId();if(i){var c=e.get("attributes");c=(0,t.extend)({},c,{id:l}),e.set("attributes",c,{silent:!0});var u=e.getScriptString(i),p=e.get("script-props");if(e.get("scriptUpdated")&&!p)this.mapJs[a+"-"+l]={ids:[l],code:u};else{var d=void 0,f=this.mapJs[a];if(p&&(d=e.__getScriptProps()),f)f.ids.push(l),d&&(f.props[l]=d);else{var h={ids:[l],code:u};d&&(h.props=((n={})[l]=d,n)),this.mapJs[a]=h}}}return s.forEach(function(t){o+=r.mapModel(t)}),o},n.prototype.build=function(t){this.mapJs={},this.mapModel(t);var e,n="";for(var r in this.mapJs){var o=this.mapJs[r];if(o.code)if(o.props){if(0===((null===(e=o.code.toString().match(/\{([\s\S]*)\}/m))||void 0===e?void 0:e[1])||"").replace(/^\s*\/\/.*$/gm,"").trim().length)continue;n+="\n var props = ".concat(JSON.stringify(o.props),";\n var ids = Object.keys(props).map(function(id) { return '#'+id }).join(',');\n var els = document.querySelectorAll(ids);\n for (var i = 0, len = els.length; i < len; i++) {\n var el = els[i];\n (").concat(o.code,".bind(el))(props[el.id]);\n }")}else{var i="#"+o.ids.join(", #");n+="\n var items = document.querySelectorAll('".concat(i,"');\n for (var i = 0, len = items.length; i < len; i++) {\n (function(){\n").concat(o.code,"\n}.bind(items[i]))();\n }")}}return n},n}(u.Hn);const ju=Ru;var Hu,Fu=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Bu=function(){return Bu=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Bu.apply(this,arguments)};(0,e.hasWin)()&&(Hu=r(631),r(531),r(629),r(210));var Vu=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return Fu(n,e),n.prototype.defaults=function(){return{input:"",label:"",codeName:"",theme:"hopscotch",readOnly:!0,lineNumbers:!0,autoFormat:!0}},n.prototype.init=function(e){return(0,t.bindAll)(this,"onChange"),this.editor=Hu.fromTextArea(e,Bu({dragDrop:!1,lineWrapping:!0,mode:this.get("codeName")},this.attributes)),this.element=e,this.editor.on("change",this.onChange),this},n.prototype.onChange=function(){this.trigger("update",this)},n.prototype.getEditor=function(){return this.editor},n.prototype.getElement=function(){return this.element},n.prototype.setElement=function(t){return this.element=t,this},n.prototype.refresh=function(){return this.getEditor().refresh(),this},n.prototype.focus=function(){return this.getEditor().focus(),this},n.prototype.getContent=function(){var t=this.getEditor();return t&&t.getValue()},n.prototype.setContent=function(t,e){var n=this;void 0===e&&(e={});var r=this.editor;if(r){r.setValue(t);var o=this.get("autoFormat");r.autoFormatRange&&(!0===o||Array.isArray(o)&&o.includes(this.get("codeName")))&&(Hu.commands.selectAll(r),r.autoFormatRange(r.getCursor(!0),r.getCursor(!1)),Hu.commands.goDocStart(r)),!e.noRefresh&&setTimeout(function(){return n.refresh()})}},n}(u.Hn);const Uu=Vu;Vu.prototype.CodeMirror=Hu;var zu=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Gu=function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t};const $u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return zu(e,t),e.prototype.template=function(t){var e=t.pfx,r=t.codeName,o=t.label;return n(qu||(qu=Gu(['\n <div class="','editor" id="',"",'">\n <div id="','title">','</div>\n <div id="','code"></div>\n </div>\n '],['\n <div class="','editor" id="',"",'">\n <div id="','title">','</div>\n <div id="','code"></div>\n </div>\n '])),e,e,r,e,o,e)},e.prototype.initialize=function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix},e.prototype.render=function(){var t,e,n=this,r=n.model,o=n.pfx,i=n.$el,a=r.toJSON(),s=r.get("input")||(null===(e=(t=r).getElement)||void 0===e?void 0:e.call(t));return a.pfx=o,i.html(this.template(a)),i.attr("class","".concat(o,"editor-c")),i.find("#".concat(o,"code")).append(s),this},e}(u.G7);var qu,Wu=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ku=function(){return Ku=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Ku.apply(this,arguments)},Yu=function(e){function n(t){var n=e.call(this,t,"CodeManager",Au)||this;n.EditorView=$u;var r=n.config,o=r.pStylePrefix;return o&&(r.stylePrefix=o+r.stylePrefix),n.generators={},n.viewers={},n.defGenerators={html:new Nu,css:new ko,json:new Iu,js:new ju}
1,n.defViewers={CodeMirror:new Uu},n.loadDefaultGenerators().loadDefaultViewers(),n}return Wu(n,e),n.prototype.addGenerator=function(t,e){return this.generators[t]=e,this},n.prototype.getGenerator=function(t){return this.generators[t]},n.prototype.getGenerators=function(){return this.generators},n.prototype.addViewer=function(t,e){return this.viewers[t]=e,this},n.prototype.getViewer=function(t){return this.viewers[t]},n.prototype.getViewers=function(){return this.viewers},n.prototype.createViewer=function(e){void 0===e&&(e={});var n=(0,t.isUndefined)(e.type)?"CodeMirror":e.type,r=this.getViewer(n)&&this.getViewer(n).clone(),o=document.createElement("div"),i=document.createElement("textarea");return o.appendChild(i),r.set(Ku(Ku({},this.config.optsCodeViewer),e)),r.init(i),r.setElement(o),r},n.prototype.updateViewer=function(t,e){t.setContent(e)},n.prototype.getCode=function(t,e,n){void 0===n&&(n={}),n.em=this.em;var r=this.getGenerator(e);return r?r.build(t,n):""},n.prototype.loadDefaultGenerators=function(){for(var t in this.defGenerators)this.addGenerator(t,this.defGenerators[t]);return this},n.prototype.loadDefaultViewers=function(){for(var t in this.defViewers)this.addViewer(t,this.defViewers[t]);return this},n.prototype.destroy=function(){},n}(y);const Xu=Yu;var Zu=r(410),Qu=r.n(Zu);const Ju={maximumStackLength:500,trackSelection:!0};var tp=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ep=function(){return ep=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},ep.apply(this,arguments)},np=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},rp=function(t){return t.avoidStore||t.noUndo},op=function(t){return Object.keys(t.changedAttributes())},ip=function(e){function n(n){var r=e.call(this,n,"UndoManager",Ju)||this;r.config._disable&&(r.config.maximumStackLength=0);var o=!0;return r.um=new(Qu())(ep({track:!0,register:[]},r.config)),r.um.changeUndoType("change",{condition:function(e){var n=e.get("_undo");if(n){var r=e.get("_undoexc");if((0,t.isArray)(r)&&op(e).some(function(t){return r.indexOf(t)>=0}))return!1;if((0,t.isBoolean)(n))return!0;if((0,t.isArray)(n)&&op(e).some(function(t){return n.indexOf(t)>=0}))return!0}return!1},on:function(e,n,r){var i=this;!this.beforeCache&&(this.beforeCache=e.previousAttributes());var a=r||n||{};if(a.noUndo&&setTimeout(function(){i.beforeCache=null}),!rp(a)){var s=e.toJSON({fromUndo:o}),l={object:e,before:this.beforeCache,after:s};if(this.beforeCache=null,!(0,t.isEmpty)(s))return l}}}),r.um.changeUndoType("add",{on:function(t,e,n){if(void 0===n&&(n={}),!rp(n)&&r.isRegistered(e))return{object:e,before:void 0,after:t,options:ep(ep({},n),{fromUndo:o})}}}),r.um.changeUndoType("remove",{on:function(t,e,n){if(void 0===n&&(n={}),!rp(n)&&r.isRegistered(e))return{object:e,before:t,after:void 0,options:ep(ep({},n),{fromUndo:o})}}}),r.um.changeUndoType("reset",{undo:function(t,e){t.reset(e,{fromUndo:o})},redo:function(t,e,n){t.reset(n,{fromUndo:o})},on:function(t,e){if(void 0===e&&(e={}),!rp(e)&&r.isRegistered(t))return{object:t,before:e.previousModels,after:np([],t.models,!0),options:ep(ep({},e),{fromUndo:o})}}}),r.um.on("undo redo",function(){n.trigger("change:canvasOffset"),n.getSelectedAll().map(function(t){return t.trigger("rerender:layer")})}),["undo","redo"].forEach(function(t){return r.um.on(t,function(){return n.trigger(t)})}),r}return tp(n,e),n.prototype.postLoad=function(){var t=this.config,e=this.em;t.trackSelection&&e&&this.add(e.get("selected"))},n.prototype.add=function(t){return this.um.register(t),this},n.prototype.remove=function(t){return this.um.unregister(t),this},n.prototype.removeAll=function(){return this.um.unregisterAll(),this},n.prototype.start=function(){return this.um.startTracking(),this},n.prototype.stop=function(){return this.um.stopTracking(),this},n.prototype.undo=function(t){void 0===t&&(t=!0);var e=this.em,n=this.um;return!e.isEditing()&&n.undo(t),this},n.prototype.undoAll=function(){return this.um.undoAll(),this},n.prototype.redo=function(t){void 0===t&&(t=!0);var e=this.em,n=this.um;return!e.isEditing()&&n.redo(t),this},n.prototype.redoAll=function(){return this.um.redoAll(),this},n.prototype.hasUndo=function(){return!!this.um.isAvailable("undo")},n.prototype.hasRedo=function(){return!!this.um.isAvailable("redo")},n.prototype.isRegistered=function(t){return!!this.getInstance().objectRegistry.isRegistered(t)},n.prototype.getStack=function(){return this.um.stack},n.prototype.getStackGroup=function(){var t=[],e=[];
1return this.getStack().forEach(function(n){var r=n.get("magicFusionIndex");e.indexOf(r)<0&&(e.push(r),t.push(n))}),t},n.prototype.skip=function(t){this.stop(),t(),this.start()},n.prototype.getGroupedStack=function(){var e={};return this.getStack().forEach(function(t,n){var r=t.get("magicFusionIndex"),o=function(t,e){var n=t.attributes,r=n.type,o=n.after,i=n.before,a=n.object,s=n.options;return{index:e,type:r,after:o,before:i,object:a,options:void 0===s?{}:s}}(t,n);e[r]?e[r].push(o):e[r]=[o]}),Object.keys(e).map(function(n){var r=e[n];return{index:r[r.length-1].index,actions:r,labels:(0,t.unique)(r.reduce(function(t,e){var n,r=null===(n=e.options)||void 0===n?void 0:n.action;return r&&t.push(r),t},[]))}})},n.prototype.goToGroup=function(e){var n=this;if(e){var r=this.getPointer(),o=e.index-r;(0,t.times)(Math.abs(o),function(){n[o<0?"undo":"redo"](!1)})}},n.prototype.getPointer=function(){return this.getStack().pointer},n.prototype.clear=function(){return this.um.clear(),this},n.prototype.getInstance=function(){return this.um},n.prototype.destroy=function(){this.clear().removeAll()},n}(y);const ap=ip,sp={stylePrefix:"rte-",adjustToolbar:!0,actions:["bold","italic","underline","strikethrough","link","wrap"],custom:!1};var lp,cp=function(){return cp=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},cp.apply(this,arguments)};!function(t){t[t.ACTIVE=1]="ACTIVE",t[t.INACTIVE=0]="INACTIVE",t[t.DISABLED=-1]="DISABLED"}(lp||(lp={}));var up="_rte",pp=function(t,e){void 0===e&&(e="A");var n=t.selection()||{},r=n.anchorNode,o=n.focusNode,i=null==r?void 0:r.parentNode,a=null==o?void 0:o.parentNode;return(null==i?void 0:i.nodeName)==e||(null==a?void 0:a.nodeName)==e},dp="data-selectme",fp={bold:{name:"bold",icon:"<b>B</b>",attributes:{title:"Bold"},result:function(t){return t.exec("bold")}},italic:{name:"italic",icon:"<i>I</i>",attributes:{title:"Italic"},result:function(t){return t.exec("italic")}},underline:{name:"underline",icon:"<u>U</u>",attributes:{title:"Underline"},result:function(t){return t.exec("underline")}},strikethrough:{name:"strikethrough",icon:"<s>S</s>",attributes:{title:"Strike-through"},result:function(t){return t.exec("strikeThrough")}},link:{icon:'<svg viewBox="0 0 24 24">\n <path fill="currentColor" d="M3.9,12C3.9,10.29 5.29,8.9 7,8.9H11V7H7A5,5 0 0,0 2,12A5,5 0 0,0 7,17H11V15.1H7C5.29,15.1 3.9,13.71 3.9,12M8,13H16V11H8V13M17,7H13V8.9H17C18.71,8.9 20.1,10.29 20.1,12C20.1,13.71 18.71,15.1 17,15.1H13V17H17A5,5 0 0,0 22,12A5,5 0 0,0 17,7Z" />\n </svg>',name:"link",attributes:{style:"font-size:1.4rem;padding:0 4px 2px;",title:"Link"},state:function(t){return t&&t.selection()&&pp(t)?1:0},result:function(t){pp(t)?t.exec("unlink"):t.insertHTML('<a href="" '.concat(dp,">").concat(t.selection(),"</a>"),{select:!0})}},wrap:{name:"wrap",icon:'<svg viewBox="0 0 24 24">\n <path fill="currentColor" d="M20.71,4.63L19.37,3.29
1C19,2.9 18.35,2.9 17.96,3.29L9,12.25L11.75,15L20.71,6.04C21.1,5.65 21.1,5 20.71,4.63M7,14A3,3 0 0,0 4,17C4,18.31 2.84,19 2,19C2.92,20.22 4.5,21 6,21A4,4 0 0,0 10,17A3,3 0 0,0 7,14Z" />\n </svg>',attributes:{title:"Wrap for style"},state:function(t){return(null==t?void 0:t.selection())&&pp(t,"SPAN")?-1:0},result:function(t){!pp(t,"SPAN")&&t.insertHTML("<span ".concat(dp,">").concat(t.selection(),"</span>"),{select:!0})}}},hp=function(){function n(e,n,r){void 0===r&&(r={});var o=this;if(this.em=e,this.settings=r,n[up])return n[up];n[up]=this,this.setEl(n),this.updateActiveActions=this.updateActiveActions.bind(this),this.__onKeydown=this.__onKeydown.bind(this),this.__onPaste=this.__onPaste.bind(this);var i=(r.actions||[]).map(function(e){var n=e;return(0,t.isString)(e)?n=cp({},fp[e]):fp[e.name]&&(n=cp(cp({},fp[e.name]),e)),n}),a=i.length?i:Object.keys(fp).map(function(t){return fp[t]});r.classes=cp({actionbar:"actionbar",button:"action",active:"active",disabled:"disabled",inactive:"inactive"},r.classes);var s=r.classes,l=r.actionbar;if(this.actionbar=l,this.classes=s,this.actions=a,!l){if(!this.isCustom(r.module)){var c=r.actionbarContainer;(l=document.createElement("div")).className=s.actionbar,null==c||c.appendChild(l),this.actionbar=l}a.forEach(function(t){return o.addAction(t)})}return r.styleWithCSS&&this.exec("styleWithCSS"),this}return n.prototype.isCustom=function(t){var e=t||this.em.RichTextEditor;return!(!(null==e?void 0:e.config.custom)&&!(null==e?void 0:e.customRte))},n.prototype.destroy=function(){},n.prototype.setEl=function(t){this.el=t,this.doc=t.ownerDocument},n.prototype.updateActiveActions=function(){var t=this,e=this.getActions();e.forEach(function(e){var n=e.update,r=e.btn,o=t.classes,i=o.active,a=o.inactive,s=o.disabled,l=e.state,c=e.name,u=t.doc,p=lp.INACTIVE;if(r&&(r.className=r.className.replace(i,"").trim(),r.className=r.className.replace(a,"").trim(),r.className=r.className.replace(s,"").trim()),l){var d=l(t,u);if(p=d,r)switch(d){case 1:r.className+=" ".concat(i);break;case 0:r.className+=" ".concat(a);break;case-1:r.className+=" ".concat(s)}}else u.queryCommandSupported(c)&&u.queryCommandState(c)&&(r&&(r.className+=" ".concat(i)),p=lp.ACTIVE);e.currentState=p,null==n||n(t,e)}),e.length&&this.em.RichTextEditor.__dbdTrgCustom()},n.prototype.enable=function(t){return this.enabled?this:this.__toggleEffects(!0,t)},n.prototype.disable=function(){return this.__toggleEffects(!1)},n.prototype.__toggleEffects=function(t,n){void 0===t&&(t=!1),void 0===n&&(n={});var r=t?e.on:e.off,o=this.el,i=this.doc,a=this.actionbarEl();if(a&&(a.style.display=t?"":"none"),o.contentEditable="".concat(!!t),r(o,"mouseup keyup",this.updateActiveActions),r(i,"keydown",this.__onKeydown),r(i,"paste",this.__onPaste),this.enabled=t,t){var s=n.event;if(this.syncActions(),this.updateActiveActions(),s){var l=null;if(i.caretRangeFromPoint){var c=(0,e.getPointerEvent)(s);l=i.caretRangeFromPoint(c.clientX,c.clientY)}else s.rangeParent&&(l=i.createRange()).setStart(s.rangeParent,s.rangeOffset);var u=i.getSelection();null==u||u.removeAllRanges(),l&&(null==u||u.addRange(l))}o.focus()}return this},n.prototype.__onKeydown=function(t){var e=t,n=this.doc;"Enter"!==e.key||["insertOrderedList","insertUnorderedList"].some(function(t){return n.queryCommandState(t)})||(n.execCommand("insertLineBreak"),e.preventDefault())},n.prototype.__onPaste=function(t){var e=t.clipboardData||window.clipboardData,n=e.getData("text"),r=e.getData("text/html");if(n&&!r){t.preventDefault();var o=n.replace(/(?:\r\n|\r|\n)/g,"<br/>");this.doc.execCommand("insertHTML",!1,o)}},n.prototype.syncActions=function(){var t=this;this.getActions().forEach(function(e){if(t.actionbar&&(!e.state||e.state&&e.state(t,t.doc)>=0)){var n=e.event||"click",r=e.btn;r&&(r["on".concat(n)]=function(){e.result(t,e),t.updateActiveActions()})}})},n.prototype.addAction=function(t,e){void 0===e&&(e={});var n=e.sync,r=this.actionbarEl();if(r){var o=t.icon,i=t.attributes,a=void 0===i?{}:i,s=document.createElement("span");for(var l in s.className=this.classes.button,t.btn=s,a)s.setAttribute(l,a[l]);"string"==typeof o?s.innerHTML=o:s.appendChild(o),r.appendChild(s)}n&&(this.actions.push(t),this.syncActions())},n.prototype.getActions=function(){return this.actions},n.prototype.selection=function(){return this.doc.getSelection()},n.prototype.exec=function(t,e){this.doc.execCommand(t,!1,e)},n.prototype.actionbarEl=function(){return this.actionbar},n.prototype.insertHTML=function(n,r){var o=(void 0===r?{}:r).select,i=this,a=i.em,s=i.doc,l=i.el,c=s.getSelection();if(c&&c.rangeCount){var u=(0,e.getModel)(l),p=s.createElement("div"),d=c.getRangeAt(0);d.deleteContents(),(0,t.isString)(n)?p.innerHTML=n:n&&p.appendChild(n),Array.prototype.slice.call(p.childNodes).forEac
1h(function(t){d.insertNode(t)}),c.removeAllRanges(),c.addRange(d),l.focus(),o&&u&&(u.once("rte:disable",function(){var t=u.find("[".concat(dp,"]"))[0];t&&(a.setSelected(t),t.removeAttributes(dp))}),u.trigger("disable"))}},n}();const gp=hp;var mp=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),vp=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,s)}l((r=r.apply(t,e||[])).next())})},yp=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}},bp=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},_p="change:canvasOffset frame:scroll component:update",Tp={enable:"rte:enable",disable:"rte:disable",custom:"rte:custom"},Cp=function(n){function r(e){var r=n.call(this,e,"RichTextEditor",sp)||this;r.events=Tp;var o=r.config,i=o.pStylePrefix;i&&(o.stylePrefix=i+o.stylePrefix),r.pfx=o.stylePrefix,r.actions=o.actions||[];var a=new u.Hn;return r.model=a,a.on("change:currentView",r.__trgCustom,r),r.__dbdTrgCustom=(0,t.debounce)(function(){return r.__trgCustom()},0),r}return mp(r,n),r.prototype.onLoad=function(){if((0,e.hasWin)()){var t=this.config,n=t.pStylePrefix,r=t.custom,o=(0,At.ut)("div",{class:(0,At.cx)("".concat(n,"rte-toolbar"),!r&&"".concat(n,"one-bg ").concat(n,"rte-toolbar-ui"))});this.toolbar=o,this.initRte((0,At.ut)("div")),(0,e.on)(o,"mousedown",function(t){return t.stopPropagation()})}},r.prototype.__trgCustom=function(){var t=this,e=t.model,n=t.em,r=t.events;n.trigger(r.custom,{enabled:!!e.get("currentView"),container:this.getToolbarEl(),actions:this.getAll()})},r.prototype.destroy=function(){var t,e,n;null===(t=this.globalRte)||void 0===t||t.destroy(),null===(n=null===(e=this.customRte)||void 0===e?void 0:e.destroy)||void 0===n||n.call(e),this.model.stopListening().clear({silent:!0}),this.__dbdTrgCustom.cancel(),(0,At.L_)(this.toolbar)},r.prototype.postRender=function(t){var e=t.model.get("Canvas");this.toolbar.style.pointerEvents="all",this.hideToolbar(),e.getToolsEl().appendChild(this.toolbar)},r.prototype.initRte=function(t){var e=this.globalRte,n=this,r=n.em,o=n.pfx,i=n.actionbar,a=n.config,s=this.actions||bp([],a.actions,!0),l={actionbar:"".concat(o,"actionbar"),button:"".concat(o,"action"),active:"".concat(o,"active"),inactive:"".concat(o,"inactive"),disabled:"".concat(o,"disabled")};return e?(e.em=r,e.setEl(t)):(e=new gp(r,t,{classes:l,actions:s,actionbar:i,actionbarContainer:this.toolbar,module:this}),this.globalRte=e),e.actionbar&&(this.actionbar=e.actionbar),e.actions&&(this.actions=e.actions),e},r.prototype.add=function(t,e){var n;void 0===e&&(e={}),e.name=t,null===(n=this.globalRte)||void 0===n||n.addAction(e,{sync:!0})},r.prototype.get=function(t){var e,n;return null===(e=this.globalRte)||void 0===e||e.getActions().forEac
1h(function(e){e.name==t&&(n=e)}),n},r.prototype.getAll=function(){var t;return(null===(t=this.globalRte)||void 0===t?void 0:t.getActions())||[]},r.prototype.remove=function(t){var e,n=this.getAll(),r=this.get(t);if(r){var o=r.btn,i=n.indexOf(r);null===(e=null==o?void 0:o.parentNode)||void 0===e||e.removeChild(o),n.splice(i,1)}return r},r.prototype.run=function(e){var n=this.globalRte,r=(0,t.isString)(e)?this.get(e):e;n&&r&&(r.result(n,r),n.updateActiveActions())},r.prototype.getToolbarEl=function(){return this.toolbar},r.prototype.updatePosition=function(){var n=this.em,r=this.toolbar,o=n.Canvas,i=r.style,a=o.getTargetToElementFixed(this.lastEl,r,{event:"rteToolbarPosUpdate",left:0});["top","left","bottom","right"].forEach(function(n){var r=a[n];(0,e.isDef)(r)&&(i[n]=(0,t.isString)(r)?r:(r||0)+"px")})},r.prototype.enable=function(t,e,n){return void 0===n&&(n={}),vp(this,void 0,void 0,function(){var r,o,i,a,s;return yp(this,function(l){switch(l.label){case 0:return this.lastEl=t.el,o=(r=this).customRte,i=r.em,a=t.getChildrenContainer(),this.toolbar.style.display="",[4,o?o.enable(a,e):this.initRte(a).enable(n)];case 1:return s=l.sent(),i&&(setTimeout(this.updatePosition.bind(this),0),i.off(_p,this.updatePosition,this),i.on(_p,this.updatePosition,this),i.trigger("rte:enable",t,s)),this.model.set({currentView:t}),[2,s]}})})},r.prototype.getContent=function(e,n){return vp(this,void 0,void 0,function(){var r;return yp(this,function(o){switch(o.label){case 0:return(r=this.customRte)&&n&&(0,t.isFunction)(r.getContent)?[4,r.getContent(e.el,n)]:[3,2];case 1:return[2,o.sent()];case 2:return[2,e.getChildrenContainer().innerHTML]}})})},r.prototype.hideToolbar=function(){var t=this.toolbar.style,e="-1000px";t.top=e,t.left=e,t.display="none"},r.prototype.disable=function(t,e){var n=this.em,r=this.customRte,o=t.getChildrenContainer();r?r.disable(o,e):e&&e.disable(),this.hideToolbar(),n&&(n.off(_p,this.updatePosition,this),n.trigger("rte:disable",t,e)),this.model.unset("currentView")},r}(y);const wp=Cp;var Ep=r(790);const Sp={stylePrefix:"com-",defaults:{},strict:!0};var xp=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Op=function(){return Op=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Op.apply(this,arguments)},Ap=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},kp=[["preview","Preview","preview"],["resize","Resize","resize"],["fullscreen","Fullscreen","fullscreen"],["copy","CopyComponent"],["paste","PasteComponent"],["canvas-move","CanvasMove"],["canvas-clear","CanvasClear"],["open-code","ExportTemplate","export-template"],["open-layers","OpenLayers","open-layers"],["open-styles","OpenStyleManager","open-sm"],["open-traits","OpenTraitManager","open-tm"],["open-blocks","OpenBlocks","open-blocks"],["open-assets","OpenAssets","open-assets"],["component-select","SelectComponent","select-comp"],["component-outline","SwitchVisibility","sw-visibility"],["component-offset","ShowOffset","show-offset"],["component-move","MoveComponent","move-comp"],["component-next","ComponentNext"],["component-prev","ComponentPrev"],["component-enter","ComponentEnter"],["component-exit","ComponentExit","select-parent"],["component-delete","ComponentDelete"],["component-style-clear","ComponentStyleClear"],["component-drag","ComponentDrag"]],Pp=function(e){function n(n){var o=e.call(this,n,"Commands",Sp)||this;o.CommandAbstract=Ep.default,o.defaultCommands={},o.commands={},o.active={};var i=o.config,a=i.pStylePrefix,s=o.defaultCommands;for(var l in a&&(i.stylePrefix=a+i.stylePrefix),Object.keys(i.defaults).forEac
1h(function(t){var e=i.defaults[t];e.id&&o.add(e.id,e)}),s["tlb-delete"]={run:function(t){return t.runCommand("core:component-delete")}},s["tlb-clone"]={run:function(t){t.runCommand("core:copy"),t.runCommand("core:paste",{action:"clone-component"})}},s["tlb-move"]={run:function(e,n,r){void 0===r&&(r={});var o=e.getModel(),i=r&&r.event,a=r.target,s=a||e.getSelected(),l=a?[a]:Ap([],e.getSelectedAll(),!0),c=i&&"dragstart"==i.type,u={preserveSelected:1};if(!s||!s.get("draggable"))return o.logWarning("The element is not draggable");var p=s.get("dmode")||o.get("dmode"),d=function(){return o.stopDefault(u)},f=(0,t.includes)(["absolute","translate"],p);l.forEach(function(t){return t.trigger("disable")}),c?setTimeout(d,0):d();var h=function(t){o.trigger("".concat(qe,":start"),t)},g=function(t){o.trigger(qe,t)},m=function(t,n,r){l.forEach(function(t){return t.set("status","selected")}),e.select(l),s.emitUpdate(),o.trigger("".concat(qe,":end"),r),setTimeout(function(){return o.runDefault(u)}),(f||r.cancelled)&&o.set("_cmpDrag",1)};if(f)e.runCommand("core:component-drag",{guidesInfo:1,mode:p,target:s,onStart:h,onDrag:g,onEnd:m,event:i});else{c&&i.dataTransfer.setDragImage(s.view.el,0,0);var v=e.Commands.get("move-comp");v.onStart=h,v.onDrag=g,v.onEndMoveFromModel=m,v.initSorterFromModels(l)}l.forEach(function(t){return t.set("status","freezed-selected")})}},s["core:undo"]=function(t){return t.UndoManager.undo()},s["core:redo"]=function(t){return t.UndoManager.redo()},kp.forEach(function(t){var e=t[2],o=r(828)("./".concat(t[1])).default,i="core:".concat(t[0]);s[i]=o,e&&(s[e]=o,["run","stop"].forEach(function(t){n.on("".concat(t,":").concat(e),function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return n.trigger.apply(n,Ap(["".concat(t,":").concat(i)],e,!1))})}))}),i.model=n.Canvas,s)o.add(l,s[l]);return o}return xp(n,e),n.prototype.add=function(e,n){var r=(0,t.isFunction)(n)?{run:n}:n;return r.stop||(r.noStop=!0),delete r.initialize,r.id=e,this.commands[e]=Ep.default.extend(r),this},n.prototype.get=function(e){var n=this.commands[e];return(0,t.isFunction)(n)?(n=new n(this.config),this.commands[e]=n):n||this.em.logWarning("'".concat(e,"' command not found")),n},n.prototype.extend=function(t,e){void 0===e&&(e={});var n=this.get(t);if(n){var r=Op(Op({},n.constructor.prototype),e);this.add(t,r);var o=kp.filter(function(e){return"core:".concat(e[0])===t&&e[2]})[0];o&&this.add(o[2],r)}return this},n.prototype.has=function(t){return!!this.commands[t]},n.prototype.getAll=function(){return this.commands},n.prototype.run=function(t,e){return void 0===e&&(e={}),this.runCommand(this.get(t),e)},n.prototype.stop=function(t,e){return void 0===e&&(e={}),this.stopCommand(this.get(t),e)},n.prototype.isActive=function(t){return this.getActive().hasOwnProperty(t)},n.prototype.getActive=function(){return this.active},n.prototype.runCommand=function(t,e){var n;if(void 0===e&&(e={}),t&&t.run){var r=this.em,o=this.config,i=t.id,a=r.Editor;this.isActive(i)&&!e.force&&o.strict||(n=a&&t.callRun(a,e),i&&t.stop&&!t.noStop&&!e.abort&&(this.active[i]=n))}return n},n.prototype.stopCommand=function(t,e){var n;if(void 0===e&&(e={}),t&&t.run){var r=this.em,o=this.config,i=t.id,a=r.Editor;
1(this.isActive(i)||e.force||!o.strict)&&(i&&delete this.active[i],n=t.callStop(a,e))}return n},n.prototype.create=function(t){return t.stop||(t.noStop=!0),new(Ep.default.extend(t))(this.config)},n.prototype.destroy=function(){this.defaultCommands={},this.commands={},this.active={}},n}(y);const Np=Pp,Mp={sectors:[{name:"General",open:!1,properties:["display","float","position","top","right","left","bottom"]},{name:"Flex",open:!1,properties:["flex-direction","flex-wrap","justify-content","align-items","align-content","order","flex-basis","flex-grow","flex-shrink","align-self"]},{name:"Dimension",open:!1,properties:["width","height","max-width","min-height","margin","padding"]},{name:"Typography",open:!1,properties:["font-family","font-size","font-weight","letter-spacing","color","line-height","text-align","text-shadow"]},{name:"Decorations",open:!1,properties:["background-color","border-radius","border","box-shadow","background"]},{name:"Extra",open:!1,properties:["opacity","transition","transform"]}],appendTo:"",stylePrefix:"sm-",custom:!1,hideNotStylable:!0,highlightChanged:!0,highlightComputed:!0,showComputed:!0,clearProperties:!0,avoidComputed:["width","height"]};var Lp=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ip=function(){return Ip=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Ip.apply(this,arguments)},Dp=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n},Rp=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},jp=function(n){function r(){return null!==n&&n.apply(this,arguments)||this}return Lp(r,n),r.getDefaults=function(){return(0,t.result)(this.prototype,"defaults")},r.prototype.defaults=function(){return{name:"",property:"",type:"",defaults:"",info:"",value:"",icon:"",functionName:"",status:"",visible:!0,fixedValues:["initial","inherit"],full:!1,important:!1,toRequire:!1,requires:void 0,requiresParent:null,parentTarget:null}},r.prototype.initialize=function(t,n){void 0===t&&(t={}),void 0===n&&(n={}),this.em=n.em;var o=this.getId()||"",i=this.get("name")||this.get("label")||"";!this.get("property")&&this.set("property",(i||o).replace(/ /g,"-"));var a=this.get("property");!this.get("id")&&this.set("id",a),!i&&this.set("name",(0,e.capitalize)(a).replace(/-/g," ")),this.on("change",this.__upTargets),r.callInit(this,t,n)},r.prototype.__getParentProp=function(){var t,e;return null===(e=null===(t=this.collection)||void 0===t?void 0:t.opts)||void 0===e?void 0:e.parentProp},r.prototype.__upTargets=function(e,n){var r,o=this;void 0===n&&(n={});var i=this.em.Styles,a=this.getName(),s=n.__clear,l=s?"":this.__getFullValue(n),c=this.__getParentProp(),u=this.changedAttributes(),p=(0,t.keys)(u).reduce(function(t,e){return t[e]=o.previous(e),t},{}),d=Rp(Rp([],(0,t.keys)(this.__getClearProps()),!0),["__p"],!1),f=(0,t.keys)(u),h=!n.__up&&!c&&(s||d.some(function(t){return f.indexOf(t)>=0})),g=this.get("onChange"),m={property:this,from:p,to:u,value:l,opts:n};i.__trgEv(i.events.propertyUpdate,m),g&&g(m),h&&this.__upTargetsStyle(((r={})[a]=l,r),n)},r.prototype.__upTargetsStyle=function(t,e){var n,r=null===(n=this.em)||void 0===n?void 0:n.get("StyleManager");null==r||r.addStyleTargets(Ip(Ip({},t),{__p:!!e.avoidStore}),e)},r.prototype._up=function(t,e){void 0===e&&(e={}),e.noTarget&&(e.__up=!0);var n=e.partial,r=Dp(e,["partial"]);return t.__p=!(!r.avoidStore&&!n),this.set(t,Ip(Ip({},r),{avoidStore:t.__p}))},r.prototype.up=function(t,e){void 0===e&&(e={}),this.set(t,Ip(Ip({},e),{__up:!0}))},r.prototype.init=function(){},r.prototype.getId=function(){return this.get("id")},r.prototype.getType=function(){return this.get("type")},r.prototype.getName=function(){return this.get("property")},r.prototype.getLabel=function(t){var e;void 0===t&&(t={});var n=t.locale,r=void 0===n||n,o=this.getId(),i=this.get("name")||this.get("label");return r&&(null===(e=this.em)||void 0===e?void 0:e.t("styleManager.properties.".concat(o)))||i},r.prototype.getValue=function(t){void 0===t&&(t={});var e=t.noDefault,n=this.get("value");return this.hasValue()||e?n:this.getDefaultValue()},r.prototype.hasValue=function(e){void 0===e&&(e={});var n=e.noParent&&this.getParentTarget(),r=this.get("value");return!(0,t.isUndefined)(r)&&""!==r&&!n},r.prototype.hasValueParent=function(){return this.hasValue()&&!this.hasValue({noParent:!0})},r.prototype.getStyle=function(t){var n;void 0===t&&(t={});var r=this.getName();return(n={})[t.camelCase?(0,e.camelCase)(r):r]=this.__getFullValue(t),n},r.prototype.getDefaultValue=function(){var e=this.get("default");return"".concat((0,t.isUndefined)(e)?this.get("defaults"):e)},r.prototype.upValue=function(t,e){void 0===e&&(e={});var n=null===t||""===t?this.__getClearProps():this.__parseValue(t,e);return this._up(n,e)},r.prototype.isVisible=function(){return!!this.get("visible")},r.prototype.clear=function(t){return void 0===t&&(t={}),this._up(this.__getClearProps(),Ip(Ip({},t),{__clear:!0})),this},r.prototype.canClear=function(){var t=this.getParent();return t?t.__canClearProp(this):this.hasValue({noParent:!0})},r.prototype.getParent=function(){return this.__getParentProp()},r.prototype.isFull=function(){return!!this.get("full")},r.prototype.__parseValue=function(t,e){return this.parseValue(t,e)},r.prototype.__getClearProps=function(){return{value:""}},r.prototype.setValue=function(t,e,n){void 0===e&&(e=!0),void 0===n&&(n={});var r=this.parseValue(t),o=!e;!o&&this.set({value:void 0},{avoidStore:o,silent:!0}),this.set(r,Ip({avoidStore:o},n))},r.prototype.setValueFromInput=function(t,e,n){void 0===n&&(n={}),this.setValue(t,e,Ip(Ip({},n),{fromInput:1}))},r.prototype.parseValue=function(e,n){void 0===n&&(n={});var r={value:e},o="!important";if((0,t.isString)(e)&&-1!==e.indexOf(o)&&(r.value=e.replace(o,"").trim(),r.important=!0),!this.get("functionName")&&!n.complete)return r;var i=[],a="".concat(r.value),s=a.indexOf("(")+1,l=a.lastIndexOf(")"),c=a.substring(0,s-1);if(c&&(r.functionName=c),i.push(s),l>=0&&i.push(l),r.value=String.prototype.substring.apply(a,i),n.numeric){var u=parseFloat(r.value);r.unit=r.value.replace(u,""),r.value=u}return r},r.prototype.__getFullValue=function(t){var e=(void 0===t?{}:t).withDefault;return!this.hasValue()&&e?this.getDefaultValue():this.getFullValue()},r.prototype.getFullValue=function(e,n){void 0===n&&(n={});var r=this.get("functionName"),o=this.getDefaultValue(),i=(0,t.isUndefined)(e)?this.get("value"):e,a=!(0,t.isUndefined)(i)&&""!==i;if(i&&o&&i===o)return o;if(r&&a){var s="url"===r?"'".concat(i.replace(/'|"/g,""),"'"):i;i="".concat(r,"(").concat(s,")")}return a&&this.get("important")&&!n.skipImportant&&(i="".concat(i," !important")),i||""},r.prototype.__setParentTarget=function(t){this.up({parentTarget:t})},r.prototype.getParentTarget=function(){return this.get("parentTarget")||null},r.prototype.__parseFn=function(t){void 0===t&&(t="");var e=t.indexOf("(")+1,n=t.lastIndexOf(")");return{name:t.substring(0,e-1).trim(),value:String.prototype.substring.apply(t,[e,n>=0?n:void 0]).trim()}},r.prototype.__checkVisibility=function(n){var r=n.target,o=n.component,i=n.sectors,a=o||r;if(!a)return!1;var s=this.getId(),l=this.getName(),c=this.get("toRequire"),u=this.get("requires"),p=this.get("requiresParent"),d=a.get("unstylable"),f=a.get("stylable-require"),h=a.get("stylable");if((0,t.isArray)(h)&&(h=h.indexOf(l)>=0),(0,t.isArray)(d)&&(h=d.indexOf(l)<0),c&&(h=!r||f&&(f.indexOf(s)>=0||f.indexOf(l)>=0)),i&&u){var g=(0,t.keys)(u);
1i.forEach(function(e){e.getProperties().forEach(function(e){if((0,t.includes)(g,e.id)){var n=u[e.id];h=h&&(0,t.includes)(n,e.get("value"))}})})}if(p){var m=o&&o.parent(),v=m&&m.getEl();if(v){var y=(0,e.hasWin)()?window.getComputedStyle(v):{};(0,t.each)(p,function(e,n){h=h&&y[n]&&(0,t.includes)(e,y[n])})}else h=!1}return!!h},r}(u.Hn);const Hp=jp;jp.callParentInit=function(t,e,n,r){void 0===r&&(r={}),t.prototype.initialize.apply(e,[n,Ip(Ip({},r),{skipInit:1})])},jp.callInit=function(t,e,n){void 0===n&&(n={}),!n.skipInit&&t.init(e,n)};var Fp=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Bp=function(){return Bp=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Bp.apply(this,arguments)},Vp=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},Up=function(t){return"integer"===t||"number"===t},zp=function(n){function r(){return null!==n&&n.apply(this,arguments)||this}return Fp(r,n),r.prototype.defaults=function(){return Bp(Bp({},Hp.getDefaults()),{detached:!1,properties:[],separator:" ",join:null,fromStyle:null,toStyle:null,full:!0})},r.prototype.initialize=function(t,e){void 0===t&&(t={}),void 0===e&&(e={}),Hp.callParentInit(Hp,this,t,e);var n=this.em,r=new ef(this.get("properties")||[],{em:n,parentProp:this});this.set("properties",r,{silent:!0}),this.listenTo(r,"change",this.__upProperties),Hp.callInit(this,t,e)},Object.defineProperty(r.prototype,"properties",{get:function(){return this.get("properties")||[]},enumerable:!1,configurable:!0}),r.prototype.getProperties=function(){return Vp([],this.get("properties").models,!0)},r.prototype.getProperty=function(t){return this.properties.filter(function(e){return e.getId()===t||e.getName()===t})[0]},r.prototype.getPropertyAt=function(t){return this.get("properties").at(t)},r.prototype.isDetached=function(){return!!this.get("detached")},r.prototype.getValues=function(t){var e=(void 0===t?{}:t).byName;return this.getProperties().reduce(function(t,n){return t[e?n.getName():n.getId()]="".concat(n.__getFullValue()),t},{})},r.prototype.getSeparator=function(){return this.getSplitSeparator()},r.prototype.getJoin=function(){return this.__getJoin()},r.prototype.getStyleFromProps=function(t){var n;void 0===t&&(t={});var r=this.getName(),o=this.__getJoin(),i=this.get("toStyle"),a=this.getValues(),s={};if(i)s=i(a,{join:o,name:r,property:this});else if(a=this.getValues({byName:!0}),this.isDetached())s=a;else{var l=this.getProperties().map(function(t){return t.__getFullValue({withDefault:1})}).filter(Boolean).join(o);(n={})[r]=l,s=n}return this.isDetached()?s[r]="":(s[r]=s[r]||"",s=Bp(Bp({},s),this.getProperties().reduce(function(t,e){return t[e.getName()]="",t},{}))),t.camelCase?Object.keys(s).reduce(function(t,n){return t[(0,e.camelCase)(n)]=s[n],t},{}):s},r.prototype.getSplitSeparator=function(){return new RegExp("".concat(this.get("separator"),"(?![^\\(]*\\))"))},r.prototype.__upProperties=function(t,e){if(void 0===e&&(e={}),!e.__up&&!e.__clearIn){var n=this.__getParentProp();if(n)return n.__upProperties(this,e);this.__upTargetsStyleProps(e,t)}},r.prototype.__upTargetsStyleProps=function(t,e){var n;void 0===t&&(t={});var r=this.getStyleFromProps();if(this.isDetached()&&e){var o=e.getName();(n={})[o]=r[o],r=n}this.__upTargetsStyle(r,t)},r.prototype._up=function(t,e){return void 0===e&&(e={}),this.__setProperties(this.__getSplitValue(t.value),e),Hp.prototype._up.call(this,t,e),this},r.prototype.getStyle=function(t){return this.getStyleFromProps(t)},r.prototype.__getFullValue=function(t){return void 0===t&&(t={}),this.isDetached()||t.__clear?"":this.getStyleFromProps()[this.getName()]||""},r.prototype.__getJoin=function(){var e=this.get("join");return(0,t.isString)(e)?e:this.get("separator")},r.prototype.__styleHasProps=function(e){void 0===e&&(e={});var n=this.getName(),r=this.getProperties().map(function(t){return t.getName()});return Vp([n],r,!0).some(function(n){return!(0,t.isUndefined)(e[n])&&""!==e[n]})},r.prototype.__splitValue=function(t,e){return t.split(e).map(function(t){return t.trim()}
1).filter(Boolean)},r.prototype.__splitStyleName=function(t,e,n){return this.__splitValue(t[e]||"",n)},r.prototype.__getSplitValue=function(e,n){void 0===e&&(e="");var r=(void 0===n?{}:n).byName,o=this.getProperties(),i=4===o.length&&o.every(function(t){return Up(t.getType())}),a=this.__splitValue(e,this.getSplitSeparator()),s={};return o.forEach(function(e,n){var o=a[n],l=(0,t.isUndefined)(o)?"":o;if(i){var c=a.length;l=a[n]||a[n%c+(1!=c&&c%2?1:0)]||l}var u=r?e.getName():e.getId();s[u]=l||""}),s},r.prototype.__getPropsFromStyle=function(e,n){if(void 0===e&&(e={}),void 0===n&&(n={}),!this.__styleHasProps(e))return null;var r=n.byName,o=this.getName(),i=this.getProperties(),a=this.getSplitSeparator(),s=this.get("fromStyle"),l=s?s(e,{property:this,name:o,separator:a}):{};return s||(l=this.__getSplitValue(e[o]||"",{byName:r}),i.forEach(function(n){var o=e[n.getName()],i=r?n.getName():n.getId();(0,t.isUndefined)(o)||""===o||(l[i]=o)})),l},r.prototype.__setProperties=function(e,n){void 0===e&&(e={}),void 0===n&&(n={}),this.getProperties().forEach(function(t){var r=e[t.getId()];t.__getFullValue()!==r&&t.upValue(r,n)});var r=(0,t.keys)(e).map(function(t){return e[t]}).join(" ");this.set("value",r,{silent:!0})},r.prototype.clear=function(){var t=this;return this.getProperties().map(function(e){return e.clear({__clearIn:!t.isDetached()})}),Hp.prototype.clear.call(this),this},r.prototype.hasValue=function(t){return this.getProperties().some(function(e){return e.hasValue(t)})},r.prototype.getFullValue=function(){return this.__getFullValue()},r.prototype.__canClearProp=function(t){return this.isDetached()&&t.hasValue({noParent:!0})},r}(Hp);const Gp=zp;var $p=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),qp=function(){return qp=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},qp.apply(this,arguments)},Wp=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return $p(n,t),n.prototype.defaults=function(){return{values:{}}},n.prototype.initialize=function(){var t=this.collection;this.prop=null==t?void 0:t.prop},n.prototype.getId=function(){return this.cid},n.prototype.getIndex=function(){var t=this.collection;return t?t.indexOf(this):-1},n.prototype.getValues=function(t){void 0===t&&(t={});var n=this.get("values");return t.camelCase?Object.keys(n).reduce(function(t,r){return t[(0,e.camelCase)(r)]=n[r],t},{}):n},n.prototype.getLabel=function(){var t;return null===(t=this.prop)||void 0===t?void 0:t.getLayerLabel(this)},n.prototype.isSelected=function(){var t;return(null===(t=this.prop)||void 0===t?void 0:t.getSelectedLayer())===this},n.prototype.select=function(){var t;return null===(t=this.prop)||void 0===t?void 0:t.selectLayer(this)},n.prototype.remove=function(){var t;return null===(t=this.prop)||void 0===t?void 0:t.removeLayer(this)},n.prototype.move=function(t){var e;return null===(e=this.prop)||void 0===e?void 0:e.moveLayer(this,t)},n.prototype.getStylePreview=function(t){var e;return void 0===t&&(t={}),null===(e=this.prop)||void 0===e?void 0:e.getStylePreview(this,t)},n.prototype.hasPreview=function(){var t;return!!(null===(t=this.prop)||void 0===t?void 0:t.get("preview"))},n.prototype.upValues=function(t){return void 0===t&&(t={}),this.set("values",qp(qp({},this.getValues()),t))},n}(u.Hn);const Kp=Wp;var Yp=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xp=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Yp(e,t),e.prototype.initialize=function(t,e){void 0===e&&(e={}),this.prop=e.prop},e}(u.FE);const Zp=Xp;Xp.prototype.model=Kp;var Qp=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Jp=function(){return Jp=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Jp.apply(this,arguments)},td=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n}
1,ed=/,(?![^\(]*\))/,nd=/\s(?![^(]*\))/,rd=function(n){function r(){return null!==n&&n.apply(this,arguments)||this}return Qp(r,n),r.prototype.defaults=function(){return Jp(Jp({},Gp.getDefaults()),{layers:[],layerSeparator:", ",layerJoin:"",prepend:0,preview:!1,layerLabel:null,selectedLayer:null})},r.prototype.initialize=function(t,e){void 0===t&&(t={}),void 0===e&&(e={}),Gp.callParentInit(Gp,this,t,e);var n=this.get("layers"),r=new Zp(n,{prop:this});r.property=this,r.properties=this.get("properties"),this.set("layers",r,{silent:!0}),this.on("change:selectedLayer",this.__upSelected),this.listenTo(r,"add remove",this.__upLayers),Gp.callInit(this,t,e)},r.prototype.getLayers=function(){return this.__getLayers().models},r.prototype.__getLayers=function(){return this.get("layers")},r.prototype.getLayer=function(t){return void 0===t&&(t=0),this.__getLayers().at(t)||void 0},r.prototype.getSelectedLayer=function(){var t=this.get("selectedLayer");return t&&t.getIndex()>=0?t:void 0},r.prototype.selectLayer=function(t){return this.set("selectedLayer",t,{__select:!0})},r.prototype.selectLayerAt=function(t){void 0===t&&(t=0);var e=this.getLayer(t);return e&&this.selectLayer(e)},r.prototype.moveLayer=function(e,n){void 0===n&&(n=0);var r=e?e.getIndex():-1;r>=0&&(0,t.isNumber)(n)&&n>=0&&n<this.getLayers().length&&r!==n&&(this.removeLayer(e),this.__getLayers().add(e,{at:n}))},r.prototype.addLayer=function(e,n){void 0===e&&(e={}),void 0===n&&(n={});var r={};return this.getProperties().forEach(function(n){var o=n.getId(),i=e[o];r[o]=(0,t.isUndefined)(i)?n.getDefaultValue():i}),this.__getLayers().push({values:r},n)},r.prototype.removeLayer=function(t){return this.__getLayers().remove(t)},r.prototype.removeLayerAt=function(t){void 0===t&&(t=0);var e=this.getLayer(t);return e?this.removeLayer(e):null},r.prototype.getLayerLabel=function(t){var e="";if(t){var n=this.get("layerLabel"),r=t.getValues(),o=t.getIndex();if(n)e=n(t,{index:o,values:r,property:this});else{var i=[];this.getProperties().map(function(t){i.push(r[t.getId()])}),e=i.filter(Boolean).join(" ")}}return e},r.prototype.getStyleFromLayer=function(n,r){var o;void 0===r&&(r={});var i,a=this.__getJoin(),s=this.__getJoinLayers(),l=this.get("toStyle"),c=this.getName(),u=n.getValues();if(l)i=l(u,{join:a,joinLayers:s,name:c,layer:n,property:this});else{var p=this.getProperties().map(function(e){var n=e.getName(),o=u[e.getId()],i=(0,t.isUndefined)(o)?e.getDefaultValue():o;if(r.number&&Up(e.getType())){var a=e.parseValue(o,r.number);i="".concat(a.value).concat(a.unit)}return{name:n,value:i}});i=this.isDetached()?p.reduce(function(t,e){return t[e.name]=e.value,t},{}):((o={})[this.getName()]=p.map(function(t){return t.value}).join(a),o)}return r.camelCase?Object.keys(i).reduce(function(t,n){return t[(0,e.camelCase)(n)]=i[n],t},{}):i},r.prototype.getStylePreview=function(t,e){void 0===e&&(e={});var n={};return this.get("preview")&&(n=this.getStyleFromLayer(t,e)),n},r.prototype.getLayerSeparator=function(){var e=this.get("layerSeparator");return(0,t.isString)(e)?new RegExp("".concat(e,"(?![^\\(]*\\))")):e},r.prototype.__upProperties=function(t,e){var n;void 0===e&&(e={});var r=this.getSelectedLayer();r&&(r.upValues(((n={})[t.getId()]=t.__getFullValue(),n)),e.__up||this.__upTargetsStyleProps(e))},r.prototype.__upLayers=function(t,e,n){this.__upTargetsStyleProps(n||e)},r.prototype.__upTargets=function(t,e){if(void 0===e&&(e={}),!e.__select)return Hp.prototype.__upTargets.call(this,t,e)},r.prototype.__upTargetsStyleProps=function(t){void 0===t&&(t={}),this.__upTargetsStyle(this.getStyleFromLayers(),t)},r.prototype.__upTargetsStyle=function(t,e){return Hp.prototype.__upTargetsStyle.call(this,t,e)},r.prototype.__upSelected=function(t,e){var n=(void 0===t?{}:t).noEvent;void 0===e&&(e={});var r=this.em.Styles,o=this.getSelectedLayer(),i=null==o?void 0:o.getValues();i&&this.getProperties().forEach(function(t){var n,r=null!==(n=i[t.getId()])&&void 0!==n?n:"";t.__getFullValue()!==r&&t.upValue(r,Jp(Jp({},e),{__up:!0}))}),!n&&r.__trgEv(r.events.layerSelect,{property:this})},r.prototype._up=function(t,e){void 0===e&&(e={});var n=t.__layers,r=void 0===n?[]:n,o=td(t,["__layers"]);return!this.isDetached()&&this.__setLayers(r),this.__upSelected({noEvent:!0},e),Hp.prototype._up.call(this,o,e),this},r.prototype.__setLayers=function(t){void 0===t&&(t=[]);var e=this.__getLayers(),n=t.map(function(t){return{values:t}});e.length===n.length?n.map(function(t,n){var r;return null===(r=e.at(n))||void 0===r?void 0:r.upValues(t.values)}):this.__getLayers().reset(n),this.__upSelected({noEvent:!0})},r.prototype.__parseValue=function(t){var e=this,n=this.parseValue(t);return n.__layers=t.split(ed).map(function(t){return t.trim()}).map(function(t){return e.__parseLayer(t)}
1).filter(Boolean),n},r.prototype.__parseLayer=function(e){var n=this.get("parseLayer"),r=e.split(nd),o=this.getProperties();return n?n({value:e,values:r}):o.reduce(function(e,n,o){var i=r[o];return e[n.getId()]=(0,t.isUndefined)(i)?n.getDefaultValue():i,e},{})},r.prototype.__getLayersFromStyle=function(e){var n=this;if(void 0===e&&(e={}),!this.__styleHasProps(e))return null;var r=this.getName(),o=this.getProperties(),i=this.getLayerSeparator(),a=this.get("fromStyle"),s=a?a(e,{property:this,name:r,separatorLayers:i}):[];if(!a){var l=this.__splitStyleName(e,r,i).map(function(t){return t.split(n.getSplitSeparator())}).map(function(e){var n={};return o.forEach(function(r,o){var i=e[o];n[r.getId()]=(0,t.isUndefined)(i)?r.getDefaultValue():i}),n});o.forEach(function(t){var r=t.getId();n.__splitStyleName(e,t.getName(),i).map(function(e){var n;return(n={})[r]=e||t.getDefaultValue(),n}).forEach(function(t,e){l[e]=l[e]?Jp(Jp({},l[e]),t):t})}),s=l}return(0,t.isArray)(s)?s:[s]},r.prototype.getStyle=function(t){return void 0===t&&(t={}
1),this.getStyleFromLayers(t)},r.prototype.getStyleFromLayers=function(e){var n=this;void 0===e&&(e={});var r={},o=this.getName(),i=this.getLayers(),a=this.getProperties();if(i.map(function(t){return n.getStyleFromLayer(t,e)}).forEach(function(e){(0,t.keys)(e).map(function(t){r[t]||(r[t]=[]),r[t].push(e[t])})}),(0,t.keys)(r).map(function(t){r[t]=r[t].join(n.__getJoinLayers())}),this.isDetached())r[o]="",!i.length&&a.map(function(t){r[t.getName()]=""});else{var s=a.reduce(function(t,e){return t[e.getName()]="",t},{});r[o]=r[o]||"",r=Jp(Jp({},r),s)}return r},r.prototype.__getJoinLayers=function(){var e=this.get("layerJoin"),n=this.get("layerSeparator");return e||((0,t.isString)(n)?n:e)},r.prototype.__getFullValue=function(){return this.get("detached")?"":this.getStyleFromLayers()[this.getName()]},r.prototype.hasValue=function(t){void 0===t&&(t={});var e=t.noParent&&this.getParentTarget();return this.getLayers().length>0&&!e},r.prototype.clear=function(t){return void 0===t&&(t={}),this.__getLayers().reset(),this.__upTargetsStyleProps(t),Hp.prototype.clear.call(this),this},r.prototype.__canClearProp=function(){return!1},r}(Gp);const od=rd;var id=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ad=function(){return ad=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},ad.apply(this,arguments)},sd=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n},ld=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},cd="data-clear-style",ud=function(n){function r(e){void 0===e&&(e={});var r=n.call(this,e)||this;(0,t.bindAll)(r,"__change","__updateStyle");var o=e.config||{},i=o.em;r.config=o,r.em=i,r.pfx=o.stylePrefix||"",r.ppfx=o.pStylePrefix||"",r.__destroyFn=r.destroy?r.destroy.bind(r):function(){};var a=r.model;a.view=r,r.onValueChange=(0,t.debounce)(r.onValueChange.bind(r),10),r.updateStatus=(0,t.debounce)(r.updateStatus.bind(r),0),r.listenTo(a,"destroy remove",r.remove),r.listenTo(a,"change:visible",r.updateVisibility),r.listenTo(a,"change:name change:className change:full",r.render),r.listenTo(a,"change:value",r.onValueChange),r.listenTo(a,"change:parentTarget",r.updateStatus),r.listenTo(i,"change:device",r.onValueChange);var s=r.init&&r.init.bind(r);return s&&s(),r}return id(r,n),r.prototype.events=function(){var t;return(t={change:"inputValueChanged"})["click [".concat(cd,"]")]="clear",t},r.prototype.template=function(t){var e=this.pfx,n=this.ppfx;return'\n <div class="'.concat(e,'label" data-sm-label></div>\n <div class="').concat(n,'fields" data-sm-fields></div>\n ')},r.prototype.templateLabel=function(t){var e=this.pfx,n=this.em,r=t.parent,o=t.attributes,i=o.icon,a=void 0===i?"":i,s=o.info,l=void 0===s?"":s,c=null==n?void 0:n.getConfig().icons,u=(null==c?void 0:c.close)||"";return'\n <span class="'.concat(e,"icon ").concat(a,'" title="').concat(l,'">\n ').concat(t.getLabel(),"\n </span>\n ").concat(r?"":'<div class="'.concat(e,'clear" style="display: none" ').concat(cd,">").concat(u,"</div>"),"\n ")},r.prototype.templateInput=function(t){return'\n <div class="'.concat(this.ppfx,'field">\n <input placeholder="').concat(t.getDefaultValue(),'"/>\n </div>\n ')},r.prototype.remove=function(){var t=this;return u.G7.prototype.remove.apply(this,arguments),["em","input","$input","view"].forEach(function(e){return t[e]=null}),this.__destroyFn(this._getClbOpts()),this},r.prototype.updateStatus=function(){var t,e=this,n=e.model,r=e.pfx,o=e.ppfx,i=e.config,a="".concat(o,"four-color"),s="".concat(o,"color-warn"),l=this.$el.children(".".concat(r,"label")),c=this.getClearEl(),u=c?c.style:{};l.removeClass("".concat(a," ").concat(s)),u.display="none",n.hasValue({noParent:!0})&&i.highlightChanged?(l.addClass(a),i.clearProperties&&(u.display="")):n.hasValue()&&i.highlightComputed&&l.addClass(s),null===(t=this.parent)||void 0===t||t.updateStatus()},r.prototype.clear=function(t){t&&t.stopPropagation(),this.model.clear()},r.prototype.getClearEl=function(){return this.clearEl||(this.clearEl=this.el.querySelector("[".concat(cd,"]"))),this.clearEl},r.prototype.inputValueChanged=function(t){t&&t.stopPropagation(),this.emit||this.model.upValue(t.target.value)},r.prototype.onValueChange=function(t,e,n){void 0===n&&(n={}),this.setValue(this.model.getFullValue(void 0,{skipImportant:!0})),this.updateStatus()},r.prototype.setValue=function(e){var n=this.model,r=(0,t.isUndefined)(e)||""===e?n.getDefaultValue():e;if(this.update)return this.__update(r);this.__setValueInput(r)},r.prototype.__setValueInput=function(t){var e=this.getInputEl();e&&(e.value=t)},r.prototype.getInputEl=function(){return this.input||(this.input=this.el.querySelector("input")),this.input},r.prototype.updateVisibility=function(){this.el.style.display=this.model.isVisible()?"":"none"},r.prototype.clearCached=function(){delete this.clearEl,delete this.input,delete this.$input},r.prototype.__unset=function(){var t=this.unset&&this.unset.bind(this);t&&t(this._getClbOpts())},r.prototype.__update=function(t){var e=this.update&&this.update.bind(this);e&&e(ad(ad({},this._getClbOpts()),{value:t}))},r.prototype.__change=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this.emit&&this.emit.bind(this);n&&n.apply(void 0,ld([this._getClbOpts()],t,!1))},r.prototype.__updateStyle=function(t,n){void 0===n&&(n={});var r=n.complete,o=n.partial,i=(sd(n,["complete","partial"]),this.model),a=!1!==r&&!0!==o;(0,e.isObject)(t)?i.__upTargetsStyle(t,{avoidStore:!a}):i.upValue(t,{partial:!a})},r.prototype._getClbOpts=function(){var t=this,e=t.model;return{el:t.el,createdEl:t.createdEl,property:e,props:e.attributes,change:this.__change,updateStyle:this.__updateStyle}},r.prototype.render=function(){this.clearCached();var t=this,e=t.pfx,n=t.model,r=t.el,o=t.$el,i=n.getName(),a=n.getType(),s=n.get("className")||"",l="".concat(e,"property"),c="number"===a?"".concat(e).concat(a," ").concat(e,"integer"):"".concat(e).concat(a);this.createdEl&&this.__destroyFn(this._getClbOpts()),o.empty().append(this.template(n)),o.find("[data-sm-label]").append(this.templateLabel(n));var u=this.create&&this.create.bind(this);this.createdEl=u&&u(this._getClbOpts()),o.find("[data-sm-fields]").append(this.createdEl||this.templateInput(n)),r.className="".concat(l," ").concat(c," ").concat(l,"__").concat(i," ").concat(s).trim(),r.className+=n.isFull()?" ".concat(l,"--full"):"";var p=this.onRender&&this.onRender.bind(this);return p&&p(),this.setValue(n.getValue()),this},r.prototype.onRender=function(){},r}(u.G7);const pd=ud;var dd=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),fd=function(t){function e(e){var n=t.call(this,e)||this;n.config=e.config||{},n.pfx=n.config.stylePrefix||"",n.properties=[],n.parent=e.parent;var r=n.collection;return n.listenTo(r,"add",n.addTo),n.listenTo(r,"reset",n.render),n}return dd(e,t),e.prototype.addTo=function(t,e,n){this.add(t,null,n)},e.prototype.add=function(t,e,n){void 0===n&&(n={});var r=this.parent,o=this.config,i=e||this.el,a=new t.typeView({model:t,config:o});r&&(a.parent=r),a.render();var s=a.el;this.properties.push(a),(0,At.$Q)(i,s,n.at)},e.prototype.remove=function(){return u.G7.prototype.remove.apply(this,arguments),this.clearItems(),this}
1,e.prototype.clearItems=function(){this.properties.forEach(function(t){return t.remove()}),this.properties=[]},e.prototype.render=function(){var t=this,e=this.$el,n=this.pfx;this.clearItems();var r=document.createDocumentFragment();return this.collection.forEach(function(e){return t.add(e,r)}),e.empty(),e.append(r),e.attr("class","".concat(n,"properties")),this},e}(u.G7);const hd=fd;var gd=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),md=function(){return md=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},md.apply(this,arguments)};const vd=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return gd(e,t),e.prototype.templateInput=function(){var t=this.pfx;return'\n <div class="'.concat(t,"field ").concat(t,'composite">\n <span id="').concat(t,'input-holder"></span>\n </div>\n ')},e.prototype.remove=function(){var t;return null===(t=this.props)||void 0===t||t.remove(),pd.prototype.remove.apply(this,arguments),this},e.prototype.onValueChange=function(){},e.prototype.onRender=function(){var t=this.pfx,e=this.model,n=e.get("properties");if(n.length&&!this.props){var r=e.isDetached(),o=new hd({config:md(md({},this.config),{highlightComputed:r,highlightChanged:r}),collection:n,parent:this});o.render(),this.$el.find("#".concat(t,"input-holder")).append(o.el),this.props=o}},e.prototype.clearCached=function(){pd.prototype.clearCached.apply(this,arguments),delete this.props},e}(pd);var yd=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),bd=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return yd(n,e),n.prototype.events=function(){return{click:"select","click [data-close-layer]":"removeItem","mousedown [data-move-layer]":"initSorter","touchstart [data-move-layer]":"initSorter"}},n.prototype.template=function(){var t=this,e=t.pfx,n=t.ppfx,r=t.em,o=null==r?void 0:r.getConfig().icons,i=(null==o?void 0:o.close)||"",a=(null==o?void 0:o.move)||"";return'\n <div class="'.concat(e,'label-wrp">\n <div id="').concat(e,'move" class="').concat(n,'no-touch-actions" data-move-layer>\n ').concat(a,'\n </div>\n <div id="').concat(e,'label" data-label></div>\n <div id="').concat(e,'preview-box" class="').concat(e,'layer-preview" style="display: none" data-preview-box>\n <div id="').concat(e,'preview" class="').concat(e,'layer-preview-cnt" data-preview></div>\n </div>\n <div id="').concat(e,'close-layer" class="').concat(e,'btn-close" data-close-layer>\n ').concat(i,'\n </div>\n </div>\n <div id="').concat(e,'inputs" data-properties></div>\n ')},n.prototype.initialize=function(t){void 0===t&&(t={});var e=this.model,n=t.config||{};this.em=n.em,this.config=n,this.sorter=t.sorter,this.pfx=n.stylePrefix||"",this.ppfx=n.pStylePrefix||"",this.propertyView=t.propertyView;var r=this.propertyView.model;this.listenTo(e,"destroy remove",this.remove),this.listenTo(e,"change:values",this.updateLabel),this.listenTo(r,"change:selectedLayer",this.updateVisibility),e.view=this,e.set({droppable:0,draggable:1}),this.$el.data("model",e)},n.prototype.initSorter=function(){var t;null===(t=this.sorter)||void 0===t||t.startSort(this.el)},n.prototype.removeItem=function(t){t&&t.stopPropagation(),this.model.remove()},n.prototype.select=function(){this.model.select()},n.prototype.getPropertiesWrapper=function(){return this.propsWrapEl||(this.propsWrapEl=this.el.querySelector("[data-properties]")),this.propsWrapEl},n.prototype.getPreviewEl=function(){return this.previewEl||(this.previewEl=this.el.querySelector("[data-preview]")),this.previewEl},n.prototype.getLabelEl=function(){return this.labelEl||(this.labelEl=this.el.querySelector("[data-label]")),this.labelEl},n.prototype.updateLabel=function(){var e=this.model,n=e.getLabel();if(this.getLabelEl().innerHTML=n,e.hasPreview()){var r=this.getPreviewEl(),o=e.getStylePreview({number:{min:-3,max:3}}),i=(0,t.keys)(o).map(function(t){return"".concat(t,":").concat(o[t])}).join(";");r.setAttribute("style",i)}},n.prototype.updateVisibility=function(){var t,e=this,n=e.pfx,r=e.model,o=e.propertyView,i=this.getPropertiesWrapper(),a=r.isSelected();i.style.display=a?"":"none",this.$el[a?"addClass":"removeClass"]("".concat(n,"active")),a&&i.appendChild(null===(t=o.props)||void 0===t?void 0:t.el)},n.prototype.render=function(){var t=this,e=t.el,n=t.pfx,r=t.model;return e.innerHTML=this.template(),e.className="".concat(n,"layer"),r.hasPreview()&&(e.querySelector("[data-preview-box]").style.display=""),this.updateLabel(),this.updateVisibility(),this},n}(u.G7);const _d=bd;var Td=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Cd=function(t){function e(e){var n=t.call(this,e)||this,r=n.collection,o=e.config||{},i=o.em,a=o.stylePrefix||"",s=o.pStylePrefix||"";n.config=o,n.pfx=a,n.ppfx=s,n.propertyView=e.propertyView,n.className="".concat(a,"layers ").concat(s,"field"),n.listenTo(r,"add",n.addTo),n.listenTo(r,"reset",n.reset),n.items=[];var l=null==i?void 0:i.Utils;return n.sorter=l?new l.Sorter({container:n.el,ignoreViewChildren:1,containerSel:".".concat(a,"layers"),itemSel:".".concat(a,"layer"),pfx:o.pStylePrefix}):"",r.view=n,n.$el.data("model",r),n.$el.data("collection",r),n}return Td(e,t),e.prototype.addTo=function(t){var e=this.collection.indexOf(t);this.addToCollection(t,null,e)},e.prototype.addToCollection=function(t,e,n){var r=e||null,o=this,i=o.propertyView,a=o.config,s=o.sorter,l=o.$el,c=new _d({model:t,config:a,sorter:s,propertyView:i}),u=c.render().el;if(this.items.push(c),r)r.appendChild(u);else if(void 0!==n){var p="before";l.children().length===n&&(n--,p="after"),n<0?l.append(u):l.children().eq(n)[p](u)}else l.append(u);return u},e.prototype.reset=function(t,e){this.clearItems(),this.render()},e.prototype.remove=function(){return this.clearItems(),u.G7.prototype.remove.apply(this,arguments),this}
1,e.prototype.clearItems=function(){this.items.forEach(function(t){return t.remove()}),this.items=[]},e.prototype.render=function(){var t=this,e=this.$el,n=this.sorter,r=document.createDocumentFragment();return e.empty(),this.collection.forEach(function(e){return t.addToCollection(e,r)}),e.append(r),e.attr("class",this.className),n&&(n.plh=null),this},e}(u.G7);const wd=Cd;var Ed=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Sd=function(){return Sd=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Sd.apply(this,arguments)},xd=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ed(e,t),e.prototype.events=function(){return Sd(Sd({},vd.prototype.events()),{"click [data-add-layer]":"addLayer",change:""})},e.prototype.templateInput=function(){var t=this.pfx,e=this.em,n=null==e?void 0:e.getConfig().icons,r=(null==n?void 0:n.plus)||"+";return'\n <div class="'.concat(t,"field ").concat(t,'stack">\n <button type="button" id="').concat(t,'add" data-add-layer>\n ').concat(r,"\n </button>\n <div data-layers-wrapper></div>\n </div>\n ")},e.prototype.init=function(){var t=this.model;this.listenTo(t.__getLayers(),"change reset",this.updateStatus)},e.prototype.addLayer=function(){this.model.addLayer({},{at:0})},e.prototype.setValue=function(){},e.prototype.remove=function(){var t;return null===(t=this.layersView)||void 0===t||t.remove(),vd.prototype.remove.apply(this,arguments),this},e.prototype.clearCached=function(){vd.prototype.clearCached.apply(this,arguments),delete this.layersView},e.prototype.onRender=function(){var t=this,e=t.model,n=t.el,r=t.config,o=e.get("properties");if(o.length&&!this.props){var i=new hd({config:Sd(Sd({},r),{highlightComputed:!1,highlightChanged:!1}),collection:o,parent:this});i.render();var a=new wd({collection:e.__getLayers(),config:r,propertyView:this});a.render(),n.querySelector("[data-layers-wrapper]").appendChild(a.el),this.props=i,this.layersView=a}},e}(vd);const Od=xd;var Ad=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),kd=function(){return kd=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},kd.apply(this,arguments)};const Pd=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return Ad(n,e),n.prototype.events=function(){return kd(kd({},pd.prototype.events()),{"click [data-clear-asset]":"clear","click [data-open-assets]":"openAssetManager"})},n.prototype.templateInput=function(){var t,e=this.pfx,n=this.em,r=null===(t=this.em)||void 0===t?void 0:t.getConfig().icons,o=null==r?void 0:r.close;return'\n <div class="'.concat(e,"field ").concat(e,"file\">\n <div id='").concat(e,"input-holder'>\n <div class=\"").concat(e,'btn-c">\n <button class="').concat(e,'btn" id="').concat(e,'images" type="button" data-open-assets>\n ').concat(n.t("styleManager.fileButton"),'\n </button>\n </div>\n <div style="clear:both;"></div>\n </div>\n <div id="').concat(e,'preview-box" class="').concat(e,'preview-file" data-preview-box>\n <div id="').concat(e,'preview-file" class="').concat(e,'preview-file-cnt" data-preview></div>\n <div id="').concat(e,'close" class="').concat(e,'preview-file-close" data-clear-asset>').concat(o,"</div>\n </div>\n </div>\n ")},n.prototype.__setValueInput=function(t){var e=this.model,n=this.el,r=e.getDefaultValue(),o=n.querySelector("[data-preview-box]"),i=n.querySelector("[data-preview]");o.style.display=t&&t!==r?"":"none",i.style.backgroundImage=t||e.getDefaultValue()},n.prototype.openAssetManager=function(){var e,n=this,r=null===(e=this.em)||void 0===e?void 0:e.Assets;null==r||r.open({select:function(e,o){var i=(0,t.isString)(e)?e:e.get("src");n.model.upValue(i,{partial:!o}),o&&r.close()},types:["image"],accept:"image/*"})},n}(pd);var Nd=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const Md=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Nd(e,t),e.prototype.templateInput=function(t){return""},e.prototype.init=function(){var t=this.model;this.listenTo(t,"change:unit",this.onValueChange),this.listenTo(t,"change:units",this.render)},e.prototype.setValue=function(t){},e.prototype.onRender=function(){var t=this,e=t.ppfx,n=t.model,r=t.el;if(!this.inputInst){var o=n.input;o.ppfx=e,o.render(),r.querySelector(".".concat(e,"fields")).appendChild(o.el),this.input=o.inputEl.get(0),this.inputInst=o}},e.prototype.clearCached=function(){pd.prototype.clearCached.apply(this,arguments),this.inputInst=null},e}(pd);var Ld=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const Id=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ld(e,t),e.prototype.setValue=function(t){var e;null===(e=this.inputInst)||void 0===e||e.setValue(t,{fromTarget:1,def:this.model.getDefaultValue()})},e.prototype.remove=function(){var t=this;Md.prototype.remove.apply(this,arguments);var e=this.inputInst;return e&&e.remove&&e.remove(),["inputInst","$color"].forEach(function(e){return t[e]=null}),this},e.prototype.__handleChange=function(t,e){this.model.upValue(t,{partial:e})},e.prototype.onRender=function(){var t;if(!this.inputInst){this.__handleChange=this.__handleChange.bind(this);var e=this,n=e.ppfx,r=e.model,o=e.em,i=e.el,a=new Es({target:o,model:r,ppfx:n,onChange:this.__handleChange}).render();i.querySelector(".".concat(n,"fields")).appendChild(a.el),this.input=null===(t=a.inputEl)||void 0===t?void 0:t.get(0),this.inputInst=a}},e}(Md);var Dd=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Rd=function(){return Rd=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Rd.apply(this,arguments)},jd=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))};const Hd=function(n){function r(){return null!==n&&n.apply(this,arguments)||this}return Dd(r,n),r.prototype.defaults=function(){return Rd(Rd({},Hp.getDefaults()),{options:[],full:0})},r.prototype.getOptions=function(){var t=this.attributes,e=t.options,n=t.list;return(e&&e.length?e:n)||[]},r.prototype.getOption=function(t){var n=this,r=(0,e.isDef)(t)?t:this.getValue();return this.getOptions().filter(function(t){return n.getOptionId(t)===r})[0]||null},r.prototype.setOptions=function(t){return void 0===t&&(t=[]),this.set("options",t),this},r.prototype.addOption=function(t){if(t){var e=this.getOptions();this.setOptions(jd(jd([],e,!0),[t],!1))}return this},r.prototype.getOptionId=function(t){return(0,e.isDef)(t.id)?t.id:t.value},r.prototype.getOptionLabel=function(e,n){var r;void 0===n&&(n={});var o=n.locale,i=void 0===o||o,a=((0,t.isString)(e)?this.getOption(e):e)||{},s=this.getOptionId(a),l=a.label||a.name||s,c=n.property||this.getId();return i&&(null===(r=this.em)||void 0===r?void 0:r.t("styleManager.options.".concat(c,".").concat(s)))||l},r.prototype.initialize=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];Hp.prototype.initialize.apply(this,t),this.listenTo(this,"change:options",this.__onOptionChange)},r.prototype.__onOptionChange=function(){this.set("list",this.get("options"))},r}(Hp);var Fd=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const Bd=function(t){function e(e){var n=t.call(this,e)||this;return n.listenTo(n.model,"change:options",n.updateOptions),n}return Fd(e,t),e.prototype.templateInput=function(){var t=this.pfx,e=this.ppfx;return'\n <div class="'.concat(e,"field ").concat(e,'select">
1\n <span id="').concat(t,'input-holder"></span>\n <div class="').concat(e,'sel-arrow">\n <div class="').concat(e,'d-s-arrow"></div>\n </div>\n </div>\n ')},e.prototype.updateOptions=function(){delete this.input,this.onRender()},e.prototype.onRender=function(){var t=this.pfx,e=this.model,n=e.getOptions();if(!this.input){var r=[];n.forEach(function(t){var n=e.getOptionId(t),o=e.getOptionLabel(n),i=t.style?t.style.replace(/"/g,"""):"",a=i?'style="'.concat(i,'"'):"",s=n.replace(/"/g,""");r.push('<option value="'.concat(s,'" ').concat(a,">").concat(o,"</option>"))});var o=this.el.querySelector("#".concat(t,"input-holder"));o.innerHTML="<select>".concat(r.join(""),"</select>"),this.input=o.firstChild}},e.prototype.__setValueInput=function(t){var e=this.model,n=this.getInputEl(),r=e.getOptions()[0],o=r?e.getOptionId(r):"";n&&(n.value=t||o)},e}(pd);var Vd=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ud=function(){return Ud=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Ud.apply(this,arguments)};const zd=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Vd(e,t),e.prototype.defaults=function(){return Ud(Ud({},Hd.getDefaults()),{full:1})},e}(Hd);var Gd=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const $d=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Gd(e,t),e.prototype.templateInput=function(){var t=this.ppfx;return'<div class="'.concat(t,"field ").concat(t,'field-radio"></div>')},e.prototype.onRender=function(){var t=this.pfx,e=this.ppfx,n=this.model,r="".concat(e,"radio-item-label"),o=n.getName(),i=n.getOptions(),a="".concat(t,"radio ").concat(t,"radio-").concat(o),s=n.cid;if(!this.input){var l=[];i.forEach(function(i){var c=i.className?"".concat(i.className," ").concat(t,"icon ").concat(r):"",u=n.getOptionId(i),p="".concat(o,"-").concat(u,"-").concat(s),d=c?"":n.getOptionLabel(u),f=i.title?'title="'.concat(i.title,'"'):"",h=n.getValue()===u?"checked":"";l.push('\n <div class="'.concat(e,'radio-item">\n <input type="radio" class="').concat(a,'" id="').concat(p,'" name="').concat(o,"-").concat(s,'" value="').concat(u,'" ').concat(h,'/>\n <label class="').concat(c||r,'" ').concat(f,' for="').concat(p,'">').concat(d,"</label>\n </div>\n "))});var c=this.el.querySelector(".".concat(e,"field"));c.innerHTML='<div class="'.concat(e,'radio-items">').concat(l.join(""),"</div>"),this.input=c.firstChild}},e.prototype.__setValueInput=function(t){var e,n=this.model,r=t||n.getDefaultValue(),o=null===(e=this.getInputEl())||void 0===e?void 0:e.querySelector('[value="'.concat(r,'"]'));o&&(o.checked=!0)},e}(Bd);var qd=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Wd=function(){return Wd=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Wd.apply(this,arguments)};const Kd=function(n){function r(){return null!==n&&n.apply(this,arguments)||this}return qd(r,n),r.prototype.defaults=function(){return Wd(Wd({},Hp.getDefaults()),{units:[],unit:"",min:"",max:"",step:1})},r.prototype.getUnits=function(){return this.get("units")||[]},r.prototype.getUnit=function(){return this.get("unit")},r.prototype.getMin=function(){return this.get("min")},r.prototype.getMax=function(){return this.get("max")}
1,r.prototype.getStep=function(){return this.get("step")},r.prototype.upUnit=function(t,e){return void 0===e&&(e={}),this._up({unit:t},e)},r.prototype.initialize=function(t,n){void 0===t&&(t={}),void 0===n&&(n={}),Hp.callParentInit(Hp,this,t,n);var r=this.get("unit"),o=this.getUnits();this.input=(0,e.hasWin)()?new ys({model:this}):void 0,o.length&&!r&&this.set("unit",o[0],{silent:!0}),Hp.callInit(this,t,n)},r.prototype.__getClearProps=function(){return Wd(Wd({},Hp.prototype.__getClearProps()),{unit:""})},r.prototype.parseValue=function(t,e){void 0===e&&(e={});var n=Hp.prototype.parseValue.apply(this,arguments),r=this.input.validateInputValue(n.value,Wd({deepCheck:1},e)),o=r.value,i=r.unit;return n.value=o,n.unit=i,n},r.prototype.getFullValue=function(){var e=this.get("value"),n=this.get("unit"),r=(0,t.isUndefined)(e)?"":"".concat(e),o=!(0,t.isUndefined)(n)&&r?n:"",i="".concat(r).concat(o);return Hp.prototype.getFullValue.apply(this,[i])},r}(Hp);var Yd=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xd=function(){return Xd=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Xd.apply(this,arguments)};const Zd=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Yd(e,t),e.prototype.defaults=function(){return Xd(Xd({},Kd.getDefaults()),{showInput:1})},e}(Kd);var Qd=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Jd=function(){return Jd=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Jd.apply(this,arguments)};const tf=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Qd(e,t),e.prototype.events=function(){return Jd(Jd({},Md.prototype.events()),{"change [type=range]":"inputValueChanged","input [type=range]":"inputValueChangedSoft",change:""})},e.prototype.templateInput=function(t){var e=this.ppfx;return'\n <div class="'.concat(e,"field ").concat(e,'field-range">\n <input type="range" min="').concat(t.get("min"),'" max="').concat(t.get("max"),'" step="').concat(t.get("step"),'"/>\n </div>\n ')},e.prototype.getSliderEl=function(){return this.slider||(this.slider=this.el.querySelector("input[type=range]")),this.slider},e.prototype.inputValueChanged=function(t){t.stopPropagation(),this.model.upValue(this.getSliderEl().value)},e.prototype.inputValueChangedSoft=function(t){t.stopPropagation(),this.model.upValue(this.getSliderEl().value,{partial:!0})},e.prototype.setValue=function(t){var e=this.model,n=e.parseValue(t);this.getSliderEl().value=""===t?e.getDefaultValue():parseFloat(n.value),Md.prototype.setValue.apply(this,arguments)},e.prototype.onRender=function(){Md.prototype.onRender.apply(this,arguments),this.model.get("showInput")||(this.inputInst.el.style.display="none")},e.prototype.clearCached=function(){Md.prototype.clearCached.apply(this,arguments),delete this.slider},e}(Md),ef=u.FE.extend(Tl).extend({extendViewApi:1,init:function(){var t=this.opts,e=this.em,n=t.module||(null==e?void 0:e.get("StyleManager"));n&&(n.__listenAdd(this,n.events.propertyAdd),n.__listenRemove(this,n.events.propertyRemove))},types:[{id:"stack",model:od,view:Od,isType:function(t){if(t&&"stack"==t.type)return t}},{id:"composite",model:Gp,view:vd,isType:function(t){if(t&&"composite"==t.type)return t}},{id:"file",model:Hp,view:Pd,isType:function(t){if(t&&"file"==t.type)return t}},{id:"color",model:Hp,view:Id,isType:function(t){if(t&&"color"==t.type)return t}},{id:"select",model:Hd,view:Bd,isType:function(t){if(t&&"select"==t.type)return t}},{id:"radio",model:zd,view:$d,isType:function(t){if(t&&"radio"==t.type)return t}},{id:"slider",model:Zd,view:tf,isType:function(t){if(t&&"slider"==t.type)return t}},{id:"integer",model:Kd,view:Md,isType:function(t){if(t&&"integer"==t.type)return t}},{id:"number",model:Kd,view:Md,isType:function(t){if(t&&"number"==t.type)return t}},{id:"base",model:Hp,view:pd,isType:function(t){return t.type="base",t}}]});var nf=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),rf=function(){return rf=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},rf.apply(this,arguments)},of=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n},af=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))};const sf=function(e){function n(n,r){void 0===r&&(r={});var o=e.call(this,n)||this,i=r.em;o.em=i;var a=n||{},s=o.buildProperties(a.buildProps),l=o.get("name")||"",c=[];!o.get("id")&&o.set("id",l.replace(/ /g,"_").toLowerCase()),c=(c=s?o.extendProperties(s):o.get("properties").map(function(e){return(0,t.isString)(e)?o.buildProperties(e)[0]:e}
1).filter(Boolean)).map(function(t){return o.checkExtend(t)});var u=new ef(c,{em:i});return u.sector=o,o.set("properties",u),o}return nf(n,e),n.prototype.defaults=function(){return{id:"",name:"",open:!0,visible:!0,extendBuilded:!0,properties:[]}},Object.defineProperty(n.prototype,"properties",{get:function(){return this.get("properties")},enumerable:!1,configurable:!0}),n.prototype.getId=function(){return this.get("id")},n.prototype.getName=function(){var t,e=this.getId();return(null===(t=this.em)||void 0===t?void 0:t.t("styleManager.sectors.".concat(e)))||this.get("name")},n.prototype.setName=function(t){return this.set("name",t)},n.prototype.isOpen=function(){return!!this.get("open")},n.prototype.setOpen=function(t){return this.set("open",t)},n.prototype.isVisible=function(){return!!this.get("visible")},n.prototype.getProperties=function(t){void 0===t&&(t={});var e=this.get("properties");return(e.models?af([],e.models,!0):e).filter(function(e){var n=!0;return t.withValue&&(n=e.hasValue({noParent:!0})),t.withParentValue&&(n=!e.hasValue({noParent:!0})&&e.hasValue()),n})},n.prototype.getProperty=function(t){return this.getProperties().filter(function(e){return e.get("id")===t})[0]||void 0},n.prototype.addProperty=function(t,e){return this.get("properties").add(this.checkExtend(t),e)},n.prototype.extendProperties=function(e,n,r){void 0===r&&(r=!1);for(var o=e.length,i=n||this.get("properties"),a=this.get("extendBuilded"),s=[],l=0,c=i.length;l<c;l++){for(var u=i[l],p=0,d=0;d<o;d++){var f=e[d];if(u.property!=f.property&&u.id!=f.property);else{var h=u.properties;h&&h.length&&(u.properties=this.extendProperties(f.properties||[],h,1)),e[d]=a?(0,t.extend)(f,u):u,s[d]=e[d],p=1}}p||(e.push(u),s.push(u))}return r?s.filter(function(t){return t}):e},n.prototype.checkExtend=function(e){var n=((0,t.isString)(e)?{extend:e}:e)||{},r=n.extend,o=of(n,["extend"]);return r?rf(rf({},this.buildProperties([r])[0]||{}),o):e},n.prototype.buildProperties=function(t){var e,n=t||[];if(!n.length)return[];var r=null===(e=this.em)||void 0===e?void 0:e.get("StyleManager").builtIn;return null==r?void 0:r.build(n)},n}(u.Hn);var lf=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),cf=function(){return cf=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},cf.apply(this,arguments)};const uf=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return lf(e,t),e.prototype.initialize=function(t,e){void 0===e&&(e={});var n=e.module,r=e.em;this.em=r,this.module=n,this.listenTo(this,"reset",this.onReset)},e.prototype.model=function(t,e){void 0===e&&(e={});var n=e.collection.em;return new sf(t,cf(cf({},e),{em:n}))},e.prototype.onReset=function(t,e){void 0===e&&(e={}),(e.previousModels||[]).forEach(function(t){return t.get("properties").reset()})},e}(u.FE);var pf=function(){return pf=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},pf.apply(this,arguments)},df=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n},ff=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},hf=function(t){return t.map(function(t){return{id:t}})},gf=function(){function e(){this.props={},this.typeNumber="number",this.typeColor="color",this.typeRadio="radio",this.typeSelect="select",this.typeFile="file",this.typeSlider="slider",this.typeComposite="composite",this.typeStack="stack",this.unitsSize=["px","%","em","rem","vh","vw"],this.unitsSizeNoPerc=["px","em","rem","vh","vw"],this.unitsTime=["s","ms"],this.unitsAngle=["deg","rad","grad"],this.fixedValues=["initial","inherit","auto"];var t=", sans-serif",e=["flex-start","flex-end","center"],n=ff(ff([],e,!0),["baseline","stretch"],!1);this.optsBgSize=hf(["auto","cover","contain"]),this.optsBgAttach=hf(["scroll","fixed","local"]),this.optsBgRepeat=hf(["repeat","repeat-x","repeat-y","no-repeat"]),this.optsWrap=hf(["nowrap","wrap","wrap-reverse"]),this.optsOverflow=hf(["visible","hidden","scroll","auto"]),this.optsDir=hf(["row","row-reverse","column","column-reverse"]),this.opstDisplay=hf(["block","inline","inline-block","flex","none"]),this.optsTransitFn=hf(["linear","ease","ease-in","ease-out","ease-in-out"]),this.optsCursor=hf(["auto","pointer","copy","crosshair","grab","grabbing","help","move","text"]),this.optsFloat=hf(["none","left","right"]),this.optsPos=hf(["static","relative","absolute","fixed"]),this.optsTextAlign=hf(["left","center","right","justify"]),this.optsFlexAlign=hf(n),this.optsJustCont=hf(ff(ff([],e,!0),["space-between","space-around","space-evenly"],!1)),this.optsAlignCont=hf(ff(ff([],e,!0),["space-between","space-around","stretch"],!1)),this.optsAlignSelf=hf(ff(["auto"],n,!0)),this.optsTransitProp=hf(["all","width","height","background-color","transform","box-shadow","opacity"]),this.optsBorderStyle=hf(["none","solid","dotted","dashed","double","groove","ridge","inset","outset"]),this.optsBgPos=hf(["left top","left center","left bottom","right top","right center","right bottom","center top","center center","center bottom"]),this.optsWeight=[{id:"100",label:"Thin"},{id:"200",label:"Extra-Light"},{id:"300",label:"Light"},{id:"400",label:"Normal"},{id:"500",label:"Medium"},{id:"600",label:"Semi-Bold"},{id:"700",label:"Bold"},{id:"800",label:"Extra-Bold"},{id:"900",label:"Ultra-Bold"}],this.optsShadowType=[{id:"",label:"Outside"},{id:"inset",label:"Inside"}],this.optsFonts=["Arial, Helvetica"+t,"Arial Black, Gadget"+t,"Brush Script MT"+t,"Comic Sans MS, cursive"+t,"Courier New, Courier, monospace","Georgia, serif","Helvetica"+t,"Impact, Charcoal"+t,"Lucida Sans Unicode, Lucida Grande"+t,"Tahoma, Geneva"+t,"Times New Roman, Times, serif","Trebuchet MS, Helvetica"+t,"Verdana, Geneva"+t].map(function(t){return{id:t,label:t.split(",")[0]}}),this.fixedFontSizes=["medium","xx-small","x-small","small","large","x-large","xx-large","smaller","larger","length","initial","inherit"],this.fixedLetSpace=["normal","initial","inherit"],this.requireFlex={display:["flex"]},this.init()}return e.prototype.__sub=function(e){var n=this;return function(){return e.map(function(e){if((0,t.isString)(e))return n.get(e);var r=e.extend,o=df(e,["extend"]);return pf(pf({},n.get(r)),o)})}},e.prototype.init=function(){var t=this,e=this,n=e.fixedValues,r=e.requireFlex,o=e.typeNumber;this.props={};var i=[["text-shadow-h",{type:o,default:"0",units:this.unitsSizeNoPerc}],["top",{default:"auto",units:this.unitsSize,fixedValues:n},"text-shadow-h"],["right",{},"top"],["bottom",{},"top"],["left",{},"top"],["margin-top",{default:"0"},"top"],["margin-right",{},"margin-top"],["margin-bottom",{},"margin-top"],["margin-left",{},"margin-top"],["padding-top",{min:0},"margin-top"],["padding-right",{},"padding-top"],["padding-bottom",{},"padding-top"],["padding-left",{},"padding-top"],["width",{min:0},"top"],["min-width",{},"width"],["max-width",{},"width"],["height",{},"width"],["min-height",{},"width"],["max-height",{},"width"],["flex-basis",{requiresParent:r},"width"],["font-size",{default:"medium",fixedValues:this.fixedFontSizes},"width"],["letter-spacing",{default:"normal",fixedValues:this.fixedLetSpace},"top"],["line-height",{},"letter-spacing"],["text-shadow-v",{},"text-shadow-h"],["text-shadow-blur",{min:0},"text-shadow-h"],["border-radius-c",{property:"border-radius",fixedValues:void 0},"padding-top"],["border-top-left-radius",{},"border-radius-c"],["border-top-right-radius",{},"border-radius-c"],["border-bottom-left-radius",{},"border-radius-c"],["border-bottom-right-radius",{},"border-radius-c"],["border-width",{units:this.unitsSizeNoPerc},"border-radius-c"],["box-shadow-h",{},"text-shadow-h"],["box-shadow-v",{},"text-shadow-h"],["box-shadow-blur",{default:"5px"},"text-shadow-blur"],["box-shadow-spread",{},"text-shadow-h"],["transition-duration",{default:"2s",units:this.unitsTime},"border-radius-c"],["perspective",{},"border-radius-c"],["order",{type:o,default:"0",requiresParent:r}],["flex-grow",{},"order"],["flex-shrink",{default:"1"}
1,"order"],["float",{type:this.typeRadio,default:"none",options:this.optsFloat}],["position",{default:"static",options:this.optsPos},"float"],["text-align",{default:"left",options:this.optsTextAlign},"float"],["color",{type:this.typeColor,default:"black",full:!0}],["text-shadow-color",{},"color"],["border-color",{},"color"],["box-shadow-color",{},"color"],["background-color",{default:"none"},"color"],["background-image",{type:this.typeFile,functionName:"url",default:"none",full:!0}],["opacity",{type:this.typeSlider,default:"1",min:0,max:1,step:.01,full:!0}],["display",{type:this.typeSelect,default:"block",options:this.opstDisplay}],["flex-direction",{default:"row",options:this.optsDir,requires:r},"display"],["flex-wrap",{default:"nowrap",options:this.optsWrap},"flex-direction"],["justify-content",{default:"flex-start",options:this.optsJustCont},"flex-wrap"],["align-items",{default:"stretch",options:this.optsFlexAlign},"flex-wrap"],["align-content",{options:this.optsAlignCont},"align-items"],["align-self",{default:"auto",options:this.optsAlignSelf,requiresParent:r},"display"],["font-family",{default:"Arial, Helvetica, sans-serif",options:this.optsFonts},"display"],["font-weight",{default:"400",options:this.optsWeight},"display"],["border-style",{default:"solid",options:this.optsBorderStyle},"display"],["box-shadow-type",{default:"",options:this.optsShadowType},"display"],["background-repeat",{default:"repeat",options:this.optsBgRepeat}
1,"display"],["background-position",{default:"left top",options:this.optsBgPos},"display"],["background-attachment",{default:"scroll",options:this.optsBgAttach},"display"],["background-size",{default:"auto",options:this.optsBgSize},"display"],["transition-property",{default:"width",options:this.optsTransitProp},"display"],["transition-timing-function",{default:"ease",options:this.optsTransitFn},"display"],["cursor",{default:"auto",options:this.optsCursor},"display"],["overflow",{default:"visible",options:this.optsOverflow},"display"],["overflow-x",{},"overflow"],["overflow-y",{},"overflow"],["margin",{type:this.typeComposite,properties:this.__sub([{extend:"margin-top",id:"margin-top-sub"},{extend:"margin-right",id:"margin-right-sub"},{extend:"margin-bottom",id:"margin-bottom-sub"},{extend:"margin-left",id:"margin-left-sub"}])}],["padding",{properties:this.__sub([{extend:"padding-top",id:"padding-top-sub"},{extend:"padding-right",id:"padding-right-sub"},{extend:"padding-bottom",id:"padding-bottom-sub"},{extend:"padding-left",id:"padding-left-sub"}])},"margin"],["border",{properties:this.__sub([{extend:"border-width",id:"border-width-sub"},{extend:"border-style",id:"border-style-sub"},{extend:"border-color",id:"border-color-sub"}])},"margin"],["border-radius",{properties:this.__sub([{extend:"border-top-left-radius",id:"border-top-left-radius-sub"},{extend:"border-top-right-radius",id:"border-top-right-radius-sub"},{extend:"border-bottom-right-radius",id:"border-bottom-right-radius-sub"},{extend:"border-bottom-left-radius",id:"border-bottom-left-radius-sub"}])}
1,"margin"],["transition",{type:this.typeStack,properties:this.__sub([{extend:"transition-property",id:"transition-property-sub"},{extend:"transition-duration",id:"transition-duration-sub"},{extend:"transition-timing-function",id:"transition-timing-function-sub"}])}],["box-shadow",{preview:!0,layerLabel:function(t,e){var n=e.values,r=n["box-shadow-h"],o=n["box-shadow-v"],i=n["box-shadow-blur"],a=n["box-shadow-spread"];return"".concat(r," ").concat(o," ").concat(i," ").concat(a)},properties:this.__sub(["box-shadow-h","box-shadow-v","box-shadow-blur","box-shadow-spread","box-shadow-color","box-shadow-type"])},"transition"],["text-shadow",{default:"none",layerLabel:function(t,e){var n=e.values,r=n["text-shadow-h"],o=n["text-shadow-v"],i=n["text-shadow-blur"];return"".concat(r," ").concat(o," ").concat(i)},properties:this.__sub(["text-shadow-h","text-shadow-v","text-shadow-blur","text-shadow-color"])},"box-shadow"],["background",{detached:!0,layerLabel:function(t,e){var n=e.values;return[n["background-repeat-sub"]||"",n["background-position-sub"]||"",n["background-attachment-sub"]||"",n["background-size-sub"]||""].join(" ")},properties:this.__sub([{extend:"background-image",id:"background-image-sub"},{extend:"background-repeat",id:"background-repeat-sub"},{extend:"background-position",id:"background-position-sub"},{extend:"background-attachment",id:"background-attachment-sub"},{extend:"background-size",id:"background-size-sub"}])},"box-shadow"],["transform",{type:"stack",layerSeparator:" ",fromStyle:function(t,e){var n=e.property,r=t[e.name]||"",o=n.getLayerSeparator();return r?r.split(o).map(function(t){var e=n.__parseFn(t);return{"transform-type":e.name,"transform-value":e.value}}):[]},toStyle:function(t,e){var n;return(n={})[e.name]="".concat(t["transform-type"],"(").concat(t["transform-value"],")"),n},properties:[{property:"transform-type",name:"Type",type:this.typeSelect,default:"rotateZ",full:!0,options:[{id:"scaleX",propValue:{units:[""],step:.01}},{id:"scaleY",propValue:{units:[""],step:.01}},{id:"scaleZ",propValue:{units:[""],step:.01}},{id:"rotateX",propValue:{units:this.unitsAngle,step:1}},{id:"rotateY",propValue:{units:this.unitsAngle,step:1}},{id:"rotateZ",propValue:{units:this.unitsAngle,step:1}},{id:"translateX",propValue:{units:this.unitsSize,step:1}},{id:"translateY",propValue:{units:this.unitsSize,step:1}}],onChange:function(t){var e=t.property;if(t.to.value){var n=e.getOption(),r=pf({},n.propValue||{}),o=e.getParent().getProperty("transform-value"),i=o.getUnit();(!i||(null==r?void 0:r.units.indexOf(i))<0)&&(r.unit=(null==r?void 0:r.units[0])||""),o.up(r)}}},{property:"transform-value",type:this.typeNumber,default:"0",full:!0}]}]];return i.forEach(function(e){var n=e[0],r=e[1],o=e[2];t.add(n,r||{},{from:o})}),this},e.prototype.add=function(e,n,r){void 0===n&&(n={}),void 0===r&&(r={});var o=r.from||"",i=this.props[o||e]||{},a=pf(pf(pf({},i),{property:e}),n);return a.properties&&(0,t.isFunction)(a.properties)&&(a.properties=a.properties()),this.props[e]=a,a},e.prototype.get=function(t){return this.props[t]},e.prototype.build=function(e){var n=this,r=[];return((0,t.isString)(e)?[e]:e).forEach(function(t){r.push(n.get(t)||{property:t})}),r},e}();const mf=gf;var vf=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),yf=function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t},bf=function(t){function e(e){var n=t.call(this,e)||this,r=e.config||{},o=n.model,i=r.em;return n.config=r,n.em=i,n.pfx=r.stylePrefix||"",n.listenTo(o,"destroy remove",n.remove),n.listenTo(o,"change:open",n.updateOpen),n.listenTo(o,"change:visible",n.updateVisibility),n}return vf(e,t),e.prototype.template=function(t){var e,r=t.pfx,o=t.label,i=null===(e=this.em)||void 0===e?void 0:e.getConfig().icons,a=(null==i?void 0:i.caret)||"",s="".concat(r,"sector-");return n(Tf||(Tf=yf(['\n <div class="','title" data-sector-title>\n <div class="','caret">$','</div>\n <div class="','label">',"</div>\n </div>\n "],['\n <div class="','title" data-sector-title>\n <div class="','caret">$','</div>\n <div class="','label">',"</div>\n </div>\n "])),s,s,a,s,o)},e.prototype.events=function(){return{"click [data-sector-title]":"toggle"}},e.prototype.updateOpen=function(){var t=this,e=t.$el,n=t.model,r=t.pfx,o=n.isOpen();e[o?"addClass":"removeClass"]("".concat(r,"open")),this.getPropertiesEl().style.display=o?"":"none"},e.prototype.updateVisibility=function(){this.el.style.display=this.model.isVisible()?"":"none"},e.prototype.getPropertiesEl=function(){var t=this.$el,e=this.pfx;return t.find(".".concat(e,"properties")).get(0)},e.prototype.toggle=function(){var t=this.model;t.setOpen(!t.get("open"))},e.prototype.renderProperties=function(){var t=this.model,e=this.config,n=t.get("properties");if(n){var r=new hd({collection:n,config:e});this.$el.append(r.render().el)}},e.prototype.render=function(){var t=this,e=t.pfx,n=t.model,r=t.$el,o=n.getId(),i=n.getName();return r.html(this.template({pfx:e,label:i})),this.renderProperties(),r.attr("class","".concat(e,"sector ").concat(e,"sector__").concat(o," no-select")),this.updateOpen(),this},e}(u.G7);const _f=bf;var Tf,Cf=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),wf=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,e)||this,r=e.module,o=e.config,i=n.collection;return n.pfx=(null==o?void 0:o.stylePrefix)||"",n.ppfx=(null==o?void 0:o.pStylePrefix)||"",n.config=o,n.module=r,n.listenTo(i,"add",n.addTo),n.listenTo(i,"reset",n.render),n}return Cf(e,t),e.prototype.remove=function(){var t=this;return u.G7.prototype.remove.apply(this,arguments),["config","module","em"].forEach(function(e){return t[e]={}}),this},e.prototype.addTo=function(t,e,n){void 0===n&&(n={}),this.addToCollection(t,null,n)},e.prototype.addToCollection=function(t,e,n){void 0===n&&(n={});var r=this.config,o=this.el,i=e||o,a=new _f({model:t,config:r}).render().el;return(0,At.$Q)(i,a,n.at),a},e.prototype.render=function(){var t=this,e=this,n=e.$el,r=e.pfx,o=e.ppfx;n.empty();var i=document.createDocumentFragment();return this.collection.each(function(e){return t.addToCollection(e,i)}),n.append(i),n.addClass("".concat(r,"sectors ").concat(o,"one-bg ").concat(o,"two-color")),this},e}(u.G7);const Ef=wf;var Sf=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),xf=function(){return xf=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},xf.apply(this,arguments)},Of=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},Af="style",kf="".concat(Af,":"),Pf="".concat(kf,"sector"),Nf="".concat(Pf,":add"),Mf="".concat(Pf,":remove"),Lf="".concat(Pf,":update"),If="".concat(kf,"property"),Df="".concat(If,":add"),Rf="".concat(If,":remove"),jf="".concat(If,":update"),Hf="".concat(kf,"layer:select"),Ff="".concat(kf,"target"),Bf="".concat(kf,"custom"),Vf=function(t){return t||0===t},Uf={all:Af,sectorAdd:Nf,sectorRemove:Mf,sectorUpdate:Lf,propertyAdd:Df,propertyRemove:Rf,propertyUpdate:jf,layerSelect:Hf,target:Ff,custom:Bf},zf=function(n){function r(e){var r=n.call(this,e,"StyleManager",new uf([],{em:e}),Uf,Mp)||this;r.Sector=sf,r.storageKey="",(0,t.bindAll)(r,"__clearStateTarget");var o=r.config,i=o.pStylePrefix;i&&(o.stylePrefix=i+o.stylePrefix),r.builtIn=new mf,r.properties=new ef([],{em:e,module:r}),r.sectors=r.all;var a=new u.Hn({targets:[]});r.model=a,r.upAll=(0,t.debounce)(function(){return r.__upSel()},0),a.listenTo(e,"component:toggled component:update:classes change:state change:device frame:resized selector:type",r.upAll),a.listenTo(e,"component:toggled",r.__clearStateTarget);var s=(0,t.debounce)(function(){r.__upProps(),r.__trgCustom()},0);a.listenTo(e,"styleable:change undo redo",s);var l=(0,t.debounce)(function(){return r.__trgCustom()},0);return a.listenTo(e,"".concat(Hf," ").concat(Ff),l),a.on("change:lastTarget",function(){return e.trigger(Ff,r.getSelected())}),r}
1return Sf(r,n),r.prototype.__upSel=function(){this.select(this.em.getSelectedAll())},r.prototype.__trgCustom=function(t){void 0===t&&(t={}),this.__ctn=this.__ctn||t.container,this.em.trigger(this.events.custom,{container:this.__ctn})},r.prototype.__trgEv=function(t){for(var e,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];(e=this.em).trigger.apply(e,Of([t],n,!1))},r.prototype.__clearStateTarget=function(){var t=this,e=this.em,n=this.__getStateTarget();n&&(null==e||e.skip(function(){e.Css.remove(n),t.model.set({stateTarget:null})}))},r.prototype.onLoad=function(){this.sectors.add(this.config.sectors,{silent:!0})},r.prototype.postRender=function(){this.__appendTo()},r.prototype.addSector=function(t,e,n){void 0===n&&(n={});var r=this.getSector(t);return r||(e.id=t,r=this.sectors.add(e,n)),r},r.prototype.getSector=function(t,e){void 0===e&&(e={});var n=this.sectors.where({id:t})[0];return!n&&e.warn&&this._logNoSector(t),n||null},r.prototype.getSectors=function(t){void 0===t&&(t={});var e=this.sectors,n=e&&e.models?t.array?Of([],e.models,!0):e:[];return t.visible?n.filter(function(t){return t.isVisible()}):n},r.prototype.removeSector=function(t){return this.getSectors().remove(this.getSector(t,{warn:!0}))},r.prototype.addProperty=function(t,e,n){void 0===n&&(n={});var r=this.getSector(t,{warn:!0}),o=null;return r&&(o=r.addProperty(e,n)),o},r.prototype.getProperty=function(t,e){var n,r=this.getSector(t,{warn:!0});return r&&(n=r.properties.filter(function(t){return t.get("property")===e||t.get("id")===e})[0]),n},r.prototype.getProperties=function(t){var e,n=this.getSector(t,{warn:!0});return n&&(e=n.properties),e},r.prototype.removeProperty=function(t,e){var n=this.getProperties(t);return n?n.remove(this.getProperty(t,e)):null},r.prototype.select=function(n,r){var o=this;void 0===r&&(r={});var i=this.em,a=(0,t.isArray)(n)?n:[n],s=r.stylable,l=i.Css,c=[];a.filter(Boolean).forEach(function(e){var n=e;if((0,t.isString)(e)){var r=l.getRule(e)||l.setRule(e);!(0,t.isUndefined)(s)&&r.set({stylable:s}),n=r}c.push(n)});var u=r.component||c.filter(function(t){return(0,e.isComponent)(t)}).reverse()[0];c=c.map(function(t){return o.getModelToStyle(t)});var p=i.getState(),d=c.slice().reverse()[0],f=this.getParentRules(d,{state:p,component:u}),h=this.__getStateTarget();return i.skip(function(){var t;if(p&&(null===(t=null==d?void 0:d.getState)||void 0===t?void 0:t.call(d))){var e=d.getStyle();h?h.setStyle(e):h=l.getAll().add({selectors:"gjs-selected",style:e,shallow:!0,important:!0})}else h&&(l.remove(h),h=void 0)}),this.model.set({targets:c,lastTarget:d,lastTargetParents:f,stateTarget:h,component:u}),this.__upProps(r),c},r.prototype.getSelected=function(){return this.model.get("lastTarget")},r.prototype.getSelectedAll=function(){return this.model.get("targets")},r.prototype.getSelectedParents=function(){return this.model.get("lastTargetParents")||[]},r.prototype.__getStateTarget=function(){return this.model.get("stateTarget")},r.prototype.addStyleTargets=function(t,e){this.getSelectedAll().map(function(n){return n.addStyle(t,e)});var n=this.getSelected();n&&this.__emitCmpStyleUpdate(t);var r=this.__getStateTarget();n&&(null==r||r.setStyle(n.getStyle(),e))},r.prototype.getBuiltIn=function(t){return this.builtIn.get(t)},r.prototype.getBuiltInAll=function(){return this.builtIn.props},r.prototype.addBuiltIn=function(t,e){return this.builtIn.add(t,e)},r.prototype.getModelToStyle=function(t,e){void 0===e&&(e={});var n=this.em,r=e.skipAdd;if(n&&(null==t?void 0:t.toHTML)){var o=n.getConfig(),i=n.UndoManager,a=n.Css,s=n.Selectors,l=s?s.getConfig():{},c=o.devicePreviewMode?"":n.get("state"),u=t.get("classes").getStyleable(),p=u.length,d=!l.componentFirst||e.useClasses,f={noCount:1},h={state:c,addOpts:f},g=void 0;if(i.stop(),p&&d){var m=n.getCurrentMedia();(g=a.get(u,c,m))||r||(g=a.add(u,c,m,{},f))}else if(o.avoidInlineStyle){var v=t.getId();!(g=a.getIdRule(v,h))&&!r&&(g=a.setIdRule(v,{},h)),t.is("wrapper")&&g.set("wrapper",1,f)}g&&(t=g),i.start()}return t},r.prototype.getParentRules=function(e,n){var r=void 0===n?{}:n,o=r.state,i=r.component,a=this.em,s=[];if(a&&e){var l=i,c=a.Css,u=a.CodeManager.getGenerator("css"),p=e.toHTML?e:e.getComponent(),d={comb
1ination:!0,array:!0},f=[],h=[],g=[];p?(f=c.getRules("#".concat(p.getId())),g=(h=l?c.getRules(l.getSelectors().getFullName(d)):[]).concat(f)):(f=l?c.getRules("#".concat(l.getId())):[],h=c.getRules(e.getSelectors().getFullName(d)),g=f.concat(h));var m=g.filter(function(e){return(0,t.isUndefined)(o)?1:e.get("state")===o}).sort(u.sortRules).reverse();s=m.slice(m.indexOf(e)+1)}return s},r.prototype.addType=function(t,e){this.properties.addType(t,e)},r.prototype.getType=function(t){return this.properties.getType(t)},r.prototype.getTypes=function(){return this.properties.getTypes()},r.prototype.createType=function(t,e){var n=void 0===e?{}:e,r=n.model,o=void 0===r?{}:r,i=n.view,a=void 0===i?{}:i,s=this.config,l=this.getType(t);if(l)return new l.view(xf({model:new l.model(o),config:s},a))},r.prototype.render=function(){var t=this,e=t.config,n=t.em,r=t.SectView,o=r&&r.el;return this.SectView=new Ef({el:o,em:n,config:e,module:this,collection:this.sectors}),this.SectView.render().el},r.prototype._logNoSector=function(t){var e=this.em;e&&e.logWarning("'".concat(t,"' sector not found"))},r.prototype.__emitCmpStyleUpdate=function(t,e){void 0===e&&(e={});var n=this.em,r="component:styleUpdate";if(!t.__p){var o=e.components||n.getSelectedAll(),i=Array.isArray(o)?o:[o],a=xf({},t);delete a.__p;var s=Object.keys(a),l={style:a};i.forEach(function(t){n.trigger(r,t,l),s.forEach(function(e){return n.trigger("".concat(r,":").concat(e),t,l)})})}},r.prototype.__upProps=function(t){var e=this;void 0===t&&(t={});var n=this.getSelected();if(n){var r=this.sectors,o=this.model.get("component"),i=this.getSelectedParents(),a=n.getStyle(),s=i.map(function(t){return{target:t,style:t.getStyle()}});r.map(function(n){n.getProperties().map(function(n){e.__upProp(n,a,s,t)})}),r.forEach(function(t){var e=t.getProperties();e.forEach(function(t){var e=t.__checkVisibility({target:n,component:o,sectors:r});t.set("visible",e)});var i=e.some(function(t){return t.isVisible()});t.set("visible",i)})}},r.prototype.__upProp=function(t,e,n,r){var o=this,i=t.getName(),a=e[i],s=Vf(a),l="stack"===t.getType(),c="composite"===t.getType(),u=xf(xf({},r),{__up:!0}),p=!c&&!l,d=l?t.__getLayersFromStyle(e):[],f=c?t.__getPropsFromStyle(e):{},h=s?a:null,g=null;if(l&&null===d||c&&null===f){var m=l?"__getLayersFromStyle":"__getPropsFromStyle";if(y=n.filter(function(e){return null!==t[m](e.style)})[0]){h=y.style[i],g=y.target;var v=t[m](y.style);l?d=v:f=v}}else if(!s){var y;h=null,(y=n.filter(function(t){return Vf(t.style[i])})[0])&&(h=y.style[i],g=y.target)}if(t.__setParentTarget(g),p&&t.__getFullValue()!==h&&t.upValue(h,u),l&&t.__setLayers(d||[]),c){var b=t.getProperties();if(t.isDetached()){var _=t.__getPropsFromStyle(e,{byName:!0})||{},T=n.map(function(e){return xf(xf({},e),{style:t.__getPropsFromStyle(e.style,{byName:!0})||{}})});b.map(function(t){return o.__upProp(t,_,T,r)})}else t.__setProperties(f||{},u),t.getProperties().map(function(t){return t.__setParentTarget(g)})}},r.prototype.destroy=function(){var t;[this.properties,this.sectors].forEach(function(t){t.reset(),t.stopListening()}),null===(t=this.SectView)||void 0===t||t.remove(),this.model.stopListening(),this.upAll.cancel()},r}(b);const Gf=zf;var $f=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),qf=function(){return qf=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},qf.apply(this,arguments)},Wf=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,s)}l((r=r.apply(t,e||[])).next())})},Kf=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}},Yf=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n},Xf=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))};l().$=c.default;var Zf=[mc,ic,Bc,ap,Ja,Ct,ba,Gf,ia,Kc,Xu,Ou,wp,Rs,nl,le,Np,Ei],Qf=[tc,zo,tt,Eo];!function(e){var n=e.$;if(n&&n.prototype&&"jQuery"!==n.prototype.constructor.name){var r=n.fn;r.hide=function(){return this.css("display","none")},r.show=function(){return this.css("display","block")},r.focus=function(){var t=this.get(0);return t&&t.focus(),this},r.bind=function(t,e){return this.on(t,e)},r.unbind=function(e,n){if((0,t.isObject)(e)){for(var r in e)e.hasOwnProperty(r)&&this.off(r,e[r]);return this}return this.off(e,n)},r.click=function(t){return t?this.on("click",t):this.trigger("click")},r.change=function(t){return t?this.on("change",t):this.trigger("change")}
1,r.keydown=function(t){return t?this.on("keydown",t):this.trigger("keydown")},r.delegate=function(t,e,n,r){return r||(r=n),this.on(e,t,function(t){t.data=n,r(t)})},r.scrollLeft=function(){var t=this.get(0),e=(t=9==t.nodeType?t.defaultView:t)instanceof Window?t:null;return e?e.pageXOffset:t.scrollLeft||0},r.scrollTop=function(){var t=this.get(0),e=(t=9==t.nodeType?t.defaultView:t)instanceof Window?t:null;return e?e.pageYOffset:t.scrollTop||0};var o=n.prototype.offset;r.offset=function(t){var e,n;return t&&(e=t.top,n=t.left),void 0!==e&&this.css("top","".concat(e,"px")),void 0!==n&&this.css("left","".concat(n,"px")),o.call(this)},n.map=function(t,e){for(var n=[],r=0;r<t.length;r++)n.push(e(t[r],r));return n};var i=Array.prototype.indexOf;n.inArray=function(t,e,n){return null==e?-1:i.call(e,t,n)},n.Event=function(t,e){if(!(this instanceof n.Event))return new n.Event(t,e);this.type=t,this.isDefaultPrevented=function(){return!1}}}}({$:c.default});var Jf={debug:console.log,info:console.info,warning:console.warn,error:console.error},th=function(n){function r(e){void 0===e&&(e={});var r=n.call(this)||this;r.__skip=!1,r.defaultRunning=!1,r.destroyed=!1,r._config=e;var o=r.config;r.set("Config",e),r.set("modules",[]),r.set("toLoad",[]),r.set("storables",[]),r.set("selected",new f),r.set("dmode",o.dragMode);var i=o.el,a=o.log,s=!0===a?(0,t.keys)(Jf):(0,t.isArray)(a)?a:[];return(0,t.bindAll)(r,"initBaseColorPicker"),i&&o.fromElement&&(o.components=i.innerHTML),r.attrsOrig=i?(0,t.toArray)(i.attributes).reduce(function(t,e){return t[e.nodeName]=e.nodeValue,t},{}):"",o.components&&!o.pageManager&&(o.pageManager={pages:[{component:o.components}]}),Zf.forEach(function(t){return r.loadModule(t)}),Qf.forEach(function(t){return r.loadStorableModule(t)}),r.on("change:componentHovered",r.componentHovered,r),r.on("change:changesCount",r.updateChanges,r),r.on("change:readyLoad change:readyCanvas",r._checkReady,r),s.forEach(function(t){return r.listenLog(t)}),[{from:"change:selectedComponent",to:"component:toggled"}].forEach(function(t){var e=t.from,n=t.to;r.listenTo(r,e,function(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];r.trigger.apply(r,Xf([n],t,!1)),r.logWarning("The event '".concat(e,"' is deprecated, replace it with '").concat(n,"'"))})}),r}return $f(r,n),r.prototype.defaults=function(){return{editing:0,selected:0,clipboard:null,dmode:0,componentHovered:null,previousModel:null,changesCount:0,storables:[],modules:[],toLoad:[],opened:{},device:""}},Object.defineProperty(r.prototype,"storables",{get:function(){return this.get("storables")},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"modules",{get:function(){return this.get("modules")},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"toLoad",{get:function(){return this.get("toLoad")},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"selected",{get:function(){return this.get("selected")},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"shallow",{get:function(){return this.get("shallow")},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"I18n",{get:function(){return this.get("I18n")},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"Utils",{get:function(){return this.get("Utils")},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"Commands",{get:function(){return this.get("Commands")},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"Keymaps",{get:function(){return this.get("Keymaps")},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"Modal",{get:function(){return this.get("Modal")},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"Panels",{get:function(){return this.get("Panels")},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"CodeManager",{get:function(){return this.get("CodeManager")},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"UndoManager",{get:function(){return this.get("UndoManager")},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"RichTextEditor",{get:function(){return this.get("RichTextEditor")}
1,enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"Canvas",{get:function(){return this.get("Canvas")},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"Editor",{get:function(){return this.get("Editor")},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"Components",{get:function(){return this.get("DomComponents")},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"Css",{get:function(){return this.get("CssComposer")},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"Blocks",{get:function(){return this.get("BlockManager")},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"Selectors",{get:function(){return this.get("SelectorManager")},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"Storage",{get:function(){return this.get("StorageManager")},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"Traits",{get:function(){return this.get("TraitManager")},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"Parser",{get:function(){return this.get("Parser")},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"Layers",{get:function(){return this.get("LayerManager")},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"Assets",{get:function(){return this.get("AssetManager")},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"Devices",{get:function(){return this.get("DeviceManager")},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"Pages",{get:function(){return this.get("PageManager")},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"Styles",{get:function(){return this.get("StyleManager")},enumerable:!1,configurable:!0}),r.prototype._checkReady=function(){this.get("readyLoad")&&this.get("readyCanvas")&&!this.get("ready")&&this.set("ready",!0)},r.prototype.getContainer=function(){return this.config.el},r.prototype.listenLog=function(t){this.listenTo(this,"log:".concat(t),Jf[t])},Object.defineProperty(r.prototype,"config",{get:function(){return this._config},enumerable:!1,configurable:!0}),r.prototype.getConfig=function(e){var n=this.config;return(0,t.isUndefined)(e)?n:n[e]},r.prototype.loadOnStart=function(){var t=this,e=this.config,n=e.projectData,o=e.headless,i=this.get("StorageManager");this.toLoad.reverse().forEach(function(t){return t.onLoad()});var a=function(){t.modules.forEach(function(e){return e.postLoad&&e.postLoad(t)}),t.set("readyLoad",1)};o?(n&&this.loadData(n),a()):this._storageTimeout=setTimeout(function(){return Wf(t,void 0,void 0,function(){var t;return Kf(this,function(e){switch(e.label){case 0:return n?(this.loadData(n),[3,5]):[3,1];case 1:if(!(null==i?void 0:i.canAutoload()))return[3,5];e.label=2;case 2:return e.trys.push([2,4,,5]),[4,this.load()];case 3:return e.sent(),[3,5];case 4:return t=e.sent(),this.logError(t),[3,5];case 5:return a(),[2]}})})});var s=new r({noticeOnUnload:!1,storageManager:!1,undoManager:!1});["PageManager","Canvas"].forEach(function(t){return s.get(t).onLoad()}),this.set("shallow",s)},r.prototype.updateChanges=function(){var t=this,e=this.get("StorageManager"),n=this.getDirtyCount();this.updateItr&&clearTimeout(this.updateItr),this.updateItr=setTimeout(function(){return t.trigger("update")}),this.config.noticeOnUnload&&(window.onbeforeunload=n?function(){return!0}:null),e.isAutosave()&&n>=e.getStepsBeforeSave()&&this.store().catch(function(e){return t.logError(e)})},r.prototype.loadModule=function(t){var e=new t(this);return this.set(e.name,e),e.onLoad&&this.toLoad.push(e),this.modules.push(e),e},r.prototype.loadStorableModule=function(t){var e=this.loadModule(t);return this.storables.push(e),e},r.prototype.init=function(t,e){void 0===e&&(e={}),this.destroyed&&(this.initialize(e),this.destroyed=!1),this.set("Editor",t)},r.prototype.getEditor=function(){return this.get("Editor")},r.prototype.handleUpdates=function(t,e,n){var r=this;void 0===n&&(n={}),this.__skip||n.temporary||n.noCount||n.avoidStore||!this.get("ready")||(this.timedInterval&&clearTimeout(this.timedInterval),this.timedInterval=setTimeout(function(){var t=r.getDirtyCount()||0,e=(n.unset,Yf(n,["unset"]));r.set("changesCount",t+1,e)},0))},r.prototype.changesUp=function(t){this.handleUpdates(0,0,t)},r.prototype.componentHovered=function(t,e,n){var r=this.previous("componentHovered");r&&this.trigger("component:unhovered",r,n),e&&this.trigger("component:hovered",e,n)},r.prototype.getSelected=function(){return this.selected.lastComponent()},r.prototype.getSelectedAll=function(){return this.selected.allComponents()},r.prototype.setSelected=function(n,r){var o=this;void 0===r&&(r={});var i=r.event,a=i&&(i.ctrlKey||i.metaKey),s=(i||{}).shiftKey,l=((0,t.isArray)(n)?n:[n]).map(function(t){return(0,e.getModel)(t,c.default)}),u=this.getSelectedAll(),p=this.getConfig().multipleSelection,d=(0,t.isArray)(n);d&&this.removeSelected(u.filter(function(e){return!(0,t.contains)(l,e)})),l.forEach(function(n){var i=(0,e.getModel)(n,void 0);if(i&&(o.trigger("component:select:before",i,r),!i.get("selectable")||r.abort)){if(!r.useValid)return;for(var l=i.parent();l&&!l.get("selectable");)l=l.parent();i=l}if(a&&p)return o.toggleSelected(i);if(s&&p){o.clearSelection(o.get("Canvas").getWindow());var c,f,h=i.collection,g=i.index();
1if(o.getSelectedAll().forEach(function(e){var n=e.collection,r=e.index();n===h&&(r<g?c=(0,t.isUndefined)(c)?r:Math.max(c,r):r>g&&(f=(0,t.isUndefined)(f)?r:Math.min(f,r)))}),!(0,t.isUndefined)(c))for(;c!==g;)o.addSelected(h.at(c)),c++;if(!(0,t.isUndefined)(f))for(;f!==g;)o.addSelected(h.at(f)),f--;return o.addSelected(i)}!d&&o.removeSelected(u.filter(function(t){return t!==i})),o.addSelected(i,r)})},r.prototype.addSelected=function(n,r){var o=this;void 0===r&&(r={});var i=(0,e.getModel)(n,c.default);((0,t.isArray)(i)?i:[i]).forEach(function(e){var n=o.selected;e&&e.get("selectable")&&!e.parents().some(function(t){return n.hasComponent(t)})&&(r.forceChange&&o.removeSelected(e,r),n.allComponents().filter(function(n){return(0,t.contains)(n.parents(),e)}).forEach(function(t){return o.removeSelected(t,r)}),n.addComponent(e,r),e&&o.trigger("component:select",e,r))})},r.prototype.removeSelected=function(t,n){void 0===n&&(n={}),this.selected.removeComponent((0,e.getModel)(t,c.default),n)},r.prototype.toggleSelected=function(n,r){var o=this;void 0===r&&(r={});var i=(0,e.getModel)(n,c.default);((0,t.isArray)(i)?i:[i]).forEach(function(t){o.selected.hasComponent(t)?o.removeSelected(t,r):o.addSelected(t,r)})},r.prototype.setHovered=function(t,n){if(void 0===n&&(n={}),!t)return this.set("componentHovered","");var r="component:hover",o=(0,e.getModel)(t,void 0);if(o){if(n.forceChange&&this.set("componentHovered",""),this.trigger("".concat(r,":before"),o,n),!o.get("hoverable")){if(!n.useValid||n.abort)return;for(var i=o&&o.parent();i&&!i.get("hoverable");)i=i.parent();o=i}n.abort||(this.set("componentHovered",o,n),this.trigger(r,o,n))}},r.prototype.getHovered=function(){return this.get("componentHovered")},r.prototype.setComponents=function(t,e){return void 0===e&&(e={}),this.Components.setComponents(t,e)},r.prototype.getComponents=function(){var t=this.Components,e=this.CodeManager;if(t&&e){var n=t.getComponents();return e.getCode(n,"json")}},r.prototype.setStyle=function(t,e){void 0===e&&(e={});var n=this.Css;return n.clear(e),n.getAll().add(t,e),this},r.prototype.addStyle=function(e,n){void 0===n&&(n={});var r=this.getStyle().add(e,n);return(0,t.isArray)(r)?r:[r]},r.prototype.getStyle=function(){return this.Css.getAll()},r.prototype.setState=function(t){return this.set("state",t),this},r.prototype.getState=function(){return this.get("state")||""},r.prototype.getHtml=function(t){void 0===t&&(t={});var e=this.config,n=e.optsHtml,r=e.jsInHtml?this.getJs(t):"",o=t.component||this.Components.getComponent();return(o?this.CodeManager.getCode(o,"html",qf(qf({},n),t)):"")+(r?"<script>".concat(r,"<\/script>"):"")},r.prototype.getCss=function(e){void 0===e&&(e={});var n=this.config,r=n.optsCss,o=e.avoidProtected,i=(0,t.isUndefined)(e.keepUnusedStyles)?n.keepUnusedStyles:e.keepUnusedStyles,a=this.Css,s=e.component||this.Components.getComponent(),l=o?"":n.protectedCss,c=s&&this.CodeManager.getCode(s,"css",qf(qf({cssc:a,keepUnusedStyles:i},r),e));return s?e.json?c:l+c:""},r.prototype.getJs=function(t){void 0===t&&(t={});var e=t.component||this.Components.getWrapper();return e?this.CodeManager.getCode(e,"js").trim():""},r.prototype.store=function(t){return Wf(this,void 0,void 0,function(){var e;return Kf(this,function(n){switch(n.label){case 0:return e=this.storeData(),[4,this.Storage.store(e,t)];case 1:return n.sent(),this.clearDirtyCount(),[2,e]}})})},r.prototype.load=function(t){return Wf(this,void 0,void 0,function(){var e;return Kf(this,function(n){switch(n.label){case 0:return[4,this.Storage.load(t)];case 1:return e=n.sent(),this.loadData(e),[2,e]}})})},r.prototype.storeData=function(){var t={},e=this.getEditing();return e&&e.trigger("sync:content",{noCount:!0}),this.storables.forEach(function(e){t=qf(qf({},t),e.store(1))}),JSON.parse(JSON.stringify(t))},r.prototype.loadData=function(t){return void 0===t&&(t={}),(0,e.isEmptyObj)(t)||(this.storables.forEach(function(t){return t.clear()}),this.storables.forEach(function(e){return e.load(t)})),t},r.prototype.getDeviceModel=function(){var t=this.get("device");return this.Devices.get(t)},r.prototype.runDefault=function(t){void 0===t&&(t={});var e=this.get("Commands").get(this.config.defaultCommand);e&&!this.defaultRunning&&(e.stop(this,this,t),e.run(this,this,t),this.defaultRunning=!0)},r.prototype.stopDefault=function(t){void 0===t&&(t={});var e=this.get("Commands").get(this.config.defaultCommand);e&&this.defaultRunning&&(e.stop(this,this,t),this.defaultRunning=!1)},r.prototype.refreshCanvas=function(t){void 0===t&&(t={}),this.set("canvasOffset",null),this.set("canvasOffset",this.Canvas.getOffset()),t.tools&&this.trigger("canvas:updateTools")},r.prototype.clearSelection=function(t){var e;null===(e=(t||window).getSelection())||void 0===e||e.removeAllRanges()},r.prototype.getCurrentMedia=function(){var t=this.config,e=this.getDeviceModel(),n=t.mediaCondition,r=t.devicePreviewMode,o=e&&e.get("widthMedia");return e&&o&&!r?"(".concat(n,": ").concat(o,")"):""},r.prototype.getWrapper=function(){return this.Components.getWrapper()},r.prototype.setCurrentFrame=function(t){return this.set("currentFrame",t)},r.prototype.getCurrentFrame=function(){return this.get("currentFrame")},r.prototype.getCurrentFrameModel=function(){return(this.getCurrentFrame()||{}).model},r.prototype.getIcon=function(t){return(this.config.icons||{})[t]||""},r.prototype.getDirtyCount=function(){return this.get("changesCount")},r.prototype.clearDirtyCount=function(){return this.set("changesCount",0)},r.prototype.getZoomDecimal=function(){return this.Canvas.getZoomDecimal()},r.prototype.getZoomMultiplier=function(){return this.Canvas.getZoomMultiplier()},r.prototype.setDragMode=function(t){return this.set("dmode",t)},r.prototype.getDragMode=function(t){return(null==t?void 0:t.getDragMode())||this.get("dmode")||""},r.prototype.t=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this.get("I18n");return null==n?void 0:n.t.apply(n,t)},r.prototype.inAbsoluteMode=function(t){return"absolute"===this.getDragMode(t)},r.prototype.destroyAll=function(){var t=this,n=this.config,r=this.view,o=this.getEditor(),i=(n.grapesjs||{}).editors,a=void 0===i?[]:i,s=this.get("shallow");this._storageTimeout&&clearTimeout(this._storageTimeout),null==s||s.destroyAll(),this.stopListening(),this.stopDefault(),this.modules.slice().reverse().forEac
1h(function(t){return t.destroy()}),r&&r.remove(),this.clear({silent:!0}),this.destroyed=!0,["_config","view","_previousAttributes","_events","_listeners"].forEach(function(e){return t[e]={}}),a.splice(a.indexOf(o),1),(0,e.hasWin)()&&(0,c.default)(n.el).empty().attr(this.attrsOrig)},r.prototype.getEditing=function(){var t=this.get("editing");return t&&t.model||void 0},r.prototype.setEditing=function(t){return this.set("editing",t),this},r.prototype.isEditing=function(){return!!this.get("editing")},r.prototype.log=function(t,e){void 0===e&&(e={});var n=e.ns,r=e.level,o=void 0===r?"debug":r;if(this.trigger("log",t,e),o&&this.trigger("log:".concat(o),t,e),n){var i="log-".concat(n);this.trigger(i,t,e),o&&this.trigger("".concat(i,":").concat(o),t,e)}},r.prototype.logInfo=function(t,e){this.log(t,qf(qf({},e),{level:"info"}))},r.prototype.logWarning=function(t,e){this.log(t,qf(qf({},e),{level:"warning"}))},r.prototype.logError=function(t,e){this.log(t,qf(qf({},e),{level:"error"}))},r.prototype.initBaseColorPicker=function(t,e){void 0===e&&(e={});var n=this.config,r=n.colorPicker,o=void 0===r?{}:r,i=n.el,a=n.stylePrefix;return(0,c.default)(t).spectrum(qf(qf({containerClassName:"".concat(a,"one-bg ").concat(a,"two-color"),appendTo:i||"body",maxSelectionSize:8,showPalette:!0,palette:[],showAlpha:!0,chooseText:"Ok",cancelText:"\u2a2f"},e),o))},r.prototype.skip=function(t){this.__skip=!0;var e=this.UndoManager;e?e.skip(t):t(),this.__skip=!1},r.prototype.data=function(e,n,r){var o="_gjs-data";if(e[o]||(e[o]={}),(0,t.isUndefined)(r))return e[o][n];e[o][n]=r},r}(u.Hn);const eh=th;var nh=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),rh=function(t){function n(e){var n=t.call(this,{model:e})||this,r=e.attributes,o=r.Panels,i=r.UndoManager;return e.view=n,e.once("change:ready",function(){o.active(),o.disableButtons(),i.clear(),setTimeout(function(){e.trigger("load",e.get("Editor")),e.clearDirtyCount()})}),n}return nh(n,t),n.prototype.render=function(){var t=this,n=this.$el,r=this.model,o=r.attributes,i=o.Panels,a=o.Canvas,s=r.config,l=r.modules,u=s.stylePrefix,p=["".concat(u,"editor")];!s.customUI&&p.push("".concat(u,"one-bg ").concat(u,"two-color"));var d=(0,c.default)(s.el||"body ".concat(s.container));s.cssIcons&&(0,e.appendStyles)(s.cssIcons,{unique:!0,prepand:!0}),n.empty(),s.width&&d.css("width",s.width),s.height&&d.css("height",s.height),n.append(a.render()),n.append(i.render());var f=r.get("shallow").get("Canvas").render();return f.style.display="none",n.append(f),n.attr("class",p.join(" ")),d.addClass("".concat(u,"editor-cont")).empty().append(n),l.forEach(function(e){return e.postRender&&e.postRender(t)}),this},n}(u.G7);const oh=rh;var ih=function(){return ih=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},ih.apply(this,arguments)},ah=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,s)}l((r=r.apply(t,e||[])).next())})},sh=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}},lh=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},ch=function(){function t(t,e){var r;void 0===t&&(t={}),void 0===e&&(e={}),this.html=n,this.config=ih(ih(ih({},i),t),{pStylePrefix:null!==(r=t.stylePrefix)&&void 0!==r?r:i.stylePrefix}),this.em=new eh(this.config),this.$=e.$,this.em.init(this),this.editor=this.em}return Object.defineProperty(t.prototype,"Config",{get:function(){return this.em.config}
1,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"I18n",{get:function(){return this.em.I18n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Utils",{get:function(){return this.em.Utils},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Commands",{get:function(){return this.em.Commands},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Keymaps",{get:function(){return this.em.Keymaps},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Modal",{get:function(){return this.em.Modal},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Panels",{get:function(){return this.em.Panels},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Canvas",{get:function(){return this.em.Canvas},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Parser",{get:function(){return this.em.Parser},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"CodeManager",{get:function(){return this.em.CodeManager},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"UndoManager",{get:function(){return this.em.UndoManager},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"RichTextEditor",{get:function(){return this.em.RichTextEditor},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Pages",{get:function(){return this.em.Pages},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Components",{get:function(){return this.em.Components},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"DomComponents",{get:function(){return this.em.Components},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Layers",{get:function(){return this.em.Layers},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"LayerManager",{get:function(){return this.em.Layers},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Css",{get:function(){return this.em.Css},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"CssComposer",{get:function(){return this.em.Css},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Storage",{get:function(){return this.em.Storage},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"StorageManager",{get:function(){return this.em.Storage},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Assets",{get:function(){return this.em.Assets},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"AssetManager",{get:function(){return this.em.Assets},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Blocks",{get:function(){return this.em.Blocks},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"BlockManager",{get:function(){return this.em.Blocks},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Traits",{get:function(){return this.em.Traits},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"TraitManager",{get:function(){return this.em.Traits},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Selectors",{get:function(){return this.em.Selectors},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"SelectorManager",{get:function(){return this.em.Selectors},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Styles",{get:function(){return this.em.Styles},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"StyleManager",{get:function(){return this.em.Styles},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Devices",{get:function(){return this.em.Devices},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"DeviceManager",{get:function(){return this.em.Devices},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"EditorModel",{get:function(){return this.em},enumerable:!1,configurable:!0}),t.prototype.getConfig=function(t){return this.em.getConfig(t)},t.prototype.getHtml=function(t){return this.em.getHtml(t)},t.prototype.getCss=function(t){return this.em.getCss(t)},t.prototype.getJs=function(t){return this.em.getJs(t)},t.prototype.getComponents=function(){return this.Components.getComponents()},t.prototype.getWrapper=function(){return this.Components.getWrapper()},t.prototype.setComponents=function(t,e){return void 0===e&&(e={}),this.em.setComponents(t,e),this},t.prototype.addComponents=function(t,e){return this.getWrapper().append(t,e)},t.prototype.getStyle=function(){return this.em.Css.getAll()},t.prototype.setStyle=function(t,e){return void 0===e&&(e={}),this.em.setStyle(t,e),this},t.prototype.addStyle=function(t,e){return void 0===e&&(e={}),this.em.addStyle(t,e)},t.prototype.getSelected=function(){return this.em.getSelected()},t.prototype.getSelectedAll=function(){return this.em.getSelectedAll()},t.prototype.getSelectedToStyle=function(){var t=this.em.getSelected();if(t)return this.StyleManager.getModelToStyle(t)},t.prototype.select=function(t,e){return this.em.setSelected(t,e),this},t.prototype.selectAdd=function(t){return this.em.addSelected(t),this},t.prototype.selectRemove=function(t){return this.em.removeSelected(t),this},t.prototype.selectToggle=function(t){return this.em.toggleSelected(t),this},t.prototype.getEditing=function(){return this.em.getEditing()},t.prototype.setDevice=function(t){return this.em.set("device",t),this},t.prototype.getDevice=function(){return this.em.get("device")},t.prototype.runCommand=function(t,e){return void 0===e&&(e={}),this.Commands.run(t,e)},t.prototype.stopCommand=function(t,e){return void 0===e&&(e={}),this.Commands.stop(t,e)},t.prototype.store=function(t){return ah(this,void 0,void 0,function(){return sh(this,function(e){switch(e.label){case 0:return[4,this.em.store(t)];case 1:return[2,e.sent()]}})})},t.prototype.load=function(t){return ah(this,void 0,void 0,function(){return sh(this,function(e){switch(e.label){case 0:return[4,this.em.load(t)];case 1:return[2,e.sent()]}})})},t.prototype.getProjectData=function(){return this.em.storeData()},t.prototype.loadProjectData=function(t){return this.em.loadData(t)},t.prototype.storeData=function(){return this.em.storeData()},t.prototype.loadData=function(t){return this.em.loadData(t)},t.prototype.getContainer=function(){return this.config.el},t.prototype.getDirtyCount=function(){return this.em.getDirtyCount()},t.prototype.clearDirtyCount=function(){return this.em.clearDirtyCount()},t.prototype.refresh=function(t){this.em.refreshCanvas(t)},t.prototype.setCustomRte=function(t){this.RichTextEditor.customRte=t},t.prototype.setCustomParserCss=function(t){return this.Parser.getConfig().parserCss=t,this},t.prototype.setDragMode=function(t){return this.em.setDragMode(t),this},t.prototype.log=function(t,e){return void 0===e&&(e={}),this.em.log(t,e),this},t.prototype.t=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=this.em).t.apply(t,e)},t.prototype.on=function(t,e){return this.em.on(t,e),this},t.prototype.once=function(t,e){return this.em.once(t,e),this},t.prototype.off=function(t,e){return this.em.off(t,e),this},t.prototype.trigger=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return this.em.trigger.apply(this.em,lh([t],e,!0)),this},t.prototype.destroy=function(){this.em&&(this.em.destroyAll(),this.editorView=void 0)},t.prototype.getEl=function(){var t;return null===(t=this.editorView)||void 0===t?void 0:t.el},t.prototype.getModel=function(){return this.em},t.prototype.render=function(){var t;return null===(t=this.editorView)||void 0===t||t.remove(),this.editorView=new oh(this.em),this.editorView.render().el},t.prototype.onReady=function(t){this.em.get("ready")?t(this):this.em.on("load",t)},t}();const uh=ch;var ph=function(n,r){return(0,t.isString)(n)?function(t,n){var r=n.get(t);if(!r){var o=(0,e.getGlobal)()[t];r=(null==o?void 0:o.default)||o}return r}(n,r):n},dh=function(t,e){t.getModel().logWarning("Plugin ".concat(e," not found"),{context:"plugins",plugin:e})};const fh=function(){function t(){this.plugins={}}return t.prototype.add=function(t,e){return this.get(t)||(this.plugins[t]=e,e)},t.prototype.get=function(t){return this.plugins[t]},t.prototype.getAll=function(){return this.plugins},t}();var hh=function(){return hh=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},hh.apply(this,arguments)};!function(){if((0,e.hasWin)()&&function(){for(var t,e=window.navigator.userAgent,n=[["edge",/Edge\/([0-9\._]+)/],["ie",/MSIE\s(7\.0)/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/]],r=0;r<n.length&&!(t=n[r][1].exec(e));r++);return!!t}()){var t=DOMImplementation.prototype.createHTMLDocument;DOMImplementation.prototype.createHTMLDocument=function(e){return e||(e=""),t.apply(document.implementation,[e])}}}();var gh=new fh,mh=[],vh=function(t,e){var n=ph(t,gh);return function(r){n?n(r,e||{}):dh(r,t)}},yh={$:c.default,editors:mh,plugins:gh,usePlugin:vh,version:"0.21.3",init:function(e){void 0===e&&(e={});var n=e.headless,r=e.container;if(!r&&!n)throw new Error("'container' is required");var o=hh(hh({autorender:!0,plugins:[],pluginsOpts:{}},e),{grapesjs:this,el:n?void 0:(0,t.isElement)(r)?r:document.querySelector(r)}),i=new uh(o,{$:c.default}),a=i.getModel();return o.plugins.forEach(function(t){var e=ph(t,gh),n=o.pluginsOpts[t]||{};e?e(i,n):dh(i,t)}),a.loadOnStart(),o.autorender&&!n&&i.render(),mh.push(i),i}};const bh=yh})(),o})(),t.exports=r()},41417:function(t){var e;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window&&window,e=()=>(()=>{var t={1073:t=>{t.exports={trueFunc:function(){return!0},falseFunc:function(){return!1}}},9125:(t,e,n)=>{"use strict";
1Object.defineProperty(e,"__esModule",{value:!0}),e.groupSelectors=e.getDocumentRoot=void 0;var r=n(2515);e.getDocumentRoot=function(t){for(;t.parent;)t=t.parent;return t},e.groupSelectors=function(t){for(var e=[],n=[],o=0,i=t;o<i.length;o++){var a=i[o];a.some(r.isFilter)?e.push(a):n.push(a)}return[n,e]}},7248:function(t,e,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return i(e,t),e},s=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.select=e.filter=e.some=e.is=e.aliases=e.pseudos=e.filters=void 0;var l=n(7763),c=n(5366),u=a(n(9432)),p=n(9125),d=n(2515),f=n(5366);Object.defineProperty(e,"filters",{enumerable:!0,get:function(){return f.filters}}),Object.defineProperty(e,"pseudos",{enumerable:!0,get:function(){return f.pseudos}}),Object.defineProperty(e,"aliases",{enumerable:!0,get:function(){return f.aliases}});var h={type:l.SelectorType.Pseudo,name:"scope",data:null},g=r({},h),m={type:l.SelectorType.Universal,namespace:null};function v(t,e,n){if(void 0===n&&(n={}),"function"==typeof e)return t.some(e);var r=(0,p.groupSelectors)((0,l.parse)(e)),o=r[0],i=r[1];return o.length>0&&t.some((0,c._compileToken)(o,n))||i.some(function(e){return b(e,t,n).length>0})}function y(t,e,n){if(0===e.length)return[];var r,o=(0,p.groupSelectors)(t),i=o[0],a=o[1];if(i.length){var s=x(e,i,n);if(0===a.length)return s;s.length&&(r=new Set(s))}for(var l=0;l<a.length&&(null==r?void 0:r.size)!==e.length;l++){var c=a[l];if(0===(r?e.filter(function(t){return u.isTag(t)&&!r.has(t)}):e).length)break;if((s=b(c,e,n)).length)if(r)s.forEach(function(t){return r.add(t)});else{if(l===a.length-1)return s;r=new Set(s)}}return void 0!==r?r.size===e.length?e:e.filter(function(t){return r.has(t)}):[]}function b(t,e,n){var r;return t.some(l.isTraversal)?w(null!==(r=n.root)&&void 0!==r?r:(0,p.getDocumentRoot)(e[0]),s(s([],t,!0),[g],!1),n,!0,e):w(e,t,n,!1)}e.is=function(t,e,n){return void 0===n&&(n={}),v([t],e,n)},e.some=v,e.filter=function(t,e,n){return void 0===n&&(n={}),y((0,l.parse)(t),e,n)},e.select=function(t,e,n){if(void 0===n&&(n={}),"function"==typeof t)return S(e,t);var r=(0,p.groupSelectors)((0,l.parse)(t)),o=r[0],i=r[1].map(function(t){return w(e,t,n,!0)});return o.length&&i.push(E(e,o,n,1/0)),0===i.length?[]:1===i.length?i[0]:u.uniqueSort(i.reduce(function(t,e){return s(s([],t,!0),e,!0)}))};
1var _=new Set([l.SelectorType.Descendant,l.SelectorType.Adjacent]);function T(t){return t!==h&&"pseudo"===t.type&&("scope"===t.name||Array.isArray(t.data)&&t.data.some(function(t){return t.some(T)}))}function C(t,e,n){return n&&t.some(T)?r(r({},e),{context:n}):e}function w(t,e,n,r,o){var i=e.findIndex(d.isFilter),a=e.slice(0,i),s=e[i],c=(0,d.getLimit)(s.name,s.data);if(0===c)return[];var p=C(a,n,o),f=(0!==a.length||Array.isArray(t)?0===a.length||1===a.length&&a[0]===h?(Array.isArray(t)?t:[t]).filter(u.isTag):r||a.some(l.isTraversal)?E(t,[a],p,c):x(t,[a],p):u.getChildren(t).filter(u.isTag)).slice(0,c),g=function(t,e,n,r){var o="string"==typeof n?parseInt(n,10):NaN;switch(t){case"first":case"lt":return e;case"last":return e.length>0?[e[e.length-1]]:e;case"nth":case"eq":return isFinite(o)&&Math.abs(o)<e.length?[o<0?e[e.length+o]:e[o]]:[];case"gt":return isFinite(o)?e.slice(o+1):[];case"even":return e.filter(function(t,e){return e%2==0});case"odd":return e.filter(function(t,e){return e%2==1});case"not":var i=new Set(y(n,e,r));return e.filter(function(t){return!i.has(t)})}}(s.name,f,s.data,n);if(0===g.length||e.length===i+1)return g;var v=e.slice(i+1),b=v.some(l.isTraversal),T=C(v,n,o);return b&&(_.has(v[0].type)&&v.unshift(m),v.unshift(h)),v.some(d.isFilter)?w(g,v,n,!1,o):b?E(g,[v],T,1/0):x(g,[v],T)}function E(t,e,n,r){return 0===r?[]:S(t,(0,c._compileToken)(e,n,t),r)}function S(t,e,n){void 0===n&&(n=1/0);var r=(0,c.prepareContext)(t,u,e.shouldTestNextSiblings);return u.find(function(t){return u.isTag(t)&&e(t)},r,!0,n)}function x(t,e,n){var r=(Array.isArray(t)?t:[t]).filter(u.isTag);if(0===r.length)return r;var o=(0,c._compileToken)(e,n);return r.filter(o)}},2515:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLimit=e.isFilter=e.filterNames=void 0,e.filterNames=new Set(["first","last","eq","gt","nth","lt","even","odd"]),e.isFilter=function t(n){return"pseudo"===n.type&&(!!e.filterNames.has(n.name)||!("not"!==n.name||!Array.isArray(n.data))&&n.data.some(function(e){return e.some(t)}))},e.getLimit=function(t,e){var n=null!=e?parseInt(e,10):NaN;switch(t){case"first":return 1;case"nth":case"eq":return isFinite(n)?n>=0?n+1:1/0:0;case"lt":return isFinite(n)?n>=0?n:1/0:0;case"gt":return isFinite(n)?1/0:0;default:return 1/0}}},6451:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toggleClass=e.removeClass=e.addClass=e.hasClass=e.removeAttr=e.val=e.data=e.prop=e.attr=void 0;var r=n(6634),o=n(5633),i=Object.prototype.hasOwnProperty,a=/\s+/,s="data-",l={null:null,true:!0,false:!1},c=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,u=/^{[^]*}$|^\[[^]*]$/;function p(t,e,n){var a;if(t&&o.isTag(t))return null!==(a=t.attribs)&&void 0!==a||(t.attribs={}),e?i.call(t.attribs,e)?!n&&c.test(e)?e:t.attribs[e]:"option"===t.name&&"value"===e?r.text(t.children):"input"!==t.name||"radio"!==t.attribs.type&&"checkbox"!==t.attribs.type||"value"!==e?void 0:"on":t.attribs}function d(t,e,n){null===n?v(t,e):t.attribs[e]=""+n}function f(t,e,n){if(t&&o.isTag(t))return e in t?t[e]:!n&&c.test(e)?void 0!==p(t,e,!1):p(t,e,n)}function h(t,e,n,r){e in t?t[e]=n:d(t,e,!r&&c.test(e)?n?"":null:""+n)}function g(t,e,n){var r,o=t;null!==(r=o.data)&&void 0!==r||(o.data={}),"object"==typeof e?Object.assign(o.data,e):"string"==typeof e&&void 0!==n&&(o.data[e]=n)}function m(t,e){var n,r,a;null==e?r=(n=Object.keys(t.attribs).filter(function(t){return t.startsWith(s)})).map(function(t){return o.camelCase(t.slice(5))}):(n=[s+o.cssCase(e)],r=[e]);for(var c=0;c<n.length;++c){var p=n[c],d=r[c];if(i.call(t.attribs,p)&&!i.call(t.data,d)){if(a=t.attribs[p],i.call(l,a))a=l[a];else if(a===String(Number(a)))a=Number(a);else if(u.test(a))try{a=JSON.parse(a)}catch(t){}t.data[d]=a}}return null==e?t.data:a}function v(t,e){t.attribs&&i.call(t.attribs,e)&&delete t.attribs[e]}function y(t){return t?t.trim().split(a):[]}e.attr=function(t,e){if("object"==typeof t||void 0!==e){if("function"==typeof e){if("string"!=typeof t)throw new Error("Bad combination of arguments.");return o.domEach(this,function(n,r){o.isTag(n)&&d(n,t,e.call(n,r,n.attribs[t]))})}return o.domEach(this,function(n){o.isTag(n)&&("object"==typeof t?Object.keys(t).forEach(function(e){var r=t[e];d(n,e,r)}
1):d(n,t,e))})}return arguments.length>1?this:p(this[0],t,this.options.xmlMode)},e.prop=function(t,e){var n=this;if("string"==typeof t&&void 0===e)switch(t){case"style":var r=this.css(),i=Object.keys(r);return i.forEach(function(t,e){r[e]=t}),r.length=i.length,r;case"tagName":case"nodeName":var a=this[0];return o.isTag(a)?a.name.toUpperCase():void 0;case"outerHTML":return this.clone().wrap("<container />").parent().html();case"innerHTML":return this.html();default:return f(this[0],t,this.options.xmlMode)}if("object"==typeof t||void 0!==e){if("function"==typeof e){if("object"==typeof t)throw new Error("Bad combination of arguments.");return o.domEach(this,function(r,i){o.isTag(r)&&h(r,t,e.call(r,i,f(r,t,n.options.xmlMode)),n.options.xmlMode)})}return o.domEach(this,function(r){o.isTag(r)&&("object"==typeof t?Object.keys(t).forEach(function(e){var o=t[e];h(r,e,o,n.options.xmlMode)}):h(r,t,e,n.options.xmlMode))})}},e.data=function(t,e){var n,r=this[0];if(r&&o.isTag(r)){var a=r;return null!==(n=a.data)&&void 0!==n||(a.data={}),t?"object"==typeof t||void 0!==e?(o.domEach(this,function(n){o.isTag(n)&&("object"==typeof t?g(n,t):g(n,t,e))}),this):i.call(a.data,t)?a.data[t]:m(a,t):m(a)}},e.val=function(t){var e=0===arguments.length,n=this[0];if(!n||!o.isTag(n))return e?void 0:this;switch(n.name){case"textarea":return this.text(t);case"select":var i=this.find("option:selected");if(!e){if(null==this.attr("multiple")&&"object"==typeof t)return this;this.find("option").removeAttr("selected");for(var a="object"!=typeof t?[t]:t,s=0;s<a.length;s++)this.find('option[value="'+a[s]+'"]').attr("selected","");return this}return this.attr("multiple")?i.toArray().map(function(t){return r.text(t.children)}):i.attr("value");case"input":case"option":return e?this.attr("value"):this.attr("value",t)}},e.removeAttr=function(t){for(var e=y(t),n=function(t){o.domEach(r,function(n){o.isTag(n)&&v(n,e[t])})},r=this,i=0;i<e.length;i++)n(i);return this},e.hasClass=function(t){return this.toArray().some(function(e){var n=o.isTag(e)&&e.attribs.class,r=-1;if(n&&t.length)for(;(r=n.indexOf(t,r+1))>-1;){var i=r+t.length;if((0===r||a.test(n[r-1]))&&(i===n.length||a.test(n[i])))return!0}return!1})},e.addClass=function t(e){if("function"==typeof e)return o.domEach(this,function(n,r){if(o.isTag(n)){var i=n.attribs.class||"";t.call([n],e.call(n,r,i))}});if(!e||"string"!=typeof e)return this;for(var n=e.split(a),r=this.length,i=0;i<r;i++){var s=this[i];if(o.isTag(s)){var l=p(s,"class",!1);if(l){for(var c=" "+l+" ",u=0;u<n.length;u++){var f=n[u]+" ";c.includes(" "+f)||(c+=f)}
1d(s,"class",c.trim())}else d(s,"class",n.join(" ").trim())}}return this},e.removeClass=function t(e){if("function"==typeof e)return o.domEach(this,function(n,r){o.isTag(n)&&t.call([n],e.call(n,r,n.attribs.class||""))});var n=y(e),r=n.length,i=0===arguments.length;return o.domEach(this,function(t){if(o.isTag(t))if(i)t.attribs.class="";else{for(var e=y(t.attribs.class),a=!1,s=0;s<r;s++){var l=e.indexOf(n[s]);l>=0&&(e.splice(l,1),a=!0,s--)}a&&(t.attribs.class=e.join(" "))}})},e.toggleClass=function t(e,n){if("function"==typeof e)return o.domEach(this,function(r,i){o.isTag(r)&&t.call([r],e.call(r,i,r.attribs.class||"",n),n)});if(!e||"string"!=typeof e)return this;for(var r=e.split(a),i=r.length,s="boolean"==typeof n?n?1:-1:0,l=this.length,c=0;c<l;c++){var u=this[c];if(o.isTag(u)){for(var p=y(u.attribs.class),d=0;d<i;d++){var f=p.indexOf(r[d]);s>=0&&f<0?p.push(r[d]):s<=0&&f>=0&&p.splice(f,1)}u.attribs.class=p.join(" ")}}return this}},9806:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.css=void 0;var r=n(5633);function o(t,e,n,r){if("string"==typeof e){var a=i(t),s="function"==typeof n?n.call(t,r,a[e]):n;""===s?delete a[e]:null!=s&&(a[e]=s),t.attribs.style=(l=a,Object.keys(l).reduce(function(t,e){return t+(t?" ":"")+e+": "+l[e]+";"},""))}else"object"==typeof e&&Object.keys(e).forEach(function(n,r){o(t,n,e[n],r)});var l}function i(t,e){if(t&&r.isTag(t)){var n=function(t){return(t=(t||"").trim())?t.split(";").reduce(function(t,e){var n=e.indexOf(":");return n<1||n===e.length-1||(t[e.slice(0,n).trim()]=e.slice(n+1).trim()),t},{}):{}}(t.attribs.style);if("string"==typeof e)return n[e];if(Array.isArray(e)){var o={};return e.forEach(function(t){null!=n[t]&&(o[t]=n[t])}),o}return n}}e.css=function(t,e){return null!=t&&null!=e||"object"==typeof t&&!Array.isArray(t)?r.domEach(this,function(n,i){r.isTag(n)&&o(n,t,e,i)}):i(this[0],t)}},3432:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.serializeArray=e.serialize=void 0;var r=n(5633),o="input,select,textarea,keygen",i=/%20/g,a=/\r?\n/g;e.serialize=function(){return this.serializeArray().map(function(t){return encodeURIComponent(t.name)+"="+encodeURIComponent(t.value)}).join("&").replace(i,"+")},e.serializeArray=function(){var t=this;return this.map(function(e,n){var i=t._make(n);return r.isTag(n)&&"form"===n.name?i.find(o).toArray():i.filter(o).toArray()}).filter('[name!=""]:enabled:not(:submit, :button, :image, :reset, :file):matches([checked], :not(:checkbox, :radio))').map(function(e,n){var r,o=t._make(n),i=o.attr("name"),s=null!==(r=o.val())&&void 0!==r?r:"";return Array.isArray(s)?s.map(function(t){return{name:i,value:t.replace(a,"\r\n")}}):{name:i,value:s.replace(a,"\r\n")}}).toArray()}},848:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.clone=e.text=e.toString=e.html=e.empty=e.replaceWith=e.remove=e.insertBefore=e.before=e.insertAfter=e.after=e.wrapAll=e.unwrap=e.wrapInner=e.wrap=e.prepend=e.append=e.prependTo=e.appendTo=e._makeDomArray=void 0;var r=n(655),o=n(7915),i=n(7915),a=r.__importStar(n(5012)),s=n(6634),l=n(5633),c=n(3719);function u(t){return function(){for(var e=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=this.length-1;return l.domEach(this,function(r,a){if(o.hasChildren(r)){var l="function"==typeof n[0]?n[0].call(r,a,s.html(r.children)):n,c=e._makeDomArray(l,a<i);t(c,r.children,r)}})}}function p(t,e,n,o,i){for(var a,s,l=r.__spreadArray([e,n],o),c=t[e-1]||null,u=t[e+n]||null,p=0;p<o.length;++p){var d=o[p],f=d.parent;if(f){var h=f.children.indexOf(o[p]);h>-1&&(f.children.splice(h,1),i===f&&e>h&&l[0]--)}d.parent=i,d.prev&&(d.prev.next=null!==(a=d.next)&&void 0!==a?a:null),d.next&&(d.next.prev=null!==(s=d.prev)&&void 0!==s?s:null),d.prev=o[p-1]||c,d.next=o[p+1]||u}return c&&(c.next=o[0]),u&&(u.prev=o[o.length-1]),t.splice.apply(t,l)}function d(t){return function(e){for(var n=this.length-1,r=this.parents().last(),o=0;o<this.length;o++){var i=this[o],a="function"==typeof e?e.call(i,o,i):"string"!=typeof e||l.isHtml(e)?e:r.find(e).clone(),s=this._makeDomArray(a,o<n)[0];if(s&&c.DomUtils.hasChildren(s)){for(var u=s,p=0;p<u.children.length;){var d=u.children[p];l.isTag(d)?(u=d,p=0):p++}t(i,u,[s])}}return this}}e._makeDomArray=function(t,e){var n=this;return null==t?[]:l.isCheerio(t)?e?l.cloneDom(t.get()):t.get():Array.isArray(t)?t.reduce(function(t,r){return t.concat(n._makeDomArray(r,e))},[]):"string"==typeof t?a.default(t,this.options,!1).children:e?l.cloneDom([t]):[t]},e.appendTo=function(t){return(l.isCheerio(t)?t:this._make(t)).append(this),this},e.prependTo=function(t){return(l.isCheerio(t)?t:this._make(t)).prepend(this),this},e.append=u(function(t,e,n){p(e,e.length,0,t,n)}),e.prepend=u(function(t,e,n){p(e,0,0,t,n)}),e.wrap=d(function(t,e,n){var r=t.parent;if(r){var o=r.children,i=o.indexOf(t);a.update([t],e),p(o,i,0,n,r)}}),e.wrapInner=d(function(t,e,n){o.hasChildren(t)&&(a.update(t.children,e),a.update(n,t))}),e.unwrap=function(t){var e=this;return this.parent(t).not("body").each(function(t,n){e._make(n).replaceWith(n.children)}),this},e.wrapAll=function(t){var e=this[0];if(e){for(var n=this._make("function"==typeof t?t.call(e,0,e):t).insertBefore(e),r=void 0,o=0;o<n.length;o++)"tag"===n[o].type&&(r=n[o]);for(var i=0;r&&i<r.children.length;){var a=r.children[i];"tag"===a.type?(r=a,i=0):i++}r&&this._make(r).append(this)}return this},e.after=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=this.length-1;return l.domEach(this,function(n,o){var i=n.parent;if(c.DomUtils.hasChildren(n)&&i){var a=i.children,l=a.indexOf(n);if(!(l<0)){var u="function"==typeof e[0]?e[0].call(n,o,s.html(n.children)):e;p(a,l+1,0,t._makeDomArray(u,o<r),i)}}})},e.insertAfter=function(t){var e=this;"string"==typeof t&&(t=this._make(t)),this.remove();var n=[];return this._makeDomArray(t).forEach(function(t){var r=e.clone().toArray(),o=t.parent;if(o){var i=o.children,a=i.indexOf(t);a<0||(p(i,a+1,0,r,o),n.push.apply(n,r))}}),this._make(n)},e.before=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=this.length-1;return l.domEach(this,function(n,o){var i=n.parent;if(c.DomUtils.hasChildren(n)&&i){var a=i.children,l=a.indexOf(n);if(!(l<0)){var u="function"==typeof e[0]?e[0].call(n,o,s.html(n.children)):e;p(a,l,0,t._makeDomArray(u,o<r),i)}}})},e.insertBefore=function(t){var e=this,n=this._make(t);this.remove();var r=[];return l.domEach(n,function(t){var n=e.clone().toArray(),o=t.parent;if(o){var i=o.children,a=i.indexOf(t);a<0||(p(i,a,0,n,o),r.push.apply(r,n))}}),this._make(r)},e.remove=function(t){var e=t?this.filter(t):this;return l.domEach(e,function(t){c.DomUtils.removeElement(t),t.prev=t.next=t.parent=null}),this},e.replaceWith=function(t){var e=this;return l.domEach(this,function(n,r){var o=n.parent;if(o){var i=o.children,s="function"==typeof t?t.call(n,r,n):t,l=e._makeDomArray(s);a.update(l,null);var c=i.indexOf(n);p(i,c,1,l,o),l.includes(n)||(n.parent=n.prev=n.next=null)}})},e.empty=function(){return l.domEach(this,function(t){c.DomUtils.hasChildren(t)&&(t.children.forEac
1h(function(t){t.next=t.prev=t.parent=null}),t.children.length=0)})},e.html=function(t){if(void 0===t){var e=this[0];return e&&c.DomUtils.hasChildren(e)?s.html(e.children,this.options):null}var n=r.__assign(r.__assign({},this.options),{context:null});return l.domEach(this,function(e){if(c.DomUtils.hasChildren(e)){e.children.forEach(function(t){t.next=t.prev=t.parent=null}),n.context=e;var r=l.isCheerio(t)?t.toArray():a.default(""+t,n,!1).children;a.update(r,e)}})},e.toString=function(){return s.html(this,this.options)},e.text=function t(e){var n=this;return void 0===e?s.text(this):"function"==typeof e?l.domEach(this,function(r,o){t.call(n._make(r),e.call(r,o,s.text([r])))}):l.domEach(this,function(t){if(c.DomUtils.hasChildren(t)){t.children.forEach(function(t){t.next=t.prev=t.parent=null});var n=new i.Text(e);a.update(n,t)}})},e.clone=function(){return this._make(l.cloneDom(this.get()))}},1042:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.addBack=e.add=e.end=e.slice=e.index=e.toArray=e.get=e.eq=e.last=e.first=e.has=e.not=e.is=e.filterArray=e.filter=e.map=e.each=e.contents=e.children=e.siblings=e.prevUntil=e.prevAll=e.prev=e.nextUntil=e.nextAll=e.next=e.closest=e.parentsUntil=e.parents=e.parent=e.find=void 0;var r=n(655),o=n(7915),i=r.__importStar(n(7248)),a=n(5633),s=n(6634),l=n(3719),c=l.DomUtils.uniqueSort,u=/^\s*[~+]/;function p(t){return function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return function(r){var o,i=t(e,this);return r&&(i=v(i,r,this.options.xmlMode,null===(o=this._root)||void 0===o?void 0:o[0])),this._make(this.length>1&&i.length>1?n.reduce(function(t,e){return e(t)},i):i)}}}e.find=function(t){var e;if(!t)return this._make([]);var n=this.toArray();if("string"!=typeof t){var r=a.isCheerio(t)?t.toArray():[t];return this._make(r.filter(function(t){return n.some(function(e){return s.contains(e,t)})}))}var o=u.test(t)?n:this.children().toArray(),l={context:n,root:null===(e=this._root)||void 0===e?void 0:e[0],xmlMode:this.options.xmlMode};return this._make(i.select(t,o,l))};var d=p(function(t,e){for(var n,r=[],o=0;o<e.length;o++){var i=t(e[o]);r.push(i)}return(n=new Array).concat.apply(n,r)}),f=p(function(t,e){for(var n=[],r=0;r<e.length;r++){var o=t(e[r]);null!==o&&n.push(o)}return n});function h(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var o=null,s=p(function(t,e){var n=[];return a.domEach(e,function(e){for(var r;(r=t(e))&&!(null==o?void 0:o(r,n.length));e=r)n.push(r)}),n}).apply(void 0,r.__spreadArray([t],e));return function(t,e){var n=this;o="string"==typeof t?function(e){return i.is(e,t,n.options)}:t?m(t):null;var r=s.call(this,e);return o=null,r}}function g(t){return Array.from(new Set(t))}function m(t){return"function"==typeof t?function(e,n){return t.call(e,n,e)}:a.isCheerio(t)?function(e){return Array.prototype.includes.call(t,e)}:function(e){return t===e}}function v(t,e,n,r){return"string"==typeof e?i.filter(e,t,{xmlMode:n,root:r}):t.filter(m(e))}e.parent=f(function(t){var e=t.parent;return e&&!o.isDocument(e)?e:null},g),e.parents=d(function(t){for(var e=[];t.parent&&!o.isDocument(t.parent);)e.push(t.parent),t=t.parent;return e},c,function(t){return t.reverse()}),e.parentsUntil=h(function(t){var e=t.parent;return e&&!o.isDocument(e)?e:null},c,function(t){return t.reverse()}),e.closest=function(t){var e=this,n=[];return t?(a.domEach(this,function(r){for(var o;r&&"root"!==r.type;){if(!t||v([r],t,e.options.xmlMode,null===(o=e._root)||void 0===o?void 0:o[0]).length){r&&!n.includes(r)&&n.push(r);break}r=r.parent}}),this._make(n)):this._make(n)},e.next=f(function(t){return l.DomUtils.nextElementSibling(t)}),e.nextAll=d(function(t){for(var e=[];t.next;)t=t.next,a.isTag(t)&&e.push(t);return e},g),e.nextUntil=h(function(t){return l.DomUtils.nextElementSibling(t)},g),e.prev=f(function(t){return l.DomUtils.prevElementSibling(t)}),e.prevAll=d(function(t){for(var e=[];t.prev;)t=t.prev,a.isTag(t)&&e.push(t);return e},g),e.prevUntil=h(function(t){return l.DomUtils.prevElementSibling(t)},g),e.siblings=d(function(t){return l.DomUtils.getSiblings(t).filter(function(e){return a.isTag(e)&&e!==t})},c),e.children=d(function(t){return l.DomUtils.getChildren(t).filter(a.isTag)},g),e.contents=function(){var t=this.toArray().reduce(function(t,e){return o.hasChildren(e)?t.concat(e.children):t},[]);return this._make(t)},e.each=function(t){for(var e=0,n=this.length;e<n&&!1!==t.call(this[e],e,this[e]);)++e;return this},e.map=function(t){for(var e=[],n=0;n<this.length;n++){var r=this[n],o=t.call(r,n,r);null!=o&&(e=e.concat(o))}return this._make(e)},e.filter=function(t){var e;return this._make(v(this.toArray(),t,this.options.xmlMode,null===(e=this._root)||void 0===e?void 0:e[0]))},e.filterArray=v,e.is=function(t){var e=this.toArray();return"string"==typeof t?i.some(e.filter(a.isTag),t,this.options):!!t&&e.some(m(t))},e.not=function(t){var e=this.toArray();if("string"==typeof t){var n=new Set(i.filter(t,e,this.options));e=e.filter(function(t){return!n.has(t)})}else{var r=m(t);e=e.filter(function(t,e){return!r(t,e)})}return this._make(e)},e.has=function(t){var e=this;return this.filter("string"==typeof t?":has("+t+")":function(n,r){return e._make(r).find(t).length>0})},e.first=function(){return this.length>1?this._make(this[0]):this},e.last=function(){return this.length>0?this._make(this[this.length-1]):this},e.eq=function(t){var e;return 0===(t=+t)&&this.length<=1?this:(t<0&&(t=this.length+t),this._make(null!==(e=this[t])&&void 0!==e?e:[]))},e.get=function(t){return null==t?this.toArray():this[t<0?this.length+t:t]},e.toArray=function(){return Array.prototype.slice.call(this)},e.index=function(t){var e,n;return null==t?(e=this.parent().children(),n=this[0]):"string"==typeof t?(e=this._make(t),n=this[0]):(e=this,n=a.isCheerio(t)?t[0]:t),Array.prototype.indexOf.call(e,n)},e.slice=function(t,e){return this._make(Array.prototype.slice.call(this,t,e))},e.end=function(){var t;return null!==(t=this.prevObject)&&void 0!==t?t:this._make([])},e.add=function(t,e){var n=this._make(t,e),o=c(r.__spreadArray(r.__spreadArray([],this.get()),n.get()));return this._make(o)},e.addBack=function(t){return this.prevObject?this.add(t?this.prevObject.filter(t):this.prevObject):this}},7911:(t,e,n)=>{"use strict";
1Object.defineProperty(e,"__esModule",{value:!0}),e.Cheerio=void 0;var r=n(655),o=r.__importDefault(n(5012)),i=r.__importDefault(n(2754)),a=n(5633),s=r.__importStar(n(6451)),l=r.__importStar(n(1042)),c=r.__importStar(n(848)),u=r.__importStar(n(9806)),p=r.__importStar(n(3432)),d=function(){function t(t,e,n,r){var s=this;if(void 0===r&&(r=i.default),this.length=0,this.options=r,!t)return this;if(n&&("string"==typeof n&&(n=o.default(n,this.options,!1)),this._root=new this.constructor(n,null,null,this.options),this._root._root=this._root),a.isCheerio(t))return t;var l,c="string"==typeof t&&a.isHtml(t)?o.default(t,this.options,!1).children:(l=t).name||"root"===l.type||"text"===l.type||"comment"===l.type?[t]:Array.isArray(t)?t:null;if(c)return c.forEach(function(t,e){s[e]=t}),this.length=c.length,this;var u=t,p=e?"string"==typeof e?a.isHtml(e)?this._make(o.default(e,this.options,!1)):(u=e+" "+u,this._root):a.isCheerio(e)?e:this._make(e):this._root;return p?p.find(u):this}return t.prototype._make=function(t,e){var n=new this.constructor(t,e,this._root,this.options);return n.prevObject=this,n},t}();e.Cheerio=d,d.prototype.cheerio="[cheerio object]",d.prototype.splice=Array.prototype.splice,d.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator],Object.assign(d.prototype,s,l,c,u,p)},7503:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.root=e.parseHTML=e.merge=e.contains=void 0;var r=n(655);r.__exportStar(n(8701),e),r.__exportStar(n(3434),e);var o=n(3434);e.default=o.load([]);var i=r.__importStar(n(6634));e.contains=i.contains,e.merge=i.merge,e.parseHTML=i.parseHTML,e.root=i.root},3434:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.load=void 0;var r=n(655),o=r.__importStar(n(2754)),i=r.__importStar(n(6634)),a=n(7911),s=r.__importDefault(n(5012));e.load=function t(e,n,l){if(void 0===l&&(l=!0),null==e)throw new Error("cheerio.load() expects a string");var c=r.__assign(r.__assign({},o.default),o.flatten(n)),u=s.default(e,c,l),p=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e}(a.Cheerio);function d(t,e,n,i){return void 0===n&&(n=u),new p(t,e,n,r.__assign(r.__assign({},c),o.flatten(i)))}return Object.assign(d,i,{load:t,_root:u,_options:c,fn:p.prototype,prototype:p.prototype}),d}},2754:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.flatten=void 0;var r=n(655);e.default={xml:!1,decodeEntities:!0};var o={_useHtmlParser2:!0,xmlMode:!0};e.flatten=function(t){return(null==t?void 0:t.xml)?"boolean"==typeof t.xml?o:r.__assign(r.__assign({},o),t.xml):null!=t?t:void 0}},5012:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.update=void 0;var r=n(3719),o=n(8585),i=n(7957),a=n(7915);function s(t,e){var n=Array.isArray(t)?t:[t];e?e.children=n:e=null;for(var o=0;o<n.length;o++){var i=n[o];i.parent&&i.parent.children!==n&&r.DomUtils.removeElement(i),e?(i.prev=n[o-1]||null,i.next=n[o+1]||null):i.prev=i.next=null,i.parent=e}return e}e.default=function(t,e,n){if("undefined"!=typeof Buffer&&Buffer.isBuffer(t)&&(t=t.toString()),"string"==typeof t)return e.xmlMode||e._useHtmlParser2?o.parse(t,e):i.parse(t,e,n);var r=t;if(!Array.isArray(r)&&a.isDocument(r))return r;var l=new a.Document([]);return s(r,l),l},e.update=s},8585:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.render=e.parse=void 0;var o=n(3719);Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return o.parseDocument}});var i=n(7220);Object.defineProperty(e,"render",{enumerable:!0,get:function(){return r(i).default}})},7957:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.render=e.parse=void 0;var r=n(655),o=n(7915),i=n(2394),a=r.__importDefault(n(1906));e.parse=function(t,e,n){var r={scriptingEnabled:"boolean"!=typeof e.scriptingEnabled||e.scriptingEnabled,treeAdapter:a.default,sourceCodeLocationInfo:e.sourceCodeLocationInfo},o=e.context;return n?i.parse(t,r):i.parseFragment(o,t,r)},e.render=function(t){for(var e,n=("length"in t?t:[t]),s=0;s<n.length;s+=1){var l=n[s];o.isDocument(l)&&(e=Array.prototype.splice).call.apply(e,r.__spreadArray([n,s,1],l.children))}return i.serialize({children:n},{treeAdapter:a.default})}},6634:(t,e,n)=>{"use strict";
1Object.defineProperty(e,"__esModule",{value:!0}),e.merge=e.contains=e.root=e.parseHTML=e.text=e.xml=e.html=void 0;var r=n(655),o=r.__importStar(n(2754)),i=n(7248),a=n(3719),s=n(7957),l=n(8585);function c(t,e,n){var r,o=e?"string"==typeof e?i.select(e,null!==(r=null==t?void 0:t._root)&&void 0!==r?r:[],n):e:null==t?void 0:t._root.children;return o?n.xmlMode||n._useHtmlParser2?l.render(o,n):s.render(o):""}function u(t){if(Array.isArray(t))return!0;if("object"!=typeof t||!Object.prototype.hasOwnProperty.call(t,"length")||"number"!=typeof t.length||t.length<0)return!1;for(var e=0;e<t.length;e++)if(!(e in t))return!1;return!0}e.html=function(t,e){return!e&&function(t){return"object"==typeof t&&null!=t&&!("length"in t)&&!("type"in t)}(t)&&(e=t,t=void 0),c(this||void 0,t,r.__assign(r.__assign(r.__assign({},o.default),this?this._options:{}),o.flatten(null!=e?e:{})))},e.xml=function(t){return c(this,t,r.__assign(r.__assign({},this._options),{xmlMode:!0}))},e.text=function t(e){for(var n=e||(this?this.root():[]),r="",o=0;o<n.length;o++){var i=n[o];a.DomUtils.isText(i)?r+=i.data:a.DomUtils.hasChildren(i)&&i.type!==a.ElementType.Comment&&i.type!==a.ElementType.Script&&i.type!==a.ElementType.Style&&(r+=t(i.children))}return r},e.parseHTML=function(t,e,n){if(void 0===n&&(n="boolean"==typeof e&&e),!t||"string"!=typeof t)return null;"boolean"==typeof e&&(n=e);var r=this.load(t,o.default,!1);return n||r("script").remove(),r.root()[0].children.slice()},e.root=function(){return this(this._root)},e.contains=function(t,e){if(e===t)return!1;for(var n=e;n&&n!==n.parent;)if((n=n.parent)===t)return!0;return!1},e.merge=function(t,e){if(u(t)&&u(e)){for(var n=t.length,r=+e.length,o=0;o<r;o++)t[n++]=e[o];return t.length=n,t}}},8701:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},5633:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isHtml=e.cloneDom=e.domEach=e.cssCase=e.camelCase=e.isCheerio=e.isTag=void 0;var r=n(3719),o=n(7915);e.isTag=r.DomUtils.isTag,e.isCheerio=function(t){return null!=t.cheerio},e.camelCase=function(t){return t.replace(/[_.-](\w|$)/g,function(t,e){return e.toUpperCase()})},e.cssCase=function(t){return t.replace(/[A-Z]/g,"-$&").toLowerCase()},e.domEach=function(t,e){for(var n=t.length,r=0;r<n;r++)e(t[r],r);return t},e.cloneDom=function(t){var e="length"in t?Array.prototype.map.call(t,function(t){return o.cloneNode(t,!0)}):[o.cloneNode(t,!0)],n=new o.Document(e);return e.forEach(function(t){t.parent=n}),e};var i=/<[a-zA-Z][^]*>/;e.isHtml=function(t){return i.test(t)}},996:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.attributeRules=void 0;var r=n(1073),o=/[-[\]{}()*+?.,\\^$|#\s]/g;function i(t){return t.replace(o,"\\$&")}var a=new Set(["accept","accept-charset","align","alink","axis","bgcolor","charset","checked","clear","codetype","color","compact","declare","defer","dir","direction","disabled","enctype","face","frame","hreflang","http-equiv","lang","language","link","media","method","multiple","nohref","noresize","noshade","nowrap","readonly","rel","rev","rules","scope","scrolling","selected","shape","target","text","type","valign","valuetype","vlink"]);function s(t,e){return"boolean"==typeof t.ignoreCase?t.ignoreCase:"quirks"===t.ignoreCase?!!e.quirksMode:!e.xmlMode&&a.has(t.name)}e.attributeRules={equals:function(t,e,n){var r=n.adapter,o=e.name,i=e.value;return s(e,n)?(i=i.toLowerCase(),function(e){var n=r.getAttributeValue(e,o);return null!=n&&n.length===i.length&&n.toLowerCase()===i&&t(e)}):function(e){return r.getAttributeValue(e,o)===i&&t(e)}},hyphen:function(t,e,n){var r=n.adapter,o=e.name,i=e.value,a=i.length;return s(e,n)?(i=i.toLowerCase(),function(e){var n=r.getAttributeValue(e,o);return null!=n&&(n.length===a||"-"===n.charAt(a))&&n.substr(0,a).toLowerCase()===i&&t(e)}):function(e){var n=r.getAttributeValue(e,o);return null!=n&&(n.length===a||"-"===n.charAt(a))&&n.substr(0,a)===i&&t(e)}},element:function(t,e,n){var o=n.adapter,a=e.name,l=e.value;if(/\s/.test(l))return r.falseFunc;var c=new RegExp("(?:^|\\s)".concat(i(l),"(?:$|\\s)"),s(e,n)?"i":"");return function(e){var n=o.getAttributeValue(e,a);return null!=n&&n.length>=l.length&&c.test(n)&&t(e)}},exists:function(t,e,n){var r=e.name,o=n.adapter;return function(e){return o.hasAttrib(e,r)&&t(e)}},start:function(t,e,n){var o=n.adapter,i=e.name,a=e.value,l=a.length;return 0===l?r.falseFunc:s(e,n)?(a=a.toLowerCase(),function(e){var n=o.getAttributeValue(e,i);return null!=n&&n.length>=l&&n.substr(0,l).toLowerCase()===a&&t(e)}):function(e){var n;return!!(null===(n=o.getAttributeValue(e,i))||void 0===n?void 0:n.startsWith(a))&&t(e)}},end:function(t,e,n){var o=n.adapter,i=e.name,a=e.value,l=-a.length;return 0===l?r.falseFunc:s(e,n)?(a=a.toLowerCase(),function(e){var n;return(null===(n=o.getAttributeValue(e,i))||void 0===n?void 0:n.substr(l).toLowerCase())===a&&t(e)}):function(e){var n;return!!(null===(n=o.getAttributeValue(e,i))||void 0===n?void 0:n.endsWith(a))&&t(e)}},any:function(t,e,n){var o=n.adapter,a=e.name,l=e.value;if(""===l)return r.falseFunc;if(s(e,n)){var c=new RegExp(i(l),"i");return function(e){var n=o.getAttributeValue(e,a);return null!=n&&n.length>=l.length&&c.test(n)&&t(e)}}return function(e){var n;return!!(null===(n=o.getAttributeValue(e,a))||void 0===n?void 0:n.includes(l))&&t(e)}},not:function(t,e,n){var r=n.adapter,o=e.name,i=e.value;return""===i?function(e){return!!r.getAttributeValue(e,o)&&t(e)}:s(e,n)?(i=i.toLowerCase(),function(e){var n=r.getAttributeValue(e,o);return(null==n||n.length!==i.length||n.toLowerCase()!==i)&&t(e)}):function(e){return r.getAttributeValue(e,o)!==i&&t(e)}}}},8866:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};
1Object.defineProperty(e,"__esModule",{value:!0}),e.compileToken=e.compileUnsafe=e.compile=void 0;var o=n(7763),i=n(1073),a=r(n(7353)),s=n(7177),l=n(3621),c=n(1768);function u(t,e,n){return g("string"==typeof t?(0,o.parse)(t):t,e,n)}function p(t){return"pseudo"===t.type&&("scope"===t.name||Array.isArray(t.data)&&t.data.some(function(t){return t.some(p)}))}e.compile=function(t,e,n){var r=u(t,e,n);return(0,c.ensureIsTag)(r,e.adapter)},e.compileUnsafe=u;var d={type:o.SelectorType.Descendant},f={type:"_flexibleDescendant"},h={type:o.SelectorType.Pseudo,name:"scope",data:null};function g(t,e,n){var r;(t=t.filter(function(t){return t.length>0})).forEach(a.default),n=null!==(r=e.context)&&void 0!==r?r:n;var o=Array.isArray(n),u=n&&(Array.isArray(n)?n:[n]);!function(t,e,n){for(var r=e.adapter,o=!!(null==n?void 0:n.every(function(t){var e=r.isTag(t)&&r.getParent(t);return t===c.PLACEHOLDER_ELEMENT||e&&r.isTag(e)})),i=0,a=t;i<a.length;i++){var l=a[i];if(l.length>0&&(0,s.isTraversal)(l[0])&&"descendant"!==l[0].type);else{if(!o||l.some(p))continue;l.unshift(d)}l.unshift(h)}}(t,e,u);var v=!1,y=t.map(function(t){if(t.length>=2){var n=t[0],r=t[1];"pseudo"!==n.type||"scope"!==n.name||(o&&"descendant"===r.type?t[1]=f:"adjacent"!==r.type&&"sibling"!==r.type||(v=!0))}return function(t,e,n){var r;return t.reduce(function(t,r){return t===i.falseFunc?i.falseFunc:(0,l.compileGeneralSelector)(t,r,e,n,g)},null!==(r=e.rootFunc)&&void 0!==r?r:i.trueFunc)}(t,e,u)}).reduce(m,i.falseFunc);return y.shouldTestNextSiblings=v,y}function m(t,e){return e===i.falseFunc||t===i.trueFunc?t:t===i.falseFunc||e===i.trueFunc?e:function(n){return t(n)||e(n)}}e.compileToken=g},3621:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.compileGeneralSelector=void 0;var r=n(996),o=n(8677),i=n(7763);e.compileGeneralSelector=function(t,e,n,a,s){var l=n.adapter,c=n.equals;switch(e.type){case i.SelectorType.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case i.SelectorType.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case i.SelectorType.Attribute:if(null!=e.namespace)throw new Error("Namespaced attributes are not yet supported by css-select");return n.xmlMode&&!n.lowerCaseAttributeNames||(e.name=e.name.toLowerCase()),r.attributeRules[e.action](t,e,n);case i.SelectorType.Pseudo:return(0,o.compilePseudoSelector)(t,e,n,a,s);case i.SelectorType.Tag:if(null!=e.namespace)throw new Error("Namespaced tag names are not yet supported by css-select");var u=e.name;return n.xmlMode&&!n.lowerCaseTags||(u=u.toLowerCase()),function(e){return l.getName(e)===u&&t(e)};
1case i.SelectorType.Descendant:if(!1===n.cacheResults||"undefined"==typeof WeakSet)return function(e){for(var n=e;n=l.getParent(n);)if(l.isTag(n)&&t(n))return!0;return!1};var p=new WeakSet;return function(e){for(var n=e;n=l.getParent(n);)if(!p.has(n)){if(l.isTag(n)&&t(n))return!0;p.add(n)}return!1};case"_flexibleDescendant":return function(e){var n=e;do{if(l.isTag(n)&&t(n))return!0}while(n=l.getParent(n));return!1};case i.SelectorType.Parent:return function(e){return l.getChildren(e).some(function(e){return l.isTag(e)&&t(e)})};case i.SelectorType.Child:return function(e){var n=l.getParent(e);return null!=n&&l.isTag(n)&&t(n)};case i.SelectorType.Sibling:return function(e){for(var n=l.getSiblings(e),r=0;r<n.length;r++){var o=n[r];if(c(e,o))break;if(l.isTag(o)&&t(o))return!0}return!1};case i.SelectorType.Adjacent:return l.prevElementSibling?function(e){var n=l.prevElementSibling(e);return null!=n&&t(n)}:function(e){for(var n,r=l.getSiblings(e),o=0;o<r.length;o++){var i=r[o];if(c(e,i))break;l.isTag(i)&&(n=i)}return!!n&&t(n)};case i.SelectorType.Universal:if(null!=e.namespace&&"*"!==e.namespace)throw new Error("Namespaced universal selectors are not yet supported by css-select");return t}}},5366:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return o(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.aliases=e.pseudos=e.filters=e.is=e.selectOne=e.selectAll=e.prepareContext=e._compileToken=e._compileUnsafe=e.compile=void 0;var a=i(n(9432)),s=n(1073),l=n(8866),c=n(1768),u=function(t,e){return t===e},p={adapter:a,equals:u};function d(t){var e,n,r,o,i=null!=t?t:p;return null!==(e=i.adapter)&&void 0!==e||(i.adapter=a),null!==(n=i.equals)&&void 0!==n||(i.equals=null!==(o=null===(r=i.adapter)||void 0===r?void 0:r.equals)&&void 0!==o?o:u),i}function f(t){return function(e,n,r){var o=d(n);return t(e,o,r)}}function h(t){return function(e,n,r){var o=d(r);"function"!=typeof e&&(e=(0,l.compileUnsafe)(e,o,n));var i=g(n,o.adapter,e.shouldTestNextSiblings);return t(e,i,o)}}function g(t,e,n){return void 0===n&&(n=!1),n&&(t=function(t,e){for(var n=Array.isArray(t)?t.slice(0):[t],r=n.length,o=0;o<r;o++){var i=(0,c.getNextSiblings)(n[o],e);n.push.apply(n,i)}return n}(t,e)),Array.isArray(t)?e.removeSubsets(t):e.getChildren(t)}e.compile=f(l.compile),e._compileUnsafe=f(l.compileUnsafe),e._compileToken=f(l.compileToken),e.prepareContext=g,e.selectAll=h(function(t,e,n){return t!==s.falseFunc&&e&&0!==e.length?n.adapter.findAll(t,e):[]}),e.selectOne=h(function(t,e,n){return t!==s.falseFunc&&e&&0!==e.length?n.adapter.findOne(t,e):null}),e.is=function(t,e,n){var r=d(n);return("function"==typeof e?e:(0,l.compile)(e,r))(t)},e.default=e.selectAll;var m=n(8677);Object.defineProperty(e,"filters",{enumerable:!0,get:function(){return m.filters}}),Object.defineProperty(e,"pseudos",{enumerable:!0,get:function(){return m.pseudos}}),Object.defineProperty(e,"aliases",{enumerable:!0,get:function(){return m.aliases}})},7177:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isTraversal=e.procedure=void 0,e.procedure={universal:50,tag:30,attribute:1,pseudo:0,"pseudo-element":0,"column-combinator":-1,descendant:-1,child:-1,parent:-1,sibling:-1,adjacent:-1,_flexibleDescendant:-1},e.isTraversal=function(t){return e.procedure[t.type]<0}},2968:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.aliases=void 0,e.aliases={"any-link":":is(a, area, link)[href]",link:":any-link:not(:visited)",disabled:":is(\n :is(button, input, select, textarea, optgroup, option)[disabled],\n optgroup[disabled] > option,\n fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)\n )",enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",o
1ptional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"}},7689:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.filters=void 0;var o=r(n(7540)),i=n(1073);function a(t,e){return function(n){var r=e.getParent(n);return null!=r&&e.isTag(r)&&t(n)}}function s(t){return function(e,n,r){var o=r.adapter[t];return"function"!=typeof o?i.falseFunc:function(t){return o(t)&&e(t)}}}e.filters={contains:function(t,e,n){var r=n.adapter;return function(n){return t(n)&&r.getText(n).includes(e)}},icontains:function(t,e,n){var r=n.adapter,o=e.toLowerCase();return function(e){return t(e)&&r.getText(e).toLowerCase().includes(o)}},"nth-child":function(t,e,n){var r=n.adapter,s=n.equals,l=(0,o.default)(e);return l===i.falseFunc?i.falseFunc:l===i.trueFunc?a(t,r):function(e){for(var n=r.getSiblings(e),o=0,i=0;i<n.length&&!s(e,n[i]);i++)r.isTag(n[i])&&o++;return l(o)&&t(e)}},"nth-last-child":function(t,e,n){var r=n.adapter,s=n.equals,l=(0,o.default)(e);return l===i.falseFunc?i.falseFunc:l===i.trueFunc?a(t,r):function(e){for(var n=r.getSiblings(e),o=0,i=n.length-1;i>=0&&!s(e,n[i]);i--)r.isTag(n[i])&&o++;return l(o)&&t(e)}},"nth-of-type":function(t,e,n){var r=n.adapter,s=n.equals,l=(0,o.default)(e);return l===i.falseFunc?i.falseFunc:l===i.trueFunc?a(t,r):function(e){for(var n=r.getSiblings(e),o=0,i=0;i<n.length;i++){var a=n[i];if(s(e,a))break;r.isTag(a)&&r.getName(a)===r.getName(e)&&o++}return l(o)&&t(e)}},"nth-last-of-type":function(t,e,n){var r=n.adapter,s=n.equals,l=(0,o.default)(e);return l===i.falseFunc?i.falseFunc:l===i.trueFunc?a(t,r):function(e){for(var n=r.getSiblings(e),o=0,i=n.length-1;i>=0;i--){var a=n[i];if(s(e,a))break;r.isTag(a)&&r.getName(a)===r.getName(e)&&o++}return l(o)&&t(e)}},root:function(t,e,n){var r=n.adapter;return function(e){var n=r.getParent(e);return(null==n||!r.isTag(n))&&t(e)}},scope:function(t,n,r,o){var i=r.equals;return o&&0!==o.length?1===o.length?function(e){return i(o[0],e)&&t(e)}:function(e){return o.includes(e)&&t(e)}:e.filters.root(t,n,r)},hover:s("isHovered"),visited:s("isVisited"),active:s("isActive")}},8677:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.compilePseudoSelector=e.aliases=e.pseudos=e.filters=void 0;var r=n(1073),o=n(7763),i=n(7689);Object.defineProperty(e,"filters",{enumerable:!0,get:function(){return i.filters}});var a=n(7221);Object.defineProperty(e,"pseudos",{enumerable:!0,get:function(){return a.pseudos}});var s=n(2968);Object.defineProperty(e,"aliases",{enumerable:!0,get:function(){return s.aliases}});var l=n(1768);e.compilePseudoSelector=function(t,e,n,c,u){var p=e.name,d=e.data;if(Array.isArray(d))return l.subselects[p](t,d,n,c,u);if(p in s.aliases){if(null!=d)throw new Error("Pseudo ".concat(p," doesn't have any arguments"));var f=(0,o.parse)(s.aliases[p]);return l.subselects.is(t,f,n,c,u)}
1if(p in i.filters)return i.filters[p](t,d,n,c);if(p in a.pseudos){var h=a.pseudos[p];return(0,a.verifyPseudoArgs)(h,p,d),h===r.falseFunc?r.falseFunc:t===r.trueFunc?function(t){return h(t,n,d)}:function(e){return h(e,n,d)&&t(e)}}throw new Error("unmatched pseudo-class :".concat(p))}},7221:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.verifyPseudoArgs=e.pseudos=void 0,e.pseudos={empty:function(t,e){var n=e.adapter;return!n.getChildren(t).some(function(t){return n.isTag(t)||""!==n.getText(t)})},"first-child":function(t,e){var n=e.adapter,r=e.equals,o=n.getSiblings(t).find(function(t){return n.isTag(t)});return null!=o&&r(t,o)},"last-child":function(t,e){for(var n=e.adapter,r=e.equals,o=n.getSiblings(t),i=o.length-1;i>=0;i--){if(r(t,o[i]))return!0;if(n.isTag(o[i]))break}return!1},"first-of-type":function(t,e){for(var n=e.adapter,r=e.equals,o=n.getSiblings(t),i=n.getName(t),a=0;a<o.length;a++){var s=o[a];if(r(t,s))return!0;if(n.isTag(s)&&n.getName(s)===i)break}return!1},"last-of-type":function(t,e){for(var n=e.adapter,r=e.equals,o=n.getSiblings(t),i=n.getName(t),a=o.length-1;a>=0;a--){var s=o[a];if(r(t,s))return!0;if(n.isTag(s)&&n.getName(s)===i)break}return!1},"only-of-type":function(t,e){var n=e.adapter,r=e.equals,o=n.getName(t);return n.getSiblings(t).every(function(e){return r(t,e)||!n.isTag(e)||n.getName(e)!==o})},"only-child":function(t,e){var n=e.adapter,r=e.equals;return n.getSiblings(t).every(function(e){return r(t,e)||!n.isTag(e)})}},e.verifyPseudoArgs=function(t,e,n){if(null===n){if(t.length>2)throw new Error("pseudo-selector :".concat(e," requires an argument"))}else if(2===t.length)throw new Error("pseudo-selector :".concat(e," doesn't have any arguments"))}},1768:function(t,e,n){"use strict";var r=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.subselects=e.getNextSiblings=e.ensureIsTag=e.PLACEHOLDER_ELEMENT=void 0;var o=n(1073),i=n(7177);function a(t,e){return t===o.falseFunc?o.falseFunc:function(n){return e.isTag(n)&&t(n)}}function s(t,e){var n=e.getSiblings(t);if(n.length<=1)return[];var r=n.indexOf(t);return r<0||r===n.length-1?[]:n.slice(r+1).filter(e.isTag)}e.PLACEHOLDER_ELEMENT={},e.ensureIsTag=a,e.getNextSiblings=s;var l=function(t,e,n,r,o){var i=o(e,{xmlMode:!!n.xmlMode,adapter:n.adapter,equals:n.equals},r);return function(e){return i(e)&&t(e)}};e.subselects={is:l,matches:l,where:l,not:function(t,e,n,r,i){var a=i(e,{xmlMode:!!n.xmlMode,adapter:n.adapter,equals:n.equals},r);return a===o.falseFunc?t:a===o.trueFunc?o.falseFunc:function(e){return!a(e)&&t(e)}},has:function(t,n,l,c,u){var p=l.adapter,d={xmlMode:!!l.xmlMode,adapter:p,equals:l.equals},f=n.some(function(t){return t.some(i.isTraversal)})?[e.PLACEHOLDER_ELEMENT]:void 0,h=u(n,d,f);if(h===o.falseFunc)return o.falseFunc;if(h===o.trueFunc)return function(e){return p.getChildren(e).some(p.isTag)&&t(e)};var g=a(h,p),m=h.shouldTestNextSiblings,v=void 0!==m&&m;return f?function(e){f[0]=e;var n=p.getChildren(e),o=v?r(r([],n,!0),s(e,p),!0):n;return t(e)&&p.existsOne(g,o)}:function(e){return t(e)&&p.existsOne(g,p.getChildren(e))}}}},7353:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7763),o=n(7177),i={exists:10,equals:8,not:7,start:6,end:6,any:5,hyphen:4,element:4};function a(t){var e=o.procedure[t.type];if(t.type===r.SelectorType.Attribute)(e=i[t.action])===i.equals&&"id"===t.name&&(e=9),t.ignoreCase&&(e>>=1);else if(t.type===r.SelectorType.Pseudo)if(t.data)if("has"===t.name||"contains"===t.name)e=0;else if(Array.isArray(t.data)){e=0;for(var n=0;n<t.data.length;n++)if(1===t.data[n].length){var s=a(t.data[n][0]);if(0===s){e=0;break}s>e&&(e=s)}t.data.length>1&&e>0&&(e-=1)}else e=1;else e=3;return e}e.default=function(t){for(var e=t.map(a),n=1;n<t.length;n++){var r=e[n];if(!(r<0))for(var o=n-1;o>=0&&r<e[o];o--){var i=t[o+1];t[o+1]=t[o],t[o]=i,e[o+1]=e[o],e[o]=r}}}},7763:(t,e,n)=>{"use strict";var r;n.r(e),n.d(e,{AttributeAction:()=>i,IgnoreCaseMode:()=>o,SelectorType:()=>r,isTraversal:()=>u,parse:()=>m,stringify:()=>w}),function(t){t.Attribute="attribute",t.Pseudo="pseudo",t.PseudoElement="pseudo-element",t.Tag="tag",t.Universal="universal",t.Adjacent="adjacent",t.Child="child",t.Descendant="descendant",t.Parent="parent",t.Sibling="sibling",t.ColumnCombinator="column-combinator"}(r||(r={}));const o={Unknown:null,QuirksMode:"quirks",IgnoreCase:!0,CaseSensitive:!1};var i;!function(t){t.Any="any",t.Element="element",t.End="end",t.Equals="equals",t.Exists="exists",t.Hyphen="hyphen",t.Not="not",t.Start="start"}(i||(i={}));const a=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,s=/\\([\da-f]{1,6}
1\s?|(\s)|.)/gi,l=new Map([[126,i.Element],[94,i.Start],[36,i.End],[42,i.Any],[33,i.Not],[124,i.Hyphen]]),c=new Set(["has","not","matches","is","where","host","host-context"]);function u(t){switch(t.type){case r.Adjacent:case r.Child:case r.Descendant:case r.Parent:case r.Sibling:case r.ColumnCombinator:return!0;default:return!1}}const p=new Set(["contains","icontains"]);function d(t,e,n){const r=parseInt(e,16)-65536;return r!=r||n?e:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)}function f(t){return t.replace(s,d)}function h(t){return 39===t||34===t}function g(t){return 32===t||9===t||10===t||12===t||13===t}function m(t){const e=[],n=v(e,`${t}`,0);if(n<t.length)throw new Error(`Unmatched selector: ${t.slice(n)}`);return e}function v(t,e,n){let o=[];function s(t){const r=e.slice(n+t).match(a);if(!r)throw new Error(`Expected name, found ${e.slice(n)}`);const[o]=r;return n+=t+o.length,f(o)}function d(t){for(n+=t;n<e.length&&g(e.charCodeAt(n));)n++}function m(){const t=n+=1;let r=1;for(;r>0&&n<e.length;n++)40!==e.charCodeAt(n)||y(n)?41!==e.charCodeAt(n)||y(n)||r--:r++;if(r)throw new Error("Parenthesis not matched");return f(e.slice(t,n-1))}function y(t){let n=0;for(;92===e.charCodeAt(--t);)n++;return 1==(1&n)}function b(){if(o.length>0&&u(o[o.length-1]))throw new Error("Did not expect successive traversals.")}function _(t){o.length>0&&o[o.length-1].type===r.Descendant?o[o.length-1].type=t:(b(),o.push({type:t}))}function T(t,e){o.push({type:r.Attribute,name:t,action:e,value:s(1),namespace:null,ignoreCase:"quirks"})}function C(){if(o.length&&o[o.length-1].type===r.Descendant&&o.pop(),0===o.length)throw new Error("Empty sub-selector");t.push(o)}if(d(0),e.length===n)return n;t:for(;n<e.length;){const t=e.charCodeAt(n);switch(t){case 32:case 9:case 10:case 12:case 13:0!==o.length&&o[0].type===r.Descendant||(b(),o.push({type:r.Descendant})),d(1);break;case 62:_(r.Child),d(1);break;case 60:_(r.Parent),d(1);break;case 126:_(r.Sibling),d(1);break;case 43:_(r.Adjacent),d(1);break;case 46:T("class",i.Element);break;case 35:T("id",i.Equals);break;case 91:{let t;d(1);let a=null;124===e.charCodeAt(n)?t=s(1):e.startsWith("*|",n)?(a="*",t=s(2)):(t=s(0),124===e.charCodeAt(n)&&61!==e.charCodeAt(n+1)&&(a=t,t=s(1))),d(0);let c=i.Exists;const u=l.get(e.charCodeAt(n));if(u){if(c=u,61!==e.charCodeAt(n+1))throw new Error("Expected `=`");d(2)}else 61===e.charCodeAt(n)&&(c=i.Equals,d(1));let p="",m=null;if("exists"!==c){if(h(e.charCodeAt(n))){const t=e.charCodeAt(n);let r=n+1;for(;r<e.length&&(e.charCodeAt(r)!==t||y(r));)r+=1;if(e.charCodeAt(r)!==t)throw new Error("Attribute value didn't end");p=f(e.slice(n+1,r)),n=r+1}else{const t=n;for(;n<e.length&&(!g(e.charCodeAt(n))&&93!==e.charCodeAt(n)||y(n));)n+=1;p=f(e.slice(t,n))}d(0);const t=32|e.charCodeAt(n);115===t?(m=!1,d(1)):105===t&&(m=!0,d(1))}if(93!==e.charCodeAt(n))throw new Error("Attribute selector didn't terminate");n+=1;const v={type:r.Attribute,name:t,action:c,value:p,namespace:a,ignoreCase:m};o.push(v);break}case 58:{if(58===e.charCodeAt(n+1)){o.push({type:r.PseudoElement,name:s(2).toLowerCase(),data:40===e.charCodeAt(n)?m():null});continue}const t=s(1).toLowerCase();let i=null;if(40===e.charCodeAt(n))if(c.has(t)){if(h(e.charCodeAt(n+1)))throw new Error(`Pseudo-selector ${t} cannot be quoted`);if(i=[],n=v(i,e,n+1),41!==e.charCodeAt(n))throw new Error(`Missing closing parenthesis in :${t} (${e})`);n+=1}else{if(i=m(),p.has(t)){const t=i.charCodeAt(0);t===i.charCodeAt(i.length-1)&&h(t)&&(i=i.slice(1,-1))}i=f(i)}o.push({type:r.Pseudo,name:t,data:i});break}case 44:C(),o=[],d(1);break;default:{if(e.startsWith("/*",n)){const t=e.indexOf("*/",n+2);if(t<0)throw new Error("Comment was not terminated");n=t+2,0===o.length&&d(0);break}let i,l=null;if(42===t)n+=1,i="*";else if(124===t){if(i="",124===e.charCodeAt(n+1)){_(r.ColumnCombinator),d(2);break}}else{if(!a.test(e.slice(n)))break t;i=s(0)}124===e.charCodeAt(n)&&124!==e.charCodeAt(n+1)&&(l=i,42===e.charCodeAt(n+1)?(i="*",n+=2):i=s(1)),o.push("*"===i?{type:r.Universal,namespace:l}:{type:r.Tag,name:i,namespace:l})}}}return C(),n}const y=["\\",'"'],b=[...y,"(",")"],_=new Set(y.map(t=>t.charCodeAt(0))),T=new Set(b.map(t=>t.charCodeAt(0))),C=new Set([...b,"~","^","$","*","+","!","|",":","[","]"," ","."].map(t=>t.charCodeAt(0)));function w(t){return t.map(t=>t.map(E).join("")).join(", ")}function E(t,e,n){switch(t.type){case r.Child:return 0===e?"> ":" > ";case r.Parent:return 0===e?"< ":" < ";case r.Sibling:return 0===e?"~ ":" ~ ";
1case r.Adjacent:return 0===e?"+ ":" + ";case r.Descendant:return" ";case r.ColumnCombinator:return 0===e?"|| ":" || ";case r.Universal:return"*"===t.namespace&&e+1<n.length&&"name"in n[e+1]?"":`${x(t.namespace)}*`;case r.Tag:return S(t);case r.PseudoElement:return`::${O(t.name,C)}${null===t.data?"":`(${O(t.data,T)})`}`;case r.Pseudo:return`:${O(t.name,C)}${null===t.data?"":`(${"string"==typeof t.data?O(t.data,T):w(t.data)})`}`;case r.Attribute:{if("id"===t.name&&t.action===i.Equals&&"quirks"===t.ignoreCase&&!t.namespace)return`#${O(t.value,C)}`;if("class"===t.name&&t.action===i.Element&&"quirks"===t.ignoreCase&&!t.namespace)return`.${O(t.value,C)}`;const e=S(t);return t.action===i.Exists?`[${e}]`:`[${e}${function(t){switch(t){case i.Equals:return"";case i.Element:return"~";case i.Start:return"^";case i.End:return"$";case i.Any:return"*";case i.Not:return"!";case i.Hyphen:return"|";case i.Exists:throw new Error("Shouldn't be here")}}(t.action)}="${O(t.value,_)}"${null===t.ignoreCase?"":t.ignoreCase?" i":" s"}]`}}}function S(t){return`${x(t.namespace)}${O(t.name,C)}`}function x(t){return null!==t?`${"*"===t?"*":O(t,C)}|`:""}function O(t,e){let n=0,r="";for(let o=0;o<t.length;o++)e.has(t.charCodeAt(o))&&(r+=`${t.slice(n,o)}\\${t.charAt(o)}`,n=o+1);return r.length>0?r+t.slice(n):t}},7837:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.attributeNames=e.elementNames=void 0,e.elementNames=new Map([["altglyph","altGlyph"],["altglyphdef","altGlyphDef"],["altglyphitem","altGlyphItem"],["animatecolor","animateColor"],["animatemotion","animateMotion"],["animatetransform","animateTransform"],["clippath","clipPath"],["feblend","feBlend"],["fecolormatrix","feColorMatrix"],["fecomponenttransfer","feComponentTransfer"],["fecomposite","feComposite"],["feconvolvematrix","feConvolveMatrix"],["fediffuselighting","feDiffuseLighting"],["fedisplacementmap","feDisplacementMap"],["fedistantlight","feDistantLight"],["fedropshadow","feDropShadow"],["feflood","feFlood"],["fefunca","feFuncA"],["fefuncb","feFuncB"],["fefuncg","feFuncG"],["fefuncr","feFuncR"],["fegaussianblur","feGaussianBlur"],["feimage","feImage"],["femerge","feMerge"],["femergenode","feMergeNode"],["femorphology","feMorphology"],["feoffset","feOffset"],["fepointlight","fePointLight"],["fespecularlighting","feSpecularLighting"],["fespotlight","feSpotLight"],["fetile","feTile"],["feturbulence","feTurbulence"],["foreignobject","foreignObject"],["glyphref","glyphRef"],["lineargradient","linearGradient"],["radialgradient","radialGradient"],["textpath","textPath"]]),e.attributeNames=new Map([["definitionurl","definitionURL"],["attributename","attributeName"],["attributetype","attributeType"],["basefrequency","baseFrequency"],["baseprofile","baseProfile"],["calcmode","calcMode"],["clippathunits","clipPathUnits"],["diffuseconstant","diffuseConstant"],["edgemode","edgeMode"],["filterunits","filterUnits"],["glyphref","glyphRef"],["gradienttransform","gradientTransform"],["gradientunits","gradientUnits"],["kernelmatrix","kernelMatrix"],["kernelunitlength","kernelUnitLength"],["keypoints","keyPoints"],["keysplines","keySplines"],["keytimes","keyTimes"],["lengthadjust","lengthAdjust"],["limitingconeangle","limitingConeAngle"],["markerheight","markerHeight"],["markerunits","markerUnits"],["markerwidth","markerWidth"],["maskcontentunits","maskContentUnits"],["maskunits","maskUnits"],["numoctaves","numOctaves"],["pathlength","pathLength"],["patterncontentunits","patternContentUnits"],["patterntransform","patternTransform"],["patternunits","patternUnits"],["pointsatx","pointsAtX"],["pointsaty","pointsAtY"],["pointsatz","pointsAtZ"],["preservealpha","preserveAlpha"],["preserveaspectratio","preserveAspectRatio"],["primitiveunits","primitiveUnits"],["refx","refX"],["refy","refY"],["repeatcount","repeatCount"],["repeatdur","repeatDur"],["requiredextensions","requiredExtensions"],["requiredfeatures","requiredFeatures"],["specularconstant","specularConstant"],["specularexponent","specularExponent"],["spreadmethod","spreadMethod"],["startoffset","startOffset"],["stddeviation","stdDeviation"],["stitchtiles","stitchTiles"],["surfacescale","surfaceScale"],["systemlanguage","systemLanguage"],["tablevalues","tableValues"],["targetx","targetX"],["targety","targetY"],["textlength","textLength"],["viewbox","viewBox"],["viewtarget","viewTarget"],["xchannelselector","xChannelSelector"],["ychannelselector","yChannelSelector"],["zoomandpan","zoomAndPan"]])},7220:function(t,e,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return i(e,t),e};
1Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(9960)),l=n(5863),c=n(7837),u=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]),p=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function d(t,e){void 0===e&&(e={});for(var n=("length"in t?t:[t]),r="",o=0;o<n.length;o++)r+=f(n[o],e);return r}function f(t,e){switch(t.type){case s.Root:return d(t.children,e);case s.Directive:case s.Doctype:return"<"+t.data+">";case s.Comment:return function(t){return"\x3c!--"+t.data+"--\x3e"}(t);case s.CDATA:return function(t){return"<![CDATA["+t.children[0].data+"]]>"}(t);case s.Script:case s.Style:case s.Tag:return function(t,e){var n;"foreign"===e.xmlMode&&(t.name=null!==(n=c.elementNames.get(t.name))&&void 0!==n?n:t.name,t.parent&&h.has(t.parent.name)&&(e=r(r({},e),{xmlMode:!1}))),!e.xmlMode&&g.has(t.name)&&(e=r(r({},e),{xmlMode:"foreign"}));var o="<"+t.name,i=function(t,e){if(t)return Object.keys(t).map(function(n){var r,o,i=null!==(r=t[n])&&void 0!==r?r:"";return"foreign"===e.xmlMode&&(n=null!==(o=c.attributeNames.get(n))&&void 0!==o?o:n),e.emptyAttrs||e.xmlMode||""!==i?n+'="'+(!1!==e.decodeEntities?l.encodeXML(i):i.replace(/"/g,"""))+'"':n}).join(" ")}(t.attribs,e);return i&&(o+=" "+i),0===t.children.length&&(e.xmlMode?!1!==e.selfClosingTags:e.selfClosingTags&&p.has(t.name))?(e.xmlMode||(o+=" "),o+="/>"):(o+=">",t.children.length>0&&(o+=d(t.children,e)),!e.xmlMode&&p.has(t.name)||(o+="</"+t.name+">")),o}(t,e);case s.Text:return function(t,e){var n=t.data||"";return!1===e.decodeEntities||!e.xmlMode&&t.parent&&u.has(t.parent.name)||(n=l.encodeXML(n)),n}(t,e)}}e.default=d;var h=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),g=new Set(["svg","math"])},9960:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.Doctype=e.CDATA=e.Tag=e.Style=e.Script=e.Comment=e.Directive=e.Text=e.Root=e.isTag=e.ElementType=void 0,function(t){t.Root="root",t.Text="text",t.Directive="directive",t.Comment="comment",t.Script="script",t.Style="style",t.Tag="tag",t.CDATA="cdata",t.Doctype="doctype"}(n=e.ElementType||(e.ElementType={})),e.isTag=function(t){return t.type===n.Tag||t.type===n.Script||t.type===n.Style},e.Root=n.Root,e.Text=n.Text,e.Directive=n.Directive,e.Comment=n.Comment,e.Script=n.Script,e.Style=n.Style,e.Tag=n.Tag,e.CDATA=n.CDATA,e.Doctype=n.Doctype},7915:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.DomHandler=void 0;var i=n(9960),a=n(7790);o(n(7790),e);var s=/\s+/g,l={normalizeWhitespace:!1,withStartIndices:!1,withEndIndices:!1,xmlMode:!1},c=function(){function t(t,e,n){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof e&&(n=e,e=l),"object"==typeof t&&(e=t,t=void 0),this.callback=null!=t?t:null,this.options=null!=e?e:l,this.elementCB=null!=n?n:null}return t.prototype.onparserinit=function(t){this.parser=t},t.prototype.onreset=function(){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},t.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},t.prototype.onerror=function(t){this.handleCallback(t)},t.prototype.onclosetag=function(){this.lastNode=null;var t=this.tagStack.pop();this.options.withEndIndices&&(t.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(t)},t.prototype.onopentag=function(t,e){var n=this.options.xmlMode?i.ElementType.Tag:void 0,r=new a.Element(t,e,void 0,n);this.addNode(r),this.tagStack.push(r)},t.prototype.ontext=function(t){var e=this.options.normalizeWhitespace,n=this.lastNode;if(n&&n.type===i.ElementType.Text)e?n.data=(n.data+t).replace(s," "):n.data+=t,this.options.withEndIndices&&(n.endIndex=this.parser.endIndex);else{e&&(t=t.replace(s," "));var r=new a.Text(t);this.addNode(r),this.lastNode=r}},t.prototype.oncomment=function(t){if(this.lastNode&&this.lastNode.type===i.ElementType.Comment)this.lastNode.data+=t;else{var e=new a.Comment(t);this.addNode(e),this.lastNode=e}},t.prototype.oncommentend=function(){this.lastNode=null},t.prototype.oncdatastart=function(){var t=new a.Text(""),e=new a.NodeWithChildren(i.ElementType.CDATA,[t]);this.addNode(e),t.parent=e,this.lastNode=t}
1,t.prototype.oncdataend=function(){this.lastNode=null},t.prototype.onprocessinginstruction=function(t,e){var n=new a.ProcessingInstruction(t,e);this.addNode(n)},t.prototype.handleCallback=function(t){if("function"==typeof this.callback)this.callback(t,this.dom);else if(t)throw t},t.prototype.addNode=function(t){var e=this.tagStack[this.tagStack.length-1],n=e.children[e.children.length-1];this.options.withStartIndices&&(t.startIndex=this.parser.startIndex),this.options.withEndIndices&&(t.endIndex=this.parser.endIndex),e.children.push(t),n&&(t.prev=n,n.next=t),t.parent=e,this.lastNode=null},t}();e.DomHandler=c,e.default=c},7790:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},i.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.cloneNode=e.hasChildren=e.isDocument=e.isDirective=e.isComment=e.isText=e.isCDATA=e.isTag=e.Element=e.Document=e.NodeWithChildren=e.ProcessingInstruction=e.Comment=e.Text=e.DataNode=e.Node=void 0;var a=n(9960),s=new Map([[a.ElementType.Tag,1],[a.ElementType.Script,1],[a.ElementType.Style,1],[a.ElementType.Directive,1],[a.ElementType.Text,3],[a.ElementType.CDATA,4],[a.ElementType.Comment,8],[a.ElementType.Root,9]]),l=function(){function t(t){this.type=t,this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(t.prototype,"nodeType",{get:function(){var t;return null!==(t=s.get(this.type))&&void 0!==t?t:1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.parent},set:function(t){this.parent=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previousSibling",{get:function(){return this.prev},set:function(t){this.prev=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nextSibling",{get:function(){return this.next},set:function(t){this.next=t},enumerable:!1,configurable:!0}),t.prototype.cloneNode=function(t){return void 0===t&&(t=!1),C(this,t)},t}();e.Node=l;var c=function(t){function e(e,n){var r=t.call(this,e)||this;return r.data=n,r}return o(e,t),Object.defineProperty(e.prototype,"nodeValue",{get:function(){return this.data},set:function(t){this.data=t},enumerable:!1,configurable:!0}),e}(l);e.DataNode=c;var u=function(t){function e(e){return t.call(this,a.ElementType.Text,e)||this}return o(e,t),e}(c);e.Text=u;var p=function(t){function e(e){return t.call(this,a.ElementType.Comment,e)||this}return o(e,t),e}(c);e.Comment=p;var d=function(t){function e(e,n){var r=t.call(this,a.ElementType.Directive,n)||this;return r.name=e,r}return o(e,t),e}(c);e.ProcessingInstruction=d;var f=function(t){function e(e,n){var r=t.call(this,e)||this;return r.children=n,r}return o(e,t),Object.defineProperty(e.prototype,"firstChild",{get:function(){var t;return null!==(t=this.children[0])&&void 0!==t?t:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"childNodes",{get:function(){return this.children},set:function(t){this.children=t},enumerable:!1,configurable:!0}),e}(l);e.NodeWithChildren=f;var h=function(t){function e(e){return t.call(this,a.ElementType.Root,e)||this}return o(e,t),e}(f);e.Document=h;var g=function(t){function e(e,n,r,o){void 0===r&&(r=[]),void 0===o&&(o="script"===e?a.ElementType.Script:"style"===e?a.ElementType.Style:a.ElementType.Tag);var i=t.call(this,o,r)||this;return i.name=e,i.attribs=n,i}return o(e,t),Object.defineProperty(e.prototype,"tagName",{get:function(){return this.name},set:function(t){this.name=t}
1,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"attributes",{get:function(){var t=this;return Object.keys(this.attribs).map(function(e){var n,r;return{name:e,value:t.attribs[e],namespace:null===(n=t["x-attribsNamespace"])||void 0===n?void 0:n[e],prefix:null===(r=t["x-attribsPrefix"])||void 0===r?void 0:r[e]}})},enumerable:!1,configurable:!0}),e}(f);function m(t){return(0,a.isTag)(t)}function v(t){return t.type===a.ElementType.CDATA}function y(t){return t.type===a.ElementType.Text}function b(t){return t.type===a.ElementType.Comment}function _(t){return t.type===a.ElementType.Directive}function T(t){return t.type===a.ElementType.Root}function C(t,e){var n;if(void 0===e&&(e=!1),y(t))n=new u(t.data);else if(b(t))n=new p(t.data);else if(m(t)){var r=e?w(t.children):[],o=new g(t.name,i({},t.attribs),r);r.forEach(function(t){return t.parent=o}),null!=t.namespace&&(o.namespace=t.namespace),t["x-attribsNamespace"]&&(o["x-attribsNamespace"]=i({},t["x-attribsNamespace"])),t["x-attribsPrefix"]&&(o["x-attribsPrefix"]=i({},t["x-attribsPrefix"])),n=o}else if(v(t)){r=e?w(t.children):[];var s=new f(a.ElementType.CDATA,r);r.forEach(function(t){return t.parent=s}),n=s}else if(T(t)){r=e?w(t.children):[];var l=new h(r);r.forEach(function(t){return t.parent=l}),t["x-mode"]&&(l["x-mode"]=t["x-mode"]),n=l}else{if(!_(t))throw new Error("Not implemented yet: ".concat(t.type));var c=new d(t.name,t.data);null!=t["x-name"]&&(c["x-name"]=t["x-name"],c["x-publicId"]=t["x-publicId"],c["x-systemId"]=t["x-systemId"]),n=c}return n.startIndex=t.startIndex,n.endIndex=t.endIndex,null!=t.sourceCodeLocation&&(n.sourceCodeLocation=t.sourceCodeLocation),n}function w(t){for(var e=t.map(function(t){return C(t,!0)}),n=1;n<e.length;n++)e[n].prev=e[n-1],e[n-1].next=e[n];return e}e.Element=g,e.isTag=m,e.isCDATA=v,e.isText=y,e.isComment=b,e.isDirective=_,e.isDocument=T,e.hasChildren=function(t){return Object.prototype.hasOwnProperty.call(t,"children")},e.cloneNode=C},6996:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getFeed=void 0;var r=n(3346),o=n(3905);e.getFeed=function(t){var e=l(p,t);return e?"feed"===e.name?function(t){var e,n=t.children,r={type:"atom",items:(0,o.getElementsByTagName)("entry",n).map(function(t){var e,n=t.children,r={media:s(n)};u(r,"id","id",n),u(r,"title","title",n);var o=null===(e=l("link",n))||void 0===e?void 0:e.attribs.href;o&&(r.link=o);var i=c("summary",n)||c("content",n);i&&(r.description=i);var a=c("updated",n);return a&&(r.pubDate=new Date(a)),r})};u(r,"id","id",n),u(r,"title","title",n);var i=null===(e=l("link",n))||void 0===e?void 0:e.attribs.href;i&&(r.link=i),u(r,"description","subtitle",n);var a=c("updated",n);return a&&(r.updated=new Date(a)),u(r,"author","email",n,!0),r}(e):function(t){var e,n,r=null!==(n=null===(e=l("channel",t.children))||void 0===e?void 0:e.children)&&void 0!==n?n:[],i={type:t.name.substr(0,3),id:"",items:(0,o.getElementsByTagName)("item",t.children).map(function(t){var e=t.children,n={media:s(e)};u(n,"id","guid",e),u(n,"title","title",e),u(n,"link","link",e),u(n,"description","description",e);var r=c("pubDate",e);return r&&(n.pubDate=new Date(r)),n})};u(i,"title","title",r),u(i,"link","link",r),u(i,"description","description",r);var a=c("lastBuildDate",r);return a&&(i.updated=new Date(a)),u(i,"author","managingEditor",r,!0),i}(e):null};var i=["url","type","lang"],a=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function s(t){return(0,o.getElementsByTagName)("media:content",t).map(function(t){for(var e=t.attribs,n={medium:e.medium,isDefault:!!e.isDefault},r=0,o=i;r<o.length;r++)e[c=o[r]]&&(n[c]=e[c]);for(var s=0,l=a;s<l.length;s++){var c;e[c=l[s]]&&(n[c]=parseInt(e[c],10))}return e.expression&&(n.expression=e.expression),n})}function l(t,e){return(0,o.getElementsByTagName)(t,e,!0,1)[0]}function c(t,e,n){return void 0===n&&(n=!1),(0,r.textContent)((0,o.getElementsByTagName)(t,e,n,1)).trim()}function u(t,e,n,r,o){void 0===o&&(o=!1);var i=c(n,r,o);i&&(t[e]=i)}function p(t){return"rss"===t||"feed"===t||"rdf:RDF"===t}},4975:(t,e,n)=>{"use strict";
1Object.defineProperty(e,"__esModule",{value:!0}),e.uniqueSort=e.compareDocumentPosition=e.removeSubsets=void 0;var r=n(7915);function o(t,e){var n=[],o=[];if(t===e)return 0;for(var i=(0,r.hasChildren)(t)?t:t.parent;i;)n.unshift(i),i=i.parent;for(i=(0,r.hasChildren)(e)?e:e.parent;i;)o.unshift(i),i=i.parent;for(var a=Math.min(n.length,o.length),s=0;s<a&&n[s]===o[s];)s++;if(0===s)return 1;var l=n[s-1],c=l.children,u=n[s],p=o[s];return c.indexOf(u)>c.indexOf(p)?l===e?20:4:l===t?10:2}e.removeSubsets=function(t){for(var e=t.length;--e>=0;){var n=t[e];if(e>0&&t.lastIndexOf(n,e-1)>=0)t.splice(e,1);else for(var r=n.parent;r;r=r.parent)if(t.includes(r)){t.splice(e,1);break}}return t},e.compareDocumentPosition=o,e.uniqueSort=function(t){return(t=t.filter(function(t,e,n){return!n.includes(t,e+1)})).sort(function(t,e){var n=o(t,e);return 2&n?-1:4&n?1:0}),t}},9432:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.hasChildren=e.isDocument=e.isComment=e.isText=e.isCDATA=e.isTag=void 0,o(n(3346),e),o(n(5010),e),o(n(6765),e),o(n(8043),e),o(n(3905),e),o(n(4975),e),o(n(6996),e);var i=n(7915);Object.defineProperty(e,"isTag",{enumerable:!0,get:function(){return i.isTag}}),Object.defineProperty(e,"isCDATA",{enumerable:!0,get:function(){return i.isCDATA}}),Object.defineProperty(e,"isText",{enumerable:!0,get:function(){return i.isText}}),Object.defineProperty(e,"isComment",{enumerable:!0,get:function(){return i.isComment}}),Object.defineProperty(e,"isDocument",{enumerable:!0,get:function(){return i.isDocument}}),Object.defineProperty(e,"hasChildren",{enumerable:!0,get:function(){return i.hasChildren}})},3905:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getElementsByTagType=e.getElementsByTagName=e.getElementById=e.getElements=e.testElement=void 0;var r=n(7915),o=n(8043),i={tag_name:function(t){return"function"==typeof t?function(e){return(0,r.isTag)(e)&&t(e.name)}:"*"===t?r.isTag:function(e){return(0,r.isTag)(e)&&e.name===t}},tag_type:function(t){return"function"==typeof t?function(e){return t(e.type)}:function(e){return e.type===t}},tag_contains:function(t){return"function"==typeof t?function(e){return(0,r.isText)(e)&&t(e.data)}:function(e){return(0,r.isText)(e)&&e.data===t}}};function a(t,e){return"function"==typeof e?function(n){return(0,r.isTag)(n)&&e(n.attribs[t])}:function(n){return(0,r.isTag)(n)&&n.attribs[t]===e}}function s(t,e){return function(n){return t(n)||e(n)}}function l(t){var e=Object.keys(t).map(function(e){var n=t[e];return Object.prototype.hasOwnProperty.call(i,e)?i[e](n):a(e,n)});return 0===e.length?null:e.reduce(s)}e.testElement=function(t,e){var n=l(t);return!n||n(e)},e.getElements=function(t,e,n,r){void 0===r&&(r=1/0);var i=l(t);return i?(0,o.filter)(i,e,n,r):[]},e.getElementById=function(t,e,n){return void 0===n&&(n=!0),Array.isArray(e)||(e=[e]),(0,o.findOne)(a("id",t),e,n)},e.getElementsByTagName=function(t,e,n,r){return void 0===n&&(n=!0),void 0===r&&(r=1/0),(0,o.filter)(i.tag_name(t),e,n,r)},e.getElementsByTagType=function(t,e,n,r){return void 0===n&&(n=!0),void 0===r&&(r=1/0),(0,o.filter)(i.tag_type(t),e,n,r)}},6765:(t,e)=>{"use strict";function n(t){if(t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t.parent){var e=t.parent.children;e.splice(e.lastIndexOf(t),1)}}Object.defineProperty(e,"__esModule",{value:!0}),e.prepend=e.prependChild=e.append=e.appendChild=e.replaceElement=e.removeElement=void 0,e.removeElement=n,e.replaceElement=function(t,e){var n=e.prev=t.prev;n&&(n.next=e);var r=e.next=t.next;r&&(r.prev=e);var o=e.parent=t.parent;if(o){var i=o.children;i[i.lastIndexOf(t)]=e}},e.appendChild=function(t,e){if(n(e),e.next=null,e.parent=t,t.children.push(e)>1){var r=t.children[t.children.length-2];r.next=e,e.prev=r}else e.prev=null},e.append=function(t,e){n(e);var r=t.parent,o=t.next;if(e.next=o,e.prev=t,t.next=e,e.parent=r,o){if(o.prev=e,r){var i=r.children;i.splice(i.lastIndexOf(o),0,e)}}else r&&r.children.push(e)},e.prependChild=function(t,e){if(n(e),e.parent=t,e.prev=null,1!==t.children.unshift(e)){var r=t.children[1];r.prev=e,e.next=r}else e.next=null},e.prepend=function(t,e){n(e);var r=t.parent;if(r){var o=r.children;o.splice(o.indexOf(t),0,e)}
1t.prev&&(t.prev.next=e),e.parent=r,e.prev=t.prev,e.next=t,t.prev=e}},8043:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.findAll=e.existsOne=e.findOne=e.findOneChild=e.find=e.filter=void 0;var r=n(7915);function o(t,e,n,i){for(var a=[],s=0,l=e;s<l.length;s++){var c=l[s];if(t(c)&&(a.push(c),--i<=0))break;if(n&&(0,r.hasChildren)(c)&&c.children.length>0){var u=o(t,c.children,n,i);if(a.push.apply(a,u),(i-=u.length)<=0)break}}return a}e.filter=function(t,e,n,r){return void 0===n&&(n=!0),void 0===r&&(r=1/0),Array.isArray(e)||(e=[e]),o(t,e,n,r)},e.find=o,e.findOneChild=function(t,e){return e.find(t)},e.findOne=function t(e,n,o){void 0===o&&(o=!0);for(var i=null,a=0;a<n.length&&!i;a++){var s=n[a];(0,r.isTag)(s)&&(e(s)?i=s:o&&s.children.length>0&&(i=t(e,s.children)))}return i},e.existsOne=function t(e,n){return n.some(function(n){return(0,r.isTag)(n)&&(e(n)||n.children.length>0&&t(e,n.children))})},e.findAll=function(t,e){for(var n,o,i=[],a=e.filter(r.isTag);o=a.shift();){var s=null===(n=o.children)||void 0===n?void 0:n.filter(r.isTag);s&&s.length>0&&a.unshift.apply(a,s),t(o)&&i.push(o)}return i}},3346:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.innerText=e.textContent=e.getText=e.getInnerHTML=e.getOuterHTML=void 0;var o=n(7915),i=r(n(7220)),a=n(9960);function s(t,e){return(0,i.default)(t,e)}e.getOuterHTML=s,e.getInnerHTML=function(t,e){return(0,o.hasChildren)(t)?t.children.map(function(t){return s(t,e)}).join(""):""},e.getText=function t(e){return Array.isArray(e)?e.map(t).join(""):(0,o.isTag)(e)?"br"===e.name?"\n":t(e.children):(0,o.isCDATA)(e)?t(e.children):(0,o.isText)(e)?e.data:""},e.textContent=function t(e){return Array.isArray(e)?e.map(t).join(""):(0,o.hasChildren)(e)&&!(0,o.isComment)(e)?t(e.children):(0,o.isText)(e)?e.data:""},e.innerText=function t(e){return Array.isArray(e)?e.map(t).join(""):(0,o.hasChildren)(e)&&(e.type===a.ElementType.Tag||(0,o.isCDATA)(e))?t(e.children):(0,o.isText)(e)?e.data:""}},5010:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.prevElementSibling=e.nextElementSibling=e.getName=e.hasAttrib=e.getAttributeValue=e.getSiblings=e.getParent=e.getChildren=void 0;var r=n(7915),o=[];function i(t){var e;return null!==(e=t.children)&&void 0!==e?e:o}function a(t){return t.parent||null}e.getChildren=i,e.getParent=a,e.getSiblings=function(t){var e=a(t);if(null!=e)return i(e);for(var n=[t],r=t.prev,o=t.next;null!=r;)n.unshift(r),r=r.prev;for(;null!=o;)n.push(o),o=o.next;return n},e.getAttributeValue=function(t,e){var n;return null===(n=t.attribs)||void 0===n?void 0:n[e]},e.hasAttrib=function(t,e){return null!=t.attribs&&Object.prototype.hasOwnProperty.call(t.attribs,e)&&null!=t.attribs[e]},e.getName=function(t){return t.name},e.nextElementSibling=function(t){for(var e=t.next;null!==e&&!(0,r.isTag)(e);)e=e.next;return e},e.prevElementSibling=function(t){for(var e=t.prev;null!==e&&!(0,r.isTag)(e);)e=e.prev;return e}},4076:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.decodeHTML=e.decodeHTMLStrict=e.decodeXML=void 0;var o=r(n(9323)),i=r(n(9591)),a=r(n(2586)),s=r(n(26)),l=/&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g;function c(t){var e=p(t);return function(t){return String(t).replace(l,e)}}e.decodeXML=c(a.default),e.decodeHTMLStrict=c(o.default);var u=function(t,e){return t<e?1:-1};function p(t){return function(e){if("#"===e.charAt(1)){var n=e.charAt(2);return"X"===n||"x"===n?s.default(parseInt(e.substr(3),16)):s.default(parseInt(e.substr(2),10))}return t[e.slice(1,-1)]||e}}e.decodeHTML=function(){for(var t=Object.keys(i.default).sort(u),e=Object.keys(o.default).sort(u),n=0,r=0;n<e.length;n++)t[r]===e[n]?(e[n]+=";?",r++):e[n]+=";";var a=new RegExp("&(?:"+e.join("|")+"|#[xX][\\da-fA-F]+;?|#\\d+;?)","g"),s=p(o.default);function l(t){return";"!==t.substr(-1)&&(t+=";"),s(t)}return function(t){return String(t).replace(a,l)}}()},26:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};
1Object.defineProperty(e,"__esModule",{value:!0});var o=r(n(3600)),i=String.fromCodePoint||function(t){var e="";return t>65535&&(t-=65536,e+=String.fromCharCode(t>>>10&1023|55296),t=56320|1023&t),e+String.fromCharCode(t)};e.default=function(t){return t>=55296&&t<=57343||t>1114111?"\ufffd":(t in o.default&&(t=o.default[t]),i(t))}},7322:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.escapeUTF8=e.escape=e.encodeNonAsciiHTML=e.encodeHTML=e.encodeXML=void 0;var o=u(r(n(2586)).default),i=p(o);e.encodeXML=m(o);var a,s,l=u(r(n(9323)).default),c=p(l);function u(t){return Object.keys(t).sort().reduce(function(e,n){return e[t[n]]="&"+n+";",e},{})}function p(t){for(var e=[],n=[],r=0,o=Object.keys(t);r<o.length;r++){var i=o[r];1===i.length?e.push("\\"+i):n.push(i)}e.sort();for(var a=0;a<e.length-1;a++){for(var s=a;s<e.length-1&&e[s].charCodeAt(1)+1===e[s+1].charCodeAt(1);)s+=1;var l=1+s-a;l<3||e.splice(a,l,e[a]+"-"+e[s])}return n.unshift("["+e.join("")+"]"),new RegExp(n.join("|"),"g")}e.encodeHTML=(a=l,s=c,function(t){return t.replace(s,function(t){return a[t]}).replace(d,h)}),e.encodeNonAsciiHTML=m(l);var d=/(?:[\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g,f=null!=String.prototype.codePointAt?function(t){return t.codePointAt(0)}:function(t){return 1024*(t.charCodeAt(0)-55296)+t.charCodeAt(1)-56320+65536};function h(t){return"&#x"+(t.length>1?f(t):t.charCodeAt(0)).toString(16).toUpperCase()+";"}var g=new RegExp(i.source+"|"+d.source,"g");function m(t){return function(e){return e.replace(g,function(e){return t[e]||h(e)})}}e.escape=function(t){return t.replace(g,h)},e.escapeUTF8=function(t){return t.replace(i,h)}},5863:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decodeXMLStrict=e.decodeHTML5Strict=e.decodeHTML4Strict=e.decodeHTML5=e.decodeHTML4=e.decodeHTMLStrict=e.decodeHTML=e.decodeXML=e.encodeHTML5=e.encodeHTML4=e.escapeUTF8=e.escape=e.encodeNonAsciiHTML=e.encodeHTML=e.encodeXML=e.encode=e.decodeStrict=e.decode=void 0;var r=n(4076),o=n(7322);e.decode=function(t,e){return(!e||e<=0?r.decodeXML:r.decodeHTML)(t)},e.decodeStrict=function(t,e){return(!e||e<=0?r.decodeXML:r.decodeHTMLStrict)(t)},e.encode=function(t,e){return(!e||e<=0?o.encodeXML:o.encodeHTML)(t)};var i=n(7322);Object.defineProperty(e,"encodeXML",{enumerable:!0,get:function(){return i.encodeXML}}),Object.defineProperty(e,"encodeHTML",{enumerable:!0,get:function(){return i.encodeHTML}}),Object.defineProperty(e,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return i.encodeNonAsciiHTML}}),Object.defineProperty(e,"escape",{enumerable:!0,get:function(){return i.escape}}),Object.defineProperty(e,"escapeUTF8",{enumerable:!0,get:function(){return i.escapeUTF8}}),Object.defineProperty(e,"encodeHTML4",{enumerable:!0,get:function(){return i.encodeHTML}}),Object.defineProperty(e,"encodeHTML5",{enumerable:!0,get:function(){return i.encodeHTML}});var a=n(4076);Object.defineProperty(e,"decodeXML",{enumerable:!0,get:function(){return a.decodeXML}}),Object.defineProperty(e,"decodeHTML",{enumerable:!0,get:function(){return a.decodeHTML}}),Object.defineProperty(e,"decodeHTMLStrict",{enumerable:!0,get:function(){return a.decodeHTMLStrict}}),Object.defineProperty(e,"decodeHTML4",{enumerable:!0,get:function(){return a.decodeHTML}}),Object.defineProperty(e,"decodeHTML5",{enumerable:!0,get:function(){return a.decodeHTML}}),Object.defineProperty(e,"decodeHTML4Strict",{enumerable:!0,get:function(){return a.decodeHTMLStrict}}),Object.defineProperty(e,"decodeHTML5Strict",{enumerable:!0,get:function(){return a.decodeHTMLStrict}}),Object.defineProperty(e,"decodeXMLStrict",{enumerable:!0,get:function(){return a.decodeXML}})},3870:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),a=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),s=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&i(e,t,n
1);return a(e,t),e},l=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.parseFeed=e.FeedHandler=void 0;var c,u,p=l(n(7915)),d=s(n(9432)),f=n(763);!function(t){t[t.image=0]="image",t[t.audio=1]="audio",t[t.video=2]="video",t[t.document=3]="document",t[t.executable=4]="executable"}(c||(c={})),function(t){t[t.sample=0]="sample",t[t.full=1]="full",t[t.nonstop=2]="nonstop"}(u||(u={}));var h=function(t){function e(e,n){return"object"==typeof e&&(n=e=void 0),t.call(this,e,n)||this}return o(e,t),e.prototype.onend=function(){var t,e,n=v(T,this.dom);if(n){var r={};if("feed"===n.name){var o=n.children;r.type="atom",_(r,"id","id",o),_(r,"title","title",o);var i=b("href",v("link",o));i&&(r.link=i),_(r,"description","subtitle",o),(a=y("updated",o))&&(r.updated=new Date(a)),_(r,"author","email",o,!0),r.items=m("entry",o).map(function(t){var e={},n=t.children;_(e,"id","id",n),_(e,"title","title",n);var r=b("href",v("link",n));r&&(e.link=r);var o=y("summary",n)||y("content",n);o&&(e.description=o);var i=y("updated",n);return i&&(e.pubDate=new Date(i)),e.media=g(n),e})}else{var a;o=null!==(e=null===(t=v("channel",n.children))||void 0===t?void 0:t.children)&&void 0!==e?e:[],r.type=n.name.substr(0,3),r.id="",_(r,"title","title",o),_(r,"link","link",o),_(r,"description","description",o),(a=y("lastBuildDate",o))&&(r.updated=new Date(a)),_(r,"author","managingEditor",o,!0),r.items=m("item",n.children).map(function(t){var e={},n=t.children;_(e,"id","guid",n),_(e,"title","title",n),_(e,"link","link",n),_(e,"description","description",n);var r=y("pubDate",n);return r&&(e.pubDate=new Date(r)),e.media=g(n),e})}this.feed=r,this.handleCallback(null)}else this.handleCallback(new Error("couldn't find root of feed"))},e}(p.default);function g(t){return m("media:content",t).map(function(t){var e={medium:t.attribs.medium,isDefault:!!t.attribs.isDefault};return t.attribs.url&&(e.url=t.attribs.url),t.attribs.fileSize&&(e.fileSize=parseInt(t.attribs.fileSize,10)),t.attribs.type&&(e.type=t.attribs.type),t.attribs.expression&&(e.expression=t.attribs.expression),t.attribs.bitrate&&(e.bitrate=parseInt(t.attribs.bitrate,10)),t.attribs.framerate&&(e.framerate=parseInt(t.attribs.framerate,10)),t.attribs.samplingrate&&(e.samplingrate=parseInt(t.attribs.samplingrate,10)),t.attribs.channels&&(e.channels=parseInt(t.attribs.channels,10)),t.attribs.duration&&(e.duration=parseInt(t.attribs.duration,10)),t.attribs.height&&(e.height=parseInt(t.attribs.height,10)),t.attribs.width&&(e.width=parseInt(t.attribs.width,10)),t.attribs.lang&&(e.lang=t.attribs.lang),e})}function m(t,e){return d.getElementsByTagName(t,e,!0)}function v(t,e){return d.getElementsByTagName(t,e,!0,1)[0]}function y(t,e,n){return void 0===n&&(n=!1),d.getText(d.getElementsByTagName(t,e,n,1)).trim()}function b(t,e){return e?e.attribs[t]:null}function _(t,e,n,r,o){void 0===o&&(o=!1);var i=y(n,r,o);i&&(t[e]=i)}function T(t){return"rss"===t||"feed"===t||"rdf:RDF"===t}e.FeedHandler=h,e.parseFeed=function(t,e){void 0===e&&(e={xmlMode:!0});var n=new h(e);return new f.Parser(n,e).end(t),n.feed}},763:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Parser=void 0;var o=r(n(9889)),i=new Set(["input","option","optgroup","select","button","datalist","textarea"]),a=new Set(["p"]),s={tr:new Set(["tr","th","td"]),th:new Set(["th"]),td:new Set(["thead","th","td"]),body:new Set(["head","link","script"]),li:new Set(["li"]),p:a,h1:a,h2:a,h3:a,h4:a,h5:a,h6:a,select:i,input:i,output:i,button:i,datalist:i,textarea:i,option:new Set(["option"]),optgroup:new Set(["optgroup","option"]),dd:new Set(["dt","dd"]),dt:new Set(["dt","dd"]),address:a,article:a,aside:a,blockquote:a,details:a,div:a,dl:a,fieldset:a,figcaption:a,figure:a,footer:a,form:a,header:a,hr:a,main:a,nav:a,ol:a,pre:a,section:a,table:a,ul:a,rt:new Set(["rt","rp"]),rp:new Set(["rt","rp"]),tbody:new Set(["thead","tbody"]),tfoot:new Set(["thead","tbody"])},l=new Set(["area","base","basefont","br","col","command","embed","frame","hr","
1img","input","isindex","keygen","link","meta","param","source","track","wbr"]),c=new Set(["math","svg"]),u=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),p=/\s|\//,d=function(){function t(t,e){var n,r,i,a,s;void 0===e&&(e={}),this.startIndex=0,this.endIndex=null,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.foreignContext=[],this.options=e,this.cbs=null!=t?t:{},this.lowerCaseTagNames=null!==(n=e.lowerCaseTags)&&void 0!==n?n:!e.xmlMode,this.lowerCaseAttributeNames=null!==(r=e.lowerCaseAttributeNames)&&void 0!==r?r:!e.xmlMode,this.tokenizer=new(null!==(i=e.Tokenizer)&&void 0!==i?i:o.default)(this.options,this),null===(s=(a=this.cbs).onparserinit)||void 0===s||s.call(a,this)}return t.prototype.updatePosition=function(t){null===this.endIndex?this.tokenizer.sectionStart<=t?this.startIndex=0:this.startIndex=this.tokenizer.sectionStart-t:this.startIndex=this.endIndex+1,this.endIndex=this.tokenizer.getAbsoluteIndex()},t.prototype.ontext=function(t){var e,n;this.updatePosition(1),this.endIndex--,null===(n=(e=this.cbs).ontext)||void 0===n||n.call(e,t)},t.prototype.onopentagname=function(t){var e,n;if(this.lowerCaseTagNames&&(t=t.toLowerCase()),this.tagname=t,!this.options.xmlMode&&Object.prototype.hasOwnProperty.call(s,t))for(var r=void 0;this.stack.length>0&&s[t].has(r=this.stack[this.stack.length-1]);)this.onclosetag(r);!this.options.xmlMode&&l.has(t)||(this.stack.push(t),c.has(t)?this.foreignContext.push(!0):u.has(t)&&this.foreignContext.push(!1)),null===(n=(e=this.cbs).onopentagname)||void 0===n||n.call(e,t),this.cbs.onopentag&&(this.attribs={})},t.prototype.onopentagend=function(){var t,e;this.updatePosition(1),this.attribs&&(null===(e=(t=this.cbs).onopentag)||void 0===e||e.call(t,this.tagname,this.attribs),this.attribs=null),!this.options.xmlMode&&this.cbs.onclosetag&&l.has(this.tagname)&&this.cbs.onclosetag(this.tagname),this.tagname=""},t.prototype.onclosetag=function(t){if(this.updatePosition(1),this.lowerCaseTagNames&&(t=t.toLowerCase()),(c.has(t)||u.has(t))&&this.foreignContext.pop(),!this.stack.length||!this.options.xmlMode&&l.has(t))this.options.xmlMode||"br"!==t&&"p"!==t||(this.onopentagname(t),this.closeCurrentTag());else{var e=this.stack.lastIndexOf(t);if(-1!==e)if(this.cbs.onclosetag)for(e=this.stack.length-e;e--;)this.cbs.onclosetag(this.stack.pop());else this.stack.length=e;else"p"!==t||this.options.xmlMode||(this.onopentagname(t),this.closeCurrentTag())}},t.prototype.onselfclosingtag=function(){this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?this.closeCurrentTag():this.onopentagend()},t.prototype.closeCurrentTag=function(){var t,e,n=this.tagname;this.onopentagend(),this.stack[this.stack.length-1]===n&&(null===(e=(t=this.cbs).onclosetag)||void 0===e||e.call(t,n),this.stack.pop())},t.prototype.onattribname=function(t){this.lowerCaseAttributeNames&&(t=t.toLowerCase()),this.attribname=t},t.prototype.onattribdata=function(t){this.attribvalue+=t},t.prototype.onattribend=function(t){var e,n;null===(n=(e=this.cbs).onattribute)||void 0===n||n.call(e,this.attribname,this.attribvalue,t),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribname="",this.attribvalue=""},t.prototype.getInstructionName=function(t){var e=t.search(p),n=e<0?t:t.substr(0,e);return this.lowerCaseTagNames&&(n=n.toLowerCase()),n},t.prototype.ondeclaration=function(t){if(this.cbs.onprocessinginstruction){var e=this.getInstructionName(t);this.cbs.onprocessinginstruction("!"+e,"!"+t)}},t.prototype.onprocessinginstruction=function(t){if(this.cbs.onprocessinginstruction){var e=this.getInstructionName(t);this.cbs.onprocessinginstruction("?"+e,"?"+t)}},t.prototype.oncomment=function(t){var e,n,r,o;this.updatePosition(4),null===(n=(e=this.cbs).oncomment)||void 0===n||n.call(e,t),null===(o=(r=this.cbs).oncommentend)||void 0===o||o.call(r)},t.prototype.oncdata=function(t){var e,n,r,o,i,a;this.updatePosition(1),this.options.xmlMode||this.options.recognizeCDATA?(null===(n=(e=this.cbs).oncdatastart)||void 0===n||n.call(e),null===(o=(r=this.cbs).ontext)||void 0===o||o.call(r,t),null===(a=(i=this.cbs).oncdataen
1d)||void 0===a||a.call(i)):this.oncomment("[CDATA["+t+"]]")},t.prototype.onerror=function(t){var e,n;null===(n=(e=this.cbs).onerror)||void 0===n||n.call(e,t)},t.prototype.onend=function(){var t,e;if(this.cbs.onclosetag)for(var n=this.stack.length;n>0;this.cbs.onclosetag(this.stack[--n]));null===(e=(t=this.cbs).onend)||void 0===e||e.call(t)},t.prototype.reset=function(){var t,e,n,r;null===(e=(t=this.cbs).onreset)||void 0===e||e.call(t),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack=[],null===(r=(n=this.cbs).onparserinit)||void 0===r||r.call(n,this)},t.prototype.parseComplete=function(t){this.reset(),this.end(t)},t.prototype.write=function(t){this.tokenizer.write(t)},t.prototype.end=function(t){this.tokenizer.end(t)},t.prototype.pause=function(){this.tokenizer.pause()},t.prototype.resume=function(){this.tokenizer.resume()},t.prototype.parseChunk=function(t){this.write(t)},t.prototype.done=function(t){this.end(t)},t}();e.Parser=d},9889:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(n(26)),i=r(n(9323)),a=r(n(9591)),s=r(n(2586));function l(t){return" "===t||"\n"===t||"\t"===t||"\f"===t||"\r"===t}function c(t){return t>="a"&&t<="z"||t>="A"&&t<="Z"}function u(t,e,n){var r=t.toLowerCase();return t===r?function(t,o){o===r?t._state=e:(t._state=n,t._index--)}:function(o,i){i===r||i===t?o._state=e:(o._state=n,o._index--)}}function p(t,e){var n=t.toLowerCase();return function(r,o){o===n||o===t?r._state=e:(r._state=3,r._index--)}}var d=u("C",24,16),f=u("D",25,16),h=u("A",26,16),g=u("T",27,16),m=u("A",28,16),v=p("R",35),y=p("I",36),b=p("P",37),_=p("T",38),T=u("R",40,1),C=u("I",41,1),w=u("P",42,1),E=u("T",43,1),S=p("Y",45),x=p("L",46),O=p("E",47),A=u("Y",49,1),k=u("L",50,1),P=u("E",51,1),N=p("I",54),M=p("T",55),L=p("L",56),I=p("E",57),D=u("I",58,1),R=u("T",59,1),j=u("L",60,1),H=u("E",61,1),F=u("#",63,64),B=u("X",66,65),V=function(){function t(t,e){var n;this._state=1,this.buffer="",this.sectionStart=0,this._index=0,this.bufferOffset=0,this.baseState=1,this.special=1,this.running=!0,this.ended=!1,this.cbs=e,this.xmlMode=!!(null==t?void 0:t.xmlMode),this.decodeEntities=null===(n=null==t?void 0:t.decodeEntities)||void 0===n||n}return t.prototype.reset=function(){this._state=1,this.buffer="",this.sectionStart=0,this._index=0,this.bufferOffset=0,this.baseState=1,this.special=1,this.running=!0,this.ended=!1},t.prototype.write=function(t){this.ended&&this.cbs.onerror(Error(".write() after done!")),this.buffer+=t,this.parse()},t.prototype.end=function(t){this.ended&&this.cbs.onerror(Error(".end() after done!")),t&&this.write(t),this.ended=!0,this.running&&this.finish()},t.prototype.pause=function(){this.running=!1},t.prototype.resume=function(){this.running=!0,this._index<this.buffer.length&&this.parse(),this.ended&&this.finish()},t.prototype.getAbsoluteIndex=function(){return this.bufferOffset+this._index},t.prototype.stateText=function(t){"<"===t?(this._index>this.sectionStart&&this.cbs.ontext(this.getSection()),this._state=2,this.sectionStart=this._index):!this.decodeEntities||"&"!==t||1!==this.special&&4!==this.special||(this._index>this.sectionStart&&this.cbs.ontext(this.getSection()),this.baseState=1,this._state=62,this.sectionStart=this._index)},t.prototype.isTagStartChar=function(t){return c(t)||this.xmlMode&&!l(t)&&"/"!==t&&">"!==t},t.prototype.stateBeforeTagName=function(t){"/"===t?this._state=5:"<"===t?(this.cbs.ontext(this.getSection()),this.sectionStart=this._index):">"===t||1!==this.special||l(t)?this._state=1:"!"===t?(this._state=15,this.sectionStart=this._index+1):"?"===t?(this._state=17,this.sectionStart=this._index+1):this.isTagStartChar(t)?(this._state=this.xmlMode||"s"!==t&&"S"!==t?this.xmlMode||"t"!==t&&"T"!==t?3:52:32,this.sectionStart=this._index):this._state=1},t.prototype.stateInTagName=function(t){("/"===t||">"===t||l(t))&&(this.emitToken("onopentagname"),this._state=8,this._index--)},t.prototype.stateBeforeClosingTagName=function(t){l(t)||(">"===t?this._state=1:1!==this.special?4===this.special||"s"!==t&&"S"!==t?4!==this.special||"t"!==t&&"T"!==t?(this._state=1,this._index--):this._state=53:this._state=33:this.isTagStartChar(t)?(this._state=6,this.sectionStart=this._index):(this._state=20,this.sectionStart=this._index))},t.prototype.stateInClosingTagName=function(t){(">"===t||l(t))&&(this.emitToken("onclosetag"),this._state=7,this._index--)},t.prototype.stateAfterClosingTagName=function(t){">"===t&&(this._state=1,this.sectionStart=this._index+1)},t.prototype.stateBeforeAttributeName=function(t){">"===t?(this.cbs.onopentagend(),this._state=1,this.sectionStart=this._index+1):"/"===t?this._state=4:l(t)||(this._state=9,this.sectionStart=this._index)},t.prototype.stateInSelfClosingTag=function(t){">"===t?(this.cbs.onselfclosingtag(),this._state=1,this.sectionStart=this._index+1,this.special=1):l(t)||(this._state=8,this._index--)},t.prototype.stateInAttributeName=function(t){("="===t||"/"===t||">"===t||l(t))&&(this.cbs.onattribname(this.getSection()),this.sectionStart=-1,this._state=10,this._index--)},t.prototype.stateAfterAttributeName=function(t){"="===t?this._state=11:"/"===t||">"===t?(this.cbs.onattribend(void 0),this._state=8,this._index--):l(t)||(this.cbs.onattribend(void 0),this._state=9,this.sectionStart=this._index)},t.prototype.stateBeforeAttributeValue=function(t){'"'===t?(this._state=12,this.sectionStart=this._index+1):"'"===t?(this._state=13,this.sectionStart=this._index+1):l(t)||(this._state=14,this.sectionStart=this._index,this._index--)},t.prototype.handleInAttributeValue=function(t,e){t===e?(this.emitToken("onattribdata"),this.cbs.onattribend(e),this._state=8):this.decodeEntities&&"&"===t&&(this.emitToken("onattribdata"),this.baseState=this._state,this._state=62,this.sectionStart=this._index)},t.prototype.stateInAttributeValueDoubleQuotes=function(t){this.handleInAttributeValue(t,'"')},t.prototype.stateInAttributeValueSingleQuotes=function(t){this.handleInAttributeValue(t,"'")},t.prototype.stateInAttributeValueNoQuotes=function(t){l(t)||">"===t?(this.emitToken("onattribdata"),this.cbs.onattribend(null),this._state=8,this._index--):this.decodeEntities&&"&"===t&&(this.emitToken("onattribdata"),this.baseState=this._state,this._state=62,this.sectionStart=this._index)},t.prototype.stateBeforeDeclaration=function(t){this._state="["===t?23:"-"===t?18:16},t.prototype.stateInDeclaration=function(t){">"===t&&(this.cbs.ondeclaration(this.getSection()),this._state=1,this.sectionStart=this._index+1)},t.prototype.stateInProcessingInstruction=function(t){">"===t&&(this.cbs.onprocessinginstruction(this.getSection()),this._state=1,this.sectionStart=this._index+1)},t.prototype.stateBeforeComment=function(t){"-"===t?(this._state=19,this.sectionStart=this._index+1):this._state=16},t.prototype.stateInComment=function(t){"-"===t&&(this._state=21)},t.prototype.stateInSpecialComment=function(t){">"===t&&(this.cbs.oncomment(this.buffer.substring(this.sectionStart,this._index)),this._state=1,this.sectionStart=this._index+1)},t.prototype.stateAfterComment1=function(t){this._state="-"===t?22:19},t.prototype.stateAfterComment2=function(t){">"===t?(this.cbs.oncomment(this.buffer.substring(this.sectionStart,this._index-2)),this._state=1,this.sectionStart=this._index+1):"-"!==t&&(this._state=19)},t.prototype.stateBeforeCdata6=function(t){"["===t?(this._state=29,this.sectionStart=this._index+1):(this._state=16,this._index--)},t.prototype.stateInCdata=function(t){"]"===t&&(this._state=30)},t.prototype.stateAfterCdata1=function(t){this._state="]"===t?31:29},t.prototype.stateAfterCdata2=function(t){">"===t?(this.cbs.oncdata(this.buffer.substring(this.sectionStart,this._index-2)),this._state=1,this.sectionStart=this._index+1):"]"!==t&&(this._state=29)},t.prototype.stateBeforeSpecialS=function(t){"c"===t||"C"===t?this._state=34:"t"===t||"T"===t?this._state=44:(this._state=3,this._index--)},t.prototype.stateBeforeSpecialSEnd=function(t){2!==this.special||"c"!==t&&"C"!==t?3!==this.special||"t"!==t&&"T"!==t?this._state=1:this._state=48:this._state=39},t.prototype.stateBeforeSpecialLast=function(t,e){("/"===t||">"===t||l(t))&&(this.special=e),this._state=3,this._index--},t.prototype.stateAfterSpecialLast=function(t,e){">"===t||l(t)?(this.special=1,this._state=6,this.sectionStart=this._index-e,this._index--):this._state=1},t.prototype.parseFixedEntity=function(t){if(void 0===t&&(t=this.xmlMode?s.default:i.default),this.sectionStart+1<this._index){var e=this.buffer.substring(this.sectionStart+1,this._index);Object.prototype.hasOwnProperty.call(t,e)&&(this.emitPartial(t[e]),this.sectionStart=this._index+1)}},t.prototype.parseLegacyEntity=function(){for(var t=this.sectionStart+1,e=Math.min(this._index-t,6);e>=2;){var n=this.buffer.substr(t,e);if(Object.prototype.hasOwnProperty.call(a.default,n))return this.emitPartial(a.default[n]),void(this.sectionStart+=e+1);e--}},t.prototype.stateInNamedEntity=function(t){";"===t?(this.parseFixedEntity(),1===this.baseState&&this.sectionStart+1<this._index&&!this.xmlMode&&this.parseLegacyEntity(),this._state=this.baseState):(t<"0"||t>"9")&&!c(t)&&(this.xmlMode||this.sectionStart+1===this._index||(1!==this.baseState?"="!==t&&this.parseFixedEntity(a.default):this.parseLegacyEntity()),this._state=this.baseState,this._index--)},t.prototype.decodeNumericEntity=function(t,e,n){var r=this.sectionStart+t;if(r!==this._index){var i=this.buffer.substring(r,this._index),a=parseInt(i,e);this.emitPartial(o.default(a)),this.sectionStart=n?this._index+1:this._index}this._state=this.baseState},t.prototype.stateInNumericEntity=function(t){";"===t?this.decodeNumericEntity(2,10,!0):(t<"0"||t>"9")&&(this.xmlMode?this._state=this.baseState:this.decodeNumericEntity(2,10,!1),this._index--)},t.prototype.stateInHexEntity=function(t){";"===t?this.decodeNumericEntity(3,16,!0):(t<"a"||t>"f")&&(t<"A"||t>"F")&&(t<"0"||t>"9")&&(this.xmlMode?this._state=this.baseState:this.decodeNumericEntity(3,16,!1),this._index--)},t.prototype.cleanup=function(){this.sectionStart<0?(this.buffer="",this.bufferOffset+=this._index,this._index=0):this.running&&(1===this._state?(this.sectionStart!==this._index&&this.cbs.ontext(this.buffer.substr(this.sectionStart)),this.buffer="",this.bufferOffset+=this._index,this._index=0):this.sectionStart===this._index?(this.buffer="",this.bufferOffset+=this._index,this._index=0):(this.buffer=this.buffer.substr(this.sectionStart),this._index-=this.sectionStart,this.bufferOffset+=this.sectionStart),this.sectionStart=0)},t.prototype.parse=function(){for(;this._index<this.buffer.length&&this.running;){var t=this.buffer.charAt(this._index);1===this._state?this.stateText(t):12===this._state?this.stateInAttributeValueDoubleQuotes(t):9===this._state?this.stateInAttributeName(t):19===this._state?this.stateInComment(t):20===this._state?this.stateInSpecialComment(t):8===this._state?this.stateBeforeAttributeName(t):3===this._state?this.stateInTagName(t):6===this._state?this.stateInClosingTagName(t):2===this._state?this.stateBeforeTagName(t):10===this._state?this.stateAfterAttributeName(t):13===this._state?this.stateInAttributeValueSingleQuotes(t):11===this._state?this.stateBeforeAttributeValue(t):5===this._state?this.stateBeforeClosingTagName(t):7===this._state?this.stateAfterClosingTagName(t):32===this._state?this.stateBeforeSpecialS(t):21===this._state?this.stateAfterComment1(t):14===this._state?this.stateInAttributeValueNoQuotes(t):4===this._state?this.stateInSelfClosingTag(t):16===this._state?this.stateInDeclaration(t):15===this._state?this.stateBeforeDeclaration(t):22===this._state?this.stateAfterComment2(t):18===this._state?this.stateBeforeComment(t):33===this._state?this.stateBeforeSpecialSEnd(t):53===this._state?D(this,t):39===this._state?T(this,t):40===this._state?C(this,t):41===this._state?w(this,t):34===this._state?v(this,t):35===this._state?y(this,t):36===this._state?b(this,t):37===this._state?_(this,t):38===this._state?this.stateBeforeSpecialLast(t,2):42===this._state?E(this,t):43===this._state?this.stateAfterSpecialLast(t,6):44===this._state?S(this,t):29===this._state?this.stateInCdata(t):45===this._state?x(this,t):46===this._state?O(this,t):47===this._state?this.stateBeforeSpecialLast(t,3):48===this._state?A(this,t):49===this._state?k(this,t):50===this._state?P(this,t):51===this._state?this.stateAfterSpecialLast(t,5):52===this._state?N(this,t):54===this._state?M(this,t):55===this._state?L(this,t):56===this._state?I(this,t):57===this._state?this.stateBeforeSpecialLast(t,4):58===this._state?R(this,t):59===this._state?j(this,t):60===this._state?H(this,t):61===this._state?this.stateAfterSpecialLast(t,5):17===this._state?this.stateInProcessingInstruction(t):64===this._state?this.stateInNamedEntity(t):23===this._state?d(this,t):62===this._state?F(this,t):24===this._state?f(this,t):25===this._state?h(this,t):30===this._state?this.stateAfterCdata1(t):31===this._state?this.stateAfterCdata2(t):26===this._state?g(this,t):27===this._state?m(this,t):28===this._state?this.stateBeforeCdata6(t):66===this._state?this.stateInHexEntity(t):65===this._state?this.stateInNumericEntity(t):63===this._state?B(this,t):this.cbs.onerror
1(Error("unknown _state"),this._state),this._index++}this.cleanup()},t.prototype.finish=function(){this.sectionStart<this._index&&this.handleTrailingData(),this.cbs.onend()},t.prototype.handleTrailingData=function(){var t=this.buffer.substr(this.sectionStart);29===this._state||30===this._state||31===this._state?this.cbs.oncdata(t):19===this._state||21===this._state||22===this._state?this.cbs.oncomment(t):64!==this._state||this.xmlMode?65!==this._state||this.xmlMode?66!==this._state||this.xmlMode?3!==this._state&&8!==this._state&&11!==this._state&&10!==this._state&&9!==this._state&&13!==this._state&&12!==this._state&&14!==this._state&&6!==this._state&&this.cbs.ontext(t):(this.decodeNumericEntity(3,16,!1),this.sectionStart<this._index&&(this._state=this.baseState,this.handleTrailingData())):(this.decodeNumericEntity(2,10,!1),this.sectionStart<this._index&&(this._state=this.baseState,this.handleTrailingData())):(this.parseLegacyEntity(),this.sectionStart<this._index&&(this._state=this.baseState,this.handleTrailingData()))},t.prototype.getSection=function(){return this.buffer.substring(this.sectionStart,this._index)},t.prototype.emitToken=function(t){this.cbs[t](this.getSection()),this.sectionStart=-1},t.prototype.emitPartial=function(t){1!==this.baseState?this.cbs.onattribdata(t):this.cbs.ontext(t)},t}();e.default=V},3719:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return o(e,t),e},a=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.RssHandler=e.DefaultHandler=e.DomUtils=e.ElementType=e.Tokenizer=e.createDomStream=e.parseDOM=e.parseDocument=e.DomHandler=e.Parser=void 0;var l=n(763);Object.defineProperty(e,"Parser",{enumerable:!0,get:function(){return l.Parser}});var c=n(7915);function u(t,e){var n=new c.DomHandler(void 0,e);return new l.Parser(n,e).end(t),n.root}Object.defineProperty(e,"DomHandler",{enumerable:!0,get:function(){return c.DomHandler}}),Object.defineProperty(e,"DefaultHandler",{enumerable:!0,get:function(){return c.DomHandler}}),e.parseDocument=u,e.parseDOM=function(t,e){return u(t,e).children},e.createDomStream=function(t,e,n){var r=new c.DomHandler(t,e,n);return new l.Parser(r,e)};var p=n(9889);Object.defineProperty(e,"Tokenizer",{enumerable:!0,get:function(){return s(p).default}});var d=i(n(9960));e.ElementType=d,a(n(3870),e),e.DomUtils=i(n(9432));var f=n(3870);Object.defineProperty(e,"RssHandler",{enumerable:!0,get:function(){return f.FeedHandler}})},6094:(t,e,n)=>{"use strict";var r=n(9018),o=n(8880)(function(t,e){return r(t,{xmlMode:e&&e.xmlMode},i,[e])}),i=function(t,e){return o.juiceDocument(t,e)};o.inlineContent=function(t,e,n){return r(t,{xmlMode:n&&n.xmlMode},o.inlineDocument,[e,n])},t.exports=o},9018:(t,e,n)=>{"use strict";var r=n(7503);n(9671),t.exports=function(e,n,o,i){var a,s=(a=[],{encodeEntities:function(e){var n=t.exports.codeBlocks;return Object.keys(n).forEach(function(t){var r=new RegExp(n[t].start+"([\\S\\s]*?)"+n[t].end,"g");e=e.replace(r,function(t,e){return a.push(t),"JUICE_CODE_BLOCK_"+(a.length-1)+"_"})}),e},decodeEntities:function(t){for(var e=0;e<a.length;e++){var n=new RegExp("JUICE_CODE_BLOCK_"+e+'_(="")?',"gi");t=t.replace(n,function(){return a[e]})}return t}}),l=function(t,e,n){return e=Object.assign({decodeEntities:!1,_useHtmlParser2:!0},e),t=n(t),r.load(t,e)}(e,n,s.encodeEntities),c=[l];c.push.apply(c,i);var u=o.apply(void 0,c)||l;return n&&n.xmlMode?s.decodeEntities(u.xml()):s.decodeEntities(u.html())},t.exports.codeBlocks={EJS:{start:"<%",end:"%>"},HBS:{start:"{{",end:"}}"}}},8880:(t,e,n)=>{"use strict";var r=n(9671),o=n(5468);t.exports=function(t){function e(e,o,l){l=l||{};var c=r.parseCSS(o),u=[],p="style",d={};
1if(l.styleAttributeName&&(p=l.styleAttributeName),c.forEach(function(o){var i=o[0],a=o[1],c=new r.Selector(i),f=c.parsed();if(f){for(var h,g=function(t){if(0!==t.length){var e=t[t.length-1].pseudos;if(e)for(var n=0;n<e.length;n++)if(s(e[n]))return e[n].name}}(f),m=0;m<f.length;++m){var v=f[m];if(v.pseudos)for(var y=0;y<v.pseudos.length;++y){var b=v.pseudos[y];if(t.ignoredPseudos.indexOf(b.name)>=0)return}}if(g){var _=f[f.length-1],T=_.pseudos;_.pseudos=function(t){return t.filter(function(t){return!s(t)})}(_.pseudos),i=f.toString(),_.pseudos=T}try{h=e(i)}catch(t){return}h.each(function(){var o=this;if(!(o.name&&t.nonVisualElements.indexOf(o.name.toUpperCase())>=0)){if(g){var i="pseudo"+g,s=o[i];s||((s=o[i]=e("<span />").get(0)).pseudoElementType=g,s.pseudoElementParent=o,s.counterProps=o.counterProps,o[i]=s),o=s}if(!o.styleProps){if(o.styleProps={},e(o).attr(p)){var f="* { "+e(o).attr(p)+" } ";v(r.parseCSS(f)[0][1],new r.Selector("<style>",!0))}u.push(o)}o.counterProps||(o.counterProps=o.parent&&o.parent.counterProps?Object.create(o.parent.counterProps):{}),v(a,c)}function h(t,e){for(var n=e.split(/\s+/),r=0;r<n.length;r++){var o=n[r],i=parseInt(n[r+1],10);isNaN(i)?t.counterProps[o]=d[o]=0:t.counterProps[o]=d[n[r++]]=i}}function m(t,e){for(var n=e.split(/\s+/),r=0;r<n.length;r++){var o=n[r];if(void 0!==t.counterProps[o]){var i=parseInt(n[r+1],10);isNaN(i)?t.counterProps[o]=d[o]+=1:t.counterProps[o]=d[n[r++]]+=i}}}function v(e,i){for(var a=0,s=e.length;a<s;a++)if("property"==e[a].type){var c=e[a].name,u=e[a].value;"counter-reset"===c&&h(o,u),"counter-increment"===c&&m(o,u);var p=null!==u.match(/!important$/);p&&!l.preserveImportant&&(u=n(u));var d=[e[a].position.start.line,e[a].position.start.col],f=new r.Property(c,u,i,p?2:0,d),g=o.styleProps[c];t.excludedProperties.indexOf(c)<0&&(g&&g.compare(f)===f||!g)&&(g&&g.selector!==i?delete o.styleProps[c]:g&&(f.nextProp=g),o.styleProps[c]=f)}}})}}),u.forEach(function(t){Object.keys(t.styleProps).length;var n=[];Object.keys(t.styleProps).forEach(function(e){for(var r=t.styleProps[e];void 0!==r;)n.push(r),r=r.nextProp}),n.sort(function(t,e){return t.compareFunc(e)});var r=n.filter(function(t){return"content"!==t.prop}).map(function(t){return t.prop+": "+t.value.replace(/["]/g,"'")+";"}).join(" ");r&&e(t).attr(p,r)}),l.inlinePseudoElements&&u.forEach(function(t){if(t.pseudoElementType&&t.styleProps.content){var n=function(t){var e=t.styleProps.content.value;if("none"===e||"normal"===e)return"";var n=e.match(/^\s*url\s*\(\s*(.*?)\s*\)\s*$/i);if(n)return{img:n[1].replace(/^['"]|['"]$/g,"")};for(var r=[],o=e.split(/['"]/),s=0;s<o.length;s++)if(""!==o[s]){var l=o[s].match(/var\s*\(\s*(.*?)\s*(,\s*(.*?)\s*)?\s*\)/i);if(l){var c=i(t,l[1])||l[2];r.push(c.replace(/^['"]|['"]$/g,""))}else{var u=o[s].match(/counter\s*\(\s*(.*?)\s*(,\s*(.*?)\s*)?\s*\)/i);if(u&&u[1]in t.counterProps){var p=t.counterProps[u[1]];r.push(a(p,u[3]))}else{var d=o[s].match(/attr\s*\(\s*(.*?)\s*\)/i);if(d){var f=d[1];r.push(t.pseudoElementParent?t.pseudoElementParent.attribs[f]:t.attribs[f])}else r.push(o[s])}}}return(e=r.join("")).replace(/\\/g,"")}(t);n.img?(t.name="img",e(t).attr("src",n.img)):e(t).text(n);var r=t.pseudoElementParent;"before"===t.pseudoElementType?e(r).prepend(t):e(r).append(t)}}),l.applyWidthAttributes&&u.forEach(function(t){g(t,"width")}),l.applyHeightAttributes&&u.forEach(function(t){g(t,"height")}),l.applyAttributesTableElements&&u.forEach(function(r){if(r.name){var o=r.name.toUpperCase(),i=Object.keys(t.styleToAttribute);if(t.tableElements.indexOf(o)>-1)for(var a in r.styleProps)if(i.indexOf(r.styleProps[a].prop)>-1){var s=t.styleToAttribute[r.styleProps[a].prop],c=r.styleProps[a].value;if(l.preserveImportant&&(c=n(c)),"background"===s&&(c=m(c)),/(linear|radial)-gradient\(/i.test(c))continue;e(r).attr(s,c)}}}),l.insertPreservedExtraCss&&l.extraCss){var f=r.getPreservedText(l.extraCss,{mediaQueries:l.preserveMediaQueries,fontFaces:l.preserveFontFaces,keyFrames:l.preserveKeyFrames});if(f){var h=null;!0!==l.insertPreservedExtraCss?h=e(l.insertPreservedExtraCss):((h=e("head")).length||(h=e("body")),h.length||(h=e.root())),h.first().append("<style>"+f+"</style>")}}function g(r,o){if(r.name){var i=r.name.toUpperCase();if(t[o+"Elements"].indexOf(i)>-1)for(var a in r.styleProps)if(r.styleProps[a].prop===o){var s=r.styleProps[a].value;if(l.preserveImportant&&(s=n(s)),s.match(/px/)){var c=s.replace("px","");return void e(r).attr(o,c)}if(t.tableElements.indexOf(i)>-1&&s.match(/\%/))return void e(r).attr(o,s)}}}function m(t){return 0!==t.indexOf("url(")?t:t.replace(/^url\((["'])?([^"']+)\1\)$/,"$2")}}function n(t){return t.replace(/\s*!important$/,"")}function i(t,e){for(;t;){if(e in t.styleProps)return t.styleProps[e].value;t=t.pseudoElementParent||t.parent}}function a(t,e){switch(e){case"lower-roman":return o.romanize(t).toLowerCase();case"upper-roman":return o.romanize(t);case"lower-latin":case"lower-alpha":return o.alphanumeric(t).toLowerCase();case"upper-latin":case"upper-alpha":return o.alphanumeric(t);default:return t.toString()}}function s(t){return"before"===t.name||"after"===t.name}return t.ignoredPseudos=["hover","active","focus","visited","link"],t.widthElements=["TABLE","TD","TH","IMG"],t.heightElements=["TABLE","TD","TH","IMG"],t.tableElements=["TABLE","TH","TR","TD","CAPTION","COLGROUP","COL","THEAD","TBODY","TFOOT"],t.nonVisualElements=["HEAD","TITLE","BASE","LINK","STYLE","META","SCRIPT","NOSCRIPT"],t.styleToAttribute={"background-color":"bgcolor","background-image":"background","text-align":"align","vertical-align":"valign"},t.excludedProperties=[],t.juiceDocument=function(n,o){var i=function(e,n){var o=function(e,n){var o,i,a,s=[];return e("style").each(function(){var l=!!(a=this).childNodes;if(1===(o=l?a.childNodes:a.children).length){if(i=o[0].data,n.applyStyleTags&&void 0===e(a).attr("data-embed")&&s.push(i),n.removeStyleTags&&void 0===e(a).attr("data-embed")){var c=l?a.childNodes[0].nodeValue:a.children[0].data,u=r.getPreservedText(c,{mediaQueries:n.preserveMediaQueries,fontFaces:n.preserveFontFaces,keyFrames:n.preserveKeyFrames,pseudos:n.preservePseudos},t.ignoredPseudos);u?l?a.childNodes[0].nodeValue=u:a.children[0].data=u:e(a).remove()}e(a).removeAttr("data-embed")}else n.removeStyleTags&&e(a).remove()}),s}(e,n);return o.join("\n")}(n,o=r.getDefaultOptions(o));return e(n,i+="\n"+o.extraCss,o),n},t.inlineDocument=e,t}},5468:(t,e)=>{"use strict";e.romanize=function(t){if(isNaN(t))return NaN;
1for(var e=String(+t).split(""),n=["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM","","X","XX","XXX","XL","L","LX","LXX","LXXX","XC","","I","II","III","IV","V","VI","VII","VIII","IX"],r="",o=3;o--;)r=(n[+e.pop()+10*o]||"")+r;return Array(+e.join("")+1).join("M")+r},e.alphanumeric=function(t){for(var e,n="";t>0;)e=(t-1)%26,n=String.fromCharCode(65+e)+n,t=(t-e)/26|0;return n||void 0}},4777:(t,e,n)=>{"use strict";t.exports=o;var r=n(9671);function o(t,e,n,r,o){this.prop=t,this.value=e,this.selector=n,this.priority=r||0,this.additionalPriority=o||[]}o.prototype.compareFunc=function(t){var e=[];e.push.apply(e,this.selector.specificity()),e.push.apply(e,this.additionalPriority),e[0]+=this.priority;var n=[];return n.push.apply(n,t.selector.specificity()),n.push.apply(n,t.additionalPriority),n[0]+=t.priority,r.compareFunc(e,n)},o.prototype.compare=function(t){return 1===this.compareFunc(t)?this:t},o.prototype.toString=function(){return this.prop+": "+this.value.replace(/['"]+/g,"")+";"}},9240:(t,e,n)=>{"use strict";var r=n(6585);function o(t,e){this.text=t,this.spec=void 0,this.styleAttribute=e||!1}function i(t){try{return r(t)[0]}catch(t){return[]}}t.exports=o,o.prototype.parsed=function(){return this.tokens||(this.tokens=i(this.text)),this.tokens},o.prototype.specificity=function(){var t=this.styleAttribute;return this.spec||(this.spec=function e(n,r){for(var o=r||i(n),a=[t?1:0,0,0,0],s=[],l=0;l<o.length;l++){var c=o[l],u=c.pseudos;if(c.id&&a[1]++,c.attributes&&(a[2]+=c.attributes.length),c.classList&&(a[2]+=c.classList.length),c.tag&&"*"!==c.tag&&a[3]++,u){a[3]+=u.length;for(var p=0;p<u.length;p++)"not"===u[p].name&&(s.push(u[p].value),a[3]--)}}for(var d=s.length;d--;)for(var f=e(s[d]),h=4;h--;)a[h]+=f[h];return a}(this.text,this.parsed())),this.spec}},9671:(t,e,n)=>{"use strict";var r=n(4984),o=n(9240),i=n(4777);e.Selector=o,e.Property=i,e.extract=function(t){for(var e=0,n=[],r="",o=0,i=t.length;o<i;o++){var a=t.charAt(o);e?("]"!==a&&")"!==a||e--,r+=a):","===a?(n.push(r),r=""):("["!==a&&"("!==a||e++,(r.length||","!==a&&"\n"!==a&&" "!==a)&&(r+=a))}return r.length&&n.push(r),n},e.parseCSS=function(t){for(var e=r.parse(t,{position:!0,comments:!0}),n=void 0!==e.stylesheet&&e.stylesheet.rules?e.stylesheet.rules:[],o=[],i=0,a=n.length;i<a;i++)if("rule"==n[i].type)for(var s=n[i],l=s.selectors,c=0,u=l.length;c<u;c++)o.push([l[c],s.declarations]);return o},e.getPreservedText=function(t,e,n){for(var o=r.parse(t,{position:!0,comments:!0}),i=void 0!==o.stylesheet&&o.stylesheet.rules?o.stylesheet.rules:[],a=[],s=i.length-1;s>=0;s--)(e.fontFaces&&"font-face"===i[s].type||e.mediaQueries&&"media"===i[s].type||e.keyFrames&&"keyframes"===i[s].type||e.pseudos&&i[s].selectors&&this.matchesPseudo(i[s].selectors[0],n))&&a.unshift(r.stringify({stylesheet:{rules:[i[s]]}},{comments:!1,indentation:" "})),i[s].position.start;return 0!==a.length&&"\n"+a.join("\n")+"\n"},e.normalizeLineEndings=function(t){return t.replace(/\r\n/g,"\n").replace(/\n/g,"\r\n")},e.matchesPseudo=function(t,e){return e.find(function(e){return t.indexOf(e)>-1})},e.compareFunc=function(t,e){for(var n=Math.min(t.length,e.length),r=0;r<n;r++)if(t[r]!==e[r])return t[r]>e[r]?1:-1;return t.length-e.length},e.compare=function(t,n){return 1==e.compareFunc(t,n)?t:n},e.getDefaultOptions=function(t){var e=Object.assign({extraCss:"",insertPreservedExtraCss:!0,applyStyleTags:!0,removeStyleTags:!0,preserveMediaQueries:!0,preserveFontFaces:!0,preserveKeyFrames:!0,preservePseudos:!0,applyWidthAttributes:!0,applyHeightAttributes:!0,applyAttributesTableElements:!0,url:""},t);return e.webResources=e.webResources||{},e}},4984:(t,e,n)=>{t.exports={lex:n(5625),parse:n(2579),stringify:n(7134)}},1514:(t,e)=>{function n(t){var e=[].slice.call(arguments,1);e.unshift("["+t+"]"),process.stderr.write(e.join(" ")+"\n")}t.exports=function(t){return n.bind(null,t)}},5625:(t,e,n)=>{n(1514)("lex"),t.exports=function(t){var e,n="",r=0,o=-1,i=0,a=1,s="before-selector",l=[s],c={},u=[],p=["media","keyframes",{name:"-webkit-keyframes",type:"keyframes",prefix:"-webkit-"},{name:"-moz-keyframes",type:"keyframes",prefix:"-moz-"},{name:"-ms-keyframes",type:"keyframes",prefix:"-ms-"},{name:"-o-keyframes",type:"keyframes",prefix:"-o-"},"font-face",{name:"import",state:"before-at-value"},{name:"charset",state:"before-at-value"},"supports","viewport",{name:"namespace",state:"before-at-value"},"document",{name:"-moz-document",type:"document",prefix:"-moz-"},"page"];function d(t){return t?l[l.length-1-t]:s}function f(e){var n=o+1;return e===t.slice(n,n+e.length)}function h(e){var n=t.slice(o).indexOf(e);return n>0&&n}function g(t){return t===m(1)}function m(e){return t[o+(e||1)]}function v(){var t=l.pop();return s=l[l.length-1],t}function y(t){return s=t,l.push(s),l.length}function b(t){var e=s;return l[l.length-1]=s=t,e}function _(e){if(1==(e||1))"\n"==t[o]?(a++,r=1):r++,o++;else{var n=t.slice(o,o+e).split("\n");n.length>1&&(a+=n.length-1,r=1),r+=n[n.length-1].length,o+=e}}function T(){c.end={line:a,col:r},u.push(c),n="",c={}}function C(t){c={type:t,start:{line:a,col:r}}}for(;_(),e=t[o];)switch(e){case" ":switch(d()){case"selector":case"value":case"value-paren":case"at-group":case"at-value":case"comment":case"double-string":case"single-string":n+=e}break;case"\n":case"\t":case"\r":case"\f":switch(d()){case"value":case"value-paren":case"at-group":case"comment":case"single-string":case"double-string":case"selector":n+=e;break;case"at-value":"\n"===e&&(c.value=n.trim(),T(),v())}break;case":":switch(d()){case"name":c.name=n.trim(),n="",b("before-value");break;case"before-selector":n+=e,C("selector"),y("selector");break;case"before-value":b("value"),n+=e;break;default:n+=e}break;case";":switch(d()){case"name":case"before-value":case"value":n.trim().length>0&&(c.value=n.trim(),T()),b("before-name");break;case"value-paren":default:n+=e;break;case"at-value":c.value=n.trim(),T(),v();case"before-name":}break;case"{":switch(d()){case"selector":if("\\"===m(-1)){n+=e;break}c.text=n.trim(),T(),b("before-name"),i+=1;break;case"at-group":switch(c.name=n.trim(),c.type){case"font-face":case"viewport":case"page":y("before-name");break;default:y("before-selector")}T(),i+=1;break;case"name":case"at-rule":c.name=n.trim(),T(),y("before-name"),i+=1;break;case"comment":case"double-string":case"single-string":n+=e;break;case"before-value":b("value"),n+=e}break;case"}":switch(d()){case"before-name":case"name":case"before-value":case"value":n&&(c.value=n.trim()),c.name&&c.value&&T(),C("end"),T(),v(),"at-group"===d()&&(C("at-group-end"),T(),v()),i>0&&(i-=1);break;case"at-group":case"before-selector":case"selector":if("\\"===m(-1)){n+=e;break}i>0&&"at-group"===d(1)&&(C("at-group-end"),T()),i>1&&v(),i>0&&(i-=1);break;case"double-string":case"single-string":case"comment":n+=e}break;case'"':case"'":switch(d()){case"double-string":'"'===e&&"\\"!==m(-1)&&v();break;case"single-string":"'"===e&&"\\"!==m(-1)&&v();break;case"before-at-value":b("at-value"),y('"'===e?"double-string":"single-string");break;case"before-value":b("value"),y('"'===e?"double-string":"single-string");break;case"comment":break;default:"\\"!==m(-1)&&y('"'===e?"double-string":"single-string")}n+=e;break;case"/":switch(d()){case"comment":case"double-string":case"single-string":n+=e;break;case"before-value":case"selector":case"name":case"value":if(g("*")){var w=h("*/");w&&_(w+1)}else"before-value"==d()&&b("value"),n+=e;break;default:g("*")?(C("comment"),y("comment"),_()):n+=e}break;case"*":switch(d()){case"comment":g("/")?(c.text=n,_(),T(),v()):n+=e;break;case"before-selector":n+=e,C("selector"),y("selector");break;case"before-value":b("value"),n+=e;break;default:n+=e}break;case"@":switch(d()){case"comment":case"double-string":case"single-string":n+=e;break;case"before-value":b("value"),n+=e;break;default:for(var E,S,x=!1,O=0,A=p.length;!x&&O<A;
1++O)f(E=(S=p[O]).name||S)&&(x=!0,C(E),y(S.state||"at-group"),_(E.length),S.prefix&&(c.prefix=S.prefix),S.type&&(c.type=S.type));x||(n+=e)}break;case"(":switch(d()){case"value":y("value-paren");break;case"before-value":b("value")}n+=e;break;case")":switch(d()){case"value-paren":v();break;case"before-value":b("value")}n+=e;break;default:switch(d()){case"before-selector":C("selector"),y("selector");break;case"before-name":C("property"),b("name");break;case"before-value":b("value");break;case"before-at-value":b("at-value")}n+=e}return u}},2579:(t,e,n)=>{n(1514)("parse");var r,o,i,a,s=n(5625);function l(t,e){var n;e||(e={});for(var r=["type","name","value"],o={},a=0;a<r.length;++a)t[n=r[a]]&&(o[n]=e[n]||t[n]);for(r=Object.keys(e),a=0;a<r.length;++a)o[n=r[a]]||(o[n]=e[n]);return i&&(o.position={start:t.start,end:t.end}),o}function c(){var t=a.shift();return t}function u(t){switch(t.type){case"property":case"charset":case"import":case"namespace":return function(t){return l(t)}(t);case"selector":return function(t){return l(t,{type:"rule",selectors:t.text.split(",").map(function(t){return t.trim()}),declarations:d()})}(t);case"at-group-end":return void(o-=1);case"media":case"keyframes":case"font-face":case"supports":case"viewport":case"document":case"page":return function(t){o+=1;var e={};switch(t.type){case"font-face":case"viewport":e.declarations=d();break;case"page":e.prefix=t.prefix,e.declarations=d();break;default:e.prefix=t.prefix,e.rules=p(function(){return o})}return l(t,e)}(t);case"comment":if(r)return function(t){return l(t,{text:t.text})}(t)}}function p(t){for(var e,n,r=[];(n=c())&&t&&t(n);)(e=u(n))&&r.push(e);return n&&"end"!==n.type&&a.unshift(n),r}function d(){return p(function(t){return"property"===t.type||"comment"===t.type})}t.exports=function(t,e){var n;e||(e={}),r=!!e.comments,i=!!e.position,o=0,a=Array.isArray(t)?t.slice():s(t);for(var l,p=[];l=c();)(n=u(l))&&p.push(n);return{type:"stylesheet",stylesheet:{rules:p}}}},7134:(t,e,n)=>{var r,o,i,a,s,l;function c(t){if(!t)return o?"":Array(a).join(i||"");a+=t}function u(t){return r?"/*"+(t.text||"")+"*/"+s:""}function p(t){var e;return t.selectors?e=t.selectors.join(","+s):(e="@"+t.type,e+=t.name?" "+t.name:""),c()+e+l+f(t)+s}function d(t,e){return t.reduce(function(t,n){var r="comment"===n.type?u(n):e(n);return r&&t.push(r),t},[])}function f(t,e){var n=t.declarations,r=h;return t.rules&&(n=t.rules,r=p),n=function(t,e){if(!t)return"";c(1);var n=d(t,e);return c(-1),n.length?n.join(s):""}(n,r),n&&(n=s+n+(e?"":s)),"{"+n+c()+"}"}function h(t){if("property"===t.type)return function(t){var e=t.name?t.name+":"+l:"";return c()+e+t.value+";"}(t)}function g(t){switch(t.type){case"rule":return p(t);case"media":case"keyframes":case"font-face":case"supports":case"viewport":case"document":case"page":return function(t){var e="",n=t.prefix||"";t.name&&(e=" "+t.name);var r="page"!==t.type;return"@"+n+t.type+e+l+f(t,r)+s}(t);case"comment":return u(t);case"import":case"charset":case"namespace":return function(t){return"@"+t.type+" "+t.value+";"+s}(t)}}n(1514)("stringify"),t.exports=function(t,e){return e||(e={}),i=e.indentation||"",o=!!e.compress,r=!!e.comments,a=1,o?s=l="":(s="\n",l=" "),d(t.stylesheet.rules,g).join("\n").trim()}},9769:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.generate=e.compile=void 0;var o=r(n(1073));e.compile=function(t){var e=t[0],n=t[1]-1;if(n<0&&e<=0)return o.default.falseFunc;if(-1===e)return function(t){return t<=n};if(0===e)return function(t){return t===n};if(1===e)return n<0?o.default.trueFunc:function(t){return t>=n};var r=Math.abs(e),i=(n%r+r)%r;return e>1?function(t){return t>=n&&t%r===i}:function(t){return t<=n&&t%r===i}},e.generate=function(t){var e=t[0],n=t[1]-1,r=0;if(e<0){var o=-e,i=(n%o+o)%o;return function(){var t=i+o*r++;return t>n?null:t}}return 0===e?n<0?function(){return null}:function(){return 0==r++?n:null}:(n<0&&(n+=e*Math.ceil(-n/e)),function(){return e*r+++n})}},7540:(t,e,n)=>{"use strict";
1Object.defineProperty(e,"__esModule",{value:!0}),e.sequence=e.generate=e.compile=e.parse=void 0;var r=n(7766);Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return r.parse}});var o=n(9769);Object.defineProperty(e,"compile",{enumerable:!0,get:function(){return o.compile}}),Object.defineProperty(e,"generate",{enumerable:!0,get:function(){return o.generate}}),e.default=function(t){return(0,o.compile)((0,r.parse)(t))},e.sequence=function(t){return(0,o.generate)((0,r.parse)(t))}},7766:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parse=void 0;var n=new Set([9,10,12,13,32]),r="0".charCodeAt(0),o="9".charCodeAt(0);e.parse=function(t){if("even"===(t=t.trim().toLowerCase()))return[2,0];if("odd"===t)return[2,1];var e=0,i=0,a=l(),s=c();if(e<t.length&&"n"===t.charAt(e)&&(e++,i=a*(null!=s?s:1),u(),e<t.length?(a=l(),u(),s=c()):a=s=0),null===s||e<t.length)throw new Error("n-th rule couldn't be parsed ('".concat(t,"')"));return[i,a*s];function l(){return"-"===t.charAt(e)?(e++,-1):("+"===t.charAt(e)&&e++,1)}function c(){for(var n=e,i=0;e<t.length&&t.charCodeAt(e)>=r&&t.charCodeAt(e)<=o;)i=10*i+(t.charCodeAt(e)-r),e++;return e===n?null:i}function u(){for(;e<t.length&&n.has(t.charCodeAt(e));)e++}}},1906:(t,e,n)=>{"use strict";const r=n(1515),{DOCUMENT_MODE:o}=n(6152),i={element:1,text:3,cdata:4,comment:8},a={tagName:"name",childNodes:"children",parentNode:"parent",previousSibling:"prev",nextSibling:"next",nodeValue:"data"};class s{constructor(t){for(const e of Object.keys(t))this[e]=t[e]}get firstChild(){const t=this.children;return t&&t[0]||null}get lastChild(){const t=this.children;return t&&t[t.length-1]||null}get nodeType(){return i[this.type]||i.element}}Object.keys(a).forEach(t=>{const e=a[t];Object.defineProperty(s.prototype,t,{get:function(){return this[e]||null},set:function(t){return this[e]=t,t}})}),e.createDocument=function(){return new s({type:"root",name:"root",parent:null,prev:null,next:null,children:[],"x-mode":o.NO_QUIRKS})},e.createDocumentFragment=function(){return new s({type:"root",name:"root",parent:null,prev:null,next:null,children:[]})},e.createElement=function(t,e,n){const r=Object.create(null),o=Object.create(null),i=Object.create(null);for(let a=0;a<n.length;a++){const t=n[a].name;r[t]=n[a].value,o[t]=n[a].namespace,i[t]=n[a].prefix}return new s({type:"script"===t||"style"===t?t:"tag",name:t,namespace:e,attribs:r,"x-attribsNamespace":o,"x-attribsPrefix":i,children:[],parent:null,prev:null,next:null})},e.createCommentNode=function(t){return new s({type:"comment",data:t,parent:null,prev:null,next:null})};const l=function(t){return new s({type:"text",data:t,parent:null,prev:null,next:null})},c=e.appendChild=function(t,e){const n=t.children[t.children.length-1];n&&(n.next=e,e.prev=n),t.children.push(e),e.parent=t},u=e.insertBefore=function(t,e,n){const r=t.children.indexOf(n),o=n.prev;o&&(o.next=e,e.prev=o),n.prev=e,e.next=n,t.children.splice(r,0,e),e.parent=t};e.setTemplateContent=function(t,e){c(t,e)},e.getTemplateContent=function(t){return t.children[0]},e.setDocumentType=function(t,e,n,o){const i=r.serializeContent(e,n,o);let a=null;for(let r=0;r<t.children.length;r++)if("directive"===t.children[r].type&&"!doctype"===t.children[r].name){a=t.children[r];break}a?(a.data=i,a["x-name"]=e,a["x-publicId"]=n,a["x-systemId"]=o):c(t,new s({type:"directive",name:"!doctype",data:i,"x-name":e,"x-publicId":n,"x-systemId":o}))},e.setDocumentMode=function(t,e){t["x-mode"]=e},e.getDocumentMode=function(t){return t["x-mode"]},e.detachNode=function(t){if(t.parent){const e=t.parent.children.indexOf(t),n=t.prev,r=t.next;t.prev=null,t.next=null,n&&(n.next=r),r&&(r.prev=n),t.parent.children.splice(e,1),t.parent=null}},e.insertText=function(t,e){const n=t.children[t.children.length-1];n&&"text"===n.type?n.data+=e:c(t,l(e))},e.insertTextBefore=function(t,e,n){const r=t.children[t.children.indexOf(n)-1];r&&"text"===r.type?r.data+=e:u(t,l(e),n)},e.adoptAttributes=function(t,e){for(let n=0;n<e.length;n++){const r=e[n].name;void 0===t.attribs[r]&&(t.attribs[r]=e[n].value,t["x-attribsNamespace"][r]=e[n].namespace,t["x-attribsPrefix"][r]=e[n].prefix)}},e.getFirstChild=function(t){return t.children[0]},e.getChildNodes=function(t){return t.children},e.getParentNode=function(t){return t.parent},e.getAttrList=function(t){const e=[];for(const n in t.attribs)e.push({name:n,value:t.attribs[n],namespace:t["x-attribsNamespace"][n],prefix:t["x-attribsPrefix"][n]});return e},e.getTagName=function(t){return t.name},e.getNamespaceURI=function(t){return t.namespace},e.getTextNodeContent=function(t){return t.data},e.getCommentNodeContent=function(t){return t.data},e.getDocumentTypeNodeName=function(t){return t["x-name"]},e.getDocumentTypeNodePublicId=function(t){return t["x-publicId"]},e.getDocumentTypeNodeSystemId=function(t){return t["x-systemId"]},e.isTextNode=function(t){return"text"===t.type},e.isCommentNode=function(t){return"comment"===t.type},e.isDocumentTypeNode=function(t){return"directive"===t.type&&"!doctype"===t.name},e.isElementNode=function(t){return!!t.attribs},e.setNodeSourceCodeLocation=function(t,e){t.sourceCodeLocation=e},e.getNodeSourceCodeLocation=function(t){return t.sourceCodeLocation},e.updateNodeSourceCodeLocation=function(t,e){t.sourceCodeLocation=Object.assign(t.sourceCodeLocation,e)}},1515:(t,e,n)=>{"use strict";const{DOCUMENT_MODE:r}=n(6152),o="html",i=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],a=i.concat(["-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"]),s=["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"],l=["-/
1/w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],c=l.concat(["-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"]);function u(t){const e=-1!==t.indexOf('"')?"'":'"';return e+t+e}function p(t,e){for(let n=0;n<e.length;n++)if(0===t.indexOf(e[n]))return!0;return!1}e.isConforming=function(t){return t.name===o&&null===t.publicId&&(null===t.systemId||"about:legacy-compat"===t.systemId)},e.getDocumentMode=function(t){if(t.name!==o)return r.QUIRKS;const e=t.systemId;if(e&&"http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd"===e.toLowerCase())return r.QUIRKS;let n=t.publicId;if(null!==n){if(n=n.toLowerCase(),s.indexOf(n)>-1)return r.QUIRKS;let t=null===e?a:i;if(p(n,t))return r.QUIRKS;if(t=null===e?l:c,p(n,t))return r.LIMITED_QUIRKS}return r.NO_QUIRKS},e.serializeContent=function(t,e,n){let r="!DOCTYPE ";return t&&(r+=t),e?r+=" PUBLIC "+u(e):n&&(r+=" SYSTEM"),null!==n&&(r+=" "+u(n)),r}},1734:t=>{"use strict";t.exports={controlCharacterInInputStream:"control-character-in-input-stream",noncharacterInInputStream:"noncharacter-in-input-stream",surrogateInInputStream:"surrogate-in-input-stream",nonVoidHtmlElementStartTagWithTrailingSolidus:"non-void-html-element-start-tag-with-trailing-solidus",endTagWithAttributes:"end-tag-with-attributes",endTagWithTrailingSolidus:"end-tag-with-trailing-solidus",unexpectedSolidusInTag:"unexpected-solidus-in-tag",unexpectedNullCharacter:"unexpected-null-character",unexpectedQuestionMarkInsteadOfTagName:"unexpected-question-mark-instead-of-tag-name",invalidFirstCharacterOfTagName:"invalid-first-character-of-tag-name",unexpectedEqualsSignBeforeAttributeName:"unexpected-equals-sign-before-attribute-name",missingEndTagName:"missing-end-tag-name",unexpectedCharacterInAttributeName:"unexpected-character-in-attribute-name",unknownNamedCharacterReference:"unknown-named-character-reference",missingSemicolonAfterCharacterReference:"missing-semicolon-after-character-reference",unexpectedCharacterAfterDoctypeSystemIdentifier:"unexpected-character-after-doctype-system-identifier",unexpectedCharacterInUnquotedAttributeValue:"unexpected-character-in-unquoted-attribute-value",eofBeforeTagName:"eof-before-tag-name",eofInTag:"eof-in-tag",missingAttributeValue:"missing-attribute-value",missingWhitespaceBetweenAttributes:"missing-whitespace-between-attributes",missingWhitespaceAfterDoctypePublicKeyword:"missing-whitespace-after-doctype-public-keyword",missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers:"missing-whitespace-between-doctype-public-and-system-identifiers",missingWhitespaceAfterDoctypeSystemKeyword:"missing-whitespace-after-doctype-system-keyword",missingQuoteBeforeDoctypePublicIdentifier:"missing-quote-before-doctype-public-identifier",missingQuoteBeforeDoctypeSystemIdentifier:"missing-quote-before-doctype-system-identifier",missingDoctypePublicIdentifier:"missing-doctype-public-identifier",missingDoctypeSystemIdentifier:"missing-doctype-system-identifier",abruptDoctypePublicIdentifier:"abrupt-doctype-public-identifier",abruptDoctypeSystemIdentifier:"abrupt-doctype-system-identifier",cdataInHtmlContent:"cdata-in-html-content",incorrectlyOpenedComment:"incorrectly-opened-comment",eofInScriptHtmlCommentLikeText:"eof-in-script-html-comment-like-text",eofInDoctype:"eof-in-doctype",nestedComment:"nested-comment",abruptClosingOfEmptyComment:"abrupt-closing-of-empty-comment",eofInComment:"eof-in-comment",incorrectlyClosedComment:"incorrectly-closed-comment",eofInCdata:"eof-in-cdata",absenceOfDigitsInNumericCharacterReference:"absence-of-digits-in-numeric-character-reference",nullCharacterReference:"null-character-reference",surrogateCharacterReference:"surrogate-character-reference",characterReferenceOutsideUnicodeRange:"character-reference-outside-unicode-range",controlCharacterReference:"control-character-reference",noncharacterCharacterReference:"noncharacter-character-reference",missingWhitespaceBeforeDoctypeName:"missing-whitespace-before-doctype-name",missingDoctypeName:"missing-doctype-name",invalidCharacterSequenceAfterDoctypeName:"invalid-character-sequence-after-doctype-name",duplicateAttribute:"duplicate-attribute",nonConformingDoctype:"non-conforming-doctype",missingDoctype:"missing-doctype",misplacedDoctype:"misplaced-doctype",endTagWithoutMatchingOpenElement:"end-tag-without-matching-open-element",closingOfElementWithOpenChildElements:"closing-of-element-with-open-child-elements",disallowedContentInNoscriptInHead:"disallowed-content-in-noscript-in-head",openElementsLeftAfterEof:"open-elements-left-after-eof",abandonedHeadElementChild:"abandoned-head-element-child",misplacedStartTagForHeadElement:"misplaced-start-tag-for-head-element",nestedNoscriptInHead:"nested-noscript-in-head",eofInElementThatCanContainOnlyText:"eof-in-element-that-can-contain-only-text"}},8779:(t,e,n)=>{"use strict";const r=n(5763),o=n(6152),i=o.TAG_NAMES,a=o.NAMESPACES,s=o.ATTRS,l={attributename:"attributeName",attributetype:"attributeType",basefrequency:"baseFrequency",baseprofile:"baseProfile",calcmode:"calcMode",clippathunits:"clipPathUnits",diffuseconstant:"diffuseConstant",edgemode:"edgeMode",filterunits:"filterUnits",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",limitingconeangle:"limitingConeAngle",markerheight:"markerHeight",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",numoctaves:"numOctaves",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",refx:"refX",refy:"refY",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",specularconstant:"specularConstant",specularexponent:"specularExponent",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stitchtiles:"stitchTiles",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textlength:"textLength",viewbox:"viewBox",viewtarget:"viewTarget",xchannelselector:"xChannelSelector",ychannelselector:"yChannelSelector",zoomandpan:"zoomAndPan"},c={"xlink:actuate":{prefix:"xlink",name:"actuate",namespace:a.XLINK},"xlink:arcrole":{prefix:"xlink",name:"arcrole",namespace:a.XLINK},"xlink:href":{prefix:"xlink",name:"href",namespace:a.XLINK},"xlink:role":{prefix:"xlink",name:"role",namespace:a.XLINK},"xlink:show":{prefix:"xlink",name:"show",namespace:a.XLINK},"xlink:title":{prefix:"xlink",name:"title",namespace:a.XLINK},"xlink:type":{prefix:"xlink",name:"type",namespace:a.XLINK}
1,"xml:base":{prefix:"xml",name:"base",namespace:a.XML},"xml:lang":{prefix:"xml",name:"lang",namespace:a.XML},"xml:space":{prefix:"xml",name:"space",namespace:a.XML},xmlns:{prefix:"",name:"xmlns",namespace:a.XMLNS},"xmlns:xlink":{prefix:"xmlns",name:"xlink",namespace:a.XMLNS}},u=e.SVG_TAG_NAMES_ADJUSTMENT_MAP={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient",textpath:"textPath"},p={[i.B]:!0,[i.BIG]:!0,[i.BLOCKQUOTE]:!0,[i.BODY]:!0,[i.BR]:!0,[i.CENTER]:!0,[i.CODE]:!0,[i.DD]:!0,[i.DIV]:!0,[i.DL]:!0,[i.DT]:!0,[i.EM]:!0,[i.EMBED]:!0,[i.H1]:!0,[i.H2]:!0,[i.H3]:!0,[i.H4]:!0,[i.H5]:!0,[i.H6]:!0,[i.HEAD]:!0,[i.HR]:!0,[i.I]:!0,[i.IMG]:!0,[i.LI]:!0,[i.LISTING]:!0,[i.MENU]:!0,[i.META]:!0,[i.NOBR]:!0,[i.OL]:!0,[i.P]:!0,[i.PRE]:!0,[i.RUBY]:!0,[i.S]:!0,[i.SMALL]:!0,[i.SPAN]:!0,[i.STRONG]:!0,[i.STRIKE]:!0,[i.SUB]:!0,[i.SUP]:!0,[i.TABLE]:!0,[i.TT]:!0,[i.U]:!0,[i.UL]:!0,[i.VAR]:!0};e.causesExit=function(t){const e=t.tagName;return!(e!==i.FONT||null===r.getTokenAttr(t,s.COLOR)&&null===r.getTokenAttr(t,s.SIZE)&&null===r.getTokenAttr(t,s.FACE))||p[e]},e.adjustTokenMathMLAttrs=function(t){for(let e=0;e<t.attrs.length;e++)if("definitionurl"===t.attrs[e].name){t.attrs[e].name="definitionURL";break}},e.adjustTokenSVGAttrs=function(t){for(let e=0;e<t.attrs.length;e++){const n=l[t.attrs[e].name];n&&(t.attrs[e].name=n)}},e.adjustTokenXMLAttrs=function(t){for(let e=0;e<t.attrs.length;e++){const n=c[t.attrs[e].name];n&&(t.attrs[e].prefix=n.prefix,t.attrs[e].name=n.name,t.attrs[e].namespace=n.namespace)}},e.adjustTokenSVGTagName=function(t){const e=u[t.tagName];e&&(t.tagName=e)},e.isIntegrationPoint=function(t,e,n,r){return!(r&&r!==a.HTML||!function(t,e,n){if(e===a.MATHML&&t===i.ANNOTATION_XML)for(let r=0;r<n.length;r++)if(n[r].name===s.ENCODING){const t=n[r].value.toLowerCase();return"text/html"===t||"application/xhtml+xml"===t}return e===a.SVG&&(t===i.FOREIGN_OBJECT||t===i.DESC||t===i.TITLE)}(t,e,n))||!(r&&r!==a.MATHML||!function(t,e){return e===a.MATHML&&(t===i.MI||t===i.MO||t===i.MN||t===i.MS||t===i.MTEXT)}(t,e))}},6152:(t,e)=>{"use strict";const n=e.NAMESPACES={HTML:"http://www.w3.org/1999/xhtml",MATHML:"http://www.w3.org/1998/Math/MathML",SVG:"http://www.w3.org/2000/svg",XLINK:"http://www.w3.org/1999/xlink",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"};e.ATTRS={TYPE:"type",ACTION:"action",ENCODING:"encoding",PROMPT:"prompt",NAME:"name",COLOR:"color",FACE:"face",SIZE:"size"},e.DOCUMENT_MODE={NO_QUIRKS:"no-quirks",QUIRKS:"quirks",LIMITED_QUIRKS:"limited-quirks"};const r=e.TAG_NAMES={A:"a",ADDRESS:"address",ANNOTATION_XML:"annotation-xml",APPLET:"applet",AREA:"area",ARTICLE:"article",ASIDE:"aside",B:"b",BASE:"base",BASEFONT:"basefont",BGSOUND:"bgsound",BIG:"big",BLOCKQUOTE:"blockquote",BODY:"body",BR:"br",BUTTON:"button",CAPTION:"caption",CENTER:"center",CODE:"code",COL:"col",COLGROUP:"colgroup",DD:"dd",DESC:"desc",DETAILS:"details",DIALOG:"dialog",DIR:"dir",DIV:"div",DL:"dl",DT:"dt",EM:"em",EMBED:"embed",FIELDSET:"fieldset",FIGCAPTION:"figcaption",FIGURE:"figure",FONT:"font",FOOTER:"footer",FOREIGN_OBJECT:"foreignObject",FORM:"form",FRAME:"frame",FRAMESET:"frameset",H1:"h1",H2:"h2",H3:"h3",H4:"h4",H5:"h5",H6:"h6",HEAD:"head",HEADER:"header",HGROUP:"hgroup",HR:"hr",HTML:"html",I:"i",IMG:"img",IMAGE:"image",INPUT:"input",IFRAME:"iframe",KEYGEN:"keygen",LABEL:"label",LI:"li",LINK:"link",LISTING:"listing",MAIN:"main",MALIGNMARK:"malignmark",MARQUEE:"marquee",MATH:"math",MENU:"menu",META:"meta",MGLYPH:"mglyph",MI:"mi",MO:"mo",MN:"mn",MS:"ms",MTEXT:"mtext",NAV:"nav",NOBR:"nobr",NOFRAMES:"noframes",NOEMBED:"noembed",NOSCRIPT:"noscript",OBJECT:"object",OL:"ol",OPTGROUP:"optgroup",OPTION:"option",P:"p",PARAM:"param",P
1LAINTEXT:"plaintext",PRE:"pre",RB:"rb",RP:"rp",RT:"rt",RTC:"rtc",RUBY:"ruby",S:"s",SCRIPT:"script",SECTION:"section",SELECT:"select",SOURCE:"source",SMALL:"small",SPAN:"span",STRIKE:"strike",STRONG:"strong",STYLE:"style",SUB:"sub",SUMMARY:"summary",SUP:"sup",TABLE:"table",TBODY:"tbody",TEMPLATE:"template",TEXTAREA:"textarea",TFOOT:"tfoot",TD:"td",TH:"th",THEAD:"thead",TITLE:"title",TR:"tr",TRACK:"track",TT:"tt",U:"u",UL:"ul",SVG:"svg",VAR:"var",WBR:"wbr",XMP:"xmp"};e.SPECIAL_ELEMENTS={[n.HTML]:{[r.ADDRESS]:!0,[r.APPLET]:!0,[r.AREA]:!0,[r.ARTICLE]:!0,[r.ASIDE]:!0,[r.BASE]:!0,[r.BASEFONT]:!0,[r.BGSOUND]:!0,[r.BLOCKQUOTE]:!0,[r.BODY]:!0,[r.BR]:!0,[r.BUTTON]:!0,[r.CAPTION]:!0,[r.CENTER]:!0,[r.COL]:!0,[r.COLGROUP]:!0,[r.DD]:!0,[r.DETAILS]:!0,[r.DIR]:!0,[r.DIV]:!0,[r.DL]:!0,[r.DT]:!0,[r.EMBED]:!0,[r.FIELDSET]:!0,[r.FIGCAPTION]:!0,[r.FIGURE]:!0,[r.FOOTER]:!0,[r.FORM]:!0,[r.FRAME]:!0,[r.FRAMESET]:!0,[r.H1]:!0,[r.H2]:!0,[r.H3]:!0,[r.H4]:!0,[r.H5]:!0,[r.H6]:!0,[r.HEAD]:!0,[r.HEADER]:!0,[r.HGROUP]:!0,[r.HR]:!0,[r.HTML]:!0,[r.IFRAME]:!0,[r.IMG]:!0,[r.INPUT]:!0,[r.LI]:!0,[r.LINK]:!0,[r.LISTING]:!0,[r.MAIN]:!0,[r.MARQUEE]:!0,[r.MENU]:!0,[r.META]:!0,[r.NAV]:!0,[r.NOEMBED]:!0,[r.NOFRAMES]:!0,[r.NOSCRIPT]:!0,[r.OBJECT]:!0,[r.OL]:!0,[r.P]:!0,[r.PARAM]:!0,[r.PLAINTEXT]:!0,[r.PRE]:!0,[r.SCRIPT]:!0,[r.SECTION]:!0,[r.SELECT]:!0,[r.SOURCE]:!0,[r.STYLE]:!0,[r.SUMMARY]:!0,[r.TABLE]:!0,[r.TBODY]:!0,[r.TD]:!0,[r.TEMPLATE]:!0,[r.TEXTAREA]:!0,[r.TFOOT]:!0,[r.TH]:!0,[r.THEAD]:!0,[r.TITLE]:!0,[r.TR]:!0,[r.TRACK]:!0,[r.UL]:!0,[r.WBR]:!0,[r.XMP]:!0},[n.MATHML]:{[r.MI]:!0,[r.MO]:!0,[r.MN]:!0,[r.MS]:!0,[r.MTEXT]:!0,[r.ANNOTATION_XML]:!0},[n.SVG]:{[r.TITLE]:!0,[r.FOREIGN_OBJECT]:!0,[r.DESC]:!0}}},4284:(t,e)=>{"use strict";const n=[65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111];e.REPLACEMENT_CHARACTER="\ufffd",e.CODE_POINTS={EOF:-1,NULL:0,TABULATION:9,CARRIAGE_RETURN:13,LINE_FEED:10,FORM_FEED:12,SPACE:32,EXCLAMATION_MARK:33,QUOTATION_MARK:34,NUMBER_SIGN:35,AMPERSAND:38,APOSTROPHE:39,HYPHEN_MINUS:45,SOLIDUS:47,DIGIT_0:48,DIGIT_9:57,SEMICOLON:59,LESS_THAN_SIGN:60,EQUALS_SIGN:61,GREATER_THAN_SIGN:62,QUESTION_MARK:63,LATIN_CAPITAL_A:65,LATIN_CAPITAL_F:70,LATIN_CAPITAL_X:88,LATIN_CAPITAL_Z:90,RIGHT_SQUARE_BRACKET:93,GRAVE_ACCENT:96,LATIN_SMALL_A:97,LATIN_SMALL_F:102,LATIN_SMALL_X:120,LATIN_SMALL_Z:122,REPLACEMENT_CHARACTER:65533},e.CODE_POINT_SEQUENCES={DASH_DASH_STRING:[45,45],DOCTYPE_STRING:[68,79,67,84,89,80,69],CDATA_START_STRING:[91,67,68,65,84,65,91],SCRIPT_STRING:[115,99,114,105,112,116],PUBLIC_STRING:[80,85,66,76,73,67],SYSTEM_STRING:[83,89,83,84,69,77]},e.isSurrogate=function(t){return t>=55296&&t<=57343},e.isSurrogatePair=function(t){return t>=56320&&t<=57343},e.getSurrogatePairCodePoint=function(t,e){return 1024*(t-55296)+9216+e},e.isControlCodePoint=function(t){return 32!==t&&10!==t&&13!==t&&9!==t&&12!==t&&t>=1&&t<=31||t>=127&&t<=159},e.isUndefinedCodePoint=function(t){return t>=64976&&t<=65007||n.indexOf(t)>-1}},3843:(t,e,n)=>{"use strict";const r=n(1704);t.exports=class extends r{constructor(t,e){super(t),this.posTracker=null,this.onParseError=e.onParseError}_setErrorLocation(t){t.startLine=t.endLine=this.posTracker.line,t.startCol=t.endCol=this.posTracker.col,t.startOffset=t.endOffset=this.posTracker.offset}_reportError(t){const e={code:t,startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1};this._setErrorLocation(e),this.onParseError(e)}_getOverriddenMethods(t){return{_err(e){t._reportError(e)}}}}},2232:(t,e,n)=>{"use strict";const r=n(3843),o=n(50),i=n(6110),a=n(1704);t.exports=class extends r{constructor(t,e){super(t,e),this.opts=e,this.ctLoc=null,this.locBeforeToken=!1}_setErrorLocation(t){this.ctLoc&&(t.startLine=this.ctLoc.startLine,t.startCol=this.ctLoc.startCol,t.startOffset=this.ctLoc.startOffset,t.endLine=this.locBeforeToken?this.ctLoc.startLine:this.ctLoc.endLine,t.endCol=this.locBeforeToken?this.ctLoc.startCol:this.ctLoc.endCol,t.endOffset=this.locBeforeToken?this.ctLoc.startOffset:this.ctLoc.endOffset)}_getOverriddenMethods(t,e){return{_bootstrap(n,r){e._bootstrap.call(this,n,r),a.install(this.tokenizer,o,t.opts),a.install(this.tokenizer,i)},_processInputToken(n){t.ctLoc=n.location,e._processInputToken.call(this,n)},_err(e,n){t.locBeforeToken=n&&n.beforeToken,t._reportError(e)}}}}},3288:(t,e,n)=>{"use strict";const r=n(3843),o=n(7930),i=n(1704);t.exports=class extends r{constructor(t,e){super(t,e),this.posTracker=i.install(t,o),this.lastErrOffset=-1}_reportError(t){this.lastErrOffset!==this.posTracker.offset&&(this.lastErrOffset=this.posTracker.offset,super._reportError(t))}}},50:(t,e,n)=>{"use strict";const r=n(3843),o=n(3288),i=n(1704);t.exports=class extends r{constructor(t,e){super(t,e);const n=i.install(t.preprocessor,o,e);this.posTracker=n.posTracker}}},1077:(t,e,n)=>{"use strict";const r=n(1704);t.exports=class extends r{constructor(t,e){super(t),this.onItemPop=e.onItemPop}_getOverriddenMethods(t,e){return{pop(){t.onItemPop(this.current),e.pop.call(this)},popAllUpToHtmlElement(){for(let e=this.stackTop;e>0;e--)t.onItemPop(this.items[e]);e.popAllUpToHtmlElement.call(this)},remove(n){t.onItemPop(this.current),e.remove.call(this,n)}}}}},452:(t,e,n)=>{"use strict";const r=n(1704),o=n(5763),i=n(6110),a=n(1077),s=n(6152).TAG_NAMES;t.exports=class extends r{constructor(t){super(t),this.parser=t,this.treeAdapter=this.parser.treeAdapter,this.posTracker=null,this.lastStartTagToken=null,this.lastFosterParentingLocation=null,this.currentToken=null}_setStartLocation(t){let e=null;
1this.lastStartTagToken&&(e=Object.assign({},this.lastStartTagToken.location),e.startTag=this.lastStartTagToken.location),this.treeAdapter.setNodeSourceCodeLocation(t,e)}_setEndLocation(t,e){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&e.location){const n=e.location,r=this.treeAdapter.getTagName(t),i={};e.type===o.END_TAG_TOKEN&&r===e.tagName?(i.endTag=Object.assign({},n),i.endLine=n.endLine,i.endCol=n.endCol,i.endOffset=n.endOffset):(i.endLine=n.startLine,i.endCol=n.startCol,i.endOffset=n.startOffset),this.treeAdapter.updateNodeSourceCodeLocation(t,i)}}_getOverriddenMethods(t,e){return{_bootstrap(n,o){e._bootstrap.call(this,n,o),t.lastStartTagToken=null,t.lastFosterParentingLocation=null,t.currentToken=null;const s=r.install(this.tokenizer,i);t.posTracker=s.posTracker,r.install(this.openElements,a,{onItemPop:function(e){t._setEndLocation(e,t.currentToken)}})},_runParsingLoop(n){e._runParsingLoop.call(this,n);for(let e=this.openElements.stackTop;e>=0;e--)t._setEndLocation(this.openElements.items[e],t.currentToken)},_processTokenInForeignContent(n){t.currentToken=n,e._processTokenInForeignContent.call(this,n)},_processToken(n){if(t.currentToken=n,e._processToken.call(this,n),n.type===o.END_TAG_TOKEN&&(n.tagName===s.HTML||n.tagName===s.BODY&&this.openElements.hasInScope(s.BODY)))for(let e=this.openElements.stackTop;e>=0;e--){const r=this.openElements.items[e];if(this.treeAdapter.getTagName(r)===n.tagName){t._setEndLocation(r,n);break}}},_setDocumentType(t){e._setDocumentType.call(this,t);const n=this.treeAdapter.getChildNodes(this.document),r=n.length;for(let e=0;e<r;e++){const r=n[e];if(this.treeAdapter.isDocumentTypeNode(r)){this.treeAdapter.setNodeSourceCodeLocation(r,t.location);break}}},_attachElementToTree(n){t._setStartLocation(n),t.lastStartTagToken=null,e._attachElementToTree.call(this,n)},_appendElement(n,r){t.lastStartTagToken=n,e._appendElement.call(this,n,r)},_insertElement(n,r){t.lastStartTagToken=n,e._insertElement.call(this,n,r)},_insertTemplate(n){t.lastStartTagToken=n,e._insertTemplate.call(this,n);const r=this.treeAdapter.getTemplateContent(this.openElements.current);this.treeAdapter.setNodeSourceCodeLocation(r,null)},_insertFakeRootElement(){e._insertFakeRootElement.call(this),this.treeAdapter.setNodeSourceCodeLocation(this.openElements.current,null)},_appendCommentNode(t,n){e._appendCommentNode.call(this,t,n);const r=this.treeAdapter.getChildNodes(n),o=r[r.length-1];this.treeAdapter.setNodeSourceCodeLocation(o,t.location)},_findFosterParentingLocation(){return t.lastFosterParentingLocation=e._findFosterParentingLocation.call(this),t.lastFosterParentingLocation},_insertCharacters(n){e._insertCharacters.call(this,n);const r=this._shouldFosterParentOnInsertion(),o=r&&t.lastFosterParentingLocation.parent||this.openElements.currentTmplContent||this.openElements.current,i=this.treeAdapter.getChildNodes(o),a=r&&t.lastFosterParentingLocation.beforeElement?i.indexOf(t.lastFosterParentingLocation.beforeElement)-1:i.length-1,s=i[a];if(this.treeAdapter.getNodeSourceCodeLocation(s)){const{endLine:t,endCol:e,endOffset:r}=n.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:t,endCol:e,endOffset:r})}else this.treeAdapter.setNodeSourceCodeLocation(s,n.location)}}}}},6110:(t,e,n)=>{"use strict";const r=n(1704),o=n(5763),i=n(7930);t.exports=class extends r{constructor(t){super(t),this.tokenizer=t,this.posTracker=r.install(t.preprocessor,i),this.currentAttrLocation=null,this.ctLoc=null}_getCurrentLocation(){return{startLine:this.posTracker.line,startCol:this.posTracker.col,startOffset:this.posTracker.offset,endLine:-1,endCol:-1,endOffset:-1}}_attachCurrentAttrLocationInfo(){this.currentAttrLocation.endLine=this.posTracker.line,this.currentAttrLocation.endCol=this.posTracker.col,this.currentAttrLocation.endOffset=this.posTracker.offset;const t=this.tokenizer.currentToken,e=this.tokenizer.currentAttr;t.location.attrs||(t.location.attrs=Object.create(null)),t.location.attrs[e.name]=this.currentAttrLocation}_getOverriddenMethods(t,e){const n={_createStartTagToken(){e._createStartTagToken.call(this),this.currentToken.location=t.ctLoc},_createEndTagToken(){e._createEndTagToken.call(this),this.currentToken.location=t.ctLoc},_createCommentToken(){e._createCommentToken.call(this),this.currentToken.location=t.ctLoc},_createDoctypeToken(n){e._createDoctypeToken.call(this,n),this.currentToken.location=t.ctLoc},_createCharacterToken(n,r){e._createCharacterToken.call(this,n,r),this.currentCharacterToken.location=t.ctLoc},_createEOFToken(){e._createEOFToken.call(this),this.currentToken.location=t._getCurrentLocation()},_createAttr(n){e._createAttr.call(this,n),t.currentAttrLocation=t._getCurrentLocation()},_leaveAttrName(n){e._leaveAttrName.call(this,n),t._attachCurrentAttrLocationInfo()},_leaveAttrValue(n){e._leaveAttrValue.call(this,n),t._attachCurrentAttrLocationInfo()},_emitCurrentToken(){const n=this.currentToken.location;this.currentCharacterToken&&(this.currentCharacterToken.location.endLine=n.startLine,this.currentCharacterToken.location.endCol=n.startCol,this.currentCharacterToken.location.endOffset=n.startOffset),this.currentToken.type===o.EOF_TOKEN?(n.endLine=n.startLine,n.endCol=n.startCol,n.endOffset=n.startOffset):(n.endLine=t.posTracker.line,n.endCol=t.posTracker.col+1,n.endOffset=t.posTracker.offset+1),e._emitCurrentToken.call(this)},_emitCurrentCharacterToken(){const n=this.currentCharacterToken&&this.currentCharacterToken.location;n&&-1===n.endOffset&&(n.endLine=t.posTracker.line,n.endCol=t.posTracker.col,n.endOffset=t.posTracker.offset),e._emitCurrentCharacterToken.call(this)}};
1return Object.keys(o.MODE).forEach(r=>{const i=o.MODE[r];n[i]=function(n){t.ctLoc=t._getCurrentLocation(),e[i].call(this,n)}}),n}}},7930:(t,e,n)=>{"use strict";const r=n(1704);t.exports=class extends r{constructor(t){super(t),this.preprocessor=t,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.offset=0,this.col=0,this.line=1}_getOverriddenMethods(t,e){return{advance(){const n=this.pos+1,r=this.html[n];return t.isEol&&(t.isEol=!1,t.line++,t.lineStartPos=n),("\n"===r||"\r"===r&&"\n"!==this.html[n+1])&&(t.isEol=!0),t.col=n-t.lineStartPos+1,t.offset=t.droppedBufferSize+n,e.advance.call(this)},retreat(){e.retreat.call(this),t.isEol=!1,t.col=this.pos-t.lineStartPos+1},dropParsedChunk(){const n=this.pos;e.dropParsedChunk.call(this);const r=n-this.pos;t.lineStartPos-=r,t.droppedBufferSize+=r,t.offset=t.droppedBufferSize+this.pos}}}}},2394:(t,e,n)=>{"use strict";const r=n(7045),o=n(3988);e.parse=function(t,e){return new r(e).parse(t)},e.parseFragment=function(t,e,n){return"string"==typeof t&&(n=e,e=t,t=null),new r(n).parseFragment(e,t)},e.serialize=function(t,e){return new o(t,e).serialize()}},2484:t=>{"use strict";class e{constructor(t){this.length=0,this.entries=[],this.treeAdapter=t,this.bookmark=null}_getNoahArkConditionCandidates(t){const n=[];if(this.length>=3){const r=this.treeAdapter.getAttrList(t).length,o=this.treeAdapter.getTagName(t),i=this.treeAdapter.getNamespaceURI(t);for(let t=this.length-1;t>=0;t--){const a=this.entries[t];
1if(a.type===e.MARKER_ENTRY)break;const s=a.element,l=this.treeAdapter.getAttrList(s);this.treeAdapter.getTagName(s)===o&&this.treeAdapter.getNamespaceURI(s)===i&&l.length===r&&n.push({idx:t,attrs:l})}}return n.length<3?[]:n}_ensureNoahArkCondition(t){const e=this._getNoahArkConditionCandidates(t);let n=e.length;if(n){const r=this.treeAdapter.getAttrList(t),o=r.length,i=Object.create(null);for(let t=0;t<o;t++){const e=r[t];i[e.name]=e.value}for(let t=0;t<o;t++)for(let r=0;r<n;r++){const o=e[r].attrs[t];if(i[o.name]!==o.value&&(e.splice(r,1),n--),e.length<3)return}for(let t=n-1;t>=2;t--)this.entries.splice(e[t].idx,1),this.length--}}insertMarker(){this.entries.push({type:e.MARKER_ENTRY}),this.length++}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.push({type:e.ELEMENT_ENTRY,element:t,token:n}),this.length++}insertElementAfterBookmark(t,n){let r=this.length-1;for(;r>=0&&this.entries[r]!==this.bookmark;r--);this.entries.splice(r+1,0,{type:e.ELEMENT_ENTRY,element:t,token:n}),this.length++}removeEntry(t){for(let e=this.length-1;e>=0;e--)if(this.entries[e]===t){this.entries.splice(e,1),this.length--;break}}clearToLastMarker(){for(;this.length;){const t=this.entries.pop();if(this.length--,t.type===e.MARKER_ENTRY)break}}getElementEntryInScopeWithTagName(t){for(let n=this.length-1;n>=0;n--){const r=this.entries[n];if(r.type===e.MARKER_ENTRY)return null;if(this.treeAdapter.getTagName(r.element)===t)return r}return null}getElementEntry(t){for(let n=this.length-1;n>=0;n--){const r=this.entries[n];if(r.type===e.ELEMENT_ENTRY&&r.element===t)return r}return null}}e.MARKER_ENTRY="MARKER_ENTRY",e.ELEMENT_ENTRY="ELEMENT_ENTRY",t.exports=e},7045:(t,e,n)=>{"use strict";const r=n(5763),o=n(6519),i=n(2484),a=n(452),s=n(2232),l=n(1704),c=n(7296),u=n(8904),p=n(1515),d=n(8779),f=n(1734),h=n(4284),g=n(6152),m=g.TAG_NAMES,v=g.NAMESPACES,y=g.ATTRS,b={scriptingEnabled:!0,sourceCodeLocationInfo:!1,onParseError:null,treeAdapter:c},_="hidden",T="INITIAL_MODE",C="BEFORE_HTML_MODE",w="BEFORE_HEAD_MODE",E="IN_HEAD_MODE",S="IN_HEAD_NO_SCRIPT_MODE",x="AFTER_HEAD_MODE",O="IN_BODY_MODE",A="TEXT_MODE",k="IN_TABLE_MODE",P="IN_TABLE_TEXT_MODE",N="IN_CAPTION_MODE",M="IN_COLUMN_GROUP_MODE",L="IN_TABLE_BODY_MODE",I="IN_ROW_MODE",D="IN_CELL_MODE",R="IN_SELECT_MODE",j="IN_SELECT_IN_TABLE_MODE",H="IN_TEMPLATE_MODE",F="AFTER_BODY_MODE",B="IN_FRAMESET_MODE",V="AFTER_FRAMESET_MODE",U="AFTER_AFTER_BODY_MODE",z="AFTER_AFTER_FRAMESET_MODE",G={[m.TR]:I,[m.TBODY]:L,[m.THEAD]:L,[m.TFOOT]:L,[m.CAPTION]:N,[m.COLGROUP]:M,[m.TABLE]:k,[m.BODY]:O,[m.FRAMESET]:B},$={[m.CAPTION]:k,[m.COLGROUP]:k,[m.TBODY]:k,[m.TFOOT]:k,[m.THEAD]:k,[m.COL]:M,[m.TR]:L,[m.TD]:I,[m.TH]:I},q={[T]:{[r.CHARACTER_TOKEN]:at,[r.NULL_CHARACTER_TOKEN]:at,[r.WHITESPACE_CHARACTER_TOKEN]:tt,[r.COMMENT_TOKEN]:nt,[r.DOCTYPE_TOKEN]:function(t,e){t._setDocumentType(e);const n=e.forceQuirks?g.DOCUMENT_MODE.QUIRKS:p.getDocumentMode(e);p.isConforming(e)||t._err(f.nonConformingDoctype),t.treeAdapter.setDocumentMode(t.document,n),t.insertionMode=C},[r.START_TAG_TOKEN]:at,[r.END_TAG_TOKEN]:at,[r.EOF_TOKEN]:at},[C]:{[r.CHARACTER_TOKEN]:st,[r.NULL_CHARACTER_TOKEN]:st,[r.WHITESPACE_CHARACTER_TOKEN]:tt,[r.COMMENT_TOKEN]:nt,[r.DOCTYPE_TOKEN]:tt,[r.START_TAG_TOKEN]:function(t,e){e.tagName===m.HTML?(t._insertElement(e,v.HTML),t.insertionMode=w):st(t,e)},[r.END_TAG_TOKEN]:function(t,e){const n=e.tagName;n!==m.HTML&&n!==m.HEAD&&n!==m.BODY&&n!==m.BR||st(t,e)},[r.EOF_TOKEN]:st},[w]:{[r.CHARACTER_TOKEN]:lt,[r.NULL_CHARACTER_TOKEN]:lt,[r.WHITESPACE_CHARACTER_TOKEN]:tt,[r.COMMENT_TOKEN]:nt,[r.DOCTYPE_TOKEN]:et,[r.START_TAG_TOKEN]:function(t,e){const n=e.tagName;n===m.HTML?xt(t,e):n===m.HEAD?(t._insertElement(e,v.HTML),t.headElement=t.openElements.current,t.insertionMode=E):lt(t,e)},[r.END_TAG_TOKEN]:function(t,e){const n=e.tagName;n===m.HEAD||n===m.BODY||n===m.HTML||n===m.BR?lt(t,e):t._err(f.endTagWithoutMatchingOpenElement)},[r.EOF_TOKEN]:lt},[E]:{[r.CHARACTER_TOKEN]:pt,[r.NULL_CHARACTER_TOKEN]:pt,[r.WHITESPACE_CHARACTER_TOKEN]:ot,[r.COMMENT_TOKEN]:nt,[r.DOCTYPE_TOKEN]:et,[r.START_TAG_TOKEN]:ct,[r.END_TAG_TOKEN]:ut,[r.EOF_TOKEN]:pt},[S]:{[r.CHARACTER_TOKEN]:dt,[r.NULL_CHARACTER_TOKEN]:dt,[r.WHITESPACE_CHARACTER_TOKEN]:ot,[r.COMMENT_TOKEN]:nt,[r.DOCTYPE_TOKEN]:et,[r.START_TAG_TOKEN]:function(t,e){const n=e.tagName;n===m.HTML?xt(t,e):n===m.BASEFONT||n===m.BGSOUND||n===m.HEAD||n===m.LINK||n===m.META||n===m.NOFRAMES||n===m.STYLE?ct(t,e):n===m.NOSCRIPT?t._err(f.nestedNoscriptInHead):dt(t,e)},[r.END_TAG_TOKEN]:function(t,e){const n=e.tagName;n===m.NOSCRIPT?(t.openElements.pop(),t.insertionMode=E):n===m.BR?dt(t,e):t._err(f.endTagWithoutMatchingOpenElement)},[r.EOF_TOKEN]:dt},[x]:{[r.CHARACTER_TOKEN]:ft,[r.NULL_CHARACTER_TOKEN]:ft,[r.WHITESPACE_CHARACTER_TOKEN]:ot,[r.COMMENT_TOKEN]:nt,[r.DOCTYPE_TOKEN]:et,[r.START_TAG_TOKEN]:function(t,e){const n=e.tagName;n===m.HTML?xt(t,e):n===m.BODY?(t._insertElement(e,v.HTML),t.framesetOk=!1,t.insertionMode=O):n===m.FRAMESET?(t._insertElement(e,v.HTML),t.insertionMode=B):n===m.BASE||n===m.BASEFONT||n===m.BGSOUND||n===m.LINK||n===m.META||n===m.NOFRAMES||n===m.SCRIPT||n===m.STYLE||n===m.TEMPLATE||n===m.TITLE?(t._err(f.abandonedHeadElementChild),t.openElements.push(t.headElement),ct(t,e),t.openElements.remove(t.headElement)):n===m.HEAD?t._err(f.misplacedStartTagForHeadElement):ft(t,e)},[r.END_TAG_TOKEN]:function(t,e){const n=e.tagName;n===m.BODY||n===m.HTML||n===m.BR?ft(t,e):n===m.TEMPLATE?ut(t,e):t._err(f.endTagWithoutMatchingOpenElement)},[r.EOF_TOKEN]:ft},[O]:{[r.CHARACTER_TOKEN]:gt,[r.NULL_CHARACTER_TOKEN]:tt,[r.WHITESPACE_CHARACTER_TOKEN]:ht,[r.COMMENT_TOKEN]:nt,[r.DOCTYPE_TOKEN]:tt,[r.START_TAG_TOKEN]:xt,[r.END_TAG_TOKEN]:Pt,[r.EOF_TOKEN]:Nt},[A]:{[r.CHARACTER_TOKEN]:ot,[r.NULL_CHARACTER_TOKEN]:ot,[r.WHITESPACE_CHARACTER_TOKEN]:ot,[r.COMMENT_TOKEN]:tt,[r.DOCTYPE_TOKEN]:tt,[r.START_TAG_TOKEN]:tt,[r.END_TAG_TOKEN]:function(t,e){e.tagName===m.SCRIPT&&(t.pen
1dingScript=t.openElements.current),t.openElements.pop(),t.insertionMode=t.originalInsertionMode},[r.EOF_TOKEN]:function(t,e){t._err(f.eofInElementThatCanContainOnlyText),t.openElements.pop(),t.insertionMode=t.originalInsertionMode,t._processToken(e)}},[k]:{[r.CHARACTER_TOKEN]:Mt,[r.NULL_CHARACTER_TOKEN]:Mt,[r.WHITESPACE_CHARACTER_TOKEN]:Mt,[r.COMMENT_TOKEN]:nt,[r.DOCTYPE_TOKEN]:tt,[r.START_TAG_TOKEN]:Lt,[r.END_TAG_TOKEN]:It,[r.EOF_TOKEN]:Nt},[P]:{[r.CHARACTER_TOKEN]:function(t,e){t.pendingCharacterTokens.push(e),t.hasNonWhitespacePendingCharacterToken=!0},[r.NULL_CHARACTER_TOKEN]:tt,[r.WHITESPACE_CHARACTER_TOKEN]:function(t,e){t.pendingCharacterTokens.push(e)},[r.COMMENT_TOKEN]:Rt,[r.DOCTYPE_TOKEN]:Rt,[r.START_TAG_TOKEN]:Rt,[r.END_TAG_TOKEN]:Rt,[r.EOF_TOKEN]:Rt},[N]:{[r.CHARACTER_TOKEN]:gt,[r.NULL_CHARACTER_TOKEN]:tt,[r.WHITESPACE_CHARACTER_TOKEN]:ht,[r.COMMENT_TOKEN]:nt,[r.DOCTYPE_TOKEN]:tt,[r.START_TAG_TOKEN]:function(t,e){const n=e.tagName;n===m.CAPTION||n===m.COL||n===m.COLGROUP||n===m.TBODY||n===m.TD||n===m.TFOOT||n===m.TH||n===m.THEAD||n===m.TR?t.openElements.hasInTableScope(m.CAPTION)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(m.CAPTION),t.activeFormattingElements.clearToLastMarker(),t.insertionMode=k,t._processToken(e)):xt(t,e)},[r.END_TAG_TOKEN]:function(t,e){const n=e.tagName;n===m.CAPTION||n===m.TABLE?t.openElements.hasInTableScope(m.CAPTION)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(m.CAPTION),t.activeFormattingElements.clearToLastMarker(),t.insertionMode=k,n===m.TABLE&&t._processToken(e)):n!==m.BODY&&n!==m.COL&&n!==m.COLGROUP&&n!==m.HTML&&n!==m.TBODY&&n!==m.TD&&n!==m.TFOOT&&n!==m.TH&&n!==m.THEAD&&n!==m.TR&&Pt(t,e)},[r.EOF_TOKEN]:Nt},[M]:{[r.CHARACTER_TOKEN]:jt,[r.NULL_CHARACTER_TOKEN]:jt,[r.WHITESPACE_CHARACTER_TOKEN]:ot,[r.COMMENT_TOKEN]:nt,[r.DOCTYPE_TOKEN]:tt,[r.START_TAG_TOKEN]:function(t,e){const n=e.tagName;n===m.HTML?xt(t,e):n===m.COL?(t._appendElement(e,v.HTML),e.ackSelfClosing=!0):n===m.TEMPLATE?ct(t,e):jt(t,e)},[r.END_TAG_TOKEN]:function(t,e){const n=e.tagName;n===m.COLGROUP?t.openElements.currentTagName===m.COLGROUP&&(t.openElements.pop(),t.insertionMode=k):n===m.TEMPLATE?ut(t,e):n!==m.COL&&jt(t,e)},[r.EOF_TOKEN]:Nt},[L]:{[r.CHARACTER_TOKEN]:Mt,[r.NULL_CHARACTER_TOKEN]:Mt,[r.WHITESPACE_CHARACTER_TOKEN]:Mt,[r.COMMENT_TOKEN]:nt,[r.DOCTYPE_TOKEN]:tt,[r.START_TAG_TOKEN]:function(t,e){const n=e.tagName;n===m.TR?(t.openElements.clearBackToTableBodyContext(),t._insertElement(e,v.HTML),t.insertionMode=I):n===m.TH||n===m.TD?(t.openElements.clearBackToTableBodyContext(),t._insertFakeElement(m.TR),t.insertionMode=I,t._processToken(e)):n===m.CAPTION||n===m.COL||n===m.COLGROUP||n===m.TBODY||n===m.TFOOT||n===m.THEAD?t.openElements.hasTableBodyContextInTableScope()&&(t.openElements.clearBackToTableBodyContext(),t.openElements.pop(),t.insertionMode=k,t._processToken(e)):Lt(t,e)},[r.END_TAG_TOKEN]:function(t,e){const n=e.tagName;n===m.TBODY||n===m.TFOOT||n===m.THEAD?t.openElements.hasInTableScope(n)&&(t.openElements.clearBackToTableBodyContext(),t.openElements.pop(),t.insertionMode=k):n===m.TABLE?t.openElements.hasTableBodyContextInTableScope()&&(t.openElements.clearBackToTableBodyContext(),t.openElements.pop(),t.insertionMode=k,t._processToken(e)):(n!==m.BODY&&n!==m.CAPTION&&n!==m.COL&&n!==m.COLGROUP||n!==m.HTML&&n!==m.TD&&n!==m.TH&&n!==m.TR)&&It(t,e)},[r.EOF_TOKEN]:Nt},[I]:{[r.CHARACTER_TOKEN]:Mt,[r.NULL_CHARACTER_TOKEN]:Mt,[r.WHITESPACE_CHARACTER_TOKEN]:Mt,[r.COMMENT_TOKEN]:nt,[r.DOCTYPE_TOKEN]:tt,[r.START_TAG_TOKEN]:function(t,e){const n=e.tagName;n===m.TH||n===m.TD?(t.openElements.clearBackToTableRowContext(),t._insertElement(e,v.HTML),t.insertionMode=D,t.activeFormattingElements.insertMarker()):n===m.CAPTION||n===m.COL||n===m.COLGROUP||n===m.TBODY||n===m.TFOOT||n===m.THEAD||n===m.TR?t.openElements.hasInTableScope(m.TR)&&(t.openElements.clearBackToTableRowContext(),t.openElements.pop(),t.insertionMode=L,t._processToken(e)):Lt(t,e)},[r.END_TAG_TOKEN]:function(t,e){const n=e.tagName;n===m.TR?t.openElements.hasInTableScope(m.TR)&&(t.openElements.clearBackToTableRowContext(),t.openElements.pop(),t.insertionMode=L):n===m.TABLE?t.openElements.hasInTableScope(m.TR)&&(t.openElements.clearBackToTableRowContext(),t.openElements.pop(),t.insertionMode=L,t._processToken(e)):n===m.TBODY||n===m.TFOOT||n===m.THEAD?(t.openElements.hasInTableScope(n)||t.openElements.hasInTableScope(m.TR))&&(t.openElements.clearBackToTableRowContext(),t.openElements.pop(),t.insertionMode=L,t._processToken(e)):(n!==m.BODY&&n!==m.CAPTION&&n!==m.COL&&n!==m.COLGROUP||n!==m.HTML&&n!==m.TD&&n!==m.TH)&&It(t,e)},[r.EOF_TOKEN]:Nt},[D]:{[r.CHARACTER_TOKEN]:gt,[r.NULL_CHARACTER_TOKEN]:tt,[r.WHITESPACE_CHARACTER_TOKEN]:ht,[r.COMMENT_TOKEN]:nt,[r.DOCTYPE_TOKEN]:tt,[r.START_TAG_TOKEN]:function(t,e){const n=e.tagName;n===m.CAPTION||n===m.COL||n===m.COLGROUP||n===m.TBODY||n===m.TD||n===m.TFOOT||n===m.TH||n===m.THEAD||n===m.TR?(t.openElements.hasInTableScope(m.TD)||t.openElements.hasInTableScope(m.TH))&&(t._closeTableCell(),t._processToken(e)):xt(t,e)},[r.END_TAG_TOKEN]:function(t,e){const n=e.tagName;n===m.TD||n===m.TH?t.openElements.hasInTableScope(n)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(n),t.activeFormattingElements.clearToLastMarker(),t.insertionMode=I):n===m.TABLE||n===m.TBODY||n===m.TFOOT||n===m.THEAD||n===m.TR?t.openElements.hasInTableScope(n)&&(t._closeTableCell(),t._processToken(e)):n!==m.BODY&&n!==m.CAPTION&&n!==m.COL&&n!==m.COLGROUP&&n!==m.HTML&&Pt(t,e)},[r.EOF_TOKEN]:Nt},[R]:{[r.CHARACTER_TOKEN]:ot,[r.NULL_CHARACTER_TOKEN]:tt,[r.WHITESPACE_CHARACTER_TOKEN]:ot,[r.COMMENT_TOKEN]:nt,[r.DOCTYPE_TOKEN]:tt,[r.START_TAG_TOKEN]:Ht,[r.END_TAG_TOKEN]:Ft,[r.EOF_TOKEN]:Nt},[j]:{[r.CHARACTER_TOKEN]:ot,[r.NULL_CHARACTER_TOKEN]:tt,[r.WHITESPACE_CHARACTER_TOKEN]:ot,[r.COMMENT_TOKEN]:nt,[r.DOCTYPE_TOKEN]:tt,[r.START_TAG_TOKEN]:function(t,e){const n=e.tagName;n===m.CAPTION||n===m.TABLE||n===m.TBODY||n===m.TFOOT||n===m.THEAD||n===m.TR||n===m.TD||n===m.TH?(t.openElements.popUntilTagNamePopped(m.SELECT),t._resetInsertionMode(),t._processToken(e)):Ht(t,e)},[r.END_TAG_TOKEN]:function(t,e){const n=e.tagName;n===m.CAPTION||n===m.TABLE||n===m.TBODY||n===m.TFOOT||n===m.THEAD||n===m.TR||n===m.TD||n===m.TH?t.openElements.hasInTableScope(n)&&(t.openElements.popUntilTagNamePopped(m.SELECT),t._resetInsertionMode(),t._processToken(e)):Ft(t,e)},[r.EOF_TOKEN]:Nt},[H]:{[r.CHARACTER_TOKEN]:gt,[r.NULL_CHARACTER_TOKEN]:tt,[r.WHITESPACE_CHARACTER_TOKEN]:ht,[r.COMMENT_TOKEN]:nt,[r.DOCTYPE_TOKEN]:tt,[r.START_TAG_TOKEN]:function(t,e){const n=e.tagName;if(n===m.BASE||n===m.BASEFONT||n===m.BGSOUND||n===m.LINK||n===m.META||n===m.NOFRAMES||n===m.SCRIPT||n===m.STYLE||n===m.TEMPLATE||n===m.TITLE)ct(t,e);else{const r=$[n]||O;t._popTmplInsertionMode(),t._pushTmplInsertionMode(r),t.insertionMode=r,t._processToken(e)}},[r.END_TAG_TOKEN]:function(t,e){e.tagName===m.TEMPLATE&&ut(t,e)},[r.EOF_TOKEN]:Bt},[F]:{[r.CHARACTER_TOKEN]:Vt,[r.NULL_CHARACTER_TOKEN]:Vt,[r.WHITESPACE_CHARACTER_TOKEN]:ht,[r.COMMENT_TOKEN]:function(t,e){t._appendCommentNode(e,t.openElements.items[0])},[r.DOCTYPE_TOKEN]:tt,[r.START_TAG_TOKEN]:function(t,e){e.tagName===m.HTML?xt(t,e):Vt(t,e)},[r.END_TAG_TOKEN]:function(t,e){e.tagName===m.HTML?t.fragmentContext||(t.insertionMode=U):Vt(t,e)},[r.EOF_TOKEN]:it},[B]:{[r.CHARACTER_TOKEN]:tt,[r.NULL_CHARACTER_TOKEN]:tt,[r.WHITESPACE_CHARACTER_TOKEN]:ot,[r.COMMENT_TOKEN]:nt,[r.DOCTYPE_TOKEN]:tt,[r.START_TAG_TOKEN]:function(t,e){const n=e.tagName;n===m.HTML?xt(t,e):n===m.FRAMESET?t._insertElement(e,v.HTML):n===m.FRAME?(t._appendElement(e,v.HTML),e.ackSelfClosing=!0):n===m.NOFRAMES&&ct(t,e)},[r.END_TAG_TOKEN]:function(t,e){e.tagName!==m.FRAMESET||t.openElements.isRootHtmlElementCurrent()||(t.openElements.pop(),t.fragmentContext||t.openElements.currentTagName===m.FRAMESET||(t.insertionMode=V))},[r.EOF_TOKEN]:it},[V]:{[r.CHARACTER_TOKEN]:tt,[r.NULL_CHARACTER_TOKEN]:tt,[r.WHITESPACE_CHARACTER_TOKEN]:ot,[r.COMMENT_TOKEN]:nt,[r.DOCTYPE_TOKEN]:tt,[r.START_TAG_TOKEN]:function(t,e){const n=e.tagName;n===m.HTML?xt(t,e):n===m.NOFRAMES&&ct(t,e)},[r.END_TAG_TOKEN]:function(t,e){e.tagName===m.HTML&&(t.insertionMode=z)},[r.EOF_TOKEN]:it},[U]:{[r.CHARACTER_TOKEN]:Ut,[r.NULL_CHARACTER_TOKEN]:Ut,[r.WHITESPACE_CHARACTER_TOKEN]:ht,[r.COMMENT_TOKEN]:rt,[r.DOCTYPE_TOKEN]:tt,[r.START_TAG_TOKEN]:function(t,e){e.tagName===m.HTML?xt(t,e):Ut(t,e)},[r.END_TAG_TOKEN]:Ut,[r.EOF_TOKEN]:it},[z]:{[r.CHARACTER_TOKEN]:tt,[r.NULL_CHARACTER_TOKEN]:tt,[r.WHITESPACE_CHARACTER_TOKEN]:ht,[r.COMMENT_TOKEN]:rt,[r.DOCTYPE_TOKEN]:tt,[r.START_TAG_TOKEN]:function(t,e){const n=e.tagName;n===m.HTML?xt(t,e):n===m.NOFRAMES&&ct(t,e)},[r.END_TAG_TOKEN]:tt,[r.EOF_TOKEN]:it}};function W(t,e){let n=t.activeFormattingElements.getElementEntryInScopeWithTagName(e.tagName);return n?t.openElements.contains(n.element)?t.openElements.hasInScope(e.tagName)||(n=null):(t.activeFormattingElements.removeEntry(n),n=null):kt(t,e),n}function K(t,e){let n=null;for(let r=t.openElements.stackTop;r>=0;r--){const o=t.openElements.items[r];if(o===e.element)break;t._isSpecialElement(o)&&(n=o)}return n||(t.openElements.popUntilElementPopped(e.element),t.activeFormattingElements.removeEntry(e)),n}function Y(t,e,n){let r=e,o=t.openElements.getCommonAncestor(e);for(let i=0,a=o;a!==n;i++,a=o){o=t.openElements.getCommonAncestor(a);const n=t.activeFormattingElements.getElementEntry(a),s=n&&i>=3;!n||s?(s&&t.activeFormattingElements.removeEntry(n),t.openElements.remove(a)):(a=X(t,n),r===e&&(t.activeFormattingElements.bookmark=n),t.treeAdapter.detachNode(r),t.treeAdapter.appendChild(a,r),r=a)}return r}function X(t,e){const n=t.treeAdapter.getNamespaceURI(e.element),r=t.treeAdapter.createElement(e.token.tagName,n,e.token.attrs);return t.openElements.replace(e.element,r),e.element=r,r}function Z(t,e,n){if(t._isElementCausesFosterParenting(e))t._fosterParentElement(n);else{const r=t.treeAdapter.getTagName(e),o=t.treeAdapter.getNamespaceURI(e);r===m.TEMPLATE&&o===v.HTML&&(e=t.treeAdapter.getTemplateContent(e)),t.treeAdapter.appendChild(e,n)}}function Q(t,e,n){const r=t.treeAdapter.getNamespaceURI(n.element),o=n.token,i=t.treeAdapter.createElement(o.tagName,r,o.attrs);t._adoptNodes(e,i),t.treeAdapter.appendChild(e,i),t.activeFormattingElements.insertElementAfterBookmark(i,n.token),t.activeFormattingElements.removeEntry(n),t.openElements.remove(n.element),t.openElements.insertAfter(e,i)}function J(t,e){let n;for(let r=0;r<8&&(n=W(t,e),n);r++){const e=K(t,n);if(!e)break;t.activeFormattingElements.bookmark=n;const r=Y(t,e,n.element),o=t.openElements.getCommonAncestor(n.element);t.treeAdapter.detachNode(r),Z(t,o,r),Q(t,e,n)}}function tt(){}function et(t){t._err(f.misplacedDoctype)}function nt(t,e){t._appendCommentNode(e,t.openElements.currentTmplContent||t.openElements.current)}function rt(t,e){t._appendCommentNode(e,t.document)}function ot(t,e){t._insertCharacters(e)}function it(t){t.stopped=!0}function at(t,e){t._err(f.missingDoctype,{beforeToken:!0}),t.treeAdapter.setDocumentMode(t.document,g.DOCUMENT_MODE.QUIRKS),t.insertionMode=C,t._processToken(e)}function st(t,e){t._insertFakeRootElement(),t.insertionMode=w,t._processToken(e)}function lt(t,e){t._insertFakeElement(m.HEAD),t.headElement=t.openElements.current,t.insertionMode=E,t._processToken(e)}function ct(t,e){const n=e.tagName;n===m.HTML?xt(t,e):n===m.BASE||n===m.BASEFONT||n===m.BGSOUND||n===m.LINK||n===m.META?(t._appendElement(e,v.HTML),e.ackSelfClosing=!0):n===m.TITLE?t._switchToTextParsing(e,r.MODE.RCDATA):n===m.NOSCRIPT?t.options.scriptingEnabled?t._switchToTextParsing(e,r.MODE.RAWTEXT):(t._insertElement(e,v.HTML),t.insertionMode=S):n===m.NOFRAMES||n===m.STYLE?t._switchToTextParsing(e,r.MODE.RAWTEXT):n===m.SCRIPT?t._switchToTextParsing(e,r.MODE.SCRIPT_DATA):n===m.TEMPLATE?(t._insertTemplate(e,v.HTML),t.activeFormattingElements.insertMarker(),t.framesetOk=!1,t.insertionMode=H,t._pushTmplInsertionMode(H)):n===m.HEAD?t._err(f.misplacedStartTagForHeadElement):pt(t,e)}function ut(t,e){const n=e.tagName;n===m.HEAD?(t.openElements.pop(),t.insertionMode=x):n===m.BODY||n===m.BR||n===m.HTML?pt(t,e):n===m.TEMPLATE&&t.openElements.tmplCount>0?(t.openElements.generateImpliedEndTagsThoroughly(),t.openElements.currentTagName!==m.TEMPLATE&&t._err(f.closingOfElementWithOpenChildElements),t.openElements.popUntilTagNamePopped(m.TEMPLATE),t.activeFormattingElements.clearToLastMarker(),t._popTmplInsertionMode(),t._resetInsertionMode()):t._err(f.endTagWithoutMatchingOpenElement)}function pt(t,e){t.openElements.pop(),t.insertionMode=x,t._processToken(e)}function dt(t,e){const n=e.type===r.EOF_TOKEN?f.openElementsLeftAfterEof:f.disallowedContentInNoscriptInHead;t._err(n),t.openElements.pop(),t.insertionMode=E,t._processToken(e)}function ft(t,e){t._insertFakeElement(m.BODY),t.insertionMode=O,t._processToken(e)}function ht(t,e){t._reconstructActiveFormattingElements(),t._insertCharacters(e)}function gt(t,e){t._reconstructActiveFormattingElements(),t._insertCharacters(e),t.framesetOk=!1}function mt(t,e){t.openElements.hasInButtonScope(m.P)&&t._closePElement(),t._insertElement(e,v.HTML)}function vt(t,e){t.openElements.hasInButtonScope(m.P)&&t._closePElement(),t._insertElement(e,v.HTML),t.skipNextNewLine=!0,t.framesetOk=!1}function yt(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,v.HTML),t.activeFormattingElements.pushElement(t.openElements.current,e)}function bt(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,v.HTML),t.activeFormattingElements.insertMarker(),t.framesetOk=!1}function _t(t,e){t._reconstructActiveFormattingElements(),t._appendElement(e,v.HTML),t.framesetOk=!1,e.ackSelfClosing=!0}function Tt(t,e){t._appendElement(e,v.HTML),e.ackSelfClosing=!0}function Ct(t,e){t._switchToTextParsing(e,r.MODE.RAWTEXT)}function wt(t,e){t.openElements.currentTagName===m.OPTION&&t.openElements.pop(),t._reconstructActiveFormattingElements(),t._insertElement(e,v.HTML)}function Et(t,e){t.openElements.hasInScope(m.RUBY)&&t.openElements.generateImpliedEndTags(),t._insertElement(e,v.HTML)}function St(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,v.HTML)}function xt(t,e){const n=e.tagName;switch(n.length){case 1:n===m.I||n===m.S||n===m.B||n===m.U?yt(t,e):n===m.P?mt(t,e):n===m.A?function(t,e){const n=t.activeFormattingElements.getElementEntryInScopeWithTagName(m.A);n&&(J(t,e),t.openElements.remove(n.element),t.activeFormattingElements.removeEntry(n)),t._reconstructActiveFormattingElements(),t._insertElement(e,v.HTML),t.activeFormattingElements.pushElement(t.openElements.current,e)}(t,e):St(t,e);break;case 2:n===m.DL||n===m.OL||n===m.UL?mt(t,e):n===m.H1||n===m.H2||n===m.H3||n===m.H4||n===m.H5||n===m.H6?function(t,e){t.openElements.hasInButtonScope(m.P)&&t._closePElement();
1const n=t.openElements.currentTagName;n!==m.H1&&n!==m.H2&&n!==m.H3&&n!==m.H4&&n!==m.H5&&n!==m.H6||t.openElements.pop(),t._insertElement(e,v.HTML)}(t,e):n===m.LI||n===m.DD||n===m.DT?function(t,e){t.framesetOk=!1;const n=e.tagName;for(let r=t.openElements.stackTop;r>=0;r--){const e=t.openElements.items[r],o=t.treeAdapter.getTagName(e);let i=null;if(n===m.LI&&o===m.LI?i=m.LI:n!==m.DD&&n!==m.DT||o!==m.DD&&o!==m.DT||(i=o),i){t.openElements.generateImpliedEndTagsWithExclusion(i),t.openElements.popUntilTagNamePopped(i);break}if(o!==m.ADDRESS&&o!==m.DIV&&o!==m.P&&t._isSpecialElement(e))break}t.openElements.hasInButtonScope(m.P)&&t._closePElement(),t._insertElement(e,v.HTML)}(t,e):n===m.EM||n===m.TT?yt(t,e):n===m.BR?_t(t,e):n===m.HR?function(t,e){t.openElements.hasInButtonScope(m.P)&&t._closePElement(),t._appendElement(e,v.HTML),t.framesetOk=!1,e.ackSelfClosing=!0}(t,e):n===m.RB?Et(t,e):n===m.RT||n===m.RP?function(t,e){t.openElements.hasInScope(m.RUBY)&&t.openElements.generateImpliedEndTagsWithExclusion(m.RTC),t._insertElement(e,v.HTML)}(t,e):n!==m.TH&&n!==m.TD&&n!==m.TR&&St(t,e);break;case 3:n===m.DIV||n===m.DIR||n===m.NAV?mt(t,e):n===m.PRE?vt(t,e):n===m.BIG?yt(t,e):n===m.IMG||n===m.WBR?_t(t,e):n===m.XMP?function(t,e){t.openElements.hasInButtonScope(m.P)&&t._closePElement(),t._reconstructActiveFormattingElements(),t.framesetOk=!1,t._switchToTextParsing(e,r.MODE.RAWTEXT)}(t,e):n===m.SVG?function(t,e){t._reconstructActiveFormattingElements(),d.adjustTokenSVGAttrs(e),d.adjustTokenXMLAttrs(e),e.selfClosing?t._appendElement(e,v.SVG):t._insertElement(e,v.SVG),e.ackSelfClosing=!0}(t,e):n===m.RTC?Et(t,e):n!==m.COL&&St(t,e);break;case 4:n===m.HTML?function(t,e){0===t.openElements.tmplCount&&t.treeAdapter.adoptAttributes(t.openElements.items[0],e.attrs)}(t,e):n===m.BASE||n===m.LINK||n===m.META?ct(t,e):n===m.BODY?function(t,e){const n=t.openElements.tryPeekProperlyNestedBodyElement();n&&0===t.openElements.tmplCount&&(t.framesetOk=!1,t.treeAdapter.adoptAttributes(n,e.attrs))}(t,e):n===m.MAIN||n===m.MENU?mt(t,e):n===m.FORM?function(t,e){const n=t.openElements.tmplCount>0;t.formElement&&!n||(t.openElements.hasInButtonScope(m.P)&&t._closePElement(),t._insertElement(e,v.HTML),n||(t.formElement=t.openElements.current))}(t,e):n===m.CODE||n===m.FONT?yt(t,e):n===m.NOBR?function(t,e){t._reconstructActiveFormattingElements(),t.openElements.hasInScope(m.NOBR)&&(J(t,e),t._reconstructActiveFormattingElements()),t._insertElement(e,v.HTML),t.activeFormattingElements.pushElement(t.openElements.current,e)}(t,e):n===m.AREA?_t(t,e):n===m.MATH?function(t,e){t._reconstructActiveFormattingElements(),d.adjustTokenMathMLAttrs(e),d.adjustTokenXMLAttrs(e),e.selfClosing?t._appendElement(e,v.MATHML):t._insertElement(e,v.MATHML),e.ackSelfClosing=!0}(t,e):n===m.MENU?function(t,e){t.openElements.hasInButtonScope(m.P)&&t._closePElement(),t._insertElement(e,v.HTML)}(t,e):n!==m.HEAD&&St(t,e);break;case 5:n===m.STYLE||n===m.TITLE?ct(t,e):n===m.ASIDE?mt(t,e):n===m.SMALL?yt(t,e):n===m.TABLE?function(t,e){t.treeAdapter.getDocumentMode(t.document)!==g.DOCUMENT_MODE.QUIRKS&&t.openElements.hasInButtonScope(m.P)&&t._closePElement(),t._insertElement(e,v.HTML),t.framesetOk=!1,t.insertionMode=k}(t,e):n===m.EMBED?_t(t,e):n===m.INPUT?function(t,e){t._reconstructActiveFormattingElements(),t._appendElement(e,v.HTML);const n=r.getTokenAttr(e,y.TYPE);n&&n.toLowerCase()===_||(t.framesetOk=!1),e.ackSelfClosing=!0}(t,e):n===m.PARAM||n===m.TRACK?Tt(t,e):n===m.IMAGE?function(t,e){e.tagName=m.IMG,_t(t,e)}(t,e):n!==m.FRAME&&n!==m.TBODY&&n!==m.TFOOT&&n!==m.THEAD&&St(t,e);break;case 6:n===m.SCRIPT?ct(t,e):n===m.CENTER||n===m.FIGURE||n===m.FOOTER||n===m.HEADER||n===m.HGROUP||n===m.DIALOG?mt(t,e):n===m.BUTTON?function(t,e){t.openElements.hasInScope(m.BUTTON)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(m.BUTTON)),t._reconstructActiveFormattingElements(),t._insertElement(e,v.HTML),t.framesetOk=!1}(t,e):n===m.STRIKE||n===m.STRONG?yt(t,e):n===m.APPLET||n===m.OBJECT?bt(t,e):n===m.KEYGEN?_t(t,e):n===m.SOURCE?Tt(t,e):n===m.IFRAME?function(t,e){t.framesetOk=!1,t._switchToTextParsing(e,r.MODE.RAWTEXT)}(t,e):n===m.SELECT?function(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,v.HTML),t.framesetOk=!1,t.insertionMode===k||t.insertionMode===N||t.insertionMode===L||t.insertionMode===I||t.insertionMode===D?t.insertionMode=j:t.insertionMode=R}(t,e):n===m.OPTION?wt(t,e):St(t,e);break;case 7:n===m.BGSOUND?ct(t,e):n===m.DETAILS||n===m.ADDRESS||n===m.ARTICLE||n===m.SECTION||n===m.SUMMARY?mt(t,e):n===m.LISTING?vt(t,e):n===m.MARQUEE?bt(t,e):n===m.NOEMBED?Ct(t,e):n!==m.CAPTION&&St(t,e);break;case 8:n===m.BASEFONT?ct(t,e):n===m.FRAMESET?function(t,e){const n=t.o
1penElements.tryPeekProperlyNestedBodyElement();t.framesetOk&&n&&(t.treeAdapter.detachNode(n),t.openElements.popAllUpToHtmlElement(),t._insertElement(e,v.HTML),t.insertionMode=B)}(t,e):n===m.FIELDSET?mt(t,e):n===m.TEXTAREA?function(t,e){t._insertElement(e,v.HTML),t.skipNextNewLine=!0,t.tokenizer.state=r.MODE.RCDATA,t.originalInsertionMode=t.insertionMode,t.framesetOk=!1,t.insertionMode=A}(t,e):n===m.TEMPLATE?ct(t,e):n===m.NOSCRIPT?t.options.scriptingEnabled?Ct(t,e):St(t,e):n===m.OPTGROUP?wt(t,e):n!==m.COLGROUP&&St(t,e);break;case 9:n===m.PLAINTEXT?function(t,e){t.openElements.hasInButtonScope(m.P)&&t._closePElement(),t._insertElement(e,v.HTML),t.tokenizer.state=r.MODE.PLAINTEXT}(t,e):St(t,e);break;case 10:n===m.BLOCKQUOTE||n===m.FIGCAPTION?mt(t,e):St(t,e);break;default:St(t,e)}}function Ot(t,e){const n=e.tagName;t.openElements.hasInScope(n)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(n))}function At(t,e){const n=e.tagName;t.openElements.hasInScope(n)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(n),t.activeFormattingElements.clearToLastMarker())}function kt(t,e){const n=e.tagName;for(let r=t.openElements.stackTop;r>0;r--){const e=t.openElements.items[r];if(t.treeAdapter.getTagName(e)===n){t.openElements.generateImpliedEndTagsWithExclusion(n),t.openElements.popUntilElementPopped(e);break}if(t._isSpecialElement(e))break}}function Pt(t,e){const n=e.tagName;switch(n.length){case 1:n===m.A||n===m.B||n===m.I||n===m.S||n===m.U?J(t,e):n===m.P?function(t){t.openElements.hasInButtonScope(m.P)||t._insertFakeElement(m.P),t._closePElement()}(t):kt(t,e);break;case 2:n===m.DL||n===m.UL||n===m.OL?Ot(t,e):n===m.LI?function(t){t.openElements.hasInListItemScope(m.LI)&&(t.openElements.generateImpliedEndTagsWithExclusion(m.LI),t.openElements.popUntilTagNamePopped(m.LI))}(t):n===m.DD||n===m.DT?function(t,e){const n=e.tagName;t.openElements.hasInScope(n)&&(t.openElements.generateImpliedEndTagsWithExclusion(n),t.openElements.popUntilTagNamePopped(n))}(t,e):n===m.H1||n===m.H2||n===m.H3||n===m.H4||n===m.H5||n===m.H6?function(t){t.openElements.hasNumberedHeaderInScope()&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilNumberedHeaderPopped())}(t):n===m.BR?function(t){t._reconstructActiveFormattingElements(),t._insertFakeElement(m.BR),t.openElements.pop(),t.framesetOk=!1}(t):n===m.EM||n===m.TT?J(t,e):kt(t,e);break;case 3:n===m.BIG?J(t,e):n===m.DIR||n===m.DIV||n===m.NAV||n===m.PRE?Ot(t,e):kt(t,e);break;case 4:n===m.BODY?function(t){t.openElements.hasInScope(m.BODY)&&(t.insertionMode=F)}(t):n===m.HTML?function(t,e){t.openElements.hasInScope(m.BODY)&&(t.insertionMode=F,t._processToken(e))}(t,e):n===m.FORM?function(t){const e=t.openElements.tmplCount>0,n=t.formElement;e||(t.formElement=null),(n||e)&&t.openElements.hasInScope(m.FORM)&&(t.openElements.generateImpliedEndTags(),e?t.openElements.popUntilTagNamePopped(m.FORM):t.openElements.remove(n))}(t):n===m.CODE||n===m.FONT||n===m.NOBR?J(t,e):n===m.MAIN||n===m.MENU?Ot(t,e):kt(t,e);break;case 5:n===m.ASIDE?Ot(t,e):n===m.SMALL?J(t,e):kt(t,e);break;case 6:n===m.CENTER||n===m.FIGURE||n===m.FOOTER||n===m.HEADER||n===m.HGROUP||n===m.DIALOG?Ot(t,e):n===m.APPLET||n===m.OBJECT?At(t,e):n===m.STRIKE||n===m.STRONG?J(t,e):kt(t,e);break;case 7:n===m.ADDRESS||n===m.ARTICLE||n===m.DETAILS||n===m.SECTION||n===m.SUMMARY||n===m.LISTING?Ot(t,e):n===m.MARQUEE?At(t,e):kt(t,e);break;case 8:n===m.FIELDSET?Ot(t,e):n===m.TEMPLATE?ut(t,e):kt(t,e);break;case 10:n===m.BLOCKQUOTE||n===m.FIGCAPTION?Ot(t,e):kt(t,e);break;default:kt(t,e)}}function Nt(t,e){t.tmplInsertionModeStackTop>-1?Bt(t,e):t.stopped=!0}function Mt(t,e){const n=t.openElements.currentTagName;n===m.TABLE||n===m.TBODY||n===m.TFOOT||n===m.THEAD||n===m.TR?(t.pendingCharacterTokens=[],t.hasNonWhitespacePendingCharacterToken=!1,t.originalInsertionMode=t.insertionMode,t.insertionMode=P,t._processToken(e)):Dt(t,e)}function Lt(t,e){const n=e.tagName;switch(n.length){case 2:n===m.TD||n===m.TH||n===m.TR?function(t,e){t.openElements.clearBackToTableContext(),t._insertFakeElement(m.TBODY),t.insertionMode=L,t._processToken(e)}(t,e):Dt(t,e);break;case 3:n===m.COL?function(t,e){t.openElements.clearBackToTableContext(),t._insertFakeElement(m.COLGROUP),t.insertionMode=M,t._processToken(e)}(t,e):Dt(t,e);break;case 4:n===m.FORM?function(t,e){t.formElement||0!==t.openElements.tmplCount||(t._insertElement(e,v.HTML),t.formElement=t.openElements.current,t.openElements.pop())}(t,e):Dt(t,e);break;case 5:n===m.TABLE?function(t,e){t.openElements.hasInTableScope(m.TABLE)&&(t.openElements.popUntilTagNamePopped(m.TABLE),t._resetInsertionMode(),t._processToken(e))}(t,e):n===m.STYLE?ct(t,e):n===m.TBODY||n===m.TFOOT||n===m.THEAD?function(t,e){t.openElements.clearBackToTableContext(),t._insertElement(e,v.HTML),t.insertionMode=L}(t,e):n===m.INPUT?function(t,e){const n=r.getTokenAttr(e,y.TYPE);n&&n.toLowerCase()===_?t._appendElement(e,v.HTML):Dt(t,e),e.ackSelfClosing=!0}(t,e):Dt(t,e);break;case 6:n===m.SCRIPT?ct(t,e):Dt(t,e);break;case 7:n===m.CAPTION?function(t,e){t.openElements.clearBackToTableContext(),t.activeFormattingElements.insertMarker(),t._insertElement(e,v.HTML),t.insertionMode=N}(t,e):Dt(t,e);break;case 8:n===m.COLGROUP?function(t,e){t.openElements.clearBackToTableContext(),t._insertElement(e,v.HTML),t.insertionMode=M}(t,e):n===m.TEMPLATE?ct(t,e):Dt(t,e);break;default:Dt(t,e)}}function It(t,e){const n=e.tagName;n===m.TABLE?t.openElements.hasInTableScope(m.TABLE)&&(t.openElements.popUntilTagNamePopped(m.TABLE),t._resetInsertionMode()):n===m.TEMPLATE?ut(t,e):n!==m.BODY&&n!==m.CAPTION&&n!==m.COL&&n!==m.COLGROUP&&n!==m.HTML&&n!==m.TBODY&&n!==m.TD&&n!==m.TFOOT&&n!==m.TH&&n!==m.THEAD&&n!==m.TR&&Dt(t,e)}function Dt(t,e){const n=t.fosterParentingEnabled;t.fosterParentingEnabled=!0,t._processTokenInBodyMode(e),t.fosterParentingEnabled=n}function Rt(t,e){let n=0;if(t.hasNonWhitespacePendingCharacterToken)for(;n<t.pendingCharacterTokens.length;n++)Dt(t,t.pendingCharacterTokens[n]);else for(;n<t.pendingCharacterTokens.length;n++)t._insertCharacters(t.pendingCharacterTokens[n]);t.insertionMode=t.originalInsertionMode,t._processToken(e)}function jt(t,e){t.openElements.currentTagName===m.COLGROUP&&(t.openElements.pop(),t.insertionMode=k,t._processToken(e))}function Ht(t,e){const n=e.tagName;n===m.HTML?xt(t,e):n===m.OPTION?(t.openElements.currentTagName===m.OPTION&&t.openElements.pop(),t._insertElement(e,v.HTML)):n===m.OPTGROUP?(t.openElements.currentTagName===m.OPTION&&t.openElements.pop(),t.openElements.currentTagName===m.OPTGROUP&&t.openElements.pop(),t._insertElement(e,v.HTML)):n===m.INPUT||n===m.KEYGEN||n===m.TEXTAREA||n===m.SELECT?t.openElements.hasInSelectScope(m.SELECT)&&(t.openElements.popUntilTagNamePopped(m.SELECT),t._resetInsertionMode(),n!==m.SELECT&&t._processToken(e)):n!==m.SCRIPT&&n!==m.TEMPLATE||ct(t,e)}function Ft(t,e){const n=e.tagName;if(n===m.OPTGROUP){const e=t.openElements.items[t.openElements.stackTop-1],n=e&&t.treeAdapter.getTagName(e);t.openElements.currentTagName===m.OPTION&&n===m.OPTGROUP&&t.openElements.pop(),t.openElements.currentTagName===m.OPTGROUP&&t.openElements.pop()}else n===m.OPTION?t.openElements.currentTagName===m.OPTION&&t.openElements.pop():n===m.SELECT&&t.openElements.hasInSelectScope(m.SELECT)?(t.openElements.popUntilTagNamePopped(m.SELECT),t._resetInsertionMode()):n===m.TEMPLATE&&ut(t,e)}function Bt(t,e){t.openElements.tmplCount>0?(t.openElements.popUntilTagNamePopped(m.TEMPLATE),t.activeFormattingElements.clearToLastMarker(),t._popTmplInsertionMode(),t._resetInsertionMode(),t._processToken(e)):t.stopped=!0}function Vt(t,e){t.insertionMode=O,t._processToken(e)}function Ut(t,e){t.insertionMode=O,t._processToken(e)}t.exports=class{constructor(t){this.options=u(b,t),this.treeAdapter=this.options.treeAdapter,this.pendingScript=null,this.options.sourceCodeLocationInfo&&l.install(this,a),this.options.onParseError&&l.install(this,s,{onParseError:this.options.onParseError})}parse(t){const e=this.treeAdapter.createDocument();return this._bootstrap(e,null),this.tokenizer.write(t,!0),this._runParsingLoop(null),e}parseFragment(t,e){e||(e=this.treeAdapter.createElement(m.TEMPLATE,v.HTML,[]));const n=this.treeAdapter.createElement("documentmock",v.HTML,[]);this._bootstrap(n,e),this.treeAdapter.getTagName(e)===m.TEMPLATE&&this._pushTmplInsertionMode(H),this._initTokenizerForFragmentParsing(),this._insertFakeRootElement(),this._resetInsertionMode(),this._findFormInFragmentContext(),this.tokenizer.write(t,!0),this._runParsingLoop(null);const r=this.treeAdapter.getFirstChild(n),o=this.treeAdapter.createDocumentFragment();return this._adoptNodes(r,o),o}_bootstrap(t,e){this.tokenizer=new r(this.options),this.stopped=!1,this.insertionMode=T,this.originalInsertionMode="",this.document=t,this.fragmentContext=e,this.headElement=null,this.formElement=null,this.openElements=new o(this.document,this.treeAdapter),this.activeFormattingElements=new i(this.treeAdapter),this.tmplInsertionModeStack=[],this.tmplInsertionModeStackTop=-1,this.currentTmplInsertionMode=null,this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1}_err(){}_runParsingLoop(t){for(;!this.stopped;){this._setupTokenizerCDATAMode();const e=this.tokenizer.getNextToken();if(e.type===r.HIBERNATION_TOKEN)break;if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.type===r.WHITESPACE_CHARACTER_TOKEN&&"\n"===e.chars[0])){if(1===e.chars.length)continue;e.chars=e.chars.substr(1)}if(this._processInputToken(e),t&&this.pendingScript)break}}runParsingLoopForCurrentChunk(t,e){if(this._runParsingLoop(e),e&&this.pendingScript){const t=this.pendingScript;return this.pendingScript=null,void e(t)}t&&t()}_setupTokenizerCDATAMode(){const t=this._getAdjustedCurrentElement();this.tokenizer.allowCDATA=t&&t!==this.document&&this.treeAdapter.getNamespaceURI(t)!==v.HTML&&!this._isIntegrationPoint(t)}_switchToTextParsing(t,e){this._insertElement(t,v.HTML),this.tokenizer.state=e,this.originalInsertionMode=this.insertionMode,this.insertionMode=A}switchToPlaintextParsing(){this.insertionMode=A,this.originalInsertionMode=O,this.tokenizer.state=r.MODE.PLAINTEXT}_getAdjustedCurrentElement(){return 0===this.openElements.stackTop&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;do{if(this.treeAdapter.getTagName(t)===m.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}while(t)}_initTokenizerForFragmentParsing(){if(this.treeAdapter.getNamespaceURI(this.fragmentContext)===v.HTML){const t=this.treeAdapter.getTagName(this.fragmentContext);t===m.TITLE||t===m.TEXTAREA?this.tokenizer.state=r.MODE.RCDATA:t===m.STYLE||t===m.XMP||t===m.IFRAME||t===m.NOEMBED||t===m.NOFRAMES||t===m.NOSCRIPT?this.tokenizer.state=r.MODE.RAWTEXT:t===m.SCRIPT?this.tokenizer.state=r.MODE.SCRIPT_DATA:t===m.PLAINTEXT&&(this.tokenizer.state=r.MODE.PLAINTEXT)}}_setDocumentType(t){const e=t.name||"",n=t.publicId||"",r=t.systemId||"";this.treeAdapter.setDocumentType(this.document,e,n,r)}_attachElementToTree(t){if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const e=this.openElements.currentTmplContent||this.openElements.current;this.treeAdapter.appendChild(e,t)}}_appendElement(t,e){const n=this.treeAdapter.createElement(t.tagName,e,t.attrs);this._attachElementToTree(n)}_insertElement(t,e){const n=this.treeAdapter.createElement(t.tagName,e,t.attrs);this._attachElementToTree(n),this.openElements.push(n)}_insertFakeElement(t){const e=this.treeAdapter.createElement(t,v.HTML,[]);this._attachElementToTree(e),this.openElements.push(e)}_insertTemplate(t){const e=this.treeAdapter.createElement(t.tagName,v.HTML,t.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(e,n),this._attachElementToTree(e),this.openElements.push(e)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(m.HTML,v.HTML,[]);this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t)}_appendCommentNode(t,e){const n=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(e,n)}_insertCharacters(t){if(this._shouldFosterParentOnInsertion())this._fosterParentText(t.chars);else{const e=this.openElements.currentTmplContent||this.openElements.current;this.treeAdapter.insertText(e,t.chars)}}_adoptNodes(t,e){for(let n=this.treeAdapter.getFirstChild(t);n;n=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(e,n)}_shouldProcessTokenInForeignContent(t){const e=this._getAdjustedCurrentElement();if(!e||e===this.document)return!1;const n=this.treeAdapter.getNamespaceURI(e);if(n===v.HTML)return!1;if(this.treeAdapter.getTagName(e)===m.ANNOTATION_XML&&n===v.MATHML&&t.type===r.START_TAG_TOKEN&&t.tagName===m.SVG)return!1;const o=t.type===r.CHARACTER_TOKEN||t.type===r.NULL_CHARACTER_TOKEN||t.type===r.WHITESPACE_CHARACTER_TOKEN;return(!(t.type===r.START_TAG_TOKEN&&t.tagName!==m.MGLYPH&&t.tagName!==m.MALIGNMARK)&&!o||!this._isIntegrationPoint(e,v.MATHML))&&(t.type!==r.START_TAG_TOKEN&&!o||!this._isIntegrationPoint(e,v.HTML))&&t.type!==r.EOF_TOKEN}_processToken(t){q[this.insertionMode][t.type](this,t)}_processTokenInBodyMode(t){q[O][t.type](this,t)}_processTokenInForeignContent(t){t.type===r.CHARACTER_TOKEN?function(t,e){t._insertCharacters(e),t.framesetOk=!1}(this,t):t.type===r.NULL_CHARACTER_TOKEN?function(t,e){e.chars=h.REPLACEMENT_CHARACTER,t._insertCharacters(e)}(this,t):t.type===r.WHITESPACE_CHARACTER_TOKEN?ot(this,t):t.type===r.COMMENT_TOKEN?nt(this,t):t.type===r.START_TAG_TOKEN?function(t,e){if(d.causesExit(e)&&!t.fragmentContext){for(;t.treeAdapter.getNamespaceURI(t.openElements.current)!==v.HTML&&!t._isIntegrationPoint(t.openElements.current);)t.openElements.pop();t._processToken(e)}else{const n=t._getAdjustedCurrentElement(),r=t.treeAdapter.getNamespaceURI(n);r===v.MATHML?d.adjustTokenMathMLAttrs(e):r===v.SVG&&(d.adjustTokenSVGTagName(e),d.adjustTokenSVGAttrs(e)),d.adjustTokenXMLAttrs(e),e.selfClosing?t._appendElement(e,r):t._insertElement(e,r),e.ackSelfClosing=!0}}(this,t):t.type===r.END_TAG_TOKEN&&function(t,e){for(let n=t.openElements.stackTop;n>0;n--){const r=t.openElements.items[n];if(t.treeAdapter.getNamespaceURI(r)===v.HTML){t._processToken(e);break}if(t.treeAdapter.getTagName(r).toLowerCase()===e.tagName){t.openElements.popUntilElementPopped(r);break}}}(this,t)}_processInputToken(t){this._shouldProcessTokenInForeignContent(t)?this._processTokenInForeignContent(t):this._processToken(t),t.type===r.START_TAG_TOKEN&&t.selfClosing&&!t.ackSelfClosing&&this._err(f.nonVoidHtmlElementStartTagWithTrailingSolidus)}_isIntegrationPoint(t,e){const n=this.treeAdapter.getTagName(t),r=this.treeAdapter.getNamespaceURI(t),o=this.treeAdapter.getAttrList(t);return d.isIntegrationPoint(n,r,o,e)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.length;if(t){let e=t,n=null;do{if(e--,n=this.activeFormattingElements.entries[e],n.type===i.MARKER_ENTRY||this.openElements.contains(n.element)){e++;break}}while(e>0);for(let r=e;r<t;r++)n=this.activeFormattingElements.entries[r],this._insertElement(n.token,this.treeAdapter.getNamespaceURI(n.element)),n.element=this.openElements.current}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=I}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(m.P),this.openElements.popUntilTagNamePopped(m.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop,e=!1;t>=0;t--){let n=this.openElements.items[t];0===t&&(e=!0,this.fragmentContext&&(n=this.fragmentContext));const r=this.treeAdapter.getTagName(n),o=G[r];if(o){this.insertionMode=o;break}if(!(e||r!==m.TD&&r!==m.TH)){this.insertionMode=D;break}if(!e&&r===m.HEAD){this.insertionMode=E;break}if(r===m.SELECT){this._resetInsertionModeForSelect(t);break}if(r===m.TEMPLATE){this.insertionMode=this.currentTmplInsertionMode;break}if(r===m.HTML){this.insertionMode=this.headElement?x:w;break}if(e){this.insertionMode=O;break}}}_resetInsertionModeForSelect(t){if(t>0)for(let e=t-1;e>0;e--){const t=this.openElements.items[e],n=this.treeAdapter.getTagName(t);if(n===m.TEMPLATE)break;if(n===m.TABLE)return void(this.insertionMode=j)}this.insertionMode=R}_pushTmplInsertionMod
1e(t){this.tmplInsertionModeStack.push(t),this.tmplInsertionModeStackTop++,this.currentTmplInsertionMode=t}_popTmplInsertionMode(){this.tmplInsertionModeStack.pop(),this.tmplInsertionModeStackTop--,this.currentTmplInsertionMode=this.tmplInsertionModeStack[this.tmplInsertionModeStackTop]}_isElementCausesFosterParenting(t){const e=this.treeAdapter.getTagName(t);return e===m.TABLE||e===m.TBODY||e===m.TFOOT||e===m.THEAD||e===m.TR}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.current)}_findFosterParentingLocation(){const t={parent:null,beforeElement:null};for(let e=this.openElements.stackTop;e>=0;e--){const n=this.openElements.items[e],r=this.treeAdapter.getTagName(n),o=this.treeAdapter.getNamespaceURI(n);if(r===m.TEMPLATE&&o===v.HTML){t.parent=this.treeAdapter.getTemplateContent(n);break}if(r===m.TABLE){t.parent=this.treeAdapter.getParentNode(n),t.parent?t.beforeElement=n:t.parent=this.openElements.items[e-1];break}}return t.parent||(t.parent=this.openElements.items[0]),t}_fosterParentElement(t){const e=this._findFosterParentingLocation();e.beforeElement?this.treeAdapter.insertBefore(e.parent,t,e.beforeElement):this.treeAdapter.appendChild(e.parent,t)}_fosterParentText(t){const e=this._findFosterParentingLocation();e.beforeElement?this.treeAdapter.insertTextBefore(e.parent,t,e.beforeElement):this.treeAdapter.insertText(e.parent,t)}_isSpecialElement(t){const e=this.treeAdapter.getTagName(t),n=this.treeAdapter.getNamespaceURI(t);return g.SPECIAL_ELEMENTS[n][e]}}},6519:(t,e,n)=>{"use strict";const r=n(6152),o=r.TAG_NAMES,i=r.NAMESPACES;function a(t){switch(t.length){case 1:return t===o.P;case 2:return t===o.RB||t===o.RP||t===o.RT||t===o.DD||t===o.DT||t===o.LI;case 3:return t===o.RTC;case 6:return t===o.OPTION;case 8:return t===o.OPTGROUP}return!1}function s(t){switch(t.length){case 1:return t===o.P;case 2:return t===o.RB||t===o.RP||t===o.RT||t===o.DD||t===o.DT||t===o.LI||t===o.TD||t===o.TH||t===o.TR;case 3:return t===o.RTC;case 5:return t===o.TBODY||t===o.TFOOT||t===o.THEAD;case 6:return t===o.OPTION;case 7:return t===o.CAPTION;case 8:return t===o.OPTGROUP||t===o.COLGROUP}return!1}function l(t,e){switch(t.length){case 2:if(t===o.TD||t===o.TH)return e===i.HTML;if(t===o.MI||t===o.MO||t===o.MN||t===o.MS)return e===i.MATHML;break;case 4:if(t===o.HTML)return e===i.HTML;if(t===o.DESC)return e===i.SVG;break;case 5:if(t===o.TABLE)return e===i.HTML;if(t===o.MTEXT)return e===i.MATHML;if(t===o.TITLE)return e===i.SVG;break;case 6:return(t===o.APPLET||t===o.OBJECT)&&e===i.HTML;case 7:return(t===o.CAPTION||t===o.MARQUEE)&&e===i.HTML;case 8:return t===o.TEMPLATE&&e===i.HTML;case 13:return t===o.FOREIGN_OBJECT&&e===i.SVG;case 14:return t===o.ANNOTATION_XML&&e===i.MATHML}return!1}t.exports=class{constructor(t,e){this.stackTop=-1,this.items=[],this.current=t,this.currentTagName=null,this.currentTmplContent=null,this.tmplCount=0,this.treeAdapter=e}_indexOf(t){let e=-1;for(let n=this.stackTop;n>=0;n--)if(this.items[n]===t){e=n;break}return e}_isInTemplate(){return this.currentTagName===o.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===i.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagName=this.current&&this.treeAdapter.getTagName(this.current),this.currentTmplContent=this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):null}push(t){this.items[++this.stackTop]=t,this._updateCurrentElement(),this._isInTemplate()&&this.tmplCount++}pop(){this.stackTop--,this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this._updateCurrentElement()}replace(t,e){const n=this._indexOf(t);this.items[n]=e,n===this.stackTop&&this._updateCurrentElement()}insertAfter(t,e){const n=this._indexOf(t)+1;this.items.splice(n,0,e),n===++this.stackTop&&this._updateCurrentElement()}popUntilTagNamePopped(t){for(;this.stackTop>-1;){const e=this.currentTagName,n=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),e===t&&n===i.HTML)break}}popUntilElementPopped(t){for(;this.stackTop>-1;){const e=this.current;if(this.pop(),e===t)break}}popUntilNumberedHeaderPopped(){for(;this.stackTop>-1;){const t=this.currentTagName,e=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),t===o.H1||t===o.H2||t===o.H3||t===o.H4||t===o.H5||t===o.H6&&e===i.HTML)break}}popUntilTableCellPopped(){for(;this.stackTop>-1;){const t=this.currentTagName,e=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),t===o.TD||t===o.TH&&e===i.HTML)break}}popAllUpToHtmlElement(){this.stackTop=0,this._updateCurrentElement()}clearBackToTableContext(){for(;this.currentTagName!==o.TABLE&&this.currentTagName!==o.TEMPLATE&&this.currentTagName!==o.HTML||this.treeAdapter.getNamespaceURI(this.current)!==i.HTML;)this.pop()}clearBackToTableBodyContext(){for(;this.currentTagName!==o.TBODY&&this.currentTagName!==o.TFOOT&&this.currentTagName!==o.THEAD&&this.currentTagName!==o.TEMPLATE&&this.currentTagName!==o.HTML||this.treeAdapter.getNamespaceURI(this.current)!==i.HTML;)this.pop()}clearBackToTableRowContext(){for(;this.currentTagName!==o.TR&&this.currentTagName!==o.TEMPLATE&&this.currentTagName!==o.HTML||this.treeAdapter.getNamespaceURI(this.current)!==i.HTML;)this.pop()}remove(t){for(let e=this.stackTop;e>=0;e--)if(this.items[e]===t){this.items.splice(e,1),this.stackTop--,this._updateCurrentElement();break}}tryPeekProperlyNestedBodyElement(){const t=this.items[1];return t&&this.treeAdapter.getTagName(t)===o.BODY?t:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){let e=this._indexOf(t);return--e>=0?this.items[e]:null}isRootHtmlElementCurrent(){return 0===this.stackTop&&this.currentTagName===o.HTML}hasInScope(t){for(let e=this.stackTop;e>=0;e--){const n=this.treeAdapter.getTagName(this.items[e]),r=this.treeAdapter.getNamespaceURI(this.items[e]);if(n===t&&r===i.HTML)return!0;
1if(l(n,r))return!1}return!0}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const e=this.treeAdapter.getTagName(this.items[t]),n=this.treeAdapter.getNamespaceURI(this.items[t]);if((e===o.H1||e===o.H2||e===o.H3||e===o.H4||e===o.H5||e===o.H6)&&n===i.HTML)return!0;if(l(e,n))return!1}return!0}hasInListItemScope(t){for(let e=this.stackTop;e>=0;e--){const n=this.treeAdapter.getTagName(this.items[e]),r=this.treeAdapter.getNamespaceURI(this.items[e]);if(n===t&&r===i.HTML)return!0;if((n===o.UL||n===o.OL)&&r===i.HTML||l(n,r))return!1}return!0}hasInButtonScope(t){for(let e=this.stackTop;e>=0;e--){const n=this.treeAdapter.getTagName(this.items[e]),r=this.treeAdapter.getNamespaceURI(this.items[e]);if(n===t&&r===i.HTML)return!0;if(n===o.BUTTON&&r===i.HTML||l(n,r))return!1}return!0}hasInTableScope(t){for(let e=this.stackTop;e>=0;e--){const n=this.treeAdapter.getTagName(this.items[e]);if(this.treeAdapter.getNamespaceURI(this.items[e])===i.HTML){if(n===t)return!0;if(n===o.TABLE||n===o.TEMPLATE||n===o.HTML)return!1}}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--){const e=this.treeAdapter.getTagName(this.items[t]);if(this.treeAdapter.getNamespaceURI(this.items[t])===i.HTML){if(e===o.TBODY||e===o.THEAD||e===o.TFOOT)return!0;if(e===o.TABLE||e===o.HTML)return!1}}return!0}hasInSelectScope(t){for(let e=this.stackTop;e>=0;e--){const n=this.treeAdapter.getTagName(this.items[e]);if(this.treeAdapter.getNamespaceURI(this.items[e])===i.HTML){if(n===t)return!0;if(n!==o.OPTION&&n!==o.OPTGROUP)return!1}}return!0}generateImpliedEndTags(){for(;a(this.currentTagName);)this.pop()}generateImpliedEndTagsThoroughly(){for(;s(this.currentTagName);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;a(this.currentTagName)&&this.currentTagName!==t;)this.pop()}}},3988:(t,e,n)=>{"use strict";const r=n(7296),o=n(8904),i=n(1515),a=n(6152),s=a.TAG_NAMES,l=a.NAMESPACES,c={treeAdapter:r},u=/&/g,p=/\u00a0/g,d=/"/g,f=/</g,h=/>/g;class g{constructor(t,e){this.options=o(c,e),this.treeAdapter=this.options.treeAdapter,this.html="",this.startNode=t}serialize(){return this._serializeChildNodes(this.startNode),this.html}_serializeChildNodes(t){const e=this.treeAdapter.getChildNodes(t);if(e)for(let n=0,r=e.length;n<r;n++){const t=e[n];this.treeAdapter.isElementNode(t)?this._serializeElement(t):this.treeAdapter.isTextNode(t)?this._serializeTextNode(t):this.treeAdapter.isCommentNode(t)?this._serializeCommentNode(t):this.treeAdapter.isDocumentTypeNode(t)&&this._serializeDocumentTypeNode(t)}}_serializeElement(t){const e=this.treeAdapter.getTagName(t),n=this.treeAdapter.getNamespaceURI(t);if(this.html+="<"+e,this._serializeAttributes(t),this.html+=">",e!==s.AREA&&e!==s.BASE&&e!==s.BASEFONT&&e!==s.BGSOUND&&e!==s.BR&&e!==s.COL&&e!==s.EMBED&&e!==s.FRAME&&e!==s.HR&&e!==s.IMG&&e!==s.INPUT&&e!==s.KEYGEN&&e!==s.LINK&&e!==s.META&&e!==s.PARAM&&e!==s.SOURCE&&e!==s.TRACK&&e!==s.WBR){const r=e===s.TEMPLATE&&n===l.HTML?this.treeAdapter.getTemplateContent(t):t;this._serializeChildNodes(r),this.html+="</"+e+">"}}_serializeAttributes(t){const e=this.treeAdapter.getAttrList(t);for(let n=0,r=e.length;n<r;n++){const t=e[n],r=g.escapeString(t.value,!0);this.html+=" ",t.namespace?t.namespace===l.XML?this.html+="xml:"+t.name:t.namespace===l.XMLNS?("xmlns"!==t.name&&(this.html+="xmlns:"),this.html+=t.name):t.namespace===l.XLINK?this.html+="xlink:"+t.name:this.html+=t.prefix+":"+t.name:this.html+=t.name,this.html+='="'+r+'"'}}_serializeTextNode(t){const e=this.treeAdapter.getTextNodeContent(t),n=this.treeAdapter.getParentNode(t);let r;n&&this.treeAdapter.isElementNode(n)&&(r=this.treeAdapter.getTagName(n)),r===s.STYLE||r===s.SCRIPT||r===s.XMP||r===s.IFRAME||r===s.NOEMBED||r===s.NOFRAMES||r===s.PLAINTEXT||r===s.NOSCRIPT?this.html+=e:this.html+=g.escapeString(e,!1)}_serializeCommentNode(t){this.html+="\x3c!--"+this.treeAdapter.getCommentNodeContent(t)+"--\x3e"}_serializeDocumentTypeNode(t){const e=this.treeAdapter.getDocumentTypeNodeName(t);this.html+="<"+i.serializeContent(e,null,null)+">"}}g.escapeString=function(t,e){return t=t.replace(u,"&").replace(p," "),e?t.replace(d,"""):t.replace(f,"<").replace(h,">")},t.exports=g},5763:(t,e,n)=>{"use strict";const r=n(7118),o=n(4284),i=n(5482),a=n(1734),s=o.CODE_POINTS,l=o.CODE_POINT_SEQUENCES,c={128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376},u="DATA_STATE",p="RCDATA_STATE",d="RAWTEXT_STATE",f="SCRIPT_DATA_STATE",h="PLAINTEXT_STATE",g="TAG_OPEN_STATE",m="END_TAG_OPEN_STATE",v="TAG_NAME_STATE",y="RCDATA_LESS_THAN_SIGN_
1STATE",b="RCDATA_END_TAG_OPEN_STATE",_="RCDATA_END_TAG_NAME_STATE",T="RAWTEXT_LESS_THAN_SIGN_STATE",C="RAWTEXT_END_TAG_OPEN_STATE",w="RAWTEXT_END_TAG_NAME_STATE",E="SCRIPT_DATA_LESS_THAN_SIGN_STATE",S="SCRIPT_DATA_END_TAG_OPEN_STATE",x="SCRIPT_DATA_END_TAG_NAME_STATE",O="SCRIPT_DATA_ESCAPE_START_STATE",A="SCRIPT_DATA_ESCAPE_START_DASH_STATE",k="SCRIPT_DATA_ESCAPED_STATE",P="SCRIPT_DATA_ESCAPED_DASH_STATE",N="SCRIPT_DATA_ESCAPED_DASH_DASH_STATE",M="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE",L="SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE",I="SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE",D="SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE",R="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",j="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE",H="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE",F="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE",B="SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE",V="BEFORE_ATTRIBUTE_NAME_STATE",U="ATTRIBUTE_NAME_STATE",z="AFTER_ATTRIBUTE_NAME_STATE",G="BEFORE_ATTRIBUTE_VALUE_STATE",$="ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE",q="ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE",W="ATTRIBUTE_VALUE_UNQUOTED_STATE",K="AFTER_ATTRIBUTE_VALUE_QUOTED_STATE",Y="SELF_CLOSING_START_TAG_STATE",X="BOGUS_COMMENT_STATE",Z="MARKUP_DECLARATION_OPEN_STATE",Q="COMMENT_START_STATE",J="COMMENT_START_DASH_STATE",tt="COMMENT_STATE",et="COMMENT_LESS_THAN_SIGN_STATE",nt="COMMENT_LESS_THAN_SIGN_BANG_STATE",rt="COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE",ot="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE",it="COMMENT_END_DASH_STATE",at="COMMENT_END_STATE",st="COMMENT_END_BANG_STATE",lt="DOCTYPE_STATE",ct="BEFORE_DOCTYPE_NAME_STATE",ut="DOCTYPE_NAME_STATE",pt="AFTER_DOCTYPE_NAME_STATE",dt="AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE",ft="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE",ht="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE",gt="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE",mt="AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE",vt="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE",yt="AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE",bt="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE",_t="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE",Tt="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE",Ct="AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE",wt="BOGUS_DOCTYPE_STATE",Et="CDATA_SECTION_STATE",St="CDATA_SECTION_BRACKET_STATE",xt="CDATA_SECTION_END_STATE",Ot="CHARACTER_REFERENCE_STATE",At="NAMED_CHARACTER_REFERENCE_STATE",kt="AMBIGUOS_AMPERSAND_STATE",Pt="NUMERIC_CHARACTER_REFERENCE_STATE",Nt="HEXADEMICAL_CHARACTER_REFERENCE_START_STATE",Mt="DECIMAL_CHARACTER_REFERENCE_START_STATE",Lt="HEXADEMICAL_CHARACTER_REFERENCE_STATE",It="DECIMAL_CHARACTER_REFERENCE_STATE",Dt="NUMERIC_CHARACTER_REFERENCE_END_STATE";function Rt(t){return t===s.SPACE||t===s.LINE_FEED||t===s.TABULATION||t===s.FORM_FEED}function jt(t){return t>=s.DIGIT_0&&t<=s.DIGIT_9}function Ht(t){return t>=s.LATIN_CAPITAL_A&&t<=s.LATIN_CAPITAL_Z}function Ft(t){return t>=s.LATIN_SMALL_A&&t<=s.LATIN_SMALL_Z}function Bt(t){return Ft(t)||Ht(t)}function Vt(t){return Bt(t)||jt(t)}function Ut(t){return t>=s.LATIN_CAPITAL_A&&t<=s.LATIN_CAPITAL_F}function zt(t){return t>=s.LATIN_SMALL_A&&t<=s.LATIN_SMALL_F}function Gt(t){return t+32}function $t(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(t>>>10&1023|55296)+String.fromCharCode(56320|1023&t))}function qt(t){return String.fromCharCode(Gt(t))}function Wt(t,e){const n=i[++t];let r=++t,o=r+n-1;for(;r<=o;){const t=r+o>>>1,a=i[t];if(a<e)r=t+1;else{if(!(a>e))return i[t+n];o=t-1}}return-1}class Kt{constructor(){this.preprocessor=new r,this.tokenQueue=[],this.allowCDATA=!1,this.state=u,this.returnState="",this.charRefCode=-1,this.tempBuff=[],this.lastStartTagName="",this.consumedAfterSnapshot=-1,this.active=!1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr=null}_err(){}_errOnNextCodePoint(t){this._consume(),this._err(t),this._unconsume()}getNextToken(){for(;!this.tokenQueue.length&&this.active;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this[this.state](t)}return this.tokenQueue.shift()}write(t,e){this.active=!0,this.preprocessor.write(t,e)}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t)}_ensureHibernation(){if(this.preprocessor.endOfChunkHit){for(;this.consumedAfterSnapshot>0;this.consumedAfterSnapshot--)this.preprocessor.retreat();return this.active=!1,this.tokenQueue.push({type:Kt.HIBERNATION_TOKEN}),!0}return!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_unconsume(){this.consumedAfterSnapshot--,this.preprocessor.retreat()}_reconsumeInState(t){this.state=t,this._unconsume()}_consumeSequenceIfMatch(t,e,n){let r=0,o=!0;const i=t.length;let a,l=0,c=e;for(;l<i;l++){if(l>0&&(c=this._consume(),r++),c===s.EOF){o=!1;break}if(a=t[l],c!==a&&(n||c!==Gt(a))){o=!1;break}}if(!o)for(;r--;)this._unconsume();return o}_isTempBufferEqualToScriptString(){if(this.tempBuff.length!==l.SCRIPT_STRING.length)return!1;for(let t=0;t<this.tempBuff.length;t++)if(this.tempBuff[t]!==l.SCRIPT_STRING[t])return!1;return!0}_createStartTagToken(){this.currentToken={type:Kt.START_TAG_TOKEN,tagName:"",selfClosing:!1,ackSelfClosing:!1,attrs:[]}}_createEndTagToken(){this.currentToken={type:Kt.END_TAG_TOKEN,tagName:"",selfClosing:!1,attrs:[]}}_createCommentToken(){this.currentToken={type:Kt.COMMENT_TOKEN,data:""}}_createDoctypeToken(t){this.currentToken={type:Kt.DOCTYPE_TOKEN,name:t,forceQuirks:!1,publicId:null,
1systemId:null}}_createCharacterToken(t,e){this.currentCharacterToken={type:t,chars:e}}_createEOFToken(){this.currentToken={type:Kt.EOF_TOKEN}}_createAttr(t){this.currentAttr={name:t,value:""}}_leaveAttrName(t){null===Kt.getTokenAttr(this.currentToken,this.currentAttr.name)?this.currentToken.attrs.push(this.currentAttr):this._err(a.duplicateAttribute),this.state=t}_leaveAttrValue(t){this.state=t}_emitCurrentToken(){this._emitCurrentCharacterToken();const t=this.currentToken;this.currentToken=null,t.type===Kt.START_TAG_TOKEN?this.lastStartTagName=t.tagName:t.type===Kt.END_TAG_TOKEN&&(t.attrs.length>0&&this._err(a.endTagWithAttributes),t.selfClosing&&this._err(a.endTagWithTrailingSolidus)),this.tokenQueue.push(t)}_emitCurrentCharacterToken(){this.currentCharacterToken&&(this.tokenQueue.push(this.currentCharacterToken),this.currentCharacterToken=null)}_emitEOFToken(){this._createEOFToken(),this._emitCurrentToken()}_appendCharToCurrentCharacterToken(t,e){this.currentCharacterToken&&this.currentCharacterToken.type!==t&&this._emitCurrentCharacterToken(),this.currentCharacterToken?this.currentCharacterToken.chars+=e:this._createCharacterToken(t,e)}_emitCodePoint(t){let e=Kt.CHARACTER_TOKEN;Rt(t)?e=Kt.WHITESPACE_CHARACTER_TOKEN:t===s.NULL&&(e=Kt.NULL_CHARACTER_TOKEN),this._appendCharToCurrentCharacterToken(e,$t(t))}_emitSeveralCodePoints(t){for(let e=0;e<t.length;e++)this._emitCodePoint(t[e])}_emitChars(t){this._appendCharToCurrentCharacterToken(Kt.CHARACTER_TOKEN,t)}_matchNamedCharacterReference(t){let e=null,n=1,r=Wt(0,t);for(this.tempBuff.push(t);r>-1;){const t=i[r],o=t<7;o&&1&t&&(e=2&t?[i[++r],i[++r]]:[i[++r]],n=0);const a=this._consume();if(this.tempBuff.push(a),n++,a===s.EOF)break;r=o?4&t?Wt(r,a):-1:a===t?++r:-1}for(;n--;)this.tempBuff.pop(),this._unconsume();return e}_isCharacterReferenceInAttribute(){return this.returnState===$||this.returnState===q||this.returnState===W}_isCharacterReferenceAttributeQuirk(t){if(!t&&this._isCharacterReferenceInAttribute()){const t=this._consume();return this._unconsume(),t===s.EQUALS_SIGN||Vt(t)}return!1}_flushCodePointsConsumedAsCharacterReference(){if(this._isCharacterReferenceInAttribute())for(let t=0;t<this.tempBuff.length;t++)this.currentAttr.value+=$t(this.tempBuff[t]);else this._emitSeveralCodePoints(this.tempBuff);this.tempBuff=[]}[u](t){this.preprocessor.dropParsedChunk(),t===s.LESS_THAN_SIGN?this.state=g:t===s.AMPERSAND?(this.returnState=u,this.state=Ot):t===s.NULL?(this._err(a.unexpectedNullCharacter),this._emitCodePoint(t)):t===s.EOF?this._emitEOFToken():this._emitCodePoint(t)}[p](t){this.preprocessor.dropParsedChunk(),t===s.AMPERSAND?(this.returnState=p,this.state=Ot):t===s.LESS_THAN_SIGN?this.state=y:t===s.NULL?(this._err(a.unexpectedNullCharacter),this._emitChars(o.REPLACEMENT_CHARACTER)):t===s.EOF?this._emitEOFToken():this._emitCodePoint(t)}[d](t){this.preprocessor.dropParsedChunk(),t===s.LESS_THAN_SIGN?this.state=T:t===s.NULL?(this._err(a.unexpectedNullCharacter),this._emitChars(o.REPLACEMENT_CHARACTER)):t===s.EOF?this._emitEOFToken():this._emitCodePoint(t)}[f](t){this.preprocessor.dropParsedChunk(),t===s.LESS_THAN_SIGN?this.state=E:t===s.NULL?(this._err(a.unexpectedNullCharacter),this._emitChars(o.REPLACEMENT_CHARACTER)):t===s.EOF?this._emitEOFToken():this._emitCodePoint(t)}[h](t){this.preprocessor.dropParsedChunk(),t===s.NULL?(this._err(a.unexpectedNullCharacter),this._emitChars(o.REPLACEMENT_CHARACTER)):t===s.EOF?this._emitEOFToken():this._emitCodePoint(t)}[g](t){t===s.EXCLAMATION_MARK?this.state=Z:t===s.SOLIDUS?this.state=m:Bt(t)?(this._createStartTagToken(),this._reconsumeInState(v)):t===s.QUESTION_MARK?(this._err(a.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(),this._reconsumeInState(X)):t===s.EOF?(this._err(a.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken()):(this._err(a.invalidFirstCharacterOfTagName),this._emitChars("<"),this._reconsumeInState(u))}[m](t){Bt(t)?(this._createEndTagToken(),this._reconsumeInState(v)):t===s.GREATER_THAN_SIGN?(this._err(a.missingEndTagName),this.state=u):t===s.EOF?(this._err(a.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken()):(this._err(a.invalidFirstCharacterOfTagName),this._createCommentToken(),this._reconsumeInState(X))}[v](t){Rt(t)?this.state=V:t===s.SOLIDUS?this.state=Y:t===s.GREATER_THAN_SIGN?(this.state=u,this._emitCurrentToken()):Ht(t)?this.currentToken.tagName+=qt(t):t===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentToken.tagName+=o.REPLACEMENT_CHARACTER):t===s.EOF?(this._err(a.eofInTag),this._emitEOFToken()):this.currentToken.tagName+=$t(t)}[y](t){t===s.SOLIDUS?(this.tempBuff=[],this.state=b):(this._emitChars("<"),this._reconsumeInState(p))}[b](t){Bt(t)?(this._createEndTagToken(),this._reconsumeInState(_)):(this._emitChars("</"),this._reconsumeInState(p))}[_](t){if(Ht(t))this.currentToken.tagName+=qt(t),this.tempBuff.push(t);else if(Ft(t))this.currentToken.tagName+=$t(t),this.tempBuff.push(t);else{if(this.lastStartTagName===this.currentToken.tagName){if(Rt(t))return void(this.state=V);if(t===s.SOLIDUS)return void(this.state=Y);if(t===s.GREATER_THAN_SIGN)return this.state=u,void this._emitCurrentToken()}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState(p)}}[T](t){t===s.SOLIDUS?(this.tempBuff=[],this.state=C):(this._emitChars("<"),this._reconsumeInState(d))}[C](t){Bt(t)?(this._createEndTagToken(),this._reconsumeInState(w)):(this._emitChars("</"),this._reconsumeInState(d))}[w](t){if(Ht(t))this.currentToken.tagName+=qt(t),this.tempBuff.push(t);else if(Ft(t))this.currentToken.tagName+=$t(t),this.tempBuff.push(t);else{if(this.lastStartTagName===this.currentToken.tagName){if(Rt(t))return void(this.state=V);if(t===s.SOLIDUS)return void(this.state=Y);if(t===s.GREATER_THAN_SIGN)return this._emitCurrentToken(),void(this.state=u)}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState(d)}}[E](t){t===s.SOLIDUS?(this.tempBuff=[],this.state=S):t===s.EXCLAMATION_MARK?(this.state=O,this._emitChars("<!")):(this._emitChars("<"),this._reconsumeInState(f))}[S](t){Bt(t)?(this._createEndTagToken(),this._reconsumeInState(x)):(this._emitChars("</"),this._reconsumeInState(f))}[x](t){if(Ht(t))this.currentToken.tagName+=qt(t),this.tempBuff.push(t);else if(Ft(t))this.currentToken.tagName+=$t(t),this.tempBuff.push(t);else{if(this.lastStartTagName===this.currentToken.tagName){if(Rt(t))return void(this.state=V);if(t===s.SOLIDUS)return void(this.state=Y);if(t===s.GREATER_THAN_SIGN)return this._emitCurrentToken(),void(this.state=u)}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState(f)}}[O](t){t===s.HYPHEN_MINUS?(this.state=A,this._emitChars("-")):this._reconsumeInState(f)}[A](t){t===s.HYPHEN_MINUS?(this.state=N,this._emitChars("-")):this._reconsumeInState(f)}[k](t){t===s.HYPHEN_MINUS?(this.state=P,this._emitChars("-")):t===s.LESS_THAN_SIGN?this.state=M:t===s.NULL?(this._err(a.unexpectedNullCharacter),this._emitChars(o.REPLACEMENT_CHARACTER)):t===s.EOF?(this._err(a.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):this._emitCodePoint(t)}[P](t){t===s.HYPHEN_MINUS?(this.state=N,this._emitChars("-")):t===s.LESS_THAN_SIGN?this.state=M:t===s.NULL?(this._err(a.unexpectedNullCharacter),this.state=k,this._emitChars(o.REPLACEMENT_CHARACTER)):t===s.EOF?(this._err(a.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=k,this._emitCodePoint(t))}[N](t){t===s.HYPHEN_MINUS?this._emitChars("-"):t===s.LESS_THAN_SIGN?this.state=M:t===s.GREATER_THAN_SIGN?(this.state=f,this._emitChars(">")):t===s.NULL?(this._err(a.unexpectedNullCharacter),this.state=k,this._emitChars(o.REPLACEMENT_CHARACTER)):t===s.EOF?(this._err(a.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=k,this._emitCodePoint(t))}[M](t){t===s.SOLIDUS?(this.tempBuff=[],this.state=L):Bt(t)?(this.tempBuff=[],this._emitChars("<"),this._reconsumeInState(D)):(this._emitChars("<"),this._reconsumeInState(k))}[L](t){Bt(t)?(this._createEndTagToken(),this._reconsumeInState(I)):(this._emitChars("</"),this._reconsumeInState(k))}[I](t){if(Ht(t))this.currentToken.tagName+=qt(t),this.tempBuff.push(t);else if(Ft(t))this.currentToken.tagName+=$t(t),this.tempBuff.push(t);else{if(this.lastStartTagName===this.currentToken.tagName){if(Rt(t))return void(this.state=V);if(t===s.SOLIDUS)return void(this.state=Y);if(t===s.GREATER_THAN_SIGN)return this._emitCurrentToken(),void(this.state=u)}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState(k)}}[D](t){Rt(t)||t===s.SOLIDUS||t===s.GREATER_THAN_SIGN?(this.state=this._isTempBufferEqualToScriptString()?R:k,this._emitCodePoint(t)):Ht(t)?(this.tempBuff.push(Gt(t)),this._emitCodePoint(t)):Ft(t)?(this.tempBuff.push(t),this._emitCodePoint(t)):this._reconsumeInState(k)}[R](t){t===s.HYPHEN_MINUS?(this.state=j,this._emitChars("-")):t===s.LESS_THAN_SIGN?(this.state=F,this._emitChars("<")):t===s.NULL?(this._err(a.unexpectedNullCharacter),this._emitChars(o.REPLACEMENT_CHARACTER)):t===s.EOF?(this._err(a.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):this._emitCodePoint(t)}[j](t){t===s.HYPHEN_MINUS?(this.state=H,this._emitChars("-")):t===s.LESS_THAN_SIGN?(this.state=F,this._emitChars("<")):t===s.NULL?(this._err(a.unexpectedNullCharacter),this.state=R,this._emitChars(o.REPLACEMENT_CHARACTER)):t===s.EOF?(this._err(a.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=R,this._emitCodePoint(t))}[H](t){t===s.HYPHEN_MINUS?this._emitChars("-"):t===s.LESS_THAN_SIGN?(this.state=F,this._emitChars("<")):t===s.GREATER_THAN_SIGN?(this.state=f,this._emitChars(">")):t===s.NULL?(this._err(a.unexpectedNullCharacter),this.state=R,this._emitChars(o.REPLACEMENT_CHARACTER)):t===s.EOF?(this._err(a.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=R,this._emitCodePoint(t))}[F](t){t===s.SOLIDUS?(this.tempBuff=[],this.state=B,this._emitChars("/")):this._reconsumeInState(R)}[B](t){Rt(t)||t===s.SOLIDUS||t===s.GREATER_THAN_SIGN?(this.state=this._isTempBufferEqualToScriptString()?k:R,this._emitCodePoint(t)):Ht(t)?(this.tempBuff.push(Gt(t)),this._emitCodePoint(t)):Ft(t)?(this.tempBuff.push(t),this._emitCodePoint(t)):this._reconsumeInState(R)}[V](t){Rt(t)||(t===s.SOLIDUS||t===s.GREATER_THAN_SIGN||t===s.EOF?this._reconsumeInState(z):t===s.EQUALS_SIGN?(this._err(a.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=U):(this._createAttr(""),this._reconsumeInState(U)))}[U](t){Rt(t)||t===s.SOLIDUS||t===s.GREATER_THAN_SIGN||t===s.EOF?(this._leaveAttrName(z),this._unconsume()):t===s.EQUALS_SIGN?this._leaveAttrName(G):Ht(t)?this.currentAttr.name+=qt(t):t===s.QUOTATION_MARK||t===s.APOSTROPHE||t===s.LESS_THAN_SIGN?(this._err(a.unexpectedCharacterInAttributeName),this.currentAttr.name+=$t(t)):t===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentAttr.name+=o.REPLACEMENT_CHARACTER):this.currentAttr.name+=$t(t)}[z](t){Rt(t)||(t===s.SOLIDUS?this.state=Y:t===s.EQUALS_SIGN?this.state=G:t===s.GREATER_THAN_SIGN?(this.state=u,this._emitCurrentToken()):t===s.EOF?(this._err(a.eofInTag),this._emitEOFToken()):(this._createAttr(""),this._reconsumeInState(U)))}[G](t){Rt(t)||(t===s.QUOTATION_MARK?this.state=$:t===s.APOSTROPHE?this.state=q:t===s.GREATER_THAN_SIGN?(this._err(a.missingAttributeValue),this.state=u,this._emitCurrentToken()):this._reconsumeInState(W))}[$](t){t===s.QUOTATION_MARK?this.state=K:t===s.AMPERSAND?(this.returnState=$,this.state=Ot):t===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentAttr.value+=o.REPLACEMENT_CHARACTER):t===s.EOF?(this._err(a.eofInTag),this._emitEOFToken()):this.currentAttr.value+=$t(t)}[q](t){t===s.APOSTROPHE?this.state=K:t===s.AMPERSAND?(this.returnState=q,this.state=Ot):t===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentAttr.value+=o.REPLACEMENT_CHARACTER):t===s.EOF?(this._err(a.eofInTag),this._emitEOFToken()):this.currentAttr.value+=$t(t)}[W](t){Rt(t)?this._leaveAttrValue(V):t===s.AMPERSAND?(this.returnState=W,this.state=Ot):t===s.GREATER_THAN_SIGN?(this._leaveAttrValue(u),this._emitCurrentToken()):t===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentAttr.value+=o.REPLACEMENT_CHARACTER):t===s.QUOTATION_MARK||t===s.APOSTROPHE||t===s.LESS_THAN_SIGN||t===s.EQUALS_SIGN||t===s.GRAVE_ACCENT?(this._err(a.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=$t(t)):t===s.EOF?(this._err(a.eofInTag),this._emitEOFToken()):this.currentAttr.value+=$t(t)}[K](t){Rt(t)?this._leaveAttrValue(V):t===s.SOLIDUS?this._leaveAttrValue(Y):t===s.GREATER_THAN_SIGN?(this._leaveAttrValue(u),this._emitCurrentToken()):t===s.EOF?(this._err(a.eofInTag),this._emitEOFToken()):(this._err(a.missingWhitespaceBetweenAttributes),this._reconsumeInState(V))}[Y](t){t===s.GREATER_THAN_SIGN?(this.currentToken.selfClosing=!0,this.state=u,this._emitCurrentToken()):t===s.EOF?(this._err(a.eofInTag),this._emitEOFToken()):(this._err(a.unexpectedSolidusInTag),this._reconsumeInState(V))}[X](t){t===s.GREATER_THAN_SIGN?(this.state=u,this._emitCurrentToken()):t===s.EOF?(this._emitCurrentToken(),this._emitEOFToken()):t===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentToken.data+=o.REPLACEMENT_CHARACTER):this.currentToken.data+=$t(t)}[Z](t){this._consumeSequenceIfMatch(l.DASH_DASH_STRING,t,!0)?(this._createCommentToken(),this.state=Q):this._consumeSequenceIfMatch(l.DOCTYPE_STRING,t,!1)?this.state=lt:this._consumeSequenceIfMatch(l.CDATA_START_STRING,t,!0)?this.allowCDATA?this.state=Et:(this._err(a.cdataInHtmlContent),this._createCommentToken(),this.currentToken.data="[CDATA[",this.state=X):this._ensureHibernation()||(this._err(a.incorrectlyOpenedComment),this._createCommentToken(),this._reconsumeInState(X))}[Q](t){t===s.HYPHEN_MINUS?this.state=J:t===s.GREATER_THAN_SIGN?(this._err(a.abruptClosingOfEmptyComment),this.state=u,this._emitCurrentToken()):this._reconsumeInState(tt)}[J](t){t===s.HYPHEN_MINUS?this.state=at:t===s.GREATER_THAN_SIGN?(this._err(a.abruptClosingOfEmptyComment),this.state=u,this._emitCurrentToken()):t===s.EOF?(this._err(a.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState(tt))}[tt](t){t===s.HYPHEN_MINUS?this.state=it:t===s.LESS_THAN_SIGN?(this.currentToken.data+="<",this.state=et):t===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentToken.data+=o.REPLACEMENT_CHARACTER):t===s.EOF?(this._err(a.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.data+=$t(t)}[et](t){t===s.EXCLAMATION_MARK?(this.currentToken.data+="!",this.state=nt):t===s.LESS_THAN_SIGN?this.currentToken.data+="!":this._reconsumeInState(tt)}[nt](t){t===s.HYPHEN_MINUS?this.state=rt:this._reconsumeInState(tt)}[rt](t){t===s.HYPHEN_MINUS?this.state=ot:this._reconsumeInState(it)}[ot](t){t!==s.GREATER_THAN_SIGN&&t!==s.EOF&&this._err(a.nestedComment),this._reconsumeInState(at)}[it](t){t===s.HYPHEN_MINUS?this.state=at:t===s.EOF?(this._err(a.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState(tt))}[at](t){t===s.GREATER_THAN_SIGN?(this.state=u,this._emitCurrentToken()):t===s.EXCLAMATION_MARK?this.state=st:t===s.HYPHEN_MINUS?this.currentToken.data+="-":t===s.EOF?(this._err(a.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--",this._reconsumeInState(tt))}[st](t){t===s.HYPHEN_MINUS?(this.currentToken.data+="--!",this.state=it):t===s.GREATER_THAN_SIGN?(this._err(a.incorrectlyClosedComment),this.state=u,this._emitCurrentToken()):t===s.EOF?(this._err(a.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--!",this._reconsumeInState(tt))}[lt](t){Rt(t)?this.state=ct:t===s.GREATER_THAN_SIGN?this._reconsumeInState(ct):t===s.EOF?(this._err(a.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(a.missingWhitespaceBeforeDoctypeName),this._reconsumeInState(ct))}[ct](t){Rt(t)||(Ht(t)?(this._createDoctypeToken(qt(t)),this.state=ut):t===s.NULL?(this._err(a.unexpectedNullCharacter),this._createDoctypeToken(o.REPLACEMENT_CHARACTER),this.state=ut):t===s.GREATER_THAN_SIGN?(this._err(a.missingDoctypeName),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=u):t===s.EOF?(this._err(a.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._e
1mitEOFToken()):(this._createDoctypeToken($t(t)),this.state=ut))}[ut](t){Rt(t)?this.state=pt:t===s.GREATER_THAN_SIGN?(this.state=u,this._emitCurrentToken()):Ht(t)?this.currentToken.name+=qt(t):t===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentToken.name+=o.REPLACEMENT_CHARACTER):t===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.name+=$t(t)}[pt](t){Rt(t)||(t===s.GREATER_THAN_SIGN?(this.state=u,this._emitCurrentToken()):t===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this._consumeSequenceIfMatch(l.PUBLIC_STRING,t,!1)?this.state=dt:this._consumeSequenceIfMatch(l.SYSTEM_STRING,t,!1)?this.state=yt:this._ensureHibernation()||(this._err(a.invalidCharacterSequenceAfterDoctypeName),this.currentToken.forceQuirks=!0,this._reconsumeInState(wt)))}[dt](t){Rt(t)?this.state=ft:t===s.QUOTATION_MARK?(this._err(a.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state=ht):t===s.APOSTROPHE?(this._err(a.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state=gt):t===s.GREATER_THAN_SIGN?(this._err(a.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=u,this._emitCurrentToken()):t===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(a.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(wt))}[ft](t){Rt(t)||(t===s.QUOTATION_MARK?(this.currentToken.publicId="",this.state=ht):t===s.APOSTROPHE?(this.currentToken.publicId="",this.state=gt):t===s.GREATER_THAN_SIGN?(this._err(a.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=u,this._emitCurrentToken()):t===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(a.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(wt)))}[ht](t){t===s.QUOTATION_MARK?this.state=mt:t===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentToken.publicId+=o.REPLACEMENT_CHARACTER):t===s.GREATER_THAN_SIGN?(this._err(a.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=u):t===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=$t(t)}[gt](t){t===s.APOSTROPHE?this.state=mt:t===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentToken.publicId+=o.REPLACEMENT_CHARACTER):t===s.GREATER_THAN_SIGN?(this._err(a.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=u):t===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=$t(t)}[mt](t){Rt(t)?this.state=vt:t===s.GREATER_THAN_SIGN?(this.state=u,this._emitCurrentToken()):t===s.QUOTATION_MARK?(this._err(a.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state=_t):t===s.APOSTROPHE?(this._err(a.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state=Tt):t===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(a.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(wt))}[vt](t){Rt(t)||(t===s.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=u):t===s.QUOTATION_MARK?(this.currentToken.systemId="",this.state=_t):t===s.APOSTROPHE?(this.currentToken.systemId="",this.state=Tt):t===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(a.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(wt)))}[yt](t){Rt(t)?this.state=bt:t===s.QUOTATION_MARK?(this._err(a.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state=_t):t===s.APOSTROPHE?(this._err(a.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state=Tt):t===s.GREATER_THAN_SIGN?(this._err(a.missingDoctype
1SystemIdentifier),this.currentToken.forceQuirks=!0,this.state=u,this._emitCurrentToken()):t===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(a.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(wt))}[bt](t){Rt(t)||(t===s.QUOTATION_MARK?(this.currentToken.systemId="",this.state=_t):t===s.APOSTROPHE?(this.currentToken.systemId="",this.state=Tt):t===s.GREATER_THAN_SIGN?(this._err(a.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=u,this._emitCurrentToken()):t===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(a.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(wt)))}[_t](t){t===s.QUOTATION_MARK?this.state=Ct:t===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentToken.systemId+=o.REPLACEMENT_CHARACTER):t===s.GREATER_THAN_SIGN?(this._err(a.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=u):t===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=$t(t)}[Tt](t){t===s.APOSTROPHE?this.state=Ct:t===s.NULL?(this._err(a.unexpectedNullCharacter),this.currentToken.systemId+=o.REPLACEMENT_CHARACTER):t===s.GREATER_THAN_SIGN?(this._err(a.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=u):t===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=$t(t)}[Ct](t){Rt(t)||(t===s.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=u):t===s.EOF?(this._err(a.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(a.unexpectedCharacterAfterDoctypeSystemIdentifier),this._reconsumeInState(wt)))}[wt](t){t===s.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=u):t===s.NULL?this._err(a.unexpectedNullCharacter):t===s.EOF&&(this._emitCurrentToken(),this._emitEOFToken())}[Et](t){t===s.RIGHT_SQUARE_BRACKET?this.state=St:t===s.EOF?(this._err(a.eofInCdata),this._emitEOFToken()):this._emitCodePoint(t)}[St](t){t===s.RIGHT_SQUARE_BRACKET?this.state=xt:(this._emitChars("]"),this._reconsumeInState(Et))}[xt](t){t===s.GREATER_THAN_SIGN?this.state=u:t===s.RIGHT_SQUARE_BRACKET?this._emitChars("]"):(this._emitChars("]]"),this._reconsumeInState(Et))}[Ot](t){this.tempBuff=[s.AMPERSAND],t===s.NUMBER_SIGN?(this.tempBuff.push(t),this.state=Pt):Vt(t)?this._reconsumeInState(At):(this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}[At](t){const e=this._matchNamedCharacterReference(t);if(this._ensureHibernation())this.tempBuff=[s.AMPERSAND];else if(e){const t=this.tempBuff[this.tempBuff.length-1]===s.SEMICOLON;this._isCharacterReferenceAttributeQuirk(t)||(t||this._errOnNextCodePoint(a.missingSemicolonAfterCharacterReference),this.tempBuff=e),this._flushCodePointsConsumedAsCharacterReference(),this.state=this.returnState}else this._flushCodePointsConsumedAsCharacterReference(),this.state=kt}[kt](t){Vt(t)?this._isCharacterReferenceInAttribute()?this.currentAttr.value+=$t(t):this._emitCodePoint(t):(t===s.SEMICOLON&&this._err(a.unknownNamedCharacterReference),this._reconsumeInState(this.returnState))}[Pt](t){this.charRefCode=0,t===s.LATIN_SMALL_X||t===s.LATIN_CAPITAL_X?(this.tempBuff.push(t),this.state=Nt):this._reconsumeInState(Mt)}[Nt](t){!function(t){return jt(t)||Ut(t)||zt(t)}(t)?(this._err(a.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState)):this._reconsumeInState(Lt)}[Mt](t){jt(t)?this._reconsumeInState(It):(this._err(a.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}[Lt](t){Ut(t)?this.charRefCode=16*this.charRefCode+t-55:zt(t)?this.charRefCode=16*this.charRefCode+t-87:jt(t)?this.charRefCode=16*this.charRefCode+t-48:t===s.SEMICOLON?this.state=Dt:(this._err(a.missingSemicolonAfterCharacterReference),this._reconsumeInState(Dt))}[It](t){jt(t)?this.charRefCode=10*this.charRefCode+t-48:t===s.SEMICOLON?this.state=Dt:(this._err(a.missingSemicolonAfterCharacterReference),this._reconsumeInState(Dt))}[Dt](){if(this.charRefCode===s.NULL)this._err(a.nullCharacterReference),this.charRefCode=s.REPLACEMENT_CHARACTER;else if(this.charRefCode>1114111)this._err(a.characterReferenceOutsideUnicodeRange),this.charRefCode=s.REPLACEMENT_CHARACTER;else if(o.isSurrogate(this.charRefCode))this._err(a.surrogateCharacterReference),this.charRefCode=s.REPLACEMENT_CHARACTER;else if(o.isUndefinedCodePoint(this.charRefCode))this._err(a.noncharacterCharacterReference);else if(o.isControlCodePoint(this.charRefCode)||this.charRefCode===s.CARRIAGE_RETURN){this._err(a.controlCharacterReference);const t=c[this.charRefCode];t&&(this.charRefCode=t)}this.tempBuff=[this.charRefCode],this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState)}}Kt.CHARACTER_TOKEN="CHARACTER_TOKEN",Kt.NULL_CHARACTER_TOKEN="NULL_CHARACTER_TOKEN",Kt.WHITESPACE_CHARACTER_TOKEN="WHITESPACE_CHARACTER_TOKEN",Kt.START_TAG_TOKEN="START_TAG_TOKEN",Kt.END_TAG_TOKEN="END_TAG_TOKEN",Kt.COMMENT_TOKEN="COMMENT_TOKEN",Kt.DOCTYPE_TOKEN="DOCTYPE_TOKEN",Kt.EOF_TOKEN="EOF_TOKEN",Kt.HIBERNATION_TOKEN="HIBERNATION_TOKEN",Kt.MODE={DATA:u,RCDATA:p,RAWTEXT:d,SCRIPT_DATA:f,PLAINTEXT:h},Kt.getTokenAttr=function(t,e){for(let n=t.attrs.length-1;n>=0;n--)if(t.attrs[n].name===e)return t.attrs[n].value;return null},t.exports=Kt},5482:t=>{"use strict";
1t.exports=new Uint16Array([4,52,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,106,303,412,810,1432,1701,1796,1987,2114,2360,2420,2484,3170,3251,4140,4393,4575,4610,5106,5512,5728,6117,6274,6315,6345,6427,6516,7002,7910,8733,9323,9870,10170,10631,10893,11318,11386,11467,12773,13092,14474,14922,15448,15542,16419,17666,18166,18611,19004,19095,19298,19397,4,16,69,77,97,98,99,102,103,108,109,110,111,112,114,115,116,117,140,150,158,169,176,194,199,210,216,222,226,242,256,266,283,294,108,105,103,5,198,1,59,148,1,198,80,5,38,1,59,156,1,38,99,117,116,101,5,193,1,59,167,1,193,114,101,118,101,59,1,258,4,2,105,121,182,191,114,99,5,194,1,59,189,1,194,59,1,1040,114,59,3,55349,56580,114,97,118,101,5,192,1,59,208,1,192,112,104,97,59,1,913,97,99,114,59,1,256,100,59,1,10835,4,2,103,112,232,237,111,110,59,1,260,102,59,3,55349,56632,112,108,121,70,117,110,99,116,105,111,110,59,1,8289,105,110,103,5,197,1,59,264,1,197,4,2,99,115,272,277,114,59,3,55349,56476,105,103,110,59,1,8788,105,108,100,101,5,195,1,59,292,1,195,109,108,5,196,1,59,301,1,196,4,8,97,99,101,102,111,114,115,117,321,350,354,383,388,394,400,405,4,2,99,114,327,336,10
17,115,108,97,115,104,59,1,8726,4,2,118,119,342,345,59,1,10983,101,100,59,1,8966,121,59,1,1041,4,3,99,114,116,362,369,379,97,117,115,101,59,1,8757,110,111,117,108,108,105,115,59,1,8492,97,59,1,914,114,59,3,55349,56581,112,102,59,3,55349,56633,101,118,101,59,1,728,99,114,59,1,8492,109,112,101,113,59,1,8782,4,14,72,79,97,99,100,101,102,104,105,108,111,114,115,117,442,447,456,504,542,547,569,573,577,616,678,784,790,796,99,121,59,1,1063,80,89,5,169,1,59,454,1,169,4,3,99,112,121,464,470,497,117,116,101,59,1,262,4,2,59,105,476,478,1,8914,116,97,108,68,105,102,102,101,114,101,110,116,105,97,108,68,59,1,8517,108,101,121,115,59,1,8493,4,4,97,101,105,111,514,520,530,535,114,111,110,59,1,268,100,105,108,5,199,1,59,528,1,199,114,99,59,1,264,110,105,110,116,59,1,8752,111,116,59,1,266,4,2,100,110,553,560,105,108,108,97,59,1,184,116,101,114,68,111,116,59,1,183,114,59,1,8493,105,59,1,935,114,99,108,101,4,4,68,77,80,84,591,596,603,609,111,116,59,1,8857,105,110,117,115,59,1,8854,108,117,115,59,1,8853,105,109,101,115,59,1,8855,111,4,2,99,115,623,646,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8754,101,67,117,114,108,121,4,2,68,81,658,671,111,117,98,108,101,81,117,111,116,101,59,1,8221,117,111,116,101,59,1,8217,4,4,108,110,112,117,688,701,736,753,111,110,4,2,59,101,696,698,1,8759,59,1,10868,4,3,103,105,116,709,717,722,114,117,101,110,116,59,1,8801,110,116,59,1,8751,111,117,114,73,110,116,101,103,114,97,108,59,1,8750,4,2,102,114,742,745,59,1,8450,111,100,117,99,116,59,1,8720,110,116,101,114,67,108,111,99,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8755,111,115,115,59,1,10799,99,114,59,3,55349,56478,112,4,2,59,67,803,805,1,8915,97,112,59,1,8781,4,11,68,74,83,90,97,99,101,102,105,111,115,834,850,855,860,865,888,903,916,921,1011,1415,4,2,59,111,840,842,1,8517,116,114,97,104,100,59,1,10513,99,121,59,1,1026,99,121,59,1,1029,99,121,59,1,1039,4,3,103,114,115,873,879,883,103,101,114,59,1,8225,114,59,1,8609,104,118,59,1,10980,4,2,97,121,894,900,114,111,110,59,1,270,59,1,1044,108,4,2,59,116,910,912,1,8711,97,59,1,916,114,59,3,55349,56583,4,2,97,102,927,998,4,2,99,109,933,992,114,105,116,105,99,97,108,4,4,65,68,71,84,950,957,978,985,99,117,116,101,59,1,180,111,4,2,116,117,964,967,59,1,729,98,108,101,65,99,117,116,101,59,1,733,114,97,118,101,59,1,96,105,108,100,101,59,1,732,111,110,100,59,1,8900,102,101,114,101,110,116,105,97,108,68,59,1,8518,4,4,112,116,117,119,1021,1026,1048,1249,102,59,3,55349,56635,4,3,59,68,69,1034,1036,1041,1,168,111,116,59,1,8412,113,117,97,108,59,1,8784,98,108,101,4,6,67,68,76,82,85,86,1065,1082,1101,1189,1211,1236,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8751,111,4,2,116,119,1089,1092,59,1,168,110,65,114,114,111,119,59,1,8659,4,2,101,111,1107,1141,102,116,4,3,65,82,84,1117,1124,1136,114,114,111,119,59,1,8656,105,103,104,116,65,114,114,111,119,59,1,8660,101,101,59,1,10980,110,103,4,2,76,82,1149,1177,101,102,116,4,2,65,82,1158,1165,114,114,111,119,59,1,10232,105,103,104,116,65,114,114,111,119,59,1,10234,105,103,104,116,65,114,114,111,119,59,1,10233,105,103,104,116,4,2,65,84,1199,1206,114,114,111,119,59,1,8658,101,101,59,1,8872,112,4,2,65,68,1218,1225,114,114,111,119,59,1,8657,111,119,110,65,114,114,111,119,59,1,8661,101,114,116,105,99,97,108,66,97,114,59,1,8741,110,4,6,65,66,76,82,84,97,1264,1292,1299,1352,1391,1408,114,114,111,119,4,3,59,66,85,1276,1278,1283,1,8595,97,114,59,1,10515,112,65,114,114,111,119,59,1,8693,114,101,118,101,59,1,785,101,102,116,4,3,82,84,86,1310,1323,1334,105,103,104,116,86,101,99,116,111,114,59,1,10576,101,101,86,101,99,116,111,114,59,1,10590,101,99,116,111,114,4,2,59,66,1345,1347,1,8637,97,114,59,1,10582,105,103,104,116,4,2,84,86,1362,1373,101,101,86,101,99,116,111,114,59,1,10591,101,99,116,111,114,4,2,59,66,1384,1386,1,8641,97,114,59,1,10583,101,101,4,2,59,65,1399,1401,1,8868,114,114,111,119,59,1,8615,114,114,111,119,59,1,8659,4,2,99,116,1421,1426,114,59,3,55349,56479,114,111,107,59,1,272,4,16,78,84,97,99,100,102,103,108,109,111,112,113,115,116,117,120,1466,1470,1478,1489,1515,1520,1525,1536,1544,1593,1609,1617,1650,1664,1668,1677,71,59,1,330,72,5,208,1,59,1476,1,208,99,117,116,101,5,201,1,59,1487,1,201,4,3,97,105,121,1497,1503,1512,114,111,110,59,1,282,114,99,5,202,1,59,1510,1,202,59,1,1069,111,116,59,1,278,114,59,3,55349,56584,114,97,118,101,5,200,1,59,1534,1,200,101,109,101,110,116,59,1,8712,4,2,97,112,1550,1555,99,114,59,1,274,116,121,4,2,83,86,1563,1576,109,97,108,108,83,113,117,97,114,101,59,1,9723,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9643,4,2,103,112,1599,1604,111,110,59,1,280,102,59,3,55349,56636,115,105,108,111,110,59,1,917,11
17,4,2,97,105,1624,1640,108,4,2,59,84,1631,1633,1,10869,105,108,100,101,59,1,8770,108,105,98,114,105,117,109,59,1,8652,4,2,99,105,1656,1660,114,59,1,8496,109,59,1,10867,97,59,1,919,109,108,5,203,1,59,1675,1,203,4,2,105,112,1683,1689,115,116,115,59,1,8707,111,110,101,110,116,105,97,108,69,59,1,8519,4,5,99,102,105,111,115,1713,1717,1722,1762,1791,121,59,1,1060,114,59,3,55349,56585,108,108,101,100,4,2,83,86,1732,1745,109,97,108,108,83,113,117,97,114,101,59,1,9724,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9642,4,3,112,114,117,1770,1775,1781,102,59,3,55349,56637,65,108,108,59,1,8704,114,105,101,114,116,114,102,59,1,8497,99,114,59,1,8497,4,12,74,84,97,98,99,100,102,103,111,114,115,116,1822,1827,1834,1848,1855,1877,1882,1887,1890,1896,1978,1984,99,121,59,1,1027,5,62,1,59,1832,1,62,109,109,97,4,2,59,100,1843,1845,1,915,59,1,988,114,101,118,101,59,1,286,4,3,101,105,121,1863,1869,1874,100,105,108,59,1,290,114,99,59,1,284,59,1,1043,111,116,59,1,288,114,59,3,55349,56586,59,1,8921,112,102,59,3,55349,56638,101,97,116,101,114,4,6,69,70,71,76,83,84,1915,1933,1944,1953,1959,1971,113,117,97,108,4,2,59,76,1925,1927,1,8805,101,115,115,59,1,8923,117,108,108,69,113,117,97,108,59,1,8807,114,101,97,116,101,114,59,1,10914,101,115,115,59,1,8823,108,97,110,116,69,113,117,97,108,59,1,10878,105,108,100,101,59,1,8819,99,114,59,3,55349,56482,59,1,8811,4,8,65,97,99,102,105,111,115,117,2005,2012,2026,2032,2036,2049,2073,2089,82,68,99,121,59,1,1066,4,2,99,116,2018,2023,101,107,59,1,711,59,1,94,105,114,99,59,1,292,114,59,1,8460,108,98,101,114,116,83,112,97,99,101,59,1,8459,4,2,112,114,2055,2059,102,59,1,8461,105,122,111,110,116,97,108,76,105,110,
1101,59,1,9472,4,2,99,116,2079,2083,114,59,1,8459,114,111,107,59,1,294,109,112,4,2,68,69,2097,2107,111,119,110,72,117,109,112,59,1,8782,113,117,97,108,59,1,8783,4,14,69,74,79,97,99,100,102,103,109,110,111,115,116,117,2144,2149,2155,2160,2171,2189,2194,2198,2209,2245,2307,2329,2334,2341,99,121,59,1,1045,108,105,103,59,1,306,99,121,59,1,1025,99,117,116,101,5,205,1,59,2169,1,205,4,2,105,121,2177,2186,114,99,5,206,1,59,2184,1,206,59,1,1048,111,116,59,1,304,114,59,1,8465,114,97,118,101,5,204,1,59,2207,1,204,4,3,59,97,112,2217,2219,2238,1,8465,4,2,99,103,2225,2229,114,59,1,298,105,110,97,114,121,73,59,1,8520,108,105,101,115,59,1,8658,4,2,116,118,2251,2281,4,2,59,101,2257,2259,1,8748,4,2,103,114,2265,2271,114,97,108,59,1,8747,115,101,99,116,105,111,110,59,1,8898,105,115,105,98,108,101,4,2,67,84,2293,2300,111,109,109,97,59,1,8291,105,109,101,115,59,1,8290,4,3,103,112,116,2315,2320,2325,111,110,59,1,302,102,59,3,55349,56640,97,59,1,921,99,114,59,1,8464,105,108,100,101,59,1,296,4,2,107,109,2347,2352,99,121,59,1,1030,108,5,207,1,59,2358,1,207,4,5,99,102,111,115,117,2372,2386,2391,2397,2414,4,2,105,121,2378,2383,114,99,59,1,308,59,1,1049,114,59,3,55349,56589,112,102,59,3,55349,56641,4,2,99,101,2403,2408,114,59,3,55349,56485,114,99,121,59,1,1032,107,99,121,59,1,1028,4,7,72,74,97,99,102,111,115,2436,2441,2446,2452,2467,2472,2478,99,121,59,1,1061,99,121,59,1,1036,112,112,97,59,1,922,4,2,101,121,2458,2464,100,105,108,59,1,310,59,1,1050,114,59,3,55349,56590,112,102,59,3,55349,56642,99,114,59,3,55349,56486,4,11,74,84,97,99,101,102,108,109,111,115,116,2508,2513,2520,2562,2585,2981,2986,3004,3011,3146,3167,99,121,59,1,1033,5,60,1,59,2518,1,60,4,5,99,109,110,112,114,2532,2538,2544,2548,2558,117,116,101,59,1,313,98,100,97,59,1,923,103,59,1,10218,108,97,99,101,116,114,102,59,1,8466,114,59,1,8606,4,3,97,101,121,2570,2576,2582,114,111,110,59,1,317,100,105,108,59,1,315,59,1,1051,4,2,102,115,2591,2907,116,4,10,65,67,68,70,82,84,85,86,97,114,2614,2663,2672,2728,2735,2760,2820,2870,2888,2895,4,2,110,114,2620,2633,103,108,101,66,114,97,99,107,101,116,59,1,10216,114,111,119,4,3,59,66,82,2644,2646,2651,1,8592,97,114,59,1,8676,105,103,104,116,65,114,114,111,119,59,1,8646,101,105,108,105,110,103,59,1,8968,111,4,2,117,119,2679,2692,98,108,101,66,114,97,99,107,101,116,59,1,10214,110,4,2,84,86,2699,2710,101,101,86,101,99,116,111,114,59,1,10593,101,99,116,111,114,4,2,59,66,2721,2723,1,8643,97,114,59,1,10585,108,111,111,114,59,1,8970,105,103,104,116,4,2,65,86,2745,2752,114,114,111,119,59,1,8596,101,99,116,111,114,59,1,10574,4,2,101,114,2766,2792,101,4,3,59,65,86,2775,2777,2784,1,8867,114,114,111,119,59,1,8612,101,99,116,111,114,59,1,10586,105,97,110,103,108,101,4,3,59,66,69,2806,2808,2813,1,8882,97,114,59,1,10703,113,117,97,108,59,1,8884,112,4,3,68,84,86,2829,2841,2852,111,119,110,86,101,99,116,111,114,59,1,10577,101,101,86,101,99,116,111,114,59,1,10592,101,99,116,111,114,4,2,59,66,2863,2865,1,8639,97,114,59,1,10584,101,99,116,111,114,4,2,59,66,2881,2883,1,8636,97,114,59,1,10578,114,114,111,119,59,1,8656,105,103,104,116,97,114,114,111,119,59,1,8660,115,4,6,69,70,71,76,83,84,2922,2936,2947,2956,2962,2974,113,117,97,108,71,114,101,97,116,101,114,59,1,8922,117,108,108,69,113,117,97,108,59,1,8806,114,101,97,116,101,114,59,1,8822,101,115,115,59,1,10913,108,97,110,116,69,113,117,97,108,59,1,10877,105,108,100,101,59,1,8818,114,59,3,55349,56591,4,2,59,101,2992,2994,1,8920,102,116,97,114,114,111,119,59,1,8666,105,100,111,116,59,1,319,4,3,110,112,119,3019,3110,3115,103,4,4,76,82,108,114,3030,3058,3070,3098,101,102,116,4,2,65,82,3039,3046,114,114,111,119,59,1,10229,105,103,104,116,65,114,114,111,119,59,1,10231,105,103,104,116,65,114,114,111,119,59,1,10230,101,102,116,4,2,97,114,3079,3086,114,114,111,119,59,1,10232,105,103,104,116,97,114,114,111,119,59,1,10234,105,103,104,116,97,114,114,111,119,59,1,10233,102,59,3,55349,56643,101,114,4,2,76,82,3123,3134,101,102,116,65,114,114,111,119,59,1,8601,105,103,104,116,65,114,114,111,119,59,1,8600,4,3,99,104,116,3154,3158,3161,114,59,1,8466,59,1,8624,114,111,107,59,1,321,59,1,8810,4,8,97,99,101,102,105,111,115,117,3188,3192,3196,3222,3227,3237,3243,3248,112,59,1,10501,121,59,1,1052,4,2,100,108,3202,3213,105,117,109,83,112,97,99,101,59,1,8287,108,105,110,
1116,114,102,59,1,8499,114,59,3,55349,56592,110,117,115,80,108,117,115,59,1,8723,112,102,59,3,55349,56644,99,114,59,1,8499,59,1,924,4,9,74,97,99,101,102,111,115,116,117,3271,3276,3283,3306,3422,3427,4120,4126,4137,99,121,59,1,1034,99,117,116,101,59,1,323,4,3,97,101,121,3291,3297,3303,114,111,110,59,1,327,100,105,108,59,1,325,59,1,1053,4,3,103,115,119,3314,3380,3415,97,116,105,118,101,4,3,77,84,86,3327,3340,3365,101,100,105,117,109,83,112,97,99,101,59,1,8203,104,105,4,2,99,110,3348,3357,107,83,112,97,99,101,59,1,8203,83,112,97,99,101,59,1,8203,101,114,121,84,104,105,110,83,112,97,99,101,59,1,8203,116,101,100,4,2,71,76,3389,3405,114,101,97,116,101,114,71,114,101,97,116,101,114,59,1,8811,101,115,115,76,101,115,115,59,1,8810,76,105,110,101,59,1,10,114,59,3,55349,56593,4,4,66,110,112,116,3437,3444,3460,3464,114,101,97,107,59,1,8288,66,114,101,97,107,105,110,103,83,112,97,99,101,59,1,160,102,59,1,8469,4,13,59,67,68,69,71,72,76,78,80,82,83,84,86,3492,3494,3517,3536,3578,3657,3685,3784,3823,3860,3915,4066,4107,1,10988,4,2,111,117,3500,3510,110,103,114,117,101,110,116,59,1,8802,112,67,97,112,59,1,8813,111,117,98,108,101,86,101,114,116,105,99,97,108,66,97,114,59,1,8742,4,3,108,113,120,3544,3552,3571,101,109,101,110,116,59,1,8713,117,97,108,4,2,59,84,3561,3563,1,8800,105,108,100,101,59,3,8770,824,105,115,116,115,59,1,8708,114,101,97,116,101,114,4,7,59,69,70,71,76,83,84,3600,3602,3609,3621,3631,3637,3650,1,8815,113,117,97,108,59,1,8817,117,108,108,69,113,117,97,108,59,3,8807,824,114,101,97,116,101,114,59,3,8811,824,101,115,115,59,1,8825,108,97,110,116,69,113,117,97,108,59,3,10878,824,105,108,100,101,59,1,8821,117,109,112,4,2,68,69,3666,3677,111,119,110,72,117,109,112,59,3,8782,824,113,117,97,108,59,3,8783,824,101,4,2,102,115,3692,3724,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3709,3711,3717,1,8938,97,114,59,3,10703,824,113,117,97,108,59,1,8940,115,4,6,59,69,71,76,83,84,3739,3741,3748,3757,3764,3777,1,8814,113,117,97,108,59,1,8816,114,101,97,116,101,114,59,1,8824,101,115,115,59,3,8810,824,108,97,110,116,69,113,117,97,108,59,3,10877,824,105,108,100,101,59,1,8820,101,115,116,101,100,4,2,71,76,3795,3812,114,101,97,116,101,114,71,114,101,97,116,101,114,59,3,10914,824,101,115,115,76,101,115,115,59,3,10913,824,114,101,99,101,100,101,115,4,3,59,69,83,3838,3840,3848,1,8832,113,117,97,108,59,3,10927,824,108,97,110,116,69,113,117,97,108,59,1,8928,4,2,101,105,3866,3881,118,101,114,115,101,69,108,101,109,101,110,116,59,1,8716,103,104,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3900,3902,3908,1,8939,97,114,59,3,10704,824,113,117,97,108,59,1,8941,4,2,113,117,3921,3973,117,97,114,101,83,117,4,2,98,112,3933,3952,115,101,116,4,2,59,69,3942,3945,3,8847,824,113,117,97,108,59,1,8930,101,114,115,101,116,4,2,59,69,3963,3966,3,8848,824,113,117,97,108,59,1,8931,4,3,98,99,112,3981,4e3,4045,115,101,116,4,2,59,69,3990,3993,3,8834,8402,113,117,97,108,59,1,8840,99,101,101,100,115,4,4,59,69,83,84,4015,4017,4025,4037,1,8833,113,117,97,108,59,3,10928,824,108,97,110,116,69,113,117,97,108,59,1,8929,105,108,100,101,59,3,8831,824,101,114,115,101,116,4,2,59,69,4056,4059,3,8835,8402,113,117,97,108,59,1,8841,105,108,100,101,4,4,59,69,70,84,4080,4082,4089,4100,1,8769,113,117,97,108,59,1,8772,117,108,108,69,113,117,97,108,59,1,8775,105,108,100,101,59,1,8777,101,114,116,105,99,97,108,66,97,114,59,1,8740,99,114,59,3,55349,56489,105,108,100,101,5,209,1,59,4135,1,209,59,1,925,4,14,69,97,99,100,102,103,109,111,112,114,115,116,117,118,4170,4176,4187,4205,4212,4217,4228,4253,4259,4292,4295,4316,4337,4346,108,105,103,59,1,338,99,117,116,101,5,211,1,59,4185,1,211,4,2,105,121,4193,4202,114,99,5,212,1,59,4200,1,212,59,1,1054,98,108,97,99,59,1,336,114,59,3,55349,56594,114,97,118,101,5,210,1,59,4226,1,210,4,3,97,101,105,4236,4241,4246,99,114,59,1,332,103,97,59,1,937,99,114,111,110,59,1,927,112,102,59,3,55349,56646,101,110,67,117,114,108,121,4,2,68,81,4272,4285,111,117,98,108,101,81,117,111,116,101,59,1,8220,117,111,116,101,59,1,8216,59,1,10836,4,2,99,108,4301,4306,114,59,3,55349,56490,97,115,104,5,216,1,59,4314,1,216,105,4,2,108,109,4323,4332,100,101,5,213,1,59,4330,1,213,101,115,59,1,10807,109,108,5,214,1,59,4344,1,214,101,114,4,2,66,80,4354,4380,4,2,97,114,4360,4364,114,59,1,8254,97,99,4,2,101,107,4372,4375,59,1,9182,101,116,59,1,9140,97,114,101,110,116,104,101,115,105,115,59,1,9180,4,9,97,99,102,104,105,108,111,114,115,4413,4422,4426,4431,4435,4438,4448,4471,4561,114,116,105,97,108,68,59,1,8706,121,59,1,1055,114,59,3,55349,56595,105,59,1,934,59,1,928,117,115,77,105,110,
1117,115,59,1,177,4,2,105,112,4454,4467,110,99,97,114,101,112,108,97,110,101,59,1,8460,102,59,1,8473,4,4,59,101,105,111,4481,4483,4526,4531,1,10939,99,101,100,101,115,4,4,59,69,83,84,4498,4500,4507,4519,1,8826,113,117,97,108,59,1,10927,108,97,110,116,69,113,117,97,108,59,1,8828,105,108,100,101,59,1,8830,109,101,59,1,8243,4,2,100,112,4537,4543,117,99,116,59,1,8719,111,114,116,105,111,110,4,2,59,97,4555,4557,1,8759,108,59,1,8733,4,2,99,105,4567,4572,114,59,3,55349,56491,59,1,936,4,4,85,102,111,115,4585,4594,4599,4604,79,84,5,34,1,59,4592,1,34,114,59,3,55349,56596,112,102,59,1,8474,99,114,59,3,55349,56492,4,12,66,69,97,99,101,102,104,105,111,114,115,117,4636,4642,4650,4681,4704,4763,4767,4771,5047,5069,5081,5094,97,114,114,59,1,10512,71,5,174,1,59,4648,1,174,4,3,99,110,114,4658,4664,4668,117,116,101,59,1,340,103,59,1,10219,114,4,2,59,116,4675,4677,1,8608,108,59,1,10518,4,3,97,101,121,4689,4695,4701,114,111,110,59,1,344,100,105,108,59,1,342,59,1,1056,4,2,59,118,4710,4712,1,8476,101,114,115,101,4,2,69,85,4722,4748,4,2,108,113,4728,4736,101,109,101,110,116,59,1,8715,117,105,108,105,98,114,105,117,109,59,1,8651,112,69,113,117,105,108,105,98,114,105,117,109,59,1,10607,114,59,1,8476,111,59,1,929,103,104,116,4,8,65,67,68,70,84,85,86,97,4792,4840,4849,4905,4912,4972,5022,5040,4,2,110,114,4798,4811,103,108,101,66,114,97,99,107,101,116,59,1,10217,114,111,119,4,3,59,66,76,4822,4824,4829,1,8594,97,114,59,1,8677,101,102,116,65,114,114,111,119,59,1,8644,101,105,108,105,110,103,59,1,8969,111,4,2,117,119,4856,4869,98,108,101,66,114,97,99,107,101,116,59,1,10215,110,4,2,84,86,4876,4887,101,101,86,101,99,116,111,114,59,1,10589,101,99,116,111,114,4,2,59,66,4898,4900,1,8642,97,114,59,1,10581,108,111,111,114,59,1,8971,4,2,101,114,4918,4944,101,4,3,59,65,86,4927,4929,4936,1,8866,114,114,111,119,59,1,8614,101,99,116,111,114,59,1,10587,105,97,110,103,108,101,4,3,59,66,69,4958,4960,4965,1,8883,97,114,59,1,10704,113,117,97,108,59,1,8885,112,4,3,68,84,86,4981,4993,5004,111,119,110,86,101,99,116,111,114,59,1,10575,101,101,86,101,99,116,111,114,59,1,10588,101,99,116,111,114,4,2,59,66,5015,5017,1,8638,97,114,59,1,10580,101,99,116,111,114,4,2,59,66,5033,5035,1,8640,97,114,59,1,10579,114,114,111,119,59,1,8658,4,2,112,117,5053,5057,102,59,1,8477,110,100,73,109,112,108,105,101,115,59,1,10608,105,103,104,116,97,114,114,111,119,59,1,8667,4,2,99,104,5087,5091,114,59,1,8475,59,1,8625,108,101,68,101,108,97,121,101,100,59,1,10740,4,13,72,79,97,99,102,104,105,109,111,113,115,116,117,5134,5150,5157,5164,5198,5203,5259,5265,5277,5283,5374,5380,5385,4,2,67,99,5140,5146,72,99,121,59,1,1065,121,59,1,1064,70,84,99,121,59,1,1068,99,117,116,101,59,1,346,4,5,59,97,101,105,121,5176,5178,5184,5190,5195,1,10940,114,111,110,59,1,352,100,105,108,59,1,350,114,99,59,1,348,59,1,1057,114,59,3,55349,56598,111,114,116,4,4,68,76,82,85,5216,5227,5238,5250,111,119,110,65,114,114,111,119,59,1,8595,101,102,116,65,114,114,111,119,59,1,8592,105,103,104,116,65,114,114,111,119,59,1,8594,112,65,114,114,111,119,59,1,8593,103,109,97,59,1,931,97,108,108,67,105,114,99,108,101,59,1,8728,112,102,59,3,55349,56650,4,2,114,117,5289,5293,116,59,1,8730,97,114,101,4,4,59,73,83,85,5306,5308,5322,5367,1,9633,110,116,101,114,115,101,99,116,105,111,110,59,1,8851,117,4,2,98,112,5329,5347,115,101,116,4,2,59,69,5338,5340,1,8847,113,117,97,108,59,1,8849,101,114,115,101,116,4,2,59,69,5358,5360,1,8848,113,117,97,108,59,1,8850,110,105,111,110,59,1,8852,99,114,59,3,55349,56494,97,114,59,1,8902,4,4,98,99,109,112,5395,5420,5475,5478,4,2,59,115,5401,5403,1,8912,101,116,4,2,59,69,5411,5413,1,8912,113,117,97,108,59,1,8838,4,2,99,104,5426,5468,101,101,100,115,4,4,59,69,83,84,5440,5442,5449,5461,1,8827,113,117,97,108,59,1,10928,108,97,110,116,69,113,117,97,108,59,1,8829,105,108,100,101,59,1,8831,84,104,97,116,59,1,8715,59,1,8721,4,3,59,101,115,5486,5488,5507,1,8913,114,115,101,116,4,2,59,69,5498,5500,1,8835,113,117,97,108,59,1,8839,101,116,59,1,8913,4,11,72,82,83,97,99,102,104,105,111,114,115,5536,5546,5552,5567,5579,5602,5607,5655,5695,5701,5711,79,82,78,5,222,1,59,5544,1,222,65,68,69,59,1,8482,4,2,72,99,5558,5563,99,121,59,1,1035,121,59,1,1062,4,2,98,117,5573,5576,59,1,9,59,1,932,4,3,97,101,121,5587,5593,5599,114,111,110,59,1,356,100,105,108,59,1,354,59,1,1058,114,59,3,55349,56599,4,2,101,105,5613,5631,4,2,114,116,5619,5627,101,102,111,114,101,59,1,8756,97,59,1,920,4,2,99,110,5637,5647,107,83,112,97,99,101,59,3,8287,8202,83,112,97,99,101,59,1,8201,108,100,101,4,4,59,69,70,84,5668,5670,5677,5688,1,8764,113,117,97,108,59,1,8771,117,108,108,69,113,117,97,108,59,1,8773,105,108,100,101,59,1,8776,112,102,59,3,55349,56651,105,112,108,101,68,111,116,59,1,8411,4,2,99,116,5717,5722,114,59,3,55349,56495,114,111,107,59,1,358,4,14,97,98,99,100,102,103,109,110,111,112,114,115,116,117,5758,5789,5805,5823,5830,5835,5846,5852,5921,5937,6089,6095,6101,6108,4,2,99,114,5764,5774,117,116,101,5,218,1,59,5772,1,218,114,4,2,59,111,5781,5783,1,8607,99,105,114,59,1,10569,114,4,2,99,101,5796,5800,121,59,1,1038,118,101,59,1,364,4,2,105,121,5811,5820,114,99,5,219,1,59,5818,1,219,59,1,1059,98,108,97,99,59,1,368,114,59,3,55349,56600,114,97,118,101,5,217,1,59,5844,1,217,97,99,114,59,1,362,4,2,100,105,5858,5905,101,114,4,2,66,80,5866,5892,4,2,97,114,5872,5876,114,59,1,95,97,99,4,2,101,107,5884,5887,59,1,9183,101,116,59,1,9141,97,114,101,110,116,104,101,115,105,115,59,1,9181,111,110,4,2,59,80,5913,5915,1,8899,108,117,115,59,1,8846,4,2,103,112,5927,5932,111,110,59,1,370,102,59,3,55349,56652,4,8,65,68,69,84,97,100,112,115,5955,5985,5996,6009,6026,6033,6044,6075,114,114,111,119,4,3,59,66,68,5967,5969,5974,1,8593,97,114,59,1,10514,111,119,110,65,114,114,111,119,59,1,8645,111,119,110,65,114,114,111,119,59,1,8597,113,117,105,108,105,98,114,105,117,109,59,1,10606,101,
1101,4,2,59,65,6017,6019,1,8869,114,114,111,119,59,1,8613,114,114,111,119,59,1,8657,111,119,110,97,114,114,111,119,59,1,8661,101,114,4,2,76,82,6052,6063,101,102,116,65,114,114,111,119,59,1,8598,105,103,104,116,65,114,114,111,119,59,1,8599,105,4,2,59,108,6082,6084,1,978,111,110,59,1,933,105,110,103,59,1,366,99,114,59,3,55349,56496,105,108,100,101,59,1,360,109,108,5,220,1,59,6115,1,220,4,9,68,98,99,100,101,102,111,115,118,6137,6143,6148,6152,6166,6250,6255,6261,6267,97,115,104,59,1,8875,97,114,59,1,10987,121,59,1,1042,97,115,104,4,2,59,108,6161,6163,1,8873,59,1,10982,4,2,101,114,6172,6175,59,1,8897,4,3,98,116,121,6183,6188,6238,97,114,59,1,8214,4,2,59,105,6194,6196,1,8214,99,97,108,4,4,66,76,83,84,6209,6214,6220,6231,97,114,59,1,8739,105,110,101,59,1,124,101,112,97,114,97,116,111,114,59,1,10072,105,108,100,101,59,1,8768,84,104,105,110,83,112,97,99,101,59,1,8202,114,59,3,55349,56601,112,102,59,3,55349,56653,99,114,59,3,55349,56497,100,97,115,104,59,1,8874,4,5,99,101,102,111,115,6286,6292,6298,6303,6309,105,114,99,59,1,372,100,103,101,59,1,8896,114,59,3,55349,56602,112,102,59,3,55349,56654,99,114,59,3,55349,56498,4,4,102,105,111,115,6325,6330,6333,6339,114,59,3,55349,56603,59,1,926,112,102,59,3,55349,56655,99,114,59,3,55349,56499,4,9,65,73,85,97,99,102,111,115,117,6365,6370,6375,6380,6391,6405,6410,6416,6422,99,121,59,1,1071,99,121,59,1,1031,99,121,59,1,1070,99,117,116,101,5,221,1,59,6389,1,221,4,2,105,121,6397,6402,114,99,59,1,374,59,1,1067,114,59,3,55349,56604,112,102,59,3,55349,56656,99,114,59,3,55349,56500,109,108,59,1,376,4,8,72,97,99,100,101,102,111,115,6445,6450,6457,6472,6477,6501,6505,6510,99,121,59,1,1046,99,117,116,101,59,1,377,4,2,97,121,6463,6469,114,111,110,59,1,381,59,1,1047,111,116,59,1,379,4,2,114,116,6483,6497,111,87,105,100,116,104,83,112,97,99,101,59,1,8203,97,59,1,918,114,59,1,8488,112,102,59,1,8484,99,114,59,3,55349,56501,4,16,97,98,99,101,102,103,108,109,110,111,112,114,115,116,117,119,6550,6561,6568,6612,6622,6634,6645,6672,6699,6854,6870,6923,6933,6963,6974,6983,99,117,116,101,5,225,1,59,6559,1,225,
1114,101,118,101,59,1,259,4,6,59,69,100,105,117,121,6582,6584,6588,6591,6600,6609,1,8766,59,3,8766,819,59,1,8767,114,99,5,226,1,59,6598,1,226,116,101,5,180,1,59,6607,1,180,59,1,1072,108,105,103,5,230,1,59,6620,1,230,4,2,59,114,6628,6630,1,8289,59,3,55349,56606,114,97,118,101,5,224,1,59,6643,1,224,4,2,101,112,6651,6667,4,2,102,112,6657,6663,115,121,109,59,1,8501,104,59,1,8501,104,97,59,1,945,4,2,97,112,6678,6692,4,2,99,108,6684,6688,114,59,1,257,103,59,1,10815,5,38,1,59,6697,1,38,4,2,100,103,6705,6737,4,5,59,97,100,115,118,6717,6719,6724,6727,6734,1,8743,110,100,59,1,10837,59,1,10844,108,111,112,101,59,1,10840,59,1,10842,4,7,59,101,108,109,114,115,122,6753,6755,6758,6762,6814,6835,6848,1,8736,59,1,10660,101,59,1,8736,115,100,4,2,59,97,6770,6772,1,8737,4,8,97,98,99,100,101,102,103,104,6790,6793,6796,6799,6802,6805,6808,6811,59,1,10664,59,1,10665,59,1,10666,59,1,10667,59,1,10668,59,1,10669,59,1,10670,59,1,10671,116,4,2,59,118,6821,6823,1,8735,98,4,2,59,100,6830,6832,1,8894,59,1,10653,4,2,112,116,6841,6845,104,59,1,8738,59,1,197,97,114,114,59,1,9084,4,2,103,112,6860,6865,111,110,59,1,261,102,59,3,55349,56658,4,7,59,69,97,101,105,111,112,6886,6888,6891,6897,6900,6904,6908,1,8776,59,1,10864,99,105,114,59,1,10863,59,1,8778,100,59,1,8779,115,59,1,39,114,111,120,4,2,59,101,6917,6919,1,8776,113,59,1,8778,105,110,103,5,229,1,59,6931,1,229,4,3,99,116,121,6941,6946,6949,114,59,3,55349,56502,59,1,42,109,112,4,2,59,101,6957,6959,1,8776,113,59,1,8781,105,108,100,101,5,227,1,59,6972,1,227,109,108,5,228,1,59,6981,1,228,4,2,99,105,6989,6997,111,110,105,110,116,59,1,8755,110,116,59,1,10769,4,16,78,97,98,99,100,101,102,105,107,108,110,111,112,114,115,117,7036,7041,7119,7135,7149,7155,7219,7224,7347,7354,7463,7489,7786,7793,7814,7866,111,116,59,1,10989,4,2,99,114,7047,7094,107,4,4,99,101,112,115,7058,7064,7073,7080,111,110,103,59,1,8780,112,115,105,108,111,110,59,1,1014,114,105,109,101,59,1,8245,105,109,4,2,59,101,7088,7090,1,8765,113,59,1,8909,4,2,118,119,7100,7105,101,101,59,1,8893,101,100,4,2,59,103,7113,7115,1,8965,101,59,1,8965,114,107,4,2,59,116,7127,7129,1,9141,98,114,107,59,1,9142,4,2,111,121,7141,7146,110,103,59,1,8780,59,1,1073,113,117,111,59,1,8222,4,5,99,109,112,114,116,7167,7181,7188,7193,7199,97,117,115,4,2,59,101,7176,7178,1,8757,59,1,8757,112,116,121,118,59,1,10672,115,105,59,1,1014,110,111,117,59,1,8492,4,3,97,104,119,7207,7210,7213,59,1,946,59,1,8502,101,101,110,59,1,8812,114,59,3,55349,56607,103,4,7,99,111,115,116,117,118,119,7241,7262,7288,7305,7328,7335,7340,4,3,97,105,117,7249,7253,7258,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,4,3,100,112,116,7270,7275,7281,111,116,59,1,10752,108,117,115,59,1,10753,105,109,101,115,59,1,10754,4,2,113,116,7294,7300,99,117,112,59,1,10758,97,114,59,1,9733,114,105,97,110,103,108,101,4,2,100,117,7318,7324,111,119,110,59,1,9661,112,59,1,9651,112,108,117,115,59,1,10756,101,101,59,1,8897,101,100,103,101,59,1,8896,97,114,111,119,59,1,10509,4,3,97,107,111,7362,7436,7458,4,2,99,110,7368,7432,107,4,3,108,115,116,7377,7386,7394,111,122,101,110,103,101,59,1,10731,113,117,97,114,101,59,1,9642,114,105,97,110,103,108,101,4,4,59,100,108,114,7411,7413,7419,7425,1,9652,111,119,110,59,1,9662,101,102,116,59,1,9666,105,103,104,116,59,1,9656,107,59,1,9251,4,2,49,51,7442,7454,4,2,50,52,7448,7451,59,1,9618,59,1,9617,52,59,1,9619,99,107,59,1,9608,4,2,101,111,7469,7485,4,2,59,113,7475,7478,3,61,8421,117,105,118,59,3,8801,8421,116,59,1,8976,4,4,112,116,119,120,7499,7504,7517,7523,102,59,3,55349,56659,4,2,59,116,7510,7512,1,8869,111,109,59,1,8869,116,105,101,59,1,8904,4,12,68,72,85,86,98,100,104,109,112,116,117,118,7549,7571,7597,7619,7655,7660,7682,7708,7715,7721,7728,7750,4,4,76,82,108,114,7559,7562,7565,7568,59,1,9559,59,1,9556,59,1,9558,59,1,9555,4,5,59,68,85,100,117,7583,7585,7588,7591,7594,1,9552,59,1,9574,59,1,9577,59,1,9572,59,1,9575,4,4,76,82,108,114,7607,7610,7613,7616,59,1,9565,59,1,9562,59,1,9564,59,1,9561,4,7,59,72,76,82,104,108,114,7635,7637,7640,7643,7646,7649,7652,1,9553,59,1,9580,59,1,9571,59,1,9568,59,1,9579,59,1,9570,59,1,9567,111,120,59,1,10697,4,4,76,82,108,114,7670,7673,7676,7679,59,1,9557,59,1,9554,59,1,9488,59,1,9484,4,5,59,68,85,100,117,7694,7696,7699,7702,7705,1,9472,59,1,9573,59,1,9576,59,1,9516,59,1,9524,105,110,
1117,115,59,1,8863,108,117,115,59,1,8862,105,109,101,115,59,1,8864,4,4,76,82,108,114,7738,7741,7744,7747,59,1,9563,59,1,9560,59,1,9496,59,1,9492,4,7,59,72,76,82,104,108,114,7766,7768,7771,7774,7777,7780,7783,1,9474,59,1,9578,59,1,9569,59,1,9566,59,1,9532,59,1,9508,59,1,9500,114,105,109,101,59,1,8245,4,2,101,118,7799,7804,118,101,59,1,728,98,97,114,5,166,1,59,7812,1,166,4,4,99,101,105,111,7824,7829,7834,7846,114,59,3,55349,56503,109,105,59,1,8271,109,4,2,59,101,7841,7843,1,8765,59,1,8909,108,4,3,59,98,104,7855,7857,7860,1,92,59,1,10693,115,117,98,59,1,10184,4,2,108,109,7872,7885,108,4,2,59,101,7879,7881,1,8226,116,59,1,8226,112,4,3,59,69,101,7894,7896,7899,1,8782,59,1,10926,4,2,59,113,7905,7907,1,8783,59,1,8783,4,15,97,99,100,101,102,104,105,108,111,114,115,116,117,119,121,7942,8021,8075,8080,8121,8126,8157,8279,8295,8430,8446,8485,8491,8707,8726,4,3,99,112,114,7950,7956,8007,117,116,101,59,1,263,4,6,59,97,98,99,100,115,7970,7972,7977,7984,7998,8003,1,8745,110,100,59,1,10820,114,99,117,112,59,1,10825,4,2,97,117,7990,7994,112,59,1,10827,112,59,1,10823,111,116,59,1,10816,59,3,8745,65024,4,2,101,111,8013,8017,116,59,1,8257,110,59,1,711,4,4,97,101,105,117,8031,8046,8056,8061,4,2,112,114,8037,8041,115,59,1,10829,111,110,59,1,269,100,105,108,5,231,1,59,8054,1,231,114,99,59,1,265,112,115,4,2,59,115,8069,8071,1,10828,109,59,1,10832,111,116,59,1,267,4,3,100,109,110,8088,8097,8104,105,108,5,184,1,59,8095,1,184,112,116,121,118,59,1,10674,116,5,162,2,59,101,8112,8114,1,162,114,100,111,116,59,1,183,114,59,3,55349,56608,4,3,99,101,105,8134,8138,8154,121,59,1,1095,99,107,4,2,59,109,8146,8148,1,10003,97,114,107,59,1,10003,59,1,967,114,4,7,59,69,99,101,102,109,115,8174,8176,8179,8258,8261,8268,8273,1,9675,59,1,10691,4,3,59,101,108,8187,8189,8193,1,710,113,59,1,8791,101,4,2,97,100,8200,8223,114,114,111,119,4,2,108,114,8210,8216,101,102,116,59,1,8634,105,103,104,116,59,1,8635,4,5,82,83,97,99,100,8235,8238,8241,8246,8252,59,1,174,59,1,9416,115,116,59,1,8859,105,114,99,59,1,8858,97,115,104,59,1,8861,59,1,8791,110,105,110,116,59,1,10768,105,100,59,1,10991,99,105,114,59,1,10690,117,98,115,4,2,59,117,8288,8290,1,9827,105,116,59,1,9827,4,4,108,109,110,112,8305,8326,8376,8400,111,110,4,2,59,101,8313,8315,1,58,4,2,59,113,8321,8323,1,8788,59,1,8788,4,2,109,112,8332,8344,97,4,2,59,116,8339,8341,1,44,59,1,64,4,3,59,102,108,8352,8354,8358,1,8705,110,59,1,8728,101,4,2,109,120,8365,8371,101,110,116,59,1,8705,101,115,59,1,8450,4,2,103,105,8382,8395,4,2,59,100,8388,8390,1,8773,111,116,59,1,10861,110,116,59,1,8750,4,3,102,114,121,8408,8412,8417,59,3,55349,56660,111,100,59,1,8720,5,169,2,59,115,8424,8426,1,169,114,59,1,8471,4,2,97,111,8436,8441,114,114,59,1,8629,115,115,59,1,10007,4,2,99,117,8452,8457,114,59,3,55349,56504,4,2,98,112,8463,8474,4,2,59,101,8469,8471,1,10959,59,1,10961,4,2,59,101,8480,8482,1,10960,59,1,10962,100,111,116,59,1,8943,4,7,100,101,108,112,114,118,119,8507,8522,8536,8550,8600,8697,8702,97,114,114,4,2,108,114,8516,8519,59,1,10552,59,1,10549,4,2,112,115,8528,8532,114,59,1,8926,99,59,1,8927,97,114,114,4,2,59,112,8545,8547,1,8630,59,1,10557,4,6,59,98,99,100,111,115,8564,8566,8573,8587,8592,8596,1,8746,114,99,97,112,59,1,10824,4,2,97,117,8579,8583,112,59,1,10822,112,59,1,10826,111,116,59,1,8845,114,59,1,10821,59,3,8746,65024,4,4,97,108,114,118,8610,8623,8663,8672,114,114,4,2,59,109,8618,8620,1,8631,59,1,10556,121,4,3,101,118,119,8632,8651,8656,113,4,2,112,115,8639,8645,114,101,99,59,1,8926,117,99,99,59,1,8927,101,101,59,1,8910,101,100,103,101,59,1,8911,101,110,5,164,1,59,8670,1,164,101,97,114,114,111,119,4,2,108,114,8684,8690,101,102,116,59,1,8630,105,103,104,116,59,1,8631,101,101,59,1,8910,101,100,59,1,8911,4,2,99,105,8713,8721,111,110,105,110,116,59,1,8754,110,116,59,1,8753,108,99,116,121,59,1,9005,4,19,65,72,97,98,99,100,101,102,104,105,106,108,111,114,115,116,117,119,122,8773,8778,8783,8821,8839,8854,8887,8914,8930,8944,9036,9041,9058,9197,9227,9258,9281,9297,9305,114,114,59,1,8659,97,114,59,1,10597,4,4,103,108,114,115,8793,8799,8805,8809,103,101,114,59,1,8224,101,116,104,59,1,8504,114,59,1,8595,104,4,2,59,118,8816,8818,1,8208,59,1,8867,4,2,107,108,8827,8834,97,114,111,119,59,1,10511,97,99,59,1,733,4,2,97,121,8845,8851,114,111,110,59,1,271,59,1,1076,4,3,59,97,111,8862,8864,8880,1,8518,4,2,103,114,8870,8876,103,101,114,59,1,8225,114,59,1,8650,116,115,101,113,59,1,10871,4,3,103,108,109,8895,8902,89
107,5,176,1,59,8900,1,176,116,97,59,1,948,112,116,121,118,59,1,10673,4,2,105,114,8920,8926,115,104,116,59,1,10623,59,3,55349,56609,97,114,4,2,108,114,8938,8941,59,1,8643,59,1,8642,4,5,97,101,103,115,118,8956,8986,8989,8996,9001,109,4,3,59,111,115,8965,8967,8983,1,8900,110,100,4,2,59,115,8975,8977,1,8900,117,105,116,59,1,9830,59,1,9830,59,1,168,97,109,109,97,59,1,989,105,110,59,1,8946,4,3,59,105,111,9009,9011,9031,1,247,100,101,5,247,2,59,111,9020,9022,1,247,110,116,105,109,101,115,59,1,8903,110,120,59,1,8903,99,121,59,1,1106,99,4,2,111,114,9048,9053,114,110,59,1,8990,111,112,59,1,8973,4,5,108,112,116,117,119,9070,9076,9081,9130,9144,108,97,114,59,1,36,102,59,3,55349,56661,4,5,59,101,109,112,115,9093,9095,9109,9116,9122,1,729,113,4,2,59,100,9102,9104,1,8784,111,116,59,1,8785,105,110,117,115,59,1,8760,108,117,115,59,1,8724,113,117,97,114,101,59,1,8865,98,108,101,98,97,114,119,101,100,103,101,59,1,8966,110,4,3,97,100,104,9153,9160,9172,114,114,111,119,59,1,8595,111,119,110,97,114,114,111,119,115,59,1,8650,97,114,112,111,111,110,4,2,108,114,9184,9190,101,102,116,59,1,8643,105,103,104,116,59,1,8642,4,2,98,99,9203,9211,107,97,114,111,119,59,1,10512,4,2,111,114,9217,9222,114,110,59,1,8991,111,112,59,1,8972,4,3,99,111,116,9235,9248,9252,4,2,114,121,9241,9245,59,3,55349,56505,59,1,1109,108,59,1,10742,114,111,107,59,1,273,4,2,100,114,9264,9269,111,116,59,1,8945,105,4,2,59,102,9276,9278,1,9663,59,1,9662,4,2,97,104,9287,9292,114,114,59,1,8693,97,114,59,1,10607,97,110,103,108,101,59,1,10662,4,2,99,105,9311,9315,121,59,1,1119,103,114,97,114,114,59,1,10239,4,18,68,97,99,100,101,102,103,108,109,110,111,112,113,114,115,116,117,120,9361,9376,9398,9439,9444,9447,9462,9495,9531,9585,9598,9614,9659,9755,9771,9792,9808,9826,4,2,68,111,9367,9372,111,116,59,1,10871,116,59,1,8785,4,2,99,115,9382,9392,117,116,101,5,233,1,59,9390,1,233,116,101,114,59,1,10862,4,4,97,105,111,121,9408,9414,9430,9436,114,111,110,59,1,283,114,4,2,59,99,9421,9423,1,8790,5,234,1,59,9428,1,234,108,111,110,59,1,8789,59,1,1101,111,116,59,1,279,59,1,8519,4,2,68,114,9453,9458,111,116,59,1,8786,59,3,55349,56610,4,3,59,114,115,9470,9472,9482,1,10906,97,118,101,5,232,1,59,9480,1,232,4,2,59,100,9488,9490,1,10902,111,116,59,1,10904,4,4,59,105,108,115,9505,9507,9515,9518,1,10905,110,116,101,114,115,59,1,9191,59,1,8467,4,2,59,100,9524,9526,1,10901,111,116,59,1,10903,4,3,97,112,115,9539,9544,9564,99,114,59,1,275,116,121,4,3,59,115,118,9554,9556,9561,1,8709,101,116,59,1,8709,59,1,8709,112,4,2,49,59,9571,9583,4,2,51,52,9577,9580,59,1,8196,59,1,8197,1,8195,4,2,103,115,9591,9594,59,1,331,112,59,1,8194,4,2,103,112,9604,9609,111,110,59,1,281,102,59,3,55349,56662,4,3,97,108,115,9622,9635,9640,114,4,2,59,115,9629,9631,1,8917,108,59,1,10723,117,115,59,1,10865,105,4,3,59,108,118,9649,9651,9656,1,949,111,110,59,1,949,59,1,1013,4,4,99,115,117,118,9669,9686,9716,9747,4,2,105,111,9675,9680,114,99,59,1,8790,108,111,110,59,1,8789,4,2,105,108,9692,9696,109,59,1,8770,97,110,116,4,2,103,108,9705,9710,116,114,59,1,10902,101,115,115,59,1,10901,4,3,97,101,105,9724,9729,9734,108,115,59,1,61,115,116,59,1,8799,118,4,2,59,68,9741,9743,1,8801,68,59,1,10872,112,97,114,115,108,59,1,10725,4,2,68,97,9761,9766,111,116,59,1,8787,114,114,59,1,10609,4,3,99,100,105,9779,9783,9788,114,59,1,8495,111,116,59,1,8784,109,59,1,8770,4,2,97,104,9798,9801,59,1,951,5,240,1,59,9806,1,240,4,2,109,114,9814,9822,108,5,235,1,59,9820,1,235,111,59,1,8364,4,3,99,105,112,9834,9838,9843,108,59,1,33,115,116,59,1,8707,4,2,101,111,9849,9859,99,116,97,116,105,111,110,59,1,8496,110,101,110,116,105,97,108,101,59,1,8519,4,12,97,99,101,102,105,106,108,110,111,112,114,115,9896,9910,9914,9921,9954,9960,9967,9989,9994,10027,10036,10164,108,108,105,110,103,100,111,116,115,101,113,59,1,8786,121,59,1,1092,109,97,108,101,59,1,9792,4,3,105,108,114,9929,9935,9950,108,105,103,59,1,64259,4,2,105,108,9941,9945,103,59,1,64256,105,103,59,1,64260,59,3,55349,56611,108,105,103,59,1,64257,108,105,103,59,3,102,106,4,3,97,108,116,9975,9979,9984,116,59,1,9837,105,103,59,1,64258,110,115,59,1,9649,111,102,59,1,402,4,2,112,114,1e4,10005,102,59,3,55349,56663,4,2,97,107,10011,10016,108,108,59,1,8704,4,2,59,118,10022,10024,1,8916,59,1,10969,97,114,116,105,110,
1116,59,1,10765,4,2,97,111,10042,10159,4,2,99,115,10048,10155,4,6,49,50,51,52,53,55,10062,10102,10114,10135,10139,10151,4,6,50,51,52,53,54,56,10076,10083,10086,10093,10096,10099,5,189,1,59,10081,1,189,59,1,8531,5,188,1,59,10091,1,188,59,1,8533,59,1,8537,59,1,8539,4,2,51,53,10108,10111,59,1,8532,59,1,8534,4,3,52,53,56,10122,10129,10132,5,190,1,59,10127,1,190,59,1,8535,59,1,8540,53,59,1,8536,4,2,54,56,10145,10148,59,1,8538,59,1,8541,56,59,1,8542,108,59,1,8260,119,110,59,1,8994,99,114,59,3,55349,56507,4,17,69,97,98,99,100,101,102,103,105,106,108,110,111,114,115,116,118,10206,10217,10247,10254,10268,10273,10358,10363,10374,10380,10385,10406,10458,10464,10470,10497,10610,4,2,59,108,10212,10214,1,8807,59,1,10892,4,3,99,109,112,10225,10231,10244,117,116,101,59,1,501,109,97,4,2,59,100,10239,10241,1,947,59,1,989,59,1,10886,114,101,118,101,59,1,287,4,2,105,121,10260,10265,114,99,59,1,285,59,1,1075,111,116,59,1,289,4,4,59,108,113,115,10283,10285,10288,10308,1,8805,59,1,8923,4,3,59,113,115,10296,10298,10301,1,8805,59,1,8807,108,97,110,116,59,1,10878,4,4,59,99,100,108,10318,10320,10324,10345,1,10878,99,59,1,10921,111,116,4,2,59,111,10332,10334,1,10880,4,2,59,108,10340,10342,1,10882,59,1,10884,4,2,59,101,10351,10354,3,8923,65024,115,59,1,10900,114,59,3,55349,56612,4,2,59,103,10369,10371,1,8811,59,1,8921,109,101,108,59,1,8503,99,121,59,1,1107,4,4,59,69,97,106,10395,10397,10400,10403,1,8823,59,1,10898,59,1,10917,59,1,10916,4,4,69,97,101,115,10416,10419,10434,10453,59,1,8809,112,4,2,59,112,10426,10428,1,10890,114,111,120,59,1,10890,4,2,59,113,10440,10442,1,10888,4,2,59,113,10448,10450,1,10888,59,1,8809,105,109,59,1,8935,112,102,59,3,55349,56664,97,118,101,59,1,96,4,2,99,105,10476,10480,114,59,1,8458,109,4,3,59,101,108,10489,10491,10494,1,8819,59,1,10894,59,1,10896,5,62,6,59,99,100,108,113,114,10512,10514,10527,10532,10538,10545,1,62,4,2,99,105,10520,10523,59,1,10919,114,59,1,10874,111,116,59,1,8919,80,97,114,59,1,10645,117,101,115,116,59,1,10876,4,5,97,100,101,108,115,10557,10574,10579,10599,10605,4,2,112,114,10563,10570,112,114,111,120,59,1,10886,114,59,1,10616,111,116,59,1,8919,113,4,2,108,113,10586,10592,101,115,115,59,1,8923,108,101,115,115,59,1,10892,101,115,115,59,1,8823,105,109,59,1,8819,4,2,101,110,10616,10626,114,116,110,101,113,113,59,3,8809,65024,69,59,3,8809,65024,4,10,65,97,98,99,101,102,107,111,115,121,10653,10658,10713,10718,10724,10760,10765,10786,10850,10875,114,114,59,1,8660,4,4,105,108,109,114,10668,10674,10678,10684,114,115,112,59,1,8202,102,59,1,189,105,108,116,59,1,8459,4,2,100,114,10690,10695,99,121,59,1,1098,4,3,59,99,119,10703,10705,10710,1,8596,105,114,59,1,10568,59,1,8621,97,114,59,1,8463,105,114,99,59,1,293,4,3,97,108,114,10732,10748,10754,114,116,115,4,2,59,117,10741,10743,1,9829,105,116,59,1,9829,108,105,112,59,1,8230,99,111,110,59,1,8889,114,59,3,55349,56613,115,4,2,101,119,10772,10779,97,114,111,119,59,1,10533,97,114,111,119,59,1,10534,4,5,97,109,111,112,114,10798,10803,10809,10839,10844,114,114,59,1,8703,116,104,116,59,1,8763,107,4,2,108,114,10816,10827,101,102,116,97,114,114,111,119,59,1,8617,105,103,104,116,97,114,114,111,119,59,1,8618,102,59,3,55349,56665,98,97,114,59,1,8213,4,3,99,108,116,10858,10863,10869,114,59,3,55349,56509,97,115,104,59,1,8463,114,111,107,59,1,295,4,2,98,112,10881,10887,117,108,108,59,1,8259,104,101,110,59,1,8208,4,15,97,99,101,102,103,105,106,109,110,111,112,113,115,116,117,10925,10936,10958,10977,10990,11001,11039,11045,11101,11192,11220,11226,11237,11285,11299,99,117,116,101,5,237,1,59,10934,1,237,4,3,59,105,121,10944,10946,10955,1,8291,114,99,5,238,1,59,10953,1,238,59,1,1080,4,2,99,120,10964,10968,121,59,1,1077,99,108,5,161,1,59,10975,1,161,4,2,102,114,10983,10986,59,1,8660,59,3,55349,56614,114,97,118,101,5,236,1,59,10999,1,236,4,4,59,105,110,111,11011,11013,11028,11034,1,8520,4,2,105,110,11019,11024,110,116,59,1,10764,116,59,1,8749,102,105,110,59,1,10716,116,97,59,1,8489,108,105,103,59,1,307,4,3,97,111,112,11053,11092,11096,4,3,99,103,116,11061,11065,11088,114,59,1,299,4,3,101,108,112,11073,11076,11082,59,1,8465,105,110,101,59,1,8464,97,114,116,59,1,8465,104,59,1,305,102,59,1,8887,101,100,59,1,437,4,5,59,99,102,111,116,11113,11115,11121,11136,11142,1,8712,97,114,101,59,1,8453,105,110,4,2,59,116,11129,11131,1,8734,105,101,59,1,10717,100,111,116,59,1,305,4,5,59,99,101,108,112,11154,11156,11161,11179,11186,1,8747,97,108,59,1,8890,4,2,103,114,11167,11173,101,114,115,59,1,8484,99,97,108,59,1,8890,97,114,104,107,59,1,10775,114,111,100,59,1,10812,4,4,99,103,112,116,11202,11206,11211,11216,121,59,1,1105,111,110,59,1,303,102,59,3,55349,56666,97,59,1,953,114,111,100,59,1,10812,117,101,115,116,5,191,1,59,11235,1,191,4,2,99,105,11243,11248,114,59,3,55349,56510,110,4,5,59,69,100,115,118,11261,11263,11266,11271,11282,1,8712,59,1,8953,111,116,59,1,8949,4,2,59,118,11277,11279,1,8948,59,1,8947,59,1,8712,4,2,59,105,11291,11293,1,8290,108,100,101,59,1,297,4,2,107,109,11305,11310,99,121,59,1,1110,108,5,239,1,59,11316,1,239,4,6,99,102,109,111,115,117,11332,11346,11351,11357,11363,11380,4,2,105,121,11338,11343,114,99,59,1,309,59,1,1081,114,59,3,55349,56615,97,116,104,59,1,567,112,102,59,3,55349,56667,4,2,99,101,11369,11374,114,59,3,55349,56511,114,99,121,59,1,1112,107,99,121,59,1,1108,4,8,97,99,102,103,104,106,111,115,11404,11418,11433,11438,11445,11450,11455,11461,112,112,97,4,2,59,118,11413,11415,1,954,59,1,1008,4,2,101,121,11424,11430,100,105,108,59,1,311,59,1,1082,114,59,3,55349,56616,114,101,101,110,59,1,312,99,121,59,1,1093,99,121,59,1,1116,112,102,59,3,55349,56668,99,114,59,3,55349,56512,4,23,65,66,69,72,97,98,99,100,101,102,103,104,106,108,109,110,111,112,114,115,116,117,118,11515,11538,11544,11555,11560,11721,11780,11818,11868,12136,12160,
112171,12203,12208,12246,12275,12327,12509,12523,12569,12641,12732,12752,4,3,97,114,116,11523,11528,11532,114,114,59,1,8666,114,59,1,8656,97,105,108,59,1,10523,97,114,114,59,1,10510,4,2,59,103,11550,11552,1,8806,59,1,10891,97,114,59,1,10594,4,9,99,101,103,109,110,112,113,114,116,11580,11586,11594,11600,11606,11624,11627,11636,11694,117,116,101,59,1,314,109,112,116,121,118,59,1,10676,114,97,110,59,1,8466,98,100,97,59,1,955,103,4,3,59,100,108,11615,11617,11620,1,10216,59,1,10641,101,59,1,10216,59,1,10885,117,111,5,171,1,59,11634,1,171,114,4,8,59,98,102,104,108,112,115,116,11655,11657,11669,11673,11677,11681,11685,11690,1,8592,4,2,59,102,11663,11665,1,8676,115,59,1,10527,115,59,1,10525,107,59,1,8617,112,59,1,8619,108,59,1,10553,105,109,59,1,10611,108,59,1,8610,4,3,59,97,101,11702,11704,11709,1,10923,105,108,59,1,10521,4,2,59,115,11715,11717,1,10925,59,3,10925,65024,4,3,97,98,114,11729,11734,11739,114,114,59,1,10508,114,107,59,1,10098,4,2,97,107,11745,11758,99,4,2,101,107,11752,11755,59,1,123,59,1,91,4,2,101,115,11764,11767,59,1,10635,108,4,2,100,117,11774,11777,59,1,10639,59,1,10637,4,4,97,101,117,121,11790,11796,11811,11815,114,111,110,59,1,318,4,2,100,105,11802,11807,105,108,59,1,316,108,59,1,8968,98,59,1,123,59,1,1083,4,4,99,113,114,115,11828,11832,11845,11864,97,59,1,10550,117,111,4,2,59,114,11840,11842,1,8220,59,1,8222,4,2,100,117,11851,11857,104,97,114,59,1,10599,115,104,97,114,59,1,10571,104,59,1,8626,4,5,59,102,103,113,115,11880,11882,12008,12011,
112031,1,8804,116,4,5,97,104,108,114,116,11895,11913,11935,11947,11996,114,114,111,119,4,2,59,116,11905,11907,1,8592,97,105,108,59,1,8610,97,114,112,111,111,110,4,2,100,117,11925,11931,111,119,110,59,1,8637,112,59,1,8636,101,102,116,97,114,114,111,119,115,59,1,8647,105,103,104,116,4,3,97,104,115,11959,11974,11984,114,114,111,119,4,2,59,115,11969,11971,1,8596,59,1,8646,97,114,112,111,111,110,115,59,1,8651,113,117,105,103,97,114,114,111,119,59,1,8621,104,114,101,101,116,105,109,101,115,59,1,8907,59,1,8922,4,3,59,113,115,12019,12021,12024,1,8804,59,1,8806,108,97,110,116,59,1,10877,4,5,59,99,100,103,115,12043,12045,12049,12070,12083,1,10877,99,59,1,10920,111,116,4,2,59,111,12057,12059,1,10879,4,2,59,114,12065,12067,1,10881,59,1,10883,4,2,59,101,12076,12079,3,8922,65024,115,59,1,10899,4,5,97,100,101,103,115,12095,12103,12108,12126,12131,112,112,114,111,120,59,1,10885,111,116,59,1,8918,113,4,2,103,113,12115,12120,116,114,59,1,8922,103,116,114,59,1,10891,116,114,59,1,8822,105,109,59,1,8818,4,3,105,108,114,12144,12150,12156,115,104,116,59,1,10620,111,111,114,59,1,8970,59,3,55349,56617,4,2,59,69,12166,12168,1,8822,59,1,10897,4,2,97,98,12177,12198,114,4,2,100,117,12184,12187,59,1,8637,4,2,59,108,12193,12195,1,8636,59,1,10602,108,107,59,1,9604,99,121,59,1,1113,4,5,59,97,99,104,116,12220,12222,12227,12235,12241,1,8810,114,114,59,1,8647,111,114,110,101,114,59,1,8990,97,114,100,59,1,10603,114,105,59,1,9722,4,2,105,111,12252,12258,100,111,116,59,1,320,117,115,116,4,2,59,97,12267,12269,1,9136,99,104,101,59,1,9136,4,4,69,97,101,115,12285,12288,12303,12322,59,1,8808,112,4,2,59,112,12295,12297,1,10889,114,111,120,59,1,10889,4,2,59,113,12309,12311,1,10887,4,2,59,113,12317,12319,1,10887,59,1,8808,105,109,59,1,8934,4,8,97,98,110,111,112,116,119,122,12345,12359,12364,12421,12446,12467,12474,12490,4,2,110,114,12351,12355,103,59,1,10220,114,59,1,8701,114,107,59,1,10214,103,4,3,108,109,114,12373,12401,12409,101,102,116,4,2,97,114,12382,12389,114,114,111,119,59,1,10229,105,103,104,116,97,114,114,111,119,59,1,10231,97,112,115,116,111,59,1,10236,105,103,104,116,97,114,114,111,119,59,1,10230,112,97,114,114,111,119,4,2,108,114,12433,12439,101,102,116,59,1,8619,105,103,104,116,59,1,8620,4,3,97,102,108,12454,12458,12462,114,59,1,10629,59,3,55349,56669,117,115,59,1,10797,105,109,101,115,59,1,10804,4,2,97,98,12480,12485,115,116,59,1,8727,97,114,59,1,95,4,3,59,101,102,12498,12500,12506,1,9674,110,103,101,59,1,9674,59,1,10731,97,114,4,2,59,108,12517,12519,1,40,116,59,1,10643,4,5,97,99,104,109,116,12535,12540,12548,12561,12564,114,114,59,1,8646,111,114,110,101,114,59,1,8991,97,114,4,2,59,100,12556,12558,1,8651,59,1,10605,59,1,8206,114,105,59,1,8895,4,6,97,99,104,105,113,116,12583,12589,12594,12597,12614,12635,113,117,111,59,1,8249,114,59,3,55349,56513,59,1,8624,109,4,3,59,101,103,12606,12608,12611,1,8818,59,1,10893,59,1,10895,4,2,98,117,12620,12623,59,1,91,111,4,2,59,114,12630,12632,1,8216,59,1,8218,114,111,107,59,1,322,5,60,8,59,99,100,104,105,108,113,114,12660,12662,12675,12680,12686,12692,12698,12705,1,60,4,2,99,105,12668,12671,59,1,10918,114,59,1,10873,111,116,59,1,8918,114,101,101,59,1,8907,109,101,115,59,1,8905,97,114,114,59,1,10614,117,101,115,116,59,1,10875,4,2,80,105,12711,12716,97,114,59,1,10646,4,3,59,101,102,12724,12726,12729,1,9667,59,1,8884,59,1,9666,114,4,2,100,117,12739,12746,115,104,97,114,59,1,10570,104,97,114,59,1,10598,4,2,101,110,12758,12768,114,116,110,101,113,113,59,3,8808,65024,69,59,3,8808,65024,4,14,68,97,99,100,101,102,104,105,108,110,111,112,115,117,12803,12809,12893,12908,12914,12928,12933,12937,13011,13025,13032,13049,13052,13069,68,111,116,59,1,8762,4,4,99,108,112,114,12819,12827,12849,12887,114,5,175,1,59,12825,1,175,4,2,101,116,12833,12836,59,1,9794,4,2,59,101,12842,12844,1,10016,115,101,59,1,10016,4,2,59,115,12855,12857,1,8614,116,111,4,4,59,100,108,117,12869,12871,12877,12883,1,8614,111,119,110,59,1,8615,101,102,116,59,1,8612,112,59,1,8613,107,101,114,59,1,9646,4,2,111,121,12899,12905,109,109,97,59,1,10793,59,1,1084,97,115,104,59,1,8212,97,115,117,114,101,100,97,110,103,108,101,59,1,8737,114,59,3,55349,56618,111,59,1,8487,4,3,99,100,110,12945,12954,12985,114,111,5,181,1,59,12952,1,181,4,4,59,97,99,100,12964,12966,12971,12976,1,8739,115,116,59,1,42,105,114,59,1,10992,111,116,5,183,1,59,12983,1,183,117,115,4,3,59,98,100,12995,12997,13e3,1,8722,59,1,8863,4,2,59,117,13006,13008,1,8760,59,1,10794,4,2,99,100,13017,13021,112,59,1,10971,114,59,1,8230,112,108,117,115,59,1,8723,4,2,100,112,13038,13044,101,108,115,59,1,8871,102,59,3,55349,56670,59,1,8723,4,2,99,116,13058,13063,114,59,3,55349,56514,112,111,115,59,1,8766,4,3,59,108,109,13077,13079,13087,
11,956,116,105,109,97,112,59,1,8888,97,112,59,1,8888,4,24,71,76,82,86,97,98,99,100,101,102,103,104,105,106,108,109,111,112,114,115,116,117,118,119,13142,13165,13217,13229,13247,13330,13359,13414,13420,13508,13513,13579,13602,13626,13631,13762,13767,13855,13936,13995,14214,14285,14312,14432,4,2,103,116,13148,13152,59,3,8921,824,4,2,59,118,13158,13161,3,8811,8402,59,3,8811,824,4,3,101,108,116,13173,13200,13204,102,116,4,2,97,114,13181,13188,114,114,111,119,59,1,8653,105,103,104,116,97,114,114,111,119,59,1,8654,59,3,8920,824,4,2,59,118,13210,13213,3,8810,8402,59,3,8810,824,105,103,104,116,97,114,114,111,119,59,1,8655,4,2,68,100,13235,13241,97,115,104,59,1,8879,97,115,104,59,1,8878,4,5,98,99,110,112,116,13259,13264,13270,13275,13308,108,97,59,1,8711,117,116,101,59,1,324,103,59,3,8736,8402,4,5,59,69,105,111,112,13287,13289,13293,13298,13302,1,8777,59,3,10864,824,100,59,3,8779,824,115,59,1,329,114,111,120,59,1,8777,117,114,4,2,59,97,13316,13318,1,9838,108,4,2,59,115,13325,13327,1,9838,59,1,8469,4,2,115,117,13336,13344,112,5,160,1,59,13342,1,160,109,112,4,2,59,101,13352,13355,3,8782,824,59,3,8783,824,4,5,97,101,111,117,121,13371,13385,13391,13407,13411,4,2,112,114,13377,13380,59,1,10819,111,110,59,1,328,100,105,108,59,1,326,110,103,4,2,59,100,13399,13401,1,8775,111,116,59,3,10861,824,112,59,1,10818,59,1,1085,97,115,104,59,1,8211,4,7,59,65,97,100,113,115,120,13436,13438,13443,13466,13472,13478,13494,1,8800,114,114,59,1,8663,114,4,2,104,114,13450,13454,107,59,1,10532,4,2,59,111,13460,13462,1,8599,119,59,1,8599,111,116,59,3,8784,824,117,105,118,59,1,8802,4,2,101,105,13484,13489,97,114,59,1,10536,109,59,3,8770,824,105,115,116,4,2,59,115,13503,13505,1,8708,59,1,8708,114,59,3,55349,56619,4,4,69,101,115,116,13523,13527,13563,13568,59,3,8807,824,4,3,59,113,115,13535,13537,13559,1,8817,4,3,59,113,115,13545,13547,13551,1,8817,59,3,8807,824,108,97,110,116,59,3,10878,824,59,3,10878,824,105,109,59,1,8821,4,2,59,114,13574,13576,1,8815,59,1,8815,4,3,65,97,112,13587,13592,13597,114,114,59,1,8654,114,114,59,1,8622,97,114,59,1,10994,4,3,59,115,118,13610,13612,13623,1,8715,4,2,59,100,13618,13620,1,8956,59,1,8954,59,1,8715,99,121,59,1,1114,4,7,65,69,97,100,101,115,116,13647,13652,13656,13661,13665,13737,13742,114,114,59,1,8653,59,3,8806,824,114,114,59,1,8602,114,59,1,8229,4,4,59,102,113,115,13675,13677,13703,13725,1,8816,116,4,2,97,114,13684,13691,114,114,111,119,59,1,8602,105,103,104,116,97,114,114,111,119,59,1,8622,4,3,59,113,115,13711,13713,13717,1,8816,59,3,8806,824,108,97,110,116,59,3,10877,824,4,2,59,115,13731,13734,3,10877,824,59,1,8814,105,109,59,1,8820,4,2,59,114,13748,13750,1,8814,105,4,2,59,101,13757,13759,1,8938,59,1,8940,105,100,59,1,8740,4,2,112,116,13773,13778,102,59,3,55349,56671,5,172,3,59,105,110,13787,13789,13829,1,172,110,4,4,59,69,100,118,13800,13802,13806,13812,1,8713,59,3,8953,824,111,116,59,3,8949,824,4,3,97,98,99,13820,13823,13826,59,1,8713,59,1,8951,59,1,8950,105,4,2,59,118,13836,13838,1,8716,4,3,97,98,99,13846,13849,13852,59,1,8716,59,1,8958,59,1,8957,4,3,97,111,114,13863,13892,13899,114,4,4,59,97,115,116,13874,13876,13883,13888,1,8742,108,108,101,108,59,1,8742,108,59,3,11005,8421,59,3,8706,824,108,105,110,116,59,1,10772,4,3,59,99,101,13907,13909,13914,1,8832,117,101,59,1,8928,4,2,59,99,13920,13923,3,10927,824,4,2,59,101,13929,13931,1,8832,113,59,3,10927,824,4,4,65,97,105,116,13946,13951,13971,13982,114,114,59,1,8655,114,114,4,3,59,99,119,13961,13963,13967,1,8603,59,3,10547,824,59,3,8605,824,103,104,116,97,114,114,111,119,59,1,8603,114,105,4,2,59,101,13990,13992,1,8939,59,1,8941,4,7,99,104,105,109,112,113,117,14011,14036,14060,14080,14085,14090,14106,4,4,59,99,101,114,14021,14023,14028,14032,1,8833,117,101,59,1,8929,59,3,10928,824,59,3,55349,56515,111,114,116,4,2,109,112,14045,14050,105,100,59,1,8740,97,114,97,108,108,101,108,59,1,8742,109,4,2,59,101,14067,14069,1,8769,4,2,59,113,14075,14077,1,8772,59,1,8772,105,100,59,1,8740,97,114,59,1,8742,115,117,4,2,98,112,14098,14102,101,59,1,8930,101,59,1,8931,4,3,98,99,112,14114,14157,14171,4,4,59,69,101,115,14124,14126,14130,14133,1,8836,59,3,10949,824,59,1,8840,101,116,4,2,59,101,14141,14144,3,8834,8402,113,4,2,59,113,14151,14153,1,8840,59,3,10949,824,99,4,2,59,101,14164,14166,1,8833,113,59,3,10928,824,4,4,59,69,101,115,14181,14183,14187,14190,1,8837,59,3,10950,824,59,1,8841,101,116,4,2,59,101,14198,14201,3,8835,8402,113,4,2,59,113,14208,14210,1,8841,59,3,10950,824,4,4,103,105,108,114,14224,14228,14238,14242,108,59,1,8825,108,100,101,5,241,1,59,14236,1,241,103,59,1,8824,105,97,110,103,108,101,4,2,108,114,14254,14269,101,102,116,4,2,59,101,14263,14265,1,8938,113,59,1,8940,105,103,104,116,4,2,59,101,14279,14281,1,8939,113,59,1,8941,4,2,59,109,14291,14293,1,957,4,3,59,101,115,14301,14303,14308,1,35,114,111,59,1,8470,112,59,1,8199,4,9,68,72,97,100,103,105,108,114,115,14332,14338,14344,14349,14355,14369,14376,14408,14426,97,115,104,59,1,8877,97,114,114,59,1,10500,
1112,59,3,8781,8402,97,115,104,59,1,8876,4,2,101,116,14361,14365,59,3,8805,8402,59,3,62,8402,110,102,105,110,59,1,10718,4,3,65,101,116,14384,14389,14393,114,114,59,1,10498,59,3,8804,8402,4,2,59,114,14399,14402,3,60,8402,105,101,59,3,8884,8402,4,2,65,116,14414,14419,114,114,59,1,10499,114,105,101,59,3,8885,8402,105,109,59,3,8764,8402,4,3,65,97,110,14440,14445,14468,114,114,59,1,8662,114,4,2,104,114,14452,14456,107,59,1,10531,4,2,59,111,14462,14464,1,8598,119,59,1,8598,101,97,114,59,1,10535,4,18,83,97,99,100,101,102,103,104,105,108,109,111,112,114,115,116,117,118,14512,14515,14535,14560,14597,14603,14618,14643,14657,14662,14701,14741,14747,14769,14851,14877,14907,14916,59,1,9416,4,2,99,115,14521,14531,117,116,101,5,243,1,59,14529,1,243,116,59,1,8859,4,2,105,121,14541,14557,114,4,2,59,99,14548,14550,1,8858,5,244,1,59,14555,1,244,59,1,1086,4,5,97,98,105,111,115,14572,14577,14583,14587,14591,115,104,59,1,8861,108,97,99,59,1,337,118,59,1,10808,116,59,1,8857,111,108,100,59,1,10684,108,105,103,59,1,339,4,2,99,114,14609,14614,105,114,59,1,10687,59,3,55349,56620,4,3,111,114,116,14626,14630,14640,110,59,1,731,97,118,101,5,242,1,59,14638,1,242,59,1,10689,4,2,98,109,14649,14654,97,114,59,1,10677,59,1,937,110,116,59,1,8750,4,4,97,99,105,116,14672,14677,14693,14698,114,114,59,1,8634,4,2,105,114,14683,14687,114,59,1,10686,111,115,115,59,1,10683,110,101,59,1,8254,59,1,10688,4,3,97,101,105,14709,14714,14719,99,114,59,1,333,103,97,59,1,969,4,3,99,100,110,14727,14733,14736,114,111,110,59,1,959,59,1,10678,117,115,59,1,8854,112,102,59,3,55349,56672,4,3,97,101,108,14755,14759,14764,114,59,1,10679,114,112,59,1,10681,117,115,59,1,8853,4,7,59,97,100,105,111,115,118,14785,14787,14792,14831,14837,14841,14848,1,8744,114,114,59,1,8635,4,4,59,101,102,109,14802,14804,14817,14824,1,10845,114,4,2,59,111,14811,14813,1,8500,102,59,1,8500,5,170,1,59,14822,1,170,5,186,1,59,14829,1,186,103,111,102,59,1,8886,114,59,1,10838,108,111,112,101,59,1,10839,59,1,10843,4,3,99,108,111,14859,14863,14873,114,59,1,8500,97,115,104,5,248,1,59,14871,1,248,108,59,1,8856,
1105,4,2,108,109,14884,14893,100,101,5,245,1,59,14891,1,245,101,115,4,2,59,97,14901,14903,1,8855,115,59,1,10806,109,108,5,246,1,59,14914,1,246,98,97,114,59,1,9021,4,12,97,99,101,102,104,105,108,109,111,114,115,117,14948,14992,14996,15033,15038,15068,15090,15189,15192,15222,15427,15441,114,4,4,59,97,115,116,14959,14961,14976,14989,1,8741,5,182,2,59,108,14968,14970,1,182,108,101,108,59,1,8741,4,2,105,108,14982,14986,109,59,1,10995,59,1,11005,59,1,8706,121,59,1,1087,114,4,5,99,105,109,112,116,15009,15014,15019,15024,15027,110,116,59,1,37,111,100,59,1,46,105,108,59,1,8240,59,1,8869,101,110,107,59,1,8241,114,59,3,55349,56621,4,3,105,109,111,15046,15057,15063,4,2,59,118,15052,15054,1,966,59,1,981,109,97,116,59,1,8499,110,101,59,1,9742,4,3,59,116,118,15076,15078,15087,1,960,99,104,102,111,114,107,59,1,8916,59,1,982,4,2,97,117,15096,15119,110,4,2,99,107,15103,15115,107,4,2,59,104,15110,15112,1,8463,59,1,8462,118,59,1,8463,115,4,9,59,97,98,99,100,101,109,115,116,15140,15142,15148,15151,15156,15168,15171,15179,15184,1,43,99,105,114,59,1,10787,59,1,8862,105,114,59,1,10786,4,2,111,117,15162,15165,59,1,8724,59,1,10789,59,1,10866,110,5,177,1,59,15177,1,177,105,109,59,1,10790,119,111,59,1,10791,59,1,177,4,3,105,112,117,15200,15208,15213,110,116,105,110,116,59,1,10773,102,59,3,55349,56673,110,100,5,163,1,59,15220,1,163,4,10,59,69,97,99,101,105,110,111,115,117,15244,15246,15249,15253,15258,15334,15347,15367,15416,15421,1,8826,59,1,10931,112,59,1,10935,117,101,59,1,8828,4,2,59,99,15264,15266,1,10927,4,6,59,97,99,101,110,115,15280,15282,15290,15299,15303,15329,1,8826,112,112,114,111,120,59,1,10935,117,114,108,121,101,113,59,1,8828,113,59,1,10927,4,3,97,101,115,15311,15319,15324,112,112,114,111,120,59,1,10937,113,113,59,1,10933,105,109,59,1,8936,105,109,59,1,8830,109,101,4,2,59,115,15342,15344,1,8242,59,1,8473,4,3,69,97,115,15355,15358,15362,59,1,10933,112,59,1,10937,105,109,59,1,8936,4,3,100,102,112,15375,15378,15404,59,1,8719,4,3,97,108,115,15386,15392,15398,108,97,114,59,1,9006,105,110,101,59,1,8978,117,114,102,59,1,8979,4,2,59,116,15410,15412,1,8733,111,59,1,8733,105,109,59,1,8830,114,101,108,59,1,8880,4,2,99,105,15433,15438,114,59,3,55349,56517,59,1,968,110,99,115,112,59,1,8200,4,6,102,105,111,112,115,117,15462,15467,15472,15478,15485,15491,114,59,3,55349,56622,110,116,59,1,10764,112,102,59,3,55349,56674,114,105,109,101,59,1,8279,99,114,59,3,55349,56518,4,3,97,101,111,15499,15520,15534,116,4,2,101,105,15506,15515,114,110,105,111,110,115,59,1,8461,110,116,59,1,10774,115,116,4,2,59,101,15528,15530,1,63,113,59,1,8799,116,5,34,1,59,15540,1,34,4,21,65,66,72,97,98,99,100,101,102,104,105,108,109,110,111,112,114,115,116,117,120,15586,15609,15615,15620,15796,15855,15893,15931,15977,16001,16039,16183,16204,16222,16228,16285,16312,16318,16363,16408,16416,4,3,97,114,116,15594,15599,15603,114,114,59,1,8667,114,59,1,8658,97,105,108,59,1,10524,97,114,114,59,1,10511,97,114,59,1,10596,4,7,99,100,101,110,113,114,116,15636,15651,15656,15664,15687,15696,15770,4,2,101,117,15642,15646,59,3,8765,817,116,101,59,1,341,105,99,59,1,8730,109,112,116,121,118,59,1,10675,103,4,4,59,100,101,108,15675,15677,15680,15683,1,10217,59,1,10642,59,1,10661,101,59,1,10217,117,111,5,187,1,59,15694,1,187,114,4,11,59,97,98,99,102,104,108,112,115,116,119,15721,15723,15727,15739,15742,15746,15750,15754,15758,15763,15767,1,8594,112,59,1,10613,4,2,59,102,15733,15735,1,8677,115,59,1,10528,59,1,10547,115,59,1,10526,107,59,1,8618,112,59,1,8620,108,59,1,10565,105,109,59,1,10612,108,59,1,8611,59,1,8605,4,2,97,105,15776,15781,105,108,59,1,10522,111,4,2,59,110,15788,15790,1,8758,97,108,115,59,1,8474,4,3,97,98,114,15804,15809,15814,114,114,59,1,10509,114,107,59,1,10099,4,2,97,107,15820,15833,99,4,2,101,107,15827,15830,59,1,125,59,1,93,4,2,101,115,15839,15842,59,1,10636,108,4,2,100,117,15849,15852,59,1,10638,59,1,10640,4,4,97,101,117,121,15865,15871,15886,15890,114,111,110,59,1,345,4,2,100,105,15877,15882,105,108,59,1,343,108,59,1,8969,98,59,1,125,59,1,1088,4,4,99,108,113,115,15903,15907,15914,15927,97,59,1,10551,100,104,97,114,59,1,10601,117,111,4,2,59,114,15922,15924,1,8221,59,1,8221,104,59,1,8627,4,3,97,99,103,15939,15966,15970,108,4,4,59,105,112,115,15950,15952,15957,15963,1,8476,110,101,59,1,8475,97,114,116,59,1,8476,59,1,8477,116,59,1,9645,5,174,1,59,15975,1,174,4,3,105,108,114,15985,15991,15997,115,104,116,59,1,10621,111,111,114,59,1,8971,59,3,55349,56623,4,2,97,111,
116007,16028,114,4,2,100,117,16014,16017,59,1,8641,4,2,59,108,16023,16025,1,8640,59,1,10604,4,2,59,118,16034,16036,1,961,59,1,1009,4,3,103,110,115,16047,16167,16171,104,116,4,6,97,104,108,114,115,116,16063,16081,16103,16130,16143,16155,114,114,111,119,4,2,59,116,16073,16075,1,8594,97,105,108,59,1,8611,97,114,112,111,111,110,4,2,100,117,16093,16099,111,119,110,59,1,8641,112,59,1,8640,101,102,116,4,2,97,104,16112,16120,114,114,111,119,115,59,1,8644,97,114,112,111,111,110,115,59,1,8652,105,103,104,116,97,114,114,111,119,115,59,1,8649,113,117,105,103,97,114,114,111,119,59,1,8605,104,114,101,101,116,105,109,101,115,59,1,8908,103,59,1,730,105,110,103,100,111,116,115,101,113,59,1,8787,4,3,97,104,109,16191,16196,16201,114,114,59,1,8644,97,114,59,1,8652,59,1,8207,111,117,115,116,4,2,59,97,16214,16216,1,9137,99,104,101,59,1,9137,109,105,100,59,1,10990,4,4,97,98,112,116,16238,16252,16257,16278,4,2,110,114,16244,16248,103,59,1,10221,114,59,1,8702,114,107,59,1,10215,4,3,97,102,108,16265,16269,16273,114,59,1,10630,59,3,55349,56675,117,115,59,1,10798,105,109,101,115,59,1,10805,4,2,97,112,16291,16304,114,4,2,59,103,16298,16300,1,41,116,59,1,10644,111,108,105,110,116,59,1,10770,97,114,114,59,1,8649,4,4,97,99,104,113,16328,16334,16339,16342,113,117,111,59,1,8250,114,59,3,55349,56519,59,1,8625,4,2,98,117,16348,16351,59,1,93,111,4,2,59,114,16358,16360,1,8217,59,1,8217,4,3,104,105,114,16371,16377,16383,114,101,101,59,1,8908,109,101,115,59,1,8906,105,4,4,59,101,102,108,16394,16396,16399,16402,1,9657,59,1,8885,59,1,9656,116,114,105,59,1,10702,108,117,104,97,114,59,1,10600,59,1,8478,4,19,97,98,99,100,101,102,104,105,108,109,111,112,113,114,115,116,117,119,122,16459,16466,16472,16572,16590,16672,16687,16746,16844,16850,16924,16963,16988,17115,17121,17154,17206,17614,17656,99,117,116,101,59,1,347,113,117,111,59,1,8218,4,10,59,69,97,99,101,105,110,112,115,121,16494,16496,16499,16513,16518,16531,16536,16556,16564,16569,1,8827,59,1,10932,4,2,112,114,16505,16508,59,1,10936,111,110,59,1,353,117,101,59,1,8829,4,2,59,100,16524,16526,1,10928,105,108,59,1,351,114,99,59,1,349,4,3,69,97,115,16544,16547,16551,59,1,10934,112,59,1,10938,105,109,59,1,8937,111,108,105,110,116,59,1,10771,105,109,59,1,8831,59,1,1089,111,116,4,3,59,98,101,16582,16584,16587,1,8901,59,1,8865,59,1,10854,4,7,65,97,99,109,115,116,120,16606,16611,16634,16642,16646,16652,16668,114,114,59,1,8664,114,4,2,104,114,16618,16622,107,59,1,10533,4,2,59,111,16628,16630,1,8600,119,59,1,8600,116,5,167,1,59,16640,1,167,105,59,1,59,119,97,114,59,1,10537,109,4,2,105,110,16659,16665,110,117,115,59,1,8726,59,1,8726,116,59,1,10038,114,4,2,59,111,16679,16682,3,55349,56624,119,110,59,1,8994,4,4,97,99,111,121,16697,16702,16716,16739,114,112,59,1,9839,4,2,104,121,16708,16713,99,121,59,1,1097,59,1,1096,114,116,4,2,109,112,16724,16729,105,100,59,1,8739,97,114,97,108,108,101,108,59,1,8741,5,173,1,59,16744,1,173,4,2,103,109,16752,16770,109,97,4,3,59,102,118,16762,16764,16767,1,963,59,1,962,59,1,962,4,8,59,100,101,103,108,110,112,114,16788,16790,16795,16806,16817,16828,16832,16838,1,8764,111,116,59,1,10858,4,2,59,113,16801,16803,1,8771,59,1,8771,4,2,59,69,16812,16814,1,10910,59,1,10912,4,2,59,69,16823,16825,1,10909,59,1,10911,101,59,1,8774,108,117,115,59,1,10788,97,114,114,59,1,10610,97,114,114,59,1,8592,4,4,97,101,105,116,16860,16883,16891,16904,4,2,108,115,16866,16878,108,115,101,116,109,105,110,117,115,59,1,8726,104,112,59,1,10803,112,97,114,115,108,59,1,10724,4,2,100,108,16897,16900,59,1,8739,101,59,1,8995,4,2,59,101,16910,16912,1,10922,4,2,59,115,16918,16920,1,10924,59,3,10924,65024,4,3,102,108,112,16932,16938,16958,116,99,121,59,1,1100,4,2,59,98,16944,16946,1,47,4,2,59,97,16952,16954,1,10692,114,59,1,9023,102,59,3,55349,56676,97,4,2,100,114,16970,16985,101,115,4,2,59,117,16978,16980,1,9824,105,116,59,1,9824,59,1,8741,4,3,99,115,117,16996,17028,17089,4,2,97,117,17002,17015,112,4,2,59,115,17009,17011,1,8851,59,3,8851,65024,112,4,2,59,115,17022,17024,1,8852,59,3,8852,65024,117,4,2,98,112,17035,17062,4,3,59,101,115,17043,17045,17048,1,8847,59,1,8849,101,116,4,2,59,101,17056,17058,1,8847,113,59,1,8849,4,3,59,101,115,17070,17072,17075,1,8848,59,1,8850,101,116,4,2,59,101,17083,17085,1,8848,113,59,1,8850,4,3,59,97,102,17097,17099,17112,1,9633,114,4,2,101,102,17106,17109,59,1,9633,59,1,9642,59,1,9642,97,114,114,59,1,8594,4,4,99,101,109,116,17131,17136,17142,17148,114,59,3,55349,56520,116,109,110,59,1,8726,105,108,101,59,1,8995,97,114,102,59,1,8902,4,2,97,114,17160,17172,114,4,2,59,102,17167,17169,1,9734,59,1,9733,4,2,97,110,17178,17202,105,103,104,116,4,2,101,112,17188,17197,112,115,105,108,111,110,59,1,1013,104,105,59,1,981,115,59,1,175,4,5,98,99,109,110,112,17218,17351,17420,17423,17427,4,9,59,69,100,101,109,110,112,114,115,17238,17240,17243,17248,172
161,17267,17279,17285,17291,1,8834,59,1,10949,111,116,59,1,10941,4,2,59,100,17254,17256,1,8838,111,116,59,1,10947,117,108,116,59,1,10945,4,2,69,101,17273,17276,59,1,10955,59,1,8842,108,117,115,59,1,10943,97,114,114,59,1,10617,4,3,101,105,117,17299,17335,17339,116,4,3,59,101,110,17308,17310,17322,1,8834,113,4,2,59,113,17317,17319,1,8838,59,1,10949,101,113,4,2,59,113,17330,17332,1,8842,59,1,10955,109,59,1,10951,4,2,98,112,17345,17348,59,1,10965,59,1,10963,99,4,6,59,97,99,101,110,115,17366,17368,17376,17385,17389,17415,1,8827,112,112,114,111,120,59,1,10936,117,114,108,121,101,113,59,1,8829,113,59,1,10928,4,3,97,101,115,17397,17405,17410,112,112,114,111,120,59,1,10938,113,113,59,1,10934,105,109,59,1,8937,105,109,59,1,8831,59,1,8721,103,59,1,9834,4,13,49,50,51,59,69,100,101,104,108,109,110,112,115,17455,17462,17469,17476,17478,17481,17496,17509,17524,17530,17536,17548,17554,5,185,1,59,17460,1,185,5,178,1,59,17467,1,178,5,179,1,59,17474,1,179,1,8835,59,1,10950,4,2,111,115,17487,17491,116,59,1,10942,117,98,59,1,10968,4,2,59,100,17502,17504,1,8839,111,116,59,1,10948,115,4,2,111,117,17516,
117520,108,59,1,10185,98,59,1,10967,97,114,114,59,1,10619,117,108,116,59,1,10946,4,2,69,101,17542,17545,59,1,10956,59,1,8843,108,117,115,59,1,10944,4,3,101,105,117,17562,17598,17602,116,4,3,59,101,110,17571,17573,17585,1,8835,113,4,2,59,113,17580,17582,1,8839,59,1,10950,101,113,4,2,59,113,17593,17595,1,8843,59,1,10956,109,59,1,10952,4,2,98,112,17608,17611,59,1,10964,59,1,10966,4,3,65,97,110,17622,17627,17650,114,114,59,1,8665,114,4,2,104,114,17634,17638,107,59,1,10534,4,2,59,111,17644,17646,1,8601,119,59,1,8601,119,97,114,59,1,10538,108,105,103,5,223,1,59,17664,1,223,4,13,97,98,99,100,101,102,104,105,111,112,114,115,119,17694,17709,17714,17737,17742,17749,17754,17860,17905,17957,17964,18090,18122,4,2,114,117,17700,17706,103,101,116,59,1,8982,59,1,964,114,107,59,1,9140,4,3,97,101,121,17722,17728,17734,114,111,110,59,1,357,100,105,108,59,1,355,59,1,1090,111,116,59,1,8411,108,114,101,99,59,1,8981,114,59,3,55349,56625,4,4,101,105,107,111,17764,17805,17836,17851,4,2,114,116,17770,17786,101,4,2,52,102,17777,17780,59,1,8756,111,114,101,59,1,8756,97,4,3,59,115,118,17795,17797,17802,1,952,121,109,59,1,977,59,1,977,4,2,99,110,17811,17831,107,4,2,97,115,17818,17826,112,112,114,111,120,59,1,8776,105,109,59,1,8764,115,112,59,1,8201,4,2,97,115,17842,17846,112,59,1,8776,105,109,59,1,8764,114,110,5,254,1,59,17858,1,254,4,3,108,109,110,17868,17873,17901,100,101,59,1,732,101,115,5,215,3,59,98,100,17884,17886,17898,1,215,4,2,59,97,17892,17894,1,8864,114,59,1,10801,59,1,10800,116,59,1,8749,4,3,101,112,115,17913,17917,17953,97,59,1,10536,4,4,59,98,99,102,17927,17929,17934,17939,1,8868,111,116,59,1,9014,105,114,59,1,10993,4,2,59,111,17945,17948,3,55349,56677,114,107,59,1,10970,97,59,1,10537,114,105,109,101,59,1,8244,4,3,97,105,112,17972,17977,18082,100,101,59,1,8482,4,7,97,100,101,109,112,115,116,17993,18051,18056,18059,18066,18072,18076,110,103,108,101,4,5,59,100,108,113,114,18009,18011,18017,18032,18035,1,9653,111,119,110,59,1,9663,101,102,116,4,2,59,101,18026,18028,1,9667,113,59,1,8884,59,1,8796,105,103,104,116,4,2,59,101,18045,18047,1,9657,113,59,1,8885,111,116,59,1,9708,59,1,8796,105,110,117,115,59,1,10810,108,117,115,59,1,10809,98,59,1,10701,105,109,101,59,1,10811,101,122,105,117,109,59,1,9186,4,3,99,104,116,18098,18111,18116,4,2,114,121,18104,18108,59,3,55349,56521,59,1,1094,99,121,59,1,1115,114,111,107,59,1,359,4,2,105,111,18128,18133,120,116,59,1,8812,104,101,97,100,4,2,108,114,18143,18154,101,102,116,97,114,114,111,119,59,1,8606,105,103,104,116,97,114,114,111,119,59,1,8608,4,18,65,72,97,98,99,100,102,103,104,108,109,111,112,114,115,116,117,119,18204,18209,18214,18234,18250,18268,18292,18308,18319,18343,18379,18397,18413,18504,18547,18553,18584,18603,114,114,59,1,8657,97,114,59,1,10595,4,2,99,114,18220,18230,117,116,101,5,250,1,59,18228,1,250,114,59,1,8593,114,4,2,99,101,18241,18245,121,59,1,1118,118,101,59,1,365,4,2,105,121,18256,18265,114,99,5,251,1,59,18263,1,251,59,1,1091,4,3,97,98,104,18276,18281,18287,114,114,59,1,8645,108,97,99,59,1,369,97,114,59,1,10606,4,2,105,114,18298,18304,115,104,116,59,1,10622,59,3,55349,56626,114,97,118,101,5,249,1,59,18317,1,249,4,2,97,98,18325,18338,114,4,2,108,114,18332,18335,59,1,8639,59,1,8638,108,107,59,1,9600,4,2,99,116,18349,18374,4,2,111,114,18355,18369,114,110,4,2,59,101,18363,18365,1,8988,114,59,1,8988,111,112,59,1,8975,114,105,59,1,9720,4,2,97,108,18385,18390,99,114,59,1,363,5,168,1,59,18395,1,168,4,2,103,112,18403,18408,111,110,59,1,371,102,59,3,55349,56678,4,6,97,100,104,108,115,117,18427,18434,18445,18470,18475,18494,114,114,111,119,59,1,8593,111,119,110,97,114,114,111,119,59,1,8597,97,114,112,111,111,110,4,2,108,114,18457,18463,101,102,116,59,1,8639,105,103,104,116,59,1,8638,117,115,59,1,8846,105,4,3,59,104,108,18484,18486,18489,1,965,59,1,978,111,110,59,1,965,112,97,114,114,111,119,115,59,1,8648,4,3,99,105,116,18512,18537,18542,4,2,111,114,18518,18532,114,110,4,2,59,101,18526,18528,1,8989,114,59,1,8989,111,112,59,1,8974,110,103,59,1,367,114,105,59,1,9721,99,114,59,3,55349,56522,4,3,100,105,114,18561,18566,18572,111,116,59,1,8944,108,100,101,59,1,361,105,4,2,59,102,18579,18581,1,9653,59,1,9652,4,2,97,109,18590,18595,114,114,59,1,8648,108,5,252,1,59,18601,1,252,97,110,103,108,101,59,1,10663,4,15,65,66,68,97,99,100,101,102,108,110,111,112,114,115,122,18643,18648,18661,18667,18847,18851,18857,18904,18909,18915,18931,18937,18943,18949,18996,114,114,59,1,8661,97,114,4,2,59,118,18656,18658,1,10984,59,1,10985,97,115,104,59,1,8872,4,2,110,114,18673,18679,103,114,116,59,1,10652,4,7,101,107,110,112,114,115,116,18695,18704,18711,18720,18742,18754,18810,112,115,105,108,111,110,59,1,1013,97,112,112,97,59,1,1008,111,116,104,105,110,
1103,59,1,8709,4,3,104,105,114,18728,18732,18735,105,59,1,981,59,1,982,111,112,116,111,59,1,8733,4,2,59,104,18748,18750,1,8597,111,59,1,1009,4,2,105,117,18760,18766,103,109,97,59,1,962,4,2,98,112,18772,18791,115,101,116,110,101,113,4,2,59,113,18784,18787,3,8842,65024,59,3,10955,65024,115,101,116,110,101,113,4,2,59,113,18803,18806,3,8843,65024,59,3,10956,65024,4,2,104,114,18816,18822,101,116,97,59,1,977,105,97,110,103,108,101,4,2,108,114,18834,18840,101,102,116,59,1,8882,105,103,104,116,59,1,8883,121,59,1,1074,97,115,104,59,1,8866,4,3,101,108,114,18865,18884,18890,4,3,59,98,101,18873,18875,18880,1,8744,97,114,59,1,8891,113,59,1,8794,108,105,112,59,1,8942,4,2,98,116,18896,18901,97,114,59,1,124,59,1,124,114,59,3,55349,56627,116,114,105,59,1,8882,115,117,4,2,98,112,18923,18927,59,3,8834,8402,59,3,8835,8402,112,102,59,3,55349,56679,114,111,112,59,1,8733,116,114,105,59,1,8883,4,2,99,117,18955,18960,114,59,3,55349,56523,4,2,98,112,18966,18981,110,4,2,69,101,18973,18977,59,3,10955,65024,59,3,8842,65024,110,4,2,69,101,18988,18992,59,3,10956,65024,59,3,8843,65024,105,103,122,97,103,59,1,10650,4,7,99,101,102,111,112,114,115,19020,19026,19061,19066,19072,19075,19089,105,114,99,59,1,373,4,2,100,105,19032,19055,4,2,98,103,19038,19043,97,114,59,1,10847,101,4,2,59,113,19050,19052,1,8743,59,1,8793,101,114,112,59,1,8472,114,59,3,55349,56628,112,102,59,3,55349,56680,59,1,8472,4,2,59,101,19081,19083,1,8768,97,116,104,59,1,8768,99,114,59,3,55349,56524,4,14,99,100,102,104,105,108,109,110,111,114,115,117,118,119,19125,19146,19152,19157,19173,19176,19192,19197,19202,19236,19252,19269,19286,19291,4,3,97,105,117,19133,19137,19142,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,116,114,105,59,1,9661,114,59,3,55349,56629,4,2,65,97,19163,19168,114,114,59,1,10234,114,114,59,1,10231,59,1,958,4,2,65,97,19182,19187,114,114,59,1,10232,114,114,59,1,10229,97,112,59,1,10236,105,115,59,1,8955,4,3,100,112,116,19210,19215,19230,111,116,59,1,10752,4,2,102,108,19221,19225,59,3,55349,56681,117,115,59,1,10753,105,109,101,59,1,10754,4,2,65,97,19242,19247,114,114,59,1,10233,114,114,59,1,10230,4,2,99,113,19258,19263,114,59,3,55349,56525,99,117,112,59,1,10758,4,2,112,116,19275,19281,108,117,115,59,1,10756,114,105,59,1,9651,101,101,59,1,8897,101,100,103,101,59,1,8896,4,8,97,99,101,102,105,111,115,117,19316,19335,19349,19357,19362,19367,19373,19379,99,4,2,117,121,19323,19332,116,101,5,253,1,59,19330,1,253,59,1,1103,4,2,105,121,19341,19346,114,99,59,1,375,59,1,1099,110,5,165,1,59,19355,1,165,114,59,3,55349,56630,99,121,59,1,1111,112,102,59,3,55349,56682,99,114,59,3,55349,56526,4,2,99,109,19385,19389,121,59,1,1102,108,5,255,1,59,19395,1,255,4,10,97,99,100,101,102,104,105,111,115,119,19419,19426,19441,19446,19462,19467,19472,19480,19486,19492,99,117,116,101,59,1,378,4,2,97,121,19432,19438,114,111,110,59,1,382,59,1,1079,111,116,59,1,380,4,2,101,116,19452,19458,116,114,102,59,1,8488,97,59,1,950,114,59,3,55349,56631,99,121,59,1,1078,103,114,97,114,114,59,1,8669,112,102,59,3,55349,56683,99,114,59,3,55349,56527,4,2,106,110,19498,19501,59,1,8205,106,59,1,8204])},7118:(t,e,n)=>{"use strict";const r=n(4284),o=n(1734),i=r.CODE_POINTS;t.exports=class{constructor(){this.html=null,this.pos=-1,this.lastGapPos=-1,this.lastCharPos=-1,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=65536}_err(){}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.lastCharPos){const e=this.html.charCodeAt(this.pos+1);if(r.isSurrogatePair(e))return this.pos++,this._addGap(),r.getSurrogatePairCodePoint(t,e)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,i.EOF;return this._err(o.surrogateInInputStream),t}dropParsedChunk(){this.pos>this.bufferWaterline&&(this.lastCharPos-=this.pos,this.html=this.html.substring(this.pos),this.pos=0,this.lastGapPos=-1,this.gapStack=[])}write(t,e){this.html?this.html+=t:this.html=t,this.lastCharPos=this.html.length-1,this.endOfChunkHit=!1,this.lastChunkWritten=e}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1,this.html.length),this.lastCharPos=this.html.length-1,this.endOfChunkHit=!1}advance(){if(this.pos++,this.pos>this.lastCharPos)return this.endOfChunkHit=!this.lastChunkWritten,i.EOF;let t=this.html.charCodeAt(this.pos);return this.skipNextNewLine&&t===i.LINE_FEED?(this.skipNextNewLine=!1,this._addGap(),this.advance()):t===i.CARRIAGE_RETURN?(this.skipNextNewLine=!0,i.LINE_FEED):(this.skipNextNewLine=!1,r.isSurrogate(t)&&(t=this._processSurrogate(t)),t>31&&t<127||t===i.LINE_FEED||t===i.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){r.isControlCodePoint(t)?this._err(o.controlCharacterInInputStream):r.isUndefinedCodePoint(t)&&this._err(o.noncharacterInInputStream)}retreat(){this.pos===this.lastGapPos&&(this.lastGapPos=this.gapStack.pop(),this.pos--),this.pos--}}},7296:(t,e,n)=>{"use strict";const{DOCUMENT_MODE:r}=n(6152);e.createDocument=function(){return{nodeName:"#document",mode:r.NO_QUIRKS,childNodes:[]}},e.createDocumentFragment=function(){return{nodeName:"#document-fragment",childNodes:[]}},e.createElement=function(t,e,n){return{nodeName:t,tagName:t,attrs:n,namespaceURI:e,childNodes:[],parentNode:null}},e.createCommentNode=function(t){return{nodeName:"#comment",data:t,parentNode:null}};const o=function(t){return{nodeName:"#text",value:t,parentNode:null}},i=e.appendChild=function(t,e){t.childNodes.push(e),e.parentNode=t},a=e.insertBefore=function(t,e,n){const r=t.childNodes.indexOf(n);t.childNodes.splice(r,0,e),e.parentNode=t};e.setTemplateContent=function(t,e){t.content=e},e.getTemplateContent=function(t){return t.content},e.setDocumentType=function(t,e,n,r){let o=null;for(let i=0;i<t.childNodes.length;i++)if("#documentType"===t.childNodes[i].nodeName){o=t.childNodes[i];break}o?(o.name=e,o.publicId=n,o.systemId=r):i(t,{nodeName:"#documentType",name:e,publicId:n,systemId:r})},e.setDocumentMode=function(t,e){t.mode=e},e.getDocumentMode=function(t){return t.mode},e.detachNode=function(t){if(t.parentNode){const e=t.parentNode.childNodes.indexOf(t);t.parentNode.childNodes.splice(e,1),t.parentNode=null}},e.insertText=function(t,e){if(t.childNodes.length){const n=t.childNodes[t.childNodes.length-1];if("#text"===n.nodeName)return void(n.value+=e)}i(t,o(e))},e.insertTextBefore=function(t,e,n){const r=t.childNodes[t.childNodes.indexOf(n)-1];r&&"#text"===r.nodeName?r.value+=e:a(t,o(e),n)},e.adoptAttributes=function(t,e){const n=[];for(let r=0;r<t.attrs.length;r++)n.push(t.attrs[r].name);for(let r=0;r<e.length;r++)-1===n.indexOf(e[r].name)&&t.attrs.push(e[r])},e.getFirstChild=function(t){return t.childNodes[0]},e.getChildNodes=function(t){return t.childNodes},e.getParentNode=function(t){return t.parentNode},e.getAttrList=function(t){return t.attrs},e.getTagName=function(t){return t.tagName},e.getNamespaceURI=function(t){return t.namespaceURI},e.getTextNodeContent=function(t){return t.value},e.getCommentNodeContent=function(t){return t.data},e.getDocumentTypeNodeName=function(t){return t.name},e.getDocumentTypeNodePublicId=function(t){return t.publicId},e.getDocumentTypeNodeSystemId=function(t){return t.systemId},e.isTextNode=function(t){return"#text"===t.nodeName},e.isCommentNode=function(t){return"#comment"===t.nodeName},e.isDocumentTypeNode=function(t){return"#documentType"===t.nodeName},e.isElementNode=function(t){return!!t.tagName},e.setNodeSourceCodeLocation=function(t,e){t.sourceCodeLocation=e},e.getNodeSourceCodeLocation=function(t){return t.sourceCodeLocation},e.updateNodeSourceCodeLocation=function(t,e){t.sourceCodeLocation=Object.assign(t.sourceCodeLocation,e)}},8904:t=>{"use strict";
1t.exports=function(t,e){return[t,e=e||Object.create(null)].reduce((t,e)=>(Object.keys(e).forEach(n=>{t[n]=e[n]}),t),Object.create(null))}},1704:t=>{"use strict";class e{constructor(t){const e={},n=this._getOverriddenMethods(this,e);for(const r of Object.keys(n))"function"==typeof n[r]&&(e[r]=t[r],t[r]=n[r])}_getOverriddenMethods(){throw new Error("Not implemented")}}e.install=function(t,e,n){t.__mixins||(t.__mixins=[]);for(let o=0;o<t.__mixins.length;o++)if(t.__mixins[o].constructor===e)return t.__mixins[o];const r=new e(t,n);return t.__mixins.push(r),r},t.exports=e},6585:t=>{"use strict";var e=/([-.*+?^${}()|[\]\/\\])/g,n=/\\/g,r=function(t){return(t+"").replace(e,"\\$1")},o=function(t){return(t+"").replace(n,"")},i=RegExp("^(?:\\s*(,)\\s*|\\s*(<combinator>+)\\s*|(\\s+)|(<unicode>+|\\*)|\\#(<unicode>+)|\\.(<unicode>+)|\\[\\s*(<unicode1>+)(?:\\s*([*^$!~|]?=)(?:\\s*(?:([\"']?)(.*?)\\9)))?\\s*\\](?!\\])|(:+)(<unicode>+)(?:\\((?:(?:([\"'])([^\\13]*)\\13)|((?:\\([^)]+\\)|[^()]*)+))\\))?)".replace(/<combinator>/,"["+r(">+~`!@$%^&={}\\;</")+"]").replace(/<unicode>/g,"(?:[\\w\\u00a1-\\uFFFF-]|\\\\[^\\s0-9a-f])").replace(/<unicode1>/g,"(?:[:\\w\\u00a1-\\uFFFF-]|\\\\[^\\s0-9a-f])")),a=function(t){this.combinator=t||" ",this.tag="*"};a.prototype.toString=function(){if(!this.raw){var t,e,n="";if(n+=this.tag||"*",this.id&&(n+="#"+this.id),this.classes&&(n+="."+this.classList.join(".")),this.attributes)for(t=0;e=this.attributes[t++];)n+="["+e.name+(e.operator?e.operator+'"'+e.value+'"':"")+"]";if(this.pseudos)for(t=0;e=this.pseudos[t++];)n+=":"+e.name,e.value&&(n+="("+e.value+")");this.raw=n}return this.raw};var s=function(){this.length=0};s.prototype.toString=function(){if(!this.raw){for(var t,e="",n=0;t=this[n++];)1!==n&&(e+=" ")," "!==t.combinator&&(e+=t.combinator+" "),e+=t;this.raw=e}return this.raw};var l=function(t,e,n,i,l,c,u,p,d,f,h,g,m,v,y,b){var _,T;if((e||!this.length)&&(_=this[this.length++]=new s,e))return"";if(_||(_=this[this.length-1]),(n||i||!_.length)&&(T=_[_.length++]=new a(n)),T||(T=_[_.length-1]),l)T.tag=o(l);else if(c)T.id=o(c);else if(u){var C=o(u),w=T.classes||(T.classes={});if(!w[C]){w[C]=r(u);var E=T.classList||(T.classList=[]);E.push(C),E.sort()}}else m?(b=b||y,(T.pseudos||(T.pseudos=[])).push({type:1==g.length?"class":"element",name:o(m),escapedName:r(m),value:b?o(b):null,escapedValue:b?r(b):null})):p&&(h=h?r(h):null,(T.attributes||(T.attributes=[])).push({operator:d,name:o(p),escapedName:r(p),value:h?o(h):null,escapedValue:h?r(h):null}));return""},c=function(t){this.length=0;for(var e,n=this,r=t;t;){if(e=t.replace(i,function(){return l.apply(n,arguments)}),e===t)throw new Error(r+" is an invalid expression");t=e}};c.prototype.toString=function(){if(!this.raw){for(var t,e=[],n=0;t=this[n++];)e.push(t);this.raw=e.join(", ")}return this.raw};var u={};t.exports=function(t){return null==t?null:(t=(""+t).replace(/^\s+|\s+$/g,""),u[t]||(u[t]=new c(t)))}},655:(t,e,n)=>{"use strict";n.r(e),n.d(e,{__assign:()=>i,__asyncDelegator:()=>S,__asyncGenerator:()=>E,__asyncValues:()=>x,__await:()=>w,__awaiter:()=>h,__classPrivateFieldGet:()=>N,__classPrivateFieldIn:()=>L,__classPrivateFieldSet:()=>M,__createBinding:()=>m,__decorate:()=>s,__esDecorate:()=>c,__exportStar:()=>v,__extends:()=>o,__generator:()=>g,__importDefault:()=>P,__importStar:()=>
vendor: 8,289 bytes, line 1
1k,__makeTemplateObject:()=>O,__metadata:()=>f,__param:()=>l,__propKey:()=>p,__read:()=>b,__rest:()=>a,__runInitializers:()=>u,__setFunctionName:()=>d,__spread:()=>_,__spreadArray:()=>C,__spreadArrays:()=>T,__values:()=>y});var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)};function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var i=function(){return i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},i.apply(this,arguments)};function a(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n}function s(t,e,n,r){var o,i=arguments.length,a=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a}function l(t,e){return function(n,r){e(n,r,t)}}function c(t,e,n,r,o,i){function a(t){if(void 0!==t&&"function"!=typeof t)throw new TypeError("Function expected");return t}for(var s,l=r.kind,c="getter"===l?"get":"setter"===l?"set":"value",u=!e&&t?r.static?t:t.prototype:null,p=e||(u?Object.getOwnPropertyDescriptor(u,r.name):{}),d=!1,f=n.length-1;f>=0;f--){var h={};for(var g in r)h[g]="access"===g?{}:r[g];for(var g in r.access)h.access[g]=r.access[g];h.addInitializer=function(t){if(d)throw new TypeError("Cannot add initializers after decoration has completed");i.push(a(t||null))};var m=(0,n[f])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw new TypeError("Object expected");(s=a(m.get))&&(p.get=s),(s=a(m.set))&&(p.set=s),(s=a(m.init))&&o.push(s)}else(s=a(m))&&("field"===l?o.push(s):p[c]=s)}u&&Object.defineProperty(u,r.name,p),d=!0}function u(t,e,n){for(var r=arguments.length>2,o=0;o<e.length;o++)n=r?e[o].call(t,n):e[o].call(t);return r?n:void 0}function p(t){return"symbol"==typeof t?t:"".concat(t)}function d(t,e,n){return"symbol"==typeof e&&(e=e.description?"[".concat(e.description,"]"):""),Object.defineProperty(t,"name",{configurable:!0,value:n?"".concat(n," ",e):e})}function f(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function h(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,s)}l((r=r.apply(t,e||[])).next())})}function g(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}var m=Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]};function v(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||m(e,t,n)}function y(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function b(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function _(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(b(arguments[e]));return t}function T(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),o=0;for(e=0;e<n;e++)for(var i=arguments[e],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}function C(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))}function w(t){return this instanceof w?(this.v=t,this):new w(t)}function E(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(t,e||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(t){o[t]&&(r[t]=function(e){return new Promise(function(n,r){i.push([t,e,n,r])>1||s(t,e)})})}function s(t,e){try{(n=o[t](e)).value instanceof w?Promise.resolve(n.value.v).then(l,c):u(i[0][2],n)}catch(t){u(i[0][3],t)}var n}function l(t){s("next",t)}function c(t){s("throw",t)}function u(t,e){t(e),i.shift(),i.length&&s(i[0][0],i[0][1])}}function S(t){var e,n;return e={},r("next"),r("throw",function(t){throw t}),r("return"),e[Symbol.iterator]=function(){return this},e;function r(r,o){e[r]=t[r]?function(e){return(n=!n)?{value:w(t[r](e)),done:!1}:o?o(e):e}:o}}function x(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=y(t),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(n){e[n]=t[n]&&function(e){return new Promise(function(r,o){!function(t,e,n,r){Promise.resolve(r).then(function(e){t({value:e,done:n})},e)}(r,o,(e=t[n](e)).done,e.value)})}}}function O(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}var A=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e};function k(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&m(e,t,n);return A(e,t),e}function P(t){return t&&t.__esModule?t:{default:t}}function N(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)}function M(t,e,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(t,n):o?o.value=n:e.set(t,n),n}function L(t,e){if(null===e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof t?e===t:t.has(e)}},3600:t=>{"use strict";
1t.exports=JSON.parse('{"0":65533,"128":8364,"130":8218,"131":402,"132":8222,"133":8230,"134":8224,"135":8225,"136":710,"137":8240,"138":352,"139":8249,"140":338,"142":381,"145":8216,"146":8217,"147":8220,"148":8221,"149":8226,"150":8211,"151":8212,"152":732,"153":8482,"154":353,"155":8250,"156":339,"158":382,"159":376}')},9323:t=>{"use strict";t.exports=JSON.parse('{"Aacute":"\xc1","aacute":"\xe1","Abreve":"\u0102","abreve":"\u0103","ac":"\u223e","acd":"\u223f","acE":"\u223e\u0333","Acirc":"\xc2","acirc":"\xe2","acute":"\xb4","Acy":"\u0410","acy":"\u0430","AElig":"\xc6","aelig":"\xe6","af":"\u2061","Afr":"\ud835\udd04","afr":"\ud835\udd1e","Agrave":"\xc0","agrave":"\xe0","alefsym":"\u2135","aleph":"\u2135","Alpha":"\u0391","alpha":"\u03b1","Amacr":"\u0100","amacr":"\u0101","amalg":"\u2a3f","amp":"&","AMP":"&","andand":"\u2a55","And":"\u2a53","and":"\u2227","andd":"\u2a5c","andslope":"\u2a58","andv":"\u2a5a","ang":"\u2220","ange":"\u29a4","angle":"\u2220","angmsdaa":"\u29a8","angmsdab":"\u29a9","angmsdac":"\u29aa","angmsdad":"\u29ab","angmsdae":"\u29ac","angmsdaf":"\u29ad","angmsdag":"\u29ae","angmsdah":"\u29af","angmsd":"\u2221","angrt":"\u221f","angrtvb":"\u22be","angrtvbd":"\u299d","angsph":"\u2222","angst":"\xc5","angzarr":"\u237c","Aogon":"\u0104","aogon":"\u0105","Aopf":"\ud835\udd38","aopf":"\ud835\udd52","apacir":"\u2a6f","ap":"\u2248","apE":"\u2a70","ape":"\u224a","apid":"\u224b","apos":"\'","ApplyFunction":"\u2061","approx":"\u2248","approxeq":"\u224a","Aring":"\xc5","aring":"\xe5","Ascr":"\ud835\udc9c","ascr":"\ud835\udcb6","Assign":"\u2254","ast":"*","asymp":"\u2248","asympeq":"\u224d","Atilde":"\xc3","atilde":"\xe3","Auml":"\xc4","auml":"\xe4","awconint":"\u2233","awint":"\u2a11","backcong":"\u224c","backepsilon":"\u03f6","backprime":"\u2035","backsim":"\u223d","backsimeq":"\u22cd","Backslash":"\u2216","Barv":"\u2ae7","barvee":"\u22bd","barwed":"\u2305","Barwed":"\u2306","barwedge":"\u2305","bbrk":"\u23b5","bbrktbrk":"\u23b6","bcong":"\u224c","Bcy":"\u0411","bcy":"\u0431","bdquo":"\u201e","becaus":"\u2235","because":"\u2235","Because":"\u2235","bemptyv":"\u29b0","bepsi":"\u03f6","bernou":"\u212c","Bernoullis":"\u212c","Beta":"\u0392","beta":"\u03b2","beth":"\u2136","between":"\u226c","Bfr":"\ud835\udd05","bfr":"\ud835\udd1f","bigcap":"\u22c2","bigcirc":"\u25ef","bigcup":"\u22c3","bigodot":"\u2a00","bigoplus":"\u2a01","bigotimes":"\u2a02","bigsqcup":"\u2a06","bigstar":"\u2605","bigtriangledown":"\u25bd","bigtriangleup":"\u25b3","biguplus":"\u2a04","bigvee":"\u22c1","bigwedge":"\u22c0","bkarow":"\u290d","blacklozenge":"\u29eb","blacksquare":"\u25aa","blacktriangle":"\u25b4","blacktriangledown":"\u25be","blacktriangleleft":"\u25c2","blacktriangleright":"\u25b8","blank":"\u2423","blk12":"\u2592","blk14":"\u2591","blk34":"\u2593","block":"\u2588","bne":"=\u20e5","bnequiv":"\u2261\u20e5","bNot":"\u2aed","bnot":"\u2310","Bopf":"\ud835\udd39","bopf":"\ud835\udd53","bot":"\u22a5","bottom":"\u22a5","bowtie":"\u22c8","boxbox":"\u29c9","boxdl":"\u2510","boxdL":"\u2555","boxDl":"\u2556","boxDL":"\u2557","boxdr":"\u250c","boxdR":"\u2552","boxDr":"\u2553","boxDR":"\u2554","boxh":"\u2500","boxH":"\u2550","boxhd":"\u252c","boxHd":"\u2564","boxhD":"\u2565","boxHD":"\u2566","boxhu":"\u2534","boxHu":"\u2567","boxhU":"\u2568","boxHU":"\u2569","boxminus":"\u229f","boxplus":"\u229e","boxtimes":"\u22a0","boxul":"\u2518","boxuL":"\u255b","boxUl":"\u255c","boxUL":"\u255d","boxur":"\u2514","boxuR":"\u2558","boxUr":"\u2559","boxUR":"\u255a","boxv":"\u2502","boxV":"\u2551","boxvh":"\u253c","boxvH":"\u256a","boxVh":"\u256b","boxVH":"\u256c","boxvl":"\u2524","boxvL":"\u2561","boxVl":"\u2562","boxVL":"\u2563","boxvr":"\u251c","boxvR":"\u255e","boxVr":"\u255f","boxVR":"\u2560","bprime":"\u2035","breve":"\u02d8","Breve":"\u02d8","brvbar":"\xa6","bscr":"\ud835\udcb7","Bscr":"\u212c","bsemi":"\u204f","bsim":"\u223d","bsime":"\u22cd","bsolb":"\u29c5","bsol":"\\\\","bsolhsub":"\u27c8","bull":"\u2022","bullet":"\u2022","bump":"\u224e","bumpE":"\u2aae","bumpe":"\u224f","Bumpeq":"\u224e","bumpeq":"\u224f","Cacute":"\u0106","cacute":"\u0107","capand":"\u2a44","capbrcup":"\u2a49","capcap":"\u2a4b","cap":"\u2229","Cap":"\u22d2","capcup":"\u2a47","capdot":"\u2a40","CapitalDifferentialD":"\u2145","caps":"\u2229\ufe00","caret":"\u2041","caron":"\u02c7","Cayleys":"\u212d","ccaps":"\u2a4d","Ccaron":"\u010c","ccaron":"\u010d","Ccedil":"\xc7","ccedil":"\xe7","Ccirc":"\u0108","ccirc":"\u0109","Cconint":"\u2230","ccups":"\u2a4c","ccupssm":"\u2a50","Cdot":"\u010a","cdot":"\u010b","cedil":"\xb8","Cedilla":"\xb8","cemptyv":"\u29b2","cent":"\xa2","centerdot":"\xb7","CenterDot":"\xb7","cfr":"\ud835\udd20","Cfr":"\u212d","CHcy":"\u0427","chcy":"\u0447","check":"\u2713","checkmark":"\u2713","Chi":"\u03a7","chi":"\u03c7","circ":"\u02c6","circeq":"\u2257","circlearrowleft":"\u21ba","circlearrowright":"\u21bb","circledast":"\u229b","circledcirc":"\u229a","circleddash":"\u229d","CircleDot":"\u2299","circledR":"\xae","circledS":"\u24c8","CircleMinus":"\u2296","Cir
1clePlus":"\u2295","CircleTimes":"\u2297","cir":"\u25cb","cirE":"\u29c3","cire":"\u2257","cirfnint":"\u2a10","cirmid":"\u2aef","cirscir":"\u29c2","ClockwiseContourIntegral":"\u2232","CloseCurlyDoubleQuote":"\u201d","CloseCurlyQuote":"\u2019","clubs":"\u2663","clubsuit":"\u2663","colon":":","Colon":"\u2237","Colone":"\u2a74","colone":"\u2254","coloneq":"\u2254","comma":",","commat":"@","comp":"\u2201","compfn":"\u2218","complement":"\u2201","complexes":"\u2102","cong":"\u2245","congdot":"\u2a6d","Congruent":"\u2261","conint":"\u222e","Conint":"\u222f","ContourIntegral":"\u222e","copf":"\ud835\udd54","Copf":"\u2102","coprod":"\u2210","Coproduct":"\u2210","copy":"\xa9","COPY":"\xa9","copysr":"\u2117","CounterClockwiseContourIntegral":"\u2233","crarr":"\u21b5","cross":"\u2717","Cross":"\u2a2f","Cscr":"\ud835\udc9e","cscr":"\ud835\udcb8","csub":"\u2acf","csube":"\u2ad1","csup":"\u2ad0","csupe":"\u2ad2","ctdot":"\u22ef","cudarrl":"\u2938","cudarrr":"\u2935","cuepr":"\u22de","cuesc":"\u22df","cularr":"\u21b6","cularrp":"\u293d","cupbrcap":"\u2a48","cupcap":"\u2a46","CupCap":"\u224d","cup":"\u222a","Cup":"\u22d3","cupcup":"\u2a4a","cupdot":"\u228d","cupor":"\u2a45","cups":"\u222a\ufe00","curarr":"\u21b7","curarrm":"\u293c","curlyeqprec":"\u22de","curlyeqsucc":"\u22df","curlyvee":"\u22ce","curlywedge":"\u22cf","curren":"\xa4","curvearrowleft":"\u21b6","curvearrowright":"\u21b7","cuvee":"\u22ce","cuwed":"\u22cf","cwconint":"\u2232","cwint":"\u2231","cylcty":"\u232d","dagger":"\u2020","Dagger":"\u2021","daleth":"\u2138","darr":"\u2193","Darr":"\u21a1","dArr":"\u21d3","dash":"\u2010","Dashv":"\u2ae4","dashv":"\u22a3","dbkarow":"\u290f","dblac":"\u02dd","Dcaron":"\u010e","dcaron":"\u010f","Dcy":"\u0414","dcy":"\u0434","ddagger":"\u2021","ddarr":"\u21ca","DD":"\u2145","dd":"\u2146","DDotrahd":"\u2911","ddotseq":"\u2a77","deg":"\xb0","Del":"\u2207","Delta":"\u0394","delta":"\u03b4","demptyv":"\u29b1","dfisht":"\u297f","Dfr":"\ud835\udd07","dfr":"\ud835\udd21","dHar":"\u2965","dharl":"\u21c3","dharr":"\u21c2","DiacriticalAcute":"\xb4","DiacriticalDot":"\u02d9","DiacriticalDoubleAcute":"\u02dd","DiacriticalGrave":"`","DiacriticalTilde":"\u02dc","diam":"\u22c4","diamond":"\u22c4","Diamond":"\u22c4","diamondsuit":"\u2666","diams":"\u2666","die":"\xa8","DifferentialD":"\u2146","digamma":"\u03dd","disin":"\u22f2","div":"\xf7","divide":"\xf7","divideontimes":"\u22c7","divonx":"\u22c7","DJcy":"\u0402","djcy":"\u0452","dlcorn":"\u231e","dlcrop":"\u230d","dollar":"$","Dopf":"\ud835\udd3b","dopf":"\ud835\udd55","Dot":"\xa8","dot":"\u02d9","DotDot":"\u20dc","doteq":"\u2250","doteqdot":"\u2251","DotEqual":"\u2250","dotminus":"\u2238","dotplus":"\u2214","dotsquare":"\u22a1","doublebarwedge":"\u2306","DoubleContourIntegral":"\u222f","DoubleDot":"\xa8","DoubleDownArrow":"\u21d3","DoubleLeftArrow":"\u21d0","DoubleLeftRightArrow":"\u21d4","DoubleLeftTee":"\u2ae4","DoubleLongLeftArrow":"\u27f8","DoubleLongLeftRightArrow":"\u27fa","DoubleLongRightArrow":"\u27f9","DoubleRightArrow":"\u21d2","DoubleRightTee":"\u22a8","DoubleUpArrow":"\u21d1","DoubleUpDownArrow":"\u21d5","DoubleVerticalBar":"\u2225","DownArrowBar":"\u2913","downarrow":"\u2193","DownArrow":"\u2193","Downarrow":"\u21d3","DownArrowUpArrow":"\u21f5","DownBreve":"\u0311","downdownarrows":"\u21ca","downharpoonleft":"\u21c3","downharpoonright":"\u21c2","DownLeftRightVector":"\u2950","DownLeftTeeVector":"\u295e","DownLeftVectorBar":"\u2956","DownLeftVector":"\u21bd","DownRightTeeVector":"\u295f","DownRightVectorBar":"\u2957","DownRightVector":"\u21c1","DownTeeArrow":"\u21a7","DownTee":"\u22a4","drbkarow":"\u2910","drcorn":"\u231f","drcrop":"\u230c","Dscr":"\ud835\udc9f","dscr":"\ud835\udcb9","DScy":"\u0405","dscy":"\u0455","dsol":"\u29f6","Dstrok":"\u0110","dstrok":"\u0111","dtdot":"\u22f1","dtri":"\u25bf","dtrif":"\u25be","duarr":"\u21f5","duhar":"\u296f","dwangle":"\u29a6","DZcy":"\u040f","dzcy":"\u045f","dzigrarr":"\u27ff","Eacute":"\xc9","eacute":"\xe9","easter":"\u2a6e","Ecaron":"\u011a","ecaron":"\u011b","Ecirc":"\xca","ecirc":"\xea","ecir":"\u2256","ecolon":"\u2255","Ecy":"\u042d","ecy":"\u044d","eDDot":"\u2a77","Edot":"\u0116","edot":"\u0117","eDot":"\u2251","ee":"\u2147","efDot":"\u2252","Efr":"\ud835\udd08","efr":"\ud835\udd22","eg":"\u2a9a","Egrave":"\xc8","egrave":"\xe8","egs":"\u2a96","egsdot":"\u2a98","el":"\u2a99","Element":"\u2208","elinters":"\u23e7","ell":"\u2113","els":"\u2a95","elsdot":"\u2a97","Emacr":"\u0112","emacr":"\u0113","empty":"\u2205","emptyset":"\u2205","EmptySmallSquare":"\u25fb","emptyv":"\u2205","EmptyVerySmallSquare":"\u25ab","emsp13":"\u2004","emsp14":"\u2005","emsp":"\u2003","ENG":"\u014a","eng":"\u014b","ensp":"\u2002","Eogon":"\u0118","eogon":"\u0119","Eopf":"\ud835\udd3c","eopf":"\ud835\udd56","epar":"\u22d5","eparsl":"\u29e3","eplus":"\u2a71","epsi":"\u03b5","Epsilon":"\u0395","epsilon":"\u03b5","epsiv":"\u03f5","eqcirc":"\u2256","eqcolon":"\u2255","eqsim":"\u2242","eqslantgtr":"\u2a96","eqslantless":"\u2a95","Equal":"\u2a75","equals":"=","EqualTilde":"\u2242","equest":"\u225f","Equilibrium":"\u21cc","equiv":"\u2261","equivDD":"\u2a78","eqvparsl":"\u29e5","erarr":"\u2971","erDot":"\u2253","escr":"\u212f","
1Escr":"\u2130","esdot":"\u2250","Esim":"\u2a73","esim":"\u2242","Eta":"\u0397","eta":"\u03b7","ETH":"\xd0","eth":"\xf0","Euml":"\xcb","euml":"\xeb","euro":"\u20ac","excl":"!","exist":"\u2203","Exists":"\u2203","expectation":"\u2130","exponentiale":"\u2147","ExponentialE":"\u2147","fallingdotseq":"\u2252","Fcy":"\u0424","fcy":"\u0444","female":"\u2640","ffilig":"\ufb03","fflig":"\ufb00","ffllig":"\ufb04","Ffr":"\ud835\udd09","ffr":"\ud835\udd23","filig":"\ufb01","FilledSmallSquare":"\u25fc","FilledVerySmallSquare":"\u25aa","fjlig":"fj","flat":"\u266d","fllig":"\ufb02","fltns":"\u25b1","fnof":"\u0192","Fopf":"\ud835\udd3d","fopf":"\ud835\udd57","forall":"\u2200","ForAll":"\u2200","fork":"\u22d4","forkv":"\u2ad9","Fouriertrf":"\u2131","fpartint":"\u2a0d","frac12":"\xbd","frac13":"\u2153","frac14":"\xbc","frac15":"\u2155","frac16":"\u2159","frac18":"\u215b","frac23":"\u2154","frac25":"\u2156","frac34":"\xbe","frac35":"\u2157","frac38":"\u215c","frac45":"\u2158","frac56":"\u215a","frac58":"\u215d","frac78":"\u215e","frasl":"\u2044","frown":"\u2322","fscr":"\ud835\udcbb","Fscr":"\u2131","gacute":"\u01f5","Gamma":"\u0393","gamma":"\u03b3","Gammad":"\u03dc","gammad":"\u03dd","gap":"\u2a86","Gbreve":"\u011e","gbreve":"\u011f","Gcedil":"\u0122","Gcirc":"\u011c","gcirc":"\u011d","Gcy":"\u0413","gcy":"\u0433","Gdot":"\u0120","gdot":"\u0121","ge":"\u2265","gE":"\u2267","gEl":"\u2a8c","gel":"\u22db","geq":"\u2265","geqq":"\u2267","geqslant":"\u2a7e","gescc":"\u2aa9","ges":"\u2a7e","gesdot":"\u2a80","gesdoto":"\u2a82","gesdotol":"\u2a84","gesl":"\u22db\ufe00","gesles":"\u2a94","Gfr":"\ud835\udd0a","gfr":"\ud835\udd24","gg":"\u226b","Gg":"\u22d9","ggg":"\u22d9","gimel":"\u2137","GJcy":"\u0403","gjcy":"\u0453","gla":"\u2aa5","gl":"\u2277","glE":"\u2a92","glj":"\u2aa4","gnap":"\u2a8a","gnapprox":"\u2a8a","gne":"\u2a88","gnE":"\u2269","gneq":"\u2a88","gneqq":"\u2269","gnsim":"\u22e7","Gopf":"\ud835\udd3e","gopf":"\ud835\udd58","grave":"`","GreaterEqual":"\u2265","GreaterEqualLess":"\u22db","GreaterFullEqual":"\u2267","GreaterGreater":"\u2aa2","GreaterLess":"\u2277","GreaterSlantEqual":"\u2a7e","GreaterTilde":"\u2273","Gscr":"\ud835\udca2","gscr":"\u210a","gsim":"\u2273","gsime":"\u2a8e","gsiml":"\u2a90","gtcc":"\u2aa7","gtcir":"\u2a7a","gt":">","GT":">","Gt":"\u226b","gtdot":"\u22d7","gtlPar":"\u2995","gtquest":"\u2a7c","gtrapprox":"\u2a86","gtrarr":"\u2978","gtrdot":"\u22d7","gtreqless":"\u22db","gtreqqless":"\u2a8c","gtrless":"\u2277","gtrsim":"\u2273","gvertneqq":"\u2269\ufe00","gvnE":"\u2269\ufe00","Hacek":"\u02c7","hairsp":"\u200a","half":"\xbd","hamilt":"\u210b","HARDcy":"\u042a","hardcy":"\u044a","harrcir":"\u2948","harr":"\u2194","hArr":"\u21d4","harrw":"\u21ad","Hat":"^","hbar":"\u210f","Hcirc":"\u0124","hcirc":"\u0125","hearts":"\u2665","heartsuit":"\u2665","hellip":"\u2026","hercon":"\u22b9","hfr":"\ud835\udd25","Hfr":"\u210c","HilbertSpace":"\u210b","hksearow":"\u2925","hkswarow":"\u2926","hoarr":"\u21ff","homtht":"\u223b","hookleftarrow":"\u21a9","hookrightarrow":"\u21aa","hopf":"\ud835\udd59","Hopf":"\u210d","horbar":"\u2015","HorizontalLine":"\u2500","hscr":"\ud835\udcbd","Hscr":"\u210b","hslash":"\u210f","Hstrok":"\u0126","hstrok":"\u0127","HumpDownHump":"\u224e","HumpEqual":"\u224f","hybull":"\u2043","hyphen":"\u2010","Iacute":"\xcd","iacute":"\xed","ic":"\u2063","Icirc":"\xce","icirc":"\xee","Icy":"\u0418","icy":"\u0438","Idot":"\u0130","IEcy":"\u0415","iecy":"\u0435","iexcl":"\xa1","iff":"\u21d4","ifr":"\ud835\udd26","Ifr":"\u2111","Igrave":"\xcc","igrave":"\xec","ii":"\u2148","iiiint":"\u2a0c","iiint":"\u222d","iinfin":"\u29dc","iiota":"\u2129","IJlig":"\u0132","ijlig":"\u0133","Imacr":"\u012a","imacr":"\u012b","image":"\u2111","ImaginaryI":"\u2148","imagline":"\u2110","imagpart":"\u2111","imath":"\u0131","Im":"\u2111","imof":"\u22b7","imped":"\u01b5","Implies":"\u21d2","incare":"\u2105","in":"\u2208","infin":"\u221e","infintie":"\u29dd","inodot":"\u0131","intcal":"\u22ba","int":"\u222b","Int":"\u222c","integers":"\u2124","Integral":"\u222b","intercal":"\u22ba","Intersection":"\u22c2","intlarhk":"\u2a17","intprod":"\u2a3c","InvisibleComma":"\u2063","InvisibleTimes":"\u2062","IOcy":"\u0401","iocy":"\u0451","Iogon":"\u012e","iogon":"\u012f","Iopf":"\ud835\udd40","iopf":"\ud835\udd5a","Iota":"\u0399","iota":"\u03b9","iprod":"\u2a3c","iquest":"\xbf","iscr":"\ud835\udcbe","Iscr":"\u2110","isin":"\u2208","isindot":"\u22f5","isinE":"\u22f9","isins":"\u22f4","isinsv":"\u22f3","isinv":"\u2208","it":"\u2062","Itilde":"\u0128","itilde":"\u0129","Iukcy":"\u0406","iukcy":"\u0456","Iuml":"\xcf","iuml":"\xef","Jcirc":"\u0134","jcirc":"\u0135","Jcy":"\u0419","jcy":"\u0439","Jfr":"\ud835\udd0d","jfr":"\ud835\udd27","jmath":"\u0237","Jopf":"\ud835\udd41","jopf":"\ud835\udd5b","Jscr":"\ud835\udca5","jscr":"\ud835\udcbf","Jsercy":"\u0408","jsercy":"\u0458","Jukcy":"\u0404","jukcy":"\u0454","Kappa":"\u039a","kappa":"\u03ba","kappav":"\u03f0","Kcedil":"\u0136","kcedil":"\u0137","Kcy":"\u041a","kcy":"\u043a","Kfr":"\ud835\udd0e","kfr":"\ud835\udd28","kgreen":"\u0138","KHcy":"\u0425","khcy":"\u0445","KJcy":"\u040c","kjcy":"\u045c","Kopf":"\ud835\udd42","kopf":"\ud835\udd5c","Kscr":"\ud835\udca6","kscr":"\ud835\udcc0","lAarr":"\u21da","Lacute":"\u0139","lacute":"\u013a","laemptyv":"\u29b4","lagran":"\u2112","Lambda":"\u039b","lambda":"\u03bb","lang":"\u27e8","Lang":"\u27ea","langd":"\u2991","langle":"\u27e8","lap":"\u2a85","Laplacetrf":"\u2112","laquo":"\xab","larrb":"\u21e4","larrbfs":"\u291f","larr":"\u2190","Larr":"\u219e","lArr":"\u21d0","larrfs":"\u291d","larrhk":"\u21a9","larrlp":"\u21ab","larrpl":"\u2939","larrsim":"\u2973","larrtl":"\u21a2","latail":"\u2919","lAtail"
1:"\u291b","lat":"\u2aab","late":"\u2aad","lates":"\u2aad\ufe00","lbarr":"\u290c","lBarr":"\u290e","lbbrk":"\u2772","lbrace":"{","lbrack":"[","lbrke":"\u298b","lbrksld":"\u298f","lbrkslu":"\u298d","Lcaron":"\u013d","lcaron":"\u013e","Lcedil":"\u013b","lcedil":"\u013c","lceil":"\u2308","lcub":"{","Lcy":"\u041b","lcy":"\u043b","ldca":"\u2936","ldquo":"\u201c","ldquor":"\u201e","ldrdhar":"\u2967","ldrushar":"\u294b","ldsh":"\u21b2","le":"\u2264","lE":"\u2266","LeftAngleBracket":"\u27e8","LeftArrowBar":"\u21e4","leftarrow":"\u2190","LeftArrow":"\u2190","Leftarrow":"\u21d0","LeftArrowRightArrow":"\u21c6","leftarrowtail":"\u21a2","LeftCeiling":"\u2308","LeftDoubleBracket":"\u27e6","LeftDownTeeVector":"\u2961","LeftDownVectorBar":"\u2959","LeftDownVector":"\u21c3","LeftFloor":"\u230a","leftharpoondown":"\u21bd","leftharpoonup":"\u21bc","leftleftarrows":"\u21c7","leftrightarrow":"\u2194","LeftRightArrow":"\u2194","Leftrightarrow":"\u21d4","leftrightarrows":"\u21c6","leftrightharpoons":"\u21cb","leftrightsquigarrow":"\u21ad","LeftRightVector":"\u294e","LeftTeeArrow":"\u21a4","LeftTee":"\u22a3","LeftTeeVector":"\u295a","leftthreetimes":"\u22cb","LeftTriangleBar":"\u29cf","LeftTriangle":"\u22b2","LeftTriangleEqual":"\u22b4","LeftUpDownVector":"\u2951","LeftUpTeeVector":"\u2960","LeftUpVectorBar":"\u2958","LeftUpVector":"\u21bf","LeftVectorBar":"\u2952","LeftVector":"\u21bc","lEg":"\u2a8b","leg":"\u22da","leq":"\u2264","leqq":"\u2266","leqslant":"\u2a7d","lescc":"\u2aa8","les":"\u2a7d","lesdot":"\u2a7f","lesdoto":"\u2a81","lesdotor":"\u2a83","lesg":"\u22da\ufe00","lesges":"\u2a93","lessapprox":"\u2a85","lessdot":"\u22d6","lesseqgtr":"\u22da","lesseqqgtr":"\u2a8b","LessEqualGreater":"\u22da","LessFullEqual":"\u2266","LessGreater":"\u2276","lessgtr":"\u2276","LessLess":"\u2aa1","lesssim":"\u2272","LessSlantEqual":"\u2a7d","LessTilde":"\u2272","lfisht":"\u297c","lfloor":"\u230a","Lfr":"\ud835\udd0f","lfr":"\ud835\udd29","lg":"\u2276","lgE":"\u2a91","lHar":"\u2962","lhard":"\u21bd","lharu":"\u21bc","lharul":"\u296a","lhblk":"\u2584","LJcy":"\u0409","ljcy":"\u0459","llarr":"\u21c7","ll":"\u226a","Ll":"\u22d8","llcorner":"\u231e","Lleftarrow":"\u21da","llhard":"\u296b","lltri":"\u25fa","Lmidot":"\u013f","lmidot":"\u0140","lmoustache":"\u23b0","lmoust":"\u23b0","lnap":"\u2a89","lnapprox":"\u2a89","lne":"\u2a87","lnE":"\u2268","lneq":"\u2a87","lneqq":"\u2268","lnsim":"\u22e6","loang":"\u27ec","loarr":"\u21fd","lobrk":"\u27e6","longleftarrow":"\u27f5","LongLeftArrow":"\u27f5","Longleftarrow":"\u27f8","longleftrightarrow":"\u27f7","LongLeftRightArrow":"\u27f7","Longleftrightarrow":"\u27fa","longmapsto":"\u27fc","longrightarrow":"\u27f6","LongRightArrow":"\u27f6","Longrightarrow":"\u27f9","looparrowleft":"\u21ab","looparrowright":"\u21ac","lopar":"\u2985","Lopf":"\ud835\udd43","lopf":"\ud835\udd5d","loplus":"\u2a2d","lotimes":"\u2a34","lowast":"\u2217","lowbar":"_","LowerLeftArrow":"\u2199","LowerRightArrow":"\u2198","loz":"\u25ca","lozenge":"\u25ca","lozf":"\u29eb","lpar":"(","lparlt":"\u2993","lrarr":"\u21c6","lrcorner":"\u231f","lrhar":"\u21cb","lrhard":"\u296d","lrm":"\u200e","lrtri":"\u22bf","lsaquo":"\u2039","lscr":"\ud835\udcc1","Lscr":"\u2112","lsh":"\u21b0","Lsh":"\u21b0","lsim":"\u2272","lsime":"\u2a8d","lsimg":"\u2a8f","lsqb":"[","lsquo":"\u2018","lsquor":"\u201a","Lstrok":"\u0141","lstrok":"\u0142","ltcc":"\u2aa6","ltcir":"\u2a79","lt":"<","LT":"<","Lt":"\u226a","ltdot":"\u22d6","lthree":"\u22cb","ltimes":"\u22c9","ltlarr":"\u2976","ltquest":"\u2a7b","ltri":"\u25c3","ltrie":"\u22b4","ltrif":"\u25c2","ltrPar":"\u2996","lurdshar":"\u294a","luruhar":"\u2966","lvertneqq":"\u2268\ufe00","lvnE":"\u2268\ufe00","macr":"\xaf","male":"\u2642","malt":"\u2720","maltese":"\u2720","Map":"\u2905","map":"\u21a6","mapsto":"\u21a6","mapstodown":"\u21a7","mapstoleft":"\u21a4","mapstoup":"\u21a5","marker":"\u25ae","mcomma":"\u2a29","Mcy":"\u041c","mcy":"\u043c","mdash":"\u2014","mDDot":"\u223a","measuredangle":"\u2221","MediumSpace":"\u205f","Mellintrf":"\u2133","Mfr":"\ud835\udd10","mfr":"\ud835\udd2a","mho":"\u2127","micro":"\xb5","midast":"*","midcir":"\u2af0","mid":"\u2223","middot":"\xb7","minusb":"\u229f","minus":"\u2212","minusd":"\u2238","minusdu":"\u2a2a","MinusPlus":"\u2213","mlcp":"\u2adb","mldr":"\u2026","mnplus":"\u2213","models":"\u22a7","Mopf":"\ud835\udd44","mopf":"\ud835\udd5e","mp":"\u2213","mscr":"\ud835\udcc2","Mscr":"\u2133","mstpos":"\u223e","Mu":"\u039c","mu":"\u03bc","multimap":"\u22b8","mumap":"\u22b8","nabla":"\u2207","Nacute":"\u0143","nacute":"\u0144","nang":"\u2220\u20d2","nap":"\u2249","napE":"\u2a70\u0338","napid":"\u224b\u0338","napos":"\u0149","napprox":"\u2249","natural":"\u266e","naturals":"\u2115","natur":"\u266e","nbsp":"\xa0","nbump":"\u224e\u0338","nbumpe":"\u224f\u0338","ncap":"\u2a43","Ncaron":"\u0147","ncaron":"\u0148","Ncedil":"\u0145","ncedil":"\u0146","ncong":"\u2247","ncongdot":"\u2a6d\u0338","ncup":"\u2a42","Ncy":"\u041d","ncy":"\u043d","ndash":"\u2013","nearhk":"\u2924","nearr":"\u2197","neArr":"\u21d7","nearrow":"\u2197","ne":"\u2260","nedot":"\u2250\u0338","NegativeMediumSpace":"\u200b","NegativeThickSpace"
1:"\u200b","NegativeThinSpace":"\u200b","NegativeVeryThinSpace":"\u200b","nequiv":"\u2262","nesear":"\u2928","nesim":"\u2242\u0338","NestedGreaterGreater":"\u226b","NestedLessLess":"\u226a","NewLine":"\\n","nexist":"\u2204","nexists":"\u2204","Nfr":"\ud835\udd11","nfr":"\ud835\udd2b","ngE":"\u2267\u0338","nge":"\u2271","ngeq":"\u2271","ngeqq":"\u2267\u0338","ngeqslant":"\u2a7e\u0338","nges":"\u2a7e\u0338","nGg":"\u22d9\u0338","ngsim":"\u2275","nGt":"\u226b\u20d2","ngt":"\u226f","ngtr":"\u226f","nGtv":"\u226b\u0338","nharr":"\u21ae","nhArr":"\u21ce","nhpar":"\u2af2","ni":"\u220b","nis":"\u22fc","nisd":"\u22fa","niv":"\u220b","NJcy":"\u040a","njcy":"\u045a","nlarr":"\u219a","nlArr":"\u21cd","nldr":"\u2025","nlE":"\u2266\u0338","nle":"\u2270","nleftarrow":"\u219a","nLeftarrow":"\u21cd","nleftrightarrow":"\u21ae","nLeftrightarrow":"\u21ce","nleq":"\u2270","nleqq":"\u2266\u0338","nleqslant":"\u2a7d\u0338","nles":"\u2a7d\u0338","nless":"\u226e","nLl":"\u22d8\u0338","nlsim":"\u2274","nLt":"\u226a\u20d2","nlt":"\u226e","nltri":"\u22ea","nltrie":"\u22ec","nLtv":"\u226a\u0338","nmid":"\u2224","NoBreak":"\u2060","NonBreakingSpace":"\xa0","nopf":"\ud835\udd5f","Nopf":"\u2115","Not":"\u2aec","not":"\xac","NotCongruent":"\u2262","NotCupCap":"\u226d","NotDoubleVerticalBar":"\u2226","NotElement":"\u2209","NotEqual":"\u2260","NotEqualTilde":"\u2242\u0338","NotExists":"\u2204","NotGreater":"\u226f","NotGreaterEqual":"\u2271","NotGreaterFullEqual":"\u2267\u0338","NotGreaterGreater":"\u226b\u0338","NotGreaterLess":"\u2279","NotGreaterSlantEqual":"\u2a7e\u0338","NotGreaterTilde":"\u2275","NotHumpDownHump":"\u224e\u0338","NotHumpEqual":"\u224f\u0338","notin":"\u2209","notindot":"\u22f5\u0338","notinE":"\u22f9\u0338","notinva":"\u2209","notinvb":"\u22f7","notinvc":"\u22f6","NotLeftTriangleBar":"\u29cf\u0338","NotLeftTriangle":"\u22ea","NotLeftTriangleEqual":"\u22ec","NotLess":"\u226e","NotLessEqual":"\u2270","NotLessGreater":"\u2278","NotLessLess":"\u226a\u0338","NotLessSlantEqual":"\u2a7d\u0338","NotLessTilde":"\u2274","NotNestedGreaterGreater":"\u2aa2\u0338","NotNestedLessLess":"\u2aa1\u0338","notni":"\u220c","notniva":"\u220c","notnivb":"\u22fe","notnivc":"\u22fd","NotPrecedes":"\u2280","NotPrecedesEqual":"\u2aaf\u0338","NotPrecedesSlantEqual":"\u22e0","NotReverseElement":"\u220c","NotRightTriangleBar":"\u29d0\u0338","NotRightTriangle":"\u22eb","NotRightTriangleEqual":"\u22ed","NotSquareSubset":"\u228f\u0338","NotSquareSubsetEqual":"\u22e2","NotSquareSuperset":"\u2290\u0338","NotSquareSupersetEqual":"\u22e3","NotSubset":"\u2282\u20d2","NotSubsetEqual":"\u2288","NotSucceeds":"\u2281","NotSucceedsEqual":"\u2ab0\u0338","NotSucceedsSlantEqual":"\u22e1","NotSucceedsTilde":"\u227f\u0338","NotSuperset":"\u2283\u20d2","NotSupersetEqual":"\u2289","NotTilde":"\u2241","NotTildeEqual":"\u2244","NotTildeFullEqual":"\u2247","NotTildeTilde":"\u2249","NotVerticalBar":"\u2224","nparallel":"\u2226","npar":"\u2226","nparsl":"\u2afd\u20e5","npart":"\u2202\u0338","npolint":"\u2a14","npr":"\u228
10","nprcue":"\u22e0","nprec":"\u2280","npreceq":"\u2aaf\u0338","npre":"\u2aaf\u0338","nrarrc":"\u2933\u0338","nrarr":"\u219b","nrArr":"\u21cf","nrarrw":"\u219d\u0338","nrightarrow":"\u219b","nRightarrow":"\u21cf","nrtri":"\u22eb","nrtrie":"\u22ed","nsc":"\u2281","nsccue":"\u22e1","nsce":"\u2ab0\u0338","Nscr":"\ud835\udca9","nscr":"\ud835\udcc3","nshortmid":"\u2224","nshortparallel":"\u2226","nsim":"\u2241","nsime":"\u2244","nsimeq":"\u2244","nsmid":"\u2224","nspar":"\u2226","nsqsube":"\u22e2","nsqsupe":"\u22e3","nsub":"\u2284","nsubE":"\u2ac5\u0338","nsube":"\u2288","nsubset":"\u2282\u20d2","nsubseteq":"\u2288","nsubseteqq":"\u2ac5\u0338","nsucc":"\u2281","nsucceq":"\u2ab0\u0338","nsup":"\u2285","nsupE":"\u2ac6\u0338","nsupe":"\u2289","nsupset":"\u2283\u20d2","nsupseteq":"\u2289","nsupseteqq":"\u2ac6\u0338","ntgl":"\u2279","Ntilde":"\xd1","ntilde":"\xf1","ntlg":"\u2278","ntriangleleft":"\u22ea","ntrianglelefteq":"\u22ec","ntriangleright":"\u22eb","ntrianglerighteq":"\u22ed","Nu":"\u039d","nu":"\u03bd","num":"#","numero":"\u2116","numsp":"\u2007","nvap":"\u224d\u20d2","nvdash":"\u22ac","nvDash":"\u22ad","nVdash":"\u22ae","nVDash":"\u22af","nvge":"\u2265\u20d2","nvgt":">\u20d2","nvHarr":"\u2904","nvinfin":"\u29de","nvlArr":"\u2902","nvle":"\u2264\u20d2","nvlt":"<\u20d2","nvltrie":"\u22b4\u20d2","nvrArr":"\u2903","nvrtrie":"\u22b5\u20d2","nvsim":"\u223c\u20d2","nwarhk":"\u2923","nwarr":"\u2196","nwArr":"\u21d6","nwarrow":"\u2196","nwnear":"\u2927","Oacute":"\xd3","oacute":"\xf3","oast":"\u229b","Ocirc":"\xd4","ocirc":"\xf4","ocir":"\u229a","Ocy":"\u041e","ocy":"\u043e","odash":"\u229d","Odblac":"\u0150","odblac":"\u0151","odiv":"\u2a38","odot":"\u2299","odsold":"\u29bc","OElig":"\u0152","oelig":"\u0153","ofcir":"\u29bf","Ofr":"\ud835\udd12","ofr":"\ud835\udd2c","ogon":"\u02db","Ograve":"\xd2","ograve":"\xf2","ogt":"\u29c1","ohbar":"\u29b5","ohm":"\u03a9","oint":"\u222e","olarr":"\u21ba","olcir":"\u29be","olcross":"\u29bb","oline":"\u203e","olt":"\u29c0","Omacr":"\u014c","omacr":"\u014d","Omega":"\u03a9","omega":"\u03c9","Omicron":"\u039f","omicron":"\u03bf","omid":"\u29b6","ominus":"\u2296","Oopf":"\ud835\udd46","oopf":"\ud835\udd60","opar":"\u29b7","OpenCurlyDoubleQuote":"\u201c","OpenCurlyQuote":"\u2018","operp":"\u29b9","oplus":"\u2295","orarr":"\u21bb","Or":"\u2a54","or":"\u2228","ord":"\u2a5d","order":"\u2134","orderof":"\u2134","ordf":"\xaa","ordm":"\xba","origof":"\u22b6","oror":"\u2a56","orslope":"\u2a57","orv":"\u2a5b","oS":"\u24c8","Oscr":"\ud835\udcaa","oscr":"\u2134","Oslash":"\xd8","oslash":"\xf8","osol":"\u2298","Otilde":"\xd5","otilde":"\xf5","otimesas":"\u2a36","Otimes":"\u2a37","otimes":"\u2297","Ouml":"\xd6","ouml":"\xf6","ovbar":"\u233d","OverBar":"\u203e","OverBrace":"\u23de","OverBracket":"\u23b4","OverParenthesis":"\u23dc","para":"\xb6","parallel":"\u2225","par":"\u2225","parsim":"\u2af3","parsl":"\u2afd","part":"\u2202","PartialD":"\u2202","Pcy":"\u041f","pcy":"\u043f","percnt":"%","period":".","permil":"\u2030","perp":"\u22a5","pertenk":"\u2031","Pfr":"\ud835\udd13","pfr":"\ud835\udd2d","Phi":"\u03a6","phi":"\u03c6","phiv":"\u03d5","phmmat":"\u2133","phone":"\u260e","Pi":"\u03a0","pi":"\u03c0","pitchfork":"\u22d4","piv":"\u03d6","planck":"\u210f","planckh":"\u210e","plankv":"\u210f","plusacir":"\u2a23","plusb":"\u229e","pluscir":"\u2a22","plus":"+","plusdo":"\u2214","plusdu":"\u2a25","pluse":"\u2a72","PlusMinus":"\xb1","plusmn":"\xb1","plussim":"\u2a26","plustwo":"\u2a27","pm":"\xb1","Poincareplane":"\u210c","pointint":"\u2a15","popf":"\ud835\udd61","Popf":"\u2119","pound":"\xa3","prap":"\u2ab7","Pr":"\u2abb","pr":"\u227a","prcue":"\u227c","precapprox":"\u2ab7","prec":"\u227a","preccurlyeq":"\u227c","Precedes":"\u227a","PrecedesEqual":"\u2aaf","PrecedesSlantEqual":"\u227c","PrecedesTilde":"\u227e","preceq":"\u2aaf","precnapprox":"\u2ab9","precneqq":"\u2ab5","precnsim":"\u22e8","pre":"\u2aaf","prE":"\u2ab3","precsim":"\u227e","prime":"\u2032","Prime":"\u2033","primes":"\u2119","prnap":"\u2ab9","prnE":"\u2ab5","prnsim":"\u22e8","prod":"\u220f","Product":"\u220f","profalar":"\u232e","profline":"\u2312","profsurf":"\u2313","prop":"\u221d","Proportional":"\u221d","Proportion":"\u2237","propto":"\u221d","prsim":"\u227e","prurel":"\u22b0","Pscr":"\ud835\udcab","pscr":"\ud835\udcc5","Psi":"\u03a8","psi":"\u03c8","puncsp":"\u2008","Qfr"
1:"\ud835\udd14","qfr":"\ud835\udd2e","qint":"\u2a0c","qopf":"\ud835\udd62","Qopf":"\u211a","qprime":"\u2057","Qscr":"\ud835\udcac","qscr":"\ud835\udcc6","quaternions":"\u210d","quatint":"\u2a16","quest":"?","questeq":"\u225f","quot":"\\"","QUOT":"\\"","rAarr":"\u21db","race":"\u223d\u0331","Racute":"\u0154","racute":"\u0155","radic":"\u221a","raemptyv":"\u29b3","rang":"\u27e9","Rang":"\u27eb","rangd":"\u2992","range":"\u29a5","rangle":"\u27e9","raquo":"\xbb","rarrap":"\u2975","rarrb":"\u21e5","rarrbfs":"\u2920","rarrc":"\u2933","rarr":"\u2192","Rarr":"\u21a0","rArr":"\u21d2","rarrfs":"\u291e","rarrhk":"\u21aa","rarrlp":"\u21ac","rarrpl":"\u2945","rarrsim":"\u2974","Rarrtl":"\u2916","rarrtl":"\u21a3","rarrw":"\u219d","ratail":"\u291a","rAtail":"\u291c","ratio":"\u2236","rationals":"\u211a","rbarr":"\u290d","rBarr":"\u290f","RBarr":"\u2910","rbbrk":"\u2773","rbrace":"}","rbrack":"]","rbrke":"\u298c","rbrksld":"\u298e","rbrkslu":"\u2990","Rcaron":"\u0158","rcaron":"\u0159","Rcedil":"\u0156","rcedil":"\u0157","rceil":"\u2309","rcub":"}","Rcy":"\u0420","rcy":"\u0440","rdca":"\u2937","rdldhar":"\u2969","rdquo":"\u201d","rdquor":"\u201d","rdsh":"\u21b3","real":"\u211c","realine":"\u211b","realpart":"\u211c","reals":"\u211d","Re":"\u211c","rect":"\u25ad","reg":"\xae","REG":"\xae","ReverseElement":"\u220b","ReverseEquilibrium":"\u21cb","ReverseUpEquilibrium":"\u296f","rfisht":"\u297d","rfloor":"\u230b","rfr":"\ud835\udd2f","Rfr":"\u211c","rHar":"\u2964","rhard":"\u21c1","rharu":"\u21c0","rharul":"\u296c","Rho":"\u03a1","rho":"\u03c1","rhov":"\u03f1","RightAngleBracket":"\u27e9","RightArrowBar":"\u21e5","rightarrow":"\u2192","RightArrow":"\u2192","Rightarrow":"\u21d2","RightArrowLeftArrow":"\u21c4","rightarrowtail":"\u21a3","RightCeiling":"\u2309","RightDoubleBracket":"\u27e7","RightDownTeeVector":"\u295d","RightDownVectorBar":"\u2955","RightDownVector":"\u21c2","RightFloor":"\u230b","rightharpoondown":"\u21c1","rightharpoonup":"\u21c0","rightleftarrows":"\u21c4","rightleftharpoons":"\u21cc","rightrightarrows":"\u21c9","rightsquigarrow":"\u219d","RightTeeArrow":"\u21a6","RightTee":"\u22a2","RightTeeVector":"\u295b","rightthreetimes":"\u22cc","RightTriangleBar":"\u29d0","RightTriangle":"\u22b3","RightTriangleEqual":"\u22b5","RightUpDownVector":"\u294f","RightUpTeeVector":"\u295c","RightUpVectorBar":"\u2954","RightUpVector":"\u21be","RightVectorBar":"\u2953","RightVector":"\u21c0","ring":"\u02da","risingdotseq":"\u2253","rlarr":"\u21c4","rlhar":"\u21cc","rlm":"\u200f","rmoustache":"\u23b1","rmoust":"\u23b1","rnmid":"\u2aee","roang":"\u27ed","roarr":"\u21fe","robrk":"\u27e7","ropar":"\u2986","ropf":"\ud835\udd63","Ropf":"\u211d","roplus":"\u2a2e","rotimes":"\u2a35","RoundImplies":"\u2970","rpar":")","rpargt":"\u2994","rppolint":"\u2a12","rrarr":"\u21c9","Rrightarrow":"\u21db","rsaquo":"\u203a","rscr":"\ud835\udcc7","Rscr":"\u211b","rsh":"\u21b1","Rsh":"\u21b1","rsqb":"]","rsquo":"\u2019","rsquor":"\u2019","rthree":"\u22cc","rtimes":"\u22ca","rtri":"\u25b9","rtrie":"\u22b5","rtrif":"\u25b8","rtriltri":"\u29ce","RuleDelayed":"\u29f4","ruluhar":"\u2968","rx":"\u211e","Sacute":"\u015a","sacute":"\u015b","sbquo":"\u201a","scap":"\u2ab8","Scaron":"\u0160","scaron":"\u0161","Sc":"\u2abc","sc":"\u227b","sccue":"\u227d","sce":"\u2ab0","scE":"\u2ab4","Scedil":"\u015e","scedil":"\u015f","Scirc":"\u015c","scirc":"\u015d","scnap":"\u2aba","scnE":"\u2ab6","scnsim":"\u22e9","scpolint":"\u2a13","scsim":"\u227f","Scy":"\u0421","scy":"\u0441","sdotb":"\u22a1","sdot":"\u22c5","sdote":"\u2a66","searhk":"\u2925","searr":"\u2198","seArr":"\u21d8","searrow":"\u2198","sect":"\xa7","semi":";","seswar":"\u2929","setminus":"\u2216","setmn":"\u2216","sext":"\u2736","Sfr":"\ud835\udd16","sfr":"\ud835\udd30","sfrown":"\u2322","sharp":"\u266f","SHCHcy":"\u0429","shchcy":"\u0449","SHcy":"\u0428","shcy":"\u0448","ShortDownArrow":"\u2193","ShortLeftArrow":"\u2190","shortmid":"\u2223","shortparallel":"\u2225","ShortRightArrow":"\u2192","ShortUpArrow":"\u2191","shy":"\xad","Sigma":"\u03a3","sigma":"\u03c3","sigmaf":"\u03c2","sigmav":"\u03c2","sim":"\u223c","simdot":"\u2a6a","sime":"\u2243","simeq":"\u2243","simg":"\u2a9e","simgE":"\u2aa0","siml":"\u2a9d","simlE":"\u2a9f","simne":"\u2246","simplus":"\u2a24","simrarr":"\u2972","slarr":"\u2190","SmallCircle":"\u2218","smallsetminus":"\u2216","smashp":"\u2a33","smeparsl":"\u29e4","smid":"\u2223","smile":"\u2323","smt":"\u2aaa","smte":"\u2aac","smtes":"\u2aac\ufe00","SOFTcy":"\u042c","softcy":"\u044c","solbar":"\u233f","solb":"\u29c4","sol":"/","Sopf":"\ud835\udd4a","sopf":"\ud835\udd64","spades":"\u2660","spadesuit":"\u2660","spar":"\u2225","sqcap":"\u2293","sqcaps":"\u2293\ufe00","sqcup":"\u2294","sqcups":"\u2294\ufe00","Sqrt":"\u221a","sqsub":"\u228f","sqsube":"\u2291","sqsubset":"\u228f","sqsubseteq":"\u2291","sqsup":"\u2290","sqsupe":"\u2292","sqsupset":"\u2290","sqsupseteq":"\u2292","square":"\u25a1","Square":"\u25a1","SquareIntersection":"\u2293","SquareSubset":"\u228f","SquareSubsetEqual":"\u2291","SquareSuperset":"\u2290","SquareSupersetEqual":"\u2292","SquareUnion":"\u2294","squarf":"\u25aa","squ":"\u25a1","squf":"\u25aa","srarr":"\u2192","Sscr":"\ud835\udcae","sscr":"\ud835\udcc8","ssetmn":"\u2216","ssmile":"\u2323","sstarf":"\u22c6","Star":"\u22c6","star":"\u2606","starf":"\u2605","straightepsilon":"\u03f5","straightphi":"\u03d5","strns":"\xaf","sub":"\u2282","Sub":"\u22d0","subdot":"\u2abd","subE":"\u2ac5","sube":"\u2286","subedot":"\u2ac3","submult":"\u2ac1","
1subnE":"\u2acb","subne":"\u228a","subplus":"\u2abf","subrarr":"\u2979","subset":"\u2282","Subset":"\u22d0","subseteq":"\u2286","subseteqq":"\u2ac5","SubsetEqual":"\u2286","subsetneq":"\u228a","subsetneqq":"\u2acb","subsim":"\u2ac7","subsub":"\u2ad5","subsup":"\u2ad3","succapprox":"\u2ab8","succ":"\u227b","succcurlyeq":"\u227d","Succeeds":"\u227b","SucceedsEqual":"\u2ab0","SucceedsSlantEqual":"\u227d","SucceedsTilde":"\u227f","succeq":"\u2ab0","succnapprox":"\u2aba","succneqq":"\u2ab6","succnsim":"\u22e9","succsim":"\u227f","SuchThat":"\u220b","sum":"\u2211","Sum":"\u2211","sung":"\u266a","sup1":"\xb9","sup2":"\xb2","sup3":"\xb3","sup":"\u2283","Sup":"\u22d1","supdot":"\u2abe","supdsub":"\u2ad8","supE":"\u2ac6","supe":"\u2287","supedot":"\u2ac4","Superset":"\u2283","SupersetEqual":"\u2287","suphsol":"\u27c9","suphsub":"\u2ad7","suplarr":"\u297b","supmult":"\u2ac2","supnE":"\u2acc","supne":"\u228b","supplus":"\u2ac0","supset":"\u2283","Supset":"\u22d1","supseteq":"\u2287","supseteqq":"\u2ac6","supsetneq":"\u228b","supsetneqq":"\u2acc","supsim":"\u2ac8","supsub":"\u2ad4","supsup":"\u2ad6","swarhk":"\u2926","swarr":"\u2199","swArr":"\u21d9","swarrow":"\u2199","swnwar":"\u292a","szlig":"\xdf","Tab":"\\t","target":"\u2316","Tau":"\u03a4","tau":"\u03c4","tbrk":"\u23b4","Tcaron":"\u0164","tcaron":"\u0165","Tcedil":"\u0162","tcedil":"\u0163","Tcy":"\u0422","tcy":"\u0442","tdot":"\u20db","telrec":"\u2315","Tfr":"\ud835\udd17","tfr":"\ud835\udd31","there4":"\u2234","therefore":"\u2234","Therefore":"\u2234","Theta":"\u0398","theta":"\u03b8","thetasym":"\u03d1","thetav":"\u03d1","thickapprox":"\u2248","thicksim":"\u223c","ThickSpace":"\u205f\u200a","ThinSpace":"\u2009","thinsp":"\u2009","thkap":"\u2248","thksim":"\u223c","THORN":"\xde","thorn":"\xfe","tilde":"\u02dc","Tilde":"\u223c","TildeEqual":"\u2243","TildeFullEqual":"\u2245","TildeTilde":"\u2248","timesbar":"\u2a31","timesb":"\u22a0","times":"\xd7","timesd":"\u2a30","tint":"\u222d","toea":"\u2928","topbot":"\u2336","topcir":"\u2af1","top":"\u22a4","Topf":"\ud835\udd4b","topf":"\ud835\udd65","topfork":"\u2ada","tosa":"\u2929","tprime":"\u2034","trade":"\u2122","TRADE":"\u2122","triangle":"\u25b5","triangledown":"\u25bf","triangleleft":"\u25c3","trianglelefteq":"\u22b4","triangleq":"\u225c","triangleright":"\u25b9","trianglerighteq":"\u22b5","tridot":"\u25ec","trie":"\u225c","triminus":"\u2a3a","TripleDot":"\u20db","triplus":"\u2a39","trisb":"\u29cd","tritime":"\u2a3b","trpezium":"\u23e2","Tscr":"\ud835\udcaf","tscr":"\ud835\udcc9","TScy":"\u0426","tscy":"\u0446","TSHcy":"\u040b","tshcy":"\u045b","Tstrok":"\u0166","tstrok":"\u0167","twixt":"\u226c","twoheadleftarrow":"\u219e","twoheadrightarrow":"\u21a0","Uacute":"\xda","uacute":"\xfa","uarr":"\u2191","Uarr":"\u219f","uArr":"\u21d1","Uarrocir":"\u2949","Ubrcy":"\u040e","ubrcy":"\u045e","Ubreve":"\u016c","ubreve":"\u016d","Ucirc":"\xdb","ucirc":"\xfb","Ucy":"\u0423","ucy":"\u0443","udarr":"\u21c5","Udblac":"\u0170","udblac":"\u0171","udhar":"\u296e","ufisht":"\u297e","Ufr":"\ud835\udd18","ufr":"\ud835\udd32","Ugrave":"\xd9","ugrave":"\xf9","uHar":"\u2963","uharl":"\u21bf","uharr":"\u21be","uhblk":"\u2580","ulcorn":"\u231c","ulcorner":"\u231c","ulcrop":"\u230f","ultri":"\u25f8","Umacr":"\u016a","umacr":"\u016b","uml":"\xa8","UnderBar":"_","UnderBrace":"\u23df","UnderBracket":"\u23b5","UnderParenthesis":"\u23dd","Union":"\u22c3","UnionPlus":"\u228e","Uogon":"\u0172","uogon":"\u0173","Uopf":"\ud835\udd4c","uopf":"\ud835\udd66","UpArrowBar":"\u2912","uparrow":"\u2191","UpArrow":"\u2191","Uparrow":"\u21d1","UpArrowDownArrow":"\u21c5","updownarrow":"\u2195","UpDownArrow":"\u2195","Updownarrow":"\u21d5","UpEquilibrium":"\u296e","upharpoonleft":"\u21bf","upharpoonright":"\u21be","uplus":"\u228e","UpperLeftArrow":"\u2196","UpperRightArrow":"\u2197","upsi":"\u03c5","Upsi":"\u03d2","upsih":"\u03d2","Upsilon":"\u03a5","upsilon":"\u03c5","UpTeeArrow":"\u21a5","UpTee":"\u22a5","upuparrows":"\u21c8","urcorn":"\u231d","urcorner":"\u231d","urcrop":"\u230e","Uring":"\u016e","uring":"\u016f","urtri":"\u25f9","Uscr":"\ud835\udcb0","uscr":"\ud835\udcca","utdot":"\u22f0","Utilde":"\u0168","utilde":"\u0169","utri":"\u25b5","utrif":"\u25b4","uuarr":"\u21c8","Uuml":"\xdc","uuml":"\xfc","uwangle":"\u29a7","vangrt":"\u299c","varepsilon":"\u03f5","varkappa":"\u03f0","varnothing":"\u2205","varphi":"\u03d5","varpi":"\u03d6","varpropto":"\u221d","varr":"\u2195","vArr":"\u21d5","varrho":"\u03f1","varsigma":"\u03c2","varsubsetneq":"\u228a\ufe00","varsubsetneqq":"\u2acb\ufe00","varsupsetneq":"\u228b\ufe00","varsupsetneqq":"\u2acc\ufe00","vartheta":"\u03d1","vartriangleleft":"\u22b2","vartriangleright":"\u22b3","vBar":"\u2ae8","Vbar":"\u2aeb","vBarv":"\u2ae9","Vcy":"\u0412","vcy":"\u0432","vdash":"\u22a2","vDash":"\u22a8","Vdash":"\u22a9","VDash":"\u22ab","Vdashl":"\u2ae6","veebar":"\u22bb","vee":"\u2228","Vee":"\u22c1","veeeq":"\u225a","vellip":"\u22ee","verbar":"|","Verbar":"\u2016","vert":"|","Vert":"\u2016","VerticalBar":"\u2223","VerticalLine":"|","VerticalSeparator":"\u2758","VerticalTilde":"\u2240","VeryThinSpace":"\u200a","Vfr":"\ud835\udd19","vfr":"\ud835\udd33","vltri":"\u22b2","vnsub":"\u2282\u20d2","vnsup":"\u2283\u20d2","Vopf":"\ud835\udd4d","vopf":"\ud835\udd67","vprop":"\u221d","vrtri":"\u22b3","Vscr":"\ud835\udcb1","vscr":"\ud835\udccb","vsubnE":"\u2acb\ufe00","vsubne":"\u228a\ufe00","vsupnE":"\u2acc\ufe00","vsupne":"\u228b\ufe00","Vvdash":"\u22aa","vzigzag":"\u299a","Wcirc":"\u0174","wcirc":"\u0175","wedbar":"\u2a5f","wedge":"\u2227","Wedge":"\u22c0","wedgeq":"\u2259","weierp":"\u2118","Wfr":"\ud835\udd1a","wfr":"\ud835\udd34","Wopf":"\ud835\udd4e","wopf":"\ud835\udd68","wp":"\u2118","wr":"\u2240","wreath":"\u2240","Wscr":"\ud835\udcb2","wscr":"\ud835\udccc","xcap":"\u22c2","xcirc":"\u25ef","xcup":"\u22c3","xdtri":"\u25bd","Xfr":"\ud835\udd1b","xfr":"\ud835\udd35","xharr":"\u27f7","xhArr":"\u27fa","Xi":"\u039e","xi":"\u03be","xlarr":"\u27f5","xlArr":"\u27f8","xmap":"\u27fc","xnis":"\u22fb","xodot":"\u2a00","Xopf":"\ud835\udd4f","xopf":"\ud835\udd69","xoplus":"\u2a01","xotime":"\u2a02","xrarr":"\u27f6","xrArr":"\u27f9","Xscr":"\ud835\udcb3","xscr":"\ud835\udccd","xsqcup":"\u2a06","xuplus":"\u2a04","xutri":"\u25b3","xvee":"\u22c1","xwedge":"\u22c0","Yacute":"\xdd","yacute":"\xfd","YAcy":"\u042f","yacy":"\u044f","Ycirc":"\u0176","ycirc":"\u0177","Ycy":"\u042b","ycy":"\u044b","yen":"\xa5","Yfr":"\ud835\udd1c","yfr":"\ud835\udd36","YIcy":"\u0407","yicy":"\u0457","Yopf":"\ud835\udd50","yopf":"\ud835\udd6a","Yscr":"\ud835\udcb4","yscr":"\ud835\udcce","YUcy":"\u042e","yucy":"\u044e","yuml":"\xff","Yuml":"\u0178","Zacute":"\u0179","zacute":"\u017a","Zcaron":"\u017d","zcaron":"\u017e","Zcy":"\u0417","zcy":"\u0437","Zdot":"\u017b","zdot":"\u017c","zeetrf":"\u2128","ZeroWidthSpace":"\u200b","Zeta":"\u0396","zeta":"\u03b6","zfr":"\ud835\udd37","Zfr":"\u2128","ZHcy":"\u0416","zhcy":"\u0436","zigrarr":"\u21dd","zopf":"\ud835\udd6b","Zopf":"\u2124","Zscr":"\ud835\udcb5","zscr":"\ud835\udccf","zwj":"\u200d","zwnj":"\u200c"}')},9591:t=>{"use strict";
1t.exports=JSON.parse('{"Aacute":"\xc1","aacute":"\xe1","Acirc":"\xc2","acirc":"\xe2","acute":"\xb4","AElig":"\xc6","aelig":"\xe6","Agrave":"\xc0","agrave":"\xe0","amp":"&","AMP":"&","Aring":"\xc5","aring":"\xe5","Atilde":"\xc3","atilde":"\xe3","Auml":"\xc4","auml":"\xe4","brvbar":"\xa6","Ccedil":"\xc7","ccedil":"\xe7","cedil":"\xb8","cent":"\xa2","copy":"\xa9","COPY":"\xa9","curren":"\xa4","deg":"\xb0","divide":"\xf7","Eacute":"\xc9","eacute":"\xe9","Ecirc":"\xca","ecirc":"\xea","Egrave":"\xc8","egrave":"\xe8","ETH":"\xd0","eth":"\xf0","Euml":"\xcb","euml":"\xeb","frac12":"\xbd","frac14":"\xbc","frac34":"\xbe","gt":">","GT":">","Iacute":"\xcd","iacute":"\xed","Icirc":"\xce","icirc":"\xee","iexcl":"\xa1","Igrave":"\xcc","igrave":"\xec","iquest":"\xbf","Iuml":"\xcf","iuml":"\xef","laquo":"\xab","lt":"<","LT":"<","macr":"\xaf","micro":"\xb5","middot":"\xb7","nbsp":"\xa0","not":"\xac","Ntilde":"\xd1","ntilde":"\xf1","Oacute":"\xd3","oacute":"\xf3","Ocirc":"\xd4","ocirc":"\xf4","Ograve":"\xd2","ograve":"\xf2","ordf":"\xaa","ordm":"\xba","Oslash":"\xd8","oslash":"\xf8","Otilde":"\xd5","otilde":"\xf5","Ouml":"\xd6","ouml":"\xf6","para":"\xb6","plusmn":"\xb1","pound":"\xa3","quot":"\\"","QUOT":"\\"","raquo":"\xbb","reg":"\xae","REG":"\xae","sect":"\xa7","shy":"\xad","sup1":"\xb9","sup2":"\xb2","sup3":"\xb3","szlig":"\xdf","THORN":"\xde","thorn":"\xfe","times":"\xd7","Uacute":"\xda","uacute":"\xfa","Ucirc":"\xdb","ucirc":"\xfb","Ugrave":"\xd9","ugrave":"\xf9","uml":"\xa8","Uuml":"\xdc","uuml":"\xfc","Yacute":"\xdd","yacute":"\xfd","yen":"\xa5","yuml":"\xff"}')},2586:t=>{"use strict";t.exports=JSON.parse('{"amp":"&","apos":"\'","gt":">","lt":"<","quot":"\\""}')}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r].call(i.exports,i,i.exports,n),i.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{default:()=>d});var t=function(){return t=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},t.apply(this,arguments)},e="set-device-desktop",o="set-device-tablet",i="set-device-mobile",a="canvas-clear",s=n(6094),l=n.n(s),c=function(){return c=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},c.apply(this,arguments)};const u=function(t,n){var r=t.Commands,s=n.textCleanCanvas;!function(t,e){var n=t.Commands,r=t.getConfig().stylePrefix;n.add(e.cmdOpenImport,{containerEl:null,codeEditorHtml:null,createCodeViewer:function(){return t.CodeManager.createViewer({codeName:"htmlmixed",theme:e.codeViewerTheme,readOnly:!1})},createCodeEditor:function(){var t=document.createElement("div"),e=this.createCodeViewer();return t.style.flex="1 0 auto",t.style.boxSizing="border-box",t.className="".concat(r,"import-code"),t.appendChild(e.getElement()),{codeEditor:e,el:t}},getCodeContainer:function(){var t=this.containerEl;return t||((t=document.createElement("div")).className="".concat(r,"import-container"),t.style.display="flex",t.style.gap="5px",t.style.flexDirection="column",t.style.justifyContent="space-between",this.containerEl=t),t},run:function(t){var n=this.getCodeContainer(),o=this.codeEditorHtml;if(!o){var i=this.createCodeEditor(),a=document.createElement("button");if(o=i.codeEditor,this.codeEditorHtml=o,e.modalLabelImport){var s=document.createElement("div");s.className="".concat(r,"import-label"),s.innerHTML=e.modalLabelImport,n.appendChild(s)}a.innerHTML=e.modalBtnImport,a.type="button",a.className="".concat(r,"btn-prim ").concat(r,"btn-import"),a.style.alignSelf="flex-start",a.onclick=function(){var e=i.codeEditor.editor.getValue();t.Components.clear(),t.Css.clear(),t.setComponents(e),t.Modal.close()},n.appendChild(i.el),n.appendChild(a)}t.Modal.open({title:e.modalTitleImport,content:n}),o&&(o.setContent(e.importPlaceholder||""),o.editor.refresh())}})}
1(t,n),function(t,e){var n=t.Commands,r=t.getConfig().stylePrefix;n.add(e.cmdInlineHtml,{run:function(t,e,n){void 0===n&&(n={});var r=t.getHtml()+"<style>".concat(t.getCss(),"</style>");return l()(r,c(c({},n.juiceOpts),n))}}),n.add("export-template",{containerEl:null,codeEditorHtml:null,createCodeViewer:function(){return t.CodeManager.createViewer({codeName:"htmlmixed",theme:e.codeViewerTheme})},createCodeEditor:function(){var t=document.createElement("div"),e=this.createCodeViewer();return t.style.flex="1 0 auto",t.style.boxSizing="border-box",t.className="".concat(r,"export-code"),t.appendChild(e.getElement()),{codeEditor:e,el:t}},getCodeContainer:function(){var t=this.containerEl;return t||((t=document.createElement("div")).className="".concat(r,"export-container"),t.style.display="flex",t.style.gap="5px",t.style.flexDirection="column",t.style.justifyContent="space-between",this.containerEl=t),t},run:function(t){var n=this.codeEditorHtml,o=this.getCodeContainer();if(!n){var i=this.createCodeEditor();if(n=i.codeEditor,this.codeEditorHtml=n,e.modalLabelExport){var a=document.createElement("div");a.className="".concat(r,"export-label"),a.innerHTML=e.modalLabelExport,o.appendChild(a)}o.appendChild(i.el)}if(t.Modal.open({title:e.modalTitleExport,content:o}),n){var s="".concat(t.getHtml(),"<style>").concat(t.getCss(),"</style>");n.setContent(e.inlineCss?l()(s,e.juiceOpts):s),n.editor.refresh()}}})}(t,n),function(t,e){t.Commands.add(e.cmdTglImages,{run:function(t){var e=t.getComponents();this.toggleImages(e)},stop:function(t){var e=t.getComponents();this.toggleImages(e,!0)},toggleImages:function(t,e){var n=this;void 0===e&&(e=!1);var r="##";t.forEach(function(t){if("image"===t.get("type")){var o=t.get("src");e?o===r&&t.set("src",t.get("src_bkp")):o!==r&&(t.set("src_bkp",t.get("src")),t.set("src",r))}n.toggleImages(t.components(),e)})}})}(t,n),r.add(e,{run:function(t){return t.setDevice("Desktop")},stop:function(){}}),r.add(o,{run:function(t){return t.setDevice("Tablet")},stop:function(){}}),r.add(i,{run:function(t){return t.setDevice("Mobile portrait")},stop:function(){}}),r.add(a,{run:function(t){var e="core:canvas-clear";s?confirm(s)&&t.runCommand(e):t.runCommand(e)}})};var p=function(){return p=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},p.apply(this,arguments)};const d=function(n,r){void 0===r&&(r={});var s=n.getConfig(),l=p({blocks:["sect100","sect50","sect30","sect37","button","divider","text","text-sect","image","quote","link","link-block","grid-items","list-items"],block:function(){return{}},juiceOpts:{},cmdOpenImport:"gjs-open-import-template",cmdTglImages:"gjs-toggle-images",cmdInlineHtml:"gjs-get-inlined-html",modalTitleImport:"Import template",modalTitleExport:"Export template",modalLabelImport:"",modalLabelExport:"",modalBtnImport:"Import",codeViewerTheme:"hopscotch",importPlaceholder:"",inlineCss:!0,cellStyle:{padding:"0",margin:"0","vertical-align":"top"},tableStyle:{height:"150px",margin:"0 auto 10px auto",padding:"5px 5px 5px 5px",width:"100%"},updateStyleManager:!0,showStylesOnChange:!0,showBlocksOnLoad:!0,useCustomTheme:!0,textCleanCanvas:"Are you sure you want to clear the canvas?"},r);if(s.devicePreviewMode=!0,l.useCustomTheme&&"undefined"!=typeof window){var c="gjs-",d="";[["one","#373d49"],["two","#dae5e6"],["three","#4c9790"],["four","#35d7bb"]].forEach(function(t){var e=t[0],n=t[1];d+="\n .".concat(c).concat(e,"-bg {\n background-color: ").concat(n,";\n }\n .").concat(c).concat(e,"-color {\n color: ").concat(n,";\n }\n .").concat(c).concat(e,"-color-h:hover {\n color: ").concat(n,";\n }\n ")});var f=document.createElement("style");f.innerText=d,document.head.appendChild(f)}u(n,l),function(e,n){e.Blocks;var r="",o="",i=n.tableStyle||{},a=n.cellStyle||{},s=function(r,o){n.blocks.indexOf(r)>=0&&e.Blocks.add(r,t(t({select:!0},o),n.block(r)))};for(var l in i)r+="".concat(l,": ").concat(i[l],"; ");for(var l in a)o+="".concat(l,": ").concat(a[l],"; ");s("sect100",{label:"1 Section",media:'<svg viewBox="0 0 24 24">
1\n <path fill="currentColor" d="M2 20h20V4H2v16Zm-1 0V4a1 1 0 0 1 1-1h20a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1Z"/>\n </svg>',content:'\n <table style="'.concat(r,'">\n <tr>\n <td style="').concat(o,'"></td>\n </tr>\n </table>\n ')}),s("sect50",{label:"1/2 Section",media:'<svg viewBox="0 0 23 24">\n <path fill="currentColor" d="M2 20h8V4H2v16Zm-1 0V4a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1ZM13 20h8V4h-8v16Zm-1 0V4a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1h-8a1 1 0 0 1-1-1Z"/>\n </svg>',content:'\n <table style="'.concat(r,'">\n <tr>\n <td style="').concat(o,' width: 50%"></td>\n <td style="').concat(o,' width: 50%"></td>\n </tr>\n </table>\n ')}),s("sect30",{label:"1/3 Section",media:'<svg viewBox="0 0 23 24">\n <path fill="currentColor" d="M2 20h4V4H2v16Zm-1 0V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1ZM17 20h4V4h-4v16Zm-1 0V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1ZM9.5 20h4V4h-4v16Zm-1 0V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1Z"/>\n </svg>',content:'\n <table style="'.concat(r,'">\n <tr>\n <td style="').concat(o,' width: 33.3333%"></td>\n <td style="').concat(o,' width: 33.3333%"></td>\n <td style="').concat(o,' width: 33.3333%"></td>\n </tr>\n </table>\n ')}),s("sect37",{label:"3/7 Section",media:'<svg viewBox="0 0 24 24">\n <path fill="currentColor" d="M2 20h5V4H2v16Zm-1 0V4a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1ZM10 20h12V4H10v16Zm-1 0V4a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H10a1 1 0 0 1-1-1Z"></path>\n </svg>',content:'\n <table style="'.concat(r,'">\n <tr>\n <td style="').concat(o,' width:30%"></td>\n <td style="').concat(o,' width:70%"></td>\n </tr>\n </table>\n ')}),s("button",{label:"Button",media:'<svg viewBox="0 0 24 24">\n <path fill="currentColor" d="M20 20.5C20 21.3 19.3 22 18.5 22H13C12.6 22 12.3 21.9 12 21.6L8 17.4L8.7 16.6C8.9 16.4 9.2 16.3 9.5 16.3H9.7L12 18V9C12 8.4 12.4 8 13 8S14 8.4 14 9V13.5L15.2 13.6L19.1 15.8C19.6 16 20 16.6 20 17.1V20.5M20 2H4C2.9 2 2 2.9 2 4V12C2 13.1 2.9 14 4 14H8V12H4V4H20V12H18V14H20C21.1 14 22 13.1 22 12V4C22 2.9 21.1 2 20 2Z" />\n </svg>',content:'<a class="button">Button</a>'}),s("divider",{label:"Divider",media:'<svg viewBox="0 0 24 24">\n <path fill="currentColor" d="M21 18H2V20H21V18M19 10V14H4V10H19M20 8H3C2.45 8 2 8.45 2 9V15C2 15.55 2.45 16 3 16H20C20.55 16 21 15.55 21 15V9C21 8.45 20.55 8 20 8M21 4H2V6H21V4Z" />\n </svg>',content:'\n <table style="width: 100%; margin-top: 10px; margin-bottom: 10px;">\n <tr>\n <td class="divider"></td>\n </tr>\n </table>\n <style>\n .divider {\n background-color: rgba(0, 0, 0, 0.1);\n height: 1px;\n }\n </style>\n '}),s("text",{label:"Text",media:'<svg viewBox="0 0 24 24">\n <path fill="currentColor" d="M18.5,4L19.66,8.35L18.7,8.61C18.25,7.74 17.79,6.87 17.26,6.43C16.73,6 16.11,6 15.5,6H13V16.5C13,17 13,17.5 13.33,17.75C13.67,18 14.33,18 15,18V19H9V18C9.67,18 10.33,18 10.67,17.75C11,17.5 11,17 11,16.5V6H8.5C7.89,6 7.27,6 6.74,6.43C6.21,6.87 5.75,7.74 5.3,8.61L4.34,8.35L5.5,4H18.5Z" />\n </svg>',activate:!0,content:{type:"text",content:"Insert your text here",style:{padding:"10px"}}}),s("text-sect",{label:"Text Section",media:'<svg viewBox="0 0 24 24">\n <path fill="currentColor" d="M20,20H4A2,2 0 0,1 2,18V6A2,2 0 0,1 4,4H20A2,2 0 0,1 22,6V18A2,2 0 0,1 20,20M4,6V18H20V6H4M6,9H18V11H6V9M6,13H16V15H6V13Z" />\n </svg>',content:'\n <h1 class="heading">Insert title here</h1>\n <p class="paragraph">\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua\n </p>\n '}),s("image",{label:"Image",media:'<svg viewBox="0 0 24 24">\n <path fill="currentColor" d="M21,3H3C2,3 1,4 1,5V19A2,2 0 0,0 3,21H21C22,21 23,20 23,19V5C23,4 22,3 21,3M5,17L8.5,12.5L11,15.5L14.5,11L19,17H5Z" />\n </svg>',activate:!0,content:{type:"image",style:{color:"black"}}}),s("quote",{label:"Quote",media:'<svg viewBox="0 0 24 24">
1\n <path fill="currentColor" d="M14,17H17L19,13V7H13V13H16M6,17H9L11,13V7H5V13H8L6,17Z" />\n </svg>',content:'<blockquote class="quote">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore ipsum dolor sit</blockquote>'}),s("link",{label:"Link",media:'<svg viewBox="0 0 24 24">\n <path fill="currentColor" d="M3.9,12C3.9,10.29 5.29,8.9 7,8.9H11V7H7A5,5 0 0,0 2,12A5,5 0 0,0 7,17H11V15.1H7C5.29,15.1 3.9,13.71 3.9,12M8,13H16V11H8V13M17,7H13V8.9H17C18.71,8.9 20.1,10.29 20.1,12C20.1,13.71 18.71,15.1 17,15.1H13V17H17A5,5 0 0,0 22,12A5,5 0 0,0 17,7Z"></path>\n </svg>',content:{type:"link",content:"Link",style:{color:"#3b97e3"}}}),s("link-block",{label:"Link Block",media:'<svg viewBox="0 0 24 24">\n <path fill="currentColor" d="M3.9,12C3.9,10.29 5.29,8.9 7,8.9H11V7H7A5,5 0 0,0 2,12A5,5 0 0,0 7,17H11V15.1H7C5.29,15.1 3.9,13.71 3.9,12M8,13H16V11H8V13M17,7H13V8.9H17C18.71,8.9 20.1,10.29 20.1,12C20.1,13.71 18.71,15.1 17,15.1H13V17H17A5,5 0 0,0 22,12A5,5 0 0,0 17,7Z"></path>\n </svg>',content:{type:"link",editable:!1,droppable:!0,style:{display:"inline-block",padding:"5px","min-height":"50px","min-width":"50px"}}});var c='<table class="grid-item-card">\n <tr>\n <td class="grid-item-card-cell">\n <img class="grid-item-image" src="https://via.placeholder.com/250x150/78c5d6/fff/" alt="Image"/>\n <table class="grid-item-card-body">\n <tr>\n <td class="grid-item-card-content">\n <h1 class="card-title">Title here</h1>\n <p class="card-text">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt</p>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n </table>';s("grid-items",{label:"Grid Items",media:'<svg viewBox="0 0 24 24">\n <path fill="currentColor" d="M3,11H11V3H3M3,21H11V13H3M13,21H21V13H13M13,3V11H21V3"/>\n </svg>',content:'\n <table class="grid-item-row">\n <tr>\n <td class="grid-item-cell2-l">'.concat(c,'</td>\n <td class="grid-item-cell2-r">').concat(c,"</td>\n </tr>\n </table>\n ")});var u='<table class="list-item">\n <tr>\n <td class="list-item-cell">\n <table class="list-item-content">\n <tr class="list-item-row">\n <td class="list-cell-left">\n <img class="list-item-image" src="https://via.placeholder.com/150/78c5d6/fff" alt="Image"/>\n </td>\n <td class="list-cell-right">\n <h1 class="card-title">Title here</h1>\n <p class="card-text">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt</p>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n </table>';s("list-items",{label:"List Items",media:'<svg viewBox="0 0 24 24">\n <path fill="currentColor" d="M2 14H8V20H2M16 8H10V10H16M2 10H8V4H2M10 4V6H22V4M10 20H16V18H10M10 16H22V14H10"/>\n </svg>',content:u+u})}(n,l),function(t,n){var r=t.Panels,s=n.cmdOpenImport,l=n.cmdTglImages,c="export-template",u="open-sm",p="open-tm",d="open-layers",f="open-blocks",h="sw-visibility",g="fullscreen",m="preview",v='style="display: block; max-width: 22px"';t.getConfig().showDevices=!1,r.getPanels().reset([{id:"commands",buttons:[{}]},{id:"devices-c",buttons:[{id:e,command:e,active:!0,label:"<svg ".concat(v,' viewBox="0 0 24 24">\n <path fill="currentColor" d="M21,16H3V4H21M21,2H3C1.89,2 1,2.89 1,4V16A2,2 0 0,0 3,18H10V20H8V22H16V20H14V18H21A2,2 0 0,0 23,16V4C23,2.89 22.1,2 21,2Z" />\n </svg>')},{id:o,command:o,label:"<svg ".concat(v,' viewBox="0 0 24 24">\n <path fill="currentColor" d="M19,18H5V6H19M21,4H3C1.89,4 1,4.89 1,6V18A2,2 0 0,0 3,20H21A2,2 0 0,0 23,18V6C23,4.89 22.1,4 21,4Z" />\n </svg>')},{id:i,command:i,label:"<svg ".concat(v,' viewBox="0 0 24 24">\n <path fill="currentColor" d="M17,19H7V5H17M17,1H7C5.89,1 5,1.89 5,3V21A2,2 0 0,0 7,23H17A2,2 0 0,0 19,21V3C19,1.89 18.1,1 17,1Z" />\n </svg>')}]}
1,{id:"options",buttons:[{id:h,command:h,context:h,label:"<svg ".concat(v,' viewBox="0 0 24 24">\n <path fill="currentColor" d="M15,5H17V3H15M15,21H17V19H15M11,5H13V3H11M19,5H21V3H19M19,9H21V7H19M19,21H21V19H19M19,13H21V11H19M19,17H21V15H19M3,5H5V3H3M3,9H5V7H3M3,13H5V11H3M3,17H5V15H3M3,21H5V19H3M11,21H13V19H11M7,21H9V19H7M7,5H9V3H7V5Z" />\n </svg>')},{id:m,context:m,command:m,label:"<svg ".concat(v,' viewBox="0 0 24 24"><path fill="currentColor" d="M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z"></path></svg>')},{id:g,command:g,context:g,label:"<svg ".concat(v,' viewBox="0 0 24 24">\n <path fill="currentColor" d="M5,5H10V7H7V10H5V5M14,5H19V10H17V7H14V5M17,14H19V19H14V17H17V14M10,17V19H5V14H7V17H10Z" />\n </svg>')},{id:c,command:c,label:"<svg ".concat(v,' viewBox="0 0 24 24">\n <path fill="currentColor" d="M12.89,3L14.85,3.4L11.11,21L9.15,20.6L12.89,3M19.59,12L16,8.41V5.58L22.42,12L16,18.41V15.58L19.59,12M1.58,12L8,5.58V8.41L4.41,12L8,15.58V18.41L1.58,12Z" />\n </svg>')},{id:s,command:s,label:"<svg ".concat(v,' viewBox="0 0 24 24">\n <path fill="currentColor" d="M5,20H19V18H5M19,9H15V3H9V9H5L12,16L19,9Z" />\n </svg>')},{id:l,command:l,label:"<svg ".concat(v,' viewBox="0 0 24 24">\n <path fill="currentColor" d="M5 3C3.9 3 3 3.9 3 5V19C3 20.11 3.9 21 5 21H14.09C14.03 20.67 14 20.34 14 20C14 19.32 14.12 18.64 14.35 18H5L8.5 13.5L11 16.5L14.5 12L16.73 14.97C17.7 14.34 18.84 14 20 14C20.34 14 20.67 14.03 21 14.09V5C21 3.89 20.1 3 19 3H5M16.47 17.88L18.59 20L16.47 22.12L17.88 23.54L20 21.41L22.12 23.54L23.54 22.12L21.41 20L23.54 17.88L22.12 16.46L20 18.59L17.88 16.47L16.46 17.88Z"/>\n </svg>')},{id:"undo",command:"core:undo",label:"<svg ".concat(v,' viewBox="0 0 24 24">\n <path fill="currentColor" d="M20 13.5C20 17.09 17.09 20 13.5 20H6V18H13.5C16 18 18 16 18 13.5S16 9 13.5 9H7.83L10.91 12.09L9.5 13.5L4 8L9.5 2.5L10.92 3.91L7.83 7H13.5C17.09 7 20 9.91 20 13.5Z" />\n </svg>')},{id:"redo",command:"core:redo",label:"<svg ".concat(v,' viewBox="0 0 24 24">\n <path fill="currentColor" d="M10.5 18H18V20H10.5C6.91 20 4 17.09 4 13.5S6.91 7 10.5 7H16.17L13.08 3.91L14.5 2.5L20 8L14.5 13.5L13.09 12.09L16.17 9H10.5C8 9 6 11 6 13.5S8 18 10.5 18Z" />\n </svg>')},{id:a,command:a,label:"<svg ".concat(v,' viewBox="0 0 24 24">\n <path fill="currentColor" d="M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z" />\n </svg>')}]},{id:"views",buttons:[{id:u,command:u,active:!0,label:"<svg ".concat(v,' viewBox="0 0 24 24">\n <path fill="currentColor" d="M20.71,4.63L19.37,3.29
1C19,2.9 18.35,2.9 17.96,3.29L9,12.25L11.75,15L20.71,6.04C21.1,5.65 21.1,5 20.71,4.63M7,14A3,3 0 0,0 4,17C4,18.31 2.84,19 2,19C2.92,20.22 4.5,21 6,21A4,4 0 0,0 10,17A3,3 0 0,0 7,14Z" />\n </svg>')},{id:p,command:p,label:"<svg ".concat(v,' viewBox="0 0 24 24">\n <path fill="currentColor" d="M12,15.5A3.5,3.5 0 0,1 8.5,12A3.5,3.5 0 0,1 12,8.5A3.5,3.5 0 0,1 15.5,12A3.5,3.5 0 0,1 12,15.5M19.43,12.97C19.47,12.65 19.5,12.33 19.5,12C19.5,11.67 19.47,11.34 19.43,11L21.54,9.37C21.73,9.22 21.78,8.95 21.66,8.73L19.66,5.27C19.54,5.05 19.27,4.96 19.05,5.05L16.56,6.05C16.04,5.66 15.5,5.32 14.87,5.07L14.5,2.42C14.46,2.18 14.25,2 14,2H10C9.75,2 9.54,2.18 9.5,2.42L9.13,5.07C8.5,5.32 7.96,5.66 7.44,6.05L4.95,5.05C4.73,4.96 4.46,5.05 4.34,5.27L2.34,8.73C2.21,8.95 2.27,9.22 2.46,9.37L4.57,11C4.53,11.34 4.5,11.67 4.5,12C4.5,12.33 4.53,12.65 4.57,12.97L2.46,14.63C2.27,14.78 2.21,15.05 2.34,15.27L4.34,18.73C4.46,18.95 4.73,19.03 4.95,18.95L7.44,17.94C7.96,18.34 8.5,18.68 9.13,18.93L9.5,21.58C9.54,21.82 9.75,22 10,22H14C14.25,22 14.46,21.82 14.5,21.58L14.87,18.93C15.5,18.67 16.04,18.34 16.56,17.94L19.05,18.95C19.27,19.03 19.54,18.95 19.66,18.73L21.66,15.27C21.78,15.05 21.73,14.78 21.54,14.63L19.43,12.97Z" />\n </svg>')},{id:d,command:d,label:"<svg ".concat(v,' viewBox="0 0 24 24">\n <path fill="currentColor" d="M12,16L19.36,10.27L21,9L12,2L3,9L4.63,10.27M12,18.54L4.62,12.81L3,14.07L12,21.07L21,14.07L19.37,12.8L12,18.54Z" />\n </svg>')},{id:f,command:f,label:"<svg ".concat(v,' viewBox="0 0 24 24">\n <path fill="currentColor" d="M17,13H13V17H11V13H7V11H11V7H13V11H17M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z" />\n </svg>')}]}]),n.showStylesOnChange&&t.on("component:selected",function(){var e=r.getButton("views",d);if((!e||!e.get("active"))&&t.getSelected()){var n=r.getButton("views",u);null==n||n.set("active",!0)}}),t.onReady(function(){if(n.showBlocksOnLoad){var t=r.getButton("views",f);null==t||t.set("active",!0)}})}(n,l),function(t,e){var n=t.StyleManager.getSectors();if(e.updateStyleManager){var r=[{name:"Dimension",open:!1,buildProps:["width","height","max-width","min-height","margin","padding"],properties:[{property:"margin",properties:[{name:"Top",property:"margin-top"},{name:"Left",property:"margin-left"},{name:"Right",property:"margin-right"},{name:"Bottom",property:"margin-bottom"}]},{property:"padding",properties:[{name:"Top",property:"padding-top"},{name:"Right",property:"padding-right"},{name:"Bottom",property:"padding-bottom"},{name:"Left",property:"padding-left"}]}]},{name:"Typography",open:!1,buildProps:["font-family","font-size","font-weight","letter-spacing","color","line-height","text-align","text-decoration","font-style","vertical-align","text-shadow"],properties:[{name:"Font",property:"font-family"},{name:"Weight",property:"font-weight"},{name:"Font color",property:"color"},{property:"text-align",type:"radio",defaults:"left",list:[{value:"left",name:"Left",className:"fa fa-align-left"},{value:"center",name:"Center",className:"fa fa-align-center"},{value:"right",name:"Right",className:"fa fa-align-right"},{value:"justify",name:"Justify",className:"fa fa-align-justify"}]},{property:"text-decoration",type:"radio",defaults:"none",list:[{value:"none",name:"None",className:"fa fa-times"},{value:"underline",name:"underline",className:"fa fa-underline"},{value:"line-through",name:"Line-through",className:"fa fa-strikethrough"}]},{property:"font-style",type:"radio",defaults:"normal",list:[{value:"normal",name:"Normal",className:"fa fa-font"},{value:"italic",name:"Italic",className:"fa fa-italic"}]},{property:"vertical-align",type:"select",defaults:"baseline",list:[{value:"baseline"},{value:"top"},{value:"middle"},{value:"bottom"}]},{property:"text-shadow",properties:[{name:"X position",property:"text-shadow-h"},{name:"Y position",property:"text-shadow-v"},{name:"Blur",property:"text-shadow-blur"},{name:"Color",property:"text-shadow-color"}]}]},{name:"Decorations",open:!1,buildProps:["background-color","border-collapse","border-radius","border","background"],properties:[{property:"background-color",name:"Backgroun
1d"},{property:"border-radius",properties:[{name:"Top",property:"border-top-left-radius"},{name:"Right",property:"border-top-right-radius"},{name:"Bottom",property:"border-bottom-left-radius"},{name:"Left",property:"border-bottom-right-radius"}]},{property:"border-collapse",type:"radio",defaults:"separate",list:[{value:"separate",name:"No"},{value:"collapse",name:"Yes"}]},{property:"border",properties:[{name:"Width",property:"border-width",defaults:"0"},{name:"Style",property:"border-style"},{name:"Color",property:"border-color"}]},{property:"background",properties:[{name:"Image",property:"background-image"},{name:"Repeat",property:"background-repeat"},{name:"Position",property:"background-position"},{name:"Attachment",property:"background-attachment"},{name:"Size",property:"background-size"}]}]}];t.onReady(function(){n.reset(),n.add(r)})}}(n,l)}})(),r})(),t.exports=e()},51621:()=>{}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.