tinymce.js 878 KB
Newer Older
JOE XMG's avatar
update  
JOE XMG committed
1
(()=>{var t={8785:()=>{tinymce.IconManager.add("default",{icons:{"accessibility-check":'<svg width="24" height="24"><path d="M12 2a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2c0-1.1.9-2 2-2zm8 7h-5v12c0 .6-.4 1-1 1a1 1 0 01-1-1v-5c0-.6-.4-1-1-1a1 1 0 00-1 1v5c0 .6-.4 1-1 1a1 1 0 01-1-1V9H4a1 1 0 110-2h16c.6 0 1 .4 1 1s-.4 1-1 1z" fill-rule="nonzero"/></svg>',"action-next":'<svg width="24" height="24"><path fill-rule="nonzero" d="M5.7 7.3a1 1 0 00-1.4 1.4l7.7 7.7 7.7-7.7a1 1 0 10-1.4-1.4L12 13.6 5.7 7.3z"/></svg>',"action-prev":'<svg width="24" height="24"><path fill-rule="nonzero" d="M18.3 15.7a1 1 0 001.4-1.4L12 6.6l-7.7 7.7a1 1 0 001.4 1.4L12 9.4l6.3 6.3z"/></svg>',"align-center":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm3 4h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 110-2zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 010-2zm-3-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2z" fill-rule="evenodd"/></svg>',"align-justify":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2z" fill-rule="evenodd"/></svg>',"align-left":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm0 4h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2zm0-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2z" fill-rule="evenodd"/></svg>',"align-none":'<svg width="24" height="24"><path d="M14.2 5L13 7H5a1 1 0 110-2h9.2zm4 0h.8a1 1 0 010 2h-2l1.2-2zm-6.4 4l-1.2 2H5a1 1 0 010-2h6.8zm4 0H19a1 1 0 010 2h-4.4l1.2-2zm-6.4 4l-1.2 2H5a1 1 0 010-2h4.4zm4 0H19a1 1 0 010 2h-6.8l1.2-2zM7 17l-1.2 2H5a1 1 0 010-2h2zm4 0h8a1 1 0 010 2H9.8l1.2-2zm5.2-13.5l1.3.7-9.7 16.3-1.3-.7 9.7-16.3z" fill-rule="evenodd"/></svg>',"align-right":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm6 4h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm-6-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2z" fill-rule="evenodd"/></svg>',"arrow-left":'<svg width="24" height="24"><path d="M5.6 13l12 6a1 1 0 001.4-1V6a1 1 0 00-1.4-.9l-12 6a1 1 0 000 1.8z" fill-rule="evenodd"/></svg>',"arrow-right":'<svg width="24" height="24"><path d="M18.5 13l-12 6A1 1 0 015 18V6a1 1 0 011.4-.9l12 6a1 1 0 010 1.8z" fill-rule="evenodd"/></svg>',bold:'<svg width="24" height="24"><path d="M7.8 19c-.3 0-.5 0-.6-.2l-.2-.5V5.7c0-.2 0-.4.2-.5l.6-.2h5c1.5 0 2.7.3 3.5 1 .7.6 1.1 1.4 1.1 2.5a3 3 0 01-.6 1.9c-.4.6-1 1-1.6 1.2.4.1.9.3 1.3.6s.8.7 1 1.2c.4.4.5 1 .5 1.6 0 1.3-.4 2.3-1.3 3-.8.7-2.1 1-3.8 1H7.8zm5-8.3c.6 0 1.2-.1 1.6-.5.4-.3.6-.7.6-1.3 0-1.1-.8-1.7-2.3-1.7H9.3v3.5h3.4zm.5 6c.7 0 1.3-.1 1.7-.4.4-.4.6-.9.6-1.5s-.2-1-.7-1.4c-.4-.3-1-.4-2-.4H9.4v3.8h4z" fill-rule="evenodd"/></svg>',bookmark:'<svg width="24" height="24"><path d="M6 4v17l6-4 6 4V4c0-.6-.4-1-1-1H7a1 1 0 00-1 1z" fill-rule="nonzero"/></svg>',"border-style":'<svg width="24" height="24"><g fill-rule="evenodd"><rect width="18" height="2" x="3" y="6" rx="1"/><rect width="2.8" height="2" x="3" y="16" rx="1"/><rect width="2.8" height="2" x="6.8" y="16" rx="1"/><rect width="2.8" height="2" x="10.6" y="16" rx="1"/><rect width="2.8" height="2" x="14.4" y="16" rx="1"/><rect width="2.8" height="2" x="18.2" y="16" rx="1"/><rect width="8" height="2" x="3" y="11" rx="1"/><rect width="8" height="2" x="13" y="11" rx="1"/></g></svg>',"border-width":'<svg width="24" height="24"><g fill-rule="evenodd"><rect width="18" height="5" x="3" y="5" rx="1"/><rect width="18" height="3.5" x="3" y="11.5" rx="1"/><rect width="18" height="2" x="3" y="17" rx="1"/></g></svg>',brightness:'<svg width="24" height="24"><path d="M12 17c.3 0 .5.1.7.3.2.2.3.4.3.7v1c0 .3-.1.5-.3.7a1 1 0 01-.7.3 1 1 0 01-.7-.3 1 1 0 01-.3-.7v-1c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3zm0-10a1 1 0 01-.7-.3A1 1 0 0111 6V5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3.3 0 .5.1.7.3.2.2.3.4.3.7v1c0 .3-.1.5-.3.7a1 1 0 01-.7.3zm7 4c.3 0 .5.1.7.3.2.2.3.4.3.7 0 .3-.1.5-.3.7a1 1 0 01-.7.3h-1a1 1 0 01-.7-.3 1 1 0 01-.3-.7c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h1zM7 12c0 .3-.1.5-.3.7a1 1 0 01-.7.3H5a1 1 0 01-.7-.3A1 1 0 014 12c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h1c.3 0 .5.1.7.3.2.2.3.4.3.7zm10 3.5l.7.8c.2.1.3.4.3.6 0 .3-.1.6-.3.8a1 1 0 01-.8.3 1 1 0 01-.6-.3l-.8-.7a1 1 0 01-.3-.8c0-.2.1-.5.3-.7a1 1 0 011.4 0zm-10-7l-.7-.8a1 1 0 01-.3-.6c0-.3.1-.6.3-.8.2-.2.5-.3.8-.3.2 0 .5.1.7.3l.7.7c.2.2.3.5.3.8 0 .2-.1.5-.3.7a1 1 0 01-.7.3 1 1 0 01-.8-.3zm10 0a1 1 0 01-.8.3 1 1 0 01-.7-.3 1 1 0 01-.3-.7c0-.3.1-.6.3-.8l.8-.7c.1-.2.4-.3.6-.3.3 0 .6.1.8.3.2.2.3.5.3.8 0 .2-.1.5-.3.7l-.7.7zm-10 7c.2-.2.5-.3.8-.3.2 0 .5.1.7.3a1 1 0 010 1.4l-.8.8a1 1 0 01-.6.3 1 1 0 01-.8-.3 1 1 0 01-.3-.8c0-.2.1-.5.3-.6l.7-.8zM12 8a4 4 0 013.7 2.4 4 4 0 010 3.2A4 4 0 0112 16a4 4 0 01-3.7-2.4 4 4 0 010-3.2A4 4 0 0112 8zm0 6.5c.7 0 1.3-.2 1.8-.7.5-.5.7-1.1.7-1.8s-.2-1.3-.7-1.8c-.5-.5-1.1-.7-1.8-.7s-1.3.2-1.8.7c-.5.5-.7 1.1-.7 1.8s.2 1.3.7 1.8c.5.5 1.1.7 1.8.7z" fill-rule="evenodd"/></svg>',browse:'<svg width="24" height="24"><path d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2h-4v-2h4V8H5v10h4v2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm-8 9.4l-2.3 2.3a1 1 0 11-1.4-1.4l4-4a1 1 0 011.4 0l4 4a1 1 0 01-1.4 1.4L13 13.4V20a1 1 0 01-2 0v-6.6z" fill-rule="nonzero"/></svg>',cancel:'<svg width="24" height="24"><path d="M12 4.6a7.4 7.4 0 110 14.8 7.4 7.4 0 010-14.8zM12 3a9 9 0 100 18 9 9 0 000-18zm0 8L14.8 8l1 1.1-2.7 2.8 2.7 2.7-1.1 1.1-2.7-2.7-2.7 2.7-1-1.1 2.6-2.7-2.7-2.7 1-1.1 2.8 2.7z" fill-rule="nonzero"/></svg>',"cell-background-color":'<svg width="24" height="24"><path d="M15.7 2l1.6 1.6-2.7 2.6 5.9 5.8c.7.7.7 1.7 0 2.4l-6.3 6.1a1.7 1.7 0 01-2.4 0l-6.3-6.1c-.7-.7-.7-1.7 0-2.4L15.7 2zM18 12l-4.5-4L9 12h9zM4 16s2 2.4 2 3.8C6 21 5.1 22 4 22s-2-1-2-2.2C2 18.4 4 16 4 16z"/></svg>',"cell-border-color":'<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M5 13v5h2v2H5a2 2 0 01-2-2v-5h2zm8-7V4h6a2 2 0 012 2h-8z" opacity=".2"/><path fill-rule="nonzero" d="M13 4v2H5v7H3V6c0-1.1.9-2 2-2h8zm-2.6 14.1l.1-.1.1.1.2.3.2.2.2.2c.4.6.8 1.2.8 1.7 0 .8-.7 1.5-1.5 1.5S9 21.3 9 20.5c0-.5.4-1.1.8-1.7l.2-.2.2-.2.2-.3z"/><path d="M13 11l-2 2H5v-2h6V6h2z"/><path fill-rule="nonzero" d="M18.4 8l1 1-1.8 1.9 4 4c.5.4.5 1.1 0 1.6l-4.3 4.2a1.2 1.2 0 01-1.6 0l-4.4-4.2c-.4-.5-.4-1.2 0-1.7l7-6.8zm1.6 7l-3-3-3 3h6z"/></g></svg>',"change-case":'<svg width="24" height="24"><path d="M18.4 18.2v-.6c-.5.8-1.3 1.2-2.4 1.2-2.2 0-3.3-1.6-3.3-4.8 0-3.1 1-4.7 3.3-4.7 1.1 0 1.8.3 2.4 1.1v-.6c0-.5.4-.8.8-.8s.8.3.8.8v8.4c0 .5-.4.8-.8.8a.8.8 0 01-.8-.8zm-2-7.4c-1.3 0-1.8.9-1.8 3.2 0 2.4.5 3.3 1.7 3.3 1.3 0 1.8-.9 1.8-3.2 0-2.4-.5-3.3-1.7-3.3zM10 15.7H5.5l-.8 2.6a1 1 0 01-1 .7h-.2a.7.7 0 01-.7-1l4-12a1 1 0 012 0l4 12a.7.7 0 01-.8 1h-.2a1 1 0 01-1-.7l-.8-2.6zm-.3-1.5l-2-6.5-1.9 6.5h3.9z" fill-rule="evenodd"/></svg>',"character-count":'<svg width="24" height="24"><path d="M4 11.5h16v1H4v-1zm4.8-6.8V10H7.7V5.8h-1v-1h2zM11 8.3V9h2v1h-3V7.7l2-1v-.9h-2v-1h3v2.4l-2 1zm6.3-3.4V10h-3.1V9h2.1V8h-2.1V6.8h2.1v-1h-2.1v-1h3.1zM5.8 16.4c0-.5.2-.8.5-1 .2-.2.6-.3 1.2-.3l.8.1c.2 0 .4.2.5.3l.4.4v2.8l.2.3H8.2v-.1-.2l-.6.3H7c-.4 0-.7 0-1-.2a1 1 0 01-.3-.9c0-.3 0-.6.3-.8.3-.2.7-.4 1.2-.4l.6-.2h.3v-.2l-.1-.2a.8.8 0 00-.5-.1 1 1 0 00-.4 0l-.3.4h-1zm2.3.8h-.2l-.2.1-.4.1a1 1 0 00-.4.2l-.2.2.1.3.5.1h.4l.4-.4v-.6zm2-3.4h1.2v1.7l.5-.3h.5c.5 0 .9.1 1.2.5.3.4.5.8.5 1.4 0 .6-.2 1.1-.5 1.5-.3.4-.7.6-1.3.6l-.6-.1-.4-.4v.4h-1.1v-5.4zm1.1 3.3c0 .3 0 .6.2.8a.7.7 0 001.2 0l.2-.8c0-.4 0-.6-.2-.8a.7.7 0 00-.6-.3l-.6.3-.2.8zm6.1-.5c0-.2 0-.3-.2-.4a.8.8 0 00-.5-.2c-.3 0-.5.1-.6.3l-.2.9c0 .3 0 .6.2.8.1.2.3.3.6.3.2 0 .4 0 .5-.2l.2-.4h1.1c0 .5-.3.8-.6 1.1a2 2 0 01-1.3.4c-.5 0-1-.2-1.3-.6a2 2 0 01-.5-1.4c0-.6.1-1.1.5-1.5.3-.4.8-.5 1.4-.5.5 0 1 0 1.2.3.4.3.5.7.5 1.2h-1v-.1z" fill-rule="evenodd"/></svg>',"checklist-rtl":'<svg width="24" height="24"><path d="M5 17h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm14.2 11c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 20c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 010-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 14c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 010-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 8c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 010-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8z" fill-rule="evenodd"/></svg>',checklist:'<svg width="24" height="24"><path d="M11 17h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0-6h8a1 1 0 010 2h-8a1 1 0 010-2zM7.2 16c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 20c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 010-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 14c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 010-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 8c-.2.3-.7.4-1 0L3.8 6.9a.7.7 0 010-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8z" fill-rule="evenodd"/></svg>',checkmark:'<svg width="24" height="24"><path d="M18.2 5.4a1 1 0 011.6 1.2l-8 12a1 1 0 01-1.5.1l-5-5a1 1 0 111.4-1.4l4.1 4.1 7.4-11z" fill-rule="nonzero"/></svg>',"chevron-down":'<svg width="10" height="10"><path d="M8.7 2.2c.3-.3.8-.3 1 0 .4.4.4.9 0 1.2L5.7 7.8c-.3.3-.9.3-1.2 0L.2 3.4a.8.8 0 010-1.2c.3-.3.8-.3 1.1 0L5 6l3.7-3.8z" fill-rule="nonzero"/></svg>',"chevron-left":'<svg width="10" height="10"><path d="M7.8 1.3L4 5l3.8 3.7c.3.3.3.8 0 1-.4.4-.9.4-1.2 0L2.2 5.7a.8.8 0 010-1.2L6.6.2C7 0 7.4 0 7.8.2c.3.3.3.8 0 1.1z" fill-rule="nonzero"/></svg>',"chevron-right":'<svg width="10" height="10"><path d="M2.2 1.3a.8.8 0 010-1c.4-.4.9-.4 1.2 0l4.4 4.1c.3.4.3.9 0 1.2L3.4 9.8c-.3.3-.8.3-1.2 0a.8.8 0 010-1.1L6 5 2.2 1.3z" fill-rule="nonzero"/></svg>',"chevron-up":'<svg width="10" height="10"><path d="M8.7 7.8L5 4 1.3 7.8c-.3.3-.8.3-1 0a.8.8 0 010-1.2l4.1-4.4c.3-.3.9-.3 1.2 0l4.2 4.4c.3.3.3.9 0 1.2-.3.3-.8.3-1.1 0z" fill-rule="nonzero"/></svg>',close:'<svg width="24" height="24"><path d="M17.3 8.2L13.4 12l3.9 3.8a1 1 0 01-1.5 1.5L12 13.4l-3.8 3.9a1 1 0 01-1.5-1.5l3.9-3.8-3.9-3.8a1 1 0 011.5-1.5l3.8 3.9 3.8-3.9a1 1 0 011.5 1.5z" fill-rule="evenodd"/></svg>',"code-sample":'<svg width="24" height="26"><path d="M7.1 11a2.8 2.8 0 01-.8 2 2.8 2.8 0 01.8 2v1.7c0 .3.1.6.4.8.2.3.5.4.8.4.3 0 .4.2.4.4v.8c0 .2-.1.4-.4.4-.7 0-1.4-.3-2-.8-.5-.6-.8-1.3-.8-2V15c0-.3-.1-.6-.4-.8-.2-.3-.5-.4-.8-.4a.4.4 0 01-.4-.4v-.8c0-.2.2-.4.4-.4.3 0 .6-.1.8-.4.3-.2.4-.5.4-.8V9.3c0-.7.3-1.4.8-2 .6-.5 1.3-.8 2-.8.3 0 .4.2.4.4v.8c0 .2-.1.4-.4.4-.3 0-.6.1-.8.4-.3.2-.4.5-.4.8V11zm9.8 0V9.3c0-.3-.1-.6-.4-.8-.2-.3-.5-.4-.8-.4a.4.4 0 01-.4-.4V7c0-.2.1-.4.4-.4.7 0 1.4.3 2 .8.5.6.8 1.3.8 2V11c0 .3.1.6.4.8.2.3.5.4.8.4.2 0 .4.2.4.4v.8c0 .2-.2.4-.4.4-.3 0-.6.1-.8.4-.3.2-.4.5-.4.8v1.7c0 .7-.3 1.4-.8 2-.6.5-1.3.8-2 .8a.4.4 0 01-.4-.4v-.8c0-.2.1-.4.4-.4.3 0 .6-.1.8-.4.3-.2.4-.5.4-.8V15a2.8 2.8 0 01.8-2 2.8 2.8 0 01-.8-2zm-3.3-.4c0 .4-.1.8-.5 1.1-.3.3-.7.5-1.1.5-.4 0-.8-.2-1.1-.5-.4-.3-.5-.7-.5-1.1 0-.5.1-.9.5-1.2.3-.3.7-.4 1.1-.4.4 0 .8.1 1.1.4.4.3.5.7.5 1.2zM12 13c.4 0 .8.1 1.1.5.4.3.5.7.5 1.1 0 1-.1 1.6-.5 2a3 3 0 01-1.1 1c-.4.3-.8.4-1.1.4a.5.5 0 01-.5-.5V17a3 3 0 001-.2l.6-.6c-.6 0-1-.2-1.3-.5-.2-.3-.3-.7-.3-1 0-.5.1-1 .5-1.2.3-.4.7-.5 1.1-.5z" fill-rule="evenodd"/></svg>',"color-levels":'<svg width="24" height="24"><path d="M17.5 11.4A9 9 0 0118 14c0 .5 0 1-.2 1.4 0 .4-.3.9-.5 1.3a6.2 6.2 0 01-3.7 3 5.7 5.7 0 01-3.2 0A5.9 5.9 0 017.6 18a6.2 6.2 0 01-1.4-2.6 6.7 6.7 0 010-2.8c0-.4.1-.9.3-1.3a13.6 13.6 0 012.3-4A20 20 0 0112 4a26.4 26.4 0 013.2 3.4 18.2 18.2 0 012.3 4zm-2 4.5c.4-.7.5-1.4.5-2a7.3 7.3 0 00-1-3.2c.2.6.2 1.2.2 1.9a4.5 4.5 0 01-1.3 3 5.3 5.3 0 01-2.3 1.5 4.9 4.9 0 01-2 .1 4.3 4.3 0 002.4.8 4 4 0 002-.6 4 4 0 001.5-1.5z" fill-rule="evenodd"/></svg>',"color-picker":'<svg width="24" height="24"><path d="M12 3a9 9 0 000 18 1.5 1.5 0 001.1-2.5c-.2-.3-.4-.6-.4-1 0-.8.7-1.5 1.5-1.5H16a5 5 0 005-5c0-4.4-4-8-9-8zm-5.5 9a1.5 1.5 0 110-3 1.5 1.5 0 010 3zm3-4a1.5 1.5 0 110-3 1.5 1.5 0 010 3zm5 0a1.5 1.5 0 110-3 1.5 1.5 0 010 3zm3 4a1.5 1.5 0 110-3 1.5 1.5 0 010 3z" fill-rule="nonzero"/></svg>',"color-swatch-remove-color":'<svg width="24" height="24"><path stroke="#000" stroke-width="2" d="M21 3L3 21" fill-rule="evenodd"/></svg>',"color-swatch":'<svg width="24" height="24"><rect x="3" y="3" width="18" height="18" rx="1" fill-rule="evenodd"/></svg>',"comment-add":'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M9 19l3-2h7c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H5a1 1 0 00-1 1v10c0 .6.4 1 1 1h4v2zm-2 4v-4H5a3 3 0 01-3-3V6a3 3 0 013-3h14a3 3 0 013 3v10a3 3 0 01-3 3h-6.4L7 23z"/><path d="M13 10h2a1 1 0 010 2h-2v2a1 1 0 01-2 0v-2H9a1 1 0 010-2h2V8a1 1 0 012 0v2z"/></g></svg>',comment:'<svg width="24" height="24"><path fill-rule="nonzero" d="M9 19l3-2h7c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H5a1 1 0 00-1 1v10c0 .6.4 1 1 1h4v2zm-2 4v-4H5a3 3 0 01-3-3V6a3 3 0 013-3h14a3 3 0 013 3v10a3 3 0 01-3 3h-6.4L7 23z"/></svg>',contrast:'<svg width="24" height="24"><path d="M12 4a7.8 7.8 0 015.7 2.3A8 8 0 1112 4zm-6 8a6 6 0 006 6V6a6 6 0 00-6 6z" fill-rule="evenodd"/></svg>',copy:'<svg width="24" height="24"><path d="M16 3H6a2 2 0 00-2 2v11h2V5h10V3zm1 4a2 2 0 012 2v10a2 2 0 01-2 2h-7a2 2 0 01-2-2V9c0-1.2.9-2 2-2h7zm0 12V9h-7v10h7z" fill-rule="nonzero"/></svg>',crop:'<svg width="24" height="24"><path d="M17 8v7h2c.6 0 1 .4 1 1s-.4 1-1 1h-2v2c0 .6-.4 1-1 1a1 1 0 01-1-1v-2H7V9H5a1 1 0 110-2h2V5c0-.6.4-1 1-1s1 .4 1 1v2h7l3-3 1 1-3 3zM9 9v5l5-5H9zm1 6h5v-5l-5 5z" fill-rule="evenodd"/></svg>',"cut-column":'<svg width="24" height="24"><path fill-rule="evenodd" d="M7.2 4.5c.9 0 1.6.4 2.2 1A3.7 3.7 0 0110.5 8v.5l1 1 4-4 1-.5a3.3 3.3 0 012 0c.4 0 .7.3 1 .5L17 8h4v13h-6V10l-1.5 1.5.5.5v4l-2.5-2.5-1 1v.5c0 .4 0 .8-.3 1.2-.2.5-.4.9-.8 1.2-.6.7-1.3 1-2.2 1-.8.2-1.5 0-2-.6l-.5-.8-.2-1c0-.4 0-.8.3-1.2A3.9 3.9 0 017 12.7c.5-.2 1-.3 1.5-.2l1-1-1-1c-.5 0-1 0-1.5-.2-.5-.1-1-.4-1.4-.9-.4-.3-.6-.7-.8-1.2L4.5 7c0-.4 0-.7.2-1 0-.3.3-.6.5-.8.5-.5 1.2-.8 2-.7zm12.3 5h-3v10h3v-10zM8 13.8h-.3l-.4.2a2.8 2.8 0 00-.7.4v.1a2.8 2.8 0 00-.6.8l-.1.4v.7l.2.5.5.2h.7a2.6 2.6 0 00.8-.3 2.4 2.4 0 00.7-.7 2.5 2.5 0 00.3-.8 1.5 1.5 0 000-.8 1 1 0 00-.2-.4 1 1 0 00-.5-.2H8zm3.5-3.7c-.4 0-.7.1-1 .4-.3.3-.4.6-.4 1s.1.7.4 1c.3.3.6.4 1 .4s.7-.1 1-.4c.3-.3.4-.6.4-1s-.1-.7-.4-1c-.3-.3-.6-.4-1-.4zM7 5.8h-.4a1 1 0 00-.5.3 1 1 0 00-.2.5v.7a2.5 2.5 0 00.3.8l.2.3h.1l.4.4.4.2.4.1h.7L9 9l.2-.4a1.6 1.6 0 000-.8 2.6 2.6 0 00-.3-.8A2.5 2.5 0 007.7 6l-.4-.1H7z"/></svg>',"cut-row":'<svg width="24" height="24"><path fill-rule="evenodd" d="M22 3v5H9l3 3 2-2h4l-4 4 1 1h.5c.4 0 .8 0 1.2.3.5.2.9.4 1.2.8.7.6 1 1.3 1 2.2.2.8 0 1.5-.6 2l-.8.5-1 .2c-.4 0-.8 0-1.2-.3a3.9 3.9 0 01-2.1-2.2c-.2-.5-.3-1-.2-1.5l-1-1-1 1c0 .5 0 1-.2 1.5-.1.5-.4 1-.9 1.4-.3.4-.7.6-1.2.8l-1.2.3c-.4 0-.7 0-1-.2-.3 0-.6-.3-.8-.5-.5-.5-.8-1.2-.7-2 0-.9.4-1.6 1-2.2A3.7 3.7 0 018.6 14H9l1-1-4-4-.5-1a3.3 3.3 0 010-2c0-.4.3-.7.5-1l2 2V3h14zM8.5 15.3h-.3a2.6 2.6 0 00-.8.4 2.5 2.5 0 00-.9 1.1l-.1.4v.7l.2.5.5.2h.7a2.5 2.5 0 00.8-.3L9 18V18l.4-.4.2-.4.1-.4v-.3-.4a1 1 0 00-.2-.5 1 1 0 00-.4-.2h-.5zm7 0H15a1 1 0 00-.4.3 1 1 0 00-.2.5 1.5 1.5 0 000 .7v.4a2.8 2.8 0 00.5.7h.1a2.8 2.8 0 00.8.6l.4.1h.7l.5-.2.2-.5v-.4-.3a2.6 2.6 0 00-.3-.8 2.4 2.4 0 00-.7-.7 2.5 2.5 0 00-.8-.3h-.3zM12 11.6c-.4 0-.7.1-1 .4-.3.3-.4.6-.4 1s.1.7.4 1c.3.3.6.4 1 .4s.7-.1 1-.4c.3-.3.4-.6.4-1s-.1-.7-.4-1c-.3-.3-.6-.4-1-.4zm8.5-7.1h-11v2h11v-2z"/></svg>',cut:'<svg width="24" height="24"><path d="M18 15c.6.7 1 1.4 1 2.3 0 .8-.2 1.5-.7 2l-.8.5-1 .2c-.4 0-.8 0-1.2-.3a3.9 3.9 0 01-2.1-2.2c-.2-.5-.3-1-.2-1.5l-1-1-1 1c0 .5 0 1-.2 1.5-.1.5-.4 1-.9 1.4-.3.4-.7.6-1.2.8l-1.2.3c-.4 0-.7 0-1-.2-.3 0-.6-.3-.8-.5-.5-.5-.8-1.2-.7-2 0-.9.4-1.6 1-2.2A3.7 3.7 0 018.6 14H9l1-1-4-4-.5-1a3.3 3.3 0 010-2c0-.4.3-.7.5-1l6 6 6-6 .5 1a3.3 3.3 0 010 2c0 .4-.3.7-.5 1l-4 4 1 1h.5c.4 0 .8 0 1.2.3.5.2.9.4 1.2.8zm-8.5 2.2l.1-.4v-.3-.4a1 1 0 00-.2-.5 1 1 0 00-.4-.2 1.6 1.6 0 00-.8 0 2.6 2.6 0 00-.8.3 2.5 2.5 0 00-.9 1.1l-.1.4v.7l.2.5.5.2h.7a2.5 2.5 0 00.8-.3 2.8 2.8 0 001-1zm2.5-2.8c.4 0 .7-.1 1-.4.3-.3.4-.6.4-1s-.1-.7-.4-1c-.3-.3-.6-.4-1-.4s-.7.1-1 .4c-.3.3-.4.6-.4 1s.1.7.4 1c.3.3.6.4 1 .4zm5.4 4l.2-.5v-.4-.3a2.6 2.6 0 00-.3-.8 2.4 2.4 0 00-.7-.7 2.5 2.5 0 00-.8-.3 1.5 1.5 0 00-.8 0 1 1 0 00-.4.2 1 1 0 00-.2.5 1.5 1.5 0 000 .7v.4l.3.4.3.4a2.8 2.8 0 00.8.5l.4.1h.7l.5-.2z" fill-rule="evenodd"/></svg>',"document-properties":'<svg width="24" height="24"><path d="M14.4 3H7a2 2 0 00-2 2v14c0 1.1.9 2 2 2h10a2 2 0 002-2V7.6L14.4 3zM17 19H7V5h6v4h4v10z" fill-rule="nonzero"/></svg>',drag:'<svg width="24" height="24"><path d="M13 5h2v2h-2V5zm0 4h2v2h-2V9zM9 9h2v2H9V9zm4 4h2v2h-2v-2zm-4 0h2v2H9v-2zm0 4h2v2H9v-2zm4 0h2v2h-2v-2zM9 5h2v2H9V5z" fill-rule="evenodd"/></svg>',"duplicate-column":'<svg width="24" height="24"><path d="M17 6v16h-7V6h7zm-2 2h-3v12h3V8zm-2-6v2H8v15H6V2h7z"/></svg>',"duplicate-row":'<svg width="24" height="24"><path d="M22 11v7H6v-7h16zm-2 2H8v3h12v-3zm-1-6v2H4v5H2V7h17z"/></svg>',duplicate:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M16 3v2H6v11H4V5c0-1.1.9-2 2-2h10zm3 8h-2V9h-7v10h9a2 2 0 01-2 2h-7a2 2 0 01-2-2V9c0-1.2.9-2 2-2h7a2 2 0 012 2v2z"/><path d="M17 14h1a1 1 0 010 2h-1v1a1 1 0 01-2 0v-1h-1a1 1 0 010-2h1v-1a1 1 0 012 0v1z"/></g></svg>',"edit-block":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19.8 8.8l-9.4 9.4c-.2.2-.5.4-.9.4l-5.4 1.2 1.2-5.4.5-.8 9.4-9.4c.7-.7 1.8-.7 2.5 0l2.1 2.1c.7.7.7 1.8 0 2.5zm-2-.2l1-.9v-.3l-2.2-2.2a.3.3 0 00-.3 0l-1 1L18 8.5zm-1 1l-2.5-2.4-6 6 2.5 2.5 6-6zm-7 7.1l-2.6-2.4-.3.3-.1.2-.7 3 3.1-.6h.1l.4-.5z"/></svg>',"edit-image":'<svg width="24" height="24"><path d="M18 16h2V7a2 2 0 00-2-2H7v2h11v9zM6 17h15a1 1 0 010 2h-1v1a1 1 0 01-2 0v-1H6a2 2 0 01-2-2V7H3a1 1 0 110-2h1V4a1 1 0 112 0v13zm3-5.3l1.3 2 3-4.7 3.7 6H7l2-3.3z" fill-rule="nonzero"/></svg>',"embed-page":'<svg width="24" height="24"><path d="M19 6V5H5v14h2A13 13 0 0119 6zm0 1.4c-.8.8-1.6 2.4-2.2 4.6H19V7.4zm0 5.6h-2.4c-.4 1.8-.6 3.8-.6 6h3v-6zm-4 6c0-2.2.2-4.2.6-6H13c-.7 1.8-1.1 3.8-1.1 6h3zm-4 0c0-2.2.4-4.2 1-6H9.6A12 12 0 008 19h3zM4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 01-1-1V4c0-.6.4-1 1-1zm11.8 9c.4-1.9 1-3.4 1.8-4.5a9.2 9.2 0 00-4 4.5h2.2zm-3.4 0a12 12 0 012.8-4 12 12 0 00-5 4h2.2z" fill-rule="nonzero"/></svg>',embed:'<svg width="24" height="24"><path d="M4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 01-1-1V4c0-.6.4-1 1-1zm1 2v14h14V5H5zm4.8 2.6l5.6 4a.5.5 0 010 .8l-5.6 4A.5.5 0 019 16V8a.5.5 0 01.8-.4z" fill-rule="nonzero"/></svg>',emoji:'<svg width="24" height="24"><path d="M9 11c.6 0 1-.4 1-1s-.4-1-1-1a1 1 0 00-1 1c0 .6.4 1 1 1zm6 0c.6 0 1-.4 1-1s-.4-1-1-1a1 1 0 00-1 1c0 .6.4 1 1 1zm-3 5.5c2.1 0 4-1.5 4.4-3.5H7.6c.5 2 2.3 3.5 4.4 3.5zM12 4a8 8 0 100 16 8 8 0 000-16zm0 14.5a6.5 6.5 0 110-13 6.5 6.5 0 010 13z" fill-rule="nonzero"/></svg>',export:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M14.4 3L18 7v1h-5V5H7v14h9a1 1 0 012 0c0 1-.8 2-1.9 2H7c-1 0-2-.8-2-1.9V5c0-1 .8-2 1.9-2h7.5z"/><path d="M18.1 12c.5 0 .9.4.9 1 0 .5-.3 1-.8 1h-7.3c-.5 0-.9-.4-.9-1 0-.5.3-1 .8-1h7.3z"/><path d="M16.4 9.2a1 1 0 011.4.2l2.4 3.6-2.4 3.6a1 1 0 01-1.7-1v-.2l1.7-2.4-1.6-2.4a1 1 0 01.2-1.4z"/></g></svg>',fill:'<svg width="24" height="26"><path d="M16.6 12l-9-9-1.4 1.4 2.4 2.4-5.2 5.1c-.5.6-.5 1.6 0 2.2L9 19.6a1.5 1.5 0 002.2 0l5.5-5.5c.5-.6.5-1.6 0-2.2zM5.2 13L10 8.2l4.8 4.8H5.2zM19 14.5s-2 2.2-2 3.5c0 1.1.9 2 2 2a2 2 0 002-2c0-1.3-2-3.5-2-3.5z" fill-rule="nonzero"/></svg>',"flip-horizontally":'<svg width="24" height="24"><path d="M14 19h2v-2h-2v2zm4-8h2V9h-2v2zM4 7v10c0 1.1.9 2 2 2h3v-2H6V7h3V5H6a2 2 0 00-2 2zm14-2v2h2a2 2 0 00-2-2zm-7 16h2V3h-2v18zm7-6h2v-2h-2v2zm-4-8h2V5h-2v2zm4 12a2 2 0 002-2h-2v2z" fill-rule="nonzero"/></svg>',"flip-vertically":'<svg width="24" height="24"><path d="M5 14v2h2v-2H5zm8 4v2h2v-2h-2zm4-14H7a2 2 0 00-2 2v3h2V6h10v3h2V6a2 2 0 00-2-2zm2 14h-2v2a2 2 0 002-2zM3 11v2h18v-2H3zm6 7v2h2v-2H9zm8-4v2h2v-2h-2zM5 18c0 1.1.9 2 2 2v-2H5z" fill-rule="nonzero"/></svg>',"format-painter":'<svg width="24" height="24"><path d="M18 5V4c0-.5-.4-1-1-1H5a1 1 0 00-1 1v4c0 .6.5 1 1 1h12c.6 0 1-.4 1-1V7h1v4H9v9c0 .6.4 1 1 1h2c.6 0 1-.4 1-1v-7h8V5h-3z" fill-rule="nonzero"/></svg>',format:'<svg width="24" height="24"><path fill-rule="evenodd" d="M17 5a1 1 0 010 2h-4v11a1 1 0 01-2 0V7H7a1 1 0 110-2h10z"/></svg>',fullscreen:'<svg width="24" height="24"><path d="M15.3 10l-1.2-1.3 2.9-3h-2.3a.9.9 0 110-1.7H19c.5 0 .9.4.9.9v4.4a.9.9 0 11-1.8 0V7l-2.9 3zm0 4l3 3v-2.3a.9.9 0 111.7 0V19c0 .5-.4.9-.9.9h-4.4a.9.9 0 110-1.8H17l-3-2.9 1.3-1.2zM10 15.4l-2.9 3h2.3a.9.9 0 110 1.7H5a.9.9 0 01-.9-.9v-4.4a.9.9 0 111.8 0V17l2.9-3 1.2 1.3zM8.7 10L5.7 7v2.3a.9.9 0 01-1.7 0V5c0-.5.4-.9.9-.9h4.4a.9.9 0 010 1.8H7l3 2.9-1.3 1.2z" fill-rule="nonzero"/></svg>',gallery:'<svg width="24" height="24"><path fill-rule="nonzero" d="M5 15.7l2.3-2.2c.3-.3.7-.3 1 0L11 16l5.1-5c.3-.4.8-.4 1 0l2 1.9V8H5v7.7zM5 18V19h3l1.8-1.9-2-2L5 17.9zm14-3l-2.5-2.4-6.4 6.5H19v-4zM4 6h16c.6 0 1 .4 1 1v13c0 .6-.4 1-1 1H4a1 1 0 01-1-1V7c0-.6.4-1 1-1zm6 7a2 2 0 110-4 2 2 0 010 4zM4.5 4h15a.5.5 0 110 1h-15a.5.5 0 010-1zm2-2h11a.5.5 0 110 1h-11a.5.5 0 010-1z"/></svg>',gamma:'<svg width="24" height="24"><path d="M4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 01-1-1V4c0-.6.4-1 1-1zm1 2v14h14V5H5zm6.5 11.8V14L9.2 8.7a5.1 5.1 0 00-.4-.8l-.1-.2H8 8v-1l.3-.1.3-.1h.7a1 1 0 01.6.5l.1.3a8.5 8.5 0 01.3.6l1.9 4.6 2-5.2a1 1 0 011-.6.5.5 0 01.5.6L13 14v2.8a.7.7 0 01-1.4 0z" fill-rule="nonzero"/></svg>',help:'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M12 5.5a6.5 6.5 0 00-6 9 6.3 6.3 0 001.4 2l1 1a6.3 6.3 0 003.6 1 6.5 6.5 0 006-9 6.3 6.3 0 00-1.4-2l-1-1a6.3 6.3 0 00-3.6-1zM12 4a7.8 7.8 0 015.7 2.3A8 8 0 1112 4z"/><path d="M9.6 9.7a.7.7 0 01-.7-.8c0-1.1 1.5-1.8 3.2-1.8 1.8 0 3.2.8 3.2 2.4 0 1.4-.4 2.1-1.5 2.8-.2 0-.3.1-.3.2a2 2 0 00-.8.8.8.8 0 01-1.4-.6c.3-.7.8-1 1.3-1.5l.4-.2c.7-.4.8-.6.8-1.5 0-.5-.6-.9-1.7-.9-.5 0-1 .1-1.4.3-.2 0-.3.1-.3.2v-.2c0 .4-.4.8-.8.8z" fill-rule="nonzero"/><circle cx="12" cy="16" r="1"/></g></svg>',"highlight-bg-color":'<svg width="24" height="24"><g fill-rule="evenodd"><path id="tox-icon-highlight-bg-color__color" d="M3 18h18v3H3z"/><path fill-rule="nonzero" d="M7.7 16.7H3l3.3-3.3-.7-.8L10.2 8l4 4.1-4 4.2c-.2.2-.6.2-.8 0l-.6-.7-1.1 1.1zm5-7.5L11 7.4l3-2.9a2 2 0 012.6 0L18 6c.7.7.7 2 0 2.7l-2.9 2.9-1.8-1.8-.5-.6"/></g></svg>',home:'<svg width="24" height="24"><path fill-rule="nonzero" d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/></svg>',"horizontal-rule":'<svg width="24" height="24"><path d="M4 11h16v2H4z" fill-rule="evenodd"/></svg>',"image-options":'<svg width="24" height="24"><path d="M6 10a2 2 0 00-2 2c0 1.1.9 2 2 2a2 2 0 002-2 2 2 0 00-2-2zm12 0a2 2 0 00-2 2c0 1.1.9 2 2 2a2 2 0 002-2 2 2 0 00-2-2zm-6 0a2 2 0 00-2 2c0 1.1.9 2 2 2a2 2 0 002-2 2 2 0 00-2-2z" fill-rule="nonzero"/></svg>',image:'<svg width="24" height="24"><path d="M5 15.7l3.3-3.2c.3-.3.7-.3 1 0L12 15l4.1-4c.3-.4.8-.4 1 0l2 1.9V5H5v10.7zM5 18V19h3l2.8-2.9-2-2L5 17.9zm14-3l-2.5-2.4-6.4 6.5H19v-4zM4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 01-1-1V4c0-.6.4-1 1-1zm6 8a2 2 0 100-4 2 2 0 000 4z" fill-rule="nonzero"/></svg>',indent:'<svg width="24" height="24"><path d="M7 5h12c.6 0 1 .4 1 1s-.4 1-1 1H7a1 1 0 110-2zm5 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 010-2zm0 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 010-2zm-5 4h12a1 1 0 010 2H7a1 1 0 010-2zm-2.6-3.8L6.2 12l-1.8-1.2a1 1 0 011.2-1.6l3 2a1 1 0 010 1.6l-3 2a1 1 0 11-1.2-1.6z" fill-rule="evenodd"/></svg>',info:'<svg width="24" height="24"><path d="M12 4a7.8 7.8 0 015.7 2.3A8 8 0 1112 4zm-1 3v2h2V7h-2zm3 10v-1h-1v-5h-3v1h1v4h-1v1h4z" fill-rule="evenodd"/></svg>',"insert-character":'<svg width="24" height="24"><path d="M15 18h4l1-2v4h-6v-3.3l1.4-1a6 6 0 001.8-2.9 6.3 6.3 0 00-.1-4.1 5.8 5.8 0 00-3-3.2c-.6-.3-1.3-.5-2.1-.5a5.1 5.1 0 00-3.9 1.8 6.3 6.3 0 00-1.3 6 6.2 6.2 0 001.8 3l1.4.9V20H4v-4l1 2h4v-.5l-2-1L5.4 15A6.5 6.5 0 014 11c0-1 .2-1.9.6-2.7A7 7 0 016.3 6C7.1 5.4 8 5 9 4.5c1-.3 2-.5 3.1-.5a8.8 8.8 0 015.7 2 7 7 0 011.7 2.3 6 6 0 01.2 4.8c-.2.7-.6 1.3-1 1.9a7.6 7.6 0 01-3.6 2.5v.5z" fill-rule="evenodd"/></svg>',"insert-time":'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M12 19a7 7 0 100-14 7 7 0 000 14zm0 2a9 9 0 110-18 9 9 0 010 18z"/><path d="M16 12h-3V7c0-.6-.4-1-1-1a1 1 0 00-1 1v7h5c.6 0 1-.4 1-1s-.4-1-1-1z"/></g></svg>',invert:'<svg width="24" height="24"><path d="M18 19.3L16.5 18a5.8 5.8 0 01-3.1 1.9 6.1 6.1 0 01-5.5-1.6A5.8 5.8 0 016 14v-.3l.1-1.2A13.9 13.9 0 017.7 9l-3-3 .7-.8 2.8 2.9 9 8.9 1.5 1.6-.7.6zm0-5.5v.3l-.1 1.1-.4 1-1.2-1.2a4.3 4.3 0 00.2-1v-.2c0-.4 0-.8-.2-1.3l-.5-1.4a14.8 14.8 0 00-3-4.2L12 6a26.1 26.1 0 00-2.2 2.5l-1-1a20.9 20.9 0 012.9-3.3L12 4l1 .8a22.2 22.2 0 014 5.4c.6 1.2 1 2.4 1 3.6z" fill-rule="evenodd"/></svg>',italic:'<svg width="24" height="24"><path d="M16.7 4.7l-.1.9h-.3c-.6 0-1 0-1.4.3-.3.3-.4.6-.5 1.1l-2.1 9.8v.6c0 .5.4.8 1.4.8h.2l-.2.8H8l.2-.8h.2c1.1 0 1.8-.5 2-1.5l2-9.8.1-.5c0-.6-.4-.8-1.4-.8h-.3l.2-.9h5.8z" fill-rule="evenodd"/></svg>',language:'<svg width="24" height="24"><path d="M12 3a9 9 0 110 18 9 9 0 010-18zm4.3 13.3c-.5 1-1.2 2-2 2.9a7.5 7.5 0 003.2-2.1l-.2-.2a6 6 0 00-1-.6zm-8.6 0c-.5.2-.9.5-1.2.8.9 1 2 1.7 3.2 2a10 10 0 01-2-2.8zm3.6-.8c-.8 0-1.6.1-2.2.3.5 1 1.2 1.9 2.1 2.7zm1.5 0v3c.9-.8 1.6-1.7 2.1-2.7-.6-.2-1.4-.3-2.1-.3zm-6-2.7H4.5c.2 1 .5 2.1 1 3h.3l1.3-1a10 10 0 01-.3-2zm12.7 0h-2.3c0 .7-.1 1.4-.3 2l1.6 1.1c.5-1 .9-2 1-3.1zm-3.8 0h-3V14c1 0 2 .1 2.7.4.2-.5.3-1 .3-1.6zm-4.4 0h-3l.3 1.6c.8-.3 1.7-.4 2.7-.4v-1.3zm-5.5-5c-.7 1-1.1 2.2-1.3 3.5h2.3c0-1 .2-1.8.5-2.6l-1.5-1zm2.9 1.4v.1c-.2.6-.4 1.3-.4 2h3V9.4c-1 0-1.8-.1-2.6-.3zm6.6 0h-.1l-2.4.3v1.8h3l-.5-2.1zm3-1.4l-.3.1-1.3.8c.3.8.5 1.6.5 2.6h2.3a7.5 7.5 0 00-1.3-3.5zm-9 0l2 .2V5.5a9 9 0 00-2 2.2zm3.5-2.3V8c.6 0 1.3 0 1.9-.2a9 9 0 00-2-2.3zm-3-.7h-.1c-1.1.4-2.1 1-3 1.8l1.2.7a10 10 0 011.9-2.5zm4.4 0l.1.1a10 10 0 011.8 2.4l1.1-.7a7.5 7.5 0 00-3-1.8z"/></svg>',"line-height":'<svg width="24" height="24"><path d="M21 5a1 1 0 01.1 2H13a1 1 0 01-.1-2H21zm0 4a1 1 0 01.1 2H13a1 1 0 01-.1-2H21zm0 4a1 1 0 01.1 2H13a1 1 0 01-.1-2H21zm0 4a1 1 0 01.1 2H13a1 1 0 01-.1-2H21zM7 3.6l3.7 3.7a1 1 0 01-1.3 1.5h-.1L8 7.3v9.2l1.3-1.3a1 1 0 011.3 0h.1c.4.4.4 1 0 1.3v.1L7 20.4l-3.7-3.7a1 1 0 011.3-1.5h.1L6 16.7V7.4L4.7 8.7a1 1 0 01-1.3 0h-.1a1 1 0 010-1.3v-.1L7 3.6z"/></svg>',line:'<svg width="24" height="24"><path d="M15 9l-8 8H4v-3l8-8 3 3zm1-1l-3-3 1-1h1c-.2 0 0 0 0 0l2 2s0 .2 0 0v1l-1 1zM4 18h16v2H4v-2z" fill-rule="evenodd"/></svg>',link:'<svg width="24" height="24"><path d="M6.2 12.3a1 1 0 011.4 1.4l-2.1 2a2 2 0 102.7 2.8l4.8-4.8a1 1 0 000-1.4 1 1 0 111.4-1.3 2.9 2.9 0 010 4L9.6 20a3.9 3.9 0 01-5.5-5.5l2-2zm11.6-.6a1 1 0 01-1.4-1.4l2-2a2 2 0 10-2.6-2.8L11 10.3a1 1 0 000 1.4A1 1 0 119.6 13a2.9 2.9 0 010-4L14.4 4a3.9 3.9 0 015.5 5.5l-2 2z" fill-rule="nonzero"/></svg>',"list-bull-circle":'<svg width="48" height="48"><g fill-rule="evenodd"><path d="M11 16a2 2 0 100-4 2 2 0 000 4zm0 1a3 3 0 110-6 3 3 0 010 6zM11 26a2 2 0 100-4 2 2 0 000 4zm0 1a3 3 0 110-6 3 3 0 010 6zM11 36a2 2 0 100-4 2 2 0 000 4zm0 1a3 3 0 110-6 3 3 0 010 6z" fill-rule="nonzero"/><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/></g></svg>',"list-bull-default":'<svg width="48" height="48"><g fill-rule="evenodd"><circle cx="11" cy="14" r="3"/><circle cx="11" cy="24" r="3"/><circle cx="11" cy="34" r="3"/><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/></g></svg>',"list-bull-square":'<svg width="48" height="48"><g fill-rule="evenodd"><path d="M8 11h6v6H8zM8 21h6v6H8zM8 31h6v6H8z"/><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/></g></svg>',"list-num-default-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M37.4 17v-4.8l-1.6 1v-1.1l1.6-1h1.2V17zM33.3 17.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm1.7 5.7c0-1.2 1-2 2.2-2 1.3 0 2.1.8 2.1 1.8 0 .7-.3 1.2-1.3 2.2l-1.2 1v.2h2.6v1h-4.3v-.9l2-1.9c.8-.8 1-1.1 1-1.5 0-.5-.4-.8-1-.8-.5 0-.9.3-.9.9H35zm-1.7 4.3c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm3.2 7.3v-1h.7c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7s-1 .3-1 .8H35c0-1.1 1-1.8 2.2-1.8 1.2 0 2.1.6 2.1 1.6 0 .7-.4 1.2-1 1.3v.1c.7.1 1.3.7 1.3 1.4 0 1-1 1.9-2.4 1.9-1.3 0-2.2-.8-2.3-2h1.2c0 .6.5 1 1.1 1 .6 0 1-.4 1-1 0-.5-.3-.8-1-.8h-.7zm-3.3 2.7c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7z"/></g></svg>',"list-num-default":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10 17v-4.8l-1.5 1v-1.1l1.6-1h1.2V17h-1.2zm3.6.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zm-5 5.7c0-1.2.8-2 2.1-2s2.1.8 2.1 1.8c0 .7-.3 1.2-1.4 2.2l-1.1 1v.2h2.6v1H8.6v-.9l2-1.9c.8-.8 1-1.1 1-1.5 0-.5-.4-.8-1-.8-.5 0-.9.3-.9.9H8.5zm6.3 4.3c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zM10 34.4v-1h.7c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7s-1 .3-1 .8H8.6c0-1.1 1-1.8 2.2-1.8 1.3 0 2.1.6 2.1 1.6 0 .7-.4 1.2-1 1.3v.1c.8.1 1.3.7 1.3 1.4 0 1-1 1.9-2.4 1.9-1.3 0-2.2-.8-2.3-2h1.2c0 .6.5 1 1.1 1 .7 0 1-.4 1-1 0-.5-.3-.8-1-.8h-.7zm4.7 2.7c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7z"/></g></svg>',"list-num-lower-alpha-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M36.5 16c-.9 0-1.5-.5-1.5-1.3s.6-1.3 1.8-1.4h1v-.4c0-.4-.2-.6-.7-.6-.4 0-.7.1-.8.4h-1.1c0-.8.8-1.4 2-1.4S39 12 39 13V16h-1.2v-.6c-.3.4-.8.7-1.4.7zm.4-.8c.6 0 1-.4 1-.9V14h-1c-.5.1-.7.3-.7.6 0 .4.3.6.7.6zM33.1 16.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7zM37.7 26c-.7 0-1.2-.2-1.5-.7v.7H35v-6.3h1.2v2.5c.3-.5.8-.9 1.5-.9 1.1 0 1.8 1 1.8 2.4 0 1.5-.7 2.4-1.8 2.4zm-.5-3.6c-.6 0-1 .5-1 1.3s.4 1.4 1 1.4c.7 0 1-.6 1-1.4 0-.8-.3-1.3-1-1.3zM33.2 26.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7zm6 7h-1c-.1-.5-.4-.8-1-.8s-1 .5-1 1.4c0 1 .4 1.4 1 1.4.5 0 .9-.2 1-.7h1c0 1-.8 1.7-2 1.7-1.4 0-2.2-.9-2.2-2.4s.8-2.4 2.2-2.4c1.2 0 2 .7 2 1.7zm-6.1 3c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-lower-alpha":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10.3 15.2c.5 0 1-.4 1-.9V14h-1c-.5.1-.8.3-.8.6 0 .4.3.6.8.6zm-.4.9c-1 0-1.5-.6-1.5-1.4 0-.8.6-1.3 1.7-1.4h1.1v-.4c0-.4-.2-.6-.7-.6-.5 0-.8.1-.9.4h-1c0-.8.8-1.4 2-1.4 1.1 0 1.8.6 1.8 1.6V16h-1.1v-.6h-.1c-.2.4-.7.7-1.3.7zm4.6 0c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm-3.2 10c-.6 0-1.2-.3-1.4-.8v.7H8.5v-6.3H10v2.5c.3-.5.8-.9 1.4-.9 1.2 0 1.9 1 1.9 2.4 0 1.5-.7 2.4-1.9 2.4zm-.4-3.7c-.7 0-1 .5-1 1.3s.3 1.4 1 1.4c.6 0 1-.6 1-1.4 0-.8-.4-1.3-1-1.3zm4 3.7c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm-2.2 7h-1.2c0-.5-.4-.8-.9-.8-.6 0-1 .5-1 1.4 0 1 .4 1.4 1 1.4.5 0 .8-.2 1-.7h1c0 1-.8 1.7-2 1.7-1.4 0-2.2-.9-2.2-2.4s.8-2.4 2.2-2.4c1.2 0 2 .7 2 1.7zm1.8 3c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-lower-greek-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M37.4 16c-1.2 0-2-.8-2-2.3 0-1.5.8-2.4 2-2.4.6 0 1 .4 1.3 1v-.9H40v3.2c0 .4.1.5.4.5h.2v.9h-.6c-.6 0-1-.2-1-.7h-.2c-.2.4-.7.8-1.3.8zm.3-1c.6 0 1-.5 1-1.3s-.4-1.3-1-1.3-1 .5-1 1.3.4 1.4 1 1.4zM33.3 16.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zM36 21.9c0-1.5.8-2.3 2.1-2.3 1.2 0 2 .6 2 1.6 0 .6-.3 1-.9 1.3.9.3 1.3.8 1.3 1.7 0 1.2-.7 1.9-1.8 1.9-.6 0-1.1-.3-1.4-.8v2.2H36V22zm1.8 1.2v-1h.3c.5 0 .9-.2.9-.7 0-.5-.3-.8-.9-.8-.5 0-.8.3-.8 1v2.2c0 .8.4 1.3 1 1.3s1-.4 1-1-.4-1-1.2-1h-.3zM33.3 26.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zM37.1 34.6L34.8 30h1.4l1.7 3.5 1.7-3.5h1.1l-2.2 4.6v.1c.5.8.7 1.4.7 1.8 0 .4-.2.8-.4 1-.2.2-.6.3-1 .3-.9 0-1.3-.4-1.3-1.2 0-.5.2-1 .5-1.7l.1-.2zm.7 1a2 2 0 00-.4.9c0 .3.1.4.4.4.3 0 .4-.1.4-.4 0-.2-.1-.6-.4-1zM33.3 36.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-lower-greek":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10.5 15c.7 0 1-.5 1-1.3s-.3-1.3-1-1.3c-.5 0-.9.5-.9 1.3s.4 1.4 1 1.4zm-.3 1c-1.1 0-1.8-.8-1.8-2.3 0-1.5.7-2.4 1.8-2.4.7 0 1.1.4 1.3 1h.1v-.9h1.2v3.2c0 .4.1.5.4.5h.2v.9h-.6c-.6 0-1-.2-1.1-.7h-.1c-.2.4-.7.8-1.4.8zm5 .1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7zm-4.9 7v-1h.3c.6 0 1-.2 1-.7 0-.5-.4-.8-1-.8-.5 0-.8.3-.8 1v2.2c0 .8.4 1.3 1.1 1.3.6 0 1-.4 1-1s-.5-1-1.3-1h-.3zM8.6 22c0-1.5.7-2.3 2-2.3 1.2 0 2 .6 2 1.6 0 .6-.3 1-.8 1.3.8.3 1.3.8 1.3 1.7 0 1.2-.8 1.9-1.9 1.9-.6 0-1.1-.3-1.3-.8v2.2H8.5V22zm6.2 4.2c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zm-4.5 8.5L8 30h1.4l1.7 3.5 1.7-3.5h1.1l-2.2 4.6v.1c.5.8.7 1.4.7 1.8 0 .4-.1.8-.4 1-.2.2-.6.3-1 .3-.9 0-1.3-.4-1.3-1.2 0-.5.2-1 .5-1.7l.1-.2zm.7 1a2 2 0 00-.4.9c0 .3.1.4.4.4.3 0 .4-.1.4-.4 0-.2-.1-.6-.4-1zm4.5.5c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-lower-roman-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M32.9 16v-1.2h-1.3V16H33zm0 10v-1.2h-1.3V26H33zm0 10v-1.2h-1.3V36H33z"/><path fill-rule="nonzero" d="M36 21h-1.5v5H36zM36 31h-1.5v5H36zM39 21h-1.5v5H39zM39 31h-1.5v5H39zM42 31h-1.5v5H42zM36 11h-1.5v5H36zM36 19h-1.5v1H36zM36 29h-1.5v1H36zM39 19h-1.5v1H39zM39 29h-1.5v1H39zM42 29h-1.5v1H42zM36 9h-1.5v1H36z"/></g></svg>',"list-num-lower-roman":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M15.1 16v-1.2h1.3V16H15zm0 10v-1.2h1.3V26H15zm0 10v-1.2h1.3V36H15z"/><path fill-rule="nonzero" d="M12 21h1.5v5H12zM12 31h1.5v5H12zM9 21h1.5v5H9zM9 31h1.5v5H9zM6 31h1.5v5H6zM12 11h1.5v5H12zM12 19h1.5v1H12zM12 29h1.5v1H12zM9 19h1.5v1H9zM9 29h1.5v1H9zM6 29h1.5v1H6zM12 9h1.5v1H12z"/></g></svg>',"list-num-upper-alpha-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M39.3 17l-.5-1.4h-2l-.5 1.4H35l2-6h1.6l2 6h-1.3zm-1.6-4.7l-.7 2.3h1.6l-.8-2.3zM33.4 17c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zm4.7 9.9h-2.7v-6H38c1.2 0 1.9.6 1.9 1.5 0 .6-.5 1.2-1 1.3.7.1 1.3.7 1.3 1.5 0 1-.8 1.7-2 1.7zm-1.4-5v1.5h1c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7h-1zm0 4h1.1c.7 0 1.1-.3 1.1-.8 0-.6-.4-.9-1.1-.9h-1.1V26zM33 27.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm4.9 10c-1.8 0-2.8-1.1-2.8-3.1s1-3.1 2.8-3.1c1.4 0 2.5.9 2.6 2.2h-1.3c0-.7-.6-1.1-1.3-1.1-1 0-1.6.7-1.6 2s.6 2 1.6 2c.7 0 1.2-.4 1.4-1h1.2c-.1 1.3-1.2 2.2-2.6 2.2zm-4.5 0c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-upper-alpha":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M12.6 17l-.5-1.4h-2L9.5 17H8.3l2-6H12l2 6h-1.3zM11 12.3l-.7 2.3h1.6l-.8-2.3zm4.7 4.8c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zM11.4 27H8.7v-6h2.6c1.2 0 1.9.6 1.9 1.5 0 .6-.5 1.2-1 1.3.7.1 1.3.7 1.3 1.5 0 1-.8 1.7-2 1.7zM10 22v1.5h1c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7h-1zm0 4H11c.7 0 1.1-.3 1.1-.8 0-.6-.4-.9-1.1-.9H10V26zm5.4 1.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm-4.1 10c-1.8 0-2.8-1.1-2.8-3.1s1-3.1 2.8-3.1c1.4 0 2.5.9 2.6 2.2h-1.3c0-.7-.6-1.1-1.3-1.1-1 0-1.6.7-1.6 2s.6 2 1.6 2c.7 0 1.2-.4 1.4-1h1.2c-.1 1.3-1.2 2.2-2.6 2.2zm4.5 0c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-upper-roman-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M31.6 17v-1.2H33V17h-1.3zm0 10v-1.2H33V27h-1.3zm0 10v-1.2H33V37h-1.3z"/><path fill-rule="nonzero" d="M34.5 20H36v7h-1.5zM34.5 30H36v7h-1.5zM37.5 20H39v7h-1.5zM37.5 30H39v7h-1.5zM40.5 30H42v7h-1.5zM34.5 10H36v7h-1.5z"/></g></svg>',"list-num-upper-roman":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M15.1 17v-1.2h1.3V17H15zm0 10v-1.2h1.3V27H15zm0 10v-1.2h1.3V37H15z"/><path fill-rule="nonzero" d="M12 20h1.5v7H12zM12 30h1.5v7H12zM9 20h1.5v7H9zM9 30h1.5v7H9zM6 30h1.5v7H6zM12 10h1.5v7H12z"/></g></svg>',lock:'<svg width="24" height="24"><path d="M16.3 11c.2 0 .3 0 .5.2l.2.6v7.4c0 .3 0 .4-.2.6l-.6.2H7.8c-.3 0-.4 0-.6-.2a.7.7 0 01-.2-.6v-7.4c0-.3 0-.4.2-.6l.5-.2H8V8c0-.8.3-1.5.9-2.1.6-.6 1.3-.9 2.1-.9h2c.8 0 1.5.3 2.1.9.6.6.9 1.3.9 2.1v3h.3zM10 8v3h4V8a1 1 0 00-.3-.7A1 1 0 0013 7h-2a1 1 0 00-.7.3 1 1 0 00-.3.7z" fill-rule="evenodd"/></svg>',ltr:'<svg width="24" height="24"><path d="M11 5h7a1 1 0 010 2h-1v11a1 1 0 01-2 0V7h-2v11a1 1 0 01-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 017.8 10a3.3 3.3 0 010-2.8 3.4 3.4 0 011.8-1.8L11 5zM4.4 16.2L6.2 15l-1.8-1.2a1 1 0 011.2-1.6l3 2a1 1 0 010 1.6l-3 2a1 1 0 11-1.2-1.6z" fill-rule="evenodd"/></svg>',"more-drawer":'<svg width="24" height="24"><path d="M6 10a2 2 0 00-2 2c0 1.1.9 2 2 2a2 2 0 002-2 2 2 0 00-2-2zm12 0a2 2 0 00-2 2c0 1.1.9 2 2 2a2 2 0 002-2 2 2 0 00-2-2zm-6 0a2 2 0 00-2 2c0 1.1.9 2 2 2a2 2 0 002-2 2 2 0 00-2-2z" fill-rule="nonzero"/></svg>',"new-document":'<svg width="24" height="24"><path d="M14.4 3H7a2 2 0 00-2 2v14c0 1.1.9 2 2 2h10a2 2 0 002-2V7.6L14.4 3zM17 19H7V5h6v4h4v10z" fill-rule="nonzero"/></svg>',"new-tab":'<svg width="24" height="24"><path d="M15 13l2-2v8H5V7h8l-2 2H7v8h8v-4zm4-8v5.5l-2-2-5.6 5.5H10v-1.4L15.5 7l-2-2H19z" fill-rule="evenodd"/></svg>',"non-breaking":'<svg width="24" height="24"><path d="M11 11H8a1 1 0 110-2h3V6c0-.6.4-1 1-1s1 .4 1 1v3h3c.6 0 1 .4 1 1s-.4 1-1 1h-3v3c0 .6-.4 1-1 1a1 1 0 01-1-1v-3zm10 4v5H3v-5c0-.6.4-1 1-1s1 .4 1 1v3h14v-3c0-.6.4-1 1-1s1 .4 1 1z" fill-rule="evenodd"/></svg>',notice:'<svg width="24" height="24"><path d="M17.8 9.8L15.4 4 20 8.5v7L15.5 20h-7L4 15.5v-7L8.5 4h7l2.3 5.8zm0 0l2.2 5.7-2.3-5.8zM13 17v-2h-2v2h2zm0-4V7h-2v6h2z" fill-rule="evenodd"/></svg>',"ordered-list-rtl":'<svg width="24" height="24"><path d="M6 17h8a1 1 0 010 2H6a1 1 0 010-2zm0-6h8a1 1 0 010 2H6a1 1 0 010-2zm0-6h8a1 1 0 010 2H6a1 1 0 110-2zm13-1v3.5a.5.5 0 11-1 0V5h-.5a.5.5 0 110-1H19zm-1 8.8l.2.2h1.3a.5.5 0 110 1h-1.6a1 1 0 01-.9-1V13c0-.4.3-.8.6-1l1.2-.4.2-.3a.2.2 0 00-.2-.2h-1.3a.5.5 0 01-.5-.5c0-.3.2-.5.5-.5h1.6c.5 0 .9.4.9 1v.1c0 .4-.3.8-.6 1l-1.2.4-.2.3zm2 4.2v2c0 .6-.4 1-1 1h-1.5a.5.5 0 010-1h1.2a.3.3 0 100-.6h-1.3a.4.4 0 110-.8h1.3a.3.3 0 000-.6h-1.2a.5.5 0 110-1H19c.6 0 1 .4 1 1z" fill-rule="evenodd"/></svg>',"ordered-list":'<svg width="24" height="24"><path d="M10 17h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 110-2zM6 4v3.5c0 .3-.2.5-.5.5a.5.5 0 01-.5-.5V5h-.5a.5.5 0 010-1H6zm-1 8.8l.2.2h1.3c.3 0 .5.2.5.5s-.2.5-.5.5H4.9a1 1 0 01-.9-1V13c0-.4.3-.8.6-1l1.2-.4.2-.3a.2.2 0 00-.2-.2H4.5a.5.5 0 01-.5-.5c0-.3.2-.5.5-.5h1.6c.5 0 .9.4.9 1v.1c0 .4-.3.8-.6 1l-1.2.4-.2.3zM7 17v2c0 .6-.4 1-1 1H4.5a.5.5 0 010-1h1.2c.2 0 .3-.1.3-.3 0-.2-.1-.3-.3-.3H4.4a.4.4 0 110-.8h1.3c.2 0 .3-.1.3-.3 0-.2-.1-.3-.3-.3H4.5a.5.5 0 110-1H6c.6 0 1 .4 1 1z" fill-rule="evenodd"/></svg>',orientation:'<svg width="24" height="24"><path d="M7.3 6.4L1 13l6.4 6.5 6.5-6.5-6.5-6.5zM3.7 13l3.6-3.7L11 13l-3.7 3.7-3.6-3.7zM12 6l2.8 2.7c.3.3.3.8 0 1-.3.4-.9.4-1.2 0L9.2 5.7a.8.8 0 010-1.2L13.6.2c.3-.3.9-.3 1.2 0 .3.3.3.8 0 1.1L12 4h1a9 9 0 11-4.3 16.9l1.5-1.5A7 7 0 1013 6h-1z" fill-rule="nonzero"/></svg>',outdent:'<svg width="24" height="24"><path d="M7 5h12c.6 0 1 .4 1 1s-.4 1-1 1H7a1 1 0 110-2zm5 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 010-2zm0 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 010-2zm-5 4h12a1 1 0 010 2H7a1 1 0 010-2zm1.6-3.8a1 1 0 01-1.2 1.6l-3-2a1 1 0 010-1.6l3-2a1 1 0 011.2 1.6L6.8 12l1.8 1.2z" fill-rule="evenodd"/></svg>',"page-break":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M5 11c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 010-2zm3 0h1c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 010-2zm4 0c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 010-2zm3 0h1c.6 0 1 .4 1 1s-.4 1-1 1h-1a1 1 0 010-2zm4 0c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 010-2zM7 3v5h10V3c0-.6.4-1 1-1s1 .4 1 1v7H5V3c0-.6.4-1 1-1s1 .4 1 1zM6 22a1 1 0 01-1-1v-7h14v7c0 .6-.4 1-1 1a1 1 0 01-1-1v-5H7v5c0 .6-.4 1-1 1z"/></g></svg>',paragraph:'<svg width="24" height="24"><path fill-rule="evenodd" d="M10 5h7a1 1 0 010 2h-1v11a1 1 0 01-2 0V7h-2v11a1 1 0 01-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 016.8 10a3.3 3.3 0 010-2.8 3.4 3.4 0 011.8-1.8L10 5z"/></svg>',"paste-column-after":'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 1a3 3 0 012.8 2H18c1 0 2 .8 2 1.9V7h-2V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 01-1-1V5H6v13h7v2H6c-1 0-2-.8-2-1.9V5c0-1 .8-2 1.9-2H9.2A3 3 0 0112 1zm8 7v12h-6V8h6zm-1.5 1.5h-3v9h3v-9zM12 3a1 1 0 100 2 1 1 0 000-2z"/></svg>',"paste-column-before":'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 1a3 3 0 012.8 2H18c1 0 2 .8 2 1.9V18c0 1-.8 2-1.9 2H11v-2h7V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 01-1-1V5H6v2H4V5c0-1 .8-2 1.9-2H9.2A3 3 0 0112 1zm-2 7v12H4V8h6zM8.5 9.5h-3v9h3v-9zM12 3a1 1 0 100 2 1 1 0 000-2z"/></svg>',"paste-row-after":'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 1a3 3 0 012.8 2H18c1 0 2 .8 2 1.9V11h-2V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 01-1-1V5H6v13h14c0 1-.8 2-1.9 2H6c-1 0-2-.8-2-1.9V5c0-1 .8-2 1.9-2H9.2A3 3 0 0112 1zm10 11v5H8v-5h14zm-1.5 1.5h-11v2h11v-2zM12 3a1 1 0 100 2 1 1 0 000-2z"/></svg>',"paste-row-before":'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 1a3 3 0 012.8 2H18c1 0 2 .8 2 1.9V7h-2V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 01-1-1V5H6v13h12v-4h2v4c0 1-.8 2-1.9 2H6c-1 0-2-.8-2-1.9V5c0-1 .8-2 1.9-2H9.2A3 3 0 0112 1zm10 7v5H8V8h14zm-1.5 1.5h-11v2h11v-2zM12 3a1 1 0 100 2 1 1 0 000-2z"/></svg>',"paste-text":'<svg width="24" height="24"><path d="M18 9V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 01-1-1V5H6v13h3V9h9zM9 20H6a2 2 0 01-2-2V5c0-1.1.9-2 2-2h3.2A3 3 0 0112 1a3 3 0 012.8 2H18a2 2 0 012 2v4h1v12H9v-1zm1.5-9.5v9h9v-9h-9zM12 3a1 1 0 00-1 1c0 .5.4 1 1 1s1-.5 1-1-.4-1-1-1zm0 9h6v2h-.5l-.5-1h-1v4h.8v1h-3.6v-1h.8v-4h-1l-.5 1H12v-2z" fill-rule="nonzero"/></svg>',paste:'<svg width="24" height="24"><path d="M18 9V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 01-1-1V5H6v13h3V9h9zM9 20H6a2 2 0 01-2-2V5c0-1.1.9-2 2-2h3.2A3 3 0 0112 1a3 3 0 012.8 2H18a2 2 0 012 2v4h1v12H9v-1zm1.5-9.5v9h9v-9h-9zM12 3a1 1 0 00-1 1c0 .5.4 1 1 1s1-.5 1-1-.4-1-1-1z" fill-rule="nonzero"/></svg>',"permanent-pen":'<svg width="24" height="24"><path d="M10.5 17.5L8 20H3v-3l3.5-3.5a2 2 0 010-3L14 3l1 1-7.3 7.3a1 1 0 000 1.4l3.6 3.6c.4.4 1 .4 1.4 0L20 9l1 1-7.6 7.6a2 2 0 01-2.8 0l-.1-.1z" fill-rule="nonzero"/></svg>',plus:'<svg width="24" height="24"><path d="M12 4c.5 0 1 .4 1 .9V11h6a1 1 0 01.1 2H13v6a1 1 0 01-2 .1V13H5a1 1 0 01-.1-2H11V5c0-.6.4-1 1-1z"/></svg>',preferences:'<svg width="24" height="24"><path d="M20.1 13.5l-1.9.2a5.8 5.8 0 01-.6 1.5l1.2 1.5c.4.4.3 1 0 1.4l-.7.7a1 1 0 01-1.4 0l-1.5-1.2a6.2 6.2 0 01-1.5.6l-.2 1.9c0 .5-.5.9-1 .9h-1a1 1 0 01-1-.9l-.2-1.9a5.8 5.8 0 01-1.5-.6l-1.5 1.2a1 1 0 01-1.4 0l-.7-.7a1 1 0 010-1.4l1.2-1.5a6.2 6.2 0 01-.6-1.5l-1.9-.2a1 1 0 01-.9-1v-1c0-.5.4-1 .9-1l1.9-.2a5.8 5.8 0 01.6-1.5L5.2 7.3a1 1 0 010-1.4l.7-.7a1 1 0 011.4 0l1.5 1.2a6.2 6.2 0 011.5-.6l.2-1.9c0-.5.5-.9 1-.9h1c.5 0 1 .4 1 .9l.2 1.9a5.8 5.8 0 011.5.6l1.5-1.2a1 1 0 011.4 0l.7.7c.3.4.4 1 0 1.4l-1.2 1.5a6.2 6.2 0 01.6 1.5l1.9.2c.5 0 .9.5.9 1v1c0 .5-.4 1-.9 1zM12 15a3 3 0 100-6 3 3 0 000 6z" fill-rule="evenodd"/></svg>',preview:'<svg width="24" height="24"><path d="M3.5 12.5c.5.8 1.1 1.6 1.8 2.3 2 2 4.2 3.2 6.7 3.2s4.7-1.2 6.7-3.2a16.2 16.2 0 002.1-2.8 15.7 15.7 0 00-2.1-2.8c-2-2-4.2-3.2-6.7-3.2a9.3 9.3 0 00-6.7 3.2A16.2 16.2 0 003.2 12c0 .2.2.3.3.5zm-2.4-1l.7-1.2L4 7.8C6.2 5.4 8.9 4 12 4c3 0 5.8 1.4 8.1 3.8a18.2 18.2 0 012.8 3.7v1l-.7 1.2-2.1 2.5c-2.3 2.4-5 3.8-8.1 3.8-3 0-5.8-1.4-8.1-3.8a18.2 18.2 0 01-2.8-3.7 1 1 0 010-1zm12-3.3a2 2 0 102.7 2.6 4 4 0 11-2.6-2.6z" fill-rule="nonzero"/></svg>',print:'<svg width="24" height="24"><path d="M18 8H6a3 3 0 00-3 3v6h2v3h14v-3h2v-6a3 3 0 00-3-3zm-1 10H7v-4h10v4zm.5-5c-.8 0-1.5-.7-1.5-1.5s.7-1.5 1.5-1.5 1.5.7 1.5 1.5-.7 1.5-1.5 1.5zm.5-8H6v2h12V5z" fill-rule="nonzero"/></svg>',quote:'<svg width="24" height="24"><path d="M7.5 17h.9c.4 0 .7-.2.9-.6L11 13V8c0-.6-.4-1-1-1H6a1 1 0 00-1 1v4c0 .6.4 1 1 1h2l-1.3 2.7a1 1 0 00.8 1.3zm8 0h.9c.4 0 .7-.2.9-.6L19 13V8c0-.6-.4-1-1-1h-4a1 1 0 00-1 1v4c0 .6.4 1 1 1h2l-1.3 2.7a1 1 0 00.8 1.3z" fill-rule="nonzero"/></svg>',redo:'<svg width="24" height="24"><path d="M17.6 10H12c-2.8 0-4.4 1.4-4.9 3.5-.4 2 .3 4 1.4 4.6a1 1 0 11-1 1.8c-2-1.2-2.9-4.1-2.3-6.8.6-3 3-5.1 6.8-5.1h5.6l-3.3-3.3a1 1 0 111.4-1.4l5 5a1 1 0 010 1.4l-5 5a1 1 0 01-1.4-1.4l3.3-3.3z" fill-rule="nonzero"/></svg>',reload:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M5 22.1l-1.2-4.7v-.2a1 1 0 011-1l5 .4a1 1 0 11-.2 2l-2.2-.2a7.8 7.8 0 008.4.2 7.5 7.5 0 003.5-6.4 1 1 0 112 0 9.5 9.5 0 01-4.5 8 9.9 9.9 0 01-10.2 0l.4 1.4a1 1 0 11-2 .5zM13.6 7.4c0-.5.5-1 1-.9l2.8.2a8 8 0 00-9.5-1 7.5 7.5 0 00-3.6 7 1 1 0 01-2 0 9.5 9.5 0 014.5-8.6 10 10 0 0110.9.3l-.3-1a1 1 0 012-.5l1.1 4.8a1 1 0 01-1 1.2l-5-.4a1 1 0 01-.9-1z"/></g></svg>',"remove-formatting":'<svg width="24" height="24"><path d="M13.2 6a1 1 0 010 .2l-2.6 10a1 1 0 01-1 .8h-.2a.8.8 0 01-.8-1l2.6-10H8a1 1 0 110-2h9a1 1 0 010 2h-3.8zM5 18h7a1 1 0 010 2H5a1 1 0 010-2zm13 1.5L16.5 18 15 19.5a.7.7 0 01-1-1l1.5-1.5-1.5-1.5a.7.7 0 011-1l1.5 1.5 1.5-1.5a.7.7 0 011 1L17.5 17l1.5 1.5a.7.7 0 01-1 1z" fill-rule="evenodd"/></svg>',remove:'<svg width="24" height="24"><path d="M16 7h3a1 1 0 010 2h-1v9a3 3 0 01-3 3H9a3 3 0 01-3-3V9H5a1 1 0 110-2h3V6a3 3 0 013-3h2a3 3 0 013 3v1zm-2 0V6c0-.6-.4-1-1-1h-2a1 1 0 00-1 1v1h4zm2 2H8v9c0 .6.4 1 1 1h6c.6 0 1-.4 1-1V9zm-7 3a1 1 0 012 0v4a1 1 0 01-2 0v-4zm4 0a1 1 0 012 0v4a1 1 0 01-2 0v-4z" fill-rule="nonzero"/></svg>',"resize-handle":'<svg width="10" height="10"><g fill-rule="nonzero"><path d="M8.1 1.1A.5.5 0 119 2l-7 7A.5.5 0 111 8l7-7zM8.1 5.1A.5.5 0 119 6l-3 3A.5.5 0 115 8l3-3z"/></g></svg>',resize:'<svg width="24" height="24"><path d="M4 5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h6c.3 0 .5.1.7.3.2.2.3.4.3.7 0 .3-.1.5-.3.7a1 1 0 01-.7.3H7.4L18 16.6V13c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3.3 0 .5.1.7.3.2.2.3.4.3.7v6c0 .3-.1.5-.3.7a1 1 0 01-.7.3h-6a1 1 0 01-.7-.3 1 1 0 01-.3-.7c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h3.6L6 7.4V11c0 .3-.1.5-.3.7a1 1 0 01-.7.3 1 1 0 01-.7-.3A1 1 0 014 11V5z" fill-rule="evenodd"/></svg>',"restore-draft":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M17 13c0 .6-.4 1-1 1h-4V8c0-.6.4-1 1-1s1 .4 1 1v4h2c.6 0 1 .4 1 1z"/><path d="M4.7 10H9a1 1 0 010 2H3a1 1 0 01-1-1V5a1 1 0 112 0v3l2.5-2.4a9.2 9.2 0 0110.8-1.5A9 9 0 0113.4 21c-2.4.1-4.7-.7-6.5-2.2a1 1 0 111.3-1.5 7.2 7.2 0 0011.6-3.7 7 7 0 00-3.5-7.7A7.2 7.2 0 008 7L4.7 10z" fill-rule="nonzero"/></g></svg>',"rotate-left":'<svg width="24" height="24"><path d="M4.7 10H9a1 1 0 010 2H3a1 1 0 01-1-1V5a1 1 0 112 0v3l2.5-2.4a9.2 9.2 0 0110.8-1.5A9 9 0 0113.4 21c-2.4.1-4.7-.7-6.5-2.2a1 1 0 111.3-1.5 7.2 7.2 0 0011.6-3.7 7 7 0 00-3.5-7.7A7.2 7.2 0 008 7L4.7 10z" fill-rule="nonzero"/></svg>',"rotate-right":'<svg width="24" height="24"><path d="M20 8V5a1 1 0 012 0v6c0 .6-.4 1-1 1h-6a1 1 0 010-2h4.3L16 7A7.2 7.2 0 007.7 6a7 7 0 003 13.1c1.9.1 3.7-.5 5-1.7a1 1 0 011.4 1.5A9.2 9.2 0 012.2 14c-.9-3.9 1-8 4.5-9.9 3.5-1.9 8-1.3 10.8 1.5L20 8z" fill-rule="nonzero"/></svg>',rtl:'<svg width="24" height="24"><path d="M8 5h8v2h-2v12h-2V7h-2v12H8v-7c-.5 0-1 0-1.4-.3A3.4 3.4 0 014.8 10a3.3 3.3 0 010-2.8 3.4 3.4 0 011.8-1.8L8 5zm12 11.2a1 1 0 11-1 1.6l-3-2a1 1 0 010-1.6l3-2a1 1 0 111 1.6L18.4 15l1.8 1.2z" fill-rule="evenodd"/></svg>',save:'<svg width="24" height="24"><path d="M5 16h14a2 2 0 012 2v2a2 2 0 01-2 2H5a2 2 0 01-2-2v-2c0-1.1.9-2 2-2zm0 2v2h14v-2H5zm10 0h2v2h-2v-2zm-4-6.4L8.7 9.3a1 1 0 10-1.4 1.4l4 4c.4.4 1 .4 1.4 0l4-4a1 1 0 10-1.4-1.4L13 11.6V4a1 1 0 00-2 0v7.6z" fill-rule="nonzero"/></svg>',search:'<svg width="24" height="24"><path d="M16 17.3a8 8 0 111.4-1.4l4.3 4.4a1 1 0 01-1.4 1.4l-4.4-4.3zm-5-.3a6 6 0 100-12 6 6 0 000 12z" fill-rule="nonzero"/></svg>',"select-all":'<svg width="24" height="24"><path d="M3 5h2V3a2 2 0 00-2 2zm0 8h2v-2H3v2zm4 8h2v-2H7v2zM3 9h2V7H3v2zm10-6h-2v2h2V3zm6 0v2h2a2 2 0 00-2-2zM5 21v-2H3c0 1.1.9 2 2 2zm-2-4h2v-2H3v2zM9 3H7v2h2V3zm2 18h2v-2h-2v2zm8-8h2v-2h-2v2zm0 8a2 2 0 002-2h-2v2zm0-12h2V7h-2v2zm0 8h2v-2h-2v2zm-4 4h2v-2h-2v2zm0-16h2V3h-2v2zM7 17h10V7H7v10zm2-8h6v6H9V9z" fill-rule="nonzero"/></svg>',selected:'<svg width="24" height="24"><path fill-rule="nonzero" d="M6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6c0-1.1.9-2 2-2zm3.6 10.9L7 12.3a.7.7 0 00-1 1L9.6 17 18 8.6a.7.7 0 000-1 .7.7 0 00-1 0l-7.4 7.3z"/></svg>',settings:'<svg width="24" height="24"><path d="M11 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8v.3c0 .2 0 .3-.2.5l-.6.2H7.8c-.3 0-.4 0-.6-.2a.7.7 0 01-.2-.6V8H5a1 1 0 110-2h2v-.3c0-.2 0-.3.2-.5l.5-.2h2.5c.3 0 .4 0 .6.2l.2.5V6zM8 8h2V6H8v2zm9 2.8v.2h2c.6 0 1 .4 1 1s-.4 1-1 1h-2v.3c0 .2 0 .3-.2.5l-.6.2h-2.4c-.3 0-.4 0-.6-.2a.7.7 0 01-.2-.6V13H5a1 1 0 010-2h8v-.3c0-.2 0-.3.2-.5l.6-.2h2.4c.3 0 .4 0 .6.2l.2.6zM14 13h2v-2h-2v2zm-3 2.8v.2h8c.6 0 1 .4 1 1s-.4 1-1 1h-8v.3c0 .2 0 .3-.2.5l-.6.2H7.8c-.3 0-.4 0-.6-.2a.7.7 0 01-.2-.6V18H5a1 1 0 010-2h2v-.3c0-.2 0-.3.2-.5l.5-.2h2.5c.3 0 .4 0 .6.2l.2.6zM8 18h2v-2H8v2z" fill-rule="evenodd"/></svg>',sharpen:'<svg width="24" height="24"><path d="M16 6l4 4-8 9-8-9 4-4h8zm-4 10.2l5.5-6.2-.1-.1H12v-.3h5.1l-.2-.2H12V9h4.6l-.2-.2H12v-.3h4.1l-.2-.2H12V8h3.6l-.2-.2H8.7L6.5 10l.1.1H12v.3H6.9l.2.2H12v.3H7.3l.2.2H12v.3H7.7l.3.2h4v.3H8.2l.2.2H12v.3H8.6l.3.2H12v.3H9l.3.2H12v.3H9.5l.2.2H12v.3h-2l.2.2H12v.3h-1.6l.2.2H12v.3h-1.1l.2.2h.9v.3h-.7l.2.2h.5v.3h-.3l.3.2z" fill-rule="evenodd"/></svg>',sourcecode:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M9.8 15.7c.3.3.3.8 0 1-.3.4-.9.4-1.2 0l-4.4-4.1a.8.8 0 010-1.2l4.4-4.2c.3-.3.9-.3 1.2 0 .3.3.3.8 0 1.1L6 12l3.8 3.7zM14.2 15.7c-.3.3-.3.8 0 1 .4.4.9.4 1.2 0l4.4-4.1c.3-.3.3-.9 0-1.2l-4.4-4.2a.8.8 0 00-1.2 0c-.3.3-.3.8 0 1.1L18 12l-3.8 3.7z"/></g></svg>',"spell-check":'<svg width="24" height="24"><path d="M6 8v3H5V5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h2c.3 0 .5.1.7.3.2.2.3.4.3.7v6H8V8H6zm0-3v2h2V5H6zm13 0h-3v5h3v1h-3a1 1 0 01-.7-.3 1 1 0 01-.3-.7V5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h3v1zm-5 1.5l-.1.7c-.1.2-.3.3-.6.3.3 0 .5.1.6.3l.1.7V10c0 .3-.1.5-.3.7a1 1 0 01-.7.3h-3V4h3c.3 0 .5.1.7.3.2.2.3.4.3.7v1.5zM13 10V8h-2v2h2zm0-3V5h-2v2h2zm3 5l1 1-6.5 7L7 15.5l1.3-1 2.2 2.2L16 12z" fill-rule="evenodd"/></svg>',"strike-through":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M15.6 8.5c-.5-.7-1-1.1-1.3-1.3-.6-.4-1.3-.6-2-.6-2.7 0-2.8 1.7-2.8 2.1 0 1.6 1.8 2 3.2 2.3 4.4.9 4.6 2.8 4.6 3.9 0 1.4-.7 4.1-5 4.1A6.2 6.2 0 017 16.4l1.5-1.1c.4.6 1.6 2 3.7 2 1.6 0 2.5-.4 3-1.2.4-.8.3-2-.8-2.6-.7-.4-1.6-.7-2.9-1-1-.2-3.9-.8-3.9-3.6C7.6 6 10.3 5 12.4 5c2.9 0 4.2 1.6 4.7 2.4l-1.5 1.1z"/><path d="M5 11h14a1 1 0 010 2H5a1 1 0 010-2z" fill-rule="nonzero"/></g></svg>',subscript:'<svg width="24" height="24"><path d="M10.4 10l4.6 4.6-1.4 1.4L9 11.4 4.4 16 3 14.6 7.6 10 3 5.4 4.4 4 9 8.6 13.6 4 15 5.4 10.4 10zM21 19h-5v-1l1-.8 1.7-1.6c.3-.4.5-.8.5-1.2 0-.3 0-.6-.2-.7-.2-.2-.5-.3-.9-.3a2 2 0 00-.8.2l-.7.3-.4-1.1 1-.6 1.2-.2c.8 0 1.4.3 1.8.7.4.4.6.9.6 1.5s-.2 1.1-.5 1.6a8 8 0 01-1.3 1.3l-.6.6h2.6V19z" fill-rule="nonzero"/></svg>',superscript:'<svg width="24" height="24"><path d="M15 9.4L10.4 14l4.6 4.6-1.4 1.4L9 15.4 4.4 20 3 18.6 7.6 14 3 9.4 4.4 8 9 12.6 13.6 8 15 9.4zm5.9 1.6h-5v-1l1-.8 1.7-1.6c.3-.5.5-.9.5-1.3 0-.3 0-.5-.2-.7-.2-.2-.5-.3-.9-.3l-.8.2-.7.4-.4-1.2c.2-.2.5-.4 1-.5.3-.2.8-.2 1.2-.2.8 0 1.4.2 1.8.6.4.4.6 1 .6 1.6 0 .5-.2 1-.5 1.5l-1.3 1.4-.6.5h2.6V11z" fill-rule="nonzero"/></svg>',"table-caption":'<svg width="24" height="24"><g fill-rule="nonzero"><rect width="12" height="2" x="3" y="4" rx="1"/><path d="M19 8a2 2 0 012 2v8a2 2 0 01-2 2H5a2 2 0 01-2-2v-8c0-1.1.9-2 2-2h14zM5 15v3h6v-3H5zm14 0h-6v3h6v-3zm0-5h-6v3h6v-3zM5 13h6v-3H5v3z"/></g></svg>',"table-cell-classes":'<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M13 4v9H3V6c0-1.1.9-2 2-2h8zm-2 2H5v5h6V6z"/><path fill-rule="nonzero" d="M13 4h6a2 2 0 012 2v7h-8v-2h6V6h-6V4z" opacity=".2"/><path d="M18 20l-2.6 1.6.7-3-2.4-2 3.1-.2 1.2-2.9 1.2 2.9 3 .2-2.3 2 .7 3z"/><path fill-rule="nonzero" d="M3 13v5c0 1.1.9 2 2 2h8v-7h-2v5H5v-5H3z" opacity=".2"/></g></svg>',"table-cell-properties":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm-8 9H5v5h6v-5zm8 0h-6v5h6v-5zm-8-7H5v5h6V6z"/></svg>',"table-cell-select-all":'<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm0 2H5v12h14V6z"/><path d="M13 6v5h6v2h-6v5h-2v-5H5v-2h6V6h2z" opacity=".2"/></g></svg>',"table-cell-select-inner":'<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm0 2H5v12h14V6z" opacity=".2"/><path d="M13 6v5h6v2h-6v5h-2v-5H5v-2h6V6h2z"/></g></svg>',"table-classes":'<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v7h-8v7H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm-8 9H5v5h6v-5zm8-7h-6v5h6V6zm-8 0H5v5h6V6z"/><path d="M18 20l-2.6 1.6.7-3-2.4-2 3.1-.2 1.2-2.9 1.2 2.9 3 .2-2.3 2 .7 3z"/></g></svg>',"table-delete-column":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm-4 4h-2V6h-2v2H9V6H5v12h4v-2h2v2h2v-2h2v2h4V6h-4v2zm.3.5l1 1.2-3 2.3 3 2.3-1 1.2L12 13l-3.3 2.6-1-1.2 3-2.3-3-2.3 1-1.2L12 11l3.3-2.5z"/></svg>',"table-delete-row":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm0 2H5v3h2.5v2H5v2h2.5v2H5v3h14v-3h-2.5v-2H19v-2h-2.5V9H19V6zm-4.7 1.8l1.2 1L13 12l2.6 3.3-1.2 1-2.3-3-2.3 3-1.2-1L11 12 8.5 8.7l1.2-1 2.3 3 2.3-3z"/></svg>',"table-delete-table":'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zM5 6v12h14V6H5z"/><path d="M14.4 8.6l1 1-2.3 2.4 2.3 2.4-1 1-2.4-2.3-2.4 2.3-1-1 2.3-2.4-2.3-2.4 1-1 2.4 2.3z"/></g></svg>',"table-insert-column-after":'<svg width="24" height="24"><path fill-rule="nonzero" d="M20 4c.6 0 1 .4 1 1v2a1 1 0 01-2 0V6h-8v12h8v-1a1 1 0 012 0v2c0 .5-.4 1-.9 1H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h15zM9 13H5v5h4v-5zm7-5c.5 0 1 .4 1 .9V11h2a1 1 0 01.1 2H17v2a1 1 0 01-2 .1V13h-2a1 1 0 01-.1-2H15V9c0-.6.4-1 1-1zM9 6H5v5h4V6z"/></svg>',"table-insert-column-before":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H4a1 1 0 01-1-1v-2a1 1 0 012 0v1h8V6H5v1a1 1 0 11-2 0V5c0-.6.4-1 1-1h15zm0 9h-4v5h4v-5zM8 8c.5 0 1 .4 1 .9V11h2a1 1 0 01.1 2H9v2a1 1 0 01-2 .1V13H5a1 1 0 01-.1-2H7V9c0-.6.4-1 1-1zm11-2h-4v5h4V6z"/></svg>',"table-insert-row-above":'<svg width="24" height="24"><path fill-rule="nonzero" d="M6 4a1 1 0 110 2H5v6h14V6h-1a1 1 0 010-2h2c.6 0 1 .4 1 1v13a2 2 0 01-2 2H5a2 2 0 01-2-2V5c0-.6.4-1 1-1h2zm5 10H5v4h6v-4zm8 0h-6v4h6v-4zM12 3c.5 0 1 .4 1 .9V6h2a1 1 0 010 2h-2v2a1 1 0 01-2 .1V8H9a1 1 0 010-2h2V4c0-.6.4-1 1-1z"/></svg>',"table-insert-row-after":'<svg width="24" height="24"><path fill-rule="nonzero" d="M12 13c.5 0 1 .4 1 .9V16h2a1 1 0 01.1 2H13v2a1 1 0 01-2 .1V18H9a1 1 0 01-.1-2H11v-2c0-.6.4-1 1-1zm6 7a1 1 0 010-2h1v-6H5v6h1a1 1 0 010 2H4a1 1 0 01-1-1V6c0-1.1.9-2 2-2h14a2 2 0 012 2v13c0 .5-.4 1-.9 1H18zM11 6H5v4h6V6zm8 0h-6v4h6V6z"/></svg>',"table-left-header":'<svg width="24" height="24"><path d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm0 9h-4v5h4v-5zm-6 0H9v5h4v-5zm0-7H9v5h4V6zm6 0h-4v5h4V6z"/></svg>',"table-merge-cells":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zM5 15.5V18h3v-2.5H5zm14-5h-9V18h9v-7.5zM19 6h-4v2.5h4V6zM8 6H5v2.5h3V6zm5 0h-3v2.5h3V6zm-8 7.5h3v-3H5v3z"/></svg>',"table-row-numbering-rtl":'<svg width="24" height="24"><path d="M6 4a2 2 0 00-2 2v13c0 1.1.9 2 2 2h12a2 2 0 002-2V6a2 2 0 00-2-2H6zm0 12h8v3H6v-3zm11 0c.6 0 1 .4 1 1v1a1 1 0 01-2 0v-1c0-.6.4-1 1-1zM6 11h8v3H6v-3zm11 0c.6 0 1 .4 1 1v1a1 1 0 01-2 0v-1c0-.6.4-1 1-1zM6 6h8v3H6V6zm11 0c.6 0 1 .4 1 1v1a1 1 0 11-2 0V7c0-.6.4-1 1-1z"/></svg>',"table-row-numbering":'<svg width="24" height="24"><path d="M18 4a2 2 0 012 2v13a2 2 0 01-2 2H6a2 2 0 01-2-2V6c0-1.1.9-2 2-2h12zm0 12h-8v3h8v-3zM7 16a1 1 0 00-1 1v1a1 1 0 002 0v-1c0-.6-.4-1-1-1zm11-5h-8v3h8v-3zM7 11a1 1 0 00-1 1v1a1 1 0 002 0v-1c0-.6-.4-1-1-1zm11-5h-8v3h8V6zM7 6a1 1 0 00-1 1v1a1 1 0 102 0V7c0-.6-.4-1-1-1z"/></svg>',"table-row-properties":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zM5 15v3h6v-3H5zm14 0h-6v3h6v-3zm0-9h-6v3h6V6zM5 9h6V6H5v3z"/></svg>',"table-split-cells":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zM8 15.5H5V18h3v-2.5zm11-5h-9V18h9v-7.5zm-2.5 1l1 1-2 2 2 2-1 1-2-2-2 2-1-1 2-2-2-2 1-1 2 2 2-2zm-8.5-1H5v3h3v-3zM19 6h-4v2.5h4V6zM8 6H5v2.5h3V6zm5 0h-3v2.5h3V6z"/></svg>',"table-top-header":'<svg width="24" height="24"><path d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm-8 11H5v3h6v-3zm8 0h-6v3h6v-3zm0-5h-6v3h6v-3zM5 13h6v-3H5v3z"/></svg>',table:'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zM5 14v4h6v-4H5zm14 0h-6v4h6v-4zm0-6h-6v4h6V8zM5 12h6V8H5v4z"/></svg>',template:'<svg width="24" height="24"><path d="M19 19v-1H5v1h14zM9 16v-4a5 5 0 116 0v4h4a2 2 0 012 2v3H3v-3c0-1.1.9-2 2-2h4zm4 0v-5l.8-.6a3 3 0 10-3.6 0l.8.6v5h2z" fill-rule="nonzero"/></svg>',"temporary-placeholder":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M9 7.6V6h2.5V4.5a.5.5 0 111 0V6H15v1.6a8 8 0 11-6 0zm-2.6 5.3a.5.5 0 00.3.6c.3 0 .6 0 .6-.3l.1-.2a5 5 0 013.3-2.8c.3-.1.4-.4.4-.6-.1-.3-.4-.5-.6-.4a6 6 0 00-4.1 3.7z"/><circle cx="14" cy="4" r="1"/><circle cx="12" cy="2" r="1"/><circle cx="10" cy="4" r="1"/></g></svg>',"text-color":'<svg width="24" height="24"><g fill-rule="evenodd"><path id="tox-icon-text-color__color" d="M3 18h18v3H3z"/><path d="M8.7 16h-.8a.5.5 0 01-.5-.6l2.7-9c.1-.3.3-.4.5-.4h2.8c.2 0 .4.1.5.4l2.7 9a.5.5 0 01-.5.6h-.8a.5.5 0 01-.4-.4l-.7-2.2c0-.3-.3-.4-.5-.4h-3.4c-.2 0-.4.1-.5.4l-.7 2.2c0 .3-.2.4-.4.4zm2.6-7.6l-.6 2a.5.5 0 00.5.6h1.6a.5.5 0 00.5-.6l-.6-2c0-.3-.3-.4-.5-.4h-.4c-.2 0-.4.1-.5.4z"/></g></svg>',toc:'<svg width="24" height="24"><path d="M5 5c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 110-2zm3 0h11c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 110-2zm-3 8c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 010-2zm3 0h11c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 010-2zm0-4c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 110-2zm3 0h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm-3 8c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 010-2zm3 0h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2z" fill-rule="evenodd"/></svg>',translate:'<svg width="24" height="24"><path d="M12.7 14.3l-.3.7-.4.7-2.2-2.2-3.1 3c-.3.4-.8.4-1 0a.7.7 0 010-1l3.1-3A12.4 12.4 0 016.7 9H8a10.1 10.1 0 001.7 2.4c.5-.5 1-1.1 1.4-1.8l.9-2H4.7a.7.7 0 110-1.5h4.4v-.7c0-.4.3-.8.7-.8.4 0 .7.4.7.8v.7H15c.4 0 .8.3.8.7 0 .4-.4.8-.8.8h-1.4a12.3 12.3 0 01-1 2.4 13.5 13.5 0 01-1.7 2.3l1.9 1.8zm4.3-3l2.7 7.3a.5.5 0 01-.4.7 1 1 0 01-1-.7l-.6-1.5h-3.4l-.6 1.5a1 1 0 01-1 .7.5.5 0 01-.4-.7l2.7-7.4a1 1 0 012 0zm-2.2 4.4h2.4L16 12.5l-1.2 3.2z" fill-rule="evenodd"/></svg>',underline:'<svg width="24" height="24"><path d="M16 5c.6 0 1 .4 1 1v5.5a4 4 0 01-.4 1.8l-1 1.4a5.3 5.3 0 01-5.5 1 5 5 0 01-1.6-1c-.5-.4-.8-.9-1.1-1.4a4 4 0 01-.4-1.8V6c0-.6.4-1 1-1s1 .4 1 1v5.5c0 .3 0 .6.2 1l.6.7a3.3 3.3 0 002.2.8 3.4 3.4 0 002.2-.8c.3-.2.4-.5.6-.8l.2-.9V6c0-.6.4-1 1-1zM8 17h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 010-2z" fill-rule="evenodd"/></svg>',undo:'<svg width="24" height="24"><path d="M6.4 8H12c3.7 0 6.2 2 6.8 5.1.6 2.7-.4 5.6-2.3 6.8a1 1 0 01-1-1.8c1.1-.6 1.8-2.7 1.4-4.6-.5-2.1-2.1-3.5-4.9-3.5H6.4l3.3 3.3a1 1 0 11-1.4 1.4l-5-5a1 1 0 010-1.4l5-5a1 1 0 011.4 1.4L6.4 8z" fill-rule="nonzero"/></svg>',unlink:'<svg width="24" height="24"><path d="M6.2 12.3a1 1 0 011.4 1.4l-2 2a2 2 0 102.6 2.8l4.8-4.8a1 1 0 000-1.4 1 1 0 111.4-1.3 2.9 2.9 0 010 4L9.6 20a3.9 3.9 0 01-5.5-5.5l2-2zm11.6-.6a1 1 0 01-1.4-1.4l2.1-2a2 2 0 10-2.7-2.8L11 10.3a1 1 0 000 1.4A1 1 0 119.6 13a2.9 2.9 0 010-4L14.4 4a3.9 3.9 0 015.5 5.5l-2 2zM7.6 6.3a.8.8 0 01-1 1.1L3.3 4.2a.7.7 0 111-1l3.2 3.1zM5.1 8.6a.8.8 0 010 1.5H3a.8.8 0 010-1.5H5zm5-3.5a.8.8 0 01-1.5 0V3a.8.8 0 011.5 0V5zm6 11.8a.8.8 0 011-1l3.2 3.2a.8.8 0 01-1 1L16 17zm-2.2 2a.8.8 0 011.5 0V21a.8.8 0 01-1.5 0V19zm5-3.5a.7.7 0 110-1.5H21a.8.8 0 010 1.5H19z" fill-rule="nonzero"/></svg>',unlock:'<svg width="24" height="24"><path d="M16 5c.8 0 1.5.3 2.1.9.6.6.9 1.3.9 2.1v3h-2V8a1 1 0 00-.3-.7A1 1 0 0016 7h-2a1 1 0 00-.7.3 1 1 0 00-.3.7v3h.3c.2 0 .3 0 .5.2l.2.6v7.4c0 .3 0 .4-.2.6l-.6.2H4.8c-.3 0-.4 0-.6-.2a.7.7 0 01-.2-.6v-7.4c0-.3 0-.4.2-.6l.5-.2H11V8c0-.8.3-1.5.9-2.1.6-.6 1.3-.9 2.1-.9h2z" fill-rule="evenodd"/></svg>',"unordered-list":'<svg width="24" height="24"><path d="M11 5h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zM4.5 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1zm0 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1zm0 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1z" fill-rule="evenodd"/></svg>',unselected:'<svg width="24" height="24"><path fill-rule="nonzero" d="M6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6c0-1.1.9-2 2-2zm0 1a1 1 0 00-1 1v12c0 .6.4 1 1 1h12c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H6z"/></svg>',upload:'<svg width="24" height="24"><path d="M18 19v-2a1 1 0 012 0v3c0 .6-.4 1-1 1H5a1 1 0 01-1-1v-3a1 1 0 012 0v2h12zM11 6.4L8.7 8.7a1 1 0 01-1.4-1.4l4-4a1 1 0 011.4 0l4 4a1 1 0 11-1.4 1.4L13 6.4V16a1 1 0 01-2 0V6.4z" fill-rule="nonzero"/></svg>',user:'<svg width="24" height="24"><path d="M12 24a12 12 0 110-24 12 12 0 010 24zm-8.7-5.3a11 11 0 0017.4 0C19.4 16.3 14.6 15 12 15c-2.6 0-7.4 1.3-8.7 3.7zM12 13c2.2 0 4-2 4-4.5S14.2 4 12 4 8 6 8 8.5 9.8 13 12 13z" fill-rule="nonzero"/></svg>',"vertical-align":'<svg width="24" height="24"><g fill-rule="nonzero"><rect width="18" height="2" x="3" y="11" rx="1"/><path d="M12 2c.6 0 1 .4 1 1v4l2-1.3a1 1 0 011.2 1.5l-.1.1-4.1 3-4-3a1 1 0 011-1.7l2 1.5V3c0-.6.4-1 1-1zm0 11.8l4 2.9a1 1 0 01-1 1.7l-2-1.5V21c0 .5-.4 1-.9 1H12a1 1 0 01-1-1v-4l-2 1.3a1 1 0 01-1.2-.1l-.1-.1a1 1 0 01.1-1.3l.1-.1 4.1-3z"/></g></svg>',visualblocks:'<svg width="24" height="24"><path d="M9 19v2H7v-2h2zm-4 0v2a2 2 0 01-2-2h2zm8 0v2h-2v-2h2zm8 0a2 2 0 01-2 2v-2h2zm-4 0v2h-2v-2h2zM15 7a1 1 0 010 2v7a1 1 0 01-2 0V9h-1v7a1 1 0 01-2 0v-4a2.5 2.5 0 01-.2-5H15zM5 15v2H3v-2h2zm16 0v2h-2v-2h2zM5 11v2H3v-2h2zm16 0v2h-2v-2h2zM5 7v2H3V7h2zm16 0v2h-2V7h2zM5 3v2H3c0-1.1.9-2 2-2zm8 0v2h-2V3h2zm6 0a2 2 0 012 2h-2V3zM9 3v2H7V3h2zm8 0v2h-2V3h2z" fill-rule="evenodd"/></svg>',visualchars:'<svg width="24" height="24"><path d="M10 5h7a1 1 0 010 2h-1v11a1 1 0 01-2 0V7h-2v11a1 1 0 01-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 016.8 10a3.3 3.3 0 010-2.8 3.4 3.4 0 011.8-1.8L10 5z" fill-rule="evenodd"/></svg>',warning:'<svg width="24" height="24"><path d="M19.8 18.3c.2.5.3.9 0 1.2-.1.3-.5.5-1 .5H5.2c-.5 0-.9-.2-1-.5-.3-.3-.2-.7 0-1.2L11 4.7l.5-.5.5-.2c.2 0 .3 0 .5.2.2 0 .3.3.5.5l6.8 13.6zM12 18c.3 0 .5-.1.7-.3.2-.2.3-.4.3-.7a1 1 0 00-.3-.7 1 1 0 00-.7-.3 1 1 0 00-.7.3 1 1 0 00-.3.7c0 .3.1.5.3.7.2.2.4.3.7.3zm.7-3l.3-4a1 1 0 00-.3-.7 1 1 0 00-.7-.3 1 1 0 00-.7.3 1 1 0 00-.3.7l.3 4h1.4z" fill-rule="evenodd"/></svg>',"zoom-in":'<svg width="24" height="24"><path d="M16 17.3a8 8 0 111.4-1.4l4.3 4.4a1 1 0 01-1.4 1.4l-4.4-4.3zm-5-.3a6 6 0 100-12 6 6 0 000 12zm-1-9a1 1 0 012 0v6a1 1 0 01-2 0V8zm-2 4a1 1 0 010-2h6a1 1 0 010 2H8z" fill-rule="nonzero"/></svg>',"zoom-out":'<svg width="24" height="24"><path d="M16 17.3a8 8 0 111.4-1.4l4.3 4.4a1 1 0 01-1.4 1.4l-4.4-4.3zm-5-.3a6 6 0 100-12 6 6 0 000 12zm-3-5a1 1 0 010-2h6a1 1 0 010 2H8z" fill-rule="nonzero"/></svg>'}})},6890:(t,e,n)=>{n(8785)},8190:(t,e,n)=>{n(7440)},7440:()=>{!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager");t.add("code",(function(t){return function(t){t.addCommand("mceCodeEditor",(function(){!function(t){var e=function(t){return t.getContent({source_view:!0})}(t);t.windowManager.open({title:"Source Code",size:"large",body:{type:"panel",items:[{type:"textarea",name:"code"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{code:e},onSubmit:function(e){!function(t,e){t.focus(),t.undoManager.transact((function(){t.setContent(e)})),t.selection.setCursorLocation(),t.nodeChanged()}(t,e.getData().code),e.close()}})}(t)}))}(t),function(t){var e=function(){return t.execCommand("mceCodeEditor")};t.ui.registry.addButton("code",{icon:"sourcecode",tooltip:"Source code",onAction:e}),t.ui.registry.addMenuItem("code",{icon:"sourcecode",text:"Source code",onAction:e})}(t),{}}))}()},8860:(t,e,n)=>{n(1768)},1768:(t,e,n)=>{!function(){"use strict";var t=function(t){return function(e){return function(t){var e=typeof t;return null===t?"null":"object"===e&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"===e&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":e}(e)===t}},e=function(t){return function(e){return typeof e===t}},r=function(t){return function(e){return t===e}},o=t("string"),i=t("object"),a=t("array"),u=r(null),c=e("boolean"),s=r(void 0),l=function(t){return null==t},f=function(t){return!l(t)},d=e("function"),m=e("number"),g=function(t,e){if(a(t)){for(var n=0,r=t.length;n<r;++n)if(!e(t[n]))return!1;return!0}return!1},h=function(){},p=function(t,e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return t(e.apply(null,n))}},v=function(t){return function(){return t}},b=function(t){return t},y=function(t,e){return t===e};function x(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=e.concat(n);return t.apply(null,o)}}var w=function(t){return function(e){return!t(e)}},C=function(t){return function(){throw new Error(t)}},S=v(!1),k=v(!0),_=tinymce.util.Tools.resolve("tinymce.ThemeManager"),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}).apply(this,arguments)};function E(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 z(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))}var T,M,D=function(){return A},A={fold:function(t,e){return t()},isSome:S,isNone:k,getOr:M=b,getOrThunk:T=function(t){return t()},getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:v(null),getOrUndefined:v(void 0),or:M,orThunk:T,map:D,each:h,bind:D,exists:S,forall:k,filter:function(){return D()},toArray:function(){return[]},toString:v("none()")},N=function(t){var e=v(t),n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},isSome:k,isNone:S,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return N(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:A},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},B={some:N,none:D,from:function(t){return null==t?A:N(t)}},R=Array.prototype.slice,H=Array.prototype.indexOf,L=Array.prototype.push,V=function(t,e){return H.call(t,e)},P=function(t,e){return V(t,e)>-1},I=function(t,e){for(var n=0,r=t.length;n<r;n++){if(e(t[n],n))return!0}return!1},F=function(t,e){for(var n=[],r=0;r<t;r++)n.push(e(r));return n},U=function(t,e){for(var n=[],r=0;r<t.length;r+=e){var o=R.call(t,r,r+e);n.push(o)}return n},j=function(t,e){for(var n=t.length,r=new Array(n),o=0;o<n;o++){var i=t[o];r[o]=e(i,o)}return r},W=function(t,e){for(var n=0,r=t.length;n<r;n++){e(t[n],n)}},q=function(t,e){for(var n=[],r=[],o=0,i=t.length;o<i;o++){var a=t[o];(e(a,o)?n:r).push(a)}return{pass:n,fail:r}},G=function(t,e){for(var n=[],r=0,o=t.length;r<o;r++){var i=t[r];e(i,r)&&n.push(i)}return n},$=function(t,e,n){return function(t,e){for(var n=t.length-1;n>=0;n--)e(t[n],n)}(t,(function(t,r){n=e(n,t,r)})),n},X=function(t,e,n){return W(t,(function(t,r){n=e(n,t,r)})),n},K=function(t,e){return function(t,e,n){for(var r=0,o=t.length;r<o;r++){var i=t[r];if(e(i,r))return B.some(i);if(n(i,r))break}return B.none()}(t,e,S)},Y=function(t,e){for(var n=0,r=t.length;n<r;n++){if(e(t[n],n))return B.some(n)}return B.none()},J=function(t){for(var e=[],n=0,r=t.length;n<r;++n){if(!a(t[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+t);L.apply(e,t[n])}return e},Q=function(t,e){return J(j(t,e))},Z=function(t,e){for(var n=0,r=t.length;n<r;++n){if(!0!==e(t[n],n))return!1}return!0},tt=function(t){var e=R.call(t,0);return e.reverse(),e},et=function(t,e){return G(t,(function(t){return!P(e,t)}))},nt=function(t,e){for(var n={},r=0,o=t.length;r<o;r++){var i=t[r];n[String(i)]=e(i,r)}return n},rt=function(t){return[t]},ot=function(t,e){var n=R.call(t,0);return n.sort(e),n},it=function(t,e){return e>=0&&e<t.length?B.some(t[e]):B.none()},at=function(t){return it(t,0)},ut=function(t){return it(t,t.length-1)},ct=d(Array.from)?Array.from:function(t){return R.call(t)},st=function(t,e){for(var n=0;n<t.length;n++){var r=e(t[n],n);if(r.isSome())return r}return B.none()},lt=Object.keys,ft=Object.hasOwnProperty,dt=function(t,e){for(var n=lt(t),r=0,o=n.length;r<o;r++){var i=n[r];e(t[i],i)}},mt=function(t,e){return gt(t,(function(t,n){return{k:n,v:e(t,n)}}))},gt=function(t,e){var n={};return dt(t,(function(t,r){var o=e(t,r);n[o.k]=o.v})),n},ht=function(t,e){var n={};return function(t,e,n,r){dt(t,(function(t,o){(e(t,o)?n:r)(t,o)}))}(t,e,function(t){return function(e,n){t[n]=e}}(n),h),n},pt=function(t,e){var n=[];return dt(t,(function(t,r){n.push(e(t,r))})),n},vt=function(t,e){for(var n=lt(t),r=0,o=n.length;r<o;r++){var i=n[r],a=t[i];if(e(a,i,t))return B.some(a)}return B.none()},bt=function(t){return pt(t,b)},yt=function(t,e){return xt(t,e)?B.from(t[e]):B.none()},xt=function(t,e){return ft.call(t,e)},wt=function(t,e){return xt(t,e)&&void 0!==t[e]&&null!==t[e]},Ct=function(t,e,n){return void 0===n&&(n=y),t.exists((function(t){return n(t,e)}))},St=function(t){for(var e=[],n=function(t){e.push(t)},r=0;r<t.length;r++)t[r].each(n);return e},kt=function(t,e,n){return t.isSome()&&e.isSome()?B.some(n(t.getOrDie(),e.getOrDie())):B.none()},_t=function(t,e){return t?B.some(e):B.none()},Ot=function(t,e,n){return""===e||t.length>=e.length&&t.substr(n,n+e.length)===e},Et=function(t,e){return-1!==t.indexOf(e)},zt=function(t,e){return Ot(t,e,0)},Tt=function(t,e){return Ot(t,e,t.length-e.length)},Mt=function(t){return function(e){return e.replace(t,"")}}(/^\s+|\s+$/g),Dt=function(t){return t.length>0},At=function(t){return void 0!==t.style&&d(t.style.getPropertyValue)},Nt=function(t){if(null==t)throw new Error("Node cannot be null or undefined");return{dom:t}},Bt={fromHtml:function(t,e){var n=(e||document).createElement("div");if(n.innerHTML=t,!n.hasChildNodes()||n.childNodes.length>1)throw console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return Nt(n.childNodes[0])},fromTag:function(t,e){var n=(e||document).createElement(t);return Nt(n)},fromText:function(t,e){var n=(e||document).createTextNode(t);return Nt(n)},fromDom:Nt,fromPoint:function(t,e,n){return B.from(t.dom.elementFromPoint(e,n)).map(Nt)}};"undefined"!=typeof window?window:Function("return this;")();var Rt,Ht=function(t){return t.dom.nodeName.toLowerCase()},Lt=function(t){return function(e){return function(t){return t.dom.nodeType}(e)===t}},Vt=Lt(1),Pt=Lt(3),It=Lt(9),Ft=Lt(11),Ut=function(t){var e,n=!1;return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return n||(n=!0,e=t.apply(null,r)),e}},jt=function(){return Wt(0,0)},Wt=function(t,e){return{major:t,minor:e}},qt={nu:Wt,detect:function(t,e){var n=String(e).toLowerCase();return 0===t.length?jt():function(t,e){var n=function(t,e){for(var n=0;n<t.length;n++){var r=t[n];if(r.test(e))return r}}(t,e);if(!n)return{major:0,minor:0};var r=function(t){return Number(e.replace(n,"$"+t))};return Wt(r(1),r(2))}(t,n)},unknown:jt},Gt=function(t,e){var n=String(e).toLowerCase();return K(t,(function(t){return t.search(n)}))},$t=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Xt=function(t){return function(e){return Et(e,t)}},Kt=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(t){return Et(t,"edge/")&&Et(t,"chrome")&&Et(t,"safari")&&Et(t,"applewebkit")}},{name:"Chrome",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,$t],search:function(t){return Et(t,"chrome")&&!Et(t,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(t){return Et(t,"msie")||Et(t,"trident")}},{name:"Opera",versionRegexes:[$t,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Xt("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Xt("firefox")},{name:"Safari",versionRegexes:[$t,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(t){return(Et(t,"safari")||Et(t,"mobile/"))&&Et(t,"applewebkit")}}],Yt=[{name:"Windows",search:Xt("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(t){return Et(t,"iphone")||Et(t,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Xt("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Xt("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Xt("linux"),versionRegexes:[]},{name:"Solaris",search:Xt("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Xt("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:Xt("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],Jt={browsers:v(Kt),oses:v(Yt)},Qt="Edge",Zt="Chrome",te="Opera",ee="Firefox",ne="Safari",re=function(t){var e=t.current,n=t.version,r=function(t){return function(){return e===t}};return{current:e,version:n,isEdge:r(Qt),isChrome:r(Zt),isIE:r("IE"),isOpera:r(te),isFirefox:r(ee),isSafari:r(ne)}},oe={unknown:function(){return re({current:void 0,version:qt.unknown()})},nu:re,edge:v(Qt),chrome:v(Zt),ie:v("IE"),opera:v(te),firefox:v(ee),safari:v(ne)},ie="Windows",ae="Android",ue="Linux",ce="Solaris",se="FreeBSD",le="ChromeOS",fe=function(t){var e=t.current,n=t.version,r=function(t){return function(){return e===t}};return{current:e,version:n,isWindows:r(ie),isiOS:r("iOS"),isAndroid:r(ae),isOSX:r("OSX"),isLinux:r(ue),isSolaris:r(ce),isFreeBSD:r(se),isChromeOS:r(le)}},de={unknown:function(){return fe({current:void 0,version:qt.unknown()})},nu:fe,windows:v(ie),ios:v("iOS"),android:v(ae),linux:v(ue),osx:v("OSX"),solaris:v(ce),freebsd:v(se),chromeos:v(le)},me=function(t,e,n){var r=Jt.browsers(),o=Jt.oses(),i=e.bind((function(t){return function(t,e){return st(e.brands,(function(e){var n=e.brand.toLowerCase();return K(t,(function(t){var e;return n===(null===(e=t.brand)||void 0===e?void 0:e.toLowerCase())})).map((function(t){return{current:t.name,version:qt.nu(parseInt(e.version,10),0)}}))}))}(r,t)})).orThunk((function(){return function(t,e){return Gt(t,e).map((function(t){var n=qt.detect(t.versionRegexes,e);return{current:t.name,version:n}}))}(r,t)})).fold(oe.unknown,oe.nu),a=function(t,e){return Gt(t,e).map((function(t){var n=qt.detect(t.versionRegexes,e);return{current:t.name,version:n}}))}(o,t).fold(de.unknown,de.nu),u=function(t,e,n,r){var o=t.isiOS()&&!0===/ipad/i.test(n),i=t.isiOS()&&!o,a=t.isiOS()||t.isAndroid(),u=a||r("(pointer:coarse)"),c=o||!i&&a&&r("(min-device-width:768px)"),s=i||a&&!c,l=e.isSafari()&&t.isiOS()&&!1===/safari/i.test(n),f=!s&&!c&&!l;return{isiPad:v(o),isiPhone:v(i),isTablet:v(c),isPhone:v(s),isTouch:v(u),isAndroid:t.isAndroid,isiOS:t.isiOS,isWebView:v(l),isDesktop:v(f)}}(a,i,t,n);return{browser:i,os:a,deviceType:u}},ge=function(t){return window.matchMedia(t).matches},he=Ut((function(){return me(navigator.userAgent,B.from(navigator.userAgentData),ge)})),pe=function(){return he()},ve=function(t,e){var n=t.dom;if(1!==n.nodeType)return!1;var r=n;if(void 0!==r.matches)return r.matches(e);if(void 0!==r.msMatchesSelector)return r.msMatchesSelector(e);if(void 0!==r.webkitMatchesSelector)return r.webkitMatchesSelector(e);if(void 0!==r.mozMatchesSelector)return r.mozMatchesSelector(e);throw new Error("Browser lacks native selectors")},be=function(t){return 1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType||0===t.childElementCount},ye=function(t,e){return t.dom===e.dom},xe=function(t,e){return function(t,e){return function(t,e,n){return 0!=(t.compareDocumentPosition(e)&n)}(t,e,Node.DOCUMENT_POSITION_CONTAINED_BY)}(t.dom,e.dom)},we=function(t,e){return pe().browser.isIE()?xe(t,e):function(t,e){var n=t.dom,r=e.dom;return n!==r&&n.contains(r)}(t,e)},Ce=function(t){return Bt.fromDom(t.dom.ownerDocument)},Se=function(t){return It(t)?t:Ce(t)},ke=function(t){return Bt.fromDom(Se(t).dom.documentElement)},_e=function(t){return Bt.fromDom(Se(t).dom.defaultView)},Oe=function(t){return B.from(t.dom.parentNode).map(Bt.fromDom)},Ee=function(t){return B.from(t.dom.offsetParent).map(Bt.fromDom)},ze=function(t){return j(t.dom.childNodes,Bt.fromDom)},Te=function(t,e){var n=t.dom.childNodes;return B.from(n[e]).map(Bt.fromDom)},Me=function(t,e){return{element:t,offset:e}},De=function(t,e){var n=ze(t);return n.length>0&&e<n.length?Me(n[e],0):Me(t,e)},Ae=function(t){return Ft(t)&&f(t.dom.host)},Ne=d(Element.prototype.attachShadow)&&d(Node.prototype.getRootNode),Be=v(Ne),Re=Ne?function(t){return Bt.fromDom(t.dom.getRootNode())}:Se,He=function(t){return Ae(t)?t:Bt.fromDom(Se(t).dom.body)},Le=function(t){var e=Re(t);return Ae(e)?B.some(e):B.none()},Ve=function(t){return Bt.fromDom(t.dom.host)},Pe=function(t){return f(t.dom.shadowRoot)},Ie=function(t){var e=Pt(t)?t.dom.parentNode:t.dom;if(null==e||null===e.ownerDocument)return!1;var n,r,o=e.ownerDocument;return Le(Bt.fromDom(e)).fold((function(){return o.body.contains(e)}),(n=Ie,r=Ve,function(t){return n(r(t))}))},Fe=function(){return Ue(Bt.fromDom(document))},Ue=function(t){var e=t.dom.body;if(null==e)throw new Error("Body is not available yet");return Bt.fromDom(e)},je=function(t,e,n){if(!(o(n)||c(n)||m(n)))throw console.error("Invalid call to Attribute.set. Key ",e,":: Value ",n,":: Element ",t),new Error("Attribute value was not simple");t.setAttribute(e,n+"")},We=function(t,e,n){je(t.dom,e,n)},qe=function(t,e){var n=t.dom;dt(e,(function(t,e){je(n,e,t)}))},Ge=function(t,e){var n=t.dom.getAttribute(e);return null===n?void 0:n},$e=function(t,e){return B.from(Ge(t,e))},Xe=function(t,e){var n=t.dom;return!(!n||!n.hasAttribute)&&n.hasAttribute(e)},Ke=function(t,e){t.dom.removeAttribute(e)},Ye=function(t,e,n){if(!o(n))throw console.error("Invalid call to CSS.set. Property ",e,":: Value ",n,":: Element ",t),new Error("CSS value must be a string: "+n);At(t)&&t.style.setProperty(e,n)},Je=function(t,e){At(t)&&t.style.removeProperty(e)},Qe=function(t,e,n){var r=t.dom;Ye(r,e,n)},Ze=function(t,e){var n=t.dom;dt(e,(function(t,e){Ye(n,e,t)}))},tn=function(t,e){var n=t.dom;dt(e,(function(t,e){t.fold((function(){Je(n,e)}),(function(t){Ye(n,e,t)}))}))},en=function(t,e){var n=t.dom,r=window.getComputedStyle(n).getPropertyValue(e);return""!==r||Ie(t)?r:nn(n,e)},nn=function(t,e){return At(t)?t.style.getPropertyValue(e):""},rn=function(t,e){var n=t.dom,r=nn(n,e);return B.from(r).filter((function(t){return t.length>0}))},on=function(t){var e={},n=t.dom;if(At(n))for(var r=0;r<n.style.length;r++){var o=n.style.item(r);e[o]=n.style[o]}return e},an=function(t,e,n){var r=Bt.fromTag(t);return Qe(r,e,n),rn(r,e).isSome()},un=function(t,e){var n=t.dom;Je(n,e),Ct($e(t,"style").map(Mt),"")&&Ke(t,"style")},cn=function(t){return t.dom.offsetWidth},sn=function(t,e){var n=function(n){var r=e(n);if(r<=0||null===r){var o=en(n,t);return parseFloat(o)||0}return r},r=function(t,e){return X(e,(function(e,n){var r=en(t,n),o=void 0===r?0:parseInt(r,10);return isNaN(o)?e:e+o}),0)};return{set:function(e,n){if(!m(n)&&!n.match(/^[0-9]+$/))throw new Error(t+".set accepts only positive integer values. Value was "+n);var r=e.dom;At(r)&&(r.style[t]=n+"px")},get:n,getOuter:n,aggregate:r,max:function(t,e,n){var o=r(t,n);return e>o?e-o:0}}},ln=sn("height",(function(t){var e=t.dom;return Ie(t)?e.getBoundingClientRect().height:e.offsetHeight})),fn=function(t){return ln.get(t)},dn=function(t){return ln.getOuter(t)},mn=function(t,e){return{left:t,top:e,translate:function(n,r){return mn(t+n,e+r)}}},gn=mn,hn=function(t,e){return void 0!==t?t:void 0!==e?e:0},pn=function(t){var e=t.dom.ownerDocument,n=e.body,r=e.defaultView,o=e.documentElement;if(n===t.dom)return gn(n.offsetLeft,n.offsetTop);var i=hn(null==r?void 0:r.pageYOffset,o.scrollTop),a=hn(null==r?void 0:r.pageXOffset,o.scrollLeft),u=hn(o.clientTop,n.clientTop),c=hn(o.clientLeft,n.clientLeft);return vn(t).translate(a-c,i-u)},vn=function(t){var e=t.dom,n=e.ownerDocument.body;return n===e?gn(n.offsetLeft,n.offsetTop):Ie(t)?function(t){var e=t.getBoundingClientRect();return gn(e.left,e.top)}(e):gn(0,0)},bn=sn("width",(function(t){return t.dom.offsetWidth})),yn=function(t){return bn.get(t)},xn=function(t){return bn.getOuter(t)},wn=function(t){var e=Bt.fromDom(function(t){if(Be()&&f(t.target)){var e=Bt.fromDom(t.target);if(Vt(e)&&Pe(e)&&t.composed&&t.composedPath){var n=t.composedPath();if(n)return at(n)}}return B.from(t.target)}(t).getOr(t.target)),n=function(){return t.stopPropagation()},r=function(){return t.preventDefault()},o=p(r,n);return function(t,e,n,r,o,i,a){return{target:t,x:e,y:n,stop:r,prevent:o,kill:i,raw:a}}(e,t.clientX,t.clientY,n,r,o,t)},Cn=function(t,e,n,r,o){var i=function(t,e){return function(n){t(n)&&e(wn(n))}}(n,r);return t.dom.addEventListener(e,i,o),{unbind:x(Sn,t,e,i,o)}},Sn=function(t,e,n,r){t.dom.removeEventListener(e,n,r)},kn=function(t,e){Oe(t).each((function(n){n.dom.insertBefore(e.dom,t.dom)}))},_n=function(t,e){(function(t){return B.from(t.dom.nextSibling).map(Bt.fromDom)})(t).fold((function(){Oe(t).each((function(t){En(t,e)}))}),(function(t){kn(t,e)}))},On=function(t,e){(function(t){return Te(t,0)})(t).fold((function(){En(t,e)}),(function(n){t.dom.insertBefore(e.dom,n.dom)}))},En=function(t,e){t.dom.appendChild(e.dom)},zn=function(t,e){W(e,(function(e){En(t,e)}))},Tn=function(t){t.dom.textContent="",W(ze(t),(function(t){Mn(t)}))},Mn=function(t){var e=t.dom;null!==e.parentNode&&e.parentNode.removeChild(e)},Dn=function(t){var e,n=ze(t);n.length>0&&(e=t,W(n,(function(t){kn(e,t)}))),Mn(t)},An=function(t){var e=void 0!==t?t.dom:document,n=e.body.scrollLeft||e.documentElement.scrollLeft,r=e.body.scrollTop||e.documentElement.scrollTop;return gn(n,r)},Nn=function(t,e,n){var r=(void 0!==n?n.dom:document).defaultView;r&&r.scrollTo(t,e)},Bn=function(t,e,n,r){return{x:t,y:e,width:n,height:r,right:t+n,bottom:e+r}},Rn=function(t){var e=void 0===t?window:t,n=e.document,r=An(Bt.fromDom(n));return function(t){var e=void 0===t?window:t;return pe().browser.isFirefox()?B.none():B.from(e.visualViewport)}(e).fold((function(){var t=e.document.documentElement,n=t.clientWidth,o=t.clientHeight;return Bn(r.left,r.top,n,o)}),(function(t){return Bn(Math.max(t.pageLeft,r.left),Math.max(t.pageTop,r.top),t.width,t.height)}))},Hn=function(t,e){return t.view(e).fold(v([]),(function(e){var n=t.owner(e),r=Hn(t,n);return[e].concat(r)}))},Ln=Object.freeze({__proto__:null,view:function(t){var e;return(t.dom===document?B.none():B.from(null===(e=t.dom.defaultView)||void 0===e?void 0:e.frameElement)).map(Bt.fromDom)},owner:function(t){return Ce(t)}}),Vn=function(t){var e=Bt.fromDom(document),n=An(e);return function(t,e){var n=e.owner(t),r=Hn(e,n);return B.some(r)}(t,Ln).fold(x(pn,t),(function(e){var r=vn(t),o=$(e,(function(t,e){var n=vn(e);return{left:t.left+n.left,top:t.top+n.top}}),{left:0,top:0});return gn(o.left+r.left+n.left,o.top+r.top+n.top)}))},Pn=function(t,e,n,r){return{x:t,y:e,width:n,height:r,right:t+n,bottom:e+r}},In=function(t){var e=pn(t),n=xn(t),r=dn(t);return Pn(e.left,e.top,n,r)},Fn=function(t){var e=Vn(t),n=xn(t),r=dn(t);return Pn(e.left,e.top,n,r)},Un=function(){return Rn(window)},jn=function(t){return{isValue:k,isError:S,getOr:v(t),getOrThunk:v(t),getOrDie:v(t),or:function(e){return jn(t)},orThunk:function(e){return jn(t)},fold:function(e,n){return n(t)},map:function(e){return jn(e(t))},mapError:function(e){return jn(t)},each:function(e){e(t)},bind:function(e){return e(t)},exists:function(e){return e(t)},forall:function(e){return e(t)},toOptional:function(){return B.some(t)}}},Wn=function(t){return{isValue:S,isError:k,getOr:b,getOrThunk:function(t){return t()},getOrDie:function(){return C(String(t))()},or:b,orThunk:function(t){return t()},fold:function(e,n){return e(t)},map:function(e){return Wn(t)},mapError:function(e){return Wn(e(t))},each:h,bind:function(e){return Wn(t)},exists:S,forall:k,toOptional:B.none}},qn={value:jn,error:Wn,fromOption:function(t,e){return t.fold((function(){return Wn(e)}),jn)}};!function(t){t[t.Error=0]="Error",t[t.Value=1]="Value"}(Rt||(Rt={}));var Gn=function(t,e,n){return t.stype===Rt.Error?e(t.serror):n(t.svalue)},$n=function(t){return{stype:Rt.Value,svalue:t}},Xn=function(t){return{stype:Rt.Error,serror:t}},Kn=function(t){return t.fold(Xn,$n)},Yn=function(t){return Gn(t,qn.error,qn.value)},Jn=$n,Qn=function(t){var e=[],n=[];return W(t,(function(t){Gn(t,(function(t){return n.push(t)}),(function(t){return e.push(t)}))})),{values:e,errors:n}},Zn=Xn,tr=function(t,e){return t.stype===Rt.Value?e(t.svalue):t},er=function(t,e){return t.stype===Rt.Error?e(t.serror):t},nr=function(t,e){return t.stype===Rt.Value?{stype:Rt.Value,svalue:e(t.svalue)}:t},rr=function(t,e){return t.stype===Rt.Error?{stype:Rt.Error,serror:e(t.serror)}:t},or=Gn,ir=function(t,e,n,r){return{tag:"field",key:t,newKey:e,presence:n,prop:r}},ar=function(t,e,n){switch(t.tag){case"field":return e(t.key,t.newKey,t.presence,t.prop);case"custom":return n(t.newKey,t.instantiator)}},ur=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(0===e.length)throw new Error("Can't merge zero objects");for(var r={},o=0;o<e.length;o++){var i=e[o];for(var a in i)xt(i,a)&&(r[a]=t(r[a],i[a]))}return r}},cr=ur((function(t,e){return i(t)&&i(e)?cr(t,e):e})),sr=ur((function(t,e){return e})),lr=function(t){return{tag:"defaultedThunk",process:t}},fr=function(t){return lr(v(t))},dr=function(t){return{tag:"mergeWithThunk",process:t}},mr=function(t){return p(Zn,J)(t)},gr=function(t){var e=Qn(t);return e.errors.length>0?mr(e.errors):Jn(e.values)},hr=function(t){return i(t)&&lt(t).length>100?" removed due to size":JSON.stringify(t,null,2)},pr=function(t,e){return Zn([{path:t,getErrorInfo:e}])},vr=function(t){return{extract:function(e,n){return er(t(n),(function(t){return function(t,e){return pr(t,v(e))}(e,t)}))},toString:v("val")}},br=vr(Jn),yr=function(t,e,n,r){return yt(e,n).fold((function(){return function(t,e,n){return pr(t,(function(){return'Could not find valid *required* value for "'+e+'" in '+hr(n)}))}(t,n,e)}),r)},xr=function(t,e,n,r){return r(yt(t,e).getOrThunk((function(){return n(t)})))},wr=function(t,e,n,r,o){var i=function(t){return o.extract(e.concat([r]),t)},a=function(t){return t.fold((function(){return Jn(B.none())}),(function(t){var n=o.extract(e.concat([r]),t);return nr(n,B.some)}))};switch(t.tag){case"required":return yr(e,n,r,i);case"defaultedThunk":return xr(n,r,t.process,i);case"option":return function(t,e,n){return n(yt(t,e))}(n,r,a);case"defaultedOptionThunk":return function(t,e,n,r){return r(yt(t,e).map((function(e){return!0===e?n(t):e})))}(n,r,t.process,a);case"mergeWithThunk":return xr(n,r,v({}),(function(e){var r=cr(t.process(n),e);return i(r)}))}},Cr=function(t){return{extract:function(e,n){return t().extract(e,n)},toString:function(){return t().toString()}}},Sr=function(t){return lt(ht(t,f))},kr=function(t){var e=_r(t),n=$(t,(function(t,e){return ar(e,(function(e){var n;return cr(t,((n={})[e]=!0,n))}),v(t))}),{});return{extract:function(t,r){var o=c(r)?[]:Sr(r),i=G(o,(function(t){return!wt(n,t)}));return 0===i.length?e.extract(t,r):function(t,e){return pr(t,(function(){return"There are unsupported fields: ["+e.join(", ")+"] specified"}))}(t,i)},toString:e.toString}},_r=function(t){return{extract:function(e,n){return function(t,e,n){for(var r={},o=[],i=0,a=n;i<a.length;i++){var u=a[i];ar(u,(function(n,i,a,u){var c=wr(a,t,e,n,u);or(c,(function(t){o.push.apply(o,t)}),(function(t){r[i]=t}))}),(function(t,n){r[t]=n(e)}))}return o.length>0?Zn(o):Jn(r)}(e,n,t)},toString:function(){return"obj{\n"+j(t,(function(t){return ar(t,(function(t,e,n,r){return t+" -> "+r.toString()}),(function(t,e){return"state("+t+")"}))})).join("\n")+"}"}}},Or=function(t){return{extract:function(e,n){var r=j(n,(function(n,r){return t.extract(e.concat(["["+r+"]"]),n)}));return gr(r)},toString:function(){return"array("+t.toString()+")"}}},Er=function(t){return{extract:function(e,n){for(var r=[],o=0,i=t;o<i.length;o++){var a=i[o].extract(e,n);if(a.stype===Rt.Value)return a;r.push(a)}return gr(r)},toString:function(){return"oneOf("+j(t,(function(t){return t.toString()})).join(", ")+")"}}},zr=function(t,e){return{extract:function(n,r){var o=lt(r),i=function(e,n){return Or(vr(t)).extract(e,n)}(n,o);return tr(i,(function(t){var o=j(t,(function(t){return ir(t,t,{tag:"required",process:{}},e)}));return _r(o).extract(n,r)}))},toString:function(){return"setOf("+e.toString()+")"}}},Tr=p(Or,_r),Mr=v(br),Dr=function(t,e){return vr((function(n){var r=typeof n;return t(n)?Jn(n):Zn("Expected type: "+e+" but got: "+r)}))},Ar=Dr(m,"number"),Nr=Dr(o,"string"),Br=Dr(c,"boolean"),Rr=Dr(d,"function"),Hr=function(t){if(Object(t)!==t)return!0;switch({}.toString.call(t).slice(8,-1)){case"Boolean":case"Number":case"String":case"Date":case"RegExp":case"Blob":case"FileList":case"ImageData":case"ImageBitmap":case"ArrayBuffer":return!0;case"Array":case"Object":return Object.keys(t).every((function(e){return Hr(t[e])}));default:return!1}},Lr=vr((function(t){return Hr(t)?Jn(t):Zn("Expected value to be acceptable for sending via postMessage")})),Vr=function(t,e,n,r){return yt(n,r).fold((function(){return function(t,e,n){return pr(t,(function(){return'The chosen schema: "'+n+'" did not exist in branches: '+hr(e)}))}(t,n,r)}),(function(n){return n.extract(t.concat(["branch: "+r]),e)}))},Pr=function(t,e){return{extract:function(n,r){return yt(r,t).fold((function(){return function(t,e){return pr(t,(function(){return'Choice schema did not contain choice key: "'+e+'"'}))}(n,t)}),(function(t){return Vr(n,r,e,t)}))},toString:function(){return"chooseOn("+t+"). Possible values: "+lt(e)}}},Ir=function(t){return vr((function(e){return t(e).fold(Zn,Jn)}))},Fr=function(t,e){return zr((function(e){return Kn(t(e))}),e)},Ur=function(t,e,n){return Yn(function(t,e,n){var r=e.extract([t],n);return rr(r,(function(t){return{input:n,errors:t}}))}(t,e,n))},jr=function(t){return t.fold((function(t){throw new Error(qr(t))}),b)},Wr=function(t,e,n){return jr(Ur(t,e,n))},qr=function(t){return"Errors: \n"+(e=t.errors,n=e.length>10?e.slice(0,10).concat([{path:[],getErrorInfo:v("... (only showing first ten failures)")}]):e,j(n,(function(t){return"Failed path: ("+t.path.join(" > ")+")\n"+t.getErrorInfo()}))).join("\n")+"\n\nInput object: "+hr(t.input);var e,n},Gr=function(t,e){return Pr(t,mt(e,_r))},$r=ir,Xr=function(t,e){return{tag:"custom",newKey:t,instantiator:e}},Kr=function(t){return Ir((function(e){return P(t,e)?qn.value(e):qn.error('Unsupported value: "'+e+'", choose one of "'+t.join(", ")+'".')}))},Yr=function(t){return $r(t,t,{tag:"required",process:{}},Mr())},Jr=function(t,e){return $r(t,t,{tag:"required",process:{}},e)},Qr=function(t){return Jr(t,Ar)},Zr=function(t){return Jr(t,Nr)},to=function(t,e){return $r(t,t,{tag:"required",process:{}},Kr(e))},eo=function(t){return Jr(t,Rr)},no=function(t,e){return $r(t,t,{tag:"required",process:{}},_r(e))},ro=function(t,e){return $r(t,t,{tag:"required",process:{}},Tr(e))},oo=function(t,e){return $r(t,t,{tag:"required",process:{}},Or(e))},io=function(t){return $r(t,t,{tag:"option",process:{}},Mr())},ao=function(t,e){return $r(t,t,{tag:"option",process:{}},e)},uo=function(t){return ao(t,Ar)},co=function(t){return ao(t,Nr)},so=function(t){return ao(t,Rr)},lo=function(t,e){return ao(t,Or(e))},fo=function(t,e){return ao(t,_r(e))},mo=function(t,e){return $r(t,t,fr(e),Mr())},go=function(t,e,n){return $r(t,t,fr(e),n)},ho=function(t,e){return go(t,e,Ar)},po=function(t,e){return go(t,e,Nr)},vo=function(t,e,n){return go(t,e,Kr(n))},bo=function(t,e){return go(t,e,Br)},yo=function(t,e){return go(t,e,Rr)},xo=function(t,e,n){return go(t,e,Or(n))},wo=function(t,e,n){return go(t,e,_r(n))},Co=function(t){var e=t;return{get:function(){return e},set:function(t){e=t}}},So=function(t){if(!a(t))throw new Error("cases must be an array");if(0===t.length)throw new Error("there must be at least one case");var e=[],n={};return W(t,(function(r,o){var i=lt(r);if(1!==i.length)throw new Error("one and only one name per case");var u=i[0],c=r[u];if(void 0!==n[u])throw new Error("duplicate key detected:"+u);if("cata"===u)throw new Error("cannot have a case named cata (sorry)");if(!a(c))throw new Error("case arguments must be an array");e.push(u),n[u]=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=n.length;if(i!==c.length)throw new Error("Wrong number of arguments to case "+u+". Expected "+c.length+" ("+c+"), got "+i);var a=function(t){var r=lt(t);if(e.length!==r.length)throw new Error("Wrong number of arguments to match. Expected: "+e.join(",")+"\nActual: "+r.join(","));if(!Z(e,(function(t){return P(r,t)})))throw new Error("Not all branches were specified when using match. Specified: "+r.join(", ")+"\nRequired: "+e.join(", "));return t[u].apply(null,n)};return{fold:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(e.length!==t.length)throw new Error("Wrong number of arguments to fold. Expected "+t.length+", got "+e.length);var i=e[o];return i.apply(null,n)},match:a,log:function(t){console.log(t,{constructors:e,constructor:u,params:n})}}}})),n};So([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);var ko,_o=function(t,e){return function(t,e){var n={};return dt(t,(function(t,r){P(e,r)||(n[r]=t)})),n}(t,e)},Oo=function(t,e){return function(t,e){var n;return(n={})[t]=e,n}(t,e)},Eo=function(t){return function(t){var e={};return W(t,(function(t){e[t.key]=t.value})),e}(t)},zo=function(t,e){var n,r=function(t){var e=[],n=[];return W(t,(function(t){t.fold((function(t){e.push(t)}),(function(t){n.push(t)}))})),{errors:e,values:n}}(t);return r.errors.length>0?(n=r.errors,qn.error(J(n))):function(t,e){return 0===t.length?qn.value(e):qn.value(cr(e,sr.apply(void 0,t)))}(r.values,e)},To=function(t){return d(t)?t:S},Mo=function(t,e,n){for(var r=t.dom,o=To(n);r.parentNode;){r=r.parentNode;var i=Bt.fromDom(r),a=e(i);if(a.isSome())return a;if(o(i))break}return B.none()},Do=function(t,e,n){var r=e(t),o=To(n);return r.orThunk((function(){return o(t)?B.none():Mo(t,e,o)}))},Ao=function(t,e){return ye(t.element,e.event.target)},No={can:k,abort:S,run:h},Bo=function(t){if(!wt(t,"can")&&!wt(t,"abort")&&!wt(t,"run"))throw new Error("EventHandler defined by: "+JSON.stringify(t,null,2)+" does not have can, abort, or run!");return O(O({},No),t)},Ro=function(t){return{can:function(t,e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return X(t,(function(t,r){return t&&e(r).apply(void 0,n)}),!0)}}(t,(function(t){return t.can})),abort:function(t,e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return X(t,(function(t,r){return t||e(r).apply(void 0,n)}),!1)}}(t,(function(t){return t.abort})),run:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];W(t,(function(t){t.run.apply(void 0,e)}))}}},Ho=v,Lo=Ho("touchstart"),Vo=Ho("touchmove"),Po=Ho("touchend"),Io=Ho("touchcancel"),Fo=Ho("mousedown"),Uo=Ho("mousemove"),jo=Ho("mouseout"),Wo=Ho("mouseup"),qo=Ho("mouseover"),Go=Ho("focusin"),$o=Ho("focusout"),Xo=Ho("keydown"),Ko=Ho("keyup"),Yo=Ho("input"),Jo=Ho("change"),Qo=Ho("click"),Zo=Ho("transitioncancel"),ti=Ho("transitionend"),ei=Ho("transitionstart"),ni=Ho("selectstart"),ri=function(t){return v("alloy."+t)},oi={tap:ri("tap")},ii=ri("focus"),ai=ri("blur.post"),ui=ri("paste.post"),ci=ri("receive"),si=ri("execute"),li=ri("focus.item"),fi=oi.tap,di=ri("longpress"),mi=ri("sandbox.close"),gi=ri("typeahead.cancel"),hi=ri("system.init"),pi=ri("system.touchmove"),vi=ri("system.touchend"),bi=ri("system.scroll"),yi=ri("system.resize"),xi=ri("system.attached"),wi=ri("system.detached"),Ci=ri("system.dismissRequested"),Si=ri("system.repositionRequested"),ki=ri("focusmanager.shifted"),_i=ri("slotcontainer.visibility"),Oi=ri("change.tab"),Ei=ri("dismiss.tab"),zi=ri("highlight"),Ti=ri("dehighlight"),Mi=function(t,e){Bi(t,t.element,e,{})},Di=function(t,e,n){Bi(t,t.element,e,n)},Ai=function(t){Mi(t,si())},Ni=function(t,e,n){Bi(t,e,n,{})},Bi=function(t,e,n,r){var o=O({target:e},r);t.getSystem().triggerEvent(n,e,o)},Ri=function(t,e,n,r){t.getSystem().triggerEvent(n,e,r.event)},Hi=function(t){return Eo(t)},Li=function(t,e){return{key:t,value:Bo({abort:e})}},Vi=function(t){return{key:t,value:Bo({run:function(t,e){e.event.prevent()}})}},Pi=function(t,e){return{key:t,value:Bo({run:e})}},Ii=function(t,e,n){return{key:t,value:Bo({run:function(t,r){e.apply(void 0,[t,r].concat(n))}})}},Fi=function(t){return function(e){return{key:t,value:Bo({run:function(t,n){Ao(t,n)&&e(t,n)}})}}},Ui=function(t,e,n){return function(t,e){return Pi(t,(function(n,r){n.getSystem().getByUid(e).each((function(e){Ri(e,e.element,t,r)}))}))}(t,e.partUids[n])},ji=function(t,e){return Pi(t,(function(t,n){var r=n.event,o=t.getSystem().getByDom(r.target).getOrThunk((function(){return Do(r.target,(function(e){return t.getSystem().getByDom(e).toOptional()}),S).getOr(t)}));e(t,o,n)}))},Wi=function(t){return Pi(t,(function(t,e){e.cut()}))},qi=function(t){return Pi(t,(function(t,e){e.stop()}))},Gi=function(t,e){return Fi(t)(e)},$i=Fi(xi()),Xi=Fi(wi()),Ki=Fi(hi()),Yi=function(t){return function(e){return Pi(t,e)}}(si()),Ji=function(t){return t.dom.innerHTML},Qi=function(t,e){var n,r,o=Ce(t).dom,i=Bt.fromDom(o.createDocumentFragment()),a=(n=e,(r=(o||document).createElement("div")).innerHTML=n,ze(Bt.fromDom(r)));zn(i,a),Tn(t),En(t,i)},Zi=function(t){return function(t,e){return Bt.fromDom(t.dom.cloneNode(e))}(t,!1)},ta=function(t){return Ae(t)?"#shadow-root":function(t){var e=Bt.fromTag("div"),n=Bt.fromDom(t.dom.cloneNode(!0));return En(e,n),Ji(e)}(Zi(t))},ea=function(t){return ta(t)},na=Hi([function(t,e){return{key:t,value:Bo({can:e})}}(ii(),(function(t,e){var n=e.event,r=n.originator,o=n.target;return!function(t,e,n){return ye(e,t.element)&&!ye(e,n)}(t,r,o)||(console.warn(ii()+" did not get interpreted by the desired target. \nOriginator: "+ea(r)+"\nTarget: "+ea(o)+"\nCheck the "+ii()+" event handlers"),!1)}))]),ra=Object.freeze({__proto__:null,events:na}),oa=0,ia=function(t){var e=(new Date).getTime();return t+"_"+Math.floor(1e9*Math.random())+ ++oa+String(e)},aa=v("alloy-id-"),ua=v("data-alloy-id"),ca=aa(),sa=ua(),la=function(t,e){Object.defineProperty(t.dom,sa,{value:e,writable:!0})},fa=function(t){var e=Vt(t)?t.dom[sa]:null;return B.from(e)},da=function(t){return ia(t)},ma=b,ga=function(t){var e=function(e){return"The component must be in a context to execute: "+e+(t?"\n"+ea(t().element)+" is not in context.":"")},n=function(t){return function(){throw new Error(e(t))}},r=function(t){return function(){console.warn(e(t))}};return{debugInfo:v("fake"),triggerEvent:r("triggerEvent"),triggerFocus:r("triggerFocus"),triggerEscape:r("triggerEscape"),broadcast:r("broadcast"),broadcastOn:r("broadcastOn"),broadcastEvent:r("broadcastEvent"),build:n("build"),addToWorld:n("addToWorld"),removeFromWorld:n("removeFromWorld"),addToGui:n("addToGui"),removeFromGui:n("removeFromGui"),getByUid:n("getByUid"),getByDom:n("getByDom"),isConnected:S}},ha=ga(),pa=function(t){return j(t,(function(t){return Tt(t,"/*")?t.substring(0,t.length-"/*".length):t}))},va=function(t,e){var n=t.toString(),r=n.indexOf(")")+1,o=n.indexOf("("),i=n.substring(o+1,r-1).split(/,\s*/);return t.toFunctionAnnotation=function(){return{name:e,parameters:pa(i)}},t},ba=ia("alloy-premade"),ya=function(t){return Oo(ba,t)},xa=function(t){return function(t,e){var n=e.toString(),r=n.indexOf(")")+1,o=n.indexOf("("),i=n.substring(o+1,r-1).split(/,\s*/);return t.toFunctionAnnotation=function(){return{name:"OVERRIDE",parameters:pa(i.slice(1))}},t}((function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return t.apply(void 0,z([e.getApis(),e],n,!1))}),t)},wa={init:function(){return Ca({readState:v("No State required")})}},Ca=function(t){return t},Sa=function(t,e){var n={};return dt(t,(function(t,r){dt(t,(function(t,o){var i=yt(n,o).getOr([]);n[o]=i.concat([e(r,t)])}))})),n},ka=function(t){return{classes:s(t.classes)?[]:t.classes,attributes:s(t.attributes)?{}:t.attributes,styles:s(t.styles)?{}:t.styles}},_a=function(t){return t.cHandler},Oa=function(t,e){return{name:t,handler:e}},Ea=function(t,e,n){var r=O(O({},n),function(t,e){var n={};return W(t,(function(t){n[t.name()]=t.handlers(e)})),n}(e,t));return Sa(r,Oa)},za=function(t){var e=function(t){return d(t)?{can:k,abort:S,run:t}:t}(t);return function(t,n){for(var r=[],o=2;o<arguments.length;o++)r[o-2]=arguments[o];var i=[t,n].concat(r);e.abort.apply(void 0,i)?n.stop():e.can.apply(void 0,i)&&e.run.apply(void 0,i)}},Ta=function(t,e,n){var r=e[n];return r?function(t,e,n,r){try{var o=ot(n,(function(n,o){var i=n[e],a=o[e],u=r.indexOf(i),c=r.indexOf(a);if(-1===u)throw new Error("The ordering for "+t+" does not have an entry for "+i+".\nOrder specified: "+JSON.stringify(r,null,2));if(-1===c)throw new Error("The ordering for "+t+" does not have an entry for "+a+".\nOrder specified: "+JSON.stringify(r,null,2));return u<c?-1:c<u?1:0}));return qn.value(o)}catch(t){return qn.error([t])}}("Event: "+n,"name",t,r).map((function(t){var e=j(t,(function(t){return t.handler}));return Ro(e)})):function(t,e){return qn.error(["The event ("+t+') has more than one behaviour that listens to it.\nWhen this occurs, you must specify an event ordering for the behaviours in your spec (e.g. [ "listing", "toggling" ]).\nThe behaviours that can trigger it are: '+JSON.stringify(j(e,(function(t){return t.name})),null,2)])}(n,t)},Ma=function(t,e){var n=pt(t,(function(t,n){return(1===t.length?qn.value(t[0].handler):Ta(t,e,n)).map((function(r){var o=za(r),i=t.length>1?G(e[n],(function(e){return I(t,(function(t){return t.name===e}))})).join(" > "):t[0].name;return Oo(n,function(t,e){return{handler:t,purpose:e}}(o,i))}))}));return zo(n,{})},Da="alloy.base.behaviour",Aa=_r([$r("dom","dom",{tag:"required",process:{}},_r([Yr("tag"),mo("styles",{}),mo("classes",[]),mo("attributes",{}),io("value"),io("innerHtml")])),Yr("components"),Yr("uid"),mo("events",{}),mo("apis",{}),$r("eventOrder","eventOrder",function(t){return dr(v(t))}((ko={},ko[si()]=["disabling",Da,"toggling","typeaheadevents"],ko[ii()]=[Da,"focusing","keying"],ko[hi()]=[Da,"disabling","toggling","representing"],ko[Yo()]=[Da,"representing","streaming","invalidating"],ko[wi()]=[Da,"representing","item-events","tooltipping"],ko[Fo()]=["focusing",Da,"item-type-events"],ko[Lo()]=["focusing",Da,"item-type-events"],ko[qo()]=["item-type-events","tooltipping"],ko[ci()]=["receiving","reflecting","tooltipping"],ko)),Mr()),io("domModification")]),Na=function(t){return t.events},Ba=function(t,e){var n=Ge(t,e);return void 0===n||""===n?[]:n.split(" ")},Ra=function(t){return void 0!==t.dom.classList},Ha=function(t,e){return function(t,e,n){var r=Ba(t,e).concat([n]);return We(t,e,r.join(" ")),!0}(t,"class",e)},La=function(t,e){return function(t,e,n){var r=G(Ba(t,e),(function(t){return t!==n}));return r.length>0?We(t,e,r.join(" ")):Ke(t,e),!1}(t,"class",e)},Va=function(t,e){Ra(t)?t.dom.classList.add(e):Ha(t,e)},Pa=function(t){0===(Ra(t)?t.dom.classList:function(t){return Ba(t,"class")}(t)).length&&Ke(t,"class")},Ia=function(t,e){Ra(t)?t.dom.classList.remove(e):La(t,e);Pa(t)},Fa=function(t,e){return Ra(t)&&t.dom.classList.contains(e)},Ua=function(t,e){W(e,(function(e){Va(t,e)}))},ja=function(t,e){W(e,(function(e){Ia(t,e)}))},Wa=function(t){return t.dom.value},qa=function(t,e){if(void 0===e)throw new Error("Value.set was undefined");t.dom.value=e},Ga=function(t,e){return function(t,e){var n=j(e,(function(t){return fo(t.name(),[Yr("config"),mo("state",wa)])})),r=Ur("component.behaviours",_r(n),t.behaviours).fold((function(e){throw new Error(qr(e)+"\nComplete spec:\n"+JSON.stringify(t,null,2))}),b);return{list:e,data:mt(r,(function(t){var e=t.map((function(t){return{config:t.config,state:t.state.init(t.config)}}));return v(e)}))}}(t,e)},$a=function(t){var e=function(t){var e=yt(t,"behaviours").getOr({});return Q(lt(e),(function(t){var n=e[t];return f(n)?[n.me]:[]}))}(t);return Ga(t,e)},Xa=function(t,e,n){var r,o,i,a=O(O({},(r=t).dom),{uid:r.uid,domChildren:j(r.components,(function(t){return t.element}))}),u=function(t){return t.domModification.fold((function(){return ka({})}),ka)}(t),c={"alloy.base.modification":u},s=e.length>0?function(t,e,n,r){var o=O({},e);W(n,(function(e){o[e.name()]=e.exhibit(t,r)}));var i=Sa(o,(function(t,e){return{name:t,modification:e}})),a=function(t){return $(t,(function(t,e){return O(O({},e.modification),t)}),{})},u=$(i.classes,(function(t,e){return e.modification.concat(t)}),[]),c=a(i.attributes),s=a(i.styles);return ka({classes:u,attributes:c,styles:s})}(n,c,e,a):u;return i=s,O(O({},o=a),{attributes:O(O({},o.attributes),i.attributes),styles:O(O({},o.styles),i.styles),classes:o.classes.concat(i.classes)})},Ka=function(t,e,n){var r={"alloy.base.behaviour":Na(t)};return function(t,e,n,r){var o=Ea(t,n,r);return Ma(o,e)}(n,t.eventOrder,e,r).getOrDie()},Ya=function(t){var e=function(){return l},n=Co(ha),r=jr(function(t){return Ur("custom.definition",Aa,t)}(t)),o=$a(t),i=function(t){return t.list}(o),a=function(t){return t.data}(o),u=function(t){var e=Bt.fromTag(t.tag);qe(e,t.attributes),Ua(e,t.classes),Ze(e,t.styles),t.innerHtml.each((function(t){return Qi(e,t)}));var n=t.domChildren;return zn(e,n),t.value.each((function(t){qa(e,t)})),t.uid,la(e,t.uid),e}(Xa(r,i,a)),c=Ka(r,i,a),s=Co(r.components),l={uid:t.uid,getSystem:n.get,config:function(e){var n=a;return(d(n[e.name()])?n[e.name()]:function(){throw new Error("Could not find "+e.name()+" in "+JSON.stringify(t,null,2))})()},hasConfigured:function(t){return d(a[t.name()])},spec:t,readState:function(t){return a[t]().map((function(t){return t.state.readState()})).getOr("not enabled")},getApis:function(){return r.apis},connect:function(t){n.set(t)},disconnect:function(){n.set(ga(e))},element:u,syncComponents:function(){var t=ze(u),e=Q(t,(function(t){return n.get().getByDom(t).fold((function(){return[]}),rt)}));s.set(e)},components:s.get,events:c};return l},Ja=function(t){var e=ma(t),n=e.events,r=E(e,["events"]),o=function(t){var e=yt(t,"components").getOr([]);return j(e,eu)}(r),i=O(O({},r),{events:O(O({},ra),n),components:o});return qn.value(Ya(i))},Qa=function(t){var e=Bt.fromText(t);return Za({element:e})},Za=function(t){var e=Wr("external.component",kr([Yr("element"),io("uid")]),t),n=Co(ga()),r=e.uid.getOrThunk((function(){return da("external")}));la(e.element,r);var o={uid:r,getSystem:n.get,config:B.none,hasConfigured:S,connect:function(t){n.set(t)},disconnect:function(){n.set(ga((function(){return o})))},getApis:function(){return{}},element:e.element,spec:t,readState:v("No state"),syncComponents:h,components:v([]),events:{}};return ya(o)},tu=da,eu=function(t){return function(t){return yt(t,ba)}(t).getOrThunk((function(){var e=function(t){return xt(t,"uid")}(t)?t:O({uid:tu("")},t);return Ja(e).getOrDie()}))},nu=ya;function ru(t,e,n,r,o){return t(n,r)?B.some(n):d(o)&&o(n)?B.none():e(n,r,o)}var ou,iu=function(t,e,n){for(var r=t.dom,o=d(n)?n:S;r.parentNode;){r=r.parentNode;var i=Bt.fromDom(r);if(e(i))return B.some(i);if(o(i))break}return B.none()},au=function(t,e,n){return ru((function(t,e){return e(t)}),iu,t,e,n)},uu=function(t,e,n){return au(t,e,n).isSome()},cu=function(t,e,n){return iu(t,(function(t){return ve(t,e)}),n)},su=function(t,e){return function(t,e){return K(t.dom.childNodes,(function(t){return e(Bt.fromDom(t))})).map(Bt.fromDom)}(t,(function(t){return ve(t,e)}))},lu=function(t,e){return function(t,e){var n=void 0===e?document:e.dom;return be(n)?B.none():B.from(n.querySelector(t)).map(Bt.fromDom)}(e,t)},fu=function(t,e,n){return ru((function(t,e){return ve(t,e)}),cu,t,e,n)},du=function(){var t=ia("aria-owns");return{id:t,link:function(e){We(e,"aria-owns",t)},unlink:function(t){Ke(t,"aria-owns")}}},mu=function(t,e){return function(t){return au(t,(function(t){if(!Vt(t))return!1;var e=Ge(t,"id");return void 0!==e&&e.indexOf("aria-owns")>-1})).bind((function(t){var e=Ge(t,"id"),n=Re(t);return lu(n,'[aria-owns="'+e+'"]')}))}(e).exists((function(e){return gu(t,e)}))},gu=function(t,e){return uu(e,(function(e){return ye(e,t.element)}),S)||mu(t,e)},hu="unknown";!function(t){t[t.STOP=0]="STOP",t[t.NORMAL=1]="NORMAL",t[t.LOGGING=2]="LOGGING"}(ou||(ou={}));var pu=Co({}),vu=function(t,e,n){switch(yt(pu.get(),t).orThunk((function(){var e=lt(pu.get());return st(e,(function(e){return t.indexOf(e)>-1?B.some(pu.get()[e]):B.none()}))})).getOr(ou.NORMAL)){case ou.NORMAL:return n(xu());case ou.LOGGING:var r=function(t,e){var n=[],r=(new Date).getTime();return{logEventCut:function(t,e,r){n.push({outcome:"cut",target:e,purpose:r})},logEventStopped:function(t,e,r){n.push({outcome:"stopped",target:e,purpose:r})},logNoParent:function(t,e,r){n.push({outcome:"no-parent",target:e,purpose:r})},logEventNoHandlers:function(t,e){n.push({outcome:"no-handlers-left",target:e})},logEventResponse:function(t,e,r){n.push({outcome:"response",purpose:r,target:e})},write:function(){var o=(new Date).getTime();P(["mousemove","mouseover","mouseout",hi()],t)||console.log(t,{event:t,time:o-r,target:e.dom,sequence:j(n,(function(t){return P(["cut","stopped","response"],t.outcome)?"{"+t.purpose+"} "+t.outcome+" at ("+ea(t.target)+")":t.outcome}))})}}}(t,e),o=n(r);return r.write(),o;case ou.STOP:return!0}},bu=["alloy/data/Fields","alloy/debugging/Debugging"],yu=function(t,e,n){return vu(t,e,n)},xu=v({logEventCut:h,logEventStopped:h,logNoParent:h,logEventNoHandlers:h,logEventResponse:h,write:h}),wu=v([Yr("menu"),Yr("selectedMenu")]),Cu=v([Yr("item"),Yr("selectedItem")]);v(_r(Cu().concat(wu())));var Su=v(_r(Cu())),ku=no("initSize",[Yr("numColumns"),Yr("numRows")]),_u=function(){return no("markers",[Yr("backgroundMenu")].concat(wu()).concat(Cu()))},Ou=function(t){return no("markers",j(t,Yr))},Eu=function(t,e,n){return function(){var t=new Error;if(void 0!==t.stack){var e=t.stack.split("\n");return K(e,(function(t){return t.indexOf("alloy")>0&&!I(bu,(function(e){return t.indexOf(e)>-1}))})).getOr(hu)}}(),$r(e,e,n,Ir((function(t){return qn.value((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.apply(void 0,e)}))})))},zu=function(t){return Eu(0,t,fr(h))},Tu=function(t){return Eu(0,t,fr(B.none))},Mu=function(t){return Eu(0,t,{tag:"required",process:{}})},Du=function(t){return Eu(0,t,{tag:"required",process:{}})},Au=function(t,e){return Xr(t,v(e))},Nu=function(t){return Xr(t,b)},Bu=v(ku),Ru=function(t,e,n,r,o,i,a,u){return void 0===u&&(u=!1),{x:t,y:e,bubble:n,direction:r,placement:o,restriction:i,label:a+"-"+o,alwaysFit:u}},Hu=So([{southeast:[]},{southwest:[]},{northeast:[]},{northwest:[]},{south:[]},{north:[]},{east:[]},{west:[]}]),Lu=Hu.southeast,Vu=Hu.southwest,Pu=Hu.northeast,Iu=Hu.northwest,Fu=Hu.south,Uu=Hu.north,ju=Hu.east,Wu=Hu.west,qu=function(t,e,n,r){var o=t+e;return o>r?n:o<n?r:o},Gu=function(t,e,n){return Math.min(Math.max(t,e),n)},$u=function(t,e){return nt(["left","right","top","bottom"],(function(n){return yt(e,n).map((function(e){return function(t,e){switch(e){case 1:return t.x;case 0:return t.x+t.width;case 2:return t.y;case 3:return t.y+t.height}}(t,e)}))}))},Xu="layout",Ku=function(t){return t.x},Yu=function(t,e){return t.x+t.width/2-e.width/2},Ju=function(t,e){return t.x+t.width-e.width},Qu=function(t,e){return t.y-e.height},Zu=function(t){return t.y+t.height},tc=function(t,e){return t.y+t.height/2-e.height/2},ec=function(t,e,n){return Ru(Ku(t),Zu(t),n.southeast(),Lu(),"southeast",$u(t,{left:1,top:3}),Xu)},nc=function(t,e,n){return Ru(Ju(t,e),Zu(t),n.southwest(),Vu(),"southwest",$u(t,{right:0,top:3}),Xu)},rc=function(t,e,n){return Ru(Ku(t),Qu(t,e),n.northeast(),Pu(),"northeast",$u(t,{left:1,bottom:2}),Xu)},oc=function(t,e,n){return Ru(Ju(t,e),Qu(t,e),n.northwest(),Iu(),"northwest",$u(t,{right:0,bottom:2}),Xu)},ic=function(t,e,n){return Ru(Yu(t,e),Qu(t,e),n.north(),Uu(),"north",$u(t,{bottom:2}),Xu)},ac=function(t,e,n){return Ru(Yu(t,e),Zu(t),n.south(),Fu(),"south",$u(t,{top:3}),Xu)},uc=function(t,e,n){return Ru(function(t){return t.x+t.width}(t),tc(t,e),n.east(),ju(),"east",$u(t,{left:0}),Xu)},cc=function(t,e,n){return Ru(function(t,e){return t.x-e.width}(t,e),tc(t,e),n.west(),Wu(),"west",$u(t,{right:1}),Xu)},sc=function(){return[ec,nc,rc,oc,ac,ic,uc,cc]},lc=function(){return[nc,ec,oc,rc,ac,ic,uc,cc]},fc=function(){return[rc,oc,ec,nc,ic,ac]},dc=function(){return[oc,rc,nc,ec,ic,ac]},mc=function(){return[ec,nc,rc,oc,ac,ic]},gc=function(){return[nc,ec,oc,rc,ac,ic]},hc=Object.freeze({__proto__:null,events:function(t){return Hi([Pi(ci(),(function(e,n){var r=t.channels,o=lt(r),i=n,a=function(t,e){return e.universal?t:G(t,(function(t){return P(e.channels,t)}))}(o,i);W(a,(function(t){var n=r[t],o=n.schema,a=Wr("channel["+t+"] data\nReceiver: "+ea(e.element),o,i.data);n.onReceive(e,a)}))}))])}}),pc=[Jr("channels",Fr(qn.value,kr([Mu("onReceive"),mo("schema",Mr())])))],vc=function(t,e,n){return Ki((function(r,o){n(r,t,e)}))},bc=function(t,e,n){return function(t,e,n){var r=n.toString(),o=r.indexOf(")")+1,i=r.indexOf("("),a=r.substring(i+1,o-1).split(/,\s*/);return t.toFunctionAnnotation=function(){return{name:e,parameters:pa(a.slice(0,1).concat(a.slice(3)))}},t}((function(r){for(var o=[],i=1;i<arguments.length;i++)o[i-1]=arguments[i];var a=[r].concat(o);return r.config({name:v(t)}).fold((function(){throw new Error("We could not find any behaviour configuration for: "+t+". Using API: "+n)}),(function(t){var n=Array.prototype.slice.call(a,1);return e.apply(void 0,[r,t.config,t.state].concat(n))}))}),n,e)},yc=function(t){return{key:t,value:void 0}},xc=function(t,e,n,r,o,i,a){var u=function(t){return wt(t,n)?t[n]():B.none()},c=mt(o,(function(t,e){return bc(n,t,e)})),s=mt(i,(function(t,e){return va(t,e)})),l=O(O(O({},s),c),{revoke:x(yc,n),config:function(e){var r=Wr(n+"-config",t,e);return{key:n,value:{config:r,me:l,configAsRaw:Ut((function(){return Wr(n+"-config",t,e)})),initialConfig:e,state:a}}},schema:v(e),exhibit:function(t,e){return kt(u(t),yt(r,"exhibit"),(function(t,n){return n(e,t.config,t.state)})).getOrThunk((function(){return ka({})}))},name:v(n),handlers:function(t){return u(t).map((function(t){return yt(r,"events").getOr((function(){return{}}))(t.config,t.state)})).getOr({})}});return l},wc=function(t){return Eo(t)},Cc=kr([Yr("fields"),Yr("name"),mo("active",{}),mo("apis",{}),mo("state",wa),mo("extra",{})]),Sc=function(t){var e=Wr("Creating behaviour: "+t.name,Cc,t);return function(t,e,n,r,o,i){var a,u,c=kr(t),s=fo(e,[(a="config",u=t,ao(a,kr(u)))]);return xc(c,s,e,n,r,o,i)}(e.fields,e.name,e.active,e.apis,e.extra,e.state)},kc=kr([Yr("branchKey"),Yr("branches"),Yr("name"),mo("active",{}),mo("apis",{}),mo("state",wa),mo("extra",{})]),_c=function(t){var e=Wr("Creating behaviour: "+t.name,kc,t);return function(t,e,n,r,o,i){var a=t,u=fo(e,[ao("config",t)]);return xc(a,u,e,n,r,o,i)}(Gr(e.branchKey,e.branches),e.name,e.active,e.apis,e.extra,e.state)},Oc=v(void 0),Ec=Sc({fields:pc,name:"receiving",active:hc}),zc=Object.freeze({__proto__:null,exhibit:function(t,e){return ka({classes:[],styles:e.useFixed()?{}:{position:"relative"}})}}),Tc=function(){return Bt.fromDom(document)},Mc=function(t){return t.dom.focus()},Dc=function(t){var e=Re(t).dom;return t.dom===e.activeElement},Ac=function(t){return void 0===t&&(t=Tc()),B.from(t.dom.activeElement).map(Bt.fromDom)},Nc=function(t){return Ac(Re(t)).filter((function(e){return t.dom.contains(e.dom)}))},Bc=function(t,e){var n=Re(e),r=Ac(n).bind((function(t){var n,r,o=function(e){return ye(t,e)};return o(e)?B.some(e):(n=o,(r=function(t){for(var e=0;e<t.childNodes.length;e++){var o=Bt.fromDom(t.childNodes[e]);if(n(o))return B.some(o);var i=r(t.childNodes[e]);if(i.isSome())return i}return B.none()})(e.dom))})),o=t(e);return r.each((function(t){Ac(n).filter((function(e){return ye(e,t)})).fold((function(){Mc(t)}),h)})),o},Rc=function(t,e,n,r,o){var i=function(t){return t+"px"};return{position:t,left:e.map(i),top:n.map(i),right:r.map(i),bottom:o.map(i)}},Hc=function(t,e){tn(t,function(t){return O(O({},t),{position:B.some(t.position)})}(e))},Lc=So([{none:[]},{relative:["x","y","width","height"]},{fixed:["x","y","width","height"]}]),Vc=function(t,e,n,r,o,i){var a=e.rect,u=a.x-n,c=a.y-r,s=o-(u+a.width),l=i-(c+a.height),f=B.some(u),d=B.some(c),m=B.some(s),g=B.some(l),h=B.none();return function(t,e,n,r,o,i,a,u,c){return t.fold(e,n,r,o,i,a,u,c)}(e.direction,(function(){return Rc(t,f,d,h,h)}),(function(){return Rc(t,h,d,m,h)}),(function(){return Rc(t,f,h,h,g)}),(function(){return Rc(t,h,h,m,g)}),(function(){return Rc(t,f,d,h,h)}),(function(){return Rc(t,f,h,h,g)}),(function(){return Rc(t,f,d,h,h)}),(function(){return Rc(t,h,d,m,h)}))},Pc=function(t,e){return t.fold((function(){var t=e.rect;return Rc("absolute",B.some(t.x),B.some(t.y),B.none(),B.none())}),(function(t,n,r,o){return Vc("absolute",e,t,n,r,o)}),(function(t,n,r,o){return Vc("fixed",e,t,n,r,o)}))},Ic=function(t,e){var n=x(Vn,e),r=t.fold(n,n,(function(){var t=An();return Vn(e).translate(-t.left,-t.top)})),o=xn(e),i=dn(e);return Pn(r.left,r.top,o,i)},Fc=function(t,e){return e.fold((function(){return t.fold(Un,Un,Pn)}),(function(e){return t.fold(e,e,(function(){var n=e(),r=Uc(t,n.x,n.y);return Pn(r.left,r.top,n.width,n.height)}))}))},Uc=function(t,e,n){var r=gn(e,n);return t.fold(v(r),v(r),(function(){var t=An();return r.translate(-t.left,-t.top)}))};Lc.none;var jc,Wc=Lc.relative,qc=Lc.fixed,Gc=function(t,e){return function(t,e){return{anchorBox:t,origin:e}}(t,e)},$c="data-alloy-placement",Xc=function(t){return $e(t,$c)},Kc=So([{fit:["reposition"]},{nofit:["reposition","visibleW","visibleH","isVisible"]}]),Yc=function(t,e,n,r){var o=t.bubble,i=o.offset,a=function(t,e,n){var r=function(r,o){return e[r].map((function(e){var i="top"===r||"bottom"===r,a=i?n.top:n.left,u=("left"===r||"top"===r?Math.max:Math.min)(e,o)+a;return i?Gu(u,t.y,t.bottom):Gu(u,t.x,t.right)})).getOr(o)},o=r("left",t.x),i=r("top",t.y),a=r("right",t.right),u=r("bottom",t.bottom);return Pn(o,i,a-o,u-i)}(r,t.restriction,i),u=t.x+i.left,c=t.y+i.top,s=Pn(u,c,e,n),l=function(t,e){var n=e.x,r=e.y,o=e.right,i=e.bottom,a=t.x,u=t.y,c=t.right,s=t.bottom,l=t.width,f=t.height;return{originInBounds:a>=n&&a<=o&&u>=r&&u<=i,sizeInBounds:c<=o&&c>=n&&s<=i&&s>=r,visibleW:Math.min(l,a>=n?o-a:c-n),visibleH:Math.min(f,u>=r?i-u:s-r)}}(s,a),f=l.originInBounds,d=l.sizeInBounds,m=l.visibleW,g=l.visibleH,h=f&&d,p=h?s:function(t,e){var n=e.x,r=e.y,o=e.right,i=e.bottom,a=t.x,u=t.y,c=t.width,s=t.height,l=Math.max(n,o-c),f=Math.max(r,i-s),d=Gu(a,n,l),m=Gu(u,r,f),g=Math.min(d+c,o)-d,h=Math.min(m+s,i)-m;return Pn(d,m,g,h)}(s,a),b=p.width>0&&p.height>0,y=function(t,e,n){var r=v(e.bottom-n.y),o=v(n.bottom-e.y),i=function(t,e,n,r){return t.fold(e,e,r,r,e,r,n,n)}(t,o,o,r),a=v(e.right-n.x),u=v(n.right-e.x);return{maxWidth:function(t,e,n,r){return t.fold(e,r,e,r,n,n,e,r)}(t,u,u,a),maxHeight:i}}(t.direction,p,r),x=y.maxWidth,w={rect:p,maxHeight:y.maxHeight,maxWidth:x,direction:t.direction,placement:t.placement,classes:{on:o.classesOn,off:o.classesOff},layout:t.label,testY:c};return h||t.alwaysFit?Kc.fit(w):Kc.nofit(w,m,g,b)},Jc=function(t){var e=Co(B.none()),n=function(){return e.get().each(t)};return{clear:function(){n(),e.set(B.none())},isSet:function(){return e.get().isSome()},get:function(){return e.get()},set:function(t){n(),e.set(B.some(t))}}},Qc=function(){return Jc((function(t){return t.destroy()}))},Zc=function(){return Jc((function(t){return t.unbind()}))},ts=function(){var t=Jc(h);return O(O({},t),{on:function(e){return t.get().each(e)}})},es=k,ns=function(t,e,n){return function(t,e,n,r){return Cn(t,e,n,r,!1)}(t,e,es,n)},rs=function(t,e,n){return function(t,e,n,r){return Cn(t,e,n,r,!0)}(t,e,es,n)},os=wn,is=["top","bottom","right","left"],as="data-alloy-transition-timer",us=function(t,e){return function(t,e){return Z(e,(function(e){return Fa(t,e)}))}(t,e.classes)},cs=function(t,e){var n=function(t){return parseFloat(t).toFixed(3)};return vt(e,(function(e,r){var o,i,a,u=t[r].map(n),c=e.map(n);return void 0===a&&(a=y),!kt(o=u,i=c,a).getOr(o.isNone()&&i.isNone())})).isSome()},ss=function(t,e){var n,r=Zc(),i=Zc(),a=function(e){var n,r=null!==(n=e.raw.pseudoElement)&&void 0!==n?n:"";return ye(e.target,t)&&!Dt(r)&&P(is,e.raw.propertyName)},u=function(o){if(l(o)||a(o)){r.clear(),i.clear();var u=null==o?void 0:o.raw.type;(l(u)||u===ti())&&(clearTimeout(n),Ke(t,as),ja(t,e.classes))}},c=function(){r.set(ns(t,ti(),u)),i.set(ns(t,Zo(),u))};if("ontransitionstart"in t.dom)var s=ns(t,ei(),(function(t){a(t)&&(s.unbind(),c())}));else c();var f=function(t){var e=function(e){var n=en(t,e),r=o(n)?n.split(/\s*,\s*/):[];return G(r,Dt)},n=function(t){if(o(t)&&/^[\d.]+/.test(t)){var e=parseFloat(t);return Tt(t,"ms")?e:1e3*e}return 0},r=e("transition-delay"),i=e("transition-duration");return X(i,(function(t,e,o){var i=n(r[o])+n(e);return Math.max(t,i)}),0)}(t);requestAnimationFrame((function(){n=setTimeout(u,f+17),We(t,as,n)}))},ls=function(t,e,n,r,o,i){var a=function(t,e,n){return n.exists((function(n){var r=t.mode;return"all"===r||n[r]!==e[r]}))}(r,o,i);if(a||us(t,r)){Qe(t,"position",n.position);var u=Ic(e,t),c=Pc(e,O(O({},o),{rect:u})),s=nt(is,(function(t){return c[t]}));cs(n,s)&&(tn(t,s),a&&function(t,e){Ua(t,e.classes),$e(t,as).each((function(e){clearTimeout(parseInt(e,10)),Ke(t,as)})),ss(t,e)}(t,r),cn(t))}else ja(t,r.classes)},fs=function(t,e,n,r){un(e,"max-height"),un(e,"max-width");var o,i={width:xn(o=e),height:dn(o)};return function(t,e,n,r,o,i){var a=r.width,u=r.height,c=function(e,c,s,l,f){var d=e(n,r,o,t,i),m=Yc(d,a,u,i);return m.fold(v(m),(function(t,e,n,r){return(f===r?n>l||e>s:!f&&r)?m:Kc.nofit(c,s,l,f)}))};return X(e,(function(t,e){var n=x(c,e);return t.fold(v(t),n)}),Kc.nofit({rect:n,maxHeight:r.height,maxWidth:r.width,direction:Lu(),placement:"southeast",classes:{on:[],off:[]},layout:"none",testY:n.y},-1,-1,!1)).fold(b,b)}(e,r.preference,t,i,n,r.bounds)},ds=function(t,e){!function(t,e){We(t,$c,e)}(t,e.placement)},ms=function(t,e){!function(t,e){var n=ln.max(t,e,["margin-top","border-top-width","padding-top","padding-bottom","border-bottom-width","margin-bottom"]);Qe(t,"max-height",n+"px")}(t,Math.floor(e))},gs=v((function(t,e){ms(t,e),Ze(t,{"overflow-x":"hidden","overflow-y":"auto"})})),hs=v((function(t,e){ms(t,e)})),ps=function(t,e,n){return void 0===t[e]?n:t[e]},vs=function(t,e,n,r){var o=fs(t,e,n,r);return function(t,e,n){var r=Pc(n.origin,e);n.transition.each((function(o){ls(t,n.origin,r,o,e,n.lastPlacement)})),Hc(t,r)}(e,o,r),ds(e,o),function(t,e){var n=e.classes;ja(t,n.off),Ua(t,n.on)}(e,o),function(t,e,n){(0,n.maxHeightFunction)(t,e.maxHeight)}(e,o,r),function(t,e,n){(0,n.maxWidthFunction)(t,e.maxWidth)}(e,o,r),{layout:o.layout,placement:o.placement}},bs=["valignCentre","alignLeft","alignRight","alignCentre","top","bottom","left","right","inset"],ys=function(t,e,n,r){void 0===r&&(r=1);var o=t*r,i=e*r,a=function(t){return yt(n,t).getOr([])},u=function(t,e,n){var r=et(bs,n);return{offset:gn(t,e),classesOn:Q(n,a),classesOff:Q(r,a)}};return{southeast:function(){return u(-t,e,["top","alignLeft"])},southwest:function(){return u(t,e,["top","alignRight"])},south:function(){return u(-t/2,e,["top","alignCentre"])},northeast:function(){return u(-t,-e,["bottom","alignLeft"])},northwest:function(){return u(t,-e,["bottom","alignRight"])},north:function(){return u(-t/2,-e,["bottom","alignCentre"])},east:function(){return u(t,-e/2,["valignCentre","left"])},west:function(){return u(-t,-e/2,["valignCentre","right"])},insetNortheast:function(){return u(o,i,["top","alignLeft","inset"])},insetNorthwest:function(){return u(-o,i,["top","alignRight","inset"])},insetNorth:function(){return u(-o/2,i,["top","alignCentre","inset"])},insetSoutheast:function(){return u(o,-i,["bottom","alignLeft","inset"])},insetSouthwest:function(){return u(-o,-i,["bottom","alignRight","inset"])},insetSouth:function(){return u(-o/2,-i,["bottom","alignCentre","inset"])},insetEast:function(){return u(-o,-i/2,["valignCentre","right","inset"])},insetWest:function(){return u(o,-i/2,["valignCentre","left","inset"])}}},xs=function(){return ys(0,0,{})},ws=b,Cs=function(t,e){return function(n){return"rtl"===Ss(n)?e:t}},Ss=function(t){return"rtl"===en(t,"direction")?"rtl":"ltr"};!function(t){t.TopToBottom="toptobottom",t.BottomToTop="bottomtotop"}(jc||(jc={}));var ks="data-alloy-vertical-dir",_s=function(t){return uu(t,(function(t){return Vt(t)&&Ge(t,"data-alloy-vertical-dir")===jc.BottomToTop}))},Os=function(){return fo("layouts",[Yr("onLtr"),Yr("onRtl"),io("onBottomLtr"),io("onBottomRtl")])},Es=function(t,e,n,r,o,i,a){var u=a.map(_s).getOr(!1),c=e.layouts.map((function(e){return e.onLtr(t)})),s=e.layouts.map((function(e){return e.onRtl(t)})),l=u?e.layouts.bind((function(e){return e.onBottomLtr.map((function(e){return e(t)}))})).or(c).getOr(o):c.getOr(n),f=u?e.layouts.bind((function(e){return e.onBottomRtl.map((function(e){return e(t)}))})).or(s).getOr(i):s.getOr(r);return Cs(l,f)(t)},zs=[Yr("hotspot"),io("bubble"),mo("overrides",{}),Os(),Au("placement",(function(t,e,n){var r=e.hotspot,o=Ic(n,r.element),i=Es(t.element,e,mc(),gc(),fc(),dc(),B.some(e.hotspot.element));return B.some(ws({anchorBox:o,bubble:e.bubble.getOr(xs()),overrides:e.overrides,layouts:i,placer:B.none()}))}))],Ts=[Yr("x"),Yr("y"),mo("height",0),mo("width",0),mo("bubble",xs()),mo("overrides",{}),Os(),Au("placement",(function(t,e,n){var r=Uc(n,e.x,e.y),o=Pn(r.left,r.top,e.width,e.height),i=Es(t.element,e,sc(),lc(),sc(),lc(),B.none());return B.some(ws({anchorBox:o,bubble:e.bubble,overrides:e.overrides,layouts:i,placer:B.none()}))}))],Ms=So([{screen:["point"]},{absolute:["point","scrollLeft","scrollTop"]}]),Ds=function(t){return t.fold(b,(function(t,e,n){return t.translate(-e,-n)}))},As=function(t){return t.fold(b,b)},Ns=function(t){return X(t,(function(t,e){return t.translate(e.left,e.top)}),gn(0,0))},Bs=function(t){var e=j(t,As);return Ns(e)},Rs=Ms.screen,Hs=Ms.absolute,Ls=function(t,e,n){var r=Ce(t.element),o=An(r),i=function(t,e,n){var r=_e(n.root).dom;return B.from(r.frameElement).map(Bt.fromDom).filter((function(e){var n=Ce(e),r=Ce(t.element);return ye(n,r)})).map(pn)}(t,0,n).getOr(o);return Hs(i,o.left,o.top)},Vs=function(t,e,n,r){var o=Rs(gn(t,e));return B.some(function(t,e,n){return{point:t,width:e,height:n}}(o,n,r))},Ps=function(t,e,n,r,o){return t.map((function(t){var i,a,u,c=[e,t.point],s=(i=function(){return Bs(c)},a=function(){return Bs(c)},u=function(){return function(t){var e=j(t,Ds);return Ns(e)}(c)},r.fold(i,a,u)),l=function(t,e,n,r){return{x:t,y:e,width:n,height:r}}(s.left,s.top,t.width,t.height),f=n.showAbove?fc():mc(),d=n.showAbove?dc():gc(),m=Es(o,n,f,d,f,d,B.none());return ws({anchorBox:l,bubble:n.bubble.getOr(xs()),overrides:n.overrides,layouts:m,placer:B.none()})}))},Is=[Yr("node"),Yr("root"),io("bubble"),Os(),mo("overrides",{}),mo("showAbove",!1),Au("placement",(function(t,e,n){var r=Ls(t,0,e);return e.node.filter(Ie).bind((function(o){var i=o.dom.getBoundingClientRect(),a=Vs(i.left,i.top,i.width,i.height),u=e.node.getOr(t.element);return Ps(a,r,e,n,u)}))}))],Fs=function(t,e,n,r){return{start:t,soffset:e,finish:n,foffset:r}},Us=So([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),js=(Us.before,Us.on,Us.after,function(t){return t.fold(b,b,b)}),Ws=So([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),qs={domRange:Ws.domRange,relative:Ws.relative,exact:Ws.exact,exactFromRange:function(t){return Ws.exact(t.start,t.soffset,t.finish,t.foffset)},getWin:function(t){var e=function(t){return t.match({domRange:function(t){return Bt.fromDom(t.startContainer)},relative:function(t,e){return js(t)},exact:function(t,e,n,r){return t}})}(t);return _e(e)},range:Fs},Gs=function(t,e,n){var r,o=t.document.createRange();return r=o,e.fold((function(t){r.setStartBefore(t.dom)}),(function(t,e){r.setStart(t.dom,e)}),(function(t){r.setStartAfter(t.dom)})),function(t,e){e.fold((function(e){t.setEndBefore(e.dom)}),(function(e,n){t.setEnd(e.dom,n)}),(function(e){t.setEndAfter(e.dom)}))}(o,n),o},$s=function(t,e,n,r,o){var i=t.document.createRange();return i.setStart(e.dom,n),i.setEnd(r.dom,o),i},Xs=function(t){return{left:t.left,top:t.top,right:t.right,bottom:t.bottom,width:t.width,height:t.height}},Ks=So([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),Ys=function(t,e,n){return e(Bt.fromDom(n.startContainer),n.startOffset,Bt.fromDom(n.endContainer),n.endOffset)},Js=function(t,e){return function(t,e){var n=e.ltr();return n.collapsed?e.rtl().filter((function(t){return!1===t.collapsed})).map((function(t){return Ks.rtl(Bt.fromDom(t.endContainer),t.endOffset,Bt.fromDom(t.startContainer),t.startOffset)})).getOrThunk((function(){return Ys(0,Ks.ltr,n)})):Ys(0,Ks.ltr,n)}(0,function(t,e){return e.match({domRange:function(t){return{ltr:v(t),rtl:B.none}},relative:function(e,n){return{ltr:Ut((function(){return Gs(t,e,n)})),rtl:Ut((function(){return B.some(Gs(t,n,e))}))}},exact:function(e,n,r,o){return{ltr:Ut((function(){return $s(t,e,n,r,o)})),rtl:Ut((function(){return B.some($s(t,r,o,e,n))}))}}})}(t,e))},Qs=function(t,e){return Js(t,e).match({ltr:function(e,n,r,o){var i=t.document.createRange();return i.setStart(e.dom,n),i.setEnd(r.dom,o),i},rtl:function(e,n,r,o){var i=t.document.createRange();return i.setStart(r.dom,o),i.setEnd(e.dom,n),i}})};Ks.ltr,Ks.rtl;var Zs,tl=function(t,e){var n=function(e){return t(e)?B.from(e.dom.nodeValue):B.none()};return{get:function(r){if(!t(r))throw new Error("Can only get "+e+" value of a "+e+" node");return n(r).getOr("")},getOption:n,set:function(n,r){if(!t(n))throw new Error("Can only set raw "+e+" value of a "+e+" node");n.dom.nodeValue=r}}}(Pt,"text"),el=function(t){return tl.getOption(t)},nl=["img","br"],rl=function(t){return el(t).filter((function(t){return 0!==t.trim().length||t.indexOf(" ")>-1})).isSome()||P(nl,Ht(t))},ol=function(t,e){var n=function(t){for(var r=ze(t),o=r.length-1;o>=0;o--){var i=r[o];if(e(i))return B.some(i);var a=n(i);if(a.isSome())return a}return B.none()};return n(t)},il=function(t,e){return function(t,e){var n=void 0===e?document:e.dom;return be(n)?[]:j(n.querySelectorAll(t),Bt.fromDom)}(e,t)},al=function(t,e,n,r){var o=function(t,e,n,r){var o=Ce(t).dom.createRange();return o.setStart(t.dom,e),o.setEnd(n.dom,r),o}(t,e,n,r),i=ye(t,n)&&e===r;return o.collapsed&&!i},ul=function(t){if(t.rangeCount>0){var e=t.getRangeAt(0),n=t.getRangeAt(t.rangeCount-1);return B.some(Fs(Bt.fromDom(e.startContainer),e.startOffset,Bt.fromDom(n.endContainer),n.endOffset))}return B.none()},cl=function(t){if(null===t.anchorNode||null===t.focusNode)return ul(t);var e=Bt.fromDom(t.anchorNode),n=Bt.fromDom(t.focusNode);return al(e,t.anchorOffset,n,t.focusOffset)?B.some(Fs(e,t.anchorOffset,n,t.focusOffset)):ul(t)},sl=function(t){return function(t){return B.from(t.getSelection())}(t).filter((function(t){return t.rangeCount>0})).bind(cl)},ll=function(t,e){return function(t){var e=t.getClientRects(),n=e.length>0?e[0]:t.getBoundingClientRect();return n.width>0||n.height>0?B.some(n).map(Xs):B.none()}(Qs(t,e))},fl=function(t,e){return function(t){var e=t.getBoundingClientRect();return e.width>0||e.height>0?B.some(e).map(Xs):B.none()}(Qs(t,e))},dl=function(t,e){return{element:t,offset:e}},ml=function(t,e){var n=ze(t);if(0===n.length)return dl(t,e);if(e<n.length)return dl(n[e],0);var r=n[n.length-1],o=Pt(r)?function(t){return tl.get(t)}(r).length:ze(r).length;return dl(r,o)},gl=function(t,e){return Pt(t)?dl(t,e):ml(t,e)},hl=function(t,e){return e.getSelection.getOrThunk((function(){return function(){return sl(t)}}))().map((function(t){var e=gl(t.start,t.soffset),n=gl(t.finish,t.foffset);return qs.range(e.element,e.offset,n.element,n.offset)}))},pl=[io("getSelection"),Yr("root"),io("bubble"),Os(),mo("overrides",{}),mo("showAbove",!1),Au("placement",(function(t,e,n){var r=_e(e.root).dom,o=Ls(t,0,e),i=hl(r,e).bind((function(t){return fl(r,qs.exactFromRange(t)).orThunk((function(){var e=Bt.fromText("\ufeff");kn(t.start,e);var n=ll(r,qs.exact(e,0,e,1));return Mn(e),n})).bind((function(t){return Vs(t.left,t.top,t.width,t.height)}))})),a=hl(r,e).bind((function(t){return Vt(t.start)?B.some(t.start):function(t){return Oe(t)}(t.start)})).getOr(t.element);return Ps(i,o,e,n,a)}))],vl="link-layout",bl=function(t){return t.x+t.width},yl=function(t,e){return t.x-e.width},xl=function(t,e){return t.y-e.height+t.height},wl=function(t){return t.y},Cl=function(t,e,n){return Ru(bl(t),wl(t),n.southeast(),Lu(),"southeast",$u(t,{left:0,top:2}),vl)},Sl=function(t,e,n){return Ru(yl(t,e),wl(t),n.southwest(),Vu(),"southwest",$u(t,{right:1,top:2}),vl)},kl=function(t,e,n){return Ru(bl(t),xl(t,e),n.northeast(),Pu(),"northeast",$u(t,{left:0,bottom:3}),vl)},_l=function(t,e,n){return Ru(yl(t,e),xl(t,e),n.northwest(),Iu(),"northwest",$u(t,{right:1,bottom:3}),vl)},Ol=function(){return[Cl,Sl,kl,_l]},El=function(){return[Sl,Cl,_l,kl]},zl=[Yr("item"),Os(),mo("overrides",{}),Au("placement",(function(t,e,n){var r=Ic(n,e.item.element),o=Es(t.element,e,Ol(),El(),Ol(),El(),B.none());return B.some(ws({anchorBox:r,bubble:xs(),overrides:e.overrides,layouts:o,placer:B.none()}))}))],Tl=Gr("type",{selection:pl,node:Is,hotspot:zs,submenu:zl,makeshift:Ts}),Ml=[oo("classes",Nr),vo("mode","all",["all","layout","placement"])],Dl=[mo("useFixed",S),io("getBounds")],Al=[Jr("anchor",Tl),fo("transition",Ml)],Nl=function(t,e,n,r,o,i,a){return function(t,e,n,r,o,i,a,u){var c=ps(a,"maxHeightFunction",gs()),s=ps(a,"maxWidthFunction",h),l=t.anchorBox,f=t.origin,d={bounds:Fc(f,i),origin:f,preference:r,maxHeightFunction:c,maxWidthFunction:s,lastPlacement:o,transition:u};return vs(l,e,n,d)}(Gc(n.anchorBox,e),o.element,n.bubble,n.layouts,i,r,n.overrides,a)},Bl=function(t,e,n,r,o,i){var a=i.map(In);return Rl(t,e,n,r,o,a)},Rl=function(t,e,n,r,o,i){var a=Wr("placement.info",_r(Al),o),u=a.anchor,c=r.element,s=n.get(r.uid);Bc((function(){Qe(c,"position","fixed");var o=rn(c,"visibility");Qe(c,"visibility","hidden");var l,f=e.useFixed()?(l=document.documentElement,qc(0,0,l.clientWidth,l.clientHeight)):function(t){var e=pn(t.element),n=t.element.dom.getBoundingClientRect();return Wc(e.left,e.top,n.width,n.height)}(t),d=u.placement,m=i.map(v).or(e.getBounds);d(t,u,f).each((function(e){var o=e.placer.getOr(Nl)(t,f,e,m,r,s,a.transition);n.set(r.uid,o)})),o.fold((function(){un(c,"visibility")}),(function(t){Qe(c,"visibility",t)})),rn(c,"left").isNone()&&rn(c,"top").isNone()&&rn(c,"right").isNone()&&rn(c,"bottom").isNone()&&Ct(rn(c,"position"),"fixed")&&un(c,"position")}),c)},Hl=Object.freeze({__proto__:null,position:function(t,e,n,r,o){Bl(t,e,n,r,o,B.none())},positionWithin:Bl,positionWithinBounds:Rl,getMode:function(t,e,n){return e.useFixed()?"fixed":"absolute"},reset:function(t,e,n,r){var o=r.element;W(["position","left","right","top","bottom"],(function(t){return un(o,t)})),function(t){Ke(t,$c)}(o),n.clear(r.uid)}}),Ll=Object.freeze({__proto__:null,init:function(){var t={};return Ca({readState:function(){return t},clear:function(e){f(e)?delete t[e]:t={}},set:function(e,n){t[e]=n},get:function(e){return yt(t,e)}})}}),Vl=Sc({fields:Dl,name:"positioning",active:zc,apis:Hl,state:Ll}),Pl=function(t){Mi(t,wi());var e=t.components();W(e,Pl)},Il=function(t){var e=t.components();W(e,Il),Mi(t,xi())},Fl=function(t,e){En(t.element,e.element)},Ul=function(t,e){var n=t.components();!function(t){W(t.components(),(function(t){return Mn(t.element)})),Tn(t.element),t.syncComponents()}(t);var r=et(n,e);W(r,(function(e){Pl(e),t.getSystem().removeFromWorld(e)})),W(e,(function(e){e.getSystem().isConnected()?Fl(t,e):(t.getSystem().addToWorld(e),Fl(t,e),Ie(t.element)&&Il(e)),t.syncComponents()}))},jl=function(t,e){Wl(t,e,En)},Wl=function(t,e,n){t.getSystem().addToWorld(e),n(t.element,e.element),Ie(t.element)&&Il(e),t.syncComponents()},ql=function(t){Pl(t),Mn(t.element),t.getSystem().removeFromWorld(t)},Gl=function(t){var e=Oe(t.element).bind((function(e){return t.getSystem().getByDom(e).toOptional()}));ql(t),e.each((function(t){t.syncComponents()}))},$l=function(t){var e=t.components();W(e,ql),Tn(t.element),t.syncComponents()},Xl=function(t,e){Kl(t,e,En)},Kl=function(t,e,n){n(t,e.element);var r=ze(e.element);W(r,(function(t){e.getByDom(t).each(Il)}))},Yl=function(t){var e=ze(t.element);W(e,(function(e){t.getByDom(e).each(Pl)})),Mn(t.element)},Jl=function(t,e,n,r){n.get().each((function(e){$l(t)}));var o=e.getAttachPoint(t);jl(o,t);var i=t.getSystem().build(r);return jl(t,i),n.set(i),i},Ql=function(t,e,n,r){var o=Jl(t,e,n,r);return e.onOpen(t,o),o},Zl=function(t,e,n){n.get().each((function(r){$l(t),Gl(t),e.onClose(t,r),n.clear()}))},tf=function(t,e,n){return n.isOpen()},ef=function(t,e,n){var r=e.getAttachPoint(t);Qe(t.element,"position",Vl.getMode(r)),function(t,e,n,r){rn(t.element,e).fold((function(){Ke(t.element,n)}),(function(e){We(t.element,n,e)})),Qe(t.element,e,r)}(t,"visibility",e.cloakVisibilityAttr,"hidden")},nf=function(t,e,n){(function(t){return I(["top","left","right","bottom"],(function(e){return rn(t,e).isSome()}))})(t.element)||un(t.element,"position"),function(t,e,n){$e(t.element,n).fold((function(){return un(t.element,e)}),(function(n){return Qe(t.element,e,n)}))}(t,"visibility",e.cloakVisibilityAttr)},rf=Object.freeze({__proto__:null,cloak:ef,decloak:nf,open:Ql,openWhileCloaked:function(t,e,n,r,o){ef(t,e),Ql(t,e,n,r),o(),nf(t,e)},close:Zl,isOpen:tf,isPartOf:function(t,e,n,r){return tf(0,0,n)&&n.get().exists((function(n){return e.isPartOf(t,n,r)}))},getState:function(t,e,n){return n.get()},setContent:function(t,e,n,r){return n.get().map((function(){return Jl(t,e,n,r)}))}}),of=Object.freeze({__proto__:null,events:function(t,e){return Hi([Pi(mi(),(function(n,r){Zl(n,t,e)}))])}}),af=[zu("onOpen"),zu("onClose"),Yr("isPartOf"),Yr("getAttachPoint"),mo("cloakVisibilityAttr","data-precloak-visibility")],uf=Sc({fields:af,name:"sandboxing",active:of,apis:rf,state:Object.freeze({__proto__:null,init:function(){var t=ts(),e=v("not-implemented");return Ca({readState:e,isOpen:t.isSet,clear:t.clear,set:t.set,get:t.get})}})}),cf=v("dismiss.popups"),sf=v("reposition.popups"),lf=v("mouse.released"),ff=kr([mo("isExtraPart",S),fo("fireEventInstead",[mo("event",Ci())])]),df=function(t){var e,n=Wr("Dismissal",ff,t);return(e={})[cf()]={schema:kr([Yr("target")]),onReceive:function(t,e){uf.isOpen(t)&&(uf.isPartOf(t,e.target)||n.isExtraPart(t,e.target)||n.fireEventInstead.fold((function(){return uf.close(t)}),(function(e){return Mi(t,e.event)})))}},e},mf=kr([fo("fireEventInstead",[mo("event",Si())]),eo("doReposition")]),gf=function(t){var e,n=Wr("Reposition",mf,t);return(e={})[sf()]={onReceive:function(t){uf.isOpen(t)&&n.fireEventInstead.fold((function(){return n.doReposition(t)}),(function(e){return Mi(t,e.event)}))}},e},hf=function(t,e,n){e.store.manager.onLoad(t,e,n)},pf=function(t,e,n){e.store.manager.onUnload(t,e,n)},vf=Object.freeze({__proto__:null,onLoad:hf,onUnload:pf,setValue:function(t,e,n,r){e.store.manager.setValue(t,e,n,r)},getValue:function(t,e,n){return e.store.manager.getValue(t,e,n)},getState:function(t,e,n){return n}}),bf=Object.freeze({__proto__:null,events:function(t,e){var n=t.resetOnDom?[$i((function(n,r){hf(n,t,e)})),Xi((function(n,r){pf(n,t,e)}))]:[vc(t,e,hf)];return Hi(n)}}),yf=function(){var t=Co(null);return Ca({set:t.set,get:t.get,isNotSet:function(){return null===t.get()},clear:function(){t.set(null)},readState:function(){return{mode:"memory",value:t.get()}}})},xf=function(){var t=Co({}),e=Co({});return Ca({readState:function(){return{mode:"dataset",dataByValue:t.get(),dataByText:e.get()}},lookup:function(n){return yt(t.get(),n).orThunk((function(){return yt(e.get(),n)}))},update:function(n){var r=t.get(),o=e.get(),i={},a={};W(n,(function(t){i[t.value]=t,yt(t,"meta").each((function(e){yt(e,"text").each((function(e){a[e]=t}))}))})),t.set(O(O({},r),i)),e.set(O(O({},o),a))},clear:function(){t.set({}),e.set({})}})},wf=Object.freeze({__proto__:null,memory:yf,dataset:xf,manual:function(){return Ca({readState:h})},init:function(t){return t.store.manager.state(t)}}),Cf=function(t,e,n,r){var o=e.store;n.update([r]),o.setValue(t,r),e.onSetValue(t,r)},Sf=[io("initialValue"),Yr("getFallbackEntry"),Yr("getDataKey"),Yr("setValue"),Au("manager",{setValue:Cf,getValue:function(t,e,n){var r=e.store,o=r.getDataKey(t);return n.lookup(o).getOrThunk((function(){return r.getFallbackEntry(o)}))},onLoad:function(t,e,n){e.store.initialValue.each((function(r){Cf(t,e,n,r)}))},onUnload:function(t,e,n){n.clear()},state:xf})],kf=[Yr("getValue"),mo("setValue",h),io("initialValue"),Au("manager",{setValue:function(t,e,n,r){e.store.setValue(t,r),e.onSetValue(t,r)},getValue:function(t,e,n){return e.store.getValue(t)},onLoad:function(t,e,n){e.store.initialValue.each((function(n){e.store.setValue(t,n)}))},onUnload:h,state:wa.init})],_f=[io("initialValue"),Au("manager",{setValue:function(t,e,n,r){n.set(r),e.onSetValue(t,r)},getValue:function(t,e,n){return n.get()},onLoad:function(t,e,n){e.store.initialValue.each((function(t){n.isNotSet()&&n.set(t)}))},onUnload:function(t,e,n){n.clear()},state:yf})],Of=[go("store",{mode:"memory"},Gr("mode",{memory:_f,manual:kf,dataset:Sf})),zu("onSetValue"),mo("resetOnDom",!1)],Ef=Sc({fields:Of,name:"representing",active:bf,apis:vf,extra:{setValueFrom:function(t,e){var n=Ef.getValue(e);Ef.setValue(t,n)}},state:wf}),zf=function(t,e){return wo(t,{},j(e,(function(e){return n=e.name(),r="Cannot configure "+e.name()+" for "+t,$r(n,n,{tag:"option",process:{}},vr((function(t){return Zn("The field: "+n+" is forbidden. "+r)})));var n,r})).concat([Xr("dump",b)]))},Tf=function(t){return t.dump},Mf=function(t,e){return O(O({},wc(e)),t.dump)},Df=zf,Af=Mf,Nf="placeholder",Bf=So([{single:["required","valueThunk"]},{multiple:["required","valueThunks"]}]),Rf=function(t){return xt(t,"uiType")},Hf=function(t,e,n,r){return Rf(n)&&n.uiType===Nf?function(t,e,n,r){return t.exists((function(t){return t!==n.owner}))?Bf.single(!0,v(n)):yt(r,n.name).fold((function(){throw new Error("Unknown placeholder component: "+n.name+"\nKnown: ["+lt(r)+"]\nNamespace: "+t.getOr("none")+"\nSpec: "+JSON.stringify(n,null,2))}),(function(t){return t.replace()}))}(t,0,n,r):Bf.single(!1,v(n))},Lf=function(t,e,n,r){return Hf(t,0,n,r).fold((function(o,i){var a=Rf(n)?i(e,n.config,n.validated):i(e),u=yt(a,"components").getOr([]),c=Q(u,(function(n){return Lf(t,e,n,r)}));return[O(O({},a),{components:c})]}),(function(t,r){if(Rf(n)){var o=r(e,n.config,n.validated);return n.validated.preprocess.getOr(b)(o)}return r(e)}))},Vf=function(t,e,n,r){var o=mt(r,(function(t,e){return r=t,o=!1,{name:v(n=e),required:function(){return r.fold((function(t,e){return t}),(function(t,e){return t}))},used:function(){return o},replace:function(){if(o)throw new Error("Trying to use the same placeholder more than once: "+n);return o=!0,r}};var n,r,o})),i=function(t,e,n,r){return Q(n,(function(n){return Lf(t,e,n,r)}))}(t,e,n,o);return dt(o,(function(n){if(!1===n.used()&&n.required())throw new Error("Placeholder: "+n.name()+" was not found in components list\nNamespace: "+t.getOr("none")+"\nComponents: "+JSON.stringify(e.components,null,2))})),i},Pf=Bf.single,If=Bf.multiple,Ff=v(Nf),Uf=So([{required:["data"]},{external:["data"]},{optional:["data"]},{group:["data"]}]),jf=mo("factory",{sketch:b}),Wf=mo("schema",[]),qf=Yr("name"),Gf=$r("pname","pname",lr((function(t){return"<alloy."+ia(t.name)+">"})),Mr()),$f=Xr("schema",(function(){return[io("preprocess")]})),Xf=mo("defaults",v({})),Kf=mo("overrides",v({})),Yf=_r([jf,Wf,qf,Gf,Xf,Kf]),Jf=_r([jf,Wf,qf,Xf,Kf]),Qf=_r([jf,Wf,qf,Gf,Xf,Kf]),Zf=_r([jf,$f,qf,Yr("unit"),Gf,Xf,Kf]),td=function(t){return t.fold(B.some,B.none,B.some,B.some)},ed=function(t){var e=function(t){return t.name};return t.fold(e,e,e,e)},nd=function(t,e){return function(n){var r=Wr("Converting part type",e,n);return t(r)}},rd=nd(Uf.required,Yf),od=nd(Uf.external,Jf),id=nd(Uf.optional,Qf),ad=nd(Uf.group,Zf),ud=v("entirety"),cd=Object.freeze({__proto__:null,required:rd,external:od,optional:id,group:ad,asNamedPart:td,name:ed,asCommon:function(t){return t.fold(b,b,b,b)},original:ud}),sd=function(t,e,n,r){return cr(e.defaults(t,n,r),n,{uid:t.partUids[e.name]},e.overrides(t,n,r))},ld=function(t,e){var n={};return W(e,(function(e){td(e).each((function(e){var r=fd(t,e.pname);n[e.name]=function(n){var o=Wr("Part: "+e.name+" in "+t,_r(e.schema),n);return O(O({},r),{config:n,validated:o})}}))})),n},fd=function(t,e){return{uiType:Ff(),owner:t,name:e}},dd=function(t,e,n){return{uiType:Ff(),owner:t,name:e,config:n,validated:{}}},md=function(t){return Q(t,(function(t){return t.fold(B.none,B.some,B.none,B.none).map((function(t){return no(t.name,t.schema.concat([Nu(ud())]))})).toArray()}))},gd=function(t){return j(t,ed)},hd=function(t,e,n){return function(t,e,n){var r={},o={};return W(n,(function(t){t.fold((function(t){r[t.pname]=Pf(!0,(function(e,n,r){return t.factory.sketch(sd(e,t,n,r))}))}),(function(t){var n=e.parts[t.name];o[t.name]=v(t.factory.sketch(sd(e,t,n[ud()]),n))}),(function(t){r[t.pname]=Pf(!1,(function(e,n,r){return t.factory.sketch(sd(e,t,n,r))}))}),(function(t){r[t.pname]=If(!0,(function(e,n,r){var o=e[t.name];return j(o,(function(n){return t.factory.sketch(cr(t.defaults(e,n,r),n,t.overrides(e,n)))}))}))}))})),{internals:v(r),externals:v(o)}}(0,e,n)},pd=function(t,e,n){return Vf(B.some(t),e,e.components,n)},vd=function(t,e,n){var r=e.partUids[n];return t.getSystem().getByUid(r).toOptional()},bd=function(t,e,n){return vd(t,e,n).getOrDie("Could not find part: "+n)},yd=function(t,e,n){var r={},o=e.partUids,i=t.getSystem();return W(n,(function(t){r[t]=v(i.getByUid(o[t]))})),r},xd=function(t,e){var n=t.getSystem();return mt(e.partUids,(function(t,e){return v(n.getByUid(t))}))},wd=function(t){return lt(t.partUids)},Cd=function(t,e,n){var r={},o=e.partUids,i=t.getSystem();return W(n,(function(t){r[t]=v(i.getByUid(o[t]).getOrDie())})),r},Sd=function(t,e){var n=gd(e);return Eo(j(n,(function(e){return{key:e,value:t+"-"+e}})))},kd=function(t){return $r("partUids","partUids",dr((function(e){return Sd(e.uid,t)})),Mr())},_d=Object.freeze({__proto__:null,generate:ld,generateOne:dd,schemas:md,names:gd,substitutes:hd,components:pd,defaultUids:Sd,defaultUidsSchema:kd,getAllParts:xd,getAllPartNames:wd,getPart:vd,getPartOrDie:bd,getParts:yd,getPartsOrDie:Cd}),Od=function(t,e,n,r,o){var i=function(t,e){return(t.length>0?[no("parts",t)]:[]).concat([Yr("uid"),mo("dom",{}),mo("components",[]),Nu("originalSpec"),mo("debug.sketcher",{})]).concat(e)}(r,o);return Wr(t+" [SpecSchema]",kr(i.concat(e)),n)},Ed=function(t,e,n,r,o){var i=zd(o),a=md(n),u=kd(n),c=Od(t,e,i,a,[u]),s=hd(0,c,n);return r(c,pd(t,c,s.internals()),i,s.externals())},zd=function(t){return function(t){return xt(t,"uid")}(t)?t:O(O({},t),{uid:da("uid")})},Td=kr([Yr("name"),Yr("factory"),Yr("configFields"),mo("apis",{}),mo("extraApis",{})]),Md=kr([Yr("name"),Yr("factory"),Yr("configFields"),Yr("partFields"),mo("apis",{}),mo("extraApis",{})]),Dd=function(t){var e=Wr("Sketcher for "+t.name,Td,t),n=mt(e.apis,xa),r=mt(e.extraApis,(function(t,e){return va(t,e)}));return O(O({name:e.name,configFields:e.configFields,sketch:function(t){return function(t,e,n,r){var o=zd(r);return n(Od(t,e,o,[],[]),o)}(e.name,e.configFields,e.factory,t)}},n),r)},Ad=function(t){var e=Wr("Sketcher for "+t.name,Md,t),n=ld(e.name,e.partFields),r=mt(e.apis,xa),o=mt(e.extraApis,(function(t,e){return va(t,e)}));return O(O({name:e.name,partFields:e.partFields,configFields:e.configFields,sketch:function(t){return Ed(e.name,e.configFields,e.partFields,e.factory,t)},parts:n},r),o)},Nd=function(t){return"input"===Ht(t)&&"radio"!==Ge(t,"type")||"textarea"===Ht(t)},Bd=Object.freeze({__proto__:null,getCurrent:function(t,e,n){return e.find(t)}}),Rd=[Yr("find")],Hd=Sc({fields:Rd,name:"composing",apis:Bd}),Ld=["input","button","textarea","select"],Vd=function(t,e,n){(e.disabled()?Wd:qd)(t,e)},Pd=function(t,e){return!0===e.useNative&&P(Ld,Ht(t.element))},Id=function(t){We(t.element,"disabled","disabled")},Fd=function(t){Ke(t.element,"disabled")},Ud=function(t){We(t.element,"aria-disabled","true")},jd=function(t){We(t.element,"aria-disabled","false")},Wd=function(t,e,n){e.disableClass.each((function(e){Va(t.element,e)})),(Pd(t,e)?Id:Ud)(t),e.onDisabled(t)},qd=function(t,e,n){e.disableClass.each((function(e){Ia(t.element,e)})),(Pd(t,e)?Fd:jd)(t),e.onEnabled(t)},Gd=function(t,e){return Pd(t,e)?function(t){return Xe(t.element,"disabled")}(t):function(t){return"true"===Ge(t.element,"aria-disabled")}(t)},$d=Object.freeze({__proto__:null,enable:qd,disable:Wd,isDisabled:Gd,onLoad:Vd,set:function(t,e,n,r){(r?Wd:qd)(t,e)}}),Xd=Object.freeze({__proto__:null,exhibit:function(t,e){return ka({classes:e.disabled()?e.disableClass.toArray():[]})},events:function(t,e){return Hi([Li(si(),(function(e,n){return Gd(e,t)})),vc(t,e,Vd)])}}),Kd=[yo("disabled",S),mo("useNative",!0),io("disableClass"),zu("onDisabled"),zu("onEnabled")],Yd=Sc({fields:Kd,name:"disabling",active:Xd,apis:$d}),Jd=function(t,e,n,r){var o=il(t.element,"."+e.highlightClass);W(o,(function(n){I(r,(function(t){return t.element===n}))||(Ia(n,e.highlightClass),t.getSystem().getByDom(n).each((function(n){e.onDehighlight(t,n),Mi(n,Ti())})))}))},Qd=function(t,e,n,r){Jd(t,e,0,[r]),Zd(t,e,n,r)||(Va(r.element,e.highlightClass),e.onHighlight(t,r),Mi(r,zi()))},Zd=function(t,e,n,r){return Fa(r.element,e.highlightClass)},tm=function(t,e,n,r){var o=il(t.element,"."+e.itemClass);return B.from(o[r]).fold((function(){return qn.error(new Error("No element found with index "+r))}),t.getSystem().getByDom)},em=function(t,e,n){return lu(t.element,"."+e.itemClass).bind((function(e){return t.getSystem().getByDom(e).toOptional()}))},nm=function(t,e,n){var r=il(t.element,"."+e.itemClass);return(r.length>0?B.some(r[r.length-1]):B.none()).bind((function(e){return t.getSystem().getByDom(e).toOptional()}))},rm=function(t,e,n,r){var o=il(t.element,"."+e.itemClass);return Y(o,(function(t){return Fa(t,e.highlightClass)})).bind((function(e){var n=qu(e,r,0,o.length-1);return t.getSystem().getByDom(o[n]).toOptional()}))},om=function(t,e,n){var r=il(t.element,"."+e.itemClass);return St(j(r,(function(e){return t.getSystem().getByDom(e).toOptional()})))},im=Object.freeze({__proto__:null,dehighlightAll:function(t,e,n){return Jd(t,e,0,[])},dehighlight:function(t,e,n,r){Zd(t,e,n,r)&&(Ia(r.element,e.highlightClass),e.onDehighlight(t,r),Mi(r,Ti()))},highlight:Qd,highlightFirst:function(t,e,n){em(t,e).each((function(r){Qd(t,e,n,r)}))},highlightLast:function(t,e,n){nm(t,e).each((function(r){Qd(t,e,n,r)}))},highlightAt:function(t,e,n,r){tm(t,e,n,r).fold((function(t){throw t}),(function(r){Qd(t,e,n,r)}))},highlightBy:function(t,e,n,r){var o=om(t,e);K(o,r).each((function(r){Qd(t,e,n,r)}))},isHighlighted:Zd,getHighlighted:function(t,e,n){return lu(t.element,"."+e.highlightClass).bind((function(e){return t.getSystem().getByDom(e).toOptional()}))},getFirst:em,getLast:nm,getPrevious:function(t,e,n){return rm(t,e,0,-1)},getNext:function(t,e,n){return rm(t,e,0,1)},getCandidates:om}),am=[Yr("highlightClass"),Yr("itemClass"),zu("onHighlight"),zu("onDehighlight")],um=Sc({fields:am,name:"highlighting",apis:im}),cm=[8],sm=[9],lm=[13],fm=[27],dm=[32],mm=[37],gm=[38],hm=[39],pm=[40],vm=function(t,e,n){var r=tt(t.slice(0,e)),o=tt(t.slice(e+1));return K(r.concat(o),n)},bm=function(t,e,n){var r=tt(t.slice(0,e));return K(r,n)},ym=function(t,e,n){var r=t.slice(0,e),o=t.slice(e+1);return K(o.concat(r),n)},xm=function(t,e,n){var r=t.slice(e+1);return K(r,n)},wm=function(t){return function(e){var n=e.raw;return P(t,n.which)}},Cm=function(t){return function(e){return Z(t,(function(t){return t(e)}))}},Sm=function(t){return!0===t.raw.shiftKey},km=function(t){return!0===t.raw.ctrlKey},_m=w(Sm),Om=function(t,e){return{matches:t,classification:e}},Em=function(t,e,n){e.exists((function(t){return n.exists((function(e){return ye(e,t)}))}))||Di(t,ki(),{prevFocus:e,newFocus:n})},zm=function(){var t=function(t){return Nc(t.element)};return{get:t,set:function(e,n){var r=t(e);e.getSystem().triggerFocus(n,e.element);var o=t(e);Em(e,r,o)}}},Tm=function(){var t=function(t){return um.getHighlighted(t).map((function(t){return t.element}))};return{get:t,set:function(e,n){var r=t(e);e.getSystem().getByDom(n).fold(h,(function(t){um.highlight(e,t)}));var o=t(e);Em(e,r,o)}}};!function(t){t.OnFocusMode="onFocus",t.OnEnterOrSpaceMode="onEnterOrSpace",t.OnApiMode="onApi"}(Zs||(Zs={}));var Mm,Dm=function(t,e,n,r,o){var i=function(t,e,n,r,o){var i,a,u=n(t,e,r,o);return(i=u,a=e.event,K(i,(function(t){return t.matches(a)})).map((function(t){return t.classification}))).bind((function(n){return n(t,e,r,o)}))},a={schema:function(){return t.concat([mo("focusManager",zm()),go("focusInside","onFocus",Ir((function(t){return P(["onFocus","onEnterOrSpace","onApi"],t)?qn.value(t):qn.error("Invalid value for focusInside")}))),Au("handler",a),Au("state",e),Au("sendFocusIn",o)])},processKey:i,toEvents:function(t,e){var a=t.focusInside!==Zs.OnFocusMode?B.none():o(t).map((function(n){return Pi(ii(),(function(r,o){n(r,t,e),o.stop()}))})),u=[Pi(Xo(),(function(r,a){i(r,a,n,t,e).fold((function(){!function(n,r){var i=wm(dm.concat(lm))(r.event);t.focusInside===Zs.OnEnterOrSpaceMode&&i&&Ao(n,r)&&o(t).each((function(o){o(n,t,e),r.stop()}))}(r,a)}),(function(t){a.stop()}))})),Pi(Ko(),(function(n,o){i(n,o,r,t,e).each((function(t){o.stop()}))}))];return Hi(a.toArray().concat(u))}};return a},Am=function(t){var e=[io("onEscape"),io("onEnter"),mo("selector",'[data-alloy-tabstop="true"]:not(:disabled)'),mo("firstTabstop",0),mo("useTabstopAt",k),io("visibilitySelector")].concat([t]),n=function(t,e){var n=t.visibilitySelector.bind((function(t){return fu(e,t)})).getOr(e);return fn(n)>0},r=function(t,e,r){(function(t,e){var r=il(t.element,e.selector),o=G(r,(function(t){return n(e,t)}));return B.from(o[e.firstTabstop])})(t,e).each((function(n){e.focusManager.set(t,n)}))},o=function(t,e,r,o,i){return i(e,r,(function(t){return function(t,e){return n(t,e)&&t.useTabstopAt(e)}(o,t)})).fold((function(){return o.cyclic?B.some(!0):B.none()}),(function(e){return o.focusManager.set(t,e),B.some(!0)}))},i=function(t,e,n,r){var i=il(t.element,n.selector);return function(t,e){return e.focusManager.get(t).bind((function(t){return fu(t,e.selector)}))}(t,n).bind((function(e){return Y(i,x(ye,e)).bind((function(e){return o(t,i,e,n,r)}))}))},a=v([Om(Cm([Sm,wm(sm)]),(function(t,e,n){var r=n.cyclic?vm:bm;return i(t,0,n,r)})),Om(wm(sm),(function(t,e,n){var r=n.cyclic?ym:xm;return i(t,0,n,r)})),Om(wm(fm),(function(t,e,n){return n.onEscape.bind((function(n){return n(t,e)}))})),Om(Cm([_m,wm(lm)]),(function(t,e,n){return n.onEnter.bind((function(n){return n(t,e)}))}))]),u=v([]);return Dm(e,wa.init,a,u,(function(){return B.some(r)}))},Nm=Am(Xr("cyclic",S)),Bm=Am(Xr("cyclic",k)),Rm=function(t,e,n){return Nd(n)&&wm(dm)(e.event)?B.none():function(t,e,n){return Ni(t,n,si()),B.some(!0)}(t,0,n)},Hm=function(t,e){return B.some(!0)},Lm=[mo("execute",Rm),mo("useSpace",!1),mo("useEnter",!0),mo("useControlEnter",!1),mo("useDown",!1)],Vm=function(t,e,n){return n.execute(t,e,t.element)},Pm=Dm(Lm,wa.init,(function(t,e,n,r){var o=n.useSpace&&!Nd(t.element)?dm:[],i=n.useEnter?lm:[],a=n.useDown?pm:[],u=o.concat(i).concat(a);return[Om(wm(u),Vm)].concat(n.useControlEnter?[Om(Cm([km,wm(lm)]),Vm)]:[])}),(function(t,e,n,r){return n.useSpace&&!Nd(t.element)?[Om(wm(dm),Hm)]:[]}),(function(){return B.none()})),Im=function(){var t=ts();return Ca({readState:function(){return t.get().map((function(t){return{numRows:String(t.numRows),numColumns:String(t.numColumns)}})).getOr({numRows:"?",numColumns:"?"})},setGridSize:function(e,n){t.set({numRows:e,numColumns:n})},getNumRows:function(){return t.get().map((function(t){return t.numRows}))},getNumColumns:function(){return t.get().map((function(t){return t.numColumns}))}})},Fm=Object.freeze({__proto__:null,flatgrid:Im,init:function(t){return t.state(t)}}),Um=function(t){return function(e,n,r,o){var i=t(e.element);return Gm(i,e,n,r,o)}},jm=function(t,e){var n=Cs(t,e);return Um(n)},Wm=function(t,e){var n=Cs(e,t);return Um(n)},qm=function(t){return function(e,n,r,o){return Gm(t,e,n,r,o)}},Gm=function(t,e,n,r,o){return r.focusManager.get(e).bind((function(n){return t(e.element,n,r,o)})).map((function(t){return r.focusManager.set(e,t),!0}))},$m=qm,Xm=qm,Km=qm,Ym=function(t){return!function(t){return t.offsetWidth<=0&&t.offsetHeight<=0}(t.dom)},Jm=function(t,e,n){var r=il(t,n);return function(t,e){return Y(t,e).map((function(e){return{index:e,candidates:t}}))}(G(r,Ym),(function(t){return ye(t,e)}))},Qm=function(t,e){return Y(t,(function(t){return ye(e,t)}))},Zm=function(t,e,n,r){return r(Math.floor(e/n),e%n).bind((function(e){var r=e.row*n+e.column;return r>=0&&r<t.length?B.some(t[r]):B.none()}))},tg=function(t,e,n,r,o){return Zm(t,e,r,(function(e,i){var a=e===n-1?t.length-e*r:r,u=qu(i,o,0,a-1);return B.some({row:e,column:u})}))},eg=function(t,e,n,r,o){return Zm(t,e,r,(function(e,i){var a=qu(e,o,0,n-1),u=a===n-1?t.length-a*r:r,c=Gu(i,0,u-1);return B.some({row:a,column:c})}))},ng=[Yr("selector"),mo("execute",Rm),Tu("onEscape"),mo("captureTab",!1),Bu()],rg=function(t,e,n){lu(t.element,e.selector).each((function(n){e.focusManager.set(t,n)}))},og=function(t){return function(e,n,r,o){return Jm(e,n,r.selector).bind((function(e){return t(e.candidates,e.index,o.getNumRows().getOr(r.initSize.numRows),o.getNumColumns().getOr(r.initSize.numColumns))}))}},ig=function(t,e,n){return n.captureTab?B.some(!0):B.none()},ag=og((function(t,e,n,r){return tg(t,e,n,r,-1)})),ug=og((function(t,e,n,r){return tg(t,e,n,r,1)})),cg=og((function(t,e,n,r){return eg(t,e,n,r,-1)})),sg=og((function(t,e,n,r){return eg(t,e,n,r,1)})),lg=v([Om(wm(mm),jm(ag,ug)),Om(wm(hm),Wm(ag,ug)),Om(wm(gm),$m(cg)),Om(wm(pm),Xm(sg)),Om(Cm([Sm,wm(sm)]),ig),Om(Cm([_m,wm(sm)]),ig),Om(wm(fm),(function(t,e,n){return n.onEscape(t,e)})),Om(wm(dm.concat(lm)),(function(t,e,n,r){return function(t,e){return e.focusManager.get(t).bind((function(t){return fu(t,e.selector)}))}(t,n).bind((function(r){return n.execute(t,e,r)}))}))]),fg=v([Om(wm(dm),Hm)]),dg=Dm(ng,Im,lg,fg,(function(){return B.some(rg)})),mg=function(t,e,n,r){var o=function(t,e,n){var i,a=qu(e,r,0,n.length-1);return a===t?B.none():(i=n[a],"button"===Ht(i)&&"disabled"===Ge(i,"disabled")?o(t,a,n):B.from(n[a]))};return Jm(t,n,e).bind((function(t){var e=t.index,n=t.candidates;return o(e,e,n)}))},gg=[Yr("selector"),mo("getInitial",B.none),mo("execute",Rm),Tu("onEscape"),mo("executeOnMove",!1),mo("allowVertical",!0)],hg=function(t,e,n){return function(t,e){return e.focusManager.get(t).bind((function(t){return fu(t,e.selector)}))}(t,n).bind((function(r){return n.execute(t,e,r)}))},pg=function(t,e,n){e.getInitial(t).orThunk((function(){return lu(t.element,e.selector)})).each((function(n){e.focusManager.set(t,n)}))},vg=function(t,e,n){return mg(t,n.selector,e,-1)},bg=function(t,e,n){return mg(t,n.selector,e,1)},yg=function(t){return function(e,n,r,o){return t(e,n,r,o).bind((function(){return r.executeOnMove?hg(e,n,r):B.some(!0)}))}},xg=function(t,e,n){return n.onEscape(t,e)},wg=v([Om(wm(dm),Hm)]),Cg=Dm(gg,wa.init,(function(t,e,n,r){var o=mm.concat(n.allowVertical?gm:[]),i=hm.concat(n.allowVertical?pm:[]);return[Om(wm(o),yg(jm(vg,bg))),Om(wm(i),yg(Wm(vg,bg))),Om(wm(lm),hg),Om(wm(dm),hg),Om(wm(fm),xg)]}),wg,(function(){return B.some(pg)})),Sg=function(t,e,n){return B.from(t[e]).bind((function(t){return B.from(t[n]).map((function(t){return{rowIndex:e,columnIndex:n,cell:t}}))}))},kg=function(t,e,n,r){var o=t[e].length,i=qu(n,r,0,o-1);return Sg(t,e,i)},_g=function(t,e,n,r){var o=qu(n,r,0,t.length-1),i=t[o].length,a=Gu(e,0,i-1);return Sg(t,o,a)},Og=function(t,e,n,r){var o=t[e].length,i=Gu(n+r,0,o-1);return Sg(t,e,i)},Eg=function(t,e,n,r){var o=Gu(n+r,0,t.length-1),i=t[o].length,a=Gu(e,0,i-1);return Sg(t,o,a)},zg=[no("selectors",[Yr("row"),Yr("cell")]),mo("cycles",!0),mo("previousSelector",B.none),mo("execute",Rm)],Tg=function(t,e,n){e.previousSelector(t).orThunk((function(){var n=e.selectors;return lu(t.element,n.cell)})).each((function(n){e.focusManager.set(t,n)}))},Mg=function(t,e){return function(n,r,o){var i=o.cycles?t:e;return fu(r,o.selectors.row).bind((function(t){var e=il(t,o.selectors.cell);return Qm(e,r).bind((function(e){var r=il(n,o.selectors.row);return Qm(r,t).bind((function(t){var n=function(t,e){return j(t,(function(t){return il(t,e.selectors.cell)}))}(r,o);return i(n,t,e).map((function(t){return t.cell}))}))}))}))}},Dg=Mg((function(t,e,n){return kg(t,e,n,-1)}),(function(t,e,n){return Og(t,e,n,-1)})),Ag=Mg((function(t,e,n){return kg(t,e,n,1)}),(function(t,e,n){return Og(t,e,n,1)})),Ng=Mg((function(t,e,n){return _g(t,n,e,-1)}),(function(t,e,n){return Eg(t,n,e,-1)})),Bg=Mg((function(t,e,n){return _g(t,n,e,1)}),(function(t,e,n){return Eg(t,n,e,1)})),Rg=v([Om(wm(mm),jm(Dg,Ag)),Om(wm(hm),Wm(Dg,Ag)),Om(wm(gm),$m(Ng)),Om(wm(pm),Xm(Bg)),Om(wm(dm.concat(lm)),(function(t,e,n){return Nc(t.element).bind((function(r){return n.execute(t,e,r)}))}))]),Hg=v([Om(wm(dm),Hm)]),Lg=Dm(zg,wa.init,Rg,Hg,(function(){return B.some(Tg)})),Vg=[Yr("selector"),mo("execute",Rm),mo("moveOnTab",!1)],Pg=function(t,e,n){return n.focusManager.get(t).bind((function(r){return n.execute(t,e,r)}))},Ig=function(t,e,n){lu(t.element,e.selector).each((function(n){e.focusManager.set(t,n)}))},Fg=function(t,e,n){return mg(t,n.selector,e,-1)},Ug=function(t,e,n){return mg(t,n.selector,e,1)},jg=v([Om(wm(gm),Km(Fg)),Om(wm(pm),Km(Ug)),Om(Cm([Sm,wm(sm)]),(function(t,e,n,r){return n.moveOnTab?Km(Fg)(t,e,n,r):B.none()})),Om(Cm([_m,wm(sm)]),(function(t,e,n,r){return n.moveOnTab?Km(Ug)(t,e,n,r):B.none()})),Om(wm(lm),Pg),Om(wm(dm),Pg)]),Wg=v([Om(wm(dm),Hm)]),qg=Dm(Vg,wa.init,jg,Wg,(function(){return B.some(Ig)})),Gg=[Tu("onSpace"),Tu("onEnter"),Tu("onShiftEnter"),Tu("onLeft"),Tu("onRight"),Tu("onTab"),Tu("onShiftTab"),Tu("onUp"),Tu("onDown"),Tu("onEscape"),mo("stopSpaceKeyup",!1),io("focusIn")],$g=Dm(Gg,wa.init,(function(t,e,n){return[Om(wm(dm),n.onSpace),Om(Cm([_m,wm(lm)]),n.onEnter),Om(Cm([Sm,wm(lm)]),n.onShiftEnter),Om(Cm([Sm,wm(sm)]),n.onShiftTab),Om(Cm([_m,wm(sm)]),n.onTab),Om(wm(gm),n.onUp),Om(wm(pm),n.onDown),Om(wm(mm),n.onLeft),Om(wm(hm),n.onRight),Om(wm(dm),n.onSpace),Om(wm(fm),n.onEscape)]}),(function(t,e,n){return n.stopSpaceKeyup?[Om(wm(dm),Hm)]:[]}),(function(t){return t.focusIn})),Xg=Nm.schema(),Kg=Bm.schema(),Yg=Cg.schema(),Jg=dg.schema(),Qg=Lg.schema(),Zg=Pm.schema(),th=qg.schema(),eh=$g.schema(),nh=_c({branchKey:"mode",branches:Object.freeze({__proto__:null,acyclic:Xg,cyclic:Kg,flow:Yg,flatgrid:Jg,matrix:Qg,execution:Zg,menu:th,special:eh}),name:"keying",active:{events:function(t,e){return t.handler.toEvents(t,e)}},apis:{focusIn:function(t,e,n){e.sendFocusIn(e).fold((function(){t.getSystem().triggerFocus(t.element,t.element)}),(function(r){r(t,e,n)}))},setGridSize:function(t,e,n,r,o){!function(t){return wt(t,"setGridSize")}(n)?console.error("Layout does not support setGridSize"):n.setGridSize(r,o)}},state:Fm}),rh=function(t,e,n,r){var o=t.getSystem().build(r);Wl(t,o,n)},oh=function(t,e,n,r){var o=ih(t);K(o,(function(t){return ye(r.element,t.element)})).each(Gl)},ih=function(t,e){return t.components()},ah=function(t,e,n,r,o){var i=ih(t);return B.from(i[r]).map((function(e){return oh(t,0,0,e),o.each((function(e){rh(t,0,(function(t,e){!function(t,e,n){Te(t,n).fold((function(){En(t,e)}),(function(t){kn(t,e)}))}(t,e,r)}),e)})),e}))},uh=Sc({fields:[],name:"replacing",apis:Object.freeze({__proto__:null,append:function(t,e,n,r){rh(t,0,En,r)},prepend:function(t,e,n,r){rh(t,0,On,r)},remove:oh,replaceAt:ah,replaceBy:function(t,e,n,r,o){var i=ih(t);return Y(i,r).bind((function(e){return ah(t,0,0,e,o)}))},set:function(t,e,n,r){Bc((function(){var e=j(r,t.getSystem().build);Ul(t,e)}),t.element)},contents:ih})}),ch=function(t,e){return{key:t,value:{config:{},me:function(t,e){var n=Hi(e);return Sc({fields:[Yr("enabled")],name:t,active:{events:v(n)}})}(t,e),configAsRaw:v({}),initialConfig:{},state:wa}}},sh=function(t,e){e.ignore||(Mc(t.element),e.onFocus(t))},lh=Object.freeze({__proto__:null,focus:sh,blur:function(t,e){e.ignore||function(t){t.dom.blur()}(t.element)},isFocused:function(t){return Dc(t.element)}}),fh=Object.freeze({__proto__:null,exhibit:function(t,e){var n=e.ignore?{}:{attributes:{tabindex:"-1"}};return ka(n)},events:function(t){return Hi([Pi(ii(),(function(e,n){sh(e,t),n.stop()}))].concat(t.stopMousedown?[Pi(Fo(),(function(t,e){e.event.prevent()}))]:[]))}}),dh=[zu("onFocus"),mo("stopMousedown",!1),mo("ignore",!1)],mh=Sc({fields:dh,name:"focusing",active:fh,apis:lh}),gh=function(t,e,n){var r=e.aria;r.update(t,r,n.get())},hh=function(t,e,n){e.toggleClass.each((function(e){n.get()?Va(t.element,e):Ia(t.element,e)}))},ph=function(t,e,n){yh(t,e,n,!n.get())},vh=function(t,e,n){n.set(!0),hh(t,e,n),gh(t,e,n)},bh=function(t,e,n){n.set(!1),hh(t,e,n),gh(t,e,n)},yh=function(t,e,n,r){(r?vh:bh)(t,e,n)},xh=function(t,e,n){yh(t,e,n,e.selected)},wh=Object.freeze({__proto__:null,onLoad:xh,toggle:ph,isOn:function(t,e,n){return n.get()},on:vh,off:bh,set:yh}),Ch=Object.freeze({__proto__:null,exhibit:function(){return ka({})},events:function(t,e){var n,r,o,i=(n=t,r=e,o=ph,Yi((function(t){o(t,n,r)}))),a=vc(t,e,xh);return Hi(J([t.toggleOnExecute?[i]:[],[a]]))}}),Sh=function(t,e,n){We(t.element,"aria-expanded",n)},kh=[mo("selected",!1),io("toggleClass"),mo("toggleOnExecute",!0),go("aria",{mode:"none"},Gr("mode",{pressed:[mo("syncWithExpanded",!1),Au("update",(function(t,e,n){We(t.element,"aria-pressed",n),e.syncWithExpanded&&Sh(t,e,n)}))],checked:[Au("update",(function(t,e,n){We(t.element,"aria-checked",n)}))],expanded:[Au("update",Sh)],selected:[Au("update",(function(t,e,n){We(t.element,"aria-selected",n)}))],none:[Au("update",h)]}))],_h=Sc({fields:kh,name:"toggling",active:Ch,apis:wh,state:(Mm=!1,{init:function(){var t=Co(Mm);return{get:function(){return t.get()},set:function(e){return t.set(e)},clear:function(){return t.set(Mm)},readState:function(){return t.get()}}}})}),Oh=function(){var t=function(t,e){e.stop(),Ai(t)};return[Pi(Qo(),t),Pi(fi(),t),Wi(Lo()),Wi(Fo())]},Eh=function(t){return Hi(J([t.map((function(t){return Yi((function(e,n){t(e),n.stop()}))})).toArray(),Oh()]))},zh="alloy.item-hover",Th="alloy.item-focus",Mh=function(t){(Nc(t.element).isNone()||mh.isFocused(t))&&(mh.isFocused(t)||mh.focus(t),Di(t,zh,{item:t}))},Dh=function(t){Di(t,Th,{item:t})},Ah=v(zh),Nh=v(Th),Bh=[Yr("data"),Yr("components"),Yr("dom"),mo("hasSubmenu",!1),io("toggling"),Df("itemBehaviours",[_h,mh,nh,Ef]),mo("ignoreFocus",!1),mo("domModification",{}),Au("builder",(function(t){return{dom:t.dom,domModification:O(O({},t.domModification),{attributes:O(O(O({role:t.toggling.isSome()?"menuitemcheckbox":"menuitem"},t.domModification.attributes),{"aria-haspopup":t.hasSubmenu}),t.hasSubmenu?{"aria-expanded":!1}:{})}),behaviours:Af(t.itemBehaviours,[t.toggling.fold(_h.revoke,(function(t){return _h.config(O({aria:{mode:"checked"}},t))})),mh.config({ignore:t.ignoreFocus,stopMousedown:t.ignoreFocus,onFocus:function(t){Dh(t)}}),nh.config({mode:"execution"}),Ef.config({store:{mode:"memory",initialValue:t.data}}),ch("item-type-events",z(z([],Oh(),!0),[Pi(qo(),Mh),Pi(li(),mh.focus)],!1))]),components:t.components,eventOrder:t.eventOrder}})),mo("eventOrder",{})],Rh=[Yr("dom"),Yr("components"),Au("builder",(function(t){return{dom:t.dom,components:t.components,events:Hi([qi(li())])}}))],Hh=v("item-widget"),Lh=v([rd({name:"widget",overrides:function(t){return{behaviours:wc([Ef.config({store:{mode:"manual",getValue:function(e){return t.data},setValue:h}})])}}})]),Vh=[Yr("uid"),Yr("data"),Yr("components"),Yr("dom"),mo("autofocus",!1),mo("ignoreFocus",!1),Df("widgetBehaviours",[Ef,mh,nh]),mo("domModification",{}),kd(Lh()),Au("builder",(function(t){var e=hd(Hh(),t,Lh()),n=pd(Hh(),t,e.internals()),r=function(e){return vd(e,t,"widget").map((function(t){return nh.focusIn(t),t}))},o=function(e,n){return Nd(n.event.target)?B.none():t.autofocus?(n.setSource(e.element),B.none()):B.none()};return{dom:t.dom,components:n,domModification:t.domModification,events:Hi([Yi((function(t,e){r(t).each((function(t){e.stop()}))})),Pi(qo(),Mh),Pi(li(),(function(e,n){t.autofocus?r(e):mh.focus(e)}))]),behaviours:Af(t.widgetBehaviours,[Ef.config({store:{mode:"memory",initialValue:t.data}}),mh.config({ignore:t.ignoreFocus,onFocus:function(t){Dh(t)}}),nh.config({mode:"special",focusIn:t.autofocus?function(t){r(t)}:Oc(),onLeft:o,onRight:o,onEscape:function(e,n){return mh.isFocused(e)||t.autofocus?t.autofocus?(n.setSource(e.element),B.none()):B.none():(mh.focus(e),B.some(!0))}})])}}))],Ph=Gr("type",{widget:Vh,item:Bh,separator:Rh}),Ih=v([ad({factory:{sketch:function(t){var e=Wr("menu.spec item",Ph,t);return e.builder(e)}},name:"items",unit:"item",defaults:function(t,e){return xt(e,"uid")?e:O(O({},e),{uid:da("item")})},overrides:function(t,e){return{type:e.type,ignoreFocus:t.fakeFocus,domModification:{classes:[t.markers.item]}}}})]),Fh=v([Yr("value"),Yr("items"),Yr("dom"),Yr("components"),mo("eventOrder",{}),zf("menuBehaviours",[um,Ef,Hd,nh]),go("movement",{mode:"menu",moveOnTab:!0},Gr("mode",{grid:[Bu(),Au("config",(function(t,e){return{mode:"flatgrid",selector:"."+t.markers.item,initSize:{numColumns:e.initSize.numColumns,numRows:e.initSize.numRows},focusManager:t.focusManager}}))],matrix:[Au("config",(function(t,e){return{mode:"matrix",selectors:{row:e.rowSelector,cell:"."+t.markers.item},focusManager:t.focusManager}})),Yr("rowSelector")],menu:[mo("moveOnTab",!0),Au("config",(function(t,e){return{mode:"menu",selector:"."+t.markers.item,moveOnTab:e.moveOnTab,focusManager:t.focusManager}}))]})),Jr("markers",Su()),mo("fakeFocus",!1),mo("focusManager",zm()),zu("onHighlight")]),Uh=v("alloy.menu-focus"),jh=Ad({name:"Menu",configFields:Fh(),partFields:Ih(),factory:function(t,e,n,r){return{uid:t.uid,dom:t.dom,markers:t.markers,behaviours:Mf(t.menuBehaviours,[um.config({highlightClass:t.markers.selectedItem,itemClass:t.markers.item,onHighlight:t.onHighlight}),Ef.config({store:{mode:"memory",initialValue:t.value}}),Hd.config({find:B.some}),nh.config(t.movement.config(t,t.movement))]),events:Hi([Pi(Nh(),(function(t,e){var n=e.event;t.getSystem().getByDom(n.target).each((function(n){um.highlight(t,n),e.stop(),Di(t,Uh(),{menu:t,item:n})}))})),Pi(Ah(),(function(t,e){var n=e.event.item;um.highlight(t,n)}))]),components:e,eventOrder:t.eventOrder,domModification:{attributes:{role:"menu"}}}}}),Wh=function(t,e,n,r){return yt(n,r).bind((function(r){return yt(t,r).bind((function(r){var o=Wh(t,e,n,r);return B.some([r].concat(o))}))})).getOr([])},qh=function(t,e){var n={};dt(t,(function(t,e){W(t,(function(t){n[t]=e}))}));var r=e,o=gt(e,(function(t,e){return{k:t,v:e}})),i=mt(o,(function(t,e){return[e].concat(Wh(n,r,o,e))}));return mt(n,(function(t){return yt(i,t).getOr([t])}))},Gh=function(t){return"prepared"===t.type?B.some(t.menu):B.none()},$h={init:function(){var t=Co({}),e=Co({}),n=Co({}),r=ts(),o=Co({}),i=function(e,n,r){return a(e).bind((function(o){return function(e){return vt(t.get(),(function(t,n){return t===e}))}(e).bind((function(t){return n(t).map((function(t){return{triggeredMenu:o,triggeringItem:t,triggeringPath:r}}))}))}))},a=function(t){return u(t).bind(Gh)},u=function(t){return yt(e.get(),t)},c=function(e){return yt(t.get(),e)};return{setMenuBuilt:function(t,n){var r;e.set(O(O({},e.get()),((r={})[t]={type:"prepared",menu:n},r)))},setContents:function(i,a,u,c){r.set(i),t.set(u),e.set(a),o.set(c);var s=qh(c,u);n.set(s)},expand:function(e){return yt(t.get(),e).map((function(t){var r=yt(n.get(),e).getOr([]);return[t].concat(r)}))},refresh:function(t){return yt(n.get(),t)},collapse:function(t){return yt(n.get(),t).bind((function(t){return t.length>1?B.some(t.slice(1)):B.none()}))},lookupMenu:u,lookupItem:c,otherMenus:function(t){var e=o.get();return et(lt(e),t)},getPrimary:function(){return r.get().bind(a)},getMenus:function(){return e.get()},clear:function(){t.set({}),e.set({}),n.set({}),r.clear()},isClear:function(){return r.get().isNone()},getTriggeringPath:function(t,e){var o=G(c(t).toArray(),(function(t){return a(t).isSome()}));return yt(n.get(),t).bind((function(t){var n=tt(o.concat(t));return function(t){for(var e=[],n=0;n<t.length;n++){var r=t[n];if(!r.isSome())return B.none();e.push(r.getOrDie())}return B.some(e)}(Q(n,(function(t,o){return i(t,e,n.slice(0,o+1)).fold((function(){return Ct(r.get(),t)?[]:[B.none()]}),(function(t){return[B.some(t)]}))})))}))}}},extractPreparedMenu:Gh},Xh=v("collapse-item"),Kh=Dd({name:"TieredMenu",configFields:[Du("onExecute"),Du("onEscape"),Mu("onOpenMenu"),Mu("onOpenSubmenu"),zu("onRepositionMenu"),zu("onCollapseMenu"),mo("highlightImmediately",!0),no("data",[Yr("primary"),Yr("menus"),Yr("expansions")]),mo("fakeFocus",!1),zu("onHighlight"),zu("onHover"),_u(),Yr("dom"),mo("navigateOnHover",!0),mo("stayInDom",!1),zf("tmenuBehaviours",[nh,um,Hd,uh]),mo("eventOrder",{})],apis:{collapseMenu:function(t,e){t.collapseMenu(e)},highlightPrimary:function(t,e){t.highlightPrimary(e)},repositionMenus:function(t,e){t.repositionMenus(e)}},factory:function(t,e){var n,r=ts(),o=$h.init(),i=function(e){var n=function(e,n,r){return mt(r,(function(r,o){var i=function(){return jh.sketch(O(O({},r),{value:o,markers:t.markers,fakeFocus:t.fakeFocus,onHighlight:t.onHighlight,focusManager:t.fakeFocus?Tm():zm()}))};return o===n?{type:"prepared",menu:e.getSystem().build(i())}:{type:"notbuilt",nbMenu:i}}))}(e,t.data.primary,t.data.menus),r=u();return o.setContents(t.data.primary,n,t.data.expansions,r),o.getPrimary()},a=function(t){return Ef.getValue(t).value},u=function(e){return mt(t.data.menus,(function(t,e){return Q(t.items,(function(t){return"separator"===t.type?[]:[t.data.value]}))}))},c=function(t,e){um.highlight(t,e),um.getHighlighted(e).orThunk((function(){return um.getFirst(e)})).each((function(e){Ni(t,e.element,li())}))},s=function(t,e){return St(j(e,(function(e){return t.lookupMenu(e).bind((function(t){return"prepared"===t.type?B.some(t.menu):B.none()}))})))},l=function(e,n,r){var o=s(n,n.otherMenus(r));W(o,(function(n){ja(n.element,[t.markers.backgroundMenu]),t.stayInDom||uh.remove(e,n)}))},f=function(e,n){var o=function(e){return r.get().getOrThunk((function(){var n={},o=il(e.element,"."+t.markers.item),i=G(o,(function(t){return"true"===Ge(t,"aria-haspopup")}));return W(i,(function(t){e.getSystem().getByDom(t).each((function(t){var e=a(t);n[e]=t}))})),r.set(n),n}))}(e);dt(o,(function(t,e){var r=P(n,e);We(t.element,"aria-expanded",r)}))},d=function(e,n,r){return B.from(r[0]).bind((function(o){return n.lookupMenu(o).bind((function(o){if("notbuilt"===o.type)return B.none();var i=o.menu,a=s(n,r.slice(1));return W(a,(function(e){Va(e.element,t.markers.backgroundMenu)})),Ie(i.element)||uh.append(e,nu(i)),ja(i.element,[t.markers.backgroundMenu]),c(e,i),l(e,n,r),B.some(i)}))}))};!function(t){t[t.HighlightSubmenu=0]="HighlightSubmenu",t[t.HighlightParent=1]="HighlightParent"}(n||(n={}));var m=function(e,r,i){if(void 0===i&&(i=n.HighlightSubmenu),r.hasConfigured(Yd)&&Yd.isDisabled(r))return B.some(r);var u=a(r);return o.expand(u).bind((function(a){return f(e,a),B.from(a[0]).bind((function(u){return o.lookupMenu(u).bind((function(c){var s=function(t,e,n){if("notbuilt"===n.type){var r=t.getSystem().build(n.nbMenu());return o.setMenuBuilt(e,r),r}return n.menu}(e,u,c);return Ie(s.element)||uh.append(e,nu(s)),t.onOpenSubmenu(e,r,s,tt(a)),i===n.HighlightSubmenu?(um.highlightFirst(s),d(e,o,a)):(um.dehighlightAll(s),B.some(r))}))}))}))},g=function(e,n){var r=a(n);return o.collapse(r).bind((function(r){return f(e,r),d(e,o,r).map((function(r){return t.onCollapseMenu(e,n,r),r}))}))},p=function(e){return function(n,r){return fu(r.getSource(),"."+t.markers.item).bind((function(t){return n.getSystem().getByDom(t).toOptional().bind((function(t){return e(n,t).map(k)}))}))}},v=Hi([Pi(Uh(),(function(t,e){var n=e.event.item;o.lookupItem(a(n)).each((function(){var n=e.event.menu;um.highlight(t,n);var r=a(e.event.item);o.refresh(r).each((function(e){return l(t,o,e)}))}))})),Yi((function(e,r){var o=r.event.target;e.getSystem().getByDom(o).each((function(r){0===a(r).indexOf("collapse-item")&&g(e,r),m(e,r,n.HighlightSubmenu).fold((function(){t.onExecute(e,r)}),h)}))})),$i((function(e,n){i(e).each((function(n){uh.append(e,nu(n)),t.onOpenMenu(e,n),t.highlightImmediately&&c(e,n)}))}))].concat(t.navigateOnHover?[Pi(Ah(),(function(e,r){var i=r.event.item;!function(t,e){var n=a(e);o.refresh(n).bind((function(e){return f(t,e),d(t,o,e)}))}(e,i),m(e,i,n.HighlightParent),t.onHover(e,i)}))]:[])),b=function(t){return um.getHighlighted(t).bind(um.getHighlighted)},y={collapseMenu:function(t){b(t).each((function(e){g(t,e)}))},highlightPrimary:function(t){o.getPrimary().each((function(e){c(t,e)}))},repositionMenus:function(e){o.getPrimary().bind((function(t){return b(e).bind((function(t){var e=a(t),n=bt(o.getMenus()),r=St(j(n,$h.extractPreparedMenu));return o.getTriggeringPath(e,(function(t){return function(t,e,n){return st(e,(function(t){if(!t.getSystem().isConnected())return B.none();var e=um.getCandidates(t);return K(e,(function(t){return a(t)===n}))}))}(0,r,t)}))})).map((function(e){return{primary:t,triggeringPath:e}}))})).fold((function(){(function(t){return B.from(t.components()[0]).filter((function(t){return"menu"===Ge(t.element,"role")}))})(e).each((function(n){t.onRepositionMenu(e,n,[])}))}),(function(n){var r=n.primary,o=n.triggeringPath;t.onRepositionMenu(e,r,o)}))}};return{uid:t.uid,dom:t.dom,markers:t.markers,behaviours:Mf(t.tmenuBehaviours,[nh.config({mode:"special",onRight:p((function(t,e){return Nd(e.element)?B.none():m(t,e,n.HighlightSubmenu)})),onLeft:p((function(t,e){return Nd(e.element)?B.none():g(t,e)})),onEscape:p((function(e,n){return g(e,n).orThunk((function(){return t.onEscape(e,n).map((function(){return e}))}))})),focusIn:function(t,e){o.getPrimary().each((function(e){Ni(t,e.element,li())}))}}),um.config({highlightClass:t.markers.selectedMenu,itemClass:t.markers.menu}),Hd.config({find:function(t){return um.getHighlighted(t)}}),uh.config({})]),eventOrder:t.eventOrder,apis:y,events:v}},extraApis:{tieredData:function(t,e,n){return{primary:t,menus:e,expansions:n}},singleData:function(t,e){return{primary:t,menus:Oo(t,e),expansions:{}}},collapseItem:function(t){return{value:ia(Xh()),meta:{text:t}}}}}),Yh=Dd({name:"InlineView",configFields:[Yr("lazySink"),zu("onShow"),zu("onHide"),so("onEscape"),zf("inlineBehaviours",[uf,Ef,Ec]),fo("fireDismissalEventInstead",[mo("event",Ci())]),fo("fireRepositionEventInstead",[mo("event",Si())]),mo("getRelated",B.none),mo("isExtraPart",S),mo("eventOrder",B.none)],factory:function(t,e){var n=function(t,e,n,o){r(t,e,n,(function(){return o.map((function(t){return In(t)}))}))},r=function(e,n,r,o){var i=t.lazySink(e).getOrDie();uf.openWhileCloaked(e,n,(function(){return Vl.positionWithinBounds(i,e,r,o())})),Ef.setValue(e,B.some({mode:"position",config:r,getBounds:o}))},o=function(e,n,r,o){var i=function(t,e,n,r,o){var i=function(){return t.lazySink(e)},a="horizontal"===r.type?{layouts:{onLtr:function(){return mc()},onRtl:function(){return gc()}}}:{},u=function(t){return function(t){return 2===t.length}(t)?a:{}};return Kh.sketch({dom:{tag:"div"},data:r.data,markers:r.menu.markers,highlightImmediately:r.menu.highlightImmediately,onEscape:function(){return uf.close(e),t.onEscape.map((function(t){return t(e)})),B.some(!0)},onExecute:function(){return B.some(!0)},onOpenMenu:function(t,e){Vl.positionWithinBounds(i().getOrDie(),e,n,o())},onOpenSubmenu:function(t,e,n,r){var o=i().getOrDie();Vl.position(o,n,{anchor:O({type:"submenu",item:e},u(r))})},onRepositionMenu:function(t,e,r){var a=i().getOrDie();Vl.positionWithinBounds(a,e,n,o()),W(r,(function(t){var e=u(t.triggeringPath);Vl.position(a,t.triggeredMenu,{anchor:O({type:"submenu",item:t.triggeringItem},e)})}))}})}(t,e,n,r,o);uf.open(e,i),Ef.setValue(e,B.some({mode:"menu",menu:i}))},i=function(e){uf.isOpen(e)&&Ef.getValue(e).each((function(n){switch(n.mode){case"menu":uf.getState(e).each(Kh.repositionMenus);break;case"position":var r=t.lazySink(e).getOrDie();Vl.positionWithinBounds(r,e,n.config,n.getBounds())}}))},a={setContent:function(t,e){uf.setContent(t,e)},showAt:function(t,e,r){n(t,e,r,B.none())},showWithin:n,showWithinBounds:r,showMenuAt:function(t,e,n){o(t,e,n,B.none)},showMenuWithinBounds:o,hide:function(t){uf.isOpen(t)&&(Ef.setValue(t,B.none()),uf.close(t))},getContent:function(t){return uf.getState(t)},reposition:i,isOpen:uf.isOpen};return{uid:t.uid,dom:t.dom,behaviours:Mf(t.inlineBehaviours,[uf.config({isPartOf:function(e,n,r){return gu(n,r)||function(e,n){return t.getRelated(e).exists((function(t){return gu(t,n)}))}(e,r)},getAttachPoint:function(e){return t.lazySink(e).getOrDie()},onOpen:function(e){t.onShow(e)},onClose:function(e){t.onHide(e)}}),Ef.config({store:{mode:"memory",initialValue:B.none()}}),Ec.config({channels:O(O({},df(O({isExtraPart:e.isExtraPart},t.fireDismissalEventInstead.map((function(t){return{fireEventInstead:{event:t.event}}})).getOr({})))),gf(O(O({},t.fireRepositionEventInstead.map((function(t){return{fireEventInstead:{event:t.event}}})).getOr({})),{doReposition:i})))})]),eventOrder:t.eventOrder,apis:a}},apis:{showAt:function(t,e,n,r){t.showAt(e,n,r)},showWithin:function(t,e,n,r,o){t.showWithin(e,n,r,o)},showWithinBounds:function(t,e,n,r,o){t.showWithinBounds(e,n,r,o)},showMenuAt:function(t,e,n,r){t.showMenuAt(e,n,r)},showMenuWithinBounds:function(t,e,n,r,o){t.showMenuWithinBounds(e,n,r,o)},hide:function(t,e){t.hide(e)},isOpen:function(t,e){return t.isOpen(e)},getContent:function(t,e){return t.getContent(e)},setContent:function(t,e,n){t.setContent(e,n)},reposition:function(t,e){t.reposition(e)}}}),Jh="layout-inset",Qh=function(t){return t.x},Zh=function(t,e){return t.x+t.width/2-e.width/2},tp=function(t,e){return t.x+t.width-e.width},ep=function(t){return t.y},np=function(t,e){return t.y+t.height-e.height},rp=function(t,e){return t.y+t.height/2-e.height/2},op=function(t,e,n){return Ru(tp(t,e),np(t,e),n.insetSouthwest(),Iu(),"southwest",$u(t,{right:0,bottom:3}),Jh)},ip=function(t,e,n){return Ru(Qh(t),np(t,e),n.insetSoutheast(),Pu(),"southeast",$u(t,{left:1,bottom:3}),Jh)},ap=function(t,e,n){return Ru(tp(t,e),ep(t),n.insetNorthwest(),Vu(),"northwest",$u(t,{right:0,top:2}),Jh)},up=function(t,e,n){return Ru(Qh(t),ep(t),n.insetNortheast(),Lu(),"northeast",$u(t,{left:1,top:2}),Jh)},cp=function(t,e,n){return Ru(Zh(t,e),ep(t),n.insetNorth(),Fu(),"north",$u(t,{top:2}),Jh)},sp=function(t,e,n){return Ru(Zh(t,e),np(t,e),n.insetSouth(),Uu(),"south",$u(t,{bottom:3}),Jh)},lp=function(t,e,n){return Ru(tp(t,e),rp(t,e),n.insetEast(),Wu(),"east",$u(t,{right:0}),Jh)},fp=function(t,e,n){return Ru(Qh(t),rp(t,e),n.insetWest(),ju(),"west",$u(t,{left:1}),Jh)},dp=function(t){switch(t){case"north":return cp;case"northeast":return up;case"northwest":return ap;case"south":return sp;case"southeast":return ip;case"southwest":return op;case"east":return lp;case"west":return fp}},mp=function(t,e,n,r,o){return Xc(r).map(dp).getOr(cp)(t,e,n,r,o)},gp=function(t){switch(t){case"north":return sp;case"northeast":return ip;case"northwest":return op;case"south":return cp;case"southeast":return up;case"southwest":return ap;case"east":return fp;case"west":return lp}},hp=function(t,e,n,r,o){return Xc(r).map(gp).getOr(cp)(t,e,n,r,o)},pp=tinymce.util.Tools.resolve("tinymce.util.Delay"),vp=Dd({name:"Button",factory:function(t){var e=Eh(t.action),n=t.dom.tag,r=function(e){return yt(t.dom,"attributes").bind((function(t){return yt(t,e)}))};return{uid:t.uid,dom:t.dom,components:t.components,events:e,behaviours:Af(t.buttonBehaviours,[mh.config({}),nh.config({mode:"execution",useSpace:!0,useEnter:!0})]),domModification:{attributes:function(){if("button"===n){var t=r("type").getOr("button"),e=r("role").map((function(t){return{role:t}})).getOr({});return O({type:t},e)}return{role:r("role").getOr("button")}}()},eventOrder:t.eventOrder}},configFields:[mo("uid",void 0),Yr("dom"),mo("components",[]),Df("buttonBehaviours",[mh,nh]),io("action"),io("role"),mo("eventOrder",{})]}),bp=function(t){var e=function(t){return void 0!==t.uid}(t)&&wt(t,"uid")?t.uid:da("memento");return{get:function(t){return t.getSystem().getByUid(e).getOrDie()},getOpt:function(t){return t.getSystem().getByUid(e).toOptional()},asSpec:function(){return O(O({},t),{uid:e})}}},yp=tinymce.util.Tools.resolve("tinymce.util.I18n"),xp={indent:!0,outdent:!0,"table-insert-column-after":!0,"table-insert-column-before":!0,"paste-column-after":!0,"paste-column-before":!0,"unordered-list":!0,"list-bull-circle":!0,"list-bull-default":!0,"list-bull-square":!0},wp="temporary-placeholder",Cp=function(t){return function(){return yt(t,wp).getOr("!not found!")}},Sp=function(t,e){var n=t.toLowerCase();if(yp.isRtl()){var r=function(t,e){return Tt(t,e)?t:function(t,e){return t+e}(t,e)}(n,"-rtl");return xt(e,r)?r:n}return n},kp=function(t,e){return yt(e,Sp(t,e))},_p=function(t,e){var n=e();return kp(t,n).getOrThunk(Cp(n))},Op=function(){return ch("add-focusable",[$i((function(t){su(t.element,"svg").each((function(t){return We(t,"focusable","false")}))}))])},Ep=function(t,e,n,r){var o,i,a=function(t){return!!yp.isRtl()&&xt(xp,t)}(e)?["tox-icon--flip"]:[],u=yt(n,Sp(e,n)).or(r).getOrThunk(Cp(n));return{dom:{tag:t.tag,attributes:null!==(o=t.attributes)&&void 0!==o?o:{},classes:t.classes.concat(a),innerHtml:u},behaviours:wc(z(z([],null!==(i=t.behaviours)&&void 0!==i?i:[],!0),[Op()],!1))}},zp=function(t,e,n,r){return void 0===r&&(r=B.none()),Ep(e,t,n(),r)},Tp={success:"checkmark",error:"warning",err:"error",warning:"warning",warn:"warning",info:"info"},Mp=Dd({name:"Notification",factory:function(t){var e,n,r,o,i,a=bp({dom:{tag:"p",innerHtml:t.translationProvider(t.text)},behaviours:wc([uh.config({})])}),u=function(t){return{dom:{tag:"div",classes:["tox-bar"],attributes:{style:"width: "+t+"%"}}}},c=function(t){return{dom:{tag:"div",classes:["tox-text"],innerHtml:t+"%"}}},s=bp({dom:{tag:"div",classes:t.progress?["tox-progress-bar","tox-progress-indicator"]:["tox-progress-bar"]},components:[{dom:{tag:"div",classes:["tox-bar-container"]},components:[u(0)]},c(0)],behaviours:wc([uh.config({})])}),l={updateProgress:function(t,e){t.getSystem().isConnected()&&s.getOpt(t).each((function(t){uh.set(t,[{dom:{tag:"div",classes:["tox-bar-container"]},components:[u(e)]},c(e)])}))},updateText:function(t,e){if(t.getSystem().isConnected()){var n=a.get(t);uh.set(n,[Qa(e)])}}},f=J([t.icon.toArray(),t.level.toArray(),t.level.bind((function(t){return B.from(Tp[t])})).toArray()]),d=bp(vp.sketch({dom:{tag:"button",classes:["tox-notification__dismiss","tox-button","tox-button--naked","tox-button--icon"]},components:[zp("close",{tag:"div",classes:["tox-icon"],attributes:{"aria-label":t.translationProvider("Close")}},t.iconProvider)],action:function(e){t.onAction(e)}})),m=[(e=f,n={tag:"div",classes:["tox-notification__icon"]},r=t.iconProvider,o=r(),i=K(e,(function(t){return xt(o,Sp(t,o))})),Ep(n,i.getOr(wp),o,B.none())),{dom:{tag:"div",classes:["tox-notification__body"]},components:[a.asSpec()],behaviours:wc([uh.config({})])}];return{uid:t.uid,dom:{tag:"div",attributes:{role:"alert"},classes:t.level.map((function(t){return["tox-notification","tox-notification--in","tox-notification--"+t]})).getOr(["tox-notification","tox-notification--in"])},behaviours:wc([mh.config({}),ch("notification-events",[Pi(Go(),(function(t){d.getOpt(t).each(mh.focus)}))])]),components:m.concat(t.progress?[s.asSpec()]:[]).concat(t.closeButton?[d.asSpec()]:[]),apis:l}},configFields:[io("level"),Yr("progress"),Yr("icon"),Yr("onAction"),Yr("text"),Yr("iconProvider"),Yr("translationProvider"),bo("closeButton",!0)],apis:{updateProgress:function(t,e,n){t.updateProgress(e,n)},updateText:function(t,e,n){t.updateText(e,n)}}});function Dp(t,e,n){var r=e.backstage.shared;return{open:function(e,o){var i=!e.closeButton&&e.timeout&&(e.timeout>0||e.timeout<0),a=function(){o(),Yh.hide(c)},u=eu(Mp.sketch({text:e.text,level:P(["success","error","warning","warn","info"],e.type)?e.type:void 0,progress:!0===e.progressBar,icon:B.from(e.icon),closeButton:!i,onAction:a,iconProvider:r.providers.icons,translationProvider:r.providers.translate})),c=eu(Yh.sketch(O({dom:{tag:"div",classes:["tox-notifications-container"]},lazySink:r.getSink,fireDismissalEventInstead:{}},r.header.isPositionedAtTop()?{}:{fireRepositionEventInstead:{}})));n.add(c),e.timeout>0&&pp.setTimeout((function(){a()}),e.timeout);var s=function(){var e=In(Bt.fromDom(t.getContentAreaContainer())),n=Un(),r=Gu(n.x,e.x,e.right),o=Gu(n.y,e.y,e.bottom),i=Math.max(e.right,n.right),a=Math.max(e.bottom,n.bottom);return B.some(Pn(r,o,i-r,a-o))};return{close:a,moveTo:function(t,e){Yh.showAt(c,nu(u),{anchor:{type:"makeshift",x:t,y:e}})},moveRel:function(t,e){var n=nu(u),o={maxHeightFunction:hs()};if("banner"!==e&&f(t)){var i=function(t){switch(t){case"bc-bc":return sp;case"tc-tc":return cp;case"tc-bc":return ic;case"bc-tc":default:return ac}}(e),a={type:"node",root:Fe(),node:B.some(Bt.fromDom(t)),overrides:o,layouts:{onRtl:function(){return[i]},onLtr:function(){return[i]}}};Yh.showWithinBounds(c,n,{anchor:a},s)}else{var l=O(O({},r.anchors.banner()),{overrides:o});Yh.showWithinBounds(c,n,{anchor:l},s)}},text:function(t){Mp.updateText(u,t)},settings:e,getEl:function(){return u.element.dom},progressBar:{value:function(t){Mp.updateProgress(u,t)}}}},close:function(t){t.close()},reposition:function(t){t.length>0&&W(t,(function(e,n){0===n?e.moveRel(null,"banner"):e.moveRel(t[n-1].getEl(),"bc-tc")}))},getArgs:function(t){return t.settings}}}var Ap,Np=function(t,e){var n=null,r=function(){u(n)||(clearTimeout(n),n=null)};return{cancel:r,throttle:function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];r(),n=setTimeout((function(){n=null,t.apply(null,o)}),e)}}},Bp=tinymce.util.Tools.resolve("tinymce.dom.TextSeeker"),Rp=function(t,e,n,r,o){var i=Bp(t,(function(e){return function(t,e){return t.isBlock(e)||P(["BR","IMG","HR","INPUT"],e.nodeName)||"false"===t.getContentEditable(e)}(t,e)}));return B.from(i.backwards(e,n,r,o))},Hp=function(t,e){return Lp(Bt.fromDom(t.selection.getNode())).getOrThunk((function(){var n=Bt.fromHtml('<span data-mce-autocompleter="1" data-mce-bogus="1"></span>',t.getDoc());return En(n,Bt.fromDom(e.extractContents())),e.insertNode(n.dom),Oe(n).each((function(t){return t.dom.normalize()})),function(t){return ol(t,rl)}(n).map((function(e){t.selection.setCursorLocation(e.dom,function(t){return"img"===Ht(t)?1:el(t).fold((function(){return ze(t).length}),(function(t){return t.length}))}(e))})),n}))},Lp=function(t){return fu(t,"[data-mce-autocompleter]")},Vp=function(t){return t.toString().replace(/\u00A0/g," ").replace(/\uFEFF/g,"")},Pp=function(t){return""!==t&&-1!=="  \f\n\r\t\v".indexOf(t)},Ip=function(t,e){return t.substring(e.length)},Fp=function(t,e,n,r){if(void 0===r&&(r=0),!(o=e).collapsed||3!==o.startContainer.nodeType)return B.none();var o,i=t.getParent(e.startContainer,t.isBlock)||t.getRoot();return Rp(t,e.startContainer,e.startOffset,(function(t,e,r){return function(t,e,n){var r;for(r=e-1;r>=0;r--){var o=t.charAt(r);if(Pp(o))return B.none();if(o===n)break}return B.some(r)}(r,e,n).getOr(e)}),i).bind((function(t){var o=e.cloneRange();if(o.setStart(t.container,t.offset),o.setEnd(e.endContainer,e.endOffset),o.collapsed)return B.none();var i=Vp(o);return 0!==i.lastIndexOf(n)||Ip(i,n).length<r?B.none():B.some({text:Ip(i,n),range:o,triggerChar:n})}))},Up=function(t,e,n,r){return void 0===r&&(r=0),Lp(Bt.fromDom(e.startContainer)).fold((function(){return Fp(t,e,n,r)}),(function(e){var r=t.createRng();r.selectNode(e.dom);var o=Vp(r);return B.some({range:r,text:Ip(o,n),triggerChar:n})}))},jp=function(t,e){e.on("keypress compositionend",t.onKeypress.throttle),e.on("remove",t.onKeypress.cancel);var n=function(t,e){Di(t,Xo(),{raw:e})};e.on("keydown",(function(e){var r=function(){return t.getView().bind(um.getHighlighted)};8===e.which&&t.onKeypress.throttle(e),t.isActive()&&(27===e.which&&t.cancelIfNecessary(),t.isMenuOpen()?13===e.which?(r().each(Ai),e.preventDefault()):40===e.which?(r().fold((function(){t.getView().each(um.highlightFirst)}),(function(t){n(t,e)})),e.preventDefault(),e.stopImmediatePropagation()):37!==e.which&&38!==e.which&&39!==e.which||r().each((function(t){n(t,e),e.preventDefault(),e.stopImmediatePropagation()})):13!==e.which&&38!==e.which&&40!==e.which||t.cancelIfNecessary())})),e.on("NodeChange",(function(e){t.isActive()&&!t.isProcessingAction()&&Lp(Bt.fromDom(e.element)).isNone()&&t.cancelIfNecessary()}))},Wp=tinymce.util.Tools.resolve("tinymce.util.Promise"),qp=function(t,e){return{container:t,offset:e}},Gp=function(t){if(function(t){return 3===t.nodeType}(t))return qp(t,t.data.length);var e=t.childNodes;return e.length>0?Gp(e[e.length-1]):qp(t,e.length)},$p=function(t,e){var n=t.childNodes;return n.length>0&&e<n.length?$p(n[e],0):n.length>0&&function(t){return 1===t.nodeType}(t)&&n.length===e?Gp(n[n.length-1]):qp(t,e)},Xp=function(t){return function(e){var n=$p(e.startContainer,e.startOffset);return!function(t,e){return Rp(t,e.container,e.offset,(function(t,e){return 0===e?-1:e}),t.getRoot()).filter((function(t){var e=t.container.data.charAt(t.offset-1);return!Pp(e)})).isSome()}(t,n)}},Kp=function(t,e){var n=e(),r=t.selection.getRng();return function(t,e,n){return st(n.triggerChars,(function(n){return Up(t,e,n)}))}(t.dom,r,n).bind((function(n){return Yp(t,e,n)}))},Yp=function(t,e,n,r){void 0===r&&(r={});var o=e(),i=t.selection.getRng().startContainer.nodeValue,a=G(o.lookupByChar(n.triggerChar),(function(e){return n.text.length>=e.minChars&&e.matches.getOrThunk((function(){return Xp(t.dom)}))(n.range,i,n.text)}));if(0===a.length)return B.none();var u=Wp.all(j(a,(function(t){return t.fetch(n.text,t.maxResults,r).then((function(e){return{matchText:n.text,items:e,columns:t.columns,onAction:t.onAction,highlightOn:t.highlightOn}}))})));return B.some({lookupData:u,context:n})},Jp=_r([Zr("type"),co("text")]),Qp=_r([mo("type","autocompleteitem"),mo("active",!1),mo("disabled",!1),mo("meta",{}),Zr("value"),co("text"),co("icon")]),Zp=_r([Zr("type"),Zr("ch"),ho("minChars",1),mo("columns",1),ho("maxResults",10),so("matches"),eo("fetch"),eo("onAction"),xo("highlightOn",[],Nr)]),tv=[bo("disabled",!1),co("tooltip"),co("icon"),co("text"),yo("onSetup",(function(){return h}))],ev=_r([Zr("type"),eo("onAction")].concat(tv)),nv=function(t){return Ur("toolbarbutton",ev,t)},rv=[bo("active",!1)].concat(tv),ov=_r(rv.concat([Zr("type"),eo("onAction")])),iv=function(t){return Ur("ToggleButton",ov,t)},av=[yo("predicate",S),vo("scope","node",["node","editor"]),vo("position","selection",["node","selection","line"])],uv=tv.concat([mo("type","contextformbutton"),mo("primary",!1),eo("onAction"),Xr("original",b)]),cv=rv.concat([mo("type","contextformbutton"),mo("primary",!1),eo("onAction"),Xr("original",b)]),sv=tv.concat([mo("type","contextformbutton")]),lv=rv.concat([mo("type","contextformtogglebutton")]),fv=Gr("type",{contextformbutton:uv,contextformtogglebutton:cv}),dv=_r([mo("type","contextform"),yo("initValue",v("")),co("label"),oo("commands",fv),ao("launch",Gr("type",{contextformbutton:sv,contextformtogglebutton:lv}))].concat(av)),mv=_r([mo("type","contexttoolbar"),Zr("items")].concat(av)),gv=function(t){var e=t.ui.registry.getAll().popups,n=mt(e,(function(t){return(e=t,Ur("Autocompleter",Zp,e)).fold((function(t){throw new Error(qr(t))}),b);var e})),r=function(t){var e={};return W(t,(function(t){e[t]={}})),lt(e)}(pt(n,(function(t){return t.ch}))),o=bt(n);return{dataset:n,triggerChars:r,lookupByChar:function(t){return G(o,(function(e){return e.ch===t}))}}};!function(t){t[t.CLOSE_ON_EXECUTE=0]="CLOSE_ON_EXECUTE",t[t.BUBBLE_TO_SANDBOX=1]="BUBBLE_TO_SANDBOX"}(Ap||(Ap={}));var hv,pv=Ap,vv="tox-menu-nav__js",bv="tox-collection__item",yv="tox-swatch",xv={normal:vv,color:yv},wv="tox-collection__item--enabled",Cv="tox-collection__item-icon",Sv="tox-collection__item-label",kv="tox-collection__item-caret",_v="tox-collection__item--active",Ov="tox-collection__item-container",Ev="tox-collection__item-container--row",zv=function(t){return yt(xv,t).getOr(vv)},Tv=function(t){return"color"===t?"tox-swatches":"tox-menu"},Mv=function(t){return{backgroundMenu:"tox-background-menu",selectedMenu:"tox-selected-menu",selectedItem:"tox-collection__item--active",hasIcons:"tox-menu--has-icons",menu:Tv(t),tieredMenu:"tox-tiered-menu"}},Dv=function(t){var e=Mv(t);return{backgroundMenu:e.backgroundMenu,selectedMenu:e.selectedMenu,menu:e.menu,selectedItem:e.selectedItem,item:zv(t)}},Av=function(t,e,n){var r=Mv(n);return{tag:"div",classes:J([[r.menu,"tox-menu-"+e+"-column"],t?[r.hasIcons]:[]])}},Nv=[jh.parts.items({})],Bv=function(t,e,n){var r=Mv(n);return{dom:{tag:"div",classes:J([[r.tieredMenu]])},markers:Dv(n)}},Rv=function(t,e){return function(n){var r=U(n,e);return j(r,(function(e){return{dom:t,components:e}}))}},Hv=function(t,e){var n=[],r=[];return W(t,(function(t,o){e(t,o)?(r.length>0&&n.push(r),r=[],xt(t.dom,"innerHtml")&&r.push(t)):r.push(t)})),r.length>0&&n.push(r),j(n,(function(t){return{dom:{tag:"div",classes:["tox-collection__group"]},components:t}}))},Lv=function(t,e,n){return{dom:{tag:"div",classes:["tox-menu","tox-collection"].concat(1===t?["tox-collection--list"]:["tox-collection--grid"])},components:[jh.parts.items({preprocess:function(n){return"auto"!==t&&t>1?Rv({tag:"div",classes:["tox-collection__group"]},t)(n):Hv(n,(function(t,n){return"separator"===e[n].type}))}})]}},Vv=function(t){return I(t,(function(t){return"icon"in t&&void 0!==t.icon}))},Pv=function(t){return console.error(qr(t)),console.log(t),B.none()},Iv=function(t,e,n,r,o){var i,a=(i=n,{dom:{tag:"div",classes:["tox-collection","tox-collection--horizontal"]},components:[jh.parts.items({preprocess:function(t){return Hv(t,(function(t,e){return"separator"===i[e].type}))}})]});return{value:t,dom:a.dom,components:a.components,items:n}},Fv=function(t,e,n,r,o){var i;return"color"===o?{value:t,dom:(i=function(t){return{dom:{tag:"div",classes:["tox-menu","tox-swatches-menu"]},components:[{dom:{tag:"div",classes:["tox-swatches"]},components:[jh.parts.items({preprocess:"auto"!==t?Rv({tag:"div",classes:["tox-swatches__row"]},t):b})]}]}}(r)).dom,components:i.components,items:n}:"normal"===o&&"auto"===r?{value:t,dom:(i=Lv(r,n)).dom,components:i.components,items:n}:"normal"===o&&1===r?{value:t,dom:(i=Lv(1,n)).dom,components:i.components,items:n}:"normal"===o?{value:t,dom:(i=Lv(r,n)).dom,components:i.components,items:n}:"listpreview"===o&&"auto"!==r?{value:t,dom:(i=function(t){return{dom:{tag:"div",classes:["tox-menu","tox-collection","tox-collection--toolbar","tox-collection--toolbar-lg"]},components:[jh.parts.items({preprocess:Rv({tag:"div",classes:["tox-collection__group"]},t)})]}}(r)).dom,components:i.components,items:n}:{value:t,dom:Av(e,r,o),components:Nv,items:n}},Uv=[Zr("type"),Zr("src"),co("alt"),xo("classes",[],Nr)],jv=_r(Uv),Wv=[Zr("type"),Zr("text"),co("name"),xo("classes",["tox-collection__item-label"],Nr)],qv=_r(Wv),Gv=Cr((function(){return Pr("type",{cardimage:jv,cardtext:qv,cardcontainer:$v})})),$v=_r([Zr("type"),po("direction","horizontal"),po("align","left"),po("valign","middle"),oo("items",Gv)]),Xv=[bo("disabled",!1),co("text"),co("shortcut"),$r("value","value",lr((function(){return ia("menuitem-value")})),Mr()),mo("meta",{})],Kv=_r([Zr("type"),co("label"),oo("items",Gv),yo("onSetup",(function(){return h})),yo("onAction",h)].concat(Xv)),Yv=_r([Zr("type"),bo("active",!1),co("icon")].concat(Xv)),Jv=[Zr("type"),Zr("fancytype"),yo("onAction",h)],Qv=[mo("initData",{})].concat(Jv),Zv=[wo("initData",{},[bo("allowCustomColors",!0),lo("colors",Mr())])].concat(Jv),tb=Gr("fancytype",{inserttable:Qv,colorswatch:Zv}),eb=_r([Zr("type"),yo("onSetup",(function(){return h})),yo("onAction",h),co("icon")].concat(Xv)),nb=_r([Zr("type"),eo("getSubmenuItems"),yo("onSetup",(function(){return h})),co("icon")].concat(Xv)),rb=_r([Zr("type"),co("icon"),bo("active",!1),yo("onSetup",(function(){return h})),eo("onAction")].concat(Xv)),ob=function(t,e,n){var r=il(t.element,"."+n);if(r.length>0){var o=Y(r,(function(t){var n=t.dom.getBoundingClientRect().top,o=r[0].dom.getBoundingClientRect().top;return Math.abs(n-o)>e})).getOr(r.length);return B.some({numColumns:o,numRows:Math.ceil(r.length/o)})}return B.none()},ib=function(t,e){return wc([ch(t,e)])},ab=function(t){return ib(ia("unnamed-events"),t)},ub=ia("tooltip.exclusive"),cb=ia("tooltip.show"),sb=ia("tooltip.hide"),lb=function(t,e,n){t.getSystem().broadcastOn([ub],{})},fb=Object.freeze({__proto__:null,hideAllExclusive:lb,setComponents:function(t,e,n,r){n.getTooltip().each((function(t){t.getSystem().isConnected()&&uh.set(t,r)}))}}),db=Object.freeze({__proto__:null,events:function(t,e){var n=function(n){e.getTooltip().each((function(r){Gl(r),t.onHide(n,r),e.clearTooltip()})),e.clearTimer()};return Hi(J([[Pi(cb,(function(n){e.resetTimer((function(){!function(n){if(!e.isShowing()){lb(n);var r=t.lazySink(n).getOrDie(),o=n.getSystem().build({dom:t.tooltipDom,components:t.tooltipComponents,events:Hi("normal"===t.mode?[Pi(qo(),(function(t){Mi(n,cb)})),Pi(jo(),(function(t){Mi(n,sb)}))]:[]),behaviours:wc([uh.config({})])});e.setTooltip(o),jl(r,o),t.onShow(n,o),Vl.position(r,o,{anchor:t.anchor(n)})}}(n)}),t.delay)})),Pi(sb,(function(r){e.resetTimer((function(){n(r)}),t.delay)})),Pi(ci(),(function(t,e){var r=e;r.universal||P(r.channels,ub)&&n(t)})),Xi((function(t){n(t)}))],"normal"===t.mode?[Pi(Go(),(function(t){Mi(t,cb)})),Pi(ai(),(function(t){Mi(t,sb)})),Pi(qo(),(function(t){Mi(t,cb)})),Pi(jo(),(function(t){Mi(t,sb)}))]:[Pi(zi(),(function(t,e){Mi(t,cb)})),Pi(Ti(),(function(t){Mi(t,sb)}))]]))}}),mb=[Yr("lazySink"),Yr("tooltipDom"),mo("exclusive",!0),mo("tooltipComponents",[]),mo("delay",300),vo("mode","normal",["normal","follow-highlight"]),mo("anchor",(function(t){return{type:"hotspot",hotspot:t,layouts:{onLtr:v([ac,ic,ec,rc,nc,oc]),onRtl:v([ac,ic,ec,rc,nc,oc])}}})),zu("onHide"),zu("onShow")],gb=Sc({fields:mb,name:"tooltipping",active:db,state:Object.freeze({__proto__:null,init:function(){var t=ts(),e=ts(),n=function(){t.on(clearTimeout)},r=v("not-implemented");return Ca({getTooltip:e.get,isShowing:e.isSet,setTooltip:e.set,clearTooltip:e.clear,clearTimer:n,resetTimer:function(e,r){n(),t.set(setTimeout(e,r))},readState:r})}}),apis:fb}),hb=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),pb=tinymce.util.Tools.resolve("tinymce.EditorManager"),vb=function(t){return t.getParam("height",Math.max(t.getElement().offsetHeight,200))},bb=function(t){return t.getParam("width",hb.DOM.getStyle(t.getElement(),"width"))},yb=function(t){return B.from(t.getParam("min_width")).filter(m)},xb=function(t){return B.from(t.getParam("min_height")).filter(m)},wb=function(t){return B.from(t.getParam("max_width")).filter(m)},Cb=function(t){return B.from(t.getParam("max_height")).filter(m)},Sb=function(t){return!1!==t.getParam("menubar",!0,"boolean")},kb=function(t){var e=t.getParam("toolbar",!0),n=!0===e,r=o(e),i=a(e)&&e.length>0;return!Ob(t)&&(i||r||n)},_b=function(t){var e=F(9,(function(e){return t.getParam("toolbar"+(e+1),!1,"string")})),n=G(e,(function(t){return"string"==typeof t}));return n.length>0?B.some(n):B.none()},Ob=function(t){return _b(t).fold((function(){return t.getParam("toolbar",[],"string[]").length>0}),k)};!function(t){t.default="wrap",t.floating="floating",t.sliding="sliding",t.scrolling="scrolling"}(hv||(hv={}));var Eb,zb=function(t){return t.getParam("toolbar_mode","","string")};!function(t){t.auto="auto",t.top="top",t.bottom="bottom"}(Eb||(Eb={}));var Tb,Mb,Db=function(t){return t.getParam("toolbar_location",Eb.auto,"string")},Ab=function(t){return Db(t)===Eb.bottom},Nb=function(t){if(!t.inline)return B.none();var e=function(t){return t.getParam("fixed_toolbar_container","","string")}(t);if(e.length>0)return lu(Fe(),e);var n=function(t){return t.getParam("fixed_toolbar_container_target")}(t);return f(n)?B.some(Bt.fromDom(n)):B.none()},Bb=function(t){return t.inline&&Nb(t).isSome()},Rb=function(t){return Nb(t).getOrThunk((function(){return He(Re(Bt.fromDom(t.getElement())))}))},Hb=function(t){return t.inline&&!Sb(t)&&!kb(t)&&!Ob(t)},Lb=function(t){return(t.getParam("toolbar_sticky",!1,"boolean")||t.inline)&&!Bb(t)&&!Hb(t)},Vb=function(t){var e=t.getParam("menu");return e?mt(e,(function(t){return O(O({},t),{items:t.items})})):{}},Pb=function(t){return t.getParam("menubar")},Ib=function(t){return t.getParam("anchor_top","#top")},Fb=function(t){return t.getParam("anchor_bottom","#bottom")},Ub="silver.readonly",jb=_r([(Tb="readonly",Jr(Tb,Br))]),Wb=function(t,e){var n=t.outerContainer.element;e&&(t.mothership.broadcastOn([cf()],{target:n}),t.uiMothership.broadcastOn([cf()],{target:n})),t.mothership.broadcastOn([Ub],{readonly:e}),t.uiMothership.broadcastOn([Ub],{readonly:e})},qb=function(t,e){t.on("init",(function(){t.mode.isReadOnly()&&Wb(e,!0)})),t.on("SwitchMode",(function(){return Wb(e,t.mode.isReadOnly())})),function(t){return t.getParam("readonly",!1,"boolean")}(t)&&t.setMode("readonly")},Gb=function(){var t;return Ec.config({channels:(t={},t[Ub]={schema:jb,onReceive:function(t,e){Yd.set(t,e.readonly)}},t)})},$b=function(t){return Yd.config({disabled:t,disableClass:"tox-collection__item--state-disabled"})},Xb=function(t){return Yd.config({disabled:t})},Kb=function(t){return Yd.config({disabled:t,disableClass:"tox-tbtn--disabled"})},Yb=function(t){return Yd.config({disabled:t,disableClass:"tox-tbtn--disabled",useNative:!1})},Jb=function(t,e){var n=t.getApi(e);return function(t){t(n)}},Qb=function(t,e){return $i((function(n){Jb(t,n)((function(n){var r=t.onSetup(n);d(r)&&e.set(r)}))}))},Zb=function(t,e){return Xi((function(n){return Jb(t,n)(e.get())}))},ty=function(t,e){return Yi((function(n,r){Jb(t,n)(t.onAction),t.triggersSubmenu||e!==pv.CLOSE_ON_EXECUTE||(Mi(n,mi()),r.stop())}))},ey=((Mb={})[si()]=["disabling","alloy.base.behaviour","toggling","item-events"],Mb),ny=St,ry=function(t,e,n,r){var o=Co(h);return{type:"item",dom:e.dom,components:ny(e.optComponents),data:t.data,eventOrder:ey,hasSubmenu:t.triggersSubmenu,itemBehaviours:wc([ch("item-events",[ty(t,n),Qb(t,o),Zb(t,o)]),$b((function(){return t.disabled||r.isDisabled()})),Gb(),uh.config({})].concat(t.itemBehaviours))}},oy=function(t){return{value:t.value,meta:O({text:t.text.getOr("")},t.meta)}},iy=tinymce.util.Tools.resolve("tinymce.Env"),ay=function(t){var e=iy.mac?{alt:"&#x2325;",ctrl:"&#x2303;",shift:"&#x21E7;",meta:"&#x2318;",access:"&#x2303;&#x2325;"}:{meta:"Ctrl",access:"Shift+Alt"},n=t.split("+"),r=j(n,(function(t){var n=t.toLowerCase().trim();return xt(e,n)?e[n]:t}));return iy.mac?r.join(""):r.join("+")},uy=function(t,e,n){return void 0===n&&(n=[Cv]),zp(t,{tag:"div",classes:n},e)},cy=function(t){return{dom:{tag:"div",classes:[Sv]},components:[Qa(yp.translate(t))]}},sy=function(t,e){return{dom:{tag:"div",classes:e,innerHtml:t}}},ly=function(t,e){return{dom:{tag:"div",classes:[Sv]},components:[{dom:{tag:t.tag,styles:t.styles},components:[Qa(yp.translate(e))]}]}},fy=function(t){return{dom:{tag:"div",classes:["tox-collection__item-accessory"],innerHtml:ay(t)}}},dy=function(t){return uy("checkmark",t,["tox-collection__item-checkmark"])},my=function(t,e,n){var r,o,i=t.ariaLabel,a=t.value,u=t.iconContent.map((function(t){return function(t,e,n){var r=e();return kp(t,r).or(n).getOrThunk(Cp(r))}(t,e.icons,n)}));return{dom:(r=u.getOr(""),o={tag:"div",attributes:i.map((function(t){return{title:e.translate(t)}})).getOr({}),classes:["tox-swatch"]},O(O({},o),"custom"===a?{tag:"button",classes:z(z([],o.classes,!0),["tox-swatches__picker-btn"],!1),innerHtml:r}:"remove"===a?{classes:z(z([],o.classes,!0),["tox-swatch--remove"],!1),innerHtml:r}:{attributes:O(O({},o.attributes),{"data-mce-color":a}),styles:{"background-color":a}})),optComponents:[]}},gy=function(t){var e=t.map((function(t){return{attributes:{title:yp.translate(t)}}})).getOr({});return O({tag:"div",classes:[vv,bv]},e)},hy=function(t,e,n,r){return void 0===r&&(r=B.none()),"color"===t.presets?my(t,e,r):function(t,e,n,r){var o={tag:"div",classes:[Cv]},i=n?t.iconContent.map((function(t){return zp(t,o,e.icons,r)})).orThunk((function(){return B.some({dom:o})})):B.none(),a=t.checkMark,u=B.from(t.meta).fold((function(){return cy}),(function(t){return xt(t,"style")?x(ly,t.style):cy})),c=t.htmlContent.fold((function(){return t.textContent.map(u)}),(function(t){return B.some(sy(t,[Sv]))}));return{dom:gy(t.ariaLabel),optComponents:[i,c,t.shortcutContent.map(fy),a,t.caret]}}(t,e,n,r)},py=function(t,e){return yt(t,"tooltipWorker").map((function(t){return[gb.config({lazySink:e.getSink,tooltipDom:{tag:"div",classes:["tox-tooltip-worker-container"]},tooltipComponents:[],anchor:function(t){return{type:"submenu",item:t,overrides:{maxHeightFunction:hs}}},mode:"follow-highlight",onShow:function(e,n){t((function(t){gb.setComponents(e,[Za({element:Bt.fromDom(t)})])}))}})]})).getOr([])},vy=function(t,e){var n=function(t){return hb.DOM.encode(t)}(yp.translate(t));if(e.length>0){var r=new RegExp(function(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(e),"gi");return n.replace(r,(function(t){return'<span class="tox-autocompleter-highlight">'+t+"</span>"}))}return n},by=function(t,e){return j(t,(function(t){switch(t.type){case"cardcontainer":return function(t,e){var n="vertical"===t.direction?"tox-collection__item-container--column":Ev,r="left"===t.align?"tox-collection__item-container--align-left":"tox-collection__item-container--align-right";return{dom:{tag:"div",classes:[Ov,n,r,function(){switch(t.valign){case"top":return"tox-collection__item-container--valign-top";case"middle":return"tox-collection__item-container--valign-middle";case"bottom":return"tox-collection__item-container--valign-bottom"}}()]},components:e}}(t,by(t.items,e));case"cardimage":return function(t,e,n){return{dom:{tag:"img",classes:e,attributes:{src:t,alt:n.getOr("")}}}}(t.src,t.classes,t.alt);case"cardtext":var n=t.name.exists((function(t){return P(e.cardText.highlightOn,t)}))?B.from(e.cardText.matchText).getOr(""):"";return sy(vy(t.text,n),t.classes)}}))},yy=ld(Hh(),Lh()),xy=function(t){return{value:t}},wy=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,Cy=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,Sy=function(t){return wy.test(t)||Cy.test(t)},ky=function(t){return function(t,e){return zt(t,e)?function(t,e){return t.substring(e)}(t,e.length):t}(t,"#").toUpperCase()},_y=function(t){var e=function(t){return{value:t.value.replace(wy,(function(t,e,n,r){return e+e+n+n+r+r}))}}(t),n=Cy.exec(e.value);return null===n?["FFFFFF","FF","FF","FF"]:n},Oy=function(t){var e=t.toString(16);return(1===e.length?"0"+e:e).toUpperCase()},Ey=function(t){var e=Oy(t.red)+Oy(t.green)+Oy(t.blue);return xy(e)},zy=Math.min,Ty=Math.max,My=Math.round,Dy=/^rgb\((\d+),\s*(\d+),\s*(\d+)\)/,Ay=/^rgba\((\d+),\s*(\d+),\s*(\d+),\s*(\d?(?:\.\d+)?)\)/,Ny=function(t,e,n,r){return{red:t,green:e,blue:n,alpha:r}},By=function(t){var e=parseInt(t,10);return e.toString()===t&&e>=0&&e<=255},Ry=function(t){var e,n,r,o=(t.hue||0)%360,i=t.saturation/100,a=t.value/100;if(i=Ty(0,zy(i,1)),a=Ty(0,zy(a,1)),0===i)return e=n=r=My(255*a),Ny(e,n,r,1);var u=o/60,c=a*i,s=c*(1-Math.abs(u%2-1)),l=a-c;switch(Math.floor(u)){case 0:e=c,n=s,r=0;break;case 1:e=s,n=c,r=0;break;case 2:e=0,n=c,r=s;break;case 3:e=0,n=s,r=c;break;case 4:e=s,n=0,r=c;break;case 5:e=c,n=0,r=s;break;default:e=n=r=0}return e=My(255*(e+l)),n=My(255*(n+l)),r=My(255*(r+l)),Ny(e,n,r,1)},Hy=function(t){var e=_y(t),n=parseInt(e[1],16),r=parseInt(e[2],16),o=parseInt(e[3],16);return Ny(n,r,o,1)},Ly=function(t,e,n,r){var o=parseInt(t,10),i=parseInt(e,10),a=parseInt(n,10),u=parseFloat(r);return Ny(o,i,a,u)},Vy=function(t){if("transparent"===t)return B.some(Ny(0,0,0,0));var e=Dy.exec(t);if(null!==e)return B.some(Ly(e[1],e[2],e[3],"1"));var n=Ay.exec(t);return null!==n?B.some(Ly(n[1],n[2],n[3],n[4])):B.none()},Py=function(t){return"rgba("+t.red+","+t.green+","+t.blue+","+t.alpha+")"},Iy=Ny(255,0,0,1),Fy=function(t,e){return t.fire("ResizeContent",e)},Uy=function(t,e,n){return{hue:t,saturation:e,value:n}},jy=function(t){var e,n=0,r=0,o=t.red/255,i=t.green/255,a=t.blue/255,u=Math.min(o,Math.min(i,a)),c=Math.max(o,Math.max(i,a));return u===c?Uy(0,0,100*(r=u)):(n=60*((n=o===u?3:a===u?1:5)-(o===u?i-a:a===u?o-i:a-o)/(c-u)),e=(c-u)/c,r=c,Uy(Math.round(n),Math.round(100*e),Math.round(100*r)))},Wy=function(t){return Ey(Ry(t))},qy=function(t){return(e=t,Sy(e)?B.some({value:ky(e)}):B.none()).orThunk((function(){return Vy(t).map(Ey)})).getOrThunk((function(){var e=document.createElement("canvas");e.height=1,e.width=1;var n=e.getContext("2d");n.clearRect(0,0,e.width,e.height),n.fillStyle="#FFFFFF",n.fillStyle=t,n.fillRect(0,0,1,1);var r=n.getImageData(0,0,1,1).data,o=r[0],i=r[1],a=r[2],u=r[3];return Ey(Ny(o,i,a,u))}));var e},Gy=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),$y="tinymce-custom-colors";var Xy,Ky="choiceitem",Yy=[{type:Ky,text:"Light Green",value:"#BFEDD2"},{type:Ky,text:"Light Yellow",value:"#FBEEB8"},{type:Ky,text:"Light Red",value:"#F8CAC6"},{type:Ky,text:"Light Purple",value:"#ECCAFA"},{type:Ky,text:"Light Blue",value:"#C2E0F4"},{type:Ky,text:"Green",value:"#2DC26B"},{type:Ky,text:"Yellow",value:"#F1C40F"},{type:Ky,text:"Red",value:"#E03E2D"},{type:Ky,text:"Purple",value:"#B96AD9"},{type:Ky,text:"Blue",value:"#3598DB"},{type:Ky,text:"Dark Turquoise",value:"#169179"},{type:Ky,text:"Orange",value:"#E67E23"},{type:Ky,text:"Dark Red",value:"#BA372A"},{type:Ky,text:"Dark Purple",value:"#843FA1"},{type:Ky,text:"Dark Blue",value:"#236FA1"},{type:Ky,text:"Light Gray",value:"#ECF0F1"},{type:Ky,text:"Medium Gray",value:"#CED4D9"},{type:Ky,text:"Gray",value:"#95A5A6"},{type:Ky,text:"Dark Gray",value:"#7E8C8D"},{type:Ky,text:"Navy Blue",value:"#34495E"},{type:Ky,text:"Black",value:"#000000"},{type:Ky,text:"White",value:"#ffffff"}],Jy=function(t){void 0===t&&(t=10);var e,n=Gy.getItem($y),r=o(n)?JSON.parse(n):[],i=t-(e=r).length<0?e.slice(0,t):e,a=function(t){i.splice(t,1)};return{add:function(e){(function(t,e){var n=V(t,e);return-1===n?B.none():B.some(n)})(i,e).each(a),i.unshift(e),i.length>t&&i.pop(),Gy.setItem($y,JSON.stringify(i))},state:function(){return i.slice(0)}}}(10),Qy=function(t){return!1!==t.getParam("custom_colors")},Zy=function(t){var e=function(t){return t.getParam("color_map")}(t);return void 0!==e?function(t){for(var e=[],n=0;n<t.length;n+=2)e.push({text:t[n+1],value:"#"+qy(t[n]).value,type:"choiceitem"});return e}(e):Yy},tx=function(t){Jy.add(t)},ex="#000000",nx=function(t){return function(t,e){return t.getParam("color_cols",e,"number")}(t,function(t){return Math.max(5,Math.ceil(Math.sqrt(t)))}(Zy(t).length))},rx=function(t){var e="choiceitem",n={type:e,text:"Remove color",icon:"color-swatch-remove-color",value:"remove"};return t?[n,{type:e,text:"Custom color",icon:"color-picker",value:"custom"}]:[n]},ox=function(t,e,n,r){"custom"===n?lx(t)((function(n){n.each((function(n){tx(n),t.execCommand("mceApplyTextcolor",e,n),r(n)}))}),ex):"remove"===n?(r(""),t.execCommand("mceRemoveTextcolor",e)):(r(n),t.execCommand("mceApplyTextcolor",e,n))},ix=function(t,e){return t.concat(j(Jy.state(),(function(t){return{type:Ky,text:t,value:t}})).concat(rx(e)))},ax=function(t,e){return function(n){n(ix(t,e))}},ux=function(t,e,n){var r="forecolor"===e?"tox-icon-text-color__color":"tox-icon-highlight-bg-color__color";t.setIconFill(r,n)},cx=function(t,e,n,r,o){t.ui.registry.addSplitButton(e,{tooltip:r,presets:"color",icon:"forecolor"===e?"text-color":"highlight-bg-color",select:function(e){return function(t,e){var n;return t.dom.getParents(t.selection.getStart(),(function(t){var r;(r=t.style["forecolor"===e?"color":"background-color"])&&(n=n||r)})),B.from(n)}(t,n).bind((function(t){return Vy(t).map((function(t){var n=Ey(t).value;return Et(e.toLowerCase(),n)}))})).getOr(!1)},columns:nx(t),fetch:ax(Zy(t),Qy(t)),onAction:function(e){ox(t,n,o.get(),h)},onItemAction:function(r,i){ox(t,n,i,(function(n){o.set(n),function(t,e){t.fire("TextColorChange",e)}(t,{name:e,color:n})}))},onSetup:function(n){ux(n,e,o.get());var r=function(t){t.name===e&&ux(n,t.name,t.color)};return t.on("TextColorChange",r),function(){t.off("TextColorChange",r)}}})},sx=function(t,e,n,r){t.ui.registry.addNestedMenuItem(e,{text:r,icon:"forecolor"===e?"text-color":"highlight-bg-color",getSubmenuItems:function(){return[{type:"fancymenuitem",fancytype:"colorswatch",onAction:function(e){ox(t,n,e.value,h)}}]}})},lx=function(t){return function(e,n){var r=!1,o={colorpicker:n};t.windowManager.open({title:"Color Picker",size:"normal",body:{type:"panel",items:[{type:"colorpicker",name:"colorpicker",label:"Color"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:o,onAction:function(t,e){"hex-valid"===e.name&&(r=e.value)},onSubmit:function(n){var o=n.getData().colorpicker;r?(e(B.from(o)),n.close()):t.windowManager.alert(t.translate(["Invalid hex color code: {0}",o]))},onClose:h,onCancel:function(){e(B.none())}})}},fx=function(t,e,n,r,o,i,a,u){var c=Vv(e),s=dx(e,n,r,"color"!==o?"normal":"color",i,a,u);return Fv(t,c,s,r,o)},dx=function(t,e,n,r,o,i,a){return St(j(t,(function(u){return"choiceitem"===u.type?(c=u,Ur("choicemenuitem",Yv,c)).fold(Pv,(function(c){return B.some(function(t,e,n,r,o,i,a,u){void 0===u&&(u=!0);var c=hy({presets:n,textContent:e?t.text:B.none(),htmlContent:B.none(),ariaLabel:t.text,iconContent:t.icon,shortcutContent:e?t.shortcut:B.none(),checkMark:e?B.some(dy(a.icons)):B.none(),caret:B.none(),value:t.value},a,u);return cr(ry({data:oy(t),disabled:t.disabled,getApi:function(t){return{setActive:function(e){_h.set(t,e)},isActive:function(){return _h.isOn(t)},isDisabled:function(){return Yd.isDisabled(t)},setDisabled:function(e){return Yd.set(t,e)}}},onAction:function(e){return r(t.value)},onSetup:function(t){return t.setActive(o),h},triggersSubmenu:!1,itemBehaviours:[]},c,i,a),{toggling:{toggleClass:wv,toggleOnExecute:!1,selected:t.active}})}(c,1===n,r,e,i(u.value),o,a,Vv(t)))})):B.none();var c})))},mx=function(t,e){var n=Dv(e);return 1===t?{mode:"menu",moveOnTab:!0}:"auto"===t?{mode:"grid",selector:"."+n.item,initSize:{numColumns:1,numRows:1}}:{mode:"matrix",rowSelector:"."+("color"===e?"tox-swatches__row":"tox-collection__group")}},gx=function(t,e){var n=t.initData.allowCustomColors&&e.colorinput.hasCustomColors();return t.initData.colors.fold((function(){return ix(e.colorinput.getColors(),n)}),(function(t){return t.concat(rx(n))}))},hx=ia("cell-over"),px=ia("cell-execute"),vx=function(t,e,n){var r,o=function(n){return Di(n,px,{row:t,col:e})},i=function(t,e){e.stop(),o(t)};return eu({dom:{tag:"div",attributes:(r={role:"button"},r["aria-labelledby"]=n,r)},behaviours:wc([ch("insert-table-picker-cell",[Pi(qo(),mh.focus),Pi(si(),o),Pi(Qo(),i),Pi(fi(),i)]),_h.config({toggleClass:"tox-insert-table-picker__selected",toggleOnExecute:!1}),mh.config({onFocus:function(n){return Di(n,hx,{row:t,col:e})}})])})},bx=function(t){return Q(t,(function(t){return j(t,nu)}))},yx=function(t,e){return Qa(e+"x"+t)},xx={inserttable:function(t){var e=ia("size-label"),n=function(t,e,n){for(var r=[],o=0;o<e;o++){for(var i=[],a=0;a<n;a++)i.push(vx(o,a,t));r.push(i)}return r}(e,10,10),r=yx(0,0),o=bp({dom:{tag:"span",classes:["tox-insert-table-picker__label"],attributes:{id:e}},components:[r],behaviours:wc([uh.config({})])});return{type:"widget",data:{value:ia("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[yy.widget({dom:{tag:"div",classes:["tox-insert-table-picker"]},components:bx(n).concat(o.asSpec()),behaviours:wc([ch("insert-table-picker",[$i((function(t){uh.set(o.get(t),[r])})),ji(hx,(function(t,e,r){var i=r.event,a=i.row,u=i.col;!function(t,e,n,r,o){for(var i=0;i<r;i++)for(var a=0;a<o;a++)_h.set(t[i][a],i<=e&&a<=n)}(n,a,u,10,10),uh.set(o.get(t),[yx(a+1,u+1)])})),ji(px,(function(e,n,r){var o=r.event,i=o.row,a=o.col;t.onAction({numRows:i+1,numColumns:a+1}),Mi(e,mi())}))]),nh.config({initSize:{numRows:10,numColumns:10},mode:"flatgrid",selector:'[role="button"]'})])})]}},colorswatch:function(t,e){var n=gx(t,e),r=e.colorinput.getColorCols(),o="color",i=fx(ia("menu-value"),n,(function(e){t.onAction({value:e})}),r,o,pv.CLOSE_ON_EXECUTE,S,e.shared.providers),a=O(O({},i),{markers:Dv(o),movement:mx(r,o)});return{type:"widget",data:{value:ia("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[yy.widget(jh.sketch(a))]}}},wx=function(t,e,n,r,o,i,a,u){void 0===u&&(u=!0);var c=hy({presets:r,textContent:B.none(),htmlContent:n?t.text.map((function(t){return vy(t,e)})):B.none(),ariaLabel:t.text,iconContent:t.icon,shortcutContent:B.none(),checkMark:B.none(),caret:B.none(),value:t.value},a.providers,u,t.icon);return ry({data:oy(t),disabled:t.disabled,getApi:v({}),onAction:function(e){return o(t.value,t.meta)},onSetup:v(h),triggersSubmenu:!1,itemBehaviours:py(t.meta,a)},c,i,a.providers)},Cx=function(t){var e=t.text.fold((function(){return{}}),(function(t){return{innerHtml:t}}));return{type:"separator",dom:O({tag:"div",classes:[bv,"tox-collection__group-heading"]},e),components:[]}},Sx=function(t,e,n,r){void 0===r&&(r=!0);var o=hy({presets:"normal",iconContent:t.icon,textContent:t.text,htmlContent:B.none(),ariaLabel:t.text,caret:B.none(),checkMark:B.none(),shortcutContent:t.shortcut},n,r);return ry({data:oy(t),getApi:function(t){return{isDisabled:function(){return Yd.isDisabled(t)},setDisabled:function(e){return Yd.set(t,e)}}},disabled:t.disabled,onAction:t.onAction,onSetup:t.onSetup,triggersSubmenu:!1,itemBehaviours:[]},o,e,n)},kx=function(t,e,n,r,o){void 0===r&&(r=!0),void 0===o&&(o=!1);var i,a=o?(i=n.icons,uy("chevron-down",i,[kv])):function(t){return uy("chevron-right",t,[kv])}(n.icons),u=hy({presets:"normal",iconContent:t.icon,textContent:t.text,htmlContent:B.none(),ariaLabel:t.text,caret:B.some(a),checkMark:B.none(),shortcutContent:t.shortcut},n,r);return ry({data:oy(t),getApi:function(t){return{isDisabled:function(){return Yd.isDisabled(t)},setDisabled:function(e){return Yd.set(t,e)}}},disabled:t.disabled,onAction:h,onSetup:t.onSetup,triggersSubmenu:!0,itemBehaviours:[]},u,e,n)},_x=function(t,e,n,r){void 0===r&&(r=!0);var o=hy({iconContent:t.icon,textContent:t.text,htmlContent:B.none(),ariaLabel:t.text,checkMark:B.some(dy(n.icons)),caret:B.none(),shortcutContent:t.shortcut,presets:"normal",meta:t.meta},n,r);return cr(ry({data:oy(t),disabled:t.disabled,getApi:function(t){return{setActive:function(e){_h.set(t,e)},isActive:function(){return _h.isOn(t)},isDisabled:function(){return Yd.isDisabled(t)},setDisabled:function(e){return Yd.set(t,e)}}},onAction:t.onAction,onSetup:t.onSetup,triggersSubmenu:!1,itemBehaviours:[]},o,e,n),{toggling:{toggleClass:wv,toggleOnExecute:!1,selected:t.active}})},Ox=function(t,e){return yt(xx,t.fancytype).map((function(n){return n(t,e)}))},Ex=function(t,e,n,r){var o={dom:gy(t.label),optComponents:[B.some({dom:{tag:"div",classes:[Ov,Ev]},components:by(t.items,r)})]};return ry({data:oy(O({text:B.none()},t)),disabled:t.disabled,getApi:function(t){return{isDisabled:function(){return Yd.isDisabled(t)},setDisabled:function(e){Yd.set(t,e),W(il(t.element,"*"),(function(n){t.getSystem().getByDom(n).each((function(t){t.hasConfigured(Yd)&&Yd.set(t,e)}))}))}}},onAction:t.onAction,onSetup:t.onSetup,triggersSubmenu:!1,itemBehaviours:B.from(r.itemBehaviours).getOr([])},o,e,n.providers)};!function(t){t[t.ContentFocus=0]="ContentFocus",t[t.UiFocus=1]="UiFocus"}(Xy||(Xy={}));var zx=function(t,e,n,r,o){var i,a=n.shared.providers,u=function(t){return o?O(O({},t),{shortcut:B.none(),icon:t.text.isSome()?B.none():t.icon}):t};switch(t.type){case"menuitem":return(i=t,Ur("menuitem",eb,i)).fold(Pv,(function(t){return B.some(Sx(u(t),e,a,r))}));case"nestedmenuitem":return function(t){return Ur("nestedmenuitem",nb,t)}(t).fold(Pv,(function(t){return B.some(kx(u(t),e,a,r,o))}));case"togglemenuitem":return function(t){return Ur("togglemenuitem",rb,t)}(t).fold(Pv,(function(t){return B.some(_x(u(t),e,a,r))}));case"separator":return function(t){return Ur("separatormenuitem",Jp,t)}(t).fold(Pv,(function(t){return B.some(Cx(t))}));case"fancymenuitem":return function(t){return Ur("fancymenuitem",tb,t)}(t).fold(Pv,(function(t){return Ox(u(t),n)}));default:return console.error("Unknown item in general menu",t),B.none()}},Tx=function(t,e,n,r,o,i,a){var u=1===r,c=!u||Vv(t);return St(j(t,(function(t){switch(t.type){case"separator":return(r=t,Ur("Autocompleter.Separator",Jp,r)).fold(Pv,(function(t){return B.some(Cx(t))}));case"cardmenuitem":return function(t){return Ur("cardmenuitem",Kv,t)}(t).fold(Pv,(function(t){return B.some(Ex(O(O({},t),{onAction:function(e){t.onAction(e),n(t.value,t.meta)}}),o,i,{itemBehaviours:py(t.meta,i),cardText:{matchText:e,highlightOn:a}}))}));case"autocompleteitem":default:return function(t){return Ur("Autocompleter.Item",Qp,t)}(t).fold(Pv,(function(t){return B.some(wx(t,e,u,"normal",n,o,i,c))}))}var r})))},Mx=function(t,e,n,r,o){var i=Vv(e),a=St(j(e,(function(t){var e=function(t){return zx(t,n,r,function(t){return o?!xt(t,"text"):i}(t),o)};return"nestedmenuitem"===t.type&&t.getSubmenuItems().length<=0?e(O(O({},t),{disabled:!0})):e(t)})));return(o?Iv:Fv)(t,i,a,1,"normal")},Dx=function(t){return Kh.singleData(t.value,t)},Ax=function(t,e){var n=ts(),r=Co(!1),o=eu(Yh.sketch({dom:{tag:"div",classes:["tox-autocompleter"]},components:[],fireDismissalEventInstead:{},inlineBehaviours:wc([ch("dismissAutocompleter",[Pi(Ci(),(function(){return u()}))])]),lazySink:e.getSink})),i=function(){return n.get().isSome()},a=function(){i()&&Yh.hide(o)},u=function(){if(i()){var e=n.get().map((function(t){return t.element}));Lp(e.getOr(Bt.fromDom(t.selection.getNode()))).each(Dn),a(),n.clear(),r.set(!1)}},c=Ut((function(){return gv(t)})),s=function(e,n,r,i){e.matchLength=n.text.length;var a=st(r,(function(t){return B.from(t.columns)})).getOr(1);Yh.showAt(o,jh.sketch(function(t,e,n,r){var o=n===Xy.ContentFocus?Tm():zm(),i=mx(e,r),a=Dv(r);return{dom:t.dom,components:t.components,items:t.items,value:t.value,markers:{selectedItem:a.selectedItem,item:a.item},movement:i,fakeFocus:n===Xy.ContentFocus,focusManager:o,menuBehaviours:ab("auto"!==e?[]:[$i((function(t,e){ob(t,4,a.item).each((function(e){var n=e.numColumns,r=e.numRows;nh.setGridSize(t,r,n)}))}))])}}(Fv("autocompleter-value",!0,i,a,"normal"),a,Xy.ContentFocus,"normal")),{anchor:{type:"node",root:Bt.fromDom(t.getBody()),node:B.from(e.element)}}),Yh.getContent(o).each(um.highlightFirst)},l=function(o){(function(e){return n.get().map((function(n){return Up(t.dom,t.selection.getRng(),n.triggerChar).bind((function(n){return Yp(t,c,n,e)}))})).getOrThunk((function(){return Kp(t,c)}))})(o).fold(u,(function(o){!function(e){if(!i()){var o=Hp(t,e.range);n.set({triggerChar:e.triggerChar,element:o,matchLength:e.text.length}),r.set(!1)}}(o.context),o.lookupData.then((function(i){n.get().map((function(n){var c,f,d,m=o.context;if(n.triggerChar===m.triggerChar){var g=(c=m.triggerChar,d=st(f=i,(function(t){return B.from(t.columns)})).getOr(1),Q(f,(function(n){var o=n.items;return Tx(o,n.matchText,(function(e,o){var i=t.selection.getRng();Up(t.dom,i,c).fold((function(){return console.error("Lost context. Cursor probably moved")}),(function(t){var i=t.range,c={hide:function(){u()},reload:function(t){a(),l(t)}};r.set(!0),n.onAction(c,i,e,o),r.set(!1)}))}),d,pv.BUBBLE_TO_SANDBOX,e,n.highlightOn)})));g.length>0?s(n,m,i,g):m.text.length-n.matchLength>=10?u():a()}}))}))}))},f={onKeypress:Np((function(t){27!==t.which&&l()}),50),cancelIfNecessary:u,isMenuOpen:function(){return Yh.isOpen(o)},isActive:i,isProcessingAction:r.get,getView:function(){return Yh.getContent(o)}};!1===t.hasPlugin("rtc")&&jp(f,t)},Nx=function(t,e,n){return fu(t,e,n).isSome()},Bx=function(t,e){var n=null;return{cancel:function(){null!==n&&(clearTimeout(n),n=null)},schedule:function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];n=setTimeout((function(){t.apply(null,r),n=null}),e)}}},Rx=function(t){var e=t.raw;return void 0===e.touches||1!==e.touches.length?B.none():B.some(e.touches[0])},Hx=function(t){var e=ts(),n=Co(!1),r=Bx((function(e){t.triggerEvent(di(),e),n.set(!0)}),400),o=Eo([{key:Lo(),value:function(t){return Rx(t).each((function(o){r.cancel();var i={x:o.clientX,y:o.clientY,target:t.target};r.schedule(t),n.set(!1),e.set(i)})),B.none()}},{key:Vo(),value:function(t){return r.cancel(),Rx(t).each((function(t){e.on((function(n){(function(t,e){var n=Math.abs(t.clientX-e.x),r=Math.abs(t.clientY-e.y);return n>5||r>5})(t,n)&&e.clear()}))})),B.none()}},{key:Po(),value:function(o){r.cancel();return e.get().filter((function(t){return ye(t.target,o.target)})).map((function(e){return n.get()?(o.prevent(),!1):t.triggerEvent(fi(),o)}))}}]);return{fireIfReady:function(t,e){return yt(o,e).bind((function(e){return e(t)}))}}},Lx=function(){return pe().browser.isFirefox()},Vx=function(t,e){var n=O({stopBackspace:!0},e),r=Hx(n),o=j(["touchstart","touchmove","touchend","touchcancel","gesturestart","mousedown","mouseup","mouseover","mousemove","mouseout","click"].concat(["selectstart","input","contextmenu","change","transitionend","transitioncancel","drag","dragstart","dragend","dragenter","dragleave","dragover","drop","keyup"]),(function(e){return ns(t,e,(function(t){r.fireIfReady(t,e).each((function(e){e&&t.kill()})),n.triggerEvent(e,t)&&t.kill()}))})),i=ts(),a=ns(t,"paste",(function(t){r.fireIfReady(t,"paste").each((function(e){e&&t.kill()})),n.triggerEvent("paste",t)&&t.kill(),i.set(setTimeout((function(){n.triggerEvent(ui(),t)}),0))})),u=ns(t,"keydown",(function(t){n.triggerEvent("keydown",t)?t.kill():n.stopBackspace&&function(t){return t.raw.which===cm[0]&&!P(["input","textarea"],Ht(t.target))&&!Nx(t.target,'[contenteditable="true"]')}(t)&&t.prevent()})),c=function(t,e){return Lx()?rs(t,"focus",e):ns(t,"focusin",e)}(t,(function(t){n.triggerEvent("focusin",t)&&t.kill()})),s=ts(),l=function(t,e){return Lx()?rs(t,"blur",e):ns(t,"focusout",e)}(t,(function(t){n.triggerEvent("focusout",t)&&t.kill(),s.set(setTimeout((function(){n.triggerEvent(ai(),t)}),0))}));return{unbind:function(){W(o,(function(t){t.unbind()})),u.unbind(),c.unbind(),l.unbind(),a.unbind(),i.on(clearTimeout),s.on(clearTimeout)}}},Px=function(t,e){var n=yt(t,"target").getOr(e);return Co(n)},Ix=So([{stopped:[]},{resume:["element"]},{complete:[]}]),Fx=function(t,e,n,r,o,i){var a=t(e,r),u=function(t,e){var n=Co(!1),r=Co(!1);return{stop:function(){n.set(!0)},cut:function(){r.set(!0)},isStopped:n.get,isCut:r.get,event:t,setSource:e.set,getSource:e.get}}(n,o);return a.fold((function(){return i.logEventNoHandlers(e,r),Ix.complete()}),(function(t){var n=t.descHandler;return _a(n)(u),u.isStopped()?(i.logEventStopped(e,t.element,n.purpose),Ix.stopped()):u.isCut()?(i.logEventCut(e,t.element,n.purpose),Ix.complete()):Oe(t.element).fold((function(){return i.logNoParent(e,t.element,n.purpose),Ix.complete()}),(function(r){return i.logEventResponse(e,t.element,n.purpose),Ix.resume(r)}))}))},Ux=function(t,e,n,r,o,i){return Fx(t,e,n,r,o,i).fold(k,(function(r){return Ux(t,e,n,r,o,i)}),S)},jx=function(t,e,n){var r=function(t){var e=Co(!1);return{stop:function(){e.set(!0)},cut:h,isStopped:e.get,isCut:S,event:t,setSource:C("Cannot set source of a broadcasted event"),getSource:C("Cannot get source of a broadcasted event")}}(e);return W(t,(function(t){var e=t.descHandler;_a(e)(r)})),r.isStopped()},Wx=function(t,e,n,r,o){var i=Px(n,r);return Ux(t,e,n,r,i,o)},qx=function(){var t={};return{registerId:function(e,n,r){dt(r,(function(r,o){var i=void 0!==t[o]?t[o]:{};i[n]=function(t,e){return n=x.apply(void 0,[t.handler].concat(e)),r=t.purpose,{cHandler:n,purpose:r};var n,r}(r,e),t[o]=i}))},unregisterId:function(e){dt(t,(function(t,n){xt(t,e)&&delete t[e]}))},filterByType:function(e){return yt(t,e).map((function(t){return pt(t,(function(t,e){return function(t,e){return{id:t,descHandler:e}}(e,t)}))})).getOr([])},find:function(e,n,r){return yt(t,n).bind((function(t){return Do(r,(function(e){return function(t,e){return fa(e).bind((function(e){return yt(t,e)})).map((function(t){return function(t,e){return{element:t,descHandler:e}}(e,t)}))}(t,e)}),e)}))}}},Gx=function(){var t=qx(),e={},n=function(t){var e=t.element;return fa(e).getOrThunk((function(){return function(t,e){var n=ia(ca+t);return la(e,n),n}("uid-",t.element)}))},r=function(n){fa(n.element).each((function(n){delete e[n],t.unregisterId(n)}))};return{find:function(e,n,r){return t.find(e,n,r)},filter:function(e){return t.filterByType(e)},register:function(o){var i=n(o);wt(e,i)&&function(t,n){var o=e[n];if(o!==t)throw new Error('The tagId "'+n+'" is already used by: '+ea(o.element)+"\nCannot use it for: "+ea(t.element)+"\nThe conflicting element is"+(Ie(o.element)?" ":" not ")+"already in the DOM");r(t)}(o,i);var a=[o];t.registerId(a,i,o.events),e[i]=o},unregister:r,getById:function(t){return yt(e,t)}}},$x=Dd({name:"Container",factory:function(t){var e=t.dom,n=e.attributes,r=E(e,["attributes"]);return{uid:t.uid,dom:O({tag:"div",attributes:O({role:"presentation"},n)},r),components:t.components,behaviours:Tf(t.containerBehaviours),events:t.events,domModification:t.domModification,eventOrder:t.eventOrder}},configFields:[mo("components",[]),zf("containerBehaviours",[]),mo("events",{}),mo("domModification",{}),mo("eventOrder",{})]}),Xx=function(t){var e=function(e){return Oe(t.element).fold(k,(function(t){return ye(e,t)}))},n=Gx(),r=function(t,r){return n.find(e,t,r)},o=Vx(t.element,{triggerEvent:function(t,e){return yu(t,e.target,(function(n){return function(t,e,n,r){return Wx(t,e,n,n.target,r)}(r,t,e,n)}))}}),i={debugInfo:v("real"),triggerEvent:function(t,e,n){yu(t,e,(function(o){return Wx(r,t,n,e,o)}))},triggerFocus:function(t,e){fa(t).fold((function(){Mc(t)}),(function(n){yu(ii(),t,(function(n){return function(t,e,n,r,o){var i=Px(n,r);Fx(t,e,n,r,i,o)}(r,ii(),{originator:e,kill:h,prevent:h,target:t},t,n),!1}))}))},triggerEscape:function(t,e){i.triggerEvent("keydown",t.element,e.event)},getByUid:function(t){return g(t)},getByDom:function(t){return p(t)},build:eu,addToGui:function(t){c(t)},removeFromGui:function(t){s(t)},addToWorld:function(t){a(t)},removeFromWorld:function(t){u(t)},broadcast:function(t){f(t)},broadcastOn:function(t,e){d(t,e)},broadcastEvent:function(t,e){m(t,e)},isConnected:k},a=function(t){t.connect(i),Pt(t.element)||(n.register(t),W(t.components(),a),i.triggerEvent(hi(),t.element,{target:t.element}))},u=function(t){Pt(t.element)||(W(t.components(),u),n.unregister(t)),t.disconnect()},c=function(e){jl(t,e)},s=function(t){Gl(t)},l=function(t){var e=n.filter(ci());W(e,(function(e){var n=e.descHandler;_a(n)(t)}))},f=function(t){l({universal:!0,data:t})},d=function(t,e){l({universal:!1,channels:t,data:e})},m=function(t,e){var r=n.filter(t);return jx(r,e)},g=function(t){return n.getById(t).fold((function(){return qn.error(new Error('Could not find component with uid: "'+t+'" in system.'))}),qn.value)},p=function(t){var e=fa(t).getOr("not found");return g(e)};return a(t),{root:t,element:t.element,destroy:function(){o.unbind(),Mn(t.element)},add:c,remove:s,getByUid:g,getByDom:p,addToWorld:a,removeFromWorld:u,broadcast:f,broadcastOn:d,broadcastEvent:m}},Kx=v([mo("prefix","form-field"),zf("fieldBehaviours",[Hd,Ef])]),Yx=v([id({schema:[Yr("dom")],name:"label"}),id({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:t.text}}}},schema:[Yr("text")],name:"aria-descriptor"}),rd({factory:{sketch:function(t){var e=_o(t,["factory"]);return t.factory.sketch(e)}},schema:[Yr("factory")],name:"field"})]),Jx=Ad({name:"FormField",configFields:Kx(),partFields:Yx(),factory:function(t,e,n,r){var o=Mf(t.fieldBehaviours,[Hd.config({find:function(e){return vd(e,t,"field")}}),Ef.config({store:{mode:"manual",getValue:function(t){return Hd.getCurrent(t).bind(Ef.getValue)},setValue:function(t,e){Hd.getCurrent(t).each((function(t){Ef.setValue(t,e)}))}}})]),i=Hi([$i((function(e,n){var r=yd(e,t,["label","field","aria-descriptor"]);r.field().each((function(e){var n=ia(t.prefix);r.label().each((function(t){We(t.element,"for",n),We(e.element,"id",n)})),r["aria-descriptor"]().each((function(n){var r=ia(t.prefix);We(n.element,"id",r),We(e.element,"aria-describedby",r)}))}))}))]),a={getField:function(e){return vd(e,t,"field")},getLabel:function(e){return vd(e,t,"label")}};return{uid:t.uid,dom:t.dom,components:e,behaviours:o,events:i,apis:a}},apis:{getField:function(t,e){return t.getField(e)},getLabel:function(t,e){return t.getLabel(e)}}}),Qx=Object.freeze({__proto__:null,exhibit:function(t,e){return ka({attributes:Eo([{key:e.tabAttr,value:"true"}])})}}),Zx=[mo("tabAttr","data-alloy-tabstop")],tw=Sc({fields:Zx,name:"tabstopping",active:Qx}),ew=tinymce.util.Tools.resolve("tinymce.html.Entities"),nw=function(t,e,n,r){var o=rw(t,e,n,r);return Jx.sketch(o)},rw=function(t,e,n,r){return{dom:ow(n),components:t.toArray().concat([e]),fieldBehaviours:wc(r)}},ow=function(t){return{tag:"div",classes:["tox-form__group"].concat(t)}},iw=function(t,e){return Jx.parts.label({dom:{tag:"label",classes:["tox-label"],innerHtml:e.translate(t)}})},aw=ia("form-component-change"),uw=ia("form-close"),cw=ia("form-cancel"),sw=ia("form-action"),lw=ia("form-submit"),fw=ia("form-block"),dw=ia("form-unblock"),mw=ia("form-tabchange"),gw=ia("form-resize"),hw=function(t,e){var n,r,o,i=t.label.map((function(t){return iw(t,e)})),a=function(t){return function(e,n){fu(n.event.target,"[data-collection-item-value]").each((function(r){t(e,n,r,Ge(r,"data-collection-item-value"))}))}},u=a((function(n,r,o,i){r.stop(),e.isDisabled()||Di(n,sw,{name:t.name,value:i})})),c=[Pi(qo(),a((function(t,e,n){Mc(n)}))),Pi(Qo(),u),Pi(fi(),u),Pi(Go(),a((function(t,e,n){lu(t.element,"."+_v).each((function(t){Ia(t,_v)})),Va(n,_v)}))),Pi($o(),a((function(t){lu(t.element,"."+_v).each((function(t){Ia(t,_v)}))}))),Yi(a((function(e,n,r,o){Di(e,sw,{name:t.name,value:o})})))],s=function(t,e){return j(il(t.element,".tox-collection__item"),e)},l=Jx.parts.field({dom:{tag:"div",classes:["tox-collection"].concat(1!==t.columns?["tox-collection--grid"]:["tox-collection--list"])},components:[],factory:{sketch:b},behaviours:wc([Yd.config({disabled:e.isDisabled,onDisabled:function(t){s(t,(function(t){Va(t,"tox-collection__item--state-disabled"),We(t,"aria-disabled",!0)}))},onEnabled:function(t){s(t,(function(t){Ia(t,"tox-collection__item--state-disabled"),Ke(t,"aria-disabled")}))}}),Gb(),uh.config({}),Ef.config({store:{mode:"memory",initialValue:[]},onSetValue:function(n,r){!function(n,r){var o=j(r,(function(n){var r=yp.translate(n.text),o=1===t.columns?'<div class="tox-collection__item-label">'+r+"</div>":"",i='<div class="tox-collection__item-icon">'+n.icon+"</div>",a={_:" "," - ":" ","-":" "},u=r.replace(/\_| \- |\-/g,(function(t){return a[t]}));return'<div class="tox-collection__item'+(e.isDisabled()?" tox-collection__item--state-disabled":"")+'" tabindex="-1" data-collection-item-value="'+ew.encodeAllRaw(n.value)+'" title="'+u+'" aria-label="'+u+'">'+i+o+"</div>"})),i="auto"!==t.columns&&t.columns>1?U(o,t.columns):[o],a=j(i,(function(t){return'<div class="tox-collection__group">'+t.join("")+"</div>"}));Qi(n.element,a.join(""))}(n,r),"auto"===t.columns&&ob(n,5,"tox-collection__item").each((function(t){var e=t.numRows,r=t.numColumns;nh.setGridSize(n,e,r)})),Mi(n,gw)}}),tw.config({}),nh.config((r=t.columns,o="normal",1===r?{mode:"menu",moveOnTab:!1,selector:".tox-collection__item"}:"auto"===r?{mode:"flatgrid",selector:".tox-collection__item",initSize:{numColumns:1,numRows:1}}:{mode:"matrix",selectors:{row:"color"===o?".tox-swatches__row":".tox-collection__group",cell:"color"===o?".tox-swatch":"."+bv}})),ch("collection-events",c)]),eventOrder:(n={},n[si()]=["disabling","alloy.base.behaviour","collection-events"],n)});return nw(i,l,["tox-form__group--collection"],[])},pw=v([io("data"),mo("inputAttributes",{}),mo("inputStyles",{}),mo("tag","input"),mo("inputClasses",[]),zu("onSetValue"),mo("styles",{}),mo("eventOrder",{}),zf("inputBehaviours",[Ef,mh]),mo("selectOnFocus",!0)]),vw=function(t){return wc([mh.config({onFocus:t.selectOnFocus?function(t){var e=t.element,n=Wa(e);e.dom.setSelectionRange(0,n.length)}:h})])},bw=function(t){return O(O({},vw(t)),Mf(t.inputBehaviours,[Ef.config({store:O(O({mode:"manual"},t.data.map((function(t){return{initialValue:t}})).getOr({})),{getValue:function(t){return Wa(t.element)},setValue:function(t,e){Wa(t.element)!==e&&qa(t.element,e)}}),onSetValue:t.onSetValue})]))},yw=function(t){return{tag:t.tag,attributes:O({type:"text"},t.inputAttributes),styles:t.inputStyles,classes:t.inputClasses}},xw=Dd({name:"Input",configFields:pw(),factory:function(t,e){return{uid:t.uid,dom:yw(t),components:[],behaviours:bw(t),eventOrder:t.eventOrder}}}),ww={},Cw={exports:ww};!function(t,e,r,o){!function(n,o){"object"==typeof e&&void 0!==r?r.exports=o():"function"==typeof t&&t.amd?t(o):(n="undefined"!=typeof globalThis?globalThis:n||self).EphoxContactWrapper=o()}(this,(function(){var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{},e={exports:{}};!function(e){!function(t){var n=setTimeout;function r(){}function o(t){if("object"!=typeof this)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=[],l(t,this)}function i(t,e){for(;3===t._state;)t=t._value;0!==t._state?(t._handled=!0,o._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 u(e.promise,t)}a(e.promise,r)}else(1===t._state?a:u)(e.promise,t._value)}))):t._deferreds.push(e)}function a(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof o)return t._state=3,t._value=e,void c(t);if("function"==typeof n)return void l((r=n,i=e,function(){r.apply(i,arguments)}),t)}t._state=1,t._value=e,c(t)}catch(e){u(t,e)}var r,i}function u(t,e){t._state=2,t._value=e,c(t)}function c(t){2===t._state&&0===t._deferreds.length&&o._immediateFn((function(){t._handled||o._unhandledRejectionFn(t._value)}));for(var e=0,n=t._deferreds.length;e<n;e++)i(t,t._deferreds[e]);t._deferreds=null}function s(t,e,n){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=n}function l(t,e){var n=!1;try{t((function(t){n||(n=!0,a(e,t))}),(function(t){n||(n=!0,u(e,t))}))}catch(t){if(n)return;n=!0,u(e,t)}}o.prototype.catch=function(t){return this.then(null,t)},o.prototype.then=function(t,e){var n=new this.constructor(r);return i(this,new s(t,e,n)),n},o.all=function(t){var e=Array.prototype.slice.call(t);return new o((function(t,n){if(0===e.length)return t([]);var r=e.length;function o(i,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var u=a.then;if("function"==typeof u)return void u.call(a,(function(t){o(i,t)}),n)}e[i]=a,0==--r&&t(e)}catch(t){n(t)}}for(var i=0;i<e.length;i++)o(i,e[i])}))},o.resolve=function(t){return t&&"object"==typeof t&&t.constructor===o?t:new o((function(e){e(t)}))},o.reject=function(t){return new o((function(e,n){n(t)}))},o.race=function(t){return new o((function(e,n){for(var r=0,o=t.length;r<o;r++)t[r].then(e,n)}))},o._immediateFn="function"==typeof setImmediate?function(t){setImmediate(t)}:function(t){n(t,0)},o._unhandledRejectionFn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)},o._setImmediateFn=function(t){o._immediateFn=t},o._setUnhandledRejectionFn=function(t){o._unhandledRejectionFn=t},e.exports?e.exports=o:t.Promise||(t.Promise=o)}(t)}(e);var r=e.exports;return{boltExport:("undefined"!=typeof window?window:Function("return this;")()).Promise||r}}))}(void 0,ww,Cw);var Sw,kw=Cw.exports.boltExport,_w=function(t){var e=B.none(),n=[],r=function(t){o()?a(t):n.push(t)},o=function(){return e.isSome()},i=function(t){W(t,a)},a=function(t){e.each((function(e){setTimeout((function(){t(e)}),0)}))};return t((function(t){o()||(e=B.some(t),i(n),n=[])})),{get:r,map:function(t){return _w((function(e){r((function(n){e(t(n))}))}))},isReady:o}},Ow={nu:_w,pure:function(t){return _w((function(e){e(t)}))}},Ew=function(t){setTimeout((function(){throw t}),0)},zw=function(t){var e=function(e){t().then(e,Ew)};return{map:function(e){return zw((function(){return t().then(e)}))},bind:function(e){return zw((function(){return t().then((function(t){return e(t).toPromise()}))}))},anonBind:function(e){return zw((function(){return t().then((function(){return e.toPromise()}))}))},toLazy:function(){return Ow.nu(e)},toCached:function(){var e=null;return zw((function(){return null===e&&(e=t()),e}))},toPromise:t,get:e}},Tw=function(t){return zw((function(){return new kw(t)}))},Mw=function(t){return zw((function(){return kw.resolve(t)}))},Dw=["input","textarea"],Aw=function(t){var e=Ht(t);return P(Dw,e)},Nw=function(t,e){var n=e.getRoot(t).getOr(t.element);Ia(n,e.invalidClass),e.notify.each((function(e){Aw(t.element)&&We(t.element,"aria-invalid",!1),e.getContainer(t).each((function(t){Qi(t,e.validHtml)})),e.onValid(t)}))},Bw=function(t,e,n,r){var o=e.getRoot(t).getOr(t.element);Va(o,e.invalidClass),e.notify.each((function(e){Aw(t.element)&&We(t.element,"aria-invalid",!0),e.getContainer(t).each((function(t){Qi(t,r)})),e.onInvalid(t,r)}))},Rw=function(t,e,n){return e.validator.fold((function(){return Mw(qn.value(!0))}),(function(e){return e.validate(t)}))},Hw=function(t,e,n){return e.notify.each((function(e){e.onValidate(t)})),Rw(t,e).map((function(n){return t.getSystem().isConnected()?n.fold((function(n){return Bw(t,e,0,n),qn.error(n)}),(function(n){return Nw(t,e),qn.value(n)})):qn.error("No longer in system")}))},Lw=Object.freeze({__proto__:null,markValid:Nw,markInvalid:Bw,query:Rw,run:Hw,isInvalid:function(t,e){var n=e.getRoot(t).getOr(t.element);return Fa(n,e.invalidClass)}}),Vw=Object.freeze({__proto__:null,events:function(t,e){return t.validator.map((function(e){return Hi([Pi(e.onEvent,(function(e){Hw(e,t).get(b)}))].concat(e.validateOnLoad?[$i((function(e){Hw(e,t).get(h)}))]:[]))})).getOr({})}}),Pw=[Yr("invalidClass"),mo("getRoot",B.none),fo("notify",[mo("aria","alert"),mo("getContainer",B.none),mo("validHtml",""),zu("onValid"),zu("onInvalid"),zu("onValidate")]),fo("validator",[Yr("validate"),mo("onEvent","input"),mo("validateOnLoad",!0)])],Iw=Sc({fields:Pw,name:"invalidating",active:Vw,apis:Lw,extra:{validation:function(t){return function(e){var n=Ef.getValue(e);return Mw(t(n))}}}}),Fw=Object.freeze({__proto__:null,getCoupled:function(t,e,n,r){return n.getOrCreate(t,e,r)}}),Uw=[Jr("others",Fr(qn.value,Mr()))],jw=Sc({fields:Uw,name:"coupling",apis:Fw,state:Object.freeze({__proto__:null,init:function(){var t={},e=v({});return Ca({readState:e,getOrCreate:function(e,n,r){var o=lt(n.others);if(o)return yt(t,r).getOrThunk((function(){var o=yt(n.others,r).getOrDie("No information found for coupled component: "+r)(e),i=e.getSystem().build(o);return t[r]=i,i}));throw new Error("Cannot find coupled component: "+r+". Known coupled components: "+JSON.stringify(o,null,2))}})}})}),Ww=v("sink"),qw=v(id({name:Ww(),overrides:v({dom:{tag:"div"},behaviours:wc([Vl.config({useFixed:k})]),events:Hi([Wi(Xo()),Wi(Fo()),Wi(Qo())])})}));!function(t){t[t.HighlightFirst=0]="HighlightFirst",t[t.HighlightNone=1]="HighlightNone"}(Sw||(Sw={}));var Gw,$w,Xw,Kw=function(t,e){var n=t.getHotspot(e).getOr(e),r="hotspot",o=t.getAnchorOverrides();return t.layouts.fold((function(){return{type:r,hotspot:n,overrides:o}}),(function(t){return{type:r,hotspot:n,overrides:o,layouts:t}}))},Yw=function(t,e,n,r,o,i,a){return function(t,e,n,r,o,i,a){var u=function(t,e,n){return(0,t.fetch)(n).map(e)}(t,e,r),c=tC(r,t);return u.map((function(t){return t.bind((function(t){return B.from(Kh.sketch(O(O({},i.menu()),{uid:da(""),data:t,highlightImmediately:a===Sw.HighlightFirst,onOpenMenu:function(t,e){var r=c().getOrDie();Vl.position(r,e,{anchor:n}),uf.decloak(o)},onOpenSubmenu:function(t,e,n){var r=c().getOrDie();Vl.position(r,n,{anchor:{type:"submenu",item:e}}),uf.decloak(o)},onRepositionMenu:function(t,e,r){var o=c().getOrDie();Vl.position(o,e,{anchor:n}),W(r,(function(t){Vl.position(o,t.triggeredMenu,{anchor:{type:"submenu",item:t.triggeringItem}})}))},onEscape:function(){return mh.focus(r),uf.close(o),B.some(!0)}})))}))}))}(t,e,Kw(t,n),n,r,o,a).map((function(t){return t.fold((function(){uf.isOpen(r)&&uf.close(r)}),(function(t){uf.cloak(r),uf.open(r,t),i(r)})),r}))},Jw=function(t,e,n,r,o,i,a){return uf.close(r),Mw(r)},Qw=function(t,e,n,r,o,i){var a=jw.getCoupled(n,"sandbox");return(uf.isOpen(a)?Jw:Yw)(t,e,n,a,r,o,i)},Zw=function(t,e,n){var r=Hd.getCurrent(e).getOr(e),o=yn(t.element);n?Qe(r.element,"min-width",o+"px"):function(t,e){bn.set(t,e)}(r.element,o)},tC=function(t,e){return t.getSystem().getByUid(e.uid+"-"+Ww()).map((function(t){return function(){return qn.value(t)}})).getOrThunk((function(){return e.lazySink.fold((function(){return function(){return qn.error(new Error("No internal sink is specified, nor could an external sink be found"))}}),(function(e){return function(){return e(t)}}))}))},eC=function(t){uf.getState(t).each((function(t){Kh.repositionMenus(t)}))},nC=function(t,e,n){var r=du(),o=tC(e,t);return{dom:{tag:"div",classes:t.sandboxClasses,attributes:{id:r.id,role:"listbox"}},behaviours:Af(t.sandboxBehaviours,[Ef.config({store:{mode:"memory",initialValue:e}}),uf.config({onOpen:function(o,i){var a=Kw(t,e);r.link(e.element),t.matchWidth&&Zw(a.hotspot,i,t.useMinWidth),t.onOpen(a,o,i),void 0!==n&&void 0!==n.onOpen&&n.onOpen(o,i)},onClose:function(t,o){r.unlink(e.element),void 0!==n&&void 0!==n.onClose&&n.onClose(t,o)},isPartOf:function(t,n,r){return gu(n,r)||gu(e,r)},getAttachPoint:function(){return o().getOrDie()}}),Hd.config({find:function(t){return uf.getState(t).bind((function(t){return Hd.getCurrent(t)}))}}),Ec.config({channels:O(O({},df({isExtraPart:S})),gf({doReposition:eC}))})])}},rC=function(t){var e=jw.getCoupled(t,"sandbox");eC(e)},oC=function(){return[mo("sandboxClasses",[]),Df("sandboxBehaviours",[Hd,Ec,uf,Ef])]},iC=v([Yr("dom"),Yr("fetch"),zu("onOpen"),Tu("onExecute"),mo("getHotspot",B.some),mo("getAnchorOverrides",v({})),Os(),zf("dropdownBehaviours",[_h,jw,nh,mh]),Yr("toggleClass"),mo("eventOrder",{}),io("lazySink"),mo("matchWidth",!1),mo("useMinWidth",!1),io("role")].concat(oC())),aC=v([od({schema:[_u()],name:"menu",defaults:function(t){return{onExecute:t.onExecute}}}),qw()]),uC=Ad({name:"Dropdown",configFields:iC(),partFields:aC(),factory:function(t,e,n,r){var o,i,a=function(t){uf.getState(t).each((function(t){Kh.highlightPrimary(t)}))},u={expand:function(e){_h.isOn(e)||Qw(t,b,e,r,h,Sw.HighlightNone).get(h)},open:function(e){_h.isOn(e)||Qw(t,b,e,r,h,Sw.HighlightFirst).get(h)},isOpen:_h.isOn,close:function(e){_h.isOn(e)&&Qw(t,b,e,r,h,Sw.HighlightFirst).get(h)},repositionMenus:function(t){_h.isOn(t)&&rC(t)}},c=function(t,e){return Ai(t),B.some(!0)};return{uid:t.uid,dom:t.dom,components:e,behaviours:Mf(t.dropdownBehaviours,[_h.config({toggleClass:t.toggleClass,aria:{mode:"expanded"}}),jw.config({others:{sandbox:function(e){return nC(t,e,{onOpen:function(){return _h.on(e)},onClose:function(){return _h.off(e)}})}}}),nh.config({mode:"special",onSpace:c,onEnter:c,onDown:function(t,e){if(uC.isOpen(t)){var n=jw.getCoupled(t,"sandbox");a(n)}else uC.open(t);return B.some(!0)},onEscape:function(t,e){return uC.isOpen(t)?(uC.close(t),B.some(!0)):B.none()}}),mh.config({})]),events:Eh(B.some((function(e){Qw(t,b,e,r,a,Sw.HighlightFirst).get(h)}))),eventOrder:O(O({},t.eventOrder),(o={},o[si()]=["disabling","toggling","alloy.base.behaviour"],o)),apis:u,domModification:{attributes:O(O({"aria-haspopup":"true"},t.role.fold((function(){return{}}),(function(t){return{role:t}}))),"button"===t.dom.tag?{type:(i="type",yt(t.dom,"attributes").bind((function(t){return yt(t,i)}))).getOr("button")}:{})}}},apis:{open:function(t,e){return t.open(e)},expand:function(t,e){return t.expand(e)},close:function(t,e){return t.close(e)},isOpen:function(t,e){return t.isOpen(e)},repositionMenus:function(t,e){return t.repositionMenus(e)}}}),cC=Object.freeze({__proto__:null,events:function(){return Hi([Li(ni(),k)])},exhibit:function(){return ka({styles:{"-webkit-user-select":"none","user-select":"none","-ms-user-select":"none","-moz-user-select":"-moz-none"},attributes:{unselectable:"on"}})}}),sC=Sc({fields:[],name:"unselecting",active:cC}),lC=ia("color-input-change"),fC=ia("color-swatch-change"),dC=ia("color-picker-cancel"),mC=function(t,e,n){var r=Jx.parts.field({factory:xw,inputClasses:["tox-textfield"],onSetValue:function(t){return Iw.run(t).get(h)},inputBehaviours:wc([Yd.config({disabled:e.providers.isDisabled}),Gb(),tw.config({}),Iw.config({invalidClass:"tox-textbox-field-invalid",getRoot:function(t){return Oe(t.element)},notify:{onValid:function(t){var e=Ef.getValue(t);Di(t,lC,{color:e})}},validator:{validateOnLoad:!1,validate:function(t){var e=Ef.getValue(t);if(0===e.length)return Mw(qn.value(!0));var n=Bt.fromTag("span");Qe(n,"background-color",e);var r=rn(n,"background-color").fold((function(){return qn.error("blah")}),(function(t){return qn.value(e)}));return Mw(r)}}})]),selectOnFocus:!1}),o=t.label.map((function(t){return iw(t,e.providers)})),i=function(t,e){Di(t,fC,{value:e})},a=bp(function(t,e){return uC.sketch({dom:t.dom,components:t.components,toggleClass:"mce-active",dropdownBehaviours:wc([Xb(e.providers.isDisabled),Gb(),sC.config({}),tw.config({})]),layouts:t.layouts,sandboxClasses:["tox-dialog__popups"],lazySink:e.getSink,fetch:function(n){return Tw((function(e){return t.fetch(e)})).map((function(r){return B.from(Dx(cr(fx(ia("menu-value"),r,(function(e){t.onItemAction(n,e)}),t.columns,t.presets,pv.CLOSE_ON_EXECUTE,S,e.providers),{movement:mx(t.columns,t.presets)})))}))},parts:{menu:Bv(0,0,t.presets)}})}({dom:{tag:"span",attributes:{"aria-label":e.providers.translate("Color swatch")}},layouts:{onRtl:function(){return[nc,ec,ac]},onLtr:function(){return[ec,nc,ac]}},components:[],fetch:ax(n.getColors(),n.hasCustomColors()),columns:n.getColorCols(),presets:"color",onItemAction:function(t,e){a.getOpt(t).each((function(t){"custom"===e?n.colorPicker((function(e){e.fold((function(){return Mi(t,dC)}),(function(e){i(t,e),tx(e)}))}),"#ffffff"):i(t,"remove"===e?"":e)}))}},e));return Jx.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:o.toArray().concat([{dom:{tag:"div",classes:["tox-color-input"]},components:[r,a.asSpec()]}]),fieldBehaviours:wc([ch("form-field-events",[Pi(lC,(function(e,n){a.getOpt(e).each((function(t){Qe(t.element,"background-color",n.event.color)})),Di(e,aw,{name:t.name})})),Pi(fC,(function(t,e){Jx.getField(t).each((function(n){Ef.setValue(n,e.event.value),Hd.getCurrent(t).each(mh.focus)}))})),Pi(dC,(function(t,e){Jx.getField(t).each((function(e){Hd.getCurrent(t).each(mh.focus)}))}))])])})},gC=id({schema:[Yr("dom")],name:"label"}),hC=function(t){return id({name:t+"-edge",overrides:function(e){return e.model.manager.edgeActions[t].fold((function(){return{}}),(function(t){return{events:Hi([Ii(Lo(),(function(e,n,r){return t(e,r)}),[e]),Ii(Fo(),(function(e,n,r){return t(e,r)}),[e]),Ii(Uo(),(function(e,n,r){r.mouseIsDown.get()&&t(e,r)}),[e])])}}))}})},pC=hC("top-left"),vC=hC("top"),bC=hC("top-right"),yC=hC("right"),xC=hC("bottom-right"),wC=hC("bottom"),CC=hC("bottom-left"),SC=hC("left"),kC=rd({name:"thumb",defaults:v({dom:{styles:{position:"absolute"}}}),overrides:function(t){return{events:Hi([Ui(Lo(),t,"spectrum"),Ui(Vo(),t,"spectrum"),Ui(Po(),t,"spectrum"),Ui(Fo(),t,"spectrum"),Ui(Uo(),t,"spectrum"),Ui(Wo(),t,"spectrum")])}}}),_C=rd({schema:[Xr("mouseIsDown",(function(){return Co(!1)}))],name:"spectrum",overrides:function(t){var e=t.model.manager,n=function(n,r){return e.getValueFromEvent(r).map((function(r){return e.setValueFrom(n,t,r)}))};return{behaviours:wc([nh.config({mode:"special",onLeft:function(n){return e.onLeft(n,t)},onRight:function(n){return e.onRight(n,t)},onUp:function(n){return e.onUp(n,t)},onDown:function(n){return e.onDown(n,t)}}),mh.config({})]),events:Hi([Pi(Lo(),n),Pi(Vo(),n),Pi(Fo(),n),Pi(Uo(),(function(e,r){t.mouseIsDown.get()&&n(e,r)}))])}}}),OC=[gC,SC,yC,vC,wC,pC,bC,CC,xC,kC,_C],EC=v("slider.change.value"),zC=function(t){var e=t.event.raw;if(function(t){return-1!==t.type.indexOf("touch")}(e)){var n=e;return void 0!==n.touches&&1===n.touches.length?B.some(n.touches[0]).map((function(t){return gn(t.clientX,t.clientY)})):B.none()}var r=e;return void 0!==r.clientX?B.some(r).map((function(t){return gn(t.clientX,t.clientY)})):B.none()},TC=function(t){return t.model.minX},MC=function(t){return t.model.minY},DC=function(t){return t.model.minX-1},AC=function(t){return t.model.minY-1},NC=function(t){return t.model.maxX},BC=function(t){return t.model.maxY},RC=function(t){return t.model.maxX+1},HC=function(t){return t.model.maxY+1},LC=function(t,e,n){return e(t)-n(t)},VC=function(t){return LC(t,NC,TC)},PC=function(t){return LC(t,BC,MC)},IC=function(t){return VC(t)/2},FC=function(t){return PC(t)/2},UC=function(t){return t.stepSize},jC=function(t){return t.snapToGrid},WC=function(t){return t.snapStart},qC=function(t){return t.rounded},GC=function(t,e){return void 0!==t[e+"-edge"]},$C=function(t){return GC(t,"left")},XC=function(t){return GC(t,"right")},KC=function(t){return GC(t,"top")},YC=function(t){return GC(t,"bottom")},JC=function(t){return t.model.value.get()},QC=function(t){return{x:t}},ZC=function(t){return{y:t}},tS=function(t,e){return{x:t,y:e}},eS=function(t,e){Di(t,EC(),{value:e})},nS=function(t,e,n,r){return t<e?t:t>n?n:t===e?e-1:Math.max(e,t-r)},rS=function(t,e,n,r){return t>n?t:t<e?e:t===n?n+1:Math.min(n,t+r)},oS=function(t,e,n){return Math.max(e,Math.min(n,t))},iS=function(t){var e=t.min,n=t.max,r=t.range,o=t.value,i=t.step,a=t.snap,u=t.snapStart,c=t.rounded,s=t.hasMinEdge,l=t.hasMaxEdge,f=t.minBound,d=t.maxBound,m=t.screenRange,g=s?e-1:e,h=l?n+1:n;if(o<f)return g;if(o>d)return h;var p=function(t,e,n){return Math.min(n,Math.max(t,e))-e}(o,f,d),v=oS(p/m*r+e,g,h);return a&&v>=e&&v<=n?function(t,e,n,r,o){return o.fold((function(){var o=t-e,i=Math.round(o/r)*r;return oS(e+i,e-1,n+1)}),(function(e){var o=(t-e)%r,i=Math.round(o/r),a=Math.floor((t-e)/r),u=Math.floor((n-e)/r),c=e+Math.min(u,a+i)*r;return Math.max(e,c)}))}(v,e,n,i,u):c?Math.round(v):v},aS=function(t){var e=t.min,n=t.max,r=t.range,o=t.value,i=t.hasMinEdge,a=t.hasMaxEdge,u=t.maxBound,c=t.maxOffset,s=t.centerMinEdge,l=t.centerMaxEdge;return o<e?i?0:s:o>n?a?u:l:(o-e)/r*c},uS="top",cS="right",sS="bottom",lS="left",fS=function(t){return t.element.dom.getBoundingClientRect()},dS=function(t,e){return t[e]},mS=function(t){var e=fS(t);return dS(e,lS)},gS=function(t){var e=fS(t);return dS(e,cS)},hS=function(t){var e=fS(t);return dS(e,uS)},pS=function(t){var e=fS(t);return dS(e,sS)},vS=function(t){var e=fS(t);return dS(e,"width")},bS=function(t){var e=fS(t);return dS(e,"height")},yS=function(t,e,n){return(t+e)/2-n},xS=function(t,e){var n=fS(t),r=fS(e),o=dS(n,lS),i=dS(n,cS),a=dS(r,lS);return yS(o,i,a)},wS=function(t,e){var n=fS(t),r=fS(e),o=dS(n,uS),i=dS(n,sS),a=dS(r,uS);return yS(o,i,a)},CS=function(t,e){Di(t,EC(),{value:e})},SS=function(t){return{x:t}},kS=function(t,e,n){var r={min:TC(e),max:NC(e),range:VC(e),value:n,step:UC(e),snap:jC(e),snapStart:WC(e),rounded:qC(e),hasMinEdge:$C(e),hasMaxEdge:XC(e),minBound:mS(t),maxBound:gS(t),screenRange:vS(t)};return iS(r)},_S=function(t){return function(e,n){return function(t,e,n){var r=(t>0?rS:nS)(JC(n).x,TC(n),NC(n),UC(n));return CS(e,SS(r)),B.some(r)}(t,e,n).map(k)}},OS=function(t,e,n,r,o,i){var a=function(t,e,n,r,o){var i=vS(t),a=r.bind((function(e){return B.some(xS(e,t))})).getOr(0),u=o.bind((function(e){return B.some(xS(e,t))})).getOr(i),c={min:TC(e),max:NC(e),range:VC(e),value:n,hasMinEdge:$C(e),hasMaxEdge:XC(e),minBound:mS(t),minOffset:0,maxBound:gS(t),maxOffset:i,centerMinEdge:a,centerMaxEdge:u};return aS(c)}(e,i,n,r,o);return mS(e)-mS(t)+a},ES=_S(-1),zS=_S(1),TS=B.none,MS=B.none,DS={"top-left":B.none(),top:B.none(),"top-right":B.none(),right:B.some((function(t,e){eS(t,QC(RC(e)))})),"bottom-right":B.none(),bottom:B.none(),"bottom-left":B.none(),left:B.some((function(t,e){eS(t,QC(DC(e)))}))},AS=Object.freeze({__proto__:null,setValueFrom:function(t,e,n){var r=kS(t,e,n),o=SS(r);return CS(t,o),r},setToMin:function(t,e){var n=TC(e);CS(t,SS(n))},setToMax:function(t,e){var n=NC(e);CS(t,SS(n))},findValueOfOffset:kS,getValueFromEvent:function(t){return zC(t).map((function(t){return t.left}))},findPositionOfValue:OS,setPositionFromValue:function(t,e,n,r){var o=JC(n),i=OS(t,r.getSpectrum(t),o.x,r.getLeftEdge(t),r.getRightEdge(t),n),a=yn(e.element)/2;Qe(e.element,"left",i-a+"px")},onLeft:ES,onRight:zS,onUp:TS,onDown:MS,edgeActions:DS}),NS=function(t,e){Di(t,EC(),{value:e})},BS=function(t){return{y:t}},RS=function(t,e,n){var r={min:MC(e),max:BC(e),range:PC(e),value:n,step:UC(e),snap:jC(e),snapStart:WC(e),rounded:qC(e),hasMinEdge:KC(e),hasMaxEdge:YC(e),minBound:hS(t),maxBound:pS(t),screenRange:bS(t)};return iS(r)},HS=function(t){return function(e,n){return function(t,e,n){var r=(t>0?rS:nS)(JC(n).y,MC(n),BC(n),UC(n));return NS(e,BS(r)),B.some(r)}(t,e,n).map(k)}},LS=function(t,e,n,r,o,i){var a=function(t,e,n,r,o){var i=bS(t),a=r.bind((function(e){return B.some(wS(e,t))})).getOr(0),u=o.bind((function(e){return B.some(wS(e,t))})).getOr(i),c={min:MC(e),max:BC(e),range:PC(e),value:n,hasMinEdge:KC(e),hasMaxEdge:YC(e),minBound:hS(t),minOffset:0,maxBound:pS(t),maxOffset:i,centerMinEdge:a,centerMaxEdge:u};return aS(c)}(e,i,n,r,o);return hS(e)-hS(t)+a},VS=B.none,PS=B.none,IS=HS(-1),FS=HS(1),US={"top-left":B.none(),top:B.some((function(t,e){eS(t,ZC(AC(e)))})),"top-right":B.none(),right:B.none(),"bottom-right":B.none(),bottom:B.some((function(t,e){eS(t,ZC(HC(e)))})),"bottom-left":B.none(),left:B.none()},jS=Object.freeze({__proto__:null,setValueFrom:function(t,e,n){var r=RS(t,e,n),o=BS(r);return NS(t,o),r},setToMin:function(t,e){var n=MC(e);NS(t,BS(n))},setToMax:function(t,e){var n=BC(e);NS(t,BS(n))},findValueOfOffset:RS,getValueFromEvent:function(t){return zC(t).map((function(t){return t.top}))},findPositionOfValue:LS,setPositionFromValue:function(t,e,n,r){var o=JC(n),i=LS(t,r.getSpectrum(t),o.y,r.getTopEdge(t),r.getBottomEdge(t),n),a=fn(e.element)/2;Qe(e.element,"top",i-a+"px")},onLeft:VS,onRight:PS,onUp:IS,onDown:FS,edgeActions:US}),WS=function(t,e){Di(t,EC(),{value:e})},qS=function(t,e){return{x:t,y:e}},GS=function(t,e){return function(n,r){return function(t,e,n,r){var o=t>0?rS:nS,i=e?JC(r).x:o(JC(r).x,TC(r),NC(r),UC(r)),a=e?o(JC(r).y,MC(r),BC(r),UC(r)):JC(r).y;return WS(n,qS(i,a)),B.some(i)}(t,e,n,r).map(k)}},$S=GS(-1,!1),XS=GS(1,!1),KS=GS(-1,!0),YS=GS(1,!0),JS={"top-left":B.some((function(t,e){eS(t,tS(DC(e),AC(e)))})),top:B.some((function(t,e){eS(t,tS(IC(e),AC(e)))})),"top-right":B.some((function(t,e){eS(t,tS(RC(e),AC(e)))})),right:B.some((function(t,e){eS(t,tS(RC(e),FC(e)))})),"bottom-right":B.some((function(t,e){eS(t,tS(RC(e),HC(e)))})),bottom:B.some((function(t,e){eS(t,tS(IC(e),HC(e)))})),"bottom-left":B.some((function(t,e){eS(t,tS(DC(e),HC(e)))})),left:B.some((function(t,e){eS(t,tS(DC(e),FC(e)))}))},QS=Object.freeze({__proto__:null,setValueFrom:function(t,e,n){var r=kS(t,e,n.left),o=RS(t,e,n.top),i=qS(r,o);return WS(t,i),i},setToMin:function(t,e){var n=TC(e),r=MC(e);WS(t,qS(n,r))},setToMax:function(t,e){var n=NC(e),r=BC(e);WS(t,qS(n,r))},getValueFromEvent:function(t){return zC(t)},setPositionFromValue:function(t,e,n,r){var o=JC(n),i=OS(t,r.getSpectrum(t),o.x,r.getLeftEdge(t),r.getRightEdge(t),n),a=LS(t,r.getSpectrum(t),o.y,r.getTopEdge(t),r.getBottomEdge(t),n),u=yn(e.element)/2,c=fn(e.element)/2;Qe(e.element,"left",i-u+"px"),Qe(e.element,"top",a-c+"px")},onLeft:$S,onRight:XS,onUp:KS,onDown:YS,edgeActions:JS}),ZS=Ad({name:"Slider",configFields:[mo("stepSize",1),mo("onChange",h),mo("onChoose",h),mo("onInit",h),mo("onDragStart",h),mo("onDragEnd",h),mo("snapToGrid",!1),mo("rounded",!0),io("snapStart"),Jr("model",Gr("mode",{x:[mo("minX",0),mo("maxX",100),Xr("value",(function(t){return Co(t.mode.minX)})),Yr("getInitialValue"),Au("manager",AS)],y:[mo("minY",0),mo("maxY",100),Xr("value",(function(t){return Co(t.mode.minY)})),Yr("getInitialValue"),Au("manager",jS)],xy:[mo("minX",0),mo("maxX",100),mo("minY",0),mo("maxY",100),Xr("value",(function(t){return Co({x:t.mode.minX,y:t.mode.minY})})),Yr("getInitialValue"),Au("manager",QS)]})),zf("sliderBehaviours",[nh,Ef]),Xr("mouseIsDown",(function(){return Co(!1)}))],partFields:OC,factory:function(t,e,n,r){var o,i=function(e){return bd(e,t,"thumb")},a=function(e){return bd(e,t,"spectrum")},u=function(e){return vd(e,t,"left-edge")},c=function(e){return vd(e,t,"right-edge")},s=function(e){return vd(e,t,"top-edge")},l=function(e){return vd(e,t,"bottom-edge")},f=t.model,d=f.manager,m=function(e,n){d.setPositionFromValue(e,n,t,{getLeftEdge:u,getRightEdge:c,getTopEdge:s,getBottomEdge:l,getSpectrum:a})},g=function(t,e){f.value.set(e);var n=i(t);m(t,n)},h=function(e){var n=t.mouseIsDown.get();t.mouseIsDown.set(!1),n&&vd(e,t,"thumb").each((function(n){var r=f.value.get();t.onChoose(e,n,r)}))},p=function(e,n){n.stop(),t.mouseIsDown.set(!0),t.onDragStart(e,i(e))},v=function(e,n){n.stop(),t.onDragEnd(e,i(e)),h(e)};return{uid:t.uid,dom:t.dom,components:e,behaviours:Mf(t.sliderBehaviours,[nh.config({mode:"special",focusIn:function(e){return vd(e,t,"spectrum").map(nh.focusIn).map(k)}}),Ef.config({store:{mode:"manual",getValue:function(t){return f.value.get()}}}),Ec.config({channels:(o={},o[lf()]={onReceive:h},o)})]),events:Hi([Pi(EC(),(function(e,n){!function(e,n){g(e,n);var r=i(e);t.onChange(e,r,n),B.some(!0)}(e,n.event.value)})),$i((function(e,n){var r=f.getInitialValue();f.value.set(r);var o=i(e);m(e,o);var u=a(e);t.onInit(e,o,u,f.value.get())})),Pi(Lo(),p),Pi(Po(),v),Pi(Fo(),p),Pi(Wo(),v)]),apis:{resetToMin:function(e){d.setToMin(e,t)},resetToMax:function(e){d.setToMax(e,t)},setValue:g,refresh:m},domModification:{styles:{position:"relative"}}}},apis:{setValue:function(t,e,n){t.setValue(e,n)},resetToMin:function(t,e){t.resetToMin(e)},resetToMax:function(t,e){t.resetToMax(e)},refresh:function(t,e){t.refresh(e)}}}),tk=ia("rgb-hex-update"),ek=ia("slider-update"),nk=ia("palette-update"),rk="form",ok=[zf("formBehaviours",[Ef])],ik=function(t){return"<alloy.field."+t+">"},ak=function(t,e){return{uid:t.uid,dom:t.dom,components:e,behaviours:Mf(t.formBehaviours,[Ef.config({store:{mode:"manual",getValue:function(e){var n=xd(e,t);return mt(n,(function(t,e){return t().bind((function(t){var n,r,o=Hd.getCurrent(t);return n=o,r=new Error("Cannot find a current component to extract the value from for form part '"+e+"': "+ea(t.element)),n.fold((function(){return qn.error(r)}),qn.value)})).map(Ef.getValue)}))},setValue:function(e,n){dt(n,(function(n,r){vd(e,t,r).each((function(t){Hd.getCurrent(t).each((function(t){Ef.setValue(t,n)}))}))}))}}})]),apis:{getField:function(e,n){return vd(e,t,n).bind(Hd.getCurrent)}}}},uk={getField:xa((function(t,e,n){return t.getField(e,n)})),sketch:function(t){var e=function(){var t=[];return{field:function(e,n){return t.push(e),dd(rk,ik(e),n)},record:v(t)}}(),n=t(e),r=e.record(),o=j(r,(function(t){return rd({name:t,pname:ik(t)})}));return Ed(rk,ok,o,ak,n)}},ck=ia("valid-input"),sk=ia("invalid-input"),lk=ia("validating-input"),fk="colorcustom.rgb.",dk=function(t,e,n,r){var o=function(n,r){return Iw.config({invalidClass:e("invalid"),notify:{onValidate:function(t){Di(t,lk,{type:n})},onValid:function(t){Di(t,ck,{type:n,value:Ef.getValue(t)})},onInvalid:function(t){Di(t,sk,{type:n,value:Ef.getValue(t)})}},validator:{validate:function(e){var n=Ef.getValue(e),o=r(n)?qn.value(!0):qn.error(t("aria.input.invalid"));return Mw(o)},validateOnLoad:!1}})},i=function(n,r,i,a,u){var c=t("colorcustom.rgb.range"),s=[Jx.parts.label({dom:{tag:"label",innerHtml:i,attributes:{"aria-label":a}}}),Jx.parts.field({data:u,factory:xw,inputAttributes:O({type:"text"},"hex"===r?{"aria-live":"polite"}:{}),inputClasses:[e("textfield")],inputBehaviours:wc([o(r,n),tw.config({})]),onSetValue:function(t){Iw.isInvalid(t)&&Iw.run(t).get(h)}})],l="hex"!==r?[Jx.parts["aria-descriptor"]({text:c})]:[];return{dom:{tag:"div",attributes:{role:"presentation"}},components:s.concat(l)}},a=function(t,e){var n=e.red,r=e.green,o=e.blue;Ef.setValue(t,{red:n,green:r,blue:o})},u=bp({dom:{tag:"div",classes:[e("rgba-preview")],styles:{"background-color":"white"},attributes:{role:"presentation"}}}),c=function(t,e){u.getOpt(t).each((function(t){Qe(t.element,"background-color","#"+e.value)}))};return Dd({factory:function(){var o={red:Co(B.some(255)),green:Co(B.some(255)),blue:Co(B.some(255)),hex:Co(B.some("ffffff"))},s=function(t){return o[t].get()},l=function(t,e){o[t].set(e)},f=function(t){var e=t.red,n=t.green,r=t.blue;l("red",B.some(e)),l("green",B.some(n)),l("blue",B.some(r))},d=function(t,e){var n=e.event;"hex"!==n.type?l(n.type,B.none()):r(t)},m=function(t,e,n){var r=parseInt(n,10);l(e,B.some(r)),s("red").bind((function(t){return s("green").bind((function(e){return s("blue").map((function(n){return Ny(t,e,n,1)}))}))})).each((function(e){var n=function(t,e){var n=Ey(e);return uk.getField(t,"hex").each((function(e){mh.isFocused(e)||Ef.setValue(t,{hex:n.value})})),n}(t,e);Di(t,tk,{hex:n}),c(t,n)}))},g=function(t,e){var r=e.event;!function(t){return"hex"===t.type}(r)?m(t,r.type,r.value):function(t,e){n(t);var r=xy(e);l("hex",B.some(e));var o=Hy(r);a(t,o),f(o),Di(t,tk,{hex:r}),c(t,r)}(t,r.value)},h=function(e){return{label:t(fk+e+".label"),description:t(fk+e+".description")}},p=h("red"),v=h("green"),b=h("blue"),y=h("hex");return cr(uk.sketch((function(n){return{dom:{tag:"form",classes:[e("rgb-form")],attributes:{"aria-label":t("aria.color.picker")}},components:[n.field("red",Jx.sketch(i(By,"red",p.label,p.description,255))),n.field("green",Jx.sketch(i(By,"green",v.label,v.description,255))),n.field("blue",Jx.sketch(i(By,"blue",b.label,b.description,255))),n.field("hex",Jx.sketch(i(Sy,"hex",y.label,y.description,"ffffff"))),u.asSpec()],formBehaviours:wc([Iw.config({invalidClass:e("form-invalid")}),ch("rgb-form-events",[Pi(ck,g),Pi(sk,d),Pi(lk,d)])])}})),{apis:{updateHex:function(t,e){Ef.setValue(t,{hex:e.value}),function(t,e){var n=Hy(e);a(t,n),f(n)}(t,e),c(t,e)}}})},name:"RgbForm",configFields:[],apis:{updateHex:function(t,e,n){t.updateHex(e,n)}},extraApis:{}})},mk=function(t,e){var n=ZS.parts.spectrum({dom:{tag:"canvas",attributes:{role:"presentation"},classes:[e("sv-palette-spectrum")]}}),r=ZS.parts.thumb({dom:{tag:"div",attributes:{role:"presentation"},classes:[e("sv-palette-thumb")],innerHtml:"<div class="+e("sv-palette-inner-thumb")+' role="presentation"></div>'}}),o=function(t,e){var n=t.width,r=t.height,o=t.getContext("2d");if(null!==o){o.fillStyle=e,o.fillRect(0,0,n,r);var i=o.createLinearGradient(0,0,n,0);i.addColorStop(0,"rgba(255,255,255,1)"),i.addColorStop(1,"rgba(255,255,255,0)"),o.fillStyle=i,o.fillRect(0,0,n,r);var a=o.createLinearGradient(0,0,0,r);a.addColorStop(0,"rgba(0,0,0,0)"),a.addColorStop(1,"rgba(0,0,0,1)"),o.fillStyle=a,o.fillRect(0,0,n,r)}};return Dd({factory:function(t){var i=v({x:0,y:0}),a=wc([Hd.config({find:B.some}),mh.config({})]);return ZS.sketch({dom:{tag:"div",attributes:{role:"presentation"},classes:[e("sv-palette")]},model:{mode:"xy",getInitialValue:i},rounded:!1,components:[n,r],onChange:function(t,e,n){Di(t,nk,{value:n})},onInit:function(t,e,n,r){o(n.element.dom,Py(Iy))},sliderBehaviours:a})},name:"SaturationBrightnessPalette",configFields:[],apis:{setHue:function(t,e,n){!function(t,e){var n=t.components()[0].element.dom,r=Uy(e,100,100),i=Ry(r);o(n,Py(i))}(e,n)},setThumb:function(t,e,n){!function(t,e){var n=jy(Hy(e));ZS.setValue(t,{x:n.saturation,y:100-n.value})}(e,n)}},extraApis:{}})},gk=function(t,e){return Dd({name:"ColourPicker",configFields:[Yr("dom"),mo("onValidHex",h),mo("onInvalidHex",h)],factory:function(n){var r,o=dk(t,e,n.onValidHex,n.onInvalidHex),i=mk(0,e),a=function(t){return 100-t/360*100},u={paletteRgba:Co(Iy),paletteHue:Co(0)},c=bp(function(t,e){var n=ZS.parts.spectrum({dom:{tag:"div",classes:[e("hue-slider-spectrum")],attributes:{role:"presentation"}}}),r=ZS.parts.thumb({dom:{tag:"div",classes:[e("hue-slider-thumb")],attributes:{role:"presentation"}}});return ZS.sketch({dom:{tag:"div",classes:[e("hue-slider")],attributes:{role:"presentation"}},rounded:!1,model:{mode:"y",getInitialValue:v({y:0})},components:[n,r],sliderBehaviours:wc([mh.config({})]),onChange:function(t,e,n){Di(t,ek,{value:n})}})}(0,e)),s=bp(i.sketch({})),l=bp(o.sketch({})),f=function(t,e,n){s.getOpt(t).each((function(t){i.setHue(t,n)}))},d=function(t,e){l.getOpt(t).each((function(t){o.updateHex(t,e)}))},m=function(t,e,n){c.getOpt(t).each((function(t){ZS.setValue(t,{y:a(n)})}))},g=function(t,e){s.getOpt(t).each((function(t){i.setThumb(t,e)}))},h=function(t,e,n,r){!function(t,e){var n=Hy(t);u.paletteRgba.set(n),u.paletteHue.set(e)}(e,n),W(r,(function(r){r(t,e,n)}))};return{uid:n.uid,dom:n.dom,components:[s.asSpec(),c.asSpec(),l.asSpec()],behaviours:wc([ch("colour-picker-events",[Pi(tk,(r=[f,m,g],function(t,e){var n=e.event.hex,o=function(t){return jy(Hy(t))}(n);h(t,n,o.hue,r)})),Pi(nk,function(){var t=[d];return function(e,n){var r=n.event.value,o=u.paletteHue.get(),i=Uy(o,r.x,100-r.y),a=Wy(i);h(e,a,o,t)}}()),Pi(ek,function(){var t=[f,d];return function(e,n){var r=function(t){return(100-t)/100*360}(n.event.value.y),o=u.paletteRgba.get(),i=jy(o),a=Uy(r,i.saturation,i.value),c=Wy(a);h(e,c,r,t)}}())]),Hd.config({find:function(t){return l.getOpt(t)}}),nh.config({mode:"acyclic"})])}}})},hk=function(){return Hd.config({find:B.some})},pk=function(t){return Hd.config({find:t.getOpt})},vk=function(t){return Hd.config({find:function(e){return Te(e.element,t).bind((function(t){return e.getSystem().getByDom(t).toOptional()}))}})},bk={"colorcustom.rgb.red.label":"R","colorcustom.rgb.red.description":"Red component","colorcustom.rgb.green.label":"G","colorcustom.rgb.green.description":"Green component","colorcustom.rgb.blue.label":"B","colorcustom.rgb.blue.description":"Blue component","colorcustom.rgb.hex.label":"#","colorcustom.rgb.hex.description":"Hex color code","colorcustom.rgb.range":"Range 0 to 255","colorcustom.sb.saturation":"Saturation","colorcustom.sb.brightness":"Brightness","colorcustom.sb.picker":"Saturation and Brightness Picker","colorcustom.sb.palette":"Saturation and Brightness Palette","colorcustom.sb.instructions":"Use arrow keys to select saturation and brightness, on x and y axes","colorcustom.hue.hue":"Hue","colorcustom.hue.slider":"Hue Slider","colorcustom.hue.palette":"Hue Palette","colorcustom.hue.instructions":"Use arrow keys to select a hue","aria.color.picker":"Color Picker","aria.input.invalid":"Invalid input"},yk=function(t){return function(t){return bk[t]}(t)},xk=tinymce.util.Tools.resolve("tinymce.Resource"),wk=tinymce.util.Tools.resolve("tinymce.util.Tools"),Ck=_r([mo("preprocess",b),mo("postprocess",b)]),Sk=function(t,e,n){return Ef.config(cr({store:{mode:"manual",getValue:e,setValue:n}},t.map((function(t){return{store:{initialValue:t}}})).getOr({})))},kk=function(t,e,n){return Sk(t,(function(t){return e(t.element)}),(function(t,e){return n(t.element,e)}))},_k=function(t,e){var n=Wr("RepresentingConfigs.memento processors",Ck,e);return Ef.config({store:{mode:"manual",getValue:function(e){var r=t.get(e),o=Ef.getValue(r);return n.postprocess(o)},setValue:function(e,r){var o=n.preprocess(r),i=t.get(e);Ef.setValue(i,o)}}})},Ok=Sk,Ek=function(t){return kk(t,Ji,Qi)},zk=function(t){return Ef.config({store:{mode:"memory",initialValue:t}})},Tk=function(t,e){var n=function(t,e){e.stop()},r=function(t){return function(e,n){W(t,(function(t){t(e,n)}))}},o=function(t,e){if(!Yd.isDisabled(t)){var n=e.event.raw;a(t,n.dataTransfer.files)}},i=function(t,e){var n=e.event.raw.target;a(t,n.files)},a=function(n,r){Ef.setValue(n,function(t,e){var n=wk.explode(e.getSetting("images_file_types","jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp","string"));return G(ct(t),(function(t){return I(n,(function(e){return Tt(t.name.toLowerCase(),"."+e.toLowerCase())}))}))}(r,e)),Di(n,aw,{name:t.name})},u=bp({dom:{tag:"input",attributes:{type:"file",accept:"image/*"},styles:{display:"none"}},behaviours:wc([ch("input-file-events",[Wi(Qo()),Wi(fi())])])}),c=t.label.map((function(t){return iw(t,e)})),s=Jx.parts.field({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"div",classes:["tox-dropzone-container"]},behaviours:wc([zk([]),hk(),Yd.config({}),_h.config({toggleClass:"dragenter",toggleOnExecute:!1}),ch("dropzone-events",[Pi("dragenter",r([n,_h.toggle])),Pi("dragleave",r([n,_h.toggle])),Pi("dragover",n),Pi("drop",r([n,o])),Pi(Jo(),i)])]),components:[{dom:{tag:"div",classes:["tox-dropzone"],styles:{}},components:[{dom:{tag:"p",innerHtml:e.translate("Drop an image here")}},vp.sketch({dom:{tag:"button",innerHtml:e.translate("Browse for an image"),styles:{position:"relative"},classes:["tox-button","tox-button--secondary"]},components:[u.asSpec()],action:function(t){u.get(t).element.dom.click()},buttonBehaviours:wc([tw.config({}),Xb(e.isDisabled),Gb()])})]}]}}}});return nw(c,s,["tox-form__group--stretched"],[])},Mk=ia("alloy-fake-before-tabstop"),Dk=ia("alloy-fake-after-tabstop"),Ak=function(t){return{dom:{tag:"div",styles:{width:"1px",height:"1px",outline:"none"},attributes:{tabindex:"0"},classes:t},behaviours:wc([mh.config({ignore:!0}),tw.config({})])}},Nk=function(t){return{dom:{tag:"div",classes:["tox-navobj"]},components:[Ak([Mk]),t,Ak([Dk])],behaviours:wc([vk(1)])}},Bk=function(t,e){Di(t,Xo(),{raw:{which:9,shiftKey:e}})},Rk=function(t,e){var n=e.element;Fa(n,Mk)?Bk(t,!0):Fa(n,Dk)&&Bk(t,!1)},Hk=function(t){return Nx(t,["."+Mk,"."+Dk].join(","),S)},Lk=!(pe().browser.isIE()||pe().browser.isEdge()),Vk=function(t,e){var n=Lk&&t.sandboxed,r=O(O({},t.label.map((function(t){return{title:t}})).getOr({})),n?{sandbox:"allow-scripts allow-same-origin"}:{}),o=function(t){var e=Co("");return{getValue:function(t){return e.get()},setValue:function(n,r){if(t)We(n.element,"srcdoc",r);else{We(n.element,"src","javascript:''");var o=n.element.dom.contentWindow.document;o.open(),o.write(r),o.close()}e.set(r)}}}(n),i=t.label.map((function(t){return iw(t,e)})),a=Jx.parts.field({factory:{sketch:function(t){return Nk({uid:t.uid,dom:{tag:"iframe",attributes:r},behaviours:wc([tw.config({}),mh.config({}),Ok(B.none(),o.getValue,o.setValue)])})}}});return nw(i,a,["tox-form__group--stretched"],[])},Pk=function(t,e){return Uk(document.createElement("canvas"),t,e)},Ik=function(t){var e=Pk(t.width,t.height);return Fk(e).drawImage(t,0,0),e},Fk=function(t){return t.getContext("2d")},Uk=function(t,e,n){return t.width=e,t.height=n,t},jk=function(t){return t.naturalWidth||t.width},Wk=function(t){return t.naturalHeight||t.height},qk=function(t){return new kw((function(e,n){(function(t){var e=t.split(","),n=/data:([^;]+)/.exec(e[0]);if(!n)return B.none();for(var r=n[1],o=e[1],i=1024,a=atob(o),u=a.length,c=Math.ceil(u/i),s=new Array(c),l=0;l<c;++l){for(var f=l*i,d=Math.min(f+i,u),m=new Array(d-f),g=f,h=0;g<d;++h,++g)m[h]=a[g].charCodeAt(0);s[l]=new Uint8Array(m)}return B.some(new Blob(s,{type:r}))})(t).fold((function(){n("uri is not base64: "+t)}),e)}))},Gk=function(t,e,n){return e=e||"image/png",d(HTMLCanvasElement.prototype.toBlob)?new kw((function(r,o){t.toBlob((function(t){t?r(t):o()}),e,n)})):qk(t.toDataURL(e,n))},$k=function(t){return function(t){return new kw((function(e,n){var r=URL.createObjectURL(t),o=new Image,i=function(){o.removeEventListener("load",a),o.removeEventListener("error",u)},a=function(){i(),e(o)},u=function(){i(),n("Unable to load data of type "+t.type+": "+r)};o.addEventListener("load",a),o.addEventListener("error",u),o.src=r,o.complete&&setTimeout(a,0)}))}(t).then((function(t){Xk(t);var e=Pk(jk(t),Wk(t));return Fk(e).drawImage(t,0,0),e}))},Xk=function(t){URL.revokeObjectURL(t.src)},Kk=function(t,e,n){var r=e.type,o=v(r),i=v(n),a=function(e,n){return t.then((function(t){return function(t,e,n){return e=e||"image/png",t.toDataURL(e,n)}(t,e,n)}))};return{getType:o,toBlob:function(){return kw.resolve(e)},toDataURL:i,toBase64:function(){return n.split(",")[1]},toAdjustedBlob:function(e,n){return t.then((function(t){return Gk(t,e,n)}))},toAdjustedDataURL:a,toAdjustedBase64:function(t,e){return a(t,e).then((function(t){return t.split(",")[1]}))},toCanvas:function(){return t.then(Ik)}}},Yk=function(t){return function(t){return new kw((function(e){var n=new FileReader;n.onloadend=function(){e(n.result)},n.readAsDataURL(t)}))}(t).then((function(e){return Kk($k(t),t,e)}))},Jk=function(t,e){return Gk(t,e).then((function(e){return Kk(kw.resolve(t),e,t.toDataURL())}))},Qk=function(t,e,n){var r="string"==typeof t?parseFloat(t):t;return r>n?r=n:r<e&&(r=e),r},Zk=[0,.01,.02,.04,.05,.06,.07,.08,.1,.11,.12,.14,.15,.16,.17,.18,.2,.21,.22,.24,.25,.27,.28,.3,.32,.34,.36,.38,.4,.42,.44,.46,.48,.5,.53,.56,.59,.62,.65,.68,.71,.74,.77,.8,.83,.86,.89,.92,.95,.98,1,1.06,1.12,1.18,1.24,1.3,1.36,1.42,1.48,1.54,1.6,1.66,1.72,1.78,1.84,1.9,1.96,2,2.12,2.25,2.37,2.5,2.62,2.75,2.87,3,3.2,3.4,3.6,3.8,4,4.3,4.7,4.9,5,5.5,6,6.5,6.8,7,7.3,7.5,7.8,8,8.4,8.7,9,9.4,9.6,9.8,10],t_=function(t,e){for(var n,r=[],o=new Array(25),i=0;i<5;i++){for(var a=0;a<5;a++)r[a]=e[a+5*i];for(a=0;a<5;a++){n=0;for(var u=0;u<5;u++)n+=t[a+5*u]*r[u];o[a+5*i]=n}}return o},e_=function(t,e){return t.toCanvas().then((function(n){return n_(n,t.getType(),e)}))},n_=function(t,e,n){var r=Fk(t),o=function(t,e){for(var n,r,o,i,a=t.data,u=e[0],c=e[1],s=e[2],l=e[3],f=e[4],d=e[5],m=e[6],g=e[7],h=e[8],p=e[9],v=e[10],b=e[11],y=e[12],x=e[13],w=e[14],C=e[15],S=e[16],k=e[17],_=e[18],O=e[19],E=0;E<a.length;E+=4)n=a[E],r=a[E+1],o=a[E+2],i=a[E+3],a[E]=n*u+r*c+o*s+i*l+f,a[E+1]=n*d+r*m+o*g+i*h+p,a[E+2]=n*v+r*b+o*y+i*x+w,a[E+3]=n*C+r*S+o*k+i*_+O;return t}(r.getImageData(0,0,t.width,t.height),n);return r.putImageData(o,0,0),Jk(t,e)},r_=function(t,e,n){var r=Fk(t),o=r.getImageData(0,0,t.width,t.height),i=r.getImageData(0,0,t.width,t.height);return i=function(t,e,n){for(var r=function(t,e,n){return t>n?t=n:t<e&&(t=e),t},o=Math.round(Math.sqrt(n.length)),i=Math.floor(o/2),a=t.data,u=e.data,c=t.width,s=t.height,l=0;l<s;l++)for(var f=0;f<c;f++){for(var d=0,m=0,g=0,h=0;h<o;h++)for(var p=0;p<o;p++){var v=r(f+p-i,0,c-1),b=4*(r(l+h-i,0,s-1)*c+v),y=n[h*o+p];d+=a[b]*y,m+=a[b+1]*y,g+=a[b+2]*y}var x=4*(l*c+f);u[x]=r(d,0,255),u[x+1]=r(m,0,255),u[x+2]=r(g,0,255)}return e}(o,i,n),r.putImageData(i,0,0),Jk(t,e)},o_=function(t){return function(e,n){return e_(e,t([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1],n))}},i_=function(t){return function(e){return e_(e,t)}}([-1,0,0,0,255,0,-1,0,0,255,0,0,-1,0,255,0,0,0,1,0,0,0,0,0,1]),a_=o_((function(t,e){return e=Qk(255*e,-255,255),t_(t,[1,0,0,0,e,0,1,0,0,e,0,0,1,0,e,0,0,0,1,0,0,0,0,0,1])})),u_=o_((function(t,e){var n;return e=Qk(e,-1,1),n=(e*=100)<0?127+e/100*127:127*(n=0===(n=e%1)?Zk[e]:Zk[Math.floor(e)]*(1-n)+Zk[Math.floor(e)+1]*n)+127,t_(t,[n/127,0,0,0,.5*(127-n),0,n/127,0,0,.5*(127-n),0,0,n/127,0,.5*(127-n),0,0,0,1,0,0,0,0,0,1])})),c_=function(t,e,n,r){return e_(t,function(t,e,n,r){return e=Qk(e,0,2),n=Qk(n,0,2),r=Qk(r,0,2),t_(t,[e,0,0,0,0,0,n,0,0,0,0,0,r,0,0,0,0,0,1,0,0,0,0,0,1])}([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1],e,n,r))},s_=(Gw=[0,-1,0,-1,5,-1,0,-1,0],function(t){return function(t,e){return t.toCanvas().then((function(n){return r_(n,t.getType(),e)}))}(t,Gw)}),l_=($w=function(t,e){return 255*Math.pow(t/255,1-e)},function(t,e){return t.toCanvas().then((function(n){return function(t,e,n){for(var r=Fk(t),o=new Array(256),i=0;i<o.length;i++)o[i]=$w(i,n);var a=function(t,e){for(var n=t.data,r=0;r<n.length;r+=4)n[r]=e[n[r]],n[r+1]=e[n[r+1]],n[r+2]=e[n[r+2]];return t}(r.getImageData(0,0,t.width,t.height),o);return r.putImageData(a,0,0),Jk(t,e)}(n,t.getType(),e)}))}),f_=function(t,e,n){var r=jk(t),o=Wk(t),i=e/r,a=n/o,u=!1;(i<.5||i>2)&&(i=i<.5?.5:2,u=!0),(a<.5||a>2)&&(a=a<.5?.5:2,u=!0);var c=d_(t,i,a);return u?c.then((function(t){return f_(t,e,n)})):c},d_=function(t,e,n){return new kw((function(r){var o=jk(t),i=Wk(t),a=Math.floor(o*e),u=Math.floor(i*n),c=Pk(a,u);Fk(c).drawImage(t,0,0,o,i,0,0,a,u),r(c)}))},m_=function(t,e){void 0===e&&(e=2);var n=Math.pow(10,e),r=Math.round(t*n);return Math.ceil(r/n)},g_=function(t,e,n){var r=(n<0?360+n:n)*Math.PI/180,o=t.width,i=t.height,a=Math.sin(r),u=Math.cos(r),c=m_(Math.abs(o*u)+Math.abs(i*a)),s=m_(Math.abs(o*a)+Math.abs(i*u)),l=Pk(c,s),f=Fk(l);return f.translate(c/2,s/2),f.rotate(r),f.drawImage(t,-o/2,-i/2),Jk(l,e)},h_=function(t,e,n){var r=Pk(t.width,t.height),o=Fk(r);return"v"===n?(o.scale(1,-1),o.drawImage(t,0,-r.height)):(o.scale(-1,1),o.drawImage(t,-r.width,0)),Jk(r,e)},p_=function(t,e,n,r,o,i){var a=Pk(o,i);return Fk(a).drawImage(t,-n,-r),Jk(a,e)},v_=function(t){return i_(t)},b_=function(t){return s_(t)},y_=function(t,e){return l_(t,e)},x_=function(t,e){return a_(t,e)},w_=function(t,e){return u_(t,e)},C_=function(t,e){return function(t,e){return t.toCanvas().then((function(n){return h_(n,t.getType(),e)}))}(t,e)},S_=function(t,e,n,r,o){return function(t,e,n,r,o){return t.toCanvas().then((function(i){return p_(i,t.getType(),e,n,r,o)}))}(t,e,n,r,o)},k_=function(t,e,n){return function(t,e,n){return t.toCanvas().then((function(r){return f_(r,e,n).then((function(e){return Jk(e,t.getType())}))}))}(t,e,n)},__=function(t,e){return function(t,e){return t.toCanvas().then((function(n){return g_(n,t.getType(),e)}))}(t,e)},O_=function(t,e,n){return zp(t,{tag:"span",classes:["tox-icon","tox-tbtn__icon-wrap"],behaviours:n},e)},E_=function(t,e){return O_(t,e,[])},z_=function(t,e){return O_(t,e,[uh.config({})])},T_=function(t,e,n){return{dom:{tag:"span",innerHtml:n.translate(t),classes:[e+"__select-label"]},behaviours:wc([uh.config({})])}},M_=ia("toolbar.button.execute"),D_=((Xw={})[si()]=["disabling","alloy.base.behaviour","toggling","toolbar-button-events"],Xw),A_=ia("update-menu-text"),N_=ia("update-menu-icon"),B_=function(t,e,n){var r=Co(h),o=t.text.map((function(t){return bp(T_(t,e,n.providers))})),i=t.icon.map((function(t){return bp(z_(t,n.providers.icons))})),a=function(t,e){var n=Ef.getValue(t);return mh.focus(n),Di(n,"keydown",{raw:e.event.raw}),uC.close(n),B.some(!0)},u=t.role.fold((function(){return{}}),(function(t){return{role:t}})),c=t.tooltip.fold((function(){return{}}),(function(t){var e=n.providers.translate(t);return{title:e,"aria-label":e}})),s=zp("chevron-down",{tag:"div",classes:[e+"__select-chevron"]},n.providers.icons);return bp(uC.sketch(O(O(O({},t.uid?{uid:t.uid}:{}),u),{dom:{tag:"button",classes:[e,e+"--select"].concat(j(t.classes,(function(t){return e+"--"+t}))),attributes:O({},c)},components:ny([i.map((function(t){return t.asSpec()})),o.map((function(t){return t.asSpec()})),B.some(s)]),matchWidth:!0,useMinWidth:!0,dropdownBehaviours:wc(z(z([],t.dropdownBehaviours,!0),[Xb((function(){return t.disabled||n.providers.isDisabled()})),Gb(),sC.config({}),uh.config({}),ch("dropdown-events",[Qb(t,r),Zb(t,r)]),ch("menubutton-update-display-text",[Pi(A_,(function(t,e){o.bind((function(e){return e.getOpt(t)})).each((function(t){uh.set(t,[Qa(n.providers.translate(e.event.text))])}))})),Pi(N_,(function(t,e){i.bind((function(e){return e.getOpt(t)})).each((function(t){uh.set(t,[z_(e.event.icon,n.providers.icons)])}))}))])],!1)),eventOrder:cr(D_,{mousedown:["focusing","alloy.base.behaviour","item-type-events","normal-dropdown-events"]}),sandboxBehaviours:wc([nh.config({mode:"special",onLeft:a,onRight:a})]),lazySink:n.getSink,toggleClass:e+"--active",parts:{menu:Bv(0,t.columns,t.presets)},fetch:function(e){return Tw(x(t.fetch,e))}}))).asSpec()},R_=function(t){return"separator"===t.type},H_={type:"separator"},L_=function(t,e){var n=X(t,(function(t,n){return function(t){return o(t)}(n)?""===n?t:"|"===n?t.length>0&&!R_(t[t.length-1])?t.concat([H_]):t:xt(e,n.toLowerCase())?t.concat([e[n.toLowerCase()]]):t:t.concat([n])}),[]);return n.length>0&&R_(n[n.length-1])&&n.pop(),n},V_=function(t,e){return function(t){return xt(t,"getSubmenuItems")}(t)?function(t,e){var n=t.getSubmenuItems(),r=P_(n,e);return{item:t,menus:cr(r.menus,Oo(t.value,r.items)),expansions:cr(r.expansions,Oo(t.value,t.value))}}(t,e):{item:t,menus:{},expansions:{}}},P_=function(t,e){var n=L_(o(t)?t.split(" "):t,e);return $(n,(function(t,n){var r=function(t){if(R_(t))return t;var e=yt(t,"value").getOrThunk((function(){return ia("generated-menu-item")}));return cr({value:e},t)}(n),o=V_(r,e);return{menus:cr(t.menus,o.menus),items:[o.item].concat(t.items),expansions:cr(t.expansions,o.expansions)}}),{menus:{},expansions:{},items:[]})},I_=function(t,e,n,r){var o=ia("primary-menu"),i=P_(t,n.shared.providers.menuItems());if(0===i.items.length)return B.none();var a=Mx(o,i.items,e,n,r),u=mt(i.menus,(function(t,r){return Mx(r,t,e,n,!1)})),c=cr(u,Oo(o,a));return B.from(Kh.tieredData(o,c,i.expansions))},F_=function(t){return{isDisabled:function(){return Yd.isDisabled(t)},setDisabled:function(e){return Yd.set(t,e)},setActive:function(e){var n=t.element;e?(Va(n,"tox-tbtn--enabled"),We(n,"aria-pressed",!0)):(Ia(n,"tox-tbtn--enabled"),Ke(n,"aria-pressed"))},isActive:function(){return Fa(t.element,"tox-tbtn--enabled")}}},U_=function(t,e,n,r){return B_({text:t.text,icon:t.icon,tooltip:t.tooltip,role:r,fetch:function(e,r){t.fetch((function(t){r(I_(t,pv.CLOSE_ON_EXECUTE,n,!1))}))},onSetup:t.onSetup,getApi:F_,columns:1,presets:"normal",classes:[],dropdownBehaviours:[tw.config({})]},e,n.shared)},j_=function(t,e,n){var r=function(t){return function(r){var o=!r.isActive();r.setActive(o),t.storage.set(o),n.shared.getSink().each((function(n){e().getOpt(n).each((function(e){Mc(e.element),Di(e,sw,{name:t.name,value:t.storage.get()})}))}))}},o=function(t){return function(e){e.setActive(t.storage.get())}};return function(e){e(j(t,(function(t){var e=t.text.fold((function(){return{}}),(function(t){return{text:t}}));return O(O({type:t.type,active:!1},e),{onAction:r(t),onSetup:o(t)})})))}},W_=function(t,e,n,r,o,i){void 0===n&&(n=[]);var a=e.fold((function(){return{}}),(function(t){return{action:t}})),u=O({buttonBehaviours:wc([Xb((function(){return t.disabled||i.isDisabled()})),Gb(),tw.config({}),ch("button press",[Vi("click"),Vi("mousedown")])].concat(n)),eventOrder:{click:["button press","alloy.base.behaviour"],mousedown:["button press","alloy.base.behaviour"]}},a),c=cr(u,{dom:r});return cr(c,{components:o})},q_=function(t,e,n,r){void 0===r&&(r=[]);var o={tag:"button",classes:["tox-tbtn"],attributes:t.tooltip.map((function(t){return{"aria-label":n.translate(t),title:n.translate(t)}})).getOr({})},i=t.icon.map((function(t){return E_(t,n.icons)})),a=ny([i]);return W_(t,e,r,o,a,n)},G_=function(t,e,n,r){void 0===r&&(r=[]);var o=q_(t,B.some(e),n,r);return vp.sketch(o)},$_=function(t,e,n,r,o){void 0===r&&(r=[]),void 0===o&&(o=[]);var i=n.translate(t.text),a=t.icon?t.icon.map((function(t){return E_(t,n.icons)})):B.none(),u=a.isSome()?ny([a]):[],c=a.isSome()?{}:{innerHtml:i},s=z(z(z(z([],t.primary||t.borderless?["tox-button"]:["tox-button","tox-button--secondary"],!0),a.isSome()?["tox-button--icon"]:[],!0),t.borderless?["tox-button--naked"]:[],!0),o,!0),l=O(O({tag:"button",classes:s},c),{attributes:{title:i}});return W_(t,e,r,l,u,n)},X_=function(t,e,n,r,o){void 0===r&&(r=[]),void 0===o&&(o=[]);var i=$_(t,B.some(e),n,r,o);return vp.sketch(i)},K_=function(t,e){return function(n){"custom"===e?Di(n,sw,{name:t,value:{}}):"submit"===e?Mi(n,lw):"cancel"===e?Mi(n,cw):console.error("Unknown button type: ",e)}},Y_=function(t,e,n){if(function(t,e){return"menu"===e}(0,e)){var r=t,o=O(O({},t),{onSetup:function(e){return e.setDisabled(t.disabled),h},fetch:j_(r.items,(function(){return i}),n)}),i=bp(U_(o,"tox-tbtn",n,B.none()));return i.asSpec()}if(function(t,e){return"custom"===e||"cancel"===e||"submit"===e}(0,e)){var a=K_(t.name,e),u=O(O({},t),{borderless:!1});return X_(u,a,n.shared.providers,[])}console.error("Unknown footer button type: ",e)},J_=function(t,e){var n,r,o=K_(t.name,"custom");return n=B.none(),r=Jx.parts.field(O({factory:vp},$_(t,B.some(o),e,[zk(""),hk()]))),nw(n,r,[],[])},Q_=v([mo("field1Name","field1"),mo("field2Name","field2"),Mu("onLockedChange"),Ou(["lockClass"]),mo("locked",!1),Df("coupledFieldBehaviours",[Hd,Ef])]),Z_=function(t,e){return rd({factory:Jx,name:t,overrides:function(t){return{fieldBehaviours:wc([ch("coupled-input-behaviour",[Pi(Yo(),(function(n){(function(t,e,n){return vd(t,e,n).bind(Hd.getCurrent)})(n,t,e).each((function(e){vd(n,t,"lock").each((function(r){_h.isOn(r)&&t.onLockedChange(n,e,r)}))}))}))])])}}})},tO=v([Z_("field1","field2"),Z_("field2","field1"),rd({factory:vp,schema:[Yr("dom")],name:"lock",overrides:function(t){return{buttonBehaviours:wc([_h.config({selected:t.locked,toggleClass:t.markers.lockClass,aria:{mode:"pressed"}})])}}})]),eO=Ad({name:"FormCoupledInputs",configFields:Q_(),partFields:tO(),factory:function(t,e,n,r){return{uid:t.uid,dom:t.dom,components:e,behaviours:Af(t.coupledFieldBehaviours,[Hd.config({find:B.some}),Ef.config({store:{mode:"manual",getValue:function(e){var n,r=Cd(e,t,["field1","field2"]);return(n={})[t.field1Name]=Ef.getValue(r.field1()),n[t.field2Name]=Ef.getValue(r.field2()),n},setValue:function(e,n){var r=Cd(e,t,["field1","field2"]);wt(n,t.field1Name)&&Ef.setValue(r.field1(),n[t.field1Name]),wt(n,t.field2Name)&&Ef.setValue(r.field2(),n[t.field2Name])}}})]),apis:{getField1:function(e){return vd(e,t,"field1")},getField2:function(e){return vd(e,t,"field2")},getLock:function(e){return vd(e,t,"lock")}}}},apis:{getField1:function(t,e){return t.getField1(e)},getField2:function(t,e){return t.getField2(e)},getLock:function(t,e){return t.getLock(e)}}}),nO=function(t){var e=/^\s*(\d+(?:\.\d+)?)\s*(|cm|mm|in|px|pt|pc|em|ex|ch|rem|vw|vh|vmin|vmax|%)\s*$/.exec(t);if(null!==e){var n=parseFloat(e[1]),r=e[2];return qn.value({value:n,unit:r})}return qn.error(t)},rO=function(t,e){var n={"":96,px:96,pt:72,cm:2.54,pc:12,mm:25.4,in:1},r=function(t){return xt(n,t)};return t.unit===e?B.some(t.value):r(t.unit)&&r(e)?n[t.unit]===n[e]?B.some(t.value):B.some(t.value/n[t.unit]*n[e]):B.none()},oO=function(t){return B.none()},iO=function(t,e){var n=nO(t).toOptional(),r=nO(e).toOptional();return kt(n,r,(function(t,e){return rO(t,e.unit).map((function(t){return e.value/t})).map((function(t){return function(t,e){return function(n){return rO(n,e).map((function(n){return{value:n*t,unit:e}}))}}(t,e.unit)})).getOr(oO)})).getOr(oO)},aO=function(t,e){var n=oO,r=ia("ratio-event"),o=function(t){return zp(t,{tag:"span",classes:["tox-icon","tox-lock-icon__"+t]},e.icons)},i=eO.parts.lock({dom:{tag:"button",classes:["tox-lock","tox-button","tox-button--naked","tox-button--icon"],attributes:{title:e.translate(t.label.getOr("Constrain proportions"))}},components:[o("lock"),o("unlock")],buttonBehaviours:wc([Yd.config({disabled:function(){return t.disabled||e.isDisabled()}}),Gb(),tw.config({})])}),a=function(t){return{dom:{tag:"div",classes:["tox-form__group"]},components:t}},u=function(n){return Jx.parts.field({factory:xw,inputClasses:["tox-textfield"],inputBehaviours:wc([Yd.config({disabled:function(){return t.disabled||e.isDisabled()}}),Gb(),tw.config({}),ch("size-input-events",[Pi(Go(),(function(t,e){Di(t,r,{isField1:n})})),Pi(Jo(),(function(e,n){Di(e,aw,{name:t.name})}))])]),selectOnFocus:!1})},c=function(t){return{dom:{tag:"label",classes:["tox-label"],innerHtml:e.translate(t)}}},s=eO.parts.field1(a([Jx.parts.label(c("Width")),u(!0)])),l=eO.parts.field2(a([Jx.parts.label(c("Height")),u(!1)]));return eO.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:[{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:[s,l,a([c("&nbsp;"),i])]}],field1Name:"width",field2Name:"height",locked:!0,markers:{lockClass:"tox-locked"},onLockedChange:function(t,e,r){nO(Ef.getValue(t)).each((function(t){n(t).each((function(t){Ef.setValue(e,function(t){var e,n={"":0,px:0,pt:1,mm:1,pc:2,ex:2,em:2,ch:2,rem:2,cm:3,in:4,"%":4},r=t.value.toFixed((e=t.unit)in n?n[e]:1);return-1!==r.indexOf(".")&&(r=r.replace(/\.?0*$/,"")),r+t.unit}(t))}))}))},coupledFieldBehaviours:wc([Yd.config({disabled:function(){return t.disabled||e.isDisabled()},onDisabled:function(t){eO.getField1(t).bind(Jx.getField).each(Yd.disable),eO.getField2(t).bind(Jx.getField).each(Yd.disable),eO.getLock(t).each(Yd.disable)},onEnabled:function(t){eO.getField1(t).bind(Jx.getField).each(Yd.enable),eO.getField2(t).bind(Jx.getField).each(Yd.enable),eO.getLock(t).each(Yd.enable)}}),Gb(),ch("size-input-events2",[Pi(r,(function(t,e){var r=e.event.isField1,o=r?eO.getField1(t):eO.getField2(t),i=r?eO.getField2(t):eO.getField1(t),a=o.map(Ef.getValue).getOr(""),u=i.map(Ef.getValue).getOr("");n=iO(a,u)}))])])})},uO={undo:v(ia("undo")),redo:v(ia("redo")),zoom:v(ia("zoom")),back:v(ia("back")),apply:v(ia("apply")),swap:v(ia("swap")),transform:v(ia("transform")),tempTransform:v(ia("temp-transform")),transformApply:v(ia("transform-apply"))},cO=v("save-state"),sO=v("disable"),lO=v("enable"),fO={formActionEvent:sw,saveState:cO,disable:sO,enable:lO},dO=function(t,e){var n=function(t,n,r,o){return bp(X_({name:t,text:t,disabled:r,primary:o,icon:B.none(),borderless:!1},n,e))},r=function(t,n,r,o){return bp(G_({name:t,icon:B.some(t),tooltip:B.some(n),disabled:o,primary:!1,borderless:!1},r,e))},o=function(t,e){t.map((function(t){var n=t.get(e);n.hasConfigured(Yd)&&Yd.disable(n)}))},i=function(t,e){t.map((function(t){var n=t.get(e);n.hasConfigured(Yd)&&Yd.enable(n)}))},a={tag:"div",classes:["tox-image-tools__toolbar","tox-image-tools-edit-panel"]},u=h,c=function(t,e,n){Di(t,e,n)},s=function(t){return Mi(t,fO.disable())},l=function(t){return Mi(t,fO.enable())},f=function(t,e){s(t),c(t,uO.transform(),{transform:e}),l(t)},d=function(t){return function(){tt.getOpt(t).each((function(t){uh.set(t,[Q])}))}},m=function(t,e){s(t),c(t,uO.transformApply(),{transform:e,swap:d(t)}),l(t)},g=function(){return n("Back",(function(t){return c(t,uO.back(),{swap:d(t)})}),!1,!1)},p=function(){return bp({dom:{tag:"div",classes:["tox-spacer"]},behaviours:wc([Yd.config({})])})},b=function(){return n("Apply",(function(t){return c(t,uO.apply(),{swap:d(t)})}),!0,!0)},y=[g(),p(),n("Apply",(function(e){m(e,(function(e){var n=t.getRect();return S_(e,n.x,n.y,n.w,n.h)})),t.hideCrop()}),!1,!0)],x=$x.sketch({dom:a,components:y.map((function(t){return t.asSpec()})),containerBehaviours:wc([ch("image-tools-crop-buttons-events",[Pi(fO.disable(),(function(t,e){o(y,t)})),Pi(fO.enable(),(function(t,e){i(y,t)}))])])}),w=bp(aO({name:"size",label:B.none(),constrain:!0,disabled:!1},e)),C=[g(),p(),w,p(),n("Apply",(function(t){w.getOpt(t).each((function(e){var n=Ef.getValue(e),r=function(t,e){return function(n){return k_(n,t,e)}}(parseInt(n.width,10),parseInt(n.height,10));m(t,r)}))}),!1,!0)],S=$x.sketch({dom:a,components:C.map((function(t){return t.asSpec()})),containerBehaviours:wc([ch("image-tools-resize-buttons-events",[Pi(fO.disable(),(function(t,e){o(C,t)})),Pi(fO.enable(),(function(t,e){i(C,t)}))])])}),k=function(t,e){return function(n){return t(n,e)}},_=k(C_,"h"),O=k(C_,"v"),E=k(__,-90),z=k(__,90),T=function(t,e){!function(t,e){s(t),c(t,uO.tempTransform(),{transform:e}),l(t)}(t,e)},M=[g(),p(),r("flip-horizontally","Flip horizontally",(function(t){T(t,_)}),!1),r("flip-vertically","Flip vertically",(function(t){T(t,O)}),!1),r("rotate-left","Rotate counterclockwise",(function(t){T(t,E)}),!1),r("rotate-right","Rotate clockwise",(function(t){T(t,z)}),!1),p(),b()],D=$x.sketch({dom:a,components:M.map((function(t){return t.asSpec()})),containerBehaviours:wc([ch("image-tools-fliprotate-buttons-events",[Pi(fO.disable(),(function(t,e){o(M,t)})),Pi(fO.enable(),(function(t,e){i(M,t)}))])])}),A=function(t,n,r,o,i){var a=ZS.parts.label({dom:{tag:"label",classes:["tox-label"],innerHtml:e.translate(t)}}),u=ZS.parts.spectrum({dom:{tag:"div",classes:["tox-slider__rail"],attributes:{role:"presentation"}}}),c=ZS.parts.thumb({dom:{tag:"div",classes:["tox-slider__handle"],attributes:{role:"presentation"}}});return bp(ZS.sketch({dom:{tag:"div",classes:["tox-slider"],attributes:{role:"presentation"}},model:{mode:"x",minX:r,maxX:i,getInitialValue:v({x:o})},components:[a,u,c],sliderBehaviours:wc([mh.config({})]),onChoose:n}))},N=function(t,e,n,r,o){return A(t,(function(t,n,r){var o=k(e,r.x/100);f(t,o)}),n,r,o)},R=function(t,e,n,r,u){var c=function(t,e,n,r,o){return[g(),N(t,e,n,r,o),b()]}(t,e,n,r,u);return $x.sketch({dom:a,components:c.map((function(t){return t.asSpec()})),containerBehaviours:wc([ch("image-tools-filter-panel-buttons-events",[Pi(fO.disable(),(function(t,e){o(c,t)})),Pi(fO.enable(),(function(t,e){i(c,t)}))])])})},H=[g(),p(),b()],L=$x.sketch({dom:a,components:H.map((function(t){return t.asSpec()}))}),V=R("Brightness",x_,-100,0,100),P=R("Contrast",w_,-100,0,100),I=R("Gamma",y_,-100,0,100),F=function(t,e,n){return function(r){return function(t,e,n,r){return c_(t,e,n,r)}(r,t,e,n)}},U=function(t){return A(t,(function(t,e,n){var r=j.getOpt(t),o=q.getOpt(t),i=W.getOpt(t);r.each((function(e){o.each((function(n){i.each((function(r){var o=Ef.getValue(e).x/100,i=Ef.getValue(r).x/100,a=Ef.getValue(n).x/100,u=F(o,i,a);f(t,u)}))}))}))}),0,100,200)},j=U("R"),W=U("G"),q=U("B"),G=[g(),j,W,q,b()],$=$x.sketch({dom:a,components:G.map((function(t){return t.asSpec()}))}),X=function(t,e,n){return function(r){c(r,uO.swap(),{transform:e,swap:function(){tt.getOpt(r).each((function(e){uh.set(e,[t]),n(e)}))}})}},K=B.some(b_),Y=B.some(v_),J=[r("crop","Crop",X(x,B.none(),(function(e){t.showCrop()})),!1),r("resize","Resize",X(S,B.none(),(function(e){w.getOpt(e).each((function(e){var n=t.getMeasurements(),r=n.width,o=n.height;Ef.setValue(e,{width:r,height:o})}))})),!1),r("orientation","Orientation",X(D,B.none(),u),!1),r("brightness","Brightness",X(V,B.none(),u),!1),r("sharpen","Sharpen",X(L,K,u),!1),r("contrast","Contrast",X(P,B.none(),u),!1),r("color-levels","Color levels",X($,B.none(),u),!1),r("gamma","Gamma",X(I,B.none(),u),!1),r("invert","Invert",X(L,Y,u),!1)],Q=$x.sketch({dom:a,components:J.map((function(t){return t.asSpec()}))}),Z=$x.sketch({dom:{tag:"div"},components:[Q],containerBehaviours:wc([uh.config({})])}),tt=bp(Z);return{memContainer:tt,getApplyButton:function(t){return tt.getOpt(t).map((function(t){var e=t.components()[0];return e.components()[e.components().length-1]}))}}},mO=tinymce.util.Tools.resolve("tinymce.geom.Rect"),gO=tinymce.util.Tools.resolve("tinymce.util.Observable"),hO=tinymce.util.Tools.resolve("tinymce.util.VK"),pO=function(t){if(function(t){return f(t.changedTouches)}(t))for(var e="screenX screenY pageX pageY clientX clientY".split(" "),n=0;n<e.length;n++)t[e[n]]=t.changedTouches[0][e[n]]};function vO(t,e){var n,r,o,i,a,u,c,s=[],l=[],d=null!==(n=e.document)&&void 0!==n?n:document,m=null!==(r=e.root)&&void 0!==r?r:d,g=Bt.fromDom(d),h=Bt.fromDom(m.getElementById(null!==(o=e.handle)&&void 0!==o?o:t)),p=function(t){var n=t.raw,r=function(t){var e=Math.max,n=t.documentElement,r=t.body,o=e(n.scrollWidth,r.scrollWidth),i=e(n.clientWidth,r.clientWidth),a=e(n.offsetWidth,r.offsetWidth),u=e(n.scrollHeight,r.scrollHeight),c=e(n.clientHeight,r.clientHeight);return{width:o<a?i:o,height:u<e(n.offsetHeight,r.offsetHeight)?c:u}}(d);pO(n),t.prevent(),a=n.button,u=n.screenX,c=n.screenY;var o=en(h,"cursor");i=Bt.fromTag("div",d),Ze(i,{position:"absolute",top:"0",left:"0",width:r.width+"px",height:r.height+"px","z-index":"2147483647",opacity:"0.0001",cursor:o}),En(Ue(g),i),l.push(ns(g,"mousemove",v),ns(g,"touchmove",v),ns(g,"mouseup",b),ns(g,"touchend",b)),e.start(n)},v=function(t){var n=t.raw;if(pO(n),n.button!==a)return b(t);n.deltaX=n.screenX-u,n.deltaY=n.screenY-c,t.prevent(),e.drag(n)},b=function(t){pO(t.raw),W(l,(function(t){return t.unbind()})),l=[],Mn(i),e.stop&&e.stop(t.raw)};return s.push(ns(h,"mousedown",p),ns(h,"touchstart",p)),{destroy:function(){W(l.concat(s),(function(t){return t.unbind()})),l=[],s=[],f(i)&&Mn(i)}}}var bO=0,yO=function(t,e,n,r,o){var i,a=[],u="tox-crid-"+bO++,c=Bt.fromDom(r),s=[{name:"move",xMul:0,yMul:0,deltaX:1,deltaY:1,deltaW:0,deltaH:0,label:"Crop Mask"},{name:"nw",xMul:0,yMul:0,deltaX:1,deltaY:1,deltaW:-1,deltaH:-1,label:"Top Left Crop Handle"},{name:"ne",xMul:1,yMul:0,deltaX:0,deltaY:1,deltaW:1,deltaH:-1,label:"Top Right Crop Handle"},{name:"sw",xMul:0,yMul:1,deltaX:1,deltaY:0,deltaW:-1,deltaH:1,label:"Bottom Left Crop Handle"},{name:"se",xMul:1,yMul:1,deltaX:0,deltaY:0,deltaW:1,deltaH:1,label:"Bottom Right Crop Handle"}],l=["top","right","bottom","left"],f=function(t,e){return{x:e.x-t.x,y:e.y-t.y,w:e.w,h:e.h}},d=function(e,r,o,i){var a=r.x+o*e.deltaX,u=r.y+i*e.deltaY,c=Math.max(20,r.w+o*e.deltaW),s=Math.max(20,r.h+i*e.deltaH),l=t=mO.clamp({x:a,y:u,w:c,h:s},n,"move"===e.name);l=f(n,l),p.fire("updateRect",{rect:l}),h(l)},m=function(t){var n=function(t,e){lu(c,"#"+u+"-"+t).each((function(t){Ze(t,{left:e.x+"px",top:e.y+"px",width:Math.max(0,e.w)+"px",height:Math.max(0,e.h)+"px"})}))};W(s,(function(e){lu(c,"#"+u+"-"+e.name).each((function(n){Ze(n,{left:t.w*e.xMul+t.x+"px",top:t.h*e.yMul+t.y+"px"})}))})),n("top",{x:e.x,y:e.y,w:e.w,h:t.y-e.y}),n("right",{x:t.x+t.w,y:t.y,w:e.w-t.x-t.w+e.x,h:t.h}),n("bottom",{x:e.x,y:t.y+t.h,w:e.w,h:e.h-t.y-t.h+e.y}),n("left",{x:e.x,y:t.y,w:t.x-e.x,h:t.h}),n("move",t)},g=function(e){m(t=e)},h=function(t){var e,r;g((e=n,{x:(r=t).x+e.x,y:r.y+e.y,w:r.w,h:r.h}))};!function(){var e=Bt.fromTag("div");qe(e,{id:u,class:"tox-croprect-container",role:"grid","aria-dropeffect":"execute"}),En(c,e),W(l,(function(t){lu(c,"#"+u).each((function(e){var n=Bt.fromTag("div");qe(n,{id:u+"-"+t,class:"tox-croprect-block","data-mce-bogus":"all"}),Qe(n,"display","none"),En(e,n)}))})),W(s,(function(t){lu(c,"#"+u).each((function(e){var n=Bt.fromTag("div");qe(n,{id:u+"-"+t.name,"aria-label":t.label,"aria-grabbed":"false","data-mce-bogus":"all",role:"gridcell",tabindex:"-1",title:t.label}),Ua(n,["tox-croprect-handle","tox-croprect-handle-"+t.name]),Qe(n,"display","none"),En(e,n)}))})),i=j(s,(function(e){var n;return vO(u,{document:r.ownerDocument,root:Re(c).dom,handle:u+"-"+e.name,start:function(){n=t},drag:function(t){d(e,n,t.deltaX,t.deltaY)}})})),m(t);var n=function(t){We(t.target,"aria-grabbed","focus"===t.raw.type?"true":"false")};a.push(ns(c,"focusin",n),ns(c,"focusout",n),ns(c,"keydown",(function(e){var n;W(s,(function(t){if(Ge(e.target,"id")===u+"-"+t.name)return n=t,!1}));var r=function(t,e,r,o,i){t.stopPropagation(),t.preventDefault(),d(n,r,o,i)};switch(e.raw.keyCode){case hO.LEFT:r(e,0,t,-10,0);break;case hO.RIGHT:r(e,0,t,10,0);break;case hO.UP:r(e,0,t,0,-10);break;case hO.DOWN:r(e,0,t,0,10);break;case hO.ENTER:case hO.SPACEBAR:e.prevent(),o()}})))}();var p=O(O({},gO),{toggleVisibility:function(t){var e=z(z([],j(s,(function(t){return"#"+u+"-"+t.name})),!0),j(l,(function(t){return"#"+u+"-"+t})),!0).join(","),n=il(c,e);W(n,t?function(t){return un(t,"display")}:function(t){return Qe(t,"display","none")})},setClampRect:function(e){n=e,m(t)},setRect:g,getInnerRect:function(){return f(n,t)},setInnerRect:h,setViewPortRect:function(n){e=n,m(t)},destroy:function(){W(i,(function(t){return t.destroy()})),i=[],W(a,(function(t){return t.unbind()})),a=[]}});return p},xO=function(t){var e,n=bp({dom:{tag:"div",classes:["tox-image-tools__image-bg"],attributes:{role:"presentation"}}}),r=Co(1),o=(e=Qc(),O(O({},e),{run:function(t){return e.get().each(t)}})),i=Co({x:0,y:0,w:1,h:1}),a=Co({x:0,y:0,w:1,h:1}),u=function(t,e){l.getOpt(t).each((function(t){var a=r.get(),u=yn(t.element),c=fn(t.element),s=e.dom.naturalWidth*a,l=e.dom.naturalHeight*a,f=Math.max(0,u/2-s/2),d=Math.max(0,c/2-l/2),m={left:f.toString()+"px",top:d.toString()+"px",width:s.toString()+"px",height:l.toString()+"px",position:"absolute"};Ze(e,m),n.getOpt(t).each((function(t){Ze(t.element,m)})),o.run((function(t){var e=i.get();t.setRect({x:e.x*a+f,y:e.y*a+d,w:e.w*a,h:e.h*a}),t.setClampRect({x:f,y:d,w:s,h:l}),t.setViewPortRect({x:0,y:0,w:u,h:c})}))}))},c=function(t,e){var n,o=Bt.fromTag("img");return We(o,"src",e),(n=o.dom,new Wp((function(t){var e=function(){n.removeEventListener("load",e),t(n)};n.complete?t(n):n.addEventListener("load",e)}))).then((function(){t.getSystem().isConnected()&&l.getOpt(t).map((function(t){var e=Za({element:o});uh.replaceAt(t,1,B.some(e));var n=a.get(),c={x:0,y:0,w:o.dom.naturalWidth,h:o.dom.naturalHeight};a.set(c);var s=mO.inflate(c,-20,-20);i.set(s),n.w===c.w&&n.h===c.h||function(t,e){l.getOpt(t).each((function(t){var n=yn(t.element),o=fn(t.element),i=e.dom.naturalWidth,a=e.dom.naturalHeight,u=Math.min(n/i,o/a);u>=1?r.set(1):r.set(u)}))}(t,o),u(t,o)}))}))},s=$x.sketch({dom:{tag:"div",classes:["tox-image-tools__image"]},components:[n.asSpec(),{dom:{tag:"img",attributes:{src:t}}},{dom:{tag:"div"},behaviours:wc([ch("image-panel-crop-events",[$i((function(t){l.getOpt(t).each((function(t){var e=t.element.dom,n=yO({x:10,y:10,w:100,h:100},{x:0,y:0,w:200,h:200},{x:0,y:0,w:200,h:200},e,h);n.toggleVisibility(!1),n.on("updateRect",(function(t){var e=t.rect,n=r.get(),o={x:Math.round(e.x/n),y:Math.round(e.y/n),w:Math.round(e.w/n),h:Math.round(e.h/n)};i.set(o)})),o.set(n)}))})),Xi((function(){o.clear()}))])])}],containerBehaviours:wc([uh.config({}),ch("image-panel-events",[$i((function(e){c(e,t)}))])])}),l=bp(s);return{memContainer:l,updateSrc:c,zoom:function(t,e){var n=r.get(),o=e>0?Math.min(2,n+.1):Math.max(.1,n-.1);r.set(o),l.getOpt(t).each((function(t){var e=t.components()[1].element;u(t,e)}))},showCrop:function(){o.run((function(t){t.toggleVisibility(!0)}))},hideCrop:function(){o.run((function(t){t.toggleVisibility(!1)}))},getRect:function(){return i.get()},getMeasurements:function(){var t=a.get();return{width:t.w,height:t.h}}}},wO=function(t,e,n,r,o){return G_({name:t,icon:B.some(e),disabled:n,tooltip:B.some(t),primary:!1,borderless:!1},r,o)},CO=function(t,e){e?Yd.enable(t):Yd.disable(t)};var SO,kO=function(t){var e,n,r,o,i=Co(t),a=ts(),u=(n=-1,{data:e=[],add:function(t){var r=e.splice(++n);return e.push(t),{state:t,removed:r}},undo:function(){if(r())return e[--n]},redo:function(){if(o())return e[++n]},canUndo:r=function(){return n>0},canRedo:o=function(){return-1!==n&&n<e.length-1}});u.add(t);var c=function(t){i.set(t)},s=function(t){return{blob:t,url:URL.createObjectURL(t)}},l=function(t){URL.revokeObjectURL(t.url)},f=function(){a.on(l),a.clear()},d=function(t){var e=s(t);c(e);var n,r=u.add(e).removed;return n=r,wk.each(n,l),e.url};return{getBlobState:function(){return i.get()},setBlobState:c,addBlobState:d,getTempState:function(){return a.get().getOrThunk(i.get)},updateTempState:function(t){var e=s(t);return f(),a.set(e),e.url},addTempState:function(t){var e=s(t);return a.set(e),e.url},applyTempState:function(t){return a.get().fold(h,(function(e){d(e.blob),t()}))},destroyTempState:f,undo:function(){var t=u.undo();return c(t),t.url},redo:function(){var t=u.redo();return c(t),t.url},getHistoryStates:function(){return{undoEnabled:u.canUndo(),redoEnabled:u.canRedo()}}}},_O=function(t,e){var n=kO(t.currentState),r=function(t){var e=n.getHistoryStates();d.updateButtonUndoStates(t,e.undoEnabled,e.redoEnabled),Di(t,fO.formActionEvent,{name:fO.saveState(),value:e.undoEnabled})},o=function(t){return t.toBlob()},i=function(t){Di(t,fO.formActionEvent,{name:fO.disable(),value:{}})},a=function(t){m.getApplyButton(t).each((function(t){Yd.enable(t)})),Di(t,fO.formActionEvent,{name:fO.enable(),value:{}})},u=function(t,e){return i(t),f.updateSrc(t,e)},c=function(t,e,n,c,s){i(t),function(t){return Yk(t)}(e).then(n).then(o).then(c).then((function(e){return u(t,e)})).then((function(){r(t),s(),a(t)})).catch((function(e){console.log(e),t.getSystem().isConnected()&&a(t)}))},s=function(t,e,r){var o=n.getBlobState().blob;c(t,o,e,(function(t){return n.updateTempState(t)}),r)},l=function(t){var e=n.getBlobState().url;return n.destroyTempState(),r(t),e},f=xO(t.currentState.url),d=function(t){var e=bp(wO("Undo","undo",!0,(function(t){Di(t,uO.undo(),{direction:1})}),t)),n=bp(wO("Redo","redo",!0,(function(t){Di(t,uO.redo(),{direction:1})}),t));return{container:$x.sketch({dom:{tag:"div",classes:["tox-image-tools__toolbar","tox-image-tools__sidebar"]},components:[e.asSpec(),n.asSpec(),wO("Zoom in","zoom-in",!1,(function(t){Di(t,uO.zoom(),{direction:1})}),t),wO("Zoom out","zoom-out",!1,(function(t){Di(t,uO.zoom(),{direction:-1})}),t)]}),updateButtonUndoStates:function(t,r,o){e.getOpt(t).each((function(t){CO(t,r)})),n.getOpt(t).each((function(t){CO(t,o)}))}}}(e),m=dO(f,e);return{dom:{tag:"div",attributes:{role:"presentation"}},components:[m.memContainer.asSpec(),f.memContainer.asSpec(),d.container],behaviours:wc([Ef.config({store:{mode:"manual",getValue:function(){return n.getBlobState()}}}),ch("image-tools-events",[Pi(uO.undo(),(function(t,e){var o=n.undo();u(t,o).then((function(e){a(t),r(t)}))})),Pi(uO.redo(),(function(t,e){var o=n.redo();u(t,o).then((function(e){a(t),r(t)}))})),Pi(uO.zoom(),(function(t,e){var n=e.event.direction;f.zoom(t,n)})),Pi(uO.back(),(function(t,e){!function(t){var e=l(t);u(t,e).then((function(e){a(t)}))}(t),(0,e.event.swap)(),f.hideCrop()})),Pi(uO.apply(),(function(t,e){n.applyTempState((function(){l(t),(0,e.event.swap)()}))})),Pi(uO.transform(),(function(t,e){return s(t,e.event.transform,h)})),Pi(uO.tempTransform(),(function(t,e){return function(t,e){var r=n.getTempState().blob;c(t,r,e,(function(t){return n.addTempState(t)}),h)}(t,e.event.transform)})),Pi(uO.transformApply(),(function(t,e){return function(t,e,r){var o=n.getBlobState().blob;c(t,o,e,(function(e){var r=n.addBlobState(e);return l(t),r}),r)}(t,e.event.transform,e.event.swap)})),Pi(uO.swap(),(function(t,e){!function(t){d.updateButtonUndoStates(t,!1,!1)}(t);var n=e.event.transform,r=e.event.swap;n.fold((function(){r()}),(function(e){s(t,e,r)}))}))]),hk()])}},OO=function(t){return!xt(t,"items")},EO="data-value",zO=function(t,e,n,r){return j(n,(function(n){return OO(n)?{type:"togglemenuitem",text:n.text,value:n.value,active:n.value===r,onAction:function(){Ef.setValue(t,n.value),Di(t,aw,{name:e}),mh.focus(t)}}:{type:"nestedmenuitem",text:n.text,getSubmenuItems:function(){return zO(t,e,n.items,r)}}}))},TO=function(t,e){return st(t,(function(t){return OO(t)?_t(t.value===e,t):TO(t.items,e)}))},MO=Dd({name:"HtmlSelect",configFields:[Yr("options"),zf("selectBehaviours",[mh,Ef]),mo("selectClasses",[]),mo("selectAttributes",{}),io("data")],factory:function(t,e){var n=j(t.options,(function(t){return{dom:{tag:"option",value:t.value,innerHtml:t.text}}})),r=t.data.map((function(t){return Oo("initialValue",t)})).getOr({});return{uid:t.uid,dom:{tag:"select",classes:t.selectClasses,attributes:t.selectAttributes},components:n,behaviours:Mf(t.selectBehaviours,[mh.config({}),Ef.config({store:O({mode:"manual",getValue:function(t){return Wa(t.element)},setValue:function(e,n){K(t.options,(function(t){return t.value===n})).isSome()&&qa(e.element,n)}},r)})])}}}),DO=function(t,e){var n=t.label.map((function(t){return iw(t,e)})),r=[Yd.config({disabled:function(){return t.disabled||e.isDisabled()}}),Gb(),nh.config({mode:"execution",useEnter:!0!==t.multiline,useControlEnter:!0===t.multiline,execute:function(t){return Mi(t,lw),B.some(!0)}}),ch("textfield-change",[Pi(Yo(),(function(e,n){Di(e,aw,{name:t.name})})),Pi(ui(),(function(e,n){Di(e,aw,{name:t.name})}))]),tw.config({})],o=t.validation.map((function(t){return Iw.config({getRoot:function(t){return Oe(t.element)},invalidClass:"tox-invalid",validator:{validate:function(e){var n=Ef.getValue(e),r=t.validator(n);return Mw(!0===r?qn.value(n):qn.error(r))},validateOnLoad:t.validateOnLoad}})})).toArray(),i=t.placeholder.fold(v({}),(function(t){return{placeholder:e.translate(t)}})),a=t.inputMode.fold(v({}),(function(t){return{inputmode:t}})),u=O(O({},i),a),c=Jx.parts.field({tag:!0===t.multiline?"textarea":"input",inputAttributes:u,inputClasses:[t.classname],inputBehaviours:wc(J([r,o])),selectOnFocus:!1,factory:xw}),s=(t.flex?["tox-form__group--stretched"]:[]).concat(t.maximized?["tox-form-group--maximize"]:[]),l=[Yd.config({disabled:function(){return t.disabled||e.isDisabled()},onDisabled:function(t){Jx.getField(t).each(Yd.disable)},onEnabled:function(t){Jx.getField(t).each(Yd.enable)}}),Gb()];return nw(n,c,s,l)},AO=Object.freeze({__proto__:null,events:function(t,e){var n=t.stream.streams.setup(t,e);return Hi([Pi(t.event,n),Xi((function(){return e.cancel()}))].concat(t.cancelEvent.map((function(t){return[Pi(t,(function(){return e.cancel()}))]})).getOr([])))}}),NO=function(t){var e=Co(null);return Ca({readState:function(){return{timer:null!==e.get()?"set":"unset"}},setTimer:function(t){e.set(t)},cancel:function(){var t=e.get();null!==t&&t.cancel()}})},BO=Object.freeze({__proto__:null,throttle:NO,init:function(t){return t.stream.streams.state(t)}}),RO=[Jr("stream",Gr("mode",{throttle:[Yr("delay"),mo("stopEvent",!0),Au("streams",{setup:function(t,e){var n=t.stream,r=Np(t.onStream,n.delay);return e.setTimer(r),function(t,e){r.throttle(t,e),n.stopEvent&&e.stop()}},state:NO})]})),mo("event","input"),io("cancelEvent"),Mu("onStream")],HO=Sc({fields:RO,name:"streaming",active:AO,state:BO}),LO=function(t,e,n){var r=Ef.getValue(n);Ef.setValue(e,r),PO(e)},VO=function(t,e){var n=t.element,r=Wa(n),o=n.dom;"number"!==Ge(n,"type")&&e(o,r)},PO=function(t){VO(t,(function(t,e){return t.setSelectionRange(e.length,e.length)}))},IO=function(t,e,n){if(t.selectsOver){var r=Ef.getValue(e),o=t.getDisplayText(r),i=Ef.getValue(n);return 0===t.getDisplayText(i).indexOf(o)?B.some((function(){LO(0,e,n),function(t,e){VO(t,(function(t,n){return t.setSelectionRange(e,n.length)}))}(e,o.length)})):B.none()}return B.none()},FO=v("alloy.typeahead.itemexecute"),UO=v([io("lazySink"),Yr("fetch"),mo("minChars",5),mo("responseTime",1e3),zu("onOpen"),mo("getHotspot",B.some),mo("getAnchorOverrides",v({})),mo("layouts",B.none()),mo("eventOrder",{}),wo("model",{},[mo("getDisplayText",(function(t){return void 0!==t.meta&&void 0!==t.meta.text?t.meta.text:t.value})),mo("selectsOver",!0),mo("populateFromBrowse",!0)]),zu("onSetValue"),Tu("onExecute"),zu("onItemExecute"),mo("inputClasses",[]),mo("inputAttributes",{}),mo("inputStyles",{}),mo("matchWidth",!0),mo("useMinWidth",!1),mo("dismissOnBlur",!0),Ou(["openClass"]),io("initialData"),zf("typeaheadBehaviours",[mh,Ef,HO,nh,_h,jw]),Xr("previewing",(function(){return Co(!0)}))].concat(pw()).concat(oC())),jO=v([od({schema:[_u()],name:"menu",overrides:function(t){return{fakeFocus:!0,onHighlight:function(e,n){t.previewing.get()?e.getSystem().getByUid(t.uid).each((function(r){IO(t.model,r,n).fold((function(){return um.dehighlight(e,n)}),(function(t){return t()}))})):e.getSystem().getByUid(t.uid).each((function(e){t.model.populateFromBrowse&&LO(t.model,e,n)})),t.previewing.set(!1)},onExecute:function(e,n){return e.getSystem().getByUid(t.uid).toOptional().map((function(t){return Di(t,FO(),{item:n}),!0}))},onHover:function(e,n){t.previewing.set(!1),e.getSystem().getByUid(t.uid).each((function(e){t.model.populateFromBrowse&&LO(t.model,e,n)}))}}}})]),WO=Ad({name:"Typeahead",configFields:UO(),partFields:jO(),factory:function(t,e,n,r){var o=function(e,n,o){t.previewing.set(!1);var i=jw.getCoupled(e,"sandbox");if(uf.isOpen(i))Hd.getCurrent(i).each((function(t){um.getHighlighted(t).fold((function(){o(t)}),(function(){Ri(i,t.element,"keydown",n)}))}));else{Yw(t,a(e),e,i,r,(function(t){Hd.getCurrent(t).each(o)}),Sw.HighlightFirst).get(h)}},i=vw(t),a=function(t){return function(e){return e.map((function(e){var n=bt(e.menus),r=Q(n,(function(t){return G(t.items,(function(t){return"item"===t.type}))}));return Ef.getState(t).update(j(r,(function(t){return t.data}))),e}))}},u=[mh.config({}),Ef.config({onSetValue:t.onSetValue,store:O({mode:"dataset",getDataKey:function(t){return Wa(t.element)},getFallbackEntry:function(t){return{value:t,meta:{}}},setValue:function(e,n){qa(e.element,t.model.getDisplayText(n))}},t.initialData.map((function(t){return Oo("initialValue",t)})).getOr({}))}),HO.config({stream:{mode:"throttle",delay:t.responseTime,stopEvent:!1},onStream:function(e,n){var o=jw.getCoupled(e,"sandbox");if(mh.isFocused(e)&&Wa(e.element).length>=t.minChars){var i=Hd.getCurrent(o).bind((function(t){return um.getHighlighted(t).map(Ef.getValue)}));t.previewing.set(!0);Yw(t,a(e),e,o,r,(function(e){Hd.getCurrent(o).each((function(e){i.fold((function(){t.model.selectsOver&&um.highlightFirst(e)}),(function(t){um.highlightBy(e,(function(e){return Ef.getValue(e).value===t.value})),um.getHighlighted(e).orThunk((function(){return um.highlightFirst(e),B.none()}))}))}))}),Sw.HighlightFirst).get(h)}},cancelEvent:gi()}),nh.config({mode:"special",onDown:function(t,e){return o(t,e,um.highlightFirst),B.some(!0)},onEscape:function(t){var e=jw.getCoupled(t,"sandbox");return uf.isOpen(e)?(uf.close(e),B.some(!0)):B.none()},onUp:function(t,e){return o(t,e,um.highlightLast),B.some(!0)},onEnter:function(e){var n=jw.getCoupled(e,"sandbox"),r=uf.isOpen(n);if(r&&!t.previewing.get())return Hd.getCurrent(n).bind((function(t){return um.getHighlighted(t)})).map((function(t){return Di(e,FO(),{item:t}),!0}));var o=Ef.getValue(e);return Mi(e,gi()),t.onExecute(n,e,o),r&&uf.close(n),B.some(!0)}}),_h.config({toggleClass:t.markers.openClass,aria:{mode:"expanded"}}),jw.config({others:{sandbox:function(e){return nC(t,e,{onOpen:function(){return _h.on(e)},onClose:function(){return _h.off(e)}})}}}),ch("typeaheadevents",[Yi((function(e){var n=h;Qw(t,a(e),e,r,n,Sw.HighlightFirst).get(h)})),Pi(FO(),(function(e,n){var r=jw.getCoupled(e,"sandbox");LO(t.model,e,n.event.item),Mi(e,gi()),t.onItemExecute(e,r,n.event.item,Ef.getValue(e)),uf.close(r),PO(e)}))].concat(t.dismissOnBlur?[Pi(ai(),(function(t){var e=jw.getCoupled(t,"sandbox");Nc(e.element).isNone()&&uf.close(e)}))]:[]))];return{uid:t.uid,dom:yw(cr(t,{inputAttributes:{role:"combobox","aria-autocomplete":"list","aria-haspopup":"true"}})),behaviours:O(O({},i),Mf(t.typeaheadBehaviours,u)),eventOrder:t.eventOrder}}}),qO=function(t){return O(O({},t),{toCached:function(){return qO(t.toCached())},bindFuture:function(e){return qO(t.bind((function(t){return t.fold((function(t){return Mw(qn.error(t))}),(function(t){return e(t)}))})))},bindResult:function(e){return qO(t.map((function(t){return t.bind(e)})))},mapResult:function(e){return qO(t.map((function(t){return t.map(e)})))},mapError:function(e){return qO(t.map((function(t){return t.mapError(e)})))},foldResult:function(e,n){return t.map((function(t){return t.fold(e,n)}))},withTimeout:function(e,n){return qO(Tw((function(r){var o=!1,i=setTimeout((function(){o=!0,r(qn.error(n()))}),e);t.get((function(t){o||(clearTimeout(i),r(t))}))})))}})},GO=function(t){return qO(Tw(t))},$O=GO,XO={type:"separator"},KO=function(t){return{type:"menuitem",value:t.url,text:t.title,meta:{attach:t.attach},onAction:h}},YO=function(t,e){return{type:"menuitem",value:e,text:t,meta:{attach:void 0},onAction:h}},JO=function(t,e){return function(t){return j(t,KO)}(function(t,e){return G(e,(function(e){return e.type===t}))}(t,e))},QO=function(t){return JO("header",t.targets)},ZO=function(t){return JO("anchor",t.targets)},tE=function(t){return B.from(t.anchorTop).map((function(t){return YO("<top>",t)})).toArray()},eE=function(t){return B.from(t.anchorBottom).map((function(t){return YO("<bottom>",t)})).toArray()},nE=function(t,e){var n=t.toLowerCase();return G(e,(function(t){var e=void 0!==t.meta&&void 0!==t.meta.text?t.meta.text:t.text;return Et(e.toLowerCase(),n)||Et(t.value.toLowerCase(),n)}))},rE=function(t,e,n){var r=Ef.getValue(e),o=void 0!==r.meta.text?r.meta.text:r.value;return n.getLinkInformation().fold((function(){return[]}),(function(e){var r,i=nE(o,function(t){return j(t,(function(t){return YO(t,t)}))}(n.getHistory(t)));return"file"===t?(r=[i,nE(o,QO(e)),nE(o,J([tE(e),ZO(e),eE(e)]))],X(r,(function(t,e){return 0===t.length||0===e.length?t.concat(e):t.concat(XO,e)}),[])):i}))},oE=ia("aria-invalid"),iE=function(t){return function(e,n,r){return yt(n,"name").fold((function(){return t(n,r)}),(function(o){return e.field(o,t(n,r))}))}},aE={bar:iE((function(t,e){return function(t,e){return{dom:{tag:"div",classes:["tox-bar","tox-form__controls-h-stack"]},components:j(t.items,e.interpreter)}}(t,e.shared)})),collection:iE((function(t,e){return hw(t,e.shared.providers)})),alertbanner:iE((function(t,e){return function(t,e){return $x.sketch({dom:{tag:"div",attributes:{role:"alert"},classes:["tox-notification","tox-notification--in","tox-notification--"+t.level]},components:[{dom:{tag:"div",classes:["tox-notification__icon"]},components:[vp.sketch({dom:{tag:"button",classes:["tox-button","tox-button--naked","tox-button--icon"],innerHtml:_p(t.icon,e.icons),attributes:{title:e.translate(t.iconTooltip)}},action:function(e){Di(e,sw,{name:"alert-banner",value:t.url})},buttonBehaviours:wc([Op()])})]},{dom:{tag:"div",classes:["tox-notification__body"],innerHtml:e.translate(t.text)}}]})}(t,e.shared.providers)})),input:iE((function(t,e){return function(t,e){return DO({name:t.name,multiline:!1,label:t.label,inputMode:t.inputMode,placeholder:t.placeholder,flex:!1,disabled:t.disabled,classname:"tox-textfield",validation:B.none(),maximized:t.maximized},e)}(t,e.shared.providers)})),textarea:iE((function(t,e){return function(t,e){return DO({name:t.name,multiline:!0,label:t.label,inputMode:B.none(),placeholder:t.placeholder,flex:!0,disabled:t.disabled,classname:"tox-textarea",validation:B.none(),maximized:t.maximized},e)}(t,e.shared.providers)})),label:iE((function(t,e){return function(t,e){var n={dom:{tag:"label",innerHtml:e.providers.translate(t.label),classes:["tox-label"]}},r=j(t.items,e.interpreter);return{dom:{tag:"div",classes:["tox-form__group"]},components:[n].concat(r),behaviours:wc([hk(),uh.config({}),Ek(B.none()),nh.config({mode:"acyclic"})])}}(t,e.shared)})),iframe:function(t){return function(e,n,r){var o=cr(n,{source:"dynamic"});return iE(t)(e,o,r)}}((function(t,e){return Vk(t,e.shared.providers)})),button:iE((function(t,e){return J_(t,e.shared.providers)})),checkbox:iE((function(t,e){return function(t,e){var n=Ef.config({store:{mode:"manual",getValue:function(t){return t.element.dom.checked},setValue:function(t,e){t.element.dom.checked=e}}}),r=function(t){return t.element.dom.click(),B.some(!0)},o=Jx.parts.field({factory:{sketch:b},dom:{tag:"input",classes:["tox-checkbox__input"],attributes:{type:"checkbox"}},behaviours:wc([hk(),Yd.config({disabled:function(){return t.disabled||e.isDisabled()}}),tw.config({}),mh.config({}),n,nh.config({mode:"special",onEnter:r,onSpace:r,stopSpaceKeyup:!0}),ch("checkbox-events",[Pi(Jo(),(function(e,n){Di(e,aw,{name:t.name})}))])])}),i=Jx.parts.label({dom:{tag:"span",classes:["tox-checkbox__label"],innerHtml:e.translate(t.label)},behaviours:wc([sC.config({})])}),a=function(t){return zp("checked"===t?"selected":"unselected",{tag:"span",classes:["tox-icon","tox-checkbox-icon__"+t]},e.icons)},u=bp({dom:{tag:"div",classes:["tox-checkbox__icons"]},components:[a("checked"),a("unchecked")]});return Jx.sketch({dom:{tag:"label",classes:["tox-checkbox"]},components:[o,u.asSpec(),i],fieldBehaviours:wc([Yd.config({disabled:function(){return t.disabled||e.isDisabled()},disableClass:"tox-checkbox--disabled",onDisabled:function(t){Jx.getField(t).each(Yd.disable)},onEnabled:function(t){Jx.getField(t).each(Yd.enable)}}),Gb()])})}(t,e.shared.providers)})),colorinput:iE((function(t,e){return mC(t,e.shared,e.colorinput)})),colorpicker:iE((function(t){var e=function(t){return"tox-"+t},n=gk(yk,e),r=bp(n.sketch({dom:{tag:"div",classes:[e("color-picker-container")],attributes:{role:"presentation"}},onValidHex:function(t){Di(t,sw,{name:"hex-valid",value:!0})},onInvalidHex:function(t){Di(t,sw,{name:"hex-valid",value:!1})}}));return{dom:{tag:"div"},components:[r.asSpec()],behaviours:wc([Ef.config({store:{mode:"manual",getValue:function(t){var e=r.get(t);return Hd.getCurrent(e).bind((function(t){return Ef.getValue(t).hex})).map((function(t){return"#"+t})).getOr("")},setValue:function(t,e){var n=/^#([a-fA-F0-9]{3}(?:[a-fA-F0-9]{3})?)/.exec(e),o=r.get(t);Hd.getCurrent(o).fold((function(){console.log("Can not find form")}),(function(t){Ef.setValue(t,{hex:B.from(n[1]).getOr("")}),uk.getField(t,"hex").each((function(t){Mi(t,Yo())}))}))}}}),hk()])}})),dropzone:iE((function(t,e){return Tk(t,e.shared.providers)})),grid:iE((function(t,e){return function(t,e){return{dom:{tag:"div",classes:["tox-form__grid","tox-form__grid--"+t.columns+"col"]},components:j(t.items,e.interpreter)}}(t,e.shared)})),listbox:iE((function(t,e){return function(t,e){var n=e.shared.providers,r=at(t.items).filter(OO),o=t.label.map((function(t){return iw(t,n)})),i={dom:{tag:"div",classes:["tox-listboxfield"]},components:[Jx.parts.field({dom:{},factory:{sketch:function(n){return B_({uid:n.uid,text:r.map((function(t){return t.text})),icon:B.none(),tooltip:t.label,role:B.none(),fetch:function(n,r){var o=zO(n,t.name,t.items,Ef.getValue(n));r(I_(o,pv.CLOSE_ON_EXECUTE,e,!1))},onSetup:v(h),getApi:v({}),columns:1,presets:"normal",classes:[],dropdownBehaviours:[tw.config({}),Ef.config({store:{mode:"manual",initialValue:r.map((function(t){return t.value})).getOr(""),getValue:function(t){return Ge(t.element,EO)},setValue:function(e,n){TO(t.items,n).each((function(t){We(e.element,EO,t.value),Di(e,A_,{text:t.text})}))}}})]},"tox-listbox",e.shared)}}})]};return Jx.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:J([o.toArray(),[i]]),fieldBehaviours:wc([Yd.config({disabled:v(t.disabled),onDisabled:function(t){Jx.getField(t).each(Yd.disable)},onEnabled:function(t){Jx.getField(t).each(Yd.enable)}})])})}(t,e)})),selectbox:iE((function(t,e){return function(t,e){var n=j(t.items,(function(t){return{text:e.translate(t.text),value:t.value}})),r=t.label.map((function(t){return iw(t,e)})),o=Jx.parts.field({dom:{},selectAttributes:{size:t.size},options:n,factory:MO,selectBehaviours:wc([Yd.config({disabled:function(){return t.disabled||e.isDisabled()}}),tw.config({}),ch("selectbox-change",[Pi(Jo(),(function(e,n){Di(e,aw,{name:t.name})}))])])}),i=t.size>1?B.none():B.some(zp("chevron-down",{tag:"div",classes:["tox-selectfield__icon-js"]},e.icons)),a={dom:{tag:"div",classes:["tox-selectfield"]},components:J([[o],i.toArray()])};return Jx.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:J([r.toArray(),[a]]),fieldBehaviours:wc([Yd.config({disabled:function(){return t.disabled||e.isDisabled()},onDisabled:function(t){Jx.getField(t).each(Yd.disable)},onEnabled:function(t){Jx.getField(t).each(Yd.enable)}}),Gb()])})}(t,e.shared.providers)})),sizeinput:iE((function(t,e){return aO(t,e.shared.providers)})),urlinput:iE((function(t,e){return function(t,e,n){var r,o=e.shared.providers,i=function(e){var r=Ef.getValue(e);n.addToHistory(r.value,t.filetype)},a=Jx.parts.field({factory:WO,dismissOnBlur:!0,inputClasses:["tox-textfield"],sandboxClasses:["tox-dialog__popups"],inputAttributes:{"aria-errormessage":oE,type:"url"},minChars:0,responseTime:0,fetch:function(r){var o=rE(t.filetype,r,n),i=I_(o,pv.BUBBLE_TO_SANDBOX,e,!1);return Mw(i)},getHotspot:function(t){return d.getOpt(t)},onSetValue:function(t,e){t.hasConfigured(Iw)&&Iw.run(t).get(h)},typeaheadBehaviours:wc(J([n.getValidationHandler().map((function(e){return Iw.config({getRoot:function(t){return Oe(t.element)},invalidClass:"tox-control-wrap--status-invalid",notify:{onInvalid:function(t,e){c.getOpt(t).each((function(t){We(t.element,"title",o.translate(e))}))}},validator:{validate:function(n){var r=Ef.getValue(n);return $O((function(n){e({type:t.filetype,url:r.value},(function(t){if("invalid"===t.status){var e=qn.error(t.message);n(e)}else{var r=qn.value(t.message);n(r)}}))}))},validateOnLoad:!1}})})).toArray(),[Yd.config({disabled:function(){return t.disabled||o.isDisabled()}}),tw.config({}),ch("urlinput-events",J(["file"===t.filetype?[Pi(Yo(),(function(e){Di(e,aw,{name:t.name})}))]:[],[Pi(Jo(),(function(e){Di(e,aw,{name:t.name}),i(e)})),Pi(ui(),(function(e){Di(e,aw,{name:t.name}),i(e)}))]]))]])),eventOrder:(r={},r[Yo()]=["streaming","urlinput-events","invalidating"],r),model:{getDisplayText:function(t){return t.value},selectsOver:!1,populateFromBrowse:!1},markers:{openClass:"tox-textfield--popup-open"},lazySink:e.shared.getSink,parts:{menu:Bv(0,0,"normal")},onExecute:function(t,e,n){Di(e,lw,{})},onItemExecute:function(e,n,r,o){i(e),Di(e,aw,{name:t.name})}}),u=t.label.map((function(t){return iw(t,o)})),c=bp(function(t,e,n,r){return void 0===n&&(n=t),void 0===r&&(r=t),zp(n,{tag:"div",classes:["tox-icon","tox-control-wrap__status-icon-"+t],attributes:O({title:o.translate(r),"aria-live":"polite"},e.fold((function(){return{}}),(function(t){return{id:t}})))},o.icons)}("invalid",B.some(oE),"warning")),s=bp({dom:{tag:"div",classes:["tox-control-wrap__status-icon-wrap"]},components:[c.asSpec()]}),l=n.getUrlPicker(t.filetype),f=ia("browser.url.event"),d=bp({dom:{tag:"div",classes:["tox-control-wrap"]},components:[a,s.asSpec()],behaviours:wc([Yd.config({disabled:function(){return t.disabled||o.isDisabled()}})])}),m=bp(X_({name:t.name,icon:B.some("browse"),text:t.label.getOr(""),disabled:t.disabled,primary:!1,borderless:!0},(function(t){return Mi(t,f)}),o,[],["tox-browse-url"]));return Jx.sketch({dom:ow([]),components:u.toArray().concat([{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:J([[d.asSpec()],l.map((function(){return m.asSpec()})).toArray()])}]),fieldBehaviours:wc([Yd.config({disabled:function(){return t.disabled||o.isDisabled()},onDisabled:function(t){Jx.getField(t).each(Yd.disable),m.getOpt(t).each(Yd.disable)},onEnabled:function(t){Jx.getField(t).each(Yd.enable),m.getOpt(t).each(Yd.enable)}}),Gb(),ch("url-input-events",[Pi(f,(function(e){Hd.getCurrent(e).each((function(n){var r=Ef.getValue(n),o=O({fieldname:t.name},r);l.each((function(r){r(o).get((function(r){Ef.setValue(n,r),Di(e,aw,{name:t.name})}))}))}))}))])])})}(t,e,e.urlinput)})),customeditor:iE((function(t){var e=ts(),n=bp({dom:{tag:t.tag}}),r=ts();return{dom:{tag:"div",classes:["tox-custom-editor"]},behaviours:wc([ch("custom-editor-events",[$i((function(o){n.getOpt(o).each((function(n){(!function(t){return xt(t,"init")}(t)?xk.load(t.scriptId,t.scriptUrl).then((function(e){return e(n.element.dom,t.settings)})):t.init(n.element.dom)).then((function(t){r.on((function(e){t.setValue(e)})),r.clear(),e.set(t)}))}))}))]),Ef.config({store:{mode:"manual",getValue:function(){return e.get().fold((function(){return r.get().getOr("")}),(function(t){return t.getValue()}))},setValue:function(t,n){e.get().fold((function(){r.set(n)}),(function(t){return t.setValue(n)}))}}}),hk()]),components:[n.asSpec()]}})),htmlpanel:iE((function(t){return"presentation"===t.presets?$x.sketch({dom:{tag:"div",classes:["tox-form__group"],innerHtml:t.html}}):$x.sketch({dom:{tag:"div",classes:["tox-form__group"],innerHtml:t.html,attributes:{role:"document"}},containerBehaviours:wc([tw.config({}),mh.config({})])})})),imagetools:iE((function(t,e){return _O(t,e.shared.providers)})),table:iE((function(t,e){return function(t,e){var n,r,o=function(t){return{dom:{tag:"th",innerHtml:e.translate(t)}}},i=function(t){return{dom:{tag:"td",innerHtml:e.translate(t)}}},a=function(t){return{dom:{tag:"tr"},components:j(t,i)}};return{dom:{tag:"table",classes:["tox-dialog__table"]},components:[(r=t.header,{dom:{tag:"thead"},components:[{dom:{tag:"tr"},components:j(r,o)}]}),(n=t.cells,{dom:{tag:"tbody"},components:j(n,a)})],behaviours:wc([tw.config({}),mh.config({})])}}(t,e.shared.providers)})),panel:iE((function(t,e){return function(t,e){return{dom:{tag:"div",classes:t.classes},components:j(t.items,e.shared.interpreter)}}(t,e)}))},uE={field:function(t,e){return e}},cE=function(t,e,n){var r=cr(n,{shared:{interpreter:function(e){return sE(t,e,r)}}});return sE(t,e,r)},sE=function(t,e,n){return yt(aE,e.type).fold((function(){return console.error('Unknown factory type "'+e.type+'", defaulting to container: ',e),e}),(function(r){return r(t,e,n)}))},lE={valignCentre:[],alignCentre:[],alignLeft:[],alignRight:[],right:[],left:[],bottom:[],top:[]},fE=function(t,e,n){var r={maxHeightFunction:hs()};return function(){return n()?{type:"node",root:He(t()),node:B.from(t()),bubble:ys(12,12,lE),layouts:{onRtl:function(){return[up]},onLtr:function(){return[ap]}},overrides:r}:{type:"hotspot",hotspot:e(),bubble:ys(-12,12,lE),layouts:{onRtl:function(){return[ec]},onLtr:function(){return[nc]}},overrides:r}}},dE=function(t,e,n){return function(){return n()?{type:"node",root:He(t()),node:B.from(t()),layouts:{onRtl:function(){return[cp]},onLtr:function(){return[cp]}}}:{type:"hotspot",hotspot:e(),layouts:{onRtl:function(){return[ac]},onLtr:function(){return[ac]}}}}},mE=function(t,e){return function(){return{type:"selection",root:e(),getSelection:function(){var e=t.selection.getRng();return B.some(qs.range(Bt.fromDom(e.startContainer),e.startOffset,Bt.fromDom(e.endContainer),e.endOffset))}}}},gE=function(t){return function(e){return{type:"node",root:t(),node:e}}},hE=function(t,e,n){var r=Bb(t),o=function(){return Bt.fromDom(t.getBody())},i=function(){return Bt.fromDom(t.getContentAreaContainer())},a=function(){return r||!n()};return{inlineDialog:fE(i,e,a),banner:dE(i,e,a),cursor:mE(t,o),node:gE(o)}},pE=function(t){return function(e,n){lx(t)(e,n)}},vE=function(t){return function(){return Qy(t)}},bE=function(t){return function(){return Zy(t)}},yE=function(t){return function(){return nx(t)}},xE=function(t){return{colorPicker:pE(t),hasCustomColors:vE(t),getColors:bE(t),getColorCols:yE(t)}},wE=function(t){return function(){return function(t){return t.getParam("draggable_modal",!1,"boolean")}(t)}},CE=function(t){return{isDraggableModal:wE(t)}},SE=[{title:"Headings",items:[{title:"Heading 1",format:"h1"},{title:"Heading 2",format:"h2"},{title:"Heading 3",format:"h3"},{title:"Heading 4",format:"h4"},{title:"Heading 5",format:"h5"},{title:"Heading 6",format:"h6"}]},{title:"Inline",items:[{title:"Bold",format:"bold"},{title:"Italic",format:"italic"},{title:"Underline",format:"underline"},{title:"Strikethrough",format:"strikethrough"},{title:"Superscript",format:"superscript"},{title:"Subscript",format:"subscript"},{title:"Code",format:"code"}]},{title:"Blocks",items:[{title:"Paragraph",format:"p"},{title:"Blockquote",format:"blockquote"},{title:"Div",format:"div"},{title:"Pre",format:"pre"}]},{title:"Align",items:[{title:"Left",format:"alignleft"},{title:"Center",format:"aligncenter"},{title:"Right",format:"alignright"},{title:"Justify",format:"alignjustify"}]}],kE=function(t){return X(t,(function(t,e){if(xt(e,"items")){var n=kE(e.items);return{customFormats:t.customFormats.concat(n.customFormats),formats:t.formats.concat([{title:e.title,items:n.formats}])}}if(function(t){return xt(t,"inline")}(e)||function(t){return xt(t,"block")}(e)||function(t){return xt(t,"selector")}(e)){var r="custom-"+(o(e.name)?e.name:e.title.toLowerCase());return{customFormats:t.customFormats.concat([{name:r,format:e}]),formats:t.formats.concat([{title:e.title,format:r,icon:e.icon}])}}return O(O({},t),{formats:t.formats.concat(e)})}),{customFormats:[],formats:[]})},_E=function(t){return function(t){return B.from(t.getParam("style_formats")).filter(a)}(t).map((function(e){var n=function(t,e){var n=kE(e),r=function(e){W(e,(function(e){t.formatter.has(e.name)||t.formatter.register(e.name,e.format)}))};return t.formatter?r(n.customFormats):t.on("init",(function(){r(n.customFormats)})),n.formats}(t,e);return function(t){return t.getParam("style_formats_merge",!1,"boolean")}(t)?SE.concat(n):n})).getOr(SE)},OE=function(t,e,n){var r={type:"formatter",isSelected:e(t.format),getStylePreview:n(t.format)};return cr(t,r)},EE=function(t,e,n,r){var i=function(e){return j(e,(function(e){var a=lt(e);if(wt(e,"items")){var u=i(e.items);return cr(function(t){return cr(t,{type:"submenu"})}(e),{getStyleItems:v(u)})}return wt(e,"format")?function(t){return OE(t,n,r)}(e):1===a.length&&P(a,"title")?cr(e,{type:"separator"}):function(e){var i=o(e.name)?e.name:ia(e.title),a="custom-"+i,u={type:"formatter",format:a,isSelected:n(a),getStylePreview:r(a)},c=cr(e,u);return t.formatter.register(i,c),c}(e)}))};return i(e)},zE=function(t){var e=function(e){return function(){return t.formatter.match(e)}},n=function(e){return function(){var n=t.formatter.get(e);return void 0!==n?B.some({tag:n.length>0&&(n[0].inline||n[0].block)||"div",styles:t.dom.parseStyle(t.formatter.getCssText(e))}):B.none()}},r=function(t){var e=t.items;return void 0!==e&&e.length>0?Q(e,r):[t.format]},o=Co([]),i=Co([]),a=Co([]),u=Co([]),c=Co(!1);t.on("PreInit",(function(a){var u=_E(t),c=EE(t,u,e,n);o.set(c),i.set(Q(c,r))})),t.on("addStyleModifications",(function(o){var i=EE(t,o.items,e,n);a.set(i),c.set(o.replace),u.set(Q(i,r))}));return{getData:function(){var t=c.get()?[]:o.get(),e=a.get();return t.concat(e)},getFlattenedKeys:function(){var t=c.get()?[]:i.get(),e=u.get();return t.concat(e)}}},TE=wk.trim,ME=function(t){return function(e){if(function(t){return f(t)&&1===t.nodeType}(e)){if(e.contentEditable===t)return!0;if(e.getAttribute("data-mce-contenteditable")===t)return!0}return!1}},DE=ME("true"),AE=ME("false"),NE=function(t,e,n,r,o){return{type:t,title:e,url:n,level:r,attach:o}},BE=function(t){return t.innerText||t.textContent},RE=function(t){return function(t){return t&&"A"===t.nodeName&&void 0!==(t.id||t.name)}(t)&&LE(t)},HE=function(t){return t&&/^(H[1-6])$/.test(t.nodeName)},LE=function(t){return function(t){for(;t=t.parentNode;){var e=t.contentEditable;if(e&&"inherit"!==e)return DE(t)}return!1}(t)&&!AE(t)},VE=function(t){return HE(t)&&LE(t)},PE=function(t){var e=function(t){return t.id?t.id:ia("h")}(t);return NE("header",BE(t),"#"+e,function(t){return HE(t)?parseInt(t.nodeName.substr(1),10):0}(t),(function(){t.id=e}))},IE=function(t){var e=t.id||t.name,n=BE(t);return NE("anchor",n||"#"+e,"#"+e,0,h)},FE=function(t){var e,n;return e="h1,h2,h3,h4,h5,h6,a:not([href])",n=t,j(il(Bt.fromDom(n),e),(function(t){return t.dom}))},UE=function(t){return TE(t.title).length>0},jE=function(t){var e=FE(t);return G(function(t){return j(G(t,VE),PE)}(e).concat(function(t){return j(G(t,RE),IE)}(e)),UE)},WE="tinymce-url-history",qE=function(t){return o(t)&&/^https?/.test(t)},GE=function(t){return i(t)&&vt(t,(function(t){return!(a(e=t)&&e.length<=5&&Z(e,qE));var e})).isNone()},$E=function(){var t,e=Gy.getItem(WE);if(null===e)return{};try{t=JSON.parse(e)}catch(t){if(t instanceof SyntaxError)return console.log("Local storage "+WE+" was not valid JSON",t),{};throw t}return GE(t)?t:(console.log("Local storage "+WE+" was not valid format",t),{})},XE=function(t){var e=$E();return yt(e,t).getOr([])},KE=function(t,e){if(qE(t)){var n=$E(),r=yt(n,e).getOr([]),o=G(r,(function(e){return e!==t}));n[e]=[t].concat(o).slice(0,5),function(t){if(!GE(t))throw new Error("Bad format for history:\n"+JSON.stringify(t));Gy.setItem(WE,JSON.stringify(t))}(n)}},YE=function(t){return!!t},JE=function(t){return mt(wk.makeMap(t,/[, ]/),YE)},QE=function(t){return B.from(function(t){return t.getParam("file_picker_callback")}(t)).filter(d)},ZE=function(t,e){var n=function(t){var e=B.some(function(t){return t.getParam("file_picker_types")}(t)).filter(YE),n=B.some(function(t){return t.getParam("file_browser_callback_types")}(t)).filter(YE),r=e.or(n).map(JE);return QE(t).fold(S,(function(t){return r.fold(k,(function(t){return lt(t).length>0&&t}))}))}(t);return c(n)?n?QE(t):B.none():n[e]?QE(t):B.none()},tz=function(t){return B.from(t).filter(o).getOrUndefined()},ez=function(t){return{getHistory:XE,addToHistory:KE,getLinkInformation:function(){return function(t){return function(t){return!1===t.getParam("typeahead_urls")}(t)?B.none():B.some({targets:jE(t.getBody()),anchorTop:tz(Ib(t)),anchorBottom:tz(Fb(t))})}(t)},getValidationHandler:function(){return function(t){return B.from(function(t){var e=t.getParam("file_picker_validator_handler",void 0,"function");return void 0===e?t.getParam("filepicker_validator_handler",void 0,"function"):e}(t))}(t)},getUrlPicker:function(e){return function(t,e){return ZE(t,e).map((function(n){return function(r){return Tw((function(a){var u=O({filetype:e,fieldname:r.fieldname},B.from(r.meta).getOr({}));n.call(t,(function(t,e){if(!o(t))throw new Error("Expected value to be string");if(void 0!==e&&!i(e))throw new Error("Expected meta to be a object");a({value:t,meta:e})}),r.value,u)}))}}))}(t,e)}}},nz=function(t,e,n){var r=Co(!1),o=function(t){var e=Co(Ab(t)?"bottom":"top");return{isPositionedAtTop:function(){return"top"===e.get()},getDockingMode:e.get,setDockingMode:e.set}}(e),i={shared:{providers:{icons:function(){return e.ui.registry.getAll().icons},menuItems:function(){return e.ui.registry.getAll().menuItems},translate:yp.translate,isDisabled:function(){return e.mode.isReadOnly()||e.ui.isDisabled()},getSetting:e.getParam.bind(e)},interpreter:function(t){return function(t,e){return sE(uE,t,e)}(t,i)},anchors:hE(e,n,o.isPositionedAtTop),header:o,getSink:function(){return qn.value(t)}},urlinput:ez(e),styleselect:zE(e),colorinput:xE(e),dialog:CE(e),isContextMenuOpen:function(){return r.get()},setContextMenuState:function(t){return r.set(t)}};return i},rz=_d,oz=cd,iz=v([mo("shell",!1),Yr("makeItem"),mo("setupItem",h),Df("listBehaviours",[uh])]),az=id({name:"items",overrides:function(){return{behaviours:wc([uh.config({})])}}}),uz=v([az]),cz=v("CustomList"),sz=Ad({name:cz(),configFields:iz(),partFields:uz(),factory:function(t,e,n,r){var o=t.shell?{behaviours:[uh.config({})],components:[]}:{behaviours:[],components:e},i=function(e){return t.shell?B.some(e):vd(e,t,"items")};return{uid:t.uid,dom:t.dom,components:o.components,behaviours:Mf(t.listBehaviours,o.behaviours),apis:{setItems:function(e,n){i(e).fold((function(){throw console.error("Custom List was defined to not be a shell, but no item container was specified in components"),new Error("Custom List was defined to not be a shell, but no item container was specified in components")}),(function(r){var o=uh.contents(r),i=n.length,a=i-o.length,u=a>0?F(a,(function(){return t.makeItem()})):[],c=o.slice(i);W(c,(function(t){return uh.remove(r,t)})),W(u,(function(t){return uh.append(r,t)}));var s=uh.contents(r);W(s,(function(r,o){t.setupItem(e,r,n[o],o)}))}))}}}},apis:{setItems:function(t,e,n){t.setItems(e,n)}}}),lz=v([Yr("dom"),mo("shell",!0),zf("toolbarBehaviours",[uh])]),fz=v([id({name:"groups",overrides:function(){return{behaviours:wc([uh.config({})])}}})]),dz=Ad({name:"Toolbar",configFields:lz(),partFields:fz(),factory:function(t,e,n,r){var o=function(e){return t.shell?B.some(e):vd(e,t,"groups")},i=t.shell?{behaviours:[uh.config({})],components:[]}:{behaviours:[],components:e};return{uid:t.uid,dom:t.dom,components:i.components,behaviours:Mf(t.toolbarBehaviours,i.behaviours),apis:{setGroups:function(t,e){o(t).fold((function(){throw console.error("Toolbar was defined to not be a shell, but no groups container was specified in components"),new Error("Toolbar was defined to not be a shell, but no groups container was specified in components")}),(function(t){uh.set(t,e)}))}},domModification:{attributes:{role:"group"}}}},apis:{setGroups:function(t,e,n){t.setGroups(e,n)}}}),mz=h,gz=S,hz=v([]),pz=Object.freeze({__proto__:null,setup:mz,isDocked:gz,getBehaviours:hz}),vz=function(t){return(Ct(rn(t,"position"),"fixed")?B.none():Ee(t)).orThunk((function(){var e=Bt.fromTag("span");return Oe(t).bind((function(t){En(t,e);var n=Ee(e);return Mn(e),n}))}))},bz=function(t){return vz(t).map(pn).getOrThunk((function(){return gn(0,0)}))},yz=So([{static:[]},{absolute:["positionCss"]},{fixed:["positionCss"]}]),xz=function(t,e){var n=t.element;Va(n,e.transitionClass),Ia(n,e.fadeOutClass),Va(n,e.fadeInClass),e.onShow(t)},wz=function(t,e){var n=t.element;Va(n,e.transitionClass),Ia(n,e.fadeInClass),Va(n,e.fadeOutClass),e.onHide(t)},Cz=function(t,e,n){return Z(t,(function(t){switch(t){case"bottom":return function(t,e){return t.bottom<=e.bottom}(e,n);case"top":return function(t,e){return t.y>=e.y}(e,n)}}))},Sz=function(t,e){return e.getInitialPos().map((function(e){return Pn(e.bounds.x,e.bounds.y,yn(t),fn(t))}))},kz=function(t,e,n){return n.getInitialPos().bind((function(r){switch(n.clearInitialPos(),r.position){case"static":return B.some(yz.static());case"absolute":var o=vz(t).map(In).getOrThunk((function(){return In(Fe())}));return B.some(yz.absolute(Rc("absolute",yt(r.style,"left").map((function(t){return e.x-o.x})),yt(r.style,"top").map((function(t){return e.y-o.y})),yt(r.style,"right").map((function(t){return o.right-e.right})),yt(r.style,"bottom").map((function(t){return o.bottom-e.bottom})))));default:return B.none()}}))},_z=function(t,e,n){var r=In(t);if(Cz(n.getModes(),r,e))return B.none();!function(t,e,n){n.setInitialPos({style:on(t),position:en(t,"position")||"static",bounds:e})}(t,r,n);var o=Un(),i=r.x-o.x,a=e.y-o.y,u=o.bottom-e.bottom,c=r.y<=e.y;return B.some(yz.fixed(Rc("fixed",B.some(i),c?B.some(a):B.none(),B.none(),c?B.none():B.some(u))))},Oz=function(t,e,n){var r=t.element;return Ct(rn(r,"position"),"fixed")?function(t,e,n){return Sz(t,n).filter((function(t){return Cz(n.getModes(),t,e)})).bind((function(e){return kz(t,e,n)}))}(r,e,n):_z(r,e,n)},Ez=function(t,e,n){n.setDocked(!1),W(["left","right","top","bottom","position"],(function(e){return un(t.element,e)})),e.onUndocked(t)},zz=function(t,e,n,r){var o="fixed"===r.position;n.setDocked(o),Hc(t.element,r),(o?e.onDocked:e.onUndocked)(t)},Tz=function(t,e,n,r,o){void 0===o&&(o=!1),e.contextual.each((function(e){e.lazyContext(t).each((function(i){var a=function(t,e){return t.y<e.bottom&&t.bottom>e.y}(i,r);a!==n.isVisible()&&(n.setVisible(a),o&&!a?(Ua(t.element,[e.fadeOutClass]),e.onHide(t)):(a?xz:wz)(t,e))}))}))},Mz=function(t,e,n){var r=t.element;n.setDocked(!1),function(t,e){var n=t.element;return Sz(n,e).bind((function(t){return kz(n,t,e)}))}(t,n).each((function(r){r.fold((function(){return Ez(t,e,n)}),(function(r){return zz(t,e,n,r)}),h)})),n.setVisible(!0),e.contextual.each((function(e){ja(r,[e.fadeInClass,e.fadeOutClass,e.transitionClass]),e.onShow(t)})),Dz(t,e,n)},Dz=function(t,e,n){t.getSystem().isConnected()&&function(t,e,n){var r=e.lazyViewport(t);n.isDocked()&&Tz(t,e,n,r),Oz(t,r,n).each((function(o){o.fold((function(){return Ez(t,e,n)}),(function(r){return zz(t,e,n,r)}),(function(o){Tz(t,e,n,r,!0),zz(t,e,n,o)}))}))}(t,e,n)},Az=function(t,e,n){n.isDocked()&&Mz(t,e,n)},Nz=Object.freeze({__proto__:null,refresh:Dz,reset:Az,isDocked:function(t,e,n){return n.isDocked()},getModes:function(t,e,n){return n.getModes()},setModes:function(t,e,n,r){return n.setModes(r)}}),Bz=Object.freeze({__proto__:null,events:function(t,e){return Hi([Gi(ti(),(function(n,r){t.contextual.each((function(t){Fa(n.element,t.transitionClass)&&(ja(n.element,[t.transitionClass,t.fadeInClass]),(e.isVisible()?t.onShown:t.onHidden)(n));r.stop()}))})),Pi(bi(),(function(n,r){Dz(n,t,e)})),Pi(yi(),(function(n,r){Az(n,t,e)}))])}}),Rz=[fo("contextual",[Zr("fadeInClass"),Zr("fadeOutClass"),Zr("transitionClass"),eo("lazyContext"),zu("onShow"),zu("onShown"),zu("onHide"),zu("onHidden")]),yo("lazyViewport",Un),xo("modes",["top","bottom"],Nr),zu("onDocked"),zu("onUndocked")],Hz=Sc({fields:Rz,name:"docking",active:Bz,apis:Nz,state:Object.freeze({__proto__:null,init:function(t){var e=Co(!1),n=Co(!0),r=ts(),o=Co(t.modes);return Ca({isDocked:e.get,setDocked:e.set,getInitialPos:r.get,setInitialPos:r.set,clearInitialPos:r.clear,isVisible:n.get,setVisible:n.set,getModes:o.get,setModes:o.set,readState:function(){return"docked:  "+e.get()+", visible: "+n.get()+", modes: "+o.get().join(",")}})}})}),Lz=v(ia("toolbar-height-change")),Vz={fadeInClass:"tox-editor-dock-fadein",fadeOutClass:"tox-editor-dock-fadeout",transitionClass:"tox-editor-dock-transition"},Pz="tox-tinymce--toolbar-sticky-on",Iz="tox-tinymce--toolbar-sticky-off",Fz=function(t,e){return P(Hz.getModes(t),e)},Uz=function(t){var e=t.element;Oe(e).each((function(n){var r="padding-"+Hz.getModes(t)[0];if(Hz.isDocked(t)){var o=yn(n);Qe(e,"width",o+"px"),Qe(n,r,function(t){return dn(t)+(parseInt(en(t,"margin-top"),10)||0)+(parseInt(en(t,"margin-bottom"),10)||0)}(e)+"px")}else un(e,"width"),un(n,r)}))},jz=function(t,e){e?(Ia(t,Vz.fadeOutClass),Ua(t,[Vz.transitionClass,Vz.fadeInClass])):(Ia(t,Vz.fadeInClass),Ua(t,[Vz.fadeOutClass,Vz.transitionClass]))},Wz=function(t,e){var n=Bt.fromDom(t.getContainer());e?(Va(n,Pz),Ia(n,Iz)):(Va(n,Iz),Ia(n,Pz))},qz=function(t,e){var n=ts(),r=e.getSink,o=function(t){r().each((function(e){return t(e.element)}))},i=function(e){t.inline||Uz(e),Wz(t,Hz.isDocked(e)),e.getSystem().broadcastOn([sf()],{}),r().each((function(t){return t.getSystem().broadcastOn([sf()],{})}))},a=t.inline?[]:function(){var t;return[Ec.config({channels:(t={},t[Lz()]={onReceive:Uz},t)})]}();return z([mh.config({}),Hz.config({contextual:O({lazyContext:function(e){var n=dn(e.element),r=t.inline?t.getContentAreaContainer():t.getContainer(),o=In(Bt.fromDom(r)),i=o.height-n,a=o.y+(Fz(e,"top")?0:n);return B.some(Pn(o.x,a,o.width,i))},onShow:function(){o((function(t){return jz(t,!0)}))},onShown:function(t){o((function(t){return ja(t,[Vz.transitionClass,Vz.fadeInClass])})),n.get().each((function(e){var r,o,i;r=t.element,i=Ce(o=e),Ac(i).filter((function(t){return!ye(o,t)})).filter((function(t){return ye(t,Bt.fromDom(i.dom.body))||we(r,t)})).each((function(){return Mc(o)})),n.clear()}))},onHide:function(t){(function(t,e){return Nc(t).orThunk((function(){return e().toOptional().bind((function(t){return Nc(t.element)}))}))})(t.element,r).fold(n.clear,n.set),o((function(t){return jz(t,!1)}))},onHidden:function(){o((function(t){return ja(t,[Vz.transitionClass])}))}},Vz),lazyViewport:function(e){var n=Un(),r=function(t){return t.getParam("toolbar_sticky_offset",0,"number")}(t),o=n.y+(Fz(e,"top")?r:0),i=n.height-(Fz(e,"bottom")?r:0);return Pn(n.x,o,n.width,i)},modes:[e.header.getDockingMode()],onDocked:i,onUndocked:i})],a,!0)},Gz=Object.freeze({__proto__:null,setup:function(t,e,n){t.inline||(e.header.isPositionedAtTop()||t.on("ResizeEditor",(function(){n().each(Hz.reset)})),t.on("ResizeWindow ResizeEditor",(function(){n().each(Uz)})),t.on("SkinLoaded",(function(){n().each((function(t){Hz.isDocked(t)?Hz.reset(t):Hz.refresh(t)}))})),t.on("FullscreenStateChanged",(function(){n().each(Hz.reset)}))),t.on("AfterScrollIntoView",(function(t){n().each((function(e){Hz.refresh(e);var n=e.element;Ym(n)&&function(t,e){var n=Ce(e),r=n.dom.defaultView.innerHeight,o=An(n),i=Bt.fromDom(t.elm),a=Fn(i),u=fn(i),c=a.y,s=c+u,l=pn(e),f=fn(e),d=l.top,m=d+f,g=Math.abs(d-o.top)<2,h=Math.abs(m-(o.top+r))<2;if(g&&c<m)Nn(o.left,c-f,n);else if(h&&s>d){var p=c-r+u+f;Nn(o.left,p,n)}}(t,n)}))})),t.on("PostRender",(function(){Wz(t,!1)}))},isDocked:function(t){return t().map(Hz.isDocked).getOr(!1)},getBehaviours:qz}),$z=_r([Zr("type"),Jr("items",Er([Tr([Zr("name"),oo("items",Nr)]),Nr]))].concat(tv)),Xz=[co("text"),co("tooltip"),co("icon"),eo("fetch"),yo("onSetup",(function(){return h}))],Kz=_r(z([Zr("type")],Xz,!0)),Yz=function(t){return Ur("menubutton",Kz,t)},Jz=_r([Zr("type"),co("tooltip"),co("icon"),co("text"),so("select"),eo("fetch"),yo("onSetup",(function(){return h})),vo("presets","normal",["normal","color","listpreview"]),mo("columns",1),eo("onAction"),eo("onItemAction")]),Qz=Dd({factory:function(t,e){var n={focus:nh.focusIn,setMenus:function(t,n){var r=j(n,(function(t){var n={type:"menubutton",text:t.text,fetch:function(e){e(t.getItems())}},r=Yz(n).mapError((function(t){return qr(t)})).getOrDie();return U_(r,"tox-mbtn",e.backstage,B.some("menuitem"))}));uh.set(t,r)}};return{uid:t.uid,dom:t.dom,components:[],behaviours:wc([uh.config({}),ch("menubar-events",[$i((function(e){t.onSetup(e)})),Pi(qo(),(function(t,e){lu(t.element,".tox-mbtn--active").each((function(n){fu(e.event.target,".tox-mbtn").each((function(e){ye(n,e)||t.getSystem().getByDom(n).each((function(n){t.getSystem().getByDom(e).each((function(t){uC.expand(t),uC.close(n),mh.focus(t)}))}))}))}))})),Pi(ki(),(function(t,e){e.event.prevFocus.bind((function(e){return t.getSystem().getByDom(e).toOptional()})).each((function(n){e.event.newFocus.bind((function(e){return t.getSystem().getByDom(e).toOptional()})).each((function(t){uC.isOpen(n)&&(uC.expand(t),uC.close(n))}))}))}))]),nh.config({mode:"flow",selector:".tox-mbtn",onEscape:function(e){return t.onEscape(e),B.some(!0)}}),tw.config({})]),apis:n,domModification:{attributes:{role:"menubar"}}}},name:"silver.Menubar",configFields:[Yr("dom"),Yr("uid"),Yr("onEscape"),Yr("backstage"),mo("onSetup",h)],apis:{focus:function(t,e){t.focus(e)},setMenus:function(t,e,n){t.setMenus(e,n)}}}),Zz=function(t,e){return e.getAnimationRoot.fold((function(){return t.element}),(function(e){return e(t)}))},tT=function(t){return t.dimension.property},eT=function(t,e){return t.dimension.getDimension(e)},nT=function(t,e){var n=Zz(t,e);ja(n,[e.shrinkingClass,e.growingClass])},rT=function(t,e){Ia(t.element,e.openClass),Va(t.element,e.closedClass),Qe(t.element,tT(e),"0px"),cn(t.element)},oT=function(t,e){Ia(t.element,e.closedClass),Va(t.element,e.openClass),un(t.element,tT(e))},iT=function(t,e,n,r){n.setCollapsed(),Qe(t.element,tT(e),eT(e,t.element)),cn(t.element),nT(t,e),rT(t,e),e.onStartShrink(t),e.onShrunk(t)},aT=function(t,e,n,r){var o=r.getOrThunk((function(){return eT(e,t.element)}));n.setCollapsed(),Qe(t.element,tT(e),o),cn(t.element);var i=Zz(t,e);Ia(i,e.growingClass),Va(i,e.shrinkingClass),rT(t,e),e.onStartShrink(t)},uT=function(t,e,n){var r=eT(e,t.element);("0px"===r?iT:aT)(t,e,n,B.some(r))},cT=function(t,e,n){var r=Zz(t,e),o=Fa(r,e.shrinkingClass),i=eT(e,t.element);oT(t,e);var a=eT(e,t.element);(o?function(){Qe(t.element,tT(e),i),cn(t.element)}:function(){rT(t,e)})(),Ia(r,e.shrinkingClass),Va(r,e.growingClass),oT(t,e),Qe(t.element,tT(e),a),n.setExpanded(),e.onStartGrow(t)},sT=function(t,e,n){var r=Zz(t,e);return!0===Fa(r,e.growingClass)},lT=function(t,e,n){var r=Zz(t,e);return!0===Fa(r,e.shrinkingClass)},fT=Object.freeze({__proto__:null,refresh:function(t,e,n){if(n.isExpanded()){un(t.element,tT(e));var r=eT(e,t.element);Qe(t.element,tT(e),r)}},grow:function(t,e,n){n.isExpanded()||cT(t,e,n)},shrink:function(t,e,n){n.isExpanded()&&uT(t,e,n)},immediateShrink:function(t,e,n){n.isExpanded()&&iT(t,e,n)},hasGrown:function(t,e,n){return n.isExpanded()},hasShrunk:function(t,e,n){return n.isCollapsed()},isGrowing:sT,isShrinking:lT,isTransitioning:function(t,e,n){return sT(t,e)||lT(t,e)},toggleGrow:function(t,e,n){(n.isExpanded()?uT:cT)(t,e,n)},disableTransitions:nT}),dT=Object.freeze({__proto__:null,exhibit:function(t,e,n){var r=e.expanded;return ka(r?{classes:[e.openClass],styles:{}}:{classes:[e.closedClass],styles:Oo(e.dimension.property,"0px")})},events:function(t,e){return Hi([Gi(ti(),(function(n,r){r.event.raw.propertyName===t.dimension.property&&(nT(n,t),e.isExpanded()&&un(n.element,t.dimension.property),(e.isExpanded()?t.onGrown:t.onShrunk)(n))}))])}}),mT=[Yr("closedClass"),Yr("openClass"),Yr("shrinkingClass"),Yr("growingClass"),io("getAnimationRoot"),zu("onShrunk"),zu("onStartShrink"),zu("onGrown"),zu("onStartGrow"),mo("expanded",!1),Jr("dimension",Gr("property",{width:[Au("property","width"),Au("getDimension",(function(t){return yn(t)+"px"}))],height:[Au("property","height"),Au("getDimension",(function(t){return fn(t)+"px"}))]}))],gT=Sc({fields:mT,name:"sliding",active:dT,apis:fT,state:Object.freeze({__proto__:null,init:function(t){var e=Co(t.expanded);return Ca({isExpanded:function(){return!0===e.get()},isCollapsed:function(){return!1===e.get()},setCollapsed:x(e.set,!1),setExpanded:x(e.set,!0),readState:function(){return"expanded: "+e.get()}})}})}),hT="container",pT=[zf("slotBehaviours",[])],vT=function(t){return"<alloy.field."+t+">"},bT=function(t,e){var n,r=function(e){return wd(t)},o=function(e,n){return function(r,o){return vd(r,t,o).map((function(t){return e(t,o)})).getOr(n)}},i=function(t,e){return"true"!==Ge(t.element,"aria-hidden")},a=o(i,!1),u=o((function(t,e){if(i(t)){var n=t.element;Qe(n,"display","none"),We(n,"aria-hidden","true"),Di(t,_i(),{name:e,visible:!1})}})),c=(n=u,function(t,e){W(e,(function(e){return n(t,e)}))}),s=o((function(t,e){if(!i(t)){var n=t.element;un(n,"display"),Ke(n,"aria-hidden"),Di(t,_i(),{name:e,visible:!0})}})),l={getSlotNames:r,getSlot:function(e,n){return vd(e,t,n)},isShowing:a,hideSlot:u,hideAllSlots:function(t){return c(t,r())},showSlot:s};return{uid:t.uid,dom:t.dom,components:e,behaviours:Tf(t.slotBehaviours),apis:l}},yT=mt({getSlotNames:function(t,e){return t.getSlotNames(e)},getSlot:function(t,e,n){return t.getSlot(e,n)},isShowing:function(t,e,n){return t.isShowing(e,n)},hideSlot:function(t,e,n){return t.hideSlot(e,n)},hideAllSlots:function(t,e){return t.hideAllSlots(e)},showSlot:function(t,e,n){return t.showSlot(e,n)}},(function(t){return xa(t)})),xT=O(O({},yT),{sketch:function(t){var e=function(){var t=[];return{slot:function(e,n){return t.push(e),dd(hT,vT(e),n)},record:v(t)}}(),n=t(e),r=e.record(),o=j(r,(function(t){return rd({name:t,pname:vT(t)})}));return Ed(hT,pT,o,bT,n)}}),wT=_r([co("icon"),co("tooltip"),yo("onShow",h),yo("onHide",h),yo("onSetup",(function(){return h}))]),CT=function(t){return{element:function(){return t.element.dom}}},ST=function(t,e){var n=j(lt(e),(function(t){var n=e[t],r=jr(function(t){return Ur("sidebar",wT,t)}(n));return{name:t,getApi:CT,onSetup:r.onSetup,onShow:r.onShow,onHide:r.onHide}}));return j(n,(function(e){var r=Co(h);return t.slot(e.name,{dom:{tag:"div",classes:["tox-sidebar__pane"]},behaviours:ab([Qb(e,r),Zb(e,r),Pi(_i(),(function(t,e){var r=e.event;K(n,(function(t){return t.name===r.name})).each((function(e){(r.visible?e.onShow:e.onHide)(e.getApi(t))}))}))])})}))},kT=function(t){return xT.sketch((function(e){return{dom:{tag:"div",classes:["tox-sidebar__pane-container"]},components:ST(e,t),slotBehaviours:ab([$i((function(t){return xT.hideAllSlots(t)}))])}}))},_T=function(t){return Hd.getCurrent(t).bind((function(t){return gT.isGrowing(t)||gT.hasGrown(t)?Hd.getCurrent(t).bind((function(t){return K(xT.getSlotNames(t),(function(e){return xT.isShowing(t,e)}))})):B.none()}))},OT=ia("FixSizeEvent"),ET=ia("AutoSizeEvent"),zT=Object.freeze({__proto__:null,block:function(t,e,n,r){We(t.element,"aria-busy",!0);var o=e.getRoot(t).getOr(t),i=wc([nh.config({mode:"special",onTab:function(){return B.some(!0)},onShiftTab:function(){return B.some(!0)}}),mh.config({})]),a=r(o,i),u=o.getSystem().build(a);uh.append(o,nu(u)),u.hasConfigured(nh)&&e.focus&&nh.focusIn(u),n.isBlocked()||e.onBlock(t),n.blockWith((function(){return uh.remove(o,u)}))},unblock:function(t,e,n){Ke(t.element,"aria-busy"),n.isBlocked()&&e.onUnblock(t),n.clear()}}),TT=[yo("getRoot",B.none),bo("focus",!0),zu("onBlock"),zu("onUnblock")],MT=Sc({fields:TT,name:"blocking",apis:zT,state:Object.freeze({__proto__:null,init:function(){var t=Qc();return Ca({readState:t.isSet,blockWith:function(e){t.set({destroy:e})},clear:t.clear,isBlocked:t.isSet})}})}),DT=function(t){var e=Bt.fromHtml(t),n=ze(e),r=function(t){var e=void 0!==t.dom.attributes?t.dom.attributes:[];return X(e,(function(t,e){var n;return"class"===e.name?t:O(O({},t),((n={})[e.name]=e.value,n))}),{})}(e),o=function(t){return Array.prototype.slice.call(t.dom.classList,0)}(e),i=0===n.length?{}:{innerHtml:Ji(e)};return O({tag:Ht(e),classes:o,attributes:r},i)},AT=function(t){return Hd.getCurrent(t).each((function(t){return Mc(t.element)}))},NT=function(t,e,n,r){var o=e.element;if(function(t,e){var n="tabindex",r="data-mce-tabindex";B.from(t.iframeElement).map(Bt.fromDom).each((function(t){e?($e(t,n).each((function(e){return We(t,r,e)})),We(t,n,-1)):(Ke(t,n),$e(t,r).each((function(e){We(t,n,e),Ke(t,r)})))}))}(t,n),n)MT.block(e,function(t){return function(e,n){return{dom:{tag:"div",attributes:{"aria-label":t.translate("Loading..."),tabindex:"0"},classes:["tox-throbber__busy-spinner"]},components:[{dom:DT('<div class="tox-spinner"><div></div><div></div><div></div></div>')}]}}}(r)),un(o,"display"),Ke(o,"aria-hidden"),t.hasFocus()&&AT(e);else{var i=Hd.getCurrent(e).exists((function(t){return Dc(t.element)}));MT.unblock(e),Qe(o,"display","none"),We(o,"aria-hidden","true"),i&&t.focus()}},BT=function(t,e,n){var r=Co(!1),o=ts(),i=function(n){var o;!r.get()||function(t){return"focusin"===t.type}(o=n)&&(o.composed?at(o.composedPath()):B.from(o.target)).map(Bt.fromDom).filter(Vt).exists((function(t){return Fa(t,"mce-pastebin")}))||(n.preventDefault(),AT(e()),t.editorManager.setActive(t))};t.inline||t.on("PreInit",(function(){t.dom.bind(t.getWin(),"focusin",i),t.on("BeforeExecCommand",(function(t){"mcefocus"===t.command.toLowerCase()&&!0!==t.value&&i(t)}))}));var a=function(o){o!==r.get()&&(r.set(o),NT(t,e(),o,n.providers),t.fire("AfterProgressState",{state:o}))};t.on("ProgressState",(function(e){if(o.on(pp.clearTimeout),m(e.time)){var n=pp.setEditorTimeout(t,(function(){return a(e.state)}),e.time);o.set(n)}else a(e.state),o.clear()}))},RT=function(t,e,n){return{within:t,extra:e,withinWidth:n}},HT=function(t,e,n){var r,o=(r=function(t,e){var r=n(t);return B.some({element:t,start:e,finish:e+r,width:r})},X(t,(function(t,e){return r(e,t.len).fold(v(t),(function(e){return{len:e.finish,list:t.list.concat([e])}}))}),{len:0,list:[]}).list),i=G(o,(function(t){return t.finish<=e})),a=$(i,(function(t,e){return t+e.width}),0);return{within:i,extra:o.slice(i.length),withinWidth:a}},LT=function(t){return j(t,(function(t){return t.element}))},VT=function(t,e,n,r){var o=function(t,e,n){var r=HT(e,t,n);return 0===r.extra.length?B.some(r):B.none()}(t,e,n).getOrThunk((function(){return HT(e,t-n(r),n)})),i=o.within,a=o.extra,u=o.withinWidth;return 1===a.length&&a[0].width<=n(r)?function(t,e,n){var r=LT(t.concat(e));return RT(r,[],n)}(i,a,u):a.length>=1?function(t,e,n,r){var o=LT(t).concat([n]);return RT(o,LT(e),r)}(i,a,r,u):function(t,e,n){return RT(LT(t),[],n)}(i,0,u)},PT=function(t,e){var n=j(e,(function(t){return nu(t)}));dz.setGroups(t,n)},IT=function(t,e,n){var r=e.builtGroups.get();if(0!==r.length){var o=bd(t,e,"primary"),i=jw.getCoupled(t,"overflowGroup");Qe(o.element,"visibility","hidden");var a=r.concat([i]),u=st(a,(function(t){return Nc(t.element).bind((function(e){return t.getSystem().getByDom(e).toOptional()}))}));n([]),PT(o,a);var c=yn(o.element),s=VT(c,e.builtGroups.get(),(function(t){return yn(t.element)}),i);0===s.extra.length?(uh.remove(o,i),n([])):(PT(o,s.within),n(s.extra)),un(o.element,"visibility"),cn(o.element),u.each(mh.focus)}},FT=v([zf("splitToolbarBehaviours",[jw]),Xr("builtGroups",(function(){return Co([])}))]),UT=v([Ou(["overflowToggledClass"]),so("getOverflowBounds"),Yr("lazySink"),Xr("overflowGroups",(function(){return Co([])}))].concat(FT())),jT=v([rd({factory:dz,schema:lz(),name:"primary"}),od({schema:lz(),name:"overflow"}),od({name:"overflow-button"}),od({name:"overflow-group"})]),WT=v((function(t,e){!function(t,e){var n=bn.max(t,e,["margin-left","border-left-width","padding-left","padding-right","border-right-width","margin-right"]);Qe(t,"max-width",n+"px")}(t,Math.floor(e))})),qT=v([Ou(["toggledClass"]),Yr("lazySink"),eo("fetch"),so("getBounds"),fo("fireDismissalEventInstead",[mo("event",Ci())]),Os()]),GT=v([od({name:"button",overrides:function(t){return{dom:{attributes:{"aria-haspopup":"true"}},buttonBehaviours:wc([_h.config({toggleClass:t.markers.toggledClass,aria:{mode:"expanded"},toggleOnExecute:!1})])}}}),od({factory:dz,schema:lz(),name:"toolbar",overrides:function(t){return{toolbarBehaviours:wc([nh.config({mode:"cyclic",onEscape:function(e){return vd(e,t,"button").each(mh.focus),B.none()}})])}}})]),$T=function(t,e){var n=jw.getCoupled(t,"toolbarSandbox");uf.isOpen(n)?uf.close(n):uf.open(n,e.toolbar())},XT=function(t,e,n,r){var o=n.getBounds.map((function(t){return t()})),i=n.lazySink(t).getOrDie();Vl.positionWithinBounds(i,e,{anchor:{type:"hotspot",hotspot:t,layouts:r,overrides:{maxWidthFunction:WT()}}},o)},KT=function(t,e,n,r,o){dz.setGroups(e,o),XT(t,e,n,r),_h.on(t)},YT=Ad({name:"FloatingToolbarButton",factory:function(t,e,n,r){return O(O({},vp.sketch(O(O({},r.button()),{action:function(t){$T(t,r)},buttonBehaviours:Af({dump:r.button().buttonBehaviours},[jw.config({others:{toolbarSandbox:function(e){return function(t,e,n){var r=du();return{dom:{tag:"div",attributes:{id:r.id}},behaviours:wc([nh.config({mode:"special",onEscape:function(t){return uf.close(t),B.some(!0)}}),uf.config({onOpen:function(o,i){n.fetch().get((function(o){KT(t,i,n,e.layouts,o),r.link(t.element),nh.focusIn(i)}))},onClose:function(){_h.off(t),mh.focus(t),r.unlink(t.element)},isPartOf:function(e,n,r){return gu(n,r)||gu(t,r)},getAttachPoint:function(){return n.lazySink(t).getOrDie()}}),Ec.config({channels:O(O({},df(O({isExtraPart:S},n.fireDismissalEventInstead.map((function(t){return{fireEventInstead:{event:t.event}}})).getOr({})))),gf({doReposition:function(){uf.getState(jw.getCoupled(t,"toolbarSandbox")).each((function(r){XT(t,r,n,e.layouts)}))}}))})])}}(e,n,t)}}})])}))),{apis:{setGroups:function(e,r){uf.getState(jw.getCoupled(e,"toolbarSandbox")).each((function(o){KT(e,o,t,n.layouts,r)}))},reposition:function(e){uf.getState(jw.getCoupled(e,"toolbarSandbox")).each((function(r){XT(e,r,t,n.layouts)}))},toggle:function(t){$T(t,r)},getToolbar:function(t){return uf.getState(jw.getCoupled(t,"toolbarSandbox"))},isOpen:function(t){return uf.isOpen(jw.getCoupled(t,"toolbarSandbox"))}}})},configFields:qT(),partFields:GT(),apis:{setGroups:function(t,e,n){t.setGroups(e,n)},reposition:function(t,e){t.reposition(e)},toggle:function(t,e){t.toggle(e)},getToolbar:function(t,e){return t.getToolbar(e)},isOpen:function(t,e){return t.isOpen(e)}}}),JT=v([Yr("items"),Ou(["itemSelector"]),zf("tgroupBehaviours",[nh])]),QT=v([ad({name:"items",unit:"item"})]),ZT=Ad({name:"ToolbarGroup",configFields:JT(),partFields:QT(),factory:function(t,e,n,r){return{uid:t.uid,dom:t.dom,components:e,behaviours:Mf(t.tgroupBehaviours,[nh.config({mode:"flow",selector:t.markers.itemSelector})]),domModification:{attributes:{role:"toolbar"}}}}}),tM=function(t){return j(t,(function(t){return nu(t)}))},eM=function(t,e,n){IT(t,n,(function(r){n.overflowGroups.set(r),e.getOpt(t).each((function(t){YT.setGroups(t,tM(r))}))}))},nM=Ad({name:"SplitFloatingToolbar",configFields:UT(),partFields:jT(),factory:function(t,e,n,r){var o=bp(YT.sketch({fetch:function(){return Tw((function(e){e(tM(t.overflowGroups.get()))}))},layouts:{onLtr:function(){return[nc,ec]},onRtl:function(){return[ec,nc]},onBottomLtr:function(){return[oc,rc]},onBottomRtl:function(){return[rc,oc]}},getBounds:n.getOverflowBounds,lazySink:t.lazySink,fireDismissalEventInstead:{},markers:{toggledClass:t.markers.overflowToggledClass},parts:{button:r["overflow-button"](),toolbar:r.overflow()}}));return{uid:t.uid,dom:t.dom,components:e,behaviours:Mf(t.splitToolbarBehaviours,[jw.config({others:{overflowGroup:function(){return ZT.sketch(O(O({},r["overflow-group"]()),{items:[o.asSpec()]}))}}})]),apis:{setGroups:function(e,n){t.builtGroups.set(j(n,e.getSystem().build)),eM(e,o,t)},refresh:function(e){return eM(e,o,t)},toggle:function(t){o.getOpt(t).each((function(t){YT.toggle(t)}))},isOpen:function(t){return o.getOpt(t).map(YT.isOpen).getOr(!1)},reposition:function(t){o.getOpt(t).each((function(t){YT.reposition(t)}))},getOverflow:function(t){return o.getOpt(t).bind(YT.getToolbar)}},domModification:{attributes:{role:"group"}}}},apis:{setGroups:function(t,e,n){t.setGroups(e,n)},refresh:function(t,e){t.refresh(e)},reposition:function(t,e){t.reposition(e)},toggle:function(t,e){t.toggle(e)},isOpen:function(t,e){return t.isOpen(e)},getOverflow:function(t,e){return t.getOverflow(e)}}}),rM=v([Ou(["closedClass","openClass","shrinkingClass","growingClass","overflowToggledClass"]),zu("onOpened"),zu("onClosed")].concat(FT())),oM=v([rd({factory:dz,schema:lz(),name:"primary"}),rd({factory:dz,schema:lz(),name:"overflow",overrides:function(t){return{toolbarBehaviours:wc([gT.config({dimension:{property:"height"},closedClass:t.markers.closedClass,openClass:t.markers.openClass,shrinkingClass:t.markers.shrinkingClass,growingClass:t.markers.growingClass,onShrunk:function(e){vd(e,t,"overflow-button").each((function(t){_h.off(t),mh.focus(t)})),t.onClosed(e)},onGrown:function(e){nh.focusIn(e),t.onOpened(e)},onStartGrow:function(e){vd(e,t,"overflow-button").each(_h.on)}}),nh.config({mode:"acyclic",onEscape:function(e){return vd(e,t,"overflow-button").each(mh.focus),B.some(!0)}})])}}}),od({name:"overflow-button",overrides:function(t){return{buttonBehaviours:wc([_h.config({toggleClass:t.markers.overflowToggledClass,aria:{mode:"pressed"},toggleOnExecute:!1})])}}}),od({name:"overflow-group"})]),iM=function(t,e){vd(t,e,"overflow-button").bind((function(){return vd(t,e,"overflow")})).each((function(n){aM(t,e),gT.toggleGrow(n)}))},aM=function(t,e){vd(t,e,"overflow").each((function(n){IT(t,e,(function(t){var e=j(t,(function(t){return nu(t)}));dz.setGroups(n,e)})),vd(t,e,"overflow-button").each((function(t){gT.hasGrown(n)&&_h.on(t)})),gT.refresh(n)}))},uM=Ad({name:"SplitSlidingToolbar",configFields:rM(),partFields:oM(),factory:function(t,e,n,r){var o="alloy.toolbar.toggle";return{uid:t.uid,dom:t.dom,components:e,behaviours:Mf(t.splitToolbarBehaviours,[jw.config({others:{overflowGroup:function(t){return ZT.sketch(O(O({},r["overflow-group"]()),{items:[vp.sketch(O(O({},r["overflow-button"]()),{action:function(e){Mi(t,o)}}))]}))}}}),ch("toolbar-toggle-events",[Pi(o,(function(e){iM(e,t)}))])]),apis:{setGroups:function(e,n){!function(e,n){var r=j(n,e.getSystem().build);t.builtGroups.set(r)}(e,n),aM(e,t)},refresh:function(e){return aM(e,t)},toggle:function(e){return iM(e,t)},isOpen:function(e){return function(t,e){return vd(t,e,"overflow").map(gT.hasGrown).getOr(!1)}(e,t)}},domModification:{attributes:{role:"group"}}}},apis:{setGroups:function(t,e,n){t.setGroups(e,n)},refresh:function(t,e){t.refresh(e)},toggle:function(t,e){t.toggle(e)},isOpen:function(t,e){return t.isOpen(e)}}}),cM=function(t){var e=t.title.fold((function(){return{}}),(function(t){return{attributes:{title:t}}}));return{dom:O({tag:"div",classes:["tox-toolbar__group"]},e),components:[ZT.parts.items({})],items:t.items,markers:{itemSelector:"*:not(.tox-split-button) > .tox-tbtn:not([disabled]), .tox-split-button:not([disabled]), .tox-toolbar-nav-js:not([disabled])"},tgroupBehaviours:wc([tw.config({}),mh.config({})])}},sM=function(t){return ZT.sketch(cM(t))},lM=function(t,e){var n=$i((function(e){var n=j(t.initGroups,sM);dz.setGroups(e,n)}));return wc([Yb(t.providers.isDisabled),Gb(),nh.config({mode:e,onEscape:t.onEscape,selector:".tox-toolbar__group"}),ch("toolbar-events",[n])])},fM=function(t){var e=t.cyclicKeying?"cyclic":"acyclic";return{uid:t.uid,dom:{tag:"div",classes:["tox-toolbar-overlord"]},parts:{"overflow-group":cM({title:B.none(),items:[]}),"overflow-button":q_({name:"more",icon:B.some("more-drawer"),disabled:!1,tooltip:B.some("More..."),primary:!1,borderless:!1},B.none(),t.providers)},splitToolbarBehaviours:lM(t,e)}},dM=function(t){var e=fM(t),n=nM.parts.primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}});return nM.sketch(O(O({},e),{lazySink:t.getSink,getOverflowBounds:function(){var e=t.moreDrawerData.lazyHeader().element,n=Fn(e),r=ke(e),o=Fn(r),i=Math.max(r.dom.scrollHeight,o.height);return Pn(n.x+4,o.y,n.width-8,i)},parts:O(O({},e.parts),{overflow:{dom:{tag:"div",classes:["tox-toolbar__overflow"],attributes:t.attributes}}}),components:[n],markers:{overflowToggledClass:"tox-tbtn--enabled"}}))},mM=function(t){var e=uM.parts.primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}}),n=uM.parts.overflow({dom:{tag:"div",classes:["tox-toolbar__overflow"]}}),r=fM(t);return uM.sketch(O(O({},r),{components:[e,n],markers:{openClass:"tox-toolbar__overflow--open",closedClass:"tox-toolbar__overflow--closed",growingClass:"tox-toolbar__overflow--growing",shrinkingClass:"tox-toolbar__overflow--shrinking",overflowToggledClass:"tox-tbtn--enabled"},onOpened:function(t){t.getSystem().broadcastOn([Lz()],{type:"opened"})},onClosed:function(t){t.getSystem().broadcastOn([Lz()],{type:"closed"})}}))},gM=function(t){var e=t.cyclicKeying?"cyclic":"acyclic";return dz.sketch({uid:t.uid,dom:{tag:"div",classes:["tox-toolbar"].concat(t.type===hv.scrolling?["tox-toolbar--scrolling"]:[])},components:[dz.parts.groups({})],toolbarBehaviours:lM(t,e)})},hM=oz.optional({factory:Qz,name:"menubar",schema:[Yr("backstage")]}),pM=oz.optional({factory:{sketch:function(t){return sz.sketch({uid:t.uid,dom:t.dom,listBehaviours:wc([nh.config({mode:"acyclic",selector:".tox-toolbar"})]),makeItem:function(){return gM({type:t.type,uid:ia("multiple-toolbar-item"),cyclicKeying:!1,initGroups:[],providers:t.providers,onEscape:function(){return t.onEscape(),B.some(!0)}})},setupItem:function(t,e,n,r){dz.setGroups(e,n)},shell:!0})}},name:"multiple-toolbar",schema:[Yr("dom"),Yr("onEscape")]}),vM=oz.optional({factory:{sketch:function(t){return function(t){return t.type===hv.sliding?mM:t.type===hv.floating?dM:gM}(t)({type:t.type,uid:t.uid,onEscape:function(){return t.onEscape(),B.some(!0)},cyclicKeying:!1,initGroups:[],getSink:t.getSink,providers:t.providers,moreDrawerData:{lazyToolbar:t.lazyToolbar,lazyMoreButton:t.lazyMoreButton,lazyHeader:t.lazyHeader},attributes:t.attributes})}},name:"toolbar",schema:[Yr("dom"),Yr("onEscape"),Yr("getSink")]}),bM=oz.optional({factory:{sketch:function(t){var e=t.editor,n=t.sticky?qz:hz;return{uid:t.uid,dom:t.dom,components:t.components,behaviours:wc(n(e,t.sharedBackstage))}}},name:"header",schema:[Yr("dom")]}),yM=oz.optional({name:"socket",schema:[Yr("dom")]}),xM=oz.optional({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"div",classes:["tox-sidebar"],attributes:{role:"complementary"}},components:[{dom:{tag:"div",classes:["tox-sidebar__slider"]},components:[],behaviours:wc([tw.config({}),mh.config({}),gT.config({dimension:{property:"width"},closedClass:"tox-sidebar--sliding-closed",openClass:"tox-sidebar--sliding-open",shrinkingClass:"tox-sidebar--sliding-shrinking",growingClass:"tox-sidebar--sliding-growing",onShrunk:function(t){Hd.getCurrent(t).each(xT.hideAllSlots),Mi(t,ET)},onGrown:function(t){Mi(t,ET)},onStartGrow:function(t){Di(t,OT,{width:rn(t.element,"width").getOr("")})},onStartShrink:function(t){Di(t,OT,{width:yn(t.element)+"px"})}}),uh.config({}),Hd.config({find:function(t){var e=uh.contents(t);return at(e)}})])}],behaviours:wc([vk(0),ch("sidebar-sliding-events",[Pi(OT,(function(t,e){Qe(t.element,"width",e.event.width)})),Pi(ET,(function(t,e){un(t.element,"width")}))])])}}},name:"sidebar",schema:[Yr("dom")]}),wM=oz.optional({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"div",attributes:{"aria-hidden":"true"},classes:["tox-throbber"],styles:{display:"none"}},behaviours:wc([uh.config({}),MT.config({focus:!1}),Hd.config({find:function(t){return at(t.components())}})]),components:[]}}},name:"throbber",schema:[Yr("dom")]}),CM=Ad({name:"OuterContainer",factory:function(t,e,n){var r={getSocket:function(e){return rz.getPart(e,t,"socket")},setSidebar:function(e,n){rz.getPart(e,t,"sidebar").each((function(t){return function(t,e){Hd.getCurrent(t).each((function(t){return uh.set(t,[kT(e)])}))}(t,n)}))},toggleSidebar:function(e,n){rz.getPart(e,t,"sidebar").each((function(t){return function(t,e){Hd.getCurrent(t).each((function(t){Hd.getCurrent(t).each((function(n){gT.hasGrown(t)?xT.isShowing(n,e)?gT.shrink(t):(xT.hideAllSlots(n),xT.showSlot(n,e)):(xT.hideAllSlots(n),xT.showSlot(n,e),gT.grow(t))}))}))}(t,n)}))},whichSidebar:function(e){return rz.getPart(e,t,"sidebar").bind(_T).getOrNull()},getHeader:function(e){return rz.getPart(e,t,"header")},getToolbar:function(e){return rz.getPart(e,t,"toolbar")},setToolbar:function(e,n){rz.getPart(e,t,"toolbar").each((function(t){t.getApis().setGroups(t,n)}))},setToolbars:function(e,n){rz.getPart(e,t,"multiple-toolbar").each((function(t){sz.setItems(t,n)}))},refreshToolbar:function(e){rz.getPart(e,t,"toolbar").each((function(t){return t.getApis().refresh(t)}))},toggleToolbarDrawer:function(e){rz.getPart(e,t,"toolbar").each((function(t){var e,n;e=t.getApis().toggle,n=function(e){return e(t)},null!=e?B.some(n(e)):B.none()}))},isToolbarDrawerToggled:function(e){return rz.getPart(e,t,"toolbar").bind((function(t){return B.from(t.getApis().isOpen).map((function(e){return e(t)}))})).getOr(!1)},getThrobber:function(e){return rz.getPart(e,t,"throbber")},focusToolbar:function(e){rz.getPart(e,t,"toolbar").orThunk((function(){return rz.getPart(e,t,"multiple-toolbar")})).each((function(t){nh.focusIn(t)}))},setMenubar:function(e,n){rz.getPart(e,t,"menubar").each((function(t){Qz.setMenus(t,n)}))},focusMenubar:function(e){rz.getPart(e,t,"menubar").each((function(t){Qz.focus(t)}))}};return{uid:t.uid,dom:t.dom,components:e,apis:r,behaviours:t.behaviours}},configFields:[Yr("dom"),Yr("behaviours")],partFields:[bM,hM,vM,pM,yM,xM,wM],apis:{getSocket:function(t,e){return t.getSocket(e)},setSidebar:function(t,e,n){t.setSidebar(e,n)},toggleSidebar:function(t,e,n){t.toggleSidebar(e,n)},whichSidebar:function(t,e){return t.whichSidebar(e)},getHeader:function(t,e){return t.getHeader(e)},getToolbar:function(t,e){return t.getToolbar(e)},setToolbar:function(t,e,n){var r=j(n,(function(t){return sM(t)}));t.setToolbar(e,r)},setToolbars:function(t,e,n){var r=j(n,(function(t){return j(t,sM)}));t.setToolbars(e,r)},refreshToolbar:function(t,e){return t.refreshToolbar(e)},toggleToolbarDrawer:function(t,e){t.toggleToolbarDrawer(e)},isToolbarDrawerToggled:function(t,e){return t.isToolbarDrawerToggled(e)},getThrobber:function(t,e){return t.getThrobber(e)},setMenubar:function(t,e,n){t.setMenubar(e,n)},focusMenubar:function(t,e){t.focusMenubar(e)},focusToolbar:function(t,e){t.focusToolbar(e)}}}),SM={file:{title:"File",items:"newdocument restoredraft | preview | export print | deleteallconversations"},edit:{title:"Edit",items:"undo redo | cut copy paste pastetext | selectall | searchreplace"},view:{title:"View",items:"code | visualaid visualchars visualblocks | spellchecker | preview fullscreen | showcomments"},insert:{title:"Insert",items:"image link media addcomment pageembed template codesample inserttable | charmap emoticons hr | pagebreak nonbreaking anchor toc | insertdatetime"},format:{title:"Format",items:"bold italic underline strikethrough superscript subscript codeformat | formats blockformats fontformats fontsizes align lineheight | forecolor backcolor | language | removeformat"},tools:{title:"Tools",items:"spellchecker spellcheckerlanguage | a11ycheck code wordcount"},table:{title:"Table",items:"inserttable | cell row column | advtablesort | tableprops deletetable"},help:{title:"Help",items:"help"}},kM=function(t){return"string"==typeof t?t.split(" "):t},_M=function(t,e){var n=O(O({},SM),e.menus),r=lt(e.menus).length>0,o=void 0===e.menubar||!0===e.menubar?kM("file edit view insert format tools table help"):kM(!1===e.menubar?"":e.menubar),i=G(o,(function(t){var n=xt(SM,t);return r?n||yt(e.menus,t).exists((function(t){return xt(t,"items")})):n})),a=j(i,(function(r){var o=n[r];return function(t,e,n){var r=function(t){return t.getParam("removed_menuitems","")}(n).split(/[ ,]/);return{text:t.title,getItems:function(){return Q(t.items,(function(t){var n=t.toLowerCase();return 0===n.trim().length||I(r,(function(t){return t===n}))?[]:"separator"===n||"|"===n?[{type:"separator"}]:e.menuItems[n]?[e.menuItems[n]]:[]}))}}}({title:o.title,items:kM(o.items)},e,t)}));return G(a,(function(t){return t.getItems().length>0&&I(t.getItems(),(function(t){return"separator"!==t.type}))}))},OM=function(t){var e=function(){t._skinLoaded=!0,function(t){t.fire("SkinLoaded")}(t)};return function(){t.initialized?e():t.on("init",e)}},EM=function(t,e,n){return new Wp((function(r,o){n.load(e,r,o),t.on("remove",(function(){return n.unload(e)}))}))},zM=function(t,e){return EM(t,e+"/skin.min.css",t.ui.styleSheetLoader)},TM=function(t,e){var n;return(n=Bt.fromDom(t.getElement()),Le(n).isSome())?EM(t,e+"/skin.shadowdom.min.css",hb.DOM.styleSheetLoader):Wp.resolve()},MM=function(t,e){var n=function(t){var e=t.getParam("skin"),n=t.getParam("skin_url");if(!1!==e){var r=e||"oxide";n=n?t.documentBaseURI.toAbsolute(n):pb.baseURL+"/skins/ui/"+r}return n}(e);n&&e.contentCSS.push(n+(t?"/content.inline":"/content")+".min.css"),!1===function(t){return!1===t.getParam("skin")}(e)&&o(n)?Wp.all([zM(e,n),TM(e,n)]).then(OM(e),function(t,e){return function(){return function(t,e){return t.fire("SkinLoadError",e)}(t,{message:e})}}(e,"Skin could not be loaded")):OM(e)()},DM=x(MM,!1),AM=x(MM,!0),NM=function(t,e){return function(n){var r=Zc(),o=function(){n.setActive(t.formatter.match(e));var o=t.formatter.formatChanged(e,n.setActive);r.set(o)};return t.initialized?o():t.once("init",o),function(){t.off("init",o),r.clear()}}},BM=function(t,e,n){return function(r){var o=function(){return n(r)},i=function(){n(r),t.on(e,o)};return t.initialized?i():t.once("init",i),function(){t.off("init",i),t.off(e,o)}}},RM=function(t){return function(e){return function(){t.undoManager.transact((function(){t.focus(),t.execCommand("mceToggleFormat",!1,e.format)}))}}},HM=function(t,e){return function(){return t.execCommand(e)}},LM=function(t,e,n){var r=function(t,r,i,a){var u=e.shared.providers.translate(t.title);if("separator"===t.type)return B.some({type:"separator",text:u});if("submenu"===t.type){var c=Q(t.getStyleItems(),(function(t){return o(t,r,a)}));return 0===r&&c.length<=0?B.none():B.some({type:"nestedmenuitem",text:u,disabled:c.length<=0,getSubmenuItems:function(){return Q(t.getStyleItems(),(function(t){return o(t,r,a)}))}})}return B.some(O({type:"togglemenuitem",text:u,icon:t.icon,active:t.isSelected(a),disabled:i,onAction:n.onAction(t)},t.getStylePreview().fold((function(){return{}}),(function(t){return{meta:{style:t}}}))))},o=function(t,e,o){var i="formatter"===t.type&&n.isInvalid(t);return 0===e?i?[]:r(t,e,!1,o).toArray():r(t,e,i,o).toArray()},i=function(t){var e=n.getCurrentValue(),r=n.shouldHide?0:1;return Q(t,(function(t){return o(t,r,e)}))};return{validateItems:i,getFetch:function(t,e){return function(n,r){var o=e(),a=i(o);r(I_(a,pv.CLOSE_ON_EXECUTE,t,!1))}}}},VM=function(t,e,n){var r=n.dataset,o="basic"===r.type?function(){return j(r.data,(function(t){return OE(t,n.isSelectedFor,n.getPreviewFor)}))}:r.getData;return{items:LM(0,e,n),getStyleItems:o}},PM=function(t,e,n){var r=VM(0,e,n),o=r.items,i=r.getStyleItems,a=BM(t,"NodeChange",(function(t){var e=t.getComponent();n.updateText(e)}));return B_({text:n.icon.isSome()?B.none():n.text,icon:n.icon,tooltip:B.from(n.tooltip),role:B.none(),fetch:o.getFetch(e,i),onSetup:a,getApi:function(t){return{getComponent:v(t)}},columns:1,presets:"normal",classes:n.icon.isSome()?[]:["bespoke"],dropdownBehaviours:[]},"tox-tbtn",e.shared)};!function(t){t[t.SemiColon=0]="SemiColon",t[t.Space=1]="Space"}(SO||(SO={}));var IM,FM,UM,jM,WM,qM=function(t,e,n,r){return{type:"basic",data:function(t){return j(t,(function(t){var e=t,n=t,r=t.split("=");return r.length>1&&(e=r[0],n=r[1]),{title:e,format:n}}))}(function(t,e){return e===SO.SemiColon?t.replace(/;$/,"").split(";"):t.split(" ")}(t.getParam(e,n,"string"),r))}},GM=[{title:"Left",icon:"align-left",format:"alignleft",command:"JustifyLeft"},{title:"Center",icon:"align-center",format:"aligncenter",command:"JustifyCenter"},{title:"Right",icon:"align-right",format:"alignright",command:"JustifyRight"},{title:"Justify",icon:"align-justify",format:"alignjustify",command:"JustifyFull"}],$M=function(t){var e={type:"basic",data:GM};return{tooltip:"Align",text:B.none(),icon:B.some("align-left"),isSelectedFor:function(e){return function(){return t.formatter.match(e)}},getCurrentValue:B.none,getPreviewFor:function(t){return B.none},onAction:function(e){return function(){return K(GM,(function(t){return t.format===e.format})).each((function(e){return t.execCommand(e.command)}))}},updateText:function(e){var n=K(GM,(function(e){return t.formatter.match(e.format)})).fold(v("left"),(function(t){return t.title.toLowerCase()}));Di(e,N_,{icon:"align-"+n})},dataset:e,shouldHide:!1,isInvalid:function(e){return!t.formatter.canApply(e.format)}}},XM=["-apple-system","Segoe UI","Roboto","Helvetica Neue","sans-serif"],KM=function(t){var e=t.split(/\s*,\s*/);return j(e,(function(t){return t.replace(/^['"]+|['"]+$/g,"")}))},YM=function(t){var e="System Font",n=function(){var n=function(t){return t?KM(t)[0]:""},o=t.queryCommandValue("FontName"),i=r.data,a=o?o.toLowerCase():"";return{matchOpt:K(i,(function(t){var e=t.format;return e.toLowerCase()===a||n(e).toLowerCase()===n(a).toLowerCase()})).orThunk((function(){return _t(function(t){var e;return 0===t.indexOf("-apple-system")&&(e=KM(t.toLowerCase()),Z(XM,(function(t){return e.indexOf(t.toLowerCase())>-1})))}(a),{title:e,format:a})})),font:o}},r=qM(t,"font_formats","Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats",SO.SemiColon);return{tooltip:"Fonts",text:B.some(e),icon:B.none(),isSelectedFor:function(t){return function(e){return e.exists((function(e){return e.format===t}))}},getCurrentValue:function(){return n().matchOpt},getPreviewFor:function(t){return function(){return B.some({tag:"div",styles:-1===t.indexOf("dings")?{"font-family":t}:{}})}},onAction:function(e){return function(){t.undoManager.transact((function(){t.focus(),t.execCommand("FontName",!1,e.format)}))}},updateText:function(t){var e=n(),r=e.matchOpt,o=e.font,i=r.fold(v(o),(function(t){return t.title}));Di(t,A_,{text:i})},dataset:r,shouldHide:!1,isInvalid:S}},JM={"8pt":"1","10pt":"2","12pt":"3","14pt":"4","18pt":"5","24pt":"6","36pt":"7"},QM={"xx-small":"7pt","x-small":"8pt",small:"10pt",medium:"12pt",large:"14pt","x-large":"18pt","xx-large":"24pt"},ZM=function(t,e){return/[0-9.]+px$/.test(t)?function(t,e){var n=Math.pow(10,e);return Math.round(t*n)/n}(72*parseInt(t,10)/96,e||0)+"pt":yt(QM,t).getOr(t)},tD=function(t){var e=function(){var e=B.none(),n=r.data,o=t.queryCommandValue("FontSize");if(o)for(var i=function(t){var r=ZM(o,t),i=function(t){return yt(JM,t).getOr("")}(r);e=K(n,(function(t){return t.format===o||t.format===r||t.format===i}))},a=3;e.isNone()&&a>=0;a--)i(a);return{matchOpt:e,size:o}},n=v(B.none),r=qM(t,"fontsize_formats","8pt 10pt 12pt 14pt 18pt 24pt 36pt",SO.Space);return{tooltip:"Font sizes",text:B.some("12pt"),icon:B.none(),isSelectedFor:function(t){return function(e){return e.exists((function(e){return e.format===t}))}},getPreviewFor:n,getCurrentValue:function(){return e().matchOpt},onAction:function(e){return function(){t.undoManager.transact((function(){t.focus(),t.execCommand("FontSize",!1,e.format)}))}},updateText:function(t){var n=e(),r=n.matchOpt,o=n.size,i=r.fold(v(o),(function(t){return t.title}));Di(t,A_,{text:i})},dataset:r,shouldHide:!1,isInvalid:S}},eD=function(t,e){var n=e(),r=j(n,(function(t){return t.format}));return B.from(t.formatter.closest(r)).bind((function(t){return K(n,(function(e){return e.format===t}))})).orThunk((function(){return _t(t.formatter.match("p"),{title:"Paragraph",format:"p"})}))},nD=function(t){var e="Paragraph",n=qM(t,"block_formats","Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre",SO.SemiColon);return{tooltip:"Blocks",text:B.some(e),icon:B.none(),isSelectedFor:function(e){return function(){return t.formatter.match(e)}},getCurrentValue:B.none,getPreviewFor:function(e){return function(){var n=t.formatter.get(e);return B.some({tag:n.length>0&&(n[0].inline||n[0].block)||"div",styles:t.dom.parseStyle(t.formatter.getCssText(e))})}},onAction:RM(t),updateText:function(r){var o=eD(t,(function(){return n.data})).fold(v(e),(function(t){return t.title}));Di(r,A_,{text:o})},dataset:n,shouldHide:!1,isInvalid:function(e){return!t.formatter.canApply(e.format)}}},rD=function(t,e){var n="Paragraph";return{tooltip:"Formats",text:B.some(n),icon:B.none(),isSelectedFor:function(e){return function(){return t.formatter.match(e)}},getCurrentValue:B.none,getPreviewFor:function(e){return function(){var n=t.formatter.get(e);return void 0!==n?B.some({tag:n.length>0&&(n[0].inline||n[0].block)||"div",styles:t.dom.parseStyle(t.formatter.getCssText(e))}):B.none()}},onAction:RM(t),updateText:function(e){var r=function(t){var e=t.items;return void 0!==e&&e.length>0?Q(e,r):[{title:t.title,format:t.format}]},o=Q(_E(t),r),i=eD(t,v(o)).fold(v(n),(function(t){return t.title}));Di(e,A_,{text:i})},shouldHide:t.getParam("style_formats_autohide",!1,"boolean"),isInvalid:function(e){return!t.formatter.canApply(e.format)},dataset:e}},oD=Object.freeze({__proto__:null,events:function(t,e){var n=function(n,r){t.updateState.each((function(t){var o=t(n,r);e.set(o)})),t.renderComponents.each((function(t){var o=t(r,e.get()),i=j(o,n.getSystem().build);Ul(n,i)}))};return Hi([Pi(ci(),(function(e,r){var o=r;if(!o.universal){var i=t.channel;P(o.channels,i)&&n(e,o.data)}})),$i((function(e,r){t.initialData.each((function(t){n(e,t)}))}))])}}),iD=Object.freeze({__proto__:null,getState:function(t,e,n){return n}}),aD=[Yr("channel"),io("renderComponents"),io("updateState"),io("initialData")],uD=Object.freeze({__proto__:null,init:function(){var t=Co(B.none());return{readState:function(){return t.get().getOr("none")},get:t.get,set:t.set,clear:function(){return t.set(B.none())}}}}),cD=Sc({fields:aD,name:"reflecting",active:oD,apis:iD,state:uD}),sD=v([Yr("toggleClass"),Yr("fetch"),Mu("onExecute"),mo("getHotspot",B.some),mo("getAnchorOverrides",v({})),Os(),Mu("onItemExecute"),io("lazySink"),Yr("dom"),zu("onOpen"),zf("splitDropdownBehaviours",[jw,nh,mh]),mo("matchWidth",!1),mo("useMinWidth",!1),mo("eventOrder",{}),io("role")].concat(oC())),lD=rd({factory:vp,schema:[Yr("dom")],name:"arrow",defaults:function(){return{buttonBehaviours:wc([mh.revoke()])}},overrides:function(t){return{dom:{tag:"span",attributes:{role:"presentation"}},action:function(e){e.getSystem().getByUid(t.uid).each(Ai)},buttonBehaviours:wc([_h.config({toggleOnExecute:!1,toggleClass:t.toggleClass})])}}}),fD=rd({factory:vp,schema:[Yr("dom")],name:"button",defaults:function(){return{buttonBehaviours:wc([mh.revoke()])}},overrides:function(t){return{dom:{tag:"span",attributes:{role:"presentation"}},action:function(e){e.getSystem().getByUid(t.uid).each((function(n){t.onExecute(n,e)}))}}}}),dD=v([lD,fD,id({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:t.text}}}},schema:[Yr("text")],name:"aria-descriptor"}),od({schema:[_u()],name:"menu",defaults:function(t){return{onExecute:function(e,n){e.getSystem().getByUid(t.uid).each((function(r){t.onItemExecute(r,e,n)}))}}}}),qw()]),mD=Ad({name:"SplitDropdown",configFields:sD(),partFields:dD(),factory:function(t,e,n,r){var o,i=function(t){Hd.getCurrent(t).each((function(t){um.highlightFirst(t),nh.focusIn(t)}))},a=function(e){Qw(t,b,e,r,i,Sw.HighlightFirst).get(h)},u=function(e){var n=bd(e,t,"button");return Ai(n),B.some(!0)},c=O(O({},Hi([$i((function(e,n){vd(e,t,"aria-descriptor").each((function(t){var n=ia("aria");We(t.element,"id",n),We(e.element,"aria-describedby",n)}))}))])),Eh(B.some(a))),s={repositionMenus:function(t){_h.isOn(t)&&rC(t)}};return{uid:t.uid,dom:t.dom,components:e,apis:s,eventOrder:O(O({},t.eventOrder),(o={},o[si()]=["disabling","toggling","alloy.base.behaviour"],o)),events:c,behaviours:Mf(t.splitDropdownBehaviours,[jw.config({others:{sandbox:function(e){var n=bd(e,t,"arrow");return nC(t,e,{onOpen:function(){_h.on(n),_h.on(e)},onClose:function(){_h.off(n),_h.off(e)}})}}}),nh.config({mode:"special",onSpace:u,onEnter:u,onDown:function(t){return a(t),B.some(!0)}}),mh.config({}),_h.config({toggleOnExecute:!1,aria:{mode:"expanded"}})]),domModification:{attributes:{role:t.role.getOr("button"),"aria-haspopup":!0}}}},apis:{repositionMenus:function(t,e){return t.repositionMenus(e)}}}),gD=function(t){return{isDisabled:function(){return Yd.isDisabled(t)},setDisabled:function(e){return Yd.set(t,e)}}},hD=function(t){return{setActive:function(e){_h.set(t,e)},isActive:function(){return _h.isOn(t)},isDisabled:function(){return Yd.isDisabled(t)},setDisabled:function(e){return Yd.set(t,e)}}},pD=function(t,e){return t.map((function(t){return{"aria-label":e.translate(t),title:e.translate(t)}})).getOr({})},vD=ia("focus-button"),bD=function(t,e,n,r,o,i){var a;return{dom:{tag:"button",classes:["tox-tbtn"].concat(e.isSome()?["tox-tbtn--select"]:[]),attributes:pD(n,i)},components:ny([t.map((function(t){return E_(t,i.icons)})),e.map((function(t){return T_(t,"tox-tbtn",i)}))]),eventOrder:(a={},a[Fo()]=["focusing","alloy.base.behaviour","common-button-display-events"],a),buttonBehaviours:wc([Yb(i.isDisabled),Gb(),ch("common-button-display-events",[Pi(Fo(),(function(t,e){e.event.prevent(),Mi(t,vD)}))])].concat(r.map((function(n){return cD.config({channel:n,initialData:{icon:t,text:e},renderComponents:function(t,e){return ny([t.icon.map((function(t){return E_(t,i.icons)})),t.text.map((function(t){return T_(t,"tox-tbtn",i)}))])}})})).toArray()).concat(o.getOr([])))}},yD=function(t,e,n){var r,o=Co(h),i=bD(t.icon,t.text,t.tooltip,B.none(),B.none(),n);return vp.sketch({dom:i.dom,components:i.components,eventOrder:D_,buttonBehaviours:wc([ch("toolbar-button-events",[(r={onAction:t.onAction,getApi:e.getApi},Yi((function(t,e){Jb(r,t)((function(e){Di(t,M_,{buttonApi:e}),r.onAction(e)}))}))),Qb(e,o),Zb(e,o)]),Yb((function(){return t.disabled||n.isDisabled()})),Gb()].concat(e.toolbarButtonBehaviours))})},xD=function(t,e,n){return yD(t,{toolbarButtonBehaviours:[].concat(n.length>0?[ch("toolbarButtonWith",n)]:[]),getApi:gD,onSetup:t.onSetup},e)},wD=function(t,e,n){return cr(yD(t,{toolbarButtonBehaviours:[uh.config({}),_h.config({toggleClass:"tox-tbtn--enabled",aria:{mode:"pressed"},toggleOnExecute:!1})].concat(n.length>0?[ch("toolbarToggleButtonWith",n)]:[]),getApi:hD,onSetup:t.onSetup},e))},CD=function(t,e,n){return function(r){return Tw((function(t){return e.fetch(t)})).map((function(o){return B.from(Dx(cr(fx(ia("menu-value"),o,(function(n){e.onItemAction(t(r),n)}),e.columns,e.presets,pv.CLOSE_ON_EXECUTE,e.select.getOr(S),n),{movement:mx(e.columns,e.presets),menuBehaviours:ab("auto"!==e.columns?[]:[$i((function(t,n){ob(t,4,zv(e.presets)).each((function(e){var n=e.numRows,r=e.numColumns;nh.setGridSize(t,n,r)}))}))])})))}))}},SD=[{name:"history",items:["undo","redo"]},{name:"styles",items:["styleselect"]},{name:"formatting",items:["bold","italic"]},{name:"alignment",items:["alignleft","aligncenter","alignright","alignjustify"]},{name:"indentation",items:["outdent","indent"]},{name:"permanent pen",items:["permanentpen"]},{name:"comments",items:["addcomment"]}],kD=function(t,e){return function(n,r,o){var i=t(n).mapError((function(t){return qr(t)})).getOrDie();return e(i,r,o)}},_D={button:kD(nv,(function(t,e){return n=t,r=e.backstage.shared.providers,xD(n,r,[]);var n,r})),togglebutton:kD(iv,(function(t,e){return n=t,r=e.backstage.shared.providers,wD(n,r,[]);var n,r})),menubutton:kD(Yz,(function(t,e){return U_(t,"tox-tbtn",e.backstage,B.none())})),splitbutton:kD((function(t){return Ur("SplitButton",Jz,t)}),(function(t,e){return function(t,e){var n,r=ia("channel-update-split-dropdown-display"),o=function(t){return{isDisabled:function(){return Yd.isDisabled(t)},setDisabled:function(e){return Yd.set(t,e)},setIconFill:function(e,n){lu(t.element,'svg path[id="'+e+'"], rect[id="'+e+'"]').each((function(t){We(t,"fill",n)}))},setIconStroke:function(e,n){lu(t.element,'svg path[id="'+e+'"], rect[id="'+e+'"]').each((function(t){We(t,"stroke",n)}))},setActive:function(e){We(t.element,"aria-pressed",e),lu(t.element,"span").each((function(n){t.getSystem().getByDom(n).each((function(t){return _h.set(t,e)}))}))},isActive:function(){return lu(t.element,"span").exists((function(e){return t.getSystem().getByDom(e).exists(_h.isOn)}))}}},i=Co(h),a={getApi:o,onSetup:t.onSetup};return mD.sketch({dom:{tag:"div",classes:["tox-split-button"],attributes:O({"aria-pressed":!1},pD(t.tooltip,e.providers))},onExecute:function(e){t.onAction(o(e))},onItemExecute:function(t,e,n){},splitDropdownBehaviours:wc([Kb(e.providers.isDisabled),Gb(),ch("split-dropdown-events",[Pi(vD,mh.focus),Qb(a,i),Zb(a,i)]),sC.config({})]),eventOrder:(n={},n[xi()]=["alloy.base.behaviour","split-dropdown-events"],n),toggleClass:"tox-tbtn--enabled",lazySink:e.getSink,fetch:CD(o,t,e.providers),parts:{menu:Bv(0,t.columns,t.presets)},components:[mD.parts.button(bD(t.icon,t.text,B.none(),B.some(r),B.some([_h.config({toggleClass:"tox-tbtn--enabled",toggleOnExecute:!1})]),e.providers)),mD.parts.arrow({dom:{tag:"button",classes:["tox-tbtn","tox-split-button__chevron"],innerHtml:_p("chevron-down",e.providers.icons)},buttonBehaviours:wc([Kb(e.providers.isDisabled),Gb(),Op()])}),mD.parts["aria-descriptor"]({text:e.providers.translate("To open the popup, press Shift+Enter")})]})}(t,e.backstage.shared)})),grouptoolbarbutton:kD((function(t){return Ur("GroupToolbarButton",$z,t)}),(function(t,e,n){var r,o=n.ui.registry.getAll().buttons,i=((r={})[ks]=e.backstage.shared.header.isPositionedAtTop()?jc.TopToBottom:jc.BottomToTop,r);switch(zb(n)){case hv.floating:return function(t,e,n,r){var o=e.shared;return YT.sketch({lazySink:o.getSink,fetch:function(){return Tw((function(e){e(j(n(t.items),sM))}))},markers:{toggledClass:"tox-tbtn--enabled"},parts:{button:bD(t.icon,t.text,t.tooltip,B.none(),B.none(),o.providers),toolbar:{dom:{tag:"div",classes:["tox-toolbar__overflow"],attributes:r}}}})}(t,e.backstage,(function(t){return TD(n,{buttons:o,toolbar:t,allowToolbarGroups:!1},e,B.none())}),i);default:throw new Error("Toolbar groups are only supported when using floating toolbar mode")}})),styleSelectButton:function(t,e){return function(t,e){var n=O({type:"advanced"},e.styleselect);return PM(t,e,rD(t,n))}(t,e.backstage)},fontsizeSelectButton:function(t,e){return function(t,e){return PM(t,e,tD(t))}(t,e.backstage)},fontSelectButton:function(t,e){return function(t,e){return PM(t,e,YM(t))}(t,e.backstage)},formatButton:function(t,e){return function(t,e){return PM(t,e,nD(t))}(t,e.backstage)},alignMenuButton:function(t,e){return function(t,e){return PM(t,e,$M(t))}(t,e.backstage)}},OD={styleselect:_D.styleSelectButton,fontsizeselect:_D.fontsizeSelectButton,fontselect:_D.fontSelectButton,formatselect:_D.formatButton,align:_D.alignMenuButton},ED=function(t){var e,n=t.toolbar,r=t.buttons;return!1===n?[]:void 0===n||!0===n?function(t){var e=j(SD,(function(e){var n=G(e.items,(function(e){return xt(t,e)||xt(OD,e)}));return{name:e.name,items:n}}));return G(e,(function(t){return t.items.length>0}))}(r):o(n)?(e=n.split("|"),j(e,(function(t){return{items:t.trim().split(" ")}}))):function(t){return g(t,(function(t){return xt(t,"name")&&xt(t,"items")}))}(n)?n:(console.error("Toolbar type should be string, string[], boolean or ToolbarGroup[]"),[])},zD=function(t,e,n,r,o,i){return yt(e,n.toLowerCase()).orThunk((function(){return i.bind((function(t){return st(t,(function(t){return yt(e,t+n.toLowerCase())}))}))})).fold((function(){return yt(OD,n.toLowerCase()).map((function(e){return e(t,o)})).orThunk((function(){return B.none()}))}),(function(e){return"grouptoolbarbutton"!==e.type||r?function(t,e,n){return yt(_D,t.type).fold((function(){return console.error("skipping button defined by",t),B.none()}),(function(r){return B.some(r(t,e,n))}))}(e,o,t):(console.warn("Ignoring the '"+n+"' toolbar button. Group toolbar buttons are only supported when using floating toolbar mode and cannot be nested."),B.none())}))},TD=function(t,e,n,r){var o=ED(e),i=j(o,(function(o){var i=Q(o.items,(function(o){return 0===o.trim().length?[]:zD(t,e.buttons,o,e.allowToolbarGroups,n,r).toArray()}));return{title:B.from(t.translate(o.name)),items:i}}));return G(i,(function(t){return t.items.length>0}))},MD=function(t,e,n,r){var i=e.outerContainer,a=n.toolbar,u=n.buttons;if(g(a,o)){var c=a.map((function(e){var o={toolbar:e,buttons:u,allowToolbarGroups:n.allowToolbarGroups};return TD(t,o,{backstage:r},B.none())}));CM.setToolbars(i,c)}else CM.setToolbar(i,TD(t,n,{backstage:r},B.none()))},DD=pe(),AD=DD.os.isiOS()&&DD.os.version.major<=12,ND=Object.freeze({__proto__:null,render:function(t,e,n,r,o){var i=Co(0),a=e.outerContainer;DM(t);var c=Bt.fromDom(o.targetNode),s=He(Re(c));!function(t,e){Kl(t,e,_n)}(c,e.mothership),Xl(s,e.uiMothership),t.on("PostRender",(function(){MD(t,e,n,r),i.set(t.getWin().innerWidth),CM.setMenubar(a,_M(t,n)),CM.setSidebar(a,n.sidebar),function(t,e){var n=t.dom,r=t.getWin(),o=t.getDoc().documentElement,i=Co(gn(r.innerWidth,r.innerHeight)),a=Co(gn(o.offsetWidth,o.offsetHeight)),u=function(){var e=i.get();e.left===r.innerWidth&&e.top===r.innerHeight||(i.set(gn(r.innerWidth,r.innerHeight)),Fy(t))},c=function(){var e=t.getDoc().documentElement,n=a.get();n.left===e.offsetWidth&&n.top===e.offsetHeight||(a.set(gn(e.offsetWidth,e.offsetHeight)),Fy(t))},s=function(e){return function(t,e){return t.fire("ScrollContent",e)}(t,e)};n.bind(r,"resize",u),n.bind(r,"scroll",s);var l=rs(Bt.fromDom(t.getBody()),"load",c),f=e.uiMothership.element;t.on("hide",(function(){Qe(f,"display","none")})),t.on("show",(function(){un(f,"display")})),t.on("NodeChange",c),t.on("remove",(function(){l.unbind(),n.unbind(r,"resize",u),n.unbind(r,"scroll",s),r=null}))}(t,e)}));var l,f,d,m=CM.getSocket(a).getOrDie("Could not find expected socket element");if(AD){Ze(m.element,{overflow:"scroll","-webkit-overflow-scrolling":"touch"});var g=(l=function(){t.fire("ScrollContent")},f=20,d=null,{cancel:function(){u(d)||(clearTimeout(d),d=null)},throttle:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];u(d)&&(d=setTimeout((function(){d=null,l.apply(null,t)}),f))}}),h=ns(m.element,"scroll",g.throttle);t.on("remove",h.unbind)}qb(t,e),t.addCommand("ToggleSidebar",(function(e,n){CM.toggleSidebar(a,n),t.fire("ToggleSidebar")})),t.addQueryValueHandler("ToggleSidebar",(function(){return CM.whichSidebar(a)}));var p=zb(t);p!==hv.sliding&&p!==hv.floating||t.on("ResizeWindow ResizeEditor ResizeContent",(function(){var n=t.getWin().innerWidth;n!==i.get()&&(CM.refreshToolbar(e.outerContainer),i.set(n))}));var v={enable:function(){Wb(e,!1)},disable:function(){Wb(e,!0)},isDisabled:function(){return Yd.isDisabled(a)}};return{iframeContainer:m.element.dom,editorContainer:a.element.dom,api:v}}}),BD=function(t){return/^[0-9\.]+(|px)$/i.test(""+t)?B.some(parseInt(""+t,10)):B.none()},RD=function(t){return m(t)?t+"px":t},HD=function(t,e,n){var r=e.filter((function(e){return t<e})),o=n.filter((function(e){return t>e}));return r.or(o).getOr(t)},LD=function(t){return function(t){var e=vb(t),n=xb(t),r=Cb(t);return BD(e).map((function(t){return HD(t,n,r)}))}(t).getOr(vb(t))},VD=function(t){var e=bb(t),n=yb(t),r=wb(t);return BD(e).map((function(t){return HD(t,n,r)}))},PD=function(t,e,n,r,o){var i=n.uiMothership,a=n.outerContainer,u=hb.DOM,c=Bb(t),s=Lb(t),l=wb(t).or(VD(t)),f=r.shared.header,d=f.isPositionedAtTop,m=zb(t),g=m===hv.sliding||m===hv.floating,h=Co(!1),p=function(){return h.get()&&!t.removed},b=function(t){return g?t.fold(v(0),(function(t){return t.components().length>1?fn(t.components()[1].element):0})):0},y=function(){i.broadcastOn([sf()],{})},x=function(t){if(void 0===t&&(t=!1),p()){var n;if(c||(n=l.getOrThunk((function(){var t=BD(en(Fe(),"margin-left")).getOr(0);return yn(Fe())-pn(e).left+t})),Qe(o.get().element,"max-width",n+"px")),g&&CM.refreshToolbar(a),c||function(){var t=CM.getToolbar(a),n=b(t),r=In(e),i=d()?Math.max(r.y-fn(o.get().element)+n,0):r.bottom;Ze(a.element,{position:"absolute",top:Math.round(i)+"px",left:Math.round(r.x)+"px"})}(),s){var r=o.get();t?Hz.reset(r):Hz.refresh(r)}y()}},w=function(n){if(void 0===n&&(n=!0),!c&&s&&p()){var r=f.getDockingMode(),i=function(n){switch(Db(t)){case Eb.auto:var r=CM.getToolbar(a),o=b(r),i=fn(n.element)-o,u=In(e);if(u.y>i)return"top";var c=ke(e),s=Math.max(c.dom.scrollHeight,fn(c));return u.bottom<s-i||Un().bottom<u.bottom-i?"bottom":"top";case Eb.bottom:return"bottom";case Eb.top:default:return"top"}}(o.get());i!==r&&(!function(t){var e=o.get();Hz.setModes(e,[t]),f.setDockingMode(t);var n=d()?jc.TopToBottom:jc.BottomToTop;We(e.element,ks,n)}(i),n&&x(!0))}};return{isVisible:p,isPositionedAtTop:d,show:function(){h.set(!0),Qe(a.element,"display","flex"),u.addClass(t.getBody(),"mce-edit-focus"),un(i.element,"display"),w(!1),x()},hide:function(){h.set(!1),n.outerContainer&&(Qe(a.element,"display","none"),u.removeClass(t.getBody(),"mce-edit-focus")),Qe(i.element,"display","none")},update:x,updateMode:w,repositionPopups:y}},ID=function(t,e){var n=In(t);return{pos:e?n.y:n.bottom,bounds:n}},FD=Object.freeze({__proto__:null,render:function(t,e,n,r,o){var i=e.mothership,a=e.uiMothership,u=e.outerContainer,c=Co(null),s=Bt.fromDom(o.targetNode),l=PD(t,s,e,r,c),f=function(t){return t.getParam("toolbar_persist",!1,"boolean")}(t);AM(t);var d=function(){if(c.get())l.show();else{c.set(CM.getHeader(u).getOrDie());var o=Rb(t);Xl(o,i),Xl(o,a),MD(t,e,n,r),CM.setMenubar(u,_M(t,n)),l.show(),function(t,e,n,r){var o=Co(ID(e,n.isPositionedAtTop())),i=function(r){var i=ID(e,n.isPositionedAtTop()),a=i.pos,u=i.bounds,c=o.get(),s=c.pos,l=c.bounds,f=u.height!==l.height||u.width!==l.width;o.set({pos:a,bounds:u}),f&&Fy(t,r),n.isVisible()&&(s!==a?n.update(!0):f&&(n.updateMode(),n.repositionPopups()))};r||(t.on("activate",n.show),t.on("deactivate",n.hide)),t.on("SkinLoaded ResizeWindow",(function(){return n.update(!0)})),t.on("NodeChange keydown",(function(t){pp.requestAnimationFrame((function(){return i(t)}))})),t.on("ScrollWindow",(function(){return n.updateMode()}));var a=Zc();a.set(rs(Bt.fromDom(t.getBody()),"load",i)),t.on("remove",(function(){a.clear()}))}(t,s,l,f),t.nodeChanged()}},m=function(){return pp.setEditorTimeout(t,d,0)};t.on("show",d),t.on("hide",l.hide),f||(t.on("focus",m),t.on("blur",l.hide)),t.on("init",(function(){(t.hasFocus()||f)&&m()})),qb(t,e);var g={show:function(){l.show()},hide:function(){l.hide()},enable:function(){Wb(e,!1)},disable:function(){Wb(e,!0)},isDisabled:function(){return Yd.isDisabled(u)}};return{editorContainer:u.element.dom,api:g}}}),UD="contexttoolbar-hide",jD=function(t,e){return Pi(M_,(function(n,r){var o=function(t){return{hide:function(){return Mi(t,mi())},getValue:function(){return Ef.getValue(t)}}}(t.get(n));e.onAction(o,r.event.buttonApi)}))},WD=function(t,e,n){var r={backstage:{shared:{providers:n}}};return"contextformtogglebutton"===e.type?function(t,e,n){var r=e.original;r.primary;var o=E(r,["primary"]),i=jr(iv(O(O({},o),{type:"togglebutton",onAction:h})));return wD(i,n.backstage.shared.providers,[jD(t,e)])}(t,e,r):function(t,e,n){var r=e.original;r.primary;var o=E(r,["primary"]),i=jr(nv(O(O({},o),{type:"button",onAction:h})));return xD(i,n.backstage.shared.providers,[jD(t,e)])}(t,e,r)},qD=function(t,e){var n=t.label.fold((function(){return{}}),(function(t){return{"aria-label":t}})),r=bp(xw.sketch({inputClasses:["tox-toolbar-textfield","tox-toolbar-nav-js"],data:t.initValue(),inputAttributes:n,selectOnFocus:!0,inputBehaviours:wc([nh.config({mode:"special",onEnter:function(t){return o.findPrimary(t).map((function(t){return Ai(t),!0}))},onLeft:function(t,e){return e.cut(),B.none()},onRight:function(t,e){return e.cut(),B.none()}})])})),o=function(t,e,n){var r=j(e,(function(e){return bp(WD(t,e,n))}));return{asSpecs:function(){return j(r,(function(t){return t.asSpec()}))},findPrimary:function(t){return st(e,(function(e,n){return e.primary?B.from(r[n]).bind((function(e){return e.getOpt(t)})).filter(w(Yd.isDisabled)):B.none()}))}}}(r,t.commands,e);return[{title:B.none(),items:[r.asSpec()]},{title:B.none(),items:o.asSpecs()}]},GD=qD,$D=function(t,e,n){return void 0===n&&(n=.01),e.bottom-t.y>=n&&t.bottom-e.y>=n},XD=function(t){var e=function(t){var e=t.getBoundingClientRect();if(e.height<=0&&e.width<=0){var n=De(Bt.fromDom(t.startContainer),t.startOffset).element;return(Pt(n)?Oe(n):B.some(n)).filter(Vt).map((function(t){return t.dom.getBoundingClientRect()})).getOr(e)}return e}(t.selection.getRng());if(t.inline){var n=An();return Pn(n.left+e.left,n.top+e.top,e.width,e.height)}var r=Fn(Bt.fromDom(t.getBody()));return Pn(r.x+e.left,r.y+e.top,e.width,e.height)},KD=function(t,e,n,r){void 0===r&&(r=0);var o=Rn(window),i=In(Bt.fromDom(t.getContentAreaContainer())),a=Sb(t)||kb(t)||Ob(t),u=function(t,e,n){var r=Math.max(t.x+n,e.x);return{x:r,width:Math.min(t.right-n,e.right)-r}}(i,o,r),c=u.x,s=u.width;if(t.inline&&!a)return Pn(c,o.y,s,o.height);var l=function(t,e,n,r,o,i){var a=Bt.fromDom(t.getContainer()),u=lu(a,".tox-editor-header").getOr(a),c=In(u),s=c.y>=e.bottom,l=r&&!s;if(t.inline&&l)return{y:Math.max(c.bottom+i,n.y),bottom:n.bottom};if(t.inline&&!l)return{y:n.y,bottom:Math.min(c.y-i,n.bottom)};var f="line"===o?In(a):e;return l?{y:Math.max(c.bottom+i,n.y),bottom:Math.min(f.bottom-i,n.bottom)}:{y:Math.max(f.y+i,n.y),bottom:Math.min(c.y-i,n.bottom)}}(t,i,o,e.header.isPositionedAtTop(),n,r),f=l.y,d=l.bottom;return Pn(c,f,s,d-f)},YD={valignCentre:[],alignCentre:[],alignLeft:["tox-pop--align-left"],alignRight:["tox-pop--align-right"],right:["tox-pop--right"],left:["tox-pop--left"],bottom:["tox-pop--bottom"],top:["tox-pop--top"],inset:["tox-pop--inset"]},JD={maxHeightFunction:hs(),maxWidthFunction:WT()},QD=function(t){return"node"===t},ZD=function(t,e,n,r,o){var i=XD(t),a=r.lastElement().exists((function(t){return ye(n,t)}));return function(t,e){var n=t.selection.getRng(),r=De(Bt.fromDom(n.startContainer),n.startOffset);return n.startContainer===n.endContainer&&n.startOffset===n.endOffset-1&&ye(r.element,e)}(t,n)?a?mp:cp:a?function(t,e,n){var r=rn(t,"position");Qe(t,"position",e);var o=n(t);return r.each((function(e){return Qe(t,"position",e)})),o}(e,r.getMode(),(function(){return $D(i,In(e))&&!r.isReposition()?hp:mp})):("fixed"===r.getMode()?o.y+An().top:o.y)+(fn(e)+12)<=i.y?cp:sp},tA=function(t,e,n,r){var o=function(e){return function(r,o,i,a,u){var c=ZD(t,a,e,n,u),s=O(O({},r),{y:u.y,height:u.height});return O(O({},c(s,o,i,a,u)),{alwaysFit:!0})}},i=function(t){return QD(r)?[o(t)]:[]};return e?{onLtr:function(t){return[ac,ec,nc,rc,oc,ic].concat(i(t))},onRtl:function(t){return[ac,nc,ec,oc,rc,ic].concat(i(t))}}:{onLtr:function(t){return[ic,ac,rc,ec,oc,nc].concat(i(t))},onRtl:function(t){return[ic,ac,oc,nc,rc,ec].concat(i(t))}}},eA=function(t,e){var n=G(e,(function(e){return e.predicate(t.dom)})),r=q(n,(function(t){return"contexttoolbar"===t.type}));return{contextToolbars:r.pass,contextForms:r.fail}},nA=function(t,e,n){var r=eA(t,e);if(r.contextForms.length>0)return B.some({elem:t,toolbars:[r.contextForms[0]]});var o=eA(t,n);if(o.contextForms.length>0)return B.some({elem:t,toolbars:[o.contextForms[0]]});if(r.contextToolbars.length>0||o.contextToolbars.length>0){var i=function(t){if(t.length<=1)return t;var e=function(e){return I(t,(function(t){return t.position===e}))},n=function(e){return G(t,(function(t){return t.position===e}))},r=e("selection"),o=e("node");if(r||o){if(o&&r){var i=n("node"),a=j(n("selection"),(function(t){return O(O({},t),{position:"node"})}));return i.concat(a)}return n(r?"selection":"node")}return n("line")}(r.contextToolbars.concat(o.contextToolbars));return B.some({elem:t,toolbars:i})}return B.none()},rA=function(t,e,n){return t(e)?B.none():Mo(e,(function(t){if(Vt(t)){var e=eA(t,n.inNodeScope),r=e.contextToolbars,o=e.contextForms,i=o.length>0?o:function(t){if(t.length<=1)return t;var e=function(e){return K(t,(function(t){return t.position===e}))};return e("selection").orThunk((function(){return e("node")})).orThunk((function(){return e("line")})).map((function(t){return t.position})).fold((function(){return[]}),(function(e){return G(t,(function(t){return t.position===e}))}))}(r);return i.length>0?B.some({elem:t,toolbars:i}):B.none()}return B.none()}),t)},oA=function(t,e){var n={},r=[],o=[],i={},a={},u=function(t,u){var c=jr(Ur("ContextForm",dv,u));n[t]=c,c.launch.map((function(n){i["form:"+t]=O(O({},u.launch),{type:"contextformtogglebutton"===n.type?"togglebutton":"button",onAction:function(){e(c)}})})),"editor"===c.scope?o.push(c):r.push(c),a[t]=c},c=function(t,e){var n;(n=e,Ur("ContextToolbar",mv,n)).each((function(n){"editor"===e.scope?o.push(n):r.push(n),a[t]=n}))},s=lt(t);return W(s,(function(e){var n=t[e];"contextform"===n.type?u(e,n):"contexttoolbar"===n.type&&c(e,n)})),{forms:n,inNodeScope:r,inEditorScope:o,lookupTable:a,formNavigators:i}},iA=ia("forward-slide"),aA=ia("backward-slide"),uA=ia("change-slide-event"),cA="tox-pop--resizing",sA="tox-pop--transition",lA=function(t,e,n,r){var o,i,a=r.backstage,u=a.shared,c=pe().deviceType.isTouch,s=ts(),l=ts(),f=ts(),d=eu((o={sink:n,onEscape:function(){return t.focus(),B.some(!0)}},i=Co([]),Yh.sketch({dom:{tag:"div",classes:["tox-pop"]},fireDismissalEventInstead:{event:"doNotDismissYet"},onShow:function(t){i.set([]),Yh.getContent(t).each((function(t){un(t.element,"visibility")})),Ia(t.element,cA),un(t.element,"width")},inlineBehaviours:wc([ch("context-toolbar-events",[Gi(ti(),(function(t,e){"width"===e.event.raw.propertyName&&(Ia(t.element,cA),un(t.element,"width"))})),Pi(uA,(function(t,e){var n=t.element;un(n,"width");var r=yn(n);Yh.setContent(t,e.event.contents),Va(n,cA);var o=yn(n);Qe(n,"width",r+"px"),Yh.getContent(t).each((function(t){e.event.focus.bind((function(t){return Mc(t),Nc(n)})).orThunk((function(){return nh.focusIn(t),Ac(Re(n))}))})),pp.setTimeout((function(){Qe(t.element,"width",o+"px")}),0)})),Pi(iA,(function(t,e){Yh.getContent(t).each((function(e){i.set(i.get().concat([{bar:e,focus:Ac(Re(t.element))}]))})),Di(t,uA,{contents:e.event.forwardContents,focus:B.none()})})),Pi(aA,(function(t,e){ut(i.get()).each((function(e){i.set(i.get().slice(0,i.get().length-1)),Di(t,uA,{contents:nu(e.bar),focus:e.focus})}))}))]),nh.config({mode:"special",onEscape:function(t){return ut(i.get()).fold((function(){return o.onEscape()}),(function(e){return Mi(t,aA),B.some(!0)}))}})]),lazySink:function(){return qn.value(o.sink)}}))),m=function(){var e=f.get().getOr("node"),n=QD(e)?1:0;return KD(t,u,e,n)},g=function(){return!(t.removed||c()&&a.isContextMenuOpen())},p=function(){if(g()){var e=m(),n=Ct(f.get(),"node")?function(t,e){return e.filter(Ie).map(Fn).getOrThunk((function(){return XD(t)}))}(t,s.get()):XD(t);return e.height<=0||!$D(n,e)}return!0},v=function(){s.clear(),l.clear(),f.clear(),Yh.hide(d)},b=function(){if(Yh.isOpen(d)){var t=d.element;un(t,"display"),p()?Qe(t,"display","none"):(l.set(0),Yh.reposition(d))}},y=function(e){return{dom:{tag:"div",classes:["tox-pop__dialog"]},components:[e],behaviours:wc([nh.config({mode:"acyclic"}),ch("pop-dialog-wrap-events",[$i((function(e){t.shortcuts.add("ctrl+F9","focus statusbar",(function(){return nh.focusIn(e)}))})),Xi((function(e){t.shortcuts.remove("ctrl+F9")}))])])}},x=Ut((function(){return oA(e,(function(t){var e=w([t]);Di(d,iA,{forwardContents:y(e)})}))})),w=function(e){var n=t.ui.registry.getAll().buttons,o=x(),i=O(O({},n),o.formNavigators),a=zb(t)===hv.scrolling?hv.scrolling:hv.default,c=J(j(e,(function(e){return"contexttoolbar"===e.type?function(e,n){return TD(t,{buttons:e,toolbar:n.items,allowToolbarGroups:!1},r,B.some(["form:"]))}(i,e):function(t,e){return GD(t,e)}(e,u.providers)})));return gM({type:a,uid:ia("context-toolbar"),initGroups:c,onEscape:B.none,cyclicKeying:!0,providers:u.providers})},C=function(e,r){var o="node"===e?u.anchors.node(r):u.anchors.cursor(),i=function(t,e,n,r){return"line"===e?{bubble:ys(12,0,YD),layouts:{onLtr:function(){return[uc]},onRtl:function(){return[cc]}},overrides:JD}:{bubble:ys(0,12,YD,1/12),layouts:tA(t,n,r,e),overrides:JD}}(t,e,c(),{lastElement:s.get,isReposition:function(){return Ct(l.get(),0)},getMode:function(){return Vl.getMode(n)}});return cr(o,i)},S=function(t,e){if(k.cancel(),g()){var r=w(t),o=t[0].position,i=C(o,e);f.set(o),l.set(1);var a=d.element;un(a,"display"),function(t){return Ct(kt(t,s.get(),ye),!0)}(e)||(Ia(a,sA),Vl.reset(n,d)),Yh.showWithinBounds(d,y(r),{anchor:i,transition:{classes:[sA],mode:"placement"}},(function(){return B.some(m())})),e.fold(s.clear,s.set),p()&&Qe(a,"display","none")}},k=Np((function(){t.hasFocus()&&!t.removed&&(Fa(d.element,sA)?k.throttle():function(t,e){var n=Bt.fromDom(e.getBody()),r=function(t){return ye(t,n)},o=Bt.fromDom(e.selection.getNode());return function(t){return!r(t)&&!we(n,t)}(o)?B.none():nA(o,t.inNodeScope,t.inEditorScope).orThunk((function(){return rA(r,o,t)}))}(x(),t).fold(v,(function(t){S(t.toolbars,B.some(t.elem))})))}),17);t.on("init",(function(){t.on("remove",v),t.on("ScrollContent ScrollWindow ObjectResized ResizeEditor longpress",b),t.on("click keyup focus SetContent",k.throttle),t.on(UD,v),t.on("contexttoolbar-show",(function(e){var n=x();yt(n.lookupTable,e.toolbarKey).each((function(n){S([n],_t(e.target!==t,e.target)),Yh.getContent(d).each(nh.focusIn)}))})),t.on("focusout",(function(e){pp.setEditorTimeout(t,(function(){Nc(n.element).isNone()&&Nc(d.element).isNone()&&v()}),0)})),t.on("SwitchMode",(function(){t.mode.isReadOnly()&&v()})),t.on("AfterProgressState",(function(e){e.state?v():t.hasFocus()&&k.throttle()})),t.on("NodeChange",(function(t){Nc(d.element).fold(k.throttle,h)}))}))},fA={unsupportedLength:["em","ex","cap","ch","ic","rem","lh","rlh","vw","vh","vi","vb","vmin","vmax","cm","mm","Q","in","pc","pt","px"],fixed:["px","pt"],relative:["%"],empty:[""]},dA=(FM="[eE][+-]?[0-9]+",jM=["Infinity","[0-9]+\\."+(UM=function(t){return"(?:"+t+")?"})(IM="[0-9]+")+UM(FM),"\\.[0-9]+"+UM(FM),IM+UM(FM)].join("|"),new RegExp("^([+-]?(?:"+jM+"))(.*)$")),mA=function(t,e){return B.from(dA.exec(t)).bind((function(t){var n=Number(t[1]),r=t[2];return function(t,e){return I(e,(function(e){return I(fA[e],(function(e){return t===e}))}))}(r,e)?B.some({value:n,unit:r}):B.none()}))},gA=function(t,e){var n=function(){var n=e.getOptions(t),r=e.getCurrent(t).map(e.hash),o=ts();return j(n,(function(n){return{type:"togglemenuitem",text:e.display(n),onSetup:function(i){var a=function(t){t&&(o.on((function(t){return t.setActive(!1)})),o.set(i)),i.setActive(t)};a(Ct(r,e.hash(n)));var u=e.watcher(t,n,a);return function(){o.clear(),u()}},onAction:function(){return e.setCurrent(t,n)}}}))};t.ui.registry.addMenuButton(e.name,{tooltip:e.text,icon:e.icon,fetch:function(t){return t(n())},onSetup:e.onToolbarSetup}),t.ui.registry.addNestedMenuItem(e.name,{type:"nestedmenuitem",text:e.text,getSubmenuItems:n,onSetup:e.onMenuSetup})},hA={name:"lineheight",text:"Line height",icon:"line-height",getOptions:function(t){return t.getParam("lineheight_formats","1 1.1 1.2 1.3 1.4 1.5 2","string").split(" ")},hash:function(t){return function(t,e){return mA(t,e).map((function(t){return t.value+t.unit}))}(t,["fixed","relative","empty"]).getOr(t)},display:b,watcher:function(t,e,n){return t.formatter.formatChanged("lineheight",n,!1,{value:e}).unbind},getCurrent:function(t){return B.from(t.queryCommandValue("LineHeight"))},setCurrent:function(t,e){return t.execCommand("LineHeight",!1,e)}},pA=function(t){gA(t,hA),function(t){return B.from(function(t){return t.getParam("content_langs",void 0,"array")}(t)).map((function(e){return{name:"language",text:"Language",icon:"language",getOptions:v(e),hash:function(t){return s(t.customCode)?t.code:t.code+"/"+t.customCode},display:function(t){return t.title},watcher:function(t,e,n){return t.formatter.formatChanged("lang",n,!1,{value:e.code,customValue:e.customCode}).unbind},getCurrent:function(t){var e=Bt.fromDom(t.selection.getNode());return Do(e,(function(t){return B.some(t).filter(Vt).bind((function(t){return $e(t,"lang").map((function(e){return{code:e,customCode:$e(t,"data-mce-lang").getOrUndefined(),title:""}}))}))}))},setCurrent:function(t,e){return t.execCommand("Lang",!1,e)},onToolbarSetup:function(e){var n=Zc();return e.setActive(t.formatter.match("lang",{},void 0,!0)),n.set(t.formatter.formatChanged("lang",e.setActive,!0)),n.clear}}}))}(t).each((function(e){return gA(t,e)}))},vA=function(t,e){!function(t,e){var n=VM(0,e,$M(t));t.ui.registry.addNestedMenuItem("align",{text:e.shared.providers.translate("Align"),getSubmenuItems:function(){return n.items.validateItems(n.getStyleItems())}})}(t,e),function(t,e){var n=VM(0,e,YM(t));t.ui.registry.addNestedMenuItem("fontformats",{text:e.shared.providers.translate("Fonts"),getSubmenuItems:function(){return n.items.validateItems(n.getStyleItems())}})}(t,e),function(t,e){var n=O({type:"advanced"},e.styleselect),r=VM(0,e,rD(t,n));t.ui.registry.addNestedMenuItem("formats",{text:"Formats",getSubmenuItems:function(){return r.items.validateItems(r.getStyleItems())}})}(t,e),function(t,e){var n=VM(0,e,nD(t));t.ui.registry.addNestedMenuItem("blockformats",{text:"Blocks",getSubmenuItems:function(){return n.items.validateItems(n.getStyleItems())}})}(t,e),function(t,e){var n=VM(0,e,tD(t));t.ui.registry.addNestedMenuItem("fontsizes",{text:"Font sizes",getSubmenuItems:function(){return n.items.validateItems(n.getStyleItems())}})}(t,e)},bA=function(t){return BM(t,"NodeChange",(function(e){e.setDisabled(!t.queryCommandState("outdent"))}))},yA=function(t){!function(t){t.ui.registry.addButton("outdent",{tooltip:"Decrease indent",icon:"outdent",onSetup:bA(t),onAction:HM(t,"outdent")}),t.ui.registry.addButton("indent",{tooltip:"Increase indent",icon:"indent",onAction:HM(t,"indent")})}(t)},xA=function(t,e){return function(){t.execCommand("mceToggleFormat",!1,e)}},wA=function(t){!function(t){wk.each([{name:"bold",text:"Bold",icon:"bold"},{name:"italic",text:"Italic",icon:"italic"},{name:"underline",text:"Underline",icon:"underline"},{name:"strikethrough",text:"Strikethrough",icon:"strike-through"},{name:"subscript",text:"Subscript",icon:"subscript"},{name:"superscript",text:"Superscript",icon:"superscript"}],(function(e,n){t.ui.registry.addToggleButton(e.name,{tooltip:e.text,icon:e.icon,onSetup:NM(t,e.name),onAction:xA(t,e.name)})}));for(var e=1;e<=6;e++){var n="h"+e;t.ui.registry.addToggleButton(n,{text:n.toUpperCase(),tooltip:"Heading "+e,onSetup:NM(t,n),onAction:xA(t,n)})}}(t),function(t){wk.each([{name:"cut",text:"Cut",action:"Cut",icon:"cut"},{name:"copy",text:"Copy",action:"Copy",icon:"copy"},{name:"paste",text:"Paste",action:"Paste",icon:"paste"},{name:"help",text:"Help",action:"mceHelp",icon:"help"},{name:"selectall",text:"Select all",action:"SelectAll",icon:"select-all"},{name:"newdocument",text:"New document",action:"mceNewDocument",icon:"new-document"},{name:"removeformat",text:"Clear formatting",action:"RemoveFormat",icon:"remove-formatting"},{name:"remove",text:"Remove",action:"Delete",icon:"remove"}],(function(e){t.ui.registry.addButton(e.name,{tooltip:e.text,icon:e.icon,onAction:HM(t,e.action)})}))}(t),function(t){wk.each([{name:"blockquote",text:"Blockquote",action:"mceBlockQuote",icon:"quote"}],(function(e){t.ui.registry.addToggleButton(e.name,{tooltip:e.text,icon:e.icon,onAction:HM(t,e.action),onSetup:NM(t,e.name)})}))}(t)},CA=function(t){wA(t),function(t){wk.each([{name:"bold",text:"Bold",action:"Bold",icon:"bold",shortcut:"Meta+B"},{name:"italic",text:"Italic",action:"Italic",icon:"italic",shortcut:"Meta+I"},{name:"underline",text:"Underline",action:"Underline",icon:"underline",shortcut:"Meta+U"},{name:"strikethrough",text:"Strikethrough",action:"Strikethrough",icon:"strike-through",shortcut:""},{name:"subscript",text:"Subscript",action:"Subscript",icon:"subscript",shortcut:""},{name:"superscript",text:"Superscript",action:"Superscript",icon:"superscript",shortcut:""},{name:"removeformat",text:"Clear formatting",action:"RemoveFormat",icon:"remove-formatting",shortcut:""},{name:"newdocument",text:"New document",action:"mceNewDocument",icon:"new-document",shortcut:""},{name:"cut",text:"Cut",action:"Cut",icon:"cut",shortcut:"Meta+X"},{name:"copy",text:"Copy",action:"Copy",icon:"copy",shortcut:"Meta+C"},{name:"paste",text:"Paste",action:"Paste",icon:"paste",shortcut:"Meta+V"},{name:"selectall",text:"Select all",action:"SelectAll",icon:"select-all",shortcut:"Meta+A"}],(function(e){t.ui.registry.addMenuItem(e.name,{text:e.text,icon:e.icon,shortcut:e.shortcut,onAction:HM(t,e.action)})})),t.ui.registry.addMenuItem("codeformat",{text:"Code",icon:"sourcecode",onAction:xA(t,"code")})}(t)},SA=function(t,e){return BM(t,"Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",(function(n){n.setDisabled(t.mode.isReadOnly()||!t.undoManager[e]())}))},kA=function(t){!function(t){t.ui.registry.addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Meta+Z",onSetup:SA(t,"hasUndo"),onAction:HM(t,"undo")}),t.ui.registry.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Meta+Y",onSetup:SA(t,"hasRedo"),onAction:HM(t,"redo")})}(t),function(t){t.ui.registry.addButton("undo",{tooltip:"Undo",icon:"undo",disabled:!0,onSetup:SA(t,"hasUndo"),onAction:HM(t,"undo")}),t.ui.registry.addButton("redo",{tooltip:"Redo",icon:"redo",disabled:!0,onSetup:SA(t,"hasRedo"),onAction:HM(t,"redo")})}(t)},_A=function(t){return BM(t,"VisualAid",(function(e){e.setActive(t.hasVisual)}))},OA=function(t){!function(t){t.ui.registry.addButton("visualaid",{tooltip:"Visual aids",text:"Visual aids",onAction:HM(t,"mceToggleVisualAid")})}(t),function(t){t.ui.registry.addToggleMenuItem("visualaid",{text:"Visual aids",onSetup:_A(t),onAction:HM(t,"mceToggleVisualAid")})}(t)},EA=function(t,e){!function(t){W([{name:"alignleft",text:"Align left",cmd:"JustifyLeft",icon:"align-left"},{name:"aligncenter",text:"Align center",cmd:"JustifyCenter",icon:"align-center"},{name:"alignright",text:"Align right",cmd:"JustifyRight",icon:"align-right"},{name:"alignjustify",text:"Justify",cmd:"JustifyFull",icon:"align-justify"}],(function(e){t.ui.registry.addToggleButton(e.name,{tooltip:e.text,icon:e.icon,onAction:HM(t,e.cmd),onSetup:NM(t,e.name)})})),t.ui.registry.addButton("alignnone",{tooltip:"No alignment",icon:"align-none",onAction:HM(t,"JustifyNone")})}(t),CA(t),vA(t,e),kA(t),function(t){!function(t){t.addCommand("mceApplyTextcolor",(function(e,n){!function(t,e,n){t.undoManager.transact((function(){t.focus(),t.formatter.apply(e,{value:n}),t.nodeChanged()}))}(t,e,n)})),t.addCommand("mceRemoveTextcolor",(function(e){!function(t,e){t.undoManager.transact((function(){t.focus(),t.formatter.remove(e,{value:null},null,!0),t.nodeChanged()}))}(t,e)}))}(t);var e=Co(ex),n=Co(ex);cx(t,"forecolor","forecolor","Text color",e),cx(t,"backcolor","hilitecolor","Background color",n),sx(t,"forecolor","forecolor","Text color"),sx(t,"backcolor","hilitecolor","Background color")}(t),OA(t),yA(t),pA(t)},zA=function(t,e){return{type:"makeshift",x:t,y:e}},TA=function(t){return"longpress"===t.type||0===t.type.indexOf("touch")},MA=function(t,e){var n=hb.DOM.getPos(t);return function(t,e,n){return zA(t.x+e,t.y+n)}(e,n.x,n.y)},DA=function(t,e){return"contextmenu"===e.type||"longpress"===e.type?t.inline?function(t){if(TA(t)){var e=t.touches[0];return zA(e.pageX,e.pageY)}return zA(t.pageX,t.pageY)}(e):MA(t.getContentAreaContainer(),function(t){if(TA(t)){var e=t.touches[0];return zA(e.clientX,e.clientY)}return zA(t.clientX,t.clientY)}(e)):AA(t)},AA=function(t){return{type:"selection",root:Bt.fromDom(t.selection.getNode())}},NA=function(t,e,n){switch(n){case"node":return function(t){return{type:"node",node:B.some(Bt.fromDom(t.selection.getNode())),root:Bt.fromDom(t.getBody())}}(t);case"point":return DA(t,e);case"selection":return AA(t)}},BA=function(t,e,n,r,o,i){var a=n(),u=NA(t,e,i);I_(a,pv.CLOSE_ON_EXECUTE,r,!1).map((function(t){e.preventDefault(),Yh.showMenuAt(o,{anchor:u},{menu:{markers:Dv("normal")},data:t})}))},RA={onLtr:function(){return[ac,ec,nc,rc,oc,ic,cp,sp,up,ip,ap,op]},onRtl:function(){return[ac,nc,ec,oc,rc,ic,cp,sp,ap,op,up,ip]}},HA={valignCentre:[],alignCentre:[],alignLeft:["tox-pop--align-left"],alignRight:["tox-pop--align-right"],right:["tox-pop--right"],left:["tox-pop--left"],bottom:["tox-pop--bottom"],top:["tox-pop--top"]},LA=function(t,e,n,r,o,i,a){var u=function(t,e,n){var r=NA(t,e,n);return O({bubble:ys(0,"point"===n?12:0,HA),layouts:RA,overrides:{maxWidthFunction:WT(),maxHeightFunction:hs()}},r)}(t,e,i);I_(n,pv.CLOSE_ON_EXECUTE,r,!0).map((function(n){e.preventDefault(),Yh.showMenuWithinBounds(o,{anchor:u},{menu:{markers:Dv("normal"),highlightImmediately:a},data:n,type:"horizontal"},(function(){return B.some(KD(t,r.shared,"node"===i?"node":"selection"))})),t.fire(UD)}))},VA=function(t,e,n,r,o,i){var a=pe(),u=a.os.isiOS(),c=a.os.isOSX(),s=a.os.isAndroid(),l=a.deviceType.isTouch(),f=function(){var a=n();LA(t,e,a,r,o,i,!(s||u||c&&l))};if((c||u)&&"node"!==i){var d=function(){!function(t){var e=t.selection.getRng(),n=function(){pp.setEditorTimeout(t,(function(){t.selection.setRng(e)}),10),i()};t.once("touchend",n);var r=function(t){t.preventDefault(),t.stopImmediatePropagation()};t.on("mousedown",r,!0);var o=function(){return i()};t.once("longpresscancel",o);var i=function(){t.off("touchend",n),t.off("longpresscancel",o),t.off("mousedown",r)}}(t),f()};!function(t,e){var n=t.selection;if(n.isCollapsed()||e.touches.length<1)return!1;var r=e.touches[0],o=n.getRng();return ll(t.getWin(),qs.domRange(o)).exists((function(t){return t.left<=r.clientX&&t.right>=r.clientX&&t.top<=r.clientY&&t.bottom>=r.clientY}))}(t,e)?(t.once("selectionchange",d),t.once("touchend",(function(){return t.off("selectionchange",d)}))):d()}else f()},PA=function(t){return"string"==typeof t?t.split(/[ ,]/):t},IA=function(t){return t.getParam("contextmenu_never_use_native",!1,"boolean")},FA=function(t){return function(t,e,n){var r=t.ui.registry.getAll().contextMenus;return B.from(t.getParam(e)).map(PA).getOrThunk((function(){return G(PA(n),(function(t){return xt(r,t)}))}))}(t,"contextmenu","link linkchecker image imagetools table spellchecker configurepermanentpen")},UA=function(t){return o(t)?"|"===t:"separator"===t.type},jA={type:"separator"},WA=function(t){var e,n=function(t){return{text:t.text,icon:t.icon,disabled:t.disabled,shortcut:t.shortcut}};if(o(t))return t;switch(t.type){case"separator":return jA;case"submenu":return O(O({type:"nestedmenuitem"},n(t)),{getSubmenuItems:function(){var e=t.getSubmenuItems();return o(e)?e:j(e,WA)}});default:return O(O({type:"menuitem"},n(t)),{onAction:(e=t.onAction,function(){return e()})})}},qA=function(t,e){if(0===e.length)return t;var n=ut(t).filter((function(t){return!UA(t)})).fold((function(){return[]}),(function(t){return[jA]}));return t.concat(n).concat(e).concat([jA])},GA=function(t,e){return"longpress"!==e.type&&(2!==e.button||e.target===t.getBody()&&""===e.pointerType)},$A=function(t,e){return GA(t,e)?t.selection.getStart(!0):e.target},XA=function(t,e,n){var r=pe().deviceType.isTouch,i=eu(Yh.sketch({dom:{tag:"div"},lazySink:e,onEscape:function(){return t.focus()},onShow:function(){return n.setContextMenuState(!0)},onHide:function(){return n.setContextMenuState(!1)},fireDismissalEventInstead:{},inlineBehaviours:wc([ch("dismissContextMenu",[Pi(Ci(),(function(e,n){uf.close(e),t.focus()}))])])})),a=function(t){return Yh.hide(i)},u=function(e){if(IA(t)&&e.preventDefault(),!function(t,e){return e.ctrlKey&&!IA(t)}(t,e)&&!function(t){return!1===t.getParam("contextmenu")}(t)){var a=function(t,e){var n=function(t){return t.getParam("contextmenu_avoid_overlap","","string")}(t),r=GA(t,e)?"selection":"point";if(Dt(n)){var o=$A(t,e);return Nx(Bt.fromDom(o),n)?"node":r}return r}(t,e);(r()?VA:BA)(t,e,(function(){var n=$A(t,e),r=t.ui.registry.getAll(),i=FA(t);return function(t,e,n){var r=X(e,(function(e,r){return yt(t,r.toLowerCase()).map((function(t){var r=t.update(n);if(o(r))return qA(e,r.split(" "));if(r.length>0){var i=j(r,WA);return qA(e,i)}return e})).getOrThunk((function(){return e.concat([r])}))}),[]);return r.length>0&&UA(r[r.length-1])&&r.pop(),r}(r.contextMenus,i,n)}),n,i,a)}};t.on("init",(function(){var e="ResizeEditor ScrollContent ScrollWindow longpresscancel"+(r()?"":" ResizeWindow");t.on(e,a),t.on("longpress contextmenu",u)}))},KA=So([{offset:["x","y"]},{absolute:["x","y"]},{fixed:["x","y"]}]),YA=function(t){return function(e){return e.translate(-t.left,-t.top)}},JA=function(t){return function(e){return e.translate(t.left,t.top)}},QA=function(t){return function(e,n){return X(t,(function(t,e){return e(t)}),gn(e,n))}},ZA=function(t,e,n){return t.fold(QA([JA(n),YA(e)]),QA([YA(e)]),QA([]))},tN=function(t,e,n){return t.fold(QA([JA(n)]),QA([]),QA([JA(e)]))},eN=function(t,e,n){return t.fold(QA([]),QA([YA(n)]),QA([JA(e),YA(n)]))},nN=function(t,e,n){var r=t.fold((function(t,e){return{position:B.some("absolute"),left:B.some(t+"px"),top:B.some(e+"px")}}),(function(t,e){return{position:B.some("absolute"),left:B.some(t-n.left+"px"),top:B.some(e-n.top+"px")}}),(function(t,e){return{position:B.some("fixed"),left:B.some(t+"px"),top:B.some(e+"px")}}));return O({right:B.none(),bottom:B.none()},r)},rN=function(t,e,n,r){var o=function(t,o){return function(i,a){var u=t(e,n,r);return o(i.getOr(u.left),a.getOr(u.top))}};return t.fold(o(eN,oN),o(tN,iN),o(ZA,aN))},oN=KA.offset,iN=KA.absolute,aN=KA.fixed,uN=function(t,e){var n=Ge(t,e);return s(n)?NaN:parseInt(n,10)},cN=function(t,e,n,r){return function(t,e){var n=t.element,r=uN(n,e.leftAttr),o=uN(n,e.topAttr);return isNaN(r)||isNaN(o)?B.none():B.some(gn(r,o))}(t,e).fold((function(){return n}),(function(t){return aN(t.left+r.left,t.top+r.top)}))},sN=function(t,e,n,r,o,i){var a=cN(t,e,n,r),u=e.mustSnap?dN(t,e,a,o,i):mN(t,e,a,o,i),c=ZA(a,o,i);return function(t,e,n){var r=t.element;We(r,e.leftAttr,n.left+"px"),We(r,e.topAttr,n.top+"px")}(t,e,c),u.fold((function(){return{coord:aN(c.left,c.top),extra:B.none()}}),(function(t){return{coord:t.output,extra:t.extra}}))},lN=function(t,e){!function(t,e){var n=t.element;Ke(n,e.leftAttr),Ke(n,e.topAttr)}(t,e)},fN=function(t,e,n,r){return st(t,(function(t){var o=t.sensor;return function(t,e,n,r,o,i){var a=tN(t,o,i),u=tN(e,o,i);return Math.abs(a.left-u.left)<=n&&Math.abs(a.top-u.top)<=r}(e,o,t.range.left,t.range.top,n,r)?B.some({output:rN(t.output,e,n,r),extra:t.extra}):B.none()}))},dN=function(t,e,n,r,o){var i=e.getSnapPoints(t);return fN(i,n,r,o).orThunk((function(){return X(i,(function(t,e){var i=e.sensor,a=function(t,e,n,r,o,i){var a=tN(t,o,i),u=tN(e,o,i),c=Math.abs(a.left-u.left),s=Math.abs(a.top-u.top);return gn(c,s)}(n,i,e.range.left,e.range.top,r,o);return t.deltas.fold((function(){return{deltas:B.some(a),snap:B.some(e)}}),(function(n){return(a.left+a.top)/2<=(n.left+n.top)/2?{deltas:B.some(a),snap:B.some(e)}:t}))}),{deltas:B.none(),snap:B.none()}).snap.map((function(t){return{output:rN(t.output,n,r,o),extra:t.extra}}))}))},mN=function(t,e,n,r,o){var i=e.getSnapPoints(t);return fN(i,n,r,o)},gN=Object.freeze({__proto__:null,snapTo:function(t,e,n,r){var o=e.getTarget(t.element);if(e.repositionTarget){var i=Ce(t.element),a=An(i),u=bz(o),c=function(t,e,n){return{coord:rN(t.output,t.output,e,n),extra:t.extra}}(r,a,u),s=nN(c.coord,0,u);tn(o,s)}}}),hN="data-initial-z-index",pN=function(t,e){t.getSystem().addToGui(e),function(t){Oe(t.element).filter(Vt).each((function(e){rn(e,"z-index").each((function(t){We(e,hN,t)})),Qe(e,"z-index",en(t.element,"z-index"))}))}(e)},vN=function(t){!function(t){Oe(t.element).filter(Vt).each((function(t){$e(t,hN).fold((function(){return un(t,"z-index")}),(function(e){return Qe(t,"z-index",e)})),Ke(t,hN)}))}(t),t.getSystem().removeFromGui(t)},bN=function(t,e,n){return t.getSystem().build($x.sketch({dom:{styles:{left:"0px",top:"0px",width:"100%",height:"100%",position:"fixed","z-index":"1000000000000000"},classes:[e]},events:n}))},yN=fo("snaps",[Yr("getSnapPoints"),zu("onSensor"),Yr("leftAttr"),Yr("topAttr"),mo("lazyViewport",Un),mo("mustSnap",!1)]),xN=[mo("useFixed",S),Yr("blockerClass"),mo("getTarget",b),mo("onDrag",h),mo("repositionTarget",!0),mo("onDrop",h),yo("getBounds",Un),yN],wN=function(t){return(e=rn(t,"left"),n=rn(t,"top"),r=rn(t,"position"),o=function(t,e,n){return("fixed"===n?aN:oN)(parseInt(t,10),parseInt(e,10))},e.isSome()&&n.isSome()&&r.isSome()?B.some(o(e.getOrDie(),n.getOrDie(),r.getOrDie())):B.none()).getOrThunk((function(){var e=pn(t);return iN(e.left,e.top)}));var e,n,r,o},CN=function(t,e,n,r,o,i,a){return function(t,e,n,r,o){var i=o.bounds,a=tN(e,n,r),u=Gu(a.left,i.x,i.x+i.width-o.width),c=Gu(a.top,i.y,i.y+i.height-o.height),s=iN(u,c);return e.fold((function(){var t=eN(s,n,r);return oN(t.left,t.top)}),v(s),(function(){var t=ZA(s,n,r);return aN(t.left,t.top)}))}(0,e.fold((function(){var t,e,a,u=(t=n,e=i.left,a=i.top,t.fold((function(t,n){return oN(t+e,n+a)}),(function(t,n){return iN(t+e,n+a)}),(function(t,n){return aN(t+e,n+a)}))),c=ZA(u,r,o);return aN(c.left,c.top)}),(function(e){var a=sN(t,e,n,i,r,o);return a.extra.each((function(n){e.onSensor(t,n)})),a.coord})),r,o,a)},SN=function(t,e){return{bounds:t.getBounds(),height:dn(e.element),width:xn(e.element)}},kN=function(t,e,n,r,o){var i=n.update(r,o),a=n.getStartData().getOrThunk((function(){return SN(e,t)}));i.each((function(n){!function(t,e,n,r){var o=e.getTarget(t.element);if(e.repositionTarget){var i=Ce(t.element),a=An(i),u=bz(o),c=wN(o),s=CN(t,e.snaps,c,a,u,r,n),l=nN(s,0,u);tn(o,l)}e.onDrag(t,o,r)}(t,e,a,n)}))},_N=function(t,e,n,r){e.each(vN),n.snaps.each((function(e){lN(t,e)}));var o=n.getTarget(t.element);r.reset(),n.onDrop(t,o)},ON=function(t){return function(e,n){var r=function(t){n.setStartData(SN(e,t))};return Hi(z([Pi(bi(),(function(t){n.getStartData().each((function(){return r(t)}))}))],t(e,n,r),!0))}},EN=Object.freeze({__proto__:null,getData:function(t){return B.from(gn(t.x,t.y))},getDelta:function(t,e){return gn(e.left-t.left,e.top-t.top)}}),zN=function(t,e,n){return[Pi(Fo(),(function(r,o){if(0===o.event.raw.button){o.stop();var i=function(){return _N(r,B.some(c),t,e)},a=Bx(i,200),u={drop:i,delayDrop:a.schedule,forceDrop:i,move:function(n){a.cancel(),kN(r,t,e,EN,n)}},c=bN(r,t.blockerClass,function(t){return Hi([Pi(Fo(),t.forceDrop),Pi(Wo(),t.drop),Pi(Uo(),(function(e,n){t.move(n.event)})),Pi(jo(),t.delayDrop)])}(u));n(r),pN(r,c)}}))]},TN=z(z([],xN,!0),[Au("dragger",{handlers:ON(zN)})],!1),MN=Object.freeze({__proto__:null,getData:function(t){var e=t.raw.touches;return 1===e.length?function(t){var e=t[0];return B.some(gn(e.clientX,e.clientY))}(e):B.none()},getDelta:function(t,e){return gn(e.left-t.left,e.top-t.top)}}),DN=function(t,e,n){var r=ts(),o=function(n){_N(n,r.get(),t,e),r.clear()};return[Pi(Lo(),(function(i,a){a.stop();var u=function(){return o(i)},c={drop:u,delayDrop:h,forceDrop:u,move:function(n){kN(i,t,e,MN,n)}},s=bN(i,t.blockerClass,function(t){return Hi([Pi(Lo(),t.forceDrop),Pi(Po(),t.drop),Pi(Io(),t.drop),Pi(Vo(),(function(e,n){t.move(n.event)}))])}(c));r.set(s);n(i),pN(i,s)})),Pi(Vo(),(function(n,r){r.stop(),kN(n,t,e,MN,r.event)})),Pi(Po(),(function(t,e){e.stop(),o(t)})),Pi(Io(),o)]},AN=TN,NN=z(z([],xN,!0),[Au("dragger",{handlers:ON(DN)})],!1),BN=z(z([],xN,!0),[Au("dragger",{handlers:ON((function(t,e,n){return z(z([],zN(t,e,n),!0),DN(t,e,n),!0)}))})],!1),RN=_c({branchKey:"mode",branches:Object.freeze({__proto__:null,mouse:AN,touch:NN,mouseOrTouch:BN}),name:"dragging",active:{events:function(t,e){return t.dragger.handlers(t,e)}},extra:{snap:function(t){return{sensor:t.sensor,range:t.range,output:t.output,extra:B.from(t.extra)}}},state:Object.freeze({__proto__:null,init:function(){var t=B.none(),e=B.none(),n=v({});return Ca({readState:n,reset:function(){t=B.none(),e=B.none()},update:function(e,n){return e.getData(n).bind((function(n){return function(e,n){var r=t.map((function(t){return e.getDelta(t,n)}));return t=B.some(n),r}(e,n)}))},getStartData:function(){return e},setStartData:function(t){e=B.some(t)}})}}),apis:gN}),HN=function(t,e,n,r,o,i){return t.fold((function(){return RN.snap({sensor:iN(n-20,r-20),range:gn(o,i),output:iN(B.some(n),B.some(r)),extra:{td:e}})}),(function(t){var o=n-20,i=r-20,a=t.element.dom.getBoundingClientRect();return RN.snap({sensor:iN(o,i),range:gn(40,40),output:iN(B.some(n-a.width/2),B.some(r-a.height/2)),extra:{td:e}})}))},LN=function(t,e,n){return{getSnapPoints:t,leftAttr:"data-drag-left",topAttr:"data-drag-top",onSensor:function(t,r){var o=r.td;(function(t,e){return t.exists((function(t){return ye(t,e)}))})(e.get(),o)||(e.set(o),n(o))},mustSnap:!0}},VN=function(t){return bp(vp.sketch({dom:{tag:"div",classes:["tox-selector"]},buttonBehaviours:wc([RN.config({mode:"mouseOrTouch",blockerClass:"blocker",snaps:t}),sC.config({})]),eventOrder:{mousedown:["dragging","alloy.base.behaviour"],touchstart:["dragging","alloy.base.behaviour"]}}))},PN=function(t,e){var n=Co([]),r=Co([]),o=Co(!1),i=ts(),a=ts(),u=function(t){var n=Fn(t);return HN(f.getOpt(e),t,n.x,n.y,n.width,n.height)},c=function(t){var n=Fn(t);return HN(d.getOpt(e),t,n.right,n.bottom,n.width,n.height)},s=LN((function(){return j(n.get(),(function(t){return u(t)}))}),i,(function(e){a.get().each((function(n){t.fire("TableSelectorChange",{start:e,finish:n})}))})),l=LN((function(){return j(r.get(),(function(t){return c(t)}))}),a,(function(e){i.get().each((function(n){t.fire("TableSelectorChange",{start:n,finish:e})}))})),f=VN(s),d=VN(l),m=eu(f.asSpec()),g=eu(d.asSpec()),h=function(e,n,r,o){var i=r(n);RN.snapTo(e,i);!function(e,n,r,o){var i=n.dom.getBoundingClientRect();un(e.element,"display");var a=_e(Bt.fromDom(t.getBody())).dom.innerHeight,u=r(i),c=o(i,a);(u||c)&&Qe(e.element,"display","none")}(e,n,(function(t){return t[o]<0}),(function(t,e){return t[o]>e}))},p=function(t){return h(m,t,u,"top")},v=function(t){return h(g,t,c,"bottom")};pe().deviceType.isTouch()&&(t.on("TableSelectionChange",(function(t){o.get()||(jl(e,m),jl(e,g),o.set(!0)),i.set(t.start),a.set(t.finish),t.otherCells.each((function(e){n.set(e.upOrLeftCells),r.set(e.downOrRightCells),p(t.start),v(t.finish)}))})),t.on("ResizeEditor ResizeWindow ScrollContent",(function(){i.get().each(p),a.get().each(v)})),t.on("TableSelectionClear",(function(){o.get()&&(Gl(m),Gl(g),o.set(!1)),i.clear(),a.clear()})))},IN=function(t){if(1===t.nodeType){if("BR"===t.nodeName||t.getAttribute("data-mce-bogus"))return!0;if("bookmark"===t.getAttribute("data-mce-type"))return!0}return!1},FN=function(t,e,n){e.delimiter||(e.delimiter="»");return{dom:{tag:"div",classes:["tox-statusbar__path"],attributes:{role:"navigation"}},behaviours:wc([nh.config({mode:"flow",selector:"div[role=button]"}),Yd.config({disabled:n.isDisabled}),Gb(),tw.config({}),uh.config({}),ch("elementPathEvents",[$i((function(r,o){t.shortcuts.add("alt+F11","focus statusbar elementpath",(function(){return nh.focusIn(r)})),t.on("NodeChange",(function(o){var i,a,u=function(e){for(var n=[],r=e.length;r-- >0;){var o=e[r];if(1===o.nodeType&&!IN(o)){var i=t.fire("ResolveName",{name:o.nodeName.toLowerCase(),target:o});if(i.isDefaultPrevented()||n.push({name:i.name,element:o}),i.isPropagationStopped())break}}return n}(o.parents);u.length>0?uh.set(r,(i=j(u||[],(function(e,r){return vp.sketch({dom:{tag:"div",classes:["tox-statusbar__path-item"],attributes:{role:"button","data-index":r,"tab-index":-1,"aria-level":r+1},innerHtml:e.name},action:function(n){t.focus(),t.selection.select(e.element),t.nodeChanged()},buttonBehaviours:wc([Xb(n.isDisabled),Gb()])})})),a={dom:{tag:"div",classes:["tox-statusbar__path-divider"],attributes:{"aria-hidden":!0},innerHtml:" "+e.delimiter+" "}},X(i.slice(1),(function(t,e){var n=t;return n.push(a),n.push(e),n}),[i[0]]))):uh.set(r,[])}))}))])]),components:[]}};!function(t){t[t.None=0]="None",t[t.Both=1]="Both",t[t.Vertical=2]="Vertical"}(WM||(WM={}));var UN=function(t,e,n){var r=Bt.fromDom(t.getContainer()),o=function(t,e,n,r,o){var i={};return i.height=HD(r+e.top,xb(t),Cb(t)),n===WM.Both&&(i.width=HD(o+e.left,yb(t),wb(t))),i}(t,e,n,fn(r),yn(r));dt(o,(function(t,e){return Qe(r,e,RD(t))})),function(t){t.fire("ResizeEditor")}(t)},jN=function(t,e,n,r){var o=gn(20*n,20*r);return UN(t,o,e),B.some(!0)},WN=function(t,e){var n=function(t){var e=!t.hasPlugin("autoresize"),n=t.getParam("resize",e);return!1===n?WM.None:"both"===n?WM.Both:WM.Vertical}(t);return n===WM.None?B.none():B.some(zp("resize-handle",{tag:"div",classes:["tox-statusbar__resize-handle"],attributes:{title:e.translate("Resize")},behaviours:[RN.config({mode:"mouse",repositionTarget:!1,onDrag:function(e,r,o){return UN(t,o,n)},blockerClass:"tox-blocker"}),nh.config({mode:"special",onLeft:function(){return jN(t,n,-1,0)},onRight:function(){return jN(t,n,1,0)},onUp:function(){return jN(t,n,0,-1)},onDown:function(){return jN(t,n,0,1)}}),tw.config({}),mh.config({})]},e.icons))},qN=function(t,e){var n=function(){var n,r=[];return t.getParam("elementpath",!0,"boolean")&&r.push(FN(t,{},e)),t.hasPlugin("wordcount")&&r.push(function(t,e){var n,r=function(t,n,r){return uh.set(t,[Qa(e.translate(["{0} "+r,n[r]]))])};return vp.sketch({dom:{tag:"button",classes:["tox-statusbar__wordcount"]},components:[],buttonBehaviours:wc([Xb(e.isDisabled),Gb(),tw.config({}),uh.config({}),Ef.config({store:{mode:"memory",initialValue:{mode:"words",count:{words:0,characters:0}}}}),ch("wordcount-events",[Yi((function(t){var e=Ef.getValue(t),n="words"===e.mode?"characters":"words";Ef.setValue(t,{mode:n,count:e.count}),r(t,e.count,n)})),$i((function(e){t.on("wordCountUpdate",(function(t){var n=Ef.getValue(e).mode;Ef.setValue(e,{mode:n,count:t.wordCount}),r(e,t.wordCount,n)}))}))])]),eventOrder:(n={},n[si()]=["disabling","alloy.base.behaviour","wordcount-events"],n)})}(t,e)),t.getParam("branding",!0,"boolean")&&r.push({dom:{tag:"span",classes:["tox-statusbar__branding"],innerHtml:'<a href="https://www.tiny.cloud/?utm_campaign=editor_referral&amp;utm_medium=poweredby&amp;utm_source=tinymce&amp;utm_content=v5" rel="noopener" target="_blank" tabindex="-1" aria-label="'+(n=yp.translate(["Powered by {0}","Tiny"]))+'">'+n+"</a>"}}),r.length>0?[{dom:{tag:"div",classes:["tox-statusbar__text-container"]},components:r}]:[]};return{dom:{tag:"div",classes:["tox-statusbar"]},components:function(){var r=n(),o=WN(t,e);return r.concat(o.toArray())}()}},GN=function(t){var e,n,r,o,i=t.inline,a=i?FD:ND,u=Lb(t)?Gz:pz,c=B.none(),s=pe(),l=s.browser.isIE()?["tox-platform-ie"]:[],f=s.deviceType.isTouch()?["tox-platform-touch"]:[],d=Ab(t),m=Rb(t),g=yp.isRtl()?{attributes:{dir:"rtl"}}:{},p={attributes:(e={},e[ks]=d?jc.BottomToTop:jc.TopToBottom,e)},v=function(){return c.bind(CM.getHeader)},b=function(){Qe(G.element,"width",document.body.clientWidth+"px")},y=eu((n=ye(Fe(),m)&&"grid"===en(m,"display"),r={dom:O({tag:"div",classes:["tox","tox-silver-sink","tox-tinymce-aux"].concat(l).concat(f)},g),behaviours:wc([Vl.config({useFixed:function(){return u.isDocked(v)}})])},o={dom:{styles:{width:document.body.clientWidth+"px"}},events:Hi([Pi(yi(),b)])},cr(r,n?o:{}))),x=function(){return qn.value(y)},w=bp({dom:{tag:"div",classes:["tox-anchorbar"]}}),C=function(){return c.bind((function(t){return CM.getThrobber(t)})).getOrDie("Could not find throbber element")},S=nz(y,t,(function(){return c.bind((function(t){return w.getOpt(t)})).getOrDie("Could not find a anchor bar element")})),k=CM.parts.menubar({dom:{tag:"div",classes:["tox-menubar"]},backstage:S,onEscape:function(){t.focus()}}),_=zb(t),E=CM.parts.toolbar(O({dom:{tag:"div",classes:["tox-toolbar"]},getSink:x,providers:S.shared.providers,onEscape:function(){t.focus()},type:_,lazyToolbar:function(){return c.bind((function(t){return CM.getToolbar(t)})).getOrDie("Could not find more toolbar element")},lazyHeader:function(){return v().getOrDie("Could not find header element")}},p)),z=CM.parts["multiple-toolbar"]({dom:{tag:"div",classes:["tox-toolbar-overlord"]},providers:S.shared.providers,onEscape:function(){t.focus()},type:_}),T=CM.parts.socket({dom:{tag:"div",classes:["tox-edit-area"]}}),M=CM.parts.sidebar({dom:{tag:"div",classes:["tox-sidebar"]}}),D=CM.parts.throbber({dom:{tag:"div",classes:["tox-throbber"]},backstage:S}),A=t.getParam("statusbar",!0,"boolean")&&!i?B.some(qN(t,S.shared.providers)):B.none(),N={dom:{tag:"div",classes:["tox-sidebar-wrap"]},components:[T,M]},R=Ob(t),H=kb(t),L=Sb(t),V=CM.parts.header({dom:O({tag:"div",classes:["tox-editor-header"]},p),components:J([L?[k]:[],R?[z]:H?[E]:[],Bb(t)?[]:[w.asSpec()]]),sticky:Lb(t),editor:t,sharedBackstage:S.shared}),P=J([d?[]:[V],i?[]:[N],d?[V]:[]]),I=J([[{dom:{tag:"div",classes:["tox-editor-container"]},components:P}],i?[]:A.toArray(),[D]]),F=Hb(t),U=O(O({role:"application"},yp.isRtl()?{dir:"rtl"}:{}),F?{"aria-hidden":"true"}:{}),j=eu(CM.sketch({dom:{tag:"div",classes:["tox","tox-tinymce"].concat(i?["tox-tinymce-inline"]:[]).concat(d?["tox-tinymce--toolbar-bottom"]:[]).concat(f).concat(l),styles:O({visibility:"hidden"},F?{opacity:"0",border:"0"}:{}),attributes:U},components:I,behaviours:wc([Gb(),Yd.config({disableClass:"tox-tinymce--disabled"}),nh.config({mode:"cyclic",selector:".tox-menubar, .tox-toolbar, .tox-toolbar__primary, .tox-toolbar__overflow--open, .tox-sidebar__overflow--open, .tox-statusbar__path, .tox-statusbar__wordcount, .tox-statusbar__branding a, .tox-statusbar__resize-handle"})])}));c=B.some(j),t.shortcuts.add("alt+F9","focus menubar",(function(){CM.focusMenubar(j)})),t.shortcuts.add("alt+F10","focus toolbar",(function(){CM.focusToolbar(j)})),t.addCommand("ToggleToolbarDrawer",(function(){CM.toggleToolbarDrawer(j)})),t.addQueryStateHandler("ToggleToolbarDrawer",(function(){return CM.isToolbarDrawerToggled(j)}));var q=Xx(j),G=Xx(y);!function(t,e,n){var r=function(t,r){W([e,n],(function(e){e.broadcastEvent(t,r)}))},o=function(t,r){W([e,n],(function(e){e.broadcastOn([t],r)}))},i=function(t){return o(cf(),{target:t.target})},a=Tc(),u=ns(a,"touchstart",i),c=ns(a,"touchmove",(function(t){return r(pi(),t)})),s=ns(a,"touchend",(function(t){return r(vi(),t)})),l=ns(a,"mousedown",i),f=ns(a,"mouseup",(function(t){0===t.raw.button&&o(lf(),{target:t.target})})),d=function(t){return o(cf(),{target:Bt.fromDom(t.target)})},m=function(t){0===t.button&&o(lf(),{target:Bt.fromDom(t.target)})},g=function(){W(t.editorManager.get(),(function(e){t!==e&&e.fire("DismissPopups",{relatedTarget:t})}))},h=function(t){return r(bi(),os(t))},p=function(t){o(sf(),{}),r(yi(),os(t))},v=function(){return o(sf(),{})},b=function(e){e.state&&o(cf(),{target:Bt.fromDom(t.getContainer())})},y=function(t){o(cf(),{target:Bt.fromDom(t.relatedTarget.getContainer())})};t.on("PostRender",(function(){t.on("click",d),t.on("tap",d),t.on("mouseup",m),t.on("mousedown",g),t.on("ScrollWindow",h),t.on("ResizeWindow",p),t.on("ResizeEditor",v),t.on("AfterProgressState",b),t.on("DismissPopups",y)})),t.on("remove",(function(){t.off("click",d),t.off("tap",d),t.off("mouseup",m),t.off("mousedown",g),t.off("ScrollWindow",h),t.off("ResizeWindow",p),t.off("ResizeEditor",v),t.off("AfterProgressState",b),t.off("DismissPopups",y),l.unbind(),u.unbind(),c.unbind(),s.unbind(),f.unbind()})),t.on("detach",(function(){Yl(e),Yl(n),e.destroy(),n.destroy()}))}(t,q,G);var $=function(){var e=RD(LD(t)),n=RD(function(t){return VD(t).getOr(bb(t))}(t));return t.inline||(an("div","width",n)&&Qe(j.element,"width",n),an("div","height",e)?Qe(j.element,"height",e):Qe(j.element,"height","200px")),e};return{mothership:q,uiMothership:G,backstage:S,renderUI:function(){u.setup(t,S.shared,v),EA(t,S),XA(t,x,S),function(t){var e=t.ui.registry.getAll().sidebars;W(lt(e),(function(n){var r=e[n],o=function(){return Ct(B.from(t.queryCommandValue("ToggleSidebar")),n)};t.ui.registry.addToggleButton(n,{icon:r.icon,tooltip:r.tooltip,onAction:function(e){t.execCommand("ToggleSidebar",!1,n),e.setActive(o())},onSetup:function(e){var n=function(){return e.setActive(o())};return t.on("ToggleSidebar",n),function(){t.off("ToggleSidebar",n)}}})}))}(t),BT(t,C,S.shared),mt(function(t){return t.getParam("toolbar_groups",{},"object")}(t),(function(e,n){t.ui.registry.addGroupToolbarButton(n,e)}));var e=t.ui.registry.getAll(),n=e.buttons,r=e.menuItems,o=e.contextToolbars,i=e.sidebars,c=_b(t),s={menuItems:r,menus:Vb(t),menubar:Pb(t),toolbar:c.getOrThunk((function(){return function(t){return t.getParam("toolbar",!0)}(t)})),allowToolbarGroups:_===hv.floating,buttons:n,sidebar:i};lA(t,o,y,{backstage:S}),PN(t,y);var l=t.getElement(),f=$(),d={mothership:q,uiMothership:G,outerContainer:j},m={targetNode:l,height:f};return a.render(t,d,s,S,m)},getUi:function(){return{channels:{broadcastAll:G.broadcast,broadcastOn:G.broadcastOn,register:h}}}}},$N=v([Yr("lazySink"),io("dragBlockClass"),yo("getBounds",Un),mo("useTabstopAt",k),mo("eventOrder",{}),zf("modalBehaviours",[nh]),Tu("onExecute"),Du("onEscape")]),XN={sketch:b},KN=v([id({name:"draghandle",overrides:function(t,e){return{behaviours:wc([RN.config({mode:"mouse",getTarget:function(t){return cu(t,'[role="dialog"]').getOr(t)},blockerClass:t.dragBlockClass.getOrDie(new Error("The drag blocker class was not specified for a dialog with a drag handle: \n"+JSON.stringify(e,null,2)).message),getBounds:t.getDragBounds})])}}}),rd({schema:[Yr("dom")],name:"title"}),rd({factory:XN,schema:[Yr("dom")],name:"close"}),rd({factory:XN,schema:[Yr("dom")],name:"body"}),id({factory:XN,schema:[Yr("dom")],name:"footer"}),od({factory:{sketch:function(t,e){return O(O({},t),{dom:e.dom,components:e.components})}},schema:[mo("dom",{tag:"div",styles:{position:"fixed",left:"0px",top:"0px",right:"0px",bottom:"0px"}}),mo("components",[])],name:"blocker"})]),YN=Ad({name:"ModalDialog",configFields:$N(),partFields:KN(),factory:function(t,e,n,r){var o,i=ts(),a=ia("modal-events"),u=O(O({},t.eventOrder),((o={})[xi()]=[a].concat(t.eventOrder["alloy.system.attached"]||[]),o));return{uid:t.uid,dom:t.dom,components:e,apis:{show:function(e){i.set(e);var n=t.lazySink(e).getOrDie(),o=r.blocker(),a=n.getSystem().build(O(O({},o),{components:o.components.concat([nu(e)]),behaviours:wc([mh.config({}),ch("dialog-blocker-events",[Gi(Go(),(function(){nh.focusIn(e)}))])])}));jl(n,a),nh.focusIn(e)},hide:function(t){i.clear(),Oe(t.element).each((function(e){t.getSystem().getByDom(e).each((function(t){Gl(t)}))}))},getBody:function(e){return bd(e,t,"body")},getFooter:function(e){return bd(e,t,"footer")},setIdle:function(t){MT.unblock(t)},setBusy:function(t,e){MT.block(t,e)}},eventOrder:u,domModification:{attributes:{role:"dialog","aria-modal":"true"}},behaviours:Mf(t.modalBehaviours,[uh.config({}),nh.config({mode:"cyclic",onEnter:t.onExecute,onEscape:t.onEscape,useTabstopAt:t.useTabstopAt}),MT.config({getRoot:i.get}),ch(a,[$i((function(e){var n,r,o,i,a,u;n=e.element,r=bd(e,t,"title").element,o=$e(n,"id").fold((function(){var t=ia("dialog-label");return We(r,"id",t),t}),b),We(n,"aria-labelledby",o),i=e.element,a=bd(e,t,"body").element,u=B.from(Ge(i,"id")).fold((function(){var t=ia("dialog-describe");return We(a,"id",t),t}),b),We(i,"aria-describedby",u)}))])])}},apis:{show:function(t,e){t.show(e)},hide:function(t,e){t.hide(e)},getBody:function(t,e){return t.getBody(e)},getFooter:function(t,e){return t.getFooter(e)},setBusy:function(t,e,n){t.setBusy(e,n)},setIdle:function(t,e){t.setIdle(e)}}}),JN=_r([Zr("type"),Zr("name")].concat(Xv)),QN=Br,ZN=[$r("name","name",lr((function(){return ia("button-name")})),Nr),co("icon"),vo("align","end",["start","end"]),bo("primary",!1),bo("disabled",!1)],tB=z(z([],ZN,!0),[Zr("text")],!1),eB=z([to("type",["submit","cancel","custom"])],tB,!0),nB=z([to("type",["menu"]),co("text"),co("tooltip"),co("icon"),oo("items",JN)],ZN,!0),rB=Gr("type",{submit:eB,cancel:eB,custom:eB,menu:nB}),oB=[Zr("type"),Zr("text"),to("level",["info","warn","error","success"]),Zr("icon"),mo("url","")],iB=_r(oB),aB=[Zr("type"),Zr("text"),bo("disabled",!1),bo("primary",!1),$r("name","name",lr((function(){return ia("button-name")})),Nr),co("icon"),bo("borderless",!1)],uB=_r(aB),cB=[Zr("type"),Zr("name"),Zr("label"),bo("disabled",!1)],sB=_r(cB),lB=Br,fB=[Zr("type"),Zr("name")],dB=fB.concat([co("label")]),mB=dB.concat([mo("columns","auto")]),gB=_r(mB),hB=Tr([Zr("value"),Zr("text"),Zr("icon")]),pB=_r(dB),vB=Nr,bB=_r(dB),yB=Nr,xB=fB.concat([po("tag","textarea"),Zr("scriptId"),Zr("scriptUrl"),function(t,e){return go(t,e,Lr)}("settings",void 0)]),wB=fB.concat([po("tag","textarea"),eo("init")]),CB=Ir((function(t){return Ur("customeditor.old",kr(wB),t).orThunk((function(){return Ur("customeditor.new",kr(xB),t)}))})),SB=Nr,kB=_r(dB),_B=Or(br),OB=function(t){return[Zr("type"),Qr("columns"),t]},EB=[Zr("type"),Zr("html"),vo("presets","presentation",["presentation","document"])],zB=_r(EB),TB=dB.concat([bo("sandboxed",!0)]),MB=_r(TB),DB=Nr,AB=dB.concat([Jr("currentState",_r([Yr("blob"),Zr("url")]))]),NB=_r(AB),BB=dB.concat([co("inputMode"),co("placeholder"),bo("maximized",!1),bo("disabled",!1)]),RB=_r(BB),HB=Nr,LB=function(t){return[Zr("type"),Zr("label"),t]},VB=[Zr("text"),Zr("value")],PB=[Zr("text"),oo("items",function(t,e){return n=Ut(e),{extract:function(t,e){return n().extract(t,e)},toString:function(){return n().toString()}};var n}(0,(function(){return IB})))],IB=Er([_r(VB),_r(PB)]),FB=dB.concat([oo("items",IB),bo("disabled",!1)]),UB=_r(FB),jB=Nr,WB=dB.concat([ro("items",[Zr("text"),Zr("value")]),ho("size",1),bo("disabled",!1)]),qB=_r(WB),GB=Nr,$B=dB.concat([bo("constrain",!0),bo("disabled",!1)]),XB=_r($B),KB=_r([Zr("width"),Zr("height")]),YB=[Zr("type"),oo("header",Nr),oo("cells",Or(Nr))],JB=_r(YB),QB=dB.concat([co("placeholder"),bo("maximized",!1),bo("disabled",!1)]),ZB=_r(QB),tR=Nr,eR=dB.concat([vo("filetype","file",["image","media","file"]),mo("disabled",!1)]),nR=_r(eR),rR=_r([Zr("value"),mo("meta",{})]),oR=function(t){return $r("items","items",{tag:"required",process:{}},Or(Ir((function(e){return Ur("Checking item of "+t,iR,e).fold((function(t){return qn.error(qr(t))}),(function(t){return qn.value(t)}))}))))},iR=Cr((function(){return Pr("type",{alertbanner:iB,bar:_r((t=oR("bar"),[Zr("type"),t])),button:uB,checkbox:sB,colorinput:pB,colorpicker:bB,dropzone:kB,grid:_r(OB(oR("grid"))),iframe:MB,input:RB,listbox:UB,selectbox:qB,sizeinput:XB,textarea:ZB,urlinput:nR,customeditor:CB,htmlpanel:zB,imagetools:NB,collection:gB,label:_r(LB(oR("label"))),table:JB,panel:uR});var t})),aR=[Zr("type"),mo("classes",[]),oo("items",iR)],uR=_r(aR),cR=[$r("name","name",lr((function(){return ia("tab-name")})),Nr),Zr("title"),oo("items",iR)],sR=[Zr("type"),ro("tabs",cR)],lR=_r(sR),fR=tB,dR=rB,mR=_r([Zr("title"),Jr("body",Pr("type",{panel:uR,tabpanel:lR})),po("size","normal"),oo("buttons",dR),mo("initialData",{}),yo("onAction",h),yo("onChange",h),yo("onSubmit",h),yo("onClose",h),yo("onCancel",h),mo("onTabChange",h)]),gR=_r(z([to("type",["cancel","custom"])],fR,!0)),hR=_r([Zr("title"),Zr("url"),uo("height"),uo("width"),lo("buttons",gR),yo("onAction",h),yo("onCancel",h),yo("onClose",h),yo("onMessage",h)]),pR=function(t){return i(t)?[t].concat(Q(bt(t),pR)):a(t)?Q(t,pR):[]},vR=function(t){return o(t.type)&&o(t.name)},bR={checkbox:lB,colorinput:vB,colorpicker:yB,dropzone:_B,input:HB,iframe:DB,sizeinput:KB,selectbox:GB,listbox:jB,size:KB,textarea:tR,urlinput:rR,customeditor:SB,collection:hB,togglemenuitem:QN},yR=function(t){var e=function(t){return G(pR(t),vR)}(t),n=Q(e,(function(t){return function(t){return B.from(bR[t.type])}(t).fold((function(){return[]}),(function(e){return[Jr(t.name,e)]}))}));return _r(n)},xR=function(t){return{internalDialog:jr(Ur("dialog",mR,t)),dataValidator:yR(t),initialData:t.initialData}},wR={open:function(t,e){var n=xR(e);return t(n.internalDialog,n.initialData,n.dataValidator)},openUrl:function(t,e){return t(jr(Ur("dialog",hR,e)))},redial:function(t){return xR(t)}},CR=function(t){var e=[],n={};return dt(t,(function(t,r){t.fold((function(){e.push(r)}),(function(t){n[r]=t}))})),e.length>0?qn.error(e):qn.value(n)},SR=function(t,e){var n=bp(uk.sketch((function(n){return{dom:{tag:"div",classes:["tox-form"].concat(t.classes)},components:j(t.items,(function(t){return cE(n,t,e)}))}})));return{dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[n.asSpec()]}],behaviours:wc([nh.config({mode:"acyclic",useTabstopAt:w(Hk)}),pk(n),_k(n,{postprocess:function(t){return CR(t).fold((function(t){return console.error(t),{}}),b)}})])}},kR=Dd({name:"TabButton",configFields:[mo("uid",void 0),Yr("value"),$r("dom","dom",dr((function(){return{attributes:{role:"tab",id:ia("aria"),"aria-selected":"false"}}})),Mr()),io("action"),mo("domModification",{}),zf("tabButtonBehaviours",[mh,nh,Ef]),Yr("view")],factory:function(t,e){return{uid:t.uid,dom:t.dom,components:t.components,events:Eh(t.action),behaviours:Mf(t.tabButtonBehaviours,[mh.config({}),nh.config({mode:"execution",useSpace:!0,useEnter:!0}),Ef.config({store:{mode:"memory",initialValue:t.value}})]),domModification:t.domModification}}}),_R=v([Yr("tabs"),Yr("dom"),mo("clickToDismiss",!1),zf("tabbarBehaviours",[um,nh]),Ou(["tabClass","selectedClass"])]),OR=ad({factory:kR,name:"tabs",unit:"tab",overrides:function(t){var e=function(t,e){um.dehighlight(t,e),Di(t,Ei(),{tabbar:t,button:e})},n=function(t,e){um.highlight(t,e),Di(t,Oi(),{tabbar:t,button:e})};return{action:function(r){var o=r.getSystem().getByUid(t.uid).getOrDie(),i=um.isHighlighted(o,r);(i&&t.clickToDismiss?e:i?h:n)(o,r)},domModification:{classes:[t.markers.tabClass]}}}}),ER=v([OR]),zR=Ad({name:"Tabbar",configFields:_R(),partFields:ER(),factory:function(t,e,n,r){return{uid:t.uid,dom:t.dom,components:e,"debug.sketcher":"Tabbar",domModification:{attributes:{role:"tablist"}},behaviours:Mf(t.tabbarBehaviours,[um.config({highlightClass:t.markers.selectedClass,itemClass:t.markers.tabClass,onHighlight:function(t,e){We(e.element,"aria-selected","true")},onDehighlight:function(t,e){We(e.element,"aria-selected","false")}}),nh.config({mode:"flow",getInitial:function(t){return um.getHighlighted(t).map((function(t){return t.element}))},selector:"."+t.markers.tabClass,executeOnMove:!0})])}}}),TR=Dd({name:"Tabview",configFields:[zf("tabviewBehaviours",[uh])],factory:function(t,e){return{uid:t.uid,dom:t.dom,behaviours:Mf(t.tabviewBehaviours,[uh.config({})]),domModification:{attributes:{role:"tabpanel"}}}}}),MR=v([mo("selectFirst",!0),zu("onChangeTab"),zu("onDismissTab"),mo("tabs",[]),zf("tabSectionBehaviours",[])]),DR=rd({factory:zR,schema:[Yr("dom"),no("markers",[Yr("tabClass"),Yr("selectedClass")])],name:"tabbar",defaults:function(t){return{tabs:t.tabs}}}),AR=rd({factory:TR,name:"tabview"}),NR=v([DR,AR]),BR=Ad({name:"TabSection",configFields:MR(),partFields:NR(),factory:function(t,e,n,r){var o=function(e,n){vd(e,t,"tabbar").each((function(t){n(t).each(Ai)}))};return{uid:t.uid,dom:t.dom,components:e,behaviours:Tf(t.tabSectionBehaviours),events:Hi(J([t.selectFirst?[$i((function(t,e){o(t,um.getFirst)}))]:[],[Pi(Oi(),(function(e,n){!function(e){var n=Ef.getValue(e);vd(e,t,"tabview").each((function(r){K(t.tabs,(function(t){return t.value===n})).each((function(n){var o=n.view();$e(e.element,"id").each((function(t){We(r.element,"aria-labelledby",t)})),uh.set(r,o),t.onChangeTab(r,e,o)}))}))}(n.event.button)})),Pi(Ei(),(function(e,n){var r=n.event.button;t.onDismissTab(e,r)}))]])),apis:{getViewItems:function(e){return vd(e,t,"tabview").map((function(t){return uh.contents(t)})).getOr([])},showTab:function(t,e){o(t,(function(t){var n=um.getCandidates(t);return K(n,(function(t){return Ef.getValue(t)===e})).filter((function(e){return!um.isHighlighted(t,e)}))}))}}}},apis:{getViewItems:function(t,e){return t.getViewItems(e)},showTab:function(t,e,n){t.showTab(e,n)}}}),RR=function(t,e){Qe(t,"height",e+"px"),pe().browser.isIE()?un(t,"flex-basis"):Qe(t,"flex-basis",e+"px")},HR=function(t,e,n){cu(t,'[role="dialog"]').each((function(t){lu(t,'[role="tablist"]').each((function(r){n.get().map((function(n){return Qe(e,"height","0"),Qe(e,"flex-basis","0"),Math.min(n,function(t,e,n){var r,o=ke(t).dom,i=cu(t,".tox-dialog-wrap").getOr(t);r="fixed"===en(i,"position")?Math.max(o.clientHeight,window.innerHeight):Math.max(o.offsetHeight,o.scrollHeight);var a=fn(e),u=e.dom.offsetLeft>=n.dom.offsetLeft+yn(n)?Math.max(fn(n),a):a,c=parseInt(en(t,"margin-top"),10)||0,s=parseInt(en(t,"margin-bottom"),10)||0;return r-(fn(t)+c+s-u)}(t,e,r))})).each((function(t){RR(e,t)}))}))}))},LR=function(t){return lu(t,'[role="tabpanel"]')},VR=function(t){var e;return{smartTabHeight:(e=ts(),{extraEvents:[$i((function(n){var r=n.element;LR(r).each((function(o){Qe(o,"visibility","hidden"),n.getSystem().getByDom(o).toOptional().each((function(n){(function(t){return at(ot(t,(function(t,e){return t>e?-1:t<e?1:0})))})(function(t,e,n){return j(t,(function(r,o){uh.set(n,t[o].view());var i=e.dom.getBoundingClientRect();return uh.set(n,[]),i.height}))}(t,o,n)).fold(e.clear,e.set)})),HR(r,o,e),un(o,"visibility"),function(t,e){at(t).each((function(t){return BR.showTab(e,t.value)}))}(t,n),pp.requestAnimationFrame((function(){HR(r,o,e)}))}))})),Pi(yi(),(function(t){var n=t.element;LR(n).each((function(t){HR(n,t,e)}))})),Pi(gw,(function(t,n){var r=t.element;LR(r).each((function(t){var n=Ac(Re(t));Qe(t,"visibility","hidden");var o=rn(t,"height").map((function(t){return parseInt(t,10)}));un(t,"height"),un(t,"flex-basis");var i=t.dom.getBoundingClientRect().height;o.forall((function(t){return i>t}))?(e.set(i),HR(r,t,e)):o.each((function(e){RR(t,e)})),un(t,"visibility"),n.each(Mc)}))}))],selectFirst:!1}),naiveTabHeight:{extraEvents:[],selectFirst:!0}}},PR="send-data-to-section",IR="send-data-to-view",FR=function(t,e){var n=Co({}),r=function(t){var e=Ef.getValue(t),r=CR(e).getOr({}),o=n.get(),i=cr(o,r);n.set(i)},o=function(t){var e=n.get();Ef.setValue(t,e)},i=Co(null),a=j(t.tabs,(function(t){return{value:t.name,dom:{tag:"div",classes:["tox-dialog__body-nav-item"],innerHtml:e.shared.providers.translate(t.title)},view:function(){return[uk.sketch((function(n){return{dom:{tag:"div",classes:["tox-form"]},components:j(t.items,(function(t){return cE(n,t,e)})),formBehaviours:wc([nh.config({mode:"acyclic",useTabstopAt:w(Hk)}),ch("TabView.form.events",[$i(o),Xi(r)]),Ec.config({channels:Eo([{key:PR,value:{onReceive:r}},{key:IR,value:{onReceive:o}}])})])}}))]}}})),u=VR(a).smartTabHeight;return BR.sketch({dom:{tag:"div",classes:["tox-dialog__body"]},onChangeTab:function(t,e,n){var r=Ef.getValue(e);Di(t,mw,{name:r,oldName:i.get()}),i.set(r)},tabs:a,components:[BR.parts.tabbar({dom:{tag:"div",classes:["tox-dialog__body-nav"]},components:[zR.parts.tabs({})],markers:{tabClass:"tox-tab",selectedClass:"tox-dialog__body-nav-item--active"},tabbarBehaviours:wc([tw.config({})])}),BR.parts.tabview({dom:{tag:"div",classes:["tox-dialog__body-content"]}})],selectFirst:u.selectFirst,tabSectionBehaviours:wc([ch("tabpanel",u.extraEvents),nh.config({mode:"acyclic"}),Hd.config({find:function(t){return at(BR.getViewItems(t))}}),Ef.config({store:{mode:"manual",getValue:function(t){return t.getSystem().broadcastOn([PR],{}),n.get()},setValue:function(t,e){n.set(e),t.getSystem().broadcastOn([IR],{})}}})])})},UR=ia("update-dialog"),jR=ia("update-title"),WR=ia("update-body"),qR=ia("update-footer"),GR=ia("body-send-message"),$R=function(t,e,n,r){return{dom:{tag:"div",classes:["tox-dialog__content-js"],attributes:O(O({},e.map((function(t){return{id:t}})).getOr({})),r?{"aria-live":"polite"}:{})},components:[],behaviours:wc([vk(0),cD.config({channel:WR,updateState:function(t,e){return B.some({isTabPanel:function(){return"tabpanel"===e.body.type}})},renderComponents:function(t){switch(t.body.type){case"tabpanel":return[FR(t.body,n)];default:return[SR(t.body,n)]}},initialData:t})])}},XR=iy.deviceType.isTouch(),KR=function(t,e){return{dom:{tag:"div",styles:{display:"none"},classes:["tox-dialog__header"]},components:[t,e]}},YR=function(t,e){return YN.parts.close(vp.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":e.translate("Close")}},action:t,buttonBehaviours:wc([tw.config({})])}))},JR=function(){return YN.parts.title({dom:{tag:"div",classes:["tox-dialog__title"],innerHtml:"",styles:{display:"none"}}})},QR=function(t,e){return YN.parts.body({dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[{dom:DT("<p>"+e.translate(t)+"</p>")}]}]})},ZR=function(t){return YN.parts.footer({dom:{tag:"div",classes:["tox-dialog__footer"]},components:t})},tH=function(t,e){return[$x.sketch({dom:{tag:"div",classes:["tox-dialog__footer-start"]},components:t}),$x.sketch({dom:{tag:"div",classes:["tox-dialog__footer-end"]},components:e})]},eH=function(t){var e,n="tox-dialog",r=n+"-wrap",o=r+"__backdrop",i=n+"__disable-scroll";return YN.sketch({lazySink:t.lazySink,onEscape:function(e){return t.onEscape(e),B.some(!0)},useTabstopAt:function(t){return!Hk(t)},dom:{tag:"div",classes:[n].concat(t.extraClasses),styles:O({position:"relative"},t.extraStyles)},components:z([t.header,t.body],t.footer.toArray(),!0),parts:{blocker:{dom:DT('<div class="'+r+'"></div>'),components:[{dom:{tag:"div",classes:XR?[o,o+"--opaque"]:[o]}}]}},dragBlockClass:r,modalBehaviours:wc(z([mh.config({}),ch("dialog-events",t.dialogEvents.concat([Gi(Go(),(function(t,e){nh.focusIn(t)}))])),ch("scroll-lock",[$i((function(){Va(Fe(),i)})),Xi((function(){Ia(Fe(),i)}))])],t.extraBehaviours,!0)),eventOrder:O((e={},e[si()]=["dialog-events"],e[xi()]=["scroll-lock","dialog-events","alloy.base.behaviour"],e[wi()]=["alloy.base.behaviour","dialog-events","scroll-lock"],e),t.eventOrder)})},nH=function(t){return vp.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":t.translate("Close"),title:t.translate("Close")}},components:[zp("close",{tag:"div",classes:["tox-icon"]},t.icons)],action:function(t){Mi(t,cw)}})},rH=function(t,e,n){var r=function(t){return[Qa(n.translate(t.title))]};return{dom:{tag:"div",classes:["tox-dialog__title"],attributes:O({},e.map((function(t){return{id:t}})).getOr({}))},components:r(t),behaviours:wc([cD.config({channel:jR,renderComponents:r})])}},oH=function(){return{dom:DT('<div class="tox-dialog__draghandle"></div>')}},iH=function(t,e){return function(t,e){var n=YN.parts.title(rH(t,B.none(),e)),r=YN.parts.draghandle(oH()),o=YN.parts.close(nH(e)),i=[n].concat(t.draggable?[r]:[]).concat([o]);return $x.sketch({dom:DT('<div class="tox-dialog__header"></div>'),components:i})}({title:e.shared.providers.translate(t),draggable:e.dialog.isDraggableModal()},e.shared.providers)},aH=function(t,e,n){return{dom:{tag:"div",classes:["tox-dialog__busy-spinner"],attributes:{"aria-label":n.translate(t)},styles:{left:"0px",right:"0px",bottom:"0px",top:"0px",position:"absolute"}},behaviours:e,components:[{dom:DT('<div class="tox-spinner"><div></div><div></div><div></div></div>')}]}},uH=function(t,e,n){return{onClose:function(){return n.closeWindow()},onBlock:function(n){YN.setBusy(t(),(function(t,r){return aH(n.message,r,e)}))},onUnblock:function(){YN.setIdle(t())}}},cH=function(t,e,n,r){var o;return eu(eH(O(O({},t),{lazySink:r.shared.getSink,extraBehaviours:z([cD.config({channel:UR,updateState:function(t,e){return B.some(e)},initialData:e}),zk({})],t.extraBehaviours,!0),onEscape:function(t){Mi(t,cw)},dialogEvents:n,eventOrder:(o={},o[ci()]=[cD.name(),Ec.name()],o[xi()]=["scroll-lock",cD.name(),"messages","dialog-events","alloy.base.behaviour"],o[wi()]=["alloy.base.behaviour","dialog-events","messages",cD.name(),"scroll-lock"],o)})))},sH=function(t){return j(t,(function(t){return"menu"===t.type?function(t){var e=j(t.items,(function(t){var e=Co(!1);return O(O({},t),{storage:e})}));return O(O({},t),{items:e})}(t):t}))},lH=function(t){return X(t,(function(t,e){return"menu"===e.type?X(e.items,(function(t,e){return t[e.name]=e.storage,t}),t):t}),{})},fH=function(t,e){return[ji(Go(),Rk),t(uw,(function(t,n){e.onClose(),n.onClose()})),t(cw,(function(t,e,n,r){e.onCancel(t),Mi(r,uw)})),Pi(dw,(function(t,n){return e.onUnblock()})),Pi(fw,(function(t,n){return e.onBlock(n.event)}))]},dH=function(t,e){var n=function(e,n){return Pi(e,(function(e,o){r(e,(function(r,i){n(t(),r,o.event,e)}))}))},r=function(t,e){cD.getState(t).get().each((function(n){e(n,t)}))};return z(z([],fH(n,e),!0),[n(sw,(function(t,e,n){e.onAction(t,{name:n.name})}))],!1)},mH=function(t,e,n){var r=function(e,n){return Pi(e,(function(e,r){o(e,(function(o,i){n(t(),o,r.event,e)}))}))},o=function(t,e){cD.getState(t).get().each((function(n){e(n.internalDialog,t)}))};return z(z([],fH(r,e),!0),[r(lw,(function(t,e){return e.onSubmit(t)})),r(aw,(function(t,e,n){e.onChange(t,{name:n.name})})),r(sw,(function(t,e,r,o){var i=function(){return nh.focusIn(o)},a=function(t){return Xe(t,"disabled")||$e(t,"aria-disabled").exists((function(t){return"true"===t}))},u=Re(o.element),c=Ac(u);e.onAction(t,{name:r.name,value:r.value}),Ac(u).fold(i,(function(t){a(t)||c.exists((function(e){return we(t,e)&&a(e)}))?i():n().toOptional().filter((function(e){return!we(e.element,t)})).each(i)}))})),r(mw,(function(t,e,n){e.onTabChange(t,{newTabName:n.name,oldTabName:n.oldName})})),Xi((function(e){var n=t();Ef.setValue(e,n.getData())}))],!1)},gH=function(t,e){var n=e.map((function(t){return t.footerButtons})).getOr([]),r=q(n,(function(t){return"start"===t.align})),o=function(t,e){return $x.sketch({dom:{tag:"div",classes:["tox-dialog__footer-"+t]},components:j(e,(function(t){return t.memento.asSpec()}))})};return[o("start",r.pass),o("end",r.fail)]},hH=function(t,e){return{dom:DT('<div class="tox-dialog__footer"></div>'),components:[],behaviours:wc([cD.config({channel:qR,initialData:t,updateState:function(t,n){var r=j(n.buttons,(function(t){var n=bp(function(t,e){return Y_(t,t.type,e)}(t,e));return{name:t.name,align:t.align,memento:n}}));return B.some({lookupByName:function(t,e){return function(t,e,n){return K(e,(function(t){return t.name===n})).bind((function(e){return e.memento.getOpt(t)}))}(t,r,e)},footerButtons:r})},renderComponents:gH})])}},pH=function(t,e){return YN.parts.footer(hH(t,e))},vH=function(t,e){if(t.getRoot().getSystem().isConnected()){var n=Hd.getCurrent(t.getFormWrapper()).getOr(t.getFormWrapper());return uk.getField(n,e).fold((function(){var r=t.getFooter();return cD.getState(r).get().bind((function(t){return t.lookupByName(n,e)}))}),(function(t){return B.some(t)}))}return B.none()},bH=function(t,e,n){var r=function(e){var n=t.getRoot();n.getSystem().isConnected()&&e(n)},i={getData:function(){var e=t.getRoot(),r=e.getSystem().isConnected()?t.getFormWrapper():e,o=Ef.getValue(r),i=mt(n,(function(t){return t.get()}));return O(O({},o),i)},setData:function(e){r((function(r){var o=i.getData(),a=O(O({},o),e),u=function(t,e){var n=t.getRoot();return cD.getState(n).get().map((function(t){return jr(Ur("data",t.dataValidator,e))})).getOr(e)}(t,a),c=t.getFormWrapper();Ef.setValue(c,u),dt(n,(function(t,e){xt(a,e)&&t.set(a[e])}))}))},disable:function(e){vH(t,e).each(Yd.disable)},enable:function(e){vH(t,e).each(Yd.enable)},focus:function(e){vH(t,e).each(mh.focus)},block:function(t){if(!o(t))throw new Error("The dialogInstanceAPI.block function should be passed a blocking message of type string as an argument");r((function(e){Di(e,fw,{message:t})}))},unblock:function(){r((function(t){Mi(t,dw)}))},showTab:function(e){r((function(n){var r=t.getBody();cD.getState(r).get().exists((function(t){return t.isTabPanel()}))&&Hd.getCurrent(r).each((function(t){BR.showTab(t,e)}))}))},redial:function(t){r((function(n){var r=e(t);n.getSystem().broadcastOn([UR],r),n.getSystem().broadcastOn([jR],r.internalDialog),n.getSystem().broadcastOn([WR],r.internalDialog),n.getSystem().broadcastOn([qR],r.internalDialog),i.setData(r.initialData)}))},close:function(){r((function(t){Mi(t,uw)}))}};return i},yH=function(t,e,n){var r=iH(t.internalDialog.title,n),o=function(t,e){var n=$R(t,B.none(),e,!1);return YN.parts.body(n)}({body:t.internalDialog.body},n),i=sH(t.internalDialog.buttons),a=lH(i),u=pH({buttons:i},n),c=mH((function(){return m}),uH((function(){return f}),n.shared.providers,e),n.shared.getSink),s=function(t){switch(t){case"large":return["tox-dialog--width-lg"];case"medium":return["tox-dialog--width-md"];default:return[]}}(t.internalDialog.size),l={header:r,body:o,footer:B.some(u),extraClasses:s,extraBehaviours:[],extraStyles:{}},f=cH(l,t,c,n),d={getRoot:v(f),getBody:function(){return YN.getBody(f)},getFooter:function(){return YN.getFooter(f)},getFormWrapper:function(){var t=YN.getBody(f);return Hd.getCurrent(t).getOr(t)}},m=bH(d,e.redial,a);return{dialog:f,instanceApi:m}},xH=function(t,e,n,r){var o,i,a,u,c,s=ia("dialog-label"),l=ia("dialog-content"),f=bp((a={title:t.internalDialog.title,draggable:!0},u=s,c=n.shared.providers,$x.sketch({dom:DT('<div class="tox-dialog__header"></div>'),components:[rH(a,B.some(u),c),oH(),nH(c)],containerBehaviours:wc([RN.config({mode:"mouse",blockerClass:"blocker",getTarget:function(t){return fu(t,'[role="dialog"]').getOrDie()},snaps:{getSnapPoints:function(){return[]},leftAttr:"data-drag-left",topAttr:"data-drag-top"}})])}))),d=bp(function(t,e,n,r){return $R(t,B.some(e),n,r)}({body:t.internalDialog.body},l,n,r)),m=sH(t.internalDialog.buttons),g=lH(m),h=bp(function(t,e){return hH(t,e)}({buttons:m},n)),p=mH((function(){return y}),{onBlock:function(t){MT.block(b,(function(e,r){return aH(t.message,r,n.shared.providers)}))},onUnblock:function(){MT.unblock(b)},onClose:function(){return e.closeWindow()}},n.shared.getSink),b=eu({dom:{tag:"div",classes:["tox-dialog","tox-dialog-inline"],attributes:(o={role:"dialog"},o["aria-labelledby"]=s,o["aria-describedby"]=l,o)},eventOrder:(i={},i[ci()]=[cD.name(),Ec.name()],i[si()]=["execute-on-form"],i[xi()]=["reflecting","execute-on-form"],i),behaviours:wc([nh.config({mode:"cyclic",onEscape:function(t){return Mi(t,uw),B.some(!0)},useTabstopAt:function(t){return!Hk(t)&&("button"!==Ht(t)||"disabled"!==Ge(t,"disabled"))}}),cD.config({channel:UR,updateState:function(t,e){return B.some(e)},initialData:t}),mh.config({}),ch("execute-on-form",p.concat([Gi(Go(),(function(t,e){nh.focusIn(t)}))])),MT.config({getRoot:function(){return B.some(b)}}),uh.config({}),zk({})]),components:[f.asSpec(),d.asSpec(),h.asSpec()]}),y=bH({getRoot:v(b),getFooter:function(){return h.get(b)},getBody:function(){return d.get(b)},getFormWrapper:function(){var t=d.get(b);return Hd.getCurrent(t).getOr(t)}},e.redial,g);return{dialog:b,instanceApi:y}},wH=tinymce.util.Tools.resolve("tinymce.util.URI"),CH=["insertContent","setContent","execCommand","close","block","unblock"],SH=function(t){return i(t)&&-1!==CH.indexOf(t.mceAction)},kH=function(t,e,n,r){var a,u,s,l=iH(t.title,r),f=function(t){var e={dom:{tag:"div",classes:["tox-dialog__content-js"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-iframe"]},components:[Nk({dom:{tag:"iframe",attributes:{src:t.url}},behaviours:wc([tw.config({}),mh.config({})])})]}],behaviours:wc([nh.config({mode:"acyclic",useTabstopAt:w(Hk)})])};return YN.parts.body(e)}(t),d=t.buttons.bind((function(t){return 0===t.length?B.none():B.some(pH({buttons:t},r))})),m=dH((function(){return C}),uH((function(){return x}),r.shared.providers,e)),g=O(O({},t.height.fold((function(){return{}}),(function(t){return{height:t+"px","max-height":t+"px"}}))),t.width.fold((function(){return{}}),(function(t){return{width:t+"px","max-width":t+"px"}}))),h=t.width.isNone()&&t.height.isNone()?["tox-dialog--width-lg"]:[],p=new wH(t.url,{base_uri:new wH(window.location.href)}),v=p.protocol+"://"+p.host+(p.port?":"+p.port:""),b=Zc(),y=[ch("messages",[$i((function(){var e=ns(Bt.fromDom(window),"message",(function(e){if(p.isSameOrigin(new wH(e.raw.origin))){var r=e.raw.data;SH(r)?function(t,e,n){switch(n.mceAction){case"insertContent":t.insertContent(n.content);break;case"setContent":t.setContent(n.content);break;case"execCommand":var r=!!c(n.ui)&&n.ui;t.execCommand(n.cmd,r,n.value);break;case"close":e.close();break;case"block":e.block(n.message);break;case"unblock":e.unblock()}}(n,C,r):function(t){return!SH(t)&&i(t)&&xt(t,"mceAction")}(r)&&t.onMessage(C,r)}}));b.set(e)})),Xi(b.clear)]),Ec.config({channels:(a={},a[GR]={onReceive:function(t,e){lu(t.element,"iframe").each((function(t){t.dom.contentWindow.postMessage(e,v)}))}},a)})],x=cH({header:l,body:f,footer:d,extraClasses:h,extraBehaviours:y,extraStyles:g},t,m,r),C=(u=x,s=function(t){u.getSystem().isConnected()&&t(u)},{block:function(t){if(!o(t))throw new Error("The urlDialogInstanceAPI.block function should be passed a blocking message of type string as an argument");s((function(e){Di(e,fw,{message:t})}))},unblock:function(){s((function(t){Mi(t,dw)}))},close:function(){s((function(t){Mi(t,uw)}))},sendMessage:function(t){s((function(e){e.getSystem().broadcastOn([GR],t)}))}});return{dialog:x,instanceApi:C}},_H=function(t,e,n){return e&&n?[]:[Hz.config({contextual:{lazyContext:function(){return B.some(In(Bt.fromDom(t.getContentAreaContainer())))},fadeInClass:"tox-dialog-dock-fadein",fadeOutClass:"tox-dialog-dock-fadeout",transitionClass:"tox-dialog-dock-transition"},modes:["top"]})]},OH=function(t){var e=t.backstage,n=t.editor,r=Lb(n),o=function(t){var e=t.backstage.shared;return{open:function(n,r){var o=function(){YN.hide(c),r()},i=bp(Y_({name:"close-alert",text:"OK",primary:!0,align:"end",disabled:!1,icon:B.none()},"cancel",t.backstage)),a=JR(),u=YR(o,e.providers),c=eu(eH({lazySink:function(){return e.getSink()},header:KR(a,u),body:QR(n,e.providers),footer:B.some(ZR(tH([],[i.asSpec()]))),onEscape:o,extraClasses:["tox-alert-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[Pi(cw,o)],eventOrder:{}}));YN.show(c);var s=i.get(c);mh.focus(s)}}}(t),i=function(t){var e=t.backstage.shared;return{open:function(n,r){var o=function(t){YN.hide(s),r(t)},i=bp(Y_({name:"yes",text:"Yes",primary:!0,align:"end",disabled:!1,icon:B.none()},"submit",t.backstage)),a=Y_({name:"no",text:"No",primary:!1,align:"end",disabled:!1,icon:B.none()},"cancel",t.backstage),u=JR(),c=YR((function(){return o(!1)}),e.providers),s=eu(eH({lazySink:function(){return e.getSink()},header:KR(u,c),body:QR(n,e.providers),footer:B.some(ZR(tH([],[a,i.asSpec()]))),onEscape:function(){return o(!1)},extraClasses:["tox-confirm-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[Pi(cw,(function(){return o(!1)})),Pi(lw,(function(){return o(!0)}))],eventOrder:{}}));YN.show(s);var l=i.get(s);mh.focus(l)}}}(t),a=function(t,r){return wR.openUrl((function(t){var o=kH(t,{closeWindow:function(){YN.hide(o.dialog),r(o.instanceApi)}},n,e);return YN.show(o.dialog),o.instanceApi}),t)},u=function(t,n){return wR.open((function(t,r,o){var i=r,a=yH({dataValidator:o,initialData:i,internalDialog:t},{redial:wR.redial,closeWindow:function(){YN.hide(a.dialog),n(a.instanceApi)}},e);return YN.show(a.dialog),a.instanceApi.setData(i),a.instanceApi}),t)},c=function(t,o,i,a){return wR.open((function(t,u,c){var s=jr(Ur("data",c,u)),l=ts(),f=e.shared.header.isPositionedAtTop(),d=function(){return l.on((function(t){Yh.reposition(t),Hz.refresh(t)}))},m=xH({dataValidator:c,initialData:s,internalDialog:t},{redial:wR.redial,closeWindow:function(){l.on(Yh.hide),n.off("ResizeEditor",d),l.clear(),i(m.instanceApi)}},e,a),g=eu(Yh.sketch(O(O({lazySink:e.shared.getSink,dom:{tag:"div",classes:[]},fireDismissalEventInstead:{}},f?{}:{fireRepositionEventInstead:{}}),{inlineBehaviours:wc(z([ch("window-manager-inline-events",[Pi(Ci(),(function(t,e){Mi(m.dialog,cw)}))])],_H(n,r,f),!0)),isExtraPart:function(t,e){return function(t){return Nx(t,".tox-alert-dialog")||Nx(t,".tox-confirm-dialog")}(e)}})));return l.set(g),Yh.showWithin(g,nu(m.dialog),{anchor:o},B.some(Fe())),r&&f||(Hz.refresh(g),n.on("ResizeEditor",d)),m.instanceApi.setData(s),nh.focusIn(m.dialog),m.instanceApi}),t)};return{open:function(t,n,r){return void 0!==n&&"toolbar"===n.inline?c(t,e.shared.anchors.inlineDialog(),r,n.ariaAttrs):void 0!==n&&"cursor"===n.inline?c(t,e.shared.anchors.cursor(),r,n.ariaAttrs):u(t,r)},openUrl:function(t,e){return a(t,e)},alert:function(t,e){o.open(t,(function(){e()}))},close:function(t){t.close()},confirm:function(t,e){i.open(t,(function(t){e(t)}))}}};_.add("silver",(function(t){var e=GN(t),n=e.uiMothership,r=e.backstage,o=e.renderUI,i=e.getUi;Ax(t,r.shared);var a=OH({editor:t,backstage:r});return{renderUI:o,getWindowManagerImpl:v(a),getNotificationManagerImpl:function(){return Dp(t,{backstage:r},n)},ui:i()}}))}()},7575:(t,e,n)=>{!function(){"use strict";var e=function(t){if(null===t)return"null";if(void 0===t)return"undefined";var e=typeof t;return"object"===e&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"===e&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":e},r=function(t){return{eq:t}},o=r((function(t,e){return t===e})),i=function(t){return r((function(e,n){if(e.length!==n.length)return!1;for(var r=e.length,o=0;o<r;o++)if(!t.eq(e[o],n[o]))return!1;return!0}))},a=function(t,e){return function(t,e){return r((function(n,r){return t.eq(e(n),e(r))}))}(i(t),(function(t){return function(t,e){return Array.prototype.slice.call(t).sort(e)}(t,e)}))},u=function(t){return r((function(e,n){var r=Object.keys(e),i=Object.keys(n);if(!a(o).eq(r,i))return!1;for(var u=r.length,c=0;c<u;c++){var s=r[c];if(!t.eq(e[s],n[s]))return!1}return!0}))},c=r((function(t,n){if(t===n)return!0;var r=e(t);return r===e(n)&&(function(t){return-1!==["undefined","boolean","number","string","function","xml","null"].indexOf(t)}(r)?t===n:"array"===r?i(c).eq(t,n):"object"===r&&u(c).eq(t,n))})),s=function(t){return function(e){return r=typeof(n=e),(null===n?"null":"object"===r&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"===r&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":r)===t;var n,r}},l=function(t){return function(e){return typeof e===t}},f=function(t){return function(e){return t===e}},d=s("string"),m=s("object"),g=s("array"),h=f(null),p=l("boolean"),v=f(void 0),b=function(t){return null==t},y=function(t){return!b(t)},x=l("function"),w=l("number"),C=function(){},S=function(t,e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return t(e.apply(null,n))}},k=function(t,e){return function(n){return t(e(n))}},_=function(t){return function(){return t}},O=function(t){return t},E=function(t,e){return t===e};function z(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=e.concat(n);return t.apply(null,o)}}var T=function(t){return function(e){return!t(e)}},M=function(t){return t()},D=function(t){t()},A=_(!1),N=_(!0),B=function(){return R},R=function(){var t=function(t){return t()},e=O;return{fold:function(t,e){return t()},isSome:A,isNone:N,getOr:e,getOrThunk:t,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:_(null),getOrUndefined:_(void 0),or:e,orThunk:t,map:B,each:C,bind:B,exists:A,forall:N,filter:function(){return B()},toArray:function(){return[]},toString:_("none()")}}(),H=function(t){var e=_(t),n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},isSome:N,isNone:A,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return H(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:R},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},L={some:H,none:B,from:function(t){return null==t?R:H(t)}},V=Array.prototype.slice,P=Array.prototype.indexOf,I=Array.prototype.push,F=function(t,e){return P.call(t,e)},U=function(t,e){return F(t,e)>-1},j=function(t,e){for(var n=0,r=t.length;n<r;n++){if(e(t[n],n))return!0}return!1},W=function(t,e){for(var n=t.length,r=new Array(n),o=0;o<n;o++){var i=t[o];r[o]=e(i,o)}return r},q=function(t,e){for(var n=0,r=t.length;n<r;n++){e(t[n],n)}},G=function(t,e){for(var n=t.length-1;n>=0;n--){e(t[n],n)}},$=function(t,e){for(var n=[],r=[],o=0,i=t.length;o<i;o++){var a=t[o];(e(a,o)?n:r).push(a)}return{pass:n,fail:r}},X=function(t,e){for(var n=[],r=0,o=t.length;r<o;r++){var i=t[r];e(i,r)&&n.push(i)}return n},K=function(t,e,n){return G(t,(function(t,r){n=e(n,t,r)})),n},Y=function(t,e,n){return q(t,(function(t,r){n=e(n,t,r)})),n},J=function(t,e,n){for(var r=0,o=t.length;r<o;r++){var i=t[r];if(e(i,r))return L.some(i);if(n(i,r))break}return L.none()},Q=function(t,e){return J(t,e,A)},Z=function(t,e){for(var n=0,r=t.length;n<r;n++){if(e(t[n],n))return L.some(n)}return L.none()},tt=function(t,e){return function(t){for(var e=[],n=0,r=t.length;n<r;++n){if(!g(t[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+t);I.apply(e,t[n])}return e}(W(t,e))},et=function(t,e){for(var n=0,r=t.length;n<r;++n){if(!0!==e(t[n],n))return!1}return!0},nt=function(t){var e=V.call(t,0);return e.reverse(),e},rt=function(t,e){return X(t,(function(t){return!U(e,t)}))},ot=function(t,e){var n=V.call(t,0);return n.sort(e),n},it=function(t,e){return e>=0&&e<t.length?L.some(t[e]):L.none()},at=function(t){return it(t,0)},ut=function(t){return it(t,t.length-1)},ct=x(Array.from)?Array.from:function(t){return V.call(t)},st=function(t,e){for(var n=0;n<t.length;n++){var r=e(t[n],n);if(r.isSome())return r}return L.none()},lt=Object.keys,ft=Object.hasOwnProperty,dt=function(t,e){for(var n=lt(t),r=0,o=n.length;r<o;r++){var i=n[r];e(t[i],i)}},mt=function(t,e){return gt(t,(function(t,n){return{k:n,v:e(t,n)}}))},gt=function(t,e){var n={};return dt(t,(function(t,r){var o=e(t,r);n[o.k]=o.v})),n},ht=function(t){return function(e,n){t[n]=e}},pt=function(t,e,n,r){return dt(t,(function(t,o){(e(t,o)?n:r)(t,o)})),{}},vt=function(t,e){var n={};return pt(t,e,ht(n),C),n},bt=function(t){return function(t,e){var n=[];return dt(t,(function(t,r){n.push(e(t,r))})),n}(t,O)},yt=function(t,e){return xt(t,e)?L.from(t[e]):L.none()},xt=function(t,e){return ft.call(t,e)},wt=function(t,e){return xt(t,e)&&void 0!==t[e]&&null!==t[e]},Ct=Array.isArray,St=function(t,e,n){var r,o;if(!t)return!1;if(n=n||t,void 0!==t.length){for(r=0,o=t.length;r<o;r++)if(!1===e.call(n,t[r],r,t))return!1}else for(r in t)if(xt(t,r)&&!1===e.call(n,t[r],r,t))return!1;return!0},kt=function(t,e){var n=[];return St(t,(function(r,o){n.push(e(r,o,t))})),n},_t=function(t,e){var n=[];return St(t,(function(r,o){e&&!e(r,o,t)||n.push(r)})),n},Ot=function(t,e){if(t)for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1},Et=function(t,e,n,r){for(var o=v(n)?t[0]:n,i=0;i<t.length;i++)o=e.call(r,o,t[i],i);return o},zt=function(t,e,n){var r,o;for(r=0,o=t.length;r<o;r++)if(e.call(n,t[r],r,t))return r;return-1},Tt=function(t){return t[t.length-1]},Mt=function(){return(Mt=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}).apply(this,arguments)};function Dt(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))}var At=function(t){var e,n=!1;return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return n||(n=!0,e=t.apply(null,r)),e}},Nt=function(){return Bt(0,0)},Bt=function(t,e){return{major:t,minor:e}},Rt={nu:Bt,detect:function(t,e){var n=String(e).toLowerCase();return 0===t.length?Nt():function(t,e){var n=function(t,e){for(var n=0;n<t.length;n++){var r=t[n];if(r.test(e))return r}}(t,e);if(!n)return{major:0,minor:0};var r=function(t){return Number(e.replace(n,"$"+t))};return Bt(r(1),r(2))}(t,n)},unknown:Nt},Ht=function(t,e){var n=String(e).toLowerCase();return Q(t,(function(t){return t.search(n)}))},Lt=function(t,e){return-1!==t.indexOf(e)},Vt=function(t,e){return function(t,e,n){return""===e||t.length>=e.length&&t.substr(n,n+e.length)===e}(t,e,0)},Pt=function(t){return function(e){return e.replace(t,"")}},It=Pt(/^\s+|\s+$/g),Ft=Pt(/^\s+/g),Ut=Pt(/\s+$/g),jt=function(t){return t.length>0},Wt=function(t){return!jt(t)},qt=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Gt=function(t){return function(e){return Lt(e,t)}},$t=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(t){return Lt(t,"edge/")&&Lt(t,"chrome")&&Lt(t,"safari")&&Lt(t,"applewebkit")}},{name:"Chrome",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,qt],search:function(t){return Lt(t,"chrome")&&!Lt(t,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(t){return Lt(t,"msie")||Lt(t,"trident")}},{name:"Opera",versionRegexes:[qt,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Gt("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Gt("firefox")},{name:"Safari",versionRegexes:[qt,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(t){return(Lt(t,"safari")||Lt(t,"mobile/"))&&Lt(t,"applewebkit")}}],Xt=[{name:"Windows",search:Gt("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(t){return Lt(t,"iphone")||Lt(t,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Gt("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Gt("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Gt("linux"),versionRegexes:[]},{name:"Solaris",search:Gt("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Gt("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:Gt("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],Kt={browsers:_($t),oses:_(Xt)},Yt="Edge",Jt="Chrome",Qt="Opera",Zt="Firefox",te="Safari",ee=function(t){var e=t.current,n=t.version,r=function(t){return function(){return e===t}};return{current:e,version:n,isEdge:r(Yt),isChrome:r(Jt),isIE:r("IE"),isOpera:r(Qt),isFirefox:r(Zt),isSafari:r(te)}},ne={unknown:function(){return ee({current:void 0,version:Rt.unknown()})},nu:ee,edge:_(Yt),chrome:_(Jt),ie:_("IE"),opera:_(Qt),firefox:_(Zt),safari:_(te)},re="Windows",oe="Android",ie="Linux",ae="Solaris",ue="FreeBSD",ce="ChromeOS",se=function(t){var e=t.current,n=t.version,r=function(t){return function(){return e===t}};return{current:e,version:n,isWindows:r(re),isiOS:r("iOS"),isAndroid:r(oe),isOSX:r("OSX"),isLinux:r(ie),isSolaris:r(ae),isFreeBSD:r(ue),isChromeOS:r(ce)}},le={unknown:function(){return se({current:void 0,version:Rt.unknown()})},nu:se,windows:_(re),ios:_("iOS"),android:_(oe),linux:_(ie),osx:_("OSX"),solaris:_(ae),freebsd:_(ue),chromeos:_(ce)},fe=function(t,e,n){var r=Kt.browsers(),o=Kt.oses(),i=e.bind((function(t){return function(t,e){return st(e.brands,(function(e){var n=e.brand.toLowerCase();return Q(t,(function(t){var e;return n===(null===(e=t.brand)||void 0===e?void 0:e.toLowerCase())})).map((function(t){return{current:t.name,version:Rt.nu(parseInt(e.version,10),0)}}))}))}(r,t)})).orThunk((function(){return function(t,e){return Ht(t,e).map((function(t){var n=Rt.detect(t.versionRegexes,e);return{current:t.name,version:n}}))}(r,t)})).fold(ne.unknown,ne.nu),a=function(t,e){return Ht(t,e).map((function(t){var n=Rt.detect(t.versionRegexes,e);return{current:t.name,version:n}}))}(o,t).fold(le.unknown,le.nu),u=function(t,e,n,r){var o=t.isiOS()&&!0===/ipad/i.test(n),i=t.isiOS()&&!o,a=t.isiOS()||t.isAndroid(),u=a||r("(pointer:coarse)"),c=o||!i&&a&&r("(min-device-width:768px)"),s=i||a&&!c,l=e.isSafari()&&t.isiOS()&&!1===/safari/i.test(n),f=!s&&!c&&!l;return{isiPad:_(o),isiPhone:_(i),isTablet:_(c),isPhone:_(s),isTouch:_(u),isAndroid:t.isAndroid,isiOS:t.isiOS,isWebView:_(l),isDesktop:_(f)}}(a,i,t,n);return{browser:i,os:a,deviceType:u}},de=function(t){return window.matchMedia(t).matches},me=At((function(){return fe(navigator.userAgent,L.from(navigator.userAgentData),de)})),ge=function(){return me()},he=navigator.userAgent,pe=ge(),ve=pe.browser,be=pe.os,ye=pe.deviceType,xe=/WebKit/.test(he)&&!ve.isEdge(),we="FormData"in window&&"FileReader"in window&&"URL"in window&&!!URL.createObjectURL,Ce=-1!==he.indexOf("Windows Phone"),Se={opera:ve.isOpera(),webkit:xe,ie:!(!ve.isIE()&&!ve.isEdge())&&ve.version.major,gecko:ve.isFirefox(),mac:be.isOSX()||be.isiOS(),iOS:ye.isiPad()||ye.isiPhone(),android:be.isAndroid(),contentEditable:!0,transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:!0,range:window.getSelection&&"Range"in window,documentMode:ve.isIE()?document.documentMode||7:10,fileApi:we,ceFalse:!0,cacheSuffix:null,container:null,experimentalShadowDom:!1,canHaveCSP:!ve.isIE(),desktop:ye.isDesktop(),windowsPhone:Ce,browser:{current:ve.current,version:ve.version,isChrome:ve.isChrome,isEdge:ve.isEdge,isFirefox:ve.isFirefox,isIE:ve.isIE,isOpera:ve.isOpera,isSafari:ve.isSafari},os:{current:be.current,version:be.version,isAndroid:be.isAndroid,isChromeOS:be.isChromeOS,isFreeBSD:be.isFreeBSD,isiOS:be.isiOS,isLinux:be.isLinux,isOSX:be.isOSX,isSolaris:be.isSolaris,isWindows:be.isWindows},deviceType:{isDesktop:ye.isDesktop,isiPad:ye.isiPad,isiPhone:ye.isiPhone,isPhone:ye.isPhone,isTablet:ye.isTablet,isTouch:ye.isTouch,isWebView:ye.isWebView}},ke=/^\s*|\s*$/g,_e=function(t){return null==t?"":(""+t).replace(ke,"")},Oe=function(t,e){return e?!("array"!==e||!Ct(t))||typeof t===e:void 0!==t},Ee=function(t,e,n,r){r=r||this,t&&(n&&(t=t[n]),St(t,(function(t,o){if(!1===e.call(r,t,o,n))return!1;Ee(t,e,n,r)})))},ze={trim:_e,isArray:Ct,is:Oe,toArray:function(t){if(Ct(t))return t;for(var e=[],n=0,r=t.length;n<r;n++)e[n]=t[n];return e},makeMap:function(t,e,n){var r;for(e=e||",","string"==typeof(t=t||[])&&(t=t.split(e)),n=n||{},r=t.length;r--;)n[t[r]]={};return n},each:St,map:kt,grep:_t,inArray:Ot,hasOwn:xt,extend:function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r++){var o=e[r];for(var i in o)if(xt(o,i)){var a=o[i];void 0!==a&&(t[i]=a)}}return t},create:function(t,e,n){var r,o,i,a=this,u=0,c=(t=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(t))[3].match(/(^|\.)(\w+)$/i)[2],s=a.createNS(t[3].replace(/\.\w+$/,""),n);if(!s[c]){if("static"===t[2])return s[c]=e,void(this.onCreate&&this.onCreate(t[2],t[3],s[c]));e[c]||(e[c]=function(){},u=1),s[c]=e[c],a.extend(s[c].prototype,e),t[5]&&(r=a.resolve(t[5]).prototype,o=t[5].match(/\.(\w+)$/i)[1],i=s[c],s[c]=u?function(){return r[o].apply(this,arguments)}:function(){return this.parent=r[o],i.apply(this,arguments)},s[c].prototype[c]=s[c],a.each(r,(function(t,e){s[c].prototype[e]=r[e]})),a.each(e,(function(t,e){r[e]?s[c].prototype[e]=function(){return this.parent=r[e],t.apply(this,arguments)}:e!==c&&(s[c].prototype[e]=t)}))),a.each(e.static,(function(t,e){s[c][e]=t}))}},walk:Ee,createNS:function(t,e){var n,r;for(e=e||window,t=t.split("."),n=0;n<t.length;n++)e[r=t[n]]||(e[r]={}),e=e[r];return e},resolve:function(t,e){var n,r;for(e=e||window,n=0,r=(t=t.split(".")).length;n<r&&(e=e[t[n]]);n++);return e},explode:function(t,e){return!t||Oe(t,"array")?t:kt(t.split(e||","),_e)},_addCacheSuffix:function(t){var e=Se.cacheSuffix;return e&&(t+=(-1===t.indexOf("?")?"?":"&")+e),t}},Te=function(t){if(null==t)throw new Error("Node cannot be null or undefined");return{dom:t}},Me={fromHtml:function(t,e){var n=(e||document).createElement("div");if(n.innerHTML=t,!n.hasChildNodes()||n.childNodes.length>1)throw console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return Te(n.childNodes[0])},fromTag:function(t,e){var n=(e||document).createElement(t);return Te(n)},fromText:function(t,e){var n=(e||document).createTextNode(t);return Te(n)},fromDom:Te,fromPoint:function(t,e,n){return L.from(t.dom.elementFromPoint(e,n)).map(Te)}},De=function(t,e){var n=[],r=function(t){return n.push(t),e(t)},o=e(t);do{o=o.bind(r)}while(o.isSome());return n},Ae=function(t,e){var n=t.dom;if(1!==n.nodeType)return!1;var r=n;if(void 0!==r.matches)return r.matches(e);if(void 0!==r.msMatchesSelector)return r.msMatchesSelector(e);if(void 0!==r.webkitMatchesSelector)return r.webkitMatchesSelector(e);if(void 0!==r.mozMatchesSelector)return r.mozMatchesSelector(e);throw new Error("Browser lacks native selectors")},Ne=function(t){return 1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType||0===t.childElementCount},Be=function(t,e){return t.dom===e.dom},Re=function(t,e){return n=t.dom,r=e.dom,function(t,e,n){return 0!=(t.compareDocumentPosition(e)&n)}(n,r,Node.DOCUMENT_POSITION_CONTAINED_BY);var n,r},He=function(t,e){return ge().browser.isIE()?Re(t,e):function(t,e){var n=t.dom,r=e.dom;return n!==r&&n.contains(r)}(t,e)};"undefined"!=typeof window?window:Function("return this;")();var Le=function(t){return t.dom.nodeName.toLowerCase()},Ve=function(t){return t.dom.nodeType},Pe=function(t){return function(e){return Ve(e)===t}},Ie=Pe(1),Fe=Pe(3),Ue=Pe(9),je=Pe(11),We=function(t){return Me.fromDom(t.dom.ownerDocument)},qe=function(t){return Ue(t)?t:We(t)},Ge=function(t){return Me.fromDom(qe(t).dom.defaultView)},$e=function(t){return L.from(t.dom.parentNode).map(Me.fromDom)},Xe=function(t){return L.from(t.dom.previousSibling).map(Me.fromDom)},Ke=function(t){return L.from(t.dom.nextSibling).map(Me.fromDom)},Ye=function(t){return nt(De(t,Xe))},Je=function(t){return De(t,Ke)},Qe=function(t){return W(t.dom.childNodes,Me.fromDom)},Ze=function(t,e){var n=t.dom.childNodes;return L.from(n[e]).map(Me.fromDom)},tn=function(t){return Ze(t,0)},en=function(t){return Ze(t,t.dom.childNodes.length-1)},nn=function(t){return t.dom.childNodes.length},rn=function(t){return je(t)&&y(t.dom.host)},on=x(Element.prototype.attachShadow)&&x(Node.prototype.getRootNode),an=_(on),un=on?function(t){return Me.fromDom(t.dom.getRootNode())}:qe,cn=function(t){return rn(t)?t:function(t){var e=t.dom.head;if(null==e)throw new Error("Head is not available yet");return Me.fromDom(e)}(qe(t))},sn=function(t){return Me.fromDom(t.dom.host)},ln=function(t){return y(t.dom.shadowRoot)},fn=function(t,e){$e(t).each((function(n){n.dom.insertBefore(e.dom,t.dom)}))},dn=function(t,e){Ke(t).fold((function(){$e(t).each((function(t){gn(t,e)}))}),(function(t){fn(t,e)}))},mn=function(t,e){tn(t).fold((function(){gn(t,e)}),(function(n){t.dom.insertBefore(e.dom,n.dom)}))},gn=function(t,e){t.dom.appendChild(e.dom)},hn=function(t,e){q(e,(function(e){gn(t,e)}))},pn=function(t){t.dom.textContent="",q(Qe(t),(function(t){vn(t)}))},vn=function(t){var e=t.dom;null!==e.parentNode&&e.parentNode.removeChild(e)},bn=function(t){var e,n=Qe(t);n.length>0&&(e=t,q(n,(function(t){fn(e,t)}))),vn(t)},yn=function(t){var e=Fe(t)?t.dom.parentNode:t.dom;if(null==e||null===e.ownerDocument)return!1;var n=e.ownerDocument;return function(t){var e=un(t);return rn(e)?L.some(e):L.none()}(Me.fromDom(e)).fold((function(){return n.body.contains(e)}),k(yn,sn))},xn=function(t,e){return{left:t,top:e,translate:function(n,r){return xn(t+n,e+r)}}},wn=xn,Cn=function(t,e){return void 0!==t?t:void 0!==e?e:0},Sn=function(t){var e=t.dom,n=e.ownerDocument.body;return n===e?wn(n.offsetLeft,n.offsetTop):yn(t)?function(t){var e=t.getBoundingClientRect();return wn(e.left,e.top)}(e):wn(0,0)},kn=function(t){var e=void 0!==t?t.dom:document,n=e.body.scrollLeft||e.documentElement.scrollLeft,r=e.body.scrollTop||e.documentElement.scrollTop;return wn(n,r)},_n=function(t,e,n){var r=(void 0!==n?n.dom:document).defaultView;r&&r.scrollTo(t,e)},On=function(t,e){ge().browser.isSafari()&&x(t.dom.scrollIntoViewIfNeeded)?t.dom.scrollIntoViewIfNeeded(!1):t.dom.scrollIntoView(e)},En=function(t,e,n,r){return{x:t,y:e,width:n,height:r,right:t+n,bottom:e+r}},zn=function(t){var e=void 0===t?window:t,n=e.document,r=kn(Me.fromDom(n));return function(t){var e=void 0===t?window:t;return ge().browser.isFirefox()?L.none():L.from(e.visualViewport)}(e).fold((function(){var t=e.document.documentElement,n=t.clientWidth,o=t.clientHeight;return En(r.left,r.top,n,o)}),(function(t){return En(Math.max(t.pageLeft,r.left),Math.max(t.pageTop,r.top),t.width,t.height)}))},Tn=function(t){return function(e){return!!e&&e.nodeType===t}},Mn=function(t){return!!t&&!Object.getPrototypeOf(t)},Dn=Tn(1),An=function(t){var e=t.map((function(t){return t.toLowerCase()}));return function(t){if(t&&t.nodeName){var n=t.nodeName.toLowerCase();return U(e,n)}return!1}},Nn=function(t,e){var n=e.toLowerCase().split(" ");return function(e){if(Dn(e))for(var r=0;r<n.length;r++){var o=e.ownerDocument.defaultView.getComputedStyle(e,null);if((o?o.getPropertyValue(t):null)===n[r])return!0}return!1}},Bn=function(t){return function(e){return Dn(e)&&e.hasAttribute(t)}},Rn=function(t){return Dn(t)&&t.hasAttribute("data-mce-bogus")},Hn=function(t){return Dn(t)&&"TABLE"===t.tagName},Ln=function(t){return function(e){if(Dn(e)){if(e.contentEditable===t)return!0;if(e.getAttribute("data-mce-contenteditable")===t)return!0}return!1}},Vn=An(["textarea","input"]),Pn=Tn(3),In=Tn(8),Fn=Tn(9),Un=Tn(11),jn=An(["br"]),Wn=An(["img"]),qn=Ln("true"),Gn=Ln("false"),$n=An(["td","th"]),Xn=An(["video","audio","object","embed"]),Kn=function(t,e,n){return void 0===n&&(n=E),t.exists((function(t){return n(t,e)}))},Yn=function(t,e,n){return t.isSome()&&e.isSome()?L.some(n(t.getOrDie(),e.getOrDie())):L.none()},Jn=function(t){return void 0!==t.style&&x(t.style.getPropertyValue)},Qn=function(t,e,n){if(!(d(n)||p(n)||w(n)))throw console.error("Invalid call to Attribute.set. Key ",e,":: Value ",n,":: Element ",t),new Error("Attribute value was not simple");t.setAttribute(e,n+"")},Zn=function(t,e,n){Qn(t.dom,e,n)},tr=function(t,e){var n=t.dom;dt(e,(function(t,e){Qn(n,e,t)}))},er=function(t,e){var n=t.dom.getAttribute(e);return null===n?void 0:n},nr=function(t,e){return L.from(er(t,e))},rr=function(t,e){t.dom.removeAttribute(e)},or=function(t,e){var n=t.dom;dt(e,(function(t,e){!function(t,e,n){if(!d(n))throw console.error("Invalid call to CSS.set. Property ",e,":: Value ",n,":: Element ",t),new Error("CSS value must be a string: "+n);Jn(t)&&t.style.setProperty(e,n)}(n,e,t)}))},ir=function(t,e){var n=t.dom,r=window.getComputedStyle(n).getPropertyValue(e);return""!==r||yn(t)?r:ar(n,e)},ar=function(t,e){return Jn(t)?t.style.getPropertyValue(e):""},ur=function(t,e){var n=t.dom,r=ar(n,e);return L.from(r).filter((function(t){return t.length>0}))},cr=function(t){var e={},n=t.dom;if(Jn(n))for(var r=0;r<n.style.length;r++){var o=n.style.item(r);e[o]=n.style[o]}return e},sr=ge().browser,lr=function(t){return Q(t,Ie)},fr=function(t,e){return t.children&&U(t.children,e)},dr=function(t,e,n){var r=0,o=0,i=t.ownerDocument;if(n=n||t,e){if(n===t&&e.getBoundingClientRect&&"static"===ir(Me.fromDom(t),"position")){var a=e.getBoundingClientRect();return{x:r=a.left+(i.documentElement.scrollLeft||t.scrollLeft)-i.documentElement.clientLeft,y:o=a.top+(i.documentElement.scrollTop||t.scrollTop)-i.documentElement.clientTop}}for(var u=e;u&&u!==n&&u.nodeType&&!fr(u,n);){var c=u;r+=c.offsetLeft||0,o+=c.offsetTop||0,u=c.offsetParent}for(u=e.parentNode;u&&u!==n&&u.nodeType&&!fr(u,n);)r-=u.scrollLeft||0,o-=u.scrollTop||0,u=u.parentNode;o+=function(t){return sr.isFirefox()&&"table"===Le(t)?lr(Qe(t)).filter((function(t){return"caption"===Le(t)})).bind((function(t){return lr(Je(t)).map((function(e){var n=e.dom.offsetTop,r=t.dom.offsetTop,o=t.dom.offsetHeight;return n<=r?-o:0}))})).getOr(0):0}(Me.fromDom(e))}return{x:r,y:o}},mr={},gr={exports:mr};!function(t,e,r,o){var i,a;i=this,a=function(){var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{},e={exports:{}};!function(e){!function(t){var n=setTimeout;function r(){}function o(t){if("object"!=typeof this)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=[],l(t,this)}function i(t,e){for(;3===t._state;)t=t._value;0!==t._state?(t._handled=!0,o._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 u(e.promise,t)}a(e.promise,r)}else(1===t._state?a:u)(e.promise,t._value)}))):t._deferreds.push(e)}function a(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof o)return t._state=3,t._value=e,void c(t);if("function"==typeof n)return void l((r=n,i=e,function(){r.apply(i,arguments)}),t)}t._state=1,t._value=e,c(t)}catch(e){u(t,e)}var r,i}function u(t,e){t._state=2,t._value=e,c(t)}function c(t){2===t._state&&0===t._deferreds.length&&o._immediateFn((function(){t._handled||o._unhandledRejectionFn(t._value)}));for(var e=0,n=t._deferreds.length;e<n;e++)i(t,t._deferreds[e]);t._deferreds=null}function s(t,e,n){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=n}function l(t,e){var n=!1;try{t((function(t){n||(n=!0,a(e,t))}),(function(t){n||(n=!0,u(e,t))}))}catch(t){if(n)return;n=!0,u(e,t)}}o.prototype.catch=function(t){return this.then(null,t)},o.prototype.then=function(t,e){var n=new this.constructor(r);return i(this,new s(t,e,n)),n},o.all=function(t){var e=Array.prototype.slice.call(t);return new o((function(t,n){if(0===e.length)return t([]);var r=e.length;function o(i,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var u=a.then;if("function"==typeof u)return void u.call(a,(function(t){o(i,t)}),n)}e[i]=a,0==--r&&t(e)}catch(t){n(t)}}for(var i=0;i<e.length;i++)o(i,e[i])}))},o.resolve=function(t){return t&&"object"==typeof t&&t.constructor===o?t:new o((function(e){e(t)}))},o.reject=function(t){return new o((function(e,n){n(t)}))},o.race=function(t){return new o((function(e,n){for(var r=0,o=t.length;r<o;r++)t[r].then(e,n)}))},o._immediateFn="function"==typeof setImmediate?function(t){setImmediate(t)}:function(t){n(t,0)},o._unhandledRejectionFn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)},o._setImmediateFn=function(t){o._immediateFn=t},o._setUnhandledRejectionFn=function(t){o._unhandledRejectionFn=t},e.exports?e.exports=o:t.Promise||(t.Promise=o)}(t)}(e);var r=e.exports;return{boltExport:("undefined"!=typeof window?window:Function("return this;")()).Promise||r}},"object"==typeof e&&void 0!==r?r.exports=a():"function"==typeof t&&t.amd?t(a):(i="undefined"!=typeof globalThis?globalThis:i||self).EphoxContactWrapper=a()}(void 0,mr,gr);var hr=gr.exports.boltExport,pr=function(t){var e=L.none(),n=[],r=function(t){o()?a(t):n.push(t)},o=function(){return e.isSome()},i=function(t){q(t,a)},a=function(t){e.each((function(e){setTimeout((function(){t(e)}),0)}))};return t((function(t){o()||(e=L.some(t),i(n),n=[])})),{get:r,map:function(t){return pr((function(e){r((function(n){e(t(n))}))}))},isReady:o}},vr={nu:pr,pure:function(t){return pr((function(e){e(t)}))}},br=function(t){setTimeout((function(){throw t}),0)},yr=function(t){var e=function(e){t().then(e,br)};return{map:function(e){return yr((function(){return t().then(e)}))},bind:function(e){return yr((function(){return t().then((function(t){return e(t).toPromise()}))}))},anonBind:function(e){return yr((function(){return t().then((function(){return e.toPromise()}))}))},toLazy:function(){return vr.nu(e)},toCached:function(){var e=null;return yr((function(){return null===e&&(e=t()),e}))},toPromise:t,get:e}},xr=function(t){return yr((function(){return new hr(t)}))},wr=function(t,e){return e((function(e){var n=[],r=0;0===t.length?e([]):q(t,(function(o,i){o.get(function(o){return function(i){n[o]=i,++r>=t.length&&e(n)}}(i))}))}))},Cr=function(t){return{isValue:N,isError:A,getOr:_(t),getOrThunk:_(t),getOrDie:_(t),or:function(e){return Cr(t)},orThunk:function(e){return Cr(t)},fold:function(e,n){return n(t)},map:function(e){return Cr(e(t))},mapError:function(e){return Cr(t)},each:function(e){e(t)},bind:function(e){return e(t)},exists:function(e){return e(t)},forall:function(e){return e(t)},toOptional:function(){return L.some(t)}}},Sr=function(t){return{isValue:A,isError:N,getOr:O,getOrThunk:function(t){return t()},getOrDie:function(){return(e=String(t),function(){throw new Error(e)})();var e},or:O,orThunk:function(t){return t()},fold:function(e,n){return e(t)},map:function(e){return Sr(t)},mapError:function(e){return Sr(e(t))},each:C,bind:function(e){return Sr(t)},exists:A,forall:N,toOptional:L.none}},kr={value:Cr,error:Sr,fromOption:function(t,e){return t.fold((function(){return Sr(e)}),Cr)}},_r=function(t){if(!g(t))throw new Error("cases must be an array");if(0===t.length)throw new Error("there must be at least one case");var e=[],n={};return q(t,(function(r,o){var i=lt(r);if(1!==i.length)throw new Error("one and only one name per case");var a=i[0],u=r[a];if(void 0!==n[a])throw new Error("duplicate key detected:"+a);if("cata"===a)throw new Error("cannot have a case named cata (sorry)");if(!g(u))throw new Error("case arguments must be an array");e.push(a),n[a]=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=n.length;if(i!==u.length)throw new Error("Wrong number of arguments to case "+a+". Expected "+u.length+" ("+u+"), got "+i);var c=function(t){var r=lt(t);if(e.length!==r.length)throw new Error("Wrong number of arguments to match. Expected: "+e.join(",")+"\nActual: "+r.join(","));if(!et(e,(function(t){return U(r,t)})))throw new Error("Not all branches were specified when using match. Specified: "+r.join(", ")+"\nRequired: "+e.join(", "));return t[a].apply(null,n)};return{fold:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(e.length!==t.length)throw new Error("Wrong number of arguments to fold. Expected "+t.length+", got "+e.length);var i=e[o];return i.apply(null,n)},match:c,log:function(t){console.log(t,{constructors:e,constructor:a,params:n})}}}})),n};_r([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);var Or=function(t){return t.fold(O,O)};function Er(t,e,n,r,o){return t(n,r)?L.some(n):x(o)&&o(n)?L.none():e(n,r,o)}var zr,Tr,Mr,Dr,Ar,Nr,Br,Rr,Hr,Lr,Vr,Pr,Ir,Fr,Ur,jr,Wr,qr,Gr,$r,Xr=function(t,e,n){for(var r=t.dom,o=x(n)?n:A;r.parentNode;){r=r.parentNode;var i=Me.fromDom(r);if(e(i))return L.some(i);if(o(i))break}return L.none()},Kr=function(t,e,n){return Er((function(t,e){return e(t)}),Xr,t,e,n)},Yr=function(t,e){return Q(t.dom.childNodes,(function(t){return e(Me.fromDom(t))})).map(Me.fromDom)},Jr=function(t,e,n){return Xr(t,(function(t){return Ae(t,e)}),n)},Qr=function(t,e){return function(t,e){var n=void 0===e?document:e.dom;return Ne(n)?L.none():L.from(n.querySelector(t)).map(Me.fromDom)}(e,t)},Zr=function(t,e,n){return Er((function(t,e){return Ae(t,e)}),Jr,t,e,n)},to=window.Promise?window.Promise:hr,eo=function(t,e){return"number"!=typeof e&&(e=0),setTimeout(t,e)},no=function(t,e){return"number"!=typeof e&&(e=1),setInterval(t,e)},ro=function(t,e){var n,r=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];clearTimeout(n),n=eo((function(){t.apply(this,r)}),e)};return r.stop=function(){clearTimeout(n)},r},oo={requestAnimationFrame:function(t,e){zr?zr.then(t):zr=new to((function(t){e||(e=document.body),function(t,e){for(var n=window.requestAnimationFrame,r=["ms","moz","webkit"],o=0;o<r.length&&!n;o++)n=window[r[o]+"RequestAnimationFrame"];n||(n=function(t){window.setTimeout(t,0)}),n(t,e)}(t,e)})).then(t)},setTimeout:eo,setInterval:no,setEditorTimeout:function(t,e,n){return eo((function(){t.removed||e()}),n)},setEditorInterval:function(t,e,n){var r=no((function(){t.removed?clearInterval(r):e()}),n);return r},debounce:ro,throttle:ro,clearInterval:function(t){return clearInterval(t)},clearTimeout:function(t){return clearTimeout(t)}},io=function(t,e){void 0===e&&(e={});var n=0,r={},o=Me.fromDom(t),i=qe(o),a=e.maxLoadTime||5e3,u=function(u,c,s){var l,f=ze._addCacheSuffix(u),d=function(t){return yt(r,t).getOrThunk((function(){return{id:"mce-u"+n++,passed:[],failed:[],count:0}}))}(f);r[f]=d,d.count++;var m=function(t,e){for(var n=t.length;n--;)t[n]();d.status=e,d.passed=[],d.failed=[],l&&(l.onload=null,l.onerror=null,l=null)},g=function(){return m(d.passed,2)},h=function(){return m(d.failed,3)},p=function(){var e;e=p,function(){for(var e=t.styleSheets,n=e.length;n--;){var r=e[n].ownerNode;if(r&&r.id===l.id)return g(),!0}return!1}()||(Date.now()-y<a?oo.setTimeout(e):h())};if(c&&d.passed.push(c),s&&d.failed.push(s),1!==d.status)if(2!==d.status)if(3!==d.status){d.status=1;var v=Me.fromTag("link",i.dom);tr(v,{rel:"stylesheet",type:"text/css",id:d.id});var b,y=Date.now();e.contentCssCors&&Zn(v,"crossOrigin","anonymous"),e.referrerPolicy&&Zn(v,"referrerpolicy",e.referrerPolicy),(l=v.dom).onload=p,l.onerror=h,b=v,gn(cn(o),b),Zn(v,"href",f)}else h();else g()},c=function(t){return xr((function(e){u(t,S(e,_(kr.value(t))),S(e,_(kr.error(t))))}))},s=function(t){var e=ze._addCacheSuffix(t);yt(r,e).each((function(t){var n,i;0===--t.count&&(delete r[e],n=t.id,i=cn(o),Qr(i,"#"+n).each(vn))}))};return{load:u,loadAll:function(t,e,n){var r;(r=W(t,c),wr(r,xr)).get((function(t){var r=$(t,(function(t){return t.isValue()}));r.fail.length>0?n(r.fail.map(Or)):e(r.pass.map(Or))}))},unload:s,unloadAll:function(t){q(t,(function(t){s(t)}))},_setReferrerPolicy:function(t){e.referrerPolicy=t}}},ao=function(){var t=new WeakMap;return{forElement:function(e,n){var r=un(e).dom;return L.from(t.get(r)).getOrThunk((function(){var e=io(r,n);return t.set(r,e),e}))}}}(),uo=function(){function t(t,e){this.node=t,this.rootNode=e,this.current=this.current.bind(this),this.next=this.next.bind(this),this.prev=this.prev.bind(this),this.prev2=this.prev2.bind(this)}return t.prototype.current=function(){return this.node},t.prototype.next=function(t){return this.node=this.findSibling(this.node,"firstChild","nextSibling",t),this.node},t.prototype.prev=function(t){return this.node=this.findSibling(this.node,"lastChild","previousSibling",t),this.node},t.prototype.prev2=function(t){return this.node=this.findPreviousNode(this.node,"lastChild","previousSibling",t),this.node},t.prototype.findSibling=function(t,e,n,r){var o,i;if(t){if(!r&&t[e])return t[e];if(t!==this.rootNode){if(o=t[n])return o;for(i=t.parentNode;i&&i!==this.rootNode;i=i.parentNode)if(o=i[n])return o}}},t.prototype.findPreviousNode=function(t,e,n,r){var o,i,a;if(t){if(o=t[n],this.rootNode&&o===this.rootNode)return;if(o){if(!r)for(a=o[e];a;a=a[e])if(!a[e])return a;return o}if((i=t.parentNode)&&i!==this.rootNode)return i}},t}(),co=function(t){var e;return function(n){return e=e||function(t,e){for(var n={},r=0,o=t.length;r<o;r++){var i=t[r];n[String(i)]=e(i,r)}return n}(t,N),xt(e,Le(n))}},so=co(["h1","h2","h3","h4","h5","h6"]),lo=co(["article","aside","details","div","dt","figcaption","footer","form","fieldset","header","hgroup","html","main","nav","section","summary","body","p","dl","multicol","dd","figure","address","center","blockquote","h1","h2","h3","h4","h5","h6","listing","xmp","pre","plaintext","menu","dir","ul","ol","li","hr","table","tbody","thead","tfoot","th","tr","td","caption"]),fo=function(t){return Ie(t)&&!lo(t)},mo=function(t){return Ie(t)&&"br"===Le(t)},go=co(["h1","h2","h3","h4","h5","h6","p","div","address","pre","form","blockquote","center","dir","fieldset","header","footer","article","section","hgroup","aside","nav","figure"]),ho=co(["ul","ol","dl"]),po=co(["li","dd","dt"]),vo=co(["thead","tbody","tfoot"]),bo=co(["td","th"]),yo=co(["pre","script","textarea","style"]),xo=" ",wo="\ufeff",Co=function(t){return"\ufeff"===t},So=function(t){return t.replace(/\uFEFF/g,"")},ko=Dn,_o=Pn,Oo=function(t){return _o(t)&&(t=t.parentNode),ko(t)&&t.hasAttribute("data-mce-caret")},Eo=function(t){return _o(t)&&Co(t.data)},zo=function(t){return Oo(t)||Eo(t)},To=function(t){return t.firstChild!==t.lastChild||!jn(t.firstChild)},Mo=function(t){var e=t.container();return!!Pn(e)&&(e.data.charAt(t.offset())===wo||t.isAtStart()&&Eo(e.previousSibling))},Do=function(t){var e=t.container();return!!Pn(e)&&(e.data.charAt(t.offset()-1)===wo||t.isAtEnd()&&Eo(e.nextSibling))},Ao=function(t,e,n){var r,o=e.ownerDocument.createElement(t);o.setAttribute("data-mce-caret",n?"before":"after"),o.setAttribute("data-mce-bogus","all"),o.appendChild(((r=document.createElement("br")).setAttribute("data-mce-bogus","1"),r));var i=e.parentNode;return n?i.insertBefore(o,e):e.nextSibling?i.insertBefore(o,e.nextSibling):i.appendChild(o),o},No=function(t){return _o(t)&&t.data[0]===wo},Bo=function(t){return _o(t)&&t.data[t.data.length-1]===wo},Ro=function(t){return t&&t.hasAttribute("data-mce-caret")?(e=t.getElementsByTagName("br"),n=e[e.length-1],Rn(n)&&n.parentNode.removeChild(n),t.removeAttribute("data-mce-caret"),t.removeAttribute("data-mce-bogus"),t.removeAttribute("style"),t.removeAttribute("_moz_abspos"),t):null;var e,n},Ho=function(t){return Oo(t.startContainer)},Lo=qn,Vo=Gn,Po=jn,Io=Pn,Fo=An(["script","style","textarea"]),Uo=An(["img","input","textarea","hr","iframe","video","audio","object","embed"]),jo=An(["table"]),Wo=zo,qo=function(t){return!Wo(t)&&(Io(t)?!Fo(t.parentNode):Uo(t)||Po(t)||jo(t)||Go(t))},Go=function(t){return!1===function(t){return Dn(t)&&"true"===t.getAttribute("unselectable")}(t)&&Vo(t)},$o=function(t,e){return qo(t)&&function(t,e){for(t=t.parentNode;t&&t!==e;t=t.parentNode){if(Go(t))return!1;if(Lo(t))return!0}return!0}(t,e)},Xo=/^[ \t\r\n]*$/,Ko=function(t){return Xo.test(t)},Yo=function(t,e){var n,r,o,i=Me.fromDom(e),a=Me.fromDom(t);return n=a,r="pre,code",o=z(Be,i),Jr(n,r,o).isSome()},Jo=function(t,e){return qo(t)&&!1===function(t,e){return Pn(t)&&Ko(t.data)&&!1===Yo(t,e)}(t,e)||function(t){return Dn(t)&&"A"===t.nodeName&&!t.hasAttribute("href")&&(t.hasAttribute("name")||t.hasAttribute("id"))}(t)||Qo(t)},Qo=Bn("data-mce-bookmark"),Zo=Bn("data-mce-bogus"),ti=(Tr="data-mce-bogus",Mr="all",function(t){return Dn(t)&&t.getAttribute(Tr)===Mr}),ei=function(t,e){return void 0===e&&(e=!0),function(t,e){var n=0;if(Jo(t,t))return!1;var r=t.firstChild;if(!r)return!0;var o=new uo(r,t);do{if(e){if(ti(r)){r=o.next(!0);continue}if(Zo(r)){r=o.next();continue}}if(jn(r))n++,r=o.next();else{if(Jo(r,t))return!1;r=o.next()}}while(r);return n<=1}(t.dom,e)},ni=function(t,e){return y(t)&&(Jo(t,e)||fo(Me.fromDom(t)))},ri=function(t){return function(t){return"span"===t.nodeName.toLowerCase()}(t)&&"bookmark"===t.getAttribute("data-mce-type")},oi=function(t,e){return Pn(t)&&t.data.length>0&&function(t,e){var n=new uo(t,e).prev(!1),r=new uo(t,e).next(!1),o=v(n)||ni(n,e),i=v(r)||ni(r,e);return o&&i}(t,e)},ii=function(t,e,n){var r=n||e;if(Dn(e)&&ri(e))return e;for(var o=e.childNodes,i=o.length-1;i>=0;i--)ii(t,o[i],r);if(Dn(e)){var a=e.childNodes;1===a.length&&ri(a[0])&&e.parentNode.insertBefore(a[0],e)}return function(t){return Un(t)||Fn(t)}(e)||Jo(e,r)||function(t){return!!Dn(t)&&t.childNodes.length>0}(e)||oi(e,r)||t.remove(e),e},ai=ze.makeMap,ui=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,ci=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,si=/[<>&\"\']/g,li=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,fi={128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"},di={'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","&":"&amp;","`":"&#96;"},mi={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":'"',"&apos;":"'"},gi=function(t,e){var n,r,o,i={};if(t){for(t=t.split(","),e=e||10,n=0;n<t.length;n+=2)r=String.fromCharCode(parseInt(t[n],e)),di[r]||(o="&"+t[n+1]+";",i[r]=o,i[o]=r);return i}},hi=gi("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32),pi=function(t,e){return t.replace(e?ui:ci,(function(t){return di[t]||t}))},vi=function(t,e){return t.replace(e?ui:ci,(function(t){return t.length>1?"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";":di[t]||"&#"+t.charCodeAt(0)+";"}))},bi=function(t,e,n){return n=n||hi,t.replace(e?ui:ci,(function(t){return di[t]||n[t]||t}))},yi={encodeRaw:pi,encodeAllRaw:function(t){return(""+t).replace(si,(function(t){return di[t]||t}))},encodeNumeric:vi,encodeNamed:bi,getEncodeFunc:function(t,e){var n=gi(e)||hi,r=ai(t.replace(/\+/g,","));return r.named&&r.numeric?function(t,e){return t.replace(e?ui:ci,(function(t){return void 0!==di[t]?di[t]:void 0!==n[t]?n[t]:t.length>1?"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";":"&#"+t.charCodeAt(0)+";"}))}:r.named?e?function(t,e){return bi(t,e,n)}:bi:r.numeric?vi:pi},decode:function(t){return t.replace(li,(function(t,e){return e?(e="x"===e.charAt(0).toLowerCase()?parseInt(e.substr(1),16):parseInt(e,10))>65535?(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e))):fi[e]||String.fromCharCode(e):mi[t]||hi[t]||function(t){var e=Me.fromTag("div").dom;return e.innerHTML=t,e.textContent||e.innerText||t}(t)}))}},xi={},wi={},Ci=ze.makeMap,Si=ze.each,ki=ze.extend,_i=ze.explode,Oi=ze.inArray,Ei=function(t,e){return(t=ze.trim(t))?t.split(e||" "):[]},zi=function(t,e){var n;return t&&(n={},"string"==typeof t&&(t={"*":t}),Si(t,(function(t,r){n[r]=n[r.toUpperCase()]="map"===e?Ci(t,/[, ]/):_i(t,/[, ]/)}))),n},Ti=function(t){var e={},n={},r=[],o={},i={},a=function(e,n,r){var o=t[e];return o?o=Ci(o,/[, ]/,Ci(o.toUpperCase(),/[, ]/)):(o=xi[e])||(o=Ci(n," ",Ci(n.toUpperCase()," ")),o=ki(o,r),xi[e]=o),o},u=function(t){var e,n,r,o,i,a,u={},c=function(t,n,r){var o,i,a,c=function(t,e){var n,r,o={};for(n=0,r=t.length;n<r;n++)o[t[n]]=e||{};return o};n=n||"","string"==typeof(r=r||[])&&(r=Ei(r));var s=Ei(t);for(o=s.length;o--;)a={attributes:c(i=Ei([e,n].join(" "))),attributesOrder:i,children:c(r,wi)},u[s[o]]=a},s=function(t,e){var n,r,o,i,a=Ei(t);n=a.length;for(var c=Ei(e);n--;)for(r=u[a[n]],o=0,i=c.length;o<i;o++)r.attributes[c[o]]={},r.attributesOrder.push(c[o])};return xi[t]?xi[t]:(e="id accesskey class dir lang style tabindex title role",n="address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul",r="a abbr b bdo br button cite code del dfn em embed i iframe img input ins kbd label map noscript object q s samp script select small span strong sub sup textarea u var #text #comment","html4"!==t&&(e+=" contenteditable contextmenu draggable dropzone hidden spellcheck translate",n+=" article aside details dialog figure main header footer hgroup section nav",r+=" audio canvas command datalist mark meter output picture progress time wbr video ruby bdi keygen"),"html5-strict"!==t&&(e+=" xml:lang",r=[r,a="acronym applet basefont big font strike tt"].join(" "),Si(Ei(a),(function(t){c(t,"",r)})),n=[n,i="center dir isindex noframes"].join(" "),o=[n,r].join(" "),Si(Ei(i),(function(t){c(t,"",o)}))),o=o||[n,r].join(" "),c("html","manifest","head body"),c("head","","base command link meta noscript script style title"),c("title hr noscript br"),c("base","href target"),c("link","href rel media hreflang type sizes hreflang"),c("meta","name http-equiv content charset"),c("style","media type scoped"),c("script","src async defer type charset"),c("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",o),c("address dt dd div caption","",o),c("h1 h2 h3 h4 h5 h6 pre p abbr code var samp kbd sub sup i b u bdo span legend em strong small s cite dfn","",r),c("blockquote","cite",o),c("ol","reversed start type","li"),c("ul","","li"),c("li","value",o),c("dl","","dt dd"),c("a","href target rel media hreflang type",r),c("q","cite",r),c("ins del","cite datetime",o),c("img","src sizes srcset alt usemap ismap width height"),c("iframe","src name width height",o),c("embed","src type width height"),c("object","data type typemustmatch name usemap form width height",[o,"param"].join(" ")),c("param","name value"),c("map","name",[o,"area"].join(" ")),c("area","alt coords shape href target rel media hreflang type"),c("table","border","caption colgroup thead tfoot tbody tr"+("html4"===t?" col":"")),c("colgroup","span","col"),c("col","span"),c("tbody thead tfoot","","tr"),c("tr","","td th"),c("td","colspan rowspan headers",o),c("th","colspan rowspan headers scope abbr",o),c("form","accept-charset action autocomplete enctype method name novalidate target",o),c("fieldset","disabled form name",[o,"legend"].join(" ")),c("label","form for",r),c("input","accept alt autocomplete checked dirname disabled form formaction formenctype formmethod formnovalidate formtarget height list max maxlength min multiple name pattern readonly required size src step type value width"),c("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value","html4"===t?o:r),c("select","disabled form multiple name required size","option optgroup"),c("optgroup","disabled label","option"),c("option","disabled label selected value"),c("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),c("menu","type label",[o,"li"].join(" ")),c("noscript","",o),"html4"!==t&&(c("wbr"),c("ruby","",[r,"rt rp"].join(" ")),c("figcaption","",o),c("mark rt rp summary bdi","",r),c("canvas","width height",o),c("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",[o,"track source"].join(" ")),c("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",[o,"track source"].join(" ")),c("picture","","img source"),c("source","src srcset type media sizes"),c("track","kind src srclang label default"),c("datalist","",[r,"option"].join(" ")),c("article section nav aside main header footer","",o),c("hgroup","","h1 h2 h3 h4 h5 h6"),c("figure","",[o,"figcaption"].join(" ")),c("time","datetime",r),c("dialog","open",o),c("command","type label icon disabled checked radiogroup command"),c("output","for form name",r),c("progress","value max",r),c("meter","value min max low high optimum",r),c("details","open",[o,"summary"].join(" ")),c("keygen","autofocus challenge disabled form keytype name")),"html5-strict"!==t&&(s("script","language xml:space"),s("style","xml:space"),s("object","declare classid code codebase codetype archive standby align border hspace vspace"),s("embed","align name hspace vspace"),s("param","valuetype type"),s("a","charset name rev shape coords"),s("br","clear"),s("applet","codebase archive code object alt name width height align hspace vspace"),s("img","name longdesc align border hspace vspace"),s("iframe","longdesc frameborder marginwidth marginheight scrolling align"),s("font basefont","size color face"),s("input","usemap align"),s("select"),s("textarea"),s("h1 h2 h3 h4 h5 h6 div p legend caption","align"),s("ul","type compact"),s("li","type"),s("ol dl menu dir","compact"),s("pre","width xml:space"),s("hr","align noshade size width"),s("isindex","prompt"),s("table","summary width frame rules cellspacing cellpadding align bgcolor"),s("col","width align char charoff valign"),s("colgroup","width align char charoff valign"),s("thead","align char charoff valign"),s("tr","align char charoff valign bgcolor"),s("th","axis align char charoff valign nowrap bgcolor width height"),s("form","accept"),s("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),s("tfoot","align char charoff valign"),s("tbody","align char charoff valign"),s("area","nohref"),s("body","background bgcolor text link vlink alink")),"html4"!==t&&(s("input button select textarea","autofocus"),s("input textarea","placeholder"),s("a","download"),s("link script img","crossorigin"),s("img","loading"),s("iframe","sandbox seamless allowfullscreen loading")),Si(Ei("a form meter progress dfn"),(function(t){u[t]&&delete u[t].children[t]})),delete u.caption.children.table,delete u.script,xi[t]=u,u)}((t=t||{}).schema);!1===t.verify_html&&(t.valid_elements="*[*]");var c=zi(t.valid_styles),s=zi(t.invalid_styles,"map"),l=zi(t.valid_classes,"map"),f=a("whitespace_elements","pre script noscript style textarea video audio iframe object code"),d=a("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),m=a("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),g=a("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls"),h="td th iframe video audio object script code",p=a("non_empty_elements",h+" pre",m),v=a("move_caret_before_on_enter_elements",h+" table",m),b=a("text_block_elements","h1 h2 h3 h4 h5 h6 p div address pre form blockquote center dir fieldset header footer article section hgroup aside main nav figure"),y=a("block_elements","hr table tbody thead tfoot th tr td li ol ul caption dl dt dd noscript menu isindex option datalist select optgroup figcaption details summary",b),x=a("text_inline_elements","span strong b em i font strike u var cite dfn code mark q sup sub samp");Si((t.special||"script noscript iframe noframes noembed title style textarea xmp").split(" "),(function(t){i[t]=new RegExp("</"+t+"[^>]*>","gi")}));var w=function(t){return new RegExp("^"+t.replace(/([?+*])/g,".$1")+"$")},C=function(t){var n,o,i,a,u,c,s,l,f,d,m,g,h,p,v,b,y,x,C=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)])?$/,S=/^([!\-])?(\w+[\\:]:\w+|[^=:<]+)?(?:([=:<])(.*))?$/,k=/[*?+]/;if(t){var _=Ei(t,",");for(e["@"]&&(b=e["@"].attributes,y=e["@"].attributesOrder),n=0,o=_.length;n<o;n++)if(u=C.exec(_[n])){if(p=u[1],f=u[2],v=u[3],l=u[5],c={attributes:g={},attributesOrder:h=[]},"#"===p&&(c.paddEmpty=!0),"-"===p&&(c.removeEmpty=!0),"!"===u[4]&&(c.removeEmptyAttrs=!0),b&&(dt(b,(function(t,e){g[e]=t})),h.push.apply(h,y)),l)for(i=0,a=(l=Ei(l,"|")).length;i<a;i++)if(u=S.exec(l[i])){if(s={},m=u[1],d=u[2].replace(/[\\:]:/g,":"),p=u[3],x=u[4],"!"===m&&(c.attributesRequired=c.attributesRequired||[],c.attributesRequired.push(d),s.required=!0),"-"===m){delete g[d],h.splice(Oi(h,d),1);continue}p&&("="===p&&(c.attributesDefault=c.attributesDefault||[],c.attributesDefault.push({name:d,value:x}),s.defaultValue=x),":"===p&&(c.attributesForced=c.attributesForced||[],c.attributesForced.push({name:d,value:x}),s.forcedValue=x),"<"===p&&(s.validValues=Ci(x,"?"))),k.test(d)?(c.attributePatterns=c.attributePatterns||[],s.pattern=w(d),c.attributePatterns.push(s)):(g[d]||h.push(d),g[d]=s)}b||"@"!==f||(b=g,y=h),v&&(c.outputName=f,e[v]=c),k.test(f)?(c.pattern=w(f),r.push(c)):e[f]=c}}},S=function(t){e={},r=[],C(t),Si(u,(function(t,e){n[e]=t.children}))},k=function(t){var r=/^(~)?(.+)$/;t&&(xi.text_block_elements=xi.block_elements=null,Si(Ei(t,","),(function(t){var i=r.exec(t),a="~"===i[1],u=a?"span":"div",c=i[2];if(n[c]=n[u],o[c]=u,a||(y[c.toUpperCase()]={},y[c]={}),!e[c]){var s=e[u];delete(s=ki({},s)).removeEmptyAttrs,delete s.removeEmpty,e[c]=s}Si(n,(function(t,e){t[u]&&(n[e]=t=ki({},n[e]),t[c]=t[u])}))})))},O=function(e){var r=/^([+\-]?)([A-Za-z0-9_\-.\u00b7\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u037d\u037f-\u1fff\u200c-\u200d\u203f-\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]+)\[([^\]]+)]$/;xi[t.schema]=null,e&&Si(Ei(e,","),(function(t){var e,o,i=r.exec(t);i&&(o=i[1],e=o?n[i[2]]:n[i[2]]={"#comment":{}},e=n[i[2]],Si(Ei(i[3],"|"),(function(t){"-"===o?delete e[t]:e[t]={}})))}))},E=function(t){var n,o=e[t];if(o)return o;for(n=r.length;n--;)if((o=r[n]).pattern.test(t))return o};t.valid_elements?S(t.valid_elements):(Si(u,(function(t,r){e[r]={attributes:t.attributes,attributesOrder:t.attributesOrder},n[r]=t.children})),"html5"!==t.schema&&Si(Ei("strong/b em/i"),(function(t){var n=Ei(t,"/");e[n[1]].outputName=n[0]})),Si(Ei("ol ul sub sup blockquote span font a table tbody strong em b i"),(function(t){e[t]&&(e[t].removeEmpty=!0)})),Si(Ei("p h1 h2 h3 h4 h5 h6 th td pre div address caption li"),(function(t){e[t].paddEmpty=!0})),Si(Ei("span"),(function(t){e[t].removeEmptyAttrs=!0}))),k(t.custom_elements),O(t.valid_children),C(t.extended_valid_elements),O("+ol[ul|ol],+ul[ul|ol]"),Si({dd:"dl",dt:"dl",li:"ul ol",td:"tr",th:"tr",tr:"tbody thead tfoot",tbody:"table",thead:"table",tfoot:"table",legend:"fieldset",area:"map",param:"video audio object"},(function(t,n){e[n]&&(e[n].parentsRequired=Ei(t))})),t.invalid_elements&&Si(_i(t.invalid_elements),(function(t){e[t]&&delete e[t]})),E("span")||C("span[!data-mce-type|*]");var z=_(c),T=_(s),M=_(l),D=_(g),A=_(y),N=_(b),B=_(x),R=_(m),H=_(d),L=_(p),V=_(v),P=_(f),I=_(i),F=_(o);return{children:n,elements:e,getValidStyles:z,getValidClasses:M,getBlockElements:A,getInvalidStyles:T,getShortEndedElements:R,getTextBlockElements:N,getTextInlineElements:B,getBoolAttrs:D,getElementRule:E,getSelfClosingElements:H,getNonEmptyElements:L,getMoveCaretBeforeOnEnterElements:V,getWhiteSpaceElements:P,getSpecialElements:I,isValidChild:function(t,e){var r=n[t.toLowerCase()];return!(!r||!r[e.toLowerCase()])},isValid:function(t,e){var n,r,o=E(t);if(o){if(!e)return!0;if(o.attributes[e])return!0;if(n=o.attributePatterns)for(r=n.length;r--;)if(n[r].pattern.test(t))return!0}return!1},getCustomElements:F,addValidElements:C,setValidElements:S,addCustomElements:k,addValidChildren:O}},Mi=function(t,e,n,r){var o=function(t){return(t=parseInt(t,10).toString(16)).length>1?t:"0"+t};return"#"+o(e)+o(n)+o(r)},Di=function(t,e){var n,r,o,i=this,a=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,u=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,c=/\s*([^:]+):\s*([^;]+);?/g,s=/\s+$/,l={},f="\ufeff";t=t||{},e&&(r=e.getValidStyles(),o=e.getInvalidStyles());var d="\\\" \\' \\; \\: ; : \ufeff".split(" ");for(n=0;n<d.length;n++)l[d[n]]=f+n,l[f+n]=d[n];return{toHex:function(t){return t.replace(a,Mi)},parse:function(e){var r,o,d,m,g,h,p,v,b={},y=t.url_converter,x=t.url_converter_scope||i,w=function(t,e,r){var o=b[t+"-top"+e];if(o){var i=b[t+"-right"+e];if(i){var a=b[t+"-bottom"+e];if(a){var u=b[t+"-left"+e];if(u){var c=[o,i,a,u];for(n=c.length-1;n--&&c[n]===c[n+1];);n>-1&&r||(b[t+e]=-1===n?c[0]:c.join(" "),delete b[t+"-top"+e],delete b[t+"-right"+e],delete b[t+"-bottom"+e],delete b[t+"-left"+e])}}}}},C=function(t){var e,n=b[t];if(n){for(e=(n=n.split(" ")).length;e--;)if(n[e]!==n[0])return!1;return b[t]=n[0],!0}},S=function(t){return m=!0,l[t]},k=function(t,e){return m&&(t=t.replace(/\uFEFF[0-9]/g,(function(t){return l[t]}))),e||(t=t.replace(/\\([\'\";:])/g,"$1")),t},_=function(t){return String.fromCharCode(parseInt(t.slice(1),16))},O=function(t){return t.replace(/\\[0-9a-f]+/gi,_)},E=function(e,n,r,o,i,a){if(i=i||a)return"'"+(i=k(i)).replace(/\'/g,"\\'")+"'";if(n=k(n||r||o),!t.allow_script_urls){var u=n.replace(/[\s\r\n]+/g,"");if(/(java|vb)script:/i.test(u))return"";if(!t.allow_svg_data_urls&&/^data:image\/svg/i.test(u))return""}return y&&(n=y.call(x,n,"style")),"url('"+n.replace(/\'/g,"\\'")+"')"};if(e){for(e=(e=e.replace(/[\u0000-\u001F]/g,"")).replace(/\\[\"\';:\uFEFF]/g,S).replace(/\"[^\"]+\"|\'[^\']+\'/g,(function(t){return t.replace(/[;:]/g,S)}));r=c.exec(e);)if(c.lastIndex=r.index+r[0].length,o=r[1].replace(s,"").toLowerCase(),d=r[2].replace(s,""),o&&d){if(o=O(o),d=O(d),-1!==o.indexOf(f)||-1!==o.indexOf('"'))continue;if(!t.allow_script_urls&&("behavior"===o||/expression\s*\(|\/\*|\*\//.test(d)))continue;"font-weight"===o&&"700"===d?d="bold":"color"!==o&&"background-color"!==o||(d=d.toLowerCase()),d=(d=d.replace(a,Mi)).replace(u,E),b[o]=m?k(d,!0):d}w("border","",!0),w("border","-width"),w("border","-color"),w("border","-style"),w("padding",""),w("margin",""),g="border",p="border-style",v="border-color",C(h="border-width")&&C(p)&&C(v)&&(b[g]=b[h]+" "+b[p]+" "+b[v],delete b[h],delete b[p],delete b[v]),"medium none"===b.border&&delete b.border,"none"===b["border-image"]&&delete b["border-image"]}return b},serialize:function(t,e){var n="",i=function(e){var o,i=r[e];if(i)for(var a=0,u=i.length;a<u;a++)e=i[a],(o=t[e])&&(n+=(n.length>0?" ":"")+e+": "+o+";")};return e&&r?(i("*"),i(e)):dt(t,(function(t,r){!t||o&&!function(t,e){var n=o["*"];return!(n&&n[t]||(n=o[e])&&n[t])}(r,e)||(n+=(n.length>0?" ":"")+r+": "+t+";")})),n}}},Ai={keyLocation:!0,layerX:!0,layerY:!0,returnValue:!0,webkitMovementX:!0,webkitMovementY:!0,keyIdentifier:!0,mozPressure:!0},Ni=function(t){return t instanceof Event||x(t.initEvent)},Bi=function(t,e,n,r){var o,i=function(t,e){var n=null!=e?e:{};for(var r in t)xt(Ai,r)||(n[r]=t[r]);return y(n.composedPath)&&(n.composedPath=function(){return t.composedPath()}),n}(e,r);return i.type=t,b(i.target)&&(i.target=null!==(o=i.srcElement)&&void 0!==o?o:n),function(t){return b(t.preventDefault)||Ni(t)}(e)&&(i.preventDefault=function(){i.defaultPrevented=!0,i.isDefaultPrevented=N,x(e.preventDefault)?e.preventDefault():Ni(e)&&(e.returnValue=!1)},i.stopPropagation=function(){i.cancelBubble=!0,i.isPropagationStopped=N,x(e.stopPropagation)?e.stopPropagation():Ni(e)&&(e.cancelBubble=!0)},i.stopImmediatePropagation=function(){i.isImmediatePropagationStopped=N,i.stopPropagation()},function(t){return t.isDefaultPrevented===N||t.isDefaultPrevented===A}(i)||(i.isDefaultPrevented=!0===i.defaultPrevented?N:A,i.isPropagationStopped=!0===i.cancelBubble?N:A,i.isImmediatePropagationStopped=A)),i},Ri=/^(?:mouse|contextmenu)|click/,Hi=function(t,e,n,r){t.addEventListener?t.addEventListener(e,n,r||!1):t.attachEvent&&t.attachEvent("on"+e,n)},Li=function(t,e,n,r){t.removeEventListener?t.removeEventListener(e,n,r||!1):t.detachEvent&&t.detachEvent("on"+e,n)},Vi=function(t,e){var n=Bi(t.type,t,document,e);if(function(t){return y(t)&&Ri.test(t.type)}(t)&&v(t.pageX)&&!v(t.clientX)){var r=n.target.ownerDocument||document,o=r.documentElement,i=r.body,a=n;a.pageX=t.clientX+(o&&o.scrollLeft||i&&i.scrollLeft||0)-(o&&o.clientLeft||i&&i.clientLeft||0),a.pageY=t.clientY+(o&&o.scrollTop||i&&i.scrollTop||0)-(o&&o.clientTop||i&&i.clientTop||0)}return v(n.metaKey)&&(n.metaKey=!1),n},Pi=function(t,e,n){var r=t.document,o={type:"ready"};if(n.domLoaded)e(o);else{var i=function(){Li(t,"DOMContentLoaded",i),Li(t,"load",i),n.domLoaded||(n.domLoaded=!0,e(o)),t=null};"complete"===r.readyState||"interactive"===r.readyState&&r.body?i():Hi(t,"DOMContentLoaded",i),n.domLoaded||Hi(t,"load",i)}},Ii=function(){function t(){this.domLoaded=!1,this.events={},this.count=1,this.expando="mce-data-"+(+new Date).toString(32),this.hasMouseEnterLeave="onmouseenter"in document.documentElement,this.hasFocusIn="onfocusin"in document.documentElement,this.count=1}return t.prototype.bind=function(t,e,n,r){var o,i,a,u,c,s,l,f=this,d=window,m=function(t){f.executeHandlers(Vi(t||d.event),o)};if(t&&3!==t.nodeType&&8!==t.nodeType){t[f.expando]?o=t[f.expando]:(o=f.count++,t[f.expando]=o,f.events[o]={}),r=r||t;var g=e.split(" ");for(a=g.length;a--;)s=m,c=l=!1,"DOMContentLoaded"===(u=g[a])&&(u="ready"),f.domLoaded&&"ready"===u&&"complete"===t.readyState?n.call(r,Vi({type:u})):(f.hasMouseEnterLeave||(c=f.mouseEnterLeave[u])&&(s=function(t){var e=t.currentTarget,n=t.relatedTarget;if(n&&e.contains)n=e.contains(n);else for(;n&&n!==e;)n=n.parentNode;n||((t=Vi(t||d.event)).type="mouseout"===t.type?"mouseleave":"mouseenter",t.target=e,f.executeHandlers(t,o))}),f.hasFocusIn||"focusin"!==u&&"focusout"!==u||(l=!0,c="focusin"===u?"focus":"blur",s=function(t){(t=Vi(t||d.event)).type="focus"===t.type?"focusin":"focusout",f.executeHandlers(t,o)}),(i=f.events[o][u])?"ready"===u&&f.domLoaded?n(Vi({type:u})):i.push({func:n,scope:r}):(f.events[o][u]=i=[{func:n,scope:r}],i.fakeName=c,i.capture=l,i.nativeHandler=s,"ready"===u?Pi(t,s,f):Hi(t,c||u,s,l)));return t=i=null,n}},t.prototype.unbind=function(t,e,n){var r,o,i,a,u;if(!t||3===t.nodeType||8===t.nodeType)return this;var c=t[this.expando];if(c){if(u=this.events[c],e){var s=e.split(" ");for(o=s.length;o--;)if(r=u[a=s[o]]){if(n)for(i=r.length;i--;)if(r[i].func===n){var l=r.nativeHandler,f=r.fakeName,d=r.capture;(r=r.slice(0,i).concat(r.slice(i+1))).nativeHandler=l,r.fakeName=f,r.capture=d,u[a]=r}n&&0!==r.length||(delete u[a],Li(t,r.fakeName||a,r.nativeHandler,r.capture))}}else dt(u,(function(e,n){Li(t,e.fakeName||n,e.nativeHandler,e.capture)})),u={};for(a in u)if(xt(u,a))return this;delete this.events[c];try{delete t[this.expando]}catch(e){t[this.expando]=null}}return this},t.prototype.fire=function(t,e,n){var r;if(!t||3===t.nodeType||8===t.nodeType)return this;var o=Vi({type:e,target:t},n);do{(r=t[this.expando])&&this.executeHandlers(o,r),t=t.parentNode||t.ownerDocument||t.defaultView||t.parentWindow}while(t&&!o.isPropagationStopped());return this},t.prototype.clean=function(t){var e,n;if(!t||3===t.nodeType||8===t.nodeType)return this;if(t[this.expando]&&this.unbind(t),t.getElementsByTagName||(t=t.document),t&&t.getElementsByTagName)for(this.unbind(t),e=(n=t.getElementsByTagName("*")).length;e--;)(t=n[e])[this.expando]&&this.unbind(t);return this},t.prototype.destroy=function(){this.events={}},t.prototype.cancel=function(t){return t&&(t.preventDefault(),t.stopImmediatePropagation()),!1},t.prototype.executeHandlers=function(t,e){var n=this.events[e],r=n&&n[t.type];if(r)for(var o=0,i=r.length;o<i;o++){var a=r[o];if(a&&!1===a.func.call(a.scope,t)&&t.preventDefault(),t.isImmediatePropagationStopped())return}},t.Event=new t,t}(),Fi="sizzle"+-new Date,Ui=window.document,ji=0,Wi=0,qi=ka(),Gi=ka(),$i=ka(),Xi=function(t,e){return t===e&&(Ir=!0),0},Ki="undefined",Yi=1<<31,Ji={}.hasOwnProperty,Qi=[],Zi=Qi.pop,ta=Qi.push,ea=Qi.push,na=Qi.slice,ra=Qi.indexOf||function(t){for(var e=0,n=this.length;e<n;e++)if(this[e]===t)return e;return-1},oa="[\\x20\\t\\r\\n\\f]",ia="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",aa="\\[[\\x20\\t\\r\\n\\f]*("+ia+")(?:"+oa+"*([*^$|!~]?=)"+oa+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+ia+"))|)"+oa+"*\\]",ua=":("+ia+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+aa+")*)|.*)\\)|)",ca=new RegExp("^[\\x20\\t\\r\\n\\f]+|((?:^|[^\\\\])(?:\\\\.)*)[\\x20\\t\\r\\n\\f]+$","g"),sa=new RegExp("^[\\x20\\t\\r\\n\\f]*,[\\x20\\t\\r\\n\\f]*"),la=new RegExp("^[\\x20\\t\\r\\n\\f]*([>+~]|[\\x20\\t\\r\\n\\f])[\\x20\\t\\r\\n\\f]*"),fa=new RegExp("=[\\x20\\t\\r\\n\\f]*([^\\]'\"]*?)[\\x20\\t\\r\\n\\f]*\\]","g"),da=new RegExp(ua),ma=new RegExp("^"+ia+"$"),ga={ID:new RegExp("^#("+ia+")"),CLASS:new RegExp("^\\.("+ia+")"),TAG:new RegExp("^("+ia+"|[*])"),ATTR:new RegExp("^"+aa),PSEUDO:new RegExp("^"+ua),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\([\\x20\\t\\r\\n\\f]*(even|odd|(([+-]|)(\\d*)n|)[\\x20\\t\\r\\n\\f]*(?:([+-]|)[\\x20\\t\\r\\n\\f]*(\\d+)|))[\\x20\\t\\r\\n\\f]*\\)|)","i"),bool:new RegExp("^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$","i"),needsContext:new RegExp("^[\\x20\\t\\r\\n\\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\([\\x20\\t\\r\\n\\f]*((?:-\\d)?\\d*)[\\x20\\t\\r\\n\\f]*\\)|)(?=[^-]|$)","i")},ha=/^(?:input|select|textarea|button)$/i,pa=/^h\d$/i,va=/^[^{]+\{\s*\[native \w/,ba=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ya=/[+~]/,xa=/'|\\/g,wa=new RegExp("\\\\([\\da-f]{1,6}[\\x20\\t\\r\\n\\f]?|([\\x20\\t\\r\\n\\f])|.)","ig"),Ca=function(t,e,n){var r="0x"+e-65536;return r!=r||n?e:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)};try{ea.apply(Qi=na.call(Ui.childNodes),Ui.childNodes),Qi[Ui.childNodes.length].nodeType}catch(t){ea={apply:Qi.length?function(t,e){ta.apply(t,na.call(e))}:function(t,e){for(var n=t.length,r=0;t[n++]=e[r++];);t.length=n-1}}}var Sa=function(t,e,n,r){var o,i,a,u,c,s,l,f,d,m;if((e?e.ownerDocument||e:Ui)!==Ur&&Fr(e),n=n||[],!t||"string"!=typeof t)return n;if(1!==(u=(e=e||Ur).nodeType)&&9!==u)return[];if(Wr&&!r){if(o=ba.exec(t))if(a=o[1]){if(9===u){if(!(i=e.getElementById(a))||!i.parentNode)return n;if(i.id===a)return n.push(i),n}else if(e.ownerDocument&&(i=e.ownerDocument.getElementById(a))&&$r(e,i)&&i.id===a)return n.push(i),n}else{if(o[2])return ea.apply(n,e.getElementsByTagName(t)),n;if((a=o[3])&&Dr.getElementsByClassName)return ea.apply(n,e.getElementsByClassName(a)),n}if(Dr.qsa&&(!qr||!qr.test(t))){if(f=l=Fi,d=e,m=9===u&&t,1===u&&"object"!==e.nodeName.toLowerCase()){for(s=Rr(t),(l=e.getAttribute("id"))?f=l.replace(xa,"\\$&"):e.setAttribute("id",f),f="[id='"+f+"'] ",c=s.length;c--;)s[c]=f+Ma(s[c]);d=ya.test(t)&&za(e.parentNode)||e,m=s.join(",")}if(m)try{return ea.apply(n,d.querySelectorAll(m)),n}catch(t){}finally{l||e.removeAttribute("id")}}}return Lr(t.replace(ca,"$1"),e,n,r)};function ka(){var t=[];return function e(n,r){return t.push(n+" ")>Ar.cacheLength&&delete e[t.shift()],e[n+" "]=r}}function _a(t){return t[Fi]=!0,t}function Oa(t,e){var n=e&&t,r=n&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||Yi)-(~t.sourceIndex||Yi);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function Ea(t){return _a((function(e){return e=+e,_a((function(n,r){for(var o,i=t([],n.length,e),a=i.length;a--;)n[o=i[a]]&&(n[o]=!(r[o]=n[o]))}))}))}function za(t){return t&&typeof t.getElementsByTagName!==Ki&&t}function Ta(){}function Ma(t){for(var e=0,n=t.length,r="";e<n;e++)r+=t[e].value;return r}function Da(t,e,n){var r=e.dir,o=n&&"parentNode"===r,i=Wi++;return e.first?function(e,n,i){for(;e=e[r];)if(1===e.nodeType||o)return t(e,n,i)}:function(e,n,a){var u,c,s=[ji,i];if(a){for(;e=e[r];)if((1===e.nodeType||o)&&t(e,n,a))return!0}else for(;e=e[r];)if(1===e.nodeType||o){if((u=(c=e[Fi]||(e[Fi]={}))[r])&&u[0]===ji&&u[1]===i)return s[2]=u[2];if(c[r]=s,s[2]=t(e,n,a))return!0}}}function Aa(t){return t.length>1?function(e,n,r){for(var o=t.length;o--;)if(!t[o](e,n,r))return!1;return!0}:t[0]}function Na(t,e,n,r,o){for(var i,a=[],u=0,c=t.length,s=null!=e;u<c;u++)(i=t[u])&&(n&&!n(i,r,o)||(a.push(i),s&&e.push(u)));return a}function Ba(t,e,n,r,o,i){return r&&!r[Fi]&&(r=Ba(r)),o&&!o[Fi]&&(o=Ba(o,i)),_a((function(i,a,u,c){var s,l,f,d=[],m=[],g=a.length,h=i||function(t,e,n){for(var r=0,o=e.length;r<o;r++)Sa(t,e[r],n);return n}(e||"*",u.nodeType?[u]:u,[]),p=!t||!i&&e?h:Na(h,d,t,u,c),v=n?o||(i?t:g||r)?[]:a:p;if(n&&n(p,v,u,c),r)for(s=Na(v,m),r(s,[],u,c),l=s.length;l--;)(f=s[l])&&(v[m[l]]=!(p[m[l]]=f));if(i){if(o||t){if(o){for(s=[],l=v.length;l--;)(f=v[l])&&s.push(p[l]=f);o(null,v=[],s,c)}for(l=v.length;l--;)(f=v[l])&&(s=o?ra.call(i,f):d[l])>-1&&(i[s]=!(a[s]=f))}}else v=Na(v===a?v.splice(g,v.length):v),o?o(null,a,v,c):ea.apply(a,v)}))}function Ra(t){for(var e,n,r,o=t.length,i=Ar.relative[t[0].type],a=i||Ar.relative[" "],u=i?1:0,c=Da((function(t){return t===e}),a,!0),s=Da((function(t){return ra.call(e,t)>-1}),a,!0),l=[function(t,n,r){var o=!i&&(r||n!==Vr)||((e=n).nodeType?c(t,n,r):s(t,n,r));return e=null,o}];u<o;u++)if(n=Ar.relative[t[u].type])l=[Da(Aa(l),n)];else{if((n=Ar.filter[t[u].type].apply(null,t[u].matches))[Fi]){for(r=++u;r<o&&!Ar.relative[t[r].type];r++);return Ba(u>1&&Aa(l),u>1&&Ma(t.slice(0,u-1).concat({value:" "===t[u-2].type?"*":""})).replace(ca,"$1"),n,u<r&&Ra(t.slice(u,r)),r<o&&Ra(t=t.slice(r)),r<o&&Ma(t))}l.push(n)}return Aa(l)}Dr=Sa.support={},Br=Sa.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},Fr=Sa.setDocument=function(t){var e,n=t?t.ownerDocument||t:Ui,r=n.defaultView;return n!==Ur&&9===n.nodeType&&n.documentElement?(Ur=n,jr=n.documentElement,Wr=!Br(n),r&&r!==function(t){try{return t.top}catch(t){}return null}(r)&&(r.addEventListener?r.addEventListener("unload",(function(){Fr()}),!1):r.attachEvent&&r.attachEvent("onunload",(function(){Fr()}))),Dr.attributes=!0,Dr.getElementsByTagName=!0,Dr.getElementsByClassName=va.test(n.getElementsByClassName),Dr.getById=!0,Ar.find.ID=function(t,e){if(typeof e.getElementById!==Ki&&Wr){var n=e.getElementById(t);return n&&n.parentNode?[n]:[]}},Ar.filter.ID=function(t){var e=t.replace(wa,Ca);return function(t){return t.getAttribute("id")===e}},Ar.find.TAG=Dr.getElementsByTagName?function(t,e){if(typeof e.getElementsByTagName!==Ki)return e.getElementsByTagName(t)}:function(t,e){var n,r=[],o=0,i=e.getElementsByTagName(t);if("*"===t){for(;n=i[o++];)1===n.nodeType&&r.push(n);return r}return i},Ar.find.CLASS=Dr.getElementsByClassName&&function(t,e){if(Wr)return e.getElementsByClassName(t)},Gr=[],qr=[],Dr.disconnectedMatch=!0,qr=qr.length&&new RegExp(qr.join("|")),Gr=Gr.length&&new RegExp(Gr.join("|")),e=va.test(jr.compareDocumentPosition),$r=e||va.test(jr.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,r=e&&e.parentNode;return t===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):t.compareDocumentPosition&&16&t.compareDocumentPosition(r)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},Xi=e?function(t,e){if(t===e)return Ir=!0,0;var r=!t.compareDocumentPosition-!e.compareDocumentPosition;return r||(1&(r=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!Dr.sortDetached&&e.compareDocumentPosition(t)===r?t===n||t.ownerDocument===Ui&&$r(Ui,t)?-1:e===n||e.ownerDocument===Ui&&$r(Ui,e)?1:Pr?ra.call(Pr,t)-ra.call(Pr,e):0:4&r?-1:1)}:function(t,e){if(t===e)return Ir=!0,0;var r,o=0,i=t.parentNode,a=e.parentNode,u=[t],c=[e];if(!i||!a)return t===n?-1:e===n?1:i?-1:a?1:Pr?ra.call(Pr,t)-ra.call(Pr,e):0;if(i===a)return Oa(t,e);for(r=t;r=r.parentNode;)u.unshift(r);for(r=e;r=r.parentNode;)c.unshift(r);for(;u[o]===c[o];)o++;return o?Oa(u[o],c[o]):u[o]===Ui?-1:c[o]===Ui?1:0},n):Ur},Sa.matches=function(t,e){return Sa(t,null,null,e)},Sa.matchesSelector=function(t,e){if((t.ownerDocument||t)!==Ur&&Fr(t),e=e.replace(fa,"='$1']"),Dr.matchesSelector&&Wr&&(!Gr||!Gr.test(e))&&(!qr||!qr.test(e)))try{var n=undefined.call(t,e);if(n||Dr.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(t){}return Sa(e,Ur,null,[t]).length>0},Sa.contains=function(t,e){return(t.ownerDocument||t)!==Ur&&Fr(t),$r(t,e)},Sa.attr=function(t,e){(t.ownerDocument||t)!==Ur&&Fr(t);var n=Ar.attrHandle[e.toLowerCase()],r=n&&Ji.call(Ar.attrHandle,e.toLowerCase())?n(t,e,!Wr):void 0;return void 0!==r?r:Dr.attributes||!Wr?t.getAttribute(e):(r=t.getAttributeNode(e))&&r.specified?r.value:null},Sa.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},Sa.uniqueSort=function(t){var e,n=[],r=0,o=0;if(Ir=!Dr.detectDuplicates,Pr=!Dr.sortStable&&t.slice(0),t.sort(Xi),Ir){for(;e=t[o++];)e===t[o]&&(r=n.push(o));for(;r--;)t.splice(n[r],1)}return Pr=null,t},Nr=Sa.getText=function(t){var e,n="",r=0,o=t.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=Nr(t)}else if(3===o||4===o)return t.nodeValue}else for(;e=t[r++];)n+=Nr(e);return n},(Ar=Sa.selectors={cacheLength:50,createPseudo:_a,match:ga,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(wa,Ca),t[3]=(t[3]||t[4]||t[5]||"").replace(wa,Ca),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||Sa.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&Sa.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return ga.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&da.test(n)&&(e=Rr(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(wa,Ca).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=qi[t+" "];return e||(e=new RegExp("(^|[\\x20\\t\\r\\n\\f])"+t+"("+oa+"|$)"))&&qi(t,(function(t){return e.test("string"==typeof t.className&&t.className||typeof t.getAttribute!==Ki&&t.getAttribute("class")||"")}))},ATTR:function(t,e,n){return function(r){var o=Sa.attr(r,t);return null==o?"!="===e:!e||(o+="","="===e?o===n:"!="===e?o!==n:"^="===e?n&&0===o.indexOf(n):"*="===e?n&&o.indexOf(n)>-1:"$="===e?n&&o.slice(-n.length)===n:"~="===e?(" "+o+" ").indexOf(n)>-1:"|="===e&&(o===n||o.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,n,r,o){var i="nth"!==t.slice(0,3),a="last"!==t.slice(-4),u="of-type"===e;return 1===r&&0===o?function(t){return!!t.parentNode}:function(e,n,c){var s,l,f,d,m,g,h=i!==a?"nextSibling":"previousSibling",p=e.parentNode,v=u&&e.nodeName.toLowerCase(),b=!c&&!u;if(p){if(i){for(;h;){for(f=e;f=f[h];)if(u?f.nodeName.toLowerCase()===v:1===f.nodeType)return!1;g=h="only"===t&&!g&&"nextSibling"}return!0}if(g=[a?p.firstChild:p.lastChild],a&&b){for(m=(s=(l=p[Fi]||(p[Fi]={}))[t]||[])[0]===ji&&s[1],d=s[0]===ji&&s[2],f=m&&p.childNodes[m];f=++m&&f&&f[h]||(d=m=0)||g.pop();)if(1===f.nodeType&&++d&&f===e){l[t]=[ji,m,d];break}}else if(b&&(s=(e[Fi]||(e[Fi]={}))[t])&&s[0]===ji)d=s[1];else for(;(f=++m&&f&&f[h]||(d=m=0)||g.pop())&&((u?f.nodeName.toLowerCase()!==v:1!==f.nodeType)||!++d||(b&&((f[Fi]||(f[Fi]={}))[t]=[ji,d]),f!==e)););return(d-=o)===r||d%r==0&&d/r>=0}}},PSEUDO:function(t,e){var n,r=Ar.pseudos[t]||Ar.setFilters[t.toLowerCase()]||Sa.error("unsupported pseudo: "+t);return r[Fi]?r(e):r.length>1?(n=[t,t,"",e],Ar.setFilters.hasOwnProperty(t.toLowerCase())?_a((function(t,n){for(var o,i=r(t,e),a=i.length;a--;)t[o=ra.call(t,i[a])]=!(n[o]=i[a])})):function(t){return r(t,0,n)}):r}},pseudos:{not:_a((function(t){var e=[],n=[],r=Hr(t.replace(ca,"$1"));return r[Fi]?_a((function(t,e,n,o){for(var i,a=r(t,null,o,[]),u=t.length;u--;)(i=a[u])&&(t[u]=!(e[u]=i))})):function(t,o,i){return e[0]=t,r(e,null,i,n),e[0]=null,!n.pop()}})),has:_a((function(t){return function(e){return Sa(t,e).length>0}})),contains:_a((function(t){return t=t.replace(wa,Ca),function(e){return(e.textContent||e.innerText||Nr(e)).indexOf(t)>-1}})),lang:_a((function(t){return ma.test(t||"")||Sa.error("unsupported lang: "+t),t=t.replace(wa,Ca).toLowerCase(),function(e){var n;do{if(n=Wr?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}})),target:function(t){var e=window.location&&window.location.hash;return e&&e.slice(1)===t.id},root:function(t){return t===jr},focus:function(t){return t===Ur.activeElement&&(!Ur.hasFocus||Ur.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return!1===t.disabled},disabled:function(t){return!0===t.disabled},checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!Ar.pseudos.empty(t)},header:function(t){return pa.test(t.nodeName)},input:function(t){return ha.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:Ea((function(){return[0]})),last:Ea((function(t,e){return[e-1]})),eq:Ea((function(t,e,n){return[n<0?n+e:n]})),even:Ea((function(t,e){for(var n=0;n<e;n+=2)t.push(n);return t})),odd:Ea((function(t,e){for(var n=1;n<e;n+=2)t.push(n);return t})),lt:Ea((function(t,e,n){for(var r=n<0?n+e:n;--r>=0;)t.push(r);return t})),gt:Ea((function(t,e,n){for(var r=n<0?n+e:n;++r<e;)t.push(r);return t}))}}).pseudos.nth=Ar.pseudos.eq,q(["radio","checkbox","file","password","image"],(function(t){Ar.pseudos[t]=function(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}(t)})),q(["submit","reset"],(function(t){Ar.pseudos[t]=function(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}(t)})),Ta.prototype=Ar.filters=Ar.pseudos,Ar.setFilters=new Ta,Rr=Sa.tokenize=function(t,e){var n,r,o,i,a,u,c,s=Gi[t+" "];if(s)return e?0:s.slice(0);for(a=t,u=[],c=Ar.preFilter;a;){for(i in n&&!(r=sa.exec(a))||(r&&(a=a.slice(r[0].length)||a),u.push(o=[])),n=!1,(r=la.exec(a))&&(n=r.shift(),o.push({value:n,type:r[0].replace(ca," ")}),a=a.slice(n.length)),Ar.filter)Ar.filter.hasOwnProperty(i)&&(!(r=ga[i].exec(a))||c[i]&&!(r=c[i](r))||(n=r.shift(),o.push({value:n,type:i,matches:r}),a=a.slice(n.length)));if(!n)break}return e?a.length:a?Sa.error(t):Gi(t,u).slice(0)},Hr=Sa.compile=function(t,e){var n,r=[],o=[],i=$i[t+" "];if(!i){for(e||(e=Rr(t)),n=e.length;n--;)(i=Ra(e[n]))[Fi]?r.push(i):o.push(i);(i=$i(t,function(t,e){var n=e.length>0,r=t.length>0,o=function(o,i,a,u,c){var s,l,f,d=0,m="0",g=o&&[],h=[],p=Vr,v=o||r&&Ar.find.TAG("*",c),b=ji+=null==p?1:Math.random()||.1,y=v.length;for(c&&(Vr=i!==Ur&&i);m!==y&&null!=(s=v[m]);m++){if(r&&s){for(l=0;f=t[l++];)if(f(s,i,a)){u.push(s);break}c&&(ji=b)}n&&((s=!f&&s)&&d--,o&&g.push(s))}if(d+=m,n&&m!==d){for(l=0;f=e[l++];)f(g,h,i,a);if(o){if(d>0)for(;m--;)g[m]||h[m]||(h[m]=Zi.call(u));h=Na(h)}ea.apply(u,h),c&&!o&&h.length>0&&d+e.length>1&&Sa.uniqueSort(u)}return c&&(ji=b,Vr=p),g};return n?_a(o):o}(o,r))).selector=t}return i},Lr=Sa.select=function(t,e,n,r){var o,i,a,u,c,s="function"==typeof t&&t,l=!r&&Rr(t=s.selector||t);if(n=n||[],1===l.length){if((i=l[0]=l[0].slice(0)).length>2&&"ID"===(a=i[0]).type&&Dr.getById&&9===e.nodeType&&Wr&&Ar.relative[i[1].type]){if(!(e=(Ar.find.ID(a.matches[0].replace(wa,Ca),e)||[])[0]))return n;s&&(e=e.parentNode),t=t.slice(i.shift().value.length)}for(o=ga.needsContext.test(t)?0:i.length;o--&&(a=i[o],!Ar.relative[u=a.type]);)if((c=Ar.find[u])&&(r=c(a.matches[0].replace(wa,Ca),ya.test(i[0].type)&&za(e.parentNode)||e))){if(i.splice(o,1),!(t=r.length&&Ma(i)))return ea.apply(n,r),n;break}}return(s||Hr(t,l))(r,e,!Wr,n,ya.test(t)&&za(e.parentNode)||e),n},Dr.sortStable=Fi.split("").sort(Xi).join("")===Fi,Dr.detectDuplicates=!!Ir,Fr(),Dr.sortDetached=!0;var Ha=document,La=Array.prototype.push,Va=Array.prototype.slice,Pa=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,Ia=Ii.Event,Fa=ze.makeMap("children,contents,next,prev"),Ua=function(t){return void 0!==t},ja=function(t){return"string"==typeof t},Wa=function(t,e){var n,r=(e=e||Ha).createElement("div"),o=e.createDocumentFragment();for(r.innerHTML=t;n=r.firstChild;)o.appendChild(n);return o},qa=function(t,e,n,r){var o;if(ja(e))e=Wa(e,iu(t[0]));else if(e.length&&!e.nodeType){if(e=su.makeArray(e),r)for(o=e.length-1;o>=0;o--)qa(t,e[o],n,r);else for(o=0;o<e.length;o++)qa(t,e[o],n,r);return t}if(e.nodeType)for(o=t.length;o--;)n.call(t[o],e);return t},Ga=function(t,e){return t&&e&&-1!==(" "+t.className+" ").indexOf(" "+e+" ")},$a=function(t,e,n){var r,o;return e=su(e)[0],t.each((function(){var t=this;n&&r===t.parentNode||(r=t.parentNode,o=e.cloneNode(!1),t.parentNode.insertBefore(o,t)),o.appendChild(t)})),t},Xa=ze.makeMap("fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom"," "),Ka=ze.makeMap("checked compact declare defer disabled ismap multiple nohref noshade nowrap readonly selected"," "),Ya={for:"htmlFor",class:"className",readonly:"readOnly"},Ja={float:"cssFloat"},Qa={},Za={},tu=function(t,e){return new su.fn.init(t,e)},eu=/^\s*|\s*$/g,nu=function(t){return null==t?"":(""+t).replace(eu,"")},ru=function(t,e){var n,r,o,i;if(t)if(void 0===(n=t.length)){for(r in t)if(t.hasOwnProperty(r)&&(i=t[r],!1===e.call(i,r,i)))break}else for(o=0;o<n&&(i=t[o],!1!==e.call(i,o,i));o++);return t},ou=function(t,e){var n=[];return ru(t,(function(t,r){e(r,t)&&n.push(r)})),n},iu=function(t){return t?9===t.nodeType?t:t.ownerDocument:Ha};tu.fn=tu.prototype={constructor:tu,selector:"",context:null,length:0,init:function(t,e){var n,r,o=this;if(!t)return o;if(t.nodeType)return o.context=o[0]=t,o.length=1,o;if(e&&e.nodeType)o.context=e;else{if(e)return su(t).attr(e);o.context=e=document}if(ja(t)){if(o.selector=t,!(n="<"===t.charAt(0)&&">"===t.charAt(t.length-1)&&t.length>=3?[null,t,null]:Pa.exec(t)))return su(e).find(t);if(n[1])for(r=Wa(t,iu(e)).firstChild;r;)La.call(o,r),r=r.nextSibling;else{if(!(r=iu(e).getElementById(n[2])))return o;if(r.id!==n[2])return o.find(t);o.length=1,o[0]=r}}else this.add(t,!1);return o},toArray:function(){return ze.toArray(this)},add:function(t,e){var n,r,o=this;if(ja(t))return o.add(su(t));if(!1!==e)for(n=su.unique(o.toArray().concat(su.makeArray(t))),o.length=n.length,r=0;r<n.length;r++)o[r]=n[r];else La.apply(o,su.makeArray(t));return o},attr:function(t,e){var n,r=this;if("object"==typeof t)ru(t,(function(t,e){r.attr(t,e)}));else{if(!Ua(e)){if(r[0]&&1===r[0].nodeType){if((n=Qa[t])&&n.get)return n.get(r[0],t);if(Ka[t])return r.prop(t)?t:void 0;null===(e=r[0].getAttribute(t,2))&&(e=void 0)}return e}this.each((function(){var n;if(1===this.nodeType){if((n=Qa[t])&&n.set)return void n.set(this,e);null===e?this.removeAttribute(t,2):this.setAttribute(t,e,2)}}))}return r},removeAttr:function(t){return this.attr(t,null)},prop:function(t,e){var n=this;if("object"==typeof(t=Ya[t]||t))ru(t,(function(t,e){n.prop(t,e)}));else{if(!Ua(e))return n[0]&&n[0].nodeType&&t in n[0]?n[0][t]:e;this.each((function(){1===this.nodeType&&(this[t]=e)}))}return n},css:function(t,e){var n,r,o=this,i=function(t){return t.replace(/-(\D)/g,(function(t,e){return e.toUpperCase()}))},a=function(t){return t.replace(/[A-Z]/g,(function(t){return"-"+t}))};if("object"==typeof t)ru(t,(function(t,e){o.css(t,e)}));else if(Ua(e))t=i(t),"number"!=typeof e||Xa[t]||(e=e.toString()+"px"),o.each((function(){var n=this.style;if((r=Za[t])&&r.set)r.set(this,e);else{try{this.style[Ja[t]||t]=e}catch(t){}null!==e&&""!==e||(n.removeProperty?n.removeProperty(a(t)):n.removeAttribute(t))}}));else{if(n=o[0],(r=Za[t])&&r.get)return r.get(n);if(!n.ownerDocument.defaultView)return n.currentStyle?n.currentStyle[i(t)]:"";try{return n.ownerDocument.defaultView.getComputedStyle(n,null).getPropertyValue(a(t))}catch(t){return}}return o},remove:function(){for(var t,e=this.length;e--;)t=this[e],Ia.clean(t),t.parentNode&&t.parentNode.removeChild(t);return this},empty:function(){for(var t,e=this.length;e--;)for(t=this[e];t.firstChild;)t.removeChild(t.firstChild);return this},html:function(t){var e,n=this;if(Ua(t)){e=n.length;try{for(;e--;)n[e].innerHTML=t}catch(r){su(n[e]).empty().append(t)}return n}return n[0]?n[0].innerHTML:""},text:function(t){var e,n=this;if(Ua(t)){for(e=n.length;e--;)"innerText"in n[e]?n[e].innerText=t:n[0].textContent=t;return n}return n[0]?n[0].innerText||n[0].textContent:""},append:function(){return qa(this,arguments,(function(t){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.appendChild(t)}))},prepend:function(){return qa(this,arguments,(function(t){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.insertBefore(t,this.firstChild)}),!0)},before:function(){var t=this;return t[0]&&t[0].parentNode?qa(t,arguments,(function(t){this.parentNode.insertBefore(t,this)})):t},after:function(){var t=this;return t[0]&&t[0].parentNode?qa(t,arguments,(function(t){this.parentNode.insertBefore(t,this.nextSibling)}),!0):t},appendTo:function(t){return su(t).append(this),this},prependTo:function(t){return su(t).prepend(this),this},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){return $a(this,t)},wrapAll:function(t){return $a(this,t,!0)},wrapInner:function(t){return this.each((function(){su(this).contents().wrapAll(t)})),this},unwrap:function(){return this.parent().each((function(){su(this).replaceWith(this.childNodes)}))},clone:function(){var t=[];return this.each((function(){t.push(this.cloneNode(!0))})),su(t)},addClass:function(t){return this.toggleClass(t,!0)},removeClass:function(t){return this.toggleClass(t,!1)},toggleClass:function(t,e){var n=this;return"string"!=typeof t||(-1!==t.indexOf(" ")?ru(t.split(" "),(function(){n.toggleClass(this,e)})):n.each((function(n,r){var o=Ga(r,t);if(o!==e){var i=r.className;o?r.className=nu((" "+i+" ").replace(" "+t+" "," ")):r.className+=i?" "+t:t}}))),n},hasClass:function(t){return Ga(this[0],t)},each:function(t){return ru(this,t)},on:function(t,e){return this.each((function(){Ia.bind(this,t,e)}))},off:function(t,e){return this.each((function(){Ia.unbind(this,t,e)}))},trigger:function(t){return this.each((function(){"object"==typeof t?Ia.fire(this,t.type,t):Ia.fire(this,t)}))},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},slice:function(){return su(Va.apply(this,arguments))},eq:function(t){return-1===t?this.slice(t):this.slice(t,+t+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},find:function(t){var e,n,r=[];for(e=0,n=this.length;e<n;e++)su.find(t,this[e],r);return su(r)},filter:function(t){return su("function"==typeof t?ou(this.toArray(),(function(e,n){return t(n,e)})):su.filter(t,this.toArray()))},closest:function(t){var e=[];return t instanceof su&&(t=t[0]),this.each((function(n,r){for(;r;){if("string"==typeof t&&su(r).is(t)){e.push(r);break}if(r===t){e.push(r);break}r=r.parentNode}})),su(e)},offset:function(t){var e,n,r,o,i=0,a=0;return t?this.css(t):((e=this[0])&&(r=(n=e.ownerDocument).documentElement,e.getBoundingClientRect&&(i=(o=e.getBoundingClientRect()).left+(r.scrollLeft||n.body.scrollLeft)-r.clientLeft,a=o.top+(r.scrollTop||n.body.scrollTop)-r.clientTop)),{left:i,top:a})},push:La,sort:Array.prototype.sort,splice:Array.prototype.splice},ze.extend(tu,{extend:ze.extend,makeArray:function(t){return(e=t)&&e===e.window||t.nodeType?[t]:ze.toArray(t);var e},inArray:function(t,e){var n;if(e.indexOf)return e.indexOf(t);for(n=e.length;n--;)if(e[n]===t)return n;return-1},isArray:ze.isArray,each:ru,trim:nu,grep:ou,find:Sa,expr:Sa.selectors,unique:Sa.uniqueSort,text:Sa.getText,contains:Sa.contains,filter:function(t,e,n){var r=e.length;for(n&&(t=":not("+t+")");r--;)1!==e[r].nodeType&&e.splice(r,1);return e=1===e.length?su.find.matchesSelector(e[0],t)?[e[0]]:[]:su.find.matches(t,e)}});var au=function(t,e,n){var r=[],o=t[e];for("string"!=typeof n&&n instanceof su&&(n=n[0]);o&&9!==o.nodeType;){if(void 0!==n){if(o===n)break;if("string"==typeof n&&su(o).is(n))break}1===o.nodeType&&r.push(o),o=o[e]}return r},uu=function(t,e,n,r){var o=[];for(r instanceof su&&(r=r[0]);t;t=t[e])if(!n||t.nodeType===n){if(void 0!==r){if(t===r)break;if("string"==typeof r&&su(t).is(r))break}o.push(t)}return o},cu=function(t,e,n){for(t=t[e];t;t=t[e])if(t.nodeType===n)return t;return null};ru({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return au(t,"parentNode")},next:function(t){return cu(t,"nextSibling",1)},prev:function(t){return cu(t,"previousSibling",1)},children:function(t){return uu(t.firstChild,"nextSibling",1)},contents:function(t){return ze.toArray(("iframe"===t.nodeName?t.contentDocument||t.contentWindow.document:t).childNodes)}},(function(t,e){tu.fn[t]=function(n){var r=[];this.each((function(){var t=e.call(r,this,n,r);t&&(su.isArray(t)?r.push.apply(r,t):r.push(t))})),this.length>1&&(Fa[t]||(r=su.unique(r)),0===t.indexOf("parents")&&(r=r.reverse()));var o=su(r);return n?o.filter(n):o}})),ru({parentsUntil:function(t,e){return au(t,"parentNode",e)},nextUntil:function(t,e){return uu(t,"nextSibling",1,e).slice(1)},prevUntil:function(t,e){return uu(t,"previousSibling",1,e).slice(1)}},(function(t,e){tu.fn[t]=function(n,r){var o=[];this.each((function(){var t=e.call(o,this,n,o);t&&(su.isArray(t)?o.push.apply(o,t):o.push(t))})),this.length>1&&(o=su.unique(o),0!==t.indexOf("parents")&&"prevUntil"!==t||(o=o.reverse()));var i=su(o);return r?i.filter(r):i}})),tu.fn.is=function(t){return!!t&&this.filter(t).length>0},tu.fn.init.prototype=tu.fn,tu.overrideDefaults=function(t){var e,n=function(r,o){return e=e||t(),0===arguments.length&&(r=e.element),o||(o=e.context),new n.fn.init(r,o)};return su.extend(n,this),n},tu.attrHooks=Qa,tu.cssHooks=Za;var su=tu,lu=ze.each,fu=ze.grep,du=Se.ie,mu=/^([a-z0-9],?)+$/i,gu=function(t,e){var n=e.attr("style"),r=t.serialize(t.parse(n),e[0].nodeName);r||(r=null),e.attr("data-mce-style",r)},hu=function(t,e){var n,r,o=0;if(t)for(n=t.nodeType,t=t.previousSibling;t;t=t.previousSibling)r=t.nodeType,(!e||3!==r||r!==n&&t.nodeValue.length)&&(o++,n=r);return o},pu=function(t,e){void 0===e&&(e={});var n={},r=window,o={},i=0,a=ao.forElement(Me.fromDom(t),{contentCssCors:e.contentCssCors,referrerPolicy:e.referrerPolicy}),u=[],c=e.schema?e.schema:Ti({}),s=Di({url_converter:e.url_converter,url_converter_scope:e.url_converter_scope},e.schema),l=e.ownEvents?new Ii:Ii.Event,f=c.getBlockElements(),m=su.overrideDefaults((function(){return{context:t,element:j.getRoot()}})),g=function(e){return e&&t&&d(e)?t.getElementById(e):e},h=function(t){return m("string"==typeof t?g(t):t)},p=function(t,e,n){var r,o,i=h(t);return i.length&&(o=(r=W[e])&&r.get?r.get(i,e):i.attr(e)),void 0===o&&(o=n||""),o},v=function(t){var e=g(t);return e?e.attributes:[]},y=function(t,n,r){""===r&&(r=null);var o=h(t),i=o.attr(n);if(o.length){var a=W[n];a&&a.set?a.set(o,r,n):o.attr(n,r),i!==r&&e.onSetAttrib&&e.onSetAttrib({attrElm:o,attrName:n,attrValue:r})}},x=function(){return e.root_element||t.body},w=function(e,n){return dr(t.body,g(e),n)},S=function(t,e,n){var r=h(t);return n?r.css(e):("float"===(e=e.replace(/-(\D)/g,(function(t,e){return e.toUpperCase()})))&&(e=Se.browser.isIE()?"styleFloat":"cssFloat"),r[0]&&r[0].style?r[0].style[e]:void 0)},k=function(t){var e,n;return t=g(t),e=S(t,"width"),n=S(t,"height"),-1===e.indexOf("px")&&(e=0),-1===n.indexOf("px")&&(n=0),{w:parseInt(e,10)||t.offsetWidth||t.clientWidth,h:parseInt(n,10)||t.offsetHeight||t.clientHeight}},O=function(t,e){var n;if(!t)return!1;if(!Array.isArray(t)){if("*"===e)return 1===t.nodeType;if(mu.test(e)){var r=e.toLowerCase().split(/,/),o=t.nodeName.toLowerCase();for(n=r.length-1;n>=0;n--)if(r[n]===o)return!0;return!1}if(t.nodeType&&1!==t.nodeType)return!1}var i=Array.isArray(t)?t:[t];return Sa(e,i[0].ownerDocument||i[0],null,i).length>0},E=function(t,e,n,r){var o,i=[],a=g(t);for(r=void 0===r,n=n||("BODY"!==x().nodeName?x().parentNode:null),ze.is(e,"string")&&(o=e,e="*"===e?function(t){return 1===t.nodeType}:function(t){return O(t,o)});a&&!(a===n||b(a.nodeType)||Fn(a)||Un(a));){if(!e||"function"==typeof e&&e(a)){if(!r)return[a];i.push(a)}a=a.parentNode}return r?i:null},z=function(t,e,n){var r=e;if(t)for("string"==typeof e&&(r=function(t){return O(t,e)}),t=t[n];t;t=t[n])if("function"==typeof r&&r(t))return t;return null},T=function(t,e,n){var r,o="string"==typeof t?g(t):t;if(!o)return!1;if(ze.isArray(o)&&(o.length||0===o.length))return r=[],lu(o,(function(t,o){t&&r.push(e.call(n,"string"==typeof t?g(t):t,o))})),r;var i=n||this;return e.call(i,o)},M=function(t,e){h(t).each((function(t,n){lu(e,(function(t,e){y(n,e,t)}))}))},D=function(t,e){var n=h(t);du?n.each((function(t,n){if(!1!==n.canHaveHTML){for(;n.firstChild;)n.removeChild(n.firstChild);try{n.innerHTML="<br>"+e,n.removeChild(n.firstChild)}catch(t){su("<div></div>").html("<br>"+e).contents().slice(1).appendTo(n)}return e}})):n.html(e)},A=function(e,n,r,o,i){return T(e,(function(e){var a="string"==typeof n?t.createElement(n):n;return M(a,r),o&&("string"!=typeof o&&o.nodeType?a.appendChild(o):"string"==typeof o&&D(a,o)),i?a:e.appendChild(a)}))},N=function(e,n,r){return A(t.createElement(e),e,n,r,!0)},B=yi.encodeAllRaw,R=function(t,e){var n=h(t);return e?n.each((function(){for(var t;t=this.firstChild;)3===t.nodeType&&0===t.data.length?this.removeChild(t):this.parentNode.insertBefore(t,this)})).remove():n.remove(),n.length>1?n.toArray():n[0]},H=function(t,e,n){h(t).toggleClass(e,n).each((function(){""===this.className&&su(this).attr("class",null)}))},L=function(t,e,n){return T(e,(function(e){return ze.is(e,"array")&&(t=t.cloneNode(!0)),n&&lu(fu(e.childNodes),(function(e){t.appendChild(e)})),e.parentNode.replaceChild(t,e)}))},V=function(t){if(Dn(t)){var e="a"===t.nodeName.toLowerCase()&&!p(t,"href")&&p(t,"id");if(p(t,"name")||p(t,"data-mce-bookmark")||e)return!0}return!1},P=function(){return t.createRange()},I=function(n,o,i,a){if(ze.isArray(n)){for(var c=n.length,s=[];c--;)s[c]=I(n[c],o,i,a);return s}return!e.collect||n!==t&&n!==r||u.push([n,o,i,a]),l.bind(n,o,i,a||j)},F=function(e,n,o){if(ze.isArray(e)){for(var i=e.length,a=[];i--;)a[i]=F(e[i],n,o);return a}if(u.length>0&&(e===t||e===r))for(i=u.length;i--;){var c=u[i];e!==c[0]||n&&n!==c[1]||o&&o!==c[2]||l.unbind(c[0],c[1],c[2])}return l.unbind(e,n,o)},U=function(t){if(t&&Dn(t)){var e=t.getAttribute("data-mce-contenteditable");return e&&"inherit"!==e?e:"inherit"!==t.contentEditable?t.contentEditable:null}return null},j={doc:t,settings:e,win:r,files:o,stdMode:!0,boxModel:!0,styleSheetLoader:a,boundEvents:u,styles:s,schema:c,events:l,isBlock:function(t){if("string"==typeof t)return!!f[t];if(t){var e=t.nodeType;if(e)return!(1!==e||!f[t.nodeName])}return!1},$:m,$$:h,root:null,clone:function(e,n){if(!du||1!==e.nodeType||n)return e.cloneNode(n);var r=t.createElement(e.nodeName);return lu(v(e),(function(t){y(r,t.nodeName,p(e,t.nodeName))})),r},getRoot:x,getViewPort:function(t){var e=zn(t);return{x:e.x,y:e.y,w:e.width,h:e.height}},getRect:function(t){t=g(t);var e=w(t),n=k(t);return{x:e.x,y:e.y,w:n.w,h:n.h}},getSize:k,getParent:function(t,e,n){var r=E(t,e,n,!1);return r&&r.length>0?r[0]:null},getParents:E,get:g,getNext:function(t,e){return z(t,e,"nextSibling")},getPrev:function(t,e){return z(t,e,"previousSibling")},select:function(n,r){return Sa(n,g(r)||e.root_element||t,[])},is:O,add:A,create:N,createHTML:function(t,e,n){var r,o="";for(r in o+="<"+t,e)wt(e,r)&&(o+=" "+r+'="'+B(e[r])+'"');return void 0!==n?o+">"+n+"</"+t+">":o+" />"},createFragment:function(e){var n,r=t.createElement("div"),o=t.createDocumentFragment();for(o.appendChild(r),e&&(r.innerHTML=e);n=r.firstChild;)o.appendChild(n);return o.removeChild(r),o},remove:R,setStyle:function(t,n,r){var o=d(n)?h(t).css(n,r):h(t).css(n);e.update_styles&&gu(s,o)},getStyle:S,setStyles:function(t,n){var r=h(t).css(n);e.update_styles&&gu(s,r)},removeAllAttribs:function(t){return T(t,(function(t){var e,n=t.attributes;for(e=n.length-1;e>=0;e--)t.removeAttributeNode(n.item(e))}))},setAttrib:y,setAttribs:M,getAttrib:p,getPos:w,parseStyle:function(t){return s.parse(t)},serializeStyle:function(t,e){return s.serialize(t,e)},addStyle:function(e){var r,o;if(j!==pu.DOM&&t===document){if(n[e])return;n[e]=!0}(o=t.getElementById("mceDefaultStyles"))||((o=t.createElement("style")).id="mceDefaultStyles",o.type="text/css",(r=t.getElementsByTagName("head")[0]).firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o)),o.styleSheet?o.styleSheet.cssText+=e:o.appendChild(t.createTextNode(e))},loadCSS:function(t){t||(t=""),q(t.split(","),(function(t){o[t]=!0,a.load(t,C)}))},addClass:function(t,e){h(t).addClass(e)},removeClass:function(t,e){H(t,e,!1)},hasClass:function(t,e){return h(t).hasClass(e)},toggleClass:H,show:function(t){h(t).show()},hide:function(t){h(t).hide()},isHidden:function(t){return"none"===h(t).css("display")},uniqueId:function(t){return(t||"mce_")+i++},setHTML:D,getOuterHTML:function(t){var e="string"==typeof t?g(t):t;return Dn(e)?e.outerHTML:su("<div></div>").append(su(e).clone()).html()},setOuterHTML:function(t,e){h(t).each((function(){try{if("outerHTML"in this)return void(this.outerHTML=e)}catch(t){}R(su(this).html(e),!0)}))},decode:yi.decode,encode:B,insertAfter:function(t,e){var n=g(e);return T(t,(function(t){var e=n.parentNode,r=n.nextSibling;return r?e.insertBefore(t,r):e.appendChild(t),t}))},replace:L,rename:function(t,e){var n;return t.nodeName!==e.toUpperCase()&&(n=N(e),lu(v(t),(function(e){y(n,e.nodeName,p(t,e.nodeName))})),L(n,t,!0)),n||t},findCommonAncestor:function(t,e){for(var n,r=t;r;){for(n=e;n&&r!==n;)n=n.parentNode;if(r===n)break;r=r.parentNode}return!r&&t.ownerDocument?t.ownerDocument.documentElement:r},toHex:function(t){return s.toHex(ze.trim(t))},run:T,getAttribs:v,isEmpty:function(t,e){var n,r,o=0;if(V(t))return!1;if(t=t.firstChild){var i=new uo(t,t.parentNode),a=c?c.getWhiteSpaceElements():{};e=e||(c?c.getNonEmptyElements():null);do{if(n=t.nodeType,Dn(t)){var u=t.getAttribute("data-mce-bogus");if(u){t=i.next("all"===u);continue}if(r=t.nodeName.toLowerCase(),e&&e[r]){if("br"===r){o++,t=i.next();continue}return!1}if(V(t))return!1}if(8===n)return!1;if(3===n&&!Ko(t.nodeValue))return!1;if(3===n&&t.parentNode&&a[t.parentNode.nodeName]&&Ko(t.nodeValue))return!1;t=i.next()}while(t)}return o<=1},createRng:P,nodeIndex:hu,split:function(t,e,n){var r,o,i,a=P();if(t&&e)return a.setStart(t.parentNode,hu(t)),a.setEnd(e.parentNode,hu(e)),r=a.extractContents(),(a=P()).setStart(e.parentNode,hu(e)+1),a.setEnd(t.parentNode,hu(t)+1),o=a.extractContents(),(i=t.parentNode).insertBefore(ii(j,r),t),n?i.insertBefore(n,t):i.insertBefore(e,t),i.insertBefore(ii(j,o),t),R(t),n||e},bind:I,unbind:F,fire:function(t,e,n){return l.fire(t,e,n)},getContentEditable:U,getContentEditableParent:function(t){for(var e=x(),n=null;t&&t!==e&&null===(n=U(t));t=t.parentNode);return n},destroy:function(){if(u.length>0)for(var t=u.length;t--;){var e=u[t];l.unbind(e[0],e[1],e[2])}dt(o,(function(t,e){a.unload(e),delete o[e]})),Sa.setDocument&&Sa.setDocument()},isChildOf:function(t,e){if(du){for(;t;){if(e===t)return!0;t=t.parentNode}return!1}return t===e||e.contains(t)},dumpRng:function(t){return"startContainer: "+t.startContainer.nodeName+", startOffset: "+t.startOffset+", endContainer: "+t.endContainer.nodeName+", endOffset: "+t.endOffset}},W=function(t,e,n){var r=e.keep_values,o={set:function(t,r,o){e.url_converter&&null!==r&&(r=e.url_converter.call(e.url_converter_scope||n(),r,o,t[0])),t.attr("data-mce-"+o,r).attr(o,r)},get:function(t,e){return t.attr("data-mce-"+e)||t.attr(e)}},i={style:{set:function(e,n){null===n||"object"!=typeof n?(r&&e.attr("data-mce-style",n),null!==n&&"string"==typeof n?(e.removeAttr("style"),e.css(t.parse(n))):e.attr("style",n)):e.css(n)},get:function(e){var n=e.attr("data-mce-style")||e.attr("style");return t.serialize(t.parse(n),e[0].nodeName)}}};return r&&(i.href=i.src=o),i}(s,e,_(j));return j};pu.DOM=pu(document),pu.nodeIndex=hu;var vu=pu.DOM,bu=ze.each,yu=ze.grep,xu=function(){function t(t){void 0===t&&(t={}),this.states={},this.queue=[],this.scriptLoadedCallbacks={},this.queueLoadedCallbacks=[],this.loading=0,this.settings=t}return t.prototype._setReferrerPolicy=function(t){this.settings.referrerPolicy=t},t.prototype.loadScript=function(t,e,n){var r,o=vu,i=function(){o.remove(a),r&&(r.onerror=r.onload=r=null)},a=o.uniqueId();(r=document.createElement("script")).id=a,r.type="text/javascript",r.src=ze._addCacheSuffix(t),this.settings.referrerPolicy&&o.setAttrib(r,"referrerpolicy",this.settings.referrerPolicy),r.onload=function(){i(),e()},r.onerror=function(){i(),x(n)?n():"undefined"!=typeof console&&console.log&&console.log("Failed to load script: "+t)},(document.getElementsByTagName("head")[0]||document.body).appendChild(r)},t.prototype.isDone=function(t){return 2===this.states[t]},t.prototype.markDone=function(t){this.states[t]=2},t.prototype.add=function(t,e,n,r){var o=this.states[t];this.queue.push(t),void 0===o&&(this.states[t]=0),e&&(this.scriptLoadedCallbacks[t]||(this.scriptLoadedCallbacks[t]=[]),this.scriptLoadedCallbacks[t].push({success:e,failure:r,scope:n||this}))},t.prototype.load=function(t,e,n,r){return this.add(t,e,n,r)},t.prototype.remove=function(t){delete this.states[t],delete this.scriptLoadedCallbacks[t]},t.prototype.loadQueue=function(t,e,n){this.loadScripts(this.queue,t,e,n)},t.prototype.loadScripts=function(t,e,n,r){var o=this,i=[],a=function(t,e){bu(o.scriptLoadedCallbacks[e],(function(e){x(e[t])&&e[t].call(e.scope)})),o.scriptLoadedCallbacks[e]=void 0};o.queueLoadedCallbacks.push({success:e,failure:r,scope:n||this});var u=function(){var e=yu(t);if(t.length=0,bu(e,(function(t){2!==o.states[t]?3!==o.states[t]?1!==o.states[t]&&(o.states[t]=1,o.loading++,o.loadScript(t,(function(){o.states[t]=2,o.loading--,a("success",t),u()}),(function(){o.states[t]=3,o.loading--,i.push(t),a("failure",t),u()}))):a("failure",t):a("success",t)})),!o.loading){var n=o.queueLoadedCallbacks.slice(0);o.queueLoadedCallbacks.length=0,bu(n,(function(t){0===i.length?x(t.success)&&t.success.call(t.scope):x(t.failure)&&t.failure.call(t.scope,i)}))}};u()},t.ScriptLoader=new t,t}(),wu=function(t){var e=t;return{get:function(){return e},set:function(t){e=t}}},Cu={},Su=wu("en"),ku=function(){return yt(Cu,Su.get())},_u={getData:function(){return mt(Cu,(function(t){return Mt({},t)}))},setCode:function(t){t&&Su.set(t)},getCode:function(){return Su.get()},add:function(t,e){var n=Cu[t];n||(Cu[t]=n={}),dt(e,(function(t,e){n[e.toLowerCase()]=t}))},translate:function(t){var e,n=ku().getOr({}),r=function(t){return x(t)?Object.prototype.toString.call(t):o(t)?"":""+t},o=function(t){return""===t||null==t},i=function(t){var e=r(t);return yt(n,e.toLowerCase()).map(r).getOr(e)},a=function(t){return t.replace(/{context:\w+}$/,"")};if(o(t))return"";if(m(e=t)&&xt(e,"raw"))return r(t.raw);if(function(t){return g(t)&&t.length>1}(t)){var u=t.slice(1);return a(i(t[0]).replace(/\{([0-9]+)\}/g,(function(t,e){return xt(u,e)?r(u[e]):t})))}return a(i(t))},isRtl:function(){return ku().bind((function(t){return yt(t,"_dir")})).exists((function(t){return"rtl"===t}))},hasCode:function(t){return xt(Cu,t)}},Ou=function(){var t=[],e={},n={},r=[],o=function(t,e){var n=X(r,(function(n){return n.name===t&&n.state===e}));q(n,(function(t){return t.callback()}))},i=function(t){var e;return n[t]&&(e=n[t].dependencies),e||[]},a=function(t,e){return"object"==typeof e?e:"string"==typeof t?{prefix:"",resource:e,suffix:""}:{prefix:t.prefix,resource:e,suffix:t.suffix}},u=function(t,r,c,s,l){if(!e[t]){var f="string"==typeof r?r:r.prefix+r.resource+r.suffix;0!==f.indexOf("/")&&-1===f.indexOf("://")&&(f=Ou.baseURL+"/"+f),e[t]=f.substring(0,f.lastIndexOf("/"));var d=function(){o(t,"loaded"),function(t,e,n,r){var o=i(t);q(o,(function(t){var n=a(e,t);u(n.resource,n,void 0,void 0)})),n&&(r?n.call(r):n.call(xu))}(t,r,c,s)};n[t]?d():xu.ScriptLoader.add(f,d,s,l)}},c=function(t,o,i){void 0===i&&(i="added"),xt(n,t)&&"added"===i||xt(e,t)&&"loaded"===i?o():r.push({name:t,state:i,callback:o})};return{items:t,urls:e,lookup:n,_listeners:r,get:function(t){if(n[t])return n[t].instance},dependencies:i,requireLangPack:function(t,n){!1!==Ou.languageLoad&&c(t,(function(){var r=_u.getCode();!r||n&&-1===(","+(n||"")+",").indexOf(","+r+",")||xu.ScriptLoader.add(e[t]+"/langs/"+r+".js")}),"loaded")},add:function(e,r,i){var a=r;return t.push(a),n[e]={instance:a,dependencies:i},o(e,"added"),a},remove:function(t){delete e[t],delete n[t]},createUrl:a,addComponents:function(t,n){var r=e[t];q(n,(function(t){xu.ScriptLoader.add(r+"/"+t)}))},load:u,waitFor:c}};Ou.languageLoad=!0,Ou.baseURL="",Ou.PluginManager=Ou(),Ou.ThemeManager=Ou();var Eu=function(){var t=function(t){var e=wu(L.none()),n=function(){return e.get().each(t)};return{clear:function(){n(),e.set(L.none())},isSet:function(){return e.get().isSome()},get:function(){return e.get()},set:function(t){n(),e.set(L.some(t))}}}(C);return Mt(Mt({},t),{on:function(e){return t.get().each(e)}})},zu=function(t,e){var n=null;return{cancel:function(){h(n)||(clearTimeout(n),n=null)},throttle:function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];h(n)&&(n=setTimeout((function(){n=null,t.apply(null,r)}),e))}}},Tu=function(t,e){var n=null,r=function(){h(n)||(clearTimeout(n),n=null)};return{cancel:r,throttle:function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];r(),n=setTimeout((function(){n=null,t.apply(null,o)}),e)}}},Mu=function(t,e){var n=er(t,e);return void 0===n||""===n?[]:n.split(" ")},Du=function(t){return void 0!==t.dom.classList},Au=function(t,e){return function(t,e,n){var r=Mu(t,e).concat([n]);return Zn(t,e,r.join(" ")),!0}(t,"class",e)},Nu=function(t,e){return function(t,e,n){var r=X(Mu(t,e),(function(t){return t!==n}));return r.length>0?Zn(t,e,r.join(" ")):rr(t,e),!1}(t,"class",e)},Bu=function(t,e){Du(t)?t.dom.classList.add(e):Au(t,e)},Ru=function(t){0===(Du(t)?t.dom.classList:function(t){return Mu(t,"class")}(t)).length&&rr(t,"class")},Hu=function(t,e){return Du(t)&&t.dom.classList.contains(e)},Lu=function(t,e){var n=[];return q(Qe(t),(function(t){e(t)&&(n=n.concat([t])),n=n.concat(Lu(t,e))})),n},Vu=function(t,e){return function(t,e){var n=void 0===e?document:e.dom;return Ne(n)?[]:W(n.querySelectorAll(t),Me.fromDom)}(e,t)},Pu=_("mce-annotation"),Iu=_("data-mce-annotation"),Fu=_("data-mce-annotation-uid"),Uu=function(t,e){var n=t.selection.getRng(),r=Me.fromDom(n.startContainer),o=Me.fromDom(t.getBody()),i=e.fold((function(){return"."+Pu()}),(function(t){return"["+Iu()+'="'+t+'"]'})),a=Ze(r,n.startOffset).getOr(r),u=Zr(a,i,(function(t){return Be(t,o)})),c=function(t,e){return function(t,e){var n=t.dom;return!(!n||!n.hasAttribute)&&n.hasAttribute(e)}(t,e)?L.some(er(t,e)):L.none()};return u.bind((function(e){return c(e,""+Fu()).bind((function(n){return c(e,""+Iu()).map((function(e){var r=ju(t,n);return{uid:n,name:e,elements:r}}))}))}))},ju=function(t,e){var n=Me.fromDom(t.getBody());return Vu(n,"["+Fu()+'="'+e+'"]')},Wu=function(t,e){var n=wu({}),r=function(){return{listeners:[],previous:Eu()}},o=function(t,e){i(t,(function(t){return e(t),t}))},i=function(t,e){var o=n.get(),i=e(yt(o,t).getOrThunk(r));o[t]=i,n.set(o)},a=Tu((function(){var e=n.get(),r=ot(lt(e));q(r,(function(e){i(e,(function(n){var r=n.previous.get();return Uu(t,L.some(e)).fold((function(){r.isSome()&&(!function(t){o(t,(function(e){q(e.listeners,(function(e){return e(!1,t)}))}))}(e),n.previous.clear())}),(function(t){var e=t.uid,i=t.name,a=t.elements;Kn(r,e)||(!function(t,e,n){o(t,(function(r){q(r.listeners,(function(r){return r(!0,t,{uid:e,nodes:W(n,(function(t){return t.dom}))})}))}))}(i,e,a),n.previous.set(e))})),{previous:n.previous,listeners:n.listeners}}))}))}),30);t.on("remove",(function(){a.cancel()})),t.on("NodeChange",(function(){a.throttle()}));return{addListener:function(t,e){i(t,(function(t){return{previous:t.previous,listeners:t.listeners.concat([e])}}))}}},qu=function(t,e){t.on("init",(function(){t.serializer.addNodeFilter("span",(function(t){q(t,(function(t){(function(t){return L.from(t.attr(Iu())).bind(e.lookup)})(t).each((function(e){!1===e.persistent&&t.unwrap()}))}))}))}))},Gu=0,$u=function(t){var e=(new Date).getTime();return t+"_"+Math.floor(1e9*Math.random())+ ++Gu+String(e)},Xu=function(t,e){var n,r,o=We(t).dom,i=Me.fromDom(o.createDocumentFragment()),a=(n=e,(r=(o||document).createElement("div")).innerHTML=n,Qe(Me.fromDom(r)));hn(i,a),pn(t),gn(t,i)},Ku=function(t,e){return Me.fromDom(t.dom.cloneNode(e))},Yu=function(t){return Ku(t,!1)},Ju=function(t){return Ku(t,!0)},Qu=function(t,e,n){void 0===n&&(n=A);var r=new uo(t,e),o=function(t){var e;do{e=r[t]()}while(e&&!Pn(e)&&!n(e));return L.from(e).filter(Pn)};return{current:function(){return L.from(r.current()).filter(Pn)},next:function(){return o("next")},prev:function(){return o("prev")},prev2:function(){return o("prev2")}}},Zu=function(t,e){var n=e||function(e){return t.isBlock(e)||jn(e)||Gn(e)},r=function(t,e,n,o){if(Pn(t)){var i=o(t,e,t.data);if(-1!==i)return L.some({container:t,offset:i})}return n().bind((function(t){return r(t.container,t.offset,n,o)}))};return{backwards:function(t,e,o,i){var a=Qu(t,i,n);return r(t,e,(function(){return a.prev().map((function(t){return{container:t,offset:t.length}}))}),o).getOrNull()},forwards:function(t,e,o,i){var a=Qu(t,i,n);return r(t,e,(function(){return a.next().map((function(t){return{container:t,offset:0}}))}),o).getOrNull()}}},tc=Math.round,ec=function(t){return t?{left:tc(t.left),top:tc(t.top),bottom:tc(t.bottom),right:tc(t.right),width:tc(t.width),height:tc(t.height)}:{left:0,top:0,bottom:0,right:0,width:0,height:0}},nc=function(t,e){return t=ec(t),e||(t.left=t.left+t.width),t.right=t.left,t.width=0,t},rc=function(t,e,n){return t>=0&&t<=Math.min(e.height,n.height)/2},oc=function(t,e){var n=Math.min(e.height/2,t.height/2);return t.bottom-n<e.top||!(t.top>e.bottom)&&rc(e.top-t.bottom,t,e)},ic=function(t,e){return t.top>e.bottom||!(t.bottom<e.top)&&rc(e.bottom-t.top,t,e)},ac=function(t,e,n){return e>=t.left&&e<=t.right&&n>=t.top&&n<=t.bottom},uc=function(t){var e=t.startContainer,n=t.startOffset;return e.hasChildNodes()&&t.endOffset===n+1?e.childNodes[n]:null},cc=function(t,e){if(Dn(t)&&t.hasChildNodes()){var n=t.childNodes;return n[function(t,e,n){return Math.min(Math.max(t,e),n)}(e,0,n.length-1)]}return t},sc=new RegExp("[̀-ͯ҃-҇҈-҉֑-ֽֿׁ-ׂׄ-ׇׅؐ-ًؚ-ٰٟۖ-ۜ۟-ۤۧ-۪ۨ-ܑۭܰ-݊ަ-ް߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣣ-ंऺ़ु-ै्॑-ॗॢ-ॣঁ়াু-ৄ্ৗৢ-ৣਁ-ਂ਼ੁ-ੂੇ-ੈੋ-੍ੑੰ-ੱੵઁ-ં઼ુ-ૅે-ૈ્ૢ-ૣଁ଼ାିୁ-ୄ୍ୖୗୢ-ୣஂாீ்ௗఀా-ీె-ైొ-్ౕ-ౖౢ-ౣಁ಼ಿೂೆೌ-್ೕ-ೖೢ-ೣഁാു-ൄ്ൗൢ-ൣ්ාි-ුූෟัิ-ฺ็-๎ັິ-ູົ-ຼ່-ໍ༘-ཱ༹༙༵༷-ཾྀ-྄྆-྇ྍ-ྗྙ-ྼ࿆ိ-ူဲ-့္-်ွ-ှၘ-ၙၞ-ၠၱ-ၴႂႅ-ႆႍႝ፝-፟ᜒ-᜔ᜲ-᜴ᝒ-ᝓᝲ-ᝳ឴-឵ិ-ួំ៉-៓៝᠋-᠍ᢩᤠ-ᤢᤧ-ᤨᤲ᤹-᤻ᨗ-ᨘᨛᩖᩘ-ᩞ᩠ᩢᩥ-ᩬᩳ-᩿᩼᪰-᪽᪾ᬀ-ᬃ᬴ᬶ-ᬺᬼᭂ᭫-᭳ᮀ-ᮁᮢ-ᮥᮨ-ᮩ᮫-ᮭ᯦ᯨ-ᯩᯭᯯ-ᯱᰬ-ᰳᰶ-᰷᳐-᳔᳒-᳢᳠-᳨᳭᳴᳸-᳹᷀-᷵᷼-᷿‌-‍⃐-⃜⃝-⃠⃡⃢-⃤⃥-⃰⳯-⵿⳱ⷠ-〪ⷿ-〭〮-゙〯-゚꙯꙰-꙲ꙴ-꙽ꚞ-ꚟ꛰-꛱ꠂ꠆ꠋꠥ-ꠦ꣄꣠-꣱ꤦ-꤭ꥇ-ꥑꦀ-ꦂ꦳ꦶ-ꦹꦼꧥꨩ-ꨮꨱ-ꨲꨵ-ꨶꩃꩌꩼꪰꪲ-ꪴꪷ-ꪸꪾ-꪿꫁ꫬ-ꫭ꫶ꯥꯨ꯭ﬞ︀-️︠-゙︯-゚]"),lc=function(t){return"string"==typeof t&&t.charCodeAt(0)>=768&&sc.test(t)},fc=Dn,dc=qo,mc=Nn("display","block table"),gc=Nn("float","left right"),hc=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){for(var n=0;n<t.length;n++)if(!t[n](e))return!1;return!0}}(fc,dc,T(gc)),pc=T(Nn("white-space","pre pre-line pre-wrap")),vc=Pn,bc=jn,yc=pu.nodeIndex,xc=function(t,e){return e<0&&Dn(t)&&t.hasChildNodes()?void 0:cc(t,e)},wc=function(t){return"createRange"in t?t.createRange():pu.DOM.createRng()},Cc=function(t){return t&&/[\r\n\t ]/.test(t)},Sc=function(t){return!!t.setStart&&!!t.setEnd},kc=function(t){var e=t.startContainer,n=t.startOffset;if(Cc(t.toString())&&pc(e.parentNode)&&Pn(e)){var r=e.data;if(Cc(r[n-1])||Cc(r[n+1]))return!0}return!1},_c=function(t){return 0===t.left&&0===t.right&&0===t.top&&0===t.bottom},Oc=function(t){var e,n=t.getClientRects();return e=n.length>0?ec(n[0]):ec(t.getBoundingClientRect()),!Sc(t)&&bc(t)&&_c(e)?function(t){var e=t.ownerDocument,n=wc(e),r=e.createTextNode(xo),o=t.parentNode;o.insertBefore(r,t),n.setStart(r,0),n.setEnd(r,1);var i=ec(n.getBoundingClientRect());return o.removeChild(r),i}(t):_c(e)&&Sc(t)?function(t){var e=t.startContainer,n=t.endContainer,r=t.startOffset,o=t.endOffset;if(e===n&&Pn(n)&&0===r&&1===o){var i=t.cloneRange();return i.setEndAfter(n),Oc(i)}return null}(t):e},Ec=function(t,e){var n=nc(t,e);return n.width=1,n.right=n.left+1,n},zc=function(t){var e=[],n=function(t){var n,r;0!==t.height&&(e.length>0&&(n=t,r=e[e.length-1],n.left===r.left&&n.top===r.top&&n.bottom===r.bottom&&n.right===r.right)||e.push(t))},r=function(t,r){var o=wc(t.ownerDocument);if(r<t.data.length){if(lc(t.data[r]))return e;if(lc(t.data[r-1])&&(o.setStart(t,r),o.setEnd(t,r+1),!kc(o)))return n(Ec(Oc(o),!1)),e}r>0&&(o.setStart(t,r-1),o.setEnd(t,r),kc(o)||n(Ec(Oc(o),!1))),r<t.data.length&&(o.setStart(t,r),o.setEnd(t,r+1),kc(o)||n(Ec(Oc(o),!0)))},o=t.container(),i=t.offset();if(vc(o))return r(o,i),e;if(fc(o))if(t.isAtEnd()){var a=xc(o,i);vc(a)&&r(a,a.data.length),hc(a)&&!bc(a)&&n(Ec(Oc(a),!1))}else{a=xc(o,i);if(vc(a)&&r(a,0),hc(a)&&t.isAtEnd())return n(Ec(Oc(a),!1)),e;var u=xc(t.container(),t.offset()-1);hc(u)&&!bc(u)&&(mc(u)||mc(a)||!hc(a))&&n(Ec(Oc(u),!1)),hc(a)&&n(Ec(Oc(a),!0))}return e},Tc=function(t,e,n){var r=function(){return n||(n=zc(Tc(t,e))),n};return{container:_(t),offset:_(e),toRange:function(){var n=wc(t.ownerDocument);return n.setStart(t,e),n.setEnd(t,e),n},getClientRects:r,isVisible:function(){return r().length>0},isAtStart:function(){return vc(t),0===e},isAtEnd:function(){return vc(t)?e>=t.data.length:e>=t.childNodes.length},isEqual:function(n){return n&&t===n.container()&&e===n.offset()},getNode:function(n){return xc(t,n?e-1:e)}}};Tc.fromRangeStart=function(t){return Tc(t.startContainer,t.startOffset)},Tc.fromRangeEnd=function(t){return Tc(t.endContainer,t.endOffset)},Tc.after=function(t){return Tc(t.parentNode,yc(t)+1)},Tc.before=function(t){return Tc(t.parentNode,yc(t))},Tc.isAbove=function(t,e){return Yn(at(e.getClientRects()),ut(t.getClientRects()),oc).getOr(!1)},Tc.isBelow=function(t,e){return Yn(ut(e.getClientRects()),at(t.getClientRects()),ic).getOr(!1)},Tc.isAtStart=function(t){return!!t&&t.isAtStart()},Tc.isAtEnd=function(t){return!!t&&t.isAtEnd()},Tc.isTextPosition=function(t){return!!t&&Pn(t.container())},Tc.isElementPosition=function(t){return!1===Tc.isTextPosition(t)};var Mc,Dc=function(t,e){Pn(e)&&0===e.data.length&&t.remove(e)},Ac=function(t,e,n){Un(n)?function(t,e,n){var r=L.from(n.firstChild),o=L.from(n.lastChild);e.insertNode(n),r.each((function(e){return Dc(t,e.previousSibling)})),o.each((function(e){return Dc(t,e.nextSibling)}))}(t,e,n):function(t,e,n){e.insertNode(n),Dc(t,n.previousSibling),Dc(t,n.nextSibling)}(t,e,n)},Nc=Pn,Bc=Rn,Rc=pu.nodeIndex,Hc=function(t){var e=t.parentNode;return Bc(e)?Hc(e):e},Lc=function(t){return t?Et(t.childNodes,(function(t,e){return Bc(e)&&"BR"!==e.nodeName?t=t.concat(Lc(e)):t.push(e),t}),[]):[]},Vc=function(t){return function(e){return t===e}},Pc=function(t){return(Nc(t)?"text()":t.nodeName.toLowerCase())+"["+function(t){var e,n;e=Lc(Hc(t)),n=zt(e,Vc(t),t),e=e.slice(0,n+1);var r=Et(e,(function(t,n,r){return Nc(n)&&Nc(e[r-1])&&t++,t}),0);return e=_t(e,An([t.nodeName])),(n=zt(e,Vc(t),t))-r}(t)+"]"},Ic=function(t,e){var n,r,o,i,a,u=[];return n=e.container(),r=e.offset(),Nc(n)?o=function(t,e){for(;(t=t.previousSibling)&&Nc(t);)e+=t.data.length;return e}(n,r):(r>=(i=n.childNodes).length?(o="after",r=i.length-1):o="before",n=i[r]),u.push(Pc(n)),a=function(t,e,n){var r=[];for(e=e.parentNode;!(e===t||n&&n(e));e=e.parentNode)r.push(e);return r}(t,n),a=_t(a,T(Rn)),(u=u.concat(kt(a,(function(t){return Pc(t)})))).reverse().join("/")+","+o},Fc=function(t,e){var n;if(!e)return null;var r=e.split(","),o=r[0].split("/");n=r.length>1?r[1]:"before";var i=Et(o,(function(t,e){var n=/([\w\-\(\)]+)\[([0-9]+)\]/.exec(e);return n?("text()"===n[1]&&(n[1]="#text"),function(t,e,n){var r=Lc(t);return r=_t(r,(function(t,e){return!Nc(t)||!Nc(r[e-1])})),(r=_t(r,An([e])))[n]}(t,n[1],parseInt(n[2],10))):null}),t);return i?Nc(i)?function(t,e){for(var n,r=t,o=0;Nc(r);){if(n=r.data.length,e>=o&&e<=o+n){t=r,e-=o;break}if(!Nc(r.nextSibling)){t=r,e=n;break}o+=n,r=r.nextSibling}return Nc(t)&&e>t.data.length&&(e=t.data.length),Tc(t,e)}(i,parseInt(n,10)):(n="after"===n?Rc(i)+1:Rc(i),Tc(i.parentNode,n)):null},Uc=Gn,jc=function(t,e,n,r,o){var i,a=r[o?"startContainer":"endContainer"],u=r[o?"startOffset":"endOffset"],c=[],s=0,l=t.getRoot();for(Pn(a)?c.push(n?function(t,e,n){var r,o;for(o=t(e.data.slice(0,n)).length,r=e.previousSibling;r&&Pn(r);r=r.previousSibling)o+=t(r.data).length;return o}(e,a,u):u):(u>=(i=a.childNodes).length&&i.length&&(s=1,u=Math.max(0,i.length-1)),c.push(t.nodeIndex(i[u],n)+s));a&&a!==l;a=a.parentNode)c.push(t.nodeIndex(a,n));return c},Wc=function(t,e,n){var r=0;return ze.each(t.select(e),(function(t){if("all"!==t.getAttribute("data-mce-bogus"))return t!==n&&void r++})),r},qc=function(t,e){var n,r,o,i=e?"start":"end";n=t[i+"Container"],r=t[i+"Offset"],Dn(n)&&"TR"===n.nodeName&&(n=(o=n.childNodes)[Math.min(e?r:r-1,o.length-1)])&&(r=e?0:n.childNodes.length,t["set"+(e?"Start":"End")](n,r))},Gc=function(t){return qc(t,!0),qc(t,!1),t},$c=function(t,e){var n;if(Dn(t)&&(t=cc(t,e),Uc(t)))return t;if(zo(t)){if(Pn(t)&&Oo(t)&&(t=t.parentNode),n=t.previousSibling,Uc(n))return n;if(n=t.nextSibling,Uc(n))return n}},Xc=function(t,e,n){var r=n.getNode(),o=r?r.nodeName:null,i=n.getRng();if(Uc(r)||"IMG"===o)return{name:o,index:Wc(n.dom,o,r)};var a=function(t){return $c(t.startContainer,t.startOffset)||$c(t.endContainer,t.endOffset)}(i);return a?{name:o=a.tagName,index:Wc(n.dom,o,a)}:function(t,e,n,r){var o=e.dom,i={};return i.start=jc(o,t,n,r,!0),e.isCollapsed()||(i.end=jc(o,t,n,r,!1)),Ho(r)&&(i.isFakeCaret=!0),i}(t,n,e,i)},Kc=function(t,e,n){var r={"data-mce-type":"bookmark",id:e,style:"overflow:hidden;line-height:0px"};return n?t.create("span",r,"&#xFEFF;"):t.create("span",r)},Yc=function(t,e){var n=t.dom,r=t.getRng(),o=n.uniqueId(),i=t.isCollapsed(),a=t.getNode(),u=a.nodeName;if("IMG"===u)return{name:u,index:Wc(n,u,a)};var c=Gc(r.cloneRange());if(!i){c.collapse(!1);var s=Kc(n,o+"_end",e);Ac(n,c,s)}(r=Gc(r)).collapse(!0);var l=Kc(n,o+"_start",e);return Ac(n,r,l),t.moveToBookmark({id:o,keep:!0}),{id:o}},Jc=function(t,e,n){return 2===e?Xc(So,n,t):3===e?function(t){var e=t.getRng();return{start:Ic(t.dom.getRoot(),Tc.fromRangeStart(e)),end:Ic(t.dom.getRoot(),Tc.fromRangeEnd(e))}}(t):e?function(t){return{rng:t.getRng()}}(t):Yc(t,!1)},Qc=z(Xc,O,!0),Zc=pu.DOM,ts=function(t,e,n){var r=t.getParam(e,n);if(-1!==r.indexOf("=")){var o=t.getParam(e,"","hash");return yt(o,t.id).getOr(n)}return r},es=function(t){return t.getParam("content_security_policy","")},ns=function(t){if(t.getParam("force_p_newlines",!1))return"p";var e=t.getParam("forced_root_block","p");return!1===e?"":!0===e?"p":e},rs=function(t){return t.getParam("forced_root_block_attrs",{})},os=function(t){return t.getParam("automatic_uploads",!0,"boolean")},is=function(t){return t.getParam("images_reuse_filename",!1,"boolean")},as=function(t){return t.getParam("icons","","string")},us=function(t){return t.getParam("images_upload_url","","string")},cs=function(t){return t.getParam("images_upload_base_path","","string")},ss=function(t){return t.getParam("images_upload_credentials",!1,"boolean")},ls=function(t){return t.getParam("images_upload_handler",null,"function")},fs=function(t){return t.getParam("content_css_cors",!1,"boolean")},ds=function(t){return t.getParam("referrer_policy","","string")},ms=function(t){return t.getParam("language","en","string")},gs=function(t){return t.getParam("indent_use_margin",!1)},hs=function(t){var e=t.getParam("font_css",[]);return g(e)?e:W(e.split(","),It)},ps=function(t){var e=t.getParam("object_resizing");return!1!==e&&!Se.iOS&&(d(e)?e:"table,img,figure.image,div,video,iframe")},vs=function(t){return t.getParam("event_root")},bs=function(t){return t.getParam("theme")},ys=function(t){return t.getParam("validate")},xs=function(t){return!1!==t.getParam("inline_boundaries")},ws=function(t){return t.getParam("content_css_cors")},Cs=function(t){return t.getParam("plugins","","string")},Ss=Dn,ks=Pn,_s=function(t){var e=t.parentNode;e&&e.removeChild(t)},Os=function(t){var e=So(t);return{count:t.length-e.length,text:e}},Es=function(t){for(var e;-1!==(e=t.data.lastIndexOf(wo));)t.deleteData(e,1)},zs=function(t,e){return As(t),e},Ts=function(t,e){var n=e.container(),r=function(t,e){var n=F(t,e);return-1===n?L.none():L.some(n)}(ct(n.childNodes),t).map((function(t){return t<e.offset()?Tc(n,e.offset()-1):e})).getOr(e);return As(t),r},Ms=function(t,e){return ks(t)&&e.container()===t?function(t,e){var n=Os(t.data.substr(0,e.offset())),r=Os(t.data.substr(e.offset()));return(n.text+r.text).length>0?(Es(t),Tc(t,e.offset()-n.count)):e}(t,e):zs(t,e)},Ds=function(t,e){return Tc.isTextPosition(e)?Ms(t,e):function(t,e){return e.container()===t.parentNode?Ts(t,e):zs(t,e)}(t,e)},As=function(t){Ss(t)&&zo(t)&&(To(t)?t.removeAttribute("data-mce-caret"):_s(t)),ks(t)&&(Es(t),0===t.data.length&&_s(t))},Ns=ge().browser,Bs=Gn,Rs=Xn,Hs=$n,Ls=function(t,e,n){var r,o,i=nc(e.getBoundingClientRect(),n);if("BODY"===t.tagName){var a=t.ownerDocument.documentElement;r=t.scrollLeft||a.scrollLeft,o=t.scrollTop||a.scrollTop}else{var u=t.getBoundingClientRect();r=t.scrollLeft-u.left,o=t.scrollTop-u.top}i.left+=r,i.right+=r,i.top+=o,i.bottom+=o,i.width=1;var c=e.offsetWidth-e.clientWidth;return c>0&&(n&&(c*=-1),i.left+=c,i.right+=c),i},Vs=function(t,e,n,r){var o,i,a=Eu(),u=ns(t),c=u.length>0?u:"p",s=function(){!function(t){for(var e=Vu(Me.fromDom(t),"*[contentEditable=false],video,audio,embed,object"),n=0;n<e.length;n++){var r,o=e[n].dom,i=o.previousSibling;Bo(i)&&(1===(r=i.data).length?i.parentNode.removeChild(i):i.deleteData(r.length-1,1)),i=o.nextSibling,No(i)&&(1===(r=i.data).length?i.parentNode.removeChild(i):i.deleteData(0,1))}}(e),i&&(As(i),i=null),a.on((function(t){su(t.caret).remove(),a.clear()})),o&&(oo.clearInterval(o),o=void 0)},l=function(){o=oo.setInterval((function(){r()?su("div.mce-visual-caret",e).toggleClass("mce-visual-caret-hidden"):su("div.mce-visual-caret",e).addClass("mce-visual-caret-hidden")}),500)};return{show:function(t,r){var o;if(s(),Hs(r))return null;if(!n(r))return i=function(t,e){var n=t.ownerDocument.createTextNode(wo),r=t.parentNode;if(e){if(o=t.previousSibling,_o(o)){if(zo(o))return o;if(Bo(o))return o.splitText(o.data.length-1)}r.insertBefore(n,t)}else{var o=t.nextSibling;if(_o(o)){if(zo(o))return o;if(No(o))return o.splitText(1),o}t.nextSibling?r.insertBefore(n,t.nextSibling):r.appendChild(n)}return n}(r,t),o=r.ownerDocument.createRange(),Is(i.nextSibling)?(o.setStart(i,0),o.setEnd(i,0)):(o.setStart(i,1),o.setEnd(i,1)),o;i=Ao(c,r,t);var u=Ls(e,r,t);su(i).css("top",u.top);var f=su('<div class="mce-visual-caret" data-mce-bogus="all"></div>').css(Mt({},u)).appendTo(e)[0];return a.set({caret:f,element:r,before:t}),t&&su(f).addClass("mce-visual-caret-before"),l(),(o=r.ownerDocument.createRange()).setStart(i,0),o.setEnd(i,0),o},hide:s,getCss:function(){return".mce-visual-caret {position: absolute;background-color: black;background-color: currentcolor;}.mce-visual-caret-hidden {display: none;}*[data-mce-caret] {position: absolute;left: -1000px;right: auto;top: 0;margin: 0;padding: 0;}"},reposition:function(){a.on((function(t){var n=Ls(e,t.element,t.before);su(t.caret).css(Mt({},n))}))},destroy:function(){return oo.clearInterval(o)}}},Ps=function(){return Ns.isIE()||Ns.isEdge()||Ns.isFirefox()},Is=function(t){return Bs(t)||Rs(t)},Fs=function(t){return Is(t)||Hn(t)&&Ps()},Us=Gn,js=Xn,Ws=Nn("display","block table table-cell table-caption list-item"),qs=zo,Gs=Oo,$s=Dn,Xs=qo,Ks=function(t){return t>0},Ys=function(t){return t<0},Js=function(t,e){for(var n;n=t(e);)if(!Gs(n))return n;return null},Qs=function(t,e,n,r,o){var i=new uo(t,r),a=Us(t)||Gs(t);if(Ys(e)){if(a&&n(t=Js(i.prev.bind(i),!0)))return t;for(;t=Js(i.prev.bind(i),o);)if(n(t))return t}if(Ks(e)){if(a&&n(t=Js(i.next.bind(i),!0)))return t;for(;t=Js(i.next.bind(i),o);)if(n(t))return t}return null},Zs=function(t,e){for(;t&&t!==e;){if(Ws(t))return t;t=t.parentNode}return null},tl=function(t,e,n){return Zs(t.container(),n)===Zs(e.container(),n)},el=function(t,e){if(!e)return null;var n=e.container(),r=e.offset();return $s(n)?n.childNodes[r+t]:null},nl=function(t,e){var n=e.ownerDocument.createRange();return t?(n.setStartBefore(e),n.setEndBefore(e)):(n.setStartAfter(e),n.setEndAfter(e)),n},rl=function(t,e,n){return Zs(e,t)===Zs(n,t)},ol=function(t,e,n){for(var r=t?"previousSibling":"nextSibling";n&&n!==e;){var o=n[r];if(qs(o)&&(o=o[r]),Us(o)||js(o)){if(rl(e,o,n))return o;break}if(Xs(o))break;n=n.parentNode}return null},il=z(nl,!0),al=z(nl,!1),ul=function(t,e,n){var r,o=z(ol,!0,e),i=z(ol,!1,e),a=n.startContainer,u=n.startOffset;if(Oo(a)){$s(a)||(a=a.parentNode);var c=a.getAttribute("data-mce-caret");if("before"===c&&(r=a.nextSibling,Fs(r)))return il(r);if("after"===c&&(r=a.previousSibling,Fs(r)))return al(r)}if(!n.collapsed)return n;if(Pn(a)){if(qs(a)){if(1===t){if(r=i(a))return il(r);if(r=o(a))return al(r)}if(-1===t){if(r=o(a))return al(r);if(r=i(a))return il(r)}return n}if(Bo(a)&&u>=a.data.length-1)return 1===t&&(r=i(a))?il(r):n;if(No(a)&&u<=1)return-1===t&&(r=o(a))?al(r):n;if(u===a.data.length)return(r=i(a))?il(r):n;if(0===u)return(r=o(a))?al(r):n}return n},cl=function(t,e){return L.from(el(t?0:-1,e)).filter(Us)},sl=function(t,e,n){var r=ul(t,e,n);return-1===t?Tc.fromRangeStart(r):Tc.fromRangeEnd(r)},ll=function(t){return L.from(t.getNode()).map(Me.fromDom)},fl=function(t,e){for(;e=t(e);)if(e.isVisible())return e;return e},dl=function(t,e){var n=tl(t,e);return!(n||!jn(t.getNode()))||n};!function(t){t[t.Backwards=-1]="Backwards",t[t.Forwards=1]="Forwards"}(Mc||(Mc={}));var ml,gl=Gn,hl=Pn,pl=Dn,vl=jn,bl=qo,yl=function(t){return Uo(t)||function(t){return!!Go(t)&&!0!==Y(ct(t.getElementsByTagName("*")),(function(t,e){return t||Lo(e)}),!1)}(t)},xl=$o,wl=function(t,e){return t.hasChildNodes()&&e<t.childNodes.length?t.childNodes[e]:null},Cl=function(t,e){if(Ks(t)){if(bl(e.previousSibling)&&!hl(e.previousSibling))return Tc.before(e);if(hl(e))return Tc(e,0)}if(Ys(t)){if(bl(e.nextSibling)&&!hl(e.nextSibling))return Tc.after(e);if(hl(e))return Tc(e,e.data.length)}return Ys(t)?vl(e)?Tc.before(e):Tc.after(e):Tc.before(e)},Sl=function(t,e,n){var r,o,i,a;if(!pl(n)||!e)return null;if(e.isEqual(Tc.after(n))&&n.lastChild){if(a=Tc.after(n.lastChild),Ys(t)&&bl(n.lastChild)&&pl(n.lastChild))return vl(n.lastChild)?Tc.before(n.lastChild):a}else a=e;var u=a.container(),c=a.offset();if(hl(u)){if(Ys(t)&&c>0)return Tc(u,--c);if(Ks(t)&&c<u.length)return Tc(u,++c);r=u}else{if(Ys(t)&&c>0&&(o=wl(u,c-1),bl(o)))return!yl(o)&&(i=Qs(o,t,xl,o))?hl(i)?Tc(i,i.data.length):Tc.after(i):hl(o)?Tc(o,o.data.length):Tc.before(o);if(Ks(t)&&c<u.childNodes.length&&(o=wl(u,c),bl(o)))return vl(o)?function(t,e){var n=e.nextSibling;return n&&bl(n)?hl(n)?Tc(n,0):Tc.before(n):Sl(Mc.Forwards,Tc.after(e),t)}(n,o):!yl(o)&&(i=Qs(o,t,xl,o))?hl(i)?Tc(i,0):Tc.before(i):hl(o)?Tc(o,0):Tc.after(o);r=o||a.getNode()}if((Ks(t)&&a.isAtEnd()||Ys(t)&&a.isAtStart())&&(r=Qs(r,t,N,n,!0),xl(r,n)))return Cl(t,r);o=Qs(r,t,xl,n);var s=Tt(X(function(t,e){for(var n=[];t&&t!==e;)n.push(t),t=t.parentNode;return n}(u,n),gl));return!s||o&&s.contains(o)?o?Cl(t,o):null:a=Ks(t)?Tc.after(s):Tc.before(s)},kl=function(t){return{next:function(e){return Sl(Mc.Forwards,e,t)},prev:function(e){return Sl(Mc.Backwards,e,t)}}},_l=function(t){return Tc.isTextPosition(t)?0===t.offset():qo(t.getNode())},Ol=function(t){if(Tc.isTextPosition(t)){var e=t.container();return t.offset()===e.data.length}return qo(t.getNode(!0))},El=function(t,e){return!Tc.isTextPosition(t)&&!Tc.isTextPosition(e)&&t.getNode()===e.getNode(!0)},zl=function(t,e,n){return t?!El(e,n)&&(r=e,!(!Tc.isTextPosition(r)&&jn(r.getNode())))&&Ol(e)&&_l(n):!El(n,e)&&_l(e)&&Ol(n);var r},Tl=function(t,e,n){var r=kl(e);return L.from(t?r.next(n):r.prev(n))},Ml=function(t,e,n){return Tl(t,e,n).bind((function(r){return tl(n,r,e)&&zl(t,n,r)?Tl(t,e,r):L.some(r)}))},Dl=function(t,e,n,r){return Ml(t,e,n).bind((function(n){return r(n)?Dl(t,e,n,r):L.some(n)}))},Al=function(t,e){var n,r=t?e.firstChild:e.lastChild;return Pn(r)?L.some(Tc(r,t?0:r.data.length)):r?qo(r)?L.some(t?Tc.before(r):jn(n=r)?Tc.before(n):Tc.after(n)):function(t,e,n){var r=t?Tc.before(n):Tc.after(n);return Tl(t,e,r)}(t,e,r):L.none()},Nl=z(Tl,!0),Bl=z(Tl,!1),Rl=z(Al,!0),Hl=z(Al,!1),Ll="_mce_caret",Vl=function(t){return Dn(t)&&t.id===Ll},Pl=function(t,e){for(;e&&e!==t;){if(e.id===Ll)return e;e=e.parentNode}return null},Il=function(t){return ze.isArray(t.start)},Fl=function(t,e){return Dn(e)&&t.isBlock(e)&&!e.innerHTML&&!Se.ie&&(e.innerHTML='<br data-mce-bogus="1" />'),e},Ul=function(t,e){return Hl(t).fold(A,(function(t){return e.setStart(t.container(),t.offset()),e.setEnd(t.container(),t.offset()),!0}))},jl=function(t,e,n){return!(!function(t){return!1===t.hasChildNodes()}(e)||!Pl(t,e))&&(function(t,e){var n=t.ownerDocument.createTextNode(wo);t.appendChild(n),e.setStart(n,0),e.setEnd(n,0)}(e,n),!0)},Wl=function(t,e,n,r){var o,i,a,u,c=n[e?"start":"end"],s=t.getRoot();if(c){for(a=c[0],i=s,o=c.length-1;o>=1;o--){if(u=i.childNodes,jl(s,i,r))return!0;if(c[o]>u.length-1)return!!jl(s,i,r)||Ul(i,r);i=u[c[o]]}3===i.nodeType&&(a=Math.min(c[0],i.nodeValue.length)),1===i.nodeType&&(a=Math.min(c[0],i.childNodes.length)),e?r.setStart(i,a):r.setEnd(i,a)}return!0},ql=function(t){return Pn(t)&&t.data.length>0},Gl=function(t,e,n){var r,o,i,a,u,c,s=t.get(n.id+"_"+e),l=n.keep;if(s){if(r=s.parentNode,"start"===e?(l?s.hasChildNodes()?(r=s.firstChild,o=1):ql(s.nextSibling)?(r=s.nextSibling,o=0):ql(s.previousSibling)?(r=s.previousSibling,o=s.previousSibling.data.length):(r=s.parentNode,o=t.nodeIndex(s)+1):o=t.nodeIndex(s),u=r,c=o):(l?s.hasChildNodes()?(r=s.firstChild,o=1):ql(s.previousSibling)?(r=s.previousSibling,o=s.previousSibling.data.length):(r=s.parentNode,o=t.nodeIndex(s)):o=t.nodeIndex(s),u=r,c=o),!l){for(a=s.previousSibling,i=s.nextSibling,ze.each(ze.grep(s.childNodes),(function(t){Pn(t)&&(t.nodeValue=t.nodeValue.replace(/\uFEFF/g,""))}));s=t.get(n.id+"_"+e);)t.remove(s,!0);a&&i&&a.nodeType===i.nodeType&&Pn(a)&&!Se.opera&&(o=a.nodeValue.length,a.appendData(i.nodeValue),t.remove(i),u=a,c=o)}return L.some(Tc(u,c))}return L.none()},$l=function(t,e){var n=t.dom;if(e){if(Il(e))return function(t,e){var n=t.createRng();return Wl(t,!0,e,n)&&Wl(t,!1,e,n)?L.some(n):L.none()}(n,e);if(function(t){return d(t.start)}(e))return L.some(function(t,e){var n,r=t.createRng();return n=Fc(t.getRoot(),e.start),r.setStart(n.container(),n.offset()),n=Fc(t.getRoot(),e.end),r.setEnd(n.container(),n.offset()),r}(n,e));if(function(t){return xt(t,"id")}(e))return function(t,e){var n=Gl(t,"start",e),r=Gl(t,"end",e);return Yn(n,r.or(n),(function(e,n){var r=t.createRng();return r.setStart(Fl(t,e.container()),e.offset()),r.setEnd(Fl(t,n.container()),n.offset()),r}))}(n,e);if(function(t){return xt(t,"name")}(e))return function(t,e){return L.from(t.select(e.name)[e.index]).map((function(e){var n=t.createRng();return n.selectNode(e),n}))}(n,e);if(function(t){return xt(t,"rng")}(e))return L.some(e.rng)}return L.none()},Xl=function(t,e,n){return Jc(t,e,n)},Kl=function(t,e){$l(t,e).each((function(e){t.setRng(e)}))},Yl=function(t){return Dn(t)&&"SPAN"===t.tagName&&"bookmark"===t.getAttribute("data-mce-type")},Jl=(ml=xo,function(t){return ml===t}),Ql=function(t){return""!==t&&-1!==" \f\n\r\t\v".indexOf(t)},Zl=function(t){return!Ql(t)&&!Jl(t)},tf=function(t){return!!t.nodeType},ef=function(t,e,n){var r=n.startOffset,o=n.startContainer;if((o!==n.endContainer||!function(t){return t&&/^(IMG)$/.test(t.nodeName)}(o.childNodes[r]))&&Dn(o)){var i=o.childNodes,a=void 0;r<i.length?(o=i[r],a=new uo(o,t.getParent(o,t.isBlock))):(o=i[i.length-1],(a=new uo(o,t.getParent(o,t.isBlock))).next(!0));for(var u=a.current();u;u=a.next())if(Pn(u)&&!af(u))return n.setStart(u,0),void e.setRng(n)}},nf=function(t,e,n){if(t){var r=e?"nextSibling":"previousSibling";for(t=n?t:t[r];t;t=t[r])if(Dn(t)||!af(t))return t}},rf=function(t,e){return tf(e)&&(e=e.nodeName),!!t.schema.getTextBlockElements()[e.toLowerCase()]},of=function(t,e,n){return t.schema.isValidChild(e,n)},af=function(t,e){if(void 0===e&&(e=!1),y(t)&&Pn(t)){var n=e?t.data.replace(/ /g," "):t.data;return Ko(n)}return!1},uf=function(t,e){return x(t)?t=t(e):y(e)&&(t=t.replace(/%(\w+)/g,(function(t,n){return e[n]||t}))),t},cf=function(t,e){return e=e||"",t=""+((t=t||"").nodeName||t),e=""+(e.nodeName||e),t.toLowerCase()===e.toLowerCase()},sf=function(t,e,n){return"color"!==n&&"backgroundColor"!==n||(e=t.toHex(e)),"fontWeight"===n&&700===e&&(e="bold"),"fontFamily"===n&&(e=e.replace(/[\'\"]/g,"").replace(/,\s+/g,",")),""+e},lf=function(t,e,n){return sf(t,t.getStyle(e,n),n)},ff=function(t,e){var n;return t.getParent(e,(function(e){return(n=t.getStyle(e,"text-decoration"))&&"none"!==n})),n},df=function(t,e,n){return t.getParents(e,n,t.getRoot())},mf=function(t,e,n){var r=["inline","block","selector","attributes","styles","classes"],o=function(t){return vt(t,(function(t,e){return j(r,(function(t){return t===e}))}))};return j(t.formatter.get(e),(function(e){var r=o(e);return j(t.formatter.get(n),(function(t){var e=o(t);return function(t,e,n){return void 0===n&&(n=c),u(n).eq(t,e)}(r,e)}))}))},gf=function(t){return wt(t,"block")},hf=function(t){return wt(t,"selector")},pf=function(t){return wt(t,"inline")},vf=function(t){return hf(t)&&!1!==t.expand&&!pf(t)},bf=Yl,yf=df,xf=af,wf=rf,Cf=function(t,e){for(var n=e;n;){if(Dn(n)&&t.getContentEditable(n))return"false"===t.getContentEditable(n)?n:e;n=n.parentNode}return e},Sf=function(t,e,n,r){for(var o=e.data,i=n;t?i>=0:i<o.length;t?i--:i++)if(r(o.charAt(i)))return t?i+1:i;return-1},kf=function(t,e,n){return Sf(t,e,n,(function(t){return Jl(t)||Ql(t)}))},_f=function(t,e,n){return Sf(t,e,n,Zl)},Of=function(t,e,n,r,o,i){var a,u=t.getParent(n,t.isBlock)||e,c=function(e,n,r){var i=Zu(t),c=o?i.backwards:i.forwards;return L.from(c(e,n,(function(t,e){return bf(t.parentNode)?-1:(a=t,r(o,t,e))}),u))};return c(n,r,kf).bind((function(t){return i?c(t.container,t.offset+(o?-1:0),_f):L.some(t)})).orThunk((function(){return a?L.some({container:a,offset:o?0:a.length}):L.none()}))},Ef=function(t,e,n,r,o){Pn(r)&&Wt(r.data)&&r[o]&&(r=r[o]);for(var i=yf(t,r),a=0;a<i.length;a++)for(var u=0;u<e.length;u++){var c=e[u];if((!y(c.collapsed)||c.collapsed===n.collapsed)&&(hf(c)&&t.is(i[a],c.selector)))return i[a]}return r},zf=function(t,e,n,r){var o=n,i=t.dom,a=i.getRoot(),u=e[0];if(gf(u)&&(o=u.wrapper?null:i.getParent(n,u.block,a)),!o){var c=i.getParent(n,"LI,TD,TH");o=i.getParent(Pn(n)?n.parentNode:n,(function(e){return e!==a&&wf(t,e)}),c)}if(o&&gf(u)&&u.wrapper&&(o=yf(i,o,"ul,ol").reverse()[0]||o),!o)for(o=n;o[r]&&!i.isBlock(o[r])&&(o=o[r],!cf(o,"br")););return o||n},Tf=function(t,e,n,r){var o=n.parentNode;return!y(n[r])&&(!(o!==e&&!b(o)&&!t.isBlock(o))||Tf(t,e,o,r))},Mf=function(t,e,n,r,o){var i,a=n,u=o?"previousSibling":"nextSibling",c=t.getRoot();if(Pn(n)&&!xf(n)&&(o?r>0:r<n.data.length))return n;for(;;){if(!e[0].block_expand&&t.isBlock(a))return a;for(var s=a[u];s;s=s[u]){var l=Pn(s)&&!Tf(t,c,s,u);if(!bf(s)&&(!jn(i=s)||!i.getAttribute("data-mce-bogus")||i.nextSibling)&&!xf(s,l))return a}if(a===c||a.parentNode===c){n=a;break}a=a.parentNode}return n},Df=function(t){return bf(t.parentNode)||bf(t)},Af=function(t,e,n,r){void 0===r&&(r=!1);var o=e.startContainer,i=e.startOffset,a=e.endContainer,u=e.endOffset,c=t.dom,s=n[0];(Dn(o)&&o.hasChildNodes()&&(o=cc(o,i),Pn(o)&&(i=0)),Dn(a)&&a.hasChildNodes()&&(a=cc(a,e.collapsed?u:u-1),Pn(a)&&(u=a.nodeValue.length)),o=Cf(c,o),a=Cf(c,a),Df(o)&&(o=bf(o)?o:o.parentNode,o=e.collapsed?o.previousSibling||o:o.nextSibling||o,Pn(o)&&(i=e.collapsed?o.length:0)),Df(a)&&(a=bf(a)?a:a.parentNode,a=e.collapsed?a.nextSibling||a:a.previousSibling||a,Pn(a)&&(u=e.collapsed?0:a.length)),e.collapsed)&&(Of(c,t.getBody(),o,i,!0,r).each((function(t){var e=t.container,n=t.offset;o=e,i=n})),Of(c,t.getBody(),a,u,!1,r).each((function(t){var e=t.container,n=t.offset;a=e,u=n})));return(pf(s)||s.block_expand)&&(pf(s)&&Pn(o)&&0!==i||(o=Mf(c,n,o,i,!0)),pf(s)&&Pn(a)&&u!==a.nodeValue.length||(a=Mf(c,n,a,u,!1))),vf(s)&&(o=Ef(c,n,e,o,"previousSibling"),a=Ef(c,n,e,a,"nextSibling")),(gf(s)||hf(s))&&(o=zf(t,n,o,"previousSibling"),a=zf(t,n,a,"nextSibling"),gf(s)&&(c.isBlock(o)||(o=Mf(c,n,o,i,!0)),c.isBlock(a)||(a=Mf(c,n,a,u,!1)))),Dn(o)&&(i=c.nodeIndex(o),o=o.parentNode),Dn(a)&&(u=c.nodeIndex(a)+1,a=a.parentNode),{startContainer:o,startOffset:i,endContainer:a,endOffset:u}},Nf=function(t,e,n){var r=e.startOffset,o=cc(e.startContainer,r),i=e.endOffset,a=cc(e.endContainer,i-1),u=function(t){var e=t[0];Pn(e)&&e===o&&r>=e.data.length&&t.splice(0,1);var n=t[t.length-1];return 0===i&&t.length>0&&n===a&&Pn(n)&&t.splice(t.length-1,1),t},c=function(t,e,n){for(var r=[];t&&t!==n;t=t[e])r.push(t);return r},s=function(e,n){return t.getParent(e,(function(t){return t.parentNode===n}),n)},l=function(t,e,r){for(var o=r?"nextSibling":"previousSibling",i=t,a=i.parentNode;i&&i!==e;i=a){a=i.parentNode;var s=c(i===t?i:i[o],o);s.length&&(r||s.reverse(),n(u(s)))}};if(o===a)return n(u([o]));var f=t.findCommonAncestor(o,a);if(t.isChildOf(o,a))return l(o,f,!0);if(t.isChildOf(a,o))return l(a,f);var d=s(o,f)||o,m=s(a,f)||a;l(o,d,!0);var g=c(d===o?d:d.nextSibling,"nextSibling",m===a?m.nextSibling:m);g.length&&n(u(g)),l(a,m)},Bf=function(t){var e=[];if(t)for(var n=0;n<t.rangeCount;n++)e.push(t.getRangeAt(n));return e},Rf=function(t){return X(function(t){return tt(t,(function(t){var e=uc(t);return e?[Me.fromDom(e)]:[]}))}(t),bo)},Hf=function(t,e){var n=Vu(e,"td[data-mce-selected],th[data-mce-selected]");return n.length>0?n:Rf(t)},Lf=function(t){return Hf(Bf(t.selection.getSel()),Me.fromDom(t.getBody()))},Vf=function(t,e){return Jr(t,"table",e)},Pf=function(t){return tn(t).fold(_([t]),(function(e){return[t].concat(Pf(e))}))},If=function(t){return en(t).fold(_([t]),(function(e){return"br"===Le(e)?Xe(e).map((function(e){return[t].concat(If(e))})).getOr([]):[t].concat(If(e))}))},Ff=function(t,e){return Yn(function(t){var e=t.startContainer,n=t.startOffset;return Pn(e)?0===n?L.some(Me.fromDom(e)):L.none():L.from(e.childNodes[n]).map(Me.fromDom)}(e),function(t){var e=t.endContainer,n=t.endOffset;return Pn(e)?n===e.data.length?L.some(Me.fromDom(e)):L.none():L.from(e.childNodes[n-1]).map(Me.fromDom)}(e),(function(e,n){var r=Q(Pf(t),z(Be,e)),o=Q(If(t),z(Be,n));return r.isSome()&&o.isSome()})).getOr(!1)},Uf=function(t,e,n,r){var o=n,i=new uo(n,o),a=vt(t.schema.getMoveCaretBeforeOnEnterElements(),(function(t,e){return!U(["td","th","table"],e.toLowerCase())}));do{if(Pn(n)&&0!==ze.trim(n.nodeValue).length)return void(r?e.setStart(n,0):e.setEnd(n,n.nodeValue.length));if(a[n.nodeName])return void(r?e.setStartBefore(n):"BR"===n.nodeName?e.setEndBefore(n):e.setEndAfter(n))}while(n=r?i.next():i.prev());"BODY"===o.nodeName&&(r?e.setStart(o,0):e.setEnd(o,o.childNodes.length))},jf=function(t){var e=t.selection.getSel();return e&&e.rangeCount>0},Wf=function(t,e){var n=Lf(t);n.length>0?q(n,(function(n){var r=n.dom,o=t.dom.createRng();o.setStartBefore(r),o.setEndAfter(r),e(o,!0)})):e(t.selection.getRng(),!1)},qf=function(t,e,n){var r=Yc(t,e);n(r),t.moveToBookmark(r)},Gf=function(t,e){var n=function(e){return t(e)?L.from(e.dom.nodeValue):L.none()};return{get:function(r){if(!t(r))throw new Error("Can only get "+e+" value of a "+e+" node");return n(r).getOr("")},getOption:n,set:function(n,r){if(!t(n))throw new Error("Can only set raw "+e+" value of a "+e+" node");n.dom.nodeValue=r}}}(Fe,"text"),$f=function(t){return Gf.get(t)},Xf=function(t,e,n,r){return $e(e).fold((function(){return"skipping"}),(function(o){return"br"===r||function(t){return Fe(t)&&$f(t)===wo}(e)?"valid":function(t){return Ie(t)&&Hu(t,Pu())}(e)?"existing":Vl(e.dom)?"caret":of(t,n,r)&&of(t,Le(o),n)?"valid":"invalid-child"}))},Kf=function(t,e,n,r){var o=e.uid,i=void 0===o?$u("mce-annotation"):o,a=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}(e,["uid"]),u=Me.fromTag("span",t);Bu(u,Pu()),Zn(u,""+Fu(),i),Zn(u,""+Iu(),n);var c=r(i,a),s=c.attributes,l=void 0===s?{}:s,f=c.classes,d=void 0===f?[]:f;return tr(u,l),function(t,e){q(e,(function(e){Bu(t,e)}))}(u,d),u},Yf=function(t,e,n,r,o){var i=[],a=Kf(t.getDoc(),o,n,r),u=Eu(),c=function(){u.clear()},s=function(t){q(t,l)},l=function(e){switch(Xf(t,e,"span",Le(e))){case"invalid-child":c();var n=Qe(e);s(n),c();break;case"valid":!function(t,e){fn(t,e),gn(e,t)}(e,u.get().getOrThunk((function(){var t=Yu(a);return i.push(t),u.set(t),t})))}};return Nf(t.dom,e,(function(t){c(),function(t){var e=W(t,Me.fromDom);s(e)}(t)})),i},Jf=function(t,e,n,r){t.undoManager.transact((function(){var o=t.selection,i=o.getRng(),a=Lf(t).length>0;if(i.collapsed&&!a&&function(t,e){var n=Af(t,e,[{inline:"span"}]);e.setStart(n.startContainer,n.startOffset),e.setEnd(n.endContainer,n.endOffset),t.selection.setRng(e)}(t,i),o.getRng().collapsed&&!a){var u=Kf(t.getDoc(),r,e,n.decorate);Xu(u,xo),o.getRng().insertNode(u.dom),o.select(u.dom)}else qf(o,!1,(function(){Wf(t,(function(o){Yf(t,o,e,n.decorate,r)}))}))}))},Qf=function(t){var e,n=(e={},{register:function(t,n){e[t]={name:t,settings:n}},lookup:function(t){return yt(e,t).map((function(t){return t.settings}))}});qu(t,n);var r=Wu(t);return{register:function(t,e){n.register(t,e)},annotate:function(e,r){n.lookup(e).each((function(n){Jf(t,e,n,r)}))},annotationChanged:function(t,e){r.addListener(t,e)},remove:function(e){Uu(t,L.some(e)).each((function(t){var e=t.elements;q(e,bn)}))},getAll:function(e){var n=function(t,e){var n=Me.fromDom(t.getBody()),r=Vu(n,"["+Iu()+'="'+e+'"]'),o={};return q(r,(function(t){var e=er(t,Fu()),n=yt(o,e).getOr([]);o[e]=n.concat([t])})),o}(t,e);return mt(n,(function(t){return W(t,(function(t){return t.dom}))}))}}},Zf=function(t){return{getBookmark:z(Xl,t),moveToBookmark:z(Kl,t)}};Zf.isBookmarkNode=Yl;var td=function(t,e){for(;e&&e!==t;){if(qn(e)||Gn(e))return e;e=e.parentNode}return null},ed=function(t,e,n){if(n.collapsed)return!1;if(Se.browser.isIE()&&n.startOffset===n.endOffset-1&&n.startContainer===n.endContainer){var r=n.startContainer.childNodes[n.startOffset];if(Dn(r))return j(r.getClientRects(),(function(n){return ac(n,t,e)}))}return j(n.getClientRects(),(function(n){return ac(n,t,e)}))},nd=function(t,e,n){return t.fire(e,n)},rd=function(t,e,n,r){return t.fire("FormatApply",{format:e,node:n,vars:r})},od=function(t,e,n,r){return t.fire("FormatRemove",{format:e,node:n,vars:r})},id={BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,ESC:27,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,modifierPressed:function(t){return t.shiftKey||t.ctrlKey||t.altKey||id.metaKeyPressed(t)},metaKeyPressed:function(t){return Se.mac?t.metaKey:t.ctrlKey&&!t.altKey}},ad=Gn,ud=function(t,e){var n,r,o,i,a,u,c,s,l,f,d,m,g,h,p,v="data-mce-selected",b=e.dom,x=ze.each,w=e.getDoc(),C=document,S=Math.abs,k=Math.round,_=e.getBody(),O={nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]},E=function(t){return t&&("IMG"===t.nodeName||e.dom.is(t,"figure.image"))},z=function(t){return Xn(t)||b.hasClass(t,"mce-preview-object")},T=function(t){var n=t.target;(function(t,e){if("longpress"===t.type||0===t.type.indexOf("touch")){var n=t.touches[0];return E(t.target)&&!ed(n.clientX,n.clientY,e)}return E(t.target)&&!ed(t.clientX,t.clientY,e)})(t,e.selection.getRng())&&!t.isDefaultPrevented()&&e.selection.select(n)},M=function(t){return b.is(t,"figure.image")?[t.querySelector("img")]:b.hasClass(t,"mce-preview-object")&&y(t.firstElementChild)?[t,t.firstElementChild]:[t]},D=function(t){var n=ps(e);return!!n&&("false"!==t.getAttribute("data-mce-resize")&&(t!==e.getBody()&&(b.hasClass(t,"mce-preview-object")?Ae(Me.fromDom(t.firstElementChild),n):Ae(Me.fromDom(t),n))))},A=function(t,n,r){if(y(r)){var o=M(t);q(o,(function(t){t.style[n]||!e.schema.isValid(t.nodeName.toLowerCase(),n)?b.setStyle(t,n,r):b.setAttrib(t,n,""+r)}))}},N=function(t,e,n){A(t,"width",e),A(t,"height",n)},B=function(t){var a,v,y,x;a=t.screenX-u,v=t.screenY-c,m=a*i[2]+s,g=v*i[3]+l,m=m<5?5:m,g=g<5?5:g,((E(n)||z(n))&&!1!==function(t){return t.getParam("resize_img_proportional",!0,"boolean")}(e)?!id.modifierPressed(t):id.modifierPressed(t))&&(S(a)>S(v)?(g=k(m*f),m=k(g/f)):(m=k(g/f),g=k(m*f))),N(r,m,g),y=(y=i.startPos.x+a)>0?y:0,x=(x=i.startPos.y+v)>0?x:0,b.setStyles(o,{left:y,top:x,display:"block"}),o.innerHTML=m+" &times; "+g,i[2]<0&&r.clientWidth<=m&&b.setStyle(r,"left",undefined+(s-m)),i[3]<0&&r.clientHeight<=g&&b.setStyle(r,"top",undefined+(l-g)),(a=_.scrollWidth-h)+(v=_.scrollHeight-p)!==0&&b.setStyles(o,{left:y-a,top:x-v}),d||(!function(t,e,n,r,o){t.fire("ObjectResizeStart",{target:e,width:n,height:r,origin:o})}(e,n,s,l,"corner-"+i.name),d=!0)},R=function(){var t=d;d=!1,t&&(A(n,"width",m),A(n,"height",g)),b.unbind(w,"mousemove",B),b.unbind(w,"mouseup",R),C!==w&&(b.unbind(C,"mousemove",B),b.unbind(C,"mouseup",R)),b.remove(r),b.remove(o),b.remove(a),H(n),t&&(!function(t,e,n,r,o){t.fire("ObjectResized",{target:e,width:n,height:r,origin:o})}(e,n,m,g,"corner-"+i.name),b.setAttrib(n,"style",b.getAttrib(n,"style"))),e.nodeChanged()},H=function(t){I();var d=b.getPos(t,_),y=d.x,S=d.y,k=t.getBoundingClientRect(),E=k.width||k.right-k.left,T=k.height||k.bottom-k.top;n!==t&&(L(),n=t,m=g=0);var A=e.fire("ObjectSelected",{target:t}),H=b.getAttrib(n,v,"1");D(t)&&!A.isDefaultPrevented()?x(O,(function(t,e){var d,m=function(d){var m,g=M(n)[0];u=d.screenX,c=d.screenY,s=g.clientWidth,l=g.clientHeight,f=l/s,(i=t).name=e,i.startPos={x:E*t[0]+y,y:T*t[1]+S},h=_.scrollWidth,p=_.scrollHeight,a=b.add(_,"div",{class:"mce-resize-backdrop","data-mce-bogus":"all"}),b.setStyles(a,{position:"fixed",left:"0",top:"0",width:"100%",height:"100%"}),r=z(m=n)?b.create("img",{src:Se.transparentSrc}):m.cloneNode(!0),b.addClass(r,"mce-clonedresizable"),b.setAttrib(r,"data-mce-bogus","all"),r.contentEditable="false",b.setStyles(r,{left:y,top:S,margin:0}),N(r,E,T),r.removeAttribute(v),_.appendChild(r),b.bind(w,"mousemove",B),b.bind(w,"mouseup",R),C!==w&&(b.bind(C,"mousemove",B),b.bind(C,"mouseup",R)),o=b.add(_,"div",{class:"mce-resize-helper","data-mce-bogus":"all"},s+" &times; "+l)};(d=b.get("mceResizeHandle"+e))&&b.remove(d),d=b.add(_,"div",{id:"mceResizeHandle"+e,"data-mce-bogus":"all",class:"mce-resizehandle",unselectable:!0,style:"cursor:"+e+"-resize; margin:0; padding:0"}),11===Se.ie&&(d.contentEditable=!1),b.bind(d,"mousedown",(function(t){t.stopImmediatePropagation(),t.preventDefault(),m(t)})),t.elm=d,b.setStyles(d,{left:E*t[0]+y-d.offsetWidth/2,top:T*t[1]+S-d.offsetHeight/2})})):L(),b.getAttrib(n,v)||n.setAttribute(v,H)},L=function(){I(),n&&n.removeAttribute(v),dt(O,(function(t,e){var n=b.get("mceResizeHandle"+e);n&&(b.unbind(n),b.remove(n))}))},V=function(n){var r,o=function(t,e){if(t)do{if(t===e)return!0}while(t=t.parentNode)};d||e.removed||(x(b.select("img[data-mce-selected],hr[data-mce-selected]"),(function(t){t.removeAttribute(v)})),r="mousedown"===n.type?n.target:t.getNode(),o(r=b.$(r).closest("table,img,figure.image,hr,video,span.mce-preview-object")[0],_)&&(F(),o(t.getStart(!0),r)&&o(t.getEnd(!0),r))?H(r):L())},P=function(t){return ad(td(e.getBody(),t))},I=function(){dt(O,(function(t){t.elm&&(b.unbind(t.elm),delete t.elm)}))},F=function(){try{e.getDoc().execCommand("enableObjectResizing",!1,"false")}catch(t){}};e.on("init",(function(){if(F(),Se.browser.isIE()||Se.browser.isEdge()){e.on("mousedown click",(function(t){var n=t.target,r=n.nodeName;d||!/^(TABLE|IMG|HR)$/.test(r)||P(n)||(2!==t.button&&e.selection.select(n,"TABLE"===r),"mousedown"===t.type&&e.nodeChanged())}));var t=function(t){var n=function(t){oo.setEditorTimeout(e,(function(){return e.selection.select(t)}))};if(P(t.target)||Xn(t.target))return t.preventDefault(),void n(t.target);/^(TABLE|IMG|HR)$/.test(t.target.nodeName)&&(t.preventDefault(),"IMG"===t.target.tagName&&n(t.target))};b.bind(_,"mscontrolselect",t),e.on("remove",(function(){return b.unbind(_,"mscontrolselect",t)}))}var r=oo.throttle((function(t){e.composing||V(t)}));e.on("nodechange ResizeEditor ResizeWindow ResizeContent drop FullscreenStateChanged",r),e.on("keyup compositionend",(function(t){n&&"TABLE"===n.nodeName&&r(t)})),e.on("hide blur",L),e.on("contextmenu longpress",T,!0)})),e.on("remove",I);return{isResizable:D,showResizeRect:H,hideResizeRect:L,updateResizeRect:V,destroy:function(){n=r=a=null}}},cd=function(t){return qn(t)||Gn(t)},sd=function(t,e,n){var r,o,i=n;if(i.caretPositionFromPoint)(o=i.caretPositionFromPoint(t,e))&&((r=n.createRange()).setStart(o.offsetNode,o.offset),r.collapse(!0));else if(i.caretRangeFromPoint)r=i.caretRangeFromPoint(t,e);else if(i.body.createTextRange){r=i.body.createTextRange();try{r.moveToPoint(t,e),r.collapse(!0)}catch(o){r=function(t,e,n){var r,o=n.elementFromPoint(t,e),i=n.body.createTextRange();if(o&&"HTML"!==o.tagName||(o=n.body),i.moveToElementText(o),(r=(r=ze.toArray(i.getClientRects())).sort((function(t,n){return(t=Math.abs(Math.max(t.top-e,t.bottom-e)))-Math.abs(Math.max(n.top-e,n.bottom-e))}))).length>0){e=(r[0].bottom+r[0].top)/2;try{return i.moveToPoint(t,e),i.collapse(!0),i}catch(t){}}return null}(t,e,n)}return function(t,e){var n=t&&t.parentElement?t.parentElement():null;return Gn(function(t,e,n){for(;t&&t!==e;){if(n(t))return t;t=t.parentNode}return null}(n,e,cd))?null:t}(r,n.body)}return r},ld=function(t,e){return t&&e&&t.startContainer===e.startContainer&&t.startOffset===e.startOffset&&t.endContainer===e.endContainer&&t.endOffset===e.endOffset},fd=function(t,e,n){return null!==function(t,e,n){for(;t&&t!==e;){if(n(t))return t;t=t.parentNode}return null}(t,e,n)},dd=function(t,e,n){return fd(t,e,(function(t){return t.nodeName===n}))},md=function(t){return t&&"TABLE"===t.nodeName},gd=function(t){return t&&/^(TD|TH|CAPTION)$/.test(t.nodeName)},hd=function(t,e){return zo(t)&&!1===fd(t,e,Vl)},pd=function(t,e,n){for(var r=new uo(e,t.getParent(e.parentNode,t.isBlock)||t.getRoot());e=r[n?"prev":"next"]();)if(jn(e))return!0},vd=function(t,e,n,r,o){var i,a,u=t.getRoot(),c=t.schema.getNonEmptyElements(),s=t.getParent(o.parentNode,t.isBlock)||u;if(r&&jn(o)&&e&&t.isEmpty(s))return L.some(Tc(o.parentNode,t.nodeIndex(o)));for(var l=new uo(o,s);a=l[r?"prev":"next"]();){if("false"===t.getContentEditableParent(a)||hd(a,u))return L.none();if(Pn(a)&&a.nodeValue.length>0)return!1===dd(a,u,"A")?L.some(Tc(a,r?a.nodeValue.length:0)):L.none();if(t.isBlock(a)||c[a.nodeName.toLowerCase()])return L.none();i=a}return n&&i?L.some(Tc(i,0)):L.none()},bd=function(t,e,n,r){var o,i,a,u,c=t.getRoot(),s=!1;o=r[(n?"start":"end")+"Container"],i=r[(n?"start":"end")+"Offset"];var l=Dn(o)&&i===o.childNodes.length,f=t.schema.getNonEmptyElements();if(u=n,zo(o))return L.none();if(Dn(o)&&i>o.childNodes.length-1&&(u=!1),Fn(o)&&(o=c,i=0),o===c){if(u&&(a=o.childNodes[i>0?i-1:0])){if(zo(a))return L.none();if(f[a.nodeName]||md(a))return L.none()}if(o.hasChildNodes()){if(i=Math.min(!u&&i>0?i-1:i,o.childNodes.length-1),o=o.childNodes[i],i=Pn(o)&&l?o.data.length:0,!e&&o===c.lastChild&&md(o))return L.none();if(function(t,e){for(;e&&e!==t;){if(Gn(e))return!0;e=e.parentNode}return!1}(c,o)||zo(o))return L.none();if(o.hasChildNodes()&&!1===md(o)){a=o;var d=new uo(o,c);do{if(Gn(a)||zo(a)){s=!1;break}if(Pn(a)&&a.nodeValue.length>0){i=u?0:a.nodeValue.length,o=a,s=!0;break}if(f[a.nodeName.toLowerCase()]&&!gd(a)){i=t.nodeIndex(a),o=a.parentNode,u||i++,s=!0;break}}while(a=u?d.next():d.prev())}}}return e&&(Pn(o)&&0===i&&vd(t,l,e,!0,o).each((function(t){o=t.container(),i=t.offset(),s=!0})),Dn(o)&&((a=o.childNodes[i])||(a=o.childNodes[i-1]),!a||!jn(a)||function(t,e){return t.previousSibling&&t.previousSibling.nodeName===e}(a,"A")||pd(t,a,!1)||pd(t,a,!0)||vd(t,l,e,!0,a).each((function(t){o=t.container(),i=t.offset(),s=!0})))),u&&!e&&Pn(o)&&i===o.nodeValue.length&&vd(t,l,e,!1,o).each((function(t){o=t.container(),i=t.offset(),s=!0})),s?L.some(Tc(o,i)):L.none()},yd=function(t,e){var n=e.collapsed,r=e.cloneRange(),o=Tc.fromRangeStart(e);return bd(t,n,!0,r).each((function(t){n&&Tc.isAbove(o,t)||r.setStart(t.container(),t.offset())})),n||bd(t,n,!1,r).each((function(t){r.setEnd(t.container(),t.offset())})),n&&r.collapse(!0),ld(e,r)?L.none():L.some(r)},xd=function(t,e){return t.splitText(e)},wd=function(t){var e=t.startContainer,n=t.startOffset,r=t.endContainer,o=t.endOffset;return e===r&&Pn(e)?n>0&&n<e.nodeValue.length&&(e=(r=xd(e,n)).previousSibling,o>n?(e=r=xd(r,o-=n).previousSibling,o=r.nodeValue.length,n=0):o=0):(Pn(e)&&n>0&&n<e.nodeValue.length&&(e=xd(e,n),n=0),Pn(r)&&o>0&&o<r.nodeValue.length&&(o=(r=xd(r,o).previousSibling).nodeValue.length)),{startContainer:e,startOffset:n,endContainer:r,endOffset:o}},Cd=function(t){return{walk:function(e,n){return Nf(t,e,n)},split:wd,normalize:function(e){return yd(t,e).fold(A,(function(t){return e.setStart(t.startContainer,t.startOffset),e.setEnd(t.endContainer,t.endOffset),!0}))}}};Cd.compareRanges=ld,Cd.getCaretRangeFromPoint=sd,Cd.getSelectedNode=uc,Cd.getNode=cc;var Sd,kd=function(t,e){var n=function(n){var r=e(n);if(r<=0||null===r){var o=ir(n,t);return parseFloat(o)||0}return r},r=function(t,e){return Y(e,(function(e,n){var r=ir(t,n),o=void 0===r?0:parseInt(r,10);return isNaN(o)?e:e+o}),0)};return{set:function(e,n){if(!w(n)&&!n.match(/^[0-9]+$/))throw new Error(t+".set accepts only positive integer values. Value was "+n);var r=e.dom;Jn(r)&&(r.style[t]=n+"px")},get:n,getOuter:n,aggregate:r,max:function(t,e,n){var o=r(t,n);return e>o?e-o:0}}}("height",(function(t){var e=t.dom;return yn(t)?e.getBoundingClientRect().height:e.offsetHeight})),_d=function(t,e){return t.view(e).fold(_([]),(function(e){var n=t.owner(e),r=_d(t,n);return[e].concat(r)}))},Od=Object.freeze({__proto__:null,view:function(t){var e;return(t.dom===document?L.none():L.from(null===(e=t.dom.defaultView)||void 0===e?void 0:e.frameElement)).map(Me.fromDom)},owner:function(t){return qe(t)}}),Ed=function(t){var e=Me.fromDom(document),n=kn(e),r=function(t,e){var n=e.owner(t);return _d(e,n)}(t,Od),o=Sn(t),i=K(r,(function(t,e){var n=Sn(e);return{left:t.left+n.left,top:t.top+n.top}}),{left:0,top:0});return wn(i.left+o.left+n.left,i.top+o.top+n.top)},zd=function(t){return"textarea"===Le(t)},Td=function(t,e){var n=function(t){var e=t.dom.ownerDocument,n=e.body,r=e.defaultView,o=e.documentElement;if(n===t.dom)return wn(n.offsetLeft,n.offsetTop);var i=Cn(null==r?void 0:r.pageYOffset,o.scrollTop),a=Cn(null==r?void 0:r.pageXOffset,o.scrollLeft),u=Cn(o.clientTop,n.clientTop),c=Cn(o.clientLeft,n.clientLeft);return Sn(t).translate(a-c,i-u)}(t),r=function(t){return kd.get(t)}(t);return{element:t,bottom:n.top+r,height:r,pos:n,cleanup:e}},Md=function(t,e){var n=function(t,e){var n=Qe(t);if(0===n.length||zd(t))return{element:t,offset:e};if(e<n.length&&!zd(n[e]))return{element:n[e],offset:0};var r=n[n.length-1];return zd(r)?{element:t,offset:e}:"img"===Le(r)?{element:r,offset:1}:Fe(r)?{element:r,offset:$f(r).length}:{element:r,offset:Qe(r).length}}(t,e),r=Me.fromHtml('<span data-mce-bogus="all" style="display: inline-block;">\ufeff</span>');return fn(n.element,r),Td(r,(function(){return vn(r)}))},Dd=function(t,e,n,r){Rd(t,(function(o,i){return Nd(t,e,n,r)}),n)},Ad=function(t,e,n,r,o){var i={elm:r.element.dom,alignToTop:o};(function(t,e){return t.fire("ScrollIntoView",e).isDefaultPrevented()})(t,i)||(n(e,kn(e).top,r,o),function(t,e){t.fire("AfterScrollIntoView",e)}(t,i))},Nd=function(t,e,n,r){var o=Me.fromDom(t.getBody()),i=Me.fromDom(t.getDoc());o.dom.offsetWidth;var a=Md(Me.fromDom(n.startContainer),n.startOffset);Ad(t,i,e,a,r),a.cleanup()},Bd=function(t,e,n,r){var o=Me.fromDom(t.getDoc());Ad(t,o,n,function(t){return Td(Me.fromDom(t),C)}(e),r)},Rd=function(t,e,n){var r=n.startContainer,o=n.startOffset,i=n.endContainer,a=n.endOffset;e(Me.fromDom(r),Me.fromDom(i));var u=t.dom.createRng();u.setStart(r,o),u.setEnd(i,a),t.selection.setRng(n)},Hd=function(t,e,n,r){var o=t.pos;if(n)_n(o.left,o.top,r);else{var i=o.top-e+t.height;_n(o.left,i,r)}},Ld=function(t,e,n,r,o){var i=n+e,a=r.pos.top,u=r.bottom,c=u-a>=n;if(a<e)Hd(r,n,!1!==o,t);else if(a>i){Hd(r,n,c?!1!==o:!0===o,t)}else u>i&&!c&&Hd(r,n,!0===o,t)},Vd=function(t,e,n,r){var o=t.dom.defaultView.innerHeight;Ld(t,e,o,n,r)},Pd=function(t,e,n,r){var o=t.dom.defaultView.innerHeight;Ld(t,e,o,n,r);var i=Ed(n.element),a=zn(window);i.top<a.y?On(n.element,!1!==r):i.top>a.bottom&&On(n.element,!0===r)},Id=function(t,e,n){return Dd(t,Vd,e,n)},Fd=function(t,e,n){return Bd(t,e,Vd,n)},Ud=function(t,e,n){return Dd(t,Pd,e,n)},jd=function(t,e,n){return Bd(t,e,Pd,n)},Wd=function(t,e,n){(t.inline?Id:Ud)(t,e,n)},qd=function(t){var e=un(t).dom;return t.dom===e.activeElement},Gd=function(t){return void 0===t&&(t=Me.fromDom(document)),L.from(t.dom.activeElement).map(Me.fromDom)},$d=function(t,e,n,r){return{start:t,soffset:e,finish:n,foffset:r}},Xd=_r([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),Kd=(Xd.before,Xd.on,Xd.after,function(t){return t.fold(O,O,O)}),Yd=_r([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),Jd={domRange:Yd.domRange,relative:Yd.relative,exact:Yd.exact,exactFromRange:function(t){return Yd.exact(t.start,t.soffset,t.finish,t.foffset)},getWin:function(t){var e=function(t){return t.match({domRange:function(t){return Me.fromDom(t.startContainer)},relative:function(t,e){return Kd(t)},exact:function(t,e,n,r){return t}})}(t);return Ge(e)},range:$d},Qd=ge().browser,Zd=function(t,e){var n=Fe(e)?$f(e).length:Qe(e).length+1;return t>n?n:t<0?0:t},tm=function(t){return Jd.range(t.start,Zd(t.soffset,t.start),t.finish,Zd(t.foffset,t.finish))},em=function(t,e){return!Mn(e.dom)&&(He(t,e)||Be(t,e))},nm=function(t){return function(e){return em(t,e.start)&&em(t,e.finish)}},rm=function(t){return!0===t.inline||Qd.isIE()},om=function(t){return Jd.range(Me.fromDom(t.startContainer),t.startOffset,Me.fromDom(t.endContainer),t.endOffset)},im=function(t){return function(t){var e=t.getSelection();return(e&&0!==e.rangeCount?L.from(e.getRangeAt(0)):L.none()).map(om)}(Ge(t).dom).filter(nm(t))},am=function(t){var e=document.createRange();try{return e.setStart(t.start.dom,t.soffset),e.setEnd(t.finish.dom,t.foffset),L.some(e)}catch(t){return L.none()}},um=function(t){var e=rm(t)?im(Me.fromDom(t.getBody())):L.none();t.bookmark=e.isSome()?e:t.bookmark},cm=function(t){return(t.bookmark?t.bookmark:L.none()).bind((function(e){return function(t,e){return L.from(e).filter(nm(t)).map(tm)}(Me.fromDom(t.getBody()),e)})).bind(am)},sm={isEditorUIElement:function(t){var e=t.className.toString();return-1!==e.indexOf("tox-")||-1!==e.indexOf("mce-")}},lm=function(t,e){ge().browser.isIE()?function(t){t.on("focusout",(function(){um(t)}))}(t):function(t,e){t.on("mouseup touchend",(function(t){e.throttle()}))}(t,e),t.on("keyup NodeChange",(function(e){(function(t){return"nodechange"===t.type&&t.selectionChange})(e)||um(t)}))},fm=function(t){var e=zu((function(){um(t)}),0);t.on("init",(function(){t.inline&&function(t,e){var n=function(){e.throttle()};pu.DOM.bind(document,"mouseup",n),t.on("remove",(function(){pu.DOM.unbind(document,"mouseup",n)}))}(t,e),lm(t,e)})),t.on("remove",(function(){e.cancel()}))},dm=pu.DOM,mm=function(t,e){var n=function(t){return t.getParam("custom_ui_selector","","string")}(t);return null!==dm.getParent(e,(function(e){return function(t){return sm.isEditorUIElement(t)}(e)||!!n&&t.dom.is(e,n)}))},gm=function(t,e){var n=e.editor;fm(n),n.on("focusin",(function(){var e=t.focusedEditor;e!==n&&(e&&e.fire("blur",{focusedEditor:n}),t.setActive(n),t.focusedEditor=n,n.fire("focus",{blurredEditor:e}),n.focus(!0))})),n.on("focusout",(function(){oo.setEditorTimeout(n,(function(){var e=t.focusedEditor;mm(n,function(t){try{var e=un(Me.fromDom(t.getElement()));return Gd(e).fold((function(){return document.body}),(function(t){return t.dom}))}catch(t){return document.body}}(n))||e!==n||(n.fire("blur",{focusedEditor:null}),t.focusedEditor=null)}))})),Sd||(Sd=function(e){var n=t.activeEditor;n&&function(t){if(an()&&y(t.target)){var e=Me.fromDom(t.target);if(Ie(e)&&ln(e)&&t.composed&&t.composedPath){var n=t.composedPath();if(n)return at(n)}}return L.from(t.target)}(e).each((function(e){e.ownerDocument===document&&(e===document.body||mm(n,e)||t.focusedEditor!==n||(n.fire("blur",{focusedEditor:null}),t.focusedEditor=null))}))},dm.bind(document,"focusin",Sd))},hm=function(t,e){t.focusedEditor===e.editor&&(t.focusedEditor=null),t.activeEditor||(dm.unbind(document,"focusin",Sd),Sd=null)},pm=function(t,e){return function(t){return t.collapsed?L.from(cc(t.startContainer,t.startOffset)).map(Me.fromDom):L.none()}(e).bind((function(e){return vo(e)?L.some(e):!1===He(t,e)?L.some(t):L.none()}))},vm=function(t,e){pm(Me.fromDom(t.getBody()),e).bind((function(t){return Rl(t.dom)})).fold((function(){t.selection.normalize()}),(function(e){return t.selection.setRng(e.toRange())}))},bm=function(t){if(t.setActive)try{t.setActive()}catch(e){t.focus()}else t.focus()},ym=function(t){return qd(t)||(e=t,Gd(un(e)).filter((function(t){return e.dom.contains(t.dom)}))).isSome();var e},xm=function(t){return t.inline?function(t){var e=t.getBody();return e&&ym(Me.fromDom(e))}(t):function(t){return t.iframeElement&&qd(Me.fromDom(t.iframeElement))}(t)},wm=function(t){return xm(t)||function(t){var e=un(Me.fromDom(t.getElement()));return Gd(e).filter((function(e){return!(void 0!==(n=e.dom.classList)&&(n.contains("tox-edit-area")||n.contains("tox-edit-area__iframe")||n.contains("mce-content-body")))&&mm(t,e.dom);var n})).isSome()}(t)},Cm=function(t){return t.editorManager.setActive(t)},Sm=function(t,e){t.removed||(e?Cm(t):function(t){var e=t.selection,n=t.getBody(),r=e.getRng();t.quirks.refreshContentEditable(),void 0!==t.bookmark&&!1===xm(t)&&cm(t).each((function(e){t.selection.setRng(e),r=e}));var o=function(t,e){return t.dom.getParent(e,(function(e){return"true"===t.dom.getContentEditable(e)}))}(t,e.getNode());if(t.$.contains(n,o))return bm(o),vm(t,r),void Cm(t);t.inline||(Se.opera||bm(n),t.getWin().focus()),(Se.gecko||t.inline)&&(bm(n),vm(t,r)),Cm(t)}(t))},km=function(t,e,n,r,o){var i=n?e.startContainer:e.endContainer,a=n?e.startOffset:e.endOffset;return L.from(i).map(Me.fromDom).map((function(t){return r&&e.collapsed?t:Ze(t,o(t,a)).getOr(t)})).bind((function(t){return Ie(t)?L.some(t):$e(t).filter(Ie)})).map((function(t){return t.dom})).getOr(t)},_m=function(t,e,n){return km(t,e,!0,n,(function(t,e){return Math.min(nn(t),e)}))},Om=function(t,e,n){return km(t,e,!1,n,(function(t,e){return e>0?e-1:e}))},Em=function(t,e){for(var n=t;t&&Pn(t)&&0===t.length;)t=e?t.nextSibling:t.previousSibling;return t||n},zm=function(t,e){return W(e,(function(e){var n=t.fire("GetSelectionRange",{range:e});return n.range!==e?n.range:e}))},Tm={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11},Mm=function(t,e,n){var r=n?"lastChild":"firstChild",o=n?"prev":"next";if(t[r])return t[r];if(t!==e){var i=t[o];if(i)return i;for(var a=t.parent;a&&a!==e;a=a.parent)if(i=a[o])return i}},Dm=function(t){if(!Ko(t.value))return!1;var e=t.parent;return!e||"span"===e.name&&!e.attr("style")||!/^[ ]+$/.test(t.value)},Am=function(t){var e="a"===t.name&&!t.attr("href")&&t.attr("id");return t.attr("name")||t.attr("id")&&!t.firstChild||t.attr("data-mce-bookmark")||e},Nm=function(){function t(t,e){this.name=t,this.type=e,1===e&&(this.attributes=[],this.attributes.map={})}return t.create=function(e,n){var r=new t(e,Tm[e]||1);return n&&dt(n,(function(t,e){r.attr(e,t)})),r},t.prototype.replace=function(t){var e=this;return t.parent&&t.remove(),e.insert(t,e),e.remove(),e},t.prototype.attr=function(t,e){var n,r=this;if("string"!=typeof t)return null!=t&&dt(t,(function(t,e){r.attr(e,t)})),r;if(n=r.attributes){if(void 0!==e){if(null===e){if(t in n.map){delete n.map[t];for(var o=n.length;o--;)if(n[o].name===t)return n.splice(o,1),r}return r}if(t in n.map){for(o=n.length;o--;)if(n[o].name===t){n[o].value=e;break}}else n.push({name:t,value:e});return n.map[t]=e,r}return n.map[t]}},t.prototype.clone=function(){var e,n=this,r=new t(n.name,n.type);if(e=n.attributes){var o=[];o.map={};for(var i=0,a=e.length;i<a;i++){var u=e[i];"id"!==u.name&&(o[o.length]={name:u.name,value:u.value},o.map[u.name]=u.value)}r.attributes=o}return r.value=n.value,r.shortEnded=n.shortEnded,r},t.prototype.wrap=function(t){var e=this;return e.parent.insert(t,e),t.append(e),e},t.prototype.unwrap=function(){for(var t=this,e=t.firstChild;e;){var n=e.next;t.insert(e,t,!0),e=n}t.remove()},t.prototype.remove=function(){var t=this,e=t.parent,n=t.next,r=t.prev;return e&&(e.firstChild===t?(e.firstChild=n,n&&(n.prev=null)):r.next=n,e.lastChild===t?(e.lastChild=r,r&&(r.next=null)):n.prev=r,t.parent=t.next=t.prev=null),t},t.prototype.append=function(t){var e=this;t.parent&&t.remove();var n=e.lastChild;return n?(n.next=t,t.prev=n,e.lastChild=t):e.lastChild=e.firstChild=t,t.parent=e,t},t.prototype.insert=function(t,e,n){t.parent&&t.remove();var r=e.parent||this;return n?(e===r.firstChild?r.firstChild=t:e.prev.next=t,t.prev=e.prev,t.next=e,e.prev=t):(e===r.lastChild?r.lastChild=t:e.next.prev=t,t.next=e.next,t.prev=e,e.next=t),t.parent=r,t},t.prototype.getAll=function(t){for(var e=[],n=this.firstChild;n;n=Mm(n,this))n.name===t&&e.push(n);return e},t.prototype.children=function(){for(var t=[],e=this.firstChild;e;e=e.next)t.push(e);return t},t.prototype.empty=function(){var t=this;if(t.firstChild){for(var e=[],n=t.firstChild;n;n=Mm(n,t))e.push(n);for(var r=e.length;r--;){(n=e[r]).parent=n.firstChild=n.lastChild=n.next=n.prev=null}}return t.firstChild=t.lastChild=null,t},t.prototype.isEmpty=function(t,e,n){void 0===e&&(e={});var r=this,o=r.firstChild;if(Am(r))return!1;if(o)do{if(1===o.type){if(o.attr("data-mce-bogus"))continue;if(t[o.name])return!1;if(Am(o))return!1}if(8===o.type)return!1;if(3===o.type&&!Dm(o))return!1;if(3===o.type&&o.parent&&e[o.parent.name]&&Ko(o.value))return!1;if(n&&n(o))return!1}while(o=Mm(o,r));return!0},t.prototype.walk=function(t){return Mm(this,null,t)},t}(),Bm=function(t,e){return t.replace(e.re,(function(t){return yt(e.uris,t).getOr(t)}))},Rm=ze.each,Hm=ze.trim,Lm="source protocol authority userInfo user password host port relative path directory file query anchor".split(" "),Vm={ftp:21,http:80,https:443,mailto:25},Pm=["img","video"],Im=function(t,e,n){return!t.allow_html_data_urls&&(/^data:image\//i.test(e)?function(t,e){return y(t)?!t:!y(e)||!U(Pm,e)}(t.allow_svg_data_urls,n)&&/^data:image\/svg\+xml/i.test(e):/^data:/i.test(e))},Fm=function(){function t(e,n){e=Hm(e),this.settings=n||{};var r=this.settings.base_uri,o=this;if(/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e))o.source=e;else{var i=0===e.indexOf("//");if(0!==e.indexOf("/")||i||(e=(r&&r.protocol||"http")+"://mce_host"+e),!/^[\w\-]*:?\/\//.test(e)){var a=this.settings.base_uri?this.settings.base_uri.path:new t(document.location.href).directory;if(this.settings.base_uri&&""==this.settings.base_uri.protocol)e="//mce_host"+o.toAbsPath(a,e);else{var u=/([^#?]*)([#?]?.*)/.exec(e);e=(r&&r.protocol||"http")+"://mce_host"+o.toAbsPath(a,u[1])+u[2]}}e=e.replace(/@@/g,"(mce_at)");var c=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?(\[[a-zA-Z0-9:.%]+\]|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e);Rm(Lm,(function(t,e){var n=c[e];n&&(n=n.replace(/\(mce_at\)/g,"@@")),o[t]=n})),r&&(o.protocol||(o.protocol=r.protocol),o.userInfo||(o.userInfo=r.userInfo),o.port||"mce_host"!==o.host||(o.port=r.port),o.host&&"mce_host"!==o.host||(o.host=r.host),o.source=""),i&&(o.protocol="")}}return t.parseDataUri=function(t){var e,n=decodeURIComponent(t).split(","),r=/data:([^;]+)/.exec(n[0]);return r&&(e=r[1]),{type:e,data:n[1]}},t.isDomSafe=function(t,e,n){if(void 0===n&&(n={}),n.allow_script_urls)return!0;var r=yi.decode(t).replace(/[\s\u0000-\u001F]+/g,"");try{r=decodeURIComponent(r)}catch(t){r=unescape(r)}return!/((java|vb)script|mhtml):/i.test(r)&&!Im(n,r,e)},t.getDocumentBaseUrl=function(t){var e;return e=0!==t.protocol.indexOf("http")&&"file:"!==t.protocol?t.href:t.protocol+"//"+t.host+t.pathname,/^[^:]+:\/\/\/?[^\/]+\//.test(e)&&(e=e.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(e)||(e+="/")),e},t.prototype.setPath=function(t){var e=/^(.*?)\/?(\w+)?$/.exec(t);this.path=e[0],this.directory=e[1],this.file=e[2],this.source="",this.getURI()},t.prototype.toRelative=function(e){var n;if("./"===e)return e;var r=new t(e,{base_uri:this});if("mce_host"!==r.host&&this.host!==r.host&&r.host||this.port!==r.port||this.protocol!==r.protocol&&""!==r.protocol)return r.getURI();var o=this.getURI(),i=r.getURI();return o===i||"/"===o.charAt(o.length-1)&&o.substr(0,o.length-1)===i?o:(n=this.toRelPath(this.path,r.path),r.query&&(n+="?"+r.query),r.anchor&&(n+="#"+r.anchor),n)},t.prototype.toAbsolute=function(e,n){var r=new t(e,{base_uri:this});return r.getURI(n&&this.isSameOrigin(r))},t.prototype.isSameOrigin=function(t){if(this.host==t.host&&this.protocol==t.protocol){if(this.port==t.port)return!0;var e=Vm[this.protocol];if(e&&(this.port||e)==(t.port||e))return!0}return!1},t.prototype.toRelPath=function(t,e){var n,r,o=0,i="",a=t.substring(0,t.lastIndexOf("/")).split("/"),u=e.split("/");if(a.length>=u.length)for(n=0,r=a.length;n<r;n++)if(n>=u.length||a[n]!==u[n]){o=n+1;break}if(a.length<u.length)for(n=0,r=u.length;n<r;n++)if(n>=a.length||a[n]!==u[n]){o=n+1;break}if(1===o)return e;for(n=0,r=a.length-(o-1);n<r;n++)i+="../";for(n=o-1,r=u.length;n<r;n++)i+=n!==o-1?"/"+u[n]:u[n];return i},t.prototype.toAbsPath=function(t,e){var n,r,o=0,i=[],a=/\/$/.test(e)?"/":"",u=t.split("/"),c=e.split("/");for(Rm(u,(function(t){t&&i.push(t)})),u=i,n=c.length-1,i=[];n>=0;n--)0!==c[n].length&&"."!==c[n]&&(".."!==c[n]?o>0?o--:i.push(c[n]):o++);return 0!==(r=(n=u.length-o)<=0?nt(i).join("/"):u.slice(0,n).join("/")+"/"+nt(i).join("/")).indexOf("/")&&(r="/"+r),a&&r.lastIndexOf("/")!==r.length-1&&(r+=a),r},t.prototype.getURI=function(t){var e;return void 0===t&&(t=!1),this.source&&!t||(e="",t||(this.protocol?e+=this.protocol+"://":e+="//",this.userInfo&&(e+=this.userInfo+"@"),this.host&&(e+=this.host),this.port&&(e+=":"+this.port)),this.path&&(e+=this.path),this.query&&(e+="?"+this.query),this.anchor&&(e+="#"+this.anchor),this.source=e),this.source},t}(),Um=ze.makeMap("button,fieldset,form,iframe,img,image,input,object,output,select,textarea"),jm=function(t,e,n){for(var r=/<([!?\/])?([A-Za-z0-9\-_:.]+)/g,o=/(?:\s(?:[^'">]+(?:"[^"]*"|'[^']*'))*[^"'>]*(?:"[^">]*|'[^'>]*)?|\s*|\/)>/g,i=t.getShortEndedElements(),a=1,u=n;0!==a;)for(r.lastIndex=u;;){var c=r.exec(e);if(null===c)return u;if("!"===c[1]){u=Vt(c[2],"--")?Wm(e,!1,c.index+"!--".length):Wm(e,!0,c.index+1);break}o.lastIndex=r.lastIndex;var s=o.exec(e);if(!h(s)&&s.index===r.lastIndex){"/"===c[1]?a-=1:xt(i,c[2])||(a+=1),u=r.lastIndex+s[0].length;break}}return u},Wm=function(t,e,n){void 0===n&&(n=0);var r=t.toLowerCase();if(-1!==r.indexOf("[if ",n)&&function(t,e){return/^\s*\[if [\w\W]+\]>.*<!\[endif\](--!?)?>/.test(t.substr(e))}(r,n)){var o=r.indexOf("[endif]",n);return r.indexOf(">",o)}if(e){var i=r.indexOf(">",n);return-1!==i?i:r.length}var a=/--!?>/g;a.lastIndex=n;var u=a.exec(t);return u?u.index+u[0].length:r.length},qm=function(t,e){var n=t.exec(e);if(n){var r=n[1],o=n[2];return"string"==typeof r&&"data-mce-bogus"===r.toLowerCase()?o:null}return null},Gm=function(t,e){var n;void 0===e&&(e=Ti());var r=null!==(n=(t=t||{}).document)&&void 0!==n?n:document,o=r.createElement("form");!1!==t.fix_self_closing&&(t.fix_self_closing=!0);var i=t.comment?t.comment:C,a=t.cdata?t.cdata:C,u=t.text?t.text:C,c=t.start?t.start:C,s=t.end?t.end:C,l=t.pi?t.pi:C,f=t.doctype?t.doctype:C,d=function(n,d){void 0===d&&(d="html");for(var m,g,h,p,v,b,y,x,w,C,S,k,_,O,E,z,T,M,D,A=n.html,N=0,B=[],R=0,H=yi.decode,L=ze.makeMap("src,href,data,background,action,formaction,poster,xlink:href"),V="html"===d?0:1,P=function(t){var e,n;for(e=B.length;e--&&B[e].name!==t;);if(e>=0){for(n=B.length-1;n>=e;n--)(t=B[n]).valid&&s(t.name);B.length=e}},I=function(t,e){return u(Bm(t,n),e)},F=function(e){""!==e&&(">"===e.charAt(0)&&(e=" "+e),t.allow_conditional_comments||"[if"!==e.substr(0,3).toLowerCase()||(e=" "+e),i(Bm(e,n)))},U=function(t,e){var n=t||"",r=!Vt(n,"--"),o=Wm(A,r,e);return t=A.substr(e,o-e),F(r?n+t:t),o+1},j=function(e,i,a,u,c){if(a=function(t){return Bm(t,n)}((i=i.toLowerCase())in X?i:H(a||u||c||"")),K&&!x&&!1===function(t){return 0===t.indexOf("data-")||0===t.indexOf("aria-")}(i)){var s=O[i];if(!s&&E){for(var l=E.length;l--&&!(s=E[l]).pattern.test(i););-1===l&&(s=null)}if(!s)return;if(s.validValues&&!(a in s.validValues))return}("name"===i||"id"===i)&&e in Um&&(a in r||a in o)||L[i]&&!Fm.isDomSafe(a,e,t)||x&&(i in L||0===i.indexOf("on"))||(p.map[i]=a,p.push({name:i,value:a}))},W=new RegExp("<(?:(?:!--([\\w\\W]*?)--!?>)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:![Dd][Oo][Cc][Tt][Yy][Pp][Ee]([\\w\\W]*?)>)|(?:!(--)?)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)>)|(?:([A-Za-z][A-Za-z0-9\\-_:.]*)(\\s(?:[^'\">]+(?:\"[^\"]*\"|'[^']*'))*[^\"'>]*(?:\"[^\">]*|'[^'>]*)?|\\s*|\\/)>))","g"),q=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,G=e.getShortEndedElements(),$=t.self_closing_elements||e.getSelfClosingElements(),X=e.getBoolAttrs(),K=t.validate,Y=t.remove_internals,J=t.fix_self_closing,Q=e.getSpecialElements(),Z=A+">";m=W.exec(Z);){var tt=m[0];if(N<m.index&&I(H(A.substr(N,m.index-N))),g=m[7])":"===(g=g.toLowerCase()).charAt(0)&&(g=g.substr(1)),P(g);else if(g=m[8]){if(m.index+tt.length>A.length){I(H(A.substr(m.index))),N=m.index+tt.length;continue}":"===(g=g.toLowerCase()).charAt(0)&&(g=g.substr(1)),w=g in G,J&&$[g]&&B.length>0&&B[B.length-1].name===g&&P(g);var et=qm(q,m[9]);if(null!==et){if("all"===et){N=jm(e,A,W.lastIndex),W.lastIndex=N;continue}S=!1}if(!K||(C=e.getElementRule(g))){if(S=!0,K&&(O=C.attributes,E=C.attributePatterns),(_=m[9])?((x=-1!==_.indexOf("data-mce-type"))&&Y&&(S=!1),(p=[]).map={},_.replace(q,(function(t,e,n,r,o){return j(g,e,n,r,o),""}))):(p=[]).map={},K&&!x){if(z=C.attributesRequired,T=C.attributesDefault,M=C.attributesForced,C.removeEmptyAttrs&&!p.length&&(S=!1),M)for(v=M.length;v--;)y=(k=M[v]).name,"{$uid}"===(D=k.value)&&(D="mce_"+R++),p.map[y]=D,p.push({name:y,value:D});if(T)for(v=T.length;v--;)(y=(k=T[v]).name)in p.map||("{$uid}"===(D=k.value)&&(D="mce_"+R++),p.map[y]=D,p.push({name:y,value:D}));if(z){for(v=z.length;v--&&!(z[v]in p.map););-1===v&&(S=!1)}if(k=p.map["data-mce-bogus"]){if("all"===k){N=jm(e,A,W.lastIndex),W.lastIndex=N;continue}S=!1}}S&&c(g,p,w)}else S=!1;if(h=Q[g]){h.lastIndex=N=m.index+tt.length,(m=h.exec(A))?(S&&(b=A.substr(N,m.index-N)),N=m.index+m[0].length):(b=A.substr(N),N=A.length),S&&(b.length>0&&I(b,!0),s(g)),W.lastIndex=N;continue}w||(_&&_.indexOf("/")===_.length-1?S&&s(g):B.push({name:g,valid:S}))}else if(g=m[1])F(g);else if(g=m[2]){if(!(1===V||t.preserve_cdata||B.length>0&&e.isValidChild(B[B.length-1].name,"#cdata"))){N=U("",m.index+2),W.lastIndex=N;continue}a(g)}else if(g=m[3])f(g);else{if((g=m[4])||"<!"===tt){N=U(g,m.index+tt.length),W.lastIndex=N;continue}if(g=m[5]){if(1!==V){N=U("?",m.index+2),W.lastIndex=N;continue}l(g,m[6])}}N=m.index+tt.length}for(N<A.length&&I(H(A.substr(N))),v=B.length-1;v>=0;v--)(g=B[v]).valid&&s(g.name)};return{parse:function(t,e){void 0===e&&(e="html"),d(function(t){for(var e,n=/data:[^;]+;base64,([a-z0-9\+\/=\s]+)/gi,r=[],o={},i=$u("img"),a=0,u=0;e=n.exec(t);){var c=e[0],s=i+"_"+u++;o[s]=c,a<e.index&&r.push(t.substr(a,e.index-a)),r.push(s),a=e.index+c.length}var l=new RegExp(i+"_[0-9]+","g");return 0===a?{prefix:i,uris:o,html:t,re:l}:(a<t.length&&r.push(t.substr(a)),{prefix:i,uris:o,html:r.join(""),re:l})}(t),e)}}};Gm.findEndTag=jm;var $m=function(t,e){for(var n,r=/<(\w+) [^>]*data-mce-bogus="all"[^>]*>/g,o=t.schema,i=function(t,e){var n=new RegExp(["\\s?("+t.join("|")+')="[^"]+"'].join("|"),"gi");return e.replace(n,"")}(t.getTempAttrs(),e),a=o.getShortEndedElements();n=r.exec(i);){var u=r.lastIndex,c=n[0].length,s=void 0;s=a[n[1]]?u:Gm.findEndTag(o,i,u),i=i.substring(0,u-c)+i.substring(s),r.lastIndex=u-c}return So(i)},Xm=$m,Km=function(t,e,n,r){var o,i=function(t,e){return Mt(Mt({},t),{format:e,get:!0,getInner:!0})}(e,n),a=e.no_events?i:t.fire("BeforeGetContent",i);return o="raw"===a.format?ze.trim(Xm(t.serializer,r.innerHTML)):"text"===a.format?t.dom.isEmpty(r)?"":So(r.innerText||r.textContent):"tree"===a.format?t.serializer.serialize(r,a):function(t,e){var n=ns(t),r=new RegExp("^(<"+n+"[^>]*>(&nbsp;|&#160;|\\s| |<br \\/>|)<\\/"+n+">[\r\n]*|<br \\/>[\r\n]*)$");return e.replace(r,"")}(t,t.serializer.serialize(r,a)),U(["text","tree"],a.format)||yo(Me.fromDom(r))?a.content=o:a.content=ze.trim(o),a.no_events?a.content:t.fire("GetContent",a).content},Ym=ze.each,Jm=function(t){return{compare:function(e,n){if(e.nodeName!==n.nodeName)return!1;var r=function(e){var n={};return Ym(t.getAttribs(e),(function(r){var o=r.nodeName.toLowerCase();0!==o.indexOf("_")&&"style"!==o&&0!==o.indexOf("data-")&&(n[o]=t.getAttrib(e,o))})),n},o=function(t,e){var n,r;for(r in t)if(xt(t,r)){if(void 0===(n=e[r]))return!1;if(t[r]!==n)return!1;delete e[r]}for(r in e)if(xt(e,r))return!1;return!0};return!!o(r(e),r(n))&&(!!o(t.parseStyle(t.getAttrib(e,"style")),t.parseStyle(t.getAttrib(n,"style")))&&(!Yl(e)&&!Yl(n)))}}},Qm=ze.makeMap,Zm=function(t){var e=[],n=(t=t||{}).indent,r=Qm(t.indent_before||""),o=Qm(t.indent_after||""),i=yi.getEncodeFunc(t.entity_encoding||"raw",t.entities),a="html"===t.element_format;return{start:function(t,u,c){var s,l,f,d;if(n&&r[t]&&e.length>0&&(d=e[e.length-1]).length>0&&"\n"!==d&&e.push("\n"),e.push("<",t),u)for(s=0,l=u.length;s<l;s++)f=u[s],e.push(" ",f.name,'="',i(f.value,!0),'"');e[e.length]=!c||a?">":" />",c&&n&&o[t]&&e.length>0&&(d=e[e.length-1]).length>0&&"\n"!==d&&e.push("\n")},end:function(t){var r;e.push("</",t,">"),n&&o[t]&&e.length>0&&(r=e[e.length-1]).length>0&&"\n"!==r&&e.push("\n")},text:function(t,n){t.length>0&&(e[e.length]=n?t:i(t))},cdata:function(t){e.push("<![CDATA[",t,"]]>")},comment:function(t){e.push("\x3c!--",t,"--\x3e")},pi:function(t,r){r?e.push("<?",t," ",i(r),"?>"):e.push("<?",t,"?>"),n&&e.push("\n")},doctype:function(t){e.push("<!DOCTYPE",t,">",n?"\n":"")},reset:function(){e.length=0},getContent:function(){return e.join("").replace(/\n$/,"")}}},tg=function(t,e){void 0===e&&(e=Ti());var n=Zm(t);(t=t||{}).validate=!("validate"in t)||t.validate;return{serialize:function(r){var o=t.validate,i={3:function(t){n.text(t.value,t.raw)},8:function(t){n.comment(t.value)},7:function(t){n.pi(t.name,t.value)},10:function(t){n.doctype(t.value)},4:function(t){n.cdata(t.value)},11:function(t){if(t=t.firstChild)do{a(t)}while(t=t.next)}};n.reset();var a=function(t){var r=i[t.type];if(r)r(t);else{var u=t.name,c=t.shortEnded,s=t.attributes;if(o&&s&&s.length>1){var l=[];l.map={};var f=e.getElementRule(t.name);if(f){for(var d=0,m=f.attributesOrder.length;d<m;d++){if((h=f.attributesOrder[d])in s.map){var g=s.map[h];l.map[h]=g,l.push({name:h,value:g})}}for(d=0,m=s.length;d<m;d++){var h;if(!((h=s[d].name)in l.map)){g=s.map[h];l.map[h]=g,l.push({name:h,value:g})}}s=l}}if(n.start(t.name,s,c),!c){if(t=t.firstChild)do{a(t)}while(t=t.next);n.end(u)}}};return 1!==r.type||t.inner?i[11](r):a(r),n.getContent()}}},eg=new Set;q(["margin","margin-left","margin-right","margin-top","margin-bottom","padding","padding-left","padding-right","padding-top","padding-bottom","border","border-width","border-style","border-color","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","float","position","left","right","top","bottom","z-index","display","transform","width","max-width","min-width","height","max-height","min-height","overflow","overflow-x","overflow-y","text-overflow","vertical-align","transition","transition-delay","transition-duration","transition-property","transition-timing-function"],(function(t){eg.add(t)}));var ng=["font","text-decoration","text-emphasis"],rg=function(t,e){return lt(t.parseStyle(t.getAttrib(e,"style")))},og=function(t,e){return et(rg(t,e),(function(t){return!function(t){return eg.has(t)}(t)}))},ig=function(t,e,n){var r=rg(t,e),o=rg(t,n),i=function(r){var o=t.getStyle(e,r),i=t.getStyle(n,r);return jt(o)&&jt(i)&&o!==i};return j(r,(function(t){var e=function(e){return j(e,(function(e){return e===t}))};if(!e(o)&&e(ng)){var n=X(o,(function(t){return j(ng,(function(e){return Vt(t,e)}))}));return j(n,i)}return i(t)}))},ag=function(t,e,n){return L.from(n.container()).filter(Pn).exists((function(r){var o=t?0:-1;return e(r.data.charAt(n.offset()+o))}))},ug=z(ag,!0,Ql),cg=z(ag,!1,Ql),sg=function(t){var e=t.container();return Pn(e)&&(0===e.data.length||Co(e.data)&&Zf.isBookmarkNode(e.parentNode))},lg=function(t,e){return function(n){return L.from(el(t?0:-1,n)).filter(e).isSome()}},fg=function(t){return Wn(t)&&"block"===ir(Me.fromDom(t),"display")},dg=function(t){return Gn(t)&&!function(t){return Dn(t)&&"all"===t.getAttribute("data-mce-bogus")}(t)},mg=lg(!0,fg),gg=lg(!1,fg),hg=lg(!0,Xn),pg=lg(!1,Xn),vg=lg(!0,Hn),bg=lg(!1,Hn),yg=lg(!0,dg),xg=lg(!1,dg),wg=function(t){var e=Vu(t,"br"),n=X(function(t){for(var e=[],n=t.dom;n;)e.push(Me.fromDom(n)),n=n.lastChild;return e}(t).slice(-1),mo);e.length===n.length&&q(n,vn)},Cg=function(t){pn(t),gn(t,Me.fromHtml('<br data-mce-bogus="1">'))},Sg=function(t){en(t).each((function(e){Xe(e).each((function(n){lo(t)&&mo(e)&&lo(n)&&vn(e)}))}))},kg=function(t,e,n){return He(e,t)?function(t,e){for(var n=x(e)?e:A,r=t.dom,o=[];null!==r.parentNode&&void 0!==r.parentNode;){var i=r.parentNode,a=Me.fromDom(i);if(o.push(a),!0===n(a))break;r=i}return o}(t,(function(t){return n(t)||Be(t,e)})).slice(0,-1):[]},_g=function(t,e){return kg(t,e,A)},Og=function(t,e){return[t].concat(_g(t,e))},Eg=function(t,e,n){return Dl(t,e,n,sg)},zg=function(t,e){return Q(Og(Me.fromDom(e.container()),t),lo)},Tg=function(t,e,n){return Eg(t,e.dom,n).forall((function(t){return zg(e,n).fold((function(){return!1===tl(t,n,e.dom)}),(function(r){return!1===tl(t,n,e.dom)&&He(r,Me.fromDom(t.container()))}))}))},Mg=function(t,e,n){return zg(e,n).fold((function(){return Eg(t,e.dom,n).forall((function(t){return!1===tl(t,n,e.dom)}))}),(function(e){return Eg(t,e.dom,n).isNone()}))},Dg=z(Mg,!1),Ag=z(Mg,!0),Ng=z(Tg,!1),Bg=z(Tg,!0),Rg=function(t){return ll(t).exists(mo)},Hg=function(t,e,n){var r=X(Og(Me.fromDom(n.container()),e),lo),o=at(r).getOr(e);return Tl(t,o.dom,n).filter(Rg)},Lg=function(t,e){return ll(e).exists(mo)||Hg(!0,t,e).isSome()},Vg=function(t,e){return function(t){return L.from(t.getNode(!0)).map(Me.fromDom)}(e).exists(mo)||Hg(!1,t,e).isSome()},Pg=z(Hg,!1),Ig=z(Hg,!0),Fg=function(t){return Tc.isTextPosition(t)&&!t.isAtStart()&&!t.isAtEnd()},Ug=function(t,e){var n=X(Og(Me.fromDom(e.container()),t),lo);return at(n).getOr(t)},jg=function(t,e){return Fg(e)?cg(e):cg(e)||Bl(Ug(t,e).dom,e).exists(cg)},Wg=function(t,e){return Fg(e)?ug(e):ug(e)||Nl(Ug(t,e).dom,e).exists(ug)},qg=function(t){return ll(t).bind((function(t){return Kr(t,Ie)})).exists((function(t){return function(t){return U(["pre","pre-wrap"],t)}(ir(t,"white-space"))}))},Gg=function(t,e){return function(t,e){return Bl(t.dom,e).isNone()}(t,e)||function(t,e){return Nl(t.dom,e).isNone()}(t,e)||Dg(t,e)||Ag(t,e)||Vg(t,e)||Lg(t,e)},$g=function(t,e){return!qg(e)&&(Dg(t,e)||Ng(t,e)||Vg(t,e)||jg(t,e))},Xg=function(t,e){return!qg(e)&&(Ag(t,e)||Bg(t,e)||Lg(t,e)||Wg(t,e))},Kg=function(t,e){return $g(t,e)||Xg(t,function(t){var e=t.container(),n=t.offset();return Pn(e)&&n<e.data.length?Tc(e,n+1):t}(e))},Yg=function(t,e){return Jl(t.charAt(e))},Jg=function(t){var e=t.container();return Pn(e)&&Lt(e.data,xo)},Qg=function(t){var e=t.data,n=function(t){var e=t.split("");return W(e,(function(t,n){return Jl(t)&&n>0&&n<e.length-1&&Zl(e[n-1])&&Zl(e[n+1])?" ":t})).join("")}(e);return n!==e&&(t.data=n,!0)},Zg=function(t,e){return L.some(e).filter(Jg).bind((function(e){var n=e.container();return function(t,e){var n=e.data,r=Tc(e,0);return!(!Yg(n,0)||Kg(t,r)||(e.data=" "+n.slice(1),0))}(t,n)||Qg(n)||function(t,e){var n=e.data,r=Tc(e,n.length-1);return!(!Yg(n,n.length-1)||Kg(t,r)||(e.data=n.slice(0,-1)+" ",0))}(t,n)?L.some(e):L.none()}))},th=function(t){var e=Me.fromDom(t.getBody());t.selection.isCollapsed()&&Zg(e,Tc.fromRangeStart(t.selection.getRng())).each((function(e){t.selection.setRng(e.toRange())}))},eh=function(t,e,n){if(0!==n){var r=Me.fromDom(t),o=Xr(r,lo).getOr(r),i=t.data.slice(e,e+n),a=e+n>=t.data.length&&Xg(o,Tc(t,t.data.length)),u=0===e&&$g(o,Tc(t,0));t.replaceData(e,n,function(t,e,n){return Y(t,(function(r,o){return Ql(o)||Jl(o)?r.previousCharIsSpace||""===r.str&&e||r.str.length===t.length-1&&n?{previousCharIsSpace:!1,str:r.str+xo}:{previousCharIsSpace:!0,str:r.str+" "}:{previousCharIsSpace:!1,str:r.str+o}}),{previousCharIsSpace:!1,str:""}).str}(i,u,a))}},nh=function(t,e){var n=t.data.slice(e),r=n.length-Ft(n).length;eh(t,e,r)},rh=function(t,e){var n=t.data.slice(0,e),r=n.length-Ut(n).length;eh(t,e-r,r)},oh=function(t,e,n,r){void 0===r&&(r=!0);var o=Ut(t.data).length,i=r?t:e,a=r?e:t;return r?i.appendData(a.data):i.insertData(0,a.data),vn(Me.fromDom(a)),n&&nh(i,o),i},ih=function(t,e){return function(t,e){var n=t.container(),r=t.offset();return!1===Tc.isTextPosition(t)&&n===e.parentNode&&r>Tc.before(e).offset()}(e,t)?Tc(e.container(),e.offset()-1):e},ah=function(t){return qo(t.previousSibling)?L.some((e=t.previousSibling,Pn(e)?Tc(e,e.data.length):Tc.after(e))):t.previousSibling?Hl(t.previousSibling):L.none();var e},uh=function(t){return qo(t.nextSibling)?L.some((e=t.nextSibling,Pn(e)?Tc(e,0):Tc.before(e))):t.nextSibling?Rl(t.nextSibling):L.none();var e},ch=function(t,e){return ah(e).orThunk((function(){return uh(e)})).orThunk((function(){return function(t,e){var n=Tc.before(e.previousSibling?e.previousSibling:e.parentNode);return Bl(t,n).fold((function(){return Nl(t,Tc.after(e))}),L.some)}(t,e)}))},sh=function(t,e){return uh(e).orThunk((function(){return ah(e)})).orThunk((function(){return function(t,e){return Nl(t,Tc.after(e)).fold((function(){return Bl(t,Tc.before(e))}),L.some)}(t,e)}))},lh=function(t,e,n){return function(t,e,n){return t?sh(e,n):ch(e,n)}(t,e,n).map(z(ih,n))},fh=function(t,e,n){n.fold((function(){t.focus()}),(function(n){t.selection.setRng(n.toRange(),e)}))},dh=function(t,e){return e&&xt(t.schema.getBlockElements(),Le(e))},mh=function(t){if(ei(t)){var e=Me.fromHtml('<br data-mce-bogus="1">');return pn(t),gn(t,e),L.some(Tc.before(e.dom))}return L.none()},gh=function(t,e,n){var r,o,i,a,u=Xe(t).filter(Fe),c=Ke(t).filter(Fe);return vn(t),(r=u,o=c,i=e,a=function(t,e,r){var o=t.dom,i=e.dom,a=o.data.length;return oh(o,i,n),r.container()===i?Tc(o,a):r},r.isSome()&&o.isSome()&&i.isSome()?L.some(a(r.getOrDie(),o.getOrDie(),i.getOrDie())):L.none()).orThunk((function(){return n&&(u.each((function(t){return rh(t.dom,t.dom.length)})),c.each((function(t){return nh(t.dom,0)}))),e}))},hh=function(t,e,n,r){void 0===r&&(r=!0);var o,i=lh(e,t.getBody(),n.dom),a=Xr(n,z(dh,t),(o=t.getBody(),function(t){return t.dom===o})),u=gh(n,i,function(t,e){return xt(t.schema.getTextInlineElements(),Le(e))}(t,n));t.dom.isEmpty(t.getBody())?(t.setContent(""),t.selection.setCursorLocation()):a.bind(mh).fold((function(){r&&fh(t,e,u)}),(function(n){r&&fh(t,e,L.some(n))}))},ph=function(t){return Vu(t,"td,th")},vh=function(t,e){return{start:t,end:e}},bh=_r([{singleCellTable:["rng","cell"]},{fullTable:["table"]},{partialTable:["cells","outsideDetails"]},{multiTable:["startTableCells","endTableCells","betweenRng"]}]),yh=function(t,e){return Zr(Me.fromDom(t),"td,th",e)},xh=function(t){return!Be(t.start,t.end)},wh=function(t,e){return Vf(t.start,e).bind((function(n){return Vf(t.end,e).bind((function(t){return e=Be(n,t),r=n,e?L.some(r):L.none();var e,r}))}))},Ch=function(t){return function(e){return wh(e,t).map((function(t){return function(t,e,n){return{rng:t,table:e,cells:n}}(e,t,ph(t))}))}},Sh=function(t,e,n,r){if(n.collapsed||!t.forall(xh))return L.none();if(e.isSameTable){var o=t.bind(Ch(r));return L.some({start:o,end:o})}var i=yh(n.startContainer,r),a=yh(n.endContainer,r),u=i.bind(function(t){return function(e){return Vf(e,t).bind((function(t){return ut(ph(t)).map((function(t){return vh(e,t)}))}))}}(r)).bind(Ch(r)),c=a.bind(function(t){return function(e){return Vf(e,t).bind((function(t){return at(ph(t)).map((function(t){return vh(t,e)}))}))}}(r)).bind(Ch(r));return L.some({start:u,end:c})},kh=function(t,e){return Z(t,(function(t){return Be(t,e)}))},_h=function(t){return Yn(kh(t.cells,t.rng.start),kh(t.cells,t.rng.end),(function(e,n){return t.cells.slice(e,n+1)}))},Oh=function(t,e,n){return t.exists((function(t){return function(t,e){return!xh(t)&&wh(t,e).exists((function(t){var e=t.dom.rows;return 1===e.length&&1===e[0].cells.length}))}(t,n)&&Ff(t.start,e)}))},Eh=function(t,e){var n=e.startTable,r=e.endTable,o=t.cloneRange();return n.each((function(t){return o.setStartAfter(t.dom)})),r.each((function(t){return o.setEndBefore(t.dom)})),o},zh=function(t,e){var n=function(t){return function(e){return Be(t,e)}}(t),r=function(t,e){var n=yh(t.startContainer,e),r=yh(t.endContainer,e);return Yn(n,r,vh)}(e,n),o=function(t,e){var n=function(t){return Vf(Me.fromDom(t),e)},r=n(t.startContainer),o=n(t.endContainer),i=r.isSome(),a=o.isSome(),u=Yn(r,o,Be).getOr(!1);return{startTable:r,endTable:o,isStartInTable:i,isEndInTable:a,isSameTable:u,isMultiTable:!u&&i&&a}}(e,n);return Oh(r,e,n)?r.map((function(t){return bh.singleCellTable(e,t.start)})):o.isMultiTable?function(t,e,n,r){return Sh(t,e,n,r).bind((function(t){var r=t.start,o=t.end,i=r.bind(_h).getOr([]),a=o.bind(_h).getOr([]);if(i.length>0&&a.length>0){var u=Eh(n,e);return L.some(bh.multiTable(i,a,u))}return L.none()}))}(r,o,e,n):function(t,e,n,r){return Sh(t,e,n,r).bind((function(t){var e=t.start,n=t.end;return e.or(n)})).bind((function(t){var r=e.isSameTable,o=_h(t).getOr([]);if(r&&t.cells.length===o.length)return L.some(bh.fullTable(t.table));if(o.length>0){if(r)return L.some(bh.partialTable(o,L.none()));var i=Eh(n,e);return L.some(bh.partialTable(o,L.some(Mt(Mt({},e),{rng:i}))))}return L.none()}))}(r,o,e,n)},Th=function(t){var e;return(8===Ve(e=t)||"#comment"===Le(e)?Xe(t):en(t)).bind(Th).orThunk((function(){return L.some(t)}))},Mh=function(t){return q(t,(function(t){rr(t,"contenteditable"),Cg(t)}))},Dh=function(t,e,n,r){var o=n.cloneRange();r?(o.setStart(n.startContainer,n.startOffset),o.setEndAfter(e.dom.lastChild)):(o.setStartBefore(e.dom.firstChild),o.setEnd(n.endContainer,n.endOffset)),Rh(t,o,e,!1)},Ah=function(t){var e=Lf(t),n=Me.fromDom(t.selection.getNode());$n(n.dom)&&ei(n)?t.selection.setCursorLocation(n.dom,0):t.selection.collapse(!0),e.length>1&&j(e,(function(t){return Be(t,n)}))&&Zn(n,"data-mce-selected","1")},Nh=function(t,e,n){var r=t.selection.getRng(),o=n.bind((function(n){var o=n.rng,i=n.isStartInTable,a=function(t,e){return L.from(t.dom.getParent(e,t.dom.isBlock)).map(Me.fromDom)}(t,i?o.endContainer:o.startContainer);o.deleteContents(),function(t,e,n){n.each((function(n){e?vn(n):(Cg(n),t.selection.setCursorLocation(n.dom,0))}))}(t,i,a.filter(ei));var u=i?e[0]:e[e.length-1];return Dh(t,u,r,i),ei(u)?L.none():L.some(i?e.slice(1):e.slice(0,-1))})).getOr(e);return Mh(o),Ah(t),!0},Bh=function(t,e,n,r){var o=t.selection.getRng(),i=e[0],a=n[n.length-1];Dh(t,i,o,!0),Dh(t,a,o,!1);var u=ei(i)?e:e.slice(1),c=ei(a)?n:n.slice(0,-1);return Mh(u.concat(c)),r.deleteContents(),Ah(t),!0},Rh=function(t,e,n,r){void 0===r&&(r=!0),e.deleteContents();var o,i=Th(n).getOr(n),a=Me.fromDom(t.dom.getParent(i.dom,t.dom.isBlock));if(ei(a)&&(Cg(a),r&&t.selection.setCursorLocation(a.dom,0)),!Be(n,a)){var u=Kn($e(a),n)?[]:$e(o=a).map(Qe).map((function(t){return X(t,(function(t){return!Be(o,t)}))})).getOr([]);q(u.concat(Qe(n)),(function(t){Be(t,a)||He(t,a)||!ei(t)||vn(t)}))}return!0},Hh=function(t,e){return hh(t,!1,e),!0},Lh=function(t,e,n,r){return Ph(e,r).fold((function(){return function(t,e,n){return zh(e,n).map((function(e){return e.fold(z(Rh,t),z(Hh,t),z(Nh,t),z(Bh,t))}))}(t,e,n)}),(function(e){return function(t,e){return Ih(t,e)}(t,e)})).getOr(!1)},Vh=function(t,e){return Q(Og(e,t),bo)},Ph=function(t,e){return Q(Og(e,t),(n="caption",function(t){return Ie(t)&&Le(t)===n}));var n},Ih=function(t,e){return Cg(e),t.selection.setCursorLocation(e.dom,0),L.some(!0)},Fh=function(t,e,n,r,o){return Ml(n,t.getBody(),o).bind((function(i){return function(t,e,n,r){return Rl(t.dom).bind((function(o){return Hl(t.dom).map((function(t){return e?n.isEqual(o)&&r.isEqual(t):n.isEqual(t)&&r.isEqual(o)}))})).getOr(!0)}(r,n,o,i)?function(t,e){return Ih(t,e)}(t,r):function(t,e,n){return Ph(t,Me.fromDom(n.getNode())).map((function(t){return!1===Be(t,e)}))}(e,r,i)})).or(L.some(!0))},Uh=function(t,e,n,r){var o=Tc.fromRangeStart(t.selection.getRng());return Vh(n,r).bind((function(r){return ei(r)?Ih(t,r):function(t,e,n,r,o){return Ml(n,t.getBody(),o).bind((function(t){return Vh(e,Me.fromDom(t.getNode())).map((function(t){return!1===Be(t,r)}))}))}(t,n,e,r,o)})).getOr(!1)},jh=function(t,e){return t?vg(e):bg(e)},Wh=function(t,e,n){var r=Me.fromDom(t.getBody());return Ph(r,n).fold((function(){return Uh(t,e,r,n)||function(t,e){var n=Tc.fromRangeStart(t.selection.getRng());return jh(e,n)||Tl(e,t.getBody(),n).exists((function(t){return jh(e,t)}))}(t,e)}),(function(n){return function(t,e,n,r){var o=Tc.fromRangeStart(t.selection.getRng());return ei(r)?Ih(t,r):Fh(t,n,e,r,o)}(t,e,r,n).getOr(!1)}))},qh=function(t,e){var n=Me.fromDom(t.selection.getStart(!0)),r=Lf(t);return t.selection.isCollapsed()&&0===r.length?Wh(t,e,n):function(t,e,n){var r=Me.fromDom(t.getBody()),o=t.selection.getRng();return 0!==n.length?Nh(t,n,L.none()):Lh(t,r,o,e)}(t,n,r)},Gh=function(t){var e=Tc.fromRangeStart(t),n=Tc.fromRangeEnd(t),r=t.commonAncestorContainer;return Tl(!1,r,n).map((function(o){return!tl(e,n,r)&&tl(e,o,r)?function(t,e,n,r){var o=document.createRange();return o.setStart(t,e),o.setEnd(n,r),o}(e.container(),e.offset(),o.container(),o.offset()):t})).getOr(t)},$h=function(t){return t.collapsed?t:Gh(t)},Xh=function(t,e){return t.getBlockElements()[e.name]&&function(t){return t.firstChild&&t.firstChild===t.lastChild}(e)&&function(t){return"br"===t.name||t.value===xo}(e.firstChild)},Kh=function(t,e){var n=e.firstChild,r=e.lastChild;return n&&"meta"===n.name&&(n=n.next),r&&"mce_marker"===r.attr("id")&&(r=r.prev),function(t,e){var n=t.getNonEmptyElements();return e&&(e.isEmpty(n)||Xh(t,e))}(t,r)&&(r=r.prev),!(!n||n!==r)&&("ul"===n.name||"ol"===n.name)},Yh=function(t){return t&&t.firstChild&&t.firstChild===t.lastChild&&function(t){return t.data===xo||jn(t)}(t.firstChild)},Jh=function(t){return t.length>0&&(!(e=t[t.length-1]).firstChild||Yh(e))?t.slice(0,-1):t;var e},Qh=function(t,e){var n=t.getParent(e,t.isBlock);return n&&"LI"===n.nodeName?n:null},Zh=function(t,e){var n=Tc.after(t),r=kl(e).prev(n);return r?r.toRange():null},tp=function(t,e,n){var r=t.parentNode;return ze.each(e,(function(e){r.insertBefore(e,t)})),function(t,e){var n=Tc.before(t),r=kl(e).next(n);return r?r.toRange():null}(t,n)},ep=function(t,e,n,r){var o,i=function(t,e,n){var r=e.serialize(n);return function(t){var e=t.firstChild,n=t.lastChild;return e&&"META"===e.nodeName&&e.parentNode.removeChild(e),n&&"mce_marker"===n.id&&n.parentNode.removeChild(n),t}(t.createFragment(r))}(e,t,r),a=Qh(e,n.startContainer),u=Jh((o=i.firstChild,X(o.childNodes,(function(t){return"LI"===t.nodeName})))),c=e.getRoot(),s=function(t){var r=Tc.fromRangeStart(n),o=kl(e.getRoot()),i=1===t?o.prev(r):o.next(r);return!i||Qh(e,i.getNode())!==a};return s(1)?tp(a,u,c):s(2)?function(t,e,n,r){return r.insertAfter(e.reverse(),t),Zh(e[0],n)}(a,u,c,e):function(t,e,n,r){var o=function(t,e){var n=e.cloneRange(),r=e.cloneRange();return n.setStartBefore(t),r.setEndAfter(t),[n.cloneContents(),r.cloneContents()]}(t,r),i=t.parentNode;return i.insertBefore(o[0],t),ze.each(e,(function(e){i.insertBefore(e,t)})),i.insertBefore(o[1],t),i.removeChild(t),Zh(e[e.length-1],n)}(a,u,c,n)},np=$n,rp=function(t){var e=t.dom,n=$h(t.selection.getRng());t.selection.setRng(n);var r=e.getParent(n.startContainer,np);!function(t,e,n){return null!==n&&n===t.getParent(e.endContainer,np)&&Ff(Me.fromDom(n),e)}(e,n,r)?t.getDoc().execCommand("Delete",!1,null):Rh(t,n,Me.fromDom(r))},op=function(t,e,n){var r,o,i,a=t.selection,u=t.dom;/^ | $/.test(e)&&(e=function(t,e,n){var r=Me.fromDom(t.getRoot());return n=$g(r,Tc.fromRangeStart(e))?n.replace(/^ /,"&nbsp;"):n.replace(/^&nbsp;/," "),Xg(r,Tc.fromRangeEnd(e))?n.replace(/(&nbsp;| )(<br( \/)>)?$/,"&nbsp;"):n.replace(/&nbsp;(<br( \/)?>)?$/," ")}(u,a.getRng(),e));var c=t.parser,s=n.merge,l=tg({validate:ys(t)},t.schema),f='<span id="mce_marker" data-mce-type="bookmark">&#xFEFF;</span>',d=t.fire("BeforeSetContent",{content:e,format:"html",selection:!0,paste:n.paste});if(d.isDefaultPrevented())t.fire("SetContent",{content:d.content,format:"html",selection:!0,paste:n.paste});else{-1===(e=d.content).indexOf("{$caret}")&&(e+="{$caret}"),e=e.replace(/\{\$caret\}/,f);var m=(o=a.getRng()).startContainer||(o.parentElement?o.parentElement():null),g=t.getBody();m===g&&a.isCollapsed()&&u.isBlock(g.firstChild)&&function(t,e){return e&&!t.schema.getShortEndedElements()[e.nodeName]}(t,g.firstChild)&&u.isEmpty(g.firstChild)&&((o=u.createRng()).setStart(g.firstChild,0),o.setEnd(g.firstChild,0),a.setRng(o)),a.isCollapsed()||rp(t);var h,p={context:(r=a.getNode()).nodeName.toLowerCase(),data:n.data,insert:!0},v=c.parse(e,p);if(!0===n.paste&&Kh(t.schema,v)&&function(t,e){return!!Qh(t,e)}(u,r))return o=ep(l,u,a.getRng(),v),a.setRng(o),void t.fire("SetContent",d);if(function(t){for(var e=t;e=e.walk();)1===e.type&&e.attr("data-mce-fragment","1")}(v),"mce_marker"===(i=v.lastChild).attr("id")){var b=i;for(i=i.prev;i;i=i.walk(!0))if(3===i.type||!u.isBlock(i.name)){t.schema.isValidChild(i.parent.name,"span")&&i.parent.insert(b,i,"br"===i.name);break}}if(t._selectionOverrides.showBlockCaretContainer(r),p.invalid){t.selection.setContent(f),r=a.getNode();var x=t.getBody();for(9===r.nodeType?r=i=x:i=r;i!==x;)r=i,i=i.parentNode;e=r===x?x.innerHTML:u.getOuterHTML(r),e=l.serialize(c.parse(e.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i,(function(){return l.serialize(v)})))),r===x?u.setHTML(x,e):u.setOuterHTML(r,e)}else!function(t,e,n){if("all"===n.getAttribute("data-mce-bogus"))n.parentNode.insertBefore(t.dom.createFragment(e),n);else{var r=n.firstChild,o=n.lastChild;!r||r===o&&"BR"===r.nodeName?t.dom.setHTML(n,e):t.selection.setContent(e)}}(t,e=l.serialize(v),r);!function(t,e){var n=t.schema.getTextInlineElements(),r=t.dom;if(e){var o=t.getBody(),i=Jm(r);ze.each(r.select("*[data-mce-fragment]"),(function(t){if(y(n[t.nodeName.toLowerCase()])&&og(r,t))for(var e=t.parentNode;y(e)&&e!==o&&!ig(r,t,e);e=e.parentNode)if(i.compare(e,t)){r.remove(t,!0);break}}))}}(t,s),function(t,e){var n,r=t.dom,o=t.selection;if(e){o.scrollIntoView(e);var i=td(t.getBody(),e);if("false"===r.getContentEditable(i))return r.remove(e),void o.select(i);var a=r.createRng(),u=e.previousSibling;if(Pn(u)){if(a.setStart(u,u.nodeValue.length),!Se.ie){var c=e.nextSibling;Pn(c)&&(u.appendData(c.data),c.parentNode.removeChild(c))}}else a.setStartBefore(e),a.setEndBefore(e);var s=r.getParent(e,r.isBlock);r.remove(e),s&&r.isEmpty(s)&&(t.$(s).empty(),a.setStart(s,0),a.setEnd(s,0),np(s)||function(t){return!!t.getAttribute("data-mce-fragment")}(s)||!(n=function(e){var n=Tc.fromRangeStart(e);if(n=kl(t.getBody()).next(n))return n.toRange()}(a))?r.add(s,r.create("br",{"data-mce-bogus":"1"})):(a=n,r.remove(s))),o.setRng(a)}}(t,u.get("mce_marker")),h=t.getBody(),ze.each(h.getElementsByTagName("*"),(function(t){t.removeAttribute("data-mce-fragment")})),function(t,e){L.from(t.getParent(e,"td,th")).map(Me.fromDom).each(Sg)}(u,a.getStart()),t.fire("SetContent",d),t.addVisual()}},ip=function(t,e){e(t),t.firstChild&&ip(t.firstChild,e),t.next&&ip(t.next,e)},ap=function(t,e,n){var r=function(t,e,n){var r={},o={},i=[];for(var a in n.firstChild&&ip(n.firstChild,(function(n){q(t,(function(t){t.name===n.name&&(r[t.name]?r[t.name].nodes.push(n):r[t.name]={filter:t,nodes:[n]})})),q(e,(function(t){"string"==typeof n.attr(t.name)&&(o[t.name]?o[t.name].nodes.push(n):o[t.name]={filter:t,nodes:[n]})}))})),r)xt(r,a)&&i.push(r[a]);for(var u in o)xt(o,u)&&i.push(o[u]);return i}(t,e,n);q(r,(function(t){q(t.filter.callbacks,(function(e){e(t.nodes,t.filter.name,{})}))}))},up=function(t){return t instanceof Nm},cp=function(t,e,n){t.dom.setHTML(t.getBody(),e),!0!==n&&function(t){xm(t)&&Rl(t.getBody()).each((function(e){var n=e.getNode(),r=Hn(n)?Rl(n).getOr(e):e;t.selection.setRng(r.toRange())}))}(t)},sp=function(t,e,n){var r=function(t,e){return Mt(Mt({format:"html"},t),{set:!0,content:up(e)?"":e})}(n,e),o=n.no_events?r:t.fire("BeforeSetContent",r);return up(e)||(e=o.content),L.from(t.getBody()).fold(_(e),(function(n){return up(e)?function(t,e,n,r){ap(t.parser.getNodeFilters(),t.parser.getAttributeFilters(),n);var o=tg({validate:t.validate},t.schema).serialize(n);return r.content=yo(Me.fromDom(e))?o:ze.trim(o),cp(t,r.content,r.no_selection),r.no_events||t.fire("SetContent",r),n}(t,n,e,o):function(t,e,n,r){if(0===n.length||/^\s+$/.test(n)){var o='<br data-mce-bogus="1">';"TABLE"===e.nodeName?n="<tr><td>"+o+"</td></tr>":/^(UL|OL)$/.test(e.nodeName)&&(n="<li>"+o+"</li>");var i=ns(t);i&&t.schema.isValidChild(e.nodeName.toLowerCase(),i.toLowerCase())?(n=o,n=t.dom.createHTML(i,rs(t),n)):n||(n='<br data-mce-bogus="1">'),cp(t,n,r.no_selection),t.fire("SetContent",r)}else"raw"!==r.format&&(n=tg({validate:t.validate},t.schema).serialize(t.parser.parse(n,{isRootContent:!0,insert:!0}))),r.content=yo(Me.fromDom(e))?n:ze.trim(n),cp(t,r.content,r.no_selection),r.no_events||t.fire("SetContent",r);return r.content}(t,n,e,o)}))},lp=function(t,e){return function(t,e){var n=t.dom;return n.parentNode?Yr(Me.fromDom(n.parentNode),(function(n){return!Be(t,n)&&e(n)})):L.none()}(t,e).isSome()},fp=function(t){return x(t)?t:A},dp=function(t,e,n){var r=e(t),o=fp(n);return r.orThunk((function(){return o(t)?L.none():function(t,e,n){for(var r=t.dom,o=fp(n);r.parentNode;){r=r.parentNode;var i=Me.fromDom(r),a=e(i);if(a.isSome())return a;if(o(i))break}return L.none()}(t,e,o)}))},mp=cf,gp=function(t,e,n){var r=t.formatter.get(n);if(r)for(var o=0;o<r.length;o++){var i=r[o];if(hf(i)&&!1===i.inherit&&t.dom.is(e,i.selector))return!0}return!1},hp=function(t,e,n,r,o){var i=t.dom.getRoot();return e!==i&&(e=t.dom.getParent(e,(function(e){return!!gp(t,e,n)||(e.parentNode===i||!!bp(t,e,n,r,!0))})),!!bp(t,e,n,r,o))},pp=function(t,e,n){return!!mp(e,n.inline)||(!!mp(e,n.block)||(n.selector?1===e.nodeType&&t.is(e,n.selector):void 0))},vp=function(t,e,n,r,o,i){var a=n[r];if(x(n.onmatch))return n.onmatch(e,n,r);if(a)if(v(a.length)){for(var u in a)if(xt(a,u)){var c="attributes"===r?t.getAttrib(e,u):lf(t,e,u),s=uf(a[u],i),l=b(c)||Wt(c);if(l&&b(s))continue;if(o&&l&&!n.exact)return!1;if((!o||n.exact)&&!mp(c,sf(t,s,u)))return!1}}else for(var f=0;f<a.length;f++)if("attributes"===r?t.getAttrib(e,a[f]):lf(t,e,a[f]))return!0;return!0},bp=function(t,e,n,r,o){var i=t.formatter.get(n),a=t.dom;if(i&&e)for(var u=0;u<i.length;u++){var c=i[u];if(pp(t.dom,e,c)&&vp(a,e,c,"attributes",o,r)&&vp(a,e,c,"styles",o,r)){var s=c.classes;if(s)for(var l=0;l<s.length;l++)if(!t.dom.hasClass(e,uf(s[l],r)))return;return c}}},yp=function(t,e,n,r,o){if(r)return hp(t,r,e,n,o);if(r=t.selection.getNode(),hp(t,r,e,n,o))return!0;var i=t.selection.getStart();return!(i===r||!hp(t,i,e,n,o))},xp=function(t,e){var n=function(e){return Be(e,Me.fromDom(t.getBody()))};return L.from(t.selection.getStart(!0)).bind((function(r){return dp(Me.fromDom(r),(function(n){return st(e,(function(e){return function(e,n){return bp(t,e.dom,n)?L.some(n):L.none()}(n,e)}))}),n)})).getOrNull()},wp=function(t,e,n){return Y(n,(function(n,r){var o=function(t,e){return j(t.formatter.get(e),(function(t){var e=function(t){return t.length>1&&"%"===t.charAt(0)};return j(["styles","attributes"],(function(n){return yt(t,n).exists((function(t){var n=g(t)?t:bt(t);return j(n,e)}))}))}))}(t,r);return t.formatter.matchNode(e,r,{},o)?n.concat([r]):n}),[])},Cp=wo,Sp="_mce_caret",kp=function(t){return function(t){for(var e=[];t;){if(3===t.nodeType&&t.nodeValue!==Cp||t.childNodes.length>1)return[];1===t.nodeType&&e.push(t),t=t.firstChild}return e}(t).length>0},_p=function(t){if(t){var e=new uo(t,t);for(t=e.current();t;t=e.next())if(Pn(t))return t}return null},Op=function(t){var e=Me.fromTag("span");return tr(e,{id:Sp,"data-mce-bogus":"1","data-mce-type":"format-caret"}),t&&gn(e,Me.fromText(Cp)),e},Ep=function(t,e,n){void 0===n&&(n=!0);var r=t.dom,o=t.selection;if(kp(e))hh(t,!1,Me.fromDom(e),n);else{var i=o.getRng(),a=r.getParent(e,r.isBlock),u=i.startContainer,c=i.startOffset,s=i.endContainer,l=i.endOffset,f=function(t){var e=_p(t);return e&&e.nodeValue.charAt(0)===Cp&&e.deleteData(0,1),e}(e);r.remove(e,!0),u===f&&c>0&&i.setStart(f,c-1),s===f&&l>0&&i.setEnd(f,l-1),a&&r.isEmpty(a)&&Cg(Me.fromDom(a)),o.setRng(i)}},zp=function(t,e,n){void 0===n&&(n=!0);var r=t.dom,o=t.selection;if(e)Ep(t,e,n);else if(!(e=Pl(t.getBody(),o.getStart())))for(;e=r.get(Sp);)Ep(t,e,!1)},Tp=function(t,e){return t.appendChild(e),e},Mp=function(t,e){var n=K(t,(function(t,e){return Tp(t,e.cloneNode(!1))}),e);return Tp(n,n.ownerDocument.createTextNode(Cp))},Dp=function(t,e,n,r){var o,i,a,u=t.dom,c=t.selection,s=[],l=c.getRng(),f=l.startContainer,d=l.startOffset;for(i=f,3===f.nodeType&&(d!==f.nodeValue.length&&(o=!0),i=i.parentNode);i;){if(bp(t,i,e,n,r)){a=i;break}i.nextSibling&&(o=!0),s.push(i),i=i.parentNode}if(a)if(o){var m=c.getBookmark();l.collapse(!0);var g=Af(t,l,t.formatter.get(e),!0);g=wd(g),t.formatter.remove(e,n,g,r),c.moveToBookmark(m)}else{var h=Pl(t.getBody(),a),p=Op(!1).dom;!function(t,e,n){var r=t.dom,o=r.getParent(n,z(rf,t));o&&r.isEmpty(o)?n.parentNode.replaceChild(e,n):(wg(Me.fromDom(n)),r.isEmpty(n)?n.parentNode.replaceChild(e,n):r.insertAfter(e,n))}(t,p,null!==h?h:a);var v=function(t,e,n,r,o,i){var a=t.formatter,u=t.dom,c=X(lt(a.get()),(function(t){return t!==r&&!Lt(t,"removeformat")})),s=wp(t,n,c);if(X(s,(function(e){return!mf(t,e,r)})).length>0){var l=n.cloneNode(!1);return u.add(e,l),a.remove(r,o,l,i),u.remove(l),L.some(l)}return L.none()}(t,p,a,e,n,r),b=Mp(s.concat(v.toArray()),p);Ep(t,h,!1),c.setCursorLocation(b,1),u.isEmpty(a)&&u.remove(a)}},Ap=function(t){t.on("mouseup keydown",(function(e){!function(t,e){var n=t.selection,r=t.getBody();zp(t,null,!1),8!==e&&46!==e||!n.isCollapsed()||n.getStart().innerHTML!==Cp||zp(t,Pl(r,n.getStart())),37!==e&&39!==e||zp(t,Pl(r,n.getStart()))}(t,e.keyCode)}))},Np=function(t,e){var n=t.schema.getTextInlineElements();return xt(n,Le(e))&&!Vl(e.dom)&&!Rn(e.dom)},Bp={},Rp=_t,Hp=St;!function(t,e){Bp[t]||(Bp[t]=[]),Bp[t].push(e)}("pre",(function(t){var e,n=t.selection.getRng(),r=An(["pre"]);n.collapsed||(e=t.selection.getSelectedBlocks(),Hp(Rp(Rp(e,r),(function(t){return r(t.previousSibling)&&-1!==Ot(e,t.previousSibling)})),(function(t){var e,n;e=t.previousSibling,su(n=t).remove(),su(e).append("<br><br>").append(n.childNodes)})))}));var Lp=ze.each,Vp=function(t){return Dn(t)&&!Yl(t)&&!Vl(t)&&!Rn(t)},Pp=function(t,e){for(var n=t;n;n=n[e]){if(Pn(n)&&jt(n.data))return t;if(Dn(n)&&!Yl(n))return n}return t},Ip=function(t,e,n){var r=Jm(t);if(e&&n&&(e=Pp(e,"previousSibling"),n=Pp(n,"nextSibling"),r.compare(e,n))){for(var o=e.nextSibling;o&&o!==n;){var i=o;o=o.nextSibling,e.appendChild(i)}return t.remove(n),ze.each(ze.grep(n.childNodes),(function(t){e.appendChild(t)})),e}return n},Fp=function(t,e,n,r){if(r&&!1!==e.merge_siblings){var o=Ip(t,nf(r),r);Ip(t,o,nf(o,!0))}},Up=function(t,e,n){Lp(t.childNodes,(function(t){Vp(t)&&(e(t)&&n(t),t.hasChildNodes()&&Up(t,e,n))}))},jp=function(t,e){return function(n){return!(!n||!lf(t,n,e))}},Wp=function(t,e,n){return function(r){t.setStyle(r,e,n),""===r.getAttribute("style")&&r.removeAttribute("style"),function(t,e){"SPAN"===e.nodeName&&0===t.getAttribs(e).length&&t.remove(e,!0)}(t,r)}},qp=_r([{keep:[]},{rename:["name"]},{removed:[]}]),Gp=/^(src|href|style)$/,$p=ze.each,Xp=cf,Kp=function(t,e,n){return t.isChildOf(e,n)&&e!==n&&!t.isBlock(n)},Yp=function(t,e,n){var r=e[n?"startContainer":"endContainer"],o=e[n?"startOffset":"endOffset"];if(Dn(r)){var i=r.childNodes.length-1;!n&&o&&o--,r=r.childNodes[o>i?i:o]}return Pn(r)&&n&&o>=r.nodeValue.length&&(r=new uo(r,t.getBody()).next()||r),Pn(r)&&!n&&0===o&&(r=new uo(r,t.getBody()).prev()||r),r},Jp=function(t,e){var n=e?"firstChild":"lastChild";if(function(t){return/^(TR|TH|TD)$/.test(t.nodeName)}(t)&&t[n]){var r=t[n];return"TR"===t.nodeName&&r[n]||r}return t},Qp=function(t,e,n,r){var o=t.create(n,r);return e.parentNode.insertBefore(o,e),o.appendChild(e),o},Zp=function(t,e,n,r,o){var i=Me.fromDom(e),a=Me.fromDom(t.create(r,o)),u=n?Je(i):Ye(i);return hn(a,u),n?(fn(i,a),mn(a,i)):(dn(i,a),gn(a,i)),a.dom},tv=function(t,e,n,r){var o=nf(e,n,r);return b(o)||"BR"===o.nodeName||t.isBlock(o)},ev=function(t,e,n){var r,o=e.parentNode,i=t.dom,a=ns(t);gf(n)&&(a?o===i.getRoot()&&(n.list_block&&Xp(e,n.list_block)||q(ct(e.childNodes),(function(e){of(t,a,e.nodeName.toLowerCase())?r?r.appendChild(e):(r=Qp(i,e,a),i.setAttribs(r,t.settings.forced_root_block_attrs)):r=null}))):i.isBlock(e)&&!i.isBlock(o)&&(tv(i,e,!1)||tv(i,e.firstChild,!0,!0)||e.insertBefore(i.create("br"),e.firstChild),tv(i,e,!0)||tv(i,e.lastChild,!1,!0)||e.appendChild(i.create("br")))),function(t){return hf(t)&&pf(t)&&Kn(yt(t,"mixed"),!0)}(n)&&!Xp(n.inline,e)||i.remove(e,!0)},nv=function(t,e,n,r,o){var i,a=t.dom;if(!function(t,e,n){return!(!pf(n)||!Xp(e,n.inline))||!(!gf(n)||!Xp(e,n.block))||(hf(n)?Dn(e)&&t.is(e,n.selector):void 0)}(a,r,e)&&!function(t,e){return e.links&&"A"===t.nodeName}(r,e))return qp.keep();var u=r;if(pf(e)&&"all"===e.remove&&g(e.preserve_attributes)){var c=X(a.getAttribs(u),(function(t){return U(e.preserve_attributes,t.name.toLowerCase())}));if(a.removeAllAttribs(u),q(c,(function(t){return a.setAttrib(u,t.name,t.value)})),c.length>0)return qp.rename("span")}if("all"!==e.remove){$p(e.styles,(function(t,r){t=sf(a,uf(t,n),r+""),w(r)&&(r=t,o=null),(e.remove_similar||!o||Xp(lf(a,o,r),t))&&a.setStyle(u,r,""),i=!0})),i&&""===a.getAttrib(u,"style")&&(u.removeAttribute("style"),u.removeAttribute("data-mce-style")),$p(e.attributes,(function(t,r){var i;if(t=uf(t,n),w(r)&&(r=t,o=null),e.remove_similar||!o||Xp(a.getAttrib(o,r),t)){if("class"===r&&(t=a.getAttrib(u,r))&&(i="",q(t.split(/\s+/),(function(t){/mce\-\w+/.test(t)&&(i+=(i?" ":"")+t)})),i))return void a.setAttrib(u,r,i);if(Gp.test(r)&&u.removeAttribute("data-mce-"+r),"style"===r&&An(["li"])(u)&&"none"===a.getStyle(u,"list-style-type"))return u.removeAttribute(r),void a.setStyle(u,"list-style-type","none");"class"===r&&u.removeAttribute("className"),u.removeAttribute(r)}})),$p(e.classes,(function(t){t=uf(t,n),o&&!a.hasClass(o,t)||a.removeClass(u,t)}));for(var s=a.getAttribs(u),l=0;l<s.length;l++){var f=s[l].nodeName;if(0!==f.indexOf("_")&&0!==f.indexOf("data-"))return qp.keep()}}return"none"!==e.remove?(ev(t,u,e),qp.removed()):qp.keep()},rv=function(t,e,n,r,o){return nv(t,e,n,r,o).fold(A,(function(e){return t.dom.rename(r,e),!0}),N)},ov=function(t,e,n,r){return nv(t,e,n,r,r).fold(_(r),(function(e){return t.dom.createFragment().appendChild(r),t.dom.rename(r,e)}),_(null))},iv=function(t,e,n,r,o){var i=t.formatter.get(e),a=i[0],u=!0,c=t.dom,s=t.selection,l=function(r){var u=function(t,e,n,r,o){var i;return q(df(t.dom,e.parentNode).reverse(),(function(e){if(!i&&"_start"!==e.id&&"_end"!==e.id){var a=bp(t,e,n,r,o);a&&!1!==a.split&&(i=e)}})),i}(t,r,e,n,o);return function(t,e,n,r,o,i,a,u){var c,s,l,f=t.dom;if(n){for(var d=n.parentNode,m=r.parentNode;m&&m!==d;m=m.parentNode){c=f.clone(m,!1);for(var g=0;g<e.length&&null!==(c=ov(t,e[g],u,c));g++);c&&(s&&c.appendChild(s),l||(l=c),s=c)}!i||a.mixed&&f.isBlock(n)||(r=f.split(n,r)),s&&(o.parentNode.insertBefore(s,o),l.appendChild(o),pf(a)&&Fp(f,a,0,s))}return r}(t,i,u,r,r,!0,a,n)},f=function(e){return j(i,(function(r){return rv(t,r,n,e,e)}))},d=function(e){var n=!0,r=!1;Dn(e)&&c.getContentEditable(e)&&(n=u,u="true"===c.getContentEditable(e),r=!0);var o=ct(e.childNodes);if(u&&!r){var s=f(e)||j(i,(function(t){return pp(c,e,t)})),l=e.parentNode;!s&&y(l)&&vf(a)&&f(l)}if(a.deep&&o.length){for(var m=0;m<o.length;m++)d(o[m]);r&&(u=n)}q(["underline","line-through","overline"],(function(n){Dn(e)&&t.dom.getStyle(e,"text-decoration")===n&&e.parentNode&&ff(c,e.parentNode)===n&&rv(t,{deep:!1,exact:!0,inline:"span",styles:{textDecoration:n}},null,e)}))},m=function(t){var e=c.get(t?"_start":"_end"),n=e[t?"firstChild":"lastChild"];return function(t){return Yl(t)&&Dn(t)&&("_start"===t.id||"_end"===t.id)}(n)&&(n=n[t?"firstChild":"lastChild"]),Pn(n)&&0===n.data.length&&(n=t?e.previousSibling||e.nextSibling:e.nextSibling||e.previousSibling),c.remove(e,!0),n},g=function(e){var n,r,o=Af(t,e,i,e.collapsed);if(a.split){if(o=wd(o),(n=Yp(t,o,!0))!==(r=Yp(t,o))){if(n=Jp(n,!0),r=Jp(r,!1),Kp(c,n,r)){var u=L.from(n.firstChild).getOr(n);return l(Zp(c,u,!0,"span",{id:"_start","data-mce-type":"bookmark"})),void m(!0)}if(Kp(c,r,n)){u=L.from(r.lastChild).getOr(r);return l(Zp(c,u,!1,"span",{id:"_end","data-mce-type":"bookmark"})),void m(!1)}n=Qp(c,n,"span",{id:"_start","data-mce-type":"bookmark"}),r=Qp(c,r,"span",{id:"_end","data-mce-type":"bookmark"});var s=c.createRng();s.setStartAfter(n),s.setEndBefore(r),Nf(c,s,(function(t){q(t,(function(t){Yl(t)||Yl(t.parentNode)||l(t)}))})),l(n),l(r),n=m(!0),r=m()}else n=r=l(n);o.startContainer=n.parentNode?n.parentNode:n,o.startOffset=c.nodeIndex(n),o.endContainer=r.parentNode?r.parentNode:r,o.endOffset=c.nodeIndex(r)+1}Nf(c,o,(function(t){q(t,d)}))};if(r){if(tf(r)){var h=c.createRng();h.setStartBefore(r),h.setEndAfter(r),g(h)}else g(r);od(t,e,r,n)}else if("false"!==c.getContentEditable(s.getNode()))s.isCollapsed()&&pf(a)&&!Lf(t).length?Dp(t,e,n,o):(qf(s,!0,(function(){Wf(t,g)})),pf(a)&&yp(t,e,n,s.getStart())&&ef(c,s,s.getRng()),t.nodeChanged()),od(t,e,r,n);else{r=s.getNode();for(var p=0;p<i.length&&(!i[p].ceFalseOverride||!rv(t,i[p],n,r,r));p++);od(t,e,r,n)}},av=ze.each,uv=function(t,e,n,r){av(e,(function(e){pf(e)&&av(t.dom.select(e.inline,r),(function(r){Vp(r)&&rv(t,e,n,r,e.exact?r:null)})),function(t,e,n){if(e.clear_child_styles){var r=e.links?"*:not(a)":"*";Lp(t.select(r,n),(function(n){Vp(n)&&Lp(e.styles,(function(e,r){t.setStyle(n,r,"")}))}))}}(t.dom,e,r)}))},cv=ze.each,sv=function(t){return Dn(t)&&!Yl(t)&&!Vl(t)&&!Rn(t)},lv=function(t,e,n,r){var o=t.formatter.get(e),i=o[0],a=!r&&t.selection.isCollapsed(),u=t.dom,c=t.selection,s=function(t,e){if(void 0===e&&(e=i),x(e.onformat)&&e.onformat(t,e,n,r),cv(e.styles,(function(e,r){u.setStyle(t,r,uf(e,n))})),e.styles){var o=u.getAttrib(t,"style");o&&u.setAttrib(t,"data-mce-style",o)}cv(e.attributes,(function(e,r){u.setAttrib(t,r,uf(e,n))})),cv(e.classes,(function(e){e=uf(e,n),u.hasClass(t,e)||u.addClass(t,e)}))},l=function(t,e){var n=!1;return cv(t,(function(t){return!!hf(t)&&(y(t.collapsed)&&t.collapsed!==a?void 0:u.is(e,t.selector)&&!Vl(e)?(s(e,t),n=!0,!1):void 0)})),n},f=function(t){if(d(t)){var e=u.create(t);return s(e),e}return null},m=function(r,a,u){var c=[],d=!0,m=i.inline||i.block,g=f(m);Nf(r,a,(function(a){var f,h=function(a){var p=!1,v=d,b=a.nodeName.toLowerCase(),x=a.parentNode,w=x.nodeName.toLowerCase();if(Dn(a)&&r.getContentEditable(a)&&(v=d,d="true"===r.getContentEditable(a),p=!0),jn(a)&&!function(t,e,n,r){if(function(t){return t.getParam("format_empty_lines",!1,"boolean")}(t)&&pf(e)){var o=Mt(Mt({},t.schema.getTextBlockElements()),{td:{},th:{},li:{},dt:{},dd:{},figcaption:{},caption:{},details:{},summary:{}}),i=lp(Me.fromDom(n),(function(t){return Vl(t.dom)}));return wt(o,r)&&ei(Me.fromDom(n.parentNode),!1)&&!i}return!1}(t,i,a,w))return f=null,void(gf(i)&&r.remove(a));if(gf(i)&&i.wrapper&&bp(t,a,e,n))f=null;else{if(d&&!p&&gf(i)&&!i.wrapper&&rf(t,b)&&of(t,w,m)){var C=r.rename(a,m);return s(C),c.push(C),void(f=null)}if(hf(i)){var S=l(o,a);if(!S&&y(x)&&vf(i)&&(S=l(o,x)),!pf(i)||S)return void(f=null)}!d||p||!of(t,m,b)||!of(t,w,m)||!u&&Pn(a)&&Co(a.data)||Vl(a)||pf(i)&&r.isBlock(a)?(f=null,q(ct(a.childNodes),h),p&&(d=v),f=null):(f||(f=r.clone(g,!1),a.parentNode.insertBefore(f,a),c.push(f)),f.appendChild(a))}};q(a,h)})),!0===i.links&&q(c,(function(t){var e=function(t){"A"===t.nodeName&&s(t,i),q(ct(t.childNodes),e)};e(t)})),q(c,(function(a){var u=function(t){var e=0;return q(t.childNodes,(function(t){(function(t){return y(t)&&Pn(t)&&0===t.length})(t)||Yl(t)||e++})),e}(a);!(c.length>1)&&r.isBlock(a)||0!==u?(pf(i)||gf(i)&&i.wrapper)&&(i.exact||1!==u||(a=function(t){return Q(t.childNodes,sv).filter((function(t){return pp(r,t,i)})).map((function(e){var n=r.clone(e,!1);return s(n),r.replace(n,t,!0),r.remove(e,!0),n})).getOr(t)}(a)),uv(t,o,n,a),function(t,e,n,r,o){bp(t,o.parentNode,n,r)&&rv(t,e,r,o)||e.merge_with_parents&&t.dom.getParent(o.parentNode,(function(i){if(bp(t,i,n,r))return rv(t,e,r,o),!0}))}(t,i,e,n,a),function(t,e,n,r){e.styles&&e.styles.backgroundColor&&Up(r,jp(t,"fontSize"),Wp(t,"backgroundColor",uf(e.styles.backgroundColor,n)))}(r,i,n,a),function(t,e,n,r){var o=function(e){if(1===e.nodeType&&e.parentNode&&1===e.parentNode.nodeType){var n=ff(t,e.parentNode);t.getStyle(e,"color")&&n?t.setStyle(e,"text-decoration",n):t.getStyle(e,"text-decoration")===n&&t.setStyle(e,"text-decoration",null)}};e.styles&&(e.styles.color||e.styles.textDecoration)&&(ze.walk(r,o,"childNodes"),o(r))}(r,i,0,a),function(t,e,n,r){!pf(e)||"sub"!==e.inline&&"sup"!==e.inline||(Up(r,jp(t,"fontSize"),Wp(t,"fontSize","")),t.remove(t.select("sup"===e.inline?"sub":"sup",r),!0))}(r,i,0,a),Fp(r,i,0,a)):r.remove(a,!0)}))};if("false"!==u.getContentEditable(c.getNode())){if(i){if(r)if(tf(r)){if(!l(o,r)){var g=u.createRng();g.setStartBefore(r),g.setEndAfter(r),m(u,Af(t,g,o),!0)}}else m(u,r,!0);else if(a&&pf(i)&&!Lf(t).length)!function(t,e,n){var r,o,i=t.selection,a=i.getRng(),u=a.startOffset,c=a.startContainer.nodeValue;(r=Pl(t.getBody(),i.getStart()))&&(o=_p(r));var s,l,f=/[^\s\u00a0\u00ad\u200b\ufeff]/;if(c&&u>0&&u<c.length&&f.test(c.charAt(u))&&f.test(c.charAt(u-1))){var d=i.getBookmark();a.collapse(!0);var m=Af(t,a,t.formatter.get(e));m=wd(m),t.formatter.apply(e,n,m),i.moveToBookmark(d)}else r&&o.nodeValue===Cp||(s=t.getDoc(),l=Op(!0).dom,o=(r=s.importNode(l,!0)).firstChild,a.insertNode(r),u=1),t.formatter.apply(e,n,r),i.setCursorLocation(o,u)}(t,e,n);else{var h=c.getNode(),p=o[0];t.settings.forced_root_block||!p.defaultBlock||u.getParent(h,u.isBlock)||lv(t,p.defaultBlock),c.setRng($h(c.getRng())),qf(c,!0,(function(){Wf(t,(function(e,n){var r=n?e:Af(t,e,o);m(u,r,!1)}))})),ef(u,c,c.getRng()),t.nodeChanged()}!function(t,e){Hp(Bp[t],(function(t){t(e)}))}(e,t)}rd(t,e,r,n)}else{r=c.getNode();for(var v=0,b=o.length;v<b;v++){var w=o[v];if(w.ceFalseOverride&&hf(w)&&u.is(r,w.selector)){s(r,w);break}}rd(t,e,r,n)}},fv=function(t){return xt(t,"vars")},dv=function(t){return t.selection.getStart()},mv=function(t,e,n,r,o){return J(e,(function(e){var i=t.formatter.matchNode(e,n,null!=o?o:{},r);return!v(i)}),(function(e){return!!gp(t,e,n)||!r&&y(t.formatter.matchNode(e,n,o,!0))}))},gv=function(t,e){var n=null!=e?e:dv(t);return X(df(t.dom,n),(function(t){return Dn(t)&&!Rn(t)}))},hv=function(t,e,n){var r=gv(t,e);dt(n,(function(n,o){var i=function(n){var i=mv(t,r,o,n.similar,fv(n)?n.vars:void 0),a=i.isSome();if(n.state.get()!==a){n.state.set(a);var u=i.getOr(e);fv(n)?n.callback(a,{node:u,format:o,parents:r}):q(n.callbacks,(function(t){return t(a,{node:u,format:o,parents:r})}))}};q([n.withSimilar,n.withoutSimilar],i),q(n.withVars,i)}))},pv=function(t,e,n,r,o,i){return null===e.get()&&function(t,e){t.set({}),e.on("NodeChange",(function(n){hv(e,n.element,t.get())})),e.on("FormatApply FormatRemove",(function(n){var r=L.from(n.node).map((function(t){return tf(t)?t:t.startContainer})).bind((function(t){return Dn(t)?L.some(t):L.from(t.parentElement)})).getOrThunk((function(){return dv(e)}));hv(e,r,t.get())}))}(e,t),function(t,e,n,r,o,i){var a=e.get();q(n.split(","),(function(e){var n=yt(a,e).getOrThunk((function(){var t={withSimilar:{state:wu(!1),similar:!0,callbacks:[]},withoutSimilar:{state:wu(!1),similar:!1,callbacks:[]},withVars:[]};return a[e]=t,t})),u=function(){var n=gv(t);return mv(t,n,e,o,i).isSome()};if(v(i)){var c=o?n.withSimilar:n.withoutSimilar;c.callbacks.push(r),1===c.callbacks.length&&c.state.set(u())}else n.withVars.push({state:wu(u()),similar:o,vars:i,callback:r})})),e.set(a)}(t,e,n,r,o,i),{unbind:function(){return function(t,e,n){var r=t.get();q(e.split(","),(function(t){return yt(r,t).each((function(e){r[t]={withSimilar:Mt(Mt({},e.withSimilar),{callbacks:X(e.withSimilar.callbacks,(function(t){return t!==n}))}),withoutSimilar:Mt(Mt({},e.withoutSimilar),{callbacks:X(e.withoutSimilar.callbacks,(function(t){return t!==n}))}),withVars:X(e.withVars,(function(t){return t.callback!==n}))}}))})),t.set(r)}(e,n,r)}}},vv=function(t,e){var n=(e||document).createDocumentFragment();return q(t,(function(t){n.appendChild(t.dom)})),Me.fromDom(n)},bv=function(t,e,n){return{element:t,width:e,rows:n}},yv=function(t,e){return{element:t,cells:e}},xv=function(t,e){return{x:t,y:e}},wv=function(t,e){var n=parseInt(er(t,e),10);return isNaN(n)?1:n},Cv=function(t,e,n){var r=t.rows;return!!(r[n]?r[n].cells:[])[e]},Sv=function(t){return Y(t,(function(t,e){return e.cells.length>t?e.cells.length:t}),0)},kv=function(t,e){for(var n=t.rows,r=0;r<n.length;r++)for(var o=n[r].cells,i=0;i<o.length;i++)if(Be(o[i],e))return L.some(xv(i,r));return L.none()},_v=function(t,e,n,r,o){for(var i=[],a=t.rows,u=n;u<=o;u++){var c=a[u].cells,s=e<r?c.slice(e,r+1):c.slice(r,e+1);i.push(yv(a[u].element,s))}return i},Ov=function(t){var e=bv(Yu(t),0,[]);return q(Vu(t,"tr"),(function(t,n){q(Vu(t,"td,th"),(function(r,o){!function(t,e,n,r,o){for(var i=wv(o,"rowspan"),a=wv(o,"colspan"),u=t.rows,c=n;c<n+i;c++){u[c]||(u[c]=yv(Ju(r),[]));for(var s=e;s<e+a;s++)u[c].cells[s]=c===n&&s===e?o:Yu(o)}}(e,function(t,e,n){for(;Cv(t,e,n);)e++;return e}(e,o,n),n,t,r)}))})),bv(e.element,Sv(e.rows),e.rows)},Ev=function(t){return function(t,e){var n=Yu(t.element),r=Me.fromTag("tbody");return hn(r,e),gn(n,r),n}(t,function(t){return W(t.rows,(function(t){var e=W(t.cells,(function(t){var e=Ju(t);return rr(e,"colspan"),rr(e,"rowspan"),e})),n=Yu(t.element);return hn(n,e),n}))}(t))},zv=function(t,e,n){return kv(t,e).bind((function(e){return kv(t,n).map((function(n){return function(t,e,n){var r=e.x,o=e.y,i=n.x,a=n.y,u=o<a?_v(t,r,o,i,a):_v(t,r,a,i,o);return bv(t.element,Sv(u),u)}(t,e,n)}))}))},Tv=function(t,e){return Q(t,(function(t){return"li"===Le(t)&&Ff(t,e)})).fold(_([]),(function(e){return function(t){return Q(t,(function(t){return"ul"===Le(t)||"ol"===Le(t)}))}(t).map((function(t){var e=Me.fromTag(Le(t)),n=vt(cr(t),(function(t,e){return Vt(e,"list-style")}));return or(e,n),[Me.fromTag("li"),e]})).getOr([])}))},Mv=function(t,e){var n=Me.fromDom(e.commonAncestorContainer),r=Og(n,t),o=X(r,(function(t){return fo(t)||so(t)})),i=Tv(r,e),a=o.concat(i.length?i:function(t){return po(t)?$e(t).filter(ho).fold(_([]),(function(e){return[t,e]})):ho(t)?[t]:[]}(n));return W(a,Yu)},Dv=function(){return vv([])},Av=function(t,e){return n=Me.fromDom(e.cloneContents()),r=Mv(t,e),o=Y(r,(function(t,e){return gn(e,t),e}),n),r.length>0?vv([o]):o;var n,r,o},Nv=function(t,e){return(n=t,r=e[0],Jr(r,"table",z(Be,n))).bind((function(t){var n=e[0],r=e[e.length-1],o=Ov(t);return zv(o,n,r).map((function(t){return vv([Ev(t)])}))})).getOrThunk(Dv);var n,r},Bv=function(t,e){var n=Hf(e,t);return n.length>0?Nv(t,n):function(t,e){return e.length>0&&e[0].collapsed?Dv():Av(t,e[0])}(t,e)},Rv=function(t,e){return e>=0&&e<t.length&&Ql(t.charAt(e))},Hv=function(t,e){var n=So(t.innerText);return e?function(t){return t.replace(/^[ \f\n\r\t\v]+/,"")}(n):n},Lv=function(t,e,n){void 0===n&&(n={});var r=function(t,e){return Mt(Mt({},t),{format:e,get:!0,selection:!0})}(n,e),o=t.fire("BeforeGetContent",r);if(o.isDefaultPrevented())return t.fire("GetContent",o),o.content;if("text"===o.format)return function(t){return L.from(t.selection.getRng()).map((function(e){var n=L.from(t.dom.getParent(e.commonAncestorContainer,t.dom.isBlock)),r=t.getBody(),o=function(t){return t.map((function(t){return t.nodeName})).getOr("div").toLowerCase()}(n),i=Se.browser.isIE()&&"pre"!==o,a=t.dom.add(r,o,{"data-mce-bogus":"all",style:"overflow: hidden; opacity: 0;"},e.cloneContents()),u=Hv(a,i),c=So(a.textContent);if(t.dom.remove(a),Rv(c,0)||Rv(c,c.length-1)){var s=n.getOr(r),l=Hv(s,i),f=l.indexOf(u);return-1===f?u:(Rv(l,f-1)?" ":"")+u+(Rv(l,f+u.length)?" ":"")}return u})).getOr("")}(t);o.getInner=!0;var i=function(t,e){var n=t.selection.getRng(),r=t.dom.create("body"),o=t.selection.getSel(),i=zm(t,Bf(o)),a=e.contextual?Bv(Me.fromDom(t.getBody()),i).dom:n.cloneContents();return a&&r.appendChild(a),t.selection.serializer.serialize(r,e)}(t,o);return"tree"===o.format?i:(o.content=t.selection.isCollapsed()?"":i,t.fire("GetContent",o),o.content)},Vv=function(t){return Dn(t)?t.outerHTML:Pn(t)?yi.encodeRaw(t.data,!1):In(t)?"\x3c!--"+t.data+"--\x3e":""},Pv=function(t,e,n){var r=function(t){var e,n=document.createElement("div"),r=document.createDocumentFragment();for(t&&(n.innerHTML=t);e=n.firstChild;)r.appendChild(e);return r}(e);if(t.hasChildNodes()&&n<t.childNodes.length){var o=t.childNodes[n];o.parentNode.insertBefore(r,o)}else t.appendChild(r)},Iv=function(t,e){var n,r,o,i,a,u,c,s,l,f=W(ct(e.childNodes),Vv);return function(t,e){var n=0;q(t,(function(t){0===t[0]?n++:1===t[0]?(Pv(e,t[1],n),n++):2===t[0]&&function(t,e){if(t.hasChildNodes()&&e<t.childNodes.length){var n=t.childNodes[e];n.parentNode.removeChild(n)}}(e,n)}))}((r=t,o=(n=f).length+r.length+2,i=new Array(o),a=new Array(o),u=function(t,e,o,i,a){var c=s(t,e,o,i);if(null===c||c.start===e&&c.diag===e-i||c.end===t&&c.diag===t-o)for(var l=t,f=o;l<e||f<i;)l<e&&f<i&&n[l]===r[f]?(a.push([0,n[l]]),++l,++f):e-t>i-o?(a.push([2,n[l]]),++l):(a.push([1,r[f]]),++f);else{u(t,c.start,o,c.start-c.diag,a);for(var d=c.start;d<c.end;++d)a.push([0,n[d]]);u(c.end,e,c.end-c.diag,i,a)}},c=function(t,e,o,i){for(var a=t;a-e<i&&a<o&&n[a]===r[a-e];)++a;return function(t,e,n){return{start:t,end:e,diag:n}}(t,a,e)},s=function(t,e,o,u){var s=e-t,l=u-o;if(0===s||0===l)return null;var f,d,m,g,h,p=s-l,v=l+s,b=(v%2==0?v:v+1)/2;for(i[1+b]=t,a[1+b]=e+1,f=0;f<=b;++f){for(d=-f;d<=f;d+=2){for(m=d+b,d===-f||d!==f&&i[m-1]<i[m+1]?i[m]=i[m+1]:i[m]=i[m-1]+1,h=(g=i[m])-t+o-d;g<e&&h<u&&n[g]===r[h];)i[m]=++g,++h;if(p%2!=0&&p-f<=d&&d<=p+f&&a[m-p]<=i[m])return c(a[m-p],d+t-o,e,u)}for(d=p-f;d<=p+f;d+=2){for(m=d+b-p,d===p-f||d!==p+f&&a[m+1]<=a[m-1]?a[m]=a[m+1]-1:a[m]=a[m-1],h=(g=a[m]-1)-t+o-d;g>=t&&h>=o&&n[g]===r[h];)a[m]=g--,h--;if(p%2==0&&-f<=d&&d<=f&&a[m]<=i[m+p])return c(a[m],d+t-o,e,u)}}},l=[],u(0,n.length,0,r.length,l),l),e),e},Fv=At((function(){return document.implementation.createHTMLDocument("undo")})),Uv=function(t){var e,n=(e=t.getBody(),X(W(ct(e.childNodes),Vv),(function(t){return t.length>0}))),r=tt(n,(function(e){var n=$m(t.serializer,e);return n.length>0?[n]:[]})),o=r.join("");return-1!==o.indexOf("</iframe>")?function(t){return{type:"fragmented",fragments:t,content:"",bookmark:null,beforeBookmark:null}}(r):function(t){return{type:"complete",fragments:null,content:t,bookmark:null,beforeBookmark:null}}(o)},jv=function(t,e,n){var r=n?e.beforeBookmark:e.bookmark;"fragmented"===e.type?Iv(e.fragments,t.getBody()):t.setContent(e.content,{format:"raw",no_selection:!y(r)||!Il(r)||!r.isFakeCaret}),t.selection.moveToBookmark(r)},Wv=function(t){return"fragmented"===t.type?t.fragments.join(""):t.content},qv=function(t){var e=Me.fromTag("body",Fv());return Xu(e,Wv(t)),q(Vu(e,"*[data-mce-bogus]"),bn),e.dom.innerHTML},Gv=function(t,e){return!(!t||!e)&&(!!function(t,e){return Wv(t)===Wv(e)}(t,e)||function(t,e){return qv(t)===qv(e)}(t,e))},$v=function(t){return 0===t.get()},Xv=function(t,e,n){$v(n)&&(t.typing=e)},Kv=function(t,e){t.typing&&(Xv(t,!1,e),t.add())},Yv=function(t){return{undoManager:{beforeChange:function(e,n){return function(t,e,n){$v(e)&&n.set(Qc(t.selection))}(t,e,n)},add:function(e,n,r,o,i,a){return function(t,e,n,r,o,i,a){var u=Uv(t);if(i=i||{},i=ze.extend(i,u),!1===$v(r)||t.removed)return null;var c=e.data[n.get()];if(t.fire("BeforeAddUndo",{level:i,lastLevel:c,originalEvent:a}).isDefaultPrevented())return null;if(c&&Gv(c,i))return null;e.data[n.get()]&&o.get().each((function(t){e.data[n.get()].beforeBookmark=t}));var s=function(t){return t.getParam("custom_undo_redo_levels",0,"number")}(t);if(s&&e.data.length>s){for(var l=0;l<e.data.length-1;l++)e.data[l]=e.data[l+1];e.data.length--,n.set(e.data.length)}i.bookmark=Qc(t.selection),n.get()<e.data.length-1&&(e.data.length=n.get()+1),e.data.push(i),n.set(e.data.length-1);var f={level:i,lastLevel:c,originalEvent:a};return n.get()>0?(t.setDirty(!0),t.fire("AddUndo",f),t.fire("change",f)):t.fire("AddUndo",f),i}(t,e,n,r,o,i,a)},undo:function(e,n,r){return function(t,e,n,r){var o;return e.typing&&(e.add(),e.typing=!1,Xv(e,!1,n)),r.get()>0&&(r.set(r.get()-1),o=e.data[r.get()],jv(t,o,!0),t.setDirty(!0),t.fire("Undo",{level:o})),o}(t,e,n,r)},redo:function(e,n){return function(t,e,n){var r;return e.get()<n.length-1&&(e.set(e.get()+1),r=n[e.get()],jv(t,r,!1),t.setDirty(!0),t.fire("Redo",{level:r})),r}(t,e,n)},clear:function(e,n){return function(t,e,n){e.data=[],n.set(0),e.typing=!1,t.fire("ClearUndos")}(t,e,n)},reset:function(t){return function(t){t.clear(),t.add()}(t)},hasUndo:function(e,n){return function(t,e,n){return n.get()>0||e.typing&&e.data[0]&&!Gv(Uv(t),e.data[0])}(t,e,n)},hasRedo:function(t,e){return function(t,e){return e.get()<t.data.length-1&&!t.typing}(t,e)},transact:function(t,e,n){return function(t,e,n){return Kv(t,e),t.beforeChange(),t.ignore(n),t.add()}(t,e,n)},ignore:function(t,e){return function(t,e){try{t.set(t.get()+1),e()}finally{t.set(t.get()-1)}}(t,e)},extra:function(e,n,r,o){return function(t,e,n,r,o){if(e.transact(r)){var i=e.data[n.get()].bookmark,a=e.data[n.get()-1];jv(t,a,!0),e.transact(o)&&(e.data[n.get()-1].beforeBookmark=i)}}(t,e,n,r,o)}},formatter:{match:function(e,n,r,o){return yp(t,e,n,r,o)},matchAll:function(e,n){return function(t,e,n){var r=[],o={},i=t.selection.getStart();return t.dom.getParent(i,(function(i){for(var a=0;a<e.length;a++){var u=e[a];!o[u]&&bp(t,i,u,n)&&(o[u]=!0,r.push(u))}}),t.dom.getRoot()),r}(t,e,n)},matchNode:function(e,n,r,o){return bp(t,e,n,r,o)},canApply:function(e){return function(t,e){var n=t.formatter.get(e),r=t.dom;if(n)for(var o=t.selection.getStart(),i=df(r,o),a=n.length-1;a>=0;a--){var u=n[a];if(!hf(u)||y(u.defaultBlock))return!0;for(var c=i.length-1;c>=0;c--)if(r.is(i[c],u.selector))return!0}return!1}(t,e)},closest:function(e){return xp(t,e)},apply:function(e,n,r){return lv(t,e,n,r)},remove:function(e,n,r,o){return iv(t,e,n,r,o)},toggle:function(e,n,r){return function(t,e,n,r){var o=t.formatter.get(e);!yp(t,e,n,r)||"toggle"in o[0]&&!o[0].toggle?lv(t,e,n,r):iv(t,e,n,r)}(t,e,n,r)},formatChanged:function(e,n,r,o,i){return pv(t,e,n,r,o,i)}},editor:{getContent:function(e,n){return function(t,e,n){return L.from(t.getBody()).fold(_("tree"===e.format?new Nm("body",11):""),(function(r){return Km(t,e,n,r)}))}(t,e,n)},setContent:function(e,n){return sp(t,e,n)},insertContent:function(e,n){return op(t,e,n)},addVisual:function(e){return function(t,e){var n=t.dom,r=y(e)?e:t.getBody();v(t.hasVisual)&&(t.hasVisual=function(t){return t.getParam("visual",!0,"boolean")}(t)),q(n.select("table,a",r),(function(e){switch(e.nodeName){case"TABLE":var r=function(t){return t.getParam("visual_table_class","mce-item-table","string")}(t),o=n.getAttrib(e,"border");o&&"0"!==o||!t.hasVisual?n.removeClass(e,r):n.addClass(e,r);break;case"A":if(!n.getAttrib(e,"href")){var i=n.getAttrib(e,"name")||e.id,a=function(t){return t.getParam("visual_anchor_class","mce-item-anchor","string")}(t);i&&t.hasVisual?n.addClass(e,a):n.removeClass(e,a)}}})),t.fire("VisualAid",{element:e,hasVisual:t.hasVisual})}(t,e)}},selection:{getContent:function(e,n){return Lv(t,e,n)}},raw:{getModel:function(){return L.none()}}}},Jv=function(t){return xt(t.plugins,"rtc")},Qv=function(t){var e=t;return function(t){return yt(t.plugins,"rtc").bind((function(t){return L.from(t.setup)}))}(t).fold((function(){return e.rtcInstance=Yv(t),L.none()}),(function(t){return e.rtcInstance=function(){var t=_(null),e=_("");return{undoManager:{beforeChange:C,add:t,undo:t,redo:t,clear:C,reset:C,hasUndo:A,hasRedo:A,transact:t,ignore:C,extra:C},formatter:{match:A,matchAll:_([]),matchNode:_(void 0),canApply:A,closest:e,apply:C,remove:C,toggle:C,formatChanged:_({unbind:C})},editor:{getContent:e,setContent:e,insertContent:C,addVisual:C},selection:{getContent:e},raw:{getModel:_(L.none())}}}(),L.some((function(){return t().then((function(t){return e.rtcInstance=function(t){var e=function(t){return m(t)?t:{}},n=t.undoManager,r=t.formatter,o=t.editor,i=t.selection,a=t.raw;return{undoManager:{beforeChange:n.beforeChange,add:n.add,undo:n.undo,redo:n.redo,clear:n.clear,reset:n.reset,hasUndo:n.hasUndo,hasRedo:n.hasRedo,transact:function(t,e,r){return n.transact(r)},ignore:function(t,e){return n.ignore(e)},extra:function(t,e,r,o){return n.extra(r,o)}},formatter:{match:function(t,n,o,i){return r.match(t,e(n),i)},matchAll:r.matchAll,matchNode:r.matchNode,canApply:function(t){return r.canApply(t)},closest:function(t){return r.closest(t)},apply:function(t,n,o){return r.apply(t,e(n))},remove:function(t,n,o,i){return r.remove(t,e(n))},toggle:function(t,n,o){return r.toggle(t,e(n))},formatChanged:function(t,e,n,o,i){return r.formatChanged(e,n,o,i)}},editor:{getContent:function(t,e){return o.getContent(t)},setContent:function(t,e){return o.setContent(t,e)},insertContent:function(t,e){return o.insertContent(t)},addVisual:o.addVisual},selection:{getContent:function(t,e){return i.getContent(e)}},raw:{getModel:function(){return L.some(a.getRawModel())}}}}(t),t.rtc.isRemote}))}))}))},Zv=function(t){return t.rtcInstance?t.rtcInstance:Yv(t)},tb=function(t){var e=t.rtcInstance;if(e)return e;throw new Error("Failed to get RTC instance not yet initialized.")},eb=function(t,e){return void 0===e&&(e={}),function(t,e,n){return tb(t).selection.getContent(e,n)}(t,e.format?e.format:"html",e)},nb=function(t){return 0===t.dom.length?(vn(t),L.none()):L.some(t)},rb=function(t,e,n,r){t.bind((function(t){return(r?rh:nh)(t.dom,r?t.dom.length:0),e.filter(Fe).map((function(e){return function(t,e,n,r){var o=t.dom,i=e.dom,a=r?o.length:i.length;r?(oh(o,i,!1,!r),n.setStart(i,a)):(oh(i,o,!1,!r),n.setEnd(i,a))}(t,e,n,r)}))})).orThunk((function(){return function(t,e){return t.filter((function(t){return Zf.isBookmarkNode(t.dom)})).bind(e?Ke:Xe)}(e,r).or(e).filter(Fe).map((function(t){return function(t,e){$e(t).each((function(n){var r=t.dom;e&&$g(n,Tc(r,0))?nh(r,0):!e&&Xg(n,Tc(r,r.length))&&rh(r,r.length)}))}(t,r)}))}))},ob=function(t,e,n){void 0===n&&(n={});var r=function(t,e){return Mt(Mt({format:"html"},t),{set:!0,selection:!0,content:e})}(n,e),o=r;if(!r.no_events){var i=t.fire("BeforeSetContent",r);if(i.isDefaultPrevented())return void t.fire("SetContent",i);o=i}o.content=function(t,e){if("raw"!==e.format){var n=t.selection.getRng(),r=t.dom.getParent(n.commonAncestorContainer,t.dom.isBlock),o=r?{context:r.nodeName.toLowerCase()}:{},i=t.parser.parse(e.content,Mt(Mt({isRootContent:!0,forced_root_block:!1},o),e));return tg({validate:t.validate},t.schema).serialize(i)}return e.content}(t,o);var a=t.selection.getRng();!function(t,e){var n=L.from(e.firstChild).map(Me.fromDom),r=L.from(e.lastChild).map(Me.fromDom);t.deleteContents(),t.insertNode(e);var o=n.bind(Xe).filter(Fe).bind(nb),i=r.bind(Ke).filter(Fe).bind(nb);rb(o,n,t,!0),rb(i,r,t,!1),t.collapse(!1)}(a,a.createContextualFragment(o.content)),t.selection.setRng(a),Wd(t,a),o.no_events||t.fire("SetContent",o)},ib=function(t,e,n){if(t&&xt(t,e)){var r=X(t[e],(function(t){return t!==n}));0===r.length?delete t[e]:t[e]=r}};var ab,ub,cb=function(t){return!!t.select},sb=function(t){return!(!t||!t.ownerDocument)&&He(Me.fromDom(t.ownerDocument),Me.fromDom(t))},lb=function(t,e,n,r){var o,i,a=function(t,e){var n,r,o=function(e,n){return Q(n,(function(n){return t.is(n,e)}))},i=function(e){return t.getParents(e,null,t.getRoot())};return{selectorChangedWithUnbind:function(t,a){return n||(n={},r={},e.on("NodeChange",(function(t){var e=t.element,a=i(e),u={};ze.each(n,(function(t,e){o(e,a).each((function(n){r[e]||(q(t,(function(t){t(!0,{node:n,selector:e,parents:a})})),r[e]=t),u[e]=t}))})),ze.each(r,(function(t,n){u[n]||(delete r[n],ze.each(t,(function(t){t(!1,{node:e,selector:n,parents:a})})))}))}))),n[t]||(n[t]=[]),n[t].push(a),o(t,i(e.selection.getStart())).each((function(){r[t]=n[t]})),{unbind:function(){ib(n,t,a),ib(r,t,a)}}}}}(t,r).selectorChangedWithUnbind,u=function(t,e){return ob(r,t,e)},c=function(t){var e=l();e.collapse(!!t),f(e)},s=function(){return e.getSelection?e.getSelection():e.document.selection},l=function(){var n,a,u,c=function(t,e,n){try{return e.compareBoundaryPoints(t,n)}catch(t){return-1}},l=e.document;if(void 0!==r.bookmark&&!1===xm(r)){var f=cm(r);if(f.isSome())return f.map((function(t){return zm(r,[t])[0]})).getOr(l.createRange())}try{(n=s())&&!Mn(n.anchorNode)&&(a=n.rangeCount>0?n.getRangeAt(0):n.createRange?n.createRange():l.createRange(),a=zm(r,[a])[0])}catch(t){}return a||(a=l.createRange?l.createRange():l.body.createTextRange()),a.setStart&&9===a.startContainer.nodeType&&a.collapsed&&(u=t.getRoot(),a.setStart(u,0),a.setEnd(u,0)),o&&i&&(0===c(a.START_TO_START,a,o)&&0===c(a.END_TO_END,a,o)?a=i:(o=null,i=null)),a},f=function(t,e){var n;if(function(t){return!!t&&(!!cb(t)||sb(t.startContainer)&&sb(t.endContainer))}(t)){var a=cb(t)?t:null;if(a){i=null;try{a.select()}catch(t){}}else{var u=s();if(t=r.fire("SetSelectionRange",{range:t,forward:e}).range,u){i=t;try{u.removeAllRanges(),u.addRange(t)}catch(t){}!1===e&&u.extend&&(u.collapse(t.endContainer,t.endOffset),u.extend(t.startContainer,t.startOffset)),o=u.rangeCount>0?u.getRangeAt(0):null}t.collapsed||t.startContainer!==t.endContainer||!u.setBaseAndExtent||Se.ie||t.endOffset-t.startOffset<2&&t.startContainer.hasChildNodes()&&(n=t.startContainer.childNodes[t.startOffset])&&"IMG"===n.tagName&&(u.setBaseAndExtent(t.startContainer,t.startOffset,t.endContainer,t.endOffset),u.anchorNode===t.startContainer&&u.focusNode===t.endContainer||u.setBaseAndExtent(n,0,n,1)),r.fire("AfterSetSelectionRange",{range:t,forward:e})}}},d=function(){var e=s(),n=null==e?void 0:e.anchorNode,r=null==e?void 0:e.focusNode;if(!e||!n||!r||Mn(n)||Mn(r))return!0;var o=t.createRng();o.setStart(n,e.anchorOffset),o.collapse(!0);var i=t.createRng();return i.setStart(r,e.focusOffset),i.collapse(!0),o.compareBoundaryPoints(o.START_TO_START,i)<=0},m={bookmarkManager:null,controlSelection:null,dom:t,win:e,serializer:n,editor:r,collapse:c,setCursorLocation:function(e,n){var o=t.createRng();y(e)&&y(n)?(o.setStart(e,n),o.setEnd(e,n),f(o),c(!1)):(Uf(t,o,r.getBody(),!0),f(o))},getContent:function(t){return eb(r,t)},setContent:u,getBookmark:function(t,e){return g.getBookmark(t,e)},moveToBookmark:function(t){return g.moveToBookmark(t)},select:function(e,n){return function(t,e,n){return L.from(e).map((function(e){var r=t.nodeIndex(e),o=t.createRng();return o.setStart(e.parentNode,r),o.setEnd(e.parentNode,r+1),n&&(Uf(t,o,e,!0),Uf(t,o,e,!1)),o}))}(t,e,n).each(f),e},isCollapsed:function(){var t=l(),e=s();return!(!t||t.item)&&(t.compareEndPoints?0===t.compareEndPoints("StartToEnd",t):!e||t.collapsed)},isForward:d,setNode:function(e){return u(t.getOuterHTML(e)),e},getNode:function(){return function(t,e){var n,r,o;if(!e)return t;r=e.startContainer,o=e.endContainer;var i=e.startOffset,a=e.endOffset;return n=e.commonAncestorContainer,!e.collapsed&&(r===o&&a-i<2&&r.hasChildNodes()&&(n=r.childNodes[i]),3===r.nodeType&&3===o.nodeType&&(r=r.length===i?Em(r.nextSibling,!0):r.parentNode,o=0===a?Em(o.previousSibling,!1):o.parentNode,r&&r===o))?r:n&&3===n.nodeType?n.parentNode:n}(r.getBody(),l())},getSel:s,setRng:f,getRng:l,getStart:function(t){return _m(r.getBody(),l(),t)},getEnd:function(t){return Om(r.getBody(),l(),t)},getSelectedBlocks:function(e,n){return function(t,e,n,r){var o,i=[],a=t.getRoot();if(n=t.getParent(n||_m(a,e,e.collapsed),t.isBlock),r=t.getParent(r||Om(a,e,e.collapsed),t.isBlock),n&&n!==a&&i.push(n),n&&r&&n!==r){o=n;for(var u=new uo(n,a);(o=u.next())&&o!==r;)t.isBlock(o)&&i.push(o)}return r&&n!==r&&r!==a&&i.push(r),i}(t,l(),e,n)},normalize:function(){var e=l(),n=s();if(!(Bf(n).length>1)&&jf(r)){var o=yd(t,e);return o.each((function(t){f(t,d())})),o.getOr(e)}return e},selectorChanged:function(t,e){return a(t,e),m},selectorChangedWithUnbind:a,getScrollContainer:function(){for(var e,n=t.getRoot();n&&"BODY"!==n.nodeName;){if(n.scrollHeight>n.clientHeight){e=n;break}n=n.parentNode}return e},scrollIntoView:function(t,e){y(t)?function(t,e,n){(t.inline?Fd:jd)(t,e,n)}(r,t,e):Wd(r,l(),e)},placeCaretAt:function(t,e){return f(sd(t,e,r.getDoc()))},getBoundingClientRect:function(){var t=l();return t.collapsed?Tc.fromRangeStart(t).getClientRects()[0]:t.getBoundingClientRect()},destroy:function(){e=o=i=null,h.destroy()}},g=Zf(m),h=ud(m,r);return m.bookmarkManager=g,m.controlSelection=h,m},fb=function(t,e,n){t.addNodeFilter("font",(function(t){q(t,(function(t){var r=e.parse(t.attr("style")),o=t.attr("color"),i=t.attr("face"),a=t.attr("size");o&&(r.color=o),i&&(r["font-family"]=i),a&&(r["font-size"]=n[parseInt(t.attr("size"),10)-1]),t.name="span",t.attr("style",e.serialize(r)),function(t,e){q(e,(function(e){t.attr(e,null)}))}(t,["color","face","size"])}))}))},db=function(t,e){var n=Di();e.convert_fonts_to_spans&&fb(t,n,ze.explode(e.font_size_legacy_values)),function(t,e){t.addNodeFilter("strike",(function(t){q(t,(function(t){var n=e.parse(t.attr("style"));n["text-decoration"]="line-through",t.name="span",t.attr("style",e.serialize(n))}))}))}(t,n)},mb=function(t){var e,n=decodeURIComponent(t).split(","),r=/data:([^;]+)/.exec(n[0]);return r&&(e=r[1]),{type:e,data:n[1]}},gb=function(t,e){var n;try{n=atob(e)}catch(t){return L.none()}for(var r=new Uint8Array(n.length),o=0;o<r.length;o++)r[o]=n.charCodeAt(o);return L.some(new Blob([r],{type:t}))},hb=function(t){return 0===t.indexOf("blob:")?function(t){return new to((function(e,n){var r=function(){n("Cannot convert "+t+" to Blob. Resource might not exist or is inaccessible.")};try{var o=new XMLHttpRequest;o.open("GET",t,!0),o.responseType="blob",o.onload=function(){200===o.status?e(o.response):r()},o.onerror=r,o.send()}catch(t){r()}}))}(t):0===t.indexOf("data:")?(e=t,new to((function(t){var n=mb(e),r=n.type,o=n.data;gb(r,o).fold((function(){return t(new Blob([]))}),t)}))):null;var e},pb=0,vb=function(t){return(t||"blobid")+pb++},bb=function(t,e,n,r){var o,i;if(0!==e.src.indexOf("blob:")){var a=mb(e.src),u=a.data,c=a.type;o=u,(i=t.getByData(o,c))?n({image:e,blobInfo:i}):hb(e.src).then((function(r){i=t.create(vb(),r,o),t.add(i),n({image:e,blobInfo:i})}),(function(t){r(t)}))}else(i=t.getByUri(e.src))?n({image:e,blobInfo:i}):hb(e.src).then((function(r){(function(t){return new to((function(e){var n=new FileReader;n.onloadend=function(){e(n.result)},n.readAsDataURL(t)}))})(r).then((function(a){o=mb(a).data,i=t.create(vb(),r,o),t.add(i),n({image:e,blobInfo:i})}))}),(function(t){r(t)}))},yb=function(t,e){var n={};return{findAll:function(r,o){o||(o=N);var i=X(function(t){return t?ct(t.getElementsByTagName("img")):[]}(r),(function(e){var n=e.src;return!!Se.fileApi&&(!e.hasAttribute("data-mce-bogus")&&(!e.hasAttribute("data-mce-placeholder")&&(!(!n||n===Se.transparentSrc)&&(0===n.indexOf("blob:")?!t.isUploaded(n)&&o(e):0===n.indexOf("data:")&&o(e)))))})),a=W(i,(function(t){if(void 0!==n[t.src])return new to((function(e){n[t.src].then((function(n){if("string"==typeof n)return n;e({image:t,blobInfo:n.blobInfo})}))}));var r=new to((function(n,r){bb(e,t,n,r)})).then((function(t){return delete n[t.image.src],t})).catch((function(e){return delete n[t.src],e}));return n[t.src]=r,r}));return to.all(a)}}},xb=function(t,e,n,r){(t.padd_empty_with_br||e.insert)&&n[r.name]?r.empty().append(new Nm("br",1)).shortEnded=!0:r.empty().append(new Nm("#text",3)).value=xo},wb=function(t,e){return t&&t.firstChild&&t.firstChild===t.lastChild&&t.firstChild.name===e},Cb=function(t,e,n,r){return r.isEmpty(e,n,(function(e){return function(t,e){var n=t.getElementRule(e.name);return n&&n.paddEmpty}(t,e)}))},Sb=function(t,e){var n=e.blob_cache,r=function(t){var r=t.attr("src");(function(t){return t.attr("src")===Se.transparentSrc||y(t.attr("data-mce-placeholder"))})(t)||function(t){return y(t.attr("data-mce-bogus"))}(t)||function(t){var e=/data:([^;]+);base64,([a-z0-9\+\/=\s]+)/i.exec(t);return e?L.some({type:e[1],data:decodeURIComponent(e[2])}):L.none()}(r).filter((function(){return function(t,e){if(e.images_dataimg_filter){var n=new Image;return n.src=t.attr("src"),dt(t.attributes.map,(function(t,e){n.setAttribute(e,t)})),e.images_dataimg_filter(n)}return!0}(t,e)})).bind((function(t){var e=t.type,r=t.data;return L.from(n.getByData(r,e)).orThunk((function(){return gb(e,r).map((function(t){var e=n.create(vb(),t,r);return n.add(e),e}))}))})).each((function(e){t.attr("src",e.blobUri())}))};n&&t.addAttributeFilter("src",(function(t){return q(t,r)}))},kb=ze.makeMap,_b=ze.each,Ob=ze.explode,Eb=ze.extend,zb=function(t,e){void 0===e&&(e=Ti());var n={},r=[],o={},i={};(t=t||{}).validate=!("validate"in t)||t.validate,t.root_name=t.root_name||"body";var a=function(t){var e=t.name;e in n&&((u=o[e])?u.push(t):o[e]=[t]);for(var a=r.length;a--;){var u,c=r[a].name;if(c in t.attributes.map)(u=i[c])?u.push(t):i[c]=[t]}return t},u={schema:e,addAttributeFilter:function(t,e){_b(Ob(t),(function(t){var n;for(n=0;n<r.length;n++)if(r[n].name===t)return void r[n].callbacks.push(e);r.push({name:t,callbacks:[e]})}))},getAttributeFilters:function(){return[].concat(r)},addNodeFilter:function(t,e){_b(Ob(t),(function(t){var r=n[t];r||(n[t]=r=[]),r.push(e)}))},getNodeFilters:function(){var t=[];for(var e in n)xt(n,e)&&t.push({name:e,callbacks:n[e]});return t},filterNode:a,parse:function(u,c){var s,l,f,d,m,g,h,p,v=[];c=c||{},o={},i={};var b=Eb(kb("script,style,head,html,body,title,meta,param"),e.getBlockElements()),y=e.getNonEmptyElements(),x=e.children,w=t.validate,C=function(t){return!1===t?"":!0===t?"p":t}("forced_root_block"in c?c.forced_root_block:t.forced_root_block),S=e.getWhiteSpaceElements(),k=/^[ \t\r\n]+/,_=/[ \t\r\n]+$/,O=/[ \t\r\n]+/g,E=/^[ \t\r\n]+$/,z=xt(S,c.context)||xt(S,t.root_name),T=function(t,e){var r,i=new Nm(t,e);return t in n&&((r=o[t])?r.push(i):o[t]=[i]),i},M=function(t){for(var n=e.getBlockElements(),r=t.prev;r&&3===r.type;){var o=r.value.replace(_,"");if(o.length>0)return void(r.value=o);var i=r.next;if(i){if(3===i.type&&i.value.length){r=r.prev;continue}if(!n[i.name]&&"script"!==i.name&&"style"!==i.name){r=r.prev;continue}}var a=r.prev;r.remove(),r=a}},D=Gm({validate:w,document:t.document,allow_html_data_urls:t.allow_html_data_urls,allow_svg_data_urls:t.allow_svg_data_urls,allow_script_urls:t.allow_script_urls,allow_conditional_comments:t.allow_conditional_comments,preserve_cdata:t.preserve_cdata,self_closing_elements:function(t){var e={};for(var n in t)"li"!==n&&"p"!==n&&(e[n]=t[n]);return e}(e.getSelfClosingElements()),cdata:function(t){p.append(T("#cdata",4)).value=t},text:function(t,e){var n;z||(t=t.replace(O," "),function(t,e){return t&&(xt(e,t.name)||"br"===t.name)}(p.lastChild,b)&&(t=t.replace(k,""))),0!==t.length&&((n=T("#text",3)).raw=!!e,p.append(n).value=t)},comment:function(t){p.append(T("#comment",8)).value=t},pi:function(t,e){p.append(T(t,7)).value=e,M(p)},doctype:function(t){p.append(T("#doctype",10)).value=t,M(p)},start:function(t,n,o){var a=w?e.getElementRule(t):{};if(a){var u=T(a.outputName||t,1);u.attributes=n,u.shortEnded=o,p.append(u);var c=x[p.name];c&&x[u.name]&&!c[u.name]&&v.push(u);for(var s=r.length;s--;){var l=r[s].name;l in n.map&&((g=i[l])?g.push(u):i[l]=[u])}b[t]&&M(u),o||(p=u),!z&&S[t]&&(z=!0)}},end:function(n){var r,o,i,a,u=w?e.getElementRule(n):{};if(u){if(b[n]&&!z){if((r=p.firstChild)&&3===r.type)if((o=r.value.replace(k,"")).length>0)r.value=o,r=r.next;else for(i=r.next,r.remove(),r=i;r&&3===r.type;)o=r.value,i=r.next,(0===o.length||E.test(o))&&(r.remove(),r=i),r=i;if((r=p.lastChild)&&3===r.type)if((o=r.value.replace(_,"")).length>0)r.value=o,r=r.prev;else for(i=r.prev,r.remove(),r=i;r&&3===r.type;)o=r.value,i=r.prev,(0===o.length||E.test(o))&&(r.remove(),r=i),r=i}if(z&&S[n]&&(z=!1),u.removeEmpty&&Cb(e,y,S,p))return a=p.parent,b[p.name]?p.empty().remove():p.unwrap(),void(p=a);u.paddEmpty&&(function(t){return wb(t,"#text")&&t.firstChild.value===xo}(p)||Cb(e,y,S,p))&&xb(t,c,b,p),p=p.parent}}},e),A=p=new Nm(c.context||t.root_name,11);if(D.parse(u,c.format),w&&v.length&&(c.context?c.invalid=!0:function(t){for(var n=kb("tr,td,th,tbody,thead,tfoot,table"),r=e.getNonEmptyElements(),o=e.getWhiteSpaceElements(),i=e.getTextBlockElements(),u=e.getSpecialElements(),c=function(t,n){if(void 0===n&&(n=t.parent),u[t.name])t.empty().remove();else{for(var r=0,o=t.children();r<o.length;r++){var i=o[r];e.isValidChild(n.name,i.name)||c(i,n)}t.unwrap()}},s=0;s<t.length;s++){var l=t[s],f=void 0,d=void 0,m=void 0;if(l.parent&&!l.fixed)if(i[l.name]&&"li"===l.parent.name){for(var g=l.next;g&&i[g.name];)g.name="li",g.fixed=!0,l.parent.insert(g,l.parent),g=g.next;l.unwrap()}else{var h=[l];for(f=l.parent;f&&!e.isValidChild(f.name,l.name)&&!n[f.name];f=f.parent)h.push(f);if(f&&h.length>1)if(e.isValidChild(f.name,l.name)){h.reverse();for(var p=d=a(h[0].clone()),v=0;v<h.length-1;v++){e.isValidChild(p.name,h[v].name)?(m=a(h[v].clone()),p.append(m)):m=p;for(var b=h[v].firstChild;b&&b!==h[v+1];){var y=b.next;m.append(b),b=y}p=m}Cb(e,r,o,d)?f.insert(l,h[0],!0):(f.insert(d,h[0],!0),f.insert(l,d)),f=h[0],(Cb(e,r,o,f)||wb(f,"br"))&&f.empty().remove()}else c(l);else if(l.parent){if("li"===l.name){if((g=l.prev)&&("ul"===g.name||"ol"===g.name)){g.append(l);continue}if((g=l.next)&&("ul"===g.name||"ol"===g.name)){g.insert(l,g.firstChild,!0);continue}l.wrap(a(new Nm("ul",1)));continue}e.isValidChild(l.parent.name,"div")&&e.isValidChild("div",l.name)?l.wrap(a(new Nm("div",1))):c(l)}}}}(v)),C&&("body"===A.name||c.isRootContent)&&function(){var n=A.firstChild,r=null,o=function(t){t&&((n=t.firstChild)&&3===n.type&&(n.value=n.value.replace(k,"")),(n=t.lastChild)&&3===n.type&&(n.value=n.value.replace(_,"")))};if(e.isValidChild(A.name,C.toLowerCase())){for(;n;){var i=n.next;3===n.type||1===n.type&&"p"!==n.name&&!b[n.name]&&!n.attr("data-mce-type")?(r||((r=T(C,1)).attr(t.forced_root_block_attrs),A.insert(r,n)),r.append(n)):(o(r),r=null),n=i}o(r)}}(),!c.invalid){for(h in o)if(xt(o,h)){for(g=n[h],d=(s=o[h]).length;d--;)s[d].parent||s.splice(d,1);for(l=0,f=g.length;l<f;l++)g[l](s,h,c)}for(l=0,f=r.length;l<f;l++)if((g=r[l]).name in i){for(d=(s=i[g.name]).length;d--;)s[d].parent||s.splice(d,1);for(d=0,m=g.callbacks.length;d<m;d++)g.callbacks[d](s,g.name,c)}}return A}};return function(t,e){var n=t.schema;e.remove_trailing_brs&&t.addNodeFilter("br",(function(t,r,o){var i,a,u,c,s,l,f,d,m=t.length,g=ze.extend({},n.getBlockElements()),h=n.getNonEmptyElements(),p=n.getWhiteSpaceElements();for(g.body=1,i=0;i<m;i++)if(u=(a=t[i]).parent,g[a.parent.name]&&a===u.lastChild){for(s=a.prev;s;){if("span"!==(l=s.name)||"bookmark"!==s.attr("data-mce-type")){"br"===l&&(a=null);break}s=s.prev}a&&(a.remove(),Cb(n,h,p,u)&&(f=n.getElementRule(u.name))&&(f.removeEmpty?u.remove():f.paddEmpty&&xb(e,o,g,u)))}else{for(c=a;u&&u.firstChild===c&&u.lastChild===c&&(c=u,!g[u.name]);)u=u.parent;c===u&&!0!==e.padd_empty_with_br&&((d=new Nm("#text",3)).value=xo,a.replace(d))}})),t.addAttributeFilter("href",(function(t){var n,r,o=t.length;if(!e.allow_unsafe_link_target)for(;o--;){var i=t[o];"a"===i.name&&"_blank"===i.attr("target")&&i.attr("rel",(r=void 0,r=(n=i.attr("rel"))?ze.trim(n):"",/\b(noopener)\b/g.test(r)?r:function(t){return t.split(" ").filter((function(t){return t.length>0})).concat(["noopener"]).sort().join(" ")}(r)))}})),e.allow_html_in_named_anchor||t.addAttributeFilter("id,name",(function(t){for(var e,n,r,o,i=t.length;i--;)if("a"===(o=t[i]).name&&o.firstChild&&!o.attr("href")){r=o.parent,e=o.lastChild;do{n=e.prev,r.insert(e,o),e=n}while(e)}})),e.fix_list_elements&&t.addNodeFilter("ul,ol",(function(t){for(var e,n,r=t.length;r--;)if("ul"===(n=(e=t[r]).parent).name||"ol"===n.name)if(e.prev&&"li"===e.prev.name)e.prev.append(e);else{var o=new Nm("li",1);o.attr("style","list-style-type: none"),e.wrap(o)}})),e.validate&&n.getValidClasses()&&t.addAttributeFilter("class",(function(t){for(var e=n.getValidClasses(),r=t.length;r--;){for(var o=t[r],i=o.attr("class").split(" "),a="",u=0;u<i.length;u++){var c=i[u],s=!1,l=e["*"];l&&l[c]&&(s=!0),l=e[o.name],!s&&l&&l[c]&&(s=!0),s&&(a&&(a+=" "),a+=c)}a.length||(a=null),o.attr("class",a)}})),Sb(t,e)}(u,t),function(t,e){e.inline_styles&&db(t,e)}(u,t),u},Tb=function(t,e,n){return function(t,e){return t&&t.hasEventListeners("PreProcess")&&!e.no_events}(t,n)?function(t,e,n){var r,o=t.dom,i=e.cloneNode(!0),a=document.implementation;if(a.createHTMLDocument){var u=a.createHTMLDocument("");ze.each("BODY"===i.nodeName?i.childNodes:[i],(function(t){u.body.appendChild(u.importNode(t,!0))})),i="BODY"!==i.nodeName?u.body.firstChild:u.body,r=o.doc,o.doc=u}return function(t,e){t.fire("PreProcess",e)}(t,Mt(Mt({},n),{node:i})),r&&(o.doc=r),i}(t,e,n):e},Mb=function(t,e,n){-1===ze.inArray(e,n)&&(t.addAttributeFilter(n,(function(t,e){for(var n=t.length;n--;)t[n].attr(e,null)})),e.push(n))},Db=function(t,e,n,r,o){return function(t,e,n){return!e.no_events&&t?function(t,e){return t.fire("PostProcess",e)}(t,Mt(Mt({},e),{content:n})).content:n}(t,o,function(t,e,n){return tg(t,e).serialize(n)}(e,n,r))},Ab=function(t,e){var n=["data-mce-selected"],r=e&&e.dom?e.dom:pu.DOM,o=e&&e.schema?e.schema:Ti(t);t.entity_encoding=t.entity_encoding||"named",t.remove_trailing_brs=!("remove_trailing_brs"in t)||t.remove_trailing_brs;var i=zb(t,o);!function(t,e,n){t.addAttributeFilter("data-mce-tabindex",(function(t,e){for(var n=t.length;n--;){var r=t[n];r.attr("tabindex",r.attr("data-mce-tabindex")),r.attr(e,null)}})),t.addAttributeFilter("src,href,style",(function(t,r){for(var o="data-mce-"+r,i=e.url_converter,a=e.url_converter_scope,u=t.length;u--;){var c=t[u],s=c.attr(o);void 0!==s?(c.attr(r,s.length>0?s:null),c.attr(o,null)):(s=c.attr(r),"style"===r?s=n.serializeStyle(n.parseStyle(s),c.name):i&&(s=i.call(a,s,r,c.name)),c.attr(r,s.length>0?s:null))}})),t.addAttributeFilter("class",(function(t){for(var e=t.length;e--;){var n=t[e],r=n.attr("class");r&&(r=n.attr("class").replace(/(?:^|\s)mce-item-\w+(?!\S)/g,""),n.attr("class",r.length>0?r:null))}})),t.addAttributeFilter("data-mce-type",(function(t,e,n){for(var r=t.length;r--;){var o=t[r];"bookmark"!==o.attr("data-mce-type")||n.cleanup||(L.from(o.firstChild).exists((function(t){return!Co(t.value)}))?o.unwrap():o.remove())}})),t.addNodeFilter("noscript",(function(t){for(var e=t.length;e--;){var n=t[e].firstChild;n&&(n.value=yi.decode(n.value))}})),t.addNodeFilter("script,style",(function(t,n){for(var r=function(t){return t.replace(/(<!--\[CDATA\[|\]\]-->)/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi,"").replace(/\s*(\/\*\s*\]\]>\s*\*\/(-->)?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")},o=t.length;o--;){var i=t[o],a=i.firstChild?i.firstChild.value:"";if("script"===n){var u=i.attr("type");u&&i.attr("type","mce-no/type"===u?null:u.replace(/^mce\-/,"")),"xhtml"===e.element_format&&a.length>0&&(i.firstChild.value="// <![CDATA[\n"+r(a)+"\n// ]]>")}else"xhtml"===e.element_format&&a.length>0&&(i.firstChild.value="\x3c!--\n"+r(a)+"\n--\x3e")}})),t.addNodeFilter("#comment",(function(t){for(var r=t.length;r--;){var o=t[r];e.preserve_cdata&&0===o.value.indexOf("[CDATA[")?(o.name="#cdata",o.type=4,o.value=n.decode(o.value.replace(/^\[CDATA\[|\]\]$/g,""))):0===o.value.indexOf("mce:protected ")&&(o.name="#text",o.type=3,o.raw=!0,o.value=unescape(o.value).substr(14))}})),t.addNodeFilter("xml:namespace,input",(function(t,e){for(var n=t.length;n--;){var r=t[n];7===r.type?r.remove():1===r.type&&("input"!==e||r.attr("type")||r.attr("type","text"))}})),t.addAttributeFilter("data-mce-type",(function(e){q(e,(function(e){"format-caret"===e.attr("data-mce-type")&&(e.isEmpty(t.schema.getNonEmptyElements())?e.remove():e.unwrap())}))})),t.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style,data-mce-selected,data-mce-expando,data-mce-type,data-mce-resize,data-mce-placeholder",(function(t,e){for(var n=t.length;n--;)t[n].attr(e,null)}))}(i,t,r);return{schema:o,addNodeFilter:i.addNodeFilter,addAttributeFilter:i.addAttributeFilter,serialize:function(n,a){void 0===a&&(a={});var u=Mt({format:"html"},a),c=Tb(e,n,u),s=function(t,e,n){var r=So(n.getInner?e.innerHTML:t.getOuterHTML(e));return n.selection||yo(Me.fromDom(e))?r:ze.trim(r)}(r,c,u),l=function(t,e,n){var r=n.selection?Mt({forced_root_block:!1},n):n,o=t.parse(e,r);return function(t){var e=function(t){return t&&"br"===t.name},n=t.lastChild;if(e(n)){var r=n.prev;e(r)&&(n.remove(),r.remove())}}(o),o}(i,s,u);return"tree"===u.format?l:Db(e,t,o,l,u)},addRules:o.addValidElements,setRules:o.setValidElements,addTempAttr:z(Mb,i,n),getTempAttrs:_(n),getNodeFilters:i.getNodeFilters,getAttributeFilters:i.getAttributeFilters}},Nb=function(t,e){var n=Ab(t,e);return{schema:n.schema,addNodeFilter:n.addNodeFilter,addAttributeFilter:n.addAttributeFilter,serialize:n.serialize,addRules:n.addRules,setRules:n.setRules,addTempAttr:n.addTempAttr,getTempAttrs:n.getTempAttrs,getNodeFilters:n.getNodeFilters,getAttributeFilters:n.getAttributeFilters}},Bb=function(t,e){return void 0===e&&(e={}),function(t,e,n){return Zv(t).editor.getContent(e,n)}(t,e,e.format?e.format:"html")},Rb=function(t,e,n){return void 0===n&&(n={}),function(t,e,n){return Zv(t).editor.setContent(e,n)}(t,e,n)},Hb=pu.DOM,Lb=function(t){return L.from(t).each((function(t){return t.destroy()}))},Vb=function(t){if(!t.removed){var e=t._selectionOverrides,n=t.editorUpload,r=t.getBody(),o=t.getElement();r&&t.save({is_removing:!0}),t.removed=!0,t.unbindAllNativeEvents(),t.hasHiddenInput&&o&&Hb.remove(o.nextSibling),function(t){t.fire("remove")}(t),t.editorManager.remove(t),!t.inline&&r&&function(t){Hb.setStyle(t.id,"display",t.orgDisplay)}(t),function(t){t.fire("detach")}(t),Hb.remove(t.getContainer()),Lb(e),Lb(n),t.destroy()}},Pb=function(t,e){var n=t.selection,r=t.dom;t.destroyed||(e||t.removed?(e||(t.editorManager.off("beforeunload",t._beforeUnload),t.theme&&t.theme.destroy&&t.theme.destroy(),Lb(n),Lb(r)),function(t){var e=t.formElement;e&&(e._mceOldSubmit&&(e.submit=e._mceOldSubmit,e._mceOldSubmit=null),Hb.unbind(e,"submit reset",t.formEventDelegate))}(t),function(t){t.contentAreaContainer=t.formElement=t.container=t.editorContainer=null,t.bodyElement=t.contentDocument=t.contentWindow=null,t.iframeElement=t.targetElm=null,t.selection&&(t.selection=t.selection.win=t.selection.dom=t.selection.dom.doc=null)}(t),t.destroyed=!0):t.remove())},Ib=(ab=function(t,e){return m(t)&&m(e)?Ib(t,e):e},function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(0===t.length)throw new Error("Can't merge zero objects");for(var n={},r=0;r<t.length;r++){var o=t[r];for(var i in o)xt(o,i)&&(n[i]=ab(n[i],o[i]))}return n}),Fb="autoresize_on_init,content_editable_state,convert_fonts_to_spans,inline_styles,padd_empty_with_br,block_elements,boolean_attributes,editor_deselector,editor_selector,elements,file_browser_callback_types,filepicker_validator_handler,force_hex_style_colors,force_p_newlines,gecko_spellcheck,images_dataimg_filter,media_scripts,mode,move_caret_before_on_enter_elements,non_empty_elements,self_closing_elements,short_ended_elements,special,spellchecker_select_languages,spellchecker_whitelist,tab_focus,table_responsive_width,text_block_elements,text_inline_elements,toolbar_drawer,types,validate,whitespace_elements,paste_word_valid_elements,paste_retain_style_properties,paste_convert_word_fake_lists".split(","),Ub="bbcode,colorpicker,contextmenu,fullpage,legacyoutput,spellchecker,textcolor".split(","),jb="imagetools,toc".split(","),Wb=function(t){var e=X(Fb,(function(e){return xt(t,e)})),n=t.forced_root_block;return!1!==n&&""!==n||e.push("forced_root_block (false only)"),ot(e)},qb=function(t){var e=ze.makeMap(t.plugins," "),n=function(t){return xt(e,t)},r=Dt(Dt([],X(Ub,n),!0),tt(jb,(function(t){return n(t)?[t+" (moving to premium)"]:[]})),!0);return ot(r)},Gb=ge().deviceType,$b=Gb.isTouch(),Xb=Gb.isPhone(),Kb=Gb.isTablet(),Yb=["lists","autolink","autosave"],Jb={table_grid:!1,object_resizing:!1,resize:!1},Qb=function(t){var e=g(t)?t.join(" "):t,n=W(d(e)?e.split(" "):[],It);return X(n,(function(t){return t.length>0}))},Zb=function(t,e){var n,r,o=(r={},pt(e,(function(e,n){return U(t,n)}),ht(n={}),ht(r)),{t:n,f:r});return function(t,e){return{sections:_(t),settings:_(e)}}(o.t,o.f)},ty=function(t,e){return xt(t.sections(),e)},ey=function(t,e){return yt(t,"toolbar_mode").orThunk((function(){return yt(t,"toolbar_drawer").map((function(t){return!1===t?"wrap":t}))})).getOr(e)},ny=function(t,e){var n={resize:!1,toolbar_mode:ey(t,"scrolling"),toolbar_sticky:!1};return Mt(Mt(Mt({},Jb),n),e?{menubar:!1}:{})},ry=function(t,e){var n=e.external_plugins?e.external_plugins:{};return t&&t.external_plugins?ze.extend({},t.external_plugins,n):n},oy=function(t,e,n,r){return t&&function(t,e,n){var r=t.sections();return ty(t,e)&&r[e].theme===n}(e,"mobile","mobile")?X(r,z(U,Yb)):t&&ty(e,"mobile")?r:n},iy=function(t,e,n,r){var o=Qb(n.forced_plugins),i=Qb(r.plugins),a=function(t,e){return ty(t,e)?t.sections()[e]:{}}(e,"mobile"),u=a.plugins?Qb(a.plugins):i,c=function(t,e){return[].concat(Qb(t)).concat(Qb(e))}(o,oy(t,e,i,u));if(Se.browser.isIE()&&U(c,"rtc"))throw new Error("RTC plugin is not supported on IE 11.");return ze.extend(r,{plugins:c.join(" ")})},ay=function(t,e,n,r,o){var i=t?{mobile:ny(o.mobile||{},e)}:{},a=Zb(["mobile"],Ib(i,o)),u=ze.extend(n,r,a.settings(),function(t,e){return t&&ty(e,"mobile")}(t,a)?function(t,e,n){void 0===n&&(n={});var r=t.sections(),o=yt(r,e).getOr({});return ze.extend({},n,o)}(a,"mobile"):{},{validate:!0,external_plugins:ry(r,a.settings())});return iy(t,a,r,u)},uy=function(t,e,n,r,o){var i=function(t,e,n,r,o){var i={id:e,theme:"silver",toolbar_mode:ey(t,"floating"),plugins:"",document_base_url:n,add_form_submit_trigger:!0,submit_patch:!0,add_unload_trigger:!0,convert_urls:!0,relative_urls:!0,remove_script_host:!0,object_resizing:!0,doctype:"<!DOCTYPE html>",visual:!0,font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",forced_root_block:"p",hidden_input:!0,inline_styles:!0,convert_fonts_to_spans:!0,indent:!0,indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",entity_encoding:"named",url_converter:o.convertURL,url_converter_scope:o};return Mt(Mt({},i),r?Jb:{})}(o,e,n,$b,t),a=ay(Xb||Kb,Xb,i,r,o);return!1!==a.deprecation_warnings&&function(t,e){var n=Wb(t),r=qb(e),o=r.length>0,i=n.length>0,a="mobile"===e.theme;if(o||i||a){var u="\n- ",c=a?"\n\nThemes:\n- mobile":"",s=o?"\n\nPlugins:\n- "+r.join(u):"",l=i?"\n\nSettings:\n- "+n.join(u):"";console.warn("The following deprecated features are currently enabled, these will be removed in TinyMCE 6.0. See https://www.tiny.cloud/docs/release-notes/6.0-upcoming-changes/ for more information."+c+s+l)}}(o,a),a},cy=function(t,e,n){return L.from(e.settings[n]).filter(t)},sy=function(t,e,n,r){var o,i=e in t.settings?t.settings[e]:n;return"hash"===r?function(t){var e={};return"string"==typeof t?q(t.indexOf("=")>0?t.split(/[;,](?![^=;,]*(?:[;,]|$))/):t.split(","),(function(t){var n=t.split("=");n.length>1?e[ze.trim(n[0])]=ze.trim(n[1]):e[ze.trim(n[0])]=ze.trim(n[0])})):e=t,e}(i):"string"===r?cy(d,t,e).getOr(n):"number"===r?cy(w,t,e).getOr(n):"boolean"===r?cy(p,t,e).getOr(n):"object"===r?cy(m,t,e).getOr(n):"array"===r?cy(g,t,e).getOr(n):"string[]"===r?cy((o=d,function(t){return g(t)&&et(t,o)}),t,e).getOr(n):"function"===r?cy(x,t,e).getOr(n):i},ly=(ub={},{add:function(t,e){ub[t]=e},get:function(t){return ub[t]?ub[t]:{icons:{}}},has:function(t){return xt(ub,t)}}),fy=function(t,e){return e.dom[t]},dy=function(t,e){return parseInt(ir(e,t),10)},my=z(fy,"clientWidth"),gy=z(fy,"clientHeight"),hy=z(dy,"margin-top"),py=z(dy,"margin-left"),vy=function(t,e,n){var r,o=Me.fromDom(t.getBody()),i=t.inline?o:(r=o,Me.fromDom(qe(r).dom.documentElement)),a=function(t,e,n,r){var o=function(t){return t.dom.getBoundingClientRect()}(e);return{x:n-(t?o.left+e.dom.clientLeft+py(e):0),y:r-(t?o.top+e.dom.clientTop+hy(e):0)}}(t.inline,i,e,n);return function(t,e,n){var r=my(t),o=gy(t);return e>=0&&n>=0&&e<=r&&n<=o}(i,a.x,a.y)},by=function(t){var e,n=t.inline?t.getBody():t.getContentAreaContainer();return(e=n,L.from(e).map(Me.fromDom)).map(yn).getOr(!1)},yy=function(t){var e=[],n=function(){var e,n=t.theme;return n&&n.getNotificationManagerImpl?n.getNotificationManagerImpl():{open:e=function(){throw new Error("Theme did not provide a NotificationManager implementation.")},close:e,reposition:e,getArgs:e}},r=function(){return L.from(e[0])},o=function(){e.length>0&&n().reposition(e)},i=function(t){Z(e,(function(e){return e===t})).each((function(t){e.splice(t,1)}))},a=function(a,u){if(void 0===u&&(u=!0),!t.removed&&by(t))return u&&t.fire("BeforeOpenNotification",{notification:a}),Q(e,(function(t){return e=n().getArgs(t),r=a,!(e.type!==r.type||e.text!==r.text||e.progressBar||e.timeout||r.progressBar||r.timeout);var e,r})).getOrThunk((function(){t.editorManager.setActive(t);var u=n().open(a,(function(){i(u),o(),r().fold((function(){return t.focus()}),(function(t){return Me.fromDom(t.getEl()).dom.focus()}))}));return function(t){e.push(t)}(u),o(),t.fire("OpenNotification",{notification:Mt({},u)}),u}))},u=_(e);return function(t){t.on("SkinLoaded",(function(){var e=function(t){return t.getParam("service_message")}(t);e&&a({text:e,type:"warning",timeout:0},!1),o()})),t.on("show ResizeEditor ResizeWindow NodeChange",(function(){oo.requestAnimationFrame(o)})),t.on("remove",(function(){q(e.slice(),(function(t){n().close(t)}))}))}(t),{open:a,close:function(){r().each((function(t){n().close(t),i(t),o()}))},getNotifications:u}},xy=Ou.PluginManager,wy=Ou.ThemeManager;var Cy=function(t){var e=[],n=function(){var e,n=t.theme;return n&&n.getWindowManagerImpl?n.getWindowManagerImpl():{open:e=function(){throw new Error("Theme did not provide a WindowManager implementation.")},openUrl:e,alert:e,confirm:e,close:e,getParams:e,setParams:e}},r=function(t,e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e?e.apply(t,n):void 0}},o=function(n){e.push(n),function(e){t.fire("OpenWindow",{dialog:e})}(n)},i=function(n){!function(e){t.fire("CloseWindow",{dialog:e})}(n),0===(e=X(e,(function(t){return t!==n}))).length&&t.focus()},a=function(e){t.editorManager.setActive(t),um(t);var n=e();return o(n),n};return t.on("remove",(function(){q(e,(function(t){n().close(t)}))})),{open:function(t,e){return a((function(){return n().open(t,e,i)}))},openUrl:function(t){return a((function(){return n().openUrl(t,i)}))},alert:function(t,e,o){var i=n();i.alert(t,r(o||i,e))},confirm:function(t,e,o){var i=n();i.confirm(t,r(o||i,e))},close:function(){L.from(e[e.length-1]).each((function(t){n().close(t),i(t)}))}}},Sy=function(t,e){t.notificationManager.open({type:"error",text:e})},ky=function(t,e){t._skinLoaded?Sy(t,e):t.on("SkinLoaded",(function(){Sy(t,e)}))},_y=function(t,e,n){nd(t,e,{message:n}),console.error(n)},Oy=function(t,e,n){return n?"Failed to load "+t+": "+n+" from url "+e:"Failed to load "+t+" url: "+e},Ey=function(t,e,n){_y(t,"PluginLoadError",Oy("plugin",e,n))},zy=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=window.console;r&&(r.error?r.error.apply(r,Dt([t],e,!1)):r.log.apply(r,Dt([t],e,!1)))},Ty=function(t){return My(t,function(t){var e=t.getParam("content_css");return d(e)?W(e.split(","),It):g(e)?e:!1===e||t.inline?[]:["default"]}(t))},My=function(t,e){var n=t.editorManager.baseURL+"/skins/content",r="content"+t.editorManager.suffix+".css",o=!0===t.inline;return W(e,(function(e){return function(t){return/^[a-z0-9\-]+$/i.test(t)}(e)&&!o?n+"/"+e+"/"+r:t.documentBaseURI.toAbsolute(e)}))},Dy=function(t){t.contentCSS=t.contentCSS.concat(Ty(t),function(t){return My(t,hs(t))}(t))},Ay=function(){var t={},e=function(t,e){return{status:t,resultUri:e}},n=function(e){return e in t};return{hasBlobUri:n,getResultUri:function(e){var n=t[e];return n?n.resultUri:null},isPending:function(e){return!!n(e)&&1===t[e].status},isUploaded:function(e){return!!n(e)&&2===t[e].status},markPending:function(n){t[n]=e(1,null)},markUploaded:function(n,r){t[n]=e(2,r)},removeFailed:function(e){delete t[e]},destroy:function(){t={}}}},Ny=0,By=function(t){return t+Ny+++(e=function(){return Math.round(4294967295*Math.random()).toString(36)},"s"+(new Date).getTime().toString(36)+e()+e()+e());var e},Ry=function(t,e){var n={},r=function(t,n,r,o){var i=new XMLHttpRequest;i.open("POST",e.url),i.withCredentials=e.credentials,i.upload.onprogress=function(t){o(t.loaded/t.total*100)},i.onerror=function(){r("Image upload failed due to a XHR Transport error. Code: "+i.status)},i.onload=function(){if(i.status<200||i.status>=300)r("HTTP Error: "+i.status);else{var t,o,a=JSON.parse(i.responseText);if(a&&"string"==typeof a.location)n((t=e.basePath,o=a.location,t?t.replace(/\/$/,"")+"/"+o.replace(/^\//,""):o));else r("Invalid JSON: "+i.responseText)}};var a=new FormData;a.append("file",t.blob(),t.filename()),i.send(a)},o=function(t,e){return{url:e,blobInfo:t,status:!0}},i=function(t,e,n){return{url:"",blobInfo:t,status:!1,error:{message:e,options:n}}},a=function(t,e){ze.each(n[t],(function(t){t(e)})),delete n[t]},u=function(r,u){return r=ze.grep(r,(function(e){return!t.isUploaded(e.blobUri())})),to.all(ze.map(r,(function(r){return t.isPending(r.blobUri())?function(t){var e=t.blobUri();return new to((function(t){n[e]=n[e]||[],n[e].push(t)}))}(r):function(e,n,r){return t.markPending(e.blobUri()),new to((function(u){var c;try{var s=function(){c&&c.close()};n(e,(function(n){s(),t.markUploaded(e.blobUri(),n),a(e.blobUri(),o(e,n)),u(o(e,n))}),(function(n,r){var o=r||{};s(),t.removeFailed(e.blobUri()),a(e.blobUri(),i(e,n,o)),u(i(e,n,o))}),(function(t){t<0||t>100||L.from(c).orThunk((function(){return L.from(r).map(M)})).each((function(e){c=e,e.progressBar.value(t)}))}))}catch(t){u(i(e,t.message,{}))}}))}(r,e.handler,u)})))};return!1===x(e.handler)&&(e.handler=r),{upload:function(t,n){return e.url||e.handler!==r?u(t,n):new to((function(t){t([])}))}}},Hy=function(t){return function(){return t.notificationManager.open({text:t.translate("Image uploading..."),type:"info",timeout:-1,progressBar:!0})}},Ly=function(t,e){return Ry(e,{url:us(t),basePath:cs(t),credentials:ss(t),handler:ls(t)})},Vy=function(t){var e,n,r=function(){var t=[],e=function(t){if(!t.blob||!t.base64)throw new Error("blob and base64 representations of the image are required for BlobInfo to be created");var e,n=t.id||By("blobid"),r=t.name||n,o=t.blob;return{id:_(n),name:_(r),filename:_(t.filename||r+"."+(e=o.type,{"image/jpeg":"jpg","image/jpg":"jpg","image/gif":"gif","image/png":"png","image/apng":"apng","image/avif":"avif","image/svg+xml":"svg","image/webp":"webp","image/bmp":"bmp","image/tiff":"tiff"}[e.toLowerCase()]||"dat")),blob:_(o),base64:_(t.base64),blobUri:_(t.blobUri||URL.createObjectURL(o)),uri:_(t.uri)}},n=function(e){return Q(t,e).getOrUndefined()},r=function(t){return n((function(e){return e.id()===t}))};return{create:function(t,n,r,o,i){if(d(t))return e({id:t,name:o,filename:i,blob:n,base64:r});if(m(t))return e(t);throw new Error("Unknown input type")},add:function(e){r(e.id())||t.push(e)},get:r,getByUri:function(t){return n((function(e){return e.blobUri()===t}))},getByData:function(t,e){return n((function(n){return n.base64()===t&&n.blob().type===e}))},findFirst:n,removeByUri:function(e){t=X(t,(function(t){return t.blobUri()!==e||(URL.revokeObjectURL(t.blobUri()),!1)}))},destroy:function(){q(t,(function(t){URL.revokeObjectURL(t.blobUri())})),t=[]}}}(),o=Ay(),i=[],a=function(t){var e=wu(null);return t.on("change AddUndo",(function(t){e.set(Mt({},t.level))})),{fireIfChanged:function(){var n=t.undoManager.data;ut(n).filter((function(t){return!Gv(e.get(),t)})).each((function(e){t.setDirty(!0),t.fire("change",{level:e,lastLevel:it(n,n.length-2).getOrNull()})}))}}}(t),u=function(e){return function(n){return t.selection?e(n):[]}},c=function(t,e,n){var r=0;do{-1!==(r=t.indexOf(e,r))&&(t=t.substring(0,r)+n+t.substr(r+e.length),r+=n.length-e.length+1)}while(-1!==r);return t},s=function(t,e,n){var r='src="'+n+'"'+(n===Se.transparentSrc?' data-mce-placeholder="1"':"");return t=c(t,'src="'+e+'"',r),t=c(t,'data-mce-src="'+e+'"','data-mce-src="'+n+'"')},l=function(e,n){q(t.undoManager.data,(function(t){"fragmented"===t.type?t.fragments=W(t.fragments,(function(t){return s(t,e,n)})):t.content=s(t.content,e,n)}))},f=function(n){return e||(e=Ly(t,o)),p().then(u((function(o){var i=W(o,(function(t){return t.blobInfo}));return e.upload(i,Hy(t)).then(u((function(e){var i=[],u=W(e,(function(e,n){var a=o[n].blobInfo,u=o[n].image;return e.status&&function(t){return t.getParam("images_replace_blob_uris",!0,"boolean")}(t)?(r.removeByUri(u.src),Jv(t)||function(e,n){var r,o=t.convertURL(n,"src");l(e.src,n),t.$(e).attr({src:is(t)?(r=n,r+(-1===r.indexOf("?")?"?":"&")+(new Date).getTime()):n,"data-mce-src":o})}(u,e.url)):e.error&&(e.error.options.remove&&(l(u.getAttribute("src"),Se.transparentSrc),i.push(u)),function(t,e){ky(t,_u.translate(["Failed to upload image: {0}",e]))}(t,e.error.message)),{element:u,status:e.status,uploadUri:e.url,blobInfo:a}}));return u.length>0&&a.fireIfChanged(),i.length>0&&(Jv(t)?console.error("Removing images on failed uploads is currently unsupported for RTC"):t.undoManager.transact((function(){q(i,(function(e){t.dom.remove(e),r.removeByUri(e.src)}))}))),n&&n(u),u})))})))},g=function(e){if(os(t))return f(e)},h=function(e){return!1!==et(i,(function(t){return t(e)}))&&(0!==e.getAttribute("src").indexOf("data:")||function(t){return t.getParam("images_dataimg_filter",N,"function")}(t)(e))},p=function(){return n||(n=yb(o,r)),n.findAll(t.getBody(),h).then(u((function(e){return e=X(e,(function(e){return"string"!=typeof e||(ky(t,e),!1)})),Jv(t)||q(e,(function(t){l(t.image.src,t.blobInfo.blobUri()),t.image.src=t.blobInfo.blobUri(),t.image.removeAttribute("data-mce-src")})),e})))},v=function(e){return e.replace(/src="(blob:[^"]+)"/g,(function(e,n){var i=o.getResultUri(n);if(i)return'src="'+i+'"';var a=r.getByUri(n);return a||(a=Y(t.editorManager.get(),(function(t,e){return t||e.editorUpload&&e.editorUpload.blobCache.getByUri(n)}),null)),a?'src="data:'+a.blob().type+";base64,"+a.base64()+'"':e}))};return t.on("SetContent",(function(){os(t)?g():p()})),t.on("RawSaveContent",(function(t){t.content=v(t.content)})),t.on("GetContent",(function(t){t.source_view||"raw"===t.format||"tree"===t.format||(t.content=v(t.content))})),t.on("PostRender",(function(){t.parser.addNodeFilter("img",(function(t){q(t,(function(t){var e=t.attr("src");if(!r.getByUri(e)){var n=o.getResultUri(e);n&&t.attr("src",n)}}))}))})),{blobCache:r,addFilter:function(t){i.push(t)},uploadImages:f,uploadImagesAuto:g,scanForImages:p,destroy:function(){r.destroy(),o.destroy(),n=e=null}}},Py=function(t){var e={},n=function(t,r){t&&(d(t)?(g(r)||(r=[r]),q(r,(function(t){v(t.deep)&&(t.deep=!hf(t)),v(t.split)&&(t.split=!hf(t)||pf(t)),v(t.remove)&&hf(t)&&!pf(t)&&(t.remove="none"),hf(t)&&pf(t)&&(t.mixed=!0,t.block_expand=!0),d(t.classes)&&(t.classes=t.classes.split(/\s+/))})),e[t]=r):dt(t,(function(t,e){n(e,t)})))};return n(function(t){var e={valigntop:[{selector:"td,th",styles:{verticalAlign:"top"}}],valignmiddle:[{selector:"td,th",styles:{verticalAlign:"middle"}}],valignbottom:[{selector:"td,th",styles:{verticalAlign:"bottom"}}],alignleft:[{selector:"figure.image",collapsed:!1,classes:"align-left",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"left"},inherit:!1,preview:!1,defaultBlock:"div"},{selector:"img,table,audio,video",collapsed:!1,styles:{float:"left"},preview:"font-family font-size"}],aligncenter:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"center"},inherit:!1,preview:"font-family font-size",defaultBlock:"div"},{selector:"figure.image",collapsed:!1,classes:"align-center",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"img,audio,video",collapsed:!1,styles:{display:"block",marginLeft:"auto",marginRight:"auto"},preview:!1},{selector:"table",collapsed:!1,styles:{marginLeft:"auto",marginRight:"auto"},preview:"font-family font-size"}],alignright:[{selector:"figure.image",collapsed:!1,classes:"align-right",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"right"},inherit:!1,preview:"font-family font-size",defaultBlock:"div"},{selector:"img,table,audio,video",collapsed:!1,styles:{float:"right"},preview:"font-family font-size"}],alignjustify:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"justify"},inherit:!1,defaultBlock:"div",preview:"font-family font-size"}],bold:[{inline:"strong",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all",preserve_attributes:["class","style"]}],italic:[{inline:"em",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all",preserve_attributes:["class","style"]}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:!0},{inline:"u",remove:"all",preserve_attributes:["class","style"]}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:!0},{inline:"strike",remove:"all",preserve_attributes:["class","style"]},{inline:"s",remove:"all",preserve_attributes:["class","style"]}],forecolor:{inline:"span",styles:{color:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0},fontname:{inline:"span",toggle:!1,styles:{fontFamily:"%value"},clear_child_styles:!0},fontsize:{inline:"span",toggle:!1,styles:{fontSize:"%value"},clear_child_styles:!0},lineheight:{selector:"h1,h2,h3,h4,h5,h6,p,li,td,th,div",defaultBlock:"p",styles:{lineHeight:"%value"}},fontsize_class:{inline:"span",attributes:{class:"%value"}},blockquote:{block:"blockquote",wrapper:!0,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},code:{inline:"code"},link:{inline:"a",selector:"a",remove:"all",split:!0,deep:!0,onmatch:function(t,e,n){return Dn(t)&&t.hasAttribute("href")},onformat:function(e,n,r){ze.each(r,(function(n,r){t.setAttrib(e,r,n)}))}},lang:{inline:"span",clear_child_styles:!0,remove_similar:!0,attributes:{lang:"%value","data-mce-lang":function(t){var e;return null!==(e=null==t?void 0:t.customValue)&&void 0!==e?e:null}}},removeformat:[{selector:"b,strong,em,i,font,u,strike,s,sub,sup,dfn,code,samp,kbd,var,cite,mark,q,del,ins,small",remove:"all",split:!0,expand:!1,block_expand:!0,deep:!0},{selector:"span",attributes:["style","class"],remove:"empty",split:!0,expand:!1,deep:!0},{selector:"*",attributes:["style","class"],split:!1,expand:!1,deep:!0}]};return ze.each("p h1 h2 h3 h4 h5 h6 div address pre dt dd samp".split(/\s/),(function(t){e[t]={block:t,remove:"all"}})),e}(t.dom)),n(function(t){return t.getParam("formats")}(t)),{get:function(t){return y(t)?e[t]:e},has:function(t){return xt(e,t)},register:n,unregister:function(t){return t&&e[t]&&delete e[t],e}}},Iy=ze.each,Fy=pu.DOM,Uy=function(t,e){var n,r,o,i=e&&e.schema||Ti({}),a=function(t){r="string"==typeof t?{name:t,classes:[],attrs:{}}:t;var e=Fy.create(r.name);return function(t,e){e.classes.length&&Fy.addClass(t,e.classes.join(" ")),Fy.setAttribs(t,e.attrs)}(e,r),e},u=function(t,e,n){var r,o,c=e.length>0&&e[0],s=c&&c.name,l=function(t,e){var n="string"!=typeof t?t.nodeName.toLowerCase():t,r=i.getElementRule(n),o=r&&r.parentsRequired;return!(!o||!o.length)&&(e&&-1!==ze.inArray(o,e)?e:o[0])}(t,s);if(l)s===l?(o=e[0],e=e.slice(1)):o=l;else if(c)o=e[0],e=e.slice(1);else if(!n)return t;return o&&(r=a(o)).appendChild(t),n&&(r||(r=Fy.create("div")).appendChild(t),ze.each(n,(function(e){var n=a(e);r.insertBefore(n,t)}))),u(r,e,o&&o.siblings)};return t&&t.length?(r=t[0],n=a(r),(o=Fy.create("div")).appendChild(u(n,t.slice(1),r.siblings)),o):""},jy=function(t){var e,n={classes:[],attrs:{}};return"*"!==(t=n.selector=ze.trim(t))&&(e=t.replace(/(?:([#\.]|::?)([\w\-]+)|(\[)([^\]]+)\]?)/g,(function(t,e,r,o,i){switch(e){case"#":n.attrs.id=r;break;case".":n.classes.push(r);break;case":":-1!==ze.inArray("checked disabled enabled read-only required".split(" "),r)&&(n.attrs[r]=r)}if("["===o){var a=i.match(/([\w\-]+)(?:\=\"([^\"]+))?/);a&&(n.attrs[a[1]]=a[2])}return""}))),n.name=e||"div",n},Wy=function(t,e){var n,r,o,i="",a=function(t){var e=t.getParam("preview_styles","font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow");return d(e)?e:""}(t);if(""===a)return"";var u=function(t){return t.replace(/%(\w+)/g,"")};if("string"==typeof e){if(!(e=t.formatter.get(e)))return;e=e[0]}if("preview"in e){var c=yt(e,"preview");if(Kn(c,!1))return"";a=c.getOr(a)}n=e.block||e.inline||"span";var s,l=(s=e.selector)&&"string"==typeof s?(s=(s=s.split(/\s*,\s*/)[0]).replace(/\s*(~\+|~|\+|>)\s*/g,"$1"),ze.map(s.split(/(?:>|\s+(?![^\[\]]+\]))/),(function(t){var e=ze.map(t.split(/(?:~\+|~|\+)/),jy),n=e.pop();return e.length&&(n.siblings=e),n})).reverse()):[];l.length?(l[0].name||(l[0].name=n),n=e.selector,r=Uy(l,t)):r=Uy([n],t);var f=Fy.select(n,r)[0]||r.firstChild;return Iy(e.styles,(function(t,e){var n=u(t);n&&Fy.setStyle(f,e,n)})),Iy(e.attributes,(function(t,e){var n=u(t);n&&Fy.setAttrib(f,e,n)})),Iy(e.classes,(function(t){var e=u(t);Fy.hasClass(f,e)||Fy.addClass(f,e)})),t.fire("PreviewFormats"),Fy.setStyles(r,{position:"absolute",left:-65535}),t.getBody().appendChild(r),o=Fy.getStyle(t.getBody(),"fontSize",!0),o=/px$/.test(o)?parseInt(o,10):0,Iy(a.split(" "),(function(e){var n=Fy.getStyle(f,e,!0);if(!("background-color"===e&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(n)&&(n=Fy.getStyle(t.getBody(),e,!0),"#ffffff"===Fy.toHex(n).toLowerCase())||"color"===e&&"#000000"===Fy.toHex(n).toLowerCase())){if("font-size"===e&&/em|%$/.test(n)){if(0===o)return;n=parseFloat(n)/(/%$/.test(n)?100:1)*o+"px"}"border"===e&&n&&(i+="padding:0 2px;"),i+=e+":"+n+";"}})),t.fire("AfterPreviewFormats"),Fy.remove(r),i},qy=function(t){var e=Py(t),n=wu(null);return function(t){t.addShortcut("meta+b","","Bold"),t.addShortcut("meta+i","","Italic"),t.addShortcut("meta+u","","Underline");for(var e=1;e<=6;e++)t.addShortcut("access+"+e,"",["FormatBlock",!1,"h"+e]);t.addShortcut("access+7","",["FormatBlock",!1,"p"]),t.addShortcut("access+8","",["FormatBlock",!1,"div"]),t.addShortcut("access+9","",["FormatBlock",!1,"address"])}(t),Ap(t),{get:e.get,has:e.has,register:e.register,unregister:e.unregister,apply:function(e,n,r){!function(t,e,n,r){tb(t).formatter.apply(e,n,r)}(t,e,n,r)},remove:function(e,n,r,o){!function(t,e,n,r,o){tb(t).formatter.remove(e,n,r,o)}(t,e,n,r,o)},toggle:function(e,n,r){!function(t,e,n,r){tb(t).formatter.toggle(e,n,r)}(t,e,n,r)},match:function(e,n,r,o){return function(t,e,n,r,o){return tb(t).formatter.match(e,n,r,o)}(t,e,n,r,o)},closest:function(e){return function(t,e){return tb(t).formatter.closest(e)}(t,e)},matchAll:function(e,n){return function(t,e,n){return tb(t).formatter.matchAll(e,n)}(t,e,n)},matchNode:function(e,n,r,o){return function(t,e,n,r,o){return tb(t).formatter.matchNode(e,n,r,o)}(t,e,n,r,o)},canApply:function(e){return function(t,e){return tb(t).formatter.canApply(e)}(t,e)},formatChanged:function(e,r,o,i){return function(t,e,n,r,o,i){return tb(t).formatter.formatChanged(e,n,r,o,i)}(t,n,e,r,o,i)},getCssText:z(Wy,t)}},Gy=function(t){switch(t.toLowerCase()){case"undo":case"redo":case"mcerepaint":case"mcefocus":return!0;default:return!1}},$y=function(t){var e=Eu(),n=wu(0),r=wu(0),o={data:[],typing:!1,beforeChange:function(){!function(t,e,n){tb(t).undoManager.beforeChange(e,n)}(t,n,e)},add:function(i,a){return function(t,e,n,r,o,i,a){return tb(t).undoManager.add(e,n,r,o,i,a)}(t,o,r,n,e,i,a)},undo:function(){return function(t,e,n,r){return tb(t).undoManager.undo(e,n,r)}(t,o,n,r)},redo:function(){return function(t,e,n){return tb(t).undoManager.redo(e,n)}(t,r,o.data)},clear:function(){!function(t,e,n){tb(t).undoManager.clear(e,n)}(t,o,r)},reset:function(){!function(t,e){tb(t).undoManager.reset(e)}(t,o)},hasUndo:function(){return function(t,e,n){return tb(t).undoManager.hasUndo(e,n)}(t,o,r)},hasRedo:function(){return function(t,e,n){return tb(t).undoManager.hasRedo(e,n)}(t,o,r)},transact:function(e){return function(t,e,n,r){return tb(t).undoManager.transact(e,n,r)}(t,o,n,e)},ignore:function(e){!function(t,e,n){tb(t).undoManager.ignore(e,n)}(t,n,e)},extra:function(e,n){!function(t,e,n,r,o){tb(t).undoManager.extra(e,n,r,o)}(t,o,r,e,n)}};return Jv(t)||function(t,e,n){var r=wu(!1),o=function(t){Xv(e,!1,n),e.add({},t)};t.on("init",(function(){e.add()})),t.on("BeforeExecCommand",(function(t){var r=t.command;Gy(r)||(Kv(e,n),e.beforeChange())})),t.on("ExecCommand",(function(t){var e=t.command;Gy(e)||o(t)})),t.on("ObjectResizeStart cut",(function(){e.beforeChange()})),t.on("SaveContent ObjectResized blur",o),t.on("dragend",o),t.on("keyup",(function(n){var i=n.keyCode;n.isDefaultPrevented()||((i>=33&&i<=36||i>=37&&i<=40||45===i||n.ctrlKey)&&(o(),t.nodeChanged()),46!==i&&8!==i||t.nodeChanged(),r.get()&&e.typing&&!1===Gv(Uv(t),e.data[0])&&(!1===t.isDirty()&&(t.setDirty(!0),t.fire("change",{level:e.data[0],lastLevel:null})),t.fire("TypingUndo"),r.set(!1),t.nodeChanged()))})),t.on("keydown",(function(t){var i=t.keyCode;if(!t.isDefaultPrevented())if(i>=33&&i<=36||i>=37&&i<=40||45===i)e.typing&&o(t);else{var a=t.ctrlKey&&!t.altKey||t.metaKey;!(i<16||i>20)||224===i||91===i||e.typing||a||(e.beforeChange(),Xv(e,!0,n),e.add({},t),r.set(!0))}})),t.on("mousedown",(function(t){e.typing&&o(t)})),t.on("input",(function(t){var e;t.inputType&&("insertReplacementText"===t.inputType||"insertText"===(e=t).inputType&&null===e.data||function(t){return"insertFromPaste"===t.inputType||"insertFromDrop"===t.inputType}(t))&&o(t)})),t.on("AddUndo Undo Redo ClearUndos",(function(e){e.isDefaultPrevented()||t.nodeChanged()}))}(t,o,n),function(t){t.addShortcut("meta+z","","Undo"),t.addShortcut("meta+y,meta+shift+z","","Redo")}(t),o},Xy=[9,27,id.HOME,id.END,19,20,44,144,145,33,34,45,16,17,18,91,92,93,id.DOWN,id.UP,id.LEFT,id.RIGHT].concat(Se.browser.isFirefox()?[224]:[]),Ky="data-mce-placeholder",Yy=function(t){return"keydown"===t.type||"keyup"===t.type},Jy=function(t){var e=t.keyCode;return e===id.BACKSPACE||e===id.DELETE},Qy=function(t){var e=t.dom,n=ns(t),r=function(t){return t.getParam("placeholder",Zc.getAttrib(t.getElement(),"placeholder"),"string")}(t),o=function(i,a){if(!function(t){if(Yy(t)){var e=t.keyCode;return!Jy(t)&&(id.metaKeyPressed(t)||t.altKey||e>=112&&e<=123||U(Xy,e))}return!1}(i)){var u=t.getBody(),c=!function(t){return Yy(t)&&!(Jy(t)||"keyup"===t.type&&229===t.keyCode)}(i)&&function(t,e,n){if(ei(Me.fromDom(e),!1)){var r=""===n,o=e.firstElementChild;return!o||!t.getStyle(e.firstElementChild,"padding-left")&&!t.getStyle(e.firstElementChild,"padding-right")&&(r?!t.isBlock(o):n===o.nodeName.toLowerCase())}return!1}(e,u,n);(""!==e.getAttrib(u,Ky)!==c||a)&&(e.setAttrib(u,Ky,c?r:null),e.setAttrib(u,"aria-placeholder",c?r:null),function(t,e){t.fire("PlaceholderToggle",{state:e})}(t,c),t.on(c?"keydown":"keyup",o),t.off(c?"keyup":"keydown",o))}};r&&t.on("init",(function(e){o(e,!0),t.on("change SetContent ExecCommand",o),t.on("paste",(function(e){return oo.setEditorTimeout(t,(function(){return o(e)}))}))}))},Zy=/[\u0591-\u07FF\uFB1D-\uFDFF\uFE70-\uFEFC]/,tx=function(t,e){return Ae(Me.fromDom(e),function(t){return t.getParam("inline_boundaries_selector","a[href],code,.mce-annotation","string")}(t))},ex=function(t){return"rtl"===pu.DOM.getStyle(t,"direction",!0)||(e=t.textContent,Zy.test(e));var e},nx=function(t,e,n){var r=function(t,e,n){return X(pu.DOM.getParents(n.container(),"*",e),t)}(t,e,n);return L.from(r[r.length-1])},rx=function(t,e){if(!e)return e;var n=e.container(),r=e.offset();return t?Eo(n)?Pn(n.nextSibling)?Tc(n.nextSibling,0):Tc.after(n):Mo(e)?Tc(n,r+1):e:Eo(n)?Pn(n.previousSibling)?Tc(n.previousSibling,n.previousSibling.data.length):Tc.before(n):Do(e)?Tc(n,r-1):e},ox=z(rx,!0),ix=z(rx,!1),ax=function(t){return go(t)||po(t)},ux=function(t,e){return He(t,e)?Kr(e,ax,function(t){return function(e){return Be(t,Me.fromDom(e.dom.parentNode))}}(t)):L.none()},cx=function(t){t.dom.isEmpty(t.getBody())&&(t.setContent(""),function(t){var e=t.getBody(),n=e.firstChild&&t.dom.isBlock(e.firstChild)?e.firstChild:e;t.selection.setCursorLocation(n,0)}(t))},sx=function(t,e){return{from:t,to:e}},lx=function(t,e){var n=Me.fromDom(t),r=Me.fromDom(e.container());return ux(n,r).map((function(t){return function(t,e){return{block:t,position:e}}(t,e)}))},fx=function(t,e,n){var r=lx(t,Tc.fromRangeStart(n)),o=r.bind((function(n){return Tl(e,t,n.position).bind((function(n){return lx(t,n).map((function(n){return function(t,e,n){return jn(n.position.getNode())&&!1===ei(n.block)?Al(!1,n.block.dom).bind((function(r){return r.isEqual(n.position)?Tl(e,t,r).bind((function(e){return lx(t,e)})):L.some(n)})).getOr(n):n}(t,e,n)}))}))}));return Yn(r,o,sx).filter((function(t){return function(t){return!1===Be(t.from.block,t.to.block)}(t)&&function(t){return $e(t.from.block).bind((function(e){return $e(t.to.block).filter((function(t){return Be(e,t)}))})).isSome()}(t)&&function(t){return!1===Gn(t.from.block.dom)&&!1===Gn(t.to.block.dom)}(t)}))},dx=function(t){var e=Qe(t);return Z(e,lo).fold(_(e),(function(t){return e.slice(0,t)}))},mx=function(t){var e=dx(t);return q(e,vn),e},gx=function(t,e){var n=Og(e,t);return Q(n.reverse(),(function(t){return ei(t)})).each(vn)},hx=function(t,e,n,r){if(ei(n))return Cg(n),Rl(n.dom);0===X(Ye(r),(function(t){return!ei(t)})).length&&ei(e)&&fn(r,Me.fromTag("br"));var o=Bl(n.dom,Tc.before(r.dom));return q(mx(e),(function(t){fn(r,t)})),gx(t,e),o},px=function(t,e,n){if(ei(n))return vn(n),ei(e)&&Cg(e),Rl(e.dom);var r=Hl(n.dom);return q(mx(e),(function(t){gn(n,t)})),gx(t,e),r},vx=function(t,e){return He(e,t)?function(t,e){var n=Og(e,t);return L.from(n[n.length-1])}(e,t):L.none()},bx=function(t,e){Al(t,e.dom).map((function(t){return t.getNode()})).map(Me.fromDom).filter(mo).each(vn)},yx=function(t,e,n){return bx(!0,e),bx(!1,n),vx(e,n).fold(z(px,t,e,n),z(hx,t,e,n))},xx=function(t,e,n,r){return e?yx(t,r,n):yx(t,n,r)},wx=function(t,e){var n=Me.fromDom(t.getBody()),r=function(t,e,n){return n.collapsed?fx(t,e,n):L.none()}(n.dom,e,t.selection.getRng()).bind((function(t){return xx(n,e,t.from.block,t.to.block)}));return r.each((function(e){t.selection.setRng(e.toRange())})),r.isSome()},Cx=function(t,e){var n=Me.fromDom(e),r=z(Be,t);return Xr(n,bo,r).isSome()},Sx=function(t,e){var n=Bl(t.dom,Tc.fromRangeStart(e)).isNone(),r=Nl(t.dom,Tc.fromRangeEnd(e)).isNone();return!function(t,e){return Cx(t,e.startContainer)||Cx(t,e.endContainer)}(t,e)&&n&&r},kx=function(t){var e=Me.fromDom(t.getBody()),n=t.selection.getRng();return Sx(e,n)?function(t){return t.setContent(""),t.selection.setCursorLocation(),!0}(t):function(t,e){var n=e.getRng();return Yn(ux(t,Me.fromDom(n.startContainer)),ux(t,Me.fromDom(n.endContainer)),(function(r,o){return!1===Be(r,o)&&(n.deleteContents(),xx(t,!0,r,o).each((function(t){e.setRng(t.toRange())})),!0)})).getOr(!1)}(e,t.selection)},_x=function(t,e){return!t.selection.isCollapsed()&&kx(t)},Ox=qn,Ex=Gn,zx=function(t,e,n,r,o){return L.from(e._selectionOverrides.showCaret(t,n,r,o))},Tx=function(t,e){return t.fire("BeforeObjectSelected",{target:e}).isDefaultPrevented()?L.none():L.some(function(t){var e=t.ownerDocument.createRange();return e.selectNode(t),e}(e))},Mx=function(t,e,n){var r=ul(1,t.getBody(),e),o=Tc.fromRangeStart(r),i=o.getNode();if(Is(i))return zx(1,t,i,!o.isAtEnd(),!1);var a=o.getNode(!0);if(Is(a))return zx(1,t,a,!1,!1);var u=t.dom.getParent(o.getNode(),(function(t){return Ex(t)||Ox(t)}));return Is(u)?zx(1,t,u,!1,n):L.none()},Dx=function(t,e,n){return e.collapsed?Mx(t,e,n).getOr(e):e},Ax=function(t){return yg(t)||hg(t)},Nx=function(t){return xg(t)||pg(t)},Bx=function(t,e,n,r,o,i){return zx(r,t,i.getNode(!o),o,!0).each((function(n){if(e.collapsed){var r=e.cloneRange();o?r.setEnd(n.startContainer,n.startOffset):r.setStart(n.endContainer,n.endOffset),r.deleteContents()}else e.deleteContents();t.selection.setRng(n)})),function(t,e){Pn(e)&&0===e.data.length&&t.remove(e)}(t.dom,n),!0},Rx=function(t,e){return function(t,e){var n=t.selection.getRng();if(!Pn(n.commonAncestorContainer))return!1;var r=e?Mc.Forwards:Mc.Backwards,o=kl(t.getBody()),i=z(fl,e?o.next:o.prev),a=e?Ax:Nx,u=sl(r,t.getBody(),n),c=rx(e,i(u));if(!c||!dl(u,c))return!1;if(a(c))return Bx(t,n,u.getNode(),r,e,c);var s=i(c);return!!(s&&a(s)&&dl(c,s))&&Bx(t,n,u.getNode(),r,e,s)}(t,e)},Hx=_r([{remove:["element"]},{moveToElement:["element"]},{moveToPosition:["position"]}]),Lx=function(t,e,n,r){var o=r.getNode(!1===e);return ux(Me.fromDom(t),Me.fromDom(n.getNode())).map((function(t){return ei(t)?Hx.remove(t.dom):Hx.moveToElement(o)})).orThunk((function(){return L.some(Hx.moveToElement(o))}))},Vx=function(t,e,n){return Tl(e,t,n).bind((function(r){return o=r.getNode(),bo(Me.fromDom(o))||po(Me.fromDom(o))||function(t,e,n,r){var o=function(e){return fo(Me.fromDom(e))&&!tl(n,r,t)};return cl(!e,n).fold((function(){return cl(e,r).fold(A,o)}),o)}(t,e,n,r)?L.none():e&&Gn(r.getNode())||!1===e&&Gn(r.getNode(!0))?Lx(t,e,n,r):e&&xg(n)||!1===e&&yg(n)?L.some(Hx.moveToPosition(r)):L.none();var o}))},Px=function(t,e,n){return function(t,e){var n=e.getNode(!1===t),r=t?"after":"before";return Dn(n)&&n.getAttribute("data-mce-caret")===r}(e,n)?function(t,e){return t&&Gn(e.nextSibling)?L.some(Hx.moveToElement(e.nextSibling)):!1===t&&Gn(e.previousSibling)?L.some(Hx.moveToElement(e.previousSibling)):L.none()}(e,n.getNode(!1===e)).fold((function(){return Vx(t,e,n)}),L.some):Vx(t,e,n).bind((function(e){return function(t,e,n){return n.fold((function(t){return L.some(Hx.remove(t))}),(function(t){return L.some(Hx.moveToElement(t))}),(function(n){return tl(e,n,t)?L.none():L.some(Hx.moveToPosition(n))}))}(t,n,e)}))},Ix=function(t,e){return L.from(td(t.getBody(),e))},Fx=function(t,e){var n=t.selection.getNode();return Ix(t,n).filter(Gn).fold((function(){return function(t,e,n){var r=ul(e?1:-1,t,n),o=Tc.fromRangeStart(r),i=Me.fromDom(t);return!1===e&&xg(o)?L.some(Hx.remove(o.getNode(!0))):e&&yg(o)?L.some(Hx.remove(o.getNode())):!1===e&&yg(o)&&Vg(i,o)?Pg(i,o).map((function(t){return Hx.remove(t.getNode())})):e&&xg(o)&&Lg(i,o)?Ig(i,o).map((function(t){return Hx.remove(t.getNode())})):Px(t,e,o)}(t.getBody(),e,t.selection.getRng()).exists((function(n){return n.fold(function(t,e){return function(n){return t._selectionOverrides.hideFakeCaret(),hh(t,e,Me.fromDom(n)),!0}}(t,e),function(t,e){return function(n){var r=e?Tc.before(n):Tc.after(n);return t.selection.setRng(r.toRange()),!0}}(t,e),function(t){return function(e){return t.selection.setRng(e.toRange()),!0}}(t))}))}),N)},Ux=function(t,e){var n=t.selection.getNode();return!(!Gn(n)||$n(n))&&Ix(t,n.parentNode).filter(Gn).fold((function(){var n;return n=Me.fromDom(t.getBody()),q(Vu(n,".mce-offscreen-selection"),vn),hh(t,e,Me.fromDom(t.selection.getNode())),cx(t),!0}),N)},jx=function(t){var e=t.dom,n=t.selection,r=td(t.getBody(),n.getNode());if(qn(r)&&e.isBlock(r)&&e.isEmpty(r)){var o=e.create("br",{"data-mce-bogus":"1"});e.setHTML(r,""),r.appendChild(o),n.setRng(Tc.before(o).toRange())}return!0},Wx=function(t,e){return t.selection.isCollapsed()?Fx(t,e):Ux(t,e)},qx=function(t,e){return!!t.selection.isCollapsed()&&function(t,e){var n=Tc.fromRangeStart(t.selection.getRng());return Tl(e,t.getBody(),n).filter((function(t){return e?mg(t):gg(t)})).bind((function(t){return L.from(el(e?0:-1,t))})).exists((function(e){return t.selection.select(e),!0}))}(t,e)},Gx=Pn,$x=function(t){return Gx(t)&&t.data[0]===wo},Xx=function(t){return Gx(t)&&t.data[t.data.length-1]===wo},Kx=function(t){return t.ownerDocument.createTextNode(wo)},Yx=function(t,e){return t?function(t){if(Gx(t.previousSibling))return Xx(t.previousSibling)||t.previousSibling.appendData(wo),t.previousSibling;if(Gx(t))return $x(t)||t.insertData(0,wo),t;var e=Kx(t);return t.parentNode.insertBefore(e,t),e}(e):function(t){if(Gx(t.nextSibling))return $x(t.nextSibling)||t.nextSibling.insertData(0,wo),t.nextSibling;if(Gx(t))return Xx(t)||t.appendData(wo),t;var e=Kx(t);return t.nextSibling?t.parentNode.insertBefore(e,t.nextSibling):t.parentNode.appendChild(e),e}(e)},Jx=z(Yx,!0),Qx=z(Yx,!1),Zx=function(t,e){return Pn(t.container())?Yx(e,t.container()):Yx(e,t.getNode())},tw=function(t,e){var n=e.get();return n&&t.container()===n&&Eo(n)},ew=function(t,e){return e.fold((function(e){As(t.get());var n=Jx(e);return t.set(n),L.some(Tc(n,n.length-1))}),(function(e){return Rl(e).map((function(e){if(tw(e,t))return Tc(t.get(),1);As(t.get());var n=Zx(e,!0);return t.set(n),Tc(n,1)}))}),(function(e){return Hl(e).map((function(e){if(tw(e,t))return Tc(t.get(),t.get().length-1);As(t.get());var n=Zx(e,!1);return t.set(n),Tc(n,n.length-1)}))}),(function(e){As(t.get());var n=Qx(e);return t.set(n),L.some(Tc(n,1))}))},nw=function(t,e){for(var n=0;n<t.length;n++){var r=t[n].apply(null,e);if(r.isSome())return r}return L.none()},rw=_r([{before:["element"]},{start:["element"]},{end:["element"]},{after:["element"]}]),ow=function(t,e){var n=Zs(e,t);return n||t},iw=function(t,e,n){var r=ox(n),o=ow(e,r.container());return nx(t,o,r).fold((function(){return Nl(o,r).bind(z(nx,t,o)).map((function(t){return rw.before(t)}))}),L.none)},aw=function(t,e){return null===Pl(t,e)},uw=function(t,e,n){return nx(t,e,n).filter(z(aw,e))},cw=function(t,e,n){var r=ix(n);return uw(t,e,r).bind((function(t){return Bl(t,r).isNone()?L.some(rw.start(t)):L.none()}))},sw=function(t,e,n){var r=ox(n);return uw(t,e,r).bind((function(t){return Nl(t,r).isNone()?L.some(rw.end(t)):L.none()}))},lw=function(t,e,n){var r=ix(n),o=ow(e,r.container());return nx(t,o,r).fold((function(){return Bl(o,r).bind(z(nx,t,o)).map((function(t){return rw.after(t)}))}),L.none)},fw=function(t){return!1===ex(mw(t))},dw=function(t,e,n){return nw([iw,cw,sw,lw],[t,e,n]).filter(fw)},mw=function(t){return t.fold(O,O,O,O)},gw=function(t){return t.fold(_("before"),_("start"),_("end"),_("after"))},hw=function(t){return t.fold(rw.before,rw.before,rw.after,rw.after)},pw=function(t){return t.fold(rw.start,rw.start,rw.end,rw.end)},vw=function(t,e,n,r,o,i){return Yn(nx(e,n,r),nx(e,n,o),(function(e,r){return e!==r&&function(t,e,n){var r=Zs(e,t),o=Zs(n,t);return r&&r===o}(n,e,r)?rw.after(t?e:r):i})).getOr(i)},bw=function(t,e){return t.fold(N,(function(t){return r=e,!(gw(n=t)===gw(r)&&mw(n)===mw(r));var n,r}))},yw=function(t,e){return t?e.fold(S(L.some,rw.start),L.none,S(L.some,rw.after),L.none):e.fold(L.none,S(L.some,rw.before),L.none,S(L.some,rw.end))},xw=function(t,e,n,r){var o=rx(t,r),i=dw(e,n,o);return dw(e,n,o).bind(z(yw,t)).orThunk((function(){return function(t,e,n,r,o){var i=rx(t,o);return Tl(t,n,i).map(z(rx,t)).fold((function(){return r.map(hw)}),(function(o){return dw(e,n,o).map(z(vw,t,e,n,i,o)).filter(z(bw,r))})).filter(fw)}(t,e,n,i,r)}))};z(xw,!1),z(xw,!0);var ww,Cw=function(t,e,n){var r=t?1:-1;return e.setRng(Tc(n.container(),n.offset()+r).toRange()),e.getSel().modify("move",t?"forward":"backward","word"),!0},Sw=function(t,e){var n=e.selection.getRng(),r=t?Tc.fromRangeEnd(n):Tc.fromRangeStart(n);return!!function(t){return x(t.selection.getSel().modify)}(e)&&(t&&Mo(r)?Cw(!0,e.selection,r):!(t||!Do(r))&&Cw(!1,e.selection,r))};!function(t){t[t.Br=0]="Br",t[t.Block=1]="Block",t[t.Wrap=2]="Wrap",t[t.Eol=3]="Eol"}(ww||(ww={}));var kw,_w=function(t,e){return t===Mc.Backwards?nt(e):e},Ow=function(t,e,n){return t===Mc.Forwards?e.next(n):e.prev(n)},Ew=function(t,e,n,r){return jn(r.getNode(e===Mc.Forwards))?ww.Br:!1===tl(n,r)?ww.Block:ww.Wrap},zw=function(t,e,n,r){for(var o=kl(n),i=r,a=[];i;){var u=Ow(e,o,i);if(!u)break;if(jn(u.getNode(!1)))return e===Mc.Forwards?{positions:_w(e,a).concat([u]),breakType:ww.Br,breakAt:L.some(u)}:{positions:_w(e,a),breakType:ww.Br,breakAt:L.some(u)};if(u.isVisible()){if(t(i,u)){var c=Ew(0,e,i,u);return{positions:_w(e,a),breakType:c,breakAt:L.some(u)}}a.push(u),i=u}else i=u}return{positions:_w(e,a),breakType:ww.Eol,breakAt:L.none()}},Tw=function(t,e,n,r){return e(n,r).breakAt.map((function(r){var o=e(n,r).positions;return t===Mc.Backwards?o.concat(r):[r].concat(o)})).getOr([])},Mw=function(t,e){return Y(t,(function(t,n){return t.fold((function(){return L.some(n)}),(function(r){return Yn(at(r.getClientRects()),at(n.getClientRects()),(function(t,o){var i=Math.abs(e-t.left);return Math.abs(e-o.left)<=i?n:r})).or(t)}))}),L.none())},Dw=function(t,e){return at(e.getClientRects()).bind((function(e){return Mw(t,e.left)}))},Aw=z(zw,Tc.isAbove,-1),Nw=z(zw,Tc.isBelow,1),Bw=z(Tw,-1,Aw),Rw=z(Tw,1,Nw),Hw=function(t){var e=function(e){return W(e,(function(e){var n=ec(e);return n.node=t,n}))};if(Dn(t))return e(t.getClientRects());if(Pn(t)){var n=t.ownerDocument.createRange();return n.setStart(t,0),n.setEnd(t,t.data.length),e(n.getClientRects())}},Lw=function(t){return tt(t,Hw)};!function(t){t[t.Up=-1]="Up",t[t.Down=1]="Down"}(kw||(kw={}));var Vw,Pw,Iw=function(t,e,n,r,o,i){var a=0,u=[],c=function(r){var i=Lw([r]);-1===t&&(i=i.reverse());for(var c=0;c<i.length;c++){var l=i[c];if(!n(l,s)){if(u.length>0&&e(l,Tt(u))&&a++,l.line=a,o(l))return!0;u.push(l)}}},s=Tt(i.getClientRects());if(!s)return u;var l=i.getNode();return c(l),function(t,e,n,r){for(;r=Qs(r,t,$o,e);)if(n(r))return}(t,r,c,l),u},Fw=z(Iw,kw.Up,oc,ic),Uw=z(Iw,kw.Down,ic,oc),jw=function(t){return function(e){return function(t,e){return e.line>t}(t,e)}},Ww=function(t){return function(e){return function(t,e){return e.line===t}(t,e)}},qw=Gn,Gw=Qs,$w=function(t,e){return Math.abs(t.left-e)},Xw=function(t,e){return Math.abs(t.right-e)},Kw=function(t,e){return t>=e.left&&t<=e.right},Yw=function(t,e){return t>=e.top&&t<=e.bottom},Jw=function(t,e,n){return void 0===n&&(n=N),Et(t,(function(t,r){if(Kw(e,r))return n(r)?r:t;if(Kw(e,t))return n(t)?t:r;var o=Math.min($w(t,e),Xw(t,e)),i=Math.min($w(r,e),Xw(r,e));return i===o&&wt(r,"node")&&qw(r.node)||i<o?r:t}))},Qw=function(t,e,n,r,o){var i=Gw(r,t,$o,e,!o);do{if(!i||n(i))return}while(i=Gw(i,t,$o,e))},Zw=function(t,e,n){var r=Lw(function(t){return X(ct(t.getElementsByTagName("*")),Fs)}(t)),o=X(r,z(Yw,n)),i=function(t){return!Hn(t.node)&&!Xn(t.node)},a=Jw(o,e,i);if(a){var u=i(a);if((a=Jw(function(t,e,n){void 0===n&&(n=!0);var r=[],o=function(t,n){var o=X(Lw([n]),(function(n){return!t(n,e)}));return r=r.concat(o),0===o.length};return r.push(e),Qw(kw.Up,t,z(o,oc),e.node,n),Qw(kw.Down,t,z(o,ic),e.node,n),r}(t,a,u),e,i))&&Fs(a.node))return function(t,e){return{node:t.node,before:$w(t,e)<Xw(t,e)}}(a,e)}return null},tC=function(t,e){t.selection.setRng(e),Wd(t,t.selection.getRng())},eC=function(t,e,n){return L.some(Dx(t,e,n))},nC=function(t,e,n,r,o,i){var a=e===Mc.Forwards,u=kl(t.getBody()),c=z(fl,a?u.next:u.prev),s=a?r:o;if(!n.collapsed){var l=uc(n);if(i(l))return zx(e,t,l,e===Mc.Backwards,!1)}var f=sl(e,t.getBody(),n);if(s(f))return Tx(t,f.getNode(!a));var d=rx(a,c(f)),m=Ho(n);if(!d)return m?L.some(n):L.none();if(s(d))return zx(e,t,d.getNode(!a),a,!1);var g=c(d);return g&&s(g)&&dl(d,g)?zx(e,t,g.getNode(!a),a,!1):m?eC(t,d.toRange(),!1):L.none()},rC=function(t,e,n,r,o,i){var a=sl(e,t.getBody(),n),u=Tt(a.getClientRects()),c=e===kw.Down;if(!u)return L.none();var s,l=(c?Uw:Fw)(t.getBody(),jw(1),a),f=X(l,Ww(1)),d=u.left,m=Jw(f,d);if(m&&i(m.node)){var g=Math.abs(d-m.left),h=Math.abs(d-m.right);return zx(e,t,m.node,g<h,!1)}if(s=r(a)?a.getNode():o(a)?a.getNode(!0):uc(n)){var p=function(t,e,n,r){var o,i,a,u,c=kl(e),s=[],l=0,f=function(t){return Tt(t.getClientRects())};1===t?(o=c.next,i=ic,a=oc,u=Tc.after(r)):(o=c.prev,i=oc,a=ic,u=Tc.before(r));var d=f(u);do{if(u.isVisible()){var m=f(u);if(!a(m,d)){s.length>0&&i(m,Tt(s))&&l++;var g=ec(m);if(g.position=u,g.line=l,n(g))return s;s.push(g)}}}while(u=o(u));return s}(e,t.getBody(),jw(1),s),v=Jw(X(p,Ww(1)),d);if(v)return eC(t,v.position.toRange(),!1);if(v=Tt(X(p,Ww(0))))return eC(t,v.position.toRange(),!1)}return 0===f.length?oC(t,c).filter(c?o:r).map((function(e){return Dx(t,e.toRange(),!1)})):L.none()},oC=function(t,e){var n=t.selection.getRng(),r=t.getBody();if(e){var o=Tc.fromRangeEnd(n),i=Nw(r,o);return ut(i.positions)}o=Tc.fromRangeStart(n),i=Aw(r,o);return at(i.positions)},iC=function(t,e,n){return oC(t,e).filter(n).exists((function(e){return t.selection.setRng(e.toRange()),!0}))},aC=function(t,e){var n=t.dom.createRng();n.setStart(e.container(),e.offset()),n.setEnd(e.container(),e.offset()),t.selection.setRng(n)},uC=function(t,e){t?e.setAttribute("data-mce-selected","inline-boundary"):e.removeAttribute("data-mce-selected")},cC=function(t,e,n){return ew(e,n).map((function(e){return aC(t,e),n}))},sC=function(t,e){if(t.selection.isCollapsed()&&!0!==t.composing&&e.get()){var n=Tc.fromRangeStart(t.selection.getRng());Tc.isTextPosition(n)&&!1===function(t){return Mo(t)||Do(t)}(n)&&(aC(t,Ds(e.get(),n)),e.set(null))}},lC=function(t,e,n){return!!xs(t)&&function(t,e,n){var r=t.getBody(),o=Tc.fromRangeStart(t.selection.getRng()),i=z(tx,t);return xw(n,i,r,o).bind((function(n){return cC(t,e,n)}))}(t,e,n).isSome()},fC=function(t,e,n){return!!xs(e)&&Sw(t,e)},dC=function(t){var e=wu(null),n=z(tx,t);return t.on("NodeChange",(function(r){!xs(t)||Se.browser.isIE()&&r.initial||(function(t,e,n){var r=W(Vu(Me.fromDom(e.getRoot()),'*[data-mce-selected="inline-boundary"]'),(function(t){return t.dom})),o=X(r,t),i=X(n,t);q(rt(o,i),z(uC,!1)),q(rt(i,o),z(uC,!0))}(n,t.dom,r.parents),sC(t,e),function(t,e,n,r){if(e.selection.isCollapsed()){var o=X(r,t);q(o,(function(r){var o=Tc.fromRangeStart(e.selection.getRng());dw(t,e.getBody(),o).bind((function(t){return cC(e,n,t)}))}))}}(n,t,e,r.parents))})),e},mC=z(fC,!0),gC=z(fC,!1),hC=function(t,e,n){if(xs(t)){var r=oC(t,e).getOrThunk((function(){var n=t.selection.getRng();return e?Tc.fromRangeEnd(n):Tc.fromRangeStart(n)}));return dw(z(tx,t),t.getBody(),r).exists((function(e){var r=hw(e);return ew(n,r).exists((function(e){return aC(t,e),!0}))}))}return!1},pC=function(t,e){return function(n){return ew(e,n).exists((function(e){return aC(t,e),!0}))}},vC=function(t,e,n,r){var o=t.getBody(),i=z(tx,t);t.undoManager.ignore((function(){t.selection.setRng(function(t,e){var n=document.createRange();return n.setStart(t.container(),t.offset()),n.setEnd(e.container(),e.offset()),n}(n,r)),t.execCommand("Delete"),dw(i,o,Tc.fromRangeStart(t.selection.getRng())).map(pw).map(pC(t,e))})),t.nodeChanged()},bC=function(t,e,n,r){var o=function(t,e){return Zs(e,t)||t}(t.getBody(),r.container()),i=z(tx,t),a=dw(i,o,r);return a.bind((function(t){return n?t.fold(_(L.some(pw(t))),L.none,_(L.some(hw(t))),L.none):t.fold(L.none,_(L.some(hw(t))),L.none,_(L.some(pw(t))))})).map(pC(t,e)).getOrThunk((function(){var u=Ml(n,o,r),c=u.bind((function(t){return dw(i,o,t)}));return Yn(a,c,(function(){return nx(i,o,r).exists((function(e){return!!function(t){return Yn(Rl(t),Hl(t),(function(e,n){var r=rx(!0,e),o=rx(!1,n);return Nl(t,r).forall((function(t){return t.isEqual(o)}))})).getOr(!0)}(e)&&(hh(t,n,Me.fromDom(e)),!0)}))})).orThunk((function(){return c.bind((function(o){return u.map((function(o){return n?vC(t,e,r,o):vC(t,e,o,r),!0}))}))})).getOr(!1)}))},yC=function(t,e,n){if(t.selection.isCollapsed()&&xs(t)){var r=Tc.fromRangeStart(t.selection.getRng());return bC(t,e,n,r)}return!1},xC=function(t){return 1===nn(t)},wC=function(t,e,n,r){var o=z(Np,e),i=W(X(r,o),(function(t){return t.dom}));if(0===i.length)hh(e,t,n);else{var a=function(t,e){var n=Op(!1),r=Mp(e,n.dom);return fn(Me.fromDom(t),n),vn(Me.fromDom(t)),Tc(r,0)}(n.dom,i);e.selection.setRng(a.toRange())}},CC=function(t,e){var n=Me.fromDom(t.getBody()),r=Me.fromDom(t.selection.getStart()),o=X(function(t,e){var n=Og(e,t);return Z(n,lo).fold(_(n),(function(t){return n.slice(0,t)}))}(n,r),xC);return ut(o).exists((function(n){var r,i=Tc.fromRangeStart(t.selection.getRng());return!(!function(t,e,n){return Yn(Rl(n),Hl(n),(function(r,o){var i=rx(!0,r),a=rx(!1,o),u=rx(!1,e);return t?Nl(n,u).exists((function(t){return t.isEqual(a)&&e.isEqual(i)})):Bl(n,u).exists((function(t){return t.isEqual(i)&&e.isEqual(a)}))})).getOr(!0)}(e,i,n.dom)||(r=n,Vl(r.dom)&&kp(r.dom)))&&(wC(e,t,n,o),!0)}))},SC=function(t,e){return!!t.selection.isCollapsed()&&CC(t,e)},kC=function(t,e,n){return t._selectionOverrides.hideFakeCaret(),hh(t,e,Me.fromDom(n)),!0},_C=function(t,e){return t.selection.isCollapsed()?function(t,e){var n=e?hg:pg,r=e?Mc.Forwards:Mc.Backwards,o=sl(r,t.getBody(),t.selection.getRng());return n(o)?kC(t,e,o.getNode(!e)):L.from(rx(e,o)).filter((function(t){return n(t)&&dl(o,t)})).exists((function(n){return kC(t,e,n.getNode(!e))}))}(t,e):function(t,e){var n=t.selection.getNode();return!!Xn(n)&&kC(t,e,n)}(t,e)},OC=function(t){var e=parseInt(t,10);return isNaN(e)?0:e},EC=function(t,e){return(t||"table"===Le(e)?"margin":"padding")+("rtl"===ir(e,"direction")?"-right":"-left")},zC=function(t){var e=MC(t);return!t.mode.isReadOnly()&&(e.length>1||function(t,e){return et(e,(function(e){var n=EC(gs(t),e),r=ur(e,n).map(OC).getOr(0);return"false"!==t.dom.getContentEditable(e.dom)&&r>0}))}(t,e))},TC=function(t){return ho(t)||po(t)},MC=function(t){return X((e=t.selection.getSelectedBlocks(),W(e,Me.fromDom)),(function(t){return!TC(t)&&!function(t){return $e(t).exists(TC)}(t)&&Kr(t,(function(t){return qn(t.dom)||Gn(t.dom)})).exists((function(t){return qn(t.dom)}))}));var e},DC=function(t,e){var n=t.dom,r=t.selection,o=t.formatter,i=function(t){return t.getParam("indentation","40px","string")}(t),a=/[a-z%]+$/i.exec(i)[0],u=parseInt(i,10),c=gs(t),s=ns(t);t.queryCommandState("InsertUnorderedList")||t.queryCommandState("InsertOrderedList")||""!==s||n.getParent(r.getNode(),n.isBlock)||o.apply("div"),q(MC(t),(function(t){!function(t,e,n,r,o,i){var a=EC(n,Me.fromDom(i));if("outdent"===e){var u=Math.max(0,OC(i.style[a])-r);t.setStyle(i,a,u?u+o:"")}else u=OC(i.style[a])+r+o,t.setStyle(i,a,u)}(n,e,c,u,a,t.dom)}))},AC=function(t,e){if(t.selection.isCollapsed()&&zC(t)){var n=t.dom,r=t.selection.getRng(),o=Tc.fromRangeStart(r),i=n.getParent(r.startContainer,n.isBlock);if(null!==i&&Dg(Me.fromDom(i),o))return DC(t,"outdent"),!0}return!1},NC=function(t,e){t.getDoc().execCommand(e,!1,null)},BC=function(t,e){t.addCommand("delete",(function(){!function(t,e){AC(t)||Wx(t,!1)||Rx(t,!1)||yC(t,e,!1)||wx(t,!1)||qh(t)||qx(t,!1)||_C(t,!1)||_x(t)||SC(t,!1)||(NC(t,"Delete"),cx(t))}(t,e)})),t.addCommand("forwardDelete",(function(){!function(t,e){Wx(t,!0)||Rx(t,!0)||yC(t,e,!0)||wx(t,!0)||qh(t)||qx(t,!0)||_C(t,!0)||_x(t)||SC(t,!0)||NC(t,"ForwardDelete")}(t,e)}))},RC=function(t){return void 0===t.touches||1!==t.touches.length?L.none():L.some(t.touches[0])},HC=function(t){var e=Eu(),n=wu(!1),r=Tu((function(e){t.fire("longpress",Mt(Mt({},e),{type:"longpress"})),n.set(!0)}),400);t.on("touchstart",(function(t){RC(t).each((function(o){r.cancel();var i={x:o.clientX,y:o.clientY,target:t.target};r.throttle(t),n.set(!1),e.set(i)}))}),!0),t.on("touchmove",(function(o){r.cancel(),RC(o).each((function(r){e.on((function(o){(function(t,e){var n=Math.abs(t.clientX-e.x),r=Math.abs(t.clientY-e.y);return n>5||r>5})(r,o)&&(e.clear(),n.set(!1),t.fire("longpresscancel"))}))}))}),!0),t.on("touchend touchcancel",(function(o){r.cancel(),"touchcancel"!==o.type&&e.get().filter((function(t){return t.target.isEqualNode(o.target)})).each((function(){n.get()?o.preventDefault():t.fire("tap",Mt(Mt({},o),{type:"tap"}))}))}),!0)},LC=function(t,e){return xt(t,e.nodeName)},VC=function(t,e){return!!Pn(e)||!!Dn(e)&&(!LC(t,e)&&!Yl(e))},PC=function(t,e){if(Pn(e)){if(0===e.nodeValue.length)return!0;if(/^\s+$/.test(e.nodeValue)&&(!e.nextSibling||LC(t,e.nextSibling)))return!0}return!1},IC=function(t){var e,n,r,o=t.dom,i=t.selection,a=t.schema,u=a.getBlockElements(),c=i.getStart(),s=t.getBody(),l=ns(t);if(c&&Dn(c)&&l){var f=s.nodeName.toLowerCase();if(a.isValidChild(f,l.toLowerCase())&&!function(t,e,n){return j(_g(Me.fromDom(n),Me.fromDom(e)),(function(e){return LC(t,e.dom)}))}(u,s,c)){var d=i.getRng(),m=d.startContainer,g=d.startOffset,h=d.endContainer,p=d.endOffset,v=xm(t);for(c=s.firstChild;c;)if(VC(u,c)){if(PC(u,c)){n=c,c=c.nextSibling,o.remove(n);continue}e||(e=o.create(l,rs(t)),c.parentNode.insertBefore(e,c),r=!0),n=c,c=c.nextSibling,e.appendChild(n)}else e=null,c=c.nextSibling;r&&v&&(d.setStart(m,g),d.setEnd(h,p),i.setRng(d),t.nodeChanged())}}},FC=function(t,e){e.hasAttribute("data-mce-caret")&&(Ro(e),function(t){t.selection.setRng(t.selection.getRng())}(t),t.selection.scrollIntoView(e))},UC=function(t,e){var n=function(t){return Qr(Me.fromDom(t.getBody()),"*[data-mce-caret]").map((function(t){return t.dom})).getOrNull()}(t);if(n)return"compositionstart"===e.type?(e.preventDefault(),e.stopPropagation(),void FC(t,n)):void(To(n)&&(FC(t,n),t.undoManager.add()))},jC=Gn,WC=function(t,e,n){var r=kl(t.getBody()),o=z(fl,1===e?r.next:r.prev);if(n.collapsed&&function(t){return""!==ns(t)}(t)){var i=t.dom.getParent(n.startContainer,"PRE");if(!i)return;if(!o(Tc.fromRangeStart(n))){var a=function(t){var e=t.dom.create(ns(t));return(!Se.ie||Se.ie>=11)&&(e.innerHTML='<br data-mce-bogus="1">'),e}(t);1===e?t.$(i).after(a):t.$(i).before(a),t.selection.select(a,!0),t.selection.collapse()}}},qC=function(t,e){var n=e?Mc.Forwards:Mc.Backwards,r=t.selection.getRng();return function(t,e,n){return nC(e,t,n,yg,xg,jC)}(n,t,r).orThunk((function(){return WC(t,n,r),L.none()}))},GC=function(t,e){var n=e?1:-1,r=t.selection.getRng();return function(t,e,n){return rC(e,t,n,(function(t){return yg(t)||vg(t)}),(function(t){return xg(t)||bg(t)}),jC)}(n,t,r).orThunk((function(){return WC(t,n,r),L.none()}))},$C=function(t,e){return qC(t,e).exists((function(e){return tC(t,e),!0}))},XC=function(t,e){return GC(t,e).exists((function(e){return tC(t,e),!0}))},KC=function(t,e){return iC(t,e,e?xg:yg)},YC=function(t){return U(["figcaption"],Le(t))},JC=function(t){var e=document.createRange();return e.setStartBefore(t.dom),e.setEndBefore(t.dom),e},QC=function(t,e,n){n?gn(t,e):mn(t,e)},ZC=function(t,e,n,r){return""===e?function(t,e){var n=Me.fromTag("br");return QC(t,n,e),JC(n)}(t,r):function(t,e,n,r){var o=Me.fromTag(n),i=Me.fromTag("br");return tr(o,r),gn(o,i),QC(t,o,e),JC(i)}(t,r,e,n)},tS=function(t,e,n){return e?function(t,e){return Nw(t,e).breakAt.isNone()}(t.dom,n):function(t,e){return Aw(t,e).breakAt.isNone()}(t.dom,n)},eS=function(t,e){var n=Me.fromDom(t.getBody()),r=Tc.fromRangeStart(t.selection.getRng()),o=ns(t),i=rs(t);return function(t,e){var n=z(Be,e);return Kr(Me.fromDom(t.container()),lo,n).filter(YC)}(r,n).exists((function(){if(tS(n,e,r)){var a=ZC(n,o,i,e);return t.selection.setRng(a),!0}return!1}))},nS=function(t,e){return!!t.selection.isCollapsed()&&eS(t,e)},rS=function(t,e){return tt(function(t){return W(t,(function(t){return Mt({shiftKey:!1,altKey:!1,ctrlKey:!1,metaKey:!1,keyCode:0,action:C},t)}))}(t),(function(t){return function(t,e){return e.keyCode===t.keyCode&&e.shiftKey===t.shiftKey&&e.altKey===t.altKey&&e.ctrlKey===t.ctrlKey&&e.metaKey===t.metaKey}(t,e)?[t]:[]}))},oS=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return function(){return t.apply(null,e)}},iS=function(t,e){return Q(rS(t,e),(function(t){return t.action()}))},aS=function(t,e){var n=e?Mc.Forwards:Mc.Backwards,r=t.selection.getRng();return nC(t,n,r,hg,pg,Xn).exists((function(e){return tC(t,e),!0}))},uS=function(t,e){var n=e?1:-1,r=t.selection.getRng();return rC(t,n,r,hg,pg,Xn).exists((function(e){return tC(t,e),!0}))},cS=function(t,e){return iC(t,e,e?pg:hg)},sS=function(t,e,n,r,o){var i=Vu(Me.fromDom(n),"td,th,caption").map((function(t){return t.dom}));return function(t,e,n){return Y(t,(function(t,r){return t.fold((function(){return L.some(r)}),(function(t){var o=Math.sqrt(Math.abs(t.x-e)+Math.abs(t.y-n)),i=Math.sqrt(Math.abs(r.x-e)+Math.abs(r.y-n));return L.some(i<o?r:t)}))}),L.none())}(X(function(t,e){return tt(e,(function(e){var n=function(t,e){return{left:t.left-e,top:t.top-e,right:t.right+2*e,bottom:t.bottom+2*e,width:t.width+e,height:t.height+e}}(ec(e.getBoundingClientRect()),-1);return[{x:n.left,y:t(n),cell:e},{x:n.right,y:t(n),cell:e}]}))}(t,i),(function(t){return e(t,o)})),r,o).map((function(t){return t.cell}))},lS=z(sS,(function(t){return t.bottom}),(function(t,e){return t.y<e})),fS=z(sS,(function(t){return t.top}),(function(t,e){return t.y>e})),dS=function(t,e){return at(e.getClientRects()).bind((function(e){return lS(t,e.left,e.top)})).bind((function(t){return Dw(Hl(n=t).map((function(t){return Aw(n,t).positions.concat(t)})).getOr([]),e);var n}))},mS=function(t,e){return ut(e.getClientRects()).bind((function(e){return fS(t,e.left,e.top)})).bind((function(t){return Dw(Rl(n=t).map((function(t){return[t].concat(Nw(n,t).positions)})).getOr([]),e);var n}))},gS=function(t,e,n){var r=t(e,n);return function(t){return t.breakType===ww.Wrap&&0===t.positions.length}(r)||!jn(n.getNode())&&function(t){return t.breakType===ww.Br&&1===t.positions.length}(r)?!function(t,e,n){return n.breakAt.exists((function(n){return t(e,n).breakAt.isSome()}))}(t,e,r):r.breakAt.isNone()},hS=z(gS,Aw),pS=z(gS,Nw),vS=function(t,e,n,r){var o=t.selection.getRng(),i=e?1:-1;return!(!Ps()||!function(t,e,n){var r=Tc.fromRangeStart(e);return Al(!t,n).exists((function(t){return t.isEqual(r)}))}(e,o,n))&&(zx(i,t,n,!e,!1).each((function(e){tC(t,e)})),!0)},bS=function(t,e){var n=e.getNode(t);return Dn(n)&&"TABLE"===n.nodeName?L.some(n):L.none()},yS=function(t,e,n){var r=bS(!!e,n),o=!1===e;r.fold((function(){return tC(t,n.toRange())}),(function(r){return Al(o,t.getBody()).filter((function(t){return t.isEqual(n)})).fold((function(){return tC(t,n.toRange())}),(function(o){return function(t,e,n,r){var o=ns(e);o?e.undoManager.transact((function(){var r=Me.fromTag(o);tr(r,rs(e)),gn(r,Me.fromTag("br")),t?dn(Me.fromDom(n),r):fn(Me.fromDom(n),r);var i=e.dom.createRng();i.setStart(r.dom,0),i.setEnd(r.dom,0),tC(e,i)})):tC(e,r.toRange())}(e,t,r,n)}))}))},xS=function(t,e,n,r){var o=t.selection.getRng(),i=Tc.fromRangeStart(o),a=t.getBody();if(!e&&hS(r,i)){var u=function(t,e,n){return dS(e,n).orThunk((function(){return at(n.getClientRects()).bind((function(n){return Mw(Bw(t,Tc.before(e)),n.left)}))})).getOr(Tc.before(e))}(a,n,i);return yS(t,e,u),!0}if(e&&pS(r,i)){u=function(t,e,n){return mS(e,n).orThunk((function(){return at(n.getClientRects()).bind((function(n){return Mw(Rw(t,Tc.after(e)),n.left)}))})).getOr(Tc.after(e))}(a,n,i);return yS(t,e,u),!0}return!1},wS=function(t,e,n){return L.from(t.dom.getParent(t.selection.getNode(),"td,th")).bind((function(r){return L.from(t.dom.getParent(r,"table")).map((function(o){return n(t,e,o,r)}))})).getOr(!1)},CS=function(t,e){return wS(t,e,vS)},SS=function(t,e){return wS(t,e,xS)},kS=function(t,e){t.on("keydown",(function(n){!1===n.isDefaultPrevented()&&function(t,e,n){var r=ge().os;iS([{keyCode:id.RIGHT,action:oS($C,t,!0)},{keyCode:id.LEFT,action:oS($C,t,!1)},{keyCode:id.UP,action:oS(XC,t,!1)},{keyCode:id.DOWN,action:oS(XC,t,!0)},{keyCode:id.RIGHT,action:oS(CS,t,!0)},{keyCode:id.LEFT,action:oS(CS,t,!1)},{keyCode:id.UP,action:oS(SS,t,!1)},{keyCode:id.DOWN,action:oS(SS,t,!0)},{keyCode:id.RIGHT,action:oS(aS,t,!0)},{keyCode:id.LEFT,action:oS(aS,t,!1)},{keyCode:id.UP,action:oS(uS,t,!1)},{keyCode:id.DOWN,action:oS(uS,t,!0)},{keyCode:id.RIGHT,action:oS(lC,t,e,!0)},{keyCode:id.LEFT,action:oS(lC,t,e,!1)},{keyCode:id.RIGHT,ctrlKey:!r.isOSX(),altKey:r.isOSX(),action:oS(mC,t,e)},{keyCode:id.LEFT,ctrlKey:!r.isOSX(),altKey:r.isOSX(),action:oS(gC,t,e)},{keyCode:id.UP,action:oS(nS,t,!1)},{keyCode:id.DOWN,action:oS(nS,t,!0)}],n).each((function(t){n.preventDefault()}))}(t,e,n)}))},_S=function(t,e){t.on("keydown",(function(n){!1===n.isDefaultPrevented()&&function(t,e,n){iS([{keyCode:id.BACKSPACE,action:oS(AC,t,!1)},{keyCode:id.BACKSPACE,action:oS(Wx,t,!1)},{keyCode:id.DELETE,action:oS(Wx,t,!0)},{keyCode:id.BACKSPACE,action:oS(Rx,t,!1)},{keyCode:id.DELETE,action:oS(Rx,t,!0)},{keyCode:id.BACKSPACE,action:oS(yC,t,e,!1)},{keyCode:id.DELETE,action:oS(yC,t,e,!0)},{keyCode:id.BACKSPACE,action:oS(qh,t,!1)},{keyCode:id.DELETE,action:oS(qh,t,!0)},{keyCode:id.BACKSPACE,action:oS(qx,t,!1)},{keyCode:id.DELETE,action:oS(qx,t,!0)},{keyCode:id.BACKSPACE,action:oS(_C,t,!1)},{keyCode:id.DELETE,action:oS(_C,t,!0)},{keyCode:id.BACKSPACE,action:oS(_x,t,!1)},{keyCode:id.DELETE,action:oS(_x,t,!0)},{keyCode:id.BACKSPACE,action:oS(wx,t,!1)},{keyCode:id.DELETE,action:oS(wx,t,!0)},{keyCode:id.BACKSPACE,action:oS(SC,t,!1)},{keyCode:id.DELETE,action:oS(SC,t,!0)}],n).each((function(t){n.preventDefault()}))}(t,e,n)})),t.on("keyup",(function(e){!1===e.isDefaultPrevented()&&function(t,e){iS([{keyCode:id.BACKSPACE,action:oS(jx,t)},{keyCode:id.DELETE,action:oS(jx,t)}],e)}(t,e)}))},OS=function(t,e){var n,r=e,o=t.dom,i=t.schema.getMoveCaretBeforeOnEnterElements();if(e){if(/^(LI|DT|DD)$/.test(e.nodeName)){var a=function(t){for(;t;){if(1===t.nodeType||3===t.nodeType&&t.data&&/[\r\n\s]/.test(t.data))return t;t=t.nextSibling}}(e.firstChild);a&&/^(UL|OL|DL)$/.test(a.nodeName)&&e.insertBefore(o.doc.createTextNode(xo),e.firstChild)}var u=o.createRng();if(e.normalize(),e.hasChildNodes()){for(var c=new uo(e,e);n=c.current();){if(Pn(n)){u.setStart(n,0),u.setEnd(n,0);break}if(i[n.nodeName.toLowerCase()]){u.setStartBefore(n),u.setEndBefore(n);break}r=n,n=c.next()}n||(u.setStart(r,0),u.setEnd(r,0))}else jn(e)?e.nextSibling&&o.isBlock(e.nextSibling)?(u.setStartBefore(e),u.setEndBefore(e)):(u.setStartAfter(e),u.setEndAfter(e)):(u.setStart(e,0),u.setEnd(e,0));t.selection.setRng(u),Wd(t,u)}},ES=function(t){return L.from(t.dom.getParent(t.selection.getStart(!0),t.dom.isBlock))},zS=function(t,e){return t&&t.parentNode&&t.parentNode.nodeName===e},TS=function(t){return t&&/^(OL|UL|LI)$/.test(t.nodeName)},MS=function(t){var e=t.parentNode;return/^(LI|DT|DD)$/.test(e.nodeName)?e:t},DS=function(t,e,n){for(var r=t[n?"firstChild":"lastChild"];r&&!Dn(r);)r=r[n?"nextSibling":"previousSibling"];return r===e},AS=function(t,e,n,r,o){var i=t.dom,a=t.selection.getRng();if(n!==t.getBody()){var u;TS(u=n)&&TS(u.parentNode)&&(o="LI");var c=o?e(o):i.create("BR");if(DS(n,r,!0)&&DS(n,r,!1))if(zS(n,"LI")){var s=MS(n);i.insertAfter(c,s),!function(t){var e;return(null===(e=t.parentNode)||void 0===e?void 0:e.firstChild)===t}(n)?i.remove(n):i.remove(s)}else i.replace(c,n);else if(DS(n,r,!0))zS(n,"LI")?(i.insertAfter(c,MS(n)),c.appendChild(i.doc.createTextNode(" ")),c.appendChild(n)):n.parentNode.insertBefore(c,n),i.remove(r);else if(DS(n,r,!1))i.insertAfter(c,MS(n)),i.remove(r);else{n=MS(n);var l=a.cloneRange();l.setStartAfter(r),l.setEndAfter(n);var f=l.extractContents();"LI"===o&&function(t,e){return t.firstChild&&t.firstChild.nodeName===e}(f,"LI")?(c=f.firstChild,i.insertAfter(f,n)):(i.insertAfter(f,n),i.insertAfter(c,n)),i.remove(r)}OS(t,c)}},NS=function(t,e){return e&&"A"===e.nodeName&&t.isEmpty(e)},BS=function(t){t.innerHTML='<br data-mce-bogus="1">'},RS=function(t,e){return t.nodeName===e||t.previousSibling&&t.previousSibling.nodeName===e},HS=function(t,e){return e&&t.isBlock(e)&&!/^(TD|TH|CAPTION|FORM)$/.test(e.nodeName)&&!/^(fixed|absolute)/i.test(e.style.position)&&"true"!==t.getContentEditable(e)},LS=function(t,e,n){return!1===Pn(e)?n:t?1===n&&e.data.charAt(n-1)===wo?0:n:n===e.data.length-1&&e.data.charAt(n)===wo?e.data.length:n},VS=function(t,e){var n,r,o=t.getRoot();for(n=e;n!==o&&"false"!==t.getContentEditable(n);)"true"===t.getContentEditable(n)&&(r=n),n=n.parentNode;return n!==o?r:o},PS=function(t,e){var n=ns(t);n&&n.toLowerCase()===e.tagName.toLowerCase()&&function(t,e,n){var r=t.dom;L.from(n.style).map(r.parseStyle).each((function(t){var n=cr(Me.fromDom(e)),o=Mt(Mt({},n),t);r.setStyles(e,o)}));var o=L.from(n.class).map((function(t){return t.split(/\s+/)})),i=L.from(e.className).map((function(t){return X(t.split(/\s+/),(function(t){return""!==t}))}));Yn(o,i,(function(t,n){var o=X(n,(function(e){return!U(t,e)})),i=Dt(Dt([],t,!0),o,!0);r.setAttrib(e,"class",i.join(" "))}));var a=["style","class"],u=vt(n,(function(t,e){return!U(a,e)}));r.setAttribs(e,u)}(t,e,rs(t))},IS=function(t,e){var n,r,o,i,a,u,c,s,l,f,d=t.dom,m=t.schema,g=m.getNonEmptyElements(),h=t.selection.getRng(),p=function(e){var n,o,a,u=r,c=m.getTextInlineElements();if(a=n=e||"TABLE"===s||"HR"===s?d.create(e||l):i.cloneNode(!1),!1===function(t){return t.getParam("keep_styles",!0)}(t))d.setAttrib(n,"style",null),d.setAttrib(n,"class",null);else do{if(c[u.nodeName]){if(Vl(u)||Yl(u))continue;o=u.cloneNode(!1),d.setAttrib(o,"id",""),n.hasChildNodes()?(o.appendChild(n.firstChild),n.appendChild(o)):(a=o,n.appendChild(o))}}while((u=u.parentNode)&&u!==w);return PS(t,n),BS(a),n},v=function(t){var e,n,a=LS(t,r,o);if(Pn(r)&&(t?a>0:a<r.nodeValue.length))return!1;if(r.parentNode===i&&f&&!t)return!0;if(t&&Dn(r)&&r===i.firstChild)return!0;if(RS(r,"TABLE")||RS(r,"HR"))return f&&!t||!f&&t;var u=new uo(r,i);for(Pn(r)&&(t&&0===a?u.prev():t||a!==r.nodeValue.length||u.next());e=u.current();){if(Dn(e)){if(!e.getAttribute("data-mce-bogus")&&(n=e.nodeName.toLowerCase(),g[n]&&"br"!==n))return!1}else if(Pn(e)&&!Ko(e.nodeValue))return!1;t?u.prev():u.next()}return!0},b=function(){a=/^(H[1-6]|PRE|FIGURE)$/.test(s)&&"HGROUP"!==C?p(l):p(),function(t){return t.getParam("end_container_on_empty_block",!1)}(t)&&HS(d,c)&&d.isEmpty(i)?a=d.split(c,i):d.insertAfter(a,i),OS(t,a)};yd(d,h).each((function(t){h.setStart(t.startContainer,t.startOffset),h.setEnd(t.endContainer,t.endOffset)})),r=h.startContainer,o=h.startOffset,l=ns(t);var y=!(!e||!e.shiftKey),x=!(!e||!e.ctrlKey);Dn(r)&&r.hasChildNodes()&&(f=o>r.childNodes.length-1,r=r.childNodes[Math.min(o,r.childNodes.length-1)]||r,o=f&&Pn(r)?r.nodeValue.length:0);var w=VS(d,r);if(w){(l&&!y||!l&&y)&&(r=function(t,e,n,r,o){var i,a,u,c,s,l,f=e||"P",d=t.dom,m=VS(d,r);if(!(a=d.getParent(r,d.isBlock))||!HS(d,a)){if(l=(a=a||m)===t.getBody()||function(t){return t&&/^(TD|TH|CAPTION)$/.test(t.nodeName)}(a)?a.nodeName.toLowerCase():a.parentNode.nodeName.toLowerCase(),!a.hasChildNodes())return i=d.create(f),PS(t,i),a.appendChild(i),n.setStart(i,0),n.setEnd(i,0),i;for(c=r;c.parentNode!==a;)c=c.parentNode;for(;c&&!d.isBlock(c);)u=c,c=c.previousSibling;if(u&&t.schema.isValidChild(l,f.toLowerCase())){for(i=d.create(f),PS(t,i),u.parentNode.insertBefore(i,u),c=u;c&&!d.isBlock(c);)s=c.nextSibling,i.appendChild(c),c=s;n.setStart(r,o),n.setEnd(r,o)}}return r}(t,l,h,r,o)),i=d.getParent(r,d.isBlock),c=i?d.getParent(i.parentNode,d.isBlock):null,s=i?i.nodeName.toUpperCase():"";var C=c?c.nodeName.toUpperCase():"";"LI"!==C||x||(i=c,c=c.parentNode,s=C),/^(LI|DT|DD)$/.test(s)&&d.isEmpty(i)?AS(t,p,c,i,l):l&&i===t.getBody()||(l=l||"P",Oo(i)?(a=Ro(i),d.isEmpty(i)&&BS(i),PS(t,a),OS(t,a)):v()?b():v(!0)?(a=i.parentNode.insertBefore(p(),i),OS(t,RS(i,"HR")?a:i)):((n=function(t){var e=t.cloneRange();return e.setStart(t.startContainer,LS(!0,t.startContainer,t.startOffset)),e.setEnd(t.endContainer,LS(!1,t.endContainer,t.endOffset)),e}(h).cloneRange()).setEndAfter(i),function(t){q(Lu(Me.fromDom(t),Fe),(function(t){var e=t.dom;e.nodeValue=So(e.nodeValue)}))}(u=n.extractContents()),function(t){do{Pn(t)&&(t.nodeValue=t.nodeValue.replace(/^[\r\n]+/,"")),t=t.firstChild}while(t)}(u),a=u.firstChild,d.insertAfter(u,i),function(t,e,n){var r,o=n,i=[];if(o){for(;o=o.firstChild;){if(t.isBlock(o))return;Dn(o)&&!e[o.nodeName.toLowerCase()]&&i.push(o)}for(r=i.length;r--;)(!(o=i[r]).hasChildNodes()||o.firstChild===o.lastChild&&""===o.firstChild.nodeValue||NS(t,o))&&t.remove(o)}}(d,g,a),function(t,e){e.normalize();var n=e.lastChild;n&&!/^(left|right)$/gi.test(t.getStyle(n,"float",!0))||t.add(e,"br")}(d,i),d.isEmpty(i)&&BS(i),a.normalize(),d.isEmpty(a)?(d.remove(a),b()):(PS(t,a),OS(t,a))),d.setAttrib(a,"id",""),t.fire("NewBlock",{newBlock:a}))}},FS=function(t,e,n){var r=t.dom.createRng();n?(r.setStartBefore(e),r.setEndBefore(e)):(r.setStartAfter(e),r.setEndAfter(e)),t.selection.setRng(r),Wd(t,r)},US=function(t,e){var n,r,o=t.selection,i=t.dom,a=o.getRng();yd(i,a).each((function(t){a.setStart(t.startContainer,t.startOffset),a.setEnd(t.endContainer,t.endOffset)}));var u=a.startOffset,c=a.startContainer;if(1===c.nodeType&&c.hasChildNodes()){var s=u>c.childNodes.length-1;c=c.childNodes[Math.min(u,c.childNodes.length-1)]||c,u=s&&3===c.nodeType?c.nodeValue.length:0}var l=i.getParent(c,i.isBlock),f=l?i.getParent(l.parentNode,i.isBlock):null,d=f?f.nodeName.toUpperCase():"",m=!(!e||!e.ctrlKey);"LI"!==d||m||(l=f),c&&3===c.nodeType&&u>=c.nodeValue.length&&(function(t,e,n){for(var r,o=new uo(e,n),i=t.getNonEmptyElements();r=o.next();)if(i[r.nodeName.toLowerCase()]||r.length>0)return!0}(t.schema,c,l)||(n=i.create("br"),a.insertNode(n),a.setStartAfter(n),a.setEndAfter(n),r=!0)),n=i.create("br"),Ac(i,a,n),FS(t,n,r),t.undoManager.add()},jS=function(t,e){var n=Me.fromTag("br");fn(Me.fromDom(e),n),t.undoManager.add()},WS=function(t,e){qS(t.getBody(),e)||dn(Me.fromDom(e),Me.fromTag("br"));var n=Me.fromTag("br");dn(Me.fromDom(e),n),FS(t,n.dom,!1),t.undoManager.add()},qS=function(t,e){return n=Tc.after(e),!!jn(n.getNode())||Nl(t,Tc.after(e)).map((function(t){return jn(t.getNode())})).getOr(!1);var n},GS=function(t){return t&&"A"===t.nodeName&&"href"in t},$S=function(t){return t.fold(A,GS,GS,A)},XS=function(t,e){e.fold(C,z(jS,t),z(WS,t),C)},KS=function(t,e){var n=function(t){var e=z(tx,t),n=Tc.fromRangeStart(t.selection.getRng());return dw(e,t.getBody(),n).filter($S)}(t);n.isSome()?n.each(z(XS,t)):US(t,e)},YS=function(t,e){return ES(t).filter((function(t){return e.length>0&&Ae(Me.fromDom(t),e)})).isSome()},JS=_r([{br:[]},{block:[]},{none:[]}]),QS=function(t,e){return function(t){return YS(t,function(t){return t.getParam("no_newline_selector","")}(t))}(t)},ZS=function(t){return function(e,n){return""===ns(e)===t}},tk=function(t){return function(e,n){return function(t){return ES(t).filter((function(t){return po(Me.fromDom(t))})).isSome()}(e)===t}},ek=function(t,e){return function(n,r){return function(t){return ES(t).fold(_(""),(function(t){return t.nodeName.toUpperCase()}))}(n)===t.toUpperCase()===e}},nk=function(t){return ek("pre",t)},rk=function(t){return function(e,n){return function(t){return t.getParam("br_in_pre",!0)}(e)===t}},ok=function(t,e){return function(t){return YS(t,function(t){return t.getParam("br_newline_selector",".mce-toc h2,figcaption,caption")}(t))}(t)},ik=function(t,e){return e},ak=function(t){var e=ns(t),n=function(t,e){var n,r,o=t.getRoot();for(n=e;n!==o&&"false"!==t.getContentEditable(n);)"true"===t.getContentEditable(n)&&(r=n),n=n.parentNode;return n!==o?r:o}(t.dom,t.selection.getStart());return n&&t.schema.isValidChild(n.nodeName,e||"P")},uk=function(t,e){return function(n,r){return Y(t,(function(t,e){return t&&e(n,r)}),!0)?L.some(e):L.none()}},ck=function(t,e){(function(t,e){return nw([uk([QS],JS.none()),uk([ek("summary",!0)],JS.br()),uk([nk(!0),rk(!1),ik],JS.br()),uk([nk(!0),rk(!1)],JS.block()),uk([nk(!0),rk(!0),ik],JS.block()),uk([nk(!0),rk(!0)],JS.br()),uk([tk(!0),ik],JS.br()),uk([tk(!0)],JS.block()),uk([ZS(!0),ik,ak],JS.block()),uk([ZS(!0)],JS.br()),uk([ok],JS.br()),uk([ZS(!1),ik],JS.br()),uk([ak],JS.block())],[t,!(!e||!e.shiftKey)]).getOr(JS.none())})(t,e).fold((function(){KS(t,e)}),(function(){IS(t,e)}),C)},sk=function(t){t.on("keydown",(function(e){e.keyCode===id.ENTER&&function(t,e){var n;e.isDefaultPrevented()||(e.preventDefault(),(n=t.undoManager).typing&&(n.typing=!1,n.add()),t.undoManager.transact((function(){!1===t.selection.isCollapsed()&&t.execCommand("Delete"),ck(t,e)})))}(t,e)}))},lk=function(t,e){t.on("keydown",(function(n){!1===n.isDefaultPrevented()&&function(t,e,n){iS([{keyCode:id.END,action:oS(KC,t,!0)},{keyCode:id.HOME,action:oS(KC,t,!1)},{keyCode:id.END,action:oS(cS,t,!0)},{keyCode:id.HOME,action:oS(cS,t,!1)},{keyCode:id.END,action:oS(hC,t,!0,e)},{keyCode:id.HOME,action:oS(hC,t,!1,e)}],n).each((function(t){n.preventDefault()}))}(t,e,n)}))},fk=ge().browser,dk=function(t){!function(t){var e=zu((function(){t.composing||th(t)}),0);fk.isIE()&&(t.on("keypress",(function(t){e.throttle()})),t.on("remove",(function(t){e.cancel()})))}(t),t.on("input",(function(e){!1===e.isComposing&&th(t)}))},mk=ge(),gk=function(t){return t.stopImmediatePropagation()},hk=function(t){return t.keyCode===id.PAGE_UP||t.keyCode===id.PAGE_DOWN},pk=function(t,e,n){n&&!t.get()?e.on("NodeChange",gk,!0):!n&&t.get()&&e.off("NodeChange",gk),t.set(n)},vk=function(t,e){if(!mk.os.isOSX()){var n=wu(!1);t.on("keydown",(function(e){hk(e)&&pk(n,t,!0)})),t.on("keyup",(function(r){!1===r.isDefaultPrevented()&&function(t,e,n){iS([{keyCode:id.PAGE_UP,action:oS(hC,t,!1,e)},{keyCode:id.PAGE_DOWN,action:oS(hC,t,!0,e)}],n)}(t,e,r),hk(r)&&n.get()&&(pk(n,t,!1),t.nodeChanged())}))}},bk=function(t,e){var n=e.container(),r=e.offset();return Pn(n)?(n.insertData(r,t),L.some(Tc(n,r+t.length))):ll(e).map((function(n){var r=Me.fromText(t);return e.isAtEnd()?dn(n,r):fn(n,r),Tc(r.dom,t.length)}))},yk=z(bk,xo),xk=z(bk," "),wk=function(t,e){return function(n){return function(t,e){return!qg(e)&&(Gg(t,e)||jg(t,e)||Wg(t,e))}(t,n)?yk(e):xk(e)}},Ck=function(t){var e=Tc.fromRangeStart(t.selection.getRng()),n=Me.fromDom(t.getBody());if(t.selection.isCollapsed()){var r=z(tx,t),o=Tc.fromRangeStart(t.selection.getRng());return dw(r,t.getBody(),o).bind(function(t){return function(e){return e.fold((function(e){return Bl(t.dom,Tc.before(e))}),(function(t){return Rl(t)}),(function(t){return Hl(t)}),(function(e){return Nl(t.dom,Tc.after(e))}))}}(n)).bind(wk(n,e)).exists(function(t){return function(e){return t.selection.setRng(e.toRange()),t.nodeChanged(),!0}}(t))}return!1},Sk=function(t){t.on("keydown",(function(e){!1===e.isDefaultPrevented()&&function(t,e){iS([{keyCode:id.SPACEBAR,action:oS(Ck,t)}],e).each((function(t){e.preventDefault()}))}(t,e)}))},kk=function(t){var e=dC(t);return function(t){t.on("keyup compositionstart",z(UC,t))}(t),kS(t,e),_S(t,e),sk(t),Sk(t),dk(t),lk(t,e),vk(t,e),e},_k=function(){function t(t){var e;this.lastPath=[],this.editor=t;var n=this;"onselectionchange"in t.getDoc()||t.on("NodeChange click mouseup keyup focus",(function(n){var r=t.selection.getRng(),o={startContainer:r.startContainer,startOffset:r.startOffset,endContainer:r.endContainer,endOffset:r.endOffset};"nodechange"!==n.type&&ld(o,e)||t.fire("SelectionChange"),e=o})),t.on("contextmenu",(function(){t.fire("SelectionChange")})),t.on("SelectionChange",(function(){var e=t.selection.getStart(!0);!e||!Se.range&&t.selection.isCollapsed()||jf(t)&&!n.isSameElementPath(e)&&t.dom.isChildOf(e,t.getBody())&&t.nodeChanged({selectionChange:!0})})),t.on("mouseup",(function(e){!e.isDefaultPrevented()&&jf(t)&&("IMG"===t.selection.getNode().nodeName?oo.setEditorTimeout(t,(function(){t.nodeChanged()})):t.nodeChanged())}))}return t.prototype.nodeChanged=function(t){var e,n,r,o=this.editor.selection;this.editor.initialized&&o&&!this.editor.getParam("disable_nodechange")&&!this.editor.mode.isReadOnly()&&(r=this.editor.getBody(),(e=o.getStart(!0)||r).ownerDocument===this.editor.getDoc()&&this.editor.dom.isChildOf(e,r)||(e=r),n=[],this.editor.dom.getParent(e,(function(t){if(t===r)return!0;n.push(t)})),(t=t||{}).element=e,t.parents=n,this.editor.fire("NodeChange",t))},t.prototype.isSameElementPath=function(t){var e,n=this.editor.$(t).parentsUntil(this.editor.getBody()).add(t);if(n.length===this.lastPath.length){for(e=n.length;e>=0&&n[e]===this.lastPath[e];e--);if(-1===e)return this.lastPath=n,!0}return this.lastPath=n,!1},t}(),Ok=function(t){!function(t){t.on("click",(function(e){t.dom.getParent(e.target,"details")&&e.preventDefault()}))}(t),function(t){t.parser.addNodeFilter("details",(function(t){q(t,(function(t){t.attr("data-mce-open",t.attr("open")),t.attr("open","open")}))})),t.serializer.addNodeFilter("details",(function(t){q(t,(function(t){var e=t.attr("data-mce-open");t.attr("open",d(e)?e:null),t.attr("data-mce-open",null)}))}))}(t)},Ek=function(t){return Dn(t)&&go(Me.fromDom(t))},zk=function(t){t.on("click",(function(e){e.detail>=3&&function(t){var e=t.selection.getRng(),n=Tc.fromRangeStart(e),r=Tc.fromRangeEnd(e);if(Tc.isElementPosition(n)){var o=n.container();Ek(o)&&Rl(o).each((function(t){return e.setStart(t.container(),t.offset())}))}Tc.isElementPosition(r)&&(o=n.container(),Ek(o)&&Hl(o).each((function(t){return e.setEnd(t.container(),t.offset())})));t.selection.setRng($h(e))}(t)}))},Tk=function(t){var e=t.getBoundingClientRect(),n=t.ownerDocument,r=n.documentElement,o=n.defaultView;return{top:e.top+o.pageYOffset-r.clientTop,left:e.left+o.pageXOffset-r.clientLeft}},Mk=function(t,e){return n=function(t){return t.inline?Tk(t.getBody()):{left:0,top:0}}(t),r=function(t){var e=t.getBody();return t.inline?{left:e.scrollLeft,top:e.scrollTop}:{left:0,top:0}}(t),{pageX:(o=function(t,e){if(e.target.ownerDocument!==t.getDoc()){var n=Tk(t.getContentAreaContainer()),r=function(t){var e=t.getBody(),n=t.getDoc().documentElement,r={left:e.scrollLeft,top:e.scrollTop},o={left:e.scrollLeft||n.scrollLeft,top:e.scrollTop||n.scrollTop};return t.inline?r:o}(t);return{left:e.pageX-n.left+r.left,top:e.pageY-n.top+r.top}}return{left:e.pageX,top:e.pageY}}(t,e)).left-n.left+r.left,pageY:o.top-n.top+r.top};var n,r,o},Dk=Gn,Ak=qn,Nk=function(t,e,n,r){var o=t.dom,i=e.cloneNode(!0);o.setStyles(i,{width:n,height:r}),o.setAttrib(i,"data-mce-selected",null);var a=o.create("div",{class:"mce-drag-container","data-mce-bogus":"all",unselectable:"on",contenteditable:"false"});return o.setStyles(a,{position:"absolute",opacity:.5,overflow:"hidden",border:0,padding:0,margin:0,width:n,height:r}),o.setStyles(i,{margin:0,boxSizing:"border-box"}),a.appendChild(i),a},Bk=function(t){t&&t.parentNode&&t.parentNode.removeChild(t)},Rk=function(t,e){return function(n){if(function(t){return 0===t.button}(n)){var r=Q(e.dom.getParents(n.target),function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){for(var n=0;n<t.length;n++)if(t[n](e))return!0;return!1}}(Dk,Ak)).getOr(null);if(u=e.getBody(),Dk(c=r)&&c!==u){var o=e.dom.getPos(r),i=e.getBody(),a=e.getDoc().documentElement;t.set({element:r,dragging:!1,screenX:n.screenX,screenY:n.screenY,maxX:(e.inline?i.scrollWidth:a.offsetWidth)-2,maxY:(e.inline?i.scrollHeight:a.offsetHeight)-2,relX:n.pageX-o.x,relY:n.pageY-o.y,width:r.offsetWidth,height:r.offsetHeight,ghost:Nk(e,r,r.offsetWidth,r.offsetHeight)})}}var u,c}},Hk=function(t,e){return function(n){t.on((function(t){if(t.dragging){if(function(t,e,n){return e!==n&&!t.dom.isChildOf(e,n)&&!Dk(e)}(e,(a=e.selection,3===(u=a.getSel().getRangeAt(0).startContainer).nodeType?u.parentNode:u),t.element)){var r=(o=t.element,(i=o.cloneNode(!0)).removeAttribute("data-mce-selected"),i);e.fire("drop",{clientX:n.clientX,clientY:n.clientY}).isDefaultPrevented()||e.undoManager.transact((function(){Bk(t.element),e.insertContent(e.dom.getOuterHTML(r)),e._selectionOverrides.hideFakeCaret()}))}e.fire("dragend")}var o,i,a,u})),Lk(t)}},Lk=function(t){t.on((function(t){Bk(t.ghost)})),t.clear()},Vk=function(t){var e=Eu(),n=pu.DOM,r=document,o=Rk(e,t),i=function(t,e){var n=oo.throttle((function(t,n){e._selectionOverrides.hideFakeCaret(),e.selection.placeCaretAt(t,n)}),0);return e.on("remove",n.stop),function(r){return t.on((function(t){var o,i,a=Math.max(Math.abs(r.screenX-t.screenX),Math.abs(r.screenY-t.screenY));if(!t.dragging&&a>10){if(e.fire("dragstart",{target:t.element}).isDefaultPrevented())return;t.dragging=!0,e.focus()}if(t.dragging){var u=function(t,e){return{pageX:e.pageX-t.relX,pageY:e.pageY+5}}(t,Mk(e,r));o=t.ghost,i=e.getBody(),o.parentNode!==i&&i.appendChild(o),function(t,e,n,r,o,i){var a=0,u=0;t.style.left=e.pageX+"px",t.style.top=e.pageY+"px",e.pageX+n>o&&(a=e.pageX+n-o),e.pageY+r>i&&(u=e.pageY+r-i),t.style.width=n-a+"px",t.style.height=r-u+"px"}(t.ghost,u,t.width,t.height,t.maxX,t.maxY),n(r.clientX,r.clientY)}}))}}(e,t),a=Hk(e,t),u=function(t,e){return function(){t.on((function(t){t.dragging&&e.fire("dragend")})),Lk(t)}}(e,t);t.on("mousedown",o),t.on("mousemove",i),t.on("mouseup",a),n.bind(r,"mousemove",i),n.bind(r,"mouseup",u),t.on("remove",(function(){n.unbind(r,"mousemove",i),n.unbind(r,"mouseup",u)})),t.on("keydown",(function(t){t.keyCode===id.ESC&&u()}))},Pk=function(t){Vk(t),function(t){t.on("drop",(function(e){var n=void 0!==e.clientX?t.getDoc().elementFromPoint(e.clientX,e.clientY):null;(Dk(n)||"false"===t.dom.getContentEditableParent(n))&&e.preventDefault()}))}(t),function(t){return t.getParam("block_unsupported_drop",!0,"boolean")}(t)&&function(t){var e=function(e){if(!e.isDefaultPrevented()){var n=e.dataTransfer;n&&(U(n.types,"Files")||n.files.length>0)&&(e.preventDefault(),"drop"===e.type&&ky(t,"Dropped file type is not supported"))}},n=function(n){mm(t,n.target)&&e(n)},r=function(){var r=pu.DOM,o=t.dom,i=document,a=t.inline?t.getBody():t.getDoc(),u=["drop","dragover"];q(u,(function(t){r.bind(i,t,n),o.bind(a,t,e)})),t.on("remove",(function(){q(u,(function(t){r.unbind(i,t,n),o.unbind(a,t,e)}))}))};t.on("init",(function(){oo.setEditorTimeout(t,r,0)}))}(t)},Ik=qn,Fk=Gn,Uk=function(t,e){return td(t.getBody(),e)},jk=function(t){var e,n=t.selection,r=t.dom,o=r.isBlock,i=t.getBody(),a=Vs(t,i,o,(function(){return xm(t)})),u="sel-"+r.uniqueId(),c="data-mce-selected",s=function(t){return t!==i&&(Fk(t)||Xn(t))&&r.isChildOf(t,i)},l=function(t){return yg(t)||xg(t)||hg(t)||pg(t)},f=function(t){t&&n.setRng(t)},d=n.getRng,m=function(e,r,o,i){return void 0===i&&(i=!0),t.fire("ShowCaret",{target:r,direction:e,before:o}).isDefaultPrevented()?null:(i&&n.scrollIntoView(r,-1===e),a.show(o,r))},g=function(t){return zo(t)||No(t)||Bo(t)},h=function(t){return g(t.startContainer)||g(t.endContainer)},p=function(e){var n=t.schema.getShortEndedElements(),o=r.createRng(),i=e.startContainer,a=e.startOffset,u=e.endContainer,c=e.endOffset;return xt(n,i.nodeName.toLowerCase())?0===a?o.setStartBefore(i):o.setStartAfter(i):o.setStart(i,a),xt(n,u.nodeName.toLowerCase())?0===c?o.setEndBefore(u):o.setEndAfter(u):o.setEnd(u,c),o},v=function(o){var i=o.cloneNode(!0),a=t.fire("ObjectSelected",{target:o,targetClone:i});if(a.isDefaultPrevented())return null;var s=function(e,o,i){var a=t.$,c=Qr(Me.fromDom(t.getBody()),"#"+u).fold((function(){return a([])}),(function(t){return a([t.dom])}));0===c.length&&(c=a('<div data-mce-bogus="all" class="mce-offscreen-selection"></div>').attr("id",u)).appendTo(t.getBody());var s=r.createRng();o===i&&Se.ie?(c.empty().append('<p style="font-size: 0" data-mce-bogus="all"> </p>').append(o),s.setStartAfter(c[0].firstChild.firstChild),s.setEndAfter(o)):(c.empty().append(xo).append(o).append(xo),s.setStart(c[0].firstChild,1),s.setEnd(c[0].lastChild,0)),c.css({top:r.getPos(e,t.getBody()).y}),c[0].focus();var l=n.getSel();return l.removeAllRanges(),l.addRange(s),s}(o,a.targetClone,i),l=Me.fromDom(o);return q(Vu(Me.fromDom(t.getBody()),"*[data-mce-selected]"),(function(t){Be(l,t)||rr(t,c)})),r.getAttrib(o,c)||o.setAttribute(c,"1"),e=o,w(),s},y=function(t,e){if(!t)return null;if(t.collapsed){if(!h(t)){var n=e?1:-1,o=sl(n,i,t),a=o.getNode(!e);if(Fs(a))return m(n,a,!!e&&!o.isAtEnd(),!1);var u=o.getNode(e);if(Fs(u))return m(n,u,!e&&!o.isAtEnd(),!1)}return null}var c=t.startContainer,l=t.startOffset,f=t.endOffset;if(3===c.nodeType&&0===l&&Fk(c.parentNode)&&(c=c.parentNode,l=r.nodeIndex(c),c=c.parentNode),1!==c.nodeType)return null;if(f===l+1&&c===t.endContainer){var d=c.childNodes[l];if(s(d))return v(d)}return null},x=function(){e&&e.removeAttribute(c),Qr(Me.fromDom(t.getBody()),"#"+u).each(vn),e=null},w=function(){a.hide()};return Se.ceFalse&&!Jv(t)&&function(){t.on("mouseup",(function(e){var n=d();n.collapsed&&vy(t,e.clientX,e.clientY)&&Mx(t,n,!1).each(f)})),t.on("click",(function(e){var o=Uk(t,e.target);o&&(Fk(o)&&(e.preventDefault(),t.focus()),Ik(o)&&r.isChildOf(o,n.getNode())&&x())})),t.on("blur NewBlock",x),t.on("ResizeWindow FullscreenStateChanged",a.reposition);var c=function(e,n){var i,a,u=r.getParent(e,o),c=r.getParent(n,o);return!b(u)&&(!(e===c||!r.isChildOf(u,c)||!1!==Fk(Uk(t,u)))||!r.isChildOf(c,u)&&(i=u,a=c,!(r.getParent(i,o)===r.getParent(a,o)))&&function(t){var e=t.firstChild;if(b(e))return!1;var n=Tc.before(e);if(jn(n.getNode())&&1===t.childNodes.length)return!l(n);var r=kl(t).next(n);return r&&!l(r)}(u))};t.on("tap",(function(e){var n=e.target,r=Uk(t,n);Fk(r)?(e.preventDefault(),Tx(t,r).each(y)):s(n)&&Tx(t,n).each(y)}),!0),t.on("mousedown",(function(e){var o=e.target;if((o===i||"HTML"===o.nodeName||r.isChildOf(o,i))&&!1!==vy(t,e.clientX,e.clientY)){var a=Uk(t,o);if(a)Fk(a)?(e.preventDefault(),Tx(t,a).each(y)):(x(),Ik(a)&&e.shiftKey||ed(e.clientX,e.clientY,n.getRng())||(w(),n.placeCaretAt(e.clientX,e.clientY)));else if(s(o))Tx(t,o).each(y);else if(!1===Fs(o)){x(),w();var u=Zw(i,e.clientX,e.clientY);if(u&&!c(o,u.node)){e.preventDefault();var l=m(1,u.node,u.before,!1);f(l),t.getBody().focus()}}}})),t.on("keypress",(function(t){id.modifierPressed(t)||Fk(n.getNode())&&t.preventDefault()})),t.on("GetSelectionRange",(function(t){var n=t.range;if(e){if(!e.parentNode)return void(e=null);(n=n.cloneRange()).selectNode(e),t.range=n}})),t.on("SetSelectionRange",(function(t){t.range=p(t.range);var e=y(t.range,t.forward);e&&(t.range=e)})),t.on("AfterSetSelectionRange",(function(t){var e,n=t.range,o=n.startContainer.parentNode;h(n)||"mcepastebin"===o.id||w(),e=o,r.hasClass(e,"mce-offscreen-selection")||x()})),t.on("copy",(function(t){var e,n=t.clipboardData;if(!t.isDefaultPrevented()&&t.clipboardData&&!Se.ie){var o=(e=r.get(u))?e.getElementsByTagName("*")[0]:e;o&&(t.preventDefault(),n.clearData(),n.setData("text/html",o.outerHTML),n.setData("text/plain",o.outerText||o.innerText))}})),Pk(t),function(t){var e=zu((function(){if(!t.removed&&t.getBody().contains(document.activeElement)){var e=t.selection.getRng();if(e.collapsed){var n=Dx(t,e,!1);t.selection.setRng(n)}}}),0);t.on("focus",(function(){e.throttle()})),t.on("blur",(function(){e.cancel()}))}(t),function(t){t.on("init",(function(){t.on("focusin",(function(e){var n=e.target;if(Xn(n)){var r=td(t.getBody(),n),o=Gn(r)?r:n;t.selection.getNode()!==o&&Tx(t,o).each((function(e){return t.selection.setRng(e)}))}}))}))}(t)}(),{showCaret:m,showBlockCaretContainer:function(t){t.hasAttribute("data-mce-caret")&&(Ro(t),f(d()),n.scrollIntoView(t))},hideFakeCaret:w,destroy:function(){a.destroy(),e=null}}},Wk=function(t){var e,n,r=ze.each,o=id.BACKSPACE,i=id.DELETE,a=t.dom,u=t.selection,c=t.parser,s=Se.gecko,l=Se.ie,f=Se.webkit,d="data:text/mce-internal,",m=l?"Text":"URL",g=function(e,n){try{t.getDoc().execCommand(e,!1,n)}catch(t){}},h=function(t){return t.isDefaultPrevented()},p=function(){var e=function(t){var e=a.create("body"),n=t.cloneContents();return e.appendChild(n),u.serializer.serialize(e,{format:"html"})};t.on("keydown",(function(n){var r,u,c=n.keyCode;if(!h(n)&&(c===i||c===o)){if(r=t.selection.isCollapsed(),u=t.getBody(),r&&!a.isEmpty(u))return;if(!r&&!function(n){var r=e(n),o=a.createRng();return o.selectNode(t.getBody()),r===e(o)}(t.selection.getRng()))return;n.preventDefault(),t.setContent(""),u.firstChild&&a.isBlock(u.firstChild)?t.selection.setCursorLocation(u.firstChild,0):t.selection.setCursorLocation(u,0),t.nodeChanged()}}))},v=function(){t.shortcuts.add("meta+a",null,"SelectAll")},b=function(){t.inline||a.bind(t.getDoc(),"mousedown mouseup",(function(e){var n;if(e.target===t.getDoc().documentElement)if(n=u.getRng(),t.getBody().focus(),"mousedown"===e.type){if(zo(n.startContainer))return;u.placeCaretAt(e.clientX,e.clientY)}else u.setRng(n)}))},y=function(){Range.prototype.getClientRects||t.on("mousedown",(function(e){if(!h(e)&&"HTML"===e.target.nodeName){var n=t.getBody();n.blur(),oo.setEditorTimeout(t,(function(){n.focus()}))}}))},x=function(){t.on("click",(function(e){var n=e.target;/^(IMG|HR)$/.test(n.nodeName)&&"false"!==a.getContentEditableParent(n)&&(e.preventDefault(),t.selection.select(n),t.nodeChanged()),"A"===n.nodeName&&a.hasClass(n,"mce-item-anchor")&&(e.preventDefault(),u.select(n))}))},w=function(){t.on("keydown",(function(t){if(!h(t)&&t.keyCode===o&&u.isCollapsed()&&0===u.getRng().startOffset){var e=u.getNode().previousSibling;if(e&&e.nodeName&&"table"===e.nodeName.toLowerCase())return t.preventDefault(),!1}}))},S=function(){(function(t){return t.getParam("readonly")})(t)||t.on("BeforeExecCommand mousedown",(function(){g("StyleWithCSS",!1),g("enableInlineTableEditing",!1),ps(t)||g("enableObjectResizing",!1)}))},k=function(){t.on("SetContent ExecCommand",(function(t){"setcontent"!==t.type&&"mceInsertLink"!==t.command||r(a.select("a"),(function(t){var e=t.parentNode,n=a.getRoot();if(e.lastChild===t){for(;e&&!a.isBlock(e);){if(e.parentNode.lastChild!==e||e===n)return;e=e.parentNode}a.add(e,"br",{"data-mce-bogus":1})}}))}))},_=function(){t.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}")},O=function(){t.inline||t.on("keydown",(function(){document.activeElement===document.body&&t.getWin().focus()}))},E=function(){t.inline||(t.contentStyles.push("body {min-height: 150px}"),t.on("click",(function(e){var n;if("HTML"===e.target.nodeName){if(Se.ie>11)return void t.getBody().focus();n=t.selection.getRng(),t.getBody().focus(),t.selection.setRng(n),t.selection.normalize(),t.nodeChanged()}})))},z=function(){Se.mac&&t.on("keydown",(function(e){!id.metaKeyPressed(e)||e.shiftKey||37!==e.keyCode&&39!==e.keyCode||(e.preventDefault(),t.selection.getSel().modify("move",37===e.keyCode?"backward":"forward","lineboundary"))}))},T=function(){t.on("click",(function(t){var e=t.target;do{if("A"===e.tagName)return void t.preventDefault()}while(e=e.parentNode)})),t.contentStyles.push(".mce-content-body {-webkit-touch-callout: none}")},M=function(){t.on("init",(function(){t.dom.bind(t.getBody(),"submit",(function(t){t.preventDefault()}))}))},D=function(){t.on("dragstart",(function(e){!function(e){var n,r;e.dataTransfer&&(t.selection.isCollapsed()&&"IMG"===e.target.tagName&&u.select(e.target),(n=t.selection.getContent()).length>0&&(r=d+escape(t.id)+","+escape(n),e.dataTransfer.setData(m,r)))}(e)})),t.on("drop",(function(e){if(!h(e)){var n=function(t){var e;return t.dataTransfer&&(e=t.dataTransfer.getData(m))&&e.indexOf(d)>=0?(e=e.substr(d.length).split(","),{id:unescape(e[0]),html:unescape(e[1])}):null}(e);if(n&&n.id!==t.id){e.preventDefault();var r=sd(e.x,e.y,t.getDoc());u.setRng(r),o=n.html,i=!0,t.queryCommandSupported("mceInsertClipboardContent")?t.execCommand("mceInsertClipboardContent",!1,{content:o,internal:i}):t.execCommand("mceInsertContent",!1,o)}}var o,i}))},A=C;return Jv(t)?(f&&(b(),x(),M(),v(),Se.iOS&&(O(),E(),T())),s&&(y(),S(),_(),z())):(t.on("keydown",(function(e){var n,r;if(!h(e)&&e.keyCode===id.BACKSPACE){var o=(n=u.getRng()).startContainer,i=n.startOffset,c=a.getRoot();if(r=o,n.collapsed&&0===i){for(;r&&r.parentNode&&r.parentNode.firstChild===r&&r.parentNode!==c;)r=r.parentNode;"BLOCKQUOTE"===r.tagName&&(t.formatter.toggle("blockquote",null,r),(n=a.createRng()).setStart(o,0),n.setEnd(o,0),u.setRng(n))}}})),p(),Se.windowsPhone||t.on("keyup focusin mouseup",(function(t){id.modifierPressed(t)||u.normalize()}),!0),f&&(b(),x(),ns(t)&&t.on("init",(function(){g("DefaultParagraphSeparator",ns(t))})),M(),w(),c.addNodeFilter("br",(function(t){for(var e=t.length;e--;)"Apple-interchange-newline"===t[e].attr("class")&&t[e].remove()})),Se.iOS?(O(),E(),T()):v()),Se.ie>=11&&(E(),w()),Se.ie&&(v(),g("AutoUrlDetect",!1),D()),s&&(t.on("keydown",(function(e){if(!h(e)&&e.keyCode===o){if(!t.getBody().getElementsByTagName("hr").length)return;if(u.isCollapsed()&&0===u.getRng().startOffset){var n=u.getNode(),r=n.previousSibling;if("HR"===n.nodeName)return a.remove(n),void e.preventDefault();r&&r.nodeName&&"hr"===r.nodeName.toLowerCase()&&(a.remove(r),e.preventDefault())}}})),y(),e=function(){var e=a.getAttribs(u.getStart().cloneNode(!1));return function(){var n=u.getStart();n!==t.getBody()&&(a.setAttrib(n,"style",null),r(e,(function(t){n.setAttributeNode(t.cloneNode(!0))})))}},n=function(){return!u.isCollapsed()&&a.getParent(u.getStart(),a.isBlock)!==a.getParent(u.getEnd(),a.isBlock)},t.on("keypress",(function(r){var o;if(!h(r)&&(8===r.keyCode||46===r.keyCode)&&n())return o=e(),t.getDoc().execCommand("delete",!1,null),o(),r.preventDefault(),!1})),a.bind(t.getDoc(),"cut",(function(r){var o;!h(r)&&n()&&(o=e(),oo.setEditorTimeout(t,(function(){o()})))})),S(),k(),_(),z(),w())),{refreshContentEditable:A,isHidden:function(){if(!s||t.removed)return!1;var e=t.selection.getSel();return!e||!e.rangeCount||0===e.rangeCount}}},qk=pu.DOM,Gk=function(t){return t.inline?t.getElement().nodeName.toLowerCase():void 0},$k=function(t){return vt(t,(function(t){return!1===v(t)}))},Xk=function(t){var e=t.settings,n=t.editorUpload.blobCache;return $k({allow_conditional_comments:e.allow_conditional_comments,allow_html_data_urls:e.allow_html_data_urls,allow_svg_data_urls:e.allow_svg_data_urls,allow_html_in_named_anchor:e.allow_html_in_named_anchor,allow_script_urls:e.allow_script_urls,allow_unsafe_link_target:e.allow_unsafe_link_target,convert_fonts_to_spans:e.convert_fonts_to_spans,fix_list_elements:e.fix_list_elements,font_size_legacy_values:e.font_size_legacy_values,forced_root_block:e.forced_root_block,forced_root_block_attrs:e.forced_root_block_attrs,padd_empty_with_br:e.padd_empty_with_br,preserve_cdata:e.preserve_cdata,remove_trailing_brs:e.remove_trailing_brs,inline_styles:e.inline_styles,root_name:Gk(t),validate:!0,blob_cache:n,document:t.getDoc(),images_dataimg_filter:e.images_dataimg_filter})},Kk=function(t){var e=t.dom.getRoot();t.inline||jf(t)&&t.selection.getStart(!0)!==e||Rl(e).each((function(e){var n=e.getNode(),r=Hn(n)?Rl(n).getOr(e):e;Se.browser.isIE()?function(t,e){var n=Me.fromDom(t.getBody()),r=(rm(t)?L.from(e):L.none()).map(om).filter(nm(n));t.bookmark=r.isSome()?r:t.bookmark}(t,r.toRange()):t.selection.setRng(r.toRange())}))},Yk=function(t){t.bindPendingEventDelegates(),t.initialized=!0,function(t){t.fire("Init")}(t),t.focus(!0),Kk(t),t.nodeChanged({initial:!0}),t.execCallback("init_instance_callback",t),function(t){t.settings.auto_focus&&oo.setEditorTimeout(t,(function(){var e;(e=!0===t.settings.auto_focus?t:t.editorManager.get(t.settings.auto_focus)).destroyed||e.focus()}),100)}(t)},Jk=function(t){return t.inline?t.ui.styleSheetLoader:t.dom.styleSheetLoader},Qk=function(t){var e=Jk(t),n=hs(t),r=t.contentCSS,o=function(){e.unloadAll(r),t.inline||t.ui.styleSheetLoader.unloadAll(n)},i=function(){t.removed?o():t.on("remove",o)};if(t.contentStyles.length>0){var a="";ze.each(t.contentStyles,(function(t){a+=t+"\r\n"})),t.dom.addStyle(a)}var u=to.all(function(t,e,n){var r=[new to((function(n,r){return Jk(t).loadAll(e,n,r)}))];return t.inline?r:r.concat([new to((function(e,r){return t.ui.styleSheetLoader.loadAll(n,e,r)}))])}(t,r,n)).then(i).catch(i);return t.settings.content_style&&function(t,e){var n=Me.fromDom(t.getBody()),r=cn(un(n)),o=Me.fromTag("style");Zn(o,"type","text/css"),gn(o,Me.fromText(e)),gn(r,o),t.on("remove",(function(){vn(o)}))}(t,t.settings.content_style),u},Zk=function(t){var e=t.settings,n=t.getDoc(),r=t.getBody();!function(t){t.fire("PreInit")}(t),e.browser_spellcheck||e.gecko_spellcheck||(n.body.spellcheck=!1,qk.setAttrib(r,"spellcheck","false")),t.quirks=Wk(t),function(t){t.fire("PostRender")}(t);var o=function(t){return t.getParam("directionality",_u.isRtl()?"rtl":void 0)}(t);void 0!==o&&(r.dir=o),e.protect&&t.on("BeforeSetContent",(function(t){ze.each(e.protect,(function(e){t.content=t.content.replace(e,(function(t){return"\x3c!--mce:protected "+escape(t)+"--\x3e"}))}))})),t.on("SetContent",(function(){t.addVisual(t.getBody())})),t.on("compositionstart compositionend",(function(e){t.composing="compositionstart"===e.type}))},t_=function(t){!0!==t.removed&&(!function(t){Jv(t)||t.load({initial:!0,format:"html"}),t.startContent=t.getContent({format:"raw"})}(t),Yk(t))},e_=function(t,e){var n=t.settings,r=t.getElement(),o=t.getDoc();n.inline||(t.getElement().style.visibility=t.orgVisibility),e||t.inline||(o.open(),o.write(t.iframeHTML),o.close()),t.inline&&(qk.addClass(r,"mce-content-body"),t.contentDocument=o=document,t.contentWindow=window,t.bodyElement=r,t.contentAreaContainer=r);var i=t.getBody();i.disabled=!0,t.readonly=!!n.readonly,t.readonly||(t.inline&&"static"===qk.getStyle(i,"position",!0)&&(i.style.position="relative"),i.contentEditable=t.getParam("content_editable_state",!0)),i.disabled=!1,t.editorUpload=Vy(t),t.schema=Ti(n),t.dom=pu(o,{keep_values:!0,url_converter:t.convertURL,url_converter_scope:t,hex_colors:n.force_hex_style_colors,update_styles:!0,root_element:t.inline?t.getBody():null,collect:function(){return t.inline},schema:t.schema,contentCssCors:fs(t),referrerPolicy:ds(t),onSetAttrib:function(e){t.fire("SetAttrib",e)}}),t.parser=function(t){var e=zb(Xk(t),t.schema);return e.addAttributeFilter("src,href,style,tabindex",(function(e,n){for(var r,o,i=e.length,a=t.dom,u="data-mce-"+n;i--;)if((o=(r=e[i]).attr(n))&&!r.attr(u)){if(0===o.indexOf("data:")||0===o.indexOf("blob:"))continue;"style"===n?((o=a.serializeStyle(a.parseStyle(o),r.name)).length||(o=null),r.attr(u,o),r.attr(n,o)):"tabindex"===n?(r.attr(u,o),r.attr(n,null)):r.attr(u,t.convertURL(o,n,r.name))}})),e.addNodeFilter("script",(function(t){for(var e=t.length;e--;){var n=t[e],r=n.attr("type")||"no/type";0!==r.indexOf("mce-")&&n.attr("type","mce-"+r)}})),t.settings.preserve_cdata&&e.addNodeFilter("#cdata",(function(e){for(var n=e.length;n--;){var r=e[n];r.type=8,r.name="#comment",r.value="[CDATA["+t.dom.encode(r.value)+"]]"}})),e.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",(function(e){for(var n=e.length,r=t.schema.getNonEmptyElements();n--;){var o=e[n];o.isEmpty(r)&&0===o.getAll("br").length&&(o.append(new Nm("br",1)).shortEnded=!0)}})),e}(t),t.serializer=Nb(function(t){var e=t.settings;return Mt(Mt({},Xk(t)),$k({url_converter:e.url_converter,url_converter_scope:e.url_converter_scope,element_format:e.element_format,entities:e.entities,entity_encoding:e.entity_encoding,indent:e.indent,indent_after:e.indent_after,indent_before:e.indent_before,block_elements:e.block_elements,boolean_attributes:e.boolean_attributes,custom_elements:e.custom_elements,extended_valid_elements:e.extended_valid_elements,invalid_elements:e.invalid_elements,invalid_styles:e.invalid_styles,move_caret_before_on_enter_elements:e.move_caret_before_on_enter_elements,non_empty_elements:e.non_empty_elements,schema:e.schema,self_closing_elements:e.self_closing_elements,short_ended_elements:e.short_ended_elements,special:e.special,text_block_elements:e.text_block_elements,text_inline_elements:e.text_inline_elements,valid_children:e.valid_children,valid_classes:e.valid_classes,valid_elements:e.valid_elements,valid_styles:e.valid_styles,verify_html:e.verify_html,whitespace_elements:e.whitespace_elements}))}(t),t),t.selection=lb(t.dom,t.getWin(),t.serializer,t),t.annotator=Qf(t),t.formatter=qy(t),t.undoManager=$y(t),t._nodeChangeDispatcher=new _k(t),t._selectionOverrides=jk(t),HC(t),Ok(t),Jv(t)||zk(t);var a=function(t){return Jv(t)?wu(null):kk(t)}(t);BC(t,a),function(t){ns(t)&&t.on("NodeChange",z(IC,t))}(t),Qy(t);var u=Qv(t);Zk(t),u.fold((function(){Qk(t).then((function(){return t_(t)}))}),(function(e){t.setProgressState(!0),Qk(t).then((function(){e().then((function(e){t.setProgressState(!1),t_(t)}),(function(e){t.notificationManager.open({type:"error",text:String(e)}),t_(t)}))}))}))},n_=pu.DOM,r_=function(t){var e=function(t){return t.getParam("doctype","<!DOCTYPE html>")}(t)+"<html><head>";(function(t){return t.getParam("document_base_url","")})(t)!==t.documentBaseUrl&&(e+='<base href="'+t.documentBaseURI.getURI()+'" />'),e+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';var n=function(t){return ts(t,"body_id","tinymce")}(t),r=function(t){return ts(t,"body_class","")}(t),o=t.translate(function(t){return t.getParam("iframe_aria_text","Rich Text Area. Press ALT-0 for help.","string")}(t));return es(t)&&(e+='<meta http-equiv="Content-Security-Policy" content="'+es(t)+'" />'),e+='</head><body id="'+n+'" class="mce-content-body '+r+'" data-id="'+t.id+'" aria-label="'+o+'"><br></body></html>'},o_=function(t,e){var n,r,o,i,a=t.translate("Rich Text Area"),u=(n=t.id,r=a,e.height,o=function(t){return t.getParam("iframe_attrs",{})}(t),i=Me.fromTag("iframe"),tr(i,o),tr(i,{id:n+"_ifr",frameBorder:"0",allowTransparency:"true",title:r}),Bu(i,"tox-edit-area__iframe"),i).dom;u.onload=function(){u.onload=null,t.fire("load")};var c=function(t,e){if(document.domain!==window.location.hostname&&Se.browser.isIE()){var n=By("mce");t[n]=function(){e_(t)};var r='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinymce.get("'+t.id+'");document.write(ed.iframeHTML);document.close();ed.'+n+"(true);})()";return n_.setAttrib(e,"src",r),!0}return!1}(t,u);return t.contentAreaContainer=e.iframeContainer,t.iframeElement=u,t.iframeHTML=r_(t),n_.add(e.iframeContainer,u),c},i_=pu.DOM,a_=function(t,e,n){var r=xy.get(n),o=xy.urls[n]||t.documentBaseUrl.replace(/\/$/,"");if(n=ze.trim(n),r&&-1===ze.inArray(e,n)){if(ze.each(xy.dependencies(n),(function(n){a_(t,e,n)})),t.plugins[n])return;try{var i=new r(t,o,t.$);t.plugins[n]=i,i.init&&(i.init(t,o),e.push(n))}catch(e){!function(t,e,n){var r=_u.translate(["Failed to initialize plugin: {0}",e]);nd(t,"PluginLoadError",{message:r}),zy(r,n),ky(t,r)}(t,n,e)}}},u_=function(t){return t.replace(/^\-/,"")},c_=function(t){return{editorContainer:t,iframeContainer:t,api:{}}},s_=function(t){var e=t.getElement();return t.inline?c_(null):function(t){var e=i_.create("div");return i_.insertAfter(e,t),c_(e)}(e)},l_=function(t){var e=t.getElement();return t.orgDisplay=e.style.display,d(bs(t))?function(t){return t.theme.renderUI()}(t):x(bs(t))?function(t){var e=t.getElement(),n=bs(t)(t,e);return n.editorContainer.nodeType&&(n.editorContainer.id=n.editorContainer.id||t.id+"_parent"),n.iframeContainer&&n.iframeContainer.nodeType&&(n.iframeContainer.id=n.iframeContainer.id||t.id+"_iframecontainer"),n.height=n.iframeHeight?n.iframeHeight:e.offsetHeight,n}(t):s_(t)},f_=function(t){t.fire("ScriptsLoaded"),function(t){var e=ze.trim(as(t)),n=t.ui.registry.getAll().icons,r=Mt(Mt({},ly.get("default").icons),ly.get(e).icons);dt(r,(function(e,r){xt(n,r)||t.ui.registry.addIcon(r,e)}))}(t),function(t){var e=bs(t);if(d(e)){t.settings.theme=u_(e);var n=wy.get(e);t.theme=new n(t,wy.urls[e]),t.theme.init&&t.theme.init(t,wy.urls[e]||t.documentBaseUrl.replace(/\/$/,""),t.$)}else t.theme={}}(t),function(t){var e=[];ze.each(Cs(t).split(/[ ,]/),(function(n){a_(t,e,u_(n))}))}(t);var e=l_(t);!function(t,e){var n={show:L.from(e.show).getOr(C),hide:L.from(e.hide).getOr(C),disable:L.from(e.disable).getOr(C),isDisabled:L.from(e.isDisabled).getOr(A),enable:function(){t.mode.isReadOnly()||L.from(e.enable).map(D)}};t.ui=Mt(Mt({},t.ui),n)}(t,L.from(e.api).getOr({}));var n={editorContainer:e.editorContainer,iframeContainer:e.iframeContainer};return t.editorContainer=n.editorContainer?n.editorContainer:null,Dy(t),t.inline?e_(t):function(t,e){var n=o_(t,e);e.editorContainer&&(n_.get(e.editorContainer).style.display=t.orgDisplay,t.hidden=n_.isHidden(e.editorContainer)),t.getElement().style.display="none",n_.setAttrib(t.id,"aria-hidden","true"),n||e_(t)}(t,n)},d_=pu.DOM,m_=function(t){return"-"===t.charAt(0)},g_=function(t,e){var n=ms(e),r=function(t){return t.getParam("language_url","","string")}(e);if(!1===_u.hasCode(n)&&"en"!==n){var o=""!==r?r:e.editorManager.baseURL+"/langs/"+n+".js";t.add(o,C,void 0,(function(){!function(t,e,n){_y(t,"LanguageLoadError",Oy("language",e,n))}(e,o,n)}))}},h_=function(t,e,n){return L.from(e).filter((function(t){return t.length>0&&!ly.has(t)})).map((function(e){return{url:t.editorManager.baseURL+"/icons/"+e+"/icons"+n+".js",name:L.some(e)}}))},p_=function(t,e,n){var r=h_(e,"default",n),o=function(t){return L.from(function(t){return t.getParam("icons_url","","string")}(t)).filter((function(t){return t.length>0})).map((function(t){return{url:t,name:L.none()}}))}(e).orThunk((function(){return h_(e,as(e),"")}));q(function(t){for(var e=[],n=function(t){e.push(t)},r=0;r<t.length;r++)t[r].each(n);return e}([r,o]),(function(n){t.add(n.url,C,void 0,(function(){!function(t,e,n){_y(t,"IconsLoadError",Oy("icons",e,n))}(e,n.url,n.name.getOrUndefined())}))}))},v_=function(t,e){var n=xu.ScriptLoader;!function(t,e,n,r){var o=bs(e);if(d(o)){if(!m_(o)&&!xt(wy.urls,o)){var i=function(t){return t.getParam("theme_url")}(e);i?wy.load(o,e.documentBaseURI.toAbsolute(i)):wy.load(o,"themes/"+o+"/theme"+n+".js")}t.loadQueue((function(){wy.waitFor(o,r)}))}else r()}(n,t,e,(function(){g_(n,t),p_(n,t,e),function(t,e){ze.each(function(t){return t.getParam("external_plugins")}(t),(function(e,n){xy.load(n,e,C,void 0,(function(){Ey(t,e,n)})),t.settings.plugins+=" "+n})),ze.each(Cs(t).split(/[ ,]/),(function(n){if((n=ze.trim(n))&&!xy.urls[n])if(m_(n)){n=n.substr(1,n.length);var r=xy.dependencies(n);ze.each(r,(function(n){var r={prefix:"plugins/",resource:n,suffix:"/plugin"+e+".js"},o=xy.createUrl(r,n);xy.load(o.resource,o,C,void 0,(function(){Ey(t,o.prefix+o.resource+o.suffix,o.resource)}))}))}else{var o={prefix:"plugins/",resource:n,suffix:"/plugin"+e+".js"};xy.load(n,o,C,void 0,(function(){Ey(t,o.prefix+o.resource+o.suffix,n)}))}}))}(t,e),n.loadQueue((function(){t.removed||f_(t)}),t,(function(){t.removed||f_(t)}))}))},b_=function(t){var e=t.id;_u.setCode(ms(t));var n=function(){d_.unbind(window,"ready",n),t.render()};if(Ii.Event.domLoaded){if(t.getElement()&&Se.contentEditable){var r=Me.fromDom(t.getElement()),o=function(t){return Y(t.dom.attributes,(function(t,e){return t[e.name]=e.value,t}),{})}(r);t.on("remove",(function(){G(r.dom.attributes,(function(t){return rr(r,t.name)})),tr(r,o)})),t.ui.styleSheetLoader=function(t,e){return ao.forElement(t,{contentCssCors:ws(e),referrerPolicy:ds(e)})}(r,t),!function(t){return t.getParam("inline")}(t)?(t.orgVisibility=t.getElement().style.visibility,t.getElement().style.visibility="hidden"):t.inline=!0;var i=t.getElement().form||d_.getParent(e,"form");i&&(t.formElement=i,function(t){return t.getParam("hidden_input")}(t)&&!Vn(t.getElement())&&(d_.insertAfter(d_.create("input",{type:"hidden",name:e}),e),t.hasHiddenInput=!0),t.formEventDelegate=function(e){t.fire(e.type,e)},d_.bind(i,"submit reset",t.formEventDelegate),t.on("reset",(function(){t.resetContent()})),!function(t){return t.getParam("submit_patch")}(t)||i.submit.nodeType||i.submit.length||i._mceOldSubmit||(i._mceOldSubmit=i.submit,i.submit=function(){return t.editorManager.triggerSave(),t.setDirty(!1),i._mceOldSubmit(i)})),t.windowManager=Cy(t),t.notificationManager=yy(t),function(t){return"xml"===t.getParam("encoding")}(t)&&t.on("GetContent",(function(t){t.save&&(t.content=d_.encode(t.content))})),function(t){return t.getParam("add_form_submit_trigger")}(t)&&t.on("submit",(function(){t.initialized&&t.save()})),function(t){return t.getParam("add_unload_trigger")}(t)&&(t._beforeUnload=function(){!t.initialized||t.destroyed||t.isHidden()||t.save({format:"raw",no_events:!0,set_dirty:!1})},t.editorManager.on("BeforeUnload",t._beforeUnload)),t.editorManager.add(t),v_(t,t.suffix)}}else d_.bind(window,"ready",n)},y_=function(t,e){return function(t,e){return tb(t).editor.addVisual(e)}(t,e)},x_={"font-size":"size","font-family":"face"},w_=function(t,e,n){return dp(Me.fromDom(n),(function(e){return function(e){return ur(e,t).orThunk((function(){return"font"===Le(e)?yt(x_,t).bind((function(t){return nr(e,t)})):L.none()}))}(e)}),(function(t){return Be(Me.fromDom(e),t)}))},C_=function(t){return function(e,n){return L.from(n).map(Me.fromDom).filter(Ie).bind((function(n){return w_(t,e,n.dom).or(function(t,e){return L.from(pu.DOM.getStyle(e,t,!0))}(t,n.dom))})).getOr("")}},S_=C_("font-size"),k_=S((function(t){return t.replace(/[\'\"\\]/g,"").replace(/,\s+/g,",")}),C_("font-family")),__=function(t){return Rl(t.getBody()).map((function(t){var e=t.container();return Pn(e)?e.parentNode:e}))},O_=function(t,e){return function(t){return L.from(t.selection.getRng()).bind((function(e){var n=t.getBody();return e.startContainer===n&&0===e.startOffset?L.none():L.from(t.selection.getStart(!0))}))}(t).orThunk(z(__,t)).map(Me.fromDom).filter(Ie).bind(e)},E_=function(t,e){return O_(t,k(L.some,e))},z_=function(t,e){if(/^[0-9.]+$/.test(e)){var n=parseInt(e,10);if(n>=1&&n<=7){var r=function(t){return ze.explode(t.getParam("font_size_style_values","xx-small,x-small,small,medium,large,x-large,xx-large"))}(t),o=function(t){return ze.explode(t.getParam("font_size_classes",""))}(t);return o?o[n-1]||e:r[n-1]||e}return e}return e},T_=function(t){var e=t.split(/\s*,\s*/);return W(e,(function(t){return-1===t.indexOf(" ")||Vt(t,'"')||Vt(t,"'")?t:"'"+t+"'"})).join(",")},M_=function(t,e){var n=function(t){if("string"!=typeof t){var e=ze.extend({paste:t.paste,data:{paste:t.paste}},t);return{content:t.content,details:e}}return{content:t,details:{}}}(e);!function(t,e,n){Zv(t).editor.insertContent(e,n)}(t,n.content,n.details)},D_=ze.each,A_=ze.map,N_=ze.inArray,B_=function(){function t(t){this.commands={state:{},exec:{},value:{}},this.editor=t,this.setupCommands(t)}return t.prototype.execCommand=function(t,e,n,r){var o,i=!1,a=this;if(!a.editor.removed){var u;if("mcefocus"!==t.toLowerCase()&&(/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(t)||r&&r.skip_focus?(u=a.editor,cm(u).each((function(t){return u.selection.setRng(t)}))):a.editor.focus()),(r=a.editor.fire("BeforeExecCommand",{command:t,ui:e,value:n})).isDefaultPrevented())return!1;var c=t.toLowerCase();if(o=a.commands.exec[c])return o(c,e,n),a.editor.fire("ExecCommand",{command:t,ui:e,value:n}),!0;if(D_(this.editor.plugins,(function(r){if(r.execCommand&&r.execCommand(t,e,n))return a.editor.fire("ExecCommand",{command:t,ui:e,value:n}),i=!0,!1})),i)return i;if(a.editor.theme&&a.editor.theme.execCommand&&a.editor.theme.execCommand(t,e,n))return a.editor.fire("ExecCommand",{command:t,ui:e,value:n}),!0;try{i=a.editor.getDoc().execCommand(t,e,n)}catch(t){}return!!i&&(a.editor.fire("ExecCommand",{command:t,ui:e,value:n}),!0)}},t.prototype.queryCommandState=function(t){var e;if(!this.editor.quirks.isHidden()&&!this.editor.removed){if(t=t.toLowerCase(),e=this.commands.state[t])return e(t);try{return this.editor.getDoc().queryCommandState(t)}catch(t){}return!1}},t.prototype.queryCommandValue=function(t){var e;if(!this.editor.quirks.isHidden()&&!this.editor.removed){if(t=t.toLowerCase(),e=this.commands.value[t])return e(t);try{return this.editor.getDoc().queryCommandValue(t)}catch(t){}}},t.prototype.addCommands=function(t,e){void 0===e&&(e="exec");var n=this;D_(t,(function(t,r){D_(r.toLowerCase().split(","),(function(r){n.commands[e][r]=t}))}))},t.prototype.addCommand=function(t,e,n){var r=this;t=t.toLowerCase(),this.commands.exec[t]=function(t,o,i,a){return e.call(n||r.editor,o,i,a)}},t.prototype.queryCommandSupported=function(t){if(t=t.toLowerCase(),this.commands.exec[t])return!0;try{return this.editor.getDoc().queryCommandSupported(t)}catch(t){}return!1},t.prototype.addQueryStateHandler=function(t,e,n){var r=this;t=t.toLowerCase(),this.commands.state[t]=function(){return e.call(n||r.editor)}},t.prototype.addQueryValueHandler=function(t,e,n){var r=this;t=t.toLowerCase(),this.commands.value[t]=function(){return e.call(n||r.editor)}},t.prototype.hasCustomCommand=function(t){return t=t.toLowerCase(),!!this.commands.exec[t]},t.prototype.execNativeCommand=function(t,e,n){return void 0===e&&(e=!1),void 0===n&&(n=null),this.editor.getDoc().execCommand(t,e,n)},t.prototype.isFormatMatch=function(t){return this.editor.formatter.match(t)},t.prototype.toggleFormat=function(t,e){this.editor.formatter.toggle(t,e),this.editor.nodeChanged()},t.prototype.storeSelection=function(t){this.selectionBookmark=this.editor.selection.getBookmark(t)},t.prototype.restoreSelection=function(){this.editor.selection.moveToBookmark(this.selectionBookmark)},t.prototype.setupCommands=function(t){var e=this;this.addCommands({"mceResetDesignMode,mceBeginUndoLevel":C,"mceEndUndoLevel,mceAddUndoLevel":function(){t.undoManager.add()},mceFocus:function(e,n,r){Sm(t,r)},"Cut,Copy,Paste":function(n){var r,o=t.getDoc();try{e.execNativeCommand(n)}catch(t){r=!0}if("paste"!==n||o.queryCommandEnabled(n)||(r=!0),r||!o.queryCommandSupported(n)){var i=t.translate("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.");Se.mac&&(i=i.replace(/Ctrl\+/g,"⌘+")),t.notificationManager.open({text:i,type:"error"})}},unlink:function(){if(t.selection.isCollapsed()){var e=t.dom.getParent(t.selection.getStart(),"a");e&&t.dom.remove(e,!0)}else t.formatter.remove("link")},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull,JustifyNone":function(n){var r=n.substring(7);"full"===r&&(r="justify"),D_("left,center,right,justify".split(","),(function(e){r!==e&&t.formatter.remove("align"+e)})),"none"!==r&&e.toggleFormat("align"+r)},"InsertUnorderedList,InsertOrderedList":function(n){var r;e.execNativeCommand(n);var o=t.dom.getParent(t.selection.getNode(),"ol,ul");o&&(r=o.parentNode,/^(H[1-6]|P|ADDRESS|PRE)$/.test(r.nodeName)&&(e.storeSelection(),t.dom.split(r,o),e.restoreSelection()))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(t){e.toggleFormat(t)},"ForeColor,HiliteColor":function(t,n,r){e.toggleFormat(t,{value:r})},FontName:function(e,n,r){!function(t,e){var n=z_(t,e);t.formatter.toggle("fontname",{value:T_(n)}),t.nodeChanged()}(t,r)},FontSize:function(e,n,r){!function(t,e){t.formatter.toggle("fontsize",{value:z_(t,e)}),t.nodeChanged()}(t,r)},LineHeight:function(e,n,r){!function(t,e){t.formatter.toggle("lineheight",{value:String(e)}),t.nodeChanged()}(t,r)},Lang:function(t,n,r){e.toggleFormat(t,{value:r.code,customValue:r.customCode})},RemoveFormat:function(e){t.formatter.remove(e)},mceBlockQuote:function(){e.toggleFormat("blockquote")},FormatBlock:function(t,n,r){return e.toggleFormat(r||"p")},mceCleanup:function(){var e=t.selection.getBookmark();t.setContent(t.getContent()),t.selection.moveToBookmark(e)},mceRemoveNode:function(n,r,o){var i=o||t.selection.getNode();i!==t.getBody()&&(e.storeSelection(),t.dom.remove(i,!0),e.restoreSelection())},mceSelectNodeDepth:function(e,n,r){var o=0;t.dom.getParent(t.selection.getNode(),(function(e){if(1===e.nodeType&&o++===r)return t.selection.select(e),!1}),t.getBody())},mceSelectNode:function(e,n,r){t.selection.select(r)},mceInsertContent:function(e,n,r){M_(t,r)},mceInsertRawHTML:function(e,n,r){t.selection.setContent("tiny_mce_marker");var o=t.getContent();t.setContent(o.replace(/tiny_mce_marker/g,(function(){return r})))},mceInsertNewLine:function(e,n,r){ck(t,r)},mceToggleFormat:function(t,n,r){e.toggleFormat(r)},mceSetContent:function(e,n,r){t.setContent(r)},"Indent,Outdent":function(e){DC(t,e)},mceRepaint:C,InsertHorizontalRule:function(){t.execCommand("mceInsertContent",!1,"<hr />")},mceToggleVisualAid:function(){t.hasVisual=!t.hasVisual,t.addVisual()},mceReplaceContent:function(e,n,r){t.execCommand("mceInsertContent",!1,r.replace(/\{\$selection\}/g,t.selection.getContent({format:"text"})))},mceInsertLink:function(e,n,r){"string"==typeof r&&(r={href:r});var o=t.dom.getParent(t.selection.getNode(),"a");r.href=r.href.replace(/ /g,"%20"),o&&r.href||t.formatter.remove("link"),r.href&&t.formatter.apply("link",r,o)},selectAll:function(){var e=t.dom.getParent(t.selection.getStart(),qn);if(e){var n=t.dom.createRng();n.selectNodeContents(e),t.selection.setRng(n)}},mceNewDocument:function(){t.setContent("")},InsertLineBreak:function(e,n,r){return KS(t,r),!0}});var n=function(e){return function(){var n=t.selection,r=n.isCollapsed()?[t.dom.getParent(n.getNode(),t.dom.isBlock)]:n.getSelectedBlocks(),o=A_(r,(function(n){return!!t.formatter.matchNode(n,e)}));return-1!==N_(o,!0)}};e.addCommands({JustifyLeft:n("alignleft"),JustifyCenter:n("aligncenter"),JustifyRight:n("alignright"),JustifyFull:n("alignjustify"),"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(t){return e.isFormatMatch(t)},mceBlockQuote:function(){return e.isFormatMatch("blockquote")},Outdent:function(){return zC(t)},"InsertUnorderedList,InsertOrderedList":function(e){var n=t.dom.getParent(t.selection.getNode(),"ul,ol");return n&&("insertunorderedlist"===e&&"UL"===n.tagName||"insertorderedlist"===e&&"OL"===n.tagName)}},"state"),e.addCommands({Undo:function(){t.undoManager.undo()},Redo:function(){t.undoManager.redo()}}),e.addQueryValueHandler("FontName",(function(){return function(t){return E_(t,(function(e){return k_(t.getBody(),e.dom)})).getOr("")}(t)}),this),e.addQueryValueHandler("FontSize",(function(){return function(t){return E_(t,(function(e){return S_(t.getBody(),e.dom)})).getOr("")}(t)}),this),e.addQueryValueHandler("LineHeight",(function(){return function(t){return E_(t,(function(e){var n=Me.fromDom(t.getBody());return dp(e,(function(t){return ur(t,"line-height")}),z(Be,n)).getOrThunk((function(){var t=parseFloat(ir(e,"line-height")),n=parseFloat(ir(e,"font-size"));return String(t/n)}))})).getOr("")}(t)}),this)},t}(),R_="data-mce-contenteditable",H_=function(t,e,n){var r,o;Hu(t,e)&&!1===n?(o=e,Du(r=t)?r.dom.classList.remove(o):Nu(r,o),Ru(r)):n&&Bu(t,e)},L_=function(t,e,n){try{t.getDoc().execCommand(e,!1,String(n))}catch(t){}},V_=function(t,e){t.dom.contentEditable=e?"true":"false"},P_=function(t,e){var n=Me.fromDom(t.getBody());H_(n,"mce-content-readonly",e),e?(t.selection.controlSelection.hideResizeRect(),t._selectionOverrides.hideFakeCaret(),function(t){L.from(t.selection.getNode()).each((function(t){t.removeAttribute("data-mce-selected")}))}(t),t.readonly=!0,V_(n,!1),q(Vu(n,'*[contenteditable="true"]'),(function(t){Zn(t,R_,"true"),V_(t,!1)}))):(t.readonly=!1,V_(n,!0),function(t){q(Vu(t,'*[data-mce-contenteditable="true"]'),(function(t){rr(t,R_),V_(t,!0)}))}(n),L_(t,"StyleWithCSS",!1),L_(t,"enableInlineTableEditing",!1),L_(t,"enableObjectResizing",!1),wm(t)&&t.focus(),function(t){t.selection.setRng(t.selection.getRng())}(t),t.nodeChanged())},I_=function(t){return t.readonly},F_=function(t){t.parser.addAttributeFilter("contenteditable",(function(e){I_(t)&&q(e,(function(t){t.attr(R_,t.attr("contenteditable")),t.attr("contenteditable","false")}))})),t.serializer.addAttributeFilter(R_,(function(e){I_(t)&&q(e,(function(t){t.attr("contenteditable",t.attr(R_))}))})),t.serializer.addTempAttr(R_)},U_=function(t,e){if(function(t){return"click"===t.type}(e)&&!id.metaKeyPressed(e)){var n=Me.fromDom(e.target);(function(t,e){return Zr(e,"a",(function(e){return Be(e,Me.fromDom(t.getBody()))})).bind((function(t){return nr(t,"href")}))})(t,n).each((function(n){if(e.preventDefault(),/^#/.test(n)){var r=t.dom.select(n+',[name="'+((Vt(o=n,i="#")?function(t,e){return t.substring(e)}(o,i.length):o)+'"]'));r.length&&t.selection.scrollIntoView(r[0],!0)}else window.open(n,"_blank","rel=noopener noreferrer,menubar=yes,toolbar=yes,location=yes,status=yes,resizable=yes,scrollbars=yes");var o,i}))}},j_=ze.makeMap("focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange mouseout mouseenter mouseleave wheel keydown keypress keyup input beforeinput contextmenu dragstart dragend dragover draggesture dragdrop drop drag submit compositionstart compositionend compositionupdate touchstart touchmove touchend touchcancel"," "),W_=function(){function t(t){this.bindings={},this.settings=t||{},this.scope=this.settings.scope||this,this.toggleEvent=this.settings.toggleEvent||A}return t.isNative=function(t){return!!j_[t.toLowerCase()]},t.prototype.fire=function(t,e){var n=t.toLowerCase(),r=Bi(n,e||{},this.scope);this.settings.beforeFire&&this.settings.beforeFire(r);var o=this.bindings[n];if(o)for(var i=0,a=o.length;i<a;i++){var u=o[i];if(!u.removed){if(u.once&&this.off(n,u.func),r.isImmediatePropagationStopped())return r;if(!1===u.func.call(this.scope,r))return r.preventDefault(),r}}return r},t.prototype.on=function(t,e,n,r){if(!1===e&&(e=A),e){var o={func:e,removed:!1};r&&ze.extend(o,r);for(var i=t.toLowerCase().split(" "),a=i.length;a--;){var u=i[a],c=this.bindings[u];c||(c=[],this.toggleEvent(u,!0)),c=n?Dt([o],c,!0):Dt(Dt([],c,!0),[o],!1),this.bindings[u]=c}}return this},t.prototype.off=function(t,e){var n=this;if(t)for(var r=t.toLowerCase().split(" "),o=r.length;o--;){var i=r[o],a=this.bindings[i];if(!i)return dt(this.bindings,(function(t,e){n.toggleEvent(e,!1),delete n.bindings[e]})),this;if(a){if(e){var u=$(a,(function(t){return t.func===e}));a=u.fail,this.bindings[i]=a,q(u.pass,(function(t){t.removed=!0}))}else a.length=0;a.length||(this.toggleEvent(t,!1),delete this.bindings[i])}}else dt(this.bindings,(function(t,e){n.toggleEvent(e,!1)})),this.bindings={};return this},t.prototype.once=function(t,e,n){return this.on(t,e,n,{once:!0})},t.prototype.has=function(t){return t=t.toLowerCase(),!(!this.bindings[t]||0===this.bindings[t].length)},t}(),q_=function(t){return t._eventDispatcher||(t._eventDispatcher=new W_({scope:t,toggleEvent:function(e,n){W_.isNative(e)&&t.toggleNativeEvent&&t.toggleNativeEvent(e,n)}})),t._eventDispatcher},G_={fire:function(t,e,n){var r=this;if(r.removed&&"remove"!==t&&"detach"!==t)return e;var o=q_(r).fire(t,e);if(!1!==n&&r.parent)for(var i=r.parent();i&&!o.isPropagationStopped();)i.fire(t,o,!1),i=i.parent();return o},on:function(t,e,n){return q_(this).on(t,e,n)},off:function(t,e){return q_(this).off(t,e)},once:function(t,e){return q_(this).once(t,e)},hasEventListeners:function(t){return q_(this).has(t)}},$_=pu.DOM,X_=function(t,e){if("selectionchange"===e)return t.getDoc();if(!t.inline&&/^mouse|touch|click|contextmenu|drop|dragover|dragend/.test(e))return t.getDoc().documentElement;var n=vs(t);return n?(t.eventRoot||(t.eventRoot=$_.select(n)[0]),t.eventRoot):t.getBody()},K_=function(t,e,n){!function(t){return!t.hidden&&!I_(t)}(t)?I_(t)&&U_(t,n):t.fire(e,n)},Y_=function(t,e){var n;if(t.delegates||(t.delegates={}),!t.delegates[e]&&!t.removed){var r=X_(t,e);if(vs(t)){if(Vw||(Vw={},t.editorManager.on("removeEditor",(function(){t.editorManager.activeEditor||Vw&&(dt(Vw,(function(e,n){t.dom.unbind(X_(t,n))})),Vw=null)}))),Vw[e])return;n=function(n){for(var r=n.target,o=t.editorManager.get(),i=o.length;i--;){var a=o[i].getBody();(a===r||$_.isChildOf(r,a))&&K_(o[i],e,n)}},Vw[e]=n,$_.bind(r,e,n)}else n=function(n){K_(t,e,n)},$_.bind(r,e,n),t.delegates[e]=n}},J_=Mt(Mt({},G_),{bindPendingEventDelegates:function(){var t=this;ze.each(t._pendingNativeEvents,(function(e){Y_(t,e)}))},toggleNativeEvent:function(t,e){var n=this;"focus"!==t&&"blur"!==t&&(n.removed||(e?n.initialized?Y_(n,t):n._pendingNativeEvents?n._pendingNativeEvents.push(t):n._pendingNativeEvents=[t]:n.initialized&&(n.dom.unbind(X_(n,t),t,n.delegates[t]),delete n.delegates[t])))},unbindAllNativeEvents:function(){var t=this,e=t.getBody(),n=t.dom;t.delegates&&(dt(t.delegates,(function(e,n){t.dom.unbind(X_(t,n),n,e)})),delete t.delegates),!t.inline&&e&&n&&(e.onload=null,n.unbind(t.getWin()),n.unbind(t.getDoc())),n&&(n.unbind(e),n.unbind(t.getContainer()))}}),Q_=["design","readonly"],Z_=function(t,e,n,r){var o=n[e.get()],i=n[r];try{i.activate()}catch(t){return void console.error("problem while activating editor mode "+r+":",t)}o.deactivate(),o.editorReadOnly!==i.editorReadOnly&&P_(t,i.editorReadOnly),e.set(r),function(t,e){t.fire("SwitchMode",{mode:e})}(t,r)},tO=function(t){var e=wu("design"),n=wu({design:{activate:C,deactivate:C,editorReadOnly:!1},readonly:{activate:C,deactivate:C,editorReadOnly:!0}});return function(t){t.serializer?F_(t):t.on("PreInit",(function(){F_(t)}))}(t),function(t){t.on("ShowCaret",(function(e){I_(t)&&e.preventDefault()})),t.on("ObjectSelected",(function(e){I_(t)&&e.preventDefault()}))}(t),{isReadOnly:function(){return I_(t)},set:function(r){return function(t,e,n,r){if(r!==n.get()){if(!xt(e,r))throw new Error("Editor mode '"+r+"' is invalid");t.initialized?Z_(t,n,e,r):t.on("init",(function(){return Z_(t,n,e,r)}))}}(t,n.get(),e,r)},get:function(){return e.get()},register:function(t,e){n.set(function(t,e,n){var r;if(U(Q_,e))throw new Error("Cannot override default mode "+e);return Mt(Mt({},t),((r={})[e]=Mt(Mt({},n),{deactivate:function(){try{n.deactivate()}catch(t){console.error("problem while deactivating editor mode "+e+":",t)}}}),r))}(n.get(),t,e))}}},eO=ze.each,nO=ze.explode,rO={f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123},oO=ze.makeMap("alt,ctrl,shift,meta,access"),iO=function(t){var e,n={};eO(nO(t.toLowerCase(),"+"),(function(t){t in oO?n[t]=!0:/^[0-9]{2,}$/.test(t)?n.keyCode=parseInt(t,10):(n.charCode=t.charCodeAt(0),n.keyCode=rO[t]||t.toUpperCase().charCodeAt(0))}));var r=[n.keyCode];for(e in oO)n[e]?r.push(e):n[e]=!1;return n.id=r.join(","),n.access&&(n.alt=!0,Se.mac?n.ctrl=!0:n.shift=!0),n.meta&&(Se.mac?n.meta=!0:(n.ctrl=!0,n.meta=!1)),n},aO=function(){function t(t){this.shortcuts={},this.pendingPatterns=[],this.editor=t;var e=this;t.on("keyup keypress keydown",(function(t){!e.hasModifier(t)&&!e.isFunctionKey(t)||t.isDefaultPrevented()||(eO(e.shortcuts,(function(n){if(e.matchShortcut(t,n))return e.pendingPatterns=n.subpatterns.slice(0),"keydown"===t.type&&e.executeShortcutAction(n),!0})),e.matchShortcut(t,e.pendingPatterns[0])&&(1===e.pendingPatterns.length&&"keydown"===t.type&&e.executeShortcutAction(e.pendingPatterns[0]),e.pendingPatterns.shift()))}))}return t.prototype.add=function(t,e,n,r){var o=this,i=o.normalizeCommandFunc(n);return eO(nO(ze.trim(t)),(function(t){var n=o.createShortcut(t,e,i,r);o.shortcuts[n.id]=n})),!0},t.prototype.remove=function(t){var e=this.createShortcut(t);return!!this.shortcuts[e.id]&&(delete this.shortcuts[e.id],!0)},t.prototype.normalizeCommandFunc=function(t){var e=this,n=t;return"string"==typeof n?function(){e.editor.execCommand(n,!1,null)}:ze.isArray(n)?function(){e.editor.execCommand(n[0],n[1],n[2])}:n},t.prototype.createShortcut=function(t,e,n,r){var o=ze.map(nO(t,">"),iO);return o[o.length-1]=ze.extend(o[o.length-1],{func:n,scope:r||this.editor}),ze.extend(o[0],{desc:this.editor.translate(e),subpatterns:o.slice(1)})},t.prototype.hasModifier=function(t){return t.altKey||t.ctrlKey||t.metaKey},t.prototype.isFunctionKey=function(t){return"keydown"===t.type&&t.keyCode>=112&&t.keyCode<=123},t.prototype.matchShortcut=function(t,e){return!!e&&(e.ctrl===t.ctrlKey&&e.meta===t.metaKey&&(e.alt===t.altKey&&e.shift===t.shiftKey&&(!!(t.keyCode===e.keyCode||t.charCode&&t.charCode===e.charCode)&&(t.preventDefault(),!0))))},t.prototype.executeShortcutAction=function(t){return t.func?t.func.call(t.scope):null},t}(),uO=function(){var t=function(){var t={},e={},n={},r={},o={},i={},a={},u=function(t,e){return function(n,r){return t[n.toLowerCase()]=Mt(Mt({},r),{type:e})}};return{addButton:u(t,"button"),addGroupToolbarButton:u(t,"grouptoolbarbutton"),addToggleButton:u(t,"togglebutton"),addMenuButton:u(t,"menubutton"),addSplitButton:u(t,"splitbutton"),addMenuItem:u(e,"menuitem"),addNestedMenuItem:u(e,"nestedmenuitem"),addToggleMenuItem:u(e,"togglemenuitem"),addAutocompleter:u(n,"autocompleter"),addContextMenu:u(o,"contextmenu"),addContextToolbar:u(i,"contexttoolbar"),addContextForm:u(i,"contextform"),addSidebar:u(a,"sidebar"),addIcon:function(t,e){return r[t.toLowerCase()]=e},getAll:function(){return{buttons:t,menuItems:e,icons:r,popups:n,contextMenus:o,contextToolbars:i,sidebars:a}}}}();return{addAutocompleter:t.addAutocompleter,addButton:t.addButton,addContextForm:t.addContextForm,addContextMenu:t.addContextMenu,addContextToolbar:t.addContextToolbar,addIcon:t.addIcon,addMenuButton:t.addMenuButton,addMenuItem:t.addMenuItem,addNestedMenuItem:t.addNestedMenuItem,addSidebar:t.addSidebar,addSplitButton:t.addSplitButton,addToggleButton:t.addToggleButton,addGroupToolbarButton:t.addGroupToolbarButton,addToggleMenuItem:t.addToggleMenuItem,getAll:t.getAll}},cO=pu.DOM,sO=ze.extend,lO=ze.each,fO=ze.resolve,dO=Se.ie,mO=function(){function t(t,e,n){var r=this;this.plugins={},this.contentCSS=[],this.contentStyles=[],this.loadedCSS={},this.isNotDirty=!1,this.editorManager=n,this.documentBaseUrl=n.documentBaseURL,sO(this,J_),this.settings=uy(this,t,this.documentBaseUrl,n.defaultSettings,e),this.settings.suffix&&(n.suffix=this.settings.suffix),this.suffix=n.suffix,this.settings.base_url&&n._setBaseUrl(this.settings.base_url),this.baseUri=n.baseURI,this.settings.referrer_policy&&(xu.ScriptLoader._setReferrerPolicy(this.settings.referrer_policy),pu.DOM.styleSheetLoader._setReferrerPolicy(this.settings.referrer_policy)),Ou.languageLoad=this.settings.language_load,Ou.baseURL=n.baseURL,this.id=t,this.setDirty(!1),this.documentBaseURI=new Fm(this.settings.document_base_url,{base_uri:this.baseUri}),this.baseURI=this.baseUri,this.inline=!!this.settings.inline,this.shortcuts=new aO(this),this.editorCommands=new B_(this),this.settings.cache_suffix&&(Se.cacheSuffix=this.settings.cache_suffix.replace(/^[\?\&]+/,"")),this.ui={registry:uO(),styleSheetLoader:void 0,show:C,hide:C,enable:C,disable:C,isDisabled:A};var o=tO(this);this.mode=o,this.setMode=o.set,n.fire("SetupEditor",{editor:this}),this.execCallback("setup",this),this.$=su.overrideDefaults((function(){return{context:r.inline?r.getBody():r.getDoc(),element:r.getBody()}}))}return t.prototype.render=function(){b_(this)},t.prototype.focus=function(t){this.execCommand("mceFocus",!1,t)},t.prototype.hasFocus=function(){return xm(this)},t.prototype.execCallback=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r,o=this,i=o.settings[t];if(i)return o.callbackLookup&&(r=o.callbackLookup[t])&&(i=r.func,r=r.scope),"string"==typeof i&&(r=(r=i.replace(/\.\w+$/,""))?fO(r):0,i=fO(i),o.callbackLookup=o.callbackLookup||{},o.callbackLookup[t]={func:i,scope:r}),i.apply(r||o,e)},t.prototype.translate=function(t){return _u.translate(t)},t.prototype.getParam=function(t,e,n){return sy(this,t,e,n)},t.prototype.hasPlugin=function(t,e){return!!U(Cs(this).split(/[ ,]/),t)&&(!e||void 0!==xy.get(t))},t.prototype.nodeChanged=function(t){this._nodeChangeDispatcher.nodeChanged(t)},t.prototype.addCommand=function(t,e,n){this.editorCommands.addCommand(t,e,n)},t.prototype.addQueryStateHandler=function(t,e,n){this.editorCommands.addQueryStateHandler(t,e,n)},t.prototype.addQueryValueHandler=function(t,e,n){this.editorCommands.addQueryValueHandler(t,e,n)},t.prototype.addShortcut=function(t,e,n,r){this.shortcuts.add(t,e,n,r)},t.prototype.execCommand=function(t,e,n,r){return this.editorCommands.execCommand(t,e,n,r)},t.prototype.queryCommandState=function(t){return this.editorCommands.queryCommandState(t)},t.prototype.queryCommandValue=function(t){return this.editorCommands.queryCommandValue(t)},t.prototype.queryCommandSupported=function(t){return this.editorCommands.queryCommandSupported(t)},t.prototype.show=function(){var t=this;t.hidden&&(t.hidden=!1,t.inline?t.getBody().contentEditable="true":(cO.show(t.getContainer()),cO.hide(t.id)),t.load(),t.fire("show"))},t.prototype.hide=function(){var t=this,e=t.getDoc();t.hidden||(dO&&e&&!t.inline&&e.execCommand("SelectAll"),t.save(),t.inline?(t.getBody().contentEditable="false",t===t.editorManager.focusedEditor&&(t.editorManager.focusedEditor=null)):(cO.hide(t.getContainer()),cO.setStyle(t.id,"display",t.orgDisplay)),t.hidden=!0,t.fire("hide"))},t.prototype.isHidden=function(){return!!this.hidden},t.prototype.setProgressState=function(t,e){this.fire("ProgressState",{state:t,time:e})},t.prototype.load=function(t){var e,n=this,r=n.getElement();if(n.removed)return"";if(r){(t=t||{}).load=!0;var o=Vn(r)?r.value:r.innerHTML;return e=n.setContent(o,t),t.element=r,t.no_events||n.fire("LoadContent",t),t.element=r=null,e}},t.prototype.save=function(t){var e,n,r=this,o=r.getElement();if(o&&r.initialized&&!r.removed)return(t=t||{}).save=!0,t.element=o,t.content=r.getContent(t),t.no_events||r.fire("SaveContent",t),"raw"===t.format&&r.fire("RawSaveContent",t),e=t.content,Vn(o)?o.value=e:(!t.is_removing&&r.inline||(o.innerHTML=e),(n=cO.getParent(r.id,"form"))&&lO(n.elements,(function(t){if(t.name===r.id)return t.value=e,!1}))),t.element=o=null,!1!==t.set_dirty&&r.setDirty(!1),e},t.prototype.setContent=function(t,e){return Rb(this,t,e)},t.prototype.getContent=function(t){return Bb(this,t)},t.prototype.insertContent=function(t,e){e&&(t=sO({content:t},e)),this.execCommand("mceInsertContent",!1,t)},t.prototype.resetContent=function(t){void 0===t?Rb(this,this.startContent,{format:"raw"}):Rb(this,t),this.undoManager.reset(),this.setDirty(!1),this.nodeChanged()},t.prototype.isDirty=function(){return!this.isNotDirty},t.prototype.setDirty=function(t){var e=!this.isNotDirty;this.isNotDirty=!t,t&&t!==e&&this.fire("dirty")},t.prototype.getContainer=function(){var t=this;return t.container||(t.container=cO.get(t.editorContainer||t.id+"_parent")),t.container},t.prototype.getContentAreaContainer=function(){return this.contentAreaContainer},t.prototype.getElement=function(){return this.targetElm||(this.targetElm=cO.get(this.id)),this.targetElm},t.prototype.getWin=function(){var t,e=this;return e.contentWindow||(t=e.iframeElement)&&(e.contentWindow=t.contentWindow),e.contentWindow},t.prototype.getDoc=function(){var t,e=this;return e.contentDocument||(t=e.getWin())&&(e.contentDocument=t.document),e.contentDocument},t.prototype.getBody=function(){var t=this.getDoc();return this.bodyElement||(t?t.body:null)},t.prototype.convertURL=function(t,e,n){var r=this,o=r.settings;return o.urlconverter_callback?r.execCallback("urlconverter_callback",t,n,!0,e):!o.convert_urls||n&&"LINK"===n.nodeName||0===t.indexOf("file:")||0===t.length?t:o.relative_urls?r.documentBaseURI.toRelative(t):t=r.documentBaseURI.toAbsolute(t,o.remove_script_host)},t.prototype.addVisual=function(t){y_(this,t)},t.prototype.remove=function(){Vb(this)},t.prototype.destroy=function(t){Pb(this,t)},t.prototype.uploadImages=function(t){return this.editorUpload.uploadImages(t)},t.prototype._scanForImages=function(){return this.editorUpload.scanForImages()},t.prototype.addButton=function(){throw new Error("editor.addButton has been removed in tinymce 5x, use editor.ui.registry.addButton or editor.ui.registry.addToggleButton or editor.ui.registry.addSplitButton instead")},t.prototype.addSidebar=function(){throw new Error("editor.addSidebar has been removed in tinymce 5x, use editor.ui.registry.addSidebar instead")},t.prototype.addMenuItem=function(){throw new Error("editor.addMenuItem has been removed in tinymce 5x, use editor.ui.registry.addMenuItem instead")},t.prototype.addContextToolbar=function(){throw new Error("editor.addContextToolbar has been removed in tinymce 5x, use editor.ui.registry.addContextToolbar instead")},t}(),gO=pu.DOM,hO=ze.explode,pO=ze.each,vO=ze.extend,bO=0,yO=!1,xO=[],wO=[],CO=function(t){var e=t.type;pO(OO.get(),(function(n){switch(e){case"scroll":n.fire("ScrollWindow",t);break;case"resize":n.fire("ResizeWindow",t)}}))},SO=function(t){t!==yO&&(t?su(window).on("resize scroll",CO):su(window).off("resize scroll",CO),yO=t)},kO=function(t){var e=wO;delete xO[t.id];for(var n=0;n<xO.length;n++)if(xO[n]===t){xO.splice(n,1);break}return wO=X(wO,(function(e){return t!==e})),OO.activeEditor===t&&(OO.activeEditor=wO.length>0?wO[0]:null),OO.focusedEditor===t&&(OO.focusedEditor=null),e.length!==wO.length},_O="CSS1Compat"!==document.compatMode,OO=Mt(Mt({},G_),{baseURI:null,baseURL:null,defaultSettings:{},documentBaseURL:null,suffix:null,$:su,majorVersion:"5",minorVersion:"10.3",releaseDate:"2022-02-09",editors:xO,i18n:_u,activeEditor:null,focusedEditor:null,settings:{},setup:function(){var t,e,n=this,r="";e=Fm.getDocumentBaseUrl(document.location),/^[^:]+:\/\/\/?[^\/]+\//.test(e)&&(e=e.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(e)||(e+="/"));var o,i=window.tinymce||window.tinyMCEPreInit;if(i)t=i.base||i.baseURL,r=i.suffix;else{for(var a=document.getElementsByTagName("script"),u=0;u<a.length;u++){var c;if(""!==(c=a[u].src||"")){var s=c.substring(c.lastIndexOf("/"));if(/tinymce(\.full|\.jquery|)(\.min|\.dev|)\.js/.test(c)){-1!==s.indexOf(".min")&&(r=".min"),t=c.substring(0,c.lastIndexOf("/"));break}}}if(!t&&document.currentScript)-1!==(c=document.currentScript.src).indexOf(".min")&&(r=".min"),t=c.substring(0,c.lastIndexOf("/"))}n.baseURL=new Fm(e).toAbsolute(t),n.documentBaseURL=e,n.baseURI=new Fm(n.baseURL),n.suffix=r,(o=n).on("AddEditor",z(gm,o)),o.on("RemoveEditor",z(hm,o))},overrideDefaults:function(t){var e=t.base_url;e&&this._setBaseUrl(e);var n=t.suffix;t.suffix&&(this.suffix=n),this.defaultSettings=t;var r=t.plugin_base_urls;void 0!==r&&dt(r,(function(t,e){Ou.PluginManager.urls[e]=t}))},init:function(t){var e,n=this,r=ze.makeMap("area base basefont br col frame hr img input isindex link meta param embed source wbr track colgroup option table tbody tfoot thead tr th td script noscript style textarea video audio iframe object menu"," "),o=function(t){var e=t.id;return e||(e=yt(t,"name").filter((function(t){return!gO.get(t)})).getOrThunk(gO.uniqueId),t.setAttribute("id",e)),e},i=function(t,e){return e.constructor===RegExp?e.test(t.className):gO.hasClass(t,e)},a=function(t){e=t},u=function(){var e,c=0,s=[],l=function(t,r,o){var i=new mO(t,r,n);s.push(i),i.on("init",(function(){++c===e.length&&a(s)})),i.targetElm=i.targetElm||o,i.render()};gO.unbind(window,"ready",u),function(e){var r=t[e];if(r)r.apply(n,[])}("onpageload"),e=su.unique(function(t){var e=[];if(Se.browser.isIE()&&Se.browser.version.major<11)return zy("TinyMCE does not support the browser you are using. For a list of supported browsers please see: https://www.tinymce.com/docs/get-started/system-requirements/"),[];if(_O)return zy("Failed to initialize the editor as the document is not in standards mode. TinyMCE requires standards mode."),[];if(t.types)return pO(t.types,(function(t){e=e.concat(gO.select(t.selector))})),e;if(t.selector)return gO.select(t.selector);if(t.target)return[t.target];switch(t.mode){case"exact":var n=t.elements||"";n.length>0&&pO(hO(n),(function(t){var n=gO.get(t);n?e.push(n):pO(document.forms,(function(n){pO(n.elements,(function(n){n.name===t&&(t="mce_editor_"+bO++,gO.setAttrib(n,"id",t),e.push(n))}))}))}));break;case"textareas":case"specific_textareas":pO(gO.select("textarea"),(function(n){t.editor_deselector&&i(n,t.editor_deselector)||t.editor_selector&&!i(n,t.editor_selector)||e.push(n)}))}return e}(t)),t.types?pO(t.types,(function(n){ze.each(e,(function(e){return!gO.is(e,n.selector)||(l(o(e),vO({},t,n),e),!1)}))})):(ze.each(e,(function(t){var e;(e=n.get(t.id))&&e.initialized&&!(e.getContainer()||e.getBody()).parentNode&&(kO(e),e.unbindAllNativeEvents(),e.destroy(!0),e.removed=!0,e=null)})),0===(e=ze.grep(e,(function(t){return!n.get(t.id)}))).length?a([]):pO(e,(function(e){!function(t,e){return t.inline&&e.tagName.toLowerCase()in r}(t,e)?l(o(e),t,e):zy("Could not initialize inline editor on invalid inline target element",e)})))};return n.settings=t,gO.bind(window,"ready",u),new to((function(t){e?t(e):a=function(e){t(e)}}))},get:function(t){return 0===arguments.length?wO.slice(0):d(t)?Q(wO,(function(e){return e.id===t})).getOr(null):w(t)&&wO[t]?wO[t]:null},add:function(t){var e=this;return xO[t.id]===t||(null===e.get(t.id)&&("length"!==t.id&&(xO[t.id]=t),xO.push(t),wO.push(t)),SO(!0),e.activeEditor=t,e.fire("AddEditor",{editor:t}),Pw||(Pw=function(t){var n=e.fire("BeforeUnload");if(n.returnValue)return t.preventDefault(),t.returnValue=n.returnValue,n.returnValue},window.addEventListener("beforeunload",Pw))),t},createEditor:function(t,e){return this.add(new mO(t,e,this))},remove:function(t){var e,n,r=this;if(t){if(!d(t))return n=t,h(r.get(n.id))?null:(kO(n)&&r.fire("RemoveEditor",{editor:n}),0===wO.length&&window.removeEventListener("beforeunload",Pw),n.remove(),SO(wO.length>0),n);pO(gO.select(t),(function(t){(n=r.get(t.id))&&r.remove(n)}))}else for(e=wO.length-1;e>=0;e--)r.remove(wO[e])},execCommand:function(t,e,n){var r=this,o=r.get(n);switch(t){case"mceAddEditor":return r.get(n)||new mO(n,r.settings,r).render(),!0;case"mceRemoveEditor":return o&&o.remove(),!0;case"mceToggleEditor":return o?(o.isHidden()?o.show():o.hide(),!0):(r.execCommand("mceAddEditor",!1,n),!0)}return!!r.activeEditor&&r.activeEditor.execCommand(t,e,n)},triggerSave:function(){pO(wO,(function(t){t.save()}))},addI18n:function(t,e){_u.add(t,e)},translate:function(t){return _u.translate(t)},setActive:function(t){var e=this.activeEditor;this.activeEditor!==t&&(e&&e.fire("deactivate",{relatedTarget:t}),t.fire("activate",{relatedTarget:e})),this.activeEditor=t},_setBaseUrl:function(t){this.baseURL=new Fm(this.documentBaseURL).toAbsolute(t.replace(/\/+$/,"")),this.baseURI=new Fm(this.baseURL)}});OO.setup();var EO,zO,TO,MO,DO=Math.min,AO=Math.max,NO=Math.round,BO=function(t,e,n){var r=e.x,o=e.y,i=t.w,a=t.h,u=e.w,c=e.h,s=(n||"").split("");return"b"===s[0]&&(o+=c),"r"===s[1]&&(r+=u),"c"===s[0]&&(o+=NO(c/2)),"c"===s[1]&&(r+=NO(u/2)),"b"===s[3]&&(o-=a),"r"===s[4]&&(r-=i),"c"===s[3]&&(o-=NO(a/2)),"c"===s[4]&&(r-=NO(i/2)),RO(r,o,i,a)},RO=function(t,e,n,r){return{x:t,y:e,w:n,h:r}},HO={inflate:function(t,e,n){return RO(t.x-e,t.y-n,t.w+2*e,t.h+2*n)},relativePosition:BO,findBestRelativePosition:function(t,e,n,r){var o,i;for(i=0;i<r.length;i++)if((o=BO(t,e,r[i])).x>=n.x&&o.x+o.w<=n.w+n.x&&o.y>=n.y&&o.y+o.h<=n.h+n.y)return r[i];return null},intersect:function(t,e){var n=AO(t.x,e.x),r=AO(t.y,e.y),o=DO(t.x+t.w,e.x+e.w),i=DO(t.y+t.h,e.y+e.h);return o-n<0||i-r<0?null:RO(n,r,o-n,i-r)},clamp:function(t,e,n){var r=t.x,o=t.y,i=t.x+t.w,a=t.y+t.h,u=e.x+e.w,c=e.y+e.h,s=AO(0,e.x-r),l=AO(0,e.y-o),f=AO(0,i-u),d=AO(0,a-c);return r+=s,o+=l,n&&(i+=s,a+=l,r-=f,o-=d),RO(r,o,(i-=f)-r,(a-=d)-o)},create:RO,fromClientRect:function(t){return RO(t.left,t.top,t.width,t.height)}},LO=(EO={},zO={},{load:function(t,e){var n='Script at URL "'+e+'" failed to load',r='Script at URL "'+e+"\" did not call `tinymce.Resource.add('"+t+"', data)` within 1 second";if(void 0!==EO[t])return EO[t];var o=new to((function(o,i){var a=function(t,e,n){void 0===n&&(n=1e3);var r=!1,o=null,i=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];r||(r=!0,null!==o&&(clearTimeout(o),o=null),t.apply(null,e))}},a=i(t),u=i(e);return{start:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];r||null!==o||(o=setTimeout((function(){return u.apply(null,t)}),n))},resolve:a,reject:u}}(o,i);zO[t]=a.resolve,xu.ScriptLoader.loadScript(e,(function(){return a.start(r)}),(function(){return a.reject(n)}))}));return EO[t]=o,o},add:function(t,e){void 0!==zO[t]&&(zO[t](e),delete zO[t]),EO[t]=to.resolve(e)}}),VO=ze.each,PO=ze.extend,IO=function(){};IO.extend=TO=function(t){var e=this.prototype,n=function(){var t,e,n,r=this;if(!MO&&(r.init&&r.init.apply(r,arguments),e=r.Mixins))for(t=e.length;t--;)(n=e[t]).init&&n.init.apply(r,arguments)},r=function(){return this};MO=!0;var o=new this;return MO=!1,t.Mixins&&(VO(t.Mixins,(function(e){for(var n in e)"init"!==n&&(t[n]=e[n])})),e.Mixins&&(t.Mixins=e.Mixins.concat(t.Mixins))),t.Methods&&VO(t.Methods.split(","),(function(e){t[e]=r})),t.Properties&&VO(t.Properties.split(","),(function(e){var n="_"+e;t[e]=function(t){var e=this;return void 0!==t?(e[n]=t,e):e[n]}})),t.Statics&&VO(t.Statics,(function(t,e){n[e]=t})),t.Defaults&&e.Defaults&&(t.Defaults=PO({},e.Defaults,t.Defaults)),dt(t,(function(t,n){"function"==typeof t&&e[n]?o[n]=function(t,n){return function(){var r=this,o=r._super;r._super=e[t];var i=n.apply(r,arguments);return r._super=o,i}}(n,t):o[n]=t})),n.prototype=o,n.constructor=n,n.extend=TO,n};var FO,UO=Math.min,jO=Math.max,WO=Math.round,qO={serialize:function(t){var e=JSON.stringify(t);return d(e)?e.replace(/[\u0080-\uFFFF]/g,(function(t){var e=t.charCodeAt(0).toString(16);return"\\u"+"0000".substring(e.length)+e})):e},parse:function(t){try{return JSON.parse(t)}catch(t){}}},GO={callbacks:{},count:0,send:function(t){var e=this,n=pu.DOM,r=void 0!==t.count?t.count:e.count,o="tinymce_jsonp_"+r;e.callbacks[r]=function(i){n.remove(o),delete e.callbacks[r],t.callback(i)},n.add(n.doc.body,"script",{id:o,src:t.url,type:"text/javascript"}),e.count++}},$O=Mt(Mt({},G_),{send:function(t){var e,n=0,r=function(){!t.async||4===e.readyState||n++>1e4?(t.success&&n<1e4&&200===e.status?t.success.call(t.success_scope,""+e.responseText,e,t):t.error&&t.error.call(t.error_scope,n>1e4?"TIMED_OUT":"GENERAL",e,t),e=null):oo.setTimeout(r,10)};if(t.scope=t.scope||this,t.success_scope=t.success_scope||t.scope,t.error_scope=t.error_scope||t.scope,t.async=!1!==t.async,t.data=t.data||"",$O.fire("beforeInitialize",{settings:t}),(e=new XMLHttpRequest).overrideMimeType&&e.overrideMimeType(t.content_type),e.open(t.type||(t.data?"POST":"GET"),t.url,t.async),t.crossDomain&&(e.withCredentials=!0),t.content_type&&e.setRequestHeader("Content-Type",t.content_type),t.requestheaders&&ze.each(t.requestheaders,(function(t){e.setRequestHeader(t.key,t.value)})),e.setRequestHeader("X-Requested-With","XMLHttpRequest"),(e=$O.fire("beforeSend",{xhr:e,settings:t}).xhr).send(t.data),!t.async)return r();oo.setTimeout(r,10)}}),XO=ze.extend,KO=function(){function t(t){this.settings=XO({},t),this.count=0}return t.sendRPC=function(e){return(new t).send(e)},t.prototype.send=function(t){var e=t.error,n=t.success,r=XO(this.settings,t);r.success=function(t,o){void 0===(t=qO.parse(t))&&(t={error:"JSON Parse error."}),t.error?e.call(r.error_scope||r.scope,t.error,o):n.call(r.success_scope||r.scope,t.result)},r.error=function(t,n){e&&e.call(r.error_scope||r.scope,t,n)},r.data=qO.serialize({id:t.id||"c"+this.count++,method:t.method,params:t.params}),r.content_type="application/json",$O.send(r)},t}();try{var YO="__storage_test__";(FO=window.localStorage).setItem(YO,YO),FO.removeItem(YO)}catch(t){FO=function(){var t={},e=[],n={getItem:function(e){return t[e]||null},setItem:function(n,r){e.push(n),t[n]=String(r)},key:function(t){return e[t]},removeItem:function(n){e=e.filter((function(t){return t===n})),delete t[n]},clear:function(){e=[],t={}},length:0};return Object.defineProperty(n,"length",{get:function(){return e.length},configurable:!1,enumerable:!1}),n}()}var JO={geom:{Rect:HO},util:{Promise:to,Delay:oo,Tools:ze,VK:id,URI:Fm,Class:IO,EventDispatcher:W_,Observable:G_,I18n:_u,XHR:$O,JSON:qO,JSONRequest:KO,JSONP:GO,LocalStorage:FO,Color:function(t){var e={},n=0,r=0,o=0,i=function(t){var i;return"object"==typeof t?"r"in t?(n=t.r,r=t.g,o=t.b):"v"in t&&function(t,e,i){if(t=(parseInt(t,10)||0)%360,e=parseInt(e,10)/100,i=parseInt(i,10)/100,e=jO(0,UO(e,1)),i=jO(0,UO(i,1)),0!==e){var a=t/60,u=i*e,c=u*(1-Math.abs(a%2-1)),s=i-u;switch(Math.floor(a)){case 0:n=u,r=c,o=0;break;case 1:n=c,r=u,o=0;break;case 2:n=0,r=u,o=c;break;case 3:n=0,r=c,o=u;break;case 4:n=c,r=0,o=u;break;case 5:n=u,r=0,o=c;break;default:n=r=o=0}n=WO(255*(n+s)),r=WO(255*(r+s)),o=WO(255*(o+s))}else n=r=o=WO(255*i)}(t.h,t.s,t.v):(i=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)[^\)]*\)/gi.exec(t))?(n=parseInt(i[1],10),r=parseInt(i[2],10),o=parseInt(i[3],10)):(i=/#([0-F]{2})([0-F]{2})([0-F]{2})/gi.exec(t))?(n=parseInt(i[1],16),r=parseInt(i[2],16),o=parseInt(i[3],16)):(i=/#([0-F])([0-F])([0-F])/gi.exec(t))&&(n=parseInt(i[1]+i[1],16),r=parseInt(i[2]+i[2],16),o=parseInt(i[3]+i[3],16)),n=n<0?0:n>255?255:n,r=r<0?0:r>255?255:r,o=o<0?0:o>255?255:o,e};return t&&i(t),e.toRgb=function(){return{r:n,g:r,b:o}},e.toHsv=function(){return function(t,e,n){var r,o;o=0;var i=UO(t/=255,UO(e/=255,n/=255)),a=jO(t,jO(e,n));return i===a?{h:0,s:0,v:100*(o=i)}:(r=(a-i)/a,o=a,{h:WO(60*((t===i?3:n===i?1:5)-(t===i?e-n:n===i?t-e:n-t)/(a-i))),s:WO(100*r),v:WO(100*o)})}(n,r,o)},e.toHex=function(){var t=function(t){return(t=parseInt(t,10).toString(16)).length>1?t:"0"+t};return"#"+t(n)+t(r)+t(o)},e.parse=i,e},ImageUploader:function(t){var e=Ay(),n=Ly(t,e);return{upload:function(e,r){return void 0===r&&(r=!0),n.upload(e,r?Hy(t):void 0)}}}},dom:{EventUtils:Ii,Sizzle:Sa,DomQuery:su,TreeWalker:uo,TextSeeker:Zu,DOMUtils:pu,ScriptLoader:xu,RangeUtils:Cd,Serializer:Nb,StyleSheetLoader:io,ControlSelection:ud,BookmarkManager:Zf,Selection:lb,Event:Ii.Event},html:{Styles:Di,Entities:yi,Node:Nm,Schema:Ti,SaxParser:Gm,DomParser:zb,Writer:Zm,Serializer:tg},Env:Se,AddOnManager:Ou,Annotator:Qf,Formatter:qy,UndoManager:$y,EditorCommands:B_,WindowManager:Cy,NotificationManager:yy,EditorObservable:J_,Shortcuts:aO,Editor:mO,FocusManager:sm,EditorManager:OO,DOM:pu.DOM,ScriptLoader:xu.ScriptLoader,PluginManager:xy,ThemeManager:wy,IconManager:ly,Resource:LO,trim:ze.trim,isArray:ze.isArray,is:ze.is,toArray:ze.toArray,makeMap:ze.makeMap,each:ze.each,map:ze.map,grep:ze.grep,inArray:ze.inArray,extend:ze.extend,create:ze.create,walk:ze.walk,createNS:ze.createNS,resolve:ze.resolve,explode:ze.explode,_addCacheSuffix:ze._addCacheSuffix,isOpera:Se.opera,isWebKit:Se.webkit,isIE:Se.ie,isGecko:Se.gecko,isMac:Se.mac},QO=ze.extend(OO,JO);!function(t){window.tinymce=t,window.tinyMCE=t}(QO),function(e){try{t.exports=e}catch(t){}}(QO)}()}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r](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.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";var t=n(7575),e=n.n(t);n(6890),n(8860),n(8190);function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}document.addEventListener("DOMContentLoaded",(function(){console.log("initing",document.body.classList.contains("theme-dark"));var t=document.body.classList.contains("theme-dark")?{skin:"oxide-dark",content_css:"dark"}:{skin:"oxide",content_css:"default"};e().init(o({selector:"#default"},t)),e().init(o({selector:"#dark",toolbar:"undo redo styleselect bold italic alignleft aligncenter alignright bullist numlist outdent indent code",plugins:"code"},t))}))})()})();