{
  "version": 3,
  "sources": ["../../../node_modules/@rails/actioncable/src/adapters.js", "../../../node_modules/@rails/actioncable/src/logger.js", "../../../node_modules/@rails/actioncable/src/connection_monitor.js", "../../../node_modules/@rails/actioncable/src/internal.js", "../../../node_modules/@rails/actioncable/src/connection.js", "../../../node_modules/@rails/actioncable/src/subscription.js", "../../../node_modules/@rails/actioncable/src/subscription_guarantor.js", "../../../node_modules/@rails/actioncable/src/subscriptions.js", "../../../node_modules/@rails/actioncable/src/consumer.js", "../../../node_modules/@rails/actioncable/src/index.js", "../../../node_modules/tinymce/tinymce.js", "../../../node_modules/tinymce/models/dom/model.js", "../../../node_modules/tinymce/themes/silver/theme.js", "../../../node_modules/tinymce/icons/default/icons.js", "../../../node_modules/tinymce/plugins/lists/plugin.js", "../../../node_modules/tinymce/plugins/link/plugin.js", "../../../node_modules/tinymce/plugins/table/plugin.js", "../../../node_modules/tinymce/plugins/code/plugin.js", "../../../node_modules/tinymce/plugins/help/plugin.js", "../../../node_modules/cropperjs/dist/cropper.js", "../../../node_modules/jquery/dist/jquery.js", "../../../node_modules/@nathanvda/cocoon/cocoon.js", "../../../node_modules/@hotwired/turbo/dist/turbo.es2017-esm.js", "../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/cable.js", "../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/snakeize.js", "../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/cable_stream_source_element.js", "../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/fetch_requests.js", "../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/index.js", "../../../node_modules/@hotwired/stimulus/dist/stimulus.js", "../../javascript/backend_controllers/application.js", "../../javascript/backend_controllers/tinymce_controller.js", "../../../node_modules/tinymce-i18n/langs8/de.js", "../../../node_modules/tinymce/models/dom/index.js", "../../../node_modules/tinymce/themes/silver/index.js", "../../../node_modules/tinymce/icons/default/index.js", "../../../node_modules/tinymce/skins/ui/oxide/skin.js", "../../../node_modules/tinymce/skins/ui/oxide/content.js", "../../../node_modules/tinymce/skins/content/default/content.js", "../../../node_modules/tinymce/plugins/lists/index.js", "../../../node_modules/tinymce/plugins/link/index.js", "../../../node_modules/tinymce/plugins/table/index.js", "../../../node_modules/tinymce/plugins/code/index.js", "../../../node_modules/tinymce/plugins/help/index.js", "../../../node_modules/tinymce/plugins/help/js/i18n/keynav/de.js", "../../../node_modules/sortablejs/modular/sortable.esm.js", "../../javascript/backend_controllers/sortable_controller.js", "../../javascript/backend_controllers/cropper_controller.js", "../../javascript/backend_controllers/index.js", "../../javascript/backend.js", "../../../node_modules/@popperjs/core/lib/index.js", "../../../node_modules/@popperjs/core/lib/enums.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getNodeName.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getWindow.js", "../../../node_modules/@popperjs/core/lib/dom-utils/instanceOf.js", "../../../node_modules/@popperjs/core/lib/modifiers/applyStyles.js", "../../../node_modules/@popperjs/core/lib/utils/getBasePlacement.js", "../../../node_modules/@popperjs/core/lib/utils/math.js", "../../../node_modules/@popperjs/core/lib/utils/userAgent.js", "../../../node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js", "../../../node_modules/@popperjs/core/lib/dom-utils/contains.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js", "../../../node_modules/@popperjs/core/lib/dom-utils/isTableElement.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getParentNode.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js", "../../../node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js", "../../../node_modules/@popperjs/core/lib/utils/within.js", "../../../node_modules/@popperjs/core/lib/utils/getFreshSideObject.js", "../../../node_modules/@popperjs/core/lib/utils/mergePaddingObject.js", "../../../node_modules/@popperjs/core/lib/utils/expandToHashMap.js", "../../../node_modules/@popperjs/core/lib/modifiers/arrow.js", "../../../node_modules/@popperjs/core/lib/utils/getVariation.js", "../../../node_modules/@popperjs/core/lib/modifiers/computeStyles.js", "../../../node_modules/@popperjs/core/lib/modifiers/eventListeners.js", "../../../node_modules/@popperjs/core/lib/utils/getOppositePlacement.js", "../../../node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js", "../../../node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js", "../../../node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js", "../../../node_modules/@popperjs/core/lib/utils/rectToClientRect.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js", "../../../node_modules/@popperjs/core/lib/utils/computeOffsets.js", "../../../node_modules/@popperjs/core/lib/utils/detectOverflow.js", "../../../node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js", "../../../node_modules/@popperjs/core/lib/modifiers/flip.js", "../../../node_modules/@popperjs/core/lib/modifiers/hide.js", "../../../node_modules/@popperjs/core/lib/modifiers/offset.js", "../../../node_modules/@popperjs/core/lib/modifiers/popperOffsets.js", "../../../node_modules/@popperjs/core/lib/utils/getAltAxis.js", "../../../node_modules/@popperjs/core/lib/modifiers/preventOverflow.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js", "../../../node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js", "../../../node_modules/@popperjs/core/lib/utils/orderModifiers.js", "../../../node_modules/@popperjs/core/lib/utils/debounce.js", "../../../node_modules/@popperjs/core/lib/utils/mergeByName.js", "../../../node_modules/@popperjs/core/lib/createPopper.js", "../../../node_modules/@popperjs/core/lib/popper-lite.js", "../../../node_modules/@popperjs/core/lib/popper.js", "../../../node_modules/bootstrap/js/src/dom/data.js", "../../../node_modules/bootstrap/js/src/util/index.js", "../../../node_modules/bootstrap/js/src/dom/event-handler.js", "../../../node_modules/bootstrap/js/src/dom/manipulator.js", "../../../node_modules/bootstrap/js/src/util/config.js", "../../../node_modules/bootstrap/js/src/base-component.js", "../../../node_modules/bootstrap/js/src/dom/selector-engine.js", "../../../node_modules/bootstrap/js/src/util/component-functions.js", "../../../node_modules/bootstrap/js/src/alert.js", "../../../node_modules/bootstrap/js/src/button.js", "../../../node_modules/bootstrap/js/src/util/swipe.js", "../../../node_modules/bootstrap/js/src/carousel.js", "../../../node_modules/bootstrap/js/src/collapse.js", "../../../node_modules/bootstrap/js/src/dropdown.js", "../../../node_modules/bootstrap/js/src/util/backdrop.js", "../../../node_modules/bootstrap/js/src/util/focustrap.js", "../../../node_modules/bootstrap/js/src/util/scrollbar.js", "../../../node_modules/bootstrap/js/src/modal.js", "../../../node_modules/bootstrap/js/src/offcanvas.js", "../../../node_modules/bootstrap/js/src/util/sanitizer.js", "../../../node_modules/bootstrap/js/src/util/template-factory.js", "../../../node_modules/bootstrap/js/src/tooltip.js", "../../../node_modules/bootstrap/js/src/popover.js", "../../../node_modules/bootstrap/js/src/scrollspy.js", "../../../node_modules/bootstrap/js/src/tab.js", "../../../node_modules/bootstrap/js/src/toast.js"],
  "sourcesContent": ["export default {\n  logger: self.console,\n  WebSocket: self.WebSocket\n}\n", "import adapters from \"./adapters\"\n\n// The logger is disabled by default. You can enable it with:\n//\n//   ActionCable.logger.enabled = true\n//\n//   Example:\n//\n//   import * as ActionCable from '@rails/actioncable'\n//\n//   ActionCable.logger.enabled = true\n//   ActionCable.logger.log('Connection Established.')\n//\n\nexport default {\n  log(...messages) {\n    if (this.enabled) {\n      messages.push(Date.now())\n      adapters.logger.log(\"[ActionCable]\", ...messages)\n    }\n  },\n}\n", "import logger from \"./logger\"\n\n// Responsible for ensuring the cable connection is in good health by validating the heartbeat pings sent from the server, and attempting\n// revival reconnections if things go astray. Internal class, not intended for direct user manipulation.\n\nconst now = () => new Date().getTime()\n\nconst secondsSince = time => (now() - time) / 1000\n\nclass ConnectionMonitor {\n  constructor(connection) {\n    this.visibilityDidChange = this.visibilityDidChange.bind(this)\n    this.connection = connection\n    this.reconnectAttempts = 0\n  }\n\n  start() {\n    if (!this.isRunning()) {\n      this.startedAt = now()\n      delete this.stoppedAt\n      this.startPolling()\n      addEventListener(\"visibilitychange\", this.visibilityDidChange)\n      logger.log(`ConnectionMonitor started. stale threshold = ${this.constructor.staleThreshold} s`)\n    }\n  }\n\n  stop() {\n    if (this.isRunning()) {\n      this.stoppedAt = now()\n      this.stopPolling()\n      removeEventListener(\"visibilitychange\", this.visibilityDidChange)\n      logger.log(\"ConnectionMonitor stopped\")\n    }\n  }\n\n  isRunning() {\n    return this.startedAt && !this.stoppedAt\n  }\n\n  recordPing() {\n    this.pingedAt = now()\n  }\n\n  recordConnect() {\n    this.reconnectAttempts = 0\n    this.recordPing()\n    delete this.disconnectedAt\n    logger.log(\"ConnectionMonitor recorded connect\")\n  }\n\n  recordDisconnect() {\n    this.disconnectedAt = now()\n    logger.log(\"ConnectionMonitor recorded disconnect\")\n  }\n\n  // Private\n\n  startPolling() {\n    this.stopPolling()\n    this.poll()\n  }\n\n  stopPolling() {\n    clearTimeout(this.pollTimeout)\n  }\n\n  poll() {\n    this.pollTimeout = setTimeout(() => {\n      this.reconnectIfStale()\n      this.poll()\n    }\n    , this.getPollInterval())\n  }\n\n  getPollInterval() {\n    const { staleThreshold, reconnectionBackoffRate } = this.constructor\n    const backoff = Math.pow(1 + reconnectionBackoffRate, Math.min(this.reconnectAttempts, 10))\n    const jitterMax = this.reconnectAttempts === 0 ? 1.0 : reconnectionBackoffRate\n    const jitter = jitterMax * Math.random()\n    return staleThreshold * 1000 * backoff * (1 + jitter)\n  }\n\n  reconnectIfStale() {\n    if (this.connectionIsStale()) {\n      logger.log(`ConnectionMonitor detected stale connection. reconnectAttempts = ${this.reconnectAttempts}, time stale = ${secondsSince(this.refreshedAt)} s, stale threshold = ${this.constructor.staleThreshold} s`)\n      this.reconnectAttempts++\n      if (this.disconnectedRecently()) {\n        logger.log(`ConnectionMonitor skipping reopening recent disconnect. time disconnected = ${secondsSince(this.disconnectedAt)} s`)\n      } else {\n        logger.log(\"ConnectionMonitor reopening\")\n        this.connection.reopen()\n      }\n    }\n  }\n\n  get refreshedAt() {\n    return this.pingedAt ? this.pingedAt : this.startedAt\n  }\n\n  connectionIsStale() {\n    return secondsSince(this.refreshedAt) > this.constructor.staleThreshold\n  }\n\n  disconnectedRecently() {\n    return this.disconnectedAt && (secondsSince(this.disconnectedAt) < this.constructor.staleThreshold)\n  }\n\n  visibilityDidChange() {\n    if (document.visibilityState === \"visible\") {\n      setTimeout(() => {\n        if (this.connectionIsStale() || !this.connection.isOpen()) {\n          logger.log(`ConnectionMonitor reopening stale connection on visibilitychange. visibilityState = ${document.visibilityState}`)\n          this.connection.reopen()\n        }\n      }\n      , 200)\n    }\n  }\n\n}\n\nConnectionMonitor.staleThreshold = 6 // Server::Connections::BEAT_INTERVAL * 2 (missed two pings)\nConnectionMonitor.reconnectionBackoffRate = 0.15\n\nexport default ConnectionMonitor\n", "export default {\n  \"message_types\": {\n    \"welcome\": \"welcome\",\n    \"disconnect\": \"disconnect\",\n    \"ping\": \"ping\",\n    \"confirmation\": \"confirm_subscription\",\n    \"rejection\": \"reject_subscription\"\n  },\n  \"disconnect_reasons\": {\n    \"unauthorized\": \"unauthorized\",\n    \"invalid_request\": \"invalid_request\",\n    \"server_restart\": \"server_restart\"\n  },\n  \"default_mount_path\": \"/cable\",\n  \"protocols\": [\n    \"actioncable-v1-json\",\n    \"actioncable-unsupported\"\n  ]\n}\n", "import adapters from \"./adapters\"\nimport ConnectionMonitor from \"./connection_monitor\"\nimport INTERNAL from \"./internal\"\nimport logger from \"./logger\"\n\n// Encapsulate the cable connection held by the consumer. This is an internal class not intended for direct user manipulation.\n\nconst {message_types, protocols} = INTERNAL\nconst supportedProtocols = protocols.slice(0, protocols.length - 1)\n\nconst indexOf = [].indexOf\n\nclass Connection {\n  constructor(consumer) {\n    this.open = this.open.bind(this)\n    this.consumer = consumer\n    this.subscriptions = this.consumer.subscriptions\n    this.monitor = new ConnectionMonitor(this)\n    this.disconnected = true\n  }\n\n  send(data) {\n    if (this.isOpen()) {\n      this.webSocket.send(JSON.stringify(data))\n      return true\n    } else {\n      return false\n    }\n  }\n\n  open() {\n    if (this.isActive()) {\n      logger.log(`Attempted to open WebSocket, but existing socket is ${this.getState()}`)\n      return false\n    } else {\n      logger.log(`Opening WebSocket, current state is ${this.getState()}, subprotocols: ${protocols}`)\n      if (this.webSocket) { this.uninstallEventHandlers() }\n      this.webSocket = new adapters.WebSocket(this.consumer.url, protocols)\n      this.installEventHandlers()\n      this.monitor.start()\n      return true\n    }\n  }\n\n  close({allowReconnect} = {allowReconnect: true}) {\n    if (!allowReconnect) { this.monitor.stop() }\n    // Avoid closing websockets in a \"connecting\" state due to Safari 15.1+ bug. See: https://github.com/rails/rails/issues/43835#issuecomment-1002288478\n    if (this.isOpen()) {\n      return this.webSocket.close()\n    }\n  }\n\n  reopen() {\n    logger.log(`Reopening WebSocket, current state is ${this.getState()}`)\n    if (this.isActive()) {\n      try {\n        return this.close()\n      } catch (error) {\n        logger.log(\"Failed to reopen WebSocket\", error)\n      }\n      finally {\n        logger.log(`Reopening WebSocket in ${this.constructor.reopenDelay}ms`)\n        setTimeout(this.open, this.constructor.reopenDelay)\n      }\n    } else {\n      return this.open()\n    }\n  }\n\n  getProtocol() {\n    if (this.webSocket) {\n      return this.webSocket.protocol\n    }\n  }\n\n  isOpen() {\n    return this.isState(\"open\")\n  }\n\n  isActive() {\n    return this.isState(\"open\", \"connecting\")\n  }\n\n  // Private\n\n  isProtocolSupported() {\n    return indexOf.call(supportedProtocols, this.getProtocol()) >= 0\n  }\n\n  isState(...states) {\n    return indexOf.call(states, this.getState()) >= 0\n  }\n\n  getState() {\n    if (this.webSocket) {\n      for (let state in adapters.WebSocket) {\n        if (adapters.WebSocket[state] === this.webSocket.readyState) {\n          return state.toLowerCase()\n        }\n      }\n    }\n    return null\n  }\n\n  installEventHandlers() {\n    for (let eventName in this.events) {\n      const handler = this.events[eventName].bind(this)\n      this.webSocket[`on${eventName}`] = handler\n    }\n  }\n\n  uninstallEventHandlers() {\n    for (let eventName in this.events) {\n      this.webSocket[`on${eventName}`] = function() {}\n    }\n  }\n\n}\n\nConnection.reopenDelay = 500\n\nConnection.prototype.events = {\n  message(event) {\n    if (!this.isProtocolSupported()) { return }\n    const {identifier, message, reason, reconnect, type} = JSON.parse(event.data)\n    switch (type) {\n      case message_types.welcome:\n        this.monitor.recordConnect()\n        return this.subscriptions.reload()\n      case message_types.disconnect:\n        logger.log(`Disconnecting. Reason: ${reason}`)\n        return this.close({allowReconnect: reconnect})\n      case message_types.ping:\n        return this.monitor.recordPing()\n      case message_types.confirmation:\n        this.subscriptions.confirmSubscription(identifier)\n        return this.subscriptions.notify(identifier, \"connected\")\n      case message_types.rejection:\n        return this.subscriptions.reject(identifier)\n      default:\n        return this.subscriptions.notify(identifier, \"received\", message)\n    }\n  },\n\n  open() {\n    logger.log(`WebSocket onopen event, using '${this.getProtocol()}' subprotocol`)\n    this.disconnected = false\n    if (!this.isProtocolSupported()) {\n      logger.log(\"Protocol is unsupported. Stopping monitor and disconnecting.\")\n      return this.close({allowReconnect: false})\n    }\n  },\n\n  close(event) {\n    logger.log(\"WebSocket onclose event\")\n    if (this.disconnected) { return }\n    this.disconnected = true\n    this.monitor.recordDisconnect()\n    return this.subscriptions.notifyAll(\"disconnected\", {willAttemptReconnect: this.monitor.isRunning()})\n  },\n\n  error() {\n    logger.log(\"WebSocket onerror event\")\n  }\n}\n\nexport default Connection\n", "// A new subscription is created through the ActionCable.Subscriptions instance available on the consumer.\n// It provides a number of callbacks and a method for calling remote procedure calls on the corresponding\n// Channel instance on the server side.\n//\n// An example demonstrates the basic functionality:\n//\n//   App.appearance = App.cable.subscriptions.create(\"AppearanceChannel\", {\n//     connected() {\n//       // Called once the subscription has been successfully completed\n//     },\n//\n//     disconnected({ willAttemptReconnect: boolean }) {\n//       // Called when the client has disconnected with the server.\n//       // The object will have an `willAttemptReconnect` property which\n//       // says whether the client has the intention of attempting\n//       // to reconnect.\n//     },\n//\n//     appear() {\n//       this.perform('appear', {appearing_on: this.appearingOn()})\n//     },\n//\n//     away() {\n//       this.perform('away')\n//     },\n//\n//     appearingOn() {\n//       $('main').data('appearing-on')\n//     }\n//   })\n//\n// The methods #appear and #away forward their intent to the remote AppearanceChannel instance on the server\n// by calling the `perform` method with the first parameter being the action (which maps to AppearanceChannel#appear/away).\n// The second parameter is a hash that'll get JSON encoded and made available on the server in the data parameter.\n//\n// This is how the server component would look:\n//\n//   class AppearanceChannel < ApplicationActionCable::Channel\n//     def subscribed\n//       current_user.appear\n//     end\n//\n//     def unsubscribed\n//       current_user.disappear\n//     end\n//\n//     def appear(data)\n//       current_user.appear on: data['appearing_on']\n//     end\n//\n//     def away\n//       current_user.away\n//     end\n//   end\n//\n// The \"AppearanceChannel\" name is automatically mapped between the client-side subscription creation and the server-side Ruby class name.\n// The AppearanceChannel#appear/away public methods are exposed automatically to client-side invocation through the perform method.\n\nconst extend = function(object, properties) {\n  if (properties != null) {\n    for (let key in properties) {\n      const value = properties[key]\n      object[key] = value\n    }\n  }\n  return object\n}\n\nexport default class Subscription {\n  constructor(consumer, params = {}, mixin) {\n    this.consumer = consumer\n    this.identifier = JSON.stringify(params)\n    extend(this, mixin)\n  }\n\n  // Perform a channel action with the optional data passed as an attribute\n  perform(action, data = {}) {\n    data.action = action\n    return this.send(data)\n  }\n\n  send(data) {\n    return this.consumer.send({command: \"message\", identifier: this.identifier, data: JSON.stringify(data)})\n  }\n\n  unsubscribe() {\n    return this.consumer.subscriptions.remove(this)\n  }\n}\n", "import logger from \"./logger\"\n\n// Responsible for ensuring channel subscribe command is confirmed, retrying until confirmation is received.\n// Internal class, not intended for direct user manipulation.\n\nclass SubscriptionGuarantor {\n  constructor(subscriptions) {\n    this.subscriptions = subscriptions\n    this.pendingSubscriptions = []\n  }\n\n  guarantee(subscription) {\n    if(this.pendingSubscriptions.indexOf(subscription) == -1){ \n      logger.log(`SubscriptionGuarantor guaranteeing ${subscription.identifier}`)\n      this.pendingSubscriptions.push(subscription) \n    }\n    else {\n      logger.log(`SubscriptionGuarantor already guaranteeing ${subscription.identifier}`)\n    }\n    this.startGuaranteeing()\n  }\n\n  forget(subscription) {\n    logger.log(`SubscriptionGuarantor forgetting ${subscription.identifier}`)\n    this.pendingSubscriptions = (this.pendingSubscriptions.filter((s) => s !== subscription))\n  }\n\n  startGuaranteeing() {\n    this.stopGuaranteeing()\n    this.retrySubscribing()\n  }\n  \n  stopGuaranteeing() {\n    clearTimeout(this.retryTimeout)\n  }\n\n  retrySubscribing() {\n    this.retryTimeout = setTimeout(() => {\n      if (this.subscriptions && typeof(this.subscriptions.subscribe) === \"function\") {\n        this.pendingSubscriptions.map((subscription) => {\n          logger.log(`SubscriptionGuarantor resubscribing ${subscription.identifier}`)\n          this.subscriptions.subscribe(subscription)\n        })\n      }\n    }\n    , 500)\n  }\n}\n\nexport default SubscriptionGuarantor", "import Subscription from \"./subscription\"\nimport SubscriptionGuarantor from \"./subscription_guarantor\"\nimport logger from \"./logger\"\n\n// Collection class for creating (and internally managing) channel subscriptions.\n// The only method intended to be triggered by the user is ActionCable.Subscriptions#create,\n// and it should be called through the consumer like so:\n//\n//   App = {}\n//   App.cable = ActionCable.createConsumer(\"ws://example.com/accounts/1\")\n//   App.appearance = App.cable.subscriptions.create(\"AppearanceChannel\")\n//\n// For more details on how you'd configure an actual channel subscription, see ActionCable.Subscription.\n\nexport default class Subscriptions {\n  constructor(consumer) {\n    this.consumer = consumer\n    this.guarantor = new SubscriptionGuarantor(this)\n    this.subscriptions = []\n  }\n\n  create(channelName, mixin) {\n    const channel = channelName\n    const params = typeof channel === \"object\" ? channel : {channel}\n    const subscription = new Subscription(this.consumer, params, mixin)\n    return this.add(subscription)\n  }\n\n  // Private\n\n  add(subscription) {\n    this.subscriptions.push(subscription)\n    this.consumer.ensureActiveConnection()\n    this.notify(subscription, \"initialized\")\n    this.subscribe(subscription)\n    return subscription\n  }\n\n  remove(subscription) {\n    this.forget(subscription)\n    if (!this.findAll(subscription.identifier).length) {\n      this.sendCommand(subscription, \"unsubscribe\")\n    }\n    return subscription\n  }\n\n  reject(identifier) {\n    return this.findAll(identifier).map((subscription) => {\n      this.forget(subscription)\n      this.notify(subscription, \"rejected\")\n      return subscription\n    })\n  }\n\n  forget(subscription) {\n    this.guarantor.forget(subscription)\n    this.subscriptions = (this.subscriptions.filter((s) => s !== subscription))\n    return subscription\n  }\n\n  findAll(identifier) {\n    return this.subscriptions.filter((s) => s.identifier === identifier)\n  }\n\n  reload() {\n    return this.subscriptions.map((subscription) =>\n      this.subscribe(subscription))\n  }\n\n  notifyAll(callbackName, ...args) {\n    return this.subscriptions.map((subscription) =>\n      this.notify(subscription, callbackName, ...args))\n  }\n\n  notify(subscription, callbackName, ...args) {\n    let subscriptions\n    if (typeof subscription === \"string\") {\n      subscriptions = this.findAll(subscription)\n    } else {\n      subscriptions = [subscription]\n    }\n\n    return subscriptions.map((subscription) =>\n      (typeof subscription[callbackName] === \"function\" ? subscription[callbackName](...args) : undefined))\n  }\n\n  subscribe(subscription) {\n    if (this.sendCommand(subscription, \"subscribe\")) {\n      this.guarantor.guarantee(subscription)\n    }\n  }\n\n  confirmSubscription(identifier) {\n    logger.log(`Subscription confirmed ${identifier}`)\n    this.findAll(identifier).map((subscription) =>\n      this.guarantor.forget(subscription))\n  }\n\n  sendCommand(subscription, command) {\n    const {identifier} = subscription\n    return this.consumer.send({command, identifier})\n  }\n}\n", "import Connection from \"./connection\"\nimport Subscriptions from \"./subscriptions\"\n\n// The ActionCable.Consumer establishes the connection to a server-side Ruby Connection object. Once established,\n// the ActionCable.ConnectionMonitor will ensure that its properly maintained through heartbeats and checking for stale updates.\n// The Consumer instance is also the gateway to establishing subscriptions to desired channels through the #createSubscription\n// method.\n//\n// The following example shows how this can be set up:\n//\n//   App = {}\n//   App.cable = ActionCable.createConsumer(\"ws://example.com/accounts/1\")\n//   App.appearance = App.cable.subscriptions.create(\"AppearanceChannel\")\n//\n// For more details on how you'd configure an actual channel subscription, see ActionCable.Subscription.\n//\n// When a consumer is created, it automatically connects with the server.\n//\n// To disconnect from the server, call\n//\n//   App.cable.disconnect()\n//\n// and to restart the connection:\n//\n//   App.cable.connect()\n//\n// Any channel subscriptions which existed prior to disconnecting will\n// automatically resubscribe.\n\nexport default class Consumer {\n  constructor(url) {\n    this._url = url\n    this.subscriptions = new Subscriptions(this)\n    this.connection = new Connection(this)\n  }\n\n  get url() {\n    return createWebSocketURL(this._url)\n  }\n\n  send(data) {\n    return this.connection.send(data)\n  }\n\n  connect() {\n    return this.connection.open()\n  }\n\n  disconnect() {\n    return this.connection.close({allowReconnect: false})\n  }\n\n  ensureActiveConnection() {\n    if (!this.connection.isActive()) {\n      return this.connection.open()\n    }\n  }\n}\n\nexport function createWebSocketURL(url) {\n  if (typeof url === \"function\") {\n    url = url()\n  }\n\n  if (url && !/^wss?:/i.test(url)) {\n    const a = document.createElement(\"a\")\n    a.href = url\n    // Fix populating Location properties in IE. Otherwise, protocol will be blank.\n    a.href = a.href\n    a.protocol = a.protocol.replace(\"http\", \"ws\")\n    return a.href\n  } else {\n    return url\n  }\n}\n", "import Connection from \"./connection\"\nimport ConnectionMonitor from \"./connection_monitor\"\nimport Consumer, { createWebSocketURL } from \"./consumer\"\nimport INTERNAL from \"./internal\"\nimport Subscription from \"./subscription\"\nimport Subscriptions from \"./subscriptions\"\nimport SubscriptionGuarantor from \"./subscription_guarantor\"\nimport adapters from \"./adapters\"\nimport logger from \"./logger\"\n\nexport {\n  Connection,\n  ConnectionMonitor,\n  Consumer,\n  INTERNAL,\n  Subscription,\n  Subscriptions,\n  SubscriptionGuarantor,\n  adapters,\n  createWebSocketURL,\n  logger,\n}\n\nexport function createConsumer(url = getConfig(\"url\") || INTERNAL.default_mount_path) {\n  return new Consumer(url)\n}\n\nexport function getConfig(name) {\n  const element = document.head.querySelector(`meta[name='action-cable-${name}']`)\n  if (element) {\n    return element.getAttribute(\"content\")\n  }\n}\n", "/**\n * TinyMCE version 8.10.0 (2026-10-14)\n */\n\n(function () {\n    'use strict';\n\n    var typeOf$1 = function (x) {\n        if (x === null) {\n            return 'null';\n        }\n        if (x === undefined) {\n            return 'undefined';\n        }\n        var t = typeof x;\n        if (t === 'object' && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'Array')) {\n            return 'array';\n        }\n        if (t === 'object' && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'String')) {\n            return 'string';\n        }\n        return t;\n    };\n    var isEquatableType = function (x) {\n        return ['undefined', 'boolean', 'number', 'string', 'function', 'xml', 'null'].indexOf(x) !== -1;\n    };\n\n    var sort$1 = function (xs, compareFn) {\n        var clone = Array.prototype.slice.call(xs);\n        return clone.sort(compareFn);\n    };\n\n    var contramap = function (eqa, f) {\n        return eq$2(function (x, y) { return eqa.eq(f(x), f(y)); });\n    };\n    var eq$2 = function (f) {\n        return ({ eq: f });\n    };\n    var tripleEq = eq$2(function (x, y) { return x === y; });\n    var eqString = tripleEq;\n    var eqArray = function (eqa) { return eq$2(function (x, y) {\n        if (x.length !== y.length) {\n            return false;\n        }\n        var len = x.length;\n        for (var i = 0; i < len; i++) {\n            if (!eqa.eq(x[i], y[i])) {\n                return false;\n            }\n        }\n        return true;\n    }); };\n    // TODO: Make an Ord typeclass\n    var eqSortedArray = function (eqa, compareFn) {\n        return contramap(eqArray(eqa), function (xs) { return sort$1(xs, compareFn); });\n    };\n    var eqRecord = function (eqa) { return eq$2(function (x, y) {\n        var kx = Object.keys(x);\n        var ky = Object.keys(y);\n        if (!eqSortedArray(eqString).eq(kx, ky)) {\n            return false;\n        }\n        var len = kx.length;\n        for (var i = 0; i < len; i++) {\n            var q = kx[i];\n            if (!eqa.eq(x[q], y[q])) {\n                return false;\n            }\n        }\n        return true;\n    }); };\n    var eqAny = eq$2(function (x, y) {\n        if (x === y) {\n            return true;\n        }\n        var tx = typeOf$1(x);\n        var ty = typeOf$1(y);\n        if (tx !== ty) {\n            return false;\n        }\n        if (isEquatableType(tx)) {\n            return x === y;\n        }\n        else if (tx === 'array') {\n            return eqArray(eqAny).eq(x, y);\n        }\n        else if (tx === 'object') {\n            return eqRecord(eqAny).eq(x, y);\n        }\n        return false;\n    });\n\n    /* eslint-disable @typescript-eslint/no-wrapper-object-types */\n    const getPrototypeOf$2 = Object.getPrototypeOf;\n    const hasProto = (v, constructor, predicate) => {\n        if (predicate(v, constructor.prototype)) {\n            return true;\n        }\n        else {\n            // String-based fallback time\n            return v.constructor?.name === constructor.name;\n        }\n    };\n    const typeOf = (x) => {\n        const t = typeof x;\n        if (x === null) {\n            return 'null';\n        }\n        else if (t === 'object' && Array.isArray(x)) {\n            return 'array';\n        }\n        else if (t === 'object' && hasProto(x, String, (o, proto) => proto.isPrototypeOf(o))) {\n            return 'string';\n        }\n        else {\n            return t;\n        }\n    };\n    const isType$1 = (type) => (value) => typeOf(value) === type;\n    const isSimpleType = (type) => (value) => typeof value === type;\n    const eq$1 = (t) => (a) => t === a;\n    const is$5 = (value, constructor) => isObject(value) && hasProto(value, constructor, (o, proto) => getPrototypeOf$2(o) === proto);\n    const isString = isType$1('string');\n    const isObject = isType$1('object');\n    const isPlainObject = (value) => is$5(value, Object);\n    const isArray$1 = isType$1('array');\n    const isNull = eq$1(null);\n    const isBoolean = isSimpleType('boolean');\n    const isUndefined = eq$1(undefined);\n    const isNullable = (a) => a === null || a === undefined;\n    const isNonNullable = (a) => !isNullable(a);\n    const isFunction = isSimpleType('function');\n    const isNumber = isSimpleType('number');\n    const isArrayOf = (value, pred) => {\n        if (isArray$1(value)) {\n            for (let i = 0, len = value.length; i < len; ++i) {\n                if (!(pred(value[i]))) {\n                    return false;\n                }\n            }\n            return true;\n        }\n        return false;\n    };\n\n    const noop = () => { };\n    /** Compose a unary function with an n-ary function */\n    const compose = (fa, fb) => {\n        return (...args) => {\n            return fa(fb.apply(null, args));\n        };\n    };\n    /** Compose two unary functions. Similar to compose, but avoids using Function.prototype.apply. */\n    const compose1 = (fbc, fab) => (a) => fbc(fab(a));\n    const constant = (value) => {\n        return () => {\n            return value;\n        };\n    };\n    const identity = (x) => {\n        return x;\n    };\n    const tripleEquals = (a, b) => {\n        return a === b;\n    };\n    function curry(fn, ...initialArgs) {\n        return (...restArgs) => {\n            const all = initialArgs.concat(restArgs);\n            return fn.apply(null, all);\n        };\n    }\n    const not = (f) => (t) => !f(t);\n    const die = (msg) => {\n        return () => {\n            throw new Error(msg);\n        };\n    };\n    const apply$1 = (f) => {\n        return f();\n    };\n    const call = (f) => {\n        f();\n    };\n    const never = constant(false);\n    const always = constant(true);\n\n    /**\n     * The `Optional` type represents a value (of any type) that potentially does\n     * not exist. Any `Optional<T>` can either be a `Some<T>` (in which case the\n     * value does exist) or a `None` (in which case the value does not exist). This\n     * module defines a whole lot of FP-inspired utility functions for dealing with\n     * `Optional` objects.\n     *\n     * Comparison with null or undefined:\n     * - We don't get fancy null coalescing operators with `Optional`\n     * - We do get fancy helper functions with `Optional`\n     * - `Optional` support nesting, and allow for the type to still be nullable (or\n     * another `Optional`)\n     * - There is no option to turn off strict-optional-checks like there is for\n     * strict-null-checks\n     */\n    class Optional {\n        tag;\n        value;\n        // Sneaky optimisation: every instance of Optional.none is identical, so just\n        // reuse the same object\n        static singletonNone = new Optional(false);\n        // The internal representation has a `tag` and a `value`, but both are\n        // private: able to be console.logged, but not able to be accessed by code\n        constructor(tag, value) {\n            this.tag = tag;\n            this.value = value;\n        }\n        // --- Identities ---\n        /**\n         * Creates a new `Optional<T>` that **does** contain a value.\n         */\n        static some(value) {\n            return new Optional(true, value);\n        }\n        /**\n         * Create a new `Optional<T>` that **does not** contain a value. `T` can be\n         * any type because we don't actually have a `T`.\n         */\n        static none() {\n            return Optional.singletonNone;\n        }\n        /**\n         * Perform a transform on an `Optional` type. Regardless of whether this\n         * `Optional` contains a value or not, `fold` will return a value of type `U`.\n         * If this `Optional` does not contain a value, the `U` will be created by\n         * calling `onNone`. If this `Optional` does contain a value, the `U` will be\n         * created by calling `onSome`.\n         *\n         * For the FP enthusiasts in the room, this function:\n         * 1. Could be used to implement all of the functions below\n         * 2. Forms a catamorphism\n         */\n        fold(onNone, onSome) {\n            if (this.tag) {\n                return onSome(this.value);\n            }\n            else {\n                return onNone();\n            }\n        }\n        /**\n         * Determine if this `Optional` object contains a value.\n         */\n        isSome() {\n            return this.tag;\n        }\n        /**\n         * Determine if this `Optional` object **does not** contain a value.\n         */\n        isNone() {\n            return !this.tag;\n        }\n        // --- Functor (name stolen from Haskell / maths) ---\n        /**\n         * Perform a transform on an `Optional` object, **if** there is a value. If\n         * you provide a function to turn a T into a U, this is the function you use\n         * to turn an `Optional<T>` into an `Optional<U>`. If this **does** contain\n         * a value then the output will also contain a value (that value being the\n         * output of `mapper(this.value)`), and if this **does not** contain a value\n         * then neither will the output.\n         */\n        map(mapper) {\n            if (this.tag) {\n                return Optional.some(mapper(this.value));\n            }\n            else {\n                return Optional.none();\n            }\n        }\n        // --- Monad (name stolen from Haskell / maths) ---\n        /**\n         * Perform a transform on an `Optional` object, **if** there is a value.\n         * Unlike `map`, here the transform itself also returns an `Optional`.\n         */\n        bind(binder) {\n            if (this.tag) {\n                return binder(this.value);\n            }\n            else {\n                return Optional.none();\n            }\n        }\n        // --- Traversable (name stolen from Haskell / maths) ---\n        /**\n         * For a given predicate, this function finds out if there **exists** a value\n         * inside this `Optional` object that meets the predicate. In practice, this\n         * means that for `Optional`s that do not contain a value it returns false (as\n         * no predicate-meeting value exists).\n         */\n        exists(predicate) {\n            return this.tag && predicate(this.value);\n        }\n        /**\n         * For a given predicate, this function finds out if **all** the values inside\n         * this `Optional` object meet the predicate. In practice, this means that\n         * for `Optional`s that do not contain a value it returns true (as all 0\n         * objects do meet the predicate).\n         */\n        forall(predicate) {\n            return !this.tag || predicate(this.value);\n        }\n        filter(predicate) {\n            if (!this.tag || predicate(this.value)) {\n                return this;\n            }\n            else {\n                return Optional.none();\n            }\n        }\n        // --- Getters ---\n        /**\n         * Get the value out of the inside of the `Optional` object, using a default\n         * `replacement` value if the provided `Optional` object does not contain a\n         * value.\n         */\n        getOr(replacement) {\n            return this.tag ? this.value : replacement;\n        }\n        /**\n         * Get the value out of the inside of the `Optional` object, using a default\n         * `replacement` value if the provided `Optional` object does not contain a\n         * value.  Unlike `getOr`, in this method the `replacement` object is also\n         * `Optional` - meaning that this method will always return an `Optional`.\n         */\n        or(replacement) {\n            return this.tag ? this : replacement;\n        }\n        /**\n         * Get the value out of the inside of the `Optional` object, using a default\n         * `replacement` value if the provided `Optional` object does not contain a\n         * value. Unlike `getOr`, in this method the `replacement` value is\n         * \"thunked\" - that is to say that you don't pass a value to `getOrThunk`, you\n         * pass a function which (if called) will **return** the `value` you want to\n         * use.\n         */\n        getOrThunk(thunk) {\n            return this.tag ? this.value : thunk();\n        }\n        /**\n         * Get the value out of the inside of the `Optional` object, using a default\n         * `replacement` value if the provided Optional object does not contain a\n         * value.\n         *\n         * Unlike `or`, in this method the `replacement` value is \"thunked\" - that is\n         * to say that you don't pass a value to `orThunk`, you pass a function which\n         * (if called) will **return** the `value` you want to use.\n         *\n         * Unlike `getOrThunk`, in this method the `replacement` value is also\n         * `Optional`, meaning that this method will always return an `Optional`.\n         */\n        orThunk(thunk) {\n            return this.tag ? this : thunk();\n        }\n        /**\n         * Get the value out of the inside of the `Optional` object, throwing an\n         * exception if the provided `Optional` object does not contain a value.\n         *\n         * WARNING:\n         * You should only be using this function if you know that the `Optional`\n         * object **is not** empty (otherwise you're throwing exceptions in production\n         * code, which is bad).\n         *\n         * In tests this is more acceptable.\n         *\n         * Prefer other methods to this, such as `.each`.\n         */\n        getOrDie(message) {\n            if (!this.tag) {\n                throw new Error(message ?? 'Called getOrDie on None');\n            }\n            else {\n                return this.value;\n            }\n        }\n        // --- Interop with null and undefined ---\n        /**\n         * Creates an `Optional` value from a nullable (or undefined-able) input.\n         * Null, or undefined, is converted to `None`, and anything else is converted\n         * to `Some`.\n         */\n        static from(value) {\n            return isNonNullable(value) ? Optional.some(value) : Optional.none();\n        }\n        /**\n         * Converts an `Optional` to a nullable type, by getting the value if it\n         * exists, or returning `null` if it does not.\n         */\n        getOrNull() {\n            return this.tag ? this.value : null;\n        }\n        /**\n         * Converts an `Optional` to an undefined-able type, by getting the value if\n         * it exists, or returning `undefined` if it does not.\n         */\n        getOrUndefined() {\n            return this.value;\n        }\n        // --- Utilities ---\n        /**\n         * If the `Optional` contains a value, perform an action on that value.\n         * Unlike the rest of the methods on this type, `.each` has side-effects. If\n         * you want to transform an `Optional<T>` **into** something, then this is not\n         * the method for you. If you want to use an `Optional<T>` to **do**\n         * something, then this is the method for you - provided you're okay with not\n         * doing anything in the case where the `Optional` doesn't have a value inside\n         * it. If you're not sure whether your use-case fits into transforming\n         * **into** something or **doing** something, check whether it has a return\n         * value. If it does, you should be performing a transform.\n         */\n        each(worker) {\n            if (this.tag) {\n                worker(this.value);\n            }\n        }\n        /**\n         * Turn the `Optional` object into an array that contains all of the values\n         * stored inside the `Optional`. In practice, this means the output will have\n         * either 0 or 1 elements.\n         */\n        toArray() {\n            return this.tag ? [this.value] : [];\n        }\n        /**\n         * Turn the `Optional` object into a string for debugging or printing. Not\n         * recommended for production code, but good for debugging. Also note that\n         * these days an `Optional` object can be logged to the console directly, and\n         * its inner value (if it exists) will be visible.\n         */\n        toString() {\n            return this.tag ? `some(${this.value})` : 'none()';\n        }\n    }\n\n    const nativeSlice = Array.prototype.slice;\n    const nativeIndexOf = Array.prototype.indexOf;\n    const nativePush = Array.prototype.push;\n    const rawIndexOf = (ts, t) => nativeIndexOf.call(ts, t);\n    const indexOf$1 = (xs, x) => {\n        // The rawIndexOf method does not wrap up in an option. This is for performance reasons.\n        const r = rawIndexOf(xs, x);\n        return r === -1 ? Optional.none() : Optional.some(r);\n    };\n    const contains$2 = (xs, x) => rawIndexOf(xs, x) > -1;\n    const exists = (xs, pred) => {\n        for (let i = 0, len = xs.length; i < len; i++) {\n            const x = xs[i];\n            if (pred(x, i)) {\n                return true;\n            }\n        }\n        return false;\n    };\n    const map$3 = (xs, f) => {\n        // pre-allocating array size when it's guaranteed to be known\n        // http://jsperf.com/push-allocated-vs-dynamic/22\n        const len = xs.length;\n        const r = new Array(len);\n        for (let i = 0; i < len; i++) {\n            const x = xs[i];\n            r[i] = f(x, i);\n        }\n        return r;\n    };\n    // Unwound implementing other functions in terms of each.\n    // The code size is roughly the same, and it should allow for better optimisation.\n    // const each = function<T, U>(xs: T[], f: (x: T, i?: number, xs?: T[]) => void): void {\n    const each$e = (xs, f) => {\n        for (let i = 0, len = xs.length; i < len; i++) {\n            const x = xs[i];\n            f(x, i);\n        }\n    };\n    const eachr = (xs, f) => {\n        for (let i = xs.length - 1; i >= 0; i--) {\n            const x = xs[i];\n            f(x, i);\n        }\n    };\n    const partition$2 = (xs, pred) => {\n        const pass = [];\n        const fail = [];\n        for (let i = 0, len = xs.length; i < len; i++) {\n            const x = xs[i];\n            const arr = pred(x, i) ? pass : fail;\n            arr.push(x);\n        }\n        return { pass, fail };\n    };\n    const filter$5 = (xs, pred) => {\n        const r = [];\n        for (let i = 0, len = xs.length; i < len; i++) {\n            const x = xs[i];\n            if (pred(x, i)) {\n                r.push(x);\n            }\n        }\n        return r;\n    };\n    /*\n     * Groups an array into contiguous arrays of like elements. Whether an element is like or not depends on f.\n     *\n     * f is a function that derives a value from an element - e.g. true or false, or a string.\n     * Elements are like if this function generates the same value for them (according to ===).\n     *\n     *\n     * Order of the elements is preserved. Arr.flatten() on the result will return the original list, as with Haskell groupBy function.\n     *  For a good explanation, see the group function (which is a special case of groupBy)\n     *  http://hackage.haskell.org/package/base-4.7.0.0/docs/Data-List.html#v:group\n     */\n    const groupBy = (xs, f) => {\n        if (xs.length === 0) {\n            return [];\n        }\n        else {\n            let wasType = f(xs[0]); // initial case for matching\n            const r = [];\n            let group = [];\n            for (let i = 0, len = xs.length; i < len; i++) {\n                const x = xs[i];\n                const type = f(x);\n                if (type !== wasType) {\n                    r.push(group);\n                    group = [];\n                }\n                wasType = type;\n                group.push(x);\n            }\n            if (group.length !== 0) {\n                r.push(group);\n            }\n            return r;\n        }\n    };\n    const foldr = (xs, f, acc) => {\n        eachr(xs, (x, i) => {\n            acc = f(acc, x, i);\n        });\n        return acc;\n    };\n    const foldl = (xs, f, acc) => {\n        each$e(xs, (x, i) => {\n            acc = f(acc, x, i);\n        });\n        return acc;\n    };\n    const findUntil$1 = (xs, pred, until) => {\n        for (let i = 0, len = xs.length; i < len; i++) {\n            const x = xs[i];\n            if (pred(x, i)) {\n                return Optional.some(x);\n            }\n            else if (until(x, i)) {\n                break;\n            }\n        }\n        return Optional.none();\n    };\n    const find$2 = (xs, pred) => {\n        return findUntil$1(xs, pred, never);\n    };\n    const findIndex$2 = (xs, pred) => {\n        for (let i = 0, len = xs.length; i < len; i++) {\n            const x = xs[i];\n            if (pred(x, i)) {\n                return Optional.some(i);\n            }\n        }\n        return Optional.none();\n    };\n    const findLastByPredicate = (arr, pred) => {\n        for (let i = arr.length - 1; i >= 0; i--) {\n            if (pred(arr[i], i)) {\n                return Optional.some({ v: arr[i], i });\n            }\n        }\n        return Optional.none();\n    };\n    const findLast = (arr, pred) => findLastByPredicate(arr, pred).map((r) => r.v);\n    const findLastIndex = (arr, pred) => findLastByPredicate(arr, pred).map((r) => r.i);\n    const flatten$1 = (xs) => {\n        // Note, this is possible because push supports multiple arguments:\n        // http://jsperf.com/concat-push/6\n        // Note that in the past, concat() would silently work (very slowly) for array-like objects.\n        // With this change it will throw an error.\n        const r = [];\n        for (let i = 0, len = xs.length; i < len; ++i) {\n            // Ensure that each value is an array itself\n            if (!isArray$1(xs[i])) {\n                throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs);\n            }\n            nativePush.apply(r, xs[i]);\n        }\n        return r;\n    };\n    const bind$3 = (xs, f) => flatten$1(map$3(xs, f));\n    const forall = (xs, pred) => {\n        for (let i = 0, len = xs.length; i < len; ++i) {\n            const x = xs[i];\n            if (pred(x, i) !== true) {\n                return false;\n            }\n        }\n        return true;\n    };\n    const reverse = (xs) => {\n        const r = nativeSlice.call(xs, 0);\n        r.reverse();\n        return r;\n    };\n    const difference = (a1, a2) => filter$5(a1, (x) => !contains$2(a2, x));\n    const mapToObject = (xs, f) => {\n        const r = {};\n        for (let i = 0, len = xs.length; i < len; i++) {\n            const x = xs[i];\n            r[String(x)] = f(x, i);\n        }\n        return r;\n    };\n    const sort = (xs, comparator) => {\n        const copy = nativeSlice.call(xs, 0);\n        copy.sort(comparator);\n        return copy;\n    };\n    const get$c = (xs, i) => i >= 0 && i < xs.length ? Optional.some(xs[i]) : Optional.none();\n    const head = (xs) => get$c(xs, 0);\n    const last$2 = (xs) => get$c(xs, xs.length - 1);\n    const from = isFunction(Array.from) ? Array.from : (x) => nativeSlice.call(x);\n    const findMap = (arr, f) => {\n        for (let i = 0; i < arr.length; i++) {\n            const r = f(arr[i], i);\n            if (r.isSome()) {\n                return r;\n            }\n        }\n        return Optional.none();\n    };\n    const unique$1 = (xs, comparator) => {\n        const r = [];\n        const isDuplicated = isFunction(comparator) ?\n            (x) => exists(r, (i) => comparator(i, x)) :\n            (x) => contains$2(r, x);\n        for (let i = 0, len = xs.length; i < len; i++) {\n            const x = xs[i];\n            if (!isDuplicated(x)) {\n                r.push(x);\n            }\n        }\n        return r;\n    };\n\n    // There are many variations of Object iteration that are faster than the 'for-in' style:\n    // http://jsperf.com/object-keys-iteration/107\n    //\n    // Use the native keys if it is available (IE9+), otherwise fall back to manually filtering\n    const keys = Object.keys;\n    const hasOwnProperty$1 = Object.hasOwnProperty;\n    const each$d = (obj, f) => {\n        const props = keys(obj);\n        for (let k = 0, len = props.length; k < len; k++) {\n            const i = props[k];\n            const x = obj[i];\n            f(x, i);\n        }\n    };\n    const map$2 = (obj, f) => {\n        return tupleMap(obj, (x, i) => ({\n            k: i,\n            v: f(x, i)\n        }));\n    };\n    const tupleMap = (obj, f) => {\n        const r = {};\n        each$d(obj, (x, i) => {\n            const tuple = f(x, i);\n            r[tuple.k] = tuple.v;\n        });\n        return r;\n    };\n    const objAcc = (r) => (x, i) => {\n        r[i] = x;\n    };\n    const internalFilter = (obj, pred, onTrue, onFalse) => {\n        each$d(obj, (x, i) => {\n            (pred(x, i) ? onTrue : onFalse)(x, i);\n        });\n    };\n    const bifilter = (obj, pred) => {\n        const t = {};\n        const f = {};\n        internalFilter(obj, pred, objAcc(t), objAcc(f));\n        return { t, f };\n    };\n    const filter$4 = (obj, pred) => {\n        const t = {};\n        internalFilter(obj, pred, objAcc(t), noop);\n        return t;\n    };\n    const mapToArray = (obj, f) => {\n        const r = [];\n        each$d(obj, (value, name) => {\n            r.push(f(value, name));\n        });\n        return r;\n    };\n    const values = (obj) => {\n        return mapToArray(obj, identity);\n    };\n    const get$b = (obj, key) => {\n        return has$2(obj, key) ? Optional.from(obj[key]) : Optional.none();\n    };\n    const has$2 = (obj, key) => hasOwnProperty$1.call(obj, key);\n    const hasNonNullableKey = (obj, key) => has$2(obj, key) && obj[key] !== undefined && obj[key] !== null;\n    const equal$1 = (a1, a2, eq = eqAny) => eqRecord(eq).eq(a1, a2);\n\n    /*\n     * Generates a church encoded ADT (https://en.wikipedia.org/wiki/Church_encoding)\n     * For syntax and use, look at the test code.\n     */\n    const generate$1 = (cases) => {\n        // validation\n        if (!isArray$1(cases)) {\n            throw new Error('cases must be an array');\n        }\n        if (cases.length === 0) {\n            throw new Error('there must be at least one case');\n        }\n        const constructors = [];\n        // adt is mutated to add the individual cases\n        const adt = {};\n        each$e(cases, (acase, count) => {\n            const keys$1 = keys(acase);\n            // validation\n            if (keys$1.length !== 1) {\n                throw new Error('one and only one name per case');\n            }\n            const key = keys$1[0];\n            const value = acase[key];\n            // validation\n            if (adt[key] !== undefined) {\n                throw new Error('duplicate key detected:' + key);\n            }\n            else if (key === 'cata') {\n                throw new Error('cannot have a case named cata (sorry)');\n            }\n            else if (!isArray$1(value)) {\n                // this implicitly checks if acase is an object\n                throw new Error('case arguments must be an array');\n            }\n            constructors.push(key);\n            //\n            // constructor for key\n            //\n            adt[key] = (...args) => {\n                const argLength = args.length;\n                // validation\n                if (argLength !== value.length) {\n                    throw new Error('Wrong number of arguments to case ' + key + '. Expected ' + value.length + ' (' + value + '), got ' + argLength);\n                }\n                const match = (branches) => {\n                    const branchKeys = keys(branches);\n                    if (constructors.length !== branchKeys.length) {\n                        throw new Error('Wrong number of arguments to match. Expected: ' + constructors.join(',') + '\\nActual: ' + branchKeys.join(','));\n                    }\n                    const allReqd = forall(constructors, (reqKey) => {\n                        return contains$2(branchKeys, reqKey);\n                    });\n                    if (!allReqd) {\n                        throw new Error('Not all branches were specified when using match. Specified: ' + branchKeys.join(', ') + '\\nRequired: ' + constructors.join(', '));\n                    }\n                    return branches[key].apply(null, args);\n                };\n                //\n                // the fold function for key\n                //\n                return {\n                    fold: (...foldArgs) => {\n                        // runtime validation\n                        if (foldArgs.length !== cases.length) {\n                            throw new Error('Wrong number of arguments to fold. Expected ' + cases.length + ', got ' + foldArgs.length);\n                        }\n                        const target = foldArgs[count];\n                        return target.apply(null, args);\n                    },\n                    match,\n                    // NOTE: Only for debugging.\n                    log: (label) => {\n                        // eslint-disable-next-line no-console\n                        console.log(label, {\n                            constructors,\n                            constructor: key,\n                            params: args\n                        });\n                    }\n                };\n            };\n        });\n        return adt;\n    };\n    const Adt = {\n        generate: generate$1\n    };\n\n    const Cell = (initial) => {\n        let value = initial;\n        const get = () => {\n            return value;\n        };\n        const set = (v) => {\n            value = v;\n        };\n        return {\n            get,\n            set\n        };\n    };\n\n    /**\n     * Creates a new `Result<T, E>` that **does** contain a value.\n     */\n    const value$2 = (value) => {\n        const applyHelper = (fn) => fn(value);\n        const constHelper = constant(value);\n        const outputHelper = () => output;\n        const output = {\n            // Debug info\n            tag: true,\n            inner: value,\n            // Actual Result methods\n            fold: (_onError, onValue) => onValue(value),\n            isValue: always,\n            isError: never,\n            map: (mapper) => Result.value(mapper(value)),\n            mapError: outputHelper,\n            bind: applyHelper,\n            exists: applyHelper,\n            forall: applyHelper,\n            getOr: constHelper,\n            or: outputHelper,\n            getOrThunk: constHelper,\n            orThunk: outputHelper,\n            getOrDie: constHelper,\n            each: (fn) => {\n                // Can't write the function inline because we don't want to return something by mistake\n                fn(value);\n            },\n            toOptional: () => Optional.some(value),\n        };\n        return output;\n    };\n    /**\n     * Creates a new `Result<T, E>` that **does not** contain a value, and therefore\n     * contains an error.\n     */\n    const error = (error) => {\n        const outputHelper = () => output;\n        const output = {\n            // Debug info\n            tag: false,\n            inner: error,\n            // Actual Result methods\n            fold: (onError, _onValue) => onError(error),\n            isValue: never,\n            isError: always,\n            map: outputHelper,\n            mapError: (mapper) => Result.error(mapper(error)),\n            bind: outputHelper,\n            exists: never,\n            forall: always,\n            getOr: identity,\n            or: identity,\n            getOrThunk: apply$1,\n            orThunk: apply$1,\n            getOrDie: die(String(error)),\n            each: noop,\n            toOptional: Optional.none,\n        };\n        return output;\n    };\n    /**\n     * Creates a new `Result<T, E>` from an `Optional<T>` and an `E`. If the\n     * `Optional` contains a value, so will the outputted `Result`. If it does not,\n     * the outputted `Result` will contain an error (and that error will be the\n     * error passed in).\n     */\n    const fromOption = (optional, err) => optional.fold(() => error(err), value$2);\n    const Result = {\n        value: value$2,\n        error,\n        fromOption\n    };\n\n    // Use window object as the global if it's available since CSP will block script evals\n    // eslint-disable-next-line @typescript-eslint/no-implied-eval\n    const Global = typeof window !== 'undefined' ? window : Function('return this;')();\n\n    /* eslint-disable no-bitwise */\n    const uuidV4Bytes = () => {\n        const bytes = window.crypto.getRandomValues(new Uint8Array(16));\n        // https://tools.ietf.org/html/rfc4122#section-4.1.3\n        // This will first bit mask away the most significant 4 bits (version octet)\n        // then mask in the v4 number we only care about v4 random version at this point so (byte & 0b00001111 | 0b01000000)\n        bytes[6] = bytes[6] & 15 | 64;\n        // https://tools.ietf.org/html/rfc4122#section-4.1.1\n        // This will first bit mask away the highest two bits then masks in the highest bit so (byte & 0b00111111 | 0b10000000)\n        // So it will set the Msb0=1 & Msb1=0 described by the \"The variant specified in this document.\" row in the table\n        bytes[8] = bytes[8] & 63 | 128;\n        return bytes;\n    };\n    const uuidV4String = () => {\n        const uuid = uuidV4Bytes();\n        const getHexRange = (startIndex, endIndex) => {\n            let buff = '';\n            for (let i = startIndex; i <= endIndex; ++i) {\n                const hexByte = uuid[i].toString(16).padStart(2, '0');\n                buff += hexByte;\n            }\n            return buff;\n        };\n        // RFC 4122 UUID format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\n        return `${getHexRange(0, 3)}-${getHexRange(4, 5)}-${getHexRange(6, 7)}-${getHexRange(8, 9)}-${getHexRange(10, 15)}`;\n    };\n\n    /**\n     * Adds two numbers, and wrap to a range.\n     * If the result overflows to the right, snap to the left.\n     * If the result overflows to the left, snap to the right.\n     */\n    // ASSUMPTION: Max will always be larger than min\n    const clamp$2 = (value, min, max) => Math.min(Math.max(value, min), max);\n    // the division is meant to get a number between 0 and 1 for more information check this discussion: https://stackoverflow.com/questions/58285941/how-to-replace-math-random-with-crypto-getrandomvalues-and-keep-same-result\n    const random = () => window.crypto.getRandomValues(new Uint32Array(1))[0] / 4294967295;\n\n    /**\n     * Generate a unique identifier.\n     *\n     * The unique portion of the identifier only contains an underscore\n     * and digits, so that it may safely be used within HTML attributes.\n     *\n     * The chance of generating a non-unique identifier has been minimized\n     * by combining the current time, a random number and a one-up counter.\n     *\n     * generate :: String -> String\n     */\n    let unique = 0;\n    const generate = (prefix) => {\n        const date = new Date();\n        const time = date.getTime();\n        const random$1 = Math.floor(random() * 1000000000);\n        unique++;\n        return prefix + '_' + random$1 + unique + String(time);\n    };\n    /**\n     * Generate a uuidv4 string\n     * In accordance with RFC 4122 (https://datatracker.ietf.org/doc/html/rfc4122)\n     */\n    const uuidV4 = () => {\n        if (window.isSecureContext) {\n            return window.crypto.randomUUID();\n        }\n        else {\n            return uuidV4String();\n        }\n    };\n\n    const shallow$1 = (old, nu) => {\n        return nu;\n    };\n    const deep$1 = (old, nu) => {\n        const bothObjects = isPlainObject(old) && isPlainObject(nu);\n        return bothObjects ? deepMerge(old, nu) : nu;\n    };\n    const baseMerge = (merger) => {\n        return (...objects) => {\n            if (objects.length === 0) {\n                throw new Error(`Can't merge zero objects`);\n            }\n            const ret = {};\n            for (let j = 0; j < objects.length; j++) {\n                const curObject = objects[j];\n                for (const key in curObject) {\n                    if (has$2(curObject, key)) {\n                        ret[key] = merger(ret[key], curObject[key]);\n                    }\n                }\n            }\n            return ret;\n        };\n    };\n    const deepMerge = baseMerge(deep$1);\n    const merge$1 = baseMerge(shallow$1);\n\n    /**\n     * **Is** the value stored inside this Optional object equal to `rhs`?\n     */\n    const is$4 = (lhs, rhs, comparator = tripleEquals) => lhs.exists((left) => comparator(left, rhs));\n    /**\n     * Are these two Optional objects equal? Equality here means either they're both\n     * `Some` (and the values are equal under the comparator) or they're both `None`.\n     */\n    const equals = (lhs, rhs, comparator = tripleEquals) => lift2(lhs, rhs, comparator).getOr(lhs.isNone() && rhs.isNone());\n    const cat = (arr) => {\n        const r = [];\n        const push = (x) => {\n            r.push(x);\n        };\n        for (let i = 0; i < arr.length; i++) {\n            arr[i].each(push);\n        }\n        return r;\n    };\n    /*\n    Notes on the lift functions:\n    - We used to have a generic liftN, but we were concerned about its type-safety, and the below variants were faster in microbenchmarks.\n    - The getOrDie calls are partial functions, but are checked beforehand. This is faster and more convenient (but less safe) than folds.\n    - && is used instead of a loop for simplicity and performance.\n    */\n    const lift2 = (oa, ob, f) => oa.isSome() && ob.isSome() ? Optional.some(f(oa.getOrDie(), ob.getOrDie())) : Optional.none();\n    const lift3 = (oa, ob, oc, f) => oa.isSome() && ob.isSome() && oc.isSome() ? Optional.some(f(oa.getOrDie(), ob.getOrDie(), oc.getOrDie())) : Optional.none();\n    const flatten = (oot) => oot.bind(identity);\n    // This can help with type inference, by specifying the type param on the none case, so the caller doesn't have to.\n    const someIf = (b, a) => b ? Optional.some(a) : Optional.none();\n\n    /** path :: ([String], JsObj?) -> JsObj */\n    const path = (parts, scope) => {\n        let o = scope !== undefined && scope !== null ? scope : Global;\n        for (let i = 0; i < parts.length && o !== undefined && o !== null; ++i) {\n            o = o[parts[i]];\n        }\n        return o;\n    };\n    /** resolve :: (String, JsObj?) -> JsObj */\n    const resolve$3 = (p, scope) => {\n        const parts = p.split('.');\n        return path(parts, scope);\n    };\n\n    Adt.generate([\n        { bothErrors: ['error1', 'error2'] },\n        { firstError: ['error1', 'value2'] },\n        { secondError: ['value1', 'error2'] },\n        { bothValues: ['value1', 'value2'] }\n    ]);\n    /** partition :: [Result a] -> { errors: [String], values: [a] } */\n    const partition$1 = (results) => {\n        const errors = [];\n        const values = [];\n        each$e(results, (result) => {\n            result.fold((err) => {\n                errors.push(err);\n            }, (value) => {\n                values.push(value);\n            });\n        });\n        return { errors, values };\n    };\n\n    const singleton = (doRevoke) => {\n        const subject = Cell(Optional.none());\n        const revoke = () => subject.get().each(doRevoke);\n        const clear = () => {\n            revoke();\n            subject.set(Optional.none());\n        };\n        const isSet = () => subject.get().isSome();\n        const get = () => subject.get();\n        const set = (s) => {\n            revoke();\n            subject.set(Optional.some(s));\n        };\n        return {\n            clear,\n            isSet,\n            get,\n            set\n        };\n    };\n    const repeatable = (delay) => {\n        const intervalId = Cell(Optional.none());\n        const revoke = () => intervalId.get().each((id) => clearInterval(id));\n        const clear = () => {\n            revoke();\n            intervalId.set(Optional.none());\n        };\n        const isSet = () => intervalId.get().isSome();\n        const get = () => intervalId.get();\n        const set = (functionToRepeat) => {\n            revoke();\n            intervalId.set(Optional.some(setInterval(functionToRepeat, delay)));\n        };\n        return {\n            clear,\n            isSet,\n            get,\n            set,\n        };\n    };\n    const value$1 = () => {\n        const subject = singleton(noop);\n        const on = (f) => subject.get().each(f);\n        return {\n            ...subject,\n            on\n        };\n    };\n\n    const removeFromStart = (str, numChars) => {\n        return str.substring(numChars);\n    };\n\n    const checkRange = (str, substr, start) => substr === '' || str.length >= substr.length && str.substr(start, start + substr.length) === substr;\n    const removeLeading = (str, prefix) => {\n        return startsWith(str, prefix) ? removeFromStart(str, prefix.length) : str;\n    };\n    const contains$1 = (str, substr, start = 0, end) => {\n        const idx = str.indexOf(substr, start);\n        if (idx !== -1) {\n            return isUndefined(end) ? true : idx + substr.length <= end;\n        }\n        else {\n            return false;\n        }\n    };\n    /** Does 'str' start with 'prefix'?\n     *  Note: all strings start with the empty string.\n     *        More formally, for all strings x, startsWith(x, \"\").\n     *        This is so that for all strings x and y, startsWith(y + x, y)\n     */\n    const startsWith = (str, prefix) => {\n        return checkRange(str, prefix, 0);\n    };\n    /** Does 'str' end with 'suffix'?\n     *  Note: all strings end with the empty string.\n     *        More formally, for all strings x, endsWith(x, \"\").\n     *        This is so that for all strings x and y, endsWith(x + y, y)\n     */\n    const endsWith = (str, suffix) => {\n        return checkRange(str, suffix, str.length - suffix.length);\n    };\n    const blank = (r) => (s) => s.replace(r, '');\n    /** removes all leading and trailing spaces */\n    const trim$4 = blank(/^\\s+|\\s+$/g);\n    const lTrim = blank(/^\\s+/g);\n    const rTrim = blank(/\\s+$/g);\n    const isNotEmpty = (s) => s.length > 0;\n    const isEmpty$5 = (s) => !isNotEmpty(s);\n    const repeat = (s, count) => count <= 0 ? '' : new Array(count + 1).join(s);\n    const toInt = (value, radix = 10) => {\n        const num = parseInt(value, radix);\n        return isNaN(num) ? Optional.none() : Optional.some(num);\n    };\n\n    // Run a function fn after rate ms. If another invocation occurs\n    // during the time it is waiting, update the arguments f will run\n    // with (but keep the current schedule)\n    const adaptable = (fn, rate) => {\n        let timer = null;\n        let args = null;\n        const cancel = () => {\n            if (!isNull(timer)) {\n                clearTimeout(timer);\n                timer = null;\n                args = null;\n            }\n        };\n        const throttle = (...newArgs) => {\n            args = newArgs;\n            if (isNull(timer)) {\n                timer = setTimeout(() => {\n                    const tempArgs = args;\n                    timer = null;\n                    args = null;\n                    fn.apply(null, tempArgs);\n                }, rate);\n            }\n        };\n        return {\n            cancel,\n            throttle\n        };\n    };\n    // Run a function fn after rate ms. If another invocation occurs\n    // during the time it is waiting, ignore it completely.\n    const first$1 = (fn, rate) => {\n        let timer = null;\n        const cancel = () => {\n            if (!isNull(timer)) {\n                clearTimeout(timer);\n                timer = null;\n            }\n        };\n        const throttle = (...args) => {\n            if (isNull(timer)) {\n                timer = setTimeout(() => {\n                    timer = null;\n                    fn.apply(null, args);\n                }, rate);\n            }\n        };\n        return {\n            cancel,\n            throttle\n        };\n    };\n    // Run a function fn after rate ms. If another invocation occurs\n    // during the time it is waiting, reschedule the function again\n    // with the new arguments.\n    const last$1 = (fn, rate) => {\n        let timer = null;\n        const cancel = () => {\n            if (!isNull(timer)) {\n                clearTimeout(timer);\n                timer = null;\n            }\n        };\n        const throttle = (...args) => {\n            cancel();\n            timer = setTimeout(() => {\n                timer = null;\n                fn.apply(null, args);\n            }, rate);\n        };\n        return {\n            cancel,\n            throttle\n        };\n    };\n\n    const cached = (f) => {\n        let called = false;\n        let r;\n        return (...args) => {\n            if (!called) {\n                called = true;\n                r = f.apply(null, args);\n            }\n            return r;\n        };\n    };\n\n    const zeroWidth = '\\uFEFF';\n    const nbsp = '\\u00A0';\n    const ellipsis = '\\u2026';\n    const isZwsp$2 = (char) => char === zeroWidth;\n    const removeZwsp = (s) => s.replace(/\\uFEFF/g, '');\n\n    const stringArray = (a) => {\n        const all = {};\n        each$e(a, (key) => {\n            all[key] = {};\n        });\n        return keys(all);\n    };\n\n    const isArrayLike = (o) => o.length !== undefined;\n    const isArray = Array.isArray;\n    const toArray$1 = (obj) => {\n        if (!isArray(obj)) {\n            const array = [];\n            for (let i = 0, l = obj.length; i < l; i++) {\n                array[i] = obj[i];\n            }\n            return array;\n        }\n        else {\n            return obj;\n        }\n    };\n    const each$c = (o, cb, s) => {\n        if (!o) {\n            return false;\n        }\n        s = s || o;\n        if (isArrayLike(o)) {\n            // Indexed arrays, needed for Safari\n            for (let n = 0, l = o.length; n < l; n++) {\n                if (cb.call(s, o[n], n, o) === false) {\n                    return false;\n                }\n            }\n        }\n        else {\n            // Hashtables\n            for (const n in o) {\n                if (has$2(o, n)) {\n                    if (cb.call(s, o[n], n, o) === false) {\n                        return false;\n                    }\n                }\n            }\n        }\n        return true;\n    };\n    const map$1 = (array, callback) => {\n        const out = [];\n        each$c(array, (item, index) => {\n            out.push(callback(item, index, array));\n        });\n        return out;\n    };\n    const filter$3 = (a, f) => {\n        const o = [];\n        each$c(a, (v, index) => {\n            if (!f || f(v, index, a)) {\n                o.push(v);\n            }\n        });\n        return o;\n    };\n    const indexOf = (a, v) => {\n        if (a) {\n            for (let i = 0, l = a.length; i < l; i++) {\n                if (a[i] === v) {\n                    return i;\n                }\n            }\n        }\n        return -1;\n    };\n    const reduce = (collection, iteratee, accumulator, thisArg) => {\n        let acc = isUndefined(accumulator) ? collection[0] : accumulator;\n        for (let i = 0; i < collection.length; i++) {\n            acc = iteratee.call(thisArg, acc, collection[i], i);\n        }\n        return acc;\n    };\n    const findIndex$1 = (array, predicate, thisArg) => {\n        for (let i = 0, l = array.length; i < l; i++) {\n            if (predicate.call(thisArg, array[i], i, array)) {\n                return i;\n            }\n        }\n        return -1;\n    };\n    const last = (collection) => collection[collection.length - 1];\n\n    const DeviceType = (os, browser, userAgent, mediaMatch) => {\n        const isiPad = os.isiOS() && /ipad/i.test(userAgent) === true;\n        const isiPhone = os.isiOS() && !isiPad;\n        const isMobile = os.isiOS() || os.isAndroid();\n        const isTouch = isMobile || mediaMatch('(pointer:coarse)');\n        const isTablet = isiPad || !isiPhone && isMobile && mediaMatch('(min-device-width:768px)');\n        const isPhone = isiPhone || isMobile && !isTablet;\n        const iOSwebview = browser.isSafari() && os.isiOS() && /safari/i.test(userAgent) === false;\n        const isDesktop = !isPhone && !isTablet && !iOSwebview;\n        return {\n            isiPad: constant(isiPad),\n            isiPhone: constant(isiPhone),\n            isTablet: constant(isTablet),\n            isPhone: constant(isPhone),\n            isTouch: constant(isTouch),\n            isAndroid: os.isAndroid,\n            isiOS: os.isiOS,\n            isWebView: constant(iOSwebview),\n            isDesktop: constant(isDesktop)\n        };\n    };\n\n    const firstMatch = (regexes, s) => {\n        for (let i = 0; i < regexes.length; i++) {\n            const x = regexes[i];\n            if (x.test(s)) {\n                return x;\n            }\n        }\n        return undefined;\n    };\n    const find$1 = (regexes, agent) => {\n        const r = firstMatch(regexes, agent);\n        if (!r) {\n            return { major: 0, minor: 0 };\n        }\n        const group = (i) => {\n            return Number(agent.replace(r, '$' + i));\n        };\n        return nu$3(group(1), group(2));\n    };\n    const detect$4 = (versionRegexes, agent) => {\n        const cleanedAgent = String(agent).toLowerCase();\n        if (versionRegexes.length === 0) {\n            return unknown$2();\n        }\n        return find$1(versionRegexes, cleanedAgent);\n    };\n    const unknown$2 = () => {\n        return nu$3(0, 0);\n    };\n    const nu$3 = (major, minor) => {\n        return { major, minor };\n    };\n    const Version = {\n        nu: nu$3,\n        detect: detect$4,\n        unknown: unknown$2\n    };\n\n    const detectBrowser$1 = (browsers, userAgentData) => {\n        return findMap(userAgentData.brands, (uaBrand) => {\n            const lcBrand = uaBrand.brand.toLowerCase();\n            return find$2(browsers, (browser) => lcBrand === browser.brand?.toLowerCase())\n                .map((info) => ({\n                current: info.name,\n                version: Version.nu(parseInt(uaBrand.version, 10), 0)\n            }));\n        });\n    };\n\n    const detect$3 = (candidates, userAgent) => {\n        const agent = String(userAgent).toLowerCase();\n        return find$2(candidates, (candidate) => {\n            return candidate.search(agent);\n        });\n    };\n    // They (browser and os) are the same at the moment, but they might\n    // not stay that way.\n    const detectBrowser = (browsers, userAgent) => {\n        return detect$3(browsers, userAgent).map((browser) => {\n            const version = Version.detect(browser.versionRegexes, userAgent);\n            return {\n                current: browser.name,\n                version\n            };\n        });\n    };\n    const detectOs = (oses, userAgent) => {\n        return detect$3(oses, userAgent).map((os) => {\n            const version = Version.detect(os.versionRegexes, userAgent);\n            return {\n                current: os.name,\n                version\n            };\n        });\n    };\n\n    const normalVersionRegex = /.*?version\\/\\ ?([0-9]+)\\.([0-9]+).*/;\n    const checkContains = (target) => {\n        return (uastring) => {\n            return contains$1(uastring, target);\n        };\n    };\n    const browsers = [\n        // This is legacy Edge\n        {\n            name: 'Edge',\n            versionRegexes: [/.*?edge\\/ ?([0-9]+)\\.([0-9]+)$/],\n            search: (uastring) => {\n                return contains$1(uastring, 'edge/') && contains$1(uastring, 'chrome') && contains$1(uastring, 'safari') && contains$1(uastring, 'applewebkit');\n            }\n        },\n        // This is Google Chrome and Chromium Edge\n        {\n            name: 'Chromium',\n            brand: 'Chromium',\n            versionRegexes: [/.*?chrome\\/([0-9]+)\\.([0-9]+).*/, normalVersionRegex],\n            search: (uastring) => {\n                return contains$1(uastring, 'chrome') && !contains$1(uastring, 'chromeframe');\n            }\n        },\n        {\n            name: 'IE',\n            versionRegexes: [/.*?msie\\ ?([0-9]+)\\.([0-9]+).*/, /.*?rv:([0-9]+)\\.([0-9]+).*/],\n            search: (uastring) => {\n                return contains$1(uastring, 'msie') || contains$1(uastring, 'trident');\n            }\n        },\n        // INVESTIGATE: Is this still the Opera user agent?\n        {\n            name: 'Opera',\n            versionRegexes: [normalVersionRegex, /.*?opera\\/([0-9]+)\\.([0-9]+).*/],\n            search: checkContains('opera')\n        },\n        {\n            name: 'Firefox',\n            versionRegexes: [/.*?firefox\\/\\ ?([0-9]+)\\.([0-9]+).*/],\n            search: checkContains('firefox')\n        },\n        {\n            name: 'Safari',\n            versionRegexes: [normalVersionRegex, /.*?cpu os ([0-9]+)_([0-9]+).*/],\n            search: (uastring) => {\n                return (contains$1(uastring, 'safari') || contains$1(uastring, 'mobile/')) && contains$1(uastring, 'applewebkit');\n            }\n        }\n    ];\n    const oses = [\n        {\n            name: 'Windows',\n            search: checkContains('win'),\n            versionRegexes: [/.*?windows\\ nt\\ ?([0-9]+)\\.([0-9]+).*/]\n        },\n        {\n            name: 'iOS',\n            search: (uastring) => {\n                return contains$1(uastring, 'iphone') || contains$1(uastring, 'ipad');\n            },\n            versionRegexes: [/.*?version\\/\\ ?([0-9]+)\\.([0-9]+).*/, /.*cpu os ([0-9]+)_([0-9]+).*/, /.*cpu iphone os ([0-9]+)_([0-9]+).*/]\n        },\n        {\n            name: 'Android',\n            search: checkContains('android'),\n            versionRegexes: [/.*?android\\ ?([0-9]+)\\.([0-9]+).*/]\n        },\n        {\n            name: 'macOS',\n            search: checkContains('mac os x'),\n            versionRegexes: [/.*?mac\\ os\\ x\\ ?([0-9]+)_([0-9]+).*/]\n        },\n        {\n            name: 'Linux',\n            search: checkContains('linux'),\n            versionRegexes: []\n        },\n        { name: 'Solaris',\n            search: checkContains('sunos'),\n            versionRegexes: []\n        },\n        {\n            name: 'FreeBSD',\n            search: checkContains('freebsd'),\n            versionRegexes: []\n        },\n        {\n            name: 'ChromeOS',\n            search: checkContains('cros'),\n            versionRegexes: [/.*?chrome\\/([0-9]+)\\.([0-9]+).*/]\n        }\n    ];\n    const PlatformInfo = {\n        browsers: constant(browsers),\n        oses: constant(oses)\n    };\n\n    const edge = 'Edge';\n    const chromium = 'Chromium';\n    const ie = 'IE';\n    const opera = 'Opera';\n    const firefox = 'Firefox';\n    const safari = 'Safari';\n    const unknown$1 = () => {\n        return nu$2({\n            current: undefined,\n            version: Version.unknown()\n        });\n    };\n    const nu$2 = (info) => {\n        const current = info.current;\n        const version = info.version;\n        const isBrowser = (name) => () => current === name;\n        return {\n            current,\n            version,\n            isEdge: isBrowser(edge),\n            isChromium: isBrowser(chromium),\n            // NOTE: isIe just looks too weird\n            isIE: isBrowser(ie),\n            isOpera: isBrowser(opera),\n            isFirefox: isBrowser(firefox),\n            isSafari: isBrowser(safari)\n        };\n    };\n    const Browser = {\n        unknown: unknown$1,\n        nu: nu$2,\n        edge: constant(edge),\n        chromium: constant(chromium),\n        ie: constant(ie),\n        opera: constant(opera),\n        firefox: constant(firefox),\n        safari: constant(safari)\n    };\n\n    const windows = 'Windows';\n    const ios = 'iOS';\n    const android = 'Android';\n    const linux = 'Linux';\n    const macos = 'macOS';\n    const solaris = 'Solaris';\n    const freebsd = 'FreeBSD';\n    const chromeos = 'ChromeOS';\n    // Though there is a bit of dupe with this and Browser, trying to\n    // reuse code makes it much harder to follow and change.\n    const unknown = () => {\n        return nu$1({\n            current: undefined,\n            version: Version.unknown()\n        });\n    };\n    const nu$1 = (info) => {\n        const current = info.current;\n        const version = info.version;\n        const isOS = (name) => () => current === name;\n        return {\n            current,\n            version,\n            isWindows: isOS(windows),\n            // TODO: Fix capitalisation\n            isiOS: isOS(ios),\n            isAndroid: isOS(android),\n            isMacOS: isOS(macos),\n            isLinux: isOS(linux),\n            isSolaris: isOS(solaris),\n            isFreeBSD: isOS(freebsd),\n            isChromeOS: isOS(chromeos)\n        };\n    };\n    const OperatingSystem = {\n        unknown,\n        nu: nu$1,\n        windows: constant(windows),\n        ios: constant(ios),\n        android: constant(android),\n        linux: constant(linux),\n        macos: constant(macos),\n        solaris: constant(solaris),\n        freebsd: constant(freebsd),\n        chromeos: constant(chromeos)\n    };\n\n    const detect$2 = (userAgent, userAgentDataOpt, mediaMatch) => {\n        const browsers = PlatformInfo.browsers();\n        const oses = PlatformInfo.oses();\n        const browser = userAgentDataOpt.bind((userAgentData) => detectBrowser$1(browsers, userAgentData))\n            .orThunk(() => detectBrowser(browsers, userAgent))\n            .fold(Browser.unknown, Browser.nu);\n        const os = detectOs(oses, userAgent).fold(OperatingSystem.unknown, OperatingSystem.nu);\n        const deviceType = DeviceType(os, browser, userAgent, mediaMatch);\n        return {\n            browser,\n            os,\n            deviceType\n        };\n    };\n    const PlatformDetection = {\n        detect: detect$2\n    };\n\n    const mediaMatch = (query) => window.matchMedia(query).matches;\n    // IMPORTANT: Must be in a thunk, otherwise rollup thinks calling this immediately\n    // causes side effects and won't tree shake this away\n    // Note: navigator.userAgentData is not part of the native typescript types yet\n    let platform$4 = cached(() => PlatformDetection.detect(window.navigator.userAgent, Optional.from((window.navigator.userAgentData)), mediaMatch));\n    const detect$1 = () => platform$4();\n\n    const unsafe = (name, scope) => {\n        return resolve$3(name, scope);\n    };\n    const getOrDie = (name, scope) => {\n        const actual = unsafe(name, scope);\n        if (actual === undefined || actual === null) {\n            throw new Error(name + ' not available on this browser');\n        }\n        return actual;\n    };\n\n    const getPrototypeOf$1 = Object.getPrototypeOf;\n    /*\n     * IE9 and above\n     *\n     * MDN no use on this one, but here's the link anyway:\n     * https://developer.mozilla.org/en/docs/Web/API/HTMLElement\n     */\n    const sandHTMLElement = (scope) => {\n        return getOrDie('HTMLElement', scope);\n    };\n    const isPrototypeOf = (x) => {\n        // use Resolve to get the window object for x and just return undefined if it can't find it.\n        // undefined scope later triggers using the global window.\n        const scope = resolve$3('ownerDocument.defaultView', x);\n        // TINY-7374: We can't rely on looking at the owner window HTMLElement as the element may have\n        // been constructed in a different window and then appended to the current window document.\n        return isObject(x) && (sandHTMLElement(scope).prototype.isPrototypeOf(x) || /^HTML\\w*Element$/.test(getPrototypeOf$1(x).constructor.name));\n    };\n\n    /**\n     * This class contains various environment constants like browser versions etc.\n     * Normally you don't want to sniff specific browser versions but sometimes you have\n     * to when it's impossible to feature detect. So use this with care.\n     *\n     * @class tinymce.Env\n     * @static\n     */\n    const userAgent = window.navigator.userAgent;\n    const platform$3 = detect$1();\n    const browser$3 = platform$3.browser;\n    const os$1 = platform$3.os;\n    const deviceType = platform$3.deviceType;\n    const windowsPhone = userAgent.indexOf('Windows Phone') !== -1;\n    const Env = {\n        /**\n         * Transparent image data url.\n         *\n         * @property transparentSrc\n         * @type Boolean\n         * @final\n         */\n        transparentSrc: 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7',\n        /**\n         * Returns the IE document mode. For non IE browsers, this will fake IE 10 document mode.\n         *\n         * @property documentMode\n         * @type Number\n         */\n        documentMode: browser$3.isIE() ? (document.documentMode || 7) : 10,\n        cacheSuffix: null,\n        container: null,\n        /**\n         * Constant if CSP mode is possible or not. Meaning we can't use script urls for the iframe.\n         */\n        canHaveCSP: !browser$3.isIE(),\n        windowsPhone,\n        /**\n         * @include ../../../../../tools/docs/tinymce.Env.js\n         */\n        browser: {\n            current: browser$3.current,\n            version: browser$3.version,\n            isChromium: browser$3.isChromium,\n            isEdge: browser$3.isEdge,\n            isFirefox: browser$3.isFirefox,\n            isIE: browser$3.isIE,\n            isOpera: browser$3.isOpera,\n            isSafari: browser$3.isSafari\n        },\n        os: {\n            current: os$1.current,\n            version: os$1.version,\n            isAndroid: os$1.isAndroid,\n            isChromeOS: os$1.isChromeOS,\n            isFreeBSD: os$1.isFreeBSD,\n            isiOS: os$1.isiOS,\n            isLinux: os$1.isLinux,\n            isMacOS: os$1.isMacOS,\n            isSolaris: os$1.isSolaris,\n            isWindows: os$1.isWindows\n        },\n        deviceType: {\n            isDesktop: deviceType.isDesktop,\n            isiPad: deviceType.isiPad,\n            isiPhone: deviceType.isiPhone,\n            isPhone: deviceType.isPhone,\n            isTablet: deviceType.isTablet,\n            isTouch: deviceType.isTouch,\n            isWebView: deviceType.isWebView\n        }\n    };\n\n    /**\n     * This class contains various utility functions. These are also exposed\n     * directly on the tinymce namespace.\n     *\n     * @class tinymce.util.Tools\n     */\n    /**\n     * Removes whitespace from the beginning and end of a string.\n     *\n     * @method trim\n     * @param {String} s String to remove whitespace from.\n     * @return {String} New string with removed whitespace.\n     */\n    const whiteSpaceRegExp$1 = /^\\s*|\\s*$/g;\n    const trim$3 = (str) => {\n        return isNullable(str) ? '' : ('' + str).replace(whiteSpaceRegExp$1, '');\n    };\n    /**\n     * Checks if a object is of a specific type for example an array.\n     *\n     * @method is\n     * @param {Object} obj Object to check type of.\n     * @param {String} type Optional type to check for.\n     * @return {Boolean} true/false if the object is of the specified type.\n     */\n    const is$3 = (obj, type) => {\n        if (!type) {\n            return obj !== undefined;\n        }\n        if (type === 'array' && isArray(obj)) {\n            return true;\n        }\n        return typeof obj === type;\n    };\n    /**\n     * Makes a name/object map out of an array with names.\n     *\n     * @method makeMap\n     * @param {Array/String} items Items to make map out of.\n     * @param {String} delim Optional delimiter to split string by.\n     * @param {Object} map Optional map to add items to.\n     * @return {Object} Name/value map of items.\n     */\n    const makeMap$4 = (items, delim, map = {}) => {\n        const resolvedItems = isString(items) ? items.split(delim || ',') : (items || []);\n        let i = resolvedItems.length;\n        while (i--) {\n            map[resolvedItems[i]] = {};\n        }\n        return map;\n    };\n    /**\n     * JavaScript does not protect hasOwnProperty method, so it is possible to overwrite it. This is\n     * an object independent version.\n     * Checks if the input object \"<code>obj</code>\" has the property \"<code>prop</code>\".\n     *\n     * @method hasOwnProperty\n     * @param {Object} obj Object to check if the property exists.\n     * @param {String} prop Name of a property on the object.\n     * @returns {Boolean} true if the object has the specified property.\n     */\n    const hasOwnProperty = has$2;\n    const extend$3 = (obj, ...exts) => {\n        for (let i = 0; i < exts.length; i++) {\n            const ext = exts[i];\n            for (const name in ext) {\n                if (has$2(ext, name)) {\n                    const value = ext[name];\n                    if (value !== undefined) {\n                        obj[name] = value;\n                    }\n                }\n            }\n        }\n        return obj;\n    };\n    /**\n     * Executed the specified function for each item in a object tree.\n     *\n     * @method walk\n     * @param {Object} o Object tree to walk though.\n     * @param {Function} f Function to call for each item.\n     * @param {String} n Optional name of collection inside the objects to walk for example childNodes.\n     * @param {String} s Optional scope to execute the function in.\n     */\n    const walk$4 = function (o, f, n, s) {\n        s = s || this;\n        if (o) {\n            if (n) {\n                o = o[n];\n            }\n            each$c(o, (o, i) => {\n                if (f.call(s, o, i, n) === false) {\n                    return false;\n                }\n                else {\n                    walk$4(o, f, n, s);\n                    return true;\n                }\n            });\n        }\n    };\n    /**\n     * Resolves a string and returns the object from a specific structure.\n     *\n     * @method resolve\n     * @param {String} n Path to resolve for example a.b.c.d.\n     * @param {Object} o Optional object to search though, defaults to window.\n     * @return {Object} Last object in path or null if it couldn't be resolved.\n     * @example\n     * // Resolve a path into an object reference\n     * const obj = tinymce.resolve('a.b.c.d');\n     */\n    const resolve$2 = (n, o = window) => {\n        const path = n.split('.');\n        for (let i = 0, l = path.length; i < l; i++) {\n            o = o[path[i]];\n            if (!o) {\n                break;\n            }\n        }\n        return o;\n    };\n    /**\n     * Splits a string but removes the whitespace before and after each value.\n     *\n     * @method explode\n     * @param {String} s String to split.\n     * @param {String} d Delimiter to split by.\n     * @example\n     * // Split a string into an array with a,b,c\n     * const arr = tinymce.explode('a, b,   c');\n     */\n    const explode$3 = (s, d) => {\n        if (isArray$1(s)) {\n            return s;\n        }\n        else if (s === '') {\n            return [];\n        }\n        else {\n            return map$1(s.split(d || ','), trim$3);\n        }\n    };\n    const _addCacheSuffix = (url) => {\n        const cacheSuffix = Env.cacheSuffix;\n        if (cacheSuffix) {\n            url += (url.indexOf('?') === -1 ? '?' : '&') + cacheSuffix;\n        }\n        return url;\n    };\n    const Tools = {\n        trim: trim$3,\n        /**\n         * Returns true/false if the object is an array or not.\n         *\n         * @method isArray\n         * @param {Object} obj Object to check.\n         * @return {Boolean} true/false state if the object is an array or not.\n         */\n        isArray: isArray,\n        is: is$3,\n        /**\n         * Converts the specified object into a real JavaScript array.\n         *\n         * @method toArray\n         * @param {Object} obj Object to convert into array.\n         * @return {Array} Array object based in input.\n         */\n        toArray: toArray$1,\n        makeMap: makeMap$4,\n        /**\n         * Performs an iteration of all items in a collection such as an object or array. This method will execute the\n         * callback function for each item in the collection, if the callback returns false the iteration will terminate.\n         * The callback has the following format: `cb(value, key_or_index)`.\n         *\n         * @method each\n         * @param {Object} o Collection to iterate.\n         * @param {Function} cb Callback function to execute for each item.\n         * @param {Object} s Optional scope to execute the callback in.\n         * @example\n         * // Iterate an array\n         * tinymce.each([ 1,2,3 ], (v, i) => {\n         *   console.debug(\"Value: \" + v + \", Index: \" + i);\n         * });\n         *\n         * // Iterate an object\n         * tinymce.each({ a: 1, b: 2, c: 3 }, (v, k) => {\n         *   console.debug(\"Value: \" + v + \", Key: \" + k);\n         * });\n         */\n        each: each$c,\n        /**\n         * Creates a new array by the return value of each iteration function call. This enables you to convert\n         * one array list into another.\n         *\n         * @method map\n         * @param {Array} array Array of items to iterate.\n         * @param {Function} callback Function to call for each item. It's return value will be the new value.\n         * @return {Array} Array with new values based on function return values.\n         */\n        map: map$1,\n        /**\n         * Filters out items from the input array by calling the specified function for each item.\n         * If the function returns false the item will be excluded if it returns true it will be included.\n         *\n         * @method grep\n         * @param {Array} a Array of items to loop though.\n         * @param {Function} f Function to call for each item. Include/exclude depends on it's return value.\n         * @return {Array} New array with values imported and filtered based in input.\n         * @example\n         * // Filter out some items, this will return an array with 4 and 5\n         * const items = tinymce.grep([ 1,2,3,4,5 ], (v) => v > 3);\n         */\n        grep: filter$3,\n        /**\n         * Returns an index of the item or -1 if item is not present in the array.\n         *\n         * @method inArray\n         * @param {any} item Item to search for.\n         * @param {Array} arr Array to search in.\n         * @return {Number} index of the item or -1 if item was not found.\n         */\n        inArray: indexOf,\n        hasOwn: hasOwnProperty,\n        extend: extend$3,\n        walk: walk$4,\n        resolve: resolve$2,\n        explode: explode$3,\n        _addCacheSuffix\n    };\n\n    const fromHtml$1 = (html, scope) => {\n        const doc = scope || document;\n        const div = doc.createElement('div');\n        div.innerHTML = html;\n        if (!div.hasChildNodes() || div.childNodes.length > 1) {\n            const message = 'HTML does not have a single root node';\n            // eslint-disable-next-line no-console\n            console.error(message, html);\n            throw new Error(message);\n        }\n        return fromDom$2(div.childNodes[0]);\n    };\n    const fromTag = (tag, scope) => {\n        const doc = scope || document;\n        const node = doc.createElement(tag);\n        return fromDom$2(node);\n    };\n    const fromText = (text, scope) => {\n        const doc = scope || document;\n        const node = doc.createTextNode(text);\n        return fromDom$2(node);\n    };\n    const fromDom$2 = (node) => {\n        // TODO: Consider removing this check, but left atm for safety\n        if (node === null || node === undefined) {\n            throw new Error('Node cannot be null or undefined');\n        }\n        return {\n            dom: node\n        };\n    };\n    const fromPoint$2 = (docElm, x, y) => Optional.from(docElm.dom.elementFromPoint(x, y)).map(fromDom$2);\n    // tslint:disable-next-line:variable-name\n    const SugarElement = {\n        fromHtml: fromHtml$1,\n        fromTag,\n        fromText,\n        fromDom: fromDom$2,\n        fromPoint: fromPoint$2\n    };\n\n    // NOTE: Mutates the range.\n    const setStart = (rng, situ) => {\n        situ.fold((e) => {\n            rng.setStartBefore(e.dom);\n        }, (e, o) => {\n            rng.setStart(e.dom, o);\n        }, (e) => {\n            rng.setStartAfter(e.dom);\n        });\n    };\n    const setFinish = (rng, situ) => {\n        situ.fold((e) => {\n            rng.setEndBefore(e.dom);\n        }, (e, o) => {\n            rng.setEnd(e.dom, o);\n        }, (e) => {\n            rng.setEndAfter(e.dom);\n        });\n    };\n    const relativeToNative = (win, startSitu, finishSitu) => {\n        const range = win.document.createRange();\n        setStart(range, startSitu);\n        setFinish(range, finishSitu);\n        return range;\n    };\n    const exactToNative = (win, start, soffset, finish, foffset) => {\n        const rng = win.document.createRange();\n        rng.setStart(start.dom, soffset);\n        rng.setEnd(finish.dom, foffset);\n        return rng;\n    };\n\n    const adt$3 = Adt.generate([\n        { ltr: ['start', 'soffset', 'finish', 'foffset'] },\n        { rtl: ['start', 'soffset', 'finish', 'foffset'] }\n    ]);\n    const fromRange = (win, type, range) => type(SugarElement.fromDom(range.startContainer), range.startOffset, SugarElement.fromDom(range.endContainer), range.endOffset);\n    const getRanges$1 = (win, selection) => selection.match({\n        domRange: (rng) => {\n            return {\n                ltr: constant(rng),\n                rtl: Optional.none\n            };\n        },\n        relative: (startSitu, finishSitu) => {\n            return {\n                ltr: cached(() => relativeToNative(win, startSitu, finishSitu)),\n                rtl: cached(() => Optional.some(relativeToNative(win, finishSitu, startSitu)))\n            };\n        },\n        exact: (start, soffset, finish, foffset) => {\n            return {\n                ltr: cached(() => exactToNative(win, start, soffset, finish, foffset)),\n                rtl: cached(() => Optional.some(exactToNative(win, finish, foffset, start, soffset)))\n            };\n        }\n    });\n    const doDiagnose = (win, ranges) => {\n        // If we cannot create a ranged selection from start > finish, it could be RTL\n        const rng = ranges.ltr();\n        if (rng.collapsed) {\n            // Let's check if it's RTL ... if it is, then reversing the direction will not be collapsed\n            const reversed = ranges.rtl().filter((rev) => rev.collapsed === false);\n            return reversed.map((rev) => \n            // We need to use \"reversed\" here, because the original only has one point (collapsed)\n            adt$3.rtl(SugarElement.fromDom(rev.endContainer), rev.endOffset, SugarElement.fromDom(rev.startContainer), rev.startOffset)).getOrThunk(() => fromRange(win, adt$3.ltr, rng));\n        }\n        else {\n            return fromRange(win, adt$3.ltr, rng);\n        }\n    };\n    const diagnose = (win, selection) => {\n        const ranges = getRanges$1(win, selection);\n        return doDiagnose(win, ranges);\n    };\n    adt$3.ltr;\n    adt$3.rtl;\n\n    const COMMENT = 8;\n    const DOCUMENT = 9;\n    const DOCUMENT_FRAGMENT = 11;\n    const ELEMENT = 1;\n    const TEXT = 3;\n\n    const is$2 = (element, selector) => {\n        const dom = element.dom;\n        if (dom.nodeType !== ELEMENT) {\n            return false;\n        }\n        else {\n            const elem = dom;\n            if (elem.matches !== undefined) {\n                return elem.matches(selector);\n            }\n            else if (elem.msMatchesSelector !== undefined) {\n                return elem.msMatchesSelector(selector);\n            }\n            else if (elem.webkitMatchesSelector !== undefined) {\n                return elem.webkitMatchesSelector(selector);\n            }\n            else if (elem.mozMatchesSelector !== undefined) {\n                // cast to any as mozMatchesSelector doesn't exist in TS DOM lib\n                return elem.mozMatchesSelector(selector);\n            }\n            else {\n                throw new Error('Browser lacks native selectors');\n            } // unfortunately we can't throw this on startup :(\n        }\n    };\n    const bypassSelector = (dom) => \n    // Only elements, documents and shadow roots support querySelector\n    // shadow root element type is DOCUMENT_FRAGMENT\n    dom.nodeType !== ELEMENT && dom.nodeType !== DOCUMENT && dom.nodeType !== DOCUMENT_FRAGMENT ||\n        // IE fix for complex queries on empty nodes: http://jsfiddle.net/spyder/fv9ptr5L/\n        dom.childElementCount === 0;\n    const all = (selector, scope) => {\n        const base = scope === undefined ? document : scope.dom;\n        return bypassSelector(base) ? [] : map$3(base.querySelectorAll(selector), SugarElement.fromDom);\n    };\n    const one = (selector, scope) => {\n        const base = scope === undefined ? document : scope.dom;\n        return bypassSelector(base) ? Optional.none() : Optional.from(base.querySelector(selector)).map(SugarElement.fromDom);\n    };\n\n    const eq = (e1, e2) => e1.dom === e2.dom;\n    // Returns: true if node e1 contains e2, otherwise false.\n    // (returns false if e1===e2: A node does not contain itself).\n    const contains = (e1, e2) => {\n        const d1 = e1.dom;\n        const d2 = e2.dom;\n        return d1 === d2 ? false : d1.contains(d2);\n    };\n    const is$1 = is$2;\n\n    /**\n     * Applies f repeatedly until it completes (by returning Optional.none()).\n     *\n     * Normally would just use recursion, but JavaScript lacks tail call optimisation.\n     *\n     * This is what recursion looks like when manually unravelled :)\n     */\n    const toArray = (target, f) => {\n        const r = [];\n        const recurse = (e) => {\n            r.push(e);\n            return f(e);\n        };\n        let cur = f(target);\n        do {\n            cur = cur.bind(recurse);\n        } while (cur.isSome());\n        return r;\n    };\n\n    const name = (element) => {\n        const r = element.dom.nodeName;\n        return r.toLowerCase();\n    };\n    const type$1 = (element) => element.dom.nodeType;\n    const isType = (t) => (element) => type$1(element) === t;\n    const isComment$1 = (element) => type$1(element) === COMMENT || name(element) === '#comment';\n    const isHTMLElement$1 = (element) => isElement$8(element) && isPrototypeOf(element.dom);\n    const isElement$8 = isType(ELEMENT);\n    const isText$c = isType(TEXT);\n    const isDocument$2 = isType(DOCUMENT);\n    const isDocumentFragment$1 = isType(DOCUMENT_FRAGMENT);\n    const isTag = (tag) => (e) => isElement$8(e) && name(e) === tag;\n\n    /**\n     * The document associated with the current element\n     * NOTE: this will throw if the owner is null.\n     */\n    const owner$1 = (element) => SugarElement.fromDom(element.dom.ownerDocument);\n    /**\n     * If the element is a document, return it. Otherwise, return its ownerDocument.\n     * @param dos\n     */\n    const documentOrOwner = (dos) => isDocument$2(dos) ? dos : owner$1(dos);\n    const documentElement = (element) => SugarElement.fromDom(documentOrOwner(element).dom.documentElement);\n    /**\n     * The window element associated with the element\n     * NOTE: this will throw if the defaultView is null.\n     */\n    const defaultView = (element) => SugarElement.fromDom(documentOrOwner(element).dom.defaultView);\n    const parent = (element) => Optional.from(element.dom.parentNode).map(SugarElement.fromDom);\n    const parentElement = (element) => Optional.from(element.dom.parentElement).map(SugarElement.fromDom);\n    const parents$1 = (element, isRoot) => {\n        const stop = isFunction(isRoot) ? isRoot : never;\n        // This is used a *lot* so it needs to be performant, not recursive\n        let dom = element.dom;\n        const ret = [];\n        while (dom.parentNode !== null && dom.parentNode !== undefined) {\n            const rawParent = dom.parentNode;\n            const p = SugarElement.fromDom(rawParent);\n            ret.push(p);\n            if (stop(p) === true) {\n                break;\n            }\n            else {\n                dom = rawParent;\n            }\n        }\n        return ret;\n    };\n    const siblings = (element) => {\n        // TODO: Refactor out children so we can just not add self instead of filtering afterwards\n        const filterSelf = (elements) => filter$5(elements, (x) => !eq(element, x));\n        return parent(element).map(children$2).map(filterSelf).getOr([]);\n    };\n    const prevSibling = (element) => Optional.from(element.dom.previousSibling).map(SugarElement.fromDom);\n    const nextSibling = (element) => Optional.from(element.dom.nextSibling).map(SugarElement.fromDom);\n    // This one needs to be reversed, so they're still in DOM order\n    const prevSiblings = (element) => reverse(toArray(element, prevSibling));\n    const nextSiblings = (element) => toArray(element, nextSibling);\n    const children$2 = (element) => map$3(element.dom.childNodes, SugarElement.fromDom);\n    const child$1 = (element, index) => {\n        const cs = element.dom.childNodes;\n        return Optional.from(cs[index]).map(SugarElement.fromDom);\n    };\n    const firstChild = (element) => child$1(element, 0);\n    const lastChild = (element) => child$1(element, element.dom.childNodes.length - 1);\n    const childNodesCount = (element) => element.dom.childNodes.length;\n\n    const getHead = (doc) => {\n        /*\n         * IE9 and above per\n         * https://developer.mozilla.org/en-US/docs/Web/API/Document/head\n         */\n        const b = doc.dom.head;\n        if (b === null || b === undefined) {\n            throw new Error('Head is not available yet');\n        }\n        return SugarElement.fromDom(b);\n    };\n\n    /**\n     * Is the element a ShadowRoot?\n     *\n     * Note: this is insufficient to test if any element is a shadow root, but it is sufficient to differentiate between\n     * a Document and a ShadowRoot.\n     */\n    const isShadowRoot = (dos) => isDocumentFragment$1(dos) && isNonNullable(dos.dom.host);\n    const getRootNode = (e) => SugarElement.fromDom(e.dom.getRootNode());\n    /** Where style tags need to go. ShadowRoot or document head */\n    const getStyleContainer = (dos) => isShadowRoot(dos) ? dos : getHead(documentOrOwner(dos));\n    /** Where content needs to go. ShadowRoot or document body */\n    const getContentContainer = (dos) => \n    // Can't use SugarBody.body without causing a circular module reference (since SugarBody.inBody uses SugarShadowDom)\n    isShadowRoot(dos) ? dos : SugarElement.fromDom(documentOrOwner(dos).dom.body);\n    /** If this element is in a ShadowRoot, return it. */\n    const getShadowRoot = (e) => {\n        const r = getRootNode(e);\n        return isShadowRoot(r) ? Optional.some(r) : Optional.none();\n    };\n    /** Return the host of a ShadowRoot.\n     *\n     * This function will throw if Shadow DOM is unsupported in the browser, or if the host is null.\n     * If you actually have a ShadowRoot, this shouldn't happen.\n     */\n    const getShadowHost = (e) => SugarElement.fromDom(e.dom.host);\n    /**\n     * When Events bubble up through a ShadowRoot, the browser changes the target to be the shadow host.\n     * This function gets the \"original\" event target if possible.\n     * This only works if the shadow tree is open - if the shadow tree is closed, event.target is returned.\n     * See: https://developers.google.com/web/fundamentals/web-components/shadowdom#events\n     */\n    const getOriginalEventTarget = (event) => {\n        if (isNonNullable(event.target)) {\n            const el = SugarElement.fromDom(event.target);\n            if (isElement$8(el) && isOpenShadowHost(el)) {\n                // When target element is inside Shadow DOM we need to take first element from composedPath\n                // otherwise we'll get Shadow Root parent, not actual target element.\n                if (event.composed && event.composedPath) {\n                    const composedPath = event.composedPath();\n                    if (composedPath) {\n                        return head(composedPath);\n                    }\n                }\n            }\n        }\n        return Optional.from(event.target);\n    };\n    /** Return true if the element is a host of an open shadow root.\n     *  Return false if the element is a host of a closed shadow root, or if the element is not a host.\n     */\n    const isOpenShadowHost = (element) => isNonNullable(element.dom.shadowRoot);\n\n    const mkEvent = (target, x, y, stop, prevent, kill, raw) => ({\n        target,\n        x,\n        y,\n        stop,\n        prevent,\n        kill,\n        raw\n    });\n    /** Wraps an Event in an EventArgs structure.\n     * The returned EventArgs structure has its target set to the \"original\" target if possible.\n     * See SugarShadowDom.getOriginalEventTarget\n     */\n    const fromRawEvent = (rawEvent) => {\n        const target = SugarElement.fromDom(getOriginalEventTarget(rawEvent).getOr(rawEvent.target));\n        const stop = () => rawEvent.stopPropagation();\n        const prevent = () => rawEvent.preventDefault();\n        const kill = compose(prevent, stop); // more of a sequence than a compose, but same effect\n        // FIX: Don't just expose the raw event. Need to identify what needs standardisation.\n        return mkEvent(target, rawEvent.clientX, rawEvent.clientY, stop, prevent, kill, rawEvent);\n    };\n    const handle$1 = (filter, handler) => (rawEvent) => {\n        if (filter(rawEvent)) {\n            handler(fromRawEvent(rawEvent));\n        }\n    };\n    const binder = (element, event, filter, handler, useCapture) => {\n        const wrapped = handle$1(filter, handler);\n        // IE9 minimum\n        element.dom.addEventListener(event, wrapped, useCapture);\n        return {\n            unbind: curry(unbind, element, event, wrapped, useCapture)\n        };\n    };\n    const bind$2 = (element, event, filter, handler) => binder(element, event, filter, handler, false);\n    const unbind = (element, event, handler, useCapture) => {\n        // IE9 minimum\n        element.dom.removeEventListener(event, handler, useCapture);\n    };\n\n    const filter$2 = always; // no filter on plain DomEvents\n    const bind$1 = (element, event, handler) => bind$2(element, event, filter$2, handler);\n\n    const getDocument = () => SugarElement.fromDom(document);\n\n    const focus$1 = (element, preventScroll = false) => element.dom.focus({ preventScroll });\n    const hasFocus$1 = (element) => {\n        const root = getRootNode(element).dom;\n        return element.dom === root.activeElement;\n    };\n    // Note: assuming that activeElement will always be a HTMLElement (maybe we should add a runtime check?)\n    const active = (root = getDocument()) => Optional.from(root.dom.activeElement).map(SugarElement.fromDom);\n    /**\n     * Return the descendant element that has focus.\n     * Use instead of SelectorFind.descendant(container, ':focus')\n     *  because the :focus selector relies on keyboard focus.\n     */\n    const search = (element) => active(getRootNode(element))\n        .filter((e) => element.dom.contains(e.dom));\n\n    const before$4 = (marker, element) => {\n        const parent$1 = parent(marker);\n        parent$1.each((v) => {\n            v.dom.insertBefore(element.dom, marker.dom);\n        });\n    };\n    const after$4 = (marker, element) => {\n        const sibling = nextSibling(marker);\n        sibling.fold(() => {\n            const parent$1 = parent(marker);\n            parent$1.each((v) => {\n                append$1(v, element);\n            });\n        }, (v) => {\n            before$4(v, element);\n        });\n    };\n    const prepend = (parent, element) => {\n        const firstChild$1 = firstChild(parent);\n        firstChild$1.fold(() => {\n            append$1(parent, element);\n        }, (v) => {\n            parent.dom.insertBefore(element.dom, v.dom);\n        });\n    };\n    const append$1 = (parent, element) => {\n        parent.dom.appendChild(element.dom);\n    };\n    const wrap$2 = (element, wrapper) => {\n        before$4(element, wrapper);\n        append$1(wrapper, element);\n    };\n\n    const before$3 = (marker, elements) => {\n        each$e(elements, (x) => {\n            before$4(marker, x);\n        });\n    };\n    const after$3 = (marker, elements) => {\n        each$e(elements, (x, i) => {\n            const e = i === 0 ? marker : elements[i - 1];\n            after$4(e, x);\n        });\n    };\n    const append = (parent, elements) => {\n        each$e(elements, (x) => {\n            append$1(parent, x);\n        });\n    };\n\n    const rawSet = (dom, key, value) => {\n        /*\n         * JQuery coerced everything to a string, and silently did nothing on text node/null/undefined.\n         *\n         * We fail on those invalid cases, only allowing numbers and booleans.\n         */\n        if (isString(value) || isBoolean(value) || isNumber(value)) {\n            dom.setAttribute(key, value + '');\n        }\n        else {\n            // eslint-disable-next-line no-console\n            console.error('Invalid call to Attribute.set. Key ', key, ':: Value ', value, ':: Element ', dom);\n            throw new Error('Attribute value was not simple');\n        }\n    };\n    const set$5 = (element, key, value) => {\n        rawSet(element.dom, key, value);\n    };\n    const setAll$1 = (element, attrs) => {\n        const dom = element.dom;\n        each$d(attrs, (v, k) => {\n            rawSet(dom, k, v);\n        });\n    };\n    const get$a = (element, key) => {\n        const v = element.dom.getAttribute(key);\n        // undefined is the more appropriate value for JS, and this matches JQuery\n        return v === null ? undefined : v;\n    };\n    const getOpt = (element, key) => Optional.from(get$a(element, key));\n    const has$1 = (element, key) => {\n        const dom = element.dom;\n        // return false for non-element nodes, no point in throwing an error\n        return dom && dom.hasAttribute ? dom.hasAttribute(key) : false;\n    };\n    const remove$9 = (element, key) => {\n        element.dom.removeAttribute(key);\n    };\n    const hasNone = (element) => {\n        const attrs = element.dom.attributes;\n        return attrs === undefined || attrs === null || attrs.length === 0;\n    };\n    const clone$4 = (element) => foldl(element.dom.attributes, (acc, attr) => {\n        acc[attr.name] = attr.value;\n        return acc;\n    }, {});\n\n    const empty = (element) => {\n        // shortcut \"empty node\" trick. Requires IE 9.\n        element.dom.textContent = '';\n        // If the contents was a single empty text node, the above doesn't remove it. But, it's still faster in general\n        // than removing every child node manually.\n        // The following is (probably) safe for performance as 99.9% of the time the trick works and\n        // Traverse.children will return an empty array.\n        each$e(children$2(element), (rogue) => {\n            remove$8(rogue);\n        });\n    };\n    const remove$8 = (element) => {\n        const dom = element.dom;\n        if (dom.parentNode !== null) {\n            dom.parentNode.removeChild(dom);\n        }\n    };\n    const unwrap = (wrapper) => {\n        const children = children$2(wrapper);\n        if (children.length > 0) {\n            after$3(wrapper, children);\n        }\n        remove$8(wrapper);\n    };\n\n    const clone$3 = (original, isDeep) => SugarElement.fromDom(original.dom.cloneNode(isDeep));\n    /** Shallow clone - just the tag, no children */\n    const shallow = (original) => clone$3(original, false);\n    /** Deep clone - everything copied including children */\n    const deep = (original) => clone$3(original, true);\n    /** Shallow clone, with a new tag */\n    const shallowAs = (original, tag) => {\n        const nu = SugarElement.fromTag(tag);\n        const attributes = clone$4(original);\n        setAll$1(nu, attributes);\n        return nu;\n    };\n    /** Change the tag name, but keep all children */\n    const mutate = (original, tag) => {\n        const nu = shallowAs(original, tag);\n        after$4(original, nu);\n        const children = children$2(original);\n        append(nu, children);\n        remove$8(original);\n        return nu;\n    };\n\n    const fromHtml = (html, scope) => {\n        const doc = scope || document;\n        const div = doc.createElement('div');\n        div.innerHTML = html;\n        return children$2(SugarElement.fromDom(div));\n    };\n    const fromDom$1 = (nodes) => map$3(nodes, SugarElement.fromDom);\n\n    const get$9 = (element) => element.dom.innerHTML;\n    const set$4 = (element, content) => {\n        const owner = owner$1(element);\n        const docDom = owner.dom;\n        // FireFox has *terrible* performance when using innerHTML = x\n        const fragment = SugarElement.fromDom(docDom.createDocumentFragment());\n        const contentElements = fromHtml(content, docDom);\n        append(fragment, contentElements);\n        empty(element);\n        append$1(element, fragment);\n    };\n    const getOuter = (element) => {\n        const container = SugarElement.fromTag('div');\n        const clone = SugarElement.fromDom(element.dom.cloneNode(true));\n        append$1(container, clone);\n        return get$9(container);\n    };\n\n    // some elements, such as mathml, don't have style attributes\n    // others, such as angular elements, have style attributes that aren't a CSSStyleDeclaration\n    const isSupported = (dom) => dom.style !== undefined && isFunction(dom.style.getPropertyValue);\n\n    // Node.contains() is very, very, very good performance\n    // http://jsperf.com/closest-vs-contains/5\n    const inBody = (element) => {\n        // Technically this is only required on IE, where contains() returns false for text nodes.\n        // But it's cheap enough to run everywhere and Sugar doesn't have platform detection (yet).\n        const dom = isText$c(element) ? element.dom.parentNode : element.dom;\n        // use ownerDocument.body to ensure this works inside iframes.\n        // Normally contains is bad because an element \"contains\" itself, but here we want that.\n        if (dom === undefined || dom === null || dom.ownerDocument === null) {\n            return false;\n        }\n        const doc = dom.ownerDocument;\n        return getShadowRoot(SugarElement.fromDom(dom)).fold(() => doc.body.contains(dom), compose1(inBody, getShadowHost));\n    };\n    const body = () => getBody(SugarElement.fromDom(document));\n    const getBody = (doc) => {\n        const b = doc.dom.body;\n        if (b === null || b === undefined) {\n            throw new Error('Body is not available yet');\n        }\n        return SugarElement.fromDom(b);\n    };\n\n    const internalSet = (dom, property, value) => {\n        // This is going to hurt. Apologies.\n        // JQuery coerces numbers to pixels for certain property names, and other times lets numbers through.\n        // we're going to be explicit; strings only.\n        if (!isString(value)) {\n            // eslint-disable-next-line no-console\n            console.error('Invalid call to CSS.set. Property ', property, ':: Value ', value, ':: Element ', dom);\n            throw new Error('CSS value must be a string: ' + value);\n        }\n        // removed: support for dom().style[property] where prop is camel case instead of normal property name\n        if (isSupported(dom)) {\n            dom.style.setProperty(property, value);\n        }\n    };\n    const internalRemove = (dom, property) => {\n        /*\n         * IE9 and above - MDN doesn't have details, but here's a couple of random internet claims\n         *\n         * http://help.dottoro.com/ljopsjck.php\n         * http://stackoverflow.com/a/7901886/7546\n         */\n        if (isSupported(dom)) {\n            dom.style.removeProperty(property);\n        }\n    };\n    const set$3 = (element, property, value) => {\n        const dom = element.dom;\n        internalSet(dom, property, value);\n    };\n    const setAll = (element, css) => {\n        const dom = element.dom;\n        each$d(css, (v, k) => {\n            internalSet(dom, k, v);\n        });\n    };\n    /*\n     * NOTE: For certain properties, this returns the \"used value\" which is subtly different to the \"computed value\" (despite calling getComputedStyle).\n     * Blame CSS 2.0.\n     *\n     * https://developer.mozilla.org/en-US/docs/Web/CSS/used_value\n     */\n    const get$8 = (element, property) => {\n        const dom = element.dom;\n        /*\n         * IE9 and above per\n         * https://developer.mozilla.org/en/docs/Web/API/window.getComputedStyle\n         *\n         * Not in numerosity, because it doesn't memoize and looking this up dynamically in performance critical code would be horrendous.\n         *\n         * JQuery has some magic here for IE popups, but we don't really need that.\n         * It also uses element.ownerDocument.defaultView to handle iframes but that hasn't been required since FF 3.6.\n         */\n        const styles = window.getComputedStyle(dom);\n        const r = styles.getPropertyValue(property);\n        // jquery-ism: If r is an empty string, check that the element is not in a document. If it isn't, return the raw value.\n        // Turns out we do this a lot.\n        return (r === '' && !inBody(element)) ? getUnsafeProperty(dom, property) : r;\n    };\n    // removed: support for dom().style[property] where prop is camel case instead of normal property name\n    // empty string is what the browsers (IE11 and Chrome) return when the propertyValue doesn't exists.\n    const getUnsafeProperty = (dom, property) => isSupported(dom) ? dom.style.getPropertyValue(property) : '';\n    /*\n     * Gets the raw value from the style attribute. Useful for retrieving \"used values\" from the DOM:\n     * https://developer.mozilla.org/en-US/docs/Web/CSS/used_value\n     *\n     * Returns NONE if the property isn't set, or the value is an empty string.\n     */\n    const getRaw$1 = (element, property) => {\n        const dom = element.dom;\n        const raw = getUnsafeProperty(dom, property);\n        return Optional.from(raw).filter((r) => r.length > 0);\n    };\n    const getAllRaw = (element) => {\n        const css = {};\n        const dom = element.dom;\n        if (isSupported(dom)) {\n            for (let i = 0; i < dom.style.length; i++) {\n                const ruleName = dom.style.item(i);\n                css[ruleName] = dom.style[ruleName];\n            }\n        }\n        return css;\n    };\n    const remove$7 = (element, property) => {\n        const dom = element.dom;\n        internalRemove(dom, property);\n        if (is$4(getOpt(element, 'style').map(trim$4), '')) {\n            // No more styles left, remove the style attribute as well\n            remove$9(element, 'style');\n        }\n    };\n    /* NOTE: This function is here for the side effect it triggers.\n    The value itself is not used.\n    Be sure to not use the return value, and that it is not removed by a minifier.\n     */\n    const reflow = (e) => e.dom.offsetWidth;\n\n    const Dimension = (name, getOffset) => {\n        const set = (element, h) => {\n            if (!isNumber(h) && !h.match(/^[0-9]+$/)) {\n                throw new Error(name + '.set accepts only positive integer values. Value was ' + h);\n            }\n            const dom = element.dom;\n            if (isSupported(dom)) {\n                dom.style[name] = h + 'px';\n            }\n        };\n        /*\n         * jQuery supports querying width and height on the document and window objects.\n         *\n         * TBIO doesn't do this, so the code is removed to save space, but left here just in case.\n         */\n        /*\n        var getDocumentWidth = (element) => {\n          var dom = element.dom;\n          if (Node.isDocument(element)) {\n            var body = dom.body;\n            var doc = dom.documentElement;\n            return Math.max(\n              body.scrollHeight,\n              doc.scrollHeight,\n              body.offsetHeight,\n              doc.offsetHeight,\n              doc.clientHeight\n            );\n          }\n        };\n      \n        var getWindowWidth = (element) => {\n          var dom = element.dom;\n          if (dom.window === dom) {\n            // There is no offsetHeight on a window, so use the clientHeight of the document\n            return dom.document.documentElement.clientHeight;\n          }\n        };\n      */\n        const get = (element) => {\n            const r = getOffset(element);\n            // zero or null means non-standard or disconnected, fall back to CSS\n            if (r <= 0 || r === null) {\n                const css = get$8(element, name);\n                // ugh this feels dirty, but it saves cycles\n                return parseFloat(css) || 0;\n            }\n            return r;\n        };\n        // in jQuery, getOuter replicates (or uses) box-sizing: border-box calculations\n        // although these calculations only seem relevant for quirks mode, and edge cases TBIO doesn't rely on\n        const getOuter = get;\n        const aggregate = (element, properties) => foldl(properties, (acc, property) => {\n            const val = get$8(element, property);\n            const value = val === undefined ? 0 : parseInt(val, 10);\n            return isNaN(value) ? acc : acc + value;\n        }, 0);\n        const max = (element, value, properties) => {\n            const cumulativeInclusions = aggregate(element, properties);\n            // if max-height is 100px and your cumulativeInclusions is 150px, there is no way max-height can be 100px, so we return 0.\n            const absoluteMax = value > cumulativeInclusions ? value - cumulativeInclusions : 0;\n            return absoluteMax;\n        };\n        return {\n            set,\n            get,\n            getOuter,\n            aggregate,\n            max\n        };\n    };\n\n    const api$1 = Dimension('height', (element) => {\n        // getBoundingClientRect gives better results than offsetHeight for tables with captions on Firefox\n        const dom = element.dom;\n        return inBody(element) ? dom.getBoundingClientRect().height : dom.offsetHeight;\n    });\n    const get$7 = (element) => api$1.get(element);\n\n    const r = (left, top) => {\n        const translate = (x, y) => r(left + x, top + y);\n        return {\n            left,\n            top,\n            translate\n        };\n    };\n    // tslint:disable-next-line:variable-name\n    const SugarPosition = r;\n\n    const boxPosition = (dom) => {\n        const box = dom.getBoundingClientRect();\n        return SugarPosition(box.left, box.top);\n    };\n    // Avoids falsy false fallthrough\n    const firstDefinedOrZero = (a, b) => {\n        if (a !== undefined) {\n            return a;\n        }\n        else {\n            return b !== undefined ? b : 0;\n        }\n    };\n    const absolute = (element) => {\n        const doc = element.dom.ownerDocument;\n        const body = doc.body;\n        const win = doc.defaultView;\n        const html = doc.documentElement;\n        if (body === element.dom) {\n            return SugarPosition(body.offsetLeft, body.offsetTop);\n        }\n        const scrollTop = firstDefinedOrZero(win?.pageYOffset, html.scrollTop);\n        const scrollLeft = firstDefinedOrZero(win?.pageXOffset, html.scrollLeft);\n        const clientTop = firstDefinedOrZero(html.clientTop, body.clientTop);\n        const clientLeft = firstDefinedOrZero(html.clientLeft, body.clientLeft);\n        return viewport(element).translate(scrollLeft - clientLeft, scrollTop - clientTop);\n    };\n    const viewport = (element) => {\n        const dom = element.dom;\n        const doc = dom.ownerDocument;\n        const body = doc.body;\n        if (body === dom) {\n            return SugarPosition(body.offsetLeft, body.offsetTop);\n        }\n        if (!inBody(element)) {\n            return SugarPosition(0, 0);\n        }\n        return boxPosition(dom);\n    };\n\n    // get scroll position (x,y) relative to document _doc (or global if not supplied)\n    const get$6 = (_DOC) => {\n        const doc = _DOC !== undefined ? _DOC.dom : document;\n        // ASSUMPTION: This is for cross-browser support, body works for Safari & EDGE, and when we have an iframe body scroller\n        const x = doc.body.scrollLeft || doc.documentElement.scrollLeft;\n        const y = doc.body.scrollTop || doc.documentElement.scrollTop;\n        return SugarPosition(x, y);\n    };\n    // Scroll content to (x,y) relative to document _doc (or global if not supplied)\n    const to = (x, y, _DOC) => {\n        const doc = _DOC !== undefined ? _DOC.dom : document;\n        const win = doc.defaultView;\n        if (win) {\n            win.scrollTo(x, y);\n        }\n    };\n    // TBIO-4472 Safari 10 - Scrolling typeahead with keyboard scrolls page\n    const intoView = (element, alignToTop) => {\n        const isSafari = detect$1().browser.isSafari();\n        // this method isn't in TypeScript\n        if (isSafari && isFunction(element.dom.scrollIntoViewIfNeeded)) {\n            element.dom.scrollIntoViewIfNeeded(false); // false=align to nearest edge\n        }\n        else {\n            element.dom.scrollIntoView(alignToTop); // true=to top, false=to bottom\n        }\n    };\n\n    const NodeValue = (is, name) => {\n        const get = (element) => {\n            if (!is(element)) {\n                throw new Error('Can only get ' + name + ' value of a ' + name + ' node');\n            }\n            return getOption(element).getOr('');\n        };\n        const getOption = (element) => is(element) ? Optional.from(element.dom.nodeValue) : Optional.none();\n        const set = (element, value) => {\n            if (!is(element)) {\n                throw new Error('Can only set raw ' + name + ' value of a ' + name + ' node');\n            }\n            element.dom.nodeValue = value;\n        };\n        return {\n            get,\n            getOption,\n            set\n        };\n    };\n\n    const fromElements = (elements, scope) => {\n        const doc = scope || document;\n        const fragment = doc.createDocumentFragment();\n        each$e(elements, (element) => {\n            fragment.appendChild(element.dom);\n        });\n        return SugarElement.fromDom(fragment);\n    };\n\n    const api = NodeValue(isText$c, 'text');\n    const get$5 = (element) => api.get(element);\n    const getOption = (element) => api.getOption(element);\n    const set$2 = (element, value) => api.set(element, value);\n\n    // Methods for handling attributes that contain a list of values <div foo=\"alpha beta theta\">\n    const read$4 = (element, attr) => {\n        const value = get$a(element, attr);\n        return value === undefined || value === '' ? [] : value.split(' ');\n    };\n    const add$4 = (element, attr, id) => {\n        const old = read$4(element, attr);\n        const nu = old.concat([id]);\n        set$5(element, attr, nu.join(' '));\n        return true;\n    };\n    const remove$6 = (element, attr, id) => {\n        const nu = filter$5(read$4(element, attr), (v) => v !== id);\n        if (nu.length > 0) {\n            set$5(element, attr, nu.join(' '));\n        }\n        else {\n            remove$9(element, attr);\n        }\n        return false;\n    };\n\n    var ClosestOrAncestor = (is, ancestor, scope, a, isRoot) => {\n        if (is(scope, a)) {\n            return Optional.some(scope);\n        }\n        else if (isFunction(isRoot) && isRoot(scope)) {\n            return Optional.none();\n        }\n        else {\n            return ancestor(scope, a, isRoot);\n        }\n    };\n\n    const ancestor$5 = (scope, predicate, isRoot) => {\n        let element = scope.dom;\n        const stop = isFunction(isRoot) ? isRoot : never;\n        while (element.parentNode) {\n            element = element.parentNode;\n            const el = SugarElement.fromDom(element);\n            if (predicate(el)) {\n                return Optional.some(el);\n            }\n            else if (stop(el)) {\n                break;\n            }\n        }\n        return Optional.none();\n    };\n    const closest$5 = (scope, predicate, isRoot) => {\n        // This is required to avoid ClosestOrAncestor passing the predicate to itself\n        const is = (s, test) => test(s);\n        return ClosestOrAncestor(is, ancestor$5, scope, predicate, isRoot);\n    };\n    const sibling$1 = (scope, predicate) => {\n        const element = scope.dom;\n        if (!element.parentNode) {\n            return Optional.none();\n        }\n        return child(SugarElement.fromDom(element.parentNode), (x) => !eq(scope, x) && predicate(x));\n    };\n    const child = (scope, predicate) => {\n        const pred = (node) => predicate(SugarElement.fromDom(node));\n        const result = find$2(scope.dom.childNodes, pred);\n        return result.map(SugarElement.fromDom);\n    };\n    const descendant$2 = (scope, predicate) => {\n        const descend = (node) => {\n            // tslint:disable-next-line:prefer-for-of\n            for (let i = 0; i < node.childNodes.length; i++) {\n                const child = SugarElement.fromDom(node.childNodes[i]);\n                if (predicate(child)) {\n                    return Optional.some(child);\n                }\n                const res = descend(node.childNodes[i]);\n                if (res.isSome()) {\n                    return res;\n                }\n            }\n            return Optional.none();\n        };\n        return descend(scope.dom);\n    };\n\n    const ancestor$4 = (scope, selector, isRoot) => ancestor$5(scope, (e) => is$2(e, selector), isRoot);\n    const descendant$1 = (scope, selector) => one(selector, scope);\n    // Returns Some(closest ancestor element (sugared)) matching 'selector' up to isRoot, or None() otherwise\n    const closest$4 = (scope, selector, isRoot) => {\n        const is = (element, selector) => is$2(element, selector);\n        return ClosestOrAncestor(is, ancestor$4, scope, selector, isRoot);\n    };\n\n    // IE11 Can return undefined for a classList on elements such as math, so we make sure it's not undefined before attempting to use it.\n    const supports = (element) => element.dom.classList !== undefined;\n    const get$4 = (element) => read$4(element, 'class');\n    const add$3 = (element, clazz) => add$4(element, 'class', clazz);\n    const remove$5 = (element, clazz) => remove$6(element, 'class', clazz);\n    const toggle$2 = (element, clazz) => {\n        if (contains$2(get$4(element), clazz)) {\n            return remove$5(element, clazz);\n        }\n        else {\n            return add$3(element, clazz);\n        }\n    };\n\n    /*\n     * ClassList is IE10 minimum:\n     * https://developer.mozilla.org/en-US/docs/Web/API/Element.classList\n     *\n     * Note that IE doesn't support the second argument to toggle (at all).\n     * If it did, the toggler could be better.\n     */\n    const add$2 = (element, clazz) => {\n        if (supports(element)) {\n            element.dom.classList.add(clazz);\n        }\n        else {\n            add$3(element, clazz);\n        }\n    };\n    const cleanClass = (element) => {\n        const classList = supports(element) ? element.dom.classList : get$4(element);\n        // classList is a \"live list\", so this is up to date already\n        if (classList.length === 0) {\n            // No more classes left, remove the class attribute as well\n            remove$9(element, 'class');\n        }\n    };\n    const remove$4 = (element, clazz) => {\n        if (supports(element)) {\n            const classList = element.dom.classList;\n            classList.remove(clazz);\n        }\n        else {\n            remove$5(element, clazz);\n        }\n        cleanClass(element);\n    };\n    const toggle$1 = (element, clazz) => {\n        const result = supports(element) ? element.dom.classList.toggle(clazz) : toggle$2(element, clazz);\n        cleanClass(element);\n        return result;\n    };\n    const has = (element, clazz) => supports(element) && element.dom.classList.contains(clazz);\n\n    /*\n     * ClassList is IE10 minimum:\n     * https://developer.mozilla.org/en-US/docs/Web/API/Element.classList\n     */\n    const add$1 = (element, classes) => {\n        each$e(classes, (x) => {\n            add$2(element, x);\n        });\n    };\n    const remove$3 = (element, classes) => {\n        each$e(classes, (x) => {\n            remove$4(element, x);\n        });\n    };\n\n    const closest$3 = (target) => closest$4(target, '[contenteditable]');\n    const isEditable$2 = (element, assumeEditable = false) => {\n        if (inBody(element)) {\n            return element.dom.isContentEditable;\n        }\n        else {\n            // Find the closest contenteditable element and check if it's editable\n            return closest$3(element).fold(constant(assumeEditable), (editable) => getRaw(editable) === 'true');\n        }\n    };\n    const getRaw = (element) => element.dom.contentEditable;\n    const set$1 = (element, editable) => {\n        element.dom.contentEditable = editable ? 'true' : 'false';\n    };\n\n    const get$3 = (element) => element.dom.textContent;\n    const set = (element, value) => {\n        element.dom.textContent = value;\n    };\n\n    const ancestors$1 = (scope, predicate, isRoot) => filter$5(parents$1(scope, isRoot), predicate);\n    const children$1 = (scope, predicate) => filter$5(children$2(scope), predicate);\n    const descendants$1 = (scope, predicate) => {\n        let result = [];\n        // Recurse.toArray() might help here\n        each$e(children$2(scope), (x) => {\n            if (predicate(x)) {\n                result = result.concat([x]);\n            }\n            result = result.concat(descendants$1(x, predicate));\n        });\n        return result;\n    };\n\n    // For all of the following:\n    //\n    // jQuery does siblings of firstChild. IE9+ supports scope.dom.children (similar to Traverse.children but elements only).\n    // Traverse should also do this (but probably not by default).\n    //\n    const ancestors = (scope, selector, isRoot) => \n    // It may surprise you to learn this is exactly what JQuery does\n    // TODO: Avoid all this wrapping and unwrapping\n    ancestors$1(scope, (e) => is$2(e, selector), isRoot);\n    const children = (scope, selector) => \n    // It may surprise you to learn this is exactly what JQuery does\n    // TODO: Avoid all the wrapping and unwrapping\n    children$1(scope, (e) => is$2(e, selector));\n    const descendants = (scope, selector) => all(selector, scope);\n\n    const ancestor$3 = (scope, predicate, isRoot) => ancestor$5(scope, predicate, isRoot).isSome();\n    const sibling = (scope, predicate) => sibling$1(scope, predicate).isSome();\n    const descendant = (scope, predicate) => descendant$2(scope, predicate).isSome();\n\n    const ancestor$2 = (element, target) => ancestor$3(element, curry(eq, target));\n\n    const ancestor$1 = (scope, selector, isRoot) => ancestor$4(scope, selector, isRoot).isSome();\n    const closest$2 = (scope, selector, isRoot) => closest$4(scope, selector, isRoot).isSome();\n\n    const ensureIsRoot = (isRoot) => isFunction(isRoot) ? isRoot : never;\n    const ancestor = (scope, transform, isRoot) => {\n        let element = scope.dom;\n        const stop = ensureIsRoot(isRoot);\n        while (element.parentNode) {\n            element = element.parentNode;\n            const el = SugarElement.fromDom(element);\n            const transformed = transform(el);\n            if (transformed.isSome()) {\n                return transformed;\n            }\n            else if (stop(el)) {\n                break;\n            }\n        }\n        return Optional.none();\n    };\n    const closest$1 = (scope, transform, isRoot) => {\n        const current = transform(scope);\n        const stop = ensureIsRoot(isRoot);\n        return current.orThunk(() => stop(scope) ? Optional.none() : ancestor(scope, transform, stop));\n    };\n\n    const isTextNodeWithCursorPosition = (el) => getOption(el).filter((text) => \n    // For the purposes of finding cursor positions only allow text nodes with content,\n    // but trim removes &nbsp; and that's allowed\n    text.trim().length !== 0 || text.indexOf(nbsp) > -1).isSome();\n    const isContentEditableFalse$b = (elem) => isHTMLElement$1(elem) && (get$a(elem, 'contenteditable') === 'false');\n    const elementsWithCursorPosition = ['img', 'br'];\n    const isCursorPosition = (elem) => {\n        const hasCursorPosition = isTextNodeWithCursorPosition(elem);\n        return hasCursorPosition || contains$2(elementsWithCursorPosition, name(elem)) || isContentEditableFalse$b(elem);\n    };\n\n    const first = (element) => descendant$2(element, isCursorPosition);\n\n    const create$c = (start, soffset, finish, foffset) => ({\n        start,\n        soffset,\n        finish,\n        foffset\n    });\n    // tslint:disable-next-line:variable-name\n    const SimRange = {\n        create: create$c\n    };\n\n    const adt$2 = Adt.generate([\n        { before: ['element'] },\n        { on: ['element', 'offset'] },\n        { after: ['element'] }\n    ]);\n    // Probably don't need this given that we now have \"match\"\n    const cata = (subject, onBefore, onOn, onAfter) => subject.fold(onBefore, onOn, onAfter);\n    const getStart$2 = (situ) => situ.fold(identity, identity, identity);\n    const before$2 = adt$2.before;\n    const on = adt$2.on;\n    const after$2 = adt$2.after;\n    // tslint:disable-next-line:variable-name\n    const Situ = {\n        before: before$2,\n        on,\n        after: after$2,\n        cata,\n        getStart: getStart$2\n    };\n\n    // Consider adding a type for \"element\"\n    const adt$1 = Adt.generate([\n        { domRange: ['rng'] },\n        { relative: ['startSitu', 'finishSitu'] },\n        { exact: ['start', 'soffset', 'finish', 'foffset'] }\n    ]);\n    const exactFromRange = (simRange) => adt$1.exact(simRange.start, simRange.soffset, simRange.finish, simRange.foffset);\n    const getStart$1 = (selection) => selection.match({\n        domRange: (rng) => SugarElement.fromDom(rng.startContainer),\n        relative: (startSitu, _finishSitu) => Situ.getStart(startSitu),\n        exact: (start, _soffset, _finish, _foffset) => start\n    });\n    const domRange = adt$1.domRange;\n    const relative = adt$1.relative;\n    const exact = adt$1.exact;\n    const getWin = (selection) => {\n        const start = getStart$1(selection);\n        return defaultView(start);\n    };\n    // This is out of place but it's API so I can't remove it\n    const range = SimRange.create;\n    // tslint:disable-next-line:variable-name\n    const SimSelection = {\n        domRange,\n        relative,\n        exact,\n        exactFromRange,\n        getWin,\n        range\n    };\n\n    const caretPositionFromPoint = (doc, x, y) => Optional.from(doc.caretPositionFromPoint?.(x, y))\n        .bind((pos) => {\n        // It turns out that Firefox can return null for pos.offsetNode\n        if (pos.offsetNode === null) {\n            return Optional.none();\n        }\n        const r = doc.createRange();\n        r.setStart(pos.offsetNode, pos.offset);\n        r.collapse();\n        return Optional.some(r);\n    });\n    const caretRangeFromPoint = (doc, x, y) => Optional.from(doc.caretRangeFromPoint?.(x, y));\n    const availableSearch = (doc, x, y) => {\n        if (doc.caretPositionFromPoint) {\n            return caretPositionFromPoint(doc, x, y); // defined standard, firefox only\n        }\n        else if (doc.caretRangeFromPoint) {\n            return caretRangeFromPoint(doc, x, y); // webkit/blink implementation\n        }\n        else {\n            return Optional.none(); // unsupported browser\n        }\n    };\n    const fromPoint$1 = (win, x, y) => {\n        const doc = win.document;\n        return availableSearch(doc, x, y).map((rng) => SimRange.create(SugarElement.fromDom(rng.startContainer), rng.startOffset, SugarElement.fromDom(rng.endContainer), rng.endOffset));\n    };\n\n    const beforeSpecial = (element, offset) => {\n        // From memory, we don't want to use <br> directly on Firefox because it locks the keyboard input.\n        // It turns out that <img> directly on IE locks the keyboard as well.\n        // If the offset is 0, use before. If the offset is 1, use after.\n        // TBIO-3889: Firefox Situ.on <input> results in a child of the <input>; Situ.before <input> results in platform inconsistencies\n        const name$1 = name(element);\n        if ('input' === name$1) {\n            return Situ.after(element);\n        }\n        else if (!contains$2(['br', 'img'], name$1)) {\n            return Situ.on(element, offset);\n        }\n        else {\n            return offset === 0 ? Situ.before(element) : Situ.after(element);\n        }\n    };\n    const preprocessRelative = (startSitu, finishSitu) => {\n        const start = startSitu.fold(Situ.before, beforeSpecial, Situ.after);\n        const finish = finishSitu.fold(Situ.before, beforeSpecial, Situ.after);\n        return SimSelection.relative(start, finish);\n    };\n    const preprocessExact = (start, soffset, finish, foffset) => {\n        const startSitu = beforeSpecial(start, soffset);\n        const finishSitu = beforeSpecial(finish, foffset);\n        return SimSelection.relative(startSitu, finishSitu);\n    };\n    const preprocess = (selection) => selection.match({\n        domRange: (rng) => {\n            const start = SugarElement.fromDom(rng.startContainer);\n            const finish = SugarElement.fromDom(rng.endContainer);\n            return preprocessExact(start, rng.startOffset, finish, rng.endOffset);\n        },\n        relative: preprocessRelative,\n        exact: preprocessExact\n    });\n\n    const toNative = (selection) => {\n        const win = SimSelection.getWin(selection).dom;\n        const getDomRange = (start, soffset, finish, foffset) => exactToNative(win, start, soffset, finish, foffset);\n        const filtered = preprocess(selection);\n        return diagnose(win, filtered).match({\n            ltr: getDomRange,\n            rtl: getDomRange\n        });\n    };\n    const getAtPoint = (win, x, y) => fromPoint$1(win, x, y);\n\n    const getImageSize = (url) => new Promise((resolve, reject) => {\n        const img = document.createElement('img');\n        img.addEventListener('load', () => {\n            resolve({\n                width: img.naturalWidth,\n                height: img.naturalHeight\n            });\n        });\n        img.addEventListener('error', () => {\n            reject(`Failed to get image dimensions for: ${url}`);\n        });\n        img.src = url;\n    });\n\n    const get$2 = (_win) => {\n        const win = _win === undefined ? window : _win;\n        if (detect$1().browser.isFirefox()) {\n            // TINY-7984: Firefox 91 is returning incorrect values for visualViewport.pageTop, so disable it for now\n            return Optional.none();\n        }\n        else {\n            return Optional.from(win.visualViewport);\n        }\n    };\n    const bounds = (x, y, width, height) => ({\n        x,\n        y,\n        width,\n        height,\n        right: x + width,\n        bottom: y + height\n    });\n    const getBounds = (_win) => {\n        const win = _win === undefined ? window : _win;\n        const doc = win.document;\n        const scroll = get$6(SugarElement.fromDom(doc));\n        return get$2(win).fold(() => {\n            const html = win.document.documentElement;\n            // Don't use window.innerWidth/innerHeight here, as we don't want to include scrollbars\n            // since the right/bottom position is based on the edge of the scrollbar not the window\n            const width = html.clientWidth;\n            const height = html.clientHeight;\n            return bounds(scroll.left, scroll.top, width, height);\n        }, (visualViewport) => \n        // iOS doesn't update the pageTop/pageLeft when element.scrollIntoView() is called, so we need to fallback to the\n        // scroll position which will always be less than the page top/left values when page top/left are accurate/correct.\n        bounds(Math.max(visualViewport.pageLeft, scroll.left), Math.max(visualViewport.pageTop, scroll.top), visualViewport.width, visualViewport.height));\n    };\n\n    /**\n     * TreeWalker class enables you to walk the DOM in a linear manner.\n     *\n     * @class tinymce.dom.TreeWalker\n     * @example\n     * const walker = new tinymce.dom.TreeWalker(startNode);\n     *\n     * do {\n     *   console.log(walker.current());\n     * } while (walker.next());\n     */\n    class DomTreeWalker {\n        rootNode;\n        node;\n        constructor(startNode, rootNode) {\n            this.node = startNode;\n            this.rootNode = rootNode;\n            // This is a bit hacky but needed to ensure the 'this' variable\n            // always references the instance and not the caller scope\n            this.current = this.current.bind(this);\n            this.next = this.next.bind(this);\n            this.prev = this.prev.bind(this);\n            this.prev2 = this.prev2.bind(this);\n        }\n        /**\n         * Returns the current node.\n         *\n         * @method current\n         * @return {Node/undefined} Current node where the walker is, or undefined if the walker has reached the end.\n         */\n        current() {\n            return this.node;\n        }\n        /**\n         * Walks to the next node in tree.\n         *\n         * @method next\n         * @return {Node/undefined} Current node where the walker is after moving to the next node, or undefined if the walker has reached the end.\n         */\n        next(shallow) {\n            this.node = this.findSibling(this.node, 'firstChild', 'nextSibling', shallow);\n            return this.node;\n        }\n        /**\n         * Walks to the previous node in tree.\n         *\n         * @method prev\n         * @return {Node/undefined} Current node where the walker is after moving to the previous node, or undefined if the walker has reached the end.\n         */\n        prev(shallow) {\n            this.node = this.findSibling(this.node, 'lastChild', 'previousSibling', shallow);\n            return this.node;\n        }\n        prev2(shallow) {\n            this.node = this.findPreviousNode(this.node, shallow);\n            return this.node;\n        }\n        findSibling(node, startName, siblingName, shallow) {\n            if (node) {\n                // Walk into nodes if it has a start\n                if (!shallow && node[startName]) {\n                    return node[startName];\n                }\n                // Return the sibling if it has one\n                if (node !== this.rootNode) {\n                    let sibling = node[siblingName];\n                    if (sibling) {\n                        return sibling;\n                    }\n                    // Walk up the parents to look for siblings\n                    for (let parent = node.parentNode; parent && parent !== this.rootNode; parent = parent.parentNode) {\n                        sibling = parent[siblingName];\n                        if (sibling) {\n                            return sibling;\n                        }\n                    }\n                }\n            }\n            return undefined;\n        }\n        findPreviousNode(node, shallow) {\n            if (node) {\n                const sibling = node.previousSibling;\n                if (this.rootNode && sibling === this.rootNode) {\n                    return;\n                }\n                if (sibling) {\n                    if (!shallow) {\n                        // Walk down to the most distant child\n                        for (let child = sibling.lastChild; child; child = child.lastChild) {\n                            if (!child.lastChild) {\n                                return child;\n                            }\n                        }\n                    }\n                    return sibling;\n                }\n                const parent = node.parentNode;\n                if (parent && parent !== this.rootNode) {\n                    return parent;\n                }\n            }\n            return undefined;\n        }\n    }\n\n    const isNodeType = (type) => {\n        return (node) => {\n            return !!node && node.nodeType === type;\n        };\n    };\n    // Firefox can allow you to get a selection on a restricted node, such as file/number inputs. These nodes\n    // won't implement the Object prototype, so Object.getPrototypeOf() will return null or something similar.\n    const isRestrictedNode = (node) => !!node && !Object.getPrototypeOf(node);\n    const isElement$7 = isNodeType(1);\n    const isHTMLElement = (node) => isElement$7(node) && isHTMLElement$1(SugarElement.fromDom(node));\n    const isSVGElement = (node) => isElement$7(node) && node.namespaceURI === 'http://www.w3.org/2000/svg';\n    const matchNodeName$1 = (name) => {\n        const lowerCasedName = name.toLowerCase();\n        return (node) => isNonNullable(node) && node.nodeName.toLowerCase() === lowerCasedName;\n    };\n    const matchNodeNames$1 = (names) => {\n        const lowerCasedNames = names.map((s) => s.toLowerCase());\n        return (node) => {\n            if (node && node.nodeName) {\n                const nodeName = node.nodeName.toLowerCase();\n                return contains$2(lowerCasedNames, nodeName);\n            }\n            return false;\n        };\n    };\n    const matchStyleValues = (name, values) => {\n        const items = values.toLowerCase().split(' ');\n        return (node) => {\n            if (isElement$7(node)) {\n                const win = node.ownerDocument.defaultView;\n                if (win) {\n                    for (let i = 0; i < items.length; i++) {\n                        const computed = win.getComputedStyle(node, null);\n                        const cssValue = computed ? computed.getPropertyValue(name) : null;\n                        if (cssValue === items[i]) {\n                            return true;\n                        }\n                    }\n                }\n            }\n            return false;\n        };\n    };\n    const hasAttribute = (attrName) => {\n        return (node) => {\n            return isElement$7(node) && node.hasAttribute(attrName);\n        };\n    };\n    const isBogus$1 = (node) => isElement$7(node) && node.hasAttribute('data-mce-bogus');\n    const isBogusAll = (node) => isElement$7(node) && node.getAttribute('data-mce-bogus') === 'all';\n    const isTable$2 = (node) => isElement$7(node) && node.tagName === 'TABLE';\n    const hasContentEditableState = (value) => {\n        return (node) => {\n            if (isHTMLElement(node)) {\n                if (node.contentEditable === value) {\n                    return true;\n                }\n                if (node.getAttribute('data-mce-contenteditable') === value) {\n                    return true;\n                }\n            }\n            return false;\n        };\n    };\n    const isTextareaOrInput = matchNodeNames$1(['textarea', 'input']);\n    const isText$b = isNodeType(3);\n    const isCData = isNodeType(4);\n    const isPi = isNodeType(7);\n    const isComment = isNodeType(8);\n    const isDocument$1 = isNodeType(9);\n    const isDocumentFragment = isNodeType(11);\n    const isBr$7 = matchNodeName$1('br');\n    const isImg = matchNodeName$1('img');\n    const isAnchor = matchNodeName$1('a');\n    const isContentEditableTrue$3 = hasContentEditableState('true');\n    const isContentEditableFalse$a = hasContentEditableState('false');\n    const isEditingHost = (node) => isHTMLElement(node) && node.isContentEditable && isNonNullable(node.parentElement) && !node.parentElement.isContentEditable;\n    const isTableCell$3 = matchNodeNames$1(['td', 'th']);\n    const isTableCellOrCaption = matchNodeNames$1(['td', 'th', 'caption']);\n    const isTemplate = matchNodeName$1('template');\n    const isMedia$2 = matchNodeNames$1(['video', 'audio', 'object', 'embed']);\n    const isListItem$3 = matchNodeName$1('li');\n    const isDetails = matchNodeName$1('details');\n    const isSummary$1 = matchNodeName$1('summary');\n    const ucVideoNodeName = 'uc-video';\n    const isUcVideo = matchNodeName$1(ucVideoNodeName);\n\n    const whiteSpaceRegExp = /^[ \\t\\r\\n]*$/;\n    const isWhitespaceText = (text) => whiteSpaceRegExp.test(text);\n    const isZwsp$1 = (text) => {\n        for (const c of text) {\n            if (!isZwsp$2(c)) {\n                return false;\n            }\n        }\n        return true;\n    };\n    // Don't compare other unicode spaces here, as we're only concerned about whitespace the browser would collapse\n    const isCollapsibleWhitespace$1 = (c) => ' \\f\\t\\v'.indexOf(c) !== -1;\n    const isNewLineChar = (c) => c === '\\n' || c === '\\r';\n    const isNewline = (text, idx) => (idx < text.length && idx >= 0) ? isNewLineChar(text[idx]) : false;\n    // Converts duplicate whitespace to alternating space/nbsps and tabs to spaces\n    const normalize$4 = (text, tabSpaces = 4, isStartOfContent = true, isEndOfContent = true) => {\n        // Replace tabs with a variable amount of spaces\n        // Note: We don't use an actual tab character here, as it only works when in a \"whitespace: pre\" element,\n        // which will cause other issues, such as trying to type the content will also be treated as being in a pre.\n        const tabSpace = repeat(' ', tabSpaces);\n        const normalizedText = text.replace(/\\t/g, tabSpace);\n        const result = foldl(normalizedText, (acc, c) => {\n            // Are we dealing with a char other than some collapsible whitespace or nbsp? if so then just use it as is\n            if (isCollapsibleWhitespace$1(c) || c === nbsp) {\n                // If the previous char is a space, we are at the start or end, or if the next char is a new line char, then we need\n                // to convert the space to a nbsp\n                if (acc.pcIsSpace || (acc.str === '' && isStartOfContent) || (acc.str.length === normalizedText.length - 1 && isEndOfContent) || isNewline(normalizedText, acc.str.length + 1)) {\n                    return { pcIsSpace: false, str: acc.str + nbsp };\n                }\n                else {\n                    return { pcIsSpace: true, str: acc.str + ' ' };\n                }\n            }\n            else {\n                // Treat newlines as being a space, since we'll need to convert any leading spaces to nsbps\n                return { pcIsSpace: isNewLineChar(c), str: acc.str + c };\n            }\n        }, { pcIsSpace: false, str: '' });\n        return result.str;\n    };\n\n    const defaultOptionValues = {\n        skipBogus: true,\n        includeZwsp: false,\n        checkRootAsContent: false,\n    };\n    const hasWhitespacePreserveParent = (node, rootNode, schema) => {\n        const rootElement = SugarElement.fromDom(rootNode);\n        const startNode = SugarElement.fromDom(node);\n        const whitespaceElements = schema.getWhitespaceElements();\n        const predicate = (node) => has$2(whitespaceElements, name(node));\n        return ancestor$3(startNode, predicate, curry(eq, rootElement));\n    };\n    const isNamedAnchor = (node) => {\n        return isElement$7(node) && node.nodeName === 'A' && !node.hasAttribute('href') && (node.hasAttribute('name') || node.hasAttribute('id'));\n    };\n    const isNonEmptyElement$1 = (node, schema) => {\n        return isElement$7(node) && has$2(schema.getNonEmptyElements(), node.nodeName);\n    };\n    const isBookmark = hasAttribute('data-mce-bookmark');\n    const hasNonEditableParent = (node) => parentElement(SugarElement.fromDom(node)).exists((parent) => !isEditable$2(parent));\n    const isWhitespace$1 = (node, rootNode, schema) => isWhitespaceText(node.data)\n        && !hasWhitespacePreserveParent(node, rootNode, schema);\n    const isText$a = (node, rootNode, schema, options) => isText$b(node)\n        && !isWhitespace$1(node, rootNode, schema)\n        && (!options.includeZwsp || !isZwsp$1(node.data));\n    const isContentNode = (schema, node, rootNode, options) => {\n        return isFunction(options.isContent) && options.isContent(node)\n            || isNonEmptyElement$1(node, schema)\n            || isBookmark(node)\n            || isNamedAnchor(node)\n            || isText$a(node, rootNode, schema, options)\n            || isContentEditableFalse$a(node)\n            || isContentEditableTrue$3(node) && hasNonEditableParent(node);\n    };\n    const isEmptyNode = (schema, targetNode, opts) => {\n        const options = { ...defaultOptionValues, ...opts };\n        if (options.checkRootAsContent) {\n            if (isContentNode(schema, targetNode, targetNode, options)) {\n                return false;\n            }\n        }\n        let node = targetNode.firstChild;\n        let brCount = 0;\n        if (!node) {\n            return true;\n        }\n        const walker = new DomTreeWalker(node, targetNode);\n        do {\n            if (options.skipBogus && isElement$7(node)) {\n                const bogusValue = node.getAttribute('data-mce-bogus');\n                if (bogusValue) {\n                    node = walker.next(bogusValue === 'all');\n                    continue;\n                }\n            }\n            if (isComment(node)) {\n                node = walker.next(true);\n                continue;\n            }\n            if (isBr$7(node)) {\n                brCount++;\n                node = walker.next();\n                continue;\n            }\n            if (isContentNode(schema, node, targetNode, options)) {\n                return false;\n            }\n            node = walker.next();\n        } while (node);\n        return brCount <= 1;\n    };\n    const isEmpty$4 = (schema, elm, options) => {\n        return isEmptyNode(schema, elm.dom, { checkRootAsContent: true, ...options });\n    };\n    const isContent$1 = (schema, node, options) => {\n        return isContentNode(schema, node, node, { includeZwsp: defaultOptionValues.includeZwsp, ...options });\n    };\n\n    const nodeNameToNamespaceType = (name) => {\n        const lowerCaseName = name.toLowerCase();\n        if (lowerCaseName === 'svg') {\n            return 'svg';\n        }\n        else if (lowerCaseName === 'math') {\n            return 'math';\n        }\n        else {\n            return 'html';\n        }\n    };\n    const isNonHtmlElementRootName = (name) => nodeNameToNamespaceType(name) !== 'html';\n    const isNonHtmlElementRoot = (node) => isNonHtmlElementRootName(node.nodeName);\n    const toScopeType = (node) => nodeNameToNamespaceType(node.nodeName);\n    const namespaceElements = ['svg', 'math'];\n    const createNamespaceTracker = () => {\n        const currentScope = value$1();\n        const current = () => currentScope.get().map(toScopeType).getOr('html');\n        const track = (node) => {\n            if (isNonHtmlElementRoot(node)) {\n                currentScope.set(node);\n            }\n            else if (currentScope.get().exists((scopeNode) => !scopeNode.contains(node))) {\n                currentScope.clear();\n            }\n            return current();\n        };\n        const reset = () => {\n            currentScope.clear();\n        };\n        return {\n            track,\n            current,\n            reset\n        };\n    };\n\n    const transparentBlockAttr = 'data-mce-block';\n    // Returns the lowercase element names form a SchemaMap by excluding anyone that has uppercase letters.\n    // This method is to avoid having to specify all possible valid characters other than lowercase a-z such as '-' or ':' etc.\n    const elementNames = (map) => filter$5(keys(map), (key) => !/[A-Z]/.test(key));\n    const makeSelectorFromSchemaMap = (map) => map$3(elementNames(map), (name) => {\n        // Exclude namespace elements from processing\n        const escapedName = CSS.escape(name);\n        return `${escapedName}:` + map$3(namespaceElements, (ns) => `not(${ns} ${escapedName})`).join(':');\n    }).join(',');\n    const updateTransparent = (blocksSelector, transparent) => {\n        if (isNonNullable(transparent.querySelector(blocksSelector))) {\n            transparent.setAttribute(transparentBlockAttr, 'true');\n            if (transparent.getAttribute('data-mce-selected') === 'inline-boundary') {\n                transparent.removeAttribute('data-mce-selected');\n            }\n            return true;\n        }\n        else {\n            transparent.removeAttribute(transparentBlockAttr);\n            return false;\n        }\n    };\n    const updateBlockStateOnChildren = (schema, scope) => {\n        const transparentSelector = makeSelectorFromSchemaMap(schema.getTransparentElements());\n        const blocksSelector = makeSelectorFromSchemaMap(schema.getBlockElements());\n        return filter$5(scope.querySelectorAll(transparentSelector), (transparent) => updateTransparent(blocksSelector, transparent));\n    };\n    const trimEdge = (schema, el, leftSide) => {\n        const childPropertyName = leftSide ? 'lastChild' : 'firstChild';\n        for (let child = el[childPropertyName]; child; child = child[childPropertyName]) {\n            if (isEmptyNode(schema, child, { checkRootAsContent: true })) {\n                child.parentNode?.removeChild(child);\n                return;\n            }\n        }\n    };\n    const split$2 = (schema, parentElm, splitElm) => {\n        const range = document.createRange();\n        const parentNode = parentElm.parentNode;\n        if (parentNode) {\n            range.setStartBefore(parentElm);\n            range.setEndBefore(splitElm);\n            const beforeFragment = range.extractContents();\n            trimEdge(schema, beforeFragment, true);\n            range.setStartAfter(splitElm);\n            range.setEndAfter(parentElm);\n            const afterFragment = range.extractContents();\n            trimEdge(schema, afterFragment, false);\n            if (!isEmptyNode(schema, beforeFragment, { checkRootAsContent: true })) {\n                parentNode.insertBefore(beforeFragment, parentElm);\n            }\n            if (!isEmptyNode(schema, splitElm, { checkRootAsContent: true })) {\n                parentNode.insertBefore(splitElm, parentElm);\n            }\n            if (!isEmptyNode(schema, afterFragment, { checkRootAsContent: true })) {\n                parentNode.insertBefore(afterFragment, parentElm);\n            }\n            parentNode.removeChild(parentElm);\n        }\n    };\n    // This will find invalid blocks wrapped in anchors and split them out so for example\n    // <h1><a href=\"#\"><h2>x</h2></a></h1> will find that h2 is invalid inside the H1 and split that out.\n    // This is a simplistic apporach so it's likely not covering all the cases but it's a start.\n    const splitInvalidChildren = (schema, scope, transparentBlocks) => {\n        const blocksElements = schema.getBlockElements();\n        const rootNode = SugarElement.fromDom(scope);\n        const isBlock = (el) => name(el) in blocksElements;\n        const isRoot = (el) => eq(el, rootNode);\n        each$e(fromDom$1(transparentBlocks), (transparentBlock) => {\n            ancestor$5(transparentBlock, isBlock, isRoot).each((parentBlock) => {\n                const invalidChildren = children$1(transparentBlock, (el) => isBlock(el) && !schema.isValidChild(name(parentBlock), name(el)));\n                if (invalidChildren.length > 0) {\n                    const stateScope = parentElement(parentBlock);\n                    each$e(invalidChildren, (child) => {\n                        ancestor$5(child, isBlock, isRoot).each((parentBlock) => {\n                            split$2(schema, parentBlock.dom, child.dom);\n                        });\n                    });\n                    stateScope.each((scope) => updateBlockStateOnChildren(schema, scope.dom));\n                }\n            });\n        });\n    };\n    const unwrapInvalidChildren = (schema, scope, transparentBlocks) => {\n        each$e([...transparentBlocks, ...(isTransparentBlock(schema, scope) ? [scope] : [])], (block) => each$e(descendants(SugarElement.fromDom(block), block.nodeName.toLowerCase()), (elm) => {\n            if (isTransparentInline(schema, elm.dom)) {\n                unwrap(elm);\n            }\n        }));\n    };\n    const updateChildren = (schema, scope) => {\n        const transparentBlocks = updateBlockStateOnChildren(schema, scope);\n        splitInvalidChildren(schema, scope, transparentBlocks);\n        unwrapInvalidChildren(schema, scope, transparentBlocks);\n    };\n    const updateElement = (schema, target) => {\n        if (isTransparentElement(schema, target)) {\n            const blocksSelector = makeSelectorFromSchemaMap(schema.getBlockElements());\n            updateTransparent(blocksSelector, target);\n        }\n    };\n    const updateCaret = (schema, root, caretParent) => {\n        const isRoot = (el) => eq(el, SugarElement.fromDom(root));\n        const parents = parents$1(SugarElement.fromDom(caretParent), isRoot);\n        // Check the element just above below the root so in if caretParent is I in this\n        // case <body><p><b><i>|</i></b></p></body> it would use the P as the scope\n        get$c(parents, parents.length - 2).filter(isElement$8).fold(() => updateChildren(schema, root), (scope) => updateChildren(schema, scope.dom));\n    };\n    const hasBlockAttr = (el) => el.hasAttribute(transparentBlockAttr);\n    const isTransparentElementName = (schema, name) => has$2(schema.getTransparentElements(), name);\n    const isTransparentElement = (schema, node) => isElement$7(node) && isTransparentElementName(schema, node.nodeName);\n    const isTransparentBlock = (schema, node) => isTransparentElement(schema, node) && hasBlockAttr(node);\n    const isTransparentInline = (schema, node) => isTransparentElement(schema, node) && !hasBlockAttr(node);\n    const isTransparentAstBlock = (schema, node) => node.type === 1 && isTransparentElementName(schema, node.name) && isString(node.attr(transparentBlockAttr));\n\n    const browser$2 = detect$1().browser;\n    const firstElement = (nodes) => find$2(nodes, isElement$8);\n    // Firefox has a bug where caption height is not included correctly in offset calculations of tables\n    // this tries to compensate for that by detecting if that offsets are incorrect and then remove the height\n    const getTableCaptionDeltaY = (elm) => {\n        if (browser$2.isFirefox() && name(elm) === 'table') {\n            return firstElement(children$2(elm)).filter((elm) => {\n                return name(elm) === 'caption';\n            }).bind((caption) => {\n                return firstElement(nextSiblings(caption)).map((body) => {\n                    const bodyTop = body.dom.offsetTop;\n                    const captionTop = caption.dom.offsetTop;\n                    const captionHeight = caption.dom.offsetHeight;\n                    return bodyTop <= captionTop ? -captionHeight : 0;\n                });\n            }).getOr(0);\n        }\n        else {\n            return 0;\n        }\n    };\n    const hasChild = (elm, child) => elm.children && contains$2(elm.children, child);\n    const getPos = (body, elm, rootElm) => {\n        let x = 0, y = 0;\n        const doc = body.ownerDocument;\n        rootElm = rootElm ? rootElm : body;\n        if (elm) {\n            // Use getBoundingClientRect if it exists since it's faster than looping offset nodes\n            // Fallback to offsetParent calculations if the body isn't static better since it stops at the body root\n            if (rootElm === body && elm.getBoundingClientRect && get$8(SugarElement.fromDom(body), 'position') === 'static') {\n                const pos = elm.getBoundingClientRect();\n                // Add scroll offsets from documentElement or body since IE with the wrong box model will use d.body and so do WebKit\n                // Also remove the body/documentelement clientTop/clientLeft on IE 6, 7 since they offset the position\n                x = pos.left + (doc.documentElement.scrollLeft || body.scrollLeft) - doc.documentElement.clientLeft;\n                y = pos.top + (doc.documentElement.scrollTop || body.scrollTop) - doc.documentElement.clientTop;\n                return { x, y };\n            }\n            let offsetParent = elm;\n            while (offsetParent && offsetParent !== rootElm && offsetParent.nodeType && !hasChild(offsetParent, rootElm)) {\n                const castOffsetParent = offsetParent;\n                x += castOffsetParent.offsetLeft || 0;\n                y += castOffsetParent.offsetTop || 0;\n                offsetParent = castOffsetParent.offsetParent;\n            }\n            offsetParent = elm.parentNode;\n            while (offsetParent && offsetParent !== rootElm && offsetParent.nodeType && !hasChild(offsetParent, rootElm)) {\n                x -= offsetParent.scrollLeft || 0;\n                y -= offsetParent.scrollTop || 0;\n                offsetParent = offsetParent.parentNode;\n            }\n            y += getTableCaptionDeltaY(SugarElement.fromDom(elm));\n        }\n        return { x, y };\n    };\n\n    const getCrossOrigin$1 = (url, settings) => {\n        const crossOriginFn = settings.crossOrigin;\n        if (settings.contentCssCors) {\n            return 'anonymous';\n        }\n        else if (isFunction(crossOriginFn)) {\n            return crossOriginFn(url);\n        }\n        else {\n            return undefined;\n        }\n    };\n    const StyleSheetLoader = (documentOrShadowRoot, settings = {}) => {\n        let idCount = 0;\n        const loadedStates = {};\n        const edos = SugarElement.fromDom(documentOrShadowRoot);\n        const doc = documentOrOwner(edos);\n        const _setReferrerPolicy = (referrerPolicy) => {\n            settings.referrerPolicy = referrerPolicy;\n        };\n        const _setContentCssCors = (contentCssCors) => {\n            settings.contentCssCors = contentCssCors;\n        };\n        const _setCrossOrigin = (crossOrigin) => {\n            settings.crossOrigin = crossOrigin;\n        };\n        const addStyle = (element) => {\n            append$1(getStyleContainer(edos), element);\n        };\n        const removeStyle = (id) => {\n            const styleContainer = getStyleContainer(edos);\n            descendant$1(styleContainer, '#' + id).each(remove$8);\n        };\n        const getOrCreateState = (url) => get$b(loadedStates, url).getOrThunk(() => ({\n            id: 'mce-u' + (idCount++),\n            passed: [],\n            failed: [],\n            count: 0\n        }));\n        /**\n         * Loads the specified CSS file and returns a Promise that will resolve when the stylesheet is loaded successfully or reject if it failed to load.\n         *\n         * @method load\n         * @param {String} url Url to be loaded.\n         * @return {Promise} A Promise that will resolve or reject when the stylesheet is loaded.\n         */\n        const load = (url) => new Promise((success, failure) => {\n            let link;\n            const urlWithSuffix = Tools._addCacheSuffix(url);\n            const state = getOrCreateState(urlWithSuffix);\n            loadedStates[urlWithSuffix] = state;\n            state.count++;\n            const resolve = (callbacks, status) => {\n                each$e(callbacks, call);\n                state.status = status;\n                state.passed = [];\n                state.failed = [];\n                if (link) {\n                    link.onload = null;\n                    link.onerror = null;\n                    link = null;\n                }\n            };\n            const passed = () => resolve(state.passed, 2);\n            const failed = () => resolve(state.failed, 3);\n            if (success) {\n                state.passed.push(success);\n            }\n            if (failure) {\n                state.failed.push(failure);\n            }\n            // Is loading wait for it to pass\n            if (state.status === 1) {\n                return;\n            }\n            // Has finished loading and was success\n            if (state.status === 2) {\n                passed();\n                return;\n            }\n            // Has finished loading and was a failure\n            if (state.status === 3) {\n                failed();\n                return;\n            }\n            // Start loading\n            state.status = 1;\n            const linkElem = SugarElement.fromTag('link', doc.dom);\n            setAll$1(linkElem, {\n                rel: 'stylesheet',\n                type: 'text/css',\n                id: state.id\n            });\n            const crossorigin = getCrossOrigin$1(url, settings);\n            if (crossorigin !== undefined) {\n                set$5(linkElem, 'crossOrigin', crossorigin);\n            }\n            if (settings.referrerPolicy) {\n                // Note: Don't use link.referrerPolicy = ... here as it doesn't work on Safari\n                set$5(linkElem, 'referrerpolicy', settings.referrerPolicy);\n            }\n            link = linkElem.dom;\n            link.onload = passed;\n            link.onerror = failed;\n            addStyle(linkElem);\n            set$5(linkElem, 'href', urlWithSuffix);\n        });\n        /**\n         * Loads the specified css string in as a style element with an unique key.\n         *\n         * @method loadRawCss\n         * @param {String} key Unique key for the style element.\n         * @param {String} css Css style content to add.\n         */\n        const loadRawCss = (key, css) => {\n            const state = getOrCreateState(key);\n            loadedStates[key] = state;\n            state.count++;\n            // Start loading\n            const styleElem = SugarElement.fromTag('style', doc.dom);\n            setAll$1(styleElem, {\n                'rel': 'stylesheet',\n                'type': 'text/css',\n                'id': state.id,\n                'data-mce-key': key\n            });\n            styleElem.dom.innerHTML = css;\n            addStyle(styleElem);\n        };\n        /**\n         * Loads the specified CSS files and returns a Promise that is resolved when all stylesheets are loaded or rejected if any failed to load.\n         *\n         * @method loadAll\n         * @param {Array} urls URLs to be loaded.\n         * @return {Promise} A Promise that will resolve or reject when all stylesheets are loaded.\n         */\n        const loadAll = (urls) => {\n            const loadedUrls = Promise.allSettled(map$3(urls, (url) => load(url).then(constant(url))));\n            return loadedUrls.then((results) => {\n                const parts = partition$2(results, (r) => r.status === 'fulfilled');\n                if (parts.fail.length > 0) {\n                    return Promise.reject(map$3(parts.fail, (result) => result.reason));\n                }\n                else {\n                    return map$3(parts.pass, (result) => result.value);\n                }\n            });\n        };\n        /**\n         * Unloads the specified CSS file if no resources currently depend on it.\n         *\n         * @method unload\n         * @param {String} url URL to unload or remove.\n         */\n        const unload = (url) => {\n            const urlWithSuffix = Tools._addCacheSuffix(url);\n            get$b(loadedStates, urlWithSuffix).each((state) => {\n                const count = --state.count;\n                if (count === 0) {\n                    delete loadedStates[urlWithSuffix];\n                    removeStyle(state.id);\n                }\n            });\n        };\n        /**\n         * Unloads the specified CSS style element by key.\n         *\n         * @method unloadRawCss\n         * @param {String} key Key of CSS style resource to unload.\n         */\n        const unloadRawCss = (key) => {\n            get$b(loadedStates, key).each((state) => {\n                const count = --state.count;\n                if (count === 0) {\n                    delete loadedStates[key];\n                    removeStyle(state.id);\n                }\n            });\n        };\n        /**\n         * Unloads each specified CSS file if no resources currently depend on it.\n         *\n         * @method unloadAll\n         * @param {Array} urls URLs to unload or remove.\n         */\n        const unloadAll = (urls) => {\n            each$e(urls, (url) => {\n                unload(url);\n            });\n        };\n        return {\n            load,\n            loadRawCss,\n            loadAll,\n            unload,\n            unloadRawCss,\n            unloadAll,\n            _setReferrerPolicy,\n            _setContentCssCors,\n            _setCrossOrigin\n        };\n    };\n\n    /**\n     * This function is exported for testing purposes only - please use StyleSheetLoader.instance in production code.\n     */\n    const create$b = () => {\n        const map = new WeakMap();\n        const forElement = (referenceElement, settings) => {\n            const root = getRootNode(referenceElement);\n            const rootDom = root.dom;\n            return Optional.from(map.get(rootDom)).getOrThunk(() => {\n                const sl = StyleSheetLoader(rootDom, settings);\n                map.set(rootDom, sl);\n                return sl;\n            });\n        };\n        return {\n            forElement\n        };\n    };\n    const instance = create$b();\n\n    const isSpan = (node) => node.nodeName.toLowerCase() === 'span';\n    const isInlineContent = (node, schema) => isNonNullable(node) && (isContent$1(schema, node) || schema.isInline(node.nodeName.toLowerCase()));\n    const surroundedByInlineContent = (node, root, schema) => {\n        const prev = new DomTreeWalker(node, root).prev(false);\n        const next = new DomTreeWalker(node, root).next(false);\n        // Check if the next/previous is either inline content or the start/end (eg is undefined)\n        const prevIsInline = isUndefined(prev) || isInlineContent(prev, schema);\n        const nextIsInline = isUndefined(next) || isInlineContent(next, schema);\n        return prevIsInline && nextIsInline;\n    };\n    const isBookmarkNode$2 = (node) => isSpan(node) && node.getAttribute('data-mce-type') === 'bookmark';\n    // Keep text nodes with only spaces if surrounded by spans.\n    // eg. \"<p><span>a</span> <span>b</span></p>\" should keep space between a and b\n    const isKeepTextNode = (node, root, schema) => isText$b(node) && node.data.length > 0 && surroundedByInlineContent(node, root, schema);\n    // Keep elements as long as they have any children\n    const isKeepElement = (node) => isElement$7(node) ? node.childNodes.length > 0 : false;\n    const isDocument = (node) => isDocumentFragment(node) || isDocument$1(node);\n    // W3C valid browsers tend to leave empty nodes to the left/right side of the contents - this makes sense\n    // but we don't want that in our code since it serves no purpose for the end user\n    // For example splitting this html at the bold element:\n    //   <p>text 1<span><b>CHOP</b></span>text 2</p>\n    // would produce:\n    //   <p>text 1<span></span></p><b>CHOP</b><p><span></span>text 2</p>\n    // this function will then trim off empty edges and produce:\n    //   <p>text 1</p><b>CHOP</b><p>text 2</p>\n    const trimNode = (dom, node, schema, root) => {\n        const rootNode = root || node;\n        if (isElement$7(node) && isBookmarkNode$2(node)) {\n            return node;\n        }\n        const children = node.childNodes;\n        for (let i = children.length - 1; i >= 0; i--) {\n            trimNode(dom, children[i], schema, rootNode);\n        }\n        // If the only child is a bookmark then move it up\n        if (isElement$7(node)) {\n            const currentChildren = node.childNodes;\n            if (currentChildren.length === 1 && isBookmarkNode$2(currentChildren[0])) {\n                node.parentNode?.insertBefore(currentChildren[0], node);\n            }\n        }\n        // Remove any empty nodes\n        if (!isDocument(node) && !isContent$1(schema, node) && !isKeepElement(node) && !isKeepTextNode(node, rootNode, schema)) {\n            dom.remove(node);\n        }\n        return node;\n    };\n\n    /**\n     * Entity encoder class.\n     *\n     * @class tinymce.html.Entities\n     * @static\n     * @version 3.4\n     */\n    const makeMap$3 = Tools.makeMap;\n    const attrsCharsRegExp = /[&<>\\\"\\u0060\\u007E-\\uD7FF\\uE000-\\uFFEF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g;\n    const textCharsRegExp = /[<>&\\u007E-\\uD7FF\\uE000-\\uFFEF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g;\n    const rawCharsRegExp = /[<>&\\\"\\']/g;\n    const entityRegExp = /&#([a-z0-9]+);?|&([a-z0-9]+);/gi;\n    const asciiMap = {\n        128: '\\u20AC', 130: '\\u201A', 131: '\\u0192', 132: '\\u201E', 133: '\\u2026', 134: '\\u2020',\n        135: '\\u2021', 136: '\\u02C6', 137: '\\u2030', 138: '\\u0160', 139: '\\u2039', 140: '\\u0152',\n        142: '\\u017D', 145: '\\u2018', 146: '\\u2019', 147: '\\u201C', 148: '\\u201D', 149: '\\u2022',\n        150: '\\u2013', 151: '\\u2014', 152: '\\u02DC', 153: '\\u2122', 154: '\\u0161', 155: '\\u203A',\n        156: '\\u0153', 158: '\\u017E', 159: '\\u0178'\n    };\n    // Raw entities\n    const baseEntities = {\n        '\\\"': '&quot;', // Needs to be escaped since the YUI compressor would otherwise break the code\n        '\\'': '&#39;',\n        '<': '&lt;',\n        '>': '&gt;',\n        '&': '&amp;',\n        '\\u0060': '&#96;'\n    };\n    // Reverse lookup table for raw entities\n    const reverseEntities = {\n        '&lt;': '<',\n        '&gt;': '>',\n        '&amp;': '&',\n        '&quot;': '\"',\n        '&apos;': `'`\n    };\n    // Decodes text by using the browser\n    const nativeDecode = (text) => {\n        const elm = SugarElement.fromTag('div').dom;\n        elm.innerHTML = text;\n        return elm.textContent || elm.innerText || text;\n    };\n    // Build a two way lookup table for the entities\n    const buildEntitiesLookup = (items, radix) => {\n        const lookup = {};\n        if (items) {\n            const itemList = items.split(',');\n            radix = radix || 10;\n            // Build entities lookup table\n            for (let i = 0; i < itemList.length; i += 2) {\n                const chr = String.fromCharCode(parseInt(itemList[i], radix));\n                // Only add non base entities\n                if (!baseEntities[chr]) {\n                    const entity = '&' + itemList[i + 1] + ';';\n                    lookup[chr] = entity;\n                    lookup[entity] = chr;\n                }\n            }\n            return lookup;\n        }\n        else {\n            return undefined;\n        }\n    };\n    // Unpack entities lookup where the numbers are in radix 32 to reduce the size\n    const namedEntities = buildEntitiesLookup('50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,' +\n        '5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,' +\n        '5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,' +\n        '5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,' +\n        '68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,' +\n        '6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,' +\n        '6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,' +\n        '75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,' +\n        '7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,' +\n        '7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,' +\n        'sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,' +\n        'st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,' +\n        't9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,' +\n        'tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,' +\n        'u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,' +\n        '81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,' +\n        '8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,' +\n        '8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,' +\n        '8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,' +\n        '8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,' +\n        'nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,' +\n        'rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,' +\n        'Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,' +\n        '80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,' +\n        '811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro', 32);\n    /**\n     * Encodes the specified string using raw entities. This means only the required XML base entities will be encoded.\n     *\n     * @method encodeRaw\n     * @param {String} text Text to encode.\n     * @param {Boolean} attr Optional flag to specify if the text is attribute contents.\n     * @return {String} Entity encoded text.\n     */\n    const encodeRaw = (text, attr) => text.replace(attr ? attrsCharsRegExp : textCharsRegExp, (chr) => {\n        return baseEntities[chr] || chr;\n    });\n    /**\n     * Encoded the specified text with both the attributes and text entities. This function will produce larger text contents\n     * since it doesn't know if the context is within an attribute or text node. This was added for compatibility\n     * and is exposed as the `DOMUtils.encode` function.\n     *\n     * @method encodeAllRaw\n     * @param {String} text Text to encode.\n     * @return {String} Entity encoded text.\n     */\n    const encodeAllRaw = (text) => ('' + text).replace(rawCharsRegExp, (chr) => {\n        return baseEntities[chr] || chr;\n    });\n    /**\n     * Encodes the specified string using numeric entities. The core entities will be\n     * encoded as named ones but all non lower ascii characters will be encoded into numeric entities.\n     *\n     * @method encodeNumeric\n     * @param {String} text Text to encode.\n     * @param {Boolean} attr Optional flag to specify if the text is attribute contents.\n     * @return {String} Entity encoded text.\n     */\n    const encodeNumeric = (text, attr) => text.replace(attr ? attrsCharsRegExp : textCharsRegExp, (chr) => {\n        // Multi byte sequence convert it to a single entity\n        if (chr.length > 1) {\n            return '&#' + (((chr.charCodeAt(0) - 0xD800) * 0x400) + (chr.charCodeAt(1) - 0xDC00) + 0x10000) + ';';\n        }\n        return baseEntities[chr] || '&#' + chr.charCodeAt(0) + ';';\n    });\n    /**\n     * Encodes the specified string using named entities. The core entities will be encoded\n     * as named ones but all non lower ascii characters will be encoded into named entities.\n     *\n     * @method encodeNamed\n     * @param {String} text Text to encode.\n     * @param {Boolean} attr Optional flag to specify if the text is attribute contents.\n     * @param {Object} entities Optional parameter with entities to use.\n     * @return {String} Entity encoded text.\n     */\n    const encodeNamed = (text, attr, entities) => {\n        const resolveEntities = entities || namedEntities;\n        return text.replace(attr ? attrsCharsRegExp : textCharsRegExp, (chr) => {\n            return baseEntities[chr] || resolveEntities[chr] || chr;\n        });\n    };\n    /**\n     * Returns an encode function based on the name(s) and it's optional entities.\n     *\n     * @method getEncodeFunc\n     * @param {String} name Comma separated list of encoders for example named,numeric.\n     * @param {String} entities Optional parameter with entities to use instead of the built in set.\n     * @return {Function} Encode function to be used.\n     */\n    const getEncodeFunc = (name, entities) => {\n        const entitiesMap = buildEntitiesLookup(entities) || namedEntities;\n        const encodeNamedAndNumeric = (text, attr) => text.replace(attr ? attrsCharsRegExp : textCharsRegExp, (chr) => {\n            if (baseEntities[chr] !== undefined) {\n                return baseEntities[chr];\n            }\n            if (entitiesMap[chr] !== undefined) {\n                return entitiesMap[chr];\n            }\n            // Convert multi-byte sequences to a single entity.\n            if (chr.length > 1) {\n                return '&#' + (((chr.charCodeAt(0) - 0xD800) * 0x400) + (chr.charCodeAt(1) - 0xDC00) + 0x10000) + ';';\n            }\n            return '&#' + chr.charCodeAt(0) + ';';\n        });\n        const encodeCustomNamed = (text, attr) => {\n            return encodeNamed(text, attr, entitiesMap);\n        };\n        // Replace + with , to be compatible with previous TinyMCE versions\n        const nameMap = makeMap$3(name.replace(/\\+/g, ','));\n        // Named and numeric encoder\n        if (nameMap.named && nameMap.numeric) {\n            return encodeNamedAndNumeric;\n        }\n        // Named encoder\n        if (nameMap.named) {\n            // Custom names\n            if (entities) {\n                return encodeCustomNamed;\n            }\n            return encodeNamed;\n        }\n        // Numeric\n        if (nameMap.numeric) {\n            return encodeNumeric;\n        }\n        // Raw encoder\n        return encodeRaw;\n    };\n    /**\n     * Decodes the specified string, this will replace entities with raw UTF characters.\n     *\n     * @method decode\n     * @param {String} text Text to entity decode.\n     * @return {String} Entity decoded string.\n     */\n    const decode = (text) => text.replace(entityRegExp, (all, numeric) => {\n        if (numeric) {\n            if (numeric.charAt(0).toLowerCase() === 'x') {\n                numeric = parseInt(numeric.substr(1), 16);\n            }\n            else {\n                numeric = parseInt(numeric, 10);\n            }\n            // Support upper UTF\n            if (numeric > 0xFFFF) {\n                numeric -= 0x10000;\n                // eslint-disable-next-line no-bitwise\n                return String.fromCharCode(0xD800 + (numeric >> 10), 0xDC00 + (numeric & 0x3FF));\n            }\n            return asciiMap[numeric] || String.fromCharCode(numeric);\n        }\n        return reverseEntities[all] || namedEntities[all] || nativeDecode(all);\n    });\n    const Entities = {\n        encodeRaw,\n        encodeAllRaw,\n        encodeNumeric,\n        encodeNamed,\n        getEncodeFunc,\n        decode\n    };\n\n    const split$1 = (items, delim) => {\n        items = Tools.trim(items);\n        return items ? items.split(delim || ' ') : [];\n    };\n    // Converts a wildcard expression string to a regexp for example *a will become /.*a/.\n    const patternToRegExp = (str) => new RegExp('^' + str.replace(/([?+*])/g, '.$1') + '$');\n    const isRegExp$1 = (obj) => isObject(obj) && obj.source && Object.prototype.toString.call(obj) === '[object RegExp]';\n    const deepCloneElementRule = (obj) => {\n        const helper = (value) => {\n            if (isArray$1(value)) {\n                return map$3(value, helper);\n            }\n            else if (isRegExp$1(value)) {\n                return new RegExp(value.source, value.flags);\n            }\n            else if (isObject(value)) {\n                return map$2(value, helper);\n            }\n            else {\n                return value;\n            }\n        };\n        return helper(obj);\n    };\n\n    const parseCustomElementsRules = (value) => {\n        const customElementRegExp = /^(~)?(.+)$/;\n        return bind$3(split$1(value, ','), (rule) => {\n            const matches = customElementRegExp.exec(rule);\n            if (matches) {\n                const inline = matches[1] === '~';\n                const cloneName = inline ? 'span' : 'div';\n                const name = matches[2];\n                return [{ cloneName, name }];\n            }\n            else {\n                return [];\n            }\n        });\n    };\n\n    const getGlobalAttributeSet = (type) => {\n        return Object.freeze([\n            // Present on all schema types\n            'id',\n            'accesskey',\n            'class',\n            'dir',\n            'lang',\n            'style',\n            'tabindex',\n            'title',\n            'role',\n            // html5 and html5-strict extra attributes\n            ...(type !== 'html4' ? ['contenteditable', 'contextmenu', 'draggable', 'dropzone', 'hidden', 'spellcheck', 'translate', 'itemprop', 'itemscope', 'itemtype'] : []),\n            // html4 and html5 extra attributes\n            ...(type !== 'html5-strict' ? ['xml:lang'] : [])\n        ]);\n    };\n\n    // Missing elements in `phrasing` compared to HTML5 spec at 2024-01-30 (timestamped since spec is constantly evolving)\n    //  area - required to be inside a map element so we should not add it to all elements.\n    //  link - required to be in the body so we should not add it to all elements.\n    //  math - currently not supported.\n    //  meta - Only allowed if the `itemprop` attribute is set so very special.\n    //  slot - We only want these to be accepted in registered custom components.\n    // Extra element in `phrasing`: command keygen\n    //\n    // Missing elements in `flow` compared to HTML5 spec at 2034-01-30 (timestamped since the spec is constantly evolving)\n    //  search - Can be both in a block and inline position but is not a transparent element. So not supported at this time.\n    const getElementSetsAsStrings = (type) => {\n        let blockContent;\n        let phrasingContent;\n        // Block content elements\n        blockContent =\n            'address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul';\n        // Phrasing content elements from the HTML5 spec (inline)\n        phrasingContent =\n            'a abbr b bdo br button cite code del dfn em embed i iframe img input ins kbd ' +\n                'label map noscript object q s samp script select small span strong sub sup ' +\n                'textarea u var #text #comment';\n        // Add HTML5 items to globalAttributes, blockContent, phrasingContent\n        if (type !== 'html4') {\n            const transparentContent = 'a ins del canvas map';\n            blockContent += ' article aside details dialog figure main header footer hgroup section nav ' + transparentContent;\n            phrasingContent += ' audio canvas command data datalist mark meter output picture ' +\n                'progress template time wbr video ruby bdi keygen svg';\n        }\n        // Add HTML4 elements unless it's html5-strict\n        if (type !== 'html5-strict') {\n            const html4PhrasingContent = 'acronym applet basefont big font strike tt';\n            phrasingContent = [phrasingContent, html4PhrasingContent].join(' ');\n            const html4BlockContent = 'center dir isindex noframes';\n            blockContent = [blockContent, html4BlockContent].join(' ');\n        }\n        // Flow content elements from the HTML5 spec (block+inline)\n        const flowContent = [blockContent, phrasingContent].join(' ');\n        return { blockContent, phrasingContent, flowContent };\n    };\n    const getElementSets = (type) => {\n        const { blockContent, phrasingContent, flowContent } = getElementSetsAsStrings(type);\n        const toArr = (value) => {\n            return Object.freeze(value.split(' '));\n        };\n        return Object.freeze({\n            blockContent: toArr(blockContent),\n            phrasingContent: toArr(phrasingContent),\n            flowContent: toArr(flowContent)\n        });\n    };\n\n    const cachedSets = {\n        'html4': cached(() => getElementSets('html4')),\n        'html5': cached(() => getElementSets('html5')),\n        'html5-strict': cached(() => getElementSets('html5-strict'))\n    };\n    // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\n    const getElementsPreset = (type, name) => {\n        const { blockContent, phrasingContent, flowContent } = cachedSets[type]();\n        if (name === 'blocks') {\n            return Optional.some(blockContent);\n        }\n        else if (name === 'phrasing') {\n            return Optional.some(phrasingContent);\n        }\n        else if (name === 'flow') {\n            return Optional.some(flowContent);\n        }\n        else {\n            return Optional.none();\n        }\n    };\n\n    const makeSchema = (type) => {\n        const globalAttributes = getGlobalAttributeSet(type);\n        const { phrasingContent, flowContent } = getElementSetsAsStrings(type);\n        const schema = {};\n        const addElement = (name, attributes, children) => {\n            schema[name] = {\n                attributes: mapToObject(attributes, constant({})),\n                attributesOrder: attributes,\n                children: mapToObject(children, constant({}))\n            };\n        };\n        const add = (name, attributes = '', children = '') => {\n            const childNames = split$1(children);\n            const names = split$1(name);\n            let ni = names.length;\n            const allAttributes = [...globalAttributes, ...split$1(attributes)];\n            while (ni--) {\n                addElement(names[ni], allAttributes.slice(), childNames);\n            }\n        };\n        const addAttrs = (name, attributes) => {\n            const names = split$1(name);\n            const attrs = split$1(attributes);\n            let ni = names.length;\n            while (ni--) {\n                const schemaItem = schema[names[ni]];\n                for (let i = 0, l = attrs.length; i < l; i++) {\n                    schemaItem.attributes[attrs[i]] = {};\n                    schemaItem.attributesOrder.push(attrs[i]);\n                }\n            }\n        };\n        if (type !== 'html5-strict') {\n            const html4PhrasingContent = 'acronym applet basefont big font strike tt';\n            each$e(split$1(html4PhrasingContent), (name) => {\n                add(name, '', phrasingContent);\n            });\n            const html4BlockContent = 'center dir isindex noframes';\n            each$e(split$1(html4BlockContent), (name) => {\n                add(name, '', flowContent);\n            });\n        }\n        // HTML4 base schema TODO: Move HTML5 specific attributes to HTML5 specific if statement\n        // Schema items <element name>, <specific attributes>, <children ..>\n        add('html', 'manifest', 'head body');\n        add('head', '', 'base command link meta noscript script style title');\n        add('title hr noscript br');\n        add('base', 'href target');\n        add('link', 'href rel media hreflang type sizes hreflang');\n        add('meta', 'name http-equiv content charset property'); // Property is an RDFa spec attribute.\n        add('style', 'media type scoped');\n        add('script', 'src async defer type charset');\n        add('body', 'onafterprint onbeforeprint onbeforeunload onblur onerror onfocus ' +\n            'onhashchange onload onmessage onoffline ononline onpagehide onpageshow ' +\n            'onpopstate onresize onscroll onstorage onunload', flowContent);\n        add('dd div', '', flowContent);\n        add('address dt caption', '', type === 'html4' ? phrasingContent : flowContent);\n        add('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', '', phrasingContent);\n        add('blockquote', 'cite', flowContent);\n        add('ol', 'reversed start type', 'li');\n        add('ul', '', 'li');\n        add('li', 'value', flowContent);\n        add('dl', '', 'dt dd');\n        add('a', 'href target rel media hreflang type', type === 'html4' ? phrasingContent : flowContent);\n        add('q', 'cite', phrasingContent);\n        add('ins del', 'cite datetime', flowContent);\n        add('img', 'src sizes srcset alt usemap ismap width height');\n        add('iframe', 'src name width height', flowContent);\n        add('embed', 'src type width height');\n        add('object', 'data type typemustmatch name usemap form width height', [flowContent, 'param'].join(' '));\n        add('param', 'name value');\n        add('map', 'name', [flowContent, 'area'].join(' '));\n        add('area', 'alt coords shape href target rel media hreflang type');\n        add('table', 'border', 'caption colgroup thead tfoot tbody tr' + (type === 'html4' ? ' col' : ''));\n        add('colgroup', 'span', 'col');\n        add('col', 'span');\n        add('tbody thead tfoot', '', 'tr');\n        add('tr', '', 'td th');\n        add('td', 'colspan rowspan headers', flowContent);\n        add('th', 'colspan rowspan headers scope abbr', flowContent);\n        add('form', 'accept-charset action autocomplete enctype method name novalidate target', flowContent);\n        add('fieldset', 'disabled form name', [flowContent, 'legend'].join(' '));\n        add('label', 'form for', phrasingContent);\n        add('input', 'accept alt autocomplete checked dirname disabled form formaction formenctype formmethod formnovalidate ' +\n            'formtarget height list max maxlength min multiple name pattern readonly required size src step type value width');\n        add('button', 'disabled form formaction formenctype formmethod formnovalidate formtarget name type value', type === 'html4' ? flowContent : phrasingContent);\n        add('select', 'disabled form multiple name required size', 'option optgroup');\n        add('optgroup', 'disabled label', 'option');\n        add('option', 'disabled label selected value');\n        add('textarea', 'cols dirname disabled form maxlength name readonly required rows wrap');\n        add('menu', 'type label', [flowContent, 'li'].join(' '));\n        add('noscript', '', flowContent);\n        // Extend with HTML5 elements\n        if (type !== 'html4') {\n            add('wbr');\n            add('ruby', '', [phrasingContent, 'rt rp'].join(' '));\n            add('figcaption', '', flowContent);\n            add('mark rt rp bdi', '', phrasingContent);\n            add('summary', '', [phrasingContent, 'h1 h2 h3 h4 h5 h6'].join(' '));\n            add('canvas', 'width height', flowContent);\n            add('data', 'value', phrasingContent);\n            add('video', 'src crossorigin poster preload autoplay mediagroup loop ' +\n                'controlslist disablepictureinpicture disableremoteplayback playsinline ' +\n                'muted controls width height buffered', [flowContent, 'track source'].join(' '));\n            add('audio', 'src crossorigin preload autoplay mediagroup loop muted controls ' +\n                'buffered volume', [flowContent, 'track source'].join(' '));\n            add('picture', '', 'img source');\n            add('source', 'src srcset type media sizes');\n            add('track', 'kind src srclang label default');\n            add('datalist', '', [phrasingContent, 'option'].join(' '));\n            add('article section nav aside main header footer', '', flowContent);\n            add('hgroup', '', 'h1 h2 h3 h4 h5 h6');\n            add('figure', '', [flowContent, 'figcaption'].join(' '));\n            add('time', 'datetime', phrasingContent);\n            add('dialog', 'open', flowContent);\n            add('command', 'type label icon disabled checked radiogroup command');\n            add('output', 'for form name', phrasingContent);\n            add('progress', 'value max', phrasingContent);\n            add('meter', 'value min max low high optimum', phrasingContent);\n            add('details', 'open', [flowContent, 'summary'].join(' '));\n            add('keygen', 'autofocus challenge disabled form keytype name');\n            // SVGs only support a subset of the global attributes\n            addElement('svg', 'id tabindex lang xml:space class style x y width height viewBox preserveAspectRatio zoomAndPan transform'.split(' '), []);\n        }\n        // Extend with HTML4 attributes unless it's html5-strict\n        if (type !== 'html5-strict') {\n            addAttrs('script', 'language xml:space');\n            addAttrs('style', 'xml:space');\n            addAttrs('object', 'declare classid code codebase codetype archive standby align border hspace vspace');\n            addAttrs('embed', 'align name hspace vspace');\n            addAttrs('param', 'valuetype type');\n            addAttrs('a', 'charset name rev shape coords');\n            addAttrs('br', 'clear');\n            addAttrs('applet', 'codebase archive code object alt name width height align hspace vspace');\n            addAttrs('img', 'name longdesc align border hspace vspace');\n            addAttrs('iframe', 'longdesc frameborder marginwidth marginheight scrolling align');\n            addAttrs('font basefont', 'size color face');\n            addAttrs('input', 'usemap align');\n            addAttrs('select');\n            addAttrs('textarea');\n            addAttrs('h1 h2 h3 h4 h5 h6 div p legend caption', 'align');\n            addAttrs('ul', 'type compact');\n            addAttrs('li', 'type');\n            addAttrs('ol dl menu dir', 'compact');\n            addAttrs('pre', 'width xml:space');\n            addAttrs('hr', 'align noshade size width');\n            addAttrs('isindex', 'prompt');\n            addAttrs('table', 'summary width frame rules cellspacing cellpadding align bgcolor');\n            addAttrs('col', 'width align char charoff valign');\n            addAttrs('colgroup', 'width align char charoff valign');\n            addAttrs('thead', 'align char charoff valign');\n            addAttrs('tr', 'align char charoff valign bgcolor');\n            addAttrs('th', 'axis align char charoff valign nowrap bgcolor width height');\n            addAttrs('form', 'accept');\n            addAttrs('td', 'abbr axis scope align char charoff valign nowrap bgcolor width height');\n            addAttrs('tfoot', 'align char charoff valign');\n            addAttrs('tbody', 'align char charoff valign');\n            addAttrs('area', 'nohref');\n            addAttrs('body', 'background bgcolor text link vlink alink');\n        }\n        // Extend with HTML5 attributes unless it's html4\n        if (type !== 'html4') {\n            addAttrs('input button select textarea', 'autofocus');\n            addAttrs('input textarea', 'placeholder');\n            addAttrs('a', 'download');\n            addAttrs('link script img', 'crossorigin');\n            addAttrs('img', 'loading');\n            addAttrs('iframe', 'sandbox seamless allow allowfullscreen loading referrerpolicy'); // Excluded: srcdoc\n        }\n        // Special: iframe, ruby, video, audio, label\n        if (type !== 'html4') {\n            // Video/audio elements cannot have nested children\n            each$e([schema.video, schema.audio], (item) => {\n                delete item.children.audio;\n                delete item.children.video;\n            });\n        }\n        // Delete children of the same name from it's parent\n        // For example: form can't have a child of the name form\n        each$e(split$1('a form meter progress dfn'), (name) => {\n            if (schema[name]) {\n                delete schema[name].children[name];\n            }\n        });\n        // Delete header, footer, sectioning and heading content descendants\n        /* each('dt th address', function(name) {\n         delete schema[name].children[name];\n         });*/\n        // Caption can't have tables\n        delete schema.caption.children.table;\n        // Delete scripts by default due to possible XSS\n        delete schema.script;\n        // TODO: LI:s can only have value if parent is OL\n        return schema;\n    };\n\n    const prefixToOperation = (prefix) => prefix === '-' ? 'remove' : 'add';\n    const parseValidChild = (name) => {\n        // see: https://html.spec.whatwg.org/#valid-custom-element-name\n        const validChildRegExp = /^(@?)([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]+)$/;\n        return Optional.from(validChildRegExp.exec(name)).map((matches) => ({\n            preset: matches[1] === '@',\n            name: matches[2]\n        }));\n    };\n    const parseValidChildrenRules = (value) => {\n        // see: https://html.spec.whatwg.org/#valid-custom-element-name\n        const childRuleRegExp = /^([+\\-]?)([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]+)\\[([^\\]]+)]$/; // from w3c's custom grammar (above)\n        return bind$3(split$1(value, ','), (rule) => {\n            const matches = childRuleRegExp.exec(rule);\n            if (matches) {\n                const prefix = matches[1];\n                const operation = prefix ? prefixToOperation(prefix) : 'replace';\n                const name = matches[2];\n                const validChildren = bind$3(split$1(matches[3], '|'), (validChild) => parseValidChild(validChild).toArray());\n                return [{ operation, name, validChildren }];\n            }\n            else {\n                return [];\n            }\n        });\n    };\n\n    const parseValidElementsAttrDataIntoElement = (attrData, targetElement) => {\n        const attrRuleRegExp = /^([!\\-])?(\\w+[\\\\:]:\\w+|[^=~<]+)?(?:([=~<])(.*))?$/;\n        const hasPatternsRegExp = /[*?+]/;\n        const { attributes, attributesOrder } = targetElement;\n        return each$e(split$1(attrData, '|'), (rule) => {\n            const matches = attrRuleRegExp.exec(rule);\n            if (matches) {\n                const attr = {};\n                const attrType = matches[1];\n                const attrName = matches[2].replace(/[\\\\:]:/g, ':');\n                const attrPrefix = matches[3];\n                const value = matches[4];\n                // Required\n                if (attrType === '!') {\n                    targetElement.attributesRequired = targetElement.attributesRequired || [];\n                    targetElement.attributesRequired.push(attrName);\n                    attr.required = true;\n                }\n                // Denied from global\n                if (attrType === '-') {\n                    delete attributes[attrName];\n                    attributesOrder.splice(Tools.inArray(attributesOrder, attrName), 1);\n                    return;\n                }\n                // Default value\n                if (attrPrefix) {\n                    if (attrPrefix === '=') { // Default value\n                        targetElement.attributesDefault = targetElement.attributesDefault || [];\n                        targetElement.attributesDefault.push({ name: attrName, value });\n                        attr.defaultValue = value;\n                    }\n                    else if (attrPrefix === '~') { // Forced value\n                        targetElement.attributesForced = targetElement.attributesForced || [];\n                        targetElement.attributesForced.push({ name: attrName, value });\n                        attr.forcedValue = value;\n                    }\n                    else if (attrPrefix === '<') { // Required values\n                        attr.validValues = Tools.makeMap(value, '?');\n                    }\n                }\n                // Check for attribute patterns\n                if (hasPatternsRegExp.test(attrName)) {\n                    const attrPattern = attr;\n                    targetElement.attributePatterns = targetElement.attributePatterns || [];\n                    attrPattern.pattern = patternToRegExp(attrName);\n                    targetElement.attributePatterns.push(attrPattern);\n                }\n                else {\n                    // Add attribute to order list if it doesn't already exist\n                    if (!attributes[attrName]) {\n                        attributesOrder.push(attrName);\n                    }\n                    attributes[attrName] = attr;\n                }\n            }\n        });\n    };\n    const cloneAttributesInto = (from, to) => {\n        each$d(from.attributes, (value, key) => {\n            to.attributes[key] = value;\n        });\n        to.attributesOrder.push(...from.attributesOrder);\n    };\n    const parseValidElementsRules = (globalElement, validElements) => {\n        const elementRuleRegExp = /^([#+\\-])?([^\\[!\\/]+)(?:\\/([^\\[!]+))?(?:(!?)\\[([^\\]]+)])?$/;\n        return bind$3(split$1(validElements, ','), (rule) => {\n            const matches = elementRuleRegExp.exec(rule);\n            if (matches) {\n                const prefix = matches[1];\n                const elementName = matches[2];\n                const outputName = matches[3];\n                const attrsPrefix = matches[4];\n                const attrData = matches[5];\n                const element = {\n                    attributes: {},\n                    attributesOrder: []\n                };\n                globalElement.each((el) => cloneAttributesInto(el, element));\n                if (prefix === '#') {\n                    element.paddEmpty = true;\n                }\n                else if (prefix === '-') {\n                    element.removeEmpty = true;\n                }\n                if (attrsPrefix === '!') {\n                    element.removeEmptyAttrs = true;\n                }\n                if (attrData) {\n                    parseValidElementsAttrDataIntoElement(attrData, element);\n                }\n                // Handle substitute elements such as b/strong\n                if (outputName) {\n                    element.outputName = elementName;\n                }\n                // Mutate the local globalElement option state if we find a global @ rule\n                if (elementName === '@') {\n                    // We only care about the first one\n                    if (globalElement.isNone()) {\n                        globalElement = Optional.some(element);\n                    }\n                    else {\n                        return [];\n                    }\n                }\n                return [outputName ? { name: elementName, element, aliasName: outputName } : { name: elementName, element }];\n            }\n            else {\n                return [];\n            }\n        });\n    };\n\n    /**\n     * Schema validator class.\n     *\n     * @class tinymce.html.Schema\n     * @version 3.4\n     * @example\n     * if (tinymce.activeEditor.schema.isValidChild('p', 'span')) {\n     *   alert('span is valid child of p.');\n     * }\n     *\n     * if (tinymce.activeEditor.schema.getElementRule('p')) {\n     *   alert('P is a valid element.');\n     * }\n     */\n    const mapCache = {};\n    const makeMap$2 = Tools.makeMap, each$b = Tools.each, extend$2 = Tools.extend, explode$2 = Tools.explode;\n    const createMap = (defaultValue, extendWith = {}) => {\n        const value = makeMap$2(defaultValue, ' ', makeMap$2(defaultValue.toUpperCase(), ' '));\n        return extend$2(value, extendWith);\n    };\n    // A curated list using the textBlockElements map and parts of the blockElements map from the schema\n    // TODO: TINY-8728 Investigate if the extras can be added directly to the default text block elements\n    const getTextRootBlockElements = (schema) => createMap('td th li dt dd figcaption caption details summary', schema.getTextBlockElements());\n    const compileElementMap = (value, mode) => {\n        if (value) {\n            const styles = {};\n            if (isString(value)) {\n                value = {\n                    '*': value\n                };\n            }\n            // Convert styles into a rule list\n            each$b(value, (value, key) => {\n                styles[key] = styles[key.toUpperCase()] = mode === 'map' ? makeMap$2(value, /[, ]/) : explode$2(value, /[, ]/);\n            });\n            return styles;\n        }\n        else {\n            return undefined;\n        }\n    };\n    const Schema = (settings = {}) => {\n        const elements = {};\n        const children = {};\n        let patternElements = [];\n        const customElementsMap = {};\n        const specialElements = {};\n        const componentUrls = {};\n        // Creates an lookup table map object for the specified option or the default value\n        const createLookupTable = (option, defaultValue, extendWith) => {\n            const value = settings[option];\n            if (!value) {\n                // Get cached default map or make it if needed\n                let newValue = mapCache[option];\n                if (!newValue) {\n                    newValue = createMap(defaultValue, extendWith);\n                    mapCache[option] = newValue;\n                }\n                return newValue;\n            }\n            else {\n                // Create custom map\n                return makeMap$2(value, /[, ]/, makeMap$2(value.toUpperCase(), /[, ]/));\n            }\n        };\n        const schemaType = settings.schema ?? 'html5';\n        const schemaItems = makeSchema(schemaType);\n        // Allow all elements and attributes if verify_html is set to false\n        if (settings.verify_html === false) {\n            settings.valid_elements = '*[*]';\n        }\n        const validStyles = compileElementMap(settings.valid_styles);\n        const invalidStyles = compileElementMap(settings.invalid_styles, 'map');\n        const validClasses = compileElementMap(settings.valid_classes, 'map');\n        // Setup map objects\n        const whitespaceElementsMap = createLookupTable('whitespace_elements', 'pre script noscript style textarea video audio iframe object code');\n        const selfClosingElementsMap = createLookupTable('self_closing_elements', 'colgroup dd dt li option p td tfoot th thead tr');\n        const voidElementsMap = createLookupTable('void_elements', 'area base basefont br col frame hr img input isindex link ' +\n            'meta param embed source wbr track');\n        const boolAttrMap = createLookupTable('boolean_attributes', 'checked compact declare defer disabled ismap multiple nohref noresize ' +\n            'noshade nowrap readonly selected autoplay loop controls allowfullscreen');\n        const nonEmptyOrMoveCaretBeforeOnEnter = 'td th iframe video audio object script code';\n        const nonEmptyElementsMap = createLookupTable('non_empty_elements', nonEmptyOrMoveCaretBeforeOnEnter + ' pre svg textarea summary', voidElementsMap);\n        const moveCaretBeforeOnEnterElementsMap = createLookupTable('move_caret_before_on_enter_elements', nonEmptyOrMoveCaretBeforeOnEnter + ' table', voidElementsMap);\n        const headings = 'h1 h2 h3 h4 h5 h6';\n        const textBlockElementsMap = createLookupTable('text_block_elements', headings + ' p div address pre form ' +\n            'blockquote center dir fieldset header footer article section hgroup aside main nav figure');\n        const blockElementsMap = createLookupTable('block_elements', 'hr table tbody thead tfoot ' +\n            'th tr td li ol ul caption dl dt dd noscript menu isindex option ' +\n            'datalist select optgroup figcaption details summary html body multicol listing colgroup col', textBlockElementsMap);\n        const textInlineElementsMap = createLookupTable('text_inline_elements', 'span strong b em i font s strike u var cite ' +\n            'dfn code mark q sup sub samp');\n        const transparentElementsMap = createLookupTable('transparent_elements', 'a ins del canvas map');\n        const wrapBlockElementsMap = createLookupTable('wrap_block_elements', 'pre ' + headings);\n        // See https://html.spec.whatwg.org/multipage/parsing.html#parsing-html-fragments\n        each$b(('script noscript iframe noframes noembed title style textarea xmp plaintext').split(' '), (name) => {\n            specialElements[name] = new RegExp('<\\/' + name + '[^>]*>', 'gi');\n        });\n        // Parses the specified valid_elements string and adds to the current rules\n        const addValidElements = (validElements) => {\n            const globalElement = Optional.from(elements['@']);\n            const hasPatternsRegExp = /[*?+]/;\n            each$e(parseValidElementsRules(globalElement, validElements ?? ''), ({ name, element, aliasName }) => {\n                if (aliasName) {\n                    elements[aliasName] = element;\n                }\n                // Add pattern or exact element\n                if (hasPatternsRegExp.test(name)) {\n                    const patternElement = element;\n                    patternElement.pattern = patternToRegExp(name);\n                    patternElements.push(patternElement);\n                }\n                else {\n                    elements[name] = element;\n                }\n            });\n        };\n        const setValidElements = (validElements) => {\n            // Clear any existing rules. Note that since `elements` is exposed we can't\n            // overwrite it, so instead we delete all the properties\n            patternElements = [];\n            each$e(keys(elements), (name) => {\n                delete elements[name];\n            });\n            addValidElements(validElements);\n        };\n        const addCustomElement = (name, spec) => {\n            // Flush cached items since we are altering the default maps\n            delete mapCache.text_block_elements;\n            delete mapCache.block_elements;\n            const inline = spec.extends ? !isBlock(spec.extends) : false;\n            const cloneName = spec.extends;\n            children[name] = cloneName ? children[cloneName] : {};\n            customElementsMap[name] = cloneName ?? name;\n            // Treat all custom elements as being non-empty by default\n            nonEmptyElementsMap[name.toUpperCase()] = {};\n            nonEmptyElementsMap[name] = {};\n            // If it's not marked as inline then add it to valid block elements\n            if (!inline) {\n                blockElementsMap[name.toUpperCase()] = {};\n                blockElementsMap[name] = {};\n            }\n            // Add elements clone if needed\n            if (cloneName && !elements[name] && elements[cloneName]) {\n                const customRule = deepCloneElementRule(elements[cloneName]);\n                delete customRule.removeEmptyAttrs;\n                delete customRule.removeEmpty;\n                elements[name] = customRule;\n            }\n            else {\n                elements[name] = { attributesOrder: [], attributes: {} };\n            }\n            // Add custom attributes\n            if (isArray$1(spec.attributes)) {\n                const processAttrName = (name) => {\n                    customRule.attributesOrder.push(name);\n                    customRule.attributes[name] = {};\n                };\n                const customRule = elements[name] ?? {};\n                delete customRule.attributesDefault;\n                delete customRule.attributesForced;\n                delete customRule.attributePatterns;\n                delete customRule.attributesRequired;\n                customRule.attributesOrder = [];\n                customRule.attributes = {};\n                each$e(spec.attributes, (attrName) => {\n                    const globalAttrs = getGlobalAttributeSet(schemaType);\n                    parseValidChild(attrName).each(({ preset, name }) => {\n                        if (preset) {\n                            if (name === 'global') {\n                                each$e(globalAttrs, processAttrName);\n                            }\n                        }\n                        else {\n                            processAttrName(name);\n                        }\n                    });\n                });\n                elements[name] = customRule;\n            }\n            // Add custom pad empty rule\n            if (isBoolean(spec.padEmpty)) {\n                const customRule = elements[name] ?? {};\n                customRule.paddEmpty = spec.padEmpty;\n                elements[name] = customRule;\n            }\n            // Add custom children\n            if (isArray$1(spec.children)) {\n                const customElementChildren = {};\n                const processNodeName = (name) => {\n                    customElementChildren[name] = {};\n                };\n                const processPreset = (name) => {\n                    getElementsPreset(schemaType, name).each((names) => {\n                        each$e(names, processNodeName);\n                    });\n                };\n                each$e(spec.children, (child) => {\n                    parseValidChild(child).each(({ preset, name }) => {\n                        if (preset) {\n                            processPreset(name);\n                        }\n                        else {\n                            processNodeName(name);\n                        }\n                    });\n                });\n                children[name] = customElementChildren;\n            }\n            // Add custom elements at extends positions\n            if (cloneName) {\n                each$d(children, (element, elmName) => {\n                    if (element[cloneName]) {\n                        children[elmName] = element = extend$2({}, children[elmName]);\n                        element[name] = element[cloneName];\n                    }\n                });\n            }\n        };\n        const addCustomElementsFromString = (customElements) => {\n            each$e(parseCustomElementsRules(customElements ?? ''), ({ name, cloneName }) => {\n                addCustomElement(name, { extends: cloneName });\n            });\n        };\n        const addComponentUrl = (elementName, componentUrl) => {\n            componentUrls[elementName] = componentUrl;\n        };\n        const addCustomElements = (customElements) => {\n            if (isObject(customElements)) {\n                each$d(customElements, (spec, name) => {\n                    const componentUrl = spec.componentUrl;\n                    if (isString(componentUrl)) {\n                        addComponentUrl(name, componentUrl);\n                    }\n                    addCustomElement(name, spec);\n                });\n            }\n            else if (isString(customElements)) {\n                addCustomElementsFromString(customElements);\n            }\n        };\n        // Adds valid children to the schema object\n        const addValidChildren = (validChildren) => {\n            each$e(parseValidChildrenRules(validChildren ?? ''), ({ operation, name, validChildren }) => {\n                const parent = operation === 'replace' ? { '#comment': {} } : children[name];\n                const processNodeName = (name) => {\n                    if (operation === 'remove') {\n                        delete parent[name];\n                    }\n                    else {\n                        parent[name] = {};\n                    }\n                };\n                const processPreset = (name) => {\n                    getElementsPreset(schemaType, name).each((names) => {\n                        each$e(names, processNodeName);\n                    });\n                };\n                each$e(validChildren, ({ preset, name }) => {\n                    if (preset) {\n                        processPreset(name);\n                    }\n                    else {\n                        processNodeName(name);\n                    }\n                });\n                children[name] = parent;\n            });\n        };\n        const getElementRule = (name) => {\n            const element = elements[name];\n            // Exact match found\n            if (element) {\n                return element;\n            }\n            // No exact match then try the patterns\n            let i = patternElements.length;\n            while (i--) {\n                const patternElement = patternElements[i];\n                if (patternElement.pattern.test(name)) {\n                    return patternElement;\n                }\n            }\n            return undefined;\n        };\n        const setup = () => {\n            if (!settings.valid_elements) {\n                // No valid elements defined then clone the elements from the schema spec\n                each$b(schemaItems, (element, name) => {\n                    elements[name] = {\n                        attributes: element.attributes,\n                        attributesOrder: element.attributesOrder\n                    };\n                    children[name] = element.children;\n                });\n                // Prefer strong/em over b/i\n                each$b(split$1('strong/b em/i'), (item) => {\n                    const items = split$1(item, '/');\n                    elements[items[1]].outputName = items[0];\n                });\n                // Add default alt attribute for images, removed since alt=\"\" is treated as presentational.\n                // elements.img.attributesDefault = [{name: 'alt', value: ''}];\n                // By default,\n                // - padd the text inline element if it is empty and also a child of an empty root block\n                // - in all other cases, remove the text inline element if it is empty\n                each$b(textInlineElementsMap, (_val, name) => {\n                    if (elements[name]) {\n                        if (settings.padd_empty_block_inline_children) {\n                            elements[name].paddInEmptyBlock = true;\n                        }\n                        elements[name].removeEmpty = true;\n                    }\n                });\n                // Remove these if they are empty by default\n                each$b(split$1('ol ul blockquote a table tbody'), (name) => {\n                    if (elements[name]) {\n                        elements[name].removeEmpty = true;\n                    }\n                });\n                // Padd these by default\n                each$b(split$1('p h1 h2 h3 h4 h5 h6 th td pre div address caption li summary'), (name) => {\n                    if (elements[name]) {\n                        elements[name].paddEmpty = true;\n                    }\n                });\n                // Remove these if they have no attributes\n                each$b(split$1('span'), (name) => {\n                    elements[name].removeEmptyAttrs = true;\n                });\n                // Remove these by default\n                // TODO: Reenable in 4.1\n                /* each(split('script style'), function(name) {\n                 delete elements[name];\n                 });*/\n            }\n            else {\n                setValidElements(settings.valid_elements);\n                each$b(schemaItems, (element, name) => {\n                    children[name] = element.children;\n                });\n            }\n            // Opt in is done with options like `extended_valid_elements`\n            delete elements.svg;\n            addCustomElements(settings.custom_elements);\n            addValidChildren(settings.valid_children);\n            addValidElements(settings.extended_valid_elements);\n            // Todo: Remove this when we fix list handling to be valid\n            addValidChildren('+ol[ul|ol],+ul[ul|ol]');\n            // Some elements are not valid by themselves - require parents\n            each$b({\n                dd: 'dl',\n                dt: 'dl',\n                li: 'ul ol',\n                td: 'tr',\n                th: 'tr',\n                tr: 'tbody thead tfoot',\n                tbody: 'table',\n                thead: 'table',\n                tfoot: 'table',\n                legend: 'fieldset',\n                area: 'map',\n                param: 'video audio object'\n            }, (parents, item) => {\n                if (elements[item]) {\n                    elements[item].parentsRequired = split$1(parents);\n                }\n            });\n            // Delete invalid elements\n            if (settings.invalid_elements) {\n                each$b(explode$2(settings.invalid_elements), (item) => {\n                    if (elements[item]) {\n                        delete elements[item];\n                    }\n                });\n            }\n            // If the user didn't allow span only allow internal spans\n            if (!getElementRule('span')) {\n                addValidElements('span[!data-mce-type|*]');\n            }\n        };\n        /**\n         * Name/value map object with valid parents and children to those parents.\n         *\n         * @field children\n         * @type Object\n         * @example\n         * children = {\n         *    div: { p:{}, h1:{} }\n         * };\n         */\n        /**\n         * Name/value map object with valid styles for each element.\n         *\n         * @method getValidStyles\n         * @type Object\n         */\n        const getValidStyles = constant(validStyles);\n        /**\n         * Name/value map object with valid styles for each element.\n         *\n         * @method getInvalidStyles\n         * @type Object\n         */\n        const getInvalidStyles = constant(invalidStyles);\n        /**\n         * Name/value map object with valid classes for each element.\n         *\n         * @method getValidClasses\n         * @type Object\n         */\n        const getValidClasses = constant(validClasses);\n        /**\n         * Returns a map with boolean attributes.\n         *\n         * @method getBoolAttrs\n         * @return {Object} Name/value lookup map for boolean attributes.\n         */\n        const getBoolAttrs = constant(boolAttrMap);\n        /**\n         * Returns a map with block elements.\n         *\n         * @method getBlockElements\n         * @return {Object} Name/value lookup map for block elements.\n         */\n        const getBlockElements = constant(blockElementsMap);\n        /**\n         * Returns a map with text block elements. For example: <code>&#60;p&#62;</code>, <code>&#60;h1&#62;</code> to <code>&#60;h6&#62;</code>, <code>&#60;div&#62;</code> or <code>&#60;address&#62;</code>.\n         *\n         * @method getTextBlockElements\n         * @return {Object} Name/value lookup map for block elements.\n         */\n        const getTextBlockElements = constant(textBlockElementsMap);\n        /**\n         * Returns a map of inline text format nodes. For example: <code>&#60;strong&#62;</code>, <code>&#60;span&#62;</code> or <code>&#60;ins&#62;</code>.\n         *\n         * @method getTextInlineElements\n         * @return {Object} Name/value lookup map for text format elements.\n         */\n        const getTextInlineElements = constant(textInlineElementsMap);\n        /**\n         * Returns a map with void elements. For example: <code>&#60;br&#62;</code> or <code>&#60;img&#62;</code>.\n         *\n         * @method getVoidElements\n         * @return {Object} Name/value lookup map for void elements.\n         */\n        const getVoidElements = constant(Object.seal(voidElementsMap));\n        /**\n         * Returns a map with self closing tags. For example: <code>&#60;li&#62;</code>.\n         *\n         * @method getSelfClosingElements\n         * @return {Object} Name/value lookup map for self closing tags elements.\n         */\n        const getSelfClosingElements = constant(selfClosingElementsMap);\n        /**\n         * Returns a map with elements that should be treated as contents regardless if it has text\n         * content in them or not. For example: <code>&#60;td&#62;</code>, <code>&#60;video&#62;</code> or <code>&#60;img&#62;</code>.\n         *\n         * @method getNonEmptyElements\n         * @return {Object} Name/value lookup map for non empty elements.\n         */\n        const getNonEmptyElements = constant(nonEmptyElementsMap);\n        /**\n         * Returns a map with elements that the caret should be moved in front of after enter is\n         * pressed.\n         *\n         * @method getMoveCaretBeforeOnEnterElements\n         * @return {Object} Name/value lookup map for elements to place the caret in front of.\n         */\n        const getMoveCaretBeforeOnEnterElements = constant(moveCaretBeforeOnEnterElementsMap);\n        /**\n         * Returns a map with elements where white space is to be preserved. For example: <code>&#60;pre&#62;</code> or <code>&#60;script&#62;</code>.\n         *\n         * @method getWhitespaceElements\n         * @return {Object} Name/value lookup map for white space elements.\n         */\n        const getWhitespaceElements = constant(whitespaceElementsMap);\n        /**\n         * Returns a map with elements that should be treated as transparent.\n         *\n         * @method getTransparentElements\n         * @return {Object} Name/value lookup map for special elements.\n         */\n        const getTransparentElements = constant(transparentElementsMap);\n        const getWrapBlockElements = constant(wrapBlockElementsMap);\n        /**\n         * Returns a map with special elements. These are elements that needs to be parsed\n         * in a special way such as script, style, textarea etc. The map object values\n         * are regexps used to find the end of the element.\n         *\n         * @method getSpecialElements\n         * @return {Object} Name/value lookup map for special elements.\n         */\n        const getSpecialElements = constant(Object.seal(specialElements));\n        /**\n         * Returns true/false if the specified element and it's child is valid or not\n         * according to the schema.\n         *\n         * @method isValidChild\n         * @param {String} name Element name to check for.\n         * @param {String} child Element child to verify.\n         * @return {Boolean} True/false if the element is a valid child of the specified parent.\n         */\n        const isValidChild = (name, child) => {\n            const parent = children[name.toLowerCase()];\n            return !!(parent && parent[child.toLowerCase()]);\n        };\n        /**\n         * Returns true/false if the specified element name and optional attribute is\n         * valid according to the schema.\n         *\n         * @method isValid\n         * @param {String} name Name of element to check.\n         * @param {String} attr Optional attribute name to check for.\n         * @return {Boolean} True/false if the element and attribute is valid.\n         */\n        const isValid = (name, attr) => {\n            const rule = getElementRule(name);\n            // Check if it's a valid element\n            if (rule) {\n                if (attr) {\n                    // Check if attribute name exists\n                    if (rule.attributes[attr]) {\n                        return true;\n                    }\n                    // Check if attribute matches a regexp pattern\n                    const attrPatterns = rule.attributePatterns;\n                    if (attrPatterns) {\n                        let i = attrPatterns.length;\n                        while (i--) {\n                            if (attrPatterns[i].pattern.test(attr)) {\n                                return true;\n                            }\n                        }\n                    }\n                }\n                else {\n                    return true;\n                }\n            }\n            // No match\n            return false;\n        };\n        const isBlock = (name) => has$2(getBlockElements(), name);\n        // Check if name starts with # to detect non-element node names like #text and #comment\n        const isInline = (name) => !startsWith(name, '#') && isValid(name) && !isBlock(name);\n        const isWrapper = (name) => has$2(getWrapBlockElements(), name) || isInline(name);\n        /**\n         * Returns true/false if the specified element is valid or not\n         * according to the schema.\n         *\n         * @method getElementRule\n         * @param {String} name Element name to check for.\n         * @return {Object} Element object or undefined if the element isn't valid.\n         */\n        /**\n         * Returns an map object of all custom elements.\n         *\n         * @method getCustomElements\n         * @return {Object} Name/value map object of all custom elements.\n         */\n        const getCustomElements = constant(customElementsMap);\n        /**\n         * Parses a valid elements string and adds it to the schema. The valid elements\n         * format is for example <code>element[attr=default|otherattr]</code>.\n         * Existing rules will be replaced with the ones specified, so this extends the schema.\n         *\n         * @method addValidElements\n         * @param {String} valid_elements String in the valid elements format to be parsed.\n         */\n        /**\n         * Parses a valid elements string and sets it to the schema. The valid elements\n         * format is for example <code>element[attr=default|otherattr]</code>.\n         * Existing rules will be replaced with the ones specified, so this extends the schema.\n         *\n         * @method setValidElements\n         * @param {String} valid_elements String in the valid elements format to be parsed.\n         */\n        /**\n         * Adds custom non-HTML elements to the schema. For more information about adding custom elements see:\n         * <a href=\"https://www.tiny.cloud/docs/tinymce/latest/content-filtering/#custom_elements\">custom_elements</a>\n         *\n         * @method addCustomElements\n         * @param {String/Object} custom_elements Comma separated list or record of custom elements to add.\n         */\n        /**\n         * Parses a valid children string and adds them to the schema structure. The valid children\n         * format is for example <code>element[child1|child2]</code>.\n         *\n         * @method addValidChildren\n         * @param {String} valid_children Valid children elements string to parse\n         */\n        /**\n         * Returns an object of all custom elements that have component URLs.\n         *\n         * @method getComponentUrls\n         * @return {Object} Object with where key is the component and the value is the url for that component.\n         */\n        const getComponentUrls = constant(componentUrls);\n        setup();\n        return {\n            type: schemaType,\n            children,\n            elements,\n            getValidStyles,\n            getValidClasses,\n            getBlockElements,\n            getInvalidStyles,\n            getVoidElements,\n            getTextBlockElements,\n            getTextInlineElements,\n            getBoolAttrs,\n            getElementRule,\n            getSelfClosingElements,\n            getNonEmptyElements,\n            getMoveCaretBeforeOnEnterElements,\n            getWhitespaceElements,\n            getTransparentElements,\n            getSpecialElements,\n            getComponentUrls,\n            isValidChild,\n            isValid,\n            isBlock,\n            isInline,\n            isWrapper,\n            getCustomElements,\n            addValidElements,\n            setValidElements,\n            addCustomElements,\n            addValidChildren,\n        };\n    };\n\n    const hexColour = (value) => ({\n        value: normalizeHex(value)\n    });\n    const normalizeHex = (hex) => removeLeading(hex, '#').toUpperCase();\n    const toHex = (component) => {\n        const hex = component.toString(16);\n        return (hex.length === 1 ? '0' + hex : hex).toUpperCase();\n    };\n    const fromRgba = (rgbaColour) => {\n        const value = toHex(rgbaColour.red) + toHex(rgbaColour.green) + toHex(rgbaColour.blue);\n        return hexColour(value);\n    };\n\n    const rgbRegex = /^\\s*rgb\\s*\\(\\s*(\\d+)\\s*[,\\s]\\s*(\\d+)\\s*[,\\s]\\s*(\\d+)\\s*\\)\\s*$/i;\n    // This regex will match rgba(0, 0, 0, 0.5) or rgba(0, 0, 0, 50%) , or without commas\n    const rgbaRegex = /^\\s*rgba\\s*\\(\\s*(\\d+)\\s*[,\\s]\\s*(\\d+)\\s*[,\\s]\\s*(\\d+)\\s*[,\\s]\\s*((?:\\d?\\.\\d+|\\d+)%?)\\s*\\)\\s*$/i;\n    const rgbaColour = (red, green, blue, alpha) => ({\n        red,\n        green,\n        blue,\n        alpha\n    });\n    const fromStringValues = (red, green, blue, alpha) => {\n        const r = parseInt(red, 10);\n        const g = parseInt(green, 10);\n        const b = parseInt(blue, 10);\n        const a = parseFloat(alpha);\n        return rgbaColour(r, g, b, a);\n    };\n    const getColorFormat = (colorString) => {\n        if (rgbRegex.test(colorString)) {\n            return 'rgb';\n        }\n        else if (rgbaRegex.test(colorString)) {\n            return 'rgba';\n        }\n        return 'other';\n    };\n    const fromString = (rgbaString) => {\n        const rgbMatch = rgbRegex.exec(rgbaString);\n        if (rgbMatch !== null) {\n            return Optional.some(fromStringValues(rgbMatch[1], rgbMatch[2], rgbMatch[3], '1'));\n        }\n        const rgbaMatch = rgbaRegex.exec(rgbaString);\n        if (rgbaMatch !== null) {\n            return Optional.some(fromStringValues(rgbaMatch[1], rgbaMatch[2], rgbaMatch[3], rgbaMatch[4]));\n        }\n        return Optional.none();\n    };\n    const toString = (rgba) => `rgba(${rgba.red},${rgba.green},${rgba.blue},${rgba.alpha})`;\n\n    const rgbaToHexString = (color) => fromString(color)\n        .map(fromRgba)\n        .map((h) => '#' + h.value)\n        .getOr(color);\n\n    /**\n     * This class is used to parse CSS styles. It also compresses styles to reduce the output size.\n     *\n     * @class tinymce.html.Styles\n     * @version 3.4\n     * @example\n     * const Styles = tinymce.html.Styles({\n     *   url_converter: (url) => {\n     *     return url;\n     *   }\n     * });\n     *\n     * styles = Styles.parse('border: 1px solid red');\n     * styles.color = 'red';\n     *\n     * console.log(tinymce.html.Styles().serialize(styles));\n     */\n    const Styles = (settings = {}, schema) => {\n        /* jshint maxlen:255 */\n        /* eslint max-len:0 */\n        const urlOrStrRegExp = /(?:url(?:(?:\\(\\s*\\\"([^\\\"]+)\\\"\\s*\\))|(?:\\(\\s*\\'([^\\']+)\\'\\s*\\))|(?:\\(\\s*([^)\\s]+)\\s*\\))))|(?:\\'([^\\']+)\\')|(?:\\\"([^\\\"]+)\\\")/gi;\n        const styleRegExp = /\\s*([^:]+):\\s*([^;]+);?/g;\n        const trimRightRegExp = /\\s+$/;\n        const encodingLookup = {};\n        let validStyles;\n        let invalidStyles;\n        const invisibleChar = zeroWidth;\n        if (schema) {\n            validStyles = schema.getValidStyles();\n            invalidStyles = schema.getInvalidStyles();\n        }\n        const encodingItems = (`\\\\\" \\\\' \\\\; \\\\: ; : ` + invisibleChar).split(' ');\n        for (let i = 0; i < encodingItems.length; i++) {\n            encodingLookup[encodingItems[i]] = invisibleChar + i;\n            encodingLookup[invisibleChar + i] = encodingItems[i];\n        }\n        // eslint-disable-next-line consistent-this\n        const self = {\n            /**\n             * Parses the specified style value into an object collection. This parser will also\n             * merge and remove any redundant items that browsers might have added. URLs inside\n             * the styles will also be converted to absolute/relative based on the settings.\n             *\n             * @method parse\n             * @param {String} css Style value to parse. For example: `border:1px solid red;`\n             * @return {Object} Object representation of that style. For example: `{ border: '1px solid red' }`\n             */\n            parse: (css) => {\n                const styles = {};\n                let isEncoded = false;\n                const urlConverter = settings.url_converter;\n                const urlConverterScope = settings.url_converter_scope || self;\n                const compress = (prefix, suffix, noJoin) => {\n                    const top = styles[prefix + '-top' + suffix];\n                    if (!top) {\n                        return;\n                    }\n                    const right = styles[prefix + '-right' + suffix];\n                    if (!right) {\n                        return;\n                    }\n                    const bottom = styles[prefix + '-bottom' + suffix];\n                    if (!bottom) {\n                        return;\n                    }\n                    const left = styles[prefix + '-left' + suffix];\n                    if (!left) {\n                        return;\n                    }\n                    const box = [top, right, bottom, left];\n                    let i = box.length - 1;\n                    while (i--) {\n                        if (box[i] !== box[i + 1]) {\n                            break;\n                        }\n                    }\n                    if (i > -1 && noJoin) {\n                        return;\n                    }\n                    styles[prefix + suffix] = i === -1 ? box[0] : box.join(' ');\n                    delete styles[prefix + '-top' + suffix];\n                    delete styles[prefix + '-right' + suffix];\n                    delete styles[prefix + '-bottom' + suffix];\n                    delete styles[prefix + '-left' + suffix];\n                };\n                /**\n                 * Checks if the specific style can be compressed in other words if all border-width are equal.\n                 */\n                const canCompress = (key) => {\n                    const value = styles[key];\n                    if (!value) {\n                        return;\n                    }\n                    // Make sure not to split values like 'rgb(100, 50, 100);\n                    const values = value.indexOf(',') > -1 ? [value] : value.split(' ');\n                    let i = values.length;\n                    while (i--) {\n                        if (values[i] !== values[0]) {\n                            return false;\n                        }\n                    }\n                    styles[key] = values[0];\n                    return true;\n                };\n                /**\n                 * Compresses multiple styles into one style.\n                 */\n                const compress2 = (target, a, b, c) => {\n                    if (!canCompress(a)) {\n                        return;\n                    }\n                    if (!canCompress(b)) {\n                        return;\n                    }\n                    if (!canCompress(c)) {\n                        return;\n                    }\n                    // Compress\n                    styles[target] = styles[a] + ' ' + styles[b] + ' ' + styles[c];\n                    delete styles[a];\n                    delete styles[b];\n                    delete styles[c];\n                };\n                // Encodes the specified string by replacing all \\\" \\' ; : with _<num>\n                const encode = (str) => {\n                    isEncoded = true;\n                    return encodingLookup[str];\n                };\n                // Decodes the specified string by replacing all _<num> with it's original value \\\" \\' etc\n                // It will also decode the \\\" \\' if keepSlashes is set to false or omitted\n                const decode = (str, keepSlashes) => {\n                    if (isEncoded) {\n                        str = str.replace(/\\uFEFF[0-9]/g, (str) => {\n                            return encodingLookup[str];\n                        });\n                    }\n                    if (!keepSlashes) {\n                        str = str.replace(/\\\\([\\'\\\";:])/g, '$1');\n                    }\n                    return str;\n                };\n                const decodeSingleHexSequence = (escSeq) => {\n                    return String.fromCharCode(parseInt(escSeq.slice(1), 16));\n                };\n                const decodeHexSequences = (value) => {\n                    return value.replace(/\\\\[0-9a-f]+/gi, decodeSingleHexSequence);\n                };\n                const processUrl = (match, url, url2, url3, str, str2) => {\n                    str = str || str2;\n                    if (str) {\n                        str = decode(str);\n                        // Force strings into single quote format\n                        return `'` + str.replace(/\\'/g, `\\\\'`) + `'`;\n                    }\n                    url = decode(url || url2 || url3 || '');\n                    if (!settings.allow_script_urls) {\n                        const scriptUrl = url.replace(/[\\s\\r\\n]+/g, '');\n                        if (/(java|vb)script:/i.test(scriptUrl)) {\n                            return '';\n                        }\n                        if (!settings.allow_svg_data_urls && /^data:image\\/svg/i.test(scriptUrl)) {\n                            return '';\n                        }\n                    }\n                    // Convert the URL to relative/absolute depending on config\n                    if (urlConverter) {\n                        url = urlConverter.call(urlConverterScope, url, 'style');\n                    }\n                    // Output new URL format\n                    return `url('` + url.replace(/\\'/g, `\\\\'`) + `')`;\n                };\n                if (css) {\n                    css = css.replace(/[\\u0000-\\u001F]/g, '');\n                    // Encode \\\" \\' % and ; and : inside strings so they don't interfere with the style parsing\n                    css = css.replace(/\\\\[\\\"\\';:\\uFEFF]/g, encode).replace(/\\\"[^\\\"]+\\\"|\\'[^\\']+\\'/g, (str) => {\n                        return str.replace(/[;:]/g, encode);\n                    });\n                    // Parse styles\n                    let matches;\n                    while ((matches = styleRegExp.exec(css))) {\n                        styleRegExp.lastIndex = matches.index + matches[0].length;\n                        let name = matches[1].replace(trimRightRegExp, '');\n                        let value = matches[2].replace(trimRightRegExp, '');\n                        if (name && value) {\n                            // Decode escaped sequences like \\65 -> e\n                            name = decodeHexSequences(name);\n                            value = decodeHexSequences(value);\n                            // Custom properties (--*) keep user case; standard names normalize to lowercase\n                            if (!name.startsWith('--')) {\n                                name = name.toLowerCase();\n                            }\n                            // Skip properties with double quotes and sequences like \\\" \\' in their names\n                            // See 'mXSS Attacks: Attacking well-secured Web-Applications by using innerHTML Mutations'\n                            // https://cure53.de/fp170.pdf\n                            if (name.indexOf(invisibleChar) !== -1 || name.indexOf('\"') !== -1) {\n                                continue;\n                            }\n                            // Don't allow behavior name or expression/comments within the values\n                            if (!settings.allow_script_urls && (name === 'behavior' || /expression\\s*\\(|\\/\\*|\\*\\//.test(value))) {\n                                continue;\n                            }\n                            // Opera will produce 700 instead of bold in their style values\n                            if (name === 'font-weight' && value === '700') {\n                                value = 'bold';\n                            }\n                            // Convert RGB colors to HEX\n                            if (getColorFormat(value) === 'rgb') {\n                                fromString(value).each((rgba) => {\n                                    value = rgbaToHexString(toString(rgba)).toLowerCase();\n                                });\n                            }\n                            // Convert URLs and force them into url('value') format\n                            value = value.replace(urlOrStrRegExp, processUrl);\n                            styles[name] = isEncoded ? decode(value, true) : value;\n                        }\n                    }\n                    // Compress the styles to reduce it's size for example IE will expand styles\n                    compress('border', '', true);\n                    compress('border', '-width');\n                    compress('border', '-color');\n                    compress('border', '-style');\n                    compress('padding', '');\n                    compress('margin', '');\n                    if (!/(#.* rgb(a?)\\(.*)|(rgb(a?)\\(.*\\) )/.test(styles['border-color'])) {\n                        compress2('border', 'border-width', 'border-style', 'border-color');\n                    }\n                    // Remove pointless border, IE produces these\n                    if (styles.border === 'medium none') {\n                        delete styles.border;\n                    }\n                    // IE 11 will produce a border-image: none when getting the style attribute from <p style=\"border: 1px solid red\"></p>\n                    // So let us assume it shouldn't be there\n                    if (styles['border-image'] === 'none') {\n                        delete styles['border-image'];\n                    }\n                }\n                return styles;\n            },\n            /**\n             * Serializes the specified style object into a string.\n             *\n             * @method serialize\n             * @param {Object} styles Object to serialize as string. For example: `{ border: '1px solid red' }`\n             * @param {String} elementName Optional element name, if specified only the styles that matches the schema will be serialized.\n             * @return {String} String representation of the style object. For example: `border: 1px solid red`\n             */\n            serialize: (styles, elementName) => {\n                let css = '';\n                const serializeStyles = (elemName, validStyleList) => {\n                    const styleList = validStyleList[elemName];\n                    if (styleList) {\n                        for (let i = 0, l = styleList.length; i < l; i++) {\n                            const name = styleList[i];\n                            const value = styles[name];\n                            if (value) {\n                                css += (css.length > 0 ? ' ' : '') + name + ': ' + value + ';';\n                            }\n                        }\n                    }\n                };\n                const isValid = (name, elemName) => {\n                    if (!invalidStyles || !elemName) {\n                        return true;\n                    }\n                    let styleMap = invalidStyles['*'];\n                    if (styleMap && styleMap[name]) {\n                        return false;\n                    }\n                    styleMap = invalidStyles[elemName];\n                    return !(styleMap && styleMap[name]);\n                };\n                // Serialize styles according to schema\n                if (elementName && validStyles) {\n                    // Serialize global styles and element specific styles\n                    serializeStyles('*', validStyles);\n                    serializeStyles(elementName, validStyles);\n                }\n                else {\n                    // Output the styles in the order they are inside the object\n                    each$d(styles, (value, name) => {\n                        if (value && isValid(name, elementName)) {\n                            css += (css.length > 0 ? ' ' : '') + name + ': ' + value + ';';\n                        }\n                    });\n                }\n                return css;\n            }\n        };\n        return self;\n    };\n\n    // Note: The values here aren't used. This is just used as a hash map to see if the key exists\n    const deprecated = {\n        keyLocation: true,\n        layerX: true,\n        layerY: true,\n        returnValue: true,\n        webkitMovementX: true,\n        webkitMovementY: true,\n        keyIdentifier: true,\n        mozPressure: true,\n        mozInputSource: true,\n    };\n    // Note: We can't rely on `instanceof` here as it won't work if the event was fired from another window.\n    // Additionally, the constructor name might be `MouseEvent` or similar so we can't rely on the constructor name.\n    const isNativeEvent = (event) => event instanceof Event || isFunction(event.initEvent);\n    // Checks if it is our own isDefaultPrevented function\n    const hasIsDefaultPrevented = (event) => event.isDefaultPrevented === always || event.isDefaultPrevented === never;\n    // An event needs normalizing if it doesn't have the prevent default function or if it's a native event\n    const needsNormalizing = (event) => isNullable(event.preventDefault) || isNativeEvent(event);\n    const clone$2 = (originalEvent, data) => {\n        const event = data ?? {};\n        // Copy all properties from the original event\n        for (const name in originalEvent) {\n            // Some properties are deprecated and produces a warning so don't include them\n            if (!has$2(deprecated, name)) {\n                event[name] = originalEvent[name];\n            }\n        }\n        // The composed path can't be cloned, so delegate instead\n        if (isNonNullable(originalEvent.composedPath)) {\n            // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n            event.composedPath = () => originalEvent.composedPath();\n        }\n        // The getModifierState won't work when cloned, so delegate instead\n        if (isNonNullable(originalEvent.getModifierState)) {\n            // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n            event.getModifierState = (keyArg) => originalEvent.getModifierState(keyArg);\n        }\n        // The getTargetRanges won't work when cloned, so delegate instead\n        if (isNonNullable(originalEvent.getTargetRanges)) {\n            // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n            event.getTargetRanges = () => originalEvent.getTargetRanges();\n        }\n        return event;\n    };\n    const normalize$3 = (type, originalEvent, fallbackTarget, data) => {\n        const event = clone$2(originalEvent, data);\n        event.type = type;\n        // Normalize target IE uses srcElement\n        if (isNullable(event.target)) {\n            event.target = event.srcElement ?? fallbackTarget;\n        }\n        if (needsNormalizing(originalEvent)) {\n            // Add preventDefault method\n            event.preventDefault = () => {\n                event.defaultPrevented = true;\n                event.isDefaultPrevented = always;\n                // Execute preventDefault on the original event object\n                if (isFunction(originalEvent.preventDefault)) {\n                    originalEvent.preventDefault();\n                }\n            };\n            // Add stopPropagation\n            event.stopPropagation = () => {\n                event.cancelBubble = true;\n                event.isPropagationStopped = always;\n                // Execute stopPropagation on the original event object\n                if (isFunction(originalEvent.stopPropagation)) {\n                    originalEvent.stopPropagation();\n                }\n            };\n            // Add stopImmediatePropagation\n            event.stopImmediatePropagation = () => {\n                event.isImmediatePropagationStopped = always;\n                event.stopPropagation();\n            };\n            // Add event delegation states\n            if (!hasIsDefaultPrevented(event)) {\n                event.isDefaultPrevented = event.defaultPrevented === true ? always : never;\n                event.isPropagationStopped = event.cancelBubble === true ? always : never;\n                event.isImmediatePropagationStopped = never;\n            }\n        }\n        return event;\n    };\n\n    /**\n     * This class wraps the browsers native event logic with more convenient methods.\n     *\n     * @class tinymce.dom.EventUtils\n     */\n    const eventExpandoPrefix = 'mce-data-';\n    const mouseEventRe = /^(?:mouse|contextmenu)|click/;\n    /**\n     * Binds a native event to a callback on the speified target.\n     */\n    const addEvent = (target, name, callback, capture) => {\n        target.addEventListener(name, callback, capture || false);\n    };\n    /**\n     * Unbinds a native event callback on the specified target.\n     */\n    const removeEvent = (target, name, callback, capture) => {\n        target.removeEventListener(name, callback, capture || false);\n    };\n    const isMouseEvent = (event) => isNonNullable(event) && mouseEventRe.test(event.type);\n    /**\n     * Normalizes a native event object or just adds the event specific methods on a custom event.\n     */\n    const fix = (originalEvent, data) => {\n        const event = normalize$3(originalEvent.type, originalEvent, document, data);\n        // Calculate pageX/Y if missing and clientX/Y available\n        if (isMouseEvent(originalEvent) && isUndefined(originalEvent.pageX) && !isUndefined(originalEvent.clientX)) {\n            const eventDoc = event.target.ownerDocument || document;\n            const doc = eventDoc.documentElement;\n            const body = eventDoc.body;\n            const mouseEvent = event;\n            mouseEvent.pageX = originalEvent.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) -\n                (doc && doc.clientLeft || body && body.clientLeft || 0);\n            mouseEvent.pageY = originalEvent.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) -\n                (doc && doc.clientTop || body && body.clientTop || 0);\n        }\n        return event;\n    };\n    /**\n     * Bind a DOMContentLoaded event across browsers and executes the callback once the page DOM is initialized.\n     * It will also set/check the domLoaded state of the event_utils instance so ready isn't called multiple times.\n     */\n    const bindOnReady = (win, callback, eventUtils) => {\n        const doc = win.document, event = { type: 'ready' };\n        if (eventUtils.domLoaded) {\n            callback(event);\n            return;\n        }\n        const isDocReady = () => {\n            // Check complete or interactive state if there is a body\n            // element on some iframes IE 8 will produce a null body\n            return doc.readyState === 'complete' || (doc.readyState === 'interactive' && doc.body);\n        };\n        // Gets called when the DOM is ready\n        const readyHandler = () => {\n            removeEvent(win, 'DOMContentLoaded', readyHandler);\n            removeEvent(win, 'load', readyHandler);\n            if (!eventUtils.domLoaded) {\n                eventUtils.domLoaded = true;\n                callback(event);\n            }\n            // Clean memory for IE\n            win = null;\n        };\n        if (isDocReady()) {\n            readyHandler();\n        }\n        else {\n            addEvent(win, 'DOMContentLoaded', readyHandler);\n        }\n        // Fallback if any of the above methods should fail for some odd reason\n        if (!eventUtils.domLoaded) {\n            addEvent(win, 'load', readyHandler);\n        }\n    };\n    /**\n     * This class enables you to bind/unbind native events to elements and normalize it's behavior across browsers.\n     */\n    class EventUtils {\n        static Event = new EventUtils();\n        // State if the DOMContentLoaded was executed or not\n        domLoaded = false;\n        events = {};\n        expando;\n        hasFocusIn;\n        count = 1;\n        constructor() {\n            this.expando = eventExpandoPrefix + (+new Date()).toString(32);\n            this.hasFocusIn = 'onfocusin' in document.documentElement;\n            this.count = 1;\n        }\n        bind(target, names, callback, scope) {\n            const self = this;\n            let callbackList;\n            const win = window;\n            // Native event handler function patches the event and executes the callbacks for the expando\n            const defaultNativeHandler = (evt) => {\n                self.executeHandlers(fix(evt || win.event), id);\n            };\n            // Don't bind to text nodes or comments\n            if (!target || isText$b(target) || isComment(target)) {\n                return callback;\n            }\n            // Create or get events id for the target\n            let id;\n            if (!target[self.expando]) {\n                id = self.count++;\n                target[self.expando] = id;\n                self.events[id] = {};\n            }\n            else {\n                id = target[self.expando];\n            }\n            // Setup the specified scope or use the target as a default\n            scope = scope || target;\n            // Split names and bind each event, enables you to bind multiple events with one call\n            const namesList = names.split(' ');\n            let i = namesList.length;\n            while (i--) {\n                let name = namesList[i];\n                let nativeHandler = defaultNativeHandler;\n                let capture = false;\n                let fakeName = false;\n                // Use ready instead of DOMContentLoaded\n                if (name === 'DOMContentLoaded') {\n                    name = 'ready';\n                }\n                // DOM is already ready\n                if (self.domLoaded && name === 'ready' && target.readyState === 'complete') {\n                    callback.call(scope, fix({ type: name }));\n                    continue;\n                }\n                // Fake bubbling of focusin/focusout\n                if (!self.hasFocusIn && (name === 'focusin' || name === 'focusout')) {\n                    capture = true;\n                    fakeName = name === 'focusin' ? 'focus' : 'blur';\n                    nativeHandler = (evt) => {\n                        const event = fix(evt || win.event);\n                        event.type = event.type === 'focus' ? 'focusin' : 'focusout';\n                        self.executeHandlers(event, id);\n                    };\n                }\n                // Setup callback list and bind native event\n                callbackList = self.events[id][name];\n                if (!callbackList) {\n                    self.events[id][name] = callbackList = [{ func: callback, scope }];\n                    callbackList.fakeName = fakeName;\n                    callbackList.capture = capture;\n                    // callbackList.callback = callback;\n                    // Add the nativeHandler to the callback list so that we can later unbind it\n                    callbackList.nativeHandler = nativeHandler;\n                    // Check if the target has native events support\n                    if (name === 'ready') {\n                        bindOnReady(target, nativeHandler, self);\n                    }\n                    else {\n                        addEvent(target, fakeName || name, nativeHandler, capture);\n                    }\n                }\n                else {\n                    if (name === 'ready' && self.domLoaded) {\n                        callback(fix({ type: name }));\n                    }\n                    else {\n                        // If it already has an native handler then just push the callback\n                        callbackList.push({ func: callback, scope });\n                    }\n                }\n            }\n            target = callbackList = null; // Clean memory for IE\n            return callback;\n        }\n        unbind(target, names, callback) {\n            // Don't bind to text nodes or comments\n            if (!target || isText$b(target) || isComment(target)) {\n                return this;\n            }\n            // Unbind event or events if the target has the expando\n            const id = target[this.expando];\n            if (id) {\n                let eventMap = this.events[id];\n                // Specific callback\n                if (names) {\n                    const namesList = names.split(' ');\n                    let i = namesList.length;\n                    while (i--) {\n                        const name = namesList[i];\n                        const callbackList = eventMap[name];\n                        // Unbind the event if it exists in the map\n                        if (callbackList) {\n                            // Remove specified callback\n                            if (callback) {\n                                let ci = callbackList.length;\n                                while (ci--) {\n                                    if (callbackList[ci].func === callback) {\n                                        const nativeHandler = callbackList.nativeHandler;\n                                        const fakeName = callbackList.fakeName, capture = callbackList.capture;\n                                        // Clone callbackList since unbind inside a callback would otherwise break the handlers loop\n                                        const newCallbackList = callbackList.slice(0, ci).concat(callbackList.slice(ci + 1));\n                                        newCallbackList.nativeHandler = nativeHandler;\n                                        newCallbackList.fakeName = fakeName;\n                                        newCallbackList.capture = capture;\n                                        eventMap[name] = newCallbackList;\n                                    }\n                                }\n                            }\n                            // Remove all callbacks if there isn't a specified callback or there is no callbacks left\n                            if (!callback || callbackList.length === 0) {\n                                delete eventMap[name];\n                                removeEvent(target, callbackList.fakeName || name, callbackList.nativeHandler, callbackList.capture);\n                            }\n                        }\n                    }\n                }\n                else {\n                    // All events for a specific element\n                    each$d(eventMap, (callbackList, name) => {\n                        removeEvent(target, callbackList.fakeName || name, callbackList.nativeHandler, callbackList.capture);\n                    });\n                    eventMap = {};\n                }\n                // Check if object is empty, if it isn't then we won't remove the expando map\n                for (const name in eventMap) {\n                    if (has$2(eventMap, name)) {\n                        return this;\n                    }\n                }\n                // Delete event object\n                delete this.events[id];\n                // Remove expando from target\n                try {\n                    // IE will fail here since it can't delete properties from window\n                    delete target[this.expando];\n                }\n                catch {\n                    // IE will set it to null\n                    target[this.expando] = null;\n                }\n            }\n            return this;\n        }\n        /**\n         * Fires the specified event on the specified target.\n         * <br>\n         * <em>Deprecated in TinyMCE 6.0 and has been marked for removal in TinyMCE 7.0. Use <code>dispatch</code> instead.</em>\n         *\n         * @method fire\n         * @param {Object} target Target node/window or custom object.\n         * @param {String} name Event name to fire.\n         * @param {Object} args Optional arguments to send to the observers.\n         * @return {EventUtils} Event utils instance.\n         * @deprecated Use dispatch() instead\n         */\n        fire(target, name, args) {\n            return this.dispatch(target, name, args);\n        }\n        /**\n         * Dispatches the specified event on the specified target.\n         *\n         * @method dispatch\n         * @param {Node/window} target Target node/window or custom object.\n         * @param {String} name Event name to dispatch.\n         * @param {Object} args Optional arguments to send to the observers.\n         * @return {EventUtils} Event utils instance.\n         */\n        dispatch(target, name, args) {\n            // Don't bind to text nodes or comments\n            if (!target || isText$b(target) || isComment(target)) {\n                return this;\n            }\n            // Build event object by patching the args\n            const event = fix({ type: name, target }, args);\n            do {\n                // Found an expando that means there is listeners to execute\n                const id = target[this.expando];\n                if (id) {\n                    this.executeHandlers(event, id);\n                }\n                // Walk up the DOM\n                target = target.parentNode || target.ownerDocument || target.defaultView || target.parentWindow;\n            } while (target && !event.isPropagationStopped());\n            return this;\n        }\n        /**\n         * Removes all bound event listeners for the specified target. This will also remove any bound\n         * listeners to child nodes within that target.\n         *\n         * @method clean\n         * @param {Object} target Target node/window object.\n         * @return {EventUtils} Event utils instance.\n         */\n        clean(target) {\n            // Don't bind to text nodes or comments\n            if (!target || isText$b(target) || isComment(target)) {\n                return this;\n            }\n            // Unbind any element on the specified target\n            if (target[this.expando]) {\n                this.unbind(target);\n            }\n            // Target doesn't have getElementsByTagName it's probably a window object then use it's document to find the children\n            if (!target.getElementsByTagName) {\n                target = target.document;\n            }\n            // Remove events from each child element\n            if (target && target.getElementsByTagName) {\n                this.unbind(target);\n                const children = target.getElementsByTagName('*');\n                let i = children.length;\n                while (i--) {\n                    target = children[i];\n                    if (target[this.expando]) {\n                        this.unbind(target);\n                    }\n                }\n            }\n            return this;\n        }\n        /**\n         * Destroys the event object. Call this to remove memory leaks.\n         */\n        destroy() {\n            this.events = {};\n        }\n        // Legacy function for canceling events\n        cancel(e) {\n            if (e) {\n                e.preventDefault();\n                e.stopImmediatePropagation();\n            }\n            return false;\n        }\n        /**\n         * Executes all event handler callbacks for a specific event.\n         *\n         * @private\n         * @param {Event} evt Event object.\n         * @param {String} id Expando id value to look for.\n         */\n        executeHandlers(evt, id) {\n            const container = this.events[id];\n            const callbackList = container && container[evt.type];\n            if (callbackList) {\n                for (let i = 0, l = callbackList.length; i < l; i++) {\n                    const callback = callbackList[i];\n                    // Check if callback exists might be removed if a unbind is called inside the callback\n                    if (callback && callback.func.call(callback.scope, evt) === false) {\n                        evt.preventDefault();\n                    }\n                    // Should we stop propagation to immediate listeners\n                    if (evt.isImmediatePropagationStopped()) {\n                        return;\n                    }\n                }\n            }\n        }\n    }\n\n    /**\n     * Utility class for various DOM manipulation and retrieval functions.\n     *\n     * @class tinymce.dom.DOMUtils\n     * @example\n     * // Add a class to an element by id in the page\n     * tinymce.DOM.addClass('someid', 'someclass');\n     *\n     * // Add a class to an element by id inside the editor\n     * tinymce.activeEditor.dom.addClass('someid', 'someclass');\n     */\n    // Shorten names\n    const each$a = Tools.each;\n    const grep = Tools.grep;\n    const internalStyleName = 'data-mce-style';\n    const numericalCssMap = Tools.makeMap('fill-opacity font-weight line-height opacity orphans widows z-index zoom', ' ');\n    const legacySetAttribute = (elm, name, value) => {\n        if (isNullable(value) || value === '') {\n            remove$9(elm, name);\n        }\n        else {\n            set$5(elm, name, value);\n        }\n    };\n    // Convert camel cased names back to hyphenated names\n    const camelCaseToHyphens = (name) => name.replace(/[A-Z]/g, (v) => '-' + v.toLowerCase());\n    const findNodeIndex = (node, normalized) => {\n        let idx = 0;\n        if (node) {\n            for (let lastNodeType = node.nodeType, tempNode = node.previousSibling; tempNode; tempNode = tempNode.previousSibling) {\n                const nodeType = tempNode.nodeType;\n                // Normalize text nodes\n                if (normalized && isText$b(tempNode)) {\n                    if (nodeType === lastNodeType || !tempNode.data.length) {\n                        continue;\n                    }\n                }\n                idx++;\n                lastNodeType = nodeType;\n            }\n        }\n        return idx;\n    };\n    const updateInternalStyleAttr = (styles, elm) => {\n        const rawValue = get$a(elm, 'style');\n        const value = styles.serialize(styles.parse(rawValue), name(elm));\n        legacySetAttribute(elm, internalStyleName, value);\n    };\n    const convertStyleToString = (cssValue, cssName) => {\n        if (isNumber(cssValue)) {\n            return has$2(numericalCssMap, cssName) ? cssValue + '' : cssValue + 'px';\n        }\n        else {\n            return cssValue;\n        }\n    };\n    const applyStyle$1 = ($elm, cssName, cssValue) => {\n        const normalizedName = camelCaseToHyphens(cssName);\n        if (isNullable(cssValue) || cssValue === '') {\n            remove$7($elm, normalizedName);\n        }\n        else {\n            set$3($elm, normalizedName, convertStyleToString(cssValue, normalizedName));\n        }\n    };\n    const setupAttrHooks = (styles, settings, getContext) => {\n        const keepValues = settings.keep_values;\n        const keepUrlHook = {\n            set: (elm, value, name) => {\n                const sugarElm = SugarElement.fromDom(elm);\n                if (isFunction(settings.url_converter) && isNonNullable(value)) {\n                    value = settings.url_converter.call(settings.url_converter_scope || getContext(), String(value), name, elm);\n                }\n                const internalName = 'data-mce-' + name;\n                legacySetAttribute(sugarElm, internalName, value);\n                legacySetAttribute(sugarElm, name, value);\n            },\n            get: (elm, name) => {\n                const sugarElm = SugarElement.fromDom(elm);\n                return get$a(sugarElm, 'data-mce-' + name) || get$a(sugarElm, name);\n            }\n        };\n        const attrHooks = {\n            style: {\n                set: (elm, value) => {\n                    const sugarElm = SugarElement.fromDom(elm);\n                    if (keepValues) {\n                        legacySetAttribute(sugarElm, internalStyleName, value);\n                    }\n                    remove$9(sugarElm, 'style');\n                    // If setting a style then delegate to the css api, otherwise\n                    // this will cause issues when using a content security policy\n                    if (isString(value)) {\n                        setAll(sugarElm, styles.parse(value));\n                    }\n                },\n                get: (elm) => {\n                    const sugarElm = SugarElement.fromDom(elm);\n                    const value = get$a(sugarElm, internalStyleName) || get$a(sugarElm, 'style');\n                    return styles.serialize(styles.parse(value), name(sugarElm));\n                }\n            }\n        };\n        if (keepValues) {\n            attrHooks.href = attrHooks.src = keepUrlHook;\n        }\n        return attrHooks;\n    };\n    /**\n     * Constructs a new DOMUtils instance. Consult the TinyMCE Documentation for more details on settings etc for this class.\n     *\n     * @private\n     * @constructor\n     * @method DOMUtils\n     * @param {Document} doc Document reference to bind the utility class to.\n     * @param {settings} settings Optional settings collection.\n     */\n    const DOMUtils = (doc, settings = {}) => {\n        const addedStyles = {};\n        const win = window;\n        const files = {};\n        let counter = 0;\n        const stdMode = true;\n        const boxModel = true;\n        const styleSheetLoader = instance.forElement(SugarElement.fromDom(doc), {\n            contentCssCors: settings.contentCssCors,\n            referrerPolicy: settings.referrerPolicy,\n            crossOrigin: (url) => {\n                const crossOrigin = settings.crossOrigin;\n                if (isFunction(crossOrigin)) {\n                    return crossOrigin(url, 'stylesheet');\n                }\n                else {\n                    return undefined;\n                }\n            }\n        });\n        const boundEvents = [];\n        const schema = settings.schema ? settings.schema : Schema({});\n        const styles = Styles({\n            url_converter: settings.url_converter,\n            url_converter_scope: settings.url_converter_scope,\n        }, settings.schema);\n        const events = settings.ownEvents ? new EventUtils() : EventUtils.Event;\n        const blockElementsMap = schema.getBlockElements();\n        /**\n         * Returns true/false if the specified element is a block element or not.\n         *\n         * @method isBlock\n         * @param {Node/String} node Element/Node to check.\n         * @return {Boolean} True/False state if the node is a block element or not.\n         */\n        const isBlock = (node) => {\n            if (isString(node)) {\n                return has$2(blockElementsMap, node);\n            }\n            else {\n                return isElement$7(node) && (has$2(blockElementsMap, node.nodeName) || isTransparentBlock(schema, node));\n            }\n        };\n        const get = (elm) => elm && doc && isString(elm)\n            ? doc.getElementById(elm)\n            : elm;\n        const _get = (elm) => {\n            const value = get(elm);\n            return isNonNullable(value) ? SugarElement.fromDom(value) : null;\n        };\n        const getAttrib = (elm, name, defaultVal = '') => {\n            let value;\n            const $elm = _get(elm);\n            if (isNonNullable($elm) && isElement$8($elm)) {\n                const hook = attrHooks[name];\n                if (hook && hook.get) {\n                    value = hook.get($elm.dom, name);\n                }\n                else {\n                    value = get$a($elm, name);\n                }\n            }\n            return isNonNullable(value) ? value : defaultVal;\n        };\n        const getAttribs = (elm) => {\n            const node = get(elm);\n            return isNullable(node) ? [] : node.attributes;\n        };\n        const setAttrib = (elm, name, value) => {\n            run(elm, (e) => {\n                if (isElement$7(e)) {\n                    const $elm = SugarElement.fromDom(e);\n                    const val = value === '' ? null : value;\n                    const originalValue = get$a($elm, name);\n                    const hook = attrHooks[name];\n                    if (hook && hook.set) {\n                        hook.set($elm.dom, val, name);\n                    }\n                    else {\n                        legacySetAttribute($elm, name, val);\n                    }\n                    if (originalValue !== val && settings.onSetAttrib) {\n                        settings.onSetAttrib({\n                            attrElm: $elm.dom, // We lie here to not break backwards compatibility\n                            attrName: name,\n                            attrValue: val\n                        });\n                    }\n                }\n            });\n        };\n        const clone = (node, deep) => {\n            return node.cloneNode(deep);\n        };\n        const getRoot = () => settings.root_element || doc.body;\n        const getViewPort = (argWin) => {\n            const vp = getBounds(argWin);\n            // Returns viewport size excluding scrollbars\n            return {\n                x: vp.x,\n                y: vp.y,\n                w: vp.width,\n                h: vp.height\n            };\n        };\n        const getPos$1 = (elm, rootElm) => getPos(doc.body, get(elm), rootElm);\n        const setStyle = (elm, name, value) => {\n            run(elm, (e) => {\n                const $elm = SugarElement.fromDom(e);\n                applyStyle$1($elm, name, value);\n                if (settings.update_styles) {\n                    updateInternalStyleAttr(styles, $elm);\n                }\n            });\n        };\n        const setStyles = (elm, stylesArg) => {\n            run(elm, (e) => {\n                const $elm = SugarElement.fromDom(e);\n                each$d(stylesArg, (v, n) => {\n                    applyStyle$1($elm, n, v);\n                });\n                if (settings.update_styles) {\n                    updateInternalStyleAttr(styles, $elm);\n                }\n            });\n        };\n        const getStyle = (elm, name, computed) => {\n            const $elm = get(elm);\n            if (isNullable($elm) || (!isHTMLElement($elm) && !isSVGElement($elm))) {\n                return undefined;\n            }\n            if (computed) {\n                return get$8(SugarElement.fromDom($elm), camelCaseToHyphens(name));\n            }\n            else {\n                // Camelcase it, if needed\n                name = name.replace(/-(\\D)/g, (a, b) => b.toUpperCase());\n                if (name === 'float') {\n                    name = 'cssFloat';\n                }\n                return $elm.style ? $elm.style[name] : undefined;\n            }\n        };\n        const getSize = (elm) => {\n            const $elm = get(elm);\n            if (!$elm) {\n                return { w: 0, h: 0 };\n            }\n            let w = getStyle($elm, 'width');\n            let h = getStyle($elm, 'height');\n            // Non pixel value, then force offset/clientWidth\n            if (!w || w.indexOf('px') === -1) {\n                w = '0';\n            }\n            // Non pixel value, then force offset/clientWidth\n            if (!h || h.indexOf('px') === -1) {\n                h = '0';\n            }\n            return {\n                w: parseInt(w, 10) || $elm.offsetWidth || $elm.clientWidth,\n                h: parseInt(h, 10) || $elm.offsetHeight || $elm.clientHeight\n            };\n        };\n        const getRect = (elm) => {\n            const $elm = get(elm);\n            const pos = getPos$1($elm);\n            const size = getSize($elm);\n            return {\n                x: pos.x, y: pos.y,\n                w: size.w, h: size.h\n            };\n        };\n        const is = (elm, selector) => {\n            if (!elm) {\n                return false;\n            }\n            const elms = isArray$1(elm) ? elm : [elm];\n            return exists(elms, (e) => {\n                return is$2(SugarElement.fromDom(e), selector);\n            });\n        };\n        const getParents = (elm, selector, root, collect) => {\n            const result = [];\n            let node = get(elm);\n            collect = collect === undefined;\n            // Default root on inline mode\n            const resolvedRoot = root || (getRoot().nodeName !== 'BODY' ? getRoot().parentNode : null);\n            // Wrap node name as func\n            if (isString(selector)) {\n                if (selector === '*') {\n                    selector = isElement$7;\n                }\n                else {\n                    const selectorVal = selector;\n                    selector = (node) => is(node, selectorVal);\n                }\n            }\n            while (node) {\n                // TODO: Remove nullable check once TINY-6599 is complete\n                if (node === resolvedRoot || isNullable(node.nodeType) || isDocument$1(node) || isDocumentFragment(node)) {\n                    break;\n                }\n                if (!selector || selector(node)) {\n                    if (collect) {\n                        result.push(node);\n                    }\n                    else {\n                        return [node];\n                    }\n                }\n                node = node.parentNode;\n            }\n            return collect ? result : null;\n        };\n        const getParent = (node, selector, root) => {\n            const parents = getParents(node, selector, root, false);\n            return parents && parents.length > 0 ? parents[0] : null;\n        };\n        const _findSib = (node, selector, name) => {\n            let func = selector;\n            if (node) {\n                // If expression make a function of it using is\n                if (isString(selector)) {\n                    func = (node) => {\n                        return is(node, selector);\n                    };\n                }\n                // Loop all siblings\n                for (let tempNode = node[name]; tempNode; tempNode = tempNode[name]) {\n                    if (isFunction(func) && func(tempNode)) {\n                        return tempNode;\n                    }\n                }\n            }\n            return null;\n        };\n        const getNext = (node, selector) => _findSib(node, selector, 'nextSibling');\n        const getPrev = (node, selector) => _findSib(node, selector, 'previousSibling');\n        const isParentNode = (node) => isFunction(node.querySelectorAll);\n        const select = (selector, scope) => {\n            const elm = get(scope) ?? settings.root_element ?? doc;\n            return isParentNode(elm) ? from(elm.querySelectorAll(selector)) : [];\n        };\n        const run = function (elm, func, scope) {\n            const context = scope ?? this;\n            if (isArray$1(elm)) {\n                const result = [];\n                each$a(elm, (e, i) => {\n                    const node = get(e);\n                    if (node) {\n                        result.push(func.call(context, node, i));\n                    }\n                });\n                return result;\n            }\n            else {\n                const node = get(elm);\n                return !node ? false : func.call(context, node);\n            }\n        };\n        const setAttribs = (elm, attrs) => {\n            run(elm, ($elm) => {\n                each$d(attrs, (value, name) => {\n                    setAttrib($elm, name, value);\n                });\n            });\n        };\n        const setHTML = (elm, html) => {\n            run(elm, (e) => {\n                const $elm = SugarElement.fromDom(e);\n                set$4($elm, html);\n            });\n        };\n        const add = (parentElm, name, attrs, html, create) => run(parentElm, (parentElm) => {\n            const newElm = isString(name) ? doc.createElement(name) : name;\n            if (isNonNullable(attrs)) {\n                setAttribs(newElm, attrs);\n            }\n            if (html) {\n                if (!isString(html) && html.nodeType) {\n                    newElm.appendChild(html);\n                }\n                else if (isString(html)) {\n                    setHTML(newElm, html);\n                }\n            }\n            return !create ? parentElm.appendChild(newElm) : newElm;\n        });\n        const create = (name, attrs, html) => add(doc.createElement(name), name, attrs, html, true);\n        const decode = Entities.decode;\n        const encode = Entities.encodeAllRaw;\n        const createHTML = (name, attrs, html = '') => {\n            let outHtml = '<' + name;\n            for (const key in attrs) {\n                if (hasNonNullableKey(attrs, key)) {\n                    outHtml += ' ' + key + '=\"' + encode(attrs[key]) + '\"';\n                }\n            }\n            if (isEmpty$5(html) && has$2(schema.getVoidElements(), name)) {\n                return outHtml + ' />';\n            }\n            else {\n                return outHtml + '>' + html + '</' + name + '>';\n            }\n        };\n        const createFragment = (html) => {\n            const container = doc.createElement('div');\n            const frag = doc.createDocumentFragment();\n            // Append the container to the fragment so as to remove it from\n            // the current document context\n            frag.appendChild(container);\n            if (html) {\n                container.innerHTML = html;\n            }\n            let node;\n            while ((node = container.firstChild)) {\n                frag.appendChild(node);\n            }\n            // Remove the container now that all the children have been transferred\n            frag.removeChild(container);\n            return frag;\n        };\n        const remove = (node, keepChildren) => {\n            return run(node, (n) => {\n                const $node = SugarElement.fromDom(n);\n                if (keepChildren) {\n                    // Unwrap but don't keep any empty text nodes\n                    each$e(children$2($node), (child) => {\n                        if (isText$c(child) && child.dom.length === 0) {\n                            remove$8(child);\n                        }\n                        else {\n                            before$4($node, child);\n                        }\n                    });\n                }\n                remove$8($node);\n                return $node.dom;\n            });\n        };\n        const removeAllAttribs = (e) => run(e, (e) => {\n            const attrs = e.attributes;\n            for (let i = attrs.length - 1; i >= 0; i--) {\n                e.removeAttributeNode(attrs.item(i));\n            }\n        });\n        const parseStyle = (cssText) => styles.parse(cssText);\n        const serializeStyle = (stylesArg, name) => styles.serialize(stylesArg, name);\n        const addStyle = (cssText) => {\n            // Prevent inline from loading the same styles twice\n            if (self !== DOMUtils.DOM && doc === document) {\n                if (addedStyles[cssText]) {\n                    return;\n                }\n                addedStyles[cssText] = true;\n            }\n            // Create style element if needed\n            let styleElm = doc.getElementById('mceDefaultStyles');\n            if (!styleElm) {\n                styleElm = doc.createElement('style');\n                styleElm.id = 'mceDefaultStyles';\n                styleElm.type = 'text/css';\n                const head = doc.head;\n                if (head.firstChild) {\n                    head.insertBefore(styleElm, head.firstChild);\n                }\n                else {\n                    head.appendChild(styleElm);\n                }\n            }\n            // Append style data to old or new style element\n            if (styleElm.styleSheet) {\n                styleElm.styleSheet.cssText += cssText;\n            }\n            else {\n                styleElm.appendChild(doc.createTextNode(cssText));\n            }\n        };\n        const loadCSS = (urls) => {\n            if (!urls) {\n                urls = '';\n            }\n            each$e(urls.split(','), (url) => {\n                files[url] = true;\n                styleSheetLoader.load(url).catch(noop);\n            });\n        };\n        const toggleClass = (elm, cls, state) => {\n            run(elm, (e) => {\n                if (isElement$7(e)) {\n                    const $elm = SugarElement.fromDom(e);\n                    // TINY-4520: DomQuery used to handle specifying multiple classes and the\n                    // formatter relies on it due to the changes made for TINY-7227\n                    const classes = cls.split(' ');\n                    each$e(classes, (c) => {\n                        if (isNonNullable(state)) {\n                            const fn = state ? add$2 : remove$4;\n                            fn($elm, c);\n                        }\n                        else {\n                            toggle$1($elm, c);\n                        }\n                    });\n                }\n            });\n        };\n        const addClass = (elm, cls) => {\n            toggleClass(elm, cls, true);\n        };\n        const removeClass = (elm, cls) => {\n            toggleClass(elm, cls, false);\n        };\n        const hasClass = (elm, cls) => {\n            const $elm = _get(elm);\n            // TINY-4520: DomQuery used to handle specifying multiple classes and the\n            // formatter relies on it due to the changes made for TINY-7227\n            const classes = cls.split(' ');\n            return isNonNullable($elm) && forall(classes, (c) => has($elm, c));\n        };\n        const show = (elm) => {\n            run(elm, (e) => remove$7(SugarElement.fromDom(e), 'display'));\n        };\n        const hide = (elm) => {\n            run(elm, (e) => set$3(SugarElement.fromDom(e), 'display', 'none'));\n        };\n        const isHidden = (elm) => {\n            const $elm = _get(elm);\n            return isNonNullable($elm) && is$4(getRaw$1($elm, 'display'), 'none');\n        };\n        const uniqueId = (prefix) => (!prefix ? 'mce_' : prefix) + (counter++);\n        const getOuterHTML = (elm) => {\n            const $elm = _get(elm);\n            if (isNonNullable($elm)) {\n                return isElement$7($elm.dom) ? $elm.dom.outerHTML : getOuter($elm);\n            }\n            else {\n                return '';\n            }\n        };\n        const setOuterHTML = (elm, html) => {\n            run(elm, ($elm) => {\n                if (isElement$7($elm)) {\n                    $elm.outerHTML = html;\n                }\n            });\n        };\n        const insertAfter = (node, reference) => {\n            const referenceNode = get(reference);\n            return run(node, (node) => {\n                const parent = referenceNode?.parentNode;\n                const nextSibling = referenceNode?.nextSibling;\n                if (parent) {\n                    if (nextSibling) {\n                        parent.insertBefore(node, nextSibling);\n                    }\n                    else {\n                        parent.appendChild(node);\n                    }\n                }\n                return node;\n            });\n        };\n        const replace = (newElm, oldElm, keepChildren) => run(oldElm, (elm) => {\n            const replacee = isArray$1(oldElm) ? newElm.cloneNode(true) : newElm;\n            if (keepChildren) {\n                each$a(grep(elm.childNodes), (node) => {\n                    replacee.appendChild(node);\n                });\n            }\n            elm.parentNode?.replaceChild(replacee, elm);\n            return elm;\n        });\n        const rename = (elm, name) => {\n            if (elm.nodeName !== name.toUpperCase()) {\n                // Rename block element\n                const newElm = create(name);\n                // Copy attribs to new block\n                each$a(getAttribs(elm), (attrNode) => {\n                    setAttrib(newElm, attrNode.nodeName, getAttrib(elm, attrNode.nodeName));\n                });\n                // Replace block\n                replace(newElm, elm, true);\n                return newElm;\n            }\n            else {\n                return elm;\n            }\n        };\n        const findCommonAncestor = (a, b) => {\n            let ps = a;\n            while (ps) {\n                let pe = b;\n                while (pe && ps !== pe) {\n                    pe = pe.parentNode;\n                }\n                if (ps === pe) {\n                    break;\n                }\n                ps = ps.parentNode;\n            }\n            if (!ps && a.ownerDocument) {\n                return a.ownerDocument.documentElement;\n            }\n            else {\n                return ps;\n            }\n        };\n        const isEmpty = (node, elements, options) => {\n            if (isPlainObject(elements)) {\n                const isContent = (node) => {\n                    const name = node.nodeName.toLowerCase();\n                    return Boolean(elements[name]);\n                };\n                return isEmptyNode(schema, node, { ...options, isContent });\n            }\n            else {\n                return isEmptyNode(schema, node, options);\n            }\n        };\n        const createRng = () => doc.createRange();\n        const split = (parentElm, splitElm, replacementElm) => {\n            let range = createRng();\n            let beforeFragment;\n            let afterFragment;\n            if (parentElm && splitElm && parentElm.parentNode && splitElm.parentNode) {\n                const parentNode = parentElm.parentNode;\n                // Get before chunk\n                range.setStart(parentNode, findNodeIndex(parentElm));\n                range.setEnd(splitElm.parentNode, findNodeIndex(splitElm));\n                beforeFragment = range.extractContents();\n                // Get after chunk\n                range = createRng();\n                range.setStart(splitElm.parentNode, findNodeIndex(splitElm) + 1);\n                range.setEnd(parentNode, findNodeIndex(parentElm) + 1);\n                afterFragment = range.extractContents();\n                // Insert before chunk\n                parentNode.insertBefore(trimNode(self, beforeFragment, schema), parentElm);\n                // Insert middle chunk\n                if (replacementElm) {\n                    parentNode.insertBefore(replacementElm, parentElm);\n                    // pa.replaceChild(replacementElm, splitElm);\n                }\n                else {\n                    parentNode.insertBefore(splitElm, parentElm);\n                }\n                // Insert after chunk\n                parentNode.insertBefore(trimNode(self, afterFragment, schema), parentElm);\n                remove(parentElm);\n                return replacementElm || splitElm;\n            }\n            else {\n                return undefined;\n            }\n        };\n        const bind = (target, name, func, scope) => {\n            if (isArray$1(target)) {\n                let i = target.length;\n                const rv = [];\n                while (i--) {\n                    rv[i] = bind(target[i], name, func, scope);\n                }\n                return rv;\n            }\n            else {\n                // Collect all window/document events bound by editor instance\n                if (settings.collect && (target === doc || target === win)) {\n                    boundEvents.push([target, name, func, scope]);\n                }\n                return events.bind(target, name, func, scope || self);\n            }\n        };\n        const unbind = (target, name, func) => {\n            if (isArray$1(target)) {\n                let i = target.length;\n                const rv = [];\n                while (i--) {\n                    rv[i] = unbind(target[i], name, func);\n                }\n                return rv;\n            }\n            else {\n                // Remove any bound events matching the input\n                if (boundEvents.length > 0 && (target === doc || target === win)) {\n                    let i = boundEvents.length;\n                    while (i--) {\n                        const [boundTarget, boundName, boundFunc] = boundEvents[i];\n                        if (target === boundTarget && (!name || name === boundName) && (!func || func === boundFunc)) {\n                            events.unbind(boundTarget, boundName, boundFunc);\n                        }\n                    }\n                }\n                return events.unbind(target, name, func);\n            }\n        };\n        const dispatch = (target, name, evt) => events.dispatch(target, name, evt);\n        const fire = (target, name, evt) => events.dispatch(target, name, evt);\n        const getContentEditable = (node) => {\n            if (node && isHTMLElement(node)) {\n                // Check for fake content editable\n                const contentEditable = node.getAttribute('data-mce-contenteditable');\n                if (contentEditable && contentEditable !== 'inherit') {\n                    return contentEditable;\n                }\n                // Check for real content editable\n                return node.contentEditable !== 'inherit' ? node.contentEditable : null;\n            }\n            else {\n                return null;\n            }\n        };\n        const getContentEditableParent = (node) => {\n            const root = getRoot();\n            let state = null;\n            for (let tempNode = node; tempNode && tempNode !== root; tempNode = tempNode.parentNode) {\n                state = getContentEditable(tempNode);\n                if (state !== null) {\n                    break;\n                }\n            }\n            return state;\n        };\n        const isEditable = (node) => {\n            if (isNonNullable(node)) {\n                const scope = isElement$7(node) ? node : node.parentElement;\n                return isNonNullable(scope) && isHTMLElement(scope) && isEditable$2(SugarElement.fromDom(scope));\n            }\n            else {\n                return false;\n            }\n        };\n        const destroy = () => {\n            // Unbind all events bound to window/document by editor instance\n            if (boundEvents.length > 0) {\n                let i = boundEvents.length;\n                while (i--) {\n                    const [boundTarget, boundName, boundFunc] = boundEvents[i];\n                    events.unbind(boundTarget, boundName, boundFunc);\n                }\n            }\n            // Remove CSS files added to the dom\n            each$d(files, (_, url) => {\n                styleSheetLoader.unload(url);\n                delete files[url];\n            });\n        };\n        const isChildOf = (node, parent) => {\n            return node === parent || parent.contains(node);\n        };\n        const dumpRng = (r) => ('startContainer: ' + r.startContainer.nodeName +\n            ', startOffset: ' + r.startOffset +\n            ', endContainer: ' + r.endContainer.nodeName +\n            ', endOffset: ' + r.endOffset);\n        // eslint-disable-next-line consistent-this\n        const self = {\n            doc,\n            settings,\n            win,\n            files,\n            stdMode,\n            boxModel,\n            styleSheetLoader,\n            boundEvents,\n            styles,\n            schema,\n            events,\n            isBlock: isBlock,\n            root: null,\n            clone,\n            /**\n             * Returns the root node of the document. This is normally the body but might be a DIV. Parents like getParent will not\n             * go above the point of this root node.\n             *\n             * @method getRoot\n             * @return {Element} Root element for the utility class.\n             */\n            getRoot,\n            /**\n             * Returns the viewport of the window.\n             *\n             * @method getViewPort\n             * @param {Window} win Optional window to get viewport of.\n             * @return {Object} Viewport object with fields x, y, w and h.\n             */\n            getViewPort,\n            /**\n             * Returns the rectangle for a specific element.\n             *\n             * @method getRect\n             * @param {Element/String} elm Element object or element ID to get rectangle from.\n             * @return {Object} Rectangle for specified element object with x, y, w, h fields.\n             */\n            getRect,\n            /**\n             * Returns the size dimensions of the specified element.\n             *\n             * @method getSize\n             * @param {Element/String} elm Element object or element ID to get rectangle from.\n             * @return {Object} Rectangle for specified element object with w, h fields.\n             */\n            getSize,\n            /**\n             * Returns a node by the specified selector function. This function will\n             * loop through all parent nodes and call the specified function for each node.\n             * If the function then returns true indicating that it has found what it was looking for, the loop execution will then end\n             * and the node it found will be returned.\n             *\n             * @method getParent\n             * @param {Node/String} node DOM node to search parents on or ID string.\n             * @param {Function} selector Selection function or CSS selector to execute on each node.\n             * @param {Node} root Optional root element, never go beyond this point.\n             * @return {Node} DOM Node or null if it wasn't found.\n             */\n            getParent,\n            /**\n             * Returns a node list of all parents matching the specified selector function or pattern.\n             * If the function then returns true indicating that it has found what it was looking for and that node will be collected.\n             *\n             * @method getParents\n             * @param {Node/String} node DOM node to search parents on or ID string.\n             * @param {Function} selector Selection function to execute on each node or CSS pattern.\n             * @param {Node} root Optional root element, never go beyond this point.\n             * @return {Array} Array of nodes or null if it wasn't found.\n             */\n            getParents: getParents,\n            /**\n             * Returns the specified element by ID or the input element if it isn't a string.\n             *\n             * @method get\n             * @param {String/Element} n Element id to look for or element to just pass though.\n             * @return {Element} Element matching the specified id or null if it wasn't found.\n             */\n            get,\n            /**\n             * Returns the next node that matches selector or function\n             *\n             * @method getNext\n             * @param {Node} node Node to find siblings from.\n             * @param {String/function} selector Selector CSS expression or function.\n             * @return {Node} Next node item matching the selector or null if it wasn't found.\n             */\n            getNext,\n            /**\n             * Returns the previous node that matches selector or function\n             *\n             * @method getPrev\n             * @param {Node} node Node to find siblings from.\n             * @param {String/function} selector Selector CSS expression or function.\n             * @return {Node} Previous node item matching the selector or null if it wasn't found.\n             */\n            getPrev,\n            // #ifndef jquery\n            /**\n             * Returns a list of the elements specified by the given CSS selector. For example: `div#a1 p.test`\n             *\n             * @method select\n             * @param {String} selector Target CSS selector.\n             * @param {Object} scope Optional root element/scope element to search in.\n             * @return {Array} Array with all matched elements.\n             * @example\n             * // Adds a class to all paragraphs in the currently active editor\n             * tinymce.activeEditor.dom.addClass(tinymce.activeEditor.dom.select('p'), 'someclass');\n             *\n             * // Adds a class to all spans that have the test class in the currently active editor\n             * tinymce.activeEditor.dom.addClass(tinymce.activeEditor.dom.select('span.test'), 'someclass')\n             */\n            select,\n            /**\n             * Returns true/false if the specified element matches the specified css pattern.\n             *\n             * @method is\n             * @param {Node/NodeList} elm DOM node to match or an array of nodes to match.\n             * @param {String} selector CSS pattern to match the element against.\n             */\n            is,\n            // #endif\n            /**\n             * Adds the specified element to another element or elements.\n             *\n             * @method add\n             * @param {String/Element/Array} parentElm Element id string, DOM node element or array of ids or elements to add to.\n             * @param {String/Element} name Name of new element to add or existing element to add.\n             * @param {Object} attrs Optional object collection with arguments to add to the new element(s).\n             * @param {String} html Optional inner HTML contents to add for each element.\n             * @param {Boolean} create Optional flag if the element should be created or added.\n             * @return {Element/Array} Element that got created, or an array of created elements if multiple input elements\n             * were passed in.\n             * @example\n             * // Adds a new paragraph to the end of the active editor\n             * tinymce.activeEditor.dom.add(tinymce.activeEditor.getBody(), 'p', { title: 'my title' }, 'Some content');\n             */\n            add,\n            /**\n             * Creates a new element.\n             *\n             * @method create\n             * @param {String} name Name of new element.\n             * @param {Object} attrs Optional object name/value collection with element attributes.\n             * @param {String} html Optional HTML string to set as inner HTML of the element.\n             * @return {Element} HTML DOM node element that got created.\n             * @example\n             * // Adds an element where the caret/selection is in the active editor\n             * var el = tinymce.activeEditor.dom.create('div', { id: 'test', 'class': 'myclass' }, 'some content');\n             * tinymce.activeEditor.selection.setNode(el);\n             */\n            create,\n            /**\n             * Creates HTML string for element. The element will be closed unless an empty inner HTML string is passed in.\n             *\n             * @method createHTML\n             * @param {String} name Name of new element.\n             * @param {Object} attrs Optional object name/value collection with element attributes.\n             * @param {String} html Optional HTML string to set as inner HTML of the element.\n             * @return {String} String with new HTML element, for example: <a href=\"#\">test</a>.\n             * @example\n             * // Creates a html chunk and inserts it at the current selection/caret location\n             * tinymce.activeEditor.insertContent(tinymce.activeEditor.dom.createHTML('a', { href: 'test.html' }, 'some line'));\n             */\n            createHTML,\n            /**\n             * Creates a document fragment out of the specified HTML string.\n             *\n             * @method createFragment\n             * @param {String} html Html string to create fragment from.\n             * @return {DocumentFragment} Document fragment node.\n             */\n            createFragment,\n            /**\n             * Removes/deletes the specified element(s) from the DOM.\n             *\n             * @method remove\n             * @param {String/Element/Array} node ID of element or DOM element object or array containing multiple elements/ids.\n             * @param {Boolean} keepChildren Optional state to keep children or not. If set to true all children will be\n             * placed at the location of the removed element.\n             * @return {Element/Array} HTML DOM element that got removed, or an array of removed elements if multiple input elements\n             * were passed in.\n             * @example\n             * // Removes all paragraphs in the active editor\n             * tinymce.activeEditor.dom.remove(tinymce.activeEditor.dom.select('p'));\n             *\n             * // Removes an element by id in the document\n             * tinymce.DOM.remove('mydiv');\n             */\n            remove,\n            /**\n             * Sets the CSS style value on a HTML element. The name can be a camelcase string\n             * or the CSS style name like background-color.\n             *\n             * @method setStyle\n             * @param {String/Element/Array} elm HTML element/Array of elements to set CSS style value on.\n             * @param {String} name Name of the style value to set.\n             * @param {String} value Value to set on the style.\n             * @example\n             * // Sets a style value on all paragraphs in the currently active editor\n             * tinymce.activeEditor.dom.setStyle(tinymce.activeEditor.dom.select('p'), 'background-color', 'red');\n             *\n             * // Sets a style value to an element by id in the current document\n             * tinymce.DOM.setStyle('mydiv', 'background-color', 'red');\n             */\n            setStyle,\n            /**\n             * Returns the current style or runtime/computed value of an element.\n             *\n             * @method getStyle\n             * @param {String/Element} elm HTML element or element id string to get style from.\n             * @param {String} name Style name to return.\n             * @param {Boolean} computed Computed style.\n             * @return {String} Current style or computed style value of an element.\n             */\n            getStyle: getStyle,\n            /**\n             * Sets multiple styles on the specified element(s).\n             *\n             * @method setStyles\n             * @param {Element/String/Array} elm DOM element, element id string or array of elements/ids to set styles on.\n             * @param {Object} styles Name/Value collection of style items to add to the element(s).\n             * @example\n             * // Sets styles on all paragraphs in the currently active editor\n             * tinymce.activeEditor.dom.setStyles(tinymce.activeEditor.dom.select('p'), { 'background-color': 'red', 'color': 'green' });\n             *\n             * // Sets styles to an element by id in the current document\n             * tinymce.DOM.setStyles('mydiv', { 'background-color': 'red', 'color': 'green' });\n             */\n            setStyles,\n            /**\n             * Removes all attributes from an element or elements.\n             *\n             * @method removeAllAttribs\n             * @param {Element/String/Array} e DOM element, element id string or array of elements/ids to remove attributes from.\n             */\n            removeAllAttribs,\n            /**\n             * Sets the specified attribute of an element or elements.\n             *\n             * @method setAttrib\n             * @param {Element/String/Array} elm DOM element, element id string or array of elements/ids to set attribute on.\n             * @param {String} name Name of attribute to set.\n             * @param {String} value Value to set on the attribute - if this value is falsy like null, 0 or '' it will remove\n             * the attribute instead.\n             * @example\n             * // Sets class attribute on all paragraphs in the active editor\n             * tinymce.activeEditor.dom.setAttrib(tinymce.activeEditor.dom.select('p'), 'class', 'myclass');\n             *\n             * // Sets class attribute on a specific element in the current page\n             * tinymce.dom.setAttrib('mydiv', 'class', 'myclass');\n             */\n            setAttrib,\n            /**\n             * Sets two or more specified attributes of an element or elements.\n             *\n             * @method setAttribs\n             * @param {Element/String/Array} elm DOM element, element id string or array of elements/ids to set attributes on.\n             * @param {Object} attrs Name/Value collection of attribute items to add to the element(s).\n             * @example\n             * // Sets class and title attributes on all paragraphs in the active editor\n             * tinymce.activeEditor.dom.setAttribs(tinymce.activeEditor.dom.select('p'), { 'class': 'myclass', title: 'some title' });\n             *\n             * // Sets class and title attributes on a specific element in the current page\n             * tinymce.DOM.setAttribs('mydiv', { 'class': 'myclass', title: 'some title' });\n             */\n            setAttribs,\n            /**\n             * Returns the specified attribute by name.\n             *\n             * @method getAttrib\n             * @param {String/Element} elm Element string id or DOM element to get attribute from.\n             * @param {String} name Name of attribute to get.\n             * @param {String} defaultVal Optional default value to return if the attribute didn't exist.\n             * @return {String} Attribute value string, default value or null if the attribute wasn't found.\n             */\n            getAttrib,\n            /**\n             * Returns the absolute x, y position of a node. The position will be returned in an object with x, y fields.\n             *\n             * @method getPos\n             * @param {Element/String} elm HTML element or element id to get x, y position from.\n             * @param {Element} rootElm Optional root element to stop calculations at.\n             * @return {Object} Absolute position of the specified element object with x, y fields.\n             */\n            getPos: getPos$1,\n            /**\n             * Parses the specified style value into an object collection. This parser will also\n             * merge and remove any redundant items that browsers might have added. It will also convert non-hex\n             * colors to hex values. Urls inside the styles will also be converted to absolute/relative based on settings.\n             *\n             * @method parseStyle\n             * @param {String} cssText Style value to parse, for example: border:1px solid red;.\n             * @return {Object} Object representation of that style, for example: {border: '1px solid red'}\n             */\n            parseStyle,\n            /**\n             * Serializes the specified style object into a string.\n             *\n             * @method serializeStyle\n             * @param {Object} styles Object to serialize as string, for example: {border: '1px solid red'}\n             * @param {String} name Optional element name.\n             * @return {String} String representation of the style object, for example: border: 1px solid red.\n             */\n            serializeStyle,\n            /**\n             * Adds a style element at the top of the document with the specified cssText content.\n             *\n             * @method addStyle\n             * @param {String} cssText CSS Text style to add to top of head of document.\n             */\n            addStyle,\n            /**\n             * Imports/loads the specified CSS file into the document bound to the class.\n             *\n             * @method loadCSS\n             * @param {String} url URL to CSS file to load.\n             * @example\n             * // Loads a CSS file dynamically into the current document\n             * tinymce.DOM.loadCSS('somepath/some.css');\n             *\n             * // Loads a CSS file into the currently active editor instance\n             * tinymce.activeEditor.dom.loadCSS('somepath/some.css');\n             *\n             * // Loads a CSS file into an editor instance by id\n             * tinymce.get('someid').dom.loadCSS('somepath/some.css');\n             *\n             * // Loads multiple CSS files into the current document\n             * tinymce.DOM.loadCSS('somepath/some.css,somepath/someother.css');\n             */\n            loadCSS,\n            /**\n             * Adds a class to the specified element or elements.\n             *\n             * @method addClass\n             * @param {String/Element/Array} elm Element ID string or DOM element or array with elements or IDs.\n             * @param {String} cls Class name to add to each element.\n             * @return {String/Array} String with new class value or array with new class values for all elements.\n             * @example\n             * // Adds a class to all paragraphs in the active editor\n             * tinymce.activeEditor.dom.addClass(tinymce.activeEditor.dom.select('p'), 'myclass');\n             *\n             * // Adds a class to a specific element in the current page\n             * tinymce.DOM.addClass('mydiv', 'myclass');\n             */\n            addClass,\n            /**\n             * Removes a class from the specified element or elements.\n             *\n             * @method removeClass\n             * @param {String/Element/Array} elm Element ID string or DOM element or array with elements or IDs.\n             * @param {String} cls Class name to remove from each element.\n             * @return {String/Array} String of remaining class name(s), or an array of strings if multiple input elements\n             * were passed in.\n             * @example\n             * // Removes a class from all paragraphs in the active editor\n             * tinymce.activeEditor.dom.removeClass(tinymce.activeEditor.dom.select('p'), 'myclass');\n             *\n             * // Removes a class from a specific element in the current page\n             * tinymce.DOM.removeClass('mydiv', 'myclass');\n             */\n            removeClass,\n            /**\n             * Returns true if the specified element has the specified class.\n             *\n             * @method hasClass\n             * @param {String/Element} elm HTML element or element id string to check CSS class on.\n             * @param {String} cls CSS class to check for.\n             * @return {Boolean} true/false if the specified element has the specified class.\n             */\n            hasClass,\n            /**\n             * Toggles the specified class on/off.\n             *\n             * @method toggleClass\n             * @param {Element} elm Element to toggle class on.\n             * @param {String} cls Class to toggle on/off.\n             * @param {Boolean} state Optional state to set.\n             */\n            toggleClass,\n            /**\n             * Shows the specified element(s) by ID by setting the \"display\" style.\n             *\n             * @method show\n             * @param {String/Element/Array} elm ID of DOM element or DOM element or array with elements or IDs to show.\n             */\n            show,\n            /**\n             * Hides the specified element(s) by ID by setting the \"display\" style.\n             *\n             * @method hide\n             * @param {String/Element/Array} elm ID of DOM element or DOM element or array with elements or IDs to hide.\n             * @example\n             * // Hides an element by id in the document\n             * tinymce.DOM.hide('myid');\n             */\n            hide,\n            /**\n             * Returns true/false if the element is hidden or not by checking the \"display\" style.\n             *\n             * @method isHidden\n             * @param {String/Element} elm Id or element to check display state on.\n             * @return {Boolean} true/false if the element is hidden or not.\n             */\n            isHidden,\n            /**\n             * Returns a unique id. This can be useful when generating elements on the fly.\n             * This method will not check if the element already exists.\n             *\n             * @method uniqueId\n             * @param {String} prefix Optional prefix to add in front of all ids - defaults to \"mce_\".\n             * @return {String} Unique id.\n             */\n            uniqueId,\n            /**\n             * Sets the specified HTML content inside the element or elements. The HTML will first be processed. This means\n             * URLs will get converted, hex color values fixed etc. Check processHTML for details.\n             *\n             * @method setHTML\n             * @param {Element/String/Array} elm DOM element, element id string or array of elements/ids to set HTML inside of.\n             * @param {String} html HTML content to set as inner HTML of the element.\n             * @example\n             * // Sets the inner HTML of all paragraphs in the active editor\n             * tinymce.activeEditor.dom.setHTML(tinymce.activeEditor.dom.select('p'), 'some inner html');\n             *\n             * // Sets the inner HTML of an element by id in the document\n             * tinymce.DOM.setHTML('mydiv', 'some inner html');\n             */\n            setHTML,\n            /**\n             * Returns the outer HTML of an element.\n             *\n             * @method getOuterHTML\n             * @param {String/Element} elm Element ID or element object to get outer HTML from.\n             * @return {String} Outer HTML string.\n             * @example\n             * tinymce.DOM.getOuterHTML(editorElement);\n             * tinymce.activeEditor.getOuterHTML(tinymce.activeEditor.getBody());\n             */\n            getOuterHTML,\n            /**\n             * Sets the specified outer HTML on an element or elements.\n             *\n             * @method setOuterHTML\n             * @param {Element/String/Array} elm DOM element, element id string or array of elements/ids to set outer HTML on.\n             * @param {Object} html HTML code to set as outer value for the element.\n             * @example\n             * // Sets the outer HTML of all paragraphs in the active editor\n             * tinymce.activeEditor.dom.setOuterHTML(tinymce.activeEditor.dom.select('p'), '<div>some html</div>');\n             *\n             * // Sets the outer HTML of an element by id in the document\n             * tinymce.DOM.setOuterHTML('mydiv', '<div>some html</div>');\n             */\n            setOuterHTML,\n            /**\n             * Entity decodes a string. This method decodes any HTML entities, such as `&amp;aring;`.\n             *\n             * @method decode\n             * @param {String} s String to decode entities on.\n             * @return {String} Entity decoded string.\n             */\n            decode,\n            /**\n             * Entity encodes a string. This method encodes the most common entities, such as `<`, `>`, `\"` and `&`.\n             *\n             * @method encode\n             * @param {String} text String to encode with entities.\n             * @return {String} Entity encoded string.\n             */\n            encode,\n            /**\n             * Inserts an element after the reference element.\n             *\n             * @method insertAfter\n             * @param {Element} node Element to insert after the reference.\n             * @param {Element/String/Array} referenceNode Reference element, element id or array of elements to insert after.\n             * @return {Element/Array} Element that got added or an array with elements.\n             */\n            insertAfter,\n            /**\n             * Replaces the specified element or elements with the new element specified. The new element will\n             * be cloned if multiple input elements are passed in.\n             *\n             * @method replace\n             * @param {Element} newElm New element to replace old ones with.\n             * @param {Element/String/Array} oldElm Element DOM node, element id or array of elements or ids to replace.\n             * @param {Boolean} keepChildren Optional keep children state, if set to true child nodes from the old object will be added\n             * to new ones.\n             */\n            replace,\n            /**\n             * Renames the specified element and keeps its attributes and children.\n             *\n             * @method rename\n             * @param {Element} elm Element to rename.\n             * @param {String} name Name of the new element.\n             * @return {Element} New element or the old element if it needed renaming.\n             */\n            rename,\n            /**\n             * Find the common ancestor of two elements. This is a shorter method than using the DOM Range logic.\n             *\n             * @method findCommonAncestor\n             * @param {Element} a Element to find common ancestor of.\n             * @param {Element} b Element to find common ancestor of.\n             * @return {Element} Common ancestor element of the two input elements.\n             */\n            findCommonAncestor,\n            /**\n             * Executes the specified function on the element by id or dom element node or array of elements/id.\n             *\n             * @method run\n             * @param {String/Element/Array} elm ID or DOM element object or array with ids or elements.\n             * @param {Function} func Function to execute for each item.\n             * @param {Object} scope Optional scope to execute the function in.\n             * @return {Object/Array} Single object, or an array of objects if multiple input elements were passed in.\n             */\n            run,\n            /**\n             * Returns a NodeList with attributes for the element.\n             *\n             * @method getAttribs\n             * @param {HTMLElement/string} elm Element node or string id to get attributes from.\n             * @return {NodeList} NodeList with attributes.\n             */\n            getAttribs,\n            /**\n             * Returns true/false if the specified node is to be considered empty or not.\n             *\n             * @method isEmpty\n             * @param {Node} node The target node to check if it's empty.\n             * @param {Object} elements Optional name/value object with elements that are automatically treated as non-empty elements.\n             * @return {Boolean} true/false if the node is empty or not.\n             * @example\n             * tinymce.DOM.isEmpty(node, { img: true });\n             */\n            isEmpty,\n            /**\n             * Creates a new DOM Range object. This will use the native DOM Range API if it's\n             * available. If it's not, it will fall back to the custom TinyMCE implementation.\n             *\n             * @method createRng\n             * @return {DOMRange} DOM Range object.\n             * @example\n             * const rng = tinymce.DOM.createRng();\n             * alert(rng.startContainer + \",\" + rng.startOffset);\n             */\n            createRng,\n            /**\n             * Returns the index of the specified node within its parent.\n             *\n             * @method nodeIndex\n             * @param {Node} node Node to look for.\n             * @param {Boolean} normalized Optional true/false state if the index is what it would be after a normalization.\n             * @return {Number} Index of the specified node.\n             */\n            nodeIndex: findNodeIndex,\n            /**\n             * Splits an element into two new elements and places the specified split\n             * element or elements between the new ones. For example splitting the paragraph at the bold element in\n             * this example `<p>abc<b>abc</b>123</p>` would produce `<p>abc</p><b>abc</b><p>123</p>`.\n             *\n             * @method split\n             * @param {Element} parentElm Parent element to split.\n             * @param {Element} splitElm Element to split at.\n             * @param {Element} replacementElm Optional replacement element to replace the split element with.\n             * @return {Element} Returns the split element or the replacement element if that is specified.\n             */\n            split,\n            /**\n             * Adds an event handler to the specified object.\n             *\n             * @method bind\n             * @param {Element/Document/Window/Array} target Target element to bind events to.\n             * handler to or an array of elements/ids/documents.\n             * @param {String} name Name of event handler to add, for example: click.\n             * @param {Function} func Function to execute when the event occurs.\n             * @param {Object} scope Optional scope to execute the function in.\n             * @return {Function} Function callback handler the same as the one passed in.\n             */\n            bind: bind,\n            /**\n             * Removes the specified event handler by name and function from an element or collection of elements.\n             *\n             * @method unbind\n             * @param {Element/Document/Window/Array} target Target element to unbind events on.\n             * @param {String} name Event handler name, for example: \"click\"\n             * @param {Function} func Function to remove.\n             * @return {Boolean/Array} Bool state of true if the handler was removed, or an array of states if multiple input elements\n             * were passed in.\n             */\n            unbind: unbind,\n            /**\n             * Fires the specified event name and optional object on the specified target.\n             * <br>\n             * <em>Deprecated in TinyMCE 6.0 and has been marked for removal in TinyMCE 7.0. Use <code>dispatch</code> instead.</em>\n             *\n             * @method fire\n             * @param {Node/Document/Window} target Target element or object to fire event on.\n             * @param {String} name Event name to fire.\n             * @param {Object} evt Event object to send.\n             * @return {Event} Event object.\n             * @deprecated Use dispatch() instead\n             */\n            fire,\n            /**\n             * Dispatches the specified event name and optional object on the specified target.\n             *\n             * @method dispatch\n             * @param {Node/Document/Window} target Target element or object to dispatch event on.\n             * @param {String} name Name of the event to fire.\n             * @param {Object} evt Event object to send.\n             * @return {Event} Event object.\n             */\n            dispatch,\n            // Returns the content editable state of a node\n            getContentEditable,\n            getContentEditableParent,\n            /**\n             * Checks if the specified node is editable within the given context of its parents.\n             *\n             * @method isEditable\n             * @param {Node} node Node to check if it's editable.\n             * @return {Boolean} Will be true if the node is editable and false if it's not editable.\n             */\n            isEditable,\n            /**\n             * Destroys all internal references to the DOM to solve memory leak issues.\n             *\n             * @method destroy\n             */\n            destroy,\n            isChildOf,\n            dumpRng\n        };\n        const attrHooks = setupAttrHooks(styles, settings, constant(self));\n        return self;\n    };\n    /**\n     * Instance of DOMUtils for the current document.\n     *\n     * @static\n     * @property DOM\n     * @type tinymce.dom.DOMUtils\n     * @example\n     * // Example of how to add a class to some element by id\n     * tinymce.DOM.addClass('someid', 'someclass');\n     */\n    DOMUtils.DOM = DOMUtils(document);\n    DOMUtils.nodeIndex = findNodeIndex;\n\n    /**\n     * This class handles asynchronous/synchronous loading of JavaScript files it will execute callbacks\n     * when various items gets loaded. This class is useful to load external JavaScript files.\n     *\n     * @class tinymce.dom.ScriptLoader\n     * @example\n     * // Load a script from a specific URL using the global script loader\n     * tinymce.ScriptLoader.load('somescript.js');\n     *\n     * // Load a script using a unique instance of the script loader\n     * const scriptLoader = new tinymce.dom.ScriptLoader();\n     *\n     * scriptLoader.load('somescript.js');\n     *\n     * // Load multiple scripts\n     * scriptLoader.add('somescript1.js');\n     * scriptLoader.add('somescript2.js');\n     * scriptLoader.add('somescript3.js');\n     *\n     * scriptLoader.loadQueue().then(() => {\n     *   alert('All scripts are now loaded.');\n     * });\n     */\n    const DOM$e = DOMUtils.DOM;\n    const QUEUED = 0;\n    const LOADING = 1;\n    const LOADED = 2;\n    const FAILED = 3;\n    class ScriptLoader {\n        static ScriptLoader = new ScriptLoader();\n        settings;\n        states = {};\n        queue = [];\n        scriptLoadedCallbacks = {};\n        queueLoadedCallbacks = [];\n        loading = false;\n        constructor(settings = {}) {\n            this.settings = settings;\n        }\n        _setReferrerPolicy(referrerPolicy) {\n            this.settings.referrerPolicy = referrerPolicy;\n        }\n        _setCrossOrigin(crossOrigin) {\n            this.settings.crossOrigin = crossOrigin;\n        }\n        /**\n         * Loads a specific script directly without adding it to the load queue.\n         *\n         * @method loadScript\n         * @param {String} url Absolute URL to script to add.\n         * @return {Promise} A promise that will resolve when the script loaded successfully or reject if it failed to load.\n         */\n        loadScript(url) {\n            return new Promise((resolve, reject) => {\n                const dom = DOM$e;\n                const doc = document;\n                let elm;\n                const cleanup = () => {\n                    dom.remove(id);\n                    if (elm) {\n                        elm.onerror = elm.onload = elm = null;\n                    }\n                };\n                // Execute callback when script is loaded\n                const done = () => {\n                    cleanup();\n                    resolve();\n                };\n                const error = () => {\n                    // We can't mark it as done if there is a load error since\n                    // A) We don't want to produce 404 errors on the server and\n                    // B) the onerror event won't fire on all browsers.\n                    cleanup();\n                    reject('Failed to load script: ' + url);\n                };\n                const id = dom.uniqueId();\n                // Create new script element\n                elm = doc.createElement('script');\n                elm.id = id;\n                elm.type = 'text/javascript';\n                elm.src = Tools._addCacheSuffix(url);\n                if (this.settings.referrerPolicy) {\n                    // Note: Don't use elm.referrerPolicy = ... here as it doesn't work on Safari\n                    dom.setAttrib(elm, 'referrerpolicy', this.settings.referrerPolicy);\n                }\n                const crossOrigin = this.settings.crossOrigin;\n                if (isFunction(crossOrigin)) {\n                    const resultCrossOrigin = crossOrigin(url);\n                    if (resultCrossOrigin !== undefined) {\n                        dom.setAttrib(elm, 'crossorigin', resultCrossOrigin);\n                    }\n                }\n                elm.onload = done;\n                // Add onerror event will get fired on some browsers but not all of them\n                elm.onerror = error;\n                // Add script to document\n                (doc.head || doc.body).appendChild(elm);\n            });\n        }\n        /**\n         * Returns true/false if a script has been loaded or not.\n         *\n         * @method isDone\n         * @param {String} url URL to check for.\n         * @return {Boolean} true/false if the URL is loaded.\n         */\n        isDone(url) {\n            return this.states[url] === LOADED;\n        }\n        /**\n         * Marks a specific script to be loaded. This can be useful if a script got loaded outside\n         * the script loader or to skip it from loading some script.\n         *\n         * @method markDone\n         * @param {String} url Absolute URL to the script to mark as loaded.\n         */\n        markDone(url) {\n            this.states[url] = LOADED;\n        }\n        /**\n         * Adds a specific script to the load queue of the script loader.\n         *\n         * @method add\n         * @param {String} url Absolute URL to script to add.\n         * @return {Promise} A promise that will resolve when the script loaded successfully or reject if it failed to load.\n         */\n        add(url) {\n            const self = this;\n            self.queue.push(url);\n            // Add url to load queue\n            const state = self.states[url];\n            if (state === undefined) {\n                self.states[url] = QUEUED;\n            }\n            return new Promise((resolve, reject) => {\n                // Store away callback for later execution\n                if (!self.scriptLoadedCallbacks[url]) {\n                    self.scriptLoadedCallbacks[url] = [];\n                }\n                self.scriptLoadedCallbacks[url].push({\n                    resolve,\n                    reject\n                });\n            });\n        }\n        load(url) {\n            return this.add(url);\n        }\n        remove(url) {\n            delete this.states[url];\n            delete this.scriptLoadedCallbacks[url];\n        }\n        /**\n         * Starts the loading of the queue.\n         *\n         * @method loadQueue\n         * @return {Promise} A promise that is resolved when all queued items are loaded or rejected with the script urls that failed to load.\n         */\n        loadQueue() {\n            const queue = this.queue;\n            this.queue = [];\n            return this.loadScripts(queue);\n        }\n        /**\n         * Loads the specified queue of files and executes the callback ones they are loaded.\n         * This method is generally not used outside this class but it might be useful in some scenarios.\n         *\n         * @method loadScripts\n         * @param {Array} scripts Array of queue items to load.\n         * @return {Promise} A promise that is resolved when all scripts are loaded or rejected with the script urls that failed to load.\n         */\n        loadScripts(scripts) {\n            const self = this;\n            const execCallbacks = (name, url) => {\n                // Execute URL callback functions\n                get$b(self.scriptLoadedCallbacks, url).each((callbacks) => {\n                    each$e(callbacks, (callback) => callback[name](url));\n                });\n                delete self.scriptLoadedCallbacks[url];\n            };\n            const processResults = (results) => {\n                const failures = filter$5(results, (result) => result.status === 'rejected');\n                if (failures.length > 0) {\n                    return Promise.reject(bind$3(failures, ({ reason }) => isArray$1(reason) ? reason : [reason]));\n                }\n                else {\n                    return Promise.resolve();\n                }\n            };\n            const load = (urls) => Promise.allSettled(map$3(urls, (url) => {\n                // Script is already loaded then execute script callbacks directly\n                if (self.states[url] === LOADED) {\n                    execCallbacks('resolve', url);\n                    return Promise.resolve();\n                }\n                else if (self.states[url] === FAILED) {\n                    execCallbacks('reject', url);\n                    return Promise.reject(url);\n                }\n                else {\n                    // Script is not already loaded, so load it\n                    self.states[url] = LOADING;\n                    return self.loadScript(url).then(() => {\n                        self.states[url] = LOADED;\n                        execCallbacks('resolve', url);\n                        // Immediately load additional scripts if any were added to the queue while loading this script\n                        const queue = self.queue;\n                        if (queue.length > 0) {\n                            self.queue = [];\n                            return load(queue).then(processResults);\n                        }\n                        else {\n                            return Promise.resolve();\n                        }\n                    }, () => {\n                        self.states[url] = FAILED;\n                        execCallbacks('reject', url);\n                        return Promise.reject(url);\n                    });\n                }\n            }));\n            const processQueue = (urls) => {\n                self.loading = true;\n                return load(urls).then((results) => {\n                    self.loading = false;\n                    // Start loading the next queued item\n                    const nextQueuedItem = self.queueLoadedCallbacks.shift();\n                    Optional.from(nextQueuedItem).each(call);\n                    return processResults(results);\n                });\n            };\n            // Wait for any other scripts to finish loading first, otherwise load immediately\n            const uniqueScripts = stringArray(scripts);\n            if (self.loading) {\n                return new Promise((resolve, reject) => {\n                    self.queueLoadedCallbacks.push(() => {\n                        processQueue(uniqueScripts).then(resolve, reject);\n                    });\n                });\n            }\n            else {\n                return processQueue(uniqueScripts);\n            }\n        }\n        /**\n         * Returns the attributes that should be added to a script tag when loading the specified URL.\n         *\n         * @method getScriptAttributes\n         * @param {String} url Url to get attributes for.\n         * @return {Object} Object with attributes to add to the script tag.\n         */\n        getScriptAttributes(url) {\n            const attrs = {};\n            if (this.settings.referrerPolicy) {\n                attrs.referrerpolicy = this.settings.referrerPolicy;\n            }\n            const crossOrigin = this.settings.crossOrigin;\n            if (isFunction(crossOrigin)) {\n                const resultCrossOrigin = crossOrigin(url);\n                if (isString(resultCrossOrigin)) {\n                    attrs.crossorigin = resultCrossOrigin;\n                }\n            }\n            return attrs;\n        }\n    }\n\n    const isDuplicated = (items, item) => {\n        const firstIndex = items.indexOf(item);\n        return firstIndex !== -1 && items.indexOf(item, firstIndex + 1) > firstIndex;\n    };\n    const isRaw = (str) => isObject(str) && has$2(str, 'raw');\n    const isTokenised = (str) => isArray$1(str) && str.length > 1;\n    const data = {};\n    const currentCode = Cell('en');\n    const getLanguageData = () => get$b(data, currentCode.get());\n    const getData$1 = () => map$2(data, (value) => ({ ...value }));\n    /**\n     * Sets the current language code.\n     *\n     * @method setCode\n     * @param {String} newCode Current language code.\n     */\n    const setCode = (newCode) => {\n        if (newCode) {\n            currentCode.set(newCode);\n        }\n    };\n    /**\n     * Returns the current language code.\n     *\n     * @method getCode\n     * @return {String} Current language code.\n     */\n    const getCode = () => currentCode.get();\n    /**\n     * Adds translations for a specific language code.\n     * Translation keys are set to be case insensitive.\n     *\n     * @method add\n     * @param {String} code Language code like sv_SE.\n     * @param {Object} items Name/value object where key is english and value is the translation.\n     */\n    const add = (code, items) => {\n        let langData = data[code];\n        if (!langData) {\n            data[code] = langData = {};\n        }\n        const lcNames = map$3(keys(items), (name) => name.toLowerCase());\n        each$d(items, (translation, name) => {\n            const lcName = name.toLowerCase();\n            if (lcName !== name && isDuplicated(lcNames, lcName)) {\n                if (!has$2(items, lcName)) {\n                    langData[lcName] = translation;\n                }\n                langData[name] = translation;\n            }\n            else {\n                langData[lcName] = translation;\n            }\n        });\n    };\n    /**\n     * Translates the specified text.\n     *\n     * It has a few formats:\n     * I18n.translate(\"Text\");\n     * I18n.translate([\"Text {0}/{1}\", 0, 1]);\n     * I18n.translate({raw: \"Raw string\"});\n     *\n     * @method translate\n     * @param {String/Object/Array} text Text to translate.\n     * @return {String} String that got translated.\n     */\n    const translate = (text) => {\n        const langData = getLanguageData().getOr({});\n        /*\n         * number - string\n         * null, undefined and empty string - empty string\n         * array - comma-delimited string\n         * object - in [object Object]\n         * function - in [object Function]\n         */\n        const toString = (obj) => {\n            if (isFunction(obj)) {\n                return Object.prototype.toString.call(obj);\n            }\n            return !isEmpty(obj) ? '' + obj : '';\n        };\n        const isEmpty = (text) => text === '' || text === null || text === undefined;\n        const getLangData = (text) => {\n            // make sure we work on a string and return a string\n            const textStr = toString(text);\n            return has$2(langData, textStr)\n                ? toString(langData[textStr])\n                : get$b(langData, textStr.toLowerCase()).map(toString).getOr(textStr);\n        };\n        const removeContext = (str) => str.replace(/{context:\\w+}$/, '');\n        const replaceWithEllipsisChar = (text) => text.replaceAll('...', ellipsis);\n        // empty strings\n        if (isEmpty(text)) {\n            return '';\n        }\n        // Raw, already translated\n        if (isRaw(text)) {\n            return replaceWithEllipsisChar(toString(text.raw));\n        }\n        // Tokenised {translations}\n        if (isTokenised(text)) {\n            const values = text.slice(1);\n            const substitued = getLangData(text[0]).replace(/\\{([0-9]+)\\}/g, ($1, $2) => has$2(values, $2) ? toString(values[$2]) : $1);\n            return replaceWithEllipsisChar(removeContext(substitued));\n        }\n        // straight forward translation mapping\n        return replaceWithEllipsisChar(removeContext(getLangData(text)));\n    };\n    /**\n     * Returns true/false if the currently active language pack is rtl or not.\n     *\n     * @method isRtl\n     * @return {Boolean} True if the current language pack is rtl.\n     */\n    const isRtl$1 = () => getLanguageData()\n        .bind((items) => get$b(items, '_dir'))\n        .exists((dir) => dir === 'rtl');\n    /**\n     * Returns true/false if specified language pack exists.\n     *\n     * @method hasCode\n     * @param {String} code Code to check for.\n     * @return {Boolean} True if the current language pack for the specified code exists.\n     */\n    const hasCode = (code) => has$2(data, code);\n    const I18n = {\n        getData: getData$1,\n        setCode,\n        getCode,\n        add,\n        translate,\n        isRtl: isRtl$1,\n        hasCode\n    };\n\n    const AddOnManager = () => {\n        const items = [];\n        const urls = {};\n        const lookup = {};\n        const _listeners = [];\n        const runListeners = (name, state) => {\n            const matchedListeners = filter$5(_listeners, (listener) => listener.name === name && listener.state === state);\n            each$e(matchedListeners, (listener) => listener.resolve());\n        };\n        const isLoaded = (name) => has$2(urls, name);\n        const isAdded = (name) => has$2(lookup, name);\n        const get = (name) => {\n            if (lookup[name]) {\n                return lookup[name].instance;\n            }\n            return undefined;\n        };\n        const loadLanguagePack = (name, languages) => {\n            const language = I18n.getCode();\n            const wrappedLanguages = ',' + (languages || '') + ',';\n            if (!language || languages && wrappedLanguages.indexOf(',' + language + ',') === -1) {\n                return;\n            }\n            // eslint-disable-next-line @typescript-eslint/no-floating-promises\n            ScriptLoader.ScriptLoader.add(urls[name] + '/langs/' + language + '.js');\n        };\n        const requireLangPack = (name, languages) => {\n            if (AddOnManager.languageLoad !== false) {\n                if (isLoaded(name)) {\n                    loadLanguagePack(name, languages);\n                }\n                else {\n                    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n                    waitFor(name, 'loaded').then(() => loadLanguagePack(name, languages));\n                }\n            }\n        };\n        const add = (id, addOn) => {\n            items.push(addOn);\n            lookup[id] = { instance: addOn };\n            runListeners(id, 'added');\n            return addOn;\n        };\n        const remove = (name) => {\n            delete urls[name];\n            delete lookup[name];\n        };\n        const createUrl = (baseUrl, dep) => {\n            if (isString(dep)) {\n                return isString(baseUrl) ?\n                    { prefix: '', resource: dep, suffix: '' } :\n                    { prefix: baseUrl.prefix, resource: dep, suffix: baseUrl.suffix };\n            }\n            else {\n                return dep;\n            }\n        };\n        const load = (name, addOnUrl) => {\n            if (urls[name]) {\n                return Promise.resolve();\n            }\n            let urlString = isString(addOnUrl) ? addOnUrl : addOnUrl.prefix + addOnUrl.resource + addOnUrl.suffix;\n            if (urlString.indexOf('/') !== 0 && urlString.indexOf('://') === -1) {\n                urlString = AddOnManager.baseURL + '/' + urlString;\n            }\n            urls[name] = urlString.substring(0, urlString.lastIndexOf('/'));\n            const done = () => {\n                runListeners(name, 'loaded');\n                return Promise.resolve();\n            };\n            if (lookup[name]) {\n                return done();\n            }\n            else {\n                return ScriptLoader.ScriptLoader.add(urlString).then(done);\n            }\n        };\n        const waitFor = (name, state = 'added') => {\n            if (state === 'added' && isAdded(name)) {\n                return Promise.resolve();\n            }\n            else if (state === 'loaded' && isLoaded(name)) {\n                return Promise.resolve();\n            }\n            else {\n                return new Promise((resolve) => {\n                    _listeners.push({ name, state, resolve });\n                });\n            }\n        };\n        return {\n            items,\n            urls,\n            lookup,\n            /**\n             * Returns the specified add on by the short name.\n             *\n             * @method get\n             * @param {String} name Add-on to look for.\n             * @return {tinymce.Theme/tinymce.Plugin} Theme or plugin add-on instance or undefined.\n             */\n            get,\n            /**\n             * Loads a language pack for the specified add-on.\n             *\n             * @method requireLangPack\n             * @param {String} name Short name of the add-on.\n             * @param {String} languages Optional comma or space separated list of languages to check if it matches the name.\n             */\n            requireLangPack,\n            /**\n             * Adds a instance of the add-on by it's short name.\n             *\n             * @method add\n             * @param {String} id Short name/id for the add-on.\n             * @param {tinymce.Theme/tinymce.Plugin} addOn Theme or plugin to add.\n             * @return {tinymce.Theme/tinymce.Plugin} The same theme or plugin instance that got passed in.\n             * @example\n             * // Create a simple plugin\n             * const TestPlugin = (ed, url) => {\n             *   ed.on('click', (e) => {\n             *     ed.windowManager.alert('Hello World!');\n             *   });\n             * };\n             *\n             * // Register plugin using the add method\n             * tinymce.PluginManager.add('test', TestPlugin);\n             *\n             * // Initialize TinyMCE\n             * tinymce.init({\n             *   ...\n             *   plugins: '-test' // Init the plugin but don't try to load it\n             * });\n             */\n            add,\n            remove,\n            createUrl,\n            /**\n             * Loads an add-on from a specific url.\n             *\n             * @method load\n             * @param {String} name Short name of the add-on that gets loaded.\n             * @param {String} addOnUrl URL to the add-on that will get loaded.\n             * @return {Promise} A promise that will resolve when the add-on is loaded successfully or reject if it failed to load.\n             * @example\n             * // Loads a plugin from an external URL\n             * tinymce.PluginManager.load('myplugin', '/some/dir/someplugin/plugin.js');\n             *\n             * // Initialize TinyMCE\n             * tinymce.init({\n             *   ...\n             *   plugins: '-myplugin' // Don't try to load it again\n             * });\n             */\n            load,\n            waitFor\n        };\n    };\n    AddOnManager.languageLoad = true;\n    AddOnManager.baseURL = '';\n    AddOnManager.PluginManager = AddOnManager();\n    AddOnManager.ThemeManager = AddOnManager();\n    AddOnManager.ModelManager = AddOnManager();\n\n    const annotation = constant('mce-annotation');\n    const dataAnnotation = constant('data-mce-annotation');\n    const dataAnnotationId = constant('data-mce-annotation-uid');\n    const dataAnnotationActive = constant('data-mce-annotation-active');\n    const dataAnnotationClasses = constant('data-mce-annotation-classes');\n    const dataAnnotationAttributes = constant('data-mce-annotation-attrs');\n\n    const isRoot$1 = (root) => (node) => eq(node, root);\n    // Given the current editor selection, identify the uid of any current\n    // annotation\n    const identify = (editor, annotationName) => {\n        const rng = editor.selection.getRng();\n        const start = SugarElement.fromDom(rng.startContainer);\n        const root = SugarElement.fromDom(editor.getBody());\n        const selector = annotationName.fold(() => '.' + annotation(), (an) => `[${dataAnnotation()}=\"${an}\"]`);\n        const newStart = child$1(start, rng.startOffset).getOr(start);\n        const closest = closest$4(newStart, selector, isRoot$1(root));\n        return closest.bind((c) => getOpt(c, `${dataAnnotationId()}`).bind((uid) => getOpt(c, `${dataAnnotation()}`).map((name) => {\n            const elements = findMarkers(editor, uid);\n            return {\n                uid,\n                name,\n                elements\n            };\n        })));\n    };\n    const isAnnotation = (elem) => isElement$8(elem) && has(elem, annotation());\n    const isBogusElement = (elem, root) => has$1(elem, 'data-mce-bogus') || ancestor$1(elem, '[data-mce-bogus=\"all\"]', isRoot$1(root));\n    const findMarkers = (editor, uid) => {\n        const body = SugarElement.fromDom(editor.getBody());\n        const descendants$1 = descendants(body, `[${dataAnnotationId()}=\"${uid}\"]`);\n        return filter$5(descendants$1, (descendant) => !isBogusElement(descendant, body));\n    };\n    const findAll = (editor, name) => {\n        const body = SugarElement.fromDom(editor.getBody());\n        const markers = descendants(body, `[${dataAnnotation()}=\"${name}\"]`);\n        const directory = {};\n        each$e(markers, (m) => {\n            if (!isBogusElement(m, body)) {\n                const uid = get$a(m, dataAnnotationId());\n                const nodesAlready = get$b(directory, uid).getOr([]);\n                directory[uid] = nodesAlready.concat([m]);\n            }\n        });\n        return directory;\n    };\n\n    const setup$E = (editor, registry) => {\n        const changeCallbacks = Cell({});\n        const initData = () => ({\n            listeners: [],\n            previous: value$1()\n        });\n        const withCallbacks = (name, f) => {\n            updateCallbacks(name, (data) => {\n                f(data);\n                return data;\n            });\n        };\n        const updateCallbacks = (name, f) => {\n            const callbackMap = changeCallbacks.get();\n            const data = get$b(callbackMap, name).getOrThunk(initData);\n            const outputData = f(data);\n            callbackMap[name] = outputData;\n            changeCallbacks.set(callbackMap);\n        };\n        const fireCallbacks = (name, uid, elements) => {\n            withCallbacks(name, (data) => {\n                each$e(data.listeners, (f) => f(true, name, {\n                    uid,\n                    nodes: map$3(elements, (elem) => elem.dom)\n                }));\n            });\n        };\n        const fireNoAnnotation = (name) => {\n            withCallbacks(name, (data) => {\n                each$e(data.listeners, (f) => f(false, name));\n            });\n        };\n        const toggleActiveAttr = (uid, state) => {\n            each$e(findMarkers(editor, uid), (elem) => {\n                if (state) {\n                    set$5(elem, dataAnnotationActive(), 'true');\n                }\n                else {\n                    remove$9(elem, dataAnnotationActive());\n                }\n            });\n        };\n        // NOTE: Runs in alphabetical order.\n        const onNodeChange = last$1(() => {\n            const annotations = sort(registry.getNames());\n            each$e(annotations, (name) => {\n                updateCallbacks(name, (data) => {\n                    const prev = data.previous.get();\n                    identify(editor, Optional.some(name)).fold(() => {\n                        prev.each((uid) => {\n                            // Changed from something to nothing.\n                            fireNoAnnotation(name);\n                            data.previous.clear();\n                            toggleActiveAttr(uid, false);\n                        });\n                    }, ({ uid, name, elements }) => {\n                        // Changed from a different annotation (or nothing)\n                        if (!is$4(prev, uid)) {\n                            prev.each((uid) => toggleActiveAttr(uid, false));\n                            fireCallbacks(name, uid, elements);\n                            data.previous.set(uid);\n                            toggleActiveAttr(uid, true);\n                        }\n                    });\n                    return {\n                        previous: data.previous,\n                        listeners: data.listeners\n                    };\n                });\n            });\n        }, 30);\n        editor.on('remove', () => {\n            onNodeChange.cancel();\n        });\n        editor.on('NodeChange', () => {\n            onNodeChange.throttle();\n        });\n        const addListener = (name, f) => {\n            updateCallbacks(name, (data) => ({\n                previous: data.previous,\n                listeners: data.listeners.concat([f])\n            }));\n        };\n        return {\n            addListener\n        };\n    };\n\n    const setup$D = (editor, registry) => {\n        const dataAnnotation$1 = dataAnnotation();\n        const identifyParserNode = (node) => Optional.from(node.attr(dataAnnotation$1)).bind(registry.lookup);\n        const removeDirectAnnotation = (node) => {\n            node.attr(dataAnnotationId(), null);\n            node.attr(dataAnnotation(), null);\n            node.attr(dataAnnotationActive(), null);\n            const customAttrNames = Optional.from(node.attr(dataAnnotationAttributes())).map((names) => names.split(',')).getOr([]);\n            const customClasses = Optional.from(node.attr(dataAnnotationClasses())).map((names) => names.split(',')).getOr([]);\n            each$e(customAttrNames, (name) => node.attr(name, null));\n            const classList = node.attr('class')?.split(' ') ?? [];\n            const newClassList = difference(classList, [annotation()].concat(customClasses));\n            node.attr('class', newClassList.length > 0 ? newClassList.join(' ') : null);\n            node.attr(dataAnnotationClasses(), null);\n            node.attr(dataAnnotationAttributes(), null);\n        };\n        editor.serializer.addTempAttr(dataAnnotationActive());\n        editor.serializer.addAttributeFilter(dataAnnotation$1, (nodes) => {\n            for (const node of nodes) {\n                identifyParserNode(node).each((settings) => {\n                    if (settings.persistent === false) {\n                        if (node.name === 'span') {\n                            node.unwrap();\n                        }\n                        else {\n                            removeDirectAnnotation(node);\n                        }\n                    }\n                });\n            }\n        });\n    };\n\n    const create$a = () => {\n        const annotations = {};\n        const register = (name, settings) => {\n            annotations[name] = {\n                name,\n                settings\n            };\n        };\n        const lookup = (name) => get$b(annotations, name).map((a) => a.settings);\n        const getNames = () => keys(annotations);\n        return {\n            register,\n            lookup,\n            getNames\n        };\n    };\n\n    const TextWalker = (startNode, rootNode, isBoundary = never) => {\n        const walker = new DomTreeWalker(startNode, rootNode);\n        const walk = (direction) => {\n            let next;\n            do {\n                next = walker[direction]();\n            } while (next && !isText$b(next) && !isBoundary(next));\n            return Optional.from(next).filter(isText$b);\n        };\n        return {\n            current: () => Optional.from(walker.current()).filter(isText$b),\n            next: () => walk('next'),\n            prev: () => walk('prev'),\n            prev2: () => walk('prev2')\n        };\n    };\n\n    /**\n     * The TextSeeker class enables you to seek for a specific point in text across the DOM.\n     *\n     * @class tinymce.dom.TextSeeker\n     * @example\n     * const seeker = tinymce.dom.TextSeeker(editor.dom);\n     * const startOfWord = seeker.backwards(startNode, startOffset, (textNode, offset, text) => {\n     *   const lastSpaceCharIndex = text.lastIndexOf(' ');\n     *   if (lastSpaceCharIndex !== -1) {\n     *     return lastSpaceCharIndex + 1;\n     *   } else {\n     *     // No space found so continue searching\n     *     return -1;\n     *   }\n     * });\n     */\n    /**\n     * Constructs a new TextSeeker instance.\n     *\n     * @constructor\n     * @param {tinymce.dom.DOMUtils} dom DOMUtils object reference.\n     * @param {Function} isBoundary Optional function to determine if the seeker should continue to walk past the node provided. The default is to search until a block or <code>br</code> element is found.\n     */\n    const TextSeeker = (dom, isBoundary) => {\n        const isBlockBoundary = isBoundary ? isBoundary : (node) => dom.isBlock(node) || isBr$7(node) || isContentEditableFalse$a(node);\n        const walk = (node, offset, walker, process) => {\n            if (isText$b(node)) {\n                const newOffset = process(node, offset, node.data);\n                if (newOffset !== -1) {\n                    return Optional.some({ container: node, offset: newOffset });\n                }\n            }\n            return walker().bind((next) => walk(next.container, next.offset, walker, process));\n        };\n        /**\n         * Search backwards through text nodes until a match, boundary, or root node has been found.\n         *\n         * @method backwards\n         * @param {Node} node The node to start searching from.\n         * @param {Number} offset The offset of the node to start searching from.\n         * @param {Function} process A function that's passed the current text node, the current offset and the text content of the node. It should return the offset of the match or -1 to continue searching.\n         * @param {Node} root An optional root node to constrain the search to.\n         * @return {Object} An object containing the matched text node and offset. If no match is found, null will be returned.\n         */\n        const backwards = (node, offset, process, root) => {\n            const walker = TextWalker(node, root ?? dom.getRoot(), isBlockBoundary);\n            return walk(node, offset, () => walker.prev().map((prev) => ({ container: prev, offset: prev.length })), process).getOrNull();\n        };\n        /**\n         * Search forwards through text nodes until a match, boundary, or root node has been found.\n         *\n         * @method forwards\n         * @param {Node} node The node to start searching from.\n         * @param {Number} offset The offset of the node to start searching from.\n         * @param {Function} process A function that's passed the current text node, the current offset and the text content of the node. It should return the offset of the match or -1 to continue searching.\n         * @param {Node} root An optional root node to constrain the search to.\n         * @return {Object} An object containing the matched text node and offset. If no match is found, null will be returned.\n         */\n        const forwards = (node, offset, process, root) => {\n            const walker = TextWalker(node, root ?? dom.getRoot(), isBlockBoundary);\n            return walk(node, offset, () => walker.next().map((next) => ({ container: next, offset: 0 })), process).getOrNull();\n        };\n        return {\n            backwards,\n            forwards\n        };\n    };\n\n    const tableCells = ['td', 'th'];\n    const tableSections = ['thead', 'tbody', 'tfoot'];\n    const textBlocks = [\n        'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p', 'div', 'address', 'pre', 'form',\n        'blockquote', 'center', 'dir', 'fieldset', 'header', 'footer', 'article',\n        'section', 'hgroup', 'aside', 'nav', 'figure'\n    ];\n    const listItems$1 = ['li', 'dd', 'dt'];\n    const lists = ['ul', 'ol', 'dl'];\n    const wsElements = ['pre', 'script', 'textarea', 'style'];\n    const lazyLookup = (items) => {\n        let lookup;\n        return (node) => {\n            lookup = lookup ? lookup : mapToObject(items, always);\n            return has$2(lookup, name(node));\n        };\n    };\n    // WARNING: don't add anything to this file, the intention is to move these checks into the Schema\n    const isTable$1 = (node) => name(node) === 'table';\n    const isBr$6 = (node) => isElement$8(node) && name(node) === 'br';\n    const isScript = (node) => isElement$8(node) && name(node) === 'script';\n    const isStyle = (node) => isElement$8(node) && name(node) === 'style';\n    const isIframe = (node) => isElement$8(node) && name(node) === 'iframe';\n    const isTextBlock$3 = lazyLookup(textBlocks);\n    const isList$1 = lazyLookup(lists);\n    const isListItem$2 = lazyLookup(listItems$1);\n    const isTableSection = lazyLookup(tableSections);\n    const isTableCell$2 = lazyLookup(tableCells);\n    const isWsPreserveElement = lazyLookup(wsElements);\n\n    const getLastChildren$1 = (elm) => {\n        const children = [];\n        let rawNode = elm.dom;\n        while (rawNode) {\n            children.push(SugarElement.fromDom(rawNode));\n            rawNode = rawNode.lastChild;\n        }\n        return children;\n    };\n    const removeTrailingBr = (elm) => {\n        const allBrs = descendants(elm, 'br');\n        const brs = filter$5(getLastChildren$1(elm).slice(-1), isBr$6);\n        if (allBrs.length === brs.length) {\n            each$e(brs, remove$8);\n        }\n    };\n    const createPaddingBr = () => {\n        const br = SugarElement.fromTag('br');\n        set$5(br, 'data-mce-bogus', '1');\n        return br;\n    };\n    const fillWithPaddingBr = (elm) => {\n        empty(elm);\n        append$1(elm, createPaddingBr());\n    };\n    const trimBlockTrailingBr = (elm, schema) => {\n        lastChild(elm).each((lastChild) => {\n            prevSibling(lastChild).each((lastChildPrevSibling) => {\n                if (schema.isBlock(name(elm)) && isBr$6(lastChild) && schema.isBlock(name(lastChildPrevSibling))) {\n                    remove$8(lastChild);\n                }\n            });\n        });\n    };\n\n    /**\n     * Utility functions for working with zero width space\n     * characters used as character containers etc.\n     *\n     * @private\n     * @class tinymce.text.Zwsp\n     * @example\n     * const isZwsp = Zwsp.isZwsp('\\uFEFF');\n     * const abc = Zwsp.trim('a\\uFEFFc');\n     */\n    // This is technically not a ZWSP but a ZWNBSP or a BYTE ORDER MARK it used to be a ZWSP\n    const ZWSP$1 = zeroWidth;\n    const isZwsp = isZwsp$2;\n    const trim$2 = removeZwsp;\n    const insert$5 = (editor) => editor.insertContent(ZWSP$1, { preserve_zwsp: true });\n\n    /**\n     * This module handles caret containers. A caret container is a node that\n     * holds the caret for positional purposes.\n     *\n     * @private\n     * @class tinymce.caret.CaretContainer\n     */\n    const isElement$6 = isElement$7;\n    const isText$9 = isText$b;\n    const isCaretContainerBlock$1 = (node) => {\n        if (isText$9(node)) {\n            node = node.parentNode;\n        }\n        return isElement$6(node) && node.hasAttribute('data-mce-caret');\n    };\n    const isCaretContainerInline = (node) => isText$9(node) && isZwsp(node.data);\n    const isCaretContainer$2 = (node) => isCaretContainerBlock$1(node) || isCaretContainerInline(node);\n    const hasContent = (node) => node.firstChild !== node.lastChild || !isBr$7(node.firstChild);\n    const insertInline$1 = (node, before) => {\n        const doc = node.ownerDocument ?? document;\n        const textNode = doc.createTextNode(ZWSP$1);\n        const parentNode = node.parentNode;\n        if (!before) {\n            const sibling = node.nextSibling;\n            if (isText$9(sibling)) {\n                if (isCaretContainer$2(sibling)) {\n                    return sibling;\n                }\n                if (startsWithCaretContainer$1(sibling)) {\n                    sibling.splitText(1);\n                    return sibling;\n                }\n            }\n            if (node.nextSibling) {\n                parentNode?.insertBefore(textNode, node.nextSibling);\n            }\n            else {\n                parentNode?.appendChild(textNode);\n            }\n        }\n        else {\n            const sibling = node.previousSibling;\n            if (isText$9(sibling)) {\n                if (isCaretContainer$2(sibling)) {\n                    return sibling;\n                }\n                if (endsWithCaretContainer$1(sibling)) {\n                    return sibling.splitText(sibling.data.length - 1);\n                }\n            }\n            parentNode?.insertBefore(textNode, node);\n        }\n        return textNode;\n    };\n    const isBeforeInline = (pos) => {\n        const container = pos.container();\n        if (!isText$b(container)) {\n            return false;\n        }\n        // The text nodes may not be normalized, so check the current node and the previous one\n        return container.data.charAt(pos.offset()) === ZWSP$1 || pos.isAtStart() && isCaretContainerInline(container.previousSibling);\n    };\n    const isAfterInline = (pos) => {\n        const container = pos.container();\n        if (!isText$b(container)) {\n            return false;\n        }\n        // The text nodes may not be normalized, so check the current node and the next one\n        return container.data.charAt(pos.offset() - 1) === ZWSP$1 || pos.isAtEnd() && isCaretContainerInline(container.nextSibling);\n    };\n    const insertBlock = (blockName, node, before) => {\n        const doc = node.ownerDocument ?? document;\n        const blockNode = doc.createElement(blockName);\n        blockNode.setAttribute('data-mce-caret', before ? 'before' : 'after');\n        blockNode.setAttribute('data-mce-bogus', 'all');\n        blockNode.appendChild(createPaddingBr().dom);\n        const parentNode = node.parentNode;\n        if (!before) {\n            if (node.nextSibling) {\n                parentNode?.insertBefore(blockNode, node.nextSibling);\n            }\n            else {\n                parentNode?.appendChild(blockNode);\n            }\n        }\n        else {\n            parentNode?.insertBefore(blockNode, node);\n        }\n        return blockNode;\n    };\n    const startsWithCaretContainer$1 = (node) => isText$9(node) && node.data[0] === ZWSP$1;\n    const endsWithCaretContainer$1 = (node) => isText$9(node) && node.data[node.data.length - 1] === ZWSP$1;\n    const trimBogusBr = (elm) => {\n        const brs = elm.getElementsByTagName('br');\n        const lastBr = brs[brs.length - 1];\n        if (isBogus$1(lastBr)) {\n            lastBr.parentNode?.removeChild(lastBr);\n        }\n    };\n    const showCaretContainerBlock = (caretContainer) => {\n        if (caretContainer && caretContainer.hasAttribute('data-mce-caret')) {\n            trimBogusBr(caretContainer);\n            caretContainer.removeAttribute('data-mce-caret');\n            caretContainer.removeAttribute('data-mce-bogus');\n            caretContainer.removeAttribute('style');\n            caretContainer.removeAttribute('data-mce-style');\n            caretContainer.removeAttribute('_moz_abspos');\n            return caretContainer;\n        }\n        return null;\n    };\n    const isRangeInCaretContainerBlock = (range) => isCaretContainerBlock$1(range.startContainer);\n\n    const round$2 = Math.round;\n    const clone$1 = (rect) => {\n        if (!rect) {\n            return { left: 0, top: 0, bottom: 0, right: 0, width: 0, height: 0 };\n        }\n        return {\n            left: round$2(rect.left),\n            top: round$2(rect.top),\n            bottom: round$2(rect.bottom),\n            right: round$2(rect.right),\n            width: round$2(rect.width),\n            height: round$2(rect.height)\n        };\n    };\n    const collapse = (rect, toStart) => {\n        rect = clone$1(rect);\n        if (toStart) {\n            rect.right = rect.left;\n        }\n        else {\n            rect.left = rect.left + rect.width;\n            rect.right = rect.left;\n        }\n        rect.width = 0;\n        return rect;\n    };\n    const isEqual = (rect1, rect2) => (rect1.left === rect2.left &&\n        rect1.top === rect2.top &&\n        rect1.bottom === rect2.bottom &&\n        rect1.right === rect2.right);\n    const isValidOverflow = (overflowY, rect1, rect2) => overflowY >= 0 && overflowY <= Math.min(rect1.height, rect2.height) / 2;\n    const isAbove$1 = (rect1, rect2) => {\n        const halfHeight = Math.min(rect2.height / 2, rect1.height / 2);\n        if ((rect1.bottom - halfHeight) < rect2.top) {\n            return true;\n        }\n        if (rect1.top > rect2.bottom) {\n            return false;\n        }\n        return isValidOverflow(rect2.top - rect1.bottom, rect1, rect2);\n    };\n    const isBelow$1 = (rect1, rect2) => {\n        if (rect1.top > rect2.bottom) {\n            return true;\n        }\n        if (rect1.bottom < rect2.top) {\n            return false;\n        }\n        return isValidOverflow(rect2.bottom - rect1.top, rect1, rect2);\n    };\n    const containsXY = (rect, clientX, clientY) => (clientX >= rect.left &&\n        clientX <= rect.right &&\n        clientY >= rect.top &&\n        clientY <= rect.bottom);\n    const boundingClientRectFromRects = (rects) => {\n        return foldl(rects, (acc, rect) => {\n            return acc.fold(() => Optional.some(rect), (prevRect) => {\n                const left = Math.min(rect.left, prevRect.left);\n                const top = Math.min(rect.top, prevRect.top);\n                const right = Math.max(rect.right, prevRect.right);\n                const bottom = Math.max(rect.bottom, prevRect.bottom);\n                return Optional.some({\n                    top,\n                    right,\n                    bottom,\n                    left,\n                    width: right - left,\n                    height: bottom - top\n                });\n            });\n        }, Optional.none());\n    };\n    const distanceToRectEdgeFromXY = (rect, x, y) => {\n        const cx = Math.max(Math.min(x, rect.left + rect.width), rect.left);\n        const cy = Math.max(Math.min(y, rect.top + rect.height), rect.top);\n        return Math.sqrt((x - cx) * (x - cx) + (y - cy) * (y - cy));\n    };\n    const overlapY = (r1, r2) => Math.max(0, Math.min(r1.bottom, r2.bottom) - Math.max(r1.top, r2.top));\n\n    const getSelectedNode = (range) => {\n        const startContainer = range.startContainer, startOffset = range.startOffset;\n        if (startContainer === range.endContainer && startContainer.hasChildNodes() && range.endOffset === startOffset + 1) {\n            return startContainer.childNodes[startOffset];\n        }\n        return null;\n    };\n    const getNode$1 = (container, offset) => {\n        if (isElement$7(container) && container.hasChildNodes()) {\n            const childNodes = container.childNodes;\n            const safeOffset = clamp$2(offset, 0, childNodes.length - 1);\n            return childNodes[safeOffset];\n        }\n        else {\n            return container;\n        }\n    };\n    /** @deprecated Use getNode instead */\n    const getNodeUnsafe = (container, offset) => {\n        // If a negative offset is used on an element then `undefined` should be returned\n        if (offset < 0 && isElement$7(container) && container.hasChildNodes()) {\n            return undefined;\n        }\n        else {\n            return getNode$1(container, offset);\n        }\n    };\n\n    /**\n     * This class contains logic for detecting extending characters.\n     *\n     * @private\n     * @class tinymce.text.ExtendingChar\n     * @example\n     * const isExtending = ExtendingChar.isExtendingChar('a');\n     */\n    // Generated from: http://www.unicode.org/Public/UNIDATA/DerivedCoreProperties.txt\n    // Only includes the characters in that fit into UCS-2 16 bit\n    const extendingChars = new RegExp('[\\u0300-\\u036F\\u0483-\\u0487\\u0488-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1-\\u05C2\\u05C4-\\u05C5\\u05C7\\u0610-\\u061A' +\n        '\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7-\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0' +\n        '\\u07EB-\\u07F3\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08E3-\\u0902\\u093A\\u093C' +\n        '\\u0941-\\u0948\\u094D\\u0951-\\u0957\\u0962-\\u0963\\u0981\\u09BC\\u09BE\\u09C1-\\u09C4\\u09CD\\u09D7\\u09E2-\\u09E3' +\n        '\\u0A01-\\u0A02\\u0A3C\\u0A41-\\u0A42\\u0A47-\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70-\\u0A71\\u0A75\\u0A81-\\u0A82\\u0ABC' +\n        '\\u0AC1-\\u0AC5\\u0AC7-\\u0AC8\\u0ACD\\u0AE2-\\u0AE3\\u0B01\\u0B3C\\u0B3E\\u0B3F\\u0B41-\\u0B44\\u0B4D\\u0B56\\u0B57' +\n        '\\u0B62-\\u0B63\\u0B82\\u0BBE\\u0BC0\\u0BCD\\u0BD7\\u0C00\\u0C3E-\\u0C40\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55-\\u0C56' +\n        '\\u0C62-\\u0C63\\u0C81\\u0CBC\\u0CBF\\u0CC2\\u0CC6\\u0CCC-\\u0CCD\\u0CD5-\\u0CD6\\u0CE2-\\u0CE3\\u0D01\\u0D3E\\u0D41-\\u0D44' +\n        '\\u0D4D\\u0D57\\u0D62-\\u0D63\\u0DCA\\u0DCF\\u0DD2-\\u0DD4\\u0DD6\\u0DDF\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EB9' +\n        '\\u0EBB-\\u0EBC\\u0EC8-\\u0ECD\\u0F18-\\u0F19\\u0F35\\u0F37\\u0F39\\u0F71-\\u0F7E\\u0F80-\\u0F84\\u0F86-\\u0F87\\u0F8D-\\u0F97' +\n        '\\u0F99-\\u0FBC\\u0FC6\\u102D-\\u1030\\u1032-\\u1037\\u1039-\\u103A\\u103D-\\u103E\\u1058-\\u1059\\u105E-\\u1060\\u1071-\\u1074' +\n        '\\u1082\\u1085-\\u1086\\u108D\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752-\\u1753\\u1772-\\u1773\\u17B4-\\u17B5' +\n        '\\u17B7-\\u17BD\\u17C6\\u17C9-\\u17D3\\u17DD\\u180B-\\u180D\\u18A9\\u1920-\\u1922\\u1927-\\u1928\\u1932\\u1939-\\u193B\\u1A17-\\u1A18' +\n        '\\u1A1B\\u1A56\\u1A58-\\u1A5E\\u1A60\\u1A62\\u1A65-\\u1A6C\\u1A73-\\u1A7C\\u1A7F\\u1AB0-\\u1ABD\\u1ABE\\u1B00-\\u1B03\\u1B34' +\n        '\\u1B36-\\u1B3A\\u1B3C\\u1B42\\u1B6B-\\u1B73\\u1B80-\\u1B81\\u1BA2-\\u1BA5\\u1BA8-\\u1BA9\\u1BAB-\\u1BAD\\u1BE6\\u1BE8-\\u1BE9' +\n        '\\u1BED\\u1BEF-\\u1BF1\\u1C2C-\\u1C33\\u1C36-\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE0\\u1CE2-\\u1CE8\\u1CED\\u1CF4\\u1CF8-\\u1CF9' +\n        '\\u1DC0-\\u1DF5\\u1DFC-\\u1DFF\\u200C-\\u200D\\u20D0-\\u20DC\\u20DD-\\u20E0\\u20E1\\u20E2-\\u20E4\\u20E5-\\u20F0\\u2CEF-\\u2CF1' +\n        '\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302D\\u302E-\\u302F\\u3099-\\u309A\\uA66F\\uA670-\\uA672\\uA674-\\uA67D\\uA69E-\\uA69F\\uA6F0-\\uA6F1' +\n        '\\uA802\\uA806\\uA80B\\uA825-\\uA826\\uA8C4\\uA8E0-\\uA8F1\\uA926-\\uA92D\\uA947-\\uA951\\uA980-\\uA982\\uA9B3\\uA9B6-\\uA9B9\\uA9BC' +\n        '\\uA9E5\\uAA29-\\uAA2E\\uAA31-\\uAA32\\uAA35-\\uAA36\\uAA43\\uAA4C\\uAA7C\\uAAB0\\uAAB2-\\uAAB4\\uAAB7-\\uAAB8\\uAABE-\\uAABF\\uAAC1' +\n        '\\uAAEC-\\uAAED\\uAAF6\\uABE5\\uABE8\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F\\uFF9E-\\uFF9F]');\n    const isExtendingChar = (ch) => isString(ch) && ch.charCodeAt(0) >= 768 && extendingChars.test(ch);\n\n    const or = (...args) => {\n        return (x) => {\n            for (let i = 0; i < args.length; i++) {\n                if (args[i](x)) {\n                    return true;\n                }\n            }\n            return false;\n        };\n    };\n    const and = (...args) => {\n        return (x) => {\n            for (let i = 0; i < args.length; i++) {\n                if (!args[i](x)) {\n                    return false;\n                }\n            }\n            return true;\n        };\n    };\n\n    /**\n     * This module contains logic for handling caret candidates. A caret candidate is\n     * for example text nodes, images, input elements, cE=false elements etc.\n     *\n     * @private\n     * @class tinymce.caret.CaretCandidate\n     */\n    const isContentEditableTrue$2 = isContentEditableTrue$3;\n    const isContentEditableFalse$9 = isContentEditableFalse$a;\n    const isBr$5 = isBr$7;\n    const isText$8 = isText$b;\n    const isInvalidTextElement = matchNodeNames$1(['script', 'style', 'textarea']);\n    const isAtomicInline = matchNodeNames$1(['img', 'input', 'textarea', 'hr', 'iframe', 'video', 'audio', 'object', 'embed']);\n    const isTable = matchNodeNames$1(['table']);\n    const isCaretContainer$1 = isCaretContainer$2;\n    const isCaretCandidate$3 = (node) => {\n        if (isCaretContainer$1(node)) {\n            return false;\n        }\n        if (isText$8(node)) {\n            return !isInvalidTextElement(node.parentNode);\n        }\n        return isAtomicInline(node) || isBr$5(node) || isTable(node) || isNonUiContentEditableFalse(node);\n    };\n    // UI components on IE is marked with contenteditable=false and unselectable=true so lets not handle those as real content editables\n    const isUnselectable = (node) => isElement$7(node) && node.getAttribute('unselectable') === 'true';\n    const isNonUiContentEditableFalse = (node) => !isUnselectable(node) && isContentEditableFalse$9(node);\n    const isInEditable = (node, root) => {\n        for (let tempNode = node.parentNode; tempNode && tempNode !== root; tempNode = tempNode.parentNode) {\n            if (isNonUiContentEditableFalse(tempNode)) {\n                return false;\n            }\n            if (isContentEditableTrue$2(tempNode)) {\n                return true;\n            }\n        }\n        return true;\n    };\n    const isAtomicContentEditableFalse = (node) => {\n        if (!isNonUiContentEditableFalse(node)) {\n            return false;\n        }\n        return !foldl(from(node.getElementsByTagName('*')), (result, elm) => {\n            return result || isContentEditableTrue$2(elm);\n        }, false);\n    };\n    const isAtomic$1 = (node) => isAtomicInline(node) || isAtomicContentEditableFalse(node);\n    const isEditableCaretCandidate$1 = (node, root) => isCaretCandidate$3(node) && isInEditable(node, root);\n\n    /**\n     * This module contains logic for creating caret positions within a document a caretposition\n     * is similar to a DOMRange object but it doesn't have two endpoints and is also more lightweight\n     * since it's now updated live when the DOM changes.\n     *\n     * @private\n     * @class tinymce.caret.CaretPosition\n     * @example\n     * const caretPos1 = CaretPosition(container, offset);\n     * const caretPos2 = CaretPosition.fromRangeStart(someRange);\n     */\n    const isElement$5 = isElement$7;\n    const isCaretCandidate$2 = isCaretCandidate$3;\n    const isBlock$3 = matchStyleValues('display', 'block table');\n    const isFloated = matchStyleValues('float', 'left right');\n    const isValidElementCaretCandidate = and(isElement$5, isCaretCandidate$2, not(isFloated));\n    const isNotPre = not(matchStyleValues('white-space', 'pre pre-line pre-wrap'));\n    const isText$7 = isText$b;\n    const isBr$4 = isBr$7;\n    const nodeIndex$1 = DOMUtils.nodeIndex;\n    const resolveIndex$1 = getNodeUnsafe;\n    const createRange$1 = (doc) => doc ? doc.createRange() : DOMUtils.DOM.createRng();\n    const isWhiteSpace$1 = (chr) => isString(chr) && /[\\r\\n\\t ]/.test(chr);\n    const isRange = (rng) => !!rng.setStart && !!rng.setEnd;\n    const isHiddenWhiteSpaceRange = (range) => {\n        const container = range.startContainer;\n        const offset = range.startOffset;\n        if (isWhiteSpace$1(range.toString()) && isNotPre(container.parentNode) && isText$b(container)) {\n            const text = container.data;\n            if (isWhiteSpace$1(text[offset - 1]) || isWhiteSpace$1(text[offset + 1])) {\n                return true;\n            }\n        }\n        return false;\n    };\n    // Hack for older WebKit versions that doesn't\n    // support getBoundingClientRect on BR elements\n    const getBrClientRect = (brNode) => {\n        const doc = brNode.ownerDocument;\n        const rng = createRange$1(doc);\n        const nbsp$1 = doc.createTextNode(nbsp);\n        const parentNode = brNode.parentNode;\n        parentNode.insertBefore(nbsp$1, brNode);\n        rng.setStart(nbsp$1, 0);\n        rng.setEnd(nbsp$1, 1);\n        const clientRect = clone$1(rng.getBoundingClientRect());\n        parentNode.removeChild(nbsp$1);\n        return clientRect;\n    };\n    // Safari will not return a rect for <p>a<br>|b</p> for some odd reason\n    const getBoundingClientRectWebKitText = (rng) => {\n        const sc = rng.startContainer;\n        const ec = rng.endContainer;\n        const so = rng.startOffset;\n        const eo = rng.endOffset;\n        if (sc === ec && isText$b(ec) && so === 0 && eo === 1) {\n            const newRng = rng.cloneRange();\n            newRng.setEndAfter(ec);\n            return getBoundingClientRect$1(newRng);\n        }\n        else {\n            return null;\n        }\n    };\n    const isZeroRect = (r) => r.left === 0 && r.right === 0 && r.top === 0 && r.bottom === 0;\n    const getBoundingClientRect$1 = (item) => {\n        let clientRect;\n        const clientRects = item.getClientRects();\n        if (clientRects.length > 0) {\n            clientRect = clone$1(clientRects[0]);\n        }\n        else {\n            clientRect = clone$1(item.getBoundingClientRect());\n        }\n        if (!isRange(item) && isBr$4(item) && isZeroRect(clientRect)) {\n            return getBrClientRect(item);\n        }\n        if (isZeroRect(clientRect) && isRange(item)) {\n            return getBoundingClientRectWebKitText(item) ?? clientRect;\n        }\n        return clientRect;\n    };\n    const collapseAndInflateWidth = (clientRect, toStart) => {\n        const newClientRect = collapse(clientRect, toStart);\n        newClientRect.width = 1;\n        newClientRect.right = newClientRect.left + 1;\n        return newClientRect;\n    };\n    const getCaretPositionClientRects = (caretPosition) => {\n        const clientRects = [];\n        const addUniqueAndValidRect = (clientRect) => {\n            if (clientRect.height === 0) {\n                return;\n            }\n            if (clientRects.length > 0) {\n                if (isEqual(clientRect, clientRects[clientRects.length - 1])) {\n                    return;\n                }\n            }\n            clientRects.push(clientRect);\n        };\n        const addCharacterOffset = (container, offset) => {\n            const range = createRange$1(container.ownerDocument);\n            if (offset < container.data.length) {\n                if (isExtendingChar(container.data[offset])) {\n                    return;\n                }\n                // WebKit returns two client rects for a position after an extending\n                // character a\\uxxx|b so expand on \"b\" and collapse to start of \"b\" box\n                if (isExtendingChar(container.data[offset - 1])) {\n                    range.setStart(container, offset);\n                    range.setEnd(container, offset + 1);\n                    if (!isHiddenWhiteSpaceRange(range)) {\n                        addUniqueAndValidRect(collapseAndInflateWidth(getBoundingClientRect$1(range), false));\n                        return;\n                    }\n                }\n            }\n            if (offset > 0) {\n                range.setStart(container, offset - 1);\n                range.setEnd(container, offset);\n                if (!isHiddenWhiteSpaceRange(range)) {\n                    addUniqueAndValidRect(collapseAndInflateWidth(getBoundingClientRect$1(range), false));\n                }\n            }\n            if (offset < container.data.length) {\n                range.setStart(container, offset);\n                range.setEnd(container, offset + 1);\n                if (!isHiddenWhiteSpaceRange(range)) {\n                    addUniqueAndValidRect(collapseAndInflateWidth(getBoundingClientRect$1(range), true));\n                }\n            }\n        };\n        const container = caretPosition.container();\n        const offset = caretPosition.offset();\n        if (isText$7(container)) {\n            addCharacterOffset(container, offset);\n            return clientRects;\n        }\n        if (isElement$5(container)) {\n            if (caretPosition.isAtEnd()) {\n                const node = resolveIndex$1(container, offset);\n                if (isText$7(node)) {\n                    addCharacterOffset(node, node.data.length);\n                }\n                if (isValidElementCaretCandidate(node) && !isBr$4(node)) {\n                    addUniqueAndValidRect(collapseAndInflateWidth(getBoundingClientRect$1(node), false));\n                }\n            }\n            else {\n                const node = resolveIndex$1(container, offset);\n                if (isText$7(node)) {\n                    addCharacterOffset(node, 0);\n                }\n                if (isValidElementCaretCandidate(node) && caretPosition.isAtEnd()) {\n                    addUniqueAndValidRect(collapseAndInflateWidth(getBoundingClientRect$1(node), false));\n                    return clientRects;\n                }\n                const beforeNode = resolveIndex$1(caretPosition.container(), caretPosition.offset() - 1);\n                if (isValidElementCaretCandidate(beforeNode) && !isBr$4(beforeNode)) {\n                    if (isBlock$3(beforeNode) || isBlock$3(node) || !isValidElementCaretCandidate(node)) {\n                        addUniqueAndValidRect(collapseAndInflateWidth(getBoundingClientRect$1(beforeNode), false));\n                    }\n                }\n                if (isValidElementCaretCandidate(node)) {\n                    addUniqueAndValidRect(collapseAndInflateWidth(getBoundingClientRect$1(node), true));\n                }\n            }\n        }\n        return clientRects;\n    };\n    /**\n     * Represents a location within the document by a container and an offset.\n     *\n     * @constructor\n     * @param {Node} container Container node.\n     * @param {Number} offset Offset within that container node.\n     * @param {Array} clientRects Optional client rects array for the position.\n     */\n    const CaretPosition = (container, offset, clientRects) => {\n        const isAtStart = () => {\n            if (isText$7(container)) {\n                return offset === 0;\n            }\n            return offset === 0;\n        };\n        const isAtEnd = () => {\n            if (isText$7(container)) {\n                return offset >= container.data.length;\n            }\n            return offset >= container.childNodes.length;\n        };\n        const toRange = () => {\n            const range = createRange$1(container.ownerDocument);\n            range.setStart(container, offset);\n            range.setEnd(container, offset);\n            return range;\n        };\n        const getClientRects = () => {\n            if (!clientRects) {\n                clientRects = getCaretPositionClientRects(CaretPosition(container, offset));\n            }\n            return clientRects;\n        };\n        const isVisible = () => getClientRects().length > 0;\n        const isEqual = (caretPosition) => caretPosition && container === caretPosition.container() && offset === caretPosition.offset();\n        const getNode = (before) => resolveIndex$1(container, before ? offset - 1 : offset);\n        return {\n            /**\n             * Returns the container node.\n             *\n             * @method container\n             * @return {Node} Container node.\n             */\n            container: constant(container),\n            /**\n             * Returns the offset within the container node.\n             *\n             * @method offset\n             * @return {Number} Offset within the container node.\n             */\n            offset: constant(offset),\n            /**\n             * Returns a range out of a the caret position.\n             *\n             * @method toRange\n             * @return {DOMRange} range for the caret position.\n             */\n            toRange,\n            /**\n             * Returns the client rects for the caret position. Might be multiple rects between\n             * block elements.\n             *\n             * @method getClientRects\n             * @return {Array} Array of client rects.\n             */\n            getClientRects,\n            /**\n             * Returns true if the caret location is visible/displayed on screen.\n             *\n             * @method isVisible\n             * @return {Boolean} true/false if the position is visible or not.\n             */\n            isVisible,\n            /**\n             * Returns true if the caret location is at the beginning of text node or container.\n             *\n             * @method isVisible\n             * @return {Boolean} true/false if the position is at the beginning.\n             */\n            isAtStart,\n            /**\n             * Returns true if the caret location is at the end of text node or container.\n             *\n             * @method isVisible\n             * @return {Boolean} true/false if the position is at the end.\n             */\n            isAtEnd,\n            /**\n             * Compares the caret position to another caret position. This will only compare the\n             * container and offset not it's visual position.\n             *\n             * @method isEqual\n             * @param {tinymce.caret.CaretPosition} caretPosition Caret position to compare with.\n             * @return {Boolean} true if the caret positions are equal.\n             */\n            isEqual,\n            /**\n             * Returns the closest resolved node from a node index. That means if you have an offset after the\n             * last node in a container it will return that last node.\n             *\n             * @method getNode\n             * @return {Node} Node that is closest to the index.\n             */\n            getNode\n        };\n    };\n    /**\n     * Creates a caret position from the start of a range.\n     *\n     * @method fromRangeStart\n     * @param {DOMRange} range DOM Range to create caret position from.\n     * @return {tinymce.caret.CaretPosition} Caret position from the start of DOM range.\n     */\n    CaretPosition.fromRangeStart = (range) => CaretPosition(range.startContainer, range.startOffset);\n    /**\n     * Creates a caret position from the end of a range.\n     *\n     * @method fromRangeEnd\n     * @param {DOMRange} range DOM Range to create caret position from.\n     * @return {tinymce.caret.CaretPosition} Caret position from the end of DOM range.\n     */\n    CaretPosition.fromRangeEnd = (range) => CaretPosition(range.endContainer, range.endOffset);\n    /**\n     * Creates a caret position from a node and places the offset after it.\n     *\n     * @method after\n     * @param {Node} node Node to get caret position from.\n     * @return {tinymce.caret.CaretPosition} Caret position from the node.\n     */\n    // TODO: TINY-8865 - This may not be safe to cast as Node and alternative solutions need to be looked into\n    CaretPosition.after = (node) => CaretPosition(node.parentNode, nodeIndex$1(node) + 1);\n    /**\n     * Creates a caret position from a node and places the offset before it.\n     *\n     * @method before\n     * @param {Node} node Node to get caret position from.\n     * @return {tinymce.caret.CaretPosition} Caret position from the node.\n     */\n    // TODO: TINY-8865 - This may not be safe to cast as Node and alternative solutions need to be looked into\n    CaretPosition.before = (node) => CaretPosition(node.parentNode, nodeIndex$1(node));\n    CaretPosition.isAbove = (pos1, pos2) => lift2(head(pos2.getClientRects()), last$2(pos1.getClientRects()), isAbove$1).getOr(false);\n    CaretPosition.isBelow = (pos1, pos2) => lift2(last$2(pos2.getClientRects()), head(pos1.getClientRects()), isBelow$1).getOr(false);\n    CaretPosition.isAtStart = (pos) => pos ? pos.isAtStart() : false;\n    CaretPosition.isAtEnd = (pos) => pos ? pos.isAtEnd() : false;\n    CaretPosition.isTextPosition = (pos) => pos ? isText$b(pos.container()) : false;\n    CaretPosition.isElementPosition = (pos) => !CaretPosition.isTextPosition(pos);\n\n    const trimEmptyTextNode$1 = (dom, node) => {\n        if (isText$b(node) && node.data.length === 0) {\n            dom.remove(node);\n        }\n    };\n    const insertNode = (dom, rng, node) => {\n        rng.insertNode(node);\n        trimEmptyTextNode$1(dom, node.previousSibling);\n        trimEmptyTextNode$1(dom, node.nextSibling);\n    };\n    const insertFragment = (dom, rng, frag) => {\n        const firstChild = Optional.from(frag.firstChild);\n        const lastChild = Optional.from(frag.lastChild);\n        rng.insertNode(frag);\n        firstChild.each((child) => trimEmptyTextNode$1(dom, child.previousSibling));\n        lastChild.each((child) => trimEmptyTextNode$1(dom, child.nextSibling));\n    };\n    // Wrapper to Range.insertNode which removes any empty text nodes created in the process.\n    // Doesn't merge adjacent text nodes - this is according to the DOM spec.\n    const rangeInsertNode = (dom, rng, node) => {\n        if (isDocumentFragment(node)) {\n            insertFragment(dom, rng, node);\n        }\n        else {\n            insertNode(dom, rng, node);\n        }\n    };\n\n    /**\n     * This module creates or resolves xpath like string representation of a CaretPositions.\n     *\n     * The format is a / separated list of chunks with:\n     * <element|text()>[index|after|before]\n     *\n     * For example:\n     *  p[0]/b[0]/text()[0],1 = <p><b>a|c</b></p>\n     *  p[0]/img[0],before = <p>|<img></p>\n     *  p[0]/img[0],after = <p><img>|</p>\n     *\n     * @private\n     * @static\n     * @class tinymce.caret.CaretBookmark\n     * @example\n     * const bookmark = CaretBookmark.create(rootElm, CaretPosition.before(rootElm.firstChild));\n     * const caretPosition = CaretBookmark.resolve(bookmark);\n     */\n    const isText$6 = isText$b;\n    const isBogus = isBogus$1;\n    const nodeIndex = DOMUtils.nodeIndex;\n    const normalizedParent = (node) => {\n        const parentNode = node.parentNode;\n        if (isBogus(parentNode)) {\n            return normalizedParent(parentNode);\n        }\n        return parentNode;\n    };\n    const getChildNodes = (node) => {\n        if (!node) {\n            return [];\n        }\n        return reduce(node.childNodes, (result, node) => {\n            if (isBogus(node) && node.nodeName !== 'BR') {\n                result = result.concat(getChildNodes(node));\n            }\n            else {\n                result.push(node);\n            }\n            return result;\n        }, []);\n    };\n    const normalizedTextOffset = (node, offset) => {\n        let tempNode = node;\n        while ((tempNode = tempNode.previousSibling)) {\n            if (!isText$6(tempNode)) {\n                break;\n            }\n            offset += tempNode.data.length;\n        }\n        return offset;\n    };\n    const equal = (a) => (b) => a === b;\n    const normalizedNodeIndex = (node) => {\n        let nodes, index;\n        nodes = getChildNodes(normalizedParent(node));\n        index = findIndex$1(nodes, equal(node), node);\n        nodes = nodes.slice(0, index + 1);\n        const numTextFragments = reduce(nodes, (result, node, i) => {\n            if (isText$6(node) && isText$6(nodes[i - 1])) {\n                result++;\n            }\n            return result;\n        }, 0);\n        nodes = filter$3(nodes, matchNodeNames$1([node.nodeName]));\n        index = findIndex$1(nodes, equal(node), node);\n        return index - numTextFragments;\n    };\n    const createPathItem = (node) => {\n        const name = isText$6(node) ? 'text()' : node.nodeName.toLowerCase();\n        return name + '[' + normalizedNodeIndex(node) + ']';\n    };\n    const parentsUntil$1 = (root, node, predicate) => {\n        const parents = [];\n        for (let tempNode = node.parentNode; tempNode && tempNode !== root; tempNode = tempNode.parentNode) {\n            if (predicate && predicate(tempNode)) {\n                break;\n            }\n            parents.push(tempNode);\n        }\n        return parents;\n    };\n    const create$9 = (root, caretPosition) => {\n        let path = [];\n        let container = caretPosition.container();\n        let offset = caretPosition.offset();\n        let outputOffset;\n        if (isText$6(container)) {\n            outputOffset = normalizedTextOffset(container, offset);\n        }\n        else {\n            const childNodes = container.childNodes;\n            if (offset >= childNodes.length) {\n                outputOffset = 'after';\n                offset = childNodes.length - 1;\n            }\n            else {\n                outputOffset = 'before';\n            }\n            container = childNodes[offset];\n        }\n        path.push(createPathItem(container));\n        let parents = parentsUntil$1(root, container);\n        parents = filter$3(parents, not(isBogus$1));\n        path = path.concat(map$1(parents, (node) => {\n            return createPathItem(node);\n        }));\n        return path.reverse().join('/') + ',' + outputOffset;\n    };\n    const resolvePathItem = (node, name, index) => {\n        let nodes = getChildNodes(node);\n        nodes = filter$3(nodes, (node, index) => {\n            return !isText$6(node) || !isText$6(nodes[index - 1]);\n        });\n        nodes = filter$3(nodes, matchNodeNames$1([name]));\n        return nodes[index];\n    };\n    const findTextPosition = (container, offset) => {\n        let node = container;\n        let targetOffset = 0;\n        while (isText$6(node)) {\n            const dataLen = node.data.length;\n            if (offset >= targetOffset && offset <= targetOffset + dataLen) {\n                container = node;\n                offset = offset - targetOffset;\n                break;\n            }\n            if (!isText$6(node.nextSibling)) {\n                container = node;\n                offset = dataLen;\n                break;\n            }\n            targetOffset += dataLen;\n            node = node.nextSibling;\n        }\n        if (isText$6(container) && offset > container.data.length) {\n            offset = container.data.length;\n        }\n        return CaretPosition(container, offset);\n    };\n    const resolve$1 = (root, path) => {\n        if (!path) {\n            return null;\n        }\n        const parts = path.split(',');\n        const paths = parts[0].split('/');\n        const offset = parts.length > 1 ? parts[1] : 'before';\n        const container = reduce(paths, (result, value) => {\n            const match = /([\\w\\-\\(\\)]+)\\[([0-9]+)\\]/.exec(value);\n            if (!match) {\n                return null;\n            }\n            if (match[1] === 'text()') {\n                match[1] = '#text';\n            }\n            return resolvePathItem(result, match[1], parseInt(match[2], 10));\n        }, root);\n        if (!container) {\n            return null;\n        }\n        if (!isText$6(container) && container.parentNode) {\n            let nodeOffset;\n            if (offset === 'after') {\n                nodeOffset = nodeIndex(container) + 1;\n            }\n            else {\n                nodeOffset = nodeIndex(container);\n            }\n            return CaretPosition(container.parentNode, nodeOffset);\n        }\n        return findTextPosition(container, parseInt(offset, 10));\n    };\n\n    const isContentEditableFalse$8 = isContentEditableFalse$a;\n    const getNormalizedTextOffset$1 = (trim, container, offset) => {\n        let trimmedOffset = trim(container.data.slice(0, offset)).length;\n        for (let node = container.previousSibling; node && isText$b(node); node = node.previousSibling) {\n            trimmedOffset += trim(node.data).length;\n        }\n        return trimmedOffset;\n    };\n    const getPoint = (dom, trim, normalized, rng, start) => {\n        const container = start ? rng.startContainer : rng.endContainer;\n        let offset = start ? rng.startOffset : rng.endOffset;\n        const point = [];\n        const root = dom.getRoot();\n        if (isText$b(container)) {\n            point.push(normalized ? getNormalizedTextOffset$1(trim, container, offset) : offset);\n        }\n        else {\n            let after = 0;\n            const childNodes = container.childNodes;\n            if (offset >= childNodes.length && childNodes.length) {\n                after = 1;\n                offset = Math.max(0, childNodes.length - 1);\n            }\n            point.push(dom.nodeIndex(childNodes[offset], normalized) + after);\n        }\n        for (let node = container; node && node !== root; node = node.parentNode) {\n            point.push(dom.nodeIndex(node, normalized));\n        }\n        return point;\n    };\n    const getLocation = (trim, selection, normalized, rng) => {\n        const dom = selection.dom;\n        const start = getPoint(dom, trim, normalized, rng, true);\n        const forward = selection.isForward();\n        const fakeCaret = isRangeInCaretContainerBlock(rng) ? { isFakeCaret: true } : {};\n        if (!selection.isCollapsed()) {\n            const end = getPoint(dom, trim, normalized, rng, false);\n            return { start, end, forward, ...fakeCaret };\n        }\n        else {\n            return { start, forward, ...fakeCaret };\n        }\n    };\n    const findIndex = (dom, name, element) => {\n        let count = 0;\n        Tools.each(dom.select(name), (node) => {\n            if (node.getAttribute('data-mce-bogus') === 'all') {\n                return;\n            }\n            else if (node === element) {\n                return false;\n            }\n            else {\n                count++;\n                return;\n            }\n        });\n        return count;\n    };\n    const moveEndPoint$1 = (rng, start) => {\n        let container = start ? rng.startContainer : rng.endContainer;\n        let offset = start ? rng.startOffset : rng.endOffset;\n        // normalize Table Cell selection\n        if (isElement$7(container) && container.nodeName === 'TR') {\n            const childNodes = container.childNodes;\n            container = childNodes[Math.min(start ? offset : offset - 1, childNodes.length - 1)];\n            if (container) {\n                offset = start ? 0 : container.childNodes.length;\n                if (start) {\n                    rng.setStart(container, offset);\n                }\n                else {\n                    rng.setEnd(container, offset);\n                }\n            }\n        }\n    };\n    const normalizeTableCellSelection = (rng) => {\n        moveEndPoint$1(rng, true);\n        moveEndPoint$1(rng, false);\n        return rng;\n    };\n    const findSibling = (node, offset) => {\n        if (isElement$7(node)) {\n            node = getNode$1(node, offset);\n            if (isContentEditableFalse$8(node)) {\n                return node;\n            }\n        }\n        if (isCaretContainer$2(node)) {\n            if (isText$b(node) && isCaretContainerBlock$1(node)) {\n                node = node.parentNode;\n            }\n            let sibling = node.previousSibling;\n            if (isContentEditableFalse$8(sibling)) {\n                return sibling;\n            }\n            sibling = node.nextSibling;\n            if (isContentEditableFalse$8(sibling)) {\n                return sibling;\n            }\n        }\n        return undefined;\n    };\n    const findAdjacentContentEditableFalseElm = (rng) => {\n        return findSibling(rng.startContainer, rng.startOffset) || findSibling(rng.endContainer, rng.endOffset);\n    };\n    const getOffsetBookmark = (trim, normalized, selection) => {\n        const element = selection.getNode();\n        const rng = selection.getRng();\n        if (element.nodeName === 'IMG' || isContentEditableFalse$8(element)) {\n            const name = element.nodeName;\n            return { name, index: findIndex(selection.dom, name, element) };\n        }\n        const sibling = findAdjacentContentEditableFalseElm(rng);\n        if (sibling) {\n            const name = sibling.tagName;\n            return { name, index: findIndex(selection.dom, name, sibling) };\n        }\n        return getLocation(trim, selection, normalized, rng);\n    };\n    const getCaretBookmark = (selection) => {\n        const rng = selection.getRng();\n        return {\n            start: create$9(selection.dom.getRoot(), CaretPosition.fromRangeStart(rng)),\n            end: create$9(selection.dom.getRoot(), CaretPosition.fromRangeEnd(rng)),\n            forward: selection.isForward()\n        };\n    };\n    const getRangeBookmark = (selection) => {\n        return { rng: selection.getRng(), forward: selection.isForward() };\n    };\n    const createBookmarkSpan = (dom, id, filled) => {\n        const args = { 'data-mce-type': 'bookmark', id, 'style': 'overflow:hidden;line-height:0px' };\n        return filled ? dom.create('span', args, '&#xFEFF;') : dom.create('span', args);\n    };\n    const getPersistentBookmark = (selection, filled) => {\n        const dom = selection.dom;\n        let rng = selection.getRng();\n        const id = dom.uniqueId();\n        const collapsed = selection.isCollapsed();\n        const element = selection.getNode();\n        const name = element.nodeName;\n        const forward = selection.isForward();\n        if (name === 'IMG') {\n            return { name, index: findIndex(dom, name, element) };\n        }\n        // W3C method\n        const rng2 = normalizeTableCellSelection(rng.cloneRange());\n        // Insert end marker\n        if (!collapsed) {\n            rng2.collapse(false);\n            const endBookmarkNode = createBookmarkSpan(dom, id + '_end', filled);\n            rangeInsertNode(dom, rng2, endBookmarkNode);\n        }\n        rng = normalizeTableCellSelection(rng);\n        rng.collapse(true);\n        const startBookmarkNode = createBookmarkSpan(dom, id + '_start', filled);\n        rangeInsertNode(dom, rng, startBookmarkNode);\n        selection.moveToBookmark({ id, keep: true, forward });\n        return { id, forward };\n    };\n    const getBookmark$2 = (selection, type, normalized = false) => {\n        if (type === 2) {\n            return getOffsetBookmark(trim$2, normalized, selection);\n        }\n        else if (type === 3) {\n            return getCaretBookmark(selection);\n        }\n        else if (type) {\n            return getRangeBookmark(selection);\n        }\n        else {\n            return getPersistentBookmark(selection, false);\n        }\n    };\n    const getUndoBookmark = curry(getOffsetBookmark, identity, true);\n\n    /**\n     * Checks if the direction is forwards.\n     */\n    const isForwards = (direction) => direction === 1 /* HDirection.Forwards */;\n    /**\n     * Checks if the direction is backwards.\n     */\n    const isBackwards = (direction) => direction === -1 /* HDirection.Backwards */;\n\n    var SimpleResultType;\n    (function (SimpleResultType) {\n        SimpleResultType[SimpleResultType[\"Error\"] = 0] = \"Error\";\n        SimpleResultType[SimpleResultType[\"Value\"] = 1] = \"Value\";\n    })(SimpleResultType || (SimpleResultType = {}));\n    const fold$1 = (res, onError, onValue) => res.stype === SimpleResultType.Error ? onError(res.serror) : onValue(res.svalue);\n    const partition = (results) => {\n        const values = [];\n        const errors = [];\n        each$e(results, (obj) => {\n            fold$1(obj, (err) => errors.push(err), (val) => values.push(val));\n        });\n        return { values, errors };\n    };\n    const mapError = (res, f) => {\n        if (res.stype === SimpleResultType.Error) {\n            return { stype: SimpleResultType.Error, serror: f(res.serror) };\n        }\n        else {\n            return res;\n        }\n    };\n    const map = (res, f) => {\n        if (res.stype === SimpleResultType.Value) {\n            return { stype: SimpleResultType.Value, svalue: f(res.svalue) };\n        }\n        else {\n            return res;\n        }\n    };\n    const bind = (res, f) => {\n        if (res.stype === SimpleResultType.Value) {\n            return f(res.svalue);\n        }\n        else {\n            return res;\n        }\n    };\n    const bindError = (res, f) => {\n        if (res.stype === SimpleResultType.Error) {\n            return f(res.serror);\n        }\n        else {\n            return res;\n        }\n    };\n    const svalue = (v) => ({ stype: SimpleResultType.Value, svalue: v });\n    const serror = (e) => ({ stype: SimpleResultType.Error, serror: e });\n    const toResult = (res) => fold$1(res, Result.error, Result.value);\n    const fromResult = (res) => res.fold(serror, svalue);\n    const SimpleResult = {\n        fromResult,\n        toResult,\n        svalue,\n        partition,\n        serror,\n        bind,\n        bindError,\n        map,\n        mapError,\n        fold: fold$1\n    };\n\n    const formatObj = (input) => {\n        return isObject(input) && keys(input).length > 100 ? ' removed due to size' : JSON.stringify(input, null, 2);\n    };\n    const formatErrors = (errors) => {\n        const es = errors.length > 10 ? errors.slice(0, 10).concat([\n            {\n                path: [],\n                getErrorInfo: constant('... (only showing first ten failures)')\n            }\n        ]) : errors;\n        // TODO: Work out a better split between PrettyPrinter and SchemaError\n        return map$3(es, (e) => {\n            return 'Failed path: (' + e.path.join(' > ') + ')\\n' + e.getErrorInfo();\n        });\n    };\n\n    const nu = (path, getErrorInfo) => {\n        return SimpleResult.serror([{\n                path,\n                // This is lazy so that it isn't calculated unnecessarily\n                getErrorInfo\n            }]);\n    };\n    const missingRequired = (path, key, obj) => nu(path, () => 'Could not find valid *required* value for \"' + key + '\" in ' + formatObj(obj));\n    const custom = (path, err) => nu(path, constant(err));\n\n    const value = (validator) => {\n        const extract = (path, val) => {\n            return SimpleResult.bindError(validator(val), (err) => custom(path, err));\n        };\n        const toString = constant('val');\n        return {\n            extract,\n            toString\n        };\n    };\n    const anyValue$1 = value(SimpleResult.svalue);\n\n    const anyValue = constant(anyValue$1);\n    const typedValue = (validator, expectedType) => value((a) => {\n        const actualType = typeof a;\n        return validator(a) ? SimpleResult.svalue(a) : SimpleResult.serror(`Expected type: ${expectedType} but got: ${actualType}`);\n    });\n    const number = typedValue(isNumber, 'number');\n    const string = typedValue(isString, 'string');\n    const functionProcessor = typedValue(isFunction, 'function');\n\n    const required$1 = () => ({ tag: \"required\" /* FieldPresenceTag.Required */, process: {} });\n    const defaultedThunk = (fallbackThunk) => ({ tag: \"defaultedThunk\" /* FieldPresenceTag.DefaultedThunk */, process: fallbackThunk });\n    const defaulted$1 = (fallback) => defaultedThunk(constant(fallback));\n    const asOption = () => ({ tag: \"option\" /* FieldPresenceTag.Option */, process: {} });\n\n    const field$1 = (key, newKey, presence, prop) => ({ tag: \"field\" /* FieldTag.Field */, key, newKey, presence, prop });\n    const fold = (value, ifField, ifCustom) => {\n        switch (value.tag) {\n            case \"field\" /* FieldTag.Field */:\n                return ifField(value.key, value.newKey, value.presence, value.prop);\n            case \"custom\" /* FieldTag.CustomField */:\n                return ifCustom(value.newKey, value.instantiator);\n        }\n    };\n\n    const mergeValues = (values, base) => {\n        return SimpleResult.svalue(deepMerge(base, merge$1.apply(undefined, values)));\n    };\n    const mergeErrors = (errors) => compose(SimpleResult.serror, flatten$1)(errors);\n    const consolidateObj = (objects, base) => {\n        const partition = SimpleResult.partition(objects);\n        return partition.errors.length > 0 ? mergeErrors(partition.errors) : mergeValues(partition.values, base);\n    };\n    const consolidateArr = (objects) => {\n        const partitions = SimpleResult.partition(objects);\n        return partitions.errors.length > 0 ? mergeErrors(partitions.errors) : SimpleResult.svalue(partitions.values);\n    };\n    const ResultCombine = {\n        consolidateObj,\n        consolidateArr\n    };\n\n    const requiredAccess = (path, obj, key, bundle) => \n    // In required mode, if it is undefined, it is an error.\n    get$b(obj, key).fold(() => missingRequired(path, key, obj), bundle);\n    const fallbackAccess = (obj, key, fallback, bundle) => {\n        const v = get$b(obj, key).getOrThunk(() => fallback(obj));\n        return bundle(v);\n    };\n    const optionAccess = (obj, key, bundle) => bundle(get$b(obj, key));\n    const optionDefaultedAccess = (obj, key, fallback, bundle) => {\n        const opt = get$b(obj, key).map((val) => val === true ? fallback(obj) : val);\n        return bundle(opt);\n    };\n    const extractField = (field, path, obj, key, prop) => {\n        const bundle = (av) => prop.extract(path.concat([key]), av);\n        const bundleAsOption = (optValue) => optValue.fold(() => SimpleResult.svalue(Optional.none()), (ov) => {\n            const result = prop.extract(path.concat([key]), ov);\n            return SimpleResult.map(result, Optional.some);\n        });\n        switch (field.tag) {\n            case \"required\" /* FieldPresenceTag.Required */:\n                return requiredAccess(path, obj, key, bundle);\n            case \"defaultedThunk\" /* FieldPresenceTag.DefaultedThunk */:\n                return fallbackAccess(obj, key, field.process, bundle);\n            case \"option\" /* FieldPresenceTag.Option */:\n                return optionAccess(obj, key, bundleAsOption);\n            case \"defaultedOptionThunk\" /* FieldPresenceTag.DefaultedOptionThunk */:\n                return optionDefaultedAccess(obj, key, field.process, bundleAsOption);\n            case \"mergeWithThunk\" /* FieldPresenceTag.MergeWithThunk */: {\n                return fallbackAccess(obj, key, constant({}), (v) => {\n                    const result = deepMerge(field.process(obj), v);\n                    return bundle(result);\n                });\n            }\n        }\n    };\n    const extractFields = (path, obj, fields) => {\n        const success = {};\n        const errors = [];\n        // PERFORMANCE: We use a for loop here instead of Arr.each as this is a hot code path\n        for (const field of fields) {\n            fold(field, (key, newKey, presence, prop) => {\n                const result = extractField(presence, path, obj, key, prop);\n                SimpleResult.fold(result, (err) => {\n                    errors.push(...err);\n                }, (res) => {\n                    success[newKey] = res;\n                });\n            }, (newKey, instantiator) => {\n                success[newKey] = instantiator(obj);\n            });\n        }\n        return errors.length > 0 ? SimpleResult.serror(errors) : SimpleResult.svalue(success);\n    };\n    const objOf = (values) => {\n        const extract = (path, o) => extractFields(path, o, values);\n        const toString = () => {\n            const fieldStrings = map$3(values, (value) => fold(value, (key, _okey, _presence, prop) => key + ' -> ' + prop.toString(), (newKey, _instantiator) => 'state(' + newKey + ')'));\n            return 'obj{\\n' + fieldStrings.join('\\n') + '}';\n        };\n        return {\n            extract,\n            toString\n        };\n    };\n    const arrOf = (prop) => {\n        const extract = (path, array) => {\n            const results = map$3(array, (a, i) => prop.extract(path.concat(['[' + i + ']']), a));\n            return ResultCombine.consolidateArr(results);\n        };\n        const toString = () => 'array(' + prop.toString() + ')';\n        return {\n            extract,\n            toString\n        };\n    };\n    const arrOfObj = compose(arrOf, objOf);\n\n    const valueOf = (validator) => value((v) => validator(v).fold(SimpleResult.serror, SimpleResult.svalue));\n    const extractValue = (label, prop, obj) => {\n        const res = prop.extract([label], obj);\n        return SimpleResult.mapError(res, (errs) => ({ input: obj, errors: errs }));\n    };\n    const asRaw = (label, prop, obj) => SimpleResult.toResult(extractValue(label, prop, obj));\n    const formatError = (errInfo) => {\n        return 'Errors: \\n' + formatErrors(errInfo.errors).join('\\n') +\n            '\\n\\nInput object: ' + formatObj(errInfo.input);\n    };\n\n    const field = field$1;\n    const required = (key) => field(key, key, required$1(), anyValue());\n    const requiredOf = (key, schema) => field(key, key, required$1(), schema);\n    const requiredString = (key) => requiredOf(key, string);\n    const requiredFunction = (key) => requiredOf(key, functionProcessor);\n    const requiredArrayOf = (key, schema) => field(key, key, required$1(), arrOf(schema));\n    const option$1 = (key) => field(key, key, asOption(), anyValue());\n    const optionOf = (key, schema) => field(key, key, asOption(), schema);\n    const optionString = (key) => optionOf(key, string);\n    const optionFunction = (key) => optionOf(key, functionProcessor);\n    const defaulted = (key, fallback) => field(key, key, defaulted$1(fallback), anyValue());\n    const defaultedOf = (key, fallback, schema) => field(key, key, defaulted$1(fallback), schema);\n    const defaultedNumber = (key, fallback) => defaultedOf(key, fallback, number);\n    const defaultedArrayOf = (key, fallback, schema) => defaultedOf(key, fallback, arrOf(schema));\n\n    const isInlinePattern = (pattern) => pattern.type === 'inline-command' || pattern.type === 'inline-format';\n    const isBlockPattern = (pattern) => pattern.type === 'block-command' || pattern.type === 'block-format';\n    const hasBlockTrigger = (pattern, trigger) => (pattern.type === 'block-command' || pattern.type === 'block-format') && pattern.trigger === trigger;\n    const normalizePattern = (pattern) => {\n        const err = (message) => Result.error({ message, pattern });\n        const formatOrCmd = (name, onFormat, onCommand) => {\n            if (pattern.format !== undefined) {\n                let formats;\n                if (isArray$1(pattern.format)) {\n                    if (!forall(pattern.format, isString)) {\n                        return err(name + ' pattern has non-string items in the `format` array');\n                    }\n                    formats = pattern.format;\n                }\n                else if (isString(pattern.format)) {\n                    formats = [pattern.format];\n                }\n                else {\n                    return err(name + ' pattern has non-string `format` parameter');\n                }\n                return Result.value(onFormat(formats));\n            }\n            else if (pattern.cmd !== undefined) {\n                if (!isString(pattern.cmd)) {\n                    return err(name + ' pattern has non-string `cmd` parameter');\n                }\n                return Result.value(onCommand(pattern.cmd, pattern.value));\n            }\n            else {\n                return err(name + ' pattern is missing both `format` and `cmd` parameters');\n            }\n        };\n        if (!isObject(pattern)) {\n            return err('Raw pattern is not an object');\n        }\n        if (!isString(pattern.start)) {\n            return err('Raw pattern is missing `start` parameter');\n        }\n        if (pattern.end !== undefined) {\n            // inline pattern\n            if (!isString(pattern.end)) {\n                return err('Inline pattern has non-string `end` parameter');\n            }\n            if (pattern.start.length === 0 && pattern.end.length === 0) {\n                return err('Inline pattern has empty `start` and `end` parameters');\n            }\n            let start = pattern.start;\n            let end = pattern.end;\n            // when the end is empty swap with start as it is more efficient\n            if (end.length === 0) {\n                end = start;\n                start = '';\n            }\n            return formatOrCmd('Inline', (format) => ({ type: 'inline-format', start, end, format }), (cmd, value) => ({ type: 'inline-command', start, end, cmd, value }));\n        }\n        else if (pattern.replacement !== undefined) {\n            // replacement pattern\n            if (!isString(pattern.replacement)) {\n                return err('Replacement pattern has non-string `replacement` parameter');\n            }\n            if (pattern.start.length === 0) {\n                return err('Replacement pattern has empty `start` parameter');\n            }\n            return Result.value({\n                type: 'inline-command',\n                start: '',\n                end: pattern.start,\n                cmd: 'mceInsertContent',\n                value: pattern.replacement\n            });\n        }\n        else {\n            // block pattern\n            const trigger = pattern.trigger ?? 'space';\n            if (pattern.start.length === 0) {\n                return err('Block pattern has empty `start` parameter');\n            }\n            return formatOrCmd('Block', (formats) => ({\n                type: 'block-format',\n                start: pattern.start,\n                format: formats[0],\n                trigger\n            }), (command, commandValue) => ({\n                type: 'block-command',\n                start: pattern.start,\n                cmd: command,\n                value: commandValue,\n                trigger\n            }));\n        }\n    };\n    const getBlockPatterns = (patterns) => filter$5(patterns, isBlockPattern);\n    const getInlinePatterns = (patterns) => filter$5(patterns, isInlinePattern);\n    const createPatternSet = (patterns, dynamicPatternsLookup) => ({\n        inlinePatterns: getInlinePatterns(patterns),\n        blockPatterns: getBlockPatterns(patterns),\n        dynamicPatternsLookup\n    });\n    const filterByTrigger = (patterns, trigger) => {\n        return {\n            ...patterns,\n            blockPatterns: filter$5(patterns.blockPatterns, (pattern) => hasBlockTrigger(pattern, trigger))\n        };\n    };\n    const fromRawPatterns = (patterns) => {\n        const normalized = partition$1(map$3(patterns, normalizePattern));\n        // eslint-disable-next-line no-console\n        each$e(normalized.errors, (err) => console.error(err.message, err.pattern));\n        return normalized.values;\n    };\n    const fromRawPatternsLookup = (lookupFn) => {\n        return (ctx) => {\n            const rawPatterns = lookupFn(ctx);\n            return fromRawPatterns(rawPatterns);\n        };\n    };\n\n    const firePreProcess = (editor, args) => editor.dispatch('PreProcess', args);\n    const firePostProcess = (editor, args) => editor.dispatch('PostProcess', args);\n    const fireRemove = (editor) => {\n        editor.dispatch('remove');\n    };\n    const fireDetach = (editor) => {\n        editor.dispatch('detach');\n    };\n    const fireSwitchMode = (editor, mode) => {\n        editor.dispatch('SwitchMode', { mode });\n    };\n    const fireObjectResizeStart = (editor, target, width, height, origin) => {\n        editor.dispatch('ObjectResizeStart', { target, width, height, origin });\n    };\n    const fireObjectResized = (editor, target, width, height, origin) => {\n        editor.dispatch('ObjectResized', { target, width, height, origin });\n    };\n    const firePreInit = (editor) => {\n        editor.dispatch('PreInit');\n    };\n    const firePostRender = (editor) => {\n        editor.dispatch('PostRender');\n    };\n    const fireInit = (editor) => {\n        editor.dispatch('Init');\n    };\n    const firePlaceholderToggle = (editor, state) => {\n        editor.dispatch('PlaceholderToggle', { state });\n    };\n    const fireError = (editor, errorType, error) => {\n        editor.dispatch(errorType, error);\n    };\n    const fireFormatApply = (editor, format, node, vars) => {\n        editor.dispatch('FormatApply', { format, node, vars });\n    };\n    const fireFormatRemove = (editor, format, node, vars) => {\n        editor.dispatch('FormatRemove', { format, node, vars });\n    };\n    const fireBeforeSetContent = (editor, args) => editor.dispatch('BeforeSetContent', args);\n    const fireSetContent = (editor, args) => editor.dispatch('SetContent', args);\n    const fireBeforeGetContent = (editor, args) => editor.dispatch('BeforeGetContent', args);\n    const fireGetContent = (editor, args) => editor.dispatch('GetContent', args);\n    const fireAutocompleterStart = (editor, args) => {\n        editor.dispatch('AutocompleterStart', args);\n    };\n    const fireAutocompleterUpdate = (editor, args) => {\n        editor.dispatch('AutocompleterUpdate', args);\n    };\n    const fireAutocompleterUpdateActiveRange = (editor, args) => {\n        editor.dispatch('AutocompleterUpdateActiveRange', args);\n    };\n    const fireAutocompleterEnd = (editor) => {\n        editor.dispatch('AutocompleterEnd');\n    };\n    const firePastePreProcess = (editor, html, internal) => editor.dispatch('PastePreProcess', { content: html, internal });\n    const firePastePostProcess = (editor, node, internal) => editor.dispatch('PastePostProcess', { node, internal });\n    const firePastePlainTextToggle = (editor, state) => editor.dispatch('PastePlainTextToggle', { state });\n    const fireEditableRootStateChange = (editor, state) => editor.dispatch('EditableRootStateChange', { state });\n    const fireDisabledStateChange = (editor, state) => editor.dispatch('DisabledStateChange', { state });\n    const fireCloseTooltips = (editor) => editor.dispatch('CloseActiveTooltips');\n\n    const deviceDetection$1 = detect$1().deviceType;\n    const isTouch = deviceDetection$1.isTouch();\n    const DOM$d = DOMUtils.DOM;\n    const getHash = (value) => {\n        const items = value.indexOf('=') > 0 ? value.split(/[;,](?![^=;,]*(?:[;,]|$))/) : value.split(',');\n        return foldl(items, (output, item) => {\n            const arr = item.split('=');\n            const key = arr[0];\n            const val = arr.length > 1 ? arr[1] : key;\n            output[trim$4(key)] = trim$4(val);\n            return output;\n        }, {});\n    };\n    const isRegExp = (x) => is$5(x, RegExp);\n    const option = (name) => (editor) => editor.options.get(name);\n    const stringOrObjectProcessor = (value) => isString(value) || isObject(value);\n    const bodyOptionProcessor = (editor, defaultValue = '') => (value) => {\n        const valid = isString(value);\n        if (valid) {\n            if (value.indexOf('=') !== -1) {\n                const bodyObj = getHash(value);\n                return { value: get$b(bodyObj, editor.id).getOr(defaultValue), valid };\n            }\n            else {\n                return { value, valid };\n            }\n        }\n        else {\n            return { valid: false, message: 'Must be a string.' };\n        }\n    };\n    const register$7 = (editor) => {\n        const registerOption = editor.options.register;\n        registerOption('id', {\n            processor: 'string',\n            default: editor.id\n        });\n        registerOption('selector', {\n            processor: 'string'\n        });\n        registerOption('target', {\n            processor: 'object'\n        });\n        registerOption('suffix', {\n            processor: 'string'\n        });\n        registerOption('cache_suffix', {\n            processor: 'string'\n        });\n        registerOption('base_url', {\n            processor: 'string'\n        });\n        registerOption('referrer_policy', {\n            processor: 'string',\n            default: ''\n        });\n        registerOption('crossorigin', {\n            processor: 'function',\n            default: constant(undefined)\n        });\n        registerOption('language_load', {\n            processor: 'boolean',\n            default: true\n        });\n        registerOption('inline', {\n            processor: 'boolean',\n            default: false\n        });\n        registerOption('iframe_attrs', {\n            processor: 'object',\n            default: {}\n        });\n        registerOption('doctype', {\n            processor: 'string',\n            default: '<!DOCTYPE html>'\n        });\n        registerOption('document_base_url', {\n            processor: 'string',\n            default: editor.editorManager.documentBaseURL\n        });\n        registerOption('body_id', {\n            processor: bodyOptionProcessor(editor, 'tinymce'),\n            default: 'tinymce'\n        });\n        registerOption('body_class', {\n            processor: bodyOptionProcessor(editor),\n            default: ''\n        });\n        registerOption('content_security_policy', {\n            processor: 'string',\n            default: ''\n        });\n        registerOption('br_in_pre', {\n            processor: 'boolean',\n            default: true\n        });\n        registerOption('forced_root_block', {\n            processor: (value) => {\n                const valid = isString(value) && isNotEmpty(value);\n                if (valid) {\n                    return { value, valid };\n                }\n                else {\n                    return { valid: false, message: 'Must be a non-empty string.' };\n                }\n            },\n            default: 'p'\n        });\n        registerOption('forced_root_block_attrs', {\n            processor: 'object',\n            default: {}\n        });\n        registerOption('newline_behavior', {\n            processor: (value) => {\n                const valid = contains$2(['block', 'linebreak', 'invert', 'default'], value);\n                return valid ? { value, valid } : { valid: false, message: 'Must be one of: block, linebreak, invert or default.' };\n            },\n            default: 'default'\n        });\n        registerOption('br_newline_selector', {\n            processor: 'string',\n            default: '.mce-toc h2,figcaption,caption'\n        });\n        registerOption('no_newline_selector', {\n            processor: 'string',\n            default: ''\n        });\n        registerOption('keep_styles', {\n            processor: 'boolean',\n            default: true\n        });\n        registerOption('end_container_on_empty_block', {\n            processor: (value) => {\n                if (isBoolean(value)) {\n                    return { valid: true, value };\n                }\n                else if (isString(value)) {\n                    return { valid: true, value };\n                }\n                else {\n                    return { valid: false, message: 'Must be boolean or a string' };\n                }\n            },\n            default: 'blockquote'\n        });\n        registerOption('font_size_style_values', {\n            processor: 'string',\n            default: 'xx-small,x-small,small,medium,large,x-large,xx-large'\n        });\n        registerOption('font_size_legacy_values', {\n            processor: 'string',\n            // See: http://www.w3.org/TR/CSS2/fonts.html#propdef-font-size\n            default: 'xx-small,small,medium,large,x-large,xx-large,300%'\n        });\n        registerOption('font_size_classes', {\n            processor: 'string',\n            default: ''\n        });\n        registerOption('automatic_uploads', {\n            processor: 'boolean',\n            default: true\n        });\n        registerOption('images_reuse_filename', {\n            processor: 'boolean',\n            default: false\n        });\n        registerOption('images_replace_blob_uris', {\n            processor: 'boolean',\n            default: true\n        });\n        registerOption('icons', {\n            processor: 'string',\n            default: ''\n        });\n        registerOption('icons_url', {\n            processor: 'string',\n            default: ''\n        });\n        registerOption('images_upload_url', {\n            processor: 'string',\n            default: ''\n        });\n        registerOption('images_upload_base_path', {\n            processor: 'string',\n            default: ''\n        });\n        registerOption('images_upload_credentials', {\n            processor: 'boolean',\n            default: false\n        });\n        registerOption('images_upload_handler', {\n            processor: 'function'\n        });\n        registerOption('language', {\n            processor: 'string',\n            default: 'en'\n        });\n        registerOption('language_url', {\n            processor: 'string',\n            default: ''\n        });\n        registerOption('entity_encoding', {\n            processor: 'string',\n            default: 'named'\n        });\n        registerOption('indent', {\n            processor: 'boolean',\n            default: true\n        });\n        registerOption('indent_before', {\n            processor: 'string',\n            default: 'p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,' +\n                'tfoot,tbody,tr,section,details,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist'\n        });\n        registerOption('indent_after', {\n            processor: 'string',\n            default: 'p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,' +\n                'tfoot,tbody,tr,section,details,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist'\n        });\n        registerOption('indent_use_margin', {\n            processor: 'boolean',\n            default: false\n        });\n        registerOption('indentation', {\n            processor: 'string',\n            default: '40px'\n        });\n        registerOption('content_css', {\n            processor: (value) => {\n                const valid = value === false || isString(value) || isArrayOf(value, isString);\n                if (valid) {\n                    if (isString(value)) {\n                        return { value: map$3(value.split(','), trim$4), valid };\n                    }\n                    else if (isArray$1(value)) {\n                        return { value, valid };\n                    }\n                    else if (value === false) {\n                        return { value: [], valid };\n                    }\n                    else {\n                        return { value, valid };\n                    }\n                }\n                else {\n                    return { valid: false, message: 'Must be false, a string or an array of strings.' };\n                }\n            },\n            default: isInline$2(editor) ? [] : ['default']\n        });\n        registerOption('content_style', {\n            processor: 'string'\n        });\n        registerOption('content_language', {\n            processor: 'string'\n        });\n        registerOption('content_css_cors', {\n            processor: 'boolean',\n            default: false\n        });\n        registerOption('font_css', {\n            processor: (value) => {\n                const valid = isString(value) || isArrayOf(value, isString);\n                if (valid) {\n                    const newValue = isArray$1(value) ? value : map$3(value.split(','), trim$4);\n                    return { value: newValue, valid };\n                }\n                else {\n                    return { valid: false, message: 'Must be a string or an array of strings.' };\n                }\n            },\n            default: []\n        });\n        registerOption('extended_mathml_attributes', {\n            processor: 'string[]'\n        });\n        registerOption('extended_mathml_elements', {\n            processor: 'string[]'\n        });\n        registerOption('inline_boundaries', {\n            processor: 'boolean',\n            default: true\n        });\n        registerOption('inline_boundaries_selector', {\n            processor: 'string',\n            default: 'a[href],code,span.mce-annotation'\n        });\n        registerOption('object_resizing', {\n            processor: (value) => {\n                const valid = isBoolean(value) || isString(value);\n                if (valid) {\n                    if (value === false || deviceDetection$1.isiPhone() || deviceDetection$1.isiPad()) {\n                        return { value: '', valid };\n                    }\n                    else {\n                        return { value: value === true ? 'table,img,figure.image,div,video,iframe' : value, valid };\n                    }\n                }\n                else {\n                    return { valid: false, message: 'Must be boolean or a string' };\n                }\n            },\n            // No nice way to do object resizing on touch devices at this stage\n            default: !isTouch\n        });\n        registerOption('resize_img_proportional', {\n            processor: 'boolean',\n            default: true\n        });\n        registerOption('event_root', {\n            processor: 'string'\n        });\n        registerOption('service_message', {\n            processor: 'string'\n        });\n        registerOption('onboarding', {\n            processor: 'boolean',\n            default: true\n        });\n        registerOption('tiny_cloud_entry_url', {\n            processor: 'string'\n        });\n        registerOption('theme', {\n            processor: (value) => value === false || isString(value) || isFunction(value),\n            default: 'silver'\n        });\n        registerOption('theme_url', {\n            processor: 'string'\n        });\n        registerOption('formats', {\n            processor: 'object'\n        });\n        registerOption('format_empty_lines', {\n            processor: 'boolean',\n            default: false\n        });\n        registerOption('format_noneditable_selector', {\n            processor: 'string',\n            default: ''\n        });\n        registerOption('preview_styles', {\n            processor: (value) => {\n                const valid = value === false || isString(value);\n                if (valid) {\n                    return { value: value === false ? '' : value, valid };\n                }\n                else {\n                    return { valid: false, message: 'Must be false or a string' };\n                }\n            },\n            default: 'font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow'\n        });\n        registerOption('custom_ui_selector', {\n            processor: 'string',\n            default: ''\n        });\n        registerOption('hidden_input', {\n            processor: 'boolean',\n            default: true\n        });\n        registerOption('submit_patch', {\n            processor: 'boolean',\n            default: true\n        });\n        registerOption('encoding', {\n            processor: 'string'\n        });\n        registerOption('add_form_submit_trigger', {\n            processor: 'boolean',\n            default: true\n        });\n        registerOption('add_unload_trigger', {\n            processor: 'boolean',\n            default: true\n        });\n        registerOption('custom_undo_redo_levels', {\n            processor: 'number',\n            default: 0\n        });\n        registerOption('disable_nodechange', {\n            processor: 'boolean',\n            default: false\n        });\n        registerOption('disabled', {\n            processor: (value) => {\n                if (isBoolean(value)) {\n                    if (editor.initialized && isDisabled$1(editor) !== value) {\n                        // Schedules the callback to run in the next microtask queue once the option is updated\n                        // TODO: TINY-11586 - Implement `onChange` callback when the value of an option changes\n                        // eslint-disable-next-line @typescript-eslint/no-floating-promises\n                        Promise.resolve().then(() => {\n                            fireDisabledStateChange(editor, value);\n                        });\n                    }\n                    return { valid: true, value };\n                }\n                return { valid: false, message: 'The value must be a boolean.' };\n            },\n            default: false\n        });\n        registerOption('readonly', {\n            processor: 'boolean',\n            default: false\n        });\n        registerOption('editable_root', {\n            processor: 'boolean',\n            default: true\n        });\n        registerOption('plugins', {\n            processor: 'string[]',\n            default: []\n        });\n        registerOption('external_plugins', {\n            processor: 'object'\n        });\n        registerOption('forced_plugins', {\n            processor: 'string[]'\n        });\n        registerOption('model', {\n            processor: 'string',\n            default: editor.hasPlugin('rtc') ? 'plugin' : 'dom'\n        });\n        registerOption('model_url', {\n            processor: 'string'\n        });\n        registerOption('block_unsupported_drop', {\n            processor: 'boolean',\n            default: true\n        });\n        registerOption('visual', {\n            processor: 'boolean',\n            default: true\n        });\n        registerOption('visual_table_class', {\n            processor: 'string',\n            default: 'mce-item-table'\n        });\n        registerOption('visual_anchor_class', {\n            processor: 'string',\n            default: 'mce-item-anchor'\n        });\n        registerOption('iframe_aria_text', {\n            processor: 'string',\n            default: 'Rich Text Area'.concat(editor.hasPlugin('help') ? '. Press ALT-0 for help.' : '')\n        });\n        registerOption('setup', {\n            processor: 'function'\n        });\n        registerOption('init_instance_callback', {\n            processor: 'function'\n        });\n        registerOption('url_converter', {\n            processor: 'function',\n            // Note: Don't bind here, as the binding is handled via the `url_converter_scope`\n            // eslint-disable-next-line @typescript-eslint/unbound-method\n            default: editor.convertURL\n        });\n        registerOption('url_converter_scope', {\n            processor: 'object',\n            default: editor\n        });\n        registerOption('urlconverter_callback', {\n            processor: 'function'\n        });\n        registerOption('allow_conditional_comments', {\n            processor: 'boolean',\n            default: false\n        });\n        registerOption('allow_html_data_urls', {\n            processor: 'boolean',\n            default: false\n        });\n        registerOption('allow_svg_data_urls', {\n            processor: 'boolean'\n        });\n        registerOption('allow_html_in_named_anchor', {\n            processor: 'boolean',\n            default: false\n        });\n        registerOption('allow_html_in_comments', {\n            processor: 'boolean',\n            default: false\n        });\n        registerOption('allow_script_urls', {\n            processor: 'boolean',\n            default: false\n        });\n        registerOption('allow_unsafe_link_target', {\n            processor: 'boolean',\n            default: false\n        });\n        registerOption('allow_mathml_annotation_encodings', {\n            processor: (value) => {\n                const valid = isArrayOf(value, isString);\n                return valid ? { value, valid } : { valid: false, message: 'Must be an array of strings.' };\n            },\n            default: []\n        });\n        registerOption('convert_fonts_to_spans', {\n            processor: 'boolean',\n            default: true,\n            deprecated: true\n        });\n        registerOption('fix_list_elements', {\n            processor: 'boolean',\n            default: false\n        });\n        registerOption('preserve_cdata', {\n            processor: 'boolean',\n            default: false\n        });\n        registerOption('remove_trailing_brs', {\n            processor: 'boolean',\n            default: true\n        });\n        registerOption('pad_empty_with_br', {\n            processor: 'boolean',\n            default: false,\n        });\n        registerOption('inline_styles', {\n            processor: 'boolean',\n            default: true,\n            deprecated: true\n        });\n        registerOption('element_format', {\n            processor: 'string',\n            default: 'html'\n        });\n        registerOption('entities', {\n            processor: 'string'\n        });\n        registerOption('schema', {\n            processor: 'string',\n            default: 'html5'\n        });\n        registerOption('convert_urls', {\n            processor: 'boolean',\n            default: true\n        });\n        registerOption('relative_urls', {\n            processor: 'boolean',\n            default: true\n        });\n        registerOption('remove_script_host', {\n            processor: 'boolean',\n            default: true\n        });\n        registerOption('custom_elements', {\n            processor: stringOrObjectProcessor\n        });\n        registerOption('extended_valid_elements', {\n            processor: 'string'\n        });\n        registerOption('invalid_elements', {\n            processor: 'string'\n        });\n        registerOption('invalid_styles', {\n            processor: stringOrObjectProcessor\n        });\n        registerOption('valid_children', {\n            processor: 'string'\n        });\n        registerOption('valid_classes', {\n            processor: stringOrObjectProcessor\n        });\n        registerOption('valid_elements', {\n            processor: 'string'\n        });\n        registerOption('valid_styles', {\n            processor: stringOrObjectProcessor\n        });\n        registerOption('verify_html', {\n            processor: 'boolean',\n            default: true\n        });\n        registerOption('auto_focus', {\n            processor: (value) => isString(value) || value === true\n        });\n        registerOption('browser_spellcheck', {\n            processor: 'boolean',\n            default: false\n        });\n        registerOption('protect', {\n            processor: 'array'\n        });\n        registerOption('images_file_types', {\n            processor: 'string',\n            default: 'jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp'\n        });\n        registerOption('deprecation_warnings', {\n            processor: 'boolean',\n            default: true\n        });\n        registerOption('a11y_advanced_options', {\n            processor: 'boolean',\n            default: false\n        });\n        registerOption('api_key', {\n            processor: 'string'\n        });\n        registerOption('license_key', {\n            processor: 'string'\n        });\n        registerOption('paste_block_drop', {\n            processor: 'boolean',\n            default: false\n        });\n        registerOption('paste_data_images', {\n            processor: 'boolean',\n            default: true\n        });\n        registerOption('paste_preprocess', {\n            processor: 'function'\n        });\n        registerOption('paste_postprocess', {\n            processor: 'function'\n        });\n        registerOption('paste_webkit_styles', {\n            processor: 'string',\n            default: 'none'\n        });\n        registerOption('paste_remove_styles_if_webkit', {\n            processor: 'boolean',\n            default: true\n        });\n        registerOption('paste_merge_formats', {\n            processor: 'boolean',\n            default: true\n        });\n        registerOption('smart_paste', {\n            processor: 'boolean',\n            default: true\n        });\n        registerOption('paste_as_text', {\n            processor: 'boolean',\n            default: false\n        });\n        registerOption('paste_tab_spaces', {\n            processor: 'number',\n            default: 4\n        });\n        registerOption('text_patterns', {\n            processor: (value) => {\n                if (isArrayOf(value, isObject) || value === false) {\n                    const patterns = value === false ? [] : value;\n                    return { value: fromRawPatterns(patterns), valid: true };\n                }\n                else {\n                    return { valid: false, message: 'Must be an array of objects or false.' };\n                }\n            },\n            default: [\n                { start: '*', end: '*', format: 'italic' },\n                { start: '**', end: '**', format: 'bold' },\n                { start: '#', format: 'h1', trigger: 'space' },\n                { start: '##', format: 'h2', trigger: 'space' },\n                { start: '###', format: 'h3', trigger: 'space' },\n                { start: '####', format: 'h4', trigger: 'space' },\n                { start: '#####', format: 'h5', trigger: 'space' },\n                { start: '######', format: 'h6', trigger: 'space' },\n                { start: '1.', cmd: 'InsertOrderedList', trigger: 'space' },\n                { start: '*', cmd: 'InsertUnorderedList', trigger: 'space' },\n                { start: '-', cmd: 'InsertUnorderedList', trigger: 'space' },\n                { start: '>', cmd: 'mceBlockQuote', trigger: 'space' },\n                { start: '---', cmd: 'InsertHorizontalRule', trigger: 'space' },\n            ]\n        });\n        registerOption('text_patterns_lookup', {\n            processor: (value) => {\n                if (isFunction(value)) {\n                    return {\n                        value: fromRawPatternsLookup(value),\n                        valid: true,\n                    };\n                }\n                else {\n                    return { valid: false, message: 'Must be a single function' };\n                }\n            },\n            default: (_ctx) => []\n        });\n        registerOption('allow_noneditable', {\n            processor: 'boolean',\n            default: true\n        });\n        registerOption('noneditable_class', {\n            processor: 'string',\n            default: 'mceNonEditable'\n        });\n        registerOption('editable_class', {\n            processor: 'string',\n            default: 'mceEditable'\n        });\n        registerOption('noneditable_regexp', {\n            processor: (value) => {\n                if (isArrayOf(value, isRegExp)) {\n                    return { value, valid: true };\n                }\n                else if (isRegExp(value)) {\n                    return { value: [value], valid: true };\n                }\n                else {\n                    return { valid: false, message: 'Must be a RegExp or an array of RegExp.' };\n                }\n            },\n            default: []\n        });\n        registerOption('table_tab_navigation', {\n            processor: 'boolean',\n            default: true\n        });\n        registerOption('highlight_on_focus', {\n            processor: 'boolean',\n            default: true\n        });\n        registerOption('xss_sanitization', {\n            processor: 'boolean',\n            default: true\n        });\n        registerOption('details_initial_state', {\n            processor: (value) => {\n                const valid = contains$2(['inherited', 'collapsed', 'expanded'], value);\n                return valid ? { value, valid } : { valid: false, message: 'Must be one of: inherited, collapsed, or expanded.' };\n            },\n            default: 'inherited'\n        });\n        registerOption('details_serialized_state', {\n            processor: (value) => {\n                const valid = contains$2(['inherited', 'collapsed', 'expanded'], value);\n                return valid ? { value, valid } : { valid: false, message: 'Must be one of: inherited, collapsed, or expanded.' };\n            },\n            default: 'inherited'\n        });\n        registerOption('init_content_sync', {\n            processor: 'boolean',\n            default: false\n        });\n        registerOption('newdocument_content', {\n            processor: 'string',\n            default: ''\n        });\n        registerOption('sandbox_iframes', {\n            processor: 'boolean',\n            default: true\n        });\n        registerOption('sandbox_iframes_exclusions', {\n            processor: 'string[]',\n            default: [\n                'youtube.com',\n                'youtu.be',\n                'vimeo.com',\n                'player.vimeo.com',\n                'dailymotion.com',\n                'embed.music.apple.com',\n                'open.spotify.com',\n                'giphy.com',\n                'dai.ly',\n                'codepen.io',\n            ]\n        });\n        registerOption('convert_unsafe_embeds', {\n            processor: 'boolean',\n            default: true\n        });\n        registerOption('user_id', {\n            processor: 'string',\n            default: 'Anonymous'\n        });\n        registerOption('content_id', {\n            processor: 'string',\n        });\n        registerOption('fetch_users', {\n            processor: (value) => {\n                if (value === undefined) {\n                    return { valid: true, value: undefined };\n                }\n                if (isFunction(value)) {\n                    return { valid: true, value };\n                }\n                return {\n                    valid: false,\n                    message: 'fetch_users must be a function that returns a Promise<ExpectedUser[]>'\n                };\n            }\n        });\n        const documentsFileTypesOptionsSchema = arrOfObj([\n            requiredString('mimeType'),\n            requiredArrayOf('extensions', valueOf((ext) => {\n                if (isString(ext)) {\n                    return Result.value(ext);\n                }\n                else {\n                    return Result.error('Extensions must be an array of strings');\n                }\n            })),\n        ]);\n        registerOption('documents_file_types', {\n            processor: (value) => asRaw('documents_file_types', documentsFileTypesOptionsSchema, value).fold((_err) => ({\n                valid: false,\n                message: 'Must be a non-empty array of objects matching the configuration schema: https://www.tiny.cloud/docs/tinymce/latest/uploadcare-documents/#documents-file-types'\n            }), (val) => ({ valid: true, value: val }))\n        });\n        // These options must be registered later in the init sequence due to their default values\n        editor.on('ScriptsLoaded', () => {\n            registerOption('directionality', {\n                processor: 'string',\n                default: I18n.isRtl() ? 'rtl' : undefined\n            });\n            registerOption('placeholder', {\n                processor: 'string',\n                // Fallback to the original elements placeholder if not set in the settings\n                default: DOM$d.getAttrib(editor.getElement(), 'placeholder')\n            });\n        });\n        registerOption('lists_indent_on_tab', {\n            processor: 'boolean',\n            default: true\n        });\n        registerOption('list_max_depth', {\n            processor: (value) => {\n                const valid = isNumber(value);\n                if (valid) {\n                    if (value < 0) {\n                        throw new Error('list_max_depth cannot be set to lower than 0');\n                    }\n                    return { value, valid };\n                }\n                else {\n                    return { valid: false, message: 'Must be a number' };\n                }\n            },\n        });\n    };\n    const getIframeAttrs = option('iframe_attrs');\n    const getDocType = option('doctype');\n    const getDocumentBaseUrl = option('document_base_url');\n    const getBodyId = option('body_id');\n    const getBodyClass = option('body_class');\n    const getContentSecurityPolicy = option('content_security_policy');\n    const shouldPutBrInPre$1 = option('br_in_pre');\n    const getForcedRootBlock = option('forced_root_block');\n    const getForcedRootBlockAttrs = option('forced_root_block_attrs');\n    const getNewlineBehavior = option('newline_behavior');\n    const getBrNewLineSelector = option('br_newline_selector');\n    const getNoNewLineSelector = option('no_newline_selector');\n    const shouldKeepStyles = option('keep_styles');\n    const shouldEndContainerOnEmptyBlock = option('end_container_on_empty_block');\n    const isAutomaticUploadsEnabled = option('automatic_uploads');\n    const shouldReuseFileName = option('images_reuse_filename');\n    const shouldReplaceBlobUris = option('images_replace_blob_uris');\n    const getIconPackName = option('icons');\n    const getIconsUrl = option('icons_url');\n    const getImageUploadUrl = option('images_upload_url');\n    const getImageUploadBasePath = option('images_upload_base_path');\n    const getImagesUploadCredentials = option('images_upload_credentials');\n    const getImagesUploadHandler = option('images_upload_handler');\n    const shouldUseContentCssCors = option('content_css_cors');\n    const getReferrerPolicy = option('referrer_policy');\n    const getCrossOrigin = option('crossorigin');\n    const getLanguageCode = option('language');\n    const getLanguageUrl = option('language_url');\n    const shouldIndentUseMargin = option('indent_use_margin');\n    const getIndentation = option('indentation');\n    const getContentCss = option('content_css');\n    const getContentStyle = option('content_style');\n    const getContentLanguage = option('content_language');\n    const getFontCss = option('font_css');\n    const getDirectionality = option('directionality');\n    const getInlineBoundarySelector = option('inline_boundaries_selector');\n    const getObjectResizing = option('object_resizing');\n    const getResizeImgProportional = option('resize_img_proportional');\n    const getPlaceholder = option('placeholder');\n    const getEventRoot = option('event_root');\n    const getServiceMessage = option('service_message');\n    const getTheme = option('theme');\n    const getThemeUrl = option('theme_url');\n    const getModel = option('model');\n    const getModelUrl = option('model_url');\n    const isInlineBoundariesEnabled = option('inline_boundaries');\n    const getFormats = option('formats');\n    const getPreviewStyles = option('preview_styles');\n    const canFormatEmptyLines = option('format_empty_lines');\n    const getFormatNoneditableSelector = option('format_noneditable_selector');\n    const getCustomUiSelector = option('custom_ui_selector');\n    const isInline$2 = option('inline');\n    const hasHiddenInput = option('hidden_input');\n    const shouldPatchSubmit = option('submit_patch');\n    const shouldAddFormSubmitTrigger = option('add_form_submit_trigger');\n    const shouldAddUnloadTrigger = option('add_unload_trigger');\n    const getCustomUndoRedoLevels = option('custom_undo_redo_levels');\n    const shouldDisableNodeChange = option('disable_nodechange');\n    const isReadOnly$1 = option('readonly');\n    const hasEditableRoot$1 = option('editable_root');\n    const hasContentCssCors = option('content_css_cors');\n    const getPlugins = option('plugins');\n    const getExternalPlugins$1 = option('external_plugins');\n    const shouldBlockUnsupportedDrop = option('block_unsupported_drop');\n    const isVisualAidsEnabled = option('visual');\n    const getVisualAidsTableClass = option('visual_table_class');\n    const getVisualAidsAnchorClass = option('visual_anchor_class');\n    const getIframeAriaText = option('iframe_aria_text');\n    const getSetupCallback = option('setup');\n    const getInitInstanceCallback = option('init_instance_callback');\n    const getUrlConverterCallback = option('urlconverter_callback');\n    const getAutoFocus = option('auto_focus');\n    const shouldBrowserSpellcheck = option('browser_spellcheck');\n    const getProtect = option('protect');\n    const shouldPasteBlockDrop = option('paste_block_drop');\n    const shouldPasteDataImages = option('paste_data_images');\n    const getPastePreProcess = option('paste_preprocess');\n    const getPastePostProcess = option('paste_postprocess');\n    const getNewDocumentContent = option('newdocument_content');\n    const getPasteWebkitStyles = option('paste_webkit_styles');\n    const shouldPasteRemoveWebKitStyles = option('paste_remove_styles_if_webkit');\n    const shouldPasteMergeFormats = option('paste_merge_formats');\n    const isSmartPasteEnabled = option('smart_paste');\n    const isPasteAsTextEnabled = option('paste_as_text');\n    const getPasteTabSpaces = option('paste_tab_spaces');\n    const shouldAllowHtmlDataUrls = option('allow_html_data_urls');\n    const getTextPatterns = option('text_patterns');\n    const getTextPatternsLookup = option('text_patterns_lookup');\n    const shouldAllowNonEditable = option('allow_noneditable');\n    const getNonEditableClass = option('noneditable_class');\n    const getEditableClass = option('editable_class');\n    const getNonEditableRegExps = option('noneditable_regexp');\n    const shouldPreserveCData = option('preserve_cdata');\n    const shouldHighlightOnFocus = option('highlight_on_focus');\n    const shouldSanitizeXss = option('xss_sanitization');\n    const shouldUseDocumentWrite = option('init_content_sync');\n    const hasTextPatternsLookup = (editor) => editor.options.isSet('text_patterns_lookup');\n    const getFontStyleValues = (editor) => Tools.explode(editor.options.get('font_size_style_values'));\n    const getFontSizeClasses = (editor) => Tools.explode(editor.options.get('font_size_classes'));\n    const isEncodingXml = (editor) => editor.options.get('encoding') === 'xml';\n    const getAllowedImageFileTypes = (editor) => Tools.explode(editor.options.get('images_file_types'));\n    const hasTableTabNavigation = option('table_tab_navigation');\n    const getDetailsInitialState = option('details_initial_state');\n    const getDetailsSerializedState = option('details_serialized_state');\n    const shouldSandboxIframes = option('sandbox_iframes');\n    const getSandboxIframesExclusions = (editor) => editor.options.get('sandbox_iframes_exclusions');\n    const shouldConvertUnsafeEmbeds = option('convert_unsafe_embeds');\n    const getLicenseKey = option('license_key');\n    const getApiKey = option('api_key');\n    const isDisabled$1 = option('disabled');\n    const getUserId = option('user_id');\n    const getFetchUsers = option('fetch_users');\n    const shouldIndentOnTab = option('lists_indent_on_tab');\n    const getListMaxDepth = (editor) => Optional.from(editor.options.get('list_max_depth'));\n\n    const isElement$4 = isElement$7;\n    const isText$5 = isText$b;\n    const removeNode$1 = (node) => {\n        const parentNode = node.parentNode;\n        if (parentNode) {\n            parentNode.removeChild(node);\n        }\n    };\n    const trimCount = (text) => {\n        const trimmedText = trim$2(text);\n        return {\n            count: text.length - trimmedText.length,\n            text: trimmedText\n        };\n    };\n    const deleteZwspChars = (caretContainer) => {\n        // We use the Text.deleteData API here so as to preserve selection offsets\n        let idx;\n        while ((idx = caretContainer.data.lastIndexOf(ZWSP$1)) !== -1) {\n            caretContainer.deleteData(idx, 1);\n        }\n    };\n    const removeUnchanged = (caretContainer, pos) => {\n        remove$2(caretContainer);\n        return pos;\n    };\n    const removeTextAndReposition = (caretContainer, pos) => {\n        const before = trimCount(caretContainer.data.substr(0, pos.offset()));\n        const after = trimCount(caretContainer.data.substr(pos.offset()));\n        const text = before.text + after.text;\n        if (text.length > 0) {\n            deleteZwspChars(caretContainer);\n            return CaretPosition(caretContainer, pos.offset() - before.count);\n        }\n        else {\n            return pos;\n        }\n    };\n    const removeElementAndReposition = (caretContainer, pos) => {\n        const parentNode = pos.container();\n        const newPosition = indexOf$1(from(parentNode.childNodes), caretContainer).map((index) => {\n            return index < pos.offset() ? CaretPosition(parentNode, pos.offset() - 1) : pos;\n        }).getOr(pos);\n        remove$2(caretContainer);\n        return newPosition;\n    };\n    const removeTextCaretContainer = (caretContainer, pos) => isText$5(caretContainer) && pos.container() === caretContainer ? removeTextAndReposition(caretContainer, pos) : removeUnchanged(caretContainer, pos);\n    const removeElementCaretContainer = (caretContainer, pos) => pos.container() === caretContainer.parentNode ? removeElementAndReposition(caretContainer, pos) : removeUnchanged(caretContainer, pos);\n    const removeAndReposition = (container, pos) => CaretPosition.isTextPosition(pos) ? removeTextCaretContainer(container, pos) : removeElementCaretContainer(container, pos);\n    const remove$2 = (caretContainerNode) => {\n        if (isElement$4(caretContainerNode) && isCaretContainer$2(caretContainerNode)) {\n            if (hasContent(caretContainerNode)) {\n                caretContainerNode.removeAttribute('data-mce-caret');\n            }\n            else {\n                removeNode$1(caretContainerNode);\n            }\n        }\n        if (isText$5(caretContainerNode)) {\n            deleteZwspChars(caretContainerNode);\n            if (caretContainerNode.data.length === 0) {\n                removeNode$1(caretContainerNode);\n            }\n        }\n    };\n\n    const isContentEditableFalse$7 = isContentEditableFalse$a;\n    const isMedia$1 = isMedia$2;\n    const isTableCell$1 = isTableCell$3;\n    const inlineFakeCaretSelector = '*[contentEditable=false],video,audio,embed,object';\n    const getAbsoluteClientRect = (root, element, before) => {\n        const clientRect = collapse(element.getBoundingClientRect(), before);\n        let scrollX;\n        let scrollY;\n        if (root.tagName === 'BODY') {\n            const docElm = root.ownerDocument.documentElement;\n            scrollX = root.scrollLeft || docElm.scrollLeft;\n            scrollY = root.scrollTop || docElm.scrollTop;\n        }\n        else {\n            const rootRect = root.getBoundingClientRect();\n            scrollX = root.scrollLeft - rootRect.left;\n            scrollY = root.scrollTop - rootRect.top;\n        }\n        clientRect.left += scrollX;\n        clientRect.right += scrollX;\n        clientRect.top += scrollY;\n        clientRect.bottom += scrollY;\n        clientRect.width = 1;\n        let margin = element.offsetWidth - element.clientWidth;\n        if (margin > 0) {\n            if (before) {\n                margin *= -1;\n            }\n            clientRect.left += margin;\n            clientRect.right += margin;\n        }\n        return clientRect;\n    };\n    const trimInlineCaretContainers = (root) => {\n        const fakeCaretTargetNodes = descendants(SugarElement.fromDom(root), inlineFakeCaretSelector);\n        for (let i = 0; i < fakeCaretTargetNodes.length; i++) {\n            const node = fakeCaretTargetNodes[i].dom;\n            let sibling = node.previousSibling;\n            if (endsWithCaretContainer$1(sibling)) {\n                const data = sibling.data;\n                if (data.length === 1) {\n                    sibling.parentNode?.removeChild(sibling);\n                }\n                else {\n                    sibling.deleteData(data.length - 1, 1);\n                }\n            }\n            sibling = node.nextSibling;\n            if (startsWithCaretContainer$1(sibling)) {\n                const data = sibling.data;\n                if (data.length === 1) {\n                    sibling.parentNode?.removeChild(sibling);\n                }\n                else {\n                    sibling.deleteData(0, 1);\n                }\n            }\n        }\n    };\n    const FakeCaret = (editor, root, isBlock, hasFocus) => {\n        const lastVisualCaret = value$1();\n        let cursorInterval;\n        let caretContainerNode;\n        const caretBlock = getForcedRootBlock(editor);\n        const dom = editor.dom;\n        const show = (before, element) => {\n            let rng;\n            hide();\n            if (isTableCell$1(element)) {\n                return null;\n            }\n            if (isBlock(element)) {\n                const caretContainer = insertBlock(caretBlock, element, before);\n                const clientRect = getAbsoluteClientRect(root, element, before);\n                dom.setStyle(caretContainer, 'top', clientRect.top);\n                dom.setStyle(caretContainer, 'caret-color', 'transparent');\n                caretContainerNode = caretContainer;\n                const caret = dom.create('div', { 'class': 'mce-visual-caret', 'data-mce-bogus': 'all' });\n                dom.setStyles(caret, { ...clientRect });\n                dom.add(root, caret);\n                lastVisualCaret.set({ caret, element, before });\n                if (before) {\n                    dom.addClass(caret, 'mce-visual-caret-before');\n                }\n                startBlink();\n                rng = element.ownerDocument.createRange();\n                rng.setStart(caretContainer, 0);\n                rng.setEnd(caretContainer, 0);\n            }\n            else {\n                caretContainerNode = insertInline$1(element, before);\n                rng = element.ownerDocument.createRange();\n                if (isInlineFakeCaretTarget(caretContainerNode.nextSibling)) {\n                    rng.setStart(caretContainerNode, 0);\n                    rng.setEnd(caretContainerNode, 0);\n                }\n                else {\n                    rng.setStart(caretContainerNode, 1);\n                    rng.setEnd(caretContainerNode, 1);\n                }\n                return rng;\n            }\n            return rng;\n        };\n        const hide = () => {\n            // TODO: TINY-6015 - Ensure cleaning up the fake caret preserves the selection, as currently\n            //  the CaretContainerRemove.remove below will change the selection in some cases\n            trimInlineCaretContainers(root);\n            if (caretContainerNode) {\n                remove$2(caretContainerNode);\n                caretContainerNode = null;\n            }\n            lastVisualCaret.on((caretState) => {\n                dom.remove(caretState.caret);\n                lastVisualCaret.clear();\n            });\n            if (cursorInterval) {\n                clearInterval(cursorInterval);\n                cursorInterval = undefined;\n            }\n        };\n        const startBlink = () => {\n            cursorInterval = window.setInterval(() => {\n                lastVisualCaret.on((caretState) => {\n                    if (hasFocus()) {\n                        dom.toggleClass(caretState.caret, 'mce-visual-caret-hidden');\n                    }\n                    else {\n                        dom.addClass(caretState.caret, 'mce-visual-caret-hidden');\n                    }\n                });\n            }, 500);\n        };\n        const reposition = () => {\n            lastVisualCaret.on((caretState) => {\n                const clientRect = getAbsoluteClientRect(root, caretState.element, caretState.before);\n                dom.setStyles(caretState.caret, { ...clientRect });\n            });\n        };\n        const destroy = () => clearInterval(cursorInterval);\n        const getCss = () => ('.mce-visual-caret {' +\n            'position: absolute;' +\n            'background-color: black;' +\n            'background-color: currentcolor;' +\n            // 'background-color: red;' +\n            '}' +\n            '.mce-visual-caret-hidden {' +\n            'display: none;' +\n            '}' +\n            '*[data-mce-caret] {' +\n            'position: absolute;' +\n            'left: -1000px;' +\n            'right: auto;' +\n            'top: 0;' +\n            'margin: 0;' +\n            'padding: 0;' +\n            '}');\n        return {\n            isShowing: lastVisualCaret.isSet,\n            show,\n            hide,\n            getCss,\n            reposition,\n            destroy\n        };\n    };\n    const isFakeCaretTableBrowser = () => Env.browser.isFirefox();\n    const isInlineFakeCaretTarget = (node) => isContentEditableFalse$7(node) || isMedia$1(node);\n    const isFakeCaretTarget = (node) => {\n        const isTarget = isInlineFakeCaretTarget(node) || (isTable$2(node) && isFakeCaretTableBrowser());\n        return isTarget && parentElement(SugarElement.fromDom(node)).exists(isEditable$2);\n    };\n\n    const isContentEditableTrue$1 = isContentEditableTrue$3;\n    const isContentEditableFalse$6 = isContentEditableFalse$a;\n    const isMedia = isMedia$2;\n    const isBlockLike = matchStyleValues('display', 'block table table-cell table-row table-caption list-item');\n    const isCaretContainer = isCaretContainer$2;\n    const isCaretContainerBlock = isCaretContainerBlock$1;\n    const isElement$3 = isElement$7;\n    const isText$4 = isText$b;\n    const isCaretCandidate$1 = isCaretCandidate$3;\n    const skipCaretContainers = (walk, shallow) => {\n        let node;\n        while ((node = walk(shallow))) {\n            if (!isCaretContainerBlock(node)) {\n                return node;\n            }\n        }\n        return null;\n    };\n    const findNode = (node, direction, predicateFn, rootNode, shallow) => {\n        const walker = new DomTreeWalker(node, rootNode);\n        const isCefOrCaretContainer = isContentEditableFalse$6(node) || isCaretContainerBlock(node);\n        let tempNode;\n        if (isBackwards(direction)) {\n            if (isCefOrCaretContainer) {\n                tempNode = skipCaretContainers(walker.prev.bind(walker), true);\n                if (predicateFn(tempNode)) {\n                    return tempNode;\n                }\n            }\n            while ((tempNode = skipCaretContainers(walker.prev.bind(walker), shallow))) {\n                if (predicateFn(tempNode)) {\n                    return tempNode;\n                }\n            }\n        }\n        if (isForwards(direction)) {\n            if (isCefOrCaretContainer) {\n                tempNode = skipCaretContainers(walker.next.bind(walker), true);\n                if (predicateFn(tempNode)) {\n                    return tempNode;\n                }\n            }\n            while ((tempNode = skipCaretContainers(walker.next.bind(walker), shallow))) {\n                if (predicateFn(tempNode)) {\n                    return tempNode;\n                }\n            }\n        }\n        return null;\n    };\n    const getEditingHost = (node, rootNode) => {\n        const isCETrue = (node) => isContentEditableTrue$1(node.dom);\n        const isRoot = (node) => node.dom === rootNode;\n        return ancestor$5(SugarElement.fromDom(node), isCETrue, isRoot)\n            .map((elm) => elm.dom)\n            .getOr(rootNode);\n    };\n    const isAbsPositionedElement = (node) => isElement$7(node) && get$8(SugarElement.fromDom(node), 'position') === 'absolute';\n    const isInlineBlock = (node, rootNode) => node.parentNode !== rootNode;\n    const isInlineAbsPositionedCEF = (node, rootNode) => isContentEditableFalse$6(node) && isAbsPositionedElement(node) && isInlineBlock(node, rootNode);\n    const getParentBlock$3 = (node, rootNode) => {\n        while (node && node !== rootNode) {\n            // Exclude inline absolutely positioned CEF elements since they have 'display: block'\n            // Created TINY-12922 to improve handling non CEF elements\n            if (isBlockLike(node) && !isInlineAbsPositionedCEF(node, rootNode)) {\n                return node;\n            }\n            node = node.parentNode;\n        }\n        return null;\n    };\n    const isInSameBlock = (caretPosition1, caretPosition2, rootNode) => getParentBlock$3(caretPosition1.container(), rootNode) === getParentBlock$3(caretPosition2.container(), rootNode);\n    const getChildNodeAtRelativeOffset = (relativeOffset, caretPosition) => {\n        if (!caretPosition) {\n            return Optional.none();\n        }\n        const container = caretPosition.container();\n        const offset = caretPosition.offset();\n        if (!isElement$3(container)) {\n            return Optional.none();\n        }\n        return Optional.from(container.childNodes[offset + relativeOffset]);\n    };\n    const beforeAfter = (before, node) => {\n        const doc = node.ownerDocument ?? document;\n        const range = doc.createRange();\n        if (before) {\n            range.setStartBefore(node);\n            range.setEndBefore(node);\n        }\n        else {\n            range.setStartAfter(node);\n            range.setEndAfter(node);\n        }\n        return range;\n    };\n    const isNodesInSameBlock = (root, node1, node2) => getParentBlock$3(node1, root) === getParentBlock$3(node2, root);\n    const lean = (left, root, node) => {\n        const siblingName = left ? 'previousSibling' : 'nextSibling';\n        let tempNode = node;\n        while (tempNode && tempNode !== root) {\n            let sibling = tempNode[siblingName];\n            if (sibling && isCaretContainer(sibling)) {\n                sibling = sibling[siblingName];\n            }\n            if (isContentEditableFalse$6(sibling) || isMedia(sibling)) {\n                if (isNodesInSameBlock(root, sibling, tempNode)) {\n                    return sibling;\n                }\n                break;\n            }\n            if (isCaretCandidate$1(sibling)) {\n                break;\n            }\n            tempNode = tempNode.parentNode;\n        }\n        return null;\n    };\n    const before$1 = curry(beforeAfter, true);\n    const after$1 = curry(beforeAfter, false);\n    const normalizeRange$2 = (direction, root, range) => {\n        let node;\n        const leanLeft = curry(lean, true, root);\n        const leanRight = curry(lean, false, root);\n        const container = range.startContainer;\n        const offset = range.startOffset;\n        if (isCaretContainerBlock$1(container)) {\n            const block = isText$4(container) ? container.parentNode : container;\n            const location = block.getAttribute('data-mce-caret');\n            if (location === 'before') {\n                node = block.nextSibling;\n                if (isFakeCaretTarget(node)) {\n                    return before$1(node);\n                }\n            }\n            if (location === 'after') {\n                node = block.previousSibling;\n                if (isFakeCaretTarget(node)) {\n                    return after$1(node);\n                }\n            }\n        }\n        if (!range.collapsed) {\n            return range;\n        }\n        if (isText$b(container)) {\n            if (isCaretContainer(container)) {\n                if (direction === 1) {\n                    node = leanRight(container);\n                    if (node) {\n                        return before$1(node);\n                    }\n                    node = leanLeft(container);\n                    if (node) {\n                        return after$1(node);\n                    }\n                }\n                if (direction === -1) {\n                    node = leanLeft(container);\n                    if (node) {\n                        return after$1(node);\n                    }\n                    node = leanRight(container);\n                    if (node) {\n                        return before$1(node);\n                    }\n                }\n                return range;\n            }\n            if (endsWithCaretContainer$1(container) && offset >= container.data.length - 1) {\n                if (direction === 1) {\n                    node = leanRight(container);\n                    if (node) {\n                        return before$1(node);\n                    }\n                }\n                return range;\n            }\n            if (startsWithCaretContainer$1(container) && offset <= 1) {\n                if (direction === -1) {\n                    node = leanLeft(container);\n                    if (node) {\n                        return after$1(node);\n                    }\n                }\n                return range;\n            }\n            if (offset === container.data.length) {\n                node = leanRight(container);\n                if (node) {\n                    return before$1(node);\n                }\n                return range;\n            }\n            if (offset === 0) {\n                node = leanLeft(container);\n                if (node) {\n                    return after$1(node);\n                }\n                return range;\n            }\n        }\n        return range;\n    };\n    const getRelativeCefElm = (forward, caretPosition) => getChildNodeAtRelativeOffset(forward ? 0 : -1, caretPosition).filter(isContentEditableFalse$6);\n    const getNormalizedRangeEndPoint = (direction, root, range) => {\n        const normalizedRange = normalizeRange$2(direction, root, range);\n        return direction === -1 ? CaretPosition.fromRangeStart(normalizedRange) : CaretPosition.fromRangeEnd(normalizedRange);\n    };\n    const getElementFromPosition = (pos) => Optional.from(pos.getNode()).map(SugarElement.fromDom);\n    const getElementFromPrevPosition = (pos) => Optional.from(pos.getNode(true)).map(SugarElement.fromDom);\n    const getVisualCaretPosition = (walkFn, caretPosition) => {\n        let pos = caretPosition;\n        while ((pos = walkFn(pos))) {\n            if (pos.isVisible()) {\n                return pos;\n            }\n        }\n        return pos;\n    };\n    const isMoveInsideSameBlock = (from, to) => {\n        const inSameBlock = isInSameBlock(from, to);\n        // Handle bogus BR <p>abc|<br></p>\n        if (!inSameBlock && isBr$7(from.getNode())) {\n            return true;\n        }\n        return inSameBlock;\n    };\n\n    /**\n     * This module contains logic for moving around a virtual caret in logical order within a DOM element.\n     *\n     * It ignores the most obvious invalid caret locations such as within a script element or within a\n     * contentEditable=false element but it will return locations that isn't possible to render visually.\n     *\n     * @private\n     * @class tinymce.caret.CaretWalker\n     * @example\n     * const caretWalker = CaretWalker(rootElm);\n     *\n     * const prevLogicalCaretPosition = caretWalker.prev(CaretPosition.fromRangeStart(range));\n     * const nextLogicalCaretPosition = caretWalker.next(CaretPosition.fromRangeEnd(range));\n     */\n    const isContentEditableFalse$5 = isContentEditableFalse$a;\n    const isText$3 = isText$b;\n    const isElement$2 = isElement$7;\n    const isBr$3 = isBr$7;\n    const isCaretCandidate = isCaretCandidate$3;\n    const isAtomic = isAtomic$1;\n    const isEditableCaretCandidate = isEditableCaretCandidate$1;\n    const getParents$3 = (node, root) => {\n        const parents = [];\n        let tempNode = node;\n        while (tempNode && tempNode !== root) {\n            parents.push(tempNode);\n            tempNode = tempNode.parentNode;\n        }\n        return parents;\n    };\n    const nodeAtIndex = (container, offset) => {\n        if (container.hasChildNodes() && offset < container.childNodes.length) {\n            return container.childNodes[offset];\n        }\n        return null;\n    };\n    const getCaretCandidatePosition = (direction, node) => {\n        if (isForwards(direction)) {\n            if (isCaretCandidate(node.previousSibling) && !isText$3(node.previousSibling)) {\n                return CaretPosition.before(node);\n            }\n            if (isText$3(node)) {\n                return CaretPosition(node, 0);\n            }\n        }\n        if (isBackwards(direction)) {\n            if (isCaretCandidate(node.nextSibling) && !isText$3(node.nextSibling)) {\n                return CaretPosition.after(node);\n            }\n            if (isText$3(node)) {\n                return CaretPosition(node, node.data.length);\n            }\n        }\n        if (isBackwards(direction)) {\n            if (isBr$3(node)) {\n                return CaretPosition.before(node);\n            }\n            return CaretPosition.after(node);\n        }\n        return CaretPosition.before(node);\n    };\n    const moveForwardFromBr = (root, nextNode) => {\n        const nextSibling = nextNode.nextSibling;\n        if (nextSibling && isCaretCandidate(nextSibling)) {\n            if (isText$3(nextSibling)) {\n                return CaretPosition(nextSibling, 0);\n            }\n            else {\n                return CaretPosition.before(nextSibling);\n            }\n        }\n        else {\n            return findCaretPosition$1(1 /* HDirection.Forwards */, CaretPosition.after(nextNode), root);\n        }\n    };\n    const findCaretPosition$1 = (direction, startPos, root) => {\n        let node;\n        let nextNode;\n        let innerNode;\n        let caretPosition;\n        if (!isElement$2(root) || !startPos) {\n            return null;\n        }\n        if (startPos.isEqual(CaretPosition.after(root)) && root.lastChild) {\n            caretPosition = CaretPosition.after(root.lastChild);\n            if (isBackwards(direction) && isCaretCandidate(root.lastChild) && isElement$2(root.lastChild)) {\n                return isBr$3(root.lastChild) ? CaretPosition.before(root.lastChild) : caretPosition;\n            }\n        }\n        else {\n            caretPosition = startPos;\n        }\n        const container = caretPosition.container();\n        let offset = caretPosition.offset();\n        if (isText$3(container)) {\n            if (isBackwards(direction) && offset > 0) {\n                return CaretPosition(container, --offset);\n            }\n            if (isForwards(direction) && offset < container.length) {\n                return CaretPosition(container, ++offset);\n            }\n            node = container;\n        }\n        else {\n            if (isBackwards(direction) && offset > 0) {\n                nextNode = nodeAtIndex(container, offset - 1);\n                if (isCaretCandidate(nextNode)) {\n                    if (!isAtomic(nextNode)) {\n                        innerNode = findNode(nextNode, direction, isEditableCaretCandidate, nextNode);\n                        if (innerNode) {\n                            if (isText$3(innerNode)) {\n                                return CaretPosition(innerNode, innerNode.data.length);\n                            }\n                            return CaretPosition.after(innerNode);\n                        }\n                    }\n                    if (isText$3(nextNode)) {\n                        return CaretPosition(nextNode, nextNode.data.length);\n                    }\n                    return CaretPosition.before(nextNode);\n                }\n            }\n            if (isForwards(direction) && offset < container.childNodes.length) {\n                nextNode = nodeAtIndex(container, offset);\n                if (isCaretCandidate(nextNode)) {\n                    if (isBr$3(nextNode)) {\n                        return moveForwardFromBr(root, nextNode);\n                    }\n                    if (!isAtomic(nextNode)) {\n                        innerNode = findNode(nextNode, direction, isEditableCaretCandidate, nextNode);\n                        if (innerNode) {\n                            if (isText$3(innerNode)) {\n                                return CaretPosition(innerNode, 0);\n                            }\n                            return CaretPosition.before(innerNode);\n                        }\n                    }\n                    if (isText$3(nextNode)) {\n                        return CaretPosition(nextNode, 0);\n                    }\n                    return CaretPosition.after(nextNode);\n                }\n            }\n            node = nextNode ? nextNode : caretPosition.getNode();\n        }\n        if (node && ((isForwards(direction) && caretPosition.isAtEnd()) || (isBackwards(direction) && caretPosition.isAtStart()))) {\n            node = findNode(node, direction, always, root, true);\n            if (isEditableCaretCandidate(node, root)) {\n                return getCaretCandidatePosition(direction, node);\n            }\n        }\n        nextNode = node ? findNode(node, direction, isEditableCaretCandidate, root) : node;\n        const rootContentEditableFalseElm = last(filter$5(getParents$3(container, root), isContentEditableFalse$5));\n        if (rootContentEditableFalseElm && (!nextNode || !rootContentEditableFalseElm.contains(nextNode))) {\n            if (isForwards(direction)) {\n                caretPosition = CaretPosition.after(rootContentEditableFalseElm);\n            }\n            else {\n                caretPosition = CaretPosition.before(rootContentEditableFalseElm);\n            }\n            return caretPosition;\n        }\n        if (nextNode) {\n            return getCaretCandidatePosition(direction, nextNode);\n        }\n        return null;\n    };\n    const CaretWalker = (root) => ({\n        /**\n           * Returns the next logical caret position from the specified input\n           * caretPosition or null if there isn't any more positions left for example\n           * at the end specified root element.\n           *\n           * @method next\n           * @param {tinymce.caret.CaretPosition} caretPosition Caret position to start from.\n           * @return {tinymce.caret.CaretPosition} CaretPosition or null if no position was found.\n           */\n        next: (caretPosition) => {\n            return findCaretPosition$1(1 /* HDirection.Forwards */, caretPosition, root);\n        },\n        /**\n           * Returns the previous logical caret position from the specified input\n           * caretPosition or null if there isn't any more positions left for example\n           * at the end specified root element.\n           *\n           * @method prev\n           * @param {tinymce.caret.CaretPosition} caretPosition Caret position to start from.\n           * @return {tinymce.caret.CaretPosition} CaretPosition or null if no position was found.\n           */\n        prev: (caretPosition) => {\n            return findCaretPosition$1(-1 /* HDirection.Backwards */, caretPosition, root);\n        }\n    });\n\n    const walkToPositionIn = (forward, root, start) => {\n        const position = forward ? CaretPosition.before(start) : CaretPosition.after(start);\n        return fromPosition(forward, root, position);\n    };\n    const afterElement = (node) => isBr$7(node) ? CaretPosition.before(node) : CaretPosition.after(node);\n    const isBeforeOrStart = (position) => {\n        if (CaretPosition.isTextPosition(position)) {\n            return position.offset() === 0;\n        }\n        else {\n            return isCaretCandidate$3(position.getNode());\n        }\n    };\n    const isAfterOrEnd = (position) => {\n        if (CaretPosition.isTextPosition(position)) {\n            const container = position.container();\n            return position.offset() === container.data.length;\n        }\n        else {\n            return isCaretCandidate$3(position.getNode(true));\n        }\n    };\n    const isBeforeAfterSameElement = (from, to) => !CaretPosition.isTextPosition(from) && !CaretPosition.isTextPosition(to) && from.getNode() === to.getNode(true);\n    const isAtBr = (position) => !CaretPosition.isTextPosition(position) && isBr$7(position.getNode());\n    const shouldSkipPosition = (forward, from, to) => {\n        if (forward) {\n            return !isBeforeAfterSameElement(from, to) && !isAtBr(from) && isAfterOrEnd(from) && isBeforeOrStart(to);\n        }\n        else {\n            return !isBeforeAfterSameElement(to, from) && isBeforeOrStart(from) && isAfterOrEnd(to);\n        }\n    };\n    // Finds: <p>a|<b>b</b></p> -> <p>a<b>|b</b></p>\n    const fromPosition = (forward, root, pos) => {\n        const walker = CaretWalker(root);\n        return Optional.from(forward ? walker.next(pos) : walker.prev(pos));\n    };\n    // Finds: <p>a|<b>b</b></p> -> <p>a<b>b|</b></p>\n    const navigate = (forward, root, from) => fromPosition(forward, root, from).bind((to) => {\n        if (isInSameBlock(from, to, root) && shouldSkipPosition(forward, from, to)) {\n            return fromPosition(forward, root, to);\n        }\n        else {\n            return Optional.some(to);\n        }\n    });\n    const navigateIgnore = (forward, root, from, ignoreFilter) => navigate(forward, root, from)\n        .bind((pos) => ignoreFilter(pos) ? navigateIgnore(forward, root, pos, ignoreFilter) : Optional.some(pos));\n    const positionIn = (forward, element) => {\n        const startNode = forward ? element.firstChild : element.lastChild;\n        if (isText$b(startNode)) {\n            return Optional.some(CaretPosition(startNode, forward ? 0 : startNode.data.length));\n        }\n        else if (startNode) {\n            if (isCaretCandidate$3(startNode)) {\n                return Optional.some(forward ? CaretPosition.before(startNode) : afterElement(startNode));\n            }\n            else {\n                return walkToPositionIn(forward, element, startNode);\n            }\n        }\n        else {\n            return Optional.none();\n        }\n    };\n    const nextPosition = curry(fromPosition, true);\n    const prevPosition = curry(fromPosition, false);\n    const firstPositionIn = curry(positionIn, true);\n    const lastPositionIn = curry(positionIn, false);\n\n    const CARET_ID = '_mce_caret';\n    const isCaretNode = (node) => isElement$7(node) && node.id === CARET_ID;\n    const getParentCaretContainer = (body, node) => {\n        let currentNode = node;\n        while (currentNode && currentNode !== body) {\n            if (isCaretNode(currentNode)) {\n                return currentNode;\n            }\n            currentNode = currentNode.parentNode;\n        }\n        return null;\n    };\n\n    const isStringPathBookmark = (bookmark) => isString(bookmark.start);\n    const isRangeBookmark = (bookmark) => has$2(bookmark, 'rng');\n    const isIdBookmark = (bookmark) => has$2(bookmark, 'id');\n    const isIndexBookmark = (bookmark) => has$2(bookmark, 'name');\n    const isPathBookmark = (bookmark) => Tools.isArray(bookmark.start);\n\n    const isForwardBookmark = (bookmark) => !isIndexBookmark(bookmark) && isBoolean(bookmark.forward) ? bookmark.forward : true;\n    const addBogus = (dom, node) => {\n        // Adds a bogus BR element for empty block elements\n        if (isElement$7(node) && dom.isBlock(node) && !node.innerHTML) {\n            node.innerHTML = '<br data-mce-bogus=\"1\" />';\n        }\n        return node;\n    };\n    const resolveCaretPositionBookmark = (dom, bookmark) => {\n        const startPos = Optional.from(resolve$1(dom.getRoot(), bookmark.start));\n        const endPos = Optional.from(resolve$1(dom.getRoot(), bookmark.end));\n        return lift2(startPos, endPos, (start, end) => {\n            const range = dom.createRng();\n            range.setStart(start.container(), start.offset());\n            range.setEnd(end.container(), end.offset());\n            return { range, forward: isForwardBookmark(bookmark) };\n        });\n    };\n    const insertZwsp = (node, rng) => {\n        const doc = node.ownerDocument ?? document;\n        const textNode = doc.createTextNode(ZWSP$1);\n        node.appendChild(textNode);\n        rng.setStart(textNode, 0);\n        rng.setEnd(textNode, 0);\n    };\n    const isEmpty$3 = (node) => !node.hasChildNodes();\n    const tryFindRangePosition = (node, rng) => lastPositionIn(node).fold(never, (pos) => {\n        rng.setStart(pos.container(), pos.offset());\n        rng.setEnd(pos.container(), pos.offset());\n        return true;\n    });\n    // Since we trim zwsp from undo levels the caret format containers\n    // may be empty if so pad them with a zwsp and move caret there\n    const padEmptyCaretContainer = (root, node, rng) => {\n        if (isEmpty$3(node) && getParentCaretContainer(root, node)) {\n            insertZwsp(node, rng);\n            return true;\n        }\n        else {\n            return false;\n        }\n    };\n    const setEndPoint = (dom, start, bookmark, rng) => {\n        const point = bookmark[start ? 'start' : 'end'];\n        const root = dom.getRoot();\n        if (point) {\n            let node = root;\n            let offset = point[0];\n            // Find container node\n            for (let i = point.length - 1; node && i >= 1; i--) {\n                const children = node.childNodes;\n                if (padEmptyCaretContainer(root, node, rng)) {\n                    return true;\n                }\n                if (point[i] > children.length - 1) {\n                    if (padEmptyCaretContainer(root, node, rng)) {\n                        return true;\n                    }\n                    return tryFindRangePosition(node, rng);\n                }\n                node = children[point[i]];\n            }\n            // Move text offset to best suitable location\n            if (isText$b(node)) {\n                offset = Math.min(point[0], node.data.length);\n            }\n            // Move element offset to best suitable location\n            if (isElement$7(node)) {\n                offset = Math.min(point[0], node.childNodes.length);\n            }\n            // Set offset within container node\n            if (start) {\n                rng.setStart(node, offset);\n            }\n            else {\n                rng.setEnd(node, offset);\n            }\n        }\n        return true;\n    };\n    const isValidTextNode = (node) => isText$b(node) && node.data.length > 0;\n    const restoreEndPoint$1 = (dom, suffix, bookmark) => {\n        const marker = dom.get(bookmark.id + '_' + suffix);\n        const markerParent = marker?.parentNode;\n        const keep = bookmark.keep;\n        if (marker && markerParent) {\n            let container;\n            let offset;\n            if (suffix === 'start') {\n                if (!keep) {\n                    container = markerParent;\n                    offset = dom.nodeIndex(marker);\n                }\n                else {\n                    if (marker.hasChildNodes()) {\n                        container = marker.firstChild;\n                        offset = 1;\n                    }\n                    else if (isValidTextNode(marker.nextSibling)) {\n                        container = marker.nextSibling;\n                        offset = 0;\n                    }\n                    else if (isValidTextNode(marker.previousSibling)) {\n                        container = marker.previousSibling;\n                        offset = marker.previousSibling.data.length;\n                    }\n                    else {\n                        container = markerParent;\n                        offset = dom.nodeIndex(marker) + 1;\n                    }\n                }\n            }\n            else {\n                if (!keep) {\n                    container = markerParent;\n                    offset = dom.nodeIndex(marker);\n                }\n                else {\n                    if (marker.hasChildNodes()) {\n                        container = marker.firstChild;\n                        offset = 1;\n                    }\n                    else if (isValidTextNode(marker.previousSibling)) {\n                        container = marker.previousSibling;\n                        offset = marker.previousSibling.data.length;\n                    }\n                    else {\n                        container = markerParent;\n                        offset = dom.nodeIndex(marker);\n                    }\n                }\n            }\n            if (!keep) {\n                const prev = marker.previousSibling;\n                const next = marker.nextSibling;\n                // Remove all marker text nodes\n                Tools.each(Tools.grep(marker.childNodes), (node) => {\n                    if (isText$b(node)) {\n                        node.data = node.data.replace(/\\uFEFF/g, '');\n                    }\n                });\n                // Remove marker but keep children if for example contents where inserted into the marker\n                // Also remove duplicated instances of the marker for example by a\n                // split operation or by WebKit auto split on paste feature\n                let otherMarker;\n                while ((otherMarker = dom.get(bookmark.id + '_' + suffix))) {\n                    dom.remove(otherMarker, true);\n                }\n                // If siblings are text nodes then merge them unless it's Opera since it some how removes the node\n                // and we are sniffing since adding a lot of detection code for a browser with 3% of the market\n                // isn't worth the effort. Sorry, Opera but it's just a fact\n                if (isText$b(next) && isText$b(prev) && !Env.browser.isOpera()) {\n                    const idx = prev.data.length;\n                    prev.appendData(next.data);\n                    dom.remove(next);\n                    container = prev;\n                    offset = idx;\n                }\n            }\n            return Optional.some(CaretPosition(container, offset));\n        }\n        else {\n            return Optional.none();\n        }\n    };\n    const resolvePaths = (dom, bookmark) => {\n        const range = dom.createRng();\n        if (setEndPoint(dom, true, bookmark, range) && setEndPoint(dom, false, bookmark, range)) {\n            return Optional.some({ range, forward: isForwardBookmark(bookmark) });\n        }\n        else {\n            return Optional.none();\n        }\n    };\n    const resolveId = (dom, bookmark) => {\n        const startPos = restoreEndPoint$1(dom, 'start', bookmark);\n        const endPos = restoreEndPoint$1(dom, 'end', bookmark);\n        return lift2(startPos, endPos.or(startPos), (spos, epos) => {\n            const range = dom.createRng();\n            range.setStart(addBogus(dom, spos.container()), spos.offset());\n            range.setEnd(addBogus(dom, epos.container()), epos.offset());\n            return { range, forward: isForwardBookmark(bookmark) };\n        });\n    };\n    const resolveIndex = (dom, bookmark) => Optional.from(dom.select(bookmark.name)[bookmark.index]).map((elm) => {\n        const range = dom.createRng();\n        range.selectNode(elm);\n        return { range, forward: true };\n    });\n    const resolve = (selection, bookmark) => {\n        const dom = selection.dom;\n        if (bookmark) {\n            if (isPathBookmark(bookmark)) {\n                return resolvePaths(dom, bookmark);\n            }\n            else if (isStringPathBookmark(bookmark)) {\n                return resolveCaretPositionBookmark(dom, bookmark);\n            }\n            else if (isIdBookmark(bookmark)) {\n                return resolveId(dom, bookmark);\n            }\n            else if (isIndexBookmark(bookmark)) {\n                return resolveIndex(dom, bookmark);\n            }\n            else if (isRangeBookmark(bookmark)) {\n                return Optional.some({ range: bookmark.rng, forward: isForwardBookmark(bookmark) });\n            }\n        }\n        return Optional.none();\n    };\n\n    const getBookmark$1 = (selection, type, normalized) => {\n        return getBookmark$2(selection, type, normalized);\n    };\n    const moveToBookmark = (selection, bookmark) => {\n        resolve(selection, bookmark).each(({ range, forward }) => {\n            selection.setRng(range, forward);\n        });\n    };\n    const isBookmarkNode$1 = (node) => {\n        return isElement$7(node) && node.tagName === 'SPAN' && node.getAttribute('data-mce-type') === 'bookmark';\n    };\n\n    const is = (expected) => (actual) => expected === actual;\n    const isNbsp = is(nbsp);\n    const isWhiteSpace = (chr) => chr !== '' && ' \\f\\n\\r\\t\\v'.indexOf(chr) !== -1;\n    const isContent = (chr) => !isWhiteSpace(chr) && !isNbsp(chr) && !isZwsp$2(chr);\n\n    const getRanges = (selection) => {\n        const ranges = [];\n        if (selection) {\n            for (let i = 0; i < selection.rangeCount; i++) {\n                ranges.push(selection.getRangeAt(i));\n            }\n        }\n        return ranges;\n    };\n    const getSelectedNodes = (ranges) => {\n        return bind$3(ranges, (range) => {\n            const node = getSelectedNode(range);\n            return node ? [SugarElement.fromDom(node)] : [];\n        });\n    };\n    const hasMultipleRanges = (selection) => {\n        return getRanges(selection).length > 1;\n    };\n\n    const getCellsFromRanges = (ranges) => filter$5(getSelectedNodes(ranges), isTableCell$2);\n    const getCellsFromElement = (elm) => descendants(elm, 'td[data-mce-selected],th[data-mce-selected]');\n    const getCellsFromElementOrRanges = (ranges, element) => {\n        const selectedCells = getCellsFromElement(element);\n        return selectedCells.length > 0 ? selectedCells : getCellsFromRanges(ranges);\n    };\n    const getCellsFromEditor = (editor) => getCellsFromElementOrRanges(getRanges(editor.selection.getSel()), SugarElement.fromDom(editor.getBody()));\n    const getClosestTable = (cell, isRoot) => ancestor$4(cell, 'table', isRoot);\n\n    const getStartNode = (rng) => {\n        const sc = rng.startContainer, so = rng.startOffset;\n        if (isText$b(sc)) {\n            return so === 0 ? Optional.some(SugarElement.fromDom(sc)) : Optional.none();\n        }\n        else {\n            return Optional.from(sc.childNodes[so]).map(SugarElement.fromDom);\n        }\n    };\n    const getEndNode = (rng) => {\n        const ec = rng.endContainer, eo = rng.endOffset;\n        if (isText$b(ec)) {\n            return eo === ec.data.length ? Optional.some(SugarElement.fromDom(ec)) : Optional.none();\n        }\n        else {\n            return Optional.from(ec.childNodes[eo - 1]).map(SugarElement.fromDom);\n        }\n    };\n    const getFirstChildren = (node) => {\n        return firstChild(node).fold(constant([node]), (child) => {\n            return [node].concat(getFirstChildren(child));\n        });\n    };\n    const getLastChildren = (node) => {\n        return lastChild(node).fold(constant([node]), (child) => {\n            if (name(child) === 'br') {\n                return prevSibling(child).map((sibling) => {\n                    return [node].concat(getLastChildren(sibling));\n                }).getOr([]);\n            }\n            else {\n                return [node].concat(getLastChildren(child));\n            }\n        });\n    };\n    const hasAllContentsSelected = (elm, rng) => {\n        return lift2(getStartNode(rng), getEndNode(rng), (startNode, endNode) => {\n            const start = find$2(getFirstChildren(elm), curry(eq, startNode));\n            const end = find$2(getLastChildren(elm), curry(eq, endNode));\n            return start.isSome() && end.isSome();\n        }).getOr(false);\n    };\n    const moveEndPoint = (dom, rng, node, start) => {\n        const root = node;\n        const walker = new DomTreeWalker(node, root);\n        const moveCaretBeforeOnEnterElementsMap = filter$4(dom.schema.getMoveCaretBeforeOnEnterElements(), (_, name) => !contains$2(['td', 'th', 'table'], name.toLowerCase()));\n        let currentNode = node;\n        do {\n            if (isText$b(currentNode) && Tools.trim(currentNode.data).length !== 0) {\n                if (start) {\n                    rng.setStart(currentNode, 0);\n                }\n                else {\n                    rng.setEnd(currentNode, currentNode.data.length);\n                }\n                return;\n            }\n            // BR/IMG/INPUT elements but not table cells\n            if (moveCaretBeforeOnEnterElementsMap[currentNode.nodeName]) {\n                if (start) {\n                    rng.setStartBefore(currentNode);\n                }\n                else {\n                    if (currentNode.nodeName === 'BR') {\n                        rng.setEndBefore(currentNode);\n                    }\n                    else {\n                        rng.setEndAfter(currentNode);\n                    }\n                }\n                return;\n            }\n        } while ((currentNode = (start ? walker.next() : walker.prev())));\n        // Failed to find any text node or other suitable location then move to the root of body\n        if (root.nodeName === 'BODY') {\n            if (start) {\n                rng.setStart(root, 0);\n            }\n            else {\n                rng.setEnd(root, root.childNodes.length);\n            }\n        }\n    };\n    const hasAnyRanges = (editor) => {\n        const sel = editor.selection.getSel();\n        return isNonNullable(sel) && sel.rangeCount > 0;\n    };\n    const runOnRanges = (editor, executor) => {\n        // Check to see if a fake selection is active. If so then we are simulating a multi range\n        // selection so we should return a range for each selected node.\n        // Note: Currently tables are the only thing supported for fake selections.\n        const fakeSelectionNodes = getCellsFromEditor(editor);\n        if (fakeSelectionNodes.length > 0) {\n            each$e(fakeSelectionNodes, (elem) => {\n                const node = elem.dom;\n                const fakeNodeRng = editor.dom.createRng();\n                fakeNodeRng.setStartBefore(node);\n                fakeNodeRng.setEndAfter(node);\n                executor(fakeNodeRng, true);\n            });\n        }\n        else {\n            executor(editor.selection.getRng(), false);\n        }\n    };\n    const preserve = (selection, fillBookmark, executor) => {\n        const bookmark = getPersistentBookmark(selection, fillBookmark);\n        executor(bookmark);\n        selection.moveToBookmark(bookmark);\n    };\n    const isSelectionOverWholeNode = (range, nodeTypePredicate) => range.startContainer === range.endContainer\n        && range.endOffset - range.startOffset === 1\n        && nodeTypePredicate(range.startContainer.childNodes[range.startOffset]);\n    const isSelectionOverWholeHTMLElement = (range) => isSelectionOverWholeNode(range, isHTMLElement);\n    const isSelectionOverWholeTextNode = (range) => isSelectionOverWholeNode(range, isText$b);\n    const isSelectionOverWholeAnchor = (range) => isSelectionOverWholeNode(range, isAnchor);\n\n    const isNode = (node) => isNumber(node?.nodeType);\n    const isElementNode$1 = (node) => isElement$7(node) && !isBookmarkNode$1(node) && !isCaretNode(node) && !isBogus$1(node);\n    // In TinyMCE, directly selected elements are indicated with the data-mce-selected attribute\n    // Elements that can be directly selected include control elements such as img, media elements, noneditable elements and others\n    const isElementDirectlySelected = (dom, node) => {\n        // Table cells are a special case and are separately handled from native editor selection\n        if (isElementNode$1(node) && !/^(TD|TH)$/.test(node.nodeName)) {\n            const selectedAttr = dom.getAttrib(node, 'data-mce-selected');\n            const value = parseInt(selectedAttr, 10);\n            // Avoid cases where data-mce-selected is not a positive number e.g. inline-boundary\n            return !isNaN(value) && value > 0;\n        }\n        else {\n            return false;\n        }\n    };\n    // TODO: TINY-9130 Look at making SelectionUtils.preserve maintain the noneditable selection instead\n    const preserveSelection = (editor, action, shouldMoveStart) => {\n        const { selection, dom } = editor;\n        const selectedNodeBeforeAction = selection.getNode();\n        const isSelectedBeforeNodeNoneditable = isContentEditableFalse$a(selectedNodeBeforeAction);\n        preserve(selection, true, () => {\n            action();\n        });\n        // Check previous selected node before the action still exists in the DOM\n        // and is still noneditable\n        const isBeforeNodeStillNoneditable = isSelectedBeforeNodeNoneditable && isContentEditableFalse$a(selectedNodeBeforeAction);\n        if (isBeforeNodeStillNoneditable && dom.isChildOf(selectedNodeBeforeAction, editor.getBody())) {\n            editor.selection.select(selectedNodeBeforeAction);\n        }\n        else if (shouldMoveStart(selection.getStart())) {\n            moveStartToNearestText(dom, selection);\n        }\n    };\n    // Note: The reason why we only care about moving the start is because MatchFormat and its function use the start of the selection to determine if a selection has a given format or not\n    const moveStartToNearestText = (dom, selection) => {\n        const rng = selection.getRng();\n        const { startContainer, startOffset } = rng;\n        const selectedNode = selection.getNode();\n        if (isElementDirectlySelected(dom, selectedNode)) {\n            return;\n        }\n        // Try move startContainer/startOffset to a suitable text node\n        if (isElement$7(startContainer)) {\n            const nodes = startContainer.childNodes;\n            const root = dom.getRoot();\n            let walker;\n            if (startOffset < nodes.length) {\n                const startNode = nodes[startOffset];\n                walker = new DomTreeWalker(startNode, dom.getParent(startNode, dom.isBlock) ?? root);\n            }\n            else {\n                const startNode = nodes[nodes.length - 1];\n                walker = new DomTreeWalker(startNode, dom.getParent(startNode, dom.isBlock) ?? root);\n                walker.next(true);\n            }\n            for (let node = walker.current(); node; node = walker.next()) {\n                // If we have found a noneditable element before we have found any text\n                // then we cannot move forward any further as otherwise the start could be put inside\n                // the non-editable element which is not valid\n                if (dom.getContentEditable(node) === 'false') {\n                    return;\n                }\n                else if (isText$b(node) && !isWhiteSpaceNode$1(node)) {\n                    rng.setStart(node, 0);\n                    selection.setRng(rng);\n                    return;\n                }\n            }\n        }\n    };\n    /**\n     * Returns the next/previous non whitespace node.\n     *\n     * @private\n     * @param {Node} node Node to start at.\n     * @param {Boolean} next (Optional) Include next or previous node defaults to previous.\n     * @param {Boolean} inc (Optional) Include the current node in checking. Defaults to false.\n     * @return {Node} Next or previous node or undefined if it wasn't found.\n     */\n    const getNonWhiteSpaceSibling = (node, next, inc) => {\n        if (node) {\n            const nextName = next ? 'nextSibling' : 'previousSibling';\n            for (node = inc ? node : node[nextName]; node; node = node[nextName]) {\n                if (isElement$7(node) || !isWhiteSpaceNode$1(node)) {\n                    return node;\n                }\n            }\n        }\n        return undefined;\n    };\n    const isTextBlock$2 = (schema, node) => !!schema.getTextBlockElements()[node.nodeName.toLowerCase()] || isTransparentBlock(schema, node);\n    const isValid = (ed, parent, child) => {\n        return ed.schema.isValidChild(parent, child);\n    };\n    const isWhiteSpaceNode$1 = (node, allowSpaces = false) => {\n        if (isNonNullable(node) && isText$b(node)) {\n            // If spaces are allowed, treat them as a non-breaking space\n            const data = allowSpaces ? node.data.replace(/ /g, '\\u00a0') : node.data;\n            return isWhitespaceText(data);\n        }\n        else {\n            return false;\n        }\n    };\n    const isEmptyTextNode$1 = (node) => {\n        return isNonNullable(node) && isText$b(node) && node.length === 0;\n    };\n    const isWrapNoneditableTarget = (editor, node) => {\n        const baseDataSelector = '[data-mce-cef-wrappable]';\n        const formatNoneditableSelector = getFormatNoneditableSelector(editor);\n        const selector = isEmpty$5(formatNoneditableSelector) ? baseDataSelector : `${baseDataSelector},${formatNoneditableSelector}`;\n        return is$2(SugarElement.fromDom(node), selector);\n    };\n    const hasEditableDescendants = (dom, node) => dom.select('[contenteditable=\"true\"]', node).length > 0;\n    const getEditableDescendants = (dom, parent) => foldl(from(parent.childNodes), (editableDescendants, child) => [\n        ...editableDescendants,\n        ...(isElement$7(child) && dom.getContentEditable(child) === 'true'\n            ? [child]\n            : getEditableDescendants(dom, child))\n    ], []);\n    // A noneditable element is wrappable if it:\n    // - is valid target (has data-mce-cef-wrappable attribute or matches selector from option)\n    // - has no editable descendants - removing formats in the editable region can result in the wrapped noneditable being split which is undesirable\n    const isWrappableNoneditable = (editor, node) => {\n        const dom = editor.dom;\n        return (isElementNode$1(node) &&\n            dom.getContentEditable(node) === 'false' &&\n            isWrapNoneditableTarget(editor, node) &&\n            !hasEditableDescendants(dom, node));\n    };\n    /**\n     * Replaces variables in the value. The variable format is %var.\n     *\n     * @private\n     * @param {String} value Value to replace variables in.\n     * @param {Object} vars Name/value array with variables to replace.\n     * @return {String} New value with replaced variables.\n     */\n    const replaceVars = (value, vars) => {\n        if (isFunction(value)) {\n            return value(vars);\n        }\n        else if (isNonNullable(vars)) {\n            value = value.replace(/%(\\w+)/g, (str, name) => {\n                return vars[name] || str;\n            });\n        }\n        return value;\n    };\n    /**\n     * Compares two string/nodes regardless of their case.\n     *\n     * @private\n     * @param {String/Node} str1 Node or string to compare.\n     * @param {String/Node} str2 Node or string to compare.\n     * @return {Boolean} True/false if they match.\n     */\n    const isEq$5 = (str1, str2) => {\n        str1 = str1 || '';\n        str2 = str2 || '';\n        str1 = '' + (str1.nodeName || str1);\n        str2 = '' + (str2.nodeName || str2);\n        return str1.toLowerCase() === str2.toLowerCase();\n    };\n    const normalizeStyleValue = (value, name) => {\n        if (isNullable(value)) {\n            return null;\n        }\n        else {\n            let strValue = String(value);\n            // Force the format to hex\n            if (name === 'color' || name === 'backgroundColor') {\n                strValue = rgbaToHexString(strValue);\n            }\n            // Opera will return bold as 700\n            if (name === 'fontWeight' && value === 700) {\n                strValue = 'bold';\n            }\n            // Normalize fontFamily so \"'Font name', Font\" becomes: \"Font name,Font\"\n            if (name === 'fontFamily') {\n                strValue = strValue.replace(/[\\'\\\"]/g, '').replace(/,\\s+/g, ',');\n            }\n            return strValue;\n        }\n    };\n    const getStyle = (dom, node, name) => {\n        const style = dom.getStyle(node, name);\n        return normalizeStyleValue(style, name);\n    };\n    const getTextDecoration = (dom, node) => {\n        let decoration;\n        dom.getParent(node, (n) => {\n            if (isElement$7(n)) {\n                decoration = dom.getStyle(n, 'text-decoration');\n                return !!decoration && decoration !== 'none';\n            }\n            else {\n                return false;\n            }\n        });\n        return decoration;\n    };\n    const getParents$2 = (dom, node, selector) => {\n        return dom.getParents(node, selector, dom.getRoot());\n    };\n    const isFormatPredicate = (editor, formatName, predicate) => {\n        const formats = editor.formatter.get(formatName);\n        return isNonNullable(formats) && exists(formats, predicate);\n    };\n    const isVariableFormatName = (editor, formatName) => {\n        const hasVariableValues = (format) => {\n            const isVariableValue = (val) => isFunction(val) || val.length > 1 && val.charAt(0) === '%';\n            return exists(['styles', 'attributes'], (key) => get$b(format, key).exists((field) => {\n                const fieldValues = isArray$1(field) ? field : values(field);\n                return exists(fieldValues, isVariableValue);\n            }));\n        };\n        return isFormatPredicate(editor, formatName, hasVariableValues);\n    };\n    /**\n     * Checks if the two formats are similar based on the format type, attributes, styles and classes\n     */\n    const areSimilarFormats = (editor, formatName, otherFormatName) => {\n        // Note: MatchFormat.matchNode() uses these parameters to check if a format matches a node\n        // Therefore, these are ideal to check if two formats are similar\n        const validKeys = ['inline', 'block', 'selector', 'attributes', 'styles', 'classes'];\n        const filterObj = (format) => filter$4(format, (_, key) => exists(validKeys, (validKey) => validKey === key));\n        return isFormatPredicate(editor, formatName, (fmt1) => {\n            const filteredFmt1 = filterObj(fmt1);\n            return isFormatPredicate(editor, otherFormatName, (fmt2) => {\n                const filteredFmt2 = filterObj(fmt2);\n                return equal$1(filteredFmt1, filteredFmt2);\n            });\n        });\n    };\n    const isBlockFormat = (format) => hasNonNullableKey(format, 'block');\n    const isWrappingBlockFormat = (format) => isBlockFormat(format) && format.wrapper === true;\n    const isNonWrappingBlockFormat = (format) => isBlockFormat(format) && format.wrapper !== true;\n    const isSelectorFormat = (format) => hasNonNullableKey(format, 'selector');\n    const isInlineFormat = (format) => hasNonNullableKey(format, 'inline');\n    const isMixedFormat = (format) => isSelectorFormat(format) && isInlineFormat(format) && is$4(get$b(format, 'mixed'), true);\n    const shouldExpandToSelector = (format) => isSelectorFormat(format) && format.expand !== false && !isInlineFormat(format);\n    const getEmptyCaretContainers = (node) => {\n        const nodes = [];\n        let tempNode = node;\n        while (tempNode) {\n            if ((isText$b(tempNode) && tempNode.data !== ZWSP$1) || tempNode.childNodes.length > 1) {\n                return [];\n            }\n            // Collect nodes\n            if (isElement$7(tempNode)) {\n                nodes.push(tempNode);\n            }\n            tempNode = tempNode.firstChild;\n        }\n        return nodes;\n    };\n    const isCaretContainerEmpty = (node) => {\n        return getEmptyCaretContainers(node).length > 0;\n    };\n    const isEmptyCaretFormatElement = (element) => {\n        return isCaretNode(element.dom) && isCaretContainerEmpty(element.dom);\n    };\n\n    const isBookmarkNode = isBookmarkNode$1;\n    const getParents$1 = getParents$2;\n    const isWhiteSpaceNode = isWhiteSpaceNode$1;\n    const isTextBlock$1 = isTextBlock$2;\n    const isBogusBr$1 = (node) => {\n        return isBr$7(node) && node.getAttribute('data-mce-bogus') && !node.nextSibling;\n    };\n    // Expands the node to the closes contentEditable false element if it exists\n    const findParentContentEditable = (dom, node) => {\n        let parent = node;\n        while (parent) {\n            if (isElement$7(parent) && dom.getContentEditable(parent)) {\n                return dom.getContentEditable(parent) === 'false' ? parent : node;\n            }\n            parent = parent.parentNode;\n        }\n        return node;\n    };\n    const walkText = (start, node, offset, predicate) => {\n        const str = node.data;\n        if (start) {\n            for (let i = offset; i > 0; i--) {\n                if (predicate(str.charAt(i - 1))) {\n                    return i;\n                }\n            }\n        }\n        else {\n            for (let i = offset; i < str.length; i++) {\n                if (predicate(str.charAt(i))) {\n                    return i;\n                }\n            }\n        }\n        return -1;\n    };\n    const findSpace = (start, node, offset) => walkText(start, node, offset, (c) => isNbsp(c) || isWhiteSpace(c));\n    const findContent = (start, node, offset) => walkText(start, node, offset, isContent);\n    const findWordEndPoint = (dom, body, container, offset, start, includeTrailingSpaces) => {\n        let lastTextNode;\n        const closestRoot = dom.getParent(container, (node) => isEditingHost(node) || dom.isBlock(node));\n        const rootNode = isNonNullable(closestRoot) ? closestRoot : body;\n        const walk = (container, offset, pred) => {\n            const textSeeker = TextSeeker(dom);\n            const walker = start ? textSeeker.backwards : textSeeker.forwards;\n            return Optional.from(walker(container, offset, (text, textOffset) => {\n                if (isBookmarkNode(text.parentNode)) {\n                    return -1;\n                }\n                else {\n                    lastTextNode = text;\n                    return pred(start, text, textOffset);\n                }\n            }, rootNode));\n        };\n        const spaceResult = walk(container, offset, findSpace);\n        return spaceResult.bind((result) => includeTrailingSpaces ?\n            walk(result.container, result.offset + (start ? -1 : 0), findContent) :\n            Optional.some(result)).orThunk(() => lastTextNode ?\n            Optional.some({ container: lastTextNode, offset: start ? 0 : lastTextNode.length }) :\n            Optional.none());\n    };\n    const findSelectorEndPoint = (dom, formatList, rng, container, siblingName) => {\n        const sibling = container[siblingName];\n        if (isText$b(container) && isEmpty$5(container.data) && sibling) {\n            container = sibling;\n        }\n        const parents = getParents$1(dom, container);\n        for (let i = 0; i < parents.length; i++) {\n            for (let y = 0; y < formatList.length; y++) {\n                const curFormat = formatList[y];\n                // If collapsed state is set then skip formats that doesn't match that\n                if (isNonNullable(curFormat.collapsed) && curFormat.collapsed !== rng.collapsed) {\n                    continue;\n                }\n                if (isSelectorFormat(curFormat) && dom.is(parents[i], curFormat.selector)) {\n                    return parents[i];\n                }\n            }\n        }\n        return container;\n    };\n    const findBlockEndPoint = (dom, formatList, container, siblingName) => {\n        let node = container;\n        const root = dom.getRoot();\n        const format = formatList[0];\n        // Expand to block of similar type\n        if (isBlockFormat(format)) {\n            node = format.wrapper ? null : dom.getParent(container, format.block, root);\n        }\n        // Expand to first wrappable block element or any block element\n        if (!node) {\n            const scopeRoot = dom.getParent(container, 'LI,TD,TH,SUMMARY') ?? root;\n            node = dom.getParent(isText$b(container) ? container.parentNode : container, \n            // Fixes #6183 where it would expand to editable parent element in inline mode\n            (node) => node !== root && isTextBlock$1(dom.schema, node), scopeRoot);\n        }\n        // Exclude inner lists from wrapping\n        if (node && isBlockFormat(format) && format.wrapper) {\n            node = getParents$1(dom, node, 'ul,ol').reverse()[0] || node;\n        }\n        // Didn't find a block element look for first/last wrappable element\n        if (!node) {\n            node = container;\n            while (node && node[siblingName] && !dom.isBlock(node[siblingName])) {\n                node = node[siblingName];\n                // Break on BR but include it will be removed later on\n                // we can't remove it now since we need to check if it can be wrapped\n                if (isEq$5(node, 'br')) {\n                    break;\n                }\n            }\n        }\n        return node || container;\n    };\n    // We're at the edge if the parent is a block and there's no next sibling. Alternatively,\n    // if we reach the root or can't walk further we also consider it to be a boundary.\n    const isAtBlockBoundary$1 = (dom, root, container, siblingName) => {\n        const parent = container.parentNode;\n        if (isNonNullable(container[siblingName])) {\n            return false;\n        }\n        else if (parent === root || isNullable(parent) || dom.isBlock(parent)) {\n            return true;\n        }\n        else {\n            return isAtBlockBoundary$1(dom, root, parent, siblingName);\n        }\n    };\n    // This function walks up the tree if there is no siblings before/after the node.\n    // If a sibling is found then the container is returned\n    const findParentContainer = (dom, formatList, container, offset, start, expandToBlock) => {\n        let parent = container;\n        const siblingName = start ? 'previousSibling' : 'nextSibling';\n        const root = dom.getRoot();\n        // If it's a text node and the offset is inside the text\n        if (isText$b(container) && !isWhiteSpaceNode(container)) {\n            if (start ? offset > 0 : offset < container.data.length) {\n                return container;\n            }\n        }\n        while (parent) {\n            if (isEditingHost(parent)) {\n                return container;\n            }\n            // Stop expanding on block elements\n            if (!formatList[0].block_expand && dom.isBlock(parent)) {\n                return expandToBlock ? parent : container;\n            }\n            // Walk left/right\n            for (let sibling = parent[siblingName]; sibling; sibling = sibling[siblingName]) {\n                // Allow spaces if not at the edge of a block element, as the spaces won't have been collapsed\n                const allowSpaces = isText$b(sibling) && !isAtBlockBoundary$1(dom, root, sibling, siblingName);\n                if (!isBookmarkNode(sibling) && !isBogusBr$1(sibling) && !isWhiteSpaceNode(sibling, allowSpaces)) {\n                    return parent;\n                }\n            }\n            // Check if we can move up are we at root level or body level\n            if (parent === root || parent.parentNode === root) {\n                container = parent;\n                break;\n            }\n            parent = parent.parentNode;\n        }\n        return container;\n    };\n    const isSelfOrParentBookmark = (container) => isBookmarkNode(container.parentNode) || isBookmarkNode(container);\n    const expandRng = (dom, rng, formatList, expandOptions = {}) => {\n        const { includeTrailingSpace = false, expandToBlock = true } = expandOptions;\n        const editableHost = dom.getParent(rng.commonAncestorContainer, (node) => isEditingHost(node));\n        const root = isNonNullable(editableHost) ? editableHost : dom.getRoot();\n        let { startContainer, startOffset, endContainer, endOffset } = rng;\n        const format = formatList[0];\n        // If index based start position then resolve it\n        if (isElement$7(startContainer) && startContainer.hasChildNodes()) {\n            startContainer = getNode$1(startContainer, startOffset);\n            if (isText$b(startContainer)) {\n                startOffset = 0;\n            }\n        }\n        // If index based end position then resolve it\n        if (isElement$7(endContainer) && endContainer.hasChildNodes()) {\n            endContainer = getNode$1(endContainer, rng.collapsed ? endOffset : endOffset - 1);\n            if (isText$b(endContainer)) {\n                endOffset = endContainer.data.length;\n            }\n        }\n        // Expand to closest contentEditable element\n        startContainer = findParentContentEditable(dom, startContainer);\n        endContainer = findParentContentEditable(dom, endContainer);\n        // Exclude bookmark nodes if possible\n        if (isSelfOrParentBookmark(startContainer)) {\n            startContainer = isBookmarkNode(startContainer) ? startContainer : startContainer.parentNode;\n            if (rng.collapsed) {\n                startContainer = startContainer.previousSibling || startContainer;\n            }\n            else {\n                startContainer = startContainer.nextSibling || startContainer;\n            }\n            if (isText$b(startContainer)) {\n                startOffset = rng.collapsed ? startContainer.length : 0;\n            }\n        }\n        if (isSelfOrParentBookmark(endContainer)) {\n            endContainer = isBookmarkNode(endContainer) ? endContainer : endContainer.parentNode;\n            if (rng.collapsed) {\n                endContainer = endContainer.nextSibling || endContainer;\n            }\n            else {\n                endContainer = endContainer.previousSibling || endContainer;\n            }\n            if (isText$b(endContainer)) {\n                endOffset = rng.collapsed ? 0 : endContainer.length;\n            }\n        }\n        if (rng.collapsed) {\n            // Expand left to closest word boundary\n            const startPoint = findWordEndPoint(dom, root, startContainer, startOffset, true, includeTrailingSpace);\n            startPoint.each(({ container, offset }) => {\n                startContainer = container;\n                startOffset = offset;\n            });\n            // Expand right to closest word boundary\n            const endPoint = findWordEndPoint(dom, root, endContainer, endOffset, false, includeTrailingSpace);\n            endPoint.each(({ container, offset }) => {\n                endContainer = container;\n                endOffset = offset;\n            });\n        }\n        // Move start/end point up the tree if the leaves are sharp and if we are in different containers\n        // Example * becomes !: !<p><b><i>*text</i><i>text*</i></b></p>!\n        // This will reduce the number of wrapper elements that needs to be created\n        // Move start point up the tree\n        if (isInlineFormat(format) || format.block_expand) {\n            if (!isInlineFormat(format) || (!isText$b(startContainer) || startOffset === 0)) {\n                startContainer = findParentContainer(dom, formatList, startContainer, startOffset, true, expandToBlock);\n            }\n            if (!isInlineFormat(format) || (!isText$b(endContainer) || endOffset === endContainer.data.length)) {\n                endContainer = findParentContainer(dom, formatList, endContainer, endOffset, false, expandToBlock);\n            }\n        }\n        // Expand start/end container to matching selector\n        if (shouldExpandToSelector(format)) {\n            // Find new startContainer/endContainer if there is better one\n            startContainer = findSelectorEndPoint(dom, formatList, rng, startContainer, 'previousSibling');\n            endContainer = findSelectorEndPoint(dom, formatList, rng, endContainer, 'nextSibling');\n        }\n        // Expand start/end container to matching block element or text node\n        if (isBlockFormat(format) || isSelectorFormat(format)) {\n            // Find new startContainer/endContainer if there is better one\n            startContainer = findBlockEndPoint(dom, formatList, startContainer, 'previousSibling');\n            endContainer = findBlockEndPoint(dom, formatList, endContainer, 'nextSibling');\n            // Non block element then try to expand up the leaf\n            if (isBlockFormat(format)) {\n                if (!dom.isBlock(startContainer)) {\n                    startContainer = findParentContainer(dom, formatList, startContainer, startOffset, true, expandToBlock);\n                    if (isText$b(startContainer)) {\n                        startOffset = 0;\n                    }\n                }\n                if (!dom.isBlock(endContainer)) {\n                    endContainer = findParentContainer(dom, formatList, endContainer, endOffset, false, expandToBlock);\n                    if (isText$b(endContainer)) {\n                        endOffset = endContainer.data.length;\n                    }\n                }\n            }\n        }\n        // Setup index for startContainer\n        if (isElement$7(startContainer) && startContainer.parentNode) {\n            startOffset = dom.nodeIndex(startContainer);\n            startContainer = startContainer.parentNode;\n        }\n        // Setup index for endContainer\n        if (isElement$7(endContainer) && endContainer.parentNode) {\n            endOffset = dom.nodeIndex(endContainer) + 1;\n            endContainer = endContainer.parentNode;\n        }\n        // Return new range like object\n        return {\n            startContainer,\n            startOffset,\n            endContainer,\n            endOffset\n        };\n    };\n\n    const walk$3 = (dom, rng, callback) => {\n        const startOffset = rng.startOffset;\n        const startContainer = getNode$1(rng.startContainer, startOffset);\n        const endOffset = rng.endOffset;\n        const endContainer = getNode$1(rng.endContainer, endOffset - 1);\n        /**\n         * Excludes start/end text node if they are out side the range\n         *\n         * @private\n         * @param {Array} nodes Nodes to exclude items from.\n         * @return {Array} Array with nodes excluding the start/end container if needed.\n         */\n        const exclude = (nodes) => {\n            // First node is excluded\n            const firstNode = nodes[0];\n            if (isText$b(firstNode) && firstNode === startContainer && startOffset >= firstNode.data.length) {\n                nodes.splice(0, 1);\n            }\n            // Last node is excluded\n            const lastNode = nodes[nodes.length - 1];\n            if (endOffset === 0 && nodes.length > 0 && lastNode === endContainer && isText$b(lastNode)) {\n                nodes.splice(nodes.length - 1, 1);\n            }\n            return nodes;\n        };\n        const collectSiblings = (node, name, endNode) => {\n            const siblings = [];\n            for (; node && node !== endNode; node = node[name]) {\n                siblings.push(node);\n            }\n            return siblings;\n        };\n        const findEndPoint = (node, root) => dom.getParent(node, (node) => node.parentNode === root, root);\n        const walkBoundary = (startNode, endNode, next) => {\n            const siblingName = next ? 'nextSibling' : 'previousSibling';\n            for (let node = startNode, parent = node.parentNode; node && node !== endNode; node = parent) {\n                parent = node.parentNode;\n                const siblings = collectSiblings(node === startNode ? node : node[siblingName], siblingName);\n                if (siblings.length) {\n                    if (!next) {\n                        siblings.reverse();\n                    }\n                    callback(exclude(siblings));\n                }\n            }\n        };\n        // Same container\n        if (startContainer === endContainer) {\n            return callback(exclude([startContainer]));\n        }\n        // Find common ancestor and end points\n        const ancestor = dom.findCommonAncestor(startContainer, endContainer) ?? dom.getRoot();\n        // Process left side\n        if (dom.isChildOf(startContainer, endContainer)) {\n            return walkBoundary(startContainer, ancestor, true);\n        }\n        // Process right side\n        if (dom.isChildOf(endContainer, startContainer)) {\n            return walkBoundary(endContainer, ancestor);\n        }\n        // Find start/end point\n        const startPoint = findEndPoint(startContainer, ancestor) || startContainer;\n        const endPoint = findEndPoint(endContainer, ancestor) || endContainer;\n        // Walk left leaf\n        walkBoundary(startContainer, startPoint, true);\n        // Walk the middle from start to end point\n        const siblings = collectSiblings(startPoint === startContainer ? startPoint : startPoint.nextSibling, 'nextSibling', endPoint === endContainer ? endPoint.nextSibling : endPoint);\n        if (siblings.length) {\n            callback(exclude(siblings));\n        }\n        // Walk right leaf\n        walkBoundary(endContainer, endPoint);\n    };\n\n    const validBlocks = [\n        // Codesample plugin\n        'pre[class*=language-][contenteditable=\"false\"]',\n        // Image plugin - captioned image\n        'figure.image',\n        // Mediaembed plugin\n        'div[data-ephox-embed-iri]',\n        // Pageembed plugin\n        'div.tiny-pageembed',\n        // Tableofcontents plugin\n        'div.mce-toc',\n        'div[data-mce-toc]',\n        // Footnootes plugin\n        'div.mce-footnotes'\n    ];\n    const isZeroWidth = (elem) => isText$c(elem) && get$5(elem) === ZWSP$1;\n    const context = (editor, elem, wrapName, nodeName) => parentElement(elem).fold(() => \"skipping\" /* ChildContext.Skipping */, (parent) => {\n        // We used to skip these, but given that they might be representing empty paragraphs, it probably\n        // makes sense to treat them just like text nodes\n        if (nodeName === 'br' || isZeroWidth(elem)) {\n            return \"valid\" /* ChildContext.Valid */;\n        }\n        else if (isAnnotation(elem)) {\n            return \"existing\" /* ChildContext.Existing */;\n        }\n        else if (isCaretNode(elem.dom)) {\n            return \"caret\" /* ChildContext.Caret */;\n        }\n        else if (exists(validBlocks, (selector) => is$2(elem, selector))) {\n            return \"valid-block\" /* ChildContext.ValidBlock */;\n        }\n        else if (!isValid(editor, wrapName, nodeName) || !isValid(editor, name(parent), wrapName)) {\n            return \"invalid-child\" /* ChildContext.InvalidChild */;\n        }\n        else {\n            return \"valid\" /* ChildContext.Valid */;\n        }\n    });\n\n    const applyWordGrab = (editor, rng) => {\n        const r = expandRng(editor.dom, rng, [{ inline: 'span' }]);\n        rng.setStart(r.startContainer, r.startOffset);\n        rng.setEnd(r.endContainer, r.endOffset);\n        editor.selection.setRng(rng);\n    };\n    const applyAnnotation = (elem, masterUId, data, annotationName, decorate, directAnnotation) => {\n        const { uid = masterUId, ...otherData } = data;\n        add$2(elem, annotation());\n        set$5(elem, `${dataAnnotationId()}`, uid);\n        set$5(elem, `${dataAnnotation()}`, annotationName);\n        const { attributes = {}, classes = [] } = decorate(uid, otherData);\n        setAll$1(elem, attributes);\n        add$1(elem, classes);\n        if (directAnnotation) {\n            if (classes.length > 0) {\n                set$5(elem, `${dataAnnotationClasses()}`, classes.join(','));\n            }\n            const attributeNames = keys(attributes);\n            if (attributeNames.length > 0) {\n                set$5(elem, `${dataAnnotationAttributes()}`, attributeNames.join(','));\n            }\n        }\n    };\n    const removeDirectAnnotation = (elem) => {\n        remove$4(elem, annotation());\n        remove$9(elem, `${dataAnnotationId()}`);\n        remove$9(elem, `${dataAnnotation()}`);\n        remove$9(elem, `${dataAnnotationActive()}`);\n        const customAttrNames = getOpt(elem, `${dataAnnotationAttributes()}`).map((names) => names.split(',')).getOr([]);\n        const customClasses = getOpt(elem, `${dataAnnotationClasses()}`).map((names) => names.split(',')).getOr([]);\n        each$e(customAttrNames, (name) => remove$9(elem, name));\n        remove$3(elem, customClasses);\n        remove$9(elem, `${dataAnnotationClasses()}`);\n        remove$9(elem, `${dataAnnotationAttributes()}`);\n    };\n    const makeAnnotation = (eDoc, uid, data, annotationName, decorate) => {\n        const master = SugarElement.fromTag('span', eDoc);\n        applyAnnotation(master, uid, data, annotationName, decorate, false);\n        return master;\n    };\n    const annotate = (editor, rng, uid, annotationName, decorate, data) => {\n        // Setup all the wrappers that are going to be used.\n        const newWrappers = [];\n        // Setup the spans for the comments\n        const master = makeAnnotation(editor.getDoc(), uid, data, annotationName, decorate);\n        // Set the current wrapping element\n        const wrapper = value$1();\n        // Clear the current wrapping element, so that subsequent calls to\n        // getOrOpenWrapper spawns a new one.\n        const finishWrapper = () => {\n            wrapper.clear();\n        };\n        // Get the existing wrapper, or spawn a new one.\n        const getOrOpenWrapper = () => wrapper.get().getOrThunk(() => {\n            const nu = shallow(master);\n            newWrappers.push(nu);\n            wrapper.set(nu);\n            return nu;\n        });\n        const processElements = (elems) => {\n            each$e(elems, processElement);\n        };\n        const processElement = (elem) => {\n            const ctx = context(editor, elem, 'span', name(elem));\n            switch (ctx) {\n                case \"invalid-child\" /* ChildContext.InvalidChild */: {\n                    finishWrapper();\n                    const children = children$2(elem);\n                    processElements(children);\n                    finishWrapper();\n                    break;\n                }\n                case \"valid-block\" /* ChildContext.ValidBlock */: {\n                    finishWrapper();\n                    applyAnnotation(elem, uid, data, annotationName, decorate, true);\n                    break;\n                }\n                case \"valid\" /* ChildContext.Valid */: {\n                    const w = getOrOpenWrapper();\n                    wrap$2(elem, w);\n                    break;\n                }\n            }\n        };\n        const processNodes = (nodes) => {\n            const elems = map$3(nodes, SugarElement.fromDom);\n            processElements(elems);\n        };\n        walk$3(editor.dom, rng, (nodes) => {\n            finishWrapper();\n            processNodes(nodes);\n        });\n        return newWrappers;\n    };\n    const annotateWithBookmark = (editor, name, settings, data) => {\n        editor.undoManager.transact(() => {\n            const selection = editor.selection;\n            const initialRng = selection.getRng();\n            const hasFakeSelection = getCellsFromEditor(editor).length > 0;\n            const masterUid = generate('mce-annotation');\n            if (initialRng.collapsed && !hasFakeSelection) {\n                applyWordGrab(editor, initialRng);\n            }\n            // Even after applying word grab, we could not find a selection. Therefore,\n            // just make a wrapper and insert it at the current cursor\n            if (selection.getRng().collapsed && !hasFakeSelection) {\n                const wrapper = makeAnnotation(editor.getDoc(), masterUid, data, name, settings.decorate);\n                // Put something visible in the marker\n                set$4(wrapper, nbsp);\n                selection.getRng().insertNode(wrapper.dom);\n                selection.select(wrapper.dom);\n            }\n            else {\n                // The bookmark is responsible for splitting the nodes beforehand at the selection points\n                // The \"false\" here means a zero width cursor is NOT put in the bookmark. It seems to be required\n                // to stop an empty paragraph splitting into two paragraphs. Probably a better way exists.\n                preserve(selection, false, () => {\n                    runOnRanges(editor, (selectionRng) => {\n                        annotate(editor, selectionRng, masterUid, name, settings.decorate, data);\n                    });\n                });\n            }\n        });\n    };\n\n    const Annotator = (editor) => {\n        const registry = create$a();\n        setup$D(editor, registry);\n        const changes = setup$E(editor, registry);\n        const isSpan = isTag('span');\n        const removeAnnotations = (elements) => {\n            each$e(elements, (element) => {\n                if (isSpan(element)) {\n                    unwrap(element);\n                }\n                else {\n                    removeDirectAnnotation(element);\n                }\n            });\n        };\n        return {\n            /**\n             * Registers a specific annotator by name\n             *\n             * @method register\n             * @param {String} name the name of the annotation\n             * @param {Object} settings settings for the annotation (e.g. decorate)\n             */\n            register: (name, settings) => {\n                registry.register(name, settings);\n            },\n            /**\n             * Applies the annotation at the current selection using data\n             *\n             * @method annotate\n             * @param {String} name the name of the annotation to apply\n             * @param {Object} data information to pass through to this particular\n             * annotation\n             */\n            annotate: (name, data) => {\n                registry.lookup(name).each((settings) => {\n                    annotateWithBookmark(editor, name, settings, data);\n                });\n            },\n            /**\n             * Executes the specified callback when the current selection matches the annotation or not.\n             *\n             * @method annotationChanged\n             * @param {String} name Name of annotation to listen for\n             * @param {Function} callback Callback with (state, name, and data) fired when the annotation\n             * at the cursor changes. If state if false, data will not be provided.\n             */\n            annotationChanged: (name, callback) => {\n                changes.addListener(name, callback);\n            },\n            /**\n             * Removes any annotations from the current selection that match\n             * the name\n             *\n             * @method remove\n             * @param {String} name the name of the annotation to remove\n             */\n            remove: (name) => {\n                identify(editor, Optional.some(name)).each(({ elements }) => {\n                    /**\n                     * TINY-9399: It is important to keep the bookmarking in the callback\n                     * because it adjusts selection in a way that `identify` function\n                     * cannot retain the selected word.\n                     */\n                    const bookmark = editor.selection.getBookmark();\n                    removeAnnotations(elements);\n                    editor.selection.moveToBookmark(bookmark);\n                });\n            },\n            /**\n             * Removes all annotations that match the specified name from the entire document.\n             *\n             * @method removeAll\n             * @param {String} name the name of the annotation to remove\n             */\n            removeAll: (name) => {\n                const bookmark = editor.selection.getBookmark();\n                each$d(findAll(editor, name), (elements, _) => {\n                    removeAnnotations(elements);\n                });\n                editor.selection.moveToBookmark(bookmark);\n            },\n            /**\n             * Retrieve all the annotations for a given name\n             *\n             * @method getAll\n             * @param {String} name the name of the annotations to retrieve\n             * @return {Object} an index of annotations from uid => DOM nodes\n             */\n            getAll: (name) => {\n                const directory = findAll(editor, name);\n                return map$2(directory, (elems) => map$3(elems, (elem) => elem.dom));\n            }\n        };\n    };\n\n    const announcerContainerId = generate('tiny-aria-announcer');\n    const POLITE_MESSAGE_TTL_MS = 600000; // 10 minutes\n    const CREATE_DELAY_MS = 100; // Delay before creating announcer regions to avoid interfering with screen readers initial announcements.\n    const politeTimestampAttr = 'data-mce-announced-at';\n    const OFFSCREEN_STYLES = {\n        position: 'absolute',\n        left: '-9999px',\n        width: '1px',\n        height: '1px',\n        overflow: 'hidden'\n    };\n    const createRegion = (live) => {\n        const region = SugarElement.fromTag('div');\n        setAll$1(region, {\n            'aria-live': live,\n            'aria-atomic': 'false',\n            'aria-relevant': 'additions'\n        });\n        return region;\n    };\n    const isConnected = (element) => element.dom.isConnected;\n    const createNewState = () => {\n        const container = SugarElement.fromTag('div');\n        const politeRegion = createRegion('polite');\n        const assertiveRegion = createRegion('assertive');\n        set$5(container, 'id', announcerContainerId);\n        setAll(container, OFFSCREEN_STYLES);\n        append$1(container, politeRegion);\n        append$1(container, assertiveRegion);\n        append$1(body(), container);\n        return { container, politeRegion, assertiveRegion };\n    };\n    const cleanupExpiredMessages = (polite, now) => {\n        each$e(children(polite, `div[${politeTimestampAttr}]`), (messageDiv) => {\n            getOpt(messageDiv, politeTimestampAttr)\n                .bind((value) => toInt(value))\n                .filter((announcedAt) => now - announcedAt > POLITE_MESSAGE_TTL_MS)\n                .each(() => remove$8(messageDiv));\n        });\n    };\n    const createAnnouncer = () => {\n        const state = value$1();\n        const mountRegions = async () => {\n            const createNewPendingState = async () => {\n                const promise = new Promise((resolve) => {\n                    const newState = createNewState();\n                    setTimeout(() => resolve(newState), CREATE_DELAY_MS);\n                });\n                state.set(promise);\n                return promise;\n            };\n            return state.get().fold(createNewPendingState, async (existingPromise) => {\n                const { container } = await existingPromise;\n                if (isConnected(container)) {\n                    return existingPromise;\n                }\n                else {\n                    // A concurrent caller may have already replaced the stale state while we awaited.\n                    // The block after the await runs atomically, so reuse that state if present and\n                    // only create a fresh one when the state is still the stale promise we observed.\n                    return state.get().filter((current) => current !== existingPromise).getOrThunk(createNewPendingState);\n                }\n            });\n        };\n        const addMessage = (region, message) => {\n            const now = Date.now();\n            cleanupExpiredMessages(region, now);\n            const messageDiv = SugarElement.fromTag('div');\n            set$5(messageDiv, politeTimestampAttr, String(now));\n            append$1(messageDiv, SugarElement.fromText(message));\n            append$1(region, messageDiv);\n        };\n        const polite = async (message) => {\n            const { politeRegion } = await mountRegions();\n            addMessage(politeRegion, message);\n        };\n        const assertive = async (message) => {\n            const { assertiveRegion } = await mountRegions();\n            addMessage(assertiveRegion, message);\n        };\n        return { polite, assertive };\n    };\n\n    const announcer = createAnnouncer();\n    /**\n     * Announces a message to screen readers via an aria-live region, without shifting focus.\n     *\n     * @method announce\n     * @param {String} message The message to announce to screen readers.\n     * @param {Object} options Optional settings.\n     * @param {Boolean} options.assertive If true, uses aria-live=\"assertive\" instead of polite.\n     * @example\n     * tinymce.dom.AriaAnnouncer.announce('Bold on');\n     * tinymce.dom.AriaAnnouncer.announce('Error occurred', { assertive: true });\n     */\n    const announce = (message, options) => {\n        if (options?.assertive === true) {\n            announcer.assertive(message).catch(noop);\n        }\n        else {\n            announcer.polite(message).catch(noop);\n        }\n    };\n    const AriaAnnouncer = {\n        announce\n    };\n\n    /**\n     * Constructs a new BookmarkManager instance for a specific selection instance.\n     *\n     * @constructor\n     * @method BookmarkManager\n     * @param {tinymce.dom.Selection} selection Selection instance to handle bookmarks for.\n     */\n    const BookmarkManager = (selection) => {\n        return {\n            /**\n             * Returns a bookmark location for the current selection. This bookmark object\n             * can then be used to restore the selection after some content modification to the document.\n             *\n             * @method getBookmark\n             * @param {Number} type Optional state if the bookmark should be simple or not. Default is complex.\n             * @param {Boolean} normalized Optional state that enables you to get a position that it would be after normalization.\n             * @return {Object} Bookmark object, use moveToBookmark with this object to restore the selection.\n             * @example\n             * // Stores a bookmark of the current selection\n             * const bm = tinymce.activeEditor.selection.getBookmark();\n             *\n             * tinymce.activeEditor.setContent(tinymce.activeEditor.getContent() + 'Some new content');\n             *\n             * // Restore the selection bookmark\n             * tinymce.activeEditor.selection.moveToBookmark(bm);\n             */\n            getBookmark: curry(getBookmark$1, selection),\n            /**\n             * Restores the selection to the specified bookmark.\n             *\n             * @method moveToBookmark\n             * @param {Object} bookmark Bookmark to restore selection from.\n             * @example\n             * // Stores a bookmark of the current selection\n             * const bm = tinymce.activeEditor.selection.getBookmark();\n             *\n             * tinymce.activeEditor.setContent(tinymce.activeEditor.getContent() + 'Some new content');\n             *\n             * // Restore the selection bookmark\n             * tinymce.activeEditor.selection.moveToBookmark(bm);\n             */\n            moveToBookmark: curry(moveToBookmark, selection)\n        };\n    };\n    /**\n     * Returns true/false if the specified node is a bookmark node or not.\n     *\n     * @static\n     * @method isBookmarkNode\n     * @param {DOMNode} node DOM Node to check if it's a bookmark node or not.\n     * @return {Boolean} true/false if the node is a bookmark node or not.\n     */\n    BookmarkManager.isBookmarkNode = isBookmarkNode$1;\n\n    const isXYWithinRange = (clientX, clientY, range) => {\n        if (range.collapsed) {\n            return false;\n        }\n        else {\n            return exists(range.getClientRects(), (rect) => containsXY(rect, clientX, clientY));\n        }\n    };\n\n    const clamp$1 = (offset, element) => {\n        const max = isText$c(element) ? get$5(element).length : children$2(element).length + 1;\n        if (offset > max) {\n            return max;\n        }\n        else if (offset < 0) {\n            return 0;\n        }\n        return offset;\n    };\n    const normalizeRng = (rng) => SimSelection.range(rng.start, clamp$1(rng.soffset, rng.start), rng.finish, clamp$1(rng.foffset, rng.finish));\n    const isOrContains = (root, elm) => !isRestrictedNode(elm.dom) && (contains(root, elm) || eq(root, elm));\n    const isRngInRoot = (root) => (rng) => isOrContains(root, rng.start) && isOrContains(root, rng.finish);\n    // TINY-9259: We need to store the selection on Firefox since if the editor is hidden the selection.getRng() api will not work as expected.\n    const shouldStore = (editor) => editor.inline || Env.browser.isFirefox();\n    const nativeRangeToSelectionRange = (r) => SimSelection.range(SugarElement.fromDom(r.startContainer), r.startOffset, SugarElement.fromDom(r.endContainer), r.endOffset);\n    const readRange = (win) => {\n        const selection = win.getSelection();\n        const rng = !selection || selection.rangeCount === 0 ? Optional.none() : Optional.from(selection.getRangeAt(0));\n        return rng.map(nativeRangeToSelectionRange);\n    };\n    const getBookmark = (root) => {\n        const win = defaultView(root);\n        return readRange(win.dom)\n            .filter(isRngInRoot(root));\n    };\n    const validate = (root, bookmark) => Optional.from(bookmark)\n        .filter(isRngInRoot(root))\n        .map(normalizeRng);\n    const bookmarkToNativeRng = (bookmark) => {\n        const rng = document.createRange();\n        try {\n            // Might throw IndexSizeError\n            rng.setStart(bookmark.start.dom, bookmark.soffset);\n            rng.setEnd(bookmark.finish.dom, bookmark.foffset);\n            return Optional.some(rng);\n        }\n        catch {\n            return Optional.none();\n        }\n    };\n    const store = (editor) => {\n        const newBookmark = shouldStore(editor) ? getBookmark(SugarElement.fromDom(editor.getBody())) : Optional.none();\n        editor.bookmark = newBookmark.isSome() ? newBookmark : editor.bookmark;\n    };\n    const getRng = (editor) => {\n        const bookmark = editor.bookmark ? editor.bookmark : Optional.none();\n        return bookmark\n            .bind((x) => validate(SugarElement.fromDom(editor.getBody()), x))\n            .bind(bookmarkToNativeRng);\n    };\n    const restore = (editor) => {\n        getRng(editor).each((rng) => editor.selection.setRng(rng));\n    };\n\n    /**\n     * This class manages the focus/blur state of the editor. This class is needed since some\n     * browsers fire false focus/blur states when the selection is moved to a UI dialog or similar.\n     *\n     * This class will fire two events focus and blur on the editor instances that got affected.\n     * It will also handle the restore of selection when the focus is lost and returned.\n     *\n     * @class tinymce.FocusManager\n     * @private\n     */\n    /**\n     * Returns true if the specified element is part of the UI for example an button or text input.\n     *\n     * @static\n     * @method isEditorUIElement\n     * @param  {Element} elm Element to check if it's part of the UI or not.\n     * @return {Boolean} True/false state if the element is part of the UI or not.\n     */\n    const isEditorUIElement$1 = (elm) => {\n        // Needs to be converted to string since svg can have focus: #6776\n        const className = elm.className.toString();\n        return className.indexOf('tox-') !== -1 || className.indexOf('mce-') !== -1;\n    };\n    const FocusManager = {\n        isEditorUIElement: isEditorUIElement$1\n    };\n\n    /**\n     * Utility class for working with delayed actions like setTimeout.\n     *\n     * @class tinymce.util.Delay\n     */\n    const wrappedSetTimeout = (callback, time) => {\n        if (!isNumber(time)) {\n            time = 0;\n        }\n        return window.setTimeout(callback, time);\n    };\n    const wrappedSetInterval = (callback, time) => {\n        if (!isNumber(time)) {\n            time = 0;\n        }\n        return window.setInterval(callback, time);\n    };\n    const Delay = {\n        /**\n         * Sets a timeout that's similar to the native browser <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/setTimeout\">setTimeout</a>\n         * API, except that it checks if the editor instance is still alive when the callback gets executed.\n         *\n         * @method setEditorTimeout\n         * @param {tinymce.Editor} editor Editor instance to check the removed state on.\n         * @param {Function} callback Callback to execute when timer runs out.\n         * @param {Number} time Optional time to wait before the callback is executed, defaults to 0.\n         * @return {Number} Timeout id number.\n         */\n        setEditorTimeout: (editor, callback, time) => {\n            return wrappedSetTimeout(() => {\n                if (!editor.removed) {\n                    callback();\n                }\n            }, time);\n        },\n        /**\n         * Sets an interval timer that's similar to native browser <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/setInterval\">setInterval</a>\n         * API, except that it checks if the editor instance is still alive when the callback gets executed.\n         *\n         * @method setEditorInterval\n         * @param {Function} callback Callback to execute when interval time runs out.\n         * @param {Number} time Optional time to wait before the callback is executed, defaults to 0.\n         * @return {Number} Timeout id number.\n         */\n        setEditorInterval: (editor, callback, time) => {\n            const timer = wrappedSetInterval(() => {\n                if (!editor.removed) {\n                    callback();\n                }\n                else {\n                    window.clearInterval(timer);\n                }\n            }, time);\n            return timer;\n        }\n    };\n\n    const isManualNodeChange = (e) => {\n        return e.type === 'nodechange' && e.selectionChange;\n    };\n    const registerPageMouseUp = (editor, throttledStore) => {\n        const mouseUpPage = () => {\n            throttledStore.throttle();\n        };\n        DOMUtils.DOM.bind(document, 'mouseup', mouseUpPage);\n        editor.on('remove', () => {\n            DOMUtils.DOM.unbind(document, 'mouseup', mouseUpPage);\n        });\n    };\n    const registerMouseUp = (editor, throttledStore) => {\n        editor.on('mouseup touchend', (_e) => {\n            throttledStore.throttle();\n        });\n    };\n    const registerEditorEvents = (editor, throttledStore) => {\n        registerMouseUp(editor, throttledStore);\n        editor.on('keyup NodeChange AfterSetSelectionRange', (e) => {\n            if (!isManualNodeChange(e)) {\n                store(editor);\n            }\n        });\n    };\n    const register$6 = (editor) => {\n        const throttledStore = first$1(() => {\n            store(editor);\n        }, 0);\n        editor.on('init', () => {\n            if (editor.inline) {\n                registerPageMouseUp(editor, throttledStore);\n            }\n            registerEditorEvents(editor, throttledStore);\n        });\n        editor.on('remove', () => {\n            throttledStore.cancel();\n        });\n    };\n\n    let documentFocusInHandler;\n    const DOM$c = DOMUtils.DOM;\n    const isEditorUIElement = (elm) => {\n        // Since this can be overridden by third party we need to use the API reference here\n        return isElement$7(elm) && FocusManager.isEditorUIElement(elm);\n    };\n    const isEditorContentAreaElement = (elm) => {\n        const classList = elm.classList;\n        if (classList !== undefined) {\n            // tox-edit-area__iframe === iframe container element\n            // mce-content-body === inline body element\n            return classList.contains('tox-edit-area') || classList.contains('tox-edit-area__iframe') || classList.contains('mce-content-body');\n        }\n        else {\n            return false;\n        }\n    };\n    const isUIElement = (editor, elm) => {\n        const customSelector = getCustomUiSelector(editor);\n        const parent = DOM$c.getParent(elm, (elm) => {\n            return (isEditorUIElement(elm) ||\n                (customSelector ? editor.dom.is(elm, customSelector) : false));\n        });\n        return parent !== null;\n    };\n    const getActiveElement = (editor) => {\n        try {\n            const root = getRootNode(SugarElement.fromDom(editor.getElement()));\n            return active(root).fold(() => document.body, (x) => x.dom);\n        }\n        catch {\n            // IE sometimes fails to get the activeElement when resizing table\n            // TODO: Investigate this\n            return document.body;\n        }\n    };\n    const registerEvents$1 = (editorManager, e) => {\n        const editor = e.editor;\n        register$6(editor);\n        const toggleContentAreaOnFocus = (editor, fn) => {\n            // Inline editors have a different approach to highlight the content area on focus\n            if (shouldHighlightOnFocus(editor) && editor.inline !== true) {\n                const contentArea = SugarElement.fromDom(editor.getContainer());\n                fn(contentArea, 'tox-edit-focus');\n            }\n        };\n        editor.on('focusin', () => {\n            const focusedEditor = editorManager.focusedEditor;\n            if (isEditorContentAreaElement(getActiveElement(editor))) {\n                toggleContentAreaOnFocus(editor, add$2);\n            }\n            if (focusedEditor !== editor) {\n                if (focusedEditor) {\n                    focusedEditor.dispatch('blur', { focusedEditor: editor });\n                }\n                editorManager.setActive(editor);\n                editorManager.focusedEditor = editor;\n                editor.dispatch('focus', { blurredEditor: focusedEditor });\n                editor.focus(true);\n            }\n        });\n        editor.on('focusout', () => {\n            Delay.setEditorTimeout(editor, () => {\n                const focusedEditor = editorManager.focusedEditor;\n                // Remove focus highlight when the content area is no longer the active editor element, or if the highlighted editor is not the current focused editor\n                if (!isEditorContentAreaElement(getActiveElement(editor)) || focusedEditor !== editor) {\n                    toggleContentAreaOnFocus(editor, remove$4);\n                }\n                // Still the same editor the blur was outside any editor UI\n                if (!isUIElement(editor, getActiveElement(editor)) && focusedEditor === editor) {\n                    editor.dispatch('blur', { focusedEditor: null });\n                    editorManager.focusedEditor = null;\n                }\n            });\n        });\n        // Check if focus is moved to an element outside the active editor by checking if the target node\n        // isn't within the body of the activeEditor nor a UI element such as a dialog child control\n        if (!documentFocusInHandler) {\n            documentFocusInHandler = (e) => {\n                const activeEditor = editorManager.activeEditor;\n                if (activeEditor) {\n                    getOriginalEventTarget(e).each((target) => {\n                        const elem = target;\n                        if (elem.ownerDocument === document) {\n                            // Fire a blur event if the element isn't a UI element\n                            if (elem !== document.body && !isUIElement(activeEditor, elem) && editorManager.focusedEditor === activeEditor) {\n                                activeEditor.dispatch('blur', { focusedEditor: null });\n                                editorManager.focusedEditor = null;\n                            }\n                        }\n                    });\n                }\n            };\n            DOM$c.bind(document, 'focusin', documentFocusInHandler);\n        }\n    };\n    const unregisterDocumentEvents = (editorManager, e) => {\n        if (editorManager.focusedEditor === e.editor) {\n            editorManager.focusedEditor = null;\n        }\n        if (!editorManager.activeEditor && documentFocusInHandler) {\n            DOM$c.unbind(document, 'focusin', documentFocusInHandler);\n            documentFocusInHandler = null;\n        }\n    };\n    const setup$C = (editorManager) => {\n        editorManager.on('AddEditor', curry(registerEvents$1, editorManager));\n        editorManager.on('RemoveEditor', curry(unregisterDocumentEvents, editorManager));\n    };\n\n    const getContentEditableHost = (editor, node) => editor.dom.getParent(node, (node) => editor.dom.getContentEditable(node) === 'true');\n    const hasContentEditableFalseParent$1 = (editor, node) => editor.dom.getParent(node, (node) => editor.dom.getContentEditable(node) === 'false') !== null;\n    const getCollapsedNode = (rng) => rng.collapsed ? Optional.from(getNode$1(rng.startContainer, rng.startOffset)).map(SugarElement.fromDom) : Optional.none();\n    const getFocusInElement = (root, rng) => getCollapsedNode(rng).bind((node) => {\n        if (isTableSection(node)) {\n            return Optional.some(node);\n        }\n        else if (!contains(root, node)) {\n            return Optional.some(root);\n        }\n        else {\n            return Optional.none();\n        }\n    });\n    const normalizeSelection = (editor, rng) => {\n        getFocusInElement(SugarElement.fromDom(editor.getBody()), rng).bind((elm) => {\n            return firstPositionIn(elm.dom);\n        }).fold(() => {\n            editor.selection.normalize();\n        }, (caretPos) => editor.selection.setRng(caretPos.toRange()));\n    };\n    const focusBody = (body, preventScroll = false) => {\n        if (preventScroll) {\n            body.focus({ preventScroll: true });\n            return;\n        }\n        if (body.setActive) {\n            // IE 11 sometimes throws \"Invalid function\" then fallback to focus\n            // setActive is better since it doesn't scroll to the element being focused\n            try {\n                body.setActive();\n            }\n            catch {\n                body.focus();\n            }\n        }\n        else {\n            body.focus();\n        }\n    };\n    const hasElementFocus = (elm) => hasFocus$1(elm) || search(elm).isSome();\n    const hasIframeFocus = (editor) => isNonNullable(editor.iframeElement) && hasFocus$1(SugarElement.fromDom(editor.iframeElement));\n    const hasInlineFocus = (editor) => {\n        const rawBody = editor.getBody();\n        return rawBody && hasElementFocus(SugarElement.fromDom(rawBody));\n    };\n    const hasUiFocus = (editor) => {\n        const dos = getRootNode(SugarElement.fromDom(editor.getElement()));\n        // Editor container is the obvious one (Menubar, Toolbar, Status bar, Sidebar) and dialogs and menus are in an auxiliary element (silver theme specific)\n        // This can't use Focus.search() because only the theme has this element reference\n        return active(dos)\n            .filter((elem) => !isEditorContentAreaElement(elem.dom) && isUIElement(editor, elem.dom))\n            .isSome();\n    };\n    const hasFocus = (editor) => editor.inline ? hasInlineFocus(editor) : hasIframeFocus(editor);\n    const hasEditorOrUiFocus = (editor) => hasFocus(editor) || hasUiFocus(editor);\n    const focusEditor = (editor, preventScroll) => {\n        const selection = editor.selection;\n        const body = editor.getBody();\n        let rng = selection.getRng();\n        editor.quirks.refreshContentEditable();\n        const restoreBookmark = (editor) => {\n            getRng(editor).each((bookmarkRng) => {\n                editor.selection.setRng(bookmarkRng);\n                rng = bookmarkRng;\n            });\n        };\n        if (!hasFocus(editor) && editor.hasEditableRoot()) {\n            restoreBookmark(editor);\n        }\n        // Move focus to contentEditable=true child if needed\n        const contentEditableHost = getContentEditableHost(editor, selection.getNode());\n        if (contentEditableHost && editor.dom.isChildOf(contentEditableHost, body)) {\n            if (!hasContentEditableFalseParent$1(editor, contentEditableHost)) {\n                focusBody(body, preventScroll);\n            }\n            focusBody(contentEditableHost, preventScroll);\n            if (!editor.hasEditableRoot()) {\n                restoreBookmark(editor);\n            }\n            normalizeSelection(editor, rng);\n            activateEditor(editor);\n            return;\n        }\n        // Focus the window iframe\n        if (!editor.inline) {\n            // WebKit needs this call to fire focusin event properly see #5948\n            focusBody(body, preventScroll);\n            if (preventScroll) {\n                if (isNonNullable(editor.iframeElement)) {\n                    editor.iframeElement.focus({ preventScroll: true });\n                }\n            }\n            else {\n                editor.getWin().focus();\n            }\n        }\n        // Focus the body as well since it's contentEditable\n        if (Env.browser.isFirefox() || editor.inline) {\n            focusBody(body, preventScroll);\n            normalizeSelection(editor, rng);\n        }\n        activateEditor(editor);\n    };\n    const activateEditor = (editor) => editor.editorManager.setActive(editor);\n    const normalizeFocusOptions = (args) => {\n        if (isNonNullable(args) && !isBoolean(args)) {\n            return args;\n        }\n        return { scrollToSelection: true };\n    };\n    const focus = (editor, args) => {\n        if (editor.removed) {\n            return;\n        }\n        if (args === true) {\n            activateEditor(editor);\n            return;\n        }\n        const options = normalizeFocusOptions(args);\n        focusEditor(editor, options.scrollToSelection === false);\n    };\n\n    /**\n     * This file exposes a set of the common KeyCodes for use. Please grow it as needed.\n     */\n    const VK = {\n        BACKSPACE: 8,\n        DELETE: 46,\n        DOWN: 40,\n        ENTER: 13,\n        ESC: 27,\n        LEFT: 37,\n        RIGHT: 39,\n        SPACEBAR: 32,\n        TAB: 9,\n        UP: 38,\n        PAGE_UP: 33,\n        PAGE_DOWN: 34,\n        END: 35,\n        HOME: 36,\n        modifierPressed: (e) => {\n            return e.shiftKey || e.ctrlKey || e.altKey || VK.metaKeyPressed(e);\n        },\n        metaKeyPressed: (e) => {\n            // Check if ctrl or meta key is pressed. Edge case for AltGr on Windows where it produces ctrlKey+altKey states\n            return Env.os.isMacOS() || Env.os.isiOS() ? e.metaKey : e.ctrlKey && !e.altKey;\n        }\n    };\n\n    const elementSelectionAttr = 'data-mce-selected';\n    const controlElmSelector = `table,img,figure.image,hr,video,span.mce-preview-object,details,${ucVideoNodeName}`;\n    const abs = Math.abs;\n    const round$1 = Math.round;\n    // Details about each resize handle how to scale etc\n    const resizeHandles = {\n        // Name: x multiplier, y multiplier, delta size x, delta size y\n        nw: [0, 0, -1, -1],\n        ne: [1, 0, 1, -1],\n        se: [1, 1, 1, 1],\n        sw: [0, 1, -1, 1]\n    };\n    const isTouchEvent = (evt) => evt.type === 'longpress' || evt.type.indexOf('touch') === 0;\n    /**\n     * This class handles control selection of elements. Controls are elements\n     * that can be resized and needs to be selected as a whole. It adds custom resize handles\n     * to all browser engines that support properly disabling the built in resize logic.\n     *\n     * @private\n     * @class tinymce.dom.ControlSelection\n     */\n    const ControlSelection = (selection, editor) => {\n        const dom = editor.dom;\n        const editableDoc = editor.getDoc();\n        const rootDocument = document;\n        const rootElement = editor.getBody();\n        let selectedElm, selectedElmGhost, resizeHelper, selectedHandle, resizeBackdrop;\n        let startX, startY, startW, startH, ratio, resizeStarted;\n        let width;\n        let height;\n        let startScrollWidth;\n        let startScrollHeight;\n        const isImage = (elm) => isNonNullable(elm) && (isImg(elm) || dom.is(elm, 'figure.image'));\n        const isMedia = (elm) => isMedia$2(elm) || dom.hasClass(elm, 'mce-preview-object');\n        const isEventOnImageOutsideRange = (evt, range) => {\n            if (isTouchEvent(evt)) {\n                const touch = evt.touches[0];\n                return isImage(evt.target) && !isXYWithinRange(touch.clientX, touch.clientY, range);\n            }\n            else {\n                return isImage(evt.target) && !isXYWithinRange(evt.clientX, evt.clientY, range);\n            }\n        };\n        const contextMenuSelectImage = (evt) => {\n            const target = evt.target;\n            if (isEventOnImageOutsideRange(evt, editor.selection.getRng()) && !evt.isDefaultPrevented()) {\n                editor.selection.select(target);\n            }\n        };\n        const getResizeTargets = (elm) => {\n            if (dom.hasClass(elm, 'mce-preview-object') && isNonNullable(elm.firstElementChild)) {\n                // When resizing a preview object we need to resize both the original element and the wrapper span\n                return [elm, elm.firstElementChild];\n            }\n            else if (dom.is(elm, 'figure.image')) {\n                return [elm.querySelector('img')];\n            }\n            else {\n                return [elm];\n            }\n        };\n        const isResizable = (elm) => {\n            const selector = getObjectResizing(editor);\n            if (!selector || editor.mode.isReadOnly()) {\n                return false;\n            }\n            if (elm.getAttribute('data-mce-resize') === 'false') {\n                return false;\n            }\n            if (elm === editor.getBody()) {\n                return false;\n            }\n            if (dom.hasClass(elm, 'mce-preview-object') && isNonNullable(elm.firstElementChild)) {\n                return is$2(SugarElement.fromDom(elm.firstElementChild), selector);\n            }\n            else {\n                return is$2(SugarElement.fromDom(elm), selector);\n            }\n        };\n        const createGhostElement = (dom, elm) => {\n            if (isMedia(elm)) {\n                return dom.create('img', { src: Env.transparentSrc });\n            }\n            else if (isTable$2(elm)) {\n                const isNorth = startsWith(selectedHandle.name, 'n');\n                const rowSelect = isNorth ? head : last$2;\n                const tableElm = elm.cloneNode(true);\n                // Get row, remove all height styles\n                rowSelect(dom.select('tr', tableElm)).each((tr) => {\n                    const cells = dom.select('td,th', tr);\n                    dom.setStyle(tr, 'height', null);\n                    each$e(cells, (cell) => dom.setStyle(cell, 'height', null));\n                });\n                return tableElm;\n            }\n            else {\n                return elm.cloneNode(true);\n            }\n        };\n        const setUcVideoSizeProp = (element, name, value) => {\n            // this is needed because otherwise the ghost for `uc-video` is not correctly rendered\n            element[name] = value;\n            const minimumWidth = 400;\n            if (element.width > minimumWidth && !(name === 'width' && value < minimumWidth)) {\n                element[name] = value;\n                dom.setStyle(element, name, value);\n            }\n            else {\n                const valueConsideringMinWidth = name === 'height' ? minimumWidth * (ratio ?? 1) : minimumWidth;\n                element[name] = valueConsideringMinWidth;\n                dom.setStyle(element, name, valueConsideringMinWidth);\n            }\n        };\n        const setSizeProp = (element, name, value) => {\n            if (isNonNullable(value)) {\n                // Resize by using style or attribute\n                const targets = getResizeTargets(element);\n                each$e(targets, (target) => {\n                    if (isUcVideo(target)) {\n                        setUcVideoSizeProp(target, name, value);\n                    }\n                    else {\n                        if (target.style[name] || !editor.schema.isValid(target.nodeName.toLowerCase(), name)) {\n                            dom.setStyle(target, name, value);\n                        }\n                        else {\n                            dom.setAttrib(target, name, '' + value);\n                        }\n                    }\n                });\n            }\n        };\n        const setGhostElmSize = (ghostElm, width, height) => {\n            setSizeProp(ghostElm, 'width', width);\n            setSizeProp(ghostElm, 'height', height);\n        };\n        const resizeGhostElement = (e) => {\n            let deltaX, deltaY, proportional;\n            let resizeHelperX, resizeHelperY;\n            // Calc new width/height\n            deltaX = e.screenX - startX;\n            deltaY = e.screenY - startY;\n            // Calc new size\n            width = deltaX * selectedHandle[2] + startW;\n            height = deltaY * selectedHandle[3] + startH;\n            // Never scale down lower than 5 pixels\n            width = width < 5 ? 5 : width;\n            height = height < 5 ? 5 : height;\n            if ((isImage(selectedElm) || isMedia(selectedElm) || isUcVideo(selectedElm)) && getResizeImgProportional(editor) !== false) {\n                proportional = !VK.modifierPressed(e);\n            }\n            else {\n                proportional = VK.modifierPressed(e);\n            }\n            // Constrain proportions\n            if (proportional) {\n                if (abs(deltaX) > abs(deltaY)) {\n                    height = round$1(width * ratio);\n                    width = round$1(height / ratio);\n                }\n                else {\n                    width = round$1(height / ratio);\n                    height = round$1(width * ratio);\n                }\n            }\n            // Update ghost size\n            setGhostElmSize(selectedElmGhost, width, height);\n            // Update resize helper position\n            resizeHelperX = selectedHandle.startPos.x + deltaX;\n            resizeHelperY = selectedHandle.startPos.y + deltaY;\n            resizeHelperX = resizeHelperX > 0 ? resizeHelperX : 0;\n            resizeHelperY = resizeHelperY > 0 ? resizeHelperY : 0;\n            dom.setStyles(resizeHelper, {\n                left: resizeHelperX,\n                top: resizeHelperY,\n                display: 'block'\n            });\n            resizeHelper.innerHTML = width + ' &times; ' + height;\n            /* TODO: TINY-11702 dom.setStyle() has no effect because the value is NaN\n              // Update ghost X position if needed\n              if (selectedHandle[2] < 0 && selectedElmGhost.clientWidth <= width) {\n                dom.setStyle(selectedElmGhost, 'left', selectedElmX + (startW - width));\n              }\n        \n              // Update ghost Y position if needed\n              if (selectedHandle[3] < 0 && selectedElmGhost.clientHeight <= height) {\n                dom.setStyle(selectedElmGhost, 'top', selectedElmY + (startH - height));\n              }\n            */\n            // Calculate how must overflow we got\n            deltaX = rootElement.scrollWidth - startScrollWidth;\n            deltaY = rootElement.scrollHeight - startScrollHeight;\n            // Re-position the resize helper based on the overflow\n            if (deltaX + deltaY !== 0) {\n                dom.setStyles(resizeHelper, {\n                    left: resizeHelperX - deltaX,\n                    top: resizeHelperY - deltaY\n                });\n            }\n            if (!resizeStarted) {\n                fireObjectResizeStart(editor, selectedElm, startW, startH, 'corner-' + selectedHandle.name);\n                resizeStarted = true;\n            }\n        };\n        const endGhostResize = () => {\n            const wasResizeStarted = resizeStarted;\n            resizeStarted = false;\n            // Set width/height properties\n            if (wasResizeStarted) {\n                setSizeProp(selectedElm, 'width', width);\n                setSizeProp(selectedElm, 'height', height);\n            }\n            dom.unbind(editableDoc, 'mousemove', resizeGhostElement);\n            dom.unbind(editableDoc, 'mouseup', endGhostResize);\n            if (rootDocument !== editableDoc) {\n                dom.unbind(rootDocument, 'mousemove', resizeGhostElement);\n                dom.unbind(rootDocument, 'mouseup', endGhostResize);\n            }\n            // Remove ghost/helper and update resize handle positions\n            dom.remove(selectedElmGhost);\n            dom.remove(resizeHelper);\n            dom.remove(resizeBackdrop);\n            showResizeRect(selectedElm);\n            if (wasResizeStarted) {\n                fireObjectResized(editor, selectedElm, width, height, 'corner-' + selectedHandle.name);\n                dom.setAttrib(selectedElm, 'style', dom.getAttrib(selectedElm, 'style'));\n            }\n            editor.nodeChanged();\n        };\n        const showResizeRect = (targetElm) => {\n            // The throttled call can fire after setContent has replaced the target, leaving\n            // handles bound to the zero-sized geometry of a detached element\n            if (!targetElm.isConnected) {\n                hideResizeRect();\n                return;\n            }\n            unbindResizeHandleEvents();\n            // Get position and size of target\n            const position = dom.getPos(targetElm, rootElement);\n            const selectedElmX = position.x;\n            const selectedElmY = position.y;\n            const rect = targetElm.getBoundingClientRect(); // Fix for Gecko offsetHeight for table with caption\n            const targetWidth = rect.width || (rect.right - rect.left);\n            const targetHeight = rect.height || (rect.bottom - rect.top);\n            // Reset width/height if user selects a new image/table\n            if (selectedElm !== targetElm) {\n                hideResizeRect();\n                selectedElm = targetElm;\n                width = height = 0;\n            }\n            // Makes it possible to disable resizing\n            const e = editor.dispatch('ObjectSelected', { target: targetElm });\n            if (isResizable(targetElm) && !e.isDefaultPrevented()) {\n                each$d(resizeHandles, (handle, name) => {\n                    const startDrag = (e) => {\n                        // Note: We're guaranteed to have at least one target here\n                        const target = getResizeTargets(selectedElm)[0];\n                        startX = e.screenX;\n                        startY = e.screenY;\n                        startW = target.clientWidth;\n                        startH = target.clientHeight;\n                        ratio = startH / startW;\n                        selectedHandle = handle;\n                        selectedHandle.name = name;\n                        selectedHandle.startPos = {\n                            x: targetWidth * handle[0] + selectedElmX,\n                            y: targetHeight * handle[1] + selectedElmY\n                        };\n                        startScrollWidth = rootElement.scrollWidth;\n                        startScrollHeight = rootElement.scrollHeight;\n                        resizeBackdrop = dom.add(rootElement, 'div', {\n                            'class': 'mce-resize-backdrop',\n                            'data-mce-bogus': 'all'\n                        });\n                        dom.setStyles(resizeBackdrop, {\n                            position: 'fixed',\n                            left: '0',\n                            top: '0',\n                            width: '100%',\n                            height: '100%'\n                        });\n                        selectedElmGhost = createGhostElement(dom, selectedElm);\n                        dom.addClass(selectedElmGhost, 'mce-clonedresizable');\n                        dom.setAttrib(selectedElmGhost, 'data-mce-bogus', 'all');\n                        selectedElmGhost.contentEditable = 'false'; // Hides IE move layer cursor\n                        dom.setStyles(selectedElmGhost, {\n                            left: selectedElmX,\n                            top: selectedElmY,\n                            margin: 0\n                        });\n                        // Set initial ghost size\n                        setGhostElmSize(selectedElmGhost, targetWidth, targetHeight);\n                        selectedElmGhost.removeAttribute(elementSelectionAttr);\n                        rootElement.appendChild(selectedElmGhost);\n                        dom.bind(editableDoc, 'mousemove', resizeGhostElement);\n                        dom.bind(editableDoc, 'mouseup', endGhostResize);\n                        if (rootDocument !== editableDoc) {\n                            dom.bind(rootDocument, 'mousemove', resizeGhostElement);\n                            dom.bind(rootDocument, 'mouseup', endGhostResize);\n                        }\n                        resizeHelper = dom.add(rootElement, 'div', {\n                            'class': 'mce-resize-helper',\n                            'data-mce-bogus': 'all'\n                        }, startW + ' &times; ' + startH);\n                    };\n                    // Get existing or render resize handle\n                    let handleElm = dom.get('mceResizeHandle' + name);\n                    if (handleElm) {\n                        dom.remove(handleElm);\n                    }\n                    handleElm = dom.add(rootElement, 'div', {\n                        'id': 'mceResizeHandle' + name,\n                        'data-mce-bogus': 'all',\n                        'class': 'mce-resizehandle',\n                        'unselectable': true,\n                        'style': 'cursor:' + name + '-resize; margin:0; padding:0'\n                    });\n                    dom.bind(handleElm, 'mousedown', (e) => {\n                        e.stopImmediatePropagation();\n                        e.preventDefault();\n                        startDrag(e);\n                    });\n                    handle.elm = handleElm;\n                    // Position element\n                    dom.setStyles(handleElm, {\n                        left: (targetWidth * handle[0] + selectedElmX) - (handleElm.offsetWidth / 2),\n                        top: (targetHeight * handle[1] + selectedElmY) - (handleElm.offsetHeight / 2)\n                    });\n                });\n            }\n            else {\n                hideResizeRect(false);\n            }\n        };\n        // Adaptable so a burst of update requests shows the rect for the most recently\n        // requested element rather than the first, which may since have been detached\n        const throttledShowResizeRect = adaptable(showResizeRect, 0);\n        const hideResizeRect = (removeSelected = true) => {\n            throttledShowResizeRect.cancel();\n            unbindResizeHandleEvents();\n            if (selectedElm && removeSelected) {\n                selectedElm.removeAttribute(elementSelectionAttr);\n            }\n            each$d(resizeHandles, (value, name) => {\n                const handleElm = dom.get('mceResizeHandle' + name);\n                if (handleElm) {\n                    dom.unbind(handleElm);\n                    dom.remove(handleElm);\n                }\n            });\n        };\n        const isChildOrEqual = (node, parent) => dom.isChildOf(node, parent);\n        const updateResizeRect = (e) => {\n            // Ignore all events while resizing, if the editor instance is composing or the editor was removed\n            if (resizeStarted || editor.removed || editor.composing) {\n                return;\n            }\n            const targetElm = e.type === 'mousedown' ? e.target : selection.getNode();\n            const controlElm = closest$4(SugarElement.fromDom(targetElm), controlElmSelector)\n                .map((e) => e.dom)\n                .filter((e) => dom.isEditable(e.parentElement) || (e.nodeName === 'IMG' && dom.isEditable(e)))\n                .getOrUndefined();\n            // Store the original data-mce-selected value or fallback to '1' if not set\n            const selectedValue = isNonNullable(controlElm) ? dom.getAttrib(controlElm, elementSelectionAttr, '1') : '1';\n            // Remove data-mce-selected from all elements since they might have been copied using Ctrl+c/v\n            each$e(dom.select(`img[${elementSelectionAttr}],hr[${elementSelectionAttr}]`), (img) => {\n                img.removeAttribute(elementSelectionAttr);\n            });\n            if (isNonNullable(controlElm) && isChildOrEqual(controlElm, rootElement) && hasEditorOrUiFocus(editor)) {\n                disableGeckoResize();\n                const startElm = selection.getStart(true);\n                if (isChildOrEqual(startElm, controlElm) && isChildOrEqual(selection.getEnd(true), controlElm)) {\n                    // Note: We must ensure the selected attribute is added first before showing the rect so that we don't get any selection flickering\n                    dom.setAttrib(controlElm, elementSelectionAttr, selectedValue);\n                    throttledShowResizeRect.throttle(controlElm);\n                    return;\n                }\n            }\n            hideResizeRect();\n        };\n        const unbindResizeHandleEvents = () => {\n            each$d(resizeHandles, (handle) => {\n                if (handle.elm) {\n                    dom.unbind(handle.elm);\n                    // eslint-disable-next-line @typescript-eslint/no-array-delete\n                    delete handle.elm;\n                }\n            });\n        };\n        const disableGeckoResize = () => {\n            try {\n                // Disable object resizing on Gecko\n                editor.getDoc().execCommand('enableObjectResizing', false, 'false');\n            }\n            catch {\n                // Ignore\n            }\n        };\n        editor.on('init', () => {\n            disableGeckoResize();\n            editor.on('NodeChange ResizeEditor ResizeWindow ResizeContent drop', updateResizeRect);\n            // Update resize rect while typing in a table\n            editor.on('keyup compositionend', (e) => {\n                // Don't update the resize rect while composing since it blows away the IME see: #2710\n                if (selectedElm && selectedElm.nodeName === 'TABLE') {\n                    updateResizeRect(e);\n                }\n            });\n            editor.on('hide blur', hideResizeRect);\n            editor.on('contextmenu longpress', contextMenuSelectImage, true);\n            // Hide rect on focusout since it would float on top of windows otherwise\n            // editor.on('focusout', hideResizeRect);\n        });\n        editor.on('remove', unbindResizeHandleEvents);\n        const destroy = () => {\n            throttledShowResizeRect.cancel();\n            selectedElm = selectedElmGhost = resizeBackdrop = null;\n        };\n        return {\n            isResizable,\n            showResizeRect,\n            hideResizeRect,\n            updateResizeRect,\n            destroy\n        };\n    };\n\n    const fromPoint = (clientX, clientY, doc) => {\n        const win = defaultView(SugarElement.fromDom(doc));\n        return getAtPoint(win.dom, clientX, clientY).map((simRange) => {\n            const rng = doc.createRange();\n            rng.setStart(simRange.start.dom, simRange.soffset);\n            rng.setEnd(simRange.finish.dom, simRange.foffset);\n            return rng;\n        }).getOrUndefined();\n    };\n\n    const isEq$4 = (rng1, rng2) => {\n        return isNonNullable(rng1) && isNonNullable(rng2) &&\n            (rng1.startContainer === rng2.startContainer && rng1.startOffset === rng2.startOffset) &&\n            (rng1.endContainer === rng2.endContainer && rng1.endOffset === rng2.endOffset);\n    };\n\n    const findParent = (node, rootNode, predicate) => {\n        let currentNode = node;\n        while (currentNode && currentNode !== rootNode) {\n            if (predicate(currentNode)) {\n                return currentNode;\n            }\n            currentNode = currentNode.parentNode;\n        }\n        return null;\n    };\n    const hasParent$1 = (node, rootNode, predicate) => findParent(node, rootNode, predicate) !== null;\n    const hasParentWithName = (node, rootNode, name) => hasParent$1(node, rootNode, (node) => node.nodeName === name);\n    const isCeFalseCaretContainer = (node, rootNode) => isCaretContainer$2(node) && !hasParent$1(node, rootNode, isCaretNode);\n    const hasBrBeforeAfter = (dom, node, left) => {\n        const parentNode = node.parentNode;\n        if (parentNode) {\n            const walker = new DomTreeWalker(node, dom.getParent(parentNode, dom.isBlock) || dom.getRoot());\n            let currentNode;\n            while ((currentNode = walker[left ? 'prev' : 'next']())) {\n                if (isBr$7(currentNode)) {\n                    return true;\n                }\n            }\n        }\n        return false;\n    };\n    const isPrevNode = (node, name) => node.previousSibling?.nodeName === name;\n    const hasContentEditableFalseParent = (root, node) => {\n        let currentNode = node;\n        while (currentNode && currentNode !== root) {\n            if (isContentEditableFalse$a(currentNode)) {\n                return true;\n            }\n            currentNode = currentNode.parentNode;\n        }\n        return false;\n    };\n    // Walks the dom left/right to find a suitable text node to move the endpoint into\n    // It will only walk within the current parent block or body and will stop if it hits a block or a BR/IMG\n    const findTextNodeRelative = (dom, isAfterNode, collapsed, left, startNode) => {\n        const body = dom.getRoot();\n        const nonEmptyElementsMap = dom.schema.getNonEmptyElements();\n        const parentNode = startNode.parentNode;\n        let lastInlineElement;\n        let node;\n        if (!parentNode) {\n            return Optional.none();\n        }\n        const parentBlockContainer = dom.getParent(parentNode, dom.isBlock) || body;\n        // Lean left before the BR element if it's the only BR within a block element. Gecko bug: #6680\n        // This: <p><br>|</p> becomes <p>|<br></p>\n        if (left && isBr$7(startNode) && isAfterNode && dom.isEmpty(parentBlockContainer)) {\n            return Optional.some(CaretPosition(parentNode, dom.nodeIndex(startNode)));\n        }\n        // Walk left until we hit a text node we can move to or a block/br/img\n        const walker = new DomTreeWalker(startNode, parentBlockContainer);\n        while ((node = walker[left ? 'prev' : 'next']())) {\n            // Break if we hit a non content editable node\n            if (dom.getContentEditableParent(node) === 'false' || isCeFalseCaretContainer(node, body)) {\n                return Optional.none();\n            }\n            // Found text node that has a length\n            if (isText$b(node) && node.data.length > 0) {\n                if (!hasParentWithName(node, body, 'A')) {\n                    return Optional.some(CaretPosition(node, left ? node.data.length : 0));\n                }\n                return Optional.none();\n            }\n            // Break if we find a block or a BR/IMG/INPUT etc\n            if (dom.isBlock(node) || nonEmptyElementsMap[node.nodeName.toLowerCase()]) {\n                return Optional.none();\n            }\n            lastInlineElement = node;\n        }\n        if (isComment(lastInlineElement)) {\n            return Optional.none();\n        }\n        // Only fetch the last inline element when in caret mode for now\n        if (collapsed && lastInlineElement) {\n            return Optional.some(CaretPosition(lastInlineElement, 0));\n        }\n        return Optional.none();\n    };\n    const normalizeEndPoint = (dom, collapsed, start, rng) => {\n        const body = dom.getRoot();\n        let node;\n        let normalized = false;\n        let container = start ? rng.startContainer : rng.endContainer;\n        let offset = start ? rng.startOffset : rng.endOffset;\n        const isAfterNode = isElement$7(container) && offset === container.childNodes.length;\n        const nonEmptyElementsMap = dom.schema.getNonEmptyElements();\n        let directionLeft = start;\n        if (isCaretContainer$2(container)) {\n            return Optional.none();\n        }\n        if (isElement$7(container) && offset > container.childNodes.length - 1) {\n            directionLeft = false;\n        }\n        // If the container is a document move it to the body element\n        if (isDocument$1(container)) {\n            container = body;\n            offset = 0;\n        }\n        // If the container is body try move it into the closest text node or position\n        if (container === body) {\n            // If start is before/after a image, table etc\n            if (directionLeft) {\n                node = container.childNodes[offset > 0 ? offset - 1 : 0];\n                if (node) {\n                    if (isCaretContainer$2(node)) {\n                        return Optional.none();\n                    }\n                    if (nonEmptyElementsMap[node.nodeName] || isTable$2(node)) {\n                        return Optional.none();\n                    }\n                }\n            }\n            // Resolve the index\n            if (container.hasChildNodes()) {\n                offset = Math.min(!directionLeft && offset > 0 ? offset - 1 : offset, container.childNodes.length - 1);\n                container = container.childNodes[offset];\n                offset = isText$b(container) && isAfterNode ? container.data.length : 0;\n                // Don't normalize non collapsed selections like <p>[a</p><table></table>]\n                if (!collapsed && container === body.lastChild && isTable$2(container)) {\n                    return Optional.none();\n                }\n                if (hasContentEditableFalseParent(body, container) || isCaretContainer$2(container)) {\n                    return Optional.none();\n                }\n                if (isDetails(container)) {\n                    return Optional.none();\n                }\n                // Don't walk into elements that doesn't have any child nodes like a IMG\n                if (container.hasChildNodes() && !isTable$2(container)) {\n                    // Walk the DOM to find a text node to place the caret at or a BR\n                    node = container;\n                    const walker = new DomTreeWalker(container, body);\n                    do {\n                        if (isContentEditableFalse$a(node) || isCaretContainer$2(node)) {\n                            normalized = false;\n                            break;\n                        }\n                        // Found a text node use that position\n                        if (isText$b(node) && node.data.length > 0) {\n                            offset = directionLeft ? 0 : node.data.length;\n                            container = node;\n                            normalized = true;\n                            break;\n                        }\n                        // Found a BR/IMG/PRE element that we can place the caret before\n                        if (nonEmptyElementsMap[node.nodeName.toLowerCase()] && !isTableCellOrCaption(node)) {\n                            offset = dom.nodeIndex(node);\n                            container = node.parentNode;\n                            // Put caret after image and pre tag when moving the end point\n                            if (!directionLeft) {\n                                offset++;\n                            }\n                            normalized = true;\n                            break;\n                        }\n                    } while ((node = (directionLeft ? walker.next() : walker.prev())));\n                }\n            }\n        }\n        // Lean the caret to the left if possible\n        if (collapsed) {\n            // So this: <b>x</b><i>|x</i>\n            // Becomes: <b>x|</b><i>x</i>\n            // Seems that only gecko has issues with this\n            if (isText$b(container) && offset === 0) {\n                findTextNodeRelative(dom, isAfterNode, collapsed, true, container).each((pos) => {\n                    container = pos.container();\n                    offset = pos.offset();\n                    normalized = true;\n                });\n            }\n            // Lean left into empty inline elements when the caret is before a BR\n            // So this: <i><b></b><i>|<br></i>\n            // Becomes: <i><b>|</b><i><br></i>\n            // Seems that only gecko has issues with this.\n            // Special edge case for <p><a>x</a>|<br></p> since we don't want <p><a>x|</a><br></p>\n            if (isElement$7(container)) {\n                node = container.childNodes[offset];\n                // Offset is after the containers last child\n                // then use the previous child for normalization\n                if (!node) {\n                    node = container.childNodes[offset - 1];\n                }\n                if (node && isBr$7(node) && !isPrevNode(node, 'A') &&\n                    !hasBrBeforeAfter(dom, node, false) && !hasBrBeforeAfter(dom, node, true)) {\n                    findTextNodeRelative(dom, isAfterNode, collapsed, true, node).each((pos) => {\n                        container = pos.container();\n                        offset = pos.offset();\n                        normalized = true;\n                    });\n                }\n            }\n        }\n        // Lean the start of the selection right if possible\n        // So this: x[<b>x]</b>\n        // Becomes: x<b>[x]</b>\n        if (directionLeft && !collapsed && isText$b(container) && offset === container.data.length) {\n            findTextNodeRelative(dom, isAfterNode, collapsed, false, container).each((pos) => {\n                container = pos.container();\n                offset = pos.offset();\n                normalized = true;\n            });\n        }\n        return normalized && container ? Optional.some(CaretPosition(container, offset)) : Optional.none();\n    };\n    const normalize$2 = (dom, rng) => {\n        const collapsed = rng.collapsed, normRng = rng.cloneRange();\n        const startPos = CaretPosition.fromRangeStart(rng);\n        normalizeEndPoint(dom, collapsed, true, normRng).each((pos) => {\n            // #TINY-1595: Do not move the caret to previous line\n            if (!collapsed || !CaretPosition.isAbove(startPos, pos)) {\n                normRng.setStart(pos.container(), pos.offset());\n            }\n        });\n        if (!collapsed) {\n            normalizeEndPoint(dom, collapsed, false, normRng).each((pos) => {\n                normRng.setEnd(pos.container(), pos.offset());\n            });\n        }\n        // If it was collapsed then make sure it still is\n        if (collapsed) {\n            normRng.collapse(true);\n        }\n        return isEq$4(rng, normRng) ? Optional.none() : Optional.some(normRng);\n    };\n\n    const splitText = (node, offset) => {\n        return node.splitText(offset);\n    };\n    const split = (rng) => {\n        let startContainer = rng.startContainer, startOffset = rng.startOffset, endContainer = rng.endContainer, endOffset = rng.endOffset;\n        // Handle single text node\n        if (startContainer === endContainer && isText$b(startContainer)) {\n            if (startOffset > 0 && startOffset < startContainer.data.length) {\n                endContainer = splitText(startContainer, startOffset);\n                startContainer = endContainer.previousSibling;\n                if (endOffset > startOffset) {\n                    endOffset = endOffset - startOffset;\n                    const newContainer = splitText(endContainer, endOffset).previousSibling;\n                    startContainer = endContainer = newContainer;\n                    endOffset = newContainer.data.length;\n                    startOffset = 0;\n                }\n                else {\n                    endOffset = 0;\n                }\n            }\n        }\n        else {\n            // Split startContainer text node if needed\n            if (isText$b(startContainer) && startOffset > 0 && startOffset < startContainer.data.length) {\n                startContainer = splitText(startContainer, startOffset);\n                startOffset = 0;\n            }\n            // Split endContainer text node if needed\n            if (isText$b(endContainer) && endOffset > 0 && endOffset < endContainer.data.length) {\n                const newContainer = splitText(endContainer, endOffset).previousSibling;\n                endContainer = newContainer;\n                endOffset = newContainer.data.length;\n            }\n        }\n        return {\n            startContainer,\n            startOffset,\n            endContainer,\n            endOffset\n        };\n    };\n\n    /**\n     * This class contains a few utility methods for ranges.\n     *\n     * @class tinymce.dom.RangeUtils\n     */\n    const RangeUtils = (dom) => {\n        /**\n         * Walks the specified range like object and executes the callback for each sibling collection it finds.\n         *\n         * @private\n         * @method walk\n         * @param {RangeObject} rng Range like object.\n         * @param {Function} callback Callback function to execute for each sibling collection.\n         */\n        const walk = (rng, callback) => {\n            return walk$3(dom, rng, callback);\n        };\n        /**\n         * Splits the specified range at it's start/end points.\n         *\n         * @private\n         * @param {RangeObject} rng Range to split.\n         * @return {RangeObject} Range position object.\n         */\n        const split$1 = split;\n        /**\n         * Normalizes the specified range by finding the closest best suitable caret location.\n         *\n         * @private\n         * @param {Range} rng Range to normalize.\n         * @return {Boolean} True or false if the specified range was normalized or not.\n         */\n        const normalize = (rng) => {\n            return normalize$2(dom, rng).fold(never, (normalizedRng) => {\n                rng.setStart(normalizedRng.startContainer, normalizedRng.startOffset);\n                rng.setEnd(normalizedRng.endContainer, normalizedRng.endOffset);\n                return true;\n            });\n        };\n        /**\n         * Returns a range expanded around the entire word the provided selection was collapsed within.\n         *\n         * @method expand\n         * @param {Range} rng The initial range to work from.\n         * @param {Object} options Optional options provided to the expansion. Defaults to { type: 'word' }\n         * @return {Range} Returns the expanded range.\n         */\n        const expand = (rng, options = { type: 'word' }) => {\n            if (options.type === 'word') {\n                const rangeLike = expandRng(dom, rng, [{ inline: 'span' }], { includeTrailingSpace: false, expandToBlock: false });\n                const newRange = dom.createRng();\n                newRange.setStart(rangeLike.startContainer, rangeLike.startOffset);\n                newRange.setEnd(rangeLike.endContainer, rangeLike.endOffset);\n                return newRange;\n            }\n            return rng;\n        };\n        return {\n            walk,\n            split: split$1,\n            expand,\n            normalize\n        };\n    };\n    /**\n     * Compares two ranges and checks if they are equal.\n     *\n     * @static\n     * @method compareRanges\n     * @param {RangeObject} rng1 First range to compare.\n     * @param {RangeObject} rng2 First range to compare.\n     * @return {Boolean} True or false if the ranges are equal.\n     */\n    RangeUtils.compareRanges = isEq$4;\n    /**\n     * Gets the caret range for the given x/y location.\n     *\n     * @static\n     * @method getCaretRangeFromPoint\n     * @param {Number} clientX X coordinate for range\n     * @param {Number} clientY Y coordinate for range\n     * @param {Document} doc Document that the x and y coordinates are relative to\n     * @returns {Range} Caret range\n     */\n    RangeUtils.getCaretRangeFromPoint = fromPoint;\n    RangeUtils.getSelectedNode = getSelectedNode;\n    RangeUtils.getNode = getNode$1;\n\n    const walkUp = (navigation, doc) => {\n        const frame = navigation.view(doc);\n        return frame.fold(constant([]), (f) => {\n            const parent = navigation.owner(f);\n            const rest = walkUp(navigation, parent);\n            return [f].concat(rest);\n        });\n    };\n    const pathTo = (element, navigation) => {\n        const d = navigation.owner(element);\n        return walkUp(navigation, d);\n    };\n\n    const view = (doc) => {\n        // Only walk up to the document this script is defined in.\n        // This prevents walking up to the parent window when the editor is in an iframe.\n        const element = doc.dom === document ? Optional.none() : Optional.from(doc.dom.defaultView?.frameElement);\n        return element.map(SugarElement.fromDom);\n    };\n    const owner = (element) => documentOrOwner(element);\n\n    var Navigation = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        view: view,\n        owner: owner\n    });\n\n    const find = (element) => {\n        const doc = getDocument();\n        const scroll = get$6(doc);\n        const frames = pathTo(element, Navigation);\n        const offset = viewport(element);\n        const r = foldr(frames, (b, a) => {\n            const loc = viewport(a);\n            return {\n                left: b.left + loc.left,\n                top: b.top + loc.top\n            };\n        }, { left: 0, top: 0 });\n        return SugarPosition(r.left + offset.left + scroll.left, r.top + offset.top + scroll.top);\n    };\n\n    const excludeFromDescend = (element) => name(element) === 'textarea';\n    const fireScrollIntoViewEvent = (editor, data) => {\n        const scrollEvent = editor.dispatch('ScrollIntoView', data);\n        return scrollEvent.isDefaultPrevented();\n    };\n    const fireAfterScrollIntoViewEvent = (editor, data) => {\n        editor.dispatch('AfterScrollIntoView', data);\n    };\n    const descend = (element, offset) => {\n        const children = children$2(element);\n        if (children.length === 0 || excludeFromDescend(element)) {\n            return { element, offset };\n        }\n        else if (offset < children.length && !excludeFromDescend(children[offset])) {\n            return { element: children[offset], offset: 0 };\n        }\n        else {\n            const last = children[children.length - 1];\n            if (excludeFromDescend(last)) {\n                return { element, offset };\n            }\n            else {\n                if (name(last) === 'img') {\n                    return { element: last, offset: 1 };\n                }\n                else if (isText$c(last)) {\n                    return { element: last, offset: get$5(last).length };\n                }\n                else {\n                    return { element: last, offset: children$2(last).length };\n                }\n            }\n        }\n    };\n    const markerInfo = (element, cleanupFun) => {\n        const pos = absolute(element);\n        const height = get$7(element);\n        return {\n            element,\n            bottom: pos.top + height,\n            height,\n            pos,\n            cleanup: cleanupFun\n        };\n    };\n    const createMarker$1 = (element, offset) => {\n        const startPoint = descend(element, offset);\n        const span = SugarElement.fromHtml('<span data-mce-bogus=\"all\" style=\"display: inline-block;\">' + ZWSP$1 + '</span>');\n        before$4(startPoint.element, span);\n        return markerInfo(span, () => remove$8(span));\n    };\n    const elementMarker = (element) => markerInfo(SugarElement.fromDom(element), noop);\n    const withMarker = (editor, f, rng, alignToTop) => {\n        preserveWith(editor, (_s, _e) => applyWithMarker(editor, f, rng, alignToTop), rng);\n    };\n    const withScrollEvents = (editor, doc, f, marker, alignToTop) => {\n        const data = { elm: marker.element.dom, alignToTop };\n        if (fireScrollIntoViewEvent(editor, data)) {\n            return;\n        }\n        const scrollTop = get$6(doc).top;\n        f(editor, doc, scrollTop, marker, alignToTop);\n        fireAfterScrollIntoViewEvent(editor, data);\n    };\n    const applyWithMarker = (editor, f, rng, alignToTop) => {\n        const body = SugarElement.fromDom(editor.getBody());\n        const doc = SugarElement.fromDom(editor.getDoc());\n        reflow(body);\n        const marker = createMarker$1(SugarElement.fromDom(rng.startContainer), rng.startOffset);\n        withScrollEvents(editor, doc, f, marker, alignToTop);\n        marker.cleanup();\n    };\n    const withElement = (editor, element, f, alignToTop) => {\n        const doc = SugarElement.fromDom(editor.getDoc());\n        withScrollEvents(editor, doc, f, elementMarker(element), alignToTop);\n    };\n    const preserveWith = (editor, f, rng) => {\n        const startElement = rng.startContainer;\n        const startOffset = rng.startOffset;\n        const endElement = rng.endContainer;\n        const endOffset = rng.endOffset;\n        f(SugarElement.fromDom(startElement), SugarElement.fromDom(endElement));\n        const newRng = editor.dom.createRng();\n        newRng.setStart(startElement, startOffset);\n        newRng.setEnd(endElement, endOffset);\n        editor.selection.setRng(rng);\n    };\n    const scrollToMarker = (editor, marker, viewHeight, alignToTop, doc) => {\n        const pos = marker.pos;\n        // with default font size 16px font and 1.3 line height (~21px per line),\n        // adding roughly 50% extra space gives about 30px of breathing room ensuring comfortable spacing.\n        const scrollMargin = 30;\n        if (alignToTop) {\n            // When scrolling to top, add margin to the top position\n            to(pos.left, Math.max(0, pos.top - scrollMargin), doc);\n        }\n        else {\n            // The position we want to scroll to is the...\n            // (absolute position of the marker, minus the view height) plus (the height of the marker)\n            // When scrolling to bottom, add margin to ensure content isn't at the very bottom\n            const y = (pos.top - viewHeight) + marker.height + scrollMargin;\n            to(-editor.getBody().getBoundingClientRect().left, y, doc);\n        }\n    };\n    const intoWindowIfNeeded = (editor, doc, scrollTop, viewHeight, marker, alignToTop) => {\n        const viewportBottom = viewHeight + scrollTop;\n        const markerTop = marker.pos.top;\n        const markerBottom = marker.bottom;\n        const largerThanViewport = markerBottom - markerTop >= viewHeight;\n        // above the screen, scroll to top by default\n        if (markerTop < scrollTop) {\n            scrollToMarker(editor, marker, viewHeight, alignToTop !== false, doc);\n            // completely below the screen. Default scroll to the top if element height is larger\n            // than the viewport, otherwise default to scrolling to the bottom\n        }\n        else if (markerTop > viewportBottom) {\n            const align = largerThanViewport ? alignToTop !== false : alignToTop === true;\n            scrollToMarker(editor, marker, viewHeight, align, doc);\n            // partially below the bottom, only scroll if element height is less than viewport\n        }\n        else if (markerBottom > viewportBottom && !largerThanViewport) {\n            scrollToMarker(editor, marker, viewHeight, alignToTop === true, doc);\n        }\n    };\n    const intoWindow = (editor, doc, scrollTop, marker, alignToTop) => {\n        const viewHeight = defaultView(doc).dom.innerHeight;\n        intoWindowIfNeeded(editor, doc, scrollTop, viewHeight, marker, alignToTop);\n    };\n    const intoFrame = (editor, doc, scrollTop, marker, alignToTop) => {\n        const frameViewHeight = defaultView(doc).dom.innerHeight; // height of iframe container\n        // If the position is outside the iframe viewport, scroll to it\n        intoWindowIfNeeded(editor, doc, scrollTop, frameViewHeight, marker, alignToTop);\n        // If the new position is outside the window viewport, scroll to it\n        const op = find(marker.element);\n        const viewportBounds = getBounds(window);\n        if (op.top < viewportBounds.y) {\n            intoView(marker.element, alignToTop !== false);\n        }\n        else if (op.top > viewportBounds.bottom) {\n            intoView(marker.element, alignToTop === true);\n        }\n    };\n    const rangeIntoWindow = (editor, rng, alignToTop) => withMarker(editor, intoWindow, rng, alignToTop);\n    const elementIntoWindow = (editor, element, alignToTop) => withElement(editor, element, intoWindow, alignToTop);\n    const rangeIntoFrame = (editor, rng, alignToTop) => withMarker(editor, intoFrame, rng, alignToTop);\n    const elementIntoFrame = (editor, element, alignToTop) => withElement(editor, element, intoFrame, alignToTop);\n    const scrollElementIntoView = (editor, element, alignToTop) => {\n        const scroller = editor.inline ? elementIntoWindow : elementIntoFrame;\n        scroller(editor, element, alignToTop);\n    };\n    // This method is made to deal with the user pressing enter, it is not useful\n    // if we want for example scroll in content after a paste event.\n    const scrollRangeIntoView = (editor, rng, alignToTop) => {\n        const scroller = editor.inline ? rangeIntoWindow : rangeIntoFrame;\n        scroller(editor, rng, alignToTop);\n    };\n\n    const isEditableRange = (dom, rng) => {\n        if (rng.collapsed) {\n            return dom.isEditable(rng.startContainer);\n        }\n        else {\n            return dom.isEditable(rng.startContainer) && dom.isEditable(rng.endContainer);\n        }\n    };\n\n    const getEndpointElement = (root, rng, start, real, resolve) => {\n        const container = start ? rng.startContainer : rng.endContainer;\n        const offset = start ? rng.startOffset : rng.endOffset;\n        return Optional.from(container)\n            .map(SugarElement.fromDom)\n            .map((elm) => !real || !rng.collapsed ? child$1(elm, resolve(elm, offset)).getOr(elm) : elm)\n            .bind((elm) => isElement$8(elm) ? Optional.some(elm) : parent(elm).filter(isElement$8))\n            .map((elm) => elm.dom)\n            .getOr(root);\n    };\n    const getStart = (root, rng, real = false) => getEndpointElement(root, rng, true, real, (elm, offset) => Math.min(childNodesCount(elm), offset));\n    const getEnd = (root, rng, real = false) => getEndpointElement(root, rng, false, real, (elm, offset) => offset > 0 ? offset - 1 : offset);\n    const skipEmptyTextNodes = (node, forwards) => {\n        const orig = node;\n        while (node && isText$b(node) && node.length === 0) {\n            node = forwards ? node.nextSibling : node.previousSibling;\n        }\n        return node || orig;\n    };\n    const getNode = (root, rng) => {\n        // Range maybe lost after the editor is made visible again\n        if (!rng) {\n            return root;\n        }\n        let startContainer = rng.startContainer;\n        let endContainer = rng.endContainer;\n        const startOffset = rng.startOffset;\n        const endOffset = rng.endOffset;\n        let node = rng.commonAncestorContainer;\n        // Handle selection a image or other control like element such as anchors\n        if (!rng.collapsed) {\n            if (startContainer === endContainer) {\n                if (endOffset - startOffset < 2) {\n                    if (startContainer.hasChildNodes()) {\n                        node = startContainer.childNodes[startOffset];\n                    }\n                }\n            }\n            // If the anchor node is a element instead of a text node then return this element\n            // if (tinymce.isWebKit && sel.anchorNode && sel.anchorNode.nodeType == 1)\n            // return sel.anchorNode.childNodes[sel.anchorOffset];\n            // Handle cases where the selection is immediately wrapped around a node and return that node instead of it's parent.\n            // This happens when you double click an underlined word in FireFox.\n            if (isText$b(startContainer) && isText$b(endContainer)) {\n                if (startContainer.length === startOffset) {\n                    startContainer = skipEmptyTextNodes(startContainer.nextSibling, true);\n                }\n                else {\n                    startContainer = startContainer.parentNode;\n                }\n                if (endOffset === 0) {\n                    endContainer = skipEmptyTextNodes(endContainer.previousSibling, false);\n                }\n                else {\n                    endContainer = endContainer.parentNode;\n                }\n                if (startContainer && startContainer === endContainer) {\n                    node = startContainer;\n                }\n            }\n        }\n        const elm = isText$b(node) ? node.parentNode : node;\n        return isHTMLElement(elm) ? elm : root;\n    };\n    const getSelectedBlocks = (dom, rng, startElm, endElm) => {\n        const selectedBlocks = [];\n        const root = dom.getRoot();\n        const start = dom.getParent(startElm || getStart(root, rng, rng.collapsed), dom.isBlock);\n        const end = dom.getParent(endElm || getEnd(root, rng, rng.collapsed), dom.isBlock);\n        if (start && start !== root) {\n            selectedBlocks.push(start);\n        }\n        if (start && end && start !== end) {\n            let node;\n            const walker = new DomTreeWalker(start, root);\n            while ((node = walker.next()) && node !== end) {\n                if (dom.isBlock(node)) {\n                    selectedBlocks.push(node);\n                }\n            }\n        }\n        if (end && start !== end && end !== root) {\n            selectedBlocks.push(end);\n        }\n        return selectedBlocks;\n    };\n    const select = (dom, node, content) => Optional.from(node).bind((node) => Optional.from(node.parentNode).map((parent) => {\n        const idx = dom.nodeIndex(node);\n        const rng = dom.createRng();\n        rng.setStart(parent, idx);\n        rng.setEnd(parent, idx + 1);\n        // Find first/last text node or BR element\n        if (content) {\n            moveEndPoint(dom, rng, node, true);\n            moveEndPoint(dom, rng, node, false);\n        }\n        return rng;\n    }));\n\n    const processRanges = (editor, ranges) => map$3(ranges, (range) => {\n        const evt = editor.dispatch('GetSelectionRange', { range });\n        return evt.range !== range ? evt.range : range;\n    });\n\n    const typeLookup = {\n        '#text': 3,\n        '#comment': 8,\n        '#cdata': 4,\n        '#pi': 7,\n        '#doctype': 10,\n        '#document-fragment': 11\n    };\n    // Walks the tree left/right\n    const walk$2 = (node, root, prev) => {\n        const startName = prev ? 'lastChild' : 'firstChild';\n        const siblingName = prev ? 'prev' : 'next';\n        // Walk into nodes if it has a start\n        if (node[startName]) {\n            return node[startName];\n        }\n        // Return the sibling if it has one\n        if (node !== root) {\n            let sibling = node[siblingName];\n            if (sibling) {\n                return sibling;\n            }\n            // Walk up the parents to look for siblings\n            for (let parent = node.parent; parent && parent !== root; parent = parent.parent) {\n                sibling = parent[siblingName];\n                if (sibling) {\n                    return sibling;\n                }\n            }\n        }\n        return undefined;\n    };\n    const isEmptyTextNode = (node) => {\n        const text = node.value ?? '';\n        // Non whitespace content\n        if (!isWhitespaceText(text)) {\n            return false;\n        }\n        // Parent is not a span and only spaces or is a span but has styles\n        const parentNode = node.parent;\n        if (parentNode && (parentNode.name !== 'span' || parentNode.attr('style')) && /^[ ]+$/.test(text)) {\n            return false;\n        }\n        return true;\n    };\n    // Check if node contains data-bookmark attribute, name attribute, id attribute or is a named anchor\n    const isNonEmptyElement = (node) => {\n        const isNamedAnchor = node.name === 'a' && !node.attr('href') && node.attr('id');\n        return (node.attr('name') || (node.attr('id') && !node.firstChild) || node.attr('data-mce-bookmark') || isNamedAnchor);\n    };\n    /**\n     * This class is a minimalistic implementation of a DOM like node used by the DomParser class.\n     *\n     * @class tinymce.html.Node\n     * @version 3.4\n     * @example\n     * const node = new tinymce.html.Node('strong', 1);\n     * someRoot.append(node);\n     */\n    class AstNode {\n        /**\n         * Creates a node of a specific type.\n         *\n         * @static\n         * @method create\n         * @param {String} name Name of the node type to create for example \"b\" or \"#text\".\n         * @param {Object} attrs Name/value collection of attributes that will be applied to elements.\n         */\n        static create(name, attrs) {\n            // Create node\n            const node = new AstNode(name, typeLookup[name] || 1);\n            // Add attributes if needed\n            if (attrs) {\n                each$d(attrs, (value, attrName) => {\n                    node.attr(attrName, value);\n                });\n            }\n            return node;\n        }\n        name;\n        type;\n        attributes;\n        value;\n        parent;\n        firstChild;\n        lastChild;\n        next;\n        prev;\n        raw;\n        /**\n         * Constructs a new Node instance.\n         *\n         * @constructor\n         * @method Node\n         * @param {String} name Name of the node type.\n         * @param {Number} type Numeric type representing the node.\n         */\n        constructor(name, type) {\n            this.name = name;\n            this.type = type;\n            if (type === 1) {\n                this.attributes = [];\n                this.attributes.map = {}; // Should be considered internal\n            }\n        }\n        /**\n         * Replaces the current node with the specified one.\n         *\n         * @method replace\n         * @param {tinymce.html.Node} node Node to replace the current node with.\n         * @return {tinymce.html.Node} The old node that got replaced.\n         * @example\n         * someNode.replace(someNewNode);\n         */\n        replace(node) {\n            const self = this;\n            if (node.parent) {\n                node.remove();\n            }\n            self.insert(node, self);\n            self.remove();\n            return self;\n        }\n        attr(name, value) {\n            const self = this;\n            if (!isString(name)) {\n                if (isNonNullable(name)) {\n                    each$d(name, (value, key) => {\n                        self.attr(key, value);\n                    });\n                }\n                return self;\n            }\n            const attrs = self.attributes;\n            if (attrs) {\n                if (value !== undefined) {\n                    // Remove attribute\n                    if (value === null) {\n                        if (name in attrs.map) {\n                            delete attrs.map[name];\n                            let i = attrs.length;\n                            while (i--) {\n                                if (attrs[i].name === name) {\n                                    attrs.splice(i, 1);\n                                    return self;\n                                }\n                            }\n                        }\n                        return self;\n                    }\n                    // Set attribute\n                    if (name in attrs.map) {\n                        // Set attribute\n                        let i = attrs.length;\n                        while (i--) {\n                            if (attrs[i].name === name) {\n                                attrs[i].value = value;\n                                break;\n                            }\n                        }\n                    }\n                    else {\n                        attrs.push({ name, value });\n                    }\n                    attrs.map[name] = value;\n                    return self;\n                }\n                return attrs.map[name];\n            }\n            return undefined;\n        }\n        /**\n         * Does a shallow clones the node into a new node. It will also exclude id attributes since\n         * there should only be one id per document.\n         *\n         * @method clone\n         * @return {tinymce.html.Node} New copy of the original node.\n         * @example\n         * const clonedNode = node.clone();\n         */\n        clone() {\n            const self = this;\n            const clone = new AstNode(self.name, self.type);\n            const selfAttrs = self.attributes;\n            // Clone element attributes\n            if (selfAttrs) {\n                const cloneAttrs = [];\n                cloneAttrs.map = {};\n                for (let i = 0, l = selfAttrs.length; i < l; i++) {\n                    const selfAttr = selfAttrs[i];\n                    // Clone everything except id\n                    if (selfAttr.name !== 'id') {\n                        cloneAttrs[cloneAttrs.length] = { name: selfAttr.name, value: selfAttr.value };\n                        cloneAttrs.map[selfAttr.name] = selfAttr.value;\n                    }\n                }\n                clone.attributes = cloneAttrs;\n            }\n            clone.value = self.value;\n            return clone;\n        }\n        /**\n         * Wraps the node in in another node.\n         *\n         * @method wrap\n         * @example\n         * node.wrap(wrapperNode);\n         */\n        wrap(wrapper) {\n            const self = this;\n            if (self.parent) {\n                self.parent.insert(wrapper, self);\n                wrapper.append(self);\n            }\n            return self;\n        }\n        /**\n         * Unwraps the node in other words it removes the node but keeps the children.\n         *\n         * @method unwrap\n         * @example\n         * node.unwrap();\n         */\n        unwrap() {\n            const self = this;\n            for (let node = self.firstChild; node;) {\n                const next = node.next;\n                self.insert(node, self, true);\n                node = next;\n            }\n            self.remove();\n        }\n        /**\n         * Removes the node from it's parent.\n         *\n         * @method remove\n         * @return {tinymce.html.Node} Current node that got removed.\n         * @example\n         * node.remove();\n         */\n        remove() {\n            const self = this, parent = self.parent, next = self.next, prev = self.prev;\n            if (parent) {\n                if (parent.firstChild === self) {\n                    parent.firstChild = next;\n                    if (next) {\n                        next.prev = null;\n                    }\n                }\n                else if (prev) {\n                    prev.next = next;\n                }\n                if (parent.lastChild === self) {\n                    parent.lastChild = prev;\n                    if (prev) {\n                        prev.next = null;\n                    }\n                }\n                else if (next) {\n                    next.prev = prev;\n                }\n                self.parent = self.next = self.prev = null;\n            }\n            return self;\n        }\n        /**\n         * Appends a new node as a child of the current node.\n         *\n         * @method append\n         * @param {tinymce.html.Node} node Node to append as a child of the current one.\n         * @return {tinymce.html.Node} The node that got appended.\n         * @example\n         * node.append(someNode);\n         */\n        append(node) {\n            const self = this;\n            if (node.parent) {\n                node.remove();\n            }\n            const last = self.lastChild;\n            if (last) {\n                last.next = node;\n                node.prev = last;\n                self.lastChild = node;\n            }\n            else {\n                self.lastChild = self.firstChild = node;\n            }\n            node.parent = self;\n            return node;\n        }\n        /**\n         * Inserts a node at a specific position as a child of this node.\n         *\n         * @method insert\n         * @param {tinymce.html.Node} node Node to insert as a child of this node.\n         * @param {tinymce.html.Node} refNode Reference node to set node before/after.\n         * @param {Boolean} before Optional state to insert the node before the reference node.\n         * @return {tinymce.html.Node} The node that got inserted.\n         * @example\n         * parentNode.insert(newChildNode, oldChildNode);\n         */\n        insert(node, refNode, before) {\n            if (node.parent) {\n                node.remove();\n            }\n            const parent = refNode.parent || this;\n            if (before) {\n                if (refNode === parent.firstChild) {\n                    parent.firstChild = node;\n                }\n                else if (refNode.prev) {\n                    refNode.prev.next = node;\n                }\n                node.prev = refNode.prev;\n                node.next = refNode;\n                refNode.prev = node;\n            }\n            else {\n                if (refNode === parent.lastChild) {\n                    parent.lastChild = node;\n                }\n                else if (refNode.next) {\n                    refNode.next.prev = node;\n                }\n                node.next = refNode.next;\n                node.prev = refNode;\n                refNode.next = node;\n            }\n            node.parent = parent;\n            return node;\n        }\n        /**\n         * Get all descendants by name.\n         *\n         * @method getAll\n         * @param {String} name Name of the descendant nodes to collect.\n         * @return {Array} Array with descendant nodes matching the specified name.\n         */\n        getAll(name) {\n            const self = this;\n            const collection = [];\n            for (let node = self.firstChild; node; node = walk$2(node, self)) {\n                if (node.name === name) {\n                    collection.push(node);\n                }\n            }\n            return collection;\n        }\n        /**\n         * Get all children of this node.\n         *\n         * @method children\n         * @return {Array} Array containing child nodes.\n         */\n        children() {\n            const self = this;\n            const collection = [];\n            for (let node = self.firstChild; node; node = node.next) {\n                collection.push(node);\n            }\n            return collection;\n        }\n        /**\n         * Removes all children of the current node.\n         *\n         * @method empty\n         * @return {tinymce.html.Node} The current node that got cleared.\n         */\n        empty() {\n            const self = this;\n            // Remove all children\n            if (self.firstChild) {\n                const nodes = [];\n                // Collect the children\n                for (let node = self.firstChild; node; node = walk$2(node, self)) {\n                    nodes.push(node);\n                }\n                // Remove the children\n                let i = nodes.length;\n                while (i--) {\n                    const node = nodes[i];\n                    node.parent = node.firstChild = node.lastChild = node.next = node.prev = null;\n                }\n            }\n            self.firstChild = self.lastChild = null;\n            return self;\n        }\n        /**\n         * Returns true/false if the node is to be considered empty or not.\n         *\n         * @method isEmpty\n         * @param {Object} elements Name/value object with elements that are automatically treated as non empty elements.\n         * @param {Object} whitespace Name/value object with elements that are automatically treated whitespace preservables.\n         * @param {Function} predicate Optional predicate that gets called after the other rules determine that the node is empty. Should return true if the node is a content node.\n         * @return {Boolean} true/false if the node is empty or not.\n         * @example\n         * node.isEmpty({ img: true });\n         */\n        isEmpty(elements, whitespace = {}, predicate) {\n            const self = this;\n            let node = self.firstChild;\n            if (isNonEmptyElement(self)) {\n                return false;\n            }\n            if (node) {\n                do {\n                    if (node.type === 1) {\n                        // Ignore bogus elements\n                        if (node.attr('data-mce-bogus')) {\n                            continue;\n                        }\n                        // Keep empty elements like <img />\n                        if (elements[node.name]) {\n                            return false;\n                        }\n                        if (isNonEmptyElement(node)) {\n                            return false;\n                        }\n                    }\n                    // Keep comments\n                    if (node.type === 8) {\n                        return false;\n                    }\n                    // Keep non whitespace text nodes\n                    if (node.type === 3 && !isEmptyTextNode(node)) {\n                        return false;\n                    }\n                    // Keep whitespace preserve elements\n                    if (node.type === 3 && node.parent && whitespace[node.parent.name] && isWhitespaceText(node.value ?? '')) {\n                        return false;\n                    }\n                    // Predicate tells that the node is contents\n                    if (predicate && predicate(node)) {\n                        return false;\n                    }\n                } while ((node = walk$2(node, self)));\n            }\n            return true;\n        }\n        /**\n         * Walks to the next or previous node and returns that node or null if it wasn't found.\n         *\n         * @method walk\n         * @param {Boolean} prev Optional previous node state defaults to false.\n         * @return {tinymce.html.Node} Node that is next to or previous of the current node.\n         */\n        walk(prev) {\n            return walk$2(this, null, prev);\n        }\n    }\n\n    // TINY-10305: Map over array for faster lookup.\n    const unescapedTextParents = Tools.makeMap('NOSCRIPT STYLE SCRIPT XMP IFRAME NOEMBED NOFRAMES PLAINTEXT', ' ');\n    const containsZwsp = (node) => isString(node.nodeValue) && node.nodeValue.includes(ZWSP$1);\n    const getTemporaryNodeSelector = (tempAttrs) => `${tempAttrs.length === 0 ? '' : `${map$3(tempAttrs, (attr) => `[${attr}]`).join(',')},`}[data-mce-bogus=\"all\"]`;\n    const getTemporaryNodes = (tempAttrs, body) => body.querySelectorAll(getTemporaryNodeSelector(tempAttrs));\n    const createZwspCommentWalker = (body) => document.createTreeWalker(body, NodeFilter.SHOW_COMMENT, (node) => containsZwsp(node) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP);\n    const createUnescapedZwspTextWalker = (body) => document.createTreeWalker(body, NodeFilter.SHOW_TEXT, (node) => {\n        if (containsZwsp(node)) {\n            const parent = node.parentNode;\n            return parent && has$2(unescapedTextParents, parent.nodeName) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n        }\n        else {\n            return NodeFilter.FILTER_SKIP;\n        }\n    });\n    const hasZwspComment = (body) => createZwspCommentWalker(body).nextNode() !== null;\n    const hasUnescapedZwspText = (body) => createUnescapedZwspTextWalker(body).nextNode() !== null;\n    const hasTemporaryNode = (tempAttrs, body) => body.querySelector(getTemporaryNodeSelector(tempAttrs)) !== null;\n    const trimTemporaryNodes = (tempAttrs, body) => {\n        each$e(getTemporaryNodes(tempAttrs, body), (elm) => {\n            const element = SugarElement.fromDom(elm);\n            if (get$a(element, 'data-mce-bogus') === 'all') {\n                remove$8(element);\n            }\n            else {\n                each$e(tempAttrs, (attr) => {\n                    if (has$1(element, attr)) {\n                        remove$9(element, attr);\n                    }\n                });\n            }\n        });\n    };\n    const emptyAllNodeValuesInWalker = (walker) => {\n        let curr = walker.nextNode();\n        while (curr !== null) {\n            curr.nodeValue = null;\n            curr = walker.nextNode();\n        }\n    };\n    const emptyZwspComments = compose(emptyAllNodeValuesInWalker, createZwspCommentWalker);\n    const emptyUnescapedZwspTexts = compose(emptyAllNodeValuesInWalker, createUnescapedZwspTextWalker);\n    const trim$1 = (body, tempAttrs) => {\n        const conditionalTrims = [\n            {\n                condition: curry(hasTemporaryNode, tempAttrs),\n                action: curry(trimTemporaryNodes, tempAttrs)\n            },\n            {\n                condition: hasZwspComment,\n                action: emptyZwspComments\n            },\n            {\n                condition: hasUnescapedZwspText,\n                action: emptyUnescapedZwspTexts\n            }\n        ];\n        let trimmed = body;\n        let cloned = false;\n        each$e(conditionalTrims, ({ condition, action }) => {\n            if (condition(trimmed)) {\n                if (!cloned) {\n                    trimmed = body.cloneNode(true);\n                    cloned = true;\n                }\n                action(trimmed);\n            }\n        });\n        return trimmed;\n    };\n\n    const trimEmptyContents = (rootBlock, html) => {\n        const emptyRegExp = new RegExp(`^(<${rootBlock}[^>]*>(&nbsp;|&#160;|\\\\s|\\u00a0|<br \\\\/>|)<\\\\/${rootBlock}>[\\r\\n]*|<br \\\\/>[\\r\\n]*)$`);\n        return html.replace(emptyRegExp, '');\n    };\n    const cleanupBogusElements = (parent) => {\n        const bogusElements = descendants(parent, '[data-mce-bogus]');\n        each$e(bogusElements, (elem) => {\n            const bogusValue = get$a(elem, 'data-mce-bogus');\n            if (bogusValue === 'all') {\n                remove$8(elem);\n            }\n            else if (isBr$6(elem)) {\n                // Need to keep bogus padding brs represented as a zero-width space so that they aren't collapsed by the browser\n                before$4(elem, SugarElement.fromText(zeroWidth));\n                remove$8(elem);\n            }\n            else {\n                unwrap(elem);\n            }\n        });\n    };\n    const cleanupInputNames = (parent) => {\n        const inputs = descendants(parent, 'input');\n        each$e(inputs, (input) => {\n            remove$9(input, 'name');\n        });\n    };\n\n    const getPlainTextContent = (editor, body) => {\n        const doc = editor.getDoc();\n        const dos = getRootNode(SugarElement.fromDom(editor.getBody()));\n        const offscreenDiv = SugarElement.fromTag('div', doc);\n        set$5(offscreenDiv, 'data-mce-bogus', 'all');\n        setAll(offscreenDiv, {\n            position: 'fixed',\n            left: '-9999999px',\n            top: '0'\n        });\n        set$4(offscreenDiv, body.innerHTML);\n        cleanupBogusElements(offscreenDiv);\n        cleanupInputNames(offscreenDiv);\n        // Append the wrapper element so that the browser will evaluate styles when getting the `innerText`\n        const root = getContentContainer(dos);\n        append$1(root, offscreenDiv);\n        const content = trim$2(offscreenDiv.dom.innerText);\n        remove$8(offscreenDiv);\n        return content;\n    };\n    const getContentFromBody = (editor, args, body) => {\n        let content;\n        if (args.format === 'raw') {\n            content = Tools.trim(trim$2(trim$1(body, editor.serializer.getTempAttrs()).innerHTML));\n        }\n        else if (args.format === 'text') {\n            content = getPlainTextContent(editor, body);\n        }\n        else if (args.format === 'tree') {\n            content = editor.serializer.serialize(body, args);\n        }\n        else {\n            content = trimEmptyContents(getForcedRootBlock(editor), editor.serializer.serialize(body, args));\n        }\n        // Trim if not using a whitespace preserve format/element\n        const shouldTrim = args.format !== 'text' && !isWsPreserveElement(SugarElement.fromDom(body));\n        return shouldTrim && isString(content) ? Tools.trim(content) : content;\n    };\n    const getContentInternal = (editor, args) => Optional.from(editor.getBody())\n        .fold(constant(args.format === 'tree' ? new AstNode('body', 11) : ''), (body) => getContentFromBody(editor, args, body));\n\n    /**\n     * This class is used to write HTML tags out it can be used with the Serializer.\n     *\n     * @class tinymce.html.Writer\n     * @version 3.4\n     * @example\n     * const writer = tinymce.html.Writer({ indent: true });\n     * writer.start('node', { attr: 'value' });\n     * writer.end('node');\n     * console.log(writer.getContent());\n     */\n    const makeMap$1 = Tools.makeMap;\n    const Writer = (settings) => {\n        const html = [];\n        settings = settings || {};\n        const indent = settings.indent;\n        const indentBefore = makeMap$1(settings.indent_before || '');\n        const indentAfter = makeMap$1(settings.indent_after || '');\n        const encode = Entities.getEncodeFunc(settings.entity_encoding || 'raw', settings.entities);\n        const htmlOutput = settings.element_format !== 'xhtml';\n        return {\n            /**\n             * Writes a start element, such as `<p id=\"a\">`.\n             *\n             * @method start\n             * @param {String} name Name of the element.\n             * @param {Array} attrs Optional array of objects containing an attribute name and value, or undefined if the element has no attributes.\n             * @param {Boolean} empty Optional empty state if the tag should serialize as a void element. For example: `<img />`\n             */\n            start: (name, attrs, empty) => {\n                if (indent && indentBefore[name] && html.length > 0) {\n                    const value = html[html.length - 1];\n                    if (value.length > 0 && value !== '\\n') {\n                        html.push('\\n');\n                    }\n                }\n                html.push('<', name);\n                if (attrs) {\n                    for (let i = 0, l = attrs.length; i < l; i++) {\n                        const attr = attrs[i];\n                        html.push(' ', attr.name, '=\"', encode(attr.value, true), '\"');\n                    }\n                }\n                if (!empty || htmlOutput) {\n                    html[html.length] = '>';\n                }\n                else {\n                    html[html.length] = ' />';\n                }\n                if (empty && indent && indentAfter[name] && html.length > 0) {\n                    const value = html[html.length - 1];\n                    if (value.length > 0 && value !== '\\n') {\n                        html.push('\\n');\n                    }\n                }\n            },\n            /**\n             * Writes an end element, such as `</p>`.\n             *\n             * @method end\n             * @param {String} name Name of the element.\n             */\n            end: (name) => {\n                let value;\n                /* if (indent && indentBefore[name] && html.length > 0) {\n                  value = html[html.length - 1];\n          \n                  if (value.length > 0 && value !== '\\n')\n                    html.push('\\n');\n                }*/\n                html.push('</', name, '>');\n                if (indent && indentAfter[name] && html.length > 0) {\n                    value = html[html.length - 1];\n                    if (value.length > 0 && value !== '\\n') {\n                        html.push('\\n');\n                    }\n                }\n            },\n            /**\n             * Writes a text node.\n             *\n             * @method text\n             * @param {String} text String to write out.\n             * @param {Boolean} raw Optional raw state. If true, the contents won't get encoded.\n             */\n            text: (text, raw) => {\n                if (text.length > 0) {\n                    html[html.length] = raw ? text : encode(text);\n                }\n            },\n            /**\n             * Writes a cdata node, such as `<![CDATA[data]]>`.\n             *\n             * @method cdata\n             * @param {String} text String to write out inside the cdata.\n             */\n            cdata: (text) => {\n                html.push('<![CDATA[', text, ']]>');\n            },\n            /**\n             * Writes a comment node, such as `<!-- Comment -->`.\n             *\n             * @method comment\n             * @param {String} text String to write out inside the comment.\n             */\n            comment: (text) => {\n                html.push('<!--', text, '-->');\n            },\n            /**\n             * Writes a processing instruction (PI) node, such as `<?xml attr=\"value\" ?>`.\n             *\n             * @method pi\n             * @param {String} name Name of the pi.\n             * @param {String} text String to write out inside the pi.\n             */\n            pi: (name, text) => {\n                if (text) {\n                    html.push('<?', name, ' ', encode(text), '?>');\n                }\n                else {\n                    html.push('<?', name, '?>');\n                }\n                if (indent) {\n                    html.push('\\n');\n                }\n            },\n            /**\n             * Writes a doctype node, such as `<!DOCTYPE data>`.\n             *\n             * @method doctype\n             * @param {String} text String to write out inside the doctype.\n             */\n            doctype: (text) => {\n                html.push('<!DOCTYPE', text, '>', indent ? '\\n' : '');\n            },\n            /**\n             * Resets the internal buffer. For example, if one wants to reuse the writer.\n             *\n             * @method reset\n             */\n            reset: () => {\n                html.length = 0;\n            },\n            /**\n             * Returns the contents that was serialized.\n             *\n             * @method getContent\n             * @return {String} HTML contents that got written down.\n             */\n            getContent: () => {\n                return html.join('').replace(/\\n$/, '');\n            }\n        };\n    };\n\n    /**\n     * This class is used to serialize down the DOM tree into a string using a Writer instance.\n     *\n     * @class tinymce.html.Serializer\n     * @version 3.4\n     * @example\n     * tinymce.html.Serializer().serialize(tinymce.html.DomParser().parse('<p>text</p>'));\n     */\n    const HtmlSerializer = (settings = {}, schema = Schema()) => {\n        const writer = Writer(settings);\n        settings.validate = 'validate' in settings ? settings.validate : true;\n        /**\n         * Serializes the specified node into a string.\n         *\n         * @method serialize\n         * @param {tinymce.html.Node} node Node instance to serialize.\n         * @return {String} String with HTML based on the DOM tree.\n         * @example\n         * tinymce.html.Serializer().serialize(tinymce.html.DomParser().parse('<p>text</p>'));\n         */\n        const serialize = (node) => {\n            const validate = settings.validate;\n            const handlers = {\n                // #text\n                3: (node) => {\n                    writer.text(node.value ?? '', node.raw);\n                },\n                // #comment\n                8: (node) => {\n                    writer.comment(node.value ?? '');\n                },\n                // Processing instruction\n                7: (node) => {\n                    writer.pi(node.name, node.value);\n                },\n                // Doctype\n                10: (node) => {\n                    writer.doctype(node.value ?? '');\n                },\n                // CDATA\n                4: (node) => {\n                    writer.cdata(node.value ?? '');\n                },\n                // Document fragment\n                11: (node) => {\n                    let tempNode = node;\n                    if ((tempNode = tempNode.firstChild)) {\n                        do {\n                            walk(tempNode);\n                        } while ((tempNode = tempNode.next));\n                    }\n                }\n            };\n            writer.reset();\n            const walk = (node) => {\n                const handler = handlers[node.type];\n                if (!handler) {\n                    const name = node.name;\n                    const isEmpty = name in schema.getVoidElements();\n                    let attrs = node.attributes;\n                    // Sort attributes\n                    if (validate && attrs && attrs.length > 1) {\n                        const sortedAttrs = [];\n                        sortedAttrs.map = {};\n                        const elementRule = schema.getElementRule(node.name);\n                        if (elementRule) {\n                            for (let i = 0, l = elementRule.attributesOrder.length; i < l; i++) {\n                                const attrName = elementRule.attributesOrder[i];\n                                if (attrName in attrs.map) {\n                                    const attrValue = attrs.map[attrName];\n                                    sortedAttrs.map[attrName] = attrValue;\n                                    sortedAttrs.push({ name: attrName, value: attrValue });\n                                }\n                            }\n                            for (let i = 0, l = attrs.length; i < l; i++) {\n                                const attrName = attrs[i].name;\n                                if (!(attrName in sortedAttrs.map)) {\n                                    const attrValue = attrs.map[attrName];\n                                    sortedAttrs.map[attrName] = attrValue;\n                                    sortedAttrs.push({ name: attrName, value: attrValue });\n                                }\n                            }\n                            attrs = sortedAttrs;\n                        }\n                    }\n                    writer.start(name, attrs, isEmpty);\n                    if (isNonHtmlElementRootName(name)) {\n                        if (isString(node.value)) {\n                            writer.text(node.value, true);\n                        }\n                        writer.end(name);\n                    }\n                    else {\n                        if (!isEmpty) {\n                            let child = node.firstChild;\n                            if (child) {\n                                // Pre and textarea elements treat the first newline character as optional and will omit it. As such, if the content starts\n                                // with a newline we need to add in an additional newline to prevent the current newline in the value being treated as optional\n                                // See https://html.spec.whatwg.org/multipage/syntax.html#element-restrictions\n                                if ((name === 'pre' || name === 'textarea') && child.type === 3 && child.value?.[0] === '\\n') {\n                                    writer.text('\\n', true);\n                                }\n                                do {\n                                    walk(child);\n                                } while ((child = child.next));\n                            }\n                            writer.end(name);\n                        }\n                    }\n                }\n                else {\n                    handler(node);\n                }\n            };\n            // Serialize element or text nodes and treat all other nodes as fragments\n            if (node.type === 1 && !settings.inner) {\n                walk(node);\n            }\n            else if (node.type === 3) {\n                handlers[3](node);\n            }\n            else {\n                handlers[11](node);\n            }\n            return writer.getContent();\n        };\n        return {\n            serialize\n        };\n    };\n\n    const nonInheritableStyles = new Set();\n    (() => {\n        // TODO: TINY-7326 Figure out what else should go in the nonInheritableStyles list\n        const nonInheritableStylesArr = [\n            'margin', 'margin-left', 'margin-right', 'margin-top', 'margin-bottom',\n            'padding', 'padding-left', 'padding-right', 'padding-top', 'padding-bottom',\n            'border', 'border-width', 'border-style', 'border-color',\n            'background', 'background-attachment', 'background-clip',\n            'background-image', 'background-origin', 'background-position', 'background-repeat', 'background-size',\n            'float', 'position', 'left', 'right', 'top', 'bottom',\n            'z-index', 'display', 'transform',\n            'width', 'max-width', 'min-width', 'height', 'max-height', 'min-height',\n            'overflow', 'overflow-x', 'overflow-y', 'text-overflow', 'vertical-align',\n            'transition', 'transition-delay', 'transition-duration', 'transition-property', 'transition-timing-function'\n        ];\n        each$e(nonInheritableStylesArr, (style) => {\n            nonInheritableStyles.add(style);\n        });\n    })();\n    const conditionalNonInheritableStyles = new Set();\n    (() => {\n        // These styles are only noninheritable when applied to an element with a noninheritable style\n        // For example, background-color is visible on an element with padding, even when children have background-color;\n        // however, when the element has no padding, background-color is either visible or overridden by children\n        const conditionalNonInheritableStylesArr = [\n            'background-color'\n        ];\n        each$e(conditionalNonInheritableStylesArr, (style) => {\n            conditionalNonInheritableStyles.add(style);\n        });\n    })();\n    // TODO: TINY-7326 Figure out what else should be added to the shorthandStyleProps list\n    // Does not include non-inherited shorthand style properties\n    const shorthandStyleProps = ['font', 'text-decoration', 'text-emphasis'];\n    const getStyles$1 = (dom, node) => dom.parseStyle(dom.getAttrib(node, 'style'));\n    const getStyleProps = (dom, node) => keys(getStyles$1(dom, node));\n    const isNonInheritableStyle = (style) => nonInheritableStyles.has(style);\n    const isConditionalNonInheritableStyle = (style) => conditionalNonInheritableStyles.has(style);\n    const hasNonInheritableStyles = (dom, node) => exists(getStyleProps(dom, node), (style) => isNonInheritableStyle(style));\n    const hasConditionalNonInheritableStyles = (dom, node) => hasNonInheritableStyles(dom, node) &&\n        exists(getStyleProps(dom, node), (style) => isConditionalNonInheritableStyle(style));\n    const getLonghandStyleProps = (styles) => filter$5(styles, (style) => exists(shorthandStyleProps, (prop) => startsWith(style, prop)));\n    const hasStyleConflict = (dom, node, parentNode) => {\n        const nodeStyleProps = getStyleProps(dom, node);\n        const parentNodeStyleProps = getStyleProps(dom, parentNode);\n        const valueMismatch = (prop) => {\n            const nodeValue = dom.getStyle(node, prop) ?? '';\n            const parentValue = dom.getStyle(parentNode, prop) ?? '';\n            return isNotEmpty(nodeValue) && isNotEmpty(parentValue) && nodeValue !== parentValue;\n        };\n        return exists(nodeStyleProps, (nodeStyleProp) => {\n            const propExists = (props) => exists(props, (prop) => prop === nodeStyleProp);\n            // If parent has a longhand property e.g. margin-left but the child (node) style is margin, need to get the margin-left value of node to be able to do a proper comparison\n            // This is because getting the style using the key of 'margin' on a 'margin-left' parent would give a string of space separated values or empty string depending on the browser\n            if (!propExists(parentNodeStyleProps) && propExists(shorthandStyleProps)) {\n                const longhandProps = getLonghandStyleProps(parentNodeStyleProps);\n                return exists(longhandProps, valueMismatch);\n            }\n            else {\n                return valueMismatch(nodeStyleProp);\n            }\n        });\n    };\n\n    const isChar = (forward, predicate, pos) => Optional.from(pos.container()).filter(isText$b).exists((text) => {\n        const delta = forward ? 0 : -1;\n        return predicate(text.data.charAt(pos.offset() + delta));\n    });\n    const isBeforeSpace = curry(isChar, true, isWhiteSpace);\n    const isAfterSpace = curry(isChar, false, isWhiteSpace);\n    const isEmptyText = (pos) => {\n        const container = pos.container();\n        return isText$b(container) && (container.data.length === 0 || isZwsp(container.data) && BookmarkManager.isBookmarkNode(container.parentNode));\n    };\n    const matchesElementPosition = (before, predicate) => (pos) => getChildNodeAtRelativeOffset(before ? 0 : -1, pos).filter(predicate).isSome();\n    const isImageBlock = (node) => isImg(node) && get$8(SugarElement.fromDom(node), 'display') === 'block';\n    const isCefNode = (node) => isContentEditableFalse$a(node) && !isBogusAll(node);\n    const isBeforeImageBlock = matchesElementPosition(true, isImageBlock);\n    const isAfterImageBlock = matchesElementPosition(false, isImageBlock);\n    const isBeforeMedia = matchesElementPosition(true, isMedia$2);\n    const isAfterMedia = matchesElementPosition(false, isMedia$2);\n    const isBeforeTable = matchesElementPosition(true, isTable$2);\n    const isAfterTable = matchesElementPosition(false, isTable$2);\n    const isBeforeContentEditableFalse = matchesElementPosition(true, isCefNode);\n    const isAfterContentEditableFalse = matchesElementPosition(false, isCefNode);\n\n    const dropLast = (xs) => xs.slice(0, -1);\n    const parentsUntil = (start, root, predicate) => {\n        if (contains(root, start)) {\n            return dropLast(parents$1(start, (elm) => {\n                return predicate(elm) || eq(elm, root);\n            }));\n        }\n        else {\n            return [];\n        }\n    };\n    const parents = (start, root) => parentsUntil(start, root, never);\n    const parentsAndSelf = (start, root) => [start].concat(parents(start, root));\n\n    const navigateIgnoreEmptyTextNodes = (forward, root, from) => navigateIgnore(forward, root, from, isEmptyText);\n    const isBlock$2 = (schema) => (el) => schema.isBlock(name(el));\n    const getClosestBlock$1 = (root, pos, schema) => find$2(parentsAndSelf(SugarElement.fromDom(pos.container()), root), isBlock$2(schema));\n    const isAtBeforeAfterBlockBoundary = (forward, root, pos, schema) => navigateIgnoreEmptyTextNodes(forward, root.dom, pos)\n        .forall((newPos) => getClosestBlock$1(root, pos, schema).fold(() => !isInSameBlock(newPos, pos, root.dom), (fromBlock) => !isInSameBlock(newPos, pos, root.dom) && contains(fromBlock, SugarElement.fromDom(newPos.container()))));\n    const isAtBlockBoundary = (forward, root, pos, schema) => getClosestBlock$1(root, pos, schema).fold(() => navigateIgnoreEmptyTextNodes(forward, root.dom, pos).forall((newPos) => !isInSameBlock(newPos, pos, root.dom)), (parent) => navigateIgnoreEmptyTextNodes(forward, parent.dom, pos).isNone());\n    const isAtStartOfBlock = curry(isAtBlockBoundary, false);\n    const isAtEndOfBlock = curry(isAtBlockBoundary, true);\n    const isBeforeBlock = curry(isAtBeforeAfterBlockBoundary, false);\n    const isAfterBlock = curry(isAtBeforeAfterBlockBoundary, true);\n\n    const isBr$2 = (pos) => getElementFromPosition(pos).exists(isBr$6);\n    const findBr = (forward, root, pos, schema) => {\n        const parentBlocks = filter$5(parentsAndSelf(SugarElement.fromDom(pos.container()), root), (el) => schema.isBlock(name(el)));\n        const scope = head(parentBlocks).getOr(root);\n        return fromPosition(forward, scope.dom, pos).filter(isBr$2);\n    };\n    const isBeforeBr$1 = (root, pos, schema) => getElementFromPosition(pos).exists(isBr$6) || findBr(true, root, pos, schema).isSome();\n    const isAfterBr = (root, pos, schema) => getElementFromPrevPosition(pos).exists(isBr$6) || findBr(false, root, pos, schema).isSome();\n    const findPreviousBr = curry(findBr, false);\n    const findNextBr = curry(findBr, true);\n\n    const isInMiddleOfText = (pos) => CaretPosition.isTextPosition(pos) && !pos.isAtStart() && !pos.isAtEnd();\n    const getClosestBlock = (root, pos, schema) => {\n        const parentBlocks = filter$5(parentsAndSelf(SugarElement.fromDom(pos.container()), root), (el) => schema.isBlock(name(el)));\n        return head(parentBlocks).getOr(root);\n    };\n    const hasSpaceBefore = (root, pos, schema) => {\n        if (isInMiddleOfText(pos)) {\n            return isAfterSpace(pos);\n        }\n        else {\n            return isAfterSpace(pos) || prevPosition(getClosestBlock(root, pos, schema).dom, pos).exists(isAfterSpace);\n        }\n    };\n    const hasSpaceAfter = (root, pos, schema) => {\n        if (isInMiddleOfText(pos)) {\n            return isBeforeSpace(pos);\n        }\n        else {\n            return isBeforeSpace(pos) || nextPosition(getClosestBlock(root, pos, schema).dom, pos).exists(isBeforeSpace);\n        }\n    };\n    const isPreValue = (value) => contains$2(['pre', 'pre-wrap'], value);\n    const isInPre = (pos) => getElementFromPosition(pos)\n        .bind((elm) => closest$5(elm, isElement$8))\n        .exists((elm) => isPreValue(get$8(elm, 'white-space')));\n    const isAtBeginningOfBody = (root, pos) => prevPosition(root.dom, pos).isNone();\n    const isAtEndOfBody = (root, pos) => nextPosition(root.dom, pos).isNone();\n    const isAtLineBoundary = (root, pos, schema) => (isAtBeginningOfBody(root, pos) ||\n        isAtEndOfBody(root, pos) ||\n        isAtStartOfBlock(root, pos, schema) ||\n        isAtEndOfBlock(root, pos, schema) ||\n        isAfterBr(root, pos, schema) ||\n        isBeforeBr$1(root, pos, schema));\n    const isCefBlock = (node) => isNonNullable(node) && isContentEditableFalse$a(node) && isBlockLike(node);\n    // Check the next/previous element in case it is a cef and the next/previous caret position then would skip it, then check\n    // the next next/previous caret position ( for example in case the next element is a strong, containing a cef ).\n    const isSiblingCefBlock = (root, direction) => (container) => {\n        return isCefBlock(new DomTreeWalker(container, root)[direction]());\n    };\n    const isBeforeCefBlock = (root, pos) => {\n        const nextPos = nextPosition(root.dom, pos).getOr(pos);\n        const isNextCefBlock = isSiblingCefBlock(root.dom, 'next');\n        return pos.isAtEnd() && (isNextCefBlock(pos.container()) || isNextCefBlock(nextPos.container()));\n    };\n    const isAfterCefBlock = (root, pos) => {\n        const prevPos = prevPosition(root.dom, pos).getOr(pos);\n        const isPrevCefBlock = isSiblingCefBlock(root.dom, 'prev');\n        return pos.isAtStart() && (isPrevCefBlock(pos.container()) || isPrevCefBlock(prevPos.container()));\n    };\n    const needsToHaveNbsp = (root, pos, schema) => {\n        if (isInPre(pos)) {\n            return false;\n        }\n        else {\n            return isAtLineBoundary(root, pos, schema) || hasSpaceBefore(root, pos, schema) || hasSpaceAfter(root, pos, schema);\n        }\n    };\n    const needsToBeNbspLeft = (root, pos, schema) => {\n        if (isInPre(pos)) {\n            return false;\n        }\n        else {\n            return isAtStartOfBlock(root, pos, schema) || isBeforeBlock(root, pos, schema) || isAfterBr(root, pos, schema) || hasSpaceBefore(root, pos, schema) || isAfterCefBlock(root, pos);\n        }\n    };\n    const leanRight = (pos) => {\n        const container = pos.container();\n        const offset = pos.offset();\n        if (isText$b(container) && offset < container.data.length) {\n            return CaretPosition(container, offset + 1);\n        }\n        else {\n            return pos;\n        }\n    };\n    const needsToBeNbspRight = (root, pos, schema) => {\n        if (isInPre(pos)) {\n            return false;\n        }\n        else {\n            return isAtEndOfBlock(root, pos, schema) || isAfterBlock(root, pos, schema) || isBeforeBr$1(root, pos, schema) || hasSpaceAfter(root, pos, schema) || isBeforeCefBlock(root, pos);\n        }\n    };\n    const needsToBeNbsp = (root, pos, schema) => needsToBeNbspLeft(root, pos, schema) || needsToBeNbspRight(root, leanRight(pos), schema);\n    const isNbspAt = (text, offset) => isNbsp(text.charAt(offset));\n    const isWhiteSpaceAt = (text, offset) => isWhiteSpace(text.charAt(offset));\n    const hasNbsp = (pos) => {\n        const container = pos.container();\n        return isText$b(container) && contains$1(container.data, nbsp);\n    };\n    const normalizeNbspMiddle = (text) => {\n        const chars = text.split('');\n        return map$3(chars, (chr, i) => {\n            if (isNbsp(chr) && i > 0 && i < chars.length - 1 && isContent(chars[i - 1]) && isContent(chars[i + 1])) {\n                return ' ';\n            }\n            else {\n                return chr;\n            }\n        }).join('');\n    };\n    const normalizeNbspAtStart = (root, node, makeNbsp, schema) => {\n        const text = node.data;\n        const firstPos = CaretPosition(node, 0);\n        if (!makeNbsp && isNbspAt(text, 0) && !needsToBeNbsp(root, firstPos, schema)) {\n            node.data = ' ' + text.slice(1);\n            return true;\n        }\n        else if (makeNbsp && isWhiteSpaceAt(text, 0) && needsToBeNbspLeft(root, firstPos, schema)) {\n            node.data = nbsp + text.slice(1);\n            return true;\n        }\n        else {\n            return false;\n        }\n    };\n    const normalizeNbspInMiddleOfTextNode = (node) => {\n        const text = node.data;\n        const newText = normalizeNbspMiddle(text);\n        if (newText !== text) {\n            node.data = newText;\n            return true;\n        }\n        else {\n            return false;\n        }\n    };\n    const normalizeNbspAtEnd = (root, node, makeNbsp, schema) => {\n        const text = node.data;\n        const lastPos = CaretPosition(node, text.length - 1);\n        if (!makeNbsp && isNbspAt(text, text.length - 1) && !needsToBeNbsp(root, lastPos, schema)) {\n            node.data = text.slice(0, -1) + ' ';\n            return true;\n        }\n        else if (makeNbsp && isWhiteSpaceAt(text, text.length - 1) && needsToBeNbspRight(root, lastPos, schema)) {\n            node.data = text.slice(0, -1) + nbsp;\n            return true;\n        }\n        else {\n            return false;\n        }\n    };\n    const normalizeNbsps$1 = (root, pos, schema) => {\n        const container = pos.container();\n        if (!isText$b(container)) {\n            return Optional.none();\n        }\n        if (hasNbsp(pos)) {\n            const normalized = normalizeNbspAtStart(root, container, false, schema) || normalizeNbspInMiddleOfTextNode(container) || normalizeNbspAtEnd(root, container, false, schema);\n            return someIf(normalized, pos);\n        }\n        else if (needsToBeNbsp(root, pos, schema)) {\n            const normalized = normalizeNbspAtStart(root, container, true, schema) || normalizeNbspAtEnd(root, container, true, schema);\n            return someIf(normalized, pos);\n        }\n        else {\n            return Optional.none();\n        }\n    };\n    const normalizeNbspsInEditor = (editor) => {\n        const root = SugarElement.fromDom(editor.getBody());\n        if (editor.selection.isCollapsed()) {\n            normalizeNbsps$1(root, CaretPosition.fromRangeStart(editor.selection.getRng()), editor.schema).each((pos) => {\n                editor.selection.setRng(pos.toRange());\n            });\n        }\n    };\n\n    const normalize$1 = (node, offset, count, schema) => {\n        if (count === 0) {\n            return;\n        }\n        const elm = SugarElement.fromDom(node);\n        const root = ancestor$5(elm, (el) => schema.isBlock(name(el))).getOr(elm);\n        // Get the whitespace\n        const whitespace = node.data.slice(offset, offset + count);\n        // Determine if we're at the end or start of the content\n        const isEndOfContent = offset + count >= node.data.length && needsToBeNbspRight(root, CaretPosition(node, node.data.length), schema);\n        const isStartOfContent = offset === 0 && needsToBeNbspLeft(root, CaretPosition(node, 0), schema);\n        // Replace the original whitespace with the normalized whitespace content\n        node.replaceData(offset, count, normalize$4(whitespace, 4, isStartOfContent, isEndOfContent));\n    };\n    const normalizeWhitespaceAfter = (node, offset, schema) => {\n        const content = node.data.slice(offset);\n        const whitespaceCount = content.length - lTrim(content).length;\n        normalize$1(node, offset, whitespaceCount, schema);\n    };\n    const normalizeWhitespaceBefore = (node, offset, schema) => {\n        const content = node.data.slice(0, offset);\n        const whitespaceCount = content.length - rTrim(content).length;\n        normalize$1(node, offset - whitespaceCount, whitespaceCount, schema);\n    };\n    const mergeTextNodes = (prevNode, nextNode, schema, normalizeWhitespace, mergeToPrev = true) => {\n        const whitespaceOffset = rTrim(prevNode.data).length;\n        const newNode = mergeToPrev ? prevNode : nextNode;\n        const removeNode = mergeToPrev ? nextNode : prevNode;\n        // Merge the elements\n        if (mergeToPrev) {\n            newNode.appendData(removeNode.data);\n        }\n        else {\n            newNode.insertData(0, removeNode.data);\n        }\n        remove$8(SugarElement.fromDom(removeNode));\n        // Normalize the whitespace around the merged elements, to ensure it doesn't get lost\n        if (normalizeWhitespace) {\n            normalizeWhitespaceAfter(newNode, whitespaceOffset, schema);\n        }\n        return newNode;\n    };\n\n    const needsReposition = (pos, elm) => {\n        const container = pos.container();\n        const offset = pos.offset();\n        return !CaretPosition.isTextPosition(pos) && container === elm.parentNode && offset > CaretPosition.before(elm).offset();\n    };\n    const reposition = (elm, pos) => needsReposition(pos, elm) ? CaretPosition(pos.container(), pos.offset() - 1) : pos;\n    const beforeOrStartOf = (node) => isText$b(node) ? CaretPosition(node, 0) : CaretPosition.before(node);\n    const afterOrEndOf = (node) => isText$b(node) ? CaretPosition(node, node.data.length) : CaretPosition.after(node);\n    const getPreviousSiblingCaretPosition = (elm) => {\n        if (isCaretCandidate$3(elm.previousSibling)) {\n            return Optional.some(afterOrEndOf(elm.previousSibling));\n        }\n        else {\n            return elm.previousSibling ? lastPositionIn(elm.previousSibling) : Optional.none();\n        }\n    };\n    const getNextSiblingCaretPosition = (elm) => {\n        if (isCaretCandidate$3(elm.nextSibling)) {\n            return Optional.some(beforeOrStartOf(elm.nextSibling));\n        }\n        else {\n            return elm.nextSibling ? firstPositionIn(elm.nextSibling) : Optional.none();\n        }\n    };\n    const findCaretPositionBackwardsFromElm = (rootElement, elm) => {\n        return Optional.from(elm.previousSibling ? elm.previousSibling : elm.parentNode)\n            .bind((node) => prevPosition(rootElement, CaretPosition.before(node)))\n            .orThunk(() => nextPosition(rootElement, CaretPosition.after(elm)));\n    };\n    const findCaretPositionForwardsFromElm = (rootElement, elm) => nextPosition(rootElement, CaretPosition.after(elm)).orThunk(() => prevPosition(rootElement, CaretPosition.before(elm)));\n    const findCaretPositionBackwards = (rootElement, elm) => getPreviousSiblingCaretPosition(elm).orThunk(() => getNextSiblingCaretPosition(elm))\n        .orThunk(() => findCaretPositionBackwardsFromElm(rootElement, elm));\n    const findCaretPositionForward = (rootElement, elm) => getNextSiblingCaretPosition(elm)\n        .orThunk(() => getPreviousSiblingCaretPosition(elm))\n        .orThunk(() => findCaretPositionForwardsFromElm(rootElement, elm));\n    const findCaretPosition = (forward, rootElement, elm) => forward ? findCaretPositionForward(rootElement, elm) : findCaretPositionBackwards(rootElement, elm);\n    const findCaretPosOutsideElmAfterDelete = (forward, rootElement, elm) => findCaretPosition(forward, rootElement, elm).map(curry(reposition, elm));\n    const setSelection$1 = (editor, forward, pos) => {\n        pos.fold(() => {\n            editor.focus();\n        }, (pos) => {\n            editor.selection.setRng(pos.toRange(), forward);\n        });\n    };\n    const eqRawNode = (rawNode) => (elm) => elm.dom === rawNode;\n    const isBlock$1 = (editor, elm) => elm && has$2(editor.schema.getBlockElements(), name(elm));\n    const paddEmptyBlock = (schema, elm, preserveEmptyCaret) => {\n        if (isEmpty$4(schema, elm)) {\n            const br = SugarElement.fromHtml('<br data-mce-bogus=\"1\">');\n            // Remove all bogus elements except caret\n            if (preserveEmptyCaret) {\n                each$e(children$2(elm), (node) => {\n                    if (!isEmptyCaretFormatElement(node)) {\n                        remove$8(node);\n                    }\n                });\n            }\n            else {\n                empty(elm);\n            }\n            append$1(elm, br);\n            return Optional.some(CaretPosition.before(br.dom));\n        }\n        else {\n            return Optional.none();\n        }\n    };\n    const deleteNormalized = (elm, afterDeletePosOpt, schema, normalizeWhitespace) => {\n        const prevTextOpt = prevSibling(elm).filter(isText$c);\n        const nextTextOpt = nextSibling(elm).filter(isText$c);\n        // Delete the element\n        remove$8(elm);\n        // Merge and normalize any prev/next text nodes, so that they are merged and don't lose meaningful whitespace\n        // eg. <p>a <span></span> b</p> -> <p>a &nsbp;b</p> or <p><span></span> a</p> -> <p>&nbsp;a</a>\n        return lift3(prevTextOpt, nextTextOpt, afterDeletePosOpt, (prev, next, pos) => {\n            const prevNode = prev.dom, nextNode = next.dom;\n            const offset = prevNode.data.length;\n            mergeTextNodes(prevNode, nextNode, schema, normalizeWhitespace);\n            // Update the cursor position if required\n            return pos.container() === nextNode ? CaretPosition(prevNode, offset) : pos;\n        }).orThunk(() => {\n            if (normalizeWhitespace) {\n                prevTextOpt.each((elm) => normalizeWhitespaceBefore(elm.dom, elm.dom.length, schema));\n                nextTextOpt.each((elm) => normalizeWhitespaceAfter(elm.dom, 0, schema));\n            }\n            return afterDeletePosOpt;\n        });\n    };\n    const isInlineElement = (editor, element) => has$2(editor.schema.getTextInlineElements(), name(element));\n    const deleteElement$2 = (editor, forward, elm, moveCaret = true, preserveEmptyCaret = false) => {\n        // Existing delete logic\n        const afterDeletePos = findCaretPosOutsideElmAfterDelete(forward, editor.getBody(), elm.dom);\n        const parentBlock = ancestor$5(elm, curry(isBlock$1, editor), eqRawNode(editor.getBody()));\n        const normalizedAfterDeletePos = deleteNormalized(elm, afterDeletePos, editor.schema, isInlineElement(editor, elm));\n        if (editor.dom.isEmpty(editor.getBody())) {\n            editor.setContent('');\n            editor.selection.setCursorLocation();\n        }\n        else {\n            parentBlock.bind((elm) => paddEmptyBlock(editor.schema, elm, preserveEmptyCaret)).fold(() => {\n                if (moveCaret) {\n                    setSelection$1(editor, forward, normalizedAfterDeletePos);\n                }\n            }, (paddPos) => {\n                if (moveCaret) {\n                    setSelection$1(editor, forward, Optional.some(paddPos));\n                }\n            });\n        }\n    };\n\n    const strongRtl = /[\\u0591-\\u07FF\\uFB1D-\\uFDFF\\uFE70-\\uFEFC]/;\n    const hasStrongRtl = (text) => strongRtl.test(text);\n\n    const isInlineTarget = (editor, elm) => is$2(SugarElement.fromDom(elm), getInlineBoundarySelector(editor))\n        && !isTransparentBlock(editor.schema, elm)\n        && editor.dom.isEditable(elm);\n    const isRtl = (element) => DOMUtils.DOM.getStyle(element, 'direction', true) === 'rtl' || hasStrongRtl(element.textContent ?? '');\n    const findInlineParents = (isInlineTarget, rootNode, pos) => filter$5(DOMUtils.DOM.getParents(pos.container(), '*', rootNode), isInlineTarget);\n    const findRootInline = (isInlineTarget, rootNode, pos) => {\n        const parents = findInlineParents(isInlineTarget, rootNode, pos);\n        return Optional.from(parents[parents.length - 1]);\n    };\n    const hasSameParentBlock = (rootNode, node1, node2) => {\n        const block1 = getParentBlock$3(node1, rootNode);\n        const block2 = getParentBlock$3(node2, rootNode);\n        return isNonNullable(block1) && block1 === block2;\n    };\n    const isAtZwsp = (pos) => isBeforeInline(pos) || isAfterInline(pos);\n    const normalizePosition = (forward, pos) => {\n        const container = pos.container(), offset = pos.offset();\n        if (forward) {\n            if (isCaretContainerInline(container)) {\n                if (isText$b(container.nextSibling)) {\n                    return CaretPosition(container.nextSibling, 0);\n                }\n                else {\n                    return CaretPosition.after(container);\n                }\n            }\n            else {\n                return isBeforeInline(pos) ? CaretPosition(container, offset + 1) : pos;\n            }\n        }\n        else {\n            if (isCaretContainerInline(container)) {\n                if (isText$b(container.previousSibling)) {\n                    return CaretPosition(container.previousSibling, container.previousSibling.data.length);\n                }\n                else {\n                    return CaretPosition.before(container);\n                }\n            }\n            else {\n                return isAfterInline(pos) ? CaretPosition(container, offset - 1) : pos;\n            }\n        }\n    };\n    const normalizeForwards = curry(normalizePosition, true);\n    const normalizeBackwards = curry(normalizePosition, false);\n\n    const execCommandIgnoreInputEvents = (editor, command) => {\n        // We need to prevent the input events from being fired by execCommand when delete is used internally\n        const inputBlocker = (e) => e.stopImmediatePropagation();\n        editor.on('beforeinput input', inputBlocker, true);\n        editor.getDoc().execCommand(command);\n        editor.off('beforeinput input', inputBlocker);\n    };\n    // ASSUMPTION: The editor command 'delete' doesn't have any `beforeinput` and `input` trapping\n    // because those events are only triggered by native contenteditable behaviour.\n    const execEditorDeleteCommand = (editor) => {\n        editor.execCommand('delete');\n    };\n    const execNativeDeleteCommand = (editor) => execCommandIgnoreInputEvents(editor, 'Delete');\n    const execNativeForwardDeleteCommand = (editor) => execCommandIgnoreInputEvents(editor, 'ForwardDelete');\n    const isBeforeRoot = (rootNode) => (elm) => is$4(parent(elm), rootNode, eq);\n    const isTextBlockOrListItem = (element) => isTextBlock$3(element) || isListItem$2(element);\n    const getParentBlock$2 = (rootNode, elm) => {\n        if (contains(rootNode, elm)) {\n            return closest$5(elm, isTextBlockOrListItem, isBeforeRoot(rootNode));\n        }\n        else {\n            return Optional.none();\n        }\n    };\n    const paddEmptyBody = (editor, moveSelection = true) => {\n        if (editor.dom.isEmpty(editor.getBody())) {\n            editor.setContent('', { no_selection: !moveSelection });\n        }\n    };\n    const willDeleteLastPositionInElement = (forward, fromPos, elm) => lift2(firstPositionIn(elm), lastPositionIn(elm), (firstPos, lastPos) => {\n        const normalizedFirstPos = normalizePosition(true, firstPos);\n        const normalizedLastPos = normalizePosition(false, lastPos);\n        const normalizedFromPos = normalizePosition(false, fromPos);\n        if (forward) {\n            return nextPosition(elm, normalizedFromPos).exists((nextPos) => nextPos.isEqual(normalizedLastPos) && fromPos.isEqual(normalizedFirstPos));\n        }\n        else {\n            return prevPosition(elm, normalizedFromPos).exists((prevPos) => prevPos.isEqual(normalizedFirstPos) && fromPos.isEqual(normalizedLastPos));\n        }\n    }).getOr(true);\n    const freefallRtl = (root) => {\n        const child = isComment$1(root) ? prevSibling(root) : lastChild(root);\n        return child.bind(freefallRtl).orThunk(() => Optional.some(root));\n    };\n    const deleteRangeContents = (editor, rng, root, moveSelection = true) => {\n        rng.deleteContents();\n        // Pad the last block node\n        const lastNode = freefallRtl(root).getOr(root);\n        const lastBlock = SugarElement.fromDom(editor.dom.getParent(lastNode.dom, editor.dom.isBlock) ?? root.dom);\n        // If the block is the editor body then we need to insert the root block as well\n        if (lastBlock.dom === editor.getBody()) {\n            paddEmptyBody(editor, moveSelection);\n        }\n        else if (isEmpty$4(editor.schema, lastBlock, { checkRootAsContent: false })) {\n            fillWithPaddingBr(lastBlock);\n            if (moveSelection) {\n                editor.selection.setCursorLocation(lastBlock.dom, 0);\n            }\n        }\n        // Clean up any additional leftover nodes. If the last block wasn't a direct child, then we also need to clean up siblings\n        if (!eq(root, lastBlock)) {\n            const additionalCleanupNodes = is$4(parent(lastBlock), root) ? [] : siblings(lastBlock);\n            each$e(additionalCleanupNodes.concat(children$2(root)), (node) => {\n                if (!eq(node, lastBlock) && !contains(node, lastBlock) && isEmpty$4(editor.schema, node)) {\n                    remove$8(node);\n                }\n            });\n        }\n    };\n\n    const isRootFromElement = (root) => (cur) => eq(root, cur);\n    const getTableCells = (table) => descendants(table, 'td,th');\n    const getTable$1 = (node, isRoot) => getClosestTable(SugarElement.fromDom(node), isRoot);\n    const selectionInTableWithNestedTable = (details) => {\n        return lift2(details.startTable, details.endTable, (startTable, endTable) => {\n            const isStartTableParentOfEndTable = descendant(startTable, (t) => eq(t, endTable));\n            const isEndTableParentOfStartTable = descendant(endTable, (t) => eq(t, startTable));\n            return !isStartTableParentOfEndTable && !isEndTableParentOfStartTable ? details : {\n                ...details,\n                startTable: isStartTableParentOfEndTable ? Optional.none() : details.startTable,\n                endTable: isEndTableParentOfStartTable ? Optional.none() : details.endTable,\n                isSameTable: false,\n                isMultiTable: false\n            };\n        }).getOr(details);\n    };\n    const adjustQuirksInDetails = (details) => {\n        return selectionInTableWithNestedTable(details);\n    };\n    const getTableDetailsFromRange = (rng, isRoot) => {\n        const startTable = getTable$1(rng.startContainer, isRoot);\n        const endTable = getTable$1(rng.endContainer, isRoot);\n        const isStartInTable = startTable.isSome();\n        const isEndInTable = endTable.isSome();\n        // Partial selection - selection is not within the same table\n        const isSameTable = lift2(startTable, endTable, eq).getOr(false);\n        const isMultiTable = !isSameTable && isStartInTable && isEndInTable;\n        return adjustQuirksInDetails({\n            startTable,\n            endTable,\n            isStartInTable,\n            isEndInTable,\n            isSameTable,\n            isMultiTable\n        });\n    };\n\n    const tableCellRng = (start, end) => ({\n        start,\n        end,\n    });\n    const tableSelection = (rng, table, cells) => ({\n        rng,\n        table,\n        cells\n    });\n    const deleteAction = Adt.generate([\n        { singleCellTable: ['rng', 'cell'] },\n        { fullTable: ['table'] },\n        { partialTable: ['cells', 'outsideDetails'] },\n        { multiTable: ['startTableCells', 'endTableCells', 'betweenRng'] },\n    ]);\n    const getClosestCell$1 = (container, isRoot) => closest$4(SugarElement.fromDom(container), 'td,th', isRoot);\n    const isExpandedCellRng = (cellRng) => !eq(cellRng.start, cellRng.end);\n    const getTableFromCellRng = (cellRng, isRoot) => getClosestTable(cellRng.start, isRoot)\n        .bind((startParentTable) => getClosestTable(cellRng.end, isRoot)\n        .bind((endParentTable) => someIf(eq(startParentTable, endParentTable), startParentTable)));\n    const isSingleCellTable = (cellRng, isRoot) => !isExpandedCellRng(cellRng) &&\n        getTableFromCellRng(cellRng, isRoot).exists((table) => {\n            const rows = table.dom.rows;\n            return rows.length === 1 && rows[0].cells.length === 1;\n        });\n    const getCellRng = (rng, isRoot) => {\n        const startCell = getClosestCell$1(rng.startContainer, isRoot);\n        const endCell = getClosestCell$1(rng.endContainer, isRoot);\n        return lift2(startCell, endCell, tableCellRng);\n    };\n    const getCellRangeFromStartTable = (isRoot) => (startCell) => getClosestTable(startCell, isRoot).bind((table) => last$2(getTableCells(table)).map((endCell) => tableCellRng(startCell, endCell)));\n    const getCellRangeFromEndTable = (isRoot) => (endCell) => getClosestTable(endCell, isRoot).bind((table) => head(getTableCells(table)).map((startCell) => tableCellRng(startCell, endCell)));\n    const getTableSelectionFromCellRng = (isRoot) => (cellRng) => getTableFromCellRng(cellRng, isRoot).map((table) => tableSelection(cellRng, table, getTableCells(table)));\n    const getTableSelections = (cellRng, selectionDetails, rng, isRoot) => {\n        if (rng.collapsed || !cellRng.forall(isExpandedCellRng)) {\n            return Optional.none();\n        }\n        else if (selectionDetails.isSameTable) {\n            const sameTableSelection = cellRng.bind(getTableSelectionFromCellRng(isRoot));\n            return Optional.some({\n                start: sameTableSelection,\n                end: sameTableSelection\n            });\n        }\n        else {\n            // Covers partial table selection (either start or end will have a tableSelection) and multitable selection (both start and end will have a tableSelection)\n            const startCell = getClosestCell$1(rng.startContainer, isRoot);\n            const endCell = getClosestCell$1(rng.endContainer, isRoot);\n            const startTableSelection = startCell\n                .bind(getCellRangeFromStartTable(isRoot))\n                .bind(getTableSelectionFromCellRng(isRoot));\n            const endTableSelection = endCell\n                .bind(getCellRangeFromEndTable(isRoot))\n                .bind(getTableSelectionFromCellRng(isRoot));\n            return Optional.some({\n                start: startTableSelection,\n                end: endTableSelection\n            });\n        }\n    };\n    const getCellIndex = (cells, cell) => findIndex$2(cells, (x) => eq(x, cell));\n    const getSelectedCells = (tableSelection) => lift2(getCellIndex(tableSelection.cells, tableSelection.rng.start), getCellIndex(tableSelection.cells, tableSelection.rng.end), (startIndex, endIndex) => tableSelection.cells.slice(startIndex, endIndex + 1));\n    const isSingleCellTableContentSelected = (optCellRng, rng, isRoot) => optCellRng.exists((cellRng) => isSingleCellTable(cellRng, isRoot) && hasAllContentsSelected(cellRng.start, rng));\n    const unselectCells = (rng, selectionDetails) => {\n        const { startTable, endTable } = selectionDetails;\n        const otherContentRng = rng.cloneRange();\n        // If the table is some, it should be unselected (works for single table and multitable cases)\n        startTable.each((table) => otherContentRng.setStartAfter(table.dom));\n        endTable.each((table) => otherContentRng.setEndBefore(table.dom));\n        return otherContentRng;\n    };\n    const handleSingleTable = (cellRng, selectionDetails, rng, isRoot) => getTableSelections(cellRng, selectionDetails, rng, isRoot)\n        .bind(({ start, end }) => start.or(end))\n        .bind((tableSelection) => {\n        const { isSameTable } = selectionDetails;\n        const selectedCells = getSelectedCells(tableSelection).getOr([]);\n        if (isSameTable && tableSelection.cells.length === selectedCells.length) {\n            return Optional.some(deleteAction.fullTable(tableSelection.table));\n        }\n        else if (selectedCells.length > 0) {\n            if (isSameTable) {\n                return Optional.some(deleteAction.partialTable(selectedCells, Optional.none()));\n            }\n            else {\n                const otherContentRng = unselectCells(rng, selectionDetails);\n                return Optional.some(deleteAction.partialTable(selectedCells, Optional.some({\n                    ...selectionDetails,\n                    rng: otherContentRng\n                })));\n            }\n        }\n        else {\n            return Optional.none();\n        }\n    });\n    const handleMultiTable = (cellRng, selectionDetails, rng, isRoot) => getTableSelections(cellRng, selectionDetails, rng, isRoot)\n        .bind(({ start, end }) => {\n        const startTableSelectedCells = start.bind(getSelectedCells).getOr([]);\n        const endTableSelectedCells = end.bind(getSelectedCells).getOr([]);\n        if (startTableSelectedCells.length > 0 && endTableSelectedCells.length > 0) {\n            const otherContentRng = unselectCells(rng, selectionDetails);\n            return Optional.some(deleteAction.multiTable(startTableSelectedCells, endTableSelectedCells, otherContentRng));\n        }\n        else {\n            return Optional.none();\n        }\n    });\n    const getActionFromRange = (root, rng) => {\n        const isRoot = isRootFromElement(root);\n        const optCellRng = getCellRng(rng, isRoot);\n        const selectionDetails = getTableDetailsFromRange(rng, isRoot);\n        if (isSingleCellTableContentSelected(optCellRng, rng, isRoot)) {\n            // SingleCellTable\n            return optCellRng.map((cellRng) => deleteAction.singleCellTable(rng, cellRng.start));\n        }\n        else if (selectionDetails.isMultiTable) {\n            // MultiTable\n            return handleMultiTable(optCellRng, selectionDetails, rng, isRoot);\n        }\n        else {\n            // FullTable, PartialTable with no rng or PartialTable with outside rng\n            return handleSingleTable(optCellRng, selectionDetails, rng, isRoot);\n        }\n    };\n\n    // Reset the contenteditable state and fill the content with a padding br\n    const cleanCells = (cells) => each$e(cells, (cell) => {\n        remove$9(cell, 'contenteditable');\n        fillWithPaddingBr(cell);\n    });\n    const getOutsideBlock = (editor, container) => Optional.from(editor.dom.getParent(container, editor.dom.isBlock)).map(SugarElement.fromDom);\n    const handleEmptyBlock = (editor, startInTable, emptyBlock) => {\n        emptyBlock.each((block) => {\n            if (startInTable) {\n                // Note that we don't need to set the selection as it'll be within the table\n                remove$8(block);\n            }\n            else {\n                // Set the cursor location as it'll move when filling with padding\n                fillWithPaddingBr(block);\n                editor.selection.setCursorLocation(block.dom, 0);\n            }\n        });\n    };\n    const deleteContentInsideCell = (editor, cell, rng, isFirstCellInSelection) => {\n        const insideTableRng = rng.cloneRange();\n        if (isFirstCellInSelection) {\n            insideTableRng.setStart(rng.startContainer, rng.startOffset);\n            insideTableRng.setEndAfter(cell.dom.lastChild);\n        }\n        else {\n            insideTableRng.setStartBefore(cell.dom.firstChild);\n            insideTableRng.setEnd(rng.endContainer, rng.endOffset);\n        }\n        deleteCellContents(editor, insideTableRng, cell, false).each((action) => action());\n    };\n    const collapseAndRestoreCellSelection = (editor) => {\n        const selectedCells = getCellsFromEditor(editor);\n        const selectedNode = SugarElement.fromDom(editor.selection.getNode());\n        if (isTableCell$3(selectedNode.dom) && isEmpty$4(editor.schema, selectedNode)) {\n            editor.selection.setCursorLocation(selectedNode.dom, 0);\n        }\n        else {\n            editor.selection.collapse(true);\n        }\n        // Restore the data-mce-selected attribute if multiple cells were selected, as if it was a cef element\n        // then selection overrides would remove it as it was using an offscreen selection clone.\n        if (selectedCells.length > 1 && exists(selectedCells, (cell) => eq(cell, selectedNode))) {\n            set$5(selectedNode, 'data-mce-selected', '1');\n        }\n    };\n    /*\n     * Runs when\n     * - the start and end of the selection is contained within the same table (called directly from deleteRange)\n     * - part of a table and content outside is selected\n     */\n    const emptySingleTableCells = (editor, cells, outsideDetails) => Optional.some(() => {\n        const editorRng = editor.selection.getRng();\n        const cellsToClean = outsideDetails.bind(({ rng, isStartInTable }) => {\n            /*\n             * Delete all content outside of the table that is in the selection\n             * - Get the outside block before deleting the contents\n             * - Delete the contents outside\n             * - Handle the block outside the table if it is empty since rng.deleteContents leaves it\n             */\n            const outsideBlock = getOutsideBlock(editor, isStartInTable ? rng.endContainer : rng.startContainer);\n            rng.deleteContents();\n            handleEmptyBlock(editor, isStartInTable, outsideBlock.filter(curry(isEmpty$4, editor.schema)));\n            /*\n             * The only time we can have only part of the cell contents selected is when part of the selection\n             * is outside the table (otherwise we use the Darwin fake selection, which always selects entire cells),\n             * in which case we need to delete the contents inside and check if the entire contents of the cell have been deleted.\n             *\n             * Note: The endPointCell is the only cell which may have only part of its contents selected.\n             */\n            const endPointCell = isStartInTable ? cells[0] : cells[cells.length - 1];\n            deleteContentInsideCell(editor, endPointCell, editorRng, isStartInTable);\n            if (!isEmpty$4(editor.schema, endPointCell)) {\n                return Optional.some(isStartInTable ? cells.slice(1) : cells.slice(0, -1));\n            }\n            else {\n                return Optional.none();\n            }\n        }).getOr(cells);\n        // Remove content from cells we need to clean\n        cleanCells(cellsToClean);\n        // Collapse the original selection after deleting everything\n        collapseAndRestoreCellSelection(editor);\n    });\n    /*\n     * Runs when the start of the selection is in a table and the end of the selection is in another table\n     */\n    const emptyMultiTableCells = (editor, startTableCells, endTableCells, betweenRng) => Optional.some(() => {\n        const rng = editor.selection.getRng();\n        const startCell = startTableCells[0];\n        const endCell = endTableCells[endTableCells.length - 1];\n        deleteContentInsideCell(editor, startCell, rng, true);\n        deleteContentInsideCell(editor, endCell, rng, false);\n        // Only clean empty cells, the first and last cells have the potential to still have content\n        const startTableCellsToClean = isEmpty$4(editor.schema, startCell) ? startTableCells : startTableCells.slice(1);\n        const endTableCellsToClean = isEmpty$4(editor.schema, endCell) ? endTableCells : endTableCells.slice(0, -1);\n        cleanCells(startTableCellsToClean.concat(endTableCellsToClean));\n        // Delete all content in between the start table and end table\n        betweenRng.deleteContents();\n        // This will collapse the selection into the cell of the start table\n        collapseAndRestoreCellSelection(editor);\n    });\n    // Delete the contents of a range inside a cell. Runs on tables that are a single cell or partial selections that need to be cleaned up.\n    const deleteCellContents = (editor, rng, cell, moveSelection = true) => Optional.some(() => {\n        deleteRangeContents(editor, rng, cell, moveSelection);\n    });\n    const deleteTableElement = (editor, table) => Optional.some(() => deleteElement$2(editor, false, table));\n    const deleteCellRange = (editor, rootElm, rng) => getActionFromRange(rootElm, rng)\n        .bind((action) => action.fold(curry(deleteCellContents, editor), curry(deleteTableElement, editor), curry(emptySingleTableCells, editor), curry(emptyMultiTableCells, editor)));\n    const deleteCaptionRange = (editor, caption) => emptyElement(editor, caption);\n    const deleteTableRange = (editor, rootElm, rng, startElm) => getParentCaption(rootElm, startElm).fold(() => deleteCellRange(editor, rootElm, rng), (caption) => deleteCaptionRange(editor, caption));\n    const deleteRange$4 = (editor, startElm, selectedCells) => {\n        const rootNode = SugarElement.fromDom(editor.getBody());\n        const rng = editor.selection.getRng();\n        return selectedCells.length !== 0 ?\n            emptySingleTableCells(editor, selectedCells, Optional.none()) :\n            deleteTableRange(editor, rootNode, rng, startElm);\n    };\n    const getParentCell = (rootElm, elm) => find$2(parentsAndSelf(elm, rootElm), isTableCell$2);\n    const getParentCaption = (rootElm, elm) => find$2(parentsAndSelf(elm, rootElm), isTag('caption'));\n    const deleteBetweenCells = (editor, rootElm, forward, fromCell, from) => \n    // TODO: TINY-8865 - This may not be safe to cast as Node below and alternative solutions need to be looked into\n    navigate(forward, editor.getBody(), from)\n        .bind((to) => getParentCell(rootElm, SugarElement.fromDom(to.getNode()))\n        .bind((toCell) => eq(toCell, fromCell) ? Optional.none() : Optional.some(noop)));\n    const emptyElement = (editor, elm) => Optional.some(() => {\n        fillWithPaddingBr(elm);\n        editor.selection.setCursorLocation(elm.dom, 0);\n    });\n    const isDeleteOfLastCharPos = (fromCaption, forward, from, to) => firstPositionIn(fromCaption.dom).bind((first) => lastPositionIn(fromCaption.dom).map((last) => forward ?\n        from.isEqual(first) && to.isEqual(last) :\n        from.isEqual(last) && to.isEqual(first))).getOr(true);\n    const emptyCaretCaption = (editor, elm) => emptyElement(editor, elm);\n    const validateCaretCaption = (rootElm, fromCaption, to) => \n    // TODO: TINY-8865 - This may not be safe to cast as Node below and alternative solutions need to be looked into\n    getParentCaption(rootElm, SugarElement.fromDom(to.getNode()))\n        .fold(() => Optional.some(noop), (toCaption) => someIf(!eq(toCaption, fromCaption), noop));\n    const deleteCaretInsideCaption = (editor, rootElm, forward, fromCaption, from) => navigate(forward, editor.getBody(), from).fold(() => Optional.some(noop), (to) => isDeleteOfLastCharPos(fromCaption, forward, from, to) ?\n        emptyCaretCaption(editor, fromCaption) :\n        validateCaretCaption(rootElm, fromCaption, to));\n    const deleteCaretCells = (editor, forward, rootElm, startElm) => {\n        const from = CaretPosition.fromRangeStart(editor.selection.getRng());\n        return getParentCell(rootElm, startElm).bind((fromCell) => isEmpty$4(editor.schema, fromCell, { checkRootAsContent: false }) ?\n            emptyElement(editor, fromCell) :\n            deleteBetweenCells(editor, rootElm, forward, fromCell, from));\n    };\n    const deleteCaretCaption = (editor, forward, rootElm, fromCaption) => {\n        const from = CaretPosition.fromRangeStart(editor.selection.getRng());\n        return isEmpty$4(editor.schema, fromCaption) ?\n            emptyElement(editor, fromCaption) :\n            deleteCaretInsideCaption(editor, rootElm, forward, fromCaption, from);\n    };\n    const isNearTable = (forward, pos) => forward ? isBeforeTable(pos) : isAfterTable(pos);\n    const isBeforeOrAfterTable = (editor, forward) => {\n        const fromPos = CaretPosition.fromRangeStart(editor.selection.getRng());\n        return isNearTable(forward, fromPos) || fromPosition(forward, editor.getBody(), fromPos)\n            .exists((pos) => isNearTable(forward, pos));\n    };\n    const deleteCaret$3 = (editor, forward, startElm) => {\n        const rootElm = SugarElement.fromDom(editor.getBody());\n        return getParentCaption(rootElm, startElm).fold(() => deleteCaretCells(editor, forward, rootElm, startElm)\n            .orThunk(() => someIf(isBeforeOrAfterTable(editor, forward), noop)), (fromCaption) => deleteCaretCaption(editor, forward, rootElm, fromCaption));\n    };\n    const backspaceDelete$d = (editor, forward) => {\n        const startElm = SugarElement.fromDom(editor.selection.getStart(true));\n        const cells = getCellsFromEditor(editor);\n        return editor.selection.isCollapsed() && cells.length === 0 ?\n            deleteCaret$3(editor, forward, startElm) :\n            deleteRange$4(editor, startElm, cells);\n    };\n\n    const getContentEditableRoot$1 = (root, node) => {\n        let tempNode = node;\n        while (tempNode && tempNode !== root) {\n            if (isContentEditableTrue$3(tempNode) || isContentEditableFalse$a(tempNode)) {\n                return tempNode;\n            }\n            tempNode = tempNode.parentNode;\n        }\n        return null;\n    };\n\n    const internalAttributesPrefixes = [\n        'data-ephox-',\n        'data-mce-',\n        'data-alloy-',\n        'data-snooker-',\n        '_'\n    ];\n    /**\n     * Utility class for various element specific functions.\n     *\n     * @private\n     * @class tinymce.dom.ElementUtils\n     */\n    const each$9 = Tools.each;\n    const ElementUtils = (editor) => {\n        const dom = editor.dom;\n        const internalAttributes = new Set(editor.serializer.getTempAttrs());\n        /**\n         * Compares two nodes and checks if it's attributes and styles matches.\n         * This doesn't compare classes as items since their order is significant.\n         *\n         * @method compare\n         * @param {Node} node1 First node to compare with.\n         * @param {Node} node2 Second node to compare with.\n         * @return {Boolean} True/false if the nodes are the same or not.\n         */\n        const compare = (node1, node2) => {\n            // Not the same name or type\n            if (node1.nodeName !== node2.nodeName || node1.nodeType !== node2.nodeType) {\n                return false;\n            }\n            /**\n             * Returns all the nodes attributes excluding internal ones, styles and classes.\n             *\n             * @private\n             * @param {Node} node Node to get attributes from.\n             * @return {Object} Name/value object with attributes and attribute values.\n             */\n            const getAttribs = (node) => {\n                const attribs = {};\n                each$9(dom.getAttribs(node), (attr) => {\n                    const name = attr.nodeName.toLowerCase();\n                    // Don't compare internal attributes or style\n                    if (name !== 'style' && !isAttributeInternal(name)) {\n                        attribs[name] = dom.getAttrib(node, name);\n                    }\n                });\n                return attribs;\n            };\n            /**\n             * Compares two objects checks if it's key + value exists in the other one.\n             *\n             * @private\n             * @param {Object} obj1 First object to compare.\n             * @param {Object} obj2 Second object to compare.\n             * @return {Boolean} True/false if the objects matches or not.\n             */\n            const compareObjects = (obj1, obj2) => {\n                for (const name in obj1) {\n                    // Obj1 has item obj2 doesn't have\n                    if (has$2(obj1, name)) {\n                        const value = obj2[name];\n                        // Obj2 doesn't have obj1 item\n                        if (isUndefined(value)) {\n                            return false;\n                        }\n                        // Obj2 item has a different value\n                        if (obj1[name] !== value) {\n                            return false;\n                        }\n                        // Delete similar value\n                        delete obj2[name];\n                    }\n                }\n                // Check if obj 2 has something obj 1 doesn't have\n                for (const name in obj2) {\n                    // Obj2 has item obj1 doesn't have\n                    if (has$2(obj2, name)) {\n                        return false;\n                    }\n                }\n                return true;\n            };\n            if (isElement$7(node1) && isElement$7(node2)) {\n                // Attribs are not the same\n                if (!compareObjects(getAttribs(node1), getAttribs(node2))) {\n                    return false;\n                }\n                // Styles are not the same\n                if (!compareObjects(dom.parseStyle(dom.getAttrib(node1, 'style')), dom.parseStyle(dom.getAttrib(node2, 'style')))) {\n                    return false;\n                }\n            }\n            return !isBookmarkNode$1(node1) && !isBookmarkNode$1(node2);\n        };\n        const isAttributeInternal = (attributeName) => exists(internalAttributesPrefixes, (value) => startsWith(attributeName, value)) || internalAttributes.has(attributeName);\n        return {\n            compare,\n            isAttributeInternal\n        };\n    };\n\n    const getNormalizedPoint$1 = (container, offset) => {\n        if (isText$b(container)) {\n            return { container, offset };\n        }\n        const node = RangeUtils.getNode(container, offset);\n        if (isText$b(node)) {\n            return {\n                container: node,\n                offset: offset >= container.childNodes.length ? node.data.length : 0\n            };\n        }\n        else if (node.previousSibling && isText$b(node.previousSibling)) {\n            return {\n                container: node.previousSibling,\n                offset: node.previousSibling.data.length\n            };\n        }\n        else if (node.nextSibling && isText$b(node.nextSibling)) {\n            return {\n                container: node.nextSibling,\n                offset: 0\n            };\n        }\n        return { container, offset };\n    };\n    const normalizeRange$1 = (rng) => {\n        const outRng = rng.cloneRange();\n        const rangeStart = getNormalizedPoint$1(rng.startContainer, rng.startOffset);\n        outRng.setStart(rangeStart.container, rangeStart.offset);\n        const rangeEnd = getNormalizedPoint$1(rng.endContainer, rng.endOffset);\n        outRng.setEnd(rangeEnd.container, rangeEnd.offset);\n        return outRng;\n    };\n\n    const DOM$b = DOMUtils.DOM;\n    const defaultMarker = () => DOM$b.create('span', { 'data-mce-type': 'bookmark' });\n    const setupEndPoint = (container, offset, createMarker) => {\n        if (isElement$7(container)) {\n            const offsetNode = createMarker();\n            if (container.hasChildNodes()) {\n                if (offset === container.childNodes.length) {\n                    container.appendChild(offsetNode);\n                }\n                else {\n                    container.insertBefore(offsetNode, container.childNodes[offset]);\n                }\n            }\n            else {\n                container.appendChild(offsetNode);\n            }\n            return { container: offsetNode, offset: 0 };\n        }\n        else {\n            return { container, offset };\n        }\n    };\n    const restoreEndPoint = (container, offset) => {\n        const nodeIndex = (container) => {\n            let node = container.parentNode?.firstChild;\n            let idx = 0;\n            while (node) {\n                if (node === container) {\n                    return idx;\n                }\n                // Skip data-mce-type=bookmark nodes\n                if (!isElement$7(node) || node.getAttribute('data-mce-type') !== 'bookmark') {\n                    idx++;\n                }\n                node = node.nextSibling;\n            }\n            return -1;\n        };\n        if (isElement$7(container) && isNonNullable(container.parentNode)) {\n            const node = container;\n            offset = nodeIndex(container);\n            container = container.parentNode;\n            DOM$b.remove(node);\n            if (!container.hasChildNodes() && DOM$b.isBlock(container)) {\n                container.appendChild(DOM$b.create('br'));\n            }\n        }\n        return { container, offset };\n    };\n    const createNormalizedRange = (startContainer, startOffset, endContainer, endOffset) => {\n        const rng = DOM$b.createRng();\n        rng.setStart(startContainer, startOffset);\n        rng.setEnd(endContainer, endOffset);\n        return normalizeRange$1(rng);\n    };\n    /**\n     * Returns a range bookmark. This will convert indexed bookmarks into temporary span elements with\n     * index 0 so that they can be restored properly after the DOM has been modified. Text bookmarks will not have spans\n     * added to them since they can be restored after a dom operation.\n     *\n     * So this: <p><b>|</b><b>|</b></p>\n     * becomes: <p><b><span data-mce-type=\"bookmark\">|</span></b><b data-mce-type=\"bookmark\">|</span></b></p>\n     */\n    const createBookmark = (rng, createMarker = defaultMarker) => {\n        const { container: startContainer, offset: startOffset } = setupEndPoint(rng.startContainer, rng.startOffset, createMarker);\n        if (rng.collapsed) {\n            return { startContainer, startOffset };\n        }\n        else {\n            const { container: endContainer, offset: endOffset } = setupEndPoint(rng.endContainer, rng.endOffset, createMarker);\n            return { startContainer, startOffset, endContainer, endOffset };\n        }\n    };\n    const resolveBookmark = (bookmark) => {\n        const { container: startContainer, offset: startOffset } = restoreEndPoint(bookmark.startContainer, bookmark.startOffset);\n        if (!isUndefined(bookmark.endContainer) && !isUndefined(bookmark.endOffset)) {\n            const { container: endContainer, offset: endOffset } = restoreEndPoint(bookmark.endContainer, bookmark.endOffset);\n            return createNormalizedRange(startContainer, startOffset, endContainer, endOffset);\n        }\n        else {\n            return createNormalizedRange(startContainer, startOffset, startContainer, startOffset);\n        }\n    };\n\n    const applyStyles = (dom, elm, format, vars) => {\n        Tools.each(format.styles, (value, name) => {\n            dom.setStyle(elm, name, replaceVars(value, vars));\n        });\n        // Needed for the WebKit span spam bug\n        // TODO: Remove this once WebKit/Blink fixes this\n        if (format.styles) {\n            const styleVal = dom.getAttrib(elm, 'style');\n            if (styleVal) {\n                dom.setAttrib(elm, 'data-mce-style', styleVal);\n            }\n        }\n    };\n    const setElementFormat = (ed, elm, fmt, vars, node) => {\n        const dom = ed.dom;\n        if (isFunction(fmt.onformat)) {\n            fmt.onformat(elm, fmt, vars, node);\n        }\n        applyStyles(dom, elm, fmt, vars);\n        Tools.each(fmt.attributes, (value, name) => {\n            dom.setAttrib(elm, name, replaceVars(value, vars));\n        });\n        Tools.each(fmt.classes, (value) => {\n            const newValue = replaceVars(value, vars);\n            if (!dom.hasClass(elm, newValue)) {\n                dom.addClass(elm, newValue);\n            }\n        });\n    };\n\n    const isApplyFormat = (format) => !isArray$1(format.attributes) && !isArray$1(format.styles);\n\n    const isEq$3 = isEq$5;\n    const matchesUnInheritedFormatSelector = (ed, node, name) => {\n        const formatList = ed.formatter.get(name);\n        if (formatList) {\n            for (let i = 0; i < formatList.length; i++) {\n                const format = formatList[i];\n                if (isSelectorFormat(format) && format.inherit === false && ed.dom.is(node, format.selector)) {\n                    return true;\n                }\n            }\n        }\n        return false;\n    };\n    const matchParents = (editor, node, name, vars, similar) => {\n        const root = editor.dom.getRoot();\n        if (node === root) {\n            return false;\n        }\n        // Find first node with similar format settings\n        const matchedNode = editor.dom.getParent(node, (elm) => {\n            if (matchesUnInheritedFormatSelector(editor, elm, name)) {\n                return true;\n            }\n            return elm.parentNode === root || !!matchNode$1(editor, elm, name, vars, true);\n        });\n        // Do an exact check on the similar format element\n        return !!matchNode$1(editor, matchedNode, name, vars, similar);\n    };\n    const matchName = (dom, node, format) => {\n        // Check for inline match\n        if (isInlineFormat(format) && isEq$3(node, format.inline)) {\n            return true;\n        }\n        // Check for block match\n        if (isBlockFormat(format) && isEq$3(node, format.block)) {\n            return true;\n        }\n        // Check for selector match\n        if (isSelectorFormat(format)) {\n            return isElement$7(node) && dom.is(node, format.selector);\n        }\n        return false;\n    };\n    const matchItems = (dom, node, format, itemName, similar, vars) => {\n        const items = format[itemName];\n        const matchAttributes = itemName === 'attributes';\n        // Custom match\n        if (isFunction(format.onmatch)) {\n            // onmatch is generic in a way that we can't really express without casting\n            return format.onmatch(node, format, itemName);\n        }\n        // Check all items\n        if (items) {\n            // Non indexed object\n            if (!isArrayLike(items)) {\n                for (const key in items) {\n                    if (has$2(items, key)) {\n                        const value = matchAttributes ? dom.getAttrib(node, key) : getStyle(dom, node, key);\n                        const expectedValue = replaceVars(items[key], vars);\n                        const isEmptyValue = isNullable(value) || isEmpty$5(value);\n                        if (isEmptyValue && isNullable(expectedValue)) {\n                            continue;\n                        }\n                        if (similar && isEmptyValue && !format.exact) {\n                            return false;\n                        }\n                        if ((!similar || format.exact) && !isEq$3(value, normalizeStyleValue(expectedValue, key))) {\n                            return false;\n                        }\n                    }\n                }\n            }\n            else {\n                // Only one match needed for indexed arrays\n                for (let i = 0; i < items.length; i++) {\n                    if (matchAttributes ? dom.getAttrib(node, items[i]) : getStyle(dom, node, items[i])) {\n                        return true;\n                    }\n                }\n            }\n        }\n        return true;\n    };\n    const matchNode$1 = (ed, node, name, vars, similar) => {\n        const formatList = ed.formatter.get(name);\n        const dom = ed.dom;\n        if (formatList && isElement$7(node)) {\n            // Check each format in list\n            for (let i = 0; i < formatList.length; i++) {\n                const format = formatList[i];\n                // Name name, attributes, styles and classes\n                if (matchName(ed.dom, node, format) && matchItems(dom, node, format, 'attributes', similar, vars) && matchItems(dom, node, format, 'styles', similar, vars)) {\n                    // Match classes\n                    const classes = format.classes;\n                    if (classes) {\n                        for (let x = 0; x < classes.length; x++) {\n                            if (!ed.dom.hasClass(node, replaceVars(classes[x], vars))) {\n                                return;\n                            }\n                        }\n                    }\n                    return format;\n                }\n            }\n        }\n        return undefined;\n    };\n    const containsFormatDeep = (editor, root, name, vars, similar) => isNonNullable(matchNode$1(editor, root, name, vars, similar)) ||\n        exists(from(root.childNodes), (child) => containsFormatDeep(editor, child, name, vars, similar));\n    const matchEditableDescendants = (editor, node, name, vars, similar) => {\n        const dom = editor.dom;\n        if (!isElement$7(node) || dom.getContentEditable(node) !== 'false' || isWrappableNoneditable(editor, node)) {\n            return false;\n        }\n        return exists(getEditableDescendants(dom, node), (descendant) => containsFormatDeep(editor, descendant, name, vars, similar));\n    };\n    const match$2 = (editor, name, vars, node, similar) => {\n        // Check specified node\n        if (node) {\n            return matchParents(editor, node, name, vars, similar) || matchEditableDescendants(editor, node, name, vars, similar);\n        }\n        // Check selected node\n        node = editor.selection.getNode();\n        if (matchParents(editor, node, name, vars, similar) || matchEditableDescendants(editor, node, name, vars, similar)) {\n            return true;\n        }\n        // Check start node if it's different\n        const startNode = editor.selection.getStart();\n        if (startNode !== node) {\n            if (matchParents(editor, startNode, name, vars, similar)) {\n                return true;\n            }\n        }\n        return false;\n    };\n    const matchAll = (editor, names, vars) => {\n        const matchedFormatNames = [];\n        const checkedMap = {};\n        // Check start of selection for formats\n        const startElement = editor.selection.getStart();\n        editor.dom.getParent(startElement, (node) => {\n            for (let i = 0; i < names.length; i++) {\n                const name = names[i];\n                if (!checkedMap[name] && matchNode$1(editor, node, name, vars)) {\n                    checkedMap[name] = true;\n                    matchedFormatNames.push(name);\n                }\n            }\n        }, editor.dom.getRoot());\n        return matchedFormatNames;\n    };\n    const closest = (editor, names) => {\n        const isRoot = (elm) => eq(elm, SugarElement.fromDom(editor.getBody()));\n        const match = (elm, name) => matchNode$1(editor, elm.dom, name) ? Optional.some(name) : Optional.none();\n        return Optional.from(editor.selection.getStart(true)).bind((rawElm) => closest$1(SugarElement.fromDom(rawElm), (elm) => findMap(names, (name) => match(elm, name)), isRoot)).getOrNull();\n    };\n    const canApply = (editor, name) => {\n        const formatList = editor.formatter.get(name);\n        const dom = editor.dom;\n        if (formatList && editor.selection.isEditable()) {\n            const startNode = editor.selection.getStart();\n            const parents = getParents$2(dom, startNode);\n            for (let x = formatList.length - 1; x >= 0; x--) {\n                const format = formatList[x];\n                // Format is not selector based then always return TRUE\n                if (!isSelectorFormat(format)) {\n                    return true;\n                }\n                for (let i = parents.length - 1; i >= 0; i--) {\n                    if (dom.is(parents[i], format.selector)) {\n                        return true;\n                    }\n                }\n            }\n        }\n        return false;\n    };\n    /**\n     *  Get all of the format names present on the specified node\n     */\n    const matchAllOnNode = (editor, node, formatNames) => foldl(formatNames, (acc, name) => {\n        const matchSimilar = isVariableFormatName(editor, name);\n        if (editor.formatter.matchNode(node, name, {}, matchSimilar)) {\n            return acc.concat([name]);\n        }\n        else {\n            return acc;\n        }\n    }, []);\n\n    const ZWSP = ZWSP$1;\n    const importNode = (ownerDocument, node) => {\n        return ownerDocument.importNode(node, true);\n    };\n    const findFirstTextNode = (node) => {\n        if (node) {\n            const walker = new DomTreeWalker(node, node);\n            for (let tempNode = walker.current(); tempNode; tempNode = walker.next()) {\n                if (isText$b(tempNode)) {\n                    return tempNode;\n                }\n            }\n        }\n        return null;\n    };\n    const createCaretContainer = (fill) => {\n        const caretContainer = SugarElement.fromTag('span');\n        setAll$1(caretContainer, {\n            // style: 'color:red',\n            'id': CARET_ID,\n            'data-mce-bogus': '1',\n            'data-mce-type': 'format-caret'\n        });\n        if (fill) {\n            append$1(caretContainer, SugarElement.fromText(ZWSP));\n        }\n        return caretContainer;\n    };\n    const trimZwspFromCaretContainer = (caretContainerNode) => {\n        const textNode = findFirstTextNode(caretContainerNode);\n        if (textNode && textNode.data.charAt(0) === ZWSP) {\n            textNode.deleteData(0, 1);\n        }\n        return textNode;\n    };\n    const removeCaretContainerNode = (editor, node, moveCaret) => {\n        const dom = editor.dom, selection = editor.selection;\n        if (isCaretContainerEmpty(node)) {\n            deleteElement$2(editor, false, SugarElement.fromDom(node), moveCaret, true);\n        }\n        else {\n            const rng = selection.getRng();\n            const block = dom.getParent(node, dom.isBlock);\n            // Store the current selection offsets\n            const startContainer = rng.startContainer;\n            const startOffset = rng.startOffset;\n            const endContainer = rng.endContainer;\n            const endOffset = rng.endOffset;\n            const textNode = trimZwspFromCaretContainer(node);\n            dom.remove(node, true);\n            // Restore the selection after unwrapping the node and removing the zwsp\n            if (startContainer === textNode && startOffset > 0) {\n                rng.setStart(textNode, startOffset - 1);\n            }\n            if (endContainer === textNode && endOffset > 0) {\n                rng.setEnd(textNode, endOffset - 1);\n            }\n            if (block && dom.isEmpty(block)) {\n                fillWithPaddingBr(SugarElement.fromDom(block));\n            }\n            selection.setRng(rng);\n        }\n    };\n    const isAdjacent = (node, sibling) => node.nextSibling === sibling || node.previousSibling === sibling;\n    const isCaretContainerNodeAdjacentToSelection = (node, startContainer, endContainer) => node === startContainer || node === endContainer || isAdjacent(node, startContainer) || isAdjacent(node, endContainer);\n    // Removes the caret container for the specified node or all on the current document\n    const removeCaretContainer = (editor, node, moveCaret) => {\n        const dom = editor.dom, selection = editor.selection;\n        if (!node) {\n            node = getParentCaretContainer(editor.getBody(), selection.getStart());\n            if (!node) {\n                const startContainer = editor.selection.getRng().startContainer;\n                const endContainer = editor.selection.getRng().endContainer;\n                while ((node = dom.get(CARET_ID))) {\n                    removeCaretContainerNode(editor, node, isCaretContainerNodeAdjacentToSelection(node, startContainer, endContainer));\n                }\n            }\n        }\n        else {\n            removeCaretContainerNode(editor, node, moveCaret);\n        }\n    };\n    const insertCaretContainerNode = (editor, caretContainer, formatNode) => {\n        const dom = editor.dom;\n        const block = dom.getParent(formatNode, curry(isTextBlock$2, editor.schema));\n        if (block && dom.isEmpty(block)) {\n            // Replace formatNode with caretContainer when removing format from empty block like <p><b>|</b></p>\n            formatNode.parentNode?.replaceChild(caretContainer, formatNode);\n        }\n        else {\n            removeTrailingBr(SugarElement.fromDom(formatNode));\n            if (dom.isEmpty(formatNode)) {\n                formatNode.parentNode?.replaceChild(caretContainer, formatNode);\n            }\n            else {\n                dom.insertAfter(caretContainer, formatNode);\n            }\n        }\n    };\n    const appendNode = (parentNode, node) => {\n        parentNode.appendChild(node);\n        return node;\n    };\n    const insertFormatNodesIntoCaretContainer = (formatNodes, caretContainer) => {\n        const innerMostFormatNode = foldr(formatNodes, (parentNode, formatNode) => {\n            return appendNode(parentNode, formatNode.cloneNode(false));\n        }, caretContainer);\n        const doc = innerMostFormatNode.ownerDocument ?? document;\n        return appendNode(innerMostFormatNode, doc.createTextNode(ZWSP));\n    };\n    const cleanFormatNode = (editor, caretContainer, formatNode, name, vars, similar) => {\n        const formatter = editor.formatter;\n        const dom = editor.dom;\n        // Find all formats present on the format node\n        const validFormats = filter$5(keys(formatter.get()), (formatName) => formatName !== name && !contains$1(formatName, 'removeformat'));\n        const matchedFormats = matchAllOnNode(editor, formatNode, validFormats);\n        // Filter out any matched formats that are 'visually' equivalent to the 'name' format since they are not unique formats on the node\n        const uniqueFormats = filter$5(matchedFormats, (fmtName) => !areSimilarFormats(editor, fmtName, name));\n        // If more than one format is present, then there's additional formats that should be retained. So clone the node,\n        // remove the format and then return cleaned format node\n        if (uniqueFormats.length > 0) {\n            const clonedFormatNode = formatNode.cloneNode(false);\n            dom.add(caretContainer, clonedFormatNode);\n            formatter.remove(name, vars, clonedFormatNode, similar);\n            dom.remove(clonedFormatNode);\n            return Optional.some(clonedFormatNode);\n        }\n        else {\n            return Optional.none();\n        }\n    };\n    const normalizeNbsps = (node) => set$2(node, get$5(node).replace(new RegExp(`${nbsp}$`), ' '));\n    const normalizeNbspsBetween = (editor, caretContainer) => {\n        const handler = () => {\n            if (caretContainer !== null && !editor.dom.isEmpty(caretContainer)) {\n                prevSibling(SugarElement.fromDom(caretContainer)).each((node) => {\n                    if (isText$c(node)) {\n                        normalizeNbsps(node);\n                    }\n                    else {\n                        descendant$2(node, (e) => isText$c(e)).each((textNode) => {\n                            if (isText$c(textNode)) {\n                                normalizeNbsps(textNode);\n                            }\n                        });\n                    }\n                });\n            }\n        };\n        editor.once('input', (e) => {\n            if (e.data && !isWhiteSpace(e.data)) {\n                if (!e.isComposing) {\n                    handler();\n                }\n                else {\n                    editor.once('compositionend', () => {\n                        handler();\n                    });\n                }\n            }\n        });\n    };\n    const applyCaretFormat = (editor, name, vars) => {\n        let caretContainer;\n        const selection = editor.selection;\n        const formatList = editor.formatter.get(name);\n        if (!formatList) {\n            return;\n        }\n        const selectionRng = selection.getRng();\n        let offset = selectionRng.startOffset;\n        const container = selectionRng.startContainer;\n        const text = container.nodeValue;\n        caretContainer = getParentCaretContainer(editor.getBody(), selection.getStart());\n        // Expand to word if caret is in the middle of a text node and the char before/after is a alpha numeric character\n        const wordcharRegex = /[^\\s\\u00a0\\u00ad\\u200b\\ufeff]/;\n        if (text && offset > 0 && offset < text.length &&\n            wordcharRegex.test(text.charAt(offset)) && wordcharRegex.test(text.charAt(offset - 1))) {\n            // Get bookmark of caret position\n            const bookmark = selection.getBookmark();\n            // Collapse bookmark range (WebKit)\n            selectionRng.collapse(true);\n            // Expand the range to the closest word and split it at those points\n            let rng = expandRng(editor.dom, selectionRng, formatList);\n            rng = split(rng);\n            // Apply the format to the range\n            editor.formatter.apply(name, vars, rng);\n            // Move selection back to caret position\n            selection.moveToBookmark(bookmark);\n        }\n        else {\n            let textNode = caretContainer ? findFirstTextNode(caretContainer) : null;\n            if (!caretContainer || textNode?.data !== ZWSP) {\n                // Need to import the node into the document on IE or we get a lovely WrongDocument exception\n                caretContainer = importNode(editor.getDoc(), createCaretContainer(true).dom);\n                textNode = caretContainer.firstChild;\n                selectionRng.insertNode(caretContainer);\n                offset = 1;\n                normalizeNbspsBetween(editor, caretContainer);\n                editor.formatter.apply(name, vars, caretContainer);\n            }\n            else {\n                editor.formatter.apply(name, vars, caretContainer);\n            }\n            // Move selection to text node\n            selection.setCursorLocation(textNode, offset);\n        }\n    };\n    const removeCaretFormat = (editor, name, vars, similar) => {\n        const dom = editor.dom;\n        const selection = editor.selection;\n        let hasContentAfter = false;\n        const formatList = editor.formatter.get(name);\n        if (!formatList) {\n            return;\n        }\n        const rng = selection.getRng();\n        const container = rng.startContainer;\n        const offset = rng.startOffset;\n        let node = container;\n        if (isText$b(container)) {\n            if (offset !== container.data.length) {\n                hasContentAfter = true;\n            }\n            node = node.parentNode;\n        }\n        const parents = [];\n        let formatNode;\n        while (node) {\n            if (matchNode$1(editor, node, name, vars, similar)) {\n                formatNode = node;\n                break;\n            }\n            if (node.nextSibling) {\n                hasContentAfter = true;\n            }\n            parents.push(node);\n            node = node.parentNode;\n        }\n        // Node doesn't have the specified format\n        if (!formatNode) {\n            return;\n        }\n        // Is there contents after the caret then remove the format on the element\n        if (hasContentAfter) {\n            const bookmark = selection.getBookmark();\n            // Collapse bookmark range (WebKit)\n            rng.collapse(true);\n            // Expand the range to the closest word and split it at those points\n            let expandedRng = expandRng(dom, rng, formatList, { includeTrailingSpace: true });\n            expandedRng = split(expandedRng);\n            // TODO: Figure out how on earth this works, as it shouldn't since remove format\n            //  definitely seems to require an actual Range\n            editor.formatter.remove(name, vars, expandedRng, similar);\n            selection.moveToBookmark(bookmark);\n        }\n        else {\n            const caretContainer = getParentCaretContainer(editor.getBody(), formatNode);\n            const parentsAfter = isNonNullable(caretContainer) ? dom.getParents(formatNode.parentNode, always, caretContainer) : [];\n            const newCaretContainer = createCaretContainer(false).dom;\n            insertCaretContainerNode(editor, newCaretContainer, caretContainer ?? formatNode);\n            const cleanedFormatNode = cleanFormatNode(editor, newCaretContainer, formatNode, name, vars, similar);\n            const caretTextNode = insertFormatNodesIntoCaretContainer([\n                ...parents,\n                ...cleanedFormatNode.toArray(),\n                ...parentsAfter\n            ], newCaretContainer);\n            if (caretContainer) {\n                removeCaretContainerNode(editor, caretContainer, isNonNullable(caretContainer));\n            }\n            selection.setCursorLocation(caretTextNode, 1);\n            normalizeNbspsBetween(editor, newCaretContainer);\n            if (dom.isEmpty(formatNode)) {\n                dom.remove(formatNode);\n            }\n        }\n    };\n    const disableCaretContainer = (editor, keyCode) => {\n        const selection = editor.selection, body = editor.getBody();\n        removeCaretContainer(editor, null, false);\n        // Remove caret container if it's empty\n        if ((keyCode === 8 || keyCode === 46) && selection.isCollapsed() && selection.getStart().innerHTML === ZWSP) {\n            removeCaretContainer(editor, getParentCaretContainer(body, selection.getStart()), true);\n        }\n        // Remove caret container on keydown and it's left/right arrow keys\n        if (keyCode === 37 || keyCode === 39) {\n            removeCaretContainer(editor, getParentCaretContainer(body, selection.getStart()), true);\n        }\n    };\n    const setup$B = (editor) => {\n        editor.on('mouseup keydown', (e) => {\n            disableCaretContainer(editor, e.keyCode);\n        });\n    };\n    const createCaretFormat = (formatNodes) => {\n        const caretContainer = createCaretContainer(false);\n        const innerMost = insertFormatNodesIntoCaretContainer(formatNodes, caretContainer.dom);\n        return { caretContainer, caretPosition: CaretPosition(innerMost, 0) };\n    };\n    const replaceWithCaretFormat = (targetNode, formatNodes) => {\n        const { caretContainer, caretPosition } = createCaretFormat(formatNodes);\n        before$4(SugarElement.fromDom(targetNode), caretContainer);\n        remove$8(SugarElement.fromDom(targetNode));\n        return caretPosition;\n    };\n    const createCaretFormatAtStart$1 = (rng, formatNodes) => {\n        const { caretContainer, caretPosition } = createCaretFormat(formatNodes);\n        rng.insertNode(caretContainer.dom);\n        return caretPosition;\n    };\n    const isFormatElement = (editor, element) => {\n        if (isCaretNode(element.dom)) {\n            return false;\n        }\n        const inlineElements = editor.schema.getTextInlineElements();\n        return has$2(inlineElements, name(element)) && !isCaretNode(element.dom) && !isBogus$1(element.dom);\n    };\n\n    const listItemStyles = ['fontWeight', 'fontStyle', 'color', 'fontSize', 'fontFamily'];\n    const hasListStyles = (fmt) => isObject(fmt.styles) && exists(keys(fmt.styles), (name) => contains$2(listItemStyles, name));\n    const findExpandedListItemFormat = (formats) => find$2(formats, (fmt) => isInlineFormat(fmt) && fmt.inline === 'span' && hasListStyles(fmt));\n    const getExpandedListItemFormat = (formatter, format) => {\n        const formatList = formatter.get(format);\n        return isArray$1(formatList) ? findExpandedListItemFormat(formatList) : Optional.none();\n    };\n    const isRngStartAtStartOfElement = (rng, elm) => prevPosition(elm, CaretPosition.fromRangeStart(rng)).isNone();\n    const isRngEndAtEndOfElement = (rng, elm) => {\n        return nextPosition(elm, CaretPosition.fromRangeEnd(rng))\n            .exists((pos) => !isBr$7(pos.getNode()) || nextPosition(elm, pos).isSome()) === false;\n    };\n    const isEditableListItem = (dom) => (elm) => isListItem$3(elm) && dom.isEditable(elm);\n    // TINY-13197: If the content is wrapped inside a block element, the first block returned by getSelectedBlocks() is not LI, even when the content is fully selected.\n    // However, the second and subsequent do return LI as the selected block so only the first block needs to be adjusted\n    const getAndOnlyNormalizeFirstBlockIf = (selection, pred) => map$3(selection.getSelectedBlocks(), (block, i) => {\n        if (i === 0 && pred(block)) {\n            return selection.dom.getParent(block, isListItem$3) ?? block;\n        }\n        else {\n            return block;\n        }\n    });\n    // Resolve list items from the\n    // selected cells directly instead, matching how SelectionUtils.runOnRanges resolves fake selections.\n    const getCellSelectionListItems = (editor) => {\n        const fakeSelectionNodes = getCellsFromEditor(editor);\n        if (fakeSelectionNodes.length > 0) {\n            const listItems = bind$3(fakeSelectionNodes, (cell) => descendants(cell, 'li'));\n            return Optional.some(map$3(listItems, (item) => item.dom));\n        }\n        else {\n            return Optional.none();\n        }\n    };\n    const getFullySelectedBlocks = (selection) => {\n        if (selection.isCollapsed()) {\n            return [];\n        }\n        const rng = selection.getRng();\n        const blocks = getAndOnlyNormalizeFirstBlockIf(selection, (el) => isRngStartAtStartOfElement(rng, el) && !isListItem$3(el));\n        if (blocks.length === 1) {\n            return isRngStartAtStartOfElement(rng, blocks[0]) && isRngEndAtEndOfElement(rng, blocks[0]) ? blocks : [];\n        }\n        else {\n            const first = head(blocks).filter((elm) => isRngStartAtStartOfElement(rng, elm)).toArray();\n            const last = last$2(blocks).filter((elm) => isRngEndAtEndOfElement(rng, elm)).toArray();\n            const middle = blocks.slice(1, -1);\n            return first.concat(middle).concat(last);\n        }\n    };\n    const getFullySelectedListItems = (editor) => {\n        const items = getCellSelectionListItems(editor).getOrThunk(() => getFullySelectedBlocks(editor.selection));\n        return filter$5(items, isEditableListItem(editor.selection.dom));\n    };\n    const getPartiallySelectedListItems = (editor) => {\n        const items = getCellSelectionListItems(editor)\n            .getOrThunk(() => getAndOnlyNormalizeFirstBlockIf(editor.selection, (el) => !isListItem$3(el)));\n        return filter$5(items, isEditableListItem(editor.selection.dom));\n    };\n\n    const each$8 = Tools.each;\n    const isElementNode = (node) => isElement$7(node) && !isBookmarkNode$1(node) && !isCaretNode(node) && !isBogus$1(node);\n    const findElementSibling = (node, siblingName) => {\n        for (let sibling = node; sibling; sibling = sibling[siblingName]) {\n            if (isText$b(sibling) && isNotEmpty(sibling.data)) {\n                return node;\n            }\n            if (isElement$7(sibling) && !isBookmarkNode$1(sibling)) {\n                return sibling;\n            }\n        }\n        return node;\n    };\n    const mergeSiblingsNodes = (editor, prev, next) => {\n        const elementUtils = ElementUtils(editor);\n        const isPrevEditable = isHTMLElement(prev) && editor.dom.isEditable(prev);\n        const isNextEditable = isHTMLElement(next) && editor.dom.isEditable(next);\n        // Check if next/prev exists and that they are elements\n        if (isPrevEditable && isNextEditable) {\n            // If previous sibling is empty then jump over it\n            const prevSibling = findElementSibling(prev, 'previousSibling');\n            const nextSibling = findElementSibling(next, 'nextSibling');\n            // Compare next and previous nodes\n            if (elementUtils.compare(prevSibling, nextSibling)) {\n                // Append nodes between\n                for (let sibling = prevSibling.nextSibling; sibling && sibling !== nextSibling;) {\n                    const tmpSibling = sibling;\n                    sibling = sibling.nextSibling;\n                    prevSibling.appendChild(tmpSibling);\n                }\n                editor.dom.remove(nextSibling);\n                Tools.each(Tools.grep(nextSibling.childNodes), (node) => {\n                    prevSibling.appendChild(node);\n                });\n                return prevSibling;\n            }\n        }\n        return next;\n    };\n    const mergeSiblings = (editor, format, vars, node) => {\n        // Merge next and previous siblings if they are similar <b>text</b><b>text</b> becomes <b>texttext</b>\n        // Note: mergeSiblingNodes attempts to not merge sibilings if they are noneditable\n        if (node && format.merge_siblings !== false) {\n            // Previous sibling\n            const newNode = mergeSiblingsNodes(editor, getNonWhiteSpaceSibling(node), node) ?? node;\n            // Next sibling\n            mergeSiblingsNodes(editor, newNode, getNonWhiteSpaceSibling(newNode, true));\n        }\n    };\n    const clearChildStyles = (dom, format, node) => {\n        if (format.clear_child_styles) {\n            const selector = format.links ? '*:not(a)' : '*';\n            each$8(dom.select(selector, node), (childNode) => {\n                if (isElementNode(childNode) && dom.isEditable(childNode)) {\n                    each$8(format.styles, (_value, name) => {\n                        dom.setStyle(childNode, name, '');\n                    });\n                }\n            });\n        }\n    };\n    const processChildElements = (node, filter, process) => {\n        each$8(node.childNodes, (node) => {\n            if (isElementNode(node)) {\n                if (filter(node)) {\n                    process(node);\n                }\n                if (node.hasChildNodes()) {\n                    processChildElements(node, filter, process);\n                }\n            }\n        });\n    };\n    const unwrapEmptySpan = (dom, node) => {\n        if (node.nodeName === 'SPAN' && dom.getAttribs(node).length === 0) {\n            dom.remove(node, true);\n        }\n    };\n    const hasStyle = (dom, name) => (node) => !!(node && getStyle(dom, node, name));\n    const applyStyle = (dom, name, value) => (node) => {\n        dom.setStyle(node, name, value);\n        if (node.getAttribute('style') === '') {\n            node.removeAttribute('style');\n        }\n        unwrapEmptySpan(dom, node);\n    };\n\n    const removeResult = Adt.generate([\n        { keep: [] },\n        { rename: ['name'] },\n        { removed: [] }\n    ]);\n    const MCE_ATTR_RE = /^(src|href|style)$/;\n    const each$7 = Tools.each;\n    const isEq$2 = isEq$5;\n    const isTableCellOrRow = (node) => /^(TR|TH|TD)$/.test(node.nodeName);\n    const isChildOfInlineParent = (dom, node, parent) => dom.isChildOf(node, parent) && node !== parent && !dom.isBlock(parent);\n    const getContainer = (ed, rng, start) => {\n        let container = rng[start ? 'startContainer' : 'endContainer'];\n        let offset = rng[start ? 'startOffset' : 'endOffset'];\n        if (isElement$7(container)) {\n            const lastIdx = container.childNodes.length - 1;\n            if (!start && offset) {\n                offset--;\n            }\n            container = container.childNodes[offset > lastIdx ? lastIdx : offset];\n        }\n        // If start text node is excluded then walk to the next node\n        if (isText$b(container) && start && offset >= container.data.length) {\n            container = new DomTreeWalker(container, ed.getBody()).next() || container;\n        }\n        // If end text node is excluded then walk to the previous node\n        if (isText$b(container) && !start && offset === 0) {\n            container = new DomTreeWalker(container, ed.getBody()).prev() || container;\n        }\n        return container;\n    };\n    const normalizeTableSelection = (node, start) => {\n        const prop = start ? 'firstChild' : 'lastChild';\n        const childNode = node[prop];\n        if (isTableCellOrRow(node) && childNode) {\n            if (node.nodeName === 'TR') {\n                return childNode[prop] || childNode;\n            }\n            else {\n                return childNode;\n            }\n        }\n        return node;\n    };\n    const wrap$1 = (dom, node, name, attrs) => {\n        const wrapper = dom.create(name, attrs);\n        node.parentNode?.insertBefore(wrapper, node);\n        wrapper.appendChild(node);\n        return wrapper;\n    };\n    const wrapWithSiblings = (dom, node, next, name, attrs) => {\n        const start = SugarElement.fromDom(node);\n        const wrapper = SugarElement.fromDom(dom.create(name, attrs));\n        const siblings = next ? nextSiblings(start) : prevSiblings(start);\n        append(wrapper, siblings);\n        if (next) {\n            before$4(start, wrapper);\n            prepend(wrapper, start);\n        }\n        else {\n            after$4(start, wrapper);\n            append$1(wrapper, start);\n        }\n        return wrapper.dom;\n    };\n    const isColorFormatAndAnchor = (node, format) => format.links && node.nodeName === 'A';\n    /**\n     * Removes the node and wrap it's children in paragraphs before doing so or\n     * appends BR elements to the beginning/end of the block element if forcedRootBlocks is disabled.\n     *\n     * If the div in the node below gets removed:\n     *  text<div>text</div>text\n     *\n     * Output becomes:\n     *  text<div><br />text<br /></div>text\n     *\n     * So when the div is removed the result is:\n     *  text<br />text<br />text\n     *\n     * @private\n     * @param {Node} node Node to remove + apply BR/P elements to.\n     * @param {Object} format Format rule.\n     * @return {Node} Input node.\n     */\n    const removeNode = (ed, node, format) => {\n        const parentNode = node.parentNode;\n        let rootBlockElm;\n        const dom = ed.dom;\n        const forcedRootBlock = getForcedRootBlock(ed);\n        if (isBlockFormat(format)) {\n            // Wrap the block in a forcedRootBlock if we are at the root of document\n            if (parentNode === dom.getRoot()) {\n                if (!format.list_block || !isEq$2(node, format.list_block)) {\n                    each$e(from(node.childNodes), (node) => {\n                        if (isValid(ed, forcedRootBlock, node.nodeName.toLowerCase())) {\n                            if (!rootBlockElm) {\n                                rootBlockElm = wrap$1(dom, node, forcedRootBlock);\n                                dom.setAttribs(rootBlockElm, getForcedRootBlockAttrs(ed));\n                            }\n                            else {\n                                rootBlockElm.appendChild(node);\n                            }\n                        }\n                        else {\n                            rootBlockElm = null;\n                        }\n                    });\n                }\n            }\n        }\n        // Never remove nodes that aren't the specified inline element if a selector is specified too\n        if (isMixedFormat(format) && !isEq$2(format.inline, node)) {\n            return;\n        }\n        dom.remove(node, true);\n    };\n    // Attributes or styles can be either an array of names or an object containing name/value pairs\n    const processFormatAttrOrStyle = (name, value, vars) => {\n        // Indexed array\n        if (isNumber(name)) {\n            return {\n                name: value,\n                value: null\n            };\n        }\n        else {\n            return {\n                name,\n                value: replaceVars(value, vars)\n            };\n        }\n    };\n    const removeEmptyStyleAttributeIfNeeded = (dom, elm) => {\n        if (dom.getAttrib(elm, 'style') === '') {\n            elm.removeAttribute('style');\n            elm.removeAttribute('data-mce-style');\n        }\n    };\n    const removeStyles$1 = (dom, elm, format, vars, compareNode) => {\n        let stylesModified = false;\n        each$7(format.styles, (value, name) => {\n            const { name: styleName, value: styleValue } = processFormatAttrOrStyle(name, value, vars);\n            const normalizedStyleValue = normalizeStyleValue(styleValue, styleName);\n            if (format.remove_similar || isNull(styleValue) || !isElement$7(compareNode) || isEq$2(getStyle(dom, compareNode, styleName), normalizedStyleValue)) {\n                dom.setStyle(elm, styleName, '');\n            }\n            stylesModified = true;\n        });\n        if (stylesModified) {\n            removeEmptyStyleAttributeIfNeeded(dom, elm);\n        }\n    };\n    const removeListStyleFormats = (editor, name, vars) => {\n        if (name === 'removeformat') {\n            each$e(getPartiallySelectedListItems(editor), (li) => {\n                each$e(listItemStyles, (name) => editor.dom.setStyle(li, name, ''));\n                removeEmptyStyleAttributeIfNeeded(editor.dom, li);\n            });\n        }\n        else {\n            getExpandedListItemFormat(editor.formatter, name).each((liFmt) => {\n                each$e(getPartiallySelectedListItems(editor), (li) => removeStyles$1(editor.dom, li, liFmt, vars, null));\n            });\n        }\n    };\n    const removeNodeFormatInternal = (ed, format, vars, node, compareNode) => {\n        const dom = ed.dom;\n        const elementUtils = ElementUtils(ed);\n        const schema = ed.schema;\n        // Root level block transparents should get converted into regular text blocks\n        if (isInlineFormat(format) && isTransparentElementName(schema, format.inline) && isTransparentBlock(schema, node) && node.parentElement === ed.getBody()) {\n            removeNode(ed, node, format);\n            return removeResult.removed();\n        }\n        // Check if node is noneditable and can have the format removed from it\n        if (!format.ceFalseOverride && node && dom.getContentEditableParent(node) === 'false') {\n            return removeResult.keep();\n        }\n        // Check if node matches format\n        if (node && !matchName(dom, node, format) && !isColorFormatAndAnchor(node, format)) {\n            return removeResult.keep();\n        }\n        // \"matchName\" will made sure we're dealing with an element, so cast as one\n        const elm = node;\n        // Applies to styling elements like strong, em, i, u, etc. so that if they have styling attributes, the attributes can be kept but the styling element is removed\n        const preserveAttributes = format.preserve_attributes;\n        if (isInlineFormat(format) && format.remove === 'all' && isArray$1(preserveAttributes)) {\n            // Remove all attributes except for the attributes specified in preserve_attributes\n            const attrsToPreserve = filter$5(dom.getAttribs(elm), (attr) => contains$2(preserveAttributes, attr.name.toLowerCase()));\n            dom.removeAllAttribs(elm);\n            each$e(attrsToPreserve, (attr) => dom.setAttrib(elm, attr.name, attr.value));\n            // Note: If there are no attributes left, the element will be removed as normal at the end of the function\n            if (attrsToPreserve.length > 0) {\n                // Convert inline element to span if necessary\n                return removeResult.rename('span');\n            }\n        }\n        // Should we compare with format attribs and styles\n        if (format.remove !== 'all') {\n            removeStyles$1(dom, elm, format, vars, compareNode);\n            // Remove attributes\n            each$7(format.attributes, (value, name) => {\n                const { name: attrName, value: attrValue } = processFormatAttrOrStyle(name, value, vars);\n                if (format.remove_similar || isNull(attrValue) || !isElement$7(compareNode) || isEq$2(dom.getAttrib(compareNode, attrName), attrValue)) {\n                    // Keep internal classes\n                    if (attrName === 'class') {\n                        const currentValue = dom.getAttrib(elm, attrName);\n                        if (currentValue) {\n                            // Build new class value where everything is removed except the internal prefixed classes\n                            let valueOut = '';\n                            each$e(currentValue.split(/\\s+/), (cls) => {\n                                if (/mce\\-\\w+/.test(cls)) {\n                                    valueOut += (valueOut ? ' ' : '') + cls;\n                                }\n                            });\n                            // We got some internal classes left\n                            if (valueOut) {\n                                dom.setAttrib(elm, attrName, valueOut);\n                                return;\n                            }\n                        }\n                    }\n                    // Remove mce prefixed attributes (must clean before short circuit operations)\n                    if (MCE_ATTR_RE.test(attrName)) {\n                        elm.removeAttribute('data-mce-' + attrName);\n                    }\n                    // keep style=\"list-style-type: none\" on <li>s\n                    if (attrName === 'style' && matchNodeNames$1(['li'])(elm) && dom.getStyle(elm, 'list-style-type') === 'none') {\n                        elm.removeAttribute(attrName);\n                        dom.setStyle(elm, 'list-style-type', 'none');\n                        return;\n                    }\n                    // IE6 has a bug where the attribute doesn't get removed correctly\n                    if (attrName === 'class') {\n                        elm.removeAttribute('className');\n                    }\n                    elm.removeAttribute(attrName);\n                }\n            });\n            // Remove classes\n            each$7(format.classes, (value) => {\n                value = replaceVars(value, vars);\n                if (!isElement$7(compareNode) || dom.hasClass(compareNode, value)) {\n                    dom.removeClass(elm, value);\n                }\n            });\n            // Check for non internal attributes\n            const attrs = dom.getAttribs(elm);\n            for (let i = 0; i < attrs.length; i++) {\n                const attrName = attrs[i].nodeName;\n                if (!elementUtils.isAttributeInternal(attrName)) {\n                    return removeResult.keep();\n                }\n            }\n        }\n        // Remove the inline child if it's empty for example <b> or <span>\n        if (format.remove !== 'none') {\n            removeNode(ed, elm, format);\n            return removeResult.removed();\n        }\n        return removeResult.keep();\n    };\n    const findFormatRoot = (editor, container, name, vars, similar) => {\n        let formatRoot;\n        if (container.parentNode) {\n            // Find format root\n            each$e(getParents$2(editor.dom, container.parentNode).reverse(), (parent) => {\n                // Find format root element\n                if (!formatRoot && isElement$7(parent) && parent.id !== '_start' && parent.id !== '_end') {\n                    // Is the node matching the format we are looking for\n                    const format = matchNode$1(editor, parent, name, vars, similar);\n                    if (format && format.split !== false) {\n                        formatRoot = parent;\n                    }\n                }\n            });\n        }\n        return formatRoot;\n    };\n    const removeNodeFormatFromClone = (editor, format, vars, clone) => removeNodeFormatInternal(editor, format, vars, clone, clone).fold(constant(clone), (newName) => {\n        // To rename a node, it needs to be a child of another node\n        const fragment = editor.dom.createFragment();\n        fragment.appendChild(clone);\n        // If renaming we are guaranteed this is a Element, so cast\n        return editor.dom.rename(clone, newName);\n    }, constant(null));\n    const wrapAndSplit = (editor, formatList, formatRoot, container, target, split, format, vars) => {\n        let lastClone;\n        let firstClone;\n        const dom = editor.dom;\n        // Format root found then clone formats and split it\n        if (formatRoot) {\n            const formatRootParent = formatRoot.parentNode;\n            for (let parent = container.parentNode; parent && parent !== formatRootParent; parent = parent.parentNode) {\n                let clone = dom.clone(parent, false);\n                for (let i = 0; i < formatList.length; i++) {\n                    clone = removeNodeFormatFromClone(editor, formatList[i], vars, clone);\n                    if (clone === null) {\n                        break;\n                    }\n                }\n                // Build wrapper node\n                if (clone) {\n                    if (lastClone) {\n                        clone.appendChild(lastClone);\n                    }\n                    if (!firstClone) {\n                        firstClone = clone;\n                    }\n                    lastClone = clone;\n                }\n            }\n            // Never split block elements if the format is mixed\n            if (split && (!format.mixed || !dom.isBlock(formatRoot))) {\n                container = dom.split(formatRoot, container) ?? container;\n            }\n            // Wrap container in cloned formats\n            if (lastClone && firstClone) {\n                target.parentNode?.insertBefore(lastClone, target);\n                firstClone.appendChild(target);\n                // After splitting the nodes may match with other siblings so we need to attempt to merge them\n                // Note: We can't use MergeFormats, as that'd create a circular dependency\n                if (isInlineFormat(format)) {\n                    mergeSiblings(editor, format, vars, lastClone);\n                }\n            }\n        }\n        return container;\n    };\n    const removeFormatInternal = (ed, name, vars, node, similar) => {\n        const formatList = ed.formatter.get(name);\n        const format = formatList[0];\n        const dom = ed.dom;\n        const selection = ed.selection;\n        const splitToFormatRoot = (container) => {\n            const formatRoot = findFormatRoot(ed, container, name, vars, similar);\n            return wrapAndSplit(ed, formatList, formatRoot, container, container, true, format, vars);\n        };\n        // Make sure to only check for bookmarks created here (eg _start or _end)\n        // as there maybe nested bookmarks\n        const isRemoveBookmarkNode = (node) => isBookmarkNode$1(node) && isElement$7(node) && (node.id === '_start' || node.id === '_end');\n        const removeFormatOnNode = (node) => exists(formatList, (fmt) => removeNodeFormat(ed, fmt, vars, node, node));\n        // Merges the styles for each node\n        const process = (node) => {\n            // Grab the children first since the nodelist might be changed\n            const children = from(node.childNodes);\n            // Process current node\n            const removed = removeFormatOnNode(node);\n            // TINY-6567/TINY-7393: Include the parent if using an expanded selector format and no match was found for the current node\n            const currentNodeMatches = removed || exists(formatList, (f) => matchName(dom, node, f));\n            const parentNode = node.parentNode;\n            if (!currentNodeMatches && isNonNullable(parentNode) && shouldExpandToSelector(format)) {\n                removeFormatOnNode(parentNode);\n            }\n            // Process the children\n            if (format.deep) {\n                if (children.length) {\n                    for (let i = 0; i < children.length; i++) {\n                        process(children[i]);\n                    }\n                }\n            }\n            // Note: Assists with cleaning up any stray text decorations that may been applied when text decorations\n            // and text colors were merged together from an applied format\n            // Remove child span if it only contains text-decoration and a parent node also has the same text decoration.\n            const textDecorations = ['underline', 'line-through', 'overline'];\n            each$e(textDecorations, (decoration) => {\n                if (isElement$7(node) && ed.dom.getStyle(node, 'text-decoration') === decoration &&\n                    node.parentNode && getTextDecoration(dom, node.parentNode) === decoration) {\n                    removeNodeFormat(ed, {\n                        deep: false,\n                        exact: true,\n                        inline: 'span',\n                        styles: {\n                            textDecoration: decoration\n                        }\n                    }, undefined, node);\n                }\n            });\n        };\n        const unwrap = (start) => {\n            const node = dom.get(start ? '_start' : '_end');\n            if (node) {\n                let out = node[start ? 'firstChild' : 'lastChild'];\n                // If the end is placed within the start the result will be removed\n                // So this checks if the out node is a bookmark node if it is it\n                // checks for another more suitable node\n                if (isRemoveBookmarkNode(out)) {\n                    out = out[start ? 'firstChild' : 'lastChild'];\n                }\n                // Since dom.remove removes empty text nodes then we need to try to find a better node\n                if (isText$b(out) && out.data.length === 0) {\n                    out = start ? node.previousSibling || node.nextSibling : node.nextSibling || node.previousSibling;\n                }\n                dom.remove(node, true);\n                return out;\n            }\n            else {\n                return null;\n            }\n        };\n        const removeRngStyle = (rng) => {\n            let startContainer;\n            let endContainer;\n            let expandedRng = expandRng(dom, rng, formatList, { includeTrailingSpace: rng.collapsed });\n            if (format.split) {\n                // Split text nodes\n                expandedRng = split(expandedRng);\n                startContainer = getContainer(ed, expandedRng, true);\n                endContainer = getContainer(ed, expandedRng);\n                if (startContainer !== endContainer) {\n                    // WebKit will render the table incorrectly if we wrap a TH or TD in a SPAN\n                    // so let's see if we can use the first/last child instead\n                    // This will happen if you triple click a table cell and use remove formatting\n                    startContainer = normalizeTableSelection(startContainer, true);\n                    endContainer = normalizeTableSelection(endContainer, false);\n                    // Wrap and split if nested\n                    if (isChildOfInlineParent(dom, startContainer, endContainer)) {\n                        const marker = Optional.from(startContainer.firstChild).getOr(startContainer);\n                        splitToFormatRoot(wrapWithSiblings(dom, marker, true, 'span', { 'id': '_start', 'data-mce-type': 'bookmark' }));\n                        unwrap(true);\n                        return;\n                    }\n                    // Wrap and split if nested\n                    if (isChildOfInlineParent(dom, endContainer, startContainer)) {\n                        const marker = Optional.from(endContainer.lastChild).getOr(endContainer);\n                        splitToFormatRoot(wrapWithSiblings(dom, marker, false, 'span', { 'id': '_end', 'data-mce-type': 'bookmark' }));\n                        unwrap(false);\n                        return;\n                    }\n                    // Wrap start/end nodes in span element since these might be cloned/moved\n                    startContainer = wrap$1(dom, startContainer, 'span', { 'id': '_start', 'data-mce-type': 'bookmark' });\n                    endContainer = wrap$1(dom, endContainer, 'span', { 'id': '_end', 'data-mce-type': 'bookmark' });\n                    // Split start/end and anything in between\n                    const newRng = dom.createRng();\n                    newRng.setStartAfter(startContainer);\n                    newRng.setEndBefore(endContainer);\n                    walk$3(dom, newRng, (nodes) => {\n                        each$e(nodes, (n) => {\n                            if (!isBookmarkNode$1(n) && !isBookmarkNode$1(n.parentNode)) {\n                                splitToFormatRoot(n);\n                            }\n                        });\n                    });\n                    splitToFormatRoot(startContainer);\n                    splitToFormatRoot(endContainer);\n                    // Unwrap start/end to get real elements again\n                    // Note that the return value should always be a node since it's wrapped above\n                    startContainer = unwrap(true);\n                    endContainer = unwrap();\n                }\n                else {\n                    startContainer = endContainer = splitToFormatRoot(startContainer);\n                }\n                // Update range positions since they might have changed after the split operations\n                expandedRng.startContainer = startContainer.parentNode ? startContainer.parentNode : startContainer;\n                expandedRng.startOffset = dom.nodeIndex(startContainer);\n                expandedRng.endContainer = endContainer.parentNode ? endContainer.parentNode : endContainer;\n                expandedRng.endOffset = dom.nodeIndex(endContainer) + 1;\n            }\n            // Remove items between start/end\n            walk$3(dom, expandedRng, (nodes) => {\n                each$e(nodes, process);\n            });\n        };\n        // Handle node\n        if (node) {\n            if (isNode(node)) {\n                const rng = dom.createRng();\n                rng.setStartBefore(node);\n                rng.setEndAfter(node);\n                removeRngStyle(rng);\n            }\n            else {\n                removeRngStyle(node);\n            }\n            fireFormatRemove(ed, name, node, vars);\n            return;\n        }\n        if (!selection.isCollapsed() || !isInlineFormat(format) || getCellsFromEditor(ed).length) {\n            // Remove formatting on the selection\n            preserveSelection(ed, () => runOnRanges(ed, removeRngStyle), \n            // Before trying to move the start of the selection, check if start element still has formatting then we are at: \"<b>text|</b>text\"\n            // and need to move the start into the next text node\n            (startNode) => isInlineFormat(format) && match$2(ed, name, vars, startNode));\n            ed.nodeChanged();\n        }\n        else {\n            removeCaretFormat(ed, name, vars, similar);\n        }\n        removeListStyleFormats(ed, name, vars);\n        fireFormatRemove(ed, name, node, vars);\n    };\n    const removeFormat$1 = (ed, name, vars, node, similar) => {\n        if (node || ed.selection.isEditable()) {\n            removeFormatInternal(ed, name, vars, node, similar);\n        }\n    };\n    const removeFormatOnElement = (editor, format, vars, node) => {\n        return removeNodeFormatInternal(editor, format, vars, node).fold(() => Optional.some(node), (newName) => Optional.some(editor.dom.rename(node, newName)), Optional.none);\n    };\n    /**\n     * Removes the specified format for the specified node. It will also remove the node if it doesn't have\n     * any attributes if the format specifies it to do so.\n     *\n     * @private\n     * @param {Object} format Format object with items to remove from node.\n     * @param {Object} vars Name/value object with variables to apply to format.\n     * @param {Node} node Node to remove the format styles on.\n     * @param {Node} compareNode Optional compare node, if specified the styles will be compared to that node.\n     * @return {Boolean} True/false if the node was removed or not.\n     */\n    const removeNodeFormat = (editor, format, vars, node, compareNode) => {\n        return removeNodeFormatInternal(editor, format, vars, node, compareNode).fold(never, (newName) => {\n            // If renaming we are guaranteed this is a Element, so cast\n            editor.dom.rename(node, newName);\n            return true;\n        }, always);\n    };\n\n    const fontSizeAlteringFormats = ['fontsize', 'subscript', 'superscript'];\n    const formatsToActOn = ['strikethrough', ...fontSizeAlteringFormats];\n    const hasFormat = (formatter, el, format) => isNonNullable(formatter.matchNode(el.dom, format, {}, format === 'fontsize'));\n    const isFontSizeAlteringElement = (formatter, el) => exists(fontSizeAlteringFormats, (format) => hasFormat(formatter, el, format));\n    const isNormalizingFormat = (format) => contains$2(formatsToActOn, format);\n    const gatherWrapperData = (isRoot, scope, hasFormat, createFormatElement, removeFormatFromElement) => {\n        const parents = parents$1(scope, isRoot).filter(isElement$8);\n        return findLastIndex(parents, hasFormat).map((index) => {\n            const container = parents[index];\n            const innerWrapper = createFormatElement(container);\n            const outerWrappers = [\n                ...removeFormatFromElement(shallow(container)).toArray(),\n                ...bind$3(parents.slice(0, index), (wrapper) => {\n                    if (hasFormat(wrapper)) {\n                        return removeFormatFromElement(wrapper).toArray();\n                    }\n                    else {\n                        return [shallow(wrapper)];\n                    }\n                })\n            ];\n            return { container, innerWrapper, outerWrappers };\n        });\n    };\n    const wrapChildrenInInnerWrapper = (target, wrapper, hasFormat, removeFormatFromElement) => {\n        each$e(children$2(target), (child) => {\n            if (isElement$8(child) && hasFormat(child)) {\n                if (removeFormatFromElement(child).isNone()) {\n                    unwrap(child);\n                }\n            }\n        });\n        each$e(children$2(target), (child) => append$1(wrapper, child));\n        prepend(target, wrapper);\n    };\n    const wrapInOuterWrappers = (target, wrappers) => {\n        if (wrappers.length > 0) {\n            const outermost = wrappers[wrappers.length - 1];\n            before$4(target, outermost);\n            const innerMost = foldl(wrappers.slice(0, wrappers.length - 1), (acc, wrapper) => {\n                append$1(acc, wrapper);\n                return wrapper;\n            }, outermost);\n            append$1(innerMost, target);\n        }\n    };\n    const normalizeFontSizeElementsInternal = (domUtils, fontSizeElements, hasFormat, createFormatElement, removeFormatFromElement) => {\n        const isRoot = (el) => eq(SugarElement.fromDom(domUtils.getRoot()), el) || domUtils.isBlock(el.dom);\n        each$e(fontSizeElements, (fontSizeElement) => {\n            gatherWrapperData(isRoot, fontSizeElement, hasFormat, createFormatElement, removeFormatFromElement).each(({ container, innerWrapper, outerWrappers }) => {\n                domUtils.split(container.dom, fontSizeElement.dom);\n                wrapChildrenInInnerWrapper(fontSizeElement, innerWrapper, hasFormat, removeFormatFromElement);\n                wrapInOuterWrappers(fontSizeElement, outerWrappers);\n            });\n        });\n    };\n    const normalizeFontSizeElementsWithFormat = (editor, formatName, fontSizeElements) => {\n        const hasFormat = (el) => isNonNullable(matchNode$1(editor, el.dom, formatName));\n        const createFormatElement = (el) => {\n            const newEl = SugarElement.fromTag(name(el));\n            const format = matchNode$1(editor, el.dom, formatName, {});\n            if (isNonNullable(format) && isApplyFormat(format)) {\n                setElementFormat(editor, newEl.dom, format);\n            }\n            return newEl;\n        };\n        const removeFormatFromElement = (el) => {\n            const format = matchNode$1(editor, el.dom, formatName, {});\n            if (isNonNullable(format)) {\n                return removeFormatOnElement(editor, format, {}, el.dom).map(SugarElement.fromDom);\n            }\n            else {\n                return Optional.some(el);\n            }\n        };\n        const bookmark = createBookmark(editor.selection.getRng());\n        normalizeFontSizeElementsInternal(editor.dom, fontSizeElements, hasFormat, createFormatElement, removeFormatFromElement);\n        editor.selection.setRng(resolveBookmark(bookmark));\n    };\n    const collectFontSizeElements = (formatter, wrappers) => bind$3(wrappers, (wrapper) => {\n        const fontSizeDescendants = descendants$1(wrapper, (el) => isFontSizeAlteringElement(formatter, el));\n        return isFontSizeAlteringElement(formatter, wrapper) ? [wrapper, ...fontSizeDescendants] : fontSizeDescendants;\n    });\n    const normalizeFontSizeElementsAfterApply = (editor, appliedFormat, wrappers) => {\n        if (isNormalizingFormat(appliedFormat)) {\n            const fontSizeElements = collectFontSizeElements(editor.formatter, wrappers);\n            normalizeFontSizeElementsWithFormat(editor, 'strikethrough', fontSizeElements);\n        }\n    };\n    const normalizeElements = (editor, elements) => {\n        const fontSizeElements = filter$5(elements, (el) => isFontSizeAlteringElement(editor.formatter, el));\n        normalizeFontSizeElementsWithFormat(editor, 'strikethrough', fontSizeElements);\n    };\n\n    const isHeading = (node) => ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(node.name);\n    const isSummary = (node) => node.name === 'summary';\n\n    const traverse = (root, fn) => {\n        let node = root;\n        while ((node = node.walk())) {\n            fn(node);\n        }\n    };\n    // Test a single node against the current filters, and add it to any match lists if necessary\n    const matchNode = (nodeFilters, attributeFilters, node, matches) => {\n        const name = node.name;\n        // Match node filters\n        for (let ni = 0, nl = nodeFilters.length; ni < nl; ni++) {\n            const filter = nodeFilters[ni];\n            if (filter.name === name) {\n                const match = matches.nodes[name];\n                if (match) {\n                    match.nodes.push(node);\n                }\n                else {\n                    matches.nodes[name] = { filter, nodes: [node] };\n                }\n            }\n        }\n        // Match attribute filters\n        if (node.attributes) {\n            for (let ai = 0, al = attributeFilters.length; ai < al; ai++) {\n                const filter = attributeFilters[ai];\n                const attrName = filter.name;\n                if (attrName in node.attributes.map) {\n                    const match = matches.attributes[attrName];\n                    if (match) {\n                        match.nodes.push(node);\n                    }\n                    else {\n                        matches.attributes[attrName] = { filter, nodes: [node] };\n                    }\n                }\n            }\n        }\n    };\n    const findMatchingNodes = (nodeFilters, attributeFilters, node) => {\n        const matches = { nodes: {}, attributes: {} };\n        if (node.firstChild) {\n            traverse(node, (childNode) => {\n                matchNode(nodeFilters, attributeFilters, childNode, matches);\n            });\n        }\n        return matches;\n    };\n    // Run all necessary node filters and attribute filters, based on a match set\n    const runFilters = (matches, args) => {\n        const run = (matchRecord, filteringAttributes) => {\n            each$d(matchRecord, (match) => {\n                // in theory we don't need to copy the array, it was created purely for this filtering, but the method is exported so we can't guarantee that\n                const nodes = from(match.nodes);\n                each$e(match.filter.callbacks, (callback) => {\n                    // very very carefully mutate the nodes array based on whether the filter still matches them\n                    for (let i = nodes.length - 1; i >= 0; i--) {\n                        const node = nodes[i];\n                        // Remove already removed children, and nodes that no longer match the filter\n                        const valueMatches = filteringAttributes ? node.attr(match.filter.name) !== undefined : node.name === match.filter.name;\n                        if (!valueMatches || isNullable(node.parent)) {\n                            nodes.splice(i, 1);\n                        }\n                    }\n                    if (nodes.length > 0) {\n                        callback(nodes, match.filter.name, args);\n                    }\n                });\n            });\n        };\n        run(matches.nodes, false);\n        run(matches.attributes, true);\n    };\n    const filter$1 = (nodeFilters, attributeFilters, node, args = {}) => {\n        const matches = findMatchingNodes(nodeFilters, attributeFilters, node);\n        runFilters(matches, args);\n    };\n\n    const paddEmptyNode = (settings, args, isBlock, node) => {\n        const brPreferred = settings.pad_empty_with_br || args.insert;\n        if (brPreferred && isBlock(node)) {\n            const astNode = new AstNode('br', 1);\n            if (args.insert) {\n                astNode.attr('data-mce-bogus', '1');\n            }\n            node.empty().append(astNode);\n        }\n        else {\n            node.empty().append(new AstNode('#text', 3)).value = nbsp;\n        }\n    };\n    const isPaddedWithNbsp = (node) => hasOnlyChild(node, '#text') && node?.firstChild?.value === nbsp;\n    const hasOnlyChild = (node, name) => {\n        const firstChild = node?.firstChild;\n        return isNonNullable(firstChild) && firstChild === node.lastChild && firstChild.name === name;\n    };\n    const isPadded = (schema, node) => {\n        const rule = schema.getElementRule(node.name);\n        return rule?.paddEmpty === true;\n    };\n    const isEmpty$2 = (schema, nonEmptyElements, whitespaceElements, node) => node.isEmpty(nonEmptyElements, whitespaceElements, (node) => isPadded(schema, node));\n    const isLineBreakNode = (node, isBlock) => isNonNullable(node) && (isBlock(node) || node.name === 'br');\n    const findClosestEditingHost = (scope) => {\n        let editableNode;\n        for (let node = scope; node; node = node.parent) {\n            const contentEditable = node.attr('contenteditable');\n            if (contentEditable === 'false') {\n                break;\n            }\n            else if (contentEditable === 'true') {\n                editableNode = node;\n            }\n        }\n        return Optional.from(editableNode);\n    };\n    const getAllDescendants = (scope) => {\n        const collection = [];\n        for (let node = scope.firstChild; isNonNullable(node); node = node.walk()) {\n            collection.push(node);\n        }\n        return collection;\n    };\n\n    const removeOrUnwrapInvalidNode = (node, schema, originalNodeParent = node.parent) => {\n        if (schema.getSpecialElements()[node.name]) {\n            node.empty().remove();\n        }\n        else {\n            // are the children of `node` valid children of the top level parent?\n            // if not, remove or unwrap them too\n            const children = node.children();\n            for (const childNode of children) {\n                if (originalNodeParent && !schema.isValidChild(originalNodeParent.name, childNode.name)) {\n                    removeOrUnwrapInvalidNode(childNode, schema, originalNodeParent);\n                }\n            }\n            node.unwrap();\n        }\n    };\n    const cleanInvalidNodes = (nodes, schema, rootNode, onCreate = noop) => {\n        const textBlockElements = schema.getTextBlockElements();\n        const nonEmptyElements = schema.getNonEmptyElements();\n        const whitespaceElements = schema.getWhitespaceElements();\n        const nonSplittableElements = Tools.makeMap('tr,td,th,tbody,thead,tfoot,table,summary');\n        const fixed = new Set();\n        const isSplittableElement = (node) => node !== rootNode && !nonSplittableElements[node.name];\n        for (let ni = 0; ni < nodes.length; ni++) {\n            const node = nodes[ni];\n            let parent;\n            let newParent;\n            let tempNode;\n            // Don't bother if it's detached from the tree\n            if (!node.parent || fixed.has(node)) {\n                continue;\n            }\n            // If the invalid element is a text block, and the text block is within a parent LI element\n            // Then unwrap the first text block and convert other sibling text blocks to LI elements similar to Word/Open Office\n            if (textBlockElements[node.name] && node.parent.name === 'li') {\n                // Move sibling text blocks after LI element\n                let sibling = node.next;\n                while (sibling) {\n                    if (textBlockElements[sibling.name]) {\n                        sibling.name = 'li';\n                        fixed.add(sibling);\n                        node.parent.insert(sibling, node.parent);\n                    }\n                    else {\n                        break;\n                    }\n                    sibling = sibling.next;\n                }\n                // Unwrap current text block\n                node.unwrap();\n                continue;\n            }\n            // Get list of all parent nodes until we find a valid parent to stick the child into\n            const parents = [node];\n            for (parent = node.parent; parent && !schema.isValidChild(parent.name, node.name) && isSplittableElement(parent); parent = parent.parent) {\n                parents.push(parent);\n            }\n            // Found a suitable parent\n            if (parent && parents.length > 1) {\n                // If the node is a valid child of the parent, then try to move it. Otherwise unwrap it\n                if (!isInvalid(schema, node, parent)) {\n                    // Reverse the array since it makes looping easier\n                    parents.reverse();\n                    // Clone the related parent and insert that after the moved node\n                    newParent = parents[0].clone();\n                    onCreate(newParent);\n                    // Start cloning and moving children on the left side of the target node\n                    let currentNode = newParent;\n                    for (let i = 0; i < parents.length - 1; i++) {\n                        if (schema.isValidChild(currentNode.name, parents[i].name) && i > 0) {\n                            tempNode = parents[i].clone();\n                            onCreate(tempNode);\n                            currentNode.append(tempNode);\n                        }\n                        else {\n                            tempNode = currentNode;\n                        }\n                        for (let childNode = parents[i].firstChild; childNode && childNode !== parents[i + 1];) {\n                            const nextNode = childNode.next;\n                            tempNode.append(childNode);\n                            childNode = nextNode;\n                        }\n                        currentNode = tempNode;\n                    }\n                    if (!isEmpty$2(schema, nonEmptyElements, whitespaceElements, newParent)) {\n                        parent.insert(newParent, parents[0], true);\n                        parent.insert(node, newParent);\n                    }\n                    else {\n                        parent.insert(node, parents[0], true);\n                    }\n                    // Check if the element is empty by looking through its contents, with special treatment for <p><br /></p>\n                    parent = parents[0];\n                    if (isEmpty$2(schema, nonEmptyElements, whitespaceElements, parent) || hasOnlyChild(parent, 'br')) {\n                        parent.empty().remove();\n                    }\n                }\n                else {\n                    removeOrUnwrapInvalidNode(node, schema);\n                }\n            }\n            else if (node.parent) {\n                // If it's an LI try to find a UL/OL for it or wrap it\n                if (node.name === 'li') {\n                    let sibling = node.prev;\n                    if (sibling && (sibling.name === 'ul' || sibling.name === 'ol')) {\n                        sibling.append(node);\n                        continue;\n                    }\n                    sibling = node.next;\n                    if (sibling && (sibling.name === 'ul' || sibling.name === 'ol') && sibling.firstChild) {\n                        sibling.insert(node, sibling.firstChild, true);\n                        continue;\n                    }\n                    const wrapper = new AstNode('ul', 1);\n                    onCreate(wrapper);\n                    node.wrap(wrapper);\n                    continue;\n                }\n                // Try wrapping the element in a DIV\n                if (schema.isValidChild(node.parent.name, 'div') && schema.isValidChild('div', node.name)) {\n                    const wrapper = new AstNode('div', 1);\n                    onCreate(wrapper);\n                    node.wrap(wrapper);\n                }\n                else {\n                    // We failed wrapping it, remove or unwrap it\n                    removeOrUnwrapInvalidNode(node, schema);\n                }\n            }\n        }\n    };\n    const hasClosest = (node, parentName) => {\n        let tempNode = node;\n        while (tempNode) {\n            if (tempNode.name === parentName) {\n                return true;\n            }\n            tempNode = tempNode.parent;\n        }\n        return false;\n    };\n    // The `parent` parameter of `isInvalid` function represents the closest valid parent\n    // under which the `node` is intended to be moved.\n    const isInvalid = (schema, node, parent = node.parent) => {\n        if (!parent) {\n            return false;\n        }\n        // Check if the node is a valid child of the parent node. If the child is\n        // unknown we don't collect it since it's probably a custom element\n        if (schema.children[node.name] && !schema.isValidChild(parent.name, node.name)) {\n            return true;\n        }\n        // Anchors are a special case and cannot be nested\n        if (node.name === 'a' && hasClosest(parent, 'a')) {\n            return true;\n        }\n        // heading element is valid if it is the only one child of summary\n        if (isSummary(parent) && isHeading(node)) {\n            return !(parent?.firstChild === node && parent?.lastChild === node);\n        }\n        return false;\n    };\n\n    const createRange = (sc, so, ec, eo) => {\n        const rng = document.createRange();\n        rng.setStart(sc, so);\n        rng.setEnd(ec, eo);\n        return rng;\n    };\n    // If you triple click a paragraph in this case:\n    //   <blockquote><p>a</p></blockquote><p>b</p>\n    // It would become this range in webkit:\n    //   <blockquote><p>[a</p></blockquote><p>]b</p>\n    // We would want it to be:\n    //   <blockquote><p>[a]</p></blockquote><p>b</p>\n    // Since it would otherwise produces spans out of thin air on insertContent for example.\n    const normalizeBlockSelectionRange = (rng) => {\n        const startPos = CaretPosition.fromRangeStart(rng);\n        const endPos = CaretPosition.fromRangeEnd(rng);\n        const rootNode = rng.commonAncestorContainer;\n        return fromPosition(false, rootNode, endPos)\n            .map((newEndPos) => {\n            if (!isInSameBlock(startPos, endPos, rootNode) && isInSameBlock(startPos, newEndPos, rootNode)) {\n                return createRange(startPos.container(), startPos.offset(), newEndPos.container(), newEndPos.offset());\n            }\n            else {\n                return rng;\n            }\n        }).getOr(rng);\n    };\n    const normalize = (rng) => rng.collapsed ? rng : normalizeBlockSelectionRange(rng);\n\n    const explode$1 = Tools.explode;\n    const create$8 = () => {\n        const filters = {};\n        const addFilter = (name, callback) => {\n            each$e(explode$1(name), (name) => {\n                if (!has$2(filters, name)) {\n                    filters[name] = { name, callbacks: [] };\n                }\n                filters[name].callbacks.push(callback);\n            });\n        };\n        const getFilters = () => values(filters);\n        const removeFilter = (name, callback) => {\n            each$e(explode$1(name), (name) => {\n                if (has$2(filters, name)) {\n                    if (isNonNullable(callback)) {\n                        const filter = filters[name];\n                        const newCallbacks = filter$5(filter.callbacks, (c) => c !== callback);\n                        // If all callbacks have been removed then remove the filter reference\n                        if (newCallbacks.length > 0) {\n                            filter.callbacks = newCallbacks;\n                        }\n                        else {\n                            delete filters[name];\n                        }\n                    }\n                    else {\n                        delete filters[name];\n                    }\n                }\n            });\n        };\n        return {\n            addFilter,\n            getFilters,\n            removeFilter\n        };\n    };\n\n    const encodeData = (data) => data.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');\n    const decodeData$1 = (data) => data.replace(/&lt;/g, '<').replace(/&gt;/g, '>').replace(/&amp;/g, '&');\n\n    const removeAttrs = (node, names) => {\n        each$e(names, (name) => {\n            node.attr(name, null);\n        });\n    };\n    const addFontToSpansFilter = (domParser, styles, fontSizes) => {\n        domParser.addNodeFilter('font', (nodes) => {\n            each$e(nodes, (node) => {\n                const props = styles.parse(node.attr('style'));\n                const color = node.attr('color');\n                const face = node.attr('face');\n                const size = node.attr('size');\n                if (color) {\n                    props.color = color;\n                }\n                if (face) {\n                    props['font-family'] = face;\n                }\n                if (size) {\n                    toInt(size).each((num) => {\n                        props['font-size'] = fontSizes[num - 1];\n                    });\n                }\n                node.name = 'span';\n                node.attr('style', styles.serialize(props));\n                removeAttrs(node, ['color', 'face', 'size']);\n            });\n        });\n    };\n    const addStrikeFilter = (domParser, schema, styles) => {\n        domParser.addNodeFilter('strike', (nodes) => {\n            const convertToSTag = schema.type !== 'html4';\n            each$e(nodes, (node) => {\n                if (convertToSTag) {\n                    node.name = 's';\n                }\n                else {\n                    const props = styles.parse(node.attr('style'));\n                    props['text-decoration'] = 'line-through';\n                    node.name = 'span';\n                    node.attr('style', styles.serialize(props));\n                }\n            });\n        });\n    };\n    const addFilters = (domParser, settings, schema) => {\n        const styles = Styles();\n        if (settings.convert_fonts_to_spans) {\n            addFontToSpansFilter(domParser, styles, Tools.explode(settings.font_size_legacy_values ?? ''));\n        }\n        addStrikeFilter(domParser, schema, styles);\n    };\n    const register$5 = (domParser, settings, schema) => {\n        if (settings.inline_styles) {\n            addFilters(domParser, settings, schema);\n        }\n    };\n\n    const blobUriToBlob = (url) => fetch(url)\n        .then((res) => res.ok ? res.blob() : Promise.reject())\n        .catch(() => Promise.reject({\n        message: `Cannot convert ${url} to Blob. Resource might not exist or is inaccessible.`,\n        uriType: 'blob'\n    }));\n    const extractBase64Data = (data) => {\n        const matches = /([a-z0-9+\\/=\\s]+)/i.exec(data);\n        return matches ? matches[1] : '';\n    };\n    const decodeData = (data) => {\n        try {\n            return decodeURIComponent(data);\n        }\n        catch {\n            return data;\n        }\n    };\n    const parseDataUri = (uri) => {\n        const [type, ...rest] = uri.split(',');\n        const data = rest.join(',');\n        const matches = /data:([^/]+\\/[^;]+)(;.+)?/.exec(type);\n        if (matches) {\n            const base64Encoded = matches[2] === ';base64';\n            const decodedData = decodeData(data);\n            const extractedData = base64Encoded ? extractBase64Data(decodedData) : decodedData;\n            return Optional.some({\n                type: matches[1],\n                data: extractedData,\n                base64Encoded\n            });\n        }\n        else {\n            return Optional.none();\n        }\n    };\n    const buildBlob = (type, data, base64Encoded = true) => {\n        let str = data;\n        if (base64Encoded) {\n            // Might throw error if data isn't proper base64\n            try {\n                str = atob(data);\n            }\n            catch {\n                return Optional.none();\n            }\n        }\n        const arr = new Uint8Array(str.length);\n        for (let i = 0; i < arr.length; i++) {\n            arr[i] = str.charCodeAt(i);\n        }\n        return Optional.some(new Blob([arr], { type }));\n    };\n    const dataUriToBlob = (uri) => {\n        return new Promise((resolve, reject) => {\n            parseDataUri(uri)\n                .bind(({ type, data, base64Encoded }) => buildBlob(type, data, base64Encoded))\n                .fold(() => reject('Invalid data URI'), resolve);\n        });\n    };\n    const uriToBlob = (url) => {\n        if (startsWith(url, 'blob:')) {\n            return blobUriToBlob(url);\n        }\n        else if (startsWith(url, 'data:')) {\n            return dataUriToBlob(url);\n        }\n        else {\n            return Promise.reject('Unknown URI format');\n        }\n    };\n    const blobToDataUri = (blob) => {\n        return new Promise((resolve, reject) => {\n            const reader = new FileReader();\n            reader.onloadend = () => {\n                resolve(reader.result);\n            };\n            reader.onerror = () => {\n                reject(reader.error?.message);\n            };\n            reader.readAsDataURL(blob);\n        });\n    };\n\n    let count$1 = 0;\n    const uniqueId$1 = (prefix) => {\n        return (prefix || 'blobid') + (count$1++);\n    };\n    const utf8Encode = (str) => foldl(new window.TextEncoder().encode(str), (acc, charCode) => acc + String.fromCharCode(charCode), '');\n    const processDataUri = (dataUri, base64Only, generateBlobInfo) => {\n        return parseDataUri(dataUri).bind(({ data, type, base64Encoded }) => {\n            if (base64Only && !base64Encoded) {\n                return Optional.none();\n            }\n            else {\n                const base64 = base64Encoded ? data : btoa(utf8Encode(data));\n                return generateBlobInfo(base64, type);\n            }\n        });\n    };\n    const createBlobInfo$1 = (blobCache, blob, base64) => {\n        const blobInfo = blobCache.create(uniqueId$1(), blob, base64);\n        blobCache.add(blobInfo);\n        return blobInfo;\n    };\n    const dataUriToBlobInfo = (blobCache, dataUri, base64Only = false) => {\n        return processDataUri(dataUri, base64Only, (base64, type) => Optional.from(blobCache.getByData(base64, type)).orThunk(() => buildBlob(type, base64).map((blob) => createBlobInfo$1(blobCache, blob, base64))));\n    };\n    const imageToBlobInfo = (blobCache, imageSrc) => {\n        const invalidDataUri = () => Promise.reject('Invalid data URI');\n        if (startsWith(imageSrc, 'blob:')) {\n            const blobInfo = blobCache.getByUri(imageSrc);\n            if (isNonNullable(blobInfo)) {\n                return Promise.resolve(blobInfo);\n            }\n            else {\n                return uriToBlob(imageSrc).then((blob) => {\n                    return blobToDataUri(blob).then((dataUri) => {\n                        return processDataUri(dataUri, false, (base64) => {\n                            return Optional.some(createBlobInfo$1(blobCache, blob, base64));\n                        }).getOrThunk(invalidDataUri);\n                    });\n                });\n            }\n        }\n        else if (startsWith(imageSrc, 'data:')) {\n            return dataUriToBlobInfo(blobCache, imageSrc).fold(invalidDataUri, (blobInfo) => Promise.resolve(blobInfo));\n        }\n        else {\n            // Not a blob or data URI so the image isn't a local image and isn't something that can be processed\n            return Promise.reject('Unknown image data format');\n        }\n    };\n\n    // TINY-10350: A modification of the Regexes.link regex to specifically capture host.\n    // eslint-disable-next-line max-len\n    const hostCaptureRegex = /^(?:(?:(?:[A-Za-z][A-Za-z\\d.+-]{0,14}:\\/\\/(?:[-.~*+=!&;:'%@?^${}(),\\w]+@)?|www\\.|[-;:&=+$,.\\w]+@)([A-Za-z\\d-]+(?:\\.[A-Za-z\\d-]+)*))(?::\\d+)?(?:\\/(?:[-.~*+=!;:'%@$(),\\/\\w]*[-~*+=%@$()\\/\\w])?)?(?:\\?(?:[-.~*+=!&;:'%@?^${}(),\\/\\w]+)?)?(?:#(?:[-.~*+=!&;:'%@?^${}(),\\/\\w]+)?)?)$/;\n    const extractHost = (url) => Optional.from(url.match(hostCaptureRegex)).bind((ms) => get$c(ms, 1)).map((h) => startsWith(h, 'www.') ? h.substring(4) : h);\n\n    const sandboxIframe = (iframeNode, exclusions) => {\n        if (Optional.from(iframeNode.attr('src')).bind(extractHost).forall((host) => !contains$2(exclusions, host))) {\n            iframeNode.attr('sandbox', '');\n        }\n    };\n    const isMimeType = (mime, type) => startsWith(mime, `${type}/`);\n    const getEmbedType = (type) => {\n        if (isUndefined(type)) {\n            return 'iframe';\n        }\n        else if (isMimeType(type, 'image')) {\n            return 'img';\n        }\n        else if (isMimeType(type, 'video')) {\n            return 'video';\n        }\n        else if (isMimeType(type, 'audio')) {\n            return 'audio';\n        }\n        else {\n            return 'iframe';\n        }\n    };\n    const createSafeEmbed = ({ type, src, width, height } = {}, sandboxIframes, sandboxIframesExclusions) => {\n        const name = getEmbedType(type);\n        const embed = new AstNode(name, 1);\n        embed.attr(name === 'audio' ? { src } : { src, width, height });\n        // TINY-10349: Show controls for audio and video so the replaced embed is visible in editor.\n        if (name === 'audio' || name === 'video') {\n            embed.attr('controls', '');\n        }\n        if (name === 'iframe' && sandboxIframes) {\n            sandboxIframe(embed, sandboxIframesExclusions);\n        }\n        return embed;\n    };\n\n    const isBogusImage = (img) => isNonNullable(img.attr('data-mce-bogus'));\n    const isInternalImageSource = (img) => img.attr('src') === Env.transparentSrc || isNonNullable(img.attr('data-mce-placeholder'));\n    const registerBase64ImageFilter = (parser, settings) => {\n        const { blob_cache: blobCache } = settings;\n        if (blobCache) {\n            const processImage = (img) => {\n                const inputSrc = img.attr('src');\n                if (isInternalImageSource(img) || isBogusImage(img) || isNullable(inputSrc)) {\n                    return;\n                }\n                dataUriToBlobInfo(blobCache, inputSrc, true).each((blobInfo) => {\n                    img.attr('src', blobInfo.blobUri());\n                });\n            };\n            parser.addAttributeFilter('src', (nodes) => each$e(nodes, processImage));\n        }\n    };\n    const register$4 = (parser, settings) => {\n        const schema = parser.schema;\n        parser.addAttributeFilter('href', (nodes) => {\n            let i = nodes.length;\n            const appendRel = (rel) => {\n                const parts = rel.split(' ').filter((p) => p.length > 0);\n                return parts.concat(['noopener']).sort().join(' ');\n            };\n            const addNoOpener = (rel) => {\n                const newRel = rel ? Tools.trim(rel) : '';\n                if (!/\\b(noopener)\\b/g.test(newRel)) {\n                    return appendRel(newRel);\n                }\n                else {\n                    return newRel;\n                }\n            };\n            if (!settings.allow_unsafe_link_target) {\n                while (i--) {\n                    const node = nodes[i];\n                    if (node.name === 'a' && node.attr('target') === '_blank') {\n                        node.attr('rel', addNoOpener(node.attr('rel')));\n                    }\n                }\n            }\n        });\n        // Force anchor names closed, unless the setting \"allow_html_in_named_anchor\" is explicitly included.\n        if (!settings.allow_html_in_named_anchor) {\n            parser.addAttributeFilter('id,name', (nodes) => {\n                let i = nodes.length, sibling, prevSibling, parent, node;\n                while (i--) {\n                    node = nodes[i];\n                    if (node.name === 'a' && node.firstChild && !node.attr('href')) {\n                        parent = node.parent;\n                        // Move children after current node\n                        sibling = node.lastChild;\n                        while (sibling && parent) {\n                            prevSibling = sibling.prev;\n                            parent.insert(sibling, node);\n                            sibling = prevSibling;\n                        }\n                    }\n                }\n            });\n        }\n        if (settings.fix_list_elements) {\n            parser.addNodeFilter('ul,ol', (nodes) => {\n                let i = nodes.length, node, parentNode;\n                while (i--) {\n                    node = nodes[i];\n                    parentNode = node.parent;\n                    if (parentNode && (parentNode.name === 'ul' || parentNode.name === 'ol')) {\n                        if (node.prev && node.prev.name === 'li') {\n                            node.prev.append(node);\n                        }\n                        else {\n                            const li = new AstNode('li', 1);\n                            li.attr('style', 'list-style-type: none');\n                            node.wrap(li);\n                        }\n                    }\n                }\n            });\n        }\n        const validClasses = schema.getValidClasses();\n        if (settings.validate && validClasses) {\n            parser.addAttributeFilter('class', (nodes) => {\n                let i = nodes.length;\n                while (i--) {\n                    const node = nodes[i];\n                    const clazz = node.attr('class') ?? '';\n                    const classList = Tools.explode(clazz, ' ');\n                    let classValue = '';\n                    for (let ci = 0; ci < classList.length; ci++) {\n                        const className = classList[ci];\n                        let valid = false;\n                        let validClassesMap = validClasses['*'];\n                        if (validClassesMap && validClassesMap[className]) {\n                            valid = true;\n                        }\n                        validClassesMap = validClasses[node.name];\n                        if (!valid && validClassesMap && validClassesMap[className]) {\n                            valid = true;\n                        }\n                        if (valid) {\n                            if (classValue) {\n                                classValue += ' ';\n                            }\n                            classValue += className;\n                        }\n                    }\n                    if (!classValue.length) {\n                        classValue = null;\n                    }\n                    node.attr('class', classValue);\n                }\n            });\n        }\n        registerBase64ImageFilter(parser, settings);\n        const shouldSandboxIframes = settings.sandbox_iframes ?? false;\n        const sandboxIframesExclusions = unique$1(settings.sandbox_iframes_exclusions ?? []);\n        if (settings.convert_unsafe_embeds) {\n            parser.addNodeFilter('object,embed', (nodes) => each$e(nodes, (node) => {\n                node.replace(createSafeEmbed({\n                    type: node.attr('type'),\n                    src: node.name === 'object' ? node.attr('data') : node.attr('src'),\n                    width: node.attr('width'),\n                    height: node.attr('height'),\n                }, shouldSandboxIframes, sandboxIframesExclusions));\n            }));\n        }\n        if (shouldSandboxIframes) {\n            parser.addNodeFilter('iframe', (nodes) => each$e(nodes, (node) => sandboxIframe(node, sandboxIframesExclusions)));\n        }\n    };\n\n    /*! @license DOMPurify 3.4.12 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.12/LICENSE */\n\n    function _arrayLikeToArray(r, a) {\n      (null == a || a > r.length) && (a = r.length);\n      for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];\n      return n;\n    }\n    function _arrayWithHoles(r) {\n      if (Array.isArray(r)) return r;\n    }\n    function _iterableToArrayLimit(r, l) {\n      var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n      if (null != t) {\n        var e,\n          n,\n          i,\n          u,\n          a = [],\n          f = true,\n          o = false;\n        try {\n          if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n        } catch (r) {\n          o = true, n = r;\n        } finally {\n          try {\n            if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;\n          } finally {\n            if (o) throw n;\n          }\n        }\n        return a;\n      }\n    }\n    function _nonIterableRest() {\n      throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n    }\n    function _slicedToArray(r, e) {\n      return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();\n    }\n    function _unsupportedIterableToArray(r, a) {\n      if (r) {\n        if (\"string\" == typeof r) return _arrayLikeToArray(r, a);\n        var t = {}.toString.call(r).slice(8, -1);\n        return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;\n      }\n    }\n\n    const entries = Object.entries,\n      setPrototypeOf = Object.setPrototypeOf,\n      isFrozen = Object.isFrozen,\n      getPrototypeOf = Object.getPrototypeOf,\n      getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n    let freeze = Object.freeze,\n      seal = Object.seal,\n      create$7 = Object.create; // eslint-disable-line import/no-mutable-exports\n    let _ref = typeof Reflect !== 'undefined' && Reflect,\n      apply = _ref.apply,\n      construct = _ref.construct;\n    if (!freeze) {\n      freeze = function freeze(x) {\n        return x;\n      };\n    }\n    if (!seal) {\n      seal = function seal(x) {\n        return x;\n      };\n    }\n    if (!apply) {\n      apply = function apply(func, thisArg) {\n        for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n          args[_key - 2] = arguments[_key];\n        }\n        return func.apply(thisArg, args);\n      };\n    }\n    if (!construct) {\n      construct = function construct(Func) {\n        for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n          args[_key2 - 1] = arguments[_key2];\n        }\n        return new Func(...args);\n      };\n    }\n    const arrayForEach = unapply(Array.prototype.forEach);\n    const arrayLastIndexOf = unapply(Array.prototype.lastIndexOf);\n    const arrayPop = unapply(Array.prototype.pop);\n    const arrayPush = unapply(Array.prototype.push);\n    const arraySplice = unapply(Array.prototype.splice);\n    const arrayIsArray = Array.isArray;\n    const stringToLowerCase = unapply(String.prototype.toLowerCase);\n    const stringToString = unapply(String.prototype.toString);\n    const stringMatch = unapply(String.prototype.match);\n    const stringReplace = unapply(String.prototype.replace);\n    const stringIndexOf = unapply(String.prototype.indexOf);\n    const stringTrim = unapply(String.prototype.trim);\n    const numberToString = unapply(Number.prototype.toString);\n    const booleanToString = unapply(Boolean.prototype.toString);\n    const bigintToString = typeof BigInt === 'undefined' ? null : unapply(BigInt.prototype.toString);\n    const symbolToString = typeof Symbol === 'undefined' ? null : unapply(Symbol.prototype.toString);\n    const objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);\n    const objectToString = unapply(Object.prototype.toString);\n    const regExpTest = unapply(RegExp.prototype.test);\n    const typeErrorCreate = unconstruct(TypeError);\n    /**\n     * Creates a new function that calls the given function with a specified thisArg and arguments.\n     *\n     * @param func - The function to be wrapped and called.\n     * @returns A new function that calls the given function with a specified thisArg and arguments.\n     */\n    function unapply(func) {\n      return function (thisArg) {\n        if (thisArg instanceof RegExp) {\n          thisArg.lastIndex = 0;\n        }\n        for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n          args[_key3 - 1] = arguments[_key3];\n        }\n        return apply(func, thisArg, args);\n      };\n    }\n    /**\n     * Creates a new function that constructs an instance of the given constructor function with the provided arguments.\n     *\n     * @param func - The constructor function to be wrapped and called.\n     * @returns A new function that constructs an instance of the given constructor function with the provided arguments.\n     */\n    function unconstruct(Func) {\n      return function () {\n        for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n          args[_key4] = arguments[_key4];\n        }\n        return construct(Func, args);\n      };\n    }\n    /**\n     * Add properties to a lookup table\n     *\n     * @param set - The set to which elements will be added.\n     * @param array - The array containing elements to be added to the set.\n     * @param transformCaseFunc - An optional function to transform the case of each element before adding to the set.\n     * @returns The modified set with added elements.\n     */\n    function addToSet(set, array) {\n      let transformCaseFunc = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : stringToLowerCase;\n      if (setPrototypeOf) {\n        // Make 'in' and truthy checks like Boolean(set.constructor)\n        // independent of any properties defined on Object.prototype.\n        // Prevent prototype setters from intercepting set as a this value.\n        setPrototypeOf(set, null);\n      }\n      if (!arrayIsArray(array)) {\n        return set;\n      }\n      let l = array.length;\n      while (l--) {\n        let element = array[l];\n        if (typeof element === 'string') {\n          const lcElement = transformCaseFunc(element);\n          if (lcElement !== element) {\n            // Config presets (e.g. tags.js, attrs.js) are immutable.\n            if (!isFrozen(array)) {\n              array[l] = lcElement;\n            }\n            element = lcElement;\n          }\n        }\n        set[element] = true;\n      }\n      return set;\n    }\n    /**\n     * Clean up an array to harden against CSPP\n     *\n     * @param array - The array to be cleaned.\n     * @returns The cleaned version of the array\n     */\n    function cleanArray(array) {\n      for (let index = 0; index < array.length; index++) {\n        const isPropertyExist = objectHasOwnProperty(array, index);\n        if (!isPropertyExist) {\n          array[index] = null;\n        }\n      }\n      return array;\n    }\n    /**\n     * Shallow clone an object\n     *\n     * @param object - The object to be cloned.\n     * @returns A new object that copies the original.\n     */\n    function clone(object) {\n      const newObject = create$7(null);\n      for (const _ref2 of entries(object)) {\n        var _ref3 = _slicedToArray(_ref2, 2);\n        const property = _ref3[0];\n        const value = _ref3[1];\n        const isPropertyExist = objectHasOwnProperty(object, property);\n        if (isPropertyExist) {\n          if (arrayIsArray(value)) {\n            newObject[property] = cleanArray(value);\n          } else if (value && typeof value === 'object' && value.constructor === Object) {\n            newObject[property] = clone(value);\n          } else {\n            newObject[property] = value;\n          }\n        }\n      }\n      return newObject;\n    }\n    /**\n     * Convert non-node values into strings without depending on direct property access.\n     *\n     * @param value - The value to stringify.\n     * @returns A string representation of the provided value.\n     */\n    function stringifyValue(value) {\n      switch (typeof value) {\n        case 'string':\n          {\n            return value;\n          }\n        case 'number':\n          {\n            return numberToString(value);\n          }\n        case 'boolean':\n          {\n            return booleanToString(value);\n          }\n        case 'bigint':\n          {\n            return bigintToString ? bigintToString(value) : '0';\n          }\n        case 'symbol':\n          {\n            return symbolToString ? symbolToString(value) : 'Symbol()';\n          }\n        case 'undefined':\n          {\n            return objectToString(value);\n          }\n        case 'function':\n        case 'object':\n          {\n            if (value === null) {\n              return objectToString(value);\n            }\n            const valueAsRecord = value;\n            const valueToString = lookupGetter(valueAsRecord, 'toString');\n            if (typeof valueToString === 'function') {\n              const stringified = valueToString(valueAsRecord);\n              return typeof stringified === 'string' ? stringified : objectToString(stringified);\n            }\n            return objectToString(value);\n          }\n        default:\n          {\n            return objectToString(value);\n          }\n      }\n    }\n    /**\n     * This method automatically checks if the prop is function or getter and behaves accordingly.\n     *\n     * @param object - The object to look up the getter function in its prototype chain.\n     * @param prop - The property name for which to find the getter function.\n     * @returns The getter function found in the prototype chain or a fallback function.\n     */\n    function lookupGetter(object, prop) {\n      while (object !== null) {\n        const desc = getOwnPropertyDescriptor(object, prop);\n        if (desc) {\n          if (desc.get) {\n            return unapply(desc.get);\n          }\n          if (typeof desc.value === 'function') {\n            return unapply(desc.value);\n          }\n        }\n        object = getPrototypeOf(object);\n      }\n      function fallbackValue() {\n        return null;\n      }\n      return fallbackValue;\n    }\n    function isRegex(value) {\n      try {\n        regExpTest(value, '');\n        return true;\n      } catch (_unused) {\n        return false;\n      }\n    }\n\n    const html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'search', 'section', 'select', 'shadow', 'slot', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']);\n    const svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'enterkeyhint', 'exportparts', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'inputmode', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'part', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);\n    const svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']);\n    // List of SVG elements that are disallowed by default.\n    // We still need to know them so that we can do namespace\n    // checks properly in case one wants to add them to\n    // allow-list.\n    const svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);\n    const mathMl$1 = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover', 'mprescripts']);\n    // Similarly to SVG, we want to know all MathML elements,\n    // even those that we disallow by default.\n    const mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);\n    const text = freeze(['#text']);\n\n    const html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'command', 'commandfor', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'exportparts', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inert', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'part', 'pattern', 'placeholder', 'playsinline', 'popover', 'popovertarget', 'popovertargetaction', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'slot', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'wrap', 'xmlns']);\n    const svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'amplitude', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dominant-baseline', 'dur', 'edgemode', 'elevation', 'end', 'exponent', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'intercept', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'mask-type', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'slope', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'tablevalues', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-orientation', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);\n    const mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnalign', 'columnlines', 'columnspacing', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lquote', 'lspace', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);\n    const xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);\n\n    const MUSTACHE_EXPR = seal(/{{[\\w\\W]*|^[\\w\\W]*}}/g);\n    const ERB_EXPR = seal(/<%[\\w\\W]*|^[\\w\\W]*%>/g);\n    const TMPLIT_EXPR = seal(/\\${[\\w\\W]*/g);\n    const DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]+$/); // eslint-disable-line no-useless-escape\n    const ARIA_ATTR = seal(/^aria-[\\-\\w]+$/); // eslint-disable-line no-useless-escape\n    const IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i // eslint-disable-line no-useless-escape\n    );\n    const IS_SCRIPT_OR_DATA = seal(/^(?:\\w+script|data):/i);\n    const ATTR_WHITESPACE = seal(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g // eslint-disable-line no-control-regex\n    );\n    const DOCTYPE_NAME = seal(/^html$/i);\n    const CUSTOM_ELEMENT = seal(/^[a-z][.\\w]*(-[.\\w]+)+$/i);\n    // Markup-significant character probes used by _sanitizeElements.\n    // Shared module-level instances are safe despite the sticky /g flags:\n    // unapply() resets lastIndex for RegExp receivers before every call.\n    const ELEMENT_MARKUP_PROBE = seal(/<[/\\w!]/g);\n    const COMMENT_MARKUP_PROBE = seal(/<[/\\w]/g);\n    const FALLBACK_TAG_CLOSE = seal(/<\\/no(script|embed|frames)/i);\n    const SELF_CLOSING_TAG = seal(/\\/>/i);\n\n    // https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType\n    const NODE_TYPE = {\n      element: 1,\n      attribute: 2,\n      text: 3,\n      cdataSection: 4,\n      entityReference: 5,\n      // Deprecated\n      entityNode: 6,\n      // Deprecated\n      processingInstruction: 7,\n      comment: 8,\n      document: 9,\n      documentType: 10,\n      documentFragment: 11,\n      notation: 12 // Deprecated\n    };\n    const getGlobal = function getGlobal() {\n      return typeof window === 'undefined' ? null : window;\n    };\n    /**\n     * Creates a no-op policy for internal use only.\n     * Don't export this function outside this module!\n     * @param trustedTypes The policy factory.\n     * @param purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).\n     * @return The policy created (or null, if Trusted Types\n     * are not supported or creating the policy failed).\n     */\n    const _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, purifyHostElement) {\n      if (typeof trustedTypes !== 'object' || typeof trustedTypes.createPolicy !== 'function') {\n        return null;\n      }\n      // Allow the callers to control the unique policy name\n      // by adding a data-tt-policy-suffix to the script element with the DOMPurify.\n      // Policy creation with duplicate names throws in Trusted Types.\n      let suffix = null;\n      const ATTR_NAME = 'data-tt-policy-suffix';\n      if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) {\n        suffix = purifyHostElement.getAttribute(ATTR_NAME);\n      }\n      const policyName = 'dompurify' + (suffix ? '#' + suffix : '');\n      try {\n        return trustedTypes.createPolicy(policyName, {\n          createHTML(html) {\n            return html;\n          },\n          createScriptURL(scriptUrl) {\n            return scriptUrl;\n          }\n        });\n      } catch (_) {\n        // Policy creation failed (most likely another DOMPurify script has\n        // already run). Skip creating the policy, as this will only cause errors\n        // if TT are enforced.\n        console.warn('TrustedTypes policy ' + policyName + ' could not be created.');\n        return null;\n      }\n    };\n    const _createHooksMap = function _createHooksMap() {\n      return {\n        afterSanitizeAttributes: [],\n        afterSanitizeElements: [],\n        afterSanitizeShadowDOM: [],\n        beforeSanitizeAttributes: [],\n        beforeSanitizeElements: [],\n        beforeSanitizeShadowDOM: [],\n        uponSanitizeAttribute: [],\n        uponSanitizeElement: [],\n        uponSanitizeShadowNode: []\n      };\n    };\n    /**\n     * Resolve a set-valued configuration option: a fresh set built from\n     * cfg[key] when it is an own array property (seeded with a clone of\n     * options.base when given, case-normalized via options.transform),\n     * the fallback set otherwise.\n     *\n     * @param cfg the cloned, prototype-free configuration object\n     * @param key the configuration property to read\n     * @param fallback the set to use when the option is absent or not an array\n     * @param options transform and optional base set to merge into\n     * @returns the resolved set\n     */\n    const _resolveSetOption = function _resolveSetOption(cfg, key, fallback, options) {\n      return objectHasOwnProperty(cfg, key) && arrayIsArray(cfg[key]) ? addToSet(options.base ? clone(options.base) : {}, cfg[key], options.transform) : fallback;\n    };\n    function createDOMPurify() {\n      let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();\n      const DOMPurify = root => createDOMPurify(root);\n      DOMPurify.version = '3.4.12';\n      DOMPurify.removed = [];\n      if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {\n        // Not running in a browser, provide a factory function\n        // so that you can pass your own Window\n        DOMPurify.isSupported = false;\n        return DOMPurify;\n      }\n      let document = window.document;\n      const originalDocument = document;\n      const currentScript = originalDocument.currentScript;\n      window.DocumentFragment;\n        const HTMLTemplateElement = window.HTMLTemplateElement,\n        Node = window.Node,\n        Element = window.Element,\n        NodeFilter = window.NodeFilter,\n        _window$NamedNodeMap = window.NamedNodeMap;\n        _window$NamedNodeMap === void 0 ? window.NamedNodeMap || window.MozNamedAttrMap : _window$NamedNodeMap;\n        window.HTMLFormElement;\n        const DOMParser = window.DOMParser,\n        trustedTypes = window.trustedTypes;\n      const ElementPrototype = Element.prototype;\n      const cloneNode = lookupGetter(ElementPrototype, 'cloneNode');\n      const remove = lookupGetter(ElementPrototype, 'remove');\n      const getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');\n      const getChildNodes = lookupGetter(ElementPrototype, 'childNodes');\n      const getParentNode = lookupGetter(ElementPrototype, 'parentNode');\n      const getShadowRoot = lookupGetter(ElementPrototype, 'shadowRoot');\n      const getAttributes = lookupGetter(ElementPrototype, 'attributes');\n      const getNodeType = Node && Node.prototype ? lookupGetter(Node.prototype, 'nodeType') : null;\n      const getNodeName = Node && Node.prototype ? lookupGetter(Node.prototype, 'nodeName') : null;\n      // As per issue #47, the web-components registry is inherited by a\n      // new document created via createHTMLDocument. As per the spec\n      // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)\n      // a new empty registry is used when creating a template contents owner\n      // document, so we use that as our parent document to ensure nothing\n      // is inherited.\n      if (typeof HTMLTemplateElement === 'function') {\n        const template = document.createElement('template');\n        if (template.content && template.content.ownerDocument) {\n          document = template.content.ownerDocument;\n        }\n      }\n      let trustedTypesPolicy;\n      let emptyHTML = '';\n      // The instance's own internal Trusted Types policy. Unlike a caller-supplied\n      // `TRUSTED_TYPES_POLICY`, this is created at most once \u2014 Trusted Types throws\n      // on duplicate policy names \u2014 and is the only policy allowed to persist\n      // across configurations and survive `clearConfig()`.\n      let defaultTrustedTypesPolicy;\n      let defaultTrustedTypesPolicyResolved = false;\n      // Tracks whether we are already inside a call to the configured Trusted Types\n      // policy (`createHTML` or `createScriptURL`). If a supplied policy callback\n      // itself calls `DOMPurify.sanitize` (the cause of #1422), `sanitize` would\n      // re-enter the policy and recurse until the stack overflows. We detect that\n      // re-entry and throw a clear, actionable error instead. The guard is shared\n      // across both callbacks, because either one re-entering `sanitize` triggers\n      // the same unbounded recursion.\n      let IN_TRUSTED_TYPES_POLICY = 0;\n      const _assertNotInTrustedTypesPolicy = function _assertNotInTrustedTypesPolicy() {\n        if (IN_TRUSTED_TYPES_POLICY > 0) {\n          throw typeErrorCreate('A configured TRUSTED_TYPES_POLICY callback (createHTML or ' + 'createScriptURL) must not call DOMPurify.sanitize, as that causes ' + 'infinite recursion. Do not pass a policy whose callbacks wrap ' + 'DOMPurify as TRUSTED_TYPES_POLICY; see the \"DOMPurify and Trusted ' + 'Types\" section of the README.');\n        }\n      };\n      const _createTrustedHTML = function _createTrustedHTML(html) {\n        _assertNotInTrustedTypesPolicy();\n        IN_TRUSTED_TYPES_POLICY++;\n        try {\n          return trustedTypesPolicy.createHTML(html);\n        } finally {\n          IN_TRUSTED_TYPES_POLICY--;\n        }\n      };\n      const _createTrustedScriptURL = function _createTrustedScriptURL(scriptUrl) {\n        _assertNotInTrustedTypesPolicy();\n        IN_TRUSTED_TYPES_POLICY++;\n        try {\n          return trustedTypesPolicy.createScriptURL(scriptUrl);\n        } finally {\n          IN_TRUSTED_TYPES_POLICY--;\n        }\n      };\n      // Lazily resolve (and cache) the instance's internal default policy.\n      // Resolution is attempted at most once: a successful `createPolicy` cannot be\n      // repeated (Trusted Types throws on duplicate names), and a failed or\n      // unsupported attempt must not be retried on every parse.\n      const _getDefaultTrustedTypesPolicy = function _getDefaultTrustedTypesPolicy() {\n        if (!defaultTrustedTypesPolicyResolved) {\n          defaultTrustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);\n          defaultTrustedTypesPolicyResolved = true;\n        }\n        return defaultTrustedTypesPolicy;\n      };\n      const _document = document,\n        implementation = _document.implementation,\n        createNodeIterator = _document.createNodeIterator,\n        createDocumentFragment = _document.createDocumentFragment,\n        getElementsByTagName = _document.getElementsByTagName;\n      const importNode = originalDocument.importNode;\n      let hooks = _createHooksMap();\n      /**\n       * Expose whether this browser supports running the full DOMPurify.\n       */\n      DOMPurify.isSupported = typeof entries === 'function' && typeof getParentNode === 'function' && implementation && implementation.createHTMLDocument !== undefined;\n      const MUSTACHE_EXPR$1 = MUSTACHE_EXPR,\n        ERB_EXPR$1 = ERB_EXPR,\n        TMPLIT_EXPR$1 = TMPLIT_EXPR,\n        DATA_ATTR$1 = DATA_ATTR,\n        ARIA_ATTR$1 = ARIA_ATTR,\n        IS_SCRIPT_OR_DATA$1 = IS_SCRIPT_OR_DATA,\n        ATTR_WHITESPACE$1 = ATTR_WHITESPACE,\n        CUSTOM_ELEMENT$1 = CUSTOM_ELEMENT;\n      let IS_ALLOWED_URI$1 = IS_ALLOWED_URI;\n      /**\n       * We consider the elements and attributes below to be safe. Ideally\n       * don't add any new ones but feel free to remove unwanted ones.\n       */\n      /* allowed element names */\n      let ALLOWED_TAGS = null;\n      const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]);\n      /* Allowed attribute names */\n      let ALLOWED_ATTR = null;\n      const DEFAULT_ALLOWED_ATTR = addToSet({}, [...html, ...svg, ...mathMl, ...xml]);\n      /*\n       * Configure how DOMPurify should handle custom elements and their attributes as well as customized built-in elements.\n       * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)\n       * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)\n       * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.\n       */\n      let CUSTOM_ELEMENT_HANDLING = Object.seal(create$7(null, {\n        tagNameCheck: {\n          writable: true,\n          configurable: false,\n          enumerable: true,\n          value: null\n        },\n        attributeNameCheck: {\n          writable: true,\n          configurable: false,\n          enumerable: true,\n          value: null\n        },\n        allowCustomizedBuiltInElements: {\n          writable: true,\n          configurable: false,\n          enumerable: true,\n          value: false\n        }\n      }));\n      /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\n      let FORBID_TAGS = null;\n      /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\n      let FORBID_ATTR = null;\n      /* Config object to store ADD_TAGS/ADD_ATTR functions (when used as functions) */\n      const EXTRA_ELEMENT_HANDLING = Object.seal(create$7(null, {\n        tagCheck: {\n          writable: true,\n          configurable: false,\n          enumerable: true,\n          value: null\n        },\n        attributeCheck: {\n          writable: true,\n          configurable: false,\n          enumerable: true,\n          value: null\n        }\n      }));\n      /* Decide if ARIA attributes are okay */\n      let ALLOW_ARIA_ATTR = true;\n      /* Decide if custom data attributes are okay */\n      let ALLOW_DATA_ATTR = true;\n      /* Decide if unknown protocols are okay */\n      let ALLOW_UNKNOWN_PROTOCOLS = false;\n      /* Decide if self-closing tags in attributes are allowed.\n       * Usually removed due to a mXSS issue in jQuery 3.0 */\n      let ALLOW_SELF_CLOSE_IN_ATTR = true;\n      /* Output should be safe for common template engines.\n       * This means, DOMPurify removes data attributes, mustaches and ERB\n       */\n      let SAFE_FOR_TEMPLATES = false;\n      /* Output should be safe even for XML used within HTML and alike.\n       * This means, DOMPurify removes comments when containing risky content.\n       */\n      let SAFE_FOR_XML = true;\n      /* Decide if document with <html>... should be returned */\n      let WHOLE_DOCUMENT = false;\n      /* Track whether config is already set on this instance of DOMPurify. */\n      let SET_CONFIG = false;\n      /* Pristine allowlist bindings captured at setConfig() time. On the\n       * persistent-config path sanitize() restores the sets from these before\n       * the per-walk hook clone-guard, so a hook's in-call widening cannot\n       * carry across calls. Null until setConfig() is called; reset by\n       * clearConfig(). */\n      let SET_CONFIG_ALLOWED_TAGS = null;\n      let SET_CONFIG_ALLOWED_ATTR = null;\n      /* Decide if all elements (e.g. style, script) must be children of\n       * document.body. By default, browsers might move them to document.head */\n      let FORCE_BODY = false;\n      /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html\n       * string (or a TrustedHTML object if Trusted Types are supported).\n       * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead\n       */\n      let RETURN_DOM = false;\n      /* Decide if a DOM `DocumentFragment` should be returned, instead of a html\n       * string  (or a TrustedHTML object if Trusted Types are supported) */\n      let RETURN_DOM_FRAGMENT = false;\n      /* Try to return a Trusted Type object instead of a string, return a string in\n       * case Trusted Types are not supported  */\n      let RETURN_TRUSTED_TYPE = false;\n      /* Output should be free from DOM clobbering attacks?\n       * This sanitizes markups named with colliding, clobberable built-in DOM APIs.\n       */\n      let SANITIZE_DOM = true;\n      /* Achieve full DOM Clobbering protection by isolating the namespace of named\n       * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.\n       *\n       * HTML/DOM spec rules that enable DOM Clobbering:\n       *   - Named Access on Window (\u00A77.3.3)\n       *   - DOM Tree Accessors (\u00A73.1.5)\n       *   - Form Element Parent-Child Relations (\u00A74.10.3)\n       *   - Iframe srcdoc / Nested WindowProxies (\u00A74.8.5)\n       *   - HTMLCollection (\u00A74.2.10.2)\n       *\n       * Namespace isolation is implemented by prefixing `id` and `name` attributes\n       * with a constant string, i.e., `user-content-`\n       */\n      let SANITIZE_NAMED_PROPS = false;\n      const SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';\n      /* Keep element content when removing element? */\n      let KEEP_CONTENT = true;\n      /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead\n       * of importing it into a new Document and returning a sanitized copy */\n      let IN_PLACE = false;\n      /* Allow usage of profiles like html, svg and mathMl */\n      let USE_PROFILES = {};\n      /* Tags to ignore content of when KEEP_CONTENT is true */\n      let FORBID_CONTENTS = null;\n      const DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script',\n      // <selectedcontent> mirrors the selected <option>'s subtree, cloned by\n      // the UA (customizable <select>) \u2014 including any on* handlers \u2014 and the\n      // engine re-mirrors synchronously whenever a removal changes which\n      // option/selectedcontent is current, even inside DOMPurify's inert\n      // DOMParser document. Hoisting its children on removal re-inserts a fresh\n      // mirror target ahead of the walk, which the engine refills, looping\n      // forever (DoS) and amplifying output. Dropping its content on removal\n      // (rather than hoisting) breaks that cascade; the content is a duplicate\n      // of the option, which is sanitized on its own. See campaign-3 F1/F6.\n      'selectedcontent', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);\n      /* Tags that are safe for data: URIs */\n      let DATA_URI_TAGS = null;\n      const DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);\n      /* Attributes safe for values like \"javascript:\" */\n      let URI_SAFE_ATTRIBUTES = null;\n      const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);\n      const MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n      const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\n      const HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\n      /* Document namespace */\n      let NAMESPACE = HTML_NAMESPACE;\n      let IS_EMPTY_INPUT = false;\n      /* Allowed XHTML+XML namespaces */\n      let ALLOWED_NAMESPACES = null;\n      const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);\n      const DEFAULT_MATHML_TEXT_INTEGRATION_POINTS = freeze(['mi', 'mo', 'mn', 'ms', 'mtext']);\n      let MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, DEFAULT_MATHML_TEXT_INTEGRATION_POINTS);\n      const DEFAULT_HTML_INTEGRATION_POINTS = freeze(['annotation-xml']);\n      let HTML_INTEGRATION_POINTS = addToSet({}, DEFAULT_HTML_INTEGRATION_POINTS);\n      // Certain elements are allowed in both SVG and HTML\n      // namespace. We need to specify them explicitly\n      // so that they don't get erroneously deleted from\n      // HTML namespace.\n      const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']);\n      /* Parsing of strict XHTML documents */\n      let PARSER_MEDIA_TYPE = null;\n      const SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];\n      const DEFAULT_PARSER_MEDIA_TYPE = 'text/html';\n      let transformCaseFunc = null;\n      /* Keep a reference to config to pass to hooks */\n      let CONFIG = null;\n      /* Ideally, do not touch anything below this line */\n      /* ______________________________________________ */\n      const formElement = document.createElement('form');\n      const isRegexOrFunction = function isRegexOrFunction(testValue) {\n        return testValue instanceof RegExp || testValue instanceof Function;\n      };\n      /**\n       * _parseConfig\n       *\n       * @param cfg optional config literal\n       */\n      // eslint-disable-next-line complexity\n      const _parseConfig = function _parseConfig() {\n        let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n        if (CONFIG && CONFIG === cfg) {\n          return;\n        }\n        /* Shield configuration object from tampering */\n        if (!cfg || typeof cfg !== 'object') {\n          cfg = {};\n        }\n        /* Shield configuration object from prototype pollution */\n        cfg = clone(cfg);\n        PARSER_MEDIA_TYPE =\n        // eslint-disable-next-line unicorn/prefer-includes\n        SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;\n        // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.\n        transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? stringToString : stringToLowerCase;\n        /* Set configuration parameters */\n        ALLOWED_TAGS = _resolveSetOption(cfg, 'ALLOWED_TAGS', DEFAULT_ALLOWED_TAGS, {\n          transform: transformCaseFunc\n        });\n        ALLOWED_ATTR = _resolveSetOption(cfg, 'ALLOWED_ATTR', DEFAULT_ALLOWED_ATTR, {\n          transform: transformCaseFunc\n        });\n        ALLOWED_NAMESPACES = _resolveSetOption(cfg, 'ALLOWED_NAMESPACES', DEFAULT_ALLOWED_NAMESPACES, {\n          transform: stringToString\n        });\n        URI_SAFE_ATTRIBUTES = _resolveSetOption(cfg, 'ADD_URI_SAFE_ATTR', DEFAULT_URI_SAFE_ATTRIBUTES, {\n          transform: transformCaseFunc,\n          base: DEFAULT_URI_SAFE_ATTRIBUTES\n        });\n        DATA_URI_TAGS = _resolveSetOption(cfg, 'ADD_DATA_URI_TAGS', DEFAULT_DATA_URI_TAGS, {\n          transform: transformCaseFunc,\n          base: DEFAULT_DATA_URI_TAGS\n        });\n        FORBID_CONTENTS = _resolveSetOption(cfg, 'FORBID_CONTENTS', DEFAULT_FORBID_CONTENTS, {\n          transform: transformCaseFunc\n        });\n        FORBID_TAGS = _resolveSetOption(cfg, 'FORBID_TAGS', clone({}), {\n          transform: transformCaseFunc\n        });\n        FORBID_ATTR = _resolveSetOption(cfg, 'FORBID_ATTR', clone({}), {\n          transform: transformCaseFunc\n        });\n        USE_PROFILES = objectHasOwnProperty(cfg, 'USE_PROFILES') ? cfg.USE_PROFILES && typeof cfg.USE_PROFILES === 'object' ? clone(cfg.USE_PROFILES) : cfg.USE_PROFILES : false;\n        ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true\n        ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true\n        ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false\n        ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; // Default true\n        SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false\n        SAFE_FOR_XML = cfg.SAFE_FOR_XML !== false; // Default true\n        WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false\n        RETURN_DOM = cfg.RETURN_DOM || false; // Default false\n        RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false\n        RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false\n        FORCE_BODY = cfg.FORCE_BODY || false; // Default false\n        SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true\n        SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false\n        KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true\n        IN_PLACE = cfg.IN_PLACE || false; // Default false\n        IS_ALLOWED_URI$1 = isRegex(cfg.ALLOWED_URI_REGEXP) ? cfg.ALLOWED_URI_REGEXP : IS_ALLOWED_URI; // Default regexp\n        NAMESPACE = typeof cfg.NAMESPACE === 'string' ? cfg.NAMESPACE : HTML_NAMESPACE; // Default HTML namespace\n        MATHML_TEXT_INTEGRATION_POINTS = objectHasOwnProperty(cfg, 'MATHML_TEXT_INTEGRATION_POINTS') && cfg.MATHML_TEXT_INTEGRATION_POINTS && typeof cfg.MATHML_TEXT_INTEGRATION_POINTS === 'object' ? clone(cfg.MATHML_TEXT_INTEGRATION_POINTS) : addToSet({}, DEFAULT_MATHML_TEXT_INTEGRATION_POINTS); // Default built-in map\n        HTML_INTEGRATION_POINTS = objectHasOwnProperty(cfg, 'HTML_INTEGRATION_POINTS') && cfg.HTML_INTEGRATION_POINTS && typeof cfg.HTML_INTEGRATION_POINTS === 'object' ? clone(cfg.HTML_INTEGRATION_POINTS) : addToSet({}, DEFAULT_HTML_INTEGRATION_POINTS); // Default built-in map\n        const customElementHandling = objectHasOwnProperty(cfg, 'CUSTOM_ELEMENT_HANDLING') && cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING === 'object' ? clone(cfg.CUSTOM_ELEMENT_HANDLING) : create$7(null);\n        CUSTOM_ELEMENT_HANDLING = create$7(null);\n        if (objectHasOwnProperty(customElementHandling, 'tagNameCheck') && isRegexOrFunction(customElementHandling.tagNameCheck)) {\n          CUSTOM_ELEMENT_HANDLING.tagNameCheck = customElementHandling.tagNameCheck; // Default undefined\n        }\n        if (objectHasOwnProperty(customElementHandling, 'attributeNameCheck') && isRegexOrFunction(customElementHandling.attributeNameCheck)) {\n          CUSTOM_ELEMENT_HANDLING.attributeNameCheck = customElementHandling.attributeNameCheck; // Default undefined\n        }\n        if (objectHasOwnProperty(customElementHandling, 'allowCustomizedBuiltInElements') && typeof customElementHandling.allowCustomizedBuiltInElements === 'boolean') {\n          CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = customElementHandling.allowCustomizedBuiltInElements; // Default undefined\n        }\n        seal(CUSTOM_ELEMENT_HANDLING);\n        if (SAFE_FOR_TEMPLATES) {\n          ALLOW_DATA_ATTR = false;\n        }\n        if (RETURN_DOM_FRAGMENT) {\n          RETURN_DOM = true;\n        }\n        /* Parse profile info */\n        if (USE_PROFILES) {\n          ALLOWED_TAGS = addToSet({}, text);\n          ALLOWED_ATTR = create$7(null);\n          if (USE_PROFILES.html === true) {\n            addToSet(ALLOWED_TAGS, html$1);\n            addToSet(ALLOWED_ATTR, html);\n          }\n          if (USE_PROFILES.svg === true) {\n            addToSet(ALLOWED_TAGS, svg$1);\n            addToSet(ALLOWED_ATTR, svg);\n            addToSet(ALLOWED_ATTR, xml);\n          }\n          if (USE_PROFILES.svgFilters === true) {\n            addToSet(ALLOWED_TAGS, svgFilters);\n            addToSet(ALLOWED_ATTR, svg);\n            addToSet(ALLOWED_ATTR, xml);\n          }\n          if (USE_PROFILES.mathMl === true) {\n            addToSet(ALLOWED_TAGS, mathMl$1);\n            addToSet(ALLOWED_ATTR, mathMl);\n            addToSet(ALLOWED_ATTR, xml);\n          }\n        }\n        /* Always reset function-based ADD_TAGS / ADD_ATTR checks to prevent\n         * leaking across calls when switching from function to array config */\n        EXTRA_ELEMENT_HANDLING.tagCheck = null;\n        EXTRA_ELEMENT_HANDLING.attributeCheck = null;\n        /* Merge configuration parameters */\n        if (objectHasOwnProperty(cfg, 'ADD_TAGS')) {\n          if (typeof cfg.ADD_TAGS === 'function') {\n            EXTRA_ELEMENT_HANDLING.tagCheck = cfg.ADD_TAGS;\n          } else if (arrayIsArray(cfg.ADD_TAGS)) {\n            if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {\n              ALLOWED_TAGS = clone(ALLOWED_TAGS);\n            }\n            addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);\n          }\n        }\n        if (objectHasOwnProperty(cfg, 'ADD_ATTR')) {\n          if (typeof cfg.ADD_ATTR === 'function') {\n            EXTRA_ELEMENT_HANDLING.attributeCheck = cfg.ADD_ATTR;\n          } else if (arrayIsArray(cfg.ADD_ATTR)) {\n            if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {\n              ALLOWED_ATTR = clone(ALLOWED_ATTR);\n            }\n            addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);\n          }\n        }\n        if (objectHasOwnProperty(cfg, 'ADD_URI_SAFE_ATTR') && arrayIsArray(cfg.ADD_URI_SAFE_ATTR)) {\n          addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);\n        }\n        if (objectHasOwnProperty(cfg, 'FORBID_CONTENTS') && arrayIsArray(cfg.FORBID_CONTENTS)) {\n          if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {\n            FORBID_CONTENTS = clone(FORBID_CONTENTS);\n          }\n          addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);\n        }\n        if (objectHasOwnProperty(cfg, 'ADD_FORBID_CONTENTS') && arrayIsArray(cfg.ADD_FORBID_CONTENTS)) {\n          if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {\n            FORBID_CONTENTS = clone(FORBID_CONTENTS);\n          }\n          addToSet(FORBID_CONTENTS, cfg.ADD_FORBID_CONTENTS, transformCaseFunc);\n        }\n        /* Add #text in case KEEP_CONTENT is set to true */\n        if (KEEP_CONTENT) {\n          ALLOWED_TAGS['#text'] = true;\n        }\n        /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */\n        if (WHOLE_DOCUMENT) {\n          addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);\n        }\n        /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */\n        if (ALLOWED_TAGS.table) {\n          addToSet(ALLOWED_TAGS, ['tbody']);\n          delete FORBID_TAGS.tbody;\n        }\n        // Re-derive the active Trusted Types policy from this configuration on\n        // every parse. The active policy must never be sticky closure state that\n        // outlives the config that set it: a caller-supplied policy left in place\n        // after `clearConfig()` \u2014 or after a later call that supplied none, or\n        // `TRUSTED_TYPES_POLICY: null` \u2014 could sign a subsequent \"default\"\n        // `RETURN_TRUSTED_TYPE` result with a foreign, possibly unsafe policy.\n        // See GHSA-vxr8-fq34-vvx9.\n        if (cfg.TRUSTED_TYPES_POLICY) {\n          if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== 'function') {\n            throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.');\n          }\n          if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== 'function') {\n            throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.');\n          }\n          // A caller-supplied policy applies to this configuration only.\n          const previousTrustedTypesPolicy = trustedTypesPolicy;\n          trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;\n          // Sign local variables required by `sanitize`. If the supplied policy's\n          // `createHTML` is circular (i.e. it calls `DOMPurify.sanitize`), this\n          // throws via the re-entrancy guard. Restore the previous policy first so\n          // the instance is not left in a poisoned state. See #1422.\n          try {\n            emptyHTML = _createTrustedHTML('');\n          } catch (error) {\n            trustedTypesPolicy = previousTrustedTypesPolicy;\n            throw error;\n          }\n        } else if (cfg.TRUSTED_TYPES_POLICY === null) {\n          // Explicit opt-out for this call: perform no Trusted Types signing and\n          // create nothing (so a strict `trusted-types` CSP that disallows a\n          // `dompurify` policy can still call `sanitize` from inside its own\n          // policy \u2014 see #1422). Resetting to `undefined` rather than a sticky\n          // `null` also drops any previously retained caller policy, so it cannot\n          // resurface on a later call, while still allowing the next config-less\n          // call to restore the internal default policy. See GHSA-vxr8-fq34-vvx9.\n          trustedTypesPolicy = undefined;\n          emptyHTML = '';\n        } else {\n          // No policy supplied: keep the currently active policy if one is set \u2014 a\n          // previously supplied policy is intentionally sticky across config-less\n          // calls \u2014 otherwise fall back to the instance's own internal policy,\n          // created at most once. (A policy supplied for a *single* call still\n          // lingers by design; what must not linger is a policy whose configuration\n          // has been torn down via `clearConfig()`, which restores the default.)\n          if (trustedTypesPolicy === undefined) {\n            trustedTypesPolicy = _getDefaultTrustedTypesPolicy();\n          }\n          // Sign internal variables only when a policy is active. A falsy policy\n          // (Trusted Types unsupported, creation failed, or an explicit opt-out)\n          // leaves `emptyHTML` as a plain string, so we never call `.createHTML` on\n          // a non-policy and throw. See #1422.\n          if (trustedTypesPolicy && typeof emptyHTML === 'string') {\n            emptyHTML = _createTrustedHTML('');\n          }\n        }\n        // Prevent further manipulation of configuration.\n        // Not available in IE8, Safari 5, etc.\n        if (freeze) {\n          freeze(cfg);\n        }\n        CONFIG = cfg;\n      };\n      /* Keep track of all possible SVG and MathML tags\n       * so that we can perform the namespace checks\n       * correctly. */\n      const ALL_SVG_TAGS = addToSet({}, [...svg$1, ...svgFilters, ...svgDisallowed]);\n      const ALL_MATHML_TAGS = addToSet({}, [...mathMl$1, ...mathMlDisallowed]);\n      /**\n       * Namespace rules for an element in the SVG namespace.\n       *\n       * @param tagName the element's lowercase tag name\n       * @param parent the (possibly simulated) parent node\n       * @param parentTagName the parent's lowercase tag name\n       * @returns true if a spec-compliant parser could produce this element\n       */\n      const _checkSvgNamespace = function _checkSvgNamespace(tagName, parent, parentTagName) {\n        // The only way to switch from HTML namespace to SVG\n        // is via <svg>. If it happens via any other tag, then\n        // it should be killed.\n        if (parent.namespaceURI === HTML_NAMESPACE) {\n          return tagName === 'svg';\n        }\n        // The only way to switch from MathML to SVG is via <svg>\n        // if the parent is either <annotation-xml> or a MathML\n        // text integration point.\n        if (parent.namespaceURI === MATHML_NAMESPACE) {\n          return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);\n        }\n        // We only allow elements that are defined in SVG\n        // spec. All others are disallowed in SVG namespace.\n        return Boolean(ALL_SVG_TAGS[tagName]);\n      };\n      /**\n       * Namespace rules for an element in the MathML namespace.\n       *\n       * @param tagName the element's lowercase tag name\n       * @param parent the (possibly simulated) parent node\n       * @param parentTagName the parent's lowercase tag name\n       * @returns true if a spec-compliant parser could produce this element\n       */\n      const _checkMathMlNamespace = function _checkMathMlNamespace(tagName, parent, parentTagName) {\n        // The only way to switch from HTML namespace to MathML\n        // is via <math>. If it happens via any other tag, then\n        // it should be killed.\n        if (parent.namespaceURI === HTML_NAMESPACE) {\n          return tagName === 'math';\n        }\n        // The only way to switch from SVG to MathML is via\n        // <math> and HTML integration points\n        if (parent.namespaceURI === SVG_NAMESPACE) {\n          return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];\n        }\n        // We only allow elements that are defined in MathML\n        // spec. All others are disallowed in MathML namespace.\n        return Boolean(ALL_MATHML_TAGS[tagName]);\n      };\n      /**\n       * Namespace rules for an element in the HTML namespace.\n       *\n       * @param tagName the element's lowercase tag name\n       * @param parent the (possibly simulated) parent node\n       * @param parentTagName the parent's lowercase tag name\n       * @returns true if a spec-compliant parser could produce this element\n       */\n      const _checkHtmlNamespace = function _checkHtmlNamespace(tagName, parent, parentTagName) {\n        // The only way to switch from SVG to HTML is via\n        // HTML integration points, and from MathML to HTML\n        // is via MathML text integration points\n        if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {\n          return false;\n        }\n        if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {\n          return false;\n        }\n        // We disallow tags that are specific for MathML\n        // or SVG and should never appear in HTML namespace\n        return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);\n      };\n      /**\n       * @param element a DOM element whose namespace is being checked\n       * @returns Return false if the element has a\n       *  namespace that a spec-compliant parser would never\n       *  return. Return true otherwise.\n       */\n      const _checkValidNamespace = function _checkValidNamespace(element) {\n        let parent = getParentNode(element);\n        // In JSDOM, if we're inside shadow DOM, then parentNode\n        // can be null. We just simulate parent in this case.\n        if (!parent || !parent.tagName) {\n          parent = {\n            namespaceURI: NAMESPACE,\n            tagName: 'template'\n          };\n        }\n        const tagName = stringToLowerCase(element.tagName);\n        const parentTagName = stringToLowerCase(parent.tagName);\n        if (!ALLOWED_NAMESPACES[element.namespaceURI]) {\n          return false;\n        }\n        if (element.namespaceURI === SVG_NAMESPACE) {\n          return _checkSvgNamespace(tagName, parent, parentTagName);\n        }\n        if (element.namespaceURI === MATHML_NAMESPACE) {\n          return _checkMathMlNamespace(tagName, parent, parentTagName);\n        }\n        if (element.namespaceURI === HTML_NAMESPACE) {\n          return _checkHtmlNamespace(tagName, parent, parentTagName);\n        }\n        // For XHTML and XML documents that support custom namespaces\n        if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && ALLOWED_NAMESPACES[element.namespaceURI]) {\n          return true;\n        }\n        // The code should never reach this place (this means\n        // that the element somehow got namespace that is not\n        // HTML, SVG, MathML or allowed via ALLOWED_NAMESPACES).\n        // Return false just in case.\n        return false;\n      };\n      /**\n       * _forceRemove\n       *\n       * @param node a DOM node\n       */\n      const _forceRemove = function _forceRemove(node) {\n        arrayPush(DOMPurify.removed, {\n          element: node\n        });\n        try {\n          // eslint-disable-next-line unicorn/prefer-dom-node-remove\n          getParentNode(node).removeChild(node);\n        } catch (_) {\n          /* The normal detach failed \u2014 this is reached for a parentless node\n             (getParentNode() is null, so .removeChild throws). Element.prototype\n             .remove() is itself a spec no-op on a parentless node, so a recorded\n             \"removal\" would otherwise hand the caller back an intact,\n             payload-bearing node (e.g. a detached IN_PLACE root the mXSS canary or\n             the style-with-element-child rule decided to kill). Fail closed by\n             throwing \u2014 exactly as a clobbered root does at the IN_PLACE entry \u2014\n             rather than trying to \"neutralize\" the node via its own methods.\n             Neutralizing would mean calling getAttributeNames()/removeAttribute()\n             on the node, both of which a <form> root can clobber via a named child\n             (and _isClobbered does not even probe getAttributeNames), so the\n             neutralize step could itself be silently defeated, leaving the payload\n             intact. A throw touches only the cached, clobber-safe remove() and\n             getParentNode(). Generalizes GHSA-r47g-fvhr-h676 (clobbered-form root)\n             to every root-kill reason. REPORT-3.\n                    This lives inside the catch, so it never fires for a normally-removed\n             in-tree node: those have a parent, removeChild() succeeds, and the\n             catch is not entered. Only a kept (parentless) root reaches here. */\n          remove(node);\n          if (!getParentNode(node)) {\n            throw typeErrorCreate('a node selected for removal could not be detached from its tree ' + 'and cannot be safely returned; refusing to sanitize in place');\n          }\n        }\n      };\n      /**\n       * _neutralizeRoot\n       *\n       * Fail-closed teardown of an in-place root after the sanitize walk aborts\n       * (campaign-3 F2). An internal throw mid-walk \u2014 e.g. a page-registered\n       * custom element's reaction detaches a node so `_forceRemove`'s deliberate\n       * parentless guard throws, or any other re-entrant engine mutation \u2014 would\n       * otherwise leave the caller's *live* tree half-sanitized, with everything\n       * after the abort point still carrying its handlers. There is no safe way\n       * to resume the walk (the tree mutated under us), so we strip the root bare:\n       * remove every child and every attribute, then let the caller's catch see\n       * the original error. Clobber-safe (cached `remove`/`childNodes`/`attributes`\n       * getters; the root was already clobber-pre-flighted at the IN_PLACE entry).\n       *\n       * @param root the in-place root to empty\n       */\n      const _neutralizeRoot = function _neutralizeRoot(root) {\n        /* Strip every disallowed attribute (on* handlers included) off the whole\n           subtree BEFORE detaching anything. Detaching first would hand back\n           handler-bearing originals (e.g. an already-loading `<img onerror>`)\n           whose queued resource event still fires in page scope after we throw.\n           Clobber-safe reads; a doomed clobbered node's own attributes are\n           irrelevant while its non-clobbered descendants are reached and scrubbed. */\n        _neutralizeSubtree(root);\n        const childNodes = getChildNodes(root);\n        if (childNodes) {\n          const snapshot = [];\n          arrayForEach(childNodes, child => {\n            arrayPush(snapshot, child);\n          });\n          arrayForEach(snapshot, child => {\n            try {\n              remove(child);\n            } catch (_) {\n              /* Best-effort teardown; a still-attached child is handled below */\n            }\n          });\n        }\n        const attributes = getAttributes(root);\n        if (attributes) {\n          for (let i = attributes.length - 1; i >= 0; --i) {\n            const attribute = attributes[i];\n            const name = attribute && attribute.name;\n            if (typeof name === 'string') {\n              try {\n                root.removeAttribute(name);\n              } catch (_) {\n                /* Clobbered removeAttribute \u2014 ignore (fail-closed best effort) */\n              }\n            }\n          }\n        }\n      };\n      /**\n       * _removeAttribute\n       *\n       * @param name an Attribute name\n       * @param element a DOM node\n       */\n      const _removeAttribute = function _removeAttribute(name, element) {\n        try {\n          arrayPush(DOMPurify.removed, {\n            attribute: element.getAttributeNode(name),\n            from: element\n          });\n        } catch (_) {\n          arrayPush(DOMPurify.removed, {\n            attribute: null,\n            from: element\n          });\n        }\n        element.removeAttribute(name);\n        // We void attribute values for unremovable \"is\" attributes\n        if (name === 'is') {\n          if (RETURN_DOM || RETURN_DOM_FRAGMENT) {\n            try {\n              _forceRemove(element);\n            } catch (_) {}\n          } else {\n            try {\n              element.setAttribute(name, '');\n            } catch (_) {}\n          }\n        }\n      };\n      /**\n       * _stripDisallowedAttributes\n       *\n       * Removes every attribute the active configuration does not allow from a\n       * single element, using the same allowlist as the main attribute pass (so\n       * `on*` handlers go, but no `/^on/` blocklist is introduced). Used only to\n       * neutralise nodes that are being discarded from an in-place tree.\n       *\n       * @param element the element to strip\n       */\n      const _stripDisallowedAttributes = function _stripDisallowedAttributes(element) {\n        const attributes = getAttributes(element);\n        if (!attributes) {\n          return;\n        }\n        for (let i = attributes.length - 1; i >= 0; --i) {\n          const attribute = attributes[i];\n          const name = attribute && attribute.name;\n          if (typeof name !== 'string' || ALLOWED_ATTR[transformCaseFunc(name)]) {\n            continue;\n          }\n          try {\n            element.removeAttribute(name);\n          } catch (_) {\n            /* Clobbered removeAttribute on a doomed node \u2014 ignore */\n          }\n        }\n      };\n      /**\n       * _neutralizeSubtree\n       *\n       * Completes the audit-5 F1 fix across every removal path. The KEEP_CONTENT\n       * move-hoist neutralises only disallowed-tag removals; clobber, mXSS-canary,\n       * namespace, comment, processing-instruction and KEEP_CONTENT:false removals\n       * all drop their subtree wholesale via `_forceRemove`. On the IN_PLACE path\n       * those dropped nodes are detached from the caller's LIVE tree but a\n       * handler-bearing original among them (an `<img onerror>`/`<video>` that was\n       * loading) keeps its queued resource event, which fires in page scope after\n       * sanitize returns. This walks a removed subtree and strips every attribute\n       * the active configuration does not allow \u2014 so `on*` handlers are cancelled\n       * through the SAME allowlist that governs kept nodes, not a separate `/^on/`\n       * blocklist. Run synchronously before sanitize returns, i.e. before any\n       * queued event can fire. Hook-free by design: these nodes leave the output,\n       * so firing attribute hooks for them would be surprising. Clobber-safe reads;\n       * a doomed clobbered node may shadow `removeAttribute` (its own attributes are\n       * irrelevant \u2014 it is discarded \u2014 while its non-clobbered descendants, e.g.\n       * the `<img>`, are reached and scrubbed).\n       *\n       * @param root the root of a removed subtree to neutralise\n       */\n      const _neutralizeSubtree = function _neutralizeSubtree(root) {\n        const stack = [root];\n        while (stack.length > 0) {\n          const node = stack.pop();\n          const nodeType = getNodeType ? getNodeType(node) : node.nodeType;\n          if (nodeType === NODE_TYPE.element) {\n            _stripDisallowedAttributes(node);\n          }\n          const childNodes = getChildNodes(node);\n          if (childNodes) {\n            for (let i = childNodes.length - 1; i >= 0; --i) {\n              stack.push(childNodes[i]);\n            }\n          }\n        }\n      };\n      /**\n       * _neutralizePatchLinkage\n       *\n       * IN_PLACE entry pre-pass (declarative-partial-updates / streaming\n       * hardening, https://github.com/WICG/declarative-partial-updates).\n       *\n       * The main walk strips patch linkage (`for`/`patchsrc`) and removes range\n       * markers (PIs / markup comments) node-by-node, in document order, AS it\n       * reaches each node. On a live in-place root that leaves a window: from the\n       * moment the root is connected until the walk arrives at a given node, that\n       * node's linkage is live. A patch applied on connection/stream can fire as\n       * a microtask during the walk and inject or teleport an unsanitized DOM\n       * range into a region the iterator has already passed and will not revisit,\n       * so the post-return \"tree is sanitized\" contract is violated. Sweep the\n       * whole tree once up front and sever every linkage before the walk begins,\n       * closing that window.\n       *\n       * This CANNOT undo a patch that already fired before sanitize ran \u2014 that is\n       * the irreducible \"do not IN_PLACE a live-connected attacker tree\" caveat \u2014\n       * but it closes everything from sanitize-start onward. Gated on SAFE_FOR_XML\n       * to group with the rest of the declarative-partial-updates handling and\n       * stay overridable, consistent with the codebase.\n       *\n       * Clobber-safe traversal (cached childNodes getter); per-node try/catch so a\n       * clobbered root cannot defeat the sweep of its non-clobbered descendants.\n       *\n       * NOTE (pending real-Chrome confirmation, see test/declarative-patch-probe\n       * .html Q1): this mirrors the existing policy of keeping `for` on\n       * <label>/<output>. If the shipping feature can drive a patch through a\n       * surviving `for`-on-label/output + `id` pair, this pre-pass and the\n       * attribute check at _isBasicCustomElement's caller must additionally drop\n       * that pair on the IN_PLACE path. Left as-is until the taxonomy is verified.\n       *\n       * @param root the in-place root to sweep\n       */\n      const _neutralizePatchLinkage = function _neutralizePatchLinkage(root) {\n        if (!SAFE_FOR_XML) {\n          return;\n        }\n        const stack = [root];\n        while (stack.length > 0) {\n          const node = stack.pop();\n          const nodeType = getNodeType ? getNodeType(node) : node.nodeType;\n          /* Remove range markers (the target side of a patch linkage): every\n             processing instruction, and any markup-bearing comment. */\n          if (nodeType === NODE_TYPE.processingInstruction || nodeType === NODE_TYPE.comment && regExpTest(COMMENT_MARKUP_PROBE, node.data)) {\n            try {\n              remove(node);\n            } catch (_) {\n              /* Best-effort */\n            }\n            continue;\n          }\n          /* Strip patch-source attributes (the source side) off elements. */\n          if (nodeType === NODE_TYPE.element) {\n            const element = node;\n            const lcTag = transformCaseFunc(getNodeName ? getNodeName(node) : node.nodeName);\n            try {\n              if (element.hasAttribute && element.hasAttribute('patchsrc')) {\n                element.removeAttribute('patchsrc');\n              }\n              if (element.hasAttribute && element.hasAttribute('for') && lcTag !== 'label' && lcTag !== 'output') {\n                element.removeAttribute('for');\n              }\n            } catch (_) {\n              /* Clobbered removeAttribute/hasAttribute on a doomed node \u2014 ignore */\n            }\n          }\n          const childNodes = getChildNodes(node);\n          if (childNodes) {\n            for (let i = childNodes.length - 1; i >= 0; --i) {\n              stack.push(childNodes[i]);\n            }\n          }\n        }\n      };\n      /**\n       * _initDocument\n       *\n       * @param dirty - a string of dirty markup\n       * @return a DOM, filled with the dirty markup\n       */\n      const _initDocument = function _initDocument(dirty) {\n        /* Create a HTML document */\n        let doc = null;\n        let leadingWhitespace = null;\n        if (FORCE_BODY) {\n          dirty = '<remove></remove>' + dirty;\n        } else {\n          /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */\n          const matches = stringMatch(dirty, /^[\\r\\n\\t ]+/);\n          leadingWhitespace = matches && matches[0];\n        }\n        if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && NAMESPACE === HTML_NAMESPACE) {\n          // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)\n          dirty = '<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>' + dirty + '</body></html>';\n        }\n        const dirtyPayload = trustedTypesPolicy ? _createTrustedHTML(dirty) : dirty;\n        /*\n         * Use the DOMParser API by default, fallback later if needs be\n         * DOMParser not work for svg when has multiple root element.\n         */\n        if (NAMESPACE === HTML_NAMESPACE) {\n          try {\n            doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);\n          } catch (_) {}\n        }\n        /* Use createHTMLDocument in case DOMParser is not available */\n        if (!doc || !doc.documentElement) {\n          doc = implementation.createDocument(NAMESPACE, 'template', null);\n          try {\n            doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;\n          } catch (_) {\n            // Syntax error if dirtyPayload is invalid xml\n          }\n        }\n        const body = doc.body || doc.documentElement;\n        if (dirty && leadingWhitespace) {\n          body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);\n        }\n        /* Work on whole document or just its body */\n        if (NAMESPACE === HTML_NAMESPACE) {\n          return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];\n        }\n        return WHOLE_DOCUMENT ? doc.documentElement : body;\n      };\n      /**\n       * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.\n       *\n       * @param root The root element or node to start traversing on.\n       * @return The created NodeIterator\n       */\n      const _createNodeIterator = function _createNodeIterator(root) {\n        return createNodeIterator.call(root.ownerDocument || root, root,\n        // eslint-disable-next-line no-bitwise\n        NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION, null);\n      };\n      /**\n       * Replace template expression syntax (mustache, ERB, template\n       * literal) with a space; shared by all SAFE_FOR_TEMPLATES scrub\n       * sites. Order matters: mustache, then ERB, then template literal.\n       *\n       * @param value the string to scrub\n       * @returns the scrubbed string\n       */\n      const _stripTemplateExpressions = function _stripTemplateExpressions(value) {\n        value = stringReplace(value, MUSTACHE_EXPR$1, ' ');\n        value = stringReplace(value, ERB_EXPR$1, ' ');\n        value = stringReplace(value, TMPLIT_EXPR$1, ' ');\n        return value;\n      };\n      /**\n       * Strip template-engine expressions ({{...}}, ${...}, <%...%>) from the\n       * character data of an element subtree. Used as the final safety net for\n       * SAFE_FOR_TEMPLATES on every DOM-returning code path so that expressions\n       * which only form after text-node normalization (e.g. fragments split across\n       * stripped elements) cannot survive into a template-evaluating framework.\n       *\n       * Walks text/comment/CDATA/processing-instruction nodes and mutates `.data`\n       * in place rather than round-tripping through innerHTML. This preserves\n       * descendant node references (important for IN_PLACE callers), avoids a\n       * serialize/reparse cycle, and reads literal character data \u2014 which means\n       * `<%...%>` in text content matches the ERB regex against its real bytes\n       * instead of the HTML-entity-escaped form innerHTML would produce.\n       *\n       * Attribute values are not visited here; SAFE_FOR_TEMPLATES handling for\n       * attributes is performed during the per-node `_sanitizeAttributes` pass.\n       *\n       * @param node The root element whose character data should be scrubbed.\n       */\n      const _scrubTemplateExpressions2 = function _scrubTemplateExpressions(node) {\n        var _node$querySelectorAl;\n        node.normalize();\n        const walker = createNodeIterator.call(node.ownerDocument || node, node,\n        // eslint-disable-next-line no-bitwise\n        NodeFilter.SHOW_TEXT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_CDATA_SECTION | NodeFilter.SHOW_PROCESSING_INSTRUCTION, null);\n        let currentNode = walker.nextNode();\n        while (currentNode) {\n          currentNode.data = _stripTemplateExpressions(currentNode.data);\n          currentNode = walker.nextNode();\n        }\n        // NodeIterator does not descend into <template>.content per the DOM spec,\n        // so we must explicitly recurse into each template's content fragment,\n        // mirroring the approach used by _sanitizeShadowDOM.\n        const templates = (_node$querySelectorAl = node.querySelectorAll) === null || _node$querySelectorAl === void 0 ? void 0 : _node$querySelectorAl.call(node, 'template');\n        if (templates) {\n          arrayForEach(templates, tmpl => {\n            if (_isDocumentFragment(tmpl.content)) {\n              _scrubTemplateExpressions2(tmpl.content);\n            }\n          });\n        }\n      };\n      /**\n       * _isClobbered\n       *\n       * Detect DOM-clobbering on HTMLFormElement nodes. Form is the only HTML\n       * interface with [LegacyOverrideBuiltIns]; a descendant element with a\n       * `name` attribute matching a prototype property shadows that property\n       * on direct reads. We use this check at the IN_PLACE entry-point and\n       * during attribute sanitization to refuse clobbered forms.\n       *\n       * @param element element to check for clobbering attacks\n       * @return true if clobbered, false if safe\n       */\n      const _isClobbered = function _isClobbered(element) {\n        // Realm-independent tag-name probe. If we can't determine the tag\n        // name at all, we can't reason about clobbering \u2014 return false\n        // (the caller's other defences still apply).\n        const realTagName = getNodeName ? getNodeName(element) : null;\n        if (typeof realTagName !== 'string') {\n          return false;\n        }\n        if (transformCaseFunc(realTagName) !== 'form') {\n          return false;\n        }\n        return typeof element.nodeName !== 'string' || typeof element.textContent !== 'string' || typeof element.removeChild !== 'function' ||\n        // Realm-safe NamedNodeMap detection: equality against the cached\n        // prototype getter. Clobbered .attributes (e.g. <input name=\"attributes\">)\n        // makes the direct read diverge from the cached read; a clean form\n        // (same-realm OR foreign-realm) has both reads pointing at the same\n        // canonical NamedNodeMap.\n        element.attributes !== getAttributes(element) || typeof element.removeAttribute !== 'function' || typeof element.setAttribute !== 'function' || typeof element.namespaceURI !== 'string' || typeof element.insertBefore !== 'function' || typeof element.hasChildNodes !== 'function' ||\n        // NodeType clobbering probe. Cached Node.prototype.nodeType getter\n        // returns the integer 1 for any Element regardless of realm; direct\n        // read on a clobbered form (e.g. <input name=\"nodeType\">) returns\n        // the named child element. Cheap addition \u2014 nodeType is read from\n        // an internal slot, no serialization cost \u2014 and removes a residual\n        // clobbering surface used by several mXSS / PI / comment branches\n        // in _sanitizeElements that compare currentNode.nodeType directly.\n        element.nodeType !== getNodeType(element) ||\n        // HTMLFormElement has [LegacyOverrideBuiltIns]: a descendant named\n        // \"childNodes\" shadows the prototype getter. Direct reads of\n        // form.childNodes from a clobbered form return the named child\n        // instead of the real NodeList, so any walk that reads it directly\n        // skips the form's real children. Compare the direct read to the\n        // cached Node.prototype getter \u2014 when the form's named-property\n        // getter intercepts the read, the two values differ and we flag\n        // the form. This catches every clobbering child type (input,\n        // select, etc.) regardless of whether the named child happens to\n        // carry a numeric .length, which a typeof-based probe would miss\n        // (e.g. HTMLSelectElement.length is a defined unsigned-long).\n        element.childNodes !== getChildNodes(element);\n      };\n      /**\n       * Checks whether the given value is a DocumentFragment from any realm.\n       *\n       * The realm-independent replacement reads `nodeType` through the cached\n       * Node.prototype getter and compares to the DOCUMENT_FRAGMENT_NODE\n       * constant (11). nodeType is a numeric value resolved from the node's\n       * internal slot, identical across realms for the same kind of node.\n       *\n       * @param value object to check\n       * @return true if value is a DocumentFragment-shaped node from any realm\n       */\n      const _isDocumentFragment = function _isDocumentFragment(value) {\n        if (!getNodeType || typeof value !== 'object' || value === null) {\n          return false;\n        }\n        try {\n          return getNodeType(value) === NODE_TYPE.documentFragment;\n        } catch (_) {\n          return false;\n        }\n      };\n      /**\n       * Checks whether the given object is a DOM node, including nodes that\n       * originate from a different window/realm (e.g. an iframe's\n       * contentDocument). The previous `value instanceof Node` check was\n       * realm-bound: nodes from a different window failed it, causing\n       * sanitize() to silently stringify them and reset IN_PLACE to false,\n       * returning the original node unsanitized. See GHSA-4w3q-35jp-p934.\n       *\n       * @param value object to check whether it's a DOM node\n       * @return true if value is a DOM node from any realm\n       */\n      const _isNode = function _isNode(value) {\n        if (!getNodeType || typeof value !== 'object' || value === null) {\n          return false;\n        }\n        try {\n          return typeof getNodeType(value) === 'number';\n        } catch (_) {\n          return false;\n        }\n      };\n      function _executeHooks(hooks, currentNode, data) {\n        if (hooks.length === 0) {\n          return;\n        }\n        arrayForEach(hooks, hook => {\n          hook.call(DOMPurify, currentNode, data, CONFIG);\n        });\n      }\n      /**\n       * Structural-threat checks that condemn a node regardless of the\n       * allowlists: mXSS via namespace confusion, risky CSS construction,\n       * processing instructions, markup-bearing comments. Pure predicate;\n       * the caller removes. Check order is load-bearing.\n       *\n       * @param currentNode the node to inspect\n       * @param tagName the node's transformCaseFunc'd tag name\n       * @return true if the node must be removed\n       */\n      const _isUnsafeNode = function _isUnsafeNode(currentNode, tagName) {\n        /* Detect mXSS attempts abusing namespace confusion */\n        if (SAFE_FOR_XML && currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.textContent) && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.innerHTML)) {\n          return true;\n        }\n        /* Remove risky CSS construction leading to mXSS */\n        if (SAFE_FOR_XML && currentNode.namespaceURI === HTML_NAMESPACE && tagName === 'style' && _isNode(currentNode.firstElementChild)) {\n          return true;\n        }\n        /* Remove any occurrence of processing instructions */\n        if (currentNode.nodeType === NODE_TYPE.processingInstruction) {\n          return true;\n        }\n        /* Remove any kind of possibly harmful comments */\n        if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(COMMENT_MARKUP_PROBE, currentNode.data)) {\n          return true;\n        }\n        return false;\n      };\n      /**\n       * Handle a node whose tag is forbidden or not allowlisted: keep\n       * allowed custom elements (false return exits _sanitizeElements\n       * early - the namespace and fallback-tag removal checks are\n       * intentionally skipped for kept custom elements), else hoist\n       * content per KEEP_CONTENT and remove.\n       *\n       * A kept custom element is the ONLY case in which this function\n       * returns false, so the caller uses that return value to run the\n       * afterSanitizeElements hook on the kept element and keep the\n       * element-hook lifecycle consistent with normal allowlisted\n       * elements (GHSA-c2j3-45gr-mqc4).\n       *\n       * @param currentNode the disallowed node\n       * @param tagName the node's transformCaseFunc'd tag name\n       * @return true if the node was removed, false if kept\n       */\n      const _sanitizeDisallowedNode = function _sanitizeDisallowedNode(currentNode, tagName) {\n        /* Check if we have a custom element to handle */\n        if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {\n          if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {\n            return false;\n          }\n          if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) {\n            return false;\n          }\n        }\n        /* Keep content except for bad-listed elements.\n             Use the cached prototype getters exclusively \u2014 the previous code\n             had `|| currentNode.parentNode` / `|| currentNode.childNodes`\n             fallbacks, but the cached getters always return the canonical\n             value (or null for a real parent-less node), so the fallback\n             path was dead in safe cases and a clobbering surface in unsafe\n             ones. Falsy cached results stay falsy; the `if (childNodes &&\n             parentNode)` check already gates correctly. */\n        if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {\n          const parentNode = getParentNode(currentNode);\n          const childNodes = getChildNodes(currentNode);\n          if (childNodes && parentNode) {\n            const childCount = childNodes.length;\n            /* In-place: hoist the *original* children so the iterator visits\n                 and sanitises them through the same allowlist pass as every other\n                 node. The caller built the tree in the live document, so the\n                 originals carry already-queued resource events (`<img onerror>`,\n                 `<video>`/`<audio>` error, lazy/`onload`, \u2026); cloning would leave\n                 those originals detached but still armed, firing in page scope\n                 while the returned tree looked clean. Moving is safe in-place: the\n                 root is pre-validated as an allowed tag and so is never the node\n                 being removed, which keeps `parentNode` inside the iterator root\n                 and the relocated child inside the serialised tree.\n                          Otherwise (string / DOM-copy paths): clone. The iterator is rooted\n                 at \u2014 and the result serialised from \u2014 `body`, so a restrictive\n                 ALLOWED_TAGS that removes `body` itself must leave its content in\n                 place, which only cloning does; and those paths parse into an\n                 inert document, so their discarded originals never had a queued\n                 event to neutralise.\n                          `childNodes` is live; a tail-to-head walk keeps `childNodes[i]`\n                 valid whether we move (drops the trailing entry) or clone (leaves\n                 the list intact). */\n            for (let i = childCount - 1; i >= 0; --i) {\n              const hoisted = IN_PLACE ? childNodes[i] : cloneNode(childNodes[i], true);\n              parentNode.insertBefore(hoisted, getNextSibling(currentNode));\n            }\n          }\n        }\n        _forceRemove(currentNode);\n        return true;\n      };\n      /**\n       * _sanitizeElements\n       *\n       * @protect nodeName\n       * @protect textContent\n       * @protect removeChild\n       * @param currentNode to check for permission to exist\n       * @return true if node was killed, false if left alive\n       */\n      // eslint-disable-next-line complexity\n      const _sanitizeElements = function _sanitizeElements(currentNode, root) {\n        /* Execute a hook if present */\n        _executeHooks(hooks.beforeSanitizeElements, currentNode, null);\n        /* A hook may have detached the node \u2014 treat it as removed (see the\n           detached-node comment after the uponSanitizeElement hook below). */\n        if (currentNode !== root && getParentNode(currentNode) === null) {\n          return true;\n        }\n        /* Check if element is clobbered or can clobber */\n        if (_isClobbered(currentNode)) {\n          _forceRemove(currentNode);\n          return true;\n        }\n        /* Now let's check the element's type and name */\n        const tagName = transformCaseFunc(getNodeName ? getNodeName(currentNode) : currentNode.nodeName);\n        /* Execute a hook if present */\n        _executeHooks(hooks.uponSanitizeElement, currentNode, {\n          tagName,\n          allowedTags: ALLOWED_TAGS\n        });\n        /* A hook may have detached the node from the tree \u2014 a long-standing\n           user pattern (issue #469; draw.io-style foreignObject filtering).\n           Per the cached, unclobberable parentNode getter the node is\n           genuinely out of the tree, so it can reach neither the serialized\n           output nor an IN_PLACE live tree; treat it as removed and stop\n           processing it. Without this guard, the unsafe-node / namespace\n           checks below would call _forceRemove on a parentless node and hit\n           the REPORT-3 fail-closed throw \u2014 which exists for nodes DOMPurify\n           wants gone but *cannot* detach (clobbered / parentless roots), the\n           opposite of a node that is already safely gone. The walk root is\n           exempt: a detached IN_PLACE root is legitimate input and must still\n           be fully sanitized, and a kill-decision on it must keep hitting the\n           REPORT-3 throw. Nodes detached by hooks are the hook's\n           responsibility: they are not recorded in DOMPurify.removed and are\n           not neutralized by the post-walk IN_PLACE pass. */\n        if (currentNode !== root && getParentNode(currentNode) === null) {\n          return true;\n        }\n        /* Remove mXSS vectors, processing instructions and risky comments */\n        if (_isUnsafeNode(currentNode, tagName)) {\n          _forceRemove(currentNode);\n          return true;\n        }\n        /* Remove element if anything forbids its presence */\n        if (FORBID_TAGS[tagName] || !(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && !ALLOWED_TAGS[tagName]) {\n          const removed = _sanitizeDisallowedNode(currentNode, tagName);\n          /* A false return means the node is a custom element kept via\n             CUSTOM_ELEMENT_HANDLING - the only keep path through\n             _sanitizeDisallowedNode. Run afterSanitizeElements on it so the\n             element-hook lifecycle matches normal allowlisted elements: a\n             security policy applied in this hook (e.g. stripping an attribute\n             from every surviving element) must not silently skip kept custom\n             elements (GHSA-c2j3-45gr-mqc4). This mirrors the normal-element\n             tail below - the hook runs, then the walker's subsequent\n             _sanitizeAttributes pass sanitizes the element's attributes. The\n             deliberately skipped namespace and fallback-tag removal checks stay\n             skipped; they are removal decisions, not the hook contract. */\n          if (removed === false) {\n            _executeHooks(hooks.afterSanitizeElements, currentNode, null);\n          }\n          return removed;\n        }\n        /* Check whether element has a valid namespace.\n           Realm-safe check (GHSA-hpcv-96wg-7vj8): use the cached Node.prototype\n           nodeType getter rather than `instanceof Element`, which is realm-\n           bound and short-circuits to false for any node minted in a different\n           realm \u2014 letting a foreign-realm element with a forbidden namespace\n           slip past the namespace check entirely. */\n        const nt = getNodeType ? getNodeType(currentNode) : currentNode.nodeType;\n        if (nt === NODE_TYPE.element && !_checkValidNamespace(currentNode)) {\n          _forceRemove(currentNode);\n          return true;\n        }\n        /* Make sure that older browsers don't get fallback-tag mXSS */\n        if ((tagName === 'noscript' || tagName === 'noembed' || tagName === 'noframes') && regExpTest(FALLBACK_TAG_CLOSE, currentNode.innerHTML)) {\n          _forceRemove(currentNode);\n          return true;\n        }\n        /* Sanitize element content to be template-safe */\n        if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {\n          /* Get the element's text content */\n          const content = _stripTemplateExpressions(currentNode.textContent);\n          if (currentNode.textContent !== content) {\n            arrayPush(DOMPurify.removed, {\n              element: currentNode.cloneNode()\n            });\n            currentNode.textContent = content;\n          }\n        }\n        /* Execute a hook if present */\n        _executeHooks(hooks.afterSanitizeElements, currentNode, null);\n        return false;\n      };\n      /**\n       * _isValidAttribute\n       *\n       * @param lcTag Lowercase tag name of containing element.\n       * @param lcName Lowercase attribute name.\n       * @param value Attribute value.\n       * @return Returns true if `value` is valid, otherwise false.\n       */\n      // eslint-disable-next-line complexity\n      const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {\n        /* FORBID_ATTR must always win, even if ADD_ATTR predicate would allow it */\n        if (FORBID_ATTR[lcName]) {\n          return false;\n        }\n        /* Reject declarative-partial-updates patch-linkage attributes\n           (https://github.com/WICG/declarative-partial-updates).\n                Empirical note (Chrome 150, verified \u2014 see\n           test/declarative-patch-probe-v3.html): expansion is NOT applied after\n           sanitization. For the string path it fires during sanitize()'s own\n           parse, so the walk sees and sanitizes the fully materialized expanded\n           tree \u2014 teleports into MathML/SVG integration points included; a\n           weaponized `<template for>`->`<img onerror>` comes back with the handler\n           stripped. For the IN_PLACE path it fires on connection, before the walk.\n           Either way DOMPurify is NOT blind to the patch.\n                This removal is therefore defense-in-depth rather than the sole barrier:\n           it prevents live linkage from surviving into the OUTPUT and re-expanding\n           in the caller's context, and keeps behaviour deterministic if a future\n           engine defers expansion. `for` is legitimate only on <label>/<output>;\n           anywhere else (notably <template for>) it links the element to a patch\n           target and teleports or removes an arbitrary DOM range by id/marker name.\n           `patchsrc` fetches remote markup and is treated as a script-loading\n           mechanism (CSP). Gated on SAFE_FOR_XML so the removal groups with the\n           other structural-threat checks and stays overridable, consistent with\n           the rest of the codebase. PI range markers are already removed by\n           _isUnsafeNode. */\n        if (SAFE_FOR_XML && lcName === 'patchsrc') {\n          return false;\n        }\n        if (SAFE_FOR_XML && lcName === 'for' && lcTag !== 'label' && lcTag !== 'output') {\n          return false;\n        }\n        /* Make sure attribute cannot clobber */\n        if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {\n          return false;\n        }\n        const nameIsPermitted = ALLOWED_ATTR[lcName] || EXTRA_ELEMENT_HANDLING.attributeCheck instanceof Function && EXTRA_ELEMENT_HANDLING.attributeCheck(lcName, lcTag);\n        /* Allow valid data-* attributes: At least one character after \"-\"\n            (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)\n            XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)\n            We don't need to check the value; it's always URI safe. */\n        if (ALLOW_DATA_ATTR && regExpTest(DATA_ATTR$1, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR$1, lcName)) ; else if (!nameIsPermitted) {\n          if (\n          // First condition does a very basic check if a) it's basically a valid custom element tagname AND\n          // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck\n          // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck\n          _isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName, lcTag)) ||\n          // Alternative, second condition checks if it's an `is`-attribute, AND\n          // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck\n          lcName === 'is' && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))) ; else {\n            return false;\n          }\n          /* Check value is safe. First, is attr inert? If so, is safe */\n        } else if (URI_SAFE_ATTRIBUTES[lcName]) ; else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE$1, ''))) ; else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ; else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA$1, stringReplace(value, ATTR_WHITESPACE$1, ''))) ; else if (value) {\n          return false;\n        } else ;\n        return true;\n      };\n      /* Names the HTML spec reserves from valid-custom-element-name; these must\n       * never be treated as basic custom elements even when a permissive\n       * CUSTOM_ELEMENT_HANDLING.tagNameCheck is configured. */\n      const RESERVED_CUSTOM_ELEMENT_NAMES = addToSet({}, ['annotation-xml', 'color-profile', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'missing-glyph']);\n      /**\n       * _isBasicCustomElement\n       * checks if at least one dash is included in tagName, and it's not the first char\n       * for more sophisticated checking see https://github.com/sindresorhus/validate-element-name\n       *\n       * @param tagName name of the tag of the node to sanitize\n       * @returns Returns true if the tag name meets the basic criteria for a custom element, otherwise false.\n       */\n      const _isBasicCustomElement = function _isBasicCustomElement(tagName) {\n        return !RESERVED_CUSTOM_ELEMENT_NAMES[stringToLowerCase(tagName)] && regExpTest(CUSTOM_ELEMENT$1, tagName);\n      };\n      /**\n       * Wrap an attribute value in the matching Trusted Types object when\n       * the active policy requires it. Namespaced attributes pass through\n       * unchanged (no TT support yet, see\n       * https://bugs.chromium.org/p/chromium/issues/detail?id=1305293).\n       *\n       * @param lcTag lowercase tag name of the containing element\n       * @param lcName lowercase attribute name\n       * @param namespaceURI the attribute's namespace, if any\n       * @param value the attribute value to wrap\n       * @return the value, wrapped when Trusted Types demand it\n       */\n      const _applyTrustedTypesToAttribute = function _applyTrustedTypesToAttribute(lcTag, lcName, namespaceURI, value) {\n        if (trustedTypesPolicy && typeof trustedTypes === 'object' && typeof trustedTypes.getAttributeType === 'function' && !namespaceURI) {\n          switch (trustedTypes.getAttributeType(lcTag, lcName)) {\n            case 'TrustedHTML':\n              {\n                return _createTrustedHTML(value);\n              }\n            case 'TrustedScriptURL':\n              {\n                return _createTrustedScriptURL(value);\n              }\n          }\n        }\n        return value;\n      };\n      /**\n       * Write a modified attribute value back onto the element. On\n       * success, re-probe for clobbering introduced by the new value and\n       * remove the element when found; otherwise pop the removal entry\n       * recorded by the earlier _removeAttribute (long-standing pairing\n       * with the SANITIZE_NAMED_PROPS path - do not \"fix\" casually). On\n       * failure, remove the attribute instead.\n       *\n       * @param currentNode the element carrying the attribute\n       * @param name the attribute name as present on the element\n       * @param namespaceURI the attribute's namespace, if any\n       * @param value the new attribute value\n       */\n      const _setAttributeValue = function _setAttributeValue(currentNode, name, namespaceURI, value) {\n        try {\n          if (namespaceURI) {\n            currentNode.setAttributeNS(namespaceURI, name, value);\n          } else {\n            /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. \"x-schema\". */\n            currentNode.setAttribute(name, value);\n          }\n          if (_isClobbered(currentNode)) {\n            _forceRemove(currentNode);\n          } else {\n            arrayPop(DOMPurify.removed);\n          }\n        } catch (_) {\n          _removeAttribute(name, currentNode);\n        }\n      };\n      /**\n       * _sanitizeAttributes\n       *\n       * @protect attributes\n       * @protect nodeName\n       * @protect removeAttribute\n       * @protect setAttribute\n       *\n       * @param currentNode to sanitize\n       */\n      const _sanitizeAttributes = function _sanitizeAttributes(currentNode) {\n        /* Execute a hook if present */\n        _executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);\n        const attributes = currentNode.attributes;\n        /* Check if we have attributes; if not we might have a text node */\n        if (!attributes || _isClobbered(currentNode)) {\n          return;\n        }\n        const hookEvent = {\n          attrName: '',\n          attrValue: '',\n          keepAttr: true,\n          allowedAttributes: ALLOWED_ATTR,\n          forceKeepAttr: undefined\n        };\n        let l = attributes.length;\n        const lcTag = transformCaseFunc(currentNode.nodeName);\n        /* Go backwards over all attributes; safely remove bad ones */\n        while (l--) {\n          const attr = attributes[l];\n          const name = attr.name,\n            namespaceURI = attr.namespaceURI,\n            attrValue = attr.value;\n          const lcName = transformCaseFunc(name);\n          const initValue = attrValue;\n          let value = name === 'value' ? initValue : stringTrim(initValue);\n          /* Execute a hook if present */\n          hookEvent.attrName = lcName;\n          hookEvent.attrValue = value;\n          hookEvent.keepAttr = true;\n          hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set\n          _executeHooks(hooks.uponSanitizeAttribute, currentNode, hookEvent);\n          value = hookEvent.attrValue;\n          /* Full DOM Clobbering protection via namespace isolation,\n           * Prefix id and name attributes with `user-content-`\n           */\n          if (SANITIZE_NAMED_PROPS && (lcName === 'id' || lcName === 'name') && stringIndexOf(value, SANITIZE_NAMED_PROPS_PREFIX) !== 0) {\n            // Remove the attribute with this value\n            _removeAttribute(name, currentNode);\n            // Prefix the value and later re-create the attribute with the sanitized value\n            value = SANITIZE_NAMED_PROPS_PREFIX + value;\n          }\n          // Else: already prefixed, leave the attribute alone \u2014 the prefix is\n          // itself the clobbering protection, and re-applying it is incorrect.\n          /* Work around a security issue with comments inside attributes */\n          if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, value)) {\n            _removeAttribute(name, currentNode);\n            continue;\n          }\n          /* Make sure we cannot easily use animated hrefs, even if animations are allowed */\n          if (lcName === 'attributename' && stringMatch(value, 'href')) {\n            _removeAttribute(name, currentNode);\n            continue;\n          }\n          /* Did the hooks force-keep the attribute? */\n          if (hookEvent.forceKeepAttr) {\n            continue;\n          }\n          /* Did the hooks approve of the attribute? */\n          if (!hookEvent.keepAttr) {\n            _removeAttribute(name, currentNode);\n            continue;\n          }\n          /* Work around a security issue in jQuery 3.0 */\n          if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(SELF_CLOSING_TAG, value)) {\n            _removeAttribute(name, currentNode);\n            continue;\n          }\n          /* Sanitize attribute content to be template-safe */\n          if (SAFE_FOR_TEMPLATES) {\n            value = _stripTemplateExpressions(value);\n          }\n          /* Is `value` valid for this attribute? */\n          if (!_isValidAttribute(lcTag, lcName, value)) {\n            _removeAttribute(name, currentNode);\n            continue;\n          }\n          /* Handle attributes that require Trusted Types */\n          value = _applyTrustedTypesToAttribute(lcTag, lcName, namespaceURI, value);\n          /* Handle invalid data-* attribute set by try-catching it */\n          if (value !== initValue) {\n            _setAttributeValue(currentNode, name, namespaceURI, value);\n          }\n        }\n        /* Execute a hook if present */\n        _executeHooks(hooks.afterSanitizeAttributes, currentNode, null);\n      };\n      /**\n       * _sanitizeShadowDOM\n       *\n       * @param fragment to iterate over recursively\n       */\n      const _sanitizeShadowDOM2 = function _sanitizeShadowDOM(fragment) {\n        let shadowNode = null;\n        const shadowIterator = _createNodeIterator(fragment);\n        /* Execute a hook if present */\n        _executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);\n        while (shadowNode = shadowIterator.nextNode()) {\n          /* Execute a hook if present */\n          _executeHooks(hooks.uponSanitizeShadowNode, shadowNode, null);\n          /* Sanitize tags and elements */\n          _sanitizeElements(shadowNode, fragment);\n          /* Check attributes next */\n          _sanitizeAttributes(shadowNode);\n          /* Deep shadow DOM detected.\n             Realm-safe check (GHSA-hpcv-96wg-7vj8): use nodeType against the\n             DOCUMENT_FRAGMENT_NODE constant rather than instanceof, so we\n             recurse into <template>.content from foreign realms too. */\n          if (_isDocumentFragment(shadowNode.content)) {\n            _sanitizeShadowDOM2(shadowNode.content);\n          }\n          /* An element iterated here may itself host an attached\n             shadow root. The default NodeIterator does not enter shadow\n             trees, so a shadow root nested inside template.content was\n             previously reached by no walk at all (the pre-pass at\n             _sanitizeAttachedShadowRoots descends via childNodes, which\n             doesn't enter template.content; the template-content recursion\n             above iterates the content but never inspected shadowRoot).\n             Walk it explicitly. The nodeType guard avoids reading\n             shadowRoot off text / comment / CDATA / PI nodes that the\n             iterator also surfaces. */\n          const shadowNodeType = getNodeType ? getNodeType(shadowNode) : shadowNode.nodeType;\n          if (shadowNodeType === NODE_TYPE.element) {\n            const innerSr = getShadowRoot(shadowNode);\n            if (_isDocumentFragment(innerSr)) {\n              _sanitizeAttachedShadowRoots(innerSr);\n              _sanitizeShadowDOM2(innerSr);\n            }\n          }\n        }\n        /* Execute a hook if present */\n        _executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);\n      };\n      /**\n       * _sanitizeAttachedShadowRoots\n       *\n       * Walks `root` and feeds every attached shadow root we encounter into\n       * the existing _sanitizeShadowDOM pipeline. The default node iterator\n       * does not descend into shadow trees, so nodes inside an attached\n       * shadow root would otherwise be skipped entirely.\n       *\n       * Two real input paths put attached shadow roots in front of us:\n       *   1. IN_PLACE on a DOM node that already has shadow roots attached.\n       *   2. DOM-node input where importNode(dirty, true) deep-clones the\n       *      shadow root because it was created with `clonable: true`.\n       *\n       * This pass runs once, up front, so the main iteration loop (and the\n       * existing _sanitizeShadowDOM template-content recursion) stay\n       * untouched \u2014 string-input paths are not affected.\n       *\n       * @param root the subtree root to walk for attached shadow roots\n       */\n      const _sanitizeAttachedShadowRoots = function _sanitizeAttachedShadowRoots(root) {\n        /* Iterative (explicit stack) rather than per-child recursion. DOM APIs\n           impose no depth cap, so an attacker-shaped tree (JSON/CRDT/editor data\n           built straight into the DOM \u2014 the IN_PLACE surface) deeper than the JS\n           call-stack budget would otherwise overflow native recursion here and\n           throw at the IN_PLACE entry pre-pass, before a single node is\n           sanitized, leaving the caller's live tree untouched (fail-open). See\n           campaign-3 F4. A heap stack keeps depth off the call stack.\n                Each work item is either a node to descend into, or a deferred\n           `_sanitizeShadowDOM` for an already-walked shadow root. The deferred\n           form preserves the original post-order discipline: a shadow root's\n           nested shadow roots are discovered before the outer shadow is\n           sanitized (which may remove hosts). Pushes are in reverse of the\n           desired processing order (LIFO): template content, then children, then\n           the shadow-sanitize, then the shadow walk \u2014 so the order matches the\n           previous recursion exactly. */\n        const stack = [{\n          node: root,\n          shadow: null\n        }];\n        while (stack.length > 0) {\n          const item = stack.pop();\n          /* Deferred shadow-DOM sanitisation: runs after its subtree was walked. */\n          if (item.shadow) {\n            _sanitizeShadowDOM2(item.shadow);\n            continue;\n          }\n          const node = item.node;\n          const nodeType = getNodeType ? getNodeType(node) : node.nodeType;\n          const isElement = nodeType === NODE_TYPE.element;\n          /* (pushed last \u2192 processed first) Children, snapshotted in reverse so\n             the first child is processed first. Snapshotting matters because a\n             hook may detach siblings mid-walk. */\n          const childNodes = getChildNodes(node);\n          if (childNodes) {\n            for (let i = childNodes.length - 1; i >= 0; --i) {\n              stack.push({\n                node: childNodes[i],\n                shadow: null\n              });\n            }\n          }\n          /* (pushed before children \u2192 processed after them, matching the old\n             \"template content last\" order) When the node is a <template>,\n             descend into its content. */\n          if (isElement) {\n            const rootName = getNodeName ? getNodeName(node) : null;\n            if (typeof rootName === 'string' && transformCaseFunc(rootName) === 'template') {\n              const content = node.content;\n              if (_isDocumentFragment(content)) {\n                stack.push({\n                  node: content,\n                  shadow: null\n                });\n              }\n            }\n          }\n          /* Shadow root (processed first): walk its subtree, then sanitise it.\n             Realm-safe check (GHSA-hpcv-96wg-7vj8): nodeType-based detection\n             rather than `instanceof DocumentFragment`, which is realm-bound and\n             silently skipped foreign-realm shadow roots (e.g.\n             iframe.contentDocument attachShadow). */\n          if (isElement) {\n            const sr = getShadowRoot(node);\n            if (_isDocumentFragment(sr)) {\n              /* Push the deferred sanitise first so it pops after the shadow\n                 walk we push next, i.e. nested shadow roots are discovered\n                 before this one is sanitised. */\n              stack.push({\n                node: null,\n                shadow: sr\n              }, {\n                node: sr,\n                shadow: null\n              });\n            }\n          }\n        }\n      };\n      // eslint-disable-next-line complexity\n      DOMPurify.sanitize = function (dirty) {\n        let cfg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n        let body = null;\n        let importedNode = null;\n        let currentNode = null;\n        let returnNode = null;\n        /* Make sure we have a string to sanitize.\n          DO NOT return early, as this will return the wrong type if\n          the user has requested a DOM object rather than a string */\n        IS_EMPTY_INPUT = !dirty;\n        if (IS_EMPTY_INPUT) {\n          dirty = '<!-->';\n        }\n        /* Stringify, in case dirty is an object */\n        if (typeof dirty !== 'string' && !_isNode(dirty)) {\n          dirty = stringifyValue(dirty);\n          if (typeof dirty !== 'string') {\n            throw typeErrorCreate('dirty is not a string, aborting');\n          }\n        }\n        /* Return dirty HTML if DOMPurify cannot run */\n        if (!DOMPurify.isSupported) {\n          return dirty;\n        }\n        /* Assign config vars */\n        if (SET_CONFIG) {\n          /* Persistent setConfig() path: _parseConfig is skipped, so the sets are\n           * not re-derived per call. Restore them from the pristine bindings\n           * captured at setConfig() time so a previous call's hook clone (mutated\n           * below) does not carry over. */\n          ALLOWED_TAGS = SET_CONFIG_ALLOWED_TAGS;\n          ALLOWED_ATTR = SET_CONFIG_ALLOWED_ATTR;\n        } else {\n          _parseConfig(cfg);\n        }\n        /* Clone the hook-mutable allowlists before the walk whenever an\n         * uponSanitize* hook is registered. The hook event exposes ALLOWED_TAGS\n         * and ALLOWED_ATTR by reference (as allowedTags / allowedAttributes), so\n         * a hook that widens them would otherwise mutate the shared set\n         * permanently: across later calls and across every element. Cloning per\n         * walk keeps documented in-call widening working while scoping it to the\n         * call. A single guard for both config paths - the per-call path rebinds\n         * the sets in _parseConfig each call, the persistent path restores them\n         * from the captured bindings just above - so the two cannot diverge. */\n        if (hooks.uponSanitizeElement.length > 0 || hooks.uponSanitizeAttribute.length > 0) {\n          ALLOWED_TAGS = clone(ALLOWED_TAGS);\n        }\n        if (hooks.uponSanitizeAttribute.length > 0) {\n          ALLOWED_ATTR = clone(ALLOWED_ATTR);\n        }\n        /* Clean up removed elements */\n        DOMPurify.removed = [];\n        /* Resolve IN_PLACE for this call without mutating persistent config.\n           Writing the IN_PLACE closure variable here leaks under setConfig(),\n           where _parseConfig is skipped on later calls: a single string call would\n           disable in-place mode for every subsequent node call, returning a\n           sanitized copy while leaving the caller's node \u2014 which in-place callers\n           keep using and whose return value they ignore \u2014 unsanitized. REPORT-2. */\n        const inPlace = IN_PLACE && typeof dirty !== 'string' && _isNode(dirty);\n        if (inPlace) {\n          /* Declarative-partial-updates / streaming pre-pass: sever every patch\n             linkage across the live tree BEFORE the walk, so no patch can fire\n             mid-walk and inject into an already-processed region. Runs first, so\n             it also covers the forbidden/clobbered roots that throw below. */\n          _neutralizePatchLinkage(dirty);\n          /* Do some early pre-sanitization to avoid unsafe root nodes.\n             Read nodeName through the cached prototype getter \u2014 a clobbering\n             child named \"nodeName\" on the form root would otherwise shadow\n             the property and let this check skip the root-allowlist\n             validation entirely. */\n          const nn = getNodeName ? getNodeName(dirty) : dirty.nodeName;\n          if (typeof nn === 'string') {\n            const tagName = transformCaseFunc(nn);\n            if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n              /* Fail closed on a live root: neutralize handlers/children before\n                 throwing, exactly as the mid-walk abort path does. */\n              _neutralizeRoot(dirty);\n              throw typeErrorCreate('root node is forbidden and cannot be sanitized in-place');\n            }\n          }\n          /* Pre-flight the root through _isClobbered. The iterator-driven\n             removal path can not detach a parent-less root: _forceRemove\n             falls through to Element.prototype.remove(), which per spec\n             is a no-op on a node with no parent. A clobbered root would\n             then survive the main loop with its attributes uninspected,\n             because _sanitizeAttributes early-returns on _isClobbered. The\n             result would be an attacker-controlled form, complete with any\n             event-handler attributes the caller passed in, handed back to\n             the application unsanitized. Refuse to sanitize such a root\n             the same way we refuse a forbidden tag. GHSA-r47g-fvhr-h676. */\n          if (_isClobbered(dirty)) {\n            /* Fail closed on a live clobbered root before throwing.\n               _neutralizeRoot's reads are clobber-safe (cached getters); the\n               form's non-clobbered descendants, e.g. an armed <img>, are scrubbed. */\n            _neutralizeRoot(dirty);\n            throw typeErrorCreate('root node is clobbered and cannot be sanitized in-place');\n          }\n          /* Sanitize attached shadow roots before the main iterator runs.\n             The iterator does not descend into shadow trees. Same fail-closed\n             barrier as the main walk (campaign-3 F2): a custom-element reaction\n             inside a shadow root could abort this pre-pass before the walk runs,\n             which would otherwise leave the entire live tree unsanitized. */\n          try {\n            _sanitizeAttachedShadowRoots(dirty);\n          } catch (error) {\n            _neutralizeRoot(dirty);\n            throw error;\n          }\n        } else if (_isNode(dirty)) {\n          /* If dirty is a DOM element, append to an empty document to avoid\n             elements being stripped by the parser */\n          body = _initDocument('<!---->');\n          importedNode = body.ownerDocument.importNode(dirty, true);\n          if (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === 'BODY') {\n            /* Node is already a body, use as is */\n            body = importedNode;\n          } else if (importedNode.nodeName === 'HTML') {\n            body = importedNode;\n          } else {\n            // eslint-disable-next-line unicorn/prefer-dom-node-append\n            body.appendChild(importedNode);\n          }\n          /* Clonable shadow roots are deep-cloned by importNode(); sanitize\n             them before the main iterator runs, since the iterator does not\n             descend into shadow trees. The walk routes every read through a\n             cached prototype getter so clobbering descendants on a form root\n             cannot hide a shadow host from this pass. */\n          _sanitizeAttachedShadowRoots(importedNode);\n        } else {\n          /* Exit directly if we have nothing to do */\n          if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT &&\n          // eslint-disable-next-line unicorn/prefer-includes\n          dirty.indexOf('<') === -1) {\n            return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? _createTrustedHTML(dirty) : dirty;\n          }\n          /* Initialize the document to work on */\n          body = _initDocument(dirty);\n          /* Check we have a DOM node from the data */\n          if (!body) {\n            return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : '';\n          }\n        }\n        /* Remove first element node (ours) if FORCE_BODY is set */\n        if (body && FORCE_BODY) {\n          _forceRemove(body.firstChild);\n        }\n        /* Get node iterator */\n        const walkRoot = inPlace ? dirty : body;\n        const nodeIterator = _createNodeIterator(walkRoot);\n        /* Now start iterating over the created document.\n           The walk runs inside an exception barrier (campaign-3 F2): a re-entrant\n           engine/custom-element mutation can detach a node mid-walk so\n           `_forceRemove`'s parentless guard throws, aborting the loop. Without the\n           barrier the caller's in-place tree would be left half-sanitized with the\n           unvisited tail still armed. On any throw we fail closed \u2014 strip the\n           in-place root bare \u2014 then rethrow so the existing throw contract is\n           preserved. (String/DOM-copy paths never return the partial body, so the\n           propagating throw is already fail-closed there.) */\n        try {\n          while (currentNode = nodeIterator.nextNode()) {\n            /* Sanitize tags and elements */\n            _sanitizeElements(currentNode, walkRoot);\n            /* Check attributes next */\n            _sanitizeAttributes(currentNode);\n            /* Shadow DOM detected, sanitize it.\n               Realm-safe check (GHSA-hpcv-96wg-7vj8): nodeType-based detection\n               instead of instanceof, so foreign-realm <template>.content is\n               walked correctly. */\n            if (_isDocumentFragment(currentNode.content)) {\n              _sanitizeShadowDOM2(currentNode.content);\n            }\n          }\n        } catch (error) {\n          if (inPlace) {\n            _neutralizeRoot(dirty);\n            /* Nodes _forceRemove'd earlier in the aborted walk are already\n               detached from the root, so _neutralizeRoot's subtree pass does not\n               reach them. Defuse them too, mirroring the success-path loop below. */\n            arrayForEach(DOMPurify.removed, entry => {\n              if (entry.element) {\n                _neutralizeSubtree(entry.element);\n              }\n            });\n          }\n          throw error;\n        }\n        /* If we sanitized `dirty` in-place, return it. */\n        if (inPlace) {\n          /* Fail-closed completion of the audit-5 F1 fix: every node removed from\n             the caller's live tree is detached but may still hold a queued\n             resource-event handler that fires in page scope after we return. The\n             move-hoist covers only disallowed-tag KEEP_CONTENT removals; strip the\n             non-allow-listed attributes off every other removed subtree (clobber,\n             mXSS, namespace, comments, KEEP_CONTENT:false, \u2026) so those handlers are\n             cancelled before any event can fire. Runs synchronously, pre-return. */\n          arrayForEach(DOMPurify.removed, entry => {\n            if (entry.element) {\n              _neutralizeSubtree(entry.element);\n            }\n          });\n          if (SAFE_FOR_TEMPLATES) {\n            _scrubTemplateExpressions2(dirty);\n          }\n          return dirty;\n        }\n        /* Return sanitized string or DOM */\n        if (RETURN_DOM) {\n          if (SAFE_FOR_TEMPLATES) {\n            _scrubTemplateExpressions2(body);\n          }\n          if (RETURN_DOM_FRAGMENT) {\n            returnNode = createDocumentFragment.call(body.ownerDocument);\n            while (body.firstChild) {\n              // eslint-disable-next-line unicorn/prefer-dom-node-append\n              returnNode.appendChild(body.firstChild);\n            }\n          } else {\n            returnNode = body;\n          }\n          if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) {\n            /*\n              AdoptNode() is not used because internal state is not reset\n              (e.g. the past names map of a HTMLFormElement), this is safe\n              in theory but we would rather not risk another attack vector.\n              The state that is cloned by importNode() is explicitly defined\n              by the specs.\n            */\n            returnNode = importNode.call(originalDocument, returnNode, true);\n          }\n          return returnNode;\n        }\n        let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;\n        /* Serialize doctype if allowed */\n        if (WHOLE_DOCUMENT && ALLOWED_TAGS['!doctype'] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {\n          serializedHTML = '<!DOCTYPE ' + body.ownerDocument.doctype.name + '>\\n' + serializedHTML;\n        }\n        /* Sanitize final string template-safe */\n        if (SAFE_FOR_TEMPLATES) {\n          serializedHTML = _stripTemplateExpressions(serializedHTML);\n        }\n        return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? _createTrustedHTML(serializedHTML) : serializedHTML;\n      };\n      DOMPurify.setConfig = function () {\n        let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n        _parseConfig(cfg);\n        SET_CONFIG = true;\n        SET_CONFIG_ALLOWED_TAGS = ALLOWED_TAGS;\n        SET_CONFIG_ALLOWED_ATTR = ALLOWED_ATTR;\n      };\n      DOMPurify.clearConfig = function () {\n        CONFIG = null;\n        SET_CONFIG = false;\n        SET_CONFIG_ALLOWED_TAGS = null;\n        SET_CONFIG_ALLOWED_ATTR = null;\n        // Drop any caller-supplied Trusted Types policy so it cannot poison later\n        // `RETURN_TRUSTED_TYPE` output. The internal default policy (cached, and\n        // never recreated \u2014 Trusted Types throws on duplicate names) is restored by\n        // the next `_parseConfig`. See GHSA-vxr8-fq34-vvx9.\n        trustedTypesPolicy = defaultTrustedTypesPolicy;\n        emptyHTML = '';\n      };\n      DOMPurify.isValidAttribute = function (tag, attr, value) {\n        /* Initialize shared config vars if necessary. */\n        if (!CONFIG) {\n          _parseConfig({});\n        }\n        const lcTag = transformCaseFunc(tag);\n        const lcName = transformCaseFunc(attr);\n        return _isValidAttribute(lcTag, lcName, value);\n      };\n      DOMPurify.addHook = function (entryPoint, hookFunction) {\n        if (typeof hookFunction !== 'function') {\n          return;\n        }\n        /* Reject unknown entry points. Without this, a non-hook key (e.g.\n         * '__proto__') indexes off the prototype chain rather than a real\n         * hook array, and arrayPush then writes to Object.prototype. Guard\n         * with an own-property check against the known hook names. */\n        if (!objectHasOwnProperty(hooks, entryPoint)) {\n          return;\n        }\n        arrayPush(hooks[entryPoint], hookFunction);\n      };\n      DOMPurify.removeHook = function (entryPoint, hookFunction) {\n        if (!objectHasOwnProperty(hooks, entryPoint)) {\n          return undefined;\n        }\n        if (hookFunction !== undefined) {\n          const index = arrayLastIndexOf(hooks[entryPoint], hookFunction);\n          return index === -1 ? undefined : arraySplice(hooks[entryPoint], index, 1)[0];\n        }\n        return arrayPop(hooks[entryPoint]);\n      };\n      DOMPurify.removeHooks = function (entryPoint) {\n        if (!objectHasOwnProperty(hooks, entryPoint)) {\n          return;\n        }\n        hooks[entryPoint] = [];\n      };\n      DOMPurify.removeAllHooks = function () {\n        hooks = _createHooksMap();\n      };\n      return DOMPurify;\n    }\n    var purify = createDOMPurify();\n\n    /**\n     * This class handles parsing, modification and serialization of URI/URL strings.\n     * @class tinymce.util.URI\n     */\n    const each$6 = Tools.each, trim = Tools.trim;\n    const queryParts = [\n        'source', 'protocol', 'authority', 'userInfo', 'user', 'password', 'host',\n        'port', 'relative', 'path', 'directory', 'file', 'query', 'anchor'\n    ];\n    const DEFAULT_PORTS = {\n        ftp: 21,\n        http: 80,\n        https: 443,\n        mailto: 25\n    };\n    const safeSvgDataUrlElements = ['img', 'video'];\n    const blockSvgDataUris = (allowSvgDataUrls, tagName) => {\n        if (isNonNullable(allowSvgDataUrls)) {\n            return !allowSvgDataUrls;\n        }\n        else {\n            // Only allow SVGs by default on images/videos since the browser won't execute scripts on those elements\n            return isNonNullable(tagName) ? !contains$2(safeSvgDataUrlElements, tagName) : true;\n        }\n    };\n    const decodeUri = (encodedUri) => {\n        try {\n            // Might throw malformed URI sequence\n            return decodeURIComponent(encodedUri);\n        }\n        catch {\n            // Fallback to non UTF-8 decoder\n            return unescape(encodedUri);\n        }\n    };\n    const isInvalidUri = (settings, uri, tagName) => {\n        // remove all whitespaces from decoded uri to prevent impact on regex matching\n        const decodedUri = decodeUri(uri).replace(/\\s/g, '');\n        if (settings.allow_script_urls) {\n            return false;\n            // Ensure we don't have a javascript URI, as that is not safe since it allows arbitrary JavaScript execution\n        }\n        else if (/((java|vb)script|mhtml):/i.test(decodedUri)) {\n            return true;\n        }\n        else if (settings.allow_html_data_urls) {\n            return false;\n        }\n        else if (/^data:image\\//i.test(decodedUri)) {\n            return blockSvgDataUris(settings.allow_svg_data_urls, tagName) && /^data:image\\/svg\\+xml/i.test(decodedUri);\n        }\n        else {\n            return /^data:/i.test(decodedUri);\n        }\n    };\n    class URI {\n        static parseDataUri(uri) {\n            let type;\n            const uriComponents = decodeURIComponent(uri).split(',');\n            const matches = /data:([^;]+)/.exec(uriComponents[0]);\n            if (matches) {\n                type = matches[1];\n            }\n            return {\n                type,\n                data: uriComponents[1]\n            };\n        }\n        /**\n         * Check to see if a URI is safe to use in the Document Object Model (DOM). This will return\n         * true if the URI can be used in the DOM without potentially triggering a security issue.\n         *\n         * @method isDomSafe\n         * @static\n         * @param {String} uri The URI to be validated.\n         * @param {Object} context An optional HTML tag name where the element is being used.\n         * @param {Object} options An optional set of options to use when determining if the URI is safe.\n         * @return {Boolean} True if the URI is safe, otherwise false.\n         */\n        static isDomSafe(uri, context, options = {}) {\n            if (options.allow_script_urls) {\n                return true;\n            }\n            else {\n                const decodedUri = Entities.decode(uri).replace(/[\\s\\u0000-\\u001F]+/g, '');\n                return !isInvalidUri(options, decodedUri, context);\n            }\n        }\n        static getDocumentBaseUrl(loc) {\n            let baseUrl;\n            // Pass applewebdata:// and other non web protocols though\n            if (loc.protocol.indexOf('http') !== 0 && loc.protocol !== 'file:') {\n                baseUrl = loc.href ?? '';\n            }\n            else {\n                baseUrl = loc.protocol + '//' + loc.host + loc.pathname;\n            }\n            if (/^[^:]+:\\/\\/\\/?[^\\/]+\\//.test(baseUrl)) {\n                baseUrl = baseUrl.replace(/[\\?#].*$/, '').replace(/[\\/\\\\][^\\/]+$/, '');\n                if (!/[\\/\\\\]$/.test(baseUrl)) {\n                    baseUrl += '/';\n                }\n            }\n            return baseUrl;\n        }\n        source;\n        protocol;\n        authority;\n        userInfo;\n        user;\n        password;\n        host;\n        port;\n        relative;\n        path = '';\n        directory = '';\n        file;\n        query;\n        anchor;\n        settings;\n        /**\n         * Constructs a new URI instance.\n         *\n         * @constructor\n         * @method URI\n         * @param {String} url URI string to parse.\n         * @param {Object} settings Optional settings object.\n         */\n        constructor(url, settings = {}) {\n            url = trim(url);\n            this.settings = settings;\n            const baseUri = settings.base_uri;\n            const self = this;\n            // Strange app protocol that isn't http/https or local anchor\n            // For example: mailto,skype,tel etc.\n            if (/^([\\w\\-]+):([^\\/]{2})/i.test(url) || /^\\s*#/.test(url)) {\n                self.source = url;\n                return;\n            }\n            const isProtocolRelative = url.indexOf('//') === 0;\n            // Absolute path with no host, fake host and protocol\n            if (url.indexOf('/') === 0 && !isProtocolRelative) {\n                url = (baseUri ? baseUri.protocol || 'http' : 'http') + '://mce_host' + url;\n            }\n            // Relative path http:// or protocol relative //path\n            if (!/^[\\w\\-]*:?\\/\\//.test(url)) {\n                const baseUrl = baseUri ? baseUri.path : new URI(document.location.href).directory;\n                if (baseUri?.protocol === '') {\n                    url = '//mce_host' + self.toAbsPath(baseUrl, url);\n                }\n                else {\n                    const match = /([^#?]*)([#?]?.*)/.exec(url);\n                    if (match) {\n                        url = ((baseUri && baseUri.protocol) || 'http') + '://mce_host' + self.toAbsPath(baseUrl, match[1]) + match[2];\n                    }\n                }\n            }\n            // Parse URL (Credits goes to Steave, http://blog.stevenlevithan.com/archives/parseuri)\n            url = url.replace(/@@/g, '(mce_at)'); // Zope 3 workaround, they use @@something\n            const urlMatch = /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@\\/]*):?([^:@\\/]*))?@)?(\\[[a-zA-Z0-9:.%]+\\]|[^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/.exec(url);\n            if (urlMatch) {\n                each$6(queryParts, (v, i) => {\n                    let part = urlMatch[i];\n                    // Zope 3 workaround, they use @@something\n                    if (part) {\n                        part = part.replace(/\\(mce_at\\)/g, '@@');\n                    }\n                    self[v] = part;\n                });\n            }\n            if (baseUri) {\n                if (!self.protocol) {\n                    self.protocol = baseUri.protocol;\n                }\n                if (!self.userInfo) {\n                    self.userInfo = baseUri.userInfo;\n                }\n                if (!self.port && self.host === 'mce_host') {\n                    self.port = baseUri.port;\n                }\n                if (!self.host || self.host === 'mce_host') {\n                    self.host = baseUri.host;\n                }\n                self.source = '';\n            }\n            if (isProtocolRelative) {\n                self.protocol = '';\n            }\n        }\n        /**\n         * Sets the internal path part of the URI.\n         *\n         * @method setPath\n         * @param {String} path Path string to set.\n         */\n        setPath(path) {\n            const pathMatch = /^(.*?)\\/?(\\w+)?$/.exec(path);\n            // Update path parts\n            if (pathMatch) {\n                this.path = pathMatch[0];\n                this.directory = pathMatch[1];\n                this.file = pathMatch[2];\n            }\n            // Rebuild source\n            this.source = '';\n            this.getURI();\n        }\n        /**\n         * Converts the specified URI into a relative URI based on the current URI instance location.\n         *\n         * @method toRelative\n         * @param {String} uri URI to convert into a relative path/URI.\n         * @return {String} Relative URI from the point specified in the current URI instance.\n         * @example\n         * // Converts an absolute URL to an relative URL url will be somedir/somefile.htm\n         * const url = new tinymce.util.URI('http://www.site.com/dir/').toRelative('http://www.site.com/dir/somedir/somefile.htm');\n         */\n        toRelative(uri) {\n            if (uri === './') {\n                return uri;\n            }\n            const relativeUri = new URI(uri, { base_uri: this });\n            // Not on same domain/port or protocol\n            if ((relativeUri.host !== 'mce_host' && this.host !== relativeUri.host && relativeUri.host) || this.port !== relativeUri.port ||\n                (this.protocol !== relativeUri.protocol && relativeUri.protocol !== '')) {\n                return relativeUri.getURI();\n            }\n            const tu = this.getURI(), uu = relativeUri.getURI();\n            // Allow usage of the base_uri when relative_urls = true\n            if (tu === uu || (tu.charAt(tu.length - 1) === '/' && tu.substr(0, tu.length - 1) === uu)) {\n                return tu;\n            }\n            let output = this.toRelPath(this.path, relativeUri.path);\n            // Add query\n            if (relativeUri.query) {\n                output += '?' + relativeUri.query;\n            }\n            // Add anchor\n            if (relativeUri.anchor) {\n                output += '#' + relativeUri.anchor;\n            }\n            return output;\n        }\n        /**\n         * Converts the specified URI into a absolute URI based on the current URI instance location.\n         *\n         * @method toAbsolute\n         * @param {String} uri URI to convert into a relative path/URI.\n         * @param {Boolean} noHost No host and protocol prefix.\n         * @return {String} Absolute URI from the point specified in the current URI instance.\n         * @example\n         * // Converts an relative URL to an absolute URL url will be http://www.site.com/dir/somedir/somefile.htm\n         * const url = new tinymce.util.URI('http://www.site.com/dir/').toAbsolute('somedir/somefile.htm');\n         */\n        toAbsolute(uri, noHost) {\n            const absoluteUri = new URI(uri, { base_uri: this });\n            return absoluteUri.getURI(noHost && this.isSameOrigin(absoluteUri));\n        }\n        /**\n         * Determine whether the given URI has the same origin as this URI.  Based on RFC-6454.\n         * Supports default ports for protocols listed in DEFAULT_PORTS.  Unsupported protocols will fail safe: they\n         * won't match, if the port specifications differ.\n         *\n         * @method isSameOrigin\n         * @param {tinymce.util.URI} uri Uri instance to compare.\n         * @returns {Boolean} True if the origins are the same.\n         */\n        isSameOrigin(uri) {\n            // eslint-disable-next-line eqeqeq\n            if (this.host == uri.host && this.protocol == uri.protocol) {\n                // eslint-disable-next-line eqeqeq\n                if (this.port == uri.port) {\n                    return true;\n                }\n                const defaultPort = this.protocol ? DEFAULT_PORTS[this.protocol] : null;\n                // eslint-disable-next-line eqeqeq\n                if (defaultPort && ((this.port || defaultPort) == (uri.port || defaultPort))) {\n                    return true;\n                }\n            }\n            return false;\n        }\n        /**\n         * Converts a absolute path into a relative path.\n         *\n         * @method toRelPath\n         * @param {String} base Base point to convert the path from.\n         * @param {String} path Absolute path to convert into a relative path.\n         */\n        toRelPath(base, path) {\n            let breakPoint = 0, out = '', i, l;\n            // Split the paths\n            const normalizedBase = base.substring(0, base.lastIndexOf('/')).split('/');\n            const items = path.split('/');\n            if (normalizedBase.length >= items.length) {\n                for (i = 0, l = normalizedBase.length; i < l; i++) {\n                    if (i >= items.length || normalizedBase[i] !== items[i]) {\n                        breakPoint = i + 1;\n                        break;\n                    }\n                }\n            }\n            if (normalizedBase.length < items.length) {\n                for (i = 0, l = items.length; i < l; i++) {\n                    if (i >= normalizedBase.length || normalizedBase[i] !== items[i]) {\n                        breakPoint = i + 1;\n                        break;\n                    }\n                }\n            }\n            if (breakPoint === 1) {\n                return path;\n            }\n            for (i = 0, l = normalizedBase.length - (breakPoint - 1); i < l; i++) {\n                out += '../';\n            }\n            for (i = breakPoint - 1, l = items.length; i < l; i++) {\n                if (i !== breakPoint - 1) {\n                    out += '/' + items[i];\n                }\n                else {\n                    out += items[i];\n                }\n            }\n            return out;\n        }\n        /**\n         * Converts a relative path into a absolute path.\n         *\n         * @method toAbsPath\n         * @param {String} base Base point to convert the path from.\n         * @param {String} path Relative path to convert into an absolute path.\n         */\n        toAbsPath(base, path) {\n            let nb = 0;\n            // Split paths\n            const tr = /\\/$/.test(path) ? '/' : '';\n            const normalizedBase = base.split('/');\n            const normalizedPath = path.split('/');\n            // Remove empty chunks\n            const baseParts = [];\n            each$6(normalizedBase, (k) => {\n                if (k) {\n                    baseParts.push(k);\n                }\n            });\n            // Merge relURLParts chunks\n            const pathParts = [];\n            for (let i = normalizedPath.length - 1; i >= 0; i--) {\n                // Ignore empty or .\n                if (normalizedPath[i].length === 0 || normalizedPath[i] === '.') {\n                    continue;\n                }\n                // Is parent\n                if (normalizedPath[i] === '..') {\n                    nb++;\n                    continue;\n                }\n                // Move up\n                if (nb > 0) {\n                    nb--;\n                    continue;\n                }\n                pathParts.push(normalizedPath[i]);\n            }\n            const i = baseParts.length - nb;\n            // If /a/b/c or /\n            let outPath;\n            if (i <= 0) {\n                outPath = reverse(pathParts).join('/');\n            }\n            else {\n                outPath = baseParts.slice(0, i).join('/') + '/' + reverse(pathParts).join('/');\n            }\n            // Add front / if it's needed\n            if (outPath.indexOf('/') !== 0) {\n                outPath = '/' + outPath;\n            }\n            // Add trailing / if it's needed\n            if (tr && outPath.lastIndexOf('/') !== outPath.length - 1) {\n                outPath += tr;\n            }\n            return outPath;\n        }\n        /**\n         * Returns the full URI of the internal structure.\n         *\n         * @method getURI\n         * @param {Boolean} noProtoHost Optional no host and protocol part. Defaults to false.\n         */\n        getURI(noProtoHost = false) {\n            let s;\n            // Rebuild source\n            if (!this.source || noProtoHost) {\n                s = '';\n                if (!noProtoHost) {\n                    if (this.protocol) {\n                        s += this.protocol + '://';\n                    }\n                    else {\n                        s += '//';\n                    }\n                    if (this.userInfo) {\n                        s += this.userInfo + '@';\n                    }\n                    if (this.host) {\n                        s += this.host;\n                    }\n                    if (this.port) {\n                        s += ':' + this.port;\n                    }\n                }\n                if (this.path) {\n                    s += this.path;\n                }\n                if (this.query) {\n                    s += '?' + this.query;\n                }\n                if (this.anchor) {\n                    s += '#' + this.anchor;\n                }\n                this.source = s;\n            }\n            return this.source;\n        }\n    }\n\n    // A list of attributes that should be filtered further based on the parser settings\n    const filteredUrlAttrs = Tools.makeMap('src,href,data,background,action,formaction,poster,xlink:href');\n    const internalElementAttr = 'data-mce-type';\n    let uid = 0;\n    const processNode = (node, settings, schema, scope, evt) => {\n        const validate = settings.validate;\n        const specialElements = schema.getSpecialElements();\n        if (node.nodeType === COMMENT) {\n            // Pad conditional comments if they aren't allowed\n            if (!settings.allow_conditional_comments && /^\\[if/i.test(node.nodeValue ?? '')) {\n                node.nodeValue = ' ' + node.nodeValue;\n            }\n            if (settings.sanitize && settings.allow_html_in_comments && isString(node.nodeValue)) {\n                node.nodeValue = encodeData(node.nodeValue);\n            }\n        }\n        const lcTagName = evt?.tagName ?? node.nodeName.toLowerCase();\n        if (scope !== 'html' && schema.isValid(scope)) {\n            if (isNonNullable(evt)) {\n                evt.allowedTags[lcTagName] = true;\n            }\n            return;\n        }\n        // Just leave non-elements such as text and comments up to dompurify\n        if (node.nodeType !== ELEMENT || lcTagName === 'body') {\n            return;\n        }\n        // Construct the sugar element wrapper\n        const element = SugarElement.fromDom(node);\n        if (settings.sanitize) {\n            // TINY-9655: Preserve the content of script and style tags if they are valid elements in the schema\n            const shouldKeepContent = (isScript(element) && schema.isValid('script')) || (isStyle(element) && schema.isValid('style'));\n            if (shouldKeepContent) {\n                Optional.from(get$3(element)).each((content) => set$5(element, 'data-mce-tmp', content));\n            }\n            // TINY-9655: Clear innerHTML of script and iframe tags to prevent DOMPurify from removing them entirely\n            const shouldClearContent = isIframe(element) && schema.isValid('iframe');\n            if (shouldKeepContent || shouldClearContent) {\n                empty(element);\n            }\n        }\n        // Determine if we're dealing with an internal attribute\n        const isInternalElement = has$1(element, internalElementAttr);\n        // Cleanup bogus elements\n        const bogus = get$a(element, 'data-mce-bogus');\n        if (!isInternalElement && isString(bogus)) {\n            if (bogus === 'all') {\n                remove$8(element);\n            }\n            else {\n                unwrap(element);\n            }\n            return;\n        }\n        // Determine if the schema allows the element and either add it or remove it\n        const rule = schema.getElementRule(lcTagName);\n        if (validate && !rule) {\n            // If a special element is invalid, then remove the entire element instead of unwrapping\n            if (has$2(specialElements, lcTagName)) {\n                remove$8(element);\n            }\n            else {\n                unwrap(element);\n            }\n            return;\n        }\n        else {\n            if (isNonNullable(evt)) {\n                evt.allowedTags[lcTagName] = true;\n            }\n        }\n        // Validate the element using the attribute rules\n        if (validate && rule && !isInternalElement) {\n            // Fix the attributes for the element, unwrapping it if we have to\n            each$e(rule.attributesForced ?? [], (attr) => {\n                set$5(element, attr.name, attr.value === '{$uid}' ? `mce_${uid++}` : attr.value);\n            });\n            each$e(rule.attributesDefault ?? [], (attr) => {\n                if (!has$1(element, attr.name)) {\n                    set$5(element, attr.name, attr.value === '{$uid}' ? `mce_${uid++}` : attr.value);\n                }\n            });\n            // If none of the required attributes were found then remove\n            if (rule.attributesRequired && !exists(rule.attributesRequired, (attr) => has$1(element, attr))) {\n                unwrap(element);\n                return;\n            }\n            // If there are no attributes then remove\n            if (rule.removeEmptyAttrs && hasNone(element)) {\n                unwrap(element);\n                return;\n            }\n            // Change the node name if the schema says to\n            if (rule.outputName && rule.outputName !== lcTagName) {\n                mutate(element, rule.outputName);\n            }\n        }\n    };\n    const processAttr = (ele, settings, schema, scope, evt) => {\n        const tagName = ele.tagName.toLowerCase();\n        const { attrName, attrValue } = evt;\n        evt.keepAttr = shouldKeepAttribute(settings, schema, scope, tagName, attrName, attrValue);\n        if (evt.keepAttr) {\n            evt.allowedAttributes[attrName] = true;\n            if (isBooleanAttributeOfNonCustomElement(attrName, schema, ele.nodeName)) {\n                evt.attrValue = attrName;\n            }\n            // We need to tell DOMPurify to forcibly keep the attribute if it's an SVG data URI and svg data URIs are allowed\n            if (settings.allow_svg_data_urls && startsWith(attrValue, 'data:image/svg+xml')) {\n                evt.forceKeepAttr = true;\n            }\n            // For internal elements always keep the attribute if the attribute name is id, class or style\n        }\n        else if (isRequiredAttributeOfInternalElement(ele, attrName)) {\n            evt.forceKeepAttr = true;\n        }\n    };\n    const shouldKeepAttribute = (settings, schema, scope, tagName, attrName, attrValue) => {\n        // All attributes within non HTML namespaces elements are considered valid\n        if (scope !== 'html' && !isNonHtmlElementRootName(tagName)) {\n            return true;\n        }\n        return !(attrName in filteredUrlAttrs && isInvalidUri(settings, attrValue, tagName)) &&\n            (!settings.validate || schema.isValid(tagName, attrName) || startsWith(attrName, 'data-') || startsWith(attrName, 'aria-'));\n    };\n    const isRequiredAttributeOfInternalElement = (ele, attrName) => ele.hasAttribute(internalElementAttr) && (attrName === 'id' || attrName === 'class' || attrName === 'style');\n    const isBooleanAttributeOfNonCustomElement = (attrName, schema, nodeName) => attrName in schema.getBoolAttrs() && !has$2(schema.getCustomElements(), nodeName.toLowerCase());\n    const filterAttributes = (ele, settings, schema, scope) => {\n        const { attributes } = ele;\n        for (let i = attributes.length - 1; i >= 0; i--) {\n            const attr = attributes[i];\n            const attrName = attr.name;\n            const attrValue = attr.value;\n            if (!shouldKeepAttribute(settings, schema, scope, ele.tagName.toLowerCase(), attrName, attrValue) && !isRequiredAttributeOfInternalElement(ele, attrName)) {\n                ele.removeAttribute(attrName);\n            }\n            else if (isBooleanAttributeOfNonCustomElement(attrName, schema, ele.nodeName)) {\n                ele.setAttribute(attrName, attrName);\n            }\n        }\n    };\n    const restoreValidContent = (node) => {\n        // Construct the sugar element wrapper\n        const element = SugarElement.fromDom(node);\n        if (isScript(element) || isStyle(element)) {\n            getOpt(element, 'data-mce-tmp').each((content) => {\n                set(element, content);\n                remove$9(element, 'data-mce-tmp');\n            });\n        }\n    };\n    const setupPurify = (settings, schema, namespaceTracker) => {\n        const purify$1 = purify();\n        // We use this to add new tags to the allow-list as we parse, if we notice that a tag has been banned but it's still in the schema\n        purify$1.addHook('uponSanitizeElement', (ele, evt) => {\n            processNode(ele, settings, schema, namespaceTracker.track(ele), evt);\n        });\n        purify$1.addHook('afterSanitizeElements', (ele) => {\n            restoreValidContent(ele);\n        });\n        // Let's do the same thing for attributes\n        purify$1.addHook('uponSanitizeAttribute', (ele, evt) => {\n            processAttr(ele, settings, schema, namespaceTracker.current(), evt);\n        });\n        return purify$1;\n    };\n    const getPurifyConfig = (settings, mimeType) => {\n        const basePurifyConfig = {\n            IN_PLACE: true,\n            ALLOW_UNKNOWN_PROTOCOLS: true,\n            // Deliberately ban all tags and attributes by default, and then un-ban them on demand in hooks\n            // #comment and #cdata-section are always allowed as they aren't controlled via the schema\n            // body is also allowed due to the DOMPurify checking the root node before sanitizing\n            ALLOWED_TAGS: ['#comment', '#cdata-section', 'body', 'html'],\n            ALLOWED_ATTR: []\n        };\n        const config = { ...basePurifyConfig };\n        // Set the relevant parser mimetype\n        config.PARSER_MEDIA_TYPE = mimeType;\n        // Allow any URI when allowing script urls\n        if (settings.allow_script_urls) {\n            config.ALLOWED_URI_REGEXP = /.*/;\n            // Allow anything except javascript (or similar) URIs if all html data urls are allowed\n        }\n        else if (settings.allow_html_data_urls) {\n            config.ALLOWED_URI_REGEXP = /^(?!(\\w+script|mhtml):)/i;\n        }\n        return config;\n    };\n    const sanitizeSvgElement = (ele) => {\n        // xlink:href used to be the way to do links in SVG 1.x https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/xlink:href\n        const xlinkAttrs = ['type', 'href', 'role', 'arcrole', 'title', 'show', 'actuate', 'label', 'from', 'to'].map((name) => `xlink:${name}`);\n        const config = {\n            IN_PLACE: true,\n            USE_PROFILES: {\n                html: true,\n                svg: true,\n                svgFilters: true\n            },\n            ALLOWED_ATTR: xlinkAttrs\n        };\n        purify().sanitize(ele, config);\n    };\n    const sanitizeMathmlElement = (node, settings) => {\n        const config = {\n            IN_PLACE: true,\n            USE_PROFILES: {\n                mathMl: true\n            },\n        };\n        const purify$1 = purify();\n        const allowedEncodings = settings.allow_mathml_annotation_encodings;\n        const hasAllowedEncodings = isArray$1(allowedEncodings) && allowedEncodings.length > 0;\n        const hasValidEncoding = (el) => {\n            const encoding = el.getAttribute('encoding');\n            return hasAllowedEncodings && isString(encoding) && contains$2(allowedEncodings, encoding);\n        };\n        const isValidElementOpt = (node, lcTagName) => {\n            if (hasAllowedEncodings && lcTagName === 'semantics') {\n                return Optional.some(true);\n            }\n            else if (lcTagName === 'annotation') {\n                return Optional.some(isElement$7(node) && hasValidEncoding(node));\n            }\n            else if (isArray$1(settings.extended_mathml_elements)) {\n                if (settings.extended_mathml_elements.includes(lcTagName)) {\n                    return Optional.from(true);\n                }\n                else {\n                    return Optional.none();\n                }\n            }\n            else {\n                return Optional.none();\n            }\n        };\n        purify$1.addHook('uponSanitizeElement', (node, evt) => {\n            // We know the node is an element as we have\n            // passed an element to the purify.sanitize function below\n            const lcTagName = evt.tagName ?? node.nodeName.toLowerCase();\n            const keepElementOpt = isValidElementOpt(node, lcTagName);\n            keepElementOpt.each((keepElement) => {\n                evt.allowedTags[lcTagName] = keepElement;\n                if (!keepElement && settings.sanitize) {\n                    if (isElement$7(node)) {\n                        node.remove();\n                    }\n                }\n            });\n        });\n        purify$1.addHook('uponSanitizeAttribute', (_node, event) => {\n            if (isArray$1(settings.extended_mathml_attributes)) {\n                const keepAttribute = settings.extended_mathml_attributes.includes(event.attrName);\n                if (keepAttribute) {\n                    event.forceKeepAttr = true;\n                }\n            }\n        });\n        purify$1.sanitize(node, config);\n    };\n    const mkSanitizeNamespaceElement = (settings) => (ele) => {\n        const namespaceType = toScopeType(ele);\n        if (namespaceType === 'svg') {\n            sanitizeSvgElement(ele);\n        }\n        else if (namespaceType === 'math') {\n            sanitizeMathmlElement(ele, settings);\n        }\n        else {\n            throw new Error('Not a namespace element');\n        }\n    };\n    const getSanitizer = (settings, schema) => {\n        const namespaceTracker = createNamespaceTracker();\n        if (settings.sanitize) {\n            const purify = setupPurify(settings, schema, namespaceTracker);\n            const sanitizeHtmlElement = (body, mimeType) => {\n                purify.sanitize(body, getPurifyConfig(settings, mimeType));\n                purify.removed = [];\n                namespaceTracker.reset();\n            };\n            return {\n                sanitizeHtmlElement,\n                sanitizeNamespaceElement: mkSanitizeNamespaceElement(settings)\n            };\n        }\n        else {\n            const sanitizeHtmlElement = (body, _mimeType) => {\n                // eslint-disable-next-line no-bitwise\n                const nodeIterator = document.createNodeIterator(body, NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT);\n                let node;\n                while ((node = nodeIterator.nextNode())) {\n                    const currentScope = namespaceTracker.track(node);\n                    processNode(node, settings, schema, currentScope);\n                    if (isElement$7(node)) {\n                        filterAttributes(node, settings, schema, currentScope);\n                    }\n                }\n                namespaceTracker.reset();\n            };\n            const sanitizeNamespaceElement = noop;\n            return {\n                sanitizeHtmlElement,\n                sanitizeNamespaceElement\n            };\n        }\n    };\n\n    /**\n     * @summary\n     * This class parses HTML code into a DOM like structure of nodes it will remove redundant whitespace and make\n     * sure that the node tree is valid according to the specified schema.\n     * So for example: `<p>a<p>b</p>c</p>` will become `<p>a</p><p>b</p><p>c</p>`.\n     *\n     * @example\n     * const parser = tinymce.html.DomParser({ validate: true }, schema);\n     * const rootNode = parser.parse('<h1>content</h1>');\n     *\n     * @class tinymce.html.DomParser\n     * @version 3.4\n     */\n    const extraBlockLikeElements = ['script', 'style', 'template', 'param', 'meta', 'title', 'link'];\n    const makeMap = Tools.makeMap, extend$1 = Tools.extend;\n    const transferChildren = (parent, nativeParent, specialElements, nsSanitizer, decodeComments) => {\n        const parentName = parent.name;\n        // Exclude the special elements where the content is RCDATA as their content needs to be parsed instead of being left as plain text\n        // See: https://html.spec.whatwg.org/multipage/parsing.html#parsing-html-fragments\n        const isSpecial = parentName in specialElements && parentName !== 'title' && parentName !== 'textarea' && parentName !== 'noscript';\n        const childNodes = nativeParent.childNodes;\n        for (let ni = 0, nl = childNodes.length; ni < nl; ni++) {\n            const nativeChild = childNodes[ni];\n            const child = new AstNode(nativeChild.nodeName.toLowerCase(), nativeChild.nodeType);\n            if (isElement$7(nativeChild)) {\n                const attributes = nativeChild.attributes;\n                for (let ai = 0, al = attributes.length; ai < al; ai++) {\n                    const attr = attributes[ai];\n                    child.attr(attr.name, attr.value);\n                }\n                if (isNonHtmlElementRootName(child.name)) {\n                    nsSanitizer(nativeChild);\n                    child.value = nativeChild.innerHTML;\n                }\n            }\n            else if (isText$b(nativeChild)) {\n                child.value = nativeChild.data;\n                if (isSpecial) {\n                    child.raw = true;\n                }\n            }\n            else if (isComment(nativeChild)) {\n                child.value = decodeComments ? decodeData$1(nativeChild.data) : nativeChild.data;\n            }\n            else if (isCData(nativeChild) || isPi(nativeChild)) {\n                child.value = nativeChild.data;\n            }\n            if (isTemplate(nativeChild)) {\n                const content = AstNode.create('#text');\n                content.value = nativeChild.innerHTML;\n                content.raw = true;\n                child.append(content);\n            }\n            else if (!isNonHtmlElementRootName(child.name)) {\n                transferChildren(child, nativeChild, specialElements, nsSanitizer, decodeComments);\n            }\n            parent.append(child);\n        }\n    };\n    const walkTree = (root, preprocessors, postprocessors) => {\n        const traverseOrder = [];\n        for (let node = root, lastNode = node; node; lastNode = node, node = node.walk()) {\n            const tempNode = node;\n            each$e(preprocessors, (preprocess) => preprocess(tempNode));\n            if (isNullable(tempNode.parent) && tempNode !== root) {\n                // The node has been detached, so rewind a little and don't add it to our traversal\n                node = lastNode;\n            }\n            else {\n                traverseOrder.push(tempNode);\n            }\n        }\n        for (let i = traverseOrder.length - 1; i >= 0; i--) {\n            const node = traverseOrder[i];\n            each$e(postprocessors, (postprocess) => postprocess(node));\n        }\n    };\n    // All the dom operations we want to perform, regardless of whether we're trying to properly validate things\n    // e.g. removing excess whitespace\n    // e.g. removing empty nodes (or padding them with <br>)\n    //\n    // Returns [ preprocess, postprocess ]\n    const whitespaceCleaner = (root, schema, settings, args) => {\n        const validate = settings.validate;\n        const nonEmptyElements = schema.getNonEmptyElements();\n        const whitespaceElements = schema.getWhitespaceElements();\n        const blockElements = extend$1(makeMap(extraBlockLikeElements), schema.getBlockElements());\n        const textRootBlockElements = getTextRootBlockElements(schema);\n        const allWhiteSpaceRegExp = /[ \\t\\r\\n]+/g;\n        const startWhiteSpaceRegExp = /^[ \\t\\r\\n]+/;\n        const endWhiteSpaceRegExp = /[ \\t\\r\\n]+$/;\n        const hasWhitespaceParent = (node) => {\n            let tempNode = node.parent;\n            while (isNonNullable(tempNode)) {\n                if (tempNode.name in whitespaceElements) {\n                    return true;\n                }\n                else {\n                    tempNode = tempNode.parent;\n                }\n            }\n            return false;\n        };\n        const isTextRootBlockEmpty = (node) => {\n            let tempNode = node;\n            while (isNonNullable(tempNode)) {\n                if (tempNode.name in textRootBlockElements) {\n                    return isEmpty$2(schema, nonEmptyElements, whitespaceElements, tempNode);\n                }\n                else {\n                    tempNode = tempNode.parent;\n                }\n            }\n            return false;\n        };\n        const isBlock = (node) => node.name in blockElements || isTransparentAstBlock(schema, node) || (isNonHtmlElementRootName(node.name) && node.parent === root);\n        const isAtEdgeOfBlock = (node, start) => {\n            const neighbour = start ? node.prev : node.next;\n            if (isNonNullable(neighbour) || isNullable(node.parent)) {\n                return false;\n            }\n            // Make sure our parent is actually a block, and also make sure it isn't a temporary \"context\" element\n            // that we're probably going to unwrap as soon as we insert this content into the editor\n            return isBlock(node.parent) && (node.parent !== root || args.isRootContent === true);\n        };\n        const preprocess = (node) => {\n            if (node.type === 3) {\n                // Remove leading whitespace here, so that all whitespace in nodes to the left of us has already been fixed\n                if (!hasWhitespaceParent(node)) {\n                    let text = node.value ?? '';\n                    text = text.replace(allWhiteSpaceRegExp, ' ');\n                    if (isLineBreakNode(node.prev, isBlock) || isAtEdgeOfBlock(node, true)) {\n                        text = text.replace(startWhiteSpaceRegExp, '');\n                    }\n                    if (text.length === 0) {\n                        node.remove();\n                    }\n                    else if (text === ' ' && node.prev && node.prev.type === COMMENT && node.next && node.next.type === COMMENT) {\n                        node.remove();\n                    }\n                    else {\n                        node.value = text;\n                    }\n                }\n            }\n        };\n        const postprocess = (node) => {\n            if (node.type === 1) {\n                // Check for empty nodes here, because children will have been processed and (if necessary) emptied / removed already\n                const elementRule = schema.getElementRule(node.name);\n                if (validate && elementRule) {\n                    const isNodeEmpty = isEmpty$2(schema, nonEmptyElements, whitespaceElements, node);\n                    if (elementRule.paddInEmptyBlock && isNodeEmpty && isTextRootBlockEmpty(node)) {\n                        paddEmptyNode(settings, args, isBlock, node);\n                    }\n                    else if (elementRule.removeEmpty && isNodeEmpty) {\n                        if (isBlock(node)) {\n                            node.remove();\n                        }\n                        else {\n                            node.unwrap();\n                        }\n                    }\n                    else if (elementRule.paddEmpty && (isNodeEmpty || isPaddedWithNbsp(node))) {\n                        paddEmptyNode(settings, args, isBlock, node);\n                    }\n                }\n            }\n            else if (node.type === 3) {\n                // Removing trailing whitespace here, so that all whitespace in nodes to the right of us has already been fixed\n                if (!hasWhitespaceParent(node)) {\n                    let text = node.value ?? '';\n                    if (node.next && isBlock(node.next) || isAtEdgeOfBlock(node, false)) {\n                        text = text.replace(endWhiteSpaceRegExp, '');\n                    }\n                    if (text.length === 0) {\n                        node.remove();\n                    }\n                    else {\n                        node.value = text;\n                    }\n                }\n            }\n        };\n        return [preprocess, postprocess];\n    };\n    const getRootBlockName = (settings, args) => {\n        const name = args.forced_root_block ?? settings.forced_root_block;\n        if (name === false) {\n            return '';\n        }\n        else if (name === true) {\n            return 'p';\n        }\n        else {\n            return name;\n        }\n    };\n    const xhtmlAttribte = ' xmlns=\"http://www.w3.org/1999/xhtml\"';\n    const DomParser = (settings = {}, schema = Schema()) => {\n        const nodeFilterRegistry = create$8();\n        const attributeFilterRegistry = create$8();\n        // Apply setting defaults\n        const defaultedSettings = {\n            validate: true,\n            root_name: 'body',\n            sanitize: true,\n            allow_html_in_comments: false,\n            ...settings\n        };\n        const parser = new DOMParser();\n        const sanitizer = getSanitizer(defaultedSettings, schema);\n        const parseAndSanitizeWithContext = (html, rootName, format = 'html', useDocumentNotBody = false) => {\n            const isxhtml = format === 'xhtml';\n            const mimeType = isxhtml ? 'application/xhtml+xml' : 'text/html';\n            // Determine the root element to wrap the HTML in when parsing. If we're dealing with a\n            // special element then we need to wrap it so the internal content is handled appropriately.\n            const isSpecialRoot = has$2(schema.getSpecialElements(), rootName.toLowerCase());\n            const content = isSpecialRoot ? `<${rootName}>${html}</${rootName}>` : html;\n            const makeWrap = () => {\n                if (/^[\\s]*<head/i.test(html) || /^[\\s]*<html/i.test(html) || /^[\\s]*<!DOCTYPE/i.test(html)) {\n                    return `<html${isxhtml ? xhtmlAttribte : ''}>${content}</html>`;\n                }\n                else {\n                    if (isxhtml) {\n                        return `<html${xhtmlAttribte}><head></head><body>${content}</body></html>`;\n                    }\n                    else {\n                        return `<body>${content}</body>`;\n                    }\n                }\n            };\n            const document = parser.parseFromString(makeWrap(), mimeType);\n            const body = useDocumentNotBody ? document.documentElement : document.body;\n            sanitizer.sanitizeHtmlElement(body, mimeType);\n            return isSpecialRoot ? body.firstChild : body;\n        };\n        /**\n         * Adds a node filter function to the parser, the parser will collect the specified nodes by name\n         * and then execute the callback once it has finished parsing the document.\n         *\n         * @method addNodeFilter\n         * @param {String} name Comma separated list of nodes to collect.\n         * @param {Function} callback Callback function to execute once it has collected nodes.\n         * @example\n         * parser.addNodeFilter('p,h1', (nodes, name) => {\n         *   for (var i = 0; i < nodes.length; i++) {\n         *     console.log(nodes[i].name);\n         *   }\n         * });\n         */\n        const addNodeFilter = nodeFilterRegistry.addFilter;\n        const getNodeFilters = nodeFilterRegistry.getFilters;\n        /**\n         * Removes a node filter function or removes all filter functions from the parser for the node names provided.\n         *\n         * @method removeNodeFilter\n         * @param {String} name Comma separated list of node names to remove filters for.\n         * @param {Function} callback Optional callback function to only remove a specific callback.\n         * @example\n         * // Remove a single filter\n         * parser.removeNodeFilter('p,h1', someCallback);\n         *\n         * // Remove all filters\n         * parser.removeNodeFilter('p,h1');\n         */\n        const removeNodeFilter = nodeFilterRegistry.removeFilter;\n        /**\n         * Adds an attribute filter function to the parser, the parser will collect nodes that has the specified attributes\n         * and then execute the callback once it has finished parsing the document.\n         *\n         * @method addAttributeFilter\n         * @param {String} name Comma separated list of attributes to collect.\n         * @param {Function} callback Callback function to execute once it has collected nodes.\n         * @example\n         * parser.addAttributeFilter('src,href', (nodes, name) => {\n         *   for (let i = 0; i < nodes.length; i++) {\n         *     console.log(nodes[i].name);\n         *   }\n         * });\n         */\n        const addAttributeFilter = attributeFilterRegistry.addFilter;\n        const getAttributeFilters = attributeFilterRegistry.getFilters;\n        /**\n         * Removes an attribute filter function or removes all filter functions from the parser for the attribute names provided.\n         *\n         * @method removeAttributeFilter\n         * @param {String} name Comma separated list of attribute names to remove filters for.\n         * @param {Function} callback Optional callback function to only remove a specific callback.\n         * @example\n         * // Remove a single filter\n         * parser.removeAttributeFilter('src,href', someCallback);\n         *\n         * // Remove all filters\n         * parser.removeAttributeFilter('src,href');\n         */\n        const removeAttributeFilter = attributeFilterRegistry.removeFilter;\n        const findInvalidChildren = (node, invalidChildren) => {\n            if (isInvalid(schema, node)) {\n                invalidChildren.push(node);\n            }\n        };\n        const isWrappableNode = (blockElements, node) => {\n            const isInternalElement = isString(node.attr(internalElementAttr));\n            const isInlineElement = node.type === 1 && (!has$2(blockElements, node.name) && !isTransparentAstBlock(schema, node)) && !isNonHtmlElementRootName(node.name);\n            return node.type === 3 || (isInlineElement && !isInternalElement);\n        };\n        const addRootBlocks = (rootNode, rootBlockName) => {\n            const blockElements = extend$1(makeMap(extraBlockLikeElements), schema.getBlockElements());\n            const startWhiteSpaceRegExp = /^[ \\t\\r\\n]+/;\n            const endWhiteSpaceRegExp = /[ \\t\\r\\n]+$/;\n            let node = rootNode.firstChild, rootBlockNode = null;\n            // Removes whitespace at beginning and end of block so:\n            // <p> x </p> -> <p>x</p>\n            const trim = (rootBlock) => {\n                if (rootBlock) {\n                    node = rootBlock.firstChild;\n                    if (node && node.type === 3) {\n                        node.value = node.value?.replace(startWhiteSpaceRegExp, '');\n                    }\n                    node = rootBlock.lastChild;\n                    if (node && node.type === 3) {\n                        node.value = node.value?.replace(endWhiteSpaceRegExp, '');\n                    }\n                }\n            };\n            // Check if rootBlock is valid within rootNode for example if P is valid in H1 if H1 is the contentEditable root\n            if (!schema.isValidChild(rootNode.name, rootBlockName.toLowerCase())) {\n                return;\n            }\n            while (node) {\n                const next = node.next;\n                if (isWrappableNode(blockElements, node)) {\n                    if (!rootBlockNode) {\n                        // Create a new root block element\n                        rootBlockNode = new AstNode(rootBlockName, 1);\n                        rootBlockNode.attr(defaultedSettings.forced_root_block_attrs);\n                        rootNode.insert(rootBlockNode, node);\n                        rootBlockNode.append(node);\n                    }\n                    else {\n                        rootBlockNode.append(node);\n                    }\n                }\n                else {\n                    trim(rootBlockNode);\n                    rootBlockNode = null;\n                }\n                node = next;\n            }\n            trim(rootBlockNode);\n        };\n        /**\n         * Parses the specified HTML string into a DOM like node tree and returns the result.\n         *\n         * @method parse\n         * @param {String} html Html string to sax parse.\n         * @param {Object} args Optional args object that gets passed to all filter functions.\n         * @return {tinymce.html.Node} Root node containing the tree.\n         * @example\n         * const rootNode = tinymce.html.DomParser({...}).parse('<b>text</b>');\n         */\n        const parse = (html, args = {}) => {\n            const validate = defaultedSettings.validate;\n            const preferFullDocument = (args.context ?? defaultedSettings.root_name) === '#document';\n            const rootName = args.context ?? (preferFullDocument ? 'html' : defaultedSettings.root_name);\n            // Parse and sanitize the content\n            const element = parseAndSanitizeWithContext(html, rootName, args.format, preferFullDocument);\n            updateChildren(schema, element);\n            // Create the AST representation\n            const rootNode = new AstNode(rootName, 11);\n            transferChildren(rootNode, element, schema.getSpecialElements(), sanitizer.sanitizeNamespaceElement, defaultedSettings.sanitize && defaultedSettings.allow_html_in_comments);\n            // This next line is needed to fix a memory leak in chrome and firefox.\n            // For more information see TINY-9186\n            element.innerHTML = '';\n            // Set up whitespace fixes\n            const [whitespacePre, whitespacePost] = whitespaceCleaner(rootNode, schema, defaultedSettings, args);\n            // Find the invalid children in the tree\n            const invalidChildren = [];\n            const invalidFinder = validate ? (node) => findInvalidChildren(node, invalidChildren) : noop;\n            // Set up attribute and node matching\n            const matches = { nodes: {}, attributes: {} };\n            const matchFinder = (node) => matchNode(getNodeFilters(), getAttributeFilters(), node, matches);\n            // Walk the dom, apply all of the above things\n            walkTree(rootNode, [whitespacePre, matchFinder], [whitespacePost, invalidFinder]);\n            // Because we collected invalid children while walking backwards, we need to reverse the list before operating on them\n            invalidChildren.reverse();\n            // Fix invalid children or report invalid children in a contextual parsing\n            if (validate && invalidChildren.length > 0) {\n                if (args.context) {\n                    args.invalid = true;\n                }\n                else {\n                    cleanInvalidNodes(invalidChildren, schema, rootNode, matchFinder);\n                }\n            }\n            // Wrap nodes in the root into block elements if the root is body\n            const rootBlockName = getRootBlockName(defaultedSettings, args);\n            if (rootBlockName && (rootNode.name === 'body' || args.isRootContent)) {\n                addRootBlocks(rootNode, rootBlockName);\n            }\n            // Run filters only when the contents is valid\n            if (!args.invalid) {\n                runFilters(matches, args);\n            }\n            return rootNode;\n        };\n        const exports = {\n            schema,\n            addAttributeFilter,\n            getAttributeFilters,\n            removeAttributeFilter,\n            addNodeFilter,\n            getNodeFilters,\n            removeNodeFilter,\n            parse\n        };\n        register$4(exports, defaultedSettings);\n        register$5(exports, defaultedSettings, schema);\n        return exports;\n    };\n\n    const isTreeNode = (content) => content instanceof AstNode;\n\n    const serializeContent = (content) => isTreeNode(content) ? HtmlSerializer({ validate: false }).serialize(content) : content;\n    const withSerializedContent = (content, fireEvent, parserSettings) => {\n        const serializedContent = serializeContent(content);\n        const eventArgs = fireEvent(serializedContent);\n        if (eventArgs.isDefaultPrevented()) {\n            return eventArgs;\n        }\n        else if (isTreeNode(content)) {\n            // Restore the content type back to being an AstNode. If the content has changed we need to\n            // re-parse the new content, otherwise we can return the input.\n            if (eventArgs.content !== serializedContent) {\n                const rootNode = DomParser({ validate: false, forced_root_block: false, ...parserSettings }).parse(eventArgs.content, { context: content.name });\n                return { ...eventArgs, content: rootNode };\n            }\n            else {\n                return { ...eventArgs, content };\n            }\n        }\n        else {\n            return eventArgs;\n        }\n    };\n    const makeParserSettings = (editor) => ({\n        sanitize: shouldSanitizeXss(editor),\n        sandbox_iframes: shouldSandboxIframes(editor),\n        sandbox_iframes_exclusions: getSandboxIframesExclusions(editor)\n    });\n    const preProcessGetContent = (editor, args) => {\n        if (args.no_events) {\n            return Result.value(args);\n        }\n        else {\n            const eventArgs = fireBeforeGetContent(editor, args);\n            if (eventArgs.isDefaultPrevented()) {\n                return Result.error(fireGetContent(editor, { content: '', ...eventArgs }).content);\n            }\n            else {\n                return Result.value(eventArgs);\n            }\n        }\n    };\n    const postProcessGetContent = (editor, content, args) => {\n        if (args.no_events) {\n            return content;\n        }\n        else {\n            const processedEventArgs = withSerializedContent(content, (content) => fireGetContent(editor, { ...args, content }), makeParserSettings(editor));\n            return processedEventArgs.content;\n        }\n    };\n    const preProcessSetContent = (editor, args) => {\n        if (args.no_events) {\n            return Result.value(args);\n        }\n        else {\n            const processedEventArgs = withSerializedContent(args.content, (content) => fireBeforeSetContent(editor, { ...args, content }), makeParserSettings(editor));\n            if (processedEventArgs.isDefaultPrevented()) {\n                fireSetContent(editor, processedEventArgs);\n                return Result.error(undefined);\n            }\n            else {\n                return Result.value(processedEventArgs);\n            }\n        }\n    };\n    const postProcessSetContent = (editor, content, args) => {\n        if (!args.no_events) {\n            fireSetContent(editor, { ...args, content });\n        }\n    };\n\n    const removedOptions = ('autoresize_on_init,content_editable_state,padd_empty_with_br,block_elements,' +\n        'boolean_attributes,editor_deselector,editor_selector,elements,file_browser_callback_types,filepicker_validator_handler,' +\n        'force_hex_style_colors,force_p_newlines,gecko_spellcheck,images_dataimg_filter,media_scripts,mode,move_caret_before_on_enter_elements,' +\n        'non_empty_elements,self_closing_elements,short_ended_elements,special,spellchecker_select_languages,spellchecker_whitelist,' +\n        'tab_focus,tabfocus_elements,table_responsive_width,text_block_elements,text_inline_elements,toolbar_drawer,types,validate,whitespace_elements,' +\n        'paste_enable_default_filters,paste_filter_drop,paste_word_valid_elements,paste_retain_style_properties,paste_convert_word_fake_lists,' +\n        'template_cdate_classes,template_mdate_classes,template_selected_content_classes,template_preview_replace_values,template_replace_values,templates,template_cdate_format,template_mdate_format').split(',');\n    const deprecatedOptions = ['content_css_cors'];\n    const removedPlugins = 'bbcode,colorpicker,contextmenu,fullpage,legacyoutput,spellchecker,template,textcolor,rtc'.split(',');\n    const deprecatedPlugins = [\n        {\n            name: 'export',\n            replacedWith: 'Export to PDF'\n        },\n    ];\n    const getMatchingOptions = (options, searchingFor) => {\n        const settingNames = filter$5(searchingFor, (setting) => has$2(options, setting));\n        return sort(settingNames);\n    };\n    const getRemovedOptions = (options) => {\n        const settingNames = getMatchingOptions(options, removedOptions);\n        // Forced root block is a special case whereby only the empty/false value is deprecated\n        const forcedRootBlock = options.forced_root_block;\n        // Note: This cast is required for old configurations as forced root block used to allow a boolean\n        if (forcedRootBlock === false || forcedRootBlock === '') {\n            settingNames.push('forced_root_block (false only)');\n        }\n        return sort(settingNames);\n    };\n    const getDeprecatedOptions = (options) => getMatchingOptions(options, deprecatedOptions);\n    const getMatchingPlugins = (options, searchingFor) => {\n        const plugins = Tools.makeMap(options.plugins, ' ');\n        const hasPlugin = (plugin) => has$2(plugins, plugin);\n        const pluginNames = filter$5(searchingFor, hasPlugin);\n        return sort(pluginNames);\n    };\n    const getRemovedPlugins = (options) => getMatchingPlugins(options, removedPlugins);\n    const getDeprecatedPlugins = (options) => getMatchingPlugins(options, deprecatedPlugins.map((entry) => entry.name));\n    const logRemovedWarnings = (rawOptions, normalizedOptions) => {\n        // Note: Ensure we use the original user settings, not the final when logging\n        const removedOptions = getRemovedOptions(rawOptions);\n        const removedPlugins = getRemovedPlugins(normalizedOptions);\n        const hasRemovedPlugins = removedPlugins.length > 0;\n        const hasRemovedOptions = removedOptions.length > 0;\n        const isLegacyMobileTheme = normalizedOptions.theme === 'mobile';\n        if (hasRemovedPlugins || hasRemovedOptions || isLegacyMobileTheme) {\n            const listJoiner = '\\n- ';\n            const themesMessage = isLegacyMobileTheme ? `\\n\\nThemes:${listJoiner}mobile` : '';\n            const pluginsMessage = hasRemovedPlugins ? `\\n\\nPlugins:${listJoiner}${removedPlugins.join(listJoiner)}` : '';\n            const optionsMessage = hasRemovedOptions ? `\\n\\nOptions:${listJoiner}${removedOptions.join(listJoiner)}` : '';\n            // eslint-disable-next-line no-console\n            console.warn('The following deprecated features are currently enabled and have been removed in TinyMCE 8.0. These features will no longer work and should be removed from the TinyMCE configuration. ' +\n                'See https://www.tiny.cloud/docs/tinymce/8/migration-from-7x/ for more information.' +\n                themesMessage +\n                pluginsMessage +\n                optionsMessage);\n        }\n    };\n    const getPluginDescription = (name) => find$2(deprecatedPlugins, (entry) => entry.name === name).fold(() => name, (entry) => {\n        if (entry.replacedWith) {\n            return `${name}, replaced by ${entry.replacedWith}`;\n        }\n        else {\n            return name;\n        }\n    });\n    const logDeprecatedWarnings = (rawOptions, normalizedOptions) => {\n        // Note: Ensure we use the original user settings, not the final when logging\n        const deprecatedOptions = getDeprecatedOptions(rawOptions);\n        const deprecatedPlugins = getDeprecatedPlugins(normalizedOptions);\n        const hasDeprecatedPlugins = deprecatedPlugins.length > 0;\n        const hasDeprecatedOptions = deprecatedOptions.length > 0;\n        if (hasDeprecatedPlugins || hasDeprecatedOptions) {\n            const listJoiner = '\\n- ';\n            const pluginsMessage = hasDeprecatedPlugins ? `\\n\\nPlugins:${listJoiner}${deprecatedPlugins.map(getPluginDescription).join(listJoiner)}` : '';\n            const optionsMessage = hasDeprecatedOptions ? `\\n\\nOptions:${listJoiner}${deprecatedOptions.join(listJoiner)}` : '';\n            // eslint-disable-next-line no-console\n            console.warn('The following deprecated features are currently enabled but will be removed soon.' +\n                pluginsMessage +\n                optionsMessage);\n        }\n    };\n    const logWarnings = (rawOptions, normalizedOptions) => {\n        logRemovedWarnings(rawOptions, normalizedOptions);\n        logDeprecatedWarnings(rawOptions, normalizedOptions);\n    };\n    const deprecatedFeatures = {\n        fire: 'The \"fire\" event api has been deprecated and will be removed in TinyMCE 9. Use \"dispatch\" instead.',\n        selectionSetContent: 'The \"editor.selection.setContent\" method has been deprecated and will be removed in TinyMCE 9. Use \"editor.insertContent\" instead.'\n    };\n    const logFeatureDeprecationWarning = (feature) => {\n        // eslint-disable-next-line no-console\n        console.warn(deprecatedFeatures[feature], new Error().stack);\n    };\n\n    const removeEmpty = (text) => {\n        if (text.dom.length === 0) {\n            remove$8(text);\n            return Optional.none();\n        }\n        else {\n            return Optional.some(text);\n        }\n    };\n    const walkPastBookmark = (node, start) => node.filter((elm) => BookmarkManager.isBookmarkNode(elm.dom))\n        .bind(start ? nextSibling : prevSibling);\n    const merge = (outer, inner, rng, start, schema) => {\n        const outerElm = outer.dom;\n        const innerElm = inner.dom;\n        const oldLength = start ? outerElm.length : innerElm.length;\n        if (start) {\n            mergeTextNodes(outerElm, innerElm, schema, false, !start);\n            rng.setStart(innerElm, oldLength);\n        }\n        else {\n            mergeTextNodes(innerElm, outerElm, schema, false, !start);\n            rng.setEnd(innerElm, oldLength);\n        }\n    };\n    const normalizeTextIfRequired = (inner, start, schema) => {\n        parent(inner).each((root) => {\n            const text = inner.dom;\n            if (start && needsToBeNbspLeft(root, CaretPosition(text, 0), schema)) {\n                normalizeWhitespaceAfter(text, 0, schema);\n            }\n            else if (!start && needsToBeNbspRight(root, CaretPosition(text, text.length), schema)) {\n                normalizeWhitespaceBefore(text, text.length, schema);\n            }\n        });\n    };\n    const mergeAndNormalizeText = (outerNode, innerNode, rng, start, schema) => {\n        outerNode.bind((outer) => {\n            // Normalize the text outside the inserted content\n            const normalizer = start ? normalizeWhitespaceBefore : normalizeWhitespaceAfter;\n            normalizer(outer.dom, start ? outer.dom.length : 0, schema);\n            // Merge the inserted content with other text nodes\n            return innerNode.filter(isText$c).map((inner) => merge(outer, inner, rng, start, schema));\n        }).orThunk(() => {\n            // Note: Attempt to leave the inserted/inner content as is and only adjust if absolutely required\n            const innerTextNode = walkPastBookmark(innerNode, start).or(innerNode).filter(isText$c);\n            return innerTextNode.map((inner) => normalizeTextIfRequired(inner, start, schema));\n        });\n    };\n    const rngSetContent = (rng, fragment, schema) => {\n        const firstChild = Optional.from(fragment.firstChild).map(SugarElement.fromDom);\n        const lastChild = Optional.from(fragment.lastChild).map(SugarElement.fromDom);\n        rng.deleteContents();\n        rng.insertNode(fragment);\n        const prevText = firstChild.bind(prevSibling).filter(isText$c).bind(removeEmpty);\n        const nextText = lastChild.bind(nextSibling).filter(isText$c).bind(removeEmpty);\n        // Join and normalize text\n        mergeAndNormalizeText(prevText, firstChild, rng, true, schema);\n        mergeAndNormalizeText(nextText, lastChild, rng, false, schema);\n        rng.collapse(false);\n    };\n    const setupArgs$3 = (args, content) => ({\n        format: 'html',\n        ...args,\n        set: true,\n        selection: true,\n        content\n    });\n    const cleanContent = (editor, args) => {\n        if (args.format !== 'raw') {\n            // Find which context to parse the content in\n            const rng = editor.selection.getRng();\n            const contextBlock = editor.dom.getParent(rng.commonAncestorContainer, editor.dom.isBlock);\n            const contextArgs = contextBlock ? { context: contextBlock.nodeName.toLowerCase() } : {};\n            const node = editor.parser.parse(args.content, { forced_root_block: false, ...contextArgs, ...args });\n            return HtmlSerializer({ validate: false }, editor.schema).serialize(node);\n        }\n        else {\n            return args.content;\n        }\n    };\n    const setContentInternal$1 = (editor, content, args = {}) => {\n        const defaultedArgs = setupArgs$3(args, content);\n        preProcessSetContent(editor, defaultedArgs).each((updatedArgs) => {\n            // Sanitize the content\n            const cleanedContent = cleanContent(editor, updatedArgs);\n            const rng = editor.selection.getRng();\n            rngSetContent(rng, rng.createContextualFragment(cleanedContent), editor.schema);\n            editor.selection.setRng(rng);\n            scrollRangeIntoView(editor, rng);\n            postProcessSetContent(editor, cleanedContent, updatedArgs);\n        });\n    };\n    const setContentExternal = (editor, content, args = {}) => {\n        logFeatureDeprecationWarning('selectionSetContent');\n        setContentInternal$1(editor, content, args);\n    };\n\n    /**\n     * Handles inserts of lists into the editor instance.\n     *\n     * @class tinymce.InsertList\n     * @private\n     */\n    const hasOnlyOneChild$1 = (node) => {\n        return isNonNullable(node.firstChild) && node.firstChild === node.lastChild;\n    };\n    const isPaddingNode = (node) => {\n        return node.name === 'br' || node.value === nbsp;\n    };\n    const isPaddedEmptyBlock = (schema, node) => {\n        const blockElements = schema.getBlockElements();\n        return blockElements[node.name] && hasOnlyOneChild$1(node) && isPaddingNode(node.firstChild);\n    };\n    const isEmptyFragmentElement = (schema, node) => {\n        const nonEmptyElements = schema.getNonEmptyElements();\n        return isNonNullable(node) && (node.isEmpty(nonEmptyElements) || isPaddedEmptyBlock(schema, node));\n    };\n    const isListFragment = (schema, fragment) => {\n        let firstChild = fragment.firstChild;\n        let lastChild = fragment.lastChild;\n        // Skip meta since it's likely <meta><ul>..</ul>\n        if (firstChild && firstChild.name === 'meta') {\n            firstChild = firstChild.next;\n        }\n        // Skip mce_marker since it's likely <ul>..</ul><span id=\"mce_marker\"></span>\n        if (lastChild && lastChild.attr('id') === 'mce_marker') {\n            lastChild = lastChild.prev;\n        }\n        // Skip last child if it's an empty block\n        if (isEmptyFragmentElement(schema, lastChild)) {\n            lastChild = lastChild?.prev;\n        }\n        if (!firstChild || firstChild !== lastChild) {\n            return false;\n        }\n        return firstChild.name === 'ul' || firstChild.name === 'ol';\n    };\n    const cleanupDomFragment = (domFragment) => {\n        const firstChild = domFragment.firstChild;\n        const lastChild = domFragment.lastChild;\n        // TODO: remove the meta tag from paste logic\n        if (firstChild && firstChild.nodeName === 'META') {\n            firstChild.parentNode?.removeChild(firstChild);\n        }\n        if (lastChild && lastChild.id === 'mce_marker') {\n            lastChild.parentNode?.removeChild(lastChild);\n        }\n        return domFragment;\n    };\n    const toDomFragment = (dom, serializer, fragment) => {\n        const html = serializer.serialize(fragment);\n        const domFragment = dom.createFragment(html);\n        return cleanupDomFragment(domFragment);\n    };\n    const listItems = (elm) => {\n        return filter$5(elm?.childNodes ?? [], (child) => {\n            return child.nodeName === 'LI';\n        });\n    };\n    const isPadding = (node) => {\n        return node.data === nbsp || isBr$7(node);\n    };\n    const isListItemPadded = (node) => {\n        return isNonNullable(node?.firstChild) && node.firstChild === node.lastChild && isPadding(node.firstChild);\n    };\n    const isEmptyOrPadded = (elm) => {\n        return !elm.firstChild || isListItemPadded(elm);\n    };\n    const trimListItems = (elms) => {\n        return elms.length > 0 && isEmptyOrPadded(elms[elms.length - 1]) ? elms.slice(0, -1) : elms;\n    };\n    const getParentLi = (dom, node) => {\n        const parentBlock = dom.getParent(node, dom.isBlock);\n        return parentBlock && parentBlock.nodeName === 'LI' ? parentBlock : null;\n    };\n    const isParentBlockLi = (dom, node) => {\n        return !!getParentLi(dom, node);\n    };\n    const getSplit = (parentNode, rng) => {\n        const beforeRng = rng.cloneRange();\n        const afterRng = rng.cloneRange();\n        beforeRng.setStartBefore(parentNode);\n        afterRng.setEndAfter(parentNode);\n        return [\n            beforeRng.cloneContents(),\n            afterRng.cloneContents()\n        ];\n    };\n    const findFirstIn = (node, rootNode) => {\n        const caretPos = CaretPosition.before(node);\n        const caretWalker = CaretWalker(rootNode);\n        const newCaretPos = caretWalker.next(caretPos);\n        return newCaretPos ? newCaretPos.toRange() : null;\n    };\n    const findLastOf = (node, rootNode) => {\n        const caretPos = CaretPosition.after(node);\n        const caretWalker = CaretWalker(rootNode);\n        const newCaretPos = caretWalker.prev(caretPos);\n        return newCaretPos ? newCaretPos.toRange() : null;\n    };\n    const insertMiddle = (target, elms, rootNode, rng) => {\n        const parts = getSplit(target, rng);\n        const parentElm = target.parentNode;\n        if (parentElm) {\n            parentElm.insertBefore(parts[0], target);\n            Tools.each(elms, (li) => {\n                parentElm.insertBefore(li, target);\n            });\n            parentElm.insertBefore(parts[1], target);\n            parentElm.removeChild(target);\n        }\n        return findLastOf(elms[elms.length - 1], rootNode);\n    };\n    const insertBefore$2 = (target, elms, rootNode) => {\n        const parentElm = target.parentNode;\n        if (parentElm) {\n            Tools.each(elms, (elm) => {\n                parentElm.insertBefore(elm, target);\n            });\n        }\n        return findFirstIn(target, rootNode);\n    };\n    const insertAfter$2 = (target, elms, rootNode, dom) => {\n        dom.insertAfter(elms.reverse(), target);\n        return findLastOf(elms[0], rootNode);\n    };\n    const insertAtCaret$1 = (serializer, dom, rng, fragment) => {\n        const domFragment = toDomFragment(dom, serializer, fragment);\n        const liTarget = getParentLi(dom, rng.startContainer);\n        const liElms = trimListItems(listItems(domFragment.firstChild));\n        const BEGINNING = 1, END = 2;\n        const rootNode = dom.getRoot();\n        const isAt = (location) => {\n            const caretPos = CaretPosition.fromRangeStart(rng);\n            const caretWalker = CaretWalker(dom.getRoot());\n            const newPos = location === BEGINNING ? caretWalker.prev(caretPos) : caretWalker.next(caretPos);\n            const newPosNode = newPos?.getNode();\n            return newPosNode ? getParentLi(dom, newPosNode) !== liTarget : true;\n        };\n        if (!liTarget) {\n            return null;\n        }\n        else if (isAt(BEGINNING)) {\n            return insertBefore$2(liTarget, liElms, rootNode);\n        }\n        else if (isAt(END)) {\n            return insertAfter$2(liTarget, liElms, rootNode, dom);\n        }\n        else {\n            return insertMiddle(liTarget, liElms, rootNode, rng);\n        }\n    };\n\n    const mergeableWrappedElements = ['pre'];\n    const shouldPasteContentOnly = (dom, fragment, parentNode, root) => {\n        const firstNode = fragment.firstChild;\n        const lastNode = fragment.lastChild;\n        const last = lastNode.attr('data-mce-type') === 'bookmark' ? lastNode.prev : lastNode;\n        const isPastingSingleElement = firstNode === last;\n        const isWrappedElement = contains$2(mergeableWrappedElements, firstNode.name);\n        if (isPastingSingleElement && isWrappedElement) {\n            const isContentEditable = firstNode.attr('contenteditable') !== 'false';\n            const isPastingInTheSameBlockTag = dom.getParent(parentNode, dom.isBlock)?.nodeName.toLowerCase() === firstNode.name;\n            const isPastingInContentEditable = Optional.from(getContentEditableRoot$1(root, parentNode)).forall(isContentEditableTrue$3);\n            return isContentEditable && isPastingInTheSameBlockTag && isPastingInContentEditable;\n        }\n        else {\n            return false;\n        }\n    };\n    const isTableCell = isTableCell$3;\n    const isTableCellContentSelected = (dom, rng, cell) => {\n        if (isNonNullable(cell)) {\n            const endCell = dom.getParent(rng.endContainer, isTableCell);\n            return cell === endCell && hasAllContentsSelected(SugarElement.fromDom(cell), rng);\n        }\n        else {\n            return false;\n        }\n    };\n    const isEditableEmptyBlock = (dom, node) => {\n        if (dom.isBlock(node) && dom.isEditable(node)) {\n            const childNodes = node.childNodes;\n            return (childNodes.length === 1 && isBr$7(childNodes[0])) || childNodes.length === 0;\n        }\n        else {\n            return false;\n        }\n    };\n    const validInsertion = (editor, value, parentNode) => {\n        // Should never insert content into bogus elements, since these can\n        // be resize handles or similar\n        if (parentNode.getAttribute('data-mce-bogus') === 'all') {\n            parentNode.parentNode?.insertBefore(editor.dom.createFragment(value), parentNode);\n        }\n        else {\n            if (isEditableEmptyBlock(editor.dom, parentNode)) {\n                editor.dom.setHTML(parentNode, value);\n            }\n            else {\n                setContentInternal$1(editor, value, { no_events: true });\n            }\n        }\n    };\n    const trimBrsFromTableCell = (dom, elm, schema) => {\n        Optional.from(dom.getParent(elm, 'td,th')).map(SugarElement.fromDom).each((el) => trimBlockTrailingBr(el, schema));\n    };\n    // Remove children nodes that are exactly the same as a parent node - name, attributes, styles\n    const reduceInlineTextElements = (editor, merge) => {\n        const textInlineElements = editor.schema.getTextInlineElements();\n        const dom = editor.dom;\n        if (merge) {\n            const root = editor.getBody();\n            const elementUtils = ElementUtils(editor);\n            const fragmentSelector = '*[data-mce-fragment]';\n            const fragments = dom.select(fragmentSelector);\n            Tools.each(fragments, (node) => {\n                const isInline = (currentNode) => isNonNullable(textInlineElements[currentNode.nodeName.toLowerCase()]);\n                const hasOneChild = (currentNode) => currentNode.childNodes.length === 1;\n                const hasNoNonInheritableStyles = (currentNode) => !(hasNonInheritableStyles(dom, currentNode) || hasConditionalNonInheritableStyles(dom, currentNode));\n                if (hasNoNonInheritableStyles(node) && isInline(node) && hasOneChild(node)) {\n                    const styles = getStyleProps(dom, node);\n                    const isOverridden = (oldStyles, newStyles) => forall(oldStyles, (style) => contains$2(newStyles, style));\n                    const overriddenByAllChildren = (childNode) => hasOneChild(node) && dom.is(childNode, fragmentSelector) && isInline(childNode) &&\n                        (childNode.nodeName === node.nodeName && isOverridden(styles, getStyleProps(dom, childNode)) || overriddenByAllChildren(childNode.children[0]));\n                    const identicalToParent = (parentNode) => isNonNullable(parentNode) && parentNode !== root\n                        && (elementUtils.compare(node, parentNode) || identicalToParent(parentNode.parentElement));\n                    const conflictWithInsertedParent = (parentNode) => isNonNullable(parentNode) && parentNode !== root\n                        && dom.is(parentNode, fragmentSelector) && (hasStyleConflict(dom, node, parentNode) || conflictWithInsertedParent(parentNode.parentElement));\n                    if (overriddenByAllChildren(node.children[0]) || (identicalToParent(node.parentElement) && !conflictWithInsertedParent(node.parentElement))) {\n                        dom.remove(node, true);\n                    }\n                }\n            });\n            normalizeElements(editor, fromDom$1(fragments));\n        }\n    };\n    const markFragmentElements = (fragment) => {\n        let node = fragment;\n        while ((node = node.walk())) {\n            if (node.type === 1) {\n                node.attr('data-mce-fragment', '1');\n            }\n        }\n    };\n    const unmarkFragmentElements = (elm) => {\n        Tools.each(elm.getElementsByTagName('*'), (elm) => {\n            elm.removeAttribute('data-mce-fragment');\n        });\n    };\n    const isPartOfFragment = (node) => {\n        return !!node.getAttribute('data-mce-fragment');\n    };\n    const canHaveChildren = (editor, node) => {\n        return isNonNullable(node) && !editor.schema.getVoidElements()[node.nodeName];\n    };\n    const moveSelectionToMarker = (editor, marker) => {\n        let nextRng;\n        const dom = editor.dom;\n        const selection = editor.selection;\n        if (!marker) {\n            return;\n        }\n        selection.scrollIntoView(marker);\n        // If marker is in cE=false then move selection to that element instead\n        const parentEditableElm = getContentEditableRoot$1(editor.getBody(), marker);\n        if (parentEditableElm && dom.getContentEditable(parentEditableElm) === 'false') {\n            dom.remove(marker);\n            selection.select(parentEditableElm);\n            return;\n        }\n        // Move selection before marker and remove it\n        let rng = dom.createRng();\n        // If previous sibling is a text node set the selection to the end of that node\n        const node = marker.previousSibling;\n        if (isText$b(node)) {\n            rng.setStart(node, node.nodeValue?.length ?? 0);\n            const node2 = marker.nextSibling;\n            if (isText$b(node2)) {\n                node.appendData(node2.data);\n                node2.parentNode?.removeChild(node2);\n            }\n        }\n        else {\n            // If the previous sibling isn't a text node or doesn't exist set the selection before the marker node\n            rng.setStartBefore(marker);\n            rng.setEndBefore(marker);\n        }\n        const findNextCaretRng = (rng) => {\n            let caretPos = CaretPosition.fromRangeStart(rng);\n            const caretWalker = CaretWalker(editor.getBody());\n            caretPos = caretWalker.next(caretPos);\n            return caretPos?.toRange();\n        };\n        // Remove the marker node and set the new range\n        const parentBlock = dom.getParent(marker, dom.isBlock);\n        dom.remove(marker);\n        if (parentBlock && dom.isEmpty(parentBlock)) {\n            const isCell = isTableCell(parentBlock);\n            empty(SugarElement.fromDom(parentBlock));\n            rng.setStart(parentBlock, 0);\n            rng.setEnd(parentBlock, 0);\n            if (!isCell && !isPartOfFragment(parentBlock) && (nextRng = findNextCaretRng(rng))) {\n                rng = nextRng;\n                dom.remove(parentBlock);\n            }\n            else {\n                // TINY-9860: If parentBlock is a table cell, add a br without 'data-mce-bogus' attribute.\n                dom.add(parentBlock, dom.create('br', isCell ? {} : { 'data-mce-bogus': '1' }));\n            }\n        }\n        selection.setRng(rng);\n    };\n    const deleteSelectedContent = (editor) => {\n        const dom = editor.dom;\n        // Fix for #2595 seems that delete removes one extra character on\n        // WebKit for some odd reason if you double click select a word\n        const rng = normalize(editor.selection.getRng());\n        editor.selection.setRng(rng);\n        // TINY-1044: Selecting all content in a single table cell will cause the entire table to be deleted\n        // when using the native delete command. As such we need to manually delete the cell content instead\n        const startCell = dom.getParent(rng.startContainer, isTableCell);\n        if (isTableCellContentSelected(dom, rng, startCell)) {\n            deleteCellContents(editor, rng, SugarElement.fromDom(startCell));\n            // TINY-9193: If the selection is over the whole text node in an element then Firefox incorrectly moves the caret to the previous line\n            // TINY-11953: If the selection is over the whole anchor node, then Chrome incorrectly removes parent node alongside with it's child - anchor\n        }\n        else if (isSelectionOverWholeAnchor(rng) || isSelectionOverWholeTextNode(rng)) {\n            rng.deleteContents();\n        }\n        else {\n            editor.getDoc().execCommand('Delete', false);\n        }\n    };\n    const findMarkerNode = (scope) => {\n        for (let markerNode = scope; markerNode; markerNode = markerNode.walk()) {\n            if (markerNode.attr('id') === 'mce_marker') {\n                return Optional.some(markerNode);\n            }\n        }\n        return Optional.none();\n    };\n    const notHeadingsInSummary = (dom, node, fragment) => {\n        return exists(fragment.children(), isHeading) && dom.getParent(node, dom.isBlock)?.nodeName === 'SUMMARY';\n    };\n    const insertHtmlAtCaret = (editor, value, details) => {\n        const selection = editor.selection;\n        const dom = editor.dom;\n        // Setup parser and serializer\n        const parser = editor.parser;\n        const merge = details.merge;\n        const serializer = HtmlSerializer({\n            validate: true\n        }, editor.schema);\n        const bookmarkHtml = '<span id=\"mce_marker\" data-mce-type=\"bookmark\">&#xFEFF;</span>';\n        // TINY-10305: Remove all user-input zwsp to avoid impacting caret removal from content.\n        if (!details.preserve_zwsp) {\n            value = trim$2(value);\n        }\n        // Add caret at end of contents if it's missing\n        if (value.indexOf('{$caret}') === -1) {\n            value += '{$caret}';\n        }\n        // Replace the caret marker with a span bookmark element\n        value = value.replace(/\\{\\$caret\\}/, bookmarkHtml);\n        // If selection is at <body>|<p></p> then move it into <body><p>|</p>\n        let rng = selection.getRng();\n        const caretElement = rng.startContainer;\n        const body = editor.getBody();\n        if (caretElement === body && selection.isCollapsed()) {\n            if (dom.isBlock(body.firstChild) && canHaveChildren(editor, body.firstChild) && dom.isEmpty(body.firstChild)) {\n                rng = dom.createRng();\n                rng.setStart(body.firstChild, 0);\n                rng.setEnd(body.firstChild, 0);\n                selection.setRng(rng);\n            }\n        }\n        // Insert node maker where we will insert the new HTML and get it's parent\n        if (!selection.isCollapsed()) {\n            deleteSelectedContent(editor);\n        }\n        const parentNode = selection.getNode();\n        // Parse the fragment within the context of the parent node\n        const parserArgs = { context: parentNode.nodeName.toLowerCase(), data: details.data, insert: true };\n        const fragment = parser.parse(value, parserArgs);\n        // Custom handling of lists\n        if (details.paste === true && isListFragment(editor.schema, fragment) && isParentBlockLi(dom, parentNode)) {\n            rng = insertAtCaret$1(serializer, dom, selection.getRng(), fragment);\n            if (rng) {\n                selection.setRng(rng);\n            }\n            return value;\n        }\n        if (details.paste === true && shouldPasteContentOnly(dom, fragment, parentNode, editor.getBody())) {\n            fragment.firstChild?.unwrap();\n        }\n        markFragmentElements(fragment);\n        // Move the caret to a more suitable location\n        let node = fragment.lastChild;\n        if (node && node.attr('id') === 'mce_marker') {\n            const marker = node;\n            for (node = node.prev; node; node = node.walk(true)) {\n                if (node.name === 'table') {\n                    break;\n                }\n                if (node.type === 3 || !dom.isBlock(node.name)) {\n                    if (node.parent && editor.schema.isValidChild(node.parent.name, 'span')) {\n                        node.parent.insert(marker, node, node.name === 'br');\n                    }\n                    break;\n                }\n            }\n        }\n        editor._selectionOverrides.showBlockCaretContainer(parentNode);\n        // If parser says valid we can insert the contents into that parent\n        if (!parserArgs.invalid && !notHeadingsInSummary(dom, parentNode, fragment)) {\n            value = serializer.serialize(fragment);\n            validInsertion(editor, value, parentNode);\n        }\n        else {\n            // If the fragment was invalid within that context then we need\n            // to parse and process the parent it's inserted into\n            // Insert bookmark node and get the parent\n            setContentInternal$1(editor, bookmarkHtml);\n            let parentNode = selection.getNode();\n            let tempNode;\n            const rootNode = editor.getBody();\n            // Opera will return the document node when selection is in root\n            if (isDocument$1(parentNode)) {\n                parentNode = tempNode = rootNode;\n            }\n            else {\n                tempNode = parentNode;\n            }\n            // Find the ancestor just before the root element\n            while (tempNode && tempNode !== rootNode) {\n                parentNode = tempNode;\n                tempNode = tempNode.parentNode;\n            }\n            // Get the outer/inner HTML depending on if we are in the root and parser and serialize that\n            value = parentNode === rootNode ? rootNode.innerHTML : dom.getOuterHTML(parentNode);\n            const root = parser.parse(value);\n            const markerNode = findMarkerNode(root);\n            const editingHost = markerNode.bind(findClosestEditingHost).getOr(root);\n            markerNode.each((marker) => marker.replace(fragment));\n            const fragmentNodes = getAllDescendants(fragment);\n            fragment.unwrap();\n            const invalidChildren = filter$5(fragmentNodes, (node) => isInvalid(editor.schema, node));\n            cleanInvalidNodes(invalidChildren, editor.schema, editingHost);\n            filter$1(parser.getNodeFilters(), parser.getAttributeFilters(), root);\n            value = serializer.serialize(root);\n            // Set the inner/outer HTML depending on if we are in the root or not\n            if (parentNode === rootNode) {\n                dom.setHTML(rootNode, value);\n            }\n            else {\n                dom.setOuterHTML(parentNode, value);\n            }\n        }\n        reduceInlineTextElements(editor, merge);\n        moveSelectionToMarker(editor, dom.get('mce_marker'));\n        unmarkFragmentElements(editor.getBody());\n        trimBrsFromTableCell(dom, selection.getStart(), editor.schema);\n        updateCaret(editor.schema, editor.getBody(), selection.getStart());\n        return value;\n    };\n\n    const moveSelection = (editor) => {\n        if (hasFocus(editor)) {\n            firstPositionIn(editor.getBody()).each((pos) => {\n                const node = pos.getNode();\n                const caretPos = isTable$2(node) ? firstPositionIn(node).getOr(pos) : pos;\n                editor.selection.setRng(caretPos.toRange());\n            });\n        }\n    };\n    const setEditorHtml = (editor, html, noSelection) => {\n        editor.dom.setHTML(editor.getBody(), html);\n        if (noSelection !== true) {\n            moveSelection(editor);\n        }\n    };\n    const setContentString = (editor, body, content, args) => {\n        // TINY-10305: Remove all user-input zwsp to avoid impacting caret removal from content.\n        content = trim$2(content);\n        // Padd empty content in Gecko and Safari. Commands will otherwise fail on the content\n        // It will also be impossible to place the caret in the editor unless there is a BR element present\n        if (content.length === 0 || /^\\s+$/.test(content)) {\n            const padd = '<br data-mce-bogus=\"1\">';\n            // Todo: There is a lot more root elements that need special padding\n            // so separate this and add all of them at some point.\n            if (body.nodeName === 'TABLE') {\n                content = '<tr><td>' + padd + '</td></tr>';\n            }\n            else if (/^(UL|OL)$/.test(body.nodeName)) {\n                content = '<li>' + padd + '</li>';\n            }\n            const forcedRootBlockName = getForcedRootBlock(editor);\n            // Check if forcedRootBlock is a valid child of the body\n            if (editor.schema.isValidChild(body.nodeName.toLowerCase(), forcedRootBlockName.toLowerCase())) {\n                content = padd;\n                content = editor.dom.createHTML(forcedRootBlockName, getForcedRootBlockAttrs(editor), content);\n            }\n            else if (!content) {\n                content = padd;\n            }\n            setEditorHtml(editor, content, args.no_selection);\n            return { content, html: content };\n        }\n        else {\n            if (args.format !== 'raw') {\n                content = HtmlSerializer({ validate: false }, editor.schema).serialize(editor.parser.parse(content, { isRootContent: true, insert: true }));\n            }\n            const trimmedHtml = isWsPreserveElement(SugarElement.fromDom(body)) ? content : Tools.trim(content);\n            setEditorHtml(editor, trimmedHtml, args.no_selection);\n            return { content: trimmedHtml, html: trimmedHtml };\n        }\n    };\n    const setContentTree = (editor, body, content, args) => {\n        filter$1(editor.parser.getNodeFilters(), editor.parser.getAttributeFilters(), content);\n        const html = HtmlSerializer({ validate: false }, editor.schema).serialize(content);\n        // TINY-10305: Remove all user-input zwsp to avoid impacting caret removal from content.\n        const trimmedHtml = trim$2(isWsPreserveElement(SugarElement.fromDom(body)) ? html : Tools.trim(html));\n        setEditorHtml(editor, trimmedHtml, args.no_selection);\n        return { content, html: trimmedHtml };\n    };\n    const setContentInternal = (editor, content, args) => {\n        return Optional.from(editor.getBody()).map((body) => {\n            if (isTreeNode(content)) {\n                return setContentTree(editor, body, content, args);\n            }\n            else {\n                return setContentString(editor, body, content, args);\n            }\n        }).getOr({ content, html: isTreeNode(args.content) ? '' : args.content });\n    };\n\n    const postProcessHooks = {};\n    const isPre = matchNodeNames$1(['pre']);\n    const addPostProcessHook = (name, hook) => {\n        const hooks = postProcessHooks[name];\n        if (!hooks) {\n            postProcessHooks[name] = [];\n        }\n        postProcessHooks[name].push(hook);\n    };\n    const postProcess$1 = (name, editor) => {\n        if (has$2(postProcessHooks, name)) {\n            each$e(postProcessHooks[name], (hook) => {\n                hook(editor);\n            });\n        }\n    };\n    addPostProcessHook('pre', (editor) => {\n        const rng = editor.selection.getRng();\n        const hasPreSibling = (blocks) => (pre) => {\n            const prev = pre.previousSibling;\n            return isPre(prev) && contains$2(blocks, prev);\n        };\n        const joinPre = (pre1, pre2) => {\n            const sPre2 = SugarElement.fromDom(pre2);\n            const doc = documentOrOwner(sPre2).dom;\n            remove$8(sPre2);\n            append(SugarElement.fromDom(pre1), [\n                SugarElement.fromTag('br', doc),\n                SugarElement.fromTag('br', doc),\n                ...children$2(sPre2)\n            ]);\n        };\n        if (!rng.collapsed) {\n            const blocks = editor.selection.getSelectedBlocks();\n            const preBlocks = filter$5(filter$5(blocks, isPre), hasPreSibling(blocks));\n            each$e(preBlocks, (pre) => {\n                joinPre(pre.previousSibling, pre);\n            });\n        }\n    });\n\n    const each$5 = Tools.each;\n    const mergeTextDecorationsAndColor = (dom, format, vars, node) => {\n        const processTextDecorationsAndColor = (n) => {\n            if (isHTMLElement(n) && isElement$7(n.parentNode) && dom.isEditable(n)) {\n                const parentTextDecoration = getTextDecoration(dom, n.parentNode);\n                if (dom.getStyle(n, 'color') && parentTextDecoration) {\n                    dom.setStyle(n, 'text-decoration', parentTextDecoration);\n                }\n                else if (dom.getStyle(n, 'text-decoration') === parentTextDecoration) {\n                    dom.setStyle(n, 'text-decoration', null);\n                }\n            }\n        };\n        // Colored nodes should be underlined so that the color of the underline matches the text color.\n        if (format.styles && (format.styles.color || format.styles.textDecoration)) {\n            Tools.walk(node, processTextDecorationsAndColor, 'childNodes');\n            processTextDecorationsAndColor(node);\n        }\n    };\n    const mergeBackgroundColorAndFontSize = (dom, format, vars, node) => {\n        // nodes with font-size should have their own background color as well to fit the line-height (see TINY-882)\n        if (format.styles && format.styles.backgroundColor) {\n            const hasFontSize = hasStyle(dom, 'fontSize');\n            processChildElements(node, (elm) => hasFontSize(elm) && dom.isEditable(elm), applyStyle(dom, 'backgroundColor', replaceVars(format.styles.backgroundColor, vars)));\n        }\n    };\n    const mergeSubSup = (dom, format, vars, node) => {\n        // Remove font size on all descendants of a sub/sup and remove the inverse elements\n        if (isInlineFormat(format) && (format.inline === 'sub' || format.inline === 'sup')) {\n            const hasFontSize = hasStyle(dom, 'fontSize');\n            processChildElements(node, (elm) => hasFontSize(elm) && dom.isEditable(elm), applyStyle(dom, 'fontSize', ''));\n            const inverseTagDescendants = filter$5(dom.select(format.inline === 'sup' ? 'sub' : 'sup', node), dom.isEditable);\n            dom.remove(inverseTagDescendants, true);\n        }\n    };\n    const mergeWithChildren = (editor, formatList, vars, node) => {\n        // Remove/merge children\n        // Note: RemoveFormat.removeFormat will not remove formatting from noneditable nodes\n        each$5(formatList, (format) => {\n            // Merge all children of similar type will move styles from child to parent\n            // this: <span style=\"color:red\"><b><span style=\"color:red; font-size:10px\">text</span></b></span>\n            // will become: <span style=\"color:red\"><b><span style=\"font-size:10px\">text</span></b></span>\n            if (isInlineFormat(format)) {\n                each$5(editor.dom.select(format.inline, node), (child) => {\n                    if (isElementNode(child)) {\n                        removeNodeFormat(editor, format, vars, child, format.exact ? child : null);\n                    }\n                });\n            }\n            clearChildStyles(editor.dom, format, node);\n        });\n    };\n    const mergeWithParents = (editor, format, name, vars, node) => {\n        // Remove format if direct parent already has the same format\n        // Note: RemoveFormat.removeFormat will not remove formatting from noneditable nodes\n        const parentNode = node.parentNode;\n        if (matchNode$1(editor, parentNode, name, vars)) {\n            if (removeNodeFormat(editor, format, vars, node)) {\n                return;\n            }\n        }\n        // Remove format if any ancestor already has the same format\n        if (format.merge_with_parents && parentNode) {\n            editor.dom.getParent(parentNode, (parent) => {\n                if (matchNode$1(editor, parent, name, vars)) {\n                    removeNodeFormat(editor, format, vars, node);\n                    return true;\n                }\n                else {\n                    return false;\n                }\n            });\n        }\n    };\n\n    const each$4 = Tools.each;\n    const canFormatBR = (editor, format, node, parentName) => {\n        // TINY-6483: Can format 'br' if it is contained in a valid empty block and an inline format is being applied\n        if (canFormatEmptyLines(editor) && isInlineFormat(format) && node.parentNode) {\n            const validBRParentElements = getTextRootBlockElements(editor.schema);\n            // If a caret node is present, the format should apply to that, not the br (applicable to collapsed selections)\n            const hasCaretNodeSibling = sibling(SugarElement.fromDom(node), (sibling) => isCaretNode(sibling.dom));\n            return hasNonNullableKey(validBRParentElements, parentName) && isEmptyNode(editor.schema, node.parentNode, { skipBogus: false, includeZwsp: true }) && !hasCaretNodeSibling;\n        }\n        else {\n            return false;\n        }\n    };\n    const applyFormatAction = (ed, name, vars, node) => {\n        const formatList = ed.formatter.get(name);\n        const format = formatList[0];\n        const isCollapsed = !node && ed.selection.isCollapsed();\n        const dom = ed.dom;\n        const selection = ed.selection;\n        const applyNodeStyle = (formatList, node) => {\n            let found = false;\n            // Look for matching formats\n            each$4(formatList, (format) => {\n                if (!isSelectorFormat(format)) {\n                    return false;\n                }\n                // Check if the node is nonediatble and if the format can override noneditable node\n                if (dom.getContentEditable(node) === 'false' && !format.ceFalseOverride) {\n                    return true;\n                }\n                // Check collapsed state if it exists\n                if (isNonNullable(format.collapsed) && format.collapsed !== isCollapsed) {\n                    return true;\n                }\n                if (dom.is(node, format.selector) && !isCaretNode(node)) {\n                    setElementFormat(ed, node, format, vars, node);\n                    found = true;\n                    return false;\n                }\n                return true;\n            });\n            return found;\n        };\n        const createWrapElement = (wrapName) => {\n            if (isString(wrapName)) {\n                const wrapElm = dom.create(wrapName);\n                setElementFormat(ed, wrapElm, format, vars, node);\n                return wrapElm;\n            }\n            else {\n                return null;\n            }\n        };\n        const applyRngStyle = (dom, rng, nodeSpecific) => {\n            const newWrappers = [];\n            let contentEditable = true;\n            // Setup wrapper element\n            const wrapName = format.inline || format.block;\n            const wrapElm = createWrapElement(wrapName);\n            const isMatchingWrappingBlock = (node) => isWrappingBlockFormat(format) && matchNode$1(ed, node, name, vars);\n            const canRenameChildBlocks = (node) => forall(node.childNodes, (child) => !isTextBlock$2(ed.schema, child) || isValid(ed, wrapName, child.nodeName.toLowerCase()));\n            const canRenameBlock = (node, parentName, isEditableDescendant) => {\n                const isValidBlockFormatForNode = isNonWrappingBlockFormat(format) &&\n                    isTextBlock$2(ed.schema, node) &&\n                    isValid(ed, parentName, wrapName) &&\n                    canRenameChildBlocks(node);\n                return isEditableDescendant && isValidBlockFormatForNode;\n            };\n            const canWrapNode = (node, parentName, isEditableDescendant, isWrappableNoneditableElm) => {\n                const nodeName = node.nodeName.toLowerCase();\n                const isValidWrapNode = isValid(ed, wrapName, nodeName) &&\n                    isValid(ed, parentName, wrapName);\n                // If it is not node specific, it means that it was not passed into 'formatter.apply` and is within the editor selection\n                const isZwsp$1 = !nodeSpecific && isText$b(node) && isZwsp(node.data);\n                const isCaret = isCaretNode(node);\n                const isCorrectFormatForNode = !isInlineFormat(format) || !dom.isBlock(node);\n                return (isEditableDescendant || isWrappableNoneditableElm) && isValidWrapNode && !isZwsp$1 && !isCaret && isCorrectFormatForNode;\n            };\n            walk$3(dom, rng, (nodes) => {\n                let currentWrapElm;\n                /**\n                 * Process a list of nodes wrap them.\n                 */\n                const process = (node) => {\n                    let hasContentEditableState = false;\n                    let lastContentEditable = contentEditable;\n                    let isWrappableNoneditableElm = false;\n                    const parentNode = node.parentNode;\n                    const parentName = parentNode.nodeName.toLowerCase();\n                    // Node has a contentEditable value\n                    const contentEditableValue = dom.getContentEditable(node);\n                    if (isNonNullable(contentEditableValue)) {\n                        lastContentEditable = contentEditable;\n                        contentEditable = contentEditableValue === 'true';\n                        // Unless the noneditable element is wrappable, we don't want to wrap the container, only it's editable children\n                        hasContentEditableState = true;\n                        isWrappableNoneditableElm = isWrappableNoneditable(ed, node);\n                    }\n                    const isEditableDescendant = contentEditable && !hasContentEditableState;\n                    // Stop wrapping on br elements except when valid\n                    if (isBr$7(node) && !canFormatBR(ed, format, node, parentName)) {\n                        currentWrapElm = null;\n                        // Remove any br elements when we wrap things\n                        if (isBlockFormat(format)) {\n                            dom.remove(node);\n                        }\n                        return;\n                    }\n                    if (isMatchingWrappingBlock(node)) {\n                        currentWrapElm = null;\n                        return;\n                    }\n                    if (canRenameBlock(node, parentName, isEditableDescendant)) {\n                        const elm = dom.rename(node, wrapName);\n                        setElementFormat(ed, elm, format, vars, node);\n                        newWrappers.push(elm);\n                        currentWrapElm = null;\n                        return;\n                    }\n                    if (isSelectorFormat(format)) {\n                        let found = applyNodeStyle(formatList, node);\n                        // TINY-6567/TINY-7393: Include the parent if using an expanded selector format and no match was found for the current node\n                        if (!found && isNonNullable(parentNode) && shouldExpandToSelector(format)) {\n                            found = applyNodeStyle(formatList, parentNode);\n                        }\n                        // Continue processing if a selector match wasn't found and a inline element is defined\n                        if (!isInlineFormat(format) || found) {\n                            currentWrapElm = null;\n                            return;\n                        }\n                    }\n                    if (isNonNullable(wrapElm) && canWrapNode(node, parentName, isEditableDescendant, isWrappableNoneditableElm)) {\n                        // Start wrapping\n                        if (!currentWrapElm) {\n                            // Wrap the node\n                            currentWrapElm = dom.clone(wrapElm, false);\n                            parentNode.insertBefore(currentWrapElm, node);\n                            newWrappers.push(currentWrapElm);\n                        }\n                        // Wrappable noneditable element has been handled so go back to previous state\n                        if (isWrappableNoneditableElm && hasContentEditableState) {\n                            contentEditable = lastContentEditable;\n                        }\n                        currentWrapElm.appendChild(node);\n                    }\n                    else {\n                        // Start a new wrapper for possible children\n                        currentWrapElm = null;\n                        each$e(from(node.childNodes), process);\n                        if (hasContentEditableState) {\n                            contentEditable = lastContentEditable; // Restore last contentEditable state from stack\n                        }\n                        // End the last wrapper\n                        currentWrapElm = null;\n                    }\n                };\n                each$e(nodes, process);\n            });\n            // Apply formats to links as well to get the color of the underline to change as well\n            if (format.links === true) {\n                each$e(newWrappers, (wrapper) => {\n                    const process = (target) => {\n                        if (target.nodeName === 'A') {\n                            setElementFormat(ed, target, format, vars, node);\n                        }\n                        each$e(from(target.childNodes), process);\n                    };\n                    process(wrapper);\n                });\n            }\n            normalizeFontSizeElementsAfterApply(ed, name, fromDom$1(newWrappers));\n            // Cleanup\n            each$e(newWrappers, (node) => {\n                const getChildCount = (node) => {\n                    let count = 0;\n                    each$e(node.childNodes, (node) => {\n                        if (!isEmptyTextNode$1(node) && !isBookmarkNode$1(node)) {\n                            count++;\n                        }\n                    });\n                    return count;\n                };\n                const mergeStyles = (node) => {\n                    // Check if a child was found and of the same type as the current node\n                    const childElement = find$2(node.childNodes, isElementNode$1)\n                        .filter((child) => dom.getContentEditable(child) !== 'false' && matchName(dom, child, format));\n                    return childElement.map((child) => {\n                        const clone = dom.clone(child, false);\n                        setElementFormat(ed, clone, format, vars, node);\n                        dom.replace(clone, node, true);\n                        dom.remove(child, true);\n                        return clone;\n                    }).getOr(node);\n                };\n                const childCount = getChildCount(node);\n                // Remove empty nodes but only if there is multiple wrappers and they are not block\n                // elements so never remove single <h1></h1> since that would remove the\n                // current empty block element where the caret is at\n                if ((newWrappers.length > 1 || !dom.isBlock(node)) && childCount === 0) {\n                    dom.remove(node, true);\n                    return;\n                }\n                if (isInlineFormat(format) || isBlockFormat(format) && format.wrapper) {\n                    // Merges the current node with it's children of similar type to reduce the number of elements\n                    if (!format.exact && childCount === 1) {\n                        node = mergeStyles(node);\n                    }\n                    mergeWithChildren(ed, formatList, vars, node);\n                    mergeWithParents(ed, format, name, vars, node);\n                    mergeBackgroundColorAndFontSize(dom, format, vars, node);\n                    mergeTextDecorationsAndColor(dom, format, vars, node);\n                    mergeSubSup(dom, format, vars, node);\n                    mergeSiblings(ed, format, vars, node);\n                }\n            });\n        };\n        const targetNode = isNode(node) ? node : selection.getNode();\n        if (dom.getContentEditable(targetNode) === 'false' && !isWrappableNoneditable(ed, targetNode)) {\n            // node variable is used by other functions above in the same scope so need to set it here\n            node = targetNode;\n            applyNodeStyle(formatList, node);\n            if (hasEditableDescendants(dom, node)) {\n                each$e(getEditableDescendants(dom, node), (island) => {\n                    const rng = dom.createRng();\n                    rng.selectNodeContents(island);\n                    applyRngStyle(dom, rng, true);\n                });\n                return;\n            }\n            if (isBlockFormat(format) && !dom.isBlock(node)) {\n                const parentBlock = dom.getParent(node, dom.isBlock);\n                if (dom.isEditable(parentBlock)) {\n                    const wrapperElementName = format.block;\n                    if (parentBlock.nodeName.toLowerCase() === wrapperElementName.toLowerCase()) {\n                        setElementFormat(ed, parentBlock, format, vars, node);\n                    }\n                    else if (!isWrappingBlockFormat(format)) {\n                        const elm = dom.rename(parentBlock, wrapperElementName);\n                        setElementFormat(ed, elm, format, vars, node);\n                    }\n                }\n            }\n            else {\n                const selectorFormats = filter$5(formatList, isSelectorFormat);\n                Optional.from(dom.getParent(node, (candidate) => exists(selectorFormats, (fmt) => dom.is(candidate, fmt.selector))))\n                    .filter(dom.isEditable)\n                    .each((parent) => applyNodeStyle(formatList, parent));\n            }\n            fireFormatApply(ed, name, node, vars);\n            return;\n        }\n        if (format) {\n            if (node) {\n                if (isNode(node)) {\n                    if (!applyNodeStyle(formatList, node)) {\n                        const rng = dom.createRng();\n                        rng.setStartBefore(node);\n                        rng.setEndAfter(node);\n                        applyRngStyle(dom, expandRng(dom, rng, formatList), true);\n                    }\n                }\n                else {\n                    applyRngStyle(dom, node, true);\n                }\n            }\n            else {\n                if (!isCollapsed || !isInlineFormat(format) || getCellsFromEditor(ed).length) {\n                    // Apply formatting to selection\n                    selection.setRng(normalize(selection.getRng()));\n                    preserveSelection(ed, () => {\n                        runOnRanges(ed, (selectionRng, fake) => {\n                            const expandedRng = fake ? selectionRng : expandRng(dom, selectionRng, formatList);\n                            applyRngStyle(dom, expandedRng, false);\n                        });\n                    }, always);\n                    ed.nodeChanged();\n                }\n                else {\n                    applyCaretFormat(ed, name, vars);\n                }\n                getExpandedListItemFormat(ed.formatter, name).each((liFmt) => {\n                    const list = getFullySelectedListItems(ed);\n                    each$e(list, (li) => applyStyles(dom, li, liFmt, vars));\n                });\n            }\n            postProcess$1(name, ed);\n        }\n        fireFormatApply(ed, name, node, vars);\n    };\n    const applyFormat$1 = (editor, name, vars, node) => {\n        if (node || editor.selection.isEditable()) {\n            applyFormatAction(editor, name, vars, node);\n        }\n    };\n\n    const hasVars = (value) => has$2(value, 'vars');\n    const setup$A = (registeredFormatListeners, editor) => {\n        registeredFormatListeners.set({});\n        editor.on('NodeChange', (e) => {\n            updateAndFireChangeCallbacks(editor, e.element, registeredFormatListeners.get());\n        });\n        editor.on('FormatApply FormatRemove', (e) => {\n            const element = Optional.from(e.node)\n                .map((nodeOrRange) => isNode(nodeOrRange) ? nodeOrRange : nodeOrRange.startContainer)\n                .bind((node) => isElement$7(node) ? Optional.some(node) : Optional.from(node.parentElement))\n                .getOrThunk(() => fallbackElement(editor));\n            updateAndFireChangeCallbacks(editor, element, registeredFormatListeners.get());\n        });\n    };\n    const fallbackElement = (editor) => editor.selection.getStart();\n    const matchingNode = (editor, parents, format, similar, vars) => {\n        const isMatchingNode = (node) => {\n            const matchingFormat = editor.formatter.matchNode(node, format, vars ?? {}, similar);\n            return !isUndefined(matchingFormat);\n        };\n        const isUnableToMatch = (node) => {\n            if (matchesUnInheritedFormatSelector(editor, node, format)) {\n                return true;\n            }\n            else {\n                if (!similar) {\n                    // If we want to find an exact match, then finding a similar match halfway up the parents tree is bad\n                    return isNonNullable(editor.formatter.matchNode(node, format, vars, true));\n                }\n                else {\n                    return false;\n                }\n            }\n        };\n        return findUntil$1(parents, isMatchingNode, isUnableToMatch);\n    };\n    const getParents = (editor, elm) => {\n        const element = elm ?? fallbackElement(editor);\n        return filter$5(getParents$2(editor.dom, element), (node) => isElement$7(node) && !isBogus$1(node));\n    };\n    const updateAndFireChangeCallbacks = (editor, elm, registeredCallbacks) => {\n        // Ignore bogus nodes like the <a> tag created by moveStart()\n        const parents = getParents(editor, elm);\n        each$d(registeredCallbacks, (data, format) => {\n            const runIfChanged = (spec) => {\n                const match = matchingNode(editor, parents, format, spec.similar, hasVars(spec) ? spec.vars : undefined);\n                const isSet = match.isSome();\n                if (spec.state.get() !== isSet) {\n                    spec.state.set(isSet);\n                    const node = match.getOr(elm);\n                    if (hasVars(spec)) {\n                        spec.callback(isSet, { node, format, parents });\n                    }\n                    else {\n                        each$e(spec.callbacks, (callback) => callback(isSet, { node, format, parents }));\n                    }\n                }\n            };\n            each$e([data.withSimilar, data.withoutSimilar], runIfChanged);\n            each$e(data.withVars, runIfChanged);\n        });\n    };\n    const addListeners = (editor, registeredFormatListeners, formats, callback, similar, vars) => {\n        const formatChangeItems = registeredFormatListeners.get();\n        each$e(formats.split(','), (format) => {\n            const group = get$b(formatChangeItems, format).getOrThunk(() => {\n                const base = {\n                    withSimilar: {\n                        state: Cell(false),\n                        similar: true,\n                        callbacks: []\n                    },\n                    withoutSimilar: {\n                        state: Cell(false),\n                        similar: false,\n                        callbacks: []\n                    },\n                    withVars: []\n                };\n                formatChangeItems[format] = base;\n                return base;\n            });\n            const getCurrent = () => {\n                const parents = getParents(editor);\n                return matchingNode(editor, parents, format, similar, vars).isSome();\n            };\n            if (isUndefined(vars)) {\n                const toAppendTo = similar ? group.withSimilar : group.withoutSimilar;\n                toAppendTo.callbacks.push(callback);\n                if (toAppendTo.callbacks.length === 1) {\n                    toAppendTo.state.set(getCurrent());\n                }\n            }\n            else {\n                group.withVars.push({\n                    state: Cell(getCurrent()),\n                    similar,\n                    vars,\n                    callback\n                });\n            }\n        });\n        registeredFormatListeners.set(formatChangeItems);\n    };\n    const removeListeners = (registeredFormatListeners, formats, callback) => {\n        const formatChangeItems = registeredFormatListeners.get();\n        each$e(formats.split(','), (format) => get$b(formatChangeItems, format).each((group) => {\n            formatChangeItems[format] = {\n                withSimilar: {\n                    ...group.withSimilar,\n                    callbacks: filter$5(group.withSimilar.callbacks, (cb) => cb !== callback),\n                },\n                withoutSimilar: {\n                    ...group.withoutSimilar,\n                    callbacks: filter$5(group.withoutSimilar.callbacks, (cb) => cb !== callback),\n                },\n                withVars: filter$5(group.withVars, (item) => item.callback !== callback),\n            };\n        }));\n        registeredFormatListeners.set(formatChangeItems);\n    };\n    const formatChangedInternal = (editor, registeredFormatListeners, formats, callback, similar, vars) => {\n        addListeners(editor, registeredFormatListeners, formats, callback, similar, vars);\n        return {\n            unbind: () => removeListeners(registeredFormatListeners, formats, callback)\n        };\n    };\n\n    const toggle = (editor, name, vars, node) => {\n        const fmt = editor.formatter.get(name);\n        if (fmt) {\n            if (match$2(editor, name, vars, node) && (!('toggle' in fmt[0]) || fmt[0].toggle)) {\n                removeFormat$1(editor, name, vars, node);\n            }\n            else {\n                applyFormat$1(editor, name, vars, node);\n            }\n        }\n    };\n\n    const tableModel = (element, width, rows) => ({\n        element,\n        width,\n        rows\n    });\n    const tableRow = (element, cells) => ({\n        element,\n        cells\n    });\n    const cellPosition = (x, y) => ({\n        x,\n        y\n    });\n    const getSpan = (td, key) => {\n        return getOpt(td, key).bind(toInt).getOr(1);\n    };\n    const fillout = (table, x, y, tr, td) => {\n        const rowspan = getSpan(td, 'rowspan');\n        const colspan = getSpan(td, 'colspan');\n        const rows = table.rows;\n        for (let y2 = y; y2 < y + rowspan; y2++) {\n            if (!rows[y2]) {\n                rows[y2] = tableRow(deep(tr), []);\n            }\n            for (let x2 = x; x2 < x + colspan; x2++) {\n                const cells = rows[y2].cells;\n                // not filler td:s are purposely not cloned so that we can\n                // find cells in the model by element object references\n                cells[x2] = y2 === y && x2 === x ? td : shallow(td);\n            }\n        }\n    };\n    const cellExists = (table, x, y) => {\n        const rows = table.rows;\n        const cells = rows[y] ? rows[y].cells : [];\n        return !!cells[x];\n    };\n    const skipCellsX = (table, x, y) => {\n        while (cellExists(table, x, y)) {\n            x++;\n        }\n        return x;\n    };\n    const getWidth = (rows) => {\n        return foldl(rows, (acc, row) => {\n            return row.cells.length > acc ? row.cells.length : acc;\n        }, 0);\n    };\n    const findElementPos = (table, element) => {\n        const rows = table.rows;\n        for (let y = 0; y < rows.length; y++) {\n            const cells = rows[y].cells;\n            for (let x = 0; x < cells.length; x++) {\n                if (eq(cells[x], element)) {\n                    return Optional.some(cellPosition(x, y));\n                }\n            }\n        }\n        return Optional.none();\n    };\n    const extractRows = (table, sx, sy, ex, ey) => {\n        const newRows = [];\n        const rows = table.rows;\n        for (let y = sy; y <= ey; y++) {\n            const cells = rows[y].cells;\n            const slice = sx < ex ? cells.slice(sx, ex + 1) : cells.slice(ex, sx + 1);\n            newRows.push(tableRow(rows[y].element, slice));\n        }\n        return newRows;\n    };\n    const subTable = (table, startPos, endPos) => {\n        const sx = startPos.x, sy = startPos.y;\n        const ex = endPos.x, ey = endPos.y;\n        const newRows = sy < ey ? extractRows(table, sx, sy, ex, ey) : extractRows(table, sx, ey, ex, sy);\n        return tableModel(table.element, getWidth(newRows), newRows);\n    };\n    const createDomTable = (table, rows) => {\n        const tableElement = shallow(table.element);\n        const tableBody = SugarElement.fromTag('tbody');\n        append(tableBody, rows);\n        append$1(tableElement, tableBody);\n        return tableElement;\n    };\n    const modelRowsToDomRows = (table) => {\n        return map$3(table.rows, (row) => {\n            const cells = map$3(row.cells, (cell) => {\n                const td = deep(cell);\n                remove$9(td, 'colspan');\n                remove$9(td, 'rowspan');\n                return td;\n            });\n            const tr = shallow(row.element);\n            append(tr, cells);\n            return tr;\n        });\n    };\n    const fromDom = (tableElm) => {\n        const table = tableModel(shallow(tableElm), 0, []);\n        each$e(descendants(tableElm, 'tr'), (tr, y) => {\n            each$e(descendants(tr, 'td,th'), (td, x) => {\n                fillout(table, skipCellsX(table, x, y), y, tr, td);\n            });\n        });\n        return tableModel(table.element, getWidth(table.rows), table.rows);\n    };\n    const toDom = (table) => {\n        return createDomTable(table, modelRowsToDomRows(table));\n    };\n    const subsection = (table, startElement, endElement) => {\n        return findElementPos(table, startElement).bind((startPos) => {\n            return findElementPos(table, endElement).map((endPos) => {\n                return subTable(table, startPos, endPos);\n            });\n        });\n    };\n\n    const findParentListContainer = (parents) => find$2(parents, (elm) => name(elm) === 'ul' || name(elm) === 'ol');\n    const getFullySelectedListWrappers = (parents, rng) => find$2(parents, (elm) => name(elm) === 'li' && hasAllContentsSelected(elm, rng)).fold(constant([]), (_li) => findParentListContainer(parents).map((listCont) => {\n        const listElm = SugarElement.fromTag(name(listCont));\n        // Retain any list-style* styles when generating the new fragment\n        const listStyles = filter$4(getAllRaw(listCont), (_style, name) => startsWith(name, 'list-style'));\n        setAll(listElm, listStyles);\n        return [\n            SugarElement.fromTag('li'),\n            listElm\n        ];\n    }).getOr([]));\n    const wrap = (innerElm, elms) => {\n        const wrapped = foldl(elms, (acc, elm) => {\n            append$1(elm, acc);\n            return elm;\n        }, innerElm);\n        return elms.length > 0 ? fromElements([wrapped]) : wrapped;\n    };\n    const directListWrappers = (commonAnchorContainer) => {\n        if (isListItem$2(commonAnchorContainer)) {\n            return parent(commonAnchorContainer).filter(isList$1).fold(constant([]), (listElm) => [commonAnchorContainer, listElm]);\n        }\n        else {\n            return isList$1(commonAnchorContainer) ? [commonAnchorContainer] : [];\n        }\n    };\n    const getWrapElements = (rootNode, rng, schema) => {\n        const commonAnchorContainer = SugarElement.fromDom(rng.commonAncestorContainer);\n        const parents = parentsAndSelf(commonAnchorContainer, rootNode);\n        const wrapElements = filter$5(parents, (el) => schema.isWrapper(name(el)));\n        const listWrappers = getFullySelectedListWrappers(parents, rng);\n        const allWrappers = wrapElements.concat(listWrappers.length ? listWrappers : directListWrappers(commonAnchorContainer));\n        return map$3(allWrappers, shallow);\n    };\n    const emptyFragment = () => fromElements([]);\n    const getFragmentFromRange = (rootNode, rng, schema) => wrap(SugarElement.fromDom(rng.cloneContents()), getWrapElements(rootNode, rng, schema));\n    const getParentTable = (rootElm, cell) => ancestor$4(cell, 'table', curry(eq, rootElm));\n    const getTableFragment = (rootNode, selectedTableCells) => getParentTable(rootNode, selectedTableCells[0]).bind((tableElm) => {\n        const firstCell = selectedTableCells[0];\n        const lastCell = selectedTableCells[selectedTableCells.length - 1];\n        const fullTableModel = fromDom(tableElm);\n        return subsection(fullTableModel, firstCell, lastCell).map((sectionedTableModel) => fromElements([toDom(sectionedTableModel)]));\n    }).getOrThunk(emptyFragment);\n    const getSelectionFragment = (rootNode, ranges, schema) => ranges.length > 0 && ranges[0].collapsed ? emptyFragment() : getFragmentFromRange(rootNode, ranges[0], schema);\n    const read$3 = (rootNode, ranges, schema) => {\n        const selectedCells = getCellsFromElementOrRanges(ranges, rootNode);\n        return selectedCells.length > 0 ? getTableFragment(rootNode, selectedCells) : getSelectionFragment(rootNode, ranges, schema);\n    };\n\n    const isCollapsibleWhitespace = (text, index) => index >= 0 && index < text.length && isWhiteSpace(text.charAt(index));\n    const getInnerText = (bin) => {\n        return trim$2(bin.innerText);\n    };\n    const getContextNodeName = (parentBlockOpt) => parentBlockOpt.map((block) => block.nodeName).getOr('div').toLowerCase();\n    const getTextContent = (editor) => Optional.from(editor.selection.getRng()).map((rng) => {\n        const parentBlockOpt = Optional.from(editor.dom.getParent(rng.commonAncestorContainer, editor.dom.isBlock));\n        const body = editor.getBody();\n        const contextNodeName = getContextNodeName(parentBlockOpt);\n        const rangeContentClone = SugarElement.fromDom(rng.cloneContents());\n        cleanupBogusElements(rangeContentClone);\n        cleanupInputNames(rangeContentClone);\n        const bin = editor.dom.add(body, contextNodeName, {\n            'data-mce-bogus': 'all',\n            'style': 'overflow: hidden; opacity: 0;'\n        }, rangeContentClone.dom);\n        const text = getInnerText(bin);\n        // textContent will not strip leading/trailing spaces since it doesn't consider how it'll render\n        const nonRenderedText = trim$2(bin.textContent ?? '');\n        editor.dom.remove(bin);\n        if (isCollapsibleWhitespace(nonRenderedText, 0) || isCollapsibleWhitespace(nonRenderedText, nonRenderedText.length - 1)) {\n            // If the bin contains a trailing/leading space, then we need to inspect the parent block to see if we should include the spaces\n            const parentBlock = parentBlockOpt.getOr(body);\n            const parentBlockText = getInnerText(parentBlock);\n            const textIndex = parentBlockText.indexOf(text);\n            if (textIndex === -1) {\n                return text;\n            }\n            else {\n                const hasProceedingSpace = isCollapsibleWhitespace(parentBlockText, textIndex - 1);\n                const hasTrailingSpace = isCollapsibleWhitespace(parentBlockText, textIndex + text.length);\n                return (hasProceedingSpace ? ' ' : '') + text + (hasTrailingSpace ? ' ' : '');\n            }\n        }\n        else {\n            return text;\n        }\n    }).getOr('');\n    const getSerializedContent = (editor, args) => {\n        const rng = editor.selection.getRng(), tmpElm = editor.dom.create('body');\n        const sel = editor.selection.getSel();\n        const ranges = processRanges(editor, getRanges(sel));\n        const fragment = args.contextual ? read$3(SugarElement.fromDom(editor.getBody()), ranges, editor.schema).dom : rng.cloneContents();\n        if (fragment) {\n            tmpElm.appendChild(fragment);\n        }\n        return editor.selection.serializer.serialize(tmpElm, args);\n    };\n    const extractSelectedContent = (editor, args) => {\n        if (args.format === 'text') {\n            return getTextContent(editor);\n        }\n        else {\n            const content = getSerializedContent(editor, args);\n            if (args.format === 'tree') {\n                return content;\n            }\n            else {\n                return editor.selection.isCollapsed() ? '' : content;\n            }\n        }\n    };\n    const setupArgs$2 = (args, format) => ({\n        ...args,\n        format,\n        get: true,\n        selection: true,\n        getInner: true\n    });\n    const getSelectedContentInternal = (editor, format, args = {}) => {\n        const defaultedArgs = setupArgs$2(args, format);\n        return preProcessGetContent(editor, defaultedArgs).fold(identity, (updatedArgs) => {\n            const content = extractSelectedContent(editor, updatedArgs);\n            return postProcessGetContent(editor, content, updatedArgs);\n        });\n    };\n\n    /**\n     * JS Implementation of the O(ND) Difference Algorithm by Eugene W. Myers.\n     *\n     * @class tinymce.undo.Diff\n     * @private\n     */\n    const KEEP = 0, INSERT = 1, DELETE = 2;\n    const diff = (left, right) => {\n        const size = left.length + right.length + 2;\n        const vDown = new Array(size);\n        const vUp = new Array(size);\n        const snake = (start, end, diag) => {\n            return {\n                start,\n                end,\n                diag\n            };\n        };\n        const buildScript = (start1, end1, start2, end2, script) => {\n            const middle = getMiddleSnake(start1, end1, start2, end2);\n            if (middle === null || middle.start === end1 && middle.diag === end1 - end2 ||\n                middle.end === start1 && middle.diag === start1 - start2) {\n                let i = start1;\n                let j = start2;\n                while (i < end1 || j < end2) {\n                    if (i < end1 && j < end2 && left[i] === right[j]) {\n                        script.push([KEEP, left[i]]);\n                        ++i;\n                        ++j;\n                    }\n                    else {\n                        if (end1 - start1 > end2 - start2) {\n                            script.push([DELETE, left[i]]);\n                            ++i;\n                        }\n                        else {\n                            script.push([INSERT, right[j]]);\n                            ++j;\n                        }\n                    }\n                }\n            }\n            else {\n                buildScript(start1, middle.start, start2, middle.start - middle.diag, script);\n                for (let i2 = middle.start; i2 < middle.end; ++i2) {\n                    script.push([KEEP, left[i2]]);\n                }\n                buildScript(middle.end, end1, middle.end - middle.diag, end2, script);\n            }\n        };\n        const buildSnake = (start, diag, end1, end2) => {\n            let end = start;\n            while (end - diag < end2 && end < end1 && left[end] === right[end - diag]) {\n                ++end;\n            }\n            return snake(start, end, diag);\n        };\n        const getMiddleSnake = (start1, end1, start2, end2) => {\n            // Myers Algorithm\n            // Initialisations\n            const m = end1 - start1;\n            const n = end2 - start2;\n            if (m === 0 || n === 0) {\n                return null;\n            }\n            const delta = m - n;\n            const sum = n + m;\n            const offset = (sum % 2 === 0 ? sum : sum + 1) / 2;\n            vDown[1 + offset] = start1;\n            vUp[1 + offset] = end1 + 1;\n            let d, k, i, x, y;\n            for (d = 0; d <= offset; ++d) {\n                // Down\n                for (k = -d; k <= d; k += 2) {\n                    // First step\n                    i = k + offset;\n                    if (k === -d || k !== d && vDown[i - 1] < vDown[i + 1]) {\n                        vDown[i] = vDown[i + 1];\n                    }\n                    else {\n                        vDown[i] = vDown[i - 1] + 1;\n                    }\n                    x = vDown[i];\n                    y = x - start1 + start2 - k;\n                    while (x < end1 && y < end2 && left[x] === right[y]) {\n                        vDown[i] = ++x;\n                        ++y;\n                    }\n                    // Second step\n                    if (delta % 2 !== 0 && delta - d <= k && k <= delta + d) {\n                        if (vUp[i - delta] <= vDown[i]) {\n                            return buildSnake(vUp[i - delta], k + start1 - start2, end1, end2);\n                        }\n                    }\n                }\n                // Up\n                for (k = delta - d; k <= delta + d; k += 2) {\n                    // First step\n                    i = k + offset - delta;\n                    if (k === delta - d || k !== delta + d && vUp[i + 1] <= vUp[i - 1]) {\n                        vUp[i] = vUp[i + 1] - 1;\n                    }\n                    else {\n                        vUp[i] = vUp[i - 1];\n                    }\n                    x = vUp[i] - 1;\n                    y = x - start1 + start2 - k;\n                    while (x >= start1 && y >= start2 && left[x] === right[y]) {\n                        vUp[i] = x--;\n                        y--;\n                    }\n                    // Second step\n                    if (delta % 2 === 0 && -d <= k && k <= d) {\n                        if (vUp[i] <= vDown[i + delta]) {\n                            return buildSnake(vUp[i], k + start1 - start2, end1, end2);\n                        }\n                    }\n                }\n            }\n            return null;\n        };\n        const script = [];\n        buildScript(0, left.length, 0, right.length, script);\n        return script;\n    };\n\n    /**\n     * This module reads and applies html fragments from/to dom nodes.\n     *\n     * @class tinymce.undo.Fragments\n     * @private\n     */\n    const getOuterHtml = (elm) => {\n        if (isElement$7(elm)) {\n            return elm.outerHTML;\n        }\n        else if (isText$b(elm)) {\n            return Entities.encodeRaw(elm.data, false);\n        }\n        else if (isComment(elm)) {\n            return '<!--' + elm.data + '-->';\n        }\n        return '';\n    };\n    const createFragment = (html) => {\n        let node;\n        const container = document.createElement('div');\n        const frag = document.createDocumentFragment();\n        if (html) {\n            container.innerHTML = html;\n        }\n        while ((node = container.firstChild)) {\n            frag.appendChild(node);\n        }\n        return frag;\n    };\n    const insertAt = (elm, html, index) => {\n        const fragment = createFragment(html);\n        if (elm.hasChildNodes() && index < elm.childNodes.length) {\n            const target = elm.childNodes[index];\n            elm.insertBefore(fragment, target);\n        }\n        else {\n            elm.appendChild(fragment);\n        }\n    };\n    const removeAt = (elm, index) => {\n        if (elm.hasChildNodes() && index < elm.childNodes.length) {\n            const target = elm.childNodes[index];\n            elm.removeChild(target);\n        }\n    };\n    const applyDiff = (diff, elm) => {\n        let index = 0;\n        each$e(diff, (action) => {\n            if (action[0] === KEEP) {\n                index++;\n            }\n            else if (action[0] === INSERT) {\n                insertAt(elm, action[1], index);\n                index++;\n            }\n            else if (action[0] === DELETE) {\n                removeAt(elm, index);\n            }\n        });\n    };\n    const read$2 = (elm, trimZwsp) => filter$5(map$3(from(elm.childNodes), trimZwsp ? compose(trim$2, getOuterHtml) : getOuterHtml), (item) => {\n        return item.length > 0;\n    });\n    const write = (fragments, elm) => {\n        const currentFragments = map$3(from(elm.childNodes), getOuterHtml);\n        applyDiff(diff(currentFragments, fragments), elm);\n        return elm;\n    };\n\n    // We need to create a temporary document instead of using the global document since\n    // innerHTML on a detached element will still make http requests to the images\n    const lazyTempDocument = cached(() => document.implementation.createHTMLDocument('undo'));\n    const shouldBeFragmented = (body) => body.querySelector(`iframe, ${ucVideoNodeName}`) !== null;\n    const createFragmentedLevel = (fragments) => {\n        return {\n            type: 'fragmented',\n            fragments,\n            content: '',\n            bookmark: null,\n            beforeBookmark: null\n        };\n    };\n    const createCompleteLevel = (content) => {\n        return {\n            type: 'complete',\n            fragments: null,\n            content,\n            bookmark: null,\n            beforeBookmark: null\n        };\n    };\n    const createFromEditor = (editor) => {\n        const tempAttrs = editor.serializer.getTempAttrs();\n        const body = trim$1(editor.getBody(), tempAttrs);\n        return shouldBeFragmented(body) ? createFragmentedLevel(read$2(body, true)) : createCompleteLevel(trim$2(body.innerHTML));\n    };\n    const applyToEditor = (editor, level, before) => {\n        const bookmark = before ? level.beforeBookmark : level.bookmark;\n        if (level.type === 'fragmented') {\n            write(level.fragments, editor.getBody());\n        }\n        else {\n            editor.setContent(level.content, {\n                format: 'raw',\n                // If we have a path bookmark, we need to check if the bookmark location was a fake caret.\n                // If the bookmark was not a fake caret, then we need to ensure that setContent does not move the selection\n                // as this can create a new fake caret - particularly if the first element in the body is contenteditable=false.\n                // The creation of this new fake caret will cause our path offset to be off by one when restoring the original selection.\n                no_selection: isNonNullable(bookmark) && isPathBookmark(bookmark) ? !bookmark.isFakeCaret : true\n            });\n        }\n        if (bookmark) {\n            editor.selection.moveToBookmark(bookmark);\n            editor.selection.scrollIntoView();\n        }\n    };\n    const getLevelContent = (level) => {\n        return level.type === 'fragmented' ? level.fragments.join('') : level.content;\n    };\n    const getCleanLevelContent = (isReadonly, level) => {\n        const elm = SugarElement.fromTag('body', lazyTempDocument());\n        set$4(elm, getLevelContent(level));\n        each$e(descendants(elm, '*[data-mce-bogus]'), unwrap);\n        if (isReadonly) {\n            each$e(descendants(elm, 'details[open]'), (element) => remove$9(element, 'open'));\n        }\n        return get$9(elm);\n    };\n    const hasEqualContent = (level1, level2) => getLevelContent(level1) === getLevelContent(level2);\n    const hasEqualCleanedContent = (isReadonly, level1, level2) => getCleanLevelContent(isReadonly, level1) === getCleanLevelContent(isReadonly, level2);\n    // Most of the time the contents is equal so it's faster to first check that using strings then fallback to a cleaned dom comparison\n    const isEq$1 = (isReadonly, level1, level2) => {\n        if (!level1 || !level2) {\n            return false;\n        }\n        else if (hasEqualContent(level1, level2)) {\n            return true;\n        }\n        else {\n            return hasEqualCleanedContent(isReadonly, level1, level2);\n        }\n    };\n\n    const isUnlocked = (locks) => locks.get() === 0;\n\n    const setTyping = (undoManager, typing, locks) => {\n        if (isUnlocked(locks)) {\n            undoManager.typing = typing;\n        }\n    };\n    const endTyping = (undoManager, locks) => {\n        if (undoManager.typing) {\n            setTyping(undoManager, false, locks);\n            undoManager.add();\n        }\n    };\n    const endTypingLevelIgnoreLocks = (undoManager) => {\n        if (undoManager.typing) {\n            undoManager.typing = false;\n            undoManager.add();\n        }\n    };\n\n    const beforeChange$1 = (editor, locks, beforeBookmark) => {\n        if (isUnlocked(locks)) {\n            beforeBookmark.set(getUndoBookmark(editor.selection));\n        }\n    };\n    const addUndoLevel$1 = (editor, undoManager, index, locks, beforeBookmark, level, event) => {\n        const currentLevel = createFromEditor(editor);\n        const newLevel = Tools.extend(level || {}, currentLevel);\n        if (!isUnlocked(locks) || editor.removed) {\n            return null;\n        }\n        const lastLevel = undoManager.data[index.get()];\n        if (editor.dispatch('BeforeAddUndo', { level: newLevel, lastLevel, originalEvent: event }).isDefaultPrevented()) {\n            return null;\n        }\n        // Add undo level if needed\n        if (lastLevel && isEq$1(editor.readonly, lastLevel, newLevel)) {\n            return null;\n        }\n        // Set before bookmark on previous level\n        if (undoManager.data[index.get()]) {\n            beforeBookmark.get().each((bm) => {\n                undoManager.data[index.get()].beforeBookmark = bm;\n            });\n        }\n        // Time to compress\n        const customUndoRedoLevels = getCustomUndoRedoLevels(editor);\n        if (customUndoRedoLevels) {\n            if (undoManager.data.length > customUndoRedoLevels) {\n                for (let i = 0; i < undoManager.data.length - 1; i++) {\n                    undoManager.data[i] = undoManager.data[i + 1];\n                }\n                undoManager.data.length--;\n                index.set(undoManager.data.length);\n            }\n        }\n        // Get a non intrusive normalized bookmark\n        newLevel.bookmark = getUndoBookmark(editor.selection);\n        // Crop array if needed\n        if (index.get() < undoManager.data.length - 1) {\n            undoManager.data.length = index.get() + 1;\n        }\n        undoManager.data.push(newLevel);\n        index.set(undoManager.data.length - 1);\n        const args = { level: newLevel, lastLevel, originalEvent: event };\n        if (index.get() > 0) {\n            editor.setDirty(true);\n            editor.dispatch('AddUndo', args);\n            editor.dispatch('change', args);\n        }\n        else {\n            editor.dispatch('AddUndo', args);\n        }\n        return newLevel;\n    };\n    const clear$1 = (editor, undoManager, index) => {\n        undoManager.data = [];\n        index.set(0);\n        undoManager.typing = false;\n        editor.dispatch('ClearUndos');\n    };\n    const extra$1 = (editor, undoManager, index, callback1, callback2) => {\n        if (undoManager.transact(callback1)) {\n            const bookmark = undoManager.data[index.get()].bookmark;\n            const lastLevel = undoManager.data[index.get() - 1];\n            applyToEditor(editor, lastLevel, true);\n            if (undoManager.transact(callback2)) {\n                undoManager.data[index.get() - 1].beforeBookmark = bookmark;\n            }\n        }\n    };\n    const redo$1 = (editor, index, data) => {\n        let level;\n        if (index.get() < data.length - 1) {\n            index.set(index.get() + 1);\n            level = data[index.get()];\n            applyToEditor(editor, level, false);\n            editor.setDirty(true);\n            editor.dispatch('Redo', { level });\n        }\n        return level;\n    };\n    const undo$1 = (editor, undoManager, locks, index) => {\n        let level;\n        if (undoManager.typing) {\n            undoManager.add();\n            undoManager.typing = false;\n            setTyping(undoManager, false, locks);\n        }\n        if (index.get() > 0) {\n            index.set(index.get() - 1);\n            level = undoManager.data[index.get()];\n            applyToEditor(editor, level, true);\n            editor.setDirty(true);\n            editor.dispatch('Undo', { level });\n        }\n        return level;\n    };\n    const reset$1 = (undoManager) => {\n        undoManager.clear();\n        undoManager.add();\n    };\n    const hasUndo$1 = (editor, undoManager, index) => \n    // Has undo levels or typing and content isn't the same as the initial level\n    index.get() > 0 || (undoManager.typing && undoManager.data[0] && !isEq$1(editor.readonly, createFromEditor(editor), undoManager.data[0]));\n    const hasRedo$1 = (undoManager, index) => index.get() < undoManager.data.length - 1 && !undoManager.typing;\n    const transact$1 = (undoManager, locks, callback) => {\n        endTyping(undoManager, locks);\n        undoManager.beforeChange();\n        undoManager.ignore(callback);\n        return undoManager.add();\n    };\n    const ignore$1 = (locks, callback) => {\n        try {\n            locks.set(locks.get() + 1);\n            callback();\n        }\n        finally {\n            locks.set(locks.get() - 1);\n        }\n    };\n\n    const addVisualInternal = (editor, elm) => {\n        const dom = editor.dom;\n        const scope = isNonNullable(elm) ? elm : editor.getBody();\n        each$e(dom.select('table,a', scope), (matchedElm) => {\n            switch (matchedElm.nodeName) {\n                case 'TABLE':\n                    const cls = getVisualAidsTableClass(editor);\n                    const value = dom.getAttrib(matchedElm, 'border');\n                    if ((!value || value === '0') && editor.hasVisual) {\n                        dom.addClass(matchedElm, cls);\n                    }\n                    else {\n                        dom.removeClass(matchedElm, cls);\n                    }\n                    break;\n                case 'A':\n                    if (!dom.getAttrib(matchedElm, 'href')) {\n                        const value = dom.getAttrib(matchedElm, 'name') || matchedElm.id;\n                        const cls = getVisualAidsAnchorClass(editor);\n                        if (value && editor.hasVisual) {\n                            dom.addClass(matchedElm, cls);\n                        }\n                        else {\n                            dom.removeClass(matchedElm, cls);\n                        }\n                    }\n                    break;\n            }\n        });\n        editor.dispatch('VisualAid', { element: elm, hasVisual: editor.hasVisual });\n    };\n\n    const makePlainAdaptor = (editor) => ({\n        init: {\n            bindEvents: noop\n        },\n        undoManager: {\n            beforeChange: (locks, beforeBookmark) => beforeChange$1(editor, locks, beforeBookmark),\n            add: (undoManager, index, locks, beforeBookmark, level, event) => addUndoLevel$1(editor, undoManager, index, locks, beforeBookmark, level, event),\n            undo: (undoManager, locks, index) => undo$1(editor, undoManager, locks, index),\n            redo: (index, data) => redo$1(editor, index, data),\n            clear: (undoManager, index) => clear$1(editor, undoManager, index),\n            reset: (undoManager) => reset$1(undoManager),\n            hasUndo: (undoManager, index) => hasUndo$1(editor, undoManager, index),\n            hasRedo: (undoManager, index) => hasRedo$1(undoManager, index),\n            transact: (undoManager, locks, callback) => transact$1(undoManager, locks, callback),\n            ignore: (locks, callback) => ignore$1(locks, callback),\n            extra: (undoManager, index, callback1, callback2) => extra$1(editor, undoManager, index, callback1, callback2)\n        },\n        formatter: {\n            match: (name, vars, node, similar) => match$2(editor, name, vars, node, similar),\n            matchAll: (names, vars) => matchAll(editor, names, vars),\n            matchNode: (node, name, vars, similar) => matchNode$1(editor, node, name, vars, similar),\n            canApply: (name) => canApply(editor, name),\n            closest: (names) => closest(editor, names),\n            apply: (name, vars, node) => applyFormat$1(editor, name, vars, node),\n            remove: (name, vars, node, similar) => removeFormat$1(editor, name, vars, node, similar),\n            toggle: (name, vars, node) => toggle(editor, name, vars, node),\n            formatChanged: (registeredFormatListeners, formats, callback, similar, vars) => formatChangedInternal(editor, registeredFormatListeners, formats, callback, similar, vars)\n        },\n        editor: {\n            getContent: (args) => getContentInternal(editor, args),\n            setContent: (content, args) => setContentInternal(editor, content, args),\n            insertContent: (value, details) => insertHtmlAtCaret(editor, value, details),\n            addVisual: (elm) => addVisualInternal(editor, elm)\n        },\n        selection: {\n            getContent: (format, args) => getSelectedContentInternal(editor, format, args)\n        },\n        autocompleter: {\n            addDecoration: noop, // This was never fully implemented in RTC\n            removeDecoration: noop, // This was never fully implemented in RTC\n        },\n        raw: {\n            getModel: () => Optional.none()\n        }\n    });\n    const makeRtcAdaptor = (rtcEditor) => {\n        const defaultVars = (vars) => isObject(vars) ? vars : {};\n        const { init, undoManager, formatter, editor, selection, autocompleter, raw } = rtcEditor;\n        return {\n            init: {\n                bindEvents: init.bindEvents\n            },\n            undoManager: {\n                beforeChange: undoManager.beforeChange,\n                add: undoManager.add,\n                undo: undoManager.undo,\n                redo: undoManager.redo,\n                clear: undoManager.clear,\n                reset: undoManager.reset,\n                hasUndo: undoManager.hasUndo,\n                hasRedo: undoManager.hasRedo,\n                transact: (_undoManager, _locks, fn) => undoManager.transact(fn),\n                ignore: (_locks, callback) => undoManager.ignore(callback),\n                extra: (_undoManager, _index, callback1, callback2) => undoManager.extra(callback1, callback2)\n            },\n            formatter: {\n                match: (name, vars, _node, similar) => formatter.match(name, defaultVars(vars), similar),\n                matchAll: formatter.matchAll,\n                matchNode: formatter.matchNode,\n                canApply: (name) => formatter.canApply(name),\n                closest: (names) => formatter.closest(names),\n                apply: (name, vars, _node) => formatter.apply(name, defaultVars(vars)),\n                remove: (name, vars, _node, _similar) => formatter.remove(name, defaultVars(vars)),\n                toggle: (name, vars, _node) => formatter.toggle(name, defaultVars(vars)),\n                formatChanged: (_rfl, formats, callback, similar, vars) => formatter.formatChanged(formats, callback, similar, vars)\n            },\n            editor: {\n                getContent: (args) => editor.getContent(args),\n                setContent: (content, args) => {\n                    return { content: editor.setContent(content, args), html: '' };\n                },\n                insertContent: (content, _details) => {\n                    editor.insertContent(content);\n                    return '';\n                },\n                addVisual: editor.addVisual\n            },\n            selection: {\n                getContent: (_format, args) => selection.getContent(args)\n            },\n            autocompleter: {\n                addDecoration: autocompleter.addDecoration,\n                removeDecoration: autocompleter.removeDecoration\n            },\n            raw: {\n                getModel: () => Optional.some(raw.getRawModel())\n            }\n        };\n    };\n    const makeNoopAdaptor = () => {\n        // Cast as any since this will never match the implementations\n        const nul = constant(null);\n        const empty = constant('');\n        return {\n            init: {\n                bindEvents: noop\n            },\n            undoManager: {\n                beforeChange: noop,\n                add: nul,\n                undo: nul,\n                redo: nul,\n                clear: noop,\n                reset: noop,\n                hasUndo: never,\n                hasRedo: never,\n                transact: nul,\n                ignore: noop,\n                extra: noop\n            },\n            formatter: {\n                match: never,\n                matchAll: constant([]),\n                matchNode: constant(undefined),\n                canApply: never,\n                closest: empty,\n                apply: noop,\n                remove: noop,\n                toggle: noop,\n                formatChanged: constant({ unbind: noop })\n            },\n            editor: {\n                getContent: empty,\n                setContent: constant({ content: '', html: '' }),\n                insertContent: constant(''),\n                addVisual: noop\n            },\n            selection: {\n                getContent: empty\n            },\n            autocompleter: {\n                addDecoration: noop,\n                removeDecoration: noop\n            },\n            raw: {\n                getModel: constant(Optional.none())\n            }\n        };\n    };\n    const isRtc = (editor) => has$2(editor.plugins, 'rtc');\n    const getRtcSetup = (editor) => get$b(editor.plugins, 'rtc').bind((rtcPlugin) => \n    // This might not exist if the stub plugin is loaded on cloud\n    Optional.from(rtcPlugin.setup));\n    const setup$z = (editor) => {\n        const editorCast = editor;\n        return getRtcSetup(editor).fold(() => {\n            editorCast.rtcInstance = makePlainAdaptor(editor);\n            return Optional.none();\n        }, (setup) => {\n            // We need to provide a noop adaptor while initializing since any call by the theme or plugins to say undoManager.hasUndo would throw errors\n            editorCast.rtcInstance = makeNoopAdaptor();\n            return Optional.some(() => setup().then((rtcEditor) => {\n                editorCast.rtcInstance = makeRtcAdaptor(rtcEditor);\n                return rtcEditor.rtc.isRemote;\n            }));\n        });\n    };\n    const getRtcInstanceWithFallback = (editor) => \n    // Calls to editor.getContent/editor.setContent should still work even if the rtcInstance is not yet available\n    editor.rtcInstance ? editor.rtcInstance : makePlainAdaptor(editor);\n    const getRtcInstanceWithError = (editor) => {\n        const rtcInstance = editor.rtcInstance;\n        if (!rtcInstance) {\n            throw new Error('Failed to get RTC instance not yet initialized.');\n        }\n        else {\n            return rtcInstance;\n        }\n    };\n    /** In theory these could all be inlined but having them here makes it clear what is overridden */\n    const beforeChange = (editor, locks, beforeBookmark) => {\n        getRtcInstanceWithError(editor).undoManager.beforeChange(locks, beforeBookmark);\n    };\n    const addUndoLevel = (editor, undoManager, index, locks, beforeBookmark, level, event) => getRtcInstanceWithError(editor).undoManager.add(undoManager, index, locks, beforeBookmark, level, event);\n    const undo = (editor, undoManager, locks, index) => getRtcInstanceWithError(editor).undoManager.undo(undoManager, locks, index);\n    const redo = (editor, index, data) => getRtcInstanceWithError(editor).undoManager.redo(index, data);\n    const clear = (editor, undoManager, index) => {\n        getRtcInstanceWithError(editor).undoManager.clear(undoManager, index);\n    };\n    const reset = (editor, undoManager) => {\n        getRtcInstanceWithError(editor).undoManager.reset(undoManager);\n    };\n    const hasUndo = (editor, undoManager, index) => getRtcInstanceWithError(editor).undoManager.hasUndo(undoManager, index);\n    const hasRedo = (editor, undoManager, index) => getRtcInstanceWithError(editor).undoManager.hasRedo(undoManager, index);\n    const transact = (editor, undoManager, locks, callback) => getRtcInstanceWithError(editor).undoManager.transact(undoManager, locks, callback);\n    const ignore = (editor, locks, callback) => {\n        getRtcInstanceWithError(editor).undoManager.ignore(locks, callback);\n    };\n    const extra = (editor, undoManager, index, callback1, callback2) => {\n        getRtcInstanceWithError(editor).undoManager.extra(undoManager, index, callback1, callback2);\n    };\n    const matchFormat = (editor, name, vars, node, similar) => getRtcInstanceWithError(editor).formatter.match(name, vars, node, similar);\n    const matchAllFormats = (editor, names, vars) => getRtcInstanceWithError(editor).formatter.matchAll(names, vars);\n    const matchNodeFormat = (editor, node, name, vars, similar) => getRtcInstanceWithError(editor).formatter.matchNode(node, name, vars, similar);\n    const canApplyFormat = (editor, name) => getRtcInstanceWithError(editor).formatter.canApply(name);\n    const closestFormat = (editor, names) => getRtcInstanceWithError(editor).formatter.closest(names);\n    const applyFormat = (editor, name, vars, node) => {\n        getRtcInstanceWithError(editor).formatter.apply(name, vars, node);\n    };\n    const removeFormat = (editor, name, vars, node, similar) => {\n        getRtcInstanceWithError(editor).formatter.remove(name, vars, node, similar);\n    };\n    const toggleFormat = (editor, name, vars, node) => {\n        getRtcInstanceWithError(editor).formatter.toggle(name, vars, node);\n    };\n    const formatChanged = (editor, registeredFormatListeners, formats, callback, similar, vars) => getRtcInstanceWithError(editor).formatter.formatChanged(registeredFormatListeners, formats, callback, similar, vars);\n    const getContent$2 = (editor, args) => getRtcInstanceWithFallback(editor).editor.getContent(args);\n    const setContent$1 = (editor, content, args) => getRtcInstanceWithFallback(editor).editor.setContent(content, args);\n    const insertContent$1 = (editor, value, details) => getRtcInstanceWithFallback(editor).editor.insertContent(value, details);\n    const getSelectedContent = (editor, format, args) => getRtcInstanceWithError(editor).selection.getContent(format, args);\n    const addVisual$1 = (editor, elm) => getRtcInstanceWithError(editor).editor.addVisual(elm);\n    const bindEvents = (editor) => getRtcInstanceWithError(editor).init.bindEvents();\n\n    const getContent$1 = (editor, args = {}) => {\n        const format = args.format ? args.format : 'html';\n        return getSelectedContent(editor, format, args);\n    };\n\n    const deleteFromCallbackMap = (callbackMap, selector, callback) => {\n        if (has$2(callbackMap, selector)) {\n            const newCallbacks = filter$5(callbackMap[selector], (cb) => cb !== callback);\n            if (newCallbacks.length === 0) {\n                delete callbackMap[selector];\n            }\n            else {\n                callbackMap[selector] = newCallbacks;\n            }\n        }\n    };\n    var SelectorChanged = (dom, editor) => {\n        let selectorChangedData;\n        let currentSelectors;\n        const findMatchingNode = (selector, nodes) => find$2(nodes, (node) => dom.is(node, selector));\n        const getParents = (elem) => dom.getParents(elem, undefined, dom.getRoot());\n        const setup = () => {\n            selectorChangedData = {};\n            currentSelectors = {};\n            editor.on('NodeChange', (e) => {\n                const node = e.element;\n                const parents = getParents(node);\n                const matchedSelectors = {};\n                // Check for new matching selectors\n                each$d(selectorChangedData, (callbacks, selector) => {\n                    findMatchingNode(selector, parents).each((node) => {\n                        if (!currentSelectors[selector]) {\n                            // Execute callbacks\n                            each$e(callbacks, (callback) => {\n                                callback(true, { node, selector, parents });\n                            });\n                            currentSelectors[selector] = callbacks;\n                        }\n                        matchedSelectors[selector] = callbacks;\n                    });\n                });\n                // Check if current selectors still match\n                each$d(currentSelectors, (callbacks, selector) => {\n                    if (!matchedSelectors[selector]) {\n                        delete currentSelectors[selector];\n                        each$e(callbacks, (callback) => {\n                            callback(false, { node, selector, parents });\n                        });\n                    }\n                });\n            });\n        };\n        return {\n            selectorChangedWithUnbind: (selector, callback) => {\n                if (!selectorChangedData) {\n                    setup();\n                }\n                // Add selector listeners\n                if (!selectorChangedData[selector]) {\n                    selectorChangedData[selector] = [];\n                }\n                selectorChangedData[selector].push(callback);\n                // Setup the initial state if selected already\n                findMatchingNode(selector, getParents(editor.selection.getStart())).each(() => {\n                    currentSelectors[selector] = selectorChangedData[selector];\n                });\n                return {\n                    unbind: () => {\n                        deleteFromCallbackMap(selectorChangedData, selector, callback);\n                        deleteFromCallbackMap(currentSelectors, selector, callback);\n                    }\n                };\n            }\n        };\n    };\n\n    /**\n     * This class handles text and control selection it's an crossbrowser utility class.\n     * Consult the TinyMCE API Documentation for more details and examples on how to use this class.\n     *\n     * @class tinymce.dom.Selection\n     * @example\n     * // Getting the currently selected node for the active editor\n     * alert(tinymce.activeEditor.selection.getNode().nodeName);\n     */\n    const isAttachedToDom = (node) => {\n        return !!(node && node.ownerDocument) && contains(SugarElement.fromDom(node.ownerDocument), SugarElement.fromDom(node));\n    };\n    const isValidRange = (rng) => {\n        if (!rng) {\n            return false;\n        }\n        else {\n            return isAttachedToDom(rng.startContainer) && isAttachedToDom(rng.endContainer);\n        }\n    };\n    /**\n     * Constructs a new selection instance.\n     *\n     * @constructor\n     * @method Selection\n     * @param {tinymce.dom.DOMUtils} dom DOMUtils object reference.\n     * @param {Window} win Window to bind the selection object to.\n     * @param {tinymce.dom.Serializer} serializer DOM serialization class to use for getContent.\n     * @param {tinymce.Editor} editor Editor instance of the selection.\n     */\n    const EditorSelection = (dom, win, serializer, editor) => {\n        let selectedRange;\n        let explicitRange;\n        const { selectorChangedWithUnbind } = SelectorChanged(dom, editor);\n        /**\n         * Move the selection cursor range to the specified node and offset.\n         * If there is no node specified it will move it to the first suitable location within the body.\n         *\n         * @method setCursorLocation\n         * @param {Node} node Optional node to put the cursor in.\n         * @param {Number} offset Optional offset from the start of the node to put the cursor at.\n         */\n        const setCursorLocation = (node, offset) => {\n            const rng = dom.createRng();\n            if (isNonNullable(node) && isNonNullable(offset)) {\n                rng.setStart(node, offset);\n                rng.setEnd(node, offset);\n                setRng(rng);\n                collapse(false);\n            }\n            else {\n                moveEndPoint(dom, rng, editor.getBody(), true);\n                setRng(rng);\n            }\n        };\n        /**\n         * Returns the selected contents using the DOM serializer passed in to this class.\n         *\n         * @method getContent\n         * @param {Object} args Optional settings class with for example output format text or html.\n         * @return {String} Selected contents in for example HTML format.\n         * @example\n         * // Alerts the currently selected contents\n         * alert(tinymce.activeEditor.selection.getContent());\n         *\n         * // Alerts the currently selected contents as plain text\n         * alert(tinymce.activeEditor.selection.getContent({ format: 'text' }));\n         */\n        const getContent = (args) => getContent$1(editor, args);\n        /**\n         * This method has been deprecated. Use \"editor.insertContent\" instead.\n         *\n         * Sets the current selection to the specified content. If any contents is selected it will be replaced\n         * with the contents passed in to this function. If there is no selection the contents will be inserted\n         * where the caret is placed in the editor/page.\n         *\n         * @method setContent\n         * @param {String} content HTML contents to set could also be other formats depending on settings.\n         * @param {Object} args Optional settings object with for example data format.\n         * @example\n         * // Inserts some HTML contents at the current selection\n         * tinymce.activeEditor.selection.setContent('<strong>Some contents</strong>');\n         */\n        const setContent = (content, args) => setContentExternal(editor, content, args);\n        /**\n         * Returns the start element of a selection range. If the start is in a text\n         * node the parent element will be returned.\n         *\n         * @method getStart\n         * @param {Boolean} real Optional state to get the real parent when the selection is collapsed not the closest element.\n         * @return {Element} Start element of selection range.\n         */\n        const getStart$1 = (real) => getStart(editor.getBody(), getRng$1(), real);\n        /**\n         * Returns the end element of a selection range. If the end is in a text\n         * node the parent element will be returned.\n         *\n         * @method getEnd\n         * @param {Boolean} real Optional state to get the real parent when the selection is collapsed not the closest element.\n         * @return {Element} End element of selection range.\n         */\n        const getEnd$1 = (real) => getEnd(editor.getBody(), getRng$1(), real);\n        /**\n         * Returns a bookmark location for the current selection. This bookmark object\n         * can then be used to restore the selection after some content modification to the document.\n         *\n         * @method getBookmark\n         * @param {Number} type Optional state if the bookmark should be simple or not. Default is complex.\n         * @param {Boolean} normalized Optional state that enables you to get a position that it would be after normalization.\n         * @return {Object} Bookmark object, use moveToBookmark with this object to restore the selection.\n         * @example\n         * // Stores a bookmark of the current selection\n         * const bm = tinymce.activeEditor.selection.getBookmark();\n         *\n         * tinymce.activeEditor.setContent(tinymce.activeEditor.getContent() + 'Some new content');\n         *\n         * // Restore the selection bookmark\n         * tinymce.activeEditor.selection.moveToBookmark(bm);\n         */\n        const getBookmark = (type, normalized) => bookmarkManager.getBookmark(type, normalized);\n        /**\n         * Restores the selection to the specified bookmark.\n         *\n         * @method moveToBookmark\n         * @param {Object} bookmark Bookmark to restore selection from.\n         * @example\n         * // Stores a bookmark of the current selection\n         * const bm = tinymce.activeEditor.selection.getBookmark();\n         *\n         * tinymce.activeEditor.setContent(tinymce.activeEditor.getContent() + 'Some new content');\n         *\n         * // Restore the selection bookmark\n         * tinymce.activeEditor.selection.moveToBookmark(bm);\n         */\n        const moveToBookmark = (bookmark) => bookmarkManager.moveToBookmark(bookmark);\n        /**\n         * Selects the specified element. This will place the start and end of the selection range around the element.\n         *\n         * @method select\n         * @param {Element} node HTML DOM element to select.\n         * @param {Boolean} content Optional bool state if the contents should be selected or not on non IE browser.\n         * @return {Element} Selected element the same element as the one that got passed in.\n         * @example\n         * // Select the first paragraph in the active editor\n         * tinymce.activeEditor.selection.select(tinymce.activeEditor.dom.select('p')[0]);\n         */\n        const select$1 = (node, content) => {\n            select(dom, node, content).each(setRng);\n            return node;\n        };\n        /**\n         * Returns true/false if the selection range is collapsed or not. Collapsed means if it's a caret or a larger selection.\n         *\n         * @method isCollapsed\n         * @return {Boolean} true/false state if the selection range is collapsed or not.\n         * Collapsed means if it's a caret or a larger selection.\n         */\n        const isCollapsed = () => {\n            const rng = getRng$1(), sel = getSel();\n            if (!rng || rng.item) {\n                return false;\n            }\n            if (rng.compareEndPoints) {\n                return rng.compareEndPoints('StartToEnd', rng) === 0;\n            }\n            return !sel || rng.collapsed;\n        };\n        /**\n         * Checks if the current selection\u2019s start and end containers are editable within their parent\u2019s contexts.\n         *\n         * @method isEditable\n         * @return {Boolean} Will be true if the selection is editable and false if it's not editable.\n         */\n        const isEditable = () => {\n            if (editor.mode.isReadOnly()) {\n                return false;\n            }\n            const rng = getRng$1();\n            const fakeSelectedElements = editor.getBody().querySelectorAll('[data-mce-selected=\"1\"]');\n            if (fakeSelectedElements.length > 0) {\n                return forall(fakeSelectedElements, (el) => dom.isEditable(el.parentElement));\n            }\n            else {\n                return isEditableRange(dom, rng);\n            }\n        };\n        /**\n         * Collapse the selection to start or end of range.\n         *\n         * @method collapse\n         * @param {Boolean} toStart Optional boolean state if to collapse to end or not. Defaults to false.\n         */\n        const collapse = (toStart) => {\n            const rng = getRng$1();\n            rng.collapse(!!toStart);\n            setRng(rng);\n        };\n        /**\n         * Returns the browsers internal selection object.\n         *\n         * @method getSel\n         * @return {Selection} Internal browser selection object.\n         */\n        const getSel = () => win.getSelection ? win.getSelection() : win.document.selection;\n        /**\n         * Returns the browsers internal range object.\n         *\n         * @method getRng\n         * @return {Range} Internal browser range object.\n         * @see http://www.quirksmode.org/dom/range_intro.html\n         * @see http://www.dotvoid.com/2001/03/using-the-range-object-in-mozilla/\n         */\n        const getRng$1 = () => {\n            let rng;\n            const tryCompareBoundaryPoints = (how, sourceRange, destinationRange) => {\n                try {\n                    return sourceRange.compareBoundaryPoints(how, destinationRange);\n                }\n                catch {\n                    // Gecko throws wrong document exception if the range points\n                    // to nodes that where removed from the dom #6690\n                    // Browsers should mutate existing DOMRange instances so that they always point\n                    // to something in the document this is not the case in Gecko works fine in IE/WebKit/Blink\n                    // For performance reasons just return -1\n                    return -1;\n                }\n            };\n            const doc = win.document;\n            if (isNonNullable(editor.bookmark) && !hasFocus(editor)) {\n                const bookmark = getRng(editor);\n                if (bookmark.isSome()) {\n                    return bookmark.map((r) => processRanges(editor, [r])[0]).getOr(doc.createRange());\n                }\n            }\n            try {\n                const selection = getSel();\n                if (selection && !isRestrictedNode(selection.anchorNode)) {\n                    if (selection.rangeCount > 0) {\n                        rng = selection.getRangeAt(0);\n                    }\n                    else {\n                        rng = doc.createRange();\n                    }\n                    rng = processRanges(editor, [rng])[0];\n                }\n            }\n            catch {\n                // IE throws unspecified error here if TinyMCE is placed in a frame/iframe\n            }\n            // No range found then create an empty one\n            // This can occur when the editor is placed in a hidden container element on Gecko\n            if (!rng) {\n                rng = doc.createRange();\n            }\n            // If range is at start of document then move it to start of body\n            if (isDocument$1(rng.startContainer) && rng.collapsed) {\n                const elm = dom.getRoot();\n                rng.setStart(elm, 0);\n                rng.setEnd(elm, 0);\n            }\n            if (selectedRange && explicitRange) {\n                if (tryCompareBoundaryPoints(rng.START_TO_START, rng, selectedRange) === 0 &&\n                    tryCompareBoundaryPoints(rng.END_TO_END, rng, selectedRange) === 0) {\n                    // Safari, Opera and Chrome only ever select text which causes the range to change.\n                    // This lets us use the originally set range if the selection hasn't been changed by the user.\n                    rng = explicitRange;\n                }\n                else {\n                    selectedRange = null;\n                    explicitRange = null;\n                }\n            }\n            return rng;\n        };\n        /**\n         * Changes the selection to the specified DOM range.\n         *\n         * @method setRng\n         * @param {Range} rng Range to select.\n         * @param {Boolean} forward Optional boolean if the selection is forwards or backwards.\n         */\n        const setRng = (rng, forward) => {\n            if (!isValidRange(rng)) {\n                return;\n            }\n            const sel = getSel();\n            const evt = editor.dispatch('SetSelectionRange', { range: rng, forward });\n            rng = evt.range;\n            if (sel) {\n                explicitRange = rng;\n                try {\n                    sel.removeAllRanges();\n                    sel.addRange(rng);\n                }\n                catch {\n                    // IE might throw errors here if the editor is within a hidden container and selection is changed\n                }\n                // Forward is set to false and we have an extend function\n                if (forward === false && sel.extend) {\n                    sel.collapse(rng.endContainer, rng.endOffset);\n                    sel.extend(rng.startContainer, rng.startOffset);\n                }\n                // adding range isn't always successful so we need to check range count otherwise an exception can occur\n                selectedRange = sel.rangeCount > 0 ? sel.getRangeAt(0) : null;\n            }\n            // WebKit edge case selecting images works better using setBaseAndExtent when the image is floated\n            if (!rng.collapsed && rng.startContainer === rng.endContainer && sel?.setBaseAndExtent) {\n                if (rng.endOffset - rng.startOffset < 2) {\n                    if (rng.startContainer.hasChildNodes()) {\n                        const node = rng.startContainer.childNodes[rng.startOffset];\n                        if (node && node.nodeName === 'IMG') {\n                            sel.setBaseAndExtent(rng.startContainer, rng.startOffset, rng.endContainer, rng.endOffset);\n                            // Since the setBaseAndExtent is fixed in more recent Blink versions we\n                            // need to detect if it's doing the wrong thing and falling back to the\n                            // crazy incorrect behavior api call since that seems to be the only way\n                            // to get it to work on Safari WebKit as of 2017-02-23\n                            if (sel.anchorNode !== rng.startContainer || sel.focusNode !== rng.endContainer) {\n                                sel.setBaseAndExtent(node, 0, node, 1);\n                            }\n                        }\n                    }\n                }\n            }\n            editor.dispatch('AfterSetSelectionRange', { range: rng, forward });\n        };\n        /**\n         * Sets the current selection to the specified DOM element.\n         *\n         * @method setNode\n         * @param {Element} elm Element to set as the contents of the selection.\n         * @return {Element} Returns the element that got passed in.\n         * @example\n         * // Inserts a DOM node at current selection/caret location\n         * tinymce.activeEditor.selection.setNode(tinymce.activeEditor.dom.create('img', { src: 'some.gif', title: 'some title' }));\n         */\n        const setNode = (elm) => {\n            setContentInternal$1(editor, dom.getOuterHTML(elm));\n            return elm;\n        };\n        /**\n         * Returns the currently selected element or the common ancestor element for both start and end of the selection.\n         *\n         * @method getNode\n         * @return {Element} Currently selected element or common ancestor element.\n         * @example\n         * // Alerts the currently selected elements node name\n         * alert(tinymce.activeEditor.selection.getNode().nodeName);\n         */\n        const getNode$1 = () => getNode(editor.getBody(), getRng$1());\n        const getSelectedBlocks$1 = (startElm, endElm) => getSelectedBlocks(dom, getRng$1(), startElm, endElm);\n        const isForward = () => {\n            const sel = getSel();\n            const anchorNode = sel?.anchorNode;\n            const focusNode = sel?.focusNode;\n            // No support for selection direction then always return true\n            if (!sel || !anchorNode || !focusNode || isRestrictedNode(anchorNode) || isRestrictedNode(focusNode)) {\n                return true;\n            }\n            const anchorRange = dom.createRng();\n            const focusRange = dom.createRng();\n            try {\n                anchorRange.setStart(anchorNode, sel.anchorOffset);\n                anchorRange.collapse(true);\n                focusRange.setStart(focusNode, sel.focusOffset);\n                focusRange.collapse(true);\n            }\n            catch {\n                // Safari can generate an invalid selection and error. Silently handle it and default to forward.\n                // See https://bugs.webkit.org/show_bug.cgi?id=230594.\n                return true;\n            }\n            return anchorRange.compareBoundaryPoints(anchorRange.START_TO_START, focusRange) <= 0;\n        };\n        const normalize = () => {\n            const rng = getRng$1();\n            const sel = getSel();\n            if (!hasMultipleRanges(sel) && hasAnyRanges(editor)) {\n                const normRng = normalize$2(dom, rng);\n                normRng.each((normRng) => {\n                    setRng(normRng, isForward());\n                });\n                return normRng.getOr(rng);\n            }\n            return rng;\n        };\n        /**\n         * Executes callback when the current selection starts/stops matching the specified selector. The current\n         * state will be passed to the callback as it's first argument.\n         *\n         * @method selectorChanged\n         * @param {String} selector CSS selector to check for.\n         * @param {Function} callback Callback with state and args when the selector is matches or not.\n         */\n        // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types\n        const selectorChanged = (selector, callback) => {\n            selectorChangedWithUnbind(selector, callback);\n            return exports;\n        };\n        const getScrollContainer = () => {\n            let scrollContainer;\n            let node = dom.getRoot();\n            while (node && node.nodeName !== 'BODY') {\n                if (node.scrollHeight > node.clientHeight) {\n                    scrollContainer = node;\n                    break;\n                }\n                node = node.parentNode;\n            }\n            return scrollContainer;\n        };\n        const scrollIntoView = (elm, alignToTop) => {\n            if (isNonNullable(elm)) {\n                scrollElementIntoView(editor, elm, alignToTop);\n            }\n            else {\n                scrollRangeIntoView(editor, getRng$1(), alignToTop);\n            }\n        };\n        const placeCaretAt = (clientX, clientY) => setRng(fromPoint(clientX, clientY, editor.getDoc()));\n        const getBoundingClientRect = () => {\n            const rng = getRng$1();\n            return rng.collapsed ? CaretPosition.fromRangeStart(rng).getClientRects()[0] : rng.getBoundingClientRect();\n        };\n        const destroy = () => {\n            win = selectedRange = explicitRange = null;\n            controlSelection.destroy();\n        };\n        /**\n         * Expands the selection range to contain the entire word when the selection is collapsed within the word.\n         *\n         * @method expand\n         * @param {Object} options Optional options provided to the expansion. Defaults to { type: 'word' }\n         */\n        const expand = (options = { type: 'word' }) => setRng(RangeUtils(dom).expand(getRng$1(), options));\n        const exports = {\n            dom,\n            win,\n            serializer,\n            editor,\n            expand,\n            collapse,\n            setCursorLocation,\n            getContent,\n            setContent,\n            getBookmark,\n            moveToBookmark,\n            select: select$1,\n            isCollapsed,\n            isEditable,\n            isForward,\n            setNode,\n            getNode: getNode$1,\n            getSel,\n            setRng,\n            getRng: getRng$1,\n            getStart: getStart$1,\n            getEnd: getEnd$1,\n            getSelectedBlocks: getSelectedBlocks$1,\n            normalize,\n            selectorChanged,\n            selectorChangedWithUnbind,\n            getScrollContainer,\n            scrollIntoView,\n            placeCaretAt,\n            getBoundingClientRect,\n            destroy\n        };\n        const bookmarkManager = BookmarkManager(exports);\n        const controlSelection = ControlSelection(exports, editor);\n        exports.bookmarkManager = bookmarkManager;\n        exports.controlSelection = controlSelection;\n        return exports;\n    };\n\n    const addNodeFilter = (settings, htmlParser, schema) => {\n        htmlParser.addNodeFilter('br', (nodes, _, args) => {\n            const blockElements = Tools.extend({}, schema.getBlockElements());\n            const nonEmptyElements = schema.getNonEmptyElements();\n            const whitespaceElements = schema.getWhitespaceElements();\n            // Remove brs from body element as well\n            blockElements.body = 1;\n            const isBlock = (node) => node.name in blockElements || isTransparentAstBlock(schema, node);\n            // Must loop forwards since it will otherwise remove all brs in <p>a<br><br><br></p>\n            for (let i = 0, l = nodes.length; i < l; i++) {\n                let node = nodes[i];\n                let parent = node.parent;\n                if (parent && isBlock(parent) && node === parent.lastChild) {\n                    // Loop all nodes to the left of the current node and check for other BR elements\n                    // excluding bookmarks since they are invisible\n                    let prev = node.prev;\n                    while (prev) {\n                        const prevName = prev.name;\n                        // Ignore bookmarks\n                        if (prevName !== 'span' || prev.attr('data-mce-type') !== 'bookmark') {\n                            // Found another br it's a <br><br> structure then don't remove anything\n                            if (prevName === 'br') {\n                                node = null;\n                            }\n                            break;\n                        }\n                        prev = prev.prev;\n                    }\n                    if (node) {\n                        node.remove();\n                        // Is the parent to be considered empty after we removed the BR\n                        if (isEmpty$2(schema, nonEmptyElements, whitespaceElements, parent)) {\n                            const elementRule = schema.getElementRule(parent.name);\n                            // Remove or padd the element depending on schema rule\n                            if (elementRule) {\n                                if (elementRule.removeEmpty) {\n                                    parent.remove();\n                                }\n                                else if (elementRule.paddEmpty) {\n                                    paddEmptyNode(settings, args, isBlock, parent);\n                                }\n                            }\n                        }\n                    }\n                }\n                else {\n                    // Replaces BR elements inside inline elements like <p><b><i><br></i></b></p>\n                    // so they become <p><b><i>&nbsp;</i></b></p>\n                    let lastParent = node;\n                    while (parent && parent.firstChild === lastParent && parent.lastChild === lastParent) {\n                        lastParent = parent;\n                        if (blockElements[parent.name]) {\n                            break;\n                        }\n                        parent = parent.parent;\n                    }\n                    if (lastParent === parent) {\n                        const textNode = new AstNode('#text', 3);\n                        textNode.value = nbsp;\n                        node.replace(textNode);\n                    }\n                }\n            }\n        });\n    };\n\n    const register$3 = (htmlParser, settings, dom) => {\n        // Convert tabindex back to elements when serializing contents\n        htmlParser.addAttributeFilter('data-mce-tabindex', (nodes, name) => {\n            let i = nodes.length;\n            while (i--) {\n                const node = nodes[i];\n                node.attr('tabindex', node.attr('data-mce-tabindex'));\n                node.attr(name, null);\n            }\n        });\n        // Convert move data-mce-src, data-mce-href and data-mce-style into nodes or process them if needed\n        htmlParser.addAttributeFilter('src,href,style', (nodes, name) => {\n            const internalName = 'data-mce-' + name;\n            const urlConverter = settings.url_converter;\n            const urlConverterScope = settings.url_converter_scope;\n            let i = nodes.length;\n            while (i--) {\n                const node = nodes[i];\n                let value = node.attr(internalName);\n                if (value !== undefined) {\n                    // Set external name to internal value and remove internal\n                    node.attr(name, value.length > 0 ? value : null);\n                    node.attr(internalName, null);\n                }\n                else {\n                    // No internal attribute found then convert the value we have in the DOM\n                    value = node.attr(name);\n                    if (name === 'style') {\n                        value = dom.serializeStyle(dom.parseStyle(value), node.name);\n                    }\n                    else if (urlConverter) {\n                        value = urlConverter.call(urlConverterScope, value, name, node.name);\n                    }\n                    node.attr(name, value.length > 0 ? value : null);\n                }\n            }\n        });\n        // Remove internal classes mceItem<..> or mceSelected\n        htmlParser.addAttributeFilter('class', (nodes) => {\n            let i = nodes.length;\n            while (i--) {\n                const node = nodes[i];\n                let value = node.attr('class');\n                if (value) {\n                    value = value.replace(/(?:^|\\s)mce-item-\\w+(?!\\S)/g, '');\n                    node.attr('class', value.length > 0 ? value : null);\n                }\n            }\n        });\n        // Remove bookmark elements\n        htmlParser.addAttributeFilter('data-mce-type', (nodes, name, args) => {\n            let i = nodes.length;\n            while (i--) {\n                const node = nodes[i];\n                if (node.attr('data-mce-type') === 'bookmark' && !args.cleanup) {\n                    // We maybe dealing with a \"filled\" bookmark. If so just remove the node, otherwise unwrap it\n                    const hasChildren = Optional.from(node.firstChild).exists((firstChild) => !isZwsp(firstChild.value ?? ''));\n                    if (hasChildren) {\n                        node.unwrap();\n                    }\n                    else {\n                        node.remove();\n                    }\n                }\n            }\n        });\n        // Force script into CDATA sections and remove the mce- prefix also add comments around styles\n        htmlParser.addNodeFilter('script,style', (nodes, name) => {\n            const trim = (value) => {\n                /* jshint maxlen:255 */\n                /* eslint max-len:0 */\n                return value.replace(/(<!--\\[CDATA\\[|\\]\\]-->)/g, '\\n')\n                    .replace(/^[\\r\\n]*|[\\r\\n]*$/g, '')\n                    .replace(/^\\s*((<!--)?(\\s*\\/\\/)?\\s*<!\\[CDATA\\[|(<!--\\s*)?\\/\\*\\s*<!\\[CDATA\\[\\s*\\*\\/|(\\/\\/)?\\s*<!--|\\/\\*\\s*<!--\\s*\\*\\/)\\s*[\\r\\n]*/gi, '')\n                    .replace(/\\s*(\\/\\*\\s*\\]\\]>\\s*\\*\\/(-->)?|\\s*\\/\\/\\s*\\]\\]>(-->)?|\\/\\/\\s*(-->)?|\\]\\]>|\\/\\*\\s*-->\\s*\\*\\/|\\s*-->\\s*)\\s*$/g, '');\n            };\n            let i = nodes.length;\n            while (i--) {\n                const node = nodes[i];\n                const firstChild = node.firstChild;\n                const value = firstChild?.value ?? '';\n                if (name === 'script') {\n                    // Remove mce- prefix from script elements and remove default type since the user specified\n                    // a script element without type attribute\n                    const type = node.attr('type');\n                    if (type) {\n                        node.attr('type', type === 'mce-no/type' ? null : type.replace(/^mce\\-/, ''));\n                    }\n                    if (settings.element_format === 'xhtml' && firstChild && value.length > 0) {\n                        firstChild.value = '// <![CDATA[\\n' + trim(value) + '\\n// ]]>';\n                    }\n                }\n                else {\n                    if (settings.element_format === 'xhtml' && firstChild && value.length > 0) {\n                        firstChild.value = '<!--\\n' + trim(value) + '\\n-->';\n                    }\n                }\n            }\n        });\n        // Convert comments to cdata\n        htmlParser.addNodeFilter('#comment', (nodes) => {\n            let i = nodes.length;\n            while (i--) {\n                const node = nodes[i];\n                const value = node.value;\n                if (settings.preserve_cdata && value?.indexOf('[CDATA[') === 0) {\n                    node.name = '#cdata';\n                    node.type = 4;\n                    node.value = dom.decode(value.replace(/^\\[CDATA\\[|\\]\\]$/g, ''));\n                }\n            }\n        });\n        htmlParser.addNodeFilter('xml:namespace,input', (nodes, name) => {\n            let i = nodes.length;\n            while (i--) {\n                const node = nodes[i];\n                if (node.type === 7) {\n                    node.remove();\n                }\n                else if (node.type === 1) {\n                    if (name === 'input' && !node.attr('type')) {\n                        node.attr('type', 'text');\n                    }\n                }\n            }\n        });\n        htmlParser.addAttributeFilter('data-mce-type', (nodes) => {\n            each$e(nodes, (node) => {\n                if (node.attr('data-mce-type') === 'format-caret') {\n                    if (node.isEmpty(htmlParser.schema.getNonEmptyElements())) {\n                        node.remove();\n                    }\n                    else {\n                        node.unwrap();\n                    }\n                }\n            });\n        });\n        // Remove internal data attributes\n        htmlParser.addAttributeFilter('data-mce-src,data-mce-href,data-mce-style,' +\n            'data-mce-selected,data-mce-expando,data-mce-block,' +\n            'data-mce-type,data-mce-resize,data-mce-placeholder', (nodes, name) => {\n            let i = nodes.length;\n            while (i--) {\n                nodes[i].attr(name, null);\n            }\n        });\n        // Remove <br> at end of block elements Gecko and WebKit injects BR elements to\n        // make it possible to place the caret inside empty blocks. This logic tries to remove\n        // these elements and keep br elements that where intended to be there intact\n        if (settings.remove_trailing_brs) {\n            addNodeFilter(settings, htmlParser, htmlParser.schema);\n        }\n    };\n    /**\n     * IE 11 has a fantastic bug where it will produce two trailing BR elements to iframe bodies when\n     * the iframe is hidden by display: none on a parent container. The DOM is actually out of sync\n     * with innerHTML in this case. It's like IE adds shadow DOM BR elements that appears on innerHTML\n     * but not as the lastChild of the body. So this fix simply removes the last two\n     * BR elements at the end of the document.\n     *\n     * Example of what happens: <body>text</body> becomes <body>text<br><br></body>\n     */\n    const trimTrailingBr = (rootNode) => {\n        const isBr = (node) => {\n            return node?.name === 'br';\n        };\n        const brNode1 = rootNode.lastChild;\n        if (isBr(brNode1)) {\n            const brNode2 = brNode1.prev;\n            if (isBr(brNode2)) {\n                brNode1.remove();\n                brNode2.remove();\n            }\n        }\n    };\n\n    const preProcess$1 = (editor, node, args) => {\n        let oldDoc;\n        const dom = editor.dom;\n        let clonedNode = node.cloneNode(true);\n        // Nodes needs to be attached to something in WebKit/Opera\n        // This fix will make DOM ranges and make Sizzle happy!\n        const impl = document.implementation;\n        if (impl.createHTMLDocument) {\n            // Create an empty HTML document\n            const doc = impl.createHTMLDocument('');\n            // Add the element or it's children if it's a body element to the new document\n            Tools.each(clonedNode.nodeName === 'BODY' ? clonedNode.childNodes : [clonedNode], (node) => {\n                doc.body.appendChild(doc.importNode(node, true));\n            });\n            // Grab first child or body element for serialization\n            if (clonedNode.nodeName !== 'BODY') {\n                // We cast to a Element here, as this will be the cloned node imported and appended above\n                clonedNode = doc.body.firstChild;\n            }\n            else {\n                clonedNode = doc.body;\n            }\n            // set the new document in DOMUtils so createElement etc works\n            oldDoc = dom.doc;\n            dom.doc = doc;\n        }\n        firePreProcess(editor, { ...args, node: clonedNode });\n        if (oldDoc) {\n            dom.doc = oldDoc;\n        }\n        return clonedNode;\n    };\n    const shouldFireEvent = (editor, args) => {\n        return isNonNullable(editor) && editor.hasEventListeners('PreProcess') && !args.no_events;\n    };\n    const process$1 = (editor, node, args) => {\n        return shouldFireEvent(editor, args) ? preProcess$1(editor, node, args) : node;\n    };\n\n    const addTempAttr = (htmlParser, tempAttrs, name) => {\n        if (Tools.inArray(tempAttrs, name) === -1) {\n            htmlParser.addAttributeFilter(name, (nodes, name) => {\n                let i = nodes.length;\n                while (i--) {\n                    nodes[i].attr(name, null);\n                }\n            });\n            tempAttrs.push(name);\n        }\n    };\n    const postProcess = (editor, args, content) => {\n        if (!args.no_events && editor) {\n            const outArgs = firePostProcess(editor, { ...args, content });\n            return outArgs.content;\n        }\n        else {\n            return content;\n        }\n    };\n    const getHtmlFromNode = (dom, node, args) => {\n        // TODO: Investigate if using `innerHTML` is correct as DomSerializerPreProcess definitely returns a Node\n        const html = trim$2(args.getInner ? node.innerHTML : dom.getOuterHTML(node));\n        return args.selection || isWsPreserveElement(SugarElement.fromDom(node)) ? html : Tools.trim(html);\n    };\n    const parseHtml = (htmlParser, html, args) => {\n        const parserArgs = args.selection ? { forced_root_block: false, ...args } : args;\n        const rootNode = htmlParser.parse(html, parserArgs);\n        trimTrailingBr(rootNode);\n        return rootNode;\n    };\n    const serializeNode = (settings, schema, node) => {\n        const htmlSerializer = HtmlSerializer(settings, schema);\n        return htmlSerializer.serialize(node);\n    };\n    const toHtml = (editor, settings, schema, rootNode, args) => {\n        const content = serializeNode(settings, schema, rootNode);\n        return postProcess(editor, args, content);\n    };\n    const DomSerializerImpl = (settings, editor) => {\n        const tempAttrs = ['data-mce-selected'];\n        const defaultedSettings = {\n            entity_encoding: 'named',\n            remove_trailing_brs: true,\n            pad_empty_with_br: false,\n            ...settings\n        };\n        const dom = editor && editor.dom ? editor.dom : DOMUtils.DOM;\n        const schema = editor && editor.schema ? editor.schema : Schema(defaultedSettings);\n        const htmlParser = DomParser(defaultedSettings, schema);\n        register$3(htmlParser, defaultedSettings, dom);\n        const serialize = (node, domSerializerArgs = {}) => {\n            const { indent, entity_encoding, ...rest } = domSerializerArgs;\n            const parserArgs = { format: 'html', ...rest };\n            const targetNode = process$1(editor, node, parserArgs);\n            const html = getHtmlFromNode(dom, targetNode, parserArgs);\n            const rootNode = parseHtml(htmlParser, html, parserArgs);\n            if (parserArgs.format === 'tree') {\n                return rootNode;\n            }\n            const serializerSettings = {\n                ...defaultedSettings,\n                ...(isNonNullable(indent) ? { indent } : {}),\n                ...(isNonNullable(entity_encoding) ? { entity_encoding } : {}),\n            };\n            return toHtml(editor, serializerSettings, schema, rootNode, parserArgs);\n        };\n        return {\n            schema,\n            addNodeFilter: htmlParser.addNodeFilter,\n            addAttributeFilter: htmlParser.addAttributeFilter,\n            serialize: serialize,\n            addRules: schema.addValidElements,\n            setRules: schema.setValidElements,\n            addTempAttr: curry(addTempAttr, htmlParser, tempAttrs),\n            getTempAttrs: constant(tempAttrs),\n            getNodeFilters: htmlParser.getNodeFilters,\n            getAttributeFilters: htmlParser.getAttributeFilters,\n            removeNodeFilter: htmlParser.removeNodeFilter,\n            removeAttributeFilter: htmlParser.removeAttributeFilter\n        };\n    };\n\n    /**\n     * This class is used to serialize DOM trees into a string. Consult the TinyMCE API Documentation for\n     * more details and examples on how to use this class.\n     *\n     * @class tinymce.dom.Serializer\n     */\n    const DomSerializer = (settings, editor) => {\n        const domSerializer = DomSerializerImpl(settings, editor);\n        // Return public methods\n        return {\n            /**\n             * Schema instance that was used to when the Serializer was constructed.\n             *\n             * @field {tinymce.html.Schema} schema\n             */\n            schema: domSerializer.schema,\n            /**\n             * Adds a node filter function to the parser used by the serializer, the parser will collect the specified nodes by name\n             * and then execute the callback once it has finished parsing the document.\n             *\n             * @method addNodeFilter\n             * @param {String} name Comma separated list of nodes to collect.\n             * @param {Function} callback Callback function to execute once it has collected nodes.\n             * @example\n             * serializer.addNodeFilter('p,h1', (nodes, name) => {\n             *   for (let i = 0; i < nodes.length; i++) {\n             *     console.log(nodes[i].name);\n             *   }\n             * });\n             */\n            addNodeFilter: domSerializer.addNodeFilter,\n            /**\n             * Adds an attribute filter function to the parser used by the serializer, the parser will\n             * collect nodes that has the specified attributes\n             * and then execute the callback once it has finished parsing the document.\n             *\n             * @method addAttributeFilter\n             * @param {String} name Comma separated list of attributes to collect.\n             * @param {Function} callback Callback function to execute once it has collected nodes.\n             * @example\n             * serializer.addAttributeFilter('src,href', (nodes, name) => {\n             *   for (let i = 0; i < nodes.length; i++) {\n             *     console.log(nodes[i].name);\n             *   }\n             * });\n             */\n            addAttributeFilter: domSerializer.addAttributeFilter,\n            /**\n             * Serializes the specified browser DOM node into a HTML string.\n             *\n             * @method serialize\n             * @param {DOMNode} node DOM node to serialize.\n             * @param {Object} args Arguments option that gets passed to event handlers.\n             */\n            serialize: domSerializer.serialize,\n            /**\n             * Adds valid elements rules to the serializers schema instance this enables you to specify things\n             * like what elements should be outputted and what attributes specific elements might have.\n             * Consult the TinyMCE Documentation for more details on this format.\n             *\n             * @method addRules\n             * @param {String} rules Valid elements rules string to add to schema.\n             */\n            addRules: domSerializer.addRules,\n            /**\n             * Sets the valid elements rules to the serializers schema instance this enables you to specify things\n             * like what elements should be outputted and what attributes specific elements might have.\n             * Consult the TinyMCE Documentation for more details on this format.\n             *\n             * @method setRules\n             * @param {String} rules Valid elements rules string.\n             */\n            setRules: domSerializer.setRules,\n            /**\n             * Adds a temporary internal attribute these attributes will get removed on undo and\n             * when getting contents out of the editor.\n             *\n             * @method addTempAttr\n             * @param {String} name string\n             */\n            addTempAttr: domSerializer.addTempAttr,\n            /**\n             * Returns an array of all added temp attrs names.\n             *\n             * @method getTempAttrs\n             * @return {String[]} Array with attribute names.\n             */\n            getTempAttrs: domSerializer.getTempAttrs,\n            getNodeFilters: domSerializer.getNodeFilters,\n            getAttributeFilters: domSerializer.getAttributeFilters,\n            /**\n             * Removes a node filter function or removes all filter functions from the parser used by the serializer for the node names provided.\n             *\n             * @method removeNodeFilter\n             * @param {String} name Comma separated list of node names to remove filters for.\n             * @param {Function} callback Optional callback function to only remove a specific callback.\n             * @example\n             * // Remove a single filter\n             * serializer.removeNodeFilter('p,h1', someCallback);\n             *\n             * // Remove all filters\n             * serializer.removeNodeFilter('p,h1');\n             */\n            removeNodeFilter: domSerializer.removeNodeFilter,\n            /**\n             * Removes an attribute filter function or removes all filter functions from the parser used by the serializer for the attribute names provided.\n             *\n             * @method removeAttributeFilter\n             * @param {String} name Comma separated list of attribute names to remove filters for.\n             * @param {Function} callback Optional callback function to only remove a specific callback.\n             * @example\n             * // Remove a single filter\n             * serializer.removeAttributeFilter('src,href', someCallback);\n             *\n             * // Remove all filters\n             * serializer.removeAttributeFilter('src,href');\n             */\n            removeAttributeFilter: domSerializer.removeAttributeFilter\n        };\n    };\n\n    const defaultFormat$1 = 'html';\n    const setupArgs$1 = (args, format) => ({\n        ...args,\n        format,\n        get: true,\n        getInner: true\n    });\n    const getContent = (editor, args = {}) => {\n        const format = args.format ? args.format : defaultFormat$1;\n        const defaultedArgs = setupArgs$1(args, format);\n        return preProcessGetContent(editor, defaultedArgs).fold(identity, (updatedArgs) => {\n            const content = getContent$2(editor, updatedArgs);\n            return postProcessGetContent(editor, content, updatedArgs);\n        });\n    };\n\n    const defaultFormat = 'html';\n    const setupArgs = (args, content) => ({\n        format: defaultFormat,\n        ...args,\n        set: true,\n        content\n    });\n    const setContent = (editor, content, args = {}) => {\n        const defaultedArgs = setupArgs(args, content);\n        preProcessSetContent(editor, defaultedArgs).each((updatedArgs) => {\n            const result = setContent$1(editor, updatedArgs.content, updatedArgs);\n            postProcessSetContent(editor, result.html, updatedArgs);\n        });\n    };\n\n    const DOM$a = DOMUtils.DOM;\n    const restoreOriginalStyles = (editor) => {\n        DOM$a.setStyle(editor.id, 'display', editor.orgDisplay);\n    };\n    const safeDestroy = (x) => Optional.from(x).each((x) => x.destroy());\n    const clearDomReferences = (editor) => {\n        const ed = editor;\n        ed.contentAreaContainer = ed.formElement = ed.container = ed.editorContainer = null;\n        ed.bodyElement = ed.contentDocument = ed.contentWindow = null;\n        ed.iframeElement = ed.targetElm = null;\n        const selection = editor.selection;\n        if (selection) {\n            const dom = selection.dom;\n            ed.selection = selection.win = selection.dom = dom.doc = null;\n        }\n    };\n    const restoreForm = (editor) => {\n        const form = editor.formElement;\n        if (form) {\n            if (form._mceOldSubmit) {\n                form.submit = form._mceOldSubmit;\n                delete form._mceOldSubmit;\n            }\n            DOM$a.unbind(form, 'submit reset', editor.formEventDelegate);\n        }\n    };\n    const remove$1 = (editor) => {\n        if (!editor.removed) {\n            const { _selectionOverrides, editorUpload } = editor;\n            const body = editor.getBody();\n            const element = editor.getElement();\n            if (body) {\n                editor.save({ is_removing: true });\n            }\n            editor.removed = true;\n            editor.unbindAllNativeEvents();\n            // Remove any hidden input\n            if (editor.hasHiddenInput && isNonNullable(element?.nextSibling)) {\n                DOM$a.remove(element.nextSibling);\n            }\n            fireRemove(editor);\n            editor.editorManager.remove(editor);\n            if (!editor.inline && body) {\n                restoreOriginalStyles(editor);\n            }\n            fireDetach(editor);\n            DOM$a.remove(editor.getContainer());\n            safeDestroy(_selectionOverrides);\n            safeDestroy(editorUpload);\n            editor.destroy();\n        }\n    };\n    const destroy = (editor, automatic) => {\n        const { selection, dom } = editor;\n        if (editor.destroyed) {\n            return;\n        }\n        // If user manually calls destroy and not remove\n        // Users seems to have logic that calls destroy instead of remove\n        if (!automatic && !editor.removed) {\n            editor.remove();\n            return;\n        }\n        if (!automatic) {\n            editor.editorManager.off('beforeunload', editor._beforeUnload);\n            // Manual destroy\n            if (editor.theme && editor.theme.destroy) {\n                editor.theme.destroy();\n            }\n            safeDestroy(selection);\n            safeDestroy(dom);\n        }\n        restoreForm(editor);\n        clearDomReferences(editor);\n        editor.destroyed = true;\n    };\n\n    const CreateIconManager = () => {\n        const lookup = {};\n        const add = (id, iconPack) => {\n            lookup[id] = iconPack;\n        };\n        const get = (id) => {\n            if (lookup[id]) {\n                return lookup[id];\n            }\n            else {\n                return { icons: {} };\n            }\n        };\n        const has = (id) => has$2(lookup, id);\n        return {\n            add,\n            get,\n            has\n        };\n    };\n    const IconManager = CreateIconManager();\n\n    const ModelManager = AddOnManager.ModelManager;\n\n    const getProp = (propName, elm) => {\n        const rawElm = elm.dom;\n        return rawElm[propName];\n    };\n    const getComputedSizeProp = (propName, elm) => parseInt(get$8(elm, propName), 10);\n    const getClientWidth = curry(getProp, 'clientWidth');\n    const getClientHeight = curry(getProp, 'clientHeight');\n    const getMarginTop = curry(getComputedSizeProp, 'margin-top');\n    const getMarginLeft = curry(getComputedSizeProp, 'margin-left');\n    const getBoundingClientRect = (elm) => elm.dom.getBoundingClientRect();\n    const isInsideElementContentArea = (bodyElm, clientX, clientY) => {\n        const clientWidth = getClientWidth(bodyElm);\n        const clientHeight = getClientHeight(bodyElm);\n        return clientX >= 0 && clientY >= 0 && clientX <= clientWidth && clientY <= clientHeight;\n    };\n    const transpose = (inline, elm, clientX, clientY) => {\n        const clientRect = getBoundingClientRect(elm);\n        const deltaX = inline ? clientRect.left + elm.dom.clientLeft + getMarginLeft(elm) : 0;\n        const deltaY = inline ? clientRect.top + elm.dom.clientTop + getMarginTop(elm) : 0;\n        const x = clientX - deltaX;\n        const y = clientY - deltaY;\n        return { x, y };\n    };\n    // Checks if the specified coordinate is within the visual content area excluding the scrollbars\n    const isXYInContentArea = (editor, clientX, clientY) => {\n        const bodyElm = SugarElement.fromDom(editor.getBody());\n        const targetElm = editor.inline ? bodyElm : documentElement(bodyElm);\n        const transposedPoint = transpose(editor.inline, targetElm, clientX, clientY);\n        return isInsideElementContentArea(targetElm, transposedPoint.x, transposedPoint.y);\n    };\n    const fromDomSafe = (node) => Optional.from(node).map(SugarElement.fromDom);\n    const isEditorAttachedToDom = (editor) => {\n        const rawContainer = editor.inline ? editor.getBody() : editor.getContentAreaContainer();\n        return fromDomSafe(rawContainer).map(inBody).getOr(false);\n    };\n\n    var NotificationManagerImpl = () => {\n        const unimplemented = () => {\n            throw new Error('Theme did not provide a NotificationManager implementation.');\n        };\n        return {\n            open: unimplemented,\n            close: unimplemented,\n            getArgs: unimplemented\n        };\n    };\n\n    /**\n     * This class handles the creation of TinyMCE's notifications.\n     *\n     * @class tinymce.NotificationManager\n     * @example\n     * // Opens a new notification of type \"error\" with text \"An error occurred.\"\n     * tinymce.activeEditor.notificationManager.open({\n     *   text: 'An error occurred.',\n     *   type: 'error'\n     * });\n     */\n    const NotificationManager = (editor) => {\n        const notifications = [];\n        const getImplementation = () => {\n            const theme = editor.theme;\n            return theme && theme.getNotificationManagerImpl ? theme.getNotificationManagerImpl() : NotificationManagerImpl();\n        };\n        const getTopNotification = () => {\n            return Optional.from(notifications[0]);\n        };\n        const isEqual = (a, b) => {\n            return a.type === b.type && a.text === b.text && !a.progressBar && !a.timeout && !b.progressBar && !b.timeout;\n        };\n        const reposition = () => {\n            getTopNotification().each((notification) => {\n                notification.reposition();\n            });\n        };\n        const addNotification = (notification) => {\n            notifications.push(notification);\n        };\n        const closeNotification = (notification) => {\n            findIndex$2(notifications, (otherNotification) => {\n                return otherNotification === notification;\n            }).each((index) => {\n                // Mutate here since third party might have stored away the window array\n                // TODO: Consider breaking this api\n                notifications.splice(index, 1);\n            });\n        };\n        const open = (spec, fireEvent = true) => {\n            // Never open notification if editor has been removed.\n            if (editor.removed || !isEditorAttachedToDom(editor)) {\n                return {};\n            }\n            // fire event to allow notification spec to be mutated before display\n            if (fireEvent) {\n                editor.dispatch('BeforeOpenNotification', { notification: spec });\n            }\n            return find$2(notifications, (notification) => {\n                return isEqual(getImplementation().getArgs(notification), spec);\n            }).getOrThunk(() => {\n                editor.editorManager.setActive(editor);\n                const notification = getImplementation().open(spec, () => {\n                    closeNotification(notification);\n                }, () => hasEditorOrUiFocus(editor));\n                addNotification(notification);\n                reposition();\n                // Ensure notification is not passed by reference to prevent mutation\n                editor.dispatch('OpenNotification', { notification: { ...notification } });\n                return notification;\n            });\n        };\n        const close = () => {\n            getTopNotification().each((notification) => {\n                getImplementation().close(notification);\n                closeNotification(notification);\n                reposition();\n            });\n        };\n        const getNotifications = constant(notifications);\n        const registerEvents = (editor) => {\n            editor.on('SkinLoaded', () => {\n                const serviceMessage = getServiceMessage(editor);\n                if (serviceMessage) {\n                    // Ensure we pass false for fireEvent so that service message cannot be altered.\n                    open({\n                        text: serviceMessage,\n                        type: 'warning',\n                        timeout: 0\n                    }, false);\n                }\n                // Ensure the notifications are repositioned once the skin has loaded, as otherwise\n                // any notifications rendered before then may have wrapped and been in the wrong place\n                reposition();\n            });\n            // NodeChange is needed for inline mode and autoresize as the positioning is done\n            // from the bottom up, which changes when the content in the editor changes.\n            editor.on('show ResizeEditor ResizeWindow NodeChange ToggleView FullscreenStateChanged', () => {\n                requestAnimationFrame(reposition);\n            });\n            editor.on('remove', () => {\n                each$e(notifications.slice(), (notification) => {\n                    getImplementation().close(notification);\n                });\n            });\n            editor.on('keydown', (e) => {\n                // TODO: TINY-11429 Remove this once we remove the use of keycodes\n                const isF12 = e.key?.toLowerCase() === 'f12' || e.keyCode === 123;\n                if (e.altKey && isF12) {\n                    e.preventDefault();\n                    getTopNotification()\n                        .map((notificationApi) => SugarElement.fromDom(notificationApi.getEl()))\n                        .each((elm) => focus$1(elm));\n                }\n            });\n        };\n        registerEvents(editor);\n        return {\n            /**\n             * Opens a new notification.\n             *\n             * @method open\n             * @param {Object} args A <code>name: value</code> collection containing settings such as: <code>timeout</code>, <code>type</code>, and message (<code>text</code>).\n             * <br /><br />\n             * For information on the available settings, see: <a href=\"https://www.tiny.cloud/docs/tinymce/8/creating-custom-notifications/\">Create custom notifications</a>.\n             */\n            open,\n            /**\n             * Closes the top most notification.\n             *\n             * @method close\n             */\n            close,\n            /**\n             * Returns the currently opened notification objects.\n             *\n             * @method getNotifications\n             * @return {Array} Array of the currently opened notifications.\n             */\n            getNotifications\n        };\n    };\n\n    const PluginManager = AddOnManager.PluginManager;\n\n    const ThemeManager = AddOnManager.ThemeManager;\n\n    var WindowManagerImpl = () => {\n        const unimplemented = () => {\n            throw new Error('Theme did not provide a WindowManager implementation.');\n        };\n        return {\n            open: unimplemented,\n            openUrl: unimplemented,\n            alert: unimplemented,\n            confirm: unimplemented,\n            close: unimplemented\n        };\n    };\n\n    const WindowManager = (editor) => {\n        let dialogs = [];\n        const getImplementation = () => {\n            const theme = editor.theme;\n            return theme && theme.getWindowManagerImpl ? theme.getWindowManagerImpl() : WindowManagerImpl();\n        };\n        const funcBind = (scope, f) => {\n            return (...args) => {\n                return f ? f.apply(scope, args) : undefined;\n            };\n        };\n        const fireOpenEvent = (dialog) => {\n            editor.dispatch('OpenWindow', {\n                dialog\n            });\n        };\n        const fireCloseEvent = (dialog) => {\n            editor.dispatch('CloseWindow', {\n                dialog\n            });\n        };\n        const addDialog = (dialog, triggerElement) => {\n            dialogs.push({ instanceApi: dialog, triggerElement });\n            fireOpenEvent(dialog);\n        };\n        const closeDialog = (dialog) => {\n            fireCloseEvent(dialog);\n            const dialogTriggerElement = findMap(dialogs, ({ instanceApi, triggerElement }) => instanceApi === dialog ? triggerElement : Optional.none());\n            dialogs = filter$5(dialogs, ({ instanceApi }) => instanceApi !== dialog);\n            // Move focus back to editor when the last window is closed\n            if (dialogs.length === 0) {\n                editor.focus();\n            }\n            else {\n                // Move focus to the element that was active before the dialog was opened\n                dialogTriggerElement.filter(inBody).each(focus$1);\n            }\n        };\n        const getTopDialog = () => {\n            return Optional.from(dialogs[dialogs.length - 1]);\n        };\n        const storeSelectionAndOpenDialog = (openDialog) => {\n            editor.editorManager.setActive(editor);\n            store(editor);\n            const activeEl = active();\n            editor.ui.show();\n            const dialog = openDialog();\n            addDialog(dialog, activeEl);\n            return dialog;\n        };\n        const open = (args, params) => {\n            return storeSelectionAndOpenDialog(() => getImplementation().open(args, params, closeDialog));\n        };\n        const openUrl = (args) => {\n            return storeSelectionAndOpenDialog(() => getImplementation().openUrl(args, closeDialog));\n        };\n        const restoreFocus = (activeEl) => {\n            if (dialogs.length !== 0) {\n                // If there are some dialogs, the confirm/alert was probably triggered from the dialog\n                // Move focus to the element that was active before the confirm/alert was opened\n                activeEl.each((el) => focus$1(el));\n            }\n        };\n        const alert = (message, callback, scope) => {\n            const activeEl = active();\n            const windowManagerImpl = getImplementation();\n            windowManagerImpl.alert(message, funcBind(scope ? scope : windowManagerImpl, () => {\n                restoreFocus(activeEl);\n                callback?.();\n            }));\n        };\n        const confirm = (message, callback, scope) => {\n            const activeEl = active();\n            const windowManagerImpl = getImplementation();\n            windowManagerImpl.confirm(message, funcBind(scope ? scope : windowManagerImpl, (state) => {\n                restoreFocus(activeEl);\n                callback?.(state);\n            }));\n        };\n        const close = () => {\n            getTopDialog().each(({ instanceApi: dialog }) => {\n                getImplementation().close(dialog);\n                closeDialog(dialog);\n            });\n        };\n        editor.on('remove', () => {\n            each$e(dialogs, ({ instanceApi: dialog }) => {\n                getImplementation().close(dialog);\n            });\n        });\n        return {\n            /**\n             * Opens a new window.\n             *\n             * @method open\n             * @param {Object} config For information on the available options, see: <a href=\"https://www.tiny.cloud/docs/tinymce/8/dialog-configuration/#options\">Dialog - Configuration options</a>.\n             * @param {Object} params (Optional) For information on the available options, see: <a href=\"https://www.tiny.cloud/docs/tinymce/8/dialog-configuration/#configuration-parameters\">Dialog - Configuration parameters</a>.\n             * @returns {WindowManager.DialogInstanceApi} A new dialog instance.\n             */\n            open,\n            /**\n             * Opens a new window for the specified url.\n             *\n             * @method openUrl\n             * @param {Object} config For information on the available options, see: <a href=\"https://www.tiny.cloud/docs/tinymce/8/urldialog/#configuration\">URL dialog - Configuration</a>.\n             * @returns {WindowManager.UrlDialogInstanceApi} A new URL dialog instance.\n             */\n            openUrl,\n            /**\n             * Creates an alert dialog. Do not use the blocking behavior of this\n             * native version. Use the callback method instead; then it can be extended.\n             *\n             * @method alert\n             * @param {String} message Text to display in the new alert dialog.\n             * @param {Function} callback (Optional) Callback function to be executed after the user has selected ok.\n             * @param {Object} scope (Optional) Scope to execute the callback in.\n             * @example\n             * // Displays an alert box using the active editors window manager instance\n             * tinymce.activeEditor.windowManager.alert('Hello world!');\n             */\n            alert,\n            /**\n             * Creates an alert dialog. Do not use the blocking behavior of this\n             * native version. Use the callback method instead; then it can be extended.\n             *\n             * @method confirm\n             * @param {String} message Text to display in the new confirm dialog.\n             * @param {Function} callback (Optional) Callback function to be executed after the user has selected ok or cancel.\n             * @param {Object} scope (Optional) Scope to execute the callback in.\n             * @example\n             * // Displays a confirm box and an alert message will be displayed depending on what you choose in the confirm\n             * tinymce.activeEditor.windowManager.confirm('Do you want to do something?', (state) => {\n             *   const message = state ? 'Ok' : 'Cancel';\n             *   tinymce.activeEditor.windowManager.alert(message);\n             * });\n             */\n            confirm,\n            /**\n             * Closes the top most window.\n             *\n             * @method close\n             */\n            close\n        };\n    };\n\n    const displayNotification$1 = (editor, message) => {\n        editor.notificationManager.open({\n            type: 'error',\n            text: message\n        });\n    };\n    const displayError = (editor, message) => {\n        if (editor._skinLoaded) {\n            displayNotification$1(editor, message);\n        }\n        else {\n            editor.on('SkinLoaded', () => {\n                displayNotification$1(editor, message);\n            });\n        }\n    };\n    const uploadError = (editor, message) => {\n        displayError(editor, I18n.translate(['Failed to upload image: {0}', message]));\n    };\n    const logError = (editor, errorType, msg) => {\n        fireError(editor, errorType, { message: msg });\n        // eslint-disable-next-line no-console\n        console.error(msg);\n    };\n    const createLoadError = (type, url, name) => name ?\n        `Failed to load ${type}: ${name} from url ${url}` :\n        `Failed to load ${type} url: ${url}`;\n    const pluginLoadError = (editor, url, name) => {\n        logError(editor, 'PluginLoadError', createLoadError('plugin', url, name));\n    };\n    const iconsLoadError = (editor, url, name) => {\n        logError(editor, 'IconsLoadError', createLoadError('icons', url, name));\n    };\n    const languageLoadError = (editor, url, name) => {\n        logError(editor, 'LanguageLoadError', createLoadError('language', url, name));\n    };\n    const themeLoadError = (editor, url, name) => {\n        logError(editor, 'ThemeLoadError', createLoadError('theme', url, name));\n    };\n    const modelLoadError = (editor, url, name) => {\n        logError(editor, 'ModelLoadError', createLoadError('model', url, name));\n    };\n    const licenseKeyManagerLoadError = (editor, url) => {\n        logError(editor, 'LicenseKeyManagerLoadError', createLoadError('license key manager', url));\n    };\n    const componentLoadError = (editor, url) => {\n        logError(editor, 'ComponentLoadError', createLoadError('component', url));\n    };\n    const pluginInitError = (editor, name, err) => {\n        const message = I18n.translate(['Failed to initialize plugin: {0}', name]);\n        fireError(editor, 'PluginLoadError', { message });\n        initError(message, err);\n        displayError(editor, message);\n    };\n    const initError = (message, ...x) => {\n        const console = window.console;\n        if (console) { // Skip test env\n            if (console.error) {\n                console.error(message, ...x);\n            }\n            else {\n                console.log(message, ...x);\n            }\n        }\n    };\n\n    // Map to track which editors have already been processed and disabled\n    const processedEditors = new WeakMap();\n    const forceDisable = (editor) => {\n        // Check if we've already disabled the editor\n        if (processedEditors.has(editor)) {\n            return;\n        }\n        // Mark this editor as processed\n        processedEditors.set(editor, true);\n        const switchModeListener = () => {\n            editor.on('SwitchMode', (e) => {\n                const { mode } = e;\n                if (mode !== 'readonly') {\n                    editor.mode.set('readonly');\n                }\n            });\n        };\n        const disabledStateChangeListener = () => {\n            editor.on('DisabledStateChange', (e) => {\n                const { state } = e;\n                if (!state) {\n                    e.preventDefault();\n                }\n            }, true);\n        };\n        if (editor.initialized) {\n            // Set readonly before setting disabled as disabling editor prevents mode from being changed\n            if (!editor.removed) {\n                editor.mode.set('readonly');\n            }\n            editor.options.set('disabled', true);\n        }\n        else {\n            editor.on('init', () => {\n                // Set readonly before setting disabled as disabling editor prevents mode from being changed\n                if (!editor.removed) {\n                    editor.mode.set('readonly');\n                }\n                editor.options.set('disabled', true);\n            });\n        }\n        disabledStateChangeListener();\n        switchModeListener();\n    };\n\n    /* eslint-disable no-console */\n    const displayNotification = (editor, messageData) => {\n        const { type, message } = messageData;\n        editor.notificationManager.open({\n            type,\n            text: message\n        });\n    };\n    const getConsoleFn = (type) => {\n        switch (type) {\n            case 'error':\n                return console.error;\n            case 'info':\n                return console.info;\n            case 'warn':\n                return console.warn;\n            case 'log':\n            default:\n                return console.log;\n        }\n    };\n    const displayConsoleMessage = (messageData) => {\n        const consoleFn = getConsoleFn(messageData.type);\n        consoleFn(messageData.message);\n    };\n    const reportMessage = (editor, message) => {\n        const { console, editor: editorUi } = message;\n        if (isNonNullable(editorUi)) {\n            if (editor._skinLoaded) {\n                displayNotification(editor, editorUi);\n            }\n            else {\n                editor.on('SkinLoaded', () => {\n                    displayNotification(editor, editorUi);\n                });\n            }\n        }\n        if (isNonNullable(console)) {\n            displayConsoleMessage(console);\n        }\n    };\n\n    const DOCS_URL = 'https://www.tiny.cloud/docs/tinymce/latest/license-key/';\n    const DOCS_URL_MESSAGE = `Read more: ${DOCS_URL}`;\n    const PROVIDE_LICENSE_KEY_MESSAGE = `Make sure to provide a valid license key or add license_key: 'gpl' to the init config to agree to the open source license terms.`;\n    const reportNoKeyError = (editor) => {\n        const baseMessage = 'The editor is disabled because a TinyMCE license key has not been provided.';\n        reportMessage(editor, {\n            console: {\n                type: 'error',\n                message: [\n                    `${baseMessage}`,\n                    PROVIDE_LICENSE_KEY_MESSAGE,\n                    DOCS_URL_MESSAGE\n                ].join(' ')\n            },\n            editor: {\n                type: 'warning',\n                message: `${baseMessage}`\n            }\n        });\n    };\n    const reportLoadError = (editor, onlineStatus) => {\n        const key = `${onlineStatus === 'online' ? 'API' : 'license'} key`;\n        const baseMessage = `The editor is disabled because the TinyMCE ${key} could not be validated.`;\n        reportMessage(editor, {\n            console: {\n                type: 'error',\n                message: [\n                    `${baseMessage}`,\n                    `The TinyMCE Commercial License Key Manager plugin is required for the provided ${key} to be validated but could not be loaded.`,\n                    DOCS_URL_MESSAGE\n                ].join(' ')\n            },\n            editor: {\n                type: 'warning',\n                message: `${baseMessage}`\n            }\n        });\n    };\n    const reportInvalidPlugin = (editor, pluginCode, hasShownPluginNotification) => {\n        const baseMessage = `The \"${pluginCode}\" plugin requires a valid TinyMCE license key.`;\n        reportMessage(editor, {\n            console: {\n                type: 'error',\n                message: [\n                    `${baseMessage}`,\n                    DOCS_URL_MESSAGE\n                ].join(' ')\n            },\n            ...hasShownPluginNotification ? {} : {\n                editor: {\n                    type: 'warning',\n                    message: `One or more premium plugins are disabled due to license key restrictions.`\n                }\n            }\n        });\n    };\n\n    const PLUGIN_CODE$1 = 'licensekeymanager';\n    const getOnlineStatus = (editor) => {\n        const hasApiKey = isString(getApiKey(editor));\n        return hasApiKey ? 'online' : 'offline';\n    };\n    const getLicenseKeyType = (editor) => {\n        const licenseKey = getLicenseKey(editor)?.toLowerCase();\n        if (licenseKey === 'gpl') {\n            return 'gpl';\n        }\n        else if (isNullable(licenseKey)) {\n            return 'no_key';\n        }\n        else {\n            return 'non_gpl';\n        }\n    };\n    const determineStrategy = (editor) => {\n        const onlineStatus = getOnlineStatus(editor);\n        const licenseKeyType = getLicenseKeyType(editor);\n        const forcePlugin = new Set([\n            ...getPlugins(editor),\n            ...keys(getExternalPlugins$1(editor)),\n        ]).has(PLUGIN_CODE$1);\n        if (licenseKeyType !== 'gpl' || onlineStatus === 'online' || forcePlugin) {\n            return {\n                type: 'use_plugin',\n                onlineStatus,\n                licenseKeyType,\n                forcePlugin\n            };\n        }\n        else {\n            return {\n                type: 'use_gpl',\n                onlineStatus,\n                licenseKeyType,\n                forcePlugin\n            };\n        }\n    };\n\n    const createFallbackLicenseKeyManager = (canValidate) => (editor) => {\n        let hasShownPluginNotification = false;\n        return {\n            validate: (data) => {\n                const { plugin } = data;\n                const hasPlugin = isString(plugin);\n                // Premium plugins are not allowed\n                if (hasPlugin) {\n                    reportInvalidPlugin(editor, plugin, hasShownPluginNotification);\n                    hasShownPluginNotification = true;\n                }\n                return Promise.resolve(canValidate && !hasPlugin);\n            },\n        };\n    };\n    const NoLicenseKeyManager = createFallbackLicenseKeyManager(false);\n    const GplLicenseKeyManager = createFallbackLicenseKeyManager(true);\n    const ADDON_KEY = 'manager';\n    const PLUGIN_CODE = PLUGIN_CODE$1;\n    const setup$y = () => {\n        const addOnManager = AddOnManager();\n        const add = (addOn) => {\n            addOnManager.add(ADDON_KEY, addOn);\n        };\n        const load = (editor, suffix) => {\n            const strategy = determineStrategy(editor);\n            if (strategy.type === 'use_plugin') {\n                const externalUrl = get$b(getExternalPlugins$1(editor), PLUGIN_CODE).map(trim$4).filter(isNotEmpty);\n                const url = externalUrl.getOr(`plugins/${PLUGIN_CODE}/plugin${suffix}.js`);\n                addOnManager.load(ADDON_KEY, url).catch(() => {\n                    licenseKeyManagerLoadError(editor, url);\n                });\n            }\n        };\n        const init = (editor) => {\n            const setLicenseKeyManager = (licenseKeyManager) => {\n                Object.defineProperty(editor, 'licenseKeyManager', {\n                    value: licenseKeyManager,\n                    writable: false,\n                    configurable: false,\n                    enumerable: true,\n                });\n            };\n            const strategy = determineStrategy(editor);\n            const LicenseKeyManager = addOnManager.get(ADDON_KEY);\n            // Use plugin if it is already loaded as it can handle all license key types\n            if (isNonNullable(LicenseKeyManager)) {\n                const licenseKeyManagerApi = LicenseKeyManager(editor, addOnManager.urls[ADDON_KEY]);\n                setLicenseKeyManager(licenseKeyManagerApi);\n            }\n            else {\n                switch (strategy.type) {\n                    case 'use_gpl': {\n                        setLicenseKeyManager(GplLicenseKeyManager(editor));\n                        break;\n                    }\n                    case 'use_plugin': {\n                        // We know the plugin hasn't loaded and it is required\n                        forceDisable(editor);\n                        setLicenseKeyManager(NoLicenseKeyManager(editor));\n                        if (strategy.onlineStatus === 'offline' && strategy.licenseKeyType === 'no_key') {\n                            reportNoKeyError(editor);\n                        }\n                        else {\n                            reportLoadError(editor, strategy.onlineStatus);\n                        }\n                        break;\n                    }\n                }\n            }\n            // Validation of the license key is done asynchronously and does\n            // not block initialization of the editor\n            // The validate function is expected to set the editor to the correct\n            // state depending on if the license key is valid or not\n            // eslint-disable-next-line @typescript-eslint/no-floating-promises\n            editor.licenseKeyManager.validate({});\n        };\n        return {\n            load,\n            add,\n            init\n        };\n    };\n    const LicenseKeyManagerLoader = setup$y();\n\n    const removeFakeSelection = (editor) => {\n        Optional.from(editor.selection.getNode()).each((elm) => {\n            elm.removeAttribute('data-mce-selected');\n        });\n    };\n    const setEditorCommandState = (editor, cmd, state) => {\n        try {\n            // execCommand needs a string for the value, so convert the boolean to a string\n            // See: https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand#Parameters\n            editor.getDoc().execCommand(cmd, false, String(state));\n        }\n        catch {\n            // Ignore\n        }\n    };\n    const setCommonEditorCommands = (editor, state) => {\n        setEditorCommandState(editor, 'StyleWithCSS', state);\n        setEditorCommandState(editor, 'enableInlineTableEditing', state);\n        setEditorCommandState(editor, 'enableObjectResizing', state);\n    };\n    const restoreFakeSelection = (editor) => {\n        editor.selection.setRng(editor.selection.getRng());\n    };\n    // Not quite sugar Class.toggle, it's more of a Class.set\n    const toggleClass = (elm, cls, state) => {\n        if (has(elm, cls) && !state) {\n            remove$4(elm, cls);\n        }\n        else if (state) {\n            add$2(elm, cls);\n        }\n    };\n    const disableEditor = (editor) => {\n        const body = SugarElement.fromDom(editor.getBody());\n        toggleClass(body, 'mce-content-readonly', true);\n        editor.selection.controlSelection.hideResizeRect();\n        editor._selectionOverrides.hideFakeCaret();\n        removeFakeSelection(editor);\n    };\n    const enableEditor = (editor) => {\n        const body = SugarElement.fromDom(editor.getBody());\n        toggleClass(body, 'mce-content-readonly', false);\n        if (editor.hasEditableRoot()) {\n            set$1(body, true);\n        }\n        setCommonEditorCommands(editor, false);\n        if (hasEditorOrUiFocus(editor)) {\n            editor.focus();\n        }\n        restoreFakeSelection(editor);\n        editor.nodeChanged();\n    };\n\n    const isDisabled = (editor) => isDisabled$1(editor);\n    const internalContentEditableAttr = 'data-mce-contenteditable';\n    const switchOffContentEditableTrue = (elm) => {\n        each$e(descendants(elm, '*[contenteditable=\"true\"]'), (elm) => {\n            set$5(elm, internalContentEditableAttr, 'true');\n            set$1(elm, false);\n        });\n    };\n    const switchOnContentEditableTrue = (elm) => {\n        each$e(descendants(elm, `*[${internalContentEditableAttr}=\"true\"]`), (elm) => {\n            remove$9(elm, internalContentEditableAttr);\n            set$1(elm, true);\n        });\n    };\n    const toggleDisabled = (editor, state) => {\n        const body = SugarElement.fromDom(editor.getBody());\n        if (state) {\n            disableEditor(editor);\n            set$1(body, false);\n            switchOffContentEditableTrue(body);\n        }\n        else {\n            switchOnContentEditableTrue(body);\n            enableEditor(editor);\n        }\n    };\n    const registerDisabledContentFilters = (editor) => {\n        if (editor.serializer) {\n            registerFilters(editor);\n        }\n        else {\n            editor.on('PreInit', () => {\n                registerFilters(editor);\n            });\n        }\n    };\n    const registerFilters = (editor) => {\n        editor.parser.addAttributeFilter('contenteditable', (nodes) => {\n            if (isDisabled(editor)) {\n                each$e(nodes, (node) => {\n                    node.attr(internalContentEditableAttr, node.attr('contenteditable'));\n                    node.attr('contenteditable', 'false');\n                });\n            }\n        });\n        editor.serializer.addAttributeFilter(internalContentEditableAttr, (nodes) => {\n            if (isDisabled(editor)) {\n                each$e(nodes, (node) => {\n                    node.attr('contenteditable', node.attr(internalContentEditableAttr));\n                });\n            }\n        });\n        editor.serializer.addTempAttr(internalContentEditableAttr);\n    };\n    const isClickEvent = (e) => e.type === 'click';\n    const allowedEvents = ['copy'];\n    const isAllowedEventInDisabledMode = (e) => contains$2(allowedEvents, e.type);\n    const getAnchorHrefOpt = (editor, elm) => {\n        const isRoot = (elm) => eq(elm, SugarElement.fromDom(editor.getBody()));\n        return closest$4(elm, 'a', isRoot).bind((a) => getOpt(a, 'href'));\n    };\n    const hasAccordion = (editor, elm) => {\n        const isRoot = (elm) => eq(elm, SugarElement.fromDom(editor.getBody()));\n        return closest$2(elm, 'details', isRoot);\n    };\n    const processDisabledEvents = (editor, e) => {\n        /*\n          If an event is a click event on or within an anchor, and the CMD/CTRL key is\n          not held, then we want to prevent default behaviour and either:\n            a) scroll to the relevant bookmark\n            b) open the link using default browser behaviour\n        */\n        if (isClickEvent(e) && !VK.metaKeyPressed(e)) {\n            const elm = SugarElement.fromDom(e.target);\n            getAnchorHrefOpt(editor, elm).fold(() => {\n                if (hasAccordion(editor, elm)) {\n                    e.preventDefault();\n                }\n            }, (href) => {\n                e.preventDefault();\n                if (/^#/.test(href)) {\n                    const id = removeLeading(href, '#');\n                    const targetEl = editor.dom.select(`[id=\"${id}\"],[name=\"${id}\"]`);\n                    if (targetEl.length) {\n                        editor.selection.scrollIntoView(targetEl[0], true);\n                    }\n                }\n                else {\n                    window.open(href, '_blank', 'rel=noopener noreferrer,menubar=yes,toolbar=yes,location=yes,status=yes,resizable=yes,scrollbars=yes');\n                }\n            });\n        }\n        else if (isAllowedEventInDisabledMode(e)) {\n            editor.dispatch(e.type, e);\n        }\n    };\n    const registerDisabledModeEventHandlers = (editor) => {\n        editor.on('ShowCaret ObjectSelected', (e) => {\n            if (isDisabled(editor)) {\n                e.preventDefault();\n            }\n        });\n        // Preprend to the handlers as this should be the first to fire\n        editor.on('DisabledStateChange', (e) => {\n            if (!e.isDefaultPrevented()) {\n                toggleDisabled(editor, e.state);\n            }\n        });\n    };\n    const registerEventsAndFilters$1 = (editor) => {\n        registerDisabledContentFilters(editor);\n        registerDisabledModeEventHandlers(editor);\n    };\n\n    const isContentCssSkinName = (url) => /^[a-z0-9\\-]+$/i.test(url);\n    const toContentSkinResourceName = (name) => 'content/' + name + '/content.css';\n    const isBundledCssSkinName = (name) => tinymce.Resource.has(toContentSkinResourceName(name));\n    const getContentCssUrls = (editor) => {\n        return transformToUrls(editor, getContentCss(editor));\n    };\n    const getFontCssUrls = (editor) => {\n        return transformToUrls(editor, getFontCss(editor));\n    };\n    const transformToUrls = (editor, cssLinks) => {\n        const skinUrl = editor.editorManager.baseURL + '/skins/content';\n        const suffix = editor.editorManager.suffix;\n        const contentCssFile = `content${suffix}.css`;\n        return map$3(cssLinks, (url) => {\n            if (isBundledCssSkinName(url)) {\n                return toContentSkinResourceName(url);\n            }\n            else if (isContentCssSkinName(url) && !editor.inline) {\n                return `${skinUrl}/${url}/${contentCssFile}`;\n            }\n            else {\n                return editor.documentBaseURI.toAbsolute(url);\n            }\n        });\n    };\n    const appendContentCssFromSettings = (editor) => {\n        editor.contentCSS = editor.contentCSS.concat(getContentCssUrls(editor), getFontCssUrls(editor));\n    };\n\n    /**\n     * Finds images with data uris or blob uris. If data uris are found it will convert them into blob uris.\n     *\n     * @private\n     * @class tinymce.file.ImageScanner\n     */\n    const getAllImages = (elm) => {\n        return elm ? from(elm.getElementsByTagName('img')) : [];\n    };\n    const ImageScanner = (uploadStatus, blobCache) => {\n        const cachedPromises = {};\n        const findAll = (elm, predicate = always) => {\n            const images = filter$5(getAllImages(elm), (img) => {\n                const src = img.src;\n                if (img.hasAttribute('data-mce-bogus')) {\n                    return false;\n                }\n                if (img.hasAttribute('data-mce-placeholder')) {\n                    return false;\n                }\n                if (!src || src === Env.transparentSrc) {\n                    return false;\n                }\n                if (startsWith(src, 'blob:')) {\n                    return !uploadStatus.isUploaded(src) && predicate(img);\n                }\n                if (startsWith(src, 'data:')) {\n                    return predicate(img);\n                }\n                return false;\n            });\n            const promises = map$3(images, (img) => {\n                const imageSrc = img.src;\n                if (has$2(cachedPromises, imageSrc)) {\n                    // Since the cached promise will return the cached image\n                    // We need to wrap it and resolve with the actual image\n                    return cachedPromises[imageSrc].then((imageInfo) => {\n                        if (isString(imageInfo)) { // error apparently\n                            return imageInfo;\n                        }\n                        else {\n                            return {\n                                image: img,\n                                blobInfo: imageInfo.blobInfo\n                            };\n                        }\n                    });\n                }\n                else {\n                    const newPromise = imageToBlobInfo(blobCache, imageSrc)\n                        .then((blobInfo) => {\n                        delete cachedPromises[imageSrc];\n                        return { image: img, blobInfo };\n                    }).catch((error) => {\n                        delete cachedPromises[imageSrc];\n                        return error;\n                    });\n                    cachedPromises[imageSrc] = newPromise;\n                    return newPromise;\n                }\n            });\n            return Promise.all(promises);\n        };\n        return {\n            findAll\n        };\n    };\n\n    /**\n     * Holds the current status of a blob uri, if it's pending or uploaded and what the result urls was.\n     *\n     * @private\n     * @class tinymce.file.UploadStatus\n     */\n    const UploadStatus = () => {\n        const PENDING = 1, UPLOADED = 2;\n        let blobUriStatuses = {};\n        const createStatus = (status, resultUri) => {\n            return {\n                status,\n                resultUri\n            };\n        };\n        const hasBlobUri = (blobUri) => {\n            return blobUri in blobUriStatuses;\n        };\n        const getResultUri = (blobUri) => {\n            const result = blobUriStatuses[blobUri];\n            return result ? result.resultUri : null;\n        };\n        const isPending = (blobUri) => {\n            return hasBlobUri(blobUri) ? blobUriStatuses[blobUri].status === PENDING : false;\n        };\n        const isUploaded = (blobUri) => {\n            return hasBlobUri(blobUri) ? blobUriStatuses[blobUri].status === UPLOADED : false;\n        };\n        const markPending = (blobUri) => {\n            blobUriStatuses[blobUri] = createStatus(PENDING, null);\n        };\n        const markUploaded = (blobUri, resultUri) => {\n            blobUriStatuses[blobUri] = createStatus(UPLOADED, resultUri);\n        };\n        const removeFailed = (blobUri) => {\n            delete blobUriStatuses[blobUri];\n        };\n        const destroy = () => {\n            blobUriStatuses = {};\n        };\n        return {\n            hasBlobUri,\n            getResultUri,\n            isPending,\n            isUploaded,\n            markPending,\n            markUploaded,\n            removeFailed,\n            destroy\n        };\n    };\n\n    /**\n     * Generates unique ids.\n     *\n     * @class tinymce.util.Uuid\n     * @private\n     */\n    let count = 0;\n    const seed = () => {\n        const rnd = () => {\n            return Math.round(random() * 0xFFFFFFFF).toString(36);\n        };\n        const now = new Date().getTime();\n        return 's' + now.toString(36) + rnd() + rnd() + rnd();\n    };\n    const uuid = (prefix) => {\n        return prefix + (count++) + seed();\n    };\n\n    const BlobCache = () => {\n        let cache = [];\n        const mimeToExt = (mime) => {\n            const mimes = {\n                'image/jpeg': 'jpg',\n                'image/jpg': 'jpg',\n                'image/gif': 'gif',\n                'image/png': 'png',\n                'image/apng': 'apng',\n                'image/avif': 'avif',\n                'image/svg+xml': 'svg',\n                'image/webp': 'webp',\n                'image/bmp': 'bmp',\n                'image/tiff': 'tiff'\n            };\n            return mimes[mime.toLowerCase()] || 'dat';\n        };\n        const create = (o, blob, base64, name, filename) => {\n            if (isString(o)) {\n                const id = o;\n                return toBlobInfo({\n                    id,\n                    name,\n                    filename,\n                    blob: blob,\n                    base64: base64\n                });\n            }\n            else if (isObject(o)) {\n                return toBlobInfo(o);\n            }\n            else {\n                throw new Error('Unknown input type');\n            }\n        };\n        const toBlobInfo = (o) => {\n            if (isNullable(o.blob) || isNullable(o.base64) || (o.base64 === '' && !o.allowEmptyFile)) {\n                throw new Error('blob and base64 representations of the image are required for BlobInfo to be created');\n            }\n            const id = o.id || uuid('blobid');\n            const name = o.name || id;\n            const blob = o.blob;\n            return {\n                id: constant(id),\n                name: constant(name),\n                filename: constant(o.filename || name + '.' + mimeToExt(blob.type)),\n                blob: constant(blob),\n                base64: constant(o.base64),\n                blobUri: constant(o.blobUri || URL.createObjectURL(blob)),\n                uri: constant(o.uri)\n            };\n        };\n        const add = (blobInfo) => {\n            if (!get(blobInfo.id())) {\n                cache.push(blobInfo);\n            }\n        };\n        const findFirst = (predicate) => find$2(cache, predicate).getOrUndefined();\n        const get = (id) => findFirst((cachedBlobInfo) => cachedBlobInfo.id() === id);\n        const getByUri = (blobUri) => findFirst((blobInfo) => blobInfo.blobUri() === blobUri);\n        const getByData = (base64, type) => findFirst((blobInfo) => blobInfo.base64() === base64 && blobInfo.blob().type === type);\n        const removeByUri = (blobUri) => {\n            cache = filter$5(cache, (blobInfo) => {\n                if (blobInfo.blobUri() === blobUri) {\n                    URL.revokeObjectURL(blobInfo.blobUri());\n                    return false;\n                }\n                return true;\n            });\n        };\n        const destroy = () => {\n            each$e(cache, (cachedBlobInfo) => {\n                URL.revokeObjectURL(cachedBlobInfo.blobUri());\n            });\n            cache = [];\n        };\n        return {\n            create,\n            add,\n            get,\n            getByUri,\n            getByData,\n            findFirst,\n            removeByUri,\n            destroy\n        };\n    };\n\n    const Uploader = (uploadStatus, settings) => {\n        const pendingPromises = {};\n        const pathJoin = (path1, path2) => {\n            if (path1) {\n                return path1.replace(/\\/$/, '') + '/' + path2.replace(/^\\//, '');\n            }\n            return path2;\n        };\n        const defaultHandler = (blobInfo, progress) => new Promise((success, failure) => {\n            const xhr = new XMLHttpRequest();\n            xhr.open('POST', settings.url);\n            xhr.withCredentials = settings.credentials;\n            xhr.upload.onprogress = (e) => {\n                progress(e.loaded / e.total * 100);\n            };\n            xhr.onerror = () => {\n                failure('Image upload failed due to a XHR Transport error. Code: ' + xhr.status);\n            };\n            xhr.onload = () => {\n                if (xhr.status < 200 || xhr.status >= 300) {\n                    failure('HTTP Error: ' + xhr.status);\n                    return;\n                }\n                const json = JSON.parse(xhr.responseText);\n                if (!json || !isString(json.location)) {\n                    failure('Invalid JSON: ' + xhr.responseText);\n                    return;\n                }\n                success(pathJoin(settings.basePath, json.location));\n            };\n            const formData = new FormData();\n            formData.append('file', blobInfo.blob(), blobInfo.filename());\n            xhr.send(formData);\n        });\n        const uploadHandler = isFunction(settings.handler) ? settings.handler : defaultHandler;\n        const noUpload = () => new Promise((resolve) => {\n            resolve([]);\n        });\n        const handlerSuccess = (blobInfo, url) => ({\n            url,\n            blobInfo,\n            status: true\n        });\n        const handlerFailure = (blobInfo, error) => ({\n            url: '',\n            blobInfo,\n            status: false,\n            error\n        });\n        const resolvePending = (blobUri, result) => {\n            Tools.each(pendingPromises[blobUri], (resolve) => {\n                resolve(result);\n            });\n            delete pendingPromises[blobUri];\n        };\n        const uploadBlobInfo = (blobInfo, handler, openNotification) => {\n            uploadStatus.markPending(blobInfo.blobUri());\n            return new Promise((resolve) => {\n                let notification;\n                let progress;\n                try {\n                    const closeNotification = () => {\n                        if (notification) {\n                            notification.close();\n                            progress = noop; // Once it's closed it's closed\n                        }\n                    };\n                    const success = (data) => {\n                        closeNotification();\n                        const url = isString(data) ? data : data.url;\n                        uploadStatus.markUploaded(blobInfo.blobUri(), url);\n                        resolvePending(blobInfo.blobUri(), handlerSuccess(blobInfo, url));\n                        resolve(handlerSuccess(blobInfo, url));\n                    };\n                    const failure = (error) => {\n                        closeNotification();\n                        uploadStatus.removeFailed(blobInfo.blobUri());\n                        resolvePending(blobInfo.blobUri(), handlerFailure(blobInfo, error));\n                        resolve(handlerFailure(blobInfo, error));\n                    };\n                    progress = (percent) => {\n                        if (percent < 0 || percent > 100) {\n                            return;\n                        }\n                        Optional.from(notification)\n                            .orThunk(() => Optional.from(openNotification).map(apply$1))\n                            .each((n) => {\n                            notification = n;\n                            n.progressBar.value(percent);\n                        });\n                    };\n                    handler(blobInfo, progress).then(success, (err) => {\n                        failure(isString(err) ? { message: err } : err);\n                    });\n                }\n                catch (ex) {\n                    resolve(handlerFailure(blobInfo, ex));\n                }\n            });\n        };\n        const isDefaultHandler = (handler) => handler === defaultHandler;\n        const pendingUploadBlobInfo = (blobInfo) => {\n            const blobUri = blobInfo.blobUri();\n            return new Promise((resolve) => {\n                pendingPromises[blobUri] = pendingPromises[blobUri] || [];\n                pendingPromises[blobUri].push(resolve);\n            });\n        };\n        const uploadBlobs = (blobInfos, openNotification) => {\n            blobInfos = Tools.grep(blobInfos, (blobInfo) => !uploadStatus.isUploaded(blobInfo.blobUri()));\n            return Promise.all(Tools.map(blobInfos, (blobInfo) => uploadStatus.isPending(blobInfo.blobUri()) ?\n                pendingUploadBlobInfo(blobInfo) : uploadBlobInfo(blobInfo, uploadHandler, openNotification)));\n        };\n        const upload = (blobInfos, openNotification) => (!settings.url && isDefaultHandler(uploadHandler)) ? noUpload() : uploadBlobs(blobInfos, openNotification);\n        return {\n            upload\n        };\n    };\n\n    const openNotification = (editor) => () => editor.notificationManager.open({\n        text: editor.translate('Image uploading...'),\n        type: 'info',\n        timeout: -1,\n        progressBar: true\n    });\n    const createUploader = (editor, uploadStatus) => Uploader(uploadStatus, {\n        url: getImageUploadUrl(editor),\n        basePath: getImageUploadBasePath(editor),\n        credentials: getImagesUploadCredentials(editor),\n        handler: getImagesUploadHandler(editor)\n    });\n    /**\n     * This class handles uploading images to a back-end server.\n     *\n     * @class tinymce.util.ImageUploader\n     */\n    const ImageUploader = (editor) => {\n        const uploadStatus = UploadStatus();\n        const uploader = createUploader(editor, uploadStatus);\n        return {\n            /**\n             * Uploads images to the configured image upload URL (`images_upload_url`) or passes the images to the defined image upload handler function (`images_upload_handler`).\n             *\n             * @method upload\n             * @param {Array} blobInfos  A BlobInfo array containing the image data to upload. A BlobInfo can be created by calling `editor.editorUpload.blobCache.create()`.\n             * @param {Boolean} showNotification (Optional) When set to true, a notification with a progress bar will be shown during image uploads.\n             */\n            upload: (blobInfos, showNotification = true) => uploader.upload(blobInfos, showNotification ? openNotification(editor) : undefined)\n        };\n    };\n\n    const isEmptyForPadding = (editor, element) => editor.dom.isEmpty(element.dom) && isNonNullable(editor.schema.getTextBlockElements()[name(element)]);\n    const addPaddingToEmpty = (editor) => (element) => {\n        if (isEmptyForPadding(editor, element)) {\n            append$1(element, SugarElement.fromHtml('<br data-mce-bogus=\"1\" />'));\n        }\n    };\n    const EditorUpload = (editor) => {\n        const blobCache = BlobCache();\n        let uploader, imageScanner;\n        const uploadStatus = UploadStatus();\n        const urlFilters = [];\n        const aliveGuard = (callback) => {\n            return (result) => {\n                if (editor.selection) {\n                    return callback(result);\n                }\n                return [];\n            };\n        };\n        const cacheInvalidator = (url) => url + (url.indexOf('?') === -1 ? '?' : '&') + (new Date()).getTime();\n        // Replaces strings without regexps to avoid FF regexp to big issue\n        const replaceString = (content, search, replace) => {\n            let index = 0;\n            do {\n                index = content.indexOf(search, index);\n                if (index !== -1) {\n                    content = content.substring(0, index) + replace + content.substr(index + search.length);\n                    index += replace.length - search.length + 1;\n                }\n            } while (index !== -1);\n            return content;\n        };\n        const replaceImageUrl = (content, targetUrl, replacementUrl) => {\n            const replacementString = `src=\"${replacementUrl}\"${replacementUrl === Env.transparentSrc ? ' data-mce-placeholder=\"1\"' : ''}`;\n            content = replaceString(content, `src=\"${targetUrl}\"`, replacementString);\n            content = replaceString(content, 'data-mce-src=\"' + targetUrl + '\"', 'data-mce-src=\"' + replacementUrl + '\"');\n            return content;\n        };\n        const replaceUrlInUndoStack = (targetUrl, replacementUrl) => {\n            each$e(editor.undoManager.data, (level) => {\n                if (level.type === 'fragmented') {\n                    level.fragments = map$3(level.fragments, (fragment) => replaceImageUrl(fragment, targetUrl, replacementUrl));\n                }\n                else {\n                    level.content = replaceImageUrl(level.content, targetUrl, replacementUrl);\n                }\n            });\n        };\n        const replaceImageUriInView = (image, resultUri) => {\n            const src = editor.convertURL(resultUri, 'src');\n            replaceUrlInUndoStack(image.src, resultUri);\n            setAll$1(SugarElement.fromDom(image), {\n                'src': shouldReuseFileName(editor) ? cacheInvalidator(resultUri) : resultUri,\n                'data-mce-src': src\n            });\n        };\n        const uploadImages = () => {\n            if (!uploader) {\n                uploader = createUploader(editor, uploadStatus);\n            }\n            return scanForImages().then(aliveGuard((imageInfos) => {\n                const blobInfos = map$3(imageInfos, (imageInfo) => imageInfo.blobInfo);\n                return uploader.upload(blobInfos, openNotification(editor)).then(aliveGuard((result) => {\n                    const imagesToRemove = [];\n                    let shouldDispatchChange = false;\n                    const filteredResult = map$3(result, (uploadInfo, index) => {\n                        const { blobInfo, image } = imageInfos[index];\n                        let removed = false;\n                        if (uploadInfo.status && shouldReplaceBlobUris(editor)) {\n                            if (uploadInfo.url && !contains$1(image.src, uploadInfo.url)) {\n                                shouldDispatchChange = true;\n                            }\n                            blobCache.removeByUri(image.src);\n                            if (isRtc(editor)) ;\n                            else {\n                                replaceImageUriInView(image, uploadInfo.url);\n                            }\n                        }\n                        else if (uploadInfo.error) {\n                            if (uploadInfo.error.remove) {\n                                replaceUrlInUndoStack(image.src, Env.transparentSrc);\n                                imagesToRemove.push(image);\n                                removed = true;\n                            }\n                            uploadError(editor, uploadInfo.error.message);\n                        }\n                        return {\n                            element: image,\n                            status: uploadInfo.status,\n                            uploadUri: uploadInfo.url,\n                            blobInfo,\n                            removed\n                        };\n                    });\n                    if (imagesToRemove.length > 0 && !isRtc(editor)) {\n                        editor.undoManager.transact(() => {\n                            each$e(fromDom$1(imagesToRemove), (sugarElement) => {\n                                const parentOpt = parent(sugarElement);\n                                remove$8(sugarElement);\n                                // This needs a more editor-wide fix, see issue TINY-9802. Short version: Removing the image resulted in empty <p> elements, which confused the editor.\n                                parentOpt.each(addPaddingToEmpty(editor));\n                                blobCache.removeByUri(sugarElement.dom.src);\n                            });\n                        });\n                    }\n                    else if (shouldDispatchChange) {\n                        editor.undoManager.dispatchChange();\n                    }\n                    return filteredResult;\n                }));\n            }));\n        };\n        const uploadImagesAuto = () => isAutomaticUploadsEnabled(editor) ? uploadImages() : Promise.resolve([]);\n        const isValidDataUriImage = (imgElm) => forall(urlFilters, (filter) => filter(imgElm));\n        const addFilter = (filter) => {\n            urlFilters.push(filter);\n        };\n        const scanForImages = () => {\n            if (!imageScanner) {\n                imageScanner = ImageScanner(uploadStatus, blobCache);\n            }\n            return imageScanner.findAll(editor.getBody(), isValidDataUriImage).then(aliveGuard((result) => {\n                const filteredResult = filter$5(result, (resultItem) => {\n                    // ImageScanner internally converts images that it finds, but it may fail to do so if image source is inaccessible.\n                    // In such case resultItem will contain appropriate text error message, instead of image data.\n                    if (isString(resultItem)) {\n                        displayError(editor, resultItem);\n                        return false;\n                    }\n                    else if (resultItem.uriType === 'blob') {\n                        return false;\n                    }\n                    else {\n                        return true;\n                    }\n                });\n                if (isRtc(editor)) ;\n                else {\n                    each$e(filteredResult, (resultItem) => {\n                        replaceUrlInUndoStack(resultItem.image.src, resultItem.blobInfo.blobUri());\n                        resultItem.image.src = resultItem.blobInfo.blobUri();\n                        resultItem.image.removeAttribute('data-mce-src');\n                    });\n                }\n                return filteredResult;\n            }));\n        };\n        const destroy = () => {\n            blobCache.destroy();\n            uploadStatus.destroy();\n            imageScanner = uploader = null;\n        };\n        const replaceBlobUris = (content) => {\n            return content.replace(/src=\"(blob:[^\"]+)\"/g, (match, blobUri) => {\n                const resultUri = uploadStatus.getResultUri(blobUri);\n                if (resultUri) {\n                    return 'src=\"' + resultUri + '\"';\n                }\n                let blobInfo = blobCache.getByUri(blobUri);\n                if (!blobInfo) {\n                    blobInfo = foldl(editor.editorManager.get(), (result, editor) => {\n                        return result || editor.editorUpload && editor.editorUpload.blobCache.getByUri(blobUri);\n                    }, undefined);\n                }\n                if (blobInfo) {\n                    const blob = blobInfo.blob();\n                    return 'src=\"data:' + blob.type + ';base64,' + blobInfo.base64() + '\"';\n                }\n                return match;\n            });\n        };\n        editor.on('SetContent', () => {\n            if (isAutomaticUploadsEnabled(editor)) {\n                // eslint-disable-next-line @typescript-eslint/no-floating-promises\n                uploadImagesAuto();\n            }\n            else {\n                // eslint-disable-next-line @typescript-eslint/no-floating-promises\n                scanForImages();\n            }\n        });\n        editor.on('RawSaveContent', (e) => {\n            e.content = replaceBlobUris(e.content);\n        });\n        editor.on('GetContent', (e) => {\n            if (e.source_view || e.format === 'raw' || e.format === 'tree') {\n                return;\n            }\n            e.content = replaceBlobUris(e.content);\n        });\n        editor.on('PostRender', () => {\n            editor.parser.addNodeFilter('img', (images) => {\n                each$e(images, (img) => {\n                    const src = img.attr('src');\n                    if (!src || blobCache.getByUri(src)) {\n                        return;\n                    }\n                    const resultUri = uploadStatus.getResultUri(src);\n                    if (resultUri) {\n                        img.attr('src', resultUri);\n                    }\n                });\n            });\n        });\n        return {\n            blobCache,\n            addFilter,\n            uploadImages,\n            uploadImagesAuto,\n            scanForImages,\n            destroy\n        };\n    };\n\n    const get$1 = (editor) => {\n        const dom = editor.dom;\n        const schemaType = editor.schema.type;\n        const formats = {\n            valigntop: [\n                { selector: 'td,th', styles: { verticalAlign: 'top' } }\n            ],\n            valignmiddle: [\n                { selector: 'td,th', styles: { verticalAlign: 'middle' } }\n            ],\n            valignbottom: [\n                { selector: 'td,th', styles: { verticalAlign: 'bottom' } }\n            ],\n            alignleft: [\n                {\n                    selector: 'figure.image',\n                    collapsed: false,\n                    classes: 'align-left',\n                    ceFalseOverride: true,\n                    preview: 'font-family font-size'\n                },\n                {\n                    selector: 'figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li,pre',\n                    styles: {\n                        textAlign: 'left'\n                    },\n                    inherit: false,\n                    preview: false\n                },\n                {\n                    selector: 'img,audio,video',\n                    collapsed: false,\n                    styles: {\n                        float: 'left',\n                    },\n                    preview: 'font-family font-size'\n                },\n                {\n                    selector: '.mce-placeholder',\n                    styles: {\n                        float: 'left',\n                    },\n                    ceFalseOverride: true\n                },\n                {\n                    selector: 'table',\n                    collapsed: false,\n                    styles: {\n                        marginLeft: '0px',\n                        marginRight: 'auto',\n                    },\n                    onformat: (table) => {\n                        // Remove conflicting float style\n                        dom.setStyle(table, 'float', null);\n                    },\n                    preview: 'font-family font-size'\n                },\n                {\n                    selector: '.mce-preview-object,[data-ephox-embed-iri],.tiny-pageembed',\n                    ceFalseOverride: true,\n                    styles: {\n                        float: 'left'\n                    }\n                }\n            ],\n            aligncenter: [\n                {\n                    selector: 'figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li,pre',\n                    styles: {\n                        textAlign: 'center'\n                    },\n                    inherit: false,\n                    preview: 'font-family font-size'\n                },\n                {\n                    selector: 'figure.image',\n                    collapsed: false,\n                    classes: 'align-center',\n                    ceFalseOverride: true,\n                    preview: 'font-family font-size'\n                },\n                {\n                    selector: 'img,audio,video',\n                    collapsed: false,\n                    styles: {\n                        display: 'block',\n                        marginLeft: 'auto',\n                        marginRight: 'auto'\n                    },\n                    preview: false\n                },\n                {\n                    selector: '.mce-placeholder',\n                    styles: {\n                        display: 'block',\n                        marginLeft: 'auto',\n                        marginRight: 'auto',\n                    },\n                    ceFalseOverride: true\n                },\n                {\n                    selector: 'table',\n                    collapsed: false,\n                    styles: {\n                        marginLeft: 'auto',\n                        marginRight: 'auto'\n                    },\n                    preview: 'font-family font-size'\n                },\n                {\n                    selector: '.mce-preview-object,.tiny-pageembed',\n                    ceFalseOverride: true,\n                    styles: {\n                        display: 'table', // Needs to be `table` to properly render while editing\n                        marginLeft: 'auto',\n                        marginRight: 'auto'\n                    },\n                    preview: false\n                },\n                {\n                    selector: '[data-ephox-embed-iri]',\n                    ceFalseOverride: true,\n                    styles: {\n                        marginLeft: 'auto',\n                        marginRight: 'auto'\n                    },\n                    preview: false\n                }\n            ],\n            alignright: [\n                {\n                    selector: 'figure.image',\n                    collapsed: false,\n                    classes: 'align-right',\n                    ceFalseOverride: true,\n                    preview: 'font-family font-size'\n                },\n                {\n                    selector: 'figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li,pre',\n                    styles: {\n                        textAlign: 'right'\n                    },\n                    inherit: false,\n                    preview: 'font-family font-size'\n                },\n                {\n                    selector: 'img,audio,video',\n                    collapsed: false,\n                    styles: {\n                        float: 'right'\n                    },\n                    preview: 'font-family font-size'\n                },\n                {\n                    selector: '.mce-placeholder',\n                    styles: {\n                        float: 'right'\n                    },\n                    ceFalseOverride: true\n                },\n                {\n                    selector: 'table',\n                    collapsed: false,\n                    styles: {\n                        marginRight: '0px',\n                        marginLeft: 'auto',\n                    },\n                    onformat: (table) => {\n                        // Remove conflicting float style\n                        dom.setStyle(table, 'float', null);\n                    },\n                    preview: 'font-family font-size'\n                },\n                {\n                    selector: '.mce-preview-object,[data-ephox-embed-iri],.tiny-pageembed',\n                    ceFalseOverride: true,\n                    styles: {\n                        float: 'right'\n                    },\n                    preview: false\n                }\n            ],\n            alignjustify: [\n                {\n                    selector: 'figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li,pre',\n                    styles: {\n                        textAlign: 'justify'\n                    },\n                    inherit: false,\n                    preview: 'font-family font-size'\n                }\n            ],\n            bold: [\n                { inline: 'strong', remove: 'all', preserve_attributes: ['class', 'style'] },\n                { inline: 'span', styles: { fontWeight: 'bold' } },\n                { inline: 'b', remove: 'all', preserve_attributes: ['class', 'style'] }\n            ],\n            italic: [\n                { inline: 'em', remove: 'all', preserve_attributes: ['class', 'style'] },\n                { inline: 'span', styles: { fontStyle: 'italic' } },\n                { inline: 'i', remove: 'all', preserve_attributes: ['class', 'style'] }\n            ],\n            underline: [\n                { inline: 'span', styles: { textDecoration: 'underline' }, exact: true },\n                { inline: 'u', remove: 'all', preserve_attributes: ['class', 'style'] }\n            ],\n            strikethrough: (() => {\n                const span = { inline: 'span', styles: { textDecoration: 'line-through' }, exact: true };\n                const strike = { inline: 'strike', remove: 'all', preserve_attributes: ['class', 'style'] };\n                const s = { inline: 's', remove: 'all', preserve_attributes: ['class', 'style'] };\n                return schemaType !== 'html4' ? [s, span, strike] : [span, s, strike];\n            })(),\n            forecolor: { inline: 'span', styles: { color: '%value' }, links: true, remove_similar: true, clear_child_styles: true },\n            hilitecolor: { inline: 'span', styles: { backgroundColor: '%value' }, links: true, remove_similar: true, clear_child_styles: true },\n            fontname: { inline: 'span', toggle: false, styles: { fontFamily: '%value' }, clear_child_styles: true },\n            fontsize: { inline: 'span', toggle: false, styles: { fontSize: '%value' }, clear_child_styles: true },\n            lineheight: { selector: 'h1,h2,h3,h4,h5,h6,p,li,td,th,div', styles: { lineHeight: '%value' }, remove_similar: true },\n            fontsize_class: { inline: 'span', attributes: { class: '%value' } },\n            blockquote: { block: 'blockquote', wrapper: true, remove: 'all' },\n            subscript: { inline: 'sub' },\n            superscript: { inline: 'sup' },\n            code: { inline: 'code' },\n            samp: { inline: 'samp' },\n            link: {\n                inline: 'a', selector: 'a', remove: 'all', split: true, deep: true,\n                onmatch: (node, _fmt, _itemName) => {\n                    return isElement$7(node) && node.hasAttribute('href');\n                },\n                onformat: (elm, _fmt, vars) => {\n                    Tools.each(vars, (value, key) => {\n                        dom.setAttrib(elm, key, value);\n                    });\n                }\n            },\n            lang: {\n                inline: 'span',\n                clear_child_styles: true,\n                remove_similar: true,\n                attributes: {\n                    'lang': '%value',\n                    'data-mce-lang': (vars) => vars?.customValue ?? null\n                }\n            },\n            removeformat: [\n                {\n                    selector: 'b,strong,em,i,font,u,strike,s,sub,sup,dfn,code,samp,kbd,var,cite,mark,q,del,ins,small',\n                    remove: 'all',\n                    split: true,\n                    expand: false,\n                    block_expand: true,\n                    deep: true\n                },\n                { selector: 'span', attributes: ['style', 'class'], remove: 'empty', split: true, expand: false, deep: true },\n                { selector: '*', attributes: ['style', 'class'], split: false, expand: false, deep: true }\n            ]\n        };\n        Tools.each('p h1 h2 h3 h4 h5 h6 div address pre dt dd'.split(/\\s/), (name) => {\n            formats[name] = { block: name, remove: 'all' };\n        });\n        return formats;\n    };\n\n    const genericBase = {\n        remove_similar: true,\n        inherit: false\n    };\n    const cellBase = {\n        selector: 'td,th',\n        ...genericBase\n    };\n    const cellFormats = {\n        tablecellbackgroundcolor: {\n            styles: { backgroundColor: '%value' },\n            ...cellBase\n        },\n        tablecellverticalalign: {\n            styles: {\n                'vertical-align': '%value'\n            },\n            ...cellBase\n        },\n        tablecellbordercolor: {\n            styles: { borderColor: '%value' },\n            ...cellBase\n        },\n        tablecellclass: {\n            classes: ['%value'],\n            ...cellBase\n        },\n        tableclass: {\n            selector: 'table',\n            classes: ['%value'],\n            ...genericBase\n        },\n        tablecellborderstyle: {\n            styles: { borderStyle: '%value' },\n            ...cellBase\n        },\n        tablecellborderwidth: {\n            styles: { borderWidth: '%value' },\n            ...cellBase\n        }\n    };\n    const get = constant(cellFormats);\n\n    const FormatRegistry = (editor) => {\n        const formats = {};\n        const get$2 = (name) => isNonNullable(name) ? formats[name] : formats;\n        const has = (name) => has$2(formats, name);\n        const register = (name, format) => {\n            if (name) {\n                if (!isString(name)) {\n                    each$d(name, (format, name) => {\n                        register(name, format);\n                    });\n                }\n                else {\n                    // Force format into array and add it to internal collection\n                    if (!isArray$1(format)) {\n                        format = [format];\n                    }\n                    each$e(format, (format) => {\n                        // Set deep to false by default on selector formats this to avoid removing\n                        // alignment on images inside paragraphs when alignment is changed on paragraphs\n                        if (isUndefined(format.deep)) {\n                            format.deep = !isSelectorFormat(format);\n                        }\n                        // Default to true\n                        if (isUndefined(format.split)) {\n                            format.split = !isSelectorFormat(format) || isInlineFormat(format);\n                        }\n                        // Default to true\n                        if (isUndefined(format.remove) && isSelectorFormat(format) && !isInlineFormat(format)) {\n                            format.remove = 'none';\n                        }\n                        // Mark format as a mixed format inline + block level\n                        if (isSelectorFormat(format) && isInlineFormat(format)) {\n                            format.mixed = true;\n                            format.block_expand = true;\n                        }\n                        // Split classes if needed\n                        if (isString(format.classes)) {\n                            format.classes = format.classes.split(/\\s+/);\n                        }\n                    });\n                    formats[name] = format;\n                }\n            }\n        };\n        const unregister = (name) => {\n            if (name && formats[name]) {\n                delete formats[name];\n            }\n            return formats;\n        };\n        register(get$1(editor));\n        register(get());\n        register(getFormats(editor));\n        return {\n            get: get$2,\n            has,\n            register,\n            unregister\n        };\n    };\n\n    const each$3 = Tools.each;\n    const dom = DOMUtils.DOM;\n    const isPreviewItem = (item) => isNonNullable(item) && isObject(item);\n    const parsedSelectorToHtml = (ancestry, editor) => {\n        const schema = editor && editor.schema || Schema({});\n        const decorate = (elm, item) => {\n            if (item.classes.length > 0) {\n                dom.addClass(elm, item.classes.join(' '));\n            }\n            dom.setAttribs(elm, item.attrs);\n        };\n        const createElement = (sItem) => {\n            const item = isString(sItem) ? {\n                name: sItem,\n                classes: [],\n                attrs: {}\n            } : sItem;\n            const elm = dom.create(item.name);\n            decorate(elm, item);\n            return elm;\n        };\n        const getRequiredParent = (elm, candidate) => {\n            const elmRule = schema.getElementRule(elm.nodeName.toLowerCase());\n            const parentsRequired = elmRule?.parentsRequired;\n            if (parentsRequired && parentsRequired.length) {\n                return candidate && contains$2(parentsRequired, candidate) ? candidate : parentsRequired[0];\n            }\n            else {\n                return false;\n            }\n        };\n        const wrapInHtml = (elm, ancestors, siblings) => {\n            let parentCandidate;\n            const ancestor = ancestors[0];\n            const ancestorName = isPreviewItem(ancestor) ? ancestor.name : undefined;\n            const parentRequired = getRequiredParent(elm, ancestorName);\n            if (parentRequired) {\n                if (ancestorName === parentRequired) {\n                    parentCandidate = ancestor;\n                    ancestors = ancestors.slice(1);\n                }\n                else {\n                    parentCandidate = parentRequired;\n                }\n            }\n            else if (ancestor) {\n                parentCandidate = ancestor;\n                ancestors = ancestors.slice(1);\n            }\n            else if (!siblings) {\n                return elm;\n            }\n            // if no more ancestry, wrap in generic div\n            const parent = parentCandidate ? createElement(parentCandidate) : dom.create('div');\n            parent.appendChild(elm);\n            if (siblings) {\n                Tools.each(siblings, (sibling) => {\n                    const siblingElm = createElement(sibling);\n                    parent.insertBefore(siblingElm, elm);\n                });\n            }\n            const parentSiblings = isPreviewItem(parentCandidate) ? parentCandidate.siblings : undefined;\n            return wrapInHtml(parent, ancestors, parentSiblings);\n        };\n        const fragment = dom.create('div');\n        if (ancestry.length > 0) {\n            const item = ancestry[0];\n            const elm = createElement(item);\n            const siblings = isPreviewItem(item) ? item.siblings : undefined;\n            fragment.appendChild(wrapInHtml(elm, ancestry.slice(1), siblings));\n        }\n        return fragment;\n    };\n    const parseSelectorItem = (item) => {\n        item = Tools.trim(item);\n        let tagName = 'div';\n        const obj = {\n            name: tagName,\n            classes: [],\n            attrs: {},\n            selector: item\n        };\n        if (item !== '*') {\n            // matching IDs, CLASSes, ATTRIBUTES and PSEUDOs\n            tagName = item.replace(/(?:([#\\.]|::?)([\\w\\-]+)|(\\[)([^\\]]+)\\]?)/g, ($0, $1, $2, $3, $4) => {\n                switch ($1) {\n                    case '#':\n                        obj.attrs.id = $2;\n                        break;\n                    case '.':\n                        obj.classes.push($2);\n                        break;\n                    case ':':\n                        if (Tools.inArray('checked disabled enabled read-only required'.split(' '), $2) !== -1) {\n                            obj.attrs[$2] = $2;\n                        }\n                        break;\n                }\n                // attribute matched\n                if ($3 === '[') {\n                    const m = $4.match(/([\\w\\-]+)(?:\\=\\\"([^\\\"]+))?/);\n                    if (m) {\n                        obj.attrs[m[1]] = m[2];\n                    }\n                }\n                return '';\n            });\n        }\n        obj.name = tagName || 'div';\n        return obj;\n    };\n    const parseSelector = (selector) => {\n        if (!isString(selector)) {\n            return [];\n        }\n        // take into account only first one\n        selector = selector.split(/\\s*,\\s*/)[0];\n        // tighten\n        selector = selector.replace(/\\s*(~\\+|~|\\+|>)\\s*/g, '$1');\n        // split either on > or on space, but not the one inside brackets\n        return Tools.map(selector.split(/(?:>|\\s+(?![^\\[\\]]+\\]))/), (item) => {\n            // process each sibling selector separately\n            const siblings = Tools.map(item.split(/(?:~\\+|~|\\+)/), parseSelectorItem);\n            const obj = siblings.pop(); // the last one is our real target\n            if (siblings.length) {\n                obj.siblings = siblings;\n            }\n            return obj;\n        }).reverse();\n    };\n    const getCssText = (editor, format) => {\n        let previewCss = '';\n        let previewStyles = getPreviewStyles(editor);\n        // No preview forced\n        if (previewStyles === '') {\n            return '';\n        }\n        // Removes any variables since these can't be previewed\n        const removeVars = (val) => {\n            return isString(val) ? val.replace(/%(\\w+)/g, '') : '';\n        };\n        const getComputedStyle = (name, elm) => {\n            return dom.getStyle(elm ?? editor.getBody(), name, true);\n        };\n        // Create block/inline element to use for preview\n        if (isString(format)) {\n            const formats = editor.formatter.get(format);\n            if (!formats) {\n                return '';\n            }\n            format = formats[0];\n        }\n        // Format specific preview override\n        // TODO: This should probably be further reduced by the previewStyles option\n        if ('preview' in format) {\n            const preview = format.preview;\n            if (preview === false) {\n                return '';\n            }\n            else {\n                previewStyles = preview || previewStyles;\n            }\n        }\n        let name = format.block || format.inline || 'span';\n        let previewFrag;\n        const items = parseSelector(format.selector);\n        if (items.length > 0) {\n            if (!items[0].name) { // e.g. something like ul > .someClass was provided\n                items[0].name = name;\n            }\n            name = format.selector;\n            previewFrag = parsedSelectorToHtml(items, editor);\n        }\n        else {\n            previewFrag = parsedSelectorToHtml([name], editor);\n        }\n        const previewElm = dom.select(name, previewFrag)[0] || previewFrag.firstChild;\n        // Add format styles to preview element\n        each$3(format.styles, (value, name) => {\n            const newValue = removeVars(value);\n            if (newValue) {\n                dom.setStyle(previewElm, name, newValue);\n            }\n        });\n        // Add attributes to preview element\n        each$3(format.attributes, (value, name) => {\n            const newValue = removeVars(value);\n            if (newValue) {\n                dom.setAttrib(previewElm, name, newValue);\n            }\n        });\n        // Add classes to preview element\n        each$3(format.classes, (value) => {\n            const newValue = removeVars(value);\n            if (!dom.hasClass(previewElm, newValue)) {\n                dom.addClass(previewElm, newValue);\n            }\n        });\n        editor.dispatch('PreviewFormats');\n        // Add the previewElm outside the visual area\n        dom.setStyles(previewFrag, { position: 'absolute', left: -0xFFFF });\n        editor.getBody().appendChild(previewFrag);\n        // Get parent container font size so we can compute px values out of em/% for older IE:s\n        const rawParentFontSize = getComputedStyle('fontSize');\n        const parentFontSize = /px$/.test(rawParentFontSize) ? parseInt(rawParentFontSize, 10) : 0;\n        each$3(previewStyles.split(' '), (name) => {\n            let value = getComputedStyle(name, previewElm);\n            // If background is transparent then check if the body has a background color we can use\n            if (name === 'background-color' && /transparent|rgba\\s*\\([^)]+,\\s*0\\)/.test(value)) {\n                value = getComputedStyle(name);\n                // Ignore white since it's the default color, not the nicest fix\n                // TODO: Fix this by detecting runtime style\n                if (rgbaToHexString(value).toLowerCase() === '#ffffff') {\n                    return;\n                }\n            }\n            if (name === 'color') {\n                // Ignore black since it's the default color, not the nicest fix\n                // TODO: Fix this by detecting runtime style\n                if (rgbaToHexString(value).toLowerCase() === '#000000') {\n                    return;\n                }\n            }\n            // Old IE won't calculate the font size so we need to do that manually\n            if (name === 'font-size') {\n                if (/em|%$/.test(value)) {\n                    if (parentFontSize === 0) {\n                        return;\n                    }\n                    // Convert font size from em/% to px\n                    const numValue = parseFloat(value) / (/%$/.test(value) ? 100 : 1);\n                    value = (numValue * parentFontSize) + 'px';\n                }\n            }\n            if (name === 'border' && value) {\n                previewCss += 'padding:0 2px;';\n            }\n            previewCss += name + ':' + value + ';';\n        });\n        editor.dispatch('AfterPreviewFormats');\n        // previewCss += 'line-height:normal';\n        dom.remove(previewFrag);\n        return previewCss;\n    };\n\n    const setup$x = (editor) => {\n        // Add some inline shortcuts\n        editor.addShortcut('meta+b', '', 'Bold');\n        editor.addShortcut('meta+i', '', 'Italic');\n        editor.addShortcut('meta+u', '', 'Underline');\n        // BlockFormat shortcuts keys\n        for (let i = 1; i <= 6; i++) {\n            editor.addShortcut('access+' + i, '', ['FormatBlock', false, 'h' + i]);\n        }\n        editor.addShortcut('access+7', '', ['FormatBlock', false, 'p']);\n        editor.addShortcut('access+8', '', ['FormatBlock', false, 'div']);\n        editor.addShortcut('access+9', '', ['FormatBlock', false, 'address']);\n    };\n\n    const Formatter = (editor) => {\n        const formats = FormatRegistry(editor);\n        const formatChangeState = Cell({});\n        setup$x(editor);\n        setup$B(editor);\n        if (!isRtc(editor)) {\n            setup$A(formatChangeState, editor);\n        }\n        return {\n            /**\n             * Returns the format by name or all formats if no name is specified.\n             *\n             * @method get\n             * @param {String} name Optional name to retrieve by.\n             * @return {Array/Object} Array/Object with all registered formats or a specific format.\n             */\n            get: formats.get,\n            /**\n             * Returns true or false if a format is registered for the specified name.\n             *\n             * @method has\n             * @param {String} name Format name to check if a format exists.\n             * @return {Boolean} True/False if a format for the specified name exists.\n             */\n            has: formats.has,\n            /**\n             * Registers a specific format by name.\n             *\n             * @method register\n             * @param {Object/String} name Name of the format for example \"bold\".\n             * @param {Object/Array} format Optional format object or array of format variants\n             * can only be omitted if the first arg is an object.\n             */\n            register: formats.register,\n            /**\n             * Unregister a specific format by name.\n             *\n             * @method unregister\n             * @param {String} name Name of the format for example \"bold\".\n             */\n            unregister: formats.unregister,\n            /**\n             * Applies the specified format to the current selection or specified node.\n             *\n             * @method apply\n             * @param {String} name Name of format to apply.\n             * @param {Object} vars Optional list of variables to replace within format before applying it.\n             * @param {Node} node Optional node to apply the format to defaults to current selection.\n             */\n            apply: (name, vars, node) => {\n                applyFormat(editor, name, vars, node);\n            },\n            /**\n             * Removes the specified format from the current selection or specified node.\n             *\n             * @method remove\n             * @param {String} name Name of format to remove.\n             * @param {Object} vars Optional list of variables to replace within format before removing it.\n             * @param {Node/Range} node Optional node or DOM range to remove the format from defaults to current selection.\n             */\n            remove: (name, vars, node, similar) => {\n                removeFormat(editor, name, vars, node, similar);\n            },\n            /**\n             * Toggles the specified format on/off.\n             *\n             * @method toggle\n             * @param {String} name Name of format to apply/remove.\n             * @param {Object} vars Optional list of variables to replace within format before applying/removing it.\n             * @param {Node} node Optional node to apply the format to or remove from. Defaults to current selection.\n             */\n            toggle: (name, vars, node) => {\n                toggleFormat(editor, name, vars, node);\n            },\n            /**\n             * Matches the current selection or specified node against the specified format name.\n             *\n             * @method match\n             * @param {String} name Name of format to match.\n             * @param {Object} vars Optional list of variables to replace before checking it.\n             * @param {Node} node Optional node to check.\n             * @param {Boolean} similar Optional argument to specify that similar formats should be checked instead of only exact formats.\n             * @return {Boolean} true/false if the specified selection/node matches the format.\n             */\n            match: (name, vars, node, similar) => matchFormat(editor, name, vars, node, similar),\n            /**\n             * Finds the closest matching format from a set of formats for the current selection.\n             *\n             * @method closest\n             * @param {Array} names Format names to check for.\n             * @return {String} The closest matching format name or null.\n             */\n            closest: (names) => closestFormat(editor, names),\n            /**\n             * Matches the current selection against the array of formats and returns a new array with matching formats.\n             *\n             * @method matchAll\n             * @param {Array} names Name of format to match.\n             * @param {Object} vars Optional list of variables to replace before checking it.\n             * @return {Array} Array with matched formats.\n             */\n            matchAll: (names, vars) => matchAllFormats(editor, names, vars),\n            /**\n             * Return true/false if the specified node has the specified format.\n             *\n             * @method matchNode\n             * @param {Node} node Node to check the format on.\n             * @param {String} name Format name to check.\n             * @param {Object} vars Optional list of variables to replace before checking it.\n             * @param {Boolean} similar Match format that has similar properties.\n             * @return {Object} Returns the format object it matches or undefined if it doesn't match.\n             */\n            matchNode: (node, name, vars, similar) => matchNodeFormat(editor, node, name, vars, similar),\n            /**\n             * Returns true/false if the specified format can be applied to the current selection or not. It\n             * will currently only check the state for selector formats, it returns true on all other format types.\n             *\n             * @method canApply\n             * @param {String} name Name of format to check.\n             * @return {Boolean} true/false if the specified format can be applied to the current selection/node.\n             */\n            canApply: (name) => canApplyFormat(editor, name),\n            /**\n             * Executes the specified callback when the current selection matches the formats or not.\n             *\n             * @method formatChanged\n             * @param {String} formats Comma separated list of formats to check for.\n             * @param {Function} callback Callback with state and args when the format is changed/toggled on/off.\n             * @param {Boolean} similar True/false state if the match should handle similar or exact formats.\n             * @param {Object} vars Restrict the format being watched to only match if the variables applied are equal to vars.\n             */\n            formatChanged: (formats, callback, similar, vars) => formatChanged(editor, formatChangeState, formats, callback, similar, vars),\n            /**\n             * Returns a preview css text for the specified format.\n             *\n             * @method getCssText\n             * @param {String/Object} format Format to generate preview css text for.\n             * @return {String} Css text for the specified format.\n             * @example\n             * const cssText1 = editor.formatter.getCssText('bold');\n             * const cssText2 = editor.formatter.getCssText({ inline: 'b' });\n             */\n            getCssText: curry(getCssText, editor)\n        };\n    };\n\n    // Avoid adding non-typing undo levels for commands that could cause duplicate undo levels to be created\n    // or do not alter the editor content or selection in any way\n    const shouldIgnoreCommand = (cmd) => {\n        switch (cmd.toLowerCase()) {\n            case 'undo':\n            case 'redo':\n            case 'mcefocus':\n                return true;\n            default:\n                return false;\n        }\n    };\n    const registerEvents = (editor, undoManager, locks) => {\n        const isFirstTypedCharacter = Cell(false);\n        const addNonTypingUndoLevel = (e) => {\n            setTyping(undoManager, false, locks);\n            undoManager.add({}, e);\n        };\n        // Add initial undo level when the editor is initialized\n        editor.on('init', () => {\n            undoManager.add();\n        });\n        // Get position before an execCommand is processed\n        editor.on('BeforeExecCommand', (e) => {\n            const cmd = e.command;\n            if (!shouldIgnoreCommand(cmd)) {\n                endTyping(undoManager, locks);\n                undoManager.beforeChange();\n            }\n        });\n        // Add undo level after an execCommand call was made\n        editor.on('ExecCommand', (e) => {\n            const cmd = e.command;\n            if (!shouldIgnoreCommand(cmd)) {\n                addNonTypingUndoLevel(e);\n            }\n        });\n        editor.on('ObjectResizeStart cut', () => {\n            undoManager.beforeChange();\n        });\n        editor.on('SaveContent ObjectResized blur', addNonTypingUndoLevel);\n        editor.on('dragend', addNonTypingUndoLevel);\n        editor.on('keyup', (e) => {\n            const keyCode = e.keyCode;\n            // If key is prevented then don't add undo level\n            // This would happen on keyboard shortcuts for example\n            if (e.isDefaultPrevented()) {\n                return;\n            }\n            const isMeta = Env.os.isMacOS() && e.key === 'Meta';\n            if ((keyCode >= 33 && keyCode <= 36) || (keyCode >= 37 && keyCode <= 40) || keyCode === 45 || e.ctrlKey || isMeta) {\n                addNonTypingUndoLevel();\n                editor.nodeChanged();\n            }\n            if (keyCode === 46 || keyCode === 8) {\n                editor.nodeChanged();\n            }\n            // Fire a TypingUndo event on the first character entered\n            if (isFirstTypedCharacter.get() && undoManager.typing && !isEq$1(editor.readonly, createFromEditor(editor), undoManager.data[0])) {\n                if (!editor.isDirty()) {\n                    editor.setDirty(true);\n                }\n                editor.dispatch('TypingUndo');\n                isFirstTypedCharacter.set(false);\n                editor.nodeChanged();\n            }\n        });\n        editor.on('keydown', (e) => {\n            const keyCode = e.keyCode;\n            // If key is prevented then don't add undo level\n            // This would happen on keyboard shortcuts for example\n            if (e.isDefaultPrevented()) {\n                return;\n            }\n            // Is character position keys left,right,up,down,home,end,pgdown,pgup,enter\n            if ((keyCode >= 33 && keyCode <= 36) || (keyCode >= 37 && keyCode <= 40) || keyCode === 45) {\n                if (undoManager.typing) {\n                    addNonTypingUndoLevel(e);\n                }\n                return;\n            }\n            // If key isn't Ctrl+Alt/AltGr\n            const modKey = (e.ctrlKey && !e.altKey) || e.metaKey;\n            if ((keyCode < 16 || keyCode > 20) && keyCode !== 224 && keyCode !== 91 && !undoManager.typing && !modKey) {\n                undoManager.beforeChange();\n                setTyping(undoManager, true, locks);\n                undoManager.add({}, e);\n                isFirstTypedCharacter.set(true);\n                return;\n            }\n            const hasMetaOrCtrlModifier = Env.os.isMacOS() ? e.metaKey : e.ctrlKey && !e.altKey;\n            if (hasMetaOrCtrlModifier && (e.key === 'Backspace' || e.key === 'Delete')) {\n                undoManager.beforeChange();\n            }\n        });\n        editor.on('mousedown', (e) => {\n            if (undoManager.typing) {\n                addNonTypingUndoLevel(e);\n            }\n        });\n        // Special inputType, currently only Chrome implements this: https://www.w3.org/TR/input-events-2/#x5.1.2-attributes\n        const isInsertReplacementText = (event) => event.inputType === 'insertReplacementText';\n        // Safari just shows inputType `insertText` but with data set to null so we can use that\n        const isInsertTextDataNull = (event) => event.inputType === 'insertText' && event.data === null;\n        const isInsertFromPasteOrDrop = (event) => event.inputType === 'insertFromPaste' || event.inputType === 'insertFromDrop';\n        // For detecting when user has replaced text using the browser built-in spell checker or paste/drop events\n        editor.on('input', (e) => {\n            if (e.inputType && (isInsertReplacementText(e) || isInsertTextDataNull(e) || isInsertFromPasteOrDrop(e))) {\n                addNonTypingUndoLevel(e);\n            }\n        });\n        editor.on('AddUndo Undo Redo ClearUndos', (e) => {\n            if (!e.isDefaultPrevented()) {\n                editor.nodeChanged();\n            }\n        });\n    };\n    const addKeyboardShortcuts = (editor) => {\n        editor.addShortcut('meta+z', '', 'Undo');\n        editor.addShortcut('meta+y,meta+shift+z', '', 'Redo');\n    };\n\n    /**\n     * This class handles the undo/redo history levels for the editor. Since the built-in undo/redo has major drawbacks a custom one was needed.\n     *\n     * @class tinymce.UndoManager\n     */\n    const UndoManager = (editor) => {\n        const beforeBookmark = value$1();\n        const locks = Cell(0);\n        const index = Cell(0);\n        /* eslint consistent-this:0 */\n        const undoManager = {\n            data: [], // Gets mutated both internally and externally by plugins like remark, not documented\n            /**\n             * State if the user is currently typing or not. This will add a typing operation into one undo\n             * level instead of one new level for each keystroke.\n             *\n             * @field {Boolean} typing\n             */\n            typing: false,\n            /**\n             * Stores away a bookmark to be used when performing an undo action so that the selection is before\n             * the change has been made.\n             *\n             * @method beforeChange\n             */\n            beforeChange: () => {\n                beforeChange(editor, locks, beforeBookmark);\n            },\n            /**\n             * Adds a new undo level/snapshot to the undo list.\n             *\n             * @method add\n             * @param {Object} level Optional undo level object to add.\n             * @param {EditorEvent} event Optional event responsible for the creation of the undo level.\n             * @return {Object} Undo level that got added or null if a level wasn't needed.\n             */\n            add: (level, event) => {\n                return addUndoLevel(editor, undoManager, index, locks, beforeBookmark, level, event);\n            },\n            /**\n             * Dispatch a change event with current editor status as level and current undoManager layer as lastLevel\n             *\n             * @method dispatchChange\n             */\n            dispatchChange: () => {\n                editor.setDirty(true);\n                const level = createFromEditor(editor);\n                level.bookmark = getUndoBookmark(editor.selection);\n                editor.dispatch('change', {\n                    level,\n                    lastLevel: get$c(undoManager.data, index.get()).getOrUndefined()\n                });\n            },\n            /**\n             * Undoes the last action.\n             *\n             * @method undo\n             * @return {Object} Undo level or null if no undo was performed.\n             */\n            undo: () => {\n                return undo(editor, undoManager, locks, index);\n            },\n            /**\n             * Redoes the last action.\n             *\n             * @method redo\n             * @return {Object} Redo level or null if no redo was performed.\n             */\n            redo: () => {\n                return redo(editor, index, undoManager.data);\n            },\n            /**\n             * Removes all undo levels.\n             *\n             * @method clear\n             */\n            clear: () => {\n                clear(editor, undoManager, index);\n            },\n            /**\n             * Resets the undo manager levels by clearing all levels and then adding an initial level.\n             *\n             * @method reset\n             */\n            reset: () => {\n                reset(editor, undoManager);\n            },\n            /**\n             * Returns true/false if the undo manager has any undo levels.\n             *\n             * @method hasUndo\n             * @return {Boolean} true/false if the undo manager has any undo levels.\n             */\n            hasUndo: () => {\n                return hasUndo(editor, undoManager, index);\n            },\n            /**\n             * Returns true/false if the undo manager has any redo levels.\n             *\n             * @method hasRedo\n             * @return {Boolean} true/false if the undo manager has any redo levels.\n             */\n            hasRedo: () => {\n                return hasRedo(editor, undoManager, index);\n            },\n            /**\n             * Executes the specified mutator function as an undo transaction. The selection\n             * before the modification will be stored to the undo stack and if the DOM changes\n             * it will add a new undo level. Any logic within the translation that adds undo levels will\n             * be ignored. So a translation can include calls to execCommand or editor.insertContent.\n             *\n             * @method transact\n             * @param {Function} callback Function that gets executed and has dom manipulation logic in it.\n             * @return {Object} Undo level that got added or null it a level wasn't needed.\n             */\n            transact: (callback) => {\n                return transact(editor, undoManager, locks, callback);\n            },\n            /**\n             * Executes the specified mutator function as an undo transaction. But without adding an undo level.\n             * Any logic within the translation that adds undo levels will be ignored. So a translation can\n             * include calls to execCommand or editor.insertContent.\n             *\n             * @method ignore\n             * @param {Function} callback Function that gets executed and has dom manipulation logic in it.\n             */\n            ignore: (callback) => {\n                ignore(editor, locks, callback);\n            },\n            /**\n             * Adds an extra \"hidden\" undo level by first applying the first mutation and store that to the undo stack\n             * then roll back that change and do the second mutation on top of the stack. This will produce an extra\n             * undo level that the user doesn't see until they undo.\n             *\n             * @method extra\n             * @param {Function} callback1 Function that does mutation but gets stored as a \"hidden\" extra undo level.\n             * @param {Function} callback2 Function that does mutation but gets displayed to the user.\n             */\n            extra: (callback1, callback2) => {\n                extra(editor, undoManager, index, callback1, callback2);\n            }\n        };\n        if (!isRtc(editor)) {\n            registerEvents(editor, undoManager, locks);\n        }\n        addKeyboardShortcuts(editor);\n        return undoManager;\n    };\n\n    const nonTypingKeycodes = [\n        // tab, esc, home, end\n        9, 27, VK.HOME, VK.END,\n        // pause, capslock, print screen, numlock, scroll lock\n        19, 20, 44, 144, 145,\n        // page up/down, insert\n        33, 34, 45,\n        // alt, shift, ctrl\n        16, 17, 18,\n        // meta/windows key\n        91, 92, 93,\n        // direction\n        VK.DOWN, VK.UP, VK.LEFT, VK.RIGHT\n    ].concat(\n    // Meta key on firefox is different\n    Env.browser.isFirefox() ? [224] : []);\n    const placeholderAttr = 'data-mce-placeholder';\n    const isKeyboardEvent = (e) => e.type === 'keydown' || e.type === 'keyup';\n    const isDeleteEvent = (e) => {\n        const keyCode = e.keyCode;\n        return keyCode === VK.BACKSPACE || keyCode === VK.DELETE;\n    };\n    const isNonTypingKeyboardEvent = (e) => {\n        if (isKeyboardEvent(e)) {\n            const keyCode = e.keyCode;\n            // Ctrl/Meta/Alt key pressed, F1-12 or non typing keycode\n            return !isDeleteEvent(e) && (VK.metaKeyPressed(e) || e.altKey || keyCode >= 112 && keyCode <= 123 || contains$2(nonTypingKeycodes, keyCode));\n        }\n        else {\n            return false;\n        }\n    };\n    const isTypingKeyboardEvent = (e) => \n    // 229 === Unidentified, so since we don't know what it is treat it as a non typing event on keyup but as a typing event on keydown\n    // Android will generally always send a 229 keycode since it uses an IME to input text\n    isKeyboardEvent(e) && !(isDeleteEvent(e) || e.type === 'keyup' && e.keyCode === 229);\n    const isVisuallyEmpty = (dom, rootElm, forcedRootBlock) => {\n        if (dom.isEmpty(rootElm, undefined, { skipBogus: false, includeZwsp: true })) {\n            // Ensure the node matches the forced_root_block setting, as the content could be an empty list, etc...\n            // and also check that the content isn't indented\n            const firstElement = rootElm.firstElementChild;\n            if (!firstElement) {\n                return true;\n            }\n            else if (dom.getStyle(rootElm.firstElementChild, 'padding-left') || dom.getStyle(rootElm.firstElementChild, 'padding-right')) {\n                return false;\n            }\n            else {\n                return forcedRootBlock === firstElement.nodeName.toLowerCase();\n            }\n        }\n        else {\n            return false;\n        }\n    };\n    const setup$w = (editor) => {\n        const dom = editor.dom;\n        const rootBlock = getForcedRootBlock(editor);\n        const placeholder = getPlaceholder(editor) ?? '';\n        const updatePlaceholder = (e, initial) => {\n            if (isNonTypingKeyboardEvent(e)) {\n                return;\n            }\n            // Check to see if we should show the placeholder\n            const body = editor.getBody();\n            const showPlaceholder = isTypingKeyboardEvent(e) ? false : isVisuallyEmpty(dom, body, rootBlock);\n            // Update the attribute as required\n            const isPlaceholderShown = dom.getAttrib(body, placeholderAttr) !== '';\n            if (isPlaceholderShown !== showPlaceholder || initial) {\n                dom.setAttrib(body, placeholderAttr, showPlaceholder ? placeholder : null);\n                firePlaceholderToggle(editor, showPlaceholder);\n                // Swap the key listener state\n                editor.on(showPlaceholder ? 'keydown' : 'keyup', updatePlaceholder);\n                editor.off(showPlaceholder ? 'keyup' : 'keydown', updatePlaceholder);\n            }\n        };\n        if (isNotEmpty(placeholder)) {\n            editor.on('init', (e) => {\n                // Setup the initial state\n                updatePlaceholder(e, true);\n                editor.on('change SetContent ExecCommand', updatePlaceholder);\n                // TINY-4828: Update the placeholder after pasting content. This needs to use a timeout as\n                // the browser doesn't update the dom until after the paste event has fired\n                editor.on('paste', (e) => Delay.setEditorTimeout(editor, () => updatePlaceholder(e)));\n            });\n        }\n    };\n\n    const createAndFireInputEvent = (eventType) => (editor, inputType, specifics = {}) => {\n        const target = editor.getBody();\n        const overrides = {\n            bubbles: true,\n            composed: true,\n            data: null,\n            isComposing: false,\n            detail: 0,\n            view: null,\n            target,\n            currentTarget: target,\n            eventPhase: Event.AT_TARGET,\n            originalTarget: target,\n            explicitOriginalTarget: target,\n            isTrusted: false,\n            srcElement: target,\n            cancelable: false,\n            preventDefault: noop,\n            inputType\n        };\n        const input = clone$2(new InputEvent(eventType));\n        return editor.dispatch(eventType, { ...input, ...overrides, ...specifics });\n    };\n    const fireInputEvent = createAndFireInputEvent('input');\n    const fireBeforeInputEvent = createAndFireInputEvent('beforeinput');\n\n    const symulateDelete = (editor, isForward, deleteFun) => {\n        // Some delete actions may prevent the input event from being fired. If we do not detect it, we fire it ourselves.\n        let shouldFireInput = true;\n        const inputHandler = () => shouldFireInput = false;\n        const beforeInputEvent = fireBeforeInputEvent(editor, isForward ? 'deleteContentForward' : 'deleteContentBackward');\n        if (beforeInputEvent.isDefaultPrevented()) {\n            return false;\n        }\n        editor.on('input', inputHandler);\n        try {\n            deleteFun();\n        }\n        finally {\n            editor.off('input', inputHandler);\n        }\n        if (shouldFireInput) {\n            editor.dispatch('input');\n        }\n        return true;\n    };\n\n    const matchNodeName = (name) => (node) => isNonNullable(node) && node.nodeName.toLowerCase() === name;\n    const matchNodeNames = (regex) => (node) => isNonNullable(node) && regex.test(node.nodeName);\n    const isTextNode$1 = (node) => isNonNullable(node) && node.nodeType === 3;\n    const isElement$1 = (node) => isNonNullable(node) && node.nodeType === 1;\n    const isListNode = matchNodeNames(/^(OL|UL|DL)$/);\n    const isOlUlNode = matchNodeNames(/^(OL|UL)$/);\n    const isListItemNode = matchNodeNames(/^(LI|DT|DD)$/);\n    const isDlItemNode = matchNodeNames(/^(DT|DD)$/);\n    const isTableCellNode = matchNodeNames(/^(TH|TD)$/);\n    const isBr$1 = matchNodeName('br');\n    const isFirstChild$1 = (node) => node.parentNode?.firstChild === node;\n    const isTextBlock = (editor, node) => isNonNullable(node) && node.nodeName in editor.schema.getTextBlockElements();\n    const isBlock = (node, blockElements) => isNonNullable(node) && node.nodeName in blockElements;\n    const isVoid = (editor, node) => isNonNullable(node) && node.nodeName in editor.schema.getVoidElements();\n    const isBogusBr = (dom, node) => {\n        if (!isBr$1(node)) {\n            return false;\n        }\n        return dom.isBlock(node.nextSibling) && !isBr$1(node.previousSibling);\n    };\n    const isEmpty$1 = (dom, elm, keepBookmarks) => {\n        const empty = dom.isEmpty(elm);\n        if (keepBookmarks && dom.select('span[data-mce-type=bookmark]', elm).length > 0) {\n            return false;\n        }\n        return empty;\n    };\n    const isChildOfBody = (dom, elm) => dom.isChildOf(elm, dom.getRoot());\n\n    const DOM$9 = DOMUtils.DOM;\n    const normalizeList = (dom, list) => {\n        const parentNode = list.parentElement;\n        // Move UL/OL to previous LI if it's the only child of a LI\n        if (parentNode && parentNode.nodeName === 'LI' && parentNode.firstChild === list) {\n            const sibling = parentNode.previousSibling;\n            if (sibling && sibling.nodeName === 'LI') {\n                sibling.appendChild(list);\n                if (isEmpty$1(dom, parentNode)) {\n                    DOM$9.remove(parentNode);\n                }\n            }\n            else {\n                DOM$9.setStyle(parentNode, 'listStyleType', 'none');\n            }\n        }\n        // Append OL/UL to previous LI if it's in a parent OL/UL i.e. old HTML4\n        if (isListNode(parentNode)) {\n            const sibling = parentNode.previousSibling;\n            if (sibling && sibling.nodeName === 'LI') {\n                sibling.appendChild(list);\n            }\n        }\n    };\n    const normalizeLists = (dom, element) => {\n        const lists = Tools.grep(dom.select('ol,ul', element));\n        Tools.each(lists, (list) => {\n            normalizeList(dom, list);\n        });\n    };\n\n    const getNormalizedPoint = (container, offset) => {\n        if (isTextNode$1(container)) {\n            return { container, offset };\n        }\n        const node = RangeUtils.getNode(container, offset);\n        if (isTextNode$1(node)) {\n            return {\n                container: node,\n                offset: offset >= container.childNodes.length ? node.data.length : 0\n            };\n        }\n        else if (node.previousSibling && isTextNode$1(node.previousSibling)) {\n            return {\n                container: node.previousSibling,\n                offset: node.previousSibling.data.length\n            };\n        }\n        else if (node.nextSibling && isTextNode$1(node.nextSibling)) {\n            return {\n                container: node.nextSibling,\n                offset: 0\n            };\n        }\n        return { container, offset };\n    };\n    const normalizeRange = (rng) => {\n        const outRng = rng.cloneRange();\n        const rangeStart = getNormalizedPoint(rng.startContainer, rng.startOffset);\n        outRng.setStart(rangeStart.container, rangeStart.offset);\n        const rangeEnd = getNormalizedPoint(rng.endContainer, rng.endOffset);\n        outRng.setEnd(rangeEnd.container, rangeEnd.offset);\n        return outRng;\n    };\n\n    const isList = (el) => is$1(el, 'OL,UL');\n    const isListItem$1 = (el) => is$1(el, 'LI');\n    const hasFirstChildList = (el) => firstChild(el).exists(isList);\n    const hasLastChildList = (el) => lastChild(el).exists(isList);\n    const canIncreaseDepthOfList = (editor, amount) => {\n        return getListMaxDepth(editor).map((max) => max >= amount).getOr(true);\n    };\n\n    const listNames = ['OL', 'UL', 'DL'];\n    const listSelector = listNames.join(',');\n    const getParentList = (editor, node) => {\n        const selectionStart = node || editor.selection.getStart(true);\n        return editor.dom.getParent(selectionStart, listSelector, getClosestListHost(editor, selectionStart, editor.selection.isCollapsed()));\n    };\n    const isParentListSelected = (parentList, selectedBlocks) => isNonNullable(parentList) && selectedBlocks.length === 1 && selectedBlocks[0] === parentList;\n    const findSubLists = (parentList) => filter$5(parentList.querySelectorAll(listSelector), isListNode);\n    const getSelectedSubLists = (editor) => {\n        const parentList = getParentList(editor);\n        const selectedBlocks = editor.selection.getSelectedBlocks();\n        if (isParentListSelected(parentList, selectedBlocks)) {\n            return findSubLists(parentList);\n        }\n        else {\n            return filter$5(selectedBlocks, (elm) => {\n                return isListNode(elm) && parentList !== elm;\n            });\n        }\n    };\n    const findParentListItemsNodes = (editor, elms, isCollapsed) => {\n        const listItemsElms = Tools.map(elms, (elm) => {\n            const parentLi = editor.dom.getParent(elm, 'li,dd,dt', getClosestListHost(editor, elm, isCollapsed));\n            return parentLi ? parentLi : elm;\n        });\n        return unique$1(listItemsElms);\n    };\n    const getSelectedListItems = (editor) => {\n        const selectedBlocks = editor.selection.getSelectedBlocks();\n        return filter$5(findParentListItemsNodes(editor, selectedBlocks, editor.selection.isCollapsed()), isListItemNode);\n    };\n    const getSelectedDlItems = (editor) => filter$5(getSelectedListItems(editor), isDlItemNode);\n    const getClosestEditingHost = (editor, elm) => {\n        const parentTableCell = editor.dom.getParents(elm, 'TD,TH');\n        return parentTableCell.length > 0 ? parentTableCell[0] : editor.getBody();\n    };\n    const isListHost = (schema, node) => !isListNode(node) && !isListItemNode(node) && exists(listNames, (listName) => schema.isValidChild(node.nodeName, listName));\n    const requireLiElementFirst = (parentBlocks) => {\n        const result = findMap(parentBlocks, (element) => {\n            if (isListItem$1(SugarElement.fromDom(element))) {\n                return Optional.some(true);\n            }\n            if (isTableCellNode(element)) {\n                return Optional.some(false);\n            }\n            return Optional.none();\n        });\n        return result.getOr(false);\n    };\n    const getClosestListHost = (editor, elm, isCollapsed) => {\n        const parentBlocks = editor.dom.getParents(elm, editor.dom.isBlock);\n        let foundListBlock = !requireLiElementFirst(parentBlocks);\n        const isNotForcedRootBlock = (elm) => elm.nodeName.toLowerCase() !== getForcedRootBlock(editor);\n        const checkListRequirement = (element) => {\n            if (isListItem$1(SugarElement.fromDom(element)) || isList(SugarElement.fromDom(element))) {\n                foundListBlock = true;\n            }\n            return foundListBlock;\n        };\n        const parentBlock = find$2(parentBlocks, (elm) => checkListRequirement(elm) && (!isCollapsed || isNotForcedRootBlock(elm)) && isListHost(editor.schema, elm));\n        return parentBlock.getOr(editor.getBody());\n    };\n    const isListInsideAnLiWithFirstAndLastNotListElement = (list) => parent(list).exists((parent) => isListItemNode(parent.dom)\n        && firstChild(parent).exists((firstChild) => !isListNode(firstChild.dom))\n        && lastChild(parent).exists((lastChild) => !isListNode(lastChild.dom)));\n    const findLastParentListNode = (editor, elm) => {\n        const parentLists = editor.dom.getParents(elm, 'ol,ul', getClosestListHost(editor, elm, true));\n        return last$2(parentLists);\n    };\n    const getSelectedLists = (editor) => {\n        const firstList = findLastParentListNode(editor, editor.selection.getStart());\n        const subsequentLists = filter$5(editor.selection.getSelectedBlocks(), isOlUlNode);\n        return firstList.toArray().concat(subsequentLists);\n    };\n    const getParentLists = (editor) => {\n        const elm = editor.selection.getStart();\n        return editor.dom.getParents(elm, 'ol,ul', getClosestListHost(editor, elm, editor.selection.isCollapsed()));\n    };\n    const getSelectedListRoots = (editor) => {\n        const selectedLists = getSelectedLists(editor);\n        const parentLists = getParentLists(editor);\n        return find$2(parentLists, (p) => isListInsideAnLiWithFirstAndLastNotListElement(SugarElement.fromDom(p))).fold(() => getUniqueListRoots(editor, selectedLists), (l) => [l]);\n    };\n    const getUniqueListRoots = (editor, lists) => {\n        const listRoots = map$3(lists, (list) => findLastParentListNode(editor, list).getOr(list));\n        return unique$1(listRoots);\n    };\n\n    const isCustomList = (list) => /\\btox\\-/.test(list.className);\n    // Advlist/core/ListUtils.ts - Duplicated in Advlist plugin\n    const isWithinNonEditable = (editor, element) => element !== null && !editor.dom.isEditable(element);\n    const selectionIsWithinNonEditableList = (editor) => {\n        const parentList = getParentList(editor);\n        return isWithinNonEditable(editor, parentList) || !editor.selection.isEditable();\n    };\n    const isWithinNonEditableList$1 = (editor, element) => {\n        const parentList = editor.dom.getParent(element, 'ol,ul,dl');\n        return isWithinNonEditable(editor, parentList) || !editor.selection.isEditable();\n    };\n\n    const fireListEvent = (editor, action, element) => editor.dispatch('ListMutation', { action, element });\n\n    const createTextBlock$1 = (editor, contentNode, attrs = {}) => {\n        const dom = editor.dom;\n        const blockElements = editor.schema.getBlockElements();\n        const fragment = dom.createFragment();\n        const blockName = getForcedRootBlock(editor);\n        const blockAttrs = getForcedRootBlockAttrs(editor);\n        let node;\n        let textBlock;\n        let hasContentNode = false;\n        textBlock = dom.create(blockName, {\n            ...blockAttrs,\n            ...(attrs.style ? { style: attrs.style } : {})\n        });\n        if (!isBlock(contentNode.firstChild, blockElements)) {\n            fragment.appendChild(textBlock);\n        }\n        while ((node = contentNode.firstChild)) {\n            const nodeName = node.nodeName;\n            if (!hasContentNode && (nodeName !== 'SPAN' || node.getAttribute('data-mce-type') !== 'bookmark')) {\n                hasContentNode = true;\n            }\n            if (isBlock(node, blockElements)) {\n                fragment.appendChild(node);\n                textBlock = null;\n            }\n            else {\n                if (!textBlock) {\n                    textBlock = dom.create(blockName, blockAttrs);\n                    fragment.appendChild(textBlock);\n                }\n                textBlock.appendChild(node);\n            }\n        }\n        // BR is needed in empty blocks\n        if (!hasContentNode && textBlock) {\n            textBlock.appendChild(dom.create('br', { 'data-mce-bogus': '1' }));\n        }\n        return fragment;\n    };\n\n    const isEntryList = (entry) => 'listAttributes' in entry;\n    const isEntryComment = (entry) => 'isComment' in entry;\n    const isEntryFragment = (entry) => 'isFragment' in entry;\n    const isIndented = (entry) => entry.depth > 0;\n    const isSelected = (entry) => entry.isSelected;\n    const cloneItemContent = (li) => {\n        const children = children$2(li);\n        const content = hasLastChildList(li) ? children.slice(0, -1) : children;\n        return map$3(content, deep);\n    };\n    const createEntry = (li, depth, isSelected) => parent(li).filter(isElement$8).map((list) => ({\n        depth,\n        dirty: false,\n        isSelected,\n        content: cloneItemContent(li),\n        itemAttributes: clone$4(li),\n        listAttributes: clone$4(list),\n        listType: name(list),\n        isInPreviousLi: false\n    }));\n\n    const joinSegment = (parent, child) => {\n        append$1(parent.item, child.list);\n    };\n    const joinSegments = (segments) => {\n        for (let i = 1; i < segments.length; i++) {\n            joinSegment(segments[i - 1], segments[i]);\n        }\n    };\n    const appendSegments = (head$1, tail) => {\n        lift2(last$2(head$1), head(tail), joinSegment);\n    };\n    const createSegment = (scope, listType) => {\n        const segment = {\n            list: SugarElement.fromTag(listType, scope),\n            item: SugarElement.fromTag('li', scope)\n        };\n        append$1(segment.list, segment.item);\n        return segment;\n    };\n    const createSegments = (scope, entry, size) => {\n        const segments = [];\n        for (let i = 0; i < size; i++) {\n            segments.push(createSegment(scope, isEntryList(entry) ? entry.listType : entry.parentListType));\n        }\n        return segments;\n    };\n    const populateSegments = (segments, entry) => {\n        for (let i = 0; i < segments.length - 1; i++) {\n            set$3(segments[i].item, 'list-style-type', 'none');\n        }\n        last$2(segments).each((segment) => {\n            if (isEntryList(entry)) {\n                setAll$1(segment.list, entry.listAttributes);\n                setAll$1(segment.item, entry.itemAttributes);\n            }\n            append(segment.item, entry.content);\n        });\n    };\n    const normalizeSegment = (segment, entry) => {\n        if (name(segment.list) !== entry.listType) {\n            segment.list = mutate(segment.list, entry.listType);\n        }\n        setAll$1(segment.list, entry.listAttributes);\n    };\n    const createItem = (scope, attr, content) => {\n        const item = SugarElement.fromTag('li', scope);\n        setAll$1(item, attr);\n        append(item, content);\n        return item;\n    };\n    const appendItem = (segment, item) => {\n        append$1(segment.list, item);\n        segment.item = item;\n    };\n    const writeShallow = (scope, cast, entry) => {\n        const newCast = cast.slice(0, entry.depth);\n        last$2(newCast).each((segment) => {\n            if (isEntryList(entry)) {\n                const item = createItem(scope, entry.itemAttributes, entry.content);\n                appendItem(segment, item);\n                normalizeSegment(segment, entry);\n            }\n            else if (isEntryFragment(entry)) {\n                append(segment.item, entry.content);\n            }\n            else {\n                const item = SugarElement.fromHtml(`<!--${entry.content}-->`);\n                append$1(segment.list, item);\n            }\n        });\n        return newCast;\n    };\n    const writeDeep = (scope, cast, entry) => {\n        const segments = createSegments(scope, entry, entry.depth - cast.length);\n        joinSegments(segments);\n        populateSegments(segments, entry);\n        appendSegments(cast, segments);\n        return cast.concat(segments);\n    };\n    const composeList = (scope, entries) => {\n        let firstCommentEntryOpt = Optional.none();\n        const cast = foldl(entries, (cast, entry, i) => {\n            if (!isEntryComment(entry)) {\n                return entry.depth > cast.length ? writeDeep(scope, cast, entry) : writeShallow(scope, cast, entry);\n            }\n            else {\n                // this is needed becuase if the first element of the list is a comment we would not have the data to create the new list\n                if (i === 0) {\n                    firstCommentEntryOpt = Optional.some(entry);\n                    return cast;\n                }\n                return writeShallow(scope, cast, entry);\n            }\n        }, []);\n        firstCommentEntryOpt.each((firstCommentEntry) => {\n            const item = SugarElement.fromHtml(`<!--${firstCommentEntry.content}-->`);\n            head(cast).each((fistCast) => {\n                prepend(fistCast.list, item);\n            });\n        });\n        return head(cast).map((segment) => segment.list);\n    };\n\n    const indentEntry = (editor, indentation, entry) => {\n        switch (indentation) {\n            case \"Indent\" /* Indentation.Indent */:\n                if (canIncreaseDepthOfList(editor, entry.depth)) {\n                    entry.depth++;\n                }\n                else {\n                    return;\n                }\n                break;\n            case \"Outdent\" /* Indentation.Outdent */:\n                entry.depth--;\n                break;\n            case \"Flatten\" /* Indentation.Flatten */:\n                entry.depth = 0;\n        }\n        entry.dirty = true;\n    };\n\n    const cloneListProperties = (target, source) => {\n        if (isEntryList(target) && isEntryList(source)) {\n            target.listType = source.listType;\n            target.listAttributes = { ...source.listAttributes };\n        }\n    };\n    const cleanListProperties = (entry) => {\n        // Remove the start attribute if generating a new list\n        entry.listAttributes = filter$4(entry.listAttributes, (_value, key) => key !== 'start');\n    };\n    // Closest entry above/below in the same list\n    const closestSiblingEntry = (entries, start) => {\n        const depth = entries[start].depth;\n        // Ignore dirty items as they've been moved and won't have the right list data yet\n        const matches = (entry) => entry.depth === depth && !entry.dirty;\n        const until = (entry) => entry.depth < depth;\n        // Check in reverse to see if there's an entry as the same depth before the current entry\n        // but if not, then try to walk forwards as well\n        return findUntil$1(reverse(entries.slice(0, start)), matches, until)\n            .orThunk(() => findUntil$1(entries.slice(start + 1), matches, until));\n    };\n    const normalizeEntries = (entries) => {\n        each$e(entries, (entry, i) => {\n            closestSiblingEntry(entries, i).fold(() => {\n                if (entry.dirty && isEntryList(entry)) {\n                    cleanListProperties(entry);\n                }\n            }, (matchingEntry) => cloneListProperties(entry, matchingEntry));\n        });\n        return entries;\n    };\n\n    const parseSingleItem = (depth, itemSelection, selectionState, item) => {\n        if (isComment$1(item)) {\n            return [{\n                    depth: depth + 1,\n                    content: item.dom.nodeValue ?? '',\n                    dirty: false,\n                    isSelected: false,\n                    isComment: true\n                }];\n        }\n        itemSelection.each((selection) => {\n            if (eq(selection.start, item)) {\n                selectionState.set(true);\n            }\n        });\n        const currentItemEntry = createEntry(item, depth, selectionState.get());\n        // Update selectionState (end)\n        itemSelection.each((selection) => {\n            if (eq(selection.end, item)) {\n                selectionState.set(false);\n            }\n        });\n        const childListEntries = lastChild(item)\n            .filter(isList)\n            .map((list) => parseList(depth, itemSelection, selectionState, list))\n            .getOr([]);\n        return currentItemEntry.toArray().concat(childListEntries);\n    };\n    const parseItem = (depth, itemSelection, selectionState, item) => firstChild(item).filter(isList).fold(() => parseSingleItem(depth, itemSelection, selectionState, item), (list) => {\n        const parsedSiblings = foldl(children$2(item), (acc, liChild, i) => {\n            if (i === 0) {\n                return acc;\n            }\n            else {\n                if (isListItem$1(liChild)) {\n                    return acc.concat(parseSingleItem(depth, itemSelection, selectionState, liChild));\n                }\n                else {\n                    const fragment = {\n                        isFragment: true,\n                        depth,\n                        content: [liChild],\n                        isSelected: false,\n                        dirty: false,\n                        parentListType: name(list)\n                    };\n                    return acc.concat(fragment);\n                }\n            }\n        }, []);\n        return parseList(depth, itemSelection, selectionState, list).concat(parsedSiblings);\n    });\n    const parseList = (depth, itemSelection, selectionState, list) => bind$3(children$2(list), (element) => {\n        const parser = isList(element) ? parseList : parseItem;\n        const newDepth = depth + 1;\n        return parser(newDepth, itemSelection, selectionState, element);\n    });\n    const parseLists = (lists, itemSelection) => {\n        const selectionState = Cell(false);\n        const initialDepth = 0;\n        return map$3(lists, (list) => ({\n            sourceList: list,\n            entries: parseList(initialDepth, itemSelection, selectionState, list)\n        }));\n    };\n\n    const outdentedComposer = (editor, entries) => {\n        const normalizedEntries = normalizeEntries(entries);\n        return map$3(normalizedEntries, (entry) => {\n            const content = !isEntryComment(entry)\n                ? fromElements(entry.content)\n                : fromElements([SugarElement.fromHtml(`<!--${entry.content}-->`)]);\n            const listItemAttrs = isEntryList(entry) ? entry.itemAttributes : {};\n            return SugarElement.fromDom(createTextBlock$1(editor, content.dom, listItemAttrs));\n        });\n    };\n    const indentedComposer = (editor, entries) => {\n        const normalizedEntries = normalizeEntries(entries);\n        return composeList(editor.contentDocument, normalizedEntries).toArray();\n    };\n    const composeEntries = (editor, entries) => bind$3(groupBy(entries, isIndented), (entries) => {\n        const groupIsIndented = head(entries).exists(isIndented);\n        return groupIsIndented ? indentedComposer(editor, entries) : outdentedComposer(editor, entries);\n    });\n    const indentSelectedEntries = (editor, entries, indentation) => {\n        each$e(filter$5(entries, isSelected), (entry) => indentEntry(editor, indentation, entry));\n    };\n    const getItemSelection = (editor) => {\n        const selectedListItems = map$3(getSelectedListItems(editor), SugarElement.fromDom);\n        return lift2(find$2(selectedListItems, not(hasFirstChildList)), find$2(reverse(selectedListItems), not(hasFirstChildList)), (start, end) => ({ start, end }));\n    };\n    const listIndentation = (editor, lists, indentation) => {\n        const entrySets = parseLists(lists, getItemSelection(editor));\n        each$e(entrySets, (entrySet) => {\n            indentSelectedEntries(editor, entrySet.entries, indentation);\n            const composedLists = composeEntries(editor, entrySet.entries);\n            each$e(composedLists, (composedList) => {\n                fireListEvent(editor, indentation === \"Indent\" /* Indentation.Indent */ ? \"IndentList\" /* ListAction.IndentList */ : \"OutdentList\" /* ListAction.OutdentList */, composedList.dom);\n            });\n            before$3(entrySet.sourceList, composedLists);\n            remove$8(entrySet.sourceList);\n        });\n    };\n    const canIndent$1 = (editor) => getListMaxDepth(editor).forall((max) => {\n        const blocks = editor.selection.getSelectedBlocks();\n        return exists(blocks, (element) => {\n            return closest$4(SugarElement.fromDom(element), 'li').forall((sugarElement) => ancestors(sugarElement, 'ol,ul').length <= max);\n        });\n    });\n\n    const DOM$8 = DOMUtils.DOM;\n    const splitList = (editor, list, li) => {\n        const removeAndKeepBookmarks = (targetNode) => {\n            const parent = targetNode.parentNode;\n            if (parent) {\n                Tools.each(bookmarks, (node) => {\n                    parent.insertBefore(node, li.parentNode);\n                });\n            }\n            DOM$8.remove(targetNode);\n        };\n        const bookmarks = DOM$8.select('span[data-mce-type=\"bookmark\"]', list);\n        const newBlock = createTextBlock$1(editor, li);\n        const tmpRng = DOM$8.createRng();\n        tmpRng.setStartAfter(li);\n        tmpRng.setEndAfter(list);\n        const fragment = tmpRng.extractContents();\n        for (let node = fragment.firstChild; node; node = node.firstChild) {\n            if (node.nodeName === 'LI' && editor.dom.isEmpty(node)) {\n                DOM$8.remove(node);\n                break;\n            }\n        }\n        if (!editor.dom.isEmpty(fragment)) {\n            DOM$8.insertAfter(fragment, list);\n        }\n        DOM$8.insertAfter(newBlock, list);\n        const parent = li.parentElement;\n        if (parent && isEmpty$1(editor.dom, parent)) {\n            removeAndKeepBookmarks(parent);\n        }\n        DOM$8.remove(li);\n        if (isEmpty$1(editor.dom, list)) {\n            DOM$8.remove(list);\n        }\n    };\n\n    const isDescriptionDetail = isTag('dd');\n    const isDescriptionTerm = isTag('dt');\n    const outdentDlItem = (editor, item) => {\n        if (isDescriptionDetail(item)) {\n            mutate(item, 'dt');\n        }\n        else if (isDescriptionTerm(item)) {\n            parentElement(item).each((dl) => splitList(editor, dl.dom, item.dom));\n        }\n    };\n    const indentDlItem = (item) => {\n        if (isDescriptionTerm(item)) {\n            mutate(item, 'dd');\n        }\n    };\n    const dlIndentation = (editor, indentation, dlItems) => {\n        if (indentation === \"Indent\" /* Indentation.Indent */) {\n            each$e(dlItems, indentDlItem);\n        }\n        else {\n            each$e(dlItems, (item) => outdentDlItem(editor, item));\n        }\n    };\n\n    const selectionIndentation = (editor, indentation) => {\n        const lists = fromDom$1(getSelectedListRoots(editor));\n        const dlItems = fromDom$1(getSelectedDlItems(editor));\n        let isHandled = false;\n        if (lists.length || dlItems.length) {\n            const bookmark = editor.selection.getBookmark();\n            listIndentation(editor, lists, indentation);\n            dlIndentation(editor, indentation, dlItems);\n            editor.selection.moveToBookmark(bookmark);\n            editor.selection.setRng(normalizeRange(editor.selection.getRng()));\n            editor.nodeChanged();\n            isHandled = true;\n        }\n        return isHandled;\n    };\n    const handleIndentation = (editor, indentation) => !selectionIsWithinNonEditableList(editor) && selectionIndentation(editor, indentation);\n    const indentListSelection = (editor) => handleIndentation(editor, \"Indent\" /* Indentation.Indent */);\n    const outdentListSelection = (editor) => handleIndentation(editor, \"Outdent\" /* Indentation.Outdent */);\n    const flattenListSelection = (editor) => handleIndentation(editor, \"Flatten\" /* Indentation.Flatten */);\n\n    const listToggleActionFromListName = (listName) => {\n        switch (listName) {\n            case 'UL': return \"ToggleUlList\" /* ListAction.ToggleUlList */;\n            case 'OL': return \"ToggleOlList\" /* ListAction.ToggleOlList */;\n            case 'DL': return \"ToggleDLList\" /* ListAction.ToggleDLList */;\n        }\n    };\n\n    const clearShadowingItemStyles = (editor) => {\n        each$e(getSelectedListItems(editor), (item) => {\n            const styleType = editor.dom.getStyle(item, 'list-style-type');\n            // Keep none intact as TinyMCE uses it for nested lists\n            if (isNonNullable(styleType) && styleType !== 'none') {\n                editor.dom.setStyle(item, 'list-style-type', '');\n            }\n        });\n    };\n\n    const updateListStyle = (dom, el, detail) => {\n        const type = detail['list-style-type'] ? detail['list-style-type'] : null;\n        dom.setStyle(el, 'list-style-type', type);\n    };\n    const setAttribs = (elm, attrs) => {\n        Tools.each(attrs, (value, key) => {\n            elm.setAttribute(key, value);\n        });\n    };\n    const updateListAttrs = (dom, el, detail) => {\n        setAttribs(el, detail['list-attributes']);\n        Tools.each(dom.select('li', el), (li) => {\n            setAttribs(li, detail['list-item-attributes']);\n        });\n    };\n    const updateListWithDetails = (dom, el, detail) => {\n        updateListStyle(dom, el, detail);\n        updateListAttrs(dom, el, detail);\n    };\n    const removeStyles = (dom, element, styles) => {\n        Tools.each(styles, (style) => dom.setStyle(element, style, ''));\n    };\n    const isInline$1 = (editor, node) => isNonNullable(node) && !isBlock(node, editor.schema.getBlockElements());\n    const getEndPointNode = (editor, rng, start, root) => {\n        let container = rng[start ? 'startContainer' : 'endContainer'];\n        const offset = rng[start ? 'startOffset' : 'endOffset'];\n        // Resolve node index\n        if (isElement$1(container)) {\n            container = container.childNodes[Math.min(offset, container.childNodes.length - 1)] || container;\n        }\n        if (!start && isBr$1(container.nextSibling)) {\n            container = container.nextSibling;\n        }\n        const findBlockAncestor = (node) => {\n            while (!editor.dom.isBlock(node) && node.parentNode && root !== node) {\n                node = node.parentNode;\n            }\n            return node;\n        };\n        // The reason why the next two if statements exist is because when the root node is a table cell (possibly some other node types)\n        // then the highest we can go up the dom hierarchy is one level below the table cell.\n        // So what happens when we have a bunch of inline nodes and text nodes in the table cell\n        // and when the selection is collapsed inside one of the inline nodes then only that inline node (or text node) will be included\n        // in the created list because that would be one level below td node and the other inline nodes won't be included.\n        // So the fix proposed is to traverse left when looking for start node (and traverse right when looking for end node)\n        // and keep traversing as long as we have an inline or text node (same for traversing right).\n        // This way we end up including all the inline elements in the created list.\n        // For more info look at #TINY-6853\n        const findBetterContainer = (container, forward) => {\n            const walker = new DomTreeWalker(container, findBlockAncestor(container));\n            const dir = forward ? 'next' : 'prev';\n            let node;\n            while ((node = walker[dir]())) {\n                if (!(isVoid(editor, node) || isZwsp$2(node.textContent) || node.textContent?.length === 0)) {\n                    return Optional.some(node);\n                }\n            }\n            return Optional.none();\n        };\n        // Traverse left to include inline/text nodes\n        if (start && isTextNode$1(container)) {\n            if (isZwsp$2(container.textContent)) {\n                container = findBetterContainer(container, false).getOr(container);\n            }\n            else {\n                if (container.parentNode !== null && isInline$1(editor, container.parentNode)) {\n                    container = container.parentNode;\n                }\n                while (container.previousSibling !== null && (isInline$1(editor, container.previousSibling) || isTextNode$1(container.previousSibling))) {\n                    container = container.previousSibling;\n                }\n            }\n        }\n        // Traverse right to include inline/text nodes\n        if (!start && isTextNode$1(container)) {\n            if (isZwsp$2(container.textContent)) {\n                container = findBetterContainer(container, true).getOr(container);\n            }\n            else {\n                if (container.parentNode !== null && isInline$1(editor, container.parentNode)) {\n                    container = container.parentNode;\n                }\n                while (container.nextSibling !== null && (isInline$1(editor, container.nextSibling) || isTextNode$1(container.nextSibling))) {\n                    container = container.nextSibling;\n                }\n            }\n        }\n        while (container.parentNode !== root) {\n            const parent = container.parentNode;\n            if (isTextBlock(editor, container)) {\n                return container;\n            }\n            if (/^(TD|TH)$/.test(parent.nodeName)) {\n                return container;\n            }\n            container = parent;\n        }\n        return container;\n    };\n    const getSelectedTextBlocks = (editor, rng, root) => {\n        const textBlocks = [];\n        const dom = editor.dom;\n        const startNode = getEndPointNode(editor, rng, true, root);\n        const endNode = getEndPointNode(editor, rng, false, root);\n        let block;\n        const siblings = [];\n        for (let node = startNode; node; node = node.nextSibling) {\n            siblings.push(node);\n            if (node === endNode) {\n                break;\n            }\n        }\n        Tools.each(siblings, (node) => {\n            if (isTextBlock(editor, node)) {\n                textBlocks.push(node);\n                block = null;\n                return;\n            }\n            if (dom.isBlock(node) || isBr$1(node)) {\n                if (isBr$1(node)) {\n                    dom.remove(node);\n                }\n                block = null;\n                return;\n            }\n            const nextSibling = node.nextSibling;\n            if (BookmarkManager.isBookmarkNode(node)) {\n                if (isListNode(nextSibling) || isTextBlock(editor, nextSibling) || (!nextSibling && node.parentNode === root)) {\n                    block = null;\n                    return;\n                }\n            }\n            if (!block) {\n                block = dom.create('p');\n                node.parentNode?.insertBefore(block, node);\n                textBlocks.push(block);\n            }\n            block.appendChild(node);\n        });\n        return textBlocks;\n    };\n    const hasCompatibleStyle = (dom, sib, detail) => {\n        const sibStyle = dom.getStyle(sib, 'list-style-type');\n        let detailStyle = detail ? detail['list-style-type'] : '';\n        detailStyle = detailStyle === null ? '' : detailStyle;\n        return sibStyle === detailStyle;\n    };\n    /*\n      Find the first element we would transform into a li-element if given no constraints.\n      If the common ancestor is higher up than that provide it as the starting-point for the search for the root instead of the first selected element.\n      This helps avoid issues with divs that should become li-elements are detected as the root when they should not be.\n    */\n    const getRootSearchStart = (editor, range) => {\n        const start = editor.selection.getStart(true);\n        const startPoint = getEndPointNode(editor, range, true, editor.getBody());\n        if (ancestor$2(SugarElement.fromDom(startPoint), SugarElement.fromDom(range.commonAncestorContainer))) {\n            return range.commonAncestorContainer;\n        }\n        else {\n            return start;\n        }\n    };\n    const applyList = (editor, listName, detail) => {\n        const rng = editor.selection.getRng();\n        let listItemName = 'LI';\n        const root = getClosestListHost(editor, getRootSearchStart(editor, rng), rng.collapsed);\n        const dom = editor.dom;\n        if (dom.getContentEditable(editor.selection.getNode()) === 'false') {\n            return;\n        }\n        listName = listName.toUpperCase();\n        if (listName === 'DL') {\n            listItemName = 'DT';\n        }\n        const bookmark = createBookmark(rng);\n        const selectedTextBlocks = filter$5(getSelectedTextBlocks(editor, rng, root), editor.dom.isEditable);\n        Tools.each(selectedTextBlocks, (block) => {\n            let listBlock;\n            const sibling = block.previousSibling;\n            const parent = block.parentNode;\n            if (!isListItemNode(parent)) {\n                if (sibling && isListNode(sibling) && sibling.nodeName === listName && hasCompatibleStyle(dom, sibling, detail)) {\n                    listBlock = sibling;\n                    block = dom.rename(block, listItemName);\n                    sibling.appendChild(block);\n                }\n                else {\n                    listBlock = dom.create(listName);\n                    parent.insertBefore(listBlock, block);\n                    listBlock.appendChild(block);\n                    block = dom.rename(block, listItemName);\n                }\n                removeStyles(dom, block, [\n                    'margin', 'margin-right', 'margin-bottom', 'margin-left', 'margin-top',\n                    'padding', 'padding-right', 'padding-bottom', 'padding-left', 'padding-top'\n                ]);\n                updateListWithDetails(dom, listBlock, detail);\n                mergeWithAdjacentLists(editor.dom, listBlock);\n            }\n        });\n        editor.selection.setRng(resolveBookmark(bookmark));\n    };\n    const isValidLists = (list1, list2) => {\n        return isListNode(list1) && list1.nodeName === list2?.nodeName;\n    };\n    const hasSameListStyle = (dom, list1, list2) => {\n        const targetStyle = dom.getStyle(list1, 'list-style-type', true);\n        const style = dom.getStyle(list2, 'list-style-type', true);\n        return targetStyle === style;\n    };\n    const hasSameClasses = (elm1, elm2) => {\n        return elm1.className === elm2.className;\n    };\n    const shouldMerge = (dom, list1, list2) => {\n        return isValidLists(list1, list2) &&\n            // Note: isValidLists will ensure list1 and list2 are a HTMLElement. Unfortunately TypeScript doesn't\n            // support type guards on multiple variables. See https://github.com/microsoft/TypeScript/issues/26916\n            hasSameListStyle(dom, list1, list2) &&\n            hasSameClasses(list1, list2);\n    };\n    const mergeWithAdjacentLists = (dom, listBlock) => {\n        let node;\n        let sibling = listBlock.nextSibling;\n        if (shouldMerge(dom, listBlock, sibling)) {\n            const liSibling = sibling;\n            while ((node = liSibling.firstChild)) {\n                listBlock.appendChild(node);\n            }\n            dom.remove(liSibling);\n        }\n        sibling = listBlock.previousSibling;\n        if (shouldMerge(dom, listBlock, sibling)) {\n            const liSibling = sibling;\n            while ((node = liSibling.lastChild)) {\n                listBlock.insertBefore(node, listBlock.firstChild);\n            }\n            dom.remove(liSibling);\n        }\n    };\n    const updateList$1 = (editor, list, listName, detail) => {\n        if (list.nodeName !== listName) {\n            const newList = editor.dom.rename(list, listName);\n            updateListWithDetails(editor.dom, newList, detail);\n            fireListEvent(editor, listToggleActionFromListName(listName), newList);\n        }\n        else {\n            updateListWithDetails(editor.dom, list, detail);\n            fireListEvent(editor, listToggleActionFromListName(listName), list);\n        }\n    };\n    const updateCustomList = (editor, list, listName, detail) => {\n        list.classList.forEach((cls, _, classList) => {\n            if (cls.startsWith('tox-')) {\n                classList.remove(cls);\n                if (classList.length === 0) {\n                    list.removeAttribute('class');\n                }\n            }\n        });\n        if (list.nodeName !== listName) {\n            const newList = editor.dom.rename(list, listName);\n            updateListWithDetails(editor.dom, newList, detail);\n            fireListEvent(editor, listToggleActionFromListName(listName), newList);\n        }\n        else {\n            updateListWithDetails(editor.dom, list, detail);\n            fireListEvent(editor, listToggleActionFromListName(listName), list);\n        }\n    };\n    const toggleMultipleLists = (editor, parentList, lists, listName, detail) => {\n        const parentIsList = isListNode(parentList);\n        if (parentIsList && parentList.nodeName === listName && !hasListStyleDetail(detail) && !isCustomList(parentList)) {\n            flattenListSelection(editor);\n        }\n        else {\n            applyList(editor, listName, detail);\n            const bookmark = createBookmark(editor.selection.getRng());\n            const allLists = parentIsList ? [parentList, ...lists] : lists;\n            const updateFunction = (parentIsList && isCustomList(parentList)) ? updateCustomList : updateList$1;\n            Tools.each(allLists, (elm) => {\n                updateFunction(editor, elm, listName, detail);\n            });\n            editor.selection.setRng(resolveBookmark(bookmark));\n        }\n    };\n    const hasListStyleDetail = (detail) => {\n        return 'list-style-type' in detail;\n    };\n    const toggleSingleList = (editor, parentList, listName, detail) => {\n        if (parentList === editor.getBody()) {\n            return;\n        }\n        if (parentList) {\n            if (parentList.nodeName === listName && !hasListStyleDetail(detail) && !isCustomList(parentList)) {\n                flattenListSelection(editor);\n            }\n            else {\n                const bookmark = createBookmark(editor.selection.getRng());\n                if (isCustomList(parentList)) {\n                    parentList.classList.forEach((cls, _, classList) => {\n                        if (cls.startsWith('tox-')) {\n                            classList.remove(cls);\n                            if (classList.length === 0) {\n                                parentList.removeAttribute('class');\n                            }\n                        }\n                    });\n                }\n                updateListWithDetails(editor.dom, parentList, detail);\n                const newList = editor.dom.rename(parentList, listName);\n                mergeWithAdjacentLists(editor.dom, newList);\n                editor.selection.setRng(resolveBookmark(bookmark));\n                applyList(editor, listName, detail);\n                fireListEvent(editor, listToggleActionFromListName(listName), newList);\n            }\n        }\n        else {\n            applyList(editor, listName, detail);\n            fireListEvent(editor, listToggleActionFromListName(listName), parentList);\n        }\n    };\n    const toggleList = (editor, listName, _detail) => {\n        const parentList = getParentList(editor);\n        if (isWithinNonEditableList$1(editor, parentList)) {\n            return;\n        }\n        const selectedSubLists = getSelectedSubLists(editor);\n        const detail = isObject(_detail) ? _detail : {};\n        if (selectedSubLists.length > 0) {\n            toggleMultipleLists(editor, parentList, selectedSubLists, listName, detail);\n        }\n        else {\n            toggleSingleList(editor, parentList, listName, detail);\n        }\n        clearShadowingItemStyles(editor);\n    };\n\n    const findNextCaretContainer = (editor, rng, isForward, root) => {\n        let node = rng.startContainer;\n        const offset = rng.startOffset;\n        if (isTextNode$1(node) && (isForward ? offset < node.data.length : offset > 0)) {\n            return node;\n        }\n        const nonEmptyBlocks = editor.schema.getNonEmptyElements();\n        if (isElement$1(node)) {\n            node = RangeUtils.getNode(node, offset);\n        }\n        const walker = new DomTreeWalker(node, root);\n        // Delete at <li>|<br></li> then jump over the bogus br\n        if (isForward) {\n            if (isBogusBr(editor.dom, node)) {\n                walker.next();\n            }\n        }\n        const walkFn = isForward ? walker.next.bind(walker) : walker.prev2.bind(walker);\n        while ((node = walkFn())) {\n            if (node.nodeName === 'LI' && !node.hasChildNodes()) {\n                return node;\n            }\n            if (nonEmptyBlocks[node.nodeName]) {\n                return node;\n            }\n            if (isTextNode$1(node) && node.data.length > 0) {\n                return node;\n            }\n        }\n        return null;\n    };\n    const hasOnlyOneBlockChild = (dom, elm) => {\n        const childNodes = elm.childNodes;\n        return childNodes.length === 1 && !isListNode(childNodes[0]) && dom.isBlock(childNodes[0]);\n    };\n    const isUnwrappable = (node) => Optional.from(node)\n        .map(SugarElement.fromDom)\n        .filter(isHTMLElement$1)\n        .exists((el) => isEditable$2(el) && !contains$2(['details'], name(el)));\n    const unwrapSingleBlockChild = (dom, elm) => {\n        if (hasOnlyOneBlockChild(dom, elm) && isUnwrappable(elm.firstChild)) {\n            dom.remove(elm.firstChild, true);\n        }\n    };\n    const moveChildren = (dom, fromElm, toElm) => {\n        let node;\n        const targetElm = hasOnlyOneBlockChild(dom, toElm) ? toElm.firstChild : toElm;\n        unwrapSingleBlockChild(dom, fromElm);\n        if (!isEmpty$1(dom, fromElm, true)) {\n            while ((node = fromElm.firstChild)) {\n                targetElm.appendChild(node);\n            }\n        }\n    };\n    const mergeLiElements = (dom, fromElm, toElm) => {\n        let listNode;\n        const ul = fromElm.parentNode;\n        if (!isChildOfBody(dom, fromElm) || !isChildOfBody(dom, toElm)) {\n            return;\n        }\n        if (isListNode(toElm.lastChild)) {\n            listNode = toElm.lastChild;\n        }\n        if (ul === toElm.lastChild) {\n            if (isBr$1(ul.previousSibling)) {\n                dom.remove(ul.previousSibling);\n            }\n        }\n        const node = toElm.lastChild;\n        if (node && isBr$1(node) && fromElm.hasChildNodes()) {\n            dom.remove(node);\n        }\n        if (isEmpty$1(dom, toElm, true)) {\n            empty(SugarElement.fromDom(toElm));\n        }\n        moveChildren(dom, fromElm, toElm);\n        if (listNode) {\n            toElm.appendChild(listNode);\n        }\n        const contains$1 = contains(SugarElement.fromDom(toElm), SugarElement.fromDom(fromElm));\n        const nestedLists = contains$1 ? dom.getParents(fromElm, isListNode, toElm) : [];\n        dom.remove(fromElm);\n        each$e(nestedLists, (list) => {\n            if (isEmpty$1(dom, list) && list !== dom.getRoot()) {\n                dom.remove(list);\n            }\n        });\n    };\n    const mergeIntoEmptyLi = (editor, fromLi, toLi) => {\n        empty(SugarElement.fromDom(toLi));\n        mergeLiElements(editor.dom, fromLi, toLi);\n        editor.selection.setCursorLocation(toLi, 0);\n    };\n    const mergeForward = (editor, rng, fromLi, toLi) => {\n        const dom = editor.dom;\n        if (dom.isEmpty(toLi)) {\n            mergeIntoEmptyLi(editor, fromLi, toLi);\n        }\n        else {\n            const bookmark = createBookmark(rng);\n            mergeLiElements(dom, fromLi, toLi);\n            editor.selection.setRng(resolveBookmark(bookmark));\n        }\n    };\n    const mergeBackward = (editor, rng, fromLi, toLi) => {\n        const bookmark = createBookmark(rng);\n        mergeLiElements(editor.dom, fromLi, toLi);\n        const resolvedBookmark = resolveBookmark(bookmark);\n        editor.selection.setRng(resolvedBookmark);\n    };\n    const backspaceDeleteFromListToListCaret = (editor, isForward) => {\n        const dom = editor.dom, selection = editor.selection;\n        const selectionStartElm = selection.getStart();\n        const root = getClosestEditingHost(editor, selectionStartElm);\n        const li = dom.getParent(selection.getStart(), 'LI', root);\n        if (li) {\n            const ul = li.parentElement;\n            if (ul === editor.getBody() && isEmpty$1(dom, ul)) {\n                return true;\n            }\n            const rng = normalizeRange(selection.getRng());\n            const otherLi = dom.getParent(findNextCaretContainer(editor, rng, isForward, root), 'LI', root);\n            const willMergeParentIntoChild = otherLi && (isForward ? dom.isChildOf(li, otherLi) : dom.isChildOf(otherLi, li));\n            if (otherLi && otherLi !== li && !willMergeParentIntoChild) {\n                editor.undoManager.transact(() => {\n                    if (isForward) {\n                        mergeForward(editor, rng, otherLi, li);\n                    }\n                    else {\n                        if (isFirstChild$1(li)) {\n                            outdentListSelection(editor);\n                        }\n                        else {\n                            mergeBackward(editor, rng, li, otherLi);\n                        }\n                    }\n                });\n                return true;\n            }\n            else if (willMergeParentIntoChild && !isForward && otherLi !== li) {\n                const commonAncestorParent = rng.commonAncestorContainer.parentElement;\n                if (!commonAncestorParent || dom.isChildOf(otherLi, commonAncestorParent)) {\n                    return false;\n                }\n                editor.undoManager.transact(() => {\n                    const bookmark = createBookmark(rng);\n                    moveChildren(dom, commonAncestorParent, otherLi);\n                    commonAncestorParent.remove();\n                    const resolvedBookmark = resolveBookmark(bookmark);\n                    editor.selection.setRng(resolvedBookmark);\n                });\n                return true;\n            }\n            else if (!otherLi) {\n                if (!isForward && rng.startOffset === 0 && rng.endOffset === 0) {\n                    editor.undoManager.transact(() => {\n                        flattenListSelection(editor);\n                    });\n                    return true;\n                }\n            }\n        }\n        return false;\n    };\n    const removeBlock = (dom, block, root) => {\n        const parentBlock = dom.getParent(block.parentNode, dom.isBlock, root);\n        dom.remove(block);\n        if (parentBlock && dom.isEmpty(parentBlock)) {\n            dom.remove(parentBlock);\n        }\n    };\n    const backspaceDeleteIntoListCaret = (editor, isForward) => {\n        const dom = editor.dom;\n        const selectionStartElm = editor.selection.getStart();\n        const root = getClosestEditingHost(editor, selectionStartElm);\n        const block = dom.getParent(selectionStartElm, dom.isBlock, root);\n        if (block && dom.isEmpty(block, undefined, { checkRootAsContent: true })) {\n            const rng = normalizeRange(editor.selection.getRng());\n            const nextCaretContainer = findNextCaretContainer(editor, rng, isForward, root);\n            const otherLi = dom.getParent(nextCaretContainer, 'LI', root);\n            if (nextCaretContainer && otherLi && (isForward || !dom.isChildOf(nextCaretContainer, block))) {\n                const findValidElement = (element) => contains$2(['td', 'th', 'caption'], name(element));\n                const findRoot = (node) => node.dom === root;\n                const otherLiCell = closest$5(SugarElement.fromDom(otherLi), findValidElement, findRoot);\n                const caretCell = closest$5(SugarElement.fromDom(rng.startContainer), findValidElement, findRoot);\n                if (!equals(otherLiCell, caretCell, eq)) {\n                    return false;\n                }\n                editor.undoManager.transact(() => {\n                    const parentNode = otherLi.parentNode;\n                    removeBlock(dom, block, root);\n                    mergeWithAdjacentLists(dom, parentNode);\n                    editor.selection.select(nextCaretContainer, true);\n                    editor.selection.collapse(isForward);\n                });\n                return true;\n            }\n        }\n        return false;\n    };\n    const backspaceDeleteCaret$1 = (editor, isForward) => {\n        return backspaceDeleteFromListToListCaret(editor, isForward) || backspaceDeleteIntoListCaret(editor, isForward);\n    };\n    const hasListSelection = (editor) => {\n        const selectionStartElm = editor.selection.getStart();\n        const root = getClosestEditingHost(editor, selectionStartElm);\n        const startListParent = editor.dom.getParent(selectionStartElm, 'LI,DT,DD', root);\n        return isNonNullable(startListParent) || getSelectedListItems(editor).length > 0;\n    };\n    const backspaceDeleteRange$1 = (editor, isForward) => {\n        if (hasListSelection(editor)) {\n            editor.undoManager.transact(() => {\n                if (symulateDelete(editor, isForward, () => editor.execCommand('Delete'))) {\n                    normalizeLists(editor.dom, editor.getBody());\n                }\n            });\n            return true;\n        }\n        return false;\n    };\n    const backspaceDelete$c = (editor, isForward) => {\n        const selection = editor.selection;\n        return !isWithinNonEditableList$1(editor, selection.getNode()) && (selection.isCollapsed() ?\n            backspaceDeleteCaret$1(editor, isForward) : backspaceDeleteRange$1(editor, isForward));\n    };\n\n    const blockPosition = (block, position) => ({\n        block,\n        position\n    });\n    const blockBoundary = (from, to) => ({\n        from,\n        to\n    });\n    const getBlockPosition = (rootNode, pos) => {\n        const rootElm = SugarElement.fromDom(rootNode);\n        const containerElm = SugarElement.fromDom(pos.container());\n        return getParentBlock$2(rootElm, containerElm).map((block) => blockPosition(block, pos));\n    };\n    const isNotAncestorial = (blockBoundary) => !(contains(blockBoundary.to.block, blockBoundary.from.block) || contains(blockBoundary.from.block, blockBoundary.to.block));\n    const isDifferentBlocks = (blockBoundary) => !eq(blockBoundary.from.block, blockBoundary.to.block);\n    const getClosestHost = (root, scope) => {\n        const isRoot = (node) => eq(node, root);\n        const isHost = (node) => isTableCell$2(node) || isContentEditableTrue$3(node.dom);\n        return closest$5(scope, isHost, isRoot).filter(isElement$8).getOr(root);\n    };\n    const hasSameHost = (rootNode, blockBoundary) => {\n        const root = SugarElement.fromDom(rootNode);\n        return eq(getClosestHost(root, blockBoundary.from.block), getClosestHost(root, blockBoundary.to.block));\n    };\n    const isEditable$1 = (blockBoundary) => isContentEditableFalse$a(blockBoundary.from.block.dom) === false && isContentEditableFalse$a(blockBoundary.to.block.dom) === false;\n    const hasValidBlocks = (blockBoundary) => {\n        const isValidBlock = (block) => isTextBlock$3(block) || hasBlockAttr(block.dom) || isListItem$2(block);\n        return isValidBlock(blockBoundary.from.block) && isValidBlock(blockBoundary.to.block);\n    };\n    const skipLastBr = (schema, rootNode, forward, blockPosition) => {\n        if (isBr$7(blockPosition.position.getNode()) && !isEmpty$4(schema, blockPosition.block)) {\n            return positionIn(false, blockPosition.block.dom).bind((lastPositionInBlock) => {\n                if (lastPositionInBlock.isEqual(blockPosition.position)) {\n                    return fromPosition(forward, rootNode, lastPositionInBlock).bind((to) => getBlockPosition(rootNode, to));\n                }\n                else {\n                    return Optional.some(blockPosition);\n                }\n            }).getOr(blockPosition);\n        }\n        else {\n            return blockPosition;\n        }\n    };\n    const readFromRange = (schema, rootNode, forward, rng) => {\n        const fromBlockPos = getBlockPosition(rootNode, CaretPosition.fromRangeStart(rng));\n        const toBlockPos = fromBlockPos.bind((blockPos) => fromPosition(forward, rootNode, blockPos.position).bind((to) => getBlockPosition(rootNode, to).map((blockPos) => skipLastBr(schema, rootNode, forward, blockPos))));\n        return lift2(fromBlockPos, toBlockPos, blockBoundary).filter((blockBoundary) => isDifferentBlocks(blockBoundary) && hasSameHost(rootNode, blockBoundary) && isEditable$1(blockBoundary) && hasValidBlocks(blockBoundary) && isNotAncestorial(blockBoundary));\n    };\n    const read$1 = (schema, rootNode, forward, rng) => rng.collapsed ? readFromRange(schema, rootNode, forward, rng) : Optional.none();\n\n    const getChildrenUntilBlockBoundary = (block, schema) => {\n        const children = children$2(block);\n        return findIndex$2(children, (el) => schema.isBlock(name(el))).fold(constant(children), (index) => children.slice(0, index));\n    };\n    const extractChildren = (block, schema) => {\n        const children = getChildrenUntilBlockBoundary(block, schema);\n        each$e(children, remove$8);\n        return children;\n    };\n    const removeEmptyRoot = (schema, rootNode, block) => {\n        const parents = parentsAndSelf(block, rootNode);\n        return find$2(parents.reverse(), (element) => isEmpty$4(schema, element)).each(remove$8);\n    };\n    const isEmptyBefore = (schema, el) => filter$5(prevSiblings(el), (el) => !isEmpty$4(schema, el)).length === 0;\n    const nestedBlockMerge = (rootNode, fromBlock, toBlock, schema, insertionPoint) => {\n        if (isEmpty$4(schema, toBlock)) {\n            fillWithPaddingBr(toBlock);\n            return firstPositionIn(toBlock.dom);\n        }\n        if (isEmptyBefore(schema, insertionPoint) && isEmpty$4(schema, fromBlock)) {\n            before$4(insertionPoint, SugarElement.fromTag('br'));\n        }\n        const position = prevPosition(toBlock.dom, CaretPosition.before(insertionPoint.dom));\n        each$e(extractChildren(fromBlock, schema), (child) => {\n            before$4(insertionPoint, child);\n        });\n        removeEmptyRoot(schema, rootNode, fromBlock);\n        return position;\n    };\n    const isInline = (schema, node) => schema.isInline(name(node));\n    const sidelongBlockMerge = (rootNode, fromBlock, toBlock, schema) => {\n        if (isEmpty$4(schema, toBlock)) {\n            if (isEmpty$4(schema, fromBlock)) {\n                const getInlineToBlockDescendants = (el) => {\n                    const helper = (node, elements) => firstChild(node).fold(() => elements, (child) => isInline(schema, child) ? helper(child, elements.concat(shallow(child))) : elements);\n                    return helper(el, []);\n                };\n                const newFromBlockDescendants = foldr(getInlineToBlockDescendants(toBlock), (element, descendant) => {\n                    wrap$2(element, descendant);\n                    return descendant;\n                }, createPaddingBr());\n                empty(fromBlock);\n                append$1(fromBlock, newFromBlockDescendants);\n            }\n            remove$8(toBlock);\n            return firstPositionIn(fromBlock.dom);\n        }\n        const position = lastPositionIn(toBlock.dom);\n        each$e(extractChildren(fromBlock, schema), (child) => {\n            append$1(toBlock, child);\n        });\n        removeEmptyRoot(schema, rootNode, fromBlock);\n        return position;\n    };\n    const findInsertionPoint = (toBlock, block) => {\n        const parentsAndSelf$1 = parentsAndSelf(block, toBlock);\n        return Optional.from(parentsAndSelf$1[parentsAndSelf$1.length - 1]);\n    };\n    const getInsertionPoint = (fromBlock, toBlock) => contains(toBlock, fromBlock) ? findInsertionPoint(toBlock, fromBlock) : Optional.none();\n    const trimBr = (first, block) => {\n        positionIn(first, block.dom)\n            .bind((position) => Optional.from(position.getNode()))\n            .map(SugarElement.fromDom)\n            .filter(isBr$6)\n            .each(remove$8);\n    };\n    const mergeBlockInto = (rootNode, fromBlock, toBlock, schema) => {\n        trimBr(true, fromBlock);\n        trimBr(false, toBlock);\n        return getInsertionPoint(fromBlock, toBlock).fold(curry(sidelongBlockMerge, rootNode, fromBlock, toBlock, schema), curry(nestedBlockMerge, rootNode, fromBlock, toBlock, schema));\n    };\n    const mergeBlocks = (rootNode, forward, block1, block2, schema) => forward ? mergeBlockInto(rootNode, block2, block1, schema) : mergeBlockInto(rootNode, block1, block2, schema);\n\n    const backspaceDelete$b = (editor, forward) => {\n        const rootNode = SugarElement.fromDom(editor.getBody());\n        const position = read$1(editor.schema, rootNode.dom, forward, editor.selection.getRng())\n            .map((blockBoundary) => () => {\n            mergeBlocks(rootNode, forward, blockBoundary.from.block, blockBoundary.to.block, editor.schema)\n                .each((pos) => {\n                editor.selection.setRng(pos.toRange());\n            });\n        });\n        return position;\n    };\n\n    const deleteRangeMergeBlocks = (rootNode, selection, schema) => {\n        const rng = selection.getRng();\n        return lift2(getParentBlock$2(rootNode, SugarElement.fromDom(rng.startContainer)), getParentBlock$2(rootNode, SugarElement.fromDom(rng.endContainer)), (block1, block2) => {\n            if (!eq(block1, block2)) {\n                return Optional.some(() => {\n                    rng.deleteContents();\n                    mergeBlocks(rootNode, true, block1, block2, schema).each((pos) => {\n                        selection.setRng(pos.toRange());\n                    });\n                });\n            }\n            else {\n                return Optional.none();\n            }\n        }).getOr(Optional.none());\n    };\n    const isRawNodeInTable = (root, rawNode) => {\n        const node = SugarElement.fromDom(rawNode);\n        const isRoot = curry(eq, root);\n        return ancestor$5(node, isTableCell$2, isRoot).isSome();\n    };\n    const isSelectionInTable = (root, rng) => isRawNodeInTable(root, rng.startContainer) || isRawNodeInTable(root, rng.endContainer);\n    const isEverythingSelected = (root, rng) => {\n        const noPrevious = prevPosition(root.dom, CaretPosition.fromRangeStart(rng)).isNone();\n        const noNext = nextPosition(root.dom, CaretPosition.fromRangeEnd(rng)).isNone();\n        return !isSelectionInTable(root, rng) && noPrevious && noNext;\n    };\n    const emptyEditor = (editor) => {\n        return Optional.some(() => {\n            editor.setContent('');\n            editor.selection.setCursorLocation();\n        });\n    };\n    const deleteRange$3 = (editor) => {\n        const rootNode = SugarElement.fromDom(editor.getBody());\n        const rng = editor.selection.getRng();\n        return isEverythingSelected(rootNode, rng) ? emptyEditor(editor) : deleteRangeMergeBlocks(rootNode, editor.selection, editor.schema);\n    };\n    const backspaceDelete$a = (editor, _forward) => editor.selection.isCollapsed() ? Optional.none() : deleteRange$3(editor);\n\n    const showCaret = (direction, editor, node, before, scrollIntoView) => \n    // TODO: Figure out a better way to handle this dependency\n    Optional.from(editor._selectionOverrides.showCaret(direction, node, before, scrollIntoView));\n    const getNodeRange = (node) => {\n        const rng = node.ownerDocument.createRange();\n        rng.selectNode(node);\n        return rng;\n    };\n    const selectNode = (editor, node) => {\n        const e = editor.dispatch('BeforeObjectSelected', { target: node });\n        if (e.isDefaultPrevented()) {\n            return Optional.none();\n        }\n        return Optional.some(getNodeRange(node));\n    };\n    const renderCaretAtRange = (editor, range, scrollIntoView) => {\n        const normalizedRange = normalizeRange$2(1, editor.getBody(), range);\n        const caretPosition = CaretPosition.fromRangeStart(normalizedRange);\n        const caretPositionNode = caretPosition.getNode();\n        if (isInlineFakeCaretTarget(caretPositionNode)) {\n            return showCaret(1, editor, caretPositionNode, !caretPosition.isAtEnd(), false);\n        }\n        const caretPositionBeforeNode = caretPosition.getNode(true);\n        if (isInlineFakeCaretTarget(caretPositionBeforeNode)) {\n            return showCaret(1, editor, caretPositionBeforeNode, false, false);\n        }\n        // TODO: Should render caret before/after depending on where you click on the page forces after now\n        const ceRoot = getContentEditableRoot$1(editor.dom.getRoot(), caretPosition.getNode());\n        if (isInlineFakeCaretTarget(ceRoot)) {\n            return showCaret(1, editor, ceRoot, false, scrollIntoView);\n        }\n        return Optional.none();\n    };\n    const renderRangeCaret = (editor, range, scrollIntoView) => range.collapsed ? renderCaretAtRange(editor, range, scrollIntoView).getOr(range) : range;\n\n    const isBeforeBoundary = (pos) => isBeforeContentEditableFalse(pos) || isBeforeMedia(pos);\n    const isAfterBoundary = (pos) => isAfterContentEditableFalse(pos) || isAfterMedia(pos);\n    const trimEmptyTextNode = (dom, node) => {\n        if (isText$b(node) && node.data.length === 0) {\n            dom.remove(node);\n        }\n    };\n    const deleteContentAndShowCaret = (editor, range, node, direction, forward, peekCaretPosition) => {\n        showCaret(direction, editor, peekCaretPosition.getNode(!forward), forward, true).each((caretRange) => {\n            // Delete the selected content\n            if (range.collapsed) {\n                const deleteRange = range.cloneRange();\n                if (forward) {\n                    deleteRange.setEnd(caretRange.startContainer, caretRange.startOffset);\n                }\n                else {\n                    deleteRange.setStart(caretRange.endContainer, caretRange.endOffset);\n                }\n                deleteRange.deleteContents();\n            }\n            else {\n                range.deleteContents();\n            }\n            editor.selection.setRng(caretRange);\n        });\n        trimEmptyTextNode(editor.dom, node);\n    };\n    // If the caret position is next to a fake caret target element (eg cef/media) after a delete operation, then ensure a caret is added\n    // eg. <span cE=false>a|b -> <span cE=false>|bc\n    // Note: We also need to handle the actual deletion, as some browsers (eg IE) move the selection to the opposite side of the cef element\n    const deleteBoundaryText = (editor, forward) => {\n        const range = editor.selection.getRng();\n        if (!isText$b(range.commonAncestorContainer)) {\n            return Optional.none();\n        }\n        const direction = forward ? 1 /* HDirection.Forwards */ : -1 /* HDirection.Backwards */;\n        const caretWalker = CaretWalker(editor.getBody());\n        const getNextPosFn = curry(getVisualCaretPosition, forward ? caretWalker.next : caretWalker.prev);\n        const isBeforeFn = forward ? isBeforeBoundary : isAfterBoundary;\n        // Get the next caret position. ie where it'll be after the delete\n        const caretPosition = getNormalizedRangeEndPoint(direction, editor.getBody(), range);\n        const nextCaretPosition = getNextPosFn(caretPosition);\n        const normalizedNextCaretPosition = nextCaretPosition ? normalizePosition(forward, nextCaretPosition) : nextCaretPosition;\n        if (!normalizedNextCaretPosition || !isMoveInsideSameBlock(caretPosition, normalizedNextCaretPosition)) {\n            return Optional.none();\n        }\n        else if (isBeforeFn(normalizedNextCaretPosition)) {\n            return Optional.some(() => deleteContentAndShowCaret(editor, range, caretPosition.getNode(), direction, forward, normalizedNextCaretPosition));\n        }\n        // Peek ahead and see if the next element is a cef/media element\n        const peekCaretPosition = getNextPosFn(normalizedNextCaretPosition);\n        if (peekCaretPosition && isBeforeFn(peekCaretPosition)) {\n            if (isMoveInsideSameBlock(normalizedNextCaretPosition, peekCaretPosition)) {\n                return Optional.some(() => deleteContentAndShowCaret(editor, range, caretPosition.getNode(), direction, forward, peekCaretPosition));\n            }\n        }\n        return Optional.none();\n    };\n    const backspaceDelete$9 = (editor, forward) => deleteBoundaryText(editor, forward);\n\n    const getEdgeCefPosition = (editor, atStart) => {\n        const root = editor.getBody();\n        return atStart ? firstPositionIn(root).filter(isBeforeContentEditableFalse) :\n            lastPositionIn(root).filter(isAfterContentEditableFalse);\n    };\n    const isCefAtEdgeSelected = (editor) => {\n        const rng = editor.selection.getRng();\n        return !rng.collapsed\n            && (getEdgeCefPosition(editor, true).exists((pos) => pos.isEqual(CaretPosition.fromRangeStart(rng)))\n                || getEdgeCefPosition(editor, false).exists((pos) => pos.isEqual(CaretPosition.fromRangeEnd(rng))));\n    };\n\n    const isCompoundElement = (node) => isNonNullable(node) && (isTableCell$2(SugarElement.fromDom(node)) || isListItem$2(SugarElement.fromDom(node)));\n    const DeleteAction = Adt.generate([\n        { remove: ['element'] },\n        { moveToElement: ['element'] },\n        { moveToPosition: ['position'] }\n    ]);\n    const isAtContentEditableBlockCaret = (forward, from) => {\n        const elm = from.getNode(!forward);\n        const caretLocation = forward ? 'after' : 'before';\n        return isElement$7(elm) && elm.getAttribute('data-mce-caret') === caretLocation;\n    };\n    const isDeleteFromCefDifferentBlocks = (root, forward, from, to, schema) => {\n        const inSameBlock = (elm) => schema.isInline(elm.nodeName.toLowerCase()) && !isInSameBlock(from, to, root);\n        return getRelativeCefElm(!forward, from).fold(() => getRelativeCefElm(forward, to).fold(never, inSameBlock), inSameBlock);\n    };\n    const deleteEmptyBlockOrMoveToCef = (schema, root, forward, from, to) => {\n        // TODO: TINY-8865 - This may not be safe to cast as Node below and alternative solutions need to be looked into\n        const toCefElm = to.getNode(!forward);\n        return getParentBlock$2(SugarElement.fromDom(root), SugarElement.fromDom(from.getNode())).map((blockElm) => isEmpty$4(schema, blockElm) ? DeleteAction.remove(blockElm.dom) : DeleteAction.moveToElement(toCefElm)).orThunk(() => Optional.some(DeleteAction.moveToElement(toCefElm)));\n    };\n    const findCefPosition = (root, forward, from, schema) => fromPosition(forward, root, from).bind((to) => {\n        if (isCompoundElement(to.getNode())) {\n            return Optional.none();\n        }\n        else if (isDeleteFromCefDifferentBlocks(root, forward, from, to, schema)) {\n            return Optional.none();\n        }\n        else if (forward && isContentEditableFalse$a(to.getNode())) {\n            return deleteEmptyBlockOrMoveToCef(schema, root, forward, from, to);\n        }\n        else if (!forward && isContentEditableFalse$a(to.getNode(true))) {\n            return deleteEmptyBlockOrMoveToCef(schema, root, forward, from, to);\n        }\n        else if (forward && isAfterContentEditableFalse(from)) {\n            return Optional.some(DeleteAction.moveToPosition(to));\n        }\n        else if (!forward && isBeforeContentEditableFalse(from)) {\n            return Optional.some(DeleteAction.moveToPosition(to));\n        }\n        else {\n            return Optional.none();\n        }\n    });\n    const getContentEditableBlockAction = (forward, elm) => {\n        if (isNullable(elm)) {\n            return Optional.none();\n        }\n        else if (forward && isContentEditableFalse$a(elm.nextSibling)) {\n            return Optional.some(DeleteAction.moveToElement(elm.nextSibling));\n        }\n        else if (!forward && isContentEditableFalse$a(elm.previousSibling)) {\n            return Optional.some(DeleteAction.moveToElement(elm.previousSibling));\n        }\n        else {\n            return Optional.none();\n        }\n    };\n    const skipMoveToActionFromInlineCefToContent = (root, from, deleteAction) => deleteAction.fold((elm) => Optional.some(DeleteAction.remove(elm)), (elm) => Optional.some(DeleteAction.moveToElement(elm)), (to) => {\n        if (isInSameBlock(from, to, root)) {\n            return Optional.none();\n        }\n        else {\n            return Optional.some(DeleteAction.moveToPosition(to));\n        }\n    });\n    const getContentEditableAction = (root, forward, from, schema) => {\n        if (isAtContentEditableBlockCaret(forward, from)) {\n            return getContentEditableBlockAction(forward, from.getNode(!forward))\n                .orThunk(() => findCefPosition(root, forward, from, schema));\n        }\n        else {\n            return findCefPosition(root, forward, from, schema).bind((deleteAction) => skipMoveToActionFromInlineCefToContent(root, from, deleteAction));\n        }\n    };\n    const read = (root, forward, rng, schema) => {\n        const normalizedRange = normalizeRange$2(forward ? 1 : -1, root, rng);\n        const from = CaretPosition.fromRangeStart(normalizedRange);\n        const rootElement = SugarElement.fromDom(root);\n        // TODO: TINY-8865 - This may not be safe to cast as Node below and alternative solutions need to be looked into\n        if (!forward && isAfterContentEditableFalse(from)) {\n            return Optional.some(DeleteAction.remove(from.getNode(true)));\n        }\n        else if (forward && isBeforeContentEditableFalse(from)) {\n            return Optional.some(DeleteAction.remove(from.getNode()));\n        }\n        else if (!forward && isBeforeContentEditableFalse(from) && isAfterBr(rootElement, from, schema)) {\n            return findPreviousBr(rootElement, from, schema).map((br) => DeleteAction.remove(br.getNode()));\n        }\n        else if (forward && isAfterContentEditableFalse(from) && isBeforeBr$1(rootElement, from, schema)) {\n            return findNextBr(rootElement, from, schema).map((br) => DeleteAction.remove(br.getNode()));\n        }\n        else {\n            return getContentEditableAction(root, forward, from, schema);\n        }\n    };\n\n    const deleteElement$1 = (editor, forward) => (element) => {\n        editor._selectionOverrides.hideFakeCaret();\n        deleteElement$2(editor, forward, SugarElement.fromDom(element));\n        return true;\n    };\n    const moveToElement = (editor, forward) => (element) => {\n        const pos = forward ? CaretPosition.before(element) : CaretPosition.after(element);\n        editor.selection.setRng(pos.toRange());\n        return true;\n    };\n    const moveToPosition = (editor) => (pos) => {\n        editor.selection.setRng(pos.toRange());\n        return true;\n    };\n    const getAncestorCe = (editor, node) => Optional.from(getContentEditableRoot$1(editor.getBody(), node));\n    const backspaceDeleteCaret = (editor, forward) => {\n        const selectedNode = editor.selection.getNode(); // is the parent node if cursor before/after cef\n        // Cases:\n        // 1. CEF selectedNode -> return true\n        // 2. CET selectedNode -> try to delete, return true if possible else false\n        // 3. CET ancestor -> try to delete, return true if possible else false\n        // 4. no CET/CEF ancestor -> try to delete, return true if possible else false\n        // 5. CEF ancestor -> return true\n        return getAncestorCe(editor, selectedNode).filter(isContentEditableFalse$a).fold(() => read(editor.getBody(), forward, editor.selection.getRng(), editor.schema).map((deleteAction) => () => deleteAction.fold(deleteElement$1(editor, forward), moveToElement(editor, forward), moveToPosition(editor))), () => Optional.some(noop));\n    };\n    const deleteOffscreenSelection = (rootElement) => {\n        each$e(descendants(rootElement, '.mce-offscreen-selection'), remove$8);\n    };\n    const backspaceDeleteRange = (editor, forward) => {\n        const selectedNode = editor.selection.getNode(); // is the cef node if cef is selected\n        // Cases:\n        // 1. Table cell -> return false, as this is handled by `TableDelete` instead\n        // 2. CEF selectedNode\n        //    a. no ancestor CET/CEF || CET ancestor -> run delete code and return true\n        //    b. CEF ancestor -> return true\n        // 3. non-CEF selectedNode -> return false\n        if (isContentEditableFalse$a(selectedNode) && !isTableCell$3(selectedNode)) {\n            const hasCefAncestor = getAncestorCe(editor, selectedNode.parentNode).filter(isContentEditableFalse$a);\n            return hasCefAncestor.fold(() => Optional.some(() => {\n                deleteOffscreenSelection(SugarElement.fromDom(editor.getBody()));\n                deleteElement$2(editor, forward, SugarElement.fromDom(editor.selection.getNode()));\n                paddEmptyBody(editor);\n            }), () => Optional.some(noop));\n        }\n        if (isCefAtEdgeSelected(editor)) {\n            return Optional.some(() => {\n                deleteRangeContents(editor, editor.selection.getRng(), SugarElement.fromDom(editor.getBody()));\n            });\n        }\n        return Optional.none();\n    };\n    const paddEmptyElement = (editor) => {\n        const dom = editor.dom, selection = editor.selection;\n        const ceRoot = getContentEditableRoot$1(editor.getBody(), selection.getNode());\n        if (isContentEditableTrue$3(ceRoot) && dom.isBlock(ceRoot) && dom.isEmpty(ceRoot)) {\n            const br = dom.create('br', { 'data-mce-bogus': '1' });\n            dom.setHTML(ceRoot, '');\n            ceRoot.appendChild(br);\n            selection.setRng(CaretPosition.before(br).toRange());\n        }\n        return true;\n    };\n    const backspaceDelete$8 = (editor, forward) => {\n        if (editor.selection.isCollapsed()) {\n            return backspaceDeleteCaret(editor, forward);\n        }\n        else {\n            return backspaceDeleteRange(editor, forward);\n        }\n    };\n\n    const backspaceDelete$7 = (editor, forward) => {\n        const dom = editor.dom;\n        const startBlock = dom.getParent(editor.selection.getStart(), dom.isBlock);\n        const endBlock = dom.getParent(editor.selection.getEnd(), dom.isBlock);\n        const body = editor.getBody();\n        const startBlockName = startBlock?.nodeName?.toLowerCase();\n        // Only act on single root div that is not empty\n        if (startBlockName === 'div' && startBlock && endBlock && startBlock === body.firstChild && endBlock === body.lastChild && !dom.isEmpty(body)) {\n            const wrapper = startBlock.cloneNode(false);\n            const deleteAction = () => {\n                if (forward) {\n                    execNativeForwardDeleteCommand(editor);\n                }\n                else {\n                    execNativeDeleteCommand(editor);\n                }\n                // Div was deleted by delete operation then lets restore it\n                if (body.firstChild !== startBlock) {\n                    const bookmark = createBookmark(editor.selection.getRng(), () => document.createElement('span'));\n                    Array.from(body.childNodes).forEach((node) => wrapper.appendChild(node));\n                    body.appendChild(wrapper);\n                    editor.selection.setRng(resolveBookmark(bookmark));\n                }\n            };\n            return Optional.some(deleteAction);\n        }\n        return Optional.none();\n    };\n\n    const deleteCaret$2 = (editor, forward) => {\n        const fromPos = CaretPosition.fromRangeStart(editor.selection.getRng());\n        return fromPosition(forward, editor.getBody(), fromPos)\n            .filter((pos) => forward ? isBeforeImageBlock(pos) : isAfterImageBlock(pos))\n            .bind((pos) => getChildNodeAtRelativeOffset(forward ? 0 : -1, pos))\n            .map((elm) => () => editor.selection.select(elm));\n    };\n    const backspaceDelete$6 = (editor, forward) => editor.selection.isCollapsed() ? deleteCaret$2(editor, forward) : Optional.none();\n\n    const isText$2 = isText$b;\n    const startsWithCaretContainer = (node) => isText$2(node) && node.data[0] === ZWSP$1;\n    const endsWithCaretContainer = (node) => isText$2(node) && node.data[node.data.length - 1] === ZWSP$1;\n    const createZwsp = (node) => {\n        const doc = node.ownerDocument ?? document;\n        return doc.createTextNode(ZWSP$1);\n    };\n    const insertBefore$1 = (node) => {\n        if (isText$2(node.previousSibling)) {\n            if (endsWithCaretContainer(node.previousSibling)) {\n                return node.previousSibling;\n            }\n            else {\n                node.previousSibling.appendData(ZWSP$1);\n                return node.previousSibling;\n            }\n        }\n        else if (isText$2(node)) {\n            if (startsWithCaretContainer(node)) {\n                return node;\n            }\n            else {\n                node.insertData(0, ZWSP$1);\n                return node;\n            }\n        }\n        else {\n            const newNode = createZwsp(node);\n            node.parentNode?.insertBefore(newNode, node);\n            return newNode;\n        }\n    };\n    const insertAfter$1 = (node) => {\n        if (isText$2(node.nextSibling)) {\n            if (startsWithCaretContainer(node.nextSibling)) {\n                return node.nextSibling;\n            }\n            else {\n                node.nextSibling.insertData(0, ZWSP$1);\n                return node.nextSibling;\n            }\n        }\n        else if (isText$2(node)) {\n            if (endsWithCaretContainer(node)) {\n                return node;\n            }\n            else {\n                node.appendData(ZWSP$1);\n                return node;\n            }\n        }\n        else {\n            const newNode = createZwsp(node);\n            if (node.nextSibling) {\n                node.parentNode?.insertBefore(newNode, node.nextSibling);\n            }\n            else {\n                node.parentNode?.appendChild(newNode);\n            }\n            return newNode;\n        }\n    };\n    const insertInline = (before, node) => before ? insertBefore$1(node) : insertAfter$1(node);\n    const insertInlineBefore = curry(insertInline, true);\n    const insertInlineAfter = curry(insertInline, false);\n\n    const insertInlinePos = (pos, before) => {\n        if (isText$b(pos.container())) {\n            return insertInline(before, pos.container());\n        }\n        else {\n            // TODO: TINY-8865 - This may not be safe to cast as Node and alternative solutions need to be looked into\n            return insertInline(before, pos.getNode());\n        }\n    };\n    const isPosCaretContainer = (pos, caret) => {\n        const caretNode = caret.get();\n        return caretNode && pos.container() === caretNode && isCaretContainerInline(caretNode);\n    };\n    const renderCaret = (caret, location) => location.fold((element) => {\n        remove$2(caret.get());\n        const text = insertInlineBefore(element);\n        caret.set(text);\n        return Optional.some(CaretPosition(text, text.length - 1));\n    }, (element) => // Start\n     firstPositionIn(element).map((pos) => {\n        if (!isPosCaretContainer(pos, caret)) {\n            remove$2(caret.get());\n            const text = insertInlinePos(pos, true);\n            caret.set(text);\n            return CaretPosition(text, 1);\n        }\n        else {\n            const node = caret.get();\n            return CaretPosition(node, 1);\n        }\n    }), (element) => // End\n     lastPositionIn(element).map((pos) => {\n        if (!isPosCaretContainer(pos, caret)) {\n            remove$2(caret.get());\n            const text = insertInlinePos(pos, false);\n            caret.set(text);\n            return CaretPosition(text, text.length - 1);\n        }\n        else {\n            const node = caret.get();\n            return CaretPosition(node, node.length - 1);\n        }\n    }), (element) => {\n        remove$2(caret.get());\n        const text = insertInlineAfter(element);\n        caret.set(text);\n        return Optional.some(CaretPosition(text, 1));\n    });\n\n    const evaluateUntil = (fns, args) => {\n        for (let i = 0; i < fns.length; i++) {\n            const result = fns[i].apply(null, args);\n            if (result.isSome()) {\n                return result;\n            }\n        }\n        return Optional.none();\n    };\n\n    const Location = Adt.generate([\n        { before: ['element'] },\n        { start: ['element'] },\n        { end: ['element'] },\n        { after: ['element'] }\n    ]);\n    const rescope$1 = (rootNode, node) => {\n        const parentBlock = getParentBlock$3(node, rootNode);\n        return parentBlock ? parentBlock : rootNode;\n    };\n    const before = (isInlineTarget, rootNode, pos) => {\n        const nPos = normalizeForwards(pos);\n        const scope = rescope$1(rootNode, nPos.container());\n        return findRootInline(isInlineTarget, scope, nPos).fold(() => nextPosition(scope, nPos)\n            .bind(curry(findRootInline, isInlineTarget, scope))\n            .map((inline) => Location.before(inline)), Optional.none);\n    };\n    const isNotInsideFormatCaretContainer = (rootNode, elm) => getParentCaretContainer(rootNode, elm) === null;\n    const findInsideRootInline = (isInlineTarget, rootNode, pos) => findRootInline(isInlineTarget, rootNode, pos).filter(curry(isNotInsideFormatCaretContainer, rootNode));\n    const start$1 = (isInlineTarget, rootNode, pos) => {\n        const nPos = normalizeBackwards(pos);\n        return findInsideRootInline(isInlineTarget, rootNode, nPos).bind((inline) => {\n            const prevPos = prevPosition(inline, nPos);\n            return prevPos.isNone() ? Optional.some(Location.start(inline)) : Optional.none();\n        });\n    };\n    const end = (isInlineTarget, rootNode, pos) => {\n        const nPos = normalizeForwards(pos);\n        return findInsideRootInline(isInlineTarget, rootNode, nPos).bind((inline) => {\n            const nextPos = nextPosition(inline, nPos);\n            return nextPos.isNone() ? Optional.some(Location.end(inline)) : Optional.none();\n        });\n    };\n    const after = (isInlineTarget, rootNode, pos) => {\n        const nPos = normalizeBackwards(pos);\n        const scope = rescope$1(rootNode, nPos.container());\n        return findRootInline(isInlineTarget, scope, nPos).fold(() => prevPosition(scope, nPos)\n            .bind(curry(findRootInline, isInlineTarget, scope))\n            .map((inline) => Location.after(inline)), Optional.none);\n    };\n    const isValidLocation = (location) => !isRtl(getElement(location));\n    const readLocation = (isInlineTarget, rootNode, pos) => {\n        const location = evaluateUntil([\n            before,\n            start$1,\n            end,\n            after\n        ], [isInlineTarget, rootNode, pos]);\n        return location.filter(isValidLocation);\n    };\n    const getElement = (location) => location.fold(identity, // Before\n    identity, // Start\n    identity, // End\n    identity // After\n    );\n    const getName = (location) => location.fold(constant('before'), // Before\n    constant('start'), // Start\n    constant('end'), // End\n    constant('after') // After\n    );\n    const outside = (location) => location.fold(Location.before, // Before\n    Location.before, // Start\n    Location.after, // End\n    Location.after // After\n    );\n    const inside = (location) => location.fold(Location.start, // Before\n    Location.start, // Start\n    Location.end, // End\n    Location.end // After\n    );\n    const isEq = (location1, location2) => getName(location1) === getName(location2) && getElement(location1) === getElement(location2);\n    const betweenInlines = (forward, isInlineTarget, rootNode, from, to, location) => lift2(findRootInline(isInlineTarget, rootNode, from), findRootInline(isInlineTarget, rootNode, to), (fromInline, toInline) => {\n        if (fromInline !== toInline && hasSameParentBlock(rootNode, fromInline, toInline)) {\n            // Force after since some browsers normalize and lean left into the closest inline\n            return Location.after(forward ? fromInline : toInline);\n        }\n        else {\n            return location;\n        }\n    }).getOr(location);\n    const skipNoMovement = (fromLocation, toLocation) => fromLocation.fold(always, (fromLocation) => !isEq(fromLocation, toLocation));\n    const findLocationTraverse = (forward, isInlineTarget, rootNode, fromLocation, pos) => {\n        const from = normalizePosition(forward, pos);\n        const to = fromPosition(forward, rootNode, from).map(curry(normalizePosition, forward));\n        const location = to.fold(() => fromLocation.map(outside), (to) => readLocation(isInlineTarget, rootNode, to)\n            .map(curry(betweenInlines, forward, isInlineTarget, rootNode, from, to))\n            .filter(curry(skipNoMovement, fromLocation)));\n        return location.filter(isValidLocation);\n    };\n    const findLocationSimple = (forward, location) => {\n        if (forward) {\n            return location.fold(compose(Optional.some, Location.start), // Before -> Start\n            Optional.none, compose(Optional.some, Location.after), // End -> After\n            Optional.none);\n        }\n        else {\n            return location.fold(Optional.none, compose(Optional.some, Location.before), // Before <- Start\n            Optional.none, compose(Optional.some, Location.end) // End <- After\n            );\n        }\n    };\n    const findLocation$1 = (forward, isInlineTarget, rootNode, pos) => {\n        const from = normalizePosition(forward, pos);\n        const fromLocation = readLocation(isInlineTarget, rootNode, from);\n        return readLocation(isInlineTarget, rootNode, from).bind(curry(findLocationSimple, forward))\n            .orThunk(() => findLocationTraverse(forward, isInlineTarget, rootNode, fromLocation, pos));\n    };\n\n    const hasSelectionModifyApi = (editor) => {\n        return isFunction(editor.selection.getSel().modify);\n    };\n    const moveRel = (forward, selection, pos) => {\n        const delta = forward ? 1 : -1;\n        selection.setRng(CaretPosition(pos.container(), pos.offset() + delta).toRange());\n        selection.getSel().modify('move', forward ? 'forward' : 'backward', 'word');\n        return true;\n    };\n    const moveByWord = (forward, editor) => {\n        const rng = editor.selection.getRng();\n        const pos = forward ? CaretPosition.fromRangeEnd(rng) : CaretPosition.fromRangeStart(rng);\n        if (!hasSelectionModifyApi(editor)) {\n            return false;\n        }\n        else if (forward && isBeforeInline(pos)) {\n            return moveRel(true, editor.selection, pos);\n        }\n        else if (!forward && isAfterInline(pos)) {\n            return moveRel(false, editor.selection, pos);\n        }\n        else {\n            return false;\n        }\n    };\n\n    var BreakType;\n    (function (BreakType) {\n        BreakType[BreakType[\"Br\"] = 0] = \"Br\";\n        BreakType[BreakType[\"Block\"] = 1] = \"Block\";\n        BreakType[BreakType[\"Wrap\"] = 2] = \"Wrap\";\n        BreakType[BreakType[\"Eol\"] = 3] = \"Eol\";\n    })(BreakType || (BreakType = {}));\n    const flip = (direction, positions) => direction === -1 /* HDirection.Backwards */ ? reverse(positions) : positions;\n    const walk$1 = (direction, caretWalker, pos) => direction === 1 /* HDirection.Forwards */ ? caretWalker.next(pos) : caretWalker.prev(pos);\n    const getBreakType = (scope, direction, currentPos, nextPos) => {\n        if (isBr$7(nextPos.getNode(direction === 1 /* HDirection.Forwards */))) {\n            return BreakType.Br;\n        }\n        else if (isInSameBlock(currentPos, nextPos) === false) {\n            return BreakType.Block;\n        }\n        else {\n            return BreakType.Wrap;\n        }\n    };\n    const getPositionsUntil = (predicate, direction, scope, start) => {\n        const caretWalker = CaretWalker(scope);\n        let currentPos = start;\n        const positions = [];\n        while (currentPos) {\n            const nextPos = walk$1(direction, caretWalker, currentPos);\n            if (!nextPos) {\n                break;\n            }\n            if (isBr$7(nextPos.getNode(false))) {\n                if (direction === 1 /* HDirection.Forwards */) {\n                    return { positions: flip(direction, positions).concat([nextPos]), breakType: BreakType.Br, breakAt: Optional.some(nextPos) };\n                }\n                else {\n                    return { positions: flip(direction, positions), breakType: BreakType.Br, breakAt: Optional.some(nextPos) };\n                }\n            }\n            if (!nextPos.isVisible()) {\n                currentPos = nextPos;\n                continue;\n            }\n            if (predicate(currentPos, nextPos)) {\n                const breakType = getBreakType(scope, direction, currentPos, nextPos);\n                return { positions: flip(direction, positions), breakType, breakAt: Optional.some(nextPos) };\n            }\n            positions.push(nextPos);\n            currentPos = nextPos;\n        }\n        return { positions: flip(direction, positions), breakType: BreakType.Eol, breakAt: Optional.none() };\n    };\n    const getAdjacentLinePositions = (direction, getPositionsUntilBreak, scope, start) => getPositionsUntilBreak(scope, start).breakAt.map((pos) => {\n        const positions = getPositionsUntilBreak(scope, pos).positions;\n        return direction === -1 /* HDirection.Backwards */ ? positions.concat(pos) : [pos].concat(positions);\n    }).getOr([]);\n    const findClosestHorizontalPositionFromPoint = (positions, x) => foldl(positions, (acc, newPos) => acc.fold(() => Optional.some(newPos), (lastPos) => lift2(head(lastPos.getClientRects()), head(newPos.getClientRects()), (lastRect, newRect) => {\n        const lastDist = Math.abs(x - lastRect.left);\n        const newDist = Math.abs(x - newRect.left);\n        return newDist <= lastDist ? newPos : lastPos;\n    }).or(acc)), Optional.none());\n    const findClosestHorizontalPosition = (positions, pos) => head(pos.getClientRects()).bind((targetRect) => findClosestHorizontalPositionFromPoint(positions, targetRect.left));\n    const getPositionsUntilPreviousLine = curry(getPositionsUntil, CaretPosition.isAbove, -1);\n    const getPositionsUntilNextLine = curry(getPositionsUntil, CaretPosition.isBelow, 1);\n    const getPositionsAbove = curry(getAdjacentLinePositions, -1, getPositionsUntilPreviousLine);\n    const getPositionsBelow = curry(getAdjacentLinePositions, 1, getPositionsUntilNextLine);\n    const isAtFirstLine = (scope, pos) => getPositionsUntilPreviousLine(scope, pos).breakAt.isNone();\n    const isAtLastLine = (scope, pos) => getPositionsUntilNextLine(scope, pos).breakAt.isNone();\n    const getFirstLinePositions = (scope) => firstPositionIn(scope).map((pos) => [pos].concat(getPositionsUntilNextLine(scope, pos).positions)).getOr([]);\n    const getLastLinePositions = (scope) => lastPositionIn(scope).map((pos) => getPositionsUntilPreviousLine(scope, pos).positions.concat(pos)).getOr([]);\n    const getClosestPositionAbove = (scope, pos) => findClosestHorizontalPosition(getPositionsAbove(scope, pos), pos);\n    const getClosestPositionBelow = (scope, pos) => findClosestHorizontalPosition(getPositionsBelow(scope, pos), pos);\n\n    const isContentEditableFalse$4 = isContentEditableFalse$a;\n    const distanceToRectLeft$1 = (clientRect, clientX) => Math.abs(clientRect.left - clientX);\n    const distanceToRectRight$1 = (clientRect, clientX) => Math.abs(clientRect.right - clientX);\n    const isNodeClientRect = (rect) => hasNonNullableKey(rect, 'node');\n    const findClosestClientRect = (clientRects, clientX) => reduce(clientRects, (oldClientRect, clientRect) => {\n        const oldDistance = Math.min(distanceToRectLeft$1(oldClientRect, clientX), distanceToRectRight$1(oldClientRect, clientX));\n        const newDistance = Math.min(distanceToRectLeft$1(clientRect, clientX), distanceToRectRight$1(clientRect, clientX));\n        // cE=false has higher priority\n        if (newDistance === oldDistance && isNodeClientRect(clientRect) && isContentEditableFalse$4(clientRect.node)) {\n            return clientRect;\n        }\n        if (newDistance < oldDistance) {\n            return clientRect;\n        }\n        return oldClientRect;\n    });\n\n    const getNodeClientRects = (node) => {\n        const toArrayWithNode = (clientRects) => {\n            return map$3(clientRects, (rect) => {\n                const clientRect = clone$1(rect);\n                clientRect.node = node;\n                return clientRect;\n            });\n        };\n        if (isElement$7(node)) {\n            return toArrayWithNode(node.getClientRects());\n        }\n        else if (isText$b(node)) {\n            const rng = node.ownerDocument.createRange();\n            rng.setStart(node, 0);\n            rng.setEnd(node, node.data.length);\n            return toArrayWithNode(rng.getClientRects());\n        }\n        else {\n            return [];\n        }\n    };\n    const getClientRects = (nodes) => bind$3(nodes, getNodeClientRects);\n\n    var VDirection;\n    (function (VDirection) {\n        VDirection[VDirection[\"Up\"] = -1] = \"Up\";\n        VDirection[VDirection[\"Down\"] = 1] = \"Down\";\n    })(VDirection || (VDirection = {}));\n    const findUntil = (direction, root, predicateFn, node) => {\n        let currentNode = node;\n        while ((currentNode = findNode(currentNode, direction, isEditableCaretCandidate$1, root))) {\n            if (predicateFn(currentNode)) {\n                return;\n            }\n        }\n    };\n    const walkUntil = (direction, isAboveFn, isBeflowFn, root, predicateFn, caretPosition) => {\n        let line = 0;\n        const result = [];\n        const add = (node) => {\n            let clientRects = getClientRects([node]);\n            if (direction === VDirection.Up) {\n                clientRects = clientRects.reverse();\n            }\n            for (let i = 0; i < clientRects.length; i++) {\n                const clientRect = clientRects[i];\n                if (isBeflowFn(clientRect, targetClientRect)) {\n                    continue;\n                }\n                if (result.length > 0 && isAboveFn(clientRect, last(result))) {\n                    line++;\n                }\n                clientRect.line = line;\n                if (predicateFn(clientRect)) {\n                    return true;\n                }\n                result.push(clientRect);\n            }\n            return false;\n        };\n        const targetClientRect = last(caretPosition.getClientRects());\n        if (!targetClientRect) {\n            return result;\n        }\n        const node = caretPosition.getNode();\n        if (node) {\n            add(node);\n            findUntil(direction, root, add, node);\n        }\n        return result;\n    };\n    const aboveLineNumber = (lineNumber, clientRect) => clientRect.line > lineNumber;\n    const isLineNumber = (lineNumber, clientRect) => clientRect.line === lineNumber;\n    const upUntil = curry(walkUntil, VDirection.Up, isAbove$1, isBelow$1);\n    const downUntil = curry(walkUntil, VDirection.Down, isBelow$1, isAbove$1);\n    const getLastClientRect = (caretPosition) => {\n        // ASSUMPTION: There should always be at least one client rect here\n        return last(caretPosition.getClientRects());\n    };\n    const positionsUntil = (direction, root, predicateFn, node) => {\n        const caretWalker = CaretWalker(root);\n        let walkFn;\n        let isBelowFn;\n        let isAboveFn;\n        let caretPosition;\n        const result = [];\n        let line = 0;\n        if (direction === VDirection.Down) {\n            walkFn = caretWalker.next;\n            isBelowFn = isBelow$1;\n            isAboveFn = isAbove$1;\n            caretPosition = CaretPosition.after(node);\n        }\n        else {\n            walkFn = caretWalker.prev;\n            isBelowFn = isAbove$1;\n            isAboveFn = isBelow$1;\n            caretPosition = CaretPosition.before(node);\n        }\n        const targetClientRect = getLastClientRect(caretPosition);\n        do {\n            if (!caretPosition.isVisible()) {\n                continue;\n            }\n            const rect = getLastClientRect(caretPosition);\n            if (isAboveFn(rect, targetClientRect)) {\n                continue;\n            }\n            if (result.length > 0 && isBelowFn(rect, last(result))) {\n                line++;\n            }\n            const clientRect = clone$1(rect);\n            clientRect.position = caretPosition;\n            clientRect.line = line;\n            if (predicateFn(clientRect)) {\n                return result;\n            }\n            result.push(clientRect);\n        } while ((caretPosition = walkFn(caretPosition)));\n        return result;\n    };\n    const isAboveLine = (lineNumber) => (clientRect) => aboveLineNumber(lineNumber, clientRect);\n    const isLine = (lineNumber) => (clientRect) => isLineNumber(lineNumber, clientRect);\n\n    const moveToRange = (editor, rng) => {\n        editor.selection.setRng(rng);\n        // Don't reuse the original range as TinyMCE will adjust it\n        scrollRangeIntoView(editor, editor.selection.getRng());\n    };\n    const renderRangeCaretOpt = (editor, range, scrollIntoView) => Optional.some(renderRangeCaret(editor, range, scrollIntoView));\n    const getAbsPositionElement = (pos, direction) => {\n        const node = pos.getNode(direction === -1 /* HDirection.Backwards */);\n        return isNonNullable(node) && isAbsPositionedElement(node) ? Optional.some(node) : Optional.none();\n    };\n    const elementToRange = (editor, node) => {\n        const rng = editor.dom.createRng();\n        rng.selectNode(node);\n        return rng;\n    };\n    const moveHorizontally = (editor, direction, range, isBefore, isAfter, isElement) => {\n        const forwards = direction === 1 /* HDirection.Forwards */;\n        const caretWalker = CaretWalker(editor.getBody());\n        const getNextPosFn = curry(getVisualCaretPosition, forwards ? caretWalker.next : caretWalker.prev);\n        const isBeforeFn = forwards ? isBefore : isAfter;\n        if (!range.collapsed) {\n            const node = getSelectedNode(range);\n            if (isElement(node)) {\n                if (isAbsPositionedElement(node)) {\n                    const caretPosition = getNormalizedRangeEndPoint(direction, editor.getBody(), range);\n                    return Optional.from(getNextPosFn(caretPosition)).map((next) => next.toRange());\n                }\n                else {\n                    return showCaret(direction, editor, node, direction === -1 /* HDirection.Backwards */, false);\n                }\n            }\n            else if (isCefAtEdgeSelected(editor)) {\n                const newRange = range.cloneRange();\n                newRange.collapse(direction === -1 /* HDirection.Backwards */);\n                return Optional.from(newRange);\n            }\n        }\n        const caretPosition = getNormalizedRangeEndPoint(direction, editor.getBody(), range);\n        if (isBeforeFn(caretPosition)) {\n            return selectNode(editor, caretPosition.getNode(!forwards));\n        }\n        let nextCaretPosition = getNextPosFn(caretPosition);\n        const rangeIsInContainerBlock = isRangeInCaretContainerBlock(range);\n        if (!nextCaretPosition) {\n            return rangeIsInContainerBlock ? Optional.some(range) : Optional.none();\n        }\n        else {\n            nextCaretPosition = normalizePosition(forwards, nextCaretPosition);\n        }\n        if (isBeforeFn(nextCaretPosition)) {\n            return getAbsPositionElement(nextCaretPosition, direction).fold(() => showCaret(direction, editor, nextCaretPosition?.getNode(!forwards), forwards, false), (el) => Optional.some(elementToRange(editor, el)));\n        }\n        // Peek ahead for handling of ab|c<span cE=false> -> abc|<span cE=false>\n        const peekCaretPosition = getNextPosFn(nextCaretPosition);\n        if (peekCaretPosition && isBeforeFn(peekCaretPosition)) {\n            if (isMoveInsideSameBlock(nextCaretPosition, peekCaretPosition)) {\n                return getAbsPositionElement(nextCaretPosition, direction).fold(() => showCaret(direction, editor, peekCaretPosition.getNode(!forwards), forwards, false), (el) => Optional.some(elementToRange(editor, el)));\n            }\n        }\n        if (rangeIsInContainerBlock) {\n            return renderRangeCaretOpt(editor, nextCaretPosition.toRange(), false);\n        }\n        return Optional.none();\n    };\n    const moveVertically$1 = (editor, direction, range, isBefore, isAfter, isElement) => {\n        const caretPosition = getNormalizedRangeEndPoint(direction, editor.getBody(), range);\n        const caretClientRect = last(caretPosition.getClientRects());\n        const forwards = direction === VDirection.Down;\n        const root = editor.getBody();\n        if (!caretClientRect) {\n            return Optional.none();\n        }\n        if (isCefAtEdgeSelected(editor)) {\n            const caretPosition = forwards ? CaretPosition.fromRangeEnd(range) : CaretPosition.fromRangeStart(range);\n            const getClosestFn = !forwards ? getClosestPositionAbove : getClosestPositionBelow;\n            return getClosestFn(root, caretPosition)\n                .orThunk(() => Optional.from(caretPosition))\n                .map((pos) => pos.toRange());\n        }\n        const walkerFn = forwards ? downUntil : upUntil;\n        const linePositions = walkerFn(root, isAboveLine(1), caretPosition);\n        const nextLinePositions = filter$5(linePositions, isLine(1));\n        const clientX = caretClientRect.left;\n        const nextLineRect = findClosestClientRect(nextLinePositions, clientX);\n        if (nextLineRect && isElement(nextLineRect.node)) {\n            const dist1 = Math.abs(clientX - nextLineRect.left);\n            const dist2 = Math.abs(clientX - nextLineRect.right);\n            return showCaret(direction, editor, nextLineRect.node, dist1 < dist2, false);\n        }\n        let currentNode;\n        if (isBefore(caretPosition)) {\n            currentNode = caretPosition.getNode();\n        }\n        else if (isAfter(caretPosition)) {\n            currentNode = caretPosition.getNode(true);\n        }\n        else {\n            currentNode = getSelectedNode(range);\n        }\n        if (currentNode) {\n            const caretPositions = positionsUntil(direction, root, isAboveLine(1), currentNode);\n            let closestNextLineRect = findClosestClientRect(filter$5(caretPositions, isLine(1)), clientX);\n            if (closestNextLineRect) {\n                return renderRangeCaretOpt(editor, closestNextLineRect.position.toRange(), false);\n            }\n            closestNextLineRect = last(filter$5(caretPositions, isLine(0)));\n            if (closestNextLineRect) {\n                return renderRangeCaretOpt(editor, closestNextLineRect.position.toRange(), false);\n            }\n        }\n        if (nextLinePositions.length === 0) {\n            return getLineEndPoint(editor, forwards).filter(forwards ? isAfter : isBefore)\n                .map((pos) => renderRangeCaret(editor, pos.toRange(), false));\n        }\n        return Optional.none();\n    };\n    const getLineEndPoint = (editor, forward) => {\n        const rng = editor.selection.getRng();\n        const from = forward ? CaretPosition.fromRangeEnd(rng) : CaretPosition.fromRangeStart(rng);\n        const host = getEditingHost(from.container(), editor.getBody());\n        if (forward) {\n            const lineInfo = getPositionsUntilNextLine(host, from);\n            return last$2(lineInfo.positions);\n        }\n        else {\n            const lineInfo = getPositionsUntilPreviousLine(host, from);\n            return head(lineInfo.positions);\n        }\n    };\n    const moveToLineEndPoint$3 = (editor, forward, isElementPosition) => getLineEndPoint(editor, forward).filter(isElementPosition).exists((pos) => {\n        editor.selection.setRng(pos.toRange());\n        return true;\n    });\n\n    const setCaretPosition = (editor, pos) => {\n        const rng = editor.dom.createRng();\n        rng.setStart(pos.container(), pos.offset());\n        rng.setEnd(pos.container(), pos.offset());\n        editor.selection.setRng(rng);\n    };\n    const setSelected = (state, elm) => {\n        if (state) {\n            elm.setAttribute('data-mce-selected', 'inline-boundary');\n        }\n        else {\n            elm.removeAttribute('data-mce-selected');\n        }\n    };\n    const renderCaretLocation = (editor, caret, location) => renderCaret(caret, location).map((pos) => {\n        setCaretPosition(editor, pos);\n        return location;\n    });\n    const getPositionFromRange = (range, root, forward) => {\n        const start = CaretPosition.fromRangeStart(range);\n        if (range.collapsed) {\n            return start;\n        }\n        else {\n            const end = CaretPosition.fromRangeEnd(range);\n            return forward ? prevPosition(root, end).getOr(end) : nextPosition(root, start).getOr(start);\n        }\n    };\n    const findLocation = (editor, caret, forward) => {\n        const rootNode = editor.getBody();\n        const from = getPositionFromRange(editor.selection.getRng(), rootNode, forward);\n        const isInlineTarget$1 = curry(isInlineTarget, editor);\n        const location = findLocation$1(forward, isInlineTarget$1, rootNode, from);\n        return location.bind((location) => renderCaretLocation(editor, caret, location));\n    };\n    const toggleInlines = (isInlineTarget, dom, elms) => {\n        const inlineBoundaries = map$3(descendants(SugarElement.fromDom(dom.getRoot()), '*[data-mce-selected=\"inline-boundary\"]'), (e) => e.dom);\n        const selectedInlines = filter$5(inlineBoundaries, isInlineTarget);\n        const targetInlines = filter$5(elms, isInlineTarget);\n        each$e(difference(selectedInlines, targetInlines), curry(setSelected, false));\n        each$e(difference(targetInlines, selectedInlines), curry(setSelected, true));\n    };\n    const safeRemoveCaretContainer = (editor, caret) => {\n        const caretValue = caret.get();\n        if (editor.selection.isCollapsed() && !editor.composing && caretValue) {\n            const pos = CaretPosition.fromRangeStart(editor.selection.getRng());\n            if (CaretPosition.isTextPosition(pos) && !isAtZwsp(pos)) {\n                setCaretPosition(editor, removeAndReposition(caretValue, pos));\n                caret.set(null);\n            }\n        }\n    };\n    const renderInsideInlineCaret = (isInlineTarget, editor, caret, elms) => {\n        if (editor.selection.isCollapsed()) {\n            const inlines = filter$5(elms, isInlineTarget);\n            each$e(inlines, (_inline) => {\n                const pos = CaretPosition.fromRangeStart(editor.selection.getRng());\n                readLocation(isInlineTarget, editor.getBody(), pos).bind((location) => renderCaretLocation(editor, caret, location));\n            });\n        }\n    };\n    const move$3 = (editor, caret, forward) => isInlineBoundariesEnabled(editor) ? findLocation(editor, caret, forward).isSome() : false;\n    const moveWord = (forward, editor, _caret) => isInlineBoundariesEnabled(editor) ? moveByWord(forward, editor) : false;\n    const setupSelectedState = (editor) => {\n        const caret = Cell(null);\n        const isInlineTarget$1 = curry(isInlineTarget, editor);\n        editor.on('NodeChange', (e) => {\n            if (isInlineBoundariesEnabled(editor)) {\n                toggleInlines(isInlineTarget$1, editor.dom, e.parents);\n                safeRemoveCaretContainer(editor, caret);\n                renderInsideInlineCaret(isInlineTarget$1, editor, caret, e.parents);\n            }\n        });\n        return caret;\n    };\n    const moveNextWord = curry(moveWord, true);\n    const movePrevWord = curry(moveWord, false);\n    const moveToLineEndPoint$2 = (editor, forward, caret) => {\n        if (isInlineBoundariesEnabled(editor)) {\n            // Try to find the line endpoint, however if one isn't found then assume we're already at the end point\n            const linePoint = getLineEndPoint(editor, forward).getOrThunk(() => {\n                const rng = editor.selection.getRng();\n                return forward ? CaretPosition.fromRangeEnd(rng) : CaretPosition.fromRangeStart(rng);\n            });\n            return readLocation(curry(isInlineTarget, editor), editor.getBody(), linePoint).exists((loc) => {\n                const outsideLoc = outside(loc);\n                return renderCaret(caret, outsideLoc).exists((pos) => {\n                    setCaretPosition(editor, pos);\n                    return true;\n                });\n            });\n        }\n        else {\n            return false;\n        }\n    };\n\n    const rangeFromPositions = (from, to) => {\n        const range = document.createRange();\n        range.setStart(from.container(), from.offset());\n        range.setEnd(to.container(), to.offset());\n        return range;\n    };\n    // Checks for delete at <code>|a</code> when there is only one item left except the zwsp caret container nodes\n    const hasOnlyTwoOrLessPositionsLeft = (elm) => lift2(firstPositionIn(elm), lastPositionIn(elm), (firstPos, lastPos) => {\n        const normalizedFirstPos = normalizePosition(true, firstPos);\n        const normalizedLastPos = normalizePosition(false, lastPos);\n        return nextPosition(elm, normalizedFirstPos).forall((pos) => pos.isEqual(normalizedLastPos));\n    }).getOr(true);\n    const setCaretLocation = (editor, caret) => (location) => renderCaret(caret, location).map((pos) => () => setCaretPosition(editor, pos));\n    const deleteFromTo = (editor, caret, from, to) => {\n        const rootNode = editor.getBody();\n        const isInlineTarget$1 = curry(isInlineTarget, editor);\n        editor.undoManager.ignore(() => {\n            editor.selection.setRng(rangeFromPositions(from, to));\n            // TODO: TINY-9120 - Investigate if this should be using our custom overrides\n            execNativeDeleteCommand(editor);\n            readLocation(isInlineTarget$1, rootNode, CaretPosition.fromRangeStart(editor.selection.getRng()))\n                .map(inside)\n                .bind(setCaretLocation(editor, caret))\n                .each(call);\n        });\n        editor.nodeChanged();\n    };\n    const rescope = (rootNode, node) => {\n        const parentBlock = getParentBlock$3(node, rootNode);\n        return parentBlock ? parentBlock : rootNode;\n    };\n    const backspaceDeleteCollapsed = (editor, caret, forward, from) => {\n        const rootNode = rescope(editor.getBody(), from.container());\n        const isInlineTarget$1 = curry(isInlineTarget, editor);\n        const fromLocation = readLocation(isInlineTarget$1, rootNode, from);\n        const location = fromLocation.bind((location) => {\n            if (forward) {\n                return location.fold(constant(Optional.some(inside(location))), // Before\n                Optional.none, // Start\n                constant(Optional.some(outside(location))), // End\n                Optional.none // After\n                );\n            }\n            else {\n                return location.fold(Optional.none, // Before\n                constant(Optional.some(outside(location))), // Start\n                Optional.none, // End\n                constant(Optional.some(inside(location))) // After\n                );\n            }\n        });\n        return location.map(setCaretLocation(editor, caret))\n            .getOrThunk(() => {\n            const toPosition = navigate(forward, rootNode, from);\n            const toLocation = toPosition.bind((pos) => readLocation(isInlineTarget$1, rootNode, pos));\n            return lift2(fromLocation, toLocation, () => findRootInline(isInlineTarget$1, rootNode, from).bind((elm) => {\n                if (hasOnlyTwoOrLessPositionsLeft(elm)) {\n                    return Optional.some(() => {\n                        deleteElement$2(editor, forward, SugarElement.fromDom(elm));\n                    });\n                }\n                else {\n                    return Optional.none();\n                }\n            })).getOrThunk(() => toLocation.bind(() => toPosition.map((to) => {\n                return () => {\n                    if (forward) {\n                        deleteFromTo(editor, caret, from, to);\n                    }\n                    else {\n                        deleteFromTo(editor, caret, to, from);\n                    }\n                };\n            })));\n        });\n    };\n    const backspaceDelete$5 = (editor, caret, forward) => {\n        if (editor.selection.isCollapsed() && isInlineBoundariesEnabled(editor)) {\n            const from = CaretPosition.fromRangeStart(editor.selection.getRng());\n            return backspaceDeleteCollapsed(editor, caret, forward, from);\n        }\n        return Optional.none();\n    };\n\n    const hasMultipleChildren = (elm) => childNodesCount(elm) > 1;\n    const getParentsUntil = (editor, pred) => {\n        const rootElm = SugarElement.fromDom(editor.getBody());\n        const startElm = SugarElement.fromDom(editor.selection.getStart());\n        const parents = parentsAndSelf(startElm, rootElm);\n        return findIndex$2(parents, pred).fold(constant(parents), (index) => parents.slice(0, index));\n    };\n    const hasOnlyOneChild = (elm) => childNodesCount(elm) === 1;\n    const getParentInlinesUntilMultichildInline = (editor) => getParentsUntil(editor, (elm) => editor.schema.isBlock(name(elm)) || hasMultipleChildren(elm));\n    const getParentInlines = (editor) => getParentsUntil(editor, (el) => editor.schema.isBlock(name(el)));\n    const getFormatNodes = (editor, parentInlines) => {\n        const isFormatElement$1 = curry(isFormatElement, editor);\n        return bind$3(parentInlines, (elm) => isFormatElement$1(elm) ? [elm.dom] : []);\n    };\n    const getFormatNodesAtStart = (editor) => {\n        const parentInlines = getParentInlines(editor);\n        return getFormatNodes(editor, parentInlines);\n    };\n    const deleteLastPosition = (forward, editor, target, parentInlines) => {\n        const formatNodes = getFormatNodes(editor, parentInlines);\n        if (formatNodes.length === 0) {\n            deleteElement$2(editor, forward, target);\n        }\n        else {\n            const pos = replaceWithCaretFormat(target.dom, formatNodes);\n            editor.selection.setRng(pos.toRange());\n        }\n    };\n    const deleteCaret$1 = (editor, forward) => {\n        const parentInlines = filter$5(getParentInlinesUntilMultichildInline(editor), hasOnlyOneChild);\n        return last$2(parentInlines).bind((target) => {\n            const fromPos = CaretPosition.fromRangeStart(editor.selection.getRng());\n            if (willDeleteLastPositionInElement(forward, fromPos, target.dom) && !isEmptyCaretFormatElement(target)) {\n                return Optional.some(() => deleteLastPosition(forward, editor, target, parentInlines));\n            }\n            else {\n                return Optional.none();\n            }\n        });\n    };\n    const isBrInEmptyElement = (editor, elm) => {\n        const parentElm = elm.parentElement;\n        return isBr$7(elm) && !isNull(parentElm) && editor.dom.isEmpty(parentElm);\n    };\n    const isEmptyCaret = (elm) => isEmptyCaretFormatElement(SugarElement.fromDom(elm));\n    const createCaretFormatAtStart = (editor, formatNodes) => {\n        const startElm = editor.selection.getStart();\n        // replace <br> in empty node or existing caret at start if applicable\n        // otherwise create new caret format at start\n        const pos = isBrInEmptyElement(editor, startElm) || isEmptyCaret(startElm)\n            ? replaceWithCaretFormat(startElm, formatNodes)\n            : createCaretFormatAtStart$1(editor.selection.getRng(), formatNodes);\n        editor.selection.setRng(pos.toRange());\n    };\n    const updateCaretFormat = (editor, updateFormats) => {\n        // Create a caret format at cursor containing missing formats to ensure all formats\n        // that are supposed to be retained are retained\n        const missingFormats = difference(updateFormats, getFormatNodesAtStart(editor));\n        if (missingFormats.length > 0) {\n            createCaretFormatAtStart(editor, missingFormats);\n        }\n    };\n    const rangeStartsAtTextContainer = (rng) => isText$b(rng.startContainer);\n    const rangeStartsAtStartOfTextContainer = (rng) => rng.startOffset === 0 && rangeStartsAtTextContainer(rng);\n    const rangeStartParentIsFormatElement = (editor, rng) => {\n        const startParent = rng.startContainer.parentElement;\n        return !isNull(startParent) && isFormatElement(editor, SugarElement.fromDom(startParent));\n    };\n    const rangeStartAndEndHaveSameParent = (rng) => {\n        const startParent = rng.startContainer.parentNode;\n        const endParent = rng.endContainer.parentNode;\n        return !isNull(startParent) && !isNull(endParent) && startParent.isEqualNode(endParent);\n    };\n    const rangeEndsAtEndOfEndContainer = (rng) => {\n        const endContainer = rng.endContainer;\n        return rng.endOffset === (isText$b(endContainer) ? endContainer.length : endContainer.childNodes.length);\n    };\n    const rangeEndsAtEndOfStartContainer = (rng) => rangeStartAndEndHaveSameParent(rng) && rangeEndsAtEndOfEndContainer(rng);\n    const rangeEndsAfterEndOfStartContainer = (rng) => !rng.endContainer.isEqualNode(rng.commonAncestorContainer);\n    const rangeEndsAtOrAfterEndOfStartContainer = (rng) => rangeEndsAtEndOfStartContainer(rng) || rangeEndsAfterEndOfStartContainer(rng);\n    const requiresDeleteRangeOverride = (editor) => {\n        const rng = editor.selection.getRng();\n        return rangeStartsAtStartOfTextContainer(rng) && rangeStartParentIsFormatElement(editor, rng) && rangeEndsAtOrAfterEndOfStartContainer(rng);\n    };\n    const deleteRange$2 = (editor) => {\n        if (requiresDeleteRangeOverride(editor)) {\n            const formatNodes = getFormatNodesAtStart(editor);\n            return Optional.some(() => {\n                execNativeDeleteCommand(editor);\n                updateCaretFormat(editor, formatNodes);\n            });\n        }\n        else {\n            return Optional.none();\n        }\n    };\n    const backspaceDelete$4 = (editor, forward) => editor.selection.isCollapsed() ? deleteCaret$1(editor, forward) : deleteRange$2(editor);\n    const hasAncestorInlineCaret = (elm, schema) => ancestor$3(elm, (node) => isCaretNode(node.dom), (el) => schema.isBlock(name(el)));\n    const hasAncestorInlineCaretAtStart = (editor) => hasAncestorInlineCaret(SugarElement.fromDom(editor.selection.getStart()), editor.schema);\n    const requiresRefreshCaretOverride = (editor) => {\n        const rng = editor.selection.getRng();\n        return rng.collapsed && (rangeStartsAtTextContainer(rng) || editor.dom.isEmpty(rng.startContainer)) && !hasAncestorInlineCaretAtStart(editor);\n    };\n    const refreshCaret = (editor) => {\n        if (requiresRefreshCaretOverride(editor)) {\n            createCaretFormatAtStart(editor, []);\n        }\n        return true;\n    };\n\n    const deleteElement = (editor, forward, element) => {\n        if (isNonNullable(element)) {\n            return Optional.some(() => {\n                editor._selectionOverrides.hideFakeCaret();\n                deleteElement$2(editor, forward, SugarElement.fromDom(element));\n            });\n        }\n        else {\n            return Optional.none();\n        }\n    };\n    const deleteCaret = (editor, forward) => {\n        const isNearMedia = forward ? isBeforeMedia : isAfterMedia;\n        const direction = forward ? 1 /* HDirection.Forwards */ : -1 /* HDirection.Backwards */;\n        const fromPos = getNormalizedRangeEndPoint(direction, editor.getBody(), editor.selection.getRng());\n        if (isNearMedia(fromPos)) {\n            return deleteElement(editor, forward, fromPos.getNode(!forward));\n        }\n        else {\n            return Optional.from(normalizePosition(forward, fromPos))\n                .filter((pos) => isNearMedia(pos) && isMoveInsideSameBlock(fromPos, pos))\n                .bind((pos) => deleteElement(editor, forward, pos.getNode(!forward)));\n        }\n    };\n    const deleteRange$1 = (editor, forward) => {\n        const selectedNode = editor.selection.getNode();\n        return isMedia$2(selectedNode) ? deleteElement(editor, forward, selectedNode) : Optional.none();\n    };\n    const backspaceDelete$3 = (editor, forward) => editor.selection.isCollapsed() ? deleteCaret(editor, forward) : deleteRange$1(editor, forward);\n\n    const isEditable = (target) => closest$5(target, (elm) => isContentEditableTrue$3(elm.dom) || isContentEditableFalse$a(elm.dom))\n        .exists((elm) => isContentEditableTrue$3(elm.dom));\n    const parseIndentValue = (value) => toInt(value ?? '').getOr(0);\n    const getIndentStyleName = (useMargin, element) => {\n        const indentStyleName = useMargin || isTable$1(element) ? 'margin' : 'padding';\n        const suffix = get$8(element, 'direction') === 'rtl' ? '-right' : '-left';\n        return indentStyleName + suffix;\n    };\n    const indentElement = (dom, command, useMargin, value, unit, element) => {\n        const indentStyleName = getIndentStyleName(useMargin, SugarElement.fromDom(element));\n        const parsedValue = parseIndentValue(dom.getStyle(element, indentStyleName));\n        if (command === 'outdent') {\n            const styleValue = Math.max(0, parsedValue - value);\n            dom.setStyle(element, indentStyleName, styleValue ? styleValue + unit : '');\n        }\n        else {\n            const styleValue = (parsedValue + value) + unit;\n            dom.setStyle(element, indentStyleName, styleValue);\n        }\n    };\n    const validateBlocks = (editor, blocks) => forall(blocks, (block) => {\n        const indentStyleName = getIndentStyleName(shouldIndentUseMargin(editor), block);\n        const intentValue = getRaw$1(block, indentStyleName).map(parseIndentValue).getOr(0);\n        const contentEditable = editor.dom.getContentEditable(block.dom);\n        return contentEditable !== 'false' && intentValue > 0;\n    });\n    const canOutdent = (editor) => {\n        const blocks = getBlocksToIndent(editor);\n        return !editor.mode.isReadOnly() && (blocks.length > 1 || validateBlocks(editor, blocks));\n    };\n    const canIndent = (editor) => !editor.mode.isReadOnly() && canIndent$1(editor);\n    const isListComponent = (el) => isList$1(el) || isListItem$2(el);\n    const parentIsListComponent = (el) => parent(el).exists(isListComponent);\n    const getBlocksToIndent = (editor) => {\n        const selectedCells = getCellsFromEditor(editor);\n        return selectedCells.length === 0 ?\n            filter$5(fromDom$1(editor.selection.getSelectedBlocks()), (el) => !isListComponent(el) && !parentIsListComponent(el) && isEditable(el)) : selectedCells;\n    };\n    const handle = (editor, command) => {\n        if (editor.mode.isReadOnly()) {\n            return;\n        }\n        const { dom } = editor;\n        const indentation = getIndentation(editor);\n        const indentUnit = /[a-z%]+$/i.exec(indentation)?.[0] ?? 'px';\n        const indentValue = parseIndentValue(indentation);\n        const useMargin = shouldIndentUseMargin(editor);\n        each$e(getBlocksToIndent(editor), (block) => {\n            indentElement(dom, command, useMargin, indentValue, indentUnit, block.dom);\n        });\n        if (command === 'indent') {\n            indentListSelection(editor);\n        }\n        else {\n            outdentListSelection(editor);\n        }\n    };\n    const indent = (editor) => handle(editor, 'indent');\n    const outdent = (editor) => handle(editor, 'outdent');\n\n    const backspaceDelete$2 = (editor) => {\n        if (editor.selection.isCollapsed() && canOutdent(editor)) {\n            const dom = editor.dom;\n            const rng = editor.selection.getRng();\n            const pos = CaretPosition.fromRangeStart(rng);\n            const block = dom.getParent(rng.startContainer, dom.isBlock);\n            if (block !== null && isAtStartOfBlock(SugarElement.fromDom(block), pos, editor.schema)) {\n                return Optional.some(() => outdent(editor));\n            }\n        }\n        return Optional.none();\n    };\n\n    const deleteRange = (editor, forward) => {\n        const range = editor.selection.getRng();\n        const rng = normalize(range);\n        return isSelectionOverWholeHTMLElement(rng)\n            ? Optional.some(() => deleteElement$2(editor, forward, SugarElement.fromDom(range.startContainer.childNodes[range.startOffset])))\n            : Optional.none();\n    };\n    const backspaceDelete$1 = (editor, forward) => editor.selection.isCollapsed() ? Optional.none() : deleteRange(editor, forward);\n\n    const findAction = (editor, caret, forward) => findMap([\n        backspaceDelete$2,\n        backspaceDelete$8,\n        backspaceDelete$9,\n        (editor, forward) => backspaceDelete$5(editor, caret, forward),\n        backspaceDelete$b,\n        backspaceDelete$d,\n        backspaceDelete$6,\n        backspaceDelete$3,\n        backspaceDelete$a,\n        backspaceDelete$4,\n        backspaceDelete$7,\n        backspaceDelete$1,\n    ], (item) => item(editor, forward))\n        .filter((_) => editor.selection.isEditable());\n    const deleteCommand = (editor, caret) => {\n        const result = findAction(editor, caret, false);\n        result.fold(() => {\n            // We can't use an `execEditorDeleteCommand` here, otherwise we'd get\n            // possible infinite recursion (as it would trigger `deleteCommand` again)\n            if (editor.selection.isEditable()) {\n                execNativeDeleteCommand(editor);\n                paddEmptyBody(editor);\n            }\n        }, call);\n        if (hasListSelection(editor)) {\n            normalizeLists(editor.dom, editor.getBody());\n        }\n    };\n    const forwardDeleteCommand = (editor, caret) => {\n        const result = findAction(editor, caret, true);\n        result.fold(() => {\n            if (editor.selection.isEditable()) {\n                execNativeForwardDeleteCommand(editor);\n            }\n        }, call);\n        if (hasListSelection(editor)) {\n            normalizeLists(editor.dom, editor.getBody());\n        }\n    };\n    const setup$v = (editor, caret) => {\n        editor.addCommand('delete', () => {\n            deleteCommand(editor, caret);\n        });\n        editor.addCommand('forwardDelete', () => {\n            forwardDeleteCommand(editor, caret);\n        });\n    };\n\n    // This is based heavily on Alloy's TapEvent.ts, just modified to use TinyMCE's event system.\n    const SIGNIFICANT_MOVE = 5;\n    const LONGPRESS_DELAY = 400;\n    const getTouch = (event) => {\n        if (event.touches === undefined || event.touches.length !== 1) {\n            return Optional.none();\n        }\n        return Optional.some(event.touches[0]);\n    };\n    const isFarEnough = (touch, data) => {\n        const distX = Math.abs(touch.clientX - data.x);\n        const distY = Math.abs(touch.clientY - data.y);\n        return distX > SIGNIFICANT_MOVE || distY > SIGNIFICANT_MOVE;\n    };\n    const setup$u = (editor) => {\n        const startData = value$1();\n        const longpressFired = Cell(false);\n        const debounceLongpress = last$1((e) => {\n            editor.dispatch('longpress', { ...e, type: 'longpress' });\n            longpressFired.set(true);\n        }, LONGPRESS_DELAY);\n        editor.on('touchstart', (e) => {\n            getTouch(e).each((touch) => {\n                debounceLongpress.cancel();\n                const data = {\n                    x: touch.clientX,\n                    y: touch.clientY,\n                    target: e.target\n                };\n                debounceLongpress.throttle(e);\n                longpressFired.set(false);\n                startData.set(data);\n            });\n        }, true);\n        editor.on('touchmove', (e) => {\n            debounceLongpress.cancel();\n            getTouch(e).each((touch) => {\n                startData.on((data) => {\n                    if (isFarEnough(touch, data)) {\n                        startData.clear();\n                        longpressFired.set(false);\n                        editor.dispatch('longpresscancel');\n                    }\n                });\n            });\n        }, true);\n        editor.on('touchend touchcancel', (e) => {\n            debounceLongpress.cancel();\n            if (e.type === 'touchcancel') {\n                return;\n            }\n            // Cancel the touchend event if a longpress was fired, otherwise fire the tap event\n            startData.get()\n                .filter((data) => data.target.isEqualNode(e.target))\n                .each(() => {\n                if (longpressFired.get()) {\n                    e.preventDefault();\n                }\n                else {\n                    editor.dispatch('tap', { ...e, type: 'tap' });\n                }\n            });\n        }, true);\n    };\n\n    /**\n     * Makes sure that everything gets wrapped in paragraphs.\n     *\n     * @private\n     * @class tinymce.ForceBlocks\n     */\n    const isBlockElement = (blockElements, node) => has$2(blockElements, node.nodeName);\n    const isValidTarget = (schema, node) => {\n        if (isText$b(node)) {\n            return true;\n        }\n        else if (isElement$7(node)) {\n            return !isBlockElement(schema.getBlockElements(), node) && !isBookmarkNode$1(node) &&\n                !isTransparentBlock(schema, node) && !isNonHtmlElementRoot(node) && !isTemplate(node);\n        }\n        else {\n            return false;\n        }\n    };\n    const hasBlockParent = (blockElements, root, node) => {\n        return exists(parents(SugarElement.fromDom(node), SugarElement.fromDom(root)), (elm) => {\n            return isBlockElement(blockElements, elm.dom);\n        });\n    };\n    const shouldRemoveTextNode = (blockElements, node) => {\n        if (isText$b(node)) {\n            if (node.data.length === 0) {\n                return true;\n            }\n            else if (/^\\s+$/.test(node.data)) {\n                return !node.nextSibling || isBlockElement(blockElements, node.nextSibling) || isNonHtmlElementRoot(node.nextSibling);\n            }\n        }\n        return false;\n    };\n    const createRootBlock = (editor) => editor.dom.create(getForcedRootBlock(editor), getForcedRootBlockAttrs(editor));\n    const addRootBlocks = (editor) => {\n        const dom = editor.dom, selection = editor.selection;\n        const schema = editor.schema;\n        const blockElements = schema.getBlockElements();\n        const startNode = selection.getStart();\n        const rootNode = editor.getBody();\n        let rootBlockNode;\n        let tempNode;\n        let bm = null;\n        const forcedRootBlock = getForcedRootBlock(editor);\n        if (!startNode || !isElement$7(startNode)) {\n            return;\n        }\n        const rootNodeName = rootNode.nodeName.toLowerCase();\n        if (!schema.isValidChild(rootNodeName, forcedRootBlock.toLowerCase()) || hasBlockParent(blockElements, rootNode, startNode)) {\n            return;\n        }\n        // Firefox will automatically remove the last BR if you insert nodes next to it and add a BR back if you remove those siblings\n        // and since the bookmark code inserts temporary nodes an new BR will be constantly removed and added and triggering a selection\n        // change causing an infinite recursion. So we treat this special case on it's own.\n        if (rootNode.firstChild === rootNode.lastChild && isBr$7(rootNode.firstChild)) {\n            rootBlockNode = createRootBlock(editor);\n            rootBlockNode.appendChild(createPaddingBr().dom);\n            rootNode.replaceChild(rootBlockNode, rootNode.firstChild);\n            editor.selection.setCursorLocation(rootBlockNode, 0);\n            editor.nodeChanged();\n            return;\n        }\n        // Wrap non block elements and text nodes\n        let node = rootNode.firstChild;\n        while (node) {\n            if (isElement$7(node)) {\n                updateElement(schema, node);\n            }\n            if (isValidTarget(schema, node)) {\n                // Remove empty text nodes and nodes containing only whitespace\n                if (shouldRemoveTextNode(blockElements, node)) {\n                    tempNode = node;\n                    node = node.nextSibling;\n                    dom.remove(tempNode);\n                    continue;\n                }\n                if (!rootBlockNode) {\n                    if (!bm && editor.hasFocus()) {\n                        bm = createBookmark(editor.selection.getRng(), () => document.createElement('span'));\n                    }\n                    // Firefox will remove the last BR element if you insert nodes next to it using DOM APIs like insertBefore\n                    // so for that weird edge case we stop processing.\n                    if (!node.parentNode) {\n                        node = null;\n                        break;\n                    }\n                    rootBlockNode = createRootBlock(editor);\n                    rootNode.insertBefore(rootBlockNode, node);\n                }\n                tempNode = node;\n                node = node.nextSibling;\n                rootBlockNode.appendChild(tempNode);\n            }\n            else {\n                rootBlockNode = null;\n                node = node.nextSibling;\n            }\n        }\n        if (bm) {\n            editor.selection.setRng(resolveBookmark(bm));\n            editor.nodeChanged();\n        }\n    };\n    const insertEmptyLine = (editor, root, insertBlock) => {\n        const block = SugarElement.fromDom(createRootBlock(editor));\n        const br = createPaddingBr();\n        append$1(block, br);\n        insertBlock(root, block);\n        const rng = document.createRange();\n        rng.setStartBefore(br.dom);\n        rng.setEndBefore(br.dom);\n        return rng;\n    };\n    const setup$t = (editor) => {\n        editor.on('NodeChange', () => addRootBlocks(editor));\n    };\n\n    const hasClass = (checkClassName) => (node) => (' ' + node.attr('class') + ' ').indexOf(checkClassName) !== -1;\n    const replaceMatchWithSpan = (editor, content, cls) => {\n        return function (match) {\n            const args = arguments, index = args[args.length - 2];\n            const prevChar = index > 0 ? content.charAt(index - 1) : '';\n            // Is value inside an attribute then don't replace\n            if (prevChar === '\"') {\n                return match;\n            }\n            // Is value inside a contentEditable='false' tag\n            if (prevChar === '>') {\n                const findStartTagIndex = content.lastIndexOf('<', index);\n                if (findStartTagIndex !== -1) {\n                    const tagHtml = content.substring(findStartTagIndex, index);\n                    if (tagHtml.indexOf('contenteditable=\"false\"') !== -1) {\n                        return match;\n                    }\n                }\n            }\n            return ('<span class=\"' + cls + '\" data-mce-content=\"' + editor.dom.encode(args[0]) + '\">' +\n                editor.dom.encode(typeof args[1] === 'string' ? args[1] : args[0]) + '</span>');\n        };\n    };\n    const convertRegExpsToNonEditable = (editor, nonEditableRegExps, e) => {\n        let i = nonEditableRegExps.length, content = e.content;\n        // Don't replace the variables when raw is used for example on undo/redo\n        if (e.format === 'raw') {\n            return;\n        }\n        while (i--) {\n            content = content.replace(nonEditableRegExps[i], replaceMatchWithSpan(editor, content, getNonEditableClass(editor)));\n        }\n        e.content = content;\n    };\n    const isValidContent = (nonEditableRegExps, content) => {\n        return forall(nonEditableRegExps, (re) => {\n            const matches = content.match(re);\n            return matches !== null && matches[0].length === content.length;\n        });\n    };\n    const setup$s = (editor) => {\n        const contentEditableAttrName = 'contenteditable';\n        const editClass = ' ' + Tools.trim(getEditableClass(editor)) + ' ';\n        const nonEditClass = ' ' + Tools.trim(getNonEditableClass(editor)) + ' ';\n        const hasEditClass = hasClass(editClass);\n        const hasNonEditClass = hasClass(nonEditClass);\n        const nonEditableRegExps = getNonEditableRegExps(editor);\n        if (nonEditableRegExps.length > 0) {\n            editor.on('BeforeSetContent', (e) => {\n                convertRegExpsToNonEditable(editor, nonEditableRegExps, e);\n            });\n        }\n        editor.parser.addAttributeFilter('class', (nodes) => {\n            let i = nodes.length;\n            while (i--) {\n                const node = nodes[i];\n                if (hasEditClass(node)) {\n                    node.attr(contentEditableAttrName, 'true');\n                }\n                else if (hasNonEditClass(node)) {\n                    node.attr(contentEditableAttrName, 'false');\n                }\n            }\n        });\n        editor.serializer.addAttributeFilter(contentEditableAttrName, (nodes) => {\n            let i = nodes.length;\n            while (i--) {\n                const node = nodes[i];\n                if (!hasEditClass(node) && !hasNonEditClass(node)) {\n                    continue;\n                }\n                const content = node.attr('data-mce-content');\n                if (nonEditableRegExps.length > 0 && content) {\n                    if (isValidContent(nonEditableRegExps, content)) {\n                        node.name = '#text';\n                        node.type = 3;\n                        node.raw = true;\n                        node.value = content;\n                    }\n                    else {\n                        node.remove();\n                    }\n                }\n                else {\n                    node.attr(contentEditableAttrName, null);\n                }\n            }\n        });\n    };\n\n    const setupInputFiltering = (editor, protect) => {\n        editor.on('BeforeSetContent', (e) => {\n            each$e(protect, (pattern) => {\n                e.content = e.content.replace(pattern, (str) => {\n                    return '<!--mce:protected ' + escape(str) + '-->';\n                });\n            });\n        });\n    };\n    const setupOutputFiltering = (editor, protect) => {\n        editor.serializer.addNodeFilter('#comment', (nodes) => {\n            let i = nodes.length;\n            while (i--) {\n                const node = nodes[i];\n                const value = node.value;\n                if (value?.indexOf('mce:protected ') === 0) {\n                    const protectedHtml = unescape(value).substr(14);\n                    const valid = exists(protect, (pattern) => {\n                        const matches = protectedHtml.match(pattern);\n                        return matches !== null && matches[0].length === protectedHtml.length;\n                    });\n                    if (valid) {\n                        node.name = '#text';\n                        node.type = 3;\n                        node.raw = true;\n                        node.value = protectedHtml;\n                    }\n                    else {\n                        node.remove();\n                    }\n                }\n            }\n        });\n    };\n    const registerProtectedHtmlFilters = (editor, protect) => {\n        setupInputFiltering(editor, protect);\n        setupOutputFiltering(editor, protect);\n    };\n\n    /**\n     * This module shows the invisible block that the caret is currently in when contents is added to that block.\n     */\n    const findBlockCaretContainer = (editor) => descendant$1(SugarElement.fromDom(editor.getBody()), '*[data-mce-caret]')\n        .map((elm) => elm.dom)\n        .getOrNull();\n    const showBlockCaretContainer = (editor, blockCaretContainer) => {\n        if (blockCaretContainer.hasAttribute('data-mce-caret')) {\n            showCaretContainerBlock(blockCaretContainer);\n            editor.selection.setRng(editor.selection.getRng()); // Clears the fake caret state\n            editor.selection.scrollIntoView(blockCaretContainer);\n        }\n    };\n    const handleBlockContainer = (editor, e) => {\n        const blockCaretContainer = findBlockCaretContainer(editor);\n        if (!blockCaretContainer) {\n            return;\n        }\n        if (e.type === 'compositionstart') {\n            e.preventDefault();\n            e.stopPropagation();\n            showBlockCaretContainer(editor, blockCaretContainer);\n            return;\n        }\n        if (hasContent(blockCaretContainer)) {\n            showBlockCaretContainer(editor, blockCaretContainer);\n            editor.undoManager.add();\n        }\n    };\n    const setup$r = (editor) => {\n        editor.on('keyup compositionstart', curry(handleBlockContainer, editor));\n    };\n\n    const isContentEditableFalse$3 = isContentEditableFalse$a;\n    const moveToCeFalseHorizontally = (direction, editor, range) => moveHorizontally(editor, direction, range, isBeforeContentEditableFalse, isAfterContentEditableFalse, isContentEditableFalse$3);\n    const moveToCeFalseVertically = (direction, editor, range) => {\n        const isBefore = (caretPosition) => isBeforeContentEditableFalse(caretPosition) || isBeforeTable(caretPosition);\n        const isAfter = (caretPosition) => isAfterContentEditableFalse(caretPosition) || isAfterTable(caretPosition);\n        return moveVertically$1(editor, direction, range, isBefore, isAfter, isContentEditableFalse$3);\n    };\n    const createTextBlock = (editor) => {\n        const textBlock = editor.dom.create(getForcedRootBlock(editor));\n        textBlock.innerHTML = '<br data-mce-bogus=\"1\">';\n        return textBlock;\n    };\n    const exitPreBlock = (editor, direction, range) => {\n        const caretWalker = CaretWalker(editor.getBody());\n        const getVisualCaretPosition$1 = curry(getVisualCaretPosition, direction === 1 /* HDirection.Forwards */ ? caretWalker.next : caretWalker.prev);\n        if (range.collapsed) {\n            const pre = editor.dom.getParent(range.startContainer, 'PRE');\n            if (!pre) {\n                return;\n            }\n            const caretPos = getVisualCaretPosition$1(CaretPosition.fromRangeStart(range));\n            if (!caretPos) {\n                const newBlock = SugarElement.fromDom(createTextBlock(editor));\n                if (direction === 1 /* HDirection.Forwards */) {\n                    after$4(SugarElement.fromDom(pre), newBlock);\n                }\n                else {\n                    before$4(SugarElement.fromDom(pre), newBlock);\n                }\n                editor.selection.select(newBlock.dom, true);\n                editor.selection.collapse();\n            }\n        }\n    };\n    const getHorizontalRange = (editor, forward) => {\n        const direction = forward ? 1 /* HDirection.Forwards */ : -1 /* HDirection.Backwards */;\n        const range = editor.selection.getRng();\n        return moveToCeFalseHorizontally(direction, editor, range).orThunk(() => {\n            exitPreBlock(editor, direction, range);\n            return Optional.none();\n        });\n    };\n    const getVerticalRange = (editor, down) => {\n        const direction = down ? 1 : -1;\n        const range = editor.selection.getRng();\n        return moveToCeFalseVertically(direction, editor, range).orThunk(() => {\n            exitPreBlock(editor, direction, range);\n            return Optional.none();\n        });\n    };\n    const flipDirection = (selection, forward) => {\n        const elm = forward ? selection.getEnd(true) : selection.getStart(true);\n        return isRtl(elm) ? !forward : forward;\n    };\n    const moveH$2 = (editor, forward) => getHorizontalRange(editor, flipDirection(editor.selection, forward)).exists((newRange) => {\n        moveToRange(editor, newRange);\n        return true;\n    });\n    const moveV$5 = (editor, down) => getVerticalRange(editor, down).exists((newRange) => {\n        moveToRange(editor, newRange);\n        return true;\n    });\n    const moveToLineEndPoint$1 = (editor, forward) => {\n        const isCefPosition = forward ? isAfterContentEditableFalse : isBeforeContentEditableFalse;\n        return moveToLineEndPoint$3(editor, forward, isCefPosition);\n    };\n    const selectToEndPoint = (editor, forward) => getEdgeCefPosition(editor, !forward)\n        .map((pos) => {\n        const rng = pos.toRange();\n        const curRng = editor.selection.getRng();\n        if (forward) {\n            rng.setStart(curRng.startContainer, curRng.startOffset);\n        }\n        else {\n            rng.setEnd(curRng.endContainer, curRng.endOffset);\n        }\n        return rng;\n    })\n        .exists((rng) => {\n        moveToRange(editor, rng);\n        return true;\n    });\n\n    const getClosestCetBlock = (position, root) => {\n        const isRoot = (el) => eq(el, root);\n        const isCet = (el) => isContentEditableTrue$3(el.dom);\n        const startNode = SugarElement.fromDom(position.container());\n        const closestCetBlock = closest$5(startNode, isCet, isRoot);\n        return closestCetBlock.filter((b) => !isRoot(b));\n    };\n    const moveVertically = (editor, position, down) => {\n        const getNextPosition = down ? getClosestPositionBelow : getClosestPositionAbove;\n        return getNextPosition(editor.getBody(), position).map((nextPosition) => nextPosition.toRange());\n    };\n    const moveToNextOrPreviousLine = (editor, down) => {\n        const startPosition = CaretPosition.fromRangeStart(editor.selection.getRng());\n        const endPosition = CaretPosition.fromRangeEnd(editor.selection.getRng());\n        const root = SugarElement.fromDom(editor.getBody());\n        /* I wasn't able to find a way to create a selection between two different contenteditable elements.\n          However I can't rule out that it is possible. So I am checking if both positions are in the same contenteditable element.\n          This is a defensive check to ensure selection integrity.\n        */\n        const closestCetBlock = flatten(lift2(getClosestCetBlock(startPosition, root), getClosestCetBlock(endPosition, root), (c1, c2) => eq(c1, c2) ? Optional.some(c1) : Optional.none()));\n        return closestCetBlock.fold(never, (cetBlock) => {\n            if ((down && isAtLastLine(cetBlock.dom, endPosition)) ||\n                (!down && isAtFirstLine(cetBlock.dom, startPosition))) {\n                return moveVertically(editor, down ? endPosition : startPosition, down).exists((newRange) => {\n                    moveToRange(editor, newRange);\n                    return true;\n                });\n            }\n            return false;\n        });\n    };\n    const moveV$4 = (editor, down) => moveToNextOrPreviousLine(editor, down);\n\n    const isTarget = (node) => contains$2(['figcaption'], name(node));\n    const getClosestTargetBlock = (pos, root, schema) => {\n        const isRoot = curry(eq, root);\n        return closest$5(SugarElement.fromDom(pos.container()), (el) => schema.isBlock(name(el)), isRoot).filter(isTarget);\n    };\n    const isAtFirstOrLastLine = (root, forward, pos) => forward ? isAtLastLine(root.dom, pos) : isAtFirstLine(root.dom, pos);\n    const moveCaretToNewEmptyLine = (editor, forward) => {\n        const root = SugarElement.fromDom(editor.getBody());\n        const pos = CaretPosition.fromRangeStart(editor.selection.getRng());\n        return getClosestTargetBlock(pos, root, editor.schema).exists(() => {\n            if (isAtFirstOrLastLine(root, forward, pos)) {\n                const insertFn = forward ? append$1 : prepend;\n                const rng = insertEmptyLine(editor, root, insertFn);\n                editor.selection.setRng(rng);\n                return true;\n            }\n            else {\n                return false;\n            }\n        });\n    };\n    const moveV$3 = (editor, forward) => {\n        if (editor.selection.isCollapsed()) {\n            return moveCaretToNewEmptyLine(editor, forward);\n        }\n        else {\n            return false;\n        }\n    };\n\n    const moveUp = (editor, details, summary) => {\n        const rng = editor.selection.getRng();\n        const pos = CaretPosition.fromRangeStart(rng);\n        const root = editor.getBody();\n        if (root.firstChild === details && isAtFirstLine(summary, pos)) {\n            editor.execCommand('InsertNewBlockBefore');\n            return true;\n        }\n        else {\n            return false;\n        }\n    };\n    const moveDown = (editor, details) => {\n        const rng = editor.selection.getRng();\n        const pos = CaretPosition.fromRangeStart(rng);\n        const root = editor.getBody();\n        if (root.lastChild === details && isAtLastLine(details, pos)) {\n            editor.execCommand('InsertNewBlockAfter');\n            return true;\n        }\n        else {\n            return false;\n        }\n    };\n    const move$2 = (editor, forward) => {\n        if (forward) {\n            return Optional.from(editor.dom.getParent(editor.selection.getNode(), 'details'))\n                .map((details) => moveDown(editor, details))\n                .getOr(false);\n        }\n        else {\n            return Optional.from(editor.dom.getParent(editor.selection.getNode(), 'summary'))\n                .bind((summary) => Optional.from(editor.dom.getParent(summary, 'details'))\n                .map((details) => moveUp(editor, details, summary))).getOr(false);\n        }\n    };\n    const moveV$2 = (editor, forward) => move$2(editor, forward);\n\n    const baseKeyPattern = {\n        shiftKey: false,\n        altKey: false,\n        ctrlKey: false,\n        metaKey: false,\n        keyCode: 0\n    };\n    const defaultPatterns = (patterns) => map$3(patterns, (pattern) => ({\n        ...baseKeyPattern,\n        ...pattern\n    }));\n    const defaultDelayedPatterns = (patterns) => map$3(patterns, (pattern) => ({\n        ...baseKeyPattern,\n        ...pattern\n    }));\n    const matchesEvent = (pattern, evt) => (evt.keyCode === pattern.keyCode &&\n        evt.shiftKey === pattern.shiftKey &&\n        evt.altKey === pattern.altKey &&\n        evt.ctrlKey === pattern.ctrlKey &&\n        evt.metaKey === pattern.metaKey);\n    const match$1 = (patterns, evt) => bind$3(defaultPatterns(patterns), (pattern) => matchesEvent(pattern, evt) ? [pattern] : []);\n    const matchDelayed = (patterns, evt) => bind$3(defaultDelayedPatterns(patterns), (pattern) => matchesEvent(pattern, evt) ? [pattern] : []);\n    const action = (f, ...x) => () => f.apply(null, x);\n    const execute = (patterns, evt) => find$2(match$1(patterns, evt), (pattern) => pattern.action());\n    const executeWithDelayedAction = (patterns, evt) => findMap(matchDelayed(patterns, evt), (pattern) => pattern.action());\n\n    const moveH$1 = (editor, forward) => {\n        const direction = forward ? 1 /* HDirection.Forwards */ : -1 /* HDirection.Backwards */;\n        const range = editor.selection.getRng();\n        return moveHorizontally(editor, direction, range, isBeforeMedia, isAfterMedia, isMedia$2).exists((newRange) => {\n            moveToRange(editor, newRange);\n            return true;\n        });\n    };\n    const moveV$1 = (editor, down) => {\n        const direction = down ? 1 : -1;\n        const range = editor.selection.getRng();\n        return moveVertically$1(editor, direction, range, isBeforeMedia, isAfterMedia, isMedia$2).exists((newRange) => {\n            moveToRange(editor, newRange);\n            return true;\n        });\n    };\n    const moveToLineEndPoint = (editor, forward) => {\n        const isNearMedia = forward ? isAfterMedia : isBeforeMedia;\n        return moveToLineEndPoint$3(editor, forward, isNearMedia);\n    };\n\n    const firstLayer = (scope, selector) => {\n        return filterFirstLayer(scope, selector, always);\n    };\n    const filterFirstLayer = (scope, selector, predicate) => {\n        return bind$3(children$2(scope), (x) => {\n            if (is$2(x, selector)) {\n                return predicate(x) ? [x] : [];\n            }\n            else {\n                return filterFirstLayer(x, selector, predicate);\n            }\n        });\n    };\n\n    // lookup inside this table\n    const lookup$1 = (tags, element, isRoot = never) => {\n        // If the element we're inspecting is the root, we definitely don't want it.\n        if (isRoot(element)) {\n            return Optional.none();\n        }\n        // This looks a lot like SelectorFind.closest, with one big exception - the isRoot check.\n        // The code here will look for parents if passed a table, SelectorFind.closest with that specific isRoot check won't.\n        if (contains$2(tags, name(element))) {\n            return Optional.some(element);\n        }\n        const isRootOrUpperTable = (elm) => is$2(elm, 'table') || isRoot(elm);\n        return ancestor$4(element, tags.join(','), isRootOrUpperTable);\n    };\n    /*\n     * Identify the optional cell that element represents.\n     */\n    const cell = (element, isRoot) => lookup$1(['td', 'th'], element, isRoot);\n    const cells = (ancestor) => firstLayer(ancestor, 'th,td');\n    const table = (element, isRoot) => closest$4(element, 'table', isRoot);\n\n    const adt = Adt.generate([\n        { none: ['current'] },\n        { first: ['current'] },\n        { middle: ['current', 'target'] },\n        { last: ['current'] }\n    ]);\n    const none = (current) => adt.none(current);\n    const CellLocation = {\n        ...adt,\n        none\n    };\n\n    /*\n     *  Walk until the next eligible cell location is found, or the start/end of the table is found.\n     */\n    const walk = (all, current, index, direction, isEligible = always) => {\n        const forwards = direction === 1 /* Direction.Forwards */;\n        if (!forwards && index <= 0) {\n            return CellLocation.first(all[0]);\n        }\n        else if (forwards && index >= all.length - 1) {\n            return CellLocation.last(all[all.length - 1]);\n        }\n        else {\n            const newIndex = index + direction;\n            const elem = all[newIndex];\n            return isEligible(elem) ? CellLocation.middle(current, elem) : walk(all, current, newIndex, direction, isEligible);\n        }\n    };\n    /*\n     * Identify the index of the current cell within all the cells, and\n     * a list of the cells within its table.\n     */\n    const detect = (current, isRoot) => {\n        return table(current, isRoot).bind((table) => {\n            const all = cells(table);\n            const index = findIndex$2(all, (x) => eq(current, x));\n            return index.map((index) => ({ index, all }));\n        });\n    };\n    /*\n     * Identify the CellLocation of the cell when navigating forward from current\n     */\n    const next = (current, isEligible, isRoot) => {\n        const detection = detect(current, isRoot);\n        return detection.fold(() => {\n            return CellLocation.none(current);\n        }, (info) => {\n            return walk(info.all, current, info.index, 1 /* Direction.Forwards */, isEligible);\n        });\n    };\n    /*\n     * Identify the CellLocation of the cell when navigating back from current\n     */\n    const prev = (current, isEligible, isRoot) => {\n        const detection = detect(current, isRoot);\n        return detection.fold(() => {\n            return CellLocation.none();\n        }, (info) => {\n            return walk(info.all, current, info.index, -1 /* Direction.Backwards */, isEligible);\n        });\n    };\n\n    var TagBoundaries = [\n        'body',\n        'p',\n        'div',\n        'article',\n        'aside',\n        'figcaption',\n        'figure',\n        'footer',\n        'header',\n        'nav',\n        'section',\n        'ol',\n        'ul',\n        'li',\n        'table',\n        'thead',\n        'tbody',\n        'tfoot',\n        'caption',\n        'tr',\n        'td',\n        'th',\n        'h1',\n        'h2',\n        'h3',\n        'h4',\n        'h5',\n        'h6',\n        'blockquote',\n        'pre',\n        'address'\n    ];\n\n    var DomUniverse = () => {\n        const clone = (element) => {\n            return SugarElement.fromDom(element.dom.cloneNode(false));\n        };\n        const document = (element) => documentOrOwner(element).dom;\n        const isBoundary = (element) => {\n            if (!isElement$8(element)) {\n                return false;\n            }\n            if (name(element) === 'body') {\n                return true;\n            }\n            return contains$2(TagBoundaries, name(element));\n        };\n        const isEmptyTag = (element) => {\n            if (!isElement$8(element)) {\n                return false;\n            }\n            return contains$2(['br', 'img', 'hr', 'input'], name(element));\n        };\n        const isNonEditable = (element) => isElement$8(element) && get$a(element, 'contenteditable') === 'false';\n        const comparePosition = (element, other) => {\n            return element.dom.compareDocumentPosition(other.dom);\n        };\n        const copyAttributesTo = (source, destination) => {\n            const as = clone$4(source);\n            setAll$1(destination, as);\n        };\n        const isSpecial = (element) => {\n            const tag = name(element);\n            return contains$2([\n                'script', 'noscript', 'iframe', 'noframes', 'noembed', 'title', 'style', 'textarea', 'xmp'\n            ], tag);\n        };\n        const getLanguage = (element) => isElement$8(element) ? getOpt(element, 'lang') : Optional.none();\n        return {\n            up: constant({\n                selector: ancestor$4,\n                closest: closest$4,\n                predicate: ancestor$5,\n                all: parents$1\n            }),\n            down: constant({\n                selector: descendants,\n                predicate: descendants$1\n            }),\n            styles: constant({\n                get: get$8,\n                getRaw: getRaw$1,\n                set: set$3,\n                remove: remove$7\n            }),\n            attrs: constant({\n                get: get$a,\n                set: set$5,\n                remove: remove$9,\n                copyTo: copyAttributesTo\n            }),\n            insert: constant({\n                before: before$4,\n                after: after$4,\n                afterAll: after$3,\n                append: append$1,\n                appendAll: append,\n                prepend: prepend,\n                wrap: wrap$2\n            }),\n            remove: constant({\n                unwrap: unwrap,\n                remove: remove$8\n            }),\n            create: constant({\n                nu: SugarElement.fromTag,\n                clone,\n                text: SugarElement.fromText\n            }),\n            query: constant({\n                comparePosition,\n                prevSibling: prevSibling,\n                nextSibling: nextSibling\n            }),\n            property: constant({\n                children: children$2,\n                name: name,\n                parent: parent,\n                document,\n                isText: isText$c,\n                isComment: isComment$1,\n                isElement: isElement$8,\n                isSpecial,\n                getLanguage,\n                getText: get$5,\n                setText: set$2,\n                isBoundary,\n                isEmptyTag,\n                isNonEditable\n            }),\n            eq: eq,\n            is: is$1\n        };\n    };\n\n    const point$1 = (element, offset) => ({\n        element,\n        offset\n    });\n\n    /**\n     * Return the last available cursor position in the node.\n     */\n    const toLast$1 = (universe, node) => {\n        if (universe.property().isText(node)) {\n            return point$1(node, universe.property().getText(node).length);\n        }\n        else {\n            const children = universe.property().children(node);\n            // keep descending if there are children.\n            return children.length > 0 ? toLast$1(universe, children[children.length - 1]) : point$1(node, children.length);\n        }\n    };\n    /**\n     * Descend down to a leaf node at the given offset.\n     */\n    const toLeaf$3 = (universe, element, offset) => {\n        const children = universe.property().children(element);\n        if (children.length > 0 && offset < children.length) {\n            return toLeaf$3(universe, children[offset], 0);\n        }\n        else if (children.length > 0 && universe.property().isElement(element) && children.length === offset) {\n            return toLast$1(universe, children[children.length - 1]);\n        }\n        else {\n            return point$1(element, offset);\n        }\n    };\n\n    const toLeaf$2 = toLeaf$3;\n\n    const universe = DomUniverse();\n    const toLeaf$1 = (element, offset) => {\n        return toLeaf$2(universe, element, offset);\n    };\n\n    const imageId = generate('image');\n    const getDragImage = (transfer) => {\n        const dt = transfer;\n        return Optional.from(dt[imageId]);\n    };\n    const setDragImage = (transfer, imageData) => {\n        const dt = transfer;\n        dt[imageId] = imageData;\n    };\n\n    const eventId = generate('event');\n    const getEvent = (transfer) => {\n        const dt = transfer;\n        return Optional.from(dt[eventId]);\n    };\n    const mkSetEventFn = (type) => (transfer) => {\n        const dt = transfer;\n        dt[eventId] = type;\n    };\n    const setEvent = (transfer, type) => mkSetEventFn(type)(transfer);\n    const setDragstartEvent = mkSetEventFn(0 /* Event.Dragstart */);\n    const setDropEvent = mkSetEventFn(2 /* Event.Drop */);\n    const setDragendEvent = mkSetEventFn(1 /* Event.Dragend */);\n    const checkEvent = (expectedType) => (transfer) => {\n        const dt = transfer;\n        return Optional.from(dt[eventId]).exists((type) => type === expectedType);\n    };\n    const isInDragStartEvent = checkEvent(0 /* Event.Dragstart */);\n\n    const createEmptyFileList = () => {\n        const empty = [];\n        return Object.freeze({\n            length: 0,\n            item: (_) => null,\n            [Symbol.iterator]: () => empty[Symbol.iterator]()\n        });\n    };\n\n    const modeId = generate('mode');\n    const getMode = (transfer) => {\n        const dt = transfer;\n        return Optional.from(dt[modeId]);\n    };\n    const mkSetModeFn = (mode) => (transfer) => {\n        const dt = transfer;\n        dt[modeId] = mode;\n    };\n    const setMode$1 = (transfer, mode) => mkSetModeFn(mode)(transfer);\n    const setReadWriteMode = mkSetModeFn(0 /* Mode.ReadWrite */);\n    const setReadOnlyMode = mkSetModeFn(2 /* Mode.ReadOnly */);\n    const setProtectedMode = mkSetModeFn(1 /* Mode.Protected */);\n    const checkMode = (expectedMode) => (transfer) => {\n        const dt = transfer;\n        return Optional.from(dt[modeId]).exists((mode) => mode === expectedMode);\n    };\n    const isInReadWriteMode = checkMode(0 /* Mode.ReadWrite */);\n    const isInProtectedMode = checkMode(1 /* Mode.Protected */);\n\n    const normalizeItems = (dataTransfer, itemsImpl) => ({\n        ...itemsImpl,\n        get length() {\n            return itemsImpl.length;\n        },\n        add: (data, type) => {\n            if (isInReadWriteMode(dataTransfer)) {\n                if (isString(data)) {\n                    if (!isUndefined(type)) {\n                        return itemsImpl.add(data, type);\n                    }\n                }\n                else {\n                    return itemsImpl.add(data);\n                }\n            }\n            return null;\n        },\n        remove: (idx) => {\n            if (isInReadWriteMode(dataTransfer)) {\n                itemsImpl.remove(idx);\n            }\n        },\n        clear: () => {\n            if (isInReadWriteMode(dataTransfer)) {\n                itemsImpl.clear();\n            }\n        }\n    });\n\n    const validDropEffects = ['none', 'copy', 'link', 'move'];\n    const validEffectAlloweds = ['none', 'copy', 'copyLink', 'copyMove', 'link', 'linkMove', 'move', 'all', 'uninitialized'];\n    const createDataTransfer = () => {\n        const dataTransferImpl = new window.DataTransfer();\n        let dropEffect = 'move';\n        let effectAllowed = 'all';\n        const dataTransfer = {\n            get dropEffect() {\n                return dropEffect;\n            },\n            set dropEffect(effect) {\n                if (contains$2(validDropEffects, effect)) {\n                    dropEffect = effect;\n                }\n            },\n            get effectAllowed() {\n                return effectAllowed;\n            },\n            set effectAllowed(allowed) {\n                // TINY-9601: Only allow setting effectAllowed to a valid value in a dragstart event\n                // https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/effectAllowed\n                if (isInDragStartEvent(dataTransfer) && contains$2(validEffectAlloweds, allowed)) {\n                    effectAllowed = allowed;\n                }\n            },\n            get items() {\n                return normalizeItems(dataTransfer, dataTransferImpl.items);\n            },\n            get files() {\n                if (isInProtectedMode(dataTransfer)) {\n                    return createEmptyFileList();\n                }\n                else {\n                    return dataTransferImpl.files;\n                }\n            },\n            get types() {\n                return dataTransferImpl.types;\n            },\n            setDragImage: (image, x, y) => {\n                if (isInReadWriteMode(dataTransfer)) {\n                    setDragImage(dataTransfer, { image, x, y });\n                    dataTransferImpl.setDragImage(image, x, y);\n                }\n            },\n            getData: (format) => {\n                if (isInProtectedMode(dataTransfer)) {\n                    return '';\n                }\n                else {\n                    return dataTransferImpl.getData(format);\n                }\n            },\n            setData: (format, data) => {\n                if (isInReadWriteMode(dataTransfer)) {\n                    dataTransferImpl.setData(format, data);\n                }\n            },\n            clearData: (format) => {\n                if (isInReadWriteMode(dataTransfer)) {\n                    dataTransferImpl.clearData(format);\n                }\n            }\n        };\n        setReadWriteMode(dataTransfer);\n        return dataTransfer;\n    };\n    const cloneDataTransfer = (original) => {\n        // Create new DataTransfer object to ensure scope is not shared between original and clone\n        const clone = createDataTransfer();\n        const originalMode = getMode(original);\n        // Set original to read-only to ensure data can be copied\n        setReadOnlyMode(original);\n        // Set clone event to dragstart to ensure effectAllowed can be set\n        setDragstartEvent(clone);\n        clone.dropEffect = original.dropEffect;\n        clone.effectAllowed = original.effectAllowed;\n        getDragImage(original).each((imageData) => clone.setDragImage(imageData.image, imageData.x, imageData.y));\n        each$e(original.types, (type) => {\n            if (type !== 'Files') {\n                clone.setData(type, original.getData(type));\n            }\n        });\n        each$e(original.files, (file) => clone.items.add(file));\n        getEvent(original).each((type) => {\n            setEvent(clone, type);\n        });\n        originalMode.each((mode) => {\n            // Reset original mode since it was set to read-only earlier\n            setMode$1(original, mode);\n            setMode$1(clone, mode);\n        });\n        return clone;\n    };\n\n    const getHtmlData = (dataTransfer) => {\n        const html = dataTransfer.getData('text/html');\n        return html === '' ? Optional.none() : Optional.some(html);\n    };\n    const setHtmlData = (dataTransfer, html) => dataTransfer.setData('text/html', html);\n\n    const deflate = (rect, delta) => ({\n        left: rect.left - delta,\n        top: rect.top - delta,\n        right: rect.right + delta * 2,\n        bottom: rect.bottom + delta * 2,\n        width: rect.width + delta,\n        height: rect.height + delta\n    });\n    const getCorners = (getYAxisValue, tds) => bind$3(tds, (td) => {\n        const rect = deflate(clone$1(td.getBoundingClientRect()), -1);\n        return [\n            { x: rect.left, y: getYAxisValue(rect), cell: td },\n            { x: rect.right, y: getYAxisValue(rect), cell: td }\n        ];\n    });\n    const findClosestCorner = (corners, x, y) => foldl(corners, (acc, newCorner) => acc.fold(() => Optional.some(newCorner), (oldCorner) => {\n        const oldDist = Math.sqrt(Math.abs(oldCorner.x - x) + Math.abs(oldCorner.y - y));\n        const newDist = Math.sqrt(Math.abs(newCorner.x - x) + Math.abs(newCorner.y - y));\n        return Optional.some(newDist < oldDist ? newCorner : oldCorner);\n    }), Optional.none());\n    const getClosestCell = (getYAxisValue, isTargetCorner, table, x, y) => {\n        const cells = descendants(SugarElement.fromDom(table), 'td,th,caption').map((e) => e.dom);\n        const corners = filter$5(getCorners(getYAxisValue, cells), (corner) => isTargetCorner(corner, y));\n        return findClosestCorner(corners, x, y).map((corner) => corner.cell);\n    };\n    const getBottomValue = (rect) => rect.bottom;\n    const getTopValue = (rect) => rect.top;\n    const isAbove = (corner, y) => corner.y < y;\n    const isBelow = (corner, y) => corner.y > y;\n    const getClosestCellAbove = curry(getClosestCell, getBottomValue, isAbove);\n    const getClosestCellBelow = curry(getClosestCell, getTopValue, isBelow);\n    const findClosestPositionInAboveCell = (table, pos) => head(pos.getClientRects())\n        .bind((rect) => getClosestCellAbove(table, rect.left, rect.top))\n        .bind((cell) => findClosestHorizontalPosition(getLastLinePositions(cell), pos));\n    const findClosestPositionInBelowCell = (table, pos) => last$2(pos.getClientRects())\n        .bind((rect) => getClosestCellBelow(table, rect.left, rect.top))\n        .bind((cell) => findClosestHorizontalPosition(getFirstLinePositions(cell), pos));\n\n    const hasNextBreak = (getPositionsUntil, scope, lineInfo) => lineInfo.breakAt.exists((breakPos) => getPositionsUntil(scope, breakPos).breakAt.isSome());\n    const startsWithWrapBreak = (lineInfo) => lineInfo.breakType === BreakType.Wrap && lineInfo.positions.length === 0;\n    const startsWithBrBreak = (lineInfo) => lineInfo.breakType === BreakType.Br && lineInfo.positions.length === 1;\n    const isAtTableCellLine = (getPositionsUntil, scope, pos) => {\n        const lineInfo = getPositionsUntil(scope, pos);\n        // Since we can't determine if the caret is on the above or below line in a word wrap break we asume it's always\n        // on the below/above line based on direction. This will make the caret jump one line if you are at the end of the last\n        // line and moving down or at the beginning of the second line moving up.\n        if (startsWithWrapBreak(lineInfo) || (!isBr$7(pos.getNode()) && startsWithBrBreak(lineInfo))) {\n            return !hasNextBreak(getPositionsUntil, scope, lineInfo);\n        }\n        else {\n            return lineInfo.breakAt.isNone();\n        }\n    };\n    const isAtFirstTableCellLine = curry(isAtTableCellLine, getPositionsUntilPreviousLine);\n    const isAtLastTableCellLine = curry(isAtTableCellLine, getPositionsUntilNextLine);\n    const isCaretAtStartOrEndOfTable = (forward, rng, table) => {\n        const caretPos = CaretPosition.fromRangeStart(rng);\n        return positionIn(!forward, table).exists((pos) => pos.isEqual(caretPos));\n    };\n    const navigateHorizontally = (editor, forward, table, _td) => {\n        const rng = editor.selection.getRng();\n        const direction = forward ? 1 : -1;\n        if (isFakeCaretTableBrowser() && isCaretAtStartOrEndOfTable(forward, rng, table)) {\n            showCaret(direction, editor, table, !forward, false).each((newRng) => {\n                moveToRange(editor, newRng);\n            });\n            return true;\n        }\n        return false;\n    };\n    const getClosestAbovePosition = (root, table, start) => findClosestPositionInAboveCell(table, start).orThunk(() => head(start.getClientRects()).bind((rect) => findClosestHorizontalPositionFromPoint(getPositionsAbove(root, CaretPosition.before(table)), rect.left))).getOr(CaretPosition.before(table));\n    const getClosestBelowPosition = (root, table, start) => findClosestPositionInBelowCell(table, start).orThunk(() => head(start.getClientRects()).bind((rect) => findClosestHorizontalPositionFromPoint(getPositionsBelow(root, CaretPosition.after(table)), rect.left))).getOr(CaretPosition.after(table));\n    const getTable = (previous, pos) => {\n        const node = pos.getNode(previous);\n        return isTable$2(node) ? Optional.some(node) : Optional.none();\n    };\n    const renderBlock = (down, editor, table) => {\n        editor.undoManager.transact(() => {\n            const insertFn = down ? after$4 : before$4;\n            const rng = insertEmptyLine(editor, SugarElement.fromDom(table), insertFn);\n            moveToRange(editor, rng);\n        });\n    };\n    const moveCaret = (editor, down, pos) => {\n        const table = down ? getTable(true, pos) : getTable(false, pos);\n        const last = down === false;\n        table.fold(() => moveToRange(editor, pos.toRange()), (table) => positionIn(last, editor.getBody()).filter((lastPos) => lastPos.isEqual(pos)).fold(() => moveToRange(editor, pos.toRange()), (_) => renderBlock(down, editor, table)));\n    };\n    const navigateVertically = (editor, down, table, td) => {\n        const rng = editor.selection.getRng();\n        const pos = CaretPosition.fromRangeStart(rng);\n        const root = editor.getBody();\n        if (!down && isAtFirstTableCellLine(td, pos)) {\n            const newPos = getClosestAbovePosition(root, table, pos);\n            moveCaret(editor, down, newPos);\n            return true;\n        }\n        else if (down && isAtLastTableCellLine(td, pos)) {\n            const newPos = getClosestBelowPosition(root, table, pos);\n            moveCaret(editor, down, newPos);\n            return true;\n        }\n        else {\n            return false;\n        }\n    };\n    const move$1 = (editor, forward, mover) => Optional.from(editor.dom.getParent(editor.selection.getNode(), 'td,th'))\n        .bind((td) => Optional.from(editor.dom.getParent(td, 'table'))\n        .map((table) => mover(editor, forward, table, td))).getOr(false);\n    const moveH = (editor, forward) => move$1(editor, forward, navigateHorizontally);\n    const moveV = (editor, forward) => move$1(editor, forward, navigateVertically);\n    const getCellFirstCursorPosition = (cell) => {\n        const selection = SimSelection.exact(cell, 0, cell, 0);\n        return toNative(selection);\n    };\n    const rowHasEditableCell = (cell) => {\n        return isCellEditable(cell) || siblings(cell).some((element) => isHTMLElement$1(element) && isCellEditable(element));\n    };\n    const tabGo = (editor, isRoot, cell) => {\n        return cell.fold(Optional.none, Optional.none, (_current, next) => {\n            return first(next).map((cell) => {\n                return getCellFirstCursorPosition(cell);\n            });\n        }, (current) => {\n            if (editor.mode.isReadOnly() || !isCellInEditableTable(current) || !rowHasEditableCell(current)) {\n                return Optional.none();\n            }\n            editor.execCommand('mceTableInsertRowAfter');\n            // Move forward from the last cell so that we move into the first valid position in the new row\n            return tabForward(editor, isRoot, current);\n        });\n    };\n    const isCellInEditableTable = (cell) => closest$5(cell, isTag('table')).exists(isEditable$2);\n    const tabForward = (editor, isRoot, cell) => tabGo(editor, isRoot, next(cell, isCellEditable));\n    const tabBackward = (editor, isRoot, cell) => tabGo(editor, isRoot, prev(cell, isCellEditable));\n    const isCellEditable = (cell) => isEditable$2(cell) || descendant(cell, isEditableHTMLElement);\n    const isEditableHTMLElement = (node) => isHTMLElement$1(node) && isEditable$2(node);\n    const handleTab = (editor, forward) => {\n        const rootElements = ['table', 'li', 'dl'];\n        const body = SugarElement.fromDom(editor.getBody());\n        const isRoot = (element) => {\n            const name$1 = name(element);\n            return eq(element, body) || contains$2(rootElements, name$1);\n        };\n        const rng = editor.selection.getRng();\n        // If navigating backwards, use the start of the ranged selection\n        const container = SugarElement.fromDom(!forward ? rng.startContainer : rng.endContainer);\n        return cell(container, isRoot).map((cell) => {\n            // Clear fake ranged selection because our new selection will always be collapsed\n            table(cell, isRoot).each((table) => {\n                editor.model.table.clearSelectedCells(table.dom);\n            });\n            // Collapse selection to start or end based on shift key\n            editor.selection.collapse(!forward);\n            const navigation = !forward ? tabBackward : tabForward;\n            const rng = navigation(editor, isRoot, cell);\n            rng.each((range) => {\n                editor.selection.setRng(range);\n            });\n            return true;\n        }).getOr(false);\n    };\n\n    const executeKeydownOverride$4 = (editor, caret, evt) => {\n        const isMac = Env.os.isMacOS() || Env.os.isiOS();\n        const isFirefox = Env.browser.isFirefox();\n        execute([\n            { keyCode: VK.RIGHT, action: action(moveH$2, editor, true) },\n            { keyCode: VK.LEFT, action: action(moveH$2, editor, false) },\n            { keyCode: VK.UP, action: action(moveV$5, editor, false) },\n            { keyCode: VK.DOWN, action: action(moveV$5, editor, true) },\n            ...(isMac ? [\n                { keyCode: VK.UP, action: action(selectToEndPoint, editor, false), metaKey: true, shiftKey: true },\n                { keyCode: VK.DOWN, action: action(selectToEndPoint, editor, true), metaKey: true, shiftKey: true }\n            ] : []),\n            { keyCode: VK.RIGHT, action: action(moveH, editor, true) },\n            { keyCode: VK.LEFT, action: action(moveH, editor, false) },\n            { keyCode: VK.UP, action: action(moveV, editor, false) },\n            { keyCode: VK.DOWN, action: action(moveV, editor, true) },\n            { keyCode: VK.UP, action: action(moveV, editor, false) },\n            { keyCode: VK.UP, action: action(moveV$2, editor, false) },\n            { keyCode: VK.DOWN, action: action(moveV$2, editor, true) },\n            { keyCode: VK.RIGHT, action: action(moveH$1, editor, true) },\n            { keyCode: VK.LEFT, action: action(moveH$1, editor, false) },\n            { keyCode: VK.UP, action: action(moveV$1, editor, false) },\n            { keyCode: VK.DOWN, action: action(moveV$1, editor, true) },\n            { keyCode: VK.RIGHT, action: action(move$3, editor, caret, true) },\n            { keyCode: VK.LEFT, action: action(move$3, editor, caret, false) },\n            { keyCode: VK.RIGHT, ctrlKey: !isMac, altKey: isMac, action: action(moveNextWord, editor, caret) },\n            { keyCode: VK.LEFT, ctrlKey: !isMac, altKey: isMac, action: action(movePrevWord, editor, caret) },\n            { keyCode: VK.UP, action: action(moveV$3, editor, false) },\n            { keyCode: VK.DOWN, action: action(moveV$3, editor, true) },\n            ...(isFirefox ? [\n                { keyCode: VK.UP, action: action(moveV$4, editor, false) },\n                { keyCode: VK.DOWN, action: action(moveV$4, editor, true) }\n            ] : [])\n        ], evt).each((_) => {\n            evt.preventDefault();\n        });\n    };\n    const setup$q = (editor, caret) => {\n        editor.on('keydown', (evt) => {\n            if (!evt.isDefaultPrevented()) {\n                executeKeydownOverride$4(editor, caret, evt);\n            }\n        });\n    };\n\n    const point = (container, offset) => ({\n        container,\n        offset\n    });\n\n    const DOM$7 = DOMUtils.DOM;\n    const alwaysNext = (startNode) => (node) => startNode === node ? -1 : 0;\n    // This largely is derived from robins isBoundary check, however it also treats contenteditable=false elements as a boundary\n    // See robins `Structure.isEmptyTag` for the list of quasi block elements\n    const isBoundary = (dom) => (node) => dom.isBlock(node) || contains$2(['BR', 'IMG', 'HR', 'INPUT'], node.nodeName) || dom.getContentEditable(node) === 'false';\n    // Finds the text node before the specified node, or just returns the node if it's already on a text node\n    const textBefore = (node, offset, rootNode) => {\n        if (isText$b(node) && offset >= 0) {\n            return Optional.some(point(node, offset));\n        }\n        else {\n            const textSeeker = TextSeeker(DOM$7);\n            return Optional.from(textSeeker.backwards(node, offset, alwaysNext(node), rootNode)).map((prev) => point(prev.container, prev.container.data.length));\n        }\n    };\n    const textAfter = (node, offset, rootNode) => {\n        if (isText$b(node) && offset >= node.length) {\n            return Optional.some(point(node, offset));\n        }\n        else {\n            const textSeeker = TextSeeker(DOM$7);\n            return Optional.from(textSeeker.forwards(node, offset, alwaysNext(node), rootNode)).map((prev) => point(prev.container, 0));\n        }\n    };\n    const scanLeft = (node, offset, rootNode) => {\n        if (!isText$b(node)) {\n            return Optional.none();\n        }\n        const text = node.data;\n        if (offset >= 0 && offset <= text.length) {\n            return Optional.some(point(node, offset));\n        }\n        else {\n            const textSeeker = TextSeeker(DOM$7);\n            return Optional.from(textSeeker.backwards(node, offset, alwaysNext(node), rootNode)).bind((prev) => {\n                const prevText = prev.container.data;\n                return scanLeft(prev.container, offset + prevText.length, rootNode);\n            });\n        }\n    };\n    const scanRight = (node, offset, rootNode) => {\n        if (!isText$b(node)) {\n            return Optional.none();\n        }\n        const text = node.data;\n        if (offset <= text.length) {\n            return Optional.some(point(node, offset));\n        }\n        else {\n            const textSeeker = TextSeeker(DOM$7);\n            return Optional.from(textSeeker.forwards(node, offset, alwaysNext(node), rootNode)).bind((next) => scanRight(next.container, offset - text.length, rootNode));\n        }\n    };\n    const repeatLeft = (dom, node, offset, process, rootNode) => {\n        const search = TextSeeker(dom, isBoundary(dom));\n        return Optional.from(search.backwards(node, offset, process, rootNode));\n    };\n\n    const isValidTextRange = (rng) => rng.collapsed && isText$b(rng.startContainer);\n    // Normalize the text by replacing non-breaking spaces with regular spaces and stripping zero-width spaces (fake carets).\n    const getText = (rng) => trim$2(rng.toString().replace(/\\u00A0/g, ' '));\n    const isWhitespace = (chr) => chr !== '' && ' \\u00a0\\ufeff\\f\\n\\r\\t\\v'.indexOf(chr) !== -1;\n\n    const stripTrigger = (text, trigger) => text.substring(trigger.length);\n    const findTrigger = (text, index, trigger, includeWhitespace = false) => {\n        // Identify the `char` in, and start the text from that point forward. If there is ever any whitespace, fail\n        let i;\n        const firstChar = trigger.charAt(0);\n        for (i = index - 1; i >= 0; i--) {\n            const char = text.charAt(i);\n            if (!includeWhitespace && isWhitespace(char)) {\n                return Optional.none();\n            }\n            if (firstChar === char && contains$1(text, trigger, i, index)) {\n                break;\n            }\n        }\n        return Optional.some(i);\n    };\n    const getContext = (dom, initRange, trigger, includeWhitespace = false) => {\n        if (!isValidTextRange(initRange)) {\n            return Optional.none();\n        }\n        const buffer = { text: '', offset: 0 };\n        const findTriggerIndex = (element, offset, text) => {\n            buffer.text = text + buffer.text;\n            buffer.offset += offset;\n            // Stop searching by just returning the current offset if whitespace was found (eg Optional.none())\n            // and we'll handle the final checks below instead\n            return findTrigger(buffer.text, buffer.offset, trigger, includeWhitespace).getOr(offset);\n        };\n        const root = dom.getParent(initRange.startContainer, dom.isBlock) || dom.getRoot();\n        return repeatLeft(dom, initRange.startContainer, initRange.startOffset, findTriggerIndex, root).bind((spot) => {\n            const range = initRange.cloneRange();\n            range.setStart(spot.container, spot.offset);\n            range.setEnd(initRange.endContainer, initRange.endOffset);\n            // If the range is collapsed then we didn't find a match so abort\n            if (range.collapsed) {\n                return Optional.none();\n            }\n            const text = getText(range);\n            const triggerIndex = text.lastIndexOf(trigger);\n            // If the match doesn't start with the trigger (eg whitespace found)\n            if (triggerIndex !== 0) {\n                return Optional.none();\n            }\n            else {\n                return Optional.some({ text: stripTrigger(text, trigger), range, trigger });\n            }\n        });\n    };\n\n    const isText$1 = (node) => node.nodeType === TEXT;\n    const isElement = (node) => node.nodeType === ELEMENT;\n    const toLast = (node) => {\n        if (isText$1(node)) {\n            return point(node, node.data.length);\n        }\n        else {\n            const children = node.childNodes;\n            // keep descending if there are children.\n            return children.length > 0 ? toLast(children[children.length - 1]) : point(node, children.length);\n        }\n    };\n    const toLeaf = (node, offset) => {\n        const children = node.childNodes;\n        if (children.length > 0 && offset < children.length) {\n            return toLeaf(children[offset], 0);\n        }\n        else if (children.length > 0 && isElement(node) && children.length === offset) {\n            return toLast(children[children.length - 1]);\n        }\n        else {\n            return point(node, offset);\n        }\n    };\n\n    const isPreviousCharContent = (dom, leaf) => {\n        // If at the start of the range, then we need to look backwards one more place. Otherwise we just need to look at the current text\n        const root = dom.getParent(leaf.container, dom.isBlock) ?? dom.getRoot();\n        return repeatLeft(dom, leaf.container, leaf.offset, (_element, offset) => offset === 0 ? -1 : offset, root).filter((spot) => {\n            const char = spot.container.data.charAt(spot.offset - 1);\n            return !isWhitespace(char);\n        }).isSome();\n    };\n    const isStartOfWord = (dom) => (rng) => {\n        const leaf = toLeaf(rng.startContainer, rng.startOffset);\n        return !isPreviousCharContent(dom, leaf);\n    };\n    const getTriggerContext = (dom, initRange, database) => findMap(database.triggers, (trigger) => getContext(dom, initRange, trigger));\n    const lookup = (editor, getDatabase) => {\n        const database = getDatabase();\n        const rng = editor.selection.getRng();\n        return getTriggerContext(editor.dom, rng, database).bind((context) => lookupWithContext(editor, getDatabase, context));\n    };\n    const lookupWithContext = (editor, getDatabase, context, fetchOptions = {}) => {\n        const database = getDatabase();\n        const rng = editor.selection.getRng();\n        const startText = rng.startContainer.nodeValue ?? '';\n        const autocompleters = filter$5(database.lookupByTrigger(context.trigger), (autocompleter) => context.text.length >= autocompleter.minChars && autocompleter.matches.getOrThunk(() => isStartOfWord(editor.dom))(context.range, startText, context.text));\n        if (autocompleters.length === 0) {\n            return Optional.none();\n        }\n        const lookupData = Promise.all(map$3(autocompleters, (ac) => {\n            // TODO: Find a sensible way to do maxResults\n            const fetchResult = ac.fetch(context.text, ac.maxResults, fetchOptions);\n            return fetchResult.then((results) => ({\n                matchText: context.text,\n                items: results,\n                columns: ac.columns,\n                onAction: ac.onAction,\n                highlightOn: ac.highlightOn\n            }));\n        }));\n        return Optional.some({\n            lookupData,\n            context\n        });\n    };\n\n    const type = requiredString('type');\n    const fetch$1 = requiredFunction('fetch');\n    const onAction = requiredFunction('onAction');\n    optionString('name');\n    optionString('text');\n    optionString('role');\n    optionString('icon');\n    optionString('url');\n    optionString('tooltip');\n    optionString('chevronTooltip');\n    optionString('label');\n    optionString('shortcut');\n    const defaultedColumns = (num) => defaulted('columns', num);\n\n    const autocompleterSchema = objOf([\n        type,\n        requiredString('trigger'),\n        defaultedNumber('minChars', 1),\n        defaultedColumns(1),\n        defaultedNumber('maxResults', 10),\n        optionFunction('matches'),\n        fetch$1,\n        onAction,\n        defaultedArrayOf('highlightOn', [], string)\n    ]);\n    const createAutocompleter = (spec) => asRaw('Autocompleter', autocompleterSchema, spec);\n\n    const create$6 = () => {\n        const buttons = {};\n        const menuItems = {};\n        const popups = {};\n        const icons = {};\n        const contextMenus = {};\n        const contextToolbars = {};\n        const contexts = {};\n        const sidebars = {};\n        const views = {};\n        const add = (collection, type) => (name, spec) => {\n            collection[name.toLowerCase()] = { ...spec, type };\n        };\n        const addDefaulted = (collection, type) => (name, spec) => {\n            collection[name.toLowerCase()] = { type, ...spec };\n        };\n        const addIcon = (name, svgData) => icons[name.toLowerCase()] = svgData;\n        const addContext = (name, pred) => contexts[name.toLowerCase()] = pred;\n        return {\n            addButton: add(buttons, 'button'),\n            addGroupToolbarButton: add(buttons, 'grouptoolbarbutton'),\n            addToggleButton: add(buttons, 'togglebutton'),\n            addMenuButton: add(buttons, 'menubutton'),\n            addSplitButton: add(buttons, 'splitbutton'),\n            addMenuItem: add(menuItems, 'menuitem'),\n            addNestedMenuItem: add(menuItems, 'nestedmenuitem'),\n            addToggleMenuItem: add(menuItems, 'togglemenuitem'),\n            addAutocompleter: add(popups, 'autocompleter'),\n            addContextMenu: add(contextMenus, 'contextmenu'),\n            addContextToolbar: add(contextToolbars, 'contexttoolbar'),\n            addContextForm: addDefaulted(contextToolbars, 'contextform'),\n            addSidebar: add(sidebars, 'sidebar'),\n            addView: add(views, 'views'),\n            addIcon,\n            addContext,\n            getAll: () => ({\n                buttons,\n                menuItems,\n                icons,\n                // TODO: should popups be combined with context menus? We'd need to make a new add function.\n                // Right now using `add` shares the key namespace, which prevents registering both\n                // a completer and a context menu with the same name\n                popups,\n                contextMenus,\n                contextToolbars,\n                sidebars,\n                views,\n                contexts\n            })\n        };\n    };\n\n    const register$2 = (editor) => {\n        const popups = editor.ui.registry.getAll().popups;\n        const dataset = map$2(popups, (popup) => createAutocompleter(popup).fold((err) => {\n            throw new Error(formatError(err));\n        }, identity));\n        const triggers = stringArray(mapToArray(dataset, (v) => v.trigger));\n        const datasetValues = values(dataset);\n        const lookupByTrigger = (trigger) => filter$5(datasetValues, (dv) => dv.trigger === trigger);\n        return {\n            dataset,\n            triggers,\n            lookupByTrigger\n        };\n    };\n\n    const setupEditorInput = (editor, api) => {\n        const update = last$1(api.load, 50);\n        editor.on('input', (e) => {\n            // TINY-10715: Firefox on Android using Korean Gboard will produce stray composition events when you move the caret by tapping inside the composed text\n            if (e.inputType === 'insertCompositionText' && !editor.composing) {\n                return;\n            }\n            update.throttle();\n        });\n        editor.on('keydown', (e) => {\n            const keyCode = e.which;\n            // Pressing <backspace> updates the autocompleter\n            if (keyCode === 8) {\n                update.throttle();\n                // Pressing <esc> closes the autocompleter\n            }\n            else if (keyCode === 27) {\n                update.cancel(); // We need to cancel here since Esc cancels the IME composition and triggers an input event\n                api.cancelIfNecessary();\n            }\n            else if (keyCode === 38 || keyCode === 40) {\n                // Arrow up and down keys needs to cancel the update since while composing arrow up or down will end the compose and issue a input event\n                // that causes the list to update and then the focus moves up to the first item in the auto completer list.\n                update.cancel();\n            }\n        }, true); // Need to add this to the top so that it exectued before the silver keyboard event\n        editor.on('remove', update.cancel);\n    };\n    const setup$p = (editor) => {\n        const activeAutocompleter = value$1();\n        const uiActive = Cell(false);\n        const isActive = activeAutocompleter.isSet;\n        const cancelIfNecessary = () => {\n            if (isActive()) {\n                fireAutocompleterEnd(editor);\n                uiActive.set(false);\n                activeAutocompleter.clear();\n            }\n        };\n        const commenceIfNecessary = (context) => {\n            if (!isActive()) {\n                // store the element/context\n                activeAutocompleter.set({\n                    trigger: context.trigger,\n                    matchLength: context.text.length\n                });\n            }\n        };\n        // This needs to be calculated once things are ready, but the key events must be bound\n        // before `init` or other keydown / keypress listeners will fire first. Therefore,\n        // this is a thunk so that its value is calculated just once when it is used for the\n        // first time, and after that it's value is stored.\n        const getAutocompleters = cached(() => register$2(editor));\n        const doLookup = (fetchOptions) => activeAutocompleter.get().map((ac) => getContext(editor.dom, editor.selection.getRng(), ac.trigger, true)\n            .bind((newContext) => lookupWithContext(editor, getAutocompleters, newContext, fetchOptions))).getOrThunk(() => lookup(editor, getAutocompleters));\n        const load = (fetchOptions) => {\n            doLookup(fetchOptions).fold(cancelIfNecessary, (lookupInfo) => {\n                commenceIfNecessary(lookupInfo.context);\n                // Wait for the results to return and then display the menu\n                // eslint-disable-next-line @typescript-eslint/no-floating-promises\n                lookupInfo.lookupData.then((lookupData) => {\n                    // Lookup the active autocompleter to make sure it's still active, if it isn't then do nothing\n                    activeAutocompleter.get().map((ac) => {\n                        const context = lookupInfo.context;\n                        // Ensure the active autocompleter trigger matches, as the old one may have closed\n                        // and a new one may have opened. If it doesn't match, then do nothing.\n                        if (ac.trigger !== context.trigger) {\n                            return;\n                        }\n                        activeAutocompleter.set({\n                            ...ac,\n                            matchLength: context.text.length\n                        });\n                        if (uiActive.get()) {\n                            fireAutocompleterUpdateActiveRange(editor, { range: context.range });\n                            fireAutocompleterUpdate(editor, { lookupData });\n                        }\n                        else {\n                            uiActive.set(true);\n                            fireAutocompleterUpdateActiveRange(editor, { range: context.range });\n                            fireAutocompleterStart(editor, { lookupData });\n                        }\n                    });\n                });\n            });\n        };\n        const isRangeInsideOrEqual = (innerRange, outerRange) => {\n            const startComparison = innerRange.compareBoundaryPoints(window.Range.START_TO_START, outerRange);\n            const endComparison = innerRange.compareBoundaryPoints(window.Range.END_TO_END, outerRange);\n            return startComparison >= 0 && endComparison <= 0;\n        };\n        const readActiveRange = () => {\n            return activeAutocompleter.get().bind(({ trigger }) => {\n                const selRange = editor.selection.getRng();\n                return getContext(editor.dom, selRange, trigger, uiActive.get())\n                    .filter(({ range }) => isRangeInsideOrEqual(selRange, range))\n                    .map(({ range }) => range);\n            });\n        };\n        editor.addCommand('mceAutocompleterReload', (_ui, value) => {\n            const fetchOptions = isObject(value) ? value.fetchOptions : {};\n            load(fetchOptions);\n        });\n        editor.addCommand('mceAutocompleterClose', cancelIfNecessary);\n        editor.addCommand('mceAutocompleterRefreshActiveRange', () => {\n            readActiveRange().each((range) => {\n                fireAutocompleterUpdateActiveRange(editor, { range });\n            });\n        });\n        editor.editorCommands.addQueryStateHandler('mceAutoCompleterInRange', () => readActiveRange().isSome());\n        setupEditorInput(editor, {\n            cancelIfNecessary,\n            load\n        });\n    };\n\n    const browser$1 = detect$1().browser;\n    const isSafari = browser$1.isSafari();\n    const emptyNodeContents = (node) => fillWithPaddingBr(SugarElement.fromDom(node));\n    const isEntireNodeSelected = (rng, node) => rng.startOffset === 0 && rng.endOffset === node.textContent?.length;\n    const getParentDetailsElementAtPos = (dom, pos) => Optional.from(dom.getParent(pos.container(), 'details'));\n    const isInDetailsElement = (dom, pos) => getParentDetailsElementAtPos(dom, pos).isSome();\n    const getDetailsElements = (dom, rng) => {\n        const startDetails = Optional.from(dom.getParent(rng.startContainer, 'details'));\n        const endDetails = Optional.from(dom.getParent(rng.endContainer, 'details'));\n        if (startDetails.isSome() || endDetails.isSome()) {\n            const startSummary = startDetails.bind((details) => Optional.from(dom.select('summary', details)[0]));\n            return Optional.some({ startSummary, startDetails, endDetails });\n        }\n        else {\n            return Optional.none();\n        }\n    };\n    const isCaretInTheBeginningOf = (caretPos, element) => firstPositionIn(element).exists((pos) => pos.isEqual(caretPos));\n    const isCaretInTheEndOf = (caretPos, element) => {\n        return lastPositionIn(element).exists((pos) => {\n            // Summary may or may not have a trailing BR\n            if (isBr$7(pos.getNode())) {\n                return prevPosition(element, pos).exists((pos2) => pos2.isEqual(caretPos)) || pos.isEqual(caretPos);\n            }\n            else {\n                return pos.isEqual(caretPos);\n            }\n        });\n    };\n    const isCaretAtStartOfSummary = (caretPos, detailsElements) => detailsElements.startSummary.exists((summary) => isCaretInTheBeginningOf(caretPos, summary));\n    const isCaretAtEndOfSummary = (caretPos, detailsElements) => detailsElements.startSummary.exists((summary) => isCaretInTheEndOf(caretPos, summary));\n    const isCaretInFirstPositionInBody = (caretPos, detailsElements) => detailsElements.startDetails.exists((details) => prevPosition(details, caretPos).forall((pos) => detailsElements.startSummary.exists((summary) => !summary.contains(caretPos.container()) && summary.contains(pos.container()))));\n    const isCaretInLastPositionInBody = (root, caretPos, detailsElements) => detailsElements.startDetails.exists((details) => nextPosition(root, caretPos).forall((pos) => !details.contains(pos.container())));\n    const setCaretToPosition = (editor, position) => {\n        const node = position.getNode();\n        if (!isUndefined(node)) {\n            editor.selection.setCursorLocation(node, position.offset());\n        }\n    };\n    const moveCaretToDetailsPos = (editor, pos, forward) => {\n        const details = editor.dom.getParent(pos.container(), 'details');\n        if (details && !details.open) {\n            const summary = editor.dom.select('summary', details)[0];\n            if (summary) {\n                const newPos = forward ? firstPositionIn(summary) : lastPositionIn(summary);\n                newPos.each((pos) => setCaretToPosition(editor, pos));\n            }\n        }\n        else {\n            setCaretToPosition(editor, pos);\n        }\n    };\n    const isPartialDelete = (rng, detailsElements) => {\n        const containsStart = (element) => element.contains(rng.startContainer);\n        const containsEnd = (element) => element.contains(rng.endContainer);\n        const startInSummary = detailsElements.startSummary.exists(containsStart);\n        const endInSummary = detailsElements.startSummary.exists(containsEnd);\n        const isPartiallySelectedDetailsElements = detailsElements.startDetails.forall((startDetails) => detailsElements.endDetails.forall((endDetails) => startDetails !== endDetails));\n        const isInPartiallySelectedSummary = (startInSummary || endInSummary) && !(startInSummary && endInSummary);\n        return isInPartiallySelectedSummary || isPartiallySelectedDetailsElements;\n    };\n    const shouldPreventDeleteIntoDetails = (editor, forward, granularity) => {\n        const { dom, selection } = editor;\n        const root = editor.getBody();\n        if (granularity === 'character') {\n            const caretPos = CaretPosition.fromRangeStart(selection.getRng());\n            const parentBlock = dom.getParent(caretPos.container(), dom.isBlock);\n            const parentDetailsAtCaret = getParentDetailsElementAtPos(dom, caretPos);\n            const inEmptyParentBlock = parentBlock && dom.isEmpty(parentBlock);\n            const isFirstBlock = isNull(parentBlock?.previousSibling);\n            const isLastBlock = isNull(parentBlock?.nextSibling);\n            // Pressing backspace or delete in an first or last empty block before or after details\n            if (inEmptyParentBlock) {\n                const firstOrLast = forward ? isLastBlock : isFirstBlock;\n                if (firstOrLast) {\n                    const isBeforeAfterDetails = navigate(!forward, root, caretPos).exists((pos) => {\n                        return isInDetailsElement(dom, pos) && !equals(parentDetailsAtCaret, getParentDetailsElementAtPos(dom, pos));\n                    });\n                    if (isBeforeAfterDetails) {\n                        return true;\n                    }\n                }\n            }\n            return navigate(forward, root, caretPos).fold(never, (pos) => {\n                const parentDetailsAtNewPos = getParentDetailsElementAtPos(dom, pos);\n                if (isInDetailsElement(dom, pos) && !equals(parentDetailsAtCaret, parentDetailsAtNewPos)) {\n                    if (!forward) {\n                        moveCaretToDetailsPos(editor, pos, false);\n                    }\n                    if (parentBlock && inEmptyParentBlock) {\n                        if (forward && isFirstBlock) {\n                            return true;\n                        }\n                        else if (!forward && isLastBlock) {\n                            return true;\n                        }\n                        moveCaretToDetailsPos(editor, pos, forward);\n                        editor.dom.remove(parentBlock);\n                    }\n                    return true;\n                }\n                else {\n                    return false;\n                }\n            });\n        }\n        else {\n            return false;\n        }\n    };\n    const shouldPreventDeleteSummaryAction = (editor, detailElements, forward, granularity) => {\n        const selection = editor.selection;\n        const rng = selection.getRng();\n        const caretPos = CaretPosition.fromRangeStart(rng);\n        const root = editor.getBody();\n        if (granularity === 'selection') {\n            return isPartialDelete(rng, detailElements);\n        }\n        else if (forward) {\n            return isCaretAtEndOfSummary(caretPos, detailElements) || isCaretInLastPositionInBody(root, caretPos, detailElements);\n        }\n        else {\n            return isCaretAtStartOfSummary(caretPos, detailElements) || isCaretInFirstPositionInBody(caretPos, detailElements);\n        }\n    };\n    const shouldPreventDeleteAction = (editor, forward, granularity) => getDetailsElements(editor.dom, editor.selection.getRng()).fold(() => shouldPreventDeleteIntoDetails(editor, forward, granularity), (detailsElements) => shouldPreventDeleteSummaryAction(editor, detailsElements, forward, granularity) || shouldPreventDeleteIntoDetails(editor, forward, granularity));\n    const handleDeleteActionSafari = (editor, forward, granularity) => {\n        const selection = editor.selection;\n        const node = selection.getNode();\n        const rng = selection.getRng();\n        const caretPos = CaretPosition.fromRangeStart(rng);\n        if (isSummary$1(node)) {\n            // TINY-9951: Safari bug, deleting within the summary causes all content to be removed and no caret position to be left\n            // https://bugs.webkit.org/show_bug.cgi?id=257745\n            if (granularity === 'selection' && isEntireNodeSelected(rng, node) || willDeleteLastPositionInElement(forward, caretPos, node)) {\n                emptyNodeContents(node);\n            }\n            else {\n                editor.undoManager.transact(() => {\n                    // Wrap all summary children in a temporary container to execute Backspace/Delete there, then unwrap\n                    const sel = selection.getSel();\n                    let { anchorNode, anchorOffset, focusNode, focusOffset } = sel ?? {};\n                    const applySelection = () => {\n                        if (isNonNullable(anchorNode) && isNonNullable(anchorOffset) && isNonNullable(focusNode) && isNonNullable(focusOffset)) {\n                            sel?.setBaseAndExtent(anchorNode, anchorOffset, focusNode, focusOffset);\n                        }\n                    };\n                    const updateSelection = () => {\n                        anchorNode = sel?.anchorNode;\n                        anchorOffset = sel?.anchorOffset;\n                        focusNode = sel?.focusNode;\n                        focusOffset = sel?.focusOffset;\n                    };\n                    const appendAllChildNodes = (from, to) => {\n                        each$e(from.childNodes, (child) => {\n                            if (isNode(child)) {\n                                to.appendChild(child);\n                            }\n                        });\n                    };\n                    const container = editor.dom.create('span', { 'data-mce-bogus': '1' });\n                    appendAllChildNodes(node, container);\n                    node.appendChild(container);\n                    applySelection();\n                    // Manually perform deletion with modified granularities\n                    if (granularity === 'word' || granularity === 'line') {\n                        sel?.modify('extend', forward ? 'right' : 'left', granularity);\n                    }\n                    if (!selection.isCollapsed() && isEntireNodeSelected(selection.getRng(), container)) {\n                        emptyNodeContents(node);\n                    }\n                    else {\n                        editor.execCommand(forward ? 'ForwardDelete' : 'Delete');\n                        updateSelection();\n                        appendAllChildNodes(container, node);\n                        applySelection();\n                    }\n                    editor.dom.remove(container);\n                });\n            }\n            return true;\n        }\n        else {\n            return false;\n        }\n    };\n    const backspaceDelete = (editor, forward, granularity) => shouldPreventDeleteAction(editor, forward, granularity) || isSafari && handleDeleteActionSafari(editor, forward, granularity)\n        ? Optional.some(noop) : Optional.none();\n\n    const platform$2 = detect$1();\n    const os = platform$2.os;\n    const isMacOSOriOS = os.isMacOS() || os.isiOS();\n    const browser = platform$2.browser;\n    const isFirefox = browser.isFirefox();\n    const executeKeydownOverride$3 = (editor, caret, evt) => {\n        const inputType = evt.keyCode === VK.BACKSPACE ? 'deleteContentBackward' : 'deleteContentForward';\n        const isCollapsed = editor.selection.isCollapsed();\n        const unmodifiedGranularity = isCollapsed ? 'character' : 'selection';\n        const getModifiedGranularity = (isWord) => {\n            if (isCollapsed) {\n                return isWord ? 'word' : 'line';\n            }\n            else {\n                return 'selection';\n            }\n        };\n        executeWithDelayedAction([\n            { keyCode: VK.BACKSPACE, action: action(backspaceDelete$2, editor) },\n            { keyCode: VK.BACKSPACE, action: action(backspaceDelete$8, editor, false) },\n            { keyCode: VK.DELETE, action: action(backspaceDelete$8, editor, true) },\n            { keyCode: VK.BACKSPACE, action: action(backspaceDelete$9, editor, false) },\n            { keyCode: VK.DELETE, action: action(backspaceDelete$9, editor, true) },\n            { keyCode: VK.BACKSPACE, action: action(backspaceDelete$5, editor, caret, false) },\n            { keyCode: VK.DELETE, action: action(backspaceDelete$5, editor, caret, true) },\n            { keyCode: VK.BACKSPACE, action: action(backspaceDelete$d, editor, false) },\n            { keyCode: VK.DELETE, action: action(backspaceDelete$d, editor, true) },\n            { keyCode: VK.BACKSPACE, action: action(backspaceDelete, editor, false, unmodifiedGranularity) },\n            { keyCode: VK.DELETE, action: action(backspaceDelete, editor, true, unmodifiedGranularity) },\n            ...isMacOSOriOS ? [\n                { keyCode: VK.BACKSPACE, altKey: true, action: action(backspaceDelete, editor, false, getModifiedGranularity(true)) },\n                { keyCode: VK.DELETE, altKey: true, action: action(backspaceDelete, editor, true, getModifiedGranularity(true)) },\n                { keyCode: VK.BACKSPACE, metaKey: true, action: action(backspaceDelete, editor, false, getModifiedGranularity(false)) },\n            ] : [\n                { keyCode: VK.BACKSPACE, ctrlKey: true, action: action(backspaceDelete, editor, false, getModifiedGranularity(true)) },\n                { keyCode: VK.DELETE, ctrlKey: true, action: action(backspaceDelete, editor, true, getModifiedGranularity(true)) }\n            ],\n            { keyCode: VK.BACKSPACE, action: action(backspaceDelete$6, editor, false) },\n            { keyCode: VK.DELETE, action: action(backspaceDelete$6, editor, true) },\n            { keyCode: VK.BACKSPACE, action: action(backspaceDelete$3, editor, false) },\n            { keyCode: VK.DELETE, action: action(backspaceDelete$3, editor, true) },\n            { keyCode: VK.BACKSPACE, action: action(backspaceDelete$a, editor, false) },\n            { keyCode: VK.DELETE, action: action(backspaceDelete$a, editor, true) },\n            { keyCode: VK.BACKSPACE, action: action(backspaceDelete$b, editor, false) },\n            { keyCode: VK.DELETE, action: action(backspaceDelete$b, editor, true) },\n            { keyCode: VK.BACKSPACE, action: action(backspaceDelete$4, editor, false) },\n            { keyCode: VK.DELETE, action: action(backspaceDelete$4, editor, true) },\n            { keyCode: VK.BACKSPACE, action: action(backspaceDelete$7, editor, false) },\n            { keyCode: VK.DELETE, action: action(backspaceDelete$7, editor, true) },\n            { keyCode: VK.BACKSPACE, action: action(backspaceDelete$1, editor, false) },\n            { keyCode: VK.DELETE, action: action(backspaceDelete$1, editor, true) },\n        ], evt)\n            .filter((_) => editor.selection.isEditable())\n            .each((applyAction) => {\n            evt.preventDefault();\n            const beforeInput = fireBeforeInputEvent(editor, inputType);\n            if (!beforeInput.isDefaultPrevented()) {\n                applyAction();\n                fireInputEvent(editor, inputType);\n            }\n        });\n    };\n    const executeKeyupOverride = (editor, evt, isBackspaceKeydown, formatNodes) => execute([\n        { keyCode: VK.BACKSPACE, action: action(paddEmptyElement, editor) },\n        { keyCode: VK.DELETE, action: action(paddEmptyElement, editor) },\n        ...isMacOSOriOS ? [\n            { keyCode: VK.BACKSPACE, altKey: true, action: action(refreshCaret, editor) },\n            { keyCode: VK.DELETE, altKey: true, action: action(refreshCaret, editor) },\n            // macOS surpresses keyup events for most keys including Backspace when Meta key is engaged\n            // To emulate Meta + Backspace on macOS, add a pattern for the meta key when backspace was\n            // detected on keydown\n            ...isBackspaceKeydown ? [{\n                    // Firefox detects macOS Command key code as \"Command\" not \"Meta\"\n                    keyCode: isFirefox ? 224 : 91,\n                    action: action(() => {\n                        updateCaretFormat(editor, formatNodes);\n                        return refreshCaret(editor);\n                    })\n                }] : []\n        ] : [\n            { keyCode: VK.BACKSPACE, ctrlKey: true, action: action(refreshCaret, editor) },\n            { keyCode: VK.DELETE, ctrlKey: true, action: action(refreshCaret, editor) }\n        ]\n    ], evt);\n    const setup$o = (editor, caret) => {\n        // track backspace keydown state for emulating Meta + Backspace keyup detection on macOS\n        let isBackspaceKeydown = false;\n        let formatNodes = [];\n        editor.on('init', () => {\n            editor.on('keydown', (evt) => {\n                isBackspaceKeydown = evt.keyCode === VK.BACKSPACE;\n                formatNodes = getFormatNodesAtStart(editor);\n                if (!evt.isDefaultPrevented()) {\n                    executeKeydownOverride$3(editor, caret, evt);\n                }\n            });\n            editor.on('keyup', (evt) => {\n                if (!evt.isDefaultPrevented()) {\n                    executeKeyupOverride(editor, evt, isBackspaceKeydown, formatNodes);\n                    formatNodes.length = 0;\n                }\n                isBackspaceKeydown = false;\n            });\n        });\n    };\n\n    const reduceFontStyleNesting = (block, node) => {\n        const blockSugar = SugarElement.fromDom(block);\n        const nodeSugar = SugarElement.fromDom(node);\n        const isSpan = isTag('span');\n        const isEndBlock = curry(eq, blockSugar);\n        const hasFontSize = (element) => isElement$8(element) && getRaw$1(element, 'font-size').isSome();\n        const elementsWithFontSize = [\n            ...(hasFontSize(nodeSugar) ? [nodeSugar] : []),\n            ...ancestors$1(nodeSugar, hasFontSize, isEndBlock)\n        ];\n        each$e(elementsWithFontSize.slice(1), (element) => {\n            remove$7(element, 'font-size');\n            remove$9(element, 'data-mce-style');\n            if (isSpan(element) && hasNone(element)) {\n                unwrap(element);\n            }\n        });\n    };\n\n    const firstNonWhiteSpaceNodeSibling = (node) => {\n        while (node) {\n            if (isElement$7(node) || (isText$b(node) && node.data && /[\\r\\n\\s]/.test(node.data))) {\n                return Optional.from(SugarElement.fromDom(node));\n            }\n            node = node.nextSibling;\n        }\n        return Optional.none();\n    };\n    const moveToCaretPosition = (editor, root) => {\n        const dom = editor.dom;\n        const moveCaretBeforeOnEnterElementsMap = editor.schema.getMoveCaretBeforeOnEnterElements();\n        if (!root) {\n            return;\n        }\n        if (isListItem$2(SugarElement.fromDom(root))) {\n            const findFirstList = (e) => isList$1(e) ? Optional.from(e) : descendant$2(e, isList$1);\n            const isEmpty = (e) => dom.isEmpty(e.dom);\n            firstNonWhiteSpaceNodeSibling(root.firstChild).each((firstChild) => {\n                findFirstList(firstChild).fold(() => {\n                    if (isEmpty(firstChild)) {\n                        const element = toLeaf$1(firstChild, 0).element;\n                        if (isElement$8(element) && !isBr$6(element)) {\n                            append$1(element, SugarElement.fromHtml('<br data-mce-bogus=\"1\" />'));\n                        }\n                    }\n                }, (firstList) => {\n                    before$4(firstList, SugarElement.fromText(nbsp));\n                });\n            });\n        }\n        const rng = dom.createRng();\n        root.normalize();\n        if (root.hasChildNodes()) {\n            const walker = new DomTreeWalker(root, root);\n            let lastNode = root;\n            let node;\n            while ((node = walker.current())) {\n                if (isText$b(node)) {\n                    rng.setStart(node, 0);\n                    rng.setEnd(node, 0);\n                    break;\n                }\n                if (moveCaretBeforeOnEnterElementsMap[node.nodeName.toLowerCase()]) {\n                    rng.setStartBefore(node);\n                    rng.setEndBefore(node);\n                    break;\n                }\n                lastNode = node;\n                node = walker.next();\n            }\n            if (!node) {\n                rng.setStart(lastNode, 0);\n                rng.setEnd(lastNode, 0);\n            }\n        }\n        else {\n            if (isBr$7(root)) {\n                if (root.nextSibling && dom.isBlock(root.nextSibling)) {\n                    rng.setStartBefore(root);\n                    rng.setEndBefore(root);\n                }\n                else {\n                    rng.setStartAfter(root);\n                    rng.setEndAfter(root);\n                }\n            }\n            else {\n                rng.setStart(root, 0);\n                rng.setEnd(root, 0);\n            }\n        }\n        editor.selection.setRng(rng);\n        scrollRangeIntoView(editor, rng);\n    };\n    const getEditableRoot = (dom, node) => {\n        const root = dom.getRoot();\n        let editableRoot;\n        // Get all parents until we hit a non editable parent or the root\n        let parent = node;\n        while (parent !== root && parent && dom.getContentEditable(parent) !== 'false') {\n            if (dom.getContentEditable(parent) === 'true') {\n                editableRoot = parent;\n                break;\n            }\n            parent = parent.parentNode;\n        }\n        return parent !== root ? editableRoot : root;\n    };\n    const getParentBlock$1 = (editor) => {\n        return Optional.from(editor.dom.getParent(editor.selection.getStart(true), editor.dom.isBlock));\n    };\n    const getParentBlockName = (editor) => {\n        return getParentBlock$1(editor).fold(constant(''), (parentBlock) => {\n            return parentBlock.nodeName.toUpperCase();\n        });\n    };\n    const isListItemParentBlock = (editor) => {\n        return getParentBlock$1(editor).filter((elm) => {\n            return isListItem$2(SugarElement.fromDom(elm));\n        }).isSome();\n    };\n    const emptyBlock = (elm) => {\n        elm.innerHTML = '<br data-mce-bogus=\"1\">';\n    };\n    const applyAttributes = (editor, node, forcedRootBlockAttrs) => {\n        const dom = editor.dom;\n        // Merge and apply style attribute\n        Optional.from(forcedRootBlockAttrs.style)\n            .map(dom.parseStyle)\n            .each((attrStyles) => {\n            const currentStyles = getAllRaw(SugarElement.fromDom(node));\n            const newStyles = { ...currentStyles, ...attrStyles };\n            dom.setStyles(node, newStyles);\n        });\n        // Merge and apply class attribute\n        const attrClassesOpt = Optional.from(forcedRootBlockAttrs.class).map((attrClasses) => attrClasses.split(/\\s+/));\n        const currentClassesOpt = Optional.from(node.className).map((currentClasses) => filter$5(currentClasses.split(/\\s+/), (clazz) => clazz !== ''));\n        lift2(attrClassesOpt, currentClassesOpt, (attrClasses, currentClasses) => {\n            const filteredClasses = filter$5(currentClasses, (clazz) => !contains$2(attrClasses, clazz));\n            const newClasses = [...attrClasses, ...filteredClasses];\n            dom.setAttrib(node, 'class', newClasses.join(' '));\n        });\n        // Apply any remaining forced root block attributes\n        const appliedAttrs = ['style', 'class'];\n        const remainingAttrs = filter$4(forcedRootBlockAttrs, (_, attrs) => !contains$2(appliedAttrs, attrs));\n        dom.setAttribs(node, remainingAttrs);\n    };\n    const setForcedBlockAttrs = (editor, node) => {\n        const forcedRootBlockName = getForcedRootBlock(editor);\n        if (forcedRootBlockName.toLowerCase() === node.tagName.toLowerCase()) {\n            const forcedRootBlockAttrs = getForcedRootBlockAttrs(editor);\n            applyAttributes(editor, node, forcedRootBlockAttrs);\n        }\n    };\n    // Creates a new block element by cloning the current one or creating a new one if the name is specified\n    // This function will also copy any text formatting from the parent block and add it to the new one\n    const createNewBlock = (editor, container, parentBlock, editableRoot, keepStyles = true, name, styles) => {\n        const dom = editor.dom;\n        const schema = editor.schema;\n        const newBlockName = getForcedRootBlock(editor);\n        const parentBlockName = parentBlock ? parentBlock.nodeName.toUpperCase() : ''; // IE < 9 & HTML5\n        let node = container;\n        const textInlineElements = schema.getTextInlineElements();\n        let block;\n        if (name || parentBlockName === 'TABLE' || parentBlockName === 'HR') {\n            block = dom.create(name || newBlockName, styles || {});\n        }\n        else {\n            block = parentBlock.cloneNode(false);\n        }\n        let caretNode = block;\n        if (!keepStyles) {\n            dom.setAttrib(block, 'style', null); // wipe out any styles that came over with the block\n            dom.setAttrib(block, 'class', null);\n        }\n        else {\n            // Clone any parent styles\n            do {\n                if (textInlineElements[node.nodeName]) {\n                    // Ignore caret or bookmark nodes when cloning\n                    if (isCaretNode(node) || isBookmarkNode$1(node)) {\n                        continue;\n                    }\n                    const clonedNode = node.cloneNode(false);\n                    dom.setAttrib(clonedNode, 'id', ''); // Remove ID since it needs to be document unique\n                    if (block.hasChildNodes()) {\n                        clonedNode.appendChild(block.firstChild);\n                        block.appendChild(clonedNode);\n                    }\n                    else {\n                        caretNode = clonedNode;\n                        block.appendChild(clonedNode);\n                    }\n                }\n            } while ((node = node.parentNode) && node !== editableRoot);\n            // Not omitting font sizes of list items otherwise their font size doesn't match its content\n            if (block.nodeName !== 'LI') {\n                reduceFontStyleNesting(block, caretNode);\n            }\n        }\n        setForcedBlockAttrs(editor, block);\n        emptyBlock(caretNode);\n        return block;\n    };\n\n    const getDetailsRoot = (editor, element) => editor.dom.getParent(element, isDetails);\n    const isAtDetailsEdge = (root, element, isTextBlock) => {\n        let node = element;\n        while (node && node !== root && isNull(node.nextSibling)) {\n            const parent = node.parentElement;\n            if (!parent || !isTextBlock(parent)) {\n                return isDetails(parent);\n            }\n            node = parent;\n        }\n        return false;\n    };\n    const isLastEmptyBlockInDetails = (editor, shiftKey, element) => !shiftKey &&\n        element.nodeName.toLowerCase() === getForcedRootBlock(editor) &&\n        editor.dom.isEmpty(element) &&\n        isAtDetailsEdge(editor.getBody(), element, (el) => has$2(editor.schema.getTextBlockElements(), el.nodeName.toLowerCase()));\n    const insertNewLine = (editor, createNewBlock, parentBlock) => {\n        const newBlock = createNewBlock(getForcedRootBlock(editor));\n        const root = getDetailsRoot(editor, parentBlock);\n        if (!root) {\n            return;\n        }\n        editor.dom.insertAfter(newBlock, root);\n        moveToCaretPosition(editor, newBlock);\n        // TODO: This now only works with our Accordions not details with multiple root level children should we support that\n        if ((parentBlock.parentElement?.childNodes?.length ?? 0) > 1) {\n            editor.dom.remove(parentBlock);\n        }\n    };\n\n    const hasFirstChild = (elm, name) => {\n        return elm.firstChild && elm.firstChild.nodeName === name;\n    };\n    const isFirstChild = (elm) => {\n        return elm.parentNode?.firstChild === elm;\n    };\n    const hasParent = (elm, parentName) => {\n        const parentNode = elm?.parentNode;\n        return isNonNullable(parentNode) && parentNode.nodeName === parentName;\n    };\n    const isListBlock = (elm) => {\n        return isNonNullable(elm) && /^(OL|UL|LI)$/.test(elm.nodeName);\n    };\n    const isListItem = (elm) => {\n        return isNonNullable(elm) && /^(LI|DT|DD)$/.test(elm.nodeName);\n    };\n    const isNestedList = (elm) => {\n        return isListBlock(elm) && isListBlock(elm.parentNode);\n    };\n    const getContainerBlock = (containerBlock) => {\n        const containerBlockParent = containerBlock.parentNode;\n        return isListItem(containerBlockParent) ? containerBlockParent : containerBlock;\n    };\n    const isFirstOrLastLi = (containerBlock, parentBlock, first) => {\n        let node = containerBlock[first ? 'firstChild' : 'lastChild'];\n        // Find first/last element since there might be whitespace there\n        while (node) {\n            if (isElement$7(node)) {\n                break;\n            }\n            node = node[first ? 'nextSibling' : 'previousSibling'];\n        }\n        return node === parentBlock;\n    };\n    const getStyles = (elm) => foldl(mapToArray(getAllRaw(SugarElement.fromDom(elm)), (style, styleName) => `${styleName}: ${style};`), (acc, s) => acc + s, '');\n    // Inserts a block or br before/after or in the middle of a split list of the LI is empty\n    const insert$4 = (editor, createNewBlock, containerBlock, parentBlock, newBlockName) => {\n        const dom = editor.dom;\n        const rng = editor.selection.getRng();\n        const containerParent = containerBlock.parentNode;\n        if (containerBlock === editor.getBody() || !containerParent) {\n            return;\n        }\n        if (isNestedList(containerBlock)) {\n            newBlockName = 'LI';\n        }\n        const parentBlockStyles = isListItem(parentBlock) ? getStyles(parentBlock) : undefined;\n        let newBlock = isListItem(parentBlock) && parentBlockStyles\n            ? createNewBlock(newBlockName, { style: getStyles(parentBlock) })\n            : createNewBlock(newBlockName);\n        if (isFirstOrLastLi(containerBlock, parentBlock, true) && isFirstOrLastLi(containerBlock, parentBlock, false)) {\n            if (hasParent(containerBlock, 'LI')) {\n                // Nested list is inside a LI\n                const containerBlockParent = getContainerBlock(containerBlock);\n                dom.insertAfter(newBlock, containerBlockParent);\n                if (isFirstChild(containerBlock)) {\n                    dom.remove(containerBlockParent);\n                }\n                else {\n                    dom.remove(containerBlock);\n                }\n            }\n            else {\n                // Is first and last list item then replace the OL/UL with a text block\n                dom.replace(newBlock, containerBlock);\n            }\n        }\n        else if (isFirstOrLastLi(containerBlock, parentBlock, true)) {\n            if (hasParent(containerBlock, 'LI')) {\n                // List nested in an LI then move the list to a new sibling LI\n                dom.insertAfter(newBlock, getContainerBlock(containerBlock));\n                newBlock.appendChild(dom.doc.createTextNode(' ')); // Needed for IE so the caret can be placed\n                newBlock.appendChild(containerBlock);\n            }\n            else {\n                // First LI in list then remove LI and add text block before list\n                containerParent.insertBefore(newBlock, containerBlock);\n            }\n            dom.remove(parentBlock);\n        }\n        else if (isFirstOrLastLi(containerBlock, parentBlock, false)) {\n            // Last LI in list then remove LI and add text block after list\n            dom.insertAfter(newBlock, getContainerBlock(containerBlock));\n            dom.remove(parentBlock);\n        }\n        else {\n            // Middle LI in list then split the list and insert a text block in the middle\n            // Extract after fragment and insert it after the current block\n            containerBlock = getContainerBlock(containerBlock);\n            const tmpRng = rng.cloneRange();\n            tmpRng.setStartAfter(parentBlock);\n            tmpRng.setEndAfter(containerBlock);\n            const fragment = tmpRng.extractContents();\n            if (newBlockName === 'LI' && hasFirstChild(fragment, 'LI')) {\n                const previousChildren = filter$5(map$3(newBlock.children, SugarElement.fromDom), not(isTag('br')));\n                newBlock = fragment.firstChild;\n                dom.insertAfter(fragment, containerBlock);\n                each$e(previousChildren, (child) => prepend(SugarElement.fromDom(newBlock), child));\n                if (parentBlockStyles) {\n                    newBlock.setAttribute('style', parentBlockStyles);\n                }\n            }\n            else {\n                dom.insertAfter(fragment, containerBlock);\n                dom.insertAfter(newBlock, containerBlock);\n            }\n            dom.remove(parentBlock);\n        }\n        moveToCaretPosition(editor, newBlock);\n    };\n\n    const trimZwsp = (fragment) => {\n        each$e(descendants$1(SugarElement.fromDom(fragment), isText$c), (text) => {\n            const rawNode = text.dom;\n            rawNode.nodeValue = trim$2(rawNode.data);\n        });\n    };\n    const isWithinNonEditableList = (editor, node) => {\n        const parentList = editor.dom.getParent(node, 'ol,ul,dl');\n        return parentList !== null && editor.dom.getContentEditableParent(parentList) === 'false';\n    };\n    const isEmptyAnchor = (dom, elm) => {\n        return elm && elm.nodeName === 'A' && dom.isEmpty(elm);\n    };\n    const containerAndPreviousSiblingName = (container, nodeName) => {\n        return container.nodeName === nodeName || (container.previousSibling && container.previousSibling.nodeName === nodeName);\n    };\n    const containerAndNextSiblingName = (container, nodeName) => {\n        return container.nodeName === nodeName || (container.nextSibling && container.nextSibling.nodeName === nodeName);\n    };\n    // Returns true if the block can be split into two blocks or not\n    const canSplitBlock = (dom, node) => {\n        return isNonNullable(node) &&\n            dom.isBlock(node) &&\n            !/^(TD|TH|CAPTION|FORM)$/.test(node.nodeName) &&\n            !/^(fixed|absolute)/i.test(node.style.position) &&\n            dom.isEditable(node.parentNode) && dom.getContentEditable(node) !== 'false';\n    };\n    // Remove the first empty inline element of the block so this: <p><b><em></em></b>x</p> becomes this: <p>x</p>\n    const trimInlineElementsOnLeftSideOfBlock = (dom, nonEmptyElementsMap, block) => {\n        const firstChilds = [];\n        if (!block) {\n            return;\n        }\n        // Find inner most first child ex: <p><i><b>*</b></i></p>\n        let currentNode = block;\n        while ((currentNode = currentNode.firstChild)) {\n            if (dom.isBlock(currentNode)) {\n                return;\n            }\n            if (isElement$7(currentNode) && !nonEmptyElementsMap[currentNode.nodeName.toLowerCase()]) {\n                firstChilds.push(currentNode);\n            }\n        }\n        let i = firstChilds.length;\n        while (i--) {\n            currentNode = firstChilds[i];\n            if (!currentNode.hasChildNodes() || (currentNode.firstChild === currentNode.lastChild && currentNode.firstChild?.nodeValue === '')) {\n                dom.remove(currentNode);\n            }\n            else {\n                if (isEmptyAnchor(dom, currentNode)) {\n                    dom.remove(currentNode);\n                }\n            }\n        }\n    };\n    const normalizeZwspOffset = (start, container, offset) => {\n        if (!isText$b(container)) {\n            return offset;\n        }\n        else if (start) {\n            return offset === 1 && container.data.charAt(offset - 1) === ZWSP$1 ? 0 : offset;\n        }\n        else {\n            return offset === container.data.length - 1 && container.data.charAt(offset) === ZWSP$1 ? container.data.length : offset;\n        }\n    };\n    const includeZwspInRange = (rng) => {\n        const newRng = rng.cloneRange();\n        newRng.setStart(rng.startContainer, normalizeZwspOffset(true, rng.startContainer, rng.startOffset));\n        newRng.setEnd(rng.endContainer, normalizeZwspOffset(false, rng.endContainer, rng.endOffset));\n        return newRng;\n    };\n    // Trims any linebreaks at the beginning of node user for example when pressing enter in a PRE element\n    const trimLeadingLineBreaks = (node) => {\n        let currentNode = node;\n        do {\n            if (isText$b(currentNode)) {\n                currentNode.data = currentNode.data.replace(/^[\\r\\n]+/, '');\n            }\n            currentNode = currentNode.firstChild;\n        } while (currentNode);\n    };\n    // Wraps any text nodes or inline elements in the specified forced root block name\n    const wrapSelfAndSiblingsInDefaultBlock = (editor, newBlockName, rng, container, offset) => {\n        const dom = editor.dom;\n        const editableRoot = getEditableRoot(dom, container) ?? dom.getRoot();\n        // Not in a block element or in a table cell or caption\n        let parentBlock = dom.getParent(container, dom.isBlock);\n        if (!parentBlock || !canSplitBlock(dom, parentBlock)) {\n            parentBlock = parentBlock || editableRoot;\n            if (!parentBlock.hasChildNodes()) {\n                const newBlock = dom.create(newBlockName);\n                setForcedBlockAttrs(editor, newBlock);\n                parentBlock.appendChild(newBlock);\n                rng.setStart(newBlock, 0);\n                rng.setEnd(newBlock, 0);\n                return newBlock;\n            }\n            // Find parent that is the first child of parentBlock\n            let node = container;\n            while (node && node.parentNode !== parentBlock) {\n                node = node.parentNode;\n            }\n            // Loop left to find start node start wrapping at\n            let startNode;\n            while (node && !dom.isBlock(node)) {\n                startNode = node;\n                node = node.previousSibling;\n            }\n            const startNodeName = startNode?.parentElement?.nodeName;\n            if (startNode && startNodeName && editor.schema.isValidChild(startNodeName, newBlockName.toLowerCase())) {\n                // This should never be null since we check it above\n                const startNodeParent = startNode.parentNode;\n                const newBlock = dom.create(newBlockName);\n                setForcedBlockAttrs(editor, newBlock);\n                startNodeParent.insertBefore(newBlock, startNode);\n                // Start wrapping until we hit a block\n                node = startNode;\n                while (node && !dom.isBlock(node)) {\n                    const next = node.nextSibling;\n                    newBlock.appendChild(node);\n                    node = next;\n                }\n                // Restore range to it's past location\n                rng.setStart(container, offset);\n                rng.setEnd(container, offset);\n            }\n        }\n        return container;\n    };\n    // Adds a BR at the end of blocks that only contains an IMG or INPUT since\n    // these might be floated and then they won't expand the block\n    const addBrToBlockIfNeeded = (dom, block) => {\n        // IE will render the blocks correctly other browsers needs a BR\n        block.normalize(); // Remove empty text nodes that got left behind by the extract\n        // Check if the block is empty or contains a floated last child\n        const lastChild = block.lastChild;\n        if (!lastChild || isElement$7(lastChild) && (/^(left|right)$/gi.test(dom.getStyle(lastChild, 'float', true)))) {\n            dom.add(block, 'br');\n        }\n    };\n    const shouldEndContainer = (editor, container) => {\n        const optionValue = shouldEndContainerOnEmptyBlock(editor);\n        if (isNullable(container)) {\n            return false;\n        }\n        else if (isString(optionValue)) {\n            return contains$2(Tools.explode(optionValue), container.nodeName.toLowerCase());\n        }\n        else {\n            return optionValue;\n        }\n    };\n    const insert$3 = (editor, evt) => {\n        let container;\n        let offset;\n        let parentBlockName;\n        let containerBlock;\n        let isAfterLastNodeInContainer = false;\n        const dom = editor.dom;\n        const schema = editor.schema, nonEmptyElementsMap = schema.getNonEmptyElements();\n        const rng = editor.selection.getRng();\n        const newBlockName = getForcedRootBlock(editor);\n        const start = SugarElement.fromDom(rng.startContainer);\n        const child = child$1(start, rng.startOffset);\n        const isCef = child.exists((element) => isHTMLElement$1(element) && !isEditable$2(element));\n        const collapsedAndCef = rng.collapsed && isCef;\n        const createNewBlock$1 = (name, styles) => {\n            return createNewBlock(editor, container, parentBlock, editableRoot, shouldKeepStyles(editor), name, styles);\n        };\n        // Returns true/false if the caret is at the start/end of the parent block element\n        const isCaretAtStartOrEndOfBlock = (start) => {\n            const normalizedOffset = normalizeZwspOffset(start, container, offset);\n            // Caret is in the middle of a text node like \"a|b\"\n            if (isText$b(container) && (start ? normalizedOffset > 0 : normalizedOffset < container.data.length)) {\n                return false;\n            }\n            // If after the last element in block node edge case for #5091\n            if ((container.parentNode === parentBlock || container === parentBlock) && isAfterLastNodeInContainer && !start) {\n                return true;\n            }\n            // If the caret if before the first element in parentBlock\n            if (start && isElement$7(container) && container === parentBlock.firstChild) {\n                return true;\n            }\n            // Caret can be before/after a table or a hr\n            if (containerAndPreviousSiblingName(container, 'TABLE') || containerAndPreviousSiblingName(container, 'HR')) {\n                if (containerAndNextSiblingName(container, 'BR')) {\n                    return !start;\n                }\n                return (isAfterLastNodeInContainer && !start) || (!isAfterLastNodeInContainer && start);\n            }\n            // Walk the DOM and look for text nodes or non empty elements\n            const walker = new DomTreeWalker(container, parentBlock);\n            // If caret is in beginning or end of a text block then jump to the next/previous node\n            if (isText$b(container)) {\n                if (start && normalizedOffset === 0) {\n                    walker.prev();\n                }\n                else if (!start && normalizedOffset === container.data.length) {\n                    walker.next();\n                }\n            }\n            let node;\n            while ((node = walker.current())) {\n                if (isElement$7(node)) {\n                    // Ignore bogus elements\n                    if (!node.getAttribute('data-mce-bogus')) {\n                        // Keep empty elements like <img /> <input /> but not trailing br:s like <p>text|<br></p>\n                        const name = node.nodeName.toLowerCase();\n                        if (nonEmptyElementsMap[name] && name !== 'br') {\n                            return false;\n                        }\n                    }\n                }\n                else if (isText$b(node) && !isWhitespaceText(node.data)) {\n                    return false;\n                }\n                if (start) {\n                    walker.prev();\n                }\n                else {\n                    walker.next();\n                }\n            }\n            return true;\n        };\n        const isInsideLiBeforeAList = (newBlock) => {\n            const nextSibling$1 = firstChild(newBlock).bind(nextSibling);\n            return isListItem$2(newBlock) && nextSibling$1.exists(isList$1);\n        };\n        const trimEmptySpacesInLeftLeaf = (newBlock) => {\n            const leaf = toLeaf$1(SugarElement.fromDom(newBlock), 0).element;\n            if (isText$c(leaf) && dom.isEmpty(leaf.dom)) {\n                leaf.dom.remove();\n            }\n        };\n        const insertNewBlockAfter = () => {\n            let block;\n            // If the caret is at the end of a header we produce a P tag after it similar to Word unless we are in a hgroup\n            if (/^(H[1-6]|PRE|FIGURE)$/.test(parentBlockName) && containerBlockName !== 'HGROUP') {\n                block = createNewBlock$1(newBlockName);\n            }\n            else {\n                block = createNewBlock$1();\n            }\n            // Split the current container block element if enter is pressed inside an empty inner block element\n            if (shouldEndContainer(editor, containerBlock) && canSplitBlock(dom, containerBlock) && dom.isEmpty(parentBlock, undefined, { includeZwsp: true })) {\n                // Split container block for example a BLOCKQUOTE at the current blockParent location for example a P\n                block = dom.split(containerBlock, parentBlock);\n            }\n            else {\n                dom.insertAfter(block, parentBlock);\n            }\n            moveToCaretPosition(editor, block);\n            return block;\n        };\n        // Setup range items and newBlockName\n        normalize$2(dom, rng).each((normRng) => {\n            rng.setStart(normRng.startContainer, normRng.startOffset);\n            rng.setEnd(normRng.endContainer, normRng.endOffset);\n        });\n        container = rng.startContainer;\n        offset = rng.startOffset;\n        const shiftKey = !!(evt && evt.shiftKey);\n        const ctrlKey = !!(evt && evt.ctrlKey);\n        // Resolve node index\n        if (isElement$7(container) && container.hasChildNodes() && !collapsedAndCef) {\n            isAfterLastNodeInContainer = offset > container.childNodes.length - 1;\n            container = container.childNodes[Math.min(offset, container.childNodes.length - 1)] || container;\n            if (isAfterLastNodeInContainer && isText$b(container)) {\n                offset = container.data.length;\n            }\n            else {\n                offset = 0;\n            }\n        }\n        // Get editable root node, normally the body element but sometimes a div or span\n        const editableRoot = getEditableRoot(dom, container);\n        // If there is no editable root then enter is done inside a contentEditable false element\n        if (!editableRoot || isWithinNonEditableList(editor, container)) {\n            return;\n        }\n        // Wrap the current node and it's sibling in a default block if it's needed.\n        // for example this <td>text|<b>text2</b></td> will become this <td><p>text|<b>text2</p></b></td>\n        // This won't happen if root blocks are disabled or the shiftKey is pressed\n        if (!shiftKey) {\n            container = wrapSelfAndSiblingsInDefaultBlock(editor, newBlockName, rng, container, offset);\n        }\n        // Find parent block and setup empty block paddings\n        let parentBlock = dom.getParent(container, dom.isBlock) || dom.getRoot();\n        containerBlock = isNonNullable(parentBlock?.parentNode) ? dom.getParent(parentBlock.parentNode, dom.isBlock) : null;\n        // Setup block names\n        parentBlockName = parentBlock ? parentBlock.nodeName.toUpperCase() : ''; // IE < 9 & HTML5\n        const containerBlockName = containerBlock ? containerBlock.nodeName.toUpperCase() : ''; // IE < 9 & HTML5\n        // Enter inside block contained within a LI then split or insert before/after LI\n        if (containerBlockName === 'LI' && !ctrlKey) {\n            const liBlock = containerBlock;\n            parentBlock = liBlock;\n            containerBlock = liBlock.parentNode;\n            parentBlockName = containerBlockName;\n        }\n        if (isElement$7(containerBlock) && isLastEmptyBlockInDetails(editor, shiftKey, parentBlock)) {\n            return insertNewLine(editor, createNewBlock$1, parentBlock);\n        }\n        // Handle enter in list item\n        if (/^(LI|DT|DD)$/.test(parentBlockName) && isElement$7(containerBlock)) {\n            // Handle enter inside an empty list item\n            if (dom.isEmpty(parentBlock)) {\n                insert$4(editor, createNewBlock$1, containerBlock, parentBlock, newBlockName);\n                return;\n            }\n        }\n        // Never split the body or blocks that we can't split like noneditable host elements\n        if (!collapsedAndCef && (parentBlock === editor.getBody() || !canSplitBlock(dom, parentBlock))) {\n            return;\n        }\n        const parentBlockParent = parentBlock.parentNode;\n        // Insert new block before/after the parent block depending on caret location\n        let newBlock;\n        if (collapsedAndCef) {\n            newBlock = createNewBlock$1(newBlockName);\n            child.fold(() => {\n                append$1(start, SugarElement.fromDom(newBlock));\n            }, (child) => {\n                before$4(child, SugarElement.fromDom(newBlock));\n            });\n            editor.selection.setCursorLocation(newBlock, 0);\n        }\n        else if (isCaretContainerBlock$1(parentBlock)) {\n            // TODO: TINY-10384 NOTE: Added logic to make sure pressing enter is consistent between browsers.\n            // As an example a fake caret is used before/after tables on Firefox but not on Chrome. So different behaviour could occur\n            newBlock = showCaretContainerBlock(parentBlock);\n            if (dom.isEmpty(parentBlock)) {\n                emptyBlock(parentBlock);\n            }\n            setForcedBlockAttrs(editor, newBlock);\n            moveToCaretPosition(editor, newBlock);\n        }\n        else if (isCaretAtStartOrEndOfBlock(false)) {\n            // Caret is moved to the new block in the insertNewBlockAfter fn\n            newBlock = insertNewBlockAfter();\n        }\n        else if (isCaretAtStartOrEndOfBlock(true) && parentBlockParent) {\n            // Check where caret is positioned before it is potentially moved by 'insertBefore' fn\n            const caretPos = CaretPosition.fromRangeStart(rng);\n            const afterTable = isAfterTable(caretPos);\n            const parentBlockSugar = SugarElement.fromDom(parentBlock);\n            const afterBr = isAfterBr(parentBlockSugar, caretPos, editor.schema);\n            const prevBrOpt = afterBr\n                ? findPreviousBr(parentBlockSugar, caretPos, editor.schema).bind((pos) => Optional.from(pos.getNode()))\n                : Optional.none();\n            newBlock = parentBlockParent.insertBefore(createNewBlock$1(), parentBlock);\n            const root = containerAndPreviousSiblingName(parentBlock, 'HR') || afterTable ? newBlock : prevBrOpt.getOr(parentBlock);\n            moveToCaretPosition(editor, root);\n        }\n        else {\n            // Extract after fragment and insert it after the current block\n            const tmpRng = includeZwspInRange(rng).cloneRange();\n            tmpRng.setEndAfter(parentBlock);\n            const fragment = tmpRng.extractContents();\n            trimZwsp(fragment);\n            trimLeadingLineBreaks(fragment);\n            newBlock = fragment.firstChild;\n            if (parentBlock === newBlock) { // Can't add yourself to yourself. Additionally the newBlock is removed from the DOM earlier, so even if you could, it'd still not work.\n                if (isNonNullable(parentBlockParent)) {\n                    dom.insertAfter(fragment, parentBlockParent);\n                }\n            }\n            else {\n                dom.insertAfter(fragment, parentBlock);\n            }\n            if (!isInsideLiBeforeAList(SugarElement.fromDom(newBlock))) {\n                trimInlineElementsOnLeftSideOfBlock(dom, nonEmptyElementsMap, newBlock);\n                addBrToBlockIfNeeded(dom, parentBlock);\n            }\n            else {\n                trimEmptySpacesInLeftLeaf(newBlock);\n            }\n            if (dom.isEmpty(parentBlock)) {\n                emptyBlock(parentBlock);\n            }\n            newBlock.normalize();\n            // New block might become empty if it's <p><b>a |</b></p>\n            if (dom.isEmpty(newBlock)) {\n                dom.remove(newBlock);\n                insertNewBlockAfter();\n            }\n            else {\n                setForcedBlockAttrs(editor, newBlock);\n                moveToCaretPosition(editor, newBlock);\n            }\n        }\n        dom.setAttrib(newBlock, 'id', ''); // Remove ID since it needs to be document unique\n        // Allow custom handling of new blocks\n        editor.dispatch('NewBlock', { newBlock });\n    };\n    const fakeEventName$1 = 'insertParagraph';\n    const blockbreak = {\n        insert: insert$3,\n        fakeEventName: fakeEventName$1\n    };\n\n    // Walks the parent block to the right and look for BR elements\n    const hasRightSideContent = (schema, container, parentBlock) => {\n        const walker = new DomTreeWalker(container, parentBlock);\n        let node;\n        const nonEmptyElementsMap = schema.getNonEmptyElements();\n        while ((node = walker.next())) {\n            if (nonEmptyElementsMap[node.nodeName.toLowerCase()] || isText$b(node) && node.length > 0) {\n                return true;\n            }\n        }\n        return false;\n    };\n    const moveSelectionToBr = (editor, brElm, extraBr) => {\n        const rng = editor.dom.createRng();\n        if (!extraBr) {\n            rng.setStartAfter(brElm);\n            rng.setEndAfter(brElm);\n        }\n        else {\n            rng.setStartBefore(brElm);\n            rng.setEndBefore(brElm);\n        }\n        editor.selection.setRng(rng);\n        scrollRangeIntoView(editor, rng);\n    };\n    const insertBrAtCaret = (editor, evt) => {\n        // We load the current event in from EnterKey.js when appropriate to heed\n        // certain event-specific variations such as ctrl-enter in a list\n        const selection = editor.selection;\n        const dom = editor.dom;\n        const rng = selection.getRng();\n        let brElm;\n        let extraBr = false;\n        normalize$2(dom, rng).each((normRng) => {\n            rng.setStart(normRng.startContainer, normRng.startOffset);\n            rng.setEnd(normRng.endContainer, normRng.endOffset);\n        });\n        let offset = rng.startOffset;\n        let container = rng.startContainer;\n        // Resolve node index\n        if (isElement$7(container) && container.hasChildNodes()) {\n            const isAfterLastNodeInContainer = offset > container.childNodes.length - 1;\n            container = container.childNodes[Math.min(offset, container.childNodes.length - 1)] || container;\n            if (isAfterLastNodeInContainer && isText$b(container)) {\n                offset = container.data.length;\n            }\n            else {\n                offset = 0;\n            }\n        }\n        let parentBlock = dom.getParent(container, dom.isBlock);\n        const containerBlock = parentBlock && parentBlock.parentNode ? dom.getParent(parentBlock.parentNode, dom.isBlock) : null;\n        const containerBlockName = containerBlock ? containerBlock.nodeName.toUpperCase() : ''; // IE < 9 & HTML5\n        // Enter inside block contained within a LI then split or insert before/after LI\n        const isControlKey = !!(evt && evt.ctrlKey);\n        if (containerBlockName === 'LI' && !isControlKey) {\n            parentBlock = containerBlock;\n        }\n        if (isText$b(container) && offset >= container.data.length) {\n            // Insert extra BR element at the end block elements\n            if (!hasRightSideContent(editor.schema, container, parentBlock || dom.getRoot())) {\n                brElm = dom.create('br');\n                rng.insertNode(brElm);\n                rng.setStartAfter(brElm);\n                rng.setEndAfter(brElm);\n                extraBr = true;\n            }\n        }\n        brElm = dom.create('br');\n        rangeInsertNode(dom, rng, brElm);\n        moveSelectionToBr(editor, brElm, extraBr);\n        editor.undoManager.add();\n    };\n    const insertBrBefore = (editor, inline) => {\n        const br = SugarElement.fromTag('br');\n        before$4(SugarElement.fromDom(inline), br);\n        editor.undoManager.add();\n    };\n    const insertBrAfter = (editor, inline) => {\n        if (!hasBrAfter(editor.getBody(), inline)) {\n            after$4(SugarElement.fromDom(inline), SugarElement.fromTag('br'));\n        }\n        const br = SugarElement.fromTag('br');\n        after$4(SugarElement.fromDom(inline), br);\n        moveSelectionToBr(editor, br.dom, false);\n        editor.undoManager.add();\n    };\n    const isBeforeBr = (pos) => {\n        return isBr$7(pos.getNode());\n    };\n    const hasBrAfter = (rootNode, startNode) => {\n        if (isBeforeBr(CaretPosition.after(startNode))) {\n            return true;\n        }\n        else {\n            return nextPosition(rootNode, CaretPosition.after(startNode)).map((pos) => {\n                return isBr$7(pos.getNode());\n            }).getOr(false);\n        }\n    };\n    const isAnchorLink = (elm) => {\n        return elm && elm.nodeName === 'A' && 'href' in elm;\n    };\n    const isInsideAnchor = (location) => {\n        return location.fold(never, isAnchorLink, isAnchorLink, never);\n    };\n    const readInlineAnchorLocation = (editor) => {\n        const isInlineTarget$1 = curry(isInlineTarget, editor);\n        const position = CaretPosition.fromRangeStart(editor.selection.getRng());\n        return readLocation(isInlineTarget$1, editor.getBody(), position).filter(isInsideAnchor);\n    };\n    const insertBrOutsideAnchor = (editor, location) => {\n        location.fold(noop, curry(insertBrBefore, editor), curry(insertBrAfter, editor), noop);\n    };\n    const insert$2 = (editor, evt) => {\n        const anchorLocation = readInlineAnchorLocation(editor);\n        if (anchorLocation.isSome()) {\n            anchorLocation.each(curry(insertBrOutsideAnchor, editor));\n        }\n        else {\n            insertBrAtCaret(editor, evt);\n        }\n    };\n    const fakeEventName = 'insertLineBreak';\n    const linebreak = {\n        insert: insert$2,\n        fakeEventName\n    };\n\n    const matchesSelector = (editor, selector) => {\n        return getParentBlock$1(editor).filter((parentBlock) => {\n            return selector.length > 0 && is$2(SugarElement.fromDom(parentBlock), selector);\n        }).isSome();\n    };\n    const shouldInsertBr = (editor) => {\n        return matchesSelector(editor, getBrNewLineSelector(editor));\n    };\n    const shouldBlockNewLine$1 = (editor) => {\n        return matchesSelector(editor, getNoNewLineSelector(editor));\n    };\n\n    const newLineAction = Adt.generate([\n        { br: [] },\n        { block: [] },\n        { none: [] }\n    ]);\n    const shouldBlockNewLine = (editor, _shiftKey) => {\n        return shouldBlockNewLine$1(editor);\n    };\n    const inListBlock = (requiredState) => {\n        return (editor, _shiftKey) => {\n            return isListItemParentBlock(editor) === requiredState;\n        };\n    };\n    const inBlock = (blockName, requiredState) => (editor, _shiftKey) => {\n        const state = getParentBlockName(editor) === blockName.toUpperCase();\n        return state === requiredState;\n    };\n    const inCefBlock = (editor) => {\n        const editableRoot = getEditableRoot(editor.dom, editor.selection.getStart());\n        return isNullable(editableRoot);\n    };\n    const inPreBlock = (requiredState) => inBlock('pre', requiredState);\n    const inSummaryBlock = () => inBlock('summary', true);\n    const shouldPutBrInPre = (requiredState) => {\n        return (editor, _shiftKey) => {\n            return shouldPutBrInPre$1(editor) === requiredState;\n        };\n    };\n    const inBrContext = (editor, _shiftKey) => {\n        return shouldInsertBr(editor);\n    };\n    const hasShiftKey = (_editor, shiftKey) => {\n        return shiftKey;\n    };\n    const canInsertIntoEditableRoot = (editor) => {\n        const forcedRootBlock = getForcedRootBlock(editor);\n        const rootEditable = getEditableRoot(editor.dom, editor.selection.getStart());\n        return isNonNullable(rootEditable) && editor.schema.isValidChild(rootEditable.nodeName, forcedRootBlock);\n    };\n    const isInRootWithEmptyOrCEF = (editor) => {\n        const rng = editor.selection.getRng();\n        const start = SugarElement.fromDom(rng.startContainer);\n        const child = child$1(start, rng.startOffset);\n        const isCefOpt = child.map((element) => isHTMLElement$1(element) && !isEditable$2(element));\n        return rng.collapsed && isCefOpt.getOr(true);\n    };\n    const match = (predicates, action) => {\n        return (editor, shiftKey) => {\n            const isMatch = foldl(predicates, (res, p) => {\n                return res && p(editor, shiftKey);\n            }, true);\n            return isMatch ? Optional.some(action) : Optional.none();\n        };\n    };\n    const getAction = (editor, evt) => {\n        return evaluateUntil([\n            match([shouldBlockNewLine], newLineAction.none()),\n            // If the pre block is cef, do not try to insert a new line (or delete contents)\n            match([inPreBlock(true), inCefBlock], newLineAction.none()),\n            match([inSummaryBlock()], newLineAction.br()),\n            match([inPreBlock(true), shouldPutBrInPre(false), hasShiftKey], newLineAction.br()),\n            match([inPreBlock(true), shouldPutBrInPre(false)], newLineAction.block()),\n            match([inPreBlock(true), shouldPutBrInPre(true), hasShiftKey], newLineAction.block()),\n            match([inPreBlock(true), shouldPutBrInPre(true)], newLineAction.br()),\n            // TODO: TINY-9127 investigate if the list handling (and pre) is correct here.\n            match([inListBlock(true), hasShiftKey], newLineAction.br()),\n            match([inListBlock(true)], newLineAction.block()),\n            match([inBrContext], newLineAction.br()),\n            match([hasShiftKey], newLineAction.br()),\n            match([canInsertIntoEditableRoot], newLineAction.block()),\n            match([isInRootWithEmptyOrCEF], newLineAction.block())\n        ], [editor, !!(evt && evt.shiftKey)]).getOr(newLineAction.none());\n    };\n\n    const insertBreak = (breakType, editor, evt) => {\n        if (editor.mode.isReadOnly()) {\n            return;\n        }\n        if (!editor.selection.isCollapsed()) {\n            // IMPORTANT: We want to use the editor execCommand here, so that our `delete` execCommand\n            // overrides will be considered.\n            execEditorDeleteCommand(editor);\n        }\n        if (isNonNullable(evt)) {\n            const event = fireBeforeInputEvent(editor, breakType.fakeEventName);\n            if (event.isDefaultPrevented()) {\n                return;\n            }\n        }\n        breakType.insert(editor, evt);\n        if (isNonNullable(evt)) {\n            fireInputEvent(editor, breakType.fakeEventName);\n        }\n    };\n    const insert$1 = (editor, evt) => {\n        if (editor.mode.isReadOnly()) {\n            return;\n        }\n        const br = () => insertBreak(linebreak, editor, evt);\n        const block = () => insertBreak(blockbreak, editor, evt);\n        const logicalAction = getAction(editor, evt);\n        switch (getNewlineBehavior(editor)) {\n            case 'linebreak':\n                logicalAction.fold(br, br, noop);\n                break;\n            case 'block':\n                logicalAction.fold(block, block, noop);\n                break;\n            case 'invert':\n                logicalAction.fold(block, br, noop);\n                break;\n            // implied by the options processor, unnecessary\n            // case 'default':\n            default:\n                logicalAction.fold(br, block, noop);\n                break;\n        }\n    };\n\n    const platform$1 = detect$1();\n    const isIOSSafari = platform$1.os.isiOS() && platform$1.browser.isSafari();\n    const handleEnterKeyEvent = (editor, event) => {\n        if (event.isDefaultPrevented()) {\n            return;\n        }\n        event.preventDefault();\n        endTypingLevelIgnoreLocks(editor.undoManager);\n        editor.undoManager.transact(() => {\n            insert$1(editor, event);\n        });\n    };\n    const isCaretAfterKoreanCharacter = (rng) => {\n        if (!rng.collapsed) {\n            return false;\n        }\n        const startContainer = rng.startContainer;\n        if (isText$b(startContainer)) {\n            // Hangul: \\uAC00-\\uD7AF\n            // Hangul Jamo: \\u1100-\\u11FF\n            // Hangul Compatibility Jamo: \\u3130-\\u318F\n            // Hangul Jamo Extended-A: \\uA960-\\uA97F\n            // Hangul Jamo Extended-B: \\uD7B0-\\uD7FF\n            const koreanCharRegex = /^[\\uAC00-\\uD7AF\\u1100-\\u11FF\\u3130-\\u318F\\uA960-\\uA97F\\uD7B0-\\uD7FF]$/;\n            const char = startContainer.data.charAt(rng.startOffset - 1);\n            return koreanCharRegex.test(char);\n        }\n        else {\n            return false;\n        }\n    };\n    const setup$n = (editor) => {\n        let iOSSafariKeydownBookmark = Optional.none();\n        const iOSSafariKeydownOverride = (editor) => {\n            iOSSafariKeydownBookmark = Optional.some(editor.selection.getBookmark());\n            editor.undoManager.add();\n        };\n        const iOSSafariKeyupOverride = (editor, event) => {\n            editor.undoManager.undo();\n            iOSSafariKeydownBookmark.fold(noop, (b) => editor.selection.moveToBookmark(b));\n            handleEnterKeyEvent(editor, event);\n            iOSSafariKeydownBookmark = Optional.none();\n        };\n        editor.on('keydown', (event) => {\n            if (event.keyCode === VK.ENTER) {\n                if (isIOSSafari && isCaretAfterKoreanCharacter(editor.selection.getRng())) {\n                    // TINY-9746: iOS Safari composes Korean characters by deleting the previous partial character and inserting\n                    // the composed character. If the native Enter keypress event is not fired, iOS Safari will continue to compose across\n                    // our custom newline by deleting it and inserting the composed character on the previous line, causing a bug. The workaround\n                    // is to save a bookmark and an undo level on keydown while not preventing default to allow the native Enter keypress.\n                    // Then on keyup, the effects of the native Enter keypress is undone and our own Enter key handler is called.\n                    iOSSafariKeydownOverride(editor);\n                }\n                else {\n                    handleEnterKeyEvent(editor, event);\n                }\n            }\n        });\n        editor.on('keyup', (event) => {\n            if (event.keyCode === VK.ENTER) {\n                iOSSafariKeydownBookmark.each(() => iOSSafariKeyupOverride(editor, event));\n            }\n        });\n    };\n\n    const executeKeydownOverride$2 = (editor, caret, evt) => {\n        const isMac = Env.os.isMacOS() || Env.os.isiOS();\n        execute([\n            { keyCode: VK.END, action: action(moveToLineEndPoint$1, editor, true) },\n            { keyCode: VK.HOME, action: action(moveToLineEndPoint$1, editor, false) },\n            ...(!isMac ? [\n                { keyCode: VK.HOME, action: action(selectToEndPoint, editor, false), ctrlKey: true, shiftKey: true },\n                { keyCode: VK.END, action: action(selectToEndPoint, editor, true), ctrlKey: true, shiftKey: true }\n            ] : []),\n            { keyCode: VK.END, action: action(moveToLineEndPoint, editor, true) },\n            { keyCode: VK.HOME, action: action(moveToLineEndPoint, editor, false) },\n            { keyCode: VK.END, action: action(moveToLineEndPoint$2, editor, true, caret) },\n            { keyCode: VK.HOME, action: action(moveToLineEndPoint$2, editor, false, caret) }\n        ], evt).each((_) => {\n            evt.preventDefault();\n        });\n    };\n    const setup$m = (editor, caret) => {\n        editor.on('keydown', (evt) => {\n            if (!evt.isDefaultPrevented()) {\n                executeKeydownOverride$2(editor, caret, evt);\n            }\n        });\n    };\n\n    const setup$l = (editor) => {\n        editor.on('input', (e) => {\n            // We only care about non composing inputs since moving the caret or modifying the text node will blow away the IME\n            if (!e.isComposing) {\n                normalizeNbspsInEditor(editor);\n            }\n        });\n    };\n\n    const platform = detect$1();\n    const executeKeyupAction = (editor, caret, evt) => {\n        execute([\n            { keyCode: VK.PAGE_UP, action: action(moveToLineEndPoint$2, editor, false, caret) },\n            { keyCode: VK.PAGE_DOWN, action: action(moveToLineEndPoint$2, editor, true, caret) }\n        ], evt);\n    };\n    const stopImmediatePropagation = (e) => e.stopImmediatePropagation();\n    const isPageUpDown = (evt) => evt.keyCode === VK.PAGE_UP || evt.keyCode === VK.PAGE_DOWN;\n    const setNodeChangeBlocker = (blocked, editor, block) => {\n        // Node change event is only blocked while the user is holding down the page up/down key it would have limited effects on other things\n        // Prevents a flickering UI while caret move in and out of the inline boundary element\n        if (block && !blocked.get()) {\n            editor.on('NodeChange', stopImmediatePropagation, true);\n        }\n        else if (!block && blocked.get()) {\n            editor.off('NodeChange', stopImmediatePropagation);\n        }\n        blocked.set(block);\n    };\n    // Determining the correct placement on key up/down is very complicated and would require handling many edge cases,\n    // which we don't have the resources to handle currently. As such, we allow the browser to change the selection and then make adjustments later.\n    const setup$k = (editor, caret) => {\n        // Mac OS doesn't move the selection when pressing page up/down and as such TinyMCE shouldn't be moving it either\n        if (platform.os.isMacOS()) {\n            return;\n        }\n        const blocked = Cell(false);\n        editor.on('keydown', (evt) => {\n            if (isPageUpDown(evt)) {\n                setNodeChangeBlocker(blocked, editor, true);\n            }\n        });\n        editor.on('keyup', (evt) => {\n            if (!evt.isDefaultPrevented()) {\n                executeKeyupAction(editor, caret, evt);\n            }\n            if (isPageUpDown(evt) && blocked.get()) {\n                setNodeChangeBlocker(blocked, editor, false);\n                editor.nodeChanged();\n            }\n        });\n    };\n\n    const isValidContainer = (root, container) => root === container || root.contains(container);\n    const isInEditableRange = (editor, range) => {\n        // If the range is not in the body then it's in a shadow root and we should allow that more details in: TINY-11446\n        if (!isValidContainer(editor.getBody(), range.startContainer) || !isValidContainer(editor.getBody(), range.endContainer)) {\n            return true;\n        }\n        return isEditableRange(editor.dom, range);\n    };\n    const setup$j = (editor) => {\n        editor.on('beforeinput', (e) => {\n            // Normally input is blocked on non-editable elements that have contenteditable=\"false\" however we are also treating\n            // SVG elements as non-editable and deleting inside or into is possible in some browsers so we need to detect that and prevent that.\n            if (!editor.selection.isEditable() || exists(e.getTargetRanges(), (rng) => !isInEditableRange(editor, rng))) {\n                e.preventDefault();\n            }\n        });\n    };\n\n    const insertTextAtPosition = (text, pos) => {\n        const container = pos.container();\n        const offset = pos.offset();\n        if (isText$b(container)) {\n            container.insertData(offset, text);\n            return Optional.some(CaretPosition(container, offset + text.length));\n        }\n        else {\n            return getElementFromPosition(pos).map((elm) => {\n                const textNode = SugarElement.fromText(text);\n                if (pos.isAtEnd()) {\n                    after$4(elm, textNode);\n                }\n                else {\n                    before$4(elm, textNode);\n                }\n                return CaretPosition(textNode.dom, text.length);\n            });\n        }\n    };\n    const insertNbspAtPosition = curry(insertTextAtPosition, nbsp);\n    const insertSpaceAtPosition = curry(insertTextAtPosition, ' ');\n\n    const insertSpaceOrNbspAtPosition = (root, pos, schema) => needsToHaveNbsp(root, pos, schema) ? insertNbspAtPosition(pos) : insertSpaceAtPosition(pos);\n    const locationToCaretPosition = (root) => (location) => location.fold((element) => prevPosition(root.dom, CaretPosition.before(element)), (element) => firstPositionIn(element), (element) => lastPositionIn(element), (element) => nextPosition(root.dom, CaretPosition.after(element)));\n    const insertInlineBoundarySpaceOrNbsp = (root, pos, schema) => (checkPos) => needsToHaveNbsp(root, checkPos, schema) ? insertNbspAtPosition(pos) : insertSpaceAtPosition(pos);\n    const setSelection = (editor) => (pos) => {\n        editor.selection.setRng(pos.toRange());\n        editor.nodeChanged();\n    };\n    const isInsideSummary = (domUtils, node) => domUtils.isEditable(domUtils.getParent(node, 'summary'));\n    const insertSpaceOrNbspAtSelection = (editor) => {\n        const pos = CaretPosition.fromRangeStart(editor.selection.getRng());\n        const root = SugarElement.fromDom(editor.getBody());\n        if (editor.selection.isCollapsed()) {\n            const isInlineTarget$1 = curry(isInlineTarget, editor);\n            const caretPosition = CaretPosition.fromRangeStart(editor.selection.getRng());\n            return readLocation(isInlineTarget$1, editor.getBody(), caretPosition)\n                .bind(locationToCaretPosition(root))\n                .map((checkPos) => () => insertInlineBoundarySpaceOrNbsp(root, pos, editor.schema)(checkPos).each(setSelection(editor)));\n        }\n        else {\n            return Optional.none();\n        }\n    };\n    // TINY-9964: Firefox has a bug where the space key is toggling the open state instead of inserting a space in a summary element\n    const insertSpaceInSummaryAtSelectionOnFirefox = (editor) => {\n        const insertSpaceThunk = () => {\n            const root = SugarElement.fromDom(editor.getBody());\n            if (!editor.selection.isCollapsed()) {\n                editor.getDoc().execCommand('Delete');\n            }\n            const pos = CaretPosition.fromRangeStart(editor.selection.getRng());\n            insertSpaceOrNbspAtPosition(root, pos, editor.schema).each(setSelection(editor));\n        };\n        return someIf(Env.browser.isFirefox() && editor.selection.isEditable() && isInsideSummary(editor.dom, editor.selection.getRng().startContainer), insertSpaceThunk);\n    };\n\n    const executeKeydownOverride$1 = (editor, evt) => {\n        executeWithDelayedAction([\n            { keyCode: VK.SPACEBAR, action: action(insertSpaceOrNbspAtSelection, editor) },\n            { keyCode: VK.SPACEBAR, action: action(insertSpaceInSummaryAtSelectionOnFirefox, editor) }\n        ], evt).each((applyAction) => {\n            evt.preventDefault();\n            const event = fireBeforeInputEvent(editor, 'insertText', { data: ' ' });\n            if (!event.isDefaultPrevented()) {\n                applyAction();\n                // Browsers sends space in data even if the dom ends up with a nbsp so we should always be sending a space\n                fireInputEvent(editor, 'insertText', { data: ' ' });\n            }\n        });\n    };\n    const setup$i = (editor) => {\n        editor.on('keydown', (evt) => {\n            if (!evt.isDefaultPrevented()) {\n                executeKeydownOverride$1(editor, evt);\n            }\n        });\n    };\n\n    const tableTabNavigation = (editor) => {\n        if (hasTableTabNavigation(editor)) {\n            return [\n                { keyCode: VK.TAB, action: action(handleTab, editor, true) },\n                { keyCode: VK.TAB, shiftKey: true, action: action(handleTab, editor, false) },\n            ];\n        }\n        else {\n            return [];\n        }\n    };\n    const executeKeydownOverride = (editor, evt) => {\n        execute([\n            ...tableTabNavigation(editor)\n        ], evt).each((_) => {\n            evt.preventDefault();\n        });\n    };\n    const setup$h = (editor) => {\n        editor.on('keydown', (evt) => {\n            if (!evt.isDefaultPrevented()) {\n                executeKeydownOverride(editor, evt);\n            }\n        });\n    };\n\n    const setup$g = (editor) => {\n        editor.addShortcut('Meta+P', '', 'mcePrint');\n        setup$p(editor);\n        if (isRtc(editor)) {\n            return Cell(null);\n        }\n        else {\n            const caret = setupSelectedState(editor);\n            setup$j(editor);\n            setup$r(editor);\n            setup$q(editor, caret);\n            setup$o(editor, caret);\n            setup$n(editor);\n            setup$i(editor);\n            setup$l(editor);\n            setup$h(editor);\n            setup$m(editor, caret);\n            setup$k(editor, caret);\n            return caret;\n        }\n    };\n\n    const updateList = (editor, update) => {\n        const parentList = getParentList(editor);\n        if (parentList === null || isWithinNonEditableList$1(editor, parentList)) {\n            return;\n        }\n        editor.undoManager.transact(() => {\n            if (isObject(update.styles)) {\n                editor.dom.setStyles(parentList, update.styles);\n            }\n            if (isObject(update.attrs)) {\n                each$d(update.attrs, (v, k) => editor.dom.setAttrib(parentList, k, v));\n            }\n        });\n    };\n\n    const queryListCommandState = (editor, listName) => () => {\n        const parentList = getParentList(editor);\n        return isNonNullable(parentList) && parentList.nodeName === listName;\n    };\n    const setup$f = (editor) => {\n        editor.addCommand('InsertUnorderedList', (ui, detail) => {\n            toggleList(editor, 'UL', detail);\n        });\n        editor.addCommand('InsertOrderedList', (ui, detail) => {\n            toggleList(editor, 'OL', detail);\n        });\n        editor.addCommand('InsertDefinitionList', (ui, detail) => {\n            toggleList(editor, 'DL', detail);\n        });\n        editor.addCommand('RemoveList', () => {\n            flattenListSelection(editor);\n        });\n        editor.addCommand('mceListUpdate', (ui, detail) => {\n            if (isObject(detail)) {\n                updateList(editor, detail);\n            }\n        });\n        editor.addCommand('mceListBackspaceDelete', (_ui, forward) => {\n            backspaceDelete$c(editor, forward);\n        });\n        editor.addQueryStateHandler('InsertUnorderedList', queryListCommandState(editor, 'UL'));\n        editor.addQueryStateHandler('InsertOrderedList', queryListCommandState(editor, 'OL'));\n        editor.addQueryStateHandler('InsertDefinitionList', queryListCommandState(editor, 'DL'));\n    };\n\n    const setup$e = (editor) => {\n        editor.on('init', () => {\n            // Init is done after the editor's setup. This places our keydown after any keydowns registered in the setup function, so they can do default prevent.\n            editor.on('keydown', (e) => {\n                if (e.defaultPrevented) {\n                    return;\n                }\n                if (e.keyCode === VK.BACKSPACE) {\n                    if (backspaceDelete$c(editor, false)) {\n                        e.preventDefault();\n                    }\n                }\n                else if (e.keyCode === VK.DELETE) {\n                    if (backspaceDelete$c(editor, true)) {\n                        e.preventDefault();\n                    }\n                }\n            });\n        });\n    };\n\n    const isTextNode = (node) => node.type === 3;\n    const isEmpty = (nodeBuffer) => nodeBuffer.length === 0;\n    const wrapInvalidChildren = (list) => {\n        const insertListItem = (buffer, refNode) => {\n            const li = AstNode.create('li');\n            each$e(buffer, (node) => li.append(node));\n            if (refNode) {\n                list.insert(li, refNode, true);\n            }\n            else {\n                list.append(li);\n            }\n        };\n        const reducer = (buffer, node) => {\n            if (isTextNode(node)) {\n                return [...buffer, node];\n            }\n            else if (!isEmpty(buffer) && !isTextNode(node)) {\n                insertListItem(buffer, node);\n                return [];\n            }\n            else {\n                return buffer;\n            }\n        };\n        const restBuffer = foldl(list.children(), reducer, []);\n        if (!isEmpty(restBuffer)) {\n            insertListItem(restBuffer);\n        }\n    };\n    const setup$d = (editor) => {\n        editor.on('PreInit', () => {\n            const { parser } = editor;\n            parser.addNodeFilter('ul,ol', (nodes) => each$e(nodes, wrapInvalidChildren));\n        });\n    };\n\n    const setupTabKey = (editor) => {\n        editor.on('keydown', (e) => {\n            // Check for tab but not ctrl/cmd+tab since it switches browser tabs\n            if (e.keyCode !== VK.TAB || VK.metaKeyPressed(e)) {\n                return;\n            }\n            editor.undoManager.transact(() => {\n                if (e.shiftKey ? outdentListSelection(editor) : indentListSelection(editor)) {\n                    e.preventDefault();\n                }\n            });\n        });\n    };\n    const setup$c = (editor) => {\n        if (shouldIndentOnTab(editor)) {\n            setupTabKey(editor);\n        }\n    };\n\n    const setup$b = (editor) => {\n        setup$e(editor);\n        setup$f(editor);\n        setup$d(editor);\n        setup$c(editor);\n    };\n\n    /**\n     * This class handles the nodechange event dispatching both manual and through selection change events.\n     *\n     * @class tinymce.NodeChange\n     * @private\n     */\n    class NodeChange {\n        editor;\n        lastPath = [];\n        constructor(editor) {\n            this.editor = editor;\n            let lastRng;\n            const self = this;\n            // Gecko doesn't support the \"selectionchange\" event\n            if (!('onselectionchange' in editor.getDoc())) {\n                editor.on('NodeChange click mouseup keyup focus', (e) => {\n                    // Since DOM Ranges mutate on modification\n                    // of the DOM we need to clone it's contents\n                    const nativeRng = editor.selection.getRng();\n                    const fakeRng = {\n                        startContainer: nativeRng.startContainer,\n                        startOffset: nativeRng.startOffset,\n                        endContainer: nativeRng.endContainer,\n                        endOffset: nativeRng.endOffset\n                    };\n                    // Always treat nodechange as a selectionchange since applying\n                    // formatting to the current range wouldn't update the range but it's parent\n                    if (e.type === 'nodechange' || !isEq$4(fakeRng, lastRng)) {\n                        editor.dispatch('SelectionChange');\n                    }\n                    lastRng = fakeRng;\n                });\n            }\n            // IE has a bug where it fires a selectionchange on right click that has a range at the start of the body\n            // When the contextmenu event fires the selection is located at the right location\n            editor.on('contextmenu', () => {\n                store(editor);\n                editor.dispatch('SelectionChange');\n            });\n            // Selection change is delayed ~200ms on IE when you click inside the current range\n            editor.on('SelectionChange', () => {\n                const startElm = editor.selection.getStart(true);\n                // When focusout from after cef element to other input element the startelm can be undefined\n                if (!startElm) {\n                    return;\n                }\n                if (hasAnyRanges(editor) && !self.isSameElementPath(startElm) && editor.dom.isChildOf(startElm, editor.getBody())) {\n                    editor.nodeChanged({ selectionChange: true });\n                }\n            });\n            // Fire an extra nodeChange on mouseup for compatibility reasons\n            editor.on('mouseup', (e) => {\n                if (!e.isDefaultPrevented() && hasAnyRanges(editor)) {\n                    // Delay nodeChanged call for WebKit edge case issue where the range\n                    // isn't updated until after you click outside a selected image\n                    if (editor.selection.getNode().nodeName === 'IMG') {\n                        Delay.setEditorTimeout(editor, () => {\n                            editor.nodeChanged();\n                        });\n                    }\n                    else {\n                        editor.nodeChanged();\n                    }\n                }\n            });\n        }\n        /**\n         * Dispatches out a onNodeChange event to all observers. This method should be called when you\n         * need to update the UI states or element path etc.\n         *\n         * @method nodeChanged\n         * @param {Object} args Optional args to pass to NodeChange event handlers.\n         */\n        nodeChanged(args = {}) {\n            const editor = this.editor;\n            const selection = editor.selection;\n            let node;\n            // Fix for bug #1896577 it seems that this can not be fired while the editor is loading\n            if (editor.initialized && selection && !shouldDisableNodeChange(editor) && !isDisabled$1(editor)) {\n                // Get start node\n                const root = editor.getBody();\n                node = selection.getStart(true) || root;\n                // Make sure the node is within the editor root or is the editor root\n                if (node.ownerDocument !== editor.getDoc() || !editor.dom.isChildOf(node, root)) {\n                    node = root;\n                }\n                // Get parents and add them to object\n                const parents = [];\n                editor.dom.getParent(node, (node) => {\n                    if (node === root) {\n                        return true;\n                    }\n                    else {\n                        parents.push(node);\n                        return false;\n                    }\n                });\n                editor.dispatch('NodeChange', {\n                    ...args,\n                    element: node,\n                    parents\n                });\n            }\n        }\n        /**\n         * Returns true/false if the current element path has been changed or not.\n         *\n         * @private\n         * @return {Boolean} True if the element path is the same false if it's not.\n         */\n        isSameElementPath(startElm) {\n            let i;\n            const editor = this.editor;\n            const currentPath = reverse(editor.dom.getParents(startElm, always, editor.getBody()));\n            if (currentPath.length === this.lastPath.length) {\n                for (i = currentPath.length; i >= 0; i--) {\n                    if (currentPath[i] !== this.lastPath[i]) {\n                        break;\n                    }\n                }\n                if (i === -1) {\n                    this.lastPath = currentPath;\n                    return true;\n                }\n            }\n            this.lastPath = currentPath;\n            return false;\n        }\n    }\n\n    const internalMimeType = 'x-tinymce/html';\n    const internalHtmlMime = constant(internalMimeType);\n    const internalMark = '<!-- ' + internalMimeType + ' -->';\n    const mark = (html) => internalMark + html;\n    const unmark = (html) => html.replace(internalMark, '');\n    const isMarked = (html) => html.indexOf(internalMark) !== -1;\n\n    /*\n     * This module contains utilities to convert newlines (\\n or \\r\\n) to BRs or to a combination of the specified block element and BRs\n     */\n    const isPlainText = (text) => {\n        // so basically any tag that is not one of the \"p, div, span, br\", or is one of them, but is followed\n        // by some additional characters qualifies the text as not a plain text (having some HTML tags)\n        // <span style=\"white-space:pre\"> and <br /> are added as separate exceptions to the rule\n        return !/<(?:\\/?(?!(?:div|p|br|span)>)\\w+|(?:(?!(?:span style=\"white-space:\\s?pre;?\">)|br\\s?\\/>))\\w+\\s[^>]+)>/i.test(text);\n    };\n    const openContainer = (rootTag, rootAttrs) => {\n        let tag = '<' + rootTag;\n        const attrs = mapToArray(rootAttrs, (value, key) => key + '=\"' + Entities.encodeAllRaw(value) + '\"');\n        if (attrs.length) {\n            tag += ' ' + attrs.join(' ');\n        }\n        return tag + '>';\n    };\n    const toBlockElements = (text, rootTag, rootAttrs) => {\n        const blocks = text.split(/\\n\\n/);\n        const tagOpen = openContainer(rootTag, rootAttrs);\n        const tagClose = '</' + rootTag + '>';\n        const paragraphs = map$3(blocks, (p) => {\n            return p.split(/\\n/).join('<br />');\n        });\n        const stitch = (p) => {\n            return tagOpen + p + tagClose;\n        };\n        return paragraphs.length === 1 ? paragraphs[0] : map$3(paragraphs, stitch).join('');\n    };\n\n    const pasteBinDefaultContent = '%MCEPASTEBIN%';\n    /*\n     * Creates a paste bin element as close as possible to the current caret location and places the focus inside that element\n     * so that when the real paste event occurs the contents gets inserted into this element\n     * instead of the current editor selection element.\n     */\n    const create$5 = (editor, lastRngCell) => {\n        const { dom, selection } = editor;\n        const body = editor.getBody();\n        lastRngCell.set(selection.getRng());\n        // Create a pastebin\n        const pasteBinElm = dom.add(editor.getBody(), 'div', {\n            'id': 'mcepastebin',\n            'class': 'mce-pastebin',\n            'contentEditable': true,\n            'data-mce-bogus': 'all',\n            'style': 'position: fixed; top: 50%; width: 10px; height: 10px; overflow: hidden; opacity: 0'\n        }, pasteBinDefaultContent);\n        // Move paste bin out of sight since the controlSelection rect gets displayed otherwise on Gecko\n        if (Env.browser.isFirefox()) {\n            dom.setStyle(pasteBinElm, 'left', dom.getStyle(body, 'direction', true) === 'rtl' ? 0xFFFF : -0xFFFF);\n        }\n        // Prevent focus events from bubbling fixed FocusManager issues\n        dom.bind(pasteBinElm, 'beforedeactivate focusin focusout', (e) => {\n            e.stopPropagation();\n        });\n        pasteBinElm.focus();\n        selection.select(pasteBinElm, true);\n    };\n    /*\n     * Removes the paste bin if it exists.\n     */\n    const remove = (editor, lastRngCell) => {\n        const dom = editor.dom;\n        if (getEl(editor)) {\n            let pasteBinClone;\n            const lastRng = lastRngCell.get();\n            // WebKit/Blink might clone the div so\n            // lets make sure we remove all clones\n            // TODO: Man o man is this ugly. WebKit is the new IE! Remove this if they ever fix it!\n            while ((pasteBinClone = getEl(editor))) {\n                dom.remove(pasteBinClone);\n                dom.unbind(pasteBinClone);\n            }\n            if (lastRng) {\n                editor.selection.setRng(lastRng);\n            }\n        }\n        lastRngCell.set(null);\n    };\n    const getEl = (editor) => editor.dom.get('mcepastebin');\n    const isPasteBin = (elm) => isNonNullable(elm) && elm.id === 'mcepastebin';\n    /*\n     * Returns the contents of the paste bin as a HTML string.\n     */\n    const getHtml = (editor) => {\n        const dom = editor.dom;\n        // Since WebKit/Chrome might clone the paste bin when pasting\n        // for example: <img style=\"float: right\"> we need to check if any of them contains some useful html.\n        // TODO: Man o man is this ugly. WebKit is the new IE! Remove this if they ever fix it!\n        const copyAndRemove = (toElm, fromElm) => {\n            toElm.appendChild(fromElm);\n            dom.remove(fromElm, true); // remove, but keep children\n        };\n        // find only top level elements (there might be more nested inside them as well, see TINY-1162)\n        const [pasteBinElm, ...pasteBinClones] = filter$5(editor.getBody().childNodes, isPasteBin);\n        // if clones were found, move their content into the first bin\n        each$e(pasteBinClones, (pasteBinClone) => {\n            copyAndRemove(pasteBinElm, pasteBinClone);\n        });\n        // TINY-1162: when copying plain text (from notepad for example) WebKit clones\n        // paste bin (with styles and attributes) and uses it as a default  wrapper for\n        // the chunks of the content, here we cycle over the whole paste bin and replace\n        // those wrappers with a basic div\n        const dirtyWrappers = dom.select('div[id=mcepastebin]', pasteBinElm);\n        for (let i = dirtyWrappers.length - 1; i >= 0; i--) {\n            const cleanWrapper = dom.create('div');\n            pasteBinElm.insertBefore(cleanWrapper, dirtyWrappers[i]);\n            copyAndRemove(cleanWrapper, dirtyWrappers[i]);\n        }\n        return pasteBinElm ? pasteBinElm.innerHTML : '';\n    };\n    const isDefaultPasteBinContent = (content) => content === pasteBinDefaultContent;\n    const PasteBin = (editor) => {\n        const lastRng = Cell(null);\n        return {\n            create: () => create$5(editor, lastRng),\n            remove: () => remove(editor, lastRng),\n            getEl: () => getEl(editor),\n            getHtml: () => getHtml(editor),\n            getLastRng: lastRng.get\n        };\n    };\n\n    /*\n     * This module contains various utility functions for the paste logic.\n     */\n    const filter = (content, items) => {\n        Tools.each(items, (v) => {\n            if (is$5(v, RegExp)) {\n                content = content.replace(v, '');\n            }\n            else {\n                content = content.replace(v[0], v[1]);\n            }\n        });\n        return content;\n    };\n    /*\n     * Gets the innerText of the specified element. It will handle edge cases\n     * and works better than textContent on Gecko.\n     */\n    const innerText = (html) => {\n        const schema = Schema();\n        const domParser = DomParser({}, schema);\n        let text = '';\n        const voidElements = schema.getVoidElements();\n        const ignoreElements = Tools.makeMap('script noscript style textarea video audio iframe object', ' ');\n        const blockElements = schema.getBlockElements();\n        const walk = (node) => {\n            const name = node.name, currentNode = node;\n            if (name === 'br') {\n                text += '\\n';\n                return;\n            }\n            // Ignore wbr, to replicate innerText on Chrome/Firefox\n            if (name === 'wbr') {\n                return;\n            }\n            // img/input/hr but ignore wbr as it's just a potential word break\n            if (voidElements[name]) {\n                text += ' ';\n            }\n            // Ignore script, video contents\n            if (ignoreElements[name]) {\n                text += ' ';\n                return;\n            }\n            if (node.type === 3) {\n                text += node.value;\n            }\n            // Walk all children\n            if (!(node.name in schema.getVoidElements())) {\n                let currentNode = node.firstChild;\n                if (currentNode) {\n                    do {\n                        walk(currentNode);\n                    } while ((currentNode = currentNode.next));\n                }\n            }\n            // Add \\n or \\n\\n for blocks or P\n            if (blockElements[name] && currentNode.next) {\n                text += '\\n';\n                if (name === 'p') {\n                    text += '\\n';\n                }\n            }\n        };\n        html = filter(html, [\n            /<!\\[[^\\]]+\\]>/g // Conditional comments\n        ]);\n        walk(domParser.parse(html));\n        return text;\n    };\n    /*\n     * Trims the specified HTML by removing all WebKit fragments, all elements wrapping the body trailing BR elements etc.\n     */\n    const trimHtml = (html) => {\n        const trimSpaces = (all, s1, s2) => {\n            // WebKit &nbsp; meant to preserve multiple spaces but instead inserted around all inline tags,\n            // including the spans with inline styles created on paste\n            if (!s1 && !s2) {\n                return ' ';\n            }\n            return nbsp;\n        };\n        html = filter(html, [\n            /^[\\s\\S]*<body[^>]*>\\s*|\\s*<\\/body[^>]*>[\\s\\S]*$/ig, // Remove anything but the contents within the BODY element\n            /<!--StartFragment-->|<!--EndFragment-->/g, // Inner fragments (tables from excel on mac)\n            [/( ?)<span class=\"Apple-converted-space\">\\u00a0<\\/span>( ?)/g, trimSpaces],\n            /<br class=\"Apple-interchange-newline\">/g,\n            /<br>$/i // Trailing BR elements\n        ]);\n        return html;\n    };\n    // TODO: Should be in some global class\n    const createIdGenerator = (prefix) => {\n        let count = 0;\n        return () => {\n            return prefix + (count++);\n        };\n    };\n    const getImageMimeType = (ext) => {\n        const lowerExt = ext.toLowerCase();\n        const mimeOverrides = {\n            jpg: 'jpeg',\n            jpe: 'jpeg',\n            jfi: 'jpeg',\n            jif: 'jpeg',\n            jfif: 'jpeg',\n            pjpeg: 'jpeg',\n            pjp: 'jpeg',\n            svg: 'svg+xml'\n        };\n        return Tools.hasOwn(mimeOverrides, lowerExt) ? 'image/' + mimeOverrides[lowerExt] : 'image/' + lowerExt;\n    };\n\n    const preProcess = (editor, html) => {\n        const parser = DomParser({\n            sanitize: shouldSanitizeXss(editor),\n            sandbox_iframes: shouldSandboxIframes(editor),\n            sandbox_iframes_exclusions: getSandboxIframesExclusions(editor),\n            convert_unsafe_embeds: shouldConvertUnsafeEmbeds(editor)\n        }, editor.schema);\n        // Strip meta elements\n        parser.addNodeFilter('meta', (nodes) => {\n            Tools.each(nodes, (node) => {\n                node.remove();\n            });\n        });\n        const fragment = parser.parse(html, { forced_root_block: false, isRootContent: true });\n        return HtmlSerializer({ validate: true }, editor.schema).serialize(fragment);\n    };\n    const processResult = (content, cancelled) => ({ content, cancelled });\n    const postProcessFilter = (editor, html, internal) => {\n        const tempBody = editor.dom.create('div', { style: 'display:none' }, html);\n        const postProcessArgs = firePastePostProcess(editor, tempBody, internal);\n        return processResult(postProcessArgs.node.innerHTML, postProcessArgs.isDefaultPrevented());\n    };\n    const filterContent = (editor, content, internal) => {\n        const preProcessArgs = firePastePreProcess(editor, content, internal);\n        // Filter the content to remove potentially dangerous content (eg scripts)\n        const filteredContent = preProcess(editor, preProcessArgs.content);\n        if (editor.hasEventListeners('PastePostProcess') && !preProcessArgs.isDefaultPrevented()) {\n            return postProcessFilter(editor, filteredContent, internal);\n        }\n        else {\n            return processResult(filteredContent, preProcessArgs.isDefaultPrevented());\n        }\n    };\n    const process = (editor, html, internal) => {\n        return filterContent(editor, html, internal);\n    };\n\n    const pasteHtml$1 = (editor, html) => {\n        editor.insertContent(html, {\n            merge: shouldPasteMergeFormats(editor),\n            paste: true\n        });\n        return true;\n    };\n    const isAbsoluteUrl = (url) => /^https?:\\/\\/[\\w\\-\\/+=.,!;:&%@^~(){}?#]+$/i.test(url);\n    const isImageUrl = (editor, url) => {\n        return isAbsoluteUrl(url) && exists(getAllowedImageFileTypes(editor), (type) => endsWith(url.toLowerCase(), `.${type.toLowerCase()}`));\n    };\n    const createImage = (editor, url, pasteHtmlFn) => {\n        editor.undoManager.extra(() => {\n            pasteHtmlFn(editor, url);\n        }, () => {\n            editor.insertContent('<img src=\"' + url + '\">');\n        });\n        return true;\n    };\n    const createLink = (editor, url, pasteHtmlFn) => {\n        editor.undoManager.extra(() => {\n            pasteHtmlFn(editor, url);\n        }, () => {\n            editor.execCommand('mceInsertLink', false, url);\n        });\n        return true;\n    };\n    const linkSelection = (editor, html, pasteHtmlFn) => !editor.selection.isCollapsed() && isAbsoluteUrl(html) ? createLink(editor, html, pasteHtmlFn) : false;\n    const insertImage = (editor, html, pasteHtmlFn) => isImageUrl(editor, html) ? createImage(editor, html, pasteHtmlFn) : false;\n    const smartInsertContent = (editor, html) => {\n        Tools.each([\n            linkSelection,\n            insertImage,\n            pasteHtml$1\n        ], (action) => {\n            return !action(editor, html, pasteHtml$1);\n        });\n    };\n    const insertContent = (editor, html, pasteAsText) => {\n        if (pasteAsText || !isSmartPasteEnabled(editor)) {\n            pasteHtml$1(editor, html);\n        }\n        else {\n            smartInsertContent(editor, html);\n        }\n    };\n\n    const uniqueId = createIdGenerator('mceclip');\n    const createPasteDataTransfer = (html) => {\n        const dataTransfer = createDataTransfer();\n        setHtmlData(dataTransfer, html);\n        // TINY-9829: Set to read-only mode as per https://www.w3.org/TR/input-events-2/\n        setReadOnlyMode(dataTransfer);\n        return dataTransfer;\n    };\n    const doPaste = (editor, content, internal, pasteAsText, shouldSimulateInputEvent) => {\n        const res = process(editor, content, internal);\n        if (!res.cancelled) {\n            const content = res.content;\n            const doPasteAction = () => insertContent(editor, content, pasteAsText);\n            if (shouldSimulateInputEvent) {\n                const args = fireBeforeInputEvent(editor, 'insertFromPaste', { dataTransfer: createPasteDataTransfer(content) });\n                if (!args.isDefaultPrevented()) {\n                    doPasteAction();\n                    fireInputEvent(editor, 'insertFromPaste');\n                }\n            }\n            else {\n                doPasteAction();\n            }\n        }\n    };\n    /*\n     * Pastes the specified HTML. This means that the HTML is filtered and then\n     * inserted at the current selection in the editor. It will also fire paste events\n     * for custom user filtering.\n     */\n    const pasteHtml = (editor, html, internalFlag, shouldSimulateInputEvent) => {\n        const internal = internalFlag ? internalFlag : isMarked(html);\n        doPaste(editor, unmark(html), internal, false, shouldSimulateInputEvent);\n    };\n    /*\n     * Pastes the specified text. This means that the plain text is processed\n     * and converted into BR and P elements. It will fire paste events for custom filtering.\n     */\n    const pasteText = (editor, text, shouldSimulateInputEvent) => {\n        const encodedText = editor.dom.encode(text).replace(/\\r\\n/g, '\\n');\n        const normalizedText = normalize$4(encodedText, getPasteTabSpaces(editor));\n        const html = toBlockElements(normalizedText, getForcedRootBlock(editor), getForcedRootBlockAttrs(editor));\n        doPaste(editor, html, false, true, shouldSimulateInputEvent);\n    };\n    /*\n     * Gets various content types out of a datatransfer object.\n     */\n    const getDataTransferItems = (dataTransfer) => {\n        const items = {};\n        if (dataTransfer && dataTransfer.types) {\n            for (let i = 0; i < dataTransfer.types.length; i++) {\n                const contentType = dataTransfer.types[i];\n                try { // IE11 throws exception when contentType is Files (type is present but data cannot be retrieved via getData())\n                    items[contentType] = dataTransfer.getData(contentType);\n                }\n                catch {\n                    items[contentType] = ''; // useless in general, but for consistency across browsers\n                }\n            }\n        }\n        return items;\n    };\n    const hasContentType = (clipboardContent, mimeType) => mimeType in clipboardContent && clipboardContent[mimeType].length > 0;\n    const hasHtmlOrText = (content) => hasContentType(content, 'text/html') || hasContentType(content, 'text/plain');\n    const extractFilename = (editor, str) => {\n        const m = str.match(/([\\s\\S]+?)(?:\\.[a-z0-9.]+)$/i);\n        return isNonNullable(m) ? editor.dom.encode(m[1]) : undefined;\n    };\n    const createBlobInfo = (editor, blobCache, file, base64) => {\n        const id = uniqueId();\n        const useFileName = shouldReuseFileName(editor) && isNonNullable(file.name);\n        const name = useFileName ? extractFilename(editor, file.name) : id;\n        const filename = useFileName ? file.name : undefined;\n        const blobInfo = blobCache.create(id, file, base64, name, filename);\n        blobCache.add(blobInfo);\n        return blobInfo;\n    };\n    const pasteImage = async (editor, imageItem) => {\n        return parseDataUri(imageItem.uri).fold(() => Promise.resolve(), ({ data, type, base64Encoded }) => {\n            const base64 = base64Encoded ? data : btoa(data);\n            const file = imageItem.file;\n            // TODO: Move the bulk of the cache logic to EditorUpload\n            const blobCache = editor.editorUpload.blobCache;\n            const existingBlobInfo = blobCache.getByData(base64, type);\n            const blobInfo = existingBlobInfo ?? createBlobInfo(editor, blobCache, file, base64);\n            const imgUrl = blobInfo.blobUri();\n            return getImageSize(imgUrl).then(({ width, height }) => {\n                pasteHtml(editor, `<img width=\"${width}\" height=\"${height}\" src=\"${imgUrl}\">`, false, true);\n            }).catch(() => {\n                pasteHtml(editor, `<img src=\"${imgUrl}\">`, false, true);\n            });\n        });\n    };\n    const isClipboardEvent = (event) => event.type === 'paste';\n    const readFilesAsDataUris = (items) => Promise.all(map$3(items, (file) => {\n        return blobToDataUri(file).then((uri) => ({ file, uri }));\n    }));\n    const isImage = (editor) => {\n        const allowedExtensions = getAllowedImageFileTypes(editor);\n        return (file) => startsWith(file.type, 'image/') && exists(allowedExtensions, (extension) => {\n            return getImageMimeType(extension) === file.type;\n        });\n    };\n    const getImagesFromDataTransfer = (editor, dataTransfer) => {\n        const items = dataTransfer.items ? bind$3(from(dataTransfer.items), (item) => {\n            return item.kind === 'file' ? [item.getAsFile()] : [];\n        }) : [];\n        const files = dataTransfer.files ? from(dataTransfer.files) : [];\n        return filter$5(items.length > 0 ? items : files, isImage(editor));\n    };\n    /*\n     * Checks if the clipboard contains image data if it does it will take that data\n     * and convert it into a data url image and paste that image at the caret location.\n     */\n    const pasteImageData = (editor, e, rng) => {\n        const dataTransfer = isClipboardEvent(e) ? e.clipboardData : e.dataTransfer;\n        if (shouldPasteDataImages(editor) && dataTransfer) {\n            const images = getImagesFromDataTransfer(editor, dataTransfer);\n            if (images.length > 0) {\n                e.preventDefault();\n                // eslint-disable-next-line @typescript-eslint/no-floating-promises\n                readFilesAsDataUris(images).then(async (fileResults) => {\n                    if (rng) {\n                        editor.selection.setRng(rng);\n                    }\n                    for (const result of fileResults) {\n                        await pasteImage(editor, result);\n                    }\n                });\n                return true;\n            }\n        }\n        return false;\n    };\n    // Chrome on Android doesn't support proper clipboard access so we have no choice but to allow the browser default behavior.\n    const isBrokenAndroidClipboardEvent = (e) => Env.os.isAndroid() && e.clipboardData?.items?.length === 0;\n    // Ctrl+V or Shift+Insert\n    const isKeyboardPasteEvent = (e) => (VK.metaKeyPressed(e) && e.keyCode === 86) || (e.shiftKey && e.keyCode === 45);\n    const insertClipboardContent = (editor, clipboardContent, html, plainTextMode, shouldSimulateInputEvent) => {\n        let content = trimHtml(html);\n        const isInternal = hasContentType(clipboardContent, internalHtmlMime()) || isMarked(html);\n        const isPlainTextHtml = !isInternal && isPlainText(content);\n        const isAbsoluteUrl$1 = isAbsoluteUrl(content);\n        // If the paste bin is empty try using plain text mode since that is better than nothing right?\n        // Also if we got nothing from clipboard API/pastebin or the content is a plain text (with only\n        // some BRs, Ps or DIVs as newlines) then we fallback to plain/text\n        if (isDefaultPasteBinContent(content) || !content.length || (isPlainTextHtml && !isAbsoluteUrl$1)) {\n            plainTextMode = true;\n        }\n        // Grab plain text from Clipboard API or convert existing HTML to plain text\n        if (plainTextMode || isAbsoluteUrl$1) {\n            // Use plain text contents from Clipboard API unless the HTML contains paragraphs then\n            // we should convert the HTML to plain text since works better when pasting HTML/Word contents as plain text\n            if (hasContentType(clipboardContent, 'text/plain') && isPlainTextHtml) {\n                content = clipboardContent['text/plain'];\n            }\n            else {\n                content = innerText(content);\n            }\n        }\n        // If the content is the paste bin default HTML then it was impossible to get the clipboard data out.\n        if (isDefaultPasteBinContent(content)) {\n            return;\n        }\n        if (plainTextMode) {\n            pasteText(editor, content, shouldSimulateInputEvent);\n        }\n        else {\n            pasteHtml(editor, content, isInternal, shouldSimulateInputEvent);\n        }\n    };\n    const registerEventHandlers = (editor, pasteBin, pasteFormat) => {\n        let keyboardPastePlainTextState;\n        const getLastRng = () => pasteBin.getLastRng() || editor.selection.getRng();\n        editor.on('keydown', (e) => {\n            if (isKeyboardPasteEvent(e) && !e.isDefaultPrevented()) {\n                keyboardPastePlainTextState = e.shiftKey && e.keyCode === 86;\n            }\n        });\n        editor.on('paste', (e) => {\n            if (e.isDefaultPrevented() || isBrokenAndroidClipboardEvent(e)) {\n                return;\n            }\n            const plainTextMode = pasteFormat.get() === 'text' || keyboardPastePlainTextState;\n            keyboardPastePlainTextState = false;\n            const clipboardContent = getDataTransferItems(e.clipboardData);\n            if (!hasHtmlOrText(clipboardContent) && pasteImageData(editor, e, getLastRng())) {\n                return;\n            }\n            // If the clipboard API has HTML then use that directly\n            if (hasContentType(clipboardContent, 'text/html')) {\n                e.preventDefault();\n                insertClipboardContent(editor, clipboardContent, clipboardContent['text/html'], plainTextMode, true);\n            }\n            else if (hasContentType(clipboardContent, 'text/plain') && hasContentType(clipboardContent, 'text/uri-list')) {\n                /*\n                Safari adds the uri-list attribute to links copied within it.\n                When pasting something with the url-list within safari using the default functionality it will convert it from www.example.com to <a href=\"www.example.com\">www.example.com</a> when pasting into the pasteBin-div.\n                This causes issues. To solve this we bypass the default paste functionality for this situation.\n                 */\n                e.preventDefault();\n                insertClipboardContent(editor, clipboardContent, clipboardContent['text/plain'], plainTextMode, true);\n            }\n            else {\n                // We can't extract the HTML content from the clipboard so we need to allow the paste\n                // to run via the pastebin and then extract from there\n                pasteBin.create();\n                Delay.setEditorTimeout(editor, () => {\n                    // Get the pastebin content and then remove it so the selection is restored\n                    const html = pasteBin.getHtml();\n                    pasteBin.remove();\n                    insertClipboardContent(editor, clipboardContent, html, plainTextMode, false);\n                }, 0);\n            }\n        });\n    };\n    const registerDataImageFilter = (editor) => {\n        const isWebKitFakeUrl = (src) => startsWith(src, 'webkit-fake-url');\n        const isDataUri = (src) => startsWith(src, 'data:');\n        const isPasteInsert = (args) => args.data?.paste === true;\n        // Remove all data images from paste for example from Gecko\n        // except internal images like video elements\n        editor.parser.addNodeFilter('img', (nodes, name, args) => {\n            if (!shouldPasteDataImages(editor) && isPasteInsert(args)) {\n                for (const node of nodes) {\n                    const src = node.attr('src');\n                    if (isString(src) && !node.attr('data-mce-object') && src !== Env.transparentSrc) {\n                        // Safari on Mac produces webkit-fake-url see: https://bugs.webkit.org/show_bug.cgi?id=49141\n                        if (isWebKitFakeUrl(src)) {\n                            node.remove();\n                        }\n                        else if (!shouldAllowHtmlDataUrls(editor) && isDataUri(src)) {\n                            node.remove();\n                        }\n                    }\n                }\n            }\n        });\n    };\n    /*\n     * This class contains logic for getting HTML contents out of the clipboard.\n     *\n     * This by default will attempt to use the W3C clipboard API to get HTML content.\n     * If that can't be used then fallback to letting the browser paste natively with\n     * some logic to clean up what the browser generated, as it can mutate the content.\n     *\n     * Current implementation steps:\n     *  1. On keydown determine if we should paste as plain text.\n     *  2. Wait for the browser to fire a \"paste\" event and get the contents out of clipboard.\n     *  3. If no content is available, then attach the paste bin and change the selection to be inside the bin.\n     *  4. Extract the contents from the bin in the next event loop.\n     *  5. If no HTML is found or we're using plain text paste mode then convert the HTML or lookup the clipboard to get the plain text.\n     *  6. Process the content from the clipboard or pastebin and insert it into the editor.\n     */\n    const registerEventsAndFilters = (editor, pasteBin, pasteFormat) => {\n        registerEventHandlers(editor, pasteBin, pasteFormat);\n        registerDataImageFilter(editor);\n    };\n\n    const togglePlainTextPaste = (editor, pasteFormat) => {\n        if (pasteFormat.get() === 'text') {\n            pasteFormat.set('html');\n            firePastePlainTextToggle(editor, false);\n        }\n        else {\n            pasteFormat.set('text');\n            firePastePlainTextToggle(editor, true);\n        }\n        editor.focus();\n    };\n    const register$1 = (editor, pasteFormat) => {\n        editor.addCommand('mceTogglePlainTextPaste', () => {\n            togglePlainTextPaste(editor, pasteFormat);\n        });\n        editor.addCommand('mceInsertClipboardContent', (ui, value) => {\n            if (value.html) {\n                // TINY-9997: Input events are not simulated when using paste commands, similar to how the 'mceInsertContent'\n                // and 'Delete' commands work.\n                pasteHtml(editor, value.html, value.internal, false);\n            }\n            if (value.text) {\n                pasteText(editor, value.text, false);\n            }\n        });\n    };\n\n    const setHtml5Clipboard = (clipboardData, html, text) => {\n        if (clipboardData) {\n            try {\n                clipboardData.clearData();\n                clipboardData.setData('text/html', html);\n                clipboardData.setData('text/plain', text);\n                clipboardData.setData(internalHtmlMime(), html);\n                return true;\n            }\n            catch {\n                return false;\n            }\n        }\n        else {\n            return false;\n        }\n    };\n    const setClipboardData = (evt, data, fallback, done) => {\n        if (setHtml5Clipboard(evt.clipboardData, data.html, data.text)) {\n            evt.preventDefault();\n            done();\n        }\n        else {\n            fallback(data.html, done);\n        }\n    };\n    const fallback = (editor) => (html, done) => {\n        const { dom, selection } = editor;\n        const outer = dom.create('div', { 'contenteditable': 'false', 'data-mce-bogus': 'all' });\n        const inner = dom.create('div', { contenteditable: 'true' }, html);\n        dom.setStyles(outer, {\n            position: 'fixed',\n            top: '0',\n            left: '-3000px',\n            width: '1000px',\n            overflow: 'hidden'\n        });\n        outer.appendChild(inner);\n        dom.add(editor.getBody(), outer);\n        const range = selection.getRng();\n        inner.focus();\n        const offscreenRange = dom.createRng();\n        offscreenRange.selectNodeContents(inner);\n        selection.setRng(offscreenRange);\n        Delay.setEditorTimeout(editor, () => {\n            selection.setRng(range);\n            dom.remove(outer);\n            done();\n        }, 0);\n    };\n    const getData = (editor) => ({\n        html: mark(editor.selection.getContent({ contextual: true })),\n        text: editor.selection.getContent({ format: 'text' })\n    });\n    const isTableSelection = (editor) => !!editor.dom.getParent(editor.selection.getStart(), 'td[data-mce-selected],th[data-mce-selected]', editor.getBody());\n    const hasSelectedContent = (editor) => !editor.selection.isCollapsed() || isTableSelection(editor);\n    const cut = (editor, caret) => (evt) => {\n        if (!evt.isDefaultPrevented() && hasSelectedContent(editor) && editor.selection.isEditable()) {\n            setClipboardData(evt, getData(editor), fallback(editor), () => {\n                if (Env.browser.isChromium() || Env.browser.isFirefox()) {\n                    const rng = editor.selection.getRng();\n                    // Chrome fails to execCommand from another execCommand with this message:\n                    // \"We don't execute document.execCommand() this time, because it is called recursively.\"\"\n                    // Firefox 82 now also won't run recursive commands, but it doesn't log an error\n                    Delay.setEditorTimeout(editor, () => {\n                        // Restore the range before deleting, as Chrome on Android will\n                        // collapse the selection after a cut event has fired.\n                        editor.selection.setRng(rng);\n                        // Delete command is called directly without using editor.execCommand to avoid running editor.focus() which side effect was selection normalization and additional undo level\n                        deleteCommand(editor, caret);\n                    }, 0);\n                }\n                else {\n                    // Delete command is called directly without using editor.execCommand to avoid running editor.focus() which side effect was selection normalization and additional undo level\n                    deleteCommand(editor, caret);\n                }\n            });\n        }\n    };\n    const copy = (editor) => (evt) => {\n        if (!evt.isDefaultPrevented() && hasSelectedContent(editor)) {\n            setClipboardData(evt, getData(editor), fallback(editor), noop);\n        }\n    };\n    const register = (editor, caret) => {\n        editor.on('cut', cut(editor, caret));\n        editor.on('copy', copy(editor));\n    };\n\n    const getCaretRangeFromEvent = (editor, e) => \n    // TODO: TINY-7075 Remove the \"?? 0\" here when agar passes valid client coords\n    RangeUtils.getCaretRangeFromPoint(e.clientX ?? 0, e.clientY ?? 0, editor.getDoc());\n    const isPlainTextFileUrl = (content) => {\n        const plainTextContent = content['text/plain'];\n        return plainTextContent ? plainTextContent.indexOf('file://') === 0 : false;\n    };\n    const setFocusedRange = (editor, rng) => {\n        if (rng) {\n            editor.selection.setRng(rng);\n        }\n        editor.focus();\n    };\n    const hasImage = (dataTransfer) => exists(dataTransfer.files, (file) => /^image\\//.test(file.type));\n    const needsCustomInternalDrop = (dom, schema, target, dropContent) => {\n        const parentTransparent = dom.getParent(target, (node) => isTransparentBlock(schema, node));\n        const inSummary = !isNull(dom.getParent(target, 'summary'));\n        if (inSummary) {\n            return true;\n        }\n        else if (parentTransparent && has$2(dropContent, 'text/html')) {\n            const fragment = new DOMParser().parseFromString(dropContent['text/html'], 'text/html').body;\n            return !isNull(fragment.querySelector(parentTransparent.nodeName.toLowerCase()));\n        }\n        else {\n            return false;\n        }\n    };\n    const setupSummaryDeleteByDragFix = (editor) => {\n        editor.on('input', (e) => {\n            const hasNoSummary = (el) => isNull(el.querySelector('summary'));\n            if (e.inputType === 'deleteByDrag') {\n                const brokenDetailElements = filter$5(editor.dom.select('details'), hasNoSummary);\n                each$e(brokenDetailElements, (details) => {\n                    // Firefox leaves a BR\n                    if (isBr$7(details.firstChild)) {\n                        details.firstChild.remove();\n                    }\n                    const summary = editor.dom.create('summary');\n                    summary.appendChild(createPaddingBr().dom);\n                    details.prepend(summary);\n                });\n            }\n        });\n    };\n    const setup$a = (editor, draggingInternallyState) => {\n        // Block all drag/drop events\n        if (shouldPasteBlockDrop(editor)) {\n            editor.on('dragend dragover draggesture dragdrop drop drag', (e) => {\n                e.preventDefault();\n                e.stopPropagation();\n            });\n        }\n        // Prevent users from dropping data images on Gecko\n        if (!shouldPasteDataImages(editor)) {\n            editor.on('drop', (e) => {\n                const dataTransfer = e.dataTransfer;\n                if (dataTransfer && hasImage(dataTransfer)) {\n                    e.preventDefault();\n                }\n            });\n        }\n        editor.on('drop', (e) => {\n            if (e.isDefaultPrevented()) {\n                return;\n            }\n            const rng = getCaretRangeFromEvent(editor, e);\n            if (isNullable(rng)) {\n                return;\n            }\n            const dropContent = getDataTransferItems(e.dataTransfer);\n            const internal = hasContentType(dropContent, internalHtmlMime());\n            if ((!hasHtmlOrText(dropContent) || isPlainTextFileUrl(dropContent)) && pasteImageData(editor, e, rng)) {\n                return;\n            }\n            const internalContent = dropContent[internalHtmlMime()];\n            const content = internalContent || dropContent['text/html'] || dropContent['text/plain'];\n            const needsInternalDrop = needsCustomInternalDrop(editor.dom, editor.schema, rng.startContainer, dropContent);\n            const isInternalDrop = draggingInternallyState.get();\n            if (isInternalDrop && !needsInternalDrop) {\n                return;\n            }\n            if (content) {\n                e.preventDefault();\n                // FF 45 doesn't paint a caret when dragging in text in due to focus call by execCommand\n                Delay.setEditorTimeout(editor, () => {\n                    editor.undoManager.transact(() => {\n                        if (internalContent || (isInternalDrop && needsInternalDrop)) {\n                            editor.execCommand('Delete');\n                        }\n                        setFocusedRange(editor, rng);\n                        const trimmedContent = trimHtml(content);\n                        if (dropContent['text/html']) {\n                            pasteHtml(editor, trimmedContent, internal, true);\n                        }\n                        else {\n                            pasteText(editor, trimmedContent, true);\n                        }\n                    });\n                });\n            }\n        });\n        editor.on('dragstart', (_e) => {\n            draggingInternallyState.set(true);\n        });\n        editor.on('dragover dragend', (e) => {\n            if (shouldPasteDataImages(editor) && !draggingInternallyState.get()) {\n                e.preventDefault();\n                setFocusedRange(editor, getCaretRangeFromEvent(editor, e));\n            }\n            if (e.type === 'dragend') {\n                draggingInternallyState.set(false);\n            }\n        });\n        setupSummaryDeleteByDragFix(editor);\n    };\n\n    const setup$9 = (editor) => {\n        const processEvent = (f) => (e) => {\n            f(editor, e);\n        };\n        const preProcess = getPastePreProcess(editor);\n        if (isFunction(preProcess)) {\n            editor.on('PastePreProcess', processEvent(preProcess));\n        }\n        const postProcess = getPastePostProcess(editor);\n        if (isFunction(postProcess)) {\n            editor.on('PastePostProcess', processEvent(postProcess));\n        }\n    };\n\n    /*\n     * This module contains various fixes for browsers. These issues can not be feature\n     * detected since we have no direct control over the clipboard. However we might be able\n     * to remove some of these fixes once the browsers gets updated/fixed.\n     */\n    const addPreProcessFilter = (editor, filterFunc) => {\n        editor.on('PastePreProcess', (e) => {\n            e.content = filterFunc(editor, e.content, e.internal);\n        });\n    };\n    const rgbRegExp = /rgb\\s*\\(\\s*([0-9]+)\\s*,\\s*([0-9]+)\\s*,\\s*([0-9]+)\\s*\\)/gi;\n    const rgbToHex = (value) => Tools.trim(value).replace(rgbRegExp, rgbaToHexString).toLowerCase();\n    /*\n     * WebKit has a nasty quirk where the all computed styles gets added to style attributes when copy/pasting contents.\n     * This fix solves that by simply removing the whole style attribute.\n     *\n     * The paste_webkit_styles option can be set to specify what to keep:\n     *  paste_webkit_styles: \"none\" // Keep no styles\n     *  paste_webkit_styles: \"all\", // Keep all of them\n     *  paste_webkit_styles: \"font-weight color\" // Keep specific ones\n     */\n    const removeWebKitStyles = (editor, content, internal) => {\n        const webKitStylesOption = getPasteWebkitStyles(editor);\n        // If the content is internal or if we're keeping all styles then we don't need any processing\n        if (internal || webKitStylesOption === 'all' || !shouldPasteRemoveWebKitStyles(editor)) {\n            return content;\n        }\n        const webKitStyles = webKitStylesOption ? webKitStylesOption.split(/[, ]/) : [];\n        // Keep specific styles that don't match the current node computed style\n        if (webKitStyles && webKitStylesOption !== 'none') {\n            const dom = editor.dom, node = editor.selection.getNode();\n            content = content.replace(/(<[^>]+) style=\"([^\"]*)\"([^>]*>)/gi, (all, before, value, after) => {\n                const inputStyles = dom.parseStyle(dom.decode(value));\n                const outputStyles = {};\n                for (let i = 0; i < webKitStyles.length; i++) {\n                    const inputValue = inputStyles[webKitStyles[i]];\n                    let compareInput = inputValue;\n                    let currentValue = dom.getStyle(node, webKitStyles[i], true);\n                    if (/color/.test(webKitStyles[i])) {\n                        compareInput = rgbToHex(compareInput);\n                        currentValue = rgbToHex(currentValue);\n                    }\n                    if (currentValue !== compareInput) {\n                        outputStyles[webKitStyles[i]] = inputValue;\n                    }\n                }\n                const outputStyle = dom.serializeStyle(outputStyles, 'span');\n                if (outputStyle) {\n                    return before + ' style=\"' + outputStyle + '\"' + after;\n                }\n                return before + after;\n            });\n        }\n        else {\n            // Remove all external styles\n            content = content.replace(/(<[^>]+) style=\"([^\"]*)\"([^>]*>)/gi, '$1$3');\n        }\n        // Keep internal styles\n        content = content.replace(/(<[^>]+) data-mce-style=\"([^\"]+)\"([^>]*>)/gi, (all, before, value, after) => {\n            return before + ' style=\"' + value + '\"' + after;\n        });\n        return content;\n    };\n    const setup$8 = (editor) => {\n        if (Env.browser.isChromium() || Env.browser.isSafari()) {\n            addPreProcessFilter(editor, removeWebKitStyles);\n        }\n    };\n\n    const setup$7 = (editor, caret) => {\n        const draggingInternallyState = Cell(false);\n        const pasteFormat = Cell(isPasteAsTextEnabled(editor) ? 'text' : 'html');\n        const pasteBin = PasteBin(editor);\n        setup$8(editor);\n        register$1(editor, pasteFormat);\n        setup$9(editor);\n        editor.addQueryStateHandler('mceTogglePlainTextPaste', () => pasteFormat.get() === 'text');\n        // IMPORTANT: The following event hooks need to be setup later so that other things\n        // can hook in and prevent the event so core paste doesn't handle them.\n        editor.on('PreInit', () => {\n            register(editor, caret);\n            setup$a(editor, draggingInternallyState);\n            registerEventsAndFilters(editor, pasteBin, pasteFormat);\n        });\n    };\n\n    const preventSummaryToggle = (editor) => {\n        editor.on('click', (e) => {\n            if (editor.dom.getParent(e.target, 'details')) {\n                e.preventDefault();\n            }\n        });\n    };\n    const filterDetails = (editor) => {\n        editor.parser.addNodeFilter('details', (elms) => {\n            const initialStateOption = getDetailsInitialState(editor);\n            each$e(elms, (details) => {\n                if (initialStateOption === 'expanded') {\n                    details.attr('open', 'open');\n                }\n                else if (initialStateOption === 'collapsed') {\n                    details.attr('open', null);\n                }\n            });\n        });\n        editor.serializer.addNodeFilter('details', (elms) => {\n            const serializedStateOption = getDetailsSerializedState(editor);\n            each$e(elms, (details) => {\n                if (serializedStateOption === 'expanded') {\n                    details.attr('open', 'open');\n                }\n                else if (serializedStateOption === 'collapsed') {\n                    details.attr('open', null);\n                }\n            });\n        });\n    };\n    const setup$6 = (editor) => {\n        preventSummaryToggle(editor);\n        filterDetails(editor);\n    };\n\n    const isBr = isBr$7;\n    const isText = isText$b;\n    const isContentEditableFalse$2 = (elm) => isContentEditableFalse$a(elm.dom);\n    const isContentEditableTrue = (elm) => isContentEditableTrue$3(elm.dom);\n    const isRoot = (rootNode) => (elm) => eq(SugarElement.fromDom(rootNode), elm);\n    const getClosestScope = (node, rootNode, schema) => closest$5(SugarElement.fromDom(node), (elm) => isContentEditableTrue(elm) || schema.isBlock(name(elm)), isRoot(rootNode))\n        .getOr(SugarElement.fromDom(rootNode)).dom;\n    const getClosestCef = (node, rootNode) => closest$5(SugarElement.fromDom(node), isContentEditableFalse$2, isRoot(rootNode));\n    const findEdgeCaretCandidate = (startNode, scope, forward) => {\n        const walker = new DomTreeWalker(startNode, scope);\n        const next = forward ? walker.next.bind(walker) : walker.prev.bind(walker);\n        let result = startNode;\n        for (let current = forward ? startNode : next(); current && !isBr(current); current = next()) {\n            if (isCaretCandidate$3(current)) {\n                result = current;\n            }\n        }\n        return result;\n    };\n    const findClosestBlockRange = (startRng, rootNode, schema) => {\n        const startPos = CaretPosition.fromRangeStart(startRng);\n        // TODO: TINY-8865 - This may not be safe to cast as Node and alternative solutions need to be looked into\n        const clickNode = startPos.getNode();\n        const scope = getClosestScope(clickNode, rootNode, schema);\n        const startNode = findEdgeCaretCandidate(clickNode, scope, false);\n        const endNode = findEdgeCaretCandidate(clickNode, scope, true);\n        const rng = document.createRange();\n        getClosestCef(startNode, scope).fold(() => {\n            if (isText(startNode)) {\n                rng.setStart(startNode, 0);\n            }\n            else {\n                rng.setStartBefore(startNode);\n            }\n        }, (cef) => rng.setStartBefore(cef.dom));\n        getClosestCef(endNode, scope).fold(() => {\n            if (isText(endNode)) {\n                rng.setEnd(endNode, endNode.data.length);\n            }\n            else {\n                rng.setEndAfter(endNode);\n            }\n        }, (cef) => rng.setEndAfter(cef.dom));\n        return rng;\n    };\n    const onTripleClickSelect = (editor) => {\n        const rng = findClosestBlockRange(editor.selection.getRng(), editor.getBody(), editor.schema);\n        editor.selection.setRng(normalize(rng));\n    };\n    const setup$5 = (editor) => {\n        editor.on('mousedown', (e) => {\n            if (e.detail >= 3) {\n                e.preventDefault();\n                onTripleClickSelect(editor);\n            }\n        });\n    };\n\n    var FakeCaretPosition;\n    (function (FakeCaretPosition) {\n        FakeCaretPosition[\"Before\"] = \"before\";\n        FakeCaretPosition[\"After\"] = \"after\";\n    })(FakeCaretPosition || (FakeCaretPosition = {}));\n    const distanceToRectLeft = (clientRect, clientX) => Math.abs(clientRect.left - clientX);\n    const distanceToRectRight = (clientRect, clientX) => Math.abs(clientRect.right - clientX);\n    const isInsideY = (clientY, clientRect) => clientY >= clientRect.top && clientY <= clientRect.bottom;\n    const collidesY = (r1, r2) => r1.top < r2.bottom && r1.bottom > r2.top;\n    const isOverlapping = (r1, r2) => {\n        // Rectangles might overlap a bit so this checks if the overlap is more than 50% then we count that as on the same line\n        const overlap = overlapY(r1, r2) / Math.min(r1.height, r2.height);\n        return collidesY(r1, r2) && overlap > 0.5;\n    };\n    const splitRectsPerAxis = (rects, y) => {\n        const intersectingRects = filter$5(rects, (rect) => isInsideY(y, rect));\n        return boundingClientRectFromRects(intersectingRects).fold(() => ([[], rects]), (boundingRect) => {\n            const { pass: horizontal, fail: vertical } = partition$2(rects, (rect) => isOverlapping(rect, boundingRect));\n            return [horizontal, vertical];\n        });\n    };\n    const clientInfo = (rect, clientX) => {\n        return {\n            node: rect.node,\n            position: distanceToRectLeft(rect, clientX) < distanceToRectRight(rect, clientX) ? FakeCaretPosition.Before : FakeCaretPosition.After\n        };\n    };\n    // Measure the distance between the x and the closest edge of the rect.\n    // If the x is inside the rect then always return 0.\n    const horizontalDistance = (rect, x, _y) => x > rect.left && x < rect.right ? 0 : Math.min(Math.abs(rect.left - x), Math.abs(rect.right - x));\n    const closestChildCaretCandidateNodeRect = (children, clientX, clientY, findCloserTextNode) => {\n        const caretCandidateRect = (rect) => {\n            if (isCaretCandidate$3(rect.node)) {\n                return Optional.some(rect);\n            }\n            else if (isElement$7(rect.node)) {\n                return closestChildCaretCandidateNodeRect(from(rect.node.childNodes), clientX, clientY, false);\n            }\n            else {\n                return Optional.none();\n            }\n        };\n        // If an element and a text node has nearly equal distance then favor the text node over the element to make it easier to select text\n        // since setting the selection range will cancel any text select operation.\n        const tryFindSecondBestTextNode = (closest, sndClosest, distance) => {\n            return caretCandidateRect(sndClosest).filter((rect) => {\n                const deltaDistance = Math.abs(distance(closest, clientX, clientY) - distance(rect, clientX, clientY));\n                return deltaDistance < 2 && isText$b(rect.node);\n            });\n        };\n        const findClosestCaretCandidateNodeRect = (rects, distance) => {\n            const sortedRects = sort(rects, (r1, r2) => distance(r1, clientX, clientY) - distance(r2, clientX, clientY));\n            return findMap(sortedRects, caretCandidateRect).map((closest) => {\n                // If the closest rect is not a text node then lets try to see if the second rect has a text node that is close enough\n                if (findCloserTextNode && !isText$b(closest.node) && sortedRects.length > 1) {\n                    return tryFindSecondBestTextNode(closest, sortedRects[1], distance).getOr(closest);\n                }\n                else {\n                    return closest;\n                }\n            });\n        };\n        const [horizontalRects, verticalRects] = splitRectsPerAxis(getClientRects(children), clientY);\n        const { pass: above, fail: below } = partition$2(verticalRects, (rect) => rect.top < clientY);\n        return findClosestCaretCandidateNodeRect(horizontalRects, horizontalDistance)\n            .orThunk(() => findClosestCaretCandidateNodeRect(below, distanceToRectEdgeFromXY))\n            .orThunk(() => findClosestCaretCandidateNodeRect(above, distanceToRectEdgeFromXY));\n    };\n    const traverseUp = (rootElm, scope, clientX, clientY) => {\n        const helper = (scope, prevScope) => {\n            const isDragGhostContainer = (node) => isElement$7(node) && node.classList.contains('mce-drag-container');\n            const childNodesWithoutGhost = filter$5(scope.dom.childNodes, not(isDragGhostContainer));\n            return prevScope.fold(() => closestChildCaretCandidateNodeRect(childNodesWithoutGhost, clientX, clientY, true), (prevScope) => {\n                const uncheckedChildren = filter$5(childNodesWithoutGhost, (node) => node !== prevScope.dom);\n                return closestChildCaretCandidateNodeRect(uncheckedChildren, clientX, clientY, true);\n            }).orThunk(() => {\n                const parent = eq(scope, rootElm) ? Optional.none() : parentElement(scope);\n                return parent.bind((newScope) => helper(newScope, Optional.some(scope)));\n            });\n        };\n        return helper(scope, Optional.none());\n    };\n    // Rough description of how this algorithm works:\n    // 1. It starts by finding the element at the specified X, Y coordinate.\n    // 2. Then it checks its children for the closest one and traverses down into those repeating step 2, 3 until it finds a caret candidate.\n    // 3. If no caret candidate is found in the closest child node then it checks the second closest and so on until all decendants have been checked.\n    // 4. If no caret candidate is found, it traverses up skips the element it already checked and checks its siblings using steps 2, 3.\n    // 5. If no caret candidate is found, it continues step 4 until it finds the root. Then we have checked all the nodes in the document.\n    //\n    // This is less accurate but more performant, since for the common case you are likely to find a caret candidate close to where you are clicking.\n    // The more accurate algorithm would be to read all caret candidates rects in the whole document in and in one big step to find the closest one, but that is just too slow for bigger documents.\n    const closestCaretCandidateNodeRect = (root, clientX, clientY) => {\n        const rootElm = SugarElement.fromDom(root);\n        const ownerDoc = documentOrOwner(rootElm);\n        const elementAtPoint = SugarElement.fromPoint(ownerDoc, clientX, clientY).filter((elm) => contains(rootElm, elm));\n        const element = elementAtPoint.getOr(rootElm);\n        return traverseUp(rootElm, element, clientX, clientY);\n    };\n    const closestFakeCaretCandidate = (root, clientX, clientY) => closestCaretCandidateNodeRect(root, clientX, clientY)\n        .filter((rect) => isFakeCaretTarget(rect.node))\n        .map((rect) => clientInfo(rect, clientX));\n\n    const getAbsolutePosition = (elm) => {\n        const clientRect = elm.getBoundingClientRect();\n        const doc = elm.ownerDocument;\n        const docElem = doc.documentElement;\n        const win = doc.defaultView;\n        return {\n            top: clientRect.top + (win?.scrollY ?? 0) - docElem.clientTop,\n            left: clientRect.left + (win?.scrollX ?? 0) - docElem.clientLeft\n        };\n    };\n    const getBodyPosition = (editor) => editor.inline ? getAbsolutePosition(editor.getBody()) : { left: 0, top: 0 };\n    const getScrollPosition = (editor) => {\n        const body = editor.getBody();\n        return editor.inline ? { left: body.scrollLeft, top: body.scrollTop } : { left: 0, top: 0 };\n    };\n    const getBodyScroll = (editor) => {\n        const body = editor.getBody(), docElm = editor.getDoc().documentElement;\n        const inlineScroll = { left: body.scrollLeft, top: body.scrollTop };\n        const iframeScroll = { left: body.scrollLeft || docElm.scrollLeft, top: body.scrollTop || docElm.scrollTop };\n        return editor.inline ? inlineScroll : iframeScroll;\n    };\n    const getMousePosition = (editor, event) => {\n        if (event.target.ownerDocument !== editor.getDoc()) {\n            const iframePosition = getAbsolutePosition(editor.getContentAreaContainer());\n            const scrollPosition = getBodyScroll(editor);\n            return {\n                left: event.pageX - iframePosition.left + scrollPosition.left,\n                top: event.pageY - iframePosition.top + scrollPosition.top\n            };\n        }\n        return {\n            left: event.pageX,\n            top: event.pageY\n        };\n    };\n    const calculatePosition = (bodyPosition, scrollPosition, mousePosition) => ({\n        pageX: (mousePosition.left - bodyPosition.left) + scrollPosition.left,\n        pageY: (mousePosition.top - bodyPosition.top) + scrollPosition.top\n    });\n    const calc = (editor, event) => calculatePosition(getBodyPosition(editor), getScrollPosition(editor), getMousePosition(editor, event));\n\n    const getTargetProps = (target) => ({ target, srcElement: target });\n    const makeDndEventFromMouseEvent = (type, mouseEvent, target, dataTransfer) => ({\n        ...mouseEvent,\n        dataTransfer,\n        type,\n        ...getTargetProps(target)\n    });\n    const makeDndEvent = (type, target, dataTransfer) => {\n        const fail = die('Function not supported on simulated event.');\n        const event = {\n            // Event\n            bubbles: true,\n            cancelBubble: false,\n            cancelable: true,\n            composed: false,\n            currentTarget: null,\n            defaultPrevented: false,\n            eventPhase: 0,\n            isTrusted: true,\n            returnValue: false,\n            timeStamp: 0,\n            type,\n            composedPath: fail,\n            initEvent: fail,\n            preventDefault: noop,\n            stopImmediatePropagation: noop,\n            stopPropagation: noop,\n            AT_TARGET: window.Event.AT_TARGET,\n            BUBBLING_PHASE: window.Event.BUBBLING_PHASE,\n            CAPTURING_PHASE: window.Event.CAPTURING_PHASE,\n            NONE: window.Event.NONE,\n            // UIEvent\n            altKey: false,\n            button: 0,\n            buttons: 0,\n            clientX: 0,\n            clientY: 0,\n            ctrlKey: false,\n            layerX: 0,\n            layerY: 0,\n            metaKey: false,\n            movementX: 0,\n            movementY: 0,\n            offsetX: 0,\n            offsetY: 0,\n            pageX: 0,\n            pageY: 0,\n            relatedTarget: null,\n            screenX: 0,\n            screenY: 0,\n            shiftKey: false,\n            x: 0,\n            y: 0,\n            detail: 0,\n            view: null,\n            which: 0,\n            initUIEvent: fail,\n            initMouseEvent: fail,\n            getModifierState: fail,\n            // DragEvent\n            dataTransfer,\n            ...getTargetProps(target)\n        };\n        return event;\n    };\n    const makeDataTransferCopyForDragEvent = (dataTransfer, eventType) => {\n        const copy = cloneDataTransfer(dataTransfer);\n        // TINY-9601: Set mode as per https://html.spec.whatwg.org/dev/dnd.html#concept-dnd-rw\n        if (eventType === 'dragstart') {\n            setDragstartEvent(copy);\n            setReadWriteMode(copy);\n        }\n        else if (eventType === 'drop') {\n            setDropEvent(copy);\n            setReadOnlyMode(copy);\n        }\n        else {\n            setDragendEvent(copy);\n            setProtectedMode(copy);\n        }\n        return copy;\n    };\n    const makeDragEvent = (type, target, dataTransfer, mouseEvent) => {\n        // TINY-9601: Get copy for each new event to prevent undesired mutations on dispatched DataTransfer objects\n        const dataTransferForDispatch = makeDataTransferCopyForDragEvent(dataTransfer, type);\n        return isUndefined(mouseEvent) ? makeDndEvent(type, target, dataTransferForDispatch) : makeDndEventFromMouseEvent(type, mouseEvent, target, dataTransferForDispatch);\n    };\n\n    /**\n     * This module contains logic overriding the drag/drop logic of the editor.\n     *\n     * @private\n     * @class tinymce.DragDropOverrides\n     */\n    // Arbitrary values needed when scrolling CEF elements\n    const scrollPixelsPerInterval = 32;\n    const scrollIntervalValue = 100;\n    const mouseRangeToTriggerScrollInsideEditor = 8;\n    const mouseRangeToTriggerScrollOutsideEditor = 16;\n    const isContentEditableFalse$1 = isContentEditableFalse$a;\n    const isContentEditable = or(isContentEditableFalse$1, isContentEditableTrue$3);\n    const isDraggable = (dom, rootElm, elm) => isContentEditableFalse$1(elm) && elm !== rootElm && dom.isEditable(elm.parentElement);\n    const isValidDropTarget = (editor, targetElement, dragElement) => {\n        if (isNullable(targetElement)) {\n            return false;\n        }\n        else if (targetElement === dragElement || editor.dom.isChildOf(targetElement, dragElement)) {\n            return false;\n        }\n        else {\n            return editor.dom.isEditable(targetElement);\n        }\n    };\n    const createGhost = (editor, elm, width, height) => {\n        const dom = editor.dom;\n        const clonedElm = elm.cloneNode(true);\n        dom.setStyles(clonedElm, { width, height });\n        dom.setAttrib(clonedElm, 'data-mce-selected', null);\n        const ghostElm = dom.create('div', {\n            'class': 'mce-drag-container',\n            'data-mce-bogus': 'all',\n            'unselectable': 'on',\n            'contenteditable': 'false'\n        });\n        dom.setStyles(ghostElm, {\n            position: 'absolute',\n            opacity: 0.5,\n            overflow: 'hidden',\n            border: 0,\n            padding: 0,\n            margin: 0,\n            width,\n            height\n        });\n        dom.setStyles(clonedElm, {\n            margin: 0,\n            boxSizing: 'border-box'\n        });\n        ghostElm.appendChild(clonedElm);\n        return ghostElm;\n    };\n    const appendGhostToBody = (ghostElm, bodyElm) => {\n        if (ghostElm.parentNode !== bodyElm) {\n            bodyElm.appendChild(ghostElm);\n        }\n    };\n    // Helper function needed for scrolling the editor inside moveGhost function\n    const scrollEditor = (direction, amount) => (win) => () => {\n        const current = direction === 'left' ? win.scrollX : win.scrollY;\n        win.scroll({\n            [direction]: current + amount,\n            behavior: 'smooth',\n        });\n    };\n    const scrollLeft = scrollEditor('left', -scrollPixelsPerInterval);\n    const scrollRight = scrollEditor('left', scrollPixelsPerInterval);\n    const scrollUp = scrollEditor('top', -scrollPixelsPerInterval);\n    const scrollDown = scrollEditor('top', scrollPixelsPerInterval);\n    const moveGhost = (ghostElm, position, width, height, maxX, maxY, mouseY, mouseX, contentAreaContainer, win, state, mouseEventOriginatedFromWithinTheEditor) => {\n        let overflowX = 0, overflowY = 0;\n        ghostElm.style.left = position.pageX + 'px';\n        ghostElm.style.top = position.pageY + 'px';\n        if (position.pageX + width > maxX) {\n            overflowX = (position.pageX + width) - maxX;\n        }\n        if (position.pageY + height > maxY) {\n            overflowY = (position.pageY + height) - maxY;\n        }\n        ghostElm.style.width = (width - overflowX) + 'px';\n        ghostElm.style.height = (height - overflowY) + 'px';\n        // Code needed for dragging CEF elements (specifically fixing TINY-8874)\n        // The idea behind the algorithm is that the user will start dragging the\n        // CEF element to the edge of the editor and that would cause scrolling.\n        // The way that happens is that the user will trigger a mousedown event,\n        // then a mousemove event until they reach the edge of the editor. Then\n        // no event triggers. That's when I set an interval to keep scrolling the editor.\n        // Once a new event triggers I clear the existing interval and set it back to none.\n        const clientHeight = contentAreaContainer.clientHeight;\n        const clientWidth = contentAreaContainer.clientWidth;\n        const outerMouseY = mouseY + contentAreaContainer.getBoundingClientRect().top;\n        const outerMouseX = mouseX + contentAreaContainer.getBoundingClientRect().left;\n        state.on((state) => {\n            state.intervalId.clear();\n            if (state.dragging && mouseEventOriginatedFromWithinTheEditor) {\n                // This basically means that the mouse is close to the bottom edge\n                // (within MouseRange pixels of the bottom edge)\n                if (mouseY + mouseRangeToTriggerScrollInsideEditor >= clientHeight) {\n                    state.intervalId.set(scrollDown(win));\n                    // This basically means that the mouse is close to the top edge\n                    // (within MouseRange pixels)\n                }\n                else if (mouseY - mouseRangeToTriggerScrollInsideEditor <= 0) {\n                    state.intervalId.set(scrollUp(win));\n                    // This basically means that the mouse is close to the right edge\n                    // (within MouseRange pixels of the right edge)\n                }\n                else if (mouseX + mouseRangeToTriggerScrollInsideEditor >= clientWidth) {\n                    state.intervalId.set(scrollRight(win));\n                    // This basically means that the mouse is close to the left edge\n                    // (within MouseRange pixels of the left edge)\n                }\n                else if (mouseX - mouseRangeToTriggerScrollInsideEditor <= 0) {\n                    state.intervalId.set(scrollLeft(win));\n                    // This basically means that the mouse is close to the bottom edge\n                    // of the page (within MouseRange pixels) when the bottom of\n                    // the editor is offscreen\n                }\n                else if (outerMouseY + mouseRangeToTriggerScrollOutsideEditor >= window.innerHeight) {\n                    state.intervalId.set(scrollDown(window));\n                    // This basically means that the mouse is close to the upper edge\n                    // of the page (within MouseRange pixels) when the top of\n                    // the editor is offscreen\n                }\n                else if (outerMouseY - mouseRangeToTriggerScrollOutsideEditor <= 0) {\n                    state.intervalId.set(scrollUp(window));\n                    // This basically means that the mouse is close to the right edge\n                    // of the page (within MouseRange pixels) when the right edge of\n                    // the editor is offscreen\n                }\n                else if (outerMouseX + mouseRangeToTriggerScrollOutsideEditor >= window.innerWidth) {\n                    state.intervalId.set(scrollRight(window));\n                    // This basically means that the mouse is close to the left edge\n                    // of the page (within MouseRange pixels) when the left edge of\n                    // the editor is offscreen\n                }\n                else if (outerMouseX - mouseRangeToTriggerScrollOutsideEditor <= 0) {\n                    state.intervalId.set(scrollLeft(window));\n                }\n            }\n        });\n    };\n    const removeElement = (elm) => {\n        if (elm && elm.parentNode) {\n            elm.parentNode.removeChild(elm);\n        }\n    };\n    const removeElementWithPadding = (dom, elm) => {\n        const parentBlock = dom.getParent(elm.parentNode, dom.isBlock);\n        removeElement(elm);\n        if (parentBlock && parentBlock !== dom.getRoot() && dom.isEmpty(parentBlock)) {\n            fillWithPaddingBr(SugarElement.fromDom(parentBlock));\n        }\n    };\n    const isLeftMouseButtonPressed = (e) => e.button === 0;\n    const applyRelPos = (state, position) => ({\n        pageX: position.pageX - state.relX,\n        pageY: position.pageY + 5\n    });\n    const start = (state, editor) => (e) => {\n        if (isLeftMouseButtonPressed(e)) {\n            const ceElm = find$2(editor.dom.getParents(e.target), isContentEditable).getOr(null);\n            if (isNonNullable(ceElm) && isDraggable(editor.dom, editor.getBody(), ceElm)) {\n                const elmPos = editor.dom.getPos(ceElm);\n                const bodyElm = editor.getBody();\n                const docElm = editor.getDoc().documentElement;\n                state.set({\n                    element: ceElm,\n                    dataTransfer: createDataTransfer(),\n                    dragging: false,\n                    screenX: e.screenX,\n                    screenY: e.screenY,\n                    maxX: (editor.inline ? bodyElm.scrollWidth : docElm.offsetWidth) - 2,\n                    maxY: (editor.inline ? bodyElm.scrollHeight : docElm.offsetHeight) - 2,\n                    relX: e.pageX - elmPos.x,\n                    relY: e.pageY - elmPos.y,\n                    width: ceElm.offsetWidth,\n                    height: ceElm.offsetHeight,\n                    ghost: createGhost(editor, ceElm, ceElm.offsetWidth, ceElm.offsetHeight),\n                    intervalId: repeatable(scrollIntervalValue)\n                });\n            }\n        }\n    };\n    const placeCaretAt = (editor, clientX, clientY) => {\n        editor._selectionOverrides.hideFakeCaret();\n        closestFakeCaretCandidate(editor.getBody(), clientX, clientY).fold(() => editor.selection.placeCaretAt(clientX, clientY), (caretInfo) => {\n            const range = editor._selectionOverrides.showCaret(1, caretInfo.node, caretInfo.position === FakeCaretPosition.Before, false);\n            if (range) {\n                editor.selection.setRng(range);\n            }\n            else {\n                editor.selection.placeCaretAt(clientX, clientY);\n            }\n        });\n    };\n    const dispatchDragEvent = (editor, type, target, dataTransfer, mouseEvent) => {\n        if (type === 'dragstart') {\n            setHtmlData(dataTransfer, editor.dom.getOuterHTML(target));\n        }\n        const event = makeDragEvent(type, target, dataTransfer, mouseEvent);\n        const args = editor.dispatch(type, event);\n        return args;\n    };\n    const move = (state, editor) => {\n        // Reduces laggy drag behavior on Gecko\n        const throttledPlaceCaretAt = first$1((clientX, clientY) => placeCaretAt(editor, clientX, clientY), 0);\n        editor.on('remove', throttledPlaceCaretAt.cancel);\n        const state_ = state;\n        return (e) => state.on((state) => {\n            const movement = Math.max(Math.abs(e.screenX - state.screenX), Math.abs(e.screenY - state.screenY));\n            if (!state.dragging && movement > 10) {\n                const args = dispatchDragEvent(editor, 'dragstart', state.element, state.dataTransfer, e);\n                // TINY-9601: dataTransfer is writable in dragstart, so keep it up-to-date\n                if (isNonNullable(args.dataTransfer)) {\n                    state.dataTransfer = args.dataTransfer;\n                }\n                if (args.isDefaultPrevented()) {\n                    return;\n                }\n                state.dragging = true;\n                editor.focus();\n            }\n            if (state.dragging) {\n                const mouseEventOriginatedFromWithinTheEditor = e.currentTarget === editor.getDoc().documentElement;\n                const targetPos = applyRelPos(state, calc(editor, e));\n                appendGhostToBody(state.ghost, editor.getBody());\n                moveGhost(state.ghost, targetPos, state.width, state.height, state.maxX, state.maxY, e.clientY, e.clientX, editor.getContentAreaContainer(), editor.getWin(), state_, mouseEventOriginatedFromWithinTheEditor);\n                throttledPlaceCaretAt.throttle(e.clientX, e.clientY);\n            }\n        });\n    };\n    // Returns the raw element instead of the fake cE=false element\n    const getRawTarget = (selection) => {\n        const sel = selection.getSel();\n        if (isNonNullable(sel)) {\n            const rng = sel.getRangeAt(0);\n            const startContainer = rng.startContainer;\n            return isText$b(startContainer) ? startContainer.parentNode : startContainer;\n        }\n        else {\n            return null;\n        }\n    };\n    const drop = (state, editor) => (e) => {\n        state.on((state) => {\n            state.intervalId.clear();\n            if (state.dragging) {\n                if (isValidDropTarget(editor, getRawTarget(editor.selection), state.element)) {\n                    const dropTarget = editor.getDoc().elementFromPoint(e.clientX, e.clientY) ?? editor.getBody();\n                    const args = dispatchDragEvent(editor, 'drop', dropTarget, state.dataTransfer, e);\n                    if (!args.isDefaultPrevented()) {\n                        editor.undoManager.transact(() => {\n                            removeElementWithPadding(editor.dom, state.element);\n                            // TINY-9601: Use dataTransfer property to determine inserted content on drop. This allows users to\n                            // manipulate drop content by modifying dataTransfer in the dragstart event.\n                            getHtmlData(state.dataTransfer).each((content) => editor.insertContent(content));\n                            editor._selectionOverrides.hideFakeCaret();\n                        });\n                    }\n                }\n                // Use body as the target since the element we are dragging no longer exists. Native drag/drop works in a similar way.\n                dispatchDragEvent(editor, 'dragend', editor.getBody(), state.dataTransfer, e);\n            }\n        });\n        removeDragState(state);\n    };\n    const stopDragging = (state, editor, e) => {\n        state.on((state) => {\n            state.intervalId.clear();\n            if (state.dragging) {\n                e.fold(() => dispatchDragEvent(editor, 'dragend', state.element, state.dataTransfer), (mouseEvent) => dispatchDragEvent(editor, 'dragend', state.element, state.dataTransfer, mouseEvent));\n            }\n        });\n        removeDragState(state);\n    };\n    const stop = (state, editor) => (e) => stopDragging(state, editor, Optional.some(e));\n    const removeDragState = (state) => {\n        state.on((state) => {\n            state.intervalId.clear();\n            removeElement(state.ghost);\n        });\n        state.clear();\n    };\n    const bindFakeDragEvents = (editor) => {\n        const state = value$1();\n        const pageDom = DOMUtils.DOM;\n        const rootDocument = document;\n        const dragStartHandler = start(state, editor);\n        const dragHandler = move(state, editor);\n        const dropHandler = drop(state, editor);\n        const dragEndHandler = stop(state, editor);\n        editor.on('mousedown', dragStartHandler);\n        editor.on('mousemove', dragHandler);\n        editor.on('mouseup', dropHandler);\n        pageDom.bind(rootDocument, 'mousemove', dragHandler);\n        pageDom.bind(rootDocument, 'mouseup', dragEndHandler);\n        editor.on('remove', () => {\n            pageDom.unbind(rootDocument, 'mousemove', dragHandler);\n            pageDom.unbind(rootDocument, 'mouseup', dragEndHandler);\n        });\n        editor.on('keydown', (e) => {\n            // Fire 'dragend' when the escape key is pressed\n            if (e.keyCode === VK.ESC) {\n                stopDragging(state, editor, Optional.none());\n            }\n        });\n    };\n    // Block files being dropped within the editor to prevent accidentally navigating away\n    // while editing. Note that we can't use the `editor.on` API here, as we want these\n    // to run after the editor event handlers have run. We also bind to the document\n    // so that it'll try to ensure it's the last thing that runs, as it bubbles up the dom.\n    const blockUnsupportedFileDrop = (editor) => {\n        const preventFileDrop = (e) => {\n            if (!e.isDefaultPrevented()) {\n                // Prevent file drop events within the editor, as they'll cause the browser to navigate away\n                const dataTransfer = e.dataTransfer;\n                if (dataTransfer && (contains$2(dataTransfer.types, 'Files') || dataTransfer.files.length > 0)) {\n                    e.preventDefault();\n                    if (e.type === 'drop') {\n                        displayError(editor, 'Dropped file type is not supported');\n                    }\n                }\n            }\n        };\n        const preventFileDropIfUIElement = (e) => {\n            if (isUIElement(editor, e.target)) {\n                preventFileDrop(e);\n            }\n        };\n        const setup = () => {\n            const pageDom = DOMUtils.DOM;\n            const dom = editor.dom;\n            const doc = document;\n            const editorRoot = editor.inline ? editor.getBody() : editor.getDoc();\n            const eventNames = ['drop', 'dragover'];\n            each$e(eventNames, (name) => {\n                pageDom.bind(doc, name, preventFileDropIfUIElement);\n                dom.bind(editorRoot, name, preventFileDrop);\n            });\n            editor.on('remove', () => {\n                each$e(eventNames, (name) => {\n                    pageDom.unbind(doc, name, preventFileDropIfUIElement);\n                    dom.unbind(editorRoot, name, preventFileDrop);\n                });\n            });\n        };\n        editor.on('init', () => {\n            // Use a timeout to ensure this fires after all other init callbacks\n            Delay.setEditorTimeout(editor, setup, 0);\n        });\n    };\n    const init$2 = (editor) => {\n        bindFakeDragEvents(editor);\n        if (shouldBlockUnsupportedDrop(editor)) {\n            blockUnsupportedFileDrop(editor);\n        }\n    };\n\n    const setup$4 = (editor) => {\n        const renderFocusCaret = first$1(() => {\n            // AP-24 Added the second condition in this if because of a race condition with setting focus on the PowerPaste\n            // remove/keep formatting dialog on paste in IE11. Without this, because we paste twice on IE11, focus ends up set\n            // in the editor, not the dialog buttons. Specifically, we focus, blur, focus, blur, focus then enter this throttled\n            // code before the next blur has been able to run. With this check, this function doesn't run at all in this case,\n            // so focus goes to the dialog's buttons correctly.\n            if (!editor.removed && editor.getBody().contains(document.activeElement)) {\n                const rng = editor.selection.getRng();\n                if (rng.collapsed) { // see TINY-1479\n                    const caretRange = renderRangeCaret(editor, rng, false);\n                    editor.selection.setRng(caretRange);\n                }\n            }\n        }, 0);\n        editor.on('focus', () => {\n            renderFocusCaret.throttle();\n        });\n        editor.on('blur', () => {\n            renderFocusCaret.cancel();\n        });\n    };\n\n    const setup$3 = (editor) => {\n        editor.on('init', () => {\n            // Audio elements don't fire mousedown/click events and only fire a focus event so\n            // we need to capture that event being fired and use it to update the selection.\n            editor.on('focusin', (e) => {\n                const target = e.target;\n                if (isMedia$2(target)) {\n                    const ceRoot = getContentEditableRoot$1(editor.getBody(), target);\n                    const node = isContentEditableFalse$a(ceRoot) ? ceRoot : target;\n                    if (editor.selection.getNode() !== node) {\n                        selectNode(editor, node).each((rng) => editor.selection.setRng(rng));\n                    }\n                }\n            });\n        });\n    };\n\n    const isContentEditableFalse = isContentEditableFalse$a;\n    const getContentEditableRoot = (editor, node) => getContentEditableRoot$1(editor.getBody(), node);\n    const SelectionOverrides = (editor) => {\n        const selection = editor.selection, dom = editor.dom;\n        const rootNode = editor.getBody();\n        const fakeCaret = FakeCaret(editor, rootNode, dom.isBlock, () => hasFocus(editor));\n        const realSelectionId = 'sel-' + dom.uniqueId();\n        const elementSelectionAttr = 'data-mce-selected';\n        let selectedElement;\n        const isFakeSelectionElement = (node) => isNonNullable(node) && dom.hasClass(node, 'mce-offscreen-selection');\n        // Note: isChildOf will return true if node === rootNode, so we need an additional check for that\n        const isFakeSelectionTargetElement = (node) => node !== rootNode && (isContentEditableFalse(node) || isMedia$2(node)) && dom.isChildOf(node, rootNode) && dom.isEditable(node.parentNode);\n        const setRange = (range) => {\n            if (range) {\n                selection.setRng(range);\n            }\n        };\n        const showCaret = (direction, node, before, scrollIntoView = true) => {\n            const e = editor.dispatch('ShowCaret', {\n                target: node,\n                direction,\n                before\n            });\n            if (e.isDefaultPrevented()) {\n                return null;\n            }\n            if (scrollIntoView) {\n                selection.scrollIntoView(node, direction === -1);\n            }\n            return fakeCaret.show(before, node);\n        };\n        const showBlockCaretContainer = (blockCaretContainer) => {\n            if (blockCaretContainer.hasAttribute('data-mce-caret')) {\n                showCaretContainerBlock(blockCaretContainer);\n                selection.scrollIntoView(blockCaretContainer);\n            }\n        };\n        const registerEvents = () => {\n            editor.on('click', (e) => {\n                // Prevent clicks on links in a cE=false element\n                if (!dom.isEditable(e.target)) {\n                    e.preventDefault();\n                    editor.focus();\n                }\n            });\n            editor.on('blur NewBlock', removeElementSelection);\n            editor.on('ResizeWindow FullscreenStateChanged', fakeCaret.reposition);\n            editor.on('tap', (e) => {\n                const targetElm = e.target;\n                const contentEditableRoot = getContentEditableRoot(editor, targetElm);\n                if (isContentEditableFalse(contentEditableRoot)) {\n                    e.preventDefault();\n                    selectNode(editor, contentEditableRoot).each(setElementSelection);\n                }\n                else if (isFakeSelectionTargetElement(targetElm)) {\n                    selectNode(editor, targetElm).each(setElementSelection);\n                }\n            }, true);\n            editor.on('mousedown', (e) => {\n                const targetElm = e.target;\n                if (targetElm !== rootNode && targetElm.nodeName !== 'HTML' && !dom.isChildOf(targetElm, rootNode)) {\n                    return;\n                }\n                if (!isXYInContentArea(editor, e.clientX, e.clientY)) {\n                    return;\n                }\n                // Remove needs to be called here since the mousedown might alter the selection without calling selection.setRng\n                // and therefore not fire the AfterSetSelectionRange event.\n                removeElementSelection();\n                hideFakeCaret();\n                const closestContentEditable = getContentEditableRoot(editor, targetElm);\n                if (isContentEditableFalse(closestContentEditable)) {\n                    e.preventDefault();\n                    selectNode(editor, closestContentEditable).each(setElementSelection);\n                }\n                else {\n                    closestFakeCaretCandidate(rootNode, e.clientX, e.clientY).each((caretInfo) => {\n                        e.preventDefault();\n                        const range = showCaret(1, caretInfo.node, caretInfo.position === FakeCaretPosition.Before, false);\n                        setRange(range);\n                        // Set the focus after the range has been set to avoid potential issues where the body has no selection\n                        if (isHTMLElement(closestContentEditable)) {\n                            closestContentEditable.focus();\n                        }\n                        else {\n                            editor.getBody().focus();\n                        }\n                    });\n                }\n            });\n            editor.on('keypress', (e) => {\n                if (VK.modifierPressed(e)) {\n                    return;\n                }\n                if (isContentEditableFalse(selection.getNode())) {\n                    e.preventDefault();\n                }\n            });\n            editor.on('GetSelectionRange', (e) => {\n                let rng = e.range;\n                if (selectedElement) {\n                    if (!selectedElement.parentNode) {\n                        selectedElement = null;\n                        return;\n                    }\n                    rng = rng.cloneRange();\n                    rng.selectNode(selectedElement);\n                    e.range = rng;\n                }\n            });\n            editor.on('focusin', (e) => {\n                // for medias the selection is already managed in `MediaFocus.ts`\n                if (isMedia$2(e.target)) {\n                    return;\n                }\n                if (editor.getBody().contains(e.target) && e.target !== editor.getBody() && !editor.dom.isEditable(e.target.parentNode)) {\n                    if (fakeCaret.isShowing()) {\n                        fakeCaret.hide();\n                    }\n                    if (!e.target.contains(editor.selection.getNode())) {\n                        editor.selection.select(e.target, true);\n                        editor.selection.collapse(true);\n                    }\n                    const rng = setElementSelection(editor.selection.getRng(), true);\n                    if (rng) {\n                        editor.selection.setRng(rng);\n                    }\n                }\n            });\n            editor.on('SetSelectionRange', (e) => {\n                // If the range is set inside a short ended element, then move it\n                // to the side as IE for example will try to add content inside\n                e.range = normalizeVoidElementSelection(e.range);\n                const rng = setElementSelection(e.range, e.forward);\n                if (rng) {\n                    e.range = rng;\n                }\n            });\n            const isPasteBin = (node) => isElement$7(node) && node.id === 'mcepastebin';\n            editor.on('AfterSetSelectionRange', (e) => {\n                const rng = e.range;\n                const parent = rng.startContainer.parentElement;\n                if (!isRangeInCaretContainer(rng) && !isPasteBin(parent)) {\n                    hideFakeCaret();\n                }\n                if (!isFakeSelectionElement(parent)) {\n                    removeElementSelection();\n                }\n            });\n            init$2(editor);\n            setup$4(editor);\n            setup$3(editor);\n        };\n        const isWithinCaretContainer = (node) => (isCaretContainer$2(node) ||\n            startsWithCaretContainer$1(node) ||\n            endsWithCaretContainer$1(node));\n        const isRangeInCaretContainer = (rng) => isWithinCaretContainer(rng.startContainer) || isWithinCaretContainer(rng.endContainer);\n        const normalizeVoidElementSelection = (rng) => {\n            const voidElements = editor.schema.getVoidElements();\n            const newRng = dom.createRng();\n            const startContainer = rng.startContainer;\n            const startOffset = rng.startOffset;\n            const endContainer = rng.endContainer;\n            const endOffset = rng.endOffset;\n            if (has$2(voidElements, startContainer.nodeName.toLowerCase())) {\n                if (startOffset === 0) {\n                    newRng.setStartBefore(startContainer);\n                }\n                else {\n                    newRng.setStartAfter(startContainer);\n                }\n            }\n            else {\n                newRng.setStart(startContainer, startOffset);\n            }\n            if (has$2(voidElements, endContainer.nodeName.toLowerCase())) {\n                if (endOffset === 0) {\n                    newRng.setEndBefore(endContainer);\n                }\n                else {\n                    newRng.setEndAfter(endContainer);\n                }\n            }\n            else {\n                newRng.setEnd(endContainer, endOffset);\n            }\n            return newRng;\n        };\n        const setupOffscreenSelection = (node, targetClone) => {\n            const body = SugarElement.fromDom(editor.getBody());\n            const doc = editor.getDoc();\n            const realSelectionContainer = descendant$1(body, '#' + realSelectionId).getOrThunk(() => {\n                const newContainer = SugarElement.fromHtml('<div data-mce-bogus=\"all\" class=\"mce-offscreen-selection\"></div>', doc);\n                set$5(newContainer, 'id', realSelectionId);\n                append$1(body, newContainer);\n                return newContainer;\n            });\n            const newRange = dom.createRng();\n            empty(realSelectionContainer);\n            append(realSelectionContainer, [\n                SugarElement.fromText(nbsp, doc),\n                SugarElement.fromDom(targetClone),\n                SugarElement.fromText(nbsp, doc)\n            ]);\n            newRange.setStart(realSelectionContainer.dom.firstChild, 1);\n            newRange.setEnd(realSelectionContainer.dom.lastChild, 0);\n            setAll(realSelectionContainer, {\n                top: dom.getPos(node, editor.getBody()).y + 'px'\n            });\n            focus$1(realSelectionContainer);\n            const sel = selection.getSel();\n            if (sel) {\n                sel.removeAllRanges();\n                sel.addRange(newRange);\n            }\n            return newRange;\n        };\n        const getUcVideoClone = (ucVideo) => {\n            const newElm = editor.getDoc().createElement('div');\n            newElm.style.width = ucVideo.style.width;\n            newElm.style.height = ucVideo.style.height;\n            const ucVideoWidth = ucVideo.getAttribute('width');\n            if (ucVideoWidth) {\n                newElm.setAttribute('width', ucVideoWidth);\n            }\n            const ucVideoHeight = ucVideo.getAttribute('height');\n            if (ucVideoHeight) {\n                newElm.setAttribute('height', ucVideoHeight);\n            }\n            return newElm;\n        };\n        const selectElement = (elm) => {\n            const targetClone = isUcVideo(elm) ? getUcVideoClone(elm) : elm.cloneNode(true);\n            const e = editor.dispatch('ObjectSelected', { target: elm, targetClone });\n            if (e.isDefaultPrevented()) {\n                return null;\n            }\n            // Setup the offscreen selection\n            const range = setupOffscreenSelection(elm, e.targetClone);\n            // We used to just remove all data-mce-selected values and set 1 on node.\n            // But data-mce-selected can be values other than 1 so keep existing value if\n            // node has one, and remove data-mce-selected from everything else\n            const nodeElm = SugarElement.fromDom(elm);\n            each$e(descendants(SugarElement.fromDom(editor.getBody()), `*[${elementSelectionAttr}]`), (elm) => {\n                if (!eq(nodeElm, elm)) {\n                    remove$9(elm, elementSelectionAttr);\n                }\n            });\n            if (!dom.getAttrib(elm, elementSelectionAttr)) {\n                elm.setAttribute(elementSelectionAttr, '1');\n            }\n            selectedElement = elm;\n            hideFakeCaret();\n            return range;\n        };\n        const setElementSelection = (range, forward) => {\n            if (!range) {\n                return null;\n            }\n            if (range.collapsed) {\n                if (!isRangeInCaretContainer(range)) {\n                    const dir = forward ? 1 : -1;\n                    const caretPosition = getNormalizedRangeEndPoint(dir, rootNode, range);\n                    const beforeNode = caretPosition.getNode(!forward);\n                    if (isNonNullable(beforeNode)) {\n                        if (isFakeCaretTarget(beforeNode)) {\n                            return showCaret(dir, beforeNode, forward ? !caretPosition.isAtEnd() : false, false);\n                        }\n                        if (isCaretContainerInline(beforeNode) && isContentEditableFalse$a(beforeNode.nextSibling)) {\n                            const rng = dom.createRng();\n                            rng.setStart(beforeNode, 0);\n                            rng.setEnd(beforeNode, 0);\n                            return rng;\n                        }\n                    }\n                    const afterNode = caretPosition.getNode(forward);\n                    if (isNonNullable(afterNode)) {\n                        if (isFakeCaretTarget(afterNode)) {\n                            return showCaret(dir, afterNode, forward ? false : !caretPosition.isAtEnd(), false);\n                        }\n                        if (isCaretContainerInline(afterNode) && isContentEditableFalse$a(afterNode.previousSibling)) {\n                            const rng = dom.createRng();\n                            rng.setStart(afterNode, 1);\n                            rng.setEnd(afterNode, 1);\n                            return rng;\n                        }\n                    }\n                }\n                return null;\n            }\n            let startContainer = range.startContainer;\n            let startOffset = range.startOffset;\n            const endOffset = range.endOffset;\n            // Normalizes <span cE=false>[</span>] to [<span cE=false></span>]\n            if (isText$b(startContainer) && startOffset === 0 && isContentEditableFalse(startContainer.parentNode)) {\n                startContainer = startContainer.parentNode;\n                startOffset = dom.nodeIndex(startContainer);\n                startContainer = startContainer.parentNode;\n            }\n            if (!isElement$7(startContainer)) {\n                return null;\n            }\n            if (endOffset === startOffset + 1 && startContainer === range.endContainer) {\n                const node = startContainer.childNodes[startOffset];\n                if (isFakeSelectionTargetElement(node)) {\n                    return selectElement(node);\n                }\n            }\n            return null;\n        };\n        const removeElementSelection = () => {\n            if (selectedElement) {\n                selectedElement.removeAttribute(elementSelectionAttr);\n            }\n            descendant$1(SugarElement.fromDom(editor.getBody()), '#' + realSelectionId).each(remove$8);\n            selectedElement = null;\n        };\n        const destroy = () => {\n            fakeCaret.destroy();\n            selectedElement = null;\n        };\n        const hideFakeCaret = () => {\n            fakeCaret.hide();\n        };\n        if (!isRtc(editor)) {\n            registerEvents();\n        }\n        return {\n            showCaret,\n            showBlockCaretContainer,\n            hideFakeCaret,\n            destroy\n        };\n    };\n\n    const getNormalizedTextOffset = (container, offset) => {\n        let normalizedOffset = offset;\n        for (let node = container.previousSibling; isText$b(node); node = node.previousSibling) {\n            normalizedOffset += node.data.length;\n        }\n        return normalizedOffset;\n    };\n    const generatePath = (dom, root, node, offset, normalized) => {\n        if (isText$b(node) && (offset < 0 || offset > node.data.length)) {\n            return [];\n        }\n        const p = normalized && isText$b(node) ? [getNormalizedTextOffset(node, offset)] : [offset];\n        let current = node;\n        while (current !== root && current.parentNode) {\n            p.push(dom.nodeIndex(current, normalized));\n            current = current.parentNode;\n        }\n        return current === root ? p.reverse() : [];\n    };\n    const generatePathRange = (dom, root, startNode, startOffset, endNode, endOffset, normalized = false) => {\n        const start = generatePath(dom, root, startNode, startOffset, normalized);\n        const end = generatePath(dom, root, endNode, endOffset, normalized);\n        return { start, end };\n    };\n    const resolvePath = (root, path) => {\n        const nodePath = path.slice();\n        const offset = nodePath.pop();\n        if (!isNumber(offset)) {\n            return Optional.none();\n        }\n        else {\n            const resolvedNode = foldl(nodePath, (optNode, index) => optNode.bind((node) => Optional.from(node.childNodes[index])), Optional.some(root));\n            return resolvedNode.bind((node) => {\n                if (isText$b(node) && (offset < 0 || offset > node.data.length)) {\n                    return Optional.none();\n                }\n                else {\n                    return Optional.some({ node, offset });\n                }\n            });\n        }\n    };\n    const resolvePathRange = (root, range) => resolvePath(root, range.start)\n        .bind(({ node: startNode, offset: startOffset }) => resolvePath(root, range.end).map(({ node: endNode, offset: endOffset }) => {\n        const rng = document.createRange();\n        rng.setStart(startNode, startOffset);\n        rng.setEnd(endNode, endOffset);\n        return rng;\n    }));\n    const generatePathRangeFromRange = (dom, root, range, normalized = false) => generatePathRange(dom, root, range.startContainer, range.startOffset, range.endContainer, range.endOffset, normalized);\n\n    const cleanEmptyNodes = (dom, node, isRoot) => {\n        // Recursively walk up the tree while we have a parent and the node is empty. If the node is empty, then remove it.\n        if (node && dom.isEmpty(node) && !isRoot(node)) {\n            const parent = node.parentNode;\n            dom.remove(node, isText$b(node.firstChild) && isWhitespaceText(node.firstChild.data));\n            cleanEmptyNodes(dom, parent, isRoot);\n        }\n    };\n    const deleteRng = (dom, rng, isRoot, clean = true) => {\n        const startParent = rng.startContainer.parentNode;\n        const endParent = rng.endContainer.parentNode;\n        rng.deleteContents();\n        // Clean up any empty nodes if required\n        if (clean && !isRoot(rng.startContainer)) {\n            if (isText$b(rng.startContainer) && rng.startContainer.data.length === 0) {\n                dom.remove(rng.startContainer);\n            }\n            if (isText$b(rng.endContainer) && rng.endContainer.data.length === 0) {\n                dom.remove(rng.endContainer);\n            }\n            cleanEmptyNodes(dom, startParent, isRoot);\n            if (startParent !== endParent) {\n                cleanEmptyNodes(dom, endParent, isRoot);\n            }\n        }\n    };\n    const getParentBlock = (editor, rng) => Optional.from(editor.dom.getParent(rng.startContainer, editor.dom.isBlock));\n    const resolveFromDynamicPatterns = (patternSet, block, beforeText) => {\n        const dynamicPatterns = patternSet.dynamicPatternsLookup({\n            text: beforeText,\n            block\n        });\n        // dynamic patterns take precedence here\n        return {\n            ...patternSet,\n            blockPatterns: getBlockPatterns(dynamicPatterns).concat(patternSet.blockPatterns),\n            inlinePatterns: getInlinePatterns(dynamicPatterns).concat(patternSet.inlinePatterns)\n        };\n    };\n    const getBeforeText = (dom, block, node, offset) => {\n        const rng = dom.createRng();\n        rng.setStart(block, 0);\n        rng.setEnd(node, offset);\n        return rng.toString();\n    };\n\n    const newMarker = (dom, id) => dom.create('span', { 'data-mce-type': 'bookmark', id });\n    const rangeFromMarker = (dom, marker) => {\n        const rng = dom.createRng();\n        rng.setStartAfter(marker.start);\n        rng.setEndBefore(marker.end);\n        return rng;\n    };\n    const createMarker = (dom, markerPrefix, pathRange) => {\n        // Resolve the path range\n        const rng = resolvePathRange(dom.getRoot(), pathRange).getOrDie('Unable to resolve path range');\n        const startNode = rng.startContainer;\n        const endNode = rng.endContainer;\n        // Create the marker\n        const textEnd = rng.endOffset === 0 ? endNode : endNode.splitText(rng.endOffset);\n        const textStart = rng.startOffset === 0 ? startNode : startNode.splitText(rng.startOffset);\n        const startParentNode = textStart.parentNode;\n        const endParentNode = textEnd.parentNode;\n        return {\n            prefix: markerPrefix,\n            end: endParentNode.insertBefore(newMarker(dom, markerPrefix + '-end'), textEnd),\n            start: startParentNode.insertBefore(newMarker(dom, markerPrefix + '-start'), textStart)\n        };\n    };\n    const removeMarker = (dom, marker, isRoot) => {\n        // Note: Use dom.get() here instead of marker.end/start, as applying the format/command can\n        // clone the nodes meaning the old reference isn't usable\n        cleanEmptyNodes(dom, dom.get(marker.prefix + '-end'), isRoot);\n        cleanEmptyNodes(dom, dom.get(marker.prefix + '-start'), isRoot);\n    };\n\n    const isReplacementPattern = (pattern) => pattern.start.length === 0;\n    const matchesPattern = (patternContent) => (element, offset) => {\n        const text = element.data;\n        const searchText = text.substring(0, offset);\n        const startEndIndex = searchText.lastIndexOf(patternContent.charAt(patternContent.length - 1));\n        const startIndex = searchText.lastIndexOf(patternContent);\n        if (startIndex !== -1) {\n            // Complete string found\n            return startIndex + patternContent.length;\n        }\n        else if (startEndIndex !== -1) {\n            // Potential partial string found\n            return startEndIndex + 1;\n        }\n        else {\n            // No match in current node, so continue\n            return -1;\n        }\n    };\n    const findPatternStartFromSpot = (dom, pattern, block, spot) => {\n        const startPattern = pattern.start;\n        const startSpot = repeatLeft(dom, spot.container, spot.offset, matchesPattern(startPattern), block);\n        return startSpot.bind((spot) => {\n            const startPatternIndex = block.textContent?.indexOf(startPattern) ?? -1;\n            const isCompleteMatch = startPatternIndex !== -1 && spot.offset >= startPatternIndex + startPattern.length;\n            if (isCompleteMatch) {\n                // Complete match\n                const rng = dom.createRng();\n                rng.setStart(spot.container, spot.offset - startPattern.length);\n                rng.setEnd(spot.container, spot.offset);\n                return Optional.some(rng);\n            }\n            else {\n                // Partial match so lean left to see if the string exists over fragmented text nodes\n                const offset = spot.offset - startPattern.length;\n                return scanLeft(spot.container, offset, block).map((nextSpot) => {\n                    // Build up the range between the last char and the first char\n                    const rng = dom.createRng();\n                    rng.setStart(nextSpot.container, nextSpot.offset);\n                    rng.setEnd(spot.container, spot.offset);\n                    return rng;\n                }).filter((rng) => \n                // Ensure the range content matches the start\n                rng.toString() === startPattern).orThunk(() => \n                // No match found, so continue searching\n                findPatternStartFromSpot(dom, pattern, block, point(spot.container, 0)));\n            }\n        });\n    };\n    const findPatternStart = (dom, pattern, node, offset, block, requireGap = false) => {\n        if (pattern.start.length === 0 && !requireGap) {\n            const rng = dom.createRng();\n            rng.setStart(node, offset);\n            rng.setEnd(node, offset);\n            return Optional.some(rng);\n        }\n        return textBefore(node, offset, block).bind((spot) => {\n            const start = findPatternStartFromSpot(dom, pattern, block, spot);\n            return start.bind((startRange) => {\n                if (requireGap) {\n                    if (startRange.endContainer === spot.container && startRange.endOffset === spot.offset) {\n                        return Optional.none();\n                    }\n                    else if (spot.offset === 0 && startRange.endContainer.textContent?.length === startRange.endOffset) {\n                        return Optional.none();\n                    }\n                }\n                return Optional.some(startRange);\n            });\n        });\n    };\n    const findPattern$3 = (editor, block, details, normalizedMatches) => {\n        const dom = editor.dom;\n        const root = dom.getRoot();\n        const pattern = details.pattern;\n        const endNode = details.position.container;\n        const endOffset = details.position.offset;\n        // Lean left to find the start of the end pattern, as it could be across fragmented nodes\n        return scanLeft(endNode, endOffset - details.pattern.end.length, block).bind((spot) => {\n            const endPathRng = generatePathRange(dom, root, spot.container, spot.offset, endNode, endOffset, normalizedMatches);\n            // If we have a replacement pattern, then it can't have nested patterns so just return immediately\n            if (isReplacementPattern(pattern)) {\n                return Optional.some({\n                    matches: [{\n                            pattern,\n                            startRng: endPathRng,\n                            endRng: endPathRng\n                        }],\n                    position: spot\n                });\n            }\n            else {\n                // Find any nested patterns, making sure not to process the current pattern again\n                const resultsOpt = findPatternsRec(editor, details.remainingPatterns, spot.container, spot.offset, block, normalizedMatches);\n                const results = resultsOpt.getOr({ matches: [], position: spot });\n                const pos = results.position;\n                // Find the start of the matched pattern\n                const start = findPatternStart(dom, pattern, pos.container, pos.offset, block, resultsOpt.isNone());\n                return start.map((startRng) => {\n                    const startPathRng = generatePathRangeFromRange(dom, root, startRng, normalizedMatches);\n                    return {\n                        matches: results.matches.concat([{\n                                pattern,\n                                startRng: startPathRng,\n                                endRng: endPathRng\n                            }]),\n                        position: point(startRng.startContainer, startRng.startOffset)\n                    };\n                });\n            }\n        });\n    };\n    // Assumptions:\n    // 0. Patterns are sorted by priority so we should preferentially match earlier entries\n    // 1. Patterns may be nested but may only occur once\n    // 2. Patterns will not have matching prefixes which contain space or standard punctuation ',', '.', ';', ':', '!', '?'\n    // 3. Patterns will not extend outside of the root element\n    // 4. All pattern ends must be directly before the cursor (represented by node + offset)\n    // 5. Only text nodes matter\n    const findPatternsRec = (editor, patterns, node, offset, block, normalizedMatches) => {\n        const dom = editor.dom;\n        return textBefore(node, offset, dom.getRoot()).bind((endSpot) => {\n            const text = getBeforeText(dom, block, node, offset);\n            for (let i = 0; i < patterns.length; i++) {\n                const pattern = patterns[i];\n                // If the text does not end with the same string as the pattern, then we can exit\n                // early, because this pattern isn't going to match this text. This saves us doing more\n                // expensive matching calls.\n                if (!endsWith(text, pattern.end)) {\n                    continue;\n                }\n                // Generate a new array without the current pattern\n                const patternsWithoutCurrent = patterns.slice();\n                patternsWithoutCurrent.splice(i, 1);\n                // Try to find the current pattern\n                const result = findPattern$3(editor, block, {\n                    pattern,\n                    remainingPatterns: patternsWithoutCurrent,\n                    position: endSpot\n                }, normalizedMatches);\n                if (result.isNone() && offset > 0) {\n                    return findPatternsRec(editor, patterns, node, offset - 1, block, normalizedMatches);\n                }\n                // If a match was found then return that\n                if (result.isSome()) {\n                    return result;\n                }\n            }\n            return Optional.none();\n        });\n    };\n    const applyPattern$2 = (editor, pattern, patternRange) => {\n        editor.selection.setRng(patternRange);\n        if (pattern.type === 'inline-format') {\n            each$e(pattern.format, (format) => {\n                editor.formatter.apply(format);\n            });\n        }\n        else {\n            editor.execCommand(pattern.cmd, false, pattern.value);\n        }\n    };\n    const applyReplacementPattern = (editor, pattern, marker, isRoot) => {\n        // Remove the original text\n        const markerRange = rangeFromMarker(editor.dom, marker);\n        deleteRng(editor.dom, markerRange, isRoot);\n        // Apply the replacement\n        applyPattern$2(editor, pattern, markerRange);\n    };\n    const applyPatternWithContent = (editor, pattern, startMarker, endMarker, isRoot) => {\n        const dom = editor.dom;\n        // Create the marker ranges for the patterns start/end content\n        const markerEndRange = rangeFromMarker(dom, endMarker);\n        const markerStartRange = rangeFromMarker(dom, startMarker);\n        // Clean up the pattern start/end content\n        deleteRng(dom, markerStartRange, isRoot);\n        deleteRng(dom, markerEndRange, isRoot);\n        // Apply the pattern\n        const patternMarker = { prefix: startMarker.prefix, start: startMarker.end, end: endMarker.start };\n        const patternRange = rangeFromMarker(dom, patternMarker);\n        applyPattern$2(editor, pattern, patternRange);\n    };\n    const addMarkers = (dom, matches) => {\n        const markerPrefix = generate('mce_textpattern');\n        // Add end markers\n        const matchesWithEnds = foldr(matches, (acc, match) => {\n            const endMarker = createMarker(dom, markerPrefix + `_end${acc.length}`, match.endRng);\n            return acc.concat([{\n                    ...match,\n                    endMarker\n                }]);\n        }, []);\n        // Add start markers\n        return foldr(matchesWithEnds, (acc, match) => {\n            const idx = matchesWithEnds.length - acc.length - 1;\n            const startMarker = isReplacementPattern(match.pattern) ? match.endMarker : createMarker(dom, markerPrefix + `_start${idx}`, match.startRng);\n            return acc.concat([{\n                    ...match,\n                    startMarker\n                }]);\n        }, []);\n    };\n    const sortPatterns$1 = (patterns) => sort(patterns, (a, b) => b.end.length - a.end.length);\n    const getBestMatches = (matches, matchesWithSortedPatterns) => {\n        const hasSameMatches = forall(matches, (match) => exists(matchesWithSortedPatterns, (sortedMatch) => match.pattern.start === sortedMatch.pattern.start && match.pattern.end === sortedMatch.pattern.end));\n        if (matches.length === matchesWithSortedPatterns.length) {\n            if (hasSameMatches) {\n                return matches;\n            }\n            else {\n                return matchesWithSortedPatterns;\n            }\n        }\n        return matches.length > matchesWithSortedPatterns.length ? matches : matchesWithSortedPatterns;\n    };\n    const findPatterns$2 = (editor, block, node, offset, patternSet, normalizedMatches) => {\n        const matches = findPatternsRec(editor, patternSet.inlinePatterns, node, offset, block, normalizedMatches).fold(() => [], (result) => result.matches);\n        const matchesWithSortedPatterns = findPatternsRec(editor, sortPatterns$1(patternSet.inlinePatterns), node, offset, block, normalizedMatches).fold(() => [], (result) => result.matches);\n        return getBestMatches(matches, matchesWithSortedPatterns);\n    };\n    const applyMatches$2 = (editor, matches) => {\n        if (matches.length === 0) {\n            return;\n        }\n        // Store the current selection\n        const dom = editor.dom;\n        const bookmark = editor.selection.getBookmark();\n        // Add markers for the matched patterns\n        const matchesWithMarkers = addMarkers(dom, matches);\n        // Do the replacements\n        each$e(matchesWithMarkers, (match) => {\n            const block = dom.getParent(match.startMarker.start, dom.isBlock);\n            const isRoot = (node) => node === block;\n            if (isReplacementPattern(match.pattern)) {\n                applyReplacementPattern(editor, match.pattern, match.endMarker, isRoot);\n            }\n            else {\n                applyPatternWithContent(editor, match.pattern, match.startMarker, match.endMarker, isRoot);\n            }\n            // Remove the markers\n            removeMarker(dom, match.endMarker, isRoot);\n            removeMarker(dom, match.startMarker, isRoot);\n        });\n        // Restore the selection\n        editor.selection.moveToBookmark(bookmark);\n    };\n\n    const stripPattern$1 = (dom, block, pattern) => {\n        // The pattern could be across fragmented text nodes, so we need to find the end\n        // of the pattern and then remove all elements between the start/end range\n        return textAfter(block, 0, block).map((spot) => {\n            const node = spot.container;\n            scanRight(node, pattern.start.length, block).each((end) => {\n                const rng = dom.createRng();\n                rng.setStart(node, 0);\n                rng.setEnd(end.container, end.offset);\n                deleteRng(dom, rng, (e) => e === block);\n            });\n            return node;\n        });\n    };\n    const createApplyPattern = (stripPattern) => (editor, match) => {\n        const dom = editor.dom;\n        const pattern = match.pattern;\n        const rng = resolvePathRange(dom.getRoot(), match.range).getOrDie('Unable to resolve path range');\n        const isBlockFormatName = (name, formatter) => {\n            const formatSet = formatter.get(name);\n            return isArray$1(formatSet) && head(formatSet).exists((format) => has$2(format, 'block'));\n        };\n        getParentBlock(editor, rng).each((block) => {\n            if (pattern.type === 'block-format') {\n                if (isBlockFormatName(pattern.format, editor.formatter)) {\n                    editor.undoManager.transact(() => {\n                        stripPattern(editor.dom, block, pattern);\n                        editor.formatter.apply(pattern.format);\n                    });\n                }\n            }\n            else if (pattern.type === 'block-command') {\n                editor.undoManager.transact(() => {\n                    stripPattern(editor.dom, block, pattern);\n                    editor.execCommand(pattern.cmd, false, pattern.value);\n                });\n            }\n        });\n        return true;\n    };\n    const sortPatterns = (patterns) => sort(patterns, (a, b) => b.start.length - a.start.length);\n    // Finds a matching pattern to the specified text\n    const findPattern$2 = (predicate) => (patterns, text) => {\n        const sortedPatterns = sortPatterns(patterns);\n        const nuText = text.replace(nbsp, ' ');\n        return find$2(sortedPatterns, (pattern) => predicate(pattern, text, nuText));\n    };\n    const createFindPatterns = (findPattern, skipFullMatch) => (editor, block, patternSet, normalizedMatches, text = block.textContent ?? '') => {\n        const dom = editor.dom;\n        const forcedRootBlock = getForcedRootBlock(editor);\n        if (!dom.is(block, forcedRootBlock)) {\n            return [];\n        }\n        return findPattern(patternSet.blockPatterns, text).map((pattern) => {\n            if (skipFullMatch && Tools.trim(text).length === pattern.start.length) {\n                return [];\n            }\n            return [{\n                    pattern,\n                    range: generatePathRange(dom, dom.getRoot(), block, 0, block, 0, normalizedMatches)\n                }];\n        }).getOr([]);\n    };\n\n    const startsWithSingleSpace = (s) => /^\\s[^\\s]/.test(s);\n    const stripPattern = (dom, block, pattern) => {\n        stripPattern$1(dom, block, pattern).each((node) => {\n            /**\n             * TINY-9603: If there is a single space between pattern.start and text (e.g. #\u00A01)\n             * then it will be left in the text content and then can appear in certain circumstances.\n             * This is not an issue with multiple spaces because they are transformed to non-breaking ones.\n             *\n             * In this specific case we've decided to remove this single space whatsoever\n             * as it feels to be the expected behavior.\n             */\n            const text = SugarElement.fromDom(node);\n            const textContent = get$5(text);\n            if (startsWithSingleSpace(textContent)) {\n                set$2(text, textContent.slice(1));\n            }\n        });\n    };\n    const applyPattern$1 = createApplyPattern(stripPattern);\n    const findPattern$1 = findPattern$2((pattern, text, nuText) => text.indexOf(pattern.start) === 0 || nuText.indexOf(pattern.start) === 0);\n    const findPatterns$1 = createFindPatterns(findPattern$1, true);\n    const getMatches$1 = (editor, patternSet) => {\n        const rng = editor.selection.getRng();\n        return getParentBlock(editor, rng).map((block) => {\n            const offset = Math.max(0, rng.startOffset);\n            const dynamicPatternSet = resolveFromDynamicPatterns(patternSet, block, block.textContent ?? '');\n            // IMPORTANT: We need to get normalized match results since undoing and redoing the editor state\n            // via undoManager.extra() will result in the DOM being normalized.\n            const inlineMatches = findPatterns$2(editor, block, rng.startContainer, offset, dynamicPatternSet, true);\n            const blockMatches = findPatterns$1(editor, block, dynamicPatternSet, true);\n            return { inlineMatches, blockMatches };\n        }).filter(({ inlineMatches, blockMatches }) => blockMatches.length > 0 || inlineMatches.length > 0);\n    };\n    const applyMatches$1 = (editor, matches) => {\n        if (matches.length === 0) {\n            return;\n        }\n        // Store the current selection and then apply the matched patterns\n        const bookmark = editor.selection.getBookmark();\n        each$e(matches, (match) => applyPattern$1(editor, match));\n        editor.selection.moveToBookmark(bookmark);\n    };\n\n    const applyPattern = createApplyPattern(stripPattern$1);\n    const findPattern = findPattern$2((pattern, text, nuText) => text === pattern.start || nuText === pattern.start);\n    const findPatterns = createFindPatterns(findPattern, false);\n    const getMatches = (editor, patternSet) => {\n        const rng = editor.selection.getRng();\n        return getParentBlock(editor, rng).map((block) => {\n            const offset = Math.max(0, rng.startOffset);\n            const beforeText = getBeforeText(editor.dom, block, rng.startContainer, offset);\n            const dynamicPatternSet = resolveFromDynamicPatterns(patternSet, block, beforeText);\n            return findPatterns(editor, block, dynamicPatternSet, false, beforeText);\n        }).filter((matches) => matches.length > 0);\n    };\n    const applyMatches = (editor, matches) => {\n        each$e(matches, (match) => applyPattern(editor, match));\n    };\n\n    const handleEnter = (editor, patternSet) => getMatches$1(editor, patternSet).fold(never, ({ inlineMatches, blockMatches }) => {\n        editor.undoManager.add();\n        editor.undoManager.extra(() => {\n            editor.execCommand('mceInsertNewLine');\n        }, () => {\n            // create a cursor position that we can move to avoid the inline formats\n            insert$5(editor);\n            applyMatches$2(editor, inlineMatches);\n            applyMatches$1(editor, blockMatches);\n            // find the spot before the cursor position\n            const range = editor.selection.getRng();\n            const spot = textBefore(range.startContainer, range.startOffset, editor.dom.getRoot());\n            editor.execCommand('mceInsertNewLine');\n            // clean up the cursor position we used to preserve the format\n            spot.each((s) => {\n                const node = s.container;\n                if (node.data.charAt(s.offset - 1) === zeroWidth) {\n                    node.deleteData(s.offset - 1, 1);\n                    cleanEmptyNodes(editor.dom, node.parentNode, (e) => e === editor.dom.getRoot());\n                }\n            });\n        });\n        return true;\n    });\n    const handleInlineKey = (editor, patternSet) => {\n        const rng = editor.selection.getRng();\n        getParentBlock(editor, rng).map((block) => {\n            const offset = Math.max(0, rng.startOffset - 1);\n            const beforeText = getBeforeText(editor.dom, block, rng.startContainer, offset);\n            const dynamicPatternSet = resolveFromDynamicPatterns(patternSet, block, beforeText);\n            const inlineMatches = findPatterns$2(editor, block, rng.startContainer, offset, dynamicPatternSet, false);\n            if (inlineMatches.length > 0) {\n                editor.undoManager.transact(() => {\n                    applyMatches$2(editor, inlineMatches);\n                });\n            }\n        });\n    };\n    const handleBlockPatternOnSpace = (editor, patternSet) => getMatches(editor, patternSet).fold(never, (matches) => {\n        editor.undoManager.transact(() => {\n            applyMatches(editor, matches);\n        });\n        return true;\n    });\n    const checkKeyEvent = (codes, event, predicate) => {\n        for (let i = 0; i < codes.length; i++) {\n            if (predicate(codes[i], event)) {\n                return true;\n            }\n        }\n        return false;\n    };\n    const checkKeyCode = (codes, event) => checkKeyEvent(codes, event, (code, event) => {\n        return code === event.keyCode && !VK.modifierPressed(event);\n    });\n    const checkCharCode = (chars, event) => checkKeyEvent(chars, event, (chr, event) => {\n        return chr.charCodeAt(0) === event.charCode;\n    });\n\n    const setup$2 = (editor) => {\n        const charCodes = [',', '.', ';', ':', '!', '?'];\n        const keyCodes = [32];\n        // This is a thunk so that they reflect changes in the underlying options each time they are requested.\n        const getPatternSet = () => createPatternSet(getTextPatterns(editor)\n            .filter((pattern) => {\n            if (pattern.type === 'inline-command' || pattern.type === 'block-command') {\n                return editor.queryCommandSupported(pattern.cmd);\n            }\n            return true;\n        }), getTextPatternsLookup(editor));\n        // Only used for skipping text pattern matching altogether if nothing has been defined.\n        const hasDynamicPatterns = () => hasTextPatternsLookup(editor);\n        editor.on('keydown', (e) => {\n            if (e.keyCode === 13 && !VK.modifierPressed(e) && editor.selection.isCollapsed() && editor.selection.isEditable()) {\n                const patternSet = filterByTrigger(getPatternSet(), 'enter');\n                // Do not process anything if we don't have any inline patterns, block patterns,\n                // or dynamic lookup defined\n                const hasPatterns = patternSet.inlinePatterns.length > 0 ||\n                    patternSet.blockPatterns.length > 0 ||\n                    hasDynamicPatterns();\n                if (hasPatterns && handleEnter(editor, patternSet)) {\n                    e.preventDefault();\n                }\n            }\n        }, true);\n        editor.on('keydown', (e) => {\n            if (e.keyCode === 32 && editor.selection.isCollapsed() && editor.selection.isEditable()) {\n                const patternSet = filterByTrigger(getPatternSet(), 'space');\n                const hasPatterns = patternSet.blockPatterns.length > 0 || hasDynamicPatterns();\n                if (hasPatterns && handleBlockPatternOnSpace(editor, patternSet)) {\n                    e.preventDefault();\n                }\n            }\n        }, true);\n        const handleInlineTrigger = () => {\n            if (editor.selection.isCollapsed() && editor.selection.isEditable()) {\n                const patternSet = filterByTrigger(getPatternSet(), 'space');\n                // Do not process anything if we don't have any inline patterns or dynamic lookup defined\n                const hasPatterns = patternSet.inlinePatterns.length > 0 || hasDynamicPatterns();\n                if (hasPatterns) {\n                    handleInlineKey(editor, patternSet);\n                }\n            }\n        };\n        editor.on('keyup', (e) => {\n            if (checkKeyCode(keyCodes, e)) {\n                handleInlineTrigger();\n            }\n        });\n        editor.on('keypress', (e) => {\n            if (checkCharCode(charCodes, e)) {\n                Delay.setEditorTimeout(editor, handleInlineTrigger);\n            }\n        });\n    };\n\n    const setup$1 = (editor) => {\n        setup$2(editor);\n    };\n\n    const Quirks = (editor) => {\n        const each = Tools.each;\n        const BACKSPACE = VK.BACKSPACE, DELETE = VK.DELETE, dom = editor.dom, selection = editor.selection, parser = editor.parser;\n        const browser = Env.browser;\n        const isGecko = browser.isFirefox();\n        const isWebKit = browser.isChromium() || browser.isSafari();\n        const isSafari = browser.isSafari();\n        const isiOS = Env.deviceType.isiPhone() || Env.deviceType.isiPad();\n        const isMac = Env.os.isMacOS() || Env.os.isiOS();\n        /**\n         * Executes a command with a specific state this can be to enable/disable browser editing features.\n         */\n        const setEditorCommandState = (cmd, state) => {\n            try {\n                editor.getDoc().execCommand(cmd, false, String(state));\n            }\n            catch {\n                // Ignore\n            }\n        };\n        /**\n         * Returns true/false if the event is prevented or not.\n         *\n         * @private\n         * @param {Event} e Event object.\n         * @return {Boolean} true/false if the event is prevented or not.\n         */\n        const isDefaultPrevented = (e) => {\n            return e.isDefaultPrevented();\n        };\n        /**\n         * Makes sure that the editor body becomes empty when backspace or delete is pressed in empty editors.\n         *\n         * For example:\n         * <p><b>|</b></p>\n         *\n         * Or:\n         * <h1>|</h1>\n         *\n         * Or:\n         * [<h1></h1>]\n         */\n        const emptyEditorWhenDeleting = () => {\n            const serializeRng = (rng) => {\n                const body = dom.create('body');\n                const contents = rng.cloneContents();\n                body.appendChild(contents);\n                return selection.serializer.serialize(body, { format: 'html' });\n            };\n            const allContentsSelected = (rng) => {\n                const selection = serializeRng(rng);\n                const allRng = dom.createRng();\n                allRng.selectNode(editor.getBody());\n                const allSelection = serializeRng(allRng);\n                return selection === allSelection;\n            };\n            editor.on('keydown', (e) => {\n                const keyCode = e.keyCode;\n                // Empty the editor if it's needed for example backspace at <p><b>|</b></p>\n                if (!isDefaultPrevented(e) && (keyCode === DELETE || keyCode === BACKSPACE) && editor.selection.isEditable()) {\n                    const isCollapsed = editor.selection.isCollapsed();\n                    const body = editor.getBody();\n                    // Selection is collapsed but the editor isn't empty\n                    if (isCollapsed && !isEmptyNode(editor.schema, body)) {\n                        return;\n                    }\n                    // Selection isn't collapsed but not all the contents is selected\n                    if (!isCollapsed && !allContentsSelected(editor.selection.getRng())) {\n                        return;\n                    }\n                    // Manually empty the editor\n                    e.preventDefault();\n                    if (symulateDelete(editor, keyCode === DELETE, () => editor.setContent(''))) {\n                        if (body.firstChild && dom.isBlock(body.firstChild)) {\n                            editor.selection.setCursorLocation(body.firstChild, 0);\n                        }\n                        else {\n                            editor.selection.setCursorLocation(body, 0);\n                        }\n                    }\n                }\n            });\n        };\n        /**\n         * WebKit doesn't select all the nodes in the body when you press Ctrl+A.\n         * IE selects more than the contents <body>[<p>a</p>]</body> instead of <body><p>[a]</p]</body> see bug #6438\n         * This selects the whole body so that backspace/delete logic will delete everything\n         */\n        const selectAll = () => {\n            editor.shortcuts.add('meta+a', null, 'SelectAll');\n        };\n        /**\n         * It seems that Chrome doesn't place the caret if you click on the documentElement in iframe mode\n         * something that is very easy to do by accident so this problem is now more generic than the original issue.\n         *\n         * Original IME specific issue:\n         * WebKit has a weird issue where it some times fails to properly convert keypresses to input method keystrokes.\n         * The IME on Mac doesn't initialize when it doesn't fire a proper focus event.\n         *\n         * This seems to happen when the user manages to click the documentElement element then the window doesn't get proper focus until\n         * you enter a character into the editor.\n         *\n         * See: https://bugs.webkit.org/show_bug.cgi?id=83566\n         */\n        const documentElementEditingFocus = () => {\n            if (!editor.inline) {\n                // Needs to be both down/up due to weird rendering bug on Chrome Windows\n                dom.bind(editor.getDoc(), 'mousedown mouseup', (e) => {\n                    let rng;\n                    if (e.target === editor.getDoc().documentElement) {\n                        rng = selection.getRng();\n                        // TINY-12245: this is needed to avoid the scroll back to the top when the content is scrolled, there is no selection and the user is clicking on a non selectable editor element\n                        // example content scrolled by browser search and user click on the horizontal scroll bar\n                        if (editor.getDoc().getSelection()?.anchorNode !== null) {\n                            editor.getBody().focus();\n                        }\n                        if (e.type === 'mousedown') {\n                            if (isCaretContainer$2(rng.startContainer)) {\n                                return;\n                            }\n                            // Edge case for mousedown, drag select and mousedown again within selection on Chrome Windows to render caret\n                            selection.placeCaretAt(e.clientX, e.clientY);\n                        }\n                        else {\n                            selection.setRng(rng);\n                        }\n                    }\n                });\n            }\n        };\n        /**\n         * Backspacing in FireFox/IE from a paragraph into a horizontal rule results in a floating text node because the\n         * browser just deletes the paragraph - the browser fails to merge the text node with a horizontal rule so it is\n         * left there. TinyMCE sees a floating text node and wraps it in a paragraph on the key up event (ForceBlocks.js\n         * addRootBlocks), meaning the action does nothing. With this code, FireFox/IE matche the behaviour of other\n         * browsers.\n         *\n         * It also fixes a bug on Firefox where it's impossible to delete HR elements.\n         */\n        const removeHrOnBackspace = () => {\n            editor.on('keydown', (e) => {\n                if (!isDefaultPrevented(e) && e.keyCode === BACKSPACE) {\n                    // Check if there is any HR elements this is faster since getRng on IE 7 & 8 is slow\n                    if (!editor.getBody().getElementsByTagName('hr').length) {\n                        return;\n                    }\n                    if (selection.isCollapsed() && selection.getRng().startOffset === 0) {\n                        const node = selection.getNode();\n                        const previousSibling = node.previousSibling;\n                        if (node.nodeName === 'HR') {\n                            dom.remove(node);\n                            e.preventDefault();\n                            return;\n                        }\n                        if (previousSibling && previousSibling.nodeName && previousSibling.nodeName.toLowerCase() === 'hr') {\n                            dom.remove(previousSibling);\n                            e.preventDefault();\n                        }\n                    }\n                }\n            });\n        };\n        /**\n         * Firefox 3.x has an issue where the body element won't get proper focus if you click out\n         * side it's rectangle.\n         */\n        const focusBody = () => {\n            // Fix for a focus bug in FF 3.x where the body element\n            // wouldn't get proper focus if the user clicked on the HTML element\n            if (!Range.prototype.getClientRects) { // Detect getClientRects got introduced in FF 4\n                editor.on('mousedown', (e) => {\n                    if (!isDefaultPrevented(e) && e.target.nodeName === 'HTML') {\n                        const body = editor.getBody();\n                        // Blur the body it's focused but not correctly focused\n                        body.blur();\n                        // Refocus the body after a little while\n                        Delay.setEditorTimeout(editor, () => {\n                            body.focus();\n                        });\n                    }\n                });\n            }\n        };\n        /**\n         * WebKit has a bug where it isn't possible to select image, hr or anchor elements\n         * by clicking on them so we need to fake that.\n         */\n        const selectControlElements = () => {\n            const visualAidsAnchorClass = getVisualAidsAnchorClass(editor);\n            editor.on('click', (e) => {\n                const target = e.target;\n                // Workaround for bug, http://bugs.webkit.org/show_bug.cgi?id=12250\n                // WebKit can't even do simple things like selecting an image\n                // Needs to be the setBaseAndExtend or it will fail to select floated images\n                if (/^(IMG|HR)$/.test(target.nodeName) && dom.isEditable(target)) {\n                    e.preventDefault();\n                    editor.selection.select(target);\n                    editor.nodeChanged();\n                }\n                if (target.nodeName === 'A' && dom.hasClass(target, visualAidsAnchorClass) && target.childNodes.length === 0 && dom.isEditable(target.parentNode)) {\n                    e.preventDefault();\n                    selection.select(target);\n                }\n            });\n        };\n        /**\n         * Fixes a Gecko a selection bug where if there is a floating image\n         * more details here: https://bugzilla.mozilla.org/show_bug.cgi?id=1959606\n         */\n        const fixFirefoxImageSelection = () => {\n            const isEditableImage = (node) => node.nodeName === 'IMG' && editor.dom.isEditable(node);\n            editor.on('mousedown', (e) => {\n                lift2(Optional.from(e.clientX), Optional.from(e.clientY), (clientX, clientY) => {\n                    const caretPos = editor.getDoc().caretPositionFromPoint(clientX, clientY);\n                    const img = caretPos?.offsetNode?.childNodes[caretPos.offset - (caretPos.offset > 0 ? 1 : 0)] || caretPos?.offsetNode;\n                    if (isNonNullable(img) && isEditableImage(img)) {\n                        const rect = img.getBoundingClientRect();\n                        e.preventDefault();\n                        if (!editor.hasFocus()) {\n                            editor.focus();\n                        }\n                        editor.selection.select(img);\n                        if (e.clientX < rect.left || e.clientY < rect.top) {\n                            editor.selection.collapse(true);\n                        }\n                        else if (e.clientX > rect.right || e.clientY > rect.bottom) {\n                            editor.selection.collapse(false);\n                        }\n                    }\n                });\n            });\n        };\n        /**\n         * Fixes a Gecko bug where the style attribute gets added to the wrong element when deleting between two block elements.\n         *\n         * Fixes do backspace/delete on this:\n         * <p>bla[ck</p><p style=\"color:red\">r]ed</p>\n         *\n         * Would become:\n         * <p>bla|ed</p>\n         *\n         * Instead of:\n         * <p style=\"color:red\">bla|ed</p>\n         */\n        const removeStylesWhenDeletingAcrossBlockElements = () => {\n            const getAttributeApplyFunction = () => {\n                const template = dom.getAttribs(selection.getStart().cloneNode(false));\n                return () => {\n                    const target = selection.getStart();\n                    if (target !== editor.getBody()) {\n                        dom.setAttrib(target, 'style', null);\n                        each(template, (attr) => {\n                            target.setAttributeNode(attr.cloneNode(true));\n                        });\n                    }\n                };\n            };\n            const isSelectionAcrossElements = () => {\n                return !selection.isCollapsed() &&\n                    dom.getParent(selection.getStart(), dom.isBlock) !== dom.getParent(selection.getEnd(), dom.isBlock);\n            };\n            editor.on('keypress', (e) => {\n                let applyAttributes;\n                if (!isDefaultPrevented(e) && (e.keyCode === 8 || e.keyCode === 46) && isSelectionAcrossElements()) {\n                    applyAttributes = getAttributeApplyFunction();\n                    editor.getDoc().execCommand('delete', false);\n                    applyAttributes();\n                    e.preventDefault();\n                    return false;\n                }\n                else {\n                    return true;\n                }\n            });\n            dom.bind(editor.getDoc(), 'cut', (e) => {\n                if (!isDefaultPrevented(e) && isSelectionAcrossElements()) {\n                    const applyAttributes = getAttributeApplyFunction();\n                    Delay.setEditorTimeout(editor, () => {\n                        applyAttributes();\n                    });\n                }\n            });\n        };\n        /**\n         * Backspacing into a table behaves differently depending upon browser type.\n         * Therefore, disable Backspace when cursor immediately follows a table.\n         */\n        const disableBackspaceIntoATable = () => {\n            editor.on('keydown', (e) => {\n                if (!isDefaultPrevented(e) && e.keyCode === BACKSPACE) {\n                    if (selection.isCollapsed() && selection.getRng().startOffset === 0) {\n                        const previousSibling = selection.getNode().previousSibling;\n                        if (previousSibling && previousSibling.nodeName && previousSibling.nodeName.toLowerCase() === 'table') {\n                            e.preventDefault();\n                            return false;\n                        }\n                    }\n                }\n                return true;\n            });\n        };\n        /**\n         * Removes a blockquote when backspace is pressed at the beginning of it.\n         *\n         * For example:\n         * <blockquote><p>|x</p></blockquote>\n         *\n         * Becomes:\n         * <p>|x</p>\n         */\n        const removeBlockQuoteOnBackSpace = () => {\n            // Add block quote deletion handler\n            editor.on('keydown', (e) => {\n                if (isDefaultPrevented(e) || e.keyCode !== VK.BACKSPACE) {\n                    return;\n                }\n                let rng = selection.getRng();\n                const container = rng.startContainer;\n                const offset = rng.startOffset;\n                const root = dom.getRoot();\n                let parent = container;\n                if (!rng.collapsed || offset !== 0) {\n                    return;\n                }\n                while (parent.parentNode && parent.parentNode.firstChild === parent && parent.parentNode !== root) {\n                    parent = parent.parentNode;\n                }\n                // Is the cursor at the beginning of a blockquote?\n                if (parent.nodeName === 'BLOCKQUOTE') {\n                    // Remove the blockquote\n                    editor.formatter.toggle('blockquote', undefined, parent);\n                    // Move the caret to the beginning of container\n                    rng = dom.createRng();\n                    rng.setStart(container, 0);\n                    rng.setEnd(container, 0);\n                    selection.setRng(rng);\n                }\n            });\n        };\n        /*\n         * Firefox-specific fix for arrow key navigation. In Firefox, users can't move the caret out of a\n         * `<figcaption>` element using the left and right arrow keys. This function handles those keystrokes\n         * to allow navigation to the previous/next sibling of the figure element.\n        */\n        const arrowInFigcaption = () => {\n            const isFigcaption = isTag('figcaption');\n            editor.on('keydown', (e) => {\n                if (e.keyCode === VK.LEFT || e.keyCode === VK.RIGHT) {\n                    const currentNode = SugarElement.fromDom(editor.selection.getNode());\n                    if (isFigcaption(currentNode) && editor.selection.isCollapsed()) {\n                        parent(currentNode).bind((parent) => {\n                            if (editor.selection.getRng().startOffset === 0 && e.keyCode === VK.LEFT) {\n                                return prevSibling(parent);\n                            }\n                            else if (editor.selection.getRng().endOffset === currentNode.dom.textContent?.length && e.keyCode === VK.RIGHT) {\n                                return nextSibling(parent);\n                            }\n                            else {\n                                return Optional.none();\n                            }\n                        }).each((targetSibling) => {\n                            editor.selection.setCursorLocation(targetSibling.dom, 0);\n                        });\n                    }\n                }\n            });\n        };\n        /**\n         * Sets various Gecko editing options on mouse down and before a execCommand to disable inline table editing that is broken etc.\n         */\n        const setGeckoEditingOptions = () => {\n            const setOpts = () => {\n                setEditorCommandState('StyleWithCSS', false);\n                setEditorCommandState('enableInlineTableEditing', false);\n                if (!getObjectResizing(editor)) {\n                    setEditorCommandState('enableObjectResizing', false);\n                }\n            };\n            if (!isReadOnly$1(editor)) {\n                editor.on('BeforeExecCommand mousedown', setOpts);\n            }\n        };\n        /**\n         * Fixes a gecko link bug, when a link is placed at the end of block elements there is\n         * no way to move the caret behind the link. This fix adds a bogus br element after the link.\n         *\n         * For example this:\n         * <p><b><a href=\"#\">x</a></b></p>\n         *\n         * Becomes this:\n         * <p><b><a href=\"#\">x</a></b><br></p>\n         */\n        const addBrAfterLastLinks = () => {\n            const fixLinks = () => {\n                each(dom.select('a:not([data-mce-block])'), (node) => {\n                    let parentNode = node.parentNode;\n                    const root = dom.getRoot();\n                    if (parentNode?.lastChild === node) {\n                        while (parentNode && !dom.isBlock(parentNode)) {\n                            if (parentNode.parentNode?.lastChild !== parentNode || parentNode === root) {\n                                return;\n                            }\n                            parentNode = parentNode.parentNode;\n                        }\n                        dom.add(parentNode, 'br', { 'data-mce-bogus': 1 });\n                    }\n                });\n            };\n            editor.on('SetContent ExecCommand', (e) => {\n                if (e.type === 'setcontent' || e.command === 'mceInsertLink') {\n                    fixLinks();\n                }\n            });\n        };\n        /**\n         * WebKit will produce DIV elements here and there by default. But since TinyMCE uses paragraphs by\n         * default we want to change that behavior.\n         */\n        const setDefaultBlockType = () => {\n            editor.on('init', () => {\n                setEditorCommandState('DefaultParagraphSeparator', getForcedRootBlock(editor));\n            });\n        };\n        const isAllContentSelected = (editor) => {\n            const body = editor.getBody();\n            const rng = editor.selection.getRng();\n            return rng.startContainer === rng.endContainer && rng.startContainer === body && rng.startOffset === 0 && rng.endOffset === body.childNodes.length;\n        };\n        /**\n         * Fixes selection issues where the caret can be placed between two inline elements like <b>a</b>|<b>b</b>\n         * this fix will lean the caret right into the closest inline element.\n         */\n        const normalizeSelection = () => {\n            // Normalize selection for example <b>a</b><i>|a</i> becomes <b>a|</b><i>a</i>\n            editor.on('keyup focusin mouseup', (e) => {\n                // no point to exclude Ctrl+A, since normalization will still run after Ctrl will be unpressed\n                // better exclude any key combinations with the modifiers to avoid double normalization\n                // (also addresses TINY-1130)\n                // The use of isAllContentSelected addresses TINY-4550\n                if (!VK.modifierPressed(e) && !isAllContentSelected(editor)) {\n                    selection.normalize();\n                }\n            }, true);\n        };\n        /**\n         * iOS has a bug where it's impossible to type if the document has a touchstart event\n         * bound and the user touches the document while having the on screen keyboard visible.\n         *\n         * The touch event moves the focus to the parent document while having the caret inside the iframe\n         * this fix moves the focus back into the iframe document.\n         */\n        const restoreFocusOnKeyDown = () => {\n            if (!editor.inline) {\n                editor.on('keydown', () => {\n                    if (document.activeElement === document.body) {\n                        editor.getWin().focus();\n                    }\n                });\n            }\n        };\n        /**\n         * IE 11 has an annoying issue where you can't move focus into the editor\n         * by clicking on the white area HTML element. We used to be able to fix this with\n         * the fixCaretSelectionOfDocumentElementOnIe fix. But since M$ removed the selection\n         * object it's not possible anymore. So we need to hack in a ungly CSS to force the\n         * body to be at least 150px. If the user clicks the HTML element out side this 150px region\n         * we simply move the focus into the first paragraph. Not ideal since you loose the\n         * positioning of the caret but goot enough for most cases.\n         */\n        const bodyHeight = () => {\n            if (!editor.inline) {\n                editor.contentStyles.push('body {min-height: 150px}');\n                editor.on('click', (e) => {\n                    let rng;\n                    if (e.target.nodeName === 'HTML') {\n                        // Need to store away non collapsed ranges since the focus call will mess that up see #7382\n                        rng = editor.selection.getRng();\n                        editor.getBody().focus();\n                        editor.selection.setRng(rng);\n                        editor.selection.normalize();\n                        editor.nodeChanged();\n                    }\n                });\n            }\n        };\n        /**\n         * Firefox on Mac OS will move the browser back to the previous page if you press CMD+Left arrow.\n         * You might then loose all your work so we need to block that behavior and replace it with our own.\n         */\n        const blockCmdArrowNavigation = () => {\n            if (isMac) {\n                editor.on('keydown', (e) => {\n                    if (VK.metaKeyPressed(e) && !e.shiftKey && (e.keyCode === 37 || e.keyCode === 39)) {\n                        e.preventDefault();\n                        // The modify component isn't part of the standard spec, so we need to add the type here\n                        const selection = editor.selection.getSel();\n                        selection.modify('move', e.keyCode === 37 ? 'backward' : 'forward', 'lineboundary');\n                    }\n                });\n            }\n        };\n        /**\n         * iOS 7.1 introduced two new bugs:\n         * 1) It's possible to open links within a contentEditable area by clicking on them.\n         * 2) If you hold down the finger it will display the link/image touch callout menu.\n         */\n        const tapLinksAndImages = () => {\n            editor.on('click', (e) => {\n                let elm = e.target;\n                do {\n                    if (elm.tagName === 'A') {\n                        e.preventDefault();\n                        return;\n                    }\n                } while ((elm = elm.parentNode));\n            });\n            editor.contentStyles.push('.mce-content-body {-webkit-touch-callout: none}');\n        };\n        /**\n         * iOS Safari and possible other browsers have a bug where it won't fire\n         * a click event when a contentEditable is focused. This function fakes click events\n         * by using touchstart/touchend and measuring the time and distance travelled.\n         */\n        /*\n        function touchClickEvent() {\n          editor.on('touchstart', function(e) {\n            var elm, time, startTouch, changedTouches;\n      \n            elm = e.target;\n            time = new Date().getTime();\n            changedTouches = e.changedTouches;\n      \n            if (!changedTouches || changedTouches.length > 1) {\n              return;\n            }\n      \n            startTouch = changedTouches[0];\n      \n            editor.once('touchend', function(e) {\n              var endTouch = e.changedTouches[0], args;\n      \n              if (new Date().getTime() - time > 500) {\n                return;\n              }\n      \n              if (Math.abs(startTouch.clientX - endTouch.clientX) > 5) {\n                return;\n              }\n      \n              if (Math.abs(startTouch.clientY - endTouch.clientY) > 5) {\n                return;\n              }\n      \n              args = {\n                target: elm\n              };\n      \n              each('pageX pageY clientX clientY screenX screenY'.split(' '), function(key) {\n                args[key] = endTouch[key];\n              });\n      \n              args = editor.dispatch('click', args);\n      \n              if (!args.isDefaultPrevented()) {\n                // iOS WebKit can't place the caret properly once\n                // you bind touch events so we need to do this manually\n                // TODO: Expand to the closest word? Touble tap still works.\n                editor.selection.placeCaretAt(endTouch.clientX, endTouch.clientY);\n                editor.nodeChanged();\n              }\n            });\n          });\n        }\n        */\n        /**\n         * WebKit has a bug where it will allow forms to be submitted if they are inside a contentEditable element.\n         * For example this: <form><button></form>\n         */\n        const blockFormSubmitInsideEditor = () => {\n            editor.on('init', () => {\n                editor.dom.bind(editor.getBody(), 'submit', (e) => {\n                    e.preventDefault();\n                });\n            });\n        };\n        /**\n         * Sometimes WebKit/Blink generates BR elements with the Apple-interchange-newline class.\n         *\n         * Scenario:\n         *  1) Create a table 2x2.\n         *  2) Select and copy cells A2-B2.\n         *  3) Paste and it will add BR element to table cell.\n         */\n        const removeAppleInterchangeBrs = () => {\n            parser.addNodeFilter('br', (nodes) => {\n                let i = nodes.length;\n                while (i--) {\n                    if (nodes[i].attr('class') === 'Apple-interchange-newline') {\n                        nodes[i].remove();\n                    }\n                }\n            });\n        };\n        /**\n         * this is needed to manage the difference between\n         * ```\n         * <li><span class=\"fake\">a</span><div>b</div></li>\n         * ```\n         * and\n         * ```\n         * <li><span class=\"fake\">a</span> <div>b</div></li>\n         * ```\n         * since if the indentation of the HTML has a new line it creates a fake child in the `li` that is an empty text\n         * it's check it trying to get the rects and if it can't it means that it's the false unwanted new line\n        **/\n        const isValidSibling = (el) => getClientRects([el.dom]).length > 0;\n        const firstBlockChildOrNewLine = (target) => child(target, (child) => isBr$6(child) || isElement$8(child) && get$8(child, 'display') === 'block');\n        const clickAfterEl = (clientX, clientY, el) => get$c(getClientRects([el.dom]), 0).exists((rect) => clientX >= rect.right && clientY >= rect.top && clientY <= rect.bottom);\n        const selectPos = (editor, e, pos) => {\n            e.preventDefault();\n            editor.selection.setRng(pos.toRange());\n            editor.focus();\n        };\n        /**\n         * In Chrome in a `LI` that contains a block element and where the first child is an inline element\n         * clicking on the right side of the first child the carret goes at the start of the element instead that in the end of it\n         * issue: https://issues.chromium.org/issues/40767343\n        **/\n        const fixInLISelection = () => {\n            editor.on('click', (e) => {\n                const target = SugarElement.fromDom(e.target);\n                if (isListItem$2(target)) {\n                    firstBlockChildOrNewLine(target).fold(() => {\n                        lastChild(target).each((lastChild) => {\n                            if (clickAfterEl(e.clientX, e.clientY, lastChild)) {\n                                lastPositionIn(target.dom).each((pos) => selectPos(editor, e, pos));\n                            }\n                        });\n                    }, (firstBlock) => {\n                        findLast(prevSiblings(firstBlock), isValidSibling).each((lastInlineBeforeBlock) => {\n                            if (clickAfterEl(e.clientX, e.clientY, lastInlineBeforeBlock)) {\n                                prevPosition(target.dom, CaretPosition(firstBlock.dom, 0)).each((pos) => selectPos(editor, e, pos));\n                            }\n                        });\n                    });\n                }\n            });\n        };\n        // No-op since Mozilla seems to have fixed the caret repaint issues\n        const refreshContentEditable = noop;\n        const isHidden = () => {\n            if (!isGecko || editor.removed) {\n                return false;\n            }\n            // Weird, wheres that cursor selection?\n            const sel = editor.selection.getSel();\n            return (!sel || !sel.rangeCount || sel.rangeCount === 0);\n        };\n        const setupRtc = () => {\n            if (isWebKit) {\n                documentElementEditingFocus();\n                selectControlElements();\n                blockFormSubmitInsideEditor();\n                selectAll();\n                if (isiOS) {\n                    restoreFocusOnKeyDown();\n                    bodyHeight();\n                    tapLinksAndImages();\n                }\n            }\n            if (isGecko) {\n                focusBody();\n                setGeckoEditingOptions();\n                blockCmdArrowNavigation();\n            }\n        };\n        const setup = () => {\n            // All browsers\n            removeBlockQuoteOnBackSpace();\n            emptyEditorWhenDeleting();\n            // Windows phone will return a range like [body, 0] on mousedown so\n            // it will always normalize to the wrong location\n            if (!Env.windowsPhone) {\n                normalizeSelection();\n            }\n            // WebKit\n            if (isWebKit) {\n                documentElementEditingFocus();\n                selectControlElements();\n                setDefaultBlockType();\n                blockFormSubmitInsideEditor();\n                disableBackspaceIntoATable();\n                removeAppleInterchangeBrs();\n                if (!isSafari) {\n                    fixInLISelection();\n                }\n                // touchClickEvent();\n                // iOS\n                if (isiOS) {\n                    restoreFocusOnKeyDown();\n                    bodyHeight();\n                    tapLinksAndImages();\n                }\n                else {\n                    selectAll();\n                }\n            }\n            // Gecko\n            if (isGecko) {\n                arrowInFigcaption();\n                fixFirefoxImageSelection();\n                removeHrOnBackspace();\n                focusBody();\n                removeStylesWhenDeletingAcrossBlockElements();\n                setGeckoEditingOptions();\n                addBrAfterLastLinks();\n                blockCmdArrowNavigation();\n                disableBackspaceIntoATable();\n            }\n        };\n        if (isRtc(editor)) {\n            setupRtc();\n        }\n        else {\n            setup();\n        }\n        return {\n            refreshContentEditable,\n            isHidden\n        };\n    };\n\n    class ComponentLoadError extends Error {\n        url;\n        constructor(message, url) {\n            super(message);\n            this.url = url;\n        }\n    }\n    const hostWindowComponentScripts = {};\n    const loadScript = (url, doc, extraAtts) => {\n        return new Promise((resolve, reject) => {\n            const script = SugarElement.fromTag('script');\n            setAll$1(script, {\n                type: 'text/javascript',\n                src: url,\n                ...extraAtts\n            });\n            const clean = () => {\n                remove$8(script);\n            };\n            bind$1(script, 'load', () => {\n                clean();\n                resolve();\n            });\n            bind$1(script, 'error', () => {\n                clean();\n                reject(new Error(`Failed to load script url: ${url}`));\n            });\n            append$1(getHead(doc), script);\n        });\n    };\n    const loadComponent = async (url, doc) => {\n        const extraAtts = ScriptLoader.ScriptLoader.getScriptAttributes(url);\n        await loadScript(url, doc, extraAtts).catch(() => Promise.reject(new ComponentLoadError(`Failed to load component url: ${url}`, url)));\n        return url;\n    };\n    const loadComponentsForInlineEditor = (componentUrls) => {\n        return mapToArray(componentUrls, (url, elementName) => {\n            return get$b(hostWindowComponentScripts, url).getOrThunk(() => {\n                // Only load the component if it hasn't already been loaded in inline mode the page might have already loaded it\n                if (isNullable(window.customElements.get(elementName))) {\n                    const loadPromise = loadComponent(url, getDocument());\n                    hostWindowComponentScripts[url] = loadPromise;\n                    return loadPromise;\n                }\n                else {\n                    return Promise.resolve(url);\n                }\n            }).catch((err) => {\n                // Remove from cache if the component failed to load so we can try again later\n                delete hostWindowComponentScripts[url];\n                return Promise.reject(err);\n            });\n        });\n    };\n    const loadComponentsForIframeEditor = (componentUrls, doc) => {\n        const urls = unique$1(values(componentUrls));\n        return map$3(urls, (url) => loadComponent(url, SugarElement.fromDom(doc)));\n    };\n    const loadComponentsForEditor = (editor) => {\n        const componentUrls = editor.schema.getComponentUrls();\n        if (editor.inline) {\n            return loadComponentsForInlineEditor(componentUrls);\n        }\n        else {\n            return loadComponentsForIframeEditor(componentUrls, editor.getDoc());\n        }\n    };\n    const loadComponentsAsync = async (editor) => {\n        const loadPromises = loadComponentsForEditor(editor);\n        const rejected = filter$5(await Promise.allSettled(loadPromises), (r) => r.status === 'rejected');\n        if (rejected.length > 0) {\n            each$e(rejected, (rejection) => {\n                if (rejection.reason instanceof ComponentLoadError) {\n                    const { url } = rejection.reason;\n                    componentLoadError(editor, url);\n                }\n            });\n        }\n    };\n    const loadComponents = (editor) => {\n        // Since we are handling the errors in the promise rejections inside the loadComponentsAsync we can ignore the errors here\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\n        loadComponentsAsync(editor);\n    };\n\n    const DOM$6 = DOMUtils.DOM;\n    const appendStyle = (editor, text) => {\n        const body = SugarElement.fromDom(editor.getBody());\n        const container = getStyleContainer(getRootNode(body));\n        const style = SugarElement.fromTag('style');\n        set$5(style, 'type', 'text/css');\n        append$1(style, SugarElement.fromText(text));\n        append$1(container, style);\n        editor.on('remove', () => {\n            remove$8(style);\n        });\n    };\n    const getRootName = (editor) => editor.inline ? editor.getElement().nodeName.toLowerCase() : undefined;\n    const removeUndefined = (obj) => filter$4(obj, (v) => isUndefined(v) === false);\n    const mkParserSettings = (editor) => {\n        const getOption = editor.options.get;\n        const blobCache = editor.editorUpload.blobCache;\n        return removeUndefined({\n            allow_conditional_comments: getOption('allow_conditional_comments'),\n            allow_html_data_urls: getOption('allow_html_data_urls'),\n            allow_svg_data_urls: getOption('allow_svg_data_urls'),\n            allow_html_in_named_anchor: getOption('allow_html_in_named_anchor'),\n            allow_script_urls: getOption('allow_script_urls'),\n            allow_html_in_comments: getOption('allow_html_in_comments'),\n            allow_mathml_annotation_encodings: getOption('allow_mathml_annotation_encodings'),\n            allow_unsafe_link_target: getOption('allow_unsafe_link_target'),\n            convert_unsafe_embeds: getOption('convert_unsafe_embeds'),\n            convert_fonts_to_spans: getOption('convert_fonts_to_spans'),\n            extended_mathml_attributes: getOption('extended_mathml_attributes'),\n            extended_mathml_elements: getOption('extended_mathml_elements'),\n            fix_list_elements: getOption('fix_list_elements'),\n            font_size_legacy_values: getOption('font_size_legacy_values'),\n            forced_root_block: getOption('forced_root_block'),\n            forced_root_block_attrs: getOption('forced_root_block_attrs'),\n            preserve_cdata: getOption('preserve_cdata'),\n            inline_styles: getOption('inline_styles'),\n            root_name: getRootName(editor),\n            sandbox_iframes: getOption('sandbox_iframes'),\n            sandbox_iframes_exclusions: getSandboxIframesExclusions(editor),\n            sanitize: getOption('xss_sanitization'),\n            validate: true,\n            blob_cache: blobCache,\n            document: editor.getDoc()\n        });\n    };\n    const mkSchemaSettings = (editor) => {\n        const getOption = editor.options.get;\n        return removeUndefined({\n            custom_elements: getOption('custom_elements'),\n            extended_valid_elements: getOption('extended_valid_elements'),\n            invalid_elements: getOption('invalid_elements'),\n            invalid_styles: getOption('invalid_styles'),\n            schema: getOption('schema'),\n            valid_children: getOption('valid_children'),\n            valid_classes: getOption('valid_classes'),\n            valid_elements: getOption('valid_elements'),\n            valid_styles: getOption('valid_styles'),\n            verify_html: getOption('verify_html'),\n            padd_empty_block_inline_children: getOption('format_empty_lines')\n        });\n    };\n    const mkSerializerSettings = (editor) => {\n        const getOption = editor.options.get;\n        return {\n            ...mkParserSettings(editor),\n            ...mkSchemaSettings(editor),\n            ...removeUndefined({\n                // SerializerSettings\n                remove_trailing_brs: getOption('remove_trailing_brs'),\n                pad_empty_with_br: getOption('pad_empty_with_br'),\n                url_converter: getOption('url_converter'),\n                url_converter_scope: getOption('url_converter_scope'),\n                // Writer settings\n                element_format: getOption('element_format'),\n                entities: getOption('entities'),\n                entity_encoding: getOption('entity_encoding'),\n                indent: getOption('indent'),\n                indent_after: getOption('indent_after'),\n                indent_before: getOption('indent_before')\n            })\n        };\n    };\n    const createParser = (editor) => {\n        const parser = DomParser(mkParserSettings(editor), editor.schema);\n        parser.addAttributeFilter('data-mce-src,data-mce-href,data-mce-style', (nodes, name) => {\n            for (let i = 0; i < nodes.length; i++) {\n                nodes[i].attr(name, null);\n            }\n        });\n        // Convert src and href into data-mce-src, data-mce-href and data-mce-style\n        parser.addAttributeFilter('src,href,style,tabindex', (nodes, name) => {\n            const dom = editor.dom;\n            const internalName = 'data-mce-' + name;\n            let i = nodes.length;\n            while (i--) {\n                const node = nodes[i];\n                let value = node.attr(name);\n                // Add internal attribute if we need to we don't on a refresh of the document\n                if (value && !node.attr(internalName)) {\n                    // Don't duplicate these since they won't get modified by any browser\n                    if (value.indexOf('data:') === 0 || value.indexOf('blob:') === 0) {\n                        continue;\n                    }\n                    if (name === 'style') {\n                        value = dom.serializeStyle(dom.parseStyle(value), node.name);\n                        if (!value.length) {\n                            value = null;\n                        }\n                        node.attr(internalName, value);\n                        node.attr(name, value);\n                    }\n                    else if (name === 'tabindex') {\n                        node.attr(internalName, value);\n                        node.attr(name, null);\n                    }\n                    else {\n                        node.attr(internalName, editor.convertURL(value, name, node.name));\n                    }\n                }\n            }\n        });\n        // Keep scripts from executing\n        parser.addNodeFilter('script', (nodes) => {\n            let i = nodes.length;\n            while (i--) {\n                const node = nodes[i];\n                const type = node.attr('type') || 'no/type';\n                if (type.indexOf('mce-') !== 0) {\n                    node.attr('type', 'mce-' + type);\n                }\n            }\n        });\n        if (shouldPreserveCData(editor)) {\n            parser.addNodeFilter('#cdata', (nodes) => {\n                let i = nodes.length;\n                while (i--) {\n                    const node = nodes[i];\n                    node.type = 8;\n                    node.name = '#comment';\n                    node.value = '[CDATA[' + editor.dom.encode(node.value ?? '') + ']]';\n                }\n            });\n        }\n        parser.addNodeFilter('p,h1,h2,h3,h4,h5,h6,div', (nodes) => {\n            let i = nodes.length;\n            const nonEmptyElements = editor.schema.getNonEmptyElements();\n            while (i--) {\n                const node = nodes[i];\n                if (node.isEmpty(nonEmptyElements) && node.getAll('br').length === 0) {\n                    node.append(new AstNode('br', 1));\n                }\n            }\n        });\n        return parser;\n    };\n    const autoFocus = (editor) => {\n        const autoFocus = getAutoFocus(editor);\n        if (autoFocus) {\n            Delay.setEditorTimeout(editor, () => {\n                let focusEditor;\n                if (autoFocus === true) {\n                    focusEditor = editor;\n                }\n                else {\n                    focusEditor = editor.editorManager.get(autoFocus);\n                }\n                if (focusEditor && !focusEditor.destroyed) {\n                    focusEditor.focus();\n                    focusEditor.selection.scrollIntoView();\n                }\n            }, 100);\n        }\n    };\n    const moveSelectionToFirstCaretPosition = (editor) => {\n        // If not inline and no useful selection, we want to set selection to the first valid cursor position\n        // We don't do this on inline because then it selects the editor container\n        // This must run AFTER editor.focus!\n        const root = editor.dom.getRoot();\n        if (!editor.inline && (!hasAnyRanges(editor) || editor.selection.getStart(true) === root)) {\n            firstPositionIn(root).each((pos) => {\n                const node = pos.getNode();\n                // If a table is the first caret pos, then walk down one more level\n                const caretPos = isTable$2(node) ? firstPositionIn(node).getOr(pos) : pos;\n                editor.selection.setRng(caretPos.toRange());\n            });\n        }\n    };\n    const initEditor = (editor) => {\n        editor.bindPendingEventDelegates();\n        editor.initialized = true;\n        fireInit(editor);\n        editor.focus(true);\n        moveSelectionToFirstCaretPosition(editor);\n        editor.nodeChanged({ initial: true });\n        const initInstanceCallback = getInitInstanceCallback(editor);\n        if (isFunction(initInstanceCallback)) {\n            initInstanceCallback.call(editor, editor);\n        }\n        autoFocus(editor);\n        if (isDisabled(editor)) {\n            toggleDisabled(editor, true);\n        }\n    };\n    const getStyleSheetLoader$1 = (editor) => editor.inline ? editor.ui.styleSheetLoader : editor.dom.styleSheetLoader;\n    const makeStylesheetLoadingPromises = (editor, css, framedFonts) => {\n        const { pass: bundledCss, fail: normalCss } = partition$2(css, (key) => tinymce.Resource.has(key));\n        const bundledPromises = bundledCss.map((key) => {\n            const css = tinymce.Resource.get(key);\n            if (isString(css)) {\n                return Promise.resolve(getStyleSheetLoader$1(editor).loadRawCss(key, css));\n            }\n            return Promise.resolve();\n        });\n        const promises = [...bundledPromises,\n            getStyleSheetLoader$1(editor).loadAll(normalCss),\n        ];\n        if (editor.inline) {\n            return promises;\n        }\n        else {\n            return promises.concat([\n                editor.ui.styleSheetLoader.loadAll(framedFonts)\n            ]);\n        }\n    };\n    const loadContentCss = (editor) => {\n        const styleSheetLoader = getStyleSheetLoader$1(editor);\n        const fontCss = getFontCss(editor);\n        const css = editor.contentCSS;\n        const removeCss = () => {\n            styleSheetLoader.unloadAll(css);\n            if (!editor.inline) {\n                editor.ui.styleSheetLoader.unloadAll(fontCss);\n            }\n        };\n        const loaded = () => {\n            if (editor.removed) {\n                removeCss();\n            }\n            else {\n                editor.on('remove', removeCss);\n            }\n        };\n        // Add editor specific CSS styles\n        if (editor.contentStyles.length > 0) {\n            let contentCssText = '';\n            Tools.each(editor.contentStyles, (style) => {\n                contentCssText += style + '\\r\\n';\n            });\n            editor.dom.addStyle(contentCssText);\n        }\n        // Load all stylesheets\n        const allStylesheets = Promise.all(makeStylesheetLoadingPromises(editor, css, fontCss)).then(loaded).catch(loaded);\n        // Append specified content CSS last\n        const contentStyle = getContentStyle(editor);\n        if (contentStyle) {\n            appendStyle(editor, contentStyle);\n        }\n        return allStylesheets;\n    };\n    const preInit = (editor) => {\n        const doc = editor.getDoc(), body = editor.getBody();\n        firePreInit(editor);\n        if (!shouldBrowserSpellcheck(editor)) {\n            doc.body.spellcheck = false; // Gecko\n            DOM$6.setAttrib(body, 'spellcheck', 'false');\n        }\n        editor.quirks = Quirks(editor);\n        firePostRender(editor);\n        const directionality = getDirectionality(editor);\n        if (directionality !== undefined) {\n            body.dir = directionality;\n        }\n        const protect = getProtect(editor);\n        if (protect) {\n            registerProtectedHtmlFilters(editor, protect);\n        }\n        editor.on('SetContent', () => {\n            editor.addVisual(editor.getBody());\n        });\n        editor.on('compositionstart compositionend', (e) => {\n            editor.composing = e.type === 'compositionstart';\n        });\n    };\n    const loadInitialContent = (editor) => {\n        if (!isRtc(editor)) {\n            editor.load({ initial: true, format: 'html' });\n        }\n        editor.startContent = editor.getContent({ format: 'raw' });\n    };\n    const initEditorWithInitialContent = (editor) => {\n        if (editor.removed !== true) {\n            loadInitialContent(editor);\n            initEditor(editor);\n        }\n    };\n    const startProgress = (editor) => {\n        let canceled = false;\n        const progressTimeout = setTimeout(() => {\n            if (!canceled) {\n                editor.setProgressState(true);\n            }\n        }, 500);\n        return () => {\n            clearTimeout(progressTimeout);\n            canceled = true;\n            editor.setProgressState(false);\n        };\n    };\n    const contentBodyLoaded = (editor) => {\n        const targetElm = editor.getElement();\n        let doc = editor.getDoc();\n        if (editor.inline) {\n            DOM$6.addClass(targetElm, 'mce-content-body');\n            editor.contentDocument = doc = document;\n            editor.contentWindow = window;\n            editor.bodyElement = targetElm;\n            editor.contentAreaContainer = targetElm;\n        }\n        const contentLanguage = getContentLanguage(editor);\n        if (contentLanguage) {\n            const langTarget = editor.inline ? targetElm : doc.documentElement;\n            DOM$6.setAttrib(langTarget, 'lang', contentLanguage);\n        }\n        // It will not steal focus while setting contentEditable\n        const body = editor.getBody();\n        // disabled isn't valid on all body elements, so need to cast here\n        // TODO: See if we actually need to disable/re-enable here\n        body.disabled = true;\n        editor.readonly = isReadOnly$1(editor);\n        editor._editableRoot = hasEditableRoot$1(editor);\n        if (!isDisabled$1(editor) && editor.hasEditableRoot()) {\n            if (editor.inline && DOM$6.getStyle(body, 'position', true) === 'static') {\n                body.style.position = 'relative';\n            }\n            body.contentEditable = 'true';\n        }\n        body.disabled = false;\n        editor.editorUpload = EditorUpload(editor);\n        editor.schema = Schema(mkSchemaSettings(editor));\n        editor.dom = DOMUtils(doc, {\n            keep_values: true,\n            // Note: Don't bind here, as the binding is handled via the `url_converter_scope`\n            // eslint-disable-next-line @typescript-eslint/unbound-method\n            url_converter: editor.convertURL,\n            url_converter_scope: editor,\n            update_styles: true,\n            root_element: editor.inline ? editor.getBody() : null,\n            collect: editor.inline,\n            schema: editor.schema,\n            contentCssCors: shouldUseContentCssCors(editor),\n            referrerPolicy: getReferrerPolicy(editor),\n            crossOrigin: getCrossOrigin(editor),\n            onSetAttrib: (e) => {\n                editor.dispatch('SetAttrib', e);\n            },\n        });\n        editor.parser = createParser(editor);\n        editor.serializer = DomSerializer(mkSerializerSettings(editor), editor);\n        editor.selection = EditorSelection(editor.dom, editor.getWin(), editor.serializer, editor);\n        editor.annotator = Annotator(editor);\n        editor.formatter = Formatter(editor);\n        editor.undoManager = UndoManager(editor);\n        editor._nodeChangeDispatcher = new NodeChange(editor);\n        editor._selectionOverrides = SelectionOverrides(editor);\n        setup$b(editor);\n        setup$u(editor);\n        setup$6(editor);\n        if (shouldAllowNonEditable(editor)) {\n            setup$s(editor);\n        }\n        if (!isRtc(editor)) {\n            setup$5(editor);\n            setup$1(editor);\n        }\n        const caret = setup$g(editor);\n        setup$v(editor, caret);\n        setup$t(editor);\n        setup$w(editor);\n        setup$7(editor, caret);\n        const setupRtcThunk = setup$z(editor);\n        preInit(editor);\n        loadComponents(editor);\n        setupRtcThunk.fold(() => {\n            const cancelProgress = startProgress(editor);\n            // eslint-disable-next-line @typescript-eslint/no-floating-promises\n            loadContentCss(editor).then(() => {\n                initEditorWithInitialContent(editor);\n                cancelProgress();\n            });\n        }, (setupRtc) => {\n            editor.setProgressState(true);\n            // eslint-disable-next-line @typescript-eslint/no-floating-promises\n            loadContentCss(editor).then(() => {\n                setupRtc().then((_rtcMode) => {\n                    editor.setProgressState(false);\n                    initEditorWithInitialContent(editor);\n                    bindEvents(editor);\n                }, (err) => {\n                    editor.notificationManager.open({ type: 'error', text: String(err) });\n                    initEditorWithInitialContent(editor);\n                    bindEvents(editor);\n                });\n            });\n        });\n    };\n\n    const DOM$5 = DOMUtils.DOM;\n    const createIframeElement = (id, title, customAttrs, tabindex) => {\n        const iframe = SugarElement.fromTag('iframe');\n        // This can also be explicitly set by customAttrs, so do this first\n        tabindex.each((t) => set$5(iframe, 'tabindex', t));\n        setAll$1(iframe, customAttrs);\n        setAll$1(iframe, {\n            id: id + '_ifr',\n            frameBorder: '0',\n            allowTransparency: 'true',\n            title\n        });\n        add$2(iframe, 'tox-edit-area__iframe');\n        return iframe;\n    };\n    const getIframeHtml = (editor) => {\n        let iframeHTML = getDocType(editor) + '<html><head>';\n        // We only need to override paths if we have to\n        // IE has a bug where it remove site absolute urls to relative ones if this is specified\n        if (getDocumentBaseUrl(editor) !== editor.editorManager.documentBaseURL) {\n            iframeHTML += '<base href=\"' + editor.documentBaseURI.getURI() + '\" />';\n        }\n        iframeHTML += '<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />';\n        const bodyId = getBodyId(editor);\n        const bodyClass = getBodyClass(editor);\n        const translatedAriaText = editor.translate(getIframeAriaText(editor));\n        // TINYMCE-13100: VoiceOver does not read the iframe title, so the body is labelled\n        // for it. VoiceOver only runs on macOS, and elsewhere the title is announced.\n        // The role goes with it, since aria-label on a generic role is a violation.\n        const iframeBodyAriaAttrs = Env.os.isMacOS() || Env.os.isiOS() ? `role=\"textbox\" aria-multiline=\"true\" aria-label=\"${translatedAriaText}\"` : '';\n        if (getContentSecurityPolicy(editor)) {\n            iframeHTML += '<meta http-equiv=\"Content-Security-Policy\" content=\"' + getContentSecurityPolicy(editor) + '\" />';\n        }\n        iframeHTML += '</head>' +\n            `<body id=\"${bodyId}\" class=\"mce-content-body ${bodyClass}\" data-id=\"${editor.id}\" ${iframeBodyAriaAttrs}>` +\n            '<br>' +\n            '</body></html>';\n        return iframeHTML;\n    };\n    const createIframe = (editor, boxInfo) => {\n        const iframeTitle = getIframeAriaText(editor);\n        const translatedTitle = editor.translate(iframeTitle);\n        const tabindex = getOpt(SugarElement.fromDom(editor.getElement()), 'tabindex').bind(toInt);\n        const ifr = createIframeElement(editor.id, translatedTitle, getIframeAttrs(editor), tabindex).dom;\n        ifr.onload = () => {\n            ifr.onload = null;\n            editor.dispatch('load');\n        };\n        editor.contentAreaContainer = boxInfo.iframeContainer;\n        editor.iframeElement = ifr;\n        editor.iframeHTML = getIframeHtml(editor);\n        DOM$5.add(boxInfo.iframeContainer, ifr);\n    };\n    const setupIframeBody = (editor) => {\n        // Setup iframe body\n        const iframe = editor.iframeElement;\n        const ready = () => {\n            // Set the content document, now that it is available\n            editor.contentDocument = iframe.contentDocument;\n            // Continue to init the editor\n            contentBodyLoaded(editor);\n        };\n        // TINY-8916: Firefox has a bug in its srcdoc implementation that prevents cookies being sent so unfortunately we need\n        // to fallback to legacy APIs to load the iframe content. See https://bugzilla.mozilla.org/show_bug.cgi?id=1741489\n        if (shouldUseDocumentWrite(editor) || Env.browser.isFirefox()) {\n            const doc = editor.getDoc();\n            doc.open();\n            doc.write(editor.iframeHTML);\n            doc.close();\n            ready();\n        }\n        else {\n            const binder = bind$1(SugarElement.fromDom(iframe), 'load', () => {\n                binder.unbind();\n                ready();\n            });\n            iframe.srcdoc = editor.iframeHTML;\n        }\n    };\n    const init$1 = (editor, boxInfo) => {\n        createIframe(editor, boxInfo);\n        if (boxInfo.editorContainer) {\n            boxInfo.editorContainer.style.display = editor.orgDisplay;\n            editor.hidden = DOM$5.isHidden(boxInfo.editorContainer);\n        }\n        editor.getElement().style.display = 'none';\n        DOM$5.setAttrib(editor.id, 'aria-hidden', 'true');\n        // Restore visibility on target element\n        editor.getElement().style.visibility = editor.orgVisibility;\n        setupIframeBody(editor);\n    };\n\n    const DOM$4 = DOMUtils.DOM;\n    const initPlugin = (editor, initializedPlugins, plugin) => {\n        const Plugin = PluginManager.get(plugin);\n        const pluginUrl = PluginManager.urls[plugin] || editor.editorManager.documentBaseURL.replace(/\\/$/, '');\n        plugin = Tools.trim(plugin);\n        if (Plugin && Tools.inArray(initializedPlugins, plugin) === -1) {\n            if (editor.plugins[plugin]) {\n                return;\n            }\n            try {\n                const pluginInstance = Plugin(editor, pluginUrl) || {};\n                editor.plugins[plugin] = pluginInstance;\n                if (isFunction(pluginInstance.init)) {\n                    pluginInstance.init(editor, pluginUrl);\n                    initializedPlugins.push(plugin);\n                }\n            }\n            catch (e) {\n                pluginInitError(editor, plugin, e);\n            }\n        }\n    };\n    const initTooltipClosing = (editor) => {\n        const closeTooltipsListener = (event) => {\n            if (event.keyCode === VK.ESC && !event.defaultPrevented) {\n                each$e(editor.editorManager.get(), (ed) => {\n                    if (fireCloseTooltips(ed).isDefaultPrevented()) {\n                        event.preventDefault();\n                    }\n                });\n            }\n        };\n        document.addEventListener('keyup', closeTooltipsListener);\n        if (!editor.inline) {\n            editor.on('keyup', closeTooltipsListener);\n        }\n        editor.on('remove', () => {\n            document.removeEventListener('keyup', closeTooltipsListener);\n            if (!editor.inline) {\n                editor.off('keyup', closeTooltipsListener);\n            }\n        });\n    };\n    const trimLegacyPrefix = (name) => {\n        // Themes and plugins can be prefixed with - to prevent them from being lazy loaded\n        return name.replace(/^\\-/, '');\n    };\n    const initPlugins = (editor) => {\n        const initializedPlugins = [];\n        each$e(getPlugins(editor), (name) => {\n            initPlugin(editor, initializedPlugins, trimLegacyPrefix(name));\n        });\n    };\n    const initIcons = (editor) => {\n        const iconPackName = Tools.trim(getIconPackName(editor));\n        const currentIcons = editor.ui.registry.getAll().icons;\n        const loadIcons = {\n            ...IconManager.get('default').icons,\n            ...IconManager.get(iconPackName).icons\n        };\n        each$d(loadIcons, (svgData, icon) => {\n            // Don't override an icon registered manually\n            if (!has$2(currentIcons, icon)) {\n                editor.ui.registry.addIcon(icon, svgData);\n            }\n        });\n    };\n    const initTheme = (editor) => {\n        const theme = getTheme(editor);\n        if (isString(theme)) {\n            const Theme = ThemeManager.get(theme);\n            editor.theme = Theme(editor, ThemeManager.urls[theme]) || {};\n            if (isFunction(editor.theme.init)) {\n                editor.theme.init(editor, ThemeManager.urls[theme] || editor.editorManager.documentBaseURL.replace(/\\/$/, ''));\n            }\n        }\n        else {\n            // Theme set to false or null doesn't produce a theme api\n            editor.theme = {};\n        }\n    };\n    const initModel = (editor) => {\n        const model = getModel(editor);\n        const Model = ModelManager.get(model);\n        editor.model = Model(editor, ModelManager.urls[model]);\n    };\n    const initLicenseKeyManager = (editor) => {\n        LicenseKeyManagerLoader.init(editor);\n    };\n    const renderFromLoadedTheme = (editor) => {\n        // Render UI\n        const render = editor.theme.renderUI;\n        return render ? render() : renderThemeFalse(editor);\n    };\n    const renderFromThemeFunc = (editor) => {\n        const elm = editor.getElement();\n        const theme = getTheme(editor);\n        const info = theme(editor, elm);\n        if (info.editorContainer.nodeType) {\n            info.editorContainer.id = info.editorContainer.id || editor.id + '_parent';\n        }\n        if (info.iframeContainer && info.iframeContainer.nodeType) {\n            info.iframeContainer.id = info.iframeContainer.id || editor.id + '_iframecontainer';\n        }\n        info.height = info.iframeHeight ? info.iframeHeight : elm.offsetHeight;\n        return info;\n    };\n    const createThemeFalseResult = (element, iframe) => {\n        return {\n            editorContainer: element,\n            iframeContainer: iframe,\n            api: {}\n        };\n    };\n    const renderThemeFalseIframe = (targetElement) => {\n        const iframeContainer = DOM$4.create('div');\n        DOM$4.insertAfter(iframeContainer, targetElement);\n        return createThemeFalseResult(iframeContainer, iframeContainer);\n    };\n    const renderThemeFalse = (editor) => {\n        const targetElement = editor.getElement();\n        return editor.inline ? createThemeFalseResult(null) : renderThemeFalseIframe(targetElement);\n    };\n    const renderThemeUi = (editor) => {\n        const elm = editor.getElement();\n        editor.orgDisplay = elm.style.display;\n        if (isString(getTheme(editor))) {\n            return renderFromLoadedTheme(editor);\n        }\n        else if (isFunction(getTheme(editor))) {\n            return renderFromThemeFunc(editor);\n        }\n        else {\n            return renderThemeFalse(editor);\n        }\n    };\n    const augmentEditorUiApi = (editor, api) => {\n        const uiApiFacade = {\n            show: Optional.from(api.show).getOr(noop),\n            hide: Optional.from(api.hide).getOr(noop),\n            isEnabled: Optional.from(api.isEnabled).getOr(always),\n            setEnabled: (state) => {\n                const shouldSkip = state && (editor.mode.get() === 'readonly' || isDisabled(editor));\n                if (!shouldSkip) {\n                    Optional.from(api.setEnabled).each((f) => f(state));\n                }\n            }\n        };\n        editor.ui = { ...editor.ui, ...uiApiFacade };\n    };\n    const init = async (editor) => {\n        editor.dispatch('ScriptsLoaded');\n        initIcons(editor);\n        initTooltipClosing(editor);\n        initTheme(editor);\n        initModel(editor);\n        initLicenseKeyManager(editor);\n        initPlugins(editor);\n        const renderInfo = await renderThemeUi(editor);\n        augmentEditorUiApi(editor, Optional.from(renderInfo.api).getOr({}));\n        editor.editorContainer = renderInfo.editorContainer;\n        appendContentCssFromSettings(editor);\n        if (editor.inline) {\n            contentBodyLoaded(editor);\n        }\n        else {\n            init$1(editor, {\n                editorContainer: renderInfo.editorContainer,\n                iframeContainer: renderInfo.iframeContainer\n            });\n        }\n    };\n\n    const DOM$3 = DOMUtils.DOM;\n    const hasSkipLoadPrefix = (name) => name.charAt(0) === '-';\n    const loadLanguage = (scriptLoader, editor) => {\n        const languageCode = getLanguageCode(editor);\n        const languageUrl = getLanguageUrl(editor);\n        if (!I18n.hasCode(languageCode) && languageCode !== 'en') {\n            const url = isNotEmpty(languageUrl) ? languageUrl : `${editor.editorManager.baseURL}/langs/${languageCode}.js`;\n            scriptLoader.add(url).catch(() => {\n                languageLoadError(editor, url, languageCode);\n            });\n        }\n    };\n    const loadTheme = (editor, suffix) => {\n        const theme = getTheme(editor);\n        if (isString(theme) && !hasSkipLoadPrefix(theme) && !has$2(ThemeManager.urls, theme)) {\n            const themeUrl = getThemeUrl(editor);\n            const url = themeUrl ? editor.documentBaseURI.toAbsolute(themeUrl) : `themes/${theme}/theme${suffix}.js`;\n            ThemeManager.load(theme, url).catch(() => {\n                themeLoadError(editor, url, theme);\n            });\n        }\n    };\n    const loadModel = (editor, suffix) => {\n        // Special case the 'wait for model' code if a plugin is responsible for it\n        // as the plugin will provide the instance instead\n        const model = getModel(editor);\n        if (model !== 'plugin' && !has$2(ModelManager.urls, model)) {\n            const modelUrl = getModelUrl(editor);\n            const url = isString(modelUrl) ? editor.documentBaseURI.toAbsolute(modelUrl) : `models/${model}/model${suffix}.js`;\n            ModelManager.load(model, url).catch(() => {\n                modelLoadError(editor, url, model);\n            });\n        }\n    };\n    const loadLicenseKeyManager = (editor, suffix) => {\n        LicenseKeyManagerLoader.load(editor, suffix);\n    };\n    const getIconsUrlMetaFromUrl = (editor) => Optional.from(getIconsUrl(editor))\n        .filter(isNotEmpty)\n        .map((url) => ({\n        url,\n        name: Optional.none()\n    }));\n    const getIconsUrlMetaFromName = (editor, name, suffix) => Optional.from(name)\n        .filter((name) => isNotEmpty(name) && !IconManager.has(name))\n        .map((name) => ({\n        url: `${editor.editorManager.baseURL}/icons/${name}/icons${suffix}.js`,\n        name: Optional.some(name)\n    }));\n    const loadIcons = (scriptLoader, editor, suffix) => {\n        const defaultIconsUrl = getIconsUrlMetaFromName(editor, 'default', suffix);\n        const customIconsUrl = getIconsUrlMetaFromUrl(editor).orThunk(() => getIconsUrlMetaFromName(editor, getIconPackName(editor), ''));\n        each$e(cat([defaultIconsUrl, customIconsUrl]), (urlMeta) => {\n            scriptLoader.add(urlMeta.url).catch(() => {\n                iconsLoadError(editor, urlMeta.url, urlMeta.name.getOrUndefined());\n            });\n        });\n    };\n    const loadPlugins = (editor, suffix) => {\n        const loadPlugin = (name, url) => {\n            // If licensekeymanager is included in the plugins list\n            // or through external_plugins, skip it\n            if (name === 'licensekeymanager') {\n                return;\n            }\n            PluginManager.load(name, url).catch(() => {\n                pluginLoadError(editor, url, name);\n            });\n        };\n        each$d(getExternalPlugins$1(editor), (url, name) => {\n            loadPlugin(name, url);\n            editor.options.set('plugins', getPlugins(editor).concat(name));\n        });\n        each$e(getPlugins(editor), (plugin) => {\n            plugin = Tools.trim(plugin);\n            if (plugin && !PluginManager.urls[plugin] && !hasSkipLoadPrefix(plugin)) {\n                loadPlugin(plugin, `plugins/${plugin}/plugin${suffix}.js`);\n            }\n        });\n    };\n    const isThemeLoaded = (editor) => {\n        const theme = getTheme(editor);\n        return !isString(theme) || isNonNullable(ThemeManager.get(theme));\n    };\n    const isModelLoaded = (editor) => {\n        const model = getModel(editor);\n        return isNonNullable(ModelManager.get(model));\n    };\n    const loadScripts = (editor, suffix) => {\n        const scriptLoader = ScriptLoader.ScriptLoader;\n        const initEditor = () => {\n            // If the editor has been destroyed or the theme, model haven't loaded then\n            // don't continue to load the editor\n            if (!editor.removed &&\n                isThemeLoaded(editor) &&\n                isModelLoaded(editor)) {\n                // eslint-disable-next-line @typescript-eslint/no-floating-promises\n                init(editor);\n            }\n        };\n        loadTheme(editor, suffix);\n        loadModel(editor, suffix);\n        loadLicenseKeyManager(editor, suffix);\n        loadLanguage(scriptLoader, editor);\n        loadIcons(scriptLoader, editor, suffix);\n        loadPlugins(editor, suffix);\n        scriptLoader.loadQueue().then(initEditor, initEditor);\n    };\n    const getStyleSheetLoader = (element, editor) => instance.forElement(element, {\n        contentCssCors: hasContentCssCors(editor),\n        referrerPolicy: getReferrerPolicy(editor)\n    });\n    const render = (editor) => {\n        const id = editor.id;\n        // The user might have bundled multiple language packs so we need to switch the active code to the user specified language\n        I18n.setCode(getLanguageCode(editor));\n        const readyHandler = () => {\n            DOM$3.unbind(window, 'ready', readyHandler);\n            editor.render();\n        };\n        // Page is not loaded yet, wait for it\n        if (!EventUtils.Event.domLoaded) {\n            DOM$3.bind(window, 'ready', readyHandler);\n            return;\n        }\n        // Element not found, then skip initialization\n        if (!editor.getElement()) {\n            return;\n        }\n        // snapshot the element we're going to render to\n        const element = SugarElement.fromDom(editor.getElement());\n        const snapshot = clone$4(element);\n        editor.on('remove', () => {\n            eachr(element.dom.attributes, (attr) => remove$9(element, attr.name));\n            setAll$1(element, snapshot);\n        });\n        editor.ui.styleSheetLoader = getStyleSheetLoader(element, editor);\n        // Hide target element early to prevent content flashing\n        if (!isInline$2(editor)) {\n            editor.orgVisibility = editor.getElement().style.visibility;\n            editor.getElement().style.visibility = 'hidden';\n        }\n        else {\n            editor.inline = true;\n        }\n        // TODO: Investigate the types here\n        const form = editor.getElement().form || DOM$3.getParent(id, 'form');\n        if (form) {\n            editor.formElement = form;\n            // Add hidden input for non input elements inside form elements\n            if (hasHiddenInput(editor) && !isTextareaOrInput(editor.getElement())) {\n                DOM$3.insertAfter(DOM$3.create('input', { type: 'hidden', name: id }), id);\n                editor.hasHiddenInput = true;\n            }\n            // Pass submit/reset from form to editor instance\n            editor.formEventDelegate = (e) => {\n                editor.dispatch(e.type, e);\n            };\n            DOM$3.bind(form, 'submit reset', editor.formEventDelegate);\n            // Reset contents in editor when the form is reset\n            editor.on('reset', () => {\n                editor.resetContent();\n            });\n            // Check page uses id=\"submit\" or name=\"submit\" for it's submit button\n            if (shouldPatchSubmit(editor) && !form.submit.nodeType && !form.submit.length && !form._mceOldSubmit) {\n                form._mceOldSubmit = form.submit;\n                form.submit = () => {\n                    editor.editorManager.triggerSave();\n                    editor.setDirty(false);\n                    return form._mceOldSubmit(form);\n                };\n            }\n        }\n        editor.windowManager = WindowManager(editor);\n        editor.notificationManager = NotificationManager(editor);\n        if (isEncodingXml(editor)) {\n            editor.on('GetContent', (e) => {\n                if (e.save) {\n                    e.content = DOM$3.encode(e.content);\n                }\n            });\n        }\n        if (shouldAddFormSubmitTrigger(editor)) {\n            editor.on('submit', () => {\n                if (editor.initialized) {\n                    editor.save();\n                }\n            });\n        }\n        if (shouldAddUnloadTrigger(editor)) {\n            editor._beforeUnload = () => {\n                if (editor.initialized && !editor.destroyed && !editor.isHidden()) {\n                    editor.save({ format: 'raw', no_events: true, set_dirty: false });\n                }\n            };\n            editor.editorManager.on('BeforeUnload', editor._beforeUnload);\n        }\n        editor.editorManager.add(editor);\n        loadScripts(editor, editor.suffix);\n    };\n\n    const AvatarColors = [\n        '#E41B60', // Pink\n        '#AD1457', // Dark Pink\n        '#1939EC', // Indigo\n        '#001CB5', // Dark Indigo\n        '#648000', // Lime\n        '#465B00', // Dark Lime\n        '#006CE7', // Blue\n        '#0054B4', // Dark Blue\n        '#00838F', // Cyan\n        '#006064', // Dark Cyan\n        '#00866F', // Turquoise\n        '#004D40', // Dark Turquoise\n        '#51742F', // Green\n        '#385021', // Dark Green\n        '#CF4900', // Orange\n        '#A84600', // Dark Orange\n        '#CC0000', // Red\n        '#6A1B9A', // Dark Red\n        '#9C27B0', // Purple\n        '#6A00AB', // Dark Purple\n        '#3041BA', // Navy Blue\n        '#0A1877', // Dark Navy Blue\n        '#774433', // Brown\n        '#452B24', // Dark Brown\n        '#607D8B', // Blue Gray\n        '#455A64', // Dark Blue Gray\n    ];\n    const getFirstChar = (name) => {\n        if (Intl.Segmenter) {\n            const segmenter = new Intl.Segmenter();\n            const iterator = segmenter.segment(name)[Symbol.iterator]();\n            return `${iterator.next().value?.segment}`;\n        }\n        else {\n            return name.trim()[0];\n        }\n    };\n    /* For a given string returns integer between 0 and maxValue (inclusive).\n      This function is based on the djb2 hash algorithm reported by Dan Bernstein.\n      You can find more informations here: http://www.cse.yorku.ca/~oz/hash.html\n      The hashing algorithm is using bitwise operators to multiply by 32, and later to ensure a positive integer.\n      The result is then reduced to the range of 0 to maxValue using modulo operation.\n    */\n    const djb2Hash = (key, maxValue) => {\n        let hash = 5381;\n        for (let i = 0; i < key.length; i++) {\n            // eslint-disable-next-line no-bitwise\n            hash = ((hash << 5) + hash) + key.charCodeAt(i);\n        }\n        // eslint-disable-next-line no-bitwise\n        return (hash >>> 0) % (maxValue + 1);\n    };\n    const getColor = (id) => {\n        const colorIdx = djb2Hash(id ?? '', AvatarColors.length - 1);\n        return AvatarColors[colorIdx];\n    };\n    const generateAvatarSvg = (content, color, size) => {\n        const halfSize = size / 2;\n        return `<svg height=\"${size}\" width=\"${size}\" xmlns=\"http://www.w3.org/2000/svg\">` +\n            `<circle cx=\"${halfSize}\" cy=\"${halfSize}\" r=\"${halfSize}\" fill=\"${color}\"/>` +\n            `<text x=\"50%\" y=\"50%\" text-anchor=\"middle\" dominant-baseline=\"central\" fill=\"#FFF\" font-family=\"sans-serif\" font-size=\"${halfSize}\">` +\n            content +\n            `</text>` +\n            '</svg>';\n    };\n    /**\n     * Generates a data URL for an SVG avatar with the specified content, color, and size.\n     *\n     * @param content The text content to display in the avatar (typically a single character)\n     * @param color The background color of the avatar (hex color string)\n     * @param size The size of the avatar in pixels (width and height)\n     * @returns A data URL string containing the encoded SVG avatar\n     */\n    const generateAvatar = (content, color, size) => 'data:image/svg+xml,' + encodeURIComponent(generateAvatarSvg(content, color, size));\n    /**\n     * Generates a user avatar based on the user's name and ID.\n     *\n     * @param user User object containing id and name properties\n     * @param user.id Unique identifier used to determine the avatar color\n     * @param user.name User's name, first character will be displayed in the avatar\n     * @param config Configuration object for the avatar\n     * @param config.size The size of the avatar in pixels (defaults to 36)\n     * @returns A data URL string containing the encoded SVG avatar\n     */\n    const generateUserAvatar = (user, config = { size: 36 }) => generateAvatar(getFirstChar(user.name), getColor(user.id), config.size);\n\n    const userSchema = objOf([\n        required('id'),\n        optionString('name'),\n        optionString('avatar'),\n        option$1('custom')\n    ]);\n    const objectCat = (obj) => {\n        const result = {};\n        each$d(obj, (value, key) => {\n            value.each((v) => {\n                result[key] = v;\n            });\n        });\n        return result;\n    };\n    const validateResponse = (items) => {\n        if (!Array.isArray(items)) {\n            throw new Error('fetch_users must return an array');\n        }\n        const results = map$3(items, (item) => asRaw('Invalid user object', userSchema, item));\n        const { errors, values } = partition$1(results);\n        if (errors.length > 0) {\n            const formattedErrors = map$3(errors, (error, idx) => `User at index ${idx}: ${formatError(error)}`);\n            // eslint-disable-next-line no-console\n            console.warn('User validation errors:\\n' + formattedErrors.join('\\n'));\n        }\n        return map$3(values, (user) => {\n            const { id, name, avatar, ...rest } = user;\n            return {\n                id,\n                name: name.getOr(id),\n                avatar: avatar.getOr(generateUserAvatar({ id, name: name.getOr(id) })),\n                ...objectCat(rest),\n            };\n        });\n    };\n    const UserLookup = (editor) => {\n        const userCache = new Map();\n        const pendingResolvers = new Map();\n        const lookup = (userId) => Optional.from(userCache.get(userId));\n        const store = (user, userId) => {\n            userCache.set(userId, user);\n        };\n        const finallyReject = (userId, error) => Optional\n            .from(pendingResolvers.get(userId))\n            .each(({ reject }) => {\n            reject(error);\n            pendingResolvers.delete(userId);\n        });\n        const finallyResolve = (userId, user) => Optional\n            .from(pendingResolvers.get(userId))\n            .each(({ resolve }) => {\n            resolve(user);\n            pendingResolvers.delete(userId);\n        });\n        const fetchUsers = (userIds) => {\n            const fetchUsersFn = getFetchUsers(editor);\n            if (!Array.isArray(userIds)) {\n                return {};\n            }\n            else if (!fetchUsersFn) {\n                return mapToObject(userIds, (userId) => Promise.resolve({\n                    id: userId,\n                    name: userId,\n                    avatar: generateUserAvatar({ id: userId, name: userId })\n                }));\n            }\n            const uncachedIds = unique$1(filter$5((userIds), (userId) => !lookup(userId).isSome()));\n            each$e(uncachedIds, (userId) => {\n                const newPromise = new Promise((resolve, reject) => {\n                    pendingResolvers.set(userId, { resolve, reject });\n                });\n                store(newPromise, userId);\n            });\n            if (uncachedIds.length > 0) {\n                fetchUsersFn(uncachedIds)\n                    .then(validateResponse)\n                    .then((users) => {\n                    const foundUserIds = new Set(map$3(users, (user) => user.id));\n                    // Resolve found users\n                    each$e(users, (user) => finallyResolve(user.id, user));\n                    // Reject promises for users not found in the response\n                    each$e(uncachedIds, (userId) => {\n                        if (!foundUserIds.has(userId)) {\n                            finallyReject(userId, new Error(`User ${userId} not found`));\n                        }\n                    });\n                })\n                    .catch((error) => {\n                    each$e(uncachedIds, (userId) => finallyReject(userId, error instanceof Error ? error : new Error('Network error')));\n                });\n            }\n            return foldl(userIds, (acc, userId) => {\n                acc[userId] = lookup(userId).getOr(Promise.resolve({\n                    id: userId,\n                    name: userId,\n                    avatar: generateUserAvatar({ id: userId, name: userId })\n                }));\n                return acc;\n            }, {});\n        };\n        const userId = getUserId(editor);\n        return Object.freeze({\n            userId,\n            fetchUsers,\n        });\n    };\n    const createUserLookup = (editor) => UserLookup(editor);\n\n    const setEditableRoot = (editor, state) => {\n        if (editor._editableRoot !== state) {\n            editor._editableRoot = state;\n            if (!isDisabled(editor)) {\n                editor.getBody().contentEditable = String(editor.hasEditableRoot());\n                editor.nodeChanged();\n            }\n            fireEditableRootStateChange(editor, state);\n        }\n    };\n    const hasEditableRoot = (editor) => editor._editableRoot;\n\n    const sectionResult = (sections, settings) => ({\n        sections: constant(sections),\n        options: constant(settings)\n    });\n    const deviceDetection = detect$1().deviceType;\n    const isPhone = deviceDetection.isPhone();\n    const isTablet = deviceDetection.isTablet();\n    const normalizePlugins = (plugins) => {\n        if (isNullable(plugins)) {\n            return [];\n        }\n        else {\n            const pluginNames = isArray$1(plugins) ? plugins : plugins.split(/[ ,]/);\n            const trimmedPlugins = map$3(pluginNames, trim$4);\n            return filter$5(trimmedPlugins, isNotEmpty);\n        }\n    };\n    const extractSections = (keys, options) => {\n        const result = bifilter(options, (value, key) => {\n            return contains$2(keys, key);\n        });\n        return sectionResult(result.t, result.f);\n    };\n    const getSection = (sectionResult, name, defaults = {}) => {\n        const sections = sectionResult.sections();\n        const sectionOptions = get$b(sections, name).getOr({});\n        return Tools.extend({}, defaults, sectionOptions);\n    };\n    const hasSection = (sectionResult, name) => {\n        return has$2(sectionResult.sections(), name);\n    };\n    const getSectionConfig = (sectionResult, name) => {\n        return hasSection(sectionResult, name) ? sectionResult.sections()[name] : {};\n    };\n    // Get a list of options to override any desktop options\n    const getMobileOverrideOptions = (mobileOptions, isPhone) => {\n        const defaultMobileOptions = {\n            table_grid: false, // Table grid relies on hover, which isn't available for touch devices so use the dialog instead\n            object_resizing: false, // No nice way to do object resizing at this stage\n            resize: false, // Editor resize doesn't make sense on mobile\n            toolbar_mode: get$b(mobileOptions, 'toolbar_mode').getOr('scrolling'), // Use the default side-scrolling toolbar for tablets/phones\n            toolbar_sticky: false // Only enable sticky toolbar on desktop by default\n        };\n        const defaultPhoneOptions = {\n            menubar: false // Phones don't have a lot of screen space, so disable the menubar\n        };\n        return {\n            ...defaultMobileOptions,\n            ...isPhone ? defaultPhoneOptions : {}\n        };\n    };\n    const getExternalPlugins = (overrideOptions, options) => {\n        const userDefinedExternalPlugins = options.external_plugins ?? {};\n        if (overrideOptions && overrideOptions.external_plugins) {\n            return Tools.extend({}, overrideOptions.external_plugins, userDefinedExternalPlugins);\n        }\n        else {\n            return userDefinedExternalPlugins;\n        }\n    };\n    const combinePlugins = (forcedPlugins, plugins) => [\n        ...normalizePlugins(forcedPlugins),\n        ...normalizePlugins(plugins)\n    ];\n    const getPlatformPlugins = (isMobileDevice, sectionResult, desktopPlugins, mobilePlugins) => {\n        // is a mobile device with any mobile options\n        if (isMobileDevice && hasSection(sectionResult, 'mobile')) {\n            return mobilePlugins;\n            // is desktop\n        }\n        else {\n            return desktopPlugins;\n        }\n    };\n    const processPlugins = (isMobileDevice, sectionResult, defaultOverrideOptions, options) => {\n        const forcedPlugins = normalizePlugins(defaultOverrideOptions.forced_plugins);\n        const desktopPlugins = normalizePlugins(options.plugins);\n        const mobileConfig = getSectionConfig(sectionResult, 'mobile');\n        const mobilePlugins = mobileConfig.plugins ? normalizePlugins(mobileConfig.plugins) : desktopPlugins;\n        const platformPlugins = getPlatformPlugins(isMobileDevice, sectionResult, desktopPlugins, mobilePlugins);\n        const combinedPlugins = combinePlugins(forcedPlugins, platformPlugins);\n        return Tools.extend(options, {\n            forced_plugins: forcedPlugins,\n            plugins: combinedPlugins\n        });\n    };\n    const isOnMobile = (isMobileDevice, sectionResult) => {\n        return isMobileDevice && hasSection(sectionResult, 'mobile');\n    };\n    const combineOptions = (isMobileDevice, isPhone, defaultOptions, defaultOverrideOptions, options) => {\n        // Use mobile mode by default on phones, so patch in the mobile override options\n        const deviceOverrideOptions = isMobileDevice ? { mobile: getMobileOverrideOptions(options.mobile ?? {}, isPhone) } : {};\n        const sectionResult = extractSections(['mobile'], deepMerge(deviceOverrideOptions, options));\n        const extendedOptions = Tools.extend(\n        // Default options\n        defaultOptions, \n        // tinymce.overrideOptions options\n        defaultOverrideOptions, \n        // User options\n        sectionResult.options(), \n        // Sections\n        isOnMobile(isMobileDevice, sectionResult) ? getSection(sectionResult, 'mobile') : {}, \n        // Forced options\n        {\n            external_plugins: getExternalPlugins(defaultOverrideOptions, sectionResult.options())\n        });\n        return processPlugins(isMobileDevice, sectionResult, defaultOverrideOptions, extendedOptions);\n    };\n    const normalizeOptions = (defaultOverrideOptions, options) => {\n        const copiedOptions = merge$1(options);\n        return combineOptions(isPhone || isTablet, isPhone, copiedOptions, defaultOverrideOptions, copiedOptions);\n    };\n\n    const addVisual = (editor, elm) => addVisual$1(editor, elm);\n\n    const registerExecCommands$2 = (editor) => {\n        const toggleFormat = (name, value) => {\n            editor.formatter.toggle(name, value);\n            editor.nodeChanged();\n        };\n        const toggleAlign = (align) => () => {\n            // Remove all other alignments first\n            each$e('left,center,right,justify'.split(','), (name) => {\n                if (align !== name) {\n                    editor.formatter.remove('align' + name);\n                }\n            });\n            if (align !== 'none') {\n                toggleFormat('align' + align);\n            }\n        };\n        editor.editorCommands.addCommands({\n            JustifyLeft: toggleAlign('left'),\n            JustifyCenter: toggleAlign('center'),\n            JustifyRight: toggleAlign('right'),\n            JustifyFull: toggleAlign('justify'),\n            JustifyNone: toggleAlign('none')\n        });\n    };\n    const registerQueryStateCommands = (editor) => {\n        const alignStates = (name) => () => {\n            const selection = editor.selection;\n            const nodes = selection.isCollapsed() ? [editor.dom.getParent(selection.getNode(), editor.dom.isBlock)] : selection.getSelectedBlocks();\n            return exists(nodes, (node) => isNonNullable(editor.formatter.matchNode(node, name)));\n        };\n        editor.editorCommands.addCommands({\n            JustifyLeft: alignStates('alignleft'),\n            JustifyCenter: alignStates('aligncenter'),\n            JustifyRight: alignStates('alignright'),\n            JustifyFull: alignStates('alignjustify')\n        }, 'state');\n    };\n    const registerCommands$a = (editor) => {\n        registerExecCommands$2(editor);\n        registerQueryStateCommands(editor);\n    };\n\n    const registerCommands$9 = (editor) => {\n        editor.editorCommands.addCommands({\n            'Cut,Copy,Paste': (command) => {\n                const doc = editor.getDoc();\n                let failed;\n                // Try executing the native command\n                try {\n                    doc.execCommand(command);\n                }\n                catch {\n                    // Command failed\n                    failed = true;\n                }\n                // Chrome reports the paste command as supported however older IE:s will return false for cut/paste\n                if (command === 'paste' && !doc.queryCommandEnabled(command)) {\n                    failed = true;\n                }\n                // Present alert message about clipboard access not being available\n                if (failed || !doc.queryCommandSupported(command)) {\n                    let msg = editor.translate(`Your browser doesn't support direct access to the clipboard. ` +\n                        'Please use the Ctrl+X/C/V keyboard shortcuts instead.');\n                    if (Env.os.isMacOS() || Env.os.isiOS()) {\n                        msg = msg.replace(/Ctrl\\+/g, '\\u2318+');\n                    }\n                    editor.notificationManager.open({ text: msg, type: 'error' });\n                }\n            }\n        });\n    };\n\n    const trimOrPadLeftRight = (dom, rng, html, schema) => {\n        const root = SugarElement.fromDom(dom.getRoot());\n        // Adjust the start if it needs to be an nbsp\n        if (needsToBeNbspLeft(root, CaretPosition.fromRangeStart(rng), schema)) {\n            html = html.replace(/^ /, '&nbsp;');\n        }\n        else {\n            html = html.replace(/^&nbsp;/, ' ');\n        }\n        // Adjust the end if it needs to be an nbsp\n        if (needsToBeNbspRight(root, CaretPosition.fromRangeEnd(rng), schema)) {\n            html = html.replace(/(&nbsp;| )(<br( \\/)>)?$/, '&nbsp;');\n        }\n        else {\n            html = html.replace(/&nbsp;(<br( \\/)?>)?$/, ' ');\n        }\n        return html;\n    };\n\n    const processValue$1 = (value) => {\n        if (typeof value !== 'string') {\n            const details = Tools.extend({\n                paste: value.paste,\n                data: {\n                    paste: value.paste\n                }\n            }, value);\n            return {\n                content: value.content,\n                details\n            };\n        }\n        return {\n            content: value,\n            details: {}\n        };\n    };\n    const trimOrPad = (editor, value) => {\n        const selection = editor.selection;\n        const dom = editor.dom;\n        // Check for whitespace before/after value\n        if (/^ | $/.test(value)) {\n            return trimOrPadLeftRight(dom, selection.getRng(), value, editor.schema);\n        }\n        else {\n            return value;\n        }\n    };\n    const insertAtCaret = (editor, value) => {\n        if (editor.selection.isEditable()) {\n            const { content, details } = processValue$1(value);\n            preProcessSetContent(editor, { ...details, content: trimOrPad(editor, content), format: 'html', set: false, selection: true }).each((args) => {\n                const insertedContent = insertContent$1(editor, args.content, details);\n                postProcessSetContent(editor, insertedContent, args);\n                editor.addVisual();\n            });\n        }\n    };\n\n    const registerCommands$8 = (editor) => {\n        editor.editorCommands.addCommands({\n            mceCleanup: () => {\n                const bm = editor.selection.getBookmark();\n                editor.setContent(editor.getContent());\n                editor.selection.moveToBookmark(bm);\n            },\n            insertImage: (_command, _ui, value) => {\n                insertAtCaret(editor, editor.dom.createHTML('img', { src: value }));\n            },\n            insertHorizontalRule: () => {\n                editor.execCommand('mceInsertContent', false, '<hr>');\n            },\n            insertText: (_command, _ui, value) => {\n                insertAtCaret(editor, editor.dom.encode(value));\n            },\n            insertHTML: (_command, _ui, value) => {\n                insertAtCaret(editor, value);\n            },\n            mceInsertContent: (_command, _ui, value) => {\n                insertAtCaret(editor, value);\n            },\n            mceSetContent: (_command, _ui, value) => {\n                editor.setContent(value);\n            },\n            mceReplaceContent: (_command, _ui, value) => {\n                editor.execCommand('mceInsertContent', false, value.replace(/\\{\\$selection\\}/g, editor.selection.getContent({ format: 'text' })));\n            },\n            mceNewDocument: () => {\n                editor.setContent(getNewDocumentContent(editor));\n            }\n        });\n    };\n\n    const legacyPropNames = {\n        'font-size': 'size',\n        'font-family': 'face'\n    };\n    const isFont = isTag('font');\n    const getSpecifiedFontProp = (propName, rootElm, elm) => {\n        const getProperty = (elm) => getRaw$1(elm, propName).orThunk(() => {\n            if (isFont(elm)) {\n                return get$b(legacyPropNames, propName).bind((legacyPropName) => getOpt(elm, legacyPropName));\n            }\n            else {\n                return Optional.none();\n            }\n        });\n        const isRoot = (elm) => eq(SugarElement.fromDom(rootElm), elm);\n        return closest$1(SugarElement.fromDom(elm), (elm) => getProperty(elm), isRoot);\n    };\n    const normalizeFontFamily = (fontFamily) => \n    // 'Font name', Font -> Font name,Font\n    fontFamily.replace(/[\\'\\\"\\\\]/g, '').replace(/,\\s+/g, ',');\n    const getComputedFontProp = (propName, elm) => Optional.from(DOMUtils.DOM.getStyle(elm, propName, true));\n    const getFontProp = (propName) => (rootElm, elm) => Optional.from(elm)\n        .map(SugarElement.fromDom)\n        .filter(isElement$8)\n        .bind((element) => getSpecifiedFontProp(propName, rootElm, element.dom)\n        .or(getComputedFontProp(propName, element.dom)))\n        .getOr('');\n    const getFontSize = getFontProp('font-size');\n    const getFontFamily = compose(normalizeFontFamily, getFontProp('font-family'));\n\n    const findFirstCaretElement = (editor) => firstPositionIn(editor.getBody())\n        .bind((caret) => {\n        const container = caret.container();\n        return Optional.from(isText$b(container) ? container.parentNode : container);\n    });\n    const getCaretElement = (editor) => Optional.from(editor.selection.getRng())\n        .bind((rng) => {\n        const root = editor.getBody();\n        const atStartOfNode = rng.startContainer === root && rng.startOffset === 0;\n        return atStartOfNode ? Optional.none() : Optional.from(editor.selection.getStart(true));\n    });\n    const bindRange = (editor, binder) => getCaretElement(editor)\n        .orThunk(curry(findFirstCaretElement, editor))\n        .map(SugarElement.fromDom)\n        .filter(isElement$8)\n        .bind(binder);\n    const mapRange = (editor, mapper) => bindRange(editor, compose1(Optional.some, mapper));\n\n    const fromFontSizeNumber = (editor, value) => {\n        if (/^[0-9.]+$/.test(value)) {\n            const fontSizeNumber = parseInt(value, 10);\n            // Convert font size 1-7 to styles\n            if (fontSizeNumber >= 1 && fontSizeNumber <= 7) {\n                const fontSizes = getFontStyleValues(editor);\n                const fontClasses = getFontSizeClasses(editor);\n                if (fontClasses.length > 0) {\n                    return fontClasses[fontSizeNumber - 1] || value;\n                }\n                else {\n                    return fontSizes[fontSizeNumber - 1] || value;\n                }\n            }\n            else {\n                return value;\n            }\n        }\n        else {\n            return value;\n        }\n    };\n    const normalizeFontNames = (font) => {\n        const fonts = font.split(/\\s*,\\s*/);\n        return map$3(fonts, (font) => {\n            if (font.indexOf(' ') !== -1 && !(startsWith(font, '\"') || startsWith(font, `'`))) {\n                // TINY-3801: The font has spaces, so need to wrap with quotes as the browser sometimes automatically handles this, but not always\n                return `'${font}'`;\n            }\n            else {\n                return font;\n            }\n        }).join(',');\n    };\n    const fontNameAction = (editor, value) => {\n        const font = fromFontSizeNumber(editor, value);\n        editor.formatter.toggle('fontname', { value: normalizeFontNames(font) });\n        editor.nodeChanged();\n    };\n    const fontNameQuery = (editor) => mapRange(editor, (elm) => getFontFamily(editor.getBody(), elm.dom)).getOr('');\n    const fontSizeAction = (editor, value) => {\n        editor.formatter.toggle('fontsize', { value: fromFontSizeNumber(editor, value) });\n        editor.nodeChanged();\n    };\n    const fontSizeQuery = (editor) => mapRange(editor, (elm) => getFontSize(editor.getBody(), elm.dom)).getOr('');\n\n    const lineHeightQuery = (editor) => mapRange(editor, (elm) => {\n        const root = SugarElement.fromDom(editor.getBody());\n        const specifiedStyle = closest$1(elm, (elm) => getRaw$1(elm, 'line-height'), curry(eq, root));\n        const computedStyle = () => {\n            // Css.get returns computed values (in px), and parseFloat will strip any non-number suffix\n            const lineHeight = parseFloat(get$8(elm, 'line-height'));\n            const fontSize = parseFloat(get$8(elm, 'font-size'));\n            return String(lineHeight / fontSize);\n        };\n        return specifiedStyle.getOrThunk(computedStyle);\n    }).getOr('');\n    const lineHeightAction = (editor, lineHeight) => {\n        editor.formatter.toggle('lineheight', { value: String(lineHeight) });\n        editor.nodeChanged();\n    };\n\n    const registerExecCommands$1 = (editor) => {\n        const toggleFormat = (name, value) => {\n            editor.formatter.toggle(name, value);\n            editor.nodeChanged();\n        };\n        editor.editorCommands.addCommands({\n            'Bold,Italic,Underline,Strikethrough,Superscript,Subscript': (command) => {\n                toggleFormat(command);\n            },\n            'ForeColor,HiliteColor': (command, _ui, value) => {\n                toggleFormat(command, { value });\n            },\n            'BackColor': (_command, _ui, value) => {\n                toggleFormat('hilitecolor', { value });\n            },\n            'FontName': (_command, _ui, value) => {\n                fontNameAction(editor, value);\n            },\n            'FontSize': (_command, _ui, value) => {\n                fontSizeAction(editor, value);\n            },\n            'LineHeight': (_command, _ui, value) => {\n                lineHeightAction(editor, value);\n            },\n            'Lang': (command, _ui, lang) => {\n                toggleFormat(command, { value: lang.code, customValue: lang.customCode ?? null });\n            },\n            'RemoveFormat': (command) => {\n                editor.formatter.remove(command);\n            },\n            'mceBlockQuote': () => {\n                toggleFormat('blockquote');\n            },\n            'FormatBlock': (_command, _ui, value) => {\n                toggleFormat(isString(value) ? value : 'p');\n            },\n            'mceToggleFormat': (_command, _ui, value) => {\n                toggleFormat(value);\n            }\n        });\n    };\n    const registerQueryValueCommands = (editor) => {\n        const isFormatMatch = (name) => editor.formatter.match(name);\n        editor.editorCommands.addCommands({\n            'Bold,Italic,Underline,Strikethrough,Superscript,Subscript': (command) => isFormatMatch(command),\n            'mceBlockQuote': () => isFormatMatch('blockquote')\n        }, 'state');\n        editor.editorCommands.addQueryValueHandler('FontName', () => fontNameQuery(editor));\n        editor.editorCommands.addQueryValueHandler('FontSize', () => fontSizeQuery(editor));\n        editor.editorCommands.addQueryValueHandler('LineHeight', () => lineHeightQuery(editor));\n    };\n    const registerCommands$7 = (editor) => {\n        registerExecCommands$1(editor);\n        registerQueryValueCommands(editor);\n    };\n\n    const registerCommands$6 = (editor) => {\n        editor.editorCommands.addCommands({\n            mceAddUndoLevel: () => {\n                editor.undoManager.add();\n            },\n            mceEndUndoLevel: () => {\n                editor.undoManager.add();\n            },\n            Undo: () => {\n                editor.undoManager.undo();\n            },\n            Redo: () => {\n                editor.undoManager.redo();\n            }\n        });\n    };\n\n    const registerCommands$5 = (editor) => {\n        editor.editorCommands.addCommands({\n            Indent: () => {\n                indent(editor);\n            },\n            Outdent: () => {\n                outdent(editor);\n            },\n        });\n        editor.editorCommands.addCommands({\n            Outdent: () => canOutdent(editor),\n            Indent: () => canIndent(editor),\n        }, 'state');\n    };\n\n    const registerCommands$4 = (editor) => {\n        const applyLinkToSelection = (_command, _ui, value) => {\n            if (editor.mode.isReadOnly()) {\n                return;\n            }\n            const linkDetails = isString(value) ? { href: value } : value;\n            const anchor = editor.dom.getParent(editor.selection.getNode(), 'a');\n            if (isObject(linkDetails) && isString(linkDetails.href)) {\n                // Spaces are never valid in URLs and it's a very common mistake for people to make so we fix it here.\n                linkDetails.href = linkDetails.href.replace(/ /g, '%20').replace(/&amp;/g, '&');\n                // Remove existing links if there could be child links or that the href isn't specified\n                if (!anchor || !linkDetails.href) {\n                    editor.formatter.remove('link');\n                }\n                // Apply new link to selection\n                if (linkDetails.href) {\n                    editor.formatter.apply('link', linkDetails, anchor);\n                }\n            }\n        };\n        editor.editorCommands.addCommands({\n            unlink: () => {\n                if (editor.selection.isEditable()) {\n                    if (editor.selection.isCollapsed()) {\n                        const elm = editor.dom.getParent(editor.selection.getStart(), 'a');\n                        if (elm) {\n                            editor.dom.remove(elm, true);\n                        }\n                        return;\n                    }\n                    editor.formatter.remove('link');\n                }\n            },\n            mceInsertLink: applyLinkToSelection,\n            createLink: applyLinkToSelection\n        });\n    };\n\n    const getTopParentBlock = (editor, node, root, container) => {\n        const dom = editor.dom;\n        const selector = (node) => dom.isBlock(node) && node.parentElement === root;\n        const topParentBlock = selector(node) ? node : dom.getParent(container, selector, root);\n        return Optional.from(topParentBlock).map(SugarElement.fromDom);\n    };\n    const insert = (editor, before) => {\n        if (editor.mode.isReadOnly()) {\n            return;\n        }\n        const dom = editor.dom;\n        const rng = editor.selection.getRng();\n        const node = before ? editor.selection.getStart() : editor.selection.getEnd();\n        const container = before ? rng.startContainer : rng.endContainer;\n        const root = getEditableRoot(dom, container);\n        if (!root || !root.isContentEditable) {\n            return;\n        }\n        const insertFn = before ? before$4 : after$4;\n        const newBlockName = getForcedRootBlock(editor);\n        getTopParentBlock(editor, node, root, container).each((parentBlock) => {\n            const newBlock = createNewBlock(editor, container, parentBlock.dom, root, false, newBlockName);\n            insertFn(parentBlock, SugarElement.fromDom(newBlock));\n            editor.selection.setCursorLocation(newBlock, 0);\n            editor.dispatch('NewBlock', { newBlock });\n            fireInputEvent(editor, 'insertParagraph');\n        });\n    };\n    const insertBefore = (editor) => insert(editor, true);\n    const insertAfter = (editor) => insert(editor, false);\n\n    const registerCommands$3 = (editor) => {\n        editor.editorCommands.addCommands({\n            InsertNewBlockBefore: () => {\n                insertBefore(editor);\n            },\n            InsertNewBlockAfter: () => {\n                insertAfter(editor);\n            },\n        });\n    };\n\n    const registerCommands$2 = (editor) => {\n        editor.editorCommands.addCommands({\n            insertParagraph: () => {\n                insertBreak(blockbreak, editor);\n            },\n            mceInsertNewLine: (_command, _ui, value) => {\n                insert$1(editor, value);\n            },\n            InsertLineBreak: (_command, _ui, _value) => {\n                insertBreak(linebreak, editor);\n            }\n        });\n    };\n\n    const registerCommands$1 = (editor) => {\n        editor.editorCommands.addCommands({\n            mceSelectNodeDepth: (_command, _ui, value) => {\n                let counter = 0;\n                editor.dom.getParent(editor.selection.getNode(), (node) => {\n                    if (isElement$7(node) && counter++ === value) {\n                        editor.selection.select(node);\n                        return false;\n                    }\n                    else {\n                        return true;\n                    }\n                }, editor.getBody());\n            },\n            mceSelectNode: (_command, _ui, value) => {\n                editor.selection.select(value);\n            },\n            selectAll: () => {\n                const editingHost = editor.dom.getParent(editor.selection.getStart(), isContentEditableTrue$3);\n                if (editingHost) {\n                    const rng = editor.dom.createRng();\n                    rng.selectNodeContents(editingHost);\n                    editor.selection.setRng(rng);\n                }\n            }\n        });\n    };\n\n    const registerExecCommands = (editor) => {\n        editor.editorCommands.addCommands({\n            mceRemoveNode: (_command, _ui, value) => {\n                const node = value ?? editor.selection.getNode();\n                // Make sure that the body node isn't removed\n                if (node !== editor.getBody()) {\n                    const bm = editor.selection.getBookmark();\n                    editor.dom.remove(node, true);\n                    editor.selection.moveToBookmark(bm);\n                }\n            },\n            mcePrint: () => {\n                editor.getWin().print();\n            },\n            mceFocus: (_command, _ui, value) => {\n                focus(editor, value);\n            },\n            mceToggleVisualAid: () => {\n                editor.hasVisual = !editor.hasVisual;\n                editor.addVisual();\n            }\n        });\n    };\n    const registerCommands = (editor) => {\n        registerCommands$a(editor);\n        registerCommands$9(editor);\n        registerCommands$6(editor);\n        registerCommands$1(editor);\n        registerCommands$8(editor);\n        registerCommands$4(editor);\n        registerCommands$5(editor);\n        registerCommands$3(editor);\n        registerCommands$2(editor);\n        registerCommands$7(editor);\n        registerExecCommands(editor);\n    };\n\n    // List of commands that are considered safe even if the editor has no selection when the iframe is hidden in Firefox. See TINY-9210 for details.\n    const selectionSafeCommands = ['toggleview'];\n    const isSelectionSafeCommand = (command) => contains$2(selectionSafeCommands, command.toLowerCase());\n    class EditorCommands {\n        editor;\n        commands = { state: {}, exec: {}, value: {} };\n        constructor(editor) {\n            this.editor = editor;\n        }\n        /**\n         * Executes a registered command on the current instance. A list of available commands can be found in\n         * the tinymce command identifiers documentation.\n         *\n         * @method execCommand\n         * @param {String} command Command name to execute, for example mceLink or Bold.\n         * @param {Boolean} ui Specifies if a UI (dialog) should be presented or not.\n         * @param {Object/Array/String/Number/Boolean} value Optional command value, this can be anything.\n         * @param {Object} args Optional arguments object.\n         * @return {Boolean} true or false if the command was supported or not.\n         */\n        execCommand(command, ui = false, value, args) {\n            const editor = this.editor;\n            const lowerCaseCommand = command.toLowerCase();\n            const skipFocus = args?.skip_focus;\n            if (editor.removed) {\n                return false;\n            }\n            if (lowerCaseCommand !== 'mcefocus') {\n                if (!/^(mceAddUndoLevel|mceEndUndoLevel|toggleview)$/i.test(lowerCaseCommand) && !skipFocus) {\n                    editor.focus();\n                }\n                else {\n                    restore(editor);\n                }\n            }\n            const eventArgs = editor.dispatch('BeforeExecCommand', { command, ui, value });\n            if (eventArgs.isDefaultPrevented()) {\n                return false;\n            }\n            const func = this.commands.exec[lowerCaseCommand];\n            if (isFunction(func)) {\n                func(lowerCaseCommand, ui, value, args);\n                editor.dispatch('ExecCommand', { command, ui, value, args });\n                return true;\n            }\n            return false;\n        }\n        /**\n         * Queries the current state for a command. For example: If the current selection is \"bold\".\n         *\n         * @method queryCommandState\n         * @param {String} command Command to check the state of.\n         * @return {Boolean} true/false - For example: If the selected contents is bold or not.\n         */\n        queryCommandState(command) {\n            if ((!isSelectionSafeCommand(command) && this.editor.quirks.isHidden()) || this.editor.removed) {\n                return false;\n            }\n            const lowerCaseCommand = command.toLowerCase();\n            const func = this.commands.state[lowerCaseCommand];\n            if (isFunction(func)) {\n                return func(lowerCaseCommand);\n            }\n            return false;\n        }\n        /**\n         * Returns a command specific value, for example the current font size.\n         *\n         * @method queryCommandValue\n         * @param {String} command Command to query value from.\n         * @return {String} Command value, for example the current font size or an empty string (`\"\"`) if the query command is not found.\n         */\n        queryCommandValue(command) {\n            if ((!isSelectionSafeCommand(command) && this.editor.quirks.isHidden()) || this.editor.removed) {\n                return '';\n            }\n            const lowerCaseCommand = command.toLowerCase();\n            const func = this.commands.value[lowerCaseCommand];\n            if (isFunction(func)) {\n                return func(lowerCaseCommand);\n            }\n            return '';\n        }\n        addCommands(commandList, type = 'exec') {\n            const commands = this.commands;\n            each$d(commandList, (callback, command) => {\n                each$e(command.toLowerCase().split(','), (command) => {\n                    commands[type][command] = callback;\n                });\n            });\n        }\n        addCommand(command, callback, scope) {\n            const lowerCaseCommand = command.toLowerCase();\n            this.commands.exec[lowerCaseCommand] = (_command, ui, value, args) => callback.call(scope ?? this.editor, ui, value, args);\n        }\n        /**\n         * Removes a command from the command collection.\n         *\n         * @method removeCommand\n         * @param {String} command Command name to remove.\n         * @param {String} type Optional type to remove, defaults to removing all types. Can be 'exec', 'state', 'value', or omitted for all.\n         */\n        removeCommand(command, type) {\n            const lowerCaseCommand = command.toLowerCase();\n            if (type) {\n                delete this.commands[type][lowerCaseCommand];\n            }\n            else {\n                delete this.commands.exec[lowerCaseCommand];\n                delete this.commands.state[lowerCaseCommand];\n                delete this.commands.value[lowerCaseCommand];\n            }\n        }\n        /**\n         * Returns true/false if the command is supported or not.\n         *\n         * @method queryCommandSupported\n         * @param {String} command Command that we check support for.\n         * @return {Boolean} true/false if the command is supported or not.\n         */\n        queryCommandSupported(command) {\n            const lowerCaseCommand = command.toLowerCase();\n            if (this.commands.exec[lowerCaseCommand]) {\n                return true;\n            }\n            else {\n                return false;\n            }\n        }\n        addQueryStateHandler(command, callback, scope) {\n            this.commands.state[command.toLowerCase()] = () => callback.call(scope ?? this.editor);\n        }\n        addQueryValueHandler(command, callback, scope) {\n            this.commands.value[command.toLowerCase()] = () => callback.call(scope ?? this.editor);\n        }\n    }\n\n    /**\n     * This class lets you add/remove and dispatch events by name on the specified scope. This makes\n     * it easy to add event listener logic to any class.\n     *\n     * @class tinymce.util.EventDispatcher\n     * @example\n     * const eventDispatcher = new EventDispatcher();\n     *\n     * eventDispatcher.on('click', () => console.log('data'));\n     * eventDispatcher.dispatch('click', { data: 123 });\n     */\n    const nativeEvents = Tools.makeMap('focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange ' +\n        'mouseout mouseenter mouseleave wheel keydown keypress keyup input beforeinput contextmenu dragstart dragend dragover ' +\n        'draggesture dragdrop drop drag submit ' +\n        'compositionstart compositionend compositionupdate touchstart touchmove touchend touchcancel', ' ');\n    class EventDispatcher {\n        /**\n         * Returns true/false if the specified event name is a native browser event or not.\n         *\n         * @method isNative\n         * @param {String} name Name to check if it's native.\n         * @return {Boolean} true/false if the event is native or not.\n         * @static\n         */\n        static isNative(name) {\n            return !!nativeEvents[name.toLowerCase()];\n        }\n        settings;\n        scope;\n        toggleEvent;\n        bindings = {};\n        constructor(settings) {\n            this.settings = settings || {};\n            this.scope = this.settings.scope || this;\n            this.toggleEvent = this.settings.toggleEvent || never;\n        }\n        /**\n         * Fires the specified event by name.\n         * <br>\n         * <em>Marked for removal in TinyMCE 8.0. Use <code>dispatch</code> instead.</em>\n         *\n         * @method fire\n         * @param {String} name Name of the event to fire.\n         * @param {Object?} args Event arguments.\n         * @return {Object} Event args instance passed in.\n         * @deprecated Use dispatch() instead\n         * @example\n         * instance.fire('event', {...});\n         */\n        fire(name, args) {\n            return this.dispatch(name, args);\n        }\n        /**\n         * Dispatches the specified event by name.\n         *\n         * @method dispatch\n         * @param {String} name Name of the event to dispatch\n         * @param {Object?} args Event arguments.\n         * @return {Object} Event args instance passed in.\n         * @example\n         * instance.dispatch('event', {...});\n         */\n        dispatch(name, args) {\n            const lcName = name.toLowerCase();\n            const event = normalize$3(lcName, args ?? {}, this.scope);\n            if (this.settings.beforeFire) {\n                this.settings.beforeFire(event);\n            }\n            // Don't clone the array here as this is a hot code path, so instead the handlers\n            // array is recreated and the this.bindings[name] reference is updated in the `on`\n            // and `off` functions. This is done to avoid the handlers array being mutated while\n            // we're iterating over it below.\n            const handlers = this.bindings[lcName];\n            if (handlers) {\n                for (let i = 0, l = handlers.length; i < l; i++) {\n                    const callback = handlers[i];\n                    // The handler was removed by an earlier handler in this loop so skip it.\n                    if (callback.removed) {\n                        continue;\n                    }\n                    // Unbind handlers marked with \"once\"\n                    if (callback.once) {\n                        this.off(lcName, callback.func);\n                    }\n                    // Stop immediate propagation if needed\n                    if (event.isImmediatePropagationStopped()) {\n                        return event;\n                    }\n                    // If callback returns false then prevent default and stop all propagation\n                    if (callback.func.call(this.scope, event) === false) {\n                        event.preventDefault();\n                        return event;\n                    }\n                }\n            }\n            return event;\n        }\n        /**\n         * Binds an event listener to a specific event by name.\n         *\n         * @method on\n         * @param {String} name Event name or space separated list of events to bind.\n         * @param {Function} callback Callback to be executed when the event occurs.\n         * @param {Boolean} prepend Optional flag if the event should be prepended. Use this with care.\n         * @return {Object} Current class instance.\n         * @example\n         * instance.on('event', (e) => {\n         *   // Callback logic\n         * });\n         */\n        on(name, callback, prepend, extra) {\n            if (callback === false) {\n                callback = never;\n            }\n            if (callback) {\n                const wrappedCallback = {\n                    func: callback,\n                    removed: false\n                };\n                if (extra) {\n                    Tools.extend(wrappedCallback, extra);\n                }\n                const names = name.toLowerCase().split(' ');\n                let i = names.length;\n                while (i--) {\n                    const currentName = names[i];\n                    let handlers = this.bindings[currentName];\n                    if (!handlers) {\n                        handlers = [];\n                        this.toggleEvent(currentName, true);\n                    }\n                    if (prepend) {\n                        handlers = [wrappedCallback, ...handlers];\n                    }\n                    else {\n                        handlers = [...handlers, wrappedCallback];\n                    }\n                    this.bindings[currentName] = handlers;\n                }\n            }\n            return this;\n        }\n        /**\n         * Unbinds an event listener to a specific event by name.\n         *\n         * @method off\n         * @param {String?} name Name of the event to unbind.\n         * @param {Function?} callback Callback to unbind.\n         * @return {Object} Current class instance.\n         * @example\n         * // Unbind specific callback\n         * instance.off('event', handler);\n         *\n         * // Unbind all listeners by name\n         * instance.off('event');\n         *\n         * // Unbind all events\n         * instance.off();\n         */\n        off(name, callback) {\n            if (name) {\n                const names = name.toLowerCase().split(' ');\n                let i = names.length;\n                while (i--) {\n                    const currentName = names[i];\n                    let handlers = this.bindings[currentName];\n                    // Unbind all handlers\n                    if (!currentName) {\n                        each$d(this.bindings, (_value, bindingName) => {\n                            this.toggleEvent(bindingName, false);\n                            delete this.bindings[bindingName];\n                        });\n                        return this;\n                    }\n                    if (handlers) {\n                        // Unbind all by name\n                        if (!callback) {\n                            handlers.length = 0;\n                        }\n                        else {\n                            // Unbind specific handlers\n                            const filteredHandlers = partition$2(handlers, (handler) => handler.func === callback);\n                            handlers = filteredHandlers.fail;\n                            this.bindings[currentName] = handlers;\n                            // Mark the removed handlers in case this event is already being processed in `fire`\n                            each$e(filteredHandlers.pass, (handler) => {\n                                handler.removed = true;\n                            });\n                        }\n                        if (!handlers.length) {\n                            this.toggleEvent(name, false);\n                            delete this.bindings[currentName];\n                        }\n                    }\n                }\n            }\n            else {\n                each$d(this.bindings, (_value, name) => {\n                    this.toggleEvent(name, false);\n                });\n                this.bindings = {};\n            }\n            return this;\n        }\n        /**\n         * Binds an event listener to a specific event by name\n         * and automatically unbind the event once the callback fires.\n         *\n         * @method once\n         * @param {String} name Event name or space separated list of events to bind.\n         * @param {Function} callback Callback to be executed when the event occurs.\n         * @param {Boolean} prepend Optional flag if the event should be prepended. Use this with care.\n         * @return {Object} Current class instance.\n         * @example\n         * instance.once('event', (e) => {\n         *   // Callback logic\n         * });\n         */\n        once(name, callback, prepend) {\n            return this.on(name, callback, prepend, { once: true });\n        }\n        /**\n         * Returns true/false if the dispatcher has a event of the specified name.\n         *\n         * @method has\n         * @param {String} name Name of the event to check for.\n         * @return {Boolean} true/false if the event exists or not.\n         */\n        has(name) {\n            name = name.toLowerCase();\n            const binding = this.bindings[name];\n            return !(!binding || binding.length === 0);\n        }\n    }\n\n    /**\n     * This mixin adds event binding logic to classes. Adapts the EventDispatcher class.\n     *\n     * @mixin tinymce.util.Observable\n     */\n    const getEventDispatcher = (obj) => {\n        if (!obj._eventDispatcher) {\n            obj._eventDispatcher = new EventDispatcher({\n                scope: obj,\n                toggleEvent: (name, state) => {\n                    if (EventDispatcher.isNative(name) && obj.toggleNativeEvent) {\n                        obj.toggleNativeEvent(name, state);\n                    }\n                }\n            });\n        }\n        return obj._eventDispatcher;\n    };\n    const Observable = {\n        /**\n         * Fires the specified event by name. Consult the\n         * <a href=\"https://www.tiny.cloud/docs/tinymce/8/events/\">event reference</a> for more details on each event.\n         * <br>\n         * <em>Deprecated in TinyMCE 6.0 and has been marked for removal in TinyMCE 9.0. Use <code>dispatch</code> instead.</em>\n         *\n         * @method fire\n         * @param {String} name Name of the event to fire.\n         * @param {Object?} args Event arguments.\n         * @param {Boolean?} bubble True/false if the event is to be bubbled.\n         * @return {Object} Event args instance passed in.\n         * @deprecated Use dispatch() instead\n         * @example\n         * instance.fire('event', {...});\n         */\n        fire(name, args, bubble) {\n            logFeatureDeprecationWarning('fire');\n            return this.dispatch(name, args, bubble);\n        },\n        /**\n         * Dispatches the specified event by name. Consult the\n         * <a href=\"https://www.tiny.cloud/docs/tinymce/8/events/\">event reference</a> for more details on each event.\n         *\n         * @method dispatch\n         * @param {String} name Name of the event to dispatch.\n         * @param {Object?} args Event arguments.\n         * @param {Boolean?} bubble True/false if the event is to be bubbled.\n         * @return {Object} Event args instance passed in.\n         * @example\n         * instance.dispatch('event', {...});\n         */\n        dispatch(name, args, bubble) {\n            const self = this;\n            // Prevent all events except the remove/detach event after the instance has been removed\n            if (self.removed && name !== 'remove' && name !== 'detach') {\n                return normalize$3(name.toLowerCase(), args ?? {}, self);\n            }\n            const dispatcherArgs = getEventDispatcher(self).dispatch(name, args);\n            // Bubble event up to parents\n            if (bubble !== false && self.parent) {\n                let parent = self.parent();\n                while (parent && !dispatcherArgs.isPropagationStopped()) {\n                    parent.dispatch(name, dispatcherArgs, false);\n                    parent = parent.parent ? parent.parent() : undefined;\n                }\n            }\n            return dispatcherArgs;\n        },\n        /**\n         * Binds an event listener to a specific event by name. Consult the\n         * <a href=\"https://www.tiny.cloud/docs/tinymce/8/events/\">event reference</a> for more details on each event.\n         *\n         * @method on\n         * @param {String} name Event name or space separated list of events to bind.\n         * @param {Function} callback Callback to be executed when the event occurs.\n         * @param {Boolean} prepend Optional flag if the event should be prepended. Use this with care.\n         * @return {Object} Current class instance.\n         * @example\n         * instance.on('event', (e) => {\n         *   // Callback logic\n         * });\n         */\n        on(name, callback, prepend) {\n            return getEventDispatcher(this).on(name, callback, prepend);\n        },\n        /**\n         * Unbinds an event listener to a specific event by name. Consult the\n         * <a href=\"https://www.tiny.cloud/docs/tinymce/8/events/\">event reference</a> for more details on each event.\n         *\n         * @method off\n         * @param {String?} name Name of the event to unbind.\n         * @param {Function?} callback Callback to unbind.\n         * @return {Object} Current class instance.\n         * @example\n         * // Unbind specific callback\n         * instance.off('event', handler);\n         *\n         * // Unbind all listeners by name\n         * instance.off('event');\n         *\n         * // Unbind all events\n         * instance.off();\n         */\n        off(name, callback) {\n            return getEventDispatcher(this).off(name, callback);\n        },\n        /**\n         * Bind the event callback and once it fires the callback is removed. Consult the\n         * <a href=\"https://www.tiny.cloud/docs/tinymce/8/events/\">event reference</a> for more details on each event.\n         *\n         * @method once\n         * @param {String} name Name of the event to bind.\n         * @param {Function} callback Callback to bind only once.\n         * @return {Object} Current class instance.\n         */\n        once(name, callback) {\n            return getEventDispatcher(this).once(name, callback);\n        },\n        /**\n         * Returns true/false if the object has a event of the specified name.\n         *\n         * @method hasEventListeners\n         * @param {String} name Name of the event to check for.\n         * @return {Boolean} true/false if the event exists or not.\n         */\n        hasEventListeners(name) {\n            return getEventDispatcher(this).has(name);\n        }\n    };\n\n    /**\n     * This mixin contains the event logic for the tinymce.Editor class.\n     *\n     * @mixin tinymce.EditorObservable\n     * @extends tinymce.util.Observable\n     * @private\n     */\n    const DOM$2 = DOMUtils.DOM;\n    let customEventRootDelegates;\n    /**\n     * Returns the event target for the specified event. Some events fire\n     * only on document, some fire on documentElement etc. This also handles the\n     * custom event root setting where it returns that element instead of the body.\n     *\n     * @private\n     * @param {tinymce.Editor} editor Editor instance to get event target from.\n     * @param {String} eventName Name of the event for example \"click\".\n     * @return {Element/Document} HTML Element or document target to bind on.\n     */\n    const getEventTarget = (editor, eventName) => {\n        if (eventName === 'selectionchange') {\n            return editor.getDoc();\n        }\n        // Need to bind mousedown/mouseup etc to document not body in iframe mode\n        // Since the user might click on the HTML element not the BODY\n        if (!editor.inline && /^(?:mouse|touch|click|contextmenu|drop|dragover|dragend)/.test(eventName)) {\n            return editor.getDoc().documentElement;\n        }\n        // Bind to event root instead of body if it's defined\n        const eventRoot = getEventRoot(editor);\n        if (eventRoot) {\n            if (!editor.eventRoot) {\n                editor.eventRoot = DOM$2.select(eventRoot)[0];\n            }\n            return editor.eventRoot;\n        }\n        return editor.getBody();\n    };\n    const isListening = (editor) => !editor.hidden && !isDisabled(editor);\n    const fireEvent = (editor, eventName, e) => {\n        if (isListening(editor)) {\n            editor.dispatch(eventName, e);\n        }\n        else if (isDisabled(editor)) {\n            processDisabledEvents(editor, e);\n        }\n    };\n    /**\n     * Binds a event delegate for the specified name this delegate will fire\n     * the event to the editor dispatcher.\n     *\n     * @private\n     * @param {tinymce.Editor} editor Editor instance to get event target from.\n     * @param {String} eventName Name of the event for example \"click\".\n     */\n    const bindEventDelegate = (editor, eventName) => {\n        if (!editor.delegates) {\n            editor.delegates = {};\n        }\n        if (editor.delegates[eventName] || editor.removed) {\n            return;\n        }\n        const eventRootElm = getEventTarget(editor, eventName);\n        if (getEventRoot(editor)) {\n            if (!customEventRootDelegates) {\n                customEventRootDelegates = {};\n                editor.editorManager.on('removeEditor', () => {\n                    if (!editor.editorManager.activeEditor) {\n                        if (customEventRootDelegates) {\n                            each$d(customEventRootDelegates, (_value, name) => {\n                                editor.dom.unbind(getEventTarget(editor, name));\n                            });\n                            customEventRootDelegates = null;\n                        }\n                    }\n                });\n            }\n            if (customEventRootDelegates[eventName]) {\n                return;\n            }\n            const delegate = (e) => {\n                const target = e.target;\n                const editors = editor.editorManager.get();\n                let i = editors.length;\n                while (i--) {\n                    const body = editors[i].getBody();\n                    if (body === target || DOM$2.isChildOf(target, body)) {\n                        fireEvent(editors[i], eventName, e);\n                    }\n                }\n            };\n            customEventRootDelegates[eventName] = delegate;\n            DOM$2.bind(eventRootElm, eventName, delegate);\n        }\n        else {\n            const delegate = (e) => {\n                fireEvent(editor, eventName, e);\n            };\n            DOM$2.bind(eventRootElm, eventName, delegate);\n            editor.delegates[eventName] = delegate;\n        }\n    };\n    const EditorObservable = {\n        ...Observable,\n        /**\n         * Bind any pending event delegates. This gets executed after the target body/document is created.\n         *\n         * @private\n         */\n        bindPendingEventDelegates() {\n            const self = this;\n            Tools.each(self._pendingNativeEvents, (name) => {\n                bindEventDelegate(self, name);\n            });\n        },\n        /**\n         * Toggles a native event on/off this is called by the EventDispatcher when\n         * the first native event handler is added and when the last native event handler is removed.\n         *\n         * @private\n         */\n        toggleNativeEvent(name, state) {\n            const self = this;\n            // Never bind focus/blur since the FocusManager fakes those\n            if (name === 'focus' || name === 'blur') {\n                return;\n            }\n            // If the editor has been removed, `unbindAllNativeEvents` has already deleted all native event delegates\n            if (self.removed) {\n                return;\n            }\n            if (state) {\n                if (self.initialized) {\n                    bindEventDelegate(self, name);\n                }\n                else {\n                    if (!self._pendingNativeEvents) {\n                        self._pendingNativeEvents = [name];\n                    }\n                    else {\n                        self._pendingNativeEvents.push(name);\n                    }\n                }\n            }\n            else if (self.initialized && self.delegates) {\n                self.dom.unbind(getEventTarget(self, name), name, self.delegates[name]);\n                delete self.delegates[name];\n            }\n        },\n        /**\n         * Unbinds all native event handlers that means delegates, custom events bound using the Events API etc.\n         *\n         * @private\n         */\n        unbindAllNativeEvents() {\n            const self = this;\n            const body = self.getBody();\n            const dom = self.dom;\n            if (self.delegates) {\n                each$d(self.delegates, (value, name) => {\n                    self.dom.unbind(getEventTarget(self, name), name, value);\n                });\n                delete self.delegates;\n            }\n            if (!self.inline && body && dom) {\n                body.onload = null;\n                dom.unbind(self.getWin());\n                dom.unbind(self.getDoc());\n            }\n            if (dom) {\n                dom.unbind(body);\n                dom.unbind(self.getContainer());\n            }\n        }\n    };\n\n    // A string array allows comma/space separated values as well for ease of use\n    const stringListProcessor = (value) => {\n        if (isString(value)) {\n            return { value: value.split(/[ ,]/), valid: true };\n        }\n        else if (isArrayOf(value, isString)) {\n            return { value, valid: true };\n        }\n        else {\n            return { valid: false, message: `The value must be a string[] or a comma/space separated string.` };\n        }\n    };\n    const getBuiltInProcessor = (type) => {\n        const validator = (() => {\n            switch (type) {\n                case 'array':\n                    return isArray$1;\n                case 'boolean':\n                    return isBoolean;\n                case 'function':\n                    return isFunction;\n                case 'number':\n                    return isNumber;\n                case 'object':\n                    return isObject;\n                case 'string':\n                    return isString;\n                case 'string[]':\n                    return stringListProcessor;\n                case 'object[]':\n                    return (val) => isArrayOf(val, isObject);\n                case 'regexp':\n                    return (val) => is$5(val, RegExp);\n                default:\n                    return always;\n            }\n        })();\n        return (value) => processValue(value, validator, `The value must be a ${type}.`);\n    };\n    const isBuiltInSpec = (spec) => isString(spec.processor);\n    const getErrorMessage = (message, result) => {\n        const additionalText = isEmpty$5(result.message) ? '' : `. ${result.message}`;\n        return message + additionalText;\n    };\n    const isValidResult = (result) => result.valid;\n    const processValue = (value, processor, message = '') => {\n        const result = processor(value);\n        if (isBoolean(result)) {\n            // Note: Need to cast here as if a boolean is returned then we're guaranteed to be returning the same value\n            return result ? { value: value, valid: true } : { valid: false, message };\n        }\n        else {\n            return result;\n        }\n    };\n    const processDefaultValue = (name, defaultValue, processor) => {\n        if (!isUndefined(defaultValue)) {\n            const result = processValue(defaultValue, processor);\n            if (isValidResult(result)) {\n                return result.value;\n            }\n            else {\n                // eslint-disable-next-line no-console\n                console.error(getErrorMessage(`Invalid default value passed for the \"${name}\" option`, result));\n            }\n        }\n        return undefined;\n    };\n    const create$4 = (editor, initialOptions, rawInitialOptions = initialOptions) => {\n        const registry = {};\n        const values = {};\n        const setValue = (name, value, processor) => {\n            const result = processValue(value, processor);\n            if (isValidResult(result)) {\n                values[name] = result.value;\n                return true;\n            }\n            else {\n                // eslint-disable-next-line no-console\n                console.warn(getErrorMessage(`Invalid value passed for the ${name} option`, result));\n                return false;\n            }\n        };\n        const register = (name, spec) => {\n            const processor = isBuiltInSpec(spec) ? getBuiltInProcessor(spec.processor) : spec.processor;\n            // Process and validate the default value\n            const defaultValue = processDefaultValue(name, spec.default, processor);\n            // Register the spec with the validated default and normalized processor\n            registry[name] = {\n                ...spec,\n                default: defaultValue,\n                processor\n            };\n            // Setup the initial values\n            const initValue = get$b(values, name).orThunk(() => get$b(initialOptions, name));\n            initValue.each((value) => setValue(name, value, processor));\n        };\n        const isRegistered = (name) => has$2(registry, name);\n        const get = (name) => get$b(values, name)\n            .orThunk(() => get$b(registry, name).map((spec) => spec.default))\n            .getOrUndefined();\n        const set = (name, value) => {\n            if (!isRegistered(name)) {\n                // eslint-disable-next-line no-console\n                console.warn(`\"${name}\" is not a registered option. Ensure the option has been registered before setting a value.`);\n                return false;\n            }\n            else {\n                const spec = registry[name];\n                if (spec.immutable) {\n                    // eslint-disable-next-line no-console\n                    console.error(`\"${name}\" is an immutable option and cannot be updated`);\n                    return false;\n                }\n                else {\n                    return setValue(name, value, spec.processor);\n                }\n            }\n        };\n        const unset = (name) => {\n            const registered = isRegistered(name);\n            if (registered) {\n                delete values[name];\n            }\n            return registered;\n        };\n        const isSet = (name) => has$2(values, name);\n        const debug = () => {\n            try {\n                // eslint-disable-next-line no-console\n                console.log(JSON.parse(JSON.stringify(rawInitialOptions, (_key, value) => {\n                    if (isBoolean(value) ||\n                        isNumber(value) ||\n                        isString(value) ||\n                        isNull(value) ||\n                        isArray$1(value) ||\n                        isPlainObject(value)) {\n                        return value;\n                    }\n                    return Object.prototype.toString.call(value);\n                })));\n            }\n            catch (error) {\n                // eslint-disable-next-line no-console\n                console.error(error);\n            }\n        };\n        return {\n            register,\n            isRegistered,\n            get,\n            set,\n            unset,\n            isSet,\n            debug,\n        };\n    };\n\n    const setContentEditable = (elm, state) => {\n        elm.dom.contentEditable = state ? 'true' : 'false';\n    };\n    const toggleReadOnly = (editor, state) => {\n        const body = SugarElement.fromDom(editor.getBody());\n        if (state) {\n            editor.readonly = true;\n            if (editor.hasEditableRoot()) {\n                setContentEditable(body, true);\n            }\n            disableEditor(editor);\n        }\n        else {\n            editor.readonly = false;\n            enableEditor(editor);\n        }\n    };\n    const isReadOnly = (editor) => editor.readonly;\n    const rollbackChange = (editor) => {\n        const undoLevel = editor.undoManager.add();\n        if (isNonNullable(undoLevel)) {\n            editor.undoManager.undo();\n            editor.undoManager.reset();\n        }\n    };\n    const hasContentMutations = (mutations) => exists(mutations, (mutation) => mutation.type === 'characterData' || mutation.type === 'childList');\n    const registerReadOnlyInputBlockers = (editor) => {\n        const handleMutations = (mutations) => {\n            if (isReadOnly(editor) && hasContentMutations(mutations)) {\n                rollbackChange(editor);\n            }\n        };\n        // Set up mutation observer to detect and revert unintended changes\n        const observer = new MutationObserver(handleMutations);\n        editor.on('beforeinput paste cut dragend dragover draggesture dragdrop drop drag', (e) => {\n            if (isReadOnly(editor)) {\n                e.preventDefault();\n            }\n        });\n        editor.on('BeforeExecCommand', (e) => {\n            if ((e.command === 'Undo' || e.command === 'Redo') && isReadOnly(editor)) {\n                e.preventDefault();\n            }\n        });\n        editor.on('compositionstart', () => {\n            if (isReadOnly(editor)) {\n                observer.observe(editor.getBody(), {\n                    characterData: true,\n                    childList: true,\n                    subtree: true\n                });\n            }\n        });\n        editor.on('compositionend', () => {\n            if (isReadOnly(editor)) {\n                const records = observer.takeRecords();\n                handleMutations(records);\n            }\n            observer.disconnect();\n        });\n    };\n\n    const defaultModes = ['design', 'readonly'];\n    const switchToMode = (editor, activeMode, availableModes, mode) => {\n        const oldMode = availableModes[activeMode.get()];\n        const newMode = availableModes[mode];\n        // if activate fails, hope nothing bad happened and abort\n        try {\n            newMode.activate();\n        }\n        catch (e) {\n            // eslint-disable-next-line no-console\n            console.error(`problem while activating editor mode ${mode}:`, e);\n            return;\n        }\n        oldMode.deactivate();\n        if (oldMode.editorReadOnly !== newMode.editorReadOnly) {\n            toggleReadOnly(editor, newMode.editorReadOnly);\n        }\n        activeMode.set(mode);\n        fireSwitchMode(editor, mode);\n    };\n    const setMode = (editor, availableModes, activeMode, mode) => {\n        if (mode === activeMode.get() || (editor.initialized && isDisabled(editor))) {\n            return;\n        }\n        else if (!has$2(availableModes, mode)) {\n            throw new Error(`Editor mode '${mode}' is invalid`);\n        }\n        if (editor.initialized) {\n            switchToMode(editor, activeMode, availableModes, mode);\n        }\n        else {\n            editor.on('init', () => switchToMode(editor, activeMode, availableModes, mode));\n        }\n    };\n    const registerMode = (availableModes, mode, api) => {\n        if (contains$2(defaultModes, mode)) {\n            throw new Error(`Cannot override default mode ${mode}`);\n        }\n        return {\n            ...availableModes,\n            [mode]: {\n                ...api,\n                deactivate: () => {\n                    // wrap custom deactivate APIs so they can't break the editor\n                    try {\n                        api.deactivate();\n                    }\n                    catch (e) {\n                        // eslint-disable-next-line no-console\n                        console.error(`problem while deactivating editor mode ${mode}:`, e);\n                    }\n                }\n            }\n        };\n    };\n\n    const create$3 = (editor) => {\n        const activeMode = Cell('design');\n        const availableModes = Cell({\n            design: {\n                activate: noop,\n                deactivate: noop,\n                editorReadOnly: false\n            },\n            readonly: {\n                activate: noop,\n                deactivate: noop,\n                editorReadOnly: true\n            }\n        });\n        registerReadOnlyInputBlockers(editor);\n        registerEventsAndFilters$1(editor);\n        return {\n            isReadOnly: () => isReadOnly(editor),\n            set: (mode) => setMode(editor, availableModes.get(), activeMode, mode),\n            get: () => activeMode.get(),\n            register: (mode, api) => {\n                availableModes.set(registerMode(availableModes.get(), mode, api));\n            }\n        };\n    };\n\n    /**\n     * Contains logic for handling keyboard shortcuts.\n     *\n     * @class tinymce.Shortcuts\n     * @example\n     * editor.shortcuts.add('ctrl+a', 'description of the shortcut', () => {});\n     * editor.shortcuts.add('ctrl+alt+a', 'description of the shortcut', () => {});\n     * // \"meta\" maps to Command on Mac and Ctrl on PC\n     * editor.shortcuts.add('meta+a', 'description of the shortcut', () => {});\n     * // \"access\" maps to Control+Option on Mac and shift+alt on PC\n     * editor.shortcuts.add('access+a', 'description of the shortcut', () => {});\n     *\n     * editor.shortcuts.add('meta+access+c', 'Opens the code editor dialog.', () => {\n     *   editor.execCommand('mceCodeEditor');\n     * });\n     *\n     * editor.shortcuts.add('meta+shift+32', 'Inserts \"Hello, World!\" for meta+shift+space', () => {\n     *   editor.execCommand('mceInsertContent', false, 'Hello, World!');\n     * });\n     */\n    const each$2 = Tools.each, explode = Tools.explode;\n    const keyCodeLookup = {\n        f1: 112,\n        f2: 113,\n        f3: 114,\n        f4: 115,\n        f5: 116,\n        f6: 117,\n        f7: 118,\n        f8: 119,\n        f9: 120,\n        f10: 121,\n        f11: 122,\n        f12: 123\n    };\n    const modifierNames = Tools.makeMap('alt,ctrl,shift,meta,access');\n    const isModifier = (key) => key in modifierNames;\n    const parseShortcut = (pattern) => {\n        const shortcut = {};\n        const isMac = Env.os.isMacOS() || Env.os.isiOS();\n        // Parse modifiers and keys ctrl+alt+b for example\n        each$2(explode(pattern.toLowerCase(), '+'), (value) => {\n            if (isModifier(value)) {\n                shortcut[value] = true;\n            }\n            else {\n                // Allow numeric keycodes like ctrl+219 for ctrl+[\n                if (/^[0-9]{2,}$/.test(value)) {\n                    shortcut.keyCode = parseInt(value, 10);\n                }\n                else {\n                    shortcut.charCode = value.charCodeAt(0);\n                    shortcut.keyCode = keyCodeLookup[value] || value.toUpperCase().charCodeAt(0);\n                }\n            }\n        });\n        // Generate unique id for modifier combination and set default state for unused modifiers\n        const id = [shortcut.keyCode];\n        let key;\n        for (key in modifierNames) {\n            if (shortcut[key]) {\n                id.push(key);\n            }\n            else {\n                shortcut[key] = false;\n            }\n        }\n        shortcut.id = id.join(',');\n        // Handle special access modifier differently depending on Mac/Win\n        if (shortcut.access) {\n            shortcut.alt = true;\n            if (isMac) {\n                shortcut.ctrl = true;\n            }\n            else {\n                shortcut.shift = true;\n            }\n        }\n        // Handle special meta modifier differently depending on Mac/Win\n        if (shortcut.meta) {\n            if (isMac) {\n                shortcut.meta = true;\n            }\n            else {\n                shortcut.ctrl = true;\n                shortcut.meta = false;\n            }\n        }\n        return shortcut;\n    };\n    class Shortcuts {\n        editor;\n        shortcuts = {};\n        pendingPatterns = [];\n        constructor(editor) {\n            this.editor = editor;\n            const self = this;\n            editor.on('keyup keypress keydown', (e) => {\n                if ((self.hasModifier(e) || self.isFunctionKey(e)) && !e.isDefaultPrevented()) {\n                    each$2(self.shortcuts, (shortcut) => {\n                        if (self.matchShortcut(e, shortcut)) {\n                            self.pendingPatterns = shortcut.subpatterns.slice(0);\n                            if (e.type === 'keydown') {\n                                self.executeShortcutAction(shortcut);\n                            }\n                        }\n                    });\n                    if (self.matchShortcut(e, self.pendingPatterns[0])) {\n                        if (self.pendingPatterns.length === 1) {\n                            if (e.type === 'keydown') {\n                                self.executeShortcutAction(self.pendingPatterns[0]);\n                            }\n                        }\n                        self.pendingPatterns.shift();\n                    }\n                }\n            });\n        }\n        /**\n         * Adds a keyboard shortcut for some command or function.\n         *\n         * @method add\n         * @param {String} pattern Shortcut pattern. Like for example: ctrl+alt+o.\n         * @param {String} desc Text description for the command.\n         * @param {String/Function} cmdFunc Command name string or function to execute when the key is pressed.\n         * @param {Object} scope Optional scope to execute the function in.\n         * @return {Boolean} true/false state if the shortcut was added or not.\n         */\n        add(pattern, desc, cmdFunc, scope) {\n            const self = this;\n            const func = self.normalizeCommandFunc(cmdFunc);\n            each$2(explode(Tools.trim(pattern)), (pattern) => {\n                const shortcut = self.createShortcut(pattern, desc, func, scope);\n                self.shortcuts[shortcut.id] = shortcut;\n            });\n            return true;\n        }\n        /**\n         * Remove a keyboard shortcut by pattern.\n         *\n         * @method remove\n         * @param {String} pattern Shortcut pattern. Like for example: ctrl+alt+o.\n         * @return {Boolean} true/false state if the shortcut was removed or not.\n         */\n        remove(pattern) {\n            const shortcut = this.createShortcut(pattern);\n            if (this.shortcuts[shortcut.id]) {\n                delete this.shortcuts[shortcut.id];\n                return true;\n            }\n            return false;\n        }\n        normalizeCommandFunc(cmdFunc) {\n            const self = this;\n            const cmd = cmdFunc;\n            if (typeof cmd === 'string') {\n                return () => {\n                    self.editor.execCommand(cmd, false, null);\n                };\n            }\n            else if (Tools.isArray(cmd)) {\n                return () => {\n                    self.editor.execCommand(cmd[0], cmd[1], cmd[2]);\n                };\n            }\n            else {\n                return cmd;\n            }\n        }\n        createShortcut(pattern, desc, cmdFunc, scope) {\n            const shortcuts = Tools.map(explode(pattern, '>'), parseShortcut);\n            shortcuts[shortcuts.length - 1] = Tools.extend(shortcuts[shortcuts.length - 1], {\n                func: cmdFunc,\n                scope: scope || this.editor\n            });\n            return Tools.extend(shortcuts[0], {\n                desc: this.editor.translate(desc),\n                subpatterns: shortcuts.slice(1)\n            });\n        }\n        hasModifier(e) {\n            return e.altKey || e.ctrlKey || e.metaKey;\n        }\n        isFunctionKey(e) {\n            return e.type === 'keydown' && e.keyCode >= 112 && e.keyCode <= 123;\n        }\n        matchShortcut(e, shortcut) {\n            if (!shortcut) {\n                return false;\n            }\n            if (shortcut.ctrl !== e.ctrlKey || shortcut.meta !== e.metaKey) {\n                return false;\n            }\n            if (shortcut.alt !== e.altKey || shortcut.shift !== e.shiftKey) {\n                return false;\n            }\n            if (e.keyCode === shortcut.keyCode || (e.charCode && e.charCode === shortcut.charCode)) {\n                e.preventDefault();\n                return true;\n            }\n            return false;\n        }\n        executeShortcutAction(shortcut) {\n            return shortcut.func ? shortcut.func.call(shortcut.scope) : null;\n        }\n    }\n\n    /**\n     * TinyMCE UI registration API.\n     *\n     * @class tinymce.editor.ui.Registry\n     */\n    const registry = () => {\n        const bridge = create$6();\n        return {\n            /**\n             * Registers a new auto completer component. When a configured string pattern\n             * is matched in the content while typing, the autocompleter will be triggered.\n             * Emoticons and Charmap use an autocompleter.\n             * <br>\n             * For information on creating an autocompleter, see:\n             * <a href=\"https://www.tiny.cloud/docs/tinymce/8/autocompleter/\">\n             * UI Components - Autocompleter</a>.\n             *\n             * @method addAutocompleter\n             * @param {String} name Unique name identifying this autocomplete configuration.\n             * @param {InlineContent.AutocompleterSpec} obj The autocomplete configuration object.\n             */\n            addAutocompleter: bridge.addAutocompleter,\n            /**\n             * Registers a new toolbar button that executes a command when clicked or activated\n             * via keyboard navigation controls.\n             * <br>\n             * For information on creating a basic toolbar button, see:\n             * <a href=\"https://www.tiny.cloud/docs/tinymce/8/custom-basic-toolbar-button/\">\n             * UI Components - Types of toolbar buttons: Basic button</a>.\n             *\n             * @method addButton\n             * @param {String} name Unique name identifying the button, this button name will be used in the toolbar configuration to reference the button.\n             * @param {Toolbar.ToolbarButtonSpec} obj the button configuration object.\n             */\n            addButton: bridge.addButton,\n            /**\n             * Registers a new contextual form item.\n             * Similar to a context menu item, a contextual form is an item with an input\n             * form element appearing when a content predicate is matched. An example\n             * of a contextual form is the link plugin when the configuration\n             * { link_context_toolbar: true } is used. When the cursor is on a link, a\n             * contextual input form appears allowing for quick changes to the url field.\n             * <br>\n             * For information on creating context forms, see:\n             * <a href=\"https://www.tiny.cloud/docs/tinymce/8/contextform/\">\n             * UI Components - Context forms</a>.\n             *\n             * @method addContextForm\n             * @param {String} name Unique name identifying the new contextual form item.\n             * @param {Toolbar.ContextFormSpec} obj the context form configuration object.\n             */\n            addContextForm: bridge.addContextForm,\n            /**\n             * Registers a new context menu section that only appears when a content predicate is matched,\n             * for example, the cursor is inside a table.\n             * <br>\n             * For information on creating context menus, see:\n             * <a href=\"https://www.tiny.cloud/docs/tinymce/8/contextmenu/\">\n             * UI Components - Context Menu</a>.\n             *\n             * @method addContextMenu\n             * @param {String} name Unique name identifying the new context menu.\n             * @param {Menu.ContextMenuSpec} obj The context menu configuration object.\n             */\n            addContextMenu: bridge.addContextMenu,\n            /**\n             * Registers a new context toolbar that only appears when a content predicate is matched for example\n             * the cursor is on an image element.\n             * <br>\n             * For information on creating context toolbars, see:\n             * <a href=\"https://www.tiny.cloud/docs/tinymce/8/contexttoolbar/\">\n             * UI Components - Context Toolbar</a>.\n             *\n             * @method addContextToolbar\n             * @param {String} name Unique name identifying the new context toolbar.\n             * @param {Toolbar.ContextToolbarSpec} obj The context menu configuration object.\n             */\n            addContextToolbar: bridge.addContextToolbar,\n            /**\n             * Registers a new SVG icon. The icon name reference can be configured by any\n             * TinyMCE UI components that can display an icon. The icon is only available\n             * to the editor instance it was configured for.\n             *\n             * @method addIcon\n             * @param {String} name Unique name identifying the new icon.\n             * @param {String} svgData The SVG data string the browser will use to render the SVG icon.\n             * @example\n             * //To add a simple triangle icon:\n             * editor.ui.registry.addIcon('triangleUp', '<svg height=\"24\" width=\"24\"><path d=\"M12 0 L24 24 L0 24 Z\" /></svg>');\n             */\n            addIcon: bridge.addIcon,\n            /**\n             * Registers a new menu button. Adds a toolbar button that opens a menu when\n             * clicked. The menu can be populated by items created by addMenuItem,\n             * addNestedMenuItem or addToggleMenuItem.\n             * <br>\n             * For information on creating a toolbar menu button, see:\n             * <a href=\"https://www.tiny.cloud/docs/tinymce/8/custom-menu-toolbar-button/\">\n             * UI Components - Types of toolbar buttons: Menu button</a>.\n             *\n             * @method addMenuButton\n             * @param {String} name Unique name identifying the new menu button.\n             * @param {Toolbar.ToolbarMenuButtonSpec} obj The menu button configuration object.\n             */\n            addMenuButton: bridge.addMenuButton,\n            /**\n             * Registers a new menu item that executes a command when clicked or activated\n             * via keyboard navigation controls.\n             * <br>\n             * For information on creating a basic menu item, see:\n             * <a href=\"https://www.tiny.cloud/docs/tinymce/8/creating-custom-menu-items/\">\n             * UI Components - Custom menu items: Basic menu items</a>.\n             *\n             * @method addMenuItem\n             * @param {String} name Unique name identifying the new menu item.\n             * @param {Menu.MenuItemSpec} obj The menu item configuration object.\n             */\n            addMenuItem: bridge.addMenuItem,\n            /**\n             * Registers a new menu item that reveals a submenu when clicked or activated\n             * by keyboard navigation controls.The submenu can be populated by items\n             * created by addMenuItem, addNestedMenuItem or addToggleMenuItem.\n             * <br>\n             * For information on creating a nested menu item, see:\n             * <a href=\"https://www.tiny.cloud/docs/tinymce/8/custom-nested-menu-items/\">\n             * UI Components - Custom menu items: Nested menu items</a>.\n             *\n             * @method addNestedMenuItem\n             * @param {String} name Unique name identifying the new nested menu item.\n             * @param {Menu.NestedMenuItemSpec} obj The nested menu item configuration object.\n             */\n            addNestedMenuItem: bridge.addNestedMenuItem,\n            /**\n             * Registers a new sidebar container.\n             * This sidebar container is attached to the right side of the editor and\n             * can be toggled open or closed. When registered, a new toolbar toggle\n             * button with the same sidebar name is created. Additionally there is a\n             * ToggleSidebar command and a 'ToggleSidebar' event that can used to\n             * manage the sidebar open/closed state. The tinycomments plugin uses a\n             * sidebar for its Ui components.\n             * <br>\n             * For information on creating a custom sidebar, see:\n             * <a href=\"https://www.tiny.cloud/docs/tinymce/8/customsidebar/\">\n             * UI Components - Custom sidebar</a>.\n             *\n             * @method addSidebar\n             * @param {String} name Unique name identifying the new sidebar.\n             * @param {Sidebar.SidebarSpec} obj The sidebar configuration object.\n             */\n            addSidebar: bridge.addSidebar,\n            /**\n             * Registers a new split button for the toolbar. The list styles plugin uses\n             * a split button to simplify its functionality.\n             * <br>\n             * For information on creating a split toolbar button, see:\n             * <a href=\"https://www.tiny.cloud/docs/tinymce/8/custom-split-toolbar-button/\">\n             * UI Components - Types of toolbar buttons: Split button</a>.\n             *\n             * @method addSplitButton\n             * @param {String} name Unique name identifying the new split button.\n             * @param {Toolbar.ToolbarSplitButtonSpec} obj The split button configuration object.\n             */\n            addSplitButton: bridge.addSplitButton,\n            /**\n             * Registers a new toggle button for the toolbar. A toggle buttons state can\n             * be set in the configuration.\n             * <br>\n             * For information on creating a toggle toolbar button, see:\n             * <a href=\"https://www.tiny.cloud/docs/tinymce/8/custom-toggle-toolbar-button/\">\n             * UI Components - Types of toolbar buttons: Toggle button</a>.\n             *\n             * @method addToggleButton\n             * @param {String} name Unique name identifying the new split button.\n             * @param {Toolbar.ToolbarToggleButtonSpec} obj The toggle button configuration object.\n             */\n            addToggleButton: bridge.addToggleButton,\n            /**\n             * Registers a new group toolbar button for the toolbar. Renders a toolbar button that opens a floating toolbar when\n             * clicked.\n             * <br>\n             * <strong>Note:</strong> Group toolbar buttons can only be used when using the floating toolbar mode.\n             * <br>\n             * For information on creating a group toolbar button, see:\n             * <a href=\"https://www.tiny.cloud/docs/tinymce/8/custom-group-toolbar-button/\">\n             * UI Components - Types of toolbar buttons: Group toolbar button</a>.\n             *\n             * @method addGroupToolbarButton\n             * @param {String} name Unique name identifying the new group toolbar button.\n             * @param {Toolbar.GroupToolbarButtonSpec} obj The group toolbar button configuration object.\n             */\n            addGroupToolbarButton: bridge.addGroupToolbarButton,\n            /**\n             * Registers a new menu item that will act like a toggle button,\n             * showing a tick in the menu item to represent state.\n             * <br>\n             * For information on creating a toggle menu item, see:\n             * <a href=\"https://www.tiny.cloud/docs/tinymce/8/custom-toggle-menu-items/\">\n             * UI Components - Custom menu items: Toggle menu items</a>.\n             *\n             * @method addToggleMenuItem\n             * @param {String} name Unique name identifying the new menu item.\n             * @param {Menu.ToggleMenuItemSpec} obj The menu item configuration object.\n             */\n            addToggleMenuItem: bridge.addToggleMenuItem,\n            /**\n             * Registers a new view container.\n             * This view container is hidden (off) by default and attached next to the main view.\n             * It can be toggled on or off.\n             * When it is on, the main editor view is hidden and the specific view is shown.\n             * When it is off, the specific view is hidden and the main view is shown.\n             * There is also a ToggleView command.\n             * The ToggleView command can toggle the view visibility.\n             * The ToggleView command can be queried for its current state.\n             * <br>\n             * For information on creating a custom view, see:\n             * <a href=\"https://www.tiny.cloud/docs/tinymce/8/custom-view/\">\n             * UI Components - Custom view</a>.\n             *\n             * @method addView\n             * @param {String} name Unique name identifying the new view.\n             * @param {View.ViewSpec} obj The view configuration object.\n             */\n            addView: bridge.addView,\n            /**\n             * Registers a new context configuration in the registry.\n             * The registry stores all context configurations.\n             * The buttons in editor configuration object can contain a context property.\n             * These button specifications can use the registered contexts to determine\n             * whether to enable or disable the buttons based on the current context.\n             *\n             * @method addContext\n             * @param {String} name Unique name identifying the new context configuration.\n             * @param {Function} pred A predicate function that determines if the context is active\n             */\n            addContext: bridge.addContext,\n            /* note getAll is an internal method and may not be supported in future revisions */\n            getAll: bridge.getAll\n        };\n    };\n\n    // Shorten these names\n    const DOM$1 = DOMUtils.DOM;\n    const extend = Tools.extend, each$1 = Tools.each;\n    /**\n     * Include Editor API docs.\n     *\n     * @include ../../../../../tools/docs/tinymce.Editor.js\n     */\n    class Editor {\n        baseUri;\n        /**\n         * Editor instance id, normally the same as the div/textarea that was replaced.\n         *\n         * @property id\n         * @type String\n         */\n        id;\n        /**\n         * A uuid string to uniquely identify an editor across any page.\n         *\n         * @property editorUid\n         * @type String\n         */\n        editorUid;\n        /**\n         * Name/Value object containing plugin instances.\n         *\n         * @property plugins\n         * @type Object\n         * @example\n         * // Execute a method inside a plugin directly\n         * tinymce.activeEditor.plugins.someplugin.someMethod();\n         */\n        plugins = {};\n        /**\n         * URI object to document configured for the TinyMCE instance.\n         *\n         * @property documentBaseURI\n         * @type tinymce.util.URI\n         * @example\n         * // Get relative URL from the location of document_base_url\n         * tinymce.activeEditor.documentBaseURI.toRelative('/somedir/somefile.htm');\n         *\n         * // Get absolute URL from the location of document_base_url\n         * tinymce.activeEditor.documentBaseURI.toAbsolute('somefile.htm');\n         */\n        documentBaseURI;\n        /**\n         * URI object to current document that holds the TinyMCE editor instance.\n         *\n         * @property baseURI\n         * @type tinymce.util.URI\n         * @example\n         * // Get relative URL from the location of the API\n         * tinymce.activeEditor.baseURI.toRelative('/somedir/somefile.htm');\n         *\n         * // Get absolute URL from the location of the API\n         * tinymce.activeEditor.baseURI.toAbsolute('somefile.htm');\n         */\n        baseURI;\n        /**\n         * Array with CSS files to load into the iframe.\n         *\n         * @property contentCSS\n         * @type Array\n         */\n        contentCSS = [];\n        /**\n         * Array of CSS styles to add to head of document when the editor loads.\n         *\n         * @property contentStyles\n         * @type Array\n         */\n        contentStyles = [];\n        /**\n         * Editor ui components\n         *\n         * @property ui\n         * @type tinymce.editor.ui.Ui\n         */\n        ui;\n        /**\n         * Editor mode API\n         *\n         * @property mode\n         * @type tinymce.EditorMode\n         */\n        mode;\n        /**\n         * Editor options API\n         *\n         * @property options\n         * @type tinymce.EditorOptions\n         */\n        options;\n        /**\n         * Editor upload API\n         *\n         * @property editorUpload\n         * @type tinymce.EditorUpload\n         */\n        editorUpload;\n        /**\n         * Editor user lookup API\n         *\n         * @property userLookup\n         * @type tinymce.UserLookup\n         */\n        userLookup;\n        shortcuts;\n        loadedCSS = {};\n        editorCommands;\n        suffix;\n        editorManager;\n        hidden;\n        inline;\n        hasVisual;\n        isNotDirty = false;\n        // Arguments set later, for example by InitContentBody.ts\n        // Note that these may technically be undefined up until PreInit (or similar) has fired,\n        // however the types are aimed at an initialised editor for ease of use.\n        annotator;\n        bodyElement;\n        bookmark; // Note: Intentionally any so as to not expose Optional\n        composing = false;\n        container;\n        contentAreaContainer;\n        contentDocument;\n        contentWindow;\n        delegates;\n        destroyed = false;\n        dom;\n        editorContainer;\n        eventRoot;\n        formatter;\n        formElement;\n        formEventDelegate;\n        hasHiddenInput = false;\n        iframeElement = null;\n        iframeHTML;\n        initialized = false;\n        notificationManager;\n        orgDisplay;\n        orgVisibility;\n        parser;\n        quirks;\n        readonly = false;\n        removed = false;\n        schema;\n        selection;\n        serializer;\n        startContent = '';\n        targetElm;\n        theme;\n        model;\n        undoManager;\n        windowManager;\n        licenseKeyManager;\n        _beforeUnload;\n        _eventDispatcher;\n        _nodeChangeDispatcher;\n        _pendingNativeEvents = [];\n        _selectionOverrides;\n        _skinLoaded = false;\n        _editableRoot = true;\n        // EditorObservable patches\n        bindPendingEventDelegates;\n        toggleNativeEvent;\n        unbindAllNativeEvents;\n        fire;\n        dispatch;\n        on;\n        off;\n        once;\n        hasEventListeners;\n        /**\n         * Constructs a editor instance by id.\n         *\n         * @constructor\n         * @method Editor\n         * @param {String} id Unique id for the editor.\n         * @param {Object} options Options for the editor.\n         * @param {tinymce.EditorManager} editorManager EditorManager instance.\n         */\n        constructor(id, options, editorManager) {\n            this.editorManager = editorManager;\n            // Patch in the EditorObservable functions\n            extend(this, EditorObservable);\n            const self = this;\n            this.id = id;\n            this.editorUid = uuidV4();\n            this.hidden = false;\n            const normalizedOptions = normalizeOptions(editorManager.defaultOptions, options);\n            this.options = create$4(self, normalizedOptions, options);\n            register$7(self);\n            this.userLookup = createUserLookup(this);\n            const getOption = this.options.get;\n            if (getOption('deprecation_warnings')) {\n                logWarnings(options, normalizedOptions);\n            }\n            const suffix = getOption('suffix');\n            if (suffix) {\n                editorManager.suffix = suffix;\n            }\n            this.suffix = editorManager.suffix;\n            const baseUrl = getOption('base_url');\n            if (baseUrl) {\n                editorManager._setBaseUrl(baseUrl);\n            }\n            this.baseUri = editorManager.baseURI;\n            const referrerPolicy = getReferrerPolicy(self);\n            if (referrerPolicy) {\n                ScriptLoader.ScriptLoader._setReferrerPolicy(referrerPolicy);\n                DOMUtils.DOM.styleSheetLoader._setReferrerPolicy(referrerPolicy);\n            }\n            ScriptLoader.ScriptLoader._setCrossOrigin((url) => {\n                const crossOrigin = getCrossOrigin(self);\n                return crossOrigin(url, 'script');\n            });\n            DOMUtils.DOM.styleSheetLoader._setCrossOrigin((url) => {\n                const crossOrigin = getCrossOrigin(self);\n                return crossOrigin(url, 'stylesheet');\n            });\n            const contentCssCors = hasContentCssCors(self);\n            if (isNonNullable(contentCssCors)) {\n                DOMUtils.DOM.styleSheetLoader._setContentCssCors(contentCssCors);\n            }\n            AddOnManager.languageLoad = getOption('language_load');\n            AddOnManager.baseURL = editorManager.baseURL;\n            this.setDirty(false);\n            this.documentBaseURI = new URI(getDocumentBaseUrl(self), {\n                base_uri: this.baseUri\n            });\n            this.baseURI = this.baseUri;\n            this.inline = isInline$2(self);\n            this.hasVisual = isVisualAidsEnabled(self);\n            this.shortcuts = new Shortcuts(this);\n            this.editorCommands = new EditorCommands(this);\n            registerCommands(this);\n            const cacheSuffix = getOption('cache_suffix');\n            if (cacheSuffix) {\n                Env.cacheSuffix = cacheSuffix.replace(/^[\\?\\&]+/, '');\n            }\n            this.ui = {\n                registry: registry(),\n                styleSheetLoader: undefined,\n                show: noop,\n                hide: noop,\n                setEnabled: noop,\n                isEnabled: always\n            };\n            this.mode = create$3(self);\n            // Lock certain properties to reduce misuse\n            Object.defineProperty(this, 'editorUid', {\n                writable: false,\n                configurable: false,\n                enumerable: true,\n            });\n            // Call setup\n            editorManager.dispatch('SetupEditor', { editor: this });\n            const setupCallback = getSetupCallback(self);\n            if (isFunction(setupCallback)) {\n                setupCallback.call(self, self);\n            }\n        }\n        /**\n         * Renders the editor/adds it to the page.\n         *\n         * @method render\n         */\n        render() {\n            render(this);\n        }\n        /**\n         * Focuses/activates the editor. This will set this editor as the activeEditor in the tinymce collection\n         * it will also place DOM focus inside the editor.\n         *\n         * @method focus\n         * @param {Boolean/Object} skipFocus If true, skip DOM focus and only set this editor as the active editor. If an object, focus the editor and optionally control scrolling.\n         * @param {Boolean} skipFocus.scrollToSelection If false, focuses the editor without scrolling the selection into view. Defaults to true.\n         * @example\n         * tinymce.activeEditor.focus();\n         * tinymce.activeEditor.focus(true);\n         * tinymce.activeEditor.focus({ scrollToSelection: false });\n         */\n        focus(skipFocus) {\n            this.execCommand('mceFocus', false, skipFocus);\n        }\n        /**\n         * Returns true/false if the editor has real keyboard focus.\n         *\n         * @method hasFocus\n         * @return {Boolean} Current focus state of the editor.\n         */\n        hasFocus() {\n            return hasFocus(this);\n        }\n        /**\n         * Translates the specified string by replacing variables with language pack items it will also check if there is\n         * a key matching the input.\n         *\n         * @method translate\n         * @param {String} text String to translate by the language pack data.\n         * @return {String} Translated string.\n         */\n        translate(text) {\n            return I18n.translate(text);\n        }\n        getParam(name, defaultVal, type) {\n            const options = this.options;\n            // To keep the legacy API we need to register the option if it's not already been registered\n            if (!options.isRegistered(name)) {\n                if (isNonNullable(type)) {\n                    options.register(name, { processor: type, default: defaultVal });\n                }\n                else {\n                    options.register(name, { processor: always, default: defaultVal });\n                }\n            }\n            // Attempt to use the passed default value if nothing has been set already\n            return !options.isSet(name) && !isUndefined(defaultVal) ? defaultVal : options.get(name);\n        }\n        /**\n         * Checks that the plugin is in the editor configuration and can optionally check if the plugin has been loaded.\n         *\n         * @method hasPlugin\n         * @param {String} name The name of the plugin, as specified for the TinyMCE `plugins` option.\n         * @param {Boolean} loaded If `true`, will also check that the plugin has been loaded.\n         * @return {Boolean} If `loaded` is `true`, returns `true` if the plugin is in the configuration and has been loaded. If `loaded` is `false`, returns `true` if the plugin is in the configuration, regardless of plugin load status.\n         * @example\n         * // Returns `true` if the Comments plugin is in the editor configuration and has loaded successfully:\n         * tinymce.activeEditor.hasPlugin('tinycomments', true);\n         * // Returns `true` if the Table plugin is in the editor configuration, regardless of whether or not it loads:\n         * tinymce.activeEditor.hasPlugin('table');\n         */\n        hasPlugin(name, loaded) {\n            const hasPlugin = contains$2(getPlugins(this), name);\n            if (hasPlugin) {\n                return loaded ? PluginManager.get(name) !== undefined : true;\n            }\n            else {\n                return false;\n            }\n        }\n        /**\n         * Dispatches out a onNodeChange event to all observers. This method should be called when you\n         * need to update the UI states or element path etc.\n         *\n         * @method nodeChanged\n         * @param {Object} args Optional args to pass to NodeChange event handlers.\n         */\n        nodeChanged(args) {\n            this._nodeChangeDispatcher.nodeChanged(args);\n        }\n        addCommand(name, callback, scope) {\n            /**\n             * Callback function that gets called when a command is executed.\n             *\n             * @callback addCommandCallback\n             * @param {Boolean} ui Display UI state true/false.\n             * @param {Object} value Optional value for command.\n             * @return {Boolean} True/false state if the command was handled or not.\n             */\n            this.editorCommands.addCommand(name, callback, scope);\n        }\n        addQueryStateHandler(name, callback, scope) {\n            /**\n             * Callback function that gets called when a queryCommandState is executed.\n             *\n             * @callback addQueryStateHandlerCallback\n             * @return {Boolean} True/false state if the command is enabled or not like is it bold.\n             */\n            this.editorCommands.addQueryStateHandler(name, callback, scope);\n        }\n        addQueryValueHandler(name, callback, scope) {\n            /**\n             * Callback function that gets called when a queryCommandValue is executed.\n             *\n             * @callback addQueryValueHandlerCallback\n             * @return {Object} Value of the command or undefined.\n             */\n            this.editorCommands.addQueryValueHandler(name, callback, scope);\n        }\n        /**\n         * Adds a keyboard shortcut for some command or function.\n         *\n         * @method addShortcut\n         * @param {String} pattern Shortcut pattern. Like for example: ctrl+alt+o.\n         * @param {String} desc Text description for the command.\n         * @param {String/Function} cmdFunc Command name string or function to execute when the key is pressed.\n         * @param {Object} scope Optional scope to execute the function in.\n         * @return {Boolean} true/false state if the shortcut was added or not.\n         * @example\n         * editor.addShortcut('ctrl+a', 'description of the shortcut', () => {});\n         * editor.addShortcut('ctrl+alt+a', 'description of the shortcut', () => {});\n         * // \"meta\" maps to Command on Mac and Ctrl on PC\n         * editor.addShortcut('meta+a', 'description of the shortcut', () => {});\n         * // \"access\" maps to Control+Option on Mac and shift+alt on PC\n         * editor.addShortcut('access+a', 'description of the shortcut', () => {});\n         *\n         * editor.addShortcut('meta+access+c', 'Opens the code editor dialog.', () => {\n         *   editor.execCommand('mceCodeEditor');\n         * });\n         *\n         * editor.addShortcut('meta+shift+32', 'Inserts \"Hello, World!\" for meta+shift+space', () => {\n         *   editor.execCommand('mceInsertContent', false, 'Hello, World!');\n         * });\n         */\n        addShortcut(pattern, desc, cmdFunc, scope) {\n            this.shortcuts.add(pattern, desc, cmdFunc, scope);\n        }\n        /**\n         * Executes a registered command on the current instance. A list of available commands can be found in\n         * the tinymce command identifiers documentation.\n         *\n         * @method execCommand\n         * @param {String} cmd Command name to execute, for example mceLink or Bold.\n         * @param {Boolean} ui Specifies if a UI (dialog) should be presented or not.\n         * @param {Object/Array/String/Number/Boolean} value Optional command value, this can be anything.\n         * @param {Object} args Optional arguments object.\n         * @return {Boolean} true or false if the command was supported or not.\n         */\n        execCommand(cmd, ui, value, args) {\n            return this.editorCommands.execCommand(cmd, ui, value, args);\n        }\n        /**\n         * Returns a command specific state, for example if bold is enabled or not.\n         *\n         * @method queryCommandState\n         * @param {String} cmd Command to query state from.\n         * @return {Boolean} Command specific state, for example if bold is enabled or not.\n         */\n        queryCommandState(cmd) {\n            return this.editorCommands.queryCommandState(cmd);\n        }\n        /**\n         * Returns a command specific value, for example the current font size.\n         *\n         * @method queryCommandValue\n         * @param {String} cmd Command to query value from.\n         * @return {String} Command value, for example the current font size or an empty string (`\"\"`) if the query command is not found.\n         */\n        queryCommandValue(cmd) {\n            return this.editorCommands.queryCommandValue(cmd);\n        }\n        /**\n         * Returns true/false if the command is supported or not.\n         *\n         * @method queryCommandSupported\n         * @param {String} cmd Command that we check support for.\n         * @return {Boolean} true/false if the command is supported or not.\n         */\n        queryCommandSupported(cmd) {\n            return this.editorCommands.queryCommandSupported(cmd);\n        }\n        /**\n         * Shows the editor and hides any textarea/div that the editor is supposed to replace.\n         *\n         * @method show\n         */\n        show() {\n            const self = this;\n            if (self.hidden) {\n                self.hidden = false;\n                if (self.inline) {\n                    self.getBody().contentEditable = 'true';\n                }\n                else {\n                    DOM$1.show(self.getContainer());\n                    DOM$1.hide(self.id);\n                }\n                self.load();\n                self.dispatch('show');\n            }\n        }\n        /**\n         * Hides the editor and shows any textarea/div that the editor is supposed to replace.\n         *\n         * @method hide\n         */\n        hide() {\n            const self = this;\n            if (!self.hidden) {\n                // We must save before we hide so Safari doesn't crash\n                self.save();\n                if (self.inline) {\n                    self.getBody().contentEditable = 'false';\n                    // Make sure the editor gets blurred\n                    if (self === self.editorManager.focusedEditor) {\n                        self.editorManager.focusedEditor = null;\n                    }\n                }\n                else {\n                    DOM$1.hide(self.getContainer());\n                    DOM$1.setStyle(self.id, 'display', self.orgDisplay);\n                }\n                self.hidden = true;\n                self.dispatch('hide');\n            }\n        }\n        /**\n         * Returns true/false if the editor is hidden or not.\n         *\n         * @method isHidden\n         * @return {Boolean} True/false if the editor is hidden or not.\n         */\n        isHidden() {\n            return this.hidden;\n        }\n        /**\n         * Sets the progress state, this will display a throbber/progess for the editor.\n         * This is ideal for asynchronous operations like an AJAX save call.\n         *\n         * @method setProgressState\n         * @param {Boolean} state Boolean state if the progress should be shown or hidden.\n         * @param {Number} time Optional time to wait before the progress gets shown.\n         * @return {Boolean} Same as the input state.\n         * @example\n         * // Show progress for the active editor\n         * tinymce.activeEditor.setProgressState(true);\n         *\n         * // Hide progress for the active editor\n         * tinymce.activeEditor.setProgressState(false);\n         *\n         * // Show progress after 3 seconds\n         * tinymce.activeEditor.setProgressState(true, 3000);\n         */\n        setProgressState(state, time) {\n            this.dispatch('ProgressState', { state, time });\n        }\n        /**\n         * Loads contents from the textarea, input or other element that got converted into an editor instance.\n         * This method will move the contents from that textarea, input or other element into the editor by using setContent\n         * so all events etc that method has will get dispatched as well.\n         *\n         * @method load\n         * @param {Object} args Optional content object, this gets passed around through the whole load process.\n         */\n        load(args = {}) {\n            const self = this;\n            const elm = self.getElement();\n            if (self.removed) {\n                return;\n            }\n            if (elm) {\n                const loadArgs = {\n                    ...args,\n                    load: true\n                };\n                const value = isTextareaOrInput(elm) ? elm.value : elm.innerHTML;\n                self.setContent(value, loadArgs);\n                if (!loadArgs.no_events) {\n                    self.dispatch('LoadContent', {\n                        ...loadArgs,\n                        element: elm\n                    });\n                }\n            }\n        }\n        /**\n         * Saves the contents from an editor out to the textarea or div element that got converted into an editor instance.\n         * This method will move the HTML contents from the editor into that textarea or div by getContent\n         * so all events etc that method has will get dispatched as well.\n         *\n         * @method save\n         * @param {Object} args Optional content object, this gets passed around through the whole save process.\n         * @return {String} HTML string that got set into the textarea/div.\n         */\n        save(args = {}) {\n            const self = this;\n            let elm = self.getElement();\n            if (!elm || !self.initialized || self.removed) {\n                return '';\n            }\n            const getArgs = {\n                ...args,\n                save: true,\n                element: elm\n            };\n            let html = self.getContent(getArgs);\n            const saveArgs = { ...getArgs, content: html };\n            if (!saveArgs.no_events) {\n                self.dispatch('SaveContent', saveArgs);\n            }\n            // Always run this internal event\n            if (saveArgs.format === 'raw') {\n                self.dispatch('RawSaveContent', saveArgs);\n            }\n            html = saveArgs.content;\n            if (!isTextareaOrInput(elm)) {\n                if (args.is_removing || !self.inline) {\n                    elm.innerHTML = html;\n                }\n                // Update hidden form element\n                const form = DOM$1.getParent(self.id, 'form');\n                if (form) {\n                    each$1(form.elements, (elm) => {\n                        if (elm.name === self.id) {\n                            elm.value = html;\n                            return false;\n                        }\n                        else {\n                            return true;\n                        }\n                    });\n                }\n            }\n            else {\n                elm.value = html;\n            }\n            saveArgs.element = getArgs.element = elm = null;\n            if (saveArgs.set_dirty !== false) {\n                self.setDirty(false);\n            }\n            return html;\n        }\n        setContent(content, args) {\n            setContent(this, content, args);\n        }\n        getContent(args) {\n            return getContent(this, args);\n        }\n        /**\n         * Inserts content at caret position.\n         *\n         * @method insertContent\n         * @param {String} content Content to insert.\n         * @param {Object} args Optional args to pass to insert call.\n         */\n        insertContent(content, args) {\n            if (args) {\n                content = extend({ content }, args);\n            }\n            this.execCommand('mceInsertContent', false, content);\n        }\n        /**\n         * Resets the editors content, undo/redo history and dirty state. If `initialContent` isn't specified, then\n         * the editor is reset back to the initial start content.\n         *\n         * @method resetContent\n         * @param {String} initialContent An optional string to use as the initial content of the editor.\n         */\n        resetContent(initialContent) {\n            // Set the editor content\n            if (initialContent === undefined) {\n                // editor.startContent is generated by using the `raw` format, so we should set it the same way\n                setContent(this, this.startContent, { initial: true, format: 'raw' });\n            }\n            else {\n                setContent(this, initialContent, { initial: true });\n            }\n            // Update the editor/undo manager state\n            this.undoManager.reset();\n            this.setDirty(false);\n            // Fire a node change event\n            this.nodeChanged();\n        }\n        /**\n         * Returns true/false if the editor is dirty or not. It will get dirty if the user has made modifications to the contents.\n         *\n         * The dirty state is automatically set to `true` when the user modifies editor content after initialization or the\n         * last `editor.save()` call. This includes changes made using undo or redo.\n         *\n         * @method isDirty\n         * @return {Boolean} True/false if the editor is dirty or not. It will get dirty if the user has made modifications to the contents.\n         * @example\n         * if (tinymce.activeEditor.isDirty()) {\n         *   alert(\"You must save your contents.\");\n         * }\n         */\n        isDirty() {\n            return !this.isNotDirty;\n        }\n        /**\n         * Explicitly sets the dirty state. This will fire the dirty event if the editor dirty state is changed from false to true\n         * by invoking this method.\n         *\n         * @method setDirty\n         * @param {Boolean} state True/false if the editor is considered dirty.\n         * @example\n         * const ajaxSave = () => {\n         *   const editor = tinymce.get('elm1');\n         *\n         *   // Save contents using some XHR call\n         *   alert(editor.getContent());\n         *\n         *   editor.setDirty(false); // Force not dirty state\n         * }\n         */\n        setDirty(state) {\n            const oldState = !this.isNotDirty;\n            this.isNotDirty = !state;\n            if (state && state !== oldState) {\n                this.dispatch('dirty');\n            }\n        }\n        /**\n         * Returns the container element of the editor. The container element includes\n         * all the elements added to the page for the editor. Such as UI, iframe, etc.\n         *\n         * @method getContainer\n         * @return {Element} HTML DOM element for the editor container.\n         */\n        getContainer() {\n            const self = this;\n            if (!self.container) {\n                self.container = self.editorContainer || DOM$1.get(self.id + '_parent');\n            }\n            return self.container;\n        }\n        /**\n         * Returns the content area container element of the editor. This element\n         * holds the iframe or the editable element.\n         *\n         * @method getContentAreaContainer\n         * @return {Element} HTML DOM element for the editor area container.\n         */\n        getContentAreaContainer() {\n            return this.contentAreaContainer;\n        }\n        /**\n         * Returns the target element/textarea that got replaced with a TinyMCE editor instance.\n         *\n         * @method getElement\n         * @return {Element} HTML DOM element for the replaced element.\n         */\n        getElement() {\n            if (!this.targetElm) {\n                this.targetElm = DOM$1.get(this.id);\n            }\n            return this.targetElm;\n        }\n        /**\n         * Returns the iframes window object.\n         *\n         * @method getWin\n         * @return {Window} Iframe DOM window object.\n         */\n        getWin() {\n            const self = this;\n            if (!self.contentWindow) {\n                const elm = self.iframeElement;\n                if (elm) {\n                    self.contentWindow = elm.contentWindow;\n                }\n            }\n            return self.contentWindow;\n        }\n        /**\n         * Returns the iframes document object.\n         *\n         * @method getDoc\n         * @return {Document} Iframe DOM document object.\n         */\n        getDoc() {\n            const self = this;\n            if (!self.contentDocument) {\n                const win = self.getWin();\n                if (win) {\n                    self.contentDocument = win.document;\n                }\n            }\n            return self.contentDocument;\n        }\n        /**\n         * Returns the root element of the editable area.\n         * For a non-inline iframe-based editor, returns the iframe's body element.\n         *\n         * @method getBody\n         * @return {Element} The root element of the editable area.\n         */\n        getBody() {\n            const doc = this.getDoc();\n            return this.bodyElement ?? doc?.body ?? null;\n        }\n        /**\n         * URL converter function this gets executed each time a user adds an img, a or\n         * any other element that has a URL in it. This will be called both by the DOM and HTML\n         * manipulation functions.\n         *\n         * @method convertURL\n         * @param {String} url URL to convert.\n         * @param {String} name Attribute name src, href etc.\n         * @param {String/HTMLElement} elm Tag name or HTML DOM element depending on HTML or DOM insert.\n         * @return {String} Converted URL string.\n         */\n        convertURL(url, name, elm) {\n            const self = this, getOption = self.options.get;\n            // Use callback instead\n            const urlConverterCallback = getUrlConverterCallback(self);\n            if (isFunction(urlConverterCallback)) {\n                return urlConverterCallback.call(self, url, elm, true, name);\n            }\n            // Don't convert link href since that's the CSS files that gets loaded into the editor also skip local file URLs\n            if (!getOption('convert_urls') ||\n                elm === 'link' ||\n                (isObject(elm) && elm.nodeName === 'LINK') ||\n                url.indexOf('file:') === 0 ||\n                url.length === 0) {\n                return url;\n            }\n            const urlObject = new URI(url);\n            if (urlObject.protocol !== 'http' && urlObject.protocol !== 'https' && urlObject.protocol !== '') {\n                return url;\n            }\n            // Convert to relative\n            if (getOption('relative_urls')) {\n                return self.documentBaseURI.toRelative(url);\n            }\n            // Convert to absolute\n            url = self.documentBaseURI.toAbsolute(url, getOption('remove_script_host'));\n            return url;\n        }\n        /**\n         * Adds visual aids for tables, anchors, etc so they can be more easily edited inside the editor.\n         *\n         * @method addVisual\n         * @param {Element} elm Optional root element to loop though to find tables, etc that needs the visual aid.\n         */\n        addVisual(elm) {\n            addVisual(this, elm);\n        }\n        /**\n         * Changes the editable state of the editor's root element.\n         *\n         * @method setEditableRoot\n         * @param {Boolean} state State to set true for editable and false for non-editable.\n         */\n        setEditableRoot(state) {\n            setEditableRoot(this, state);\n        }\n        /**\n         * Returns the current editable state of the editor's root element.\n         *\n         * @method hasEditableRoot\n         * @return {Boolean} True if the root element is editable, false if it is not editable.\n         */\n        hasEditableRoot() {\n            return hasEditableRoot(this);\n        }\n        /**\n         * Announces a message to screen readers via the page-wide aria-live region, without shifting focus.\n         * Delegates to {@link tinymce.dom.AriaAnnouncer#announce}.\n         *\n         * @method announce\n         * @param {String} message The message to announce to screen readers.\n         * @param {Object} options Optional settings.\n         * @param {Boolean} options.assertive If true, uses aria-live=\"assertive\" (role=\"alert\") instead of polite.\n         * @example\n         * tinymce.activeEditor.announce('Bold on');\n         * tinymce.activeEditor.announce('Error occurred', { assertive: true });\n         */\n        announce(message, options) {\n            AriaAnnouncer.announce(message, options);\n        }\n        /**\n         * Removes the editor from the dom and tinymce collection.\n         *\n         * @method remove\n         */\n        remove() {\n            remove$1(this);\n        }\n        /**\n         * Destroys the editor instance by removing all events, element references or other resources\n         * that could leak memory. This method will be called automatically when the page is unloaded\n         * but you can also call it directly if you know what you are doing.\n         *\n         * @method destroy\n         * @param {Boolean} automatic Optional state if the destroy is an automatic destroy or user called one.\n         */\n        destroy(automatic) {\n            destroy(this, automatic);\n        }\n        /**\n         * Uploads all data uri/blob uri images in the editor contents to server.\n         *\n         * @method uploadImages\n         * @return {Promise} Promise instance with images and status for each image.\n         */\n        uploadImages() {\n            return this.editorUpload.uploadImages();\n        }\n        // Internal functions\n        _scanForImages() {\n            return this.editorUpload.scanForImages();\n        }\n    }\n\n    const DOM = DOMUtils.DOM;\n    const each = Tools.each;\n    let boundGlobalEvents = false;\n    let beforeUnloadDelegate;\n    let editors = [];\n    const globalEventDelegate = (e) => {\n        const type = e.type;\n        each(EditorManager.get(), (editor) => {\n            switch (type) {\n                case 'scroll':\n                    editor.dispatch('ScrollWindow', e);\n                    break;\n                case 'resize':\n                    editor.dispatch('ResizeWindow', e);\n                    break;\n            }\n        });\n    };\n    const toggleGlobalEvents = (state) => {\n        if (state !== boundGlobalEvents) {\n            const DOM = DOMUtils.DOM;\n            if (state) {\n                DOM.bind(window, 'resize', globalEventDelegate);\n                DOM.bind(window, 'scroll', globalEventDelegate);\n            }\n            else {\n                DOM.unbind(window, 'resize', globalEventDelegate);\n                DOM.unbind(window, 'scroll', globalEventDelegate);\n            }\n            boundGlobalEvents = state;\n        }\n    };\n    const removeEditorFromList = (targetEditor) => {\n        const oldEditors = editors;\n        editors = filter$5(editors, (editor) => {\n            return targetEditor !== editor;\n        });\n        // Select another editor since the active one was removed\n        if (EditorManager.activeEditor === targetEditor) {\n            EditorManager.activeEditor = editors.length > 0 ? editors[0] : null;\n        }\n        // Clear focusedEditor if necessary, so that we don't try to blur the destroyed editor\n        if (EditorManager.focusedEditor === targetEditor) {\n            EditorManager.focusedEditor = null;\n        }\n        return oldEditors.length !== editors.length;\n    };\n    const purgeDestroyedEditor = (editor) => {\n        // User has manually destroyed the editor lets clean up the mess\n        if (editor && editor.initialized && !(editor.getContainer() || editor.getBody()).parentNode) {\n            removeEditorFromList(editor);\n            editor.unbindAllNativeEvents();\n            editor.destroy(true);\n            editor.removed = true;\n        }\n    };\n    const isQuirksMode = document.compatMode !== 'CSS1Compat';\n    const EditorManager = {\n        ...Observable,\n        baseURI: null,\n        baseURL: null,\n        /**\n         * Object containing the options that will be passed by default to the <code>init</code> method upon each initialization of an editor. These defaults will be shallow merged with other options passed to <code>init</code>.\n         *\n         * @property defaultOptions\n         * @type Object\n         */\n        defaultOptions: {},\n        documentBaseURL: null,\n        suffix: null,\n        /**\n         * A uuid string to anonymously identify the page tinymce is loaded in\n         *\n         * @property pageUid\n         * @type String\n         */\n        pageUid: uuidV4(),\n        /**\n         * Major version of TinyMCE build.\n         *\n         * @property majorVersion\n         * @type String\n         */\n        majorVersion: '8',\n        /**\n         * Minor version of TinyMCE build.\n         *\n         * @property minorVersion\n         * @type String\n         */\n        minorVersion: '10.0',\n        /**\n         * Release date of TinyMCE build.\n         *\n         * @property releaseDate\n         * @type String\n         */\n        releaseDate: '2026-10-14',\n        /**\n         * Collection of language pack data.\n         *\n         * @property i18n\n         * @type Object\n         */\n        i18n: I18n,\n        /**\n         * Currently active editor instance.\n         *\n         * @property activeEditor\n         * @type tinymce.Editor\n         * @example\n         * tinyMCE.activeEditor.selection.getContent();\n         * tinymce.EditorManager.activeEditor.selection.getContent();\n         */\n        activeEditor: null,\n        focusedEditor: null,\n        setup() {\n            const self = this;\n            let baseURL = '';\n            let suffix = '';\n            // Get base URL for the current document\n            let documentBaseURL = URI.getDocumentBaseUrl(document.location);\n            // Check if the URL is a document based format like: http://site/dir/file and file:///\n            // leave other formats like applewebdata://... intact\n            if (/^[^:]+:\\/\\/\\/?[^\\/]+\\//.test(documentBaseURL)) {\n                documentBaseURL = documentBaseURL.replace(/[\\?#].*$/, '').replace(/[\\/\\\\][^\\/]+$/, '');\n                if (!/[\\/\\\\]$/.test(documentBaseURL)) {\n                    documentBaseURL += '/';\n                }\n            }\n            // If tinymce is defined and has a base use that or use the old tinyMCEPreInit\n            const preInit = window.tinymce || window.tinyMCEPreInit;\n            if (preInit) {\n                baseURL = preInit.base || preInit.baseURL;\n                suffix = preInit.suffix;\n            }\n            else {\n                // Get base where the tinymce script is located\n                const scripts = document.getElementsByTagName('script');\n                for (let i = 0; i < scripts.length; i++) {\n                    const src = scripts[i].src || '';\n                    if (src === '') {\n                        continue;\n                    }\n                    // Script types supported:\n                    // tinymce.js tinymce.min.js tinymce.dev.js\n                    // tinymce.jquery.js tinymce.jquery.min.js tinymce.jquery.dev.js\n                    // tinymce.full.js tinymce.full.min.js tinymce.full.dev.js\n                    const srcScript = src.substring(src.lastIndexOf('/'));\n                    if (/tinymce(\\.full|\\.jquery|)(\\.min|\\.dev|)\\.js/.test(src)) {\n                        if (srcScript.indexOf('.min') !== -1) {\n                            suffix = '.min';\n                        }\n                        baseURL = src.substring(0, src.lastIndexOf('/'));\n                        break;\n                    }\n                }\n                // We didn't find any baseURL by looking at the script elements\n                // Try to use the document.currentScript as a fallback\n                if (!baseURL && document.currentScript) {\n                    const src = document.currentScript.src;\n                    if (src.indexOf('.min') !== -1) {\n                        suffix = '.min';\n                    }\n                    baseURL = src.substring(0, src.lastIndexOf('/'));\n                }\n            }\n            /**\n             * Base URL where the root directory if TinyMCE is located.\n             *\n             * @property baseURL\n             * @type String\n             */\n            self.baseURL = new URI(documentBaseURL).toAbsolute(baseURL);\n            /**\n             * Document base URL where the current document is located.\n             *\n             * @property documentBaseURL\n             * @type String\n             */\n            self.documentBaseURL = documentBaseURL;\n            /**\n             * Absolute baseURI for the installation path of TinyMCE.\n             *\n             * @property baseURI\n             * @type tinymce.util.URI\n             */\n            self.baseURI = new URI(self.baseURL);\n            /**\n             * Current suffix to add to each plugin/theme that gets loaded for example \".min\".\n             *\n             * @property suffix\n             * @type String\n             */\n            self.suffix = suffix;\n            setup$C(self);\n            // Lock certain properties to reduce misuse\n            each$e(['majorVersion', 'minorVersion', 'releaseDate', 'pageUid', '_addLicenseKeyManager'], (property) => Object.defineProperty(self, property, {\n                writable: false,\n                configurable: false,\n                enumerable: true,\n            }));\n        },\n        /**\n         * Overrides the default options for editor instances. The <code>overrideDefaults</code> method replaces the <code>defaultOptions</code>, including any set by a previous call to the <code>overrideDefaults</code> method.\n         * <br /><br />\n         * When using the Tiny Cloud, some of these defaults are required for the cloud-based editor to function.\n         * <br /><br />\n         * Therefore, when using <code>overrideDefaults</code> with the cloud-based editor, any newly integrated options must be combined with the options in <code>tinymce.defaultOptions</code>.\n         *\n         * @method overrideDefaults\n         * @param {Object} defaultOptions Default options object.\n         * @example\n         * const customOptions = {\n         *   toolbar_sticky: true\n         * };\n         *\n         * tinymce.overrideDefaults({\n         *   ...tinymce.defaultOptions,\n         *   ...customOptions\n         * });\n         */\n        overrideDefaults(defaultOptions) {\n            const baseUrl = defaultOptions.base_url;\n            if (baseUrl) {\n                this._setBaseUrl(baseUrl);\n            }\n            const suffix = defaultOptions.suffix;\n            if (suffix) {\n                this.suffix = suffix;\n            }\n            this.defaultOptions = defaultOptions;\n            const pluginBaseUrls = defaultOptions.plugin_base_urls;\n            if (pluginBaseUrls !== undefined) {\n                each$d(pluginBaseUrls, (pluginBaseUrl, pluginName) => {\n                    AddOnManager.PluginManager.urls[pluginName] = pluginBaseUrl;\n                });\n            }\n        },\n        /**\n         * Initializes a set of editors. This method will create editors based on various settings.\n         * <br /><br />\n         * For information on basic usage of <code>init</code>, see: <a href=\"https://www.tiny.cloud/docs/tinymce/8/basic-setup/\">Basic setup</a>.\n         *\n         * @method init\n         * @param {Object} options Options object to be passed to each editor instance.\n         * @return {Promise} Promise that gets resolved with an array of editors when all editor instances are initialized.\n         * @example\n         * // Initializes a editor using the longer method\n         * tinymce.EditorManager.init({\n         *    some_settings : 'some value'\n         * });\n         *\n         * // Initializes a editor instance using the shorter version and with a promise\n         * tinymce.init({\n         *   some_settings : 'some value'\n         * }).then((editors) => {\n         *   ...\n         * });\n         */\n        init(options) {\n            const self = this;\n            let result;\n            const invalidInlineTargets = Tools.makeMap('area base basefont br col frame hr img input isindex link meta param embed source wbr track ' +\n                'colgroup option table tbody tfoot thead tr th td script noscript style textarea video audio iframe object menu', ' ');\n            const isInvalidInlineTarget = (options, elm) => options.inline && elm.tagName.toLowerCase() in invalidInlineTargets;\n            const createId = (elm) => {\n                let id = elm.id;\n                if (!id) {\n                    id = get$b(elm, 'name').filter((name) => !DOM.get(name)).getOrThunk(DOM.uniqueId);\n                    elm.setAttribute('id', id);\n                }\n                return id;\n            };\n            const execCallback = (name) => {\n                const callback = options[name];\n                if (!callback) {\n                    return;\n                }\n                return callback.apply(self, []);\n            };\n            const findTargets = (options) => {\n                if (Env.browser.isIE() || Env.browser.isEdge()) {\n                    initError('TinyMCE does not support the browser you are using. For a list of supported' +\n                        ' browsers please see: https://www.tiny.cloud/docs/tinymce/8/support/#supportedwebbrowsers');\n                    return [];\n                }\n                else if (isQuirksMode) {\n                    initError('Failed to initialize the editor as the document is not in standards mode. ' +\n                        'TinyMCE requires standards mode.');\n                    return [];\n                }\n                else if (isString(options.selector)) {\n                    return DOM.select(options.selector);\n                }\n                else if (isNonNullable(options.target)) {\n                    return [options.target];\n                }\n                else {\n                    return [];\n                }\n            };\n            let provideResults = (editors) => {\n                result = editors;\n            };\n            const initEditors = () => {\n                let initCount = 0;\n                const editors = [];\n                let targets;\n                const createEditor = (id, options, targetElm) => {\n                    const editor = new Editor(id, options, self);\n                    editors.push(editor);\n                    editor.on('init', () => {\n                        if (++initCount === targets.length) {\n                            provideResults(editors);\n                        }\n                    });\n                    editor.targetElm = editor.targetElm || targetElm;\n                    editor.render();\n                };\n                DOM.unbind(window, 'ready', initEditors);\n                execCallback('onpageload');\n                targets = unique$1(findTargets(options));\n                Tools.each(targets, (elm) => {\n                    purgeDestroyedEditor(self.get(elm.id));\n                });\n                targets = Tools.grep(targets, (elm) => {\n                    return !self.get(elm.id);\n                });\n                if (targets.length === 0) {\n                    provideResults([]);\n                }\n                else {\n                    each(targets, (elm) => {\n                        if (isInvalidInlineTarget(options, elm)) {\n                            initError('Could not initialize inline editor on invalid inline target element', elm);\n                        }\n                        else {\n                            createEditor(createId(elm), options, elm);\n                        }\n                    });\n                }\n            };\n            DOM.bind(window, 'ready', initEditors);\n            return new Promise((resolve) => {\n                if (result) {\n                    resolve(result);\n                }\n                else {\n                    provideResults = (editors) => {\n                        resolve(editors);\n                    };\n                }\n            });\n        },\n        /**\n         * Returns an editor instance for a given id.\n         *\n         * @method get\n         * @param {String/Number} id The id or index of the editor instance to return.\n         * @return {tinymce.Editor/Array} Editor instance or an array of editor instances.\n         * @example\n         * // Adds an onclick event to an editor by id\n         * tinymce.get('mytextbox').on('click', (e) => {\n         *   ed.windowManager.alert('Hello world!');\n         * });\n         *\n         * // Adds an onclick event to an editor by index\n         * tinymce.get(0).on('click', (e) => {\n         *   ed.windowManager.alert('Hello world!');\n         * });\n         *\n         * // Adds an onclick event to an editor by id (longer version)\n         * tinymce.EditorManager.get('mytextbox').on('click', (e) => {\n         *   ed.windowManager.alert('Hello world!');\n         * });\n         */\n        get(id) {\n            if (arguments.length === 0) {\n                return editors.slice(0);\n            }\n            else if (isString(id)) {\n                return find$2(editors, (editor) => {\n                    return editor.id === id;\n                }).getOr(null);\n            }\n            else if (isNumber(id)) {\n                return editors[id] ? editors[id] : null;\n            }\n            else {\n                return null;\n            }\n        },\n        /**\n         * Adds an editor instance to the editor collection. This will also set it as the active editor.\n         *\n         * @method add\n         * @param {tinymce.Editor} editor Editor instance to add to the collection.\n         * @return {tinymce.Editor} The same instance that got passed in.\n         */\n        add(editor) {\n            const self = this;\n            // Prevent existing editors from being added again this could happen\n            // if a user calls createEditor then render or add multiple times.\n            const existingEditor = self.get(editor.id);\n            if (existingEditor === editor) {\n                return editor;\n            }\n            if (existingEditor === null) {\n                editors.push(editor);\n            }\n            toggleGlobalEvents(true);\n            // Doesn't call setActive method since we don't want\n            // to fire a bunch of activate/deactivate calls while initializing\n            self.activeEditor = editor;\n            self.dispatch('AddEditor', { editor });\n            if (!beforeUnloadDelegate) {\n                beforeUnloadDelegate = (e) => {\n                    const event = self.dispatch('BeforeUnload');\n                    if (event.returnValue) {\n                        // browsers are all a little bit special about this: https://developer.mozilla.org/en-US/docs/Web/API/BeforeUnloadEvent\n                        e.preventDefault();\n                        e.returnValue = event.returnValue;\n                        return event.returnValue;\n                    }\n                };\n                window.addEventListener('beforeunload', beforeUnloadDelegate);\n            }\n            return editor;\n        },\n        /**\n         * Creates an editor instance and adds it to the EditorManager collection.\n         *\n         * @method createEditor\n         * @param {String} id Instance id to use for editor.\n         * @param {Object} options Editor instance options.\n         * @return {tinymce.Editor} Editor instance that got created.\n         */\n        createEditor(id, options) {\n            return this.add(new Editor(id, options, this));\n        },\n        /**\n         * Removes a editor or editors form page.\n         *\n         * @example\n         * // Remove all editors bound to divs\n         * tinymce.remove('div');\n         *\n         * // Remove all editors bound to textareas\n         * tinymce.remove('textarea');\n         *\n         * // Remove all editors\n         * tinymce.remove();\n         *\n         * // Remove specific instance by id\n         * tinymce.remove('#id');\n         *\n         * @method remove\n         * @param {tinymce.Editor/String/Object} [selector] CSS selector or editor instance to remove.\n         * @return {tinymce.Editor} The editor that got passed in will be return if it was found otherwise null.\n         */\n        remove(selector) {\n            const self = this;\n            let editor;\n            // Remove all editors\n            if (!selector) {\n                for (let i = editors.length - 1; i >= 0; i--) {\n                    self.remove(editors[i]);\n                }\n                return;\n            }\n            // Remove editors by selector\n            if (isString(selector)) {\n                each(DOM.select(selector), (elm) => {\n                    editor = self.get(elm.id);\n                    if (editor) {\n                        self.remove(editor);\n                    }\n                });\n                return;\n            }\n            // Remove specific editor\n            editor = selector;\n            // Not in the collection\n            if (isNull(self.get(editor.id))) {\n                return null;\n            }\n            if (removeEditorFromList(editor)) {\n                self.dispatch('RemoveEditor', { editor });\n            }\n            if (editors.length === 0) {\n                window.removeEventListener('beforeunload', beforeUnloadDelegate);\n            }\n            editor.remove();\n            toggleGlobalEvents(editors.length > 0);\n            return editor;\n        },\n        /**\n         * Executes a specific command on the currently active editor.\n         *\n         * @method execCommand\n         * @param {String} cmd Command to perform for example Bold.\n         * @param {Boolean} ui Optional boolean state if a UI should be presented for the command or not.\n         * @param {Object/String/Number/Boolean} value Optional value parameter like for example an URL to a link.\n         * @return {Boolean} true/false if the command was executed or not.\n         */\n        execCommand(cmd, ui, value) {\n            const self = this;\n            const editorId = isObject(value) ? value.id ?? value.index : value;\n            // Manager commands\n            switch (cmd) {\n                case 'mceAddEditor': {\n                    if (!self.get(editorId)) {\n                        const editorOptions = value.options;\n                        new Editor(editorId, editorOptions, self).render();\n                    }\n                    return true;\n                }\n                case 'mceRemoveEditor': {\n                    const editor = self.get(editorId);\n                    if (editor) {\n                        editor.remove();\n                    }\n                    return true;\n                }\n                case 'mceToggleEditor': {\n                    const editor = self.get(editorId);\n                    if (!editor) {\n                        self.execCommand('mceAddEditor', false, value);\n                        return true;\n                    }\n                    if (editor.isHidden()) {\n                        editor.show();\n                    }\n                    else {\n                        editor.hide();\n                    }\n                    return true;\n                }\n            }\n            // Run command on active editor\n            if (self.activeEditor) {\n                return self.activeEditor.execCommand(cmd, ui, value);\n            }\n            return false;\n        },\n        /**\n         * Calls the save method on all editor instances in the collection. This can be useful when a form is to be submitted.\n         *\n         * @method triggerSave\n         * @example\n         * // Saves all contents\n         * tinyMCE.triggerSave();\n         */\n        triggerSave: () => {\n            each(editors, (editor) => {\n                editor.save();\n            });\n        },\n        /**\n         * Adds a language pack, this gets called by the loaded language files like en.js.\n         *\n         * @method addI18n\n         * @param {String} code Optional language code.\n         * @param {Object} items Name/value object with translations.\n         */\n        addI18n: (code, items) => {\n            I18n.add(code, items);\n        },\n        /**\n         * Translates the specified string using the language pack items.\n         *\n         * @method translate\n         * @param {String/Array/Object} text String to translate\n         * @return {String} Translated string.\n         */\n        translate: (text) => {\n            return I18n.translate(text);\n        },\n        /**\n         * Sets the active editor instance and fires the deactivate/activate events.\n         *\n         * @method setActive\n         * @param {tinymce.Editor} editor Editor instance to set as the active instance.\n         */\n        setActive(editor) {\n            const activeEditor = this.activeEditor;\n            if (this.activeEditor !== editor) {\n                if (activeEditor) {\n                    activeEditor.dispatch('deactivate', { relatedTarget: editor });\n                }\n                editor.dispatch('activate', { relatedTarget: activeEditor });\n            }\n            this.activeEditor = editor;\n        },\n        _setBaseUrl(baseUrl) {\n            this.baseURL = new URI(this.documentBaseURL).toAbsolute(baseUrl.replace(/\\/+$/, ''));\n            this.baseURI = new URI(this.baseURL);\n        },\n        _addLicenseKeyManager: (addOn) => LicenseKeyManagerLoader.add(addOn),\n    };\n    EditorManager.setup();\n\n    // The FakeClipboard has been designed to match the native Clipboard API as closely as possible\n    const setup = () => {\n        const dataValue = value$1();\n        const FakeClipboardItem = (items) => ({\n            items,\n            types: keys(items),\n            getType: (type) => get$b(items, type).getOrUndefined()\n        });\n        const write = (data) => {\n            dataValue.set(data);\n        };\n        const read = () => dataValue.get().getOrUndefined();\n        const clear = dataValue.clear;\n        return {\n            FakeClipboardItem,\n            write,\n            read,\n            clear\n        };\n    };\n    const FakeClipboard = setup();\n\n    /**\n     * Contains various tools for rect/position calculation.\n     *\n     * @class tinymce.geom.Rect\n     */\n    const min = Math.min, max = Math.max, round = Math.round;\n    /**\n     * Returns the rect positioned based on the relative position name\n     * to the target rect.\n     *\n     * @method relativePosition\n     * @param {Rect} rect Source rect to modify into a new rect.\n     * @param {Rect} targetRect Rect to move relative to based on the rel option.\n     * @param {String} rel Relative position. For example: tr-bl.\n     */\n    const relativePosition = (rect, targetRect, rel) => {\n        let x = targetRect.x;\n        let y = targetRect.y;\n        const w = rect.w;\n        const h = rect.h;\n        const targetW = targetRect.w;\n        const targetH = targetRect.h;\n        const relChars = (rel || '').split('');\n        if (relChars[0] === 'b') {\n            y += targetH;\n        }\n        if (relChars[1] === 'r') {\n            x += targetW;\n        }\n        if (relChars[0] === 'c') {\n            y += round(targetH / 2);\n        }\n        if (relChars[1] === 'c') {\n            x += round(targetW / 2);\n        }\n        if (relChars[3] === 'b') {\n            y -= h;\n        }\n        if (relChars[4] === 'r') {\n            x -= w;\n        }\n        if (relChars[3] === 'c') {\n            y -= round(h / 2);\n        }\n        if (relChars[4] === 'c') {\n            x -= round(w / 2);\n        }\n        return create$2(x, y, w, h);\n    };\n    /**\n     * Tests various positions to get the most suitable one.\n     *\n     * @method findBestRelativePosition\n     * @param {Rect} rect Rect to use as source.\n     * @param {Rect} targetRect Rect to move relative to.\n     * @param {Rect} constrainRect Rect to constrain within.\n     * @param {Array} rels Array of relative positions to test against.\n     */\n    const findBestRelativePosition = (rect, targetRect, constrainRect, rels) => {\n        for (let i = 0; i < rels.length; i++) {\n            const pos = relativePosition(rect, targetRect, rels[i]);\n            if (pos.x >= constrainRect.x && pos.x + pos.w <= constrainRect.w + constrainRect.x &&\n                pos.y >= constrainRect.y && pos.y + pos.h <= constrainRect.h + constrainRect.y) {\n                return rels[i];\n            }\n        }\n        return null;\n    };\n    /**\n     * Inflates the rect in all directions.\n     *\n     * @method inflate\n     * @param {Rect} rect Rect to expand.\n     * @param {Number} w Relative width to expand by.\n     * @param {Number} h Relative height to expand by.\n     * @return {Rect} New expanded rect.\n     */\n    const inflate = (rect, w, h) => {\n        return create$2(rect.x - w, rect.y - h, rect.w + w * 2, rect.h + h * 2);\n    };\n    /**\n     * Returns the intersection of the specified rectangles.\n     *\n     * @method intersect\n     * @param {Rect} rect The first rectangle to compare.\n     * @param {Rect} cropRect The second rectangle to compare.\n     * @return {Rect} The intersection of the two rectangles or null if they don't intersect.\n     */\n    const intersect = (rect, cropRect) => {\n        const x1 = max(rect.x, cropRect.x);\n        const y1 = max(rect.y, cropRect.y);\n        const x2 = min(rect.x + rect.w, cropRect.x + cropRect.w);\n        const y2 = min(rect.y + rect.h, cropRect.y + cropRect.h);\n        if (x2 - x1 < 0 || y2 - y1 < 0) {\n            return null;\n        }\n        return create$2(x1, y1, x2 - x1, y2 - y1);\n    };\n    /**\n     * Returns a rect clamped within the specified clamp rect. This forces the\n     * rect to be inside the clamp rect.\n     *\n     * @method clamp\n     * @param {Rect} rect Rectangle to force within clamp rect.\n     * @param {Rect} clampRect Rectable to force within.\n     * @param {Boolean} fixedSize True/false if size should be fixed.\n     * @return {Rect} Clamped rect.\n     */\n    const clamp = (rect, clampRect, fixedSize) => {\n        let x1 = rect.x;\n        let y1 = rect.y;\n        let x2 = rect.x + rect.w;\n        let y2 = rect.y + rect.h;\n        const cx2 = clampRect.x + clampRect.w;\n        const cy2 = clampRect.y + clampRect.h;\n        const underflowX1 = max(0, clampRect.x - x1);\n        const underflowY1 = max(0, clampRect.y - y1);\n        const overflowX2 = max(0, x2 - cx2);\n        const overflowY2 = max(0, y2 - cy2);\n        x1 += underflowX1;\n        y1 += underflowY1;\n        if (fixedSize) {\n            x2 += underflowX1;\n            y2 += underflowY1;\n            x1 -= overflowX2;\n            y1 -= overflowY2;\n        }\n        x2 -= overflowX2;\n        y2 -= overflowY2;\n        return create$2(x1, y1, x2 - x1, y2 - y1);\n    };\n    /**\n     * Creates a new rectangle object.\n     *\n     * @method create\n     * @param {Number} x Rectangle x location.\n     * @param {Number} y Rectangle y location.\n     * @param {Number} w Rectangle width.\n     * @param {Number} h Rectangle height.\n     * @return {Rect} New rectangle object.\n     */\n    const create$2 = (x, y, w, h) => {\n        return { x, y, w, h };\n    };\n    /**\n     * Creates a new rectangle object form a clientRects object.\n     *\n     * @method fromClientRect\n     * @param {ClientRect} clientRect DOM ClientRect object.\n     * @return {Rect} New rectangle object.\n     */\n    const fromClientRect = (clientRect) => {\n        return create$2(clientRect.left, clientRect.top, clientRect.width, clientRect.height);\n    };\n    const Rect = {\n        inflate,\n        relativePosition,\n        findBestRelativePosition,\n        intersect,\n        clamp,\n        create: create$2,\n        fromClientRect\n    };\n\n    const awaiter = (resolveCb, rejectCb, timeout = 1000) => {\n        let done = false;\n        let timer = null;\n        const complete = (completer) => (...args) => {\n            if (!done) {\n                done = true;\n                if (timer !== null) {\n                    window.clearTimeout(timer);\n                    timer = null;\n                }\n                completer.apply(null, args);\n            }\n        };\n        const resolve = complete(resolveCb);\n        const reject = complete(rejectCb);\n        const start = (...args) => {\n            if (!done && timer === null) {\n                timer = window.setTimeout(() => reject.apply(null, args), timeout);\n            }\n        };\n        return {\n            start,\n            resolve,\n            reject\n        };\n    };\n    const create$1 = () => {\n        const tasks = {};\n        const resultFns = {};\n        const resources = {};\n        const load = (id, url) => {\n            const loadErrMsg = `Script at URL \"${url}\" failed to load`;\n            const runErrMsg = `Script at URL \"${url}\" did not call \\`tinymce.Resource.add('${id}', data)\\` within 1 second`;\n            if (tasks[id] !== undefined) {\n                return tasks[id];\n            }\n            else {\n                const task = new Promise((resolve, reject) => {\n                    const waiter = awaiter(resolve, reject);\n                    resultFns[id] = waiter.resolve;\n                    ScriptLoader.ScriptLoader.loadScript(url).then(() => waiter.start(runErrMsg), () => waiter.reject(loadErrMsg));\n                });\n                tasks[id] = task;\n                return task;\n            }\n        };\n        const add = (id, data) => {\n            if (resultFns[id] !== undefined) {\n                resultFns[id](data);\n                delete resultFns[id];\n            }\n            tasks[id] = Promise.resolve(data);\n            resources[id] = data;\n        };\n        const has = (id) => {\n            return id in resources;\n        };\n        const unload = (id) => {\n            delete tasks[id];\n            delete resources[id];\n        };\n        const get = (id) => resources[id];\n        return {\n            load,\n            add,\n            has,\n            get,\n            unload\n        };\n    };\n    const Resource = create$1();\n\n    // Simple stub of localstorage with strict security settings #TINY-1782\n    const create = () => (() => {\n        let data = {};\n        let keys = [];\n        const storage = {\n            getItem: (key) => {\n                const item = data[key];\n                return item ? item : null;\n            },\n            setItem: (key, value) => {\n                keys.push(key);\n                data[key] = String(value);\n            },\n            key: (index) => {\n                return keys[index];\n            },\n            removeItem: (key) => {\n                keys = keys.filter((k) => k === key);\n                delete data[key];\n            },\n            clear: () => {\n                keys = [];\n                data = {};\n            },\n            length: 0\n        };\n        Object.defineProperty(storage, 'length', {\n            get: () => keys.length,\n            configurable: false,\n            enumerable: false\n        });\n        return storage;\n    })();\n\n    /**\n     * @class tinymce.util.LocalStorage\n     * @static\n     * @version 4.0\n     * @private\n     * @example\n     * tinymce.util.LocalStorage.setItem('key', 'value');\n     * const value = tinymce.util.LocalStorage.getItem('key');\n     */\n    let localStorage;\n    // Browsers with certain strict security settings will explode when trying to access localStorage\n    // so we need to do a try/catch and a simple stub here. #TINY-1782 & #TINY-5935\n    try {\n        const test = '__storage_test__';\n        localStorage = window.localStorage;\n        // Make sure we can set a value, as storage may also be full\n        localStorage.setItem(test, test);\n        localStorage.removeItem(test);\n    }\n    catch {\n        localStorage = create();\n    }\n    var LocalStorage = localStorage;\n\n    /**\n     * @include ../../../../../tools/docs/tinymce.js\n     */\n    /**\n     * @include ../../../../../tools/docs/tinymce.Event.js\n     */\n    /**\n     * @include ../../../../../tools/docs/tinymce.editor.ui.Ui.js\n     */\n    const publicApi = {\n        geom: {\n            Rect\n        },\n        util: {\n            Delay,\n            Tools,\n            VK,\n            URI,\n            EventDispatcher,\n            Observable,\n            I18n,\n            LocalStorage,\n            ImageUploader\n        },\n        dom: {\n            EventUtils,\n            TreeWalker: DomTreeWalker,\n            TextSeeker,\n            DOMUtils,\n            ScriptLoader,\n            RangeUtils,\n            Serializer: DomSerializer,\n            StyleSheetLoader,\n            ControlSelection,\n            BookmarkManager,\n            Selection: EditorSelection,\n            AriaAnnouncer,\n            Event: EventUtils.Event\n        },\n        html: {\n            Styles,\n            Entities,\n            Node: AstNode,\n            Schema,\n            DomParser,\n            Writer,\n            Serializer: HtmlSerializer\n        },\n        Env,\n        AddOnManager,\n        Annotator,\n        Formatter,\n        UndoManager,\n        EditorCommands,\n        WindowManager,\n        NotificationManager,\n        EditorObservable,\n        Shortcuts,\n        Editor,\n        FocusManager,\n        EditorManager,\n        // Global instances\n        DOM: DOMUtils.DOM,\n        ScriptLoader: ScriptLoader.ScriptLoader,\n        PluginManager,\n        ThemeManager,\n        ModelManager,\n        IconManager,\n        Resource,\n        FakeClipboard,\n        // Global utility functions\n        trim: Tools.trim,\n        isArray: Tools.isArray,\n        is: Tools.is,\n        toArray: Tools.toArray,\n        makeMap: Tools.makeMap,\n        each: Tools.each,\n        map: Tools.map,\n        grep: Tools.grep,\n        inArray: Tools.inArray,\n        extend: Tools.extend,\n        walk: Tools.walk,\n        resolve: Tools.resolve,\n        explode: Tools.explode,\n        _addCacheSuffix: Tools._addCacheSuffix\n    };\n    const tinymce$1 = Tools.extend(EditorManager, publicApi);\n\n    const exportToModuleLoaders = (tinymce) => {\n        if (typeof module === 'object') {\n            try {\n                module.exports = tinymce;\n            }\n            catch {\n                // It will thrown an error when running this module\n                // within rspack where the module.exports object is sealed\n            }\n        }\n    };\n    const exportToWindowGlobal = (tinymce) => {\n        window.tinymce = tinymce;\n        window.tinyMCE = tinymce;\n    };\n    exportToWindowGlobal(tinymce$1);\n    exportToModuleLoaders(tinymce$1);\n\n})();\n", "/**\n * TinyMCE version 8.10.0 (2026-10-14)\n */\n\n(function () {\n    'use strict';\n\n    var global$1 = tinymce.util.Tools.resolve('tinymce.ModelManager');\n\n    /* eslint-disable @typescript-eslint/no-wrapper-object-types */\n    const hasProto = (v, constructor, predicate) => {\n        if (predicate(v, constructor.prototype)) {\n            return true;\n        }\n        else {\n            // String-based fallback time\n            return v.constructor?.name === constructor.name;\n        }\n    };\n    const typeOf = (x) => {\n        const t = typeof x;\n        if (x === null) {\n            return 'null';\n        }\n        else if (t === 'object' && Array.isArray(x)) {\n            return 'array';\n        }\n        else if (t === 'object' && hasProto(x, String, (o, proto) => proto.isPrototypeOf(o))) {\n            return 'string';\n        }\n        else {\n            return t;\n        }\n    };\n    const isType$1 = (type) => (value) => typeOf(value) === type;\n    const isSimpleType = (type) => (value) => typeof value === type;\n    const eq$2 = (t) => (a) => t === a;\n    const isString = isType$1('string');\n    const isObject = isType$1('object');\n    const isArray = isType$1('array');\n    const isNull = eq$2(null);\n    const isBoolean = isSimpleType('boolean');\n    const isUndefined = eq$2(undefined);\n    const isNullable = (a) => a === null || a === undefined;\n    const isNonNullable = (a) => !isNullable(a);\n    const isFunction = isSimpleType('function');\n    const isNumber = isSimpleType('number');\n\n    const noop = () => { };\n    /** Compose a unary function with an n-ary function */\n    const compose = (fa, fb) => {\n        return (...args) => {\n            return fa(fb.apply(null, args));\n        };\n    };\n    /** Compose two unary functions. Similar to compose, but avoids using Function.prototype.apply. */\n    const compose1 = (fbc, fab) => (a) => fbc(fab(a));\n    const constant = (value) => {\n        return () => {\n            return value;\n        };\n    };\n    const identity = (x) => {\n        return x;\n    };\n    const tripleEquals = (a, b) => {\n        return a === b;\n    };\n    function curry(fn, ...initialArgs) {\n        return (...restArgs) => {\n            const all = initialArgs.concat(restArgs);\n            return fn.apply(null, all);\n        };\n    }\n    const not = (f) => (t) => !f(t);\n    const die = (msg) => {\n        return () => {\n            throw new Error(msg);\n        };\n    };\n    const apply = (f) => {\n        return f();\n    };\n    const never = constant(false);\n    const always = constant(true);\n\n    /**\n     * The `Optional` type represents a value (of any type) that potentially does\n     * not exist. Any `Optional<T>` can either be a `Some<T>` (in which case the\n     * value does exist) or a `None` (in which case the value does not exist). This\n     * module defines a whole lot of FP-inspired utility functions for dealing with\n     * `Optional` objects.\n     *\n     * Comparison with null or undefined:\n     * - We don't get fancy null coalescing operators with `Optional`\n     * - We do get fancy helper functions with `Optional`\n     * - `Optional` support nesting, and allow for the type to still be nullable (or\n     * another `Optional`)\n     * - There is no option to turn off strict-optional-checks like there is for\n     * strict-null-checks\n     */\n    class Optional {\n        tag;\n        value;\n        // Sneaky optimisation: every instance of Optional.none is identical, so just\n        // reuse the same object\n        static singletonNone = new Optional(false);\n        // The internal representation has a `tag` and a `value`, but both are\n        // private: able to be console.logged, but not able to be accessed by code\n        constructor(tag, value) {\n            this.tag = tag;\n            this.value = value;\n        }\n        // --- Identities ---\n        /**\n         * Creates a new `Optional<T>` that **does** contain a value.\n         */\n        static some(value) {\n            return new Optional(true, value);\n        }\n        /**\n         * Create a new `Optional<T>` that **does not** contain a value. `T` can be\n         * any type because we don't actually have a `T`.\n         */\n        static none() {\n            return Optional.singletonNone;\n        }\n        /**\n         * Perform a transform on an `Optional` type. Regardless of whether this\n         * `Optional` contains a value or not, `fold` will return a value of type `U`.\n         * If this `Optional` does not contain a value, the `U` will be created by\n         * calling `onNone`. If this `Optional` does contain a value, the `U` will be\n         * created by calling `onSome`.\n         *\n         * For the FP enthusiasts in the room, this function:\n         * 1. Could be used to implement all of the functions below\n         * 2. Forms a catamorphism\n         */\n        fold(onNone, onSome) {\n            if (this.tag) {\n                return onSome(this.value);\n            }\n            else {\n                return onNone();\n            }\n        }\n        /**\n         * Determine if this `Optional` object contains a value.\n         */\n        isSome() {\n            return this.tag;\n        }\n        /**\n         * Determine if this `Optional` object **does not** contain a value.\n         */\n        isNone() {\n            return !this.tag;\n        }\n        // --- Functor (name stolen from Haskell / maths) ---\n        /**\n         * Perform a transform on an `Optional` object, **if** there is a value. If\n         * you provide a function to turn a T into a U, this is the function you use\n         * to turn an `Optional<T>` into an `Optional<U>`. If this **does** contain\n         * a value then the output will also contain a value (that value being the\n         * output of `mapper(this.value)`), and if this **does not** contain a value\n         * then neither will the output.\n         */\n        map(mapper) {\n            if (this.tag) {\n                return Optional.some(mapper(this.value));\n            }\n            else {\n                return Optional.none();\n            }\n        }\n        // --- Monad (name stolen from Haskell / maths) ---\n        /**\n         * Perform a transform on an `Optional` object, **if** there is a value.\n         * Unlike `map`, here the transform itself also returns an `Optional`.\n         */\n        bind(binder) {\n            if (this.tag) {\n                return binder(this.value);\n            }\n            else {\n                return Optional.none();\n            }\n        }\n        // --- Traversable (name stolen from Haskell / maths) ---\n        /**\n         * For a given predicate, this function finds out if there **exists** a value\n         * inside this `Optional` object that meets the predicate. In practice, this\n         * means that for `Optional`s that do not contain a value it returns false (as\n         * no predicate-meeting value exists).\n         */\n        exists(predicate) {\n            return this.tag && predicate(this.value);\n        }\n        /**\n         * For a given predicate, this function finds out if **all** the values inside\n         * this `Optional` object meet the predicate. In practice, this means that\n         * for `Optional`s that do not contain a value it returns true (as all 0\n         * objects do meet the predicate).\n         */\n        forall(predicate) {\n            return !this.tag || predicate(this.value);\n        }\n        filter(predicate) {\n            if (!this.tag || predicate(this.value)) {\n                return this;\n            }\n            else {\n                return Optional.none();\n            }\n        }\n        // --- Getters ---\n        /**\n         * Get the value out of the inside of the `Optional` object, using a default\n         * `replacement` value if the provided `Optional` object does not contain a\n         * value.\n         */\n        getOr(replacement) {\n            return this.tag ? this.value : replacement;\n        }\n        /**\n         * Get the value out of the inside of the `Optional` object, using a default\n         * `replacement` value if the provided `Optional` object does not contain a\n         * value.  Unlike `getOr`, in this method the `replacement` object is also\n         * `Optional` - meaning that this method will always return an `Optional`.\n         */\n        or(replacement) {\n            return this.tag ? this : replacement;\n        }\n        /**\n         * Get the value out of the inside of the `Optional` object, using a default\n         * `replacement` value if the provided `Optional` object does not contain a\n         * value. Unlike `getOr`, in this method the `replacement` value is\n         * \"thunked\" - that is to say that you don't pass a value to `getOrThunk`, you\n         * pass a function which (if called) will **return** the `value` you want to\n         * use.\n         */\n        getOrThunk(thunk) {\n            return this.tag ? this.value : thunk();\n        }\n        /**\n         * Get the value out of the inside of the `Optional` object, using a default\n         * `replacement` value if the provided Optional object does not contain a\n         * value.\n         *\n         * Unlike `or`, in this method the `replacement` value is \"thunked\" - that is\n         * to say that you don't pass a value to `orThunk`, you pass a function which\n         * (if called) will **return** the `value` you want to use.\n         *\n         * Unlike `getOrThunk`, in this method the `replacement` value is also\n         * `Optional`, meaning that this method will always return an `Optional`.\n         */\n        orThunk(thunk) {\n            return this.tag ? this : thunk();\n        }\n        /**\n         * Get the value out of the inside of the `Optional` object, throwing an\n         * exception if the provided `Optional` object does not contain a value.\n         *\n         * WARNING:\n         * You should only be using this function if you know that the `Optional`\n         * object **is not** empty (otherwise you're throwing exceptions in production\n         * code, which is bad).\n         *\n         * In tests this is more acceptable.\n         *\n         * Prefer other methods to this, such as `.each`.\n         */\n        getOrDie(message) {\n            if (!this.tag) {\n                throw new Error(message ?? 'Called getOrDie on None');\n            }\n            else {\n                return this.value;\n            }\n        }\n        // --- Interop with null and undefined ---\n        /**\n         * Creates an `Optional` value from a nullable (or undefined-able) input.\n         * Null, or undefined, is converted to `None`, and anything else is converted\n         * to `Some`.\n         */\n        static from(value) {\n            return isNonNullable(value) ? Optional.some(value) : Optional.none();\n        }\n        /**\n         * Converts an `Optional` to a nullable type, by getting the value if it\n         * exists, or returning `null` if it does not.\n         */\n        getOrNull() {\n            return this.tag ? this.value : null;\n        }\n        /**\n         * Converts an `Optional` to an undefined-able type, by getting the value if\n         * it exists, or returning `undefined` if it does not.\n         */\n        getOrUndefined() {\n            return this.value;\n        }\n        // --- Utilities ---\n        /**\n         * If the `Optional` contains a value, perform an action on that value.\n         * Unlike the rest of the methods on this type, `.each` has side-effects. If\n         * you want to transform an `Optional<T>` **into** something, then this is not\n         * the method for you. If you want to use an `Optional<T>` to **do**\n         * something, then this is the method for you - provided you're okay with not\n         * doing anything in the case where the `Optional` doesn't have a value inside\n         * it. If you're not sure whether your use-case fits into transforming\n         * **into** something or **doing** something, check whether it has a return\n         * value. If it does, you should be performing a transform.\n         */\n        each(worker) {\n            if (this.tag) {\n                worker(this.value);\n            }\n        }\n        /**\n         * Turn the `Optional` object into an array that contains all of the values\n         * stored inside the `Optional`. In practice, this means the output will have\n         * either 0 or 1 elements.\n         */\n        toArray() {\n            return this.tag ? [this.value] : [];\n        }\n        /**\n         * Turn the `Optional` object into a string for debugging or printing. Not\n         * recommended for production code, but good for debugging. Also note that\n         * these days an `Optional` object can be logged to the console directly, and\n         * its inner value (if it exists) will be visible.\n         */\n        toString() {\n            return this.tag ? `some(${this.value})` : 'none()';\n        }\n    }\n\n    const nativeSlice = Array.prototype.slice;\n    const nativeIndexOf = Array.prototype.indexOf;\n    const nativePush = Array.prototype.push;\n    const rawIndexOf = (ts, t) => nativeIndexOf.call(ts, t);\n    const contains$2 = (xs, x) => rawIndexOf(xs, x) > -1;\n    const exists = (xs, pred) => {\n        for (let i = 0, len = xs.length; i < len; i++) {\n            const x = xs[i];\n            if (pred(x, i)) {\n                return true;\n            }\n        }\n        return false;\n    };\n    const range$1 = (num, f) => {\n        const r = [];\n        for (let i = 0; i < num; i++) {\n            r.push(f(i));\n        }\n        return r;\n    };\n    const map$1 = (xs, f) => {\n        // pre-allocating array size when it's guaranteed to be known\n        // http://jsperf.com/push-allocated-vs-dynamic/22\n        const len = xs.length;\n        const r = new Array(len);\n        for (let i = 0; i < len; i++) {\n            const x = xs[i];\n            r[i] = f(x, i);\n        }\n        return r;\n    };\n    // Unwound implementing other functions in terms of each.\n    // The code size is roughly the same, and it should allow for better optimisation.\n    // const each = function<T, U>(xs: T[], f: (x: T, i?: number, xs?: T[]) => void): void {\n    const each$2 = (xs, f) => {\n        for (let i = 0, len = xs.length; i < len; i++) {\n            const x = xs[i];\n            f(x, i);\n        }\n    };\n    const eachr = (xs, f) => {\n        for (let i = xs.length - 1; i >= 0; i--) {\n            const x = xs[i];\n            f(x, i);\n        }\n    };\n    const partition = (xs, pred) => {\n        const pass = [];\n        const fail = [];\n        for (let i = 0, len = xs.length; i < len; i++) {\n            const x = xs[i];\n            const arr = pred(x, i) ? pass : fail;\n            arr.push(x);\n        }\n        return { pass, fail };\n    };\n    const filter$2 = (xs, pred) => {\n        const r = [];\n        for (let i = 0, len = xs.length; i < len; i++) {\n            const x = xs[i];\n            if (pred(x, i)) {\n                r.push(x);\n            }\n        }\n        return r;\n    };\n    const foldr = (xs, f, acc) => {\n        eachr(xs, (x, i) => {\n            acc = f(acc, x, i);\n        });\n        return acc;\n    };\n    const foldl = (xs, f, acc) => {\n        each$2(xs, (x, i) => {\n            acc = f(acc, x, i);\n        });\n        return acc;\n    };\n    const findUntil = (xs, pred, until) => {\n        for (let i = 0, len = xs.length; i < len; i++) {\n            const x = xs[i];\n            if (pred(x, i)) {\n                return Optional.some(x);\n            }\n            else if (until(x, i)) {\n                break;\n            }\n        }\n        return Optional.none();\n    };\n    const find$1 = (xs, pred) => {\n        return findUntil(xs, pred, never);\n    };\n    const findIndex = (xs, pred) => {\n        for (let i = 0, len = xs.length; i < len; i++) {\n            const x = xs[i];\n            if (pred(x, i)) {\n                return Optional.some(i);\n            }\n        }\n        return Optional.none();\n    };\n    const flatten = (xs) => {\n        // Note, this is possible because push supports multiple arguments:\n        // http://jsperf.com/concat-push/6\n        // Note that in the past, concat() would silently work (very slowly) for array-like objects.\n        // With this change it will throw an error.\n        const r = [];\n        for (let i = 0, len = xs.length; i < len; ++i) {\n            // Ensure that each value is an array itself\n            if (!isArray(xs[i])) {\n                throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs);\n            }\n            nativePush.apply(r, xs[i]);\n        }\n        return r;\n    };\n    const bind$2 = (xs, f) => flatten(map$1(xs, f));\n    const forall = (xs, pred) => {\n        for (let i = 0, len = xs.length; i < len; ++i) {\n            const x = xs[i];\n            if (pred(x, i) !== true) {\n                return false;\n            }\n        }\n        return true;\n    };\n    const reverse = (xs) => {\n        const r = nativeSlice.call(xs, 0);\n        r.reverse();\n        return r;\n    };\n    const mapToObject = (xs, f) => {\n        const r = {};\n        for (let i = 0, len = xs.length; i < len; i++) {\n            const x = xs[i];\n            r[String(x)] = f(x, i);\n        }\n        return r;\n    };\n    const sort$1 = (xs, comparator) => {\n        const copy = nativeSlice.call(xs, 0);\n        copy.sort(comparator);\n        return copy;\n    };\n    const get$d = (xs, i) => i >= 0 && i < xs.length ? Optional.some(xs[i]) : Optional.none();\n    const head = (xs) => get$d(xs, 0);\n    const last$2 = (xs) => get$d(xs, xs.length - 1);\n    const findMap = (arr, f) => {\n        for (let i = 0; i < arr.length; i++) {\n            const r = f(arr[i], i);\n            if (r.isSome()) {\n                return r;\n            }\n        }\n        return Optional.none();\n    };\n\n    // There are many variations of Object iteration that are faster than the 'for-in' style:\n    // http://jsperf.com/object-keys-iteration/107\n    //\n    // Use the native keys if it is available (IE9+), otherwise fall back to manually filtering\n    const keys = Object.keys;\n    const hasOwnProperty = Object.hasOwnProperty;\n    const each$1 = (obj, f) => {\n        const props = keys(obj);\n        for (let k = 0, len = props.length; k < len; k++) {\n            const i = props[k];\n            const x = obj[i];\n            f(x, i);\n        }\n    };\n    const map = (obj, f) => {\n        return tupleMap(obj, (x, i) => ({\n            k: i,\n            v: f(x, i)\n        }));\n    };\n    const tupleMap = (obj, f) => {\n        const r = {};\n        each$1(obj, (x, i) => {\n            const tuple = f(x, i);\n            r[tuple.k] = tuple.v;\n        });\n        return r;\n    };\n    const objAcc = (r) => (x, i) => {\n        r[i] = x;\n    };\n    const internalFilter = (obj, pred, onTrue, onFalse) => {\n        each$1(obj, (x, i) => {\n            (pred(x, i) ? onTrue : onFalse)(x, i);\n        });\n    };\n    const filter$1 = (obj, pred) => {\n        const t = {};\n        internalFilter(obj, pred, objAcc(t), noop);\n        return t;\n    };\n    const mapToArray = (obj, f) => {\n        const r = [];\n        each$1(obj, (value, name) => {\n            r.push(f(value, name));\n        });\n        return r;\n    };\n    const values = (obj) => {\n        return mapToArray(obj, identity);\n    };\n    const get$c = (obj, key) => {\n        return has$1(obj, key) ? Optional.from(obj[key]) : Optional.none();\n    };\n    const has$1 = (obj, key) => hasOwnProperty.call(obj, key);\n    const hasNonNullableKey = (obj, key) => has$1(obj, key) && obj[key] !== undefined && obj[key] !== null;\n    const isEmpty = (r) => {\n        for (const x in r) {\n            if (hasOwnProperty.call(r, x)) {\n                return false;\n            }\n        }\n        return true;\n    };\n\n    /*\n     * Generates a church encoded ADT (https://en.wikipedia.org/wiki/Church_encoding)\n     * For syntax and use, look at the test code.\n     */\n    const generate$1 = (cases) => {\n        // validation\n        if (!isArray(cases)) {\n            throw new Error('cases must be an array');\n        }\n        if (cases.length === 0) {\n            throw new Error('there must be at least one case');\n        }\n        const constructors = [];\n        // adt is mutated to add the individual cases\n        const adt = {};\n        each$2(cases, (acase, count) => {\n            const keys$1 = keys(acase);\n            // validation\n            if (keys$1.length !== 1) {\n                throw new Error('one and only one name per case');\n            }\n            const key = keys$1[0];\n            const value = acase[key];\n            // validation\n            if (adt[key] !== undefined) {\n                throw new Error('duplicate key detected:' + key);\n            }\n            else if (key === 'cata') {\n                throw new Error('cannot have a case named cata (sorry)');\n            }\n            else if (!isArray(value)) {\n                // this implicitly checks if acase is an object\n                throw new Error('case arguments must be an array');\n            }\n            constructors.push(key);\n            //\n            // constructor for key\n            //\n            adt[key] = (...args) => {\n                const argLength = args.length;\n                // validation\n                if (argLength !== value.length) {\n                    throw new Error('Wrong number of arguments to case ' + key + '. Expected ' + value.length + ' (' + value + '), got ' + argLength);\n                }\n                const match = (branches) => {\n                    const branchKeys = keys(branches);\n                    if (constructors.length !== branchKeys.length) {\n                        throw new Error('Wrong number of arguments to match. Expected: ' + constructors.join(',') + '\\nActual: ' + branchKeys.join(','));\n                    }\n                    const allReqd = forall(constructors, (reqKey) => {\n                        return contains$2(branchKeys, reqKey);\n                    });\n                    if (!allReqd) {\n                        throw new Error('Not all branches were specified when using match. Specified: ' + branchKeys.join(', ') + '\\nRequired: ' + constructors.join(', '));\n                    }\n                    return branches[key].apply(null, args);\n                };\n                //\n                // the fold function for key\n                //\n                return {\n                    fold: (...foldArgs) => {\n                        // runtime validation\n                        if (foldArgs.length !== cases.length) {\n                            throw new Error('Wrong number of arguments to fold. Expected ' + cases.length + ', got ' + foldArgs.length);\n                        }\n                        const target = foldArgs[count];\n                        return target.apply(null, args);\n                    },\n                    match,\n                    // NOTE: Only for debugging.\n                    log: (label) => {\n                        // eslint-disable-next-line no-console\n                        console.log(label, {\n                            constructors,\n                            constructor: key,\n                            params: args\n                        });\n                    }\n                };\n            };\n        });\n        return adt;\n    };\n    const Adt = {\n        generate: generate$1\n    };\n\n    const Cell = (initial) => {\n        let value = initial;\n        const get = () => {\n            return value;\n        };\n        const set = (v) => {\n            value = v;\n        };\n        return {\n            get,\n            set\n        };\n    };\n\n    const sort = (arr) => {\n        return arr.slice(0).sort();\n    };\n    const reqMessage = (required, keys) => {\n        throw new Error('All required keys (' + sort(required).join(', ') + ') were not specified. Specified keys were: ' + sort(keys).join(', ') + '.');\n    };\n    const unsuppMessage = (unsupported) => {\n        throw new Error('Unsupported keys for object: ' + sort(unsupported).join(', '));\n    };\n    const validateStrArr = (label, array) => {\n        if (!isArray(array)) {\n            throw new Error('The ' + label + ' fields must be an array. Was: ' + array + '.');\n        }\n        each$2(array, (a) => {\n            if (!isString(a)) {\n                throw new Error('The value ' + a + ' in the ' + label + ' fields was not a string.');\n            }\n        });\n    };\n    const invalidTypeMessage = (incorrect, type) => {\n        throw new Error('All values need to be of type: ' + type + '. Keys (' + sort(incorrect).join(', ') + ') were not.');\n    };\n    const checkDupes = (everything) => {\n        const sorted = sort(everything);\n        const dupe = find$1(sorted, (s, i) => {\n            return i < sorted.length - 1 && s === sorted[i + 1];\n        });\n        dupe.each((d) => {\n            throw new Error('The field: ' + d + ' occurs more than once in the combined fields: [' + sorted.join(', ') + '].');\n        });\n    };\n\n    // Ensure that the object has all required fields. They must be functions.\n    const base = (handleUnsupported, required) => {\n        return baseWith(handleUnsupported, required, {\n            validate: isFunction,\n            label: 'function'\n        });\n    };\n    // Ensure that the object has all required fields. They must satisy predicates.\n    const baseWith = (handleUnsupported, required, pred) => {\n        if (required.length === 0) {\n            throw new Error('You must specify at least one required field.');\n        }\n        validateStrArr('required', required);\n        checkDupes(required);\n        return (obj) => {\n            const keys$1 = keys(obj);\n            // Ensure all required keys are present.\n            const allReqd = forall(required, (req) => {\n                return contains$2(keys$1, req);\n            });\n            if (!allReqd) {\n                reqMessage(required, keys$1);\n            }\n            handleUnsupported(required, keys$1);\n            const invalidKeys = filter$2(required, (key) => {\n                return !pred.validate(obj[key], key);\n            });\n            if (invalidKeys.length > 0) {\n                invalidTypeMessage(invalidKeys, pred.label);\n            }\n            return obj;\n        };\n    };\n    const handleExact = (required, keys) => {\n        const unsupported = filter$2(keys, (key) => {\n            return !contains$2(required, key);\n        });\n        if (unsupported.length > 0) {\n            unsuppMessage(unsupported);\n        }\n    };\n    const exactly = (required) => base(handleExact, required);\n\n    /**\n     * Creates a new `Result<T, E>` that **does** contain a value.\n     */\n    const value$1 = (value) => {\n        const applyHelper = (fn) => fn(value);\n        const constHelper = constant(value);\n        const outputHelper = () => output;\n        const output = {\n            // Debug info\n            tag: true,\n            inner: value,\n            // Actual Result methods\n            fold: (_onError, onValue) => onValue(value),\n            isValue: always,\n            isError: never,\n            map: (mapper) => Result.value(mapper(value)),\n            mapError: outputHelper,\n            bind: applyHelper,\n            exists: applyHelper,\n            forall: applyHelper,\n            getOr: constHelper,\n            or: outputHelper,\n            getOrThunk: constHelper,\n            orThunk: outputHelper,\n            getOrDie: constHelper,\n            each: (fn) => {\n                // Can't write the function inline because we don't want to return something by mistake\n                fn(value);\n            },\n            toOptional: () => Optional.some(value),\n        };\n        return output;\n    };\n    /**\n     * Creates a new `Result<T, E>` that **does not** contain a value, and therefore\n     * contains an error.\n     */\n    const error = (error) => {\n        const outputHelper = () => output;\n        const output = {\n            // Debug info\n            tag: false,\n            inner: error,\n            // Actual Result methods\n            fold: (onError, _onValue) => onError(error),\n            isValue: never,\n            isError: always,\n            map: outputHelper,\n            mapError: (mapper) => Result.error(mapper(error)),\n            bind: outputHelper,\n            exists: never,\n            forall: always,\n            getOr: identity,\n            or: identity,\n            getOrThunk: apply,\n            orThunk: apply,\n            getOrDie: die(String(error)),\n            each: noop,\n            toOptional: Optional.none,\n        };\n        return output;\n    };\n    /**\n     * Creates a new `Result<T, E>` from an `Optional<T>` and an `E`. If the\n     * `Optional` contains a value, so will the outputted `Result`. If it does not,\n     * the outputted `Result` will contain an error (and that error will be the\n     * error passed in).\n     */\n    const fromOption = (optional, err) => optional.fold(() => error(err), value$1);\n    const Result = {\n        value: value$1,\n        error,\n        fromOption\n    };\n\n    // Use window object as the global if it's available since CSP will block script evals\n    // eslint-disable-next-line @typescript-eslint/no-implied-eval\n    const Global = typeof window !== 'undefined' ? window : Function('return this;')();\n\n    // This API is intended to give the capability to return namespaced strings.\n    // For CSS, since dots are not valid class names, the dots are turned into dashes.\n    const css = (namespace) => {\n        const dashNamespace = namespace.replace(/\\./g, '-');\n        const resolve = (str) => {\n            return dashNamespace + '-' + str;\n        };\n        return {\n            resolve\n        };\n    };\n\n    /**\n     * **Is** the value stored inside this Optional object equal to `rhs`?\n     */\n    const is$2 = (lhs, rhs, comparator = tripleEquals) => lhs.exists((left) => comparator(left, rhs));\n    const cat = (arr) => {\n        const r = [];\n        const push = (x) => {\n            r.push(x);\n        };\n        for (let i = 0; i < arr.length; i++) {\n            arr[i].each(push);\n        }\n        return r;\n    };\n    const bindFrom = (a, f) => (a !== undefined && a !== null) ? f(a) : Optional.none();\n    // This can help with type inference, by specifying the type param on the none case, so the caller doesn't have to.\n    const someIf = (b, a) => b ? Optional.some(a) : Optional.none();\n\n    /** path :: ([String], JsObj?) -> JsObj */\n    const path = (parts, scope) => {\n        let o = scope !== undefined && scope !== null ? scope : Global;\n        for (let i = 0; i < parts.length && o !== undefined && o !== null; ++i) {\n            o = o[parts[i]];\n        }\n        return o;\n    };\n    /** resolve :: (String, JsObj?) -> JsObj */\n    const resolve$2 = (p, scope) => {\n        const parts = p.split('.');\n        return path(parts, scope);\n    };\n\n    const singleton = (doRevoke) => {\n        const subject = Cell(Optional.none());\n        const revoke = () => subject.get().each(doRevoke);\n        const clear = () => {\n            revoke();\n            subject.set(Optional.none());\n        };\n        const isSet = () => subject.get().isSome();\n        const get = () => subject.get();\n        const set = (s) => {\n            revoke();\n            subject.set(Optional.some(s));\n        };\n        return {\n            clear,\n            isSet,\n            get,\n            set\n        };\n    };\n    const value = () => {\n        const subject = singleton(noop);\n        const on = (f) => subject.get().each(f);\n        return {\n            ...subject,\n            on\n        };\n    };\n\n    const removeFromStart = (str, numChars) => {\n        return str.substring(numChars);\n    };\n\n    const checkRange = (str, substr, start) => substr === '' || str.length >= substr.length && str.substr(start, start + substr.length) === substr;\n    const removeLeading = (str, prefix) => {\n        return startsWith(str, prefix) ? removeFromStart(str, prefix.length) : str;\n    };\n    const contains$1 = (str, substr, start = 0, end) => {\n        const idx = str.indexOf(substr, start);\n        if (idx !== -1) {\n            return isUndefined(end) ? true : idx + substr.length <= end;\n        }\n        else {\n            return false;\n        }\n    };\n    /** Does 'str' start with 'prefix'?\n     *  Note: all strings start with the empty string.\n     *        More formally, for all strings x, startsWith(x, \"\").\n     *        This is so that for all strings x and y, startsWith(y + x, y)\n     */\n    const startsWith = (str, prefix) => {\n        return checkRange(str, prefix, 0);\n    };\n    /** Does 'str' end with 'suffix'?\n     *  Note: all strings end with the empty string.\n     *        More formally, for all strings x, endsWith(x, \"\").\n     *        This is so that for all strings x and y, endsWith(x + y, y)\n     */\n    const endsWith = (str, suffix) => {\n        return checkRange(str, suffix, str.length - suffix.length);\n    };\n    const blank = (r) => (s) => s.replace(r, '');\n    /** removes all leading and trailing spaces */\n    const trim = blank(/^\\s+|\\s+$/g);\n    const isNotEmpty = (s) => s.length > 0;\n    const toFloat = (value) => {\n        const num = parseFloat(value);\n        return isNaN(num) ? Optional.none() : Optional.some(num);\n    };\n\n    // Run a function fn after rate ms. If another invocation occurs\n    // during the time it is waiting, reschedule the function again\n    // with the new arguments.\n    const last$1 = (fn, rate) => {\n        let timer = null;\n        const cancel = () => {\n            if (!isNull(timer)) {\n                clearTimeout(timer);\n                timer = null;\n            }\n        };\n        const throttle = (...args) => {\n            cancel();\n            timer = setTimeout(() => {\n                timer = null;\n                fn.apply(null, args);\n            }, rate);\n        };\n        return {\n            cancel,\n            throttle\n        };\n    };\n\n    const cached = (f) => {\n        let called = false;\n        let r;\n        return (...args) => {\n            if (!called) {\n                called = true;\n                r = f.apply(null, args);\n            }\n            return r;\n        };\n    };\n\n    const nbsp = '\\u00A0';\n\n    const validSectionList = ['tfoot', 'thead', 'tbody', 'colgroup'];\n    const isValidSection = (parentName) => contains$2(validSectionList, parentName);\n    const grid = (rows, columns) => ({\n        rows,\n        columns\n    });\n    const address = (row, column) => ({\n        row,\n        column\n    });\n    const detail = (element, rowspan, colspan) => ({\n        element,\n        rowspan,\n        colspan\n    });\n    const detailnew = (element, rowspan, colspan, isNew) => ({\n        element,\n        rowspan,\n        colspan,\n        isNew\n    });\n    const extended = (element, rowspan, colspan, row, column, isLocked) => ({\n        element,\n        rowspan,\n        colspan,\n        row,\n        column,\n        isLocked\n    });\n    const rowdetail = (element, cells, section) => ({\n        element,\n        cells,\n        section\n    });\n    const rowdetailnew = (element, cells, section, isNew) => ({\n        element,\n        cells,\n        section,\n        isNew\n    });\n    const elementnew = (element, isNew, isLocked) => ({\n        element,\n        isNew,\n        isLocked\n    });\n    const rowcells = (element, cells, section, isNew) => ({\n        element,\n        cells,\n        section,\n        isNew\n    });\n    const bounds = (startRow, startCol, finishRow, finishCol) => ({\n        startRow,\n        startCol,\n        finishRow,\n        finishCol\n    });\n    const columnext = (element, colspan, column) => ({\n        element,\n        colspan,\n        column\n    });\n    const colgroup = (element, columns) => ({\n        element,\n        columns\n    });\n\n    const addCells = (gridRow, index, cells) => {\n        const existingCells = gridRow.cells;\n        const before = existingCells.slice(0, index);\n        const after = existingCells.slice(index);\n        const newCells = before.concat(cells).concat(after);\n        return setCells(gridRow, newCells);\n    };\n    const addCell = (gridRow, index, cell) => addCells(gridRow, index, [cell]);\n    const mutateCell = (gridRow, index, cell) => {\n        const cells = gridRow.cells;\n        cells[index] = cell;\n    };\n    const setCells = (gridRow, cells) => rowcells(gridRow.element, cells, gridRow.section, gridRow.isNew);\n    const mapCells = (gridRow, f) => {\n        const cells = gridRow.cells;\n        const r = map$1(cells, f);\n        return rowcells(gridRow.element, r, gridRow.section, gridRow.isNew);\n    };\n    const getCell = (gridRow, index) => gridRow.cells[index];\n    const getCellElement = (gridRow, index) => getCell(gridRow, index).element;\n    const cellLength = (gridRow) => gridRow.cells.length;\n    const extractGridDetails = (grid) => {\n        const result = partition(grid, (row) => row.section === 'colgroup');\n        return {\n            rows: result.fail,\n            cols: result.pass\n        };\n    };\n    const clone$2 = (gridRow, cloneRow, cloneCell) => {\n        const newCells = map$1(gridRow.cells, cloneCell);\n        return rowcells(cloneRow(gridRow.element), newCells, gridRow.section, true);\n    };\n\n    const fromHtml$1 = (html, scope) => {\n        const doc = scope || document;\n        const div = doc.createElement('div');\n        div.innerHTML = html;\n        if (!div.hasChildNodes() || div.childNodes.length > 1) {\n            const message = 'HTML does not have a single root node';\n            // eslint-disable-next-line no-console\n            console.error(message, html);\n            throw new Error(message);\n        }\n        return fromDom$1(div.childNodes[0]);\n    };\n    const fromTag = (tag, scope) => {\n        const doc = scope || document;\n        const node = doc.createElement(tag);\n        return fromDom$1(node);\n    };\n    const fromText = (text, scope) => {\n        const doc = scope || document;\n        const node = doc.createTextNode(text);\n        return fromDom$1(node);\n    };\n    const fromDom$1 = (node) => {\n        // TODO: Consider removing this check, but left atm for safety\n        if (node === null || node === undefined) {\n            throw new Error('Node cannot be null or undefined');\n        }\n        return {\n            dom: node\n        };\n    };\n    const fromPoint$1 = (docElm, x, y) => Optional.from(docElm.dom.elementFromPoint(x, y)).map(fromDom$1);\n    // tslint:disable-next-line:variable-name\n    const SugarElement = {\n        fromHtml: fromHtml$1,\n        fromTag,\n        fromText,\n        fromDom: fromDom$1,\n        fromPoint: fromPoint$1\n    };\n\n    const selectNode = (win, element) => {\n        const rng = win.document.createRange();\n        rng.selectNode(element.dom);\n        return rng;\n    };\n    const selectNodeContents = (win, element) => {\n        const rng = win.document.createRange();\n        selectNodeContentsUsing(rng, element);\n        return rng;\n    };\n    const selectNodeContentsUsing = (rng, element) => rng.selectNodeContents(element.dom);\n    // NOTE: Mutates the range.\n    const setStart = (rng, situ) => {\n        situ.fold((e) => {\n            rng.setStartBefore(e.dom);\n        }, (e, o) => {\n            rng.setStart(e.dom, o);\n        }, (e) => {\n            rng.setStartAfter(e.dom);\n        });\n    };\n    const setFinish = (rng, situ) => {\n        situ.fold((e) => {\n            rng.setEndBefore(e.dom);\n        }, (e, o) => {\n            rng.setEnd(e.dom, o);\n        }, (e) => {\n            rng.setEndAfter(e.dom);\n        });\n    };\n    const relativeToNative = (win, startSitu, finishSitu) => {\n        const range = win.document.createRange();\n        setStart(range, startSitu);\n        setFinish(range, finishSitu);\n        return range;\n    };\n    const exactToNative = (win, start, soffset, finish, foffset) => {\n        const rng = win.document.createRange();\n        rng.setStart(start.dom, soffset);\n        rng.setEnd(finish.dom, foffset);\n        return rng;\n    };\n    const toRect = (rect) => ({\n        left: rect.left,\n        top: rect.top,\n        right: rect.right,\n        bottom: rect.bottom,\n        width: rect.width,\n        height: rect.height\n    });\n    const getFirstRect$1 = (rng) => {\n        const rects = rng.getClientRects();\n        // ASSUMPTION: The first rectangle is the start of the selection\n        const rect = rects.length > 0 ? rects[0] : rng.getBoundingClientRect();\n        return rect.width > 0 || rect.height > 0 ? Optional.some(rect).map(toRect) : Optional.none();\n    };\n\n    const adt$6 = Adt.generate([\n        { ltr: ['start', 'soffset', 'finish', 'foffset'] },\n        { rtl: ['start', 'soffset', 'finish', 'foffset'] }\n    ]);\n    const fromRange = (win, type, range) => type(SugarElement.fromDom(range.startContainer), range.startOffset, SugarElement.fromDom(range.endContainer), range.endOffset);\n    const getRanges = (win, selection) => selection.match({\n        domRange: (rng) => {\n            return {\n                ltr: constant(rng),\n                rtl: Optional.none\n            };\n        },\n        relative: (startSitu, finishSitu) => {\n            return {\n                ltr: cached(() => relativeToNative(win, startSitu, finishSitu)),\n                rtl: cached(() => Optional.some(relativeToNative(win, finishSitu, startSitu)))\n            };\n        },\n        exact: (start, soffset, finish, foffset) => {\n            return {\n                ltr: cached(() => exactToNative(win, start, soffset, finish, foffset)),\n                rtl: cached(() => Optional.some(exactToNative(win, finish, foffset, start, soffset)))\n            };\n        }\n    });\n    const doDiagnose = (win, ranges) => {\n        // If we cannot create a ranged selection from start > finish, it could be RTL\n        const rng = ranges.ltr();\n        if (rng.collapsed) {\n            // Let's check if it's RTL ... if it is, then reversing the direction will not be collapsed\n            const reversed = ranges.rtl().filter((rev) => rev.collapsed === false);\n            return reversed.map((rev) => \n            // We need to use \"reversed\" here, because the original only has one point (collapsed)\n            adt$6.rtl(SugarElement.fromDom(rev.endContainer), rev.endOffset, SugarElement.fromDom(rev.startContainer), rev.startOffset)).getOrThunk(() => fromRange(win, adt$6.ltr, rng));\n        }\n        else {\n            return fromRange(win, adt$6.ltr, rng);\n        }\n    };\n    const diagnose = (win, selection) => {\n        const ranges = getRanges(win, selection);\n        return doDiagnose(win, ranges);\n    };\n    const asLtrRange = (win, selection) => {\n        const diagnosis = diagnose(win, selection);\n        return diagnosis.match({\n            ltr: (start, soffset, finish, foffset) => {\n                const rng = win.document.createRange();\n                rng.setStart(start.dom, soffset);\n                rng.setEnd(finish.dom, foffset);\n                return rng;\n            },\n            rtl: (start, soffset, finish, foffset) => {\n                // NOTE: Reversing start and finish\n                const rng = win.document.createRange();\n                rng.setStart(finish.dom, foffset);\n                rng.setEnd(start.dom, soffset);\n                return rng;\n            }\n        });\n    };\n    adt$6.ltr;\n    adt$6.rtl;\n\n    const COMMENT = 8;\n    const DOCUMENT = 9;\n    const DOCUMENT_FRAGMENT = 11;\n    const ELEMENT = 1;\n    const TEXT = 3;\n\n    const is$1 = (element, selector) => {\n        const dom = element.dom;\n        if (dom.nodeType !== ELEMENT) {\n            return false;\n        }\n        else {\n            const elem = dom;\n            if (elem.matches !== undefined) {\n                return elem.matches(selector);\n            }\n            else if (elem.msMatchesSelector !== undefined) {\n                return elem.msMatchesSelector(selector);\n            }\n            else if (elem.webkitMatchesSelector !== undefined) {\n                return elem.webkitMatchesSelector(selector);\n            }\n            else if (elem.mozMatchesSelector !== undefined) {\n                // cast to any as mozMatchesSelector doesn't exist in TS DOM lib\n                return elem.mozMatchesSelector(selector);\n            }\n            else {\n                throw new Error('Browser lacks native selectors');\n            } // unfortunately we can't throw this on startup :(\n        }\n    };\n    const bypassSelector = (dom) => \n    // Only elements, documents and shadow roots support querySelector\n    // shadow root element type is DOCUMENT_FRAGMENT\n    dom.nodeType !== ELEMENT && dom.nodeType !== DOCUMENT && dom.nodeType !== DOCUMENT_FRAGMENT ||\n        // IE fix for complex queries on empty nodes: http://jsfiddle.net/spyder/fv9ptr5L/\n        dom.childElementCount === 0;\n    const all$1 = (selector, scope) => {\n        const base = scope === undefined ? document : scope.dom;\n        return bypassSelector(base) ? [] : map$1(base.querySelectorAll(selector), SugarElement.fromDom);\n    };\n    const one = (selector, scope) => {\n        const base = scope === undefined ? document : scope.dom;\n        return bypassSelector(base) ? Optional.none() : Optional.from(base.querySelector(selector)).map(SugarElement.fromDom);\n    };\n\n    const eq$1 = (e1, e2) => e1.dom === e2.dom;\n    // Returns: true if node e1 contains e2, otherwise false.\n    // (returns false if e1===e2: A node does not contain itself).\n    const contains = (e1, e2) => {\n        const d1 = e1.dom;\n        const d2 = e2.dom;\n        return d1 === d2 ? false : d1.contains(d2);\n    };\n    const is = is$1;\n\n    const DeviceType = (os, browser, userAgent, mediaMatch) => {\n        const isiPad = os.isiOS() && /ipad/i.test(userAgent) === true;\n        const isiPhone = os.isiOS() && !isiPad;\n        const isMobile = os.isiOS() || os.isAndroid();\n        const isTouch = isMobile || mediaMatch('(pointer:coarse)');\n        const isTablet = isiPad || !isiPhone && isMobile && mediaMatch('(min-device-width:768px)');\n        const isPhone = isiPhone || isMobile && !isTablet;\n        const iOSwebview = browser.isSafari() && os.isiOS() && /safari/i.test(userAgent) === false;\n        const isDesktop = !isPhone && !isTablet && !iOSwebview;\n        return {\n            isiPad: constant(isiPad),\n            isiPhone: constant(isiPhone),\n            isTablet: constant(isTablet),\n            isPhone: constant(isPhone),\n            isTouch: constant(isTouch),\n            isAndroid: os.isAndroid,\n            isiOS: os.isiOS,\n            isWebView: constant(iOSwebview),\n            isDesktop: constant(isDesktop)\n        };\n    };\n\n    const firstMatch = (regexes, s) => {\n        for (let i = 0; i < regexes.length; i++) {\n            const x = regexes[i];\n            if (x.test(s)) {\n                return x;\n            }\n        }\n        return undefined;\n    };\n    const find = (regexes, agent) => {\n        const r = firstMatch(regexes, agent);\n        if (!r) {\n            return { major: 0, minor: 0 };\n        }\n        const group = (i) => {\n            return Number(agent.replace(r, '$' + i));\n        };\n        return nu$2(group(1), group(2));\n    };\n    const detect$5 = (versionRegexes, agent) => {\n        const cleanedAgent = String(agent).toLowerCase();\n        if (versionRegexes.length === 0) {\n            return unknown$2();\n        }\n        return find(versionRegexes, cleanedAgent);\n    };\n    const unknown$2 = () => {\n        return nu$2(0, 0);\n    };\n    const nu$2 = (major, minor) => {\n        return { major, minor };\n    };\n    const Version = {\n        nu: nu$2,\n        detect: detect$5,\n        unknown: unknown$2\n    };\n\n    const detectBrowser$1 = (browsers, userAgentData) => {\n        return findMap(userAgentData.brands, (uaBrand) => {\n            const lcBrand = uaBrand.brand.toLowerCase();\n            return find$1(browsers, (browser) => lcBrand === browser.brand?.toLowerCase())\n                .map((info) => ({\n                current: info.name,\n                version: Version.nu(parseInt(uaBrand.version, 10), 0)\n            }));\n        });\n    };\n\n    const detect$4 = (candidates, userAgent) => {\n        const agent = String(userAgent).toLowerCase();\n        return find$1(candidates, (candidate) => {\n            return candidate.search(agent);\n        });\n    };\n    // They (browser and os) are the same at the moment, but they might\n    // not stay that way.\n    const detectBrowser = (browsers, userAgent) => {\n        return detect$4(browsers, userAgent).map((browser) => {\n            const version = Version.detect(browser.versionRegexes, userAgent);\n            return {\n                current: browser.name,\n                version\n            };\n        });\n    };\n    const detectOs = (oses, userAgent) => {\n        return detect$4(oses, userAgent).map((os) => {\n            const version = Version.detect(os.versionRegexes, userAgent);\n            return {\n                current: os.name,\n                version\n            };\n        });\n    };\n\n    const normalVersionRegex = /.*?version\\/\\ ?([0-9]+)\\.([0-9]+).*/;\n    const checkContains = (target) => {\n        return (uastring) => {\n            return contains$1(uastring, target);\n        };\n    };\n    const browsers = [\n        // This is legacy Edge\n        {\n            name: 'Edge',\n            versionRegexes: [/.*?edge\\/ ?([0-9]+)\\.([0-9]+)$/],\n            search: (uastring) => {\n                return contains$1(uastring, 'edge/') && contains$1(uastring, 'chrome') && contains$1(uastring, 'safari') && contains$1(uastring, 'applewebkit');\n            }\n        },\n        // This is Google Chrome and Chromium Edge\n        {\n            name: 'Chromium',\n            brand: 'Chromium',\n            versionRegexes: [/.*?chrome\\/([0-9]+)\\.([0-9]+).*/, normalVersionRegex],\n            search: (uastring) => {\n                return contains$1(uastring, 'chrome') && !contains$1(uastring, 'chromeframe');\n            }\n        },\n        {\n            name: 'IE',\n            versionRegexes: [/.*?msie\\ ?([0-9]+)\\.([0-9]+).*/, /.*?rv:([0-9]+)\\.([0-9]+).*/],\n            search: (uastring) => {\n                return contains$1(uastring, 'msie') || contains$1(uastring, 'trident');\n            }\n        },\n        // INVESTIGATE: Is this still the Opera user agent?\n        {\n            name: 'Opera',\n            versionRegexes: [normalVersionRegex, /.*?opera\\/([0-9]+)\\.([0-9]+).*/],\n            search: checkContains('opera')\n        },\n        {\n            name: 'Firefox',\n            versionRegexes: [/.*?firefox\\/\\ ?([0-9]+)\\.([0-9]+).*/],\n            search: checkContains('firefox')\n        },\n        {\n            name: 'Safari',\n            versionRegexes: [normalVersionRegex, /.*?cpu os ([0-9]+)_([0-9]+).*/],\n            search: (uastring) => {\n                return (contains$1(uastring, 'safari') || contains$1(uastring, 'mobile/')) && contains$1(uastring, 'applewebkit');\n            }\n        }\n    ];\n    const oses = [\n        {\n            name: 'Windows',\n            search: checkContains('win'),\n            versionRegexes: [/.*?windows\\ nt\\ ?([0-9]+)\\.([0-9]+).*/]\n        },\n        {\n            name: 'iOS',\n            search: (uastring) => {\n                return contains$1(uastring, 'iphone') || contains$1(uastring, 'ipad');\n            },\n            versionRegexes: [/.*?version\\/\\ ?([0-9]+)\\.([0-9]+).*/, /.*cpu os ([0-9]+)_([0-9]+).*/, /.*cpu iphone os ([0-9]+)_([0-9]+).*/]\n        },\n        {\n            name: 'Android',\n            search: checkContains('android'),\n            versionRegexes: [/.*?android\\ ?([0-9]+)\\.([0-9]+).*/]\n        },\n        {\n            name: 'macOS',\n            search: checkContains('mac os x'),\n            versionRegexes: [/.*?mac\\ os\\ x\\ ?([0-9]+)_([0-9]+).*/]\n        },\n        {\n            name: 'Linux',\n            search: checkContains('linux'),\n            versionRegexes: []\n        },\n        { name: 'Solaris',\n            search: checkContains('sunos'),\n            versionRegexes: []\n        },\n        {\n            name: 'FreeBSD',\n            search: checkContains('freebsd'),\n            versionRegexes: []\n        },\n        {\n            name: 'ChromeOS',\n            search: checkContains('cros'),\n            versionRegexes: [/.*?chrome\\/([0-9]+)\\.([0-9]+).*/]\n        }\n    ];\n    const PlatformInfo = {\n        browsers: constant(browsers),\n        oses: constant(oses)\n    };\n\n    const edge = 'Edge';\n    const chromium = 'Chromium';\n    const ie = 'IE';\n    const opera = 'Opera';\n    const firefox = 'Firefox';\n    const safari = 'Safari';\n    const unknown$1 = () => {\n        return nu$1({\n            current: undefined,\n            version: Version.unknown()\n        });\n    };\n    const nu$1 = (info) => {\n        const current = info.current;\n        const version = info.version;\n        const isBrowser = (name) => () => current === name;\n        return {\n            current,\n            version,\n            isEdge: isBrowser(edge),\n            isChromium: isBrowser(chromium),\n            // NOTE: isIe just looks too weird\n            isIE: isBrowser(ie),\n            isOpera: isBrowser(opera),\n            isFirefox: isBrowser(firefox),\n            isSafari: isBrowser(safari)\n        };\n    };\n    const Browser = {\n        unknown: unknown$1,\n        nu: nu$1,\n        edge: constant(edge),\n        chromium: constant(chromium),\n        ie: constant(ie),\n        opera: constant(opera),\n        firefox: constant(firefox),\n        safari: constant(safari)\n    };\n\n    const windows = 'Windows';\n    const ios = 'iOS';\n    const android = 'Android';\n    const linux = 'Linux';\n    const macos = 'macOS';\n    const solaris = 'Solaris';\n    const freebsd = 'FreeBSD';\n    const chromeos = 'ChromeOS';\n    // Though there is a bit of dupe with this and Browser, trying to\n    // reuse code makes it much harder to follow and change.\n    const unknown = () => {\n        return nu({\n            current: undefined,\n            version: Version.unknown()\n        });\n    };\n    const nu = (info) => {\n        const current = info.current;\n        const version = info.version;\n        const isOS = (name) => () => current === name;\n        return {\n            current,\n            version,\n            isWindows: isOS(windows),\n            // TODO: Fix capitalisation\n            isiOS: isOS(ios),\n            isAndroid: isOS(android),\n            isMacOS: isOS(macos),\n            isLinux: isOS(linux),\n            isSolaris: isOS(solaris),\n            isFreeBSD: isOS(freebsd),\n            isChromeOS: isOS(chromeos)\n        };\n    };\n    const OperatingSystem = {\n        unknown,\n        nu,\n        windows: constant(windows),\n        ios: constant(ios),\n        android: constant(android),\n        linux: constant(linux),\n        macos: constant(macos),\n        solaris: constant(solaris),\n        freebsd: constant(freebsd),\n        chromeos: constant(chromeos)\n    };\n\n    const detect$3 = (userAgent, userAgentDataOpt, mediaMatch) => {\n        const browsers = PlatformInfo.browsers();\n        const oses = PlatformInfo.oses();\n        const browser = userAgentDataOpt.bind((userAgentData) => detectBrowser$1(browsers, userAgentData))\n            .orThunk(() => detectBrowser(browsers, userAgent))\n            .fold(Browser.unknown, Browser.nu);\n        const os = detectOs(oses, userAgent).fold(OperatingSystem.unknown, OperatingSystem.nu);\n        const deviceType = DeviceType(os, browser, userAgent, mediaMatch);\n        return {\n            browser,\n            os,\n            deviceType\n        };\n    };\n    const PlatformDetection = {\n        detect: detect$3\n    };\n\n    const mediaMatch = (query) => window.matchMedia(query).matches;\n    // IMPORTANT: Must be in a thunk, otherwise rollup thinks calling this immediately\n    // causes side effects and won't tree shake this away\n    // Note: navigator.userAgentData is not part of the native typescript types yet\n    let platform = cached(() => PlatformDetection.detect(window.navigator.userAgent, Optional.from((window.navigator.userAgentData)), mediaMatch));\n    const detect$2 = () => platform();\n\n    const unsafe = (name, scope) => {\n        return resolve$2(name, scope);\n    };\n    const getOrDie = (name, scope) => {\n        const actual = unsafe(name, scope);\n        if (actual === undefined || actual === null) {\n            throw new Error(name + ' not available on this browser');\n        }\n        return actual;\n    };\n\n    const getPrototypeOf = Object.getPrototypeOf;\n    /*\n     * IE9 and above\n     *\n     * MDN no use on this one, but here's the link anyway:\n     * https://developer.mozilla.org/en/docs/Web/API/HTMLElement\n     */\n    const sandHTMLElement = (scope) => {\n        return getOrDie('HTMLElement', scope);\n    };\n    const isPrototypeOf = (x) => {\n        // use Resolve to get the window object for x and just return undefined if it can't find it.\n        // undefined scope later triggers using the global window.\n        const scope = resolve$2('ownerDocument.defaultView', x);\n        // TINY-7374: We can't rely on looking at the owner window HTMLElement as the element may have\n        // been constructed in a different window and then appended to the current window document.\n        return isObject(x) && (sandHTMLElement(scope).prototype.isPrototypeOf(x) || /^HTML\\w*Element$/.test(getPrototypeOf(x).constructor.name));\n    };\n\n    const name = (element) => {\n        const r = element.dom.nodeName;\n        return r.toLowerCase();\n    };\n    const type = (element) => element.dom.nodeType;\n    const isType = (t) => (element) => type(element) === t;\n    const isComment = (element) => type(element) === COMMENT || name(element) === '#comment';\n    const isHTMLElement = (element) => isElement(element) && isPrototypeOf(element.dom);\n    const isElement = isType(ELEMENT);\n    const isText = isType(TEXT);\n    const isDocument = isType(DOCUMENT);\n    const isDocumentFragment = isType(DOCUMENT_FRAGMENT);\n    const isTag = (tag) => (e) => isElement(e) && name(e) === tag;\n\n    /**\n     * The document associated with the current element\n     * NOTE: this will throw if the owner is null.\n     */\n    const owner = (element) => SugarElement.fromDom(element.dom.ownerDocument);\n    /**\n     * If the element is a document, return it. Otherwise, return its ownerDocument.\n     * @param dos\n     */\n    const documentOrOwner = (dos) => isDocument(dos) ? dos : owner(dos);\n    const documentElement = (element) => SugarElement.fromDom(documentOrOwner(element).dom.documentElement);\n    /**\n     * The window element associated with the element\n     * NOTE: this will throw if the defaultView is null.\n     */\n    const defaultView = (element) => SugarElement.fromDom(documentOrOwner(element).dom.defaultView);\n    const parent = (element) => Optional.from(element.dom.parentNode).map(SugarElement.fromDom);\n    const parentElement = (element) => Optional.from(element.dom.parentElement).map(SugarElement.fromDom);\n    const parents = (element, isRoot) => {\n        const stop = isFunction(isRoot) ? isRoot : never;\n        // This is used a *lot* so it needs to be performant, not recursive\n        let dom = element.dom;\n        const ret = [];\n        while (dom.parentNode !== null && dom.parentNode !== undefined) {\n            const rawParent = dom.parentNode;\n            const p = SugarElement.fromDom(rawParent);\n            ret.push(p);\n            if (stop(p) === true) {\n                break;\n            }\n            else {\n                dom = rawParent;\n            }\n        }\n        return ret;\n    };\n    const prevSibling = (element) => Optional.from(element.dom.previousSibling).map(SugarElement.fromDom);\n    const nextSibling = (element) => Optional.from(element.dom.nextSibling).map(SugarElement.fromDom);\n    const children$2 = (element) => map$1(element.dom.childNodes, SugarElement.fromDom);\n    const child$2 = (element, index) => {\n        const cs = element.dom.childNodes;\n        return Optional.from(cs[index]).map(SugarElement.fromDom);\n    };\n    const firstChild = (element) => child$2(element, 0);\n\n    const makeRange = (start, soffset, finish, foffset) => {\n        const doc = owner(start);\n        // TODO: We need to think about a better place to put native range creation code. Does it even belong in sugar?\n        // Could the `Compare` checks (node.compareDocumentPosition) handle these situations better?\n        const rng = doc.dom.createRange();\n        rng.setStart(start.dom, soffset);\n        rng.setEnd(finish.dom, foffset);\n        return rng;\n    };\n    const after$5 = (start, soffset, finish, foffset) => {\n        const r = makeRange(start, soffset, finish, foffset);\n        const same = eq$1(start, finish) && soffset === foffset;\n        return r.collapsed && !same;\n    };\n\n    /**\n     * Is the element a ShadowRoot?\n     *\n     * Note: this is insufficient to test if any element is a shadow root, but it is sufficient to differentiate between\n     * a Document and a ShadowRoot.\n     */\n    const isShadowRoot = (dos) => isDocumentFragment(dos) && isNonNullable(dos.dom.host);\n    const getRootNode = (e) => SugarElement.fromDom(e.dom.getRootNode());\n    /** Where content needs to go. ShadowRoot or document body */\n    const getContentContainer = (dos) => \n    // Can't use SugarBody.body without causing a circular module reference (since SugarBody.inBody uses SugarShadowDom)\n    isShadowRoot(dos) ? dos : SugarElement.fromDom(documentOrOwner(dos).dom.body);\n    /** If this element is in a ShadowRoot, return it. */\n    const getShadowRoot = (e) => {\n        const r = getRootNode(e);\n        return isShadowRoot(r) ? Optional.some(r) : Optional.none();\n    };\n    /** Return the host of a ShadowRoot.\n     *\n     * This function will throw if Shadow DOM is unsupported in the browser, or if the host is null.\n     * If you actually have a ShadowRoot, this shouldn't happen.\n     */\n    const getShadowHost = (e) => SugarElement.fromDom(e.dom.host);\n    /**\n     * When Events bubble up through a ShadowRoot, the browser changes the target to be the shadow host.\n     * This function gets the \"original\" event target if possible.\n     * This only works if the shadow tree is open - if the shadow tree is closed, event.target is returned.\n     * See: https://developers.google.com/web/fundamentals/web-components/shadowdom#events\n     */\n    const getOriginalEventTarget = (event) => {\n        if (isNonNullable(event.target)) {\n            const el = SugarElement.fromDom(event.target);\n            if (isElement(el) && isOpenShadowHost(el)) {\n                // When target element is inside Shadow DOM we need to take first element from composedPath\n                // otherwise we'll get Shadow Root parent, not actual target element.\n                if (event.composed && event.composedPath) {\n                    const composedPath = event.composedPath();\n                    if (composedPath) {\n                        return head(composedPath);\n                    }\n                }\n            }\n        }\n        return Optional.from(event.target);\n    };\n    /** Return true if the element is a host of an open shadow root.\n     *  Return false if the element is a host of a closed shadow root, or if the element is not a host.\n     */\n    const isOpenShadowHost = (element) => isNonNullable(element.dom.shadowRoot);\n\n    const mkEvent = (target, x, y, stop, prevent, kill, raw) => ({\n        target,\n        x,\n        y,\n        stop,\n        prevent,\n        kill,\n        raw\n    });\n    /** Wraps an Event in an EventArgs structure.\n     * The returned EventArgs structure has its target set to the \"original\" target if possible.\n     * See SugarShadowDom.getOriginalEventTarget\n     */\n    const fromRawEvent$1 = (rawEvent) => {\n        const target = SugarElement.fromDom(getOriginalEventTarget(rawEvent).getOr(rawEvent.target));\n        const stop = () => rawEvent.stopPropagation();\n        const prevent = () => rawEvent.preventDefault();\n        const kill = compose(prevent, stop); // more of a sequence than a compose, but same effect\n        // FIX: Don't just expose the raw event. Need to identify what needs standardisation.\n        return mkEvent(target, rawEvent.clientX, rawEvent.clientY, stop, prevent, kill, rawEvent);\n    };\n    const handle$1 = (filter, handler) => (rawEvent) => {\n        if (filter(rawEvent)) {\n            handler(fromRawEvent$1(rawEvent));\n        }\n    };\n    const binder = (element, event, filter, handler, useCapture) => {\n        const wrapped = handle$1(filter, handler);\n        // IE9 minimum\n        element.dom.addEventListener(event, wrapped, useCapture);\n        return {\n            unbind: curry(unbind, element, event, wrapped, useCapture)\n        };\n    };\n    const bind$1 = (element, event, filter, handler) => binder(element, event, filter, handler, false);\n    const unbind = (element, event, handler, useCapture) => {\n        // IE9 minimum\n        element.dom.removeEventListener(event, handler, useCapture);\n    };\n\n    const filter = always; // no filter on plain DomEvents\n    const bind = (element, event, handler) => bind$1(element, event, filter, handler);\n    const fromRawEvent = fromRawEvent$1;\n\n    const before$3 = (marker, element) => {\n        const parent$1 = parent(marker);\n        parent$1.each((v) => {\n            v.dom.insertBefore(element.dom, marker.dom);\n        });\n    };\n    const after$4 = (marker, element) => {\n        const sibling = nextSibling(marker);\n        sibling.fold(() => {\n            const parent$1 = parent(marker);\n            parent$1.each((v) => {\n                append$1(v, element);\n            });\n        }, (v) => {\n            before$3(v, element);\n        });\n    };\n    const prepend = (parent, element) => {\n        const firstChild$1 = firstChild(parent);\n        firstChild$1.fold(() => {\n            append$1(parent, element);\n        }, (v) => {\n            parent.dom.insertBefore(element.dom, v.dom);\n        });\n    };\n    const append$1 = (parent, element) => {\n        parent.dom.appendChild(element.dom);\n    };\n    const appendAt = (parent, element, index) => {\n        child$2(parent, index).fold(() => {\n            append$1(parent, element);\n        }, (v) => {\n            before$3(v, element);\n        });\n    };\n    const wrap = (element, wrapper) => {\n        before$3(element, wrapper);\n        append$1(wrapper, element);\n    };\n\n    const after$3 = (marker, elements) => {\n        each$2(elements, (x, i) => {\n            const e = i === 0 ? marker : elements[i - 1];\n            after$4(e, x);\n        });\n    };\n    const append = (parent, elements) => {\n        each$2(elements, (x) => {\n            append$1(parent, x);\n        });\n    };\n\n    const rawSet = (dom, key, value) => {\n        /*\n         * JQuery coerced everything to a string, and silently did nothing on text node/null/undefined.\n         *\n         * We fail on those invalid cases, only allowing numbers and booleans.\n         */\n        if (isString(value) || isBoolean(value) || isNumber(value)) {\n            dom.setAttribute(key, value + '');\n        }\n        else {\n            // eslint-disable-next-line no-console\n            console.error('Invalid call to Attribute.set. Key ', key, ':: Value ', value, ':: Element ', dom);\n            throw new Error('Attribute value was not simple');\n        }\n    };\n    const set$2 = (element, key, value) => {\n        rawSet(element.dom, key, value);\n    };\n    const setAll$1 = (element, attrs) => {\n        const dom = element.dom;\n        each$1(attrs, (v, k) => {\n            rawSet(dom, k, v);\n        });\n    };\n    const setOptions = (element, attrs) => {\n        each$1(attrs, (v, k) => {\n            v.fold(() => {\n                remove$6(element, k);\n            }, (value) => {\n                rawSet(element.dom, k, value);\n            });\n        });\n    };\n    const get$b = (element, key) => {\n        const v = element.dom.getAttribute(key);\n        // undefined is the more appropriate value for JS, and this matches JQuery\n        return v === null ? undefined : v;\n    };\n    const getOpt = (element, key) => Optional.from(get$b(element, key));\n    const remove$6 = (element, key) => {\n        element.dom.removeAttribute(key);\n    };\n    const clone$1 = (element) => foldl(element.dom.attributes, (acc, attr) => {\n        acc[attr.name] = attr.value;\n        return acc;\n    }, {});\n\n    const empty = (element) => {\n        // shortcut \"empty node\" trick. Requires IE 9.\n        element.dom.textContent = '';\n        // If the contents was a single empty text node, the above doesn't remove it. But, it's still faster in general\n        // than removing every child node manually.\n        // The following is (probably) safe for performance as 99.9% of the time the trick works and\n        // Traverse.children will return an empty array.\n        each$2(children$2(element), (rogue) => {\n            remove$5(rogue);\n        });\n    };\n    const remove$5 = (element) => {\n        const dom = element.dom;\n        if (dom.parentNode !== null) {\n            dom.parentNode.removeChild(dom);\n        }\n    };\n    const unwrap = (wrapper) => {\n        const children = children$2(wrapper);\n        if (children.length > 0) {\n            after$3(wrapper, children);\n        }\n        remove$5(wrapper);\n    };\n\n    const clone = (original, isDeep) => SugarElement.fromDom(original.dom.cloneNode(isDeep));\n    /** Shallow clone - just the tag, no children */\n    const shallow = (original) => clone(original, false);\n    /** Deep clone - everything copied including children */\n    const deep = (original) => clone(original, true);\n    /** Shallow clone, with a new tag */\n    const shallowAs = (original, tag) => {\n        const nu = SugarElement.fromTag(tag);\n        const attributes = clone$1(original);\n        setAll$1(nu, attributes);\n        return nu;\n    };\n    /** Deep clone, with a new tag */\n    const copy$2 = (original, tag) => {\n        const nu = shallowAs(original, tag);\n        // NOTE\n        // previously this used serialisation:\n        // nu.dom.innerHTML = original.dom.innerHTML;\n        //\n        // Clone should be equivalent (and faster), but if TD <-> TH toggle breaks, put it back.\n        const cloneChildren = children$2(deep(original));\n        append(nu, cloneChildren);\n        return nu;\n    };\n    /** Change the tag name, but keep all children */\n    const mutate$1 = (original, tag) => {\n        const nu = shallowAs(original, tag);\n        after$4(original, nu);\n        const children = children$2(original);\n        append(nu, children);\n        remove$5(original);\n        return nu;\n    };\n\n    const fromHtml = (html, scope) => {\n        const doc = scope || document;\n        const div = doc.createElement('div');\n        div.innerHTML = html;\n        return children$2(SugarElement.fromDom(div));\n    };\n    const fromDom = (nodes) => map$1(nodes, SugarElement.fromDom);\n\n    const get$a = (element) => element.dom.innerHTML;\n    const getOuter$2 = (element) => {\n        const container = SugarElement.fromTag('div');\n        const clone = SugarElement.fromDom(element.dom.cloneNode(true));\n        append$1(container, clone);\n        return get$a(container);\n    };\n\n    // some elements, such as mathml, don't have style attributes\n    // others, such as angular elements, have style attributes that aren't a CSSStyleDeclaration\n    const isSupported = (dom) => dom.style !== undefined && isFunction(dom.style.getPropertyValue);\n\n    // Node.contains() is very, very, very good performance\n    // http://jsperf.com/closest-vs-contains/5\n    const inBody = (element) => {\n        // Technically this is only required on IE, where contains() returns false for text nodes.\n        // But it's cheap enough to run everywhere and Sugar doesn't have platform detection (yet).\n        const dom = isText(element) ? element.dom.parentNode : element.dom;\n        // use ownerDocument.body to ensure this works inside iframes.\n        // Normally contains is bad because an element \"contains\" itself, but here we want that.\n        if (dom === undefined || dom === null || dom.ownerDocument === null) {\n            return false;\n        }\n        const doc = dom.ownerDocument;\n        return getShadowRoot(SugarElement.fromDom(dom)).fold(() => doc.body.contains(dom), compose1(inBody, getShadowHost));\n    };\n    const getBody$1 = (doc) => {\n        const b = doc.dom.body;\n        if (b === null || b === undefined) {\n            throw new Error('Body is not available yet');\n        }\n        return SugarElement.fromDom(b);\n    };\n\n    const internalSet = (dom, property, value) => {\n        // This is going to hurt. Apologies.\n        // JQuery coerces numbers to pixels for certain property names, and other times lets numbers through.\n        // we're going to be explicit; strings only.\n        if (!isString(value)) {\n            // eslint-disable-next-line no-console\n            console.error('Invalid call to CSS.set. Property ', property, ':: Value ', value, ':: Element ', dom);\n            throw new Error('CSS value must be a string: ' + value);\n        }\n        // removed: support for dom().style[property] where prop is camel case instead of normal property name\n        if (isSupported(dom)) {\n            dom.style.setProperty(property, value);\n        }\n    };\n    const internalRemove = (dom, property) => {\n        /*\n         * IE9 and above - MDN doesn't have details, but here's a couple of random internet claims\n         *\n         * http://help.dottoro.com/ljopsjck.php\n         * http://stackoverflow.com/a/7901886/7546\n         */\n        if (isSupported(dom)) {\n            dom.style.removeProperty(property);\n        }\n    };\n    const set$1 = (element, property, value) => {\n        const dom = element.dom;\n        internalSet(dom, property, value);\n    };\n    const setAll = (element, css) => {\n        const dom = element.dom;\n        each$1(css, (v, k) => {\n            internalSet(dom, k, v);\n        });\n    };\n    /*\n     * NOTE: For certain properties, this returns the \"used value\" which is subtly different to the \"computed value\" (despite calling getComputedStyle).\n     * Blame CSS 2.0.\n     *\n     * https://developer.mozilla.org/en-US/docs/Web/CSS/used_value\n     */\n    const get$9 = (element, property) => {\n        const dom = element.dom;\n        /*\n         * IE9 and above per\n         * https://developer.mozilla.org/en/docs/Web/API/window.getComputedStyle\n         *\n         * Not in numerosity, because it doesn't memoize and looking this up dynamically in performance critical code would be horrendous.\n         *\n         * JQuery has some magic here for IE popups, but we don't really need that.\n         * It also uses element.ownerDocument.defaultView to handle iframes but that hasn't been required since FF 3.6.\n         */\n        const styles = window.getComputedStyle(dom);\n        const r = styles.getPropertyValue(property);\n        // jquery-ism: If r is an empty string, check that the element is not in a document. If it isn't, return the raw value.\n        // Turns out we do this a lot.\n        return (r === '' && !inBody(element)) ? getUnsafeProperty(dom, property) : r;\n    };\n    // removed: support for dom().style[property] where prop is camel case instead of normal property name\n    // empty string is what the browsers (IE11 and Chrome) return when the propertyValue doesn't exists.\n    const getUnsafeProperty = (dom, property) => isSupported(dom) ? dom.style.getPropertyValue(property) : '';\n    /*\n     * Gets the raw value from the style attribute. Useful for retrieving \"used values\" from the DOM:\n     * https://developer.mozilla.org/en-US/docs/Web/CSS/used_value\n     *\n     * Returns NONE if the property isn't set, or the value is an empty string.\n     */\n    const getRaw$2 = (element, property) => {\n        const dom = element.dom;\n        const raw = getUnsafeProperty(dom, property);\n        return Optional.from(raw).filter((r) => r.length > 0);\n    };\n    const remove$4 = (element, property) => {\n        const dom = element.dom;\n        internalRemove(dom, property);\n        if (is$2(getOpt(element, 'style').map(trim), '')) {\n            // No more styles left, remove the style attribute as well\n            remove$6(element, 'style');\n        }\n    };\n    const copy$1 = (source, target) => {\n        const sourceDom = source.dom;\n        const targetDom = target.dom;\n        if (isSupported(sourceDom) && isSupported(targetDom)) {\n            targetDom.style.cssText = sourceDom.style.cssText;\n        }\n    };\n\n    const Dimension = (name, getOffset) => {\n        const set = (element, h) => {\n            if (!isNumber(h) && !h.match(/^[0-9]+$/)) {\n                throw new Error(name + '.set accepts only positive integer values. Value was ' + h);\n            }\n            const dom = element.dom;\n            if (isSupported(dom)) {\n                dom.style[name] = h + 'px';\n            }\n        };\n        /*\n         * jQuery supports querying width and height on the document and window objects.\n         *\n         * TBIO doesn't do this, so the code is removed to save space, but left here just in case.\n         */\n        /*\n        var getDocumentWidth = (element) => {\n          var dom = element.dom;\n          if (Node.isDocument(element)) {\n            var body = dom.body;\n            var doc = dom.documentElement;\n            return Math.max(\n              body.scrollHeight,\n              doc.scrollHeight,\n              body.offsetHeight,\n              doc.offsetHeight,\n              doc.clientHeight\n            );\n          }\n        };\n      \n        var getWindowWidth = (element) => {\n          var dom = element.dom;\n          if (dom.window === dom) {\n            // There is no offsetHeight on a window, so use the clientHeight of the document\n            return dom.document.documentElement.clientHeight;\n          }\n        };\n      */\n        const get = (element) => {\n            const r = getOffset(element);\n            // zero or null means non-standard or disconnected, fall back to CSS\n            if (r <= 0 || r === null) {\n                const css = get$9(element, name);\n                // ugh this feels dirty, but it saves cycles\n                return parseFloat(css) || 0;\n            }\n            return r;\n        };\n        // in jQuery, getOuter replicates (or uses) box-sizing: border-box calculations\n        // although these calculations only seem relevant for quirks mode, and edge cases TBIO doesn't rely on\n        const getOuter = get;\n        const aggregate = (element, properties) => foldl(properties, (acc, property) => {\n            const val = get$9(element, property);\n            const value = val === undefined ? 0 : parseInt(val, 10);\n            return isNaN(value) ? acc : acc + value;\n        }, 0);\n        const max = (element, value, properties) => {\n            const cumulativeInclusions = aggregate(element, properties);\n            // if max-height is 100px and your cumulativeInclusions is 150px, there is no way max-height can be 100px, so we return 0.\n            const absoluteMax = value > cumulativeInclusions ? value - cumulativeInclusions : 0;\n            return absoluteMax;\n        };\n        return {\n            set,\n            get,\n            getOuter,\n            aggregate,\n            max\n        };\n    };\n\n    const toNumber = (px, fallback) => toFloat(px).getOr(fallback);\n    const getProp = (element, name, fallback) => toNumber(get$9(element, name), fallback);\n    const calcContentBoxSize = (element, size, upper, lower) => {\n        const paddingUpper = getProp(element, `padding-${upper}`, 0);\n        const paddingLower = getProp(element, `padding-${lower}`, 0);\n        const borderUpper = getProp(element, `border-${upper}-width`, 0);\n        const borderLower = getProp(element, `border-${lower}-width`, 0);\n        return size - paddingUpper - paddingLower - borderUpper - borderLower;\n    };\n    const getCalculatedWidth = (element, boxSizing) => {\n        const dom = element.dom;\n        const width = dom.getBoundingClientRect().width || dom.offsetWidth;\n        return boxSizing === 'border-box' ? width : calcContentBoxSize(element, width, 'left', 'right');\n    };\n    const getHeight$1 = (element) => getProp(element, 'height', element.dom.offsetHeight);\n    const getWidth = (element) => getProp(element, 'width', element.dom.offsetWidth);\n    const getInnerWidth = (element) => getCalculatedWidth(element, 'content-box');\n\n    const api$2 = Dimension('height', (element) => {\n        // getBoundingClientRect gives better results than offsetHeight for tables with captions on Firefox\n        const dom = element.dom;\n        return inBody(element) ? dom.getBoundingClientRect().height : dom.offsetHeight;\n    });\n    const get$8 = (element) => api$2.get(element);\n    const getOuter$1 = (element) => api$2.getOuter(element);\n    const getRuntime$1 = getHeight$1;\n\n    const api$1 = Dimension('width', (element) => {\n        const dom = element.dom;\n        return inBody(element) ? dom.getBoundingClientRect().width : dom.offsetWidth;\n    });\n    const get$7 = (element) => api$1.get(element);\n    const getOuter = (element) => api$1.getOuter(element);\n    const getInner = getInnerWidth;\n    const getRuntime = getWidth;\n\n    const r = (left, top) => {\n        const translate = (x, y) => r(left + x, top + y);\n        return {\n            left,\n            top,\n            translate\n        };\n    };\n    // tslint:disable-next-line:variable-name\n    const SugarPosition = r;\n\n    const boxPosition = (dom) => {\n        const box = dom.getBoundingClientRect();\n        return SugarPosition(box.left, box.top);\n    };\n    // Avoids falsy false fallthrough\n    const firstDefinedOrZero = (a, b) => {\n        if (a !== undefined) {\n            return a;\n        }\n        else {\n            return b !== undefined ? b : 0;\n        }\n    };\n    const absolute = (element) => {\n        const doc = element.dom.ownerDocument;\n        const body = doc.body;\n        const win = doc.defaultView;\n        const html = doc.documentElement;\n        if (body === element.dom) {\n            return SugarPosition(body.offsetLeft, body.offsetTop);\n        }\n        const scrollTop = firstDefinedOrZero(win?.pageYOffset, html.scrollTop);\n        const scrollLeft = firstDefinedOrZero(win?.pageXOffset, html.scrollLeft);\n        const clientTop = firstDefinedOrZero(html.clientTop, body.clientTop);\n        const clientLeft = firstDefinedOrZero(html.clientLeft, body.clientLeft);\n        return viewport(element).translate(scrollLeft - clientLeft, scrollTop - clientTop);\n    };\n    const viewport = (element) => {\n        const dom = element.dom;\n        const doc = dom.ownerDocument;\n        const body = doc.body;\n        if (body === dom) {\n            return SugarPosition(body.offsetLeft, body.offsetTop);\n        }\n        if (!inBody(element)) {\n            return SugarPosition(0, 0);\n        }\n        return boxPosition(dom);\n    };\n\n    // get scroll position (x,y) relative to document _doc (or global if not supplied)\n    const get$6 = (_DOC) => {\n        const doc = _DOC !== undefined ? _DOC.dom : document;\n        // ASSUMPTION: This is for cross-browser support, body works for Safari & EDGE, and when we have an iframe body scroller\n        const x = doc.body.scrollLeft || doc.documentElement.scrollLeft;\n        const y = doc.body.scrollTop || doc.documentElement.scrollTop;\n        return SugarPosition(x, y);\n    };\n    // Scroll content by (x,y) relative to document _doc (or global if not supplied)\n    const by = (x, y, _DOC) => {\n        const doc = _DOC !== undefined ? _DOC.dom : document;\n        const win = doc.defaultView;\n        if (win) {\n            win.scrollBy(x, y);\n        }\n    };\n\n    const NodeValue = (is, name) => {\n        const get = (element) => {\n            if (!is(element)) {\n                throw new Error('Can only get ' + name + ' value of a ' + name + ' node');\n            }\n            return getOption(element).getOr('');\n        };\n        const getOption = (element) => is(element) ? Optional.from(element.dom.nodeValue) : Optional.none();\n        const set = (element, value) => {\n            if (!is(element)) {\n                throw new Error('Can only set raw ' + name + ' value of a ' + name + ' node');\n            }\n            element.dom.nodeValue = value;\n        };\n        return {\n            get,\n            getOption,\n            set\n        };\n    };\n\n    const api = NodeValue(isText, 'text');\n    const get$5 = (element) => api.get(element);\n    const getOption = (element) => api.getOption(element);\n    const set = (element, value) => api.set(element, value);\n\n    const onDirection = (isLtr, isRtl) => (element) => getDirection(element) === 'rtl' ? isRtl : isLtr;\n    const getDirection = (element) => get$9(element, 'direction') === 'rtl' ? 'rtl' : 'ltr';\n\n    // Methods for handling attributes that contain a list of values <div foo=\"alpha beta theta\">\n    const read = (element, attr) => {\n        const value = get$b(element, attr);\n        return value === undefined || value === '' ? [] : value.split(' ');\n    };\n    const add$3 = (element, attr, id) => {\n        const old = read(element, attr);\n        const nu = old.concat([id]);\n        set$2(element, attr, nu.join(' '));\n        return true;\n    };\n    const remove$3 = (element, attr, id) => {\n        const nu = filter$2(read(element, attr), (v) => v !== id);\n        if (nu.length > 0) {\n            set$2(element, attr, nu.join(' '));\n        }\n        else {\n            remove$6(element, attr);\n        }\n        return false;\n    };\n\n    var ClosestOrAncestor = (is, ancestor, scope, a, isRoot) => {\n        if (is(scope, a)) {\n            return Optional.some(scope);\n        }\n        else if (isFunction(isRoot) && isRoot(scope)) {\n            return Optional.none();\n        }\n        else {\n            return ancestor(scope, a, isRoot);\n        }\n    };\n\n    const ancestor$2 = (scope, predicate, isRoot) => {\n        let element = scope.dom;\n        const stop = isFunction(isRoot) ? isRoot : never;\n        while (element.parentNode) {\n            element = element.parentNode;\n            const el = SugarElement.fromDom(element);\n            if (predicate(el)) {\n                return Optional.some(el);\n            }\n            else if (stop(el)) {\n                break;\n            }\n        }\n        return Optional.none();\n    };\n    const closest$2 = (scope, predicate, isRoot) => {\n        // This is required to avoid ClosestOrAncestor passing the predicate to itself\n        const is = (s, test) => test(s);\n        return ClosestOrAncestor(is, ancestor$2, scope, predicate, isRoot);\n    };\n    const child$1 = (scope, predicate) => {\n        const pred = (node) => predicate(SugarElement.fromDom(node));\n        const result = find$1(scope.dom.childNodes, pred);\n        return result.map(SugarElement.fromDom);\n    };\n    const descendant$1 = (scope, predicate) => {\n        const descend = (node) => {\n            // tslint:disable-next-line:prefer-for-of\n            for (let i = 0; i < node.childNodes.length; i++) {\n                const child = SugarElement.fromDom(node.childNodes[i]);\n                if (predicate(child)) {\n                    return Optional.some(child);\n                }\n                const res = descend(node.childNodes[i]);\n                if (res.isSome()) {\n                    return res;\n                }\n            }\n            return Optional.none();\n        };\n        return descend(scope.dom);\n    };\n\n    const ancestor$1 = (scope, selector, isRoot) => ancestor$2(scope, (e) => is$1(e, selector), isRoot);\n    const child = (scope, selector) => child$1(scope, (e) => is$1(e, selector));\n    const descendant = (scope, selector) => one(selector, scope);\n    // Returns Some(closest ancestor element (sugared)) matching 'selector' up to isRoot, or None() otherwise\n    const closest$1 = (scope, selector, isRoot) => {\n        const is = (element, selector) => is$1(element, selector);\n        return ClosestOrAncestor(is, ancestor$1, scope, selector, isRoot);\n    };\n\n    // IE11 Can return undefined for a classList on elements such as math, so we make sure it's not undefined before attempting to use it.\n    const supports = (element) => element.dom.classList !== undefined;\n    const get$4 = (element) => read(element, 'class');\n    const add$2 = (element, clazz) => add$3(element, 'class', clazz);\n    const remove$2 = (element, clazz) => remove$3(element, 'class', clazz);\n\n    /*\n     * ClassList is IE10 minimum:\n     * https://developer.mozilla.org/en-US/docs/Web/API/Element.classList\n     *\n     * Note that IE doesn't support the second argument to toggle (at all).\n     * If it did, the toggler could be better.\n     */\n    const add$1 = (element, clazz) => {\n        if (supports(element)) {\n            element.dom.classList.add(clazz);\n        }\n        else {\n            add$2(element, clazz);\n        }\n    };\n    const cleanClass = (element) => {\n        const classList = supports(element) ? element.dom.classList : get$4(element);\n        // classList is a \"live list\", so this is up to date already\n        if (classList.length === 0) {\n            // No more classes left, remove the class attribute as well\n            remove$6(element, 'class');\n        }\n    };\n    const remove$1 = (element, clazz) => {\n        if (supports(element)) {\n            const classList = element.dom.classList;\n            classList.remove(clazz);\n        }\n        else {\n            remove$2(element, clazz);\n        }\n        cleanClass(element);\n    };\n    const has = (element, clazz) => supports(element) && element.dom.classList.contains(clazz);\n\n    const remove = (element, classes) => {\n        each$2(classes, (x) => {\n            remove$1(element, x);\n        });\n    };\n\n    const closest = (target) => closest$1(target, '[contenteditable]');\n    const isEditable$1 = (element, assumeEditable = false) => {\n        if (inBody(element)) {\n            return element.dom.isContentEditable;\n        }\n        else {\n            // Find the closest contenteditable element and check if it's editable\n            return closest(element).fold(constant(assumeEditable), (editable) => getRaw$1(editable) === 'true');\n        }\n    };\n    const getRaw$1 = (element) => element.dom.contentEditable;\n\n    const addClass = (clazz) => (element) => {\n        add$1(element, clazz);\n    };\n    const removeClasses = (classes) => (element) => {\n        remove(element, classes);\n    };\n\n    const ancestors$4 = (scope, predicate, isRoot) => filter$2(parents(scope, isRoot), predicate);\n    const children$1 = (scope, predicate) => filter$2(children$2(scope), predicate);\n    const descendants$1 = (scope, predicate) => {\n        let result = [];\n        // Recurse.toArray() might help here\n        each$2(children$2(scope), (x) => {\n            if (predicate(x)) {\n                result = result.concat([x]);\n            }\n            result = result.concat(descendants$1(x, predicate));\n        });\n        return result;\n    };\n\n    // For all of the following:\n    //\n    // jQuery does siblings of firstChild. IE9+ supports scope.dom.children (similar to Traverse.children but elements only).\n    // Traverse should also do this (but probably not by default).\n    //\n    const ancestors$3 = (scope, selector, isRoot) => \n    // It may surprise you to learn this is exactly what JQuery does\n    // TODO: Avoid all this wrapping and unwrapping\n    ancestors$4(scope, (e) => is$1(e, selector), isRoot);\n    const children = (scope, selector) => \n    // It may surprise you to learn this is exactly what JQuery does\n    // TODO: Avoid all the wrapping and unwrapping\n    children$1(scope, (e) => is$1(e, selector));\n    const descendants = (scope, selector) => all$1(selector, scope);\n\n    const inParent = (parent, children, element, index) => ({\n        parent,\n        children,\n        element,\n        index\n    });\n    const indexInParent = (element) => parent(element).bind((parent) => {\n        const children = children$2(parent);\n        return indexOf(children, element).map((index) => inParent(parent, children, element, index));\n    });\n    const indexOf = (elements, element) => findIndex(elements, curry(eq$1, element));\n\n    const ancestor = (scope, predicate, isRoot) => ancestor$2(scope, predicate, isRoot).isSome();\n\n    const getEnd = (element) => name(element) === 'img' ? 1 : getOption(element).fold(() => children$2(element).length, (v) => v.length);\n    const isTextNodeWithCursorPosition = (el) => getOption(el).filter((text) => \n    // For the purposes of finding cursor positions only allow text nodes with content,\n    // but trim removes &nbsp; and that's allowed\n    text.trim().length !== 0 || text.indexOf(nbsp) > -1).isSome();\n    const isContentEditableFalse = (elem) => isHTMLElement(elem) && (get$b(elem, 'contenteditable') === 'false');\n    const elementsWithCursorPosition = ['img', 'br'];\n    const isCursorPosition = (elem) => {\n        const hasCursorPosition = isTextNodeWithCursorPosition(elem);\n        return hasCursorPosition || contains$2(elementsWithCursorPosition, name(elem)) || isContentEditableFalse(elem);\n    };\n\n    const first = (element) => descendant$1(element, isCursorPosition);\n    const last = (element) => descendantRtl(element, isCursorPosition);\n    // Note, sugar probably needs some RTL traversals.\n    const descendantRtl = (scope, predicate) => {\n        const descend = (element) => {\n            const children = children$2(element);\n            for (let i = children.length - 1; i >= 0; i--) {\n                const child = children[i];\n                if (predicate(child)) {\n                    return Optional.some(child);\n                }\n                const res = descend(child);\n                if (res.isSome()) {\n                    return res;\n                }\n            }\n            return Optional.none();\n        };\n        return descend(scope);\n    };\n\n    const create$4 = (start, soffset, finish, foffset) => ({\n        start,\n        soffset,\n        finish,\n        foffset\n    });\n    // tslint:disable-next-line:variable-name\n    const SimRange = {\n        create: create$4\n    };\n\n    const adt$5 = Adt.generate([\n        { before: ['element'] },\n        { on: ['element', 'offset'] },\n        { after: ['element'] }\n    ]);\n    // Probably don't need this given that we now have \"match\"\n    const cata$1 = (subject, onBefore, onOn, onAfter) => subject.fold(onBefore, onOn, onAfter);\n    const getStart$1 = (situ) => situ.fold(identity, identity, identity);\n    const before$2 = adt$5.before;\n    const on = adt$5.on;\n    const after$2 = adt$5.after;\n    // tslint:disable-next-line:variable-name\n    const Situ = {\n        before: before$2,\n        on,\n        after: after$2,\n        cata: cata$1,\n        getStart: getStart$1\n    };\n\n    // Consider adding a type for \"element\"\n    const adt$4 = Adt.generate([\n        { domRange: ['rng'] },\n        { relative: ['startSitu', 'finishSitu'] },\n        { exact: ['start', 'soffset', 'finish', 'foffset'] }\n    ]);\n    const exactFromRange = (simRange) => adt$4.exact(simRange.start, simRange.soffset, simRange.finish, simRange.foffset);\n    const getStart = (selection) => selection.match({\n        domRange: (rng) => SugarElement.fromDom(rng.startContainer),\n        relative: (startSitu, _finishSitu) => Situ.getStart(startSitu),\n        exact: (start, _soffset, _finish, _foffset) => start\n    });\n    const domRange = adt$4.domRange;\n    const relative = adt$4.relative;\n    const exact = adt$4.exact;\n    const getWin = (selection) => {\n        const start = getStart(selection);\n        return defaultView(start);\n    };\n    // This is out of place but it's API so I can't remove it\n    const range = SimRange.create;\n    // tslint:disable-next-line:variable-name\n    const SimSelection = {\n        domRange,\n        relative,\n        exact,\n        exactFromRange,\n        getWin,\n        range\n    };\n\n    const caretPositionFromPoint = (doc, x, y) => Optional.from(doc.caretPositionFromPoint?.(x, y))\n        .bind((pos) => {\n        // It turns out that Firefox can return null for pos.offsetNode\n        if (pos.offsetNode === null) {\n            return Optional.none();\n        }\n        const r = doc.createRange();\n        r.setStart(pos.offsetNode, pos.offset);\n        r.collapse();\n        return Optional.some(r);\n    });\n    const caretRangeFromPoint = (doc, x, y) => Optional.from(doc.caretRangeFromPoint?.(x, y));\n    const availableSearch = (doc, x, y) => {\n        if (doc.caretPositionFromPoint) {\n            return caretPositionFromPoint(doc, x, y); // defined standard, firefox only\n        }\n        else if (doc.caretRangeFromPoint) {\n            return caretRangeFromPoint(doc, x, y); // webkit/blink implementation\n        }\n        else {\n            return Optional.none(); // unsupported browser\n        }\n    };\n    const fromPoint = (win, x, y) => {\n        const doc = win.document;\n        return availableSearch(doc, x, y).map((rng) => SimRange.create(SugarElement.fromDom(rng.startContainer), rng.startOffset, SugarElement.fromDom(rng.endContainer), rng.endOffset));\n    };\n\n    const beforeSpecial = (element, offset) => {\n        // From memory, we don't want to use <br> directly on Firefox because it locks the keyboard input.\n        // It turns out that <img> directly on IE locks the keyboard as well.\n        // If the offset is 0, use before. If the offset is 1, use after.\n        // TBIO-3889: Firefox Situ.on <input> results in a child of the <input>; Situ.before <input> results in platform inconsistencies\n        const name$1 = name(element);\n        if ('input' === name$1) {\n            return Situ.after(element);\n        }\n        else if (!contains$2(['br', 'img'], name$1)) {\n            return Situ.on(element, offset);\n        }\n        else {\n            return offset === 0 ? Situ.before(element) : Situ.after(element);\n        }\n    };\n    const preprocessRelative = (startSitu, finishSitu) => {\n        const start = startSitu.fold(Situ.before, beforeSpecial, Situ.after);\n        const finish = finishSitu.fold(Situ.before, beforeSpecial, Situ.after);\n        return SimSelection.relative(start, finish);\n    };\n    const preprocessExact = (start, soffset, finish, foffset) => {\n        const startSitu = beforeSpecial(start, soffset);\n        const finishSitu = beforeSpecial(finish, foffset);\n        return SimSelection.relative(startSitu, finishSitu);\n    };\n\n    const getNativeSelection = (win) => Optional.from(win.getSelection());\n    const doSetNativeRange = (win, rng) => {\n        getNativeSelection(win).each((selection) => {\n            selection.removeAllRanges();\n            selection.addRange(rng);\n        });\n    };\n    const doSetRange = (win, start, soffset, finish, foffset) => {\n        const rng = exactToNative(win, start, soffset, finish, foffset);\n        doSetNativeRange(win, rng);\n    };\n    const setLegacyRtlRange = (win, selection, start, soffset, finish, foffset) => {\n        selection.collapse(start.dom, soffset);\n        selection.extend(finish.dom, foffset);\n    };\n    const setRangeFromRelative = (win, relative) => diagnose(win, relative).match({\n        ltr: (start, soffset, finish, foffset) => {\n            doSetRange(win, start, soffset, finish, foffset);\n        },\n        rtl: (start, soffset, finish, foffset) => {\n            getNativeSelection(win).each((selection) => {\n                // If this selection is backwards, then we need to use extend.\n                if (selection.setBaseAndExtent) {\n                    selection.setBaseAndExtent(start.dom, soffset, finish.dom, foffset);\n                }\n                else if (selection.extend) {\n                    // This try catch is for older browsers (Firefox 52) as they're sometimes unable to handle setting backwards selections using selection.extend and error out.\n                    try {\n                        setLegacyRtlRange(win, selection, start, soffset, finish, foffset);\n                    }\n                    catch {\n                        // If it does fail, try again with ltr.\n                        doSetRange(win, finish, foffset, start, soffset);\n                    }\n                }\n                else {\n                    doSetRange(win, finish, foffset, start, soffset);\n                }\n            });\n        }\n    });\n    const setExact = (win, start, soffset, finish, foffset) => {\n        const relative = preprocessExact(start, soffset, finish, foffset);\n        setRangeFromRelative(win, relative);\n    };\n    const setRelative = (win, startSitu, finishSitu) => {\n        const relative = preprocessRelative(startSitu, finishSitu);\n        setRangeFromRelative(win, relative);\n    };\n    // NOTE: We are still reading the range because it gives subtly different behaviour\n    // than using the anchorNode and focusNode. I'm not sure if this behaviour is any\n    // better or worse; it's just different.\n    const readRange = (selection) => {\n        if (selection.rangeCount > 0) {\n            const firstRng = selection.getRangeAt(0);\n            const lastRng = selection.getRangeAt(selection.rangeCount - 1);\n            return Optional.some(SimRange.create(SugarElement.fromDom(firstRng.startContainer), firstRng.startOffset, SugarElement.fromDom(lastRng.endContainer), lastRng.endOffset));\n        }\n        else {\n            return Optional.none();\n        }\n    };\n    const doGetExact = (selection) => {\n        if (selection.anchorNode === null || selection.focusNode === null) {\n            return readRange(selection);\n        }\n        else {\n            const anchor = SugarElement.fromDom(selection.anchorNode);\n            const focus = SugarElement.fromDom(selection.focusNode);\n            // if this returns true anchor is _after_ focus, so we need a custom selection object to maintain the RTL selection\n            return after$5(anchor, selection.anchorOffset, focus, selection.focusOffset) ? Optional.some(SimRange.create(anchor, selection.anchorOffset, focus, selection.focusOffset)) : readRange(selection);\n        }\n    };\n    const setToElement = (win, element, selectNodeContents$1 = true) => {\n        const rngGetter = selectNodeContents$1 ? selectNodeContents : selectNode;\n        const rng = rngGetter(win, element);\n        doSetNativeRange(win, rng);\n    };\n    const getExact = (win) => \n    // We want to retrieve the selection as it is.\n    getNativeSelection(win)\n        .filter((sel) => sel.rangeCount > 0)\n        .bind(doGetExact);\n    // TODO: Test this.\n    const get$3 = (win) => getExact(win).map((range) => SimSelection.exact(range.start, range.soffset, range.finish, range.foffset));\n    const getFirstRect = (win, selection) => {\n        const rng = asLtrRange(win, selection);\n        return getFirstRect$1(rng);\n    };\n    const getAtPoint = (win, x, y) => fromPoint(win, x, y);\n    const clear = (win) => {\n        getNativeSelection(win).each((selection) => selection.removeAllRanges());\n    };\n\n    const units = {\n        // we don't really support all of these different ways to express a length\n        unsupportedLength: [\n            'em',\n            'ex',\n            'cap',\n            'ch',\n            'ic',\n            'rem',\n            'lh',\n            'rlh',\n            'vw',\n            'vh',\n            'vi',\n            'vb',\n            'vmin',\n            'vmax',\n            'cm',\n            'mm',\n            'Q',\n            'in',\n            'pc',\n            'pt',\n            'px'\n        ],\n        // these are the length values we do support\n        fixed: ['px', 'pt'],\n        relative: ['%'],\n        empty: ['']\n    };\n    // Built from https://tc39.es/ecma262/#prod-StrDecimalLiteral\n    // Matches a float followed by a trailing set of characters\n    const pattern = (() => {\n        const decimalDigits = '[0-9]+';\n        const signedInteger = '[+-]?' + decimalDigits;\n        const exponentPart = '[eE]' + signedInteger;\n        const dot = '\\\\.';\n        const opt = (input) => `(?:${input})?`;\n        const unsignedDecimalLiteral = [\n            'Infinity',\n            decimalDigits + dot + opt(decimalDigits) + opt(exponentPart),\n            dot + decimalDigits + opt(exponentPart),\n            decimalDigits + opt(exponentPart)\n        ].join('|');\n        const float = `[+-]?(?:${unsignedDecimalLiteral})`;\n        return new RegExp(`^(${float})(.*)$`);\n    })();\n    const isUnit = (unit, accepted) => exists(accepted, (acc) => exists(units[acc], (check) => unit === check));\n    const parse = (input, accepted) => {\n        const match = Optional.from(pattern.exec(input));\n        return match.bind((array) => {\n            const value = Number(array[1]);\n            const unitRaw = array[2];\n            if (isUnit(unitRaw, accepted)) {\n                return Optional.some({\n                    value,\n                    unit: unitRaw\n                });\n            }\n            else {\n                return Optional.none();\n            }\n        });\n    };\n\n    const zero = (array) => map$1(array, constant(0));\n    const surround = (sizes, startIndex, endIndex, results, f) => f(sizes.slice(0, startIndex)).concat(results).concat(f(sizes.slice(endIndex)));\n    // Clamp positive or negative delta so that a column/row cannot be reduced past its min size\n    const clampDeltaHelper = (predicate) => (sizes, index, delta, minCellSize) => {\n        if (!predicate(delta)) {\n            return delta;\n        }\n        else {\n            const newSize = Math.max(minCellSize, sizes[index] - Math.abs(delta));\n            const diff = Math.abs(newSize - sizes[index]);\n            return delta >= 0 ? diff : -diff;\n        }\n    };\n    const clampNegativeDelta = clampDeltaHelper((delta) => delta < 0);\n    const clampDelta = clampDeltaHelper(always);\n    // Preserve the size of the columns/rows and adjust the table size\n    const resizeTable = () => {\n        const calcFixedDeltas = (sizes, index, next, delta, minCellSize) => {\n            const clampedDelta = clampNegativeDelta(sizes, index, delta, minCellSize);\n            return surround(sizes, index, next + 1, [clampedDelta, 0], zero);\n        };\n        // Calculate delta for adjusted column\n        // Also need to calculate deltas for all other columns/rows to ensure they stay at the same visual width/height\n        // when the table width/height is adjusted\n        const calcRelativeDeltas = (sizes, index, delta, minCellSize) => {\n            // ASSUMPTION: The delta will be a percentage. This may not be correct if other relative sizing is added, so we probably\n            // need a better way to calc the ratio.\n            const ratio = (100 + delta) / 100;\n            const newThis = Math.max(minCellSize, (sizes[index] + delta) / ratio);\n            return map$1(sizes, (size, idx) => {\n                const newSize = idx === index ? newThis : size / ratio;\n                return newSize - size;\n            });\n        };\n        // Calculations for the inner columns/rows\n        const calcLeftEdgeDeltas = (sizes, index, next, delta, minCellSize, isRelative) => {\n            if (isRelative) {\n                return calcRelativeDeltas(sizes, index, delta, minCellSize);\n            }\n            else {\n                return calcFixedDeltas(sizes, index, next, delta, minCellSize);\n            }\n        };\n        const calcMiddleDeltas = (sizes, _prev, index, next, delta, minCellSize, isRelative) => calcLeftEdgeDeltas(sizes, index, next, delta, minCellSize, isRelative);\n        const resizeTable = (resizer, delta) => resizer(delta);\n        // Calculations for the last column/row resizer\n        const calcRightEdgeDeltas = (sizes, _prev, index, delta, minCellSize, isRelative) => {\n            if (isRelative) {\n                return calcRelativeDeltas(sizes, index, delta, minCellSize);\n            }\n            else {\n                const clampedDelta = clampNegativeDelta(sizes, index, delta, minCellSize);\n                return zero(sizes.slice(0, index)).concat([clampedDelta]);\n            }\n        };\n        const calcRedestributedWidths = (sizes, totalWidth, pixelDelta, isRelative) => {\n            if (isRelative) {\n                const tableWidth = totalWidth + pixelDelta;\n                const ratio = tableWidth / totalWidth;\n                const newSizes = map$1(sizes, (size) => size / ratio);\n                return {\n                    delta: (ratio * 100) - 100,\n                    newSizes,\n                };\n            }\n            else {\n                return {\n                    delta: pixelDelta,\n                    newSizes: sizes,\n                };\n            }\n        };\n        return {\n            resizeTable,\n            clampTableDelta: clampNegativeDelta,\n            calcLeftEdgeDeltas,\n            calcMiddleDeltas,\n            calcRightEdgeDeltas,\n            calcRedestributedWidths,\n        };\n    };\n    // Distribute the column/rows and try to preserve the table size\n    const preserveTable = () => {\n        // Calculations for the inner columns/rows\n        const calcLeftEdgeDeltas = (sizes, index, next, delta, minCellSize) => {\n            const idx = delta >= 0 ? next : index;\n            const clampedDelta = clampDelta(sizes, idx, delta, minCellSize);\n            // negative delta -> deltas becomes [ neg, pos ], positive delta -> deltas becomes [ pos, neg ]\n            return surround(sizes, index, next + 1, [clampedDelta, -clampedDelta], zero);\n        };\n        const calcMiddleDeltas = (sizes, _prev, index, next, delta, minCellSize) => calcLeftEdgeDeltas(sizes, index, next, delta, minCellSize);\n        const resizeTable = (resizer, delta, isLastColumn) => {\n            if (isLastColumn) {\n                resizer(delta);\n            }\n        };\n        // Calculations for the last column/row resizer\n        const calcRightEdgeDeltas = (sizes, _prev, _index, delta, _minCellSize, isRelative) => {\n            if (isRelative) {\n                return zero(sizes);\n            }\n            else {\n                // Distribute the delta amongst all of the columns/rows\n                const diff = delta / sizes.length;\n                return map$1(sizes, constant(diff));\n            }\n        };\n        const clampTableDelta = (sizes, index, delta, minCellSize, isLastColumn) => {\n            // Don't clamp the last resizer using normal methods\n            // Need to allow table width to be reduced past the last column position to allow for distributive resizing\n            if (isLastColumn) {\n                if (delta >= 0) {\n                    return delta;\n                }\n                else {\n                    // Clamp delta so that none of the columns/rows can reduce below their min size\n                    const maxDelta = foldl(sizes, (a, b) => a + b - minCellSize, 0);\n                    return Math.max(-maxDelta, delta);\n                }\n            }\n            else {\n                return clampNegativeDelta(sizes, index, delta, minCellSize);\n            }\n        };\n        const calcRedestributedWidths = (sizes, _totalWidth, _pixelDelta, _isRelative) => ({\n            delta: 0,\n            newSizes: sizes,\n        });\n        return {\n            resizeTable,\n            clampTableDelta,\n            calcLeftEdgeDeltas,\n            calcMiddleDeltas,\n            calcRightEdgeDeltas,\n            calcRedestributedWidths\n        };\n    };\n\n    const getAttrValue = (cell, name, fallback = 0) => getOpt(cell, name).map((value) => parseInt(value, 10)).getOr(fallback);\n    const getSpan = (cell, type) => getAttrValue(cell, type, 1);\n    const hasColspan = (cellOrCol) => {\n        if (isTag('col')(cellOrCol)) {\n            return getAttrValue(cellOrCol, 'span', 1) > 1;\n        }\n        else {\n            return getSpan(cellOrCol, 'colspan') > 1;\n        }\n    };\n    const hasRowspan = (cell) => getSpan(cell, 'rowspan') > 1;\n    const getCssValue = (element, property) => parseInt(get$9(element, property), 10);\n    const minWidth = constant(10);\n    const minHeight = constant(10);\n\n    const firstLayer = (scope, selector) => {\n        return filterFirstLayer(scope, selector, always);\n    };\n    const filterFirstLayer = (scope, selector, predicate) => {\n        return bind$2(children$2(scope), (x) => {\n            if (is$1(x, selector)) {\n                return predicate(x) ? [x] : [];\n            }\n            else {\n                return filterFirstLayer(x, selector, predicate);\n            }\n        });\n    };\n\n    // lookup inside this table\n    const lookup = (tags, element, isRoot = never) => {\n        // If the element we're inspecting is the root, we definitely don't want it.\n        if (isRoot(element)) {\n            return Optional.none();\n        }\n        // This looks a lot like SelectorFind.closest, with one big exception - the isRoot check.\n        // The code here will look for parents if passed a table, SelectorFind.closest with that specific isRoot check won't.\n        if (contains$2(tags, name(element))) {\n            return Optional.some(element);\n        }\n        const isRootOrUpperTable = (elm) => is$1(elm, 'table') || isRoot(elm);\n        return ancestor$1(element, tags.join(','), isRootOrUpperTable);\n    };\n    /*\n     * Identify the optional cell that element represents.\n     */\n    const cell = (element, isRoot) => lookup(['td', 'th'], element, isRoot);\n    const cells$1 = (ancestor) => firstLayer(ancestor, 'th,td');\n    const columns$1 = (ancestor) => {\n        if (is$1(ancestor, 'colgroup')) {\n            return children(ancestor, 'col');\n        }\n        else {\n            return bind$2(columnGroups(ancestor), (columnGroup) => children(columnGroup, 'col'));\n        }\n    };\n    const table = (element, isRoot) => closest$1(element, 'table', isRoot);\n    const rows$1 = (ancestor) => firstLayer(ancestor, 'tr');\n    const columnGroups = (ancestor) => table(ancestor).fold(constant([]), (table) => children(table, 'colgroup'));\n\n    const isHeaderCell = isTag('th');\n    const isHeaderCells = (cells) => forall(cells, (cell) => isHeaderCell(cell.element));\n    const getRowHeaderType = (isHeaderRow, isHeaderCells) => {\n        if (isHeaderRow && isHeaderCells) {\n            return 'sectionCells';\n        }\n        else if (isHeaderRow) {\n            return 'section';\n        }\n        else {\n            return 'cells';\n        }\n    };\n    const getRowType = (row) => {\n        // Header rows can use a combination of theads and ths - want to detect the different combinations\n        const isHeaderRow = row.section === 'thead';\n        const isHeaderCells = is$2(findCommonCellType(row.cells), 'th');\n        if (row.section === 'tfoot') {\n            return { type: 'footer' };\n        }\n        else if (isHeaderRow || isHeaderCells) {\n            return { type: 'header', subType: getRowHeaderType(isHeaderRow, isHeaderCells) };\n        }\n        else {\n            return { type: 'body' };\n        }\n    };\n    const findCommonCellType = (cells) => {\n        const headerCells = filter$2(cells, (cell) => isHeaderCell(cell.element));\n        if (headerCells.length === 0) {\n            return Optional.some('td');\n        }\n        else if (headerCells.length === cells.length) {\n            return Optional.some('th');\n        }\n        else {\n            return Optional.none();\n        }\n    };\n    const findCommonRowType = (rows) => {\n        const rowTypes = map$1(rows, (row) => getRowType(row).type);\n        const hasHeader = contains$2(rowTypes, 'header');\n        const hasFooter = contains$2(rowTypes, 'footer');\n        if (!hasHeader && !hasFooter) {\n            return Optional.some('body');\n        }\n        else {\n            const hasBody = contains$2(rowTypes, 'body');\n            if (hasHeader && !hasBody && !hasFooter) {\n                return Optional.some('header');\n            }\n            else if (!hasHeader && !hasBody && hasFooter) {\n                return Optional.some('footer');\n            }\n            else {\n                return Optional.none();\n            }\n        }\n    };\n    const findTableRowHeaderType = (warehouse) => findMap(warehouse.all, (row) => {\n        const rowType = getRowType(row);\n        return rowType.type === 'header' ? Optional.from(rowType.subType) : Optional.none();\n    });\n\n    const fromRowsOrColGroups = (elems, getSection) => map$1(elems, (row) => {\n        if (name(row) === 'colgroup') {\n            const cells = map$1(columns$1(row), (column) => {\n                const colspan = getAttrValue(column, 'span', 1);\n                return detail(column, 1, colspan);\n            });\n            return rowdetail(row, cells, 'colgroup');\n        }\n        else {\n            const cells = map$1(cells$1(row), (cell) => {\n                const rowspan = getAttrValue(cell, 'rowspan', 1);\n                const colspan = getAttrValue(cell, 'colspan', 1);\n                return detail(cell, rowspan, colspan);\n            });\n            return rowdetail(row, cells, getSection(row));\n        }\n    });\n    const getParentSection = (group) => parent(group).map((parent) => {\n        const parentName = name(parent);\n        return isValidSection(parentName) ? parentName : 'tbody';\n    }).getOr('tbody');\n    /*\n     * Takes a DOM table and returns a list of list of:\n       element: row element\n       cells: (id, rowspan, colspan) structs\n     */\n    const fromTable$1 = (table) => {\n        const rows = rows$1(table);\n        const columnGroups$1 = columnGroups(table);\n        const elems = [...columnGroups$1, ...rows];\n        return fromRowsOrColGroups(elems, getParentSection);\n    };\n    const fromPastedRows = (elems, section) => fromRowsOrColGroups(elems, () => section);\n\n    const LOCKED_COL_ATTR = 'data-snooker-locked-cols';\n    const getLockedColumnsFromTable = (table) => getOpt(table, LOCKED_COL_ATTR)\n        .bind((lockedColStr) => Optional.from(lockedColStr.match(/\\d+/g)))\n        .map((lockedCols) => mapToObject(lockedCols, always));\n    // Need to check all of the cells to determine which columns are locked - reasoning is because rowspan and colspan cells where the same cell is used by multiple columns\n    const getLockedColumnsFromGrid = (grid) => {\n        const locked = foldl(extractGridDetails(grid).rows, (acc, row) => {\n            each$2(row.cells, (cell, idx) => {\n                if (cell.isLocked) {\n                    acc[idx] = true;\n                }\n            });\n            return acc;\n        }, {});\n        const lockedArr = mapToArray(locked, (_val, key) => parseInt(key, 10));\n        return sort$1(lockedArr);\n    };\n\n    const key = (row, column) => {\n        return row + ',' + column;\n    };\n    const getAt = (warehouse, row, column) => Optional.from(warehouse.access[key(row, column)]);\n    const findItem = (warehouse, item, comparator) => {\n        const filtered = filterItems(warehouse, (detail) => {\n            return comparator(item, detail.element);\n        });\n        return filtered.length > 0 ? Optional.some(filtered[0]) : Optional.none();\n    };\n    const filterItems = (warehouse, predicate) => {\n        const all = bind$2(warehouse.all, (r) => {\n            return r.cells;\n        });\n        return filter$2(all, predicate);\n    };\n    const generateColumns = (rowData) => {\n        const columnsGroup = {};\n        let index = 0;\n        each$2(rowData.cells, (column) => {\n            const colspan = column.colspan;\n            range$1(colspan, (columnIndex) => {\n                const colIndex = index + columnIndex;\n                columnsGroup[colIndex] = columnext(column.element, colspan, colIndex);\n            });\n            index += colspan;\n        });\n        return columnsGroup;\n    };\n    /*\n     * From a list of list of Detail, generate three pieces of information:\n     *  1. the grid size\n     *  2. a data structure which can efficiently identify which cell is in which row,column position\n     *  3. a list of all cells in order left-to-right, top-to-bottom\n     */\n    const generate = (list) => {\n        // list is an array of objects, made by cells and elements\n        // elements: is the TR\n        // cells: is an array of objects representing the cells in the row.\n        //        It is made of:\n        //          colspan (merge cell)\n        //          element\n        //          rowspan (merge cols)\n        const access = {};\n        const cells = [];\n        const tableOpt = head(list).map((rowData) => rowData.element).bind(table);\n        const lockedColumns = tableOpt.bind(getLockedColumnsFromTable).getOr({});\n        let maxRows = 0;\n        let maxColumns = 0;\n        let rowCount = 0;\n        const { pass: colgroupRows, fail: rows } = partition(list, (rowData) => rowData.section === 'colgroup');\n        // Handle rows first\n        each$2(rows, (rowData) => {\n            const currentRow = [];\n            each$2(rowData.cells, (rowCell) => {\n                let start = 0;\n                // If this spot has been taken by a previous rowspan, skip it.\n                while (access[key(rowCount, start)] !== undefined) {\n                    start++;\n                }\n                const isLocked = hasNonNullableKey(lockedColumns, start.toString());\n                const current = extended(rowCell.element, rowCell.rowspan, rowCell.colspan, rowCount, start, isLocked);\n                // Occupy all the (row, column) positions that this cell spans for.\n                for (let occupiedColumnPosition = 0; occupiedColumnPosition < rowCell.colspan; occupiedColumnPosition++) {\n                    for (let occupiedRowPosition = 0; occupiedRowPosition < rowCell.rowspan; occupiedRowPosition++) {\n                        const rowPosition = rowCount + occupiedRowPosition;\n                        const columnPosition = start + occupiedColumnPosition;\n                        const newpos = key(rowPosition, columnPosition);\n                        access[newpos] = current;\n                        maxColumns = Math.max(maxColumns, columnPosition + 1);\n                    }\n                }\n                currentRow.push(current);\n            });\n            maxRows++;\n            cells.push(rowdetail(rowData.element, currentRow, rowData.section));\n            rowCount++;\n        });\n        // Handle colgroups\n        // Note: Currently only a single colgroup is supported so just use the last one\n        const { columns, colgroups } = last$2(colgroupRows).map((rowData) => {\n            const columns = generateColumns(rowData);\n            const colgroup$1 = colgroup(rowData.element, values(columns));\n            return {\n                colgroups: [colgroup$1],\n                columns\n            };\n        }).getOrThunk(() => ({\n            colgroups: [],\n            columns: {}\n        }));\n        const grid$1 = grid(maxRows, maxColumns);\n        return {\n            grid: grid$1,\n            access,\n            all: cells,\n            columns,\n            colgroups\n        };\n    };\n    const fromTable = (table) => {\n        const list = fromTable$1(table);\n        return generate(list);\n    };\n    const justCells = (warehouse) => bind$2(warehouse.all, (w) => w.cells);\n    const justColumns = (warehouse) => values(warehouse.columns);\n    const hasColumns = (warehouse) => keys(warehouse.columns).length > 0;\n    const getColumnAt = (warehouse, columnIndex) => Optional.from(warehouse.columns[columnIndex]);\n    const Warehouse = {\n        fromTable,\n        generate,\n        getAt,\n        findItem,\n        filterItems,\n        justCells,\n        justColumns,\n        hasColumns,\n        getColumnAt\n    };\n\n    const transformCell = (cell, comparator, substitution) => elementnew(substitution(cell.element, comparator), true, cell.isLocked);\n    const transformRow = (row, section) => row.section !== section ? rowcells(row.element, row.cells, section, row.isNew) : row;\n    const section = () => ({\n        transformRow,\n        transformCell: (cell, comparator, substitution) => {\n            const newCell = substitution(cell.element, comparator);\n            // Convert the cell to a td element as \"section\" should always use td element\n            const fixedCell = name(newCell) !== 'td' ? mutate$1(newCell, 'td') : newCell;\n            return elementnew(fixedCell, cell.isNew, cell.isLocked);\n        }\n    });\n    const sectionCells = () => ({\n        transformRow,\n        transformCell\n    });\n    const cells = () => ({\n        transformRow: (row, section) => {\n            // Ensure that cells are always within the tbody for headers\n            const newSection = section === 'thead' ? 'tbody' : section;\n            return transformRow(row, newSection);\n        },\n        transformCell\n    });\n    // A fallback legacy type that won't adjust the row/section type\n    // and instead will only modify cells\n    const fallback = () => ({\n        transformRow: identity,\n        transformCell\n    });\n    const getTableSectionType = (table, fallback) => {\n        const warehouse = Warehouse.fromTable(table);\n        const type = findTableRowHeaderType(warehouse).getOr(fallback);\n        switch (type) {\n            case 'section':\n                return section();\n            case 'sectionCells':\n                return sectionCells();\n            case 'cells':\n                return cells();\n        }\n    };\n    const TableSection = {\n        getTableSectionType,\n        section,\n        sectionCells,\n        cells,\n        fallback\n    };\n\n    /*\n     * Identify for each column, a cell that has colspan 1. Note, this\n     * may actually fail, and future work will be to calculate column\n     * sizes that are only available through the difference of two\n     * spanning columns.\n     */\n    const columns = (warehouse, isValidCell = always) => {\n        const grid = warehouse.grid;\n        const cols = range$1(grid.columns, identity);\n        const rowsArr = range$1(grid.rows, identity);\n        return map$1(cols, (col) => {\n            const getBlock = () => bind$2(rowsArr, (r) => Warehouse.getAt(warehouse, r, col)\n                .filter((detail) => detail.column === col)\n                .toArray());\n            const isValid = (detail) => detail.colspan === 1 && isValidCell(detail.element);\n            const getFallback = () => Warehouse.getAt(warehouse, 0, col);\n            return decide(getBlock, isValid, getFallback);\n        });\n    };\n    const decide = (getBlock, isValid, getFallback) => {\n        const inBlock = getBlock();\n        const validInBlock = find$1(inBlock, isValid);\n        const detailOption = validInBlock.orThunk(() => Optional.from(inBlock[0]).orThunk(getFallback));\n        return detailOption.map((detail) => detail.element);\n    };\n    const rows = (warehouse) => {\n        const grid = warehouse.grid;\n        const rowsArr = range$1(grid.rows, identity);\n        const cols = range$1(grid.columns, identity);\n        return map$1(rowsArr, (row) => {\n            const getBlock = () => bind$2(cols, (c) => Warehouse.getAt(warehouse, row, c)\n                .filter((detail) => detail.row === row)\n                .fold(constant([]), (detail) => [detail]));\n            const isSingle = (detail) => detail.rowspan === 1;\n            const getFallback = () => Warehouse.getAt(warehouse, row, 0);\n            return decide(getBlock, isSingle, getFallback);\n        });\n    };\n\n    const deduce = (xs, index) => {\n        if (index < 0 || index >= xs.length - 1) {\n            return Optional.none();\n        }\n        const current = xs[index].fold(() => {\n            const rest = reverse(xs.slice(0, index));\n            return findMap(rest, (a, i) => a.map((aa) => ({ value: aa, delta: i + 1 })));\n        }, (c) => Optional.some({ value: c, delta: 0 }));\n        const next = xs[index + 1].fold(() => {\n            const rest = xs.slice(index + 1);\n            return findMap(rest, (a, i) => a.map((aa) => ({ value: aa, delta: i + 1 })));\n        }, (n) => Optional.some({ value: n, delta: 1 }));\n        return current.bind((c) => next.map((n) => {\n            const extras = n.delta + c.delta;\n            return Math.abs(n.value - c.value) / extras;\n        }));\n    };\n\n    const rowInfo = (row, y) => ({\n        row,\n        y\n    });\n    const colInfo = (col, x) => ({\n        col,\n        x\n    });\n    const rtlEdge = (cell) => {\n        const pos = absolute(cell);\n        return pos.left + getOuter(cell);\n    };\n    const ltrEdge = (cell) => {\n        return absolute(cell).left;\n    };\n    const getLeftEdge = (index, cell) => {\n        return colInfo(index, ltrEdge(cell));\n    };\n    const getRightEdge = (index, cell) => {\n        return colInfo(index, rtlEdge(cell));\n    };\n    const getTop$1 = (cell) => {\n        return absolute(cell).top;\n    };\n    const getTopEdge = (index, cell) => {\n        return rowInfo(index, getTop$1(cell));\n    };\n    const getBottomEdge = (index, cell) => {\n        return rowInfo(index, getTop$1(cell) + getOuter$1(cell));\n    };\n    const findPositions = (getInnerEdge, getOuterEdge, array) => {\n        if (array.length === 0) {\n            return [];\n        }\n        const lines = map$1(array.slice(1), (cellOption, index) => {\n            return cellOption.map((cell) => {\n                return getInnerEdge(index, cell);\n            });\n        });\n        const lastLine = array[array.length - 1].map((cell) => {\n            return getOuterEdge(array.length - 1, cell);\n        });\n        return lines.concat([lastLine]);\n    };\n    const negate = (step) => {\n        return -step;\n    };\n    const height = {\n        delta: identity,\n        positions: (optElements) => findPositions(getTopEdge, getBottomEdge, optElements),\n        edge: getTop$1\n    };\n    const ltr$1 = {\n        delta: identity,\n        edge: ltrEdge,\n        positions: (optElements) => findPositions(getLeftEdge, getRightEdge, optElements)\n    };\n    const rtl$1 = {\n        delta: negate,\n        edge: rtlEdge,\n        positions: (optElements) => findPositions(getRightEdge, getLeftEdge, optElements)\n    };\n    const detect$1 = onDirection(ltr$1, rtl$1);\n    const width = {\n        delta: (amount, table) => detect$1(table).delta(amount, table),\n        positions: (cols, table) => detect$1(table).positions(cols, table),\n        edge: (cell) => detect$1(cell).edge(cell)\n    };\n\n    const rPercentageBasedSizeRegex = /(\\d+(\\.\\d+)?)%/;\n    const rPixelBasedSizeRegex = /(\\d+(\\.\\d+)?)px|em/;\n    const isCol$2 = isTag('col');\n    const isRow$2 = isTag('tr');\n    const getPercentSize = (elm, outerGetter, innerGetter) => {\n        const relativeParent = parentElement(elm).getOrThunk(() => getBody$1(owner(elm)));\n        return outerGetter(elm) / innerGetter(relativeParent) * 100;\n    };\n    const setPixelWidth = (cell, amount) => {\n        set$1(cell, 'width', amount + 'px');\n    };\n    const setPercentageWidth = (cell, amount) => {\n        set$1(cell, 'width', amount + '%');\n    };\n    const setHeight = (cell, amount) => {\n        set$1(cell, 'height', amount + 'px');\n    };\n    const removeHeight = (cell) => {\n        remove$4(cell, 'height');\n    };\n    const getHeightValue = (cell) => getRuntime$1(cell) + 'px';\n    const convert = (cell, number, getter, setter) => {\n        const newSize = table(cell).map((table) => {\n            const total = getter(table);\n            return Math.floor((number / 100.0) * total);\n        }).getOr(number);\n        setter(cell, newSize);\n        return newSize;\n    };\n    const normalizePixelSize = (value, cell, getter, setter) => {\n        const number = parseFloat(value);\n        return endsWith(value, '%') && name(cell) !== 'table' ? convert(cell, number, getter, setter) : number;\n    };\n    const getTotalHeight = (cell) => {\n        const value = getHeightValue(cell);\n        if (!value) {\n            return get$8(cell);\n        }\n        return normalizePixelSize(value, cell, get$8, setHeight);\n    };\n    const get$2 = (cell, type, f) => {\n        const v = f(cell);\n        const span = getSpan(cell, type);\n        return v / span;\n    };\n    const getRaw = (element, prop) => {\n        // Try to use the style first, otherwise attempt to get the value from an attribute\n        return getRaw$2(element, prop).orThunk(() => {\n            return getOpt(element, prop).map((val) => val + 'px');\n        });\n    };\n    const getRawWidth$1 = (element) => getRaw(element, 'width');\n    const getRawHeight$1 = (element) => getRaw(element, 'height');\n    // Get a percentage size for a percentage parent table\n    const getPercentageWidth = (cell) => getPercentSize(cell, get$7, getInner);\n    const getPixelWidth$1 = (cell) => \n    // For col elements use the computed width as col elements aren't affected by borders, padding, etc...\n    isCol$2(cell) ? Math.round(get$7(cell)) : getRuntime(cell);\n    const getHeight = (cell) => {\n        return isRow$2(cell) ? get$8(cell) : get$2(cell, 'rowspan', getTotalHeight);\n    };\n    const getGenericWidth = (cell) => {\n        const width = getRawWidth$1(cell);\n        return width.bind((w) => parse(w, ['fixed', 'relative', 'empty']));\n    };\n    const setGenericWidth = (cell, amount, unit) => {\n        set$1(cell, 'width', amount + unit);\n    };\n    const getPixelTableWidth = (table) => get$7(table) + 'px';\n    const getPixelTableHeight = (table) => get$8(table) + 'px';\n    const getPercentTableWidth = (table) => getPercentSize(table, get$7, getInner) + '%';\n    const isPercentSizing$1 = (table) => getRawWidth$1(table).exists((size) => rPercentageBasedSizeRegex.test(size));\n    const isPixelSizing$1 = (table) => getRawWidth$1(table).exists((size) => rPixelBasedSizeRegex.test(size));\n    const isNoneSizing$1 = (table) => getRawWidth$1(table).isNone();\n    const percentageBasedSizeRegex = constant(rPercentageBasedSizeRegex);\n\n    const isCol$1 = isTag('col');\n    const getRawW = (cell) => {\n        return getRawWidth$1(cell).getOrThunk(() => getPixelWidth$1(cell) + 'px');\n    };\n    const getRawH = (cell) => {\n        return getRawHeight$1(cell).getOrThunk(() => getHeight(cell) + 'px');\n    };\n    const justCols = (warehouse) => map$1(Warehouse.justColumns(warehouse), (column) => Optional.from(column.element));\n    // Col elements don't have valid computed widths/positions in all browsers, so treat them as invalid in that case\n    const isValidColumn = (cell) => {\n        const browser = detect$2().browser;\n        const supportsColWidths = browser.isChromium() || browser.isFirefox();\n        return isCol$1(cell) ? supportsColWidths : true;\n    };\n    const getDimension = (cellOpt, index, backups, filter, getter, fallback) => cellOpt.filter(filter).fold(\n    // Can't just read the width of a cell, so calculate.\n    () => fallback(deduce(backups, index)), (cell) => getter(cell));\n    const getWidthFrom = (warehouse, table, getWidth, fallback) => {\n        // Only treat a cell as being valid for a column representation if it has a raw width, otherwise we won't be able to calculate the expected width.\n        // This is needed as one cell may have a width but others may not, so we need to try and use one with a specified width first.\n        const columnCells = columns(warehouse);\n        const columns$1 = Warehouse.hasColumns(warehouse) ? justCols(warehouse) : columnCells;\n        const backups = [Optional.some(width.edge(table))].concat(map$1(width.positions(columnCells, table), (pos) => pos.map((p) => p.x)));\n        // Only use the width of cells that have no column span (or colspan 1)\n        const colFilter = not(hasColspan);\n        return map$1(columns$1, (cellOption, c) => {\n            return getDimension(cellOption, c, backups, colFilter, (column) => {\n                if (isValidColumn(column)) {\n                    return getWidth(column);\n                }\n                else {\n                    // Invalid column so fallback to trying to get the computed width from the cell\n                    const cell = bindFrom(columnCells[c], identity);\n                    return getDimension(cell, c, backups, colFilter, (cell) => fallback(Optional.some(Math.round(get$7(cell)))), fallback);\n                }\n            }, fallback);\n        });\n    };\n    const getDeduced = (deduced) => {\n        return deduced.map((d) => {\n            return d + 'px';\n        }).getOr('');\n    };\n    const getRawWidths = (warehouse, table) => {\n        return getWidthFrom(warehouse, table, getRawW, getDeduced);\n    };\n    const getPercentageWidths = (warehouse, table, tableSize) => {\n        return getWidthFrom(warehouse, table, getPercentageWidth, (deduced) => {\n            return deduced.fold(() => {\n                return tableSize.minCellWidth();\n            }, (cellWidth) => {\n                return cellWidth / tableSize.pixelWidth() * 100;\n            });\n        });\n    };\n    const getPixelWidths = (warehouse, table, tableSize) => {\n        return getWidthFrom(warehouse, table, getPixelWidth$1, (deduced) => {\n            // Minimum cell width when all else fails.\n            return deduced.getOrThunk(tableSize.minCellWidth);\n        });\n    };\n    const getHeightFrom = (warehouse, table, getHeight, fallback) => {\n        const rowCells = rows(warehouse);\n        const rows$1 = map$1(warehouse.all, (r) => Optional.some(r.element));\n        const backups = [Optional.some(height.edge(table))].concat(map$1(height.positions(rowCells, table), (pos) => pos.map((p) => p.y)));\n        return map$1(rows$1, (row, i) => getDimension(row, i, backups, always, getHeight, fallback));\n    };\n    const getPixelHeights = (warehouse, table) => {\n        return getHeightFrom(warehouse, table, getHeight, (deduced) => {\n            return deduced.getOrThunk(minHeight);\n        });\n    };\n    const getRawHeights = (warehouse, table) => {\n        return getHeightFrom(warehouse, table, getRawH, getDeduced);\n    };\n\n    const widthLookup = (table, getter) => () => {\n        // Use the actual width if attached, otherwise fallback to the raw width\n        if (inBody(table)) {\n            return getter(table);\n        }\n        else {\n            return parseFloat(getRaw$2(table, 'width').getOr('0'));\n        }\n    };\n    const noneSize = (table) => {\n        const getWidth = widthLookup(table, get$7);\n        const zero = constant(0);\n        const getWidths = (warehouse, tableSize) => getPixelWidths(warehouse, table, tableSize);\n        // Note: The 3 delta functions below return 0 to signify a change shouldn't be made\n        // however this is currently not used, so may need changing if ever used\n        return {\n            width: getWidth,\n            pixelWidth: getWidth,\n            getWidths,\n            getCellDelta: zero,\n            singleColumnWidth: constant([0]),\n            minCellWidth: zero,\n            setElementWidth: noop,\n            adjustTableWidth: noop,\n            isRelative: true,\n            label: 'none'\n        };\n    };\n    const percentageSize = (table) => {\n        const getFloatWidth = widthLookup(table, (elem) => parseFloat(getPercentTableWidth(elem)));\n        const getWidth = widthLookup(table, get$7);\n        const getCellDelta = (delta) => delta / getWidth() * 100;\n        // If we have one column in a percent based table, that column should be 100% of the width of the table.\n        const singleColumnWidth = (w, _delta) => [100 - w];\n        // Get the width of a 10 pixel wide cell over the width of the table as a percentage\n        const minCellWidth = () => minWidth() / getWidth() * 100;\n        const adjustTableWidth = (delta) => {\n            const currentWidth = getFloatWidth();\n            const change = delta / 100 * currentWidth;\n            const newWidth = currentWidth + change;\n            setPercentageWidth(table, newWidth);\n        };\n        const getWidths = (warehouse, tableSize) => getPercentageWidths(warehouse, table, tableSize);\n        return {\n            width: getFloatWidth,\n            pixelWidth: getWidth,\n            getWidths,\n            getCellDelta,\n            singleColumnWidth,\n            minCellWidth,\n            setElementWidth: setPercentageWidth,\n            adjustTableWidth,\n            isRelative: true,\n            label: 'percent'\n        };\n    };\n    const pixelSize = (table) => {\n        const getWidth = widthLookup(table, get$7);\n        const getCellDelta = identity;\n        const singleColumnWidth = (w, delta) => {\n            const newNext = Math.max(minWidth(), w + delta);\n            return [newNext - w];\n        };\n        const adjustTableWidth = (delta) => {\n            const newWidth = getWidth() + delta;\n            setPixelWidth(table, newWidth);\n        };\n        const getWidths = (warehouse, tableSize) => getPixelWidths(warehouse, table, tableSize);\n        return {\n            width: getWidth,\n            pixelWidth: getWidth,\n            getWidths,\n            getCellDelta,\n            singleColumnWidth,\n            minCellWidth: minWidth,\n            setElementWidth: setPixelWidth,\n            adjustTableWidth,\n            isRelative: false,\n            label: 'pixel'\n        };\n    };\n    const chooseSize = (element, width) => {\n        const percentMatch = percentageBasedSizeRegex().exec(width);\n        if (percentMatch !== null) {\n            return percentageSize(element);\n        }\n        else {\n            return pixelSize(element);\n        }\n    };\n    const getTableSize = (table) => {\n        const width = getRawWidth$1(table);\n        return width.fold(() => noneSize(table), (w) => chooseSize(table, w));\n    };\n    const TableSize = {\n        getTableSize,\n        pixelSize,\n        percentageSize,\n        noneSize\n    };\n\n    const setIfNot = (element, property, value, ignore) => {\n        if (value === ignore) {\n            remove$6(element, property);\n        }\n        else {\n            set$2(element, property, value);\n        }\n    };\n    const insert$1 = (table, selector, element) => {\n        last$2(children(table, selector)).fold(() => prepend(table, element), (child) => after$4(child, element));\n    };\n    const generateSection = (table, sectionName) => {\n        const section = child(table, sectionName).getOrThunk(() => {\n            const newSection = SugarElement.fromTag(sectionName, owner(table).dom);\n            if (sectionName === 'thead') {\n                insert$1(table, 'caption,colgroup', newSection);\n            }\n            else if (sectionName === 'colgroup') {\n                insert$1(table, 'caption', newSection);\n            }\n            else {\n                append$1(table, newSection);\n            }\n            return newSection;\n        });\n        empty(section);\n        return section;\n    };\n    const render$1 = (table, grid) => {\n        const newRows = [];\n        const newCells = [];\n        const syncRows = (gridSection) => map$1(gridSection, (row) => {\n            if (row.isNew) {\n                newRows.push(row.element);\n            }\n            const tr = row.element;\n            empty(tr);\n            each$2(row.cells, (cell) => {\n                if (cell.isNew) {\n                    newCells.push(cell.element);\n                }\n                setIfNot(cell.element, 'colspan', cell.colspan, 1);\n                setIfNot(cell.element, 'rowspan', cell.rowspan, 1);\n                append$1(tr, cell.element);\n            });\n            return tr;\n        });\n        // Assumption we should only ever have 1 colgroup. The spec allows for multiple, however it's currently unsupported\n        const syncColGroup = (gridSection) => bind$2(gridSection, (colGroup) => map$1(colGroup.cells, (col) => {\n            setIfNot(col.element, 'span', col.colspan, 1);\n            return col.element;\n        }));\n        const renderSection = (gridSection, sectionName) => {\n            const section = generateSection(table, sectionName);\n            const sync = sectionName === 'colgroup' ? syncColGroup : syncRows;\n            const sectionElems = sync(gridSection);\n            append(section, sectionElems);\n        };\n        const removeSection = (sectionName) => {\n            child(table, sectionName).each(remove$5);\n        };\n        const renderOrRemoveSection = (gridSection, sectionName) => {\n            if (gridSection.length > 0) {\n                renderSection(gridSection, sectionName);\n            }\n            else {\n                removeSection(sectionName);\n            }\n        };\n        const headSection = [];\n        const bodySection = [];\n        const footSection = [];\n        const columnGroupsSection = [];\n        each$2(grid, (row) => {\n            switch (row.section) {\n                case 'thead':\n                    headSection.push(row);\n                    break;\n                case 'tbody':\n                    bodySection.push(row);\n                    break;\n                case 'tfoot':\n                    footSection.push(row);\n                    break;\n                case 'colgroup':\n                    columnGroupsSection.push(row);\n                    break;\n            }\n        });\n        renderOrRemoveSection(columnGroupsSection, 'colgroup');\n        renderOrRemoveSection(headSection, 'thead');\n        renderOrRemoveSection(bodySection, 'tbody');\n        renderOrRemoveSection(footSection, 'tfoot');\n        return {\n            newRows,\n            newCells\n        };\n    };\n    const copy = (grid) => map$1(grid, (row) => {\n        // Shallow copy the row element\n        const tr = shallow(row.element);\n        each$2(row.cells, (cell) => {\n            const clonedCell = deep(cell.element);\n            setIfNot(clonedCell, 'colspan', cell.colspan, 1);\n            setIfNot(clonedCell, 'rowspan', cell.rowspan, 1);\n            append$1(tr, clonedCell);\n        });\n        return tr;\n    });\n\n    const getColumn = (grid, index) => {\n        return map$1(grid, (row) => {\n            return getCell(row, index);\n        });\n    };\n    const getRow = (grid, index) => {\n        return grid[index];\n    };\n    const findDiff = (xs, comp) => {\n        if (xs.length === 0) {\n            return 0;\n        }\n        const first = xs[0];\n        const index = findIndex(xs, (x) => {\n            return !comp(first.element, x.element);\n        });\n        return index.getOr(xs.length);\n    };\n    /*\n     * grid is the grid\n     * row is the row index into the grid\n     * column in the column index into the grid\n     *\n     * Return\n     *   colspan: column span of the cell at (row, column)\n     *   rowspan: row span of the cell at (row, column)\n     */\n    const subgrid = (grid, row, column, comparator) => {\n        const gridRow = getRow(grid, row);\n        const isColRow = gridRow.section === 'colgroup';\n        const colspan = findDiff(gridRow.cells.slice(column), comparator);\n        const rowspan = isColRow ? 1 : findDiff(getColumn(grid.slice(row), column), comparator);\n        return {\n            colspan,\n            rowspan\n        };\n    };\n\n    const toDetails = (grid, comparator) => {\n        const seen = map$1(grid, (row) => map$1(row.cells, never));\n        const updateSeen = (rowIndex, columnIndex, rowspan, colspan) => {\n            for (let row = rowIndex; row < rowIndex + rowspan; row++) {\n                for (let column = columnIndex; column < columnIndex + colspan; column++) {\n                    seen[row][column] = true;\n                }\n            }\n        };\n        return map$1(grid, (row, rowIndex) => {\n            const details = bind$2(row.cells, (cell, columnIndex) => {\n                // if we have seen this one, then skip it.\n                if (seen[rowIndex][columnIndex] === false) {\n                    const result = subgrid(grid, rowIndex, columnIndex, comparator);\n                    updateSeen(rowIndex, columnIndex, result.rowspan, result.colspan);\n                    return [detailnew(cell.element, result.rowspan, result.colspan, cell.isNew)];\n                }\n                else {\n                    return [];\n                }\n            });\n            return rowdetailnew(row.element, details, row.section, row.isNew);\n        });\n    };\n    const toGrid = (warehouse, generators, isNew) => {\n        const grid = [];\n        each$2(warehouse.colgroups, (colgroup) => {\n            const colgroupCols = [];\n            // This will add missing cols as well as clamp the number of cols to the max number of actual columns\n            // Note: Spans on cols are unsupported so clamping cols may result in a span on a col element being incorrect\n            for (let columnIndex = 0; columnIndex < warehouse.grid.columns; columnIndex++) {\n                const element = Warehouse.getColumnAt(warehouse, columnIndex)\n                    .map((column) => elementnew(column.element, isNew, false))\n                    .getOrThunk(() => elementnew(generators.colGap(), true, false));\n                colgroupCols.push(element);\n            }\n            grid.push(rowcells(colgroup.element, colgroupCols, 'colgroup', isNew));\n        });\n        for (let rowIndex = 0; rowIndex < warehouse.grid.rows; rowIndex++) {\n            const rowCells = [];\n            for (let columnIndex = 0; columnIndex < warehouse.grid.columns; columnIndex++) {\n                // The element is going to be the element at that position, or a newly generated gap.\n                const element = Warehouse.getAt(warehouse, rowIndex, columnIndex).map((item) => elementnew(item.element, isNew, item.isLocked)).getOrThunk(() => elementnew(generators.gap(), true, false));\n                rowCells.push(element);\n            }\n            const rowDetail = warehouse.all[rowIndex];\n            const row = rowcells(rowDetail.element, rowCells, rowDetail.section, isNew);\n            grid.push(row);\n        }\n        return grid;\n    };\n\n    const fromWarehouse = (warehouse, generators) => toGrid(warehouse, generators, false);\n    const toDetailList = (grid) => toDetails(grid, eq$1);\n    const findInWarehouse = (warehouse, element) => findMap(warehouse.all, (r) => find$1(r.cells, (e) => eq$1(element, e.element)));\n    const extractCells = (warehouse, target, predicate) => {\n        const details = map$1(target.selection, (cell$1) => {\n            return cell(cell$1)\n                .bind((lc) => findInWarehouse(warehouse, lc))\n                .filter(predicate);\n        });\n        const cells = cat(details);\n        return someIf(cells.length > 0, cells);\n    };\n    const run = (operation, extract, adjustment, postAction, genWrappers, table, target, generators, behaviours) => {\n        const warehouse = Warehouse.fromTable(table);\n        const tableSection = Optional.from(behaviours?.section).getOrThunk(TableSection.fallback);\n        const output = extract(warehouse, target).map((info) => {\n            const model = fromWarehouse(warehouse, generators);\n            const result = operation(model, info, eq$1, genWrappers(generators), tableSection);\n            const lockedColumns = getLockedColumnsFromGrid(result.grid);\n            const grid = toDetailList(result.grid);\n            return {\n                info,\n                grid,\n                cursor: result.cursor,\n                lockedColumns\n            };\n        });\n        return output.bind((out) => {\n            const newElements = render$1(table, out.grid);\n            const tableSizing = Optional.from(behaviours?.sizing).getOrThunk(() => TableSize.getTableSize(table));\n            const resizing = Optional.from(behaviours?.resize).getOrThunk(preserveTable);\n            adjustment(table, out.grid, out.info, { sizing: tableSizing, resize: resizing, section: tableSection });\n            postAction(table);\n            // Update locked cols attribute\n            remove$6(table, LOCKED_COL_ATTR);\n            if (out.lockedColumns.length > 0) {\n                set$2(table, LOCKED_COL_ATTR, out.lockedColumns.join(','));\n            }\n            return Optional.some({\n                cursor: out.cursor,\n                newRows: newElements.newRows,\n                newCells: newElements.newCells\n            });\n        });\n    };\n    const onPaste = (warehouse, target) => cell(target.element).bind((cell) => findInWarehouse(warehouse, cell).map((details) => {\n        const value = {\n            ...details,\n            generators: target.generators,\n            clipboard: target.clipboard\n        };\n        return value;\n    }));\n    const onPasteByEditor = (warehouse, target) => extractCells(warehouse, target, always).map((cells) => ({\n        cells,\n        generators: target.generators,\n        clipboard: target.clipboard\n    }));\n    const onMergable = (_warehouse, target) => target.mergable;\n    const onUnmergable = (_warehouse, target) => target.unmergable;\n    const onCells = (warehouse, target) => extractCells(warehouse, target, always);\n    const onUnlockedCells = (warehouse, target) => extractCells(warehouse, target, (detail) => !detail.isLocked);\n    const isUnlockedTableCell = (warehouse, cell) => findInWarehouse(warehouse, cell).exists((detail) => !detail.isLocked);\n    const allUnlocked = (warehouse, cells) => forall(cells, (cell) => isUnlockedTableCell(warehouse, cell));\n    // If any locked columns are present in the selection, then don't want to be able to merge\n    const onUnlockedMergable = (warehouse, target) => onMergable(warehouse, target).filter((mergeable) => allUnlocked(warehouse, mergeable.cells));\n    // If any locked columns are present in the selection, then don't want to be able to unmerge\n    const onUnlockedUnmergable = (warehouse, target) => onUnmergable(warehouse, target).filter((cells) => allUnlocked(warehouse, cells));\n\n    const adt$3 = Adt.generate([\n        { none: [] },\n        { only: ['index'] },\n        { left: ['index', 'next'] },\n        { middle: ['prev', 'index', 'next'] },\n        { right: ['prev', 'index'] }\n    ]);\n    const ColumnContext = {\n        ...adt$3\n    };\n\n    /*\n     * Based on the column index, identify the context\n     */\n    const neighbours = (input, index) => {\n        if (input.length === 0) {\n            return ColumnContext.none();\n        }\n        if (input.length === 1) {\n            return ColumnContext.only(0);\n        }\n        if (index === 0) {\n            return ColumnContext.left(0, 1);\n        }\n        if (index === input.length - 1) {\n            return ColumnContext.right(index - 1, index);\n        }\n        if (index > 0 && index < input.length - 1) {\n            return ColumnContext.middle(index - 1, index, index + 1);\n        }\n        return ColumnContext.none();\n    };\n    /*\n     * Calculate the offsets to apply to each column width (not the absolute widths themselves)\n     * based on a resize at column: column of step: step\n     */\n    const determine = (input, column, step, tableSize, resize) => {\n        const result = input.slice(0);\n        const context = neighbours(input, column);\n        const onNone = constant(map$1(result, constant(0)));\n        const onOnly = (index) => tableSize.singleColumnWidth(result[index], step);\n        const onLeft = (index, next) => resize.calcLeftEdgeDeltas(result, index, next, step, tableSize.minCellWidth(), tableSize.isRelative);\n        const onMiddle = (prev, index, next) => resize.calcMiddleDeltas(result, prev, index, next, step, tableSize.minCellWidth(), tableSize.isRelative);\n        // Applies to the last column bar\n        const onRight = (prev, index) => resize.calcRightEdgeDeltas(result, prev, index, step, tableSize.minCellWidth(), tableSize.isRelative);\n        return context.fold(onNone, onOnly, onLeft, onMiddle, onRight);\n    };\n\n    // Returns the sum of elements of measures in the half-open range [start, end)\n    // Measures is in pixels, treated as an array of integers or integers in string format.\n    // NOTE: beware of accumulated rounding errors over multiple columns - could result in noticeable table width changes\n    const total = (start, end, measures) => {\n        let r = 0;\n        for (let i = start; i < end; i++) {\n            r += measures[i] !== undefined ? measures[i] : 0;\n        }\n        return r;\n    };\n    // Returns an array of all cells in warehouse with updated cell-widths, using\n    // the array 'widths' of the representative widths of each column of the table 'warehouse'\n    const recalculateWidthForCells = (warehouse, widths) => {\n        const all = Warehouse.justCells(warehouse);\n        return map$1(all, (cell) => {\n            // width of a spanning cell is sum of widths of representative columns it spans\n            const width = total(cell.column, cell.column + cell.colspan, widths);\n            return {\n                element: cell.element,\n                width,\n                colspan: cell.colspan\n            };\n        });\n    };\n    const recalculateWidthForColumns = (warehouse, widths) => {\n        const groups = Warehouse.justColumns(warehouse);\n        return map$1(groups, (column, index) => ({\n            element: column.element,\n            width: widths[index],\n            colspan: column.colspan\n        }));\n    };\n    const matchRowHeight = (warehouse, heights) => {\n        return map$1(warehouse.all, (row, i) => {\n            return {\n                element: row.element,\n                height: heights[i]\n            };\n        });\n    };\n\n    const sumUp = (newSize) => foldr(newSize, (b, a) => b + a, 0);\n    const recalculate = (warehouse, widths) => {\n        if (Warehouse.hasColumns(warehouse)) {\n            return recalculateWidthForColumns(warehouse, widths);\n        }\n        else {\n            return recalculateWidthForCells(warehouse, widths);\n        }\n    };\n    const recalculateAndApply = (warehouse, widths, tableSize) => {\n        // Set the width of each cell based on the column widths\n        const newSizes = recalculate(warehouse, widths);\n        each$2(newSizes, (cell) => {\n            tableSize.setElementWidth(cell.element, cell.width);\n        });\n    };\n    const adjustWidth = (table, delta, index, resizing, tableSize) => {\n        const warehouse = Warehouse.fromTable(table);\n        const step = tableSize.getCellDelta(delta);\n        const widths = tableSize.getWidths(warehouse, tableSize);\n        const isLastColumn = index === warehouse.grid.columns - 1;\n        const clampedStep = resizing.clampTableDelta(widths, index, step, tableSize.minCellWidth(), isLastColumn);\n        // Calculate all of the new widths for columns\n        const deltas = determine(widths, index, clampedStep, tableSize, resizing);\n        const newWidths = map$1(deltas, (dx, i) => dx + widths[i]);\n        recalculateAndApply(warehouse, newWidths, tableSize);\n        resizing.resizeTable(tableSize.adjustTableWidth, clampedStep, isLastColumn);\n    };\n    const adjustHeight = (table, delta, index) => {\n        const warehouse = Warehouse.fromTable(table);\n        const heights = getPixelHeights(warehouse, table);\n        const newHeights = map$1(heights, (dy, i) => index === i ? Math.max(delta + dy, minHeight()) : dy);\n        const newRowSizes = matchRowHeight(warehouse, newHeights);\n        each$2(newRowSizes, (row) => {\n            setHeight(row.element, row.height);\n        });\n        each$2(Warehouse.justCells(warehouse), (cell) => {\n            removeHeight(cell.element);\n        });\n        const total = sumUp(newHeights);\n        setHeight(table, total);\n    };\n    // Using the width of the added/removed columns gathered on extraction (pixelDelta), get and apply the new column sizes and overall table width delta\n    const adjustAndRedistributeWidths$1 = (_table, list, details, tableSize, resizeBehaviour) => {\n        const warehouse = Warehouse.generate(list);\n        const sizes = tableSize.getWidths(warehouse, tableSize);\n        const tablePixelWidth = tableSize.pixelWidth();\n        const { newSizes, delta } = resizeBehaviour.calcRedestributedWidths(sizes, tablePixelWidth, details.pixelDelta, tableSize.isRelative);\n        recalculateAndApply(warehouse, newSizes, tableSize);\n        tableSize.adjustTableWidth(delta);\n    };\n    // Ensure that the width of table cells match the passed in table information.\n    const adjustWidthTo = (_table, list, _info, tableSize) => {\n        const warehouse = Warehouse.generate(list);\n        const widths = tableSize.getWidths(warehouse, tableSize);\n        recalculateAndApply(warehouse, widths, tableSize);\n    };\n\n    const halve = (main, other) => {\n        // Only set width on the new cell if we have a colspan of 1 (or no colspan) as we can only safely do that for cells\n        // that are a single column, since we don't know the individual column widths for a cell with a colspan.\n        // Instead, we'll rely on the adjustments/postAction logic to set the widths based on other cells in the column\n        if (!hasColspan(main)) {\n            const width = getGenericWidth(main);\n            width.each((w) => {\n                const newWidth = w.value / 2;\n                setGenericWidth(main, newWidth, w.unit);\n                setGenericWidth(other, newWidth, w.unit);\n            });\n        }\n    };\n\n    const constrainSpan = (element, property, value) => {\n        const currentColspan = getAttrValue(element, property, 1);\n        if (value === 1 || currentColspan <= 1) {\n            remove$6(element, property);\n        }\n        else {\n            set$2(element, property, Math.min(value, currentColspan));\n        }\n    };\n    const isColInRange = (minColRange, maxColRange) => (cell) => {\n        const endCol = cell.column + cell.colspan - 1;\n        const startCol = cell.column;\n        return endCol >= minColRange && startCol < maxColRange;\n    };\n    const generateColGroup = (house, minColRange, maxColRange) => {\n        if (Warehouse.hasColumns(house)) {\n            const colsToCopy = filter$2(Warehouse.justColumns(house), isColInRange(minColRange, maxColRange));\n            const copiedCols = map$1(colsToCopy, (c) => {\n                const clonedCol = deep(c.element);\n                constrainSpan(clonedCol, 'span', maxColRange - minColRange);\n                return clonedCol;\n            });\n            const fakeColgroup = SugarElement.fromTag('colgroup');\n            append(fakeColgroup, copiedCols);\n            return [fakeColgroup];\n        }\n        else {\n            return [];\n        }\n    };\n    const generateRows = (house, minColRange, maxColRange) => map$1(house.all, (row) => {\n        const cellsToCopy = filter$2(row.cells, isColInRange(minColRange, maxColRange));\n        const copiedCells = map$1(cellsToCopy, (cell) => {\n            const clonedCell = deep(cell.element);\n            constrainSpan(clonedCell, 'colspan', maxColRange - minColRange);\n            return clonedCell;\n        });\n        const fakeTR = SugarElement.fromTag('tr');\n        append(fakeTR, copiedCells);\n        return fakeTR;\n    });\n    const copyCols = (table, target) => {\n        const house = Warehouse.fromTable(table);\n        const details = onUnlockedCells(house, target);\n        return details.map((selectedCells) => {\n            const lastSelectedCell = selectedCells[selectedCells.length - 1];\n            const minColRange = selectedCells[0].column;\n            const maxColRange = lastSelectedCell.column + lastSelectedCell.colspan;\n            const fakeColGroups = generateColGroup(house, minColRange, maxColRange);\n            const fakeRows = generateRows(house, minColRange, maxColRange);\n            return [...fakeColGroups, ...fakeRows];\n        });\n    };\n\n    const copyRows = (table, target, generators) => {\n        const warehouse = Warehouse.fromTable(table);\n        // Cannot use onUnlockedCells like extractor here as if only cells in a locked column are selected, then this will be Optional.none and\n        // there is now no way of knowing which rows are selected\n        const details = onCells(warehouse, target);\n        return details.bind((selectedCells) => {\n            const grid = toGrid(warehouse, generators, false);\n            const rows = extractGridDetails(grid).rows;\n            const slicedGrid = rows.slice(selectedCells[0].row, selectedCells[selectedCells.length - 1].row + selectedCells[selectedCells.length - 1].rowspan);\n            // Remove any locked cells from the copied grid rows\n            const filteredGrid = bind$2(slicedGrid, (row) => {\n                const newCells = filter$2(row.cells, (cell) => !cell.isLocked);\n                return newCells.length > 0 ? [{ ...row, cells: newCells }] : [];\n            });\n            const slicedDetails = toDetailList(filteredGrid);\n            return someIf(slicedDetails.length > 0, slicedDetails);\n        }).map((slicedDetails) => copy(slicedDetails));\n    };\n\n    const statsStruct = (minRow, minCol, maxRow, maxCol, allCells, selectedCells) => ({\n        minRow,\n        minCol,\n        maxRow,\n        maxCol,\n        allCells,\n        selectedCells,\n    });\n    const findSelectedStats = (house, isSelected) => {\n        const totalColumns = house.grid.columns;\n        const totalRows = house.grid.rows;\n        /* Refactor into a method returning a struct to hide the mutation */\n        let minRow = totalRows;\n        let minCol = totalColumns;\n        let maxRow = 0;\n        let maxCol = 0;\n        const allCells = [];\n        const selectedCells = [];\n        each$1(house.access, (detail) => {\n            allCells.push(detail);\n            if (isSelected(detail)) {\n                selectedCells.push(detail);\n                const startRow = detail.row;\n                const endRow = startRow + detail.rowspan - 1;\n                const startCol = detail.column;\n                const endCol = startCol + detail.colspan - 1;\n                if (startRow < minRow) {\n                    minRow = startRow;\n                }\n                else if (endRow > maxRow) {\n                    maxRow = endRow;\n                }\n                if (startCol < minCol) {\n                    minCol = startCol;\n                }\n                else if (endCol > maxCol) {\n                    maxCol = endCol;\n                }\n            }\n        });\n        return statsStruct(minRow, minCol, maxRow, maxCol, allCells, selectedCells);\n    };\n    const makeCell = (list, seenSelected, rowIndex) => {\n        // no need to check bounds, as anything outside this index is removed in the nested for loop\n        const row = list[rowIndex].element;\n        const td = SugarElement.fromTag('td');\n        append$1(td, SugarElement.fromTag('br'));\n        const f = seenSelected ? append$1 : prepend;\n        f(row, td);\n    };\n    const fillInGaps = (list, house, stats, isSelected) => {\n        const rows = filter$2(list, (row) => row.section !== 'colgroup');\n        const totalColumns = house.grid.columns;\n        const totalRows = house.grid.rows;\n        // unselected cells have been deleted, now fill in the gaps in the model\n        for (let i = 0; i < totalRows; i++) {\n            let seenSelected = false;\n            for (let j = 0; j < totalColumns; j++) {\n                if (!(i < stats.minRow || i > stats.maxRow || j < stats.minCol || j > stats.maxCol)) {\n                    // if there is a hole in the table itself, or it's an unselected position, we need a cell\n                    const needCell = Warehouse.getAt(house, i, j).filter(isSelected).isNone();\n                    if (needCell) {\n                        makeCell(rows, seenSelected, i);\n                    }\n                    else {\n                        seenSelected = true;\n                    }\n                }\n            }\n        }\n    };\n    const clean = (replica, stats, house, widthDelta) => {\n        // remove columns that are not in the new table\n        each$1(house.columns, (col) => {\n            if (col.column < stats.minCol || col.column > stats.maxCol) {\n                remove$5(col.element);\n            }\n        });\n        // can't use :empty selector as that will not include TRs made up of whitespace\n        const emptyRows = filter$2(firstLayer(replica, 'tr'), (row) => \n        // there is no sugar method for this, and Traverse.children() does too much processing\n        row.dom.childElementCount === 0);\n        each$2(emptyRows, remove$5);\n        // If there is only one column, or only one row, delete all the colspan/rowspan\n        if (stats.minCol === stats.maxCol || stats.minRow === stats.maxRow) {\n            each$2(firstLayer(replica, 'th,td'), (cell) => {\n                remove$6(cell, 'rowspan');\n                remove$6(cell, 'colspan');\n            });\n        }\n        // Remove any attributes that should not be in the replicated table\n        remove$6(replica, LOCKED_COL_ATTR);\n        // TODO: TINY-6944 - need to figure out a better way of handling this\n        remove$6(replica, 'data-snooker-col-series'); // For advtable series column feature\n        const tableSize = TableSize.getTableSize(replica);\n        tableSize.adjustTableWidth(widthDelta);\n        // TODO TINY-6863: If using relative widths, ensure cell and column widths are redistributed\n    };\n    const getTableWidthDelta = (table, warehouse, tableSize, stats) => {\n        // short circuit entire table selected\n        if (stats.minCol === 0 && warehouse.grid.columns === stats.maxCol + 1) {\n            return 0;\n        }\n        const colWidths = getPixelWidths(warehouse, table, tableSize);\n        const allColsWidth = foldl(colWidths, (acc, width) => acc + width, 0);\n        const selectedColsWidth = foldl(colWidths.slice(stats.minCol, stats.maxCol + 1), (acc, width) => acc + width, 0);\n        const newWidth = (selectedColsWidth / allColsWidth) * tableSize.pixelWidth();\n        const delta = newWidth - tableSize.pixelWidth();\n        return tableSize.getCellDelta(delta);\n    };\n    const extract$1 = (table, selectedSelector) => {\n        const isSelected = (detail) => is$1(detail.element, selectedSelector);\n        const replica = deep(table);\n        const list = fromTable$1(replica);\n        const tableSize = TableSize.getTableSize(table);\n        const replicaHouse = Warehouse.generate(list);\n        const replicaStats = findSelectedStats(replicaHouse, isSelected);\n        // remove unselected cells\n        const selector = 'th:not(' + selectedSelector + ')' + ',td:not(' + selectedSelector + ')';\n        const unselectedCells = filterFirstLayer(replica, 'th,td', (cell) => is$1(cell, selector));\n        each$2(unselectedCells, remove$5);\n        fillInGaps(list, replicaHouse, replicaStats, isSelected);\n        const house = Warehouse.fromTable(table);\n        const widthDelta = getTableWidthDelta(table, house, tableSize, replicaStats);\n        clean(replica, replicaStats, replicaHouse, widthDelta);\n        return replica;\n    };\n\n    const isCol = isTag('col');\n    const isColgroup = isTag('colgroup');\n    const isRow$1 = (element) => name(element) === 'tr' || isColgroup(element);\n    const elementToData = (element) => {\n        const colspan = getAttrValue(element, 'colspan', 1);\n        const rowspan = getAttrValue(element, 'rowspan', 1);\n        return {\n            element,\n            colspan,\n            rowspan\n        };\n    };\n    // note that `toData` seems to be only for testing\n    const modification = (generators, toData = elementToData) => {\n        const nuCell = (data) => isCol(data.element) ? generators.col(data) : generators.cell(data);\n        const nuRow = (data) => isColgroup(data.element) ? generators.colgroup(data) : generators.row(data);\n        const add = (element) => {\n            if (isRow$1(element)) {\n                return nuRow({ element });\n            }\n            else {\n                const cell = element;\n                const replacement = nuCell(toData(cell));\n                recent = Optional.some({ item: cell, replacement });\n                return replacement;\n            }\n        };\n        let recent = Optional.none();\n        const getOrInit = (element, comparator) => {\n            return recent.fold(() => {\n                return add(element);\n            }, (p) => {\n                return comparator(element, p.item) ? p.replacement : add(element);\n            });\n        };\n        return {\n            getOrInit\n        };\n    };\n    const transform$1 = (tag) => {\n        return (generators) => {\n            const list = [];\n            const find = (element, comparator) => {\n                return find$1(list, (x) => {\n                    return comparator(x.item, element);\n                });\n            };\n            const makeNew = (element) => {\n                // Ensure scope is never set on a td element as it's a deprecated attribute\n                const attrs = tag === 'td' ? { scope: null } : {};\n                const cell = generators.replace(element, tag, attrs);\n                list.push({\n                    item: element,\n                    sub: cell\n                });\n                return cell;\n            };\n            const replaceOrInit = (element, comparator) => {\n                if (isRow$1(element) || isCol(element)) {\n                    return element;\n                }\n                else {\n                    const cell = element;\n                    return find(cell, comparator).fold(() => {\n                        return makeNew(cell);\n                    }, (p) => {\n                        return comparator(element, p.item) ? p.sub : makeNew(cell);\n                    });\n                }\n            };\n            return {\n                replaceOrInit\n            };\n        };\n    };\n    const getScopeAttribute = (cell) => getOpt(cell, 'scope').map(\n    // Attribute can be col, colgroup, row, and rowgroup.\n    // As col and colgroup are to be treated as if they are the same, lob off everything after the first three characters and there is no difference.\n    (attribute) => attribute.substr(0, 3));\n    const merging = (generators) => {\n        const unmerge = (cell) => {\n            const scope = getScopeAttribute(cell);\n            scope.each((attribute) => set$2(cell, 'scope', attribute));\n            return () => {\n                const raw = generators.cell({\n                    element: cell,\n                    colspan: 1,\n                    rowspan: 1\n                });\n                // Remove any width calculations because they are no longer relevant.\n                remove$4(raw, 'width');\n                remove$4(cell, 'width');\n                scope.each((attribute) => set$2(raw, 'scope', attribute));\n                return raw;\n            };\n        };\n        const merge = (cells) => {\n            const getScopeProperty = () => {\n                const stringAttributes = cat(map$1(cells, getScopeAttribute));\n                if (stringAttributes.length === 0) {\n                    return Optional.none();\n                }\n                else {\n                    const baseScope = stringAttributes[0];\n                    const scopes = ['row', 'col'];\n                    const isMixed = exists(stringAttributes, (attribute) => {\n                        return attribute !== baseScope && contains$2(scopes, attribute);\n                    });\n                    return isMixed ? Optional.none() : Optional.from(baseScope);\n                }\n            };\n            remove$4(cells[0], 'width');\n            getScopeProperty().fold(() => remove$6(cells[0], 'scope'), (attribute) => set$2(cells[0], 'scope', attribute + 'group'));\n            return constant(cells[0]);\n        };\n        return {\n            unmerge,\n            merge\n        };\n    };\n    const Generators = {\n        modification,\n        transform: transform$1,\n        merging\n    };\n\n    const getUpOrLeftCells = (grid, selectedCells) => {\n        // Get rows up or at the row of the bottom right cell\n        const upGrid = grid.slice(0, selectedCells[selectedCells.length - 1].row + 1);\n        const upDetails = toDetailList(upGrid);\n        // Get an array of the cells up or to the left of the bottom right cell\n        return bind$2(upDetails, (detail) => {\n            const slicedCells = detail.cells.slice(0, selectedCells[selectedCells.length - 1].column + 1);\n            return map$1(slicedCells, (cell) => cell.element);\n        });\n    };\n    const getDownOrRightCells = (grid, selectedCells) => {\n        // Get rows down or at the row of the top left cell (including rowspans)\n        const downGrid = grid.slice(selectedCells[0].row + selectedCells[0].rowspan - 1, grid.length);\n        const downDetails = toDetailList(downGrid);\n        // Get an array of the cells down or to the right of the bottom right cell\n        return bind$2(downDetails, (detail) => {\n            const slicedCells = detail.cells.slice(selectedCells[0].column + selectedCells[0].colspan - 1, detail.cells.length);\n            return map$1(slicedCells, (cell) => cell.element);\n        });\n    };\n    const getOtherCells = (table, target, generators) => {\n        const warehouse = Warehouse.fromTable(table);\n        const details = onCells(warehouse, target);\n        return details.map((selectedCells) => {\n            const grid = toGrid(warehouse, generators, false);\n            const { rows } = extractGridDetails(grid);\n            const upOrLeftCells = getUpOrLeftCells(rows, selectedCells);\n            const downOrRightCells = getDownOrRightCells(rows, selectedCells);\n            return {\n                upOrLeftCells,\n                downOrRightCells\n            };\n        });\n    };\n\n    const only = (element, isResizable) => {\n        // If element is a 'document', use the document element ('HTML' tag) for appending.\n        const parent = isDocument(element) ? documentElement(element) : element;\n        return {\n            parent: constant(parent),\n            view: constant(element),\n            dragContainer: constant(parent),\n            origin: constant(SugarPosition(0, 0)),\n            isResizable\n        };\n    };\n    const detached = (editable, chrome, isResizable) => {\n        const origin = () => absolute(chrome);\n        return {\n            parent: constant(chrome),\n            view: constant(editable),\n            dragContainer: constant(chrome),\n            origin,\n            isResizable\n        };\n    };\n    const body = (editable, isResizable) => {\n        return {\n            parent: constant(editable),\n            view: constant(editable),\n            dragContainer: constant(editable),\n            origin: () => absolute(editable),\n            isResizable\n        };\n    };\n    const ResizeWire = {\n        only,\n        detached,\n        body\n    };\n\n    const adt$2 = Adt.generate([\n        { invalid: ['raw'] },\n        { pixels: ['value'] },\n        { percent: ['value'] }\n    ]);\n    const validateFor = (suffix, type, value) => {\n        const rawAmount = value.substring(0, value.length - suffix.length);\n        const amount = parseFloat(rawAmount);\n        return rawAmount === amount.toString() ? type(amount) : adt$2.invalid(value);\n    };\n    const from = (value) => {\n        if (endsWith(value, '%')) {\n            return validateFor('%', adt$2.percent, value);\n        }\n        if (endsWith(value, 'px')) {\n            return validateFor('px', adt$2.pixels, value);\n        }\n        return adt$2.invalid(value);\n    };\n    const Size = {\n        ...adt$2,\n        from\n    };\n\n    // Convert all column widths to percent.\n    const redistributeToPercent = (widths, totalWidth) => {\n        return map$1(widths, (w) => {\n            const colType = Size.from(w);\n            return colType.fold(() => {\n                return w;\n            }, (px) => {\n                const ratio = px / totalWidth * 100;\n                return ratio + '%';\n            }, (pc) => {\n                return pc + '%';\n            });\n        });\n    };\n    const redistributeToPx = (widths, totalWidth, newTotalWidth) => {\n        const scale = newTotalWidth / totalWidth;\n        return map$1(widths, (w) => {\n            const colType = Size.from(w);\n            return colType.fold(() => {\n                return w;\n            }, (px) => {\n                return (px * scale) + 'px';\n            }, (pc) => {\n                return (pc / 100 * newTotalWidth) + 'px';\n            });\n        });\n    };\n    const redistributeEmpty = (newWidthType, columns) => {\n        const f = newWidthType.fold(() => constant(''), (pixels) => {\n            const num = pixels / columns;\n            return constant(num + 'px');\n        }, () => {\n            const num = 100 / columns;\n            return constant(num + '%');\n        });\n        return range$1(columns, f);\n    };\n    const redistributeValues = (newWidthType, widths, totalWidth) => {\n        return newWidthType.fold(() => {\n            return widths;\n        }, (px) => {\n            return redistributeToPx(widths, totalWidth, px);\n        }, (_pc) => {\n            return redistributeToPercent(widths, totalWidth);\n        });\n    };\n    const redistribute$1 = (widths, totalWidth, newWidth) => {\n        const newType = Size.from(newWidth);\n        const floats = forall(widths, (s) => {\n            return s === '0px';\n        }) ? redistributeEmpty(newType, widths.length) : redistributeValues(newType, widths, totalWidth);\n        return normalize(floats);\n    };\n    const sum = (values, fallback) => {\n        if (values.length === 0) {\n            return fallback;\n        }\n        return foldr(values, (rest, v) => {\n            return Size.from(v).fold(constant(0), identity, identity) + rest;\n        }, 0);\n    };\n    const roundDown = (num, unit) => {\n        const floored = Math.floor(num);\n        return { value: floored + unit, remainder: num - floored };\n    };\n    const add = (value, amount) => {\n        return Size.from(value).fold(constant(value), (px) => {\n            return (px + amount) + 'px';\n        }, (pc) => {\n            return (pc + amount) + '%';\n        });\n    };\n    const normalize = (values) => {\n        if (values.length === 0) {\n            return values;\n        }\n        const scan = foldr(values, (rest, value) => {\n            const info = Size.from(value).fold(() => ({ value, remainder: 0 }), (num) => roundDown(num, 'px'), (num) => ({ value: num + '%', remainder: 0 }));\n            return {\n                output: [info.value].concat(rest.output),\n                remainder: rest.remainder + info.remainder\n            };\n        }, { output: [], remainder: 0 });\n        const r = scan.output;\n        return r.slice(0, r.length - 1).concat([add(r[r.length - 1], Math.round(scan.remainder))]);\n    };\n    const validate = Size.from;\n\n    const redistributeToW = (newWidths, cells, unit) => {\n        each$2(cells, (cell) => {\n            const widths = newWidths.slice(cell.column, cell.colspan + cell.column);\n            const w = sum(widths, minWidth());\n            set$1(cell.element, 'width', w + unit);\n        });\n    };\n    const redistributeToColumns = (newWidths, columns, unit) => {\n        each$2(columns, (column, index) => {\n            const width = sum([newWidths[index]], minWidth());\n            set$1(column.element, 'width', width + unit);\n        });\n    };\n    const redistributeToH = (newHeights, rows, cells) => {\n        each$2(cells, (cell) => {\n            remove$4(cell.element, 'height');\n        });\n        each$2(rows, (row, i) => {\n            set$1(row.element, 'height', newHeights[i]);\n        });\n    };\n    const getUnit = (newSize) => {\n        return validate(newSize).fold(constant('px'), constant('px'), constant('%'));\n    };\n    // Procedure to resize table dimensions to optWidth x optHeight and redistribute cell and row dimensions.\n    // Updates CSS of the table, rows, and cells.\n    const redistribute = (table, optWidth, optHeight) => {\n        const warehouse = Warehouse.fromTable(table);\n        const rows = warehouse.all;\n        const cells = Warehouse.justCells(warehouse);\n        const columns = Warehouse.justColumns(warehouse);\n        optWidth.each((newWidth) => {\n            const widthUnit = getUnit(newWidth);\n            const totalWidth = get$7(table);\n            const oldWidths = getRawWidths(warehouse, table);\n            const nuWidths = redistribute$1(oldWidths, totalWidth, newWidth);\n            if (Warehouse.hasColumns(warehouse)) {\n                redistributeToColumns(nuWidths, columns, widthUnit);\n            }\n            else {\n                redistributeToW(nuWidths, cells, widthUnit);\n            }\n            set$1(table, 'width', newWidth);\n        });\n        optHeight.each((newHeight) => {\n            const totalHeight = get$8(table);\n            const oldHeights = getRawHeights(warehouse, table);\n            const nuHeights = redistribute$1(oldHeights, totalHeight, newHeight);\n            redistributeToH(nuHeights, rows, cells);\n            set$1(table, 'height', newHeight);\n        });\n    };\n    const isPercentSizing = isPercentSizing$1;\n    const isPixelSizing = isPixelSizing$1;\n    const isNoneSizing = isNoneSizing$1;\n\n    var TagBoundaries = [\n        'body',\n        'p',\n        'div',\n        'article',\n        'aside',\n        'figcaption',\n        'figure',\n        'footer',\n        'header',\n        'nav',\n        'section',\n        'ol',\n        'ul',\n        'li',\n        'table',\n        'thead',\n        'tbody',\n        'tfoot',\n        'caption',\n        'tr',\n        'td',\n        'th',\n        'h1',\n        'h2',\n        'h3',\n        'h4',\n        'h5',\n        'h6',\n        'blockquote',\n        'pre',\n        'address'\n    ];\n\n    var DomUniverse = () => {\n        const clone = (element) => {\n            return SugarElement.fromDom(element.dom.cloneNode(false));\n        };\n        const document = (element) => documentOrOwner(element).dom;\n        const isBoundary = (element) => {\n            if (!isElement(element)) {\n                return false;\n            }\n            if (name(element) === 'body') {\n                return true;\n            }\n            return contains$2(TagBoundaries, name(element));\n        };\n        const isEmptyTag = (element) => {\n            if (!isElement(element)) {\n                return false;\n            }\n            return contains$2(['br', 'img', 'hr', 'input'], name(element));\n        };\n        const isNonEditable = (element) => isElement(element) && get$b(element, 'contenteditable') === 'false';\n        const comparePosition = (element, other) => {\n            return element.dom.compareDocumentPosition(other.dom);\n        };\n        const copyAttributesTo = (source, destination) => {\n            const as = clone$1(source);\n            setAll$1(destination, as);\n        };\n        const isSpecial = (element) => {\n            const tag = name(element);\n            return contains$2([\n                'script', 'noscript', 'iframe', 'noframes', 'noembed', 'title', 'style', 'textarea', 'xmp'\n            ], tag);\n        };\n        const getLanguage = (element) => isElement(element) ? getOpt(element, 'lang') : Optional.none();\n        return {\n            up: constant({\n                selector: ancestor$1,\n                closest: closest$1,\n                predicate: ancestor$2,\n                all: parents\n            }),\n            down: constant({\n                selector: descendants,\n                predicate: descendants$1\n            }),\n            styles: constant({\n                get: get$9,\n                getRaw: getRaw$2,\n                set: set$1,\n                remove: remove$4\n            }),\n            attrs: constant({\n                get: get$b,\n                set: set$2,\n                remove: remove$6,\n                copyTo: copyAttributesTo\n            }),\n            insert: constant({\n                before: before$3,\n                after: after$4,\n                afterAll: after$3,\n                append: append$1,\n                appendAll: append,\n                prepend: prepend,\n                wrap: wrap\n            }),\n            remove: constant({\n                unwrap: unwrap,\n                remove: remove$5\n            }),\n            create: constant({\n                nu: SugarElement.fromTag,\n                clone,\n                text: SugarElement.fromText\n            }),\n            query: constant({\n                comparePosition,\n                prevSibling: prevSibling,\n                nextSibling: nextSibling\n            }),\n            property: constant({\n                children: children$2,\n                name: name,\n                parent: parent,\n                document,\n                isText: isText,\n                isComment: isComment,\n                isElement: isElement,\n                isSpecial,\n                getLanguage,\n                getText: get$5,\n                setText: set,\n                isBoundary,\n                isEmptyTag,\n                isNonEditable\n            }),\n            eq: eq$1,\n            is: is\n        };\n    };\n\n    const traverse = (item, mode) => ({\n        item,\n        mode\n    });\n    const backtrack = (universe, item, _direction, transition = sidestep) => {\n        return universe.property().parent(item).map((p) => {\n            return traverse(p, transition);\n        });\n    };\n    const sidestep = (universe, item, direction, transition = advance) => {\n        return direction.sibling(universe, item).map((p) => {\n            return traverse(p, transition);\n        });\n    };\n    const advance = (universe, item, direction, transition = advance) => {\n        const children = universe.property().children(item);\n        const result = direction.first(children);\n        return result.map((r) => {\n            return traverse(r, transition);\n        });\n    };\n    /*\n     * Rule breakdown:\n     *\n     * current: the traversal that we are applying.\n     * next: the next traversal to apply if the current traversal succeeds (e.g. advance after sidestepping)\n     * fallback: the traversal to fallback to when the current traversal does not find a node\n     */\n    const successors = [\n        { current: backtrack, next: sidestep, fallback: Optional.none() },\n        { current: sidestep, next: advance, fallback: Optional.some(backtrack) },\n        { current: advance, next: advance, fallback: Optional.some(sidestep) }\n    ];\n    const go = (universe, item, mode, direction, rules = successors) => {\n        // INVESTIGATE: Find a way which doesn't require an array search first to identify the current mode.\n        const ruleOpt = find$1(rules, (succ) => {\n            return succ.current === mode;\n        });\n        return ruleOpt.bind((rule) => {\n            // Attempt the current mode. If not, use the fallback and try again.\n            return rule.current(universe, item, direction, rule.next).orThunk(() => {\n                return rule.fallback.bind((fb) => {\n                    return go(universe, item, fb, direction);\n                });\n            });\n        });\n    };\n\n    const left$1 = () => {\n        const sibling = (universe, item) => {\n            return universe.query().prevSibling(item);\n        };\n        const first = (children) => {\n            return children.length > 0 ? Optional.some(children[children.length - 1]) : Optional.none();\n        };\n        return {\n            sibling,\n            first\n        };\n    };\n    const right$1 = () => {\n        const sibling = (universe, item) => {\n            return universe.query().nextSibling(item);\n        };\n        const first = (children) => {\n            return children.length > 0 ? Optional.some(children[0]) : Optional.none();\n        };\n        return {\n            sibling,\n            first\n        };\n    };\n    const Walkers = {\n        left: left$1,\n        right: right$1\n    };\n\n    const hone = (universe, item, predicate, mode, direction, isRoot) => {\n        const next = go(universe, item, mode, direction);\n        return next.bind((n) => {\n            if (isRoot(n.item)) {\n                return Optional.none();\n            }\n            else {\n                return predicate(n.item) ? Optional.some(n.item) : hone(universe, n.item, predicate, n.mode, direction, isRoot);\n            }\n        });\n    };\n    const left = (universe, item, predicate, isRoot) => {\n        return hone(universe, item, predicate, sidestep, Walkers.left(), isRoot);\n    };\n    const right = (universe, item, predicate, isRoot) => {\n        return hone(universe, item, predicate, sidestep, Walkers.right(), isRoot);\n    };\n\n    const point = (element, offset) => ({\n        element,\n        offset\n    });\n\n    const scan$1 = (universe, element, direction) => {\n        // if a comment or zero-length text, scan the siblings\n        if ((universe.property().isText(element) && universe.property().getText(element).trim().length === 0)\n            || universe.property().isComment(element)) {\n            return direction(element).bind((elem) => {\n                return scan$1(universe, elem, direction).orThunk(() => {\n                    return Optional.some(elem);\n                });\n            });\n        }\n        else {\n            return Optional.none();\n        }\n    };\n    const toEnd = (universe, element) => {\n        if (universe.property().isText(element)) {\n            return universe.property().getText(element).length;\n        }\n        const children = universe.property().children(element);\n        return children.length;\n    };\n    const freefallRtl$2 = (universe, element) => {\n        const candidate = scan$1(universe, element, universe.query().prevSibling).getOr(element);\n        if (universe.property().isText(candidate)) {\n            return point(candidate, toEnd(universe, candidate));\n        }\n        const children = universe.property().children(candidate);\n        return children.length > 0 ? freefallRtl$2(universe, children[children.length - 1]) : point(candidate, toEnd(universe, candidate));\n    };\n\n    const freefallRtl$1 = freefallRtl$2;\n\n    const universe$3 = DomUniverse();\n    const freefallRtl = (element) => {\n        return freefallRtl$1(universe$3, element);\n    };\n\n    const isLeaf = (universe) => (element) => universe.property().children(element).length === 0;\n    const before$1 = (universe, item, isRoot) => {\n        return seekLeft$1(universe, item, isLeaf(universe), isRoot);\n    };\n    const after$1 = (universe, item, isRoot) => {\n        return seekRight$1(universe, item, isLeaf(universe), isRoot);\n    };\n    const seekLeft$1 = left;\n    const seekRight$1 = right;\n    go;\n\n    const universe$2 = DomUniverse();\n    const before = (element, isRoot) => {\n        return before$1(universe$2, element, isRoot);\n    };\n    const after = (element, isRoot) => {\n        return after$1(universe$2, element, isRoot);\n    };\n    const seekLeft = (element, predicate, isRoot) => {\n        return seekLeft$1(universe$2, element, predicate, isRoot);\n    };\n    const seekRight = (element, predicate, isRoot) => {\n        return seekRight$1(universe$2, element, predicate, isRoot);\n    };\n\n    const blockList = [\n        'body',\n        'p',\n        'div',\n        'article',\n        'aside',\n        'figcaption',\n        'figure',\n        'footer',\n        'header',\n        'nav',\n        'section',\n        'ol',\n        'ul',\n        // --- NOTE, TagBoundaries has li here. That means universe.isBoundary => true for li tags.\n        'table',\n        'thead',\n        'tfoot',\n        'tbody',\n        'caption',\n        'tr',\n        'td',\n        'th',\n        'h1',\n        'h2',\n        'h3',\n        'h4',\n        'h5',\n        'h6',\n        'blockquote',\n        'pre',\n        'address'\n    ];\n    const isList$1 = (universe, item) => {\n        const tagName = universe.property().name(item);\n        return contains$2(['ol', 'ul'], tagName);\n    };\n    const isBlock$1 = (universe, item) => {\n        const tagName = universe.property().name(item);\n        return contains$2(blockList, tagName);\n    };\n    const isEmptyTag$1 = (universe, item) => {\n        return contains$2(['br', 'img', 'hr', 'input'], universe.property().name(item));\n    };\n\n    const leftRight = (left, right) => ({\n        left,\n        right\n    });\n    const brokenPath = (first, second, splits) => ({\n        first,\n        second,\n        splits\n    });\n    const bisect = (universe, parent, child) => {\n        const children = universe.property().children(parent);\n        const index = findIndex(children, curry(universe.eq, child));\n        return index.map((ind) => {\n            return {\n                before: children.slice(0, ind),\n                after: children.slice(ind + 1)\n            };\n        });\n    };\n    /**\n     * Clone parent to the RIGHT and move everything after child in the parent element into\n     * a clone of the parent (placed after parent).\n     */\n    const breakToRight = (universe, parent, child) => {\n        return bisect(universe, parent, child).map((parts) => {\n            const second = universe.create().clone(parent);\n            universe.insert().appendAll(second, parts.after);\n            universe.insert().after(parent, second);\n            return leftRight(parent, second);\n        });\n    };\n    /**\n     * Clone parent to the LEFT and move everything before and including child into\n     * the a clone of the parent (placed before parent)\n     */\n    const breakToLeft = (universe, parent, child) => {\n        return bisect(universe, parent, child).map((parts) => {\n            const prior = universe.create().clone(parent);\n            universe.insert().appendAll(prior, parts.before.concat([child]));\n            universe.insert().appendAll(parent, parts.after);\n            universe.insert().before(parent, prior);\n            return leftRight(prior, parent);\n        });\n    };\n    /*\n     * Using the breaker, break from the child up to the top element defined by the predicate.\n     * It returns three values:\n     *   first: the top level element that completed the break\n     *   second: the optional element representing second part of the top-level split if the breaking completed successfully to the top\n     *   splits: a list of (Element, Element) pairs that represent the splits that have occurred on the way to the top.\n     */\n    const breakPath = (universe, item, isTop, breaker) => {\n        const next = (child, group, splits) => {\n            const fallback = brokenPath(child, Optional.none(), splits);\n            // Found the top, so stop.\n            if (isTop(child)) {\n                return brokenPath(child, group, splits);\n            }\n            else {\n                // Split the child at parent, and keep going\n                return universe.property().parent(child).bind((parent) => {\n                    return breaker(universe, parent, child).map((breakage) => {\n                        const extra = [{ first: breakage.left, second: breakage.right }];\n                        // Our isTop is based on the left-side parent, so keep it regardless of split.\n                        const nextChild = isTop(parent) ? parent : breakage.left;\n                        return next(nextChild, Optional.some(breakage.right), splits.concat(extra));\n                    });\n                }).getOr(fallback);\n            }\n        };\n        return next(item, Optional.none(), []);\n    };\n\n    const all = (universe, look, elements, f) => {\n        const head = elements[0];\n        const tail = elements.slice(1);\n        return f(universe, look, head, tail);\n    };\n    /**\n     * Check if look returns the same element for all elements, and return it if it exists.\n     */\n    const oneAll = (universe, look, elements) => {\n        return elements.length > 0 ?\n            all(universe, look, elements, unsafeOne) :\n            Optional.none();\n    };\n    const unsafeOne = (universe, look, head, tail) => {\n        const start = look(universe, head);\n        return foldr(tail, (b, a) => {\n            const current = look(universe, a);\n            return commonElement(universe, b, current);\n        }, start);\n    };\n    const commonElement = (universe, start, end) => {\n        return start.bind((s) => {\n            return end.filter(curry(universe.eq, s));\n        });\n    };\n\n    const eq = (universe, item) => {\n        return curry(universe.eq, item);\n    };\n    // Note: this can be exported if it is required in the future.\n    const ancestors$2 = (universe, start, end, isRoot = never) => {\n        // Inefficient if no isRoot is supplied.\n        // TODO: Andy knows there is a graph-based algorithm to find a common parent, but can't remember it\n        //        This also includes something to get the subset after finding the common parent\n        const ps1 = [start].concat(universe.up().all(start));\n        const ps2 = [end].concat(universe.up().all(end));\n        const prune = (path) => {\n            const index = findIndex(path, isRoot);\n            return index.fold(() => {\n                return path;\n            }, (ind) => {\n                return path.slice(0, ind + 1);\n            });\n        };\n        const pruned1 = prune(ps1);\n        const pruned2 = prune(ps2);\n        const shared = find$1(pruned1, (x) => {\n            return exists(pruned2, eq(universe, x));\n        });\n        return {\n            firstpath: pruned1,\n            secondpath: pruned2,\n            shared\n        };\n    };\n\n    const sharedOne$1 = oneAll;\n    const ancestors$1 = ancestors$2;\n    breakToLeft;\n    breakToRight;\n    breakPath;\n\n    const universe$1 = DomUniverse();\n    const sharedOne = (look, elements) => {\n        return sharedOne$1(universe$1, (_universe, element) => {\n            return look(element);\n        }, elements);\n    };\n    const ancestors = (start, finish, isRoot) => {\n        return ancestors$1(universe$1, start, finish, isRoot);\n    };\n\n    const universe = DomUniverse();\n    const isBlock = (element) => {\n        return isBlock$1(universe, element);\n    };\n    const isList = (element) => {\n        return isList$1(universe, element);\n    };\n    const isEmptyTag = (element) => {\n        return isEmptyTag$1(universe, element);\n    };\n\n    const merge$2 = (cells) => {\n        const isBr = isTag('br');\n        const advancedBr = (children) => {\n            return forall(children, (c) => {\n                return isBr(c) || (isText(c) && get$5(c).trim().length === 0);\n            });\n        };\n        const isListItem = (el) => {\n            return name(el) === 'li' || ancestor$2(el, isList).isSome();\n        };\n        const siblingIsBlock = (el) => {\n            return nextSibling(el).map((rightSibling) => {\n                if (isBlock(rightSibling)) {\n                    return true;\n                }\n                if (isEmptyTag(rightSibling)) {\n                    return name(rightSibling) === 'img' ? false : true;\n                }\n                return false;\n            }).getOr(false);\n        };\n        const markCell = (cell) => {\n            return last(cell).bind((rightEdge) => {\n                const rightSiblingIsBlock = siblingIsBlock(rightEdge);\n                return parent(rightEdge).map((parent) => {\n                    return rightSiblingIsBlock === true || isListItem(parent) || isBr(rightEdge) || (isBlock(parent) && !eq$1(cell, parent)) ? [] : [SugarElement.fromTag('br')];\n                });\n            }).getOr([]);\n        };\n        const markContent = () => {\n            const content = bind$2(cells, (cell) => {\n                const children = children$2(cell);\n                return advancedBr(children) ? [] : children.concat(markCell(cell));\n            });\n            return content.length === 0 ? [SugarElement.fromTag('br')] : content;\n        };\n        const contents = markContent();\n        empty(cells[0]);\n        append(cells[0], contents);\n    };\n\n    // Remove legacy sizing attributes such as \"width\"\n    const cleanupLegacyAttributes = (element) => {\n        remove$6(element, 'width');\n        remove$6(element, 'height');\n    };\n    const convertToPercentSizeWidth = (table) => {\n        const newWidth = getPercentTableWidth(table);\n        redistribute(table, Optional.some(newWidth), Optional.none());\n        cleanupLegacyAttributes(table);\n    };\n    const convertToPixelSizeWidth = (table) => {\n        const newWidth = getPixelTableWidth(table);\n        redistribute(table, Optional.some(newWidth), Optional.none());\n        cleanupLegacyAttributes(table);\n    };\n    const convertToPixelSizeHeight = (table) => {\n        const newHeight = getPixelTableHeight(table);\n        redistribute(table, Optional.none(), Optional.some(newHeight));\n        cleanupLegacyAttributes(table);\n    };\n    const convertToNoneSizeWidth = (table) => {\n        remove$4(table, 'width');\n        const columns = columns$1(table);\n        const rowElements = columns.length > 0 ? columns : cells$1(table);\n        each$2(rowElements, (cell) => {\n            remove$4(cell, 'width');\n            cleanupLegacyAttributes(cell);\n        });\n        cleanupLegacyAttributes(table);\n    };\n\n    const transferableAttributes = {\n        scope: [\n            'row',\n            'col'\n        ]\n    };\n    // NOTE: This may create a td instead of a th, but it is for irregular table handling.\n    const createCell = (doc) => () => {\n        const td = SugarElement.fromTag('td', doc.dom);\n        append$1(td, SugarElement.fromTag('br', doc.dom));\n        return td;\n    };\n    const createCol = (doc) => () => {\n        return SugarElement.fromTag('col', doc.dom);\n    };\n    const createColgroup = (doc) => () => {\n        return SugarElement.fromTag('colgroup', doc.dom);\n    };\n    const createRow$1 = (doc) => () => {\n        return SugarElement.fromTag('tr', doc.dom);\n    };\n    const replace$1 = (cell, tag, attrs) => {\n        const replica = copy$2(cell, tag);\n        // TODO: Snooker passes null to indicate 'remove attribute'\n        each$1(attrs, (v, k) => {\n            if (v === null) {\n                remove$6(replica, k);\n            }\n            else {\n                set$2(replica, k, v);\n            }\n        });\n        return replica;\n    };\n    // eslint-disable-next-line @tinymce/prefer-fun\n    const pasteReplace = (cell) => {\n        // TODO: check for empty content and don't return anything\n        return cell;\n    };\n    const cloneFormats = (oldCell, newCell, formats) => {\n        const first$1 = first(oldCell);\n        return first$1.map((firstText) => {\n            const formatSelector = formats.join(',');\n            // Find the ancestors of the first text node that match the given formats.\n            const parents = ancestors$3(firstText, formatSelector, (element) => {\n                return eq$1(element, oldCell);\n            });\n            // Add the matched ancestors to the new cell, then return the new cell.\n            return foldr(parents, (last, parent) => {\n                const clonedFormat = shallow(parent);\n                append$1(last, clonedFormat);\n                return clonedFormat;\n            }, newCell);\n        }).getOr(newCell);\n    };\n    const cloneAppropriateAttributes = (original, clone) => {\n        each$1(transferableAttributes, (validAttributes, attributeName) => getOpt(original, attributeName)\n            .filter((attribute) => contains$2(validAttributes, attribute))\n            .each((attribute) => set$2(clone, attributeName, attribute)));\n    };\n    const cellOperations = (mutate, doc, formatsToClone) => {\n        const cloneCss = (prev, clone) => {\n            // inherit the style and width, dont inherit the row height\n            copy$1(prev.element, clone);\n            remove$4(clone, 'height');\n            // dont inherit the width of spanning columns\n            if (prev.colspan !== 1) {\n                remove$4(clone, 'width');\n            }\n        };\n        const newCell = (prev) => {\n            const td = SugarElement.fromTag(name(prev.element), doc.dom);\n            const formats = formatsToClone.getOr(['strong', 'em', 'b', 'i', 'span', 'font', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p', 'div']);\n            // If we aren't cloning the child formatting, we can just give back the new td immediately.\n            const lastNode = formats.length > 0 ? cloneFormats(prev.element, td, formats) : td;\n            append$1(lastNode, SugarElement.fromTag('br'));\n            cloneCss(prev, td);\n            cloneAppropriateAttributes(prev.element, td);\n            mutate(prev.element, td);\n            return td;\n        };\n        const newCol = (prev) => {\n            const col = SugarElement.fromTag(name(prev.element), doc.dom);\n            cloneCss(prev, col);\n            mutate(prev.element, col);\n            return col;\n        };\n        return {\n            col: newCol,\n            colgroup: createColgroup(doc),\n            row: createRow$1(doc),\n            cell: newCell,\n            replace: replace$1,\n            colGap: createCol(doc),\n            gap: createCell(doc)\n        };\n    };\n    const paste$1 = (doc) => {\n        return {\n            col: createCol(doc),\n            colgroup: createColgroup(doc),\n            row: createRow$1(doc),\n            cell: createCell(doc),\n            replace: pasteReplace,\n            colGap: createCol(doc),\n            gap: createCell(doc)\n        };\n    };\n\n    const getGridSize = (table) => {\n        const warehouse = Warehouse.fromTable(table);\n        return warehouse.grid;\n    };\n\n    // substitution: () -> item\n    const merge$1 = (grid, bounds, comparator, substitution) => {\n        const rows = extractGridDetails(grid).rows;\n        // Mutating. Do we care about the efficiency gain?\n        if (rows.length === 0) {\n            return grid;\n        }\n        for (let i = bounds.startRow; i <= bounds.finishRow; i++) {\n            for (let j = bounds.startCol; j <= bounds.finishCol; j++) {\n                // We can probably simplify this again now that we aren't reusing merge.\n                const row = rows[i];\n                const isLocked = getCell(row, j).isLocked;\n                mutateCell(row, j, elementnew(substitution(), false, isLocked));\n            }\n        }\n        return grid;\n    };\n    // substitution: () -> item\n    const unmerge = (grid, target, comparator, substitution) => {\n        const rows = extractGridDetails(grid).rows;\n        // Mutating. Do we care about the efficiency gain?\n        let first = true;\n        // tslint:disable-next-line:prefer-for-of\n        for (let i = 0; i < rows.length; i++) {\n            for (let j = 0; j < cellLength(rows[0]); j++) {\n                const row = rows[i];\n                const currentCell = getCell(row, j);\n                const currentCellElm = currentCell.element;\n                const isToReplace = comparator(currentCellElm, target);\n                if (isToReplace && !first) {\n                    mutateCell(row, j, elementnew(substitution(), true, currentCell.isLocked));\n                }\n                else if (isToReplace) {\n                    first = false;\n                }\n            }\n        }\n        return grid;\n    };\n    const uniqueCells = (row, comparator) => {\n        return foldl(row, (rest, cell) => {\n            return exists(rest, (currentCell) => {\n                return comparator(currentCell.element, cell.element);\n            }) ? rest : rest.concat([cell]);\n        }, []);\n    };\n    const splitCols = (grid, index, comparator, substitution) => {\n        // We don't need to split rows if we're inserting at the first or last row of the old table\n        if (index > 0 && index < grid[0].cells.length) {\n            each$2(grid, (row) => {\n                const prevCell = row.cells[index - 1];\n                let offset = 0;\n                const substitute = substitution();\n                while (row.cells.length > index + offset && comparator(prevCell.element, row.cells[index + offset].element)) {\n                    mutateCell(row, index + offset, elementnew(substitute, true, row.cells[index + offset].isLocked));\n                    offset++;\n                }\n            });\n        }\n        return grid;\n    };\n    const splitRows = (grid, index, comparator, substitution) => {\n        // We don't need to split rows if we're inserting at the first or last row of the old table\n        const rows = extractGridDetails(grid).rows;\n        if (index > 0 && index < rows.length) {\n            const rowPrevCells = rows[index - 1].cells;\n            const cells = uniqueCells(rowPrevCells, comparator);\n            each$2(cells, (cell) => {\n                // only make a sub when we have to\n                let replacement = Optional.none();\n                for (let i = index; i < rows.length; i++) {\n                    for (let j = 0; j < cellLength(rows[0]); j++) {\n                        const row = rows[i];\n                        const current = getCell(row, j);\n                        const isToReplace = comparator(current.element, cell.element);\n                        if (isToReplace) {\n                            if (replacement.isNone()) {\n                                replacement = Optional.some(substitution());\n                            }\n                            replacement.each((sub) => {\n                                mutateCell(row, j, elementnew(sub, true, current.isLocked));\n                            });\n                        }\n                    }\n                }\n            });\n        }\n        return grid;\n    };\n\n    /*\n      Fitment, is a module used to ensure that the Inserted table (gridB) can fit squareley within the Host table (gridA).\n        - measure returns a delta of rows and cols, eg:\n            - col: 3 means gridB can fit with 3 spaces to spare\n            - row: -5 means gridB can needs 5 more rows to completely fit into gridA\n            - col: 0, row: 0 depics perfect fitment\n\n        - tailor, requires a delta and returns grid that is built to match the delta, tailored to fit.\n          eg: 3x3 gridA, with a delta col: -3, row: 2 returns a new grid 3 rows x 6 cols\n\n        - assumptions: All grids used by this module should be rectangular\n    */\n    const measure = (startAddress, gridA, gridB) => {\n        if (startAddress.row >= gridA.length || startAddress.column > cellLength(gridA[0])) {\n            return Result.error('invalid start address out of table bounds, row: ' + startAddress.row + ', column: ' + startAddress.column);\n        }\n        const rowRemainder = gridA.slice(startAddress.row);\n        const colRemainder = rowRemainder[0].cells.slice(startAddress.column);\n        const colRequired = cellLength(gridB[0]);\n        const rowRequired = gridB.length;\n        return Result.value({\n            rowDelta: rowRemainder.length - rowRequired,\n            colDelta: colRemainder.length - colRequired\n        });\n    };\n    const measureWidth = (gridA, gridB) => {\n        const colLengthA = cellLength(gridA[0]);\n        const colLengthB = cellLength(gridB[0]);\n        return {\n            rowDelta: 0,\n            colDelta: colLengthA - colLengthB\n        };\n    };\n    const measureHeight = (gridA, gridB) => {\n        const rowLengthA = gridA.length;\n        const rowLengthB = gridB.length;\n        return {\n            rowDelta: rowLengthA - rowLengthB,\n            colDelta: 0\n        };\n    };\n    const generateElements = (amount, row, generators, isLocked) => {\n        const generator = row.section === 'colgroup' ? generators.col : generators.cell;\n        return range$1(amount, (idx) => elementnew(generator(), true, isLocked(idx)));\n    };\n    const rowFill = (grid, amount, generators, lockedColumns) => {\n        const exampleRow = grid[grid.length - 1];\n        return grid.concat(range$1(amount, () => {\n            const generator = exampleRow.section === 'colgroup' ? generators.colgroup : generators.row;\n            const row = clone$2(exampleRow, generator, identity);\n            const elements = generateElements(row.cells.length, row, generators, (idx) => has$1(lockedColumns, idx.toString()));\n            return setCells(row, elements);\n        }));\n    };\n    const colFill = (grid, amount, generators, startIndex) => map$1(grid, (row) => {\n        const newChildren = generateElements(amount, row, generators, never);\n        return addCells(row, startIndex, newChildren);\n    });\n    const lockedColFill = (grid, generators, lockedColumns) => map$1(grid, (row) => {\n        return foldl(lockedColumns, (acc, colNum) => {\n            const newChild = generateElements(1, row, generators, always)[0];\n            return addCell(acc, colNum, newChild);\n        }, row);\n    });\n    const tailor = (gridA, delta, generators) => {\n        const fillCols = delta.colDelta < 0 ? colFill : identity;\n        const fillRows = delta.rowDelta < 0 ? rowFill : identity;\n        const lockedColumns = getLockedColumnsFromGrid(gridA);\n        const gridWidth = cellLength(gridA[0]);\n        const isLastColLocked = exists(lockedColumns, (locked) => locked === gridWidth - 1);\n        const modifiedCols = fillCols(gridA, Math.abs(delta.colDelta), generators, isLastColLocked ? gridWidth - 1 : gridWidth);\n        // Need to recalculate locked column positions\n        const newLockedColumns = getLockedColumnsFromGrid(modifiedCols);\n        return fillRows(modifiedCols, Math.abs(delta.rowDelta), generators, mapToObject(newLockedColumns, always));\n    };\n\n    const isSpanning = (grid, row, col, comparator) => {\n        const candidate = getCell(grid[row], col);\n        const matching = curry(comparator, candidate.element);\n        const currentRow = grid[row];\n        // sanity check, 1x1 has no spans\n        return grid.length > 1 && cellLength(currentRow) > 1 &&\n            (\n            // search left, if we're not on the left edge\n            // search down, if we're not on the bottom edge\n            (col > 0 && matching(getCellElement(currentRow, col - 1))) ||\n                // search right, if we're not on the right edge\n                (col < currentRow.cells.length - 1 && matching(getCellElement(currentRow, col + 1))) ||\n                // search up, if we're not on the top edge\n                (row > 0 && matching(getCellElement(grid[row - 1], col))) ||\n                (row < grid.length - 1 && matching(getCellElement(grid[row + 1], col))));\n    };\n    const mergeTables = (startAddress, gridA, gridBRows, generator, comparator, lockedColumns) => {\n        // Assumes\n        //  - gridA is square and gridB is square\n        const startRow = startAddress.row;\n        const startCol = startAddress.column;\n        const mergeHeight = gridBRows.length;\n        const mergeWidth = cellLength(gridBRows[0]);\n        const endRow = startRow + mergeHeight;\n        const endCol = startCol + mergeWidth + lockedColumns.length;\n        const lockedColumnObj = mapToObject(lockedColumns, always);\n        // embrace the mutation - I think this is easier to follow? To discuss.\n        for (let r = startRow; r < endRow; r++) {\n            let skippedCol = 0;\n            for (let c = startCol; c < endCol; c++) {\n                if (lockedColumnObj[c]) {\n                    skippedCol++;\n                    continue;\n                }\n                if (isSpanning(gridA, r, c, comparator)) {\n                    // mutation within mutation, it's mutatception\n                    unmerge(gridA, getCellElement(gridA[r], c), comparator, generator.cell);\n                }\n                const gridBColIndex = c - startCol - skippedCol;\n                const newCell = getCell(gridBRows[r - startRow], gridBColIndex);\n                // This can't be a col element at this point so we can cast it to a cell\n                const newCellElm = newCell.element;\n                const replacement = generator.replace(newCellElm);\n                mutateCell(gridA[r], c, elementnew(replacement, true, newCell.isLocked));\n            }\n        }\n        return gridA;\n    };\n    const getValidStartAddress = (currentStartAddress, grid, lockedColumns) => {\n        const gridColLength = cellLength(grid[0]);\n        /*\n          When we paste from a table without colgroups to a table that has them, we need to ensure we are inserting them at\n          the correct row index (the `col`s are treated as cells in the Structs.RowCells array).\n      \n          To do this, we get the number of `col`s in the destination table and add that to the startAddress row.\n        */\n        const adjustedRowAddress = extractGridDetails(grid).cols.length + currentStartAddress.row;\n        const possibleColAddresses = range$1(gridColLength - currentStartAddress.column, (num) => num + currentStartAddress.column);\n        // Find a starting column address that isn't a locked column\n        const validColAddress = find$1(possibleColAddresses, (num) => forall(lockedColumns, (col) => col !== num)).getOr(gridColLength - 1);\n        return {\n            row: adjustedRowAddress,\n            column: validColAddress\n        };\n    };\n    const getLockedColumnsWithinBounds = (startAddress, rows, lockedColumns) => filter$2(lockedColumns, (colNum) => colNum >= startAddress.column && colNum <= cellLength(rows[0]) + startAddress.column);\n    const merge = (startAddress, gridA, gridB, generator, comparator) => {\n        const lockedColumns = getLockedColumnsFromGrid(gridA);\n        const validStartAddress = getValidStartAddress(startAddress, gridA, lockedColumns);\n        /*\n          We always remove the cols (extract the rows) from the table being pasted. This ensures that if we are pasting from a table with colgroups into a table\n          without them, we don't insert the `col` elements as if they were `td`s\n        */\n        const gridBRows = extractGridDetails(gridB).rows;\n        const lockedColumnsWithinBounds = getLockedColumnsWithinBounds(validStartAddress, gridBRows, lockedColumns);\n        const result = measure(validStartAddress, gridA, gridBRows);\n        /*\n          Need to subtract extra delta for locked columns between startAddress and the startAddress + gridB column count as\n          locked column cells cannot be merged into. Therefore, extra column cells need to be added to gridA to allow gridB cells to be merged\n        */\n        return result.map((diff) => {\n            const delta = {\n                ...diff,\n                colDelta: diff.colDelta - lockedColumnsWithinBounds.length\n            };\n            const fittedGrid = tailor(gridA, delta, generator);\n            // Need to recalculate lockedColumnsWithinBounds as tailoring may have inserted columns before last locked column which changes the locked index\n            const newLockedColumns = getLockedColumnsFromGrid(fittedGrid);\n            const newLockedColumnsWithinBounds = getLockedColumnsWithinBounds(validStartAddress, gridBRows, newLockedColumns);\n            return mergeTables(validStartAddress, fittedGrid, gridBRows, generator, comparator, newLockedColumnsWithinBounds);\n        });\n    };\n    const insertCols = (index, gridA, gridB, generator, comparator) => {\n        splitCols(gridA, index, comparator, generator.cell);\n        const delta = measureHeight(gridB, gridA);\n        const fittedNewGrid = tailor(gridB, delta, generator);\n        const secondDelta = measureHeight(gridA, fittedNewGrid);\n        const fittedOldGrid = tailor(gridA, secondDelta, generator);\n        return map$1(fittedOldGrid, (gridRow, i) => {\n            return addCells(gridRow, index, fittedNewGrid[i].cells);\n        });\n    };\n    /*\n      Inserting rows with locked columns\n      - Tailor gridA first (this needs to be done first as the position of the locked columns may change when tailoring gridA and the location of the locked columns needs to be stable before tailoring gridB)\n        - measure delta between gridA and gridB (pasted rows) - if negative colDelta, gridA needs extra columns added to match gridB\n        - need to calculate how many columns in gridB cannot be directly inserted into gridA - this is how many extra columns need to be added to gridA (this consideres the fact locked column cannot be inserted into)\n          - nonLockedGridA + lockedGridA - gridB = colDelta (By subtracting locked column count, can get required diff)\n        - tailor gridA by adding the required extra columns if necessary either at the end of gridA or before the last column depending on whether it is locked\n      - Recalculate where the locked columns are in gridA after tailoring\n      - Measure and determine if extra columns need to be added to gridB (locked columns should not count towards the delta as colFilling (adding extra columns) for locked columns is handled separately)\n      - Do a lockedColFill on gridB\n      - Tailor gridB by adding extra columns to end of gridB if required\n    */\n    const insertRows = (index, gridA, gridB, generator, comparator) => {\n        splitRows(gridA, index, comparator, generator.cell);\n        const locked = getLockedColumnsFromGrid(gridA);\n        const diff = measureWidth(gridA, gridB);\n        const delta = {\n            ...diff,\n            colDelta: diff.colDelta - locked.length\n        };\n        const fittedOldGrid = tailor(gridA, delta, generator);\n        const { cols: oldCols, rows: oldRows } = extractGridDetails(fittedOldGrid);\n        const newLocked = getLockedColumnsFromGrid(fittedOldGrid);\n        const secondDiff = measureWidth(gridB, gridA);\n        // Don't want the locked columns to count towards to the colDelta as column filling for locked columns is handled separately\n        const secondDelta = {\n            ...secondDiff,\n            colDelta: secondDiff.colDelta + newLocked.length\n        };\n        const fittedGridB = lockedColFill(gridB, generator, newLocked);\n        const fittedNewGrid = tailor(fittedGridB, secondDelta, generator);\n        return [\n            ...oldCols,\n            ...oldRows.slice(0, index),\n            ...fittedNewGrid,\n            ...oldRows.slice(index, oldRows.length)\n        ];\n    };\n\n    const cloneRow = (row, cloneCell, comparator, substitution) => clone$2(row, (elem) => substitution(elem, comparator), cloneCell);\n    // substitution :: (item, comparator) -> item\n    // example is the location of the cursor (the row index)\n    // index is the insert position (at - or after - example) (the row index)\n    const insertRowAt = (grid, index, example, comparator, substitution) => {\n        const { rows, cols } = extractGridDetails(grid);\n        const before = rows.slice(0, index);\n        const after = rows.slice(index);\n        const newRow = cloneRow(rows[example], (ex, c) => {\n            const withinSpan = index > 0 && index < rows.length && comparator(getCellElement(rows[index - 1], c), getCellElement(rows[index], c));\n            const ret = withinSpan ? getCell(rows[index], c) : elementnew(substitution(ex.element, comparator), true, ex.isLocked);\n            return ret;\n        }, comparator, substitution);\n        return [\n            ...cols,\n            ...before,\n            newRow,\n            ...after\n        ];\n    };\n    const getElementFor = (row, column, section, withinSpan, example, comparator, substitution) => {\n        if (section === 'colgroup' || !withinSpan) {\n            const cell = getCell(row, example);\n            // locked is explicitly set to false so the newly inserted column doesn't inherit example column locked state\n            return elementnew(substitution(cell.element, comparator), true, false);\n        }\n        else {\n            return getCell(row, column);\n        }\n    };\n    // substitution :: (item, comparator) -> item\n    // example is the location of the cursor (the column index)\n    // index is the insert position (at - or after - example) (the column index)\n    const insertColumnAt = (grid, index, example, comparator, substitution) => map$1(grid, (row) => {\n        const withinSpan = index > 0 && index < cellLength(row) && comparator(getCellElement(row, index - 1), getCellElement(row, index));\n        const sub = getElementFor(row, index, row.section, withinSpan, example, comparator, substitution);\n        return addCell(row, index, sub);\n    });\n    const deleteColumnsAt = (grid, columns) => bind$2(grid, (row) => {\n        const existingCells = row.cells;\n        const cells = foldr(columns, (acc, column) => column >= 0 && column < acc.length ? acc.slice(0, column).concat(acc.slice(column + 1)) : acc, existingCells);\n        return cells.length > 0 ? [rowcells(row.element, cells, row.section, row.isNew)] : [];\n    });\n    const deleteRowsAt = (grid, start, finish) => {\n        const { rows, cols } = extractGridDetails(grid);\n        return [\n            ...cols,\n            ...rows.slice(0, start),\n            ...rows.slice(finish + 1)\n        ];\n    };\n\n    const notInStartRow = (grid, rowIndex, colIndex, comparator) => getCellElement(grid[rowIndex], colIndex) !== undefined && (rowIndex > 0 && comparator(getCellElement(grid[rowIndex - 1], colIndex), getCellElement(grid[rowIndex], colIndex)));\n    const notInStartColumn = (row, index, comparator) => index > 0 && comparator(getCellElement(row, index - 1), getCellElement(row, index));\n    // This checks for cells that aren't in the \"start\" position as the model will create duplicate element references for\n    // each column/row that the cell spans. As an example, for a merged cell with rowspan=\"2\", the cell in the second row is a duplicate\n    // of the cell in the first row.\n    const isDuplicatedCell = (grid, rowIndex, colIndex, comparator) => notInStartRow(grid, rowIndex, colIndex, comparator) || notInStartColumn(grid[rowIndex], colIndex, comparator);\n    const rowReplacerPredicate = (targetRow, columnHeaders) => {\n        const entireTableIsHeader = forall(columnHeaders, identity) && isHeaderCells(targetRow.cells);\n        return entireTableIsHeader ? always : (cell, _rowIndex, colIndex) => {\n            const type = name(cell.element);\n            return !(type === 'th' && columnHeaders[colIndex]);\n        };\n    };\n    const columnReplacePredicate = (targetColumn, rowHeaders) => {\n        const entireTableIsHeader = forall(rowHeaders, identity) && isHeaderCells(targetColumn);\n        return entireTableIsHeader ? always : (cell, rowIndex, _colIndex) => {\n            const type = name(cell.element);\n            return !(type === 'th' && rowHeaders[rowIndex]);\n        };\n    };\n    const determineScope = (applyScope, cell, newScope, isInHeader) => {\n        const hasSpan = (scope) => scope === 'row' ? hasRowspan(cell) : hasColspan(cell);\n        const getScope = (scope) => hasSpan(scope) ? `${scope}group` : scope;\n        if (applyScope) {\n            return isHeaderCell(cell) ? getScope(newScope) : null;\n        }\n        else if (isInHeader && isHeaderCell(cell)) {\n            // The cell is still in a header row/column so ensure the right scope is reverted to\n            const oppositeScope = newScope === 'row' ? 'col' : 'row';\n            return getScope(oppositeScope);\n        }\n        else {\n            // No longer a header so ensure the scope is removed\n            return null;\n        }\n    };\n    const rowScopeGenerator = (applyScope, columnHeaders) => (cell, rowIndex, columnIndex) => Optional.some(determineScope(applyScope, cell.element, 'col', columnHeaders[columnIndex]));\n    const columnScopeGenerator = (applyScope, rowHeaders) => (cell, rowIndex) => Optional.some(determineScope(applyScope, cell.element, 'row', rowHeaders[rowIndex]));\n    const replace = (cell, comparator, substitute) => elementnew(substitute(cell.element, comparator), true, cell.isLocked);\n    const replaceIn = (grid, targets, comparator, substitute, replacer, genScope, shouldReplace) => {\n        const isTarget = (cell) => {\n            return exists(targets, (target) => {\n                return comparator(cell.element, target.element);\n            });\n        };\n        return map$1(grid, (row, rowIndex) => {\n            return mapCells(row, (cell, colIndex) => {\n                if (isTarget(cell)) {\n                    const newCell = shouldReplace(cell, rowIndex, colIndex) ? replacer(cell, comparator, substitute) : cell;\n                    // Update the scope\n                    genScope(newCell, rowIndex, colIndex).each((scope) => {\n                        setOptions(newCell.element, { scope: Optional.from(scope) });\n                    });\n                    return newCell;\n                }\n                else {\n                    return cell;\n                }\n            });\n        });\n    };\n    const getColumnCells = (rows, columnIndex, comparator) => bind$2(rows, (row, i) => {\n        // check if already added.\n        return isDuplicatedCell(rows, i, columnIndex, comparator) ? [] : [getCell(row, columnIndex)];\n    });\n    const getRowCells = (rows, rowIndex, comparator) => {\n        const targetRow = rows[rowIndex];\n        return bind$2(targetRow.cells, (item, i) => {\n            // Check that we haven't already added this one.\n            return isDuplicatedCell(rows, rowIndex, i, comparator) ? [] : [item];\n        });\n    };\n    const replaceColumns = (grid, indexes, applyScope, comparator, substitution) => {\n        // Make this efficient later.\n        const rows = extractGridDetails(grid).rows;\n        const targets = bind$2(indexes, (index) => getColumnCells(rows, index, comparator));\n        const rowHeaders = map$1(rows, (row) => isHeaderCells(row.cells));\n        const shouldReplaceCell = columnReplacePredicate(targets, rowHeaders);\n        const scopeGenerator = columnScopeGenerator(applyScope, rowHeaders);\n        return replaceIn(grid, targets, comparator, substitution, replace, scopeGenerator, shouldReplaceCell);\n    };\n    const replaceRows = (grid, indexes, section, applyScope, comparator, substitution, tableSection) => {\n        const { cols, rows } = extractGridDetails(grid);\n        const targetRow = rows[indexes[0]];\n        const targets = bind$2(indexes, (index) => getRowCells(rows, index, comparator));\n        const columnHeaders = map$1(targetRow.cells, (_cell, index) => isHeaderCells(getColumnCells(rows, index, comparator)));\n        // Transform and replace the target row\n        // TODO: TINY-7776: This doesn't deal with rowspans which can break the layout when moving to a new section\n        const newRows = [...rows];\n        each$2(indexes, (index) => {\n            newRows[index] = tableSection.transformRow(rows[index], section);\n        });\n        const newGrid = [...cols, ...newRows];\n        const shouldReplaceCell = rowReplacerPredicate(targetRow, columnHeaders);\n        const scopeGenerator = rowScopeGenerator(applyScope, columnHeaders);\n        return replaceIn(newGrid, targets, comparator, substitution, tableSection.transformCell, scopeGenerator, shouldReplaceCell);\n    };\n    const replaceCells = (grid, details, comparator, substitution) => {\n        const rows = extractGridDetails(grid).rows;\n        const targetCells = map$1(details, (detail) => getCell(rows[detail.row], detail.column));\n        return replaceIn(grid, targetCells, comparator, substitution, replace, Optional.none, always);\n    };\n\n    const uniqueColumns = (details) => {\n        const uniqueCheck = (rest, detail) => {\n            const columnExists = exists(rest, (currentDetail) => currentDetail.column === detail.column);\n            return columnExists ? rest : rest.concat([detail]);\n        };\n        return foldl(details, uniqueCheck, []).sort((detailA, detailB) => detailA.column - detailB.column);\n    };\n\n    // This uses a slight variation to the default `ContentEditable.isEditable` behaviour,\n    // as when the element is detached we assume it is editable because it is a new cell.\n    const isEditable = (elem) => isEditable$1(elem, true);\n    const prune = (table) => {\n        const cells = cells$1(table);\n        if (cells.length === 0) {\n            remove$5(table);\n        }\n    };\n    const outcome = (grid, cursor) => ({\n        grid,\n        cursor\n    });\n    const findEditableCursorPosition = (rows) => findMap(rows, (row) => findMap(row.cells, (cell) => {\n        const elem = cell.element;\n        return someIf(isEditable(elem), elem);\n    }));\n    const elementFromGrid = (grid, row, column) => {\n        const rows = extractGridDetails(grid).rows;\n        return Optional.from(rows[row]?.cells[column]?.element)\n            .filter(isEditable)\n            // Fallback to the first valid position in the table\n            .orThunk(() => findEditableCursorPosition(rows));\n    };\n    const bundle = (grid, row, column) => {\n        const cursorElement = elementFromGrid(grid, row, column);\n        return outcome(grid, cursorElement);\n    };\n    const uniqueRows = (details) => {\n        const rowCompilation = (rest, detail) => {\n            const rowExists = exists(rest, (currentDetail) => currentDetail.row === detail.row);\n            return rowExists ? rest : rest.concat([detail]);\n        };\n        return foldl(details, rowCompilation, []).sort((detailA, detailB) => detailA.row - detailB.row);\n    };\n    const opInsertRowsBefore = (grid, details, comparator, genWrappers) => {\n        const targetIndex = details[0].row;\n        const rows = uniqueRows(details);\n        const newGrid = foldr(rows, (acc, row) => {\n            const newG = insertRowAt(acc.grid, targetIndex, row.row + acc.delta, comparator, genWrappers.getOrInit);\n            return { grid: newG, delta: acc.delta + 1 };\n        }, { grid, delta: 0 }).grid;\n        return bundle(newGrid, targetIndex, details[0].column);\n    };\n    const opInsertRowsAfter = (grid, details, comparator, genWrappers) => {\n        const rows = uniqueRows(details);\n        const target = rows[rows.length - 1];\n        const targetIndex = target.row + target.rowspan;\n        const newGrid = foldr(rows, (newG, row) => {\n            return insertRowAt(newG, targetIndex, row.row, comparator, genWrappers.getOrInit);\n        }, grid);\n        return bundle(newGrid, targetIndex, details[0].column);\n    };\n    const opInsertColumnsBefore = (grid, extractDetail, comparator, genWrappers) => {\n        const details = extractDetail.details;\n        const columns = uniqueColumns(details);\n        const targetIndex = columns[0].column;\n        const newGrid = foldr(columns, (acc, col) => {\n            const newG = insertColumnAt(acc.grid, targetIndex, col.column + acc.delta, comparator, genWrappers.getOrInit);\n            return { grid: newG, delta: acc.delta + 1 };\n        }, { grid, delta: 0 }).grid;\n        return bundle(newGrid, details[0].row, targetIndex);\n    };\n    const opInsertColumnsAfter = (grid, extractDetail, comparator, genWrappers) => {\n        const details = extractDetail.details;\n        const target = details[details.length - 1];\n        const targetIndex = target.column + target.colspan;\n        const columns = uniqueColumns(details);\n        const newGrid = foldr(columns, (newG, col) => {\n            return insertColumnAt(newG, targetIndex, col.column, comparator, genWrappers.getOrInit);\n        }, grid);\n        return bundle(newGrid, details[0].row, targetIndex);\n    };\n    const opMakeColumnsHeader = (initialGrid, details, comparator, genWrappers) => {\n        const columns = uniqueColumns(details);\n        const columnIndexes = map$1(columns, (detail) => detail.column);\n        const newGrid = replaceColumns(initialGrid, columnIndexes, true, comparator, genWrappers.replaceOrInit);\n        return bundle(newGrid, details[0].row, details[0].column);\n    };\n    const opMakeCellsHeader = (initialGrid, details, comparator, genWrappers) => {\n        const newGrid = replaceCells(initialGrid, details, comparator, genWrappers.replaceOrInit);\n        return bundle(newGrid, details[0].row, details[0].column);\n    };\n    const opUnmakeColumnsHeader = (initialGrid, details, comparator, genWrappers) => {\n        const columns = uniqueColumns(details);\n        const columnIndexes = map$1(columns, (detail) => detail.column);\n        const newGrid = replaceColumns(initialGrid, columnIndexes, false, comparator, genWrappers.replaceOrInit);\n        return bundle(newGrid, details[0].row, details[0].column);\n    };\n    const opUnmakeCellsHeader = (initialGrid, details, comparator, genWrappers) => {\n        const newGrid = replaceCells(initialGrid, details, comparator, genWrappers.replaceOrInit);\n        return bundle(newGrid, details[0].row, details[0].column);\n    };\n    const makeRowsSection = (section, applyScope) => (initialGrid, details, comparator, genWrappers, tableSection) => {\n        const rows = uniqueRows(details);\n        const rowIndexes = map$1(rows, (detail) => detail.row);\n        const newGrid = replaceRows(initialGrid, rowIndexes, section, applyScope, comparator, genWrappers.replaceOrInit, tableSection);\n        return bundle(newGrid, details[0].row, details[0].column);\n    };\n    const opMakeRowsHeader = makeRowsSection('thead', true);\n    const opMakeRowsBody = makeRowsSection('tbody', false);\n    const opMakeRowsFooter = makeRowsSection('tfoot', false);\n    const opEraseColumns = (grid, extractDetail, _comparator, _genWrappers) => {\n        const columns = uniqueColumns(extractDetail.details);\n        const newGrid = deleteColumnsAt(grid, map$1(columns, (column) => column.column));\n        const maxColIndex = newGrid.length > 0 ? newGrid[0].cells.length - 1 : 0;\n        return bundle(newGrid, columns[0].row, Math.min(columns[0].column, maxColIndex));\n    };\n    const opEraseRows = (grid, details, _comparator, _genWrappers) => {\n        const rows = uniqueRows(details);\n        const newGrid = deleteRowsAt(grid, rows[0].row, rows[rows.length - 1].row);\n        const maxRowIndex = Math.max(extractGridDetails(newGrid).rows.length - 1, 0);\n        return bundle(newGrid, Math.min(details[0].row, maxRowIndex), details[0].column);\n    };\n    const opMergeCells = (grid, mergable, comparator, genWrappers) => {\n        const cells = mergable.cells;\n        merge$2(cells);\n        const newGrid = merge$1(grid, mergable.bounds, comparator, genWrappers.merge(cells));\n        return outcome(newGrid, Optional.from(cells[0]));\n    };\n    const opUnmergeCells = (grid, unmergable, comparator, genWrappers) => {\n        const unmerge$1 = (b, cell) => unmerge(b, cell, comparator, genWrappers.unmerge(cell));\n        const newGrid = foldr(unmergable, unmerge$1, grid);\n        return outcome(newGrid, Optional.from(unmergable[0]));\n    };\n    const opPasteCells = (grid, pasteDetails, comparator, _genWrappers) => {\n        const gridify = (table, generators) => {\n            const wh = Warehouse.fromTable(table);\n            return toGrid(wh, generators, true);\n        };\n        const gridB = gridify(pasteDetails.clipboard, pasteDetails.generators);\n        const startAddress = address(pasteDetails.row, pasteDetails.column);\n        const mergedGrid = merge(startAddress, grid, gridB, pasteDetails.generators, comparator);\n        return mergedGrid.fold(() => outcome(grid, Optional.some(pasteDetails.element)), (newGrid) => {\n            return bundle(newGrid, pasteDetails.row, pasteDetails.column);\n        });\n    };\n    const gridifyRows = (rows, generators, context) => {\n        const pasteDetails = fromPastedRows(rows, context.section);\n        const wh = Warehouse.generate(pasteDetails);\n        return toGrid(wh, generators, true);\n    };\n    const opPasteColsBefore = (grid, pasteDetails, comparator, _genWrappers) => {\n        const rows = extractGridDetails(grid).rows;\n        const index = pasteDetails.cells[0].column;\n        const context = rows[pasteDetails.cells[0].row];\n        const gridB = gridifyRows(pasteDetails.clipboard, pasteDetails.generators, context);\n        const mergedGrid = insertCols(index, grid, gridB, pasteDetails.generators, comparator);\n        return bundle(mergedGrid, pasteDetails.cells[0].row, pasteDetails.cells[0].column);\n    };\n    const opPasteColsAfter = (grid, pasteDetails, comparator, _genWrappers) => {\n        const rows = extractGridDetails(grid).rows;\n        const index = pasteDetails.cells[pasteDetails.cells.length - 1].column + pasteDetails.cells[pasteDetails.cells.length - 1].colspan;\n        const context = rows[pasteDetails.cells[0].row];\n        const gridB = gridifyRows(pasteDetails.clipboard, pasteDetails.generators, context);\n        const mergedGrid = insertCols(index, grid, gridB, pasteDetails.generators, comparator);\n        return bundle(mergedGrid, pasteDetails.cells[0].row, index);\n    };\n    const opPasteRowsBefore = (grid, pasteDetails, comparator, _genWrappers) => {\n        const rows = extractGridDetails(grid).rows;\n        const index = pasteDetails.cells[0].row;\n        const context = rows[index];\n        const gridB = gridifyRows(pasteDetails.clipboard, pasteDetails.generators, context);\n        const mergedGrid = insertRows(index, grid, gridB, pasteDetails.generators, comparator);\n        return bundle(mergedGrid, pasteDetails.cells[0].row, pasteDetails.cells[0].column);\n    };\n    const opPasteRowsAfter = (grid, pasteDetails, comparator, _genWrappers) => {\n        const rows = extractGridDetails(grid).rows;\n        const index = pasteDetails.cells[pasteDetails.cells.length - 1].row + pasteDetails.cells[pasteDetails.cells.length - 1].rowspan;\n        const context = rows[pasteDetails.cells[0].row];\n        const gridB = gridifyRows(pasteDetails.clipboard, pasteDetails.generators, context);\n        const mergedGrid = insertRows(index, grid, gridB, pasteDetails.generators, comparator);\n        return bundle(mergedGrid, index, pasteDetails.cells[0].column);\n    };\n    const opGetColumnsType = (table, target) => {\n        const house = Warehouse.fromTable(table);\n        const details = onCells(house, target);\n        return details.bind((selectedCells) => {\n            const lastSelectedCell = selectedCells[selectedCells.length - 1];\n            const minColRange = selectedCells[0].column;\n            const maxColRange = lastSelectedCell.column + lastSelectedCell.colspan;\n            const selectedColumnCells = flatten(map$1(house.all, (row) => filter$2(row.cells, (cell) => cell.column >= minColRange && cell.column < maxColRange)));\n            return findCommonCellType(selectedColumnCells);\n        }).getOr('');\n    };\n    const opGetCellsType = (table, target) => {\n        const house = Warehouse.fromTable(table);\n        const details = onCells(house, target);\n        return details.bind(findCommonCellType).getOr('');\n    };\n    const opGetRowsType = (table, target) => {\n        const house = Warehouse.fromTable(table);\n        const details = onCells(house, target);\n        return details.bind((selectedCells) => {\n            const lastSelectedCell = selectedCells[selectedCells.length - 1];\n            const minRowRange = selectedCells[0].row;\n            const maxRowRange = lastSelectedCell.row + lastSelectedCell.rowspan;\n            const selectedRows = house.all.slice(minRowRange, maxRowRange);\n            return findCommonRowType(selectedRows);\n        }).getOr('');\n    };\n    // Only column modifications force a resizing. Everything else just tries to preserve the table as is.\n    const resize = (table, list, details, behaviours) => adjustWidthTo(table, list, details, behaviours.sizing);\n    const adjustAndRedistributeWidths = (table, list, details, behaviours) => adjustAndRedistributeWidths$1(table, list, details, behaviours.sizing, behaviours.resize);\n    // Custom selection extractors\n    const firstColumnIsLocked = (_warehouse, details) => exists(details, (detail) => detail.column === 0 && detail.isLocked);\n    // TODO: Maybe have an Arr.existsR which would be more efficient for most cases below\n    const lastColumnIsLocked = (warehouse, details) => exists(details, (detail) => detail.column + detail.colspan >= warehouse.grid.columns && detail.isLocked);\n    const getColumnsWidth = (warehouse, details) => {\n        const columns$1 = columns(warehouse);\n        const uniqueCols = uniqueColumns(details);\n        return foldl(uniqueCols, (acc, detail) => {\n            const column = columns$1[detail.column];\n            const colWidth = column.map(getOuter).getOr(0);\n            return acc + colWidth;\n        }, 0);\n    };\n    const insertColumnsExtractor = (before) => (warehouse, target) => onCells(warehouse, target).filter((details) => {\n        const checkLocked = before ? firstColumnIsLocked : lastColumnIsLocked;\n        return !checkLocked(warehouse, details);\n    }).map((details) => ({\n        details,\n        pixelDelta: getColumnsWidth(warehouse, details),\n    }));\n    const eraseColumnsExtractor = (warehouse, target) => onUnlockedCells(warehouse, target).map((details) => ({\n        details,\n        pixelDelta: -getColumnsWidth(warehouse, details), // needs to be negative as we are removing columns\n    }));\n    const pasteColumnsExtractor = (before) => (warehouse, target) => onPasteByEditor(warehouse, target).filter((details) => {\n        const checkLocked = before ? firstColumnIsLocked : lastColumnIsLocked;\n        return !checkLocked(warehouse, details.cells);\n    });\n    const headerCellGenerator = Generators.transform('th');\n    const bodyCellGenerator = Generators.transform('td');\n    const insertRowsBefore = (table, target, generators, behaviours) => run(opInsertRowsBefore, onCells, noop, noop, Generators.modification, table, target, generators, behaviours);\n    const insertRowsAfter = (table, target, generators, behaviours) => run(opInsertRowsAfter, onCells, noop, noop, Generators.modification, table, target, generators, behaviours);\n    const insertColumnsBefore = (table, target, generators, behaviours) => run(opInsertColumnsBefore, insertColumnsExtractor(true), adjustAndRedistributeWidths, noop, Generators.modification, table, target, generators, behaviours);\n    const insertColumnsAfter = (table, target, generators, behaviours) => run(opInsertColumnsAfter, insertColumnsExtractor(false), adjustAndRedistributeWidths, noop, Generators.modification, table, target, generators, behaviours);\n    const eraseColumns = (table, target, generators, behaviours) => run(opEraseColumns, eraseColumnsExtractor, adjustAndRedistributeWidths, prune, Generators.modification, table, target, generators, behaviours);\n    const eraseRows = (table, target, generators, behaviours) => run(opEraseRows, onCells, noop, prune, Generators.modification, table, target, generators, behaviours);\n    const makeColumnsHeader = (table, target, generators, behaviours) => run(opMakeColumnsHeader, onUnlockedCells, noop, noop, headerCellGenerator, table, target, generators, behaviours);\n    const unmakeColumnsHeader = (table, target, generators, behaviours) => run(opUnmakeColumnsHeader, onUnlockedCells, noop, noop, bodyCellGenerator, table, target, generators, behaviours);\n    const makeRowsHeader = (table, target, generators, behaviours) => run(opMakeRowsHeader, onCells, noop, noop, headerCellGenerator, table, target, generators, behaviours);\n    const makeRowsBody = (table, target, generators, behaviours) => run(opMakeRowsBody, onCells, noop, noop, bodyCellGenerator, table, target, generators, behaviours);\n    const makeRowsFooter = (table, target, generators, behaviours) => run(opMakeRowsFooter, onCells, noop, noop, bodyCellGenerator, table, target, generators, behaviours);\n    const makeCellsHeader = (table, target, generators, behaviours) => run(opMakeCellsHeader, onUnlockedCells, noop, noop, headerCellGenerator, table, target, generators, behaviours);\n    const unmakeCellsHeader = (table, target, generators, behaviours) => run(opUnmakeCellsHeader, onUnlockedCells, noop, noop, bodyCellGenerator, table, target, generators, behaviours);\n    const mergeCells = (table, target, generators, behaviours) => run(opMergeCells, onUnlockedMergable, resize, noop, Generators.merging, table, target, generators, behaviours);\n    const unmergeCells = (table, target, generators, behaviours) => run(opUnmergeCells, onUnlockedUnmergable, resize, noop, Generators.merging, table, target, generators, behaviours);\n    const pasteCells = (table, target, generators, behaviours) => run(opPasteCells, onPaste, resize, noop, Generators.modification, table, target, generators, behaviours);\n    const pasteColsBefore = (table, target, generators, behaviours) => run(opPasteColsBefore, pasteColumnsExtractor(true), noop, noop, Generators.modification, table, target, generators, behaviours);\n    const pasteColsAfter = (table, target, generators, behaviours) => run(opPasteColsAfter, pasteColumnsExtractor(false), noop, noop, Generators.modification, table, target, generators, behaviours);\n    const pasteRowsBefore = (table, target, generators, behaviours) => run(opPasteRowsBefore, onPasteByEditor, noop, noop, Generators.modification, table, target, generators, behaviours);\n    const pasteRowsAfter = (table, target, generators, behaviours) => run(opPasteRowsAfter, onPasteByEditor, noop, noop, Generators.modification, table, target, generators, behaviours);\n    const getColumnsType = opGetColumnsType;\n    const getCellsType = opGetCellsType;\n    const getRowsType = opGetRowsType;\n\n    const inSelection = (bounds, detail) => {\n        const leftEdge = detail.column;\n        const rightEdge = detail.column + detail.colspan - 1;\n        const topEdge = detail.row;\n        const bottomEdge = detail.row + detail.rowspan - 1;\n        return (leftEdge <= bounds.finishCol && rightEdge >= bounds.startCol) && (topEdge <= bounds.finishRow && bottomEdge >= bounds.startRow);\n    };\n    // Note, something is *within* if it is completely contained within the bounds.\n    const isWithin = (bounds, detail) => {\n        return (detail.column >= bounds.startCol &&\n            (detail.column + detail.colspan - 1) <= bounds.finishCol &&\n            detail.row >= bounds.startRow &&\n            (detail.row + detail.rowspan - 1) <= bounds.finishRow);\n    };\n    const isRectangular = (warehouse, bounds) => {\n        let isRect = true;\n        const detailIsWithin = curry(isWithin, bounds);\n        for (let i = bounds.startRow; i <= bounds.finishRow; i++) {\n            for (let j = bounds.startCol; j <= bounds.finishCol; j++) {\n                isRect = isRect && Warehouse.getAt(warehouse, i, j).exists(detailIsWithin);\n            }\n        }\n        return isRect ? Optional.some(bounds) : Optional.none();\n    };\n\n    const getBounds = (detailA, detailB) => {\n        return bounds(Math.min(detailA.row, detailB.row), Math.min(detailA.column, detailB.column), Math.max(detailA.row + detailA.rowspan - 1, detailB.row + detailB.rowspan - 1), Math.max(detailA.column + detailA.colspan - 1, detailB.column + detailB.colspan - 1));\n    };\n    const getAnyBox = (warehouse, startCell, finishCell) => {\n        const startCoords = Warehouse.findItem(warehouse, startCell, eq$1);\n        const finishCoords = Warehouse.findItem(warehouse, finishCell, eq$1);\n        return startCoords.bind((sc) => {\n            return finishCoords.map((fc) => {\n                return getBounds(sc, fc);\n            });\n        });\n    };\n    const getBox$1 = (warehouse, startCell, finishCell) => {\n        return getAnyBox(warehouse, startCell, finishCell).bind((bounds) => {\n            return isRectangular(warehouse, bounds);\n        });\n    };\n\n    const moveBy$1 = (warehouse, cell, row, column) => {\n        return Warehouse.findItem(warehouse, cell, eq$1).bind((detail) => {\n            const startRow = row > 0 ? detail.row + detail.rowspan - 1 : detail.row;\n            const startCol = column > 0 ? detail.column + detail.colspan - 1 : detail.column;\n            const dest = Warehouse.getAt(warehouse, startRow + row, startCol + column);\n            return dest.map((d) => {\n                return d.element;\n            });\n        });\n    };\n    const intercepts$1 = (warehouse, start, finish) => {\n        return getAnyBox(warehouse, start, finish).map((bounds) => {\n            const inside = Warehouse.filterItems(warehouse, curry(inSelection, bounds));\n            return map$1(inside, (detail) => {\n                return detail.element;\n            });\n        });\n    };\n    const parentCell = (warehouse, innerCell) => {\n        const isContainedBy = (c1, c2) => {\n            return contains(c2, c1);\n        };\n        return Warehouse.findItem(warehouse, innerCell, isContainedBy).map((detail) => {\n            return detail.element;\n        });\n    };\n\n    const moveBy = (cell, deltaRow, deltaColumn) => {\n        return table(cell).bind((table) => {\n            const warehouse = getWarehouse(table);\n            return moveBy$1(warehouse, cell, deltaRow, deltaColumn);\n        });\n    };\n    const intercepts = (table, first, last) => {\n        const warehouse = getWarehouse(table);\n        return intercepts$1(warehouse, first, last);\n    };\n    const nestedIntercepts = (table, first, firstTable, last, lastTable) => {\n        const warehouse = getWarehouse(table);\n        const optStartCell = eq$1(table, firstTable) ? Optional.some(first) : parentCell(warehouse, first);\n        const optLastCell = eq$1(table, lastTable) ? Optional.some(last) : parentCell(warehouse, last);\n        return optStartCell.bind((startCell) => optLastCell.bind((lastCell) => intercepts$1(warehouse, startCell, lastCell)));\n    };\n    const getBox = (table, first, last) => {\n        const warehouse = getWarehouse(table);\n        return getBox$1(warehouse, first, last);\n    };\n    // Private method ... keep warehouse in snooker, please.\n    const getWarehouse = Warehouse.fromTable;\n\n    const DefaultRenderOptions = {\n        styles: {\n            'border-collapse': 'collapse',\n            'width': '100%'\n        },\n        attributes: {\n            border: '1'\n        },\n        colGroups: false\n    };\n    const tableHeaderCell = () => SugarElement.fromTag('th');\n    const tableCell = () => SugarElement.fromTag('td');\n    const tableColumn = () => SugarElement.fromTag('col');\n    const createRow = (columns, rowHeaders, columnHeaders, rowIndex) => {\n        const tr = SugarElement.fromTag('tr');\n        for (let j = 0; j < columns; j++) {\n            const td = rowIndex < rowHeaders || j < columnHeaders ? tableHeaderCell() : tableCell();\n            if (j < columnHeaders) {\n                set$2(td, 'scope', 'row');\n            }\n            if (rowIndex < rowHeaders) {\n                set$2(td, 'scope', 'col');\n            }\n            // Note, this is a placeholder so that the cells have height. The unicode character didn't work in IE10.\n            append$1(td, SugarElement.fromTag('br'));\n            append$1(tr, td);\n        }\n        return tr;\n    };\n    const createGroupRow = (columns) => {\n        const columnGroup = SugarElement.fromTag('colgroup');\n        range$1(columns, () => append$1(columnGroup, tableColumn()));\n        return columnGroup;\n    };\n    const createRows = (rows, columns, rowHeaders, columnHeaders) => range$1(rows, (r) => createRow(columns, rowHeaders, columnHeaders, r));\n    const render = (rows, columns, rowHeaders, columnHeaders, headerType, renderOpts = DefaultRenderOptions) => {\n        const table = SugarElement.fromTag('table');\n        const rowHeadersGoInThead = headerType !== 'cells';\n        setAll(table, renderOpts.styles);\n        setAll$1(table, renderOpts.attributes);\n        if (renderOpts.colGroups) {\n            append$1(table, createGroupRow(columns));\n        }\n        const actualRowHeaders = Math.min(rows, rowHeaders);\n        if (rowHeadersGoInThead && rowHeaders > 0) {\n            const thead = SugarElement.fromTag('thead');\n            append$1(table, thead);\n            const theadRowHeaders = headerType === 'sectionCells' ? actualRowHeaders : 0;\n            const theadRows = createRows(rowHeaders, columns, theadRowHeaders, columnHeaders);\n            append(thead, theadRows);\n        }\n        const tbody = SugarElement.fromTag('tbody');\n        append$1(table, tbody);\n        const numRows = rowHeadersGoInThead ? rows - actualRowHeaders : rows;\n        const numRowHeaders = rowHeadersGoInThead ? 0 : rowHeaders;\n        const tbodyRows = createRows(numRows, columns, numRowHeaders, columnHeaders);\n        append(tbody, tbodyRows);\n        return table;\n    };\n\n    const Event = (fields) => {\n        let handlers = [];\n        const bind = (handler) => {\n            if (handler === undefined) {\n                throw new Error('Event bind error: undefined handler');\n            }\n            handlers.push(handler);\n        };\n        const unbind = (handler) => {\n            // This is quite a bit slower than handlers.splice() but we hate mutation.\n            // Unbind isn't used very often so it should be ok.\n            handlers = filter$2(handlers, (h) => {\n                return h !== handler;\n            });\n        };\n        const trigger = (...args) => {\n            const event = {};\n            each$2(fields, (name, i) => {\n                event[name] = args[i];\n            });\n            each$2(handlers, (handler) => {\n                handler(event);\n            });\n        };\n        return {\n            bind,\n            unbind,\n            trigger\n        };\n    };\n\n    /** :: {name : Event} -> Events */\n    const create$3 = (typeDefs) => {\n        const registry = map(typeDefs, (event) => {\n            return {\n                bind: event.bind,\n                unbind: event.unbind\n            };\n        });\n        const trigger = map(typeDefs, (event) => {\n            return event.trigger;\n        });\n        return {\n            registry,\n            trigger\n        };\n    };\n\n    const DragMode = exactly([\n        'compare',\n        'extract',\n        'mutate',\n        'sink'\n    ]);\n    const DragSink = exactly([\n        'element',\n        'start',\n        'stop',\n        'destroy'\n    ]);\n    const DragApi = exactly([\n        'forceDrop',\n        'drop',\n        'move',\n        'delayDrop'\n    ]);\n\n    const InDrag = () => {\n        let previous = Optional.none();\n        const reset = () => {\n            previous = Optional.none();\n        };\n        // Return position delta between previous position and nu position,\n        // or None if this is the first. Set the previous position to nu.\n        const update = (mode, nu) => {\n            const result = previous.map((old) => {\n                return mode.compare(old, nu);\n            });\n            previous = Optional.some(nu);\n            return result;\n        };\n        const onEvent = (event, mode) => {\n            const dataOption = mode.extract(event);\n            // Dragster move events require a position delta. The moveevent is only triggered\n            // on the second and subsequent dragster move events. The first is dropped.\n            dataOption.each((data) => {\n                const offset = update(mode, data);\n                offset.each((d) => {\n                    events.trigger.move(d);\n                });\n            });\n        };\n        const events = create$3({\n            move: Event(['info'])\n        });\n        return {\n            onEvent,\n            reset,\n            events: events.registry\n        };\n    };\n\n    const NoDrag = () => {\n        const events = create$3({\n            move: Event(['info'])\n        });\n        return {\n            onEvent: noop,\n            reset: noop,\n            events: events.registry\n        };\n    };\n\n    const Movement = () => {\n        const noDragState = NoDrag();\n        const inDragState = InDrag();\n        let dragState = noDragState;\n        const on = () => {\n            dragState.reset();\n            dragState = inDragState;\n        };\n        const off = () => {\n            dragState.reset();\n            dragState = noDragState;\n        };\n        const onEvent = (event, mode) => {\n            dragState.onEvent(event, mode);\n        };\n        const isOn = () => {\n            return dragState === inDragState;\n        };\n        return {\n            on,\n            off,\n            isOn,\n            onEvent,\n            events: inDragState.events\n        };\n    };\n\n    const setup = (mutation, mode, settings) => {\n        let active = false;\n        const events = create$3({\n            start: Event([]),\n            stop: Event([])\n        });\n        const movement = Movement();\n        const drop = () => {\n            sink.stop();\n            if (movement.isOn()) {\n                movement.off();\n                events.trigger.stop();\n            }\n        };\n        const throttledDrop = last$1(drop, 200);\n        const go = (parent) => {\n            sink.start(parent);\n            movement.on();\n            events.trigger.start();\n        };\n        const mousemove = (event) => {\n            throttledDrop.cancel();\n            movement.onEvent(event, mode);\n        };\n        movement.events.move.bind((event) => {\n            mode.mutate(mutation, event.info);\n        });\n        const on = () => {\n            active = true;\n        };\n        const off = () => {\n            active = false;\n            // acivate some events here?\n        };\n        const isActive = () => active;\n        const runIfActive = (f) => {\n            return (...args) => {\n                if (active) {\n                    f.apply(null, args);\n                }\n            };\n        };\n        const sink = mode.sink(DragApi({\n            // ASSUMPTION: runIfActive is not needed for mousedown. This is pretty much a safety measure for\n            // inconsistent situations so that we don't block input.\n            forceDrop: drop,\n            drop: runIfActive(drop),\n            move: runIfActive(mousemove),\n            delayDrop: runIfActive(throttledDrop.throttle)\n        }), settings);\n        const destroy = () => {\n            sink.destroy();\n        };\n        return {\n            element: sink.element,\n            go,\n            on,\n            off,\n            isActive,\n            destroy,\n            events: events.registry\n        };\n    };\n\n    const styles$1 = css('ephox-dragster');\n    const resolve$1 = styles$1.resolve;\n\n    const Blocker = (options) => {\n        const settings = {\n            layerClass: resolve$1('blocker'),\n            ...options\n        };\n        const div = SugarElement.fromTag('div');\n        set$2(div, 'role', 'presentation');\n        set$2(div, 'data-mce-bogus', 'all');\n        setAll(div, {\n            position: 'fixed',\n            left: '0px',\n            top: '0px',\n            width: '100%',\n            height: '100%'\n        });\n        add$1(div, resolve$1('blocker'));\n        add$1(div, settings.layerClass);\n        const element = constant(div);\n        const destroy = () => {\n            remove$5(div);\n        };\n        return {\n            element,\n            destroy\n        };\n    };\n\n    const compare = (old, nu) => {\n        return SugarPosition(nu.left - old.left, nu.top - old.top);\n    };\n    const extract = (event) => {\n        return Optional.some(SugarPosition(event.x, event.y));\n    };\n    const mutate = (mutation, info) => {\n        mutation.mutate(info.left, info.top);\n    };\n    const sink = (dragApi, settings) => {\n        const blocker = Blocker(settings);\n        // Included for safety. If the blocker has stayed on the screen, get rid of it on a click.\n        const mdown = bind(blocker.element(), 'mousedown', dragApi.forceDrop);\n        const mup = bind(blocker.element(), 'mouseup', dragApi.drop);\n        const mmove = bind(blocker.element(), 'mousemove', dragApi.move);\n        const mout = bind(blocker.element(), 'mouseout', dragApi.delayDrop);\n        const destroy = () => {\n            blocker.destroy();\n            mup.unbind();\n            mmove.unbind();\n            mout.unbind();\n            mdown.unbind();\n        };\n        const start = (parent) => {\n            append$1(parent, blocker.element());\n        };\n        const stop = () => {\n            remove$5(blocker.element());\n        };\n        return DragSink({\n            element: blocker.element,\n            start,\n            stop,\n            destroy\n        });\n    };\n    var MouseDrag = DragMode({\n        compare,\n        extract,\n        sink,\n        mutate\n    });\n\n    const transform = (mutation, settings = {}) => {\n        const mode = settings.mode ?? MouseDrag;\n        return setup(mutation, mode, settings);\n    };\n\n    const styles = css('ephox-snooker');\n    const resolve = styles.resolve;\n\n    const Mutation = () => {\n        const events = create$3({\n            drag: Event(['xDelta', 'yDelta'])\n        });\n        const mutate = (x, y) => {\n            events.trigger.drag(x, y);\n        };\n        return {\n            mutate,\n            events: events.registry\n        };\n    };\n\n    const BarMutation = () => {\n        const events = create$3({\n            drag: Event(['xDelta', 'yDelta', 'target'])\n        });\n        let target = Optional.none();\n        const delegate = Mutation();\n        delegate.events.drag.bind((event) => {\n            target.each((t) => {\n                // There is always going to be this padding / border collapse / margin problem with widths. I'll have to resolve that.\n                events.trigger.drag(event.xDelta, event.yDelta, t);\n            });\n        });\n        const assign = (t) => {\n            target = Optional.some(t);\n        };\n        const get = () => {\n            return target;\n        };\n        return {\n            assign,\n            get,\n            mutate: delegate.mutate,\n            events: events.registry\n        };\n    };\n\n    const col = (column, x, y, w, h) => {\n        const bar = SugarElement.fromTag('div');\n        setAll(bar, {\n            position: 'absolute',\n            left: x - w / 2 + 'px',\n            top: y + 'px',\n            height: h + 'px',\n            width: w + 'px'\n        });\n        setAll$1(bar, { 'data-mce-bogus': 'all', 'data-column': column, 'role': 'presentation' });\n        return bar;\n    };\n    const row = (r, x, y, w, h) => {\n        const bar = SugarElement.fromTag('div');\n        setAll(bar, {\n            position: 'absolute',\n            left: x + 'px',\n            top: y - h / 2 + 'px',\n            height: h + 'px',\n            width: w + 'px'\n        });\n        setAll$1(bar, { 'data-mce-bogus': 'all', 'data-row': r, 'role': 'presentation' });\n        return bar;\n    };\n\n    const resizeBar = resolve('resizer-bar');\n    const resizeRowBar = resolve('resizer-rows');\n    const resizeColBar = resolve('resizer-cols');\n    const BAR_THICKNESS = 7;\n    const resizableRows = (warehouse, isResizable) => bind$2(warehouse.all, (row, i) => isResizable(row.element) ? [i] : []);\n    const resizableColumns = (warehouse, isResizable) => {\n        const resizableCols = [];\n        // Check col elements and see if they are resizable\n        range$1(warehouse.grid.columns, (index) => {\n            // With use of forall, index will be included if col doesn't exist meaning the column cells will be checked below\n            const colElmOpt = Warehouse.getColumnAt(warehouse, index).map((col) => col.element);\n            if (colElmOpt.forall(isResizable)) {\n                resizableCols.push(index);\n            }\n        });\n        // Check cells of the resizable columns and make sure they are resizable\n        return filter$2(resizableCols, (colIndex) => {\n            const columnCells = Warehouse.filterItems(warehouse, (cell) => cell.column === colIndex);\n            return forall(columnCells, (cell) => isResizable(cell.element));\n        });\n    };\n    const destroy = (wire) => {\n        const previous = descendants(wire.parent(), '.' + resizeBar);\n        each$2(previous, remove$5);\n    };\n    const drawBar = (wire, positions, create) => {\n        const origin = wire.origin();\n        each$2(positions, (cpOption) => {\n            cpOption.each((cp) => {\n                const bar = create(origin, cp);\n                add$1(bar, resizeBar);\n                append$1(wire.parent(), bar);\n            });\n        });\n    };\n    const refreshCol = (wire, colPositions, position, tableHeight) => {\n        drawBar(wire, colPositions, (origin, cp) => {\n            const colBar = col(cp.col, cp.x - origin.left, position.top - origin.top, BAR_THICKNESS, tableHeight);\n            add$1(colBar, resizeColBar);\n            return colBar;\n        });\n    };\n    const refreshRow = (wire, rowPositions, position, tableWidth) => {\n        drawBar(wire, rowPositions, (origin, cp) => {\n            const rowBar = row(cp.row, position.left - origin.left, cp.y - origin.top, tableWidth, BAR_THICKNESS);\n            add$1(rowBar, resizeRowBar);\n            return rowBar;\n        });\n    };\n    const refreshGrid = (warhouse, wire, table, rows, cols) => {\n        const position = absolute(table);\n        const isResizable = wire.isResizable;\n        const rowPositions = rows.length > 0 ? height.positions(rows, table) : [];\n        const resizableRowBars = rowPositions.length > 0 ? resizableRows(warhouse, isResizable) : [];\n        const resizableRowPositions = filter$2(rowPositions, (_pos, i) => exists(resizableRowBars, (barIndex) => i === barIndex));\n        refreshRow(wire, resizableRowPositions, position, getOuter(table));\n        const colPositions = cols.length > 0 ? width.positions(cols, table) : [];\n        const resizableColBars = colPositions.length > 0 ? resizableColumns(warhouse, isResizable) : [];\n        const resizableColPositions = filter$2(colPositions, (_pos, i) => exists(resizableColBars, (barIndex) => i === barIndex));\n        refreshCol(wire, resizableColPositions, position, getOuter$1(table));\n    };\n    const refresh = (wire, table) => {\n        destroy(wire);\n        if (wire.isResizable(table)) {\n            const warehouse = Warehouse.fromTable(table);\n            const rows$1 = rows(warehouse);\n            const cols = columns(warehouse);\n            refreshGrid(warehouse, wire, table, rows$1, cols);\n        }\n    };\n    const each = (wire, f) => {\n        const bars = descendants(wire.parent(), '.' + resizeBar);\n        each$2(bars, f);\n    };\n    const hide = (wire) => {\n        each(wire, (bar) => {\n            set$1(bar, 'display', 'none');\n        });\n    };\n    const show = (wire) => {\n        each(wire, (bar) => {\n            set$1(bar, 'display', 'block');\n        });\n    };\n    const isRowBar = (element) => {\n        return has(element, resizeRowBar);\n    };\n    const isColBar = (element) => {\n        return has(element, resizeColBar);\n    };\n\n    const resizeBarDragging = resolve('resizer-bar-dragging');\n    const BarManager = (wire) => {\n        const mutation = BarMutation();\n        const resizing = transform(mutation, {});\n        let hoverTable = Optional.none();\n        const getResizer = (element, type) => {\n            return Optional.from(get$b(element, type));\n        };\n        /* Reposition the bar as the user drags */\n        mutation.events.drag.bind((event) => {\n            getResizer(event.target, 'data-row').each((_dataRow) => {\n                const currentRow = getCssValue(event.target, 'top');\n                set$1(event.target, 'top', currentRow + event.yDelta + 'px');\n            });\n            getResizer(event.target, 'data-column').each((_dataCol) => {\n                const currentCol = getCssValue(event.target, 'left');\n                set$1(event.target, 'left', currentCol + event.xDelta + 'px');\n            });\n        });\n        const getDelta = (target, dir) => {\n            const newX = getCssValue(target, dir);\n            const oldX = getAttrValue(target, 'data-initial-' + dir, 0);\n            return newX - oldX;\n        };\n        /* Resize the column once the user releases the mouse */\n        resizing.events.stop.bind(() => {\n            mutation.get().each((target) => {\n                hoverTable.each((table) => {\n                    getResizer(target, 'data-row').each((row) => {\n                        const delta = getDelta(target, 'top');\n                        remove$6(target, 'data-initial-top');\n                        events.trigger.adjustHeight(table, delta, parseInt(row, 10));\n                    });\n                    getResizer(target, 'data-column').each((column) => {\n                        const delta = getDelta(target, 'left');\n                        remove$6(target, 'data-initial-left');\n                        events.trigger.adjustWidth(table, delta, parseInt(column, 10));\n                    });\n                    refresh(wire, table);\n                });\n            });\n        });\n        const handler = (target, dir) => {\n            events.trigger.startAdjust();\n            mutation.assign(target);\n            set$2(target, 'data-initial-' + dir, getCssValue(target, dir));\n            add$1(target, resizeBarDragging);\n            set$1(target, 'opacity', '0.2');\n            resizing.go(wire.dragContainer());\n        };\n        /* mousedown on resize bar: start dragging when the bar is clicked, storing the initial position. */\n        const mousedown = bind(wire.parent(), 'mousedown', (event) => {\n            if (isRowBar(event.target)) {\n                event.prevent();\n                event.stop();\n                handler(event.target, 'top');\n            }\n            if (isColBar(event.target)) {\n                event.prevent();\n                event.stop();\n                handler(event.target, 'left');\n            }\n        });\n        const isRoot = (e) => {\n            return eq$1(e, wire.view());\n        };\n        const findClosestEditableTable = (target) => closest$1(target, 'table', isRoot).filter(isEditable$1);\n        const isResizer = (target) => has(target, 'ephox-snooker-resizer-bar') || has(target, 'ephox-dragster-blocker');\n        /* mouseover on table: When the mouse moves within the CONTENT AREA (NOT THE TABLE), refresh the bars. */\n        const mouseover = bind(wire.view(), 'mouseover', (event) => {\n            findClosestEditableTable(event.target).fold(() => {\n                /*\n                * mouseout is not reliable within ContentEditable, so for all other mouseover events we clear bars.\n                * This is fairly safe to do frequently; it's a single querySelectorAll() on the content and Arr.map on the result.\n                * If we _really_ need to optimise it further, we can start caching the bar references in the wire somehow.\n                *\n                * Because the resizers were moved into the editor for inline mode, we need to check if the event target is not a resizer.\n                */\n                if (inBody(event.target) && !isResizer(event.target)) {\n                    destroy(wire);\n                }\n            }, (table) => {\n                if (resizing.isActive()) {\n                    hoverTable = Optional.some(table);\n                    refresh(wire, table);\n                }\n            });\n        });\n        const destroy$1 = () => {\n            mousedown.unbind();\n            mouseover.unbind();\n            resizing.destroy();\n            destroy(wire);\n        };\n        const refresh$1 = (tbl) => {\n            refresh(wire, tbl);\n        };\n        const events = create$3({\n            adjustHeight: Event(['table', 'delta', 'row']),\n            adjustWidth: Event(['table', 'delta', 'column']),\n            startAdjust: Event([])\n        });\n        return {\n            destroy: destroy$1,\n            refresh: refresh$1,\n            on: resizing.on,\n            off: resizing.off,\n            hideBars: curry(hide, wire),\n            showBars: curry(show, wire),\n            events: events.registry\n        };\n    };\n\n    const create$2 = (wire, resizing, lazySizing) => {\n        const hdirection = height;\n        const vdirection = width;\n        const manager = BarManager(wire);\n        const events = create$3({\n            beforeResize: Event(['table', 'type']),\n            afterResize: Event(['table', 'type']),\n            startDrag: Event([]),\n        });\n        manager.events.adjustHeight.bind((event) => {\n            const table = event.table;\n            events.trigger.beforeResize(table, 'row');\n            const delta = hdirection.delta(event.delta, table);\n            // TODO: Use the resizing behaviour for heights as well\n            adjustHeight(table, delta, event.row);\n            events.trigger.afterResize(table, 'row');\n        });\n        manager.events.startAdjust.bind((_event) => {\n            events.trigger.startDrag();\n        });\n        manager.events.adjustWidth.bind((event) => {\n            const table = event.table;\n            events.trigger.beforeResize(table, 'col');\n            const delta = vdirection.delta(event.delta, table);\n            const tableSize = lazySizing(table);\n            adjustWidth(table, delta, event.column, resizing, tableSize);\n            events.trigger.afterResize(table, 'col');\n        });\n        return {\n            on: manager.on,\n            off: manager.off,\n            refreshBars: manager.refresh,\n            hideBars: manager.hideBars,\n            showBars: manager.showBars,\n            destroy: manager.destroy,\n            events: events.registry\n        };\n    };\n    const TableResize = {\n        create: create$2\n    };\n\n    const option = (name) => (editor) => editor.options.get(name);\n    // Note: This is also contained in the table plugin Options.ts file\n    const defaultWidth = '100%';\n    const getPixelForcedWidth = (editor) => {\n        // Determine the inner size of the parent block element where the table will be inserted\n        const dom = editor.dom;\n        const parentBlock = dom.getParent(editor.selection.getStart(), dom.isBlock) ?? editor.getBody();\n        return getInner(SugarElement.fromDom(parentBlock)) + 'px';\n    };\n    // Note: This is also contained in the table plugin Options.ts file\n    const determineDefaultTableStyles = (editor, defaultStyles) => {\n        if (isTableResponsiveForced(editor) || !shouldStyleWithCss(editor)) {\n            return defaultStyles;\n        }\n        else if (isTablePixelsForced(editor)) {\n            return { ...defaultStyles, width: getPixelForcedWidth(editor) };\n        }\n        else {\n            return { ...defaultStyles, width: defaultWidth };\n        }\n    };\n    // Note: This is also contained in the table plugin Options.ts file\n    const determineDefaultTableAttributes = (editor, defaultAttributes) => {\n        if (isTableResponsiveForced(editor) || shouldStyleWithCss(editor)) {\n            return defaultAttributes;\n        }\n        else if (isTablePixelsForced(editor)) {\n            return { ...defaultAttributes, width: getPixelForcedWidth(editor) };\n        }\n        else {\n            return { ...defaultAttributes, width: defaultWidth };\n        }\n    };\n    const register = (editor) => {\n        const registerOption = editor.options.register;\n        registerOption('table_clone_elements', {\n            processor: 'string[]'\n        });\n        registerOption('table_use_colgroups', {\n            processor: 'boolean',\n            default: true\n        });\n        registerOption('table_header_type', {\n            processor: (value) => {\n                const valid = contains$2(['section', 'cells', 'sectionCells', 'auto'], value);\n                return valid ? { value, valid } : { valid: false, message: 'Must be one of: section, cells, sectionCells or auto.' };\n            },\n            default: 'section'\n        });\n        registerOption('table_sizing_mode', {\n            processor: 'string',\n            default: 'auto'\n        });\n        registerOption('table_default_attributes', {\n            processor: 'object',\n            default: {\n                border: '1'\n            }\n        });\n        registerOption('table_default_styles', {\n            processor: 'object',\n            default: {\n                'border-collapse': 'collapse',\n            }\n        });\n        registerOption('table_column_resizing', {\n            processor: (value) => {\n                const valid = contains$2(['preservetable', 'resizetable'], value);\n                return valid ? { value, valid } : { valid: false, message: 'Must be preservetable, or resizetable.' };\n            },\n            default: 'preservetable'\n        });\n        registerOption('table_resize_bars', {\n            processor: 'boolean',\n            default: true\n        });\n        registerOption('table_style_by_css', {\n            processor: 'boolean',\n            default: true\n        });\n        registerOption('table_merge_content_on_paste', {\n            processor: 'boolean',\n            default: true\n        });\n        registerOption('table_default_header_rows', {\n            processor: 'number',\n            default: 0\n        });\n        registerOption('table_default_header_cols', {\n            processor: 'number',\n            default: 0\n        });\n    };\n    const getTableCloneElements = (editor) => {\n        return Optional.from(editor.options.get('table_clone_elements'));\n    };\n    const hasTableObjectResizing = (editor) => {\n        const objectResizing = editor.options.get('object_resizing');\n        return contains$2(objectResizing.split(','), 'table');\n    };\n    const getTableHeaderType = option('table_header_type');\n    const getTableColumnResizingBehaviour = option('table_column_resizing');\n    const isPreserveTableColumnResizing = (editor) => getTableColumnResizingBehaviour(editor) === 'preservetable';\n    const isResizeTableColumnResizing = (editor) => getTableColumnResizingBehaviour(editor) === 'resizetable';\n    const getTableSizingMode = option('table_sizing_mode');\n    const isTablePercentagesForced = (editor) => getTableSizingMode(editor) === 'relative';\n    const isTablePixelsForced = (editor) => getTableSizingMode(editor) === 'fixed';\n    const isTableResponsiveForced = (editor) => getTableSizingMode(editor) === 'responsive';\n    const hasTableResizeBars = option('table_resize_bars');\n    const shouldStyleWithCss = option('table_style_by_css');\n    const shouldMergeContentOnPaste = option('table_merge_content_on_paste');\n    const defaultHeaderRows = option('table_default_header_rows');\n    const defaultHeaderCols = option('table_default_header_cols');\n    const getTableDefaultAttributes = (editor) => {\n        // Note: The we don't rely on the default here as we need to dynamically lookup the widths based on the current editor state\n        const options = editor.options;\n        const defaultAttributes = options.get('table_default_attributes');\n        return options.isSet('table_default_attributes') ? defaultAttributes : determineDefaultTableAttributes(editor, defaultAttributes);\n    };\n    const getTableDefaultStyles = (editor) => {\n        // Note: The we don't rely on the default here as we need to dynamically lookup the widths based on the current editor state\n        const options = editor.options;\n        const defaultStyles = options.get('table_default_styles');\n        return options.isSet('table_default_styles') ? defaultStyles : determineDefaultTableStyles(editor, defaultStyles);\n    };\n    const tableUseColumnGroup = option('table_use_colgroups');\n\n    /*\n     NOTE: This file is partially duplicated in the following locations:\n      - plugins/table/core/Utils.ts\n      - advtable\n     Make sure that if making changes to this file, the other files are updated as well\n     */\n    const getBody = (editor) => SugarElement.fromDom(editor.getBody());\n    const getIsRoot = (editor) => (element) => eq$1(element, getBody(editor));\n    const removeDataStyle = (table) => {\n        remove$6(table, 'data-mce-style');\n        const removeStyleAttribute = (element) => remove$6(element, 'data-mce-style');\n        each$2(cells$1(table), removeStyleAttribute);\n        each$2(columns$1(table), removeStyleAttribute);\n        each$2(rows$1(table), removeStyleAttribute);\n    };\n    const getSelectionStart = (editor) => SugarElement.fromDom(editor.selection.getStart());\n    const getPixelWidth = (elm) => elm.getBoundingClientRect().width;\n    const getPixelHeight = (elm) => elm.getBoundingClientRect().height;\n    const addPxSuffix = (size) => /^\\d+(\\.\\d+)?$/.test(size) ? size + 'px' : size;\n    const getRawValue = (prop) => (editor, elm) => {\n        const raw = editor.dom.getStyle(elm, prop) || editor.dom.getAttrib(elm, prop);\n        // If a value has no unit, assume it is a pixel value\n        return Optional.from(raw)\n            .filter(isNotEmpty)\n            .map(addPxSuffix);\n    };\n    const isPercentage$1 = (value) => /^(\\d+(\\.\\d+)?)%$/.test(value);\n    const isPixel = (value) => /^(\\d+(\\.\\d+)?)px$/.test(value);\n    const getRawWidth = getRawValue('width');\n    const getRawHeight = getRawValue('height');\n    const isInEditableContext$1 = (cell) => closest$2(cell, isTag('table')).exists(isEditable$1);\n\n    const lookupTable = (container) => {\n        return ancestor$1(container, 'table');\n    };\n    const identify = (start, finish, isRoot) => {\n        const getIsRoot = (rootTable) => {\n            return (element) => {\n                return (isRoot !== undefined && isRoot(element)) || eq$1(element, rootTable);\n            };\n        };\n        // Optimisation: If the cells are equal, it's a single cell array\n        if (eq$1(start, finish)) {\n            return Optional.some({\n                boxes: Optional.some([start]),\n                start,\n                finish\n            });\n        }\n        else {\n            return lookupTable(start).bind((startTable) => {\n                return lookupTable(finish).bind((finishTable) => {\n                    if (eq$1(startTable, finishTable)) { // Selecting from within the same table.\n                        return Optional.some({\n                            boxes: intercepts(startTable, start, finish),\n                            start,\n                            finish\n                        });\n                    }\n                    else if (contains(startTable, finishTable)) { // Selecting from the parent table to the nested table.\n                        const ancestorCells = ancestors$3(finish, 'td,th', getIsRoot(startTable));\n                        const finishCell = ancestorCells.length > 0 ? ancestorCells[ancestorCells.length - 1] : finish;\n                        return Optional.some({\n                            boxes: nestedIntercepts(startTable, start, startTable, finish, finishTable),\n                            start,\n                            finish: finishCell\n                        });\n                    }\n                    else if (contains(finishTable, startTable)) { // Selecting from the nested table to the parent table.\n                        const ancestorCells = ancestors$3(start, 'td,th', getIsRoot(finishTable));\n                        const startCell = ancestorCells.length > 0 ? ancestorCells[ancestorCells.length - 1] : start;\n                        return Optional.some({\n                            boxes: nestedIntercepts(finishTable, start, startTable, finish, finishTable),\n                            start,\n                            finish: startCell\n                        });\n                    }\n                    else { // Selecting from a nested table to a different nested table.\n                        return ancestors(start, finish).shared.bind((lca) => {\n                            return closest$1(lca, 'table', isRoot).bind((lcaTable) => {\n                                const finishAncestorCells = ancestors$3(finish, 'td,th', getIsRoot(lcaTable));\n                                const finishCell = finishAncestorCells.length > 0 ? finishAncestorCells[finishAncestorCells.length - 1] : finish;\n                                const startAncestorCells = ancestors$3(start, 'td,th', getIsRoot(lcaTable));\n                                const startCell = startAncestorCells.length > 0 ? startAncestorCells[startAncestorCells.length - 1] : start;\n                                return Optional.some({\n                                    boxes: nestedIntercepts(lcaTable, start, startTable, finish, finishTable),\n                                    start: startCell,\n                                    finish: finishCell\n                                });\n                            });\n                        });\n                    }\n                });\n            });\n        }\n    };\n    const retrieve$1 = (container, selector) => {\n        const sels = descendants(container, selector);\n        return sels.length > 0 ? Optional.some(sels) : Optional.none();\n    };\n    const getLast = (boxes, lastSelectedSelector) => {\n        return find$1(boxes, (box) => {\n            return is$1(box, lastSelectedSelector);\n        });\n    };\n    const getEdges = (container, firstSelectedSelector, lastSelectedSelector) => {\n        return descendant(container, firstSelectedSelector).bind((first) => {\n            return descendant(container, lastSelectedSelector).bind((last) => {\n                return sharedOne(lookupTable, [first, last]).map((table) => {\n                    return {\n                        first,\n                        last,\n                        table\n                    };\n                });\n            });\n        });\n    };\n    const expandTo = (finish, firstSelectedSelector) => {\n        return ancestor$1(finish, 'table').bind((table) => {\n            return descendant(table, firstSelectedSelector).bind((start) => {\n                return identify(start, finish).bind((identified) => {\n                    return identified.boxes.map((boxes) => {\n                        return {\n                            boxes,\n                            start: identified.start,\n                            finish: identified.finish\n                        };\n                    });\n                });\n            });\n        });\n    };\n    const shiftSelection = (boxes, deltaRow, deltaColumn, firstSelectedSelector, lastSelectedSelector) => {\n        return getLast(boxes, lastSelectedSelector).bind((last) => {\n            return moveBy(last, deltaRow, deltaColumn).bind((finish) => {\n                return expandTo(finish, firstSelectedSelector);\n            });\n        });\n    };\n\n    // Explicitly calling CellSelection.retrieve so that we can see the API signature.\n    const retrieve = (container, selector) => {\n        return retrieve$1(container, selector);\n    };\n    const retrieveBox = (container, firstSelectedSelector, lastSelectedSelector) => {\n        return getEdges(container, firstSelectedSelector, lastSelectedSelector).bind((edges) => {\n            const isRoot = (ancestor) => {\n                return eq$1(container, ancestor);\n            };\n            const sectionSelector = 'thead,tfoot,tbody,table';\n            const firstAncestor = ancestor$1(edges.first, sectionSelector, isRoot);\n            const lastAncestor = ancestor$1(edges.last, sectionSelector, isRoot);\n            return firstAncestor.bind((fA) => {\n                return lastAncestor.bind((lA) => {\n                    return eq$1(fA, lA) ? getBox(edges.table, edges.first, edges.last) : Optional.none();\n                });\n            });\n        });\n    };\n\n    const selection = identity;\n    const unmergable = (selectedCells) => {\n        const hasSpan = (elem, type) => getOpt(elem, type).exists((span) => parseInt(span, 10) > 1);\n        const hasRowOrColSpan = (elem) => hasSpan(elem, 'rowspan') || hasSpan(elem, 'colspan');\n        return selectedCells.length > 0 && forall(selectedCells, hasRowOrColSpan) ? Optional.some(selectedCells) : Optional.none();\n    };\n    const mergable = (table, selectedCells, ephemera) => {\n        if (selectedCells.length <= 1) {\n            return Optional.none();\n        }\n        else {\n            return retrieveBox(table, ephemera.firstSelectedSelector, ephemera.lastSelectedSelector)\n                .map((bounds) => ({ bounds, cells: selectedCells }));\n        }\n    };\n\n    const create$1 = (selection, kill) => ({\n        selection,\n        kill\n    });\n    const Response = {\n        create: create$1\n    };\n\n    const fold = (subject, onNone, onMultiple, onSingle) => {\n        switch (subject.tag) {\n            case \"none\" /* SelectionTypeTag.None */:\n                return onNone();\n            case \"single\" /* SelectionTypeTag.Single */:\n                return onSingle(subject.element);\n            case \"multiple\" /* SelectionTypeTag.Multiple */:\n                return onMultiple(subject.elements);\n        }\n    };\n    const none = () => ({ tag: \"none\" /* SelectionTypeTag.None */ });\n    const multiple = (elements) => ({ tag: \"multiple\" /* SelectionTypeTag.Multiple */, elements });\n    const single = (element) => ({ tag: \"single\" /* SelectionTypeTag.Single */, element });\n\n    const Selections = (lazyRoot, getStart, selectedSelector) => {\n        const get = () => retrieve(lazyRoot(), selectedSelector).fold(() => getStart().fold(none, single), multiple);\n        return {\n            get\n        };\n    };\n\n    const create = (start, soffset, finish, foffset) => {\n        return {\n            start: Situ.on(start, soffset),\n            finish: Situ.on(finish, foffset)\n        };\n    };\n    const Situs = {\n        create\n    };\n\n    const convertToRange = (win, selection) => {\n        // TODO: Use API packages of sugar\n        const rng = asLtrRange(win, selection);\n        return SimRange.create(SugarElement.fromDom(rng.startContainer), rng.startOffset, SugarElement.fromDom(rng.endContainer), rng.endOffset);\n    };\n    const makeSitus = Situs.create;\n\n    // Based on a start and finish, select the appropriate box of cells\n    const sync = (container, isRoot, start, soffset, finish, foffset, selectRange) => {\n        if (!(eq$1(start, finish) && soffset === foffset)) {\n            return closest$1(start, 'td,th', isRoot).bind((s) => {\n                return closest$1(finish, 'td,th', isRoot).bind((f) => {\n                    return detect(container, isRoot, s, f, selectRange);\n                });\n            });\n        }\n        else {\n            return Optional.none();\n        }\n    };\n    // If the cells are different, and there is a rectangle to connect them, select the cells.\n    const detect = (container, isRoot, start, finish, selectRange) => {\n        if (!eq$1(start, finish)) {\n            return identify(start, finish, isRoot).bind((cellSel) => {\n                const boxes = cellSel.boxes.getOr([]);\n                if (boxes.length > 1) {\n                    selectRange(container, boxes, cellSel.start, cellSel.finish);\n                    return Optional.some(Response.create(Optional.some(makeSitus(start, 0, start, getEnd(start))), true));\n                }\n                else {\n                    return Optional.none();\n                }\n            });\n        }\n        else {\n            return Optional.none();\n        }\n    };\n    const update = (rows, columns, container, selected, annotations) => {\n        const updateSelection = (newSels) => {\n            annotations.clearBeforeUpdate(container);\n            annotations.selectRange(container, newSels.boxes, newSels.start, newSels.finish);\n            return newSels.boxes;\n        };\n        return shiftSelection(selected, rows, columns, annotations.firstSelectedSelector, annotations.lastSelectedSelector).map(updateSelection);\n    };\n\n    const adt$1 = Adt.generate([\n        { none: ['message'] },\n        { success: [] },\n        { failedUp: ['cell'] },\n        { failedDown: ['cell'] }\n    ]);\n    // Let's get some bounding rects, and see if they overlap (x-wise)\n    const isOverlapping = (bridge, before, after) => {\n        const beforeBounds = bridge.getRect(before);\n        const afterBounds = bridge.getRect(after);\n        return afterBounds.right > beforeBounds.left && afterBounds.left < beforeBounds.right;\n    };\n    const isRow = (elem) => {\n        return closest$1(elem, 'tr');\n    };\n    const verify = (bridge, before, beforeOffset, after, afterOffset, failure, isRoot) => {\n        // Identify the cells that the before and after are in.\n        return closest$1(after, 'td,th', isRoot).bind((afterCell) => {\n            return closest$1(before, 'td,th', isRoot).map((beforeCell) => {\n                // If they are not in the same cell\n                if (!eq$1(afterCell, beforeCell)) {\n                    return sharedOne(isRow, [afterCell, beforeCell]).fold(() => {\n                        // No shared row, and they overlap x-wise -> success, otherwise: failed\n                        return isOverlapping(bridge, beforeCell, afterCell) ? adt$1.success() : failure(beforeCell);\n                    }, (_sharedRow) => {\n                        // In the same row, so it failed.\n                        return failure(beforeCell);\n                    });\n                }\n                else {\n                    return eq$1(after, afterCell) && getEnd(afterCell) === afterOffset ? failure(beforeCell) : adt$1.none('in same cell');\n                }\n            });\n        }).getOr(adt$1.none('default'));\n    };\n    const cata = (subject, onNone, onSuccess, onFailedUp, onFailedDown) => {\n        return subject.fold(onNone, onSuccess, onFailedUp, onFailedDown);\n    };\n    const BeforeAfter = {\n        ...adt$1,\n        verify,\n        cata\n    };\n\n    const isBr = isTag('br');\n    const gatherer = (cand, gather, isRoot) => {\n        return gather(cand, isRoot).bind((target) => {\n            return isText(target) && get$5(target).trim().length === 0 ? gatherer(target, gather, isRoot) : Optional.some(target);\n        });\n    };\n    const handleBr = (isRoot, element, direction) => {\n        // 1. Has a neighbouring sibling ... position relative to neighbouring element\n        // 2. Has no neighbouring sibling ... position relative to gathered element\n        return direction.traverse(element).orThunk(() => {\n            return gatherer(element, direction.gather, isRoot);\n        }).map(direction.relative);\n    };\n    const findBr = (element, offset) => {\n        return child$2(element, offset).filter(isBr).orThunk(() => {\n            // Can be either side of the br, and still be a br.\n            return child$2(element, offset - 1).filter(isBr);\n        });\n    };\n    const handleParent = (isRoot, element, offset, direction) => {\n        // 1. Has no neighbouring sibling, position relative to gathered element\n        // 2. Has a neighbouring sibling, position at the neighbouring sibling with respect to parent\n        return findBr(element, offset).bind((br) => {\n            return direction.traverse(br).fold(() => {\n                return gatherer(br, direction.gather, isRoot).map(direction.relative);\n            }, (adjacent) => {\n                return indexInParent(adjacent).map((info) => {\n                    return Situ.on(info.parent, info.index);\n                });\n            });\n        });\n    };\n    const tryBr = (isRoot, element, offset, direction) => {\n        // Three different situations\n        // 1. the br is the child, and it has a previous sibling. Use parent, index-1)\n        // 2. the br is the child and it has no previous sibling, set to before the previous gather result\n        // 3. the br is the element and it has a previous sibling, use parent index-1)\n        // 4. the br is the element and it has no previous sibling, set to before the previous gather result.\n        // 2. the element is the br itself,\n        const target = isBr(element) ? handleBr(isRoot, element, direction) : handleParent(isRoot, element, offset, direction);\n        return target.map((tgt) => {\n            return {\n                start: tgt,\n                finish: tgt\n            };\n        });\n    };\n    const process = (analysis) => {\n        return BeforeAfter.cata(analysis, (_message) => {\n            return Optional.none();\n        }, () => {\n            return Optional.none();\n        }, (cell) => {\n            return Optional.some(point(cell, 0));\n        }, (cell) => {\n            return Optional.some(point(cell, getEnd(cell)));\n        });\n    };\n\n    const moveDown = (caret, amount) => {\n        return {\n            left: caret.left,\n            top: caret.top + amount,\n            right: caret.right,\n            bottom: caret.bottom + amount\n        };\n    };\n    const moveUp = (caret, amount) => {\n        return {\n            left: caret.left,\n            top: caret.top - amount,\n            right: caret.right,\n            bottom: caret.bottom - amount\n        };\n    };\n    const translate = (caret, xDelta, yDelta) => {\n        return {\n            left: caret.left + xDelta,\n            top: caret.top + yDelta,\n            right: caret.right + xDelta,\n            bottom: caret.bottom + yDelta\n        };\n    };\n    const getTop = (caret) => {\n        return caret.top;\n    };\n    const getBottom = (caret) => {\n        return caret.bottom;\n    };\n\n    const getPartialBox = (bridge, element, offset) => {\n        if (offset >= 0 && offset < getEnd(element)) {\n            return bridge.getRangedRect(element, offset, element, offset + 1);\n        }\n        else if (offset > 0) {\n            return bridge.getRangedRect(element, offset - 1, element, offset);\n        }\n        return Optional.none();\n    };\n    const toCaret = (rect) => ({\n        left: rect.left,\n        top: rect.top,\n        right: rect.right,\n        bottom: rect.bottom\n    });\n    const getElemBox = (bridge, element) => {\n        return Optional.some(bridge.getRect(element));\n    };\n    const getBoxAt = (bridge, element, offset) => {\n        // Note, we might need to consider this offset and descend.\n        if (isElement(element)) {\n            return getElemBox(bridge, element).map(toCaret);\n        }\n        else if (isText(element)) {\n            return getPartialBox(bridge, element, offset).map(toCaret);\n        }\n        else {\n            return Optional.none();\n        }\n    };\n    const getEntireBox = (bridge, element) => {\n        if (isElement(element)) {\n            return getElemBox(bridge, element).map(toCaret);\n        }\n        else if (isText(element)) {\n            return bridge.getRangedRect(element, 0, element, getEnd(element)).map(toCaret);\n        }\n        else {\n            return Optional.none();\n        }\n    };\n\n    const JUMP_SIZE = 5;\n    const NUM_RETRIES = 100;\n    const adt = Adt.generate([\n        { none: [] },\n        { retry: ['caret'] }\n    ]);\n    const isOutside = (caret, box) => {\n        return caret.left < box.left || Math.abs(box.right - caret.left) < 1 || caret.left > box.right;\n    };\n    // Find the block and determine whether or not that block is outside. If it is outside, move up/down and right.\n    const inOutsideBlock = (bridge, element, caret) => {\n        return closest$2(element, isBlock).fold(never, (cell) => {\n            return getEntireBox(bridge, cell).exists((box) => {\n                return isOutside(caret, box);\n            });\n        });\n    };\n    /*\n     * The approach is as follows.\n     *\n     * The browser APIs for caret ranges return elements that are the closest text elements to your (x, y) position, even if those\n     * closest elements are miles away. This causes problems when you are trying to identify what is immediately above or below\n     * a cell, because often the closest text is in a cell that is in a completely different column. Therefore, the approach needs\n     * to keep moving down until the thing that we are hitting is likely to be a true positive.\n     *\n     * Steps:\n     *\n     * 1. If the y position of the next guess is not different from the original, keep going.\n     * 2a. If the guess box doesn't actually include the position looked for, then the browser has returned a node that does not have\n     *    a rectangle which truly intercepts the point. So, keep going. Note, we used to jump straight away here, but that means that\n     *    we might skip over something that wasn't considered close enough but was a better guess than just making the y value skip.\n     * 2b. If the guess box exactly aligns with the caret, then adjust by 1 and go again. This is to get a more accurate offset.\n     * 3. if the guess box does include the caret, but the guess box's parent cell does not *really* contain the caret, try again shifting\n     *    only the x value. If the guess box's parent cell does *really* contain the caret (i.e. it is horizontally-aligned), then stop\n     *    because the guess is GOOD.\n     */\n    const adjustDown = (bridge, element, guessBox, original, caret) => {\n        const lowerCaret = moveDown(caret, JUMP_SIZE);\n        if (Math.abs(guessBox.bottom - original.bottom) < 1) {\n            return adt.retry(lowerCaret);\n        }\n        else if (guessBox.top > caret.bottom) {\n            return adt.retry(lowerCaret);\n        }\n        else if (guessBox.top === caret.bottom) {\n            return adt.retry(moveDown(caret, 1));\n        }\n        else {\n            return inOutsideBlock(bridge, element, caret) ? adt.retry(translate(lowerCaret, JUMP_SIZE, 0)) : adt.none();\n        }\n    };\n    const adjustUp = (bridge, element, guessBox, original, caret) => {\n        const higherCaret = moveUp(caret, JUMP_SIZE);\n        if (Math.abs(guessBox.top - original.top) < 1) {\n            return adt.retry(higherCaret);\n        }\n        else if (guessBox.bottom < caret.top) {\n            return adt.retry(higherCaret);\n        }\n        else if (guessBox.bottom === caret.top) {\n            return adt.retry(moveUp(caret, 1));\n        }\n        else {\n            return inOutsideBlock(bridge, element, caret) ? adt.retry(translate(higherCaret, JUMP_SIZE, 0)) : adt.none();\n        }\n    };\n    const upMovement = {\n        point: getTop,\n        adjuster: adjustUp,\n        move: moveUp,\n        gather: before\n    };\n    const downMovement = {\n        point: getBottom,\n        adjuster: adjustDown,\n        move: moveDown,\n        gather: after\n    };\n    const isAtTable = (bridge, x, y) => {\n        return bridge.elementFromPoint(x, y).filter((elm) => {\n            return name(elm) === 'table';\n        }).isSome();\n    };\n    const adjustForTable = (bridge, movement, original, caret, numRetries) => {\n        return adjustTil(bridge, movement, original, movement.move(caret, JUMP_SIZE), numRetries);\n    };\n    const adjustTil = (bridge, movement, original, caret, numRetries) => {\n        if (numRetries === 0) {\n            return Optional.some(caret);\n        }\n        if (isAtTable(bridge, caret.left, movement.point(caret))) {\n            return adjustForTable(bridge, movement, original, caret, numRetries - 1);\n        }\n        return bridge.situsFromPoint(caret.left, movement.point(caret)).bind((guess) => {\n            return guess.start.fold(Optional.none, (element) => {\n                return getEntireBox(bridge, element).bind((guessBox) => {\n                    return movement.adjuster(bridge, element, guessBox, original, caret).fold(Optional.none, (newCaret) => {\n                        return adjustTil(bridge, movement, original, newCaret, numRetries - 1);\n                    });\n                }).orThunk(() => {\n                    return Optional.some(caret);\n                });\n            }, Optional.none);\n        });\n    };\n    const checkScroll = (movement, adjusted, bridge) => {\n        // I'm not convinced that this is right. Let's re-examine it later.\n        if (movement.point(adjusted) > bridge.getInnerHeight()) {\n            return Optional.some(movement.point(adjusted) - bridge.getInnerHeight());\n        }\n        else if (movement.point(adjusted) < 0) {\n            return Optional.some(-movement.point(adjusted));\n        }\n        else {\n            return Optional.none();\n        }\n    };\n    const retry = (movement, bridge, caret) => {\n        const moved = movement.move(caret, JUMP_SIZE);\n        const adjusted = adjustTil(bridge, movement, caret, moved, NUM_RETRIES).getOr(moved);\n        return checkScroll(movement, adjusted, bridge).fold(() => {\n            return bridge.situsFromPoint(adjusted.left, movement.point(adjusted));\n        }, (delta) => {\n            bridge.scrollBy(0, delta);\n            return bridge.situsFromPoint(adjusted.left, movement.point(adjusted) - delta);\n        });\n    };\n    const Retries = {\n        tryUp: curry(retry, upMovement),\n        tryDown: curry(retry, downMovement),\n        getJumpSize: constant(JUMP_SIZE)\n    };\n\n    const MAX_RETRIES = 20;\n    const findSpot = (bridge, isRoot, direction) => {\n        return bridge.getSelection().bind((sel) => {\n            return tryBr(isRoot, sel.finish, sel.foffset, direction).fold(() => {\n                return Optional.some(point(sel.finish, sel.foffset));\n            }, (brNeighbour) => {\n                const range = bridge.fromSitus(brNeighbour);\n                const analysis = BeforeAfter.verify(bridge, sel.finish, sel.foffset, range.finish, range.foffset, direction.failure, isRoot);\n                return process(analysis);\n            });\n        });\n    };\n    const scan = (bridge, isRoot, element, offset, direction, numRetries) => {\n        if (numRetries === 0) {\n            return Optional.none();\n        }\n        // Firstly, move the (x, y) and see what element we end up on.\n        return tryCursor(bridge, isRoot, element, offset, direction).bind((situs) => {\n            const range = bridge.fromSitus(situs);\n            // Now, check to see if the element is a new cell.\n            const analysis = BeforeAfter.verify(bridge, element, offset, range.finish, range.foffset, direction.failure, isRoot);\n            return BeforeAfter.cata(analysis, () => {\n                return Optional.none();\n            }, () => {\n                // We have a new cell, so we stop looking.\n                return Optional.some(situs);\n            }, (cell) => {\n                if (eq$1(element, cell) && offset === 0) {\n                    return tryAgain(bridge, element, offset, moveUp, direction);\n                }\n                else { // We need to look again from the start of our current cell\n                    return scan(bridge, isRoot, cell, 0, direction, numRetries - 1);\n                }\n            }, (cell) => {\n                // If we were here last time, move and try again.\n                if (eq$1(element, cell) && offset === getEnd(cell)) {\n                    return tryAgain(bridge, element, offset, moveDown, direction);\n                }\n                else { // We need to look again from the end of our current cell\n                    return scan(bridge, isRoot, cell, getEnd(cell), direction, numRetries - 1);\n                }\n            });\n        });\n    };\n    const tryAgain = (bridge, element, offset, move, direction) => {\n        return getBoxAt(bridge, element, offset).bind((box) => {\n            return tryAt(bridge, direction, move(box, Retries.getJumpSize()));\n        });\n    };\n    const tryAt = (bridge, direction, box) => {\n        const browser = detect$2().browser;\n        // NOTE: As we attempt to take over selection everywhere, we'll probably need to separate these again.\n        if (browser.isChromium() || browser.isSafari() || browser.isFirefox()) {\n            return direction.retry(bridge, box);\n        }\n        else {\n            return Optional.none();\n        }\n    };\n    const tryCursor = (bridge, isRoot, element, offset, direction) => {\n        return getBoxAt(bridge, element, offset).bind((box) => {\n            return tryAt(bridge, direction, box);\n        });\n    };\n    const handle = (bridge, isRoot, direction) => {\n        return findSpot(bridge, isRoot, direction).bind((spot) => {\n            // There is a point to start doing box-hitting from\n            return scan(bridge, isRoot, spot.element, spot.offset, direction, MAX_RETRIES).map(bridge.fromSitus);\n        });\n    };\n\n    const inSameTable = (elem, table) => {\n        return ancestor(elem, (e) => {\n            return parent(e).exists((p) => {\n                return eq$1(p, table);\n            });\n        });\n    };\n    // Note: initial is the finishing element, because that's where the cursor starts from\n    // Anchor is the starting element, and is only used to work out if we are in the same table\n    const simulate = (bridge, isRoot, direction, initial, anchor) => {\n        return closest$1(initial, 'td,th', isRoot).bind((start) => {\n            return closest$1(start, 'table', isRoot).bind((table) => {\n                if (!inSameTable(anchor, table)) {\n                    return Optional.none();\n                }\n                return handle(bridge, isRoot, direction).bind((range) => {\n                    return closest$1(range.finish, 'td,th', isRoot).map((finish) => {\n                        return {\n                            start,\n                            finish,\n                            range\n                        };\n                    });\n                });\n            });\n        });\n    };\n    const navigate = (bridge, isRoot, direction, initial, anchor, precheck) => {\n        return precheck(initial, isRoot).orThunk(() => {\n            return simulate(bridge, isRoot, direction, initial, anchor).map((info) => {\n                const range = info.range;\n                return Response.create(Optional.some(makeSitus(range.start, range.soffset, range.finish, range.foffset)), true);\n            });\n        });\n    };\n    const firstUpCheck = (initial, isRoot) => {\n        return closest$1(initial, 'tr', isRoot).bind((startRow) => {\n            return closest$1(startRow, 'table', isRoot).bind((table) => {\n                const rows = descendants(table, 'tr');\n                if (eq$1(startRow, rows[0])) {\n                    return seekLeft(table, (element) => {\n                        return last(element).isSome();\n                    }, isRoot).map((last) => {\n                        const lastOffset = getEnd(last);\n                        return Response.create(Optional.some(makeSitus(last, lastOffset, last, lastOffset)), true);\n                    });\n                }\n                else {\n                    return Optional.none();\n                }\n            });\n        });\n    };\n    const lastDownCheck = (initial, isRoot) => {\n        return closest$1(initial, 'tr', isRoot).bind((startRow) => {\n            return closest$1(startRow, 'table', isRoot).bind((table) => {\n                const rows = descendants(table, 'tr');\n                if (eq$1(startRow, rows[rows.length - 1])) {\n                    return seekRight(table, (element) => {\n                        return first(element).isSome();\n                    }, isRoot).map((first) => {\n                        return Response.create(Optional.some(makeSitus(first, 0, first, 0)), true);\n                    });\n                }\n                else {\n                    return Optional.none();\n                }\n            });\n        });\n    };\n    const select = (bridge, container, isRoot, direction, initial, anchor, selectRange) => {\n        return simulate(bridge, isRoot, direction, initial, anchor).bind((info) => {\n            return detect(container, isRoot, info.start, info.finish, selectRange);\n        });\n    };\n\n    const findCell = (target, isRoot) => closest$1(target, 'td,th', isRoot);\n    const isInEditableContext = (cell) => parentElement(cell).exists(isEditable$1);\n    const MouseSelection = (bridge, container, isRoot, annotations) => {\n        const cursor = value();\n        const clearstate = cursor.clear;\n        const applySelection = (event) => {\n            cursor.on((start) => {\n                annotations.clearBeforeUpdate(container);\n                findCell(event.target, isRoot).each((finish) => {\n                    identify(start, finish, isRoot).each((cellSel) => {\n                        const boxes = cellSel.boxes.getOr([]);\n                        if (boxes.length === 1) {\n                            // If a single noneditable cell is selected and the actual selection target within the cell\n                            // is also noneditable, make sure it is annotated\n                            const singleCell = boxes[0];\n                            const isNonEditableCell = getRaw$1(singleCell) === 'false';\n                            const isCellClosestContentEditable = is$2(closest(event.target), singleCell, eq$1);\n                            if (isNonEditableCell && isCellClosestContentEditable) {\n                                // Not selecting the contents or the node of the actual cell as shown below, keeping the selection on the offscreen element.\n                                annotations.selectRange(container, boxes, singleCell, singleCell);\n                            }\n                        }\n                        else if (boxes.length > 1) {\n                            // Wait until we have more than one, otherwise you can't do text selection inside a cell.\n                            annotations.selectRange(container, boxes, cellSel.start, cellSel.finish);\n                            // stop the browser from creating a big text selection, select the cell where the cursor is\n                            bridge.selectContents(finish);\n                        }\n                    });\n                });\n            });\n        };\n        /* Keep this as lightweight as possible when we're not in a table selection, it runs constantly */\n        const mousedown = (event) => {\n            annotations.clear(container);\n            findCell(event.target, isRoot).filter(isInEditableContext).each(cursor.set);\n        };\n        /* Keep this as lightweight as possible when we're not in a table selection, it runs constantly */\n        const mouseover = (event) => {\n            applySelection(event);\n        };\n        /* Keep this as lightweight as possible when we're not in a table selection, it runs constantly */\n        const mouseup = (event) => {\n            // Needed as Firefox will change the selection between the mouseover and mouseup when selecting\n            // just 2 cells as Firefox supports multiple selection ranges\n            applySelection(event);\n            clearstate();\n        };\n        return {\n            clearstate,\n            mousedown,\n            mouseover,\n            mouseup\n        };\n    };\n\n    const down = {\n        traverse: nextSibling,\n        gather: after,\n        relative: Situ.before,\n        retry: Retries.tryDown,\n        failure: BeforeAfter.failedDown\n    };\n    const up = {\n        traverse: prevSibling,\n        gather: before,\n        relative: Situ.before,\n        retry: Retries.tryUp,\n        failure: BeforeAfter.failedUp\n    };\n\n    const isKey = (key) => {\n        return (keycode) => {\n            return keycode === key;\n        };\n    };\n    const isUp = isKey(38);\n    const isDown = isKey(40);\n    const isNavigation = (keycode) => {\n        return keycode >= 37 && keycode <= 40;\n    };\n    const ltr = {\n        // We need to move KEYS out of keytar and into something much more low-level.\n        isBackward: isKey(37),\n        isForward: isKey(39)\n    };\n    const rtl = {\n        isBackward: isKey(39),\n        isForward: isKey(37)\n    };\n\n    const WindowBridge = (win) => {\n        const elementFromPoint = (x, y) => {\n            return SugarElement.fromPoint(SugarElement.fromDom(win.document), x, y);\n        };\n        const getRect = (element) => {\n            return element.dom.getBoundingClientRect();\n        };\n        const getRangedRect = (start, soffset, finish, foffset) => {\n            const sel = SimSelection.exact(start, soffset, finish, foffset);\n            return getFirstRect(win, sel);\n        };\n        const getSelection = () => {\n            return get$3(win).map((exactAdt) => {\n                return convertToRange(win, exactAdt);\n            });\n        };\n        const fromSitus = (situs) => {\n            const relative = SimSelection.relative(situs.start, situs.finish);\n            return convertToRange(win, relative);\n        };\n        const situsFromPoint = (x, y) => {\n            return getAtPoint(win, x, y).map((exact) => {\n                return Situs.create(exact.start, exact.soffset, exact.finish, exact.foffset);\n            });\n        };\n        const clearSelection = () => {\n            clear(win);\n        };\n        const collapseSelection = (toStart = false) => {\n            get$3(win).each((sel) => sel.fold((rng) => rng.collapse(toStart), (startSitu, finishSitu) => {\n                const situ = toStart ? startSitu : finishSitu;\n                setRelative(win, situ, situ);\n            }, (start, soffset, finish, foffset) => {\n                const node = toStart ? start : finish;\n                const offset = toStart ? soffset : foffset;\n                setExact(win, node, offset, node, offset);\n            }));\n        };\n        const selectNode = (element) => {\n            setToElement(win, element, false);\n        };\n        const selectContents = (element) => {\n            setToElement(win, element);\n        };\n        const setSelection = (sel) => {\n            setExact(win, sel.start, sel.soffset, sel.finish, sel.foffset);\n        };\n        const setRelativeSelection = (start, finish) => {\n            setRelative(win, start, finish);\n        };\n        const getInnerHeight = () => {\n            return win.innerHeight;\n        };\n        const getScrollY = () => {\n            const pos = get$6(SugarElement.fromDom(win.document));\n            return pos.top;\n        };\n        const scrollBy = (x, y) => {\n            by(x, y, SugarElement.fromDom(win.document));\n        };\n        return {\n            elementFromPoint,\n            getRect,\n            getRangedRect,\n            getSelection,\n            fromSitus,\n            situsFromPoint,\n            clearSelection,\n            collapseSelection,\n            setSelection,\n            setRelativeSelection,\n            selectNode,\n            selectContents,\n            getInnerHeight,\n            getScrollY,\n            scrollBy\n        };\n    };\n\n    const rc = (rows, cols) => ({ rows, cols });\n    const mouse = (win, container, isRoot, annotations) => {\n        const bridge = WindowBridge(win);\n        const handlers = MouseSelection(bridge, container, isRoot, annotations);\n        return {\n            clearstate: handlers.clearstate,\n            mousedown: handlers.mousedown,\n            mouseover: handlers.mouseover,\n            mouseup: handlers.mouseup\n        };\n    };\n    const isEditableNode = (node) => closest$2(node, isHTMLElement).exists(isEditable$1);\n    const isEditableSelection = (start, finish) => isEditableNode(start) || isEditableNode(finish);\n    const keyboard = (win, container, isRoot, annotations) => {\n        const bridge = WindowBridge(win);\n        const clearToNavigate = () => {\n            annotations.clear(container);\n            return Optional.none();\n        };\n        const keydown = (event, start, soffset, finish, foffset, direction) => {\n            const realEvent = event.raw;\n            const keycode = realEvent.which;\n            const shiftKey = realEvent.shiftKey === true;\n            const handler = retrieve$1(container, annotations.selectedSelector).fold(() => {\n                // Make sure any possible lingering annotations are cleared\n                if (isNavigation(keycode) && !shiftKey) {\n                    annotations.clearBeforeUpdate(container);\n                }\n                // Shift down should predict the movement and set the selection.\n                if (isNavigation(keycode) && shiftKey && !isEditableSelection(start, finish)) {\n                    return Optional.none;\n                }\n                else if (isDown(keycode) && shiftKey) {\n                    return curry(select, bridge, container, isRoot, down, finish, start, annotations.selectRange);\n                }\n                else if (isUp(keycode) && shiftKey) { // Shift up should predict the movement and set the selection.\n                    return curry(select, bridge, container, isRoot, up, finish, start, annotations.selectRange);\n                }\n                else if (isDown(keycode)) { // Down should predict the movement and set the cursor\n                    return curry(navigate, bridge, isRoot, down, finish, start, lastDownCheck);\n                }\n                else if (isUp(keycode)) { // Up should predict the movement and set the cursor\n                    return curry(navigate, bridge, isRoot, up, finish, start, firstUpCheck);\n                }\n                else {\n                    return Optional.none;\n                }\n            }, (selected) => {\n                const update$1 = (attempts) => {\n                    return () => {\n                        const navigation = findMap(attempts, (delta) => {\n                            return update(delta.rows, delta.cols, container, selected, annotations);\n                        });\n                        // Shift the selected rows and update the selection.\n                        return navigation.fold(() => {\n                            // The cell selection went outside the table, so clear it and bridge from the first box to before/after\n                            // the table\n                            return getEdges(container, annotations.firstSelectedSelector, annotations.lastSelectedSelector).map((edges) => {\n                                const relative = isDown(keycode) || direction.isForward(keycode) ? Situ.after : Situ.before;\n                                bridge.setRelativeSelection(Situ.on(edges.first, 0), relative(edges.table));\n                                annotations.clear(container);\n                                return Response.create(Optional.none(), true);\n                            });\n                        }, (_) => {\n                            return Optional.some(Response.create(Optional.none(), true));\n                        });\n                    };\n                };\n                if (isNavigation(keycode) && shiftKey && !isEditableSelection(start, finish)) {\n                    return Optional.none;\n                }\n                else if (isDown(keycode) && shiftKey) {\n                    return update$1([rc(+1, 0)]);\n                }\n                else if (isUp(keycode) && shiftKey) {\n                    return update$1([rc(-1, 0)]);\n                }\n                else if (direction.isBackward(keycode) && shiftKey) { // Left and right should try up/down respectively if they fail.\n                    return update$1([rc(0, -1), rc(-1, 0)]);\n                }\n                else if (direction.isForward(keycode) && shiftKey) {\n                    return update$1([rc(0, +1), rc(+1, 0)]);\n                }\n                else if (isNavigation(keycode) && !shiftKey) { // Clear the selection on normal arrow keys.\n                    return clearToNavigate;\n                }\n                else {\n                    return Optional.none;\n                }\n            });\n            return handler();\n        };\n        const keyup = (event, start, soffset, finish, foffset) => {\n            return retrieve$1(container, annotations.selectedSelector).fold(() => {\n                const realEvent = event.raw;\n                const keycode = realEvent.which;\n                const shiftKey = realEvent.shiftKey === true;\n                if (!shiftKey) {\n                    return Optional.none();\n                }\n                if (isNavigation(keycode) && isEditableSelection(start, finish)) {\n                    return sync(container, isRoot, start, soffset, finish, foffset, annotations.selectRange);\n                }\n                else {\n                    return Optional.none();\n                }\n            }, Optional.none);\n        };\n        return {\n            keydown,\n            keyup\n        };\n    };\n    const external = (win, container, isRoot, annotations) => {\n        const bridge = WindowBridge(win);\n        return (start, finish) => {\n            annotations.clearBeforeUpdate(container);\n            identify(start, finish, isRoot).each((cellSel) => {\n                const boxes = cellSel.boxes.getOr([]);\n                annotations.selectRange(container, boxes, cellSel.start, cellSel.finish);\n                // stop the browser from creating a big text selection, place the selection at the end of the cell where the cursor is\n                bridge.selectContents(finish);\n                bridge.collapseSelection();\n            });\n        };\n    };\n\n    const byClass = (ephemera) => {\n        const addSelectionClass = addClass(ephemera.selected);\n        const removeSelectionClasses = removeClasses([ephemera.selected, ephemera.lastSelected, ephemera.firstSelected]);\n        const clear = (container) => {\n            const sels = descendants(container, ephemera.selectedSelector);\n            each$2(sels, removeSelectionClasses);\n        };\n        const selectRange = (container, cells, start, finish) => {\n            clear(container);\n            each$2(cells, addSelectionClass);\n            add$1(start, ephemera.firstSelected);\n            add$1(finish, ephemera.lastSelected);\n        };\n        return {\n            clearBeforeUpdate: clear,\n            clear,\n            selectRange,\n            selectedSelector: ephemera.selectedSelector,\n            firstSelectedSelector: ephemera.firstSelectedSelector,\n            lastSelectedSelector: ephemera.lastSelectedSelector\n        };\n    };\n    const byAttr = (ephemera, onSelection, onClear) => {\n        const removeSelectionAttributes = (element) => {\n            remove$6(element, ephemera.selected);\n            remove$6(element, ephemera.firstSelected);\n            remove$6(element, ephemera.lastSelected);\n        };\n        const addSelectionAttribute = (element) => {\n            set$2(element, ephemera.selected, '1');\n        };\n        const clear = (container) => {\n            clearBeforeUpdate(container);\n            onClear();\n        };\n        const clearBeforeUpdate = (container) => {\n            const sels = descendants(container, `${ephemera.selectedSelector},${ephemera.firstSelectedSelector},${ephemera.lastSelectedSelector}`);\n            each$2(sels, removeSelectionAttributes);\n        };\n        const selectRange = (container, cells, start, finish) => {\n            clear(container);\n            each$2(cells, addSelectionAttribute);\n            set$2(start, ephemera.firstSelected, '1');\n            set$2(finish, ephemera.lastSelected, '1');\n            onSelection(cells, start, finish);\n        };\n        return {\n            clearBeforeUpdate,\n            clear,\n            selectRange,\n            selectedSelector: ephemera.selectedSelector,\n            firstSelectedSelector: ephemera.firstSelectedSelector,\n            lastSelectedSelector: ephemera.lastSelectedSelector\n        };\n    };\n    const SelectionAnnotation = {\n        byClass,\n        byAttr\n    };\n\n    /*\n     NOTE: This file is duplicated in the following locations:\n      - plugins/table/selection/Ephemera.ts\n      - advtable\n     Make sure that if making changes to this file, the other files are updated as well\n     */\n    const strSelected = 'data-mce-selected';\n    const strSelectedSelector = 'td[' + strSelected + '],th[' + strSelected + ']';\n    // used with not selectors\n    const strAttributeSelector = '[' + strSelected + ']';\n    const strFirstSelected = 'data-mce-first-selected';\n    const strFirstSelectedSelector = 'td[' + strFirstSelected + '],th[' + strFirstSelected + ']';\n    const strLastSelected = 'data-mce-last-selected';\n    const strLastSelectedSelector = 'td[' + strLastSelected + '],th[' + strLastSelected + ']';\n    const attributeSelector = strAttributeSelector;\n    const ephemera = {\n        selected: strSelected,\n        selectedSelector: strSelectedSelector,\n        firstSelected: strFirstSelected,\n        firstSelectedSelector: strFirstSelectedSelector,\n        lastSelected: strLastSelected,\n        lastSelectedSelector: strLastSelectedSelector\n    };\n\n    /*\n     NOTE: This file is partially duplicated in the following locations:\n      - plugins/table/queries/TableTargets.ts\n      - advtable\n     Make sure that if making changes to this file, the other files are updated as well\n     */\n    const forMenu = (selectedCells, table, cell) => ({\n        element: cell,\n        mergable: mergable(table, selectedCells, ephemera),\n        unmergable: unmergable(selectedCells),\n        selection: selection(selectedCells)\n    });\n    const paste = (element, clipboard, generators) => ({\n        element,\n        clipboard,\n        generators\n    });\n    const pasteRows = (selectedCells, _cell, clipboard, generators) => ({\n        selection: selection(selectedCells),\n        clipboard,\n        generators\n    });\n\n    /*\n     NOTE: This file is partially duplicated in the following locations:\n      - plugins/table/selection/TableSelection.ts\n      - advtable\n     Make sure that if making changes to this file, the other files are updated as well\n     */\n    const getSelectionCellFallback = (element) => table(element).bind((table) => retrieve(table, ephemera.firstSelectedSelector)).fold(constant(element), (cells) => cells[0]);\n    const getSelectionFromSelector = (selector) => (initCell, isRoot) => {\n        const cellName = name(initCell);\n        const cell = cellName === 'col' || cellName === 'colgroup' ? getSelectionCellFallback(initCell) : initCell;\n        return closest$1(cell, selector, isRoot);\n    };\n    const getSelectionCellOrCaption = getSelectionFromSelector('th,td,caption');\n    const getSelectionCell = getSelectionFromSelector('th,td');\n    // Note: Includes single cell if the start of the selection whether collapsed or ranged is within a table cell\n    const getCellsFromSelection = (editor) => fromDom(editor.model.table.getSelectedCells());\n    const getCellsFromFakeSelection = (editor) => filter$2(getCellsFromSelection(editor), (cell) => is$1(cell, ephemera.selectedSelector));\n\n    const extractSelected = (cells) => {\n        // Assume for now that we only have one table (also handles the case where we multi select outside a table)\n        return table(cells[0]).map((table) => {\n            const replica = extract$1(table, attributeSelector);\n            removeDataStyle(replica);\n            return [replica];\n        });\n    };\n    const serializeElements = (editor, elements) => map$1(elements, (elm) => editor.selection.serializer.serialize(elm.dom, {})).join('');\n    const getTextContent = (editor, replicaElements) => {\n        const doc = editor.getDoc();\n        const dos = getRootNode(SugarElement.fromDom(editor.getBody()));\n        // Set up offscreen div so that the extracted table element can be inserted into the DOM\n        // TINY-10847: If the table element is detached from the DOM, calling innerText is equivalent to calling\n        // textContent which does not include '\\n' and '\\t' characters to separate rows and cells respectively\n        const offscreenDiv = SugarElement.fromTag('div', doc);\n        set$2(offscreenDiv, 'data-mce-bogus', 'all');\n        setAll(offscreenDiv, {\n            position: 'fixed',\n            left: '-9999999px',\n            top: '0',\n            overflow: 'hidden',\n            opacity: '0'\n        });\n        const root = getContentContainer(dos);\n        append(offscreenDiv, replicaElements);\n        append$1(root, offscreenDiv);\n        const textContent = offscreenDiv.dom.innerText;\n        remove$5(offscreenDiv);\n        return textContent;\n    };\n    const registerEvents = (editor, actions) => {\n        editor.on('BeforeGetContent', (e) => {\n            const multiCellContext = (cells) => {\n                e.preventDefault();\n                extractSelected(cells).each((replicaElements) => {\n                    const content = e.format === 'text' ? getTextContent(editor, replicaElements) : serializeElements(editor, replicaElements);\n                    e.content = content;\n                });\n            };\n            if (e.selection === true) {\n                const cells = getCellsFromFakeSelection(editor);\n                if (cells.length >= 1) {\n                    multiCellContext(cells);\n                }\n            }\n        });\n        editor.on('BeforeSetContent', (e) => {\n            if (e.selection === true && e.paste === true) {\n                const selectedCells = getCellsFromSelection(editor);\n                head(selectedCells).each((cell) => {\n                    table(cell).each((table) => {\n                        const elements = filter$2(fromHtml(e.content), (content) => {\n                            return name(content) !== 'meta';\n                        });\n                        const isTable = isTag('table');\n                        if (shouldMergeContentOnPaste(editor) && elements.length === 1 && isTable(elements[0])) {\n                            e.preventDefault();\n                            const doc = SugarElement.fromDom(editor.getDoc());\n                            const generators = paste$1(doc);\n                            const targets = paste(cell, elements[0], generators);\n                            actions.pasteCells(table, targets).each(() => {\n                                editor.focus();\n                            });\n                        }\n                    });\n                });\n            }\n        });\n    };\n\n    /*\n     NOTE: This file is duplicated in the following locations:\n      - core/api/TableEvents.ts\n      - plugins/table/api/Events.ts\n      - advtable\n     Make sure that if making changes to this file, the other files are updated as well\n     */\n    const fireNewRow = (editor, row) => editor.dispatch('NewRow', { node: row });\n    const fireNewCell = (editor, cell) => editor.dispatch('NewCell', { node: cell });\n    const fireTableModified = (editor, table, data) => {\n        editor.dispatch('TableModified', { ...data, table });\n    };\n    const fireTableSelectionChange = (editor, cells, start, finish, otherCells) => {\n        editor.dispatch('TableSelectionChange', {\n            cells,\n            start,\n            finish,\n            otherCells\n        });\n    };\n    const fireTableSelectionClear = (editor) => {\n        editor.dispatch('TableSelectionClear');\n    };\n    const fireObjectResizeStart = (editor, target, width, height, origin) => {\n        editor.dispatch('ObjectResizeStart', { target, width, height, origin });\n    };\n    const fireObjectResized = (editor, target, width, height, origin) => {\n        editor.dispatch('ObjectResized', { target, width, height, origin });\n    };\n    const styleModified = { structure: false, style: true };\n    const structureModified = { structure: true, style: false };\n    const styleAndStructureModified = { structure: true, style: true };\n\n    const get$1 = (editor, table) => {\n        // Note: We can't enforce none (responsive), as if someone manually resizes a table\n        // then it must switch to either pixel (fixed) or percentage (relative) sizing\n        if (isTablePercentagesForced(editor)) {\n            return TableSize.percentageSize(table);\n        }\n        else if (isTablePixelsForced(editor)) {\n            return TableSize.pixelSize(table);\n        }\n        else {\n            // Detect based on the table width\n            return TableSize.getTableSize(table);\n        }\n    };\n\n    const TableActions = (editor, resizeHandler, cellSelectionHandler) => {\n        const isTableBody = (editor) => name(getBody(editor)) === 'table';\n        const lastRowGuard = (table) => !isTableBody(editor) || getGridSize(table).rows > 1;\n        const lastColumnGuard = (table) => !isTableBody(editor) || getGridSize(table).columns > 1;\n        // Optional.none gives the default cloneFormats.\n        const cloneFormats = getTableCloneElements(editor);\n        const colMutationOp = isResizeTableColumnResizing(editor) ? noop : halve;\n        const getTableSectionType = (table) => {\n            switch (getTableHeaderType(editor)) {\n                case 'section':\n                    return TableSection.section();\n                case 'sectionCells':\n                    return TableSection.sectionCells();\n                case 'cells':\n                    return TableSection.cells();\n                default:\n                    // Attempt to automatically find the type. If a type can't be found\n                    // then fallback to \"section\" to maintain backwards compatibility.\n                    return TableSection.getTableSectionType(table, 'section');\n            }\n        };\n        const setSelectionFromAction = (table, result) => result.cursor.fold(() => {\n            // Snooker has reported we don't have a good cursor position. However, we may have a locked column\n            // with noneditable cells, so lets check if we have a noneditable cell and if so place the selection\n            const cells = cells$1(table);\n            return head(cells).filter(inBody).map((firstCell) => {\n                cellSelectionHandler.clearSelectedCells(table.dom);\n                const rng = editor.dom.createRng();\n                rng.selectNode(firstCell.dom);\n                editor.selection.setRng(rng);\n                set$2(firstCell, 'data-mce-selected', '1');\n                return rng;\n            });\n        }, (cell) => {\n            const des = freefallRtl(cell);\n            const rng = editor.dom.createRng();\n            rng.setStart(des.element.dom, des.offset);\n            rng.setEnd(des.element.dom, des.offset);\n            editor.selection.setRng(rng);\n            cellSelectionHandler.clearSelectedCells(table.dom);\n            return Optional.some(rng);\n        });\n        const execute = (operation, guard, mutate, effect) => (table, target, noEvents = false) => {\n            removeDataStyle(table);\n            const doc = SugarElement.fromDom(editor.getDoc());\n            const generators = cellOperations(mutate, doc, cloneFormats);\n            const behaviours = {\n                sizing: get$1(editor, table),\n                resize: isResizeTableColumnResizing(editor) ? resizeTable() : preserveTable(),\n                section: getTableSectionType(table)\n            };\n            return guard(table) ? operation(table, target, generators, behaviours).bind((result) => {\n                // Update the resize bars after the table operation\n                resizeHandler.refresh(table.dom);\n                // INVESTIGATE: Should \"noEvents\" prevent these from firing as well?\n                each$2(result.newRows, (row) => {\n                    fireNewRow(editor, row.dom);\n                });\n                each$2(result.newCells, (cell) => {\n                    fireNewCell(editor, cell.dom);\n                });\n                const range = setSelectionFromAction(table, result);\n                if (inBody(table)) {\n                    removeDataStyle(table);\n                    if (!noEvents) {\n                        fireTableModified(editor, table.dom, effect);\n                    }\n                }\n                return range.map((rng) => ({\n                    rng,\n                    effect\n                }));\n            }) : Optional.none();\n        };\n        const deleteRow = execute(eraseRows, lastRowGuard, noop, structureModified);\n        const deleteColumn = execute(eraseColumns, lastColumnGuard, noop, structureModified);\n        const insertRowsBefore$1 = execute(insertRowsBefore, always, noop, structureModified);\n        const insertRowsAfter$1 = execute(insertRowsAfter, always, noop, structureModified);\n        const insertColumnsBefore$1 = execute(insertColumnsBefore, always, colMutationOp, structureModified);\n        const insertColumnsAfter$1 = execute(insertColumnsAfter, always, colMutationOp, structureModified);\n        const mergeCells$1 = execute(mergeCells, always, noop, structureModified);\n        const unmergeCells$1 = execute(unmergeCells, always, noop, structureModified);\n        const pasteColsBefore$1 = execute(pasteColsBefore, always, noop, structureModified);\n        const pasteColsAfter$1 = execute(pasteColsAfter, always, noop, structureModified);\n        const pasteRowsBefore$1 = execute(pasteRowsBefore, always, noop, structureModified);\n        const pasteRowsAfter$1 = execute(pasteRowsAfter, always, noop, structureModified);\n        const pasteCells$1 = execute(pasteCells, always, noop, styleAndStructureModified);\n        const makeCellsHeader$1 = execute(makeCellsHeader, always, noop, structureModified);\n        const unmakeCellsHeader$1 = execute(unmakeCellsHeader, always, noop, structureModified);\n        const makeColumnsHeader$1 = execute(makeColumnsHeader, always, noop, structureModified);\n        const unmakeColumnsHeader$1 = execute(unmakeColumnsHeader, always, noop, structureModified);\n        const makeRowsHeader$1 = execute(makeRowsHeader, always, noop, structureModified);\n        const makeRowsBody$1 = execute(makeRowsBody, always, noop, structureModified);\n        const makeRowsFooter$1 = execute(makeRowsFooter, always, noop, structureModified);\n        const getTableCellType = getCellsType;\n        const getTableColType = getColumnsType;\n        const getTableRowType = getRowsType;\n        return {\n            deleteRow,\n            deleteColumn,\n            insertRowsBefore: insertRowsBefore$1,\n            insertRowsAfter: insertRowsAfter$1,\n            insertColumnsBefore: insertColumnsBefore$1,\n            insertColumnsAfter: insertColumnsAfter$1,\n            mergeCells: mergeCells$1,\n            unmergeCells: unmergeCells$1,\n            pasteColsBefore: pasteColsBefore$1,\n            pasteColsAfter: pasteColsAfter$1,\n            pasteRowsBefore: pasteRowsBefore$1,\n            pasteRowsAfter: pasteRowsAfter$1,\n            pasteCells: pasteCells$1,\n            makeCellsHeader: makeCellsHeader$1,\n            unmakeCellsHeader: unmakeCellsHeader$1,\n            makeColumnsHeader: makeColumnsHeader$1,\n            unmakeColumnsHeader: unmakeColumnsHeader$1,\n            makeRowsHeader: makeRowsHeader$1,\n            makeRowsBody: makeRowsBody$1,\n            makeRowsFooter: makeRowsFooter$1,\n            getTableRowType,\n            getTableCellType,\n            getTableColType\n        };\n    };\n\n    const placeCaretInCell = (editor, cell) => {\n        editor.selection.select(cell.dom, true);\n        editor.selection.collapse(true);\n    };\n    const selectFirstCellInTable = (editor, tableElm) => {\n        descendant(tableElm, 'td,th').each(curry(placeCaretInCell, editor));\n    };\n    const fireEvents = (editor, table) => {\n        each$2(descendants(table, 'tr'), (row) => {\n            fireNewRow(editor, row.dom);\n            each$2(descendants(row, 'th,td'), (cell) => {\n                fireNewCell(editor, cell.dom);\n            });\n        });\n    };\n    const isPercentage = (width) => isString(width) && width.indexOf('%') !== -1;\n    const insert = (editor, columns, rows, colHeaders, rowHeaders) => {\n        const defaultStyles = getTableDefaultStyles(editor);\n        const options = {\n            styles: defaultStyles,\n            attributes: getTableDefaultAttributes(editor),\n            colGroups: tableUseColumnGroup(editor)\n        };\n        // Don't create an undo level when inserting the base table HTML otherwise we can end up with 2 undo levels\n        editor.undoManager.ignore(() => {\n            const table = render(rows, columns, rowHeaders, colHeaders, getTableHeaderType(editor), options);\n            set$2(table, 'data-mce-id', '__mce');\n            const html = getOuter$2(table);\n            editor.insertContent(html);\n            editor.addVisual();\n        });\n        // Enforce the sizing mode of the table\n        return descendant(getBody(editor), 'table[data-mce-id=\"__mce\"]').map((table) => {\n            if (isTablePixelsForced(editor)) {\n                convertToPixelSizeWidth(table);\n            }\n            else if (isTableResponsiveForced(editor)) {\n                convertToNoneSizeWidth(table);\n            }\n            else if (isTablePercentagesForced(editor) || isPercentage(defaultStyles.width)) {\n                convertToPercentSizeWidth(table);\n            }\n            removeDataStyle(table);\n            remove$6(table, 'data-mce-id');\n            fireEvents(editor, table);\n            selectFirstCellInTable(editor, table);\n            return table.dom;\n        }).getOrNull();\n    };\n    const insertTable = (editor, rows, columns, options = {}) => {\n        const checkInput = (val) => isNumber(val) && val > 0;\n        if (checkInput(rows) && checkInput(columns)) {\n            const headerRows = options.headerRows ?? defaultHeaderRows(editor);\n            const headerColumns = options.headerColumns ?? defaultHeaderCols(editor);\n            return insert(editor, columns, rows, headerColumns, headerRows);\n        }\n        else {\n            // eslint-disable-next-line no-console\n            console.error('Invalid values for mceInsertTable - rows and columns values are required to insert a table.');\n            return null;\n        }\n    };\n\n    var global = tinymce.util.Tools.resolve('tinymce.FakeClipboard');\n\n    /*\n     NOTE: This file is duplicated in the following locations:\n      - plugins/table/api/Clipboard.ts\n     Make sure that if making changes to this file, the other files are updated as well\n     */\n    const tableTypeBase = 'x-tinymce/dom-table-';\n    const tableTypeRow = tableTypeBase + 'rows';\n    const tableTypeColumn = tableTypeBase + 'columns';\n    const setData = (items) => {\n        const fakeClipboardItem = global.FakeClipboardItem(items);\n        global.write([fakeClipboardItem]);\n    };\n    const getData = (type) => {\n        const items = global.read() ?? [];\n        return findMap(items, (item) => Optional.from(item.getType(type)));\n    };\n    const clearData = (type) => {\n        if (getData(type).isSome()) {\n            global.clear();\n        }\n    };\n    const setRows = (rowsOpt) => {\n        rowsOpt.fold(clearRows, (rows) => setData({ [tableTypeRow]: rows }));\n    };\n    const getRows = () => getData(tableTypeRow);\n    const clearRows = () => clearData(tableTypeRow);\n    const setColumns = (columnsOpt) => {\n        columnsOpt.fold(clearColumns, (columns) => setData({ [tableTypeColumn]: columns }));\n    };\n    const getColumns = () => getData(tableTypeColumn);\n    const clearColumns = () => clearData(tableTypeColumn);\n\n    const getSelectionStartCellOrCaption = (editor) => getSelectionCellOrCaption(getSelectionStart(editor), getIsRoot(editor)).filter(isInEditableContext$1);\n    const getSelectionStartCell = (editor) => getSelectionCell(getSelectionStart(editor), getIsRoot(editor)).filter(isInEditableContext$1);\n    const registerCommands = (editor, actions) => {\n        const isRoot = getIsRoot(editor);\n        const eraseTable = () => getSelectionStartCellOrCaption(editor).each((cellOrCaption) => {\n            table(cellOrCaption, isRoot).filter(not(isRoot)).each((table) => {\n                const cursor = SugarElement.fromText('');\n                after$4(table, cursor);\n                remove$5(table);\n                if (editor.dom.isEmpty(editor.getBody())) {\n                    editor.setContent('');\n                    editor.selection.setCursorLocation();\n                }\n                else {\n                    const rng = editor.dom.createRng();\n                    rng.setStart(cursor.dom, 0);\n                    rng.setEnd(cursor.dom, 0);\n                    editor.selection.setRng(rng);\n                    editor.nodeChanged();\n                }\n            });\n        });\n        const setSizingMode = (sizing) => getSelectionStartCellOrCaption(editor).each((cellOrCaption) => {\n            // Do nothing if tables are forced to use a specific sizing mode\n            const isForcedSizing = isTableResponsiveForced(editor) || isTablePixelsForced(editor) || isTablePercentagesForced(editor);\n            if (!isForcedSizing) {\n                table(cellOrCaption, isRoot).each((table) => {\n                    if (sizing === 'relative' && !isPercentSizing(table)) {\n                        convertToPercentSizeWidth(table);\n                    }\n                    else if (sizing === 'fixed' && !isPixelSizing(table)) {\n                        convertToPixelSizeWidth(table);\n                    }\n                    else if (sizing === 'responsive' && !isNoneSizing(table)) {\n                        convertToNoneSizeWidth(table);\n                    }\n                    removeDataStyle(table);\n                    fireTableModified(editor, table.dom, structureModified);\n                });\n            }\n        });\n        const getTableFromCell = (cell) => table(cell, isRoot);\n        const performActionOnSelection = (action) => getSelectionStartCell(editor).bind((cell) => getTableFromCell(cell).map((table) => action(table, cell)));\n        const toggleTableClass = (_ui, clazz) => {\n            performActionOnSelection((table) => {\n                editor.formatter.toggle('tableclass', { value: clazz }, table.dom);\n                fireTableModified(editor, table.dom, styleModified);\n            });\n        };\n        const toggleTableCellClass = (_ui, clazz) => {\n            performActionOnSelection((table) => {\n                const selectedCells = getCellsFromSelection(editor);\n                const allHaveClass = forall(selectedCells, (cell) => editor.formatter.match('tablecellclass', { value: clazz }, cell.dom));\n                const formatterAction = allHaveClass ? editor.formatter.remove : editor.formatter.apply;\n                each$2(selectedCells, (cell) => formatterAction('tablecellclass', { value: clazz }, cell.dom));\n                fireTableModified(editor, table.dom, styleModified);\n            });\n        };\n        const toggleCaption = () => {\n            getSelectionStartCellOrCaption(editor).each((cellOrCaption) => {\n                table(cellOrCaption, isRoot).each((table) => {\n                    child(table, 'caption').fold(() => {\n                        const caption = SugarElement.fromTag('caption');\n                        append$1(caption, SugarElement.fromText('Caption'));\n                        appendAt(table, caption, 0);\n                        editor.selection.setCursorLocation(caption.dom, 0);\n                    }, (caption) => {\n                        if (isTag('caption')(cellOrCaption)) {\n                            one('td', table).each((td) => editor.selection.setCursorLocation(td.dom, 0));\n                        }\n                        remove$5(caption);\n                    });\n                    fireTableModified(editor, table.dom, structureModified);\n                });\n            });\n        };\n        const postExecute = (_data) => {\n            editor.focus();\n        };\n        const actOnSelection = (execute, noEvents = false) => performActionOnSelection((table, startCell) => {\n            const targets = forMenu(getCellsFromSelection(editor), table, startCell);\n            execute(table, targets, noEvents).each(postExecute);\n        });\n        const copyRowSelection = () => performActionOnSelection((table, startCell) => {\n            const targets = forMenu(getCellsFromSelection(editor), table, startCell);\n            const generators = cellOperations(noop, SugarElement.fromDom(editor.getDoc()), Optional.none());\n            return copyRows(table, targets, generators);\n        });\n        const copyColSelection = () => performActionOnSelection((table, startCell) => {\n            const targets = forMenu(getCellsFromSelection(editor), table, startCell);\n            return copyCols(table, targets);\n        });\n        const pasteOnSelection = (execute, getRows) => \n        // If we have FakeClipboard rows to paste\n        getRows().each((rows) => {\n            const clonedRows = map$1(rows, (row) => deep(row));\n            performActionOnSelection((table, startCell) => {\n                const generators = paste$1(SugarElement.fromDom(editor.getDoc()));\n                const targets = pasteRows(getCellsFromSelection(editor), startCell, clonedRows, generators);\n                execute(table, targets).each(postExecute);\n            });\n        });\n        const actOnType = (getAction) => (_ui, args) => get$c(args, 'type').each((type) => {\n            actOnSelection(getAction(type), args.no_events);\n        });\n        // Register action commands\n        each$1({\n            mceTableSplitCells: () => actOnSelection(actions.unmergeCells),\n            mceTableMergeCells: () => actOnSelection(actions.mergeCells),\n            mceTableInsertRowBefore: () => actOnSelection(actions.insertRowsBefore),\n            mceTableInsertRowAfter: () => actOnSelection(actions.insertRowsAfter),\n            mceTableInsertColBefore: () => actOnSelection(actions.insertColumnsBefore),\n            mceTableInsertColAfter: () => actOnSelection(actions.insertColumnsAfter),\n            mceTableDeleteCol: () => actOnSelection(actions.deleteColumn),\n            mceTableDeleteRow: () => actOnSelection(actions.deleteRow),\n            mceTableCutCol: () => copyColSelection().each((selection) => {\n                setColumns(selection);\n                actOnSelection(actions.deleteColumn);\n            }),\n            mceTableCutRow: () => copyRowSelection().each((selection) => {\n                setRows(selection);\n                actOnSelection(actions.deleteRow);\n            }),\n            mceTableCopyCol: () => copyColSelection().each((selection) => setColumns(selection)),\n            mceTableCopyRow: () => copyRowSelection().each((selection) => setRows(selection)),\n            mceTablePasteColBefore: () => pasteOnSelection(actions.pasteColsBefore, getColumns),\n            mceTablePasteColAfter: () => pasteOnSelection(actions.pasteColsAfter, getColumns),\n            mceTablePasteRowBefore: () => pasteOnSelection(actions.pasteRowsBefore, getRows),\n            mceTablePasteRowAfter: () => pasteOnSelection(actions.pasteRowsAfter, getRows),\n            mceTableDelete: eraseTable,\n            mceTableCellToggleClass: toggleTableCellClass,\n            mceTableToggleClass: toggleTableClass,\n            mceTableToggleCaption: toggleCaption,\n            mceTableSizingMode: (_ui, sizing) => setSizingMode(sizing),\n            mceTableCellType: actOnType((type) => type === 'th' ? actions.makeCellsHeader : actions.unmakeCellsHeader),\n            mceTableColType: actOnType((type) => type === 'th' ? actions.makeColumnsHeader : actions.unmakeColumnsHeader),\n            mceTableRowType: actOnType((type) => {\n                switch (type) {\n                    case 'header':\n                        return actions.makeRowsHeader;\n                    case 'footer':\n                        return actions.makeRowsFooter;\n                    default:\n                        return actions.makeRowsBody;\n                }\n            })\n        }, (func, name) => editor.addCommand(name, func));\n        editor.addCommand('mceInsertTable', (_ui, args) => {\n            insertTable(editor, args.rows, args.columns, args.options);\n        });\n        // Apply cell style using command (background color, border color, border style and border width)\n        // tinyMCE.activeEditor.execCommand('mceTableApplyCellStyle', false, { backgroundColor: 'red', borderColor: 'blue' })\n        // Remove cell style using command (an empty string indicates to remove the style)\n        // tinyMCE.activeEditor.execCommand('mceTableApplyCellStyle', false, { backgroundColor: '' })\n        editor.addCommand('mceTableApplyCellStyle', (_ui, args) => {\n            const getFormatName = (style) => 'tablecell' + style.toLowerCase().replace('-', '');\n            if (!isObject(args)) {\n                return;\n            }\n            const cells = filter$2(getCellsFromSelection(editor), isInEditableContext$1);\n            if (cells.length === 0) {\n                return;\n            }\n            const validArgs = filter$1(args, (value, style) => editor.formatter.has(getFormatName(style)) && isString(value));\n            if (isEmpty(validArgs)) {\n                return;\n            }\n            each$1(validArgs, (value, style) => {\n                const formatName = getFormatName(style);\n                each$2(cells, (cell) => {\n                    if (value === '') {\n                        editor.formatter.remove(formatName, { value: null }, cell.dom, true);\n                    }\n                    else {\n                        editor.formatter.apply(formatName, { value }, cell.dom);\n                    }\n                });\n            });\n            /*\n              Use the first cell in the selection to get the table and fire the TableModified event.\n              If this command is applied over multiple tables, only the first table selected\n              will have a TableModified event thrown.\n            */\n            getTableFromCell(cells[0]).each((table) => fireTableModified(editor, table.dom, styleModified));\n        });\n    };\n\n    const registerQueryCommands = (editor, actions) => {\n        const isRoot = getIsRoot(editor);\n        const lookupOnSelection = (action) => getSelectionCell(getSelectionStart(editor)).bind((cell) => table(cell, isRoot).map((table) => {\n            const targets = forMenu(getCellsFromSelection(editor), table, cell);\n            return action(table, targets);\n        })).getOr('');\n        each$1({\n            mceTableRowType: () => lookupOnSelection(actions.getTableRowType),\n            mceTableCellType: () => lookupOnSelection(actions.getTableCellType),\n            mceTableColType: () => lookupOnSelection(actions.getTableColType)\n        }, (func, name) => editor.addQueryValueHandler(name, func));\n    };\n\n    const hasInternalTarget = (e) => !has(SugarElement.fromDom(e.target), 'ephox-snooker-resizer-bar');\n    const TableCellSelectionHandler = (editor, resizeHandler) => {\n        const cellSelection = Selections(() => SugarElement.fromDom(editor.getBody()), () => getSelectionCell(getSelectionStart(editor), getIsRoot(editor)), ephemera.selectedSelector);\n        const onSelection = (cells, start, finish) => {\n            const tableOpt = table(start);\n            tableOpt.each((table) => {\n                const cellsDom = map$1(cells, (cell) => cell.dom);\n                const cloneFormats = getTableCloneElements(editor);\n                const generators = cellOperations(noop, SugarElement.fromDom(editor.getDoc()), cloneFormats);\n                const selectedCells = getCellsFromSelection(editor);\n                const otherCellsDom = getOtherCells(table, { selection: selectedCells }, generators)\n                    .map((otherCells) => map(otherCells, (cellArr) => map$1(cellArr, (cell) => cell.dom)))\n                    .getOrUndefined();\n                fireTableSelectionChange(editor, cellsDom, start.dom, finish.dom, otherCellsDom);\n            });\n        };\n        const onClear = () => fireTableSelectionClear(editor);\n        const annotations = SelectionAnnotation.byAttr(ephemera, onSelection, onClear);\n        editor.on('init', (_e) => {\n            const win = editor.getWin();\n            const body = getBody(editor);\n            const isRoot = getIsRoot(editor);\n            // When the selection changes through either the mouse or keyboard, and the selection is no longer within the table.\n            // Remove the selection.\n            const syncSelection = () => {\n                const sel = editor.selection;\n                const start = SugarElement.fromDom(sel.getStart());\n                const end = SugarElement.fromDom(sel.getEnd());\n                const shared = sharedOne(table, [start, end]);\n                shared.fold(() => annotations.clear(body), noop);\n            };\n            const mouseHandlers = mouse(win, body, isRoot, annotations);\n            const keyHandlers = keyboard(win, body, isRoot, annotations);\n            const external$1 = external(win, body, isRoot, annotations);\n            const hasShiftKey = (event) => event.raw.shiftKey === true;\n            editor.on('TableSelectorChange', (e) => external$1(e.start, e.finish));\n            const handleResponse = (event, response) => {\n                // Only handle shift key non shiftkey cell navigation is handled by core\n                if (!hasShiftKey(event)) {\n                    return;\n                }\n                if (response.kill) {\n                    event.kill();\n                }\n                response.selection.each((ns) => {\n                    const relative = SimSelection.relative(ns.start, ns.finish);\n                    const rng = asLtrRange(win, relative);\n                    editor.selection.setRng(rng);\n                });\n            };\n            const keyup = (event) => {\n                const wrappedEvent = fromRawEvent(event);\n                // Note, this is an optimisation.\n                if (wrappedEvent.raw.shiftKey && isNavigation(wrappedEvent.raw.which)) {\n                    const rng = editor.selection.getRng();\n                    const start = SugarElement.fromDom(rng.startContainer);\n                    const end = SugarElement.fromDom(rng.endContainer);\n                    keyHandlers.keyup(wrappedEvent, start, rng.startOffset, end, rng.endOffset).each((response) => {\n                        handleResponse(wrappedEvent, response);\n                    });\n                }\n            };\n            const keydown = (event) => {\n                const wrappedEvent = fromRawEvent(event);\n                resizeHandler.hide();\n                const rng = editor.selection.getRng();\n                const start = SugarElement.fromDom(rng.startContainer);\n                const end = SugarElement.fromDom(rng.endContainer);\n                const direction = onDirection(ltr, rtl)(SugarElement.fromDom(editor.selection.getStart()));\n                keyHandlers.keydown(wrappedEvent, start, rng.startOffset, end, rng.endOffset, direction).each((response) => {\n                    handleResponse(wrappedEvent, response);\n                });\n                resizeHandler.show();\n            };\n            const isLeftMouse = (raw) => raw.button === 0;\n            // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/buttons\n            const isLeftButtonPressed = (raw) => {\n                // Only added by Chrome/Firefox in June 2015.\n                // This is only to fix a 1px bug (TBIO-2836) so return true if we're on an older browser\n                if (raw.buttons === undefined) {\n                    return true;\n                }\n                // use bitwise & for optimal comparison\n                // eslint-disable-next-line no-bitwise\n                return (raw.buttons & 1) !== 0;\n            };\n            const dragStart = (_e) => {\n                mouseHandlers.clearstate();\n            };\n            const mouseDown = (e) => {\n                if (isLeftMouse(e) && hasInternalTarget(e)) {\n                    mouseHandlers.mousedown(fromRawEvent(e));\n                }\n            };\n            const mouseOver = (e) => {\n                if (isLeftButtonPressed(e) && hasInternalTarget(e)) {\n                    mouseHandlers.mouseover(fromRawEvent(e));\n                }\n            };\n            const mouseUp = (e) => {\n                if (isLeftMouse(e) && hasInternalTarget(e)) {\n                    mouseHandlers.mouseup(fromRawEvent(e));\n                }\n            };\n            const getDoubleTap = () => {\n                const lastTarget = Cell(SugarElement.fromDom(body));\n                const lastTimeStamp = Cell(0);\n                const touchEnd = (t) => {\n                    const target = SugarElement.fromDom(t.target);\n                    if (isTag('td')(target) || isTag('th')(target)) {\n                        const lT = lastTarget.get();\n                        const lTS = lastTimeStamp.get();\n                        if (eq$1(lT, target) && (t.timeStamp - lTS) < 300) {\n                            t.preventDefault();\n                            external$1(target, target);\n                        }\n                    }\n                    lastTarget.set(target);\n                    lastTimeStamp.set(t.timeStamp);\n                };\n                return {\n                    touchEnd\n                };\n            };\n            const doubleTap = getDoubleTap();\n            editor.on('dragstart', dragStart);\n            editor.on('mousedown', mouseDown);\n            editor.on('mouseover', mouseOver);\n            editor.on('mouseup', mouseUp);\n            editor.on('touchend', doubleTap.touchEnd);\n            editor.on('keyup', keyup);\n            editor.on('keydown', keydown);\n            editor.on('NodeChange', syncSelection);\n        });\n        editor.on('PreInit', () => {\n            editor.serializer.addTempAttr(ephemera.firstSelected);\n            editor.serializer.addTempAttr(ephemera.lastSelected);\n        });\n        const clearSelectedCells = (container) => annotations.clear(SugarElement.fromDom(container));\n        const getSelectedCells = () => fold(cellSelection.get(), \n        // No fake selected cells\n        constant([]), \n        // This path is taken whenever there is fake cell selection even for just a single selected cell\n        (cells) => {\n            return map$1(cells, (cell) => cell.dom);\n        }, \n        // For this path, the start of the selection whether collapsed or ranged is within a table cell\n        (cell) => [cell.dom]);\n        return {\n            getSelectedCells,\n            clearSelectedCells\n        };\n    };\n\n    const get = (editor, isResizable) => {\n        const editorBody = SugarElement.fromDom(editor.getBody());\n        return ResizeWire.body(editorBody, isResizable);\n    };\n\n    const isTable = (node) => isNonNullable(node) && node.nodeName === 'TABLE';\n    const barResizerPrefix = 'bar-';\n    const isResizable = (elm) => get$b(elm, 'data-mce-resize') !== 'false';\n    const syncTableCellPixels = (table) => {\n        const warehouse = Warehouse.fromTable(table);\n        if (!Warehouse.hasColumns(warehouse)) {\n            // Ensure the specified width matches the actual cell width\n            each$2(cells$1(table), (cell) => {\n                const computedWidth = get$9(cell, 'width');\n                set$1(cell, 'width', computedWidth);\n                remove$6(cell, 'width');\n            });\n        }\n    };\n    const isCornerResize = (origin) => startsWith(origin, 'corner-');\n    const getCornerLocation = (origin) => removeLeading(origin, 'corner-');\n    const TableResizeHandler = (editor) => {\n        const tableResize = value();\n        const resizeWire = value();\n        let startW;\n        let startRawW;\n        let startH;\n        let startRawH;\n        const lazySizing = (table) => get$1(editor, table);\n        const lazyResizingBehaviour = () => isPreserveTableColumnResizing(editor) ? preserveTable() : resizeTable();\n        const getNumColumns = (table) => getGridSize(table).columns;\n        const getNumRows = (table) => getGridSize(table).rows;\n        const afterCornerResize = (table, origin, width, height) => {\n            // Origin will tell us which handle was clicked, eg corner-se or corner-nw\n            // so check to see if it ends with `e` (eg east edge)\n            const location = getCornerLocation(origin);\n            const isRightEdgeResize = endsWith(location, 'e');\n            const isNorthEdgeResize = startsWith(location, 'n');\n            // Responsive tables don't have a width so we need to convert it to a relative/percent\n            // table instead, as that's closer to responsive sizing than fixed sizing\n            if (startRawW === '') {\n                convertToPercentSizeWidth(table);\n            }\n            // Responsive tables don't have a height so we need to convert it to a fixed value to be able to resize the table height\n            if (startRawH === '') {\n                convertToPixelSizeHeight(table);\n            }\n            // Adjust the column sizes and update the table width to use the right sizing, if the table changed size.\n            // This is needed as core will always use pixels when setting the width.\n            if (width !== startW && startRawW !== '') {\n                // Restore the original size and then let snooker resize appropriately\n                set$1(table, 'width', startRawW);\n                const resizing = lazyResizingBehaviour();\n                const tableSize = lazySizing(table);\n                // For preserve table we want to always resize the entire table. So pretend the last column is being resized\n                const col = isPreserveTableColumnResizing(editor) || isRightEdgeResize ? getNumColumns(table) - 1 : 0;\n                adjustWidth(table, width - startW, col, resizing, tableSize);\n                // Handle the edge case where someone might fire this event without resizing.\n                // If so then we need to ensure the table is still using percent\n            }\n            else if (isPercentage$1(startRawW)) {\n                const percentW = parseFloat(startRawW.replace('%', ''));\n                const targetPercentW = width * percentW / startW;\n                set$1(table, 'width', targetPercentW + '%');\n            }\n            // Sync the cell sizes, as the core resizing logic doesn't update them, but snooker does\n            if (isPixel(startRawW)) {\n                syncTableCellPixels(table);\n            }\n            // NOTE: This will only change the height of the first or last tr\n            if (height !== startH && startRawH !== '') {\n                // Restore the original size and then let snooker resize appropriately\n                set$1(table, 'height', startRawH);\n                const idx = isNorthEdgeResize ? 0 : getNumRows(table) - 1;\n                adjustHeight(table, height - startH, idx);\n            }\n        };\n        const destroy = () => {\n            tableResize.on((sz) => {\n                sz.destroy();\n            });\n        };\n        editor.on('init', () => {\n            const rawWire = get(editor, isResizable);\n            resizeWire.set(rawWire);\n            if (hasTableObjectResizing(editor) && hasTableResizeBars(editor)) {\n                const resizing = lazyResizingBehaviour();\n                const sz = TableResize.create(rawWire, resizing, lazySizing);\n                if (!editor.mode.isReadOnly()) {\n                    sz.on();\n                }\n                sz.events.beforeResize.bind((event) => {\n                    const rawTable = event.table.dom;\n                    fireObjectResizeStart(editor, rawTable, getPixelWidth(rawTable), getPixelHeight(rawTable), barResizerPrefix + event.type);\n                });\n                sz.events.afterResize.bind((event) => {\n                    const table = event.table;\n                    const rawTable = table.dom;\n                    removeDataStyle(table);\n                    fireObjectResized(editor, rawTable, getPixelWidth(rawTable), getPixelHeight(rawTable), barResizerPrefix + event.type);\n                    editor.undoManager.add();\n                });\n                tableResize.set(sz);\n            }\n        });\n        // If we're updating the table width via the old mechanic, we need to update the constituent cells' widths/heights too.\n        editor.on('ObjectResizeStart', (e) => {\n            const targetElm = e.target;\n            if (isTable(targetElm) && !editor.mode.isReadOnly()) {\n                const table = SugarElement.fromDom(targetElm);\n                // Add a class based on the resizing mode\n                each$2(editor.dom.select('.mce-clonedresizable'), (clone) => {\n                    editor.dom.addClass(clone, 'mce-' + getTableColumnResizingBehaviour(editor) + '-columns');\n                });\n                if (!isPixelSizing(table) && isTablePixelsForced(editor)) {\n                    convertToPixelSizeWidth(table);\n                }\n                else if (!isPercentSizing(table) && isTablePercentagesForced(editor)) {\n                    convertToPercentSizeWidth(table);\n                }\n                // TINY-6601: If resizing using a bar, then snooker will base the resizing on the initial size. So\n                // when using a responsive table we need to ensure we convert to a relative table before resizing\n                if (isNoneSizing(table) && startsWith(e.origin, barResizerPrefix)) {\n                    convertToPercentSizeWidth(table);\n                }\n                startW = e.width;\n                startRawW = isTableResponsiveForced(editor) ? '' : getRawWidth(editor, targetElm).getOr('');\n                startH = e.height;\n                startRawH = getRawHeight(editor, targetElm).getOr('');\n            }\n        });\n        editor.on('ObjectResized', (e) => {\n            const targetElm = e.target;\n            if (isTable(targetElm)) {\n                const table = SugarElement.fromDom(targetElm);\n                // Resize based on the snooker logic to adjust the individual col/rows if resized from a corner\n                const origin = e.origin;\n                if (isCornerResize(origin)) {\n                    afterCornerResize(table, origin, e.width, e.height);\n                }\n                removeDataStyle(table);\n                fireTableModified(editor, table.dom, styleModified);\n            }\n        });\n        const showResizeBars = () => {\n            tableResize.on((resize) => {\n                resize.on();\n                resize.showBars();\n            });\n        };\n        const hideResizeBars = () => {\n            tableResize.on((resize) => {\n                resize.off();\n                resize.hideBars();\n            });\n        };\n        editor.on('DisabledStateChange', (e) => {\n            e.state ? hideResizeBars() : showResizeBars();\n        });\n        editor.on('SwitchMode', () => {\n            editor.mode.isReadOnly() ? hideResizeBars() : showResizeBars();\n        });\n        editor.on('dragstart dragend', (e) => {\n            e.type === 'dragstart' ? hideResizeBars() : showResizeBars();\n        });\n        editor.on('remove', () => {\n            destroy();\n        });\n        const refresh = (table) => {\n            tableResize.on((resize) => resize.refreshBars(SugarElement.fromDom(table)));\n        };\n        const hide = () => {\n            tableResize.on((resize) => resize.hideBars());\n        };\n        const show = () => {\n            tableResize.on((resize) => resize.showBars());\n        };\n        return {\n            refresh,\n            hide,\n            show\n        };\n    };\n\n    const setupTable = (editor) => {\n        register(editor);\n        const resizeHandler = TableResizeHandler(editor);\n        const cellSelectionHandler = TableCellSelectionHandler(editor, resizeHandler);\n        const actions = TableActions(editor, resizeHandler, cellSelectionHandler);\n        registerCommands(editor, actions);\n        registerQueryCommands(editor, actions);\n        // TODO: TINY-8385 Maybe move to core. Although, will need RTC to have that working first\n        registerEvents(editor, actions);\n        return {\n            getSelectedCells: cellSelectionHandler.getSelectedCells,\n            clearSelectedCells: cellSelectionHandler.clearSelectedCells\n        };\n    };\n\n    const DomModel = (editor) => {\n        const table = setupTable(editor);\n        return {\n            table\n        };\n    };\n    var Model = () => {\n        global$1.add('dom', DomModel);\n    };\n\n    Model();\n    /** *****\n     * DO NOT EXPORT ANYTHING\n     *\n     * IF YOU DO ROLLUP WILL LEAVE A GLOBAL ON THE PAGE\n     *******/\n\n})();\n", "/**\n * TinyMCE version 8.10.0 (2026-10-14)\n */\n\n(function () {\n    'use strict';\n\n    /* eslint-disable @typescript-eslint/no-wrapper-object-types */\n    const getPrototypeOf$2 = Object.getPrototypeOf;\n    const hasProto = (v, constructor, predicate) => {\n        if (predicate(v, constructor.prototype)) {\n            return true;\n        }\n        else {\n            // String-based fallback time\n            return v.constructor?.name === constructor.name;\n        }\n    };\n    const typeOf = (x) => {\n        const t = typeof x;\n        if (x === null) {\n            return 'null';\n        }\n        else if (t === 'object' && Array.isArray(x)) {\n            return 'array';\n        }\n        else if (t === 'object' && hasProto(x, String, (o, proto) => proto.isPrototypeOf(o))) {\n            return 'string';\n        }\n        else {\n            return t;\n        }\n    };\n    const isType$1 = (type) => (value) => typeOf(value) === type;\n    const isSimpleType = (type) => (value) => typeof value === type;\n    const eq$1 = (t) => (a) => t === a;\n    const is$2 = (value, constructor) => isObject(value) && hasProto(value, constructor, (o, proto) => getPrototypeOf$2(o) === proto);\n    const isString = isType$1('string');\n    const isObject = isType$1('object');\n    const isPlainObject = (value) => is$2(value, Object);\n    const isArray = isType$1('array');\n    const isNull = eq$1(null);\n    const isBoolean = isSimpleType('boolean');\n    const isUndefined = eq$1(undefined);\n    const isNullable = (a) => a === null || a === undefined;\n    const isNonNullable = (a) => !isNullable(a);\n    const isFunction = isSimpleType('function');\n    const isNumber = isSimpleType('number');\n    const isArrayOf = (value, pred) => {\n        if (isArray(value)) {\n            for (let i = 0, len = value.length; i < len; ++i) {\n                if (!(pred(value[i]))) {\n                    return false;\n                }\n            }\n            return true;\n        }\n        return false;\n    };\n\n    const noop = () => { };\n    const noarg = (f) => () => f();\n    /** Compose a unary function with an n-ary function */\n    const compose = (fa, fb) => {\n        return (...args) => {\n            return fa(fb.apply(null, args));\n        };\n    };\n    /** Compose two unary functions. Similar to compose, but avoids using Function.prototype.apply. */\n    const compose1 = (fbc, fab) => (a) => fbc(fab(a));\n    const constant$1 = (value) => {\n        return () => {\n            return value;\n        };\n    };\n    const identity = (x) => {\n        return x;\n    };\n    const tripleEquals = (a, b) => {\n        return a === b;\n    };\n    function curry(fn, ...initialArgs) {\n        return (...restArgs) => {\n            const all = initialArgs.concat(restArgs);\n            return fn.apply(null, all);\n        };\n    }\n    const not = (f) => (t) => !f(t);\n    const die = (msg) => {\n        return () => {\n            throw new Error(msg);\n        };\n    };\n    const apply$1 = (f) => {\n        return f();\n    };\n    const never = constant$1(false);\n    const always = constant$1(true);\n\n    /**\n     * The `Optional` type represents a value (of any type) that potentially does\n     * not exist. Any `Optional<T>` can either be a `Some<T>` (in which case the\n     * value does exist) or a `None` (in which case the value does not exist). This\n     * module defines a whole lot of FP-inspired utility functions for dealing with\n     * `Optional` objects.\n     *\n     * Comparison with null or undefined:\n     * - We don't get fancy null coalescing operators with `Optional`\n     * - We do get fancy helper functions with `Optional`\n     * - `Optional` support nesting, and allow for the type to still be nullable (or\n     * another `Optional`)\n     * - There is no option to turn off strict-optional-checks like there is for\n     * strict-null-checks\n     */\n    class Optional {\n        tag;\n        value;\n        // Sneaky optimisation: every instance of Optional.none is identical, so just\n        // reuse the same object\n        static singletonNone = new Optional(false);\n        // The internal representation has a `tag` and a `value`, but both are\n        // private: able to be console.logged, but not able to be accessed by code\n        constructor(tag, value) {\n            this.tag = tag;\n            this.value = value;\n        }\n        // --- Identities ---\n        /**\n         * Creates a new `Optional<T>` that **does** contain a value.\n         */\n        static some(value) {\n            return new Optional(true, value);\n        }\n        /**\n         * Create a new `Optional<T>` that **does not** contain a value. `T` can be\n         * any type because we don't actually have a `T`.\n         */\n        static none() {\n            return Optional.singletonNone;\n        }\n        /**\n         * Perform a transform on an `Optional` type. Regardless of whether this\n         * `Optional` contains a value or not, `fold` will return a value of type `U`.\n         * If this `Optional` does not contain a value, the `U` will be created by\n         * calling `onNone`. If this `Optional` does contain a value, the `U` will be\n         * created by calling `onSome`.\n         *\n         * For the FP enthusiasts in the room, this function:\n         * 1. Could be used to implement all of the functions below\n         * 2. Forms a catamorphism\n         */\n        fold(onNone, onSome) {\n            if (this.tag) {\n                return onSome(this.value);\n            }\n            else {\n                return onNone();\n            }\n        }\n        /**\n         * Determine if this `Optional` object contains a value.\n         */\n        isSome() {\n            return this.tag;\n        }\n        /**\n         * Determine if this `Optional` object **does not** contain a value.\n         */\n        isNone() {\n            return !this.tag;\n        }\n        // --- Functor (name stolen from Haskell / maths) ---\n        /**\n         * Perform a transform on an `Optional` object, **if** there is a value. If\n         * you provide a function to turn a T into a U, this is the function you use\n         * to turn an `Optional<T>` into an `Optional<U>`. If this **does** contain\n         * a value then the output will also contain a value (that value being the\n         * output of `mapper(this.value)`), and if this **does not** contain a value\n         * then neither will the output.\n         */\n        map(mapper) {\n            if (this.tag) {\n                return Optional.some(mapper(this.value));\n            }\n            else {\n                return Optional.none();\n            }\n        }\n        // --- Monad (name stolen from Haskell / maths) ---\n        /**\n         * Perform a transform on an `Optional` object, **if** there is a value.\n         * Unlike `map`, here the transform itself also returns an `Optional`.\n         */\n        bind(binder) {\n            if (this.tag) {\n                return binder(this.value);\n            }\n            else {\n                return Optional.none();\n            }\n        }\n        // --- Traversable (name stolen from Haskell / maths) ---\n        /**\n         * For a given predicate, this function finds out if there **exists** a value\n         * inside this `Optional` object that meets the predicate. In practice, this\n         * means that for `Optional`s that do not contain a value it returns false (as\n         * no predicate-meeting value exists).\n         */\n        exists(predicate) {\n            return this.tag && predicate(this.value);\n        }\n        /**\n         * For a given predicate, this function finds out if **all** the values inside\n         * this `Optional` object meet the predicate. In practice, this means that\n         * for `Optional`s that do not contain a value it returns true (as all 0\n         * objects do meet the predicate).\n         */\n        forall(predicate) {\n            return !this.tag || predicate(this.value);\n        }\n        filter(predicate) {\n            if (!this.tag || predicate(this.value)) {\n                return this;\n            }\n            else {\n                return Optional.none();\n            }\n        }\n        // --- Getters ---\n        /**\n         * Get the value out of the inside of the `Optional` object, using a default\n         * `replacement` value if the provided `Optional` object does not contain a\n         * value.\n         */\n        getOr(replacement) {\n            return this.tag ? this.value : replacement;\n        }\n        /**\n         * Get the value out of the inside of the `Optional` object, using a default\n         * `replacement` value if the provided `Optional` object does not contain a\n         * value.  Unlike `getOr`, in this method the `replacement` object is also\n         * `Optional` - meaning that this method will always return an `Optional`.\n         */\n        or(replacement) {\n            return this.tag ? this : replacement;\n        }\n        /**\n         * Get the value out of the inside of the `Optional` object, using a default\n         * `replacement` value if the provided `Optional` object does not contain a\n         * value. Unlike `getOr`, in this method the `replacement` value is\n         * \"thunked\" - that is to say that you don't pass a value to `getOrThunk`, you\n         * pass a function which (if called) will **return** the `value` you want to\n         * use.\n         */\n        getOrThunk(thunk) {\n            return this.tag ? this.value : thunk();\n        }\n        /**\n         * Get the value out of the inside of the `Optional` object, using a default\n         * `replacement` value if the provided Optional object does not contain a\n         * value.\n         *\n         * Unlike `or`, in this method the `replacement` value is \"thunked\" - that is\n         * to say that you don't pass a value to `orThunk`, you pass a function which\n         * (if called) will **return** the `value` you want to use.\n         *\n         * Unlike `getOrThunk`, in this method the `replacement` value is also\n         * `Optional`, meaning that this method will always return an `Optional`.\n         */\n        orThunk(thunk) {\n            return this.tag ? this : thunk();\n        }\n        /**\n         * Get the value out of the inside of the `Optional` object, throwing an\n         * exception if the provided `Optional` object does not contain a value.\n         *\n         * WARNING:\n         * You should only be using this function if you know that the `Optional`\n         * object **is not** empty (otherwise you're throwing exceptions in production\n         * code, which is bad).\n         *\n         * In tests this is more acceptable.\n         *\n         * Prefer other methods to this, such as `.each`.\n         */\n        getOrDie(message) {\n            if (!this.tag) {\n                throw new Error(message ?? 'Called getOrDie on None');\n            }\n            else {\n                return this.value;\n            }\n        }\n        // --- Interop with null and undefined ---\n        /**\n         * Creates an `Optional` value from a nullable (or undefined-able) input.\n         * Null, or undefined, is converted to `None`, and anything else is converted\n         * to `Some`.\n         */\n        static from(value) {\n            return isNonNullable(value) ? Optional.some(value) : Optional.none();\n        }\n        /**\n         * Converts an `Optional` to a nullable type, by getting the value if it\n         * exists, or returning `null` if it does not.\n         */\n        getOrNull() {\n            return this.tag ? this.value : null;\n        }\n        /**\n         * Converts an `Optional` to an undefined-able type, by getting the value if\n         * it exists, or returning `undefined` if it does not.\n         */\n        getOrUndefined() {\n            return this.value;\n        }\n        // --- Utilities ---\n        /**\n         * If the `Optional` contains a value, perform an action on that value.\n         * Unlike the rest of the methods on this type, `.each` has side-effects. If\n         * you want to transform an `Optional<T>` **into** something, then this is not\n         * the method for you. If you want to use an `Optional<T>` to **do**\n         * something, then this is the method for you - provided you're okay with not\n         * doing anything in the case where the `Optional` doesn't have a value inside\n         * it. If you're not sure whether your use-case fits into transforming\n         * **into** something or **doing** something, check whether it has a return\n         * value. If it does, you should be performing a transform.\n         */\n        each(worker) {\n            if (this.tag) {\n                worker(this.value);\n            }\n        }\n        /**\n         * Turn the `Optional` object into an array that contains all of the values\n         * stored inside the `Optional`. In practice, this means the output will have\n         * either 0 or 1 elements.\n         */\n        toArray() {\n            return this.tag ? [this.value] : [];\n        }\n        /**\n         * Turn the `Optional` object into a string for debugging or printing. Not\n         * recommended for production code, but good for debugging. Also note that\n         * these days an `Optional` object can be logged to the console directly, and\n         * its inner value (if it exists) will be visible.\n         */\n        toString() {\n            return this.tag ? `some(${this.value})` : 'none()';\n        }\n    }\n\n    const nativeSlice = Array.prototype.slice;\n    const nativeIndexOf = Array.prototype.indexOf;\n    const nativePush = Array.prototype.push;\n    const rawIndexOf = (ts, t) => nativeIndexOf.call(ts, t);\n    const indexOf = (xs, x) => {\n        // The rawIndexOf method does not wrap up in an option. This is for performance reasons.\n        const r = rawIndexOf(xs, x);\n        return r === -1 ? Optional.none() : Optional.some(r);\n    };\n    const contains$2 = (xs, x) => rawIndexOf(xs, x) > -1;\n    const exists = (xs, pred) => {\n        for (let i = 0, len = xs.length; i < len; i++) {\n            const x = xs[i];\n            if (pred(x, i)) {\n                return true;\n            }\n        }\n        return false;\n    };\n    const range$2 = (num, f) => {\n        const r = [];\n        for (let i = 0; i < num; i++) {\n            r.push(f(i));\n        }\n        return r;\n    };\n    // It's a total micro optimisation, but these do make some difference.\n    // Particularly for browsers other than Chrome.\n    // - length caching\n    // http://jsperf.com/browser-diet-jquery-each-vs-for-loop/69\n    // - not using push\n    // http://jsperf.com/array-direct-assignment-vs-push/2\n    const chunk$1 = (array, size) => {\n        const r = [];\n        for (let i = 0; i < array.length; i += size) {\n            const s = nativeSlice.call(array, i, i + size);\n            r.push(s);\n        }\n        return r;\n    };\n    const map$2 = (xs, f) => {\n        // pre-allocating array size when it's guaranteed to be known\n        // http://jsperf.com/push-allocated-vs-dynamic/22\n        const len = xs.length;\n        const r = new Array(len);\n        for (let i = 0; i < len; i++) {\n            const x = xs[i];\n            r[i] = f(x, i);\n        }\n        return r;\n    };\n    // Unwound implementing other functions in terms of each.\n    // The code size is roughly the same, and it should allow for better optimisation.\n    // const each = function<T, U>(xs: T[], f: (x: T, i?: number, xs?: T[]) => void): void {\n    const each$1 = (xs, f) => {\n        for (let i = 0, len = xs.length; i < len; i++) {\n            const x = xs[i];\n            f(x, i);\n        }\n    };\n    const eachr = (xs, f) => {\n        for (let i = xs.length - 1; i >= 0; i--) {\n            const x = xs[i];\n            f(x, i);\n        }\n    };\n    const partition$3 = (xs, pred) => {\n        const pass = [];\n        const fail = [];\n        for (let i = 0, len = xs.length; i < len; i++) {\n            const x = xs[i];\n            const arr = pred(x, i) ? pass : fail;\n            arr.push(x);\n        }\n        return { pass, fail };\n    };\n    const filter$2 = (xs, pred) => {\n        const r = [];\n        for (let i = 0, len = xs.length; i < len; i++) {\n            const x = xs[i];\n            if (pred(x, i)) {\n                r.push(x);\n            }\n        }\n        return r;\n    };\n    const foldr = (xs, f, acc) => {\n        eachr(xs, (x, i) => {\n            acc = f(acc, x, i);\n        });\n        return acc;\n    };\n    const foldl = (xs, f, acc) => {\n        each$1(xs, (x, i) => {\n            acc = f(acc, x, i);\n        });\n        return acc;\n    };\n    const findUntil = (xs, pred, until) => {\n        for (let i = 0, len = xs.length; i < len; i++) {\n            const x = xs[i];\n            if (pred(x, i)) {\n                return Optional.some(x);\n            }\n            else if (until(x, i)) {\n                break;\n            }\n        }\n        return Optional.none();\n    };\n    const find$5 = (xs, pred) => {\n        return findUntil(xs, pred, never);\n    };\n    const findIndex$1 = (xs, pred) => {\n        for (let i = 0, len = xs.length; i < len; i++) {\n            const x = xs[i];\n            if (pred(x, i)) {\n                return Optional.some(i);\n            }\n        }\n        return Optional.none();\n    };\n    const flatten = (xs) => {\n        // Note, this is possible because push supports multiple arguments:\n        // http://jsperf.com/concat-push/6\n        // Note that in the past, concat() would silently work (very slowly) for array-like objects.\n        // With this change it will throw an error.\n        const r = [];\n        for (let i = 0, len = xs.length; i < len; ++i) {\n            // Ensure that each value is an array itself\n            if (!isArray(xs[i])) {\n                throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs);\n            }\n            nativePush.apply(r, xs[i]);\n        }\n        return r;\n    };\n    const bind$3 = (xs, f) => flatten(map$2(xs, f));\n    const forall = (xs, pred) => {\n        for (let i = 0, len = xs.length; i < len; ++i) {\n            const x = xs[i];\n            if (pred(x, i) !== true) {\n                return false;\n            }\n        }\n        return true;\n    };\n    const reverse = (xs) => {\n        const r = nativeSlice.call(xs, 0);\n        r.reverse();\n        return r;\n    };\n    const difference = (a1, a2) => filter$2(a1, (x) => !contains$2(a2, x));\n    const mapToObject = (xs, f) => {\n        const r = {};\n        for (let i = 0, len = xs.length; i < len; i++) {\n            const x = xs[i];\n            r[String(x)] = f(x, i);\n        }\n        return r;\n    };\n    const pure$2 = (x) => [x];\n    const sort = (xs, comparator) => {\n        const copy = nativeSlice.call(xs, 0);\n        copy.sort(comparator);\n        return copy;\n    };\n    const get$i = (xs, i) => i >= 0 && i < xs.length ? Optional.some(xs[i]) : Optional.none();\n    const head = (xs) => get$i(xs, 0);\n    const last$1 = (xs) => get$i(xs, xs.length - 1);\n    const from = isFunction(Array.from) ? Array.from : (x) => nativeSlice.call(x);\n    const findMap = (arr, f) => {\n        for (let i = 0; i < arr.length; i++) {\n            const r = f(arr[i], i);\n            if (r.isSome()) {\n                return r;\n            }\n        }\n        return Optional.none();\n    };\n\n    // There are many variations of Object iteration that are faster than the 'for-in' style:\n    // http://jsperf.com/object-keys-iteration/107\n    //\n    // Use the native keys if it is available (IE9+), otherwise fall back to manually filtering\n    const keys = Object.keys;\n    const hasOwnProperty = Object.hasOwnProperty;\n    const each = (obj, f) => {\n        const props = keys(obj);\n        for (let k = 0, len = props.length; k < len; k++) {\n            const i = props[k];\n            const x = obj[i];\n            f(x, i);\n        }\n    };\n    const map$1 = (obj, f) => {\n        return tupleMap(obj, (x, i) => ({\n            k: i,\n            v: f(x, i)\n        }));\n    };\n    const tupleMap = (obj, f) => {\n        const r = {};\n        each(obj, (x, i) => {\n            const tuple = f(x, i);\n            r[tuple.k] = tuple.v;\n        });\n        return r;\n    };\n    const objAcc = (r) => (x, i) => {\n        r[i] = x;\n    };\n    const internalFilter = (obj, pred, onTrue, onFalse) => {\n        each(obj, (x, i) => {\n            (pred(x, i) ? onTrue : onFalse)(x, i);\n        });\n    };\n    const bifilter = (obj, pred) => {\n        const t = {};\n        const f = {};\n        internalFilter(obj, pred, objAcc(t), objAcc(f));\n        return { t, f };\n    };\n    const filter$1 = (obj, pred) => {\n        const t = {};\n        internalFilter(obj, pred, objAcc(t), noop);\n        return t;\n    };\n    const mapToArray = (obj, f) => {\n        const r = [];\n        each(obj, (value, name) => {\n            r.push(f(value, name));\n        });\n        return r;\n    };\n    const find$4 = (obj, pred) => {\n        const props = keys(obj);\n        for (let k = 0, len = props.length; k < len; k++) {\n            const i = props[k];\n            const x = obj[i];\n            if (pred(x, i, obj)) {\n                return Optional.some(x);\n            }\n        }\n        return Optional.none();\n    };\n    const values = (obj) => {\n        return mapToArray(obj, identity);\n    };\n    const get$h = (obj, key) => {\n        return has$2(obj, key) ? Optional.from(obj[key]) : Optional.none();\n    };\n    const has$2 = (obj, key) => hasOwnProperty.call(obj, key);\n    const hasNonNullableKey = (obj, key) => has$2(obj, key) && obj[key] !== undefined && obj[key] !== null;\n\n    /*\n     * Generates a church encoded ADT (https://en.wikipedia.org/wiki/Church_encoding)\n     * For syntax and use, look at the test code.\n     */\n    const generate$7 = (cases) => {\n        // validation\n        if (!isArray(cases)) {\n            throw new Error('cases must be an array');\n        }\n        if (cases.length === 0) {\n            throw new Error('there must be at least one case');\n        }\n        const constructors = [];\n        // adt is mutated to add the individual cases\n        const adt = {};\n        each$1(cases, (acase, count) => {\n            const keys$1 = keys(acase);\n            // validation\n            if (keys$1.length !== 1) {\n                throw new Error('one and only one name per case');\n            }\n            const key = keys$1[0];\n            const value = acase[key];\n            // validation\n            if (adt[key] !== undefined) {\n                throw new Error('duplicate key detected:' + key);\n            }\n            else if (key === 'cata') {\n                throw new Error('cannot have a case named cata (sorry)');\n            }\n            else if (!isArray(value)) {\n                // this implicitly checks if acase is an object\n                throw new Error('case arguments must be an array');\n            }\n            constructors.push(key);\n            //\n            // constructor for key\n            //\n            adt[key] = (...args) => {\n                const argLength = args.length;\n                // validation\n                if (argLength !== value.length) {\n                    throw new Error('Wrong number of arguments to case ' + key + '. Expected ' + value.length + ' (' + value + '), got ' + argLength);\n                }\n                const match = (branches) => {\n                    const branchKeys = keys(branches);\n                    if (constructors.length !== branchKeys.length) {\n                        throw new Error('Wrong number of arguments to match. Expected: ' + constructors.join(',') + '\\nActual: ' + branchKeys.join(','));\n                    }\n                    const allReqd = forall(constructors, (reqKey) => {\n                        return contains$2(branchKeys, reqKey);\n                    });\n                    if (!allReqd) {\n                        throw new Error('Not all branches were specified when using match. Specified: ' + branchKeys.join(', ') + '\\nRequired: ' + constructors.join(', '));\n                    }\n                    return branches[key].apply(null, args);\n                };\n                //\n                // the fold function for key\n                //\n                return {\n                    fold: (...foldArgs) => {\n                        // runtime validation\n                        if (foldArgs.length !== cases.length) {\n                            throw new Error('Wrong number of arguments to fold. Expected ' + cases.length + ', got ' + foldArgs.length);\n                        }\n                        const target = foldArgs[count];\n                        return target.apply(null, args);\n                    },\n                    match,\n                    // NOTE: Only for debugging.\n                    log: (label) => {\n                        // eslint-disable-next-line no-console\n                        console.log(label, {\n                            constructors,\n                            constructor: key,\n                            params: args\n                        });\n                    }\n                };\n            };\n        });\n        return adt;\n    };\n    const Adt = {\n        generate: generate$7\n    };\n\n    const Cell = (initial) => {\n        let value = initial;\n        const get = () => {\n            return value;\n        };\n        const set = (v) => {\n            value = v;\n        };\n        return {\n            get,\n            set\n        };\n    };\n\n    const nu$d = (baseFn) => {\n        let data = Optional.none();\n        let callbacks = [];\n        /** map :: this LazyValue a -> (a -> b) -> LazyValue b */\n        const map = (f) => nu$d((nCallback) => {\n            get((data) => {\n                nCallback(f(data));\n            });\n        });\n        const get = (nCallback) => {\n            if (isReady()) {\n                call(nCallback);\n            }\n            else {\n                callbacks.push(nCallback);\n            }\n        };\n        const set = (x) => {\n            if (!isReady()) {\n                data = Optional.some(x);\n                run(callbacks);\n                callbacks = [];\n            }\n        };\n        const isReady = () => data.isSome();\n        const run = (cbs) => {\n            each$1(cbs, call);\n        };\n        const call = (cb) => {\n            data.each((x) => {\n                setTimeout(() => {\n                    cb(x);\n                }, 0);\n            });\n        };\n        // Lazy values cache the value and kick off immediately\n        baseFn(set);\n        return {\n            get,\n            map,\n            isReady\n        };\n    };\n    const pure$1 = (a) => nu$d((callback) => {\n        callback(a);\n    });\n    const LazyValue = {\n        nu: nu$d,\n        pure: pure$1\n    };\n\n    const errorReporter = (err) => {\n        // we can not throw the error in the reporter as it will just be black-holed\n        // by the Promise so we use a setTimeout to escape the Promise.\n        setTimeout(() => {\n            throw err;\n        }, 0);\n    };\n    const make$8 = (run) => {\n        const get = (callback) => {\n            run().then(callback, errorReporter);\n        };\n        /** map :: this Future a -> (a -> b) -> Future b */\n        const map = (fab) => {\n            return make$8(() => run().then(fab));\n        };\n        /** bind :: this Future a -> (a -> Future b) -> Future b */\n        const bind = (aFutureB) => {\n            return make$8(() => run().then((v) => aFutureB(v).toPromise()));\n        };\n        /** anonBind :: this Future a -> Future b -> Future b\n         *  Returns a future, which evaluates the first future, ignores the result, then evaluates the second.\n         */\n        const anonBind = (futureB) => {\n            return make$8(() => run().then(() => futureB.toPromise()));\n        };\n        const toLazy = () => {\n            return LazyValue.nu(get);\n        };\n        const toCached = () => {\n            let cache = null;\n            return make$8(() => {\n                if (cache === null) {\n                    cache = run();\n                }\n                return cache;\n            });\n        };\n        const toPromise = run;\n        return {\n            map,\n            bind,\n            anonBind,\n            toLazy,\n            toCached,\n            toPromise,\n            get\n        };\n    };\n    const nu$c = (baseFn) => {\n        return make$8(() => new Promise(baseFn));\n    };\n    /** a -> Future a */\n    const pure = (a) => {\n        return make$8(() => Promise.resolve(a));\n    };\n    const Future = {\n        nu: nu$c,\n        pure\n    };\n\n    /**\n     * Creates a new `Result<T, E>` that **does** contain a value.\n     */\n    const value$4 = (value) => {\n        const applyHelper = (fn) => fn(value);\n        const constHelper = constant$1(value);\n        const outputHelper = () => output;\n        const output = {\n            // Debug info\n            tag: true,\n            inner: value,\n            // Actual Result methods\n            fold: (_onError, onValue) => onValue(value),\n            isValue: always,\n            isError: never,\n            map: (mapper) => Result.value(mapper(value)),\n            mapError: outputHelper,\n            bind: applyHelper,\n            exists: applyHelper,\n            forall: applyHelper,\n            getOr: constHelper,\n            or: outputHelper,\n            getOrThunk: constHelper,\n            orThunk: outputHelper,\n            getOrDie: constHelper,\n            each: (fn) => {\n                // Can't write the function inline because we don't want to return something by mistake\n                fn(value);\n            },\n            toOptional: () => Optional.some(value),\n        };\n        return output;\n    };\n    /**\n     * Creates a new `Result<T, E>` that **does not** contain a value, and therefore\n     * contains an error.\n     */\n    const error$1 = (error) => {\n        const outputHelper = () => output;\n        const output = {\n            // Debug info\n            tag: false,\n            inner: error,\n            // Actual Result methods\n            fold: (onError, _onValue) => onError(error),\n            isValue: never,\n            isError: always,\n            map: outputHelper,\n            mapError: (mapper) => Result.error(mapper(error)),\n            bind: outputHelper,\n            exists: never,\n            forall: always,\n            getOr: identity,\n            or: identity,\n            getOrThunk: apply$1,\n            orThunk: apply$1,\n            getOrDie: die(String(error)),\n            each: noop,\n            toOptional: Optional.none,\n        };\n        return output;\n    };\n    /**\n     * Creates a new `Result<T, E>` from an `Optional<T>` and an `E`. If the\n     * `Optional` contains a value, so will the outputted `Result`. If it does not,\n     * the outputted `Result` will contain an error (and that error will be the\n     * error passed in).\n     */\n    const fromOption = (optional, err) => optional.fold(() => error$1(err), value$4);\n    const Result = {\n        value: value$4,\n        error: error$1,\n        fromOption\n    };\n\n    const wrap$2 = (delegate) => {\n        const toCached = () => {\n            return wrap$2(delegate.toCached());\n        };\n        const bindFuture = (f) => {\n            return wrap$2(delegate.bind((resA) => resA.fold((err) => (Future.pure(Result.error(err))), (a) => f(a))));\n        };\n        const bindResult = (f) => {\n            return wrap$2(delegate.map((resA) => resA.bind(f)));\n        };\n        const mapResult = (f) => {\n            return wrap$2(delegate.map((resA) => resA.map(f)));\n        };\n        const mapError = (f) => {\n            return wrap$2(delegate.map((resA) => resA.mapError(f)));\n        };\n        const foldResult = (whenError, whenValue) => {\n            return delegate.map((res) => res.fold(whenError, whenValue));\n        };\n        const withTimeout = (timeout, errorThunk) => {\n            return wrap$2(Future.nu((callback) => {\n                let timedOut = false;\n                const timer = setTimeout(() => {\n                    timedOut = true;\n                    callback(Result.error(errorThunk()));\n                }, timeout);\n                delegate.get((result) => {\n                    if (!timedOut) {\n                        clearTimeout(timer);\n                        callback(result);\n                    }\n                });\n            }));\n        };\n        return {\n            ...delegate,\n            toCached,\n            bindFuture,\n            bindResult,\n            mapResult,\n            mapError,\n            foldResult,\n            withTimeout\n        };\n    };\n    const nu$b = (worker) => {\n        return wrap$2(Future.nu(worker));\n    };\n    const value$3 = (value) => {\n        return wrap$2(Future.pure(Result.value(value)));\n    };\n    const error = (error) => {\n        return wrap$2(Future.pure(Result.error(error)));\n    };\n    const fromResult$1 = (result) => {\n        return wrap$2(Future.pure(result));\n    };\n    const fromFuture = (future) => {\n        return wrap$2(future.map(Result.value));\n    };\n    const fromPromise = (promise) => {\n        return nu$b((completer) => {\n            promise.then((value) => {\n                completer(Result.value(value));\n            }, (error) => {\n                completer(Result.error(error));\n            });\n        });\n    };\n    const FutureResult = {\n        nu: nu$b,\n        wrap: wrap$2,\n        pure: value$3,\n        value: value$3,\n        error,\n        fromResult: fromResult$1,\n        fromFuture,\n        fromPromise\n    };\n\n    // Use window object as the global if it's available since CSP will block script evals\n    // eslint-disable-next-line @typescript-eslint/no-implied-eval\n    const Global = typeof window !== 'undefined' ? window : Function('return this;')();\n\n    /**\n     * Adds two numbers, and wrap to a range.\n     * If the result overflows to the right, snap to the left.\n     * If the result overflows to the left, snap to the right.\n     */\n    const cycleBy = (value, delta, min, max) => {\n        const r = value + delta;\n        if (r > max) {\n            return min;\n        }\n        else if (r < min) {\n            return max;\n        }\n        else {\n            return r;\n        }\n    };\n    // ASSUMPTION: Max will always be larger than min\n    const clamp = (value, min, max) => Math.min(Math.max(value, min), max);\n    // the division is meant to get a number between 0 and 1 for more information check this discussion: https://stackoverflow.com/questions/58285941/how-to-replace-math-random-with-crypto-getrandomvalues-and-keep-same-result\n    const random = () => window.crypto.getRandomValues(new Uint32Array(1))[0] / 4294967295;\n\n    /**\n     * Generate a unique identifier.\n     *\n     * The unique portion of the identifier only contains an underscore\n     * and digits, so that it may safely be used within HTML attributes.\n     *\n     * The chance of generating a non-unique identifier has been minimized\n     * by combining the current time, a random number and a one-up counter.\n     *\n     * generate :: String -> String\n     */\n    let unique = 0;\n    const generate$6 = (prefix) => {\n        const date = new Date();\n        const time = date.getTime();\n        const random$1 = Math.floor(random() * 1000000000);\n        unique++;\n        return prefix + '_' + random$1 + unique + String(time);\n    };\n\n    const shallow$1 = (old, nu) => {\n        return nu;\n    };\n    const deep$1 = (old, nu) => {\n        const bothObjects = isPlainObject(old) && isPlainObject(nu);\n        return bothObjects ? deepMerge(old, nu) : nu;\n    };\n    const baseMerge = (merger) => {\n        return (...objects) => {\n            if (objects.length === 0) {\n                throw new Error(`Can't merge zero objects`);\n            }\n            const ret = {};\n            for (let j = 0; j < objects.length; j++) {\n                const curObject = objects[j];\n                for (const key in curObject) {\n                    if (has$2(curObject, key)) {\n                        ret[key] = merger(ret[key], curObject[key]);\n                    }\n                }\n            }\n            return ret;\n        };\n    };\n    const deepMerge = baseMerge(deep$1);\n    const merge$1 = baseMerge(shallow$1);\n\n    /**\n     * **Is** the value stored inside this Optional object equal to `rhs`?\n     */\n    const is$1 = (lhs, rhs, comparator = tripleEquals) => lhs.exists((left) => comparator(left, rhs));\n    /**\n     * Are these two Optional objects equal? Equality here means either they're both\n     * `Some` (and the values are equal under the comparator) or they're both `None`.\n     */\n    const equals = (lhs, rhs, comparator = tripleEquals) => lift2(lhs, rhs, comparator).getOr(lhs.isNone() && rhs.isNone());\n    const cat = (arr) => {\n        const r = [];\n        const push = (x) => {\n            r.push(x);\n        };\n        for (let i = 0; i < arr.length; i++) {\n            arr[i].each(push);\n        }\n        return r;\n    };\n    const sequence = (arr) => {\n        const r = [];\n        for (let i = 0; i < arr.length; i++) {\n            const x = arr[i];\n            if (x.isSome()) {\n                r.push(x.getOrDie());\n            }\n            else {\n                return Optional.none();\n            }\n        }\n        return Optional.some(r);\n    };\n    /*\n    Notes on the lift functions:\n    - We used to have a generic liftN, but we were concerned about its type-safety, and the below variants were faster in microbenchmarks.\n    - The getOrDie calls are partial functions, but are checked beforehand. This is faster and more convenient (but less safe) than folds.\n    - && is used instead of a loop for simplicity and performance.\n    */\n    const lift2 = (oa, ob, f) => oa.isSome() && ob.isSome() ? Optional.some(f(oa.getOrDie(), ob.getOrDie())) : Optional.none();\n    const lift3 = (oa, ob, oc, f) => oa.isSome() && ob.isSome() && oc.isSome() ? Optional.some(f(oa.getOrDie(), ob.getOrDie(), oc.getOrDie())) : Optional.none();\n    const mapFrom = (a, f) => (a !== undefined && a !== null) ? Optional.some(f(a)) : Optional.none();\n    // This can help with type inference, by specifying the type param on the none case, so the caller doesn't have to.\n    const someIf = (b, a) => b ? Optional.some(a) : Optional.none();\n\n    // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping\n    const escape = (text) => text.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n\n    /** path :: ([String], JsObj?) -> JsObj */\n    const path$1 = (parts, scope) => {\n        let o = scope !== undefined && scope !== null ? scope : Global;\n        for (let i = 0; i < parts.length && o !== undefined && o !== null; ++i) {\n            o = o[parts[i]];\n        }\n        return o;\n    };\n    /** resolve :: (String, JsObj?) -> JsObj */\n    const resolve = (p, scope) => {\n        const parts = p.split('.');\n        return path$1(parts, scope);\n    };\n\n    Adt.generate([\n        { bothErrors: ['error1', 'error2'] },\n        { firstError: ['error1', 'value2'] },\n        { secondError: ['value1', 'error2'] },\n        { bothValues: ['value1', 'value2'] }\n    ]);\n    /** partition :: [Result a] -> { errors: [String], values: [a] } */\n    const partition$2 = (results) => {\n        const errors = [];\n        const values = [];\n        each$1(results, (result) => {\n            result.fold((err) => {\n                errors.push(err);\n            }, (value) => {\n                values.push(value);\n            });\n        });\n        return { errors, values };\n    };\n\n    const singleton$1 = (doRevoke) => {\n        const subject = Cell(Optional.none());\n        const revoke = () => subject.get().each(doRevoke);\n        const clear = () => {\n            revoke();\n            subject.set(Optional.none());\n        };\n        const isSet = () => subject.get().isSome();\n        const get = () => subject.get();\n        const set = (s) => {\n            revoke();\n            subject.set(Optional.some(s));\n        };\n        return {\n            clear,\n            isSet,\n            get,\n            set\n        };\n    };\n    const destroyable = () => singleton$1((s) => s.destroy());\n    const unbindable = () => singleton$1((s) => s.unbind());\n    const value$2 = () => {\n        const subject = singleton$1(noop);\n        const on = (f) => subject.get().each(f);\n        return {\n            ...subject,\n            on\n        };\n    };\n\n    const addToEnd = (str, suffix) => {\n        return str + suffix;\n    };\n    const removeFromStart = (str, numChars) => {\n        return str.substring(numChars);\n    };\n\n    const checkRange = (str, substr, start) => substr === '' || str.length >= substr.length && str.substr(start, start + substr.length) === substr;\n    const removeLeading = (str, prefix) => {\n        return startsWith(str, prefix) ? removeFromStart(str, prefix.length) : str;\n    };\n    const ensureTrailing = (str, suffix) => {\n        return endsWith(str, suffix) ? str : addToEnd(str, suffix);\n    };\n    const contains$1 = (str, substr, start = 0, end) => {\n        const idx = str.indexOf(substr, start);\n        if (idx !== -1) {\n            return isUndefined(end) ? true : idx + substr.length <= end;\n        }\n        else {\n            return false;\n        }\n    };\n    /** Does 'str' start with 'prefix'?\n     *  Note: all strings start with the empty string.\n     *        More formally, for all strings x, startsWith(x, \"\").\n     *        This is so that for all strings x and y, startsWith(y + x, y)\n     */\n    const startsWith = (str, prefix) => {\n        return checkRange(str, prefix, 0);\n    };\n    /** Does 'str' end with 'suffix'?\n     *  Note: all strings end with the empty string.\n     *        More formally, for all strings x, endsWith(x, \"\").\n     *        This is so that for all strings x and y, endsWith(x + y, y)\n     */\n    const endsWith = (str, suffix) => {\n        return checkRange(str, suffix, str.length - suffix.length);\n    };\n    const blank = (r) => (s) => s.replace(r, '');\n    /** removes all leading and trailing spaces */\n    const trim$1 = blank(/^\\s+|\\s+$/g);\n    const isNotEmpty = (s) => s.length > 0;\n    const isEmpty = (s) => !isNotEmpty(s);\n    const toFloat = (value) => {\n        const num = parseFloat(value);\n        return isNaN(num) ? Optional.none() : Optional.some(num);\n    };\n\n    // Run a function fn after rate ms. If another invocation occurs\n    // during the time it is waiting, update the arguments f will run\n    // with (but keep the current schedule)\n    const adaptable = (fn, rate) => {\n        let timer = null;\n        let args = null;\n        const cancel = () => {\n            if (!isNull(timer)) {\n                clearTimeout(timer);\n                timer = null;\n                args = null;\n            }\n        };\n        const throttle = (...newArgs) => {\n            args = newArgs;\n            if (isNull(timer)) {\n                timer = setTimeout(() => {\n                    const tempArgs = args;\n                    timer = null;\n                    args = null;\n                    fn.apply(null, tempArgs);\n                }, rate);\n            }\n        };\n        return {\n            cancel,\n            throttle\n        };\n    };\n    // Run a function fn after rate ms. If another invocation occurs\n    // during the time it is waiting, ignore it completely.\n    const first$1 = (fn, rate) => {\n        let timer = null;\n        const cancel = () => {\n            if (!isNull(timer)) {\n                clearTimeout(timer);\n                timer = null;\n            }\n        };\n        const throttle = (...args) => {\n            if (isNull(timer)) {\n                timer = setTimeout(() => {\n                    timer = null;\n                    fn.apply(null, args);\n                }, rate);\n            }\n        };\n        return {\n            cancel,\n            throttle\n        };\n    };\n    // Run a function fn after rate ms. If another invocation occurs\n    // during the time it is waiting, reschedule the function again\n    // with the new arguments.\n    const last = (fn, rate) => {\n        let timer = null;\n        const cancel = () => {\n            if (!isNull(timer)) {\n                clearTimeout(timer);\n                timer = null;\n            }\n        };\n        const throttle = (...args) => {\n            cancel();\n            timer = setTimeout(() => {\n                timer = null;\n                fn.apply(null, args);\n            }, rate);\n        };\n        return {\n            cancel,\n            throttle\n        };\n    };\n\n    const cached = (f) => {\n        let called = false;\n        let r;\n        return (...args) => {\n            if (!called) {\n                called = true;\n                r = f.apply(null, args);\n            }\n            return r;\n        };\n    };\n\n    const zeroWidth = '\\uFEFF';\n    const nbsp = '\\u00A0';\n\n    const fromHtml$2 = (html, scope) => {\n        const doc = scope || document;\n        const div = doc.createElement('div');\n        div.innerHTML = html;\n        if (!div.hasChildNodes() || div.childNodes.length > 1) {\n            const message = 'HTML does not have a single root node';\n            // eslint-disable-next-line no-console\n            console.error(message, html);\n            throw new Error(message);\n        }\n        return fromDom(div.childNodes[0]);\n    };\n    const fromTag = (tag, scope) => {\n        const doc = scope || document;\n        const node = doc.createElement(tag);\n        return fromDom(node);\n    };\n    const fromText = (text, scope) => {\n        const doc = scope || document;\n        const node = doc.createTextNode(text);\n        return fromDom(node);\n    };\n    const fromDom = (node) => {\n        // TODO: Consider removing this check, but left atm for safety\n        if (node === null || node === undefined) {\n            throw new Error('Node cannot be null or undefined');\n        }\n        return {\n            dom: node\n        };\n    };\n    const fromPoint = (docElm, x, y) => Optional.from(docElm.dom.elementFromPoint(x, y)).map(fromDom);\n    // tslint:disable-next-line:variable-name\n    const SugarElement = {\n        fromHtml: fromHtml$2,\n        fromTag,\n        fromText,\n        fromDom,\n        fromPoint\n    };\n\n    // NOTE: Mutates the range.\n    const setStart = (rng, situ) => {\n        situ.fold((e) => {\n            rng.setStartBefore(e.dom);\n        }, (e, o) => {\n            rng.setStart(e.dom, o);\n        }, (e) => {\n            rng.setStartAfter(e.dom);\n        });\n    };\n    const setFinish = (rng, situ) => {\n        situ.fold((e) => {\n            rng.setEndBefore(e.dom);\n        }, (e, o) => {\n            rng.setEnd(e.dom, o);\n        }, (e) => {\n            rng.setEndAfter(e.dom);\n        });\n    };\n    const relativeToNative = (win, startSitu, finishSitu) => {\n        const range = win.document.createRange();\n        setStart(range, startSitu);\n        setFinish(range, finishSitu);\n        return range;\n    };\n    const exactToNative = (win, start, soffset, finish, foffset) => {\n        const rng = win.document.createRange();\n        rng.setStart(start.dom, soffset);\n        rng.setEnd(finish.dom, foffset);\n        return rng;\n    };\n    const toRect = (rect) => ({\n        left: rect.left,\n        top: rect.top,\n        right: rect.right,\n        bottom: rect.bottom,\n        width: rect.width,\n        height: rect.height\n    });\n    const getFirstRect$1 = (rng) => {\n        const rects = rng.getClientRects();\n        // ASSUMPTION: The first rectangle is the start of the selection\n        const rect = rects.length > 0 ? rects[0] : rng.getBoundingClientRect();\n        return rect.width > 0 || rect.height > 0 ? Optional.some(rect).map(toRect) : Optional.none();\n    };\n    const getBounds$3 = (rng) => {\n        const rect = rng.getBoundingClientRect();\n        return rect.width > 0 || rect.height > 0 ? Optional.some(rect).map(toRect) : Optional.none();\n    };\n\n    const adt$a = Adt.generate([\n        { ltr: ['start', 'soffset', 'finish', 'foffset'] },\n        { rtl: ['start', 'soffset', 'finish', 'foffset'] }\n    ]);\n    const fromRange = (win, type, range) => type(SugarElement.fromDom(range.startContainer), range.startOffset, SugarElement.fromDom(range.endContainer), range.endOffset);\n    const getRanges = (win, selection) => selection.match({\n        domRange: (rng) => {\n            return {\n                ltr: constant$1(rng),\n                rtl: Optional.none\n            };\n        },\n        relative: (startSitu, finishSitu) => {\n            return {\n                ltr: cached(() => relativeToNative(win, startSitu, finishSitu)),\n                rtl: cached(() => Optional.some(relativeToNative(win, finishSitu, startSitu)))\n            };\n        },\n        exact: (start, soffset, finish, foffset) => {\n            return {\n                ltr: cached(() => exactToNative(win, start, soffset, finish, foffset)),\n                rtl: cached(() => Optional.some(exactToNative(win, finish, foffset, start, soffset)))\n            };\n        }\n    });\n    const doDiagnose = (win, ranges) => {\n        // If we cannot create a ranged selection from start > finish, it could be RTL\n        const rng = ranges.ltr();\n        if (rng.collapsed) {\n            // Let's check if it's RTL ... if it is, then reversing the direction will not be collapsed\n            const reversed = ranges.rtl().filter((rev) => rev.collapsed === false);\n            return reversed.map((rev) => \n            // We need to use \"reversed\" here, because the original only has one point (collapsed)\n            adt$a.rtl(SugarElement.fromDom(rev.endContainer), rev.endOffset, SugarElement.fromDom(rev.startContainer), rev.startOffset)).getOrThunk(() => fromRange(win, adt$a.ltr, rng));\n        }\n        else {\n            return fromRange(win, adt$a.ltr, rng);\n        }\n    };\n    const diagnose = (win, selection) => {\n        const ranges = getRanges(win, selection);\n        return doDiagnose(win, ranges);\n    };\n    const asLtrRange = (win, selection) => {\n        const diagnosis = diagnose(win, selection);\n        return diagnosis.match({\n            ltr: (start, soffset, finish, foffset) => {\n                const rng = win.document.createRange();\n                rng.setStart(start.dom, soffset);\n                rng.setEnd(finish.dom, foffset);\n                return rng;\n            },\n            rtl: (start, soffset, finish, foffset) => {\n                // NOTE: Reversing start and finish\n                const rng = win.document.createRange();\n                rng.setStart(finish.dom, foffset);\n                rng.setEnd(start.dom, soffset);\n                return rng;\n            }\n        });\n    };\n    adt$a.ltr;\n    adt$a.rtl;\n\n    const DOCUMENT = 9;\n    const DOCUMENT_FRAGMENT = 11;\n    const ELEMENT = 1;\n    const TEXT = 3;\n\n    const is = (element, selector) => {\n        const dom = element.dom;\n        if (dom.nodeType !== ELEMENT) {\n            return false;\n        }\n        else {\n            const elem = dom;\n            if (elem.matches !== undefined) {\n                return elem.matches(selector);\n            }\n            else if (elem.msMatchesSelector !== undefined) {\n                return elem.msMatchesSelector(selector);\n            }\n            else if (elem.webkitMatchesSelector !== undefined) {\n                return elem.webkitMatchesSelector(selector);\n            }\n            else if (elem.mozMatchesSelector !== undefined) {\n                // cast to any as mozMatchesSelector doesn't exist in TS DOM lib\n                return elem.mozMatchesSelector(selector);\n            }\n            else {\n                throw new Error('Browser lacks native selectors');\n            } // unfortunately we can't throw this on startup :(\n        }\n    };\n    const bypassSelector = (dom) => \n    // Only elements, documents and shadow roots support querySelector\n    // shadow root element type is DOCUMENT_FRAGMENT\n    dom.nodeType !== ELEMENT && dom.nodeType !== DOCUMENT && dom.nodeType !== DOCUMENT_FRAGMENT ||\n        // IE fix for complex queries on empty nodes: http://jsfiddle.net/spyder/fv9ptr5L/\n        dom.childElementCount === 0;\n    const all$3 = (selector, scope) => {\n        const base = scope === undefined ? document : scope.dom;\n        return bypassSelector(base) ? [] : map$2(base.querySelectorAll(selector), SugarElement.fromDom);\n    };\n    const one = (selector, scope) => {\n        const base = scope === undefined ? document : scope.dom;\n        return bypassSelector(base) ? Optional.none() : Optional.from(base.querySelector(selector)).map(SugarElement.fromDom);\n    };\n\n    const eq = (e1, e2) => e1.dom === e2.dom;\n    // Returns: true if node e1 contains e2, otherwise false.\n    // (returns false if e1===e2: A node does not contain itself).\n    const contains = (e1, e2) => {\n        const d1 = e1.dom;\n        const d2 = e2.dom;\n        return d1 === d2 ? false : d1.contains(d2);\n    };\n\n    const DeviceType = (os, browser, userAgent, mediaMatch) => {\n        const isiPad = os.isiOS() && /ipad/i.test(userAgent) === true;\n        const isiPhone = os.isiOS() && !isiPad;\n        const isMobile = os.isiOS() || os.isAndroid();\n        const isTouch = isMobile || mediaMatch('(pointer:coarse)');\n        const isTablet = isiPad || !isiPhone && isMobile && mediaMatch('(min-device-width:768px)');\n        const isPhone = isiPhone || isMobile && !isTablet;\n        const iOSwebview = browser.isSafari() && os.isiOS() && /safari/i.test(userAgent) === false;\n        const isDesktop = !isPhone && !isTablet && !iOSwebview;\n        return {\n            isiPad: constant$1(isiPad),\n            isiPhone: constant$1(isiPhone),\n            isTablet: constant$1(isTablet),\n            isPhone: constant$1(isPhone),\n            isTouch: constant$1(isTouch),\n            isAndroid: os.isAndroid,\n            isiOS: os.isiOS,\n            isWebView: constant$1(iOSwebview),\n            isDesktop: constant$1(isDesktop)\n        };\n    };\n\n    const firstMatch = (regexes, s) => {\n        for (let i = 0; i < regexes.length; i++) {\n            const x = regexes[i];\n            if (x.test(s)) {\n                return x;\n            }\n        }\n        return undefined;\n    };\n    const find$3 = (regexes, agent) => {\n        const r = firstMatch(regexes, agent);\n        if (!r) {\n            return { major: 0, minor: 0 };\n        }\n        const group = (i) => {\n            return Number(agent.replace(r, '$' + i));\n        };\n        return nu$a(group(1), group(2));\n    };\n    const detect$4 = (versionRegexes, agent) => {\n        const cleanedAgent = String(agent).toLowerCase();\n        if (versionRegexes.length === 0) {\n            return unknown$3();\n        }\n        return find$3(versionRegexes, cleanedAgent);\n    };\n    const unknown$3 = () => {\n        return nu$a(0, 0);\n    };\n    const nu$a = (major, minor) => {\n        return { major, minor };\n    };\n    const Version = {\n        nu: nu$a,\n        detect: detect$4,\n        unknown: unknown$3\n    };\n\n    const detectBrowser$1 = (browsers, userAgentData) => {\n        return findMap(userAgentData.brands, (uaBrand) => {\n            const lcBrand = uaBrand.brand.toLowerCase();\n            return find$5(browsers, (browser) => lcBrand === browser.brand?.toLowerCase())\n                .map((info) => ({\n                current: info.name,\n                version: Version.nu(parseInt(uaBrand.version, 10), 0)\n            }));\n        });\n    };\n\n    const detect$3 = (candidates, userAgent) => {\n        const agent = String(userAgent).toLowerCase();\n        return find$5(candidates, (candidate) => {\n            return candidate.search(agent);\n        });\n    };\n    // They (browser and os) are the same at the moment, but they might\n    // not stay that way.\n    const detectBrowser = (browsers, userAgent) => {\n        return detect$3(browsers, userAgent).map((browser) => {\n            const version = Version.detect(browser.versionRegexes, userAgent);\n            return {\n                current: browser.name,\n                version\n            };\n        });\n    };\n    const detectOs = (oses, userAgent) => {\n        return detect$3(oses, userAgent).map((os) => {\n            const version = Version.detect(os.versionRegexes, userAgent);\n            return {\n                current: os.name,\n                version\n            };\n        });\n    };\n\n    const normalVersionRegex = /.*?version\\/\\ ?([0-9]+)\\.([0-9]+).*/;\n    const checkContains = (target) => {\n        return (uastring) => {\n            return contains$1(uastring, target);\n        };\n    };\n    const browsers = [\n        // This is legacy Edge\n        {\n            name: 'Edge',\n            versionRegexes: [/.*?edge\\/ ?([0-9]+)\\.([0-9]+)$/],\n            search: (uastring) => {\n                return contains$1(uastring, 'edge/') && contains$1(uastring, 'chrome') && contains$1(uastring, 'safari') && contains$1(uastring, 'applewebkit');\n            }\n        },\n        // This is Google Chrome and Chromium Edge\n        {\n            name: 'Chromium',\n            brand: 'Chromium',\n            versionRegexes: [/.*?chrome\\/([0-9]+)\\.([0-9]+).*/, normalVersionRegex],\n            search: (uastring) => {\n                return contains$1(uastring, 'chrome') && !contains$1(uastring, 'chromeframe');\n            }\n        },\n        {\n            name: 'IE',\n            versionRegexes: [/.*?msie\\ ?([0-9]+)\\.([0-9]+).*/, /.*?rv:([0-9]+)\\.([0-9]+).*/],\n            search: (uastring) => {\n                return contains$1(uastring, 'msie') || contains$1(uastring, 'trident');\n            }\n        },\n        // INVESTIGATE: Is this still the Opera user agent?\n        {\n            name: 'Opera',\n            versionRegexes: [normalVersionRegex, /.*?opera\\/([0-9]+)\\.([0-9]+).*/],\n            search: checkContains('opera')\n        },\n        {\n            name: 'Firefox',\n            versionRegexes: [/.*?firefox\\/\\ ?([0-9]+)\\.([0-9]+).*/],\n            search: checkContains('firefox')\n        },\n        {\n            name: 'Safari',\n            versionRegexes: [normalVersionRegex, /.*?cpu os ([0-9]+)_([0-9]+).*/],\n            search: (uastring) => {\n                return (contains$1(uastring, 'safari') || contains$1(uastring, 'mobile/')) && contains$1(uastring, 'applewebkit');\n            }\n        }\n    ];\n    const oses = [\n        {\n            name: 'Windows',\n            search: checkContains('win'),\n            versionRegexes: [/.*?windows\\ nt\\ ?([0-9]+)\\.([0-9]+).*/]\n        },\n        {\n            name: 'iOS',\n            search: (uastring) => {\n                return contains$1(uastring, 'iphone') || contains$1(uastring, 'ipad');\n            },\n            versionRegexes: [/.*?version\\/\\ ?([0-9]+)\\.([0-9]+).*/, /.*cpu os ([0-9]+)_([0-9]+).*/, /.*cpu iphone os ([0-9]+)_([0-9]+).*/]\n        },\n        {\n            name: 'Android',\n            search: checkContains('android'),\n            versionRegexes: [/.*?android\\ ?([0-9]+)\\.([0-9]+).*/]\n        },\n        {\n            name: 'macOS',\n            search: checkContains('mac os x'),\n            versionRegexes: [/.*?mac\\ os\\ x\\ ?([0-9]+)_([0-9]+).*/]\n        },\n        {\n            name: 'Linux',\n            search: checkContains('linux'),\n            versionRegexes: []\n        },\n        { name: 'Solaris',\n            search: checkContains('sunos'),\n            versionRegexes: []\n        },\n        {\n            name: 'FreeBSD',\n            search: checkContains('freebsd'),\n            versionRegexes: []\n        },\n        {\n            name: 'ChromeOS',\n            search: checkContains('cros'),\n            versionRegexes: [/.*?chrome\\/([0-9]+)\\.([0-9]+).*/]\n        }\n    ];\n    const PlatformInfo = {\n        browsers: constant$1(browsers),\n        oses: constant$1(oses)\n    };\n\n    const edge = 'Edge';\n    const chromium = 'Chromium';\n    const ie = 'IE';\n    const opera = 'Opera';\n    const firefox = 'Firefox';\n    const safari = 'Safari';\n    const unknown$2 = () => {\n        return nu$9({\n            current: undefined,\n            version: Version.unknown()\n        });\n    };\n    const nu$9 = (info) => {\n        const current = info.current;\n        const version = info.version;\n        const isBrowser = (name) => () => current === name;\n        return {\n            current,\n            version,\n            isEdge: isBrowser(edge),\n            isChromium: isBrowser(chromium),\n            // NOTE: isIe just looks too weird\n            isIE: isBrowser(ie),\n            isOpera: isBrowser(opera),\n            isFirefox: isBrowser(firefox),\n            isSafari: isBrowser(safari)\n        };\n    };\n    const Browser = {\n        unknown: unknown$2,\n        nu: nu$9,\n        edge: constant$1(edge),\n        chromium: constant$1(chromium),\n        ie: constant$1(ie),\n        opera: constant$1(opera),\n        firefox: constant$1(firefox),\n        safari: constant$1(safari)\n    };\n\n    const windows = 'Windows';\n    const ios = 'iOS';\n    const android = 'Android';\n    const linux = 'Linux';\n    const macos = 'macOS';\n    const solaris = 'Solaris';\n    const freebsd = 'FreeBSD';\n    const chromeos = 'ChromeOS';\n    // Though there is a bit of dupe with this and Browser, trying to\n    // reuse code makes it much harder to follow and change.\n    const unknown$1 = () => {\n        return nu$8({\n            current: undefined,\n            version: Version.unknown()\n        });\n    };\n    const nu$8 = (info) => {\n        const current = info.current;\n        const version = info.version;\n        const isOS = (name) => () => current === name;\n        return {\n            current,\n            version,\n            isWindows: isOS(windows),\n            // TODO: Fix capitalisation\n            isiOS: isOS(ios),\n            isAndroid: isOS(android),\n            isMacOS: isOS(macos),\n            isLinux: isOS(linux),\n            isSolaris: isOS(solaris),\n            isFreeBSD: isOS(freebsd),\n            isChromeOS: isOS(chromeos)\n        };\n    };\n    const OperatingSystem = {\n        unknown: unknown$1,\n        nu: nu$8,\n        windows: constant$1(windows),\n        ios: constant$1(ios),\n        android: constant$1(android),\n        linux: constant$1(linux),\n        macos: constant$1(macos),\n        solaris: constant$1(solaris),\n        freebsd: constant$1(freebsd),\n        chromeos: constant$1(chromeos)\n    };\n\n    const detect$2 = (userAgent, userAgentDataOpt, mediaMatch) => {\n        const browsers = PlatformInfo.browsers();\n        const oses = PlatformInfo.oses();\n        const browser = userAgentDataOpt.bind((userAgentData) => detectBrowser$1(browsers, userAgentData))\n            .orThunk(() => detectBrowser(browsers, userAgent))\n            .fold(Browser.unknown, Browser.nu);\n        const os = detectOs(oses, userAgent).fold(OperatingSystem.unknown, OperatingSystem.nu);\n        const deviceType = DeviceType(os, browser, userAgent, mediaMatch);\n        return {\n            browser,\n            os,\n            deviceType\n        };\n    };\n    const PlatformDetection = {\n        detect: detect$2\n    };\n\n    const mediaMatch = (query) => window.matchMedia(query).matches;\n    // IMPORTANT: Must be in a thunk, otherwise rollup thinks calling this immediately\n    // causes side effects and won't tree shake this away\n    // Note: navigator.userAgentData is not part of the native typescript types yet\n    let platform = cached(() => PlatformDetection.detect(window.navigator.userAgent, Optional.from((window.navigator.userAgentData)), mediaMatch));\n    const detect$1 = () => platform();\n\n    const unsafe = (name, scope) => {\n        return resolve(name, scope);\n    };\n    const getOrDie$1 = (name, scope) => {\n        const actual = unsafe(name, scope);\n        if (actual === undefined || actual === null) {\n            throw new Error(name + ' not available on this browser');\n        }\n        return actual;\n    };\n\n    const getPrototypeOf$1 = Object.getPrototypeOf;\n    /*\n     * IE9 and above\n     *\n     * MDN no use on this one, but here's the link anyway:\n     * https://developer.mozilla.org/en/docs/Web/API/HTMLElement\n     */\n    const sandHTMLElement = (scope) => {\n        return getOrDie$1('HTMLElement', scope);\n    };\n    const isPrototypeOf = (x) => {\n        // use Resolve to get the window object for x and just return undefined if it can't find it.\n        // undefined scope later triggers using the global window.\n        const scope = resolve('ownerDocument.defaultView', x);\n        // TINY-7374: We can't rely on looking at the owner window HTMLElement as the element may have\n        // been constructed in a different window and then appended to the current window document.\n        return isObject(x) && (sandHTMLElement(scope).prototype.isPrototypeOf(x) || /^HTML\\w*Element$/.test(getPrototypeOf$1(x).constructor.name));\n    };\n\n    const name$3 = (element) => {\n        const r = element.dom.nodeName;\n        return r.toLowerCase();\n    };\n    const type$1 = (element) => element.dom.nodeType;\n    const isType = (t) => (element) => type$1(element) === t;\n    const isHTMLElement = (element) => isElement$1(element) && isPrototypeOf(element.dom);\n    const isElement$1 = isType(ELEMENT);\n    const isText = isType(TEXT);\n    const isDocument = isType(DOCUMENT);\n    const isDocumentFragment = isType(DOCUMENT_FRAGMENT);\n    const isTag = (tag) => (e) => isElement$1(e) && name$3(e) === tag;\n\n    /**\n     * The document associated with the current element\n     * NOTE: this will throw if the owner is null.\n     */\n    const owner$4 = (element) => SugarElement.fromDom(element.dom.ownerDocument);\n    /**\n     * If the element is a document, return it. Otherwise, return its ownerDocument.\n     * @param dos\n     */\n    const documentOrOwner = (dos) => isDocument(dos) ? dos : owner$4(dos);\n    const documentElement = (element) => SugarElement.fromDom(documentOrOwner(element).dom.documentElement);\n    /**\n     * The window element associated with the element\n     * NOTE: this will throw if the defaultView is null.\n     */\n    const defaultView = (element) => SugarElement.fromDom(documentOrOwner(element).dom.defaultView);\n    const parent = (element) => Optional.from(element.dom.parentNode).map(SugarElement.fromDom);\n    // Cast down to just be SugarElement<Node>\n    const parentNode = (element) => parent(element);\n    const parentElement = (element) => Optional.from(element.dom.parentElement).map(SugarElement.fromDom);\n    const parents = (element, isRoot) => {\n        const stop = isFunction(isRoot) ? isRoot : never;\n        // This is used a *lot* so it needs to be performant, not recursive\n        let dom = element.dom;\n        const ret = [];\n        while (dom.parentNode !== null && dom.parentNode !== undefined) {\n            const rawParent = dom.parentNode;\n            const p = SugarElement.fromDom(rawParent);\n            ret.push(p);\n            if (stop(p) === true) {\n                break;\n            }\n            else {\n                dom = rawParent;\n            }\n        }\n        return ret;\n    };\n    const offsetParent = (element) => Optional.from(element.dom.offsetParent).map(SugarElement.fromDom);\n    const prevSibling = (element) => Optional.from(element.dom.previousSibling).map(SugarElement.fromDom);\n    const nextSibling = (element) => Optional.from(element.dom.nextSibling).map(SugarElement.fromDom);\n    const children = (element) => map$2(element.dom.childNodes, SugarElement.fromDom);\n    const child$2 = (element, index) => {\n        const cs = element.dom.childNodes;\n        return Optional.from(cs[index]).map(SugarElement.fromDom);\n    };\n    const firstChild = (element) => child$2(element, 0);\n    const spot = (element, offset) => ({\n        element,\n        offset\n    });\n    const leaf = (element, offset) => {\n        const cs = children(element);\n        return cs.length > 0 && offset < cs.length ? spot(cs[offset], 0) : spot(element, offset);\n    };\n\n    const makeRange = (start, soffset, finish, foffset) => {\n        const doc = owner$4(start);\n        // TODO: We need to think about a better place to put native range creation code. Does it even belong in sugar?\n        // Could the `Compare` checks (node.compareDocumentPosition) handle these situations better?\n        const rng = doc.dom.createRange();\n        rng.setStart(start.dom, soffset);\n        rng.setEnd(finish.dom, foffset);\n        return rng;\n    };\n    const after$2 = (start, soffset, finish, foffset) => {\n        const r = makeRange(start, soffset, finish, foffset);\n        const same = eq(start, finish) && soffset === foffset;\n        return r.collapsed && !same;\n    };\n\n    /**\n     * Is the element a ShadowRoot?\n     *\n     * Note: this is insufficient to test if any element is a shadow root, but it is sufficient to differentiate between\n     * a Document and a ShadowRoot.\n     */\n    const isShadowRoot = (dos) => isDocumentFragment(dos) && isNonNullable(dos.dom.host);\n    const getRootNode = (e) => SugarElement.fromDom(e.dom.getRootNode());\n    /** Where content needs to go. ShadowRoot or document body */\n    const getContentContainer = (dos) => \n    // Can't use SugarBody.body without causing a circular module reference (since SugarBody.inBody uses SugarShadowDom)\n    isShadowRoot(dos) ? dos : SugarElement.fromDom(documentOrOwner(dos).dom.body);\n    /** Is this element either a ShadowRoot or a descendent of a ShadowRoot. */\n    const isInShadowRoot = (e) => getShadowRoot(e).isSome();\n    /** If this element is in a ShadowRoot, return it. */\n    const getShadowRoot = (e) => {\n        const r = getRootNode(e);\n        return isShadowRoot(r) ? Optional.some(r) : Optional.none();\n    };\n    /** Return the host of a ShadowRoot.\n     *\n     * This function will throw if Shadow DOM is unsupported in the browser, or if the host is null.\n     * If you actually have a ShadowRoot, this shouldn't happen.\n     */\n    const getShadowHost = (e) => SugarElement.fromDom(e.dom.host);\n    /**\n     * When Events bubble up through a ShadowRoot, the browser changes the target to be the shadow host.\n     * This function gets the \"original\" event target if possible.\n     * This only works if the shadow tree is open - if the shadow tree is closed, event.target is returned.\n     * See: https://developers.google.com/web/fundamentals/web-components/shadowdom#events\n     */\n    const getOriginalEventTarget = (event) => {\n        if (isNonNullable(event.target)) {\n            const el = SugarElement.fromDom(event.target);\n            if (isElement$1(el) && isOpenShadowHost(el)) {\n                // When target element is inside Shadow DOM we need to take first element from composedPath\n                // otherwise we'll get Shadow Root parent, not actual target element.\n                if (event.composed && event.composedPath) {\n                    const composedPath = event.composedPath();\n                    if (composedPath) {\n                        return head(composedPath);\n                    }\n                }\n            }\n        }\n        return Optional.from(event.target);\n    };\n    /** Return true if the element is a host of an open shadow root.\n     *  Return false if the element is a host of a closed shadow root, or if the element is not a host.\n     */\n    const isOpenShadowHost = (element) => isNonNullable(element.dom.shadowRoot);\n\n    const mkEvent = (target, x, y, stop, prevent, kill, raw) => ({\n        target,\n        x,\n        y,\n        stop,\n        prevent,\n        kill,\n        raw\n    });\n    /** Wraps an Event in an EventArgs structure.\n     * The returned EventArgs structure has its target set to the \"original\" target if possible.\n     * See SugarShadowDom.getOriginalEventTarget\n     */\n    const fromRawEvent$1 = (rawEvent) => {\n        const target = SugarElement.fromDom(getOriginalEventTarget(rawEvent).getOr(rawEvent.target));\n        const stop = () => rawEvent.stopPropagation();\n        const prevent = () => rawEvent.preventDefault();\n        const kill = compose(prevent, stop); // more of a sequence than a compose, but same effect\n        // FIX: Don't just expose the raw event. Need to identify what needs standardisation.\n        return mkEvent(target, rawEvent.clientX, rawEvent.clientY, stop, prevent, kill, rawEvent);\n    };\n    const handle = (filter, handler) => (rawEvent) => {\n        if (filter(rawEvent)) {\n            handler(fromRawEvent$1(rawEvent));\n        }\n    };\n    const binder = (element, event, filter, handler, useCapture) => {\n        const wrapped = handle(filter, handler);\n        // IE9 minimum\n        element.dom.addEventListener(event, wrapped, useCapture);\n        return {\n            unbind: curry(unbind, element, event, wrapped, useCapture)\n        };\n    };\n    const bind$2 = (element, event, filter, handler) => binder(element, event, filter, handler, false);\n    const capture$1 = (element, event, filter, handler) => binder(element, event, filter, handler, true);\n    const unbind = (element, event, handler, useCapture) => {\n        // IE9 minimum\n        element.dom.removeEventListener(event, handler, useCapture);\n    };\n\n    const filter = always; // no filter on plain DomEvents\n    const bind$1 = (element, event, handler) => bind$2(element, event, filter, handler);\n    const capture = (element, event, handler) => capture$1(element, event, filter, handler);\n    const fromRawEvent = fromRawEvent$1;\n\n    const getDocument = () => SugarElement.fromDom(document);\n\n    const focus$4 = (element, preventScroll = false) => element.dom.focus({ preventScroll });\n    const blur$1 = (element) => element.dom.blur();\n    const hasFocus = (element) => {\n        const root = getRootNode(element).dom;\n        return element.dom === root.activeElement;\n    };\n    // Note: assuming that activeElement will always be a HTMLElement (maybe we should add a runtime check?)\n    const active$1 = (root = getDocument()) => Optional.from(root.dom.activeElement).map(SugarElement.fromDom);\n    /**\n     * Return the descendant element that has focus.\n     * Use instead of SelectorFind.descendant(container, ':focus')\n     *  because the :focus selector relies on keyboard focus.\n     */\n    const search = (element) => active$1(getRootNode(element))\n        .filter((e) => element.dom.contains(e.dom));\n\n    const before$1 = (marker, element) => {\n        const parent$1 = parent(marker);\n        parent$1.each((v) => {\n            v.dom.insertBefore(element.dom, marker.dom);\n        });\n    };\n    const after$1 = (marker, element) => {\n        const sibling = nextSibling(marker);\n        sibling.fold(() => {\n            const parent$1 = parent(marker);\n            parent$1.each((v) => {\n                append$2(v, element);\n            });\n        }, (v) => {\n            before$1(v, element);\n        });\n    };\n    const prepend$1 = (parent, element) => {\n        const firstChild$1 = firstChild(parent);\n        firstChild$1.fold(() => {\n            append$2(parent, element);\n        }, (v) => {\n            parent.dom.insertBefore(element.dom, v.dom);\n        });\n    };\n    const append$2 = (parent, element) => {\n        parent.dom.appendChild(element.dom);\n    };\n    const appendAt = (parent, element, index) => {\n        child$2(parent, index).fold(() => {\n            append$2(parent, element);\n        }, (v) => {\n            before$1(v, element);\n        });\n    };\n\n    const append$1 = (parent, elements) => {\n        each$1(elements, (x) => {\n            append$2(parent, x);\n        });\n    };\n\n    const rawSet = (dom, key, value) => {\n        /*\n         * JQuery coerced everything to a string, and silently did nothing on text node/null/undefined.\n         *\n         * We fail on those invalid cases, only allowing numbers and booleans.\n         */\n        if (isString(value) || isBoolean(value) || isNumber(value)) {\n            dom.setAttribute(key, value + '');\n        }\n        else {\n            // eslint-disable-next-line no-console\n            console.error('Invalid call to Attribute.set. Key ', key, ':: Value ', value, ':: Element ', dom);\n            throw new Error('Attribute value was not simple');\n        }\n    };\n    const set$9 = (element, key, value) => {\n        rawSet(element.dom, key, value);\n    };\n    const setAll$1 = (element, attrs) => {\n        const dom = element.dom;\n        each(attrs, (v, k) => {\n            rawSet(dom, k, v);\n        });\n    };\n    const get$g = (element, key) => {\n        const v = element.dom.getAttribute(key);\n        // undefined is the more appropriate value for JS, and this matches JQuery\n        return v === null ? undefined : v;\n    };\n    const getOpt = (element, key) => Optional.from(get$g(element, key));\n    const has$1 = (element, key) => {\n        const dom = element.dom;\n        // return false for non-element nodes, no point in throwing an error\n        return dom && dom.hasAttribute ? dom.hasAttribute(key) : false;\n    };\n    const remove$8 = (element, key) => {\n        element.dom.removeAttribute(key);\n    };\n    const clone$2 = (element) => foldl(element.dom.attributes, (acc, attr) => {\n        acc[attr.name] = attr.value;\n        return acc;\n    }, {});\n\n    const empty = (element) => {\n        // shortcut \"empty node\" trick. Requires IE 9.\n        element.dom.textContent = '';\n        // If the contents was a single empty text node, the above doesn't remove it. But, it's still faster in general\n        // than removing every child node manually.\n        // The following is (probably) safe for performance as 99.9% of the time the trick works and\n        // Traverse.children will return an empty array.\n        each$1(children(element), (rogue) => {\n            remove$7(rogue);\n        });\n    };\n    const remove$7 = (element) => {\n        const dom = element.dom;\n        if (dom.parentNode !== null) {\n            dom.parentNode.removeChild(dom);\n        }\n    };\n\n    const clone$1 = (original, isDeep) => SugarElement.fromDom(original.dom.cloneNode(isDeep));\n    /** Shallow clone - just the tag, no children */\n    const shallow = (original) => clone$1(original, false);\n    /** Deep clone - everything copied including children */\n    const deep = (original) => clone$1(original, true);\n\n    const fromHtml$1 = (html, scope) => {\n        const doc = scope || document;\n        const div = doc.createElement('div');\n        div.innerHTML = html;\n        return children(SugarElement.fromDom(div));\n    };\n\n    const get$f = (element) => element.dom.innerHTML;\n    const set$8 = (element, content) => {\n        const owner = owner$4(element);\n        const docDom = owner.dom;\n        // FireFox has *terrible* performance when using innerHTML = x\n        const fragment = SugarElement.fromDom(docDom.createDocumentFragment());\n        const contentElements = fromHtml$1(content, docDom);\n        append$1(fragment, contentElements);\n        empty(element);\n        append$2(element, fragment);\n    };\n    const getOuter$2 = (element) => {\n        const container = SugarElement.fromTag('div');\n        const clone = SugarElement.fromDom(element.dom.cloneNode(true));\n        append$2(container, clone);\n        return get$f(container);\n    };\n\n    const getHtml = (element) => {\n        if (isShadowRoot(element)) {\n            return '#shadow-root';\n        }\n        else {\n            const clone = shallow(element);\n            return getOuter$2(clone);\n        }\n    };\n\n    const image = (image) => new Promise((resolve, reject) => {\n        const loaded = () => {\n            destroy();\n            resolve(image);\n        };\n        const listeners = [\n            bind$1(image, 'load', loaded),\n            bind$1(image, 'error', () => {\n                destroy();\n                reject('Unable to load data from image: ' + image.dom.src);\n            }),\n        ];\n        const destroy = () => each$1(listeners, (l) => l.unbind());\n        if (image.dom.complete) {\n            loaded();\n        }\n    });\n\n    // some elements, such as mathml, don't have style attributes\n    // others, such as angular elements, have style attributes that aren't a CSSStyleDeclaration\n    const isSupported = (dom) => dom.style !== undefined && isFunction(dom.style.getPropertyValue);\n\n    // Node.contains() is very, very, very good performance\n    // http://jsperf.com/closest-vs-contains/5\n    const inBody = (element) => {\n        // Technically this is only required on IE, where contains() returns false for text nodes.\n        // But it's cheap enough to run everywhere and Sugar doesn't have platform detection (yet).\n        const dom = isText(element) ? element.dom.parentNode : element.dom;\n        // use ownerDocument.body to ensure this works inside iframes.\n        // Normally contains is bad because an element \"contains\" itself, but here we want that.\n        if (dom === undefined || dom === null || dom.ownerDocument === null) {\n            return false;\n        }\n        const doc = dom.ownerDocument;\n        return getShadowRoot(SugarElement.fromDom(dom)).fold(() => doc.body.contains(dom), compose1(inBody, getShadowHost));\n    };\n    const body = () => getBody(SugarElement.fromDom(document));\n    const getBody = (doc) => {\n        const b = doc.dom.body;\n        if (b === null || b === undefined) {\n            throw new Error('Body is not available yet');\n        }\n        return SugarElement.fromDom(b);\n    };\n\n    const internalSet = (dom, property, value) => {\n        // This is going to hurt. Apologies.\n        // JQuery coerces numbers to pixels for certain property names, and other times lets numbers through.\n        // we're going to be explicit; strings only.\n        if (!isString(value)) {\n            // eslint-disable-next-line no-console\n            console.error('Invalid call to CSS.set. Property ', property, ':: Value ', value, ':: Element ', dom);\n            throw new Error('CSS value must be a string: ' + value);\n        }\n        // removed: support for dom().style[property] where prop is camel case instead of normal property name\n        if (isSupported(dom)) {\n            dom.style.setProperty(property, value);\n        }\n    };\n    const internalRemove = (dom, property) => {\n        /*\n         * IE9 and above - MDN doesn't have details, but here's a couple of random internet claims\n         *\n         * http://help.dottoro.com/ljopsjck.php\n         * http://stackoverflow.com/a/7901886/7546\n         */\n        if (isSupported(dom)) {\n            dom.style.removeProperty(property);\n        }\n    };\n    const set$7 = (element, property, value) => {\n        const dom = element.dom;\n        internalSet(dom, property, value);\n    };\n    const setAll = (element, css) => {\n        const dom = element.dom;\n        each(css, (v, k) => {\n            internalSet(dom, k, v);\n        });\n    };\n    const setOptions = (element, css) => {\n        const dom = element.dom;\n        each(css, (v, k) => {\n            v.fold(() => {\n                internalRemove(dom, k);\n            }, (value) => {\n                internalSet(dom, k, value);\n            });\n        });\n    };\n    /*\n     * NOTE: For certain properties, this returns the \"used value\" which is subtly different to the \"computed value\" (despite calling getComputedStyle).\n     * Blame CSS 2.0.\n     *\n     * https://developer.mozilla.org/en-US/docs/Web/CSS/used_value\n     */\n    const get$e = (element, property) => {\n        const dom = element.dom;\n        /*\n         * IE9 and above per\n         * https://developer.mozilla.org/en/docs/Web/API/window.getComputedStyle\n         *\n         * Not in numerosity, because it doesn't memoize and looking this up dynamically in performance critical code would be horrendous.\n         *\n         * JQuery has some magic here for IE popups, but we don't really need that.\n         * It also uses element.ownerDocument.defaultView to handle iframes but that hasn't been required since FF 3.6.\n         */\n        const styles = window.getComputedStyle(dom);\n        const r = styles.getPropertyValue(property);\n        // jquery-ism: If r is an empty string, check that the element is not in a document. If it isn't, return the raw value.\n        // Turns out we do this a lot.\n        return (r === '' && !inBody(element)) ? getUnsafeProperty(dom, property) : r;\n    };\n    // removed: support for dom().style[property] where prop is camel case instead of normal property name\n    // empty string is what the browsers (IE11 and Chrome) return when the propertyValue doesn't exists.\n    const getUnsafeProperty = (dom, property) => isSupported(dom) ? dom.style.getPropertyValue(property) : '';\n    /*\n     * Gets the raw value from the style attribute. Useful for retrieving \"used values\" from the DOM:\n     * https://developer.mozilla.org/en-US/docs/Web/CSS/used_value\n     *\n     * Returns NONE if the property isn't set, or the value is an empty string.\n     */\n    const getRaw = (element, property) => {\n        const dom = element.dom;\n        const raw = getUnsafeProperty(dom, property);\n        return Optional.from(raw).filter((r) => r.length > 0);\n    };\n    const getAllRaw = (element) => {\n        const css = {};\n        const dom = element.dom;\n        if (isSupported(dom)) {\n            for (let i = 0; i < dom.style.length; i++) {\n                const ruleName = dom.style.item(i);\n                css[ruleName] = dom.style[ruleName];\n            }\n        }\n        return css;\n    };\n    const isValidValue$1 = (tag, property, value) => {\n        const element = SugarElement.fromTag(tag);\n        set$7(element, property, value);\n        const style = getRaw(element, property);\n        return style.isSome();\n    };\n    const remove$6 = (element, property) => {\n        const dom = element.dom;\n        internalRemove(dom, property);\n        if (is$1(getOpt(element, 'style').map(trim$1), '')) {\n            // No more styles left, remove the style attribute as well\n            remove$8(element, 'style');\n        }\n    };\n    /* NOTE: This function is here for the side effect it triggers.\n    The value itself is not used.\n    Be sure to not use the return value, and that it is not removed by a minifier.\n     */\n    const reflow = (e) => e.dom.offsetWidth;\n\n    const Dimension = (name, getOffset) => {\n        const set = (element, h) => {\n            if (!isNumber(h) && !h.match(/^[0-9]+$/)) {\n                throw new Error(name + '.set accepts only positive integer values. Value was ' + h);\n            }\n            const dom = element.dom;\n            if (isSupported(dom)) {\n                dom.style[name] = h + 'px';\n            }\n        };\n        /*\n         * jQuery supports querying width and height on the document and window objects.\n         *\n         * TBIO doesn't do this, so the code is removed to save space, but left here just in case.\n         */\n        /*\n        var getDocumentWidth = (element) => {\n          var dom = element.dom;\n          if (Node.isDocument(element)) {\n            var body = dom.body;\n            var doc = dom.documentElement;\n            return Math.max(\n              body.scrollHeight,\n              doc.scrollHeight,\n              body.offsetHeight,\n              doc.offsetHeight,\n              doc.clientHeight\n            );\n          }\n        };\n      \n        var getWindowWidth = (element) => {\n          var dom = element.dom;\n          if (dom.window === dom) {\n            // There is no offsetHeight on a window, so use the clientHeight of the document\n            return dom.document.documentElement.clientHeight;\n          }\n        };\n      */\n        const get = (element) => {\n            const r = getOffset(element);\n            // zero or null means non-standard or disconnected, fall back to CSS\n            if (r <= 0 || r === null) {\n                const css = get$e(element, name);\n                // ugh this feels dirty, but it saves cycles\n                return parseFloat(css) || 0;\n            }\n            return r;\n        };\n        // in jQuery, getOuter replicates (or uses) box-sizing: border-box calculations\n        // although these calculations only seem relevant for quirks mode, and edge cases TBIO doesn't rely on\n        const getOuter = get;\n        const aggregate = (element, properties) => foldl(properties, (acc, property) => {\n            const val = get$e(element, property);\n            const value = val === undefined ? 0 : parseInt(val, 10);\n            return isNaN(value) ? acc : acc + value;\n        }, 0);\n        const max = (element, value, properties) => {\n            const cumulativeInclusions = aggregate(element, properties);\n            // if max-height is 100px and your cumulativeInclusions is 150px, there is no way max-height can be 100px, so we return 0.\n            const absoluteMax = value > cumulativeInclusions ? value - cumulativeInclusions : 0;\n            return absoluteMax;\n        };\n        return {\n            set,\n            get,\n            getOuter,\n            aggregate,\n            max\n        };\n    };\n\n    const api$2 = Dimension('height', (element) => {\n        // getBoundingClientRect gives better results than offsetHeight for tables with captions on Firefox\n        const dom = element.dom;\n        return inBody(element) ? dom.getBoundingClientRect().height : dom.offsetHeight;\n    });\n    const get$d = (element) => api$2.get(element);\n    const getOuter$1 = (element) => api$2.getOuter(element);\n    const setMax$1 = (element, value) => {\n        // These properties affect the absolute max-height, they are not counted natively, we want to include these properties.\n        const inclusions = ['margin-top', 'border-top-width', 'padding-top', 'padding-bottom', 'border-bottom-width', 'margin-bottom'];\n        const absMax = api$2.max(element, value, inclusions);\n        set$7(element, 'max-height', absMax + 'px');\n    };\n\n    const isHidden$1 = (dom) => dom.offsetWidth <= 0 && dom.offsetHeight <= 0;\n    const isVisible = (element) => !isHidden$1(element.dom);\n\n    const api$1 = Dimension('width', (element) => {\n        const dom = element.dom;\n        return inBody(element) ? dom.getBoundingClientRect().width : dom.offsetWidth;\n    });\n    const set$6 = (element, h) => api$1.set(element, h);\n    const get$c = (element) => api$1.get(element);\n    const getOuter = (element) => api$1.getOuter(element);\n    const setMax = (element, value) => {\n        // These properties affect the absolute max-height, they are not counted natively, we want to include these properties.\n        const inclusions = ['margin-left', 'border-left-width', 'padding-left', 'padding-right', 'border-right-width', 'margin-right'];\n        const absMax = api$1.max(element, value, inclusions);\n        set$7(element, 'max-width', absMax + 'px');\n    };\n\n    const r$1 = (left, top) => {\n        const translate = (x, y) => r$1(left + x, top + y);\n        return {\n            left,\n            top,\n            translate\n        };\n    };\n    // tslint:disable-next-line:variable-name\n    const SugarPosition = r$1;\n\n    const boxPosition = (dom) => {\n        const box = dom.getBoundingClientRect();\n        return SugarPosition(box.left, box.top);\n    };\n    // Avoids falsy false fallthrough\n    const firstDefinedOrZero = (a, b) => {\n        if (a !== undefined) {\n            return a;\n        }\n        else {\n            return b !== undefined ? b : 0;\n        }\n    };\n    const absolute$3 = (element) => {\n        const doc = element.dom.ownerDocument;\n        const body = doc.body;\n        const win = doc.defaultView;\n        const html = doc.documentElement;\n        if (body === element.dom) {\n            return SugarPosition(body.offsetLeft, body.offsetTop);\n        }\n        const scrollTop = firstDefinedOrZero(win?.pageYOffset, html.scrollTop);\n        const scrollLeft = firstDefinedOrZero(win?.pageXOffset, html.scrollLeft);\n        const clientTop = firstDefinedOrZero(html.clientTop, body.clientTop);\n        const clientLeft = firstDefinedOrZero(html.clientLeft, body.clientLeft);\n        return viewport$1(element).translate(scrollLeft - clientLeft, scrollTop - clientTop);\n    };\n    const viewport$1 = (element) => {\n        const dom = element.dom;\n        const doc = dom.ownerDocument;\n        const body = doc.body;\n        if (body === dom) {\n            return SugarPosition(body.offsetLeft, body.offsetTop);\n        }\n        if (!inBody(element)) {\n            return SugarPosition(0, 0);\n        }\n        return boxPosition(dom);\n    };\n\n    // get scroll position (x,y) relative to document _doc (or global if not supplied)\n    const get$b = (_DOC) => {\n        const doc = _DOC !== undefined ? _DOC.dom : document;\n        // ASSUMPTION: This is for cross-browser support, body works for Safari & EDGE, and when we have an iframe body scroller\n        const x = doc.body.scrollLeft || doc.documentElement.scrollLeft;\n        const y = doc.body.scrollTop || doc.documentElement.scrollTop;\n        return SugarPosition(x, y);\n    };\n    // Scroll content to (x,y) relative to document _doc (or global if not supplied)\n    const to = (x, y, _DOC) => {\n        const doc = _DOC !== undefined ? _DOC.dom : document;\n        const win = doc.defaultView;\n        if (win) {\n            win.scrollTo(x, y);\n        }\n    };\n\n    const NodeValue = (is, name) => {\n        const get = (element) => {\n            if (!is(element)) {\n                throw new Error('Can only get ' + name + ' value of a ' + name + ' node');\n            }\n            return getOption(element).getOr('');\n        };\n        const getOption = (element) => is(element) ? Optional.from(element.dom.nodeValue) : Optional.none();\n        const set = (element, value) => {\n            if (!is(element)) {\n                throw new Error('Can only set raw ' + name + ' value of a ' + name + ' node');\n            }\n            element.dom.nodeValue = value;\n        };\n        return {\n            get,\n            getOption,\n            set\n        };\n    };\n\n    const api = NodeValue(isText, 'text');\n    const get$a = (element) => api.get(element);\n\n    const onDirection = (isLtr, isRtl) => (element) => getDirection(element) === 'rtl' ? isRtl : isLtr;\n    const getDirection = (element) => get$e(element, 'direction') === 'rtl' ? 'rtl' : 'ltr';\n\n    // Methods for handling attributes that contain a list of values <div foo=\"alpha beta theta\">\n    const read$2 = (element, attr) => {\n        const value = get$g(element, attr);\n        return value === undefined || value === '' ? [] : value.split(' ');\n    };\n    const add$4 = (element, attr, id) => {\n        const old = read$2(element, attr);\n        const nu = old.concat([id]);\n        set$9(element, attr, nu.join(' '));\n        return true;\n    };\n    const remove$5 = (element, attr, id) => {\n        const nu = filter$2(read$2(element, attr), (v) => v !== id);\n        if (nu.length > 0) {\n            set$9(element, attr, nu.join(' '));\n        }\n        else {\n            remove$8(element, attr);\n        }\n        return false;\n    };\n\n    var ClosestOrAncestor = (is, ancestor, scope, a, isRoot) => {\n        if (is(scope, a)) {\n            return Optional.some(scope);\n        }\n        else if (isFunction(isRoot) && isRoot(scope)) {\n            return Optional.none();\n        }\n        else {\n            return ancestor(scope, a, isRoot);\n        }\n    };\n\n    const ancestor$2 = (scope, predicate, isRoot) => {\n        let element = scope.dom;\n        const stop = isFunction(isRoot) ? isRoot : never;\n        while (element.parentNode) {\n            element = element.parentNode;\n            const el = SugarElement.fromDom(element);\n            if (predicate(el)) {\n                return Optional.some(el);\n            }\n            else if (stop(el)) {\n                break;\n            }\n        }\n        return Optional.none();\n    };\n    const closest$4 = (scope, predicate, isRoot) => {\n        // This is required to avoid ClosestOrAncestor passing the predicate to itself\n        const is = (s, test) => test(s);\n        return ClosestOrAncestor(is, ancestor$2, scope, predicate, isRoot);\n    };\n    const sibling$1 = (scope, predicate) => {\n        const element = scope.dom;\n        if (!element.parentNode) {\n            return Optional.none();\n        }\n        return child$1(SugarElement.fromDom(element.parentNode), (x) => !eq(scope, x) && predicate(x));\n    };\n    const child$1 = (scope, predicate) => {\n        const pred = (node) => predicate(SugarElement.fromDom(node));\n        const result = find$5(scope.dom.childNodes, pred);\n        return result.map(SugarElement.fromDom);\n    };\n    const descendant$1 = (scope, predicate) => {\n        const descend = (node) => {\n            // tslint:disable-next-line:prefer-for-of\n            for (let i = 0; i < node.childNodes.length; i++) {\n                const child = SugarElement.fromDom(node.childNodes[i]);\n                if (predicate(child)) {\n                    return Optional.some(child);\n                }\n                const res = descend(node.childNodes[i]);\n                if (res.isSome()) {\n                    return res;\n                }\n            }\n            return Optional.none();\n        };\n        return descend(scope.dom);\n    };\n\n    // TODO: An internal SelectorFilter module that doesn't SugarElement.fromDom() everything\n    const first = (selector) => one(selector);\n    const ancestor$1 = (scope, selector, isRoot) => ancestor$2(scope, (e) => is(e, selector), isRoot);\n    const sibling = (scope, selector) => sibling$1(scope, (e) => is(e, selector));\n    const child = (scope, selector) => child$1(scope, (e) => is(e, selector));\n    const descendant = (scope, selector) => one(selector, scope);\n    // Returns Some(closest ancestor element (sugared)) matching 'selector' up to isRoot, or None() otherwise\n    const closest$3 = (scope, selector, isRoot) => {\n        const is$1 = (element, selector) => is(element, selector);\n        return ClosestOrAncestor(is$1, ancestor$1, scope, selector, isRoot);\n    };\n\n    const set$5 = (element, status) => {\n        element.dom.checked = status;\n    };\n    const get$9 = (element) => element.dom.checked;\n\n    // IE11 Can return undefined for a classList on elements such as math, so we make sure it's not undefined before attempting to use it.\n    const supports = (element) => element.dom.classList !== undefined;\n    const get$8 = (element) => read$2(element, 'class');\n    const add$3 = (element, clazz) => add$4(element, 'class', clazz);\n    const remove$4 = (element, clazz) => remove$5(element, 'class', clazz);\n    const toggle$4 = (element, clazz) => {\n        if (contains$2(get$8(element), clazz)) {\n            return remove$4(element, clazz);\n        }\n        else {\n            return add$3(element, clazz);\n        }\n    };\n\n    /*\n     * ClassList is IE10 minimum:\n     * https://developer.mozilla.org/en-US/docs/Web/API/Element.classList\n     *\n     * Note that IE doesn't support the second argument to toggle (at all).\n     * If it did, the toggler could be better.\n     */\n    const add$2 = (element, clazz) => {\n        if (supports(element)) {\n            element.dom.classList.add(clazz);\n        }\n        else {\n            add$3(element, clazz);\n        }\n    };\n    const cleanClass = (element) => {\n        const classList = supports(element) ? element.dom.classList : get$8(element);\n        // classList is a \"live list\", so this is up to date already\n        if (classList.length === 0) {\n            // No more classes left, remove the class attribute as well\n            remove$8(element, 'class');\n        }\n    };\n    const remove$3 = (element, clazz) => {\n        if (supports(element)) {\n            const classList = element.dom.classList;\n            classList.remove(clazz);\n        }\n        else {\n            remove$4(element, clazz);\n        }\n        cleanClass(element);\n    };\n    const toggle$3 = (element, clazz) => {\n        const result = supports(element) ? element.dom.classList.toggle(clazz) : toggle$4(element, clazz);\n        cleanClass(element);\n        return result;\n    };\n    const has = (element, clazz) => supports(element) && element.dom.classList.contains(clazz);\n\n    /*\n     * ClassList is IE10 minimum:\n     * https://developer.mozilla.org/en-US/docs/Web/API/Element.classList\n     */\n    const add$1 = (element, classes) => {\n        each$1(classes, (x) => {\n            add$2(element, x);\n        });\n    };\n    const remove$2 = (element, classes) => {\n        each$1(classes, (x) => {\n            remove$3(element, x);\n        });\n    };\n    const toggle$2 = (element, classes) => {\n        each$1(classes, (x) => {\n            toggle$3(element, x);\n        });\n    };\n    const hasAll = (element, classes) => forall(classes, (clazz) => has(element, clazz));\n    const getNative = (element) => {\n        const classList = element.dom.classList;\n        const r = new Array(classList.length);\n        for (let i = 0; i < classList.length; i++) {\n            const item = classList.item(i);\n            if (item !== null) {\n                r[i] = item;\n            }\n        }\n        return r;\n    };\n    const get$7 = (element) => supports(element) ? getNative(element) : get$8(element);\n\n    const get$6 = (element) => element.dom.textContent;\n\n    const get$5 = (element) => element.dom.value;\n    const set$4 = (element, value) => {\n        if (value === undefined) {\n            throw new Error('Value.set was undefined');\n        }\n        element.dom.value = value;\n    };\n\n    const ancestors = (scope, predicate, isRoot) => filter$2(parents(scope, isRoot), predicate);\n\n    const descendants = (scope, selector) => all$3(selector, scope);\n\n    const closest$2 = (scope, predicate, isRoot) => closest$4(scope, predicate, isRoot).isSome();\n\n    const closest$1 = (scope, selector, isRoot) => closest$3(scope, selector, isRoot).isSome();\n\n    const ensureIsRoot = (isRoot) => isFunction(isRoot) ? isRoot : never;\n    const ancestor = (scope, transform, isRoot) => {\n        let element = scope.dom;\n        const stop = ensureIsRoot(isRoot);\n        while (element.parentNode) {\n            element = element.parentNode;\n            const el = SugarElement.fromDom(element);\n            const transformed = transform(el);\n            if (transformed.isSome()) {\n                return transformed;\n            }\n            else if (stop(el)) {\n                break;\n            }\n        }\n        return Optional.none();\n    };\n    const closest = (scope, transform, isRoot) => {\n        const current = transform(scope);\n        const stop = ensureIsRoot(isRoot);\n        return current.orThunk(() => stop(scope) ? Optional.none() : ancestor(scope, transform, stop));\n    };\n\n    const create$5 = (start, soffset, finish, foffset) => ({\n        start,\n        soffset,\n        finish,\n        foffset\n    });\n    // tslint:disable-next-line:variable-name\n    const SimRange = {\n        create: create$5\n    };\n\n    const adt$9 = Adt.generate([\n        { before: ['element'] },\n        { on: ['element', 'offset'] },\n        { after: ['element'] }\n    ]);\n    // Probably don't need this given that we now have \"match\"\n    const cata$2 = (subject, onBefore, onOn, onAfter) => subject.fold(onBefore, onOn, onAfter);\n    const getStart$1 = (situ) => situ.fold(identity, identity, identity);\n    const before = adt$9.before;\n    const on$1 = adt$9.on;\n    const after = adt$9.after;\n    // tslint:disable-next-line:variable-name\n    const Situ = {\n        before,\n        on: on$1,\n        after,\n        cata: cata$2,\n        getStart: getStart$1\n    };\n\n    // Consider adding a type for \"element\"\n    const adt$8 = Adt.generate([\n        { domRange: ['rng'] },\n        { relative: ['startSitu', 'finishSitu'] },\n        { exact: ['start', 'soffset', 'finish', 'foffset'] }\n    ]);\n    const exactFromRange = (simRange) => adt$8.exact(simRange.start, simRange.soffset, simRange.finish, simRange.foffset);\n    const getStart = (selection) => selection.match({\n        domRange: (rng) => SugarElement.fromDom(rng.startContainer),\n        relative: (startSitu, _finishSitu) => Situ.getStart(startSitu),\n        exact: (start, _soffset, _finish, _foffset) => start\n    });\n    const domRange = adt$8.domRange;\n    const relative$1 = adt$8.relative;\n    const exact = adt$8.exact;\n    const getWin = (selection) => {\n        const start = getStart(selection);\n        return defaultView(start);\n    };\n    // This is out of place but it's API so I can't remove it\n    const range$1 = SimRange.create;\n    // tslint:disable-next-line:variable-name\n    const SimSelection = {\n        domRange,\n        relative: relative$1,\n        exact,\n        exactFromRange,\n        getWin,\n        range: range$1\n    };\n\n    const beforeSpecial = (element, offset) => {\n        // From memory, we don't want to use <br> directly on Firefox because it locks the keyboard input.\n        // It turns out that <img> directly on IE locks the keyboard as well.\n        // If the offset is 0, use before. If the offset is 1, use after.\n        // TBIO-3889: Firefox Situ.on <input> results in a child of the <input>; Situ.before <input> results in platform inconsistencies\n        const name = name$3(element);\n        if ('input' === name) {\n            return Situ.after(element);\n        }\n        else if (!contains$2(['br', 'img'], name)) {\n            return Situ.on(element, offset);\n        }\n        else {\n            return offset === 0 ? Situ.before(element) : Situ.after(element);\n        }\n    };\n    const preprocessExact = (start, soffset, finish, foffset) => {\n        const startSitu = beforeSpecial(start, soffset);\n        const finishSitu = beforeSpecial(finish, foffset);\n        return SimSelection.relative(startSitu, finishSitu);\n    };\n\n    const getNativeSelection = (win) => Optional.from(win.getSelection());\n    const doSetNativeRange = (win, rng) => {\n        getNativeSelection(win).each((selection) => {\n            selection.removeAllRanges();\n            selection.addRange(rng);\n        });\n    };\n    const doSetRange = (win, start, soffset, finish, foffset) => {\n        const rng = exactToNative(win, start, soffset, finish, foffset);\n        doSetNativeRange(win, rng);\n    };\n    const setLegacyRtlRange = (win, selection, start, soffset, finish, foffset) => {\n        selection.collapse(start.dom, soffset);\n        selection.extend(finish.dom, foffset);\n    };\n    const setRangeFromRelative = (win, relative) => diagnose(win, relative).match({\n        ltr: (start, soffset, finish, foffset) => {\n            doSetRange(win, start, soffset, finish, foffset);\n        },\n        rtl: (start, soffset, finish, foffset) => {\n            getNativeSelection(win).each((selection) => {\n                // If this selection is backwards, then we need to use extend.\n                if (selection.setBaseAndExtent) {\n                    selection.setBaseAndExtent(start.dom, soffset, finish.dom, foffset);\n                }\n                else if (selection.extend) {\n                    // This try catch is for older browsers (Firefox 52) as they're sometimes unable to handle setting backwards selections using selection.extend and error out.\n                    try {\n                        setLegacyRtlRange(win, selection, start, soffset, finish, foffset);\n                    }\n                    catch {\n                        // If it does fail, try again with ltr.\n                        doSetRange(win, finish, foffset, start, soffset);\n                    }\n                }\n                else {\n                    doSetRange(win, finish, foffset, start, soffset);\n                }\n            });\n        }\n    });\n    const setExact = (win, start, soffset, finish, foffset) => {\n        const relative = preprocessExact(start, soffset, finish, foffset);\n        setRangeFromRelative(win, relative);\n    };\n    // NOTE: We are still reading the range because it gives subtly different behaviour\n    // than using the anchorNode and focusNode. I'm not sure if this behaviour is any\n    // better or worse; it's just different.\n    const readRange = (selection) => {\n        if (selection.rangeCount > 0) {\n            const firstRng = selection.getRangeAt(0);\n            const lastRng = selection.getRangeAt(selection.rangeCount - 1);\n            return Optional.some(SimRange.create(SugarElement.fromDom(firstRng.startContainer), firstRng.startOffset, SugarElement.fromDom(lastRng.endContainer), lastRng.endOffset));\n        }\n        else {\n            return Optional.none();\n        }\n    };\n    const doGetExact = (selection) => {\n        if (selection.anchorNode === null || selection.focusNode === null) {\n            return readRange(selection);\n        }\n        else {\n            const anchor = SugarElement.fromDom(selection.anchorNode);\n            const focus = SugarElement.fromDom(selection.focusNode);\n            // if this returns true anchor is _after_ focus, so we need a custom selection object to maintain the RTL selection\n            return after$2(anchor, selection.anchorOffset, focus, selection.focusOffset) ? Optional.some(SimRange.create(anchor, selection.anchorOffset, focus, selection.focusOffset)) : readRange(selection);\n        }\n    };\n    const getExact = (win) => \n    // We want to retrieve the selection as it is.\n    getNativeSelection(win)\n        .filter((sel) => sel.rangeCount > 0)\n        .bind(doGetExact);\n    const getFirstRect = (win, selection) => {\n        const rng = asLtrRange(win, selection);\n        return getFirstRect$1(rng);\n    };\n    const getBounds$2 = (win, selection) => {\n        const rng = asLtrRange(win, selection);\n        return getBounds$3(rng);\n    };\n\n    const units = {\n        // we don't really support all of these different ways to express a length\n        unsupportedLength: [\n            'em',\n            'ex',\n            'cap',\n            'ch',\n            'ic',\n            'rem',\n            'lh',\n            'rlh',\n            'vw',\n            'vh',\n            'vi',\n            'vb',\n            'vmin',\n            'vmax',\n            'cm',\n            'mm',\n            'Q',\n            'in',\n            'pc',\n            'pt',\n            'px'\n        ],\n        // these are the length values we do support\n        fixed: ['px', 'pt'],\n        relative: ['%'],\n        empty: ['']\n    };\n    // Built from https://tc39.es/ecma262/#prod-StrDecimalLiteral\n    // Matches a float followed by a trailing set of characters\n    const pattern = (() => {\n        const decimalDigits = '[0-9]+';\n        const signedInteger = '[+-]?' + decimalDigits;\n        const exponentPart = '[eE]' + signedInteger;\n        const dot = '\\\\.';\n        const opt = (input) => `(?:${input})?`;\n        const unsignedDecimalLiteral = [\n            'Infinity',\n            decimalDigits + dot + opt(decimalDigits) + opt(exponentPart),\n            dot + decimalDigits + opt(exponentPart),\n            decimalDigits + opt(exponentPart)\n        ].join('|');\n        const float = `[+-]?(?:${unsignedDecimalLiteral})`;\n        return new RegExp(`^(${float})(.*)$`);\n    })();\n    const isUnit = (unit, accepted) => exists(accepted, (acc) => exists(units[acc], (check) => unit === check));\n    const parse = (input, accepted) => {\n        const match = Optional.from(pattern.exec(input));\n        return match.bind((array) => {\n            const value = Number(array[1]);\n            const unitRaw = array[2];\n            if (isUnit(unitRaw, accepted)) {\n                return Optional.some({\n                    value,\n                    unit: unitRaw\n                });\n            }\n            else {\n                return Optional.none();\n            }\n        });\n    };\n    const normalise = (input, accepted) => parse(input, accepted).map(({ value, unit }) => value + unit);\n\n    const get$4 = (_win) => {\n        const win = _win === undefined ? window : _win;\n        if (detect$1().browser.isFirefox()) {\n            // TINY-7984: Firefox 91 is returning incorrect values for visualViewport.pageTop, so disable it for now\n            return Optional.none();\n        }\n        else {\n            return Optional.from(win.visualViewport);\n        }\n    };\n    const bounds$1 = (x, y, width, height) => ({\n        x,\n        y,\n        width,\n        height,\n        right: x + width,\n        bottom: y + height\n    });\n    const getBounds$1 = (_win) => {\n        const win = _win === undefined ? window : _win;\n        const doc = win.document;\n        const scroll = get$b(SugarElement.fromDom(doc));\n        return get$4(win).fold(() => {\n            const html = win.document.documentElement;\n            // Don't use window.innerWidth/innerHeight here, as we don't want to include scrollbars\n            // since the right/bottom position is based on the edge of the scrollbar not the window\n            const width = html.clientWidth;\n            const height = html.clientHeight;\n            return bounds$1(scroll.left, scroll.top, width, height);\n        }, (visualViewport) => \n        // iOS doesn't update the pageTop/pageLeft when element.scrollIntoView() is called, so we need to fallback to the\n        // scroll position which will always be less than the page top/left values when page top/left are accurate/correct.\n        bounds$1(Math.max(visualViewport.pageLeft, scroll.left), Math.max(visualViewport.pageTop, scroll.top), visualViewport.width, visualViewport.height));\n    };\n\n    const walkUp = (navigation, doc) => {\n        const frame = navigation.view(doc);\n        return frame.fold(constant$1([]), (f) => {\n            const parent = navigation.owner(f);\n            const rest = walkUp(navigation, parent);\n            return [f].concat(rest);\n        });\n    };\n    // TODO: Why is this an option if it is always some?\n    const pathTo = (element, navigation) => {\n        const d = navigation.owner(element);\n        const paths = walkUp(navigation, d);\n        return Optional.some(paths);\n    };\n\n    const view = (doc) => {\n        // Only walk up to the document this script is defined in.\n        // This prevents walking up to the parent window when the editor is in an iframe.\n        const element = doc.dom === document ? Optional.none() : Optional.from(doc.dom.defaultView?.frameElement);\n        return element.map(SugarElement.fromDom);\n    };\n    const owner$3 = (element) => owner$4(element);\n\n    var Navigation = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        view: view,\n        owner: owner$3\n    });\n\n    const find$2 = (element) => {\n        const doc = getDocument();\n        const scroll = get$b(doc);\n        // Get the path of iframe elements to this element.\n        const path = pathTo(element, Navigation);\n        return path.fold(curry(absolute$3, element), (frames) => {\n            const offset = viewport$1(element);\n            const r = foldr(frames, (b, a) => {\n                const loc = viewport$1(a);\n                return {\n                    left: b.left + loc.left,\n                    top: b.top + loc.top\n                };\n            }, { left: 0, top: 0 });\n            return SugarPosition(r.left + offset.left + scroll.left, r.top + offset.top + scroll.top);\n        });\n    };\n\n    const pointed = (point, width, height) => ({\n        point,\n        width,\n        height\n    });\n    const rect = (x, y, width, height) => ({\n        x,\n        y,\n        width,\n        height\n    });\n    const bounds = (x, y, width, height) => ({\n        x,\n        y,\n        width,\n        height,\n        right: x + width,\n        bottom: y + height\n    });\n    const box$1 = (element) => {\n        const xy = absolute$3(element);\n        const w = getOuter(element);\n        const h = getOuter$1(element);\n        return bounds(xy.left, xy.top, w, h);\n    };\n    // NOTE: We used to use AriaFocus.preserve here, but there is no reason to do that now that\n    // we are not changing the visibility of the element. Hopefully (2015-09-29).\n    const absolute$2 = (element) => {\n        const position = find$2(element);\n        const width = getOuter(element);\n        const height = getOuter$1(element);\n        return bounds(position.left, position.top, width, height);\n    };\n    const constrain = (original, constraint) => {\n        const left = Math.max(original.x, constraint.x);\n        const top = Math.max(original.y, constraint.y);\n        const right = Math.min(original.right, constraint.right);\n        const bottom = Math.min(original.bottom, constraint.bottom);\n        const width = right - left;\n        const height = bottom - top;\n        return bounds(left, top, width, height);\n    };\n    const constrainByMany = (original, constraints) => {\n        return foldl(constraints, (acc, c) => constrain(acc, c), original);\n    };\n    const win = () => getBounds$1(window);\n\n    const isSource = (component, simulatedEvent) => eq(component.element, simulatedEvent.event.target);\n\n    const getOffsetParent = (element) => {\n        // Firefox sets the offsetParent to the body when fixed instead of null like\n        // all other browsers. So we need to check if the element is fixed and if so then\n        // disregard the elements offsetParent.\n        const isFixed = is$1(getRaw(element, 'position'), 'fixed');\n        const offsetParent$1 = isFixed ? Optional.none() : offsetParent(element);\n        return offsetParent$1.orThunk(() => {\n            const marker = SugarElement.fromTag('span');\n            // PERFORMANCE: Append the marker to the parent element, as adding it before the current element will\n            // trigger the styles to be recalculated which is a little costly (particularly in scroll/resize events)\n            return parent(element).bind((parent) => {\n                append$2(parent, marker);\n                const offsetParent$1 = offsetParent(marker);\n                remove$7(marker);\n                return offsetParent$1;\n            });\n        });\n    };\n    /*\n     * This allows the absolute coordinates to be obtained by adding the\n     * origin to the offset coordinates and not needing to know scroll.\n     */\n    const getOrigin = (element) => getOffsetParent(element).map(absolute$3).getOrThunk(() => SugarPosition(0, 0));\n\n    const describedBy = (describedElement, describeElement) => {\n        const describeId = Optional.from(get$g(describedElement, 'id'))\n            .getOrThunk(() => {\n            const id = generate$6('aria');\n            set$9(describeElement, 'id', id);\n            return id;\n        });\n        set$9(describedElement, 'aria-describedby', describeId);\n    };\n    const remove$1 = (describedElement) => {\n        remove$8(describedElement, 'aria-describedby');\n    };\n\n    var SimpleResultType;\n    (function (SimpleResultType) {\n        SimpleResultType[SimpleResultType[\"Error\"] = 0] = \"Error\";\n        SimpleResultType[SimpleResultType[\"Value\"] = 1] = \"Value\";\n    })(SimpleResultType || (SimpleResultType = {}));\n    const fold$1 = (res, onError, onValue) => res.stype === SimpleResultType.Error ? onError(res.serror) : onValue(res.svalue);\n    const partition$1 = (results) => {\n        const values = [];\n        const errors = [];\n        each$1(results, (obj) => {\n            fold$1(obj, (err) => errors.push(err), (val) => values.push(val));\n        });\n        return { values, errors };\n    };\n    const mapError = (res, f) => {\n        if (res.stype === SimpleResultType.Error) {\n            return { stype: SimpleResultType.Error, serror: f(res.serror) };\n        }\n        else {\n            return res;\n        }\n    };\n    const map = (res, f) => {\n        if (res.stype === SimpleResultType.Value) {\n            return { stype: SimpleResultType.Value, svalue: f(res.svalue) };\n        }\n        else {\n            return res;\n        }\n    };\n    const bind = (res, f) => {\n        if (res.stype === SimpleResultType.Value) {\n            return f(res.svalue);\n        }\n        else {\n            return res;\n        }\n    };\n    const bindError = (res, f) => {\n        if (res.stype === SimpleResultType.Error) {\n            return f(res.serror);\n        }\n        else {\n            return res;\n        }\n    };\n    const svalue = (v) => ({ stype: SimpleResultType.Value, svalue: v });\n    const serror = (e) => ({ stype: SimpleResultType.Error, serror: e });\n    const toResult$1 = (res) => fold$1(res, Result.error, Result.value);\n    const fromResult = (res) => res.fold(serror, svalue);\n    const SimpleResult = {\n        fromResult,\n        toResult: toResult$1,\n        svalue,\n        partition: partition$1,\n        serror,\n        bind,\n        bindError,\n        map,\n        mapError,\n        fold: fold$1\n    };\n\n    const formatObj = (input) => {\n        return isObject(input) && keys(input).length > 100 ? ' removed due to size' : JSON.stringify(input, null, 2);\n    };\n    const formatErrors = (errors) => {\n        const es = errors.length > 10 ? errors.slice(0, 10).concat([\n            {\n                path: [],\n                getErrorInfo: constant$1('... (only showing first ten failures)')\n            }\n        ]) : errors;\n        // TODO: Work out a better split between PrettyPrinter and SchemaError\n        return map$2(es, (e) => {\n            return 'Failed path: (' + e.path.join(' > ') + ')\\n' + e.getErrorInfo();\n        });\n    };\n\n    const nu$7 = (path, getErrorInfo) => {\n        return SimpleResult.serror([{\n                path,\n                // This is lazy so that it isn't calculated unnecessarily\n                getErrorInfo\n            }]);\n    };\n    const missingRequired = (path, key, obj) => nu$7(path, () => 'Could not find valid *required* value for \"' + key + '\" in ' + formatObj(obj));\n    const missingKey = (path, key) => nu$7(path, () => 'Choice schema did not contain choice key: \"' + key + '\"');\n    const missingBranch = (path, branches, branch) => nu$7(path, () => 'The chosen schema: \"' + branch + '\" did not exist in branches: ' + formatObj(branches));\n    const unsupportedFields = (path, unsupported) => nu$7(path, () => 'There are unsupported fields: [' + unsupported.join(', ') + '] specified');\n    const custom = (path, err) => nu$7(path, constant$1(err));\n\n    const value$1 = (validator) => {\n        const extract = (path, val) => {\n            return SimpleResult.bindError(validator(val), (err) => custom(path, err));\n        };\n        const toString = constant$1('val');\n        return {\n            extract,\n            toString\n        };\n    };\n    const anyValue$1 = value$1(SimpleResult.svalue);\n\n    const anyValue = constant$1(anyValue$1);\n    const typedValue = (validator, expectedType) => value$1((a) => {\n        const actualType = typeof a;\n        return validator(a) ? SimpleResult.svalue(a) : SimpleResult.serror(`Expected type: ${expectedType} but got: ${actualType}`);\n    });\n    const number = typedValue(isNumber, 'number');\n    const string = typedValue(isString, 'string');\n    const boolean = typedValue(isBoolean, 'boolean');\n    const functionProcessor = typedValue(isFunction, 'function');\n    // Test if a value can be copied by the structured clone algorithm and hence sendable via postMessage\n    // https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm\n    // from https://stackoverflow.com/a/32673910/7377237 with adjustments for typescript\n    const isPostMessageable = (val) => {\n        if (Object(val) !== val) { // Primitive value\n            return true;\n        }\n        switch ({}.toString.call(val).slice(8, -1)) { // Class\n            case 'Boolean':\n            case 'Number':\n            case 'String':\n            case 'Date':\n            case 'RegExp':\n            case 'Blob':\n            case 'FileList':\n            case 'ImageData':\n            case 'ImageBitmap':\n            case 'ArrayBuffer':\n                return true;\n            case 'Array':\n            case 'Object':\n                return Object.keys(val).every((prop) => isPostMessageable(val[prop]));\n            default:\n                return false;\n        }\n    };\n    const postMessageable = value$1((a) => {\n        if (isPostMessageable(a)) {\n            return SimpleResult.svalue(a);\n        }\n        else {\n            return SimpleResult.serror('Expected value to be acceptable for sending via postMessage');\n        }\n    });\n\n    const required$2 = () => ({ tag: \"required\" /* FieldPresenceTag.Required */, process: {} });\n    const defaultedThunk = (fallbackThunk) => ({ tag: \"defaultedThunk\" /* FieldPresenceTag.DefaultedThunk */, process: fallbackThunk });\n    const defaulted$1 = (fallback) => defaultedThunk(constant$1(fallback));\n    const asOption = () => ({ tag: \"option\" /* FieldPresenceTag.Option */, process: {} });\n    const mergeWithThunk = (baseThunk) => ({ tag: \"mergeWithThunk\" /* FieldPresenceTag.MergeWithThunk */, process: baseThunk });\n    const mergeWith = (base) => mergeWithThunk(constant$1(base));\n\n    const field$2 = (key, newKey, presence, prop) => ({ tag: \"field\" /* FieldTag.Field */, key, newKey, presence, prop });\n    const customField$1 = (newKey, instantiator) => ({ tag: \"custom\" /* FieldTag.CustomField */, newKey, instantiator });\n    const fold = (value, ifField, ifCustom) => {\n        switch (value.tag) {\n            case \"field\" /* FieldTag.Field */:\n                return ifField(value.key, value.newKey, value.presence, value.prop);\n            case \"custom\" /* FieldTag.CustomField */:\n                return ifCustom(value.newKey, value.instantiator);\n        }\n    };\n\n    const mergeValues$1 = (values, base) => {\n        return SimpleResult.svalue(deepMerge(base, merge$1.apply(undefined, values)));\n    };\n    const mergeErrors$1 = (errors) => compose(SimpleResult.serror, flatten)(errors);\n    const consolidateObj = (objects, base) => {\n        const partition = SimpleResult.partition(objects);\n        return partition.errors.length > 0 ? mergeErrors$1(partition.errors) : mergeValues$1(partition.values, base);\n    };\n    const consolidateArr = (objects) => {\n        const partitions = SimpleResult.partition(objects);\n        return partitions.errors.length > 0 ? mergeErrors$1(partitions.errors) : SimpleResult.svalue(partitions.values);\n    };\n    const ResultCombine = {\n        consolidateObj,\n        consolidateArr\n    };\n\n    const requiredAccess = (path, obj, key, bundle) => \n    // In required mode, if it is undefined, it is an error.\n    get$h(obj, key).fold(() => missingRequired(path, key, obj), bundle);\n    const fallbackAccess = (obj, key, fallback, bundle) => {\n        const v = get$h(obj, key).getOrThunk(() => fallback(obj));\n        return bundle(v);\n    };\n    const optionAccess = (obj, key, bundle) => bundle(get$h(obj, key));\n    const optionDefaultedAccess = (obj, key, fallback, bundle) => {\n        const opt = get$h(obj, key).map((val) => val === true ? fallback(obj) : val);\n        return bundle(opt);\n    };\n    const extractField = (field, path, obj, key, prop) => {\n        const bundle = (av) => prop.extract(path.concat([key]), av);\n        const bundleAsOption = (optValue) => optValue.fold(() => SimpleResult.svalue(Optional.none()), (ov) => {\n            const result = prop.extract(path.concat([key]), ov);\n            return SimpleResult.map(result, Optional.some);\n        });\n        switch (field.tag) {\n            case \"required\" /* FieldPresenceTag.Required */:\n                return requiredAccess(path, obj, key, bundle);\n            case \"defaultedThunk\" /* FieldPresenceTag.DefaultedThunk */:\n                return fallbackAccess(obj, key, field.process, bundle);\n            case \"option\" /* FieldPresenceTag.Option */:\n                return optionAccess(obj, key, bundleAsOption);\n            case \"defaultedOptionThunk\" /* FieldPresenceTag.DefaultedOptionThunk */:\n                return optionDefaultedAccess(obj, key, field.process, bundleAsOption);\n            case \"mergeWithThunk\" /* FieldPresenceTag.MergeWithThunk */: {\n                return fallbackAccess(obj, key, constant$1({}), (v) => {\n                    const result = deepMerge(field.process(obj), v);\n                    return bundle(result);\n                });\n            }\n        }\n    };\n    const extractFields = (path, obj, fields) => {\n        const success = {};\n        const errors = [];\n        // PERFORMANCE: We use a for loop here instead of Arr.each as this is a hot code path\n        for (const field of fields) {\n            fold(field, (key, newKey, presence, prop) => {\n                const result = extractField(presence, path, obj, key, prop);\n                SimpleResult.fold(result, (err) => {\n                    errors.push(...err);\n                }, (res) => {\n                    success[newKey] = res;\n                });\n            }, (newKey, instantiator) => {\n                success[newKey] = instantiator(obj);\n            });\n        }\n        return errors.length > 0 ? SimpleResult.serror(errors) : SimpleResult.svalue(success);\n    };\n    const valueThunk = (getDelegate) => {\n        const extract = (path, val) => getDelegate().extract(path, val);\n        const toString = () => getDelegate().toString();\n        return {\n            extract,\n            toString\n        };\n    };\n    // This is because Obj.keys can return things where the key is set to undefined.\n    const getSetKeys = (obj) => keys(filter$1(obj, isNonNullable));\n    const objOfOnly = (fields) => {\n        const delegate = objOf(fields);\n        const fieldNames = foldr(fields, (acc, value) => {\n            return fold(value, (key) => deepMerge(acc, { [key]: true }), constant$1(acc));\n        }, {});\n        const extract = (path, o) => {\n            const keys = isBoolean(o) ? [] : getSetKeys(o);\n            const extra = filter$2(keys, (k) => !hasNonNullableKey(fieldNames, k));\n            return extra.length === 0 ? delegate.extract(path, o) : unsupportedFields(path, extra);\n        };\n        return {\n            extract,\n            toString: delegate.toString\n        };\n    };\n    const objOf = (values) => {\n        const extract = (path, o) => extractFields(path, o, values);\n        const toString = () => {\n            const fieldStrings = map$2(values, (value) => fold(value, (key, _okey, _presence, prop) => key + ' -> ' + prop.toString(), (newKey, _instantiator) => 'state(' + newKey + ')'));\n            return 'obj{\\n' + fieldStrings.join('\\n') + '}';\n        };\n        return {\n            extract,\n            toString\n        };\n    };\n    const arrOf = (prop) => {\n        const extract = (path, array) => {\n            const results = map$2(array, (a, i) => prop.extract(path.concat(['[' + i + ']']), a));\n            return ResultCombine.consolidateArr(results);\n        };\n        const toString = () => 'array(' + prop.toString() + ')';\n        return {\n            extract,\n            toString\n        };\n    };\n    const oneOf = (props, rawF) => {\n        // If f is not supplied, then use identity.\n        const f = rawF !== undefined ? rawF : identity;\n        const extract = (path, val) => {\n            const errors = [];\n            // Return on first match\n            for (const prop of props) {\n                const res = prop.extract(path, val);\n                if (res.stype === SimpleResultType.Value) {\n                    return {\n                        stype: SimpleResultType.Value,\n                        svalue: f(res.svalue)\n                    };\n                }\n                errors.push(res);\n            }\n            // All failed, return errors\n            return ResultCombine.consolidateArr(errors);\n        };\n        const toString = () => 'oneOf(' + map$2(props, (prop) => prop.toString()).join(', ') + ')';\n        return {\n            extract,\n            toString\n        };\n    };\n    const setOf$1 = (validator, prop) => {\n        const validateKeys = (path, keys) => arrOf(value$1(validator)).extract(path, keys);\n        const extract = (path, o) => {\n            //\n            const keys$1 = keys(o);\n            const validatedKeys = validateKeys(path, keys$1);\n            return SimpleResult.bind(validatedKeys, (validKeys) => {\n                const schema = map$2(validKeys, (vk) => {\n                    return field$2(vk, vk, required$2(), prop);\n                });\n                return objOf(schema).extract(path, o);\n            });\n        };\n        const toString = () => 'setOf(' + prop.toString() + ')';\n        return {\n            extract,\n            toString\n        };\n    };\n    const thunk = (_desc, processor) => {\n        const getP = cached(processor);\n        const extract = (path, val) => getP().extract(path, val);\n        const toString = () => getP().toString();\n        return {\n            extract,\n            toString\n        };\n    };\n    const arrOfObj = compose(arrOf, objOf);\n\n    const chooseFrom = (path, input, branches, ch) => {\n        const fields = get$h(branches, ch);\n        return fields.fold(() => missingBranch(path, branches, ch), (vp) => vp.extract(path.concat(['branch: ' + ch]), input));\n    };\n    // The purpose of choose is to have a key which picks which of the schemas to follow.\n    // The key will index into the object of schemas: branches\n    const choose$2 = (key, branches) => {\n        const extract = (path, input) => {\n            const choice = get$h(input, key);\n            return choice.fold(() => missingKey(path, key), (chosen) => chooseFrom(path, input, branches, chosen));\n        };\n        const toString = () => 'chooseOn(' + key + '). Possible values: ' + keys(branches);\n        return {\n            extract,\n            toString\n        };\n    };\n\n    const arrOfVal = () => arrOf(anyValue$1);\n    const valueOf = (validator) => value$1((v) => validator(v).fold(SimpleResult.serror, SimpleResult.svalue));\n    const setOf = (validator, prop) => setOf$1((v) => SimpleResult.fromResult(validator(v)), prop);\n    const extractValue = (label, prop, obj) => {\n        const res = prop.extract([label], obj);\n        return SimpleResult.mapError(res, (errs) => ({ input: obj, errors: errs }));\n    };\n    const asRaw = (label, prop, obj) => SimpleResult.toResult(extractValue(label, prop, obj));\n    const getOrDie = (extraction) => {\n        return extraction.fold((errInfo) => {\n            // A readable version of the error.\n            throw new Error(formatError(errInfo));\n        }, identity);\n    };\n    const asRawOrDie$1 = (label, prop, obj) => getOrDie(asRaw(label, prop, obj));\n    const formatError = (errInfo) => {\n        return 'Errors: \\n' + formatErrors(errInfo.errors).join('\\n') +\n            '\\n\\nInput object: ' + formatObj(errInfo.input);\n    };\n    const choose$1 = (key, branches) => choose$2(key, map$1(branches, objOf));\n    const thunkOf = (desc, schema) => thunk(desc, schema);\n\n    const field$1 = field$2;\n    const customField = customField$1;\n    const validateEnum = (values) => valueOf((value) => contains$2(values, value) ?\n        Result.value(value) :\n        Result.error(`Unsupported value: \"${value}\", choose one of \"${values.join(', ')}\".`));\n    const required$1 = (key) => field$1(key, key, required$2(), anyValue());\n    const requiredOf = (key, schema) => field$1(key, key, required$2(), schema);\n    const requiredNumber = (key) => requiredOf(key, number);\n    const requiredString = (key) => requiredOf(key, string);\n    const requiredStringEnum = (key, values) => field$1(key, key, required$2(), validateEnum(values));\n    const requiredFunction = (key) => requiredOf(key, functionProcessor);\n    const forbid = (key, message) => field$1(key, key, asOption(), value$1((_v) => SimpleResult.serror('The field: ' + key + ' is forbidden. ' + message)));\n    const requiredObjOf = (key, objSchema) => field$1(key, key, required$2(), objOf(objSchema));\n    const requiredArrayOfObj = (key, objFields) => field$1(key, key, required$2(), arrOfObj(objFields));\n    const requiredArrayOf = (key, schema) => field$1(key, key, required$2(), arrOf(schema));\n    const option$3 = (key) => field$1(key, key, asOption(), anyValue());\n    const optionOf = (key, schema) => field$1(key, key, asOption(), schema);\n    const optionNumber = (key) => optionOf(key, number);\n    const optionString = (key) => optionOf(key, string);\n    const optionStringEnum = (key, values) => optionOf(key, validateEnum(values));\n    const optionBoolean = (key) => optionOf(key, boolean);\n    const optionFunction = (key) => optionOf(key, functionProcessor);\n    const optionArrayOf = (key, schema) => optionOf(key, arrOf(schema));\n    const optionObjOf = (key, objSchema) => optionOf(key, objOf(objSchema));\n    const optionObjOfOnly = (key, objSchema) => optionOf(key, objOfOnly(objSchema));\n    const defaulted = (key, fallback) => field$1(key, key, defaulted$1(fallback), anyValue());\n    const defaultedOf = (key, fallback, schema) => field$1(key, key, defaulted$1(fallback), schema);\n    const defaultedNumber = (key, fallback) => defaultedOf(key, fallback, number);\n    const defaultedString = (key, fallback) => defaultedOf(key, fallback, string);\n    const defaultedStringEnum = (key, fallback, values) => defaultedOf(key, fallback, validateEnum(values));\n    const defaultedBoolean = (key, fallback) => defaultedOf(key, fallback, boolean);\n    const defaultedFunction = (key, fallback) => defaultedOf(key, fallback, functionProcessor);\n    const defaultedPostMsg = (key, fallback) => defaultedOf(key, fallback, postMessageable);\n    const defaultedArrayOf = (key, fallback, schema) => defaultedOf(key, fallback, arrOf(schema));\n    const defaultedObjOf = (key, fallback, objSchema) => defaultedOf(key, fallback, objOf(objSchema));\n\n    const exclude$1 = (obj, fields) => {\n        const r = {};\n        each(obj, (v, k) => {\n            if (!contains$2(fields, k)) {\n                r[k] = v;\n            }\n        });\n        return r;\n    };\n\n    const wrap$1 = (key, value) => ({ [key]: value });\n    const wrapAll$1 = (keyvalues) => {\n        const r = {};\n        each$1(keyvalues, (kv) => {\n            r[kv.key] = kv.value;\n        });\n        return r;\n    };\n\n    const exclude = (obj, fields) => exclude$1(obj, fields);\n    const wrap = (key, value) => wrap$1(key, value);\n    const wrapAll = (keyvalues) => wrapAll$1(keyvalues);\n    const mergeValues = (values, base) => {\n        return values.length === 0 ? Result.value(base) : Result.value(deepMerge(base, merge$1.apply(undefined, values))\n        // Merger.deepMerge.apply(undefined, [ base ].concat(values))\n        );\n    };\n    const mergeErrors = (errors) => Result.error(flatten(errors));\n    const consolidate = (objs, base) => {\n        const partitions = partition$2(objs);\n        return partitions.errors.length > 0 ? mergeErrors(partitions.errors) : mergeValues(partitions.values, base);\n    };\n\n    const constant = constant$1;\n    const touchstart = constant('touchstart');\n    const touchmove = constant('touchmove');\n    const touchend = constant('touchend');\n    const touchcancel = constant('touchcancel');\n    const mousedown = constant('mousedown');\n    const mousemove = constant('mousemove');\n    const mouseout = constant('mouseout');\n    const mouseup = constant('mouseup');\n    const mouseover = constant('mouseover');\n    // Not really a native event as it has to be simulated\n    const focusin = constant('focusin');\n    const focusout = constant('focusout');\n    const keydown = constant('keydown');\n    const keyup = constant('keyup');\n    const input = constant('input');\n    const change = constant('change');\n    const click = constant('click');\n    const transitioncancel = constant('transitioncancel');\n    const transitionend = constant('transitionend');\n    const transitionstart = constant('transitionstart');\n    const selectstart = constant('selectstart');\n    const pointerdown = constant('pointerdown');\n    const pointermove = constant('pointermove');\n    const pointerup = constant('pointerup');\n    const lostpointercapture = constant('lostpointercapture');\n\n    const prefixName = (name) => constant$1('alloy.' + name);\n    const alloy = { tap: prefixName('tap') };\n    // This is used to pass focus to a component. A component might interpret\n    // this event and pass the DOM focus to one of its children, depending on its\n    // focus model.\n    const focus$3 = prefixName('focus');\n    // This event is fired a small amount of time after the blur has fired. This\n    // allows the handler to know what was the focused element, and what is now.\n    const postBlur = prefixName('blur.post');\n    // This event is fired a small amount of time after the paste event has fired.\n    const postPaste = prefixName('paste.post');\n    // This event is fired by gui.broadcast*. It is defined by 'receivers'\n    const receive = prefixName('receive');\n    // This event is for executing buttons and things that have (mostly) enter actions\n    const execute$5 = prefixName('execute');\n    // This event is used by a menu to tell an item to focus itself because it has been\n    // selected. This might automatically focus inside the item, it might focus the outer\n    // part of the widget etc.\n    const focusItem = prefixName('focus.item');\n    // This event represents a touchstart and touchend on the same location, and fires on\n    // the touchend\n    const tap = alloy.tap;\n    // This event represents a longpress on the same location\n    const longpress = prefixName('longpress');\n    // Fire by a child element to tell the outer element to close\n    const sandboxClose = prefixName('sandbox.close');\n    // Tell the typeahead to cancel any pending fetches (that haven't already executed)\n    const typeaheadCancel = prefixName('typeahead.cancel');\n    // Fired when adding to a world\n    const systemInit = prefixName('system.init');\n    // Fired when a touchmove on the document happens\n    const documentTouchmove = prefixName('system.touchmove');\n    // Fired when a touchend on the document happens\n    const documentTouchend = prefixName('system.touchend');\n    // Fired when the window scrolls\n    const windowScroll = prefixName('system.scroll');\n    // Fired when the window resizes\n    const windowResize = prefixName('system.resize');\n    const attachedToDom = prefixName('system.attached');\n    const detachedFromDom = prefixName('system.detached');\n    const dismissRequested = prefixName('system.dismissRequested');\n    const repositionRequested = prefixName('system.repositionRequested');\n    const focusShifted = prefixName('focusmanager.shifted');\n    // Fired when slots are made hidden/shown\n    const slotVisibility = prefixName('slotcontainer.visibility');\n    // Used for containers outside the mothership that scroll. Used by docking.\n    const externalElementScroll = prefixName('system.external.element.scroll');\n    const changeTab = prefixName('change.tab');\n    const dismissTab = prefixName('dismiss.tab');\n    const highlight$1 = prefixName('highlight');\n    const dehighlight$1 = prefixName('dehighlight');\n\n    const element = (elem) => getHtml(elem);\n\n    const unknown = 'unknown';\n    /*\n      typescipt qwerk:\n      const debugging: boolean = true;\n      if (boolean === false) {  -> this throws a type error! // TS2365:Operator '===' cannot be applied to types 'false' and 'true'\n        https://www.typescriptlang.org/play/#src=const%20foo%3A%20boolean%20%3D%20true%3B%0D%0A%0D%0Aif%20(foo%20%3D%3D%3D%20false)%20%7B%0D%0A%20%20%20%20%0D%0A%7D\n      }\n    */\n    const debugging = true;\n    var EventConfiguration;\n    (function (EventConfiguration) {\n        EventConfiguration[EventConfiguration[\"STOP\"] = 0] = \"STOP\";\n        EventConfiguration[EventConfiguration[\"NORMAL\"] = 1] = \"NORMAL\";\n        EventConfiguration[EventConfiguration[\"LOGGING\"] = 2] = \"LOGGING\";\n    })(EventConfiguration || (EventConfiguration = {}));\n    const eventConfig = Cell({});\n    const makeEventLogger = (eventName, initialTarget) => {\n        const sequence = [];\n        const startTime = new Date().getTime();\n        return {\n            logEventCut: (_name, target, purpose) => {\n                sequence.push({ outcome: 'cut', target, purpose });\n            },\n            logEventStopped: (_name, target, purpose) => {\n                sequence.push({ outcome: 'stopped', target, purpose });\n            },\n            logNoParent: (_name, target, purpose) => {\n                sequence.push({ outcome: 'no-parent', target, purpose });\n            },\n            logEventNoHandlers: (_name, target) => {\n                sequence.push({ outcome: 'no-handlers-left', target });\n            },\n            logEventResponse: (_name, target, purpose) => {\n                sequence.push({ outcome: 'response', purpose, target });\n            },\n            write: () => {\n                const finishTime = new Date().getTime();\n                if (contains$2(['mousemove', 'mouseover', 'mouseout', systemInit()], eventName)) {\n                    return;\n                }\n                // eslint-disable-next-line no-console\n                console.log(eventName, {\n                    event: eventName,\n                    time: finishTime - startTime,\n                    target: initialTarget.dom,\n                    sequence: map$2(sequence, (s) => {\n                        if (!contains$2(['cut', 'stopped', 'response'], s.outcome)) {\n                            return s.outcome;\n                        }\n                        else {\n                            return '{' + s.purpose + '} ' + s.outcome + ' at (' + element(s.target) + ')';\n                        }\n                    })\n                });\n            }\n        };\n    };\n    const processEvent = (eventName, initialTarget, f) => {\n        const status = get$h(eventConfig.get(), eventName).orThunk(() => {\n            const patterns = keys(eventConfig.get());\n            return findMap(patterns, (p) => eventName.indexOf(p) > -1 ? Optional.some(eventConfig.get()[p]) : Optional.none());\n        }).getOr(EventConfiguration.NORMAL);\n        switch (status) {\n            case EventConfiguration.NORMAL:\n                return f(noLogger());\n            case EventConfiguration.LOGGING: {\n                const logger = makeEventLogger(eventName, initialTarget);\n                const output = f(logger);\n                logger.write();\n                return output;\n            }\n            case EventConfiguration.STOP:\n                // Does not even run the function to trigger event and listen to handlers\n                return true;\n        }\n    };\n    // Ignore these files in the error stack\n    const path = [\n        'alloy/data/Fields',\n        'alloy/debugging/Debugging'\n    ];\n    const getTrace = () => {\n        if (debugging === false) {\n            return unknown;\n        }\n        const err = new Error();\n        if (err.stack !== undefined) {\n            const lines = err.stack.split('\\n');\n            return find$5(lines, (line) => line.indexOf('alloy') > 0 && !exists(path, (p) => line.indexOf(p) > -1)).getOr(unknown);\n        }\n        else {\n            return unknown;\n        }\n    };\n    const ignoreEvent = {\n        logEventCut: noop,\n        logEventStopped: noop,\n        logNoParent: noop,\n        logEventNoHandlers: noop,\n        logEventResponse: noop,\n        write: noop\n    };\n    const monitorEvent = (eventName, initialTarget, f) => processEvent(eventName, initialTarget, f);\n    const noLogger = constant$1(ignoreEvent);\n\n    const menuFields = constant$1([\n        required$1('menu'),\n        required$1('selectedMenu')\n    ]);\n    const itemFields = constant$1([\n        required$1('item'),\n        required$1('selectedItem')\n    ]);\n    constant$1(objOf(itemFields().concat(menuFields())));\n    const itemSchema$3 = constant$1(objOf(itemFields()));\n\n    const _initSize = requiredObjOf('initSize', [\n        required$1('numColumns'),\n        required$1('numRows')\n    ]);\n    const itemMarkers = () => requiredOf('markers', itemSchema$3());\n    const tieredMenuMarkers = () => requiredObjOf('markers', [\n        required$1('backgroundMenu')\n    ].concat(menuFields()).concat(itemFields()));\n    const markers$1 = (required) => requiredObjOf('markers', map$2(required, required$1));\n    const onPresenceHandler = (label, fieldName, presence) => {\n        // We care about where the handler was declared (in terms of which schema)\n        getTrace();\n        return field$1(fieldName, fieldName, presence, \n        // Apply some wrapping to their supplied function\n        valueOf((f) => Result.value((...args) => {\n            return f.apply(undefined, args);\n        })));\n    };\n    const onHandler = (fieldName) => onPresenceHandler('onHandler', fieldName, defaulted$1(noop));\n    const onKeyboardHandler = (fieldName) => onPresenceHandler('onKeyboardHandler', fieldName, defaulted$1(Optional.none));\n    const onStrictHandler = (fieldName) => onPresenceHandler('onHandler', fieldName, required$2());\n    const onStrictKeyboardHandler = (fieldName) => onPresenceHandler('onKeyboardHandler', fieldName, required$2());\n    const output$1 = (name, value) => customField(name, constant$1(value));\n    const snapshot = (name) => customField(name, identity);\n    const initSize = constant$1(_initSize);\n\n    const markAsBehaviourApi = (f, apiName, apiFunction) => {\n        const delegate = apiFunction.toString();\n        const endIndex = delegate.indexOf(')') + 1;\n        const openBracketIndex = delegate.indexOf('(');\n        const parameters = delegate.substring(openBracketIndex + 1, endIndex - 1).split(/,\\s*/);\n        f.toFunctionAnnotation = () => ({\n            name: apiName,\n            parameters: cleanParameters(parameters.slice(0, 1).concat(parameters.slice(3)))\n        });\n        return f;\n    };\n    // Remove any comment (/*) at end of parameter names\n    const cleanParameters = (parameters) => map$2(parameters, (p) => endsWith(p, '/*') ? p.substring(0, p.length - '/*'.length) : p);\n    const markAsExtraApi = (f, extraName) => {\n        const delegate = f.toString();\n        const endIndex = delegate.indexOf(')') + 1;\n        const openBracketIndex = delegate.indexOf('(');\n        const parameters = delegate.substring(openBracketIndex + 1, endIndex - 1).split(/,\\s*/);\n        f.toFunctionAnnotation = () => ({\n            name: extraName,\n            parameters: cleanParameters(parameters)\n        });\n        return f;\n    };\n    const markAsSketchApi = (f, apiFunction) => {\n        const delegate = apiFunction.toString();\n        const endIndex = delegate.indexOf(')') + 1;\n        const openBracketIndex = delegate.indexOf('(');\n        const parameters = delegate.substring(openBracketIndex + 1, endIndex - 1).split(/,\\s*/);\n        f.toFunctionAnnotation = () => ({\n            name: 'OVERRIDE',\n            parameters: cleanParameters(parameters.slice(1))\n        });\n        return f;\n    };\n\n    const DelayedFunction = (fun, delay) => {\n        let ref = null;\n        const schedule = (...args) => {\n            ref = setTimeout(() => {\n                fun.apply(null, args);\n                ref = null;\n            }, delay);\n        };\n        const cancel = () => {\n            if (ref !== null) {\n                clearTimeout(ref);\n                ref = null;\n            }\n        };\n        return {\n            cancel,\n            schedule\n        };\n    };\n\n    const SIGNIFICANT_MOVE = 5;\n    const LONGPRESS_DELAY = 400;\n    const getTouch = (event) => {\n        const raw = event.raw;\n        if (raw.touches === undefined || raw.touches.length !== 1) {\n            return Optional.none();\n        }\n        return Optional.some(raw.touches[0]);\n    };\n    // Check to see if the touch has changed a *significant* amount\n    const isFarEnough = (touch, data) => {\n        const distX = Math.abs(touch.clientX - data.x);\n        const distY = Math.abs(touch.clientY - data.y);\n        return distX > SIGNIFICANT_MOVE || distY > SIGNIFICANT_MOVE;\n    };\n    const monitor = (settings) => {\n        /* A tap event is a combination of touchstart and touchend on the same element\n         * without a *significant* touchmove in between.\n         */\n        const startData = value$2();\n        const longpressFired = Cell(false);\n        const longpress$1 = DelayedFunction((event) => {\n            settings.triggerEvent(longpress(), event);\n            longpressFired.set(true);\n        }, LONGPRESS_DELAY);\n        const handleTouchstart = (event) => {\n            getTouch(event).each((touch) => {\n                longpress$1.cancel();\n                const data = {\n                    x: touch.clientX,\n                    y: touch.clientY,\n                    target: event.target\n                };\n                longpress$1.schedule(event);\n                longpressFired.set(false);\n                startData.set(data);\n            });\n            return Optional.none();\n        };\n        const handleTouchmove = (event) => {\n            longpress$1.cancel();\n            getTouch(event).each((touch) => {\n                startData.on((data) => {\n                    if (isFarEnough(touch, data)) {\n                        startData.clear();\n                    }\n                });\n            });\n            return Optional.none();\n        };\n        const handleTouchend = (event) => {\n            longpress$1.cancel();\n            const isSame = (data) => eq(data.target, event.target);\n            return startData.get().filter(isSame).map((_data) => {\n                if (longpressFired.get()) {\n                    event.prevent();\n                    return false;\n                }\n                else {\n                    return settings.triggerEvent(tap(), event);\n                }\n            });\n        };\n        const handlers = wrapAll([\n            { key: touchstart(), value: handleTouchstart },\n            { key: touchmove(), value: handleTouchmove },\n            { key: touchend(), value: handleTouchend }\n        ]);\n        const fireIfReady = (event, type) => get$h(handlers, type).bind((handler) => handler(event));\n        return {\n            fireIfReady\n        };\n    };\n\n    var FocusInsideModes;\n    (function (FocusInsideModes) {\n        FocusInsideModes[\"OnFocusMode\"] = \"onFocus\";\n        FocusInsideModes[\"OnEnterOrSpaceMode\"] = \"onEnterOrSpace\";\n        FocusInsideModes[\"OnApiMode\"] = \"onApi\";\n    })(FocusInsideModes || (FocusInsideModes = {}));\n\n    const _placeholder = 'placeholder';\n    const adt$7 = Adt.generate([\n        { single: ['required', 'valueThunk'] },\n        { multiple: ['required', 'valueThunks'] }\n    ]);\n    const isSubstituted = (spec) => has$2(spec, 'uiType');\n    const subPlaceholder = (owner, detail, compSpec, placeholders) => {\n        if (owner.exists((o) => o !== compSpec.owner)) {\n            return adt$7.single(true, constant$1(compSpec));\n        }\n        // Ignore having to find something for the time being.\n        return get$h(placeholders, compSpec.name).fold(() => {\n            throw new Error('Unknown placeholder component: ' + compSpec.name + '\\nKnown: [' +\n                keys(placeholders) + ']\\nNamespace: ' + owner.getOr('none') + '\\nSpec: ' + JSON.stringify(compSpec, null, 2));\n        }, (newSpec) => \n        // Must return a single/multiple type\n        newSpec.replace());\n    };\n    const scan = (owner, detail, compSpec, placeholders) => {\n        if (isSubstituted(compSpec) && compSpec.uiType === _placeholder) {\n            return subPlaceholder(owner, detail, compSpec, placeholders);\n        }\n        else {\n            return adt$7.single(false, constant$1(compSpec));\n        }\n    };\n    const substitute = (owner, detail, compSpec, placeholders) => {\n        const base = scan(owner, detail, compSpec, placeholders);\n        return base.fold((req, valueThunk) => {\n            const value = isSubstituted(compSpec) ? valueThunk(detail, compSpec.config, compSpec.validated) : valueThunk(detail);\n            const childSpecs = get$h(value, 'components').getOr([]);\n            const substituted = bind$3(childSpecs, (c) => substitute(owner, detail, c, placeholders));\n            return [\n                {\n                    ...value,\n                    components: substituted\n                }\n            ];\n        }, (req, valuesThunk) => {\n            if (isSubstituted(compSpec)) {\n                const values = valuesThunk(detail, compSpec.config, compSpec.validated);\n                // Allow a preprocessing step for groups before returning the components\n                const preprocessor = compSpec.validated.preprocess.getOr(identity);\n                return preprocessor(values);\n            }\n            else {\n                return valuesThunk(detail);\n            }\n        });\n    };\n    const substituteAll = (owner, detail, components, placeholders) => bind$3(components, (c) => substitute(owner, detail, c, placeholders));\n    const oneReplace = (label, replacements) => {\n        let called = false;\n        const used = () => called;\n        const replace = () => {\n            if (called) {\n                throw new Error('Trying to use the same placeholder more than once: ' + label);\n            }\n            called = true;\n            return replacements;\n        };\n        const required = () => replacements.fold((req, _) => req, (req, _) => req);\n        return {\n            name: constant$1(label),\n            required,\n            used,\n            replace\n        };\n    };\n    const substitutePlaces = (owner, detail, components, placeholders) => {\n        const ps = map$1(placeholders, (ph, name) => oneReplace(name, ph));\n        const outcome = substituteAll(owner, detail, components, ps);\n        each(ps, (p) => {\n            if (p.used() === false && p.required()) {\n                throw new Error('Placeholder: ' + p.name() + ' was not found in components list\\nNamespace: ' + owner.getOr('none') + '\\nComponents: ' +\n                    JSON.stringify(detail.components, null, 2));\n            }\n        });\n        return outcome;\n    };\n    const single$2 = adt$7.single;\n    const multiple = adt$7.multiple;\n    const placeholder = constant$1(_placeholder);\n\n    const adt$6 = Adt.generate([\n        { required: ['data'] },\n        { external: ['data'] },\n        { optional: ['data'] },\n        { group: ['data'] }\n    ]);\n    const fFactory = defaulted('factory', { sketch: identity });\n    const fSchema = defaulted('schema', []);\n    const fName = required$1('name');\n    const fPname = field$1('pname', 'pname', defaultedThunk((typeSpec) => '<alloy.' + generate$6(typeSpec.name) + '>'), anyValue());\n    // Groups cannot choose their schema.\n    const fGroupSchema = customField('schema', () => [\n        option$3('preprocess')\n    ]);\n    const fDefaults = defaulted('defaults', constant$1({}));\n    const fOverrides = defaulted('overrides', constant$1({}));\n    const requiredSpec = objOf([\n        fFactory, fSchema, fName, fPname, fDefaults, fOverrides\n    ]);\n    const externalSpec = objOf([\n        fFactory, fSchema, fName, fDefaults, fOverrides\n    ]);\n    const optionalSpec = objOf([\n        fFactory, fSchema, fName, fPname, fDefaults, fOverrides\n    ]);\n    const groupSpec = objOf([\n        fFactory, fGroupSchema, fName,\n        required$1('unit'),\n        fPname, fDefaults, fOverrides\n    ]);\n    const asNamedPart = (part) => {\n        return part.fold(Optional.some, Optional.none, Optional.some, Optional.some);\n    };\n    const name$2 = (part) => {\n        const get = (data) => data.name;\n        return part.fold(get, get, get, get);\n    };\n    const asCommon = (part) => {\n        return part.fold(identity, identity, identity, identity);\n    };\n    const convert = (adtConstructor, partSchema) => (spec) => {\n        const data = asRawOrDie$1('Converting part type', partSchema, spec);\n        return adtConstructor(data);\n    };\n    const required = convert(adt$6.required, requiredSpec);\n    const external$1 = convert(adt$6.external, externalSpec);\n    const optional = convert(adt$6.optional, optionalSpec);\n    const group = convert(adt$6.group, groupSpec);\n    const original = constant$1('entirety');\n\n    var PartType = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        required: required,\n        external: external$1,\n        optional: optional,\n        group: group,\n        asNamedPart: asNamedPart,\n        name: name$2,\n        asCommon: asCommon,\n        original: original\n    });\n\n    const combine$2 = (detail, data, partSpec, partValidated) => \n    // Extremely confusing names and types :(\n    deepMerge(data.defaults(detail, partSpec, partValidated), partSpec, { uid: detail.partUids[data.name] }, data.overrides(detail, partSpec, partValidated));\n    const subs = (owner, detail, parts) => {\n        const internals = {};\n        const externals = {};\n        each$1(parts, (part) => {\n            part.fold(\n            // Internal\n            (data) => {\n                internals[data.pname] = single$2(true, (detail, partSpec, partValidated) => data.factory.sketch(combine$2(detail, data, partSpec, partValidated)));\n            }, \n            // External\n            (data) => {\n                const partSpec = detail.parts[data.name];\n                externals[data.name] = constant$1(data.factory.sketch(combine$2(detail, data, partSpec[original()]), partSpec) // This is missing partValidated\n                );\n                // no placeholders\n            }, \n            // Optional\n            (data) => {\n                internals[data.pname] = single$2(false, (detail, partSpec, partValidated) => data.factory.sketch(combine$2(detail, data, partSpec, partValidated)));\n            }, \n            // Group\n            (data) => {\n                internals[data.pname] = multiple(true, (detail, _partSpec, _partValidated) => {\n                    const units = detail[data.name];\n                    return map$2(units, (u) => \n                    // Group multiples do not take the uid because there is more than one.\n                    data.factory.sketch(deepMerge(data.defaults(detail, u, _partValidated), u, data.overrides(detail, u))));\n                });\n            });\n        });\n        return {\n            internals: constant$1(internals),\n            externals: constant$1(externals)\n        };\n    };\n\n    // TODO: Make more functional if performance isn't an issue.\n    const generate$5 = (owner, parts) => {\n        const r = {};\n        each$1(parts, (part) => {\n            asNamedPart(part).each((np) => {\n                const g = doGenerateOne(owner, np.pname);\n                r[np.name] = (config) => {\n                    const validated = asRawOrDie$1('Part: ' + np.name + ' in ' + owner, objOf(np.schema), config);\n                    return {\n                        ...g,\n                        config,\n                        validated\n                    };\n                };\n            });\n        });\n        return r;\n    };\n    // Does not have the config.\n    const doGenerateOne = (owner, pname) => ({\n        uiType: placeholder(),\n        owner,\n        name: pname\n    });\n    const generateOne$1 = (owner, pname, config) => ({\n        uiType: placeholder(),\n        owner,\n        name: pname,\n        config,\n        validated: {}\n    });\n    const schemas = (parts) => \n    // This actually has to change. It needs to return the schemas for things that will\n    // not appear in the components list, which is only externals\n    bind$3(parts, (part) => part.fold(Optional.none, Optional.some, Optional.none, Optional.none).map((data) => requiredObjOf(data.name, data.schema.concat([\n        snapshot(original())\n    ]))).toArray());\n    const names = (parts) => map$2(parts, name$2);\n    const substitutes = (owner, detail, parts) => subs(owner, detail, parts);\n    const components$1 = (owner, detail, internals) => substitutePlaces(Optional.some(owner), detail, detail.components, internals);\n    const getPart = (component, detail, partKey) => {\n        const uid = detail.partUids[partKey];\n        return component.getSystem().getByUid(uid).toOptional();\n    };\n    const getPartOrDie = (component, detail, partKey) => getPart(component, detail, partKey).getOrDie('Could not find part: ' + partKey);\n    const getParts = (component, detail, partKeys) => {\n        const r = {};\n        const uids = detail.partUids;\n        const system = component.getSystem();\n        each$1(partKeys, (pk) => {\n            r[pk] = constant$1(system.getByUid(uids[pk]));\n        });\n        return r;\n    };\n    const getAllParts = (component, detail) => {\n        const system = component.getSystem();\n        return map$1(detail.partUids, (pUid, _k) => constant$1(system.getByUid(pUid)));\n    };\n    const getAllPartNames = (detail) => keys(detail.partUids);\n    const getPartsOrDie = (component, detail, partKeys) => {\n        const r = {};\n        const uids = detail.partUids;\n        const system = component.getSystem();\n        each$1(partKeys, (pk) => {\n            r[pk] = constant$1(system.getByUid(uids[pk]).getOrDie());\n        });\n        return r;\n    };\n    const defaultUids = (baseUid, partTypes) => {\n        const partNames = names(partTypes);\n        return wrapAll(map$2(partNames, (pn) => ({ key: pn, value: baseUid + '-' + pn })));\n    };\n    const defaultUidsSchema = (partTypes) => field$1('partUids', 'partUids', mergeWithThunk((spec) => defaultUids(spec.uid, partTypes)), anyValue());\n\n    var AlloyParts = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        generate: generate$5,\n        generateOne: generateOne$1,\n        schemas: schemas,\n        names: names,\n        substitutes: substitutes,\n        components: components$1,\n        defaultUids: defaultUids,\n        defaultUidsSchema: defaultUidsSchema,\n        getAllParts: getAllParts,\n        getAllPartNames: getAllPartNames,\n        getPart: getPart,\n        getPartOrDie: getPartOrDie,\n        getParts: getParts,\n        getPartsOrDie: getPartsOrDie\n    });\n\n    const allAlignments = [\n        'valignCentre',\n        'alignLeft',\n        'alignRight',\n        'alignCentre',\n        'top',\n        'bottom',\n        'left',\n        'right',\n        'inset'\n    ];\n    const nu$6 = (xOffset, yOffset, classes, insetModifier = 1) => {\n        const insetXOffset = xOffset * insetModifier;\n        const insetYOffset = yOffset * insetModifier;\n        const getClasses = (prop) => get$h(classes, prop).getOr([]);\n        const make = (xDelta, yDelta, alignmentsOn) => {\n            const alignmentsOff = difference(allAlignments, alignmentsOn);\n            return {\n                offset: SugarPosition(xDelta, yDelta),\n                classesOn: bind$3(alignmentsOn, getClasses),\n                classesOff: bind$3(alignmentsOff, getClasses)\n            };\n        };\n        return {\n            southeast: () => make(-xOffset, yOffset, ['top', 'alignLeft']),\n            southwest: () => make(xOffset, yOffset, ['top', 'alignRight']),\n            south: () => make(-xOffset / 2, yOffset, ['top', 'alignCentre']),\n            northeast: () => make(-xOffset, -yOffset, ['bottom', 'alignLeft']),\n            northwest: () => make(xOffset, -yOffset, ['bottom', 'alignRight']),\n            north: () => make(-xOffset / 2, -yOffset, ['bottom', 'alignCentre']),\n            east: () => make(xOffset, -yOffset / 2, ['valignCentre', 'left']),\n            west: () => make(-xOffset, -yOffset / 2, ['valignCentre', 'right']),\n            insetNortheast: () => make(insetXOffset, insetYOffset, ['top', 'alignLeft', 'inset']),\n            insetNorthwest: () => make(-insetXOffset, insetYOffset, ['top', 'alignRight', 'inset']),\n            insetNorth: () => make(-insetXOffset / 2, insetYOffset, ['top', 'alignCentre', 'inset']),\n            insetSoutheast: () => make(insetXOffset, -insetYOffset, ['bottom', 'alignLeft', 'inset']),\n            insetSouthwest: () => make(-insetXOffset, -insetYOffset, ['bottom', 'alignRight', 'inset']),\n            insetSouth: () => make(-insetXOffset / 2, -insetYOffset, ['bottom', 'alignCentre', 'inset']),\n            insetEast: () => make(-insetXOffset, -insetYOffset / 2, ['valignCentre', 'right', 'inset']),\n            insetWest: () => make(insetXOffset, -insetYOffset / 2, ['valignCentre', 'left', 'inset'])\n        };\n    };\n    const fallback = () => nu$6(0, 0, {});\n\n    const nu$5 = (x, y, bubble, direction, placement, boundsRestriction, labelPrefix, alwaysFit = false) => ({\n        x,\n        y,\n        bubble,\n        direction,\n        placement,\n        restriction: boundsRestriction,\n        label: `${labelPrefix}-${placement}`,\n        alwaysFit\n    });\n\n    const adt$5 = Adt.generate([\n        { southeast: [] },\n        { southwest: [] },\n        { northeast: [] },\n        { northwest: [] },\n        { south: [] },\n        { north: [] },\n        { east: [] },\n        { west: [] }\n    ]);\n    const cata$1 = (subject, southeast, southwest, northeast, northwest, south, north, east, west) => subject.fold(southeast, southwest, northeast, northwest, south, north, east, west);\n    const cataVertical = (subject, south, middle, north) => subject.fold(south, south, north, north, south, north, middle, middle);\n    const cataHorizontal = (subject, east, middle, west) => subject.fold(east, west, east, west, middle, middle, east, west);\n    // TODO: Simplify with the typescript approach.\n    const southeast$3 = adt$5.southeast;\n    const southwest$3 = adt$5.southwest;\n    const northeast$3 = adt$5.northeast;\n    const northwest$3 = adt$5.northwest;\n    const south$3 = adt$5.south;\n    const north$3 = adt$5.north;\n    const east$3 = adt$5.east;\n    const west$3 = adt$5.west;\n\n    const getRestriction = (anchor, restriction) => {\n        switch (restriction) {\n            case 1 /* AnchorBoxBounds.LeftEdge */:\n                return anchor.x;\n            case 0 /* AnchorBoxBounds.RightEdge */:\n                return anchor.x + anchor.width;\n            case 2 /* AnchorBoxBounds.TopEdge */:\n                return anchor.y;\n            case 3 /* AnchorBoxBounds.BottomEdge */:\n                return anchor.y + anchor.height;\n        }\n    };\n    const boundsRestriction = (anchor, restrictions) => mapToObject(['left', 'right', 'top', 'bottom'], (dir) => get$h(restrictions, dir).map((restriction) => getRestriction(anchor, restriction)));\n    const adjustBounds = (bounds$1, restriction, bubbleOffset) => {\n        const applyRestriction = (dir, current) => restriction[dir].map((pos) => {\n            const isVerticalAxis = dir === 'top' || dir === 'bottom';\n            const offset = isVerticalAxis ? bubbleOffset.top : bubbleOffset.left;\n            const comparator = dir === 'left' || dir === 'top' ? Math.max : Math.min;\n            const newPos = comparator(pos, current) + offset;\n            // Ensure the new restricted position is within the current bounds\n            return isVerticalAxis ? clamp(newPos, bounds$1.y, bounds$1.bottom) : clamp(newPos, bounds$1.x, bounds$1.right);\n        }).getOr(current);\n        const adjustedLeft = applyRestriction('left', bounds$1.x);\n        const adjustedTop = applyRestriction('top', bounds$1.y);\n        const adjustedRight = applyRestriction('right', bounds$1.right);\n        const adjustedBottom = applyRestriction('bottom', bounds$1.bottom);\n        return bounds(adjustedLeft, adjustedTop, adjustedRight - adjustedLeft, adjustedBottom - adjustedTop);\n    };\n\n    /*\n      Layout for menus and inline context dialogs;\n      Either above or below. Never left or right.\n      Aligned to the left or right of the anchor as appropriate.\n     */\n    const labelPrefix$2 = 'layout';\n    // display element to the right, left edge against the anchor\n    const eastX$1 = (anchor) => anchor.x;\n    // element centre aligned horizontally with the anchor\n    const middleX$1 = (anchor, element) => anchor.x + (anchor.width / 2) - (element.width / 2);\n    // display element to the left, right edge against the right of the anchor\n    const westX$1 = (anchor, element) => anchor.x + anchor.width - element.width;\n    // display element above, bottom edge against the top of the anchor\n    const northY$2 = (anchor, element) => anchor.y - element.height;\n    // display element below, top edge against the bottom of the anchor\n    const southY$2 = (anchor) => anchor.y + anchor.height;\n    // display element below, top edge against the bottom of the anchor\n    const centreY$1 = (anchor, element) => anchor.y + (anchor.height / 2) - (element.height / 2);\n    const eastEdgeX$1 = (anchor) => anchor.x + anchor.width;\n    const westEdgeX$1 = (anchor, element) => anchor.x - element.width;\n    const southeast$2 = (anchor, element, bubbles) => nu$5(eastX$1(anchor), southY$2(anchor), bubbles.southeast(), southeast$3(), \"southeast\" /* Placement.Southeast */, boundsRestriction(anchor, { left: 1 /* AnchorBoxBounds.LeftEdge */, top: 3 /* AnchorBoxBounds.BottomEdge */ }), labelPrefix$2);\n    const southwest$2 = (anchor, element, bubbles) => nu$5(westX$1(anchor, element), southY$2(anchor), bubbles.southwest(), southwest$3(), \"southwest\" /* Placement.Southwest */, boundsRestriction(anchor, { right: 0 /* AnchorBoxBounds.RightEdge */, top: 3 /* AnchorBoxBounds.BottomEdge */ }), labelPrefix$2);\n    const northeast$2 = (anchor, element, bubbles) => nu$5(eastX$1(anchor), northY$2(anchor, element), bubbles.northeast(), northeast$3(), \"northeast\" /* Placement.Northeast */, boundsRestriction(anchor, { left: 1 /* AnchorBoxBounds.LeftEdge */, bottom: 2 /* AnchorBoxBounds.TopEdge */ }), labelPrefix$2);\n    const northwest$2 = (anchor, element, bubbles) => nu$5(westX$1(anchor, element), northY$2(anchor, element), bubbles.northwest(), northwest$3(), \"northwest\" /* Placement.Northwest */, boundsRestriction(anchor, { right: 0 /* AnchorBoxBounds.RightEdge */, bottom: 2 /* AnchorBoxBounds.TopEdge */ }), labelPrefix$2);\n    const north$2 = (anchor, element, bubbles) => nu$5(middleX$1(anchor, element), northY$2(anchor, element), bubbles.north(), north$3(), \"north\" /* Placement.North */, boundsRestriction(anchor, { bottom: 2 /* AnchorBoxBounds.TopEdge */ }), labelPrefix$2);\n    const south$2 = (anchor, element, bubbles) => nu$5(middleX$1(anchor, element), southY$2(anchor), bubbles.south(), south$3(), \"south\" /* Placement.South */, boundsRestriction(anchor, { top: 3 /* AnchorBoxBounds.BottomEdge */ }), labelPrefix$2);\n    const east$2 = (anchor, element, bubbles) => nu$5(eastEdgeX$1(anchor), centreY$1(anchor, element), bubbles.east(), east$3(), \"east\" /* Placement.East */, boundsRestriction(anchor, { left: 0 /* AnchorBoxBounds.RightEdge */ }), labelPrefix$2);\n    const west$2 = (anchor, element, bubbles) => nu$5(westEdgeX$1(anchor, element), centreY$1(anchor, element), bubbles.west(), west$3(), \"west\" /* Placement.West */, boundsRestriction(anchor, { right: 1 /* AnchorBoxBounds.LeftEdge */ }), labelPrefix$2);\n    const all$2 = () => [southeast$2, southwest$2, northeast$2, northwest$2, south$2, north$2, east$2, west$2];\n    const allRtl$1 = () => [southwest$2, southeast$2, northwest$2, northeast$2, south$2, north$2, east$2, west$2];\n    const aboveOrBelow = () => [northeast$2, northwest$2, southeast$2, southwest$2, north$2, south$2];\n    const aboveOrBelowRtl = () => [northwest$2, northeast$2, southwest$2, southeast$2, north$2, south$2];\n    const belowOrAbove = () => [southeast$2, southwest$2, northeast$2, northwest$2, south$2, north$2];\n    const belowOrAboveRtl = () => [southwest$2, southeast$2, northwest$2, northeast$2, south$2, north$2];\n\n    const placementAttribute = 'data-alloy-placement';\n    const setPlacement$1 = (element, placement) => {\n        set$9(element, placementAttribute, placement);\n    };\n    const getPlacement = (element) => getOpt(element, placementAttribute);\n    const reset$2 = (element) => remove$8(element, placementAttribute);\n\n    /*\n      Layouts for things that overlay over the anchor element/box. These are designed to mirror\n      the `Layout` logic.\n\n      As an example `Layout.north` will appear horizontally centered above the anchor, whereas\n      `LayoutInset.north` will appear horizontally centered overlapping the top of the anchor.\n     */\n    const labelPrefix$1 = 'layout-inset';\n    // returns left edge of anchor - used to display element to the left, left edge against the anchor\n    const westEdgeX = (anchor) => anchor.x;\n    // returns middle of anchor minus half the element width - used to horizontally centre element to the anchor\n    const middleX = (anchor, element) => anchor.x + (anchor.width / 2) - (element.width / 2);\n    // returns right edge of anchor minus element width - used to display element to the right, right edge against the anchor\n    const eastEdgeX = (anchor, element) => anchor.x + anchor.width - element.width;\n    // returns top edge - used to display element to the top, top edge against the anchor\n    const northY$1 = (anchor) => anchor.y;\n    // returns bottom edge minus element height - used to display element at the bottom, bottom edge against the anchor\n    const southY$1 = (anchor, element) => anchor.y + anchor.height - element.height;\n    // returns centre of anchor minus half the element height - used to vertically centre element to the anchor\n    const centreY = (anchor, element) => anchor.y + (anchor.height / 2) - (element.height / 2);\n    // positions element relative to the bottom right of the anchor\n    const southwest$1 = (anchor, element, bubbles) => nu$5(eastEdgeX(anchor, element), southY$1(anchor, element), bubbles.insetSouthwest(), northwest$3(), \"southwest\" /* Placement.Southwest */, boundsRestriction(anchor, { right: 0 /* AnchorBoxBounds.RightEdge */, bottom: 3 /* AnchorBoxBounds.BottomEdge */ }), labelPrefix$1);\n    // positions element relative to the bottom left of the anchor\n    const southeast$1 = (anchor, element, bubbles) => nu$5(westEdgeX(anchor), southY$1(anchor, element), bubbles.insetSoutheast(), northeast$3(), \"southeast\" /* Placement.Southeast */, boundsRestriction(anchor, { left: 1 /* AnchorBoxBounds.LeftEdge */, bottom: 3 /* AnchorBoxBounds.BottomEdge */ }), labelPrefix$1);\n    // positions element relative to the top right of the anchor\n    const northwest$1 = (anchor, element, bubbles) => nu$5(eastEdgeX(anchor, element), northY$1(anchor), bubbles.insetNorthwest(), southwest$3(), \"northwest\" /* Placement.Northwest */, boundsRestriction(anchor, { right: 0 /* AnchorBoxBounds.RightEdge */, top: 2 /* AnchorBoxBounds.TopEdge */ }), labelPrefix$1);\n    // positions element relative to the top left of the anchor\n    const northeast$1 = (anchor, element, bubbles) => nu$5(westEdgeX(anchor), northY$1(anchor), bubbles.insetNortheast(), southeast$3(), \"northeast\" /* Placement.Northeast */, boundsRestriction(anchor, { left: 1 /* AnchorBoxBounds.LeftEdge */, top: 2 /* AnchorBoxBounds.TopEdge */ }), labelPrefix$1);\n    // positions element relative to the top of the anchor, horizontally centered\n    const north$1 = (anchor, element, bubbles) => nu$5(middleX(anchor, element), northY$1(anchor), bubbles.insetNorth(), south$3(), \"north\" /* Placement.North */, boundsRestriction(anchor, { top: 2 /* AnchorBoxBounds.TopEdge */ }), labelPrefix$1);\n    // positions element relative to the bottom of the anchor, horizontally centered\n    const south$1 = (anchor, element, bubbles) => nu$5(middleX(anchor, element), southY$1(anchor, element), bubbles.insetSouth(), north$3(), \"south\" /* Placement.South */, boundsRestriction(anchor, { bottom: 3 /* AnchorBoxBounds.BottomEdge */ }), labelPrefix$1);\n    // positions element with the right edge against the anchor, vertically centered\n    const east$1 = (anchor, element, bubbles) => nu$5(eastEdgeX(anchor, element), centreY(anchor, element), bubbles.insetEast(), west$3(), \"east\" /* Placement.East */, boundsRestriction(anchor, { right: 0 /* AnchorBoxBounds.RightEdge */ }), labelPrefix$1);\n    // positions element with the left each against the anchor, vertically centered\n    const west$1 = (anchor, element, bubbles) => nu$5(westEdgeX(anchor), centreY(anchor, element), bubbles.insetWest(), east$3(), \"west\" /* Placement.West */, boundsRestriction(anchor, { left: 1 /* AnchorBoxBounds.LeftEdge */ }), labelPrefix$1);\n    const lookupPreserveLayout = (lastPlacement) => {\n        switch (lastPlacement) {\n            case \"north\" /* Placement.North */:\n                return north$1;\n            case \"northeast\" /* Placement.Northeast */:\n                return northeast$1;\n            case \"northwest\" /* Placement.Northwest */:\n                return northwest$1;\n            case \"south\" /* Placement.South */:\n                return south$1;\n            case \"southeast\" /* Placement.Southeast */:\n                return southeast$1;\n            case \"southwest\" /* Placement.Southwest */:\n                return southwest$1;\n            case \"east\" /* Placement.East */:\n                return east$1;\n            case \"west\" /* Placement.West */:\n                return west$1;\n        }\n    };\n    const preserve$1 = (anchor, element, bubbles, placee, bounds) => {\n        const layout = getPlacement(placee).map(lookupPreserveLayout).getOr(north$1);\n        return layout(anchor, element, bubbles, placee, bounds);\n    };\n    const lookupFlippedLayout = (lastPlacement) => {\n        switch (lastPlacement) {\n            case \"north\" /* Placement.North */:\n                return south$1;\n            case \"northeast\" /* Placement.Northeast */:\n                return southeast$1;\n            case \"northwest\" /* Placement.Northwest */:\n                return southwest$1;\n            case \"south\" /* Placement.South */:\n                return north$1;\n            case \"southeast\" /* Placement.Southeast */:\n                return northeast$1;\n            case \"southwest\" /* Placement.Southwest */:\n                return northwest$1;\n            case \"east\" /* Placement.East */:\n                return west$1;\n            case \"west\" /* Placement.West */:\n                return east$1;\n        }\n    };\n    const flip = (anchor, element, bubbles, placee, bounds) => {\n        const layout = getPlacement(placee).map(lookupFlippedLayout).getOr(north$1);\n        return layout(anchor, element, bubbles, placee, bounds);\n    };\n\n    // applies the max-height as determined by Bounder\n    const setMaxHeight = (element, maxHeight) => {\n        setMax$1(element, Math.floor(maxHeight));\n    };\n    // adds both max-height and overflow to constrain it\n    const anchored = constant$1((element, available) => {\n        setMaxHeight(element, available);\n        setAll(element, {\n            'overflow-x': 'hidden',\n            'overflow-y': 'auto'\n        });\n    });\n    /*\n     * This adds max height, but not overflow - the effect of this is that elements can grow beyond the max height,\n     * but if they run off the top they're pushed down.\n     *\n     * If the element expands below the screen height it will be cut off, but we were already doing that.\n     */\n    const expandable$1 = constant$1((element, available) => {\n        setMaxHeight(element, available);\n    });\n\n    // applies the max-width as determined by Bounder\n    const expandable = constant$1((element, available) => {\n        setMax(element, Math.floor(available));\n    });\n\n    var AttributeValue;\n    (function (AttributeValue) {\n        AttributeValue[\"TopToBottom\"] = \"toptobottom\";\n        AttributeValue[\"BottomToTop\"] = \"bottomtotop\";\n    })(AttributeValue || (AttributeValue = {}));\n    const Attribute = 'data-alloy-vertical-dir';\n    const isBottomToTopDir = (el) => closest$2(el, (current) => isElement$1(current) && get$g(current, 'data-alloy-vertical-dir') === AttributeValue.BottomToTop);\n\n    var HighlightOnOpen;\n    (function (HighlightOnOpen) {\n        HighlightOnOpen[HighlightOnOpen[\"HighlightMenuAndItem\"] = 0] = \"HighlightMenuAndItem\";\n        HighlightOnOpen[HighlightOnOpen[\"HighlightJustMenu\"] = 1] = \"HighlightJustMenu\";\n        HighlightOnOpen[HighlightOnOpen[\"HighlightNone\"] = 2] = \"HighlightNone\";\n    })(HighlightOnOpen || (HighlightOnOpen = {}));\n\n    const NoState = {\n        init: () => nu$4({\n            readState: constant$1('No State required')\n        })\n    };\n    const nu$4 = (spec) => spec;\n\n    const defaultEventHandler = {\n        can: always,\n        abort: never,\n        run: noop\n    };\n    const nu$3 = (parts) => {\n        if (!hasNonNullableKey(parts, 'can') && !hasNonNullableKey(parts, 'abort') && !hasNonNullableKey(parts, 'run')) {\n            throw new Error('EventHandler defined by: ' + JSON.stringify(parts, null, 2) + ' does not have can, abort, or run!');\n        }\n        return {\n            ...defaultEventHandler,\n            ...parts\n        };\n    };\n    const all$1 = (handlers, f) => (...args) => foldl(handlers, (acc, handler) => acc && f(handler).apply(undefined, args), true);\n    const any = (handlers, f) => (...args) => foldl(handlers, (acc, handler) => acc || f(handler).apply(undefined, args), false);\n    const read$1 = (handler) => isFunction(handler) ? {\n        can: always,\n        abort: never,\n        run: handler\n    } : handler;\n    const fuse$1 = (handlers) => {\n        const can = all$1(handlers, (handler) => handler.can);\n        const abort = any(handlers, (handler) => handler.abort);\n        const run = (...args) => {\n            each$1(handlers, (handler) => {\n                // ASSUMPTION: Return value is unimportant.\n                handler.run.apply(undefined, args);\n            });\n        };\n        return {\n            can,\n            abort,\n            run\n        };\n    };\n\n    const emit = (component, event) => {\n        dispatchWith(component, component.element, event, {});\n    };\n    const emitWith = (component, event, properties) => {\n        dispatchWith(component, component.element, event, properties);\n    };\n    const emitExecute = (component) => {\n        emit(component, execute$5());\n    };\n    const dispatch = (component, target, event) => {\n        dispatchWith(component, target, event, {});\n    };\n    const dispatchWith = (component, target, event, properties) => {\n        // NOTE: The order of spreading here means that it will maintain any target that\n        // exists in the current properties. Because this function has been used for situations where\n        // properties is either an emulated SugarEvent with no target (see TouchEvent) or\n        // for emitting custom events that have no target, this likely hasn't been a problem.\n        // But until we verify that nothing is relying on this ordering, there is an alternate\n        // function below called retargetAndDispatchWith, which spreads in the other direction.\n        const data = {\n            target,\n            ...properties\n        };\n        component.getSystem().triggerEvent(event, target, data);\n    };\n    const retargetAndDispatchWith = (component, target, eventName, properties) => {\n        // This is essentially the same as dispatchWith, except the spreading order\n        // means that it clobbers anything in the nativeEvent with \"target\". It also\n        // expects what is being passed in to be a real sugar event, not just a data\n        // blob\n        const data = {\n            ...properties,\n            target\n        };\n        component.getSystem().triggerEvent(eventName, target, data);\n    };\n    const dispatchEvent = (component, target, event, simulatedEvent) => {\n        component.getSystem().triggerEvent(event, target, simulatedEvent.event);\n    };\n\n    const derive$2 = (configs) => wrapAll(configs);\n    // const combine = (configs...);\n    const abort = (name, predicate) => {\n        return {\n            key: name,\n            value: nu$3({\n                abort: predicate\n            })\n        };\n    };\n    const can = (name, predicate) => {\n        return {\n            key: name,\n            value: nu$3({\n                can: predicate\n            })\n        };\n    };\n    const preventDefault = (name) => {\n        return {\n            key: name,\n            value: nu$3({\n                run: (component, simulatedEvent) => {\n                    simulatedEvent.event.prevent();\n                }\n            })\n        };\n    };\n    const run$1 = (name, handler) => {\n        return {\n            key: name,\n            value: nu$3({\n                run: handler\n            })\n        };\n    };\n    // Extra can be used when your handler needs more context, and is declared in one spot\n    // It's really just convenient partial application.\n    const runActionExtra = (name, action, extra) => {\n        return {\n            key: name,\n            value: nu$3({\n                run: (component, simulatedEvent) => {\n                    action.apply(undefined, [component, simulatedEvent].concat(extra));\n                }\n            })\n        };\n    };\n    const runOnName = (name) => {\n        return (handler) => run$1(name, handler);\n    };\n    const runOnSourceName = (name) => {\n        return (handler) => ({\n            key: name,\n            value: nu$3({\n                run: (component, simulatedEvent) => {\n                    if (isSource(component, simulatedEvent)) {\n                        handler(component, simulatedEvent);\n                    }\n                }\n            })\n        });\n    };\n    const redirectToUid = (name, uid) => {\n        return run$1(name, (component, simulatedEvent) => {\n            component.getSystem().getByUid(uid).each((redirectee) => {\n                dispatchEvent(redirectee, redirectee.element, name, simulatedEvent);\n            });\n        });\n    };\n    const redirectToPart = (name, detail, partName) => {\n        const uid = detail.partUids[partName];\n        return redirectToUid(name, uid);\n    };\n    const runWithTarget = (name, f) => {\n        return run$1(name, (component, simulatedEvent) => {\n            const ev = simulatedEvent.event;\n            const target = component.getSystem().getByDom(ev.target).getOrThunk(\n            // If we don't find an alloy component for the target, I guess we go up the tree\n            // until we find an alloy component? Performance concern?\n            // TODO: Write tests for this.\n            () => {\n                const closest$1 = closest(ev.target, (el) => component.getSystem().getByDom(el).toOptional(), never);\n                // If we still found nothing ... fire on component itself;\n                return closest$1.getOr(component);\n            });\n            f(component, target, simulatedEvent);\n        });\n    };\n    const cutter = (name) => {\n        return run$1(name, (component, simulatedEvent) => {\n            simulatedEvent.cut();\n        });\n    };\n    const stopper = (name) => {\n        return run$1(name, (component, simulatedEvent) => {\n            simulatedEvent.stop();\n        });\n    };\n    const runOnSource = (name, f) => {\n        return runOnSourceName(name)(f);\n    };\n    const runOnAttached = runOnSourceName(attachedToDom());\n    const runOnDetached = runOnSourceName(detachedFromDom());\n    const runOnInit = runOnSourceName(systemInit());\n    const runOnExecute$1 = runOnName(execute$5());\n\n    // Maybe we'll need to allow add/remove\n    const nu$2 = (s) => ({\n        classes: isUndefined(s.classes) ? [] : s.classes,\n        attributes: isUndefined(s.attributes) ? {} : s.attributes,\n        styles: isUndefined(s.styles) ? {} : s.styles\n    });\n    const merge = (defnA, mod) => ({\n        ...defnA,\n        attributes: { ...defnA.attributes, ...mod.attributes },\n        styles: { ...defnA.styles, ...mod.styles },\n        classes: defnA.classes.concat(mod.classes)\n    });\n\n    const executeEvent = (bConfig, bState, executor) => runOnExecute$1((component) => {\n        executor(component, bConfig, bState);\n    });\n    const loadEvent = (bConfig, bState, f) => runOnInit((component, _simulatedEvent) => {\n        f(component, bConfig, bState);\n    });\n    const create$4 = (schema, name, active, apis, extra, state) => {\n        const configSchema = objOfOnly(schema);\n        const schemaSchema = optionObjOf(name, [\n            optionObjOfOnly('config', schema)\n        ]);\n        return doCreate(configSchema, schemaSchema, name, active, apis, extra, state);\n    };\n    const createModes$1 = (modes, name, active, apis, extra, state) => {\n        const configSchema = modes;\n        const schemaSchema = optionObjOf(name, [\n            optionOf('config', modes)\n        ]);\n        return doCreate(configSchema, schemaSchema, name, active, apis, extra, state);\n    };\n    const wrapApi = (bName, apiFunction, apiName) => {\n        const f = (component, ...rest) => {\n            const args = [component].concat(rest);\n            return component.config({\n                name: constant$1(bName)\n            }).fold(() => {\n                throw new Error('We could not find any behaviour configuration for: ' + bName + '. Using API: ' + apiName);\n            }, (info) => {\n                const rest = Array.prototype.slice.call(args, 1);\n                return apiFunction.apply(undefined, [component, info.config, info.state].concat(rest));\n            });\n        };\n        return markAsBehaviourApi(f, apiName, apiFunction);\n    };\n    // I think the \"revoke\" idea is fragile at best.\n    const revokeBehaviour = (name) => ({\n        key: name,\n        value: undefined\n    });\n    const doCreate = (configSchema, schemaSchema, name, active, apis, extra, state) => {\n        const getConfig = (info) => hasNonNullableKey(info, name) ? info[name]() : Optional.none();\n        const wrappedApis = map$1(apis, (apiF, apiName) => wrapApi(name, apiF, apiName));\n        const wrappedExtra = map$1(extra, (extraF, extraName) => markAsExtraApi(extraF, extraName));\n        const me = {\n            ...wrappedExtra,\n            ...wrappedApis,\n            revoke: curry(revokeBehaviour, name),\n            config: (spec) => {\n                const prepared = asRawOrDie$1(name + '-config', configSchema, spec);\n                return {\n                    key: name,\n                    value: {\n                        config: prepared,\n                        me,\n                        configAsRaw: cached(() => asRawOrDie$1(name + '-config', configSchema, spec)),\n                        initialConfig: spec,\n                        state\n                    }\n                };\n            },\n            schema: constant$1(schemaSchema),\n            exhibit: (info, base) => {\n                return lift2(getConfig(info), get$h(active, 'exhibit'), (behaviourInfo, exhibitor) => {\n                    return exhibitor(base, behaviourInfo.config, behaviourInfo.state);\n                }).getOrThunk(() => nu$2({}));\n            },\n            name: constant$1(name),\n            handlers: (info) => {\n                return getConfig(info).map((behaviourInfo) => {\n                    const getEvents = get$h(active, 'events').getOr(() => ({}));\n                    return getEvents(behaviourInfo.config, behaviourInfo.state);\n                }).getOr({});\n            }\n        };\n        return me;\n    };\n\n    const derive$1 = (capabilities) => wrapAll(capabilities);\n    const simpleSchema = objOfOnly([\n        required$1('fields'),\n        required$1('name'),\n        defaulted('active', {}),\n        defaulted('apis', {}),\n        defaulted('state', NoState),\n        defaulted('extra', {})\n    ]);\n    const create$3 = (data) => {\n        const value = asRawOrDie$1('Creating behaviour: ' + data.name, simpleSchema, data);\n        return create$4(value.fields, value.name, value.active, value.apis, value.extra, value.state);\n    };\n    const modeSchema = objOfOnly([\n        required$1('branchKey'),\n        required$1('branches'),\n        required$1('name'),\n        defaulted('active', {}),\n        defaulted('apis', {}),\n        defaulted('state', NoState),\n        defaulted('extra', {})\n    ]);\n    const createModes = (data) => {\n        const value = asRawOrDie$1('Creating behaviour: ' + data.name, modeSchema, data);\n        return createModes$1(choose$1(value.branchKey, value.branches), value.name, value.active, value.apis, value.extra, value.state);\n    };\n    const revoke = constant$1(undefined);\n\n    // AlloyEventKeyAndHandler type argument needs to be any here to satisfy an array of handlers\n    // where each item can be any subtype of EventFormat we can't use <T extends EventFormat> since\n    // then each item would have to be the same type\n    const events$j = (name, eventHandlers) => {\n        const events = derive$2(eventHandlers);\n        return create$3({\n            fields: [\n                required$1('enabled')\n            ],\n            name,\n            active: {\n                events: constant$1(events)\n            }\n        });\n    };\n    const config = (name, eventHandlers) => {\n        const me = events$j(name, eventHandlers);\n        return {\n            key: name,\n            value: {\n                config: {},\n                me,\n                configAsRaw: constant$1({}),\n                initialConfig: {},\n                state: NoState\n            }\n        };\n    };\n\n    const SetupBehaviourCellState = (initialState) => {\n        const init = () => {\n            const cell = Cell(initialState);\n            const get = () => cell.get();\n            const set = (newState) => cell.set(newState);\n            const clear = () => cell.set(initialState);\n            const readState = () => cell.get();\n            return {\n                get,\n                set,\n                clear,\n                readState\n            };\n        };\n        return {\n            init\n        };\n    };\n\n    const focus$2 = (component, focusConfig) => {\n        if (!focusConfig.ignore) {\n            focus$4(component.element);\n            focusConfig.onFocus(component);\n        }\n    };\n    const blur = (component, focusConfig) => {\n        if (!focusConfig.ignore) {\n            blur$1(component.element);\n        }\n    };\n    const isFocused = (component) => hasFocus(component.element);\n\n    var FocusApis = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        focus: focus$2,\n        blur: blur,\n        isFocused: isFocused\n    });\n\n    // TODO: DomModification types\n    const exhibit$6 = (base, focusConfig) => {\n        const mod = focusConfig.ignore ? {} : {\n            attributes: {\n                tabindex: '-1'\n            }\n        };\n        return nu$2(mod);\n    };\n    const events$i = (focusConfig) => derive$2([\n        run$1(focus$3(), (component, simulatedEvent) => {\n            focus$2(component, focusConfig);\n            simulatedEvent.stop();\n        })\n    ].concat(focusConfig.stopMousedown ? [\n        run$1(mousedown(), (_, simulatedEvent) => {\n            // This setting is often used in tandem with ignoreFocus. Basically, if you\n            // don't prevent default on a menu that has fake focus, then it can transfer\n            // focus to the outer body when they click on it, which can break things\n            // which dismiss on blur (e.g. typeahead)\n            simulatedEvent.event.prevent();\n        })\n    ] : []));\n\n    var ActiveFocus = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        exhibit: exhibit$6,\n        events: events$i\n    });\n\n    var FocusSchema = [\n        // TODO: Work out when we want to  call this. Only when it is has changed?\n        onHandler('onFocus'),\n        defaulted('stopMousedown', false),\n        defaulted('ignore', false)\n    ];\n\n    const Focusing = create$3({\n        fields: FocusSchema,\n        name: 'focusing',\n        active: ActiveFocus,\n        apis: FocusApis\n        // Consider adding isFocused an an extra\n    });\n\n    const BACKSPACE = [8];\n    const TAB = [9];\n    const ENTER = [13];\n    const ESCAPE = [27];\n    const SPACE = [32];\n    const LEFT = [37];\n    const UP = [38];\n    const RIGHT = [39];\n    const DOWN = [40];\n\n    const closeTooltips = constant$1('tooltipping.close.all');\n    const dismissPopups = constant$1('dismiss.popups');\n    const repositionPopups = constant$1('reposition.popups');\n    const mouseReleased = constant$1('mouse.released');\n\n    const cyclePrev = (values, index, predicate) => {\n        const before = reverse(values.slice(0, index));\n        const after = reverse(values.slice(index + 1));\n        return find$5(before.concat(after), predicate);\n    };\n    const tryPrev = (values, index, predicate) => {\n        const before = reverse(values.slice(0, index));\n        return find$5(before, predicate);\n    };\n    const cycleNext = (values, index, predicate) => {\n        const before = values.slice(0, index);\n        const after = values.slice(index + 1);\n        return find$5(after.concat(before), predicate);\n    };\n    const tryNext = (values, index, predicate) => {\n        const after = values.slice(index + 1);\n        return find$5(after, predicate);\n    };\n\n    const inSet = (keys) => (event) => {\n        const raw = event.raw;\n        return contains$2(keys, raw.which);\n    };\n    const and = (preds) => (event) => forall(preds, (pred) => pred(event));\n    const isShift$1 = (event) => {\n        const raw = event.raw;\n        return raw.shiftKey === true;\n    };\n    const isControl = (event) => {\n        const raw = event.raw;\n        return raw.ctrlKey === true;\n    };\n    const isNotShift = not(isShift$1);\n\n    const rule = (matches, action) => ({\n        matches,\n        classification: action\n    });\n    const choose = (transitions, event) => {\n        const transition = find$5(transitions, (t) => t.matches(event));\n        return transition.map((t) => t.classification);\n    };\n\n    // THIS IS NOT API YET\n    const dehighlightAllExcept = (component, hConfig, hState, skip) => {\n        const highlighted = descendants(component.element, '.' + hConfig.highlightClass);\n        each$1(highlighted, (h) => {\n            // We don't want to dehighlight anything that should be skipped.\n            // Generally, this is because we are about to highlight that thing.\n            const shouldSkip = exists(skip, (skipComp) => eq(skipComp.element, h));\n            if (!shouldSkip) {\n                remove$3(h, hConfig.highlightClass);\n                component.getSystem().getByDom(h).each((target) => {\n                    hConfig.onDehighlight(component, target);\n                    emit(target, dehighlight$1());\n                });\n            }\n        });\n    };\n    const dehighlightAll = (component, hConfig, hState) => dehighlightAllExcept(component, hConfig, hState, []);\n    const dehighlight = (component, hConfig, hState, target) => {\n        // Only act if it was highlighted.\n        if (isHighlighted(component, hConfig, hState, target)) {\n            remove$3(target.element, hConfig.highlightClass);\n            hConfig.onDehighlight(component, target);\n            emit(target, dehighlight$1());\n        }\n    };\n    const highlight = (component, hConfig, hState, target) => {\n        // If asked to highlight something, dehighlight everything else first except\n        // for the new thing we are going to highlight. It's a rare case, but we don't\n        // want to get an onDehighlight, onHighlight for the same item on a highlight call.\n        // We also don't want to call onHighlight if it was already highlighted.\n        //\n        // Note, that there is an important distinction here: highlight is NOT a no-op\n        // if target is already highlighted, because it will still dehighlight everything else.\n        // However, it won't fire any onHighlight or onDehighlight handlers for the already\n        // highlighted item. I'm not sure if this is behaviour we need to maintain, but it is now\n        // tested. A simpler approach might just be to not do anything if it's already highlighted,\n        // but that could leave us in an inconsistent state, where multiple items have highlights\n        // even after a highlight call. This way, highlight validates the highlights in the\n        // component, and ensures there is only one thing highlighted.\n        dehighlightAllExcept(component, hConfig, hState, [target]);\n        if (!isHighlighted(component, hConfig, hState, target)) {\n            add$2(target.element, hConfig.highlightClass);\n            hConfig.onHighlight(component, target);\n            emit(target, highlight$1());\n        }\n    };\n    const highlightFirst = (component, hConfig, hState) => {\n        getFirst(component, hConfig).each((firstComp) => {\n            highlight(component, hConfig, hState, firstComp);\n        });\n    };\n    const highlightLast = (component, hConfig, hState) => {\n        getLast(component, hConfig).each((lastComp) => {\n            highlight(component, hConfig, hState, lastComp);\n        });\n    };\n    const highlightAt = (component, hConfig, hState, index) => {\n        getByIndex(component, hConfig, hState, index).fold((err) => {\n            throw err;\n        }, (firstComp) => {\n            highlight(component, hConfig, hState, firstComp);\n        });\n    };\n    const highlightBy = (component, hConfig, hState, predicate) => {\n        const candidates = getCandidates(component, hConfig);\n        const targetComp = find$5(candidates, predicate);\n        targetComp.each((c) => {\n            highlight(component, hConfig, hState, c);\n        });\n    };\n    const isHighlighted = (component, hConfig, hState, queryTarget) => has(queryTarget.element, hConfig.highlightClass);\n    const getHighlighted = (component, hConfig, _hState) => descendant(component.element, '.' + hConfig.highlightClass).bind((e) => component.getSystem().getByDom(e).toOptional());\n    const getByIndex = (component, hConfig, hState, index) => {\n        const items = descendants(component.element, '.' + hConfig.itemClass);\n        return Optional.from(items[index]).fold(() => Result.error(new Error('No element found with index ' + index)), component.getSystem().getByDom);\n    };\n    const getFirst = (component, hConfig, _hState) => descendant(component.element, '.' + hConfig.itemClass).bind((e) => component.getSystem().getByDom(e).toOptional());\n    const getLast = (component, hConfig, _hState) => {\n        const items = descendants(component.element, '.' + hConfig.itemClass);\n        const last = items.length > 0 ? Optional.some(items[items.length - 1]) : Optional.none();\n        return last.bind((c) => component.getSystem().getByDom(c).toOptional());\n    };\n    const getDelta$3 = (component, hConfig, hState, delta) => {\n        const items = descendants(component.element, '.' + hConfig.itemClass);\n        const current = findIndex$1(items, (item) => has(item, hConfig.highlightClass));\n        return current.bind((selected) => {\n            const dest = cycleBy(selected, delta, 0, items.length - 1);\n            return component.getSystem().getByDom(items[dest]).toOptional();\n        });\n    };\n    const getPrevious = (component, hConfig, hState) => getDelta$3(component, hConfig, hState, -1);\n    const getNext = (component, hConfig, hState) => getDelta$3(component, hConfig, hState, +1);\n    const getCandidates = (component, hConfig, _hState) => {\n        const items = descendants(component.element, '.' + hConfig.itemClass);\n        return cat(map$2(items, (i) => component.getSystem().getByDom(i).toOptional()));\n    };\n\n    var HighlightApis = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        dehighlightAll: dehighlightAll,\n        dehighlight: dehighlight,\n        highlight: highlight,\n        highlightFirst: highlightFirst,\n        highlightLast: highlightLast,\n        highlightAt: highlightAt,\n        highlightBy: highlightBy,\n        isHighlighted: isHighlighted,\n        getHighlighted: getHighlighted,\n        getFirst: getFirst,\n        getLast: getLast,\n        getPrevious: getPrevious,\n        getNext: getNext,\n        getCandidates: getCandidates\n    });\n\n    var HighlightSchema = [\n        required$1('highlightClass'),\n        required$1('itemClass'),\n        onHandler('onHighlight'),\n        onHandler('onDehighlight')\n    ];\n\n    const Highlighting = create$3({\n        fields: HighlightSchema,\n        name: 'highlighting',\n        apis: HighlightApis\n    });\n\n    const reportFocusShifting = (component, prevFocus, newFocus) => {\n        const noChange = prevFocus.exists((p) => newFocus.exists((n) => eq(n, p)));\n        if (!noChange) {\n            emitWith(component, focusShifted(), {\n                prevFocus,\n                newFocus\n            });\n        }\n    };\n    const dom$2 = () => {\n        const get = (component) => search(component.element);\n        const set = (component, focusee) => {\n            const prevFocus = get(component);\n            component.getSystem().triggerFocus(focusee, component.element);\n            const newFocus = get(component);\n            reportFocusShifting(component, prevFocus, newFocus);\n        };\n        return {\n            get,\n            set\n        };\n    };\n    const highlights = () => {\n        const get = (component) => Highlighting.getHighlighted(component).map((item) => item.element);\n        const set = (component, element) => {\n            const prevFocus = get(component);\n            component.getSystem().getByDom(element).fold(noop, (item) => {\n                Highlighting.highlight(component, item);\n            });\n            const newFocus = get(component);\n            reportFocusShifting(component, prevFocus, newFocus);\n        };\n        return {\n            get,\n            set\n        };\n    };\n\n    const typical = (infoSchema, stateInit, getKeydownRules, getKeyupRules, optFocusIn) => {\n        const schema = () => infoSchema.concat([\n            defaulted('focusManager', dom$2()),\n            defaultedOf('focusInside', 'onFocus', valueOf((val) => contains$2(['onFocus', 'onEnterOrSpace', 'onApi'], val) ? Result.value(val) : Result.error('Invalid value for focusInside'))),\n            output$1('handler', me),\n            output$1('state', stateInit),\n            output$1('sendFocusIn', optFocusIn)\n        ]);\n        const processKey = (component, simulatedEvent, getRules, keyingConfig, keyingState) => {\n            const rules = getRules(component, simulatedEvent, keyingConfig, keyingState);\n            return choose(rules, simulatedEvent.event).bind((rule) => rule(component, simulatedEvent, keyingConfig, keyingState));\n        };\n        const toEvents = (keyingConfig, keyingState) => {\n            const onFocusHandler = keyingConfig.focusInside !== FocusInsideModes.OnFocusMode\n                ? Optional.none()\n                : optFocusIn(keyingConfig).map((focusIn) => run$1(focus$3(), (component, simulatedEvent) => {\n                    focusIn(component, keyingConfig, keyingState);\n                    simulatedEvent.stop();\n                }));\n            // On enter or space on root element, if using EnterOrSpace focus mode, fire a focusIn on the component\n            const tryGoInsideComponent = (component, simulatedEvent) => {\n                const isEnterOrSpace = inSet(SPACE.concat(ENTER))(simulatedEvent.event);\n                if (keyingConfig.focusInside === FocusInsideModes.OnEnterOrSpaceMode && isEnterOrSpace && isSource(component, simulatedEvent)) {\n                    optFocusIn(keyingConfig).each((focusIn) => {\n                        focusIn(component, keyingConfig, keyingState);\n                        simulatedEvent.stop();\n                    });\n                }\n            };\n            const keyboardEvents = [\n                run$1(keydown(), (component, simulatedEvent) => {\n                    processKey(component, simulatedEvent, getKeydownRules, keyingConfig, keyingState).fold(() => {\n                        // Key wasn't handled ... so see if we should enter into the component (focusIn)\n                        tryGoInsideComponent(component, simulatedEvent);\n                    }, (_) => {\n                        simulatedEvent.stop();\n                    });\n                }),\n                run$1(keyup(), (component, simulatedEvent) => {\n                    processKey(component, simulatedEvent, getKeyupRules, keyingConfig, keyingState).each((_) => {\n                        simulatedEvent.stop();\n                    });\n                })\n            ];\n            return derive$2(onFocusHandler.toArray().concat(keyboardEvents));\n        };\n        const me = {\n            schema,\n            processKey,\n            toEvents\n        };\n        return me;\n    };\n\n    const create$2 = (cyclicField) => {\n        const schema = [\n            option$3('onEscape'),\n            option$3('onEnter'),\n            defaulted('selector', '[data-alloy-tabstop=\"true\"]:not(:disabled)'),\n            defaulted('firstTabstop', 0),\n            defaulted('useTabstopAt', always),\n            // Maybe later we should just expose isVisible\n            option$3('visibilitySelector')\n        ].concat([\n            cyclicField\n        ]);\n        // TODO: Test this\n        const isVisible = (tabbingConfig, element) => {\n            const target = tabbingConfig.visibilitySelector\n                .bind((sel) => closest$3(element, sel))\n                .getOr(element);\n            // NOTE: We can't use Visibility.isVisible, because the toolbar has width when it has closed, just not height.\n            return get$d(target) > 0;\n        };\n        const findInitial = (component, tabbingConfig) => {\n            const tabstops = descendants(component.element, tabbingConfig.selector);\n            const visibles = filter$2(tabstops, (elem) => isVisible(tabbingConfig, elem));\n            return Optional.from(visibles[tabbingConfig.firstTabstop]);\n        };\n        const findCurrent = (component, tabbingConfig) => tabbingConfig.focusManager.get(component)\n            .bind((elem) => closest$3(elem, tabbingConfig.selector));\n        const isTabstop = (tabbingConfig, element) => isVisible(tabbingConfig, element) && tabbingConfig.useTabstopAt(element);\n        // Fire an alloy focus on the first visible element that matches the selector\n        const focusIn = (component, tabbingConfig, _tabbingState) => {\n            findInitial(component, tabbingConfig).each((target) => {\n                tabbingConfig.focusManager.set(component, target);\n            });\n        };\n        const goFromTabstop = (component, tabstops, stopIndex, tabbingConfig, cycle) => cycle(tabstops, stopIndex, (elem) => isTabstop(tabbingConfig, elem))\n            .fold(\n        // Even if there is only one, still capture the event if cycling\n        () => tabbingConfig.cyclic ? Optional.some(true) : Optional.none(), (target) => {\n            tabbingConfig.focusManager.set(component, target);\n            // Kill the event\n            return Optional.some(true);\n        });\n        const go = (component, _simulatedEvent, tabbingConfig, cycle) => {\n            // 1. Find our current tabstop\n            // 2. Find the index of that tabstop\n            // 3. Cycle the tabstop\n            // 4. Fire alloy focus on the resultant tabstop\n            const tabstops = filter$2(descendants(component.element, tabbingConfig.selector), (element) => isVisible(tabbingConfig, element));\n            return findCurrent(component, tabbingConfig).bind((tabstop) => {\n                // focused component\n                const optStopIndex = findIndex$1(tabstops, curry(eq, tabstop));\n                return optStopIndex.bind((stopIndex) => goFromTabstop(component, tabstops, stopIndex, tabbingConfig, cycle));\n            });\n        };\n        const goBackwards = (component, simulatedEvent, tabbingConfig) => {\n            const navigate = tabbingConfig.cyclic ? cyclePrev : tryPrev;\n            return go(component, simulatedEvent, tabbingConfig, navigate);\n        };\n        const goForwards = (component, simulatedEvent, tabbingConfig) => {\n            const navigate = tabbingConfig.cyclic ? cycleNext : tryNext;\n            return go(component, simulatedEvent, tabbingConfig, navigate);\n        };\n        const isFirstChild = (elem) => parentNode(elem).bind(firstChild).exists((child) => eq(child, elem));\n        const goFromPseudoTabstop = (component, simulatedEvent, tabbingConfig) => findCurrent(component, tabbingConfig).filter((elem) => !tabbingConfig.useTabstopAt(elem))\n            .bind((elem) => (isFirstChild(elem) ? goBackwards : goForwards)(component, simulatedEvent, tabbingConfig));\n        const execute = (component, simulatedEvent, tabbingConfig) => tabbingConfig.onEnter.bind((f) => f(component, simulatedEvent));\n        const exit = (component, simulatedEvent, tabbingConfig) => {\n            component.getSystem().broadcastOn([closeTooltips()], {\n                closedTooltip: () => {\n                    simulatedEvent.stop();\n                }\n            });\n            if (!simulatedEvent.isStopped()) {\n                return tabbingConfig.onEscape.bind((f) => f(component, simulatedEvent));\n            }\n            else {\n                return Optional.none();\n            }\n        };\n        const getKeydownRules = constant$1([\n            rule(and([isShift$1, inSet(TAB)]), goBackwards),\n            rule(inSet(TAB), goForwards),\n            rule(and([isNotShift, inSet(ENTER)]), execute)\n        ]);\n        const getKeyupRules = constant$1([\n            rule(inSet(ESCAPE), exit),\n            rule(inSet(TAB), goFromPseudoTabstop),\n        ]);\n        return typical(schema, NoState.init, getKeydownRules, getKeyupRules, () => Optional.some(focusIn));\n    };\n\n    var AcyclicType = create$2(customField('cyclic', never));\n\n    var CyclicType = create$2(customField('cyclic', always));\n\n    const inside = (target) => ((isTag('input')(target) && get$g(target, 'type') !== 'radio') ||\n        isTag('textarea')(target));\n\n    const doDefaultExecute = (component, _simulatedEvent, focused) => {\n        // Note, we use to pass through simulatedEvent here and make target: component. This simplification\n        // may be a problem\n        dispatch(component, focused, execute$5());\n        return Optional.some(true);\n    };\n    const defaultExecute = (component, simulatedEvent, focused) => {\n        const isComplex = inside(focused) && inSet(SPACE)(simulatedEvent.event);\n        return isComplex ? Optional.none() : doDefaultExecute(component, simulatedEvent, focused);\n    };\n    // On Firefox, pressing space fires a click event if the element maintains focus and fires a keyup. This\n    // stops the keyup, which should stop the click. We might want to make this only work for buttons and Firefox etc,\n    // but at this stage it's cleaner to just always do it. It makes sense that Keying that handles space should handle\n    // keyup also. This does make the name confusing, though.\n    const stopEventForFirefox = (_component, _simulatedEvent) => Optional.some(true);\n\n    const schema$z = [\n        defaulted('execute', defaultExecute),\n        defaulted('useSpace', false),\n        defaulted('useEnter', true),\n        defaulted('useControlEnter', false),\n        defaulted('useDown', false)\n    ];\n    const execute$4 = (component, simulatedEvent, executeConfig) => executeConfig.execute(component, simulatedEvent, component.element);\n    const getKeydownRules$5 = (component, _simulatedEvent, executeConfig, _executeState) => {\n        const spaceExec = executeConfig.useSpace && !inside(component.element) ? SPACE : [];\n        const enterExec = executeConfig.useEnter ? ENTER : [];\n        const downExec = executeConfig.useDown ? DOWN : [];\n        const execKeys = spaceExec.concat(enterExec).concat(downExec);\n        return [\n            rule(inSet(execKeys), execute$4)\n        ].concat(executeConfig.useControlEnter ? [\n            rule(and([isControl, inSet(ENTER)]), execute$4)\n        ] : []);\n    };\n    const getKeyupRules$5 = (component, _simulatedEvent, executeConfig, _executeState) => executeConfig.useSpace && !inside(component.element) ?\n        [rule(inSet(SPACE), stopEventForFirefox)] :\n        [];\n    var ExecutionType = typical(schema$z, NoState.init, getKeydownRules$5, getKeyupRules$5, () => Optional.none());\n\n    const flatgrid$1 = () => {\n        const dimensions = value$2();\n        const setGridSize = (numRows, numColumns) => {\n            dimensions.set({ numRows, numColumns });\n        };\n        const getNumRows = () => dimensions.get().map((d) => d.numRows);\n        const getNumColumns = () => dimensions.get().map((d) => d.numColumns);\n        return nu$4({\n            readState: () => dimensions.get().map((d) => ({\n                numRows: String(d.numRows),\n                numColumns: String(d.numColumns)\n            })).getOr({\n                numRows: '?',\n                numColumns: '?'\n            }),\n            setGridSize,\n            getNumRows,\n            getNumColumns\n        });\n    };\n    const init$h = (spec) => spec.state(spec);\n\n    var KeyingState = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        flatgrid: flatgrid$1,\n        init: init$h\n    });\n\n    // Looks up direction (considering LTR and RTL), finds the focused element,\n    // and tries to move. If it succeeds, triggers focus and kills the event.\n    const useH = (movement) => (component, simulatedEvent, config, state) => {\n        const move = movement(component.element);\n        return use(move, component, simulatedEvent, config, state);\n    };\n    const west = (moveLeft, moveRight) => {\n        const movement = onDirection(moveLeft, moveRight);\n        return useH(movement);\n    };\n    const east = (moveLeft, moveRight) => {\n        const movement = onDirection(moveRight, moveLeft);\n        return useH(movement);\n    };\n    const useV = (move) => (component, simulatedEvent, config, state) => use(move, component, simulatedEvent, config, state);\n    const use = (move, component, simulatedEvent, config, state) => {\n        const outcome = config.focusManager.get(component).bind((focused) => move(component.element, focused, config, state));\n        return outcome.map((newFocus) => {\n            config.focusManager.set(component, newFocus);\n            return true;\n        });\n    };\n    const north = useV;\n    const south = useV;\n    const move$1 = useV;\n\n    const locate = (candidates, predicate) => findIndex$1(candidates, predicate).map((index) => ({\n        index,\n        candidates\n    }));\n\n    const locateVisible = (container, current, selector) => {\n        const predicate = (x) => eq(x, current);\n        const candidates = descendants(container, selector);\n        const visible = filter$2(candidates, isVisible);\n        return locate(visible, predicate);\n    };\n    const findIndex = (elements, target) => findIndex$1(elements, (elem) => eq(target, elem));\n\n    const withGrid = (values, index, numCols, f) => {\n        const oldRow = Math.floor(index / numCols);\n        const oldColumn = index % numCols;\n        return f(oldRow, oldColumn).bind((address) => {\n            const newIndex = address.row * numCols + address.column;\n            return newIndex >= 0 && newIndex < values.length ? Optional.some(values[newIndex]) : Optional.none();\n        });\n    };\n    const cycleHorizontal$1 = (values, index, numRows, numCols, delta) => withGrid(values, index, numCols, (oldRow, oldColumn) => {\n        const onLastRow = oldRow === numRows - 1;\n        const colsInRow = onLastRow ? values.length - (oldRow * numCols) : numCols;\n        const newColumn = cycleBy(oldColumn, delta, 0, colsInRow - 1);\n        return Optional.some({\n            row: oldRow,\n            column: newColumn\n        });\n    });\n    const cycleVertical$1 = (values, index, numRows, numCols, delta) => withGrid(values, index, numCols, (oldRow, oldColumn) => {\n        const newRow = cycleBy(oldRow, delta, 0, numRows - 1);\n        const onLastRow = newRow === numRows - 1;\n        const colsInRow = onLastRow ? values.length - (newRow * numCols) : numCols;\n        const newCol = clamp(oldColumn, 0, colsInRow - 1);\n        return Optional.some({\n            row: newRow,\n            column: newCol\n        });\n    });\n    const cycleRight$1 = (values, index, numRows, numCols) => cycleHorizontal$1(values, index, numRows, numCols, +1);\n    const cycleLeft$1 = (values, index, numRows, numCols) => cycleHorizontal$1(values, index, numRows, numCols, -1);\n    const cycleUp$1 = (values, index, numRows, numCols) => cycleVertical$1(values, index, numRows, numCols, -1);\n    const cycleDown$1 = (values, index, numRows, numCols) => cycleVertical$1(values, index, numRows, numCols, +1);\n\n    const schema$y = [\n        required$1('selector'),\n        defaulted('execute', defaultExecute),\n        onKeyboardHandler('onEscape'),\n        defaulted('captureTab', false),\n        initSize()\n    ];\n    const focusIn$4 = (component, gridConfig, _gridState) => {\n        descendant(component.element, gridConfig.selector).each((first) => {\n            gridConfig.focusManager.set(component, first);\n        });\n    };\n    const findCurrent$1 = (component, gridConfig) => gridConfig.focusManager.get(component).bind((elem) => closest$3(elem, gridConfig.selector));\n    const execute$3 = (component, simulatedEvent, gridConfig, _gridState) => findCurrent$1(component, gridConfig)\n        .bind((focused) => gridConfig.execute(component, simulatedEvent, focused));\n    const doMove$2 = (cycle) => (element, focused, gridConfig, gridState) => locateVisible(element, focused, gridConfig.selector)\n        .bind((identified) => cycle(identified.candidates, identified.index, gridState.getNumRows().getOr(gridConfig.initSize.numRows), gridState.getNumColumns().getOr(gridConfig.initSize.numColumns)));\n    const handleTab = (_component, _simulatedEvent, gridConfig) => gridConfig.captureTab ? Optional.some(true) : Optional.none();\n    const doEscape$1 = (component, simulatedEvent, gridConfig) => gridConfig.onEscape(component, simulatedEvent);\n    const moveLeft$3 = doMove$2(cycleLeft$1);\n    const moveRight$3 = doMove$2(cycleRight$1);\n    const moveNorth$1 = doMove$2(cycleUp$1);\n    const moveSouth$1 = doMove$2(cycleDown$1);\n    const getKeydownRules$4 = constant$1([\n        rule(inSet(LEFT), west(moveLeft$3, moveRight$3)),\n        rule(inSet(RIGHT), east(moveLeft$3, moveRight$3)),\n        rule(inSet(UP), north(moveNorth$1)),\n        rule(inSet(DOWN), south(moveSouth$1)),\n        rule(and([isShift$1, inSet(TAB)]), handleTab),\n        rule(and([isNotShift, inSet(TAB)]), handleTab),\n        // Probably should make whether space is used configurable\n        rule(inSet(SPACE.concat(ENTER)), execute$3)\n    ]);\n    const getKeyupRules$4 = constant$1([\n        rule(inSet(ESCAPE), doEscape$1),\n        rule(inSet(SPACE), stopEventForFirefox)\n    ]);\n    var FlatgridType = typical(schema$y, flatgrid$1, getKeydownRules$4, getKeyupRules$4, () => Optional.some(focusIn$4));\n\n    const f = (container, selector, current, delta, getNewIndex) => {\n        const isDisabledButton = (candidate) => name$3(candidate) === 'button' && get$g(candidate, 'disabled') === 'disabled';\n        const tryNewIndex = (initial, index, candidates) => getNewIndex(initial, index, delta, 0, candidates.length - 1, candidates[index], (newIndex) => isDisabledButton(candidates[newIndex]) ?\n            tryNewIndex(initial, newIndex, candidates) :\n            Optional.from(candidates[newIndex]));\n        // I wonder if this will be a problem when the focused element is invisible (shouldn't happen)\n        return locateVisible(container, current, selector).bind((identified) => {\n            const index = identified.index;\n            const candidates = identified.candidates;\n            return tryNewIndex(index, index, candidates);\n        });\n    };\n    const horizontalWithoutCycles = (container, selector, current, delta) => f(container, selector, current, delta, (prevIndex, v, d, min, max, oldCandidate, onNewIndex) => {\n        const newIndex = clamp(v + d, min, max);\n        return newIndex === prevIndex ? Optional.from(oldCandidate) : onNewIndex(newIndex);\n    });\n    const horizontal = (container, selector, current, delta) => f(container, selector, current, delta, (prevIndex, v, d, min, max, _oldCandidate, onNewIndex) => {\n        const newIndex = cycleBy(v, d, min, max);\n        // If we've cycled back to the original index, we've failed to find a new valid candidate\n        return newIndex === prevIndex ? Optional.none() : onNewIndex(newIndex);\n    });\n\n    const schema$x = [\n        required$1('selector'),\n        defaulted('getInitial', Optional.none),\n        defaulted('execute', defaultExecute),\n        onKeyboardHandler('onEscape'),\n        defaulted('executeOnMove', false),\n        defaulted('allowVertical', true),\n        defaulted('allowHorizontal', true),\n        defaulted('cycles', true)\n    ];\n    // TODO: Remove dupe.\n    // TODO: Probably use this for not just execution.\n    const findCurrent = (component, flowConfig) => flowConfig.focusManager.get(component).bind((elem) => closest$3(elem, flowConfig.selector));\n    const execute$2 = (component, simulatedEvent, flowConfig) => findCurrent(component, flowConfig).bind((focused) => flowConfig.execute(component, simulatedEvent, focused));\n    const focusIn$3 = (component, flowConfig, _state) => {\n        flowConfig.getInitial(component).orThunk(() => descendant(component.element, flowConfig.selector)).each((first) => {\n            flowConfig.focusManager.set(component, first);\n        });\n    };\n    const moveLeft$2 = (element, focused, info) => (info.cycles ? horizontal : horizontalWithoutCycles)(element, info.selector, focused, -1);\n    const moveRight$2 = (element, focused, info) => (info.cycles ? horizontal : horizontalWithoutCycles)(element, info.selector, focused, +1);\n    const doMove$1 = (movement) => (component, simulatedEvent, flowConfig, flowState) => movement(component, simulatedEvent, flowConfig, flowState).bind(() => flowConfig.executeOnMove ?\n        execute$2(component, simulatedEvent, flowConfig) :\n        Optional.some(true));\n    const doEscape = (component, simulatedEvent, flowConfig) => flowConfig.onEscape(component, simulatedEvent);\n    const getKeydownRules$3 = (_component, _se, flowConfig, _flowState) => {\n        const westMovers = [...flowConfig.allowHorizontal ? LEFT : []].concat(flowConfig.allowVertical ? UP : []);\n        const eastMovers = [...flowConfig.allowHorizontal ? RIGHT : []].concat(flowConfig.allowVertical ? DOWN : []);\n        return [\n            rule(inSet(westMovers), doMove$1(west(moveLeft$2, moveRight$2))),\n            rule(inSet(eastMovers), doMove$1(east(moveLeft$2, moveRight$2))),\n            rule(inSet(ENTER), execute$2),\n            rule(inSet(SPACE), execute$2)\n        ];\n    };\n    const getKeyupRules$3 = constant$1([\n        rule(inSet(SPACE), stopEventForFirefox),\n        rule(inSet(ESCAPE), doEscape)\n    ]);\n    var FlowType = typical(schema$x, NoState.init, getKeydownRules$3, getKeyupRules$3, () => Optional.some(focusIn$3));\n\n    const toCell = (matrix, rowIndex, columnIndex) => Optional.from(matrix[rowIndex]).bind((row) => Optional.from(row[columnIndex]).map((cell) => ({\n        rowIndex,\n        columnIndex,\n        cell\n    })));\n    const cycleHorizontal = (matrix, rowIndex, startCol, deltaCol) => {\n        const row = matrix[rowIndex];\n        const colsInRow = row.length;\n        const newColIndex = cycleBy(startCol, deltaCol, 0, colsInRow - 1);\n        return toCell(matrix, rowIndex, newColIndex);\n    };\n    const cycleVertical = (matrix, colIndex, startRow, deltaRow) => {\n        const nextRowIndex = cycleBy(startRow, deltaRow, 0, matrix.length - 1);\n        const colsInNextRow = matrix[nextRowIndex].length;\n        const nextColIndex = clamp(colIndex, 0, colsInNextRow - 1);\n        return toCell(matrix, nextRowIndex, nextColIndex);\n    };\n    const moveHorizontal = (matrix, rowIndex, startCol, deltaCol) => {\n        const row = matrix[rowIndex];\n        const colsInRow = row.length;\n        const newColIndex = clamp(startCol + deltaCol, 0, colsInRow - 1);\n        return toCell(matrix, rowIndex, newColIndex);\n    };\n    const moveVertical = (matrix, colIndex, startRow, deltaRow) => {\n        const nextRowIndex = clamp(startRow + deltaRow, 0, matrix.length - 1);\n        const colsInNextRow = matrix[nextRowIndex].length;\n        const nextColIndex = clamp(colIndex, 0, colsInNextRow - 1);\n        return toCell(matrix, nextRowIndex, nextColIndex);\n    };\n    // return address(Math.floor(index / columns), index % columns);\n    const cycleRight = (matrix, startRow, startCol) => cycleHorizontal(matrix, startRow, startCol, +1);\n    const cycleLeft = (matrix, startRow, startCol) => cycleHorizontal(matrix, startRow, startCol, -1);\n    const cycleUp = (matrix, startRow, startCol) => cycleVertical(matrix, startCol, startRow, -1);\n    const cycleDown = (matrix, startRow, startCol) => cycleVertical(matrix, startCol, startRow, +1);\n    const moveLeft$1 = (matrix, startRow, startCol) => moveHorizontal(matrix, startRow, startCol, -1);\n    const moveRight$1 = (matrix, startRow, startCol) => moveHorizontal(matrix, startRow, startCol, +1);\n    const moveUp$1 = (matrix, startRow, startCol) => moveVertical(matrix, startCol, startRow, -1);\n    const moveDown$1 = (matrix, startRow, startCol) => moveVertical(matrix, startCol, startRow, +1);\n\n    const schema$w = [\n        requiredObjOf('selectors', [\n            required$1('row'),\n            required$1('cell')\n        ]),\n        // Used to determine whether pressing right/down at the end cycles back to the start/top\n        defaulted('cycles', true),\n        defaulted('previousSelector', Optional.none),\n        defaulted('execute', defaultExecute)\n    ];\n    const focusIn$2 = (component, matrixConfig, _state) => {\n        const focused = matrixConfig.previousSelector(component).orThunk(() => {\n            const selectors = matrixConfig.selectors;\n            return descendant(component.element, selectors.cell);\n        });\n        focused.each((cell) => {\n            matrixConfig.focusManager.set(component, cell);\n        });\n    };\n    const execute$1 = (component, simulatedEvent, matrixConfig) => search(component.element).bind((focused) => matrixConfig.execute(component, simulatedEvent, focused));\n    const toMatrix = (rows, matrixConfig) => map$2(rows, (row) => descendants(row, matrixConfig.selectors.cell));\n    const doMove = (ifCycle, ifMove) => (element, focused, matrixConfig) => {\n        const move = matrixConfig.cycles ? ifCycle : ifMove;\n        return closest$3(focused, matrixConfig.selectors.row).bind((inRow) => {\n            const cellsInRow = descendants(inRow, matrixConfig.selectors.cell);\n            return findIndex(cellsInRow, focused).bind((colIndex) => {\n                const allRows = descendants(element, matrixConfig.selectors.row);\n                return findIndex(allRows, inRow).bind((rowIndex) => {\n                    // Now, make the matrix.\n                    const matrix = toMatrix(allRows, matrixConfig);\n                    return move(matrix, rowIndex, colIndex).map((next) => next.cell);\n                });\n            });\n        });\n    };\n    const moveLeft = doMove(cycleLeft, moveLeft$1);\n    const moveRight = doMove(cycleRight, moveRight$1);\n    const moveNorth = doMove(cycleUp, moveUp$1);\n    const moveSouth = doMove(cycleDown, moveDown$1);\n    const getKeydownRules$2 = constant$1([\n        rule(inSet(LEFT), west(moveLeft, moveRight)),\n        rule(inSet(RIGHT), east(moveLeft, moveRight)),\n        rule(inSet(UP), north(moveNorth)),\n        rule(inSet(DOWN), south(moveSouth)),\n        rule(inSet(SPACE.concat(ENTER)), execute$1)\n    ]);\n    const getKeyupRules$2 = constant$1([\n        rule(inSet(SPACE), stopEventForFirefox)\n    ]);\n    var MatrixType = typical(schema$w, NoState.init, getKeydownRules$2, getKeyupRules$2, () => Optional.some(focusIn$2));\n\n    const schema$v = [\n        required$1('selector'),\n        defaulted('execute', defaultExecute)\n    ];\n    const execute = (component, simulatedEvent, menuConfig) => menuConfig.focusManager.get(component).bind((focused) => menuConfig.execute(component, simulatedEvent, focused));\n    const focusIn$1 = (component, menuConfig, _state) => {\n        // Maybe keep selection if it was there before\n        descendant(component.element, menuConfig.selector).each((first) => {\n            menuConfig.focusManager.set(component, first);\n        });\n    };\n    const moveUp = (element, focused, info) => horizontal(element, info.selector, focused, -1);\n    const moveDown = (element, focused, info) => horizontal(element, info.selector, focused, +1);\n    const getKeydownRules$1 = constant$1([\n        rule(inSet(UP), move$1(moveUp)),\n        rule(inSet(DOWN), move$1(moveDown)),\n        rule(inSet(ENTER), execute),\n        rule(inSet(SPACE), execute)\n    ]);\n    const getKeyupRules$1 = constant$1([\n        rule(inSet(SPACE), stopEventForFirefox)\n    ]);\n    var MenuType = typical(schema$v, NoState.init, getKeydownRules$1, getKeyupRules$1, () => Optional.some(focusIn$1));\n\n    const schema$u = [\n        onKeyboardHandler('onSpace'),\n        onKeyboardHandler('onEnter'),\n        onKeyboardHandler('onShiftEnter'),\n        onKeyboardHandler('onLeft'),\n        onKeyboardHandler('onRight'),\n        onKeyboardHandler('onTab'),\n        onKeyboardHandler('onShiftTab'),\n        onKeyboardHandler('onUp'),\n        onKeyboardHandler('onDown'),\n        onKeyboardHandler('onEscape'),\n        defaulted('stopSpaceKeyup', false),\n        option$3('focusIn')\n    ];\n    const getKeydownRules = (component, simulatedEvent, specialInfo) => [\n        rule(inSet(SPACE), specialInfo.onSpace),\n        rule(and([isNotShift, inSet(ENTER)]), specialInfo.onEnter),\n        rule(and([isShift$1, inSet(ENTER)]), specialInfo.onShiftEnter),\n        rule(and([isShift$1, inSet(TAB)]), specialInfo.onShiftTab),\n        rule(and([isNotShift, inSet(TAB)]), specialInfo.onTab),\n        rule(inSet(UP), specialInfo.onUp),\n        rule(inSet(DOWN), specialInfo.onDown),\n        rule(inSet(LEFT), specialInfo.onLeft),\n        rule(inSet(RIGHT), specialInfo.onRight),\n        rule(inSet(SPACE), specialInfo.onSpace)\n    ];\n    const getKeyupRules = (component, simulatedEvent, specialInfo) => [\n        ...(specialInfo.stopSpaceKeyup ? [rule(inSet(SPACE), stopEventForFirefox)] : []),\n        rule(inSet(ESCAPE), specialInfo.onEscape)\n    ];\n    var SpecialType = typical(schema$u, NoState.init, getKeydownRules, getKeyupRules, (specialInfo) => specialInfo.focusIn);\n\n    const acyclic = AcyclicType.schema();\n    const cyclic = CyclicType.schema();\n    const flow = FlowType.schema();\n    const flatgrid = FlatgridType.schema();\n    const matrix = MatrixType.schema();\n    const execution = ExecutionType.schema();\n    const menu = MenuType.schema();\n    const special = SpecialType.schema();\n\n    var KeyboardBranches = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        acyclic: acyclic,\n        cyclic: cyclic,\n        flow: flow,\n        flatgrid: flatgrid,\n        matrix: matrix,\n        execution: execution,\n        menu: menu,\n        special: special\n    });\n\n    const isFlatgridState = (keyState) => hasNonNullableKey(keyState, 'setGridSize');\n    const Keying = createModes({\n        branchKey: 'mode',\n        branches: KeyboardBranches,\n        name: 'keying',\n        active: {\n            events: (keyingConfig, keyingState) => {\n                const handler = keyingConfig.handler;\n                return handler.toEvents(keyingConfig, keyingState);\n            }\n        },\n        apis: {\n            focusIn: (component, keyConfig, keyState) => {\n                // If we have a custom sendFocusIn function, use that.\n                // Otherwise, we just trigger focus on the outer element.\n                keyConfig.sendFocusIn(keyConfig).fold(() => {\n                    component.getSystem().triggerFocus(component.element, component.element);\n                }, (sendFocusIn) => {\n                    sendFocusIn(component, keyConfig, keyState);\n                });\n            },\n            // These APIs are going to be interesting because they are not\n            // available for all keying modes\n            setGridSize: (component, keyConfig, keyState, numRows, numColumns) => {\n                if (!isFlatgridState(keyState)) {\n                    // eslint-disable-next-line no-console\n                    console.error('Layout does not support setGridSize');\n                }\n                else {\n                    keyState.setGridSize(numRows, numColumns);\n                }\n            }\n        },\n        state: KeyingState\n    });\n\n    const premadeTag = generate$6('alloy-premade');\n    const premade$1 = (comp) => {\n        Object.defineProperty(comp.element.dom, premadeTag, {\n            value: comp.uid,\n            writable: true\n        });\n        return wrap(premadeTag, comp);\n    };\n    const isPremade = (element) => has$2(element.dom, premadeTag);\n    const getPremade = (spec) => get$h(spec, premadeTag);\n    const makeApi = (f) => markAsSketchApi((component, ...rest) => f(component.getApis(), component, ...rest), f);\n\n    const isConnected = (comp) => comp.getSystem().isConnected();\n    const fireDetaching = (component) => {\n        emit(component, detachedFromDom());\n        const children = component.components();\n        each$1(children, fireDetaching);\n    };\n    const fireAttaching = (component) => {\n        const children = component.components();\n        each$1(children, fireAttaching);\n        emit(component, attachedToDom());\n    };\n    // Unlike attach, a virtualAttach makes no actual DOM changes.\n    // This is because it should only be used in a situation\n    // where we are patching an existing element.\n    const virtualAttach = (parent, child) => {\n        // So we still add it to the world\n        parent.getSystem().addToWorld(child);\n        // And we fire attaching ONLY if it's already in the DOM\n        if (inBody(parent.element)) {\n            fireAttaching(child);\n        }\n    };\n    // Unlike detach, a virtualDetach makes no actual DOM changes.\n    // This is because it's used in patching circumstances.\n    const virtualDetach = (comp) => {\n        fireDetaching(comp);\n        comp.getSystem().removeFromWorld(comp);\n    };\n    const attach$1 = (parent, child) => {\n        append$2(parent.element, child.element);\n    };\n    const detachChildren$1 = (component) => {\n        // This will not detach the component, but will detach its children and sync at the end.\n        each$1(component.components(), (childComp) => remove$7(childComp.element));\n        // Clear the component also.\n        empty(component.element);\n        component.syncComponents();\n    };\n    const replaceChildren = (component, newSpecs, buildNewChildren) => {\n        // Detach all existing children\n        const subs = component.components();\n        detachChildren$1(component);\n        const newChildren = buildNewChildren(newSpecs);\n        // Determine which components have been deleted and remove them from the world\n        const deleted = difference(subs, newChildren);\n        each$1(deleted, (comp) => {\n            fireDetaching(comp);\n            component.getSystem().removeFromWorld(comp);\n        });\n        // Add all new components\n        each$1(newChildren, (childComp) => {\n            // If the component isn't connected, ie is new, then we also need to add it to the world\n            if (!isConnected(childComp)) {\n                component.getSystem().addToWorld(childComp);\n                attach$1(component, childComp);\n                if (inBody(component.element)) {\n                    fireAttaching(childComp);\n                }\n            }\n            else {\n                attach$1(component, childComp);\n            }\n        });\n        component.syncComponents();\n    };\n    const virtualReplaceChildren = (component, newSpecs, buildNewChildren) => {\n        // When replacing we don't want to fire detachedFromDom and attachedToDom again for a premade that has just had its position in the children moved around,\n        // so we only detach initially if we aren't a premade. Premades will be detached later, but only if they are no longer in the child list.\n        const subs = component.components();\n        const existingComps = bind$3(newSpecs, (spec) => getPremade(spec).toArray());\n        each$1(subs, (childComp) => {\n            if (!contains$2(existingComps, childComp)) {\n                virtualDetach(childComp);\n            }\n        });\n        const newChildren = buildNewChildren(newSpecs);\n        // Determine which components have been deleted and remove them from the world\n        // It's probable the component has already been detached beforehand so only\n        // detach what's still attached to the world (i.e removed premades)\n        const deleted = difference(subs, newChildren);\n        each$1(deleted, (deletedComp) => {\n            if (isConnected(deletedComp)) {\n                virtualDetach(deletedComp);\n            }\n        });\n        // Add all new components\n        each$1(newChildren, (childComp) => {\n            // If the component isn't connected, ie is new, then we also need to add it to the world\n            if (!isConnected(childComp)) {\n                virtualAttach(component, childComp);\n            }\n        });\n        component.syncComponents();\n    };\n\n    const attach = (parent, child) => {\n        attachWith(parent, child, append$2);\n    };\n    const attachWith = (parent, child, insertion) => {\n        parent.getSystem().addToWorld(child);\n        insertion(parent.element, child.element);\n        if (inBody(parent.element)) {\n            fireAttaching(child);\n        }\n        parent.syncComponents();\n    };\n    const doDetach = (component) => {\n        fireDetaching(component);\n        remove$7(component.element);\n        component.getSystem().removeFromWorld(component);\n    };\n    const detach = (component) => {\n        const parent$1 = parent(component.element).bind((p) => component.getSystem().getByDom(p).toOptional());\n        doDetach(component);\n        parent$1.each((p) => {\n            p.syncComponents();\n        });\n    };\n    const detachChildren = (component) => {\n        // This will not detach the component, but will detach its children and sync at the end.\n        const subs = component.components();\n        each$1(subs, doDetach);\n        // Clear the component also.\n        empty(component.element);\n        component.syncComponents();\n    };\n    const attachSystem = (element, guiSystem) => {\n        attachSystemWith(element, guiSystem, append$2);\n    };\n    const attachSystemAfter = (element, guiSystem) => {\n        attachSystemWith(element, guiSystem, after$1);\n    };\n    const attachSystemWith = (element, guiSystem, inserter) => {\n        inserter(element, guiSystem.element);\n        const children$1 = children(guiSystem.element);\n        each$1(children$1, (child) => {\n            guiSystem.getByDom(child).each(fireAttaching);\n        });\n    };\n    const detachSystem = (guiSystem) => {\n        const children$1 = children(guiSystem.element);\n        each$1(children$1, (child) => {\n            guiSystem.getByDom(child).each(fireDetaching);\n        });\n        remove$7(guiSystem.element);\n    };\n\n    const determineObsoleted = (parent, index, oldObsoleted) => {\n        // When dealing with premades, the process of building something may have moved existing nodes around, so we see\n        // if the child at the index position is still the same. If it isn't, we need to introduce some complex behaviour\n        //\n        // Example:\n        // ```<div><premade></premade><span></span></div>```\n        // and then moving the premade inside a blockquote\n        // ```<div><blockquote><premade></premade></blockquote><span></span></div>```\n        //\n        // so when you go to replace the first thing it would think there is only 1 child which would be the span, so in\n        // this case we insert a marker to keep the span in the same spot.\n        const newObsoleted = child$2(parent, index);\n        return newObsoleted.map((newObs) => {\n            const elemChanged = oldObsoleted.exists((o) => !eq(o, newObs));\n            // Adding a marker prevents the case where a premade is added to something shifting it from where\n            // it was. That in turn un-synced all trailing children and made it so they couldn't be patched.\n            if (elemChanged) {\n                const oldTag = oldObsoleted.map(name$3).getOr('span');\n                const marker = SugarElement.fromTag(oldTag);\n                before$1(newObs, marker);\n                return marker;\n            }\n            else {\n                return newObs;\n            }\n        });\n    };\n    const ensureInDom = (parent, child, obsoleted) => {\n        obsoleted.fold(\n        // There is nothing here, so just append to the parent\n        () => append$2(parent, child), (obs) => {\n            if (!eq(obs, child)) {\n                // This situation occurs when the DOM element that has been patched when building it is no\n                // longer the one that we need to replace. This is probably caused by premades.\n                before$1(obs, child);\n                remove$7(obs);\n            }\n        });\n    };\n    const patchChildrenWith = (parent, nu, f) => {\n        const builtChildren = map$2(nu, f);\n        // Need to regather the children in case some of the previous children have moved\n        // to an earlier index. So this just prunes any leftover children in the dom.\n        const currentChildren = children(parent);\n        each$1(currentChildren.slice(builtChildren.length), remove$7);\n        return builtChildren;\n    };\n    const patchSpecChild = (parent, index, spec, build) => {\n        // Before building anything, this is the DOM element we are going to try to use.\n        const oldObsoleted = child$2(parent, index);\n        const childComp = build(spec, oldObsoleted);\n        const obsoleted = determineObsoleted(parent, index, oldObsoleted);\n        ensureInDom(parent, childComp.element, obsoleted);\n        return childComp;\n    };\n    const patchSpecChildren = (parent, specs, build) => patchChildrenWith(parent, specs, (spec, index) => patchSpecChild(parent, index, spec, build));\n    const patchDomChildren = (parent, nodes) => patchChildrenWith(parent, nodes, (node, index) => {\n        const optObsoleted = child$2(parent, index);\n        ensureInDom(parent, node, optObsoleted);\n        return node;\n    });\n\n    const preserve = (f, container) => {\n        const dos = getRootNode(container);\n        const refocus = active$1(dos).bind((focused) => {\n            const hasFocus = (elem) => eq(focused, elem);\n            return hasFocus(container) ? Optional.some(container) : descendant$1(container, hasFocus);\n        });\n        const result = f(container);\n        // If there is a focussed element, the F function may cause focus to be lost (such as by hiding elements). Restore it afterwards.\n        refocus.each((oldFocus) => {\n            active$1(dos).filter((newFocus) => eq(newFocus, oldFocus)).fold(() => {\n                // Only refocus if the focus has changed, otherwise we break IE\n                focus$4(oldFocus);\n            }, noop);\n        });\n        return result;\n    };\n\n    const withoutReuse = (parent, data) => {\n        preserve(() => {\n            replaceChildren(parent, data, () => map$2(data, parent.getSystem().build));\n        }, parent.element);\n    };\n    const withReuse = (parent, data) => {\n        // Note: We shouldn't need AriaPreserve since we're trying to keep the existing elements,\n        // but let's just do it for now just to be safe.\n        preserve(() => {\n            virtualReplaceChildren(parent, data, () => {\n                // Build the new children\n                return patchSpecChildren(parent.element, data, parent.getSystem().buildOrPatch);\n            });\n        }, parent.element);\n    };\n\n    const virtualReplace = (component, replacee, replaceeIndex, childSpec) => {\n        virtualDetach(replacee);\n        const child = patchSpecChild(component.element, replaceeIndex, childSpec, component.getSystem().buildOrPatch);\n        virtualAttach(component, child);\n        component.syncComponents();\n    };\n    const insert = (component, insertion, childSpec) => {\n        const child = component.getSystem().build(childSpec);\n        attachWith(component, child, insertion);\n    };\n    const replace = (component, replacee, replaceeIndex, childSpec) => {\n        detach(replacee);\n        insert(component, (p, c) => appendAt(p, c, replaceeIndex), childSpec);\n    };\n    const set$3 = (component, replaceConfig, replaceState, data) => {\n        const replacer = replaceConfig.reuseDom ? withReuse : withoutReuse;\n        return replacer(component, data);\n    };\n    const append = (component, replaceConfig, replaceState, appendee) => {\n        insert(component, append$2, appendee);\n    };\n    const prepend = (component, replaceConfig, replaceState, prependee) => {\n        insert(component, prepend$1, prependee);\n    };\n    // NOTE: Removee is going to be a component, not a spec.\n    const remove = (component, replaceConfig, replaceState, removee) => {\n        const children = contents(component);\n        const foundChild = find$5(children, (child) => eq(removee.element, child.element));\n        foundChild.each(detach);\n    };\n    // TODO: Rename\n    const contents = (component, _replaceConfig) => component.components();\n    const replaceAt = (component, replaceConfig, replaceState, replaceeIndex, replacer) => {\n        const children = contents(component);\n        return Optional.from(children[replaceeIndex]).map((replacee) => {\n            replacer.fold(() => detach(replacee), (r) => {\n                const replacer = replaceConfig.reuseDom ? virtualReplace : replace;\n                replacer(component, replacee, replaceeIndex, r);\n            });\n            return replacee;\n        });\n    };\n    const replaceBy = (component, replaceConfig, replaceState, replaceePred, replacer) => {\n        const children = contents(component);\n        return findIndex$1(children, replaceePred).bind((replaceeIndex) => replaceAt(component, replaceConfig, replaceState, replaceeIndex, replacer));\n    };\n\n    var ReplaceApis = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        append: append,\n        prepend: prepend,\n        remove: remove,\n        replaceAt: replaceAt,\n        replaceBy: replaceBy,\n        set: set$3,\n        contents: contents\n    });\n\n    const Replacing = create$3({\n        fields: [\n            defaultedBoolean('reuseDom', true)\n        ],\n        name: 'replacing',\n        apis: ReplaceApis\n    });\n\n    // The purpose of this check is to ensure that a simulated focus call is not going\n    // to recurse infinitely. Essentially, if the originator of the focus call is the same\n    // as the element receiving it, and it wasn't its own target, then stop the focus call\n    // and log a warning.\n    const isRecursive = (component, originator, target) => eq(originator, component.element) && !eq(originator, target);\n    const events$h = derive$2([\n        can(focus$3(), (component, simulatedEvent) => {\n            // originator may not always be there. Will need to check this.\n            const event = simulatedEvent.event;\n            const originator = event.originator;\n            const target = event.target;\n            if (isRecursive(component, originator, target)) {\n                // eslint-disable-next-line no-console\n                console.warn(focus$3() + ' did not get interpreted by the desired target. ' +\n                    '\\nOriginator: ' + element(originator) +\n                    '\\nTarget: ' + element(target) +\n                    '\\nCheck the ' + focus$3() + ' event handlers');\n                return false;\n            }\n            else {\n                return true;\n            }\n        })\n    ]);\n\n    var DefaultEvents = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        events: events$h\n    });\n\n    const prefix$1 = constant$1('alloy-id-');\n    const idAttr$1 = constant$1('data-alloy-id');\n\n    const prefix = prefix$1();\n    const idAttr = idAttr$1();\n    const write = (label, elem) => {\n        const id = generate$6(prefix + label);\n        writeOnly(elem, id);\n        return id;\n    };\n    const writeOnly = (elem, uid) => {\n        Object.defineProperty(elem.dom, idAttr, {\n            value: uid,\n            writable: true\n        });\n    };\n    const read = (elem) => {\n        const id = isElement$1(elem) ? elem.dom[idAttr] : null;\n        return Optional.from(id);\n    };\n    const generate$4 = (prefix) => generate$6(prefix);\n\n    const make$7 = identity;\n\n    const NoContextApi = (getComp) => {\n        const getMessage = (event) => `The component must be in a context to execute: ${event}` +\n            (getComp ? '\\n' + element(getComp().element) + ' is not in context.' : '');\n        const fail = (event) => () => {\n            throw new Error(getMessage(event));\n        };\n        const warn = (event) => () => {\n            // eslint-disable-next-line no-console\n            console.warn(getMessage(event));\n        };\n        return {\n            debugInfo: constant$1('fake'),\n            triggerEvent: warn('triggerEvent'),\n            triggerFocus: warn('triggerFocus'),\n            triggerEscape: warn('triggerEscape'),\n            broadcast: warn('broadcast'),\n            broadcastOn: warn('broadcastOn'),\n            broadcastEvent: warn('broadcastEvent'),\n            build: fail('build'),\n            buildOrPatch: fail('buildOrPatch'),\n            addToWorld: fail('addToWorld'),\n            removeFromWorld: fail('removeFromWorld'),\n            addToGui: fail('addToGui'),\n            removeFromGui: fail('removeFromGui'),\n            getByUid: fail('getByUid'),\n            getByDom: fail('getByDom'),\n            isConnected: never\n        };\n    };\n    const singleton = NoContextApi();\n\n    const generateFrom$1 = (spec, all) => {\n        /*\n         * This takes a basic record of configured behaviours, defaults their state\n         * and ensures that all the behaviours were valid. Will need to document\n         * this entire process. Let's see where this is used.\n         */\n        const schema = map$2(all, (a) => \n        // Optional here probably just due to ForeignGui listing everything it supports. Can most likely\n        // change it to strict once I fix the other errors.\n        optionObjOf(a.name(), [\n            required$1('config'),\n            defaulted('state', NoState)\n        ]));\n        const validated = asRaw('component.behaviours', objOf(schema), spec.behaviours).fold((errInfo) => {\n            throw new Error(formatError(errInfo) + '\\nComplete spec:\\n' +\n                JSON.stringify(spec, null, 2));\n        }, identity);\n        return {\n            list: all,\n            data: map$1(validated, (optBlobThunk) => {\n                const output = optBlobThunk.map((blob) => ({\n                    config: blob.config,\n                    state: blob.state.init(blob.config)\n                }));\n                return constant$1(output);\n            })\n        };\n    };\n    const getBehaviours$3 = (bData) => bData.list;\n    const getData$3 = (bData) => bData.data;\n\n    const byInnerKey = (data, tuple) => {\n        const r = {};\n        each(data, (detail, key) => {\n            each(detail, (value, indexKey) => {\n                const chain = get$h(r, indexKey).getOr([]);\n                r[indexKey] = chain.concat([\n                    tuple(key, value)\n                ]);\n            });\n        });\n        return r;\n    };\n\n    // Based on all the behaviour exhibits, and the original dom modification, identify\n    // the overall combined dom modification that needs to occur\n    const combine$1 = (info, baseMod, behaviours, base) => {\n        // Clone the object so we can change it.\n        const modsByBehaviour = { ...baseMod };\n        each$1(behaviours, (behaviour) => {\n            modsByBehaviour[behaviour.name()] = behaviour.exhibit(info, base);\n        });\n        // byAspect format: { classes: [ { name: Toggling, modification: [ 'selected' ] } ] }\n        const byAspect = byInnerKey(modsByBehaviour, (name, modification) => ({ name, modification }));\n        const combineObjects = (objects) => foldr(objects, (b, a) => ({ ...a.modification, ...b }), {});\n        const combinedClasses = foldr(byAspect.classes, (b, a) => a.modification.concat(b), []);\n        const combinedAttributes = combineObjects(byAspect.attributes);\n        const combinedStyles = combineObjects(byAspect.styles);\n        return nu$2({\n            classes: combinedClasses,\n            attributes: combinedAttributes,\n            styles: combinedStyles\n        });\n    };\n\n    const sortKeys = (label, keyName, array, order) => {\n        try {\n            const sorted = sort(array, (a, b) => {\n                const aKey = a[keyName];\n                const bKey = b[keyName];\n                const aIndex = order.indexOf(aKey);\n                const bIndex = order.indexOf(bKey);\n                if (aIndex === -1) {\n                    throw new Error('The ordering for ' + label + ' does not have an entry for ' + aKey +\n                        '.\\nOrder specified: ' + JSON.stringify(order, null, 2));\n                }\n                if (bIndex === -1) {\n                    throw new Error('The ordering for ' + label + ' does not have an entry for ' + bKey +\n                        '.\\nOrder specified: ' + JSON.stringify(order, null, 2));\n                }\n                if (aIndex < bIndex) {\n                    return -1;\n                }\n                else if (bIndex < aIndex) {\n                    return 1;\n                }\n                else {\n                    return 0;\n                }\n            });\n            return Result.value(sorted);\n        }\n        catch (err) {\n            return Result.error([err]);\n        }\n    };\n\n    const uncurried = (handler, purpose) => ({\n        handler,\n        purpose\n    });\n    const curried = (handler, purpose) => ({\n        cHandler: handler,\n        purpose\n    });\n    const curryArgs = (descHandler, extraArgs) => curried(curry.apply(undefined, [descHandler.handler].concat(extraArgs)), descHandler.purpose);\n    const getCurried = (descHandler) => descHandler.cHandler;\n\n    const behaviourTuple = (name, handler) => ({\n        name,\n        handler\n    });\n    const nameToHandlers = (behaviours, info) => {\n        const r = {};\n        each$1(behaviours, (behaviour) => {\n            r[behaviour.name()] = behaviour.handlers(info);\n        });\n        return r;\n    };\n    const groupByEvents = (info, behaviours, base) => {\n        const behaviourEvents = {\n            ...base,\n            ...nameToHandlers(behaviours, info)\n        };\n        // Now, with all of these events, we need to index by event name\n        return byInnerKey(behaviourEvents, behaviourTuple);\n    };\n    const combine = (info, eventOrder, behaviours, base) => {\n        const byEventName = groupByEvents(info, behaviours, base);\n        return combineGroups(byEventName, eventOrder);\n    };\n    const assemble = (rawHandler) => {\n        const handler = read$1(rawHandler);\n        return (component, simulatedEvent, ...rest) => {\n            const args = [component, simulatedEvent].concat(rest);\n            if (handler.abort.apply(undefined, args)) {\n                simulatedEvent.stop();\n            }\n            else if (handler.can.apply(undefined, args)) {\n                handler.run.apply(undefined, args);\n            }\n        };\n    };\n    const missingOrderError = (eventName, tuples) => Result.error([\n        'The event (' + eventName + ') has more than one behaviour that listens to it.\\nWhen this occurs, you must ' +\n            'specify an event ordering for the behaviours in your spec (e.g. [ \"listing\", \"toggling\" ]).\\nThe behaviours that ' +\n            'can trigger it are: ' + JSON.stringify(map$2(tuples, (c) => c.name), null, 2)\n    ]);\n    const fuse = (tuples, eventOrder, eventName) => {\n        // ASSUMPTION: tuples.length will never be 0, because it wouldn't have an entry if it was 0\n        const order = eventOrder[eventName];\n        if (!order) {\n            return missingOrderError(eventName, tuples);\n        }\n        else {\n            return sortKeys('Event: ' + eventName, 'name', tuples, order).map((sortedTuples) => {\n                const handlers = map$2(sortedTuples, (tuple) => tuple.handler);\n                return fuse$1(handlers);\n            });\n        }\n    };\n    const combineGroups = (byEventName, eventOrder) => {\n        const r = mapToArray(byEventName, (tuples, eventName) => {\n            const combined = tuples.length === 1 ? Result.value(tuples[0].handler) : fuse(tuples, eventOrder, eventName);\n            return combined.map((handler) => {\n                const assembled = assemble(handler);\n                const purpose = tuples.length > 1 ? filter$2(eventOrder[eventName], (o) => exists(tuples, (t) => t.name === o)).join(' > ') : tuples[0].name;\n                return wrap(eventName, uncurried(assembled, purpose));\n            });\n        });\n        return consolidate(r, {});\n    };\n\n    const baseBehaviour = 'alloy.base.behaviour';\n    const schema$t = objOf([\n        field$1('dom', 'dom', required$2(), objOf([\n            // Note, no children.\n            required$1('tag'),\n            defaulted('styles', {}),\n            defaulted('classes', []),\n            defaulted('attributes', {}),\n            option$3('value'),\n            option$3('innerHtml')\n        ])),\n        required$1('components'),\n        required$1('uid'),\n        defaulted('events', {}),\n        defaulted('apis', {}),\n        // Use mergeWith in the future when pre-built behaviours conflict\n        field$1('eventOrder', 'eventOrder', mergeWith({\n            // Note, not using constant behaviour names to avoid code size of unused behaviours\n            [execute$5()]: ['disabling', baseBehaviour, 'toggling', 'typeaheadevents'],\n            [focus$3()]: [baseBehaviour, 'focusing', 'keying'],\n            [systemInit()]: [baseBehaviour, 'disabling', 'toggling', 'representing', 'tooltipping'],\n            [input()]: [baseBehaviour, 'representing', 'streaming', 'invalidating'],\n            [detachedFromDom()]: [baseBehaviour, 'representing', 'item-events', 'toolbar-button-events', 'tooltipping'],\n            [mousedown()]: ['focusing', baseBehaviour, 'item-type-events'],\n            [touchstart()]: ['focusing', baseBehaviour, 'item-type-events'],\n            [mouseover()]: ['item-type-events', 'tooltipping'],\n            [receive()]: ['receiving', 'reflecting', 'tooltipping']\n        }), anyValue()),\n        option$3('domModification')\n    ]);\n    const toInfo = (spec) => asRaw('custom.definition', schema$t, spec);\n    const toDefinition = (detail) => \n    // EFFICIENCY: Consider not merging here.\n    ({\n        ...detail.dom,\n        uid: detail.uid,\n        domChildren: map$2(detail.components, (comp) => comp.element)\n    });\n    const toModification = (detail) => detail.domModification.fold(() => nu$2({}), nu$2);\n    const toEvents = (info) => info.events;\n\n    const diffKeyValueSet = (newObj, oldObj) => {\n        const newKeys = keys(newObj);\n        const oldKeys = keys(oldObj);\n        const toRemove = difference(oldKeys, newKeys);\n        const toSet = bifilter(newObj, (v, k) => {\n            return !has$2(oldObj, k) || v !== oldObj[k];\n        }).t;\n        return { toRemove, toSet };\n    };\n    const reconcileToDom = (definition, obsoleted) => {\n        const { class: clazz, style, ...existingAttributes } = clone$2(obsoleted);\n        const { toSet: attrsToSet, toRemove: attrsToRemove } = diffKeyValueSet(definition.attributes, existingAttributes);\n        const updateAttrs = () => {\n            each$1(attrsToRemove, (a) => remove$8(obsoleted, a));\n            setAll$1(obsoleted, attrsToSet);\n        };\n        const existingStyles = getAllRaw(obsoleted);\n        const { toSet: stylesToSet, toRemove: stylesToRemove } = diffKeyValueSet(definition.styles, existingStyles);\n        const updateStyles = () => {\n            each$1(stylesToRemove, (s) => remove$6(obsoleted, s));\n            setAll(obsoleted, stylesToSet);\n        };\n        const existingClasses = get$7(obsoleted);\n        const classesToRemove = difference(existingClasses, definition.classes);\n        const classesToAdd = difference(definition.classes, existingClasses);\n        const updateClasses = () => {\n            add$1(obsoleted, classesToAdd);\n            remove$2(obsoleted, classesToRemove);\n        };\n        const updateHtml = (html) => {\n            set$8(obsoleted, html);\n        };\n        const updateChildren = () => {\n            const children = definition.domChildren;\n            patchDomChildren(obsoleted, children);\n        };\n        const updateValue = () => {\n            const valueElement = obsoleted;\n            const value = definition.value.getOrUndefined();\n            if (value !== get$5(valueElement)) {\n                // TINY-8736: Value.set throws an error in case the value is undefined\n                set$4(valueElement, value ?? '');\n            }\n        };\n        updateAttrs();\n        updateClasses();\n        updateStyles();\n        // Patching can only support one form of children, so we only update the html or the children, but never both\n        definition.innerHtml.fold(updateChildren, updateHtml);\n        updateValue();\n        return obsoleted;\n    };\n\n    const introduceToDom = (definition) => {\n        const subject = SugarElement.fromTag(definition.tag);\n        setAll$1(subject, definition.attributes);\n        add$1(subject, definition.classes);\n        setAll(subject, definition.styles);\n        // Remember: Order of innerHtml vs children is important.\n        definition.innerHtml.each((html) => set$8(subject, html));\n        // Children are already elements.\n        const children = definition.domChildren;\n        append$1(subject, children);\n        definition.value.each((value) => {\n            set$4(subject, value);\n        });\n        return subject;\n    };\n    const attemptPatch = (definition, obsoleted) => {\n        try {\n            const e = reconcileToDom(definition, obsoleted);\n            return Optional.some(e);\n        }\n        catch {\n            return Optional.none();\n        }\n    };\n    // If a component has both innerHtml and children then we can't patch it\n    const hasMixedChildren = (definition) => definition.innerHtml.isSome() && definition.domChildren.length > 0;\n    const renderToDom = (definition, optObsoleted) => {\n        // If the current tag doesn't match, let's not try to add anything further down the tree.\n        // If it does match though and we don't have mixed children then attempt to patch attributes etc...\n        const canBePatched = (candidate) => name$3(candidate) === definition.tag && !hasMixedChildren(definition) && !isPremade(candidate);\n        const elem = optObsoleted\n            .filter(canBePatched)\n            .bind((obsoleted) => attemptPatch(definition, obsoleted))\n            .getOrThunk(() => introduceToDom(definition));\n        writeOnly(elem, definition.uid);\n        return elem;\n    };\n\n    // This goes through the list of behaviours defined for a particular spec (removing anything\n    // that has been revoked), and returns the BehaviourType (e.g. Sliding)\n    const getBehaviours$2 = (spec) => {\n        const behaviours = get$h(spec, 'behaviours').getOr({});\n        return bind$3(keys(behaviours), (name) => {\n            const behaviour = behaviours[name];\n            return isNonNullable(behaviour) ? [behaviour.me] : [];\n        });\n    };\n    const generateFrom = (spec, all) => generateFrom$1(spec, all);\n    const generate$3 = (spec) => {\n        const all = getBehaviours$2(spec);\n        return generateFrom(spec, all);\n    };\n\n    // This is probably far too complicated. I think DomModification is probably\n    // questionable as a concept. Maybe it should be deprecated.\n    const getDomDefinition = (info, bList, bData) => {\n        // Get the current DOM definition from the spec\n        const definition = toDefinition(info);\n        // Get the current DOM modification definition from the spec\n        const infoModification = toModification(info);\n        // Treat the DOM modification like it came from a behaviour\n        const baseModification = {\n            'alloy.base.modification': infoModification\n        };\n        // Combine the modifications from any defined behaviours\n        const modification = bList.length > 0 ? combine$1(bData, baseModification, bList, definition) : infoModification;\n        // Transform the DOM definition with the combined dom modifications to make a new DOM definition\n        return merge(definition, modification);\n    };\n    const getEvents = (info, bList, bData) => {\n        const baseEvents = {\n            'alloy.base.behaviour': toEvents(info)\n        };\n        return combine(bData, info.eventOrder, bList, baseEvents).getOrDie();\n    };\n    const build$2 = (spec, obsoleted) => {\n        const getMe = () => me;\n        const systemApi = Cell(singleton);\n        const info = getOrDie(toInfo(spec));\n        const bBlob = generate$3(spec);\n        const bList = getBehaviours$3(bBlob);\n        const bData = getData$3(bBlob);\n        const modDefinition = getDomDefinition(info, bList, bData);\n        const item = renderToDom(modDefinition, obsoleted);\n        const events = getEvents(info, bList, bData);\n        const subcomponents = Cell(info.components);\n        const connect = (newApi) => {\n            systemApi.set(newApi);\n        };\n        const disconnect = () => {\n            systemApi.set(NoContextApi(getMe));\n        };\n        const syncComponents = () => {\n            // Update the component list with the current children\n            const children$1 = children(item);\n            // INVESTIGATE: Not sure about how to handle text nodes here.\n            const subs = bind$3(children$1, (child) => systemApi.get().getByDom(child).fold(() => [], pure$2));\n            subcomponents.set(subs);\n        };\n        // TYPIFY (any here is for the info.apis() pathway)\n        const config = (behaviour) => {\n            const b = bData;\n            const f = isFunction(b[behaviour.name()]) ? b[behaviour.name()] : () => {\n                throw new Error('Could not find ' + behaviour.name() + ' in ' + JSON.stringify(spec, null, 2));\n            };\n            return f();\n        };\n        const hasConfigured = (behaviour) => isFunction(bData[behaviour.name()]);\n        const getApis = () => info.apis;\n        const readState = (behaviourName) => bData[behaviourName]().map((b) => b.state.readState()).getOr('not enabled');\n        const me = {\n            uid: spec.uid,\n            getSystem: systemApi.get,\n            config,\n            hasConfigured,\n            spec,\n            readState,\n            getApis,\n            connect,\n            disconnect,\n            element: item,\n            syncComponents,\n            components: subcomponents.get,\n            events\n        };\n        return me;\n    };\n\n    const buildSubcomponents = (spec, obsoleted) => {\n        const components = get$h(spec, 'components').getOr([]);\n        return obsoleted.fold(() => map$2(components, build$1), (obs) => map$2(components, (c, i) => {\n            return buildOrPatch(c, child$2(obs, i));\n        }));\n    };\n    const buildFromSpec = (userSpec, obsoleted) => {\n        const { events: specEvents, ...spec } = make$7(userSpec);\n        // Build the subcomponents. A spec hierarchy is built from the bottom up.\n        // obsoleted is used to define which element we are attempting to replace\n        // so that it might be used to patch the DOM instead of recreate it.\n        const components = buildSubcomponents(spec, obsoleted);\n        const completeSpec = {\n            ...spec,\n            events: { ...DefaultEvents, ...specEvents },\n            components\n        };\n        return Result.value(\n        // Note, this isn't a spec any more, because it has built children\n        build$2(completeSpec, obsoleted));\n    };\n    const text$2 = (textContent) => {\n        const element = SugarElement.fromText(textContent);\n        return external({\n            element\n        });\n    };\n    const external = (spec) => {\n        const extSpec = asRawOrDie$1('external.component', objOfOnly([\n            required$1('element'),\n            option$3('uid')\n        ]), spec);\n        const systemApi = Cell(NoContextApi());\n        const connect = (newApi) => {\n            systemApi.set(newApi);\n        };\n        const disconnect = () => {\n            systemApi.set(NoContextApi(() => me));\n        };\n        const uid = extSpec.uid.getOrThunk(() => generate$4('external'));\n        writeOnly(extSpec.element, uid);\n        const me = {\n            uid,\n            getSystem: systemApi.get,\n            config: Optional.none,\n            hasConfigured: never,\n            connect,\n            disconnect,\n            getApis: () => ({}),\n            element: extSpec.element,\n            spec,\n            readState: constant$1('No state'),\n            syncComponents: noop,\n            components: constant$1([]),\n            events: {}\n        };\n        return premade$1(me);\n    };\n    // We experimented with just having a counter for efficiency, but that fails for situations\n    // where an external JS file is using alloy, and is contained within another\n    // alloy root container. The ids can conflict, because the counters do not\n    // know about each other (being parts of separate scripts).\n    //\n    // There are other solutions than this ... not sure if they are going to have better performance, though\n    const uids = generate$4;\n    const isSketchSpec$1 = (spec) => has$2(spec, 'uid');\n    // INVESTIGATE: A better way to provide 'meta-specs'\n    const buildOrPatch = (spec, obsoleted) => getPremade(spec).getOrThunk(() => {\n        // EFFICIENCY: Consider not merging here, and passing uid through separately\n        const userSpecWithUid = isSketchSpec$1(spec) ? spec : {\n            uid: uids(''),\n            ...spec\n        };\n        return buildFromSpec(userSpecWithUid, obsoleted).getOrDie();\n    });\n    const build$1 = (spec) => buildOrPatch(spec, Optional.none());\n    const premade = premade$1;\n\n    // Mark this component as busy, or blocked.\n    const block = (component, config, state, \n    // This works in conjunction with the 'getRoot' function in the config. To\n    // attach a blocker component to the dom, ensure that 'getRoot' returns a\n    // component, and this function returns the specification of the component to\n    // attach.\n    getBusySpec) => {\n        set$9(component.element, 'aria-busy', true);\n        const root = config.getRoot(component).getOr(component);\n        const blockerBehaviours = derive$1([\n            // Trap the \"Tab\" key and don't let it escape.\n            Keying.config({\n                mode: 'special',\n                onTab: () => Optional.some(true),\n                onShiftTab: () => Optional.some(true)\n            }),\n            Focusing.config({})\n        ]);\n        const blockSpec = getBusySpec(root, blockerBehaviours);\n        const blocker = root.getSystem().build(blockSpec);\n        Replacing.append(root, premade(blocker));\n        if (blocker.hasConfigured(Keying) && config.focus) {\n            Keying.focusIn(blocker);\n        }\n        if (!state.isBlocked()) {\n            config.onBlock(component);\n        }\n        state.blockWith(() => Replacing.remove(root, blocker));\n    };\n    // Mark this component as unblocked, or not busy. This is a noop on a component\n    // that isn't blocked.\n    const unblock = (component, config, state) => {\n        remove$8(component.element, 'aria-busy');\n        if (state.isBlocked()) {\n            config.onUnblock(component);\n        }\n        state.clear();\n    };\n    const isBlocked = (component, blockingConfig, blockingState) => blockingState.isBlocked();\n\n    var BlockingApis = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        block: block,\n        unblock: unblock,\n        isBlocked: isBlocked\n    });\n\n    var BlockingSchema = [\n        // The blocking behaviour places a blocking element over the DOM while the\n        // component is in the blocked state. If a function is provided here that\n        // returns Some, then the blocking element will be added as a child of the\n        // element returned. Otherwise, it will be added as a child of the main\n        // component.\n        defaultedFunction('getRoot', Optional.none),\n        // This boolean, if provided, will specify whether the blocking element is\n        // focused when the component is first blocked\n        defaultedBoolean('focus', true),\n        // This function, if provided, will be called any time the component is\n        // blocked (unless it was already blocked).\n        onHandler('onBlock'),\n        // This function, if provided, will be called any time the component is\n        // unblocked (unless it was already unblocked).\n        onHandler('onUnblock')\n    ];\n\n    const init$g = () => {\n        const blocker = destroyable();\n        const blockWith = (destroy) => {\n            blocker.set({ destroy });\n        };\n        return nu$4({\n            readState: blocker.isSet,\n            blockWith,\n            clear: blocker.clear,\n            isBlocked: blocker.isSet\n        });\n    };\n\n    var BlockingState = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        init: init$g\n    });\n\n    // Mark a component as able to be \"Blocked\" or able to enter a busy state. See\n    // BlockingSchema and BlockingApis for more details on how to configure this.\n    const Blocking = create$3({\n        fields: BlockingSchema,\n        name: 'blocking',\n        apis: BlockingApis,\n        state: BlockingState\n    });\n\n    const getCurrent = (component, composeConfig, _composeState) => composeConfig.find(component);\n\n    var ComposeApis = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        getCurrent: getCurrent\n    });\n\n    const ComposeSchema = [\n        required$1('find')\n    ];\n\n    const Composing = create$3({\n        fields: ComposeSchema,\n        name: 'composing',\n        apis: ComposeApis\n    });\n\n    const getCoupled = (component, coupleConfig, coupleState, name) => coupleState.getOrCreate(component, coupleConfig, name);\n    const getExistingCoupled = (component, coupleConfig, coupleState, name) => coupleState.getExisting(component, coupleConfig, name);\n\n    var CouplingApis = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        getCoupled: getCoupled,\n        getExistingCoupled: getExistingCoupled\n    });\n\n    var CouplingSchema = [\n        requiredOf('others', setOf(Result.value, anyValue()))\n    ];\n\n    // Unfortunately, the Coupling APIs currently throw errors when the coupled name\n    // is not recognised. This is because if the wrong name is used, it is a\n    // non-recoverable error, and the developer should be notified. However, there are\n    // better ways to do this: (removing this API and only returning Optionals/Results)\n    const init$f = () => {\n        const coupled = {};\n        const lookupCoupled = (coupleConfig, coupledName) => {\n            const available = keys(coupleConfig.others);\n            if (available.length === 0) {\n                throw new Error('Cannot find any known coupled components');\n            }\n            else {\n                return get$h(coupled, coupledName);\n            }\n        };\n        const getOrCreate = (component, coupleConfig, name) => {\n            return lookupCoupled(coupleConfig, name).getOrThunk(() => {\n                // TODO: TINY-9014 Likely type error. coupleConfig.others[key] is\n                // `() => ((comp: AlloyComponent) => AlloySpec)`,\n                // but builder is being treated as a `(comp: AlloyComponent) => AlloySpec`\n                const builder = get$h(coupleConfig.others, name).getOrDie('No information found for coupled component: ' + name);\n                const spec = builder(component);\n                const built = component.getSystem().build(spec);\n                coupled[name] = built;\n                return built;\n            });\n        };\n        const getExisting = (component, coupleConfig, name) => {\n            return lookupCoupled(coupleConfig, name).orThunk(() => {\n                // Validate we recognise this coupled component's name.\n                get$h(coupleConfig.others, name).getOrDie('No information found for coupled component: ' + name);\n                // It's a valid name, so return None, because it hasn't been built yet.\n                return Optional.none();\n            });\n        };\n        const readState = constant$1({});\n        return nu$4({\n            readState,\n            getExisting,\n            getOrCreate\n        });\n    };\n\n    var CouplingState = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        init: init$f\n    });\n\n    const Coupling = create$3({\n        fields: CouplingSchema,\n        name: 'coupling',\n        apis: CouplingApis,\n        state: CouplingState\n    });\n\n    // Just use \"disabled\" attribute for these, not \"aria-disabled\"\n    const nativeDisabled = [\n        'input',\n        'button',\n        'textarea',\n        'select'\n    ];\n    const onLoad$5 = (component, disableConfig, disableState) => {\n        const f = disableConfig.disabled() ? disable : enable;\n        f(component, disableConfig);\n    };\n    const hasNative = (component, config) => config.useNative === true && contains$2(nativeDisabled, name$3(component.element));\n    const nativeIsDisabled = (component) => has$1(component.element, 'disabled');\n    const nativeDisable = (component) => {\n        set$9(component.element, 'disabled', 'disabled');\n    };\n    const nativeEnable = (component) => {\n        remove$8(component.element, 'disabled');\n    };\n    const ariaIsDisabled = (component) => get$g(component.element, 'aria-disabled') === 'true';\n    const ariaDisable = (component) => {\n        set$9(component.element, 'aria-disabled', 'true');\n    };\n    const ariaEnable = (component) => {\n        set$9(component.element, 'aria-disabled', 'false');\n    };\n    const disable = (component, disableConfig, _disableState) => {\n        disableConfig.disableClass.each((disableClass) => {\n            add$2(component.element, disableClass);\n        });\n        const f = hasNative(component, disableConfig) ? nativeDisable : ariaDisable;\n        f(component);\n        disableConfig.onDisabled(component);\n    };\n    const enable = (component, disableConfig, _disableState) => {\n        disableConfig.disableClass.each((disableClass) => {\n            remove$3(component.element, disableClass);\n        });\n        const f = hasNative(component, disableConfig) ? nativeEnable : ariaEnable;\n        f(component);\n        disableConfig.onEnabled(component);\n    };\n    const isDisabled$1 = (component, disableConfig) => hasNative(component, disableConfig) ? nativeIsDisabled(component) : ariaIsDisabled(component);\n    const set$2 = (component, disableConfig, disableState, disabled) => {\n        const f = disabled ? disable : enable;\n        f(component, disableConfig);\n    };\n\n    var DisableApis = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        enable: enable,\n        disable: disable,\n        isDisabled: isDisabled$1,\n        onLoad: onLoad$5,\n        set: set$2\n    });\n\n    const exhibit$5 = (base, disableConfig) => nu$2({\n        // Do not add the attribute yet, because it will depend on the node name\n        // if we use \"aria-disabled\" or just \"disabled\"\n        classes: disableConfig.disabled() ? disableConfig.disableClass.toArray() : []\n    });\n    const events$g = (disableConfig, disableState) => derive$2([\n        abort(execute$5(), (component, _simulatedEvent) => isDisabled$1(component, disableConfig)),\n        loadEvent(disableConfig, disableState, onLoad$5)\n    ]);\n\n    var ActiveDisable = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        exhibit: exhibit$5,\n        events: events$g\n    });\n\n    var DisableSchema = [\n        defaultedFunction('disabled', never),\n        defaulted('useNative', true),\n        option$3('disableClass'),\n        onHandler('onDisabled'),\n        onHandler('onEnabled')\n    ];\n\n    const Disabling = create$3({\n        fields: DisableSchema,\n        name: 'disabling',\n        active: ActiveDisable,\n        apis: DisableApis\n    });\n\n    const NuPositionCss = (position, left, top, right, bottom) => {\n        const toPx = (num) => num + 'px';\n        return {\n            position,\n            left: left.map(toPx),\n            top: top.map(toPx),\n            right: right.map(toPx),\n            bottom: bottom.map(toPx)\n        };\n    };\n    const toOptions = (position) => ({\n        ...position,\n        position: Optional.some(position.position)\n    });\n    const applyPositionCss = (element, position) => {\n        setOptions(element, toOptions(position));\n    };\n\n    const appear = (component, contextualInfo) => {\n        const elem = component.element;\n        add$2(elem, contextualInfo.transitionClass);\n        remove$3(elem, contextualInfo.fadeOutClass);\n        add$2(elem, contextualInfo.fadeInClass);\n        contextualInfo.onShow(component);\n    };\n    const disappear = (component, contextualInfo) => {\n        const elem = component.element;\n        add$2(elem, contextualInfo.transitionClass);\n        remove$3(elem, contextualInfo.fadeInClass);\n        add$2(elem, contextualInfo.fadeOutClass);\n        contextualInfo.onHide(component);\n    };\n    const isPartiallyVisible = (box, bounds) => box.y < bounds.bottom && box.bottom > bounds.y;\n    const isTopCompletelyVisible = (box, bounds) => box.y >= bounds.y;\n    const isBottomCompletelyVisible = (box, bounds) => box.bottom <= bounds.bottom;\n    const forceTopPosition = (winBox, leftX, viewport) => ({\n        location: 'top',\n        leftX,\n        topY: viewport.bounds.y - winBox.y\n    });\n    const forceBottomPosition = (winBox, leftX, viewport) => ({\n        location: 'bottom',\n        leftX,\n        bottomY: winBox.bottom - viewport.bounds.bottom\n    });\n    const getDockedLeftPosition = (bounds) => {\n        // Essentially, we are just getting the bounding client rect left here,\n        // because winBox.x will be the scroll value.\n        return bounds.box.x - bounds.win.x;\n    };\n    const tryDockingPosition = (modes, bounds, viewport) => {\n        const winBox = bounds.win;\n        const box = bounds.box;\n        const leftX = getDockedLeftPosition(bounds);\n        return findMap(modes, (mode) => {\n            switch (mode) {\n                case 'bottom':\n                    return !isBottomCompletelyVisible(box, viewport.bounds) ? Optional.some(forceBottomPosition(winBox, leftX, viewport)) : Optional.none();\n                case 'top':\n                    return !isTopCompletelyVisible(box, viewport.bounds) ? Optional.some(forceTopPosition(winBox, leftX, viewport)) : Optional.none();\n                default:\n                    return Optional.none();\n            }\n        }).getOr({\n            location: 'no-dock'\n        });\n    };\n    const isVisibleForModes = (modes, box, viewport) => forall(modes, (mode) => {\n        switch (mode) {\n            case 'bottom':\n                return isBottomCompletelyVisible(box, viewport.bounds);\n            case 'top':\n                return isTopCompletelyVisible(box, viewport.bounds);\n        }\n    });\n    const getXYForRestoring = (pos, viewport) => {\n        const priorY = viewport.optScrollEnv.fold(constant$1(pos.bounds.y), (scrollEnv) => scrollEnv.scrollElmTop + (pos.bounds.y - scrollEnv.currentScrollTop));\n        return SugarPosition(pos.bounds.x, priorY);\n    };\n    const getXYForSaving = (box, viewport) => {\n        const priorY = viewport.optScrollEnv.fold(constant$1(box.y), (scrollEnv) => box.y + scrollEnv.currentScrollTop - scrollEnv.scrollElmTop);\n        return SugarPosition(box.x, priorY);\n    };\n    const getPrior = (elem, viewport, state) => state.getInitialPos().map((pos) => {\n        const xy = getXYForRestoring(pos, viewport);\n        return {\n            box: bounds(xy.left, xy.top, get$c(elem), get$d(elem)),\n            location: pos.location\n        };\n    });\n    const storePrior = (elem, box, viewport, state, decision) => {\n        const xy = getXYForSaving(box, viewport);\n        const bounds$1 = bounds(xy.left, xy.top, box.width, box.height);\n        state.setInitialPos({\n            style: getAllRaw(elem),\n            position: get$e(elem, 'position') || 'static',\n            bounds: bounds$1,\n            location: decision.location\n        });\n    };\n    // When we are using APIs like forceDockToTop, then we only want to store the previous position\n    // if we weren't already docked. Otherwise, we still want to move the component, but keep its old\n    // restore values\n    const storePriorIfNone = (elem, box, viewport, state, decision) => {\n        state.getInitialPos().fold(() => storePrior(elem, box, viewport, state, decision), () => noop);\n    };\n    const revertToOriginal = (elem, box, state) => state.getInitialPos().bind((position) => {\n        state.clearInitialPos();\n        switch (position.position) {\n            case 'static':\n                return Optional.some({\n                    morph: 'static'\n                });\n            case 'absolute':\n                const offsetParent = getOffsetParent(elem).getOr(body());\n                const offsetBox = box$1(offsetParent);\n                // Adding the scrollDelta here may not be the right solution. The basic problem is that the\n                // rest of the code isn't considering whether its absolute or not, and where the offset parent\n                // is. In the situation where the offset parent is *inside* the scrolling environment, then\n                // we don't need to consider the scroll, and that's what getXYForRestoring does ... it removes\n                // the scroll. We don't need to consider the scroll because the sink is already affected by the\n                // scroll. However, when the sink IS the scroller, its position is not moved by scrolling. But the\n                // positions of everything inside it needs to consider the scroll. So we add the scroll value.\n                //\n                // This might also be a bit naive. It's possible that we need to check that the offsetParent\n                // is THE scroller, not just that it has a scroll value. For example, if the offset parent\n                // was the body, and the body had a scroll, this might give unexpected results. That's somewhat\n                // countered by the fact that if the offset parent is outside the scroller, then you don't really\n                // have a scrolling environment any more, because the offset parent isn't going to be impacted\n                // at all by the scroller\n                const scrollDelta = offsetParent.dom.scrollTop ?? 0;\n                return Optional.some({\n                    morph: 'absolute',\n                    positionCss: NuPositionCss('absolute', get$h(position.style, 'left').map((_left) => box.x - offsetBox.x), get$h(position.style, 'top').map((_top) => box.y - offsetBox.y + scrollDelta), get$h(position.style, 'right').map((_right) => offsetBox.right - box.right), get$h(position.style, 'bottom').map((_bottom) => offsetBox.bottom - box.bottom))\n                });\n            default:\n                return Optional.none();\n        }\n    });\n    const tryMorphToOriginal = (elem, viewport, state) => getPrior(elem, viewport, state)\n        .filter(({ box }) => isVisibleForModes(state.getModes(), box, viewport))\n        .bind(({ box }) => revertToOriginal(elem, box, state));\n    const tryDecisionToFixedMorph = (decision) => {\n        switch (decision.location) {\n            case 'top': {\n                // We store our current position so we can revert to it once it's\n                // visible again.\n                return Optional.some({\n                    morph: 'fixed',\n                    positionCss: NuPositionCss('fixed', Optional.some(decision.leftX), Optional.some(decision.topY), Optional.none(), Optional.none())\n                });\n            }\n            case 'bottom': {\n                // We store our current position so we can revert to it once it's\n                // visible again.\n                return Optional.some({\n                    morph: 'fixed',\n                    positionCss: NuPositionCss('fixed', Optional.some(decision.leftX), Optional.none(), Optional.none(), Optional.some(decision.bottomY))\n                });\n            }\n            default:\n                return Optional.none();\n        }\n    };\n    const tryMorphToFixed = (elem, viewport, state) => {\n        const box = box$1(elem);\n        const winBox = win();\n        const decision = tryDockingPosition(state.getModes(), {\n            win: winBox,\n            box\n        }, viewport);\n        if (decision.location === 'top' || decision.location === 'bottom') {\n            // We are moving from undocked to docked, so store the previous location\n            // so that we can restore it when we switch out of docking (back to undocked)\n            storePrior(elem, box, viewport, state, decision);\n            return tryDecisionToFixedMorph(decision);\n        }\n        else {\n            return Optional.none();\n        }\n    };\n    const tryMorphToOriginalOrUpdateFixed = (elem, viewport, state) => {\n        // When a \"docked\" element is docked to the top of a scroll container (due to optScrollEnv in\n        // viewport), we need to reposition its fixed if the scroll container has itself moved its top position.\n        // This isn't required when the docking is to the top of the window, because the entire window cannot\n        // be scrolled up and down the page - it is the page.\n        //\n        // Imagine a situation where the toolbar has docked to the top of the scroll container, which is at\n        // y = 200. Now, when the user scrolls the page another 50px down the page, the top of the scroll\n        // container will now be 150px, but the \"fixed\" toolbar will still be at \"200px\". So this is a morph\n        // from \"fixed\" to \"fixed\", but with new coordinates. So if we can't morph to original from \"fixed\",\n        // we try to update our \"fixed\" position (if we have a scrolling environment in the viewport)\n        return tryMorphToOriginal(elem, viewport, state)\n            .orThunk(() => {\n            // Importantly, we don't update our stored position for the element before \"docking\", because\n            // this is a transition between \"docked\" and \"docked\", not \"undocked\" and \"docked\". We want to\n            // keep our undocked position in our store, not a docked position.\n            // So we don't change our stored position. We just improve our fixed.\n            return viewport.optScrollEnv\n                .bind((_) => getPrior(elem, viewport, state))\n                .bind(({ box, location }) => {\n                const winBox = win();\n                const leftX = getDockedLeftPosition({ win: winBox, box });\n                // Keep the same docking location\n                const decision = location === 'top'\n                    ? forceTopPosition(winBox, leftX, viewport)\n                    : forceBottomPosition(winBox, leftX, viewport);\n                return tryDecisionToFixedMorph(decision);\n            });\n        });\n    };\n    const tryMorph = (component, viewport, state) => {\n        const elem = component.element;\n        const isDocked = is$1(getRaw(elem, 'position'), 'fixed');\n        return isDocked\n            ? tryMorphToOriginalOrUpdateFixed(elem, viewport, state)\n            : tryMorphToFixed(elem, viewport, state);\n    };\n    // The difference between the \"calculate\" functions and the \"try\" functions is that the \"try\" functions\n    // will first consider whether there is a need to morph, whereas the \"calculate\" functions will just\n    // give you the morph details, bypassing the check to see if it's needed\n    const calculateMorphToOriginal = (component, viewport, state) => {\n        const elem = component.element;\n        return getPrior(elem, viewport, state)\n            .bind(({ box }) => revertToOriginal(elem, box, state));\n    };\n    const forceDockWith = (elem, viewport, state, getDecision) => {\n        const box = box$1(elem);\n        const winBox = win();\n        const leftX = getDockedLeftPosition({ win: winBox, box });\n        const decision = getDecision(winBox, leftX, viewport);\n        if (decision.location === 'bottom' || decision.location === 'top') {\n            // We only want to store the values if we aren't already docking. If we are already docking, then\n            // we just want to move the element, without updating where it started originally\n            storePriorIfNone(elem, box, viewport, state, decision);\n            return tryDecisionToFixedMorph(decision);\n        }\n        else {\n            return Optional.none();\n        }\n    };\n\n    const morphToStatic = (component, config, state) => {\n        state.setDocked(false);\n        each$1(['left', 'right', 'top', 'bottom', 'position'], (prop) => remove$6(component.element, prop));\n        config.onUndocked(component);\n    };\n    const morphToCoord = (component, config, state, position) => {\n        const isDocked = position.position === 'fixed';\n        state.setDocked(isDocked);\n        applyPositionCss(component.element, position);\n        const method = isDocked ? config.onDocked : config.onUndocked;\n        method(component);\n    };\n    const updateVisibility = (component, config, state, viewport, morphToDocked = false) => {\n        config.contextual.each((contextInfo) => {\n            // Make the dockable component disappear if the context is outside the viewport\n            contextInfo.lazyContext(component).each((box) => {\n                const isVisible = isPartiallyVisible(box, viewport.bounds);\n                if (isVisible !== state.isVisible()) {\n                    state.setVisible(isVisible);\n                    // If morphing to docked and the context isn't visible then immediately set\n                    // the fadeout class and don't worry about transitioning, as the context\n                    // would never have been in view while docked\n                    if (morphToDocked && !isVisible) {\n                        add$1(component.element, [contextInfo.fadeOutClass]);\n                        contextInfo.onHide(component);\n                    }\n                    else {\n                        const method = isVisible ? appear : disappear;\n                        method(component, contextInfo);\n                    }\n                }\n            });\n        });\n    };\n    const applyFixedMorph = (component, config, state, viewport, morph) => {\n        // This \"updateVisibility\" call is potentially duplicated with the\n        // call in refreshInternal for isDocked. We might want to consolidate them.\n        // The difference between them is the \"morphToDocked\" flag.\n        updateVisibility(component, config, state, viewport, true);\n        morphToCoord(component, config, state, morph.positionCss);\n    };\n    const applyMorph = (component, config, state, viewport, morph) => {\n        // Apply the morph result depending on its type\n        switch (morph.morph) {\n            case 'static': {\n                return morphToStatic(component, config, state);\n            }\n            case 'absolute': {\n                return morphToCoord(component, config, state, morph.positionCss);\n            }\n            case 'fixed': {\n                return applyFixedMorph(component, config, state, viewport, morph);\n            }\n        }\n    };\n    const refreshInternal = (component, config, state) => {\n        // Absolute coordinates (considers scroll)\n        const viewport = config.lazyViewport(component);\n        updateVisibility(component, config, state, viewport);\n        tryMorph(component, viewport, state).each((morph) => {\n            applyMorph(component, config, state, viewport, morph);\n        });\n    };\n    const resetInternal = (component, config, state) => {\n        // Morph back to the original position\n        const elem = component.element;\n        state.setDocked(false);\n        const viewport = config.lazyViewport(component);\n        calculateMorphToOriginal(component, viewport, state).each((staticOrAbsoluteMorph) => {\n            // This code is very similar to the \"applyMorph\" function above. The main difference\n            // is that it doesn't consider fixed position, because something that is docking\n            // can't currently start with fixed position\n            switch (staticOrAbsoluteMorph.morph) {\n                case 'static': {\n                    morphToStatic(component, config, state);\n                    break;\n                }\n                case 'absolute': {\n                    morphToCoord(component, config, state, staticOrAbsoluteMorph.positionCss);\n                    break;\n                }\n            }\n        });\n        // Remove contextual visibility classes\n        state.setVisible(true);\n        config.contextual.each((contextInfo) => {\n            remove$2(elem, [contextInfo.fadeInClass, contextInfo.fadeOutClass, contextInfo.transitionClass]);\n            contextInfo.onShow(component);\n        });\n        // Apply docking again to reset the position\n        refresh$4(component, config, state);\n    };\n    const refresh$4 = (component, config, state) => {\n        // Ensure the component is attached to the document/world, if not then do nothing as we can't\n        // check if the component should be docked or not when in a detached state\n        if (component.getSystem().isConnected()) {\n            refreshInternal(component, config, state);\n        }\n    };\n    const reset$1 = (component, config, state) => {\n        // If the component is not docked then there's no need to reset the state,\n        // so only reset when docked\n        if (state.isDocked()) {\n            resetInternal(component, config, state);\n        }\n    };\n    const forceDockWithDecision = (getDecision) => (component, config, state) => {\n        const viewport = config.lazyViewport(component);\n        const optMorph = forceDockWith(component.element, viewport, state, getDecision);\n        optMorph.each((morph) => {\n            // ASSUMPTION: This \"applyFixedMorph\" sets state.setDocked to true.\n            applyFixedMorph(component, config, state, viewport, morph);\n        });\n    };\n    const forceDockToTop = forceDockWithDecision(forceTopPosition);\n    const forceDockToBottom = forceDockWithDecision(forceBottomPosition);\n    const isDocked$2 = (component, config, state) => state.isDocked();\n    const setModes = (component, config, state, modes) => state.setModes(modes);\n    const getModes = (component, config, state) => state.getModes();\n\n    var DockingApis = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        refresh: refresh$4,\n        reset: reset$1,\n        isDocked: isDocked$2,\n        getModes: getModes,\n        setModes: setModes,\n        forceDockToTop: forceDockToTop,\n        forceDockToBottom: forceDockToBottom\n    });\n\n    const events$f = (dockInfo, dockState) => derive$2([\n        runOnSource(transitionend(), (component, simulatedEvent) => {\n            dockInfo.contextual.each((contextInfo) => {\n                if (has(component.element, contextInfo.transitionClass)) {\n                    remove$2(component.element, [contextInfo.transitionClass, contextInfo.fadeInClass]);\n                    const notify = dockState.isVisible() ? contextInfo.onShown : contextInfo.onHidden;\n                    notify(component);\n                }\n                simulatedEvent.stop();\n            });\n        }),\n        run$1(windowScroll(), (component, _) => {\n            refresh$4(component, dockInfo, dockState);\n        }),\n        run$1(externalElementScroll(), (component, _) => {\n            refresh$4(component, dockInfo, dockState);\n        }),\n        run$1(windowResize(), (component, _) => {\n            reset$1(component, dockInfo, dockState);\n        })\n    ]);\n\n    var ActiveDocking = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        events: events$f\n    });\n\n    var DockingSchema = [\n        optionObjOf('contextual', [\n            requiredString('fadeInClass'),\n            requiredString('fadeOutClass'),\n            requiredString('transitionClass'),\n            requiredFunction('lazyContext'),\n            onHandler('onShow'),\n            onHandler('onShown'),\n            onHandler('onHide'),\n            onHandler('onHidden')\n        ]),\n        defaultedFunction('lazyViewport', () => ({\n            bounds: win(),\n            optScrollEnv: Optional.none()\n        })),\n        defaultedArrayOf('modes', ['top', 'bottom'], string),\n        onHandler('onDocked'),\n        onHandler('onUndocked')\n    ];\n\n    const init$e = (spec) => {\n        const docked = Cell(false);\n        const visible = Cell(true);\n        const initialBounds = value$2();\n        const modes = Cell(spec.modes);\n        const readState = () => `docked:  ${docked.get()}, visible: ${visible.get()}, modes: ${modes.get().join(',')}`;\n        return nu$4({\n            isDocked: docked.get,\n            setDocked: docked.set,\n            getInitialPos: initialBounds.get,\n            setInitialPos: initialBounds.set,\n            clearInitialPos: initialBounds.clear,\n            isVisible: visible.get,\n            setVisible: visible.set,\n            getModes: modes.get,\n            setModes: modes.set,\n            readState\n        });\n    };\n\n    var DockingState = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        init: init$e\n    });\n\n    const Docking = create$3({\n        fields: DockingSchema,\n        name: 'docking',\n        active: ActiveDocking,\n        apis: DockingApis,\n        state: DockingState\n    });\n\n    /*\n     * origin: the position (without scroll) of the offset parent\n     * scroll: the scrolling position of the window\n     *\n     * fixed: the fixed coordinates to show for css\n     * offset: the absolute coordinates to show for css when inside an offset parent\n     * absolute: the absolute coordinates to show before considering the offset parent\n     */\n    const adt$4 = Adt.generate([\n        { offset: ['x', 'y'] },\n        { absolute: ['x', 'y'] },\n        { fixed: ['x', 'y'] }\n    ]);\n    const subtract = (change) => (point) => point.translate(-change.left, -change.top);\n    const add = (change) => (point) => point.translate(change.left, change.top);\n    const transform = (changes) => (x, y) => foldl(changes, (rest, f) => f(rest), SugarPosition(x, y));\n    const asFixed = (coord, scroll, origin) => coord.fold(\n    // offset to fixed\n    transform([add(origin), subtract(scroll)]), \n    // absolute to fixed\n    transform([subtract(scroll)]), \n    // fixed to fixed\n    transform([]));\n    const asAbsolute = (coord, scroll, origin) => coord.fold(\n    // offset to absolute\n    transform([add(origin)]), \n    // absolute to absolute\n    transform([]), \n    // fixed to absolute\n    transform([add(scroll)]));\n    const asOffset = (coord, scroll, origin) => coord.fold(\n    // offset to offset\n    transform([]), \n    // absolute to offset\n    transform([subtract(origin)]), \n    // fixed to offset\n    transform([add(scroll), subtract(origin)]));\n    const withinRange = (coord1, coord2, xRange, yRange, scroll, origin) => {\n        const a1 = asAbsolute(coord1, scroll, origin);\n        const a2 = asAbsolute(coord2, scroll, origin);\n        // console.log(`a1.left: ${a1.left}, a2.left: ${a2.left}, leftDelta: ${a1.left - a2.left}, xRange: ${xRange}, lD <= xRange: ${Math.abs(a1.left - a2.left) <= xRange}`);\n        // console.log(`a1.top: ${a1.top}, a2.top: ${a2.top}, topDelta: ${a1.top - a2.top}, yRange: ${yRange}, lD <= xRange: ${Math.abs(a1.top - a2.top) <= yRange}`);\n        return Math.abs(a1.left - a2.left) <= xRange &&\n            Math.abs(a1.top - a2.top) <= yRange;\n    };\n    const getDeltas = (coord1, coord2, xRange, yRange, scroll, origin) => {\n        const a1 = asAbsolute(coord1, scroll, origin);\n        const a2 = asAbsolute(coord2, scroll, origin);\n        const left = Math.abs(a1.left - a2.left);\n        const top = Math.abs(a1.top - a2.top);\n        return SugarPosition(left, top);\n    };\n    const toStyles = (coord, scroll, origin) => {\n        const stylesOpt = coord.fold((x, y) => ({ position: Optional.some('absolute'), left: Optional.some(x + 'px'), top: Optional.some(y + 'px') }), // offset\n        (x, y) => ({ position: Optional.some('absolute'), left: Optional.some((x - origin.left) + 'px'), top: Optional.some((y - origin.top) + 'px') }), // absolute\n        (x, y) => ({ position: Optional.some('fixed'), left: Optional.some(x + 'px'), top: Optional.some(y + 'px') }) // fixed\n        );\n        return { right: Optional.none(), bottom: Optional.none(), ...stylesOpt };\n    };\n    const translate$2 = (coord, deltaX, deltaY) => coord.fold((x, y) => offset(x + deltaX, y + deltaY), (x, y) => absolute$1(x + deltaX, y + deltaY), (x, y) => fixed$1(x + deltaX, y + deltaY));\n    const absorb = (partialCoord, originalCoord, scroll, origin) => {\n        const absorbOne = (stencil, nu) => (optX, optY) => {\n            const original = stencil(originalCoord, scroll, origin);\n            return nu(optX.getOr(original.left), optY.getOr(original.top));\n        };\n        return partialCoord.fold(absorbOne(asOffset, offset), absorbOne(asAbsolute, absolute$1), absorbOne(asFixed, fixed$1));\n    };\n    const offset = adt$4.offset;\n    const absolute$1 = adt$4.absolute;\n    const fixed$1 = adt$4.fixed;\n\n    const parseAttrToInt = (element, name) => {\n        const value = get$g(element, name);\n        return isUndefined(value) ? NaN : parseInt(value, 10);\n    };\n    // NOTE: Moved from ego with some parameterisation\n    const get$3 = (component, snapsInfo) => {\n        const element = component.element;\n        const x = parseAttrToInt(element, snapsInfo.leftAttr);\n        const y = parseAttrToInt(element, snapsInfo.topAttr);\n        return isNaN(x) || isNaN(y) ? Optional.none() : Optional.some(SugarPosition(x, y));\n    };\n    const set$1 = (component, snapsInfo, pt) => {\n        const element = component.element;\n        set$9(element, snapsInfo.leftAttr, pt.left + 'px');\n        set$9(element, snapsInfo.topAttr, pt.top + 'px');\n    };\n    const clear = (component, snapsInfo) => {\n        const element = component.element;\n        remove$8(element, snapsInfo.leftAttr);\n        remove$8(element, snapsInfo.topAttr);\n    };\n\n    // Types of coordinates\n    // SugarLocation: This is the position on the screen including scroll.\n    // Absolute: This is the css setting that would be applied. Therefore, it subtracts\n    // the origin of the relative offsetParent.\n    // Fixed: This is the fixed position.\n    /*\n     So in attempt to make this more understandable, let's use offset, absolute, and fixed.\n     and try and model individual combinators\n    */\n    /*\n\n     Relationships:\n       - location -> absolute: should just need to subtract the position of the offset parent (origin)\n       - location -> fixed: subtract the scrolling\n       - absolute -> fixed: add the origin, and subtract the scrolling\n       - absolute -> location: add the origin\n       - fixed -> absolute: add the scrolling, remove the origin\n       - fixed -> location: add the scrolling\n\n    /*\n     * When the user is dragging around the element, and it snaps into place, it is important\n     * for the next movement to be from its pre-snapped location, rather than the snapped location.\n     * This is because if it is from the snapped location the next delta movement may not actually\n     * be high enough to get it out of the snap area, and hence, it will just snap again (and again).\n     */\n    // This identifies the position of the draggable element as either its current position, or the position\n    // that we put on it before we snapped it into place (before dropping). Once it's dropped, the presnap\n    // position will go away. It is used to avoid the situation where you can't escape the snap unless you\n    // move the mouse really quickly :)\n    const getCoords = (component, snapInfo, coord, delta) => get$3(component, snapInfo).fold(() => coord, (fixed) => \n    // We have a pre-snap position, so we have to apply the delta ourselves\n    fixed$1(fixed.left + delta.left, fixed.top + delta.top));\n    const moveOrSnap = (component, snapInfo, coord, delta, scroll, origin) => {\n        const newCoord = getCoords(component, snapInfo, coord, delta);\n        const snap = snapInfo.mustSnap ? findClosestSnap(component, snapInfo, newCoord, scroll, origin) :\n            findSnap(component, snapInfo, newCoord, scroll, origin);\n        const fixedCoord = asFixed(newCoord, scroll, origin);\n        set$1(component, snapInfo, fixedCoord);\n        return snap.fold(() => ({\n            coord: fixed$1(fixedCoord.left, fixedCoord.top),\n            extra: Optional.none()\n        })\n        // No snap.\n        // var newfixed = graph.boundToFixed(theatre, element, loc.left, loc.top, fixed.left, fixed.top, height);\n        // presnaps.set(element, 'fixed', newfixed.left, newfixed.top);\n        // return { position: 'fixed', left: newfixed.left + 'px', top: newfixed.top + 'px' };\n        , (spanned) => ({\n            coord: spanned.output,\n            extra: spanned.extra\n        }));\n    };\n    const stopDrag = (component, snapInfo) => {\n        clear(component, snapInfo);\n    };\n    const findMatchingSnap = (snaps, newCoord, scroll, origin) => findMap(snaps, (snap) => {\n        const sensor = snap.sensor;\n        const inRange = withinRange(newCoord, sensor, snap.range.left, snap.range.top, scroll, origin);\n        return inRange ? Optional.some({\n            output: absorb(snap.output, newCoord, scroll, origin),\n            extra: snap.extra\n        }) : Optional.none();\n    });\n    const findClosestSnap = (component, snapInfo, newCoord, scroll, origin) => {\n        // You need to pass in the absX and absY so that they can be used for things which only care about snapping one axis and keeping the other one.\n        const snaps = snapInfo.getSnapPoints(component);\n        const matchSnap = findMatchingSnap(snaps, newCoord, scroll, origin);\n        return matchSnap.orThunk(() => {\n            const bestSnap = foldl(snaps, (acc, snap) => {\n                const sensor = snap.sensor;\n                const deltas = getDeltas(newCoord, sensor, snap.range.left, snap.range.top, scroll, origin);\n                return acc.deltas.fold(() => ({\n                    deltas: Optional.some(deltas),\n                    snap: Optional.some(snap)\n                }), (bestDeltas) => {\n                    const currAvg = (deltas.left + deltas.top) / 2;\n                    const bestAvg = (bestDeltas.left + bestDeltas.top) / 2;\n                    if (currAvg <= bestAvg) {\n                        return {\n                            deltas: Optional.some(deltas),\n                            snap: Optional.some(snap)\n                        };\n                    }\n                    else {\n                        return acc;\n                    }\n                });\n            }, {\n                deltas: Optional.none(),\n                snap: Optional.none()\n            });\n            return bestSnap.snap.map((snap) => ({\n                output: absorb(snap.output, newCoord, scroll, origin),\n                extra: snap.extra\n            }));\n        });\n    };\n    // x: the absolute position.left of the draggable element\n    // y: the absolute position.top of the draggable element\n    // deltaX: the amount the mouse has moved horizontally\n    // deltaY: the amount the mouse has moved vertically\n    const findSnap = (component, snapInfo, newCoord, scroll, origin) => {\n        // You need to pass in the absX and absY so that they can be used for things which only care about snapping one axis and keeping the other one.\n        const snaps = snapInfo.getSnapPoints(component);\n        // HERE\n        return findMatchingSnap(snaps, newCoord, scroll, origin);\n    };\n    const snapTo$1 = (snap, scroll, origin) => ({\n        // TODO: This looks to be incorrect and needs fixing as DragCoord definitely needs a number\n        // based drag coord for the second argument here, so this is probably a bug.\n        coord: absorb(snap.output, snap.output, scroll, origin),\n        extra: snap.extra\n    });\n\n    const snapTo = (component, dragConfig, _state, snap) => {\n        const target = dragConfig.getTarget(component.element);\n        if (dragConfig.repositionTarget) {\n            const doc = owner$4(component.element);\n            const scroll = get$b(doc);\n            const origin = getOrigin(target);\n            const snapPin = snapTo$1(snap, scroll, origin);\n            const styles = toStyles(snapPin.coord, scroll, origin);\n            setOptions(target, styles);\n        }\n    };\n\n    var DraggingApis = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        snapTo: snapTo\n    });\n\n    const field = (name, forbidden) => defaultedObjOf(name, {}, map$2(forbidden, (f) => forbid(f.name(), 'Cannot configure ' + f.name() + ' for ' + name)).concat([\n        customField('dump', identity)\n    ]));\n    const get$2 = (data) => data.dump;\n    const augment = (data, original) => ({\n        ...derive$1(original),\n        ...data.dump\n    });\n    // Is this used?\n    const SketchBehaviours = {\n        field,\n        augment,\n        get: get$2\n    };\n\n    const base = (partSchemas, partUidsSchemas) => {\n        const ps = partSchemas.length > 0 ? [\n            requiredObjOf('parts', partSchemas)\n        ] : [];\n        return ps.concat([\n            required$1('uid'),\n            defaulted('dom', {}), // Maybe get rid of.\n            defaulted('components', []),\n            snapshot('originalSpec'),\n            defaulted('debug.sketcher', {})\n        ]).concat(partUidsSchemas);\n    };\n    const asRawOrDie = (label, schema, spec, partSchemas, partUidsSchemas) => {\n        const baseS = base(partSchemas, partUidsSchemas);\n        return asRawOrDie$1(label + ' [SpecSchema]', objOfOnly(baseS.concat(schema)), spec);\n    };\n\n    const single$1 = (owner, schema, factory, spec) => {\n        const specWithUid = supplyUid(spec);\n        const detail = asRawOrDie(owner, schema, specWithUid, [], []);\n        return factory(detail, specWithUid);\n    };\n    const composite$1 = (owner, schema, partTypes, factory, spec) => {\n        const specWithUid = supplyUid(spec);\n        // Identify any information required for external parts\n        const partSchemas = schemas(partTypes);\n        // Generate partUids for all parts (external and otherwise)\n        const partUidsSchema = defaultUidsSchema(partTypes);\n        const detail = asRawOrDie(owner, schema, specWithUid, partSchemas, [partUidsSchema]);\n        // Create (internals, externals) substitutions\n        const subs = substitutes(owner, detail, partTypes);\n        // Work out the components by substituting internals\n        const components = components$1(owner, detail, subs.internals());\n        return factory(detail, components, specWithUid, subs.externals());\n    };\n    const hasUid = (spec) => has$2(spec, 'uid');\n    const supplyUid = (spec) => {\n        return hasUid(spec) ? spec : {\n            ...spec,\n            uid: generate$4('uid')\n        };\n    };\n\n    const isSketchSpec = (spec) => {\n        return spec.uid !== undefined;\n    };\n    const singleSchema = objOfOnly([\n        required$1('name'),\n        required$1('factory'),\n        required$1('configFields'),\n        defaulted('apis', {}),\n        defaulted('extraApis', {})\n    ]);\n    const compositeSchema = objOfOnly([\n        required$1('name'),\n        required$1('factory'),\n        required$1('configFields'),\n        required$1('partFields'),\n        defaulted('apis', {}),\n        defaulted('extraApis', {})\n    ]);\n    const single = (rawConfig) => {\n        const config = asRawOrDie$1('Sketcher for ' + rawConfig.name, singleSchema, rawConfig);\n        const sketch = (spec) => single$1(config.name, config.configFields, config.factory, spec);\n        const apis = map$1(config.apis, makeApi);\n        const extraApis = map$1(config.extraApis, (f, k) => markAsExtraApi(f, k));\n        return {\n            name: config.name,\n            configFields: config.configFields,\n            sketch,\n            ...apis,\n            ...extraApis\n        };\n    };\n    const composite = (rawConfig) => {\n        const config = asRawOrDie$1('Sketcher for ' + rawConfig.name, compositeSchema, rawConfig);\n        const sketch = (spec) => composite$1(config.name, config.configFields, config.partFields, config.factory, spec);\n        // These are constructors that will store their configuration.\n        const parts = generate$5(config.name, config.partFields);\n        const apis = map$1(config.apis, makeApi);\n        const extraApis = map$1(config.extraApis, (f, k) => markAsExtraApi(f, k));\n        return {\n            name: config.name,\n            partFields: config.partFields,\n            configFields: config.configFields,\n            sketch,\n            parts,\n            ...apis,\n            ...extraApis\n        };\n    };\n\n    const factory$n = (detail) => {\n        const { attributes, ...domWithoutAttributes } = detail.dom;\n        return {\n            uid: detail.uid,\n            dom: {\n                tag: 'div',\n                attributes: {\n                    role: 'presentation',\n                    ...attributes\n                },\n                ...domWithoutAttributes\n            },\n            components: detail.components,\n            behaviours: get$2(detail.containerBehaviours),\n            events: detail.events,\n            domModification: detail.domModification,\n            eventOrder: detail.eventOrder\n        };\n    };\n    const Container = single({\n        name: 'Container',\n        factory: factory$n,\n        configFields: [\n            defaulted('components', []),\n            field('containerBehaviours', []),\n            // TODO: Deprecate\n            defaulted('events', {}),\n            defaulted('domModification', {}),\n            defaulted('eventOrder', {})\n        ]\n    });\n\n    const initialAttribute = 'data-initial-z-index';\n    // We have to alter the z index of the alloy root of the blocker so that\n    // it can have a z-index high enough to act as the \"blocker\". Just before\n    // discarding it, we need to reset those z-indices back to what they\n    // were. ASSUMPTION: the blocker has been added as a direct child of the root\n    const resetZIndex = (blocker) => {\n        parent(blocker.element).filter(isElement$1).each((root) => {\n            getOpt(root, initialAttribute).fold(() => remove$6(root, 'z-index'), (zIndex) => set$7(root, 'z-index', zIndex));\n            remove$8(root, initialAttribute);\n        });\n    };\n    const changeZIndex = (blocker) => {\n        parent(blocker.element).filter(isElement$1).each((root) => {\n            getRaw(root, 'z-index').each((zindex) => {\n                set$9(root, initialAttribute, zindex);\n            });\n            // Used to be a really high number, but it probably just has\n            // to match the blocker\n            set$7(root, 'z-index', get$e(blocker.element, 'z-index'));\n        });\n    };\n    const instigate = (anyComponent, blocker) => {\n        anyComponent.getSystem().addToGui(blocker);\n        changeZIndex(blocker);\n    };\n    const discard = (blocker) => {\n        resetZIndex(blocker);\n        blocker.getSystem().removeFromGui(blocker);\n    };\n    const createComponent = (component, blockerClass, blockerEvents) => component.getSystem().build(Container.sketch({\n        dom: {\n            // Probably consider doing with classes?\n            styles: {\n                'left': '0px',\n                'top': '0px',\n                'width': '100%',\n                'height': '100%',\n                'position': 'fixed',\n                'z-index': '1000000000000000'\n            },\n            classes: [blockerClass]\n        },\n        events: blockerEvents\n    }));\n\n    var SnapSchema = optionObjOf('snaps', [\n        required$1('getSnapPoints'),\n        onHandler('onSensor'),\n        required$1('leftAttr'),\n        required$1('topAttr'),\n        defaulted('lazyViewport', win),\n        defaulted('mustSnap', false)\n    ]);\n\n    const schema$s = [\n        // Is this used?\n        defaulted('useFixed', never),\n        defaulted('getTarget', identity),\n        defaulted('onDragStart', noop),\n        defaulted('onDrag', noop),\n        defaulted('repositionTarget', true),\n        defaulted('onDrop', noop),\n        defaultedFunction('getBounds', win),\n        SnapSchema\n    ];\n\n    const getCurrentCoord = (target) => lift3(getRaw(target, 'left'), getRaw(target, 'top'), getRaw(target, 'position'), (left, top, position) => {\n        const nu = position === 'fixed' ? fixed$1 : offset;\n        return nu(parseInt(left, 10), parseInt(top, 10));\n    }).getOrThunk(() => {\n        const location = absolute$3(target);\n        return absolute$1(location.left, location.top);\n    });\n    const clampCoords = (component, coords, scroll, origin, startData) => {\n        const bounds = startData.bounds;\n        const absoluteCoord = asAbsolute(coords, scroll, origin);\n        const newX = clamp(absoluteCoord.left, bounds.x, bounds.x + bounds.width - startData.width);\n        const newY = clamp(absoluteCoord.top, bounds.y, bounds.y + bounds.height - startData.height);\n        const newCoords = absolute$1(newX, newY);\n        // Translate the absolute coord back into the previous type\n        return coords.fold(\n        // offset\n        () => {\n            const offset$1 = asOffset(newCoords, scroll, origin);\n            return offset(offset$1.left, offset$1.top);\n        }, \n        // absolute\n        constant$1(newCoords), \n        // fixed\n        () => {\n            const fixed = asFixed(newCoords, scroll, origin);\n            return fixed$1(fixed.left, fixed.top);\n        });\n    };\n    const calcNewCoord = (component, optSnaps, currentCoord, scroll, origin, delta, startData) => {\n        const newCoord = optSnaps.fold(() => {\n            // When not docking, use fixed coordinates.\n            const translated = translate$2(currentCoord, delta.left, delta.top);\n            const fixedCoord = asFixed(translated, scroll, origin);\n            return fixed$1(fixedCoord.left, fixedCoord.top);\n        }, (snapInfo) => {\n            const snapping = moveOrSnap(component, snapInfo, currentCoord, delta, scroll, origin);\n            snapping.extra.each((extra) => {\n                snapInfo.onSensor(component, extra);\n            });\n            return snapping.coord;\n        });\n        // Clamp the coords so that they are within the bounds\n        return clampCoords(component, newCoord, scroll, origin, startData);\n    };\n    const dragBy = (component, dragConfig, startData, delta) => {\n        const target = dragConfig.getTarget(component.element);\n        if (dragConfig.repositionTarget) {\n            const doc = owner$4(component.element);\n            const scroll = get$b(doc);\n            const origin = getOrigin(target);\n            const currentCoord = getCurrentCoord(target);\n            const newCoord = calcNewCoord(component, dragConfig.snaps, currentCoord, scroll, origin, delta, startData);\n            const styles = toStyles(newCoord, scroll, origin);\n            setOptions(target, styles);\n        }\n        // NOTE: On drag just goes with the original delta. It does not know about snapping.\n        dragConfig.onDrag(component, target, delta);\n    };\n\n    const calcStartData = (dragConfig, comp) => ({\n        bounds: dragConfig.getBounds(),\n        height: getOuter$1(comp.element),\n        width: getOuter(comp.element)\n    });\n    const move = (component, dragConfig, dragState, dragMode, event) => {\n        const delta = dragState.update(dragMode, event);\n        const dragStartData = dragState.getStartData().getOrThunk(() => calcStartData(dragConfig, component));\n        delta.each((dlt) => {\n            dragBy(component, dragConfig, dragStartData, dlt);\n        });\n    };\n    const stop$1 = (component, blocker, dragConfig, dragState) => {\n        blocker.each(discard);\n        dragConfig.snaps.each((snapInfo) => {\n            stopDrag(component, snapInfo);\n        });\n        const target = dragConfig.getTarget(component.element);\n        dragState.reset();\n        dragConfig.onDrop(component, target);\n    };\n    const handlers = (events) => (dragConfig, dragState) => {\n        const updateStartState = (comp) => {\n            const isBeingDragged = dragState.getStartData().isSome();\n            dragState.setStartData(calcStartData(dragConfig, comp));\n            if (!isBeingDragged) {\n                const target = dragConfig.getTarget(comp.element);\n                dragConfig.onDragStart(comp, target);\n            }\n        };\n        return derive$2([\n            run$1(windowScroll(), (comp) => {\n                // Only update if we have some start data\n                dragState.getStartData().each(() => updateStartState(comp));\n            }),\n            ...events(dragConfig, dragState, updateStartState)\n        ]);\n    };\n\n    const init$d = (dragApi) => derive$2([\n        // When the user clicks on the blocker, something has probably gone slightly\n        // wrong, so we'll just drop for safety. The blocker should really only\n        // be there when the mouse is already down and not released, so a 'click'\n        run$1(mousedown(), dragApi.forceDrop),\n        // When the user releases the mouse on the blocker, that is a drop\n        run$1(mouseup(), dragApi.drop),\n        // As the user moves the mouse around (while pressed down), we move the\n        // component around\n        run$1(mousemove(), (comp, simulatedEvent) => {\n            dragApi.move(simulatedEvent.event);\n        }),\n        // When the use moves outside the range, schedule a block to occur but\n        // give it a chance to be cancelled.\n        run$1(mouseout(), dragApi.delayDrop)\n    ]);\n\n    const getData$2 = (event) => Optional.from(SugarPosition(event.x, event.y));\n    // When dragging with the mouse, the delta is simply the difference\n    // between the two position (previous/old and next/nu)\n    const getDelta$2 = (old, nu) => SugarPosition(nu.left - old.left, nu.top - old.top);\n\n    var MouseData = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        getData: getData$2,\n        getDelta: getDelta$2\n    });\n\n    const events$e = (dragConfig, dragState, updateStartState) => [\n        run$1(mousedown(), (component, simulatedEvent) => {\n            const raw = simulatedEvent.event.raw;\n            if (raw.button !== 0) {\n                return;\n            }\n            simulatedEvent.stop();\n            const stop = () => stop$1(component, Optional.some(blocker), dragConfig, dragState);\n            // If the user has moved something outside the area, and has not come back within\n            // 200 ms, then drop\n            const delayDrop = DelayedFunction(stop, 200);\n            const dragApi = {\n                drop: stop,\n                delayDrop: delayDrop.schedule,\n                forceDrop: stop,\n                move: (event) => {\n                    // Stop any pending drops caused by mouseout\n                    delayDrop.cancel();\n                    move(component, dragConfig, dragState, MouseData, event);\n                }\n            };\n            const blocker = createComponent(component, dragConfig.blockerClass, init$d(dragApi));\n            const start = () => {\n                updateStartState(component);\n                instigate(component, blocker);\n            };\n            start();\n        })\n    ];\n    const schema$r = [\n        ...schema$s,\n        required$1('blockerClass'),\n        output$1('dragger', {\n            handlers: handlers(events$e)\n        })\n    ];\n\n    const init$c = (dragApi) => derive$2([\n        // When the user taps on the blocker, something has probably gone slightly\n        // wrong, so we'll just drop for safety. The blocker should really only\n        // be there when their finger is already down and not released, so a 'tap'\n        run$1(touchstart(), dragApi.forceDrop),\n        // When the user releases their finger on the blocker, that is a drop\n        run$1(touchend(), dragApi.drop),\n        run$1(touchcancel(), dragApi.drop),\n        // As the user moves their finger around (while pressed down), we move the\n        // component around\n        run$1(touchmove(), (comp, simulatedEvent) => {\n            dragApi.move(simulatedEvent.event);\n        })\n    ]);\n\n    const getDataFrom = (touches) => {\n        const touch = touches[0];\n        return Optional.some(SugarPosition(touch.clientX, touch.clientY));\n    };\n    const getData$1 = (event) => {\n        const raw = event.raw;\n        const touches = raw.touches;\n        return touches.length === 1 ? getDataFrom(touches) : Optional.none();\n    };\n    // When dragging the touch, the delta is simply the difference\n    // between the two touch positions (previous/old and next/nu)\n    const getDelta$1 = (old, nu) => SugarPosition(nu.left - old.left, nu.top - old.top);\n\n    var TouchData = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        getData: getData$1,\n        getDelta: getDelta$1\n    });\n\n    const events$d = (dragConfig, dragState, updateStartState) => {\n        const blockerSingleton = value$2();\n        const stopBlocking = (component) => {\n            stop$1(component, blockerSingleton.get(), dragConfig, dragState);\n            blockerSingleton.clear();\n        };\n        // Android fires events on the component at all times, while iOS initially fires on the component\n        // but once moved off the component then fires on the element behind. As such we need to use\n        // a blocker and then listen to both touchmove/touchend on both the component and blocker.\n        return [\n            run$1(touchstart(), (component, simulatedEvent) => {\n                simulatedEvent.stop();\n                const stop = () => stopBlocking(component);\n                const dragApi = {\n                    drop: stop,\n                    // delayDrop is not used by touch\n                    delayDrop: noop,\n                    forceDrop: stop,\n                    move: (event) => {\n                        move(component, dragConfig, dragState, TouchData, event);\n                    }\n                };\n                const blocker = createComponent(component, dragConfig.blockerClass, init$c(dragApi));\n                blockerSingleton.set(blocker);\n                const start = () => {\n                    updateStartState(component);\n                    instigate(component, blocker);\n                };\n                start();\n            }),\n            run$1(touchmove(), (component, simulatedEvent) => {\n                simulatedEvent.stop();\n                move(component, dragConfig, dragState, TouchData, simulatedEvent.event);\n            }),\n            run$1(touchend(), (component, simulatedEvent) => {\n                simulatedEvent.stop();\n                stopBlocking(component);\n            }),\n            run$1(touchcancel(), stopBlocking)\n        ];\n    };\n    const schema$q = [\n        ...schema$s,\n        required$1('blockerClass'),\n        output$1('dragger', {\n            handlers: handlers(events$d)\n        })\n    ];\n\n    const events$c = (dragConfig, dragState, updateStartState) => [\n        ...events$e(dragConfig, dragState, updateStartState),\n        ...events$d(dragConfig, dragState, updateStartState)\n    ];\n    const schema$p = [\n        ...schema$s,\n        required$1('blockerClass'),\n        output$1('dragger', {\n            handlers: handlers(events$c)\n        })\n    ];\n\n    const getData = (event) => Optional.from(SugarPosition(event.x, event.y));\n    const getDelta = (old, nu) => SugarPosition(nu.left - old.left, nu.top - old.top);\n\n    var PointerData = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        getData: getData,\n        getDelta: getDelta\n    });\n\n    const isLeftClick = (e) => e.button === 0;\n    const events$b = (dragConfig, dragState, updateStartState) => {\n        return [\n            run$1(pointerdown(), (component, simulatedEvent) => {\n                const raw = simulatedEvent.event.raw;\n                if (!isLeftClick(raw)) {\n                    return;\n                }\n                if (dragState.getStartData().isNone()) {\n                    simulatedEvent.stop();\n                    component.element.dom.setPointerCapture(raw.pointerId);\n                    dragState.setActivePointerId(raw.pointerId);\n                    updateStartState(component);\n                }\n            }),\n            run$1(pointermove(), (component, simulatedEvent) => {\n                const pointerId = simulatedEvent.event.raw.pointerId;\n                lift2(dragState.getStartData(), dragState.getActivePointerId(), (_startData, activePointerId) => {\n                    if (pointerId === activePointerId) {\n                        move(component, dragConfig, dragState, PointerData, simulatedEvent.event);\n                    }\n                });\n            }),\n            run$1(pointerup(), (component, simulatedEvent) => {\n                const pointerId = simulatedEvent.event.raw.pointerId;\n                lift2(dragState.getStartData(), dragState.getActivePointerId(), (_startData, activePointerId) => {\n                    if (pointerId === activePointerId) {\n                        component.element.dom.releasePointerCapture(pointerId);\n                        stop$1(component, Optional.none(), dragConfig, dragState);\n                    }\n                });\n            }),\n            // Safety net \u2014 if capture is lost unexpectedly.\n            // It sometimes happens that pointer capture is lost without pointerup event being emitted.\n            // I could observe that using touchpad in chrome\n            run$1(lostpointercapture(), (component) => {\n                dragState.getStartData().each(() => {\n                    stop$1(component, Optional.none(), dragConfig, dragState);\n                });\n            })\n        ];\n    };\n    const schema$o = [\n        ...schema$s,\n        output$1('dragger', {\n            handlers: handlers(events$b)\n        })\n    ];\n\n    const mouse = schema$r;\n    const touch = schema$q;\n    const mouseOrTouch = schema$p;\n    const pointer = schema$o;\n\n    var DraggingBranches = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        mouse: mouse,\n        touch: touch,\n        mouseOrTouch: mouseOrTouch,\n        pointer: pointer\n    });\n\n    // NOTE: mode refers to the way that information is retrieved from\n    // the user interaction. It can be things like MouseData, TouchData etc.\n    const init$b = () => {\n        // Dragging operates on the difference between the previous user\n        // interaction and the next user interaction. Therefore, we store\n        // the previous interaction so that we can compare it.\n        const previous = value$2();\n        // Dragging requires calculating the bounds, so we store that data initially\n        // to reduce the amount of computation each mouse movement\n        const startData = value$2();\n        // In a multitouch environment, `pointerId` is used to distinguish pointers\n        // (e.g. different fingers on a touchscreen).\n        // This property is only used by pointer-event branches.\n        const activePointerId = value$2();\n        const reset = () => {\n            previous.clear();\n            startData.clear();\n            activePointerId.clear();\n        };\n        // Return position delta between previous position and nu position,\n        // or None if this is the first. Set the previous position to nu.\n        const calculateDelta = (mode, nu) => {\n            const result = previous.get().map((old) => mode.getDelta(old, nu));\n            previous.set(nu);\n            return result;\n        };\n        // NOTE: This dragEvent is the DOM touch event or mouse event\n        const update = (mode, dragEvent) => mode.getData(dragEvent).bind((nuData) => calculateDelta(mode, nuData));\n        const setStartData = (data) => {\n            startData.set(data);\n        };\n        const getStartData = () => startData.get();\n        const setActivePointerId = (id) => {\n            activePointerId.set(id);\n        };\n        const getActivePointerId = () => activePointerId.get();\n        const readState = constant$1({});\n        return nu$4({\n            readState,\n            reset,\n            update,\n            getStartData,\n            setStartData,\n            setActivePointerId,\n            getActivePointerId\n        });\n    };\n\n    var DragState = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        init: init$b\n    });\n\n    const Dragging = createModes({\n        branchKey: 'mode',\n        branches: DraggingBranches,\n        name: 'dragging',\n        active: {\n            events: (dragConfig, dragState) => {\n                const dragger = dragConfig.dragger;\n                return dragger.handlers(dragConfig, dragState);\n            }\n        },\n        extra: {\n            // Extra. Does not need component as input.\n            snap: (sConfig) => ({\n                sensor: sConfig.sensor,\n                range: sConfig.range,\n                output: sConfig.output,\n                extra: Optional.from(sConfig.extra)\n            })\n        },\n        state: DragState,\n        apis: DraggingApis\n    });\n\n    const ariaElements = [\n        'input',\n        'textarea'\n    ];\n    const isAriaElement = (elem) => {\n        const name = name$3(elem);\n        return contains$2(ariaElements, name);\n    };\n    const markValid = (component, invalidConfig) => {\n        const elem = invalidConfig.getRoot(component).getOr(component.element);\n        remove$3(elem, invalidConfig.invalidClass);\n        invalidConfig.notify.each((notifyInfo) => {\n            if (isAriaElement(component.element)) {\n                set$9(component.element, 'aria-invalid', false);\n            }\n            notifyInfo.getContainer(component).each((container) => {\n                set$8(container, notifyInfo.validHtml);\n            });\n            notifyInfo.onValid(component);\n        });\n    };\n    const markInvalid = (component, invalidConfig, invalidState, text) => {\n        const elem = invalidConfig.getRoot(component).getOr(component.element);\n        add$2(elem, invalidConfig.invalidClass);\n        invalidConfig.notify.each((notifyInfo) => {\n            if (isAriaElement(component.element)) {\n                set$9(component.element, 'aria-invalid', true);\n            }\n            notifyInfo.getContainer(component).each((container) => {\n                // TODO: Should we just use Text here, not HTML?\n                set$8(container, text);\n            });\n            notifyInfo.onInvalid(component, text);\n        });\n    };\n    const query = (component, invalidConfig, _invalidState) => invalidConfig.validator.fold(() => Future.pure(Result.value(true)), (validatorInfo) => validatorInfo.validate(component));\n    const run = (component, invalidConfig, invalidState) => {\n        invalidConfig.notify.each((notifyInfo) => {\n            notifyInfo.onValidate(component);\n        });\n        return query(component, invalidConfig).map((valid) => {\n            if (component.getSystem().isConnected()) {\n                return valid.fold((err) => {\n                    markInvalid(component, invalidConfig, invalidState, err);\n                    return Result.error(err);\n                }, (v) => {\n                    markValid(component, invalidConfig);\n                    return Result.value(v);\n                });\n            }\n            else {\n                return Result.error('No longer in system');\n            }\n        });\n    };\n    const isInvalid = (component, invalidConfig) => {\n        const elem = invalidConfig.getRoot(component).getOr(component.element);\n        return has(elem, invalidConfig.invalidClass);\n    };\n\n    var InvalidateApis = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        markValid: markValid,\n        markInvalid: markInvalid,\n        query: query,\n        run: run,\n        isInvalid: isInvalid\n    });\n\n    const events$a = (invalidConfig, invalidState) => invalidConfig.validator.map((validatorInfo) => derive$2([\n        run$1(validatorInfo.onEvent, (component) => {\n            run(component, invalidConfig, invalidState).get(identity);\n        })\n    ].concat(validatorInfo.validateOnLoad ? [\n        runOnAttached((component) => {\n            run(component, invalidConfig, invalidState).get(noop);\n        })\n    ] : []))).getOr({});\n\n    var ActiveInvalidate = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        events: events$a\n    });\n\n    var InvalidateSchema = [\n        required$1('invalidClass'),\n        defaulted('getRoot', Optional.none),\n        // TODO: Completely rework the notify API\n        optionObjOf('notify', [\n            defaulted('aria', 'alert'),\n            // Maybe we should use something else.\n            defaulted('getContainer', Optional.none),\n            defaulted('validHtml', ''),\n            onHandler('onValid'),\n            onHandler('onInvalid'),\n            onHandler('onValidate')\n        ]),\n        optionObjOf('validator', [\n            required$1('validate'),\n            defaulted('onEvent', 'input'),\n            defaulted('validateOnLoad', true)\n        ])\n    ];\n\n    const onLoad$4 = (component, repConfig, repState) => {\n        repConfig.store.manager.onLoad(component, repConfig, repState);\n    };\n    const onUnload$2 = (component, repConfig, repState) => {\n        repConfig.store.manager.onUnload(component, repConfig, repState);\n    };\n    const setValue$3 = (component, repConfig, repState, data) => {\n        repConfig.store.manager.setValue(component, repConfig, repState, data);\n    };\n    const getValue$3 = (component, repConfig, repState) => repConfig.store.manager.getValue(component, repConfig, repState);\n    const getState$2 = (component, repConfig, repState) => repState;\n\n    var RepresentApis = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        onLoad: onLoad$4,\n        onUnload: onUnload$2,\n        setValue: setValue$3,\n        getValue: getValue$3,\n        getState: getState$2\n    });\n\n    const events$9 = (repConfig, repState) => {\n        const es = repConfig.resetOnDom ? [\n            runOnAttached((comp, _se) => {\n                onLoad$4(comp, repConfig, repState);\n            }),\n            runOnDetached((comp, _se) => {\n                onUnload$2(comp, repConfig, repState);\n            })\n        ] : [\n            loadEvent(repConfig, repState, onLoad$4)\n        ];\n        return derive$2(es);\n    };\n\n    var ActiveRepresenting = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        events: events$9\n    });\n\n    const memory$1 = () => {\n        const data = Cell(null);\n        const readState = () => ({\n            mode: 'memory',\n            value: data.get()\n        });\n        const isNotSet = () => data.get() === null;\n        const clear = () => {\n            data.set(null);\n        };\n        return nu$4({\n            set: data.set,\n            get: data.get,\n            isNotSet,\n            clear,\n            readState\n        });\n    };\n    const manual = () => {\n        const readState = noop;\n        return nu$4({\n            readState\n        });\n    };\n    const dataset = () => {\n        const dataByValue = Cell({});\n        const dataByText = Cell({});\n        const readState = () => ({\n            mode: 'dataset',\n            dataByValue: dataByValue.get(),\n            dataByText: dataByText.get()\n        });\n        const clear = () => {\n            dataByValue.set({});\n            dataByText.set({});\n        };\n        // itemString can be matching value or text.\n        // TODO: type problem - impossible to correctly return value when type parameter only exists in return type\n        const lookup = (itemString) => get$h(dataByValue.get(), itemString).orThunk(() => get$h(dataByText.get(), itemString));\n        const update = (items) => {\n            const currentDataByValue = dataByValue.get();\n            const currentDataByText = dataByText.get();\n            const newDataByValue = {};\n            const newDataByText = {};\n            each$1(items, (item) => {\n                newDataByValue[item.value] = item;\n                get$h(item, 'meta').each((meta) => {\n                    get$h(meta, 'text').each((text) => {\n                        newDataByText[text] = item;\n                    });\n                });\n            });\n            dataByValue.set({\n                ...currentDataByValue,\n                ...newDataByValue\n            });\n            dataByText.set({\n                ...currentDataByText,\n                ...newDataByText\n            });\n        };\n        return nu$4({\n            readState,\n            lookup,\n            update,\n            clear\n        });\n    };\n    const init$a = (spec) => spec.store.manager.state(spec);\n\n    var RepresentState = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        memory: memory$1,\n        dataset: dataset,\n        manual: manual,\n        init: init$a\n    });\n\n    const setValue$2 = (component, repConfig, repState, data) => {\n        const store = repConfig.store;\n        repState.update([data]);\n        store.setValue(component, data);\n        repConfig.onSetValue(component, data);\n    };\n    const getValue$2 = (component, repConfig, repState) => {\n        const store = repConfig.store;\n        const key = store.getDataKey(component);\n        return repState.lookup(key).getOrThunk(() => store.getFallbackEntry(key));\n    };\n    const onLoad$3 = (component, repConfig, repState) => {\n        const store = repConfig.store;\n        store.initialValue.each((data) => {\n            setValue$2(component, repConfig, repState, data);\n        });\n    };\n    const onUnload$1 = (component, repConfig, repState) => {\n        repState.clear();\n    };\n    var DatasetStore = [\n        option$3('initialValue'),\n        required$1('getFallbackEntry'),\n        required$1('getDataKey'),\n        required$1('setValue'),\n        output$1('manager', {\n            setValue: setValue$2,\n            getValue: getValue$2,\n            onLoad: onLoad$3,\n            onUnload: onUnload$1,\n            state: dataset\n        })\n    ];\n\n    const getValue$1 = (component, repConfig, _repState) => repConfig.store.getValue(component);\n    const setValue$1 = (component, repConfig, _repState, data) => {\n        repConfig.store.setValue(component, data);\n        repConfig.onSetValue(component, data);\n    };\n    const onLoad$2 = (component, repConfig, _repState) => {\n        repConfig.store.initialValue.each((data) => {\n            repConfig.store.setValue(component, data);\n        });\n    };\n    var ManualStore = [\n        required$1('getValue'),\n        defaulted('setValue', noop),\n        option$3('initialValue'),\n        output$1('manager', {\n            setValue: setValue$1,\n            getValue: getValue$1,\n            onLoad: onLoad$2,\n            onUnload: noop,\n            state: NoState.init\n        })\n    ];\n\n    const setValue = (component, repConfig, repState, data) => {\n        repState.set(data);\n        repConfig.onSetValue(component, data);\n    };\n    const getValue = (component, repConfig, repState) => repState.get();\n    const onLoad$1 = (component, repConfig, repState) => {\n        repConfig.store.initialValue.each((initVal) => {\n            if (repState.isNotSet()) {\n                repState.set(initVal);\n            }\n        });\n    };\n    const onUnload = (component, repConfig, repState) => {\n        repState.clear();\n    };\n    var MemoryStore = [\n        option$3('initialValue'),\n        output$1('manager', {\n            setValue,\n            getValue,\n            onLoad: onLoad$1,\n            onUnload,\n            state: memory$1\n        })\n    ];\n\n    var RepresentSchema = [\n        defaultedOf('store', { mode: 'memory' }, choose$1('mode', {\n            memory: MemoryStore,\n            manual: ManualStore,\n            dataset: DatasetStore\n        })),\n        onHandler('onSetValue'),\n        defaulted('resetOnDom', false)\n    ];\n\n    // The self-reference is clumsy.\n    const Representing = create$3({\n        fields: RepresentSchema,\n        name: 'representing',\n        active: ActiveRepresenting,\n        apis: RepresentApis,\n        extra: {\n            setValueFrom: (component, source) => {\n                const value = Representing.getValue(source);\n                Representing.setValue(component, value);\n            }\n        },\n        state: RepresentState\n    });\n\n    const Invalidating = create$3({\n        fields: InvalidateSchema,\n        name: 'invalidating',\n        active: ActiveInvalidate,\n        apis: InvalidateApis,\n        extra: {\n            // Note, this requires representing to be on the validatee\n            validation: (validator) => {\n                return (component) => {\n                    const v = Representing.getValue(component);\n                    return Future.pure(validator(v));\n                };\n            }\n        }\n    });\n\n    const exhibit$4 = (base, posConfig) => nu$2({\n        classes: [],\n        styles: posConfig.useFixed() ? {} : { position: 'relative' }\n    });\n\n    var ActivePosition = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        exhibit: exhibit$4\n    });\n\n    const adt$3 = Adt.generate([\n        { none: [] },\n        { relative: ['x', 'y', 'width', 'height'] },\n        { fixed: ['x', 'y', 'width', 'height'] }\n    ]);\n    const positionWithDirection = (posName, decision, x, y, width, height) => {\n        const decisionRect = decision.rect;\n        const decisionX = decisionRect.x - x;\n        const decisionY = decisionRect.y - y;\n        const decisionWidth = decisionRect.width;\n        const decisionHeight = decisionRect.height;\n        const decisionRight = width - (decisionX + decisionWidth);\n        const decisionBottom = height - (decisionY + decisionHeight);\n        const left = Optional.some(decisionX);\n        const top = Optional.some(decisionY);\n        const right = Optional.some(decisionRight);\n        const bottom = Optional.some(decisionBottom);\n        const none = Optional.none();\n        return cata$1(decision.direction, () => NuPositionCss(posName, left, top, none, none), // southeast\n        () => NuPositionCss(posName, none, top, right, none), // southwest\n        () => NuPositionCss(posName, left, none, none, bottom), // northeast\n        () => NuPositionCss(posName, none, none, right, bottom), // northwest\n        () => NuPositionCss(posName, left, top, none, none), // south\n        () => NuPositionCss(posName, left, none, none, bottom), // north\n        () => NuPositionCss(posName, left, top, none, none), // east\n        () => NuPositionCss(posName, none, top, right, none) // west\n        );\n    };\n    const reposition = (origin, decision) => origin.fold(() => {\n        const decisionRect = decision.rect;\n        return NuPositionCss('absolute', Optional.some(decisionRect.x), Optional.some(decisionRect.y), Optional.none(), Optional.none());\n    }, (x, y, width, height) => {\n        return positionWithDirection('absolute', decision, x, y, width, height);\n    }, (x, y, width, height) => {\n        return positionWithDirection('fixed', decision, x, y, width, height);\n    });\n    const toBox = (origin, element) => {\n        const rel = curry(find$2, element);\n        const position = origin.fold(rel, rel, () => {\n            const scroll = get$b();\n            // TODO: Make adding the scroll in OuterPosition.find optional.\n            return find$2(element).translate(-scroll.left, -scroll.top);\n        });\n        const width = getOuter(element);\n        const height = getOuter$1(element);\n        return bounds(position.left, position.top, width, height);\n    };\n    const viewport = (origin, optBounds) => optBounds.fold(\n    /* There are no bounds supplied */\n    () => origin.fold(win, win, bounds), (bounds$1) => \n    /* Use any bounds supplied or remove the scroll position of the bounds for fixed. */\n    origin.fold(constant$1(bounds$1), constant$1(bounds$1), () => {\n        const pos = translate$1(origin, bounds$1.x, bounds$1.y);\n        return bounds(pos.left, pos.top, bounds$1.width, bounds$1.height);\n    }));\n    const translate$1 = (origin, x, y) => {\n        const pos = SugarPosition(x, y);\n        const removeScroll = () => {\n            const outerScroll = get$b();\n            return pos.translate(-outerScroll.left, -outerScroll.top);\n        };\n        // This could use cata if it wasn't a circular reference\n        return origin.fold(constant$1(pos), constant$1(pos), removeScroll);\n    };\n    const cata = (subject, onNone, onRelative, onFixed) => subject.fold(onNone, onRelative, onFixed);\n    adt$3.none;\n    const relative = adt$3.relative;\n    const fixed = adt$3.fixed;\n\n    const anchor = (anchorBox, origin) => ({\n        anchorBox,\n        origin\n    });\n    const box = (anchorBox, origin) => anchor(anchorBox, origin);\n\n    const adt$2 = Adt.generate([\n        { fit: ['reposition'] },\n        { nofit: ['reposition', 'visibleW', 'visibleH', 'isVisible'] }\n    ]);\n    /**\n     * This will attempt to determine if the box will fit within the specified bounds or if it needs to be repositioned.\n     * It will return the following details:\n     *  - if the original rect was in bounds (originInBounds & sizeInBounds). This is used to determine if we fitted\n     *    without having to make adjustments.\n     *  - the height and width that would be visible in the original location. (ie the overlap between the rect and\n     *    the bounds or the distance between the boxes if there is no overlap)\n     */\n    const determinePosition = (box, bounds) => {\n        const { x: boundsX, y: boundsY, right: boundsRight, bottom: boundsBottom } = bounds;\n        const { x, y, right, bottom, width, height } = box;\n        // simple checks for \"is the top left inside the view\"\n        const xInBounds = x >= boundsX && x <= boundsRight;\n        const yInBounds = y >= boundsY && y <= boundsBottom;\n        const originInBounds = xInBounds && yInBounds;\n        // simple checks for \"is the bottom right inside the view\"\n        const rightInBounds = right <= boundsRight && right >= boundsX;\n        const bottomInBounds = bottom <= boundsBottom && bottom >= boundsY;\n        const sizeInBounds = rightInBounds && bottomInBounds;\n        // measure how much of the width and height are visible. This should never be larger than the actual width or height\n        // however it can be a negative value when offscreen. These values are generally are only needed for the \"nofit\" case\n        const visibleW = Math.min(width, x >= boundsX ? boundsRight - x : right - boundsX);\n        const visibleH = Math.min(height, y >= boundsY ? boundsBottom - y : bottom - boundsY);\n        return {\n            originInBounds,\n            sizeInBounds,\n            visibleW,\n            visibleH\n        };\n    };\n    /**\n     * This will attempt to calculate and adjust the position of the box so that is stays within the specified bounds.\n     * The end result will be a new restricted box of where it can safely be placed within the bounds.\n     */\n    const calcReposition = (box, bounds$1) => {\n        const { x: boundsX, y: boundsY, right: boundsRight, bottom: boundsBottom } = bounds$1;\n        const { x, y, width, height } = box;\n        // measure the maximum x and y taking into account the height and width of the box\n        const maxX = Math.max(boundsX, boundsRight - width);\n        const maxY = Math.max(boundsY, boundsBottom - height);\n        // Futz with the X value to ensure that we're not off the left or right of the screen\n        const restrictedX = clamp(x, boundsX, maxX);\n        // Futz with the Y value to ensure that we're not off the top or bottom of the screen\n        const restrictedY = clamp(y, boundsY, maxY);\n        // Determine the new height and width based on the restricted X/Y to keep the element in bounds\n        const restrictedWidth = Math.min(restrictedX + width, boundsRight) - restrictedX;\n        const restrictedHeight = Math.min(restrictedY + height, boundsBottom) - restrictedY;\n        return bounds(restrictedX, restrictedY, restrictedWidth, restrictedHeight);\n    };\n    /**\n     * Determine the maximum height and width available for where the box is positioned in the bounds, making sure\n     * to account for which direction it's rendering in.\n     */\n    const calcMaxSizes = (direction, box, bounds) => {\n        // Futz with the \"height\" of the popup to ensure if it doesn't fit it's capped at the available height.\n        const upAvailable = constant$1(box.bottom - bounds.y);\n        const downAvailable = constant$1(bounds.bottom - box.y);\n        const maxHeight = cataVertical(direction, downAvailable, /* middle */ downAvailable, upAvailable);\n        // Futz with the \"width\" of the popup to ensure if it doesn't fit it's capped at the available width.\n        const westAvailable = constant$1(box.right - bounds.x);\n        const eastAvailable = constant$1(bounds.right - box.x);\n        const maxWidth = cataHorizontal(direction, eastAvailable, /* middle */ eastAvailable, westAvailable);\n        return {\n            maxWidth,\n            maxHeight\n        };\n    };\n    const attempt = (candidate, width, height, bounds$1) => {\n        const bubble = candidate.bubble;\n        const bubbleOffset = bubble.offset;\n        // adjust the bounds to account for the layout and bubble restrictions\n        const adjustedBounds = adjustBounds(bounds$1, candidate.restriction, bubbleOffset);\n        // candidate position is excluding the bubble, so add those values as well\n        const newX = candidate.x + bubbleOffset.left;\n        const newY = candidate.y + bubbleOffset.top;\n        const box = bounds(newX, newY, width, height);\n        // determine the position of the box in relation to the bounds\n        const { originInBounds, sizeInBounds, visibleW, visibleH } = determinePosition(box, adjustedBounds);\n        // restrict the box if it won't fit in the bounds\n        const fits = originInBounds && sizeInBounds;\n        const fittedBox = fits ? box : calcReposition(box, adjustedBounds);\n        // Determine if the box is at least partly visible in the bounds after applying the restrictions\n        const isPartlyVisible = fittedBox.width > 0 && fittedBox.height > 0;\n        // Determine the maximum height and width available in the bounds\n        const { maxWidth, maxHeight } = calcMaxSizes(candidate.direction, fittedBox, bounds$1);\n        const reposition = {\n            rect: fittedBox,\n            maxHeight,\n            maxWidth,\n            direction: candidate.direction,\n            placement: candidate.placement,\n            classes: {\n                on: bubble.classesOn,\n                off: bubble.classesOff\n            },\n            layout: candidate.label,\n            testY: newY\n        };\n        // useful debugging that I don't want to lose\n        // console.log(candidate.label);\n        // console.table([{\n        //   newY,\n        //   limitY: fittedBox.y,\n        //   boundsY: bounds.y,\n        //   boundsBottom: bounds.bottom,\n        //   newX,\n        //   limitX: fittedBox.x,\n        //   boundsX: bounds.x,\n        //   boundsRight: bounds.right,\n        //   candidateX: candidate.x,\n        //   candidateY: candidate.y,\n        //   width,\n        //   height,\n        //   isPartlyVisible\n        // }]);\n        // console.log(`maxWidth: ${maxWidth}, visibleW: ${visibleW}`);\n        // console.log(`maxHeight: ${maxHeight}, visibleH: ${visibleH}`);\n        // console.log('originInBounds:', originInBounds);\n        // console.log('sizeInBounds:', sizeInBounds);\n        // console.log(originInBounds && sizeInBounds ? 'fit' : 'nofit');\n        // Take special note that we don't use the futz values in the nofit case; whether this position is a good fit is separate\n        // to ensuring that if we choose it the popup is actually on screen properly.\n        return fits || candidate.alwaysFit ? adt$2.fit(reposition) : adt$2.nofit(reposition, visibleW, visibleH, isPartlyVisible);\n    };\n    /**\n     * Attempts to fit a box (generally a menu).\n     *\n     * candidates: an array of layout generators, generally obtained via api.Layout or api.LinkedLayout\n     * anchorBox: the box on screen that triggered the menu, we must touch one of the edges as defined by the candidate layouts\n     * elementBox: the popup (only width and height matter)\n     * bubbles: the bubbles for the popup (see api.Bubble)\n     * bounds: the screen\n     */\n    const attempts = (element, candidates, anchorBox, elementBox, bubbles, bounds) => {\n        const panelWidth = elementBox.width;\n        const panelHeight = elementBox.height;\n        const attemptBestFit = (layout, reposition, visibleW, visibleH, isVisible) => {\n            const next = layout(anchorBox, elementBox, bubbles, element, bounds);\n            const attemptLayout = attempt(next, panelWidth, panelHeight, bounds);\n            return attemptLayout.fold(constant$1(attemptLayout), (newReposition, newVisibleW, newVisibleH, newIsVisible) => {\n                // console.log(`label: ${next.label}, newVisibleW: ${newVisibleW}, visibleW: ${visibleW}, newVisibleH: ${newVisibleH}, visibleH: ${visibleH}, newIsVisible: ${newIsVisible}, isVisible: ${isVisible}`);\n                const improved = isVisible === newIsVisible ? (newVisibleH > visibleH || newVisibleW > visibleW) : (!isVisible && newIsVisible);\n                // console.log('improved? ', improved);\n                return improved ? attemptLayout : adt$2.nofit(reposition, visibleW, visibleH, isVisible);\n            });\n        };\n        const abc = foldl(candidates, (b, a) => {\n            const bestNext = curry(attemptBestFit, a);\n            return b.fold(constant$1(b), bestNext);\n        }, \n        // fold base case: No candidates, it's never going to be correct, so do whatever\n        adt$2.nofit({\n            rect: anchorBox,\n            maxHeight: elementBox.height,\n            maxWidth: elementBox.width,\n            direction: southeast$3(),\n            placement: \"southeast\" /* Placement.Southeast */,\n            classes: {\n                on: [],\n                off: []\n            },\n            layout: 'none',\n            testY: anchorBox.y\n        }, -1, -1, false));\n        // unwrapping 'reposition' from the adt, for both fit & nofit the first arg is the one we need,\n        // so we can cheat and use Fun.identity\n        return abc.fold(identity, identity);\n    };\n\n    const properties = ['top', 'bottom', 'right', 'left'];\n    const timerAttr = 'data-alloy-transition-timer';\n    const isTransitioning$1 = (element, transition) => hasAll(element, transition.classes);\n    const shouldApplyTransitionCss = (transition, decision, lastPlacement) => {\n        // Don't apply transitions if there was no previous placement as it's transitioning from offscreen\n        return lastPlacement.exists((placer) => {\n            const mode = transition.mode;\n            return mode === 'all' ? true : placer[mode] !== decision[mode];\n        });\n    };\n    const hasChanges = (position, intermediate) => {\n        // Round to 3 decimal points\n        const round = (value) => parseFloat(value).toFixed(3);\n        return find$4(intermediate, (value, key) => {\n            const newValue = position[key].map(round);\n            const val = value.map(round);\n            return !equals(newValue, val);\n        }).isSome();\n    };\n    const getTransitionDuration = (element) => {\n        const get = (name) => {\n            const style = get$e(element, name);\n            const times = style.split(/\\s*,\\s*/);\n            return filter$2(times, isNotEmpty);\n        };\n        const parse = (value) => {\n            if (isString(value) && /^[\\d.]+/.test(value)) {\n                const num = parseFloat(value);\n                return endsWith(value, 'ms') ? num : num * 1000;\n            }\n            else {\n                return 0;\n            }\n        };\n        const delay = get('transition-delay');\n        const duration = get('transition-duration');\n        return foldl(duration, (acc, dur, i) => {\n            const time = parse(delay[i]) + parse(dur);\n            return Math.max(acc, time);\n        }, 0);\n    };\n    const setupTransitionListeners = (element, transition) => {\n        const transitionEnd = unbindable();\n        const transitionCancel = unbindable();\n        let timer;\n        const isSourceTransition = (e) => {\n            // Ensure the transition event isn't from a pseudo element\n            const pseudoElement = e.raw.pseudoElement ?? '';\n            return eq(e.target, element) && isEmpty(pseudoElement) && contains$2(properties, e.raw.propertyName);\n        };\n        const transitionDone = (e) => {\n            if (isNullable(e) || isSourceTransition(e)) {\n                transitionEnd.clear();\n                transitionCancel.clear();\n                // Only cleanup the class/timer on transitionend not on a cancel. This is done as cancel\n                // means the element has been repositioned and would need to keep transitioning\n                const type = e?.raw.type;\n                if (isNullable(type) || type === transitionend()) {\n                    clearTimeout(timer);\n                    remove$8(element, timerAttr);\n                    remove$2(element, transition.classes);\n                }\n            }\n        };\n        const transitionStart = bind$1(element, transitionstart(), (e) => {\n            if (isSourceTransition(e)) {\n                transitionStart.unbind();\n                transitionEnd.set(bind$1(element, transitionend(), transitionDone));\n                transitionCancel.set(bind$1(element, transitioncancel(), transitionDone));\n            }\n        });\n        // Request the next animation frame so we can roughly determine when the transition starts and then ensure\n        // the transition is cleaned up. In addition add ~17ms to the delay as that's about about 1 frame at 60fps\n        const duration = getTransitionDuration(element);\n        window.requestAnimationFrame(() => {\n            timer = setTimeout(transitionDone, duration + 17);\n            set$9(element, timerAttr, timer);\n        });\n    };\n    const startTransitioning = (element, transition) => {\n        add$1(element, transition.classes);\n        // Clear any existing cleanup timers\n        getOpt(element, timerAttr).each((timerId) => {\n            clearTimeout(parseInt(timerId, 10));\n            remove$8(element, timerAttr);\n        });\n        setupTransitionListeners(element, transition);\n    };\n    const applyTransitionCss = (element, origin, position, transition, decision, lastPlacement) => {\n        const shouldTransition = shouldApplyTransitionCss(transition, decision, lastPlacement);\n        if (shouldTransition || isTransitioning$1(element, transition)) {\n            // Set the new position first so we can calculate the computed position\n            set$7(element, 'position', position.position);\n            // Get the computed positions for the current element based on the new position CSS being applied\n            const rect = toBox(origin, element);\n            const intermediatePosition = reposition(origin, { ...decision, rect });\n            const intermediateCssOptions = mapToObject(properties, (prop) => intermediatePosition[prop]);\n            // Apply the intermediate styles and transition classes if something has changed\n            if (hasChanges(position, intermediateCssOptions)) {\n                setOptions(element, intermediateCssOptions);\n                if (shouldTransition) {\n                    startTransitioning(element, transition);\n                }\n                reflow(element);\n            }\n        }\n        else {\n            remove$2(element, transition.classes);\n        }\n    };\n\n    /*\n     * This is the old repartee API. It is retained in a similar structure to the original form,\n     * in case we decide to bring back the flexibility of working with non-standard positioning.\n     */\n    const elementSize = (p) => ({\n        width: Math.ceil(getOuter(p)),\n        height: getOuter$1(p)\n    });\n    const layout = (anchorBox, element, bubbles, options) => {\n        // clear the potentially limiting factors before measuring\n        remove$6(element, 'max-height');\n        remove$6(element, 'max-width');\n        const elementBox = elementSize(element);\n        return attempts(element, options.preference, anchorBox, elementBox, bubbles, options.bounds);\n    };\n    const setClasses = (element, decision) => {\n        const classInfo = decision.classes;\n        remove$2(element, classInfo.off);\n        add$1(element, classInfo.on);\n    };\n    /*\n     * maxHeightFunction is a MaxHeight instance.\n     * max-height is usually the distance between the edge of the popup and the screen; top of popup to bottom of screen for south, bottom of popup to top of screen for north.\n     *\n     * There are a few cases where we specifically don't want a max-height, which is why it's optional.\n     */\n    const setHeight = (element, decision, options) => {\n        // The old API enforced MaxHeight.anchored() for fixed position. That no longer seems necessary.\n        const maxHeightFunction = options.maxHeightFunction;\n        maxHeightFunction(element, decision.maxHeight);\n    };\n    const setWidth = (element, decision, options) => {\n        const maxWidthFunction = options.maxWidthFunction;\n        maxWidthFunction(element, decision.maxWidth);\n    };\n    const position$2 = (element, decision, options) => {\n        // This is a point of difference between Alloy and Repartee. Repartee appears to use Measure to calculate the available space for fixed origin\n        // That is not ported yet.\n        const positionCss = reposition(options.origin, decision);\n        options.transition.each((transition) => {\n            applyTransitionCss(element, options.origin, positionCss, transition, decision, options.lastPlacement);\n        });\n        applyPositionCss(element, positionCss);\n    };\n    const setPlacement = (element, decision) => {\n        setPlacement$1(element, decision.placement);\n    };\n\n    const defaultOr = (options, key, dephault) => options[key] === undefined ? dephault : options[key];\n    // This takes care of everything when you are positioning UI that can go anywhere on the screen\n    const simple = (anchor, element, bubble, layouts, lastPlacement, optBounds, overrideOptions, transition) => {\n        // the only supported override at the moment. Once relative has been deleted, maybe this can be optional in the bag\n        const maxHeightFunction = defaultOr(overrideOptions, 'maxHeightFunction', anchored());\n        const maxWidthFunction = defaultOr(overrideOptions, 'maxWidthFunction', noop);\n        const anchorBox = anchor.anchorBox;\n        const origin = anchor.origin;\n        const options = {\n            bounds: viewport(origin, optBounds),\n            origin,\n            preference: layouts,\n            maxHeightFunction,\n            maxWidthFunction,\n            lastPlacement,\n            transition\n        };\n        return go(anchorBox, element, bubble, options);\n    };\n    // This is the old public API. If we ever need full customisability again, this is how to expose it\n    const go = (anchorBox, element, bubble, options) => {\n        const decision = layout(anchorBox, element, bubble, options);\n        position$2(element, decision, options);\n        setPlacement(element, decision);\n        setClasses(element, decision);\n        setHeight(element, decision, options);\n        setWidth(element, decision, options);\n        return {\n            layout: decision.layout,\n            placement: decision.placement\n        };\n    };\n\n    const nu$1 = identity;\n\n    const schema$n = () => optionObjOf('layouts', [\n        required$1('onLtr'),\n        required$1('onRtl'),\n        option$3('onBottomLtr'),\n        option$3('onBottomRtl')\n    ]);\n    const get$1 = (elem, info, defaultLtr, defaultRtl, defaultBottomLtr, defaultBottomRtl, dirElement) => {\n        const isBottomToTop = dirElement.map(isBottomToTopDir).getOr(false);\n        const customLtr = info.layouts.map((ls) => ls.onLtr(elem));\n        const customRtl = info.layouts.map((ls) => ls.onRtl(elem));\n        const ltr = isBottomToTop ?\n            info.layouts.bind((ls) => ls.onBottomLtr.map((f) => f(elem)))\n                .or(customLtr)\n                .getOr(defaultBottomLtr) :\n            customLtr.getOr(defaultLtr);\n        const rtl = isBottomToTop ?\n            info.layouts.bind((ls) => ls.onBottomRtl.map((f) => f(elem)))\n                .or(customRtl)\n                .getOr(defaultBottomRtl) :\n            customRtl.getOr(defaultRtl);\n        const f = onDirection(ltr, rtl);\n        return f(elem);\n    };\n\n    const placement$4 = (component, anchorInfo, origin) => {\n        const hotspot = anchorInfo.hotspot;\n        const anchorBox = toBox(origin, hotspot.element);\n        const layouts = get$1(component.element, anchorInfo, belowOrAbove(), belowOrAboveRtl(), aboveOrBelow(), aboveOrBelowRtl(), Optional.some(anchorInfo.hotspot.element));\n        return Optional.some(nu$1({\n            anchorBox,\n            bubble: anchorInfo.bubble.getOr(fallback()),\n            overrides: anchorInfo.overrides,\n            layouts\n        }));\n    };\n    var HotspotAnchor = [\n        required$1('hotspot'),\n        option$3('bubble'),\n        defaulted('overrides', {}),\n        schema$n(),\n        output$1('placement', placement$4)\n    ];\n\n    const placement$3 = (component, anchorInfo, origin) => {\n        const pos = translate$1(origin, anchorInfo.x, anchorInfo.y);\n        const anchorBox = bounds(pos.left, pos.top, anchorInfo.width, anchorInfo.height);\n        const layouts = get$1(component.element, anchorInfo, all$2(), allRtl$1(), \n        // No default bottomToTop layouts currently needed\n        all$2(), allRtl$1(), Optional.none());\n        return Optional.some(nu$1({\n            anchorBox,\n            bubble: anchorInfo.bubble,\n            overrides: anchorInfo.overrides,\n            layouts\n        }));\n    };\n    var MakeshiftAnchor = [\n        required$1('x'),\n        required$1('y'),\n        defaulted('height', 0),\n        defaulted('width', 0),\n        defaulted('bubble', fallback()),\n        defaulted('overrides', {}),\n        schema$n(),\n        output$1('placement', placement$3)\n    ];\n\n    const adt$1 = Adt.generate([\n        { screen: ['point'] },\n        { absolute: ['point', 'scrollLeft', 'scrollTop'] }\n    ]);\n    const toFixed = (pos) => \n    // TODO: Use new ADT methods\n    pos.fold(identity, (point, scrollLeft, scrollTop) => point.translate(-scrollLeft, -scrollTop));\n    const toAbsolute = (pos) => pos.fold(identity, identity);\n    const sum = (points) => foldl(points, (b, a) => b.translate(a.left, a.top), SugarPosition(0, 0));\n    const sumAsFixed = (positions) => {\n        const points = map$2(positions, toFixed);\n        return sum(points);\n    };\n    const sumAsAbsolute = (positions) => {\n        const points = map$2(positions, toAbsolute);\n        return sum(points);\n    };\n    const screen = adt$1.screen;\n    const absolute = adt$1.absolute;\n\n    // In one mode, the window is inside an iframe. If that iframe is in the\n    // same document as the positioning element (component), then identify the offset\n    // difference between the iframe and the component.\n    const getOffset = (component, origin, anchorInfo) => {\n        const win = defaultView(anchorInfo.root).dom;\n        const hasSameOwner = (frame) => {\n            const frameOwner = owner$4(frame);\n            const compOwner = owner$4(component.element);\n            return eq(frameOwner, compOwner);\n        };\n        return Optional.from(win.frameElement).map(SugarElement.fromDom)\n            .filter(hasSameOwner).map(absolute$3);\n    };\n    const getRootPoint = (component, origin, anchorInfo) => {\n        const doc = owner$4(component.element);\n        const outerScroll = get$b(doc);\n        const offset = getOffset(component, origin, anchorInfo).getOr(outerScroll);\n        return absolute(offset, outerScroll.left, outerScroll.top);\n    };\n\n    const getBox = (left, top, width, height) => {\n        const point = screen(SugarPosition(left, top));\n        return Optional.some(pointed(point, width, height));\n    };\n    const calcNewAnchor = (optBox, rootPoint, anchorInfo, origin, elem) => optBox.map((box) => {\n        const points = [rootPoint, box.point];\n        const topLeft = cata(origin, () => sumAsAbsolute(points), () => sumAsAbsolute(points), () => sumAsFixed(points));\n        const anchorBox = rect(topLeft.left, topLeft.top, box.width, box.height);\n        const layoutsLtr = anchorInfo.showAbove ?\n            aboveOrBelow() :\n            belowOrAbove();\n        const layoutsRtl = anchorInfo.showAbove ?\n            aboveOrBelowRtl() :\n            belowOrAboveRtl();\n        const layouts = get$1(elem, anchorInfo, layoutsLtr, layoutsRtl, layoutsLtr, layoutsRtl, Optional.none());\n        return nu$1({\n            anchorBox,\n            bubble: anchorInfo.bubble.getOr(fallback()),\n            overrides: anchorInfo.overrides,\n            layouts\n        });\n    });\n\n    const placement$2 = (component, anchorInfo, origin) => {\n        const rootPoint = getRootPoint(component, origin, anchorInfo);\n        return anchorInfo.node\n            // Ensure the node is still attached, otherwise we can't get a valid client rect for a detached node\n            .filter(inBody)\n            .bind((target) => {\n            const rect = target.dom.getBoundingClientRect();\n            const nodeBox = getBox(rect.left, rect.top, rect.width, rect.height);\n            const elem = anchorInfo.node.getOr(component.element);\n            return calcNewAnchor(nodeBox, rootPoint, anchorInfo, origin, elem);\n        });\n    };\n    var NodeAnchor = [\n        required$1('node'),\n        required$1('root'),\n        option$3('bubble'),\n        schema$n(),\n        // chiefly MaxHeight.expandable()\n        defaulted('overrides', {}),\n        defaulted('showAbove', false),\n        output$1('placement', placement$2)\n    ];\n\n    const point = (element, offset) => ({\n        element,\n        offset\n    });\n    // NOTE: This only descends once.\n    const descendOnce$1 = (element, offset) => {\n        const children$1 = children(element);\n        if (children$1.length === 0) {\n            return point(element, offset);\n        }\n        else if (offset < children$1.length) {\n            return point(children$1[offset], 0);\n        }\n        else {\n            const last = children$1[children$1.length - 1];\n            const len = isText(last) ? get$a(last).length : children(last).length;\n            return point(last, len);\n        }\n    };\n\n    // A range from (a, 1) to (body, end) was giving the wrong bounds.\n    const descendOnce = (element, offset) => isText(element) ? point(element, offset) : descendOnce$1(element, offset);\n    const isSimRange = (detail) => detail.foffset !== undefined;\n    const getAnchorSelection = (win, anchorInfo) => {\n        // FIX TEST Test both providing a getSelection and not providing a getSelection\n        const getSelection = anchorInfo.getSelection.getOrThunk(() => () => getExact(win));\n        return getSelection().map((sel) => {\n            if (isSimRange(sel)) {\n                const modStart = descendOnce(sel.start, sel.soffset);\n                const modFinish = descendOnce(sel.finish, sel.foffset);\n                return SimSelection.range(modStart.element, modStart.offset, modFinish.element, modFinish.offset);\n            }\n            else {\n                return sel;\n            }\n        });\n    };\n    const placement$1 = (component, anchorInfo, origin) => {\n        const win = defaultView(anchorInfo.root).dom;\n        const rootPoint = getRootPoint(component, origin, anchorInfo);\n        const selectionBox = getAnchorSelection(win, anchorInfo).bind((sel) => {\n            // This represents the *visual* rectangle of the selection.\n            if (isSimRange(sel)) {\n                const optRect = getBounds$2(win, SimSelection.exactFromRange(sel)).orThunk(() => {\n                    const zeroWidth$1 = SugarElement.fromText(zeroWidth);\n                    const beforeMutation = getExact(win);\n                    before$1(sel.start, zeroWidth$1);\n                    // Certain things like <p><br/></p> with (p, 0) or <br>) as collapsed selection do not return a client rectangle\n                    const rect = getFirstRect(win, SimSelection.exact(zeroWidth$1, 0, zeroWidth$1, 1));\n                    remove$7(zeroWidth$1);\n                    beforeMutation.each((range) => setExact(win, range.start, range.soffset, range.finish, range.foffset));\n                    return rect;\n                });\n                return optRect.bind((rawRect) => {\n                    return getBox(rawRect.left, rawRect.top, rawRect.width, rawRect.height);\n                });\n            }\n            else {\n                const selectionRect = map$1(sel, (cell) => cell.dom.getBoundingClientRect());\n                const bounds = {\n                    left: Math.min(selectionRect.firstCell.left, selectionRect.lastCell.left),\n                    right: Math.max(selectionRect.firstCell.right, selectionRect.lastCell.right),\n                    top: Math.min(selectionRect.firstCell.top, selectionRect.lastCell.top),\n                    bottom: Math.max(selectionRect.firstCell.bottom, selectionRect.lastCell.bottom)\n                };\n                return getBox(bounds.left, bounds.top, bounds.right - bounds.left, bounds.bottom - bounds.top);\n            }\n        });\n        const targetElement = getAnchorSelection(win, anchorInfo)\n            .bind((sel) => {\n            if (isSimRange(sel)) {\n                return isElement$1(sel.start) ? Optional.some(sel.start) : parentElement(sel.start);\n            }\n            else {\n                return Optional.some(sel.firstCell);\n            }\n        });\n        const elem = targetElement.getOr(component.element);\n        return calcNewAnchor(selectionBox, rootPoint, anchorInfo, origin, elem);\n    };\n    var SelectionAnchor = [\n        option$3('getSelection'),\n        required$1('root'),\n        option$3('bubble'),\n        schema$n(),\n        defaulted('overrides', {}),\n        defaulted('showAbove', false),\n        output$1('placement', placement$1)\n    ];\n\n    /*\n      Layout for submenus;\n      Either left or right of the anchor menu item. Never above or below.\n      Aligned to the top or bottom of the anchor as appropriate.\n     */\n    const labelPrefix = 'link-layout';\n    // display element to the right, left edge against the right of the menu\n    const eastX = (anchor) => anchor.x + anchor.width;\n    // display element to the left, right edge against the left of the menu\n    const westX = (anchor, element) => anchor.x - element.width;\n    // display element pointing up, bottom edge against the bottom of the menu (usually to one side)\n    const northY = (anchor, element) => anchor.y - element.height + anchor.height;\n    // display element pointing down, top edge against the top of the menu (usually to one side)\n    const southY = (anchor) => anchor.y;\n    const southeast = (anchor, element, bubbles) => nu$5(eastX(anchor), southY(anchor), bubbles.southeast(), southeast$3(), \"southeast\" /* Placement.Southeast */, boundsRestriction(anchor, { left: 0 /* AnchorBoxBounds.RightEdge */, top: 2 /* AnchorBoxBounds.TopEdge */ }), labelPrefix);\n    const southwest = (anchor, element, bubbles) => nu$5(westX(anchor, element), southY(anchor), bubbles.southwest(), southwest$3(), \"southwest\" /* Placement.Southwest */, boundsRestriction(anchor, { right: 1 /* AnchorBoxBounds.LeftEdge */, top: 2 /* AnchorBoxBounds.TopEdge */ }), labelPrefix);\n    const northeast = (anchor, element, bubbles) => nu$5(eastX(anchor), northY(anchor, element), bubbles.northeast(), northeast$3(), \"northeast\" /* Placement.Northeast */, boundsRestriction(anchor, { left: 0 /* AnchorBoxBounds.RightEdge */, bottom: 3 /* AnchorBoxBounds.BottomEdge */ }), labelPrefix);\n    const northwest = (anchor, element, bubbles) => nu$5(westX(anchor, element), northY(anchor, element), bubbles.northwest(), northwest$3(), \"northwest\" /* Placement.Northwest */, boundsRestriction(anchor, { right: 1 /* AnchorBoxBounds.LeftEdge */, bottom: 3 /* AnchorBoxBounds.BottomEdge */ }), labelPrefix);\n    const all = () => [southeast, southwest, northeast, northwest];\n    const allRtl = () => [southwest, southeast, northwest, northeast];\n\n    const placement = (component, submenuInfo, origin) => {\n        const anchorBox = toBox(origin, submenuInfo.item.element);\n        const layouts = get$1(component.element, submenuInfo, all(), allRtl(), \n        // No default bottomToTop layouts currently needed\n        all(), allRtl(), Optional.none());\n        return Optional.some(nu$1({\n            anchorBox,\n            bubble: fallback(),\n            overrides: submenuInfo.overrides,\n            layouts\n        }));\n    };\n    var SubmenuAnchor = [\n        required$1('item'),\n        schema$n(),\n        defaulted('overrides', {}),\n        output$1('placement', placement)\n    ];\n\n    var AnchorSchema = choose$1('type', {\n        selection: SelectionAnchor,\n        node: NodeAnchor,\n        hotspot: HotspotAnchor,\n        submenu: SubmenuAnchor,\n        makeshift: MakeshiftAnchor\n    });\n\n    const TransitionSchema = [\n        requiredArrayOf('classes', string),\n        defaultedStringEnum('mode', 'all', ['all', 'layout', 'placement'])\n    ];\n    const PositionSchema = [\n        defaulted('useFixed', never),\n        option$3('getBounds')\n    ];\n    const PlacementSchema = [\n        requiredOf('anchor', AnchorSchema),\n        optionObjOf('transition', TransitionSchema)\n    ];\n\n    const getFixedOrigin = () => {\n        // Don't use window.innerWidth/innerHeight here, as we don't want to include scrollbars\n        // since the right/bottom position is based on the edge of the scrollbar not the window\n        const html = document.documentElement;\n        return fixed(0, 0, html.clientWidth, html.clientHeight);\n    };\n    const getRelativeOrigin = (component) => {\n        const position = absolute$3(component.element);\n        const bounds = component.element.dom.getBoundingClientRect();\n        // We think that this just needs to be kept consistent with Boxes.win. If we remove the scroll values from Boxes.win, we\n        // should change this to just bounds.left and bounds.top from getBoundingClientRect\n        return relative(position.left, position.top, bounds.width, bounds.height);\n    };\n    const place = (origin, anchoring, optBounds, placee, lastPlace, transition) => {\n        const anchor = box(anchoring.anchorBox, origin);\n        return simple(anchor, placee.element, anchoring.bubble, anchoring.layouts, lastPlace, optBounds, anchoring.overrides, transition);\n    };\n    const position$1 = (component, posConfig, posState, placee, placementSpec) => {\n        const optWithinBounds = Optional.none();\n        positionWithinBounds(component, posConfig, posState, placee, placementSpec, optWithinBounds);\n    };\n    const positionWithinBounds = (component, posConfig, posState, placee, placementSpec, optWithinBounds) => {\n        const placeeDetail = asRawOrDie$1('placement.info', objOf(PlacementSchema), placementSpec);\n        const anchorage = placeeDetail.anchor;\n        const element = placee.element;\n        const placeeState = posState.get(placee.uid);\n        // Preserve the focus as IE 11 loses it when setting visibility to hidden\n        preserve(() => {\n            // We set it to be fixed, so that it doesn't interfere with the layout of anything\n            // when calculating anchors\n            set$7(element, 'position', 'fixed');\n            const oldVisibility = getRaw(element, 'visibility');\n            set$7(element, 'visibility', 'hidden');\n            // We need to calculate the origin (esp. the bounding client rect) *after* we have done\n            // all the preprocessing of the component and placee. Otherwise, the relative positions\n            // (bottom and right) will be using the wrong dimensions\n            const origin = posConfig.useFixed() ? getFixedOrigin() : getRelativeOrigin(component);\n            anchorage.placement(component, anchorage, origin).each((anchoring) => {\n                // If \"within bounds\" is specified, it overrides any Positioning config. Otherwise, we\n                // use the Positioning config. We don't try to combine automatically here because they are\n                // sometimes serving different purposes. If the Positioning config getBounds needs to be\n                // combined with the optWithinBounds bounds, then it is the responsibility of the calling\n                // code to combine them, and pass in the combined value as optWithinBounds. The optWithinBounds\n                // will *always* override the Positioning config.\n                const optBounds = optWithinBounds.orThunk(() => posConfig.getBounds.map(apply$1));\n                // Place the element and then update the state for the placee\n                const newState = place(origin, anchoring, optBounds, placee, placeeState, placeeDetail.transition);\n                posState.set(placee.uid, newState);\n            });\n            oldVisibility.fold(() => {\n                remove$6(element, 'visibility');\n            }, (vis) => {\n                set$7(element, 'visibility', vis);\n            });\n            // We need to remove position: fixed put on by above code if it is not needed.\n            if (getRaw(element, 'left').isNone() &&\n                getRaw(element, 'top').isNone() &&\n                getRaw(element, 'right').isNone() &&\n                getRaw(element, 'bottom').isNone() &&\n                is$1(getRaw(element, 'position'), 'fixed')) {\n                remove$6(element, 'position');\n            }\n        }, element);\n    };\n    const getMode = (component, pConfig, _pState) => pConfig.useFixed() ? 'fixed' : 'absolute';\n    const reset = (component, pConfig, posState, placee) => {\n        const element = placee.element;\n        each$1(['position', 'left', 'right', 'top', 'bottom'], (prop) => remove$6(element, prop));\n        reset$2(element);\n        posState.clear(placee.uid);\n    };\n\n    var PositionApis = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        position: position$1,\n        positionWithinBounds: positionWithinBounds,\n        getMode: getMode,\n        reset: reset\n    });\n\n    const init$9 = () => {\n        let state = {};\n        const set = (id, data) => {\n            state[id] = data;\n        };\n        const get = (id) => get$h(state, id);\n        const clear = (id) => {\n            if (isNonNullable(id)) {\n                delete state[id];\n            }\n            else {\n                state = {};\n            }\n        };\n        return nu$4({\n            readState: () => state,\n            clear,\n            set,\n            get\n        });\n    };\n\n    var PositioningState = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        init: init$9\n    });\n\n    const Positioning = create$3({\n        fields: PositionSchema,\n        name: 'positioning',\n        active: ActivePosition,\n        apis: PositionApis,\n        state: PositioningState\n    });\n\n    const chooseChannels = (channels, message) => message.universal ? channels : filter$2(channels, (ch) => contains$2(message.channels, ch));\n    const events$8 = (receiveConfig) => derive$2([\n        run$1(receive(), (component, message) => {\n            const channelMap = receiveConfig.channels;\n            const channels = keys(channelMap);\n            // NOTE: Receiving event ignores the whole simulated event part.\n            // TODO: Think about the types for this, or find a better way for this to rely on receiving.\n            const receivingData = message;\n            const targetChannels = chooseChannels(channels, receivingData);\n            each$1(targetChannels, (ch) => {\n                const channelInfo = channelMap[ch];\n                const channelSchema = channelInfo.schema;\n                const data = asRawOrDie$1('channel[' + ch + '] data\\nReceiver: ' + element(component.element), channelSchema, receivingData.data);\n                channelInfo.onReceive(component, data);\n            });\n        })\n    ]);\n\n    var ActiveReceiving = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        events: events$8\n    });\n\n    var ReceivingSchema = [\n        requiredOf('channels', setOf(\n        // Allow any keys.\n        Result.value, objOfOnly([\n            onStrictHandler('onReceive'),\n            defaulted('schema', anyValue())\n        ])))\n    ];\n\n    const Receiving = create$3({\n        fields: ReceivingSchema,\n        name: 'receiving',\n        active: ActiveReceiving\n    });\n\n    const events$7 = (reflectingConfig, reflectingState) => {\n        const update = (component, data) => {\n            reflectingConfig.updateState.each((updateState) => {\n                const newState = updateState(component, data);\n                reflectingState.set(newState);\n            });\n            // FIX: Partial duplication of Replacing + Receiving\n            reflectingConfig.renderComponents.each((renderComponents) => {\n                const newComponents = renderComponents(data, reflectingState.get());\n                const replacer = reflectingConfig.reuseDom ? withReuse : withoutReuse;\n                replacer(component, newComponents);\n            });\n        };\n        return derive$2([\n            run$1(receive(), (component, message) => {\n                // NOTE: Receiving event ignores the whole simulated event part.\n                // TODO: Think about the types for this, or find a better way for this to rely on receiving.\n                const receivingData = message;\n                if (!receivingData.universal) {\n                    const channel = reflectingConfig.channel;\n                    if (contains$2(receivingData.channels, channel)) {\n                        update(component, receivingData.data);\n                    }\n                }\n            }),\n            runOnAttached((comp, _se) => {\n                reflectingConfig.initialData.each((rawData) => {\n                    update(comp, rawData);\n                });\n            })\n        ]);\n    };\n\n    var ActiveReflecting = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        events: events$7\n    });\n\n    const getState$1 = (component, replaceConfig, reflectState) => reflectState;\n\n    var ReflectingApis = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        getState: getState$1\n    });\n\n    var ReflectingSchema = [\n        required$1('channel'),\n        option$3('renderComponents'),\n        option$3('updateState'),\n        option$3('initialData'),\n        defaultedBoolean('reuseDom', true)\n    ];\n\n    const init$8 = () => {\n        const cell = Cell(Optional.none());\n        const clear = () => cell.set(Optional.none());\n        const readState = () => cell.get().getOr('none');\n        return {\n            readState,\n            get: cell.get,\n            set: cell.set,\n            clear\n        };\n    };\n\n    var ReflectingState = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        init: init$8\n    });\n\n    const Reflecting = create$3({\n        fields: ReflectingSchema,\n        name: 'reflecting',\n        active: ActiveReflecting,\n        apis: ReflectingApis,\n        state: ReflectingState\n    });\n\n    const computeSize = (state) => {\n        const accumulatedDelta = state.getAccumulatedDelta();\n        const bounds = state.getBounds();\n        const width = clamp(Math.round(state.getOriginalWidth() + accumulatedDelta.left), bounds.minWidth.getOr(0), bounds.maxWidth.getOr(Number.MAX_VALUE));\n        const height = clamp(Math.round(state.getOriginalHeight() + accumulatedDelta.top), bounds.minHeight.getOr(0), bounds.maxHeight.getOr(Number.MAX_VALUE));\n        return { width, height };\n    };\n    const start = (_component, _config, state, width, height, bounds) => {\n        state.start(width, height, bounds);\n    };\n    const moveBy$3 = (_component, _config, state, delta) => {\n        if (!state.isActive()) {\n            return Optional.none();\n        }\n        state.drag(delta);\n        return Optional.some(computeSize(state));\n    };\n    const stop = (_component, _config, state) => {\n        if (!state.isActive()) {\n            return Optional.none();\n        }\n        state.stop();\n        return Optional.some(computeSize(state));\n    };\n\n    var ResizingApis = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        start: start,\n        moveBy: moveBy$3,\n        stop: stop\n    });\n\n    var ResizingSchema = [];\n\n    const init$7 = () => {\n        const originalWidth = Cell(0);\n        const originalHeight = Cell(0);\n        const accumulatedDelta = Cell(SugarPosition(0, 0));\n        const active = Cell(false);\n        const bounds = Cell({\n            minWidth: Optional.none(),\n            maxWidth: Optional.none(),\n            minHeight: Optional.none(),\n            maxHeight: Optional.none()\n        });\n        const start = (width, height, newBounds = {}) => {\n            originalWidth.set(width);\n            originalHeight.set(height);\n            accumulatedDelta.set(SugarPosition(0, 0));\n            bounds.set({\n                minWidth: Optional.from(newBounds.minWidth),\n                maxWidth: Optional.from(newBounds.maxWidth),\n                minHeight: Optional.from(newBounds.minHeight),\n                maxHeight: Optional.from(newBounds.maxHeight)\n            });\n            active.set(true);\n        };\n        const stop = () => {\n            active.set(false);\n        };\n        const isActive = () => active.get();\n        const drag = (delta) => {\n            const acc = accumulatedDelta.get().translate(delta.left, delta.top);\n            accumulatedDelta.set(acc);\n            return acc;\n        };\n        const getAccumulatedDelta = () => accumulatedDelta.get();\n        const getOriginalWidth = () => originalWidth.get();\n        const getOriginalHeight = () => originalHeight.get();\n        const getBounds = () => bounds.get();\n        const readState = () => ({\n            originalWidth: originalWidth.get(),\n            originalHeight: originalHeight.get(),\n            accumulatedDelta: accumulatedDelta.get(),\n            active: active.get(),\n            bounds: bounds.get()\n        });\n        return nu$4({\n            start,\n            stop,\n            isActive,\n            drag,\n            getAccumulatedDelta,\n            getOriginalWidth,\n            getOriginalHeight,\n            getBounds,\n            readState\n        });\n    };\n\n    var ResizingState = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        init: init$7\n    });\n\n    const Resizing = create$3({\n        fields: ResizingSchema,\n        name: 'resizing',\n        apis: ResizingApis,\n        state: ResizingState\n    });\n\n    // NOTE: A sandbox should not start as part of the world. It is expected to be\n    // added to the sink on rebuild.\n    const rebuild = (sandbox, sConfig, sState, data) => {\n        sState.get().each((_data) => {\n            // If currently has data, so it hasn't been removed yet. It is\n            // being \"re-opened\"\n            detachChildren(sandbox);\n        });\n        const point = sConfig.getAttachPoint(sandbox);\n        attach(point, sandbox);\n        // Must be after the sandbox is in the system\n        const built = sandbox.getSystem().build(data);\n        attach(sandbox, built);\n        sState.set(built);\n        return built;\n    };\n    // Open sandbox transfers focus to the opened menu\n    const open$1 = (sandbox, sConfig, sState, data) => {\n        const newState = rebuild(sandbox, sConfig, sState, data);\n        sConfig.onOpen(sandbox, newState);\n        return newState;\n    };\n    const setContent = (sandbox, sConfig, sState, data) => sState.get().map(() => rebuild(sandbox, sConfig, sState, data));\n    // TODO AP-191 write a test for openWhileCloaked\n    const openWhileCloaked = (sandbox, sConfig, sState, data, transaction) => {\n        cloak(sandbox, sConfig);\n        open$1(sandbox, sConfig, sState, data);\n        transaction();\n        decloak(sandbox, sConfig);\n    };\n    const close$1 = (sandbox, sConfig, sState) => {\n        sState.get().each((data) => {\n            detachChildren(sandbox);\n            detach(sandbox);\n            sConfig.onClose(sandbox, data);\n            sState.clear();\n        });\n    };\n    const isOpen$1 = (_sandbox, _sConfig, sState) => sState.isOpen();\n    const isPartOf$1 = (sandbox, sConfig, sState, queryElem) => isOpen$1(sandbox, sConfig, sState) && sState.get().exists((data) => sConfig.isPartOf(sandbox, data, queryElem));\n    const getState = (_sandbox, _sConfig, sState) => sState.get();\n    const store = (sandbox, cssKey, attr, newValue) => {\n        getRaw(sandbox.element, cssKey).fold(() => {\n            remove$8(sandbox.element, attr);\n        }, (v) => {\n            set$9(sandbox.element, attr, v);\n        });\n        set$7(sandbox.element, cssKey, newValue);\n    };\n    const restore = (sandbox, cssKey, attr) => {\n        getOpt(sandbox.element, attr).fold(() => remove$6(sandbox.element, cssKey), (oldValue) => set$7(sandbox.element, cssKey, oldValue));\n    };\n    const cloak = (sandbox, sConfig, _sState) => {\n        const sink = sConfig.getAttachPoint(sandbox);\n        // Use the positioning mode of the sink, so that it does not interfere with the sink's positioning\n        // We add it here to stop it causing layout problems.\n        set$7(sandbox.element, 'position', Positioning.getMode(sink));\n        store(sandbox, 'visibility', sConfig.cloakVisibilityAttr, 'hidden');\n    };\n    const hasPosition = (element) => exists(['top', 'left', 'right', 'bottom'], (pos) => getRaw(element, pos).isSome());\n    const decloak = (sandbox, sConfig, _sState) => {\n        if (!hasPosition(sandbox.element)) {\n            // If a position value was not added to the sandbox during cloaking, remove it\n            // otherwise certain position values (absolute, relative) will impact the child that _was_ positioned\n            remove$6(sandbox.element, 'position');\n        }\n        restore(sandbox, 'visibility', sConfig.cloakVisibilityAttr);\n    };\n\n    var SandboxApis = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        cloak: cloak,\n        decloak: decloak,\n        open: open$1,\n        openWhileCloaked: openWhileCloaked,\n        close: close$1,\n        isOpen: isOpen$1,\n        isPartOf: isPartOf$1,\n        getState: getState,\n        setContent: setContent\n    });\n\n    const events$6 = (sandboxConfig, sandboxState) => derive$2([\n        run$1(sandboxClose(), (sandbox, _simulatedEvent) => {\n            close$1(sandbox, sandboxConfig, sandboxState);\n        })\n    ]);\n\n    var ActiveSandbox = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        events: events$6\n    });\n\n    var SandboxSchema = [\n        onHandler('onOpen'),\n        onHandler('onClose'),\n        // Maybe this should be optional\n        required$1('isPartOf'),\n        required$1('getAttachPoint'),\n        defaulted('cloakVisibilityAttr', 'data-precloak-visibility')\n    ];\n\n    const init$6 = () => {\n        const contents = value$2();\n        const readState = constant$1('not-implemented');\n        return nu$4({\n            readState,\n            isOpen: contents.isSet,\n            clear: contents.clear,\n            set: contents.set,\n            get: contents.get\n        });\n    };\n\n    var SandboxState = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        init: init$6\n    });\n\n    const Sandboxing = create$3({\n        fields: SandboxSchema,\n        name: 'sandboxing',\n        active: ActiveSandbox,\n        apis: SandboxApis,\n        state: SandboxState\n    });\n\n    const getAnimationRoot = (component, slideConfig) => slideConfig.getAnimationRoot.fold(() => component.element, (get) => get(component));\n\n    const getDimensionProperty = (slideConfig) => slideConfig.dimension.property;\n    const getDimension = (slideConfig, elem) => slideConfig.dimension.getDimension(elem);\n    const disableTransitions = (component, slideConfig) => {\n        const root = getAnimationRoot(component, slideConfig);\n        remove$2(root, [slideConfig.shrinkingClass, slideConfig.growingClass]);\n    };\n    const setShrunk = (component, slideConfig) => {\n        remove$3(component.element, slideConfig.openClass);\n        add$2(component.element, slideConfig.closedClass);\n        set$7(component.element, getDimensionProperty(slideConfig), '0px');\n        reflow(component.element);\n    };\n    const setGrown = (component, slideConfig) => {\n        remove$3(component.element, slideConfig.closedClass);\n        add$2(component.element, slideConfig.openClass);\n        remove$6(component.element, getDimensionProperty(slideConfig));\n    };\n    const doImmediateShrink = (component, slideConfig, slideState, _calculatedSize) => {\n        slideState.setCollapsed();\n        // Force current dimension to begin transition\n        set$7(component.element, getDimensionProperty(slideConfig), getDimension(slideConfig, component.element));\n        // TINY-8710: we don't think reflow is required (as has been done elsewhere) as the animation is not needed\n        disableTransitions(component, slideConfig);\n        setShrunk(component, slideConfig);\n        slideConfig.onStartShrink(component);\n        slideConfig.onShrunk(component);\n    };\n    const doStartShrink = (component, slideConfig, slideState, calculatedSize) => {\n        const size = calculatedSize.getOrThunk(() => getDimension(slideConfig, component.element));\n        slideState.setCollapsed();\n        // Force current dimension to begin transition\n        set$7(component.element, getDimensionProperty(slideConfig), size);\n        reflow(component.element);\n        const root = getAnimationRoot(component, slideConfig);\n        remove$3(root, slideConfig.growingClass);\n        add$2(root, slideConfig.shrinkingClass); // enable transitions\n        setShrunk(component, slideConfig);\n        slideConfig.onStartShrink(component);\n    };\n    // A \"smartShrink\" will do an immediate shrink if no shrinking is scheduled to happen\n    const doStartSmartShrink = (component, slideConfig, slideState) => {\n        const size = getDimension(slideConfig, component.element);\n        const shrinker = size === '0px' ? doImmediateShrink : doStartShrink;\n        shrinker(component, slideConfig, slideState, Optional.some(size));\n    };\n    // Showing is complex due to the inability to transition to \"auto\".\n    // We also can't cache the dimension as the parents may have resized since it was last shown.\n    const doStartGrow = (component, slideConfig, slideState) => {\n        // Start the growing animation styles\n        const root = getAnimationRoot(component, slideConfig);\n        // Record whether this is interrupting a shrink and its current size\n        const wasShrinking = has(root, slideConfig.shrinkingClass);\n        const beforeSize = getDimension(slideConfig, component.element);\n        setGrown(component, slideConfig);\n        const fullSize = getDimension(slideConfig, component.element);\n        // If the grow is interrupting a shrink, use the size from before the grow as the start size\n        // And reflow so that the animation works.\n        const startPartialGrow = () => {\n            set$7(component.element, getDimensionProperty(slideConfig), beforeSize);\n            reflow(component.element);\n        };\n        // If the grow is not interrupting a shrink, start from 0 (shrunk)\n        const startCompleteGrow = () => {\n            setShrunk(component, slideConfig);\n        };\n        // Determine what the initial size for the grow operation should be.\n        const setStartSize = wasShrinking ? startPartialGrow : startCompleteGrow;\n        setStartSize();\n        remove$3(root, slideConfig.shrinkingClass);\n        add$2(root, slideConfig.growingClass);\n        setGrown(component, slideConfig);\n        set$7(component.element, getDimensionProperty(slideConfig), fullSize);\n        slideState.setExpanded();\n        slideConfig.onStartGrow(component);\n    };\n    const refresh$3 = (component, slideConfig, slideState) => {\n        if (slideState.isExpanded()) {\n            remove$6(component.element, getDimensionProperty(slideConfig));\n            const fullSize = getDimension(slideConfig, component.element);\n            set$7(component.element, getDimensionProperty(slideConfig), fullSize);\n        }\n    };\n    const grow = (component, slideConfig, slideState) => {\n        if (!slideState.isExpanded()) {\n            doStartGrow(component, slideConfig, slideState);\n        }\n    };\n    const shrink = (component, slideConfig, slideState) => {\n        if (slideState.isExpanded()) {\n            doStartSmartShrink(component, slideConfig, slideState);\n        }\n    };\n    const immediateShrink = (component, slideConfig, slideState) => {\n        if (slideState.isExpanded()) {\n            doImmediateShrink(component, slideConfig, slideState);\n        }\n    };\n    const hasGrown = (component, slideConfig, slideState) => slideState.isExpanded();\n    const hasShrunk = (component, slideConfig, slideState) => slideState.isCollapsed();\n    const isGrowing = (component, slideConfig, _slideState) => {\n        const root = getAnimationRoot(component, slideConfig);\n        return has(root, slideConfig.growingClass) === true;\n    };\n    const isShrinking = (component, slideConfig, _slideState) => {\n        const root = getAnimationRoot(component, slideConfig);\n        return has(root, slideConfig.shrinkingClass) === true;\n    };\n    const isTransitioning = (component, slideConfig, slideState) => isGrowing(component, slideConfig) || isShrinking(component, slideConfig);\n    const toggleGrow = (component, slideConfig, slideState) => {\n        const f = slideState.isExpanded() ? doStartSmartShrink : doStartGrow;\n        f(component, slideConfig, slideState);\n    };\n    const immediateGrow = (component, slideConfig, slideState) => {\n        if (!slideState.isExpanded()) {\n            setGrown(component, slideConfig);\n            set$7(component.element, getDimensionProperty(slideConfig), getDimension(slideConfig, component.element));\n            // TINY-8710: we don't think reflow is required (as has been done elsewhere) as the animation is not needed\n            // Keep disableTransition to handle the case where it's part way through transitioning\n            disableTransitions(component, slideConfig);\n            slideState.setExpanded();\n            slideConfig.onStartGrow(component);\n            slideConfig.onGrown(component);\n        }\n    };\n\n    var SlidingApis = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        refresh: refresh$3,\n        grow: grow,\n        shrink: shrink,\n        immediateShrink: immediateShrink,\n        hasGrown: hasGrown,\n        hasShrunk: hasShrunk,\n        isGrowing: isGrowing,\n        isShrinking: isShrinking,\n        isTransitioning: isTransitioning,\n        toggleGrow: toggleGrow,\n        disableTransitions: disableTransitions,\n        immediateGrow: immediateGrow\n    });\n\n    const exhibit$3 = (base, slideConfig, _slideState) => {\n        const expanded = slideConfig.expanded;\n        return expanded ? nu$2({\n            classes: [slideConfig.openClass],\n            styles: {}\n        }) : nu$2({\n            classes: [slideConfig.closedClass],\n            styles: wrap(slideConfig.dimension.property, '0px')\n        });\n    };\n    const events$5 = (slideConfig, slideState) => derive$2([\n        runOnSource(transitionend(), (component, simulatedEvent) => {\n            const raw = simulatedEvent.event.raw;\n            // This will fire for all transitions, we're only interested in the dimension completion on source\n            if (raw.propertyName === slideConfig.dimension.property) {\n                disableTransitions(component, slideConfig); // disable transitions immediately (Safari animates the dimension removal below)\n                if (slideState.isExpanded()) {\n                    remove$6(component.element, slideConfig.dimension.property);\n                } // when showing, remove the dimension so it is responsive\n                const notify = slideState.isExpanded() ? slideConfig.onGrown : slideConfig.onShrunk;\n                notify(component);\n            }\n        })\n    ]);\n\n    var ActiveSliding = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        exhibit: exhibit$3,\n        events: events$5\n    });\n\n    var SlidingSchema = [\n        required$1('closedClass'),\n        required$1('openClass'),\n        required$1('shrinkingClass'),\n        required$1('growingClass'),\n        // Element which shrinking and growing animations\n        option$3('getAnimationRoot'),\n        onHandler('onShrunk'),\n        onHandler('onStartShrink'),\n        onHandler('onGrown'),\n        onHandler('onStartGrow'),\n        defaulted('expanded', false),\n        requiredOf('dimension', choose$1('property', {\n            width: [\n                output$1('property', 'width'),\n                output$1('getDimension', (elem) => get$c(elem) + 'px')\n            ],\n            height: [\n                output$1('property', 'height'),\n                output$1('getDimension', (elem) => get$d(elem) + 'px')\n            ]\n        }))\n    ];\n\n    const init$5 = (spec) => {\n        const state = Cell(spec.expanded);\n        const readState = () => 'expanded: ' + state.get();\n        return nu$4({\n            isExpanded: () => state.get() === true,\n            isCollapsed: () => state.get() === false,\n            setCollapsed: curry(state.set, false),\n            setExpanded: curry(state.set, true),\n            readState\n        });\n    };\n\n    var SlidingState = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        init: init$5\n    });\n\n    const Sliding = create$3({\n        fields: SlidingSchema,\n        name: 'sliding',\n        active: ActiveSliding,\n        apis: SlidingApis,\n        state: SlidingState\n    });\n\n    const events$4 = (streamConfig, streamState) => {\n        const streams = streamConfig.stream.streams;\n        const processor = streams.setup(streamConfig, streamState);\n        return derive$2([\n            run$1(streamConfig.event, processor),\n            runOnDetached(() => streamState.cancel())\n        ].concat(streamConfig.cancelEvent.map((e) => [\n            run$1(e, () => streamState.cancel())\n        ]).getOr([])));\n    };\n\n    var ActiveStreaming = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        events: events$4\n    });\n\n    const throttle = (_config) => {\n        const state = Cell(null);\n        const readState = () => ({\n            timer: state.get() !== null ? 'set' : 'unset'\n        });\n        const setTimer = (t) => {\n            state.set(t);\n        };\n        const cancel = () => {\n            const t = state.get();\n            if (t !== null) {\n                t.cancel();\n            }\n        };\n        return nu$4({\n            readState,\n            setTimer,\n            cancel\n        });\n    };\n    const init$4 = (spec) => spec.stream.streams.state(spec);\n\n    var StreamingState = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        throttle: throttle,\n        init: init$4\n    });\n\n    const setup$e = (streamInfo, streamState) => {\n        const sInfo = streamInfo.stream;\n        const throttler = last(streamInfo.onStream, sInfo.delay);\n        streamState.setTimer(throttler);\n        return (component, simulatedEvent) => {\n            throttler.throttle(component, simulatedEvent);\n            if (sInfo.stopEvent) {\n                simulatedEvent.stop();\n            }\n        };\n    };\n    var StreamingSchema = [\n        requiredOf('stream', choose$1('mode', {\n            throttle: [\n                required$1('delay'),\n                defaulted('stopEvent', true),\n                output$1('streams', {\n                    setup: setup$e,\n                    state: throttle\n                })\n            ]\n        })),\n        defaulted('event', 'input'),\n        option$3('cancelEvent'),\n        onStrictHandler('onStream')\n    ];\n\n    const Streaming = create$3({\n        fields: StreamingSchema,\n        name: 'streaming',\n        active: ActiveStreaming,\n        state: StreamingState\n    });\n\n    const exhibit$2 = (base, tabConfig) => nu$2({\n        attributes: wrapAll([\n            { key: tabConfig.tabAttr, value: 'true' }\n        ])\n    });\n\n    var ActiveTabstopping = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        exhibit: exhibit$2\n    });\n\n    var TabstopSchema = [\n        defaulted('tabAttr', 'data-alloy-tabstop')\n    ];\n\n    const Tabstopping = create$3({\n        fields: TabstopSchema,\n        name: 'tabstopping',\n        active: ActiveTabstopping\n    });\n\n    const updateAriaState = (component, toggleConfig, toggleState) => {\n        const ariaInfo = toggleConfig.aria;\n        ariaInfo.update(component, ariaInfo, toggleState.get());\n    };\n    const updateClass = (component, toggleConfig, toggleState) => {\n        toggleConfig.toggleClass.each((toggleClass) => {\n            if (toggleState.get()) {\n                add$2(component.element, toggleClass);\n            }\n            else {\n                remove$3(component.element, toggleClass);\n            }\n        });\n    };\n    const set = (component, toggleConfig, toggleState, state) => {\n        const initialState = toggleState.get();\n        toggleState.set(state);\n        updateClass(component, toggleConfig, toggleState);\n        updateAriaState(component, toggleConfig, toggleState);\n        if (initialState !== state) {\n            toggleConfig.onToggled(component, state);\n        }\n    };\n    const toggle$1 = (component, toggleConfig, toggleState) => {\n        set(component, toggleConfig, toggleState, !toggleState.get());\n    };\n    const on = (component, toggleConfig, toggleState) => {\n        set(component, toggleConfig, toggleState, true);\n    };\n    const off = (component, toggleConfig, toggleState) => {\n        set(component, toggleConfig, toggleState, false);\n    };\n    const isOn = (component, toggleConfig, toggleState) => toggleState.get();\n    const onLoad = (component, toggleConfig, toggleState) => {\n        // There used to be a bit of code in here that would only overwrite\n        // the attribute if it didn't have a current value. I can't remember\n        // what case that was for, so I'm removing it until it is required.\n        set(component, toggleConfig, toggleState, toggleConfig.selected);\n    };\n\n    var ToggleApis = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        onLoad: onLoad,\n        toggle: toggle$1,\n        isOn: isOn,\n        on: on,\n        off: off,\n        set: set\n    });\n\n    const exhibit$1 = () => nu$2({});\n    const events$3 = (toggleConfig, toggleState) => {\n        const execute = executeEvent(toggleConfig, toggleState, toggle$1);\n        const load = loadEvent(toggleConfig, toggleState, onLoad);\n        return derive$2(flatten([\n            toggleConfig.toggleOnExecute ? [execute] : [],\n            [load]\n        ]));\n    };\n\n    var ActiveToggle = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        exhibit: exhibit$1,\n        events: events$3\n    });\n\n    const updatePressed = (component, ariaInfo, status) => {\n        set$9(component.element, 'aria-pressed', status);\n        if (ariaInfo.syncWithExpanded) {\n            updateExpanded(component, ariaInfo, status);\n        }\n    };\n    const updateSelected = (component, ariaInfo, status) => {\n        set$9(component.element, 'aria-selected', status);\n    };\n    const updateChecked = (component, ariaInfo, status) => {\n        set$9(component.element, 'aria-checked', status);\n    };\n    const updateExpanded = (component, ariaInfo, status) => {\n        set$9(component.element, 'aria-expanded', status);\n    };\n\n    var ToggleSchema = [\n        defaulted('selected', false),\n        option$3('toggleClass'),\n        defaulted('toggleOnExecute', true),\n        onHandler('onToggled'),\n        defaultedOf('aria', {\n            mode: 'none'\n        }, choose$1('mode', {\n            pressed: [\n                defaulted('syncWithExpanded', false),\n                output$1('update', updatePressed)\n            ],\n            checked: [\n                output$1('update', updateChecked)\n            ],\n            expanded: [\n                output$1('update', updateExpanded)\n            ],\n            selected: [\n                output$1('update', updateSelected)\n            ],\n            none: [\n                output$1('update', noop)\n            ]\n        }))\n    ];\n\n    const Toggling = create$3({\n        fields: ToggleSchema,\n        name: 'toggling',\n        active: ActiveToggle,\n        apis: ToggleApis,\n        state: SetupBehaviourCellState(false)\n    });\n\n    const ExclusivityChannel = generate$6('tooltip.exclusive');\n    const ShowTooltipEvent = generate$6('tooltip.show');\n    const HideTooltipEvent = generate$6('tooltip.hide');\n    const ImmediateHideTooltipEvent = generate$6('tooltip.immediateHide');\n    const ImmediateShowTooltipEvent = generate$6('tooltip.immediateShow');\n\n    const hideAllExclusive = (component, _tConfig, _tState) => {\n        component.getSystem().broadcastOn([ExclusivityChannel], {});\n    };\n    const setComponents = (_component, _tConfig, tState, specs) => {\n        tState.getTooltip().each((tooltip) => {\n            if (tooltip.getSystem().isConnected()) {\n                Replacing.set(tooltip, specs);\n            }\n        });\n    };\n    const isEnabled = (_component, _tConfig, tState) => tState.isEnabled();\n    const setEnabled = (_component, _tConfig, tState, enabled) => tState.setEnabled(enabled);\n    const immediateOpenClose = (component, _tConfig, _tState, open) => emit(component, open ? ImmediateShowTooltipEvent : ImmediateHideTooltipEvent);\n\n    var TooltippingApis = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        hideAllExclusive: hideAllExclusive,\n        immediateOpenClose: immediateOpenClose,\n        isEnabled: isEnabled,\n        setComponents: setComponents,\n        setEnabled: setEnabled\n    });\n\n    const events$2 = (tooltipConfig, state) => {\n        const hide = (comp) => {\n            state.getTooltip().each((p) => {\n                if (p.getSystem().isConnected()) {\n                    detach(p);\n                    tooltipConfig.onHide(comp, p);\n                    state.clearTooltip();\n                }\n            });\n            state.clearTimer();\n        };\n        const show = (comp) => {\n            if (!state.isShowing() && state.isEnabled()) {\n                hideAllExclusive(comp);\n                const sink = tooltipConfig.lazySink(comp).getOrDie();\n                const popup = comp.getSystem().build({\n                    dom: tooltipConfig.tooltipDom,\n                    components: tooltipConfig.tooltipComponents,\n                    events: derive$2(tooltipConfig.mode === 'normal'\n                        ? [\n                            run$1(mouseover(), (_) => {\n                                emit(comp, ShowTooltipEvent);\n                            }),\n                            run$1(mouseout(), (_) => {\n                                emit(comp, HideTooltipEvent);\n                            })\n                        ]\n                        : []),\n                    behaviours: derive$1([\n                        Replacing.config({})\n                    ])\n                });\n                state.setTooltip(popup);\n                attach(sink, popup);\n                tooltipConfig.onShow(comp, popup);\n                Positioning.position(sink, popup, { anchor: tooltipConfig.anchor(comp) });\n            }\n        };\n        const reposition = (comp) => {\n            state.getTooltip().each((tooltip) => {\n                const sink = tooltipConfig.lazySink(comp).getOrDie();\n                Positioning.position(sink, tooltip, { anchor: tooltipConfig.anchor(comp) });\n            });\n        };\n        const getEvents = () => {\n            switch (tooltipConfig.mode) {\n                case 'normal':\n                    return [\n                        run$1(focusin(), (comp) => {\n                            emit(comp, ImmediateShowTooltipEvent);\n                        }),\n                        run$1(postBlur(), (comp) => {\n                            emit(comp, ImmediateHideTooltipEvent);\n                        }),\n                        run$1(mouseover(), (comp) => {\n                            emit(comp, ShowTooltipEvent);\n                        }),\n                        run$1(mouseout(), (comp) => {\n                            emit(comp, HideTooltipEvent);\n                        })\n                    ];\n                case 'follow-highlight':\n                    return [\n                        run$1(highlight$1(), (comp, _se) => {\n                            emit(comp, ShowTooltipEvent);\n                        }),\n                        run$1(dehighlight$1(), (comp) => {\n                            emit(comp, HideTooltipEvent);\n                        })\n                    ];\n                case 'children-normal':\n                    return [\n                        run$1(focusin(), (comp, se) => {\n                            search(comp.element).each((_) => {\n                                if (is(se.event.target, '[data-mce-tooltip]')) {\n                                    state.getTooltip().fold(() => {\n                                        emit(comp, ImmediateShowTooltipEvent);\n                                    }, (tooltip) => {\n                                        if (state.isShowing()) {\n                                            tooltipConfig.onShow(comp, tooltip);\n                                            reposition(comp);\n                                        }\n                                    });\n                                }\n                            });\n                        }),\n                        run$1(postBlur(), (comp) => {\n                            search(comp.element).fold(() => {\n                                emit(comp, ImmediateHideTooltipEvent);\n                            }, noop);\n                        }),\n                        run$1(mouseover(), (comp) => {\n                            descendant(comp.element, '[data-mce-tooltip]:hover').each((_) => {\n                                state.getTooltip().fold(() => {\n                                    emit(comp, ShowTooltipEvent);\n                                }, (tooltip) => {\n                                    if (state.isShowing()) {\n                                        tooltipConfig.onShow(comp, tooltip);\n                                        reposition(comp);\n                                    }\n                                });\n                            });\n                        }),\n                        run$1(mouseout(), (comp) => {\n                            descendant(comp.element, '[data-mce-tooltip]:hover').fold(() => {\n                                emit(comp, HideTooltipEvent);\n                            }, noop);\n                        }),\n                    ];\n                default:\n                    return [\n                        run$1(focusin(), (comp, se) => {\n                            search(comp.element).each((_) => {\n                                if (is(se.event.target, '[data-mce-tooltip]')) {\n                                    state.getTooltip().fold(() => {\n                                        emit(comp, ImmediateShowTooltipEvent);\n                                    }, (tooltip) => {\n                                        if (state.isShowing()) {\n                                            tooltipConfig.onShow(comp, tooltip);\n                                            reposition(comp);\n                                        }\n                                    });\n                                }\n                            });\n                        }),\n                        run$1(postBlur(), (comp) => {\n                            search(comp.element).fold(() => {\n                                emit(comp, ImmediateHideTooltipEvent);\n                            }, noop);\n                        }),\n                    ];\n            }\n        };\n        return derive$2(flatten([\n            [\n                runOnInit((component) => {\n                    tooltipConfig.onSetup(component);\n                }),\n                run$1(ShowTooltipEvent, (comp) => {\n                    state.resetTimer(() => {\n                        show(comp);\n                    }, tooltipConfig.delayForShow());\n                }),\n                run$1(HideTooltipEvent, (comp) => {\n                    state.resetTimer(() => {\n                        hide(comp);\n                    }, tooltipConfig.delayForHide());\n                }),\n                run$1(ImmediateShowTooltipEvent, (comp) => {\n                    state.resetTimer(() => {\n                        show(comp);\n                    }, 0);\n                }),\n                run$1(ImmediateHideTooltipEvent, (comp) => {\n                    state.resetTimer(() => {\n                        hide(comp);\n                    }, 0);\n                }),\n                run$1(receive(), (comp, message) => {\n                    // TODO: Think about the types for this, or find a better way for this\n                    // to rely on receiving.\n                    const receivingData = message;\n                    if (!receivingData.universal) {\n                        if (contains$2(receivingData.channels, ExclusivityChannel) || contains$2(receivingData.channels, closeTooltips())) {\n                            if (receivingData.data.closedTooltip && state.isShowing()) {\n                                receivingData.data.closedTooltip();\n                            }\n                            hide(comp);\n                        }\n                    }\n                }),\n                runOnDetached((comp) => {\n                    hide(comp);\n                })\n            ],\n            (getEvents())\n        ]));\n    };\n\n    var ActiveTooltipping = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        events: events$2\n    });\n\n    var TooltippingSchema = [\n        required$1('lazySink'),\n        required$1('tooltipDom'),\n        defaulted('exclusive', true),\n        defaulted('tooltipComponents', []),\n        defaultedFunction('delayForShow', constant$1(300)),\n        defaultedFunction('delayForHide', constant$1(100)),\n        defaultedFunction('onSetup', noop),\n        defaultedStringEnum('mode', 'normal', ['normal', 'follow-highlight', 'children-keyboard-focus', 'children-normal']),\n        defaulted('anchor', (comp) => ({\n            type: 'hotspot',\n            hotspot: comp,\n            layouts: {\n                onLtr: constant$1([south$2, north$2, southeast$2, northeast$2, southwest$2, northwest$2]),\n                onRtl: constant$1([south$2, north$2, southeast$2, northeast$2, southwest$2, northwest$2])\n            },\n            bubble: nu$6(0, -2, {}),\n        })),\n        onHandler('onHide'),\n        onHandler('onShow'),\n    ];\n\n    const init$3 = () => {\n        const enabled = Cell(true);\n        const timer = value$2();\n        const popup = value$2();\n        const clearTimer = () => {\n            timer.on(clearTimeout);\n        };\n        const resetTimer = (f, delay) => {\n            clearTimer();\n            timer.set(setTimeout(f, delay));\n        };\n        const readState = constant$1('not-implemented');\n        return nu$4({\n            getTooltip: popup.get,\n            isShowing: popup.isSet,\n            setTooltip: popup.set,\n            clearTooltip: popup.clear,\n            clearTimer,\n            resetTimer,\n            readState,\n            isEnabled: () => enabled.get(),\n            setEnabled: (setToEnabled) => enabled.set(setToEnabled)\n        });\n    };\n\n    var TooltippingState = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        init: init$3\n    });\n\n    const Tooltipping = create$3({\n        fields: TooltippingSchema,\n        name: 'tooltipping',\n        active: ActiveTooltipping,\n        state: TooltippingState,\n        apis: TooltippingApis\n    });\n\n    const exhibit = () => nu$2({\n        styles: {\n            '-webkit-user-select': 'none',\n            'user-select': 'none',\n            '-ms-user-select': 'none',\n            '-moz-user-select': '-moz-none'\n        },\n        attributes: {\n            unselectable: 'on'\n        }\n    });\n    const events$1 = () => derive$2([\n        abort(selectstart(), always)\n    ]);\n\n    var ActiveUnselecting = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        events: events$1,\n        exhibit: exhibit\n    });\n\n    const Unselecting = create$3({\n        fields: [],\n        name: 'unselecting',\n        active: ActiveUnselecting\n    });\n\n    const getAttrs = (elem) => {\n        const attributes = elem.dom.attributes !== undefined ? elem.dom.attributes : [];\n        return foldl(attributes, (b, attr) => {\n            // Make class go through the class path. Do not list it as an attribute.\n            if (attr.name === 'class') {\n                return b;\n            }\n            else {\n                return { ...b, [attr.name]: attr.value };\n            }\n        }, {});\n    };\n    const getClasses = (elem) => Array.prototype.slice.call(elem.dom.classList, 0);\n    const fromHtml = (html) => {\n        const elem = SugarElement.fromHtml(html);\n        const children$1 = children(elem);\n        const attrs = getAttrs(elem);\n        const classes = getClasses(elem);\n        const contents = children$1.length === 0 ? {} : { innerHtml: get$f(elem) };\n        return {\n            tag: name$3(elem),\n            classes,\n            attributes: attrs,\n            ...contents\n        };\n    };\n\n    const record = (spec) => {\n        const uid = isSketchSpec(spec) && hasNonNullableKey(spec, 'uid') ? spec.uid : generate$4('memento');\n        const get = (anyInSystem) => anyInSystem.getSystem().getByUid(uid).getOrDie();\n        const getOpt = (anyInSystem) => anyInSystem.getSystem().getByUid(uid).toOptional();\n        const asSpec = () => ({\n            ...spec,\n            uid\n        });\n        return {\n            get,\n            getOpt,\n            asSpec\n        };\n    };\n\n    // TODO: ^ rename the parts/ api to composites, it will break mobile alloy now if we do\n    const parts$g = AlloyParts;\n    const partType$1 = PartType;\n\n    const fromSource = (event, source) => {\n        const stopper = Cell(false);\n        const cutter = Cell(false);\n        const stop = () => {\n            stopper.set(true);\n        };\n        const cut = () => {\n            cutter.set(true);\n        };\n        return {\n            stop,\n            cut,\n            isStopped: stopper.get,\n            isCut: cutter.get,\n            event,\n            // Used only for tiered menu at the moment. It is an element, not a component\n            setSource: source.set,\n            getSource: source.get\n        };\n    };\n    // Events that come from outside of the alloy root (e.g. window scroll)\n    const fromExternal = (event) => {\n        const stopper = Cell(false);\n        const stop = () => {\n            stopper.set(true);\n        };\n        return {\n            stop,\n            cut: noop, // cutting has no meaning for a broadcasted event\n            isStopped: stopper.get,\n            isCut: never,\n            event,\n            // Nor do targets really\n            setSource: die('Cannot set source of a broadcasted event'),\n            getSource: die('Cannot get source of a broadcasted event')\n        };\n    };\n\n    const isDangerous = (event) => {\n        // Will trigger the Back button in the browser\n        const keyEv = event.raw;\n        return keyEv.which === BACKSPACE[0] && !contains$2(['input', 'textarea'], name$3(event.target)) && !closest$1(event.target, '[contenteditable=\"true\"]');\n    };\n    const setup$d = (container, rawSettings) => {\n        const settings = {\n            stopBackspace: true,\n            ...rawSettings\n        };\n        const pointerEvents = [\n            'touchstart',\n            'touchmove',\n            'touchend',\n            'touchcancel',\n            'gesturestart',\n            'mousedown',\n            'mouseup',\n            'mouseover',\n            'mousemove',\n            'mouseout',\n            'click',\n            'pointerdown',\n            'pointermove',\n            'pointerup',\n            'lostpointercapture'\n        ];\n        const tapEvent = monitor(settings);\n        // These events are just passed through ... no additional processing\n        const simpleEvents = map$2(pointerEvents.concat([\n            'selectstart',\n            'input',\n            'contextmenu',\n            'change',\n            'transitionend',\n            'transitioncancel',\n            // Test the drag events\n            'drag',\n            'dragstart',\n            'dragend',\n            'dragenter',\n            'dragleave',\n            'dragover',\n            'drop',\n            'keyup'\n        ]), (type) => bind$1(container, type, (event) => {\n            tapEvent.fireIfReady(event, type).each((tapStopped) => {\n                if (tapStopped) {\n                    event.kill();\n                }\n            });\n            const stopped = settings.triggerEvent(type, event);\n            if (stopped) {\n                event.kill();\n            }\n        }));\n        const pasteTimeout = value$2();\n        const onPaste = bind$1(container, 'paste', (event) => {\n            tapEvent.fireIfReady(event, 'paste').each((tapStopped) => {\n                if (tapStopped) {\n                    event.kill();\n                }\n            });\n            const stopped = settings.triggerEvent('paste', event);\n            if (stopped) {\n                event.kill();\n            }\n            pasteTimeout.set(setTimeout(() => {\n                settings.triggerEvent(postPaste(), event);\n            }, 0));\n        });\n        const onKeydown = bind$1(container, 'keydown', (event) => {\n            // Prevent default of backspace when not in input fields.\n            const stopped = settings.triggerEvent('keydown', event);\n            if (stopped) {\n                event.kill();\n            }\n            else if (settings.stopBackspace && isDangerous(event)) {\n                event.prevent();\n            }\n        });\n        const onFocusIn = bind$1(container, 'focusin', (event) => {\n            const stopped = settings.triggerEvent('focusin', event);\n            if (stopped) {\n                event.kill();\n            }\n        });\n        const focusoutTimeout = value$2();\n        const onFocusOut = bind$1(container, 'focusout', (event) => {\n            const stopped = settings.triggerEvent('focusout', event);\n            if (stopped) {\n                event.kill();\n            }\n            // INVESTIGATE: Come up with a better way of doing this. Related target can be used, but not on FF.\n            // It allows the active element to change before firing the blur that we will listen to\n            // for things like closing popups\n            focusoutTimeout.set(setTimeout(() => {\n                settings.triggerEvent(postBlur(), event);\n            }, 0));\n        });\n        const unbind = () => {\n            each$1(simpleEvents, (e) => {\n                e.unbind();\n            });\n            onKeydown.unbind();\n            onFocusIn.unbind();\n            onFocusOut.unbind();\n            onPaste.unbind();\n            pasteTimeout.on(clearTimeout);\n            focusoutTimeout.on(clearTimeout);\n        };\n        return {\n            unbind\n        };\n    };\n\n    const derive = (rawEvent, rawTarget) => {\n        const source = get$h(rawEvent, 'target').getOr(rawTarget);\n        return Cell(source);\n    };\n\n    const adt = Adt.generate([\n        { stopped: [] },\n        { resume: ['element'] },\n        { complete: [] }\n    ]);\n    const doTriggerHandler = (lookup, eventType, rawEvent, target, source, logger) => {\n        const handler = lookup(eventType, target);\n        const simulatedEvent = fromSource(rawEvent, source);\n        return handler.fold(() => {\n            // No handler, so complete.\n            logger.logEventNoHandlers(eventType, target);\n            return adt.complete();\n        }, (handlerInfo) => {\n            const descHandler = handlerInfo.descHandler;\n            const eventHandler = getCurried(descHandler);\n            eventHandler(simulatedEvent);\n            // Now, check if the event was stopped.\n            if (simulatedEvent.isStopped()) {\n                logger.logEventStopped(eventType, handlerInfo.element, descHandler.purpose);\n                return adt.stopped();\n            }\n            else if (simulatedEvent.isCut()) {\n                logger.logEventCut(eventType, handlerInfo.element, descHandler.purpose);\n                return adt.complete();\n            }\n            else {\n                return parent(handlerInfo.element).fold(() => {\n                    logger.logNoParent(eventType, handlerInfo.element, descHandler.purpose);\n                    // No parent, so complete.\n                    return adt.complete();\n                }, (parent) => {\n                    logger.logEventResponse(eventType, handlerInfo.element, descHandler.purpose);\n                    // Resume at parent\n                    return adt.resume(parent);\n                });\n            }\n        });\n    };\n    const doTriggerOnUntilStopped = (lookup, eventType, rawEvent, rawTarget, source, logger) => doTriggerHandler(lookup, eventType, rawEvent, rawTarget, source, logger).fold(\n    // stopped.\n    always, \n    // Go again.\n    (parent) => doTriggerOnUntilStopped(lookup, eventType, rawEvent, parent, source, logger), \n    // completed\n    never);\n    const triggerHandler = (lookup, eventType, rawEvent, target, logger) => {\n        const source = derive(rawEvent, target);\n        return doTriggerHandler(lookup, eventType, rawEvent, target, source, logger);\n    };\n    const broadcast = (listeners, rawEvent, _logger) => {\n        const simulatedEvent = fromExternal(rawEvent);\n        each$1(listeners, (listener) => {\n            const descHandler = listener.descHandler;\n            const handler = getCurried(descHandler);\n            handler(simulatedEvent);\n        });\n        return simulatedEvent.isStopped();\n    };\n    const triggerUntilStopped = (lookup, eventType, rawEvent, logger) => triggerOnUntilStopped(lookup, eventType, rawEvent, rawEvent.target, logger);\n    const triggerOnUntilStopped = (lookup, eventType, rawEvent, rawTarget, logger) => {\n        const source = derive(rawEvent, rawTarget);\n        return doTriggerOnUntilStopped(lookup, eventType, rawEvent, rawTarget, source, logger);\n    };\n\n    const eventHandler = (element, descHandler) => ({\n        element,\n        descHandler\n    });\n    const broadcastHandler = (id, handler) => ({\n        id,\n        descHandler: handler\n    });\n    const EventRegistry = () => {\n        const registry = {};\n        const registerId = (extraArgs, id, events) => {\n            each(events, (v, k) => {\n                const handlers = registry[k] !== undefined ? registry[k] : {};\n                handlers[id] = curryArgs(v, extraArgs);\n                registry[k] = handlers;\n            });\n        };\n        const findHandler = (handlers, elem) => read(elem)\n            .bind((id) => get$h(handlers, id))\n            .map((descHandler) => eventHandler(elem, descHandler));\n        // Given just the event type, find all handlers regardless of element\n        const filterByType = (type) => get$h(registry, type)\n            .map((handlers) => mapToArray(handlers, (f, id) => broadcastHandler(id, f)))\n            .getOr([]);\n        // Given event type, and element, find the handler.\n        const find = (isAboveRoot, type, target) => get$h(registry, type)\n            .bind((handlers) => closest(target, (elem) => findHandler(handlers, elem), isAboveRoot));\n        const unregisterId = (id) => {\n            // INVESTIGATE: Find a better way than mutation if we can.\n            each(registry, (handlersById, _eventName) => {\n                if (has$2(handlersById, id)) {\n                    delete handlersById[id];\n                }\n            });\n        };\n        return {\n            registerId,\n            unregisterId,\n            filterByType,\n            find\n        };\n    };\n\n    const Registry = () => {\n        const events = EventRegistry();\n        // An index of uid -> built components\n        const components = {};\n        const readOrTag = (component) => {\n            const elem = component.element;\n            return read(elem).getOrThunk(() => \n            // No existing tag, so add one.\n            write('uid-', component.element));\n        };\n        const failOnDuplicate = (component, tagId) => {\n            const conflict = components[tagId];\n            if (conflict === component) {\n                unregister(component);\n            }\n            else {\n                throw new Error('The tagId \"' + tagId + '\" is already used by: ' + element(conflict.element) + '\\nCannot use it for: ' + element(component.element) + '\\n' +\n                    'The conflicting element is' + (inBody(conflict.element) ? ' ' : ' not ') + 'already in the DOM');\n            }\n        };\n        const register = (component) => {\n            const tagId = readOrTag(component);\n            if (hasNonNullableKey(components, tagId)) {\n                failOnDuplicate(component, tagId);\n            }\n            // Component is passed through an an extra argument to all events\n            const extraArgs = [component];\n            events.registerId(extraArgs, tagId, component.events);\n            components[tagId] = component;\n        };\n        const unregister = (component) => {\n            read(component.element).each((tagId) => {\n                delete components[tagId];\n                events.unregisterId(tagId);\n            });\n        };\n        const filter = (type) => events.filterByType(type);\n        const find = (isAboveRoot, type, target) => events.find(isAboveRoot, type, target);\n        const getById = (id) => get$h(components, id);\n        return {\n            find,\n            filter,\n            register,\n            unregister,\n            getById\n        };\n    };\n\n    const takeover = (root) => {\n        const isAboveRoot = (el) => parent(root.element).fold(always, (parent) => eq(el, parent));\n        const registry = Registry();\n        const lookup = (eventName, target) => registry.find(isAboveRoot, eventName, target);\n        const domEvents = setup$d(root.element, {\n            triggerEvent: (eventName, event) => {\n                return monitorEvent(eventName, event.target, (logger) => triggerUntilStopped(lookup, eventName, event, logger));\n            }\n        });\n        const systemApi = {\n            // This is a real system\n            debugInfo: constant$1('real'),\n            triggerEvent: (eventName, target, data) => {\n                monitorEvent(eventName, target, (logger) => \n                // The return value is not used because this is a fake event.\n                triggerOnUntilStopped(lookup, eventName, data, target, logger));\n            },\n            triggerFocus: (target, originator) => {\n                read(target).fold(() => {\n                    // When the target is not within the alloy system, dispatch a normal focus event.\n                    focus$4(target);\n                }, (_alloyId) => {\n                    monitorEvent(focus$3(), target, (logger) => {\n                        // NOTE: This will stop at first handler.\n                        triggerHandler(lookup, focus$3(), {\n                            // originator is used by the default events to ensure that focus doesn't\n                            // get called infinitely\n                            originator,\n                            kill: noop,\n                            prevent: noop,\n                            target\n                        }, target, logger);\n                        return false;\n                    });\n                });\n            },\n            triggerEscape: (comp, simulatedEvent) => {\n                systemApi.triggerEvent('keydown', comp.element, simulatedEvent.event);\n            },\n            getByUid: (uid) => {\n                return getByUid(uid);\n            },\n            getByDom: (elem) => {\n                return getByDom(elem);\n            },\n            build: build$1,\n            buildOrPatch: buildOrPatch,\n            addToGui: (c) => {\n                add(c);\n            },\n            removeFromGui: (c) => {\n                remove(c);\n            },\n            addToWorld: (c) => {\n                addToWorld(c);\n            },\n            removeFromWorld: (c) => {\n                removeFromWorld(c);\n            },\n            broadcast: (message) => {\n                broadcast$1(message);\n            },\n            broadcastOn: (channels, message) => {\n                broadcastOn(channels, message);\n            },\n            broadcastEvent: (eventName, event) => {\n                broadcastEvent(eventName, event);\n            },\n            isConnected: always\n        };\n        const addToWorld = (component) => {\n            component.connect(systemApi);\n            if (!isText(component.element)) {\n                registry.register(component);\n                each$1(component.components(), addToWorld);\n                systemApi.triggerEvent(systemInit(), component.element, { target: component.element });\n            }\n        };\n        const removeFromWorld = (component) => {\n            if (!isText(component.element)) {\n                each$1(component.components(), removeFromWorld);\n                registry.unregister(component);\n            }\n            component.disconnect();\n        };\n        const add = (component) => {\n            attach(root, component);\n        };\n        const remove = (component) => {\n            detach(component);\n        };\n        const destroy = () => {\n            // INVESTIGATE: something with registry?\n            domEvents.unbind();\n            remove$7(root.element);\n        };\n        const broadcastData = (data) => {\n            const receivers = registry.filter(receive());\n            each$1(receivers, (receiver) => {\n                const descHandler = receiver.descHandler;\n                const handler = getCurried(descHandler);\n                handler(data);\n            });\n        };\n        const broadcast$1 = (message) => {\n            broadcastData({\n                universal: true,\n                data: message\n            });\n        };\n        const broadcastOn = (channels, message) => {\n            broadcastData({\n                universal: false,\n                channels,\n                data: message\n            });\n        };\n        // This doesn't follow usual DOM bubbling. It will just dispatch on all\n        // targets that have the event. It is the general case of the more specialised\n        // \"message\". \"messages\" may actually just go away. This is used for things\n        // like window scroll.\n        const broadcastEvent = (eventName, event) => {\n            const listeners = registry.filter(eventName);\n            return broadcast(listeners, event);\n        };\n        const getByUid = (uid) => registry.getById(uid).fold(() => Result.error(new Error('Could not find component with uid: \"' + uid + '\" in system.')), Result.value);\n        const getByDom = (elem) => {\n            const uid = read(elem).getOr('not found');\n            return getByUid(uid);\n        };\n        addToWorld(root);\n        return {\n            root,\n            element: root.element,\n            destroy,\n            add,\n            remove,\n            getByUid,\n            getByDom,\n            addToWorld,\n            removeFromWorld,\n            broadcast: broadcast$1,\n            broadcastOn,\n            broadcastEvent\n        };\n    };\n\n    const pointerEvents = () => {\n        const onClick = (component, simulatedEvent) => {\n            simulatedEvent.stop();\n            emitExecute(component);\n        };\n        return [\n            // Trigger execute when clicked\n            run$1(click(), onClick),\n            run$1(tap(), onClick),\n            // Other mouse down listeners above this one should not get mousedown behaviour (like dragging)\n            cutter(touchstart()),\n            cutter(mousedown())\n        ];\n    };\n    const events = (optAction) => {\n        const executeHandler = (action) => runOnExecute$1((component, simulatedEvent) => {\n            action(component);\n            simulatedEvent.stop();\n        });\n        return derive$2(flatten([\n            // Only listen to execute if it is supplied\n            optAction.map(executeHandler).toArray(),\n            pointerEvents()\n        ]));\n    };\n\n    const factory$m = (detail) => {\n        const events$1 = events(detail.action);\n        const tag = detail.dom.tag;\n        const lookupAttr = (attr) => get$h(detail.dom, 'attributes').bind((attrs) => get$h(attrs, attr));\n        // Button tags should not have a default role of button, and only buttons should\n        // get a type of button.\n        const getModAttributes = () => {\n            if (tag === 'button') {\n                // Default to type button, unless specified otherwise\n                const type = lookupAttr('type').getOr('button');\n                // Only use a role if it is specified\n                const roleAttrs = lookupAttr('role').map((role) => ({ role })).getOr({});\n                return {\n                    type,\n                    ...roleAttrs\n                };\n            }\n            else {\n                // We are not a button, so type is irrelevant (unless specified)\n                // Default role to button\n                const role = detail.role.getOr(lookupAttr('role').getOr('button'));\n                return { role };\n            }\n        };\n        return {\n            uid: detail.uid,\n            dom: detail.dom,\n            components: detail.components,\n            events: events$1,\n            behaviours: SketchBehaviours.augment(detail.buttonBehaviours, [\n                Focusing.config({}),\n                Keying.config({\n                    mode: 'execution',\n                    // Note execution will capture keyup when the focus is on the button\n                    // on Firefox, because otherwise it will fire a click event and double\n                    // up on the action\n                    useSpace: true,\n                    useEnter: true\n                })\n            ]),\n            domModification: {\n                attributes: getModAttributes()\n            },\n            eventOrder: detail.eventOrder\n        };\n    };\n    const Button = single({\n        name: 'Button',\n        factory: factory$m,\n        configFields: [\n            defaulted('uid', undefined),\n            required$1('dom'),\n            defaulted('components', []),\n            SketchBehaviours.field('buttonBehaviours', [Focusing, Keying]),\n            option$3('action'),\n            option$3('role'),\n            defaulted('eventOrder', {})\n        ]\n    });\n\n    const schema$m = constant$1([\n        defaulted('shell', false),\n        required$1('makeItem'),\n        defaulted('setupItem', noop),\n        SketchBehaviours.field('listBehaviours', [Replacing])\n    ]);\n    const customListDetail = () => ({\n        behaviours: derive$1([\n            Replacing.config({})\n        ])\n    });\n    const itemsPart = optional({\n        name: 'items',\n        overrides: customListDetail\n    });\n    const parts$f = constant$1([\n        itemsPart\n    ]);\n    const name$1 = constant$1('CustomList');\n\n    const factory$l = (detail, components, _spec, _external) => {\n        const setItems = (list, items) => {\n            getListContainer(list).fold(() => {\n                // check that the group container existed. It may not have if the components\n                // did not list anything, and shell was false.\n                // eslint-disable-next-line no-console\n                console.error('Custom List was defined to not be a shell, but no item container was specified in components');\n                throw new Error('Custom List was defined to not be a shell, but no item container was specified in components');\n            }, (container) => {\n                // Get all the children of container, because they will be items.\n                // And then use the item setGroup api\n                const itemComps = Replacing.contents(container);\n                const numListsRequired = items.length;\n                const numListsToAdd = numListsRequired - itemComps.length;\n                const itemsToAdd = numListsToAdd > 0 ?\n                    range$2(numListsToAdd, () => detail.makeItem()) : [];\n                const itemsToRemove = itemComps.slice(numListsRequired);\n                each$1(itemsToRemove, (item) => Replacing.remove(container, item));\n                each$1(itemsToAdd, (item) => Replacing.append(container, item));\n                const builtLists = Replacing.contents(container);\n                each$1(builtLists, (item, i) => {\n                    detail.setupItem(list, item, items[i], i);\n                });\n            });\n        };\n        // In shell mode, the group overrides need to be added to the main container, and there can be no children\n        const extra = detail.shell ? { behaviours: [Replacing.config({})], components: [] } : { behaviours: [], components };\n        const getListContainer = (component) => detail.shell ? Optional.some(component) : getPart(component, detail, 'items');\n        return {\n            uid: detail.uid,\n            dom: detail.dom,\n            components: extra.components,\n            behaviours: augment(detail.listBehaviours, extra.behaviours),\n            apis: {\n                setItems\n            }\n        };\n    };\n    const CustomList = composite({\n        name: name$1(),\n        configFields: schema$m(),\n        partFields: parts$f(),\n        factory: factory$l,\n        apis: {\n            setItems: (apis, list, items) => {\n                apis.setItems(list, items);\n            }\n        }\n    });\n\n    const attribute = 'aria-controls';\n    const find$1 = (queryElem) => {\n        const dependent = closest$4(queryElem, (elem) => {\n            if (!isElement$1(elem)) {\n                return false;\n            }\n            const id = get$g(elem, 'id');\n            return id !== undefined && id.indexOf(attribute) > -1;\n        });\n        return dependent.bind((dep) => {\n            const id = get$g(dep, 'id');\n            const dos = getRootNode(dep);\n            return descendant(dos, `[${attribute}=\"${id}\"]`);\n        });\n    };\n    const manager = () => {\n        const ariaId = generate$6(attribute);\n        const link = (elem) => {\n            set$9(elem, attribute, ariaId);\n        };\n        const unlink = (elem) => {\n            remove$8(elem, attribute);\n        };\n        return {\n            id: ariaId,\n            link,\n            unlink,\n        };\n    };\n\n    const isAriaPartOf = (component, queryElem) => find$1(queryElem).exists((owner) => isPartOf(component, owner));\n    const isPartOf = (component, queryElem) => closest$2(queryElem, (el) => eq(el, component.element), never) || isAriaPartOf(component, queryElem);\n\n    const hoverEvent = 'alloy.item-hover';\n    const focusEvent = 'alloy.item-focus';\n    const toggledEvent = 'alloy.item-toggled';\n    const onHover = (item) => {\n        // Firstly, check that the focus isn't already inside the item. This\n        // is to handle situations like widgets where the widget is inside the item\n        // and it has the focus, so as you slightly adjust the mouse, you don't\n        // want to lose focus on the widget. Note, that because this isn't API based\n        // (i.e. we are manually searching for focus), it may not be that flexible.\n        if (search(item.element).isNone() || Focusing.isFocused(item)) {\n            if (!Focusing.isFocused(item)) {\n                Focusing.focus(item);\n            }\n            emitWith(item, hoverEvent, { item });\n        }\n    };\n    const onFocus$1 = (item) => {\n        emitWith(item, focusEvent, { item });\n    };\n    const onToggled = (item, state) => {\n        emitWith(item, toggledEvent, { item, state });\n    };\n    const hover = constant$1(hoverEvent);\n    const focus$1 = constant$1(focusEvent);\n    const toggled = constant$1(toggledEvent);\n\n    // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\n    const getItemRole = (detail) => detail.role.fold(() => detail.toggling\n        .map((toggling) => toggling.exclusive ? 'menuitemradio' : 'menuitemcheckbox')\n        .getOr('menuitem'), identity);\n    const getTogglingSpec = (tConfig, isOption) => ({\n        aria: {\n            mode: isOption ? 'selected' : 'checked'\n        },\n        // Filter out the additional properties that are not in Toggling Behaviour's configuration (e.g. exclusive)\n        ...filter$1(tConfig, (_value, name) => name !== 'exclusive'),\n        onToggled: (component, state) => {\n            if (isFunction(tConfig.onToggled)) {\n                tConfig.onToggled(component, state);\n            }\n            onToggled(component, state);\n        }\n    });\n    const builder$2 = (detail) => ({\n        dom: detail.dom,\n        domModification: {\n            // INVESTIGATE: If more efficient, destructure attributes out\n            ...detail.domModification,\n            attributes: {\n                'role': getItemRole(detail),\n                ...detail.domModification.attributes,\n                'aria-haspopup': detail.hasSubmenu,\n                ...(detail.hasSubmenu ? { 'aria-expanded': false } : {})\n            }\n        },\n        behaviours: SketchBehaviours.augment(detail.itemBehaviours, [\n            // Investigate, is the Toggling.revoke still necessary here?\n            detail.toggling.fold(Toggling.revoke, (tConfig) => Toggling.config(getTogglingSpec(tConfig, detail.role.exists((role) => role === 'option')))),\n            Focusing.config({\n                ignore: detail.ignoreFocus,\n                // Rationale: because nothing is focusable, when you click\n                // on the items to choose them, the focus jumps to the first\n                // focusable outer container ... often the body. If we prevent\n                // mouseDown ... that doesn't happen. But only tested on Chrome/FF.\n                stopMousedown: detail.ignoreFocus,\n                onFocus: (component) => {\n                    onFocus$1(component);\n                }\n            }),\n            Keying.config({\n                mode: 'execution'\n            }),\n            Representing.config({\n                store: {\n                    mode: 'memory',\n                    initialValue: detail.data\n                }\n            }),\n            config('item-type-events', [\n                // Treat clicks the same as a button\n                ...pointerEvents(),\n                run$1(mouseover(), onHover),\n                run$1(focusItem(), Focusing.focus)\n            ])\n        ]),\n        components: detail.components,\n        eventOrder: detail.eventOrder\n    });\n    const schema$l = [\n        required$1('data'),\n        required$1('components'),\n        required$1('dom'),\n        defaulted('hasSubmenu', false),\n        option$3('toggling'),\n        option$3('role'),\n        // Maybe this needs to have fewer behaviours\n        SketchBehaviours.field('itemBehaviours', [Toggling, Focusing, Keying, Representing]),\n        defaulted('ignoreFocus', false),\n        defaulted('domModification', {}),\n        output$1('builder', builder$2),\n        defaulted('eventOrder', {})\n    ];\n    var ItemType = schema$l;\n\n    const builder$1 = (detail) => ({\n        dom: detail.dom,\n        components: detail.components,\n        events: derive$2([\n            stopper(focusItem())\n        ])\n    });\n    const schema$k = [\n        required$1('dom'),\n        required$1('components'),\n        output$1('builder', builder$1)\n    ];\n    var SeparatorType = schema$k;\n\n    const owner$2 = constant$1('item-widget');\n    const parts$e = constant$1([\n        required({\n            name: 'widget',\n            overrides: (detail) => {\n                return {\n                    behaviours: derive$1([\n                        Representing.config({\n                            store: {\n                                mode: 'manual',\n                                getValue: (_component) => {\n                                    return detail.data;\n                                },\n                                setValue: noop\n                            }\n                        })\n                    ])\n                };\n            }\n        })\n    ]);\n\n    const builder = (detail) => {\n        const subs = substitutes(owner$2(), detail, parts$e());\n        const components = components$1(owner$2(), detail, subs.internals());\n        const focusWidget = (component) => getPart(component, detail, 'widget').map((widget) => {\n            Keying.focusIn(widget);\n            return widget;\n        });\n        const onHorizontalArrow = (component, simulatedEvent) => inside(simulatedEvent.event.target) ? Optional.none() : (() => {\n            if (detail.autofocus) {\n                simulatedEvent.setSource(component.element);\n                return Optional.none();\n            }\n            else {\n                return Optional.none();\n            }\n        })();\n        return {\n            dom: detail.dom,\n            components,\n            domModification: detail.domModification,\n            events: derive$2([\n                runOnExecute$1((component, simulatedEvent) => {\n                    focusWidget(component).each((_widget) => {\n                        simulatedEvent.stop();\n                    });\n                }),\n                run$1(mouseover(), onHover),\n                run$1(focusItem(), (component, _simulatedEvent) => {\n                    if (detail.autofocus) {\n                        focusWidget(component);\n                    }\n                    else {\n                        Focusing.focus(component);\n                    }\n                })\n            ]),\n            behaviours: SketchBehaviours.augment(detail.widgetBehaviours, [\n                Representing.config({\n                    store: {\n                        mode: 'memory',\n                        initialValue: detail.data\n                    }\n                }),\n                Focusing.config({\n                    ignore: detail.ignoreFocus,\n                    // What about stopMousedown from ItemType?\n                    onFocus: (component) => {\n                        onFocus$1(component);\n                    }\n                }),\n                Keying.config({\n                    mode: 'special',\n                    // This is required as long as Highlighting tries to focus the first thing (after focusItem fires)\n                    focusIn: detail.autofocus ? (component) => {\n                        focusWidget(component);\n                    } : revoke(),\n                    onLeft: onHorizontalArrow,\n                    onRight: onHorizontalArrow,\n                    onEscape: (component, simulatedEvent) => {\n                        // If the outer list item didn't have focus,\n                        // then focus it (i.e. escape the inner widget). Only do if not autofocusing\n                        // Autofocusing should treat the widget like it is the only item, so it should\n                        // let its outer menu handle escape\n                        if (!Focusing.isFocused(component) && !detail.autofocus) {\n                            Focusing.focus(component);\n                            return Optional.some(true);\n                        }\n                        else if (detail.autofocus) {\n                            simulatedEvent.setSource(component.element);\n                            return Optional.none();\n                        }\n                        else {\n                            return Optional.none();\n                        }\n                    }\n                })\n            ])\n        };\n    };\n    const schema$j = [\n        required$1('uid'),\n        required$1('data'),\n        required$1('components'),\n        required$1('dom'),\n        defaulted('autofocus', false),\n        defaulted('ignoreFocus', false),\n        SketchBehaviours.field('widgetBehaviours', [Representing, Focusing, Keying]),\n        defaulted('domModification', {}),\n        // We don't have the uid at this point\n        defaultUidsSchema(parts$e()),\n        output$1('builder', builder)\n    ];\n    var WidgetType = schema$j;\n\n    const itemSchema$2 = choose$1('type', {\n        widget: WidgetType,\n        item: ItemType,\n        separator: SeparatorType\n    });\n    const configureGrid = (detail, movementInfo) => ({\n        mode: 'flatgrid',\n        selector: '.' + detail.markers.item,\n        initSize: {\n            numColumns: movementInfo.initSize.numColumns,\n            numRows: movementInfo.initSize.numRows\n        },\n        focusManager: detail.focusManager\n    });\n    const configureMatrix = (detail, movementInfo) => ({\n        mode: 'matrix',\n        selectors: {\n            row: movementInfo.rowSelector,\n            cell: '.' + detail.markers.item\n        },\n        previousSelector: movementInfo.previousSelector,\n        focusManager: detail.focusManager\n    });\n    const configureMenu = (detail, _movementInfo) => ({\n        mode: 'menu',\n        selector: '.' + detail.markers.item,\n        focusManager: detail.focusManager\n    });\n    const parts$d = constant$1([\n        group({\n            factory: {\n                sketch: (spec) => {\n                    const itemInfo = asRawOrDie$1('menu.spec item', itemSchema$2, spec);\n                    return itemInfo.builder(itemInfo);\n                }\n            },\n            name: 'items',\n            unit: 'item',\n            defaults: (detail, u) => {\n                // Switch this to a common library\n                // The WidgetItemSpec is just because it has uid, and the others don't\n                // for some reason. So there is nothing guaranteeing that `u` is a WidgetItemSpec,\n                // so we should probably rework this code.\n                return has$2(u, 'uid') ? u : {\n                    ...u,\n                    uid: generate$4('item')\n                };\n            },\n            overrides: (detail, u) => {\n                return {\n                    type: u.type,\n                    ignoreFocus: detail.fakeFocus,\n                    domModification: {\n                        classes: [detail.markers.item]\n                    }\n                };\n            }\n        })\n    ]);\n    const schema$i = constant$1([\n        optionString('role'),\n        required$1('value'),\n        required$1('items'),\n        required$1('dom'),\n        required$1('components'),\n        defaulted('eventOrder', {}),\n        field('menuBehaviours', [Highlighting, Representing, Composing, Keying]),\n        defaultedOf('movement', {\n            mode: 'menu'\n        }, choose$1('mode', {\n            grid: [\n                initSize(),\n                output$1('config', configureGrid)\n            ],\n            matrix: [\n                output$1('config', configureMatrix),\n                required$1('rowSelector'),\n                defaulted('previousSelector', Optional.none),\n            ],\n            menu: [\n                output$1('config', configureMenu)\n            ]\n        })),\n        itemMarkers(),\n        defaulted('fakeFocus', false),\n        defaulted('focusManager', dom$2()),\n        onHandler('onHighlight'),\n        onHandler('onDehighlight'),\n        defaulted('showMenuRole', true),\n    ]);\n\n    const focus = constant$1('alloy.menu-focus');\n\n    const deselectOtherRadioItems = (menu, item) => {\n        // TODO: TINY-8812 - This ideally should be done in a way such that a menu can have multiple radio groups.\n        const checkedRadioItems = descendants(menu.element, '[role=\"menuitemradio\"][aria-checked=\"true\"]');\n        each$1(checkedRadioItems, (ele) => {\n            if (!eq(ele, item.element)) {\n                menu.getSystem().getByDom(ele).each((c) => {\n                    Toggling.off(c);\n                });\n            }\n        });\n    };\n    const make$6 = (detail, components, _spec, _externals) => ({\n        uid: detail.uid,\n        dom: detail.dom,\n        markers: detail.markers,\n        behaviours: augment(detail.menuBehaviours, [\n            Highlighting.config({\n                // Highlighting for a menu is selecting items inside the menu\n                highlightClass: detail.markers.selectedItem,\n                itemClass: detail.markers.item,\n                onHighlight: detail.onHighlight,\n                onDehighlight: detail.onDehighlight\n            }),\n            Representing.config({\n                store: {\n                    mode: 'memory',\n                    initialValue: detail.value\n                }\n            }),\n            Composing.config({\n                find: Optional.some\n            }),\n            Keying.config(detail.movement.config(detail, detail.movement))\n        ]),\n        events: derive$2([\n            // This is dispatched from a menu to tell an item to be highlighted.\n            run$1(focus$1(), (menu, simulatedEvent) => {\n                // Highlight the item\n                const event = simulatedEvent.event;\n                menu.getSystem().getByDom(event.target).each((item) => {\n                    Highlighting.highlight(menu, item);\n                    simulatedEvent.stop();\n                    // Trigger the focus event on the menu.\n                    emitWith(menu, focus(), { menu, item });\n                });\n            }),\n            // Highlight the item that the cursor is over. The onHighlight\n            // code needs to handle updating focus if required\n            run$1(hover(), (menu, simulatedEvent) => {\n                const item = simulatedEvent.event.item;\n                Highlighting.highlight(menu, item);\n            }),\n            // Enforce only a single radio menu item is toggled by finding any other toggled\n            // radio menu items and untoggling them when a certain item is toggled\n            run$1(toggled(), (menu, simulatedEvent) => {\n                const { item, state } = simulatedEvent.event;\n                if (state && get$g(item.element, 'role') === 'menuitemradio') {\n                    deselectOtherRadioItems(menu, item);\n                }\n            })\n        ]),\n        components,\n        eventOrder: detail.eventOrder,\n        ...detail.showMenuRole ? {\n            domModification: {\n                attributes: {\n                    role: detail.role.getOr('menu')\n                }\n            }\n        } : {}\n    });\n\n    const Menu = composite({\n        name: 'Menu',\n        configFields: schema$i(),\n        partFields: parts$d(),\n        factory: make$6\n    });\n\n    const transpose$1 = (obj) => \n    // Assumes no duplicate fields.\n    tupleMap(obj, (v, k) => ({ k: v, v: k }));\n    const trace = (items, byItem, byMenu, finish) => \n    // Given a finishing submenu (which will be the value of expansions),\n    // find the triggering item, find its menu, and repeat the process. If there\n    // is no triggering item, we are done.\n    get$h(byMenu, finish).bind((triggerItem) => get$h(items, triggerItem).bind((triggerMenu) => {\n        const rest = trace(items, byItem, byMenu, triggerMenu);\n        return Optional.some([triggerMenu].concat(rest));\n    })).getOr([]);\n    const generate$2 = (menus, expansions) => {\n        const items = {};\n        each(menus, (menuItems, menu) => {\n            each$1(menuItems, (item) => {\n                items[item] = menu;\n            });\n        });\n        const byItem = expansions;\n        const byMenu = transpose$1(expansions);\n        // For each menu, calculate the backlog of submenus to get to it.\n        const menuPaths = map$1(byMenu, (_triggerItem, submenu) => [submenu].concat(trace(items, byItem, byMenu, submenu)));\n        return map$1(items, (menu) => get$h(menuPaths, menu).getOr([menu]));\n    };\n\n    const init$2 = () => {\n        const expansions = Cell({});\n        const menus = Cell({});\n        const paths = Cell({});\n        const primary = value$2();\n        // Probably think of a better way to store this information.\n        const directory = Cell({});\n        const clear = () => {\n            expansions.set({});\n            menus.set({});\n            paths.set({});\n            primary.clear();\n        };\n        const isClear = () => primary.get().isNone();\n        const setMenuBuilt = (menuName, built) => {\n            menus.set({\n                ...menus.get(),\n                [menuName]: {\n                    type: 'prepared',\n                    menu: built\n                }\n            });\n        };\n        const setContents = (sPrimary, sMenus, sExpansions, dir) => {\n            primary.set(sPrimary);\n            expansions.set(sExpansions);\n            menus.set(sMenus);\n            directory.set(dir);\n            const sPaths = generate$2(dir, sExpansions);\n            paths.set(sPaths);\n        };\n        const getTriggeringItem = (menuValue) => find$4(expansions.get(), (v, _k) => v === menuValue);\n        const getTriggerData = (menuValue, getItemByValue, path) => getPreparedMenu(menuValue).bind((menu) => getTriggeringItem(menuValue).bind((triggeringItemValue) => getItemByValue(triggeringItemValue).map((triggeredItem) => ({\n            triggeredMenu: menu,\n            triggeringItem: triggeredItem,\n            triggeringPath: path\n        }))));\n        const getTriggeringPath = (itemValue, getItemByValue) => {\n            // Get the path up to the last item\n            const extraPath = filter$2(lookupItem(itemValue).toArray(), (menuValue) => getPreparedMenu(menuValue).isSome());\n            return get$h(paths.get(), itemValue).bind((path) => {\n                // remember the path is [ most-recent-menu, next-most-recent-menu ]\n                // convert each menu identifier into { triggeringItem: comp, menu: comp }\n                // could combine into a fold ... probably a left to reverse ... but we'll take the\n                // straightforward version when prototyping\n                const revPath = reverse(extraPath.concat(path));\n                const triggers = bind$3(revPath, (menuValue, menuIndex) => \n                // finding menuValue, it should match the trigger\n                getTriggerData(menuValue, getItemByValue, revPath.slice(0, menuIndex + 1)).fold(() => is$1(primary.get(), menuValue) ? [] : [Optional.none()], (data) => [Optional.some(data)]));\n                // Convert List<Optional<X>> to Optional<List<X>> if ALL are Some\n                return sequence(triggers);\n            });\n        };\n        // Given an item, return a list of all menus including the one that it triggered (if there is one)\n        const expand = (itemValue) => get$h(expansions.get(), itemValue).map((menu) => {\n            const current = get$h(paths.get(), itemValue).getOr([]);\n            return [menu].concat(current);\n        });\n        const collapse = (itemValue) => \n        // Look up which key has the itemValue\n        get$h(paths.get(), itemValue).bind((path) => path.length > 1 ? Optional.some(path.slice(1)) : Optional.none());\n        const refresh = (itemValue) => get$h(paths.get(), itemValue);\n        const getPreparedMenu = (menuValue) => lookupMenu(menuValue).bind(extractPreparedMenu);\n        const lookupMenu = (menuValue) => get$h(menus.get(), menuValue);\n        const lookupItem = (itemValue) => get$h(expansions.get(), itemValue);\n        const otherMenus = (path) => {\n            const menuValues = directory.get();\n            return difference(keys(menuValues), path);\n        };\n        const getPrimary = () => primary.get().bind(getPreparedMenu);\n        const getMenus = () => menus.get();\n        return {\n            setMenuBuilt,\n            setContents,\n            expand,\n            refresh,\n            collapse,\n            lookupMenu,\n            lookupItem,\n            otherMenus,\n            getPrimary,\n            getMenus,\n            clear,\n            isClear,\n            getTriggeringPath\n        };\n    };\n    const extractPreparedMenu = (prep) => prep.type === 'prepared' ? Optional.some(prep.menu) : Optional.none();\n    const LayeredState = {\n        init: init$2,\n        extractPreparedMenu\n    };\n\n    const onMenuItemHighlightedEvent = generate$6('tiered-menu-item-highlight');\n    const onMenuItemDehighlightedEvent = generate$6('tiered-menu-item-dehighlight');\n\n    const make$5 = (detail, _rawUiSpec) => {\n        const submenuParentItems = value$2();\n        // So the way to provide extra configuration for the menus that tiered menus create is just\n        // to provide different menu specs when building up the TieredData. The TieredMenu itself\n        // does not control it, except to set: markers, fakeFocus, onHighlight, and focusManager\n        const buildMenus = (container, primaryName, menus) => map$1(menus, (spec, name) => {\n            const makeSketch = () => Menu.sketch({\n                ...spec,\n                value: name,\n                // The TieredMenu markers should be inherited by the Menu. \"Markers\" are things like\n                // what is the class for the currently selected item\n                markers: detail.markers,\n                // If the TieredMenu has been configured with FakeFocus, it needs the menus that it generates\n                // to preserve that configuration. Generally, FakeFocus is used for situations where the user\n                // wants to keep focus inside some editable element (like an input, or editor content)\n                fakeFocus: detail.fakeFocus,\n                // The TieredMenu detail.onHighlight function only relates to selecting an item,\n                // not a menu, and the menuComp it is passed is the menu, not the tiered menu.\n                // This makes it a difficult handler to use for a tieredmenu, so we are\n                // deprecating it.\n                onHighlight: (menuComp, itemComp) => {\n                    // Trigger an internal event so that we can listen to it at the tieredmenu\n                    // level, and call detail.onHighlightItem handler with tmenu, menu, and item.\n                    const highlightData = {\n                        menuComp,\n                        itemComp\n                    };\n                    emitWith(menuComp, onMenuItemHighlightedEvent, highlightData);\n                },\n                onDehighlight: (menuComp, itemComp) => {\n                    const dehighlightData = {\n                        menuComp,\n                        itemComp\n                    };\n                    // Trigger an internal event so that we can listen to it at the tieredmenu\n                    // level, and call detail.onDehighlightItem handler with tmenu, menu, and item.\n                    emitWith(menuComp, onMenuItemDehighlightedEvent, dehighlightData);\n                },\n                // The Menu itself doesn't set the focusManager based on the value of fakeFocus. It only uses\n                // its fakeFocus configuration for creating items that ignore focus, but it still needs to be\n                // told which focusManager to use. Perhaps we should change this, though it does allow for more\n                // complex focusManagers in single menus.\n                focusManager: detail.fakeFocus ? highlights() : dom$2()\n            });\n            // Only build the primary at first. Build the others as needed.\n            return name === primaryName ? {\n                type: 'prepared',\n                menu: container.getSystem().build(makeSketch())\n            } : {\n                type: 'notbuilt',\n                nbMenu: makeSketch\n            };\n        });\n        const layeredState = LayeredState.init();\n        const setup = (container) => {\n            const componentMap = buildMenus(container, detail.data.primary, detail.data.menus);\n            const directory = toDirectory();\n            layeredState.setContents(detail.data.primary, componentMap, detail.data.expansions, directory);\n            return layeredState.getPrimary();\n        };\n        const getItemValue = (item) => Representing.getValue(item).value;\n        // Find the first item with value `itemValue` in any of the menus inside this tiered menu structure\n        const getItemByValue = (_container, menus, itemValue) => \n        // Can *greatly* improve the performance of this by calculating things up front.\n        findMap(menus, (menu) => {\n            if (!menu.getSystem().isConnected()) {\n                return Optional.none();\n            }\n            const candidates = Highlighting.getCandidates(menu);\n            return find$5(candidates, (c) => getItemValue(c) === itemValue);\n        });\n        const toDirectory = (_container) => map$1(detail.data.menus, (data, _menuName) => bind$3(data.items, (item) => item.type === 'separator' ? [] : [item.data.value]));\n        // This just sets the active menu. It will not set any active items.\n        const setActiveMenu = Highlighting.highlight;\n        // The item highlighted as active is either the currently active item in the menu,\n        // or the first one.\n        const setActiveMenuAndItem = (container, menu) => {\n            // Firstly, choose the active menu\n            setActiveMenu(container, menu);\n            // Then, choose the active item inside the active menu\n            Highlighting.getHighlighted(menu).orThunk(() => Highlighting.getFirst(menu)).each((item) => {\n                if (detail.fakeFocus) {\n                    // When using fakeFocus, the items won't have a tab-index, so calling focusItem on them\n                    // won't do anything. So we need to manually call highlighting, which is what fakeFocus\n                    // uses. It would probably be better to use the focusManager specified.\n                    Highlighting.highlight(menu, item);\n                }\n                else {\n                    // We don't just use Focusing.focus here, because some items can have slightly different\n                    // handling when they respond to a focusItem event. Widgets with autofocus, for example,\n                    // will trigger a Keying.focusIn instead of Focusing.focus call, because they want to move\n                    // the focus _inside_ the widget, not just to its outer level. The focusItem event\n                    // performs a similar purpose to SystemEvents.focus() and potentially, could be consolidated.\n                    dispatch(container, item.element, focusItem());\n                }\n            });\n        };\n        const getMenus = (state, menuValues) => cat(map$2(menuValues, (mv) => state.lookupMenu(mv).bind((prep) => prep.type === 'prepared' ? Optional.some(prep.menu) : Optional.none())));\n        const closeOthers = (container, state, path) => {\n            const others = getMenus(state, state.otherMenus(path));\n            each$1(others, (o) => {\n                // May not need to do the active menu thing.\n                remove$2(o.element, [detail.markers.backgroundMenu]);\n                if (!detail.stayInDom) {\n                    Replacing.remove(container, o);\n                }\n            });\n        };\n        const getSubmenuParents = (container) => submenuParentItems.get().getOrThunk(() => {\n            const r = {};\n            const items = descendants(container.element, `.${detail.markers.item}`);\n            const parentItems = filter$2(items, (i) => get$g(i, 'aria-haspopup') === 'true');\n            each$1(parentItems, (i) => {\n                container.getSystem().getByDom(i).each((itemComp) => {\n                    const key = getItemValue(itemComp);\n                    r[key] = itemComp;\n                });\n            });\n            submenuParentItems.set(r);\n            return r;\n        });\n        // Not ideal. Ideally, we would like a map of item keys to components.\n        const updateAriaExpansions = (container, path) => {\n            const parentItems = getSubmenuParents(container);\n            each(parentItems, (v, k) => {\n                // Really should turn path into a Set\n                const expanded = contains$2(path, k);\n                set$9(v.element, 'aria-expanded', expanded);\n            });\n        };\n        const updateMenuPath = (container, state, path) => Optional.from(path[0]).bind((latestMenuName) => state.lookupMenu(latestMenuName).bind((menuPrep) => {\n            if (menuPrep.type === 'notbuilt') {\n                return Optional.none();\n            }\n            else {\n                const activeMenu = menuPrep.menu;\n                const rest = getMenus(state, path.slice(1));\n                each$1(rest, (r) => {\n                    add$2(r.element, detail.markers.backgroundMenu);\n                });\n                if (!inBody(activeMenu.element)) {\n                    Replacing.append(container, premade(activeMenu));\n                }\n                // Remove the background-menu class from the active menu\n                remove$2(activeMenu.element, [detail.markers.backgroundMenu]);\n                setActiveMenuAndItem(container, activeMenu);\n                closeOthers(container, state, path);\n                return Optional.some(activeMenu);\n            }\n        }));\n        let ExpandHighlightDecision;\n        (function (ExpandHighlightDecision) {\n            ExpandHighlightDecision[ExpandHighlightDecision[\"HighlightSubmenu\"] = 0] = \"HighlightSubmenu\";\n            ExpandHighlightDecision[ExpandHighlightDecision[\"HighlightParent\"] = 1] = \"HighlightParent\";\n        })(ExpandHighlightDecision || (ExpandHighlightDecision = {}));\n        const buildIfRequired = (container, menuName, menuPrep) => {\n            if (menuPrep.type === 'notbuilt') {\n                const menu = container.getSystem().build(menuPrep.nbMenu());\n                layeredState.setMenuBuilt(menuName, menu);\n                return menu;\n            }\n            else {\n                return menuPrep.menu;\n            }\n        };\n        const expandRight = (container, item, decision = ExpandHighlightDecision.HighlightSubmenu) => {\n            if (item.hasConfigured(Disabling) && Disabling.isDisabled(item)) {\n                return Optional.some(item);\n            }\n            else {\n                const value = getItemValue(item);\n                return layeredState.expand(value).bind((path) => {\n                    // Called when submenus are opened by keyboard AND hovering navigation\n                    updateAriaExpansions(container, path);\n                    // When expanding, always select the first.\n                    return Optional.from(path[0]).bind((menuName) => layeredState.lookupMenu(menuName).bind((activeMenuPrep) => {\n                        const activeMenu = buildIfRequired(container, menuName, activeMenuPrep);\n                        // DUPE with above. Fix later.\n                        if (!inBody(activeMenu.element)) {\n                            Replacing.append(container, premade(activeMenu));\n                        }\n                        // updateMenuPath is the code which changes the active menu. We don't always\n                        // want to change the active menu. Sometimes, we just want to show it (e.g. hover)\n                        detail.onOpenSubmenu(container, item, activeMenu, reverse(path));\n                        if (decision === ExpandHighlightDecision.HighlightSubmenu) {\n                            Highlighting.highlightFirst(activeMenu);\n                            return updateMenuPath(container, layeredState, path);\n                        }\n                        else {\n                            Highlighting.dehighlightAll(activeMenu);\n                            return Optional.some(item);\n                        }\n                    }));\n                });\n            }\n        };\n        const collapseLeft = (container, item) => {\n            const value = getItemValue(item);\n            return layeredState.collapse(value).bind((path) => {\n                // Called when submenus are closed because of KEYBOARD navigation\n                updateAriaExpansions(container, path);\n                return updateMenuPath(container, layeredState, path).map((activeMenu) => {\n                    detail.onCollapseMenu(container, item, activeMenu);\n                    return activeMenu;\n                });\n            });\n        };\n        const updateView = (container, item) => {\n            const value = getItemValue(item);\n            return layeredState.refresh(value).bind((path) => {\n                // Only this function collapses irrelevant submenus when navigating by HOVERING.\n                // Does mean this is called twice when navigating by hovering, since both\n                // updateView and expandRight are called by the ItemEvents.hover() handler\n                updateAriaExpansions(container, path);\n                return updateMenuPath(container, layeredState, path);\n            });\n        };\n        const onRight = (container, item) => inside(item.element) ? Optional.none() : expandRight(container, item, ExpandHighlightDecision.HighlightSubmenu);\n        const onLeft = (container, item) => \n        // Exclude inputs, textareas etc.\n        inside(item.element) ? Optional.none() : collapseLeft(container, item);\n        const onEscape = (container, item) => collapseLeft(container, item).orThunk(() => detail.onEscape(container, item).map(() => container) // This should only fire when the user presses ESC ... not any other close.\n        );\n        const keyOnItem = (f) => (container, simulatedEvent) => {\n            // 2022-08-16 This seems to be the only code in alloy that actually uses\n            // the getSource aspect of an event. Remember, that this code is firing\n            // when an event bubbles up the tiered menu, e.g. left arrow key.\n            // The only current code that sets the source manually is in the Widget item\n            // type, and it only sets the source when it is using autofocus. Autofocus\n            // is used to essentially treat the widget like it is the top-level item, so\n            // when events originate from *within* the widget, their source is changed to\n            // the top-level item. Consider removing EventSource from alloy altogether.\n            return closest$3(simulatedEvent.getSource(), `.${detail.markers.item}`)\n                .bind((target) => container.getSystem().getByDom(target).toOptional().bind((item) => f(container, item).map(always)));\n        };\n        // NOTE: Many of these events rely on identifying the current item by information\n        // sent with the event. However, in situations where you are using fakeFocus, but\n        // the real focus is still somewhere in the menu (e.g. search bar), this will lead to\n        // an incorrect identification of the active item. Ideally, instead of pulling the\n        // item from the event, we should just use Highlighting to identify the active item,\n        // and operate on it. However, not all events will necessarily have to happen on the\n        // active item, so we need to consider all the cases before making this change. For now,\n        // there will be a known limitation that if the real focus is still inside the TieredMenu,\n        // but the menu is using fakeFocus, then the actions will operate on the wrong targets.\n        // A workaround for that is to stop or cut or redispatch the events in whichever\n        // component has the real focus.\n        // TODO: TINY-9011 Introduce proper handling of fakeFocus in TieredMenu\n        const events = derive$2([\n            // Set \"active-menu\" for the menu with focus\n            run$1(focus(), (tmenu, simulatedEvent) => {\n                // Ensure the item is actually part of this menu structure, and not part of another menu structure that's bubbling.\n                const item = simulatedEvent.event.item;\n                layeredState.lookupItem(getItemValue(item)).each(() => {\n                    const menu = simulatedEvent.event.menu;\n                    Highlighting.highlight(tmenu, menu);\n                    const value = getItemValue(simulatedEvent.event.item);\n                    layeredState.refresh(value).each((path) => closeOthers(tmenu, layeredState, path));\n                });\n            }),\n            runOnExecute$1((component, simulatedEvent) => {\n                // Trigger on execute on the targeted element\n                // I.e. clicking on menu item\n                const target = simulatedEvent.event.target;\n                component.getSystem().getByDom(target).each((item) => {\n                    const itemValue = getItemValue(item);\n                    // INVESTIGATE: I don't know if this is doing anything any more. Check.\n                    if (itemValue.indexOf('collapse-item') === 0) {\n                        collapseLeft(component, item);\n                    }\n                    expandRight(component, item, ExpandHighlightDecision.HighlightSubmenu).fold(() => {\n                        detail.onExecute(component, item);\n                    }, noop);\n                });\n            }),\n            // Open the menu as soon as it is added to the DOM\n            runOnAttached((container, _simulatedEvent) => {\n                setup(container).each((primary) => {\n                    Replacing.append(container, premade(primary));\n                    detail.onOpenMenu(container, primary);\n                    if (detail.highlightOnOpen === HighlightOnOpen.HighlightMenuAndItem) {\n                        setActiveMenuAndItem(container, primary);\n                    }\n                    else if (detail.highlightOnOpen === HighlightOnOpen.HighlightJustMenu) {\n                        setActiveMenu(container, primary);\n                    }\n                });\n            }),\n            // Listen to the events bubbling up from menu about highlighting, and trigger\n            // our handlers with tmenu, menu and item\n            run$1(onMenuItemHighlightedEvent, (tmenuComp, se) => {\n                detail.onHighlightItem(tmenuComp, se.event.menuComp, se.event.itemComp);\n            }),\n            run$1(onMenuItemDehighlightedEvent, (tmenuComp, se) => {\n                detail.onDehighlightItem(tmenuComp, se.event.menuComp, se.event.itemComp);\n            }),\n            ...(detail.navigateOnHover ? [\n                // Hide any irrelevant submenus and expand any submenus based\n                // on hovered item\n                run$1(hover(), (tmenu, simulatedEvent) => {\n                    const item = simulatedEvent.event.item;\n                    updateView(tmenu, item);\n                    expandRight(tmenu, item, ExpandHighlightDecision.HighlightParent);\n                    detail.onHover(tmenu, item);\n                })\n            ] : [])\n        ]);\n        const getActiveItem = (container) => Highlighting.getHighlighted(container).bind(Highlighting.getHighlighted);\n        const collapseMenuApi = (container) => {\n            getActiveItem(container).each((currentItem) => {\n                collapseLeft(container, currentItem);\n            });\n        };\n        const highlightPrimary = (container) => {\n            layeredState.getPrimary().each((primary) => {\n                setActiveMenuAndItem(container, primary);\n            });\n        };\n        const extractMenuFromContainer = (container) => Optional.from(container.components()[0]).filter((comp) => get$g(comp.element, 'role') === 'menu');\n        const repositionMenus = (container) => {\n            // Get the primary menu\n            const maybeActivePrimary = layeredState.getPrimary().bind((primary) => \n            // Get the triggering path (item, menu) up to the active item\n            getActiveItem(container).bind((currentItem) => {\n                const itemValue = getItemValue(currentItem);\n                const allMenus = values(layeredState.getMenus());\n                const preparedMenus = cat(map$2(allMenus, LayeredState.extractPreparedMenu));\n                return layeredState.getTriggeringPath(itemValue, (v) => getItemByValue(container, preparedMenus, v));\n            }).map((triggeringPath) => ({ primary, triggeringPath })));\n            maybeActivePrimary.fold(() => {\n                // When a menu is open but there is no activeItem, we get the menu from the container.\n                extractMenuFromContainer(container).each((primaryMenu) => {\n                    detail.onRepositionMenu(container, primaryMenu, []);\n                });\n            }, ({ primary, triggeringPath }) => {\n                // Refresh all the menus up to the active item\n                detail.onRepositionMenu(container, primary, triggeringPath);\n            });\n        };\n        const apis = {\n            collapseMenu: collapseMenuApi,\n            highlightPrimary,\n            repositionMenus\n        };\n        return {\n            uid: detail.uid,\n            dom: detail.dom,\n            markers: detail.markers,\n            behaviours: augment(detail.tmenuBehaviours, [\n                Keying.config({\n                    mode: 'special',\n                    onRight: keyOnItem(onRight),\n                    onLeft: keyOnItem(onLeft),\n                    onEscape: keyOnItem(onEscape),\n                    onTab: detail.onTab,\n                    onShiftTab: detail.onShiftTab,\n                    focusIn: (container, _keyInfo) => {\n                        layeredState.getPrimary().each((primary) => {\n                            dispatch(container, primary.element, focusItem());\n                        });\n                    }\n                }),\n                // Highlighting is used for highlighting the active menu\n                Highlighting.config({\n                    highlightClass: detail.markers.selectedMenu,\n                    itemClass: detail.markers.menu\n                }),\n                Composing.config({\n                    find: (container) => {\n                        return Highlighting.getHighlighted(container);\n                    }\n                }),\n                Replacing.config({})\n            ]),\n            eventOrder: detail.eventOrder,\n            apis,\n            events\n        };\n    };\n    const collapseItem$1 = constant$1('collapse-item');\n\n    const tieredData = (primary, menus, expansions) => ({\n        primary,\n        menus,\n        expansions\n    });\n    const singleData = (name, menu) => ({\n        primary: name,\n        menus: wrap(name, menu),\n        expansions: {}\n    });\n    const collapseItem = (text) => ({\n        value: generate$6(collapseItem$1()),\n        meta: {\n            text\n        }\n    });\n    const tieredMenu = single({\n        name: 'TieredMenu',\n        configFields: [\n            onStrictKeyboardHandler('onExecute'),\n            onStrictKeyboardHandler('onEscape'),\n            onKeyboardHandler('onTab'),\n            onKeyboardHandler('onShiftTab'),\n            onStrictHandler('onOpenMenu'),\n            onStrictHandler('onOpenSubmenu'),\n            onHandler('onRepositionMenu'),\n            onHandler('onCollapseMenu'),\n            // Ideally, we should validate that this is a valid value, but\n            // this is an number-based enum, so it would just be a number.\n            defaulted('highlightOnOpen', HighlightOnOpen.HighlightMenuAndItem),\n            requiredObjOf('data', [\n                required$1('primary'),\n                required$1('menus'),\n                required$1('expansions')\n            ]),\n            defaulted('fakeFocus', false),\n            onHandler('onHighlightItem'),\n            onHandler('onDehighlightItem'),\n            onHandler('onHover'),\n            tieredMenuMarkers(),\n            required$1('dom'),\n            defaulted('navigateOnHover', true),\n            defaulted('stayInDom', false),\n            field('tmenuBehaviours', [Keying, Highlighting, Composing, Replacing]),\n            defaulted('eventOrder', {})\n        ],\n        apis: {\n            collapseMenu: (apis, tmenu) => {\n                apis.collapseMenu(tmenu);\n            },\n            // This will highlight the primary menu AND an item in the primary menu\n            // Do not use just to set the active menu.\n            highlightPrimary: (apis, tmenu) => {\n                apis.highlightPrimary(tmenu);\n            },\n            repositionMenus: (apis, tmenu) => {\n                apis.repositionMenus(tmenu);\n            }\n        },\n        factory: make$5,\n        extraApis: {\n            tieredData,\n            singleData,\n            collapseItem\n        }\n    });\n\n    const suffix = constant$1('sink');\n    const partType = constant$1(optional({\n        name: suffix(),\n        overrides: constant$1({\n            dom: {\n                tag: 'div'\n            },\n            behaviours: derive$1([\n                Positioning.config({\n                    // TODO: Make an internal sink also be able to be used with relative layouts\n                    useFixed: always\n                })\n            ]),\n            events: derive$2([\n                // Sinks should not let keydown or click propagate\n                cutter(keydown()),\n                cutter(mousedown()),\n                cutter(click())\n            ])\n        })\n    }));\n\n    const schema$h = objOfOnly([\n        defaulted('isExtraPart', never),\n        optionObjOf('fireEventInstead', [\n            defaulted('event', dismissRequested())\n        ])\n    ]);\n    const receivingChannel$1 = (rawSpec) => {\n        const detail = asRawOrDie$1('Dismissal', schema$h, rawSpec);\n        return {\n            [dismissPopups()]: {\n                schema: objOfOnly([\n                    required$1('target')\n                ]),\n                onReceive: (sandbox, data) => {\n                    if (Sandboxing.isOpen(sandbox)) {\n                        const isPart = Sandboxing.isPartOf(sandbox, data.target) || detail.isExtraPart(sandbox, data.target);\n                        if (!isPart) {\n                            detail.fireEventInstead.fold(() => Sandboxing.close(sandbox), (fe) => emit(sandbox, fe.event));\n                        }\n                    }\n                }\n            }\n        };\n    };\n\n    const schema$g = objOfOnly([\n        optionObjOf('fireEventInstead', [\n            defaulted('event', repositionRequested())\n        ]),\n        requiredFunction('doReposition')\n    ]);\n    const receivingChannel = (rawSpec) => {\n        const detail = asRawOrDie$1('Reposition', schema$g, rawSpec);\n        return {\n            [repositionPopups()]: {\n                onReceive: (sandbox) => {\n                    if (Sandboxing.isOpen(sandbox)) {\n                        detail.fireEventInstead.fold(() => detail.doReposition(sandbox), (fe) => emit(sandbox, fe.event));\n                    }\n                }\n            }\n        };\n    };\n\n    const getAnchor = (detail, component) => {\n        const hotspot = detail.getHotspot(component).getOr(component);\n        const type = 'hotspot';\n        const overrides = detail.getAnchorOverrides();\n        return detail.layouts.fold(() => ({ type, hotspot, overrides }), (layouts) => ({ type, hotspot, overrides, layouts }));\n    };\n    const fetch$1 = (detail, mapFetch, component) => {\n        const fetcher = detail.fetch;\n        return fetcher(component).map(mapFetch);\n    };\n    const openF = (detail, mapFetch, anchor, component, sandbox, externals, highlightOnOpen) => {\n        const futureData = fetch$1(detail, mapFetch, component);\n        const getLazySink = getSink(component, detail);\n        // When Tab or Shift+Tab bubbles up from inside an open menu, close the menu,\n        // refocus the trigger, and re-emit the keydown so the trigger's parent\n        // (toolbar, menubar, etc.) handles it via its own Keying config.\n        const onTabOutOfMenu = (_tmenu, se) => {\n            Focusing.focus(component);\n            emitWith(component, 'keydown', { raw: se.event.raw });\n            Sandboxing.close(sandbox);\n            return Optional.some(true);\n        };\n        // TODO: Make this potentially a single menu also\n        return futureData.map((tdata) => tdata.bind((data) => {\n            const primaryMenu = data.menus[data.primary];\n            Optional.from(primaryMenu).each((menu) => {\n                detail.listRole.each((listRole) => {\n                    menu.role = listRole;\n                });\n            });\n            return Optional.from(tieredMenu.sketch({\n                // Externals are configured by the \"menu\" part. It's called external because it isn't contained\n                // within the DOM descendants of the dropdown. You can configure things like `fakeFocus` here.\n                ...externals.menu(),\n                uid: generate$4(''),\n                data,\n                highlightOnOpen,\n                onOpenMenu: (tmenu, menu) => {\n                    const sink = getLazySink().getOrDie();\n                    Positioning.position(sink, menu, { anchor });\n                    Sandboxing.decloak(sandbox);\n                },\n                onOpenSubmenu: (tmenu, item, submenu) => {\n                    const sink = getLazySink().getOrDie();\n                    Positioning.position(sink, submenu, {\n                        anchor: {\n                            type: 'submenu',\n                            item\n                        }\n                    });\n                    Sandboxing.decloak(sandbox);\n                },\n                onRepositionMenu: (tmenu, primaryMenu, submenuTriggers) => {\n                    const sink = getLazySink().getOrDie();\n                    Positioning.position(sink, primaryMenu, { anchor });\n                    each$1(submenuTriggers, (st) => {\n                        Positioning.position(sink, st.triggeredMenu, {\n                            anchor: { type: 'submenu', item: st.triggeringItem }\n                        });\n                    });\n                },\n                onEscape: () => {\n                    // Focus the triggering component after escaping the menu\n                    Focusing.focus(component);\n                    Sandboxing.close(sandbox);\n                    return Optional.some(true);\n                },\n                onTab: onTabOutOfMenu,\n                onShiftTab: onTabOutOfMenu\n            }));\n        }));\n    };\n    // onOpenSync is because some operations need to be applied immediately, not wrapped in a future\n    // It can avoid things like flickering due to asynchronous bouncing\n    const open = (detail, mapFetch, hotspot, sandbox, externals, onOpenSync, highlightOnOpen) => {\n        const anchor = getAnchor(detail, hotspot);\n        const processed = openF(detail, mapFetch, anchor, hotspot, sandbox, externals, highlightOnOpen);\n        return processed.map((tdata) => {\n            // If we have data, display a menu. Else, close the menu if it was open\n            tdata.fold(() => {\n                if (Sandboxing.isOpen(sandbox)) {\n                    Sandboxing.close(sandbox);\n                }\n            }, (data) => {\n                Sandboxing.cloak(sandbox);\n                Sandboxing.open(sandbox, data);\n                onOpenSync(sandbox);\n            });\n            return sandbox;\n        });\n    };\n    const close = (detail, mapFetch, component, sandbox, _externals, _onOpenSync, _highlightOnOpen) => {\n        Sandboxing.close(sandbox);\n        return Future.pure(sandbox);\n    };\n    const togglePopup = (detail, mapFetch, hotspot, externals, onOpenSync, highlightOnOpen) => {\n        const sandbox = Coupling.getCoupled(hotspot, 'sandbox');\n        const showing = Sandboxing.isOpen(sandbox);\n        const action = showing ? close : open;\n        return action(detail, mapFetch, hotspot, sandbox, externals, onOpenSync, highlightOnOpen);\n    };\n    const matchWidth = (hotspot, container, useMinWidth) => {\n        const menu = Composing.getCurrent(container).getOr(container);\n        const buttonWidth = get$c(hotspot.element);\n        if (useMinWidth) {\n            set$7(menu.element, 'min-width', buttonWidth + 'px');\n        }\n        else {\n            set$6(menu.element, buttonWidth);\n        }\n    };\n    const getSink = (anyInSystem, sinkDetail) => anyInSystem\n        .getSystem()\n        .getByUid(sinkDetail.uid + '-' + suffix())\n        .map((internalSink) => () => Result.value(internalSink))\n        .getOrThunk(() => sinkDetail.lazySink.fold(() => () => Result.error(new Error('No internal sink is specified, nor could an external sink be found')), (lazySinkFn) => () => lazySinkFn(anyInSystem)));\n    const doRepositionMenus = (sandbox) => {\n        Sandboxing.getState(sandbox).each((tmenu) => {\n            tieredMenu.repositionMenus(tmenu);\n        });\n    };\n    const makeSandbox$1 = (detail, hotspot, extras) => {\n        const ariaControls = manager();\n        const onOpen = (component, menu) => {\n            const anchor = getAnchor(detail, hotspot);\n            ariaControls.link(hotspot.element);\n            if (detail.matchWidth) {\n                matchWidth(anchor.hotspot, menu, detail.useMinWidth);\n            }\n            detail.onOpen(anchor, component, menu);\n            if (extras !== undefined && extras.onOpen !== undefined) {\n                extras.onOpen(component, menu);\n            }\n            tieredMenu.repositionMenus(menu);\n        };\n        const onClose = (component, menu) => {\n            ariaControls.unlink(hotspot.element);\n            lazySink().getOr(menu).element.dom.dispatchEvent(new window.FocusEvent('focusout'));\n            if (extras !== undefined && extras.onClose !== undefined) {\n                extras.onClose(component, menu);\n            }\n        };\n        const lazySink = getSink(hotspot, detail);\n        return {\n            dom: {\n                tag: 'div',\n                classes: detail.sandboxClasses,\n                // TODO: Add aria-selected attribute\n                attributes: {\n                    id: ariaControls.id,\n                }\n            },\n            behaviours: SketchBehaviours.augment(detail.sandboxBehaviours, [\n                Representing.config({\n                    store: {\n                        mode: 'memory',\n                        initialValue: hotspot\n                    }\n                }),\n                Sandboxing.config({\n                    onOpen,\n                    onClose,\n                    isPartOf: (container, data, queryElem) => {\n                        return isPartOf(data, queryElem) || isPartOf(hotspot, queryElem);\n                    },\n                    getAttachPoint: () => {\n                        return lazySink().getOrDie();\n                    }\n                }),\n                // The Composing of the dropdown here is the the active menu of the TieredMenu\n                // inside the sandbox.\n                Composing.config({\n                    find: (sandbox) => {\n                        return Sandboxing.getState(sandbox).bind((menu) => Composing.getCurrent(menu));\n                    }\n                }),\n                Receiving.config({\n                    channels: {\n                        ...receivingChannel$1({\n                            isExtraPart: never\n                        }),\n                        ...receivingChannel({\n                            doReposition: doRepositionMenus\n                        })\n                    }\n                })\n            ])\n        };\n    };\n    const repositionMenus = (comp) => {\n        const sandbox = Coupling.getCoupled(comp, 'sandbox');\n        doRepositionMenus(sandbox);\n    };\n\n    // TODO: Roll this back into Fields at some point\n    // Unfortunately there appears to be a cyclical dependency or something that's preventing it, but for now this will do as it's home\n    const sandboxFields = () => [\n        defaulted('sandboxClasses', []),\n        SketchBehaviours.field('sandboxBehaviours', [Composing, Receiving, Sandboxing, Representing])\n    ];\n\n    const schema$f = constant$1([\n        required$1('dom'),\n        required$1('fetch'),\n        onHandler('onOpen'),\n        onKeyboardHandler('onExecute'),\n        defaulted('getHotspot', Optional.some),\n        defaulted('getAnchorOverrides', constant$1({})),\n        schema$n(),\n        field('dropdownBehaviours', [Toggling, Coupling, Keying, Focusing]),\n        required$1('toggleClass'),\n        defaulted('eventOrder', {}),\n        option$3('lazySink'),\n        defaulted('matchWidth', false),\n        defaulted('useMinWidth', false),\n        option$3('role'),\n        option$3('listRole'),\n    ].concat(sandboxFields()));\n    const parts$c = constant$1([\n        external$1({\n            schema: [\n                tieredMenuMarkers(),\n                // Defining a defaulted field isn't necessary when dealing with\n                // external parts, because the post-boulder part spec is not passed\n                // through to any of these functions (defaults, overrides etc.). So all\n                // this does is make it a bit clearer what you should expect, but remember\n                // that the default value here is irrelevant!\n                defaulted('fakeFocus', false)\n            ],\n            name: 'menu',\n            defaults: (detail) => {\n                return {\n                    onExecute: detail.onExecute\n                };\n            }\n        }),\n        partType()\n    ]);\n\n    const factory$k = (detail, components, _spec, externals) => {\n        const lookupAttr = (attr) => get$h(detail.dom, 'attributes').bind((attrs) => get$h(attrs, attr));\n        const switchToMenu = (sandbox) => {\n            Sandboxing.getState(sandbox).each((tmenu) => {\n                // This will highlight the menu AND the item\n                tieredMenu.highlightPrimary(tmenu);\n            });\n        };\n        const togglePopup$1 = (dropdownComp, onOpenSync, highlightOnOpen) => {\n            return togglePopup(detail, identity, dropdownComp, externals, onOpenSync, highlightOnOpen);\n        };\n        const action = (component) => {\n            const onOpenSync = switchToMenu;\n            togglePopup$1(component, onOpenSync, HighlightOnOpen.HighlightMenuAndItem).get(noop);\n        };\n        const apis = {\n            expand: (comp) => {\n                if (!Toggling.isOn(comp)) {\n                    togglePopup$1(comp, noop, HighlightOnOpen.HighlightNone).get(noop);\n                }\n            },\n            open: (comp) => {\n                if (!Toggling.isOn(comp)) {\n                    togglePopup$1(comp, noop, HighlightOnOpen.HighlightMenuAndItem).get(noop);\n                }\n            },\n            refetch: (comp) => {\n                // Generally, the triggers for a refetch should make it so that the\n                // sandbox has been created, but it's not guaranteed, so we still handle the\n                // case where there isn't yet a sandbox.\n                const optSandbox = Coupling.getExistingCoupled(comp, 'sandbox');\n                return optSandbox.fold(() => {\n                    // If we don't have a sandbox, refetch is the same as open,\n                    // except we return when it is completed.\n                    return togglePopup$1(comp, noop, HighlightOnOpen.HighlightMenuAndItem)\n                        .map(noop);\n                }, (sandboxComp) => {\n                    // We are intentionally not preserving the selected items when\n                    // triggering a refetch, and will just highlight the first item.\n                    // Note: this will mean that submenus will close. If we want to start\n                    // preserving the selected items, we can't rely on the components themselves,\n                    // so we'd need to use the item and menu values through Representing.\n                    // However, be aware that alloy menus and items often have randomised values,\n                    // so these might not be reliable either.\n                    // NOTE: We use DropdownUtils.open directly, because we want it to 'open',\n                    // even if it's already open. If we just used apis.open, it wouldn't do\n                    // anything if it was already open, which means we wouldn't see the new\n                    // refetched data.\n                    return open(detail, identity, comp, \n                    // NOTE: The TieredMenu is inside the sandbox. They aren't the same component.\n                    sandboxComp, externals, noop, HighlightOnOpen.HighlightMenuAndItem).map(noop);\n                });\n            },\n            isOpen: Toggling.isOn,\n            close: (comp) => {\n                if (Toggling.isOn(comp)) {\n                    togglePopup$1(comp, noop, HighlightOnOpen.HighlightMenuAndItem).get(noop);\n                }\n            },\n            // If we are open, refresh the menus in the tiered menu system\n            repositionMenus: (comp) => {\n                if (Toggling.isOn(comp)) {\n                    repositionMenus(comp);\n                }\n            }\n        };\n        const triggerExecute = (comp, _se) => {\n            emitExecute(comp);\n            return Optional.some(true);\n        };\n        return {\n            uid: detail.uid,\n            dom: detail.dom,\n            components,\n            behaviours: augment(detail.dropdownBehaviours, [\n                Toggling.config({\n                    toggleClass: detail.toggleClass,\n                    aria: {\n                        mode: 'expanded'\n                    }\n                }),\n                Coupling.config({\n                    others: {\n                        sandbox: (hotspot) => {\n                            return makeSandbox$1(detail, hotspot, {\n                                onOpen: () => Toggling.on(hotspot),\n                                onClose: () => Toggling.off(hotspot)\n                            });\n                        }\n                    }\n                }),\n                Keying.config({\n                    mode: 'special',\n                    onSpace: triggerExecute,\n                    onEnter: triggerExecute,\n                    onDown: (comp, _se) => {\n                        if (Dropdown.isOpen(comp)) {\n                            const sandbox = Coupling.getCoupled(comp, 'sandbox');\n                            switchToMenu(sandbox);\n                        }\n                        else {\n                            Dropdown.open(comp);\n                        }\n                        return Optional.some(true);\n                    },\n                    onEscape: (comp, _se) => {\n                        if (Dropdown.isOpen(comp)) {\n                            Dropdown.close(comp);\n                            return Optional.some(true);\n                        }\n                        else {\n                            return Optional.none();\n                        }\n                    }\n                }),\n                Focusing.config({})\n            ]),\n            events: events(Optional.some(action)),\n            eventOrder: {\n                ...detail.eventOrder,\n                // Order, the button state is toggled first, so assumed !selected means close.\n                [execute$5()]: ['disabling', 'toggling', 'alloy.base.behaviour']\n            },\n            apis,\n            domModification: {\n                attributes: {\n                    'aria-haspopup': detail.listRole.getOr('true'),\n                    ...detail.role.fold(() => ({}), (role) => ({ role })),\n                    ...detail.dom.tag === 'button' ? { type: lookupAttr('type').getOr('button') } : {}\n                }\n            }\n        };\n    };\n    const Dropdown = composite({\n        name: 'Dropdown',\n        configFields: schema$f(),\n        partFields: parts$c(),\n        factory: factory$k,\n        apis: {\n            open: (apis, comp) => apis.open(comp),\n            refetch: (apis, comp) => apis.refetch(comp),\n            expand: (apis, comp) => apis.expand(comp),\n            close: (apis, comp) => apis.close(comp),\n            isOpen: (apis, comp) => apis.isOpen(comp),\n            repositionMenus: (apis, comp) => apis.repositionMenus(comp)\n        }\n    });\n\n    const owner$1 = 'form';\n    const schema$e = [\n        field('formBehaviours', [Representing])\n    ];\n    const getPartName$1 = (name) => '<alloy.field.' + name + '>';\n    const sketch$2 = (fSpec) => {\n        const parts = (() => {\n            const record = [];\n            const field = (name, config) => {\n                record.push(name);\n                return generateOne$1(owner$1, getPartName$1(name), config);\n            };\n            return {\n                field,\n                record: constant$1(record)\n            };\n        })();\n        const spec = fSpec(parts);\n        const partNames = parts.record();\n        // Unlike other sketches, a form does not know its parts in advance (as they represent each field\n        // in a particular form). Therefore, it needs to calculate the part names on the fly\n        const fieldParts = map$2(partNames, (n) => required({ name: n, pname: getPartName$1(n) }));\n        return composite$1(owner$1, schema$e, fieldParts, make$4, spec);\n    };\n    const toResult = (o, e) => o.fold(() => Result.error(e), Result.value);\n    const make$4 = (detail, components) => ({\n        uid: detail.uid,\n        dom: detail.dom,\n        components,\n        // Form has an assumption that every field must have composing, and that the composed element has representing.\n        behaviours: augment(detail.formBehaviours, [\n            Representing.config({\n                store: {\n                    mode: 'manual',\n                    getValue: (form) => {\n                        const resPs = getAllParts(form, detail);\n                        return map$1(resPs, (resPThunk, pName) => resPThunk().bind((v) => {\n                            const opt = Composing.getCurrent(v);\n                            return toResult(opt, new Error(`Cannot find a current component to extract the value from for form part '${pName}': ` + element(v.element)));\n                        }).map(Representing.getValue));\n                    },\n                    setValue: (form, values) => {\n                        each(values, (newValue, key) => {\n                            getPart(form, detail, key).each((wrapper) => {\n                                Composing.getCurrent(wrapper).each((field) => {\n                                    Representing.setValue(field, newValue);\n                                });\n                            });\n                        });\n                    }\n                }\n            })\n        ]),\n        apis: {\n            getField: (form, key) => {\n                // Returns an Optional (not a result);\n                return getPart(form, detail, key).bind(Composing.getCurrent);\n            }\n        }\n    });\n    const Form = {\n        getField: makeApi((apis, component, key) => apis.getField(component, key)),\n        sketch: sketch$2\n    };\n\n    const schema$d = constant$1([\n        required$1('dom'),\n        defaulted('shell', true),\n        field('toolbarBehaviours', [Replacing])\n    ]);\n    // TODO: Dupe with Toolbar\n    const enhanceGroups = () => ({\n        behaviours: derive$1([\n            Replacing.config({})\n        ])\n    });\n    const parts$b = constant$1([\n        // Note, is the container for putting all the groups in, not a group itself.\n        optional({\n            name: 'groups',\n            overrides: enhanceGroups\n        })\n    ]);\n\n    const factory$j = (detail, components, _spec, _externals) => {\n        const setGroups = (toolbar, groups) => {\n            getGroupContainer(toolbar).fold(() => {\n                // check that the group container existed. It may not have if the components\n                // did not list anything, and shell was false.\n                // eslint-disable-next-line no-console\n                console.error('Toolbar was defined to not be a shell, but no groups container was specified in components');\n                throw new Error('Toolbar was defined to not be a shell, but no groups container was specified in components');\n            }, (container) => {\n                Replacing.set(container, groups);\n            });\n        };\n        const getGroupContainer = (component) => detail.shell ? Optional.some(component) : getPart(component, detail, 'groups');\n        // In shell mode, the group overrides need to be added to the main container, and there can be no children\n        const extra = detail.shell ? { behaviours: [Replacing.config({})], components: [] } : { behaviours: [], components };\n        return {\n            uid: detail.uid,\n            dom: detail.dom,\n            components: extra.components,\n            behaviours: augment(detail.toolbarBehaviours, extra.behaviours),\n            apis: {\n                setGroups,\n                refresh: noop\n            },\n            domModification: {\n                attributes: {\n                    role: 'toolbar'\n                }\n            }\n        };\n    };\n    const Toolbar = composite({\n        name: 'Toolbar',\n        configFields: schema$d(),\n        partFields: parts$b(),\n        factory: factory$j,\n        apis: {\n            setGroups: (apis, toolbar, groups) => {\n                apis.setGroups(toolbar, groups);\n            }\n        }\n    });\n\n    const schema$c = constant$1([\n        markers$1(['toggledClass']),\n        required$1('lazySink'),\n        requiredFunction('fetch'),\n        optionFunction('getBounds'),\n        optionObjOf('fireDismissalEventInstead', [\n            defaulted('event', dismissRequested())\n        ]),\n        schema$n(),\n        onHandler('onToggled'),\n    ]);\n    const parts$a = constant$1([\n        external$1({\n            name: 'button',\n            overrides: (detail) => ({\n                dom: {\n                    attributes: {\n                        'aria-haspopup': 'true'\n                    }\n                },\n                buttonBehaviours: derive$1([\n                    Toggling.config({\n                        toggleClass: detail.markers.toggledClass,\n                        aria: {\n                            mode: 'expanded'\n                        },\n                        toggleOnExecute: false,\n                        /**\n                         * For FloatingToolbars, we can hook up our `onToggled` handler directly to the Toggling\n                         * because we don't have to worry about any animations.\n                         *\n                         * Unfortunately, for SlidingToolbars, Toggling is more directly hooked into the animation for growing,\n                         * so to have an event `onToggled` that doesn't care about the animation, we can't just hook into the Toggling config.\n                         */\n                        onToggled: detail.onToggled\n                    })\n                ])\n            })\n        }),\n        external$1({\n            factory: Toolbar,\n            schema: schema$d(),\n            name: 'toolbar',\n            overrides: (detail) => {\n                return {\n                    toolbarBehaviours: derive$1([\n                        Keying.config({\n                            mode: 'cyclic',\n                            onEscape: (comp) => {\n                                getPart(comp, detail, 'button').each(Focusing.focus);\n                                // Don't return true here, as we need to allow the sandbox to handle the escape to close the overflow\n                                return Optional.none();\n                            }\n                        })\n                    ])\n                };\n            }\n        })\n    ]);\n\n    const shouldSkipFocus = value$2();\n    const toggleWithoutFocusing = (button, externals) => {\n        shouldSkipFocus.set(true);\n        toggle(button, externals);\n        shouldSkipFocus.clear();\n    };\n    const toggle = (button, externals) => {\n        const toolbarSandbox = Coupling.getCoupled(button, 'toolbarSandbox');\n        if (Sandboxing.isOpen(toolbarSandbox)) {\n            Sandboxing.close(toolbarSandbox);\n        }\n        else {\n            Sandboxing.open(toolbarSandbox, externals.toolbar());\n        }\n    };\n    const position = (button, toolbar, detail, layouts) => {\n        const bounds = detail.getBounds.map((bounder) => bounder());\n        const sink = detail.lazySink(button).getOrDie();\n        Positioning.positionWithinBounds(sink, toolbar, {\n            anchor: {\n                type: 'hotspot',\n                hotspot: button,\n                layouts,\n                overrides: {\n                    maxWidthFunction: expandable()\n                }\n            }\n        }, bounds);\n    };\n    const setGroups$1 = (button, toolbar, detail, layouts, groups) => {\n        Toolbar.setGroups(toolbar, groups);\n        position(button, toolbar, detail, layouts);\n        Toggling.on(button);\n    };\n    const makeSandbox = (button, spec, detail) => {\n        const ariaControls = manager();\n        const onOpen = (sandbox, toolbar) => {\n            const skipFocus = shouldSkipFocus.get().getOr(false);\n            detail.fetch().get((groups) => {\n                setGroups$1(button, toolbar, detail, spec.layouts, groups);\n                ariaControls.link(button.element);\n                if (!skipFocus) {\n                    Keying.focusIn(toolbar);\n                }\n            });\n        };\n        const onClose = () => {\n            // Toggle and focus the button\n            Toggling.off(button);\n            if (!shouldSkipFocus.get().getOr(false)) {\n                Focusing.focus(button);\n            }\n            ariaControls.unlink(button.element);\n        };\n        return {\n            dom: {\n                tag: 'div',\n                attributes: {\n                    id: ariaControls.id\n                }\n            },\n            behaviours: derive$1([\n                Keying.config({\n                    mode: 'special',\n                    onEscape: (comp) => {\n                        Sandboxing.close(comp);\n                        return Optional.some(true);\n                    }\n                }),\n                Sandboxing.config({\n                    onOpen,\n                    onClose,\n                    isPartOf: (container, data, queryElem) => {\n                        return isPartOf(data, queryElem) || isPartOf(button, queryElem);\n                    },\n                    getAttachPoint: () => {\n                        return detail.lazySink(button).getOrDie();\n                    }\n                }),\n                Receiving.config({\n                    channels: {\n                        ...receivingChannel$1({\n                            isExtraPart: never,\n                            ...detail.fireDismissalEventInstead.map((fe) => ({ fireEventInstead: { event: fe.event } })).getOr({})\n                        }),\n                        ...receivingChannel({\n                            doReposition: () => {\n                                Sandboxing.getState(Coupling.getCoupled(button, 'toolbarSandbox')).each((toolbar) => {\n                                    position(button, toolbar, detail, spec.layouts);\n                                });\n                            }\n                        })\n                    }\n                })\n            ])\n        };\n    };\n    const factory$i = (detail, components, spec, externals) => ({\n        ...Button.sketch({\n            ...externals.button(),\n            action: (button) => {\n                toggle(button, externals);\n            },\n            buttonBehaviours: SketchBehaviours.augment({ dump: externals.button().buttonBehaviours }, [\n                Coupling.config({\n                    others: {\n                        toolbarSandbox: (button) => {\n                            return makeSandbox(button, spec, detail);\n                        }\n                    }\n                })\n            ])\n        }),\n        apis: {\n            setGroups: (button, groups) => {\n                Sandboxing.getState(Coupling.getCoupled(button, 'toolbarSandbox')).each((toolbar) => {\n                    setGroups$1(button, toolbar, detail, spec.layouts, groups);\n                });\n            },\n            reposition: (button) => {\n                Sandboxing.getState(Coupling.getCoupled(button, 'toolbarSandbox')).each((toolbar) => {\n                    position(button, toolbar, detail, spec.layouts);\n                });\n            },\n            toggle: (button) => {\n                toggle(button, externals);\n            },\n            toggleWithoutFocusing: (button) => {\n                toggleWithoutFocusing(button, externals);\n            },\n            getToolbar: (button) => {\n                return Sandboxing.getState(Coupling.getCoupled(button, 'toolbarSandbox'));\n            },\n            isOpen: (button) => {\n                return Sandboxing.isOpen(Coupling.getCoupled(button, 'toolbarSandbox'));\n            }\n        }\n    });\n    const FloatingToolbarButton = composite({\n        name: 'FloatingToolbarButton',\n        factory: factory$i,\n        configFields: schema$c(),\n        partFields: parts$a(),\n        apis: {\n            setGroups: (apis, button, groups) => {\n                apis.setGroups(button, groups);\n            },\n            reposition: (apis, button) => {\n                apis.reposition(button);\n            },\n            toggle: (apis, button) => {\n                apis.toggle(button);\n            },\n            toggleWithoutFocusing: (apis, button) => {\n                apis.toggleWithoutFocusing(button);\n            },\n            getToolbar: (apis, button) => apis.getToolbar(button),\n            isOpen: (apis, button) => apis.isOpen(button)\n        }\n    });\n\n    const schema$b = constant$1([\n        defaulted('prefix', 'form-field'),\n        field('fieldBehaviours', [Composing, Representing])\n    ]);\n    const parts$9 = constant$1([\n        optional({\n            schema: [required$1('dom')],\n            name: 'label'\n        }),\n        optional({\n            factory: {\n                sketch: (spec) => {\n                    return {\n                        uid: spec.uid,\n                        dom: {\n                            tag: 'span',\n                            styles: {\n                                display: 'none'\n                            },\n                            attributes: {\n                                'aria-hidden': 'true'\n                            },\n                            innerHtml: spec.text\n                        }\n                    };\n                }\n            },\n            schema: [required$1('text')],\n            name: 'aria-descriptor'\n        }),\n        required({\n            factory: {\n                sketch: (spec) => {\n                    const excludeFactory = exclude(spec, ['factory']);\n                    return spec.factory.sketch(excludeFactory);\n                }\n            },\n            schema: [required$1('factory')],\n            name: 'field'\n        })\n    ]);\n\n    const factory$h = (detail, components, _spec, _externals) => {\n        const behaviours = augment(detail.fieldBehaviours, [\n            Composing.config({\n                find: (container) => {\n                    return getPart(container, detail, 'field');\n                }\n            }),\n            Representing.config({\n                store: {\n                    mode: 'manual',\n                    getValue: (field) => {\n                        return Composing.getCurrent(field).bind(Representing.getValue);\n                    },\n                    setValue: (field, value) => {\n                        Composing.getCurrent(field).each((current) => {\n                            Representing.setValue(current, value);\n                        });\n                    }\n                }\n            })\n        ]);\n        const events = derive$2([\n            // Used to be systemInit\n            runOnAttached((component, _simulatedEvent) => {\n                const ps = getParts(component, detail, ['label', 'field', 'aria-descriptor']);\n                ps.field().each((field) => {\n                    const id = generate$6(detail.prefix);\n                    ps.label().each((label) => {\n                        // TODO: Find a nicer way of doing this.\n                        set$9(label.element, 'for', id);\n                        set$9(field.element, 'id', id);\n                    });\n                    ps['aria-descriptor']().each((descriptor) => {\n                        const descriptorId = generate$6(detail.prefix);\n                        set$9(descriptor.element, 'id', descriptorId);\n                        set$9(field.element, 'aria-describedby', descriptorId);\n                    });\n                });\n            })\n        ]);\n        const apis = {\n            getField: (container) => getPart(container, detail, 'field'),\n            getLabel: (container) => \n            // TODO: Use constants for part names\n            getPart(container, detail, 'label')\n        };\n        return {\n            uid: detail.uid,\n            dom: detail.dom,\n            components,\n            behaviours,\n            events,\n            apis\n        };\n    };\n    const FormField = composite({\n        name: 'FormField',\n        configFields: schema$b(),\n        partFields: parts$9(),\n        factory: factory$h,\n        apis: {\n            getField: (apis, comp) => apis.getField(comp),\n            getLabel: (apis, comp) => apis.getLabel(comp)\n        }\n    });\n\n    const schema$a = constant$1([\n        defaulted('field1Name', 'field1'),\n        defaulted('field2Name', 'field2'),\n        onStrictHandler('onLockedChange'),\n        markers$1(['lockClass']),\n        defaulted('locked', false),\n        SketchBehaviours.field('coupledFieldBehaviours', [Composing, Representing]),\n        defaultedFunction('onInput', noop)\n    ]);\n    const getField = (comp, detail, partName) => getPart(comp, detail, partName).bind(Composing.getCurrent);\n    const coupledPart = (selfName, otherName) => required({\n        factory: FormField,\n        name: selfName,\n        overrides: (detail) => {\n            return {\n                fieldBehaviours: derive$1([\n                    config('coupled-input-behaviour', [\n                        run$1(input(), (me) => {\n                            getField(me, detail, otherName).each((other) => {\n                                getPart(me, detail, 'lock').each((lock) => {\n                                    // TODO IMPROVEMENT: Allow locker to fire onLockedChange if it is turned on after being off.\n                                    if (Toggling.isOn(lock)) {\n                                        detail.onLockedChange(me, other, lock);\n                                    }\n                                    detail.onInput(me);\n                                });\n                            });\n                        })\n                    ])\n                ])\n            };\n        }\n    });\n    const parts$8 = constant$1([\n        coupledPart('field1', 'field2'),\n        coupledPart('field2', 'field1'),\n        required({\n            factory: Button,\n            schema: [\n                required$1('dom')\n            ],\n            name: 'lock',\n            overrides: (detail) => {\n                return {\n                    buttonBehaviours: derive$1([\n                        Toggling.config({\n                            selected: detail.locked,\n                            toggleClass: detail.markers.lockClass,\n                            aria: {\n                                mode: 'pressed'\n                            }\n                        })\n                    ])\n                };\n            }\n        })\n    ]);\n\n    const factory$g = (detail, components, _spec, _externals) => ({\n        uid: detail.uid,\n        dom: detail.dom,\n        components,\n        behaviours: SketchBehaviours.augment(detail.coupledFieldBehaviours, [\n            Composing.config({ find: Optional.some }),\n            Representing.config({\n                store: {\n                    mode: 'manual',\n                    getValue: (comp) => {\n                        const parts = getPartsOrDie(comp, detail, ['field1', 'field2']);\n                        return {\n                            [detail.field1Name]: Representing.getValue(parts.field1()),\n                            [detail.field2Name]: Representing.getValue(parts.field2())\n                        };\n                    },\n                    setValue: (comp, value) => {\n                        const parts = getPartsOrDie(comp, detail, ['field1', 'field2']);\n                        if (hasNonNullableKey(value, detail.field1Name)) {\n                            Representing.setValue(parts.field1(), value[detail.field1Name]);\n                        }\n                        if (hasNonNullableKey(value, detail.field2Name)) {\n                            Representing.setValue(parts.field2(), value[detail.field2Name]);\n                        }\n                    }\n                }\n            })\n        ]),\n        apis: {\n            getField1: (component) => getPart(component, detail, 'field1'),\n            getField2: (component) => getPart(component, detail, 'field2'),\n            getLock: (component) => getPart(component, detail, 'lock')\n        }\n    });\n    const FormCoupledInputs = composite({\n        name: 'FormCoupledInputs',\n        configFields: schema$a(),\n        partFields: parts$8(),\n        factory: factory$g,\n        apis: {\n            getField1: (apis, component) => apis.getField1(component),\n            getField2: (apis, component) => apis.getField2(component),\n            getLock: (apis, component) => apis.getLock(component)\n        }\n    });\n\n    const factory$f = (detail, _spec) => {\n        const options = map$2(detail.options, (option) => ({\n            dom: {\n                tag: 'option',\n                value: option.value,\n                innerHtml: option.text\n            }\n        }));\n        const initialValues = detail.data.map((v) => wrap('initialValue', v)).getOr({});\n        return {\n            uid: detail.uid,\n            dom: {\n                tag: 'select',\n                classes: detail.selectClasses,\n                attributes: detail.selectAttributes\n            },\n            components: options,\n            behaviours: augment(detail.selectBehaviours, [\n                Focusing.config({}),\n                Representing.config({\n                    store: {\n                        mode: 'manual',\n                        getValue: (select) => {\n                            return get$5(select.element);\n                        },\n                        setValue: (select, newValue) => {\n                            const firstOption = head(detail.options);\n                            // This is probably generically useful ... may become a part of Representing.\n                            const found = find$5(detail.options, (opt) => opt.value === newValue);\n                            if (found.isSome()) {\n                                set$4(select.element, newValue);\n                            }\n                            else if (select.element.dom.selectedIndex === -1 && newValue === '') {\n                                /*\n                                  Sometimes after a redial alloy tries to set a new value, but if no value has been set in the data this used to fail. Now we set the value to the first option in the list if:\n                                    The index is out of range, indicating that the list of options have changed, or was never set.\n                                    The user is not trying to set a specific value (which would be user error)\n                                */\n                                firstOption.each((value) => set$4(select.element, value.value));\n                            }\n                        },\n                        ...initialValues\n                    }\n                })\n            ])\n        };\n    };\n    const HtmlSelect = single({\n        name: 'HtmlSelect',\n        configFields: [\n            required$1('options'),\n            field('selectBehaviours', [Focusing, Representing]),\n            defaulted('selectClasses', []),\n            defaulted('selectAttributes', {}),\n            option$3('data')\n        ],\n        factory: factory$f\n    });\n\n    const makeMenu = (detail, menuSandbox, placementSpec, menuSpec, getBounds) => {\n        const lazySink = () => detail.lazySink(menuSandbox);\n        const layouts = menuSpec.type === 'horizontal' ? { layouts: {\n                onLtr: () => belowOrAbove(),\n                onRtl: () => belowOrAboveRtl()\n            } } : {};\n        const isFirstTierSubmenu = (triggeringPaths) => triggeringPaths.length === 2; // primary and first tier menu === 2 items\n        const getSubmenuLayouts = (triggeringPaths) => isFirstTierSubmenu(triggeringPaths) ? layouts : {};\n        return tieredMenu.sketch({\n            dom: {\n                tag: 'div'\n            },\n            data: menuSpec.data,\n            markers: menuSpec.menu.markers,\n            highlightOnOpen: menuSpec.menu.highlightOnOpen,\n            fakeFocus: menuSpec.menu.fakeFocus,\n            onEscape: () => {\n                // Note for the future: this should possibly also call detail.onHide\n                Sandboxing.close(menuSandbox);\n                detail.onEscape.map((handler) => handler(menuSandbox));\n                return Optional.some(true);\n            },\n            onExecute: () => {\n                return Optional.some(true);\n            },\n            onOpenMenu: (tmenu, menu) => {\n                Positioning.positionWithinBounds(lazySink().getOrDie(), menu, placementSpec, getBounds());\n            },\n            onOpenSubmenu: (tmenu, item, submenu, triggeringPaths) => {\n                const sink = lazySink().getOrDie();\n                Positioning.position(sink, submenu, {\n                    anchor: {\n                        type: 'submenu',\n                        item,\n                        ...getSubmenuLayouts(triggeringPaths)\n                    }\n                });\n            },\n            onRepositionMenu: (tmenu, primaryMenu, submenuTriggers) => {\n                const sink = lazySink().getOrDie();\n                Positioning.positionWithinBounds(sink, primaryMenu, placementSpec, getBounds());\n                each$1(submenuTriggers, (st) => {\n                    const submenuLayouts = getSubmenuLayouts(st.triggeringPath);\n                    Positioning.position(sink, st.triggeredMenu, {\n                        anchor: { type: 'submenu', item: st.triggeringItem, ...submenuLayouts }\n                    });\n                });\n            }\n        });\n    };\n    const factory$e = (detail, spec) => {\n        const isPartOfRelated = (sandbox, queryElem) => {\n            const related = detail.getRelated(sandbox);\n            return related.exists((rel) => isPartOf(rel, queryElem));\n        };\n        const setContent = (sandbox, thing) => {\n            // Keep the same location, and just change the content.\n            Sandboxing.setContent(sandbox, thing);\n        };\n        const showAt = (sandbox, thing, placementSpec) => {\n            const getBounds = Optional.none;\n            showWithinBounds(sandbox, thing, placementSpec, getBounds);\n        };\n        const showWithinBounds = (sandbox, thing, placementSpec, getBounds) => {\n            const sink = detail.lazySink(sandbox).getOrDie();\n            Sandboxing.openWhileCloaked(sandbox, thing, () => Positioning.positionWithinBounds(sink, sandbox, placementSpec, getBounds()));\n            Representing.setValue(sandbox, Optional.some({\n                mode: 'position',\n                config: placementSpec,\n                getBounds\n            }));\n        };\n        // TODO AP-191 write a test for showMenuAt\n        const showMenuAt = (sandbox, placementSpec, menuSpec) => {\n            showMenuWithinBounds(sandbox, placementSpec, menuSpec, Optional.none);\n        };\n        const showMenuWithinBounds = (sandbox, placementSpec, menuSpec, getBounds) => {\n            const menu = makeMenu(detail, sandbox, placementSpec, menuSpec, getBounds);\n            Sandboxing.open(sandbox, menu);\n            Representing.setValue(sandbox, Optional.some({\n                mode: 'menu',\n                menu\n            }));\n        };\n        const hide = (sandbox) => {\n            if (Sandboxing.isOpen(sandbox)) {\n                Representing.setValue(sandbox, Optional.none());\n                Sandboxing.close(sandbox);\n            }\n        };\n        const getContent = (sandbox) => Sandboxing.getState(sandbox);\n        const reposition = (sandbox) => {\n            if (Sandboxing.isOpen(sandbox)) {\n                Representing.getValue(sandbox).each((state) => {\n                    switch (state.mode) {\n                        case 'menu':\n                            Sandboxing.getState(sandbox).each(tieredMenu.repositionMenus);\n                            break;\n                        case 'position':\n                            const sink = detail.lazySink(sandbox).getOrDie();\n                            Positioning.positionWithinBounds(sink, sandbox, state.config, state.getBounds());\n                            break;\n                    }\n                });\n            }\n        };\n        const apis = {\n            setContent,\n            showAt,\n            showWithinBounds,\n            showMenuAt,\n            showMenuWithinBounds,\n            hide,\n            getContent,\n            reposition,\n            isOpen: Sandboxing.isOpen\n        };\n        return {\n            uid: detail.uid,\n            dom: detail.dom,\n            behaviours: augment(detail.inlineBehaviours, [\n                Sandboxing.config({\n                    isPartOf: (sandbox, data, queryElem) => {\n                        return isPartOf(data, queryElem) || isPartOfRelated(sandbox, queryElem);\n                    },\n                    getAttachPoint: (sandbox) => {\n                        return detail.lazySink(sandbox).getOrDie();\n                    },\n                    onOpen: (sandbox) => {\n                        detail.onShow(sandbox);\n                    },\n                    onClose: (sandbox) => {\n                        detail.onHide(sandbox);\n                    }\n                }),\n                Representing.config({\n                    store: {\n                        mode: 'memory',\n                        initialValue: Optional.none()\n                    }\n                }),\n                Receiving.config({\n                    channels: {\n                        ...receivingChannel$1({\n                            isExtraPart: spec.isExtraPart,\n                            ...detail.fireDismissalEventInstead.map((fe) => ({ fireEventInstead: { event: fe.event } })).getOr({})\n                        }),\n                        ...receivingChannel({\n                            ...detail.fireRepositionEventInstead.map((fe) => ({ fireEventInstead: { event: fe.event } })).getOr({}),\n                            doReposition: reposition\n                        })\n                    }\n                })\n            ]),\n            eventOrder: detail.eventOrder,\n            apis\n        };\n    };\n    const InlineView = single({\n        name: 'InlineView',\n        configFields: [\n            required$1('lazySink'),\n            onHandler('onShow'),\n            onHandler('onHide'),\n            optionFunction('onEscape'),\n            field('inlineBehaviours', [Sandboxing, Representing, Receiving]),\n            optionObjOf('fireDismissalEventInstead', [\n                defaulted('event', dismissRequested())\n            ]),\n            optionObjOf('fireRepositionEventInstead', [\n                defaulted('event', repositionRequested())\n            ]),\n            defaulted('getRelated', Optional.none),\n            defaulted('isExtraPart', never),\n            defaulted('eventOrder', Optional.none)\n        ],\n        factory: factory$e,\n        apis: {\n            showAt: (apis, component, anchor, thing) => {\n                apis.showAt(component, anchor, thing);\n            },\n            showWithinBounds: (apis, component, anchor, thing, bounds) => {\n                apis.showWithinBounds(component, anchor, thing, bounds);\n            },\n            showMenuAt: (apis, component, anchor, menuSpec) => {\n                apis.showMenuAt(component, anchor, menuSpec);\n            },\n            showMenuWithinBounds: (apis, component, anchor, menuSpec, bounds) => {\n                apis.showMenuWithinBounds(component, anchor, menuSpec, bounds);\n            },\n            hide: (apis, component) => {\n                apis.hide(component);\n            },\n            isOpen: (apis, component) => apis.isOpen(component),\n            getContent: (apis, component) => apis.getContent(component),\n            setContent: (apis, component, thing) => {\n                apis.setContent(component, thing);\n            },\n            reposition: (apis, component) => {\n                apis.reposition(component);\n            }\n        }\n    });\n\n    const schema$9 = constant$1([\n        defaultedString('type', 'text'),\n        option$3('data'),\n        defaulted('inputAttributes', {}),\n        defaulted('inputStyles', {}),\n        defaulted('tag', 'input'),\n        defaulted('inputClasses', []),\n        onHandler('onSetValue'),\n        defaultedFunction('fromInputValue', identity),\n        defaultedFunction('toInputValue', identity),\n        defaulted('styles', {}),\n        defaulted('eventOrder', {}),\n        field('inputBehaviours', [Representing, Focusing]),\n        defaulted('selectOnFocus', true)\n    ]);\n    const focusBehaviours = (detail) => derive$1([\n        Focusing.config({\n            onFocus: !detail.selectOnFocus ? noop : (component) => {\n                const input = component.element;\n                const value = get$5(input);\n                // TODO: There are probably more types that can't handle setSelectionRange\n                if (detail.type !== 'range') {\n                    input.dom.setSelectionRange(0, value.length);\n                }\n            }\n        })\n    ]);\n    const behaviours = (detail) => ({\n        ...focusBehaviours(detail),\n        ...augment(detail.inputBehaviours, [\n            Representing.config({\n                store: {\n                    mode: 'manual',\n                    // Propagating its Optional\n                    ...detail.data.map((data) => ({ initialValue: data })).getOr({}),\n                    getValue: (input) => {\n                        return detail.fromInputValue(get$5(input.element));\n                    },\n                    setValue: (input, data) => {\n                        const current = get$5(input.element);\n                        // Only set it if it has changed ... otherwise the cursor goes to the end.\n                        if (current !== data) {\n                            set$4(input.element, detail.toInputValue(data));\n                        }\n                    }\n                },\n                onSetValue: detail.onSetValue\n            })\n        ])\n    });\n    const dom$1 = (detail) => ({\n        tag: detail.tag,\n        attributes: {\n            type: detail.type,\n            ...detail.inputAttributes\n        },\n        styles: detail.inputStyles,\n        classes: detail.inputClasses\n    });\n\n    const factory$d = (detail, _spec) => ({\n        uid: detail.uid,\n        dom: dom$1(detail),\n        // No children.\n        components: [],\n        behaviours: behaviours(detail),\n        eventOrder: detail.eventOrder\n    });\n    const Input = single({\n        name: 'Input',\n        configFields: schema$9(),\n        factory: factory$d\n    });\n\n    const parts$7 = generate$5(owner$2(), parts$e());\n\n    const labelledBy = (labelledElement, labelElement) => {\n        const labelId = getOpt(labelledElement, 'id')\n            .fold(() => {\n            const id = generate$6('dialog-label');\n            set$9(labelElement, 'id', id);\n            return id;\n        }, identity);\n        set$9(labelledElement, 'aria-labelledby', labelId);\n    };\n\n    const schema$8 = constant$1([\n        required$1('lazySink'),\n        option$3('dragBlockClass'),\n        defaultedFunction('getBounds', win),\n        defaulted('useTabstopAt', always),\n        defaulted('firstTabstop', 0),\n        defaulted('eventOrder', {}),\n        defaultedStringEnum('role', 'dialog', ['dialog', 'alertdialog']),\n        field('modalBehaviours', [Keying]),\n        onKeyboardHandler('onExecute'),\n        onStrictKeyboardHandler('onEscape')\n    ]);\n    const basic = { sketch: identity };\n    const parts$6 = constant$1([\n        optional({\n            name: 'draghandle',\n            overrides: (detail, spec) => {\n                return {\n                    behaviours: derive$1([\n                        Dragging.config({\n                            mode: 'mouse',\n                            getTarget: (handle) => {\n                                return ancestor$1(handle, '[role=\"dialog\"]').getOr(handle);\n                            },\n                            blockerClass: detail.dragBlockClass.getOrDie(\n                            // TODO: Support errors in Optional getOrDie.\n                            new Error('The drag blocker class was not specified for a dialog with a drag handle: \\n' +\n                                JSON.stringify(spec, null, 2)).message),\n                            getBounds: detail.getDragBounds\n                        })\n                    ])\n                };\n            }\n        }),\n        required({\n            schema: [required$1('dom')],\n            name: 'title'\n        }),\n        required({\n            factory: basic,\n            schema: [required$1('dom')],\n            name: 'close'\n        }),\n        required({\n            factory: basic,\n            schema: [required$1('dom')],\n            name: 'body'\n        }),\n        optional({\n            factory: basic,\n            schema: [required$1('dom')],\n            name: 'footer'\n        }),\n        external$1({\n            factory: {\n                sketch: (spec, detail) => \n                // Merging should take care of the uid\n                ({\n                    ...spec,\n                    dom: detail.dom,\n                    components: detail.components\n                })\n            },\n            schema: [\n                defaulted('dom', {\n                    tag: 'div',\n                    styles: {\n                        position: 'fixed',\n                        left: '0px',\n                        top: '0px',\n                        right: '0px',\n                        bottom: '0px'\n                    }\n                }),\n                defaulted('components', [])\n            ],\n            name: 'blocker'\n        })\n    ]);\n\n    const factory$c = (detail, components, spec, externals) => {\n        const dialogComp = value$2();\n        // TODO IMPROVEMENT: Make close actually close the dialog by default!\n        const showDialog = (dialog) => {\n            dialogComp.set(dialog);\n            const sink = detail.lazySink(dialog).getOrDie();\n            const externalBlocker = externals.blocker();\n            const blocker = sink.getSystem().build({\n                ...externalBlocker,\n                components: externalBlocker.components.concat([\n                    premade(dialog)\n                ]),\n                behaviours: derive$1([\n                    Focusing.config({}),\n                    config('dialog-blocker-events', [\n                        // Ensure we use runOnSource otherwise this would cause an infinite loop, as `focusIn` would fire a `focusin` which would then get responded to and so forth\n                        runOnSource(focusin(), () => {\n                            Blocking.isBlocked(dialog) ? noop() : Keying.focusIn(dialog);\n                        })\n                    ])\n                ])\n            });\n            attach(sink, blocker);\n            Keying.focusIn(dialog);\n        };\n        const hideDialog = (dialog) => {\n            dialogComp.clear();\n            parent(dialog.element).each((blockerDom) => {\n                dialog.getSystem().getByDom(blockerDom).each((blocker) => {\n                    detach(blocker);\n                });\n            });\n        };\n        const getDialogBody = (dialog) => getPartOrDie(dialog, detail, 'body');\n        const getDialogFooter = (dialog) => getPart(dialog, detail, 'footer');\n        const setBusy = (dialog, getBusySpec) => {\n            Blocking.block(dialog, getBusySpec);\n        };\n        const setIdle = (dialog) => {\n            Blocking.unblock(dialog);\n        };\n        const modalEventsId = generate$6('modal-events');\n        const eventOrder = {\n            ...detail.eventOrder,\n            [attachedToDom()]: [modalEventsId].concat(detail.eventOrder['alloy.system.attached'] || [])\n        };\n        const browser = detect$1();\n        return {\n            uid: detail.uid,\n            dom: detail.dom,\n            components,\n            apis: {\n                show: showDialog,\n                hide: hideDialog,\n                getBody: getDialogBody,\n                getFooter: getDialogFooter,\n                setIdle,\n                setBusy\n            },\n            eventOrder,\n            domModification: {\n                attributes: {\n                    'role': detail.role,\n                    'aria-modal': 'true'\n                }\n            },\n            behaviours: augment(detail.modalBehaviours, [\n                Replacing.config({}),\n                Keying.config({\n                    mode: 'cyclic',\n                    onEnter: detail.onExecute,\n                    onEscape: detail.onEscape,\n                    useTabstopAt: detail.useTabstopAt,\n                    firstTabstop: detail.firstTabstop\n                }),\n                Blocking.config({\n                    getRoot: dialogComp.get\n                }),\n                config(modalEventsId, [\n                    runOnAttached((c) => {\n                        // TINY-10808 - Workaround to address the dialog header not being announced on VoiceOver with aria-labelledby, ideally we should use the aria-labelledby\n                        const titleElm = getPartOrDie(c, detail, 'title').element;\n                        const title = get$6(titleElm);\n                        if (isNonNullable(title) && title !== '') {\n                            if (browser.os.isMacOS()) {\n                                set$9(c.element, 'aria-label', title);\n                            }\n                            else {\n                                labelledBy(c.element, titleElm);\n                            }\n                        }\n                    })\n                ])\n            ])\n        };\n    };\n    const ModalDialog = composite({\n        name: 'ModalDialog',\n        configFields: schema$8(),\n        partFields: parts$6(),\n        factory: factory$c,\n        apis: {\n            show: (apis, dialog) => {\n                apis.show(dialog);\n            },\n            hide: (apis, dialog) => {\n                apis.hide(dialog);\n            },\n            getBody: (apis, dialog) => apis.getBody(dialog),\n            getFooter: (apis, dialog) => apis.getFooter(dialog),\n            setBusy: (apis, dialog, getBusySpec) => {\n                apis.setBusy(dialog, getBusySpec);\n            },\n            setIdle: (apis, dialog) => {\n                apis.setIdle(dialog);\n            }\n        }\n    });\n\n    const labelPart = optional({\n        schema: [required$1('dom')],\n        name: 'label'\n    });\n    const edgePart = (name) => optional({\n        name: '' + name + '-edge',\n        overrides: (detail) => {\n            const action = detail.model.manager.edgeActions[name];\n            // Not all edges have actions for all sliders.\n            // A horizontal slider will only have left and right, for instance,\n            // ignoring top, bottom and diagonal edges as they don't make sense in context of those sliders.\n            return action.fold(() => ({}), (a) => ({\n                events: derive$2([\n                    runActionExtra(touchstart(), (comp, se, d) => a(comp, d), [detail]),\n                    runActionExtra(mousedown(), (comp, se, d) => a(comp, d), [detail]),\n                    runActionExtra(mousemove(), (comp, se, det) => {\n                        if (det.mouseIsDown.get()) {\n                            a(comp, det);\n                        }\n                    }, [detail])\n                ])\n            }));\n        }\n    });\n    // When the user touches the top left edge, it should move the thumb\n    const tlEdgePart = edgePart('top-left');\n    // When the user touches the top edge, it should move the thumb\n    const tedgePart = edgePart('top');\n    // When the user touches the top right edge, it should move the thumb\n    const trEdgePart = edgePart('top-right');\n    // When the user touches the right edge, it should move the thumb\n    const redgePart = edgePart('right');\n    // When the user touches the bottom right edge, it should move the thumb\n    const brEdgePart = edgePart('bottom-right');\n    // When the user touches the bottom edge, it should move the thumb\n    const bedgePart = edgePart('bottom');\n    // When the user touches the bottom left edge, it should move the thumb\n    const blEdgePart = edgePart('bottom-left');\n    // When the user touches the left edge, it should move the thumb\n    const ledgePart = edgePart('left');\n    // The thumb part needs to have position absolute to be positioned correctly\n    const thumbPart = required({\n        name: 'thumb',\n        defaults: constant$1({\n            dom: {\n                styles: { position: 'absolute' }\n            }\n        }),\n        overrides: (detail) => {\n            return {\n                events: derive$2([\n                    // If the user touches the thumb itself, pretend they touched the spectrum instead. This\n                    // allows sliding even when they touchstart the current value\n                    redirectToPart(touchstart(), detail, 'spectrum'),\n                    redirectToPart(touchmove(), detail, 'spectrum'),\n                    redirectToPart(touchend(), detail, 'spectrum'),\n                    redirectToPart(mousedown(), detail, 'spectrum'),\n                    redirectToPart(mousemove(), detail, 'spectrum'),\n                    redirectToPart(mouseup(), detail, 'spectrum')\n                ])\n            };\n        }\n    });\n    const isShift = (event) => isShift$1(event.event);\n    const spectrumPart = required({\n        schema: [\n            customField('mouseIsDown', () => Cell(false))\n        ],\n        name: 'spectrum',\n        overrides: (detail) => {\n            const modelDetail = detail.model;\n            const model = modelDetail.manager;\n            const setValueFrom = (component, simulatedEvent) => model.getValueFromEvent(simulatedEvent).map((value) => model.setValueFrom(component, detail, value));\n            return {\n                behaviours: derive$1([\n                    // Move left and right along the spectrum\n                    Keying.config({\n                        mode: 'special',\n                        onLeft: (spectrum, event) => model.onLeft(spectrum, detail, isShift(event)),\n                        onRight: (spectrum, event) => model.onRight(spectrum, detail, isShift(event)),\n                        onUp: (spectrum, event) => model.onUp(spectrum, detail, isShift(event)),\n                        onDown: (spectrum, event) => model.onDown(spectrum, detail, isShift(event))\n                    }),\n                    Tabstopping.config({}),\n                    Focusing.config({})\n                ]),\n                events: derive$2([\n                    run$1(touchstart(), setValueFrom),\n                    run$1(touchmove(), setValueFrom),\n                    run$1(mousedown(), setValueFrom),\n                    run$1(mousemove(), (spectrum, se) => {\n                        if (detail.mouseIsDown.get()) {\n                            setValueFrom(spectrum, se);\n                        }\n                    })\n                ])\n            };\n        }\n    });\n    var SliderParts = [\n        labelPart,\n        ledgePart,\n        redgePart,\n        tedgePart,\n        bedgePart,\n        tlEdgePart,\n        trEdgePart,\n        blEdgePart,\n        brEdgePart,\n        thumbPart,\n        spectrumPart\n    ];\n\n    const _sliderChangeEvent = 'slider.change.value';\n    const sliderChangeEvent = constant$1(_sliderChangeEvent);\n    const isTouchEvent$2 = (evt) => evt.type.indexOf('touch') !== -1;\n    const getEventSource = (simulatedEvent) => {\n        const evt = simulatedEvent.event.raw;\n        if (isTouchEvent$2(evt)) {\n            const touchEvent = evt;\n            return touchEvent.touches !== undefined && touchEvent.touches.length === 1 ?\n                Optional.some(touchEvent.touches[0]).map((t) => SugarPosition(t.clientX, t.clientY)) : Optional.none();\n        }\n        else {\n            const mouseEvent = evt;\n            return mouseEvent.clientX !== undefined ? Optional.some(mouseEvent).map((me) => SugarPosition(me.clientX, me.clientY)) : Optional.none();\n        }\n    };\n\n    const t = 'top', r = 'right', b = 'bottom', l = 'left';\n    // Values\n    const minX = (detail) => detail.model.minX;\n    const minY = (detail) => detail.model.minY;\n    const min1X = (detail) => detail.model.minX - 1;\n    const min1Y = (detail) => detail.model.minY - 1;\n    const maxX = (detail) => detail.model.maxX;\n    const maxY = (detail) => detail.model.maxY;\n    const max1X = (detail) => detail.model.maxX + 1;\n    const max1Y = (detail) => detail.model.maxY + 1;\n    const range = (detail, max, min) => max(detail) - min(detail);\n    const xRange = (detail) => range(detail, maxX, minX);\n    const yRange = (detail) => range(detail, maxY, minY);\n    const halfX = (detail) => xRange(detail) / 2;\n    const halfY = (detail) => yRange(detail) / 2;\n    const step = (detail, useMultiplier) => useMultiplier ? detail.stepSize * detail.speedMultiplier : detail.stepSize;\n    const snap = (detail) => detail.snapToGrid;\n    const snapStart = (detail) => detail.snapStart;\n    const rounded = (detail) => detail.rounded;\n    // Not great but... /shrug\n    const hasEdge = (detail, edgeName) => detail[edgeName + '-edge'] !== undefined;\n    const hasLEdge = (detail) => hasEdge(detail, l);\n    const hasREdge = (detail) => hasEdge(detail, r);\n    const hasTEdge = (detail) => hasEdge(detail, t);\n    const hasBEdge = (detail) => hasEdge(detail, b);\n    // Ew, any\n    const currentValue = (detail) => detail.model.value.get();\n\n    const xyValue = (x, y) => ({\n        x,\n        y\n    });\n    const fireSliderChange$3 = (component, value) => {\n        emitWith(component, sliderChangeEvent(), { value });\n    };\n    // North West XY\n    const setToTLEdgeXY = (edge, detail) => {\n        fireSliderChange$3(edge, xyValue(min1X(detail), min1Y(detail)));\n    };\n    // North\n    const setToTEdge = (edge, detail) => {\n        fireSliderChange$3(edge, min1Y(detail));\n    };\n    // North XY\n    const setToTEdgeXY = (edge, detail) => {\n        fireSliderChange$3(edge, xyValue(halfX(detail), min1Y(detail)));\n    };\n    // North East XY\n    const setToTREdgeXY = (edge, detail) => {\n        fireSliderChange$3(edge, xyValue(max1X(detail), min1Y(detail)));\n    };\n    // East\n    const setToREdge = (edge, detail) => {\n        fireSliderChange$3(edge, max1X(detail));\n    };\n    // East XY\n    const setToREdgeXY = (edge, detail) => {\n        fireSliderChange$3(edge, xyValue(max1X(detail), halfY(detail)));\n    };\n    // South East XY\n    const setToBREdgeXY = (edge, detail) => {\n        fireSliderChange$3(edge, xyValue(max1X(detail), max1Y(detail)));\n    };\n    // South\n    const setToBEdge = (edge, detail) => {\n        fireSliderChange$3(edge, max1Y(detail));\n    };\n    // South XY\n    const setToBEdgeXY = (edge, detail) => {\n        fireSliderChange$3(edge, xyValue(halfX(detail), max1Y(detail)));\n    };\n    // South West XY\n    const setToBLEdgeXY = (edge, detail) => {\n        fireSliderChange$3(edge, xyValue(min1X(detail), max1Y(detail)));\n    };\n    // West\n    const setToLEdge = (edge, detail) => {\n        fireSliderChange$3(edge, min1X(detail));\n    };\n    // West XY\n    const setToLEdgeXY = (edge, detail) => {\n        fireSliderChange$3(edge, xyValue(min1X(detail), halfY(detail)));\n    };\n\n    const reduceBy = (value, min, max, step) => {\n        if (value < min) {\n            return value;\n        }\n        else if (value > max) {\n            return max;\n        }\n        else if (value === min) {\n            return min - 1;\n        }\n        else {\n            return Math.max(min, value - step);\n        }\n    };\n    const increaseBy = (value, min, max, step) => {\n        if (value > max) {\n            return value;\n        }\n        else if (value < min) {\n            return min;\n        }\n        else if (value === max) {\n            return max + 1;\n        }\n        else {\n            return Math.min(max, value + step);\n        }\n    };\n    const capValue = (value, min, max) => Math.max(min, Math.min(max, value));\n    const snapValueOf = (value, min, max, step, snapStart) => \n    // We are snapping by the step size. Therefore, find the nearest multiple of\n    // the step\n    snapStart.fold(() => {\n        // There is no initial snapping start, so just go from the minimum\n        const initValue = value - min;\n        const extraValue = Math.round(initValue / step) * step;\n        return capValue(min + extraValue, min - 1, max + 1);\n    }, (start) => {\n        // There is an initial snapping start, so using that as the starting point,\n        // calculate the nearest snap position based on the value\n        const remainder = (value - start) % step;\n        const adjustment = Math.round(remainder / step);\n        const rawSteps = Math.floor((value - start) / step);\n        const maxSteps = Math.floor((max - start) / step);\n        const numSteps = Math.min(maxSteps, rawSteps + adjustment);\n        const r = start + (numSteps * step);\n        return Math.max(start, r);\n    });\n    const findOffsetOf = (value, min, max) => Math.min(max, Math.max(value, min)) - min;\n    const findValueOf = (args) => {\n        const { min, max, range, value, step, snap, snapStart, rounded, hasMinEdge, hasMaxEdge, minBound, maxBound, screenRange } = args;\n        const capMin = hasMinEdge ? min - 1 : min;\n        const capMax = hasMaxEdge ? max + 1 : max;\n        if (value < minBound) {\n            return capMin;\n        }\n        else if (value > maxBound) {\n            return capMax;\n        }\n        else {\n            const offset = findOffsetOf(value, minBound, maxBound);\n            const newValue = capValue(((offset / screenRange) * range) + min, capMin, capMax);\n            if (snap && newValue >= min && newValue <= max) {\n                return snapValueOf(newValue, min, max, step, snapStart);\n            }\n            else if (rounded) {\n                return Math.round(newValue);\n            }\n            else {\n                return newValue;\n            }\n        }\n    };\n    const findOffsetOfValue$2 = (args) => {\n        const { min, max, range, value, hasMinEdge, hasMaxEdge, maxBound, maxOffset, centerMinEdge, centerMaxEdge } = args;\n        if (value < min) {\n            return hasMinEdge ? 0 : centerMinEdge;\n        }\n        else if (value > max) {\n            return hasMaxEdge ? maxBound : centerMaxEdge;\n        }\n        else {\n            // position along the slider\n            return (value - min) / range * maxOffset;\n        }\n    };\n\n    const top = 'top', right = 'right', bottom = 'bottom', left = 'left', width = 'width', height = 'height';\n    // Screen offsets from bounding client rect\n    const getBounds = (component) => component.element.dom.getBoundingClientRect();\n    const getBoundsProperty = (bounds, property) => bounds[property];\n    const getMinXBounds = (component) => {\n        const bounds = getBounds(component);\n        return getBoundsProperty(bounds, left);\n    };\n    const getMaxXBounds = (component) => {\n        const bounds = getBounds(component);\n        return getBoundsProperty(bounds, right);\n    };\n    const getMinYBounds = (component) => {\n        const bounds = getBounds(component);\n        return getBoundsProperty(bounds, top);\n    };\n    const getMaxYBounds = (component) => {\n        const bounds = getBounds(component);\n        return getBoundsProperty(bounds, bottom);\n    };\n    const getXScreenRange = (component) => {\n        const bounds = getBounds(component);\n        return getBoundsProperty(bounds, width);\n    };\n    const getYScreenRange = (component) => {\n        const bounds = getBounds(component);\n        return getBoundsProperty(bounds, height);\n    };\n    const getCenterOffsetOf = (componentMinEdge, componentMaxEdge, spectrumMinEdge) => (componentMinEdge + componentMaxEdge) / 2 - spectrumMinEdge;\n    const getXCenterOffSetOf = (component, spectrum) => {\n        const componentBounds = getBounds(component);\n        const spectrumBounds = getBounds(spectrum);\n        const componentMinEdge = getBoundsProperty(componentBounds, left);\n        const componentMaxEdge = getBoundsProperty(componentBounds, right);\n        const spectrumMinEdge = getBoundsProperty(spectrumBounds, left);\n        return getCenterOffsetOf(componentMinEdge, componentMaxEdge, spectrumMinEdge);\n    };\n    const getYCenterOffSetOf = (component, spectrum) => {\n        const componentBounds = getBounds(component);\n        const spectrumBounds = getBounds(spectrum);\n        const componentMinEdge = getBoundsProperty(componentBounds, top);\n        const componentMaxEdge = getBoundsProperty(componentBounds, bottom);\n        const spectrumMinEdge = getBoundsProperty(spectrumBounds, top);\n        return getCenterOffsetOf(componentMinEdge, componentMaxEdge, spectrumMinEdge);\n    };\n\n    // fire slider change event with x value\n    const fireSliderChange$2 = (spectrum, value) => {\n        emitWith(spectrum, sliderChangeEvent(), { value });\n    };\n    // find the value of the x offset of where the mouse was clicked from the model.\n    const findValueOfOffset$1 = (spectrum, detail, left) => {\n        const args = {\n            min: minX(detail),\n            max: maxX(detail),\n            range: xRange(detail),\n            value: left,\n            step: step(detail),\n            snap: snap(detail),\n            snapStart: snapStart(detail),\n            rounded: rounded(detail),\n            hasMinEdge: hasLEdge(detail),\n            hasMaxEdge: hasREdge(detail),\n            minBound: getMinXBounds(spectrum),\n            maxBound: getMaxXBounds(spectrum),\n            screenRange: getXScreenRange(spectrum)\n        };\n        return findValueOf(args);\n    };\n    // find the value and fire a slider change event, returning the value\n    const setValueFrom$2 = (spectrum, detail, value) => {\n        const xValue = findValueOfOffset$1(spectrum, detail, value);\n        const sliderVal = xValue;\n        fireSliderChange$2(spectrum, sliderVal);\n        return xValue;\n    };\n    // fire a slider change event with the minimum value\n    const setToMin$2 = (spectrum, detail) => {\n        const min = minX(detail);\n        fireSliderChange$2(spectrum, min);\n    };\n    // fire a slider change event with the maximum value\n    const setToMax$2 = (spectrum, detail) => {\n        const max = maxX(detail);\n        fireSliderChange$2(spectrum, max);\n    };\n    // move in a direction by step size. Fire change at the end\n    const moveBy$2 = (direction, spectrum, detail, useMultiplier) => {\n        const f = (direction > 0) ? increaseBy : reduceBy;\n        const xValue = f(currentValue(detail), minX(detail), maxX(detail), step(detail, useMultiplier));\n        fireSliderChange$2(spectrum, xValue);\n        return Optional.some(xValue);\n    };\n    const handleMovement$2 = (direction) => (spectrum, detail, useMultiplier) => moveBy$2(direction, spectrum, detail, useMultiplier).map(always);\n    // get x offset from event\n    const getValueFromEvent$2 = (simulatedEvent) => {\n        const pos = getEventSource(simulatedEvent);\n        return pos.map((p) => p.left);\n    };\n    // find the x offset of a given value from the model\n    const findOffsetOfValue$1 = (spectrum, detail, value, minEdge, maxEdge) => {\n        const minOffset = 0;\n        const maxOffset = getXScreenRange(spectrum);\n        const centerMinEdge = minEdge.bind((edge) => Optional.some(getXCenterOffSetOf(edge, spectrum))).getOr(minOffset);\n        const centerMaxEdge = maxEdge.bind((edge) => Optional.some(getXCenterOffSetOf(edge, spectrum))).getOr(maxOffset);\n        const args = {\n            min: minX(detail),\n            max: maxX(detail),\n            range: xRange(detail),\n            value,\n            hasMinEdge: hasLEdge(detail),\n            hasMaxEdge: hasREdge(detail),\n            minBound: getMinXBounds(spectrum),\n            minOffset,\n            maxBound: getMaxXBounds(spectrum),\n            maxOffset,\n            centerMinEdge,\n            centerMaxEdge\n        };\n        return findOffsetOfValue$2(args);\n    };\n    // find left offset for absolute positioning from a given value\n    const findPositionOfValue$1 = (slider, spectrum, value, minEdge, maxEdge, detail) => {\n        const offset = findOffsetOfValue$1(spectrum, detail, value, minEdge, maxEdge);\n        return (getMinXBounds(spectrum) - getMinXBounds(slider)) + offset;\n    };\n    // update the position of the thumb from the slider's current value\n    const setPositionFromValue$2 = (slider, thumb, detail, edges) => {\n        const value = currentValue(detail);\n        const pos = findPositionOfValue$1(slider, edges.getSpectrum(slider), value, edges.getLeftEdge(slider), edges.getRightEdge(slider), detail);\n        const thumbRadius = get$c(thumb.element) / 2;\n        set$7(thumb.element, 'left', (pos - thumbRadius) + 'px');\n    };\n    // Key Events\n    const onLeft$2 = handleMovement$2(-1);\n    const onRight$2 = handleMovement$2(1);\n    const onUp$2 = Optional.none;\n    const onDown$2 = Optional.none;\n    // Edge Click Actions\n    const edgeActions$2 = {\n        'top-left': Optional.none(),\n        'top': Optional.none(),\n        'top-right': Optional.none(),\n        'right': Optional.some(setToREdge),\n        'bottom-right': Optional.none(),\n        'bottom': Optional.none(),\n        'bottom-left': Optional.none(),\n        'left': Optional.some(setToLEdge)\n    };\n\n    var HorizontalModel = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        setValueFrom: setValueFrom$2,\n        setToMin: setToMin$2,\n        setToMax: setToMax$2,\n        findValueOfOffset: findValueOfOffset$1,\n        getValueFromEvent: getValueFromEvent$2,\n        findPositionOfValue: findPositionOfValue$1,\n        setPositionFromValue: setPositionFromValue$2,\n        onLeft: onLeft$2,\n        onRight: onRight$2,\n        onUp: onUp$2,\n        onDown: onDown$2,\n        edgeActions: edgeActions$2\n    });\n\n    // fire slider change event with y value\n    const fireSliderChange$1 = (spectrum, value) => {\n        emitWith(spectrum, sliderChangeEvent(), { value });\n    };\n    // find the value of the y offset of where the mouse was clicked from the model.\n    const findValueOfOffset = (spectrum, detail, top) => {\n        const args = {\n            min: minY(detail),\n            max: maxY(detail),\n            range: yRange(detail),\n            value: top,\n            step: step(detail),\n            snap: snap(detail),\n            snapStart: snapStart(detail),\n            rounded: rounded(detail),\n            hasMinEdge: hasTEdge(detail),\n            hasMaxEdge: hasBEdge(detail),\n            minBound: getMinYBounds(spectrum),\n            maxBound: getMaxYBounds(spectrum),\n            screenRange: getYScreenRange(spectrum)\n        };\n        return findValueOf(args);\n    };\n    // find the value and fire a slider change event, returning the value\n    const setValueFrom$1 = (spectrum, detail, value) => {\n        const yValue = findValueOfOffset(spectrum, detail, value);\n        const sliderVal = yValue;\n        fireSliderChange$1(spectrum, sliderVal);\n        return yValue;\n    };\n    // fire a slider change event with the minimum value\n    const setToMin$1 = (spectrum, detail) => {\n        const min = minY(detail);\n        fireSliderChange$1(spectrum, min);\n    };\n    // fire a slider change event with the maximum value\n    const setToMax$1 = (spectrum, detail) => {\n        const max = maxY(detail);\n        fireSliderChange$1(spectrum, max);\n    };\n    // move in a direction by step size. Fire change at the end\n    const moveBy$1 = (direction, spectrum, detail, useMultiplier) => {\n        const f = (direction > 0) ? increaseBy : reduceBy;\n        const yValue = f(currentValue(detail), minY(detail), maxY(detail), step(detail, useMultiplier));\n        fireSliderChange$1(spectrum, yValue);\n        return Optional.some(yValue);\n    };\n    const handleMovement$1 = (direction) => (spectrum, detail, useMultiplier) => moveBy$1(direction, spectrum, detail, useMultiplier).map(always);\n    // get y offset from event\n    const getValueFromEvent$1 = (simulatedEvent) => {\n        const pos = getEventSource(simulatedEvent);\n        return pos.map((p) => {\n            return p.top;\n        });\n    };\n    // find the y offset of a given value from the model\n    const findOffsetOfValue = (spectrum, detail, value, minEdge, maxEdge) => {\n        const minOffset = 0;\n        const maxOffset = getYScreenRange(spectrum);\n        const centerMinEdge = minEdge.bind((edge) => Optional.some(getYCenterOffSetOf(edge, spectrum))).getOr(minOffset);\n        const centerMaxEdge = maxEdge.bind((edge) => Optional.some(getYCenterOffSetOf(edge, spectrum))).getOr(maxOffset);\n        const args = {\n            min: minY(detail),\n            max: maxY(detail),\n            range: yRange(detail),\n            value,\n            hasMinEdge: hasTEdge(detail),\n            hasMaxEdge: hasBEdge(detail),\n            minBound: getMinYBounds(spectrum),\n            minOffset,\n            maxBound: getMaxYBounds(spectrum),\n            maxOffset,\n            centerMinEdge,\n            centerMaxEdge\n        };\n        return findOffsetOfValue$2(args);\n    };\n    // find left offset for absolute positioning from a given value\n    const findPositionOfValue = (slider, spectrum, value, minEdge, maxEdge, detail) => {\n        const offset = findOffsetOfValue(spectrum, detail, value, minEdge, maxEdge);\n        return (getMinYBounds(spectrum) - getMinYBounds(slider)) + offset;\n    };\n    // update the position of the thumb from the slider's current value\n    const setPositionFromValue$1 = (slider, thumb, detail, edges) => {\n        const value = currentValue(detail);\n        const pos = findPositionOfValue(slider, edges.getSpectrum(slider), value, edges.getTopEdge(slider), edges.getBottomEdge(slider), detail);\n        const thumbRadius = get$d(thumb.element) / 2;\n        set$7(thumb.element, 'top', (pos - thumbRadius) + 'px');\n    };\n    // Key Events\n    const onLeft$1 = Optional.none;\n    const onRight$1 = Optional.none;\n    const onUp$1 = handleMovement$1(-1);\n    const onDown$1 = handleMovement$1(1);\n    // Edge Click Actions\n    const edgeActions$1 = {\n        'top-left': Optional.none(),\n        'top': Optional.some(setToTEdge),\n        'top-right': Optional.none(),\n        'right': Optional.none(),\n        'bottom-right': Optional.none(),\n        'bottom': Optional.some(setToBEdge),\n        'bottom-left': Optional.none(),\n        'left': Optional.none()\n    };\n\n    var VerticalModel = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        setValueFrom: setValueFrom$1,\n        setToMin: setToMin$1,\n        setToMax: setToMax$1,\n        findValueOfOffset: findValueOfOffset,\n        getValueFromEvent: getValueFromEvent$1,\n        findPositionOfValue: findPositionOfValue,\n        setPositionFromValue: setPositionFromValue$1,\n        onLeft: onLeft$1,\n        onRight: onRight$1,\n        onUp: onUp$1,\n        onDown: onDown$1,\n        edgeActions: edgeActions$1\n    });\n\n    // fire slider change event with xy value\n    const fireSliderChange = (spectrum, value) => {\n        emitWith(spectrum, sliderChangeEvent(), { value });\n    };\n    const sliderValue = (x, y) => ({\n        x,\n        y\n    });\n    // find both values of x and y offsets of where the mouse was clicked from the model.\n    // then fire a slider change event with those values, returning the values\n    const setValueFrom = (spectrum, detail, value) => {\n        const xValue = findValueOfOffset$1(spectrum, detail, value.left);\n        const yValue = findValueOfOffset(spectrum, detail, value.top);\n        const val = sliderValue(xValue, yValue);\n        fireSliderChange(spectrum, val);\n        return val;\n    };\n    // move in a direction by step size. Fire change at the end\n    const moveBy = (direction, isVerticalMovement, spectrum, detail, useMultiplier) => {\n        const f = (direction > 0) ? increaseBy : reduceBy;\n        const xValue = isVerticalMovement ? currentValue(detail).x :\n            f(currentValue(detail).x, minX(detail), maxX(detail), step(detail, useMultiplier));\n        const yValue = !isVerticalMovement ? currentValue(detail).y :\n            f(currentValue(detail).y, minY(detail), maxY(detail), step(detail, useMultiplier));\n        fireSliderChange(spectrum, sliderValue(xValue, yValue));\n        return Optional.some(xValue);\n    };\n    const handleMovement = (direction, isVerticalMovement) => (spectrum, detail, useMultiplier) => moveBy(direction, isVerticalMovement, spectrum, detail, useMultiplier).map(always);\n    // fire a slider change event with the minimum value\n    const setToMin = (spectrum, detail) => {\n        const mX = minX(detail);\n        const mY = minY(detail);\n        fireSliderChange(spectrum, sliderValue(mX, mY));\n    };\n    // fire a slider change event with the maximum value\n    const setToMax = (spectrum, detail) => {\n        const mX = maxX(detail);\n        const mY = maxY(detail);\n        fireSliderChange(spectrum, sliderValue(mX, mY));\n    };\n    // get event data as a SugarPosition\n    const getValueFromEvent = (simulatedEvent) => getEventSource(simulatedEvent);\n    // update the position of the thumb from the slider's current value\n    const setPositionFromValue = (slider, thumb, detail, edges) => {\n        const value = currentValue(detail);\n        const xPos = findPositionOfValue$1(slider, edges.getSpectrum(slider), value.x, edges.getLeftEdge(slider), edges.getRightEdge(slider), detail);\n        const yPos = findPositionOfValue(slider, edges.getSpectrum(slider), value.y, edges.getTopEdge(slider), edges.getBottomEdge(slider), detail);\n        const thumbXRadius = get$c(thumb.element) / 2;\n        const thumbYRadius = get$d(thumb.element) / 2;\n        set$7(thumb.element, 'left', (xPos - thumbXRadius) + 'px');\n        set$7(thumb.element, 'top', (yPos - thumbYRadius) + 'px');\n    };\n    // Key Events\n    const onLeft = handleMovement(-1, false);\n    const onRight = handleMovement(1, false);\n    const onUp = handleMovement(-1, true);\n    const onDown = handleMovement(1, true);\n    // Edge Click Actions\n    const edgeActions = {\n        'top-left': Optional.some(setToTLEdgeXY),\n        'top': Optional.some(setToTEdgeXY),\n        'top-right': Optional.some(setToTREdgeXY),\n        'right': Optional.some(setToREdgeXY),\n        'bottom-right': Optional.some(setToBREdgeXY),\n        'bottom': Optional.some(setToBEdgeXY),\n        'bottom-left': Optional.some(setToBLEdgeXY),\n        'left': Optional.some(setToLEdgeXY)\n    };\n\n    var TwoDModel = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        setValueFrom: setValueFrom,\n        setToMin: setToMin,\n        setToMax: setToMax,\n        getValueFromEvent: getValueFromEvent,\n        setPositionFromValue: setPositionFromValue,\n        onLeft: onLeft,\n        onRight: onRight,\n        onUp: onUp,\n        onDown: onDown,\n        edgeActions: edgeActions\n    });\n\n    const SliderSchema = [\n        defaulted('stepSize', 1),\n        defaulted('speedMultiplier', 10),\n        defaulted('onChange', noop),\n        defaulted('onChoose', noop),\n        defaulted('onInit', noop),\n        defaulted('onDragStart', noop),\n        defaulted('onDragEnd', noop),\n        defaulted('snapToGrid', false),\n        defaulted('rounded', true),\n        option$3('snapStart'),\n        requiredOf('model', choose$1('mode', {\n            x: [\n                defaulted('minX', 0),\n                defaulted('maxX', 100),\n                customField('value', (spec) => Cell(spec.mode.minX)),\n                required$1('getInitialValue'),\n                output$1('manager', HorizontalModel)\n            ],\n            y: [\n                defaulted('minY', 0),\n                defaulted('maxY', 100),\n                customField('value', (spec) => Cell(spec.mode.minY)),\n                required$1('getInitialValue'),\n                output$1('manager', VerticalModel)\n            ],\n            xy: [\n                defaulted('minX', 0),\n                defaulted('maxX', 100),\n                defaulted('minY', 0),\n                defaulted('maxY', 100),\n                customField('value', (spec) => Cell({\n                    x: spec.mode.minX,\n                    y: spec.mode.minY\n                })),\n                required$1('getInitialValue'),\n                output$1('manager', TwoDModel)\n            ]\n        })),\n        field('sliderBehaviours', [Keying, Representing]),\n        customField('mouseIsDown', () => Cell(false))\n    ];\n\n    const sketch$1 = (detail, components, _spec, _externals) => {\n        const getThumb = (component) => getPartOrDie(component, detail, 'thumb');\n        const getSpectrum = (component) => getPartOrDie(component, detail, 'spectrum');\n        const getLeftEdge = (component) => getPart(component, detail, 'left-edge');\n        const getRightEdge = (component) => getPart(component, detail, 'right-edge');\n        const getTopEdge = (component) => getPart(component, detail, 'top-edge');\n        const getBottomEdge = (component) => getPart(component, detail, 'bottom-edge');\n        const modelDetail = detail.model;\n        const model = modelDetail.manager;\n        const refresh = (slider, thumb) => {\n            model.setPositionFromValue(slider, thumb, detail, {\n                getLeftEdge,\n                getRightEdge,\n                getTopEdge,\n                getBottomEdge,\n                getSpectrum\n            });\n        };\n        const setValue = (slider, newValue) => {\n            modelDetail.value.set(newValue);\n            const thumb = getThumb(slider);\n            refresh(slider, thumb);\n        };\n        const changeValue = (slider, newValue) => {\n            setValue(slider, newValue);\n            const thumb = getThumb(slider);\n            detail.onChange(slider, thumb, newValue);\n            return Optional.some(true);\n        };\n        const resetToMin = (slider) => {\n            model.setToMin(slider, detail);\n        };\n        const resetToMax = (slider) => {\n            model.setToMax(slider, detail);\n        };\n        const choose = (slider) => {\n            const fireOnChoose = () => {\n                getPart(slider, detail, 'thumb').each((thumb) => {\n                    const value = modelDetail.value.get();\n                    detail.onChoose(slider, thumb, value);\n                });\n            };\n            const wasDown = detail.mouseIsDown.get();\n            detail.mouseIsDown.set(false);\n            // We don't want this to fire if the mouse wasn't pressed down over anything other than the slider.\n            if (wasDown) {\n                fireOnChoose();\n            }\n        };\n        const onDragStart = (slider, simulatedEvent) => {\n            simulatedEvent.stop();\n            detail.mouseIsDown.set(true);\n            detail.onDragStart(slider, getThumb(slider));\n        };\n        const onDragEnd = (slider, simulatedEvent) => {\n            simulatedEvent.stop();\n            detail.onDragEnd(slider, getThumb(slider));\n            choose(slider);\n        };\n        const focusWidget = (component) => {\n            getPart(component, detail, 'spectrum').map(Keying.focusIn);\n        };\n        return {\n            uid: detail.uid,\n            dom: detail.dom,\n            components,\n            behaviours: augment(detail.sliderBehaviours, [\n                Keying.config({\n                    mode: 'special',\n                    focusIn: focusWidget\n                }),\n                Representing.config({\n                    store: {\n                        mode: 'manual',\n                        getValue: (_) => {\n                            return modelDetail.value.get();\n                        },\n                        setValue\n                    }\n                }),\n                Receiving.config({\n                    channels: {\n                        [mouseReleased()]: {\n                            onReceive: choose\n                        }\n                    }\n                })\n            ]),\n            events: derive$2([\n                run$1(sliderChangeEvent(), (slider, simulatedEvent) => {\n                    changeValue(slider, simulatedEvent.event.value);\n                }),\n                runOnAttached((slider, _simulatedEvent) => {\n                    // Set the initial value\n                    const getInitial = modelDetail.getInitialValue();\n                    modelDetail.value.set(getInitial);\n                    const thumb = getThumb(slider);\n                    refresh(slider, thumb);\n                    const spectrum = getSpectrum(slider);\n                    // Call onInit instead of onChange for the first value.\n                    detail.onInit(slider, thumb, spectrum, modelDetail.value.get());\n                }),\n                run$1(touchstart(), onDragStart),\n                run$1(touchend(), onDragEnd),\n                run$1(mousedown(), (component, event) => {\n                    focusWidget(component);\n                    onDragStart(component, event);\n                }),\n                run$1(mouseup(), onDragEnd),\n            ]),\n            apis: {\n                resetToMin,\n                resetToMax,\n                setValue,\n                refresh\n            },\n            domModification: {\n                styles: {\n                    position: 'relative'\n                }\n            }\n        };\n    };\n\n    const Slider = composite({\n        name: 'Slider',\n        configFields: SliderSchema,\n        partFields: SliderParts,\n        factory: sketch$1,\n        apis: {\n            setValue: (apis, slider, value) => {\n                apis.setValue(slider, value);\n            },\n            resetToMin: (apis, slider) => {\n                apis.resetToMin(slider);\n            },\n            resetToMax: (apis, slider) => {\n                apis.resetToMax(slider);\n            },\n            refresh: (apis, slider) => {\n                apis.refresh(slider);\n            }\n        }\n    });\n\n    const owner = 'container';\n    const schema$7 = [\n        field('slotBehaviours', [])\n    ];\n    const getPartName = (name) => '<alloy.field.' + name + '>';\n    const sketch = (sSpec) => {\n        // As parts.slot is called, record all of the parts that are registered\n        // as part of this SlotContainer.\n        const parts = (() => {\n            const record = [];\n            const slot = (name, config) => {\n                record.push(name);\n                return generateOne$1(owner, getPartName(name), config);\n            };\n            return {\n                slot,\n                record: constant$1(record)\n            };\n        })();\n        const spec = sSpec(parts);\n        const partNames = parts.record();\n        // Like a Form, a SlotContainer does not know its parts in advance. So the\n        // record lists the names of the parts to put in the schema.\n        // TODO: Find a nice way to remove dupe with Form\n        const fieldParts = map$2(partNames, (n) => required({ name: n, pname: getPartName(n) }));\n        return composite$1(owner, schema$7, fieldParts, make$3, spec);\n    };\n    const make$3 = (detail, components) => {\n        const getSlotNames = (_) => getAllPartNames(detail);\n        const getSlot = (container, key) => getPart(container, detail, key);\n        const onSlot = (f, def) => (container, key) => getPart(container, detail, key).map((slot) => f(slot, key)).getOr(def);\n        const onSlots = (f) => (container, keys) => {\n            each$1(keys, (key) => f(container, key));\n        };\n        const doShowing = (comp, _key) => get$g(comp.element, 'aria-hidden') !== 'true';\n        const doShow = (comp, key) => {\n            // NOTE: May need to restore old values.\n            if (!doShowing(comp)) {\n                const element = comp.element;\n                remove$6(element, 'display');\n                remove$8(element, 'aria-hidden');\n                emitWith(comp, slotVisibility(), { name: key, visible: true });\n            }\n        };\n        const doHide = (comp, key) => {\n            // NOTE: May need to save old values.\n            if (doShowing(comp)) {\n                const element = comp.element;\n                set$7(element, 'display', 'none');\n                set$9(element, 'aria-hidden', 'true');\n                emitWith(comp, slotVisibility(), { name: key, visible: false });\n            }\n        };\n        const isShowing = onSlot(doShowing, false);\n        const hideSlot = onSlot(doHide);\n        const hideSlots = onSlots(hideSlot);\n        const hideAllSlots = (container) => hideSlots(container, getSlotNames());\n        const showSlot = onSlot(doShow);\n        const apis = {\n            getSlotNames,\n            getSlot,\n            isShowing,\n            hideSlot,\n            hideAllSlots,\n            showSlot\n        };\n        return {\n            uid: detail.uid,\n            dom: detail.dom,\n            components,\n            behaviours: get$2(detail.slotBehaviours),\n            apis\n        };\n    };\n    // No type safety doing it this way. But removes dupe.\n    // We could probably use spread operator to help here.\n    const slotApis = map$1({\n        getSlotNames: (apis, c) => apis.getSlotNames(c),\n        getSlot: (apis, c, key) => apis.getSlot(c, key),\n        isShowing: (apis, c, key) => apis.isShowing(c, key),\n        hideSlot: (apis, c, key) => apis.hideSlot(c, key),\n        hideAllSlots: (apis, c) => apis.hideAllSlots(c),\n        showSlot: (apis, c, key) => apis.showSlot(c, key)\n    }, (value) => makeApi(value));\n    const SlotContainer = {\n        ...slotApis,\n        ...{ sketch }\n    };\n\n    const generate$1 = (xs, f) => {\n        const init = {\n            len: 0,\n            list: []\n        };\n        const r = foldl(xs, (b, a) => {\n            const value = f(a, b.len);\n            return value.fold(constant$1(b), (v) => ({\n                len: v.finish,\n                list: b.list.concat([v])\n            }));\n        }, init);\n        return r.list;\n    };\n\n    const output = (within, extra, withinWidth) => ({\n        within,\n        extra,\n        withinWidth\n    });\n    const apportion = (units, total, len) => {\n        const parray = generate$1(units, (unit, current) => {\n            const width = len(unit);\n            return Optional.some({\n                element: unit,\n                start: current,\n                finish: current + width,\n                width\n            });\n        });\n        const within = filter$2(parray, (unit) => unit.finish <= total);\n        const withinWidth = foldr(within, (acc, el) => acc + el.width, 0);\n        const extra = parray.slice(within.length);\n        return {\n            within,\n            extra,\n            withinWidth\n        };\n    };\n    const toUnit = (parray) => map$2(parray, (unit) => unit.element);\n    const fitLast = (within, extra, withinWidth) => {\n        const fits = toUnit(within.concat(extra));\n        return output(fits, [], withinWidth);\n    };\n    const overflow = (within, extra, overflower, withinWidth) => {\n        const fits = toUnit(within).concat([overflower]);\n        return output(fits, toUnit(extra), withinWidth);\n    };\n    const fitAll = (within, extra, withinWidth) => output(toUnit(within), [], withinWidth);\n    const tryFit = (total, units, len) => {\n        const divide = apportion(units, total, len);\n        return divide.extra.length === 0 ? Optional.some(divide) : Optional.none();\n    };\n    const partition = (total, units, len, overflower) => {\n        // Firstly, we try without the overflower.\n        const divide = tryFit(total, units, len).getOrThunk(() => \n        // If that doesn't work, overflow\n        apportion(units, total - len(overflower), len));\n        const within = divide.within;\n        const extra = divide.extra;\n        const withinWidth = divide.withinWidth;\n        if (extra.length === 1 && extra[0].width <= len(overflower)) {\n            return fitLast(within, extra, withinWidth);\n        }\n        else if (extra.length >= 1) {\n            return overflow(within, extra, overflower, withinWidth);\n        }\n        else {\n            return fitAll(within, extra, withinWidth);\n        }\n    };\n\n    const setGroups = (toolbar, storedGroups) => {\n        const bGroups = map$2(storedGroups, (g) => premade(g));\n        Toolbar.setGroups(toolbar, bGroups);\n    };\n    const findFocusedComp = (comps) => findMap(comps, (comp) => search(comp.element).bind((focusedElm) => comp.getSystem().getByDom(focusedElm).toOptional()));\n    const refresh$2 = (toolbar, detail, setOverflow) => {\n        // Ensure we have toolbar groups to render\n        const builtGroups = detail.builtGroups.get();\n        if (builtGroups.length === 0) {\n            return;\n        }\n        const primary = getPartOrDie(toolbar, detail, 'primary');\n        const overflowGroup = Coupling.getCoupled(toolbar, 'overflowGroup');\n        // Set the primary toolbar to have visibility hidden;\n        set$7(primary.element, 'visibility', 'hidden');\n        const groups = builtGroups.concat([overflowGroup]);\n        // Store the current focus state\n        const focusedComp = findFocusedComp(groups);\n        // Clear the overflow toolbar\n        setOverflow([]);\n        // Put all the groups inside the primary toolbar\n        setGroups(primary, groups);\n        const availableWidth = get$c(primary.element);\n        const overflows = partition(availableWidth, detail.builtGroups.get(), (comp) => Math.ceil(comp.element.dom.getBoundingClientRect().width), overflowGroup);\n        if (overflows.extra.length === 0) {\n            // Not ideal. Breaking abstraction somewhat, though remove is better than insert\n            // Can just reset the toolbar groups also ... but may be a bit slower.\n            Replacing.remove(primary, overflowGroup);\n            setOverflow([]);\n        }\n        else {\n            setGroups(primary, overflows.within);\n            setOverflow(overflows.extra);\n        }\n        remove$6(primary.element, 'visibility');\n        reflow(primary.element);\n        // Restore the focus\n        focusedComp.each(Focusing.focus);\n    };\n\n    const schema$6 = constant$1([\n        field('splitToolbarBehaviours', [Coupling]),\n        customField('builtGroups', () => Cell([]))\n    ]);\n\n    const schema$5 = constant$1([\n        markers$1(['overflowToggledClass']),\n        optionFunction('getOverflowBounds'),\n        required$1('lazySink'),\n        customField('overflowGroups', () => Cell([])),\n        onHandler('onOpened'),\n        onHandler('onClosed')\n    ].concat(schema$6()));\n    const parts$5 = constant$1([\n        required({\n            factory: Toolbar,\n            schema: schema$d(),\n            name: 'primary'\n        }),\n        external$1({\n            schema: schema$d(),\n            name: 'overflow'\n        }),\n        external$1({\n            name: 'overflow-button'\n        }),\n        external$1({\n            name: 'overflow-group'\n        })\n    ]);\n\n    const schema$4 = constant$1([\n        required$1('items'),\n        markers$1(['itemSelector']),\n        field('tgroupBehaviours', [Keying])\n    ]);\n    const parts$4 = constant$1([\n        group({\n            name: 'items',\n            unit: 'item'\n        })\n    ]);\n\n    const factory$b = (detail, components, _spec, _externals) => ({\n        uid: detail.uid,\n        dom: detail.dom,\n        components,\n        behaviours: augment(detail.tgroupBehaviours, [\n            Keying.config({\n                mode: 'flow',\n                selector: detail.markers.itemSelector\n            })\n        ]),\n        domModification: {\n            attributes: {\n                role: 'group'\n            }\n        }\n    });\n    const ToolbarGroup = composite({\n        name: 'ToolbarGroup',\n        configFields: schema$4(),\n        partFields: parts$4(),\n        factory: factory$b\n    });\n\n    const buildGroups = (comps) => map$2(comps, (g) => premade(g));\n    const refresh$1 = (toolbar, memFloatingToolbarButton, detail) => {\n        refresh$2(toolbar, detail, (overflowGroups) => {\n            detail.overflowGroups.set(overflowGroups);\n            memFloatingToolbarButton.getOpt(toolbar).each((floatingToolbarButton) => {\n                FloatingToolbarButton.setGroups(floatingToolbarButton, buildGroups(overflowGroups));\n            });\n        });\n    };\n    const factory$a = (detail, components, spec, externals) => {\n        const memFloatingToolbarButton = record(FloatingToolbarButton.sketch({\n            fetch: () => Future.nu((resolve) => {\n                resolve(buildGroups(detail.overflowGroups.get()));\n            }),\n            layouts: {\n                onLtr: () => [southwest$2, southeast$2],\n                onRtl: () => [southeast$2, southwest$2],\n                onBottomLtr: () => [northwest$2, northeast$2],\n                onBottomRtl: () => [northeast$2, northwest$2]\n            },\n            getBounds: spec.getOverflowBounds,\n            lazySink: detail.lazySink,\n            fireDismissalEventInstead: {},\n            markers: {\n                toggledClass: detail.markers.overflowToggledClass\n            },\n            parts: {\n                button: externals['overflow-button'](),\n                toolbar: externals.overflow()\n            },\n            onToggled: (comp, state) => detail[state ? 'onOpened' : 'onClosed'](comp)\n        }));\n        return {\n            uid: detail.uid,\n            dom: detail.dom,\n            components,\n            behaviours: augment(detail.splitToolbarBehaviours, [\n                Coupling.config({\n                    others: {\n                        overflowGroup: () => {\n                            return ToolbarGroup.sketch({\n                                ...externals['overflow-group'](),\n                                items: [\n                                    memFloatingToolbarButton.asSpec()\n                                ]\n                            });\n                        }\n                    }\n                })\n            ]),\n            apis: {\n                setGroups: (toolbar, groups) => {\n                    detail.builtGroups.set(map$2(groups, toolbar.getSystem().build));\n                    refresh$1(toolbar, memFloatingToolbarButton, detail);\n                },\n                refresh: (toolbar) => refresh$1(toolbar, memFloatingToolbarButton, detail),\n                toggle: (toolbar) => {\n                    memFloatingToolbarButton.getOpt(toolbar).each((floatingToolbarButton) => {\n                        FloatingToolbarButton.toggle(floatingToolbarButton);\n                    });\n                },\n                toggleWithoutFocusing: (toolbar) => {\n                    memFloatingToolbarButton.getOpt(toolbar).each(FloatingToolbarButton.toggleWithoutFocusing);\n                },\n                isOpen: (toolbar) => memFloatingToolbarButton.getOpt(toolbar).map(FloatingToolbarButton.isOpen).getOr(false),\n                reposition: (toolbar) => {\n                    memFloatingToolbarButton.getOpt(toolbar).each((floatingToolbarButton) => {\n                        FloatingToolbarButton.reposition(floatingToolbarButton);\n                    });\n                },\n                getOverflow: (toolbar) => memFloatingToolbarButton.getOpt(toolbar).bind(FloatingToolbarButton.getToolbar)\n            },\n            domModification: {\n                attributes: { role: 'group' }\n            }\n        };\n    };\n    const SplitFloatingToolbar = composite({\n        name: 'SplitFloatingToolbar',\n        configFields: schema$5(),\n        partFields: parts$5(),\n        factory: factory$a,\n        apis: {\n            setGroups: (apis, toolbar, groups) => {\n                apis.setGroups(toolbar, groups);\n            },\n            refresh: (apis, toolbar) => {\n                apis.refresh(toolbar);\n            },\n            reposition: (apis, toolbar) => {\n                apis.reposition(toolbar);\n            },\n            toggle: (apis, toolbar) => {\n                apis.toggle(toolbar);\n            },\n            toggleWithoutFocusing: (apis, toolbar) => {\n                apis.toggle(toolbar);\n            },\n            isOpen: (apis, toolbar) => apis.isOpen(toolbar),\n            getOverflow: (apis, toolbar) => apis.getOverflow(toolbar)\n        }\n    });\n\n    const schema$3 = constant$1([\n        markers$1(['closedClass', 'openClass', 'shrinkingClass', 'growingClass', 'overflowToggledClass']),\n        onHandler('onOpened'),\n        onHandler('onClosed')\n    ].concat(schema$6()));\n    const parts$3 = constant$1([\n        required({\n            factory: Toolbar,\n            schema: schema$d(),\n            name: 'primary'\n        }),\n        required({\n            factory: Toolbar,\n            schema: schema$d(),\n            name: 'overflow',\n            overrides: (detail) => {\n                return {\n                    toolbarBehaviours: derive$1([\n                        Sliding.config({\n                            dimension: {\n                                property: 'height'\n                            },\n                            closedClass: detail.markers.closedClass,\n                            openClass: detail.markers.openClass,\n                            shrinkingClass: detail.markers.shrinkingClass,\n                            growingClass: detail.markers.growingClass,\n                            onShrunk: (comp) => {\n                                getPart(comp, detail, 'overflow-button').each((button) => {\n                                    Toggling.off(button);\n                                });\n                                detail.onClosed(comp);\n                            },\n                            onGrown: (comp) => {\n                                detail.onOpened(comp);\n                            },\n                            onStartGrow: (comp) => {\n                                getPart(comp, detail, 'overflow-button').each(Toggling.on);\n                            }\n                        }),\n                        Keying.config({\n                            mode: 'acyclic',\n                            onEscape: (comp) => {\n                                getPart(comp, detail, 'overflow-button').each(Focusing.focus);\n                                return Optional.some(true);\n                            }\n                        })\n                    ])\n                };\n            }\n        }),\n        external$1({\n            name: 'overflow-button',\n            overrides: (detail) => ({\n                buttonBehaviours: derive$1([\n                    Toggling.config({\n                        toggleClass: detail.markers.overflowToggledClass,\n                        aria: {\n                            mode: 'expanded'\n                        },\n                        toggleOnExecute: false\n                    })\n                ])\n            })\n        }),\n        external$1({\n            name: 'overflow-group'\n        })\n    ]);\n\n    const isOpen = (toolbar, detail) => getPart(toolbar, detail, 'overflow').map(Sliding.hasGrown).getOr(false);\n    const toggleToolbar = (toolbar, detail, skipFocus) => {\n        // Make sure that the toolbar needs to toggled by checking for overflow button presence\n        getPart(toolbar, detail, 'overflow-button')\n            .each((oveflowButton) => {\n            getPart(toolbar, detail, 'overflow').each((overf) => {\n                refresh(toolbar, detail);\n                if (Sliding.hasShrunk(overf)) {\n                    const fn = detail.onOpened;\n                    detail.onOpened = (comp) => {\n                        if (!skipFocus) {\n                            Keying.focusIn(overf);\n                        }\n                        fn(comp);\n                        detail.onOpened = fn;\n                    };\n                }\n                else {\n                    const fn = detail.onClosed;\n                    detail.onClosed = (comp) => {\n                        if (!skipFocus) {\n                            Focusing.focus(oveflowButton);\n                        }\n                        fn(comp);\n                        detail.onClosed = fn;\n                    };\n                }\n                Sliding.toggleGrow(overf);\n            });\n        });\n    };\n    const refresh = (toolbar, detail) => {\n        getPart(toolbar, detail, 'overflow').each((overflow) => {\n            refresh$2(toolbar, detail, (groups) => {\n                const builtGroups = map$2(groups, (g) => premade(g));\n                Toolbar.setGroups(overflow, builtGroups);\n            });\n            getPart(toolbar, detail, 'overflow-button').each((button) => {\n                if (Sliding.hasGrown(overflow)) {\n                    Toggling.on(button);\n                }\n            });\n            Sliding.refresh(overflow);\n        });\n    };\n    const factory$9 = (detail, components, spec, externals) => {\n        const toolbarToggleEvent = 'alloy.toolbar.toggle';\n        const doSetGroups = (toolbar, groups) => {\n            const built = map$2(groups, toolbar.getSystem().build);\n            detail.builtGroups.set(built);\n        };\n        return {\n            uid: detail.uid,\n            dom: detail.dom,\n            components,\n            behaviours: augment(detail.splitToolbarBehaviours, [\n                Coupling.config({\n                    others: {\n                        overflowGroup: (toolbar) => {\n                            return ToolbarGroup.sketch({\n                                ...externals['overflow-group'](),\n                                items: [\n                                    Button.sketch({\n                                        ...externals['overflow-button'](),\n                                        action: (_button) => {\n                                            emit(toolbar, toolbarToggleEvent);\n                                        }\n                                    })\n                                ]\n                            });\n                        }\n                    }\n                }),\n                config('toolbar-toggle-events', [\n                    run$1(toolbarToggleEvent, (toolbar) => {\n                        toggleToolbar(toolbar, detail, false);\n                    })\n                ])\n            ]),\n            apis: {\n                setGroups: (toolbar, groups) => {\n                    doSetGroups(toolbar, groups);\n                    refresh(toolbar, detail);\n                },\n                refresh: (toolbar) => refresh(toolbar, detail),\n                toggle: (toolbar) => {\n                    toggleToolbar(toolbar, detail, false);\n                },\n                toggleWithoutFocusing: (toolbar) => {\n                    toggleToolbar(toolbar, detail, true);\n                },\n                isOpen: (toolbar) => isOpen(toolbar, detail)\n            },\n            domModification: {\n                attributes: { role: 'group' }\n            }\n        };\n    };\n    const SplitSlidingToolbar = composite({\n        name: 'SplitSlidingToolbar',\n        configFields: schema$3(),\n        partFields: parts$3(),\n        factory: factory$9,\n        apis: {\n            setGroups: (apis, toolbar, groups) => {\n                apis.setGroups(toolbar, groups);\n            },\n            refresh: (apis, toolbar) => {\n                apis.refresh(toolbar);\n            },\n            toggle: (apis, toolbar) => {\n                apis.toggle(toolbar);\n            },\n            isOpen: (apis, toolbar) => apis.isOpen(toolbar)\n        }\n    });\n\n    const factory$8 = (detail, _spec) => ({\n        uid: detail.uid,\n        dom: detail.dom,\n        components: detail.components,\n        events: events(detail.action),\n        behaviours: augment(detail.tabButtonBehaviours, [\n            Focusing.config({}),\n            Keying.config({\n                mode: 'execution',\n                useSpace: true,\n                useEnter: true\n            }),\n            Representing.config({\n                store: {\n                    mode: 'memory',\n                    initialValue: detail.value\n                }\n            })\n        ]),\n        domModification: detail.domModification\n    });\n    const TabButton = single({\n        name: 'TabButton',\n        configFields: [\n            defaulted('uid', undefined),\n            required$1('value'),\n            field$1('dom', 'dom', mergeWithThunk(() => ({\n                attributes: {\n                    'role': 'tab',\n                    // NOTE: This is used in TabSection to connect \"labelledby\"\n                    'id': generate$6('aria'),\n                    'aria-selected': 'false'\n                }\n            })), anyValue()),\n            option$3('action'),\n            defaulted('domModification', {}),\n            field('tabButtonBehaviours', [Focusing, Keying, Representing]),\n            required$1('view')\n        ],\n        factory: factory$8\n    });\n\n    const schema$2 = constant$1([\n        required$1('tabs'),\n        required$1('dom'),\n        defaulted('clickToDismiss', false),\n        field('tabbarBehaviours', [Highlighting, Keying]),\n        markers$1(['tabClass', 'selectedClass'])\n    ]);\n    const tabsPart = group({\n        factory: TabButton,\n        name: 'tabs',\n        unit: 'tab',\n        overrides: (barDetail) => {\n            const dismissTab$1 = (tabbar, button) => {\n                Highlighting.dehighlight(tabbar, button);\n                emitWith(tabbar, dismissTab(), {\n                    tabbar,\n                    button\n                });\n            };\n            const changeTab$1 = (tabbar, button) => {\n                Highlighting.highlight(tabbar, button);\n                emitWith(tabbar, changeTab(), {\n                    tabbar,\n                    button\n                });\n            };\n            return {\n                action: (button) => {\n                    const tabbar = button.getSystem().getByUid(barDetail.uid).getOrDie();\n                    const activeButton = Highlighting.isHighlighted(tabbar, button);\n                    const response = (() => {\n                        if (activeButton && barDetail.clickToDismiss) {\n                            return dismissTab$1;\n                        }\n                        else if (!activeButton) {\n                            return changeTab$1;\n                        }\n                        else {\n                            return noop;\n                        }\n                    })();\n                    response(tabbar, button);\n                },\n                domModification: {\n                    classes: [barDetail.markers.tabClass]\n                }\n            };\n        }\n    });\n    const parts$2 = constant$1([\n        tabsPart\n    ]);\n\n    const factory$7 = (detail, components, _spec, _externals) => ({\n        'uid': detail.uid,\n        'dom': detail.dom,\n        components,\n        'debug.sketcher': 'Tabbar',\n        'domModification': {\n            attributes: {\n                role: 'tablist'\n            }\n        },\n        'behaviours': augment(detail.tabbarBehaviours, [\n            Highlighting.config({\n                highlightClass: detail.markers.selectedClass,\n                itemClass: detail.markers.tabClass,\n                // https://www.w3.org/TR/2010/WD-wai-aria-practices-20100916/#tabpanel\n                // Consider a more seam-less way of combining highlighting and toggling\n                onHighlight: (tabbar, tab) => {\n                    // TODO: Integrate highlighting and toggling in a nice way\n                    set$9(tab.element, 'aria-selected', 'true');\n                },\n                onDehighlight: (tabbar, tab) => {\n                    set$9(tab.element, 'aria-selected', 'false');\n                }\n            }),\n            Keying.config({\n                mode: 'flow',\n                getInitial: (tabbar) => {\n                    // Restore focus to the previously highlighted tab.\n                    return Highlighting.getHighlighted(tabbar).map((tab) => tab.element);\n                },\n                selector: '.' + detail.markers.tabClass,\n                executeOnMove: true\n            })\n        ])\n    });\n    const Tabbar = composite({\n        name: 'Tabbar',\n        configFields: schema$2(),\n        partFields: parts$2(),\n        factory: factory$7\n    });\n\n    const factory$6 = (detail, _spec) => ({\n        uid: detail.uid,\n        dom: detail.dom,\n        behaviours: augment(detail.tabviewBehaviours, [\n            Replacing.config({})\n        ]),\n        domModification: {\n            attributes: { role: 'tabpanel' }\n        }\n    });\n    const Tabview = single({\n        name: 'Tabview',\n        configFields: [\n            field('tabviewBehaviours', [Replacing])\n        ],\n        factory: factory$6\n    });\n\n    const schema$1 = constant$1([\n        defaulted('selectFirst', true),\n        onHandler('onChangeTab'),\n        onHandler('onDismissTab'),\n        defaulted('tabs', []),\n        field('tabSectionBehaviours', [])\n    ]);\n    const barPart = required({\n        factory: Tabbar,\n        schema: [\n            required$1('dom'),\n            requiredObjOf('markers', [\n                required$1('tabClass'),\n                required$1('selectedClass')\n            ])\n        ],\n        name: 'tabbar',\n        defaults: (detail) => {\n            return {\n                tabs: detail.tabs\n            };\n        }\n    });\n    const viewPart = required({\n        factory: Tabview,\n        name: 'tabview'\n    });\n    const parts$1 = constant$1([\n        barPart,\n        viewPart\n    ]);\n\n    const factory$5 = (detail, components, _spec, _externals) => {\n        const changeTab$1 = (button) => {\n            const tabValue = Representing.getValue(button);\n            getPart(button, detail, 'tabview').each((tabview) => {\n                const tabWithValue = find$5(detail.tabs, (t) => t.value === tabValue);\n                tabWithValue.each((tabData) => {\n                    const panel = tabData.view();\n                    // Update the tabview to refer to the current tab.\n                    getOpt(button.element, 'id').each((id) => {\n                        set$9(tabview.element, 'aria-labelledby', id);\n                    });\n                    Replacing.set(tabview, panel);\n                    detail.onChangeTab(tabview, button, panel);\n                });\n            });\n        };\n        const changeTabBy = (section, byPred) => {\n            getPart(section, detail, 'tabbar').each((tabbar) => {\n                byPred(tabbar).each(emitExecute);\n            });\n        };\n        return {\n            uid: detail.uid,\n            dom: detail.dom,\n            components,\n            behaviours: get$2(detail.tabSectionBehaviours),\n            events: derive$2(flatten([\n                detail.selectFirst ? [\n                    runOnAttached((section, _simulatedEvent) => {\n                        changeTabBy(section, Highlighting.getFirst);\n                    })\n                ] : [],\n                [\n                    run$1(changeTab(), (section, simulatedEvent) => {\n                        const button = simulatedEvent.event.button;\n                        changeTab$1(button);\n                    }),\n                    run$1(dismissTab(), (section, simulatedEvent) => {\n                        const button = simulatedEvent.event.button;\n                        detail.onDismissTab(section, button);\n                    })\n                ]\n            ])),\n            apis: {\n                getViewItems: (section) => {\n                    return getPart(section, detail, 'tabview').map((tabview) => Replacing.contents(tabview)).getOr([]);\n                },\n                // How should \"clickToDismiss\" interact with this? At the moment, it will never dismiss\n                showTab: (section, tabKey) => {\n                    // We only change the tab if it isn't currently active because that takes\n                    // the whole \"dismiss\" issue out of the equation.\n                    const getTabIfNotActive = (tabbar) => {\n                        const candidates = Highlighting.getCandidates(tabbar);\n                        const optTab = find$5(candidates, (c) => Representing.getValue(c) === tabKey);\n                        return optTab.filter((tab) => !Highlighting.isHighlighted(tabbar, tab));\n                    };\n                    changeTabBy(section, getTabIfNotActive);\n                }\n            }\n        };\n    };\n    const TabSection = composite({\n        name: 'TabSection',\n        configFields: schema$1(),\n        partFields: parts$1(),\n        factory: factory$5,\n        apis: {\n            getViewItems: (apis, component) => apis.getViewItems(component),\n            showTab: (apis, component, tabKey) => {\n                apis.showTab(component, tabKey);\n            }\n        }\n    });\n\n    // When showing a value in an input field, which part of the item do we use?\n    const setValueFromItem = (model, input, item) => {\n        const itemData = Representing.getValue(item);\n        Representing.setValue(input, itemData);\n        setCursorAtEnd(input);\n    };\n    const setSelectionOn = (input, f) => {\n        const el = input.element;\n        const value = get$5(el);\n        const node = el.dom;\n        // Only do for valid input types.\n        if (get$g(el, 'type') !== 'number') {\n            f(node, value);\n        }\n    };\n    const setCursorAtEnd = (input) => {\n        setSelectionOn(input, (node, value) => node.setSelectionRange(value.length, value.length));\n    };\n    const setSelectionToEnd = (input, startOffset) => {\n        setSelectionOn(input, (node, value) => node.setSelectionRange(startOffset, value.length));\n    };\n    const attemptSelectOver = (model, input, item) => {\n        if (!model.selectsOver) {\n            return Optional.none();\n        }\n        else {\n            const currentValue = Representing.getValue(input);\n            const inputDisplay = model.getDisplayText(currentValue);\n            const itemValue = Representing.getValue(item);\n            const itemDisplay = model.getDisplayText(itemValue);\n            return itemDisplay.indexOf(inputDisplay) === 0 ?\n                Optional.some(() => {\n                    setValueFromItem(model, input, item);\n                    setSelectionToEnd(input, inputDisplay.length);\n                })\n                : Optional.none();\n        }\n    };\n\n    const itemExecute = constant$1('alloy.typeahead.itemexecute');\n\n    // TODO: Fix this.\n    const make$2 = (detail, components, spec, externals) => {\n        const navigateList = (comp, simulatedEvent, highlighter) => {\n            /*\n             * If we have an open Sandbox with an active menu,\n             * but no highlighted item, then highlight the menu\n             *\n             * If we have an open Sandbox with an active menu,\n             * and there is a highlighted item, simulated a keydown\n             * on the menu\n             *\n             * If we have a closed sandbox, open the sandbox\n             *\n             * Regardless, this is a user initiated action. End previewing.\n             */\n            detail.previewing.set(false);\n            const sandbox = Coupling.getCoupled(comp, 'sandbox');\n            if (Sandboxing.isOpen(sandbox)) {\n                Composing.getCurrent(sandbox).each((menu) => {\n                    Highlighting.getHighlighted(menu).fold(() => {\n                        highlighter(menu);\n                    }, () => {\n                        dispatchEvent(sandbox, menu.element, 'keydown', simulatedEvent);\n                    });\n                });\n            }\n            else {\n                const onOpenSync = (sandbox) => {\n                    Composing.getCurrent(sandbox).each(highlighter);\n                };\n                open(detail, mapFetch(comp), comp, sandbox, externals, onOpenSync, HighlightOnOpen.HighlightMenuAndItem).get(noop);\n            }\n        };\n        // Due to the fact that typeahead probably need to separate value from text, they can't reuse\n        // (easily) the same representing logic as input fields.\n        const focusBehaviours$1 = focusBehaviours(detail);\n        const mapFetch = (comp) => (tdata) => tdata.map((data) => {\n            const menus = values(data.menus);\n            const items = bind$3(menus, (menu) => filter$2(menu.items, (item) => item.type === 'item'));\n            const repState = Representing.getState(comp);\n            repState.update(map$2(items, (item) => item.data));\n            return data;\n        });\n        // This function (getActiveMenu) is intended to make it easier to read what is happening\n        // without having to decipher the Highlighting and Composing calls.\n        const getActiveMenu = (sandboxComp) => Composing.getCurrent(sandboxComp);\n        const typeaheadCustomEvents = 'typeaheadevents';\n        const behaviours = [\n            Focusing.config({}),\n            Representing.config({\n                onSetValue: detail.onSetValue,\n                store: {\n                    mode: 'dataset',\n                    getDataKey: (comp) => get$5(comp.element),\n                    // This really needs to be configurable\n                    getFallbackEntry: (itemString) => ({\n                        value: itemString,\n                        meta: {}\n                    }),\n                    setValue: (comp, data) => {\n                        set$4(comp.element, detail.model.getDisplayText(data));\n                    },\n                    ...detail.initialData.map((d) => wrap('initialValue', d)).getOr({})\n                }\n            }),\n            Streaming.config({\n                stream: {\n                    mode: 'throttle',\n                    delay: detail.responseTime,\n                    stopEvent: false\n                },\n                onStream: (component, _simulatedEvent) => {\n                    const sandbox = Coupling.getCoupled(component, 'sandbox');\n                    const focusInInput = Focusing.isFocused(component);\n                    // You don't want it to change when something else has triggered the change.\n                    if (focusInInput) {\n                        if (get$5(component.element).length >= detail.minChars) {\n                            // Get the value of the previously active (selected/highlighted) item. We\n                            // are going to try to preserve this.\n                            const previousValue = getActiveMenu(sandbox).bind((activeMenu) => Highlighting.getHighlighted(activeMenu).map(Representing.getValue));\n                            // Turning previewing ON here every keystroke is unnecessary, but relies\n                            // on the fact that it will be turned off if required by highlighting events.\n                            // So even if previewing was supposed to be off, turning it on here is\n                            // just temporary, because the onOpenSync below will trigger a highlight\n                            // if there was meant to be one, which will turn it off if required.\n                            detail.previewing.set(true);\n                            const onOpenSync = (_sandbox) => {\n                                // This getActiveMenu relies on a menu being highlighted / active\n                                getActiveMenu(sandbox).each((activeMenu) => {\n                                    // The folds can make this hard to follow, but the basic gist of it is\n                                    // that we want to see if we need to highlight one of the items in the\n                                    // menu that we just opened. If we do highlight an item, then that\n                                    // highlighting action will clear previewing (handled by the TieredMenu\n                                    // part configuration for onHighlight). Note: that onOpenSync runs\n                                    // *after* the highlightOnOpen setting.\n                                    //\n                                    // 1. If in \"selectsOver\" mode and we don't have a previous item,\n                                    // then highlight the first one. This one will be used as the basis\n                                    // for the \"selectsOver\" text selection. The act of highlighting the\n                                    // first item will take us out of previewing mode. If the \"selectsOver\"\n                                    // operation fails, it should clear the highlight, and restore previewing\n                                    // 2. If not in \"selectsOver\" mode, and we don't have a previous item,\n                                    // then we don't highlight anything. This will keep us in previewing\n                                    // mode until the menu is interacted with (hover, navigation etc.)\n                                    // 3. If we have a previous item, then try and rehighlight it. But if\n                                    // we can't, the just highlight the first. Either action will take us\n                                    // out of previewing mode.\n                                    previousValue.fold(() => {\n                                        // We are using \"selectOver\", so we need *something* to highlight\n                                        if (detail.model.selectsOver) {\n                                            Highlighting.highlightFirst(activeMenu);\n                                        }\n                                        // We aren't using \"selectOver\", so don't highlight anything\n                                        // to preserve our \"previewing\" mode.\n                                    }, (pv) => {\n                                        // We have a previous item, so if we can't rehighlight it, then\n                                        // we'll change to the first item. We want to keep some selection.\n                                        Highlighting.highlightBy(activeMenu, (item) => {\n                                            const itemData = Representing.getValue(item);\n                                            return itemData.value === pv.value;\n                                        });\n                                        // Highlight first if could not find it?\n                                        Highlighting.getHighlighted(activeMenu).orThunk(() => {\n                                            Highlighting.highlightFirst(activeMenu);\n                                            return Optional.none();\n                                        });\n                                    });\n                                });\n                            };\n                            open(detail, mapFetch(component), component, sandbox, externals, onOpenSync, \n                            // The onOpenSync takes care of what should be given the highlights, but\n                            // we want to highlight just the menu so that the onOpenSync can find the\n                            // activeMenu.\n                            HighlightOnOpen.HighlightJustMenu).get(noop);\n                        }\n                    }\n                },\n                cancelEvent: typeaheadCancel()\n            }),\n            Keying.config({\n                mode: 'special',\n                onDown: (comp, simulatedEvent) => {\n                    // The navigation here will stop the \"previewing\" mode, because\n                    // now the menu will get focus (fake focus, but focus nevertheless)\n                    navigateList(comp, simulatedEvent, Highlighting.highlightFirst);\n                    return Optional.some(true);\n                },\n                onEscape: (comp) => {\n                    // Escape only has handling if the sandbox is visible. It has no meaning\n                    // to the input itself.\n                    const sandbox = Coupling.getCoupled(comp, 'sandbox');\n                    if (Sandboxing.isOpen(sandbox)) {\n                        Sandboxing.close(sandbox);\n                        return Optional.some(true);\n                    }\n                    return Optional.none();\n                },\n                onUp: (comp, simulatedEvent) => {\n                    // The navigation here will stop the \"previewing\" mode, because\n                    // now the menu will get focus (fake focus, but focus nevertheless)\n                    navigateList(comp, simulatedEvent, Highlighting.highlightLast);\n                    return Optional.some(true);\n                },\n                onEnter: (comp) => {\n                    const sandbox = Coupling.getCoupled(comp, 'sandbox');\n                    const sandboxIsOpen = Sandboxing.isOpen(sandbox);\n                    // 'Previewing' means that items are shown but none has been actively selected by the user.\n                    // When previewing, all keyboard input should still be processed by the\n                    // input itself, not the menu. The menu is not considered to have focus.\n                    // 'Previewing' is turned on by (streaming) keystrokes, and turned off by\n                    // successful interaction with the menu (navigation, highlighting, hovering).\n                    // So if we aren't previewing, and the dropdown sandbox is open, then\n                    // we process <enter> keys on the items in the menu. All this will do\n                    // is trigger an itemExecute event. The typeahead events (in the spec below)\n                    // are responsible for doing something with that event.\n                    if (sandboxIsOpen && !detail.previewing.get()) {\n                        return getActiveMenu(sandbox).bind((activeMenu) => Highlighting.getHighlighted(activeMenu)).map((item) => {\n                            // And item was selected, so trigger execute and consider the\n                            // <enter> key 'handled'\n                            emitWith(comp, itemExecute(), { item });\n                            return true;\n                        });\n                    }\n                    else {\n                        // We are either previewing, or the sandbox isn't open, so we should\n                        // process the <enter> key inside the input itself. This should cancel\n                        // any attempt to fetch data (the typeaheadCancel), and trigger the execute.\n                        // We also close the sandbox if it's open.\n                        const currentValue = Representing.getValue(comp);\n                        emit(comp, typeaheadCancel());\n                        detail.onExecute(sandbox, comp, currentValue);\n                        // If we're open and previewing, close the sandbox after firing execute.\n                        if (sandboxIsOpen) {\n                            Sandboxing.close(sandbox);\n                        }\n                        return Optional.some(true);\n                    }\n                }\n            }),\n            Toggling.config({\n                toggleClass: detail.markers.openClass,\n                aria: {\n                    mode: 'expanded'\n                }\n            }),\n            Coupling.config({\n                others: {\n                    sandbox: (hotspot) => {\n                        return makeSandbox$1(detail, hotspot, {\n                            onOpen: () => Toggling.on(hotspot),\n                            onClose: () => {\n                                // TINY-9280: Remove aria-activedescendant that is set when menu item is highlighted\n                                detail.lazyTypeaheadComp.get().each((input) => remove$8(input.element, 'aria-activedescendant'));\n                                Toggling.off(hotspot);\n                            }\n                        });\n                    }\n                }\n            }),\n            config(typeaheadCustomEvents, [\n                runOnAttached((typeaheadComp) => {\n                    // Set up the reference to the typeahead, so that it can retrieved from\n                    // the tiered menu part, even if the tieredmenu is in a different\n                    // system / alloy root / mothership.\n                    detail.lazyTypeaheadComp.set(Optional.some(typeaheadComp));\n                }),\n                runOnDetached((_typeaheadComp) => {\n                    detail.lazyTypeaheadComp.set(Optional.none());\n                }),\n                runOnExecute$1((comp) => {\n                    const onOpenSync = noop;\n                    togglePopup(detail, mapFetch(comp), comp, externals, onOpenSync, HighlightOnOpen.HighlightMenuAndItem).get(noop);\n                }),\n                run$1(itemExecute(), (comp, se) => {\n                    const sandbox = Coupling.getCoupled(comp, 'sandbox');\n                    // Copy the value from the executed item into the input, because it was \"chosen\"\n                    setValueFromItem(detail.model, comp, se.event.item);\n                    emit(comp, typeaheadCancel());\n                    detail.onItemExecute(comp, sandbox, se.event.item, Representing.getValue(comp));\n                    Sandboxing.close(sandbox);\n                    setCursorAtEnd(comp);\n                })\n            ].concat(detail.dismissOnBlur ? [\n                run$1(postBlur(), (typeahead) => {\n                    const sandbox = Coupling.getCoupled(typeahead, 'sandbox');\n                    // Only close the sandbox if the focus isn't inside it!\n                    if (search(sandbox.element).isNone()) {\n                        Sandboxing.close(sandbox);\n                    }\n                })\n            ] : []))\n        ];\n        // The order specified here isn't important. Alloy just requires a\n        // deterministic order for the configured behaviours.\n        const eventOrder = {\n            [detachedFromDom()]: [\n                Representing.name(),\n                Streaming.name(),\n                typeaheadCustomEvents\n            ],\n            ...detail.eventOrder,\n        };\n        return {\n            uid: detail.uid,\n            dom: dom$1(deepMerge(detail, {\n                // TODO: Add aria-activedescendant attribute\n                inputAttributes: {\n                    'role': 'combobox',\n                    'aria-autocomplete': 'list',\n                    'aria-haspopup': 'true'\n                }\n            })),\n            behaviours: {\n                ...focusBehaviours$1,\n                ...augment(detail.typeaheadBehaviours, behaviours)\n            },\n            eventOrder\n        };\n    };\n\n    const schema = constant$1([\n        option$3('lazySink'),\n        required$1('fetch'),\n        defaulted('minChars', 5),\n        defaulted('responseTime', 1000),\n        onHandler('onOpen'),\n        // TODO: Remove dupe with Dropdown\n        defaulted('getHotspot', Optional.some),\n        defaulted('getAnchorOverrides', constant$1({})),\n        defaulted('layouts', Optional.none()),\n        defaulted('eventOrder', {}),\n        // Information about what these model settings do can be found in TypeaheadTypes\n        defaultedObjOf('model', {}, [\n            defaulted('getDisplayText', (itemData) => itemData.meta !== undefined && itemData.meta.text !== undefined ? itemData.meta.text : itemData.value),\n            defaulted('selectsOver', true),\n            defaulted('populateFromBrowse', true)\n        ]),\n        onHandler('onSetValue'),\n        onKeyboardHandler('onExecute'),\n        onHandler('onItemExecute'),\n        defaulted('inputClasses', []),\n        defaulted('inputAttributes', {}),\n        defaulted('inputStyles', {}),\n        defaulted('matchWidth', true),\n        defaulted('useMinWidth', false),\n        defaulted('dismissOnBlur', true),\n        markers$1(['openClass']),\n        option$3('initialData'),\n        option$3('listRole'),\n        field('typeaheadBehaviours', [\n            Focusing, Representing, Streaming, Keying, Toggling, Coupling\n        ]),\n        customField('lazyTypeaheadComp', () => Cell(Optional.none)),\n        customField('previewing', () => Cell(true))\n    ].concat(schema$9()).concat(sandboxFields()));\n    const parts = constant$1([\n        external$1({\n            schema: [\n                tieredMenuMarkers()\n            ],\n            name: 'menu',\n            overrides: (detail) => {\n                return {\n                    fakeFocus: true,\n                    onHighlightItem: (_tmenu, menu, item) => {\n                        if (!detail.previewing.get()) {\n                            // We need to use this type of reference, rather than just looking\n                            // it up from the system by uid, because the input and the tieredmenu\n                            // might be in different systems.\n                            detail.lazyTypeaheadComp.get().each((input) => {\n                                if (detail.model.populateFromBrowse) {\n                                    setValueFromItem(detail.model, input, item);\n                                }\n                                // The focus is retained on the input element when the menu is shown, unlike the combobox, in which the focus is passed to the menu.\n                                // This results in screen readers not being able to announce the menu or highlighted item.\n                                // The solution is to tell screen readers which menu item is highlighted using the `aria-activedescendant` attribute.\n                                // TINY-9280: The aria attribute is removed when the menu is closed.\n                                // Since `onDehighlight` is called only when highlighting a new menu item, this will be handled in\n                                // https://github.com/tinymce/tinymce/blob/2d8c1c034e8aa484b868a0c44605489ee0ca9cd4/modules/alloy/src/main/ts/ephox/alloy/ui/composite/TypeaheadSpec.ts#L282\n                                getOpt(item.element, 'id').each((id) => set$9(input.element, 'aria-activedescendant', id));\n                            });\n                        }\n                        else {\n                            // ASSUMPTION: Currently, any interaction with the menu via the keyboard or the mouse\n                            // will firstly clear previewing mode before triggering any highlights\n                            // so if we are still in previewing mode by the time we get to the highlight call,\n                            // that means that the highlight was triggered NOT by the user interacting\n                            // with the menu, but instead by the Highlighting API call that happens automatically\n                            // when a streamed keyboard input event is updating its results. That call will\n                            // try to keep any active highlight if there already was one (defaulting to first\n                            // if it can't find the original), but if there wasn't an active highlight, but\n                            // it is using \"selectsOver\", it will just highlight the first item. In this\n                            // latter case, it is only doing that so that selectsOver has something to copy.\n                            // So all of the complex code below is trying to handle whether we should stay\n                            // in previewing mode after this highlight, and the ONLY case where we should stay\n                            // in previewing mode is that we were in previewing mode, we are using selectsOver,\n                            // and the selectsOver failed to succeed. In that case, to stay in previewing mode,\n                            // we want to cancel the highlight that we just made via the highlighting API\n                            // and reset previewing to true. Otherwise, all codepaths should set previewing\n                            // to false, because now we have a valid highlight.\n                            //\n                            // As of 2022-08-18, the selectsOver model is not in use by TinyMCE, so\n                            // this subtle interaction is unfortunately largely untested. Also, if we can't\n                            // get a reference to the typeahead input by lazyTypeaheadComp, then we don't\n                            // change previewing, either. Note also, that it is likely that if we checked\n                            // if selectsOver would succeed before setting the highlight in the streaming\n                            // response, this could might be a lot easier to follow.\n                            detail.lazyTypeaheadComp.get().each((input) => {\n                                attemptSelectOver(detail.model, input, item).fold(\n                                // If we are in \"previewing\" mode and we can't select over the\n                                // thing that is first, then clear the highlight.\n                                // Hopefully, this doesn't cause a flicker. Find a better\n                                // way to do this.\n                                () => {\n                                    // If using \"selectOver\", we essentially want to cancel the highlight\n                                    // that was only invoked just so that we'd have something to selectOver,\n                                    // so we dehighlight, and then, importantly, *DON'T* clear previewing.\n                                    // We'll set it to be true to be explicit, although it should\n                                    // always be true if it reached here (unless an above function changed\n                                    // it)\n                                    if (detail.model.selectsOver) {\n                                        Highlighting.dehighlight(menu, item);\n                                        detail.previewing.set(true);\n                                    }\n                                    else {\n                                        // Because we aren't using selectsOver mode, we now want to keep\n                                        // whatever highlight we just made, and because we have a highlighted\n                                        // item in the menu, we are no longer previewing.\n                                        detail.previewing.set(false);\n                                    }\n                                }, ((selectOverTextInInput) => {\n                                    // We have made a selection in the menu, and have selected over text\n                                    // in the input, so clear previewing.\n                                    selectOverTextInInput();\n                                    detail.previewing.set(false);\n                                }));\n                            });\n                        }\n                    },\n                    // Because the focus stays inside the input, this onExecute is fired when the\n                    // user \"clicks\" on an item. The focusing behaviour should be configured\n                    // so that items don't get focus, but they prevent a mousedown event from\n                    // firing so that the typeahead doesn't lose focus. This is the handler\n                    // for clicking on an item. We need to close the sandbox, update the typeahead\n                    // to show the item clicked on, and fire an execute.\n                    onExecute: (_menu, item) => {\n                        // Note: This will only work when the typeahead and menu are in the same system.\n                        return detail.lazyTypeaheadComp.get().map((typeahead) => {\n                            emitWith(typeahead, itemExecute(), { item });\n                            return true;\n                        });\n                    },\n                    onHover: (menu, item) => {\n                        // Hovering is also a user-initiated action, so previewing mode is over.\n                        // TODO: Have a better API for managing state in between parts.\n                        detail.previewing.set(false);\n                        detail.lazyTypeaheadComp.get().each((input) => {\n                            if (detail.model.populateFromBrowse) {\n                                setValueFromItem(detail.model, input, item);\n                            }\n                        });\n                    }\n                };\n            }\n        })\n    ]);\n\n    const Typeahead = composite({\n        name: 'Typeahead',\n        configFields: schema(),\n        partFields: parts(),\n        factory: make$2\n    });\n\n    var global$b = tinymce.util.Tools.resolve('tinymce.ThemeManager');\n\n    var global$a = tinymce.util.Tools.resolve('tinymce.util.Delay');\n\n    var global$9 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');\n\n    var global$8 = tinymce.util.Tools.resolve('tinymce.EditorManager');\n\n    var global$7 = tinymce.util.Tools.resolve('tinymce.Env');\n\n    const ToolbarMode$1 = {\n        default: 'wrap',\n        floating: 'floating',\n        sliding: 'sliding',\n        scrolling: 'scrolling'\n    };\n    const ToolbarLocation$1 = {\n        auto: 'auto',\n        top: 'top',\n        bottom: 'bottom'\n    };\n    const option$2 = (name) => (editor) => editor.options.get(name);\n    const wrapOptional = (fn) => (editor) => Optional.from(fn(editor));\n    const register$f = (editor) => {\n        const isPhone = global$7.deviceType.isPhone();\n        const isMobile = global$7.deviceType.isTablet() || isPhone;\n        const registerOption = editor.options.register;\n        const stringOrFalseProcessor = (value) => isString(value) || value === false;\n        const stringOrNumberProcessor = (value) => isString(value) || isNumber(value);\n        registerOption('skin', {\n            processor: (value) => isString(value) || value === false,\n            default: 'oxide'\n        });\n        registerOption('skin_url', {\n            processor: 'string'\n        });\n        registerOption('height', {\n            processor: stringOrNumberProcessor,\n            default: Math.max(editor.getElement().offsetHeight, 400)\n        });\n        registerOption('width', {\n            processor: stringOrNumberProcessor,\n            default: global$9.DOM.getStyle(editor.getElement(), 'width')\n        });\n        registerOption('min_height', {\n            processor: 'number',\n            default: 100\n        });\n        registerOption('min_width', {\n            processor: 'number'\n        });\n        registerOption('max_height', {\n            processor: 'number'\n        });\n        registerOption('max_width', {\n            processor: 'number'\n        });\n        registerOption('style_formats', {\n            processor: 'object[]'\n        });\n        registerOption('style_formats_merge', {\n            processor: 'boolean',\n            default: false\n        });\n        registerOption('style_formats_autohide', {\n            processor: 'boolean',\n            default: false\n        });\n        registerOption('line_height_formats', {\n            processor: 'string',\n            default: '1 1.1 1.2 1.3 1.4 1.5 2'\n        });\n        registerOption('font_family_formats', {\n            processor: 'string',\n            default: 'Andale Mono=andale mono,monospace;' +\n                'Arial=arial,helvetica,sans-serif;' +\n                'Arial Black=arial black,sans-serif;' +\n                'Book Antiqua=book antiqua,palatino,serif;' +\n                'Comic Sans MS=comic sans ms,sans-serif;' +\n                'Courier New=courier new,courier,monospace;' +\n                'Georgia=georgia,palatino,serif;' +\n                'Helvetica=helvetica,arial,sans-serif;' +\n                'Impact=impact,sans-serif;' +\n                'Symbol=symbol;' +\n                'Tahoma=tahoma,arial,helvetica,sans-serif;' +\n                'Terminal=terminal,monaco,monospace;' +\n                'Times New Roman=times new roman,times,serif;' +\n                'Trebuchet MS=trebuchet ms,geneva,sans-serif;' +\n                'Verdana=verdana,geneva,sans-serif;' +\n                'Webdings=webdings;' +\n                'Wingdings=wingdings,zapf dingbats'\n        });\n        registerOption('font_size_formats', {\n            processor: 'string',\n            default: '8pt 10pt 12pt 14pt 18pt 24pt 36pt'\n        });\n        registerOption('font_size_input_default_unit', {\n            processor: 'string',\n            default: 'pt'\n        });\n        registerOption('block_formats', {\n            processor: 'string',\n            default: 'Paragraph=p;' +\n                'Heading 1=h1;' +\n                'Heading 2=h2;' +\n                'Heading 3=h3;' +\n                'Heading 4=h4;' +\n                'Heading 5=h5;' +\n                'Heading 6=h6;' +\n                'Preformatted=pre'\n        });\n        registerOption('content_langs', {\n            processor: 'object[]'\n        });\n        registerOption('removed_menuitems', {\n            processor: 'string',\n            default: ''\n        });\n        registerOption('menubar', {\n            processor: (value) => isString(value) || isBoolean(value),\n            // Phones don't have a lot of screen space so disable the menubar\n            default: !isPhone\n        });\n        registerOption('menu', {\n            processor: 'object',\n            default: {}\n        });\n        registerOption('toolbar', {\n            processor: (value) => {\n                if (isBoolean(value) || isString(value) || isArray(value)) {\n                    return { value, valid: true };\n                }\n                else {\n                    return { valid: false, message: 'Must be a boolean, string or array.' };\n                }\n            },\n            default: true\n        });\n        // Register the toolbarN variations: toolbar1 -> toolbar9\n        range$2(9, (num) => {\n            registerOption('toolbar' + (num + 1), {\n                processor: 'string'\n            });\n        });\n        registerOption('toolbar_mode', {\n            processor: 'string',\n            // Use the default side-scrolling toolbar for tablets/phones\n            default: isMobile ? 'scrolling' : 'floating'\n        });\n        registerOption('toolbar_groups', {\n            processor: 'object',\n            default: {}\n        });\n        registerOption('toolbar_location', {\n            processor: 'string',\n            default: ToolbarLocation$1.auto\n        });\n        registerOption('toolbar_persist', {\n            processor: 'boolean',\n            default: false\n        });\n        registerOption('toolbar_sticky', {\n            processor: 'boolean',\n            default: editor.inline\n        });\n        registerOption('toolbar_sticky_offset', {\n            processor: 'number',\n            default: 0\n        });\n        registerOption('fixed_toolbar_container', {\n            processor: 'string',\n            default: ''\n        });\n        registerOption('fixed_toolbar_container_target', {\n            processor: 'object'\n        });\n        registerOption('ui_mode', {\n            processor: 'string',\n            default: 'combined'\n        });\n        registerOption('file_picker_callback', {\n            processor: 'function'\n        });\n        registerOption('file_picker_validator_handler', {\n            processor: 'function'\n        });\n        registerOption('file_picker_types', {\n            processor: 'string'\n        });\n        registerOption('typeahead_urls', {\n            processor: 'boolean',\n            default: true\n        });\n        registerOption('anchor_top', {\n            processor: stringOrFalseProcessor,\n            default: '#top'\n        });\n        registerOption('anchor_bottom', {\n            processor: stringOrFalseProcessor,\n            default: '#bottom'\n        });\n        registerOption('draggable_modal', {\n            processor: 'boolean',\n            default: false\n        });\n        registerOption('statusbar', {\n            processor: 'boolean',\n            default: true\n        });\n        registerOption('elementpath', {\n            processor: 'boolean',\n            default: true\n        });\n        registerOption('branding', {\n            processor: 'boolean',\n            default: true\n        });\n        registerOption('promotion', {\n            processor: 'boolean',\n            default: true\n        });\n        registerOption('resize', {\n            processor: (value) => value === 'both' || isBoolean(value),\n            // Editor resize doesn't work on touch devices at this stage\n            default: !global$7.deviceType.isTouch()\n        });\n        registerOption('sidebar_show', {\n            processor: 'string'\n        });\n        registerOption('sidebar_width', {\n            processor: 'number',\n            default: 440\n        });\n        registerOption('sidebar_min_width', {\n            processor: 'number',\n            default: 300\n        });\n        registerOption('sidebar_max_width', {\n            processor: 'number',\n            default: 800\n        });\n        registerOption('view_show', {\n            processor: 'string'\n        });\n        // This option is being registered in the theme instead of the help plugin as it cannot be accessed from the theme when registered there\n        registerOption('help_accessibility', {\n            processor: 'boolean',\n            default: editor.hasPlugin('help')\n        });\n        registerOption('default_font_stack', {\n            processor: 'string[]',\n            default: []\n        });\n    };\n    const isReadOnly = option$2('readonly');\n    const isDisabled = option$2('disabled');\n    const getHeightOption = option$2('height');\n    const getWidthOption = option$2('width');\n    const getMinWidthOption = wrapOptional(option$2('min_width'));\n    const getMinHeightOption = wrapOptional(option$2('min_height'));\n    const getMaxWidthOption = wrapOptional(option$2('max_width'));\n    const getMaxHeightOption = wrapOptional(option$2('max_height'));\n    const getUserStyleFormats = wrapOptional(option$2('style_formats'));\n    const shouldMergeStyleFormats = option$2('style_formats_merge');\n    const shouldAutoHideStyleFormats = option$2('style_formats_autohide');\n    const getContentLanguages = option$2('content_langs');\n    const getRemovedMenuItems = option$2('removed_menuitems');\n    const getToolbarMode = option$2('toolbar_mode');\n    const getToolbarGroups = option$2('toolbar_groups');\n    const getToolbarLocation = option$2('toolbar_location');\n    const fixedContainerSelector = option$2('fixed_toolbar_container');\n    const fixedToolbarContainerTarget = option$2('fixed_toolbar_container_target');\n    const isToolbarPersist = option$2('toolbar_persist');\n    const getStickyToolbarOffset = option$2('toolbar_sticky_offset');\n    const getMenubar = option$2('menubar');\n    const getToolbar = option$2('toolbar');\n    const getFilePickerCallback = option$2('file_picker_callback');\n    const getFilePickerValidatorHandler = option$2('file_picker_validator_handler');\n    const getFontSizeInputDefaultUnit = option$2('font_size_input_default_unit');\n    const getFilePickerTypes = option$2('file_picker_types');\n    const useTypeaheadUrls = option$2('typeahead_urls');\n    const getAnchorTop = option$2('anchor_top');\n    const getAnchorBottom = option$2('anchor_bottom');\n    const isDraggableModal$1 = option$2('draggable_modal');\n    const useStatusBar = option$2('statusbar');\n    const useElementPath = option$2('elementpath');\n    const useBranding = option$2('branding');\n    const getResize = option$2('resize');\n    const getPasteAsText = option$2('paste_as_text');\n    const getSidebarShow = option$2('sidebar_show');\n    const getSidebarWidth = option$2('sidebar_width');\n    const getSidebarMinWidth = option$2('sidebar_min_width');\n    const getSidebarMaxWidth = option$2('sidebar_max_width');\n    const getViewShow = option$2('view_show');\n    const promotionEnabled = option$2('promotion');\n    const useHelpAccessibility = option$2('help_accessibility');\n    const getDefaultFontStack = option$2('default_font_stack');\n    const getSkin = option$2('skin');\n    const isSkinDisabled = (editor) => editor.options.get('skin') === false;\n    const isMenubarEnabled = (editor) => editor.options.get('menubar') !== false;\n    const getSkinUrl = (editor) => {\n        const skinUrl = editor.options.get('skin_url');\n        if (isSkinDisabled(editor)) {\n            return skinUrl;\n        }\n        else {\n            if (skinUrl) {\n                return editor.documentBaseURI.toAbsolute(skinUrl);\n            }\n            else {\n                const skin = editor.options.get('skin');\n                return global$8.baseURL + '/skins/ui/' + skin;\n            }\n        }\n    };\n    const getSkinUrlOption = (editor) => Optional.from(editor.options.get('skin_url'));\n    const getLineHeightFormats = (editor) => editor.options.get('line_height_formats').split(' ');\n    const isToolbarEnabled = (editor) => {\n        const toolbar = getToolbar(editor);\n        const isToolbarString = isString(toolbar);\n        const isToolbarObjectArray = isArray(toolbar) && toolbar.length > 0;\n        // Toolbar is enabled if its value is true, a string or non-empty object array, but not string array\n        return !isMultipleToolbars(editor) && (isToolbarObjectArray || isToolbarString || toolbar === true);\n    };\n    // Convert toolbar<n> into toolbars array\n    const getMultipleToolbarsOption = (editor) => {\n        const toolbars = range$2(9, (num) => editor.options.get('toolbar' + (num + 1)));\n        const toolbarArray = filter$2(toolbars, isString);\n        return someIf(toolbarArray.length > 0, toolbarArray);\n    };\n    // Check if multiple toolbars is enabled\n    // Multiple toolbars is enabled if toolbar value is a string array or if toolbar<n> is present\n    const isMultipleToolbars = (editor) => getMultipleToolbarsOption(editor).fold(() => {\n        const toolbar = getToolbar(editor);\n        return isArrayOf(toolbar, isString) && toolbar.length > 0;\n    }, always);\n    const isToolbarLocationBottom = (editor) => getToolbarLocation(editor) === ToolbarLocation$1.bottom;\n    const fixedContainerTarget = (editor) => {\n        if (!editor.inline) {\n            // fixed_toolbar_container(_target) is only available in inline mode\n            return Optional.none();\n        }\n        const selector = fixedContainerSelector(editor) ?? '';\n        if (selector.length > 0) {\n            // If we have a valid selector\n            return descendant(body(), selector);\n        }\n        const element = fixedToolbarContainerTarget(editor);\n        if (isNonNullable(element)) {\n            // If we have a valid target\n            return Optional.some(SugarElement.fromDom(element));\n        }\n        return Optional.none();\n    };\n    const useFixedContainer = (editor) => editor.inline && fixedContainerTarget(editor).isSome();\n    const getUiContainer = (editor) => {\n        const fixedContainer = fixedContainerTarget(editor);\n        return fixedContainer.getOrThunk(() => getContentContainer(getRootNode(SugarElement.fromDom(editor.getElement()))));\n    };\n    const isDistractionFree = (editor) => editor.inline && !isMenubarEnabled(editor) && !isToolbarEnabled(editor) && !isMultipleToolbars(editor);\n    const isStickyToolbar = (editor) => {\n        const isStickyToolbar = editor.options.get('toolbar_sticky');\n        return (isStickyToolbar || editor.inline) && !useFixedContainer(editor) && !isDistractionFree(editor);\n    };\n    const isSplitUiMode = (editor) => !useFixedContainer(editor) && editor.options.get('ui_mode') === 'split';\n    const getMenus = (editor) => {\n        const menu = editor.options.get('menu');\n        return map$1(menu, (menu) => ({ ...menu, items: menu.items }));\n    };\n\n    var Options = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        ToolbarMode: ToolbarMode$1,\n        ToolbarLocation: ToolbarLocation$1,\n        getAnchorBottom: getAnchorBottom,\n        getAnchorTop: getAnchorTop,\n        getContentLanguages: getContentLanguages,\n        getDefaultFontStack: getDefaultFontStack,\n        getFilePickerCallback: getFilePickerCallback,\n        getFilePickerTypes: getFilePickerTypes,\n        getFilePickerValidatorHandler: getFilePickerValidatorHandler,\n        getFontSizeInputDefaultUnit: getFontSizeInputDefaultUnit,\n        getHeightOption: getHeightOption,\n        getLineHeightFormats: getLineHeightFormats,\n        getMaxHeightOption: getMaxHeightOption,\n        getMaxWidthOption: getMaxWidthOption,\n        getMenubar: getMenubar,\n        getMenus: getMenus,\n        getMinHeightOption: getMinHeightOption,\n        getMinWidthOption: getMinWidthOption,\n        getMultipleToolbarsOption: getMultipleToolbarsOption,\n        getPasteAsText: getPasteAsText,\n        getRemovedMenuItems: getRemovedMenuItems,\n        getResize: getResize,\n        getSidebarShow: getSidebarShow,\n        getSidebarWidth: getSidebarWidth,\n        getSidebarMinWidth: getSidebarMinWidth,\n        getSidebarMaxWidth: getSidebarMaxWidth,\n        getSkin: getSkin,\n        getSkinUrl: getSkinUrl,\n        getSkinUrlOption: getSkinUrlOption,\n        getStickyToolbarOffset: getStickyToolbarOffset,\n        getToolbar: getToolbar,\n        getToolbarGroups: getToolbarGroups,\n        getToolbarLocation: getToolbarLocation,\n        getToolbarMode: getToolbarMode,\n        getUiContainer: getUiContainer,\n        getUserStyleFormats: getUserStyleFormats,\n        getViewShow: getViewShow,\n        getWidthOption: getWidthOption,\n        isDisabled: isDisabled,\n        isDistractionFree: isDistractionFree,\n        isDraggableModal: isDraggableModal$1,\n        isMenubarEnabled: isMenubarEnabled,\n        isMultipleToolbars: isMultipleToolbars,\n        isReadOnly: isReadOnly,\n        isSkinDisabled: isSkinDisabled,\n        isSplitUiMode: isSplitUiMode,\n        isStickyToolbar: isStickyToolbar,\n        isToolbarEnabled: isToolbarEnabled,\n        isToolbarLocationBottom: isToolbarLocationBottom,\n        isToolbarPersist: isToolbarPersist,\n        promotionEnabled: promotionEnabled,\n        register: register$f,\n        shouldAutoHideStyleFormats: shouldAutoHideStyleFormats,\n        shouldMergeStyleFormats: shouldMergeStyleFormats,\n        useBranding: useBranding,\n        useElementPath: useElementPath,\n        useFixedContainer: useFixedContainer,\n        useHelpAccessibility: useHelpAccessibility,\n        useStatusBar: useStatusBar,\n        useTypeaheadUrls: useTypeaheadUrls\n    });\n\n    // See https://developer.mozilla.org/en-US/docs/Glossary/Scroll_container for what makes an element scrollable\n    const nonScrollingOverflows = ['visible', 'hidden', 'clip'];\n    const isScrollingOverflowValue = (value) => trim$1(value).length > 0 && !contains$2(nonScrollingOverflows, value);\n    const isScroller = (elem) => {\n        if (isHTMLElement(elem)) {\n            const overflowX = get$e(elem, 'overflow-x');\n            const overflowY = get$e(elem, 'overflow-y');\n            return isScrollingOverflowValue(overflowX) || isScrollingOverflowValue(overflowY);\n        }\n        else {\n            return false;\n        }\n    };\n    const isFullscreen = (editor) => editor.plugins.fullscreen && editor.plugins.fullscreen.isFullscreen();\n    // NOTE: Calculating the list of scrolling ancestors each time this function is called might\n    // be unnecessary. It will depend on its usage.\n    const detect = (editor, popupSinkElem) => {\n        const ancestorsScrollers = ancestors(popupSinkElem, isScroller);\n        // If there is no scrollable container, we try to see if it's in a shadow root, and try to traverse beyond the host of shadow root to retrieve the scrollable container\n        // If it is not within a ShadowRoot, since if there's a scrollable container as the ancestors, then it would not execute the code below, or return an empty array if it's not in a ShadowRoot\n        const scrollers = ancestorsScrollers.length === 0\n            ? getShadowRoot(popupSinkElem).map(getShadowHost).map((x) => ancestors(x, isScroller)).getOr([])\n            : ancestorsScrollers;\n        return head(scrollers)\n            .map((element) => ({\n            element,\n            // A list of all scrolling elements above the nearest scroller,\n            // ordered from closest to popup -> closest to top of document\n            others: scrollers.slice(1),\n            isFullscreen: () => isFullscreen(editor)\n        }));\n    };\n    const detectWhenSplitUiMode = (editor, popupSinkElem) => isSplitUiMode(editor) ? detect(editor, popupSinkElem) : Optional.none();\n    // Using all the scrolling viewports in the ancestry, limit the absolute\n    // coordinates of window so that the bounds are limited by all the scrolling\n    // viewports.\n    const getBoundsFrom = (sc) => {\n        const scrollableBoxes = [\n            // sc.element is the main scroller, others are *additional* scrollers above that\n            // we need to combine all of them to constrain the bounds\n            ...map$2(sc.others, box$1),\n            win()\n        ];\n        return sc.isFullscreen() ? win() : constrainByMany(box$1(sc.element), scrollableBoxes);\n    };\n\n    /*! @license DOMPurify 3.4.12 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.12/LICENSE */\n\n    function _arrayLikeToArray(r, a) {\n      (null == a || a > r.length) && (a = r.length);\n      for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];\n      return n;\n    }\n    function _arrayWithHoles(r) {\n      if (Array.isArray(r)) return r;\n    }\n    function _iterableToArrayLimit(r, l) {\n      var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n      if (null != t) {\n        var e,\n          n,\n          i,\n          u,\n          a = [],\n          f = true,\n          o = false;\n        try {\n          if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n        } catch (r) {\n          o = true, n = r;\n        } finally {\n          try {\n            if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;\n          } finally {\n            if (o) throw n;\n          }\n        }\n        return a;\n      }\n    }\n    function _nonIterableRest() {\n      throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n    }\n    function _slicedToArray(r, e) {\n      return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();\n    }\n    function _unsupportedIterableToArray(r, a) {\n      if (r) {\n        if (\"string\" == typeof r) return _arrayLikeToArray(r, a);\n        var t = {}.toString.call(r).slice(8, -1);\n        return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;\n      }\n    }\n\n    const entries = Object.entries,\n      setPrototypeOf = Object.setPrototypeOf,\n      isFrozen = Object.isFrozen,\n      getPrototypeOf = Object.getPrototypeOf,\n      getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n    let freeze = Object.freeze,\n      seal = Object.seal,\n      create$1 = Object.create; // eslint-disable-line import/no-mutable-exports\n    let _ref = typeof Reflect !== 'undefined' && Reflect,\n      apply = _ref.apply,\n      construct = _ref.construct;\n    if (!freeze) {\n      freeze = function freeze(x) {\n        return x;\n      };\n    }\n    if (!seal) {\n      seal = function seal(x) {\n        return x;\n      };\n    }\n    if (!apply) {\n      apply = function apply(func, thisArg) {\n        for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n          args[_key - 2] = arguments[_key];\n        }\n        return func.apply(thisArg, args);\n      };\n    }\n    if (!construct) {\n      construct = function construct(Func) {\n        for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n          args[_key2 - 1] = arguments[_key2];\n        }\n        return new Func(...args);\n      };\n    }\n    const arrayForEach = unapply(Array.prototype.forEach);\n    const arrayLastIndexOf = unapply(Array.prototype.lastIndexOf);\n    const arrayPop = unapply(Array.prototype.pop);\n    const arrayPush = unapply(Array.prototype.push);\n    const arraySplice = unapply(Array.prototype.splice);\n    const arrayIsArray = Array.isArray;\n    const stringToLowerCase = unapply(String.prototype.toLowerCase);\n    const stringToString = unapply(String.prototype.toString);\n    const stringMatch = unapply(String.prototype.match);\n    const stringReplace = unapply(String.prototype.replace);\n    const stringIndexOf = unapply(String.prototype.indexOf);\n    const stringTrim = unapply(String.prototype.trim);\n    const numberToString = unapply(Number.prototype.toString);\n    const booleanToString = unapply(Boolean.prototype.toString);\n    const bigintToString = typeof BigInt === 'undefined' ? null : unapply(BigInt.prototype.toString);\n    const symbolToString = typeof Symbol === 'undefined' ? null : unapply(Symbol.prototype.toString);\n    const objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);\n    const objectToString = unapply(Object.prototype.toString);\n    const regExpTest = unapply(RegExp.prototype.test);\n    const typeErrorCreate = unconstruct(TypeError);\n    /**\n     * Creates a new function that calls the given function with a specified thisArg and arguments.\n     *\n     * @param func - The function to be wrapped and called.\n     * @returns A new function that calls the given function with a specified thisArg and arguments.\n     */\n    function unapply(func) {\n      return function (thisArg) {\n        if (thisArg instanceof RegExp) {\n          thisArg.lastIndex = 0;\n        }\n        for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n          args[_key3 - 1] = arguments[_key3];\n        }\n        return apply(func, thisArg, args);\n      };\n    }\n    /**\n     * Creates a new function that constructs an instance of the given constructor function with the provided arguments.\n     *\n     * @param func - The constructor function to be wrapped and called.\n     * @returns A new function that constructs an instance of the given constructor function with the provided arguments.\n     */\n    function unconstruct(Func) {\n      return function () {\n        for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n          args[_key4] = arguments[_key4];\n        }\n        return construct(Func, args);\n      };\n    }\n    /**\n     * Add properties to a lookup table\n     *\n     * @param set - The set to which elements will be added.\n     * @param array - The array containing elements to be added to the set.\n     * @param transformCaseFunc - An optional function to transform the case of each element before adding to the set.\n     * @returns The modified set with added elements.\n     */\n    function addToSet(set, array) {\n      let transformCaseFunc = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : stringToLowerCase;\n      if (setPrototypeOf) {\n        // Make 'in' and truthy checks like Boolean(set.constructor)\n        // independent of any properties defined on Object.prototype.\n        // Prevent prototype setters from intercepting set as a this value.\n        setPrototypeOf(set, null);\n      }\n      if (!arrayIsArray(array)) {\n        return set;\n      }\n      let l = array.length;\n      while (l--) {\n        let element = array[l];\n        if (typeof element === 'string') {\n          const lcElement = transformCaseFunc(element);\n          if (lcElement !== element) {\n            // Config presets (e.g. tags.js, attrs.js) are immutable.\n            if (!isFrozen(array)) {\n              array[l] = lcElement;\n            }\n            element = lcElement;\n          }\n        }\n        set[element] = true;\n      }\n      return set;\n    }\n    /**\n     * Clean up an array to harden against CSPP\n     *\n     * @param array - The array to be cleaned.\n     * @returns The cleaned version of the array\n     */\n    function cleanArray(array) {\n      for (let index = 0; index < array.length; index++) {\n        const isPropertyExist = objectHasOwnProperty(array, index);\n        if (!isPropertyExist) {\n          array[index] = null;\n        }\n      }\n      return array;\n    }\n    /**\n     * Shallow clone an object\n     *\n     * @param object - The object to be cloned.\n     * @returns A new object that copies the original.\n     */\n    function clone(object) {\n      const newObject = create$1(null);\n      for (const _ref2 of entries(object)) {\n        var _ref3 = _slicedToArray(_ref2, 2);\n        const property = _ref3[0];\n        const value = _ref3[1];\n        const isPropertyExist = objectHasOwnProperty(object, property);\n        if (isPropertyExist) {\n          if (arrayIsArray(value)) {\n            newObject[property] = cleanArray(value);\n          } else if (value && typeof value === 'object' && value.constructor === Object) {\n            newObject[property] = clone(value);\n          } else {\n            newObject[property] = value;\n          }\n        }\n      }\n      return newObject;\n    }\n    /**\n     * Convert non-node values into strings without depending on direct property access.\n     *\n     * @param value - The value to stringify.\n     * @returns A string representation of the provided value.\n     */\n    function stringifyValue(value) {\n      switch (typeof value) {\n        case 'string':\n          {\n            return value;\n          }\n        case 'number':\n          {\n            return numberToString(value);\n          }\n        case 'boolean':\n          {\n            return booleanToString(value);\n          }\n        case 'bigint':\n          {\n            return bigintToString ? bigintToString(value) : '0';\n          }\n        case 'symbol':\n          {\n            return symbolToString ? symbolToString(value) : 'Symbol()';\n          }\n        case 'undefined':\n          {\n            return objectToString(value);\n          }\n        case 'function':\n        case 'object':\n          {\n            if (value === null) {\n              return objectToString(value);\n            }\n            const valueAsRecord = value;\n            const valueToString = lookupGetter(valueAsRecord, 'toString');\n            if (typeof valueToString === 'function') {\n              const stringified = valueToString(valueAsRecord);\n              return typeof stringified === 'string' ? stringified : objectToString(stringified);\n            }\n            return objectToString(value);\n          }\n        default:\n          {\n            return objectToString(value);\n          }\n      }\n    }\n    /**\n     * This method automatically checks if the prop is function or getter and behaves accordingly.\n     *\n     * @param object - The object to look up the getter function in its prototype chain.\n     * @param prop - The property name for which to find the getter function.\n     * @returns The getter function found in the prototype chain or a fallback function.\n     */\n    function lookupGetter(object, prop) {\n      while (object !== null) {\n        const desc = getOwnPropertyDescriptor(object, prop);\n        if (desc) {\n          if (desc.get) {\n            return unapply(desc.get);\n          }\n          if (typeof desc.value === 'function') {\n            return unapply(desc.value);\n          }\n        }\n        object = getPrototypeOf(object);\n      }\n      function fallbackValue() {\n        return null;\n      }\n      return fallbackValue;\n    }\n    function isRegex(value) {\n      try {\n        regExpTest(value, '');\n        return true;\n      } catch (_unused) {\n        return false;\n      }\n    }\n\n    const html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'search', 'section', 'select', 'shadow', 'slot', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']);\n    const svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'enterkeyhint', 'exportparts', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'inputmode', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'part', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);\n    const svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']);\n    // List of SVG elements that are disallowed by default.\n    // We still need to know them so that we can do namespace\n    // checks properly in case one wants to add them to\n    // allow-list.\n    const svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);\n    const mathMl$1 = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover', 'mprescripts']);\n    // Similarly to SVG, we want to know all MathML elements,\n    // even those that we disallow by default.\n    const mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);\n    const text$1 = freeze(['#text']);\n\n    const html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'command', 'commandfor', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'exportparts', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inert', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'part', 'pattern', 'placeholder', 'playsinline', 'popover', 'popovertarget', 'popovertargetaction', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'slot', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'wrap', 'xmlns']);\n    const svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'amplitude', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dominant-baseline', 'dur', 'edgemode', 'elevation', 'end', 'exponent', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'intercept', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'mask-type', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'slope', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'tablevalues', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-orientation', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);\n    const mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnalign', 'columnlines', 'columnspacing', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lquote', 'lspace', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);\n    const xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);\n\n    const MUSTACHE_EXPR = seal(/{{[\\w\\W]*|^[\\w\\W]*}}/g);\n    const ERB_EXPR = seal(/<%[\\w\\W]*|^[\\w\\W]*%>/g);\n    const TMPLIT_EXPR = seal(/\\${[\\w\\W]*/g);\n    const DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]+$/); // eslint-disable-line no-useless-escape\n    const ARIA_ATTR = seal(/^aria-[\\-\\w]+$/); // eslint-disable-line no-useless-escape\n    const IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i // eslint-disable-line no-useless-escape\n    );\n    const IS_SCRIPT_OR_DATA = seal(/^(?:\\w+script|data):/i);\n    const ATTR_WHITESPACE = seal(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g // eslint-disable-line no-control-regex\n    );\n    const DOCTYPE_NAME = seal(/^html$/i);\n    const CUSTOM_ELEMENT = seal(/^[a-z][.\\w]*(-[.\\w]+)+$/i);\n    // Markup-significant character probes used by _sanitizeElements.\n    // Shared module-level instances are safe despite the sticky /g flags:\n    // unapply() resets lastIndex for RegExp receivers before every call.\n    const ELEMENT_MARKUP_PROBE = seal(/<[/\\w!]/g);\n    const COMMENT_MARKUP_PROBE = seal(/<[/\\w]/g);\n    const FALLBACK_TAG_CLOSE = seal(/<\\/no(script|embed|frames)/i);\n    const SELF_CLOSING_TAG = seal(/\\/>/i);\n\n    // https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType\n    const NODE_TYPE = {\n      element: 1,\n      attribute: 2,\n      text: 3,\n      cdataSection: 4,\n      entityReference: 5,\n      // Deprecated\n      entityNode: 6,\n      // Deprecated\n      processingInstruction: 7,\n      comment: 8,\n      document: 9,\n      documentType: 10,\n      documentFragment: 11,\n      notation: 12 // Deprecated\n    };\n    const getGlobal = function getGlobal() {\n      return typeof window === 'undefined' ? null : window;\n    };\n    /**\n     * Creates a no-op policy for internal use only.\n     * Don't export this function outside this module!\n     * @param trustedTypes The policy factory.\n     * @param purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).\n     * @return The policy created (or null, if Trusted Types\n     * are not supported or creating the policy failed).\n     */\n    const _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, purifyHostElement) {\n      if (typeof trustedTypes !== 'object' || typeof trustedTypes.createPolicy !== 'function') {\n        return null;\n      }\n      // Allow the callers to control the unique policy name\n      // by adding a data-tt-policy-suffix to the script element with the DOMPurify.\n      // Policy creation with duplicate names throws in Trusted Types.\n      let suffix = null;\n      const ATTR_NAME = 'data-tt-policy-suffix';\n      if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) {\n        suffix = purifyHostElement.getAttribute(ATTR_NAME);\n      }\n      const policyName = 'dompurify' + (suffix ? '#' + suffix : '');\n      try {\n        return trustedTypes.createPolicy(policyName, {\n          createHTML(html) {\n            return html;\n          },\n          createScriptURL(scriptUrl) {\n            return scriptUrl;\n          }\n        });\n      } catch (_) {\n        // Policy creation failed (most likely another DOMPurify script has\n        // already run). Skip creating the policy, as this will only cause errors\n        // if TT are enforced.\n        console.warn('TrustedTypes policy ' + policyName + ' could not be created.');\n        return null;\n      }\n    };\n    const _createHooksMap = function _createHooksMap() {\n      return {\n        afterSanitizeAttributes: [],\n        afterSanitizeElements: [],\n        afterSanitizeShadowDOM: [],\n        beforeSanitizeAttributes: [],\n        beforeSanitizeElements: [],\n        beforeSanitizeShadowDOM: [],\n        uponSanitizeAttribute: [],\n        uponSanitizeElement: [],\n        uponSanitizeShadowNode: []\n      };\n    };\n    /**\n     * Resolve a set-valued configuration option: a fresh set built from\n     * cfg[key] when it is an own array property (seeded with a clone of\n     * options.base when given, case-normalized via options.transform),\n     * the fallback set otherwise.\n     *\n     * @param cfg the cloned, prototype-free configuration object\n     * @param key the configuration property to read\n     * @param fallback the set to use when the option is absent or not an array\n     * @param options transform and optional base set to merge into\n     * @returns the resolved set\n     */\n    const _resolveSetOption = function _resolveSetOption(cfg, key, fallback, options) {\n      return objectHasOwnProperty(cfg, key) && arrayIsArray(cfg[key]) ? addToSet(options.base ? clone(options.base) : {}, cfg[key], options.transform) : fallback;\n    };\n    function createDOMPurify() {\n      let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();\n      const DOMPurify = root => createDOMPurify(root);\n      DOMPurify.version = '3.4.12';\n      DOMPurify.removed = [];\n      if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {\n        // Not running in a browser, provide a factory function\n        // so that you can pass your own Window\n        DOMPurify.isSupported = false;\n        return DOMPurify;\n      }\n      let document = window.document;\n      const originalDocument = document;\n      const currentScript = originalDocument.currentScript;\n      window.DocumentFragment;\n        const HTMLTemplateElement = window.HTMLTemplateElement,\n        Node = window.Node,\n        Element = window.Element,\n        NodeFilter = window.NodeFilter,\n        _window$NamedNodeMap = window.NamedNodeMap;\n        _window$NamedNodeMap === void 0 ? window.NamedNodeMap || window.MozNamedAttrMap : _window$NamedNodeMap;\n        window.HTMLFormElement;\n        const DOMParser = window.DOMParser,\n        trustedTypes = window.trustedTypes;\n      const ElementPrototype = Element.prototype;\n      const cloneNode = lookupGetter(ElementPrototype, 'cloneNode');\n      const remove = lookupGetter(ElementPrototype, 'remove');\n      const getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');\n      const getChildNodes = lookupGetter(ElementPrototype, 'childNodes');\n      const getParentNode = lookupGetter(ElementPrototype, 'parentNode');\n      const getShadowRoot = lookupGetter(ElementPrototype, 'shadowRoot');\n      const getAttributes = lookupGetter(ElementPrototype, 'attributes');\n      const getNodeType = Node && Node.prototype ? lookupGetter(Node.prototype, 'nodeType') : null;\n      const getNodeName = Node && Node.prototype ? lookupGetter(Node.prototype, 'nodeName') : null;\n      // As per issue #47, the web-components registry is inherited by a\n      // new document created via createHTMLDocument. As per the spec\n      // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)\n      // a new empty registry is used when creating a template contents owner\n      // document, so we use that as our parent document to ensure nothing\n      // is inherited.\n      if (typeof HTMLTemplateElement === 'function') {\n        const template = document.createElement('template');\n        if (template.content && template.content.ownerDocument) {\n          document = template.content.ownerDocument;\n        }\n      }\n      let trustedTypesPolicy;\n      let emptyHTML = '';\n      // The instance's own internal Trusted Types policy. Unlike a caller-supplied\n      // `TRUSTED_TYPES_POLICY`, this is created at most once \u2014 Trusted Types throws\n      // on duplicate policy names \u2014 and is the only policy allowed to persist\n      // across configurations and survive `clearConfig()`.\n      let defaultTrustedTypesPolicy;\n      let defaultTrustedTypesPolicyResolved = false;\n      // Tracks whether we are already inside a call to the configured Trusted Types\n      // policy (`createHTML` or `createScriptURL`). If a supplied policy callback\n      // itself calls `DOMPurify.sanitize` (the cause of #1422), `sanitize` would\n      // re-enter the policy and recurse until the stack overflows. We detect that\n      // re-entry and throw a clear, actionable error instead. The guard is shared\n      // across both callbacks, because either one re-entering `sanitize` triggers\n      // the same unbounded recursion.\n      let IN_TRUSTED_TYPES_POLICY = 0;\n      const _assertNotInTrustedTypesPolicy = function _assertNotInTrustedTypesPolicy() {\n        if (IN_TRUSTED_TYPES_POLICY > 0) {\n          throw typeErrorCreate('A configured TRUSTED_TYPES_POLICY callback (createHTML or ' + 'createScriptURL) must not call DOMPurify.sanitize, as that causes ' + 'infinite recursion. Do not pass a policy whose callbacks wrap ' + 'DOMPurify as TRUSTED_TYPES_POLICY; see the \"DOMPurify and Trusted ' + 'Types\" section of the README.');\n        }\n      };\n      const _createTrustedHTML = function _createTrustedHTML(html) {\n        _assertNotInTrustedTypesPolicy();\n        IN_TRUSTED_TYPES_POLICY++;\n        try {\n          return trustedTypesPolicy.createHTML(html);\n        } finally {\n          IN_TRUSTED_TYPES_POLICY--;\n        }\n      };\n      const _createTrustedScriptURL = function _createTrustedScriptURL(scriptUrl) {\n        _assertNotInTrustedTypesPolicy();\n        IN_TRUSTED_TYPES_POLICY++;\n        try {\n          return trustedTypesPolicy.createScriptURL(scriptUrl);\n        } finally {\n          IN_TRUSTED_TYPES_POLICY--;\n        }\n      };\n      // Lazily resolve (and cache) the instance's internal default policy.\n      // Resolution is attempted at most once: a successful `createPolicy` cannot be\n      // repeated (Trusted Types throws on duplicate names), and a failed or\n      // unsupported attempt must not be retried on every parse.\n      const _getDefaultTrustedTypesPolicy = function _getDefaultTrustedTypesPolicy() {\n        if (!defaultTrustedTypesPolicyResolved) {\n          defaultTrustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);\n          defaultTrustedTypesPolicyResolved = true;\n        }\n        return defaultTrustedTypesPolicy;\n      };\n      const _document = document,\n        implementation = _document.implementation,\n        createNodeIterator = _document.createNodeIterator,\n        createDocumentFragment = _document.createDocumentFragment,\n        getElementsByTagName = _document.getElementsByTagName;\n      const importNode = originalDocument.importNode;\n      let hooks = _createHooksMap();\n      /**\n       * Expose whether this browser supports running the full DOMPurify.\n       */\n      DOMPurify.isSupported = typeof entries === 'function' && typeof getParentNode === 'function' && implementation && implementation.createHTMLDocument !== undefined;\n      const MUSTACHE_EXPR$1 = MUSTACHE_EXPR,\n        ERB_EXPR$1 = ERB_EXPR,\n        TMPLIT_EXPR$1 = TMPLIT_EXPR,\n        DATA_ATTR$1 = DATA_ATTR,\n        ARIA_ATTR$1 = ARIA_ATTR,\n        IS_SCRIPT_OR_DATA$1 = IS_SCRIPT_OR_DATA,\n        ATTR_WHITESPACE$1 = ATTR_WHITESPACE,\n        CUSTOM_ELEMENT$1 = CUSTOM_ELEMENT;\n      let IS_ALLOWED_URI$1 = IS_ALLOWED_URI;\n      /**\n       * We consider the elements and attributes below to be safe. Ideally\n       * don't add any new ones but feel free to remove unwanted ones.\n       */\n      /* allowed element names */\n      let ALLOWED_TAGS = null;\n      const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text$1]);\n      /* Allowed attribute names */\n      let ALLOWED_ATTR = null;\n      const DEFAULT_ALLOWED_ATTR = addToSet({}, [...html, ...svg, ...mathMl, ...xml]);\n      /*\n       * Configure how DOMPurify should handle custom elements and their attributes as well as customized built-in elements.\n       * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)\n       * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)\n       * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.\n       */\n      let CUSTOM_ELEMENT_HANDLING = Object.seal(create$1(null, {\n        tagNameCheck: {\n          writable: true,\n          configurable: false,\n          enumerable: true,\n          value: null\n        },\n        attributeNameCheck: {\n          writable: true,\n          configurable: false,\n          enumerable: true,\n          value: null\n        },\n        allowCustomizedBuiltInElements: {\n          writable: true,\n          configurable: false,\n          enumerable: true,\n          value: false\n        }\n      }));\n      /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\n      let FORBID_TAGS = null;\n      /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\n      let FORBID_ATTR = null;\n      /* Config object to store ADD_TAGS/ADD_ATTR functions (when used as functions) */\n      const EXTRA_ELEMENT_HANDLING = Object.seal(create$1(null, {\n        tagCheck: {\n          writable: true,\n          configurable: false,\n          enumerable: true,\n          value: null\n        },\n        attributeCheck: {\n          writable: true,\n          configurable: false,\n          enumerable: true,\n          value: null\n        }\n      }));\n      /* Decide if ARIA attributes are okay */\n      let ALLOW_ARIA_ATTR = true;\n      /* Decide if custom data attributes are okay */\n      let ALLOW_DATA_ATTR = true;\n      /* Decide if unknown protocols are okay */\n      let ALLOW_UNKNOWN_PROTOCOLS = false;\n      /* Decide if self-closing tags in attributes are allowed.\n       * Usually removed due to a mXSS issue in jQuery 3.0 */\n      let ALLOW_SELF_CLOSE_IN_ATTR = true;\n      /* Output should be safe for common template engines.\n       * This means, DOMPurify removes data attributes, mustaches and ERB\n       */\n      let SAFE_FOR_TEMPLATES = false;\n      /* Output should be safe even for XML used within HTML and alike.\n       * This means, DOMPurify removes comments when containing risky content.\n       */\n      let SAFE_FOR_XML = true;\n      /* Decide if document with <html>... should be returned */\n      let WHOLE_DOCUMENT = false;\n      /* Track whether config is already set on this instance of DOMPurify. */\n      let SET_CONFIG = false;\n      /* Pristine allowlist bindings captured at setConfig() time. On the\n       * persistent-config path sanitize() restores the sets from these before\n       * the per-walk hook clone-guard, so a hook's in-call widening cannot\n       * carry across calls. Null until setConfig() is called; reset by\n       * clearConfig(). */\n      let SET_CONFIG_ALLOWED_TAGS = null;\n      let SET_CONFIG_ALLOWED_ATTR = null;\n      /* Decide if all elements (e.g. style, script) must be children of\n       * document.body. By default, browsers might move them to document.head */\n      let FORCE_BODY = false;\n      /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html\n       * string (or a TrustedHTML object if Trusted Types are supported).\n       * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead\n       */\n      let RETURN_DOM = false;\n      /* Decide if a DOM `DocumentFragment` should be returned, instead of a html\n       * string  (or a TrustedHTML object if Trusted Types are supported) */\n      let RETURN_DOM_FRAGMENT = false;\n      /* Try to return a Trusted Type object instead of a string, return a string in\n       * case Trusted Types are not supported  */\n      let RETURN_TRUSTED_TYPE = false;\n      /* Output should be free from DOM clobbering attacks?\n       * This sanitizes markups named with colliding, clobberable built-in DOM APIs.\n       */\n      let SANITIZE_DOM = true;\n      /* Achieve full DOM Clobbering protection by isolating the namespace of named\n       * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.\n       *\n       * HTML/DOM spec rules that enable DOM Clobbering:\n       *   - Named Access on Window (\u00A77.3.3)\n       *   - DOM Tree Accessors (\u00A73.1.5)\n       *   - Form Element Parent-Child Relations (\u00A74.10.3)\n       *   - Iframe srcdoc / Nested WindowProxies (\u00A74.8.5)\n       *   - HTMLCollection (\u00A74.2.10.2)\n       *\n       * Namespace isolation is implemented by prefixing `id` and `name` attributes\n       * with a constant string, i.e., `user-content-`\n       */\n      let SANITIZE_NAMED_PROPS = false;\n      const SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';\n      /* Keep element content when removing element? */\n      let KEEP_CONTENT = true;\n      /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead\n       * of importing it into a new Document and returning a sanitized copy */\n      let IN_PLACE = false;\n      /* Allow usage of profiles like html, svg and mathMl */\n      let USE_PROFILES = {};\n      /* Tags to ignore content of when KEEP_CONTENT is true */\n      let FORBID_CONTENTS = null;\n      const DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script',\n      // <selectedcontent> mirrors the selected <option>'s subtree, cloned by\n      // the UA (customizable <select>) \u2014 including any on* handlers \u2014 and the\n      // engine re-mirrors synchronously whenever a removal changes which\n      // option/selectedcontent is current, even inside DOMPurify's inert\n      // DOMParser document. Hoisting its children on removal re-inserts a fresh\n      // mirror target ahead of the walk, which the engine refills, looping\n      // forever (DoS) and amplifying output. Dropping its content on removal\n      // (rather than hoisting) breaks that cascade; the content is a duplicate\n      // of the option, which is sanitized on its own. See campaign-3 F1/F6.\n      'selectedcontent', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);\n      /* Tags that are safe for data: URIs */\n      let DATA_URI_TAGS = null;\n      const DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);\n      /* Attributes safe for values like \"javascript:\" */\n      let URI_SAFE_ATTRIBUTES = null;\n      const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);\n      const MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n      const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\n      const HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\n      /* Document namespace */\n      let NAMESPACE = HTML_NAMESPACE;\n      let IS_EMPTY_INPUT = false;\n      /* Allowed XHTML+XML namespaces */\n      let ALLOWED_NAMESPACES = null;\n      const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);\n      const DEFAULT_MATHML_TEXT_INTEGRATION_POINTS = freeze(['mi', 'mo', 'mn', 'ms', 'mtext']);\n      let MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, DEFAULT_MATHML_TEXT_INTEGRATION_POINTS);\n      const DEFAULT_HTML_INTEGRATION_POINTS = freeze(['annotation-xml']);\n      let HTML_INTEGRATION_POINTS = addToSet({}, DEFAULT_HTML_INTEGRATION_POINTS);\n      // Certain elements are allowed in both SVG and HTML\n      // namespace. We need to specify them explicitly\n      // so that they don't get erroneously deleted from\n      // HTML namespace.\n      const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']);\n      /* Parsing of strict XHTML documents */\n      let PARSER_MEDIA_TYPE = null;\n      const SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];\n      const DEFAULT_PARSER_MEDIA_TYPE = 'text/html';\n      let transformCaseFunc = null;\n      /* Keep a reference to config to pass to hooks */\n      let CONFIG = null;\n      /* Ideally, do not touch anything below this line */\n      /* ______________________________________________ */\n      const formElement = document.createElement('form');\n      const isRegexOrFunction = function isRegexOrFunction(testValue) {\n        return testValue instanceof RegExp || testValue instanceof Function;\n      };\n      /**\n       * _parseConfig\n       *\n       * @param cfg optional config literal\n       */\n      // eslint-disable-next-line complexity\n      const _parseConfig = function _parseConfig() {\n        let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n        if (CONFIG && CONFIG === cfg) {\n          return;\n        }\n        /* Shield configuration object from tampering */\n        if (!cfg || typeof cfg !== 'object') {\n          cfg = {};\n        }\n        /* Shield configuration object from prototype pollution */\n        cfg = clone(cfg);\n        PARSER_MEDIA_TYPE =\n        // eslint-disable-next-line unicorn/prefer-includes\n        SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;\n        // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.\n        transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? stringToString : stringToLowerCase;\n        /* Set configuration parameters */\n        ALLOWED_TAGS = _resolveSetOption(cfg, 'ALLOWED_TAGS', DEFAULT_ALLOWED_TAGS, {\n          transform: transformCaseFunc\n        });\n        ALLOWED_ATTR = _resolveSetOption(cfg, 'ALLOWED_ATTR', DEFAULT_ALLOWED_ATTR, {\n          transform: transformCaseFunc\n        });\n        ALLOWED_NAMESPACES = _resolveSetOption(cfg, 'ALLOWED_NAMESPACES', DEFAULT_ALLOWED_NAMESPACES, {\n          transform: stringToString\n        });\n        URI_SAFE_ATTRIBUTES = _resolveSetOption(cfg, 'ADD_URI_SAFE_ATTR', DEFAULT_URI_SAFE_ATTRIBUTES, {\n          transform: transformCaseFunc,\n          base: DEFAULT_URI_SAFE_ATTRIBUTES\n        });\n        DATA_URI_TAGS = _resolveSetOption(cfg, 'ADD_DATA_URI_TAGS', DEFAULT_DATA_URI_TAGS, {\n          transform: transformCaseFunc,\n          base: DEFAULT_DATA_URI_TAGS\n        });\n        FORBID_CONTENTS = _resolveSetOption(cfg, 'FORBID_CONTENTS', DEFAULT_FORBID_CONTENTS, {\n          transform: transformCaseFunc\n        });\n        FORBID_TAGS = _resolveSetOption(cfg, 'FORBID_TAGS', clone({}), {\n          transform: transformCaseFunc\n        });\n        FORBID_ATTR = _resolveSetOption(cfg, 'FORBID_ATTR', clone({}), {\n          transform: transformCaseFunc\n        });\n        USE_PROFILES = objectHasOwnProperty(cfg, 'USE_PROFILES') ? cfg.USE_PROFILES && typeof cfg.USE_PROFILES === 'object' ? clone(cfg.USE_PROFILES) : cfg.USE_PROFILES : false;\n        ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true\n        ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true\n        ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false\n        ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; // Default true\n        SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false\n        SAFE_FOR_XML = cfg.SAFE_FOR_XML !== false; // Default true\n        WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false\n        RETURN_DOM = cfg.RETURN_DOM || false; // Default false\n        RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false\n        RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false\n        FORCE_BODY = cfg.FORCE_BODY || false; // Default false\n        SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true\n        SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false\n        KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true\n        IN_PLACE = cfg.IN_PLACE || false; // Default false\n        IS_ALLOWED_URI$1 = isRegex(cfg.ALLOWED_URI_REGEXP) ? cfg.ALLOWED_URI_REGEXP : IS_ALLOWED_URI; // Default regexp\n        NAMESPACE = typeof cfg.NAMESPACE === 'string' ? cfg.NAMESPACE : HTML_NAMESPACE; // Default HTML namespace\n        MATHML_TEXT_INTEGRATION_POINTS = objectHasOwnProperty(cfg, 'MATHML_TEXT_INTEGRATION_POINTS') && cfg.MATHML_TEXT_INTEGRATION_POINTS && typeof cfg.MATHML_TEXT_INTEGRATION_POINTS === 'object' ? clone(cfg.MATHML_TEXT_INTEGRATION_POINTS) : addToSet({}, DEFAULT_MATHML_TEXT_INTEGRATION_POINTS); // Default built-in map\n        HTML_INTEGRATION_POINTS = objectHasOwnProperty(cfg, 'HTML_INTEGRATION_POINTS') && cfg.HTML_INTEGRATION_POINTS && typeof cfg.HTML_INTEGRATION_POINTS === 'object' ? clone(cfg.HTML_INTEGRATION_POINTS) : addToSet({}, DEFAULT_HTML_INTEGRATION_POINTS); // Default built-in map\n        const customElementHandling = objectHasOwnProperty(cfg, 'CUSTOM_ELEMENT_HANDLING') && cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING === 'object' ? clone(cfg.CUSTOM_ELEMENT_HANDLING) : create$1(null);\n        CUSTOM_ELEMENT_HANDLING = create$1(null);\n        if (objectHasOwnProperty(customElementHandling, 'tagNameCheck') && isRegexOrFunction(customElementHandling.tagNameCheck)) {\n          CUSTOM_ELEMENT_HANDLING.tagNameCheck = customElementHandling.tagNameCheck; // Default undefined\n        }\n        if (objectHasOwnProperty(customElementHandling, 'attributeNameCheck') && isRegexOrFunction(customElementHandling.attributeNameCheck)) {\n          CUSTOM_ELEMENT_HANDLING.attributeNameCheck = customElementHandling.attributeNameCheck; // Default undefined\n        }\n        if (objectHasOwnProperty(customElementHandling, 'allowCustomizedBuiltInElements') && typeof customElementHandling.allowCustomizedBuiltInElements === 'boolean') {\n          CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = customElementHandling.allowCustomizedBuiltInElements; // Default undefined\n        }\n        seal(CUSTOM_ELEMENT_HANDLING);\n        if (SAFE_FOR_TEMPLATES) {\n          ALLOW_DATA_ATTR = false;\n        }\n        if (RETURN_DOM_FRAGMENT) {\n          RETURN_DOM = true;\n        }\n        /* Parse profile info */\n        if (USE_PROFILES) {\n          ALLOWED_TAGS = addToSet({}, text$1);\n          ALLOWED_ATTR = create$1(null);\n          if (USE_PROFILES.html === true) {\n            addToSet(ALLOWED_TAGS, html$1);\n            addToSet(ALLOWED_ATTR, html);\n          }\n          if (USE_PROFILES.svg === true) {\n            addToSet(ALLOWED_TAGS, svg$1);\n            addToSet(ALLOWED_ATTR, svg);\n            addToSet(ALLOWED_ATTR, xml);\n          }\n          if (USE_PROFILES.svgFilters === true) {\n            addToSet(ALLOWED_TAGS, svgFilters);\n            addToSet(ALLOWED_ATTR, svg);\n            addToSet(ALLOWED_ATTR, xml);\n          }\n          if (USE_PROFILES.mathMl === true) {\n            addToSet(ALLOWED_TAGS, mathMl$1);\n            addToSet(ALLOWED_ATTR, mathMl);\n            addToSet(ALLOWED_ATTR, xml);\n          }\n        }\n        /* Always reset function-based ADD_TAGS / ADD_ATTR checks to prevent\n         * leaking across calls when switching from function to array config */\n        EXTRA_ELEMENT_HANDLING.tagCheck = null;\n        EXTRA_ELEMENT_HANDLING.attributeCheck = null;\n        /* Merge configuration parameters */\n        if (objectHasOwnProperty(cfg, 'ADD_TAGS')) {\n          if (typeof cfg.ADD_TAGS === 'function') {\n            EXTRA_ELEMENT_HANDLING.tagCheck = cfg.ADD_TAGS;\n          } else if (arrayIsArray(cfg.ADD_TAGS)) {\n            if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {\n              ALLOWED_TAGS = clone(ALLOWED_TAGS);\n            }\n            addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);\n          }\n        }\n        if (objectHasOwnProperty(cfg, 'ADD_ATTR')) {\n          if (typeof cfg.ADD_ATTR === 'function') {\n            EXTRA_ELEMENT_HANDLING.attributeCheck = cfg.ADD_ATTR;\n          } else if (arrayIsArray(cfg.ADD_ATTR)) {\n            if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {\n              ALLOWED_ATTR = clone(ALLOWED_ATTR);\n            }\n            addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);\n          }\n        }\n        if (objectHasOwnProperty(cfg, 'ADD_URI_SAFE_ATTR') && arrayIsArray(cfg.ADD_URI_SAFE_ATTR)) {\n          addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);\n        }\n        if (objectHasOwnProperty(cfg, 'FORBID_CONTENTS') && arrayIsArray(cfg.FORBID_CONTENTS)) {\n          if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {\n            FORBID_CONTENTS = clone(FORBID_CONTENTS);\n          }\n          addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);\n        }\n        if (objectHasOwnProperty(cfg, 'ADD_FORBID_CONTENTS') && arrayIsArray(cfg.ADD_FORBID_CONTENTS)) {\n          if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {\n            FORBID_CONTENTS = clone(FORBID_CONTENTS);\n          }\n          addToSet(FORBID_CONTENTS, cfg.ADD_FORBID_CONTENTS, transformCaseFunc);\n        }\n        /* Add #text in case KEEP_CONTENT is set to true */\n        if (KEEP_CONTENT) {\n          ALLOWED_TAGS['#text'] = true;\n        }\n        /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */\n        if (WHOLE_DOCUMENT) {\n          addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);\n        }\n        /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */\n        if (ALLOWED_TAGS.table) {\n          addToSet(ALLOWED_TAGS, ['tbody']);\n          delete FORBID_TAGS.tbody;\n        }\n        // Re-derive the active Trusted Types policy from this configuration on\n        // every parse. The active policy must never be sticky closure state that\n        // outlives the config that set it: a caller-supplied policy left in place\n        // after `clearConfig()` \u2014 or after a later call that supplied none, or\n        // `TRUSTED_TYPES_POLICY: null` \u2014 could sign a subsequent \"default\"\n        // `RETURN_TRUSTED_TYPE` result with a foreign, possibly unsafe policy.\n        // See GHSA-vxr8-fq34-vvx9.\n        if (cfg.TRUSTED_TYPES_POLICY) {\n          if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== 'function') {\n            throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.');\n          }\n          if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== 'function') {\n            throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.');\n          }\n          // A caller-supplied policy applies to this configuration only.\n          const previousTrustedTypesPolicy = trustedTypesPolicy;\n          trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;\n          // Sign local variables required by `sanitize`. If the supplied policy's\n          // `createHTML` is circular (i.e. it calls `DOMPurify.sanitize`), this\n          // throws via the re-entrancy guard. Restore the previous policy first so\n          // the instance is not left in a poisoned state. See #1422.\n          try {\n            emptyHTML = _createTrustedHTML('');\n          } catch (error) {\n            trustedTypesPolicy = previousTrustedTypesPolicy;\n            throw error;\n          }\n        } else if (cfg.TRUSTED_TYPES_POLICY === null) {\n          // Explicit opt-out for this call: perform no Trusted Types signing and\n          // create nothing (so a strict `trusted-types` CSP that disallows a\n          // `dompurify` policy can still call `sanitize` from inside its own\n          // policy \u2014 see #1422). Resetting to `undefined` rather than a sticky\n          // `null` also drops any previously retained caller policy, so it cannot\n          // resurface on a later call, while still allowing the next config-less\n          // call to restore the internal default policy. See GHSA-vxr8-fq34-vvx9.\n          trustedTypesPolicy = undefined;\n          emptyHTML = '';\n        } else {\n          // No policy supplied: keep the currently active policy if one is set \u2014 a\n          // previously supplied policy is intentionally sticky across config-less\n          // calls \u2014 otherwise fall back to the instance's own internal policy,\n          // created at most once. (A policy supplied for a *single* call still\n          // lingers by design; what must not linger is a policy whose configuration\n          // has been torn down via `clearConfig()`, which restores the default.)\n          if (trustedTypesPolicy === undefined) {\n            trustedTypesPolicy = _getDefaultTrustedTypesPolicy();\n          }\n          // Sign internal variables only when a policy is active. A falsy policy\n          // (Trusted Types unsupported, creation failed, or an explicit opt-out)\n          // leaves `emptyHTML` as a plain string, so we never call `.createHTML` on\n          // a non-policy and throw. See #1422.\n          if (trustedTypesPolicy && typeof emptyHTML === 'string') {\n            emptyHTML = _createTrustedHTML('');\n          }\n        }\n        // Prevent further manipulation of configuration.\n        // Not available in IE8, Safari 5, etc.\n        if (freeze) {\n          freeze(cfg);\n        }\n        CONFIG = cfg;\n      };\n      /* Keep track of all possible SVG and MathML tags\n       * so that we can perform the namespace checks\n       * correctly. */\n      const ALL_SVG_TAGS = addToSet({}, [...svg$1, ...svgFilters, ...svgDisallowed]);\n      const ALL_MATHML_TAGS = addToSet({}, [...mathMl$1, ...mathMlDisallowed]);\n      /**\n       * Namespace rules for an element in the SVG namespace.\n       *\n       * @param tagName the element's lowercase tag name\n       * @param parent the (possibly simulated) parent node\n       * @param parentTagName the parent's lowercase tag name\n       * @returns true if a spec-compliant parser could produce this element\n       */\n      const _checkSvgNamespace = function _checkSvgNamespace(tagName, parent, parentTagName) {\n        // The only way to switch from HTML namespace to SVG\n        // is via <svg>. If it happens via any other tag, then\n        // it should be killed.\n        if (parent.namespaceURI === HTML_NAMESPACE) {\n          return tagName === 'svg';\n        }\n        // The only way to switch from MathML to SVG is via <svg>\n        // if the parent is either <annotation-xml> or a MathML\n        // text integration point.\n        if (parent.namespaceURI === MATHML_NAMESPACE) {\n          return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);\n        }\n        // We only allow elements that are defined in SVG\n        // spec. All others are disallowed in SVG namespace.\n        return Boolean(ALL_SVG_TAGS[tagName]);\n      };\n      /**\n       * Namespace rules for an element in the MathML namespace.\n       *\n       * @param tagName the element's lowercase tag name\n       * @param parent the (possibly simulated) parent node\n       * @param parentTagName the parent's lowercase tag name\n       * @returns true if a spec-compliant parser could produce this element\n       */\n      const _checkMathMlNamespace = function _checkMathMlNamespace(tagName, parent, parentTagName) {\n        // The only way to switch from HTML namespace to MathML\n        // is via <math>. If it happens via any other tag, then\n        // it should be killed.\n        if (parent.namespaceURI === HTML_NAMESPACE) {\n          return tagName === 'math';\n        }\n        // The only way to switch from SVG to MathML is via\n        // <math> and HTML integration points\n        if (parent.namespaceURI === SVG_NAMESPACE) {\n          return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];\n        }\n        // We only allow elements that are defined in MathML\n        // spec. All others are disallowed in MathML namespace.\n        return Boolean(ALL_MATHML_TAGS[tagName]);\n      };\n      /**\n       * Namespace rules for an element in the HTML namespace.\n       *\n       * @param tagName the element's lowercase tag name\n       * @param parent the (possibly simulated) parent node\n       * @param parentTagName the parent's lowercase tag name\n       * @returns true if a spec-compliant parser could produce this element\n       */\n      const _checkHtmlNamespace = function _checkHtmlNamespace(tagName, parent, parentTagName) {\n        // The only way to switch from SVG to HTML is via\n        // HTML integration points, and from MathML to HTML\n        // is via MathML text integration points\n        if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {\n          return false;\n        }\n        if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {\n          return false;\n        }\n        // We disallow tags that are specific for MathML\n        // or SVG and should never appear in HTML namespace\n        return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);\n      };\n      /**\n       * @param element a DOM element whose namespace is being checked\n       * @returns Return false if the element has a\n       *  namespace that a spec-compliant parser would never\n       *  return. Return true otherwise.\n       */\n      const _checkValidNamespace = function _checkValidNamespace(element) {\n        let parent = getParentNode(element);\n        // In JSDOM, if we're inside shadow DOM, then parentNode\n        // can be null. We just simulate parent in this case.\n        if (!parent || !parent.tagName) {\n          parent = {\n            namespaceURI: NAMESPACE,\n            tagName: 'template'\n          };\n        }\n        const tagName = stringToLowerCase(element.tagName);\n        const parentTagName = stringToLowerCase(parent.tagName);\n        if (!ALLOWED_NAMESPACES[element.namespaceURI]) {\n          return false;\n        }\n        if (element.namespaceURI === SVG_NAMESPACE) {\n          return _checkSvgNamespace(tagName, parent, parentTagName);\n        }\n        if (element.namespaceURI === MATHML_NAMESPACE) {\n          return _checkMathMlNamespace(tagName, parent, parentTagName);\n        }\n        if (element.namespaceURI === HTML_NAMESPACE) {\n          return _checkHtmlNamespace(tagName, parent, parentTagName);\n        }\n        // For XHTML and XML documents that support custom namespaces\n        if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && ALLOWED_NAMESPACES[element.namespaceURI]) {\n          return true;\n        }\n        // The code should never reach this place (this means\n        // that the element somehow got namespace that is not\n        // HTML, SVG, MathML or allowed via ALLOWED_NAMESPACES).\n        // Return false just in case.\n        return false;\n      };\n      /**\n       * _forceRemove\n       *\n       * @param node a DOM node\n       */\n      const _forceRemove = function _forceRemove(node) {\n        arrayPush(DOMPurify.removed, {\n          element: node\n        });\n        try {\n          // eslint-disable-next-line unicorn/prefer-dom-node-remove\n          getParentNode(node).removeChild(node);\n        } catch (_) {\n          /* The normal detach failed \u2014 this is reached for a parentless node\n             (getParentNode() is null, so .removeChild throws). Element.prototype\n             .remove() is itself a spec no-op on a parentless node, so a recorded\n             \"removal\" would otherwise hand the caller back an intact,\n             payload-bearing node (e.g. a detached IN_PLACE root the mXSS canary or\n             the style-with-element-child rule decided to kill). Fail closed by\n             throwing \u2014 exactly as a clobbered root does at the IN_PLACE entry \u2014\n             rather than trying to \"neutralize\" the node via its own methods.\n             Neutralizing would mean calling getAttributeNames()/removeAttribute()\n             on the node, both of which a <form> root can clobber via a named child\n             (and _isClobbered does not even probe getAttributeNames), so the\n             neutralize step could itself be silently defeated, leaving the payload\n             intact. A throw touches only the cached, clobber-safe remove() and\n             getParentNode(). Generalizes GHSA-r47g-fvhr-h676 (clobbered-form root)\n             to every root-kill reason. REPORT-3.\n                    This lives inside the catch, so it never fires for a normally-removed\n             in-tree node: those have a parent, removeChild() succeeds, and the\n             catch is not entered. Only a kept (parentless) root reaches here. */\n          remove(node);\n          if (!getParentNode(node)) {\n            throw typeErrorCreate('a node selected for removal could not be detached from its tree ' + 'and cannot be safely returned; refusing to sanitize in place');\n          }\n        }\n      };\n      /**\n       * _neutralizeRoot\n       *\n       * Fail-closed teardown of an in-place root after the sanitize walk aborts\n       * (campaign-3 F2). An internal throw mid-walk \u2014 e.g. a page-registered\n       * custom element's reaction detaches a node so `_forceRemove`'s deliberate\n       * parentless guard throws, or any other re-entrant engine mutation \u2014 would\n       * otherwise leave the caller's *live* tree half-sanitized, with everything\n       * after the abort point still carrying its handlers. There is no safe way\n       * to resume the walk (the tree mutated under us), so we strip the root bare:\n       * remove every child and every attribute, then let the caller's catch see\n       * the original error. Clobber-safe (cached `remove`/`childNodes`/`attributes`\n       * getters; the root was already clobber-pre-flighted at the IN_PLACE entry).\n       *\n       * @param root the in-place root to empty\n       */\n      const _neutralizeRoot = function _neutralizeRoot(root) {\n        /* Strip every disallowed attribute (on* handlers included) off the whole\n           subtree BEFORE detaching anything. Detaching first would hand back\n           handler-bearing originals (e.g. an already-loading `<img onerror>`)\n           whose queued resource event still fires in page scope after we throw.\n           Clobber-safe reads; a doomed clobbered node's own attributes are\n           irrelevant while its non-clobbered descendants are reached and scrubbed. */\n        _neutralizeSubtree(root);\n        const childNodes = getChildNodes(root);\n        if (childNodes) {\n          const snapshot = [];\n          arrayForEach(childNodes, child => {\n            arrayPush(snapshot, child);\n          });\n          arrayForEach(snapshot, child => {\n            try {\n              remove(child);\n            } catch (_) {\n              /* Best-effort teardown; a still-attached child is handled below */\n            }\n          });\n        }\n        const attributes = getAttributes(root);\n        if (attributes) {\n          for (let i = attributes.length - 1; i >= 0; --i) {\n            const attribute = attributes[i];\n            const name = attribute && attribute.name;\n            if (typeof name === 'string') {\n              try {\n                root.removeAttribute(name);\n              } catch (_) {\n                /* Clobbered removeAttribute \u2014 ignore (fail-closed best effort) */\n              }\n            }\n          }\n        }\n      };\n      /**\n       * _removeAttribute\n       *\n       * @param name an Attribute name\n       * @param element a DOM node\n       */\n      const _removeAttribute = function _removeAttribute(name, element) {\n        try {\n          arrayPush(DOMPurify.removed, {\n            attribute: element.getAttributeNode(name),\n            from: element\n          });\n        } catch (_) {\n          arrayPush(DOMPurify.removed, {\n            attribute: null,\n            from: element\n          });\n        }\n        element.removeAttribute(name);\n        // We void attribute values for unremovable \"is\" attributes\n        if (name === 'is') {\n          if (RETURN_DOM || RETURN_DOM_FRAGMENT) {\n            try {\n              _forceRemove(element);\n            } catch (_) {}\n          } else {\n            try {\n              element.setAttribute(name, '');\n            } catch (_) {}\n          }\n        }\n      };\n      /**\n       * _stripDisallowedAttributes\n       *\n       * Removes every attribute the active configuration does not allow from a\n       * single element, using the same allowlist as the main attribute pass (so\n       * `on*` handlers go, but no `/^on/` blocklist is introduced). Used only to\n       * neutralise nodes that are being discarded from an in-place tree.\n       *\n       * @param element the element to strip\n       */\n      const _stripDisallowedAttributes = function _stripDisallowedAttributes(element) {\n        const attributes = getAttributes(element);\n        if (!attributes) {\n          return;\n        }\n        for (let i = attributes.length - 1; i >= 0; --i) {\n          const attribute = attributes[i];\n          const name = attribute && attribute.name;\n          if (typeof name !== 'string' || ALLOWED_ATTR[transformCaseFunc(name)]) {\n            continue;\n          }\n          try {\n            element.removeAttribute(name);\n          } catch (_) {\n            /* Clobbered removeAttribute on a doomed node \u2014 ignore */\n          }\n        }\n      };\n      /**\n       * _neutralizeSubtree\n       *\n       * Completes the audit-5 F1 fix across every removal path. The KEEP_CONTENT\n       * move-hoist neutralises only disallowed-tag removals; clobber, mXSS-canary,\n       * namespace, comment, processing-instruction and KEEP_CONTENT:false removals\n       * all drop their subtree wholesale via `_forceRemove`. On the IN_PLACE path\n       * those dropped nodes are detached from the caller's LIVE tree but a\n       * handler-bearing original among them (an `<img onerror>`/`<video>` that was\n       * loading) keeps its queued resource event, which fires in page scope after\n       * sanitize returns. This walks a removed subtree and strips every attribute\n       * the active configuration does not allow \u2014 so `on*` handlers are cancelled\n       * through the SAME allowlist that governs kept nodes, not a separate `/^on/`\n       * blocklist. Run synchronously before sanitize returns, i.e. before any\n       * queued event can fire. Hook-free by design: these nodes leave the output,\n       * so firing attribute hooks for them would be surprising. Clobber-safe reads;\n       * a doomed clobbered node may shadow `removeAttribute` (its own attributes are\n       * irrelevant \u2014 it is discarded \u2014 while its non-clobbered descendants, e.g.\n       * the `<img>`, are reached and scrubbed).\n       *\n       * @param root the root of a removed subtree to neutralise\n       */\n      const _neutralizeSubtree = function _neutralizeSubtree(root) {\n        const stack = [root];\n        while (stack.length > 0) {\n          const node = stack.pop();\n          const nodeType = getNodeType ? getNodeType(node) : node.nodeType;\n          if (nodeType === NODE_TYPE.element) {\n            _stripDisallowedAttributes(node);\n          }\n          const childNodes = getChildNodes(node);\n          if (childNodes) {\n            for (let i = childNodes.length - 1; i >= 0; --i) {\n              stack.push(childNodes[i]);\n            }\n          }\n        }\n      };\n      /**\n       * _neutralizePatchLinkage\n       *\n       * IN_PLACE entry pre-pass (declarative-partial-updates / streaming\n       * hardening, https://github.com/WICG/declarative-partial-updates).\n       *\n       * The main walk strips patch linkage (`for`/`patchsrc`) and removes range\n       * markers (PIs / markup comments) node-by-node, in document order, AS it\n       * reaches each node. On a live in-place root that leaves a window: from the\n       * moment the root is connected until the walk arrives at a given node, that\n       * node's linkage is live. A patch applied on connection/stream can fire as\n       * a microtask during the walk and inject or teleport an unsanitized DOM\n       * range into a region the iterator has already passed and will not revisit,\n       * so the post-return \"tree is sanitized\" contract is violated. Sweep the\n       * whole tree once up front and sever every linkage before the walk begins,\n       * closing that window.\n       *\n       * This CANNOT undo a patch that already fired before sanitize ran \u2014 that is\n       * the irreducible \"do not IN_PLACE a live-connected attacker tree\" caveat \u2014\n       * but it closes everything from sanitize-start onward. Gated on SAFE_FOR_XML\n       * to group with the rest of the declarative-partial-updates handling and\n       * stay overridable, consistent with the codebase.\n       *\n       * Clobber-safe traversal (cached childNodes getter); per-node try/catch so a\n       * clobbered root cannot defeat the sweep of its non-clobbered descendants.\n       *\n       * NOTE (pending real-Chrome confirmation, see test/declarative-patch-probe\n       * .html Q1): this mirrors the existing policy of keeping `for` on\n       * <label>/<output>. If the shipping feature can drive a patch through a\n       * surviving `for`-on-label/output + `id` pair, this pre-pass and the\n       * attribute check at _isBasicCustomElement's caller must additionally drop\n       * that pair on the IN_PLACE path. Left as-is until the taxonomy is verified.\n       *\n       * @param root the in-place root to sweep\n       */\n      const _neutralizePatchLinkage = function _neutralizePatchLinkage(root) {\n        if (!SAFE_FOR_XML) {\n          return;\n        }\n        const stack = [root];\n        while (stack.length > 0) {\n          const node = stack.pop();\n          const nodeType = getNodeType ? getNodeType(node) : node.nodeType;\n          /* Remove range markers (the target side of a patch linkage): every\n             processing instruction, and any markup-bearing comment. */\n          if (nodeType === NODE_TYPE.processingInstruction || nodeType === NODE_TYPE.comment && regExpTest(COMMENT_MARKUP_PROBE, node.data)) {\n            try {\n              remove(node);\n            } catch (_) {\n              /* Best-effort */\n            }\n            continue;\n          }\n          /* Strip patch-source attributes (the source side) off elements. */\n          if (nodeType === NODE_TYPE.element) {\n            const element = node;\n            const lcTag = transformCaseFunc(getNodeName ? getNodeName(node) : node.nodeName);\n            try {\n              if (element.hasAttribute && element.hasAttribute('patchsrc')) {\n                element.removeAttribute('patchsrc');\n              }\n              if (element.hasAttribute && element.hasAttribute('for') && lcTag !== 'label' && lcTag !== 'output') {\n                element.removeAttribute('for');\n              }\n            } catch (_) {\n              /* Clobbered removeAttribute/hasAttribute on a doomed node \u2014 ignore */\n            }\n          }\n          const childNodes = getChildNodes(node);\n          if (childNodes) {\n            for (let i = childNodes.length - 1; i >= 0; --i) {\n              stack.push(childNodes[i]);\n            }\n          }\n        }\n      };\n      /**\n       * _initDocument\n       *\n       * @param dirty - a string of dirty markup\n       * @return a DOM, filled with the dirty markup\n       */\n      const _initDocument = function _initDocument(dirty) {\n        /* Create a HTML document */\n        let doc = null;\n        let leadingWhitespace = null;\n        if (FORCE_BODY) {\n          dirty = '<remove></remove>' + dirty;\n        } else {\n          /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */\n          const matches = stringMatch(dirty, /^[\\r\\n\\t ]+/);\n          leadingWhitespace = matches && matches[0];\n        }\n        if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && NAMESPACE === HTML_NAMESPACE) {\n          // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)\n          dirty = '<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>' + dirty + '</body></html>';\n        }\n        const dirtyPayload = trustedTypesPolicy ? _createTrustedHTML(dirty) : dirty;\n        /*\n         * Use the DOMParser API by default, fallback later if needs be\n         * DOMParser not work for svg when has multiple root element.\n         */\n        if (NAMESPACE === HTML_NAMESPACE) {\n          try {\n            doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);\n          } catch (_) {}\n        }\n        /* Use createHTMLDocument in case DOMParser is not available */\n        if (!doc || !doc.documentElement) {\n          doc = implementation.createDocument(NAMESPACE, 'template', null);\n          try {\n            doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;\n          } catch (_) {\n            // Syntax error if dirtyPayload is invalid xml\n          }\n        }\n        const body = doc.body || doc.documentElement;\n        if (dirty && leadingWhitespace) {\n          body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);\n        }\n        /* Work on whole document or just its body */\n        if (NAMESPACE === HTML_NAMESPACE) {\n          return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];\n        }\n        return WHOLE_DOCUMENT ? doc.documentElement : body;\n      };\n      /**\n       * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.\n       *\n       * @param root The root element or node to start traversing on.\n       * @return The created NodeIterator\n       */\n      const _createNodeIterator = function _createNodeIterator(root) {\n        return createNodeIterator.call(root.ownerDocument || root, root,\n        // eslint-disable-next-line no-bitwise\n        NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION, null);\n      };\n      /**\n       * Replace template expression syntax (mustache, ERB, template\n       * literal) with a space; shared by all SAFE_FOR_TEMPLATES scrub\n       * sites. Order matters: mustache, then ERB, then template literal.\n       *\n       * @param value the string to scrub\n       * @returns the scrubbed string\n       */\n      const _stripTemplateExpressions = function _stripTemplateExpressions(value) {\n        value = stringReplace(value, MUSTACHE_EXPR$1, ' ');\n        value = stringReplace(value, ERB_EXPR$1, ' ');\n        value = stringReplace(value, TMPLIT_EXPR$1, ' ');\n        return value;\n      };\n      /**\n       * Strip template-engine expressions ({{...}}, ${...}, <%...%>) from the\n       * character data of an element subtree. Used as the final safety net for\n       * SAFE_FOR_TEMPLATES on every DOM-returning code path so that expressions\n       * which only form after text-node normalization (e.g. fragments split across\n       * stripped elements) cannot survive into a template-evaluating framework.\n       *\n       * Walks text/comment/CDATA/processing-instruction nodes and mutates `.data`\n       * in place rather than round-tripping through innerHTML. This preserves\n       * descendant node references (important for IN_PLACE callers), avoids a\n       * serialize/reparse cycle, and reads literal character data \u2014 which means\n       * `<%...%>` in text content matches the ERB regex against its real bytes\n       * instead of the HTML-entity-escaped form innerHTML would produce.\n       *\n       * Attribute values are not visited here; SAFE_FOR_TEMPLATES handling for\n       * attributes is performed during the per-node `_sanitizeAttributes` pass.\n       *\n       * @param node The root element whose character data should be scrubbed.\n       */\n      const _scrubTemplateExpressions2 = function _scrubTemplateExpressions(node) {\n        var _node$querySelectorAl;\n        node.normalize();\n        const walker = createNodeIterator.call(node.ownerDocument || node, node,\n        // eslint-disable-next-line no-bitwise\n        NodeFilter.SHOW_TEXT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_CDATA_SECTION | NodeFilter.SHOW_PROCESSING_INSTRUCTION, null);\n        let currentNode = walker.nextNode();\n        while (currentNode) {\n          currentNode.data = _stripTemplateExpressions(currentNode.data);\n          currentNode = walker.nextNode();\n        }\n        // NodeIterator does not descend into <template>.content per the DOM spec,\n        // so we must explicitly recurse into each template's content fragment,\n        // mirroring the approach used by _sanitizeShadowDOM.\n        const templates = (_node$querySelectorAl = node.querySelectorAll) === null || _node$querySelectorAl === void 0 ? void 0 : _node$querySelectorAl.call(node, 'template');\n        if (templates) {\n          arrayForEach(templates, tmpl => {\n            if (_isDocumentFragment(tmpl.content)) {\n              _scrubTemplateExpressions2(tmpl.content);\n            }\n          });\n        }\n      };\n      /**\n       * _isClobbered\n       *\n       * Detect DOM-clobbering on HTMLFormElement nodes. Form is the only HTML\n       * interface with [LegacyOverrideBuiltIns]; a descendant element with a\n       * `name` attribute matching a prototype property shadows that property\n       * on direct reads. We use this check at the IN_PLACE entry-point and\n       * during attribute sanitization to refuse clobbered forms.\n       *\n       * @param element element to check for clobbering attacks\n       * @return true if clobbered, false if safe\n       */\n      const _isClobbered = function _isClobbered(element) {\n        // Realm-independent tag-name probe. If we can't determine the tag\n        // name at all, we can't reason about clobbering \u2014 return false\n        // (the caller's other defences still apply).\n        const realTagName = getNodeName ? getNodeName(element) : null;\n        if (typeof realTagName !== 'string') {\n          return false;\n        }\n        if (transformCaseFunc(realTagName) !== 'form') {\n          return false;\n        }\n        return typeof element.nodeName !== 'string' || typeof element.textContent !== 'string' || typeof element.removeChild !== 'function' ||\n        // Realm-safe NamedNodeMap detection: equality against the cached\n        // prototype getter. Clobbered .attributes (e.g. <input name=\"attributes\">)\n        // makes the direct read diverge from the cached read; a clean form\n        // (same-realm OR foreign-realm) has both reads pointing at the same\n        // canonical NamedNodeMap.\n        element.attributes !== getAttributes(element) || typeof element.removeAttribute !== 'function' || typeof element.setAttribute !== 'function' || typeof element.namespaceURI !== 'string' || typeof element.insertBefore !== 'function' || typeof element.hasChildNodes !== 'function' ||\n        // NodeType clobbering probe. Cached Node.prototype.nodeType getter\n        // returns the integer 1 for any Element regardless of realm; direct\n        // read on a clobbered form (e.g. <input name=\"nodeType\">) returns\n        // the named child element. Cheap addition \u2014 nodeType is read from\n        // an internal slot, no serialization cost \u2014 and removes a residual\n        // clobbering surface used by several mXSS / PI / comment branches\n        // in _sanitizeElements that compare currentNode.nodeType directly.\n        element.nodeType !== getNodeType(element) ||\n        // HTMLFormElement has [LegacyOverrideBuiltIns]: a descendant named\n        // \"childNodes\" shadows the prototype getter. Direct reads of\n        // form.childNodes from a clobbered form return the named child\n        // instead of the real NodeList, so any walk that reads it directly\n        // skips the form's real children. Compare the direct read to the\n        // cached Node.prototype getter \u2014 when the form's named-property\n        // getter intercepts the read, the two values differ and we flag\n        // the form. This catches every clobbering child type (input,\n        // select, etc.) regardless of whether the named child happens to\n        // carry a numeric .length, which a typeof-based probe would miss\n        // (e.g. HTMLSelectElement.length is a defined unsigned-long).\n        element.childNodes !== getChildNodes(element);\n      };\n      /**\n       * Checks whether the given value is a DocumentFragment from any realm.\n       *\n       * The realm-independent replacement reads `nodeType` through the cached\n       * Node.prototype getter and compares to the DOCUMENT_FRAGMENT_NODE\n       * constant (11). nodeType is a numeric value resolved from the node's\n       * internal slot, identical across realms for the same kind of node.\n       *\n       * @param value object to check\n       * @return true if value is a DocumentFragment-shaped node from any realm\n       */\n      const _isDocumentFragment = function _isDocumentFragment(value) {\n        if (!getNodeType || typeof value !== 'object' || value === null) {\n          return false;\n        }\n        try {\n          return getNodeType(value) === NODE_TYPE.documentFragment;\n        } catch (_) {\n          return false;\n        }\n      };\n      /**\n       * Checks whether the given object is a DOM node, including nodes that\n       * originate from a different window/realm (e.g. an iframe's\n       * contentDocument). The previous `value instanceof Node` check was\n       * realm-bound: nodes from a different window failed it, causing\n       * sanitize() to silently stringify them and reset IN_PLACE to false,\n       * returning the original node unsanitized. See GHSA-4w3q-35jp-p934.\n       *\n       * @param value object to check whether it's a DOM node\n       * @return true if value is a DOM node from any realm\n       */\n      const _isNode = function _isNode(value) {\n        if (!getNodeType || typeof value !== 'object' || value === null) {\n          return false;\n        }\n        try {\n          return typeof getNodeType(value) === 'number';\n        } catch (_) {\n          return false;\n        }\n      };\n      function _executeHooks(hooks, currentNode, data) {\n        if (hooks.length === 0) {\n          return;\n        }\n        arrayForEach(hooks, hook => {\n          hook.call(DOMPurify, currentNode, data, CONFIG);\n        });\n      }\n      /**\n       * Structural-threat checks that condemn a node regardless of the\n       * allowlists: mXSS via namespace confusion, risky CSS construction,\n       * processing instructions, markup-bearing comments. Pure predicate;\n       * the caller removes. Check order is load-bearing.\n       *\n       * @param currentNode the node to inspect\n       * @param tagName the node's transformCaseFunc'd tag name\n       * @return true if the node must be removed\n       */\n      const _isUnsafeNode = function _isUnsafeNode(currentNode, tagName) {\n        /* Detect mXSS attempts abusing namespace confusion */\n        if (SAFE_FOR_XML && currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.textContent) && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.innerHTML)) {\n          return true;\n        }\n        /* Remove risky CSS construction leading to mXSS */\n        if (SAFE_FOR_XML && currentNode.namespaceURI === HTML_NAMESPACE && tagName === 'style' && _isNode(currentNode.firstElementChild)) {\n          return true;\n        }\n        /* Remove any occurrence of processing instructions */\n        if (currentNode.nodeType === NODE_TYPE.processingInstruction) {\n          return true;\n        }\n        /* Remove any kind of possibly harmful comments */\n        if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(COMMENT_MARKUP_PROBE, currentNode.data)) {\n          return true;\n        }\n        return false;\n      };\n      /**\n       * Handle a node whose tag is forbidden or not allowlisted: keep\n       * allowed custom elements (false return exits _sanitizeElements\n       * early - the namespace and fallback-tag removal checks are\n       * intentionally skipped for kept custom elements), else hoist\n       * content per KEEP_CONTENT and remove.\n       *\n       * A kept custom element is the ONLY case in which this function\n       * returns false, so the caller uses that return value to run the\n       * afterSanitizeElements hook on the kept element and keep the\n       * element-hook lifecycle consistent with normal allowlisted\n       * elements (GHSA-c2j3-45gr-mqc4).\n       *\n       * @param currentNode the disallowed node\n       * @param tagName the node's transformCaseFunc'd tag name\n       * @return true if the node was removed, false if kept\n       */\n      const _sanitizeDisallowedNode = function _sanitizeDisallowedNode(currentNode, tagName) {\n        /* Check if we have a custom element to handle */\n        if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {\n          if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {\n            return false;\n          }\n          if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) {\n            return false;\n          }\n        }\n        /* Keep content except for bad-listed elements.\n             Use the cached prototype getters exclusively \u2014 the previous code\n             had `|| currentNode.parentNode` / `|| currentNode.childNodes`\n             fallbacks, but the cached getters always return the canonical\n             value (or null for a real parent-less node), so the fallback\n             path was dead in safe cases and a clobbering surface in unsafe\n             ones. Falsy cached results stay falsy; the `if (childNodes &&\n             parentNode)` check already gates correctly. */\n        if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {\n          const parentNode = getParentNode(currentNode);\n          const childNodes = getChildNodes(currentNode);\n          if (childNodes && parentNode) {\n            const childCount = childNodes.length;\n            /* In-place: hoist the *original* children so the iterator visits\n                 and sanitises them through the same allowlist pass as every other\n                 node. The caller built the tree in the live document, so the\n                 originals carry already-queued resource events (`<img onerror>`,\n                 `<video>`/`<audio>` error, lazy/`onload`, \u2026); cloning would leave\n                 those originals detached but still armed, firing in page scope\n                 while the returned tree looked clean. Moving is safe in-place: the\n                 root is pre-validated as an allowed tag and so is never the node\n                 being removed, which keeps `parentNode` inside the iterator root\n                 and the relocated child inside the serialised tree.\n                          Otherwise (string / DOM-copy paths): clone. The iterator is rooted\n                 at \u2014 and the result serialised from \u2014 `body`, so a restrictive\n                 ALLOWED_TAGS that removes `body` itself must leave its content in\n                 place, which only cloning does; and those paths parse into an\n                 inert document, so their discarded originals never had a queued\n                 event to neutralise.\n                          `childNodes` is live; a tail-to-head walk keeps `childNodes[i]`\n                 valid whether we move (drops the trailing entry) or clone (leaves\n                 the list intact). */\n            for (let i = childCount - 1; i >= 0; --i) {\n              const hoisted = IN_PLACE ? childNodes[i] : cloneNode(childNodes[i], true);\n              parentNode.insertBefore(hoisted, getNextSibling(currentNode));\n            }\n          }\n        }\n        _forceRemove(currentNode);\n        return true;\n      };\n      /**\n       * _sanitizeElements\n       *\n       * @protect nodeName\n       * @protect textContent\n       * @protect removeChild\n       * @param currentNode to check for permission to exist\n       * @return true if node was killed, false if left alive\n       */\n      // eslint-disable-next-line complexity\n      const _sanitizeElements = function _sanitizeElements(currentNode, root) {\n        /* Execute a hook if present */\n        _executeHooks(hooks.beforeSanitizeElements, currentNode, null);\n        /* A hook may have detached the node \u2014 treat it as removed (see the\n           detached-node comment after the uponSanitizeElement hook below). */\n        if (currentNode !== root && getParentNode(currentNode) === null) {\n          return true;\n        }\n        /* Check if element is clobbered or can clobber */\n        if (_isClobbered(currentNode)) {\n          _forceRemove(currentNode);\n          return true;\n        }\n        /* Now let's check the element's type and name */\n        const tagName = transformCaseFunc(getNodeName ? getNodeName(currentNode) : currentNode.nodeName);\n        /* Execute a hook if present */\n        _executeHooks(hooks.uponSanitizeElement, currentNode, {\n          tagName,\n          allowedTags: ALLOWED_TAGS\n        });\n        /* A hook may have detached the node from the tree \u2014 a long-standing\n           user pattern (issue #469; draw.io-style foreignObject filtering).\n           Per the cached, unclobberable parentNode getter the node is\n           genuinely out of the tree, so it can reach neither the serialized\n           output nor an IN_PLACE live tree; treat it as removed and stop\n           processing it. Without this guard, the unsafe-node / namespace\n           checks below would call _forceRemove on a parentless node and hit\n           the REPORT-3 fail-closed throw \u2014 which exists for nodes DOMPurify\n           wants gone but *cannot* detach (clobbered / parentless roots), the\n           opposite of a node that is already safely gone. The walk root is\n           exempt: a detached IN_PLACE root is legitimate input and must still\n           be fully sanitized, and a kill-decision on it must keep hitting the\n           REPORT-3 throw. Nodes detached by hooks are the hook's\n           responsibility: they are not recorded in DOMPurify.removed and are\n           not neutralized by the post-walk IN_PLACE pass. */\n        if (currentNode !== root && getParentNode(currentNode) === null) {\n          return true;\n        }\n        /* Remove mXSS vectors, processing instructions and risky comments */\n        if (_isUnsafeNode(currentNode, tagName)) {\n          _forceRemove(currentNode);\n          return true;\n        }\n        /* Remove element if anything forbids its presence */\n        if (FORBID_TAGS[tagName] || !(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && !ALLOWED_TAGS[tagName]) {\n          const removed = _sanitizeDisallowedNode(currentNode, tagName);\n          /* A false return means the node is a custom element kept via\n             CUSTOM_ELEMENT_HANDLING - the only keep path through\n             _sanitizeDisallowedNode. Run afterSanitizeElements on it so the\n             element-hook lifecycle matches normal allowlisted elements: a\n             security policy applied in this hook (e.g. stripping an attribute\n             from every surviving element) must not silently skip kept custom\n             elements (GHSA-c2j3-45gr-mqc4). This mirrors the normal-element\n             tail below - the hook runs, then the walker's subsequent\n             _sanitizeAttributes pass sanitizes the element's attributes. The\n             deliberately skipped namespace and fallback-tag removal checks stay\n             skipped; they are removal decisions, not the hook contract. */\n          if (removed === false) {\n            _executeHooks(hooks.afterSanitizeElements, currentNode, null);\n          }\n          return removed;\n        }\n        /* Check whether element has a valid namespace.\n           Realm-safe check (GHSA-hpcv-96wg-7vj8): use the cached Node.prototype\n           nodeType getter rather than `instanceof Element`, which is realm-\n           bound and short-circuits to false for any node minted in a different\n           realm \u2014 letting a foreign-realm element with a forbidden namespace\n           slip past the namespace check entirely. */\n        const nt = getNodeType ? getNodeType(currentNode) : currentNode.nodeType;\n        if (nt === NODE_TYPE.element && !_checkValidNamespace(currentNode)) {\n          _forceRemove(currentNode);\n          return true;\n        }\n        /* Make sure that older browsers don't get fallback-tag mXSS */\n        if ((tagName === 'noscript' || tagName === 'noembed' || tagName === 'noframes') && regExpTest(FALLBACK_TAG_CLOSE, currentNode.innerHTML)) {\n          _forceRemove(currentNode);\n          return true;\n        }\n        /* Sanitize element content to be template-safe */\n        if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {\n          /* Get the element's text content */\n          const content = _stripTemplateExpressions(currentNode.textContent);\n          if (currentNode.textContent !== content) {\n            arrayPush(DOMPurify.removed, {\n              element: currentNode.cloneNode()\n            });\n            currentNode.textContent = content;\n          }\n        }\n        /* Execute a hook if present */\n        _executeHooks(hooks.afterSanitizeElements, currentNode, null);\n        return false;\n      };\n      /**\n       * _isValidAttribute\n       *\n       * @param lcTag Lowercase tag name of containing element.\n       * @param lcName Lowercase attribute name.\n       * @param value Attribute value.\n       * @return Returns true if `value` is valid, otherwise false.\n       */\n      // eslint-disable-next-line complexity\n      const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {\n        /* FORBID_ATTR must always win, even if ADD_ATTR predicate would allow it */\n        if (FORBID_ATTR[lcName]) {\n          return false;\n        }\n        /* Reject declarative-partial-updates patch-linkage attributes\n           (https://github.com/WICG/declarative-partial-updates).\n                Empirical note (Chrome 150, verified \u2014 see\n           test/declarative-patch-probe-v3.html): expansion is NOT applied after\n           sanitization. For the string path it fires during sanitize()'s own\n           parse, so the walk sees and sanitizes the fully materialized expanded\n           tree \u2014 teleports into MathML/SVG integration points included; a\n           weaponized `<template for>`->`<img onerror>` comes back with the handler\n           stripped. For the IN_PLACE path it fires on connection, before the walk.\n           Either way DOMPurify is NOT blind to the patch.\n                This removal is therefore defense-in-depth rather than the sole barrier:\n           it prevents live linkage from surviving into the OUTPUT and re-expanding\n           in the caller's context, and keeps behaviour deterministic if a future\n           engine defers expansion. `for` is legitimate only on <label>/<output>;\n           anywhere else (notably <template for>) it links the element to a patch\n           target and teleports or removes an arbitrary DOM range by id/marker name.\n           `patchsrc` fetches remote markup and is treated as a script-loading\n           mechanism (CSP). Gated on SAFE_FOR_XML so the removal groups with the\n           other structural-threat checks and stays overridable, consistent with\n           the rest of the codebase. PI range markers are already removed by\n           _isUnsafeNode. */\n        if (SAFE_FOR_XML && lcName === 'patchsrc') {\n          return false;\n        }\n        if (SAFE_FOR_XML && lcName === 'for' && lcTag !== 'label' && lcTag !== 'output') {\n          return false;\n        }\n        /* Make sure attribute cannot clobber */\n        if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {\n          return false;\n        }\n        const nameIsPermitted = ALLOWED_ATTR[lcName] || EXTRA_ELEMENT_HANDLING.attributeCheck instanceof Function && EXTRA_ELEMENT_HANDLING.attributeCheck(lcName, lcTag);\n        /* Allow valid data-* attributes: At least one character after \"-\"\n            (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)\n            XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)\n            We don't need to check the value; it's always URI safe. */\n        if (ALLOW_DATA_ATTR && regExpTest(DATA_ATTR$1, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR$1, lcName)) ; else if (!nameIsPermitted) {\n          if (\n          // First condition does a very basic check if a) it's basically a valid custom element tagname AND\n          // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck\n          // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck\n          _isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName, lcTag)) ||\n          // Alternative, second condition checks if it's an `is`-attribute, AND\n          // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck\n          lcName === 'is' && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))) ; else {\n            return false;\n          }\n          /* Check value is safe. First, is attr inert? If so, is safe */\n        } else if (URI_SAFE_ATTRIBUTES[lcName]) ; else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE$1, ''))) ; else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ; else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA$1, stringReplace(value, ATTR_WHITESPACE$1, ''))) ; else if (value) {\n          return false;\n        } else ;\n        return true;\n      };\n      /* Names the HTML spec reserves from valid-custom-element-name; these must\n       * never be treated as basic custom elements even when a permissive\n       * CUSTOM_ELEMENT_HANDLING.tagNameCheck is configured. */\n      const RESERVED_CUSTOM_ELEMENT_NAMES = addToSet({}, ['annotation-xml', 'color-profile', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'missing-glyph']);\n      /**\n       * _isBasicCustomElement\n       * checks if at least one dash is included in tagName, and it's not the first char\n       * for more sophisticated checking see https://github.com/sindresorhus/validate-element-name\n       *\n       * @param tagName name of the tag of the node to sanitize\n       * @returns Returns true if the tag name meets the basic criteria for a custom element, otherwise false.\n       */\n      const _isBasicCustomElement = function _isBasicCustomElement(tagName) {\n        return !RESERVED_CUSTOM_ELEMENT_NAMES[stringToLowerCase(tagName)] && regExpTest(CUSTOM_ELEMENT$1, tagName);\n      };\n      /**\n       * Wrap an attribute value in the matching Trusted Types object when\n       * the active policy requires it. Namespaced attributes pass through\n       * unchanged (no TT support yet, see\n       * https://bugs.chromium.org/p/chromium/issues/detail?id=1305293).\n       *\n       * @param lcTag lowercase tag name of the containing element\n       * @param lcName lowercase attribute name\n       * @param namespaceURI the attribute's namespace, if any\n       * @param value the attribute value to wrap\n       * @return the value, wrapped when Trusted Types demand it\n       */\n      const _applyTrustedTypesToAttribute = function _applyTrustedTypesToAttribute(lcTag, lcName, namespaceURI, value) {\n        if (trustedTypesPolicy && typeof trustedTypes === 'object' && typeof trustedTypes.getAttributeType === 'function' && !namespaceURI) {\n          switch (trustedTypes.getAttributeType(lcTag, lcName)) {\n            case 'TrustedHTML':\n              {\n                return _createTrustedHTML(value);\n              }\n            case 'TrustedScriptURL':\n              {\n                return _createTrustedScriptURL(value);\n              }\n          }\n        }\n        return value;\n      };\n      /**\n       * Write a modified attribute value back onto the element. On\n       * success, re-probe for clobbering introduced by the new value and\n       * remove the element when found; otherwise pop the removal entry\n       * recorded by the earlier _removeAttribute (long-standing pairing\n       * with the SANITIZE_NAMED_PROPS path - do not \"fix\" casually). On\n       * failure, remove the attribute instead.\n       *\n       * @param currentNode the element carrying the attribute\n       * @param name the attribute name as present on the element\n       * @param namespaceURI the attribute's namespace, if any\n       * @param value the new attribute value\n       */\n      const _setAttributeValue = function _setAttributeValue(currentNode, name, namespaceURI, value) {\n        try {\n          if (namespaceURI) {\n            currentNode.setAttributeNS(namespaceURI, name, value);\n          } else {\n            /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. \"x-schema\". */\n            currentNode.setAttribute(name, value);\n          }\n          if (_isClobbered(currentNode)) {\n            _forceRemove(currentNode);\n          } else {\n            arrayPop(DOMPurify.removed);\n          }\n        } catch (_) {\n          _removeAttribute(name, currentNode);\n        }\n      };\n      /**\n       * _sanitizeAttributes\n       *\n       * @protect attributes\n       * @protect nodeName\n       * @protect removeAttribute\n       * @protect setAttribute\n       *\n       * @param currentNode to sanitize\n       */\n      const _sanitizeAttributes = function _sanitizeAttributes(currentNode) {\n        /* Execute a hook if present */\n        _executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);\n        const attributes = currentNode.attributes;\n        /* Check if we have attributes; if not we might have a text node */\n        if (!attributes || _isClobbered(currentNode)) {\n          return;\n        }\n        const hookEvent = {\n          attrName: '',\n          attrValue: '',\n          keepAttr: true,\n          allowedAttributes: ALLOWED_ATTR,\n          forceKeepAttr: undefined\n        };\n        let l = attributes.length;\n        const lcTag = transformCaseFunc(currentNode.nodeName);\n        /* Go backwards over all attributes; safely remove bad ones */\n        while (l--) {\n          const attr = attributes[l];\n          const name = attr.name,\n            namespaceURI = attr.namespaceURI,\n            attrValue = attr.value;\n          const lcName = transformCaseFunc(name);\n          const initValue = attrValue;\n          let value = name === 'value' ? initValue : stringTrim(initValue);\n          /* Execute a hook if present */\n          hookEvent.attrName = lcName;\n          hookEvent.attrValue = value;\n          hookEvent.keepAttr = true;\n          hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set\n          _executeHooks(hooks.uponSanitizeAttribute, currentNode, hookEvent);\n          value = hookEvent.attrValue;\n          /* Full DOM Clobbering protection via namespace isolation,\n           * Prefix id and name attributes with `user-content-`\n           */\n          if (SANITIZE_NAMED_PROPS && (lcName === 'id' || lcName === 'name') && stringIndexOf(value, SANITIZE_NAMED_PROPS_PREFIX) !== 0) {\n            // Remove the attribute with this value\n            _removeAttribute(name, currentNode);\n            // Prefix the value and later re-create the attribute with the sanitized value\n            value = SANITIZE_NAMED_PROPS_PREFIX + value;\n          }\n          // Else: already prefixed, leave the attribute alone \u2014 the prefix is\n          // itself the clobbering protection, and re-applying it is incorrect.\n          /* Work around a security issue with comments inside attributes */\n          if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, value)) {\n            _removeAttribute(name, currentNode);\n            continue;\n          }\n          /* Make sure we cannot easily use animated hrefs, even if animations are allowed */\n          if (lcName === 'attributename' && stringMatch(value, 'href')) {\n            _removeAttribute(name, currentNode);\n            continue;\n          }\n          /* Did the hooks force-keep the attribute? */\n          if (hookEvent.forceKeepAttr) {\n            continue;\n          }\n          /* Did the hooks approve of the attribute? */\n          if (!hookEvent.keepAttr) {\n            _removeAttribute(name, currentNode);\n            continue;\n          }\n          /* Work around a security issue in jQuery 3.0 */\n          if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(SELF_CLOSING_TAG, value)) {\n            _removeAttribute(name, currentNode);\n            continue;\n          }\n          /* Sanitize attribute content to be template-safe */\n          if (SAFE_FOR_TEMPLATES) {\n            value = _stripTemplateExpressions(value);\n          }\n          /* Is `value` valid for this attribute? */\n          if (!_isValidAttribute(lcTag, lcName, value)) {\n            _removeAttribute(name, currentNode);\n            continue;\n          }\n          /* Handle attributes that require Trusted Types */\n          value = _applyTrustedTypesToAttribute(lcTag, lcName, namespaceURI, value);\n          /* Handle invalid data-* attribute set by try-catching it */\n          if (value !== initValue) {\n            _setAttributeValue(currentNode, name, namespaceURI, value);\n          }\n        }\n        /* Execute a hook if present */\n        _executeHooks(hooks.afterSanitizeAttributes, currentNode, null);\n      };\n      /**\n       * _sanitizeShadowDOM\n       *\n       * @param fragment to iterate over recursively\n       */\n      const _sanitizeShadowDOM2 = function _sanitizeShadowDOM(fragment) {\n        let shadowNode = null;\n        const shadowIterator = _createNodeIterator(fragment);\n        /* Execute a hook if present */\n        _executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);\n        while (shadowNode = shadowIterator.nextNode()) {\n          /* Execute a hook if present */\n          _executeHooks(hooks.uponSanitizeShadowNode, shadowNode, null);\n          /* Sanitize tags and elements */\n          _sanitizeElements(shadowNode, fragment);\n          /* Check attributes next */\n          _sanitizeAttributes(shadowNode);\n          /* Deep shadow DOM detected.\n             Realm-safe check (GHSA-hpcv-96wg-7vj8): use nodeType against the\n             DOCUMENT_FRAGMENT_NODE constant rather than instanceof, so we\n             recurse into <template>.content from foreign realms too. */\n          if (_isDocumentFragment(shadowNode.content)) {\n            _sanitizeShadowDOM2(shadowNode.content);\n          }\n          /* An element iterated here may itself host an attached\n             shadow root. The default NodeIterator does not enter shadow\n             trees, so a shadow root nested inside template.content was\n             previously reached by no walk at all (the pre-pass at\n             _sanitizeAttachedShadowRoots descends via childNodes, which\n             doesn't enter template.content; the template-content recursion\n             above iterates the content but never inspected shadowRoot).\n             Walk it explicitly. The nodeType guard avoids reading\n             shadowRoot off text / comment / CDATA / PI nodes that the\n             iterator also surfaces. */\n          const shadowNodeType = getNodeType ? getNodeType(shadowNode) : shadowNode.nodeType;\n          if (shadowNodeType === NODE_TYPE.element) {\n            const innerSr = getShadowRoot(shadowNode);\n            if (_isDocumentFragment(innerSr)) {\n              _sanitizeAttachedShadowRoots(innerSr);\n              _sanitizeShadowDOM2(innerSr);\n            }\n          }\n        }\n        /* Execute a hook if present */\n        _executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);\n      };\n      /**\n       * _sanitizeAttachedShadowRoots\n       *\n       * Walks `root` and feeds every attached shadow root we encounter into\n       * the existing _sanitizeShadowDOM pipeline. The default node iterator\n       * does not descend into shadow trees, so nodes inside an attached\n       * shadow root would otherwise be skipped entirely.\n       *\n       * Two real input paths put attached shadow roots in front of us:\n       *   1. IN_PLACE on a DOM node that already has shadow roots attached.\n       *   2. DOM-node input where importNode(dirty, true) deep-clones the\n       *      shadow root because it was created with `clonable: true`.\n       *\n       * This pass runs once, up front, so the main iteration loop (and the\n       * existing _sanitizeShadowDOM template-content recursion) stay\n       * untouched \u2014 string-input paths are not affected.\n       *\n       * @param root the subtree root to walk for attached shadow roots\n       */\n      const _sanitizeAttachedShadowRoots = function _sanitizeAttachedShadowRoots(root) {\n        /* Iterative (explicit stack) rather than per-child recursion. DOM APIs\n           impose no depth cap, so an attacker-shaped tree (JSON/CRDT/editor data\n           built straight into the DOM \u2014 the IN_PLACE surface) deeper than the JS\n           call-stack budget would otherwise overflow native recursion here and\n           throw at the IN_PLACE entry pre-pass, before a single node is\n           sanitized, leaving the caller's live tree untouched (fail-open). See\n           campaign-3 F4. A heap stack keeps depth off the call stack.\n                Each work item is either a node to descend into, or a deferred\n           `_sanitizeShadowDOM` for an already-walked shadow root. The deferred\n           form preserves the original post-order discipline: a shadow root's\n           nested shadow roots are discovered before the outer shadow is\n           sanitized (which may remove hosts). Pushes are in reverse of the\n           desired processing order (LIFO): template content, then children, then\n           the shadow-sanitize, then the shadow walk \u2014 so the order matches the\n           previous recursion exactly. */\n        const stack = [{\n          node: root,\n          shadow: null\n        }];\n        while (stack.length > 0) {\n          const item = stack.pop();\n          /* Deferred shadow-DOM sanitisation: runs after its subtree was walked. */\n          if (item.shadow) {\n            _sanitizeShadowDOM2(item.shadow);\n            continue;\n          }\n          const node = item.node;\n          const nodeType = getNodeType ? getNodeType(node) : node.nodeType;\n          const isElement = nodeType === NODE_TYPE.element;\n          /* (pushed last \u2192 processed first) Children, snapshotted in reverse so\n             the first child is processed first. Snapshotting matters because a\n             hook may detach siblings mid-walk. */\n          const childNodes = getChildNodes(node);\n          if (childNodes) {\n            for (let i = childNodes.length - 1; i >= 0; --i) {\n              stack.push({\n                node: childNodes[i],\n                shadow: null\n              });\n            }\n          }\n          /* (pushed before children \u2192 processed after them, matching the old\n             \"template content last\" order) When the node is a <template>,\n             descend into its content. */\n          if (isElement) {\n            const rootName = getNodeName ? getNodeName(node) : null;\n            if (typeof rootName === 'string' && transformCaseFunc(rootName) === 'template') {\n              const content = node.content;\n              if (_isDocumentFragment(content)) {\n                stack.push({\n                  node: content,\n                  shadow: null\n                });\n              }\n            }\n          }\n          /* Shadow root (processed first): walk its subtree, then sanitise it.\n             Realm-safe check (GHSA-hpcv-96wg-7vj8): nodeType-based detection\n             rather than `instanceof DocumentFragment`, which is realm-bound and\n             silently skipped foreign-realm shadow roots (e.g.\n             iframe.contentDocument attachShadow). */\n          if (isElement) {\n            const sr = getShadowRoot(node);\n            if (_isDocumentFragment(sr)) {\n              /* Push the deferred sanitise first so it pops after the shadow\n                 walk we push next, i.e. nested shadow roots are discovered\n                 before this one is sanitised. */\n              stack.push({\n                node: null,\n                shadow: sr\n              }, {\n                node: sr,\n                shadow: null\n              });\n            }\n          }\n        }\n      };\n      // eslint-disable-next-line complexity\n      DOMPurify.sanitize = function (dirty) {\n        let cfg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n        let body = null;\n        let importedNode = null;\n        let currentNode = null;\n        let returnNode = null;\n        /* Make sure we have a string to sanitize.\n          DO NOT return early, as this will return the wrong type if\n          the user has requested a DOM object rather than a string */\n        IS_EMPTY_INPUT = !dirty;\n        if (IS_EMPTY_INPUT) {\n          dirty = '<!-->';\n        }\n        /* Stringify, in case dirty is an object */\n        if (typeof dirty !== 'string' && !_isNode(dirty)) {\n          dirty = stringifyValue(dirty);\n          if (typeof dirty !== 'string') {\n            throw typeErrorCreate('dirty is not a string, aborting');\n          }\n        }\n        /* Return dirty HTML if DOMPurify cannot run */\n        if (!DOMPurify.isSupported) {\n          return dirty;\n        }\n        /* Assign config vars */\n        if (SET_CONFIG) {\n          /* Persistent setConfig() path: _parseConfig is skipped, so the sets are\n           * not re-derived per call. Restore them from the pristine bindings\n           * captured at setConfig() time so a previous call's hook clone (mutated\n           * below) does not carry over. */\n          ALLOWED_TAGS = SET_CONFIG_ALLOWED_TAGS;\n          ALLOWED_ATTR = SET_CONFIG_ALLOWED_ATTR;\n        } else {\n          _parseConfig(cfg);\n        }\n        /* Clone the hook-mutable allowlists before the walk whenever an\n         * uponSanitize* hook is registered. The hook event exposes ALLOWED_TAGS\n         * and ALLOWED_ATTR by reference (as allowedTags / allowedAttributes), so\n         * a hook that widens them would otherwise mutate the shared set\n         * permanently: across later calls and across every element. Cloning per\n         * walk keeps documented in-call widening working while scoping it to the\n         * call. A single guard for both config paths - the per-call path rebinds\n         * the sets in _parseConfig each call, the persistent path restores them\n         * from the captured bindings just above - so the two cannot diverge. */\n        if (hooks.uponSanitizeElement.length > 0 || hooks.uponSanitizeAttribute.length > 0) {\n          ALLOWED_TAGS = clone(ALLOWED_TAGS);\n        }\n        if (hooks.uponSanitizeAttribute.length > 0) {\n          ALLOWED_ATTR = clone(ALLOWED_ATTR);\n        }\n        /* Clean up removed elements */\n        DOMPurify.removed = [];\n        /* Resolve IN_PLACE for this call without mutating persistent config.\n           Writing the IN_PLACE closure variable here leaks under setConfig(),\n           where _parseConfig is skipped on later calls: a single string call would\n           disable in-place mode for every subsequent node call, returning a\n           sanitized copy while leaving the caller's node \u2014 which in-place callers\n           keep using and whose return value they ignore \u2014 unsanitized. REPORT-2. */\n        const inPlace = IN_PLACE && typeof dirty !== 'string' && _isNode(dirty);\n        if (inPlace) {\n          /* Declarative-partial-updates / streaming pre-pass: sever every patch\n             linkage across the live tree BEFORE the walk, so no patch can fire\n             mid-walk and inject into an already-processed region. Runs first, so\n             it also covers the forbidden/clobbered roots that throw below. */\n          _neutralizePatchLinkage(dirty);\n          /* Do some early pre-sanitization to avoid unsafe root nodes.\n             Read nodeName through the cached prototype getter \u2014 a clobbering\n             child named \"nodeName\" on the form root would otherwise shadow\n             the property and let this check skip the root-allowlist\n             validation entirely. */\n          const nn = getNodeName ? getNodeName(dirty) : dirty.nodeName;\n          if (typeof nn === 'string') {\n            const tagName = transformCaseFunc(nn);\n            if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n              /* Fail closed on a live root: neutralize handlers/children before\n                 throwing, exactly as the mid-walk abort path does. */\n              _neutralizeRoot(dirty);\n              throw typeErrorCreate('root node is forbidden and cannot be sanitized in-place');\n            }\n          }\n          /* Pre-flight the root through _isClobbered. The iterator-driven\n             removal path can not detach a parent-less root: _forceRemove\n             falls through to Element.prototype.remove(), which per spec\n             is a no-op on a node with no parent. A clobbered root would\n             then survive the main loop with its attributes uninspected,\n             because _sanitizeAttributes early-returns on _isClobbered. The\n             result would be an attacker-controlled form, complete with any\n             event-handler attributes the caller passed in, handed back to\n             the application unsanitized. Refuse to sanitize such a root\n             the same way we refuse a forbidden tag. GHSA-r47g-fvhr-h676. */\n          if (_isClobbered(dirty)) {\n            /* Fail closed on a live clobbered root before throwing.\n               _neutralizeRoot's reads are clobber-safe (cached getters); the\n               form's non-clobbered descendants, e.g. an armed <img>, are scrubbed. */\n            _neutralizeRoot(dirty);\n            throw typeErrorCreate('root node is clobbered and cannot be sanitized in-place');\n          }\n          /* Sanitize attached shadow roots before the main iterator runs.\n             The iterator does not descend into shadow trees. Same fail-closed\n             barrier as the main walk (campaign-3 F2): a custom-element reaction\n             inside a shadow root could abort this pre-pass before the walk runs,\n             which would otherwise leave the entire live tree unsanitized. */\n          try {\n            _sanitizeAttachedShadowRoots(dirty);\n          } catch (error) {\n            _neutralizeRoot(dirty);\n            throw error;\n          }\n        } else if (_isNode(dirty)) {\n          /* If dirty is a DOM element, append to an empty document to avoid\n             elements being stripped by the parser */\n          body = _initDocument('<!---->');\n          importedNode = body.ownerDocument.importNode(dirty, true);\n          if (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === 'BODY') {\n            /* Node is already a body, use as is */\n            body = importedNode;\n          } else if (importedNode.nodeName === 'HTML') {\n            body = importedNode;\n          } else {\n            // eslint-disable-next-line unicorn/prefer-dom-node-append\n            body.appendChild(importedNode);\n          }\n          /* Clonable shadow roots are deep-cloned by importNode(); sanitize\n             them before the main iterator runs, since the iterator does not\n             descend into shadow trees. The walk routes every read through a\n             cached prototype getter so clobbering descendants on a form root\n             cannot hide a shadow host from this pass. */\n          _sanitizeAttachedShadowRoots(importedNode);\n        } else {\n          /* Exit directly if we have nothing to do */\n          if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT &&\n          // eslint-disable-next-line unicorn/prefer-includes\n          dirty.indexOf('<') === -1) {\n            return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? _createTrustedHTML(dirty) : dirty;\n          }\n          /* Initialize the document to work on */\n          body = _initDocument(dirty);\n          /* Check we have a DOM node from the data */\n          if (!body) {\n            return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : '';\n          }\n        }\n        /* Remove first element node (ours) if FORCE_BODY is set */\n        if (body && FORCE_BODY) {\n          _forceRemove(body.firstChild);\n        }\n        /* Get node iterator */\n        const walkRoot = inPlace ? dirty : body;\n        const nodeIterator = _createNodeIterator(walkRoot);\n        /* Now start iterating over the created document.\n           The walk runs inside an exception barrier (campaign-3 F2): a re-entrant\n           engine/custom-element mutation can detach a node mid-walk so\n           `_forceRemove`'s parentless guard throws, aborting the loop. Without the\n           barrier the caller's in-place tree would be left half-sanitized with the\n           unvisited tail still armed. On any throw we fail closed \u2014 strip the\n           in-place root bare \u2014 then rethrow so the existing throw contract is\n           preserved. (String/DOM-copy paths never return the partial body, so the\n           propagating throw is already fail-closed there.) */\n        try {\n          while (currentNode = nodeIterator.nextNode()) {\n            /* Sanitize tags and elements */\n            _sanitizeElements(currentNode, walkRoot);\n            /* Check attributes next */\n            _sanitizeAttributes(currentNode);\n            /* Shadow DOM detected, sanitize it.\n               Realm-safe check (GHSA-hpcv-96wg-7vj8): nodeType-based detection\n               instead of instanceof, so foreign-realm <template>.content is\n               walked correctly. */\n            if (_isDocumentFragment(currentNode.content)) {\n              _sanitizeShadowDOM2(currentNode.content);\n            }\n          }\n        } catch (error) {\n          if (inPlace) {\n            _neutralizeRoot(dirty);\n            /* Nodes _forceRemove'd earlier in the aborted walk are already\n               detached from the root, so _neutralizeRoot's subtree pass does not\n               reach them. Defuse them too, mirroring the success-path loop below. */\n            arrayForEach(DOMPurify.removed, entry => {\n              if (entry.element) {\n                _neutralizeSubtree(entry.element);\n              }\n            });\n          }\n          throw error;\n        }\n        /* If we sanitized `dirty` in-place, return it. */\n        if (inPlace) {\n          /* Fail-closed completion of the audit-5 F1 fix: every node removed from\n             the caller's live tree is detached but may still hold a queued\n             resource-event handler that fires in page scope after we return. The\n             move-hoist covers only disallowed-tag KEEP_CONTENT removals; strip the\n             non-allow-listed attributes off every other removed subtree (clobber,\n             mXSS, namespace, comments, KEEP_CONTENT:false, \u2026) so those handlers are\n             cancelled before any event can fire. Runs synchronously, pre-return. */\n          arrayForEach(DOMPurify.removed, entry => {\n            if (entry.element) {\n              _neutralizeSubtree(entry.element);\n            }\n          });\n          if (SAFE_FOR_TEMPLATES) {\n            _scrubTemplateExpressions2(dirty);\n          }\n          return dirty;\n        }\n        /* Return sanitized string or DOM */\n        if (RETURN_DOM) {\n          if (SAFE_FOR_TEMPLATES) {\n            _scrubTemplateExpressions2(body);\n          }\n          if (RETURN_DOM_FRAGMENT) {\n            returnNode = createDocumentFragment.call(body.ownerDocument);\n            while (body.firstChild) {\n              // eslint-disable-next-line unicorn/prefer-dom-node-append\n              returnNode.appendChild(body.firstChild);\n            }\n          } else {\n            returnNode = body;\n          }\n          if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) {\n            /*\n              AdoptNode() is not used because internal state is not reset\n              (e.g. the past names map of a HTMLFormElement), this is safe\n              in theory but we would rather not risk another attack vector.\n              The state that is cloned by importNode() is explicitly defined\n              by the specs.\n            */\n            returnNode = importNode.call(originalDocument, returnNode, true);\n          }\n          return returnNode;\n        }\n        let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;\n        /* Serialize doctype if allowed */\n        if (WHOLE_DOCUMENT && ALLOWED_TAGS['!doctype'] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {\n          serializedHTML = '<!DOCTYPE ' + body.ownerDocument.doctype.name + '>\\n' + serializedHTML;\n        }\n        /* Sanitize final string template-safe */\n        if (SAFE_FOR_TEMPLATES) {\n          serializedHTML = _stripTemplateExpressions(serializedHTML);\n        }\n        return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? _createTrustedHTML(serializedHTML) : serializedHTML;\n      };\n      DOMPurify.setConfig = function () {\n        let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n        _parseConfig(cfg);\n        SET_CONFIG = true;\n        SET_CONFIG_ALLOWED_TAGS = ALLOWED_TAGS;\n        SET_CONFIG_ALLOWED_ATTR = ALLOWED_ATTR;\n      };\n      DOMPurify.clearConfig = function () {\n        CONFIG = null;\n        SET_CONFIG = false;\n        SET_CONFIG_ALLOWED_TAGS = null;\n        SET_CONFIG_ALLOWED_ATTR = null;\n        // Drop any caller-supplied Trusted Types policy so it cannot poison later\n        // `RETURN_TRUSTED_TYPE` output. The internal default policy (cached, and\n        // never recreated \u2014 Trusted Types throws on duplicate names) is restored by\n        // the next `_parseConfig`. See GHSA-vxr8-fq34-vvx9.\n        trustedTypesPolicy = defaultTrustedTypesPolicy;\n        emptyHTML = '';\n      };\n      DOMPurify.isValidAttribute = function (tag, attr, value) {\n        /* Initialize shared config vars if necessary. */\n        if (!CONFIG) {\n          _parseConfig({});\n        }\n        const lcTag = transformCaseFunc(tag);\n        const lcName = transformCaseFunc(attr);\n        return _isValidAttribute(lcTag, lcName, value);\n      };\n      DOMPurify.addHook = function (entryPoint, hookFunction) {\n        if (typeof hookFunction !== 'function') {\n          return;\n        }\n        /* Reject unknown entry points. Without this, a non-hook key (e.g.\n         * '__proto__') indexes off the prototype chain rather than a real\n         * hook array, and arrayPush then writes to Object.prototype. Guard\n         * with an own-property check against the known hook names. */\n        if (!objectHasOwnProperty(hooks, entryPoint)) {\n          return;\n        }\n        arrayPush(hooks[entryPoint], hookFunction);\n      };\n      DOMPurify.removeHook = function (entryPoint, hookFunction) {\n        if (!objectHasOwnProperty(hooks, entryPoint)) {\n          return undefined;\n        }\n        if (hookFunction !== undefined) {\n          const index = arrayLastIndexOf(hooks[entryPoint], hookFunction);\n          return index === -1 ? undefined : arraySplice(hooks[entryPoint], index, 1)[0];\n        }\n        return arrayPop(hooks[entryPoint]);\n      };\n      DOMPurify.removeHooks = function (entryPoint) {\n        if (!objectHasOwnProperty(hooks, entryPoint)) {\n          return;\n        }\n        hooks[entryPoint] = [];\n      };\n      DOMPurify.removeAllHooks = function () {\n        hooks = _createHooksMap();\n      };\n      return DOMPurify;\n    }\n    var purify = createDOMPurify();\n\n    const sanitizeHtmlString = (html) => purify().sanitize(html);\n\n    var global$6 = tinymce.util.Tools.resolve('tinymce.util.I18n');\n\n    // Icons that need to be transformed in RTL\n    const rtlTransform = {\n        'indent': true,\n        'outdent': true,\n        'table-insert-column-after': true,\n        'table-insert-column-before': true,\n        'paste-column-after': true,\n        'paste-column-before': true,\n        'unordered-list': true,\n        'list-bull-circle': true,\n        'list-bull-disc': true,\n        'list-bull-default': true,\n        'list-bull-square': true\n    };\n    const defaultIconName = 'temporary-placeholder';\n    const defaultIcon = (icons) => () => get$h(icons, defaultIconName).getOr('!not found!');\n    const getIconName = (name, icons) => {\n        const lcName = name.toLowerCase();\n        // If in rtl mode then try to see if we have a rtl icon to use instead\n        if (global$6.isRtl()) {\n            const rtlName = ensureTrailing(lcName, '-rtl');\n            return has$2(icons, rtlName) ? rtlName : lcName;\n        }\n        else {\n            return lcName;\n        }\n    };\n    const lookupIcon = (name, icons) => get$h(icons, getIconName(name, icons));\n    const get = (name, iconProvider) => {\n        const icons = iconProvider();\n        return lookupIcon(name, icons).getOrThunk(defaultIcon(icons));\n    };\n    const getOr = (name, iconProvider, fallbackIcon) => {\n        const icons = iconProvider();\n        return lookupIcon(name, icons).or(fallbackIcon).getOrThunk(defaultIcon(icons));\n    };\n    const needsRtlTransform = (iconName) => global$6.isRtl() ? has$2(rtlTransform, iconName) : false;\n    const addFocusableBehaviour = () => config('add-focusable', [\n        runOnAttached((comp) => {\n            // set focusable=false on SVGs to prevent focusing the toolbar when tabbing into the editor\n            child(comp.element, 'svg').each((svg) => set$9(svg, 'focusable', 'false'));\n        })\n    ]);\n    const renderIcon$3 = (spec, iconName, icons, fallbackIcon) => {\n        // If RTL, add the flip icon class if the icon doesn't have a `-rtl` icon available.\n        const rtlIconClasses = needsRtlTransform(iconName) ? ['tox-icon--flip'] : [];\n        const iconHtml = get$h(icons, getIconName(iconName, icons)).or(fallbackIcon).getOrThunk(defaultIcon(icons));\n        return {\n            dom: {\n                tag: spec.tag,\n                attributes: spec.attributes ?? {},\n                classes: spec.classes.concat(rtlIconClasses),\n                innerHtml: iconHtml\n            },\n            behaviours: derive$1([\n                ...spec.behaviours ?? [],\n                addFocusableBehaviour()\n            ]),\n            eventOrder: spec.eventOrder ?? {}\n        };\n    };\n    const render$4 = (iconName, spec, iconProvider, fallbackIcon = Optional.none()) => renderIcon$3(spec, iconName, iconProvider(), fallbackIcon);\n    const renderFirst = (iconNames, spec, iconProvider) => {\n        const icons = iconProvider();\n        const iconName = find$5(iconNames, (name) => has$2(icons, getIconName(name, icons)));\n        return renderIcon$3(spec, iconName.getOr(defaultIconName), icons, Optional.none());\n    };\n\n    const notificationIconMap = {\n        success: 'checkmark',\n        error: 'warning',\n        err: 'error',\n        warning: 'warning',\n        warn: 'warning',\n        info: 'info'\n    };\n    const factory$4 = (detail) => {\n        // For using the alert banner as a standalone banner\n        const notificationTextId = generate$6('notification-text');\n        const memBannerText = record({\n            dom: fromHtml(`<p id=${notificationTextId}>${sanitizeHtmlString(detail.backstageProvider.translate(detail.text))}</p>`),\n            behaviours: derive$1([\n                Replacing.config({})\n            ])\n        });\n        const renderPercentBar = (percent) => ({\n            dom: {\n                tag: 'div',\n                classes: ['tox-bar'],\n                styles: {\n                    width: `${percent}%`\n                }\n            }\n        });\n        const renderPercentText = (percent) => ({\n            dom: {\n                tag: 'div',\n                classes: ['tox-text'],\n                innerHtml: `${percent}%`\n            }\n        });\n        const memBannerProgress = record({\n            dom: {\n                tag: 'div',\n                classes: detail.progress ? ['tox-progress-bar', 'tox-progress-indicator'] : ['tox-progress-bar']\n            },\n            components: [\n                {\n                    dom: {\n                        tag: 'div',\n                        classes: ['tox-bar-container']\n                    },\n                    components: [\n                        renderPercentBar(0)\n                    ]\n                },\n                renderPercentText(0)\n            ],\n            behaviours: derive$1([\n                Replacing.config({})\n            ])\n        });\n        const updateProgress = (comp, percent) => {\n            if (comp.getSystem().isConnected()) {\n                memBannerProgress.getOpt(comp).each((progress) => {\n                    Replacing.set(progress, [\n                        {\n                            dom: {\n                                tag: 'div',\n                                classes: ['tox-bar-container']\n                            },\n                            components: [\n                                renderPercentBar(percent)\n                            ]\n                        },\n                        renderPercentText(percent)\n                    ]);\n                });\n            }\n        };\n        const updateText = (comp, text) => {\n            if (comp.getSystem().isConnected()) {\n                const banner = memBannerText.get(comp);\n                Replacing.set(banner, [\n                    text$2(text)\n                ]);\n            }\n        };\n        const apis = {\n            updateProgress,\n            updateText\n        };\n        const iconChoices = flatten([\n            detail.icon.toArray(),\n            [detail.level],\n            Optional.from(notificationIconMap[detail.level]).toArray()\n        ]);\n        const memButton = record(Button.sketch({\n            dom: {\n                tag: 'button',\n                classes: ['tox-notification__dismiss', 'tox-button', 'tox-button--naked', 'tox-button--icon'],\n                attributes: {\n                    'aria-label': detail.backstageProvider.translate('Close')\n                }\n            },\n            components: [\n                render$4('close', {\n                    tag: 'span',\n                    classes: ['tox-icon'],\n                }, detail.iconProvider)\n            ],\n            buttonBehaviours: derive$1([\n                Tabstopping.config({}),\n                Tooltipping.config({\n                    ...detail.backstageProvider.tooltips.getConfig({\n                        tooltipText: detail.backstageProvider.translate('Close')\n                    })\n                })\n            ]),\n            action: (comp) => {\n                detail.onAction(comp);\n            }\n        }));\n        const notificationIconSpec = renderFirst(iconChoices, { tag: 'div', classes: ['tox-notification__icon'] }, detail.iconProvider);\n        const notificationBodySpec = {\n            dom: {\n                tag: 'div',\n                classes: ['tox-notification__body']\n            },\n            components: [\n                memBannerText.asSpec()\n            ],\n            behaviours: derive$1([\n                Replacing.config({})\n            ])\n        };\n        const components = [notificationIconSpec, notificationBodySpec];\n        return {\n            uid: detail.uid,\n            dom: {\n                tag: 'div',\n                attributes: {\n                    'role': 'alert',\n                    'aria-labelledby': notificationTextId\n                },\n                classes: ['tox-notification', 'tox-notification--in', `tox-notification--${detail.level}`],\n            },\n            behaviours: derive$1([\n                Tabstopping.config({}),\n                Focusing.config({}),\n                Keying.config({\n                    mode: 'special',\n                    onEscape: (comp) => {\n                        detail.onAction(comp);\n                        return Optional.some(true);\n                    }\n                })\n            ]),\n            components: components\n                .concat(detail.progress ? [memBannerProgress.asSpec()] : [])\n                .concat([memButton.asSpec()]),\n            apis\n        };\n    };\n    const Notification = single({\n        name: 'Notification',\n        factory: factory$4,\n        configFields: [\n            defaultedStringEnum('level', 'info', ['success', 'error', 'warning', 'warn', 'info']),\n            required$1('progress'),\n            option$3('icon'),\n            required$1('onAction'),\n            required$1('text'),\n            required$1('iconProvider'),\n            required$1('backstageProvider'),\n        ],\n        apis: {\n            updateProgress: (apis, comp, percent) => {\n                apis.updateProgress(comp, percent);\n            },\n            updateText: (apis, comp, text) => {\n                apis.updateText(comp, text);\n            }\n        }\n    });\n\n    var NotificationManagerImpl = (editor, extras, uiMothership, notificationRegion) => {\n        const sharedBackstage = extras.backstage.shared;\n        const getBoundsContainer = () => SugarElement.fromDom(editor.queryCommandValue('ToggleView') === '' ? editor.getContentAreaContainer() : editor.getContainer());\n        const getBounds = () => {\n            const contentArea = box$1(getBoundsContainer());\n            return Optional.some(contentArea);\n        };\n        const clampComponentsToBounds = (components) => {\n            getBounds().each((bounds) => {\n                each$1(components, (comp) => {\n                    remove$6(comp.element, 'width');\n                    if (get$c(comp.element) > bounds.width) {\n                        set$7(comp.element, 'width', bounds.width + 'px');\n                    }\n                });\n            });\n        };\n        const open = (settings, closeCallback, isEditorOrUIFocused) => {\n            const close = () => {\n                const removeNotificationAndReposition = (region) => {\n                    Replacing.remove(region, notification);\n                    reposition();\n                };\n                const manageRegionVisibility = (region, editorOrUiFocused) => {\n                    if (children(region.element).length === 0) {\n                        handleEmptyRegion(region, editorOrUiFocused);\n                    }\n                    else {\n                        handleRegionWithChildren(region, editorOrUiFocused);\n                    }\n                };\n                const handleEmptyRegion = (region, editorOrUIFocused) => {\n                    InlineView.hide(region);\n                    notificationRegion.clear();\n                    if (editorOrUIFocused) {\n                        editor.focus();\n                    }\n                };\n                const handleRegionWithChildren = (region, editorOrUIFocused) => {\n                    if (editorOrUIFocused) {\n                        Keying.focusIn(region);\n                    }\n                };\n                notificationRegion.on((region) => {\n                    closeCallback();\n                    const editorOrUIFocused = isEditorOrUIFocused();\n                    removeNotificationAndReposition(region);\n                    manageRegionVisibility(region, editorOrUIFocused);\n                });\n            };\n            const shouldApplyDocking = () => !isStickyToolbar(editor) || !sharedBackstage.header.isPositionedAtTop();\n            const notification = build$1(Notification.sketch({\n                text: settings.text,\n                level: contains$2(['success', 'error', 'warning', 'warn', 'info'], settings.type) ? settings.type : undefined,\n                progress: settings.progressBar === true,\n                icon: settings.icon,\n                onAction: close,\n                iconProvider: sharedBackstage.providers.icons,\n                backstageProvider: sharedBackstage.providers,\n            }));\n            if (!notificationRegion.isSet()) {\n                const notificationWrapper = build$1(InlineView.sketch({\n                    dom: {\n                        tag: 'div',\n                        classes: ['tox-notifications-container'],\n                        attributes: {\n                            'aria-label': 'Notifications',\n                            'role': 'region'\n                        }\n                    },\n                    lazySink: sharedBackstage.getSink,\n                    fireDismissalEventInstead: {},\n                    ...sharedBackstage.header.isPositionedAtTop() ? {} : { fireRepositionEventInstead: {} },\n                    inlineBehaviours: derive$1([\n                        Keying.config({\n                            mode: 'cyclic',\n                            selector: '.tox-notification, .tox-notification a, .tox-notification button',\n                        }),\n                        Replacing.config({}),\n                        ...(shouldApplyDocking()\n                            ? [\n                                Docking.config({\n                                    contextual: {\n                                        lazyContext: () => Optional.some(box$1(getBoundsContainer())),\n                                        fadeInClass: 'tox-notification-container-dock-fadein',\n                                        fadeOutClass: 'tox-notification-container-dock-fadeout',\n                                        transitionClass: 'tox-notification-container-dock-transition'\n                                    },\n                                    modes: ['top'],\n                                    lazyViewport: (comp) => {\n                                        const optScrollingContext = detectWhenSplitUiMode(editor, comp.element);\n                                        return optScrollingContext\n                                            .map((sc) => {\n                                            const combinedBounds = getBoundsFrom(sc);\n                                            return {\n                                                bounds: combinedBounds,\n                                                optScrollEnv: Optional.some({\n                                                    currentScrollTop: sc.element.dom.scrollTop,\n                                                    scrollElmTop: absolute$3(sc.element).top\n                                                })\n                                            };\n                                        }).getOrThunk(() => ({\n                                            bounds: win(),\n                                            optScrollEnv: Optional.none()\n                                        }));\n                                    }\n                                })\n                            ] : [])\n                    ])\n                }));\n                const notificationSpec = premade(notification);\n                const anchorOverrides = {\n                    maxHeightFunction: expandable$1()\n                };\n                const anchor = {\n                    ...sharedBackstage.anchors.banner(),\n                    overrides: anchorOverrides\n                };\n                notificationRegion.set(notificationWrapper);\n                uiMothership.add(notificationWrapper);\n                InlineView.showWithinBounds(notificationWrapper, notificationSpec, { anchor }, getBounds);\n            }\n            else {\n                const notificationSpec = premade(notification);\n                notificationRegion.on((notificationWrapper) => {\n                    Replacing.append(notificationWrapper, notificationSpec);\n                    InlineView.reposition(notificationWrapper);\n                    if (notification.hasConfigured(Docking)) {\n                        Docking.refresh(notificationWrapper);\n                    }\n                    clampComponentsToBounds(notificationWrapper.components());\n                });\n            }\n            if (isNumber(settings.timeout) && settings.timeout > 0) {\n                global$a.setEditorTimeout(editor, () => {\n                    close();\n                }, settings.timeout);\n            }\n            const reposition = () => {\n                notificationRegion.on((region) => {\n                    InlineView.reposition(region);\n                    if (region.hasConfigured(Docking)) {\n                        Docking.refresh(region);\n                    }\n                    clampComponentsToBounds(region.components());\n                });\n            };\n            const thisNotification = {\n                close,\n                reposition,\n                text: (nuText) => {\n                    // check if component is still mounted\n                    Notification.updateText(notification, nuText);\n                },\n                settings,\n                getEl: () => notification.element.dom,\n                progressBar: {\n                    value: (percent) => {\n                        Notification.updateProgress(notification, percent);\n                    }\n                }\n            };\n            return thisNotification;\n        };\n        const close = (notification) => {\n            notification.close();\n        };\n        const getArgs = (notification) => {\n            return notification.settings;\n        };\n        return {\n            open,\n            close,\n            getArgs\n        };\n    };\n\n    const setup$c = (api, editor) => {\n        const redirectKeyToItem = (item, e) => {\n            emitWith(item, keydown(), { raw: e });\n        };\n        const getItem = () => api.getMenu().bind(Highlighting.getHighlighted);\n        editor.on('keydown', (e) => {\n            const keyCode = e.which;\n            // If the autocompleter isn't activated then do nothing\n            if (!api.isActive()) {\n                return;\n            }\n            if (api.isMenuOpen()) {\n                // Pressing <enter> executes any item currently selected, or does nothing\n                if (keyCode === 13) {\n                    getItem().each(emitExecute);\n                    e.preventDefault();\n                    // Pressing <down> either highlights the first option, or moves down the menu\n                }\n                else if (keyCode === 40) {\n                    getItem().fold(\n                    // No current item, so highlight the first one\n                    () => {\n                        api.getMenu().each(Highlighting.highlightFirst);\n                    }, \n                    // There is a current item, so move down in the menu\n                    (item) => {\n                        redirectKeyToItem(item, e);\n                    });\n                    e.preventDefault();\n                    e.stopImmediatePropagation();\n                    // Pressing <up>, <left>, <right> gets redirected to the selected item\n                }\n                else if (keyCode === 37 || keyCode === 38 || keyCode === 39) {\n                    getItem().each((item) => {\n                        redirectKeyToItem(item, e);\n                        e.preventDefault();\n                        e.stopImmediatePropagation();\n                    });\n                }\n            }\n            else {\n                // Pressing <enter>, <down> or <up> closes the autocompleter when it's active but the menu isn't open\n                if (keyCode === 13 || keyCode === 38 || keyCode === 40) {\n                    api.cancelIfNecessary();\n                }\n            }\n        });\n        editor.on('NodeChange', () => {\n            // Close if active, not in the middle of an onAction callback and we're no longer inside the autocompleter span\n            if (api.isActive() && !api.isProcessingAction() && !editor.queryCommandState('mceAutoCompleterInRange')) {\n                api.cancelIfNecessary();\n            }\n        });\n    };\n    const AutocompleterEditorEvents = {\n        setup: setup$c\n    };\n\n    var ItemResponse;\n    (function (ItemResponse) {\n        ItemResponse[ItemResponse[\"CLOSE_ON_EXECUTE\"] = 0] = \"CLOSE_ON_EXECUTE\";\n        ItemResponse[ItemResponse[\"BUBBLE_TO_SANDBOX\"] = 1] = \"BUBBLE_TO_SANDBOX\";\n    })(ItemResponse || (ItemResponse = {}));\n    var ItemResponse$1 = ItemResponse;\n\n    const navClass = 'tox-menu-nav__js';\n    const selectableClass = 'tox-collection__item';\n    const colorClass = 'tox-swatch';\n    const presetClasses = {\n        normal: navClass,\n        color: colorClass\n    };\n    const tickedClass = 'tox-collection__item--enabled';\n    const groupHeadingClass = 'tox-collection__group-heading';\n    const iconClass = 'tox-collection__item-icon';\n    const imageClass = 'tox-collection__item-image';\n    const imageSelectorClasll = 'tox-collection__item-image-selector';\n    const textClass = 'tox-collection__item-label';\n    const accessoryClass = 'tox-collection__item-accessory';\n    const caretClass = 'tox-collection__item-caret';\n    const checkmarkClass = 'tox-collection__item-checkmark';\n    const activeClass = 'tox-collection__item--active';\n    const containerClass = 'tox-collection__item-container';\n    const containerColumnClass = 'tox-collection__item-container--column';\n    const containerRowClass = 'tox-collection__item-container--row';\n    const containerAlignRightClass = 'tox-collection__item-container--align-right';\n    const containerAlignLeftClass = 'tox-collection__item-container--align-left';\n    const containerValignTopClass = 'tox-collection__item-container--valign-top';\n    const containerValignMiddleClass = 'tox-collection__item-container--valign-middle';\n    const containerValignBottomClass = 'tox-collection__item-container--valign-bottom';\n    const classForPreset = (presets) => get$h(presetClasses, presets).getOr(navClass);\n\n    const forMenu = (presets) => {\n        if (presets === 'color') {\n            return 'tox-swatches';\n        }\n        else {\n            return 'tox-menu';\n        }\n    };\n    const classes = (presets) => ({\n        backgroundMenu: 'tox-background-menu',\n        selectedMenu: 'tox-selected-menu',\n        selectedItem: 'tox-collection__item--active',\n        hasIcons: 'tox-menu--has-icons',\n        menu: forMenu(presets),\n        tieredMenu: 'tox-tiered-menu'\n    });\n\n    const markers = (presets) => {\n        const menuClasses = classes(presets);\n        return {\n            backgroundMenu: menuClasses.backgroundMenu,\n            selectedMenu: menuClasses.selectedMenu,\n            menu: menuClasses.menu,\n            selectedItem: menuClasses.selectedItem,\n            item: classForPreset(presets)\n        };\n    };\n    const dom = (hasIcons, columns, presets) => {\n        const menuClasses = classes(presets);\n        return {\n            tag: 'div',\n            classes: flatten([\n                [menuClasses.menu, `tox-menu-${columns}-column`],\n                hasIcons ? [menuClasses.hasIcons] : []\n            ])\n        };\n    };\n    const components = [\n        Menu.parts.items({})\n    ];\n    // NOTE: Up to here.\n    const part = (hasIcons, columns, presets) => {\n        const menuClasses = classes(presets);\n        const d = {\n            tag: 'div',\n            classes: flatten([\n                [menuClasses.tieredMenu]\n            ])\n        };\n        return {\n            dom: d,\n            markers: markers(presets)\n        };\n    };\n\n    // This event is triggered by a menu item from a dropdown when it wants the\n    // dropdown to refetch its contents based on a search string.\n    const refetchTriggerEvent = generate$6('refetch-trigger-event');\n    // This event is triggerd by a menu item from a dropdown, when it wants to\n    // redispatch that event to the currently active item of that dropdown menu. It will\n    // be used in situations where the event should be firing on the item with fake focus,\n    // but instead it is firing on the item with real focus (e.g of real focus:\n    // menu search field)\n    const redirectMenuItemInteractionEvent = generate$6('redirect-menu-item-interaction');\n\n    // This is not stored in ItemClasses, because the searcher is not actually\n    // contained within items. It isn't part of their navigation, and it\n    // isn't maintained by menus. It is just part of the first menu, but\n    // not its items.\n    const menuSearcherClass = 'tox-menu__searcher';\n    // Ideally, we'd be using mementos to find it again, but we'd need to pass\n    // that memento onto the dropdown, which isn't going to have it. Especially,\n    // because the dropdown isn't responsible for putting this searcher component\n    // into the menu, NestedMenus is.\n    const findWithinSandbox = (sandboxComp) => {\n        return descendant(sandboxComp.element, `.${menuSearcherClass}`).bind((inputElem) => sandboxComp.getSystem().getByDom(inputElem).toOptional());\n    };\n    // There is nothing sandbox-specific about this code. It just needs to be\n    // a container that wraps the search field.\n    const findWithinMenu = findWithinSandbox;\n    const restoreState = (inputComp, searcherState) => {\n        Representing.setValue(inputComp, searcherState.fetchPattern);\n        inputComp.element.dom.selectionStart = searcherState.selectionStart;\n        inputComp.element.dom.selectionEnd = searcherState.selectionEnd;\n    };\n    const saveState = (inputComp) => {\n        const fetchPattern = Representing.getValue(inputComp);\n        const selectionStart = inputComp.element.dom.selectionStart;\n        const selectionEnd = inputComp.element.dom.selectionEnd;\n        return {\n            fetchPattern,\n            selectionStart,\n            selectionEnd\n        };\n    };\n    // Make sure there is ARIA communicating the currently active item in the results.\n    const setActiveDescendant = (inputComp, active) => {\n        getOpt(active.element, 'id')\n            .each((id) => set$9(inputComp.element, 'aria-activedescendant', id));\n    };\n    const renderMenuSearcher = (spec) => {\n        const handleByBrowser = (comp, se) => {\n            // We \"cut\" this event, so that the browser still handles it, but it is not processed\n            // by any of the above alloy components. We could also do this by stopping propagation,\n            // but not preventing default, but it's probably good to allow some overarching thing\n            // in the DOM (outside of alloy) to stop it if they want to.\n            se.cut();\n            // Returning a Some here (regardless of boolean value) is going to call `stop` on the\n            // simulated event, which is going to call: preventDefault and stopPropagation. We want\n            // neither of these things to happen, so we return None here to say that it hasn't been\n            // handled. But because we've cut it, it will not propagate to any other alloy components\n            return Optional.none();\n        };\n        const handleByHighlightedItem = (comp, se) => {\n            // Because we need to redispatch based on highlighted items that we don't know about here,\n            // we are going to emit an event, that the sandbox listens to, and the sandbox will\n            // redispatch the event.\n            const eventData = {\n                interactionEvent: se.event,\n                eventType: se.event.raw.type\n            };\n            emitWith(comp, redirectMenuItemInteractionEvent, eventData);\n            return Optional.some(true);\n        };\n        const customSearcherEventsName = 'searcher-events';\n        return {\n            dom: {\n                tag: 'div',\n                // NOTE: This is very intentionally NOT the navigation class, because\n                // we don't want the searcher to be part of the navigation. This class\n                // is just for styling consistency. Perhaps it should be its own class.\n                classes: [selectableClass]\n            },\n            components: [\n                Input.sketch({\n                    inputClasses: [menuSearcherClass, 'tox-textfield'],\n                    inputAttributes: {\n                        ...(spec.placeholder.map((placeholder) => ({ placeholder: spec.i18n(placeholder) })).getOr({})),\n                        // This ARIA is based on the algolia example documented in TINY-8952\n                        'type': 'search',\n                        'aria-autocomplete': 'list'\n                    },\n                    inputBehaviours: derive$1([\n                        config(customSearcherEventsName, [\n                            // When the user types into the search field, we want to retrigger\n                            // a fetch on the dropdown. This will be fired from within the\n                            // dropdown's sandbox, so the dropdown is going to have to listen\n                            // for it there. See CommonDropdown.ts.\n                            run$1(\n                            // Use \"input\" to handle keydown, paste etc.\n                            input(), (inputComp) => {\n                                emit(inputComp, refetchTriggerEvent);\n                            }),\n                            run$1(keydown(), (inputComp, se) => {\n                                // The Special Keying config type since TINY-7005 processes the Escape\n                                // key on keyup, not keydown. We need to stop the keydown event for this\n                                // input, because some browsers (e.g. Chrome) will process a keydown\n                                // for Escape inside an input[type=search] by clearing the input value,\n                                // and then triggering an \"input\" event. This \"input\" event will trigger\n                                // a refetch, which if it completes before the keyup is fired for Escape,\n                                // will go back to only showing one level of menu. Then, when the escape\n                                // keyup is processed by Keying, it will close the single remaining menu.\n                                // This has the effect of closing *all* menus that are open when Escape is\n                                // pressed instead of the last one. So, instead, we are going to kill the\n                                // keydown event, so that it doesn't have the default browser behaviour, and\n                                // won't trigger an input (and then Refetch). Then the keyup will still fire\n                                // so just one level of the menu will close. This is all based on the underlying\n                                // assumption that preventDefault and/or stop on a keydown does not suppress\n                                // the related keyup. All of the documentation found so far, suggests it should\n                                // only suppress the keypress, not the keyup, but that might not be across all\n                                // browsers, or implemented consistently.\n                                if (se.event.raw.key === 'Escape') {\n                                    se.stop();\n                                }\n                            })\n                        ]),\n                        // In addition to input handling, we want special handling for\n                        // Up/Down/Left/Right/Enter/Escape/Space. We can divide these into two categories\n                        //  - events that we don't want to allow the overall menu system to process (left and right and space)\n                        //  - events that we want to redispatch on the \"highlighted item\" based on the\n                        // current fake focus.\n                        Keying.config({\n                            mode: 'special',\n                            onLeft: handleByBrowser,\n                            onRight: handleByBrowser,\n                            onSpace: handleByBrowser,\n                            onEnter: handleByHighlightedItem,\n                            onEscape: handleByHighlightedItem,\n                            onUp: handleByHighlightedItem,\n                            onDown: handleByHighlightedItem\n                        })\n                    ]),\n                    // Because we have customised handling for keydown, and we are configuring\n                    // Keying, we need to specify which \"behaviour\" (custom events or keying) gets to\n                    // process the keydown event first. In this situation, we want to stop escape before\n                    // anything happens (although it really isn't necessary)\n                    eventOrder: {\n                        keydown: [customSearcherEventsName, Keying.name()]\n                    }\n                })\n            ]\n        };\n    };\n\n    const searchResultsClass = 'tox-collection--results__js';\n    // NOTE: this is operating on the the final AlloySpec\n    const augmentWithAria = (item) => {\n        if (item.dom) {\n            return {\n                ...item,\n                dom: {\n                    ...item.dom,\n                    attributes: {\n                        ...item.dom.attributes ?? {},\n                        'id': generate$6('aria-item-search-result-id'),\n                        'aria-selected': 'false'\n                    }\n                }\n            };\n        }\n        else {\n            return item;\n        }\n    };\n\n    const widgetAriaLabel = 'Use arrow keys to navigate.';\n    const chunk = (rowDom, numColumns) => (items) => {\n        const chunks = chunk$1(items, numColumns);\n        return map$2(chunks, (c) => ({\n            dom: rowDom,\n            components: c\n        }));\n    };\n    const forSwatch = (columns) => ({\n        dom: {\n            tag: 'div',\n            classes: ['tox-menu', 'tox-swatches-menu'],\n            attributes: {\n                'aria-label': global$6.translate(widgetAriaLabel)\n            }\n        },\n        components: [\n            {\n                dom: {\n                    tag: 'div',\n                    classes: ['tox-swatches']\n                },\n                components: [\n                    Menu.parts.items({\n                        preprocess: columns !== 'auto' ? chunk({\n                            tag: 'div',\n                            classes: ['tox-swatches__row']\n                        }, columns) : identity\n                    })\n                ]\n            }\n        ]\n    });\n    const forImageSelector = (columns) => ({\n        dom: {\n            tag: 'div',\n            classes: ['tox-menu', 'tox-image-selector-menu']\n        },\n        components: [\n            {\n                dom: {\n                    tag: 'div',\n                    classes: ['tox-image-selector']\n                },\n                components: [\n                    Menu.parts.items({\n                        preprocess: columns !== 'auto' ? chunk({\n                            tag: 'div',\n                            classes: ['tox-image-selector__row']\n                        }, columns) : identity\n                    })\n                ]\n            }\n        ]\n    });\n    const forToolbar = (columns) => ({\n        dom: {\n            tag: 'div',\n            // TODO: Configurable lg setting?\n            classes: ['tox-menu', 'tox-collection', 'tox-collection--toolbar', 'tox-collection--toolbar-lg']\n        },\n        components: [\n            Menu.parts.items({\n                preprocess: chunk({\n                    tag: 'div',\n                    classes: ['tox-collection__group']\n                }, columns)\n            })\n        ]\n    });\n    // NOTE: That type signature isn't quite true.\n    const preprocessCollection = (items, isSeparator) => {\n        const allSplits = [];\n        let currentSplit = [];\n        each$1(items, (item, i) => {\n            if (isSeparator(item, i)) {\n                if (currentSplit.length > 0) {\n                    allSplits.push(currentSplit);\n                }\n                currentSplit = [];\n                if (has$2(item.dom, 'innerHtml') || item.components && item.components.length > 0) {\n                    currentSplit.push(item);\n                }\n            }\n            else {\n                currentSplit.push(item);\n            }\n        });\n        if (currentSplit.length > 0) {\n            allSplits.push(currentSplit);\n        }\n        return map$2(allSplits, (s) => ({\n            dom: {\n                tag: 'div',\n                classes: ['tox-collection__group']\n            },\n            components: s\n        }));\n    };\n    const insertItemsPlaceholder = (columns, initItems, onItem) => {\n        return Menu.parts.items({\n            preprocess: (rawItems) => {\n                // Add any information to the items that is required. For example\n                // when the items are results in a searchable menu, we need them to have\n                // an ID that can be referenced by aria-activedescendant\n                const enrichedItems = map$2(rawItems, onItem);\n                if (columns !== 'auto' && columns > 1) {\n                    return chunk({\n                        tag: 'div',\n                        classes: ['tox-collection__group']\n                    }, columns)(enrichedItems);\n                }\n                else {\n                    return preprocessCollection(enrichedItems, (_item, i) => initItems[i].type === 'separator');\n                }\n            }\n        });\n    };\n    const hasWidget = (items) => exists(items, (item) => item.type === 'widget');\n    const forCollection = (columns, initItems, _hasIcons = true) => ({\n        dom: {\n            tag: 'div',\n            classes: ['tox-menu', 'tox-collection'].concat(columns === 1 ? ['tox-collection--list'] : ['tox-collection--grid']),\n            attributes: {\n                // widget item can be inserttable, colorswatch or imageselect - all of them are navigated with arrow keys\n                ...hasWidget(initItems) ? { 'aria-label': global$6.translate(widgetAriaLabel) } : {}\n            },\n        },\n        components: [\n            // We don't need to add IDs for each item because there are no\n            // aria relationships we need to maintain\n            insertItemsPlaceholder(columns, initItems, identity)\n        ]\n    });\n    const forCollectionWithSearchResults = (columns, initItems, _hasIcons = true) => {\n        // A collection with results is exactly like a collection, except it also has\n        // an ID and class on its outer div to allow for aria-controls relationships, and ids\n        // on its items.\n        // This connects the search bar with the list box.\n        const ariaControlsSearchResults = generate$6('aria-controls-search-results');\n        return {\n            dom: {\n                tag: 'div',\n                classes: ['tox-menu', 'tox-collection', searchResultsClass].concat(columns === 1 ? ['tox-collection--list'] : ['tox-collection--grid']),\n                attributes: {\n                    id: ariaControlsSearchResults\n                }\n            },\n            components: [\n                // For each item, it needs to have an ID, so that we can refer to it\n                // by the aria-activedescendant attribute\n                insertItemsPlaceholder(columns, initItems, augmentWithAria)\n            ]\n        };\n    };\n    // Does a searchable menu *really* support columns !== 1 ?\n    const forCollectionWithSearchField = (columns, initItems, searchField) => {\n        // This connects the search bar with the list box.\n        const ariaControlsSearchResults = generate$6('aria-controls-search-results');\n        return {\n            dom: {\n                tag: 'div',\n                classes: ['tox-menu', 'tox-collection'].concat(columns === 1 ? ['tox-collection--list'] : ['tox-collection--grid'])\n            },\n            components: [\n                // Importantly, the search bar is not in the \"items\" part, which means that it is\n                // not given any of the item decorations by default. In order to ensure that is\n                // not part of the navigation, however, we need to prevent it from getting the nav\n                // class. For general collection menu items, it is navClass, which is:\n                // tox-menu-nav__js. So simply, do not add this class when creating\n                // the search, so that it isn't in the navigation. Ideally, it would only ever look\n                // inside its items section, but the items aren't guaranteed to have a separate\n                // container, and navigation candidates are found anywhere inside the menu\n                // container. We could add configuration to alloy's Menu movement, where there was\n                // a 'navigation container' that all items would be in. That could be another\n                // way to solve the problem. For now, we'll just manually avoid adding the navClass\n                renderMenuSearcher({\n                    i18n: global$6.translate,\n                    placeholder: searchField.placeholder\n                }),\n                {\n                    // We need a separate container for the items, because this is the container\n                    // that multiple tox-collection__groups might go into, and will be the container\n                    // that the search bar controls.\n                    dom: {\n                        tag: 'div',\n                        classes: [\n                            ...(columns === 1 ? ['tox-collection--list'] : ['tox-collection--grid']),\n                            searchResultsClass\n                        ],\n                        attributes: {\n                            id: ariaControlsSearchResults\n                        }\n                    },\n                    components: [\n                        // For each item, it needs to have an ID, so that we can refer to it\n                        // by the aria-activedescendant attribute\n                        insertItemsPlaceholder(columns, initItems, augmentWithAria)\n                    ]\n                }\n            ]\n        };\n    };\n    const forHorizontalCollection = (initItems, _hasIcons = true) => ({\n        dom: {\n            tag: 'div',\n            classes: ['tox-collection', 'tox-collection--horizontal']\n        },\n        components: [\n            Menu.parts.items({\n                preprocess: (items) => preprocessCollection(items, (_item, i) => initItems[i].type === 'separator')\n            })\n        ]\n    });\n\n    const menuHasIcons = (xs) => exists(xs, (item) => 'icon' in item && item.icon !== undefined);\n    const handleError = (error) => {\n        // eslint-disable-next-line no-console\n        console.error(formatError(error));\n        // eslint-disable-next-line no-console\n        console.log(error);\n        return Optional.none();\n    };\n    const createHorizontalPartialMenuWithAlloyItems = (value, _hasIcons, items, _columns, _menuLayout) => {\n        // Horizontal collections do not support different menu layout structures currently.\n        const structure = forHorizontalCollection(items);\n        return {\n            value,\n            dom: structure.dom,\n            components: structure.components,\n            items\n        };\n    };\n    const createPartialMenuWithAlloyItems = (value, hasIcons, items, columns, menuLayout) => {\n        const getNormalStructure = () => {\n            if (menuLayout.menuType !== 'searchable') {\n                return forCollection(columns, items);\n            }\n            else {\n                return menuLayout.searchMode.searchMode === 'search-with-field'\n                    ? forCollectionWithSearchField(columns, items, menuLayout.searchMode)\n                    : forCollectionWithSearchResults(columns, items);\n            }\n        };\n        if (menuLayout.menuType === 'color') {\n            const structure = forSwatch(columns);\n            return {\n                value,\n                dom: structure.dom,\n                components: structure.components,\n                items\n            };\n        }\n        else if (menuLayout.menuType === 'imageselector' && columns !== 'auto') {\n            const structure = forImageSelector(columns);\n            return {\n                value,\n                dom: structure.dom,\n                components: structure.components,\n                items\n            };\n        }\n        else if (menuLayout.menuType === 'normal' && columns === 'auto') {\n            const structure = forCollection(columns, items);\n            return {\n                value,\n                dom: structure.dom,\n                components: structure.components,\n                items\n            };\n        }\n        else if (menuLayout.menuType === 'normal' || menuLayout.menuType === 'searchable') {\n            const structure = getNormalStructure();\n            return {\n                value,\n                dom: structure.dom,\n                components: structure.components,\n                items\n            };\n        }\n        else if (menuLayout.menuType === 'listpreview' && columns !== 'auto') {\n            const structure = forToolbar(columns);\n            return {\n                value,\n                dom: structure.dom,\n                components: structure.components,\n                items\n            };\n        }\n        else {\n            return {\n                value,\n                dom: dom(hasIcons, columns, menuLayout.menuType),\n                components: components,\n                items\n            };\n        }\n    };\n\n    const type = requiredString('type');\n    const name = requiredString('name');\n    const label = requiredString('label');\n    const text = requiredString('text');\n    const title = requiredString('title');\n    const icon = requiredString('icon');\n    const url = requiredString('url');\n    const value = requiredString('value');\n    const fetch = requiredFunction('fetch');\n    const getSubmenuItems = requiredFunction('getSubmenuItems');\n    const onAction = requiredFunction('onAction');\n    const onItemAction = requiredFunction('onItemAction');\n    const onSetup = defaultedFunction('onSetup', () => noop);\n    const optionalName = optionString('name');\n    const optionalText = optionString('text');\n    const optionalRole = optionString('role');\n    const optionalIcon = optionString('icon');\n    const optionalTooltip = optionString('tooltip');\n    const optionalChevronTooltip = optionString('chevronTooltip');\n    const optionalLabel = optionString('label');\n    const optionalShortcut = optionString('shortcut');\n    const optionalSelect = optionFunction('select');\n    const active = defaultedBoolean('active', false);\n    const borderless = defaultedBoolean('borderless', false);\n    const enabled = defaultedBoolean('enabled', true);\n    const primary = defaultedBoolean('primary', false);\n    const defaultedColumns = (num) => defaulted('columns', num);\n    const defaultedMeta = defaulted('meta', {});\n    const defaultedOnAction = defaultedFunction('onAction', noop);\n    const defaultedType = (type) => defaultedString('type', type);\n    const generatedName = (namePrefix) => field$1('name', 'name', defaultedThunk(() => generate$6(`${namePrefix}-name`)), string);\n    const generatedValue = (valuePrefix) => field$1('value', 'value', defaultedThunk(() => generate$6(`${valuePrefix}-value`)), anyValue());\n\n    const alertBannerFields = [\n        type,\n        text,\n        requiredStringEnum('level', ['info', 'warn', 'error', 'success']),\n        icon,\n        defaulted('url', '')\n    ];\n    const alertBannerSchema = objOf(alertBannerFields);\n\n    const createBarFields = (itemsField) => [\n        type,\n        itemsField\n    ];\n\n    const buttonFields = [\n        type,\n        text,\n        enabled,\n        generatedName('button'),\n        optionalIcon,\n        borderless,\n        // this should be defaulted to `secondary` but the implementation needs to manage the deprecation\n        optionStringEnum('buttonType', ['primary', 'secondary', 'toolbar']),\n        // this should be removed, but must live here because FieldSchema doesn't have a way to manage deprecated fields\n        primary,\n        defaultedString('context', 'mode:design')\n    ];\n    const buttonSchema = objOf(buttonFields);\n\n    const formComponentFields = [\n        type,\n        name\n    ];\n    const formComponentWithLabelFields = formComponentFields.concat([\n        optionalLabel\n    ]);\n\n    const checkboxFields = formComponentFields.concat([\n        label,\n        enabled,\n        defaultedString('context', 'mode:design')\n    ]);\n    const checkboxSchema = objOf(checkboxFields);\n    const checkboxDataProcessor = boolean;\n\n    const collectionFields = formComponentWithLabelFields.concat([\n        defaultedColumns('auto'),\n        defaultedString('context', 'mode:design')\n    ]);\n    const collectionSchema = objOf(collectionFields);\n    // TODO: Make type for CollectionItem\n    const collectionDataProcessor = arrOfObj([\n        value,\n        text,\n        icon\n    ]);\n\n    const colorInputFields = formComponentWithLabelFields.concat([\n        defaultedString('storageKey', 'default'),\n        defaultedString('context', 'mode:design'),\n    ]);\n    const colorInputSchema = objOf(colorInputFields);\n    const colorInputDataProcessor = string;\n\n    const colorPickerFields = formComponentWithLabelFields;\n    const colorPickerSchema = objOf(colorPickerFields);\n    const colorPickerDataProcessor = string;\n\n    const customEditorFields = formComponentFields.concat([\n        defaultedString('tag', 'textarea'),\n        requiredString('scriptId'),\n        requiredString('scriptUrl'),\n        optionFunction('onFocus'),\n        defaultedPostMsg('settings', undefined)\n    ]);\n    const customEditorFieldsOld = formComponentFields.concat([\n        defaultedString('tag', 'textarea'),\n        requiredFunction('init')\n    ]);\n    const customEditorSchema = valueOf((v) => asRaw('customeditor.old', objOfOnly(customEditorFieldsOld), v).orThunk(() => asRaw('customeditor.new', objOfOnly(customEditorFields), v)));\n    const customEditorDataProcessor = string;\n\n    const commonMenuItemFields = [\n        enabled,\n        optionalText,\n        optionalRole,\n        optionalShortcut,\n        generatedValue('menuitem'),\n        defaultedMeta,\n        defaultedString('context', 'mode:design')\n    ];\n\n    const dialogToggleMenuItemSchema = objOf([\n        type,\n        name\n    ].concat(commonMenuItemFields));\n    const dialogToggleMenuItemDataProcessor = boolean;\n\n    const baseFooterButtonFields = [\n        generatedName('button'),\n        optionalIcon,\n        defaultedStringEnum('align', 'end', ['start', 'end']),\n        // this should be removed, but must live here because FieldSchema doesn't have a way to manage deprecated fields\n        primary,\n        enabled,\n        // this should be defaulted to `secondary` but the implementation needs to manage the deprecation\n        optionStringEnum('buttonType', ['primary', 'secondary']),\n        defaultedString('context', 'mode:design')\n    ];\n    const dialogFooterButtonFields = [\n        ...baseFooterButtonFields,\n        text\n    ];\n    const normalFooterButtonFields = [\n        requiredStringEnum('type', ['submit', 'cancel', 'custom']),\n        ...dialogFooterButtonFields\n    ];\n    const menuFooterButtonFields = [\n        requiredStringEnum('type', ['menu']),\n        optionalText,\n        optionalTooltip,\n        optionalIcon,\n        requiredArrayOf('items', dialogToggleMenuItemSchema),\n        ...baseFooterButtonFields\n    ];\n    const toggleButtonSpecFields = [\n        ...baseFooterButtonFields,\n        requiredStringEnum('type', ['togglebutton']),\n        optionalTooltip,\n        optionalIcon,\n        optionalText,\n        defaultedBoolean('active', false)\n    ];\n    const dialogFooterButtonSchema = choose$1('type', {\n        submit: normalFooterButtonFields,\n        cancel: normalFooterButtonFields,\n        custom: normalFooterButtonFields,\n        menu: menuFooterButtonFields,\n        togglebutton: toggleButtonSpecFields\n    });\n\n    const dropZoneFields = formComponentWithLabelFields.concat([\n        defaultedString('context', 'mode:design'),\n        optionString('dropAreaLabel'),\n        optionString('buttonLabel'),\n        optionString('allowedFileTypes'),\n        optionArrayOf('allowedFileExtensions', string),\n        defaultedFunction('onInvalidFiles', () => Promise.resolve())\n    ]);\n    const dropZoneSchema = objOf(dropZoneFields);\n    const dropZoneDataProcessor = arrOfVal();\n\n    const createGridFields = (itemsField) => [\n        type,\n        requiredNumber('columns'),\n        itemsField\n    ];\n\n    const htmlPanelFields = [\n        type,\n        requiredString('html'),\n        defaultedStringEnum('presets', 'presentation', ['presentation', 'document']),\n        defaultedFunction('onInit', noop),\n        defaultedBoolean('stretched', false),\n    ];\n    const htmlPanelSchema = objOf(htmlPanelFields);\n\n    const iframeFields = formComponentWithLabelFields.concat([\n        defaultedBoolean('border', false),\n        defaultedBoolean('sandboxed', true),\n        defaultedBoolean('streamContent', false),\n        defaultedBoolean('transparent', true)\n    ]);\n    const iframeSchema = objOf(iframeFields);\n    const iframeDataProcessor = string;\n\n    const imagePreviewSchema = objOf(formComponentFields.concat([\n        optionString('height'),\n    ]));\n    const imagePreviewDataProcessor = objOf([\n        requiredString('url'),\n        optionNumber('zoom'),\n        optionNumber('cachedWidth'),\n        optionNumber('cachedHeight'),\n    ]);\n\n    const inputFields = formComponentWithLabelFields.concat([\n        optionString('inputMode'),\n        optionString('placeholder'),\n        defaultedBoolean('maximized', false),\n        enabled,\n        defaultedString('context', 'mode:design'),\n    ]);\n    const inputSchema = objOf(inputFields);\n    const inputDataProcessor = string;\n\n    const createLabelFields = (itemsField) => [\n        type,\n        label,\n        itemsField,\n        defaultedStringEnum('align', 'start', ['start', 'center', 'end']),\n        optionString('for')\n    ];\n\n    const listBoxSingleItemFields = [\n        text,\n        value\n    ];\n    const listBoxNestedItemFields = [\n        text,\n        requiredArrayOf('items', thunkOf('items', () => listBoxItemSchema))\n    ];\n    const listBoxItemSchema = oneOf([\n        objOf(listBoxSingleItemFields),\n        objOf(listBoxNestedItemFields)\n    ]);\n    const listBoxFields = formComponentWithLabelFields.concat([\n        requiredArrayOf('items', listBoxItemSchema),\n        enabled,\n        defaultedString('context', 'mode:design')\n    ]);\n    const listBoxSchema = objOf(listBoxFields);\n    const listBoxDataProcessor = string;\n\n    const selectBoxFields = formComponentWithLabelFields.concat([\n        requiredArrayOfObj('items', [\n            text,\n            value\n        ]),\n        defaultedNumber('size', 1),\n        enabled,\n        defaultedString('context', 'mode:design')\n    ]);\n    const selectBoxSchema = objOf(selectBoxFields);\n    const selectBoxDataProcessor = string;\n\n    const sizeInputFields = formComponentWithLabelFields.concat([\n        defaultedBoolean('constrain', true),\n        enabled,\n        defaultedString('context', 'mode:design')\n    ]);\n    const sizeInputSchema = objOf(sizeInputFields);\n    const sizeInputDataProcessor = objOf([\n        requiredString('width'),\n        requiredString('height')\n    ]);\n\n    const sliderFields = formComponentFields.concat([\n        label,\n        defaultedNumber('min', 0),\n        defaultedNumber('max', 0),\n    ]);\n    const sliderSchema = objOf(sliderFields);\n    const sliderInputDataProcessor = number;\n\n    const tableFields = [\n        type,\n        requiredArrayOf('header', string),\n        requiredArrayOf('cells', arrOf(string))\n    ];\n    const tableSchema = objOf(tableFields);\n\n    const textAreaFields = formComponentWithLabelFields.concat([\n        optionString('placeholder'),\n        defaultedBoolean('maximized', false),\n        enabled,\n        defaultedString('context', 'mode:design'),\n        optionBoolean('spellcheck'),\n    ]);\n    const textAreaSchema = objOf(textAreaFields);\n    const textAreaDataProcessor = string;\n\n    const baseMenuButtonFields = [\n        defaultedString('buttonType', 'default'),\n        optionString('text'),\n        optionString('tooltip'),\n        optionString('icon'),\n        defaultedOf('search', false, \n        // So our boulder validation are:\n        // a) boolean -> we need to map it into an Option\n        // b) object -> we need to map it into a Some\n        oneOf([\n            // Unfortunately, due to objOf not checking to see that the\n            // input is an object, the boolean check MUST be first\n            boolean,\n            objOf([\n                optionString('placeholder')\n            ])\n        ], \n        // This function allows you to standardise the output.\n        (x) => {\n            if (isBoolean(x)) {\n                return x ? Optional.some({ placeholder: Optional.none() }) : Optional.none();\n            }\n            else {\n                return Optional.some(x);\n            }\n        })),\n        requiredFunction('fetch'),\n        defaultedFunction('onSetup', () => noop),\n        defaultedString('context', 'mode:design')\n    ];\n\n    const MenuButtonSchema = objOf([\n        type,\n        ...baseMenuButtonFields\n    ]);\n    const createMenuButton = (spec) => asRaw('menubutton', MenuButtonSchema, spec);\n\n    const baseTreeItemFields = [\n        requiredStringEnum('type', ['directory', 'leaf']),\n        title,\n        requiredString('id'),\n        optionOf('menu', MenuButtonSchema),\n        optionString('customStateIcon'),\n        optionString('customStateIconTooltip'),\n    ];\n    const treeItemLeafFields = baseTreeItemFields;\n    const treeItemLeafSchema = objOf(treeItemLeafFields);\n    const treeItemDirectoryFields = baseTreeItemFields.concat([\n        requiredArrayOf('children', thunkOf('children', () => {\n            return choose$2('type', {\n                directory: treeItemDirectorySchema,\n                leaf: treeItemLeafSchema,\n            });\n        })),\n    ]);\n    const treeItemDirectorySchema = objOf(treeItemDirectoryFields);\n    const treeItemSchema = choose$2('type', {\n        directory: treeItemDirectorySchema,\n        leaf: treeItemLeafSchema,\n    });\n    const treeFields = [\n        type,\n        requiredArrayOf('items', treeItemSchema),\n        optionFunction('onLeafAction'),\n        optionFunction('onToggleExpand'),\n        defaultedArrayOf('defaultExpandedIds', [], string),\n        optionString('defaultSelectedId'),\n    ];\n    const treeSchema = objOf(treeFields);\n\n    const urlInputFields = formComponentWithLabelFields.concat([\n        defaultedStringEnum('filetype', 'file', ['image', 'media', 'file']),\n        enabled,\n        optionString('picker_text'),\n        defaultedString('context', 'mode:design')\n    ]);\n    const urlInputSchema = objOf(urlInputFields);\n    const urlInputDataProcessor = objOf([\n        value,\n        defaultedMeta\n    ]);\n\n    const createItemsField = (name) => field$1('items', 'items', required$2(), arrOf(valueOf((v) => asRaw(`Checking item of ${name}`, itemSchema$1, v).fold((sErr) => Result.error(formatError(sErr)), (passValue) => Result.value(passValue)))));\n    // We're using a thunk here so we can refer to panel fields\n    const itemSchema$1 = valueThunk(() => choose$2('type', {\n        alertbanner: alertBannerSchema,\n        bar: objOf(createBarFields(createItemsField('bar'))),\n        button: buttonSchema,\n        checkbox: checkboxSchema,\n        colorinput: colorInputSchema,\n        colorpicker: colorPickerSchema,\n        dropzone: dropZoneSchema,\n        grid: objOf(createGridFields(createItemsField('grid'))),\n        iframe: iframeSchema,\n        input: inputSchema,\n        listbox: listBoxSchema,\n        selectbox: selectBoxSchema,\n        sizeinput: sizeInputSchema,\n        slider: sliderSchema,\n        textarea: textAreaSchema,\n        urlinput: urlInputSchema,\n        customeditor: customEditorSchema,\n        htmlpanel: htmlPanelSchema,\n        imagepreview: imagePreviewSchema,\n        collection: collectionSchema,\n        label: objOf(createLabelFields(createItemsField('label'))),\n        table: tableSchema,\n        tree: treeSchema,\n        panel: panelSchema\n    }));\n    const panelFields = [\n        type,\n        defaulted('classes', []),\n        requiredArrayOf('items', itemSchema$1)\n    ];\n    const panelSchema = objOf(panelFields);\n\n    const tabFields = [\n        generatedName('tab'),\n        title,\n        requiredArrayOf('items', itemSchema$1)\n    ];\n    const tabPanelFields = [\n        type,\n        requiredArrayOfObj('tabs', tabFields),\n        defaultedBoolean('dynamicHeight', false)\n    ];\n    const tabPanelSchema = objOf(tabPanelFields);\n\n    const dialogButtonFields = dialogFooterButtonFields;\n    const dialogButtonSchema = dialogFooterButtonSchema;\n    const dialogSchema = objOf([\n        requiredString('title'),\n        requiredOf('body', choose$2('type', {\n            panel: panelSchema,\n            tabpanel: tabPanelSchema\n        })),\n        defaultedString('size', 'normal'),\n        defaultedArrayOf('buttons', [], dialogButtonSchema),\n        defaulted('initialData', {}),\n        defaultedFunction('onAction', noop),\n        defaultedFunction('onChange', noop),\n        defaultedFunction('onSubmit', noop),\n        defaultedFunction('onClose', noop),\n        defaultedFunction('onCancel', noop),\n        defaultedFunction('onTabChange', noop)\n    ]);\n    const createDialog = (spec) => asRaw('dialog', dialogSchema, spec);\n\n    const urlDialogButtonSchema = objOf([\n        requiredStringEnum('type', ['cancel', 'custom']),\n        ...dialogButtonFields\n    ]);\n    const urlDialogSchema = objOf([\n        requiredString('title'),\n        requiredString('url'),\n        optionNumber('height'),\n        optionNumber('width'),\n        optionArrayOf('buttons', urlDialogButtonSchema),\n        defaultedFunction('onAction', noop),\n        defaultedFunction('onCancel', noop),\n        defaultedFunction('onClose', noop),\n        defaultedFunction('onMessage', noop)\n    ]);\n    const createUrlDialog = (spec) => asRaw('dialog', urlDialogSchema, spec);\n\n    // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types\n    const getAllObjects = (obj) => {\n        if (isObject(obj)) {\n            return [obj].concat(bind$3(values(obj), getAllObjects));\n        }\n        else if (isArray(obj)) {\n            return bind$3(obj, getAllObjects);\n        }\n        else {\n            return [];\n        }\n    };\n\n    const isNamedItem = (obj) => isString(obj.type) && isString(obj.name);\n    const dataProcessors = {\n        checkbox: checkboxDataProcessor,\n        colorinput: colorInputDataProcessor,\n        colorpicker: colorPickerDataProcessor,\n        dropzone: dropZoneDataProcessor,\n        input: inputDataProcessor,\n        iframe: iframeDataProcessor,\n        imagepreview: imagePreviewDataProcessor,\n        selectbox: selectBoxDataProcessor,\n        sizeinput: sizeInputDataProcessor,\n        slider: sliderInputDataProcessor,\n        listbox: listBoxDataProcessor,\n        size: sizeInputDataProcessor,\n        textarea: textAreaDataProcessor,\n        urlinput: urlInputDataProcessor,\n        customeditor: customEditorDataProcessor,\n        collection: collectionDataProcessor,\n        togglemenuitem: dialogToggleMenuItemDataProcessor\n    };\n    const getDataProcessor = (item) => Optional.from(dataProcessors[item.type]);\n    const getNamedItems = (structure) => filter$2(getAllObjects(structure), isNamedItem);\n\n    const createDataValidator = (structure) => {\n        const namedItems = getNamedItems(structure);\n        const fields = bind$3(namedItems, (item) => getDataProcessor(item).fold(() => [], (schema) => [requiredOf(item.name, schema)]));\n        return objOf(fields);\n    };\n\n    const extract = (structure) => {\n        const internalDialog = getOrDie(createDialog(structure));\n        const dataValidator = createDataValidator(structure);\n        // We used to validate data here, but it's done when loading the dialog in tinymce\n        const initialData = structure.initialData ?? {};\n        return {\n            internalDialog,\n            dataValidator,\n            initialData\n        };\n    };\n    const DialogManager = {\n        open: (factory, structure) => {\n            const extraction = extract(structure);\n            return factory(extraction.internalDialog, extraction.initialData, extraction.dataValidator);\n        },\n        openUrl: (factory, structure) => {\n            const internalDialog = getOrDie(createUrlDialog(structure));\n            return factory(internalDialog);\n        },\n        redial: (structure) => extract(structure)\n    };\n\n    const separatorMenuItemSchema = objOf([\n        type,\n        optionalText\n    ]);\n    const createSeparatorMenuItem = (spec) => asRaw('separatormenuitem', separatorMenuItemSchema, spec);\n\n    const autocompleterItemSchema = objOf([\n        // Currently, autocomplete items don't support configuring type, active, disabled, meta\n        defaultedType('autocompleteitem'),\n        active,\n        enabled,\n        defaultedMeta,\n        value,\n        optionalText,\n        optionalIcon\n    ]);\n    objOf([\n        type,\n        requiredString('trigger'),\n        defaultedNumber('minChars', 1),\n        defaultedColumns(1),\n        defaultedNumber('maxResults', 10),\n        optionFunction('matches'),\n        fetch,\n        onAction,\n        defaultedArrayOf('highlightOn', [], string)\n    ]);\n    const createSeparatorItem = (spec) => asRaw('Autocompleter.Separator', separatorMenuItemSchema, spec);\n    const createAutocompleterItem = (spec) => asRaw('Autocompleter.Item', autocompleterItemSchema, spec);\n\n    const baseToolbarButtonFields = [\n        enabled,\n        optionalTooltip,\n        optionalIcon,\n        optionalText,\n        onSetup,\n        defaultedString('context', 'mode:design')\n    ];\n    const toolbarButtonSchema = objOf([\n        type,\n        onAction,\n        optionalShortcut\n    ].concat(baseToolbarButtonFields));\n    const createToolbarButton = (spec) => asRaw('toolbarbutton', toolbarButtonSchema, spec);\n\n    const baseToolbarToggleButtonFields = [\n        active\n    ].concat(baseToolbarButtonFields);\n    const toggleButtonSchema = objOf(baseToolbarToggleButtonFields.concat([\n        type,\n        onAction,\n        optionalShortcut\n    ]));\n    const createToggleButton = (spec) => asRaw('ToggleButton', toggleButtonSchema, spec);\n\n    const contextBarFields = [\n        defaultedFunction('predicate', never),\n        defaultedStringEnum('scope', 'node', ['node', 'editor']),\n        defaultedStringEnum('position', 'selection', ['node', 'selection', 'line'])\n    ];\n\n    const contextButtonFields = baseToolbarButtonFields.concat([\n        defaultedType('contextformbutton'),\n        defaultedString('align', 'end'),\n        primary,\n        onAction,\n        customField('original', identity)\n    ]);\n    const contextToggleButtonFields = baseToolbarToggleButtonFields.concat([\n        defaultedType('contextformbutton'),\n        defaultedString('align', 'end'),\n        primary,\n        onAction,\n        customField('original', identity)\n    ]);\n    const launchButtonFields$1 = baseToolbarButtonFields.concat([\n        defaultedType('contextformbutton')\n    ]);\n    const launchToggleButtonFields = baseToolbarToggleButtonFields.concat([\n        defaultedType('contextformtogglebutton')\n    ]);\n    const toggleOrNormal = choose$1('type', {\n        contextformbutton: contextButtonFields,\n        contextformtogglebutton: contextToggleButtonFields\n    });\n    const baseContextFormFields = [\n        optionalLabel,\n        requiredArrayOf('commands', toggleOrNormal),\n        optionOf('launch', choose$1('type', {\n            contextformbutton: launchButtonFields$1,\n            contextformtogglebutton: launchToggleButtonFields\n        })),\n        defaultedFunction('onInput', noop),\n        defaultedFunction('onSetup', noop)\n    ];\n    const contextFormFields = [\n        ...contextBarFields,\n        ...baseContextFormFields,\n        requiredStringEnum('type', ['contextform']),\n        defaultedFunction('initValue', constant$1('')),\n        optionString('placeholder'),\n    ];\n    const contextSliderFormFields = [\n        ...contextBarFields,\n        ...baseContextFormFields,\n        requiredStringEnum('type', ['contextsliderform']),\n        defaultedFunction('initValue', constant$1(0)),\n        defaultedFunction('min', constant$1(0)),\n        defaultedFunction('max', constant$1(100))\n    ];\n    const contextSizeInputFormFields = [\n        ...contextBarFields,\n        ...baseContextFormFields,\n        requiredStringEnum('type', ['contextsizeinputform']),\n        defaultedFunction('initValue', constant$1({ width: '', height: '' }))\n    ];\n    const contextFormSchema = choose$1('type', {\n        contextform: contextFormFields,\n        contextsliderform: contextSliderFormFields,\n        contextsizeinputform: contextSizeInputFormFields\n    });\n    const createContextForm = (spec) => asRaw('ContextForm', contextFormSchema, spec);\n\n    const launchButtonFields = baseToolbarButtonFields.concat([\n        defaultedType('contexttoolbarbutton')\n    ]);\n    const contextToolbarSchema = objOf([\n        defaultedType('contexttoolbar'),\n        optionObjOf('launch', launchButtonFields),\n        requiredOf('items', oneOf([\n            string,\n            arrOfObj([\n                optionString('name'),\n                optionString('label'),\n                requiredArrayOf('items', string)\n            ])\n        ])),\n    ].concat(contextBarFields));\n    const toolbarGroupBackToSpec = (toolbarGroup) => ({\n        name: toolbarGroup.name.getOrUndefined(),\n        label: toolbarGroup.label.getOrUndefined(),\n        items: toolbarGroup.items\n    });\n    const contextToolbarToSpec = (contextToolbar) => ({\n        ...contextToolbar,\n        launch: contextToolbar.launch.getOrUndefined(),\n        items: isString(contextToolbar.items) ? contextToolbar.items : map$2(contextToolbar.items, toolbarGroupBackToSpec)\n    });\n    const createContextToolbar = (spec) => asRaw('ContextToolbar', contextToolbarSchema, spec);\n\n    const cardImageFields = [\n        type,\n        requiredString('src'),\n        optionString('alt'),\n        defaultedArrayOf('classes', [], string)\n    ];\n    const cardImageSchema = objOf(cardImageFields);\n\n    const cardTextFields = [\n        type,\n        text,\n        optionalName,\n        defaultedArrayOf('classes', ['tox-collection__item-label'], string)\n    ];\n    const cardTextSchema = objOf(cardTextFields);\n\n    const itemSchema = valueThunk(() => choose$2('type', {\n        cardimage: cardImageSchema,\n        cardtext: cardTextSchema,\n        cardcontainer: cardContainerSchema\n    }));\n    const cardContainerSchema = objOf([\n        type,\n        defaultedString('direction', 'horizontal'),\n        defaultedString('align', 'left'),\n        defaultedString('valign', 'middle'),\n        requiredArrayOf('items', itemSchema)\n    ]);\n\n    const cardMenuItemSchema = objOf([\n        type,\n        optionalLabel,\n        requiredArrayOf('items', itemSchema),\n        onSetup,\n        defaultedOnAction\n    ].concat(commonMenuItemFields));\n    const createCardMenuItem = (spec) => asRaw('cardmenuitem', cardMenuItemSchema, spec);\n\n    const choiceMenuItemSchema = objOf([\n        type,\n        active,\n        optionalIcon,\n        optionalLabel\n    ].concat(commonMenuItemFields));\n    const createChoiceMenuItem = (spec) => asRaw('choicemenuitem', choiceMenuItemSchema, spec);\n\n    const baseFields = [\n        type,\n        requiredString('fancytype'),\n        defaultedOnAction\n    ];\n    const insertTableFields = [\n        defaulted('initData', {})\n    ].concat(baseFields);\n    const colorSwatchFields = [\n        optionFunction('select'),\n        defaultedObjOf('initData', {}, [\n            defaultedBoolean('allowCustomColors', true),\n            defaultedString('storageKey', 'default'),\n            // Note: We don't validate the colors as they are instead validated by choiceschema when rendering\n            optionArrayOf('colors', anyValue())\n        ])\n    ].concat(baseFields);\n    const imageSelectFields = [\n        optionFunction('select'),\n        requiredObjOf('initData', [\n            requiredNumber('columns'),\n            // Note: We don't validate the items as they are instead validated by imageMenuItemSchema when rendering\n            defaultedArrayOf('items', [], anyValue())\n        ])\n    ].concat(baseFields);\n    const fancyMenuItemSchema = choose$1('fancytype', {\n        inserttable: insertTableFields,\n        colorswatch: colorSwatchFields,\n        imageselect: imageSelectFields\n    });\n    const createFancyMenuItem = (spec) => asRaw('fancymenuitem', fancyMenuItemSchema, spec);\n\n    const imageMenuItemSchema = objOf([\n        type,\n        active,\n        url,\n        optionalLabel,\n        optionalTooltip\n    ].concat(commonMenuItemFields));\n    const resetImageItemSchema = objOf([\n        type,\n        active,\n        icon,\n        label,\n        optionalTooltip,\n        value\n    ].concat(commonMenuItemFields));\n    const createImageMenuItem = (spec) => asRaw('imagemenuitem', imageMenuItemSchema, spec);\n    const createResetImageItem = (spec) => asRaw('resetimageitem', resetImageItemSchema, spec);\n\n    const menuItemSchema = objOf([\n        type,\n        onSetup,\n        defaultedOnAction,\n        optionalIcon\n    ].concat(commonMenuItemFields));\n    const createMenuItem = (spec) => asRaw('menuitem', menuItemSchema, spec);\n\n    const nestedMenuItemSchema = objOf([\n        type,\n        getSubmenuItems,\n        onSetup,\n        optionalIcon\n    ].concat(commonMenuItemFields));\n    const createNestedMenuItem = (spec) => asRaw('nestedmenuitem', nestedMenuItemSchema, spec);\n\n    const toggleMenuItemSchema = objOf([\n        type,\n        optionalIcon,\n        active,\n        onSetup,\n        onAction\n    ].concat(commonMenuItemFields));\n    const createToggleMenuItem = (spec) => asRaw('togglemenuitem', toggleMenuItemSchema, spec);\n\n    const sidebarSchema = objOf([\n        optionalIcon,\n        optionalTooltip,\n        defaultedBoolean('resizable', false),\n        defaultedFunction('onShow', noop),\n        defaultedFunction('onHide', noop),\n        onSetup\n    ]);\n    const createSidebar = (spec) => asRaw('sidebar', sidebarSchema, spec);\n\n    const groupToolbarButtonSchema = objOf([\n        type,\n        requiredOf('items', oneOf([\n            arrOfObj([\n                name,\n                requiredArrayOf('items', string)\n            ]),\n            string\n        ]))\n    ].concat(baseToolbarButtonFields));\n    const createGroupToolbarButton = (spec) => asRaw('GroupToolbarButton', groupToolbarButtonSchema, spec);\n\n    const splitButtonSchema = objOf([\n        type,\n        optionalTooltip,\n        optionalChevronTooltip,\n        optionalIcon,\n        optionalText,\n        optionalSelect,\n        fetch,\n        onSetup,\n        // TODO: Validate the allowed presets\n        defaultedStringEnum('presets', 'normal', ['normal', 'color', 'listpreview']),\n        defaultedColumns(1),\n        onAction,\n        onItemAction,\n        defaultedString('context', 'mode:design')\n    ]);\n    const createSplitButton = (spec) => asRaw('SplitButton', splitButtonSchema, spec);\n\n    const baseButtonFields = [\n        optionalText,\n        optionalIcon,\n        optionString('tooltip'),\n        defaultedStringEnum('buttonType', 'secondary', ['primary', 'secondary']),\n        defaultedBoolean('borderless', false),\n        requiredFunction('onAction'),\n        defaultedString('context', 'mode:design')\n    ];\n    const normalButtonFields = [\n        ...baseButtonFields,\n        text,\n        requiredStringEnum('type', ['button']),\n    ];\n    const toggleButtonFields = [\n        ...baseButtonFields,\n        defaultedBoolean('active', false),\n        requiredStringEnum('type', ['togglebutton'])\n    ];\n    const schemaWithoutGroupButton = {\n        button: normalButtonFields,\n        togglebutton: toggleButtonFields,\n    };\n    const groupFields = [\n        requiredStringEnum('type', ['group']),\n        defaultedArrayOf('buttons', [], choose$1('type', schemaWithoutGroupButton))\n    ];\n    const viewButtonSchema = choose$1('type', {\n        ...schemaWithoutGroupButton,\n        group: groupFields\n    });\n\n    const viewSchema = objOf([\n        defaultedArrayOf('buttons', [], viewButtonSchema),\n        defaultedBoolean('keepToolbar', false),\n        requiredFunction('onShow'),\n        requiredFunction('onHide')\n    ]);\n    const createView = (spec) => asRaw('view', viewSchema, spec);\n\n    const detectSize = (comp, margin, selectorClass) => {\n        const descendants$1 = descendants(comp.element, '.' + selectorClass);\n        // TODO: This seems to cause performance issues in the emoji dialog\n        if (descendants$1.length > 0) {\n            const columnLength = findIndex$1(descendants$1, (c) => {\n                const thisTop = c.dom.getBoundingClientRect().top;\n                const cTop = descendants$1[0].dom.getBoundingClientRect().top;\n                return Math.abs(thisTop - cTop) > margin;\n            }).getOr(descendants$1.length);\n            return Optional.some({\n                numColumns: columnLength,\n                numRows: Math.ceil(descendants$1.length / columnLength)\n            });\n        }\n        else {\n            return Optional.none();\n        }\n    };\n\n    // Consider moving to alloy once it takes shape.\n    const namedEvents = (name, handlers) => derive$1([\n        config(name, handlers)\n    ]);\n    const unnamedEvents = (handlers) => namedEvents(generate$6('unnamed-events'), handlers);\n    const SimpleBehaviours = {\n        namedEvents,\n        unnamedEvents\n    };\n\n    const item = (disabled) => Disabling.config({\n        disabled,\n        disableClass: 'tox-collection__item--state-disabled'\n    });\n    const button = (disabled) => Disabling.config({\n        disabled\n    });\n    const splitButton = (disabled) => Disabling.config({\n        disabled,\n        disableClass: 'tox-tbtn--disabled'\n    });\n    const toolbarButton = (disabled) => Disabling.config({\n        disabled,\n        disableClass: 'tox-tbtn--disabled',\n        useNative: false\n    });\n    const DisablingConfigs = {\n        item,\n        button,\n        splitButton,\n        toolbarButton\n    };\n\n    const runWithApi = (info, comp) => {\n        const api = info.getApi(comp);\n        return (f) => {\n            f(api);\n        };\n    };\n    // These handlers are used for providing common onAttached and onDetached handlers.\n    // Essentially, the `editorOffCell` is used store the onDestroy function returned\n    // by onSetup. The reason onControlAttached doesn't create the cell itself, is because\n    // it also has to be passed into onControlDetached. We could make this function return\n    // the cell and the onAttachedHandler, but that would provide too much complexity.\n    const onControlAttached = (info, editorOffCell) => runOnAttached((comp) => {\n        if (isFunction(info.onBeforeSetup)) {\n            info.onBeforeSetup(comp);\n        }\n        const run = runWithApi(info, comp);\n        run((api) => {\n            const onDestroy = info.onSetup(api);\n            if (isFunction(onDestroy)) {\n                editorOffCell.set(onDestroy);\n            }\n        });\n    });\n    const onControlDetached = (getApi, editorOffCell) => runOnDetached((comp) => runWithApi(getApi, comp)(editorOffCell.get()));\n    const onContextFormControlDetached = (getApi, editorOffCell, valueState) => runOnDetached((comp) => {\n        valueState.set(Representing.getValue(comp));\n        return runWithApi(getApi, comp)(editorOffCell.get());\n    });\n\n    const UiStateChannel = 'silver.uistate';\n    const messageSetDisabled = 'setDisabled';\n    const messageSetEnabled = 'setEnabled';\n    const messageInit = 'init';\n    const messageSwitchMode = 'switchmode';\n    const modeContextMessages = [messageSwitchMode, messageInit];\n    const broadcastEvents = (uiRefs, messageType) => {\n        const outerContainer = uiRefs.mainUi.outerContainer;\n        const motherships = [uiRefs.mainUi.mothership, ...uiRefs.uiMotherships];\n        if (messageType === messageSetDisabled) {\n            each$1(motherships, (m) => {\n                m.broadcastOn([dismissPopups()], { target: outerContainer.element });\n            });\n        }\n        each$1(motherships, (m) => {\n            m.broadcastOn([UiStateChannel], messageType);\n        });\n    };\n    const setupEventsForUi = (editor, uiRefs) => {\n        editor.on('init SwitchMode', (event) => {\n            broadcastEvents(uiRefs, event.type);\n        });\n        editor.on('DisabledStateChange', (event) => {\n            if (!event.isDefaultPrevented()) {\n                // When the event state indicates the editor is **enabled** (`event.state` is false),\n                // we send an 'init' message instead of 'setEnabled' because the editor might be in read-only mode.\n                // Sending 'setEnabled' would enable all the toolbar buttons, which is undesirable if the editor is read-only.\n                const messageType = event.state ? messageSetDisabled : messageInit;\n                broadcastEvents(uiRefs, messageType);\n                // After refreshing the state of the buttons, trigger a NodeChange event.\n                if (!event.state) {\n                    editor.nodeChanged();\n                }\n            }\n        });\n        editor.on('NodeChange', (e) => {\n            const messageType = editor.ui.isEnabled() ? e.type : messageSetDisabled;\n            broadcastEvents(uiRefs, messageType);\n        });\n        if (isReadOnly(editor)) {\n            editor.mode.set('readonly');\n        }\n    };\n    const toggleOnReceive = (getContext) => Receiving.config({\n        channels: {\n            [UiStateChannel]: {\n                onReceive: (comp, messageType) => {\n                    if (messageType === messageSetDisabled || messageType === messageSetEnabled) {\n                        Disabling.set(comp, messageType === messageSetDisabled);\n                        return;\n                    }\n                    const { contextType, shouldDisable } = getContext();\n                    if (contextType === 'mode' && !contains$2(modeContextMessages, messageType)) {\n                        return;\n                    }\n                    Disabling.set(comp, shouldDisable);\n                }\n            }\n        }\n    });\n\n    // Perform `action` when an item is clicked on, close menus, and stop event\n    const onMenuItemExecute = (info, itemResponse) => runOnExecute$1((comp, simulatedEvent) => {\n        // If there is an action, run the action\n        runWithApi(info, comp)(info.onAction);\n        if (!info.triggersSubmenu && itemResponse === ItemResponse$1.CLOSE_ON_EXECUTE) {\n            if (comp.getSystem().isConnected()) {\n                emit(comp, sandboxClose());\n            }\n            simulatedEvent.stop();\n        }\n    });\n    const menuItemEventOrder = {\n        // TODO: use the constants provided by behaviours.\n        [execute$5()]: ['disabling', 'alloy.base.behaviour', 'toggling', 'item-events']\n    };\n\n    const componentRenderPipeline = cat;\n    const renderCommonItem = (spec, structure, itemResponse, providersBackstage) => {\n        const editorOffCell = Cell(noop);\n        return {\n            type: 'item',\n            dom: structure.dom,\n            components: componentRenderPipeline(structure.optComponents),\n            data: spec.data,\n            eventOrder: menuItemEventOrder,\n            hasSubmenu: spec.triggersSubmenu,\n            itemBehaviours: derive$1([\n                config('item-events', [\n                    onMenuItemExecute(spec, itemResponse),\n                    onControlAttached(spec, editorOffCell),\n                    onControlDetached(spec, editorOffCell)\n                ]),\n                DisablingConfigs.item(() => !spec.enabled || providersBackstage.checkUiComponentContext(spec.context).shouldDisable),\n                toggleOnReceive(() => providersBackstage.checkUiComponentContext(spec.context)),\n                Replacing.config({})\n            ].concat(spec.itemBehaviours))\n        };\n    };\n    const buildData = (source) => ({\n        value: source.value,\n        meta: {\n            text: source.text.getOr(''),\n            ...source.meta\n        }\n    });\n\n    const renderImage$1 = (spec, imageUrl) => {\n        const spinnerElement = SugarElement.fromTag('div');\n        add$2(spinnerElement, 'tox-image-selector-loading-spinner');\n        const addSpinnerElement = (loadingElement) => {\n            add$2(loadingElement, 'tox-image-selector-loading-spinner-wrapper');\n            append$2(loadingElement, spinnerElement);\n        };\n        const removeSpinnerElement = (loadingElement) => {\n            remove$3(loadingElement, 'tox-image-selector-loading-spinner-wrapper');\n            remove$7(spinnerElement);\n        };\n        return {\n            dom: {\n                tag: spec.tag,\n                attributes: spec.attributes ?? {},\n                classes: spec.classes,\n            },\n            components: [\n                {\n                    dom: {\n                        tag: 'div',\n                        classes: ['tox-image-selector-image-wrapper']\n                    },\n                    components: [\n                        {\n                            dom: {\n                                tag: 'img',\n                                attributes: { src: imageUrl },\n                                classes: ['tox-image-selector-image-img']\n                            }\n                        },\n                    ]\n                },\n                ...spec.checkMark.toArray()\n            ],\n            behaviours: derive$1([\n                ...spec.behaviours ?? [],\n                config('render-image-events', [\n                    runOnAttached((component) => {\n                        addSpinnerElement(component.element);\n                        descendant(component.element, 'img').each((image$1) => {\n                            image(image$1).catch((e) => {\n                                // eslint-disable-next-line no-console\n                                console.error(e);\n                            }).finally(() => {\n                                removeSpinnerElement(component.element);\n                            });\n                        });\n                    })\n                ]),\n            ])\n        };\n    };\n    const render$3 = (imageUrl, spec) => renderImage$1(spec, imageUrl);\n\n    // Converts shortcut format to Mac/PC variants\n    // Note: This is different to the help shortcut converter, as it doesn't padd the + symbol with spaces\n    //       so as to not take up large amounts of space in the menus\n    const convertText = (source) => {\n        const isMac = global$7.os.isMacOS() || global$7.os.isiOS();\n        const mac = {\n            alt: '\\u2325',\n            ctrl: '\\u2303',\n            shift: '\\u21E7',\n            meta: '\\u2318',\n            access: '\\u2303\\u2325'\n        };\n        const other = {\n            meta: 'Ctrl',\n            access: 'Shift+Alt'\n        };\n        const replace = isMac ? mac : other;\n        const shortcut = source.split('+');\n        const updated = map$2(shortcut, (segment) => {\n            // search lowercase, but if not found use the original\n            const search = segment.toLowerCase().trim();\n            return has$2(replace, search) ? replace[search] : segment;\n        });\n        return isMac ? updated.join('') : updated.join('+');\n    };\n\n    const renderIcon$2 = (name, icons, classes = [iconClass]) => render$4(name, { tag: 'div', classes }, icons);\n    const renderText = (text) => ({\n        dom: {\n            tag: 'div',\n            classes: [textClass]\n        },\n        components: [text$2(global$6.translate(text))]\n    });\n    const renderHtml = (html, classes) => ({\n        dom: {\n            tag: 'div',\n            classes,\n            innerHtml: html\n        }\n    });\n    const renderStyledText = (style, text) => ({\n        dom: {\n            tag: 'div',\n            classes: [textClass]\n        },\n        components: [\n            {\n                dom: {\n                    tag: style.tag,\n                    styles: style.styles\n                },\n                components: [text$2(global$6.translate(text))]\n            }\n        ]\n    });\n    const renderShortcut = (shortcut) => ({\n        dom: {\n            tag: 'div',\n            classes: [accessoryClass]\n        },\n        components: [\n            text$2(convertText(shortcut))\n        ]\n    });\n    const renderCheckmark = (icons) => renderIcon$2('checkmark', icons, [checkmarkClass]);\n    const renderSubmenuCaret = (icons) => renderIcon$2('chevron-right', icons, [caretClass]);\n    const renderDownwardsCaret = (icons) => renderIcon$2('chevron-down', icons, [caretClass]);\n    const renderContainer = (container, components) => {\n        const directionClass = container.direction === 'vertical' ? containerColumnClass : containerRowClass;\n        const alignClass = container.align === 'left' ? containerAlignLeftClass : containerAlignRightClass;\n        const getValignClass = () => {\n            switch (container.valign) {\n                case 'top':\n                    return containerValignTopClass;\n                case 'middle':\n                    return containerValignMiddleClass;\n                case 'bottom':\n                    return containerValignBottomClass;\n            }\n        };\n        return {\n            dom: {\n                tag: 'div',\n                classes: [\n                    containerClass,\n                    directionClass,\n                    alignClass,\n                    getValignClass()\n                ]\n            },\n            components\n        };\n    };\n    const renderImage = (src, classes, alt) => ({\n        dom: {\n            tag: 'img',\n            classes,\n            attributes: {\n                src,\n                alt: alt.getOr('')\n            }\n        }\n    });\n\n    const renderColorStructure = (item, providerBackstage, fallbackIcon) => {\n        const colorPickerCommand = 'custom';\n        const removeColorCommand = 'remove';\n        const itemValue = item.value;\n        const iconSvg = item.iconContent.map((name) => getOr(name, providerBackstage.icons, fallbackIcon));\n        const attributes = item.ariaLabel.map((al) => ({\n            'aria-label': providerBackstage.translate(al),\n            'data-mce-name': al\n        })).getOr({});\n        const getDom = () => {\n            const common = colorClass;\n            const icon = iconSvg.getOr('');\n            const baseDom = {\n                tag: 'div',\n                attributes,\n                classes: [common]\n            };\n            if (itemValue === colorPickerCommand) {\n                return {\n                    ...baseDom,\n                    tag: 'button',\n                    classes: [...baseDom.classes, 'tox-swatches__picker-btn'],\n                    innerHtml: icon\n                };\n            }\n            else if (itemValue === removeColorCommand) {\n                return {\n                    ...baseDom,\n                    classes: [...baseDom.classes, 'tox-swatch--remove'],\n                    innerHtml: icon\n                };\n            }\n            else if (isNonNullable(itemValue)) {\n                return {\n                    ...baseDom,\n                    attributes: {\n                        ...baseDom.attributes,\n                        'data-mce-color': itemValue\n                    },\n                    styles: {\n                        'background-color': itemValue\n                    },\n                    innerHtml: icon\n                };\n            }\n            else {\n                return baseDom;\n            }\n        };\n        return {\n            dom: getDom(),\n            optComponents: []\n        };\n    };\n    const renderItemDomStructure = (ariaLabel, classes) => {\n        const domTitle = ariaLabel.map((label) => ({\n            attributes: {\n                'id': generate$6('menu-item'),\n                'aria-label': global$6.translate(label)\n            }\n        })).getOr({});\n        return {\n            tag: 'div',\n            classes: [navClass, selectableClass].concat(classes),\n            ...domTitle\n        };\n    };\n    const createLabel = (label) => {\n        return {\n            dom: {\n                tag: 'label'\n            },\n            components: [\n                text$2(label)\n            ]\n        };\n    };\n    const renderNormalItemStructure = (info, providersBackstage, renderIcons, fallbackIcon) => {\n        // TODO: TINY-3036 Work out a better way of dealing with custom icons\n        const iconSpec = { tag: 'div', classes: [iconClass] };\n        const renderIcon = (iconName) => render$4(iconName, iconSpec, providersBackstage.icons, fallbackIcon);\n        const renderEmptyIcon = () => Optional.some({ dom: iconSpec });\n        // Note: renderIcons indicates if any icons are present in the menu - if false then the icon column will not be present for the whole menu\n        const leftIcon = renderIcons ? info.iconContent.map(renderIcon).orThunk(renderEmptyIcon) : Optional.none();\n        // TINY-3345: Dedicated columns for icon and checkmark if applicable\n        const checkmark = info.checkMark;\n        // Style items and autocompleter both have meta. Need to branch on style\n        // This could probably be more stable...\n        const textRender = Optional.from(info.meta).fold(() => renderText, (meta) => has$2(meta, 'style') ? curry(renderStyledText, meta.style) : renderText);\n        const content = info.htmlContent.fold(() => info.textContent.map(textRender), (html) => Optional.some(renderHtml(html, [textClass])));\n        const menuItem = {\n            dom: renderItemDomStructure(info.ariaLabel, []),\n            optComponents: [\n                leftIcon,\n                content,\n                info.shortcutContent.map(renderShortcut),\n                checkmark,\n                info.caret,\n                info.labelContent.map(createLabel)\n            ]\n        };\n        return menuItem;\n    };\n    const renderImgItemStructure = (info) => {\n        const menuItem = {\n            dom: renderItemDomStructure(info.ariaLabel, [imageSelectorClasll]),\n            optComponents: [\n                Optional.some(render$3(info.iconContent.getOrDie(), { tag: 'div', classes: [imageClass], checkMark: info.checkMark })),\n                info.labelContent.map(createLabel)\n            ]\n        };\n        return menuItem;\n    };\n    // TODO: Maybe need aria-label\n    const renderItemStructure = (info, providersBackstage, renderIcons, fallbackIcon = Optional.none()) => {\n        if (info.presets === 'color') {\n            return renderColorStructure(info, providersBackstage, fallbackIcon);\n        }\n        else if (info.presets === 'img') {\n            return renderImgItemStructure(info);\n        }\n        else {\n            return renderNormalItemStructure(info, providersBackstage, renderIcons, fallbackIcon);\n        }\n    };\n\n    // Use meta to pass through special information about the tooltip\n    // (yes this is horrible but it is not yet public API)\n    const tooltipBehaviour = (meta, sharedBackstage, tooltipText) => get$h(meta, 'tooltipWorker')\n        .map((tooltipWorker) => [\n        Tooltipping.config({\n            lazySink: sharedBackstage.getSink,\n            tooltipDom: {\n                tag: 'div',\n                classes: ['tox-tooltip-worker-container']\n            },\n            tooltipComponents: [],\n            anchor: (comp) => ({\n                type: 'submenu',\n                item: comp,\n                overrides: {\n                    // NOTE: this avoids it setting overflow and max-height.\n                    maxHeightFunction: expandable$1\n                }\n            }),\n            mode: 'follow-highlight',\n            onShow: (component, _tooltip) => {\n                tooltipWorker((elm) => {\n                    Tooltipping.setComponents(component, [\n                        external({ element: SugarElement.fromDom(elm) })\n                    ]);\n                });\n            }\n        })\n    ])\n        .getOrThunk(() => {\n        return tooltipText.map((text) => [\n            Tooltipping.config({\n                ...sharedBackstage.providers.tooltips.getConfig({\n                    tooltipText: text\n                }),\n                mode: 'follow-highlight'\n            })\n        ]).getOr([]);\n    });\n    const encodeText = (text) => global$9.DOM.encode(text);\n    const replaceText = (text, matchText) => {\n        const translated = global$6.translate(text);\n        const encoded = encodeText(translated);\n        if (matchText.length > 0) {\n            const escapedMatchRegex = new RegExp(escape(matchText), 'gi');\n            return encoded.replace(escapedMatchRegex, (match) => `<span class=\"tox-autocompleter-highlight\">${match}</span>`);\n        }\n        else {\n            return encoded;\n        }\n    };\n    const renderAutocompleteItem = (spec, matchText, useText, presets, onItemValueHandler, itemResponse, sharedBackstage, renderIcons = true) => {\n        const structure = renderItemStructure({\n            presets,\n            textContent: Optional.none(),\n            htmlContent: useText ? spec.text.map((text) => replaceText(text, matchText)) : Optional.none(),\n            ariaLabel: spec.text,\n            labelContent: Optional.none(),\n            iconContent: spec.icon,\n            shortcutContent: Optional.none(),\n            checkMark: Optional.none(),\n            caret: Optional.none(),\n            value: spec.value\n        }, sharedBackstage.providers, renderIcons, spec.icon);\n        const tooltipString = spec.text.filter((text) => !useText && text !== '');\n        return renderCommonItem({\n            context: 'mode:design',\n            data: buildData(spec),\n            enabled: spec.enabled,\n            getApi: constant$1({}),\n            onAction: (_api) => onItemValueHandler(spec.value, spec.meta),\n            onSetup: constant$1(noop),\n            triggersSubmenu: false,\n            itemBehaviours: tooltipBehaviour(spec, sharedBackstage, tooltipString)\n        }, structure, itemResponse, sharedBackstage.providers);\n    };\n\n    const renderChoiceItem = (spec, useText, presets, onItemValueHandler, isSelected, itemResponse, providersBackstage, renderIcons = true) => {\n        const getApi = (component) => ({\n            setActive: (state) => {\n                Toggling.set(component, state);\n            },\n            isActive: () => Toggling.isOn(component),\n            isEnabled: () => !Disabling.isDisabled(component),\n            setEnabled: (state) => Disabling.set(component, !state)\n        });\n        const structure = renderItemStructure({\n            presets,\n            textContent: useText ? spec.text : Optional.none(),\n            htmlContent: Optional.none(),\n            labelContent: spec.label,\n            ariaLabel: spec.text,\n            iconContent: spec.icon,\n            shortcutContent: useText ? spec.shortcut : Optional.none(),\n            // useText essentially says that we have one column. In one column lists, we should show a tick\n            // The tick is controlled by the tickedClass (via css). It is always present\n            // but is hidden unless the tickedClass is present.\n            checkMark: useText ? Optional.some(renderCheckmark(providersBackstage.icons)) : Optional.none(),\n            caret: Optional.none(),\n            value: spec.value\n        }, providersBackstage, renderIcons);\n        const optTooltipping = spec.text\n            .filter(constant$1(!useText))\n            .map((t) => Tooltipping.config(providersBackstage.tooltips.getConfig({\n            tooltipText: providersBackstage.translate(t)\n        })));\n        return deepMerge(renderCommonItem({\n            context: spec.context,\n            data: buildData(spec),\n            enabled: spec.enabled,\n            getApi,\n            onAction: (_api) => onItemValueHandler(spec.value),\n            onSetup: (api) => {\n                api.setActive(isSelected);\n                return noop;\n            },\n            triggersSubmenu: false,\n            itemBehaviours: [\n                ...optTooltipping.toArray()\n            ]\n        }, structure, itemResponse, providersBackstage), {\n            toggling: {\n                toggleClass: tickedClass,\n                toggleOnExecute: false,\n                selected: spec.active,\n                exclusive: true\n            }\n        });\n    };\n\n    const renderSeparatorItem = (spec) => ({\n        type: 'separator',\n        dom: {\n            tag: 'div',\n            classes: [selectableClass, groupHeadingClass]\n        },\n        components: spec.text.map(text$2).toArray()\n    });\n\n    // Note, this does not create a valid SketchSpec.\n    const renderNormalItem = (spec, itemResponse, providersBackstage, renderIcons = true) => {\n        const getApi = (component) => ({\n            isEnabled: () => !Disabling.isDisabled(component),\n            setEnabled: (state) => Disabling.set(component, !state)\n        });\n        const structure = renderItemStructure({\n            presets: 'normal',\n            iconContent: spec.icon,\n            textContent: spec.text,\n            htmlContent: Optional.none(),\n            labelContent: Optional.none(),\n            ariaLabel: spec.text,\n            caret: Optional.none(),\n            checkMark: Optional.none(),\n            shortcutContent: spec.shortcut\n        }, providersBackstage, renderIcons);\n        return renderCommonItem({\n            context: spec.context,\n            data: buildData(spec),\n            getApi,\n            enabled: spec.enabled,\n            onAction: spec.onAction,\n            onSetup: spec.onSetup,\n            triggersSubmenu: false,\n            itemBehaviours: []\n        }, structure, itemResponse, providersBackstage);\n    };\n\n    // Note, this does not create a valid SketchSpec.\n    const renderNestedItem = (spec, itemResponse, providersBackstage, renderIcons = true, downwardsCaret = false) => {\n        const caret = downwardsCaret ? renderDownwardsCaret(providersBackstage.icons) : renderSubmenuCaret(providersBackstage.icons);\n        const getApi = (component) => ({\n            isEnabled: () => !Disabling.isDisabled(component),\n            setEnabled: (state) => Disabling.set(component, !state),\n            setIconFill: (id, value) => {\n                descendant(component.element, `svg path[class=\"${id}\"], rect[class=\"${id}\"]`).each((underlinePath) => {\n                    set$9(underlinePath, 'fill', value);\n                });\n            },\n            setTooltip: (tooltip) => {\n                const translatedTooltip = providersBackstage.translate(tooltip);\n                set$9(component.element, 'aria-label', translatedTooltip);\n            }\n        });\n        const structure = renderItemStructure({\n            presets: 'normal',\n            iconContent: spec.icon,\n            textContent: spec.text,\n            htmlContent: Optional.none(),\n            ariaLabel: spec.text,\n            labelContent: Optional.none(),\n            caret: Optional.some(caret),\n            checkMark: Optional.none(),\n            shortcutContent: spec.shortcut\n        }, providersBackstage, renderIcons);\n        return renderCommonItem({\n            context: spec.context,\n            data: buildData(spec),\n            getApi,\n            enabled: spec.enabled,\n            onAction: noop,\n            onSetup: spec.onSetup,\n            triggersSubmenu: true,\n            itemBehaviours: []\n        }, structure, itemResponse, providersBackstage);\n    };\n\n    const renderToggleMenuItem = (spec, itemResponse, providersBackstage, renderIcons = true) => {\n        const getApi = (component) => ({\n            setActive: (state) => {\n                Toggling.set(component, state);\n            },\n            isActive: () => Toggling.isOn(component),\n            isEnabled: () => !Disabling.isDisabled(component),\n            setEnabled: (state) => Disabling.set(component, !state)\n        });\n        // BespokeSelects use meta to pass through styling information. Bespokes should only\n        // be togglemenuitems hence meta is only passed through in this MenuItem.\n        const structure = renderItemStructure({\n            iconContent: spec.icon,\n            textContent: spec.text,\n            htmlContent: Optional.none(),\n            labelContent: Optional.none(),\n            ariaLabel: spec.text,\n            checkMark: Optional.some(renderCheckmark(providersBackstage.icons)),\n            caret: Optional.none(),\n            shortcutContent: spec.shortcut,\n            presets: 'normal',\n            meta: spec.meta\n        }, providersBackstage, renderIcons);\n        return deepMerge(renderCommonItem({\n            context: spec.context,\n            data: buildData(spec),\n            enabled: spec.enabled,\n            getApi,\n            onAction: spec.onAction,\n            onSetup: spec.onSetup,\n            triggersSubmenu: false,\n            itemBehaviours: []\n        }, structure, itemResponse, providersBackstage), {\n            toggling: {\n                toggleClass: tickedClass,\n                toggleOnExecute: false,\n                selected: spec.active\n            },\n            role: spec.role.getOrUndefined()\n        });\n    };\n\n    const hexColour = (value) => ({\n        value: normalizeHex(value)\n    });\n    const shorthandRegex = /^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;\n    const longformRegex = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i;\n    const isHexString = (hex) => shorthandRegex.test(hex) || longformRegex.test(hex);\n    const normalizeHex = (hex) => removeLeading(hex, '#').toUpperCase();\n    const fromString$1 = (hex) => isHexString(hex) ? Optional.some({ value: normalizeHex(hex) }) : Optional.none();\n    // Expand shorthand form (e.g. \"03F\") to full form (e.g. \"0033FF\")\n    const getLongForm = (hex) => {\n        const hexString = hex.value.replace(shorthandRegex, (m, r, g, b) => r + r + g + g + b + b);\n        return { value: hexString };\n    };\n    const extractValues = (hex) => {\n        const longForm = getLongForm(hex);\n        const splitForm = longformRegex.exec(longForm.value);\n        return splitForm === null ? ['FFFFFF', 'FF', 'FF', 'FF'] : splitForm;\n    };\n    const toHex = (component) => {\n        const hex = component.toString(16);\n        return (hex.length === 1 ? '0' + hex : hex).toUpperCase();\n    };\n    const fromRgba = (rgbaColour) => {\n        const value = toHex(rgbaColour.red) + toHex(rgbaColour.green) + toHex(rgbaColour.blue);\n        return hexColour(value);\n    };\n\n    const hsvColour = (hue, saturation, value) => ({\n        hue,\n        saturation,\n        value\n    });\n    const fromRgb = (rgbaColour) => {\n        let h = 0;\n        let s = 0;\n        let v = 0;\n        const r = rgbaColour.red / 255;\n        const g = rgbaColour.green / 255;\n        const b = rgbaColour.blue / 255;\n        const minRGB = Math.min(r, Math.min(g, b));\n        const maxRGB = Math.max(r, Math.max(g, b));\n        if (minRGB === maxRGB) {\n            v = minRGB;\n            return hsvColour(0, 0, v * 100);\n        }\n        /* eslint no-nested-ternary:0 */\n        const d = (r === minRGB) ? g - b : ((b === minRGB) ? r - g : b - r);\n        h = (r === minRGB) ? 3 : ((b === minRGB) ? 1 : 5);\n        h = 60 * (h - d / (maxRGB - minRGB));\n        s = (maxRGB - minRGB) / maxRGB;\n        v = maxRGB;\n        return hsvColour(Math.round(h), Math.round(s * 100), Math.round(v * 100));\n    };\n\n    const min = Math.min;\n    const max = Math.max;\n    const round$1 = Math.round;\n    const rgbRegex = /^\\s*rgb\\s*\\(\\s*(\\d+)\\s*[,\\s]\\s*(\\d+)\\s*[,\\s]\\s*(\\d+)\\s*\\)\\s*$/i;\n    // This regex will match rgba(0, 0, 0, 0.5) or rgba(0, 0, 0, 50%) , or without commas\n    const rgbaRegex = /^\\s*rgba\\s*\\(\\s*(\\d+)\\s*[,\\s]\\s*(\\d+)\\s*[,\\s]\\s*(\\d+)\\s*[,\\s]\\s*((?:\\d?\\.\\d+|\\d+)%?)\\s*\\)\\s*$/i;\n    const rgbaColour = (red, green, blue, alpha) => ({\n        red,\n        green,\n        blue,\n        alpha\n    });\n    const isRgbaComponent = (value) => {\n        const num = parseInt(value, 10);\n        return num.toString() === value && num >= 0 && num <= 255;\n    };\n    const fromHsv = (hsv) => {\n        let r;\n        let g;\n        let b;\n        const hue = (hsv.hue || 0) % 360;\n        let saturation = hsv.saturation / 100;\n        let brightness = hsv.value / 100;\n        saturation = max(0, min(saturation, 1));\n        brightness = max(0, min(brightness, 1));\n        if (saturation === 0) {\n            r = g = b = round$1(255 * brightness);\n            return rgbaColour(r, g, b, 1);\n        }\n        const side = hue / 60;\n        const chroma = brightness * saturation;\n        const x = chroma * (1 - Math.abs(side % 2 - 1));\n        const match = brightness - chroma;\n        switch (Math.floor(side)) {\n            case 0:\n                r = chroma;\n                g = x;\n                b = 0;\n                break;\n            case 1:\n                r = x;\n                g = chroma;\n                b = 0;\n                break;\n            case 2:\n                r = 0;\n                g = chroma;\n                b = x;\n                break;\n            case 3:\n                r = 0;\n                g = x;\n                b = chroma;\n                break;\n            case 4:\n                r = x;\n                g = 0;\n                b = chroma;\n                break;\n            case 5:\n                r = chroma;\n                g = 0;\n                b = x;\n                break;\n            default:\n                r = g = b = 0;\n        }\n        r = round$1(255 * (r + match));\n        g = round$1(255 * (g + match));\n        b = round$1(255 * (b + match));\n        return rgbaColour(r, g, b, 1);\n    };\n    // Temporarily using: https://stackoverflow.com/questions/5623838/rgb-to-hex-and-hex-to-rgb\n    const fromHex = (hexColour) => {\n        const result = extractValues(hexColour);\n        const red = parseInt(result[1], 16);\n        const green = parseInt(result[2], 16);\n        const blue = parseInt(result[3], 16);\n        return rgbaColour(red, green, blue, 1);\n    };\n    const fromStringValues = (red, green, blue, alpha) => {\n        const r = parseInt(red, 10);\n        const g = parseInt(green, 10);\n        const b = parseInt(blue, 10);\n        const a = parseFloat(alpha);\n        return rgbaColour(r, g, b, a);\n    };\n    const fromString = (rgbaString) => {\n        const rgbMatch = rgbRegex.exec(rgbaString);\n        if (rgbMatch !== null) {\n            return Optional.some(fromStringValues(rgbMatch[1], rgbMatch[2], rgbMatch[3], '1'));\n        }\n        const rgbaMatch = rgbaRegex.exec(rgbaString);\n        if (rgbaMatch !== null) {\n            return Optional.some(fromStringValues(rgbaMatch[1], rgbaMatch[2], rgbaMatch[3], rgbaMatch[4]));\n        }\n        return Optional.none();\n    };\n    const toString = (rgba) => `rgba(${rgba.red},${rgba.green},${rgba.blue},${rgba.alpha})`;\n    const red = rgbaColour(255, 0, 0, 1);\n\n    const hexToHsv = (hex) => fromRgb(fromHex(hex));\n    const hsvToHex = (hsv) => fromRgba(fromHsv(hsv));\n    const anyToHex = (color) => fromString$1(color)\n        .orThunk(() => fromString(color).map(fromRgba))\n        .getOrThunk(() => {\n        // Not dealing with Hex or RGBA so use a canvas to parse the color\n        const canvas = document.createElement('canvas');\n        canvas.height = 1;\n        canvas.width = 1;\n        const canvasContext = canvas.getContext('2d');\n        // all valid colors after this point\n        canvasContext.clearRect(0, 0, canvas.width, canvas.height);\n        // invalid colors will be shown as white - the first assignment will pass and the second may be ignored\n        canvasContext.fillStyle = '#FFFFFF';\n        canvasContext.fillStyle = color;\n        canvasContext.fillRect(0, 0, 1, 1);\n        const rgba = canvasContext.getImageData(0, 0, 1, 1).data;\n        const r = rgba[0];\n        const g = rgba[1];\n        const b = rgba[2];\n        const a = rgba[3];\n        return fromRgba(rgbaColour(r, g, b, a));\n    });\n\n    const fireSkinLoaded$1 = (editor) => {\n        editor.dispatch('SkinLoaded');\n    };\n    const fireSkinLoadError$1 = (editor, error) => {\n        editor.dispatch('SkinLoadError', error);\n    };\n    const fireResizeEditor = (editor) => {\n        editor.dispatch('ResizeEditor');\n    };\n    const fireResizeContent = (editor, e) => {\n        editor.dispatch('ResizeContent', e);\n    };\n    const fireScrollContent = (editor, e) => {\n        editor.dispatch('ScrollContent', e);\n    };\n    const fireTextColorChange = (editor, data) => {\n        editor.dispatch('TextColorChange', data);\n    };\n    const fireAfterProgressState = (editor, state) => {\n        editor.dispatch('AfterProgressState', { state });\n    };\n    const fireResolveName = (editor, node) => editor.dispatch('ResolveName', {\n        name: node.nodeName.toLowerCase(),\n        target: node\n    });\n    const fireToggleToolbarDrawer = (editor, state) => {\n        editor.dispatch('ToggleToolbarDrawer', { state });\n    };\n    const fireStylesTextUpdate = (editor, data) => {\n        editor.dispatch('StylesTextUpdate', data);\n    };\n    const fireAlignTextUpdate = (editor, data) => {\n        editor.dispatch('AlignTextUpdate', data);\n    };\n    const fireFontSizeTextUpdate = (editor, data) => {\n        editor.dispatch('FontSizeTextUpdate', data);\n    };\n    const fireFontSizeInputTextUpdate = (editor, data) => {\n        editor.dispatch('FontSizeInputTextUpdate', data);\n    };\n    const fireBlocksTextUpdate = (editor, data) => {\n        editor.dispatch('BlocksTextUpdate', data);\n    };\n    const fireFontFamilyTextUpdate = (editor, data) => {\n        editor.dispatch('FontFamilyTextUpdate', data);\n    };\n    const fireToggleSidebar = (editor) => {\n        editor.dispatch('ToggleSidebar');\n    };\n    const fireSidebarResizeStart = (dispatcher) => {\n        dispatcher.dispatch('SidebarResizeStart');\n    };\n    const fireSidebarResized = (dispatcher, width) => {\n        dispatcher.dispatch('SidebarResized', { width });\n    };\n    const fireToggleView = (editor) => {\n        editor.dispatch('ToggleView');\n    };\n    const fireContextToolbarClose = (editor) => {\n        editor.dispatch('ContextToolbarClose');\n    };\n    const fireContextFormSlideBack = (editor) => {\n        editor.dispatch('ContextFormSlideBack');\n    };\n\n    const composeUnbinders = (f, g) => () => {\n        f();\n        g();\n    };\n    const onSetupEditableToggle = (editor, enabledPredicate = always) => onSetupEvent(editor, 'NodeChange', (api) => {\n        api.setEnabled(editor.selection.isEditable() && enabledPredicate());\n    });\n    const onSetupFormatToggle = (editor, name) => (api) => {\n        const boundFormatChangeCallback = unbindable();\n        const init = () => {\n            api.setActive(editor.formatter.match(name));\n            const binding = editor.formatter.formatChanged(name, api.setActive);\n            boundFormatChangeCallback.set(binding);\n        };\n        // The editor may or may not have been setup yet, so check for that\n        editor.initialized ? init() : editor.once('init', init);\n        return () => {\n            editor.off('init', init);\n            boundFormatChangeCallback.clear();\n        };\n    };\n    const onSetupStateToggle = (editor, name) => (api) => {\n        const unbindEditableToogle = onSetupEditableToggle(editor)(api);\n        const unbindFormatToggle = onSetupFormatToggle(editor, name)(api);\n        return () => {\n            unbindEditableToogle();\n            unbindFormatToggle();\n        };\n    };\n    const onSetupEvent = (editor, event, f) => (api) => {\n        const handleEvent = () => f(api);\n        const init = () => {\n            f(api);\n            editor.on(event, handleEvent);\n        };\n        // The editor may or may not have been setup yet, so check for that\n        editor.initialized ? init() : editor.once('init', init);\n        return () => {\n            editor.off('init', init);\n            editor.off(event, handleEvent);\n        };\n    };\n    const onActionToggleFormat$1 = (editor) => (rawItem) => () => {\n        editor.undoManager.transact(() => {\n            editor.focus();\n            editor.execCommand('mceToggleFormat', false, rawItem.format);\n        });\n    };\n    const onActionExecCommand = (editor, command) => () => editor.execCommand(command);\n\n    var global$5 = tinymce.util.Tools.resolve('tinymce.util.LocalStorage');\n\n    const cacheStorage = {};\n    const ColorCache = (storageId, max = 10) => {\n        const storageString = global$5.getItem(storageId);\n        const localstorage = isString(storageString) ? JSON.parse(storageString) : [];\n        const prune = (list) => {\n            // When the localStorage cache is too big,\n            // remove the difference from the tail (head is fresh, tail is stale!)\n            const diff = max - list.length;\n            return (diff < 0) ? list.slice(0, max) : list;\n        };\n        const cache = prune(localstorage);\n        const add = (key) => {\n            // Remove duplicates first.\n            indexOf(cache, key).each(remove);\n            cache.unshift(key);\n            // When max size is exceeded, the oldest colors will be removed\n            if (cache.length > max) {\n                cache.pop();\n            }\n            global$5.setItem(storageId, JSON.stringify(cache));\n        };\n        const remove = (idx) => {\n            cache.splice(idx, 1);\n        };\n        const state = () => cache.slice(0);\n        return {\n            add,\n            state\n        };\n    };\n    const getCacheForId = (id) => get$h(cacheStorage, id).getOrThunk(() => {\n        const storageId = `tinymce-custom-colors-${id}`;\n        const currentData = global$5.getItem(storageId);\n        if (isNullable(currentData)) {\n            const legacyDefault = global$5.getItem('tinymce-custom-colors');\n            global$5.setItem(storageId, isNonNullable(legacyDefault) ? legacyDefault : '[]');\n        }\n        const storage = ColorCache(storageId, 10);\n        cacheStorage[id] = storage;\n        return storage;\n    });\n    const getCurrentColors = (id) => map$2(getCacheForId(id).state(), (color) => ({\n        type: 'choiceitem',\n        text: color,\n        icon: 'checkmark',\n        value: color\n    }));\n    const addColor = (id, color) => {\n        getCacheForId(id).add(color);\n    };\n\n    const foregroundId = 'forecolor';\n    const backgroundId = 'hilitecolor';\n    const fallbackCols = 5;\n    const mapColors = (colorMap) => mapColorsRaw(colorMap.map((color, index) => {\n        if (index % 2 === 0) {\n            return '#' + anyToHex(color).value;\n        }\n        return color;\n    }));\n    const mapColorsRaw = (colorMap) => {\n        const colors = [];\n        for (let i = 0; i < colorMap.length; i += 2) {\n            colors.push({\n                text: colorMap[i + 1],\n                value: colorMap[i],\n                icon: 'checkmark',\n                type: 'choiceitem'\n            });\n        }\n        return colors;\n    };\n    const option$1 = (name) => (editor) => editor.options.get(name);\n    const fallbackColor = '#000000';\n    const register$e = (editor) => {\n        const registerOption = editor.options.register;\n        const colorProcessor = (value) => {\n            if (isArrayOf(value, isString)) {\n                return { value: mapColors(value), valid: true };\n            }\n            else {\n                return { valid: false, message: 'Must be an array of strings.' };\n            }\n        };\n        const colorProcessorRaw = (value) => {\n            if (isArrayOf(value, isString)) {\n                return { value: mapColorsRaw(value), valid: true };\n            }\n            else {\n                return { valid: false, message: 'Must be an array of strings.' };\n            }\n        };\n        const colorColsProcessor = (value) => {\n            if (isNumber(value) && value > 0) {\n                return { value, valid: true };\n            }\n            else {\n                return { valid: false, message: 'Must be a positive number.' };\n            }\n        };\n        registerOption('color_map', {\n            processor: colorProcessor,\n            default: [\n                '#BFEDD2', 'Light Green',\n                '#FBEEB8', 'Light Yellow',\n                '#F8CAC6', 'Light Red',\n                '#ECCAFA', 'Light Purple',\n                '#C2E0F4', 'Light Blue',\n                '#2DC26B', 'Green',\n                '#F1C40F', 'Yellow',\n                '#E03E2D', 'Red',\n                '#B96AD9', 'Purple',\n                '#3598DB', 'Blue',\n                '#169179', 'Dark Turquoise',\n                '#E67E23', 'Orange',\n                '#BA372A', 'Dark Red',\n                '#843FA1', 'Dark Purple',\n                '#236FA1', 'Dark Blue',\n                '#ECF0F1', 'Light Gray',\n                '#CED4D9', 'Medium Gray',\n                '#95A5A6', 'Gray',\n                '#7E8C8D', 'Dark Gray',\n                '#34495E', 'Navy Blue',\n                '#000000', 'Black',\n                '#ffffff', 'White'\n            ]\n        });\n        registerOption('color_map_raw', {\n            processor: colorProcessorRaw,\n        });\n        registerOption('color_map_background', {\n            processor: colorProcessor\n        });\n        registerOption('color_map_foreground', {\n            processor: colorProcessor\n        });\n        registerOption('color_cols', {\n            processor: colorColsProcessor,\n            default: calcCols(editor)\n        });\n        registerOption('color_cols_foreground', {\n            processor: colorColsProcessor,\n            default: defaultCols(editor, foregroundId)\n        });\n        registerOption('color_cols_background', {\n            processor: colorColsProcessor,\n            default: defaultCols(editor, backgroundId)\n        });\n        registerOption('custom_colors', {\n            processor: 'boolean',\n            default: true\n        });\n        registerOption('color_default_foreground', {\n            processor: 'string',\n            default: fallbackColor\n        });\n        registerOption('color_default_background', {\n            processor: 'string',\n            default: fallbackColor\n        });\n    };\n    const getColors$2 = (editor, id) => {\n        if (id === foregroundId && editor.options.isSet('color_map_foreground')) {\n            return option$1('color_map_foreground')(editor);\n        }\n        else if (id === backgroundId && editor.options.isSet('color_map_background')) {\n            return option$1('color_map_background')(editor);\n        }\n        else if (editor.options.isSet('color_map_raw')) {\n            return option$1('color_map_raw')(editor);\n        }\n        else {\n            return option$1('color_map')(editor);\n        }\n    };\n    const calcCols = (editor, id = 'default') => Math.max(fallbackCols, Math.ceil(Math.sqrt(getColors$2(editor, id).length)));\n    const defaultCols = (editor, id) => {\n        const defaultCols = option$1('color_cols')(editor);\n        const calculatedCols = calcCols(editor, id);\n        if (defaultCols === calcCols(editor)) {\n            return calculatedCols;\n        }\n        else {\n            return defaultCols;\n        }\n    };\n    const getColorCols$1 = (editor, id = 'default') => {\n        const getCols = () => {\n            if (id === foregroundId) {\n                return option$1('color_cols_foreground')(editor);\n            }\n            else if (id === backgroundId) {\n                return option$1('color_cols_background')(editor);\n            }\n            else {\n                return option$1('color_cols')(editor);\n            }\n        };\n        return Math.round(getCols());\n    };\n    const hasCustomColors$1 = option$1('custom_colors');\n    const getDefaultForegroundColor = option$1('color_default_foreground');\n    const getDefaultBackgroundColor = option$1('color_default_background');\n\n    const defaultBackgroundColor = 'rgba(0, 0, 0, 0)';\n    const isValidBackgroundColor = (value) => fromString(value).exists((c) => c.alpha !== 0);\n    // Climb up the tree to find the value of the background until finding a non-transparent value or defaulting.\n    const getClosestCssBackgroundColorValue = (scope) => {\n        return closest(scope, (node) => {\n            if (isElement$1(node)) {\n                const color = get$e(node, 'background-color');\n                return someIf(isValidBackgroundColor(color), color);\n            }\n            else {\n                return Optional.none();\n            }\n        }).getOr(defaultBackgroundColor);\n    };\n    const getCurrentColor = (editor, format) => {\n        const node = SugarElement.fromDom(editor.selection.getStart());\n        const cssRgbValue = format === 'hilitecolor'\n            ? getClosestCssBackgroundColorValue(node)\n            : get$e(node, 'color');\n        return fromString(cssRgbValue).map((rgba) => '#' + fromRgba(rgba).value);\n    };\n    const applyFormat = (editor, format, value) => {\n        editor.undoManager.transact(() => {\n            editor.focus();\n            editor.formatter.apply(format, { value });\n            editor.nodeChanged();\n        });\n    };\n    const removeFormat = (editor, format) => {\n        editor.undoManager.transact(() => {\n            editor.focus();\n            editor.formatter.remove(format, { value: null }, undefined, true);\n            editor.nodeChanged();\n        });\n    };\n    const registerCommands = (editor) => {\n        editor.addCommand('mceApplyTextcolor', (format, value) => {\n            applyFormat(editor, format, value);\n        });\n        editor.addCommand('mceRemoveTextcolor', (format) => {\n            removeFormat(editor, format);\n        });\n    };\n    const getAdditionalColors = (hasCustom) => {\n        const type = 'choiceitem';\n        const remove = {\n            type,\n            text: 'Remove color',\n            icon: 'color-swatch-remove-color',\n            value: 'remove'\n        };\n        const custom = {\n            type,\n            text: 'Custom color',\n            icon: 'color-picker',\n            value: 'custom'\n        };\n        return hasCustom ? [\n            remove,\n            custom\n        ] : [remove];\n    };\n    const applyColor = (editor, format, value, onChoice) => {\n        if (value === 'custom') {\n            const dialog = colorPickerDialog(editor);\n            dialog((colorOpt) => {\n                colorOpt.each((color) => {\n                    addColor(format, color);\n                    editor.execCommand('mceApplyTextcolor', format, color);\n                    onChoice(color);\n                });\n            }, getCurrentColor(editor, format).getOr(fallbackColor));\n        }\n        else if (value === 'remove') {\n            onChoice('');\n            editor.execCommand('mceRemoveTextcolor', format);\n        }\n        else {\n            onChoice(value);\n            editor.execCommand('mceApplyTextcolor', format, value);\n        }\n    };\n    const getColors$1 = (colors, id, hasCustom) => colors.concat(getCurrentColors(id).concat(getAdditionalColors(hasCustom)));\n    const getFetch$1 = (colors, id, hasCustom) => (callback) => {\n        callback(getColors$1(colors, id, hasCustom));\n    };\n    const setIconColor = (splitButtonApi, name, newColor) => {\n        const id = name === 'forecolor' ? 'tox-icon-text-color__color' : 'tox-icon-highlight-bg-color__color';\n        splitButtonApi.setIconFill(id, newColor);\n    };\n    const setTooltip = (buttonApi, tooltip) => {\n        buttonApi.setTooltip(tooltip);\n    };\n    const select$1 = (editor, format) => (value) => {\n        const optCurrentHex = getCurrentColor(editor, format);\n        return is$1(optCurrentHex, value.toUpperCase());\n    };\n    // Selecting `Remove Color` would set the lastColor to ''\n    const getToolTipText = (editor, format, lastColor) => {\n        if (isEmpty(lastColor)) {\n            return format === 'forecolor' ? 'Text color' : 'Background color';\n        }\n        const tooltipPrefix = format === 'forecolor' ? 'Text color {0}' : 'Background color {0}';\n        const colors = getColors$1(getColors$2(editor, format), format, false);\n        const colorText = find$5(colors, (c) => c.value === lastColor).getOr({ text: '' }).text;\n        return editor.translate([tooltipPrefix, editor.translate(colorText)]);\n    };\n    const registerTextColorButton = (editor, name, format, lastColor) => {\n        editor.ui.registry.addSplitButton(name, {\n            tooltip: getToolTipText(editor, format, lastColor.get()),\n            chevronTooltip: name === 'forecolor' ? 'Text color menu' : 'Background color menu',\n            presets: 'color',\n            icon: name === 'forecolor' ? 'text-color' : 'highlight-bg-color',\n            select: select$1(editor, format),\n            columns: getColorCols$1(editor, format),\n            fetch: getFetch$1(getColors$2(editor, format), format, hasCustomColors$1(editor)),\n            onAction: (_splitButtonApi) => {\n                applyColor(editor, format, lastColor.get(), noop);\n            },\n            onItemAction: (_splitButtonApi, value) => {\n                applyColor(editor, format, value, (newColor) => {\n                    lastColor.set(newColor);\n                    fireTextColorChange(editor, {\n                        name,\n                        color: newColor\n                    });\n                });\n            },\n            onSetup: (splitButtonApi) => {\n                setIconColor(splitButtonApi, name, lastColor.get());\n                const handler = (e) => {\n                    if (e.name === name) {\n                        setIconColor(splitButtonApi, e.name, e.color);\n                        setTooltip(splitButtonApi, getToolTipText(editor, format, e.color));\n                    }\n                };\n                editor.on('TextColorChange', handler);\n                return composeUnbinders(onSetupEditableToggle(editor)(splitButtonApi), () => {\n                    editor.off('TextColorChange', handler);\n                });\n            }\n        });\n    };\n    const registerTextColorMenuItem = (editor, name, format, text, lastColor) => {\n        editor.ui.registry.addNestedMenuItem(name, {\n            text,\n            icon: name === 'forecolor' ? 'text-color' : 'highlight-bg-color',\n            onSetup: (api) => {\n                setTooltip(api, getToolTipText(editor, format, lastColor.get()));\n                setIconColor(api, name, lastColor.get());\n                return onSetupEditableToggle(editor)(api);\n            },\n            getSubmenuItems: () => [\n                {\n                    type: 'fancymenuitem',\n                    fancytype: 'colorswatch',\n                    select: select$1(editor, format),\n                    initData: {\n                        storageKey: format,\n                    },\n                    onAction: (data) => {\n                        applyColor(editor, format, data.value, (newColor) => {\n                            lastColor.set(newColor);\n                            fireTextColorChange(editor, {\n                                name,\n                                color: newColor\n                            });\n                        });\n                    },\n                }\n            ]\n        });\n    };\n    const colorPickerDialog = (editor) => (callback, value) => {\n        let isValid = false;\n        const onSubmit = (api) => {\n            const data = api.getData();\n            const hex = data.colorpicker;\n            if (isValid) {\n                callback(Optional.from(hex));\n                api.close();\n            }\n            else {\n                editor.windowManager.alert(editor.translate(['Invalid hex color code: {0}', hex]));\n            }\n        };\n        const onAction = (_api, details) => {\n            if (details.name === 'hex-valid') {\n                isValid = details.value;\n            }\n        };\n        const initialData = {\n            colorpicker: value\n        };\n        editor.windowManager.open({\n            title: 'Color Picker',\n            size: 'normal',\n            body: {\n                type: 'panel',\n                items: [\n                    {\n                        type: 'colorpicker',\n                        name: 'colorpicker',\n                        label: 'Color'\n                    }\n                ]\n            },\n            buttons: [\n                {\n                    type: 'cancel',\n                    name: 'cancel',\n                    text: 'Cancel'\n                },\n                {\n                    type: 'submit',\n                    name: 'save',\n                    text: 'Save',\n                    primary: true\n                }\n            ],\n            initialData,\n            onAction,\n            onSubmit,\n            onClose: noop,\n            onCancel: () => {\n                callback(Optional.none());\n            }\n        });\n    };\n    const register$d = (editor) => {\n        registerCommands(editor);\n        const fallbackColorForeground = getDefaultForegroundColor(editor);\n        const fallbackColorBackground = getDefaultBackgroundColor(editor);\n        const lastForeColor = Cell(fallbackColorForeground);\n        const lastBackColor = Cell(fallbackColorBackground);\n        registerTextColorButton(editor, 'forecolor', 'forecolor', lastForeColor);\n        registerTextColorButton(editor, 'backcolor', 'hilitecolor', lastBackColor);\n        registerTextColorMenuItem(editor, 'forecolor', 'forecolor', 'Text color', lastForeColor);\n        registerTextColorMenuItem(editor, 'backcolor', 'hilitecolor', 'Background color', lastBackColor);\n    };\n\n    const renderImgItem = (spec, onItemValueHandler, isSelected, itemResponse, providersBackstage) => {\n        const getApi = (component) => ({\n            setActive: (state) => {\n                Toggling.set(component, state);\n            },\n            isActive: () => Toggling.isOn(component),\n            isEnabled: () => !Disabling.isDisabled(component),\n            setEnabled: (state) => Disabling.set(component, !state)\n        });\n        const structure = renderItemStructure({\n            presets: 'img',\n            textContent: Optional.none(),\n            htmlContent: Optional.none(),\n            ariaLabel: spec.tooltip,\n            iconContent: Optional.some(spec.url),\n            labelContent: spec.label,\n            shortcutContent: Optional.none(),\n            checkMark: Optional.some(renderCheckmark(providersBackstage.icons)),\n            caret: Optional.none(),\n            value: spec.value\n        }, providersBackstage, true);\n        const optTooltipping = spec.tooltip\n            .map((t) => Tooltipping.config(providersBackstage.tooltips.getConfig({\n            tooltipText: providersBackstage.translate(t)\n        })));\n        return deepMerge(renderCommonItem({\n            context: spec.context,\n            data: buildData(spec),\n            enabled: spec.enabled,\n            getApi,\n            onAction: (api) => {\n                onItemValueHandler(spec.value);\n                api.setActive(true);\n            },\n            onSetup: (api) => {\n                api.setActive(isSelected);\n                return noop;\n            },\n            triggersSubmenu: false,\n            itemBehaviours: [\n                ...optTooltipping.toArray()\n            ]\n        }, structure, itemResponse, providersBackstage), {\n            toggling: {\n                toggleClass: tickedClass,\n                toggleOnExecute: false,\n                selected: spec.active,\n                exclusive: true\n            }\n        });\n    };\n\n    const createPartialChoiceMenu = (value, items, onItemValueHandler, columns, presets, itemResponse, select, providersBackstage) => {\n        const hasIcons = menuHasIcons(items);\n        const presetItemTypes = presets !== 'color' ? 'normal' : 'color';\n        const alloyItems = createChoiceItems(items, onItemValueHandler, columns, presetItemTypes, itemResponse, select, providersBackstage);\n        const menuLayout = {\n            menuType: presets\n        };\n        return createPartialMenuWithAlloyItems(value, hasIcons, alloyItems, columns, menuLayout);\n    };\n    const createChoiceItems = (items, onItemValueHandler, columns, itemPresets, itemResponse, select, providersBackstage) => cat(map$2(items, (item) => {\n        if (item.type === 'choiceitem') {\n            return createChoiceMenuItem(item).fold(handleError, (d) => Optional.some(renderChoiceItem(d, columns === 1, itemPresets, onItemValueHandler, select(d.value), itemResponse, providersBackstage, menuHasIcons(items))));\n        }\n        else if (item.type === 'imageitem') {\n            return createImageMenuItem(item).fold(handleError, (d) => Optional.some(renderImgItem(d, onItemValueHandler, select(d.value), itemResponse, providersBackstage)));\n        }\n        else if (item.type === 'resetimage') {\n            return createResetImageItem(item).fold(handleError, (d) => Optional.some(renderChoiceItem(({\n                ...d,\n                type: 'choiceitem',\n                text: d.tooltip,\n                icon: Optional.some(d.icon),\n                label: Optional.some(d.label),\n            }), columns === 1, itemPresets, onItemValueHandler, select(d.value), itemResponse, providersBackstage, menuHasIcons(items))));\n        }\n        else {\n            return Optional.none();\n        }\n    }));\n\n    const deriveMenuMovement = (columns, presets) => {\n        const menuMarkers = markers(presets);\n        if (columns === 1) {\n            return { mode: 'menu' };\n        }\n        else if (columns === 'auto') {\n            return {\n                mode: 'grid',\n                selector: '.' + menuMarkers.item,\n                initSize: {\n                    numColumns: 1,\n                    numRows: 1\n                }\n            };\n        }\n        else {\n            const rowClass = {\n                color: 'tox-swatches__row',\n                imageselector: 'tox-image-selector__row',\n                listpreview: 'tox-collection__group',\n                normal: 'tox-collection__group'\n            }[presets];\n            return {\n                mode: 'matrix',\n                rowSelector: '.' + rowClass,\n                previousSelector: (menu) => {\n                    // We only want the navigation to start on the selected item if we are in color-mode (The colorswatch)\n                    return presets === 'color'\n                        ? descendant(menu.element, '[aria-checked=true]')\n                        : Optional.none();\n                }\n            };\n        }\n    };\n    const deriveCollectionMovement = (columns, presets) => {\n        if (columns === 1) {\n            return {\n                mode: 'menu',\n                selector: '.tox-collection__item'\n            };\n        }\n        else if (columns === 'auto') {\n            return {\n                mode: 'flatgrid',\n                selector: '.' + 'tox-collection__item',\n                initSize: {\n                    numColumns: 1,\n                    numRows: 1\n                }\n            };\n        }\n        else {\n            return {\n                mode: 'matrix',\n                selectors: {\n                    row: presets === 'color' ? '.tox-swatches__row' : '.tox-collection__group',\n                    cell: presets === 'color' ? `.${colorClass}` : `.${selectableClass}`\n                }\n            };\n        }\n    };\n\n    const renderColorSwatchItem = (spec, backstage) => {\n        const items = getColorItems(spec, backstage);\n        const columns = backstage.colorinput.getColorCols(spec.initData.storageKey);\n        const presets = 'color';\n        const menuSpec = createPartialChoiceMenu(generate$6('menu-value'), items, (value) => {\n            spec.onAction({ value });\n        }, columns, presets, ItemResponse$1.CLOSE_ON_EXECUTE, spec.select.getOr(never), backstage.shared.providers);\n        const widgetSpec = {\n            ...menuSpec,\n            markers: markers(presets),\n            movement: deriveMenuMovement(columns, presets),\n            // TINY-10806: Avoid duplication of ARIA role=\"menu\" in the accessibility tree for Color Swatch menu item.\n            showMenuRole: false\n        };\n        return {\n            type: 'widget',\n            data: { value: generate$6('widget-id') },\n            dom: {\n                tag: 'div',\n                classes: ['tox-fancymenuitem']\n            },\n            autofocus: true,\n            components: [\n                parts$7.widget(Menu.sketch(widgetSpec))\n            ]\n        };\n    };\n    const getColorItems = (spec, backstage) => {\n        const useCustomColors = spec.initData.allowCustomColors && backstage.colorinput.hasCustomColors();\n        return spec.initData.colors.fold(() => getColors$1(backstage.colorinput.getColors(spec.initData.storageKey), spec.initData.storageKey, useCustomColors), (colors) => colors.concat(getAdditionalColors(useCustomColors)));\n    };\n\n    const renderImageSelector = (spec, backstage) => {\n        const presets = 'imageselector';\n        const columns = spec.initData.columns;\n        const menuSpec = createPartialChoiceMenu(generate$6('menu-value'), spec.initData.items, (value) => {\n            spec.onAction({ value });\n        }, columns, presets, ItemResponse$1.CLOSE_ON_EXECUTE, spec.select.getOr(never), backstage.shared.providers);\n        const widgetSpec = {\n            ...menuSpec,\n            markers: markers(presets),\n            movement: deriveMenuMovement(columns, presets),\n            // TINY-10806: Avoid duplication of ARIA role=\"menu\" in the accessibility tree for Image Selector menu item.\n            showMenuRole: false\n        };\n        return {\n            type: 'widget',\n            data: { value: generate$6('widget-id') },\n            dom: {\n                tag: 'div',\n                classes: ['tox-fancymenuitem', 'tox-collection--toolbar']\n            },\n            autofocus: true,\n            components: [\n                parts$7.widget(Menu.sketch(widgetSpec))\n            ]\n        };\n    };\n\n    const cellOverEvent = generate$6('cell-over');\n    const cellExecuteEvent = generate$6('cell-execute');\n    const makeAnnouncementText = (backstage) => (row, col) => backstage.shared.providers.translate(['{0} columns, {1} rows', col, row]);\n    const makeCell = (row, col, label) => {\n        const emitCellOver = (c) => emitWith(c, cellOverEvent, { row, col });\n        const emitExecute = (c) => emitWith(c, cellExecuteEvent, { row, col });\n        const onClick = (c, se) => {\n            se.stop();\n            emitExecute(c);\n        };\n        return build$1({\n            dom: {\n                tag: 'div',\n                attributes: {\n                    role: 'button',\n                    ['aria-label']: label\n                }\n            },\n            behaviours: derive$1([\n                config('insert-table-picker-cell', [\n                    run$1(mouseover(), Focusing.focus),\n                    run$1(execute$5(), emitExecute),\n                    run$1(click(), onClick),\n                    run$1(tap(), onClick)\n                ]),\n                Toggling.config({\n                    toggleClass: 'tox-insert-table-picker__selected',\n                    toggleOnExecute: false\n                }),\n                Focusing.config({ onFocus: emitCellOver })\n            ])\n        });\n    };\n    const makeCells = (getCellLabel, numRows, numCols) => {\n        const cells = [];\n        for (let i = 0; i < numRows; i++) {\n            const row = [];\n            for (let j = 0; j < numCols; j++) {\n                const label = getCellLabel(i + 1, j + 1);\n                row.push(makeCell(i, j, label));\n            }\n            cells.push(row);\n        }\n        return cells;\n    };\n    const selectCells = (cells, selectedRow, selectedColumn, numRows, numColumns) => {\n        for (let i = 0; i < numRows; i++) {\n            for (let j = 0; j < numColumns; j++) {\n                Toggling.set(cells[i][j], i <= selectedRow && j <= selectedColumn);\n            }\n        }\n    };\n    const makeComponents = (cells) => bind$3(cells, (cellRow) => map$2(cellRow, premade));\n    const makeLabelText = (row, col) => text$2(`${col}x${row}`);\n    const renderInsertTableMenuItem = (spec, backstage) => {\n        const numRows = 10;\n        const numColumns = 10;\n        const getCellLabel = makeAnnouncementText(backstage);\n        const cells = makeCells(getCellLabel, numRows, numColumns);\n        const emptyLabelText = makeLabelText(0, 0);\n        const memLabel = record({\n            dom: {\n                tag: 'span',\n                classes: ['tox-insert-table-picker__label'],\n            },\n            components: [emptyLabelText],\n            behaviours: derive$1([\n                Replacing.config({})\n            ])\n        });\n        return {\n            type: 'widget',\n            data: { value: generate$6('widget-id') },\n            dom: {\n                tag: 'div',\n                classes: ['tox-fancymenuitem']\n            },\n            autofocus: true,\n            components: [parts$7.widget({\n                    dom: {\n                        tag: 'div',\n                        classes: ['tox-insert-table-picker']\n                    },\n                    components: makeComponents(cells).concat(memLabel.asSpec()),\n                    behaviours: derive$1([\n                        config('insert-table-picker', [\n                            runOnAttached((c) => {\n                                // Restore the empty label when opened, otherwise it may still be using an old label from last time it was opened\n                                Replacing.set(memLabel.get(c), [emptyLabelText]);\n                            }),\n                            runWithTarget(cellOverEvent, (c, t, e) => {\n                                const { row, col } = e.event;\n                                selectCells(cells, row, col, numRows, numColumns);\n                                Replacing.set(memLabel.get(c), [makeLabelText(row + 1, col + 1)]);\n                            }),\n                            runWithTarget(cellExecuteEvent, (c, _, e) => {\n                                const { row, col } = e.event;\n                                // Close the sandbox before triggering the action\n                                emit(c, sandboxClose());\n                                spec.onAction({ numRows: row + 1, numColumns: col + 1 });\n                            })\n                        ]),\n                        Keying.config({\n                            initSize: {\n                                numRows,\n                                numColumns\n                            },\n                            mode: 'flatgrid',\n                            selector: '[role=\"button\"]'\n                        })\n                    ])\n                })]\n        };\n    };\n\n    const fancyMenuItems = {\n        inserttable: renderInsertTableMenuItem,\n        colorswatch: renderColorSwatchItem,\n        imageselect: renderImageSelector\n    };\n    const renderFancyMenuItem = (spec, backstage) => get$h(fancyMenuItems, spec.fancytype).map((render) => render(spec, backstage));\n\n    const render$2 = (items, extras) => map$2(items, (item) => {\n        switch (item.type) {\n            case 'cardcontainer':\n                return renderContainer(item, render$2(item.items, extras));\n            case 'cardimage':\n                return renderImage(item.src, item.classes, item.alt);\n            case 'cardtext':\n                // Only highlight targeted text components\n                const shouldHighlight = item.name.exists((name) => contains$2(extras.cardText.highlightOn, name));\n                const matchText = shouldHighlight ? Optional.from(extras.cardText.matchText).getOr('') : '';\n                return renderHtml(replaceText(item.text, matchText), item.classes);\n        }\n    });\n    const renderCardMenuItem = (spec, itemResponse, sharedBackstage, extras) => {\n        const getApi = (component) => ({\n            isEnabled: () => !Disabling.isDisabled(component),\n            setEnabled: (state) => {\n                Disabling.set(component, !state);\n                // Disable sub components\n                each$1(descendants(component.element, '*'), (elm) => {\n                    component.getSystem().getByDom(elm).each((comp) => {\n                        if (comp.hasConfigured(Disabling)) {\n                            Disabling.set(comp, !state);\n                        }\n                    });\n                });\n            }\n        });\n        const structure = {\n            dom: renderItemDomStructure(spec.label, []),\n            optComponents: [\n                Optional.some({\n                    dom: {\n                        tag: 'div',\n                        classes: [containerClass, containerRowClass]\n                    },\n                    components: render$2(spec.items, extras)\n                })\n            ]\n        };\n        return renderCommonItem({\n            context: 'mode:design',\n            data: buildData({ text: Optional.none(), ...spec }),\n            enabled: spec.enabled,\n            getApi,\n            onAction: spec.onAction,\n            onSetup: spec.onSetup,\n            triggersSubmenu: false,\n            itemBehaviours: Optional.from(extras.itemBehaviours).getOr([])\n        }, structure, itemResponse, sharedBackstage.providers);\n    };\n\n    const identifyMenuLayout = (searchMode) => {\n        switch (searchMode.searchMode) {\n            case 'no-search': {\n                return {\n                    menuType: 'normal'\n                };\n            }\n            default: {\n                return {\n                    menuType: 'searchable',\n                    searchMode\n                };\n            }\n        }\n    };\n    const handleRefetchTrigger = (originalSandboxComp) => {\n        // At the moment, a Sandbox is \"Represented\" by its triggering Dropdown.\n        // We'll want to make this an official API, in case we change it later.\n        const dropdown = Representing.getValue(originalSandboxComp);\n        // Because refetch will replace the entire menu, we need to store the\n        // original version of the searcher state, so that we can reinstate it\n        // after the fetch completes (which is async)\n        const optSearcherState = findWithinSandbox(originalSandboxComp).map(saveState);\n        Dropdown.refetch(dropdown).get(() => {\n            // It has completed, so now find the searcher and set its value\n            // again. We can't just use the originalSandbox, because that will\n            // have been thrown away and recreated by now.\n            const newSandboxComp = Coupling.getCoupled(dropdown, 'sandbox');\n            optSearcherState.each((searcherState) => findWithinSandbox(newSandboxComp).each((inputComp) => restoreState(inputComp, searcherState)));\n        });\n    };\n    // This event is triggered by the searcher for key events\n    // that should be handled by the currently selected item\n    // (that is, the one with *fake* focus, not real focus). So we\n    // need to redispatch them to the selected item in the sandbox.\n    const handleRedirectToMenuItem = (sandboxComp, se) => {\n        getActiveMenuItemFrom(sandboxComp).each((activeItem) => {\n            retargetAndDispatchWith(sandboxComp, activeItem.element, se.event.eventType, se.event.interactionEvent);\n        });\n    };\n    // This function is useful when you have fakeFocus, so you can't just find the\n    // currently focused item (or the item that triggered a key event). It relies on\n    // the following relationships between components\n    // The Sandbox creates a tieredmenu, so Sandboxing.getState returns the TieredMenu\n    // The TieredMenu uses Highlighting for managing which menus are active, so\n    // Highlighting.getHighlighted(tmenu) is the current active menu\n    // The Menu uses highlighting to manage the active item, so use\n    // Highlighting.getHighlighted(menu) to get the current item.\n    const getActiveMenuItemFrom = (sandboxComp) => {\n        // Consider moving some of these things into shared APIs. For example, make an extra API\n        // for TieredMenu to get the highlighted item.\n        return Sandboxing.getState(sandboxComp)\n            .bind(Highlighting.getHighlighted)\n            .bind(Highlighting.getHighlighted);\n    };\n    const getSearchResults = (activeMenuComp) => {\n        // Depending on the menu layout, the search results will either be the entire\n        // menu, or something within the menu.\n        return has(activeMenuComp.element, searchResultsClass)\n            ? Optional.some(activeMenuComp.element)\n            : descendant(activeMenuComp.element, '.' + searchResultsClass);\n    };\n    // Model the interaction with ARIA\n    const updateAriaOnHighlight = (tmenuComp, menuComp, itemComp) => {\n        // This ARIA behaviour is based on the algolia example documented in TINY-8952\n        findWithinMenu(tmenuComp).each((inputComp) => {\n            setActiveDescendant(inputComp, itemComp);\n            const optActiveResults = getSearchResults(menuComp);\n            optActiveResults.each((resultsElem) => {\n                // Link aria-controls of the input to the id of the results container.\n                getOpt(resultsElem, 'id')\n                    .each((controlledId) => set$9(inputComp.element, 'aria-controls', controlledId));\n            });\n        });\n        // Update the aria-selected on the item. The removal is handled by onDehighlight\n        set$9(itemComp.element, 'aria-selected', 'true');\n    };\n    const updateAriaOnDehighlight = (tmenuComp, menuComp, itemComp) => {\n        // This ARIA behaviour is based on the algolia example documented in TINY-8952\n        set$9(itemComp.element, 'aria-selected', 'false');\n    };\n    const focusSearchField = (tmenuComp) => {\n        findWithinMenu(tmenuComp).each((searcherComp) => Focusing.focus(searcherComp));\n    };\n    const getSearchPattern = (dropdownComp) => {\n        // Dropdowns are \"coupled\" with their sandbox and generally, create them on demand.\n        // When using \"getExistingCoupled\" of Coupling, it only returns the coupled\n        // component (here: the sandbox) if it already exists ... it won't do any creation.\n        // So here, we are trying to get possible fetchContext information for our fetch\n        // callback. If there is no sandbox, then there is no open menu, and we\n        // don't have any search context, so use an empty string. Otherwise, dive into\n        // the sandbox, and find the search field's current pattern.\n        const optSandboxComp = Coupling.getExistingCoupled(dropdownComp, 'sandbox');\n        return optSandboxComp\n            .bind(findWithinSandbox)\n            .map(saveState)\n            .map((state) => state.fetchPattern)\n            .getOr('');\n    };\n\n    var FocusMode;\n    (function (FocusMode) {\n        FocusMode[FocusMode[\"ContentFocus\"] = 0] = \"ContentFocus\";\n        FocusMode[FocusMode[\"UiFocus\"] = 1] = \"UiFocus\";\n    })(FocusMode || (FocusMode = {}));\n    const createMenuItemFromBridge = (item, itemResponse, backstage, menuHasIcons, isHorizontalMenu) => {\n        const providersBackstage = backstage.shared.providers;\n        // If we're making a horizontal menu (mobile context menu) we want text OR icons\n        // to simplify the UI. We also don't want shortcut text.\n        const parseForHorizontalMenu = (menuitem) => !isHorizontalMenu ? menuitem : ({\n            ...menuitem,\n            shortcut: Optional.none(),\n            icon: menuitem.text.isSome() ? Optional.none() : menuitem.icon\n        });\n        switch (item.type) {\n            case 'menuitem':\n                return createMenuItem(item).fold(handleError, (d) => Optional.some(renderNormalItem(parseForHorizontalMenu(d), itemResponse, providersBackstage, menuHasIcons)));\n            case 'nestedmenuitem':\n                return createNestedMenuItem(item).fold(handleError, (d) => Optional.some(renderNestedItem(parseForHorizontalMenu(d), itemResponse, providersBackstage, menuHasIcons, isHorizontalMenu)));\n            case 'togglemenuitem':\n                return createToggleMenuItem(item).fold(handleError, (d) => Optional.some(renderToggleMenuItem(parseForHorizontalMenu(d), itemResponse, providersBackstage, menuHasIcons)));\n            case 'separator':\n                return createSeparatorMenuItem(item).fold(handleError, (d) => Optional.some(renderSeparatorItem(d)));\n            case 'fancymenuitem':\n                return createFancyMenuItem(item).fold(handleError, \n                // Fancy menu items don't have shortcuts or icons\n                (d) => renderFancyMenuItem(d, backstage));\n            default: {\n                // eslint-disable-next-line no-console\n                console.error('Unknown item in general menu', item);\n                return Optional.none();\n            }\n        }\n    };\n    const createAutocompleteItems = (items, matchText, onItemValueHandler, columns, itemResponse, sharedBackstage, highlightOn) => {\n        // Render text and icons if we're using a single column, otherwise only render icons\n        const renderText = columns === 1;\n        const renderIcons = !renderText || menuHasIcons(items);\n        return cat(map$2(items, (item) => {\n            switch (item.type) {\n                case 'separator':\n                    return createSeparatorItem(item).fold(handleError, (d) => Optional.some(renderSeparatorItem(d)));\n                case 'cardmenuitem':\n                    return createCardMenuItem(item).fold(handleError, (d) => Optional.some(renderCardMenuItem({\n                        ...d,\n                        // Intercept action\n                        onAction: (api) => {\n                            d.onAction(api);\n                            onItemValueHandler(d.value, d.meta);\n                        }\n                    }, itemResponse, sharedBackstage, {\n                        itemBehaviours: tooltipBehaviour(d.meta, sharedBackstage, Optional.none()),\n                        cardText: {\n                            matchText,\n                            highlightOn\n                        }\n                    })));\n                case 'autocompleteitem':\n                default:\n                    return createAutocompleterItem(item).fold(handleError, (d) => Optional.some(renderAutocompleteItem(d, matchText, renderText, 'normal', onItemValueHandler, itemResponse, sharedBackstage, renderIcons)));\n            }\n        }));\n    };\n    const createPartialMenu = (value, items, itemResponse, backstage, isHorizontalMenu, searchMode) => {\n        const hasIcons = menuHasIcons(items);\n        const alloyItems = cat(map$2(items, (item) => {\n            // Have to check each item for an icon, instead of as part of hasIcons above,\n            // else in horizontal menus, items with an icon but without text will display\n            // with neither\n            const itemHasIcon = (i) => isHorizontalMenu ? !has$2(i, 'text') : hasIcons;\n            const createItem = (i) => createMenuItemFromBridge(i, itemResponse, backstage, itemHasIcon(i), isHorizontalMenu);\n            if (item.type === 'nestedmenuitem' && item.getSubmenuItems().length <= 0) {\n                return createItem({ ...item, enabled: false });\n            }\n            else {\n                return createItem(item);\n            }\n        }));\n        // The menu layout is dependent upon our search mode.\n        const menuLayout = identifyMenuLayout(searchMode);\n        const createPartial = isHorizontalMenu ?\n            createHorizontalPartialMenuWithAlloyItems :\n            createPartialMenuWithAlloyItems;\n        return createPartial(value, hasIcons, alloyItems, 1, menuLayout);\n    };\n    const createTieredDataFrom = (partialMenu) => tieredMenu.singleData(partialMenu.value, partialMenu);\n    const createInlineMenuFrom = (partialMenu, columns, focusMode, presets) => {\n        const movement = deriveMenuMovement(columns, presets);\n        const menuMarkers = markers(presets);\n        return {\n            data: createTieredDataFrom({\n                ...partialMenu,\n                movement,\n                menuBehaviours: SimpleBehaviours.unnamedEvents(columns !== 'auto' ? [] : [\n                    runOnAttached((comp, _se) => {\n                        detectSize(comp, 4, menuMarkers.item).each(({ numColumns, numRows }) => {\n                            Keying.setGridSize(comp, numRows, numColumns);\n                        });\n                    })\n                ])\n            }),\n            menu: {\n                markers: markers(presets),\n                fakeFocus: focusMode === FocusMode.ContentFocus\n            }\n        };\n    };\n\n    const rangeToSimRange = (r) => SimRange.create(SugarElement.fromDom(r.startContainer), r.startOffset, SugarElement.fromDom(r.endContainer), r.endOffset);\n    const register$c = (editor, sharedBackstage) => {\n        const autocompleterId = generate$6('autocompleter');\n        const processingAction = Cell(false);\n        const activeState = Cell(false);\n        const activeRange = value$2();\n        const autocompleter = build$1(InlineView.sketch({\n            dom: {\n                tag: 'div',\n                classes: ['tox-autocompleter'],\n                attributes: {\n                    id: autocompleterId\n                }\n            },\n            components: [],\n            fireDismissalEventInstead: {},\n            inlineBehaviours: derive$1([\n                config('dismissAutocompleter', [\n                    run$1(dismissRequested(), () => cancelIfNecessary()),\n                    run$1(highlight$1(), (_, se) => {\n                        getOpt(se.event.target, 'id').each((id) => set$9(SugarElement.fromDom(editor.getBody()), 'aria-activedescendant', id));\n                    }),\n                ])\n            ]),\n            lazySink: sharedBackstage.getSink\n        }));\n        const isMenuOpen = () => InlineView.isOpen(autocompleter);\n        const isActive = activeState.get;\n        const hideIfNecessary = () => {\n            if (isMenuOpen()) {\n                InlineView.hide(autocompleter);\n                editor.dom.remove(autocompleterId, false);\n                const editorBody = SugarElement.fromDom(editor.getBody());\n                getOpt(editorBody, 'aria-owns')\n                    .filter((ariaOwnsAttr) => ariaOwnsAttr === autocompleterId)\n                    .each(() => {\n                    remove$8(editorBody, 'aria-owns');\n                    remove$8(editorBody, 'aria-activedescendant');\n                });\n            }\n        };\n        const getMenu = () => InlineView.getContent(autocompleter).bind((tmenu) => {\n            // The autocompleter menu will be the first child component of the tiered menu.\n            // Unfortunately a memento can't be used to do this lookup because the component\n            // id is changed while generating the tiered menu.\n            return get$i(tmenu.components(), 0);\n        });\n        const cancelIfNecessary = () => editor.execCommand('mceAutocompleterClose');\n        const getCombinedItems = (matches) => {\n            const columns = findMap(matches, (m) => Optional.from(m.columns)).getOr(1);\n            return bind$3(matches, (match) => {\n                const choices = match.items;\n                return createAutocompleteItems(choices, match.matchText, (itemValue, itemMeta) => {\n                    const autocompleterApi = {\n                        hide: () => cancelIfNecessary(),\n                        reload: (fetchOptions) => {\n                            hideIfNecessary();\n                            editor.execCommand('mceAutocompleterReload', false, { fetchOptions });\n                        }\n                    };\n                    // Asks the editor for a new active range that emits an event that updates\n                    // the activeRange state not ideal but trying to avoid direct method calls to the core.\n                    // We need to get a fresh range since when you hit enter the IME commits and the updates the DOM so we then need to rescan.\n                    editor.execCommand('mceAutocompleterRefreshActiveRange');\n                    activeRange.get().each((range) => {\n                        processingAction.set(true);\n                        match.onAction(autocompleterApi, range, itemValue, itemMeta);\n                        processingAction.set(false);\n                    });\n                }, columns, ItemResponse$1.BUBBLE_TO_SANDBOX, sharedBackstage, match.highlightOn);\n            });\n        };\n        const display = (lookupData, items) => {\n            // Display the autocompleter menu\n            const columns = findMap(lookupData, (ld) => Optional.from(ld.columns)).getOr(1);\n            InlineView.showMenuAt(autocompleter, {\n                anchor: {\n                    type: 'selection',\n                    getSelection: () => activeRange.get().map(rangeToSimRange),\n                    root: SugarElement.fromDom(editor.getBody()),\n                }\n            }, createInlineMenuFrom(createPartialMenuWithAlloyItems('autocompleter-value', true, items, columns, { menuType: 'normal' }), columns, FocusMode.ContentFocus, \n            // Use the constant.\n            'normal'));\n            getMenu().each(Highlighting.highlightFirst);\n        };\n        const updateDisplay = (lookupData) => {\n            const combinedItems = getCombinedItems(lookupData);\n            // Open the autocompleter if there are items to show\n            if (combinedItems.length > 0) {\n                display(lookupData, combinedItems);\n                set$9(SugarElement.fromDom(editor.getBody()), 'aria-owns', autocompleterId);\n                if (!editor.inline) {\n                    cloneAutocompleterToEditorDoc();\n                }\n            }\n            else {\n                hideIfNecessary();\n            }\n        };\n        const cloneAutocompleterToEditorDoc = () => {\n            if (editor.dom.get(autocompleterId)) {\n                editor.dom.remove(autocompleterId, false);\n            }\n            const docElm = editor.getDoc().documentElement;\n            const selection = editor.selection.getNode();\n            const newElm = deep(autocompleter.element);\n            setAll(newElm, {\n                border: '0',\n                clip: 'rect(0 0 0 0)',\n                height: '1px',\n                margin: '-1px',\n                overflow: 'hidden',\n                padding: '0',\n                position: 'absolute',\n                width: '1px',\n                top: `${selection.offsetTop}px`,\n                left: `${selection.offsetLeft}px`,\n            });\n            editor.dom.add(docElm, newElm.dom);\n            // Clean up positioning styles so that the \"hidden\" autocompleter is around the selection\n            descendant(newElm, '[role=\"menu\"]').each((child) => {\n                remove$6(child, 'position');\n                remove$6(child, 'max-height');\n            });\n        };\n        editor.on('AutocompleterStart', ({ lookupData }) => {\n            activeState.set(true);\n            processingAction.set(false);\n            updateDisplay(lookupData);\n        });\n        editor.on('AutocompleterUpdate', ({ lookupData }) => updateDisplay(lookupData));\n        editor.on('AutocompleterUpdateActiveRange', ({ range }) => activeRange.set(range));\n        editor.on('AutocompleterEnd', () => {\n            // Hide the menu and reset\n            hideIfNecessary();\n            activeState.set(false);\n            processingAction.set(false);\n            activeRange.clear();\n        });\n        const autocompleterUiApi = {\n            cancelIfNecessary,\n            isMenuOpen,\n            isActive,\n            isProcessingAction: processingAction.get,\n            getMenu\n        };\n        AutocompleterEditorEvents.setup(autocompleterUiApi, editor);\n    };\n    const Autocompleter = {\n        register: register$c\n    };\n\n    const renderBar = (spec, backstage) => ({\n        dom: {\n            tag: 'div',\n            classes: ['tox-bar', 'tox-form__controls-h-stack']\n        },\n        components: map$2(spec.items, backstage.interpreter)\n    });\n\n    var global$4 = tinymce.util.Tools.resolve('tinymce.html.Entities');\n\n    const renderFormFieldWith = (pLabel, pField, extraClasses, extraBehaviours) => {\n        const spec = renderFormFieldSpecWith(pLabel, pField, extraClasses, extraBehaviours);\n        return FormField.sketch(spec);\n    };\n    const renderFormField = (pLabel, pField) => renderFormFieldWith(pLabel, pField, [], []);\n    const renderFormFieldSpecWith = (pLabel, pField, extraClasses, extraBehaviours) => ({\n        dom: renderFormFieldDomWith(extraClasses),\n        components: pLabel.toArray().concat([pField]),\n        fieldBehaviours: derive$1(extraBehaviours)\n    });\n    const renderFormFieldDom = () => renderFormFieldDomWith([]);\n    const renderFormFieldDomWith = (extraClasses) => ({\n        tag: 'div',\n        classes: ['tox-form__group'].concat(extraClasses)\n    });\n    const renderLabel$3 = (label, providersBackstage) => FormField.parts.label({\n        dom: {\n            tag: 'label',\n            classes: ['tox-label']\n        },\n        components: [\n            text$2(providersBackstage.translate(label))\n        ]\n    });\n\n    const formChangeEvent = generate$6('form-component-change');\n    const formInputEvent = generate$6('form-component-input');\n    const formCloseEvent = generate$6('form-close');\n    const formCancelEvent = generate$6('form-cancel');\n    const formActionEvent = generate$6('form-action');\n    const formSubmitEvent = generate$6('form-submit');\n    const formBlockEvent = generate$6('form-block');\n    const formUnblockEvent = generate$6('form-unblock');\n    const formTabChangeEvent = generate$6('form-tabchange');\n    const formResizeEvent = generate$6('form-resize');\n\n    const renderCollection = (spec, providersBackstage, initialData) => {\n        // DUPE with TextField.\n        const pLabel = spec.label.map((label) => renderLabel$3(label, providersBackstage));\n        const icons = providersBackstage.icons();\n        // TINY-10174: Icon string is either in icon pack or displayed directly\n        const getIcon = (icon) => icons[icon] ?? icon;\n        const runOnItem = (f) => (comp, se) => {\n            closest$3(se.event.target, '[data-collection-item-value]').each((target) => {\n                f(comp, se, target, get$g(target, 'data-collection-item-value'));\n            });\n        };\n        const setContents = (comp, items) => {\n            // Giving it a default `mode:design` context, these shouldn't run at all in mode:readonly\n            const disabled = providersBackstage.checkUiComponentContext('mode:design').shouldDisable || providersBackstage.isDisabled();\n            const disabledClass = disabled ? ' tox-collection__item--state-disabled' : '';\n            const htmlLines = map$2(items, (item) => {\n                const itemText = global$6.translate(item.text);\n                const textContent = spec.columns === 1 ? `<div class=\"tox-collection__item-label\">${itemText}</div>` : '';\n                const iconContent = `<div class=\"tox-collection__item-icon\">${getIcon(item.icon)}</div>`;\n                // Replacing the hyphens and underscores in collection items with spaces\n                // to ensure the screen readers pronounce the words correctly.\n                // This is only for aria purposes. Emoticon and Special Character names will still use _ and - for autocompletion.\n                const mapItemName = {\n                    '_': ' ',\n                    ' - ': ' ',\n                    '-': ' '\n                };\n                // Using aria-label here overrides the Apple description of emojis and special characters in Mac/ MS description in Windows.\n                // But if only the title attribute is used instead, the names are read out twice. i.e., the description followed by the item.text.\n                const ariaLabel = itemText.replace(/\\_| \\- |\\-/g, (match) => mapItemName[match]);\n                return `<div data-mce-tooltip=\"${ariaLabel}\" class=\"tox-collection__item${disabledClass}\" tabindex=\"-1\" data-collection-item-value=\"${global$4.encodeAllRaw(item.value)}\" aria-label=\"${ariaLabel}\">${iconContent}${textContent}</div>`;\n            });\n            const chunks = spec.columns !== 'auto' && spec.columns > 1 ? chunk$1(htmlLines, spec.columns) : [htmlLines];\n            const html = map$2(chunks, (ch) => `<div class=\"tox-collection__group\">${ch.join('')}</div>`);\n            set$8(comp.element, html.join(''));\n        };\n        const onClick = runOnItem((comp, se, tgt, itemValue) => {\n            se.stop();\n            if (!(providersBackstage.checkUiComponentContext('mode:design').shouldDisable || providersBackstage.isDisabled())) {\n                emitWith(comp, formActionEvent, {\n                    name: spec.name,\n                    value: itemValue\n                });\n            }\n        });\n        const collectionEvents = [\n            run$1(mouseover(), runOnItem((comp, se, tgt) => {\n                focus$4(tgt, true);\n            })),\n            run$1(click(), onClick),\n            run$1(tap(), onClick),\n            run$1(focusin(), runOnItem((comp, se, tgt) => {\n                descendant(comp.element, '.' + activeClass).each((currentActive) => {\n                    remove$3(currentActive, activeClass);\n                });\n                add$2(tgt, activeClass);\n            })),\n            run$1(focusout(), runOnItem((comp) => {\n                descendant(comp.element, '.' + activeClass).each((currentActive) => {\n                    remove$3(currentActive, activeClass);\n                    blur$1(currentActive);\n                });\n            })),\n            runOnExecute$1(runOnItem((comp, se, tgt, itemValue) => {\n                emitWith(comp, formActionEvent, {\n                    name: spec.name,\n                    value: itemValue\n                });\n            })),\n        ];\n        const iterCollectionItems = (comp, applyAttributes) => map$2(descendants(comp.element, '.tox-collection__item'), applyAttributes);\n        const pField = FormField.parts.field({\n            dom: {\n                tag: 'div',\n                // FIX: Read from columns\n                classes: ['tox-collection'].concat(spec.columns !== 1 ? ['tox-collection--grid'] : ['tox-collection--list'])\n            },\n            components: [],\n            factory: { sketch: identity },\n            behaviours: derive$1([\n                Disabling.config({\n                    disabled: () => providersBackstage.checkUiComponentContext(spec.context).shouldDisable,\n                    onDisabled: (comp) => {\n                        iterCollectionItems(comp, (childElm) => {\n                            add$2(childElm, 'tox-collection__item--state-disabled');\n                            set$9(childElm, 'aria-disabled', true);\n                        });\n                    },\n                    onEnabled: (comp) => {\n                        iterCollectionItems(comp, (childElm) => {\n                            remove$3(childElm, 'tox-collection__item--state-disabled');\n                            remove$8(childElm, 'aria-disabled');\n                        });\n                    }\n                }),\n                toggleOnReceive(() => providersBackstage.checkUiComponentContext(spec.context)),\n                Replacing.config({}),\n                Tooltipping.config({\n                    ...providersBackstage.tooltips.getConfig({\n                        tooltipText: '',\n                        onShow: (comp) => {\n                            descendant(comp.element, '.' + activeClass + '[data-mce-tooltip]').each((current) => {\n                                getOpt(current, 'data-mce-tooltip').each((text) => {\n                                    Tooltipping.setComponents(comp, providersBackstage.tooltips.getComponents({ tooltipText: text }));\n                                });\n                            });\n                        }\n                    }),\n                    mode: 'children-keyboard-focus',\n                    anchor: (comp) => ({\n                        type: 'node',\n                        node: descendant(comp.element, '.' + activeClass).orThunk(() => first('.tox-collection__item')),\n                        root: comp.element,\n                        layouts: {\n                            onLtr: constant$1([south$2, north$2, southeast$2, northeast$2, southwest$2, northwest$2]),\n                            onRtl: constant$1([south$2, north$2, southeast$2, northeast$2, southwest$2, northwest$2])\n                        },\n                        bubble: nu$6(0, -2, {}),\n                    })\n                }),\n                Representing.config({\n                    store: {\n                        mode: 'memory',\n                        initialValue: initialData.getOr([])\n                    },\n                    onSetValue: (comp, items) => {\n                        setContents(comp, items);\n                        if (spec.columns === 'auto') {\n                            detectSize(comp, 5, 'tox-collection__item').each(({ numRows, numColumns }) => {\n                                Keying.setGridSize(comp, numRows, numColumns);\n                            });\n                        }\n                        emit(comp, formResizeEvent);\n                    }\n                }),\n                Tabstopping.config({}),\n                Keying.config(deriveCollectionMovement(spec.columns, 'normal')),\n                config('collection-events', collectionEvents)\n            ]),\n            eventOrder: {\n                [execute$5()]: ['disabling', 'alloy.base.behaviour', 'collection-events'],\n                [focusin()]: ['collection-events', 'tooltipping'],\n            }\n        });\n        const extraClasses = ['tox-form__group--collection'];\n        return renderFormFieldWith(pLabel, pField, extraClasses, []);\n    };\n\n    const renderPanelButton = (spec, sharedBackstage) => Dropdown.sketch({\n        dom: spec.dom,\n        components: spec.components,\n        toggleClass: 'mce-active',\n        dropdownBehaviours: derive$1([\n            DisablingConfigs.button(() => sharedBackstage.providers.isDisabled() || sharedBackstage.providers.checkUiComponentContext(spec.context).shouldDisable),\n            toggleOnReceive(() => sharedBackstage.providers.checkUiComponentContext(spec.context)),\n            Unselecting.config({}),\n            Tabstopping.config({})\n        ]),\n        layouts: spec.layouts,\n        sandboxClasses: ['tox-dialog__popups'],\n        lazySink: sharedBackstage.getSink,\n        fetch: (comp) => Future.nu((callback) => spec.fetch(callback)).map((items) => Optional.from(createTieredDataFrom(deepMerge(createPartialChoiceMenu(generate$6('menu-value'), items, (value) => {\n            spec.onItemAction(comp, value);\n        }, spec.columns, spec.presets, ItemResponse$1.CLOSE_ON_EXECUTE, \n        // No colour is ever selected on opening\n        never, sharedBackstage.providers), {\n            movement: deriveMenuMovement(spec.columns, spec.presets)\n        })))),\n        parts: {\n            menu: part(false, 1, spec.presets)\n        }\n    });\n\n    const colorInputChangeEvent = generate$6('color-input-change');\n    const colorSwatchChangeEvent = generate$6('color-swatch-change');\n    const colorPickerCancelEvent = generate$6('color-picker-cancel');\n    const renderColorInput = (spec, sharedBackstage, colorInputBackstage, initialData) => {\n        const pField = FormField.parts.field({\n            factory: Input,\n            inputClasses: ['tox-textfield'],\n            data: initialData,\n            onSetValue: (c) => Invalidating.run(c).get(noop),\n            inputBehaviours: derive$1([\n                Disabling.config({\n                    disabled: () => sharedBackstage.providers.isDisabled() || sharedBackstage.providers.checkUiComponentContext(spec.context).shouldDisable\n                }),\n                toggleOnReceive(() => sharedBackstage.providers.checkUiComponentContext(spec.context)),\n                Tabstopping.config({}),\n                Invalidating.config({\n                    invalidClass: 'tox-textbox-field-invalid',\n                    getRoot: (comp) => parentElement(comp.element),\n                    notify: {\n                        onValid: (comp) => {\n                            // onValid should pass through the value here\n                            // We need a snapshot of the value validated.\n                            const val = Representing.getValue(comp);\n                            emitWith(comp, colorInputChangeEvent, {\n                                color: val\n                            });\n                        }\n                    },\n                    validator: {\n                        validateOnLoad: false,\n                        validate: (input) => {\n                            const inputValue = Representing.getValue(input);\n                            // Consider empty strings valid colours\n                            if (inputValue.length === 0) {\n                                return Future.pure(Result.value(true));\n                            }\n                            else {\n                                const span = SugarElement.fromTag('span');\n                                set$7(span, 'background-color', inputValue);\n                                const res = getRaw(span, 'background-color').fold(\n                                // TODO: Work out what we want to do here.\n                                () => Result.error('blah'), (_) => Result.value(inputValue));\n                                return Future.pure(res);\n                            }\n                        }\n                    }\n                })\n            ]),\n            selectOnFocus: false\n        });\n        const pLabel = spec.label.map((label) => renderLabel$3(label, sharedBackstage.providers));\n        const emitSwatchChange = (colorBit, value) => {\n            emitWith(colorBit, colorSwatchChangeEvent, {\n                value\n            });\n        };\n        const onItemAction = (comp, value) => {\n            memColorButton.getOpt(comp).each((colorBit) => {\n                if (value === 'custom') {\n                    colorInputBackstage.colorPicker((valueOpt) => {\n                        valueOpt.fold(() => emit(colorBit, colorPickerCancelEvent), (value) => {\n                            emitSwatchChange(colorBit, value);\n                            addColor(spec.storageKey, value);\n                        });\n                    }, '#ffffff');\n                }\n                else if (value === 'remove') {\n                    emitSwatchChange(colorBit, '');\n                }\n                else {\n                    emitSwatchChange(colorBit, value);\n                }\n            });\n        };\n        const memColorButton = record(renderPanelButton({\n            dom: {\n                tag: 'span',\n                attributes: {\n                    'aria-label': sharedBackstage.providers.translate('Color swatch')\n                }\n            },\n            layouts: {\n                onRtl: () => [southwest$2, southeast$2, south$2],\n                onLtr: () => [southeast$2, southwest$2, south$2]\n            },\n            components: [],\n            fetch: getFetch$1(colorInputBackstage.getColors(spec.storageKey), spec.storageKey, colorInputBackstage.hasCustomColors()),\n            columns: colorInputBackstage.getColorCols(spec.storageKey),\n            presets: 'color',\n            onItemAction,\n            context: spec.context\n        }, sharedBackstage));\n        return FormField.sketch({\n            dom: {\n                tag: 'div',\n                classes: ['tox-form__group']\n            },\n            components: pLabel.toArray().concat([\n                {\n                    dom: {\n                        tag: 'div',\n                        classes: ['tox-color-input']\n                    },\n                    components: [\n                        pField,\n                        memColorButton.asSpec()\n                    ]\n                }\n            ]),\n            fieldBehaviours: derive$1([\n                config('form-field-events', [\n                    run$1(colorInputChangeEvent, (comp, se) => {\n                        memColorButton.getOpt(comp).each((colorButton) => {\n                            set$7(colorButton.element, 'background-color', se.event.color);\n                        });\n                        emitWith(comp, formChangeEvent, { name: spec.name });\n                    }),\n                    run$1(colorSwatchChangeEvent, (comp, se) => {\n                        FormField.getField(comp).each((field) => {\n                            Representing.setValue(field, se.event.value);\n                            // Focus the field now that we've set its value\n                            Composing.getCurrent(comp).each(Focusing.focus);\n                        });\n                    }),\n                    run$1(colorPickerCancelEvent, (comp, _se) => {\n                        FormField.getField(comp).each((_field) => {\n                            Composing.getCurrent(comp).each(Focusing.focus);\n                        });\n                    })\n                ])\n            ])\n        });\n    };\n\n    // TODO: Move this to alloy if the concept works out\n    // eslint-disable-next-line consistent-this\n    const self = () => Composing.config({\n        find: Optional.some\n    });\n    const memento$1 = (mem) => Composing.config({\n        find: mem.getOpt\n    });\n    const childAt = (index) => Composing.config({\n        find: (comp) => child$2(comp.element, index)\n            .bind((element) => comp.getSystem().getByDom(element).toOptional())\n    });\n    const ComposingConfigs = {\n        self,\n        memento: memento$1,\n        childAt\n    };\n\n    const processors = objOf([\n        defaulted('preprocess', identity),\n        defaulted('postprocess', identity)\n    ]);\n    const memento = (mem, rawProcessors) => {\n        const ps = asRawOrDie$1('RepresentingConfigs.memento processors', processors, rawProcessors);\n        return Representing.config({\n            store: {\n                mode: 'manual',\n                getValue: (comp) => {\n                    const other = mem.get(comp);\n                    const rawValue = Representing.getValue(other);\n                    return ps.postprocess(rawValue);\n                },\n                setValue: (comp, rawValue) => {\n                    const newValue = ps.preprocess(rawValue);\n                    const other = mem.get(comp);\n                    Representing.setValue(other, newValue);\n                }\n            }\n        });\n    };\n    const withComp = (optInitialValue, getter, setter) => Representing.config({\n        store: {\n            mode: 'manual',\n            ...optInitialValue.map((initialValue) => ({ initialValue })).getOr({}),\n            getValue: getter,\n            setValue: setter\n        }\n    });\n    const withElement = (initialValue, getter, setter) => withComp(initialValue, (c) => getter(c.element), (c, v) => setter(c.element, v));\n    const domHtml = (optInitialValue) => withElement(optInitialValue, get$f, set$8);\n    const memory = (initialValue) => Representing.config({\n        store: {\n            mode: 'memory',\n            initialValue\n        }\n    });\n\n    const fieldsUpdate = generate$6('rgb-hex-update');\n    const sliderUpdate = generate$6('slider-update');\n    const paletteUpdate = generate$6('palette-update');\n\n    const sliderFactory = (translate, getClass) => {\n        const spectrum = Slider.parts.spectrum({\n            dom: {\n                tag: 'div',\n                classes: [getClass('hue-slider-spectrum')],\n                attributes: {\n                    role: 'presentation'\n                }\n            }\n        });\n        const thumb = Slider.parts.thumb({\n            dom: {\n                tag: 'div',\n                classes: [getClass('hue-slider-thumb')],\n                attributes: {\n                    role: 'presentation'\n                }\n            }\n        });\n        return Slider.sketch({\n            dom: {\n                tag: 'div',\n                classes: [getClass('hue-slider')],\n                attributes: {\n                    'role': 'slider',\n                    'aria-valuemin': 0,\n                    'aria-valuemax': 360,\n                    'aria-valuenow': 120,\n                }\n            },\n            rounded: false,\n            model: {\n                mode: 'y',\n                getInitialValue: constant$1(0)\n            },\n            components: [\n                spectrum,\n                thumb\n            ],\n            sliderBehaviours: derive$1([\n                Focusing.config({})\n            ]),\n            onChange: (slider, _thumb, value) => {\n                set$9(slider.element, 'aria-valuenow', Math.floor(360 - (value * 3.6)));\n                emitWith(slider, sliderUpdate, {\n                    value\n                });\n            }\n        });\n    };\n\n    const validInput = generate$6('valid-input');\n    const invalidInput = generate$6('invalid-input');\n    const validatingInput = generate$6('validating-input');\n    const translatePrefix = 'colorcustom.rgb.';\n    const uninitiatedTooltipApi = {\n        isEnabled: always,\n        setEnabled: noop,\n        immediatelyShow: noop,\n        immediatelyHide: noop,\n    };\n    const rgbFormFactory = (translate, getClass, onValidHexx, onInvalidHexx, tooltipGetConfig, makeIcon) => {\n        const setTooltipEnabled = (enabled, tooltipApi) => {\n            const api = tooltipApi.get();\n            if (enabled === api.isEnabled()) {\n                return;\n            }\n            api.setEnabled(enabled);\n            if (enabled) {\n                api.immediatelyShow();\n            }\n            else {\n                api.immediatelyHide();\n            }\n        };\n        const invalidation = (label, isValid, tooltipApi) => Invalidating.config({\n            invalidClass: getClass('invalid'),\n            notify: {\n                onValidate: (comp) => {\n                    emitWith(comp, validatingInput, {\n                        type: label\n                    });\n                },\n                onValid: (comp) => {\n                    setTooltipEnabled(false, tooltipApi);\n                    emitWith(comp, validInput, {\n                        type: label,\n                        value: Representing.getValue(comp)\n                    });\n                },\n                onInvalid: (comp) => {\n                    setTooltipEnabled(true, tooltipApi);\n                    emitWith(comp, invalidInput, {\n                        type: label,\n                        value: Representing.getValue(comp)\n                    });\n                }\n            },\n            validator: {\n                validate: (comp) => {\n                    const value = Representing.getValue(comp);\n                    const res = isValid(value) ? Result.value(true) : Result.error(translate('aria.input.invalid'));\n                    return Future.pure(res);\n                },\n                validateOnLoad: false\n            }\n        });\n        const renderTextField = (isValid, name, label, description, data) => {\n            const tooltipApi = Cell(uninitiatedTooltipApi);\n            const helptext = translate(translatePrefix + 'range');\n            const pLabel = FormField.parts.label({\n                dom: { tag: 'label' },\n                components: [text$2(label)]\n            });\n            const pField = FormField.parts.field({\n                data,\n                factory: Input,\n                inputAttributes: {\n                    'type': 'text',\n                    'aria-label': description,\n                    ...name === 'hex' ? { 'aria-live': 'polite' } : {}\n                },\n                inputClasses: [getClass('textfield')],\n                // Have basic invalidating and tabstopping behaviour.\n                inputBehaviours: derive$1([\n                    invalidation(name, isValid, tooltipApi),\n                    Tabstopping.config({}),\n                    Tooltipping.config({\n                        ...tooltipGetConfig({\n                            tooltipText: '',\n                            onSetup: (comp) => {\n                                tooltipApi.set({\n                                    isEnabled: () => {\n                                        return Tooltipping.isEnabled(comp);\n                                    },\n                                    setEnabled: (enabled) => {\n                                        return Tooltipping.setEnabled(comp, enabled);\n                                    },\n                                    immediatelyShow: () => {\n                                        return Tooltipping.immediateOpenClose(comp, true);\n                                    },\n                                    immediatelyHide: () => {\n                                        return Tooltipping.immediateOpenClose(comp, false);\n                                    },\n                                });\n                                Tooltipping.setEnabled(comp, false);\n                            },\n                            onShow: (component, _tooltip) => {\n                                Tooltipping.setComponents(component, [\n                                    {\n                                        dom: {\n                                            tag: 'p',\n                                            classes: [\n                                                getClass('rgb-warning-note')\n                                            ]\n                                        },\n                                        components: [text$2(translate(name === 'hex' ? 'colorcustom.rgb.invalidHex' : 'colorcustom.rgb.invalid'))]\n                                    }\n                                ]);\n                            },\n                        })\n                    })\n                ]),\n                // If it was invalid, and the value was set, run validation against it.\n                onSetValue: (input) => {\n                    if (Invalidating.isInvalid(input)) {\n                        const run = Invalidating.run(input);\n                        run.get(noop);\n                    }\n                }\n            });\n            const errorId = generate$6('aria-invalid');\n            const memInvalidIcon = record(makeIcon('invalid', Optional.some(errorId), 'warning'));\n            const memStatus = record({\n                dom: {\n                    tag: 'div',\n                    classes: [getClass('invalid-icon')]\n                },\n                components: [\n                    memInvalidIcon.asSpec()\n                ]\n            });\n            const comps = [pLabel, pField, memStatus.asSpec()];\n            const concats = name !== 'hex' ? [FormField.parts['aria-descriptor']({\n                    text: helptext\n                })] : [];\n            const components = comps.concat(concats);\n            return {\n                dom: {\n                    tag: 'div',\n                    attributes: {\n                        role: 'presentation'\n                    },\n                    classes: [\n                        getClass('rgb-container'),\n                    ]\n                },\n                components\n            };\n        };\n        const copyRgbToHex = (form, rgba) => {\n            const hex = fromRgba(rgba);\n            Form.getField(form, 'hex').each((hexField) => {\n                // Not amazing, but it turns out that if we have an invalid RGB field, and no hex code\n                // and then type in a valid three digit hex code, the RGB field will be overriden, then validate and then set\n                // the hex field to be the six digit version of that same three digit hex code. This is incorrect.\n                if (!Focusing.isFocused(hexField)) {\n                    Representing.setValue(form, {\n                        hex: hex.value\n                    });\n                }\n            });\n            return hex;\n        };\n        const copyRgbToForm = (form, rgb) => {\n            const red = rgb.red;\n            const green = rgb.green;\n            const blue = rgb.blue;\n            Representing.setValue(form, { red, green, blue });\n        };\n        const memPreview = record({\n            dom: {\n                tag: 'div',\n                classes: [getClass('rgba-preview')],\n                styles: {\n                    'background-color': 'white'\n                },\n                attributes: {\n                    role: 'presentation'\n                }\n            }\n        });\n        const updatePreview = (anyInSystem, hex) => {\n            memPreview.getOpt(anyInSystem).each((preview) => {\n                set$7(preview.element, 'background-color', '#' + hex.value);\n            });\n        };\n        const factory = () => {\n            const state = {\n                red: Cell(Optional.some(255)),\n                green: Cell(Optional.some(255)),\n                blue: Cell(Optional.some(255)),\n                hex: Cell(Optional.some('ffffff'))\n            };\n            const copyHexToRgb = (form, hex) => {\n                const rgb = fromHex(hex);\n                copyRgbToForm(form, rgb);\n                setValueRgb(rgb);\n            };\n            const get = (prop) => state[prop].get();\n            const set = (prop, value) => {\n                state[prop].set(value);\n            };\n            const getValueRgb = () => get('red').bind((red) => get('green').bind((green) => get('blue').map((blue) => rgbaColour(red, green, blue, 1))));\n            // TODO: Find way to use this for palette and slider updates\n            const setValueRgb = (rgb) => {\n                const red = rgb.red;\n                const green = rgb.green;\n                const blue = rgb.blue;\n                set('red', Optional.some(red));\n                set('green', Optional.some(green));\n                set('blue', Optional.some(blue));\n            };\n            const onInvalidInput = (form, simulatedEvent) => {\n                const data = simulatedEvent.event;\n                if (data.type !== 'hex') {\n                    set(data.type, Optional.none());\n                }\n                else {\n                    onInvalidHexx(form);\n                }\n            };\n            const onValidHex = (form, value) => {\n                onValidHexx(form);\n                const hex = hexColour(value);\n                set('hex', Optional.some(hex.value));\n                const rgb = fromHex(hex);\n                copyRgbToForm(form, rgb);\n                setValueRgb(rgb);\n                emitWith(form, fieldsUpdate, {\n                    hex\n                });\n                updatePreview(form, hex);\n            };\n            const onValidRgb = (form, prop, value) => {\n                const val = parseInt(value, 10);\n                set(prop, Optional.some(val));\n                getValueRgb().each((rgb) => {\n                    const hex = copyRgbToHex(form, rgb);\n                    emitWith(form, fieldsUpdate, {\n                        hex\n                    });\n                    updatePreview(form, hex);\n                });\n            };\n            const isHexInputEvent = (data) => data.type === 'hex';\n            const onValidInput = (form, simulatedEvent) => {\n                const data = simulatedEvent.event;\n                if (isHexInputEvent(data)) {\n                    onValidHex(form, data.value);\n                }\n                else {\n                    onValidRgb(form, data.type, data.value);\n                }\n            };\n            const formPartStrings = (key) => ({\n                label: translate(translatePrefix + key + '.label'),\n                description: translate(translatePrefix + key + '.description')\n            });\n            const redStrings = formPartStrings('red');\n            const greenStrings = formPartStrings('green');\n            const blueStrings = formPartStrings('blue');\n            const hexStrings = formPartStrings('hex');\n            // TODO: Provide a nice way of adding APIs to existing sketchers\n            return deepMerge(Form.sketch((parts) => ({\n                dom: {\n                    tag: 'form',\n                    classes: [getClass('rgb-form')],\n                    attributes: { 'aria-label': translate('aria.color.picker') }\n                },\n                components: [\n                    parts.field('red', FormField.sketch(renderTextField(isRgbaComponent, 'red', redStrings.label, redStrings.description, 255))),\n                    parts.field('green', FormField.sketch(renderTextField(isRgbaComponent, 'green', greenStrings.label, greenStrings.description, 255))),\n                    parts.field('blue', FormField.sketch(renderTextField(isRgbaComponent, 'blue', blueStrings.label, blueStrings.description, 255))),\n                    parts.field('hex', FormField.sketch(renderTextField(isHexString, 'hex', hexStrings.label, hexStrings.description, 'ffffff'))),\n                    memPreview.asSpec()\n                ],\n                formBehaviours: derive$1([\n                    Invalidating.config({\n                        invalidClass: getClass('form-invalid')\n                    }),\n                    config('rgb-form-events', [\n                        run$1(validInput, onValidInput),\n                        run$1(invalidInput, onInvalidInput),\n                        run$1(validatingInput, onInvalidInput)\n                    ])\n                ])\n            })), {\n                apis: {\n                    updateHex: (form, hex) => {\n                        Representing.setValue(form, {\n                            hex: hex.value\n                        });\n                        copyHexToRgb(form, hex);\n                        updatePreview(form, hex);\n                    }\n                }\n            });\n        };\n        const rgbFormSketcher = single({\n            factory,\n            name: 'RgbForm',\n            configFields: [],\n            apis: {\n                updateHex: (apis, form, hex) => {\n                    apis.updateHex(form, hex);\n                }\n            },\n            extraApis: {}\n        });\n        return rgbFormSketcher;\n    };\n\n    const paletteFactory = (translate, getClass) => {\n        const spectrumPart = Slider.parts.spectrum({\n            dom: {\n                tag: 'canvas',\n                attributes: {\n                    role: 'presentation'\n                },\n                classes: [getClass('sv-palette-spectrum')]\n            }\n        });\n        const thumbPart = Slider.parts.thumb({\n            dom: {\n                tag: 'div',\n                attributes: {\n                    role: 'presentation'\n                },\n                classes: [getClass('sv-palette-thumb')],\n                innerHtml: `<div class=${getClass('sv-palette-inner-thumb')} role=\"presentation\"></div>`\n            }\n        });\n        const setColour = (canvas, rgba) => {\n            const { width, height } = canvas;\n            const ctx = canvas.getContext('2d');\n            if (ctx === null) {\n                return;\n            }\n            ctx.fillStyle = rgba;\n            ctx.fillRect(0, 0, width, height);\n            const grdWhite = ctx.createLinearGradient(0, 0, width, 0);\n            grdWhite.addColorStop(0, 'rgba(255,255,255,1)');\n            grdWhite.addColorStop(1, 'rgba(255,255,255,0)');\n            ctx.fillStyle = grdWhite;\n            ctx.fillRect(0, 0, width, height);\n            const grdBlack = ctx.createLinearGradient(0, 0, 0, height);\n            grdBlack.addColorStop(0, 'rgba(0,0,0,0)');\n            grdBlack.addColorStop(1, 'rgba(0,0,0,1)');\n            ctx.fillStyle = grdBlack;\n            ctx.fillRect(0, 0, width, height);\n        };\n        const setPaletteHue = (slider, hue) => {\n            const canvas = slider.components()[0].element.dom;\n            const hsv = hsvColour(hue, 100, 100);\n            const rgba = fromHsv(hsv);\n            setColour(canvas, toString(rgba));\n        };\n        const setPaletteThumb = (slider, hex) => {\n            const hsv = fromRgb(fromHex(hex));\n            Slider.setValue(slider, { x: hsv.saturation, y: 100 - hsv.value });\n            set$9(slider.element, 'aria-valuetext', translate(['Saturation {0}%, Brightness {1}%', hsv.saturation, hsv.value]));\n        };\n        const factory = (_detail) => {\n            const getInitialValue = constant$1({\n                x: 0,\n                y: 0\n            });\n            const onChange = (slider, _thumb, value) => {\n                if (!isNumber(value)) {\n                    set$9(slider.element, 'aria-valuetext', translate(['Saturation {0}%, Brightness {1}%', Math.floor(value.x), Math.floor(100 - value.y)]));\n                }\n                emitWith(slider, paletteUpdate, {\n                    value\n                });\n            };\n            const onInit = (_slider, _thumb, spectrum, _value) => {\n                // Maybe make this initial value configurable?\n                setColour(spectrum.element.dom, toString(red));\n            };\n            const sliderBehaviours = derive$1([\n                Composing.config({\n                    find: Optional.some\n                }),\n                Focusing.config({})\n            ]);\n            return Slider.sketch({\n                dom: {\n                    tag: 'div',\n                    attributes: {\n                        'role': 'slider',\n                        'aria-valuetext': translate(['Saturation {0}%, Brightness {1}%', 0, 0])\n                    },\n                    classes: [getClass('sv-palette')]\n                },\n                model: {\n                    mode: 'xy',\n                    getInitialValue,\n                },\n                rounded: false,\n                components: [\n                    spectrumPart,\n                    thumbPart\n                ],\n                onChange,\n                onInit,\n                sliderBehaviours\n            });\n        };\n        const saturationBrightnessPaletteSketcher = single({\n            factory,\n            name: 'SaturationBrightnessPalette',\n            configFields: [],\n            apis: {\n                setHue: (_apis, slider, hue) => {\n                    setPaletteHue(slider, hue);\n                },\n                setThumb: (_apis, slider, hex) => {\n                    setPaletteThumb(slider, hex);\n                }\n            },\n            extraApis: {}\n        });\n        return saturationBrightnessPaletteSketcher;\n    };\n\n    const makeFactory = (translate, getClass, tooltipConfig, makeIcon) => {\n        const factory = (detail) => {\n            const rgbForm = rgbFormFactory(translate, getClass, detail.onValidHex, detail.onInvalidHex, tooltipConfig, makeIcon);\n            const sbPalette = paletteFactory(translate, getClass);\n            const hueSliderToDegrees = (hue) => (100 - hue) / 100 * 360;\n            const hueDegreesToSlider = (hue) => 100 - (hue / 360) * 100;\n            const state = {\n                paletteRgba: Cell(red),\n                paletteHue: Cell(0)\n            };\n            const memSlider = record(sliderFactory(translate, getClass));\n            const memPalette = record(sbPalette.sketch({}));\n            const memRgb = record(rgbForm.sketch({}));\n            const updatePalette = (anyInSystem, _hex, hue) => {\n                memPalette.getOpt(anyInSystem).each((palette) => {\n                    sbPalette.setHue(palette, hue);\n                });\n            };\n            const updateFields = (anyInSystem, hex) => {\n                memRgb.getOpt(anyInSystem).each((form) => {\n                    rgbForm.updateHex(form, hex);\n                });\n            };\n            const updateSlider = (anyInSystem, _hex, hue) => {\n                memSlider.getOpt(anyInSystem).each((slider) => {\n                    Slider.setValue(slider, hueDegreesToSlider(hue));\n                });\n            };\n            const updatePaletteThumb = (anyInSystem, hex) => {\n                memPalette.getOpt(anyInSystem).each((palette) => {\n                    sbPalette.setThumb(palette, hex);\n                });\n            };\n            const updateState = (hex, hue) => {\n                const rgba = fromHex(hex);\n                state.paletteRgba.set(rgba);\n                state.paletteHue.set(hue);\n            };\n            const runUpdates = (anyInSystem, hex, hue, updates) => {\n                updateState(hex, hue);\n                each$1(updates, (update) => {\n                    update(anyInSystem, hex, hue);\n                });\n            };\n            const onPaletteUpdate = () => {\n                const updates = [updateFields];\n                return (form, simulatedEvent) => {\n                    const value = simulatedEvent.event.value;\n                    const oldHue = state.paletteHue.get();\n                    const newHsv = hsvColour(oldHue, value.x, (100 - value.y));\n                    const newHex = hsvToHex(newHsv);\n                    runUpdates(form, newHex, oldHue, updates);\n                };\n            };\n            const onSliderUpdate = () => {\n                const updates = [updatePalette, updateFields];\n                return (form, simulatedEvent) => {\n                    const hue = hueSliderToDegrees(simulatedEvent.event.value);\n                    const oldRgb = state.paletteRgba.get();\n                    const oldHsv = fromRgb(oldRgb);\n                    const newHsv = hsvColour(hue, oldHsv.saturation, oldHsv.value);\n                    const newHex = hsvToHex(newHsv);\n                    runUpdates(form, newHex, hue, updates);\n                };\n            };\n            const onFieldsUpdate = () => {\n                const updates = [updatePalette, updateSlider, updatePaletteThumb];\n                return (form, simulatedEvent) => {\n                    const hex = simulatedEvent.event.hex;\n                    const hsv = hexToHsv(hex);\n                    runUpdates(form, hex, hsv.hue, updates);\n                };\n            };\n            return {\n                uid: detail.uid,\n                dom: detail.dom,\n                components: [\n                    memPalette.asSpec(),\n                    memSlider.asSpec(),\n                    memRgb.asSpec()\n                ],\n                behaviours: derive$1([\n                    config('colour-picker-events', [\n                        run$1(fieldsUpdate, onFieldsUpdate()),\n                        run$1(paletteUpdate, onPaletteUpdate()),\n                        run$1(sliderUpdate, onSliderUpdate())\n                    ]),\n                    Composing.config({\n                        find: (comp) => memRgb.getOpt(comp)\n                    }),\n                    Keying.config({\n                        mode: 'acyclic'\n                    })\n                ])\n            };\n        };\n        const colourPickerSketcher = single({\n            name: 'ColourPicker',\n            configFields: [\n                required$1('dom'),\n                defaulted('onValidHex', noop),\n                defaulted('onInvalidHex', noop)\n            ],\n            factory\n        });\n        return colourPickerSketcher;\n    };\n\n    const english = {\n        'colorcustom.rgb.red.label': 'R',\n        'colorcustom.rgb.red.description': 'Red channel',\n        'colorcustom.rgb.green.label': 'G',\n        'colorcustom.rgb.green.description': 'Green channel',\n        'colorcustom.rgb.blue.label': 'B',\n        'colorcustom.rgb.blue.description': 'Blue channel',\n        'colorcustom.rgb.hex.label': '#',\n        'colorcustom.rgb.hex.description': 'Hex color code',\n        'colorcustom.rgb.range': 'Range 0 to 255',\n        'colorcustom.rgb.invalid': 'Numbers only, 0 to 255',\n        'colorcustom.rgb.invalidHex': 'Hexadecimal only, 000000 to FFFFFF',\n        'aria.color.picker': 'Color Picker',\n        'aria.input.invalid': 'Invalid input'\n    };\n    const translate = (providerBackstage) => (key) => {\n        if (isString(key)) {\n            return providerBackstage.translate(english[key]);\n        }\n        else {\n            return providerBackstage.translate(key);\n        }\n    };\n    const renderColorPicker = (_spec, providerBackstage, initialData) => {\n        const getClass = (key) => 'tox-' + key;\n        const renderIcon = (name, errId, icon = name, label = name) => render$4(icon, {\n            tag: 'div',\n            classes: ['tox-icon', 'tox-control-wrap__status-icon-' + name],\n            attributes: {\n                'title': providerBackstage.translate(label),\n                'aria-live': 'polite',\n                ...errId.fold(() => ({}), (id) => ({ id }))\n            }\n        }, providerBackstage.icons);\n        const colourPickerFactory = makeFactory(translate(providerBackstage), getClass, providerBackstage.tooltips.getConfig, renderIcon);\n        const onValidHex = (form) => {\n            emitWith(form, formActionEvent, { name: 'hex-valid', value: true });\n        };\n        const onInvalidHex = (form) => {\n            emitWith(form, formActionEvent, { name: 'hex-valid', value: false });\n        };\n        const memPicker = record(colourPickerFactory.sketch({\n            dom: {\n                tag: 'div',\n                classes: [getClass('color-picker-container')],\n                attributes: {\n                    role: 'presentation'\n                }\n            },\n            onValidHex,\n            onInvalidHex\n        }));\n        return {\n            dom: {\n                tag: 'div'\n            },\n            components: [\n                memPicker.asSpec()\n            ],\n            behaviours: derive$1([\n                // We'll allow invalid values\n                withComp(initialData, (comp) => {\n                    const picker = memPicker.get(comp);\n                    const optRgbForm = Composing.getCurrent(picker);\n                    const optHex = optRgbForm.bind((rgbForm) => {\n                        const formValues = Representing.getValue(rgbForm);\n                        return formValues.hex;\n                    });\n                    return optHex.map((hex) => '#' + removeLeading(hex, '#')).getOr('');\n                }, (comp, newValue) => {\n                    const pattern = /^#([a-fA-F0-9]{3}(?:[a-fA-F0-9]{3})?)/;\n                    const valOpt = Optional.from(pattern.exec(newValue)).bind((matches) => get$i(matches, 1));\n                    const picker = memPicker.get(comp);\n                    const optRgbForm = Composing.getCurrent(picker);\n                    optRgbForm.fold(() => {\n                        // eslint-disable-next-line no-console\n                        console.log('Can not find form');\n                    }, (rgbForm) => {\n                        Representing.setValue(rgbForm, {\n                            hex: valOpt.getOr('')\n                        });\n                        // So not the way to do this.\n                        Form.getField(rgbForm, 'hex').each((hexField) => {\n                            emit(hexField, input());\n                        });\n                    });\n                }),\n                ComposingConfigs.self()\n            ])\n        };\n    };\n\n    var global$3 = tinymce.util.Tools.resolve('tinymce.Resource');\n\n    const isOldCustomEditor = (spec) => has$2(spec, 'init');\n    const renderCustomEditor = (spec) => {\n        const editorApi = value$2();\n        const memReplaced = record({\n            dom: {\n                tag: spec.tag\n            }\n        });\n        const initialValue = value$2();\n        const focusBehaviour = !isOldCustomEditor(spec) && spec.onFocus.isSome() ? [\n            Focusing.config({\n                onFocus: (comp) => {\n                    spec.onFocus.each((onFocusFn) => {\n                        onFocusFn(comp.element.dom);\n                    });\n                }\n            }),\n            Tabstopping.config({})\n        ] : [];\n        return {\n            dom: {\n                tag: 'div',\n                classes: ['tox-custom-editor']\n            },\n            behaviours: derive$1([\n                config('custom-editor-events', [\n                    runOnAttached((component) => {\n                        memReplaced.getOpt(component).each((ta) => {\n                            // eslint-disable-next-line @typescript-eslint/no-floating-promises\n                            (isOldCustomEditor(spec)\n                                ? spec.init(ta.element.dom)\n                                : global$3.load(spec.scriptId, spec.scriptUrl).then((init) => init(ta.element.dom, spec.settings))).then((ea) => {\n                                initialValue.on((cvalue) => {\n                                    ea.setValue(cvalue);\n                                });\n                                initialValue.clear();\n                                editorApi.set(ea);\n                            });\n                        });\n                    })\n                ]),\n                withComp(Optional.none(), () => editorApi.get().fold(() => initialValue.get().getOr(''), (ed) => ed.getValue()), (_component, value) => {\n                    editorApi.get().fold(() => initialValue.set(value), (ed) => ed.setValue(value));\n                }),\n                ComposingConfigs.self()\n            ].concat(focusBehaviour)),\n            components: [memReplaced.asSpec()]\n        };\n    };\n\n    var global$2 = tinymce.util.Tools.resolve('tinymce.util.Tools');\n\n    const browseFilesEvent = generate$6('browse.files.event');\n    const filterByExtension = (files, providersBackstage, allowedFileExtensions) => {\n        const allowedImageFileTypes = global$2.explode(providersBackstage.getOption('images_file_types'));\n        const isFileInAllowedTypes = (file) => allowedFileExtensions.fold(() => exists(allowedImageFileTypes, (type) => endsWith(file.name.toLowerCase(), `.${type.toLowerCase()}`)), (exts) => exists(exts, (type) => endsWith(file.name.toLowerCase(), `.${type.toLowerCase()}`)));\n        return filter$2(from(files), isFileInAllowedTypes);\n    };\n    const renderDropZone = (spec, providersBackstage, initialData) => {\n        // TODO: Consider moving to alloy\n        const stopper = (_, se) => {\n            se.stop();\n        };\n        // TODO: Consider moving to alloy\n        const sequence = (actions) => (comp, se) => {\n            each$1(actions, (a) => {\n                a(comp, se);\n            });\n        };\n        const onDrop = (comp, se) => {\n            if (!Disabling.isDisabled(comp)) {\n                const transferEvent = se.event.raw;\n                emitWith(comp, browseFilesEvent, { files: transferEvent.dataTransfer?.files });\n            }\n        };\n        const onSelect = (component, simulatedEvent) => {\n            const input = simulatedEvent.event.raw.target;\n            emitWith(component, browseFilesEvent, { files: input.files });\n        };\n        const handleFiles = (component, files) => {\n            if (files) {\n                const filteredFiles = filterByExtension(files, providersBackstage, spec.allowedFileExtensions);\n                Representing.setValue(component, filteredFiles);\n                emitWith(component, formChangeEvent, { name: spec.name });\n                if (filteredFiles.length === 0) {\n                    spec.onInvalidFiles().finally(() => {\n                        component.element.dom.focus();\n                    }).catch(noop);\n                }\n            }\n        };\n        const memInput = record({\n            dom: {\n                tag: 'input',\n                attributes: {\n                    type: 'file',\n                    accept: spec.allowedFileTypes.getOr('image/*')\n                },\n                styles: {\n                    display: 'none'\n                }\n            },\n            behaviours: derive$1([\n                config('input-file-events', [\n                    cutter(click()),\n                    cutter(tap())\n                ])\n            ])\n        });\n        const pLabel = spec.label.map((label) => renderLabel$3(label, providersBackstage));\n        const pField = FormField.parts.field({\n            factory: Button,\n            dom: {\n                tag: 'button',\n                styles: {\n                    position: 'relative'\n                },\n                classes: ['tox-button', 'tox-button--secondary']\n            },\n            components: [\n                text$2(providersBackstage.translate(spec.buttonLabel.getOr('Browse for an image'))),\n                memInput.asSpec()\n            ],\n            action: (comp) => {\n                const inputComp = memInput.get(comp);\n                inputComp.element.dom.click();\n            },\n            buttonBehaviours: derive$1([\n                ComposingConfigs.self(),\n                memory(initialData.getOr([])),\n                Tabstopping.config({}),\n                DisablingConfigs.button(() => providersBackstage.checkUiComponentContext(spec.context).shouldDisable),\n                toggleOnReceive(() => providersBackstage.checkUiComponentContext(spec.context))\n            ])\n        });\n        const wrapper = {\n            dom: {\n                tag: 'div',\n                classes: ['tox-dropzone-container']\n            },\n            behaviours: derive$1([\n                Disabling.config({\n                    disabled: () => providersBackstage.checkUiComponentContext(spec.context).shouldDisable\n                }),\n                toggleOnReceive(() => providersBackstage.checkUiComponentContext(spec.context)),\n                Toggling.config({\n                    toggleClass: 'dragenter',\n                    toggleOnExecute: false\n                }),\n                config('dropzone-events', [\n                    run$1('dragenter', sequence([stopper, Toggling.toggle])),\n                    run$1('dragleave', sequence([stopper, Toggling.toggle])),\n                    run$1('dragover', stopper),\n                    run$1('drop', sequence([stopper, onDrop])),\n                    run$1(change(), onSelect)\n                ])\n            ]),\n            components: [\n                {\n                    dom: {\n                        tag: 'div',\n                        classes: ['tox-dropzone'],\n                        styles: {}\n                    },\n                    components: [\n                        {\n                            dom: {\n                                tag: 'p'\n                            },\n                            components: [\n                                text$2(providersBackstage.translate(spec.dropAreaLabel.getOr('Drop an image here')))\n                            ]\n                        },\n                        pField\n                    ]\n                }\n            ]\n        };\n        return renderFormFieldWith(pLabel, wrapper, ['tox-form__group--stretched'], [config('handle-files', [\n                run$1(browseFilesEvent, (comp, se) => {\n                    FormField.getField(comp).each((field) => {\n                        handleFiles(field, se.event.files);\n                    });\n                })\n            ])]);\n    };\n\n    const renderGrid = (spec, backstage) => ({\n        dom: {\n            tag: 'div',\n            classes: ['tox-form__grid', `tox-form__grid--${spec.columns}col`]\n        },\n        components: map$2(spec.items, backstage.interpreter)\n    });\n\n    const beforeObject = generate$6('alloy-fake-before-tabstop');\n    const afterObject = generate$6('alloy-fake-after-tabstop');\n    const craftWithClasses = (classes) => {\n        return {\n            dom: {\n                tag: 'div',\n                styles: {\n                    width: '1px',\n                    height: '1px',\n                    outline: 'none'\n                },\n                attributes: {\n                    tabindex: '0' // Capture native tabbing in the appropriate order\n                },\n                classes\n            },\n            behaviours: derive$1([\n                Focusing.config({ ignore: true }),\n                Tabstopping.config({})\n            ])\n        };\n    };\n    const craft = (containerClasses, spec) => {\n        return {\n            dom: {\n                tag: 'div',\n                classes: ['tox-navobj', ...containerClasses.getOr([])]\n            },\n            components: [\n                craftWithClasses([beforeObject]),\n                spec,\n                craftWithClasses([afterObject])\n            ],\n            behaviours: derive$1([\n                ComposingConfigs.childAt(1)\n            ])\n        };\n    };\n    // TODO: Create an API in alloy to do this.\n    const triggerTab = (placeholder, shiftKey) => {\n        emitWith(placeholder, keydown(), {\n            raw: {\n                which: 9,\n                shiftKey\n            }\n        });\n    };\n    const onFocus = (container, targetComp) => {\n        const target = targetComp.element;\n        // If focus has shifted naturally to a before object, the tab direction is backwards.\n        if (has(target, beforeObject)) {\n            triggerTab(container, true);\n        }\n        else if (has(target, afterObject)) {\n            triggerTab(container, false);\n        }\n    };\n    const isPseudoStop = (element) => {\n        return closest$1(element, ['.' + beforeObject, '.' + afterObject].join(','), never);\n    };\n\n    const dialogChannel = generate$6('update-dialog');\n    const titleChannel = generate$6('update-title');\n    const bodyChannel = generate$6('update-body');\n    const footerChannel = generate$6('update-footer');\n    const bodySendMessageChannel = generate$6('body-send-message');\n    const dialogFocusShiftedChannel = generate$6('dialog-focus-shifted');\n\n    const browser = detect$1().browser;\n    const isSafari = browser.isSafari();\n    const isFirefox = browser.isFirefox();\n    const isSafariOrFirefox = isSafari || isFirefox;\n    const isChromium = browser.isChromium();\n    const isElementScrollAtBottom = ({ scrollTop, scrollHeight, clientHeight }) => Math.ceil(scrollTop) + clientHeight >= scrollHeight;\n    const scrollToY = (win, y) => \n    // TINY-10128: The iframe body is occasionally null when we attempt to scroll, so instead of using body.scrollHeight, use a\n    // fallback value of 99999999. To minimise the potential impact of future browser changes, this fallback is significantly smaller\n    // than the minimum of the maximum value Window.scrollTo would take on supported browsers:\n    // Chromium: > Number.MAX_SAFE_INTEGER\n    // Safari: 2^31 - 1 = 2147483647\n    // Firefox: 2147483583\n    win.scrollTo(0, y === 'bottom' ? 99999999 : y);\n    const getScrollingElement = (doc, html) => {\n        // TINY-10110: The scrolling element can change between body and documentElement depending on whether there\n        // is a doctype declaration. However, this behavior is inconsistent on Chrome and Safari so checking for\n        // the scroll properties is the most reliable way to determine which element is the scrolling element, at\n        // least for the purposes of determining whether scroll is at bottom.\n        const body = doc.body;\n        return Optional.from(!/^<!DOCTYPE (html|HTML)/.test(html) &&\n            (!isChromium && !isSafari || isNonNullable(body) && (body.scrollTop !== 0 || Math.abs(body.scrollHeight - body.clientHeight) > 1))\n            ? body : doc.documentElement);\n    };\n    const writeValue = (iframeElement, html, fallbackFn) => {\n        const iframe = iframeElement.dom;\n        Optional.from(iframe.contentDocument).fold(fallbackFn, (doc) => {\n            let lastScrollTop = 0;\n            // TINY-10032: If documentElement (or body) is nullable, we assume document is empty and so scroll is at bottom.\n            const isScrollAtBottom = getScrollingElement(doc, html).map((el) => {\n                lastScrollTop = el.scrollTop;\n                return el;\n            }).forall(isElementScrollAtBottom);\n            const scrollAfterWrite = () => {\n                const win = iframe.contentWindow;\n                if (isNonNullable(win)) {\n                    if (isScrollAtBottom) {\n                        scrollToY(win, 'bottom');\n                    }\n                    else if (!isScrollAtBottom && isSafariOrFirefox && lastScrollTop !== 0) {\n                        // TINY-10078: Safari and Firefox reset scroll to top on each document.write(), so we need to restore scroll manually\n                        scrollToY(win, lastScrollTop);\n                    }\n                }\n            };\n            // TINY-10109: On Safari, attempting to scroll before the iframe has finished loading will cause scroll to reset to top upon load.\n            // TINY-10128: We will not wait for the load event on Chrome and Firefox since doing so causes the scroll to jump around erratically,\n            // especially on Firefox. However, not waiting for load has the trade-off of potentially losing bottom scroll when updating at a very\n            // rapid rate, as attempting to scroll before the iframe body is loaded will not work.\n            if (isSafari) {\n                iframe.addEventListener('load', scrollAfterWrite, { once: true });\n            }\n            doc.open();\n            doc.write(html);\n            doc.close();\n            if (!isSafari) {\n                scrollAfterWrite();\n            }\n        });\n    };\n    // TINY-10078: On Firefox, throttle to 200ms to improve scrolling experience. Since we are manually maintaining previous scroll position\n    // on each update, when updating rapidly without a throttle, attempting to scroll around the iframe can feel stuck.\n    // TINY-10097: On Safari, throttle to 500ms to reduce flickering as the document.write() method still observes significant flickering.\n    // Also improves scrolling, as scroll positions are maintained manually similar to Firefox.\n    const throttleInterval = someIf(isSafariOrFirefox, isSafari ? 500 : 200);\n    // TINY-10078: Use Throttler.adaptable to ensure that any content added during the waiting period is not lost.\n    const writeValueThrottler = throttleInterval.map((interval) => adaptable(writeValue, interval));\n    const getDynamicSource = (initialData, stream) => {\n        const cachedValue = Cell(initialData.getOr(''));\n        return {\n            getValue: (_frameComponent) => \n            // Ideally we should fetch data from the iframe...innerHtml, this triggers Cors errors\n            cachedValue.get(),\n            setValue: (frameComponent, html) => {\n                if (cachedValue.get() !== html) {\n                    const iframeElement = frameComponent.element;\n                    const setSrcdocValue = () => set$9(iframeElement, 'srcdoc', html);\n                    if (stream) {\n                        writeValueThrottler.fold(constant$1(writeValue), (throttler) => throttler.throttle)(iframeElement, html, setSrcdocValue);\n                    }\n                    else {\n                        // TINY-3769: We need to use srcdoc here, instead of src with a data URI, otherwise browsers won't retain the Origin.\n                        // See https://bugs.chromium.org/p/chromium/issues/detail?id=58999#c11\n                        setSrcdocValue();\n                    }\n                }\n                cachedValue.set(html);\n            }\n        };\n    };\n    const renderIFrame = (spec, providersBackstage, initialData) => {\n        const baseClass = 'tox-dialog__iframe';\n        const opaqueClass = spec.transparent ? [] : [`${baseClass}--opaque`];\n        const containerBorderedClass = spec.border ? [`tox-navobj-bordered`] : [];\n        const attributes = {\n            ...spec.label.map((title) => ({ title })).getOr({}),\n            ...initialData.map((html) => ({ srcdoc: html })).getOr({}),\n            ...spec.sandboxed ? { sandbox: 'allow-scripts allow-same-origin' } : {}\n        };\n        const sourcing = getDynamicSource(initialData, spec.streamContent);\n        const pLabel = spec.label.map((label) => renderLabel$3(label, providersBackstage));\n        const factory = (newSpec) => craft(Optional.from(containerBorderedClass), {\n            // We need to use the part uid or the label and field won't be linked with ARIA\n            uid: newSpec.uid,\n            dom: {\n                tag: 'iframe',\n                attributes,\n                classes: [\n                    baseClass,\n                    ...opaqueClass\n                ]\n            },\n            behaviours: derive$1([\n                Tabstopping.config({}),\n                Focusing.config({}),\n                withComp(initialData, sourcing.getValue, sourcing.setValue),\n                Receiving.config({\n                    channels: {\n                        [dialogFocusShiftedChannel]: {\n                            onReceive: (comp, message) => {\n                                message.newFocus.each((newFocus) => {\n                                    parentElement(comp.element).each((parent) => {\n                                        const f = eq(comp.element, newFocus) ? add$2 : remove$3;\n                                        f(parent, 'tox-navobj-bordered-focus');\n                                    });\n                                });\n                            }\n                        }\n                    }\n                })\n            ])\n        });\n        // Note, it's not going to handle escape at this point.\n        const pField = FormField.parts.field({\n            factory: { sketch: factory }\n        });\n        return renderFormFieldWith(pLabel, pField, ['tox-form__group--stretched'], []);\n    };\n\n    const calculateImagePosition = (panelWidth, panelHeight, imageWidth, imageHeight, zoom) => {\n        const width = imageWidth * zoom;\n        const height = imageHeight * zoom;\n        const left = Math.max(0, panelWidth / 2 - width / 2);\n        const top = Math.max(0, panelHeight / 2 - height / 2);\n        return {\n            left: left.toString() + 'px',\n            top: top.toString() + 'px',\n            width: width.toString() + 'px',\n            height: height.toString() + 'px',\n        };\n    };\n    const zoomToFit = (panel, width, height) => {\n        const panelW = get$c(panel);\n        const panelH = get$d(panel);\n        return Math.min(panelW / width, panelH / height, 1);\n    };\n    const renderImagePreview = (spec, initialData) => {\n        const cachedData = Cell(initialData.getOr({ url: '' }));\n        const memImage = record({\n            dom: {\n                tag: 'img',\n                classes: ['tox-imagepreview__image'],\n                attributes: initialData.map((data) => ({ src: data.url })).getOr({})\n            },\n        });\n        const memContainer = record({\n            dom: {\n                tag: 'div',\n                classes: ['tox-imagepreview__container'],\n                attributes: {\n                    role: 'presentation'\n                },\n            },\n            components: [\n                memImage.asSpec()\n            ]\n        });\n        const setValue = (frameComponent, data) => {\n            const translatedData = {\n                url: data.url\n            };\n            // update properties that are set by the data\n            data.zoom.each((z) => translatedData.zoom = z);\n            data.cachedWidth.each((z) => translatedData.cachedWidth = z);\n            data.cachedHeight.each((z) => translatedData.cachedHeight = z);\n            cachedData.set(translatedData);\n            const applyFramePositioning = () => {\n                const { cachedWidth, cachedHeight, zoom } = translatedData;\n                if (!isUndefined(cachedWidth) && !isUndefined(cachedHeight)) {\n                    if (isUndefined(zoom)) {\n                        const z = zoomToFit(frameComponent.element, cachedWidth, cachedHeight);\n                        // sneaky mutation since we own the object\n                        translatedData.zoom = z;\n                    }\n                    const position = calculateImagePosition(get$c(frameComponent.element), get$d(frameComponent.element), cachedWidth, cachedHeight, translatedData.zoom);\n                    memContainer.getOpt(frameComponent).each((container) => {\n                        setAll(container.element, position);\n                    });\n                }\n            };\n            memImage.getOpt(frameComponent).each((imageComponent) => {\n                const img = imageComponent.element;\n                if (data.url !== get$g(img, 'src')) {\n                    set$9(img, 'src', data.url);\n                    remove$3(frameComponent.element, 'tox-imagepreview__loaded');\n                }\n                applyFramePositioning();\n                // eslint-disable-next-line @typescript-eslint/no-floating-promises\n                image(img).then((img) => {\n                    // Ensure the component hasn't been removed while the image was loading\n                    // if it is disconnected, just do nothing\n                    if (frameComponent.getSystem().isConnected()) {\n                        add$2(frameComponent.element, 'tox-imagepreview__loaded');\n                        // sneaky mutation since we own the object\n                        translatedData.cachedWidth = img.dom.naturalWidth;\n                        translatedData.cachedHeight = img.dom.naturalHeight;\n                        applyFramePositioning();\n                    }\n                });\n            });\n        };\n        const styles = {};\n        spec.height.each((h) => styles.height = h);\n        // TODO: TINY-8393 Use the initial data properly once it's validated\n        const fakeValidatedData = initialData.map((d) => ({\n            url: d.url,\n            zoom: Optional.from(d.zoom),\n            cachedWidth: Optional.from(d.cachedWidth),\n            cachedHeight: Optional.from(d.cachedHeight),\n        }));\n        return {\n            dom: {\n                tag: 'div',\n                classes: ['tox-imagepreview'],\n                styles,\n                attributes: {\n                    role: 'presentation'\n                }\n            },\n            components: [\n                memContainer.asSpec(),\n            ],\n            behaviours: derive$1([\n                ComposingConfigs.self(),\n                withComp(fakeValidatedData, () => \n                /*\n                  NOTE: This is intentionally returning the cached image width and height.\n      \n                  Including those details in the dialog data helps when `setData` only changes the URL, as\n                  the old image must continue to be displayed at the old size until the new image has loaded.\n                */\n                cachedData.get(), setValue),\n            ])\n        };\n    };\n\n    const renderLabel$2 = (spec, backstageShared, getCompByName) => {\n        const baseClass = 'tox-label';\n        const centerClass = spec.align === 'center' ? [`${baseClass}--center`] : [];\n        const endClass = spec.align === 'end' ? [`${baseClass}--end`] : [];\n        const label = record({\n            dom: {\n                tag: 'label',\n                classes: [baseClass, ...centerClass, ...endClass]\n            },\n            components: [\n                text$2(backstageShared.providers.translate(spec.label))\n            ]\n        });\n        const comps = map$2(spec.items, backstageShared.interpreter);\n        return {\n            dom: {\n                tag: 'div',\n                classes: ['tox-form__group']\n            },\n            components: [\n                label.asSpec(),\n                ...comps\n            ],\n            behaviours: derive$1([\n                ComposingConfigs.self(),\n                Replacing.config({}),\n                domHtml(Optional.none()),\n                Keying.config({\n                    mode: 'acyclic'\n                }),\n                config('label', [\n                    runOnAttached((comp) => {\n                        spec.for.each((name) => {\n                            getCompByName(name).each((target) => {\n                                label.getOpt(comp).each((labelComp) => {\n                                    const id = get$g(target.element, 'id') ?? generate$6('form-field');\n                                    set$9(target.element, 'id', id);\n                                    set$9(labelComp.element, 'for', id);\n                                });\n                            });\n                        });\n                    })\n                ]),\n            ])\n        };\n    };\n\n    const internalToolbarButtonExecute = generate$6('toolbar.button.execute');\n    // Perform `action` when an item is clicked on, close menus, and stop event\n    const onToolbarButtonExecute = (info) => runOnExecute$1((comp, _simulatedEvent) => {\n        // If there is an action, run the action\n        runWithApi(info, comp)((itemApi) => {\n            emitWith(comp, internalToolbarButtonExecute, {\n                buttonApi: itemApi\n            });\n            info.onAction(itemApi);\n        });\n    });\n    const commonButtonDisplayEvent = generate$6('common-button-display-events');\n    const toolbarButtonEventOrder = {\n        // TODO: use the constants provided by behaviours.\n        [execute$5()]: ['disabling', 'alloy.base.behaviour', 'toggling', 'toolbar-button-events', 'tooltipping'],\n        [attachedToDom()]: [\n            'toolbar-button-events',\n            commonButtonDisplayEvent\n        ],\n        [detachedFromDom()]: ['toolbar-button-events', 'dropdown-events', 'tooltipping'],\n        [mousedown()]: [\n            'focusing',\n            'alloy.base.behaviour',\n            commonButtonDisplayEvent\n        ]\n    };\n\n    const forceInitialSize = (comp) => set$7(comp.element, 'width', get$e(comp.element, 'width'));\n\n    const renderIcon$1 = (iconName, iconsProvider, behaviours) => render$4(iconName, {\n        tag: 'span',\n        classes: [\"tox-icon\" /* ToolbarButtonClasses.Icon */, \"tox-tbtn__icon-wrap\" /* ToolbarButtonClasses.IconWrap */],\n        behaviours\n    }, iconsProvider);\n    const renderIconFromPack$1 = (iconName, iconsProvider) => renderIcon$1(iconName, iconsProvider, []);\n    const renderReplaceableIconFromPack = (iconName, iconsProvider) => renderIcon$1(iconName, iconsProvider, [Replacing.config({})]);\n    const renderLabel$1 = (text, prefix, providersBackstage) => ({\n        dom: {\n            tag: 'span',\n            classes: [`${prefix}__select-label`]\n        },\n        components: [\n            text$2(providersBackstage.translate(text))\n        ],\n        behaviours: derive$1([\n            Replacing.config({})\n        ])\n    });\n\n    const updateMenuText = generate$6('update-menu-text');\n    const updateMenuIcon = generate$6('update-menu-icon');\n    const updateTooltiptext = generate$6('update-tooltip-text');\n    // TODO: Use renderCommonStructure here.\n    const renderCommonDropdown = (spec, prefix, sharedBackstage, btnName) => {\n        const editorOffCell = Cell(noop);\n        const tooltip = Cell(spec.tooltip);\n        // We need mementos for display text and display icon because on the events\n        // updateMenuText and updateMenuIcon respectively, their contents are changed\n        // via Replacing. These events are generally emitted by dropdowns that want the\n        // main text and icon to match the current selection (e.g. bespokes like font family)\n        const optMemDisplayText = spec.text.map((text) => record(renderLabel$1(text, prefix, sharedBackstage.providers)));\n        const optMemDisplayIcon = spec.icon.map((iconName) => record(renderReplaceableIconFromPack(iconName, sharedBackstage.providers.icons)));\n        /*\n         * The desired behaviour here is:\n         *\n         *   when left or right is pressed, and it isn't associated with expanding or\n         *   collapsing a submenu, then it should navigate to the next menu item, and\n         *   expand it (without highlighting any items in the expanded menu).\n         *   It also needs to close the previous menu\n         */\n        const onLeftOrRightInMenu = (comp, se) => {\n            // The originating dropdown is stored on the sandbox itself. This is just an\n            // implementation detail of alloy. We really need to make it a fully-fledged API.\n            // TODO: TINY-9014 Make SandboxAPI have a function that just delegates to Representing\n            const dropdown = Representing.getValue(comp);\n            // Focus the dropdown. Current workaround required to make FlowLayout recognise the current focus.\n            // The triggering keydown is going to try to move the focus left or\n            // right of the current menu, so it needs to know what the current menu dropdown is. It\n            // can't work it out by the current focus, because the current focus is *in* the menu, so\n            // we help it by moving the focus to the button, so it can work out what the next menu to\n            // the left or right is.\n            Focusing.focus(dropdown);\n            emitWith(dropdown, 'keydown', {\n                raw: se.event.raw\n            });\n            // Because we have just navigated off this open menu, we want to close it.\n            // INVESTIGATE: TINY-9014: Is this handling situations where there were no menus\n            // to move to? Does it matter if we still close it when there are no other menus?\n            Dropdown.close(dropdown);\n            // The Optional.some(true) tells the keyboard handler that this event was handled,\n            // which will do things like stopPropagation and preventDefault.\n            return Optional.some(true);\n        };\n        const role = spec.role.fold(() => ({}), (role) => ({ role }));\n        const listRole = Optional.from(spec.listRole).map((listRole) => ({ listRole })).getOr({});\n        const ariaLabelAttribute = spec.ariaLabel.fold(() => ({}), (ariaLabel) => {\n            const translatedAriaLabel = sharedBackstage.providers.translate(ariaLabel);\n            return {\n                'aria-label': translatedAriaLabel\n            };\n        });\n        const iconSpec = render$4('chevron-down', {\n            tag: 'div',\n            classes: [`${prefix}__select-chevron`]\n        }, sharedBackstage.providers.icons);\n        const fixWidthBehaviourName = generate$6('common-button-display-events');\n        // Should we use Id.generate here?\n        const customEventsName = 'dropdown-events';\n        const memDropdown = record(Dropdown.sketch({\n            ...spec.uid ? { uid: spec.uid } : {},\n            ...role,\n            ...listRole,\n            dom: {\n                tag: 'button',\n                classes: [prefix, `${prefix}--select`].concat(map$2(spec.classes, (c) => `${prefix}--${c}`)),\n                attributes: {\n                    ...ariaLabelAttribute,\n                    ...(isNonNullable(btnName) ? { 'data-mce-name': btnName } : {})\n                }\n            },\n            components: componentRenderPipeline([\n                optMemDisplayIcon.map((mem) => mem.asSpec()),\n                optMemDisplayText.map((mem) => mem.asSpec()),\n                Optional.some(iconSpec)\n            ]),\n            matchWidth: true,\n            useMinWidth: true,\n            // When the dropdown opens, if we are in search mode, then we want to\n            // focus our searcher.\n            onOpen: (anchor, dropdownComp, tmenuComp) => {\n                if (spec.searchable) {\n                    focusSearchField(tmenuComp);\n                }\n            },\n            dropdownBehaviours: derive$1([\n                ...spec.dropdownBehaviours,\n                DisablingConfigs.button(() => spec.disabled || sharedBackstage.providers.checkUiComponentContext(spec.context).shouldDisable),\n                toggleOnReceive(() => sharedBackstage.providers.checkUiComponentContext(spec.context)),\n                // INVESTIGATE (TINY-9012): There was a old comment here about something not quite working, and that\n                // we can still get the button focused. It was probably related to Unselecting.\n                Unselecting.config({}),\n                Replacing.config({}),\n                ...(spec.tooltip.map((t) => Tooltipping.config(sharedBackstage.providers.tooltips.getConfig({\n                    tooltipText: sharedBackstage.providers.translate(t),\n                    onShow: (comp) => {\n                        if (lift2(tooltip.get(), spec.tooltip, (tooltipStr, tt) => tt !== tooltipStr).getOr(false)) {\n                            const translatedTooltip = sharedBackstage.providers.translate(tooltip.get().getOr(''));\n                            Tooltipping.setComponents(comp, sharedBackstage.providers.tooltips.getComponents({ tooltipText: translatedTooltip }));\n                        }\n                    }\n                })))).toArray(),\n                // This is the generic way to make onSetup and onDestroy call as the component is attached /\n                // detached from the page/DOM.\n                config(customEventsName, [\n                    onControlAttached(spec, editorOffCell),\n                    onControlDetached(spec, editorOffCell)\n                ]),\n                config(fixWidthBehaviourName, [\n                    runOnAttached((comp, _se) => {\n                        if (spec.listRole !== 'listbox') {\n                            forceInitialSize(comp);\n                        }\n                    }),\n                ]),\n                config('update-dropdown-width-variable', [\n                    run$1(windowResize(), (comp, _se) => Dropdown.close(comp)),\n                ]),\n                config('menubutton-update-display-text', [\n                    // These handlers are just using Replacing to replace either the menu\n                    // text or the icon.\n                    run$1(updateMenuText, (comp, se) => {\n                        optMemDisplayText.bind((mem) => mem.getOpt(comp)).each((displayText) => {\n                            Replacing.set(displayText, [text$2(sharedBackstage.providers.translate(se.event.text))]);\n                        });\n                    }),\n                    run$1(updateMenuIcon, (comp, se) => {\n                        optMemDisplayIcon.bind((mem) => mem.getOpt(comp)).each((displayIcon) => {\n                            Replacing.set(displayIcon, [\n                                renderReplaceableIconFromPack(se.event.icon, sharedBackstage.providers.icons)\n                            ]);\n                        });\n                    }),\n                    run$1(updateTooltiptext, (comp, se) => {\n                        const translatedTooltip = sharedBackstage.providers.translate(se.event.text);\n                        set$9(comp.element, 'aria-label', translatedTooltip);\n                        tooltip.set(Optional.some(se.event.text));\n                    })\n                ])\n            ]),\n            eventOrder: deepMerge(toolbarButtonEventOrder, {\n                // INVESTIGATE (TINY-9014): Explain why we need the events in this order.\n                // Ideally, have a test that fails when they are in a different order if order\n                // is important\n                [mousedown()]: ['focusing', 'alloy.base.behaviour', 'item-type-events', 'normal-dropdown-events'],\n                [attachedToDom()]: [\n                    'toolbar-button-events',\n                    Tooltipping.name(),\n                    customEventsName,\n                    fixWidthBehaviourName,\n                ]\n            }),\n            sandboxBehaviours: derive$1([\n                Keying.config({\n                    mode: 'special',\n                    onLeft: onLeftOrRightInMenu,\n                    onRight: onLeftOrRightInMenu,\n                }),\n                config('dropdown-sandbox-events', [\n                    run$1(refetchTriggerEvent, (originalSandboxComp, se) => {\n                        handleRefetchTrigger(originalSandboxComp);\n                        // It's a custom event that no-one else should be listening to, so stop it.\n                        se.stop();\n                    }),\n                    run$1(redirectMenuItemInteractionEvent, (sandboxComp, se) => {\n                        handleRedirectToMenuItem(sandboxComp, se);\n                        // It's a custom event that no-one else should be listening to, so stop it.\n                        se.stop();\n                    })\n                ])\n            ]),\n            lazySink: sharedBackstage.getSink,\n            toggleClass: `${prefix}--active`,\n            parts: {\n                menu: {\n                    ...part(false, spec.columns, spec.presets),\n                    // When the menu is \"searchable\", use fakeFocus so that keyboard\n                    // focus stays in the search field\n                    fakeFocus: spec.searchable,\n                    // We don't want to update the  `aria-selected` on highlight or dehighlight for the `listbox` role because that is used to indicate the selected item\n                    ...(spec.listRole === 'listbox' ? {} : {\n                        onHighlightItem: updateAriaOnHighlight,\n                        onCollapseMenu: (tmenuComp, itemCompCausingCollapse, nowActiveMenuComp) => {\n                            // We want to update ARIA on collapsing as well, because it isn't changing\n                            // the highlights. So what we need to do is get the right parameters to\n                            // pass to updateAriaOnHighlight\n                            Highlighting.getHighlighted(nowActiveMenuComp).each((itemComp) => {\n                                updateAriaOnHighlight(tmenuComp, nowActiveMenuComp, itemComp);\n                            });\n                        },\n                        onDehighlightItem: updateAriaOnDehighlight\n                    })\n                }\n            },\n            getAnchorOverrides: () => {\n                return {\n                    maxHeightFunction: (element, available) => {\n                        anchored()(element, available - 10);\n                    },\n                };\n            },\n            fetch: (comp) => Future.nu(curry(spec.fetch, comp))\n        }));\n        return memDropdown.asSpec();\n    };\n\n    const isMenuItemReference = (item) => isString(item);\n    const isSeparator$2 = (item) => item.type === 'separator';\n    const isExpandingMenuItem = (item) => has$2(item, 'getSubmenuItems');\n    const separator$2 = {\n        type: 'separator'\n    };\n    const unwrapReferences = (items, menuItems) => {\n        // Unwrap any string based menu item references\n        const realItems = foldl(items, (acc, item) => {\n            if (isMenuItemReference(item)) {\n                if (item === '') {\n                    return acc;\n                }\n                else if (item === '|') {\n                    // Ignore the separator if it's at the start or a duplicate\n                    return acc.length > 0 && !isSeparator$2(acc[acc.length - 1]) ? acc.concat([separator$2]) : acc;\n                }\n                else if (has$2(menuItems, item.toLowerCase())) {\n                    return acc.concat([menuItems[item.toLowerCase()]]);\n                }\n                else {\n                    // TODO: Add back after TINY-3232 is implemented\n                    // console.error('No representation for menuItem: ' + item);\n                    return acc;\n                }\n            }\n            else {\n                return acc.concat([item]);\n            }\n        }, []);\n        // Remove any trailing separators\n        if (realItems.length > 0 && isSeparator$2(realItems[realItems.length - 1])) {\n            realItems.pop();\n        }\n        return realItems;\n    };\n    const getFromExpandingItem = (item, menuItems) => {\n        const submenuItems = item.getSubmenuItems();\n        const rest = expand(submenuItems, menuItems);\n        const newMenus = deepMerge(rest.menus, { [item.value]: rest.items });\n        const newExpansions = deepMerge(rest.expansions, { [item.value]: item.value });\n        return {\n            item,\n            menus: newMenus,\n            expansions: newExpansions\n        };\n    };\n    const generateValueIfRequired = (item) => {\n        // Use the value already in item if it has one.\n        const itemValue = get$h(item, 'value').getOrThunk(() => generate$6('generated-menu-item'));\n        return deepMerge({ value: itemValue }, item);\n    };\n    // Takes items, and consolidates them into its return value\n    const expand = (items, menuItems) => {\n        // Fistly, we do all substitution using the registry for any items referenced by their\n        // string key.\n        const realItems = unwrapReferences(isString(items) ? items.split(' ') : items, menuItems);\n        // Now that we have complete bridge Item specs for all items, we need to collect the\n        // submenus, items in the primary menu, and triggering menu items all into one\n        // giant object to from the building blocks on our TieredData\n        return foldr(realItems, (acc, item) => {\n            if (isExpandingMenuItem(item)) {\n                // We generate a random value for item, but only if there isn't an existing value\n                const itemWithValue = generateValueIfRequired(item);\n                // The newData isn't quite in the format you might expect. The list of items\n                // for an item with nested items is just the single parent item. All of the nested\n                // items becomes part of '.menus'. Finally, the expansions is just a map from\n                // the triggering item to the first submenu. Incidentally, they are given the same\n                // value (triggering item and submenu), for convenience.\n                const newData = getFromExpandingItem(itemWithValue, menuItems);\n                return {\n                    // Combine all of our current submenus and items with the new submenus created by\n                    // this item with nested subitems\n                    menus: deepMerge(acc.menus, newData.menus),\n                    // Add our parent item into the list of items in the *current menu*.\n                    items: [newData.item, ...acc.items],\n                    // Merge together our \"this item opens this submenu\" objects\n                    expansions: deepMerge(acc.expansions, newData.expansions)\n                };\n            }\n            else {\n                // If we aren't creating any submenus, then all we need to do is add this item\n                // to the list of items in the current menu. So this is the same as an expanding\n                // menu item, except it doesn't add to `menus` or `expansions`.\n                return {\n                    ...acc,\n                    items: [item, ...acc.items]\n                };\n            }\n        }, {\n            menus: {},\n            expansions: {},\n            items: []\n        });\n    };\n\n    const getSearchModeForField = (settings) => {\n        return settings.search.fold(() => ({ searchMode: 'no-search' }), (searchSettings) => ({\n            searchMode: 'search-with-field',\n            placeholder: searchSettings.placeholder\n        }));\n    };\n    const getSearchModeForResults = (settings) => {\n        return settings.search.fold(() => ({ searchMode: 'no-search' }), (_) => ({ searchMode: 'search-with-results' }));\n    };\n    const build = (items, itemResponse, backstage, settings) => {\n        const primary = generate$6('primary-menu');\n        // The expand process identifies all the items, submenus, and triggering items\n        // defined by the list of items. It substitutes the strings using the values registered\n        // in the menuItem registry where necessary. It is the building blocks of TieredData,\n        // but everything is still just in the bridge item format ... nothing has been turned\n        // into AlloySpecs.\n        const data = expand(items, backstage.shared.providers.menuItems());\n        if (data.items.length === 0) {\n            return Optional.none();\n        }\n        // Only the main menu has a searchable widget (if it is enabled)\n        const mainMenuSearchMode = getSearchModeForField(settings);\n        const mainMenu = createPartialMenu(primary, data.items, itemResponse, backstage, settings.isHorizontalMenu, mainMenuSearchMode);\n        // The submenus do not have the search field, but will have search results for\n        // connecting to the search field via aria-controls\n        const submenuSearchMode = getSearchModeForResults(settings);\n        const submenus = map$1(data.menus, (menuItems, menuName) => createPartialMenu(menuName, menuItems, itemResponse, backstage, \n        // Currently, submenus cannot be horizontal menus (so always false)\n        false, submenuSearchMode));\n        const menus = deepMerge(submenus, wrap(primary, mainMenu));\n        return Optional.from(tieredMenu.tieredData(primary, menus, data.expansions));\n    };\n\n    const isSingleListItem = (item) => !has$2(item, 'items');\n    const dataAttribute = 'data-value';\n    const fetchItems = (dropdownComp, name, items, selectedValue, hasNestedItems) => map$2(items, (item) => {\n        if (!isSingleListItem(item)) {\n            return {\n                type: 'nestedmenuitem',\n                text: item.text,\n                getSubmenuItems: () => fetchItems(dropdownComp, name, item.items, selectedValue, hasNestedItems)\n            };\n        }\n        else {\n            return {\n                type: 'togglemenuitem',\n                ...(hasNestedItems ? {} : { role: 'option' }),\n                text: item.text,\n                value: item.value,\n                active: item.value === selectedValue,\n                onAction: () => {\n                    Representing.setValue(dropdownComp, item.value);\n                    emitWith(dropdownComp, formChangeEvent, { name });\n                    Focusing.focus(dropdownComp);\n                }\n            };\n        }\n    });\n    const findItemByValue = (items, value) => findMap(items, (item) => {\n        if (!isSingleListItem(item)) {\n            return findItemByValue(item.items, value);\n        }\n        else {\n            return someIf(item.value === value, item);\n        }\n    });\n    const renderListBox = (spec, backstage, initialData) => {\n        const hasNestedItems = exists(spec.items, (item) => !isSingleListItem(item));\n        const providersBackstage = backstage.shared.providers;\n        const initialItem = initialData\n            .bind((value) => findItemByValue(spec.items, value))\n            .orThunk(() => head(spec.items).filter(isSingleListItem));\n        const pLabel = spec.label.map((label) => renderLabel$3(label, providersBackstage));\n        const pField = FormField.parts.field({\n            dom: {},\n            factory: {\n                sketch: (sketchSpec) => renderCommonDropdown({\n                    context: spec.context,\n                    uid: sketchSpec.uid,\n                    text: initialItem.map((item) => item.text),\n                    icon: Optional.none(),\n                    tooltip: Optional.none(),\n                    role: someIf(!hasNestedItems, 'combobox'),\n                    ...(hasNestedItems ? {} : { listRole: 'listbox' }),\n                    ariaLabel: spec.label,\n                    fetch: (comp, callback) => {\n                        const items = fetchItems(comp, spec.name, spec.items, Representing.getValue(comp), hasNestedItems);\n                        callback(build(items, ItemResponse$1.CLOSE_ON_EXECUTE, backstage, {\n                            isHorizontalMenu: false,\n                            search: Optional.none()\n                        }));\n                    },\n                    onSetup: constant$1(noop),\n                    getApi: constant$1({}),\n                    columns: 1,\n                    presets: 'normal',\n                    classes: [],\n                    dropdownBehaviours: [\n                        Tabstopping.config({}),\n                        withComp(initialItem.map((item) => item.value), (comp) => get$g(comp.element, dataAttribute), (comp, data) => {\n                            // We only want to update the saved value if the value set is a valid property\n                            findItemByValue(spec.items, data)\n                                .each((item) => {\n                                set$9(comp.element, dataAttribute, item.value);\n                                emitWith(comp, updateMenuText, { text: item.text });\n                            });\n                        })\n                    ]\n                }, 'tox-listbox', backstage.shared)\n            }\n        });\n        const listBoxWrap = {\n            dom: {\n                tag: 'div',\n                classes: ['tox-listboxfield']\n            },\n            components: [pField]\n        };\n        return FormField.sketch({\n            dom: {\n                tag: 'div',\n                classes: ['tox-form__group']\n            },\n            components: flatten([pLabel.toArray(), [listBoxWrap]]),\n            fieldBehaviours: derive$1([\n                Disabling.config({\n                    disabled: () => !spec.enabled || providersBackstage.checkUiComponentContext(spec.context).shouldDisable,\n                    onDisabled: (comp) => {\n                        FormField.getField(comp).each(Disabling.disable);\n                    },\n                    onEnabled: (comp) => {\n                        FormField.getField(comp).each(Disabling.enable);\n                    }\n                })\n            ])\n        });\n    };\n\n    const renderPanel = (spec, backstage) => ({\n        dom: {\n            tag: 'div',\n            classes: spec.classes\n        },\n        // All of the items passed through the form need to be put through the interpreter\n        // with their form part preserved.\n        components: map$2(spec.items, backstage.shared.interpreter)\n    });\n\n    const renderSelectBox = (spec, providersBackstage, initialData) => {\n        const translatedOptions = map$2(spec.items, (item) => ({\n            text: providersBackstage.translate(item.text),\n            value: item.value\n        }));\n        // DUPE with TextField.\n        const pLabel = spec.label.map((label) => renderLabel$3(label, providersBackstage));\n        const pField = FormField.parts.field({\n            // TODO: Alloy should not allow dom changing of an HTML select!\n            dom: {},\n            ...initialData.map((data) => ({ data })).getOr({}),\n            selectAttributes: {\n                size: spec.size\n            },\n            options: translatedOptions,\n            factory: HtmlSelect,\n            selectBehaviours: derive$1([\n                Disabling.config({\n                    disabled: () => !spec.enabled || providersBackstage.checkUiComponentContext(spec.context).shouldDisable\n                }),\n                Tabstopping.config({}),\n                config('selectbox-change', [\n                    run$1(change(), (component, _) => {\n                        emitWith(component, formChangeEvent, { name: spec.name });\n                    })\n                ])\n            ])\n        });\n        const chevron = spec.size > 1 ? Optional.none() :\n            Optional.some(render$4('chevron-down', { tag: 'div', classes: ['tox-selectfield__icon-js'] }, providersBackstage.icons));\n        const selectWrap = {\n            dom: {\n                tag: 'div',\n                classes: ['tox-selectfield']\n            },\n            components: flatten([[pField], chevron.toArray()])\n        };\n        return FormField.sketch({\n            dom: {\n                tag: 'div',\n                classes: ['tox-form__group']\n            },\n            components: flatten([pLabel.toArray(), [selectWrap]]),\n            fieldBehaviours: derive$1([\n                Disabling.config({\n                    disabled: () => !spec.enabled || providersBackstage.checkUiComponentContext(spec.context).shouldDisable,\n                    onDisabled: (comp) => {\n                        FormField.getField(comp).each(Disabling.disable);\n                    },\n                    onEnabled: (comp) => {\n                        FormField.getField(comp).each(Disabling.enable);\n                    }\n                }),\n                toggleOnReceive(() => providersBackstage.checkUiComponentContext(spec.context))\n            ])\n        });\n    };\n\n    const formatSize = (size) => {\n        const unitDec = {\n            '': 0,\n            'px': 0,\n            'pt': 1,\n            'mm': 1,\n            'pc': 2,\n            'ex': 2,\n            'em': 2,\n            'ch': 2,\n            'rem': 2,\n            'cm': 3,\n            'in': 4,\n            '%': 4\n        };\n        const maxDecimal = (unit) => unit in unitDec ? unitDec[unit] : 1;\n        let numText = size.value.toFixed(maxDecimal(size.unit));\n        if (numText.indexOf('.') !== -1) {\n            numText = numText.replace(/\\.?0*$/, '');\n        }\n        return numText + size.unit;\n    };\n    const parseSize = (sizeText) => {\n        const numPattern = /^\\s*(\\d+(?:\\.\\d+)?)\\s*(|cm|mm|in|px|pt|pc|em|ex|ch|rem|vw|vh|vmin|vmax|%)\\s*$/;\n        const match = numPattern.exec(sizeText);\n        if (match !== null) {\n            const value = parseFloat(match[1]);\n            const unit = match[2];\n            return Result.value({ value, unit });\n        }\n        else {\n            return Result.error(sizeText);\n        }\n    };\n    const convertUnit = (size, unit) => {\n        const inInch = {\n            '': 96,\n            'px': 96,\n            'pt': 72,\n            'cm': 2.54,\n            'pc': 12,\n            'mm': 25.4,\n            'in': 1\n        };\n        const supported = (u) => has$2(inInch, u);\n        if (size.unit === unit) {\n            return Optional.some(size.value);\n        }\n        else if (supported(size.unit) && supported(unit)) {\n            if (inInch[size.unit] === inInch[unit]) {\n                return Optional.some(size.value);\n            }\n            else {\n                return Optional.some(size.value / inInch[size.unit] * inInch[unit]);\n            }\n        }\n        else {\n            return Optional.none();\n        }\n    };\n    const noSizeConversion = (_input) => Optional.none();\n    const ratioSizeConversion = (scale, unit) => (size) => convertUnit(size, unit).map((value) => ({ value: value * scale, unit }));\n    const makeRatioConverter = (currentFieldText, otherFieldText) => {\n        const cValue = parseSize(currentFieldText).toOptional();\n        const oValue = parseSize(otherFieldText).toOptional();\n        return lift2(cValue, oValue, (cSize, oSize) => convertUnit(cSize, oSize.unit).map((val) => oSize.value / val).map((r) => ratioSizeConversion(r, oSize.unit)).getOr(noSizeConversion)).getOr(noSizeConversion);\n    };\n\n    const renderSizeInput = (spec, providersBackstage) => {\n        let converter = noSizeConversion;\n        const ratioEvent = generate$6('ratio-event');\n        const makeIcon = (iconName) => render$4(iconName, { tag: 'span', classes: ['tox-icon', 'tox-lock-icon__' + iconName] }, providersBackstage.icons);\n        const disabled = () => !spec.enabled || providersBackstage.checkUiComponentContext(spec.context).shouldDisable;\n        const toggleOnReceive$1 = toggleOnReceive(() => providersBackstage.checkUiComponentContext(spec.context));\n        const label = spec.label.getOr('Constrain proportions');\n        const translatedLabel = providersBackstage.translate(label);\n        const pLock = FormCoupledInputs.parts.lock({\n            dom: {\n                tag: 'button',\n                classes: ['tox-lock', 'tox-button', 'tox-button--naked', 'tox-button--icon'],\n                attributes: {\n                    'aria-label': translatedLabel,\n                    'data-mce-name': label\n                }\n            },\n            components: [\n                makeIcon('lock'),\n                makeIcon('unlock')\n            ],\n            buttonBehaviours: derive$1([\n                Disabling.config({ disabled }),\n                toggleOnReceive$1,\n                Tabstopping.config({}),\n                Tooltipping.config(providersBackstage.tooltips.getConfig({\n                    tooltipText: translatedLabel\n                }))\n            ])\n        });\n        const formGroup = (components) => ({\n            dom: {\n                tag: 'div',\n                classes: ['tox-form__group']\n            },\n            components\n        });\n        const getFieldPart = (isField1) => FormField.parts.field({\n            factory: Input,\n            inputClasses: ['tox-textfield'],\n            inputBehaviours: derive$1([\n                Disabling.config({ disabled }),\n                toggleOnReceive$1,\n                Tabstopping.config({}),\n                config('size-input-events', [\n                    run$1(focusin(), (component, _simulatedEvent) => {\n                        emitWith(component, ratioEvent, { isField1 });\n                    }),\n                    run$1(change(), (component, _simulatedEvent) => {\n                        emitWith(component, formChangeEvent, { name: spec.name });\n                    })\n                ])\n            ]),\n            selectOnFocus: false\n        });\n        const getLabel = (label) => ({\n            dom: {\n                tag: 'label',\n                classes: ['tox-label']\n            },\n            components: [\n                text$2(providersBackstage.translate(label))\n            ]\n        });\n        const widthField = FormCoupledInputs.parts.field1(formGroup([FormField.parts.label(getLabel('Width')), getFieldPart(true)]));\n        const heightField = FormCoupledInputs.parts.field2(formGroup([FormField.parts.label(getLabel('Height')), getFieldPart(false)]));\n        return FormCoupledInputs.sketch({\n            dom: {\n                tag: 'div',\n                classes: ['tox-form__group']\n            },\n            components: [\n                {\n                    dom: {\n                        tag: 'div',\n                        classes: ['tox-form__controls-h-stack']\n                    },\n                    components: [\n                        // NOTE: Form coupled inputs to the FormField.sketch themselves.\n                        widthField,\n                        heightField,\n                        formGroup([\n                            getLabel(nbsp),\n                            pLock\n                        ])\n                    ]\n                }\n            ],\n            field1Name: 'width',\n            field2Name: 'height',\n            locked: true,\n            markers: {\n                lockClass: 'tox-locked'\n            },\n            onLockedChange: (current, other, _lock) => {\n                parseSize(Representing.getValue(current)).each((size) => {\n                    converter(size).each((newSize) => {\n                        Representing.setValue(other, formatSize(newSize));\n                    });\n                });\n            },\n            coupledFieldBehaviours: derive$1([\n                Disabling.config({\n                    disabled,\n                    onDisabled: (comp) => {\n                        FormCoupledInputs.getField1(comp).bind(FormField.getField).each(Disabling.disable);\n                        FormCoupledInputs.getField2(comp).bind(FormField.getField).each(Disabling.disable);\n                        FormCoupledInputs.getLock(comp).each(Disabling.disable);\n                    },\n                    onEnabled: (comp) => {\n                        FormCoupledInputs.getField1(comp).bind(FormField.getField).each(Disabling.enable);\n                        FormCoupledInputs.getField2(comp).bind(FormField.getField).each(Disabling.enable);\n                        FormCoupledInputs.getLock(comp).each(Disabling.enable);\n                    }\n                }),\n                toggleOnReceive(() => providersBackstage.checkUiComponentContext('mode:design')),\n                config('size-input-events2', [\n                    run$1(ratioEvent, (component, simulatedEvent) => {\n                        const isField1 = simulatedEvent.event.isField1;\n                        const optCurrent = isField1 ? FormCoupledInputs.getField1(component) : FormCoupledInputs.getField2(component);\n                        const optOther = isField1 ? FormCoupledInputs.getField2(component) : FormCoupledInputs.getField1(component);\n                        const value1 = optCurrent.map(Representing.getValue).getOr('');\n                        const value2 = optOther.map(Representing.getValue).getOr('');\n                        converter = makeRatioConverter(value1, value2);\n                    })\n                ])\n            ])\n        });\n    };\n\n    const renderSlider = (spec, providerBackstage, initialData) => {\n        const labelPart = Slider.parts.label({\n            dom: {\n                tag: 'label',\n                classes: ['tox-label']\n            },\n            components: [\n                text$2(providerBackstage.translate(spec.label))\n            ]\n        });\n        const spectrum = Slider.parts.spectrum({\n            dom: {\n                tag: 'div',\n                classes: ['tox-slider__rail'],\n                attributes: {\n                    role: 'presentation'\n                }\n            }\n        });\n        const thumb = Slider.parts.thumb({\n            dom: {\n                tag: 'div',\n                classes: ['tox-slider__handle'],\n                attributes: {\n                    role: 'presentation'\n                }\n            }\n        });\n        return Slider.sketch({\n            dom: {\n                tag: 'div',\n                classes: ['tox-slider'],\n                attributes: {\n                    role: 'presentation'\n                }\n            },\n            model: {\n                mode: 'x',\n                minX: spec.min,\n                maxX: spec.max,\n                getInitialValue: constant$1(initialData.getOrThunk(() => (Math.abs(spec.max) - Math.abs(spec.min)) / 2))\n            },\n            components: [\n                labelPart,\n                spectrum,\n                thumb\n            ],\n            sliderBehaviours: derive$1([\n                ComposingConfigs.self(),\n                Focusing.config({})\n            ]),\n            onChoose: (component, thumb, value) => {\n                emitWith(component, formChangeEvent, { name: spec.name, value });\n            },\n            onChange: (component, thumb, value) => {\n                emitWith(component, formChangeEvent, { name: spec.name, value });\n            },\n        });\n    };\n\n    const renderTable = (spec, providersBackstage) => {\n        const renderTh = (text) => ({\n            dom: {\n                tag: 'th',\n                innerHtml: providersBackstage.translate(text)\n            }\n        });\n        const renderHeader = (header) => ({\n            dom: {\n                tag: 'thead'\n            },\n            components: [\n                {\n                    dom: {\n                        tag: 'tr'\n                    },\n                    components: map$2(header, renderTh)\n                }\n            ]\n        });\n        const renderTd = (text) => ({ dom: { tag: 'td', innerHtml: providersBackstage.translate(text) } });\n        const renderTr = (row) => ({ dom: { tag: 'tr' }, components: map$2(row, renderTd) });\n        const renderRows = (rows) => ({ dom: { tag: 'tbody' }, components: map$2(rows, renderTr) });\n        return {\n            dom: {\n                tag: 'table',\n                classes: ['tox-dialog__table']\n            },\n            components: [\n                renderHeader(spec.header),\n                renderRows(spec.cells)\n            ],\n            behaviours: derive$1([\n                Tabstopping.config({}),\n                Focusing.config({})\n            ])\n        };\n    };\n\n    const renderTextField = (spec, providersBackstage) => {\n        const pLabel = spec.label.map((label) => renderLabel$3(label, providersBackstage));\n        const baseInputBehaviours = [\n            Disabling.config({\n                disabled: () => spec.disabled || providersBackstage.checkUiComponentContext(spec.context).shouldDisable\n            }),\n            toggleOnReceive(() => providersBackstage.checkUiComponentContext(spec.context)),\n            Keying.config({\n                mode: 'execution',\n                useEnter: spec.multiline !== true,\n                useControlEnter: spec.multiline === true,\n                execute: (comp) => {\n                    emit(comp, formSubmitEvent);\n                    return Optional.some(true);\n                }\n            }),\n            config('textfield-change', [\n                run$1(input(), (component, _) => {\n                    emitWith(component, formChangeEvent, { name: spec.name });\n                }),\n                run$1(postPaste(), (component, _) => {\n                    emitWith(component, formChangeEvent, { name: spec.name });\n                })\n            ]),\n            Tabstopping.config({})\n        ];\n        const validatingBehaviours = spec.validation.map((vl) => Invalidating.config({\n            getRoot: (input) => {\n                return parentElement(input.element);\n            },\n            invalidClass: 'tox-invalid',\n            validator: {\n                validate: (input) => {\n                    const v = Representing.getValue(input);\n                    const result = vl.validator(v);\n                    return Future.pure(result === true ? Result.value(v) : Result.error(result));\n                },\n                validateOnLoad: vl.validateOnLoad\n            }\n        })).toArray();\n        const placeholder = spec.placeholder.fold(constant$1({}), (p) => ({ placeholder: providersBackstage.translate(p) }));\n        const inputMode = spec.inputMode.fold(constant$1({}), (mode) => ({ inputmode: mode }));\n        const spellcheck = spec.spellcheck.fold(constant$1({}), (spellchecker) => ({ spellcheck: spellchecker }));\n        const inputAttributes = {\n            ...spellcheck,\n            ...placeholder,\n            ...inputMode,\n            'data-mce-name': spec.name\n        };\n        const pField = FormField.parts.field({\n            tag: spec.multiline === true ? 'textarea' : 'input',\n            ...spec.data.map((data) => ({ data })).getOr({}),\n            inputAttributes,\n            inputClasses: [spec.classname],\n            inputBehaviours: derive$1(flatten([\n                baseInputBehaviours,\n                validatingBehaviours\n            ])),\n            selectOnFocus: false,\n            factory: Input\n        });\n        // TINY-9331: This wrapper is needed to avoid border-radius rendering issues when the textarea has a scrollbar\n        const pTextField = spec.multiline ? {\n            dom: {\n                tag: 'div',\n                classes: ['tox-textarea-wrap']\n            },\n            components: [pField]\n        } : pField;\n        const extraClasses = spec.flex ? ['tox-form__group--stretched'] : [];\n        const extraClasses2 = extraClasses.concat(spec.maximized ? ['tox-form-group--maximize'] : []);\n        const extraBehaviours = [\n            Disabling.config({\n                disabled: () => spec.disabled || providersBackstage.checkUiComponentContext(spec.context).shouldDisable,\n                onDisabled: (comp) => {\n                    FormField.getField(comp).each(Disabling.disable);\n                },\n                onEnabled: (comp) => {\n                    FormField.getField(comp).each(Disabling.enable);\n                }\n            }),\n            toggleOnReceive(() => providersBackstage.checkUiComponentContext(spec.context)),\n        ];\n        return renderFormFieldWith(pLabel, pTextField, extraClasses2, extraBehaviours);\n    };\n    const renderInput = (spec, providersBackstage, initialData) => renderTextField({\n        name: spec.name,\n        multiline: false,\n        label: spec.label,\n        inputMode: spec.inputMode,\n        placeholder: spec.placeholder,\n        flex: false,\n        disabled: !spec.enabled,\n        classname: 'tox-textfield',\n        validation: Optional.none(),\n        maximized: spec.maximized,\n        data: initialData,\n        context: spec.context,\n        spellcheck: Optional.none(),\n    }, providersBackstage);\n    const renderTextarea = (spec, providersBackstage, initialData) => renderTextField({\n        name: spec.name,\n        multiline: true,\n        label: spec.label,\n        inputMode: Optional.none(), // type attribute is not valid for textareas\n        placeholder: spec.placeholder,\n        flex: true,\n        disabled: !spec.enabled,\n        classname: 'tox-textarea',\n        validation: Optional.none(),\n        maximized: spec.maximized,\n        data: initialData,\n        context: spec.context,\n        spellcheck: spec.spellcheck,\n    }, providersBackstage);\n\n    const getMenuButtonApi = (component) => ({\n        isEnabled: () => !Disabling.isDisabled(component),\n        setEnabled: (state) => Disabling.set(component, !state),\n        setActive: (state) => {\n            // Note: We can't use the toggling behaviour here, as the dropdown for the menu also relies on it.\n            // As such, we'll need to do this manually\n            const elm = component.element;\n            if (state) {\n                add$2(elm, \"tox-tbtn--enabled\" /* ToolbarButtonClasses.Ticked */);\n                set$9(elm, 'aria-pressed', true);\n            }\n            else {\n                remove$3(elm, \"tox-tbtn--enabled\" /* ToolbarButtonClasses.Ticked */);\n                remove$8(elm, 'aria-pressed');\n            }\n        },\n        isActive: () => has(component.element, \"tox-tbtn--enabled\" /* ToolbarButtonClasses.Ticked */),\n        setTooltip: (tooltip) => {\n            emitWith(component, updateTooltiptext, {\n                text: tooltip\n            });\n        },\n        setText: (text) => {\n            emitWith(component, updateMenuText, {\n                text\n            });\n        },\n        setIcon: (icon) => emitWith(component, updateMenuIcon, {\n            icon\n        })\n    });\n    const renderMenuButton = (spec, prefix, backstage, role, tabstopping = true, btnName) => {\n        const classes = spec.buttonType === 'bordered' ? ['bordered'] : [];\n        return renderCommonDropdown({\n            text: spec.text,\n            icon: spec.icon,\n            tooltip: spec.tooltip,\n            ariaLabel: spec.tooltip,\n            searchable: spec.search.isSome(),\n            // https://www.w3.org/TR/wai-aria-practices/examples/menubar/menubar-2/menubar-2.html\n            role,\n            fetch: (dropdownComp, callback) => {\n                const fetchContext = {\n                    pattern: spec.search.isSome() ? getSearchPattern(dropdownComp) : ''\n                };\n                spec.fetch((items) => {\n                    callback(build(items, ItemResponse$1.CLOSE_ON_EXECUTE, backstage, {\n                        isHorizontalMenu: false,\n                        // MenuButtons are the only dropdowns that support searchable (2022-08-16)\n                        search: spec.search\n                    }));\n                }, fetchContext, getMenuButtonApi(dropdownComp));\n            },\n            onSetup: spec.onSetup,\n            getApi: (comp) => getMenuButtonApi(comp),\n            columns: 1,\n            presets: 'normal',\n            classes,\n            dropdownBehaviours: [\n                ...(tabstopping ? [Tabstopping.config({})] : []),\n            ],\n            context: spec.context\n        }, prefix, backstage.shared, btnName);\n    };\n    const getFetch = (items, getButton, backstage) => {\n        const getMenuItemAction = (item) => (api) => {\n            // Update the menu item state\n            const newValue = !api.isActive();\n            api.setActive(newValue);\n            item.storage.set(newValue);\n            // Fire the form action event\n            backstage.shared.getSink().each((sink) => {\n                getButton().getOpt(sink).each((orig) => {\n                    focus$4(orig.element);\n                    emitWith(orig, formActionEvent, {\n                        name: item.name,\n                        value: item.storage.get()\n                    });\n                });\n            });\n        };\n        const getMenuItemSetup = (item) => (api) => {\n            api.setActive(item.storage.get());\n        };\n        return (success) => {\n            success(map$2(items, (item) => {\n                const text = item.text.fold(() => ({}), (text) => ({\n                    text\n                }));\n                return {\n                    type: item.type,\n                    active: false,\n                    ...text,\n                    context: item.context,\n                    onAction: getMenuItemAction(item),\n                    onSetup: getMenuItemSetup(item)\n                };\n            }));\n        };\n    };\n\n    const renderLabel = (text) => ({\n        dom: {\n            tag: 'span',\n            classes: ['tox-tree__label'],\n            attributes: {\n                'aria-label': text,\n            }\n        },\n        components: [\n            text$2(text)\n        ],\n    });\n    const renderCustomStateIcon = (container, components, backstage) => {\n        container.customStateIcon.each((icon) => components.push(renderIcon(icon, backstage.shared.providers.icons, container.customStateIconTooltip.fold(() => [], (tooltip) => [\n            Tooltipping.config(backstage.shared.providers.tooltips.getConfig({\n                tooltipText: tooltip\n            }))\n        ]), ['tox-icon-custom-state'])));\n    };\n    const leafLabelEventsId = generate$6('leaf-label-event-id');\n    const renderLeafLabel = ({ leaf, onLeafAction, visible, treeId, selectedId, backstage }) => {\n        const internalMenuButton = leaf.menu.map((btn) => renderMenuButton(btn, 'tox-mbtn', backstage, Optional.none(), visible));\n        const components = [renderLabel(leaf.title)];\n        renderCustomStateIcon(leaf, components, backstage);\n        internalMenuButton.each((btn) => components.push(btn));\n        return Button.sketch({\n            dom: {\n                tag: 'div',\n                classes: ['tox-tree--leaf__label', 'tox-trbtn']\n                    .concat(visible ? ['tox-tree--leaf__label--visible'] : []),\n            },\n            components,\n            role: 'treeitem',\n            action: (button) => {\n                onLeafAction(leaf.id);\n                button.getSystem().broadcastOn([`update-active-item-${treeId}`], {\n                    value: leaf.id\n                });\n            },\n            eventOrder: {\n                [keydown()]: [\n                    leafLabelEventsId,\n                    'keying',\n                ]\n            },\n            buttonBehaviours: derive$1([\n                ...(visible ? [Tabstopping.config({})] : []),\n                Toggling.config({\n                    toggleClass: 'tox-trbtn--enabled',\n                    toggleOnExecute: false,\n                    aria: {\n                        mode: 'selected'\n                    }\n                }),\n                Receiving.config({\n                    channels: {\n                        [`update-active-item-${treeId}`]: {\n                            onReceive: (comp, message) => {\n                                (message.value === leaf.id ? Toggling.on : Toggling.off)(comp);\n                            }\n                        }\n                    }\n                }),\n                config(leafLabelEventsId, [\n                    runOnAttached((comp, _se) => {\n                        selectedId.each((id) => {\n                            const toggle = id === leaf.id ? Toggling.on : Toggling.off;\n                            toggle(comp);\n                        });\n                    }),\n                    run$1(keydown(), (comp, se) => {\n                        const isLeftArrowKey = se.event.raw.code === 'ArrowLeft';\n                        const isRightArrowKey = se.event.raw.code === 'ArrowRight';\n                        if (isLeftArrowKey) {\n                            ancestor$1(comp.element, '.tox-tree--directory').each((dirElement) => {\n                                comp.getSystem().getByDom(dirElement).each((dirComp) => {\n                                    child(dirElement, '.tox-tree--directory__label').each((dirLabelElement) => {\n                                        dirComp.getSystem().getByDom(dirLabelElement).each(Focusing.focus);\n                                    });\n                                });\n                            });\n                            se.stop();\n                        }\n                        else if (isRightArrowKey) {\n                            se.stop();\n                        }\n                    })\n                ])\n            ]),\n        });\n    };\n    const renderIcon = (iconName, iconsProvider, behaviours, extraClasses, extraAttributes) => render$4(iconName, {\n        tag: 'span',\n        classes: [\n            'tox-tree__icon-wrap',\n            'tox-icon',\n        ].concat(extraClasses || []),\n        behaviours,\n        attributes: extraAttributes\n    }, iconsProvider);\n    const renderIconFromPack = (iconName, iconsProvider) => renderIcon(iconName, iconsProvider, []);\n    const directoryLabelEventsId = generate$6('directory-label-event-id');\n    const renderDirectoryLabel = ({ directory, visible, noChildren, backstage }) => {\n        const internalMenuButton = directory.menu.map((btn) => renderMenuButton(btn, 'tox-mbtn', backstage, Optional.none()));\n        const components = [\n            {\n                dom: {\n                    tag: 'div',\n                    classes: ['tox-chevron'],\n                },\n                components: [\n                    renderIconFromPack('chevron-right', backstage.shared.providers.icons),\n                ]\n            },\n            renderLabel(directory.title)\n        ];\n        renderCustomStateIcon(directory, components, backstage);\n        internalMenuButton.each((btn) => {\n            components.push(btn);\n        });\n        const toggleExpandChildren = (button) => {\n            ancestor$1(button.element, '.tox-tree--directory').each((directoryEle) => {\n                button.getSystem().getByDom(directoryEle).each((directoryComp) => {\n                    const willExpand = !Toggling.isOn(directoryComp);\n                    Toggling.toggle(directoryComp);\n                    emitWith(button, 'expand-tree-node', { expanded: willExpand, node: directory.id });\n                });\n            });\n        };\n        return Button.sketch({\n            dom: {\n                tag: 'div',\n                classes: ['tox-tree--directory__label', 'tox-trbtn'].concat(visible ? ['tox-tree--directory__label--visible'] : []),\n            },\n            components,\n            action: toggleExpandChildren,\n            eventOrder: {\n                [keydown()]: [\n                    directoryLabelEventsId,\n                    'keying',\n                ]\n            },\n            buttonBehaviours: derive$1([\n                ...(visible ? [Tabstopping.config({})] : []),\n                config(directoryLabelEventsId, [\n                    run$1(keydown(), (comp, se) => {\n                        const isRightArrowKey = se.event.raw.code === 'ArrowRight';\n                        const isLeftArrowKey = se.event.raw.code === 'ArrowLeft';\n                        if (isRightArrowKey && noChildren) {\n                            se.stop();\n                        }\n                        if (isRightArrowKey || isLeftArrowKey) {\n                            ancestor$1(comp.element, '.tox-tree--directory').each((directoryEle) => {\n                                comp.getSystem().getByDom(directoryEle).each((directoryComp) => {\n                                    if (!Toggling.isOn(directoryComp) && isRightArrowKey || Toggling.isOn(directoryComp) && isLeftArrowKey) {\n                                        toggleExpandChildren(comp);\n                                        se.stop();\n                                    }\n                                    else if (isLeftArrowKey && !Toggling.isOn(directoryComp)) {\n                                        ancestor$1(directoryComp.element, '.tox-tree--directory').each((parentDirElement) => {\n                                            child(parentDirElement, '.tox-tree--directory__label').each((parentDirLabelElement) => {\n                                                directoryComp.getSystem().getByDom(parentDirLabelElement).each(Focusing.focus);\n                                            });\n                                        });\n                                        se.stop();\n                                    }\n                                });\n                            });\n                        }\n                    })\n                ])\n            ])\n        });\n    };\n    const renderDirectoryChildren = ({ children, onLeafAction, visible, treeId, expandedIds, selectedId, backstage }) => {\n        return {\n            dom: {\n                tag: 'div',\n                classes: ['tox-tree--directory__children'],\n            },\n            components: children.map((item) => {\n                return item.type === 'leaf' ?\n                    renderLeafLabel({ leaf: item, selectedId, onLeafAction, visible, treeId, backstage }) :\n                    renderDirectory({ directory: item, expandedIds, selectedId, onLeafAction, labelTabstopping: visible, treeId, backstage });\n            }),\n            behaviours: derive$1([\n                Sliding.config({\n                    dimension: {\n                        property: 'height'\n                    },\n                    closedClass: 'tox-tree--directory__children--closed',\n                    openClass: 'tox-tree--directory__children--open',\n                    growingClass: 'tox-tree--directory__children--growing',\n                    shrinkingClass: 'tox-tree--directory__children--shrinking',\n                    expanded: visible,\n                }),\n                Replacing.config({})\n            ])\n        };\n    };\n    const directoryEventsId = generate$6('directory-event-id');\n    const renderDirectory = ({ directory, onLeafAction, labelTabstopping, treeId, backstage, expandedIds, selectedId }) => {\n        const { children } = directory;\n        const expandedIdsCell = Cell(expandedIds);\n        const computedChildrenComponents = (visible) => children.map((item) => {\n            return item.type === 'leaf' ?\n                renderLeafLabel({ leaf: item, selectedId, onLeafAction, visible, treeId, backstage }) :\n                renderDirectory({ directory: item, expandedIds: expandedIdsCell.get(), selectedId, onLeafAction, labelTabstopping: visible, treeId, backstage });\n        });\n        const childrenVisible = expandedIds.includes(directory.id);\n        return ({\n            dom: {\n                tag: 'div',\n                classes: ['tox-tree--directory'],\n                attributes: {\n                    role: 'treeitem'\n                }\n            },\n            components: [\n                renderDirectoryLabel({ directory, visible: labelTabstopping, noChildren: directory.children.length === 0, backstage }),\n                renderDirectoryChildren({ children, expandedIds, selectedId, onLeafAction, visible: childrenVisible, treeId, backstage })\n            ],\n            behaviours: derive$1([\n                config(directoryEventsId, [\n                    runOnAttached((comp, _se) => {\n                        Toggling.set(comp, childrenVisible);\n                    }),\n                    run$1('expand-tree-node', (_cmp, se) => {\n                        const { expanded, node } = se.event;\n                        expandedIdsCell.set(expanded ?\n                            [...expandedIdsCell.get(), node] :\n                            expandedIdsCell.get().filter((id) => id !== node));\n                    }),\n                ]),\n                Toggling.config({\n                    ...(directory.children.length > 0 ? {\n                        aria: {\n                            mode: 'expanded',\n                        },\n                    } : {}),\n                    toggleClass: 'tox-tree--directory--expanded',\n                    onToggled: (comp, childrenVisible) => {\n                        const childrenComp = comp.components()[1];\n                        const newChildren = computedChildrenComponents(childrenVisible);\n                        if (childrenVisible) {\n                            Sliding.grow(childrenComp);\n                        }\n                        else {\n                            Sliding.shrink(childrenComp);\n                        }\n                        Replacing.set(childrenComp, newChildren);\n                    },\n                }),\n            ])\n        });\n    };\n    const treeEventsId = generate$6('tree-event-id');\n    const renderTree = (spec, backstage) => {\n        const onLeafAction = spec.onLeafAction.getOr(noop);\n        const onToggleExpand = spec.onToggleExpand.getOr(noop);\n        const defaultExpandedIds = spec.defaultExpandedIds;\n        const expandedIds = Cell(defaultExpandedIds);\n        const selectedIdCell = Cell(spec.defaultSelectedId);\n        const treeId = generate$6('tree-id');\n        const children = (selectedId, expandedIds) => spec.items.map((item) => {\n            return item.type === 'leaf' ?\n                renderLeafLabel({ leaf: item, selectedId, onLeafAction, visible: true, treeId, backstage }) :\n                renderDirectory({ directory: item, selectedId, onLeafAction, expandedIds, labelTabstopping: true, treeId, backstage });\n        });\n        return {\n            dom: {\n                tag: 'div',\n                classes: ['tox-tree'],\n                attributes: {\n                    role: 'tree'\n                }\n            },\n            components: children(selectedIdCell.get(), expandedIds.get()),\n            behaviours: derive$1([\n                Keying.config({\n                    mode: 'flow',\n                    selector: '.tox-tree--leaf__label--visible, .tox-tree--directory__label--visible',\n                    cycles: false,\n                }),\n                config(treeEventsId, [\n                    run$1('expand-tree-node', (_cmp, se) => {\n                        const { expanded, node } = se.event;\n                        expandedIds.set(expanded ?\n                            [...expandedIds.get(), node] :\n                            expandedIds.get().filter((id) => id !== node));\n                        onToggleExpand(expandedIds.get(), { expanded, node });\n                    })\n                ]),\n                Receiving.config({\n                    channels: {\n                        [`update-active-item-${treeId}`]: {\n                            onReceive: (comp, message) => {\n                                selectedIdCell.set(Optional.some(message.value));\n                                Replacing.set(comp, children(Optional.some(message.value), expandedIds.get()));\n                            }\n                        }\n                    }\n                }),\n                Replacing.config({})\n            ])\n        };\n    };\n\n    const renderCommonSpec = (spec, actionOpt, extraBehaviours = [], dom, components, tooltip, providersBackstage) => {\n        const action = actionOpt.fold(() => ({}), (action) => ({\n            action\n        }));\n        const common = {\n            buttonBehaviours: derive$1([\n                DisablingConfigs.item(() => !spec.enabled || providersBackstage.checkUiComponentContext(spec.context).shouldDisable),\n                toggleOnReceive(() => providersBackstage.checkUiComponentContext(spec.context)),\n                Tabstopping.config({}),\n                ...tooltip.map((t) => Tooltipping.config(providersBackstage.tooltips.getConfig({\n                    tooltipText: providersBackstage.translate(t)\n                }))).toArray(),\n                config('button press', [\n                    preventDefault('click')\n                ])\n            ].concat(extraBehaviours)),\n            eventOrder: {\n                click: ['button press', 'alloy.base.behaviour'],\n                mousedown: ['button press', 'alloy.base.behaviour']\n            },\n            ...action\n        };\n        const domFinal = deepMerge(common, { dom });\n        return deepMerge(domFinal, { components });\n    };\n    // An IconButton just seems to be a button that *cannot* have text, but\n    // can have a tooltip. It's only used for the More Drawer button at the moment.\n    const renderIconButtonSpec = (spec, action, providersBackstage, extraBehaviours = [], btnName) => {\n        const tooltipAttributes = spec.tooltip.map((tooltip) => ({\n            'aria-label': providersBackstage.translate(tooltip),\n        })).getOr({});\n        const dom = {\n            tag: 'button',\n            classes: [\"tox-tbtn\" /* ToolbarButtonClasses.Button */],\n            attributes: { ...tooltipAttributes, 'data-mce-name': btnName }\n        };\n        const icon = spec.icon.map((iconName) => renderIconFromPack$1(iconName, providersBackstage.icons));\n        const components = componentRenderPipeline([\n            icon\n        ]);\n        return renderCommonSpec(spec, action, extraBehaviours, dom, components, spec.tooltip, providersBackstage);\n    };\n    const calculateClassesFromButtonType = (buttonType) => {\n        switch (buttonType) {\n            case 'primary':\n                return ['tox-button'];\n            case 'toolbar':\n                return ['tox-tbtn'];\n            case 'secondary':\n            default:\n                return ['tox-button', 'tox-button--secondary'];\n        }\n    };\n    // Maybe the list of extraBehaviours is better than doing a Merger.deepMerge that\n    // we do elsewhere? Not sure.\n    const renderButtonSpec = (spec, action, providersBackstage, extraBehaviours = [], extraClasses = []) => {\n        // It's a bit confusing that this is called text. It seems to be a tooltip. Although I can see\n        // that it's used if there is no icon\n        const translatedText = providersBackstage.translate(spec.text);\n        const icon = spec.icon.map((iconName) => renderIconFromPack$1(iconName, providersBackstage.icons));\n        const components = [icon.getOrThunk(() => text$2(translatedText))];\n        // The old default is based on the now-deprecated 'primary' property. `buttonType` takes precedence now.\n        const buttonType = spec.buttonType.getOr(!spec.primary && !spec.borderless ? 'secondary' : 'primary');\n        const baseClasses = calculateClassesFromButtonType(buttonType);\n        const classes = [\n            ...baseClasses,\n            ...icon.isSome() ? ['tox-button--icon'] : [],\n            ...spec.borderless ? ['tox-button--naked'] : [],\n            ...extraClasses\n        ];\n        const dom = {\n            tag: 'button',\n            classes,\n            attributes: {\n                'aria-label': translatedText,\n                'data-mce-name': spec.text\n            }\n        };\n        // Only provide a tooltip if we are using an icon. This is because above, a button is only an icon\n        // or text, and not both.\n        const optTooltip = spec.icon.map(constant$1(translatedText));\n        return renderCommonSpec(spec, action, extraBehaviours, dom, components, optTooltip, providersBackstage);\n    };\n    // This actually seems to be a button on the dialog for UrlInput only (browse). Interesting.\n    const renderButton$1 = (spec, action, providersBackstage, extraBehaviours = [], extraClasses = []) => {\n        const buttonSpec = renderButtonSpec(spec, Optional.some(action), providersBackstage, extraBehaviours, extraClasses);\n        return Button.sketch(buttonSpec);\n    };\n    const getAction = (name, buttonType) => (comp) => {\n        if (buttonType === 'custom') {\n            emitWith(comp, formActionEvent, {\n                name,\n                value: {}\n            });\n        }\n        else if (buttonType === 'submit') {\n            emit(comp, formSubmitEvent);\n        }\n        else if (buttonType === 'cancel') {\n            emit(comp, formCancelEvent);\n        }\n        else {\n            // eslint-disable-next-line no-console\n            console.error('Unknown button type: ', buttonType);\n        }\n    };\n    const isMenuFooterButtonSpec = (spec, buttonType) => buttonType === 'menu';\n    const isNormalFooterButtonSpec = (spec, buttonType) => buttonType === 'custom' || buttonType === 'cancel' || buttonType === 'submit';\n    const isToggleButtonSpec = (spec, buttonType) => buttonType === 'togglebutton';\n    const renderToggleButton = (spec, providers, btnName) => {\n        const optMemIcon = spec.icon\n            .map((memIcon) => renderReplaceableIconFromPack(memIcon, providers.icons))\n            .map(record);\n        const action = (comp) => {\n            emitWith(comp, formActionEvent, {\n                name: spec.name,\n                value: {\n                    setIcon: (newIcon) => {\n                        optMemIcon.map((memIcon) => memIcon.getOpt(comp).each((displayIcon) => {\n                            Replacing.set(displayIcon, [\n                                renderReplaceableIconFromPack(newIcon, providers.icons)\n                            ]);\n                        }));\n                    }\n                }\n            });\n        };\n        // The old default is based on the now-deprecated 'primary' property. `buttonType` takes precedence now.\n        const buttonType = spec.buttonType.getOr(!spec.primary ? 'secondary' : 'primary');\n        const buttonSpec = {\n            ...spec,\n            name: spec.name ?? '',\n            primary: buttonType === 'primary',\n            tooltip: spec.tooltip,\n            enabled: spec.enabled ?? false,\n            borderless: false\n        };\n        const tooltipAttributes = buttonSpec.tooltip.or(spec.text).map((tooltip) => ({\n            'aria-label': providers.translate(tooltip),\n        })).getOr({});\n        const buttonTypeClasses = calculateClassesFromButtonType(buttonType ?? 'secondary');\n        const showIconAndText = spec.icon.isSome() && spec.text.isSome();\n        const dom = {\n            tag: 'button',\n            classes: [\n                ...buttonTypeClasses.concat(spec.icon.isSome() ? ['tox-button--icon'] : []),\n                ...(spec.active ? [\"tox-button--enabled\" /* ViewButtonClasses.Ticked */] : []),\n                ...(showIconAndText ? ['tox-button--icon-and-text'] : [])\n            ],\n            attributes: {\n                ...tooltipAttributes,\n                ...(isNonNullable(btnName) ? { 'data-mce-name': btnName } : {})\n            }\n        };\n        const extraBehaviours = [];\n        const translatedText = providers.translate(spec.text.getOr(''));\n        const translatedTextComponed = text$2(translatedText);\n        const iconComp = componentRenderPipeline([optMemIcon.map((memIcon) => memIcon.asSpec())]);\n        const components = [\n            ...iconComp,\n            ...(spec.text.isSome() ? [translatedTextComponed] : [])\n        ];\n        const iconButtonSpec = renderCommonSpec(buttonSpec, Optional.some(action), extraBehaviours, dom, components, spec.tooltip, providers);\n        return Button.sketch(iconButtonSpec);\n    };\n    const renderFooterButton = (spec, buttonType, backstage) => {\n        if (isMenuFooterButtonSpec(spec, buttonType)) {\n            const getButton = () => memButton;\n            const menuButtonSpec = spec;\n            const fixedSpec = {\n                ...spec,\n                buttonType: 'default',\n                type: 'menubutton',\n                // Currently, dialog-based menu buttons cannot be searchable.\n                search: Optional.none(),\n                onSetup: (api) => {\n                    api.setEnabled(spec.enabled);\n                    return noop;\n                },\n                fetch: getFetch(menuButtonSpec.items, getButton, backstage)\n            };\n            const memButton = record(renderMenuButton(fixedSpec, \"tox-tbtn\" /* ToolbarButtonClasses.Button */, backstage, Optional.none(), true, spec.text.or(spec.tooltip).getOrUndefined()));\n            return memButton.asSpec();\n        }\n        else if (isNormalFooterButtonSpec(spec, buttonType)) {\n            const action = getAction(spec.name, buttonType);\n            const buttonSpec = {\n                ...spec,\n                context: buttonType === 'cancel' ? 'any' : spec.context,\n                borderless: false\n            };\n            return renderButton$1(buttonSpec, action, backstage.shared.providers, []);\n        }\n        else if (isToggleButtonSpec(spec, buttonType)) {\n            return renderToggleButton(spec, backstage.shared.providers, spec.text.or(spec.tooltip).getOrUndefined());\n        }\n        else {\n            // eslint-disable-next-line no-console\n            console.error('Unknown footer button type: ', buttonType);\n            throw new Error('Unknown footer button type');\n        }\n    };\n    const renderDialogButton = (spec, providersBackstage) => {\n        const action = getAction(spec.name, 'custom');\n        return renderFormField(Optional.none(), FormField.parts.field({\n            factory: Button,\n            ...renderButtonSpec(spec, Optional.some(action), providersBackstage, [\n                memory(''),\n                ComposingConfigs.self()\n            ])\n        }));\n    };\n\n    const separator$1 = {\n        type: 'separator'\n    };\n    const toMenuItem = (target) => ({\n        type: 'menuitem',\n        value: target.url,\n        text: target.title,\n        meta: {\n            attach: target.attach\n        },\n        onAction: noop\n    });\n    const staticMenuItem = (title, url) => ({\n        type: 'menuitem',\n        value: url,\n        text: title,\n        meta: {\n            attach: undefined\n        },\n        onAction: noop\n    });\n    const toMenuItems = (targets) => map$2(targets, toMenuItem);\n    const filterLinkTargets = (type, targets) => filter$2(targets, (target) => target.type === type);\n    const filteredTargets = (type, targets) => toMenuItems(filterLinkTargets(type, targets));\n    const headerTargets = (linkInfo) => filteredTargets('header', linkInfo.targets);\n    const anchorTargets = (linkInfo) => filteredTargets('anchor', linkInfo.targets);\n    const anchorTargetTop = (linkInfo) => Optional.from(linkInfo.anchorTop).map((url) => staticMenuItem('<top>', url)).toArray();\n    const anchorTargetBottom = (linkInfo) => Optional.from(linkInfo.anchorBottom).map((url) => staticMenuItem('<bottom>', url)).toArray();\n    const historyTargets = (history) => map$2(history, (url) => staticMenuItem(url, url));\n    const joinMenuLists = (items) => {\n        return foldl(items, (a, b) => {\n            const bothEmpty = a.length === 0 || b.length === 0;\n            return bothEmpty ? a.concat(b) : a.concat(separator$1, b);\n        }, []);\n    };\n    const filterByQuery = (term, menuItems) => {\n        const lowerCaseTerm = term.toLowerCase();\n        return filter$2(menuItems, (item) => {\n            const text = item.meta !== undefined && item.meta.text !== undefined ? item.meta.text : item.text;\n            const value = item.value ?? '';\n            return contains$1(text.toLowerCase(), lowerCaseTerm) || contains$1(value.toLowerCase(), lowerCaseTerm);\n        });\n    };\n\n    const getItems = (fileType, input, urlBackstage) => {\n        const urlInputValue = Representing.getValue(input);\n        const term = urlInputValue?.meta?.text ?? urlInputValue.value;\n        const info = urlBackstage.getLinkInformation();\n        return info.fold(() => [], (linkInfo) => {\n            const history = filterByQuery(term, historyTargets(urlBackstage.getHistory(fileType)));\n            return fileType === 'file' ? joinMenuLists([\n                history,\n                filterByQuery(term, headerTargets(linkInfo)),\n                filterByQuery(term, flatten([\n                    anchorTargetTop(linkInfo),\n                    anchorTargets(linkInfo),\n                    anchorTargetBottom(linkInfo)\n                ]))\n            ])\n                : history;\n        });\n    };\n    const errorId = generate$6('aria-invalid');\n    const renderUrlInput = (spec, backstage, urlBackstage, initialData) => {\n        const providersBackstage = backstage.shared.providers;\n        const updateHistory = (component) => {\n            const urlEntry = Representing.getValue(component);\n            urlBackstage.addToHistory(urlEntry.value, spec.filetype);\n        };\n        // TODO: Make alloy's typeahead only swallow enter and escape if menu is open\n        const typeaheadSpec = {\n            ...initialData.map((initialData) => ({ initialData })).getOr({}),\n            dismissOnBlur: true,\n            inputClasses: ['tox-textfield'],\n            sandboxClasses: ['tox-dialog__popups'],\n            inputAttributes: {\n                type: 'url'\n            },\n            minChars: 0,\n            responseTime: 0,\n            fetch: (input) => {\n                const items = getItems(spec.filetype, input, urlBackstage);\n                const tdata = build(items, ItemResponse$1.BUBBLE_TO_SANDBOX, backstage, {\n                    isHorizontalMenu: false,\n                    search: Optional.none()\n                });\n                return Future.pure(tdata);\n            },\n            getHotspot: (comp) => memUrlBox.getOpt(comp),\n            onSetValue: (comp, _newValue) => {\n                if (comp.hasConfigured(Invalidating)) {\n                    Invalidating.run(comp).get(noop);\n                }\n            },\n            typeaheadBehaviours: derive$1([\n                ...urlBackstage.getValidationHandler().map((handler) => Invalidating.config({\n                    getRoot: (comp) => parentElement(comp.element),\n                    invalidClass: 'tox-control-wrap--status-invalid',\n                    notify: {\n                        onInvalid: (comp, err) => {\n                            memInvalidIcon.getOpt(comp).each((invalidComp) => {\n                                set$9(invalidComp.element, 'title', providersBackstage.translate(err));\n                            });\n                        }\n                    },\n                    validator: {\n                        validate: (input) => {\n                            const urlEntry = Representing.getValue(input);\n                            return FutureResult.nu((completer) => {\n                                handler({ type: spec.filetype, url: urlEntry.value }, (validation) => {\n                                    if (validation.status === 'invalid') {\n                                        set$9(input.element, 'aria-errormessage', errorId);\n                                        const err = Result.error(validation.message);\n                                        completer(err);\n                                    }\n                                    else {\n                                        remove$8(input.element, 'aria-errormessage');\n                                        const val = Result.value(validation.message);\n                                        completer(val);\n                                    }\n                                });\n                            });\n                        },\n                        validateOnLoad: false\n                    }\n                })).toArray(),\n                Disabling.config({\n                    disabled: () => !spec.enabled || providersBackstage.checkUiComponentContext(spec.context).shouldDisable\n                }),\n                Tabstopping.config({}),\n                config('urlinput-events', \n                // We want to get fast feedback for the link dialog, but not sure about others\n                [\n                    run$1(input(), (comp) => {\n                        const currentValue = get$5(comp.element);\n                        const trimmedValue = currentValue.trim();\n                        if (trimmedValue !== currentValue) {\n                            set$4(comp.element, trimmedValue);\n                        }\n                        if (spec.filetype === 'file') {\n                            emitWith(comp, formChangeEvent, { name: spec.name });\n                        }\n                    }),\n                    run$1(change(), (comp) => {\n                        emitWith(comp, formChangeEvent, { name: spec.name });\n                        updateHistory(comp);\n                    }),\n                    run$1(postPaste(), (comp) => {\n                        emitWith(comp, formChangeEvent, { name: spec.name });\n                        updateHistory(comp);\n                    })\n                ])\n            ]),\n            eventOrder: {\n                [input()]: ['streaming', 'urlinput-events', 'invalidating']\n            },\n            model: {\n                getDisplayText: (itemData) => itemData.value,\n                selectsOver: false,\n                populateFromBrowse: false\n            },\n            markers: {\n                openClass: 'tox-textfield--popup-open'\n            },\n            lazySink: backstage.shared.getSink,\n            parts: {\n                menu: part(false, 1, 'normal')\n            },\n            onExecute: (_menu, component, _entry) => {\n                emitWith(component, formSubmitEvent, {});\n            },\n            onItemExecute: (typeahead, _sandbox, _item, _value) => {\n                updateHistory(typeahead);\n                emitWith(typeahead, formChangeEvent, { name: spec.name });\n            }\n        };\n        const pField = FormField.parts.field({\n            ...typeaheadSpec,\n            factory: Typeahead\n        });\n        const pLabel = spec.label.map((label) => renderLabel$3(label, providersBackstage));\n        // TODO: Consider a way of merging with Checkbox.\n        const makeIcon = (name, errId, icon = name, label = name) => render$4(icon, {\n            tag: 'div',\n            classes: ['tox-icon', 'tox-control-wrap__status-icon-' + name],\n            attributes: {\n                'title': providersBackstage.translate(label),\n                'aria-live': 'polite',\n                ...errId.fold(() => ({}), (id) => ({ id }))\n            }\n        }, providersBackstage.icons);\n        const memInvalidIcon = record(makeIcon('invalid', Optional.some(errorId), 'warning'));\n        const memStatus = record({\n            dom: {\n                tag: 'div',\n                classes: ['tox-control-wrap__status-icon-wrap']\n            },\n            components: [\n                // Include the 'valid' and 'unknown' icons here only if they are to be displayed\n                memInvalidIcon.asSpec()\n            ]\n        });\n        const optUrlPicker = urlBackstage.getUrlPicker(spec.filetype);\n        const browseUrlEvent = generate$6('browser.url.event');\n        const memUrlBox = record({\n            dom: {\n                tag: 'div',\n                classes: ['tox-control-wrap']\n            },\n            components: [pField, memStatus.asSpec()],\n            behaviours: derive$1([\n                Disabling.config({\n                    disabled: () => !spec.enabled || providersBackstage.checkUiComponentContext(spec.context).shouldDisable\n                })\n            ])\n        });\n        const memUrlPickerButton = record(renderButton$1({\n            context: spec.context,\n            name: spec.name,\n            icon: Optional.some('browse'),\n            text: spec.picker_text.or(spec.label).getOr(''),\n            enabled: spec.enabled,\n            primary: false,\n            buttonType: Optional.none(),\n            borderless: true\n        }, (component) => emit(component, browseUrlEvent), providersBackstage, [], ['tox-browse-url']));\n        const controlHWrapper = () => ({\n            dom: {\n                tag: 'div',\n                classes: ['tox-form__controls-h-stack']\n            },\n            components: flatten([\n                [memUrlBox.asSpec()],\n                optUrlPicker.map(() => memUrlPickerButton.asSpec()).toArray()\n            ])\n        });\n        const openUrlPicker = (comp) => {\n            Composing.getCurrent(comp).each((field) => {\n                const componentData = Representing.getValue(field);\n                const urlData = {\n                    fieldname: spec.name,\n                    ...componentData\n                };\n                optUrlPicker.each((picker) => {\n                    picker(urlData).get((chosenData) => {\n                        Representing.setValue(field, chosenData);\n                        emitWith(comp, formChangeEvent, { name: spec.name });\n                    });\n                });\n            });\n        };\n        return FormField.sketch({\n            dom: renderFormFieldDom(),\n            components: pLabel.toArray().concat([\n                controlHWrapper()\n            ]),\n            fieldBehaviours: derive$1([\n                Disabling.config({\n                    disabled: () => !spec.enabled || providersBackstage.checkUiComponentContext(spec.context).shouldDisable,\n                    onDisabled: (comp) => {\n                        FormField.getField(comp).each(Disabling.disable);\n                        memUrlPickerButton.getOpt(comp).each(Disabling.disable);\n                    },\n                    onEnabled: (comp) => {\n                        FormField.getField(comp).each(Disabling.enable);\n                        memUrlPickerButton.getOpt(comp).each(Disabling.enable);\n                    }\n                }),\n                toggleOnReceive(() => providersBackstage.checkUiComponentContext(spec.context)),\n                config('url-input-events', [\n                    run$1(browseUrlEvent, openUrlPicker)\n                ])\n            ])\n        });\n    };\n\n    const renderAlertBanner = (spec, providersBackstage) => {\n        const icon = get(spec.icon, providersBackstage.icons);\n        // For using the alert banner inside a dialog\n        return Container.sketch({\n            dom: {\n                tag: 'div',\n                attributes: {\n                    role: 'alert'\n                },\n                classes: ['tox-notification', 'tox-notification--in', `tox-notification--${spec.level}`]\n            },\n            components: [\n                {\n                    dom: {\n                        tag: 'div',\n                        classes: ['tox-notification__icon'],\n                        innerHtml: !spec.url ? icon : undefined\n                    },\n                    components: spec.url ? [\n                        Button.sketch({\n                            dom: {\n                                tag: 'button',\n                                classes: ['tox-button', 'tox-button--naked', 'tox-button--icon'],\n                                innerHtml: icon,\n                                attributes: {\n                                    title: providersBackstage.translate(spec.iconTooltip)\n                                }\n                            },\n                            // TODO: aria label this button!\n                            action: (comp) => emitWith(comp, formActionEvent, { name: 'alert-banner', value: spec.url }),\n                            buttonBehaviours: derive$1([\n                                addFocusableBehaviour()\n                            ])\n                        })\n                    ] : undefined\n                },\n                {\n                    dom: {\n                        tag: 'div',\n                        classes: ['tox-notification__body'],\n                        // TODO: AP-247: Escape this text so that it can't contain script tags\n                        innerHtml: providersBackstage.translate(spec.text)\n                    }\n                }\n            ]\n        });\n    };\n\n    const renderCheckbox = (spec, providerBackstage, initialData) => {\n        const toggleCheckboxHandler = (comp) => {\n            comp.element.dom.click();\n            return Optional.some(true);\n        };\n        const pField = FormField.parts.field({\n            factory: { sketch: identity },\n            dom: {\n                tag: 'input',\n                classes: ['tox-checkbox__input'],\n                attributes: {\n                    type: 'checkbox'\n                }\n            },\n            behaviours: derive$1([\n                ComposingConfigs.self(),\n                Disabling.config({\n                    disabled: () => !spec.enabled || providerBackstage.checkUiComponentContext(spec.context).shouldDisable,\n                    onDisabled: (component) => {\n                        parentElement(component.element).each((element) => add$2(element, 'tox-checkbox--disabled'));\n                    },\n                    onEnabled: (component) => {\n                        parentElement(component.element).each((element) => remove$3(element, 'tox-checkbox--disabled'));\n                    }\n                }),\n                Tabstopping.config({}),\n                Focusing.config({}),\n                withElement(initialData, get$9, set$5),\n                Keying.config({\n                    mode: 'special',\n                    onEnter: toggleCheckboxHandler,\n                    onSpace: toggleCheckboxHandler,\n                    stopSpaceKeyup: true\n                }),\n                config('checkbox-events', [\n                    run$1(change(), (component, _) => {\n                        emitWith(component, formChangeEvent, { name: spec.name });\n                    })\n                ])\n            ])\n        });\n        const pLabel = FormField.parts.label({\n            dom: {\n                tag: 'span',\n                classes: ['tox-checkbox__label']\n            },\n            components: [\n                text$2(providerBackstage.translate(spec.label))\n            ],\n            behaviours: derive$1([\n                Unselecting.config({})\n            ])\n        });\n        const makeIcon = (className) => {\n            const iconName = className === 'checked' ? 'selected' : 'unselected';\n            return render$4(iconName, { tag: 'span', classes: ['tox-icon', 'tox-checkbox-icon__' + className] }, providerBackstage.icons);\n        };\n        const memIcons = record({\n            dom: {\n                tag: 'div',\n                classes: ['tox-checkbox__icons']\n            },\n            components: [\n                makeIcon('checked'),\n                makeIcon('unchecked')\n            ]\n        });\n        return FormField.sketch({\n            dom: {\n                tag: 'label',\n                classes: ['tox-checkbox']\n            },\n            components: [\n                pField,\n                memIcons.asSpec(),\n                pLabel\n            ],\n            fieldBehaviours: derive$1([\n                Disabling.config({\n                    disabled: () => !spec.enabled || providerBackstage.checkUiComponentContext(spec.context).shouldDisable,\n                }),\n                toggleOnReceive(() => providerBackstage.checkUiComponentContext(spec.context))\n            ])\n        });\n    };\n\n    const renderHtmlPanel = (spec, providersBackstage) => {\n        const classes = ['tox-form__group', ...(spec.stretched ? ['tox-form__group--stretched'] : [])];\n        const init = config('htmlpanel', [\n            runOnAttached((comp) => {\n                spec.onInit(comp.element.dom);\n            })\n        ]);\n        if (spec.presets === 'presentation') {\n            return Container.sketch({\n                dom: {\n                    tag: 'div',\n                    classes,\n                    innerHtml: spec.html\n                },\n                containerBehaviours: derive$1([\n                    Tooltipping.config({\n                        ...providersBackstage.tooltips.getConfig({\n                            tooltipText: '',\n                            onShow: (comp) => {\n                                descendant(comp.element, '[data-mce-tooltip]:hover').orThunk(() => search(comp.element))\n                                    .each((current) => {\n                                    getOpt(current, 'data-mce-tooltip').each((text) => {\n                                        Tooltipping.setComponents(comp, providersBackstage.tooltips.getComponents({ tooltipText: text }));\n                                    });\n                                });\n                            },\n                        }),\n                        mode: 'children-normal',\n                        anchor: (comp) => ({\n                            type: 'node',\n                            node: descendant(comp.element, '[data-mce-tooltip]:hover')\n                                .orThunk(() => search(comp.element).filter((current) => getOpt(current, 'data-mce-tooltip').isSome())),\n                            root: comp.element,\n                            layouts: {\n                                onLtr: constant$1([south$2, north$2, southeast$2, northeast$2, southwest$2, northwest$2]),\n                                onRtl: constant$1([south$2, north$2, southeast$2, northeast$2, southwest$2, northwest$2])\n                            },\n                            bubble: nu$6(0, -2, {}),\n                        })\n                    }),\n                    init\n                ])\n            });\n        }\n        else {\n            return Container.sketch({\n                dom: {\n                    tag: 'div',\n                    classes,\n                    innerHtml: spec.html,\n                    attributes: {\n                        role: 'document'\n                    }\n                },\n                containerBehaviours: derive$1([\n                    Tabstopping.config({}),\n                    Focusing.config({}),\n                    init\n                ])\n            });\n        }\n    };\n\n    const make$1 = (render) => {\n        return (parts, spec, dialogData, backstage, getCompByName) => get$h(spec, 'name').fold(() => render(spec, backstage, Optional.none(), getCompByName), (fieldName) => parts.field(fieldName, render(spec, backstage, get$h(dialogData, fieldName), getCompByName)));\n    };\n    const makeIframe = (render) => (parts, spec, dialogData, backstage, getCompByName) => {\n        const iframeSpec = deepMerge(spec, {\n            source: 'dynamic'\n        });\n        return make$1(render)(parts, iframeSpec, dialogData, backstage, getCompByName);\n    };\n    const factories = {\n        bar: make$1((spec, backstage) => renderBar(spec, backstage.shared)),\n        collection: make$1((spec, backstage, data) => renderCollection(spec, backstage.shared.providers, data)),\n        alertbanner: make$1((spec, backstage) => renderAlertBanner(spec, backstage.shared.providers)),\n        input: make$1((spec, backstage, data) => renderInput(spec, backstage.shared.providers, data)),\n        textarea: make$1((spec, backstage, data) => renderTextarea(spec, backstage.shared.providers, data)),\n        label: make$1((spec, backstage, _data, getCompByName) => renderLabel$2(spec, backstage.shared, getCompByName)),\n        iframe: makeIframe((spec, backstage, data) => renderIFrame(spec, backstage.shared.providers, data)),\n        button: make$1((spec, backstage) => renderDialogButton(spec, backstage.shared.providers)),\n        checkbox: make$1((spec, backstage, data) => renderCheckbox(spec, backstage.shared.providers, data)),\n        colorinput: make$1((spec, backstage, data) => renderColorInput(spec, backstage.shared, backstage.colorinput, data)),\n        colorpicker: make$1((spec, backstage, data) => renderColorPicker(spec, backstage.shared.providers, data)), // Not sure if this needs name.\n        dropzone: make$1((spec, backstage, data) => renderDropZone(spec, backstage.shared.providers, data)),\n        grid: make$1((spec, backstage) => renderGrid(spec, backstage.shared)),\n        listbox: make$1((spec, backstage, data) => renderListBox(spec, backstage, data)),\n        selectbox: make$1((spec, backstage, data) => renderSelectBox(spec, backstage.shared.providers, data)),\n        sizeinput: make$1((spec, backstage) => renderSizeInput(spec, backstage.shared.providers)),\n        slider: make$1((spec, backstage, data) => renderSlider(spec, backstage.shared.providers, data)),\n        urlinput: make$1((spec, backstage, data) => renderUrlInput(spec, backstage, backstage.urlinput, data)),\n        customeditor: make$1(renderCustomEditor),\n        htmlpanel: make$1((spec, backstage) => renderHtmlPanel(spec, backstage.shared.providers)),\n        imagepreview: make$1((spec, _, data) => renderImagePreview(spec, data)),\n        table: make$1((spec, backstage) => renderTable(spec, backstage.shared.providers)),\n        tree: make$1((spec, backstage) => renderTree(spec, backstage)),\n        panel: make$1((spec, backstage) => renderPanel(spec, backstage))\n    };\n    const noFormParts = {\n        // This is cast as we only actually want an alloy spec and don't need the actual part here\n        field: (_name, spec) => spec,\n        record: constant$1([])\n    };\n    const interpretInForm = (parts, spec, dialogData, oldBackstage, getCompByName) => {\n        // Now, we need to update the backstage to use the parts variant.\n        const newBackstage = deepMerge(oldBackstage, {\n            // Add the interpreter based on the form parts.\n            shared: {\n                interpreter: (childSpec) => interpretParts(parts, childSpec, dialogData, newBackstage, getCompByName)\n            }\n        });\n        return interpretParts(parts, spec, dialogData, newBackstage, getCompByName);\n    };\n    const interpretParts = (parts, spec, dialogData, backstage, getCompByName) => get$h(factories, spec.type).fold(() => {\n        console.error(`Unknown factory type \"${spec.type}\", defaulting to container: `, spec);\n        return spec;\n    }, (factory) => factory(parts, spec, dialogData, backstage, getCompByName));\n    const interpretWithoutForm = (spec, dialogData, backstage, getCompByName) => interpretParts(noFormParts, spec, dialogData, backstage, getCompByName);\n\n    const bubbleAlignments$2 = {\n        valignCentre: [],\n        alignCentre: [],\n        alignLeft: [],\n        alignRight: [],\n        right: [],\n        left: [],\n        bottom: [],\n        top: []\n    };\n    const getInlineDialogAnchor = (contentAreaElement, lazyAnchorbar, lazyUseEditableAreaAnchor) => {\n        const bubbleSize = 12;\n        const overrides = {\n            maxHeightFunction: expandable$1()\n        };\n        const editableAreaAnchor = () => ({\n            type: 'node',\n            root: getContentContainer(getRootNode(contentAreaElement())),\n            node: Optional.from(contentAreaElement()),\n            bubble: nu$6(bubbleSize, bubbleSize, bubbleAlignments$2),\n            layouts: {\n                onRtl: () => [northeast$1],\n                onLtr: () => [northwest$1]\n            },\n            overrides\n        });\n        const standardAnchor = () => ({\n            type: 'hotspot',\n            hotspot: lazyAnchorbar(),\n            bubble: nu$6(-bubbleSize, bubbleSize, bubbleAlignments$2),\n            layouts: {\n                onRtl: () => [southeast$2, southwest$2, south$2],\n                onLtr: () => [southwest$2, southeast$2, south$2]\n            },\n            overrides\n        });\n        return () => lazyUseEditableAreaAnchor() ? editableAreaAnchor() : standardAnchor();\n    };\n    const getInlineBottomDialogAnchor = (inline, contentAreaElement, lazyBottomAnchorBar, lazyUseEditableAreaAnchor) => {\n        const bubbleSize = 12;\n        const overrides = {\n            maxHeightFunction: expandable$1()\n        };\n        const editableAreaAnchor = () => ({\n            type: 'node',\n            root: getContentContainer(getRootNode(contentAreaElement())),\n            node: Optional.from(contentAreaElement()),\n            bubble: nu$6(bubbleSize, bubbleSize, bubbleAlignments$2),\n            layouts: {\n                onRtl: () => [north$1],\n                onLtr: () => [north$1]\n            },\n            overrides\n        });\n        const standardAnchor = () => inline ?\n            ({\n                type: 'node',\n                root: getContentContainer(getRootNode(contentAreaElement())),\n                node: Optional.from(contentAreaElement()),\n                bubble: nu$6(0, -getOuter$1(contentAreaElement()), bubbleAlignments$2),\n                layouts: {\n                    onRtl: () => [north$2],\n                    onLtr: () => [north$2]\n                },\n                overrides\n            })\n            : ({\n                type: 'hotspot',\n                hotspot: lazyBottomAnchorBar(),\n                bubble: nu$6(0, 0, bubbleAlignments$2),\n                layouts: {\n                    onRtl: () => [north$2],\n                    onLtr: () => [north$2]\n                },\n                overrides\n            });\n        return () => lazyUseEditableAreaAnchor() ? editableAreaAnchor() : standardAnchor();\n    };\n    const getBannerAnchor = (contentAreaElement, lazyAnchorbar, lazyUseEditableAreaAnchor) => {\n        const editableAreaAnchor = () => ({\n            type: 'node',\n            root: getContentContainer(getRootNode(contentAreaElement())),\n            node: Optional.from(contentAreaElement()),\n            layouts: {\n                onRtl: () => [north$1],\n                onLtr: () => [north$1]\n            }\n        });\n        const standardAnchor = () => ({\n            type: 'hotspot',\n            hotspot: lazyAnchorbar(),\n            layouts: {\n                onRtl: () => [south$2],\n                onLtr: () => [south$2]\n            }\n        });\n        return () => lazyUseEditableAreaAnchor() ? editableAreaAnchor() : standardAnchor();\n    };\n    const getCursorAnchor = (editor, bodyElement) => () => ({\n        type: 'selection',\n        root: bodyElement(),\n        getSelection: () => {\n            const rng = editor.selection.getRng();\n            // Only return a range if there is a selection of more than one cell.\n            const selectedCells = editor.model.table.getSelectedCells();\n            if (selectedCells.length > 1) {\n                const firstCell = selectedCells[0];\n                const lastCell = selectedCells[selectedCells.length - 1];\n                const selectionTableCellRange = {\n                    firstCell: SugarElement.fromDom(firstCell),\n                    lastCell: SugarElement.fromDom(lastCell)\n                };\n                return Optional.some(selectionTableCellRange);\n            }\n            return Optional.some(SimSelection.range(SugarElement.fromDom(rng.startContainer), rng.startOffset, SugarElement.fromDom(rng.endContainer), rng.endOffset));\n        }\n    });\n    const getNodeAnchor$1 = (bodyElement) => (element) => ({\n        type: 'node',\n        root: bodyElement(),\n        node: element\n    });\n    const getAnchors = (editor, lazyAnchorbar, lazyBottomAnchorBar, isToolbarTop) => {\n        const useFixedToolbarContainer = useFixedContainer(editor);\n        const bodyElement = () => SugarElement.fromDom(editor.getBody());\n        const contentAreaElement = () => SugarElement.fromDom(editor.getContentAreaContainer());\n        // If using fixed_toolbar_container or if the toolbar is positioned at the bottom\n        // of the editor, some things should anchor to the top of the editable area.\n        const lazyUseEditableAreaAnchor = () => useFixedToolbarContainer || !isToolbarTop();\n        return {\n            inlineDialog: getInlineDialogAnchor(contentAreaElement, lazyAnchorbar, lazyUseEditableAreaAnchor),\n            inlineBottomDialog: getInlineBottomDialogAnchor(editor.inline, contentAreaElement, lazyBottomAnchorBar, lazyUseEditableAreaAnchor),\n            banner: getBannerAnchor(contentAreaElement, lazyAnchorbar, lazyUseEditableAreaAnchor),\n            cursor: getCursorAnchor(editor, bodyElement),\n            node: getNodeAnchor$1(bodyElement)\n        };\n    };\n\n    const colorPicker = (editor) => (callback, value) => {\n        const dialog = colorPickerDialog(editor);\n        dialog(callback, value);\n    };\n    const hasCustomColors = (editor) => () => hasCustomColors$1(editor);\n    const getColors = (editor) => (id) => getColors$2(editor, id);\n    const getColorCols = (editor) => (id) => getColorCols$1(editor, id);\n    const ColorInputBackstage = (editor) => ({\n        colorPicker: colorPicker(editor),\n        hasCustomColors: hasCustomColors(editor),\n        getColors: getColors(editor),\n        getColorCols: getColorCols(editor)\n    });\n\n    const isDraggableModal = (editor) => () => isDraggableModal$1(editor);\n    const DialogBackstage = (editor) => ({\n        isDraggableModal: isDraggableModal(editor)\n    });\n\n    const HeaderBackstage = (editor) => {\n        const mode = Cell(isToolbarLocationBottom(editor) ? 'bottom' : 'top');\n        return {\n            isPositionedAtTop: () => mode.get() === 'top',\n            getDockingMode: mode.get,\n            setDockingMode: mode.set\n        };\n    };\n\n    const isNestedFormat = (format) => hasNonNullableKey(format, 'items');\n    const isFormatReference = (format) => hasNonNullableKey(format, 'format');\n    const defaultStyleFormats = [\n        {\n            title: 'Headings', items: [\n                { title: 'Heading 1', format: 'h1' },\n                { title: 'Heading 2', format: 'h2' },\n                { title: 'Heading 3', format: 'h3' },\n                { title: 'Heading 4', format: 'h4' },\n                { title: 'Heading 5', format: 'h5' },\n                { title: 'Heading 6', format: 'h6' }\n            ]\n        },\n        {\n            title: 'Inline', items: [\n                { title: 'Bold', format: 'bold' },\n                { title: 'Italic', format: 'italic' },\n                { title: 'Underline', format: 'underline' },\n                { title: 'Strikethrough', format: 'strikethrough' },\n                { title: 'Superscript', format: 'superscript' },\n                { title: 'Subscript', format: 'subscript' },\n                { title: 'Code', format: 'code' }\n            ]\n        },\n        {\n            title: 'Blocks', items: [\n                { title: 'Paragraph', format: 'p' },\n                { title: 'Blockquote', format: 'blockquote' },\n                { title: 'Div', format: 'div' },\n                { title: 'Pre', format: 'pre' }\n            ]\n        },\n        {\n            title: 'Align', items: [\n                { title: 'Left', format: 'alignleft' },\n                { title: 'Center', format: 'aligncenter' },\n                { title: 'Right', format: 'alignright' },\n                { title: 'Justify', format: 'alignjustify' }\n            ]\n        }\n    ];\n    // Note: Need to cast format below to expected type, as Obj.has uses \"K keyof T\", which doesn't work with aliases\n    const isNestedFormats = (format) => has$2(format, 'items');\n    const isBlockFormat = (format) => has$2(format, 'block');\n    const isInlineFormat = (format) => has$2(format, 'inline');\n    const isSelectorFormat = (format) => has$2(format, 'selector');\n    const mapFormats = (userFormats) => foldl(userFormats, (acc, fmt) => {\n        if (isNestedFormats(fmt)) {\n            // Map the child formats\n            const result = mapFormats(fmt.items);\n            return {\n                customFormats: acc.customFormats.concat(result.customFormats),\n                formats: acc.formats.concat([{ title: fmt.title, items: result.formats }])\n            };\n        }\n        else if (isInlineFormat(fmt) || isBlockFormat(fmt) || isSelectorFormat(fmt)) {\n            // Convert the format to a reference and add the original to the custom formats to be registered\n            const formatName = isString(fmt.name) ? fmt.name : fmt.title.toLowerCase();\n            const formatNameWithPrefix = `custom-${formatName}`;\n            return {\n                customFormats: acc.customFormats.concat([{ name: formatNameWithPrefix, format: fmt }]),\n                formats: acc.formats.concat([{ title: fmt.title, format: formatNameWithPrefix, icon: fmt.icon }])\n            };\n        }\n        else {\n            return { ...acc, formats: acc.formats.concat(fmt) };\n        }\n    }, { customFormats: [], formats: [] });\n    const registerCustomFormats = (editor, userFormats) => {\n        const result = mapFormats(userFormats);\n        const registerFormats = (customFormats) => {\n            each$1(customFormats, (fmt) => {\n                // Only register the custom format with the editor, if it's not already registered\n                if (!editor.formatter.has(fmt.name)) {\n                    editor.formatter.register(fmt.name, fmt.format);\n                }\n            });\n        };\n        // The editor may not yet be initialized, so check for that\n        if (editor.formatter) {\n            registerFormats(result.customFormats);\n        }\n        else {\n            editor.on('init', () => {\n                registerFormats(result.customFormats);\n            });\n        }\n        return result.formats;\n    };\n    const getStyleFormats = (editor) => getUserStyleFormats(editor).map((userFormats) => {\n        // Ensure that any custom formats specified by the user are registered with the editor\n        const registeredUserFormats = registerCustomFormats(editor, userFormats);\n        // Merge the default formats with the custom formats if required\n        return shouldMergeStyleFormats(editor) ? defaultStyleFormats.concat(registeredUserFormats) : registeredUserFormats;\n    }).getOr(defaultStyleFormats);\n\n    const isSeparator$1 = (format) => {\n        const keys$1 = keys(format);\n        return keys$1.length === 1 && contains$2(keys$1, 'title');\n    };\n    const processBasic = (item, isSelectedFor, getPreviewFor) => ({\n        ...item,\n        type: 'formatter',\n        isSelected: isSelectedFor(item.format),\n        getStylePreview: getPreviewFor(item.format)\n    });\n    // TODO: This is adapted from StyleFormats in the mobile theme. Consolidate.\n    const register$b = (editor, formats, isSelectedFor, getPreviewFor) => {\n        const enrichSupported = (item) => processBasic(item, isSelectedFor, getPreviewFor);\n        // Item that triggers a submenu\n        const enrichMenu = (item) => {\n            const newItems = doEnrich(item.items);\n            return {\n                ...item,\n                type: 'submenu',\n                getStyleItems: constant$1(newItems)\n            };\n        };\n        const enrichCustom = (item) => {\n            const formatName = isString(item.name) ? item.name : generate$6(item.title);\n            const formatNameWithPrefix = `custom-${formatName}`;\n            const newItem = {\n                ...item,\n                type: 'formatter',\n                format: formatNameWithPrefix,\n                isSelected: isSelectedFor(formatNameWithPrefix),\n                getStylePreview: getPreviewFor(formatNameWithPrefix)\n            };\n            editor.formatter.register(formatName, newItem);\n            return newItem;\n        };\n        const doEnrich = (items) => map$2(items, (item) => {\n            // If it is a submenu, enrich all the subitems.\n            if (isNestedFormat(item)) {\n                return enrichMenu(item);\n            }\n            else if (isFormatReference(item)) {\n                return enrichSupported(item);\n                // NOTE: This branch is added from the original StyleFormats in mobile\n            }\n            else if (isSeparator$1(item)) {\n                return { ...item, type: 'separator' };\n            }\n            else {\n                return enrichCustom(item);\n            }\n        });\n        return doEnrich(formats);\n    };\n\n    const init$1 = (editor) => {\n        const isSelectedFor = (format) => () => editor.formatter.match(format);\n        const getPreviewFor = (format) => () => {\n            const fmt = editor.formatter.get(format);\n            return fmt !== undefined ? Optional.some({\n                tag: fmt.length > 0 ? fmt[0].inline || fmt[0].block || 'div' : 'div',\n                styles: editor.dom.parseStyle(editor.formatter.getCssText(format))\n            }) : Optional.none();\n        };\n        const settingsFormats = Cell([]);\n        const eventsFormats = Cell([]);\n        const replaceSettings = Cell(false);\n        editor.on('PreInit', (_e) => {\n            const formats = getStyleFormats(editor);\n            const enriched = register$b(editor, formats, isSelectedFor, getPreviewFor);\n            settingsFormats.set(enriched);\n        });\n        editor.on('addStyleModifications', (e) => {\n            // Is there going to be an order issue here?\n            const modifications = register$b(editor, e.items, isSelectedFor, getPreviewFor);\n            eventsFormats.set(modifications);\n            replaceSettings.set(e.replace);\n        });\n        const getData = () => {\n            const fromSettings = replaceSettings.get() ? [] : settingsFormats.get();\n            const fromEvents = eventsFormats.get();\n            return fromSettings.concat(fromEvents);\n        };\n        return {\n            getData\n        };\n    };\n\n    const TooltipsBackstage = (getSink) => {\n        const tooltipDelay = 300;\n        const intervalDelay = tooltipDelay * 0.2; // Arbitrary value\n        let numActiveTooltips = 0;\n        const alreadyShowingTooltips = () => numActiveTooltips > 0;\n        const getComponents = (spec) => {\n            return [\n                {\n                    dom: {\n                        tag: 'div',\n                        classes: ['tox-tooltip__body']\n                    },\n                    components: [\n                        text$2(spec.tooltipText)\n                    ]\n                }\n            ];\n        };\n        const getConfig = (spec) => {\n            return {\n                delayForShow: () => alreadyShowingTooltips() ? intervalDelay : tooltipDelay,\n                delayForHide: constant$1(tooltipDelay),\n                exclusive: true,\n                lazySink: getSink,\n                tooltipDom: {\n                    tag: 'div',\n                    classes: ['tox-tooltip', 'tox-tooltip--up']\n                },\n                tooltipComponents: getComponents(spec),\n                onShow: (comp, tooltip) => {\n                    numActiveTooltips++;\n                    if (spec.onShow) {\n                        spec.onShow(comp, tooltip);\n                    }\n                },\n                onHide: (comp, tooltip) => {\n                    numActiveTooltips--;\n                    if (spec.onHide) {\n                        spec.onHide(comp, tooltip);\n                    }\n                },\n                onSetup: spec.onSetup,\n            };\n        };\n        return {\n            getConfig,\n            getComponents\n        };\n    };\n\n    const isElement = (node) => isNonNullable(node) && node.nodeType === 1;\n    const trim = global$2.trim;\n    const hasContentEditableState = (value) => {\n        return (node) => {\n            if (isElement(node)) {\n                if (node.contentEditable === value) {\n                    return true;\n                }\n                if (node.getAttribute('data-mce-contenteditable') === value) {\n                    return true;\n                }\n            }\n            return false;\n        };\n    };\n    const isContentEditableTrue = hasContentEditableState('true');\n    const isContentEditableFalse = hasContentEditableState('false');\n    const create = (type, title, url, level, attach) => ({\n        type,\n        title,\n        url,\n        level,\n        attach\n    });\n    const isChildOfContentEditableTrue = (node) => {\n        let tempNode = node;\n        while ((tempNode = tempNode.parentNode)) {\n            const value = tempNode.contentEditable;\n            if (value && value !== 'inherit') {\n                return isContentEditableTrue(tempNode);\n            }\n        }\n        return false;\n    };\n    const select = (selector, root) => {\n        return map$2(descendants(SugarElement.fromDom(root), selector), (element) => {\n            return element.dom;\n        });\n    };\n    const getElementText = (elm) => {\n        return elm.innerText || elm.textContent;\n    };\n    const getOrGenerateId = (elm) => {\n        return elm.id ? elm.id : generate$6('h');\n    };\n    const isAnchor = (elm) => {\n        return elm && elm.nodeName === 'A' && (elm.id || elm.name) !== undefined;\n    };\n    const isValidAnchor = (elm) => {\n        return isAnchor(elm) && isEditable(elm);\n    };\n    const isHeader = (elm) => {\n        return elm && /^(H[1-6])$/.test(elm.nodeName);\n    };\n    const isEditable = (elm) => {\n        return isChildOfContentEditableTrue(elm) && !isContentEditableFalse(elm);\n    };\n    const isValidHeader = (elm) => {\n        return isHeader(elm) && isEditable(elm);\n    };\n    const getLevel = (elm) => {\n        return isHeader(elm) ? parseInt(elm.nodeName.substr(1), 10) : 0;\n    };\n    const headerTarget = (elm) => {\n        const headerId = getOrGenerateId(elm);\n        const attach = () => {\n            elm.id = headerId;\n        };\n        return create('header', getElementText(elm) ?? '', '#' + headerId, getLevel(elm), attach);\n    };\n    const anchorTarget = (elm) => {\n        const anchorId = elm.id || elm.name;\n        const anchorText = getElementText(elm);\n        return create('anchor', anchorText ? anchorText : '#' + anchorId, '#' + anchorId, 0, noop);\n    };\n    const getHeaderTargets = (elms) => {\n        return map$2(filter$2(elms, isValidHeader), headerTarget);\n    };\n    const getAnchorTargets = (elms) => {\n        return map$2(filter$2(elms, isValidAnchor), anchorTarget);\n    };\n    const getTargetElements = (elm) => {\n        const elms = select('h1,h2,h3,h4,h5,h6,a:not([href])', elm);\n        return elms;\n    };\n    const hasTitle = (target) => {\n        return trim(target.title).length > 0;\n    };\n    const find = (elm) => {\n        const elms = getTargetElements(elm);\n        return filter$2(getHeaderTargets(elms).concat(getAnchorTargets(elms)), hasTitle);\n    };\n    const LinkTargets = {\n        find\n    };\n\n    const STORAGE_KEY = 'tinymce-url-history';\n    const HISTORY_LENGTH = 5;\n    // validation functions\n    const isHttpUrl = (url) => isString(url) && /^https?/.test(url);\n    const isArrayOfUrl = (a) => isArray(a) && a.length <= HISTORY_LENGTH && forall(a, isHttpUrl);\n    const isRecordOfUrlArray = (r) => isObject(r) && find$4(r, (value) => !isArrayOfUrl(value)).isNone();\n    const getAllHistory = () => {\n        const unparsedHistory = global$5.getItem(STORAGE_KEY);\n        if (unparsedHistory === null) {\n            return {};\n        }\n        // parse history\n        let history;\n        try {\n            history = JSON.parse(unparsedHistory);\n        }\n        catch (e) {\n            if (e instanceof SyntaxError) {\n                // eslint-disable-next-line no-console\n                console.log('Local storage ' + STORAGE_KEY + ' was not valid JSON', e);\n                return {};\n            }\n            throw e;\n        }\n        // validate the parsed value\n        if (!isRecordOfUrlArray(history)) {\n            // eslint-disable-next-line no-console\n            console.log('Local storage ' + STORAGE_KEY + ' was not valid format', history);\n            return {};\n        }\n        return history;\n    };\n    const setAllHistory = (history) => {\n        if (!isRecordOfUrlArray(history)) {\n            throw new Error('Bad format for history:\\n' + JSON.stringify(history));\n        }\n        global$5.setItem(STORAGE_KEY, JSON.stringify(history));\n    };\n    const getHistory = (fileType) => {\n        const history = getAllHistory();\n        return get$h(history, fileType).getOr([]);\n    };\n    const addToHistory = (url, fileType) => {\n        if (!isHttpUrl(url)) {\n            return;\n        }\n        const history = getAllHistory();\n        const items = get$h(history, fileType).getOr([]);\n        const itemsWithoutUrl = filter$2(items, (item) => item !== url);\n        history[fileType] = [url].concat(itemsWithoutUrl).slice(0, HISTORY_LENGTH);\n        setAllHistory(history);\n    };\n\n    const isTruthy = (value) => !!value;\n    const makeMap = (value) => map$1(global$2.makeMap(value, /[, ]/), isTruthy);\n    const getPicker = (editor) => Optional.from(getFilePickerCallback(editor));\n    const getPickerTypes = (editor) => {\n        const optFileTypes = Optional.from(getFilePickerTypes(editor)).filter(isTruthy).map(makeMap);\n        return getPicker(editor).fold(never, (_picker) => optFileTypes.fold(always, (types) => keys(types).length > 0 ? types : false));\n    };\n    const getPickerSetting = (editor, filetype) => {\n        const pickerTypes = getPickerTypes(editor);\n        if (isBoolean(pickerTypes)) {\n            return pickerTypes ? getPicker(editor) : Optional.none();\n        }\n        else {\n            return pickerTypes[filetype] ? getPicker(editor) : Optional.none();\n        }\n    };\n    const getUrlPicker = (editor, filetype) => getPickerSetting(editor, filetype).map((picker) => (entry) => Future.nu((completer) => {\n        const handler = (value, meta) => {\n            if (!isString(value)) {\n                throw new Error('Expected value to be string');\n            }\n            if (meta !== undefined && !isObject(meta)) {\n                throw new Error('Expected meta to be a object');\n            }\n            const r = { value, meta };\n            completer(r);\n        };\n        const meta = {\n            filetype,\n            fieldname: entry.fieldname,\n            ...Optional.from(entry.meta).getOr({})\n        };\n        // file_picker_callback(callback, currentValue, metaData)\n        picker.call(editor, handler, entry.value, meta);\n    }));\n    const getTextSetting = (value) => Optional.from(value).filter(isString).getOrUndefined();\n    const getLinkInformation = (editor) => {\n        if (!useTypeaheadUrls(editor)) {\n            return Optional.none();\n        }\n        return Optional.some({\n            targets: LinkTargets.find(editor.getBody()),\n            anchorTop: getTextSetting(getAnchorTop(editor)),\n            anchorBottom: getTextSetting(getAnchorBottom(editor))\n        });\n    };\n    const getValidationHandler = (editor) => Optional.from(getFilePickerValidatorHandler(editor));\n    const UrlInputBackstage = (editor) => ({\n        getHistory,\n        addToHistory,\n        getLinkInformation: () => getLinkInformation(editor),\n        getValidationHandler: () => getValidationHandler(editor),\n        getUrlPicker: (filetype) => getUrlPicker(editor, filetype)\n    });\n\n    const init = (lazySinks, editor, lazyAnchorbar, lazyBottomAnchorBar) => {\n        const contextMenuState = Cell(false);\n        const toolbar = HeaderBackstage(editor);\n        const providers = {\n            icons: () => editor.ui.registry.getAll().icons,\n            menuItems: () => editor.ui.registry.getAll().menuItems,\n            translate: global$6.translate,\n            isDisabled: () => !editor.ui.isEnabled(),\n            getOption: editor.options.get,\n            tooltips: TooltipsBackstage(lazySinks.dialog),\n            checkUiComponentContext: (specContext) => {\n                if (isDisabled(editor)) {\n                    return {\n                        contextType: 'disabled',\n                        shouldDisable: true\n                    };\n                }\n                const [key, value = ''] = specContext.split(':');\n                const contexts = editor.ui.registry.getAll().contexts;\n                const enabledInContext = get$h(contexts, key)\n                    .fold(\n                // Fallback to 'mode:design' if key is not found\n                () => get$h(contexts, 'mode').map((pred) => pred('design')).getOr(false), (pred) => value.charAt(0) === '!' ? !pred(value.slice(1)) : pred(value));\n                return {\n                    contextType: key,\n                    shouldDisable: !enabledInContext\n                };\n            }\n        };\n        const urlinput = UrlInputBackstage(editor);\n        const styles = init$1(editor);\n        const colorinput = ColorInputBackstage(editor);\n        const dialogSettings = DialogBackstage(editor);\n        const isContextMenuOpen = () => contextMenuState.get();\n        const setContextMenuState = (state) => contextMenuState.set(state);\n        const commonBackstage = {\n            shared: {\n                providers,\n                anchors: getAnchors(editor, lazyAnchorbar, lazyBottomAnchorBar, toolbar.isPositionedAtTop),\n                header: toolbar,\n            },\n            urlinput,\n            styles,\n            colorinput,\n            dialog: dialogSettings,\n            isContextMenuOpen,\n            setContextMenuState\n        };\n        const getCompByName = (_name) => Optional.none();\n        const popupBackstage = {\n            ...commonBackstage,\n            shared: {\n                ...commonBackstage.shared,\n                interpreter: (s) => interpretWithoutForm(s, {}, popupBackstage, getCompByName),\n                getSink: lazySinks.popup\n            }\n        };\n        const dialogBackstage = {\n            ...commonBackstage,\n            shared: {\n                ...commonBackstage.shared,\n                interpreter: (s) => interpretWithoutForm(s, {}, dialogBackstage, getCompByName),\n                getSink: lazySinks.dialog\n            }\n        };\n        return {\n            popup: popupBackstage,\n            dialog: dialogBackstage\n        };\n    };\n\n    const migrationFrom7x = 'https://www.tiny.cloud/docs/tinymce/latest/migration-from-7x/';\n    const deprecatedFeatures = {\n        skipFocus: `ToggleToolbarDrawer skipFocus is deprecated see migration guide: ${migrationFrom7x}`,\n    };\n    const logFeatureDeprecationWarning = (feature) => {\n        // eslint-disable-next-line no-console\n        console.warn(deprecatedFeatures[feature], new Error().stack);\n    };\n\n    const setup$b = (editor, mothership, uiMotherships) => {\n        const broadcastEvent = (name, evt) => {\n            each$1([mothership, ...uiMotherships], (m) => {\n                m.broadcastEvent(name, evt);\n            });\n        };\n        const broadcastOn = (channel, message) => {\n            each$1([mothership, ...uiMotherships], (m) => {\n                m.broadcastOn([channel], message);\n            });\n        };\n        const fireDismissPopups = (evt) => broadcastOn(dismissPopups(), { target: evt.target });\n        const fireCloseTooltips = (event) => {\n            broadcastOn(closeTooltips(), {\n                closedTooltip: () => {\n                    event.preventDefault();\n                }\n            });\n        };\n        // Document touch events\n        const doc = getDocument();\n        const onTouchstart = bind$1(doc, 'touchstart', fireDismissPopups);\n        const onTouchmove = bind$1(doc, 'touchmove', (evt) => broadcastEvent(documentTouchmove(), evt));\n        const onTouchend = bind$1(doc, 'touchend', (evt) => broadcastEvent(documentTouchend(), evt));\n        // Document mouse events\n        const onMousedown = bind$1(doc, 'mousedown', fireDismissPopups);\n        const onMouseup = bind$1(doc, 'mouseup', (evt) => {\n            if (evt.raw.button === 0) {\n                broadcastOn(mouseReleased(), { target: evt.target });\n            }\n        });\n        // Editor content events\n        const onContentClick = (raw) => broadcastOn(dismissPopups(), { target: SugarElement.fromDom(raw.target) });\n        const onContentMouseup = (raw) => {\n            if (raw.button === 0) {\n                broadcastOn(mouseReleased(), { target: SugarElement.fromDom(raw.target) });\n            }\n        };\n        const onContentMousedown = () => {\n            each$1(editor.editorManager.get(), (loopEditor) => {\n                if (editor !== loopEditor) {\n                    loopEditor.dispatch('DismissPopups', { relatedTarget: editor });\n                }\n            });\n        };\n        // Window events\n        const onWindowScroll = (evt) => broadcastEvent(windowScroll(), fromRawEvent(evt));\n        const onWindowResize = (evt) => {\n            broadcastOn(repositionPopups(), {});\n            broadcastEvent(windowResize(), fromRawEvent(evt));\n        };\n        // TINY-9425: At the moment, we are only supporting situations where the scrolling container\n        // is *inside* the shadow root - which is why we bind to the root node, instead of just the outer\n        // document. However, if we needed to support scrolling containers that *contained* the shadow root,\n        // we would need to listen to the outer document (or at the least, the root node of the scrolling div in\n        // the case of muliple layers of shadow roots).\n        const dos = getRootNode(SugarElement.fromDom(editor.getElement()));\n        const onElementScroll = capture(dos, 'scroll', (evt) => {\n            requestAnimationFrame(() => {\n                const c = editor.getContainer();\n                // Because this can fire before the editor is rendered, we need to stop that from happening.\n                // Some tests can create this situation, and then we get a Node name null or defined error.\n                if (c !== undefined && c !== null) {\n                    const optScrollingContext = detectWhenSplitUiMode(editor, mothership.element);\n                    const scrollers = optScrollingContext.map((sc) => [sc.element, ...sc.others]).getOr([]);\n                    if (exists(scrollers, (s) => eq(s, evt.target))) {\n                        editor.dispatch('ElementScroll', { target: evt.target.dom });\n                        broadcastEvent(externalElementScroll(), evt);\n                    }\n                }\n            });\n        });\n        const onEditorResize = () => broadcastOn(repositionPopups(), {});\n        const onEditorProgress = (evt) => {\n            if (evt.state) {\n                broadcastOn(dismissPopups(), { target: SugarElement.fromDom(editor.getContainer()) });\n            }\n        };\n        const onDismissPopups = (event) => {\n            broadcastOn(dismissPopups(), { target: SugarElement.fromDom(event.relatedTarget.getContainer()) });\n        };\n        const onFocusIn = (event) => editor.dispatch('focusin', event);\n        const onFocusOut = (event) => editor.dispatch('focusout', event);\n        // Don't start listening to events until the UI has rendered\n        editor.on('PostRender', () => {\n            editor.on('click', onContentClick);\n            editor.on('tap', onContentClick);\n            editor.on('mouseup', onContentMouseup);\n            editor.on('mousedown', onContentMousedown);\n            editor.on('ScrollWindow', onWindowScroll);\n            editor.on('ResizeWindow', onWindowResize);\n            editor.on('ResizeEditor', onEditorResize);\n            editor.on('AfterProgressState', onEditorProgress);\n            editor.on('DismissPopups', onDismissPopups);\n            editor.on('CloseActiveTooltips', fireCloseTooltips);\n            each$1([mothership, ...uiMotherships], (gui) => {\n                gui.element.dom.addEventListener('focusin', onFocusIn);\n                gui.element.dom.addEventListener('focusout', onFocusOut);\n            });\n        });\n        editor.on('remove', () => {\n            // We probably don't need these unbinds, but it helps to have them if we move this code out.\n            editor.off('click', onContentClick);\n            editor.off('tap', onContentClick);\n            editor.off('mouseup', onContentMouseup);\n            editor.off('mousedown', onContentMousedown);\n            editor.off('ScrollWindow', onWindowScroll);\n            editor.off('ResizeWindow', onWindowResize);\n            editor.off('ResizeEditor', onEditorResize);\n            editor.off('AfterProgressState', onEditorProgress);\n            editor.off('DismissPopups', onDismissPopups);\n            editor.off('CloseActiveTooltips', fireCloseTooltips);\n            each$1([mothership, ...uiMotherships], (gui) => {\n                gui.element.dom.removeEventListener('focusin', onFocusIn);\n                gui.element.dom.removeEventListener('focusout', onFocusOut);\n            });\n            onMousedown.unbind();\n            onTouchstart.unbind();\n            onTouchmove.unbind();\n            onTouchend.unbind();\n            onMouseup.unbind();\n            onElementScroll.unbind();\n        });\n        editor.on('detach', () => {\n            each$1([mothership, ...uiMotherships], detachSystem);\n            each$1([mothership, ...uiMotherships], (m) => m.destroy());\n        });\n    };\n\n    const setup$a = noop;\n    const isDocked$1 = never;\n    const getBehaviours$1 = constant$1([]);\n\n    var StaticHeader = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        setup: setup$a,\n        isDocked: isDocked$1,\n        getBehaviours: getBehaviours$1\n    });\n\n    const toolbarHeightChange = constant$1(generate$6('toolbar-height-change'));\n\n    const visibility = {\n        fadeInClass: 'tox-editor-dock-fadein',\n        fadeOutClass: 'tox-editor-dock-fadeout',\n        transitionClass: 'tox-editor-dock-transition'\n    };\n    const editorStickyOnClass = 'tox-tinymce--toolbar-sticky-on';\n    const editorStickyOffClass = 'tox-tinymce--toolbar-sticky-off';\n    const scrollFromBehindHeader = (e, containerHeader) => {\n        const doc = owner$4(containerHeader);\n        const win = defaultView(containerHeader);\n        const viewHeight = win.dom.innerHeight;\n        const scrollPos = get$b(doc);\n        const markerElement = SugarElement.fromDom(e.elm);\n        const markerPos = absolute$2(markerElement);\n        const markerHeight = get$d(markerElement);\n        const markerTop = markerPos.y;\n        const markerBottom = markerTop + markerHeight;\n        const editorHeaderPos = absolute$3(containerHeader);\n        const editorHeaderHeight = get$d(containerHeader);\n        const editorHeaderTop = editorHeaderPos.top;\n        const editorHeaderBottom = editorHeaderTop + editorHeaderHeight;\n        // Check to see if the header is docked to the top/bottom of the page (eg is floating)\n        const editorHeaderDockedAtTop = Math.abs(editorHeaderTop - scrollPos.top) < 2;\n        const editorHeaderDockedAtBottom = Math.abs(editorHeaderBottom - (scrollPos.top + viewHeight)) < 2;\n        // If the element is behind the header at the top of the page, then\n        // scroll the element down by the header height\n        if (editorHeaderDockedAtTop && markerTop < editorHeaderBottom) {\n            to(scrollPos.left, markerTop - editorHeaderHeight, doc);\n            // If the element is behind the header at the bottom of the page, then\n            // scroll the element up by the header height\n        }\n        else if (editorHeaderDockedAtBottom && markerBottom > editorHeaderTop) {\n            const y = (markerTop - viewHeight) + markerHeight + editorHeaderHeight;\n            to(scrollPos.left, y, doc);\n        }\n    };\n    const isDockedMode = (header, mode) => contains$2(Docking.getModes(header), mode);\n    const updateIframeContentFlow = (header) => {\n        const getOccupiedHeight = (elm) => getOuter$1(elm) +\n            (parseInt(get$e(elm, 'margin-top'), 10) || 0) +\n            (parseInt(get$e(elm, 'margin-bottom'), 10) || 0);\n        const elm = header.element;\n        parentElement(elm).each((parentElem) => {\n            const padding = 'padding-' + Docking.getModes(header)[0];\n            if (Docking.isDocked(header)) {\n                const parentWidth = get$c(parentElem);\n                set$7(elm, 'width', parentWidth + 'px');\n                set$7(parentElem, padding, getOccupiedHeight(elm) + 'px');\n            }\n            else {\n                remove$6(elm, 'width');\n                remove$6(parentElem, padding);\n            }\n        });\n    };\n    const updateSinkVisibility = (sinkElem, visible) => {\n        if (visible) {\n            remove$3(sinkElem, visibility.fadeOutClass);\n            add$1(sinkElem, [visibility.transitionClass, visibility.fadeInClass]);\n        }\n        else {\n            remove$3(sinkElem, visibility.fadeInClass);\n            add$1(sinkElem, [visibility.fadeOutClass, visibility.transitionClass]);\n        }\n    };\n    const updateEditorClasses = (editor, docked) => {\n        const editorContainer = SugarElement.fromDom(editor.getContainer());\n        if (docked) {\n            add$2(editorContainer, editorStickyOnClass);\n            remove$3(editorContainer, editorStickyOffClass);\n        }\n        else {\n            add$2(editorContainer, editorStickyOffClass);\n            remove$3(editorContainer, editorStickyOnClass);\n        }\n    };\n    const restoreFocus = (headerElem, focusedElem) => {\n        // When the header is hidden, then the element that was focused will be lost\n        // so we need to restore it if nothing else has already been focused (eg anything other than the body)\n        const ownerDoc = owner$4(focusedElem);\n        active$1(ownerDoc).filter((activeElm) => \n        // Don't try to refocus the same element\n        !eq(focusedElem, activeElm)).filter((activeElm) => \n        // Only attempt to refocus if the current focus is the body or is in the header element\n        eq(activeElm, SugarElement.fromDom(ownerDoc.dom.body)) || contains(headerElem, activeElm)).each(() => focus$4(focusedElem));\n    };\n    const findFocusedElem = (rootElm, lazySink) => \n    // Check to see if an element is focused inside the header or inside the sink\n    // and if so store the element so we can restore it later\n    search(rootElm).orThunk(() => lazySink().toOptional().bind((sink) => search(sink.element)));\n    const setup$9 = (editor, sharedBackstage, lazyHeader) => {\n        if (!editor.inline) {\n            // If using bottom toolbar then when the editor resizes we need to reset docking\n            // otherwise it won't know the original toolbar position has moved\n            if (!sharedBackstage.header.isPositionedAtTop()) {\n                editor.on('ResizeEditor', () => {\n                    lazyHeader().each(Docking.reset);\n                });\n            }\n            // No need to update the content flow in inline mode as the header always floats\n            editor.on('ResizeWindow ResizeEditor', () => {\n                lazyHeader().each(updateIframeContentFlow);\n            });\n            // Need to reset the docking position on skin loaded as the original position will have\n            // changed due the skins styles being applied.\n            // Note: Inline handles it's own skin loading, as it needs to do other initial positioning\n            editor.on('SkinLoaded', () => {\n                lazyHeader().each((comp) => {\n                    Docking.isDocked(comp) ? Docking.reset(comp) : Docking.refresh(comp);\n                });\n            });\n            // Need to reset when we go fullscreen so that if the header is docked,\n            // then it'll undock and viceversa\n            editor.on('FullscreenStateChanged', () => {\n                lazyHeader().each(Docking.reset);\n            });\n        }\n        // If inline or sticky toolbars is enabled, then when scrolling into view we may still be\n        // behind the editor header so we need to adjust the scroll position to account for that\n        editor.on('AfterScrollIntoView', (e) => {\n            lazyHeader().each((header) => {\n                // We need to make sure the header docking has refreshed, otherwise if a large scroll occurred\n                // the header may have gone off page and need to be docked before doing calculations\n                Docking.refresh(header);\n                // If the header element is still visible, then adjust the scroll position if required\n                const headerElem = header.element;\n                if (isVisible(headerElem)) {\n                    scrollFromBehindHeader(e, headerElem);\n                }\n            });\n        });\n        // Update the editor classes once initial rendering has completed\n        editor.on('PostRender', () => {\n            updateEditorClasses(editor, false);\n        });\n    };\n    const isDocked = (lazyHeader) => lazyHeader().map(Docking.isDocked).getOr(false);\n    const getIframeBehaviours = () => [\n        Receiving.config({\n            channels: {\n                [toolbarHeightChange()]: {\n                    onReceive: updateIframeContentFlow\n                }\n            }\n        })\n    ];\n    const getBehaviours = (editor, sharedBackstage) => {\n        const focusedElm = value$2();\n        const lazySink = sharedBackstage.getSink;\n        const runOnSinkElement = (f) => {\n            lazySink().each((sink) => f(sink.element));\n        };\n        const onDockingSwitch = (comp) => {\n            if (!editor.inline) {\n                updateIframeContentFlow(comp);\n            }\n            updateEditorClasses(editor, Docking.isDocked(comp));\n            // TINY-9223: This will only reposition the popups in the same mothership as the StickyHeader\n            // and its sink. If we need to reposition the popups in all motherships (in the two sink\n            // model) then we'll need a reference to all motherships here.\n            comp.getSystem().broadcastOn([repositionPopups()], {});\n            lazySink().each((sink) => sink.getSystem().broadcastOn([repositionPopups()], {}));\n        };\n        const additionalBehaviours = editor.inline ? [] : getIframeBehaviours();\n        return [\n            Focusing.config({}),\n            Docking.config({\n                contextual: {\n                    lazyContext: (comp) => {\n                        const headerHeight = getOuter$1(comp.element);\n                        const container = editor.inline ? editor.getContentAreaContainer() : editor.getContainer();\n                        return Optional.from(container).map((c) => {\n                            const box = box$1(SugarElement.fromDom(c));\n                            const optScrollingContext = detectWhenSplitUiMode(editor, comp.element);\n                            return optScrollingContext.fold(() => {\n                                // Force the header to hide before it overflows outside the container\n                                const boxHeight = box.height - headerHeight;\n                                const topBound = box.y + (isDockedMode(comp, 'top') ? 0 : headerHeight);\n                                return bounds(box.x, topBound, box.width, boxHeight);\n                            }, (scrollEnv) => {\n                                const constrainedBounds = constrain(box, getBoundsFrom(scrollEnv));\n                                // When the toolbar location is set to the top, y is the top of the container and height is the available container height minus the header height, as the toolbar will be placed at the top of the container\n                                // This is so that as you scroll the scrollable container/the page, it will dock at the top and when there's insufficient height/space (that's the reason of deducting the headerHeight for the available height), it will be hidden.\n                                // When the toolbar location is set to the bottom, y is the top of the container plus the header height, as the toolbar will be placed at the bottom of the container, beyond the container, so that's why we need to add the headerHeight\n                                // When there's insufficient height/space, it will be hidden, and when you scroll past the editor, it will be hidden\n                                const constrainedBoundsY = isDockedMode(comp, 'top')\n                                    ? constrainedBounds.y\n                                    : constrainedBounds.y + headerHeight;\n                                return bounds(constrainedBounds.x, \n                                // ASSUMPTION: The constrainedBounds removes the need for us to set this to 0px\n                                // for docked mode. Also, docking in a scrolling environment will often be\n                                // at the scroller top, not the window top\n                                constrainedBoundsY, constrainedBounds.width, constrainedBounds.height - headerHeight);\n                            });\n                        });\n                    },\n                    onShow: () => {\n                        runOnSinkElement((elem) => updateSinkVisibility(elem, true));\n                    },\n                    onShown: (comp) => {\n                        runOnSinkElement((elem) => remove$2(elem, [visibility.transitionClass, visibility.fadeInClass]));\n                        // Restore focus and reset the stored focused element\n                        focusedElm.get().each((elem) => {\n                            restoreFocus(comp.element, elem);\n                            focusedElm.clear();\n                        });\n                    },\n                    onHide: (comp) => {\n                        findFocusedElem(comp.element, lazySink).fold(focusedElm.clear, focusedElm.set);\n                        runOnSinkElement((elem) => updateSinkVisibility(elem, false));\n                    },\n                    onHidden: () => {\n                        runOnSinkElement((elem) => remove$2(elem, [visibility.transitionClass]));\n                    },\n                    ...visibility\n                },\n                lazyViewport: (comp) => {\n                    const optScrollingContext = detectWhenSplitUiMode(editor, comp.element);\n                    return optScrollingContext.fold(() => {\n                        const boundsWithoutOffset = win();\n                        const offset = getStickyToolbarOffset(editor);\n                        const top = boundsWithoutOffset.y + (isDockedMode(comp, 'top') && !isFullscreen(editor) ? offset : 0);\n                        const height = boundsWithoutOffset.height - (isDockedMode(comp, 'bottom') ? offset : 0);\n                        // No scrolling context, so just window\n                        return {\n                            bounds: bounds(boundsWithoutOffset.x, top, boundsWithoutOffset.width, height),\n                            optScrollEnv: Optional.none()\n                        };\n                    }, (sc) => {\n                        // TINY-9411: Implement sticky toolbar offsets in scrollable containers\n                        const combinedBounds = getBoundsFrom(sc);\n                        return {\n                            bounds: combinedBounds,\n                            optScrollEnv: Optional.some({\n                                currentScrollTop: sc.element.dom.scrollTop,\n                                scrollElmTop: absolute$3(sc.element).top\n                            })\n                        };\n                    });\n                },\n                modes: [sharedBackstage.header.getDockingMode()],\n                onDocked: onDockingSwitch,\n                onUndocked: onDockingSwitch\n            }),\n            ...additionalBehaviours\n        ];\n    };\n\n    var StickyHeader = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        setup: setup$9,\n        isDocked: isDocked,\n        getBehaviours: getBehaviours\n    });\n\n    const renderHeader = (spec) => {\n        const editor = spec.editor;\n        const getBehaviours$2 = spec.sticky ? getBehaviours : getBehaviours$1;\n        return {\n            uid: spec.uid,\n            dom: spec.dom,\n            components: spec.components,\n            behaviours: derive$1(getBehaviours$2(editor, spec.sharedBackstage))\n        };\n    };\n\n    const factory$3 = (detail, spec) => {\n        const setMenus = (comp, menus) => {\n            const newMenus = map$2(menus, (m) => {\n                const buttonSpec = {\n                    type: 'menubutton',\n                    text: m.text,\n                    fetch: (callback) => {\n                        callback(m.getItems());\n                    },\n                    context: 'any'\n                };\n                // Convert to an internal bridge spec\n                const internal = createMenuButton(buttonSpec).mapError((errInfo) => formatError(errInfo)).getOrDie();\n                return renderMenuButton(internal, \"tox-mbtn\" /* MenuButtonClasses.Button */, spec.backstage, \n                // https://www.w3.org/TR/wai-aria-practices/examples/menubar/menubar-2/menubar-2.html\n                Optional.some('menuitem'));\n            });\n            Replacing.set(comp, newMenus);\n        };\n        const apis = {\n            focus: Keying.focusIn,\n            setMenus\n        };\n        return {\n            uid: detail.uid,\n            dom: detail.dom,\n            components: [],\n            behaviours: derive$1([\n                Replacing.config({}),\n                config('menubar-events', [\n                    runOnAttached((component) => {\n                        detail.onSetup(component);\n                    }),\n                    run$1(mouseover(), (comp, se) => {\n                        // TODO: Use constants\n                        descendant(comp.element, '.' + \"tox-mbtn--active\" /* MenuButtonClasses.Active */).each((activeButton) => {\n                            closest$3(se.event.target, '.' + \"tox-mbtn\" /* MenuButtonClasses.Button */).each((hoveredButton) => {\n                                if (!eq(activeButton, hoveredButton)) {\n                                    // Now, find the components, and expand the hovered one, and close the active one\n                                    comp.getSystem().getByDom(activeButton).each((activeComp) => {\n                                        comp.getSystem().getByDom(hoveredButton).each((hoveredComp) => {\n                                            Dropdown.expand(hoveredComp);\n                                            Dropdown.close(activeComp);\n                                            Focusing.focus(hoveredComp);\n                                        });\n                                    });\n                                }\n                            });\n                        });\n                    }),\n                    run$1(focusShifted(), (comp, se) => {\n                        se.event.prevFocus.bind((prev) => comp.getSystem().getByDom(prev).toOptional()).each((prev) => {\n                            se.event.newFocus.bind((nu) => comp.getSystem().getByDom(nu).toOptional()).each((nu) => {\n                                if (Dropdown.isOpen(prev)) {\n                                    Dropdown.expand(nu);\n                                    Dropdown.close(prev);\n                                }\n                            });\n                        });\n                    })\n                ]),\n                Keying.config({\n                    mode: 'flow',\n                    selector: '.' + \"tox-mbtn\" /* MenuButtonClasses.Button */,\n                    onEscape: (comp) => {\n                        detail.onEscape(comp);\n                        return Optional.some(true);\n                    }\n                }),\n                Tabstopping.config({})\n            ]),\n            apis,\n            domModification: {\n                attributes: {\n                    role: 'menubar'\n                }\n            }\n        };\n    };\n    var SilverMenubar = single({\n        factory: factory$3,\n        name: 'silver.Menubar',\n        configFields: [\n            required$1('dom'),\n            required$1('uid'),\n            required$1('onEscape'),\n            required$1('backstage'),\n            defaulted('onSetup', noop)\n        ],\n        apis: {\n            focus: (apis, comp) => {\n                apis.focus(comp);\n            },\n            setMenus: (apis, comp, menus) => {\n                apis.setMenus(comp, menus);\n            }\n        }\n    });\n\n    const promotionMessage = '\uD83D\uDC9D Get all features';\n    const promotionLink = 'https://www.tiny.cloud/tinymce-upgrade-to-cloud/?utm_campaign=self_hosted_upgrade_promo&utm_source=tiny&utm_medium=referral';\n    const renderPromotion = (spec) => {\n        const components = spec.promotionLink ? [\n            {\n                dom: {\n                    tag: 'a',\n                    attributes: {\n                        'href': promotionLink,\n                        'rel': 'noopener',\n                        'target': '_blank',\n                        'aria-hidden': 'true'\n                    },\n                    classes: ['tox-promotion-link'],\n                    innerHtml: promotionMessage\n                }\n            }\n        ] : [];\n        return {\n            uid: spec.uid,\n            dom: spec.dom,\n            components\n        };\n    };\n\n    const parseToInt = (val) => {\n        // if size is a number or '_px', will return the number\n        const re = /^[0-9\\.]+(|px)$/i;\n        if (re.test('' + val)) {\n            return Optional.some(parseInt('' + val, 10));\n        }\n        return Optional.none();\n    };\n    const numToPx = (val) => isNumber(val) ? val + 'px' : val;\n    const calcCappedSize = (size, minSize, maxSize) => {\n        const minOverride = minSize.filter((min) => size < min);\n        const maxOverride = maxSize.filter((max) => size > max);\n        return minOverride.or(maxOverride).getOr(size);\n    };\n    const convertValueToPx = (element, value) => {\n        if (typeof value === 'number') {\n            return Optional.from(value);\n        }\n        const splitValue = /^([0-9.]+)(pt|em|px)$/.exec(value.trim());\n        if (splitValue) {\n            const type = splitValue[2];\n            const parsed = Number.parseFloat(splitValue[1]);\n            if (Number.isNaN(parsed) || parsed < 0) {\n                return Optional.none();\n            }\n            else if (type === 'em') {\n                return Optional.from(parsed * Number.parseFloat(window.getComputedStyle(element.dom).fontSize));\n            }\n            else if (type === 'pt') {\n                return Optional.from(parsed * (72 / 96));\n            }\n            else if (type === 'px') {\n                return Optional.from(parsed);\n            }\n        }\n        return Optional.none();\n    };\n\n    const requestedWidthProperty = '--tox-private-requested-sidebar-width';\n    const resolvedWidthProperty = '--tox-private-resolved-sidebar-width';\n    const minEditingAreaWidthProperty = '--tox-private-min-editing-area-width';\n    const resizableClass = 'tox-sidebar-wrap--resizable';\n    const applyWidth = (sidebar, width) => {\n        set$7(sidebar, requestedWidthProperty, numToPx(width));\n    };\n    const getMinEditingAreaWidth = (sidebar) => parseToInt(get$e(sidebar, minEditingAreaWidthProperty));\n\n    const findSidebar = (handle) => ancestor$1(handle.element, '.tox-sidebar');\n    const findSidebarWrap = (handle) => ancestor$1(handle.element, '.tox-sidebar-wrap');\n    const makeSidebarResizeHandle = (sizeConstraints, eventDispatcher) => {\n        const { minWidth, maxWidth } = sizeConstraints;\n        return {\n            dom: {\n                tag: 'div',\n                classes: ['tox-sidebar__resize-handle']\n            },\n            behaviours: derive$1([\n                Dragging.config({\n                    mode: 'pointer',\n                    repositionTarget: false,\n                    onDragStart: (handle) => {\n                        findSidebar(handle).each((sidebar) => {\n                            const sidebarWidth = get$c(sidebar);\n                            const availableMax = lift2(findSidebarWrap(handle), getMinEditingAreaWidth(sidebar), (wrap, minEditingAreaWidth) => Math.floor(get$c(wrap)) - minEditingAreaWidth).getOr(maxWidth);\n                            const effectiveMax = Math.min(maxWidth, availableMax);\n                            // When the editor is too narrow to honour both the sidebar's configured minimum\n                            // and the editing area's minimum, the range is unsatisfiable. Skip the resize so a\n                            // drag can't clobber the preserved requested width with the clamped value.\n                            if (effectiveMax >= minWidth) {\n                                Resizing.start(handle, sidebarWidth, get$d(sidebar), { minWidth, maxWidth: effectiveMax });\n                                fireSidebarResizeStart(eventDispatcher);\n                            }\n                        });\n                    },\n                    onDrag: (handle, _target, delta) => {\n                        // The handle sits on the sidebar's left edge, so dragging left should grow it: invert the horizontal delta.\n                        Resizing.moveBy(handle, SugarPosition(delta.left * -1, 0)).each(({ width }) => {\n                            findSidebar(handle).each((sidebar) => applyWidth(sidebar, width));\n                        });\n                    },\n                    onDrop: (handle) => {\n                        Resizing.stop(handle).each(({ width }) => {\n                            fireSidebarResized(eventDispatcher, width);\n                        });\n                    }\n                }),\n                Resizing.config({})\n            ])\n        };\n    };\n\n    const setup$8 = (editor) => {\n        const { sidebars } = editor.ui.registry.getAll();\n        // Setup each registered sidebar\n        each$1(keys(sidebars), (name) => {\n            const spec = sidebars[name];\n            const isActive = () => is$1(Optional.from(editor.queryCommandValue('ToggleSidebar')), name);\n            editor.ui.registry.addToggleButton(name, {\n                icon: spec.icon,\n                tooltip: spec.tooltip,\n                onAction: (buttonApi) => {\n                    editor.execCommand('ToggleSidebar', false, name, { skip_focus: true });\n                    buttonApi.setActive(isActive());\n                },\n                onSetup: (buttonApi) => {\n                    buttonApi.setActive(isActive());\n                    const handleToggle = () => buttonApi.setActive(isActive());\n                    editor.on('ToggleSidebar', handleToggle);\n                    return () => {\n                        editor.off('ToggleSidebar', handleToggle);\n                    };\n                },\n                context: 'any'\n            });\n        });\n    };\n    const getApi = (comp) => ({\n        element: () => comp.element.dom\n    });\n    const makePanels = (parts, panelConfigs) => {\n        const specs = map$2(keys(panelConfigs), (name) => {\n            const spec = panelConfigs[name];\n            const bridged = getOrDie(createSidebar(spec));\n            return {\n                name,\n                getApi,\n                onSetup: bridged.onSetup,\n                onShow: bridged.onShow,\n                onHide: bridged.onHide,\n                resizable: bridged.resizable\n            };\n        });\n        return map$2(specs, (spec) => {\n            const editorOffCell = Cell(noop);\n            return parts.slot(spec.name, {\n                dom: {\n                    tag: 'div',\n                    classes: ['tox-sidebar__pane']\n                },\n                behaviours: SimpleBehaviours.unnamedEvents([\n                    onControlAttached(spec, editorOffCell),\n                    onControlDetached(spec, editorOffCell),\n                    run$1(slotVisibility(), (sidepanel, se) => {\n                        const data = se.event;\n                        const optSidePanelSpec = find$5(specs, (config) => config.name === data.name);\n                        optSidePanelSpec.each((sidePanelSpec) => {\n                            emitWith(sidepanel, sidebarContentChanged, data.visible ? { visible: true, resizable: sidePanelSpec.resizable } : { visible: false });\n                            const handler = data.visible ? sidePanelSpec.onShow : sidePanelSpec.onHide;\n                            handler(sidePanelSpec.getApi(sidepanel));\n                        });\n                    })\n                ])\n            });\n        });\n    };\n    const makeSidebar = (panelConfigs, sizeConstraints, eventDispatcher) => SlotContainer.sketch((parts) => ({\n        dom: {\n            tag: 'div',\n            classes: ['tox-sidebar__pane-container']\n        },\n        components: [\n            makeSidebarResizeHandle(sizeConstraints, eventDispatcher),\n            ...makePanels(parts, panelConfigs)\n        ],\n        slotBehaviours: SimpleBehaviours.unnamedEvents([\n            runOnAttached((slotContainer) => SlotContainer.hideAllSlots(slotContainer))\n        ])\n    }));\n    const setSidebar = (sidebar, panelConfigs, showSidebar, sizeConstraints, eventDispatcher) => {\n        const optSlider = Composing.getCurrent(sidebar);\n        optSlider.each((slider) => {\n            Replacing.set(slider, [makeSidebar(panelConfigs, sizeConstraints, eventDispatcher)]);\n            // Show the default sidebar\n            const configKey = showSidebar?.toLowerCase();\n            if (isString(configKey) && has$2(panelConfigs, configKey)) {\n                Composing.getCurrent(slider).each((slotContainer) => {\n                    SlotContainer.showSlot(slotContainer, configKey);\n                    Sliding.immediateGrow(slider);\n                    // TINY-8710: Remove the width as since the skins/styles won't have loaded yet, so it's going to be incorrect\n                    remove$6(slider.element, 'width');\n                    updateSidebarRoleOnToggle(sidebar.element, \"region\" /* SidebarStateRoleAttr.Grown */);\n                });\n            }\n        });\n    };\n    const updateSidebarRoleOnToggle = (sidebar, sidebarState) => {\n        set$9(sidebar, 'role', sidebarState);\n    };\n    const toggleSidebar = (sidebar, name) => {\n        const optSlider = Composing.getCurrent(sidebar);\n        optSlider.each((slider) => {\n            const optSlotContainer = Composing.getCurrent(slider);\n            optSlotContainer.each((slotContainer) => {\n                if (Sliding.hasGrown(slider)) {\n                    if (SlotContainer.isShowing(slotContainer, name)) {\n                        // close the slider and then hide the slot after the animation finishes\n                        Sliding.shrink(slider);\n                        updateSidebarRoleOnToggle(sidebar.element, \"presentation\" /* SidebarStateRoleAttr.Shrunk */);\n                    }\n                    else {\n                        SlotContainer.hideAllSlots(slotContainer);\n                        SlotContainer.showSlot(slotContainer, name);\n                        updateSidebarRoleOnToggle(sidebar.element, \"region\" /* SidebarStateRoleAttr.Grown */);\n                    }\n                }\n                else {\n                    // Should already be hidden if the animation has finished but if it has not we hide them\n                    SlotContainer.hideAllSlots(slotContainer);\n                    SlotContainer.showSlot(slotContainer, name);\n                    Sliding.grow(slider);\n                    updateSidebarRoleOnToggle(sidebar.element, \"region\" /* SidebarStateRoleAttr.Grown */);\n                }\n            });\n        });\n    };\n    const closeSidebar = (sidebar) => {\n        Composing.getCurrent(sidebar).each((slider) => {\n            Sliding.immediateShrink(slider);\n            updateSidebarRoleOnToggle(sidebar.element, \"presentation\" /* SidebarStateRoleAttr.Shrunk */);\n        });\n    };\n    const whichSidebar = (sidebar) => {\n        const optSlider = Composing.getCurrent(sidebar);\n        return optSlider.bind((slider) => {\n            const sidebarOpen = Sliding.isGrowing(slider) || Sliding.hasGrown(slider);\n            if (sidebarOpen) {\n                const optSlotContainer = Composing.getCurrent(slider);\n                return optSlotContainer.bind((slotContainer) => find$5(SlotContainer.getSlotNames(slotContainer), (name) => SlotContainer.isShowing(slotContainer, name)));\n            }\n            else {\n                return Optional.none();\n            }\n        });\n    };\n    const fixSize = generate$6('FixSizeEvent');\n    const autoSize = generate$6('AutoSizeEvent');\n    const sidebarContentChanged = generate$6('SidebarContentChanged');\n    const renderSidebar = (spec) => ({\n        uid: spec.uid,\n        dom: {\n            tag: 'div',\n            classes: ['tox-sidebar'],\n            styles: {\n                [requestedWidthProperty]: numToPx(spec.configuredSidebarWidth)\n            },\n            attributes: {\n                role: \"presentation\" /* SidebarStateRoleAttr.Shrunk */\n            }\n        },\n        components: [\n            {\n                dom: {\n                    tag: 'div',\n                    classes: ['tox-sidebar__slider']\n                },\n                components: [\n                // this will be replaced on setSidebar\n                ],\n                behaviours: derive$1([\n                    Tabstopping.config({}),\n                    Focusing.config({}), // TODO use Keying and use focusIn, but need to handle if sidebar contains nothing\n                    Sliding.config({\n                        dimension: {\n                            property: 'width'\n                        },\n                        closedClass: 'tox-sidebar--sliding-closed',\n                        openClass: 'tox-sidebar--sliding-open',\n                        shrinkingClass: 'tox-sidebar--sliding-shrinking',\n                        growingClass: 'tox-sidebar--sliding-growing',\n                        onShrunk: (slider) => {\n                            const optSlotContainer = Composing.getCurrent(slider);\n                            optSlotContainer.each(SlotContainer.hideAllSlots);\n                            emit(slider, autoSize);\n                        },\n                        onGrown: (slider) => {\n                            emit(slider, autoSize);\n                        },\n                        onStartGrow: (slider) => {\n                            emitWith(slider, fixSize, { width: getRaw(slider.element, 'width').getOr('') });\n                        },\n                        onStartShrink: (slider) => {\n                            emitWith(slider, fixSize, { width: get$c(slider.element) + 'px' });\n                        }\n                    }),\n                    Replacing.config({}),\n                    Composing.config({\n                        find: (comp) => {\n                            const children = Replacing.contents(comp);\n                            return head(children);\n                        }\n                    })\n                ])\n            }\n        ],\n        behaviours: derive$1([\n            ComposingConfigs.childAt(0),\n            config('sidebar-sliding-events', [\n                run$1(fixSize, (comp, se) => {\n                    set$7(comp.element, 'width', se.event.width);\n                    set$7(comp.element, resolvedWidthProperty, se.event.width);\n                }),\n                run$1(autoSize, (comp, _se) => {\n                    remove$6(comp.element, 'width');\n                    remove$6(comp.element, resolvedWidthProperty);\n                })\n            ])\n        ])\n    });\n\n    const getBusySpec$1 = (providerBackstage) => (_root, _behaviours) => ({\n        dom: {\n            tag: 'div',\n            attributes: {\n                'aria-label': providerBackstage.translate('Loading...'),\n                'tabindex': '0'\n            },\n            classes: ['tox-throbber__busy-spinner']\n        },\n        components: [\n            {\n                dom: fromHtml('<div class=\"tox-spinner\"><div></div><div></div><div></div></div>')\n            }\n        ],\n    });\n    const focusBusyComponent = (throbber) => Composing.getCurrent(throbber).each((comp) => focus$4(comp.element, true));\n    // When the throbber is enabled, prevent the iframe from being part of the sequential keyboard navigation when Tabbing\n    // TODO: TINY-7500 Only works for iframe mode at this stage\n    const toggleEditorTabIndex = (editor, state) => {\n        const tabIndexAttr = 'tabindex';\n        const dataTabIndexAttr = `data-mce-${tabIndexAttr}`;\n        Optional.from(editor.iframeElement)\n            .map(SugarElement.fromDom)\n            .each((iframe) => {\n            if (state) {\n                getOpt(iframe, tabIndexAttr).each((tabIndex) => set$9(iframe, dataTabIndexAttr, tabIndex));\n                set$9(iframe, tabIndexAttr, -1);\n            }\n            else {\n                remove$8(iframe, tabIndexAttr);\n                getOpt(iframe, dataTabIndexAttr).each((tabIndex) => {\n                    set$9(iframe, tabIndexAttr, tabIndex);\n                    remove$8(iframe, dataTabIndexAttr);\n                });\n            }\n        });\n    };\n    /*\n    * If the throbber has been toggled on, only focus the throbber if the editor had focus as we don't to steal focus if it is on an input or dialog\n    * If the throbber has been toggled off, only put focus back on the editor if the throbber had focus.\n    * The next logical focus transition from the throbber is to put it back on the editor\n    */\n    const toggleThrobber = (editor, comp, state, providerBackstage) => {\n        const element = comp.element;\n        toggleEditorTabIndex(editor, state);\n        if (state) {\n            Blocking.block(comp, getBusySpec$1(providerBackstage));\n            remove$6(element, 'display');\n            remove$8(element, 'aria-hidden');\n            if (editor.hasFocus()) {\n                focusBusyComponent(comp);\n            }\n        }\n        else {\n            // Get the focus of the busy component before it is removed from the DOM\n            const throbberFocus = Composing.getCurrent(comp).exists((busyComp) => hasFocus(busyComp.element));\n            Blocking.unblock(comp);\n            set$7(element, 'display', 'none');\n            set$9(element, 'aria-hidden', 'true');\n            if (throbberFocus) {\n                editor.focus();\n            }\n        }\n    };\n    const renderThrobber = (spec) => ({\n        uid: spec.uid,\n        dom: {\n            tag: 'div',\n            attributes: {\n                'aria-hidden': 'true'\n            },\n            classes: ['tox-throbber'],\n            styles: {\n                display: 'none'\n            }\n        },\n        behaviours: derive$1([\n            Replacing.config({}),\n            Blocking.config({\n                focus: false\n            }),\n            Composing.config({\n                find: (comp) => head(comp.components())\n            })\n        ]),\n        components: []\n    });\n    const isFocusEvent = (event) => event.type === 'focusin';\n    const isPasteBinTarget = (event) => {\n        if (isFocusEvent(event)) {\n            const node = event.composed ? head(event.composedPath()) : Optional.from(event.target);\n            return node\n                .map(SugarElement.fromDom)\n                .filter(isElement$1)\n                .exists((targetElm) => has(targetElm, 'mce-pastebin'));\n        }\n        else {\n            return false;\n        }\n    };\n    const setup$7 = (editor, lazyThrobber, sharedBackstage) => {\n        const throbberState = Cell(false);\n        const timer = value$2();\n        const stealFocus = (e) => {\n            if (throbberState.get() && !isPasteBinTarget(e)) {\n                e.preventDefault();\n                focusBusyComponent(lazyThrobber());\n                editor.editorManager.setActive(editor);\n            }\n        };\n        // TODO: TINY-7500 Only worrying about iframe mode at this stage since inline mode has a number of other issues\n        if (!editor.inline) {\n            editor.on('PreInit', () => {\n                // Cover focus when the editor is focused natively\n                editor.dom.bind(editor.getWin(), 'focusin', stealFocus);\n                // Cover stealing focus when editor.focus() is called\n                editor.on('BeforeExecCommand', (e) => {\n                    // If skipFocus is specified as true in the command, don't focus the Throbber\n                    if (e.command.toLowerCase() === 'mcefocus' && e.value !== true) {\n                        stealFocus(e);\n                    }\n                });\n            });\n        }\n        const toggle = (state) => {\n            if (state !== throbberState.get()) {\n                throbberState.set(state);\n                toggleThrobber(editor, lazyThrobber(), state, sharedBackstage.providers);\n                fireAfterProgressState(editor, state);\n            }\n        };\n        editor.on('ProgressState', (e) => {\n            timer.on(clearTimeout);\n            if (isNumber(e.time)) {\n                const timerId = global$a.setEditorTimeout(editor, () => toggle(e.state), e.time);\n                timer.set(timerId);\n            }\n            else {\n                toggle(e.state);\n                timer.clear();\n            }\n        });\n    };\n\n    const renderToolbarGroupCommon = (toolbarGroup) => {\n        const attributes = toolbarGroup.label.or(toolbarGroup.title).fold(() => ({}), (label) => ({ attributes: { 'aria-label': label } }));\n        return {\n            dom: {\n                tag: 'div',\n                classes: ['tox-toolbar__group'].concat(toolbarGroup.label.isSome() ? ['tox-toolbar__group_with_label'] : []),\n                ...attributes\n            },\n            components: [\n                ...(toolbarGroup.label.map((label) => {\n                    return {\n                        dom: {\n                            tag: 'span',\n                            classes: ['tox-label', 'tox-label--context-toolbar'],\n                        },\n                        components: [text$2(label)]\n                    };\n                }).toArray()),\n                ToolbarGroup.parts.items({})\n            ],\n            items: toolbarGroup.items,\n            markers: {\n                // nav within a group breaks if disabled buttons are first in their group so skip them\n                itemSelector: '.tox-tbtn:not([disabled]), ' +\n                    '.tox-toolbar-nav-item:not([disabled]), ' +\n                    '.tox-number-input:not([disabled])'\n            },\n            tgroupBehaviours: derive$1([\n                Tabstopping.config({}),\n                Focusing.config({\n                    ignore: true\n                })\n            ])\n        };\n    };\n    const renderToolbarGroup = (toolbarGroup) => ToolbarGroup.sketch(renderToolbarGroupCommon(toolbarGroup));\n    const getToolbarBehaviours = (toolbarSpec, modeName) => {\n        const onAttached = runOnAttached((component) => {\n            const groups = map$2(toolbarSpec.initGroups, renderToolbarGroup);\n            Toolbar.setGroups(component, groups);\n        });\n        return derive$1([\n            DisablingConfigs.toolbarButton(() => toolbarSpec.providers.checkUiComponentContext('any').shouldDisable),\n            toggleOnReceive(() => toolbarSpec.providers.checkUiComponentContext('any')),\n            Keying.config({\n                // Tabs between groups\n                mode: modeName,\n                onEscape: toolbarSpec.onEscape,\n                visibilitySelector: '.tox-toolbar__overflow',\n                selector: '.tox-toolbar__group'\n            }),\n            config('toolbar-events', [onAttached])\n        ]);\n    };\n    const renderMoreToolbarCommon = (toolbarSpec) => {\n        const modeName = toolbarSpec.cyclicKeying ? 'cyclic' : 'acyclic';\n        return {\n            uid: toolbarSpec.uid,\n            dom: {\n                tag: 'div',\n                classes: ['tox-toolbar-overlord']\n            },\n            parts: {\n                // This already knows it is a toolbar group\n                'overflow-group': renderToolbarGroupCommon({\n                    title: Optional.none(),\n                    label: Optional.none(),\n                    items: []\n                }),\n                'overflow-button': renderIconButtonSpec({\n                    context: 'any',\n                    name: 'more',\n                    icon: Optional.some('more-drawer'),\n                    enabled: true,\n                    tooltip: Optional.some('Reveal or hide additional toolbar items'),\n                    primary: false,\n                    buttonType: Optional.none(),\n                    borderless: false\n                }, Optional.none(), toolbarSpec.providers, [], 'overflow-button')\n            },\n            splitToolbarBehaviours: getToolbarBehaviours(toolbarSpec, modeName)\n        };\n    };\n    const renderFloatingMoreToolbar = (toolbarSpec) => {\n        const baseSpec = renderMoreToolbarCommon(toolbarSpec);\n        const overflowXOffset = 4;\n        const primary = SplitFloatingToolbar.parts.primary({\n            dom: {\n                tag: 'div',\n                classes: ['tox-toolbar__primary']\n            }\n        });\n        return SplitFloatingToolbar.sketch({\n            ...baseSpec,\n            lazySink: toolbarSpec.getSink,\n            getOverflowBounds: () => {\n                // Restrict the left/right bounds to the editor header width, but don't restrict the top/bottom\n                const headerElem = toolbarSpec.moreDrawerData.lazyHeader().element;\n                const headerBounds = absolute$2(headerElem);\n                const docElem = documentElement(headerElem);\n                const docBounds = absolute$2(docElem);\n                const height = Math.max(docElem.dom.scrollHeight, docBounds.height);\n                return bounds(headerBounds.x + overflowXOffset, docBounds.y, headerBounds.width - overflowXOffset * 2, height);\n            },\n            parts: {\n                ...baseSpec.parts,\n                overflow: {\n                    dom: {\n                        tag: 'div',\n                        classes: ['tox-toolbar__overflow'],\n                        attributes: toolbarSpec.attributes\n                    }\n                }\n            },\n            components: [primary],\n            markers: {\n                overflowToggledClass: \"tox-tbtn--enabled\" /* ToolbarButtonClasses.Ticked */\n            },\n            onOpened: (comp) => toolbarSpec.onToggled(comp, true),\n            onClosed: (comp) => toolbarSpec.onToggled(comp, false)\n        });\n    };\n    const renderSlidingMoreToolbar = (toolbarSpec) => {\n        const primary = SplitSlidingToolbar.parts.primary({\n            dom: {\n                tag: 'div',\n                classes: ['tox-toolbar__primary']\n            }\n        });\n        const overflow = SplitSlidingToolbar.parts.overflow({\n            dom: {\n                tag: 'div',\n                classes: ['tox-toolbar__overflow']\n            }\n        });\n        const baseSpec = renderMoreToolbarCommon(toolbarSpec);\n        return SplitSlidingToolbar.sketch({\n            ...baseSpec,\n            components: [primary, overflow],\n            markers: {\n                openClass: 'tox-toolbar__overflow--open',\n                closedClass: 'tox-toolbar__overflow--closed',\n                growingClass: 'tox-toolbar__overflow--growing',\n                shrinkingClass: 'tox-toolbar__overflow--shrinking',\n                overflowToggledClass: \"tox-tbtn--enabled\" /* ToolbarButtonClasses.Ticked */\n            },\n            onOpened: (comp) => {\n                // TINY-9223: This will only broadcast to the same mothership as the toolbar\n                comp.getSystem().broadcastOn([toolbarHeightChange()], { type: 'opened' });\n                toolbarSpec.onToggled(comp, true);\n            },\n            onClosed: (comp) => {\n                // TINY-9223: This will only broadcast to the same mothership as the toolbar\n                comp.getSystem().broadcastOn([toolbarHeightChange()], { type: 'closed' });\n                toolbarSpec.onToggled(comp, false);\n            }\n        });\n    };\n    const renderToolbar = (toolbarSpec) => {\n        const modeName = toolbarSpec.cyclicKeying ? 'cyclic' : 'acyclic';\n        return Toolbar.sketch({\n            uid: toolbarSpec.uid,\n            dom: {\n                tag: 'div',\n                classes: ['tox-toolbar'].concat(toolbarSpec.type === ToolbarMode$1.scrolling ? ['tox-toolbar--scrolling'] : [])\n            },\n            components: [\n                Toolbar.parts.groups({})\n            ],\n            toolbarBehaviours: getToolbarBehaviours(toolbarSpec, modeName)\n        });\n    };\n\n    const renderButton = (spec, providers) => {\n        const isToggleButton = spec.type === 'togglebutton';\n        const optMemIcon = spec.icon\n            .map((memIcon) => renderReplaceableIconFromPack(memIcon, providers.icons))\n            .map(record);\n        const getAction = () => (comp) => {\n            const setIcon = (newIcon) => {\n                optMemIcon.map((memIcon) => memIcon.getOpt(comp).each((displayIcon) => {\n                    Replacing.set(displayIcon, [\n                        renderReplaceableIconFromPack(newIcon, providers.icons)\n                    ]);\n                }));\n            };\n            const setActive = (state) => {\n                const elm = comp.element;\n                if (state) {\n                    add$2(elm, \"tox-button--enabled\" /* ViewButtonClasses.Ticked */);\n                    set$9(elm, 'aria-pressed', true);\n                }\n                else {\n                    remove$3(elm, \"tox-button--enabled\" /* ViewButtonClasses.Ticked */);\n                    remove$8(elm, 'aria-pressed');\n                }\n            };\n            const isActive = () => has(comp.element, \"tox-button--enabled\" /* ViewButtonClasses.Ticked */);\n            const focus = () => focus$4(comp.element);\n            if (isToggleButton) {\n                return spec.onAction({ setIcon, setActive, isActive, focus });\n            }\n            if (spec.type === 'button') {\n                return spec.onAction({ setIcon });\n            }\n        };\n        const action = getAction();\n        const buttonSpec = {\n            ...spec,\n            name: isToggleButton ? spec.text.getOr(spec.icon.getOr('')) : spec.text ?? spec.icon.getOr(''),\n            primary: spec.buttonType === 'primary',\n            buttonType: Optional.from(spec.buttonType),\n            tooltip: spec.tooltip,\n            icon: spec.icon,\n            enabled: true,\n            borderless: spec.borderless\n        };\n        const buttonTypeClasses = calculateClassesFromButtonType(spec.buttonType ?? 'secondary');\n        const optTranslatedText = isToggleButton ? spec.text.map(providers.translate) : Optional.some(providers.translate(spec.text));\n        const optTranslatedTextComponed = optTranslatedText.map(text$2);\n        const ariaLabelAttributes = buttonSpec.tooltip.or(optTranslatedText).map((al) => ({\n            'aria-label': providers.translate(al),\n        })).getOr({});\n        const optIconSpec = optMemIcon.map((memIcon) => memIcon.asSpec());\n        const components = componentRenderPipeline([optIconSpec, optTranslatedTextComponed]);\n        const hasIconAndText = spec.icon.isSome() && optTranslatedTextComponed.isSome();\n        const dom = {\n            tag: 'button',\n            classes: buttonTypeClasses\n                .concat(...spec.icon.isSome() && !hasIconAndText ? ['tox-button--icon'] : [])\n                .concat(...hasIconAndText ? ['tox-button--icon-and-text'] : [])\n                .concat(...spec.borderless ? ['tox-button--naked'] : [])\n                .concat(...spec.type === 'togglebutton' && spec.active ? [\"tox-button--enabled\" /* ViewButtonClasses.Ticked */] : []),\n            attributes: ariaLabelAttributes\n        };\n        const extraBehaviours = [];\n        const iconButtonSpec = renderCommonSpec(buttonSpec, Optional.some(action), extraBehaviours, dom, components, spec.tooltip, providers);\n        return Button.sketch(iconButtonSpec);\n    };\n\n    const renderViewButton = (spec, providers) => renderButton(spec, providers);\n    const renderButtonsGroup = (spec, providers) => {\n        return {\n            dom: {\n                tag: 'div',\n                classes: ['tox-view__toolbar__group'],\n            },\n            components: map$2(spec.buttons, (button) => renderViewButton(button, providers))\n        };\n    };\n    const deviceDetection = detect$1().deviceType;\n    const isPhone = deviceDetection.isPhone();\n    const isTablet = deviceDetection.isTablet();\n    const renderViewHeader = (spec) => {\n        let hasGroups = false;\n        const endButtons = map$2(spec.buttons, (btnspec) => {\n            if (btnspec.type === 'group') {\n                hasGroups = true;\n                return renderButtonsGroup(btnspec, spec.providers);\n            }\n            else {\n                return renderViewButton(btnspec, spec.providers);\n            }\n        });\n        return {\n            uid: spec.uid,\n            dom: {\n                tag: 'div',\n                classes: [\n                    !hasGroups ? 'tox-view__header' : 'tox-view__toolbar',\n                    ...(isPhone || isTablet ? ['tox-view--mobile', 'tox-view--scrolling'] : [])\n                ]\n            },\n            behaviours: derive$1([\n                Focusing.config({}),\n                Keying.config({\n                    mode: 'flow',\n                    selector: 'button, .tox-button',\n                    focusInside: FocusInsideModes.OnEnterOrSpaceMode\n                })\n            ]),\n            components: hasGroups ?\n                endButtons\n                : [\n                    Container.sketch({\n                        dom: {\n                            tag: 'div',\n                            classes: ['tox-view__header-start']\n                        },\n                        components: []\n                    }),\n                    Container.sketch({\n                        dom: {\n                            tag: 'div',\n                            classes: ['tox-view__header-end']\n                        },\n                        components: endButtons\n                    })\n                ]\n        };\n    };\n    const renderViewPane = (spec) => {\n        return {\n            uid: spec.uid,\n            behaviours: derive$1([\n                Focusing.config({}),\n                Tabstopping.config({})\n            ]),\n            dom: {\n                tag: 'div',\n                classes: ['tox-view__pane']\n            }\n        };\n    };\n    const factory$2 = (detail, components, _spec, _externals) => {\n        const apis = {\n            getPane: (comp) => parts$g.getPart(comp, detail, 'pane'),\n            getOnShow: (_comp) => detail.viewConfig.onShow,\n            getOnHide: (_comp) => detail.viewConfig.onHide,\n        };\n        return {\n            uid: detail.uid,\n            dom: detail.dom,\n            components,\n            behaviours: derive$1([\n                Focusing.config({}),\n                Keying.config({\n                    mode: 'cyclic',\n                    focusInside: FocusInsideModes.OnEnterOrSpaceMode\n                })\n            ]),\n            apis\n        };\n    };\n    var View = composite({\n        name: 'silver.View',\n        configFields: [\n            required$1('viewConfig'),\n        ],\n        partFields: [\n            optional({\n                factory: {\n                    sketch: renderViewHeader\n                },\n                schema: [\n                    required$1('buttons'),\n                    required$1('providers')\n                ],\n                name: 'header'\n            }),\n            optional({\n                factory: {\n                    sketch: renderViewPane\n                },\n                schema: [],\n                name: 'pane'\n            })\n        ],\n        factory: factory$2,\n        apis: {\n            getPane: (apis, comp) => apis.getPane(comp),\n            getOnShow: (apis, comp) => apis.getOnShow(comp),\n            getOnHide: (apis, comp) => apis.getOnHide(comp)\n        }\n    });\n\n    const makeViews = (parts, viewConfigs, providers) => {\n        return mapToArray(viewConfigs, (config, name) => {\n            const internalViewConfig = getOrDie(createView(config));\n            return parts.slot(name, View.sketch({\n                dom: {\n                    tag: 'div',\n                    classes: ['tox-view']\n                },\n                viewConfig: internalViewConfig,\n                components: [\n                    ...internalViewConfig.buttons.length > 0 ? [\n                        View.parts.header({\n                            buttons: internalViewConfig.buttons,\n                            providers\n                        })\n                    ] : [],\n                    View.parts.pane({})\n                ]\n            }));\n        });\n    };\n    const makeSlotContainer = (viewConfigs, providers) => SlotContainer.sketch((parts) => ({\n        dom: {\n            tag: 'div',\n            classes: ['tox-view-wrap__slot-container']\n        },\n        components: makeViews(parts, viewConfigs, providers),\n        slotBehaviours: SimpleBehaviours.unnamedEvents([\n            runOnAttached((slotContainer) => SlotContainer.hideAllSlots(slotContainer))\n        ])\n    }));\n    const getCurrentName = (slotContainer) => {\n        return find$5(SlotContainer.getSlotNames(slotContainer), (name) => SlotContainer.isShowing(slotContainer, name));\n    };\n    const hideContainer = (comp) => {\n        const element = comp.element;\n        set$7(element, 'display', 'none');\n        set$9(element, 'aria-hidden', 'true');\n    };\n    const showContainer = (comp) => {\n        const element = comp.element;\n        remove$6(element, 'display');\n        remove$8(element, 'aria-hidden');\n    };\n    const makeViewInstanceApi = (slot) => ({\n        getContainer: constant$1(slot)\n    });\n    const runOnPaneWithInstanceApi = (slotContainer, name, get) => {\n        SlotContainer.getSlot(slotContainer, name).each((view) => {\n            View.getPane(view).each((pane) => {\n                const onCallback = get(view);\n                onCallback(makeViewInstanceApi(pane.element.dom));\n            });\n        });\n    };\n    const runOnShow = (slotContainer, name) => runOnPaneWithInstanceApi(slotContainer, name, View.getOnShow);\n    const runOnHide = (slotContainer, name) => runOnPaneWithInstanceApi(slotContainer, name, View.getOnHide);\n    const factory$1 = (detail, spec) => {\n        let viewConfigs = {};\n        const setViews = (comp, configs) => {\n            viewConfigs = configs;\n            Replacing.set(comp, [makeSlotContainer(configs, spec.backstage.shared.providers)]);\n        };\n        const whichView = (comp) => {\n            return Composing.getCurrent(comp).bind(getCurrentName);\n        };\n        const toggleView = (comp, showMainView, hideMainView, name) => {\n            return Composing.getCurrent(comp).exists((slotContainer) => {\n                const optCurrentSlotName = getCurrentName(slotContainer);\n                const isTogglingCurrentView = optCurrentSlotName.exists((current) => name === current);\n                const exists = SlotContainer.getSlot(slotContainer, name).isSome();\n                if (exists) {\n                    SlotContainer.hideAllSlots(slotContainer);\n                    if (!isTogglingCurrentView) {\n                        hideMainView(viewConfigs[name]?.keepToolbar === true);\n                        showContainer(comp);\n                        SlotContainer.showSlot(slotContainer, name);\n                        runOnShow(slotContainer, name);\n                    }\n                    else {\n                        hideContainer(comp);\n                        showMainView();\n                    }\n                    optCurrentSlotName.each((prevName) => runOnHide(slotContainer, prevName));\n                }\n                return exists;\n            });\n        };\n        const apis = {\n            setViews,\n            whichView,\n            toggleView\n        };\n        return {\n            uid: detail.uid,\n            dom: {\n                tag: 'div',\n                classes: ['tox-view-wrap'],\n                attributes: { 'aria-hidden': 'true' },\n                styles: { display: 'none' }\n            },\n            components: [\n            // this will be replaced on setViews\n            ],\n            behaviours: derive$1([\n                Replacing.config({}),\n                Composing.config({\n                    find: (comp) => {\n                        const children = Replacing.contents(comp);\n                        return head(children);\n                    }\n                })\n            ]),\n            apis\n        };\n    };\n    var ViewWrapper = single({\n        factory: factory$1,\n        name: 'silver.ViewWrapper',\n        configFields: [\n            required$1('backstage')\n        ],\n        apis: {\n            setViews: (apis, comp, views) => apis.setViews(comp, views),\n            toggleView: (apis, comp, outerContainer, editorCont, name) => apis.toggleView(comp, outerContainer, editorCont, name),\n            whichView: (apis, comp) => apis.whichView(comp)\n        }\n    });\n\n    const keepToolbarClass = 'tox-editor-container--keep-toolbar';\n    const setHidden = (element, hidden) => {\n        if (hidden) {\n            set$7(element, 'display', 'none');\n            set$9(element, 'aria-hidden', 'true');\n        }\n        else {\n            remove$6(element, 'display');\n            remove$8(element, 'aria-hidden');\n        }\n    };\n    const factory = (detail, components, _spec) => {\n        let toolbarDrawerOpenState = false;\n        let toolbarVisible = true;\n        const setStatusbarHidden = (editorContainer, hidden) => {\n            sibling(editorContainer, '.tox-statusbar').each((statusBar) => {\n                setHidden(statusBar, hidden);\n            });\n        };\n        const setSidebarWrapHidden = (editorContainer, hidden) => {\n            descendant(editorContainer, '.tox-sidebar-wrap').each((wrap) => {\n                setHidden(wrap, hidden);\n            });\n        };\n        const apis = {\n            getSocket: (comp) => {\n                return parts$g.getPart(comp, detail, 'socket');\n            },\n            setSidebar: (comp, panelConfigs, showSidebar, sizeConstraints, eventDispatcher) => {\n                parts$g.getPart(comp, detail, 'sidebar').each((sidebar) => setSidebar(sidebar, panelConfigs, showSidebar, sizeConstraints, eventDispatcher));\n            },\n            toggleSidebar: (comp, name) => {\n                parts$g.getPart(comp, detail, 'sidebar').each((sidebar) => toggleSidebar(sidebar, name));\n            },\n            whichSidebar: (comp) => {\n                return parts$g.getPart(comp, detail, 'sidebar').bind(whichSidebar).getOrNull();\n            },\n            getHeader: (comp) => {\n                return parts$g.getPart(comp, detail, 'header');\n            },\n            getToolbar: (comp) => {\n                return parts$g.getPart(comp, detail, 'toolbar');\n            },\n            setToolbar: (comp, groups) => {\n                parts$g.getPart(comp, detail, 'toolbar').each((toolbar) => {\n                    const renderedGroups = map$2(groups, renderToolbarGroup);\n                    toolbar.getApis().setGroups(toolbar, renderedGroups);\n                });\n            },\n            setToolbars: (comp, toolbars) => {\n                parts$g.getPart(comp, detail, 'multiple-toolbar').each((mToolbar) => {\n                    const renderedToolbars = map$2(toolbars, (g) => map$2(g, renderToolbarGroup));\n                    CustomList.setItems(mToolbar, renderedToolbars);\n                });\n            },\n            refreshToolbar: (comp) => {\n                const toolbar = parts$g.getPart(comp, detail, 'toolbar');\n                toolbar.each((toolbar) => toolbar.getApis().refresh(toolbar));\n            },\n            toggleToolbarDrawer: (comp) => {\n                parts$g.getPart(comp, detail, 'toolbar').each((toolbar) => {\n                    mapFrom(toolbar.getApis().toggle, (toggle) => toggle(toolbar));\n                });\n            },\n            toggleToolbarDrawerWithoutFocusing: (comp) => {\n                parts$g.getPart(comp, detail, 'toolbar').each((toolbar) => {\n                    mapFrom(toolbar.getApis().toggleWithoutFocusing, (toggleWithoutFocusing) => toggleWithoutFocusing(toolbar));\n                });\n            },\n            isToolbarDrawerToggled: (comp) => {\n                // isOpen may not be defined on all toolbars e.g. 'scrolling' and 'wrap'\n                return parts$g.getPart(comp, detail, 'toolbar')\n                    .bind((toolbar) => Optional.from(toolbar.getApis().isOpen).map((isOpen) => isOpen(toolbar)))\n                    .getOr(false);\n            },\n            getThrobber: (comp) => {\n                return parts$g.getPart(comp, detail, 'throbber');\n            },\n            focusToolbar: (comp) => {\n                const optToolbar = parts$g.getPart(comp, detail, 'toolbar').orThunk(() => parts$g.getPart(comp, detail, 'multiple-toolbar'));\n                optToolbar.each((toolbar) => {\n                    Keying.focusIn(toolbar);\n                });\n            },\n            setMenubar: (comp, menus) => {\n                parts$g.getPart(comp, detail, 'menubar').each((menubar) => {\n                    SilverMenubar.setMenus(menubar, menus);\n                });\n            },\n            focusMenubar: (comp) => {\n                parts$g.getPart(comp, detail, 'menubar').each((menubar) => {\n                    SilverMenubar.focus(menubar);\n                });\n            },\n            setViews: (comp, viewConfigs, showView) => {\n                parts$g.getPart(comp, detail, 'viewWrapper').each((wrapper) => {\n                    ViewWrapper.setViews(wrapper, viewConfigs);\n                });\n                const configKey = showView?.toLowerCase();\n                if (isString(configKey) && has$2(viewConfigs, configKey)) {\n                    apis.toggleView(comp, configKey);\n                }\n            },\n            toggleView: (comp, name) => {\n                return parts$g.getPart(comp, detail, 'viewWrapper').exists((wrapper) => ViewWrapper.toggleView(wrapper, () => apis.showMainView(comp), (keepToolbar) => apis.hideMainView(comp, keepToolbar), name));\n            },\n            whichView: (comp) => {\n                return parts$g.getPart(comp, detail, 'viewWrapper').bind(ViewWrapper.whichView).getOrNull();\n            },\n            hideMainView: (comp, keepToolbar) => {\n                const restoreDrawer = keepToolbar && !toolbarVisible && toolbarDrawerOpenState;\n                if (keepToolbar) {\n                    toolbarDrawerOpenState = false;\n                }\n                else if (toolbarVisible) {\n                    toolbarDrawerOpenState = apis.isToolbarDrawerToggled(comp);\n                    if (toolbarDrawerOpenState) {\n                        apis.toggleToolbarDrawer(comp);\n                    }\n                }\n                toolbarVisible = keepToolbar;\n                parts$g.getPart(comp, detail, 'editorContainer').each((editorContainer) => {\n                    const element = editorContainer.element;\n                    setStatusbarHidden(element, !keepToolbar);\n                    if (keepToolbar) {\n                        parts$g.getPart(comp, detail, 'sidebar').each(closeSidebar);\n                        add$2(element, keepToolbarClass);\n                        setHidden(element, false);\n                        setSidebarWrapHidden(element, true);\n                    }\n                    else {\n                        remove$3(element, keepToolbarClass);\n                        setSidebarWrapHidden(element, false);\n                        setHidden(element, true);\n                    }\n                });\n                if (restoreDrawer) {\n                    apis.toggleToolbarDrawerWithoutFocusing(comp);\n                }\n            },\n            showMainView: (comp) => {\n                if (toolbarDrawerOpenState) {\n                    apis.toggleToolbarDrawer(comp);\n                    toolbarDrawerOpenState = false;\n                }\n                toolbarVisible = true;\n                parts$g.getPart(comp, detail, 'editorContainer').each((editorContainer) => {\n                    const element = editorContainer.element;\n                    remove$3(element, keepToolbarClass);\n                    setSidebarWrapHidden(element, false);\n                    setStatusbarHidden(element, false);\n                    setHidden(element, false);\n                });\n            }\n        };\n        return {\n            uid: detail.uid,\n            dom: detail.dom,\n            components,\n            apis,\n            behaviours: detail.behaviours\n        };\n    };\n    const partMenubar = partType$1.optional({\n        factory: SilverMenubar,\n        name: 'menubar',\n        schema: [\n            required$1('backstage')\n        ]\n    });\n    const toolbarFactory = (spec) => {\n        if (spec.type === ToolbarMode$1.sliding) {\n            return renderSlidingMoreToolbar;\n        }\n        else if (spec.type === ToolbarMode$1.floating) {\n            return renderFloatingMoreToolbar;\n        }\n        else {\n            return renderToolbar;\n        }\n    };\n    const partMultipleToolbar = partType$1.optional({\n        factory: {\n            sketch: (spec) => CustomList.sketch({\n                uid: spec.uid,\n                dom: spec.dom,\n                listBehaviours: derive$1([\n                    Keying.config({\n                        mode: 'acyclic',\n                        selector: '.tox-toolbar'\n                    })\n                ]),\n                makeItem: () => renderToolbar({\n                    type: spec.type,\n                    uid: generate$6('multiple-toolbar-item'),\n                    cyclicKeying: false,\n                    initGroups: [],\n                    providers: spec.providers,\n                    onEscape: () => {\n                        spec.onEscape();\n                        return Optional.some(true);\n                    }\n                }),\n                setupItem: (_mToolbar, tc, data, _index) => {\n                    Toolbar.setGroups(tc, data);\n                },\n                shell: true\n            })\n        },\n        name: 'multiple-toolbar',\n        schema: [\n            required$1('dom'),\n            required$1('onEscape')\n        ]\n    });\n    const partToolbar = partType$1.optional({\n        factory: {\n            sketch: (spec) => {\n                const renderer = toolbarFactory(spec);\n                const toolbarSpec = {\n                    type: spec.type,\n                    uid: spec.uid,\n                    onEscape: () => {\n                        spec.onEscape();\n                        return Optional.some(true);\n                    },\n                    onToggled: (_comp, state) => spec.onToolbarToggled(state),\n                    cyclicKeying: false,\n                    initGroups: [],\n                    getSink: spec.getSink,\n                    providers: spec.providers,\n                    moreDrawerData: {\n                        lazyToolbar: spec.lazyToolbar,\n                        lazyMoreButton: spec.lazyMoreButton,\n                        lazyHeader: spec.lazyHeader\n                    },\n                    attributes: spec.attributes\n                };\n                return renderer(toolbarSpec);\n            }\n        },\n        name: 'toolbar',\n        schema: [\n            required$1('dom'),\n            required$1('onEscape'),\n            required$1('getSink')\n        ]\n    });\n    const partHeader = partType$1.optional({\n        factory: {\n            sketch: renderHeader\n        },\n        name: 'header',\n        schema: [\n            required$1('dom')\n        ]\n    });\n    const partPromotion = partType$1.optional({\n        factory: {\n            sketch: renderPromotion\n        },\n        name: 'promotion',\n        schema: [\n            required$1('dom'),\n            required$1('promotionLink')\n        ]\n    });\n    const partSocket = partType$1.optional({\n        // factory: Fun.identity,\n        name: 'socket',\n        schema: [\n            required$1('dom')\n        ]\n    });\n    const partSidebar = partType$1.optional({\n        factory: {\n            sketch: renderSidebar\n        },\n        name: 'sidebar',\n        schema: [\n            required$1('dom'),\n            required$1('configuredSidebarWidth')\n        ]\n    });\n    const partThrobber = partType$1.optional({\n        factory: {\n            sketch: renderThrobber\n        },\n        name: 'throbber',\n        schema: [\n            required$1('dom')\n        ]\n    });\n    const partViewWrapper = partType$1.optional({\n        factory: ViewWrapper,\n        name: 'viewWrapper',\n        schema: [\n            required$1('backstage')\n        ]\n    });\n    const renderEditorContainer = (spec) => ({\n        uid: spec.uid,\n        dom: {\n            tag: 'div',\n            classes: ['tox-editor-container']\n        },\n        components: spec.components\n    });\n    const partEditorContainer = partType$1.optional({\n        factory: {\n            sketch: renderEditorContainer\n        },\n        name: 'editorContainer',\n        schema: []\n    });\n    var OuterContainer = composite({\n        name: 'OuterContainer',\n        factory,\n        configFields: [\n            required$1('dom'),\n            required$1('behaviours')\n        ],\n        partFields: [\n            partHeader,\n            partMenubar,\n            partToolbar,\n            partMultipleToolbar,\n            partSocket,\n            partSidebar,\n            partPromotion,\n            partThrobber,\n            partViewWrapper,\n            partEditorContainer\n        ],\n        apis: {\n            getSocket: (apis, comp) => {\n                return apis.getSocket(comp);\n            },\n            setSidebar: (apis, comp, panelConfigs, showSidebar, sizeConstraints, eventDispatcher) => {\n                apis.setSidebar(comp, panelConfigs, showSidebar, sizeConstraints, eventDispatcher);\n            },\n            toggleSidebar: (apis, comp, name) => {\n                apis.toggleSidebar(comp, name);\n            },\n            whichSidebar: (apis, comp) => {\n                return apis.whichSidebar(comp);\n            },\n            getHeader: (apis, comp) => {\n                return apis.getHeader(comp);\n            },\n            getToolbar: (apis, comp) => {\n                return apis.getToolbar(comp);\n            },\n            setToolbar: (apis, comp, groups) => {\n                apis.setToolbar(comp, groups);\n            },\n            setToolbars: (apis, comp, toolbars) => {\n                apis.setToolbars(comp, toolbars);\n            },\n            refreshToolbar: (apis, comp) => {\n                return apis.refreshToolbar(comp);\n            },\n            toggleToolbarDrawer: (apis, comp) => {\n                apis.toggleToolbarDrawer(comp);\n            },\n            toggleToolbarDrawerWithoutFocusing: (apis, comp) => {\n                apis.toggleToolbarDrawerWithoutFocusing(comp);\n            },\n            isToolbarDrawerToggled: (apis, comp) => {\n                return apis.isToolbarDrawerToggled(comp);\n            },\n            getThrobber: (apis, comp) => {\n                return apis.getThrobber(comp);\n            },\n            // FIX: Dupe\n            setMenubar: (apis, comp, menus) => {\n                apis.setMenubar(comp, menus);\n            },\n            focusMenubar: (apis, comp) => {\n                apis.focusMenubar(comp);\n            },\n            focusToolbar: (apis, comp) => {\n                apis.focusToolbar(comp);\n            },\n            setViews: (apis, comp, views, showView) => {\n                apis.setViews(comp, views, showView);\n            },\n            toggleView: (apis, comp, name) => {\n                return apis.toggleView(comp, name);\n            },\n            whichView: (apis, comp) => {\n                return apis.whichView(comp);\n            },\n        }\n    });\n\n    const defaultMenubar = 'file edit view insert format tools table help';\n    const defaultMenus = {\n        file: { title: 'File', items: 'newdocument restoredraft | preview | importword exportpdf exportword | export print | deleteallconversations' },\n        edit: { title: 'Edit', items: 'undo redo | cut copy paste pastetext | selectall | searchreplace' },\n        view: { title: 'View', items: 'code suggestededits revisionhistory | visualaid visualchars visualblocks | spellchecker | preview fullscreen | showcomments' },\n        insert: { title: 'Insert', items: 'image video link media addcomment pageembed inserttemplate codesample inserttable accordion math | charmap emoticons hr | pagebreak nonbreaking anchor tableofcontents footnotes | mergetags | insertdatetime' },\n        format: { title: 'Format', items: 'bold italic underline strikethrough superscript subscript codeformat | styles blocks fontfamily fontsize align lineheight | forecolor backcolor | language | removeformat' },\n        tools: { title: 'Tools', items: 'tinymceai-chat tinymceai-review tinymceai-quickactions aidialog aishortcuts | spellchecker spellcheckerlanguage | autocorrect capitalization | a11ycheck code typography wordcount addtemplate' },\n        table: { title: 'Table', items: 'inserttable | cell row column | advtablesort | tableprops deletetable' },\n        help: { title: 'Help', items: 'help' }\n    };\n    const make = (menu, registry, editor) => {\n        const removedMenuItems = getRemovedMenuItems(editor).split(/[ ,]/);\n        return {\n            text: menu.title,\n            getItems: () => bind$3(menu.items, (i) => {\n                const itemName = i.toLowerCase();\n                if (itemName.trim().length === 0) {\n                    return [];\n                }\n                else if (exists(removedMenuItems, (removedMenuItem) => removedMenuItem === itemName)) {\n                    return [];\n                }\n                else if (itemName === 'separator' || itemName === '|') {\n                    return [{\n                            type: 'separator'\n                        }];\n                }\n                else if (registry.menuItems[itemName]) {\n                    return [registry.menuItems[itemName]];\n                }\n                else {\n                    return [];\n                }\n            })\n        };\n    };\n    const parseItemsString = (items) => {\n        return items.split(' ');\n    };\n    const identifyMenus = (editor, registry) => {\n        const rawMenuData = { ...defaultMenus, ...registry.menus };\n        const userDefinedMenus = keys(registry.menus).length > 0;\n        const menubar = registry.menubar === undefined || registry.menubar === true ? parseItemsString(defaultMenubar) : parseItemsString(registry.menubar === false ? '' : registry.menubar);\n        const validMenus = filter$2(menubar, (menuName) => {\n            const isDefaultMenu = has$2(defaultMenus, menuName);\n            if (userDefinedMenus) {\n                return isDefaultMenu || get$h(registry.menus, menuName).exists((menu) => has$2(menu, 'items'));\n            }\n            else {\n                return isDefaultMenu;\n            }\n        });\n        const menus = map$2(validMenus, (menuName) => {\n            const menuData = rawMenuData[menuName];\n            return make({ title: menuData.title, items: parseItemsString(menuData.items) }, registry, editor);\n        });\n        return filter$2(menus, (menu) => {\n            // Filter out menus that have no items, or only separators\n            const isNotSeparator = (item) => isString(item) || item.type !== 'separator';\n            return menu.getItems().length > 0 && exists(menu.getItems(), isNotSeparator);\n        });\n    };\n\n    const fireSkinLoaded = (editor) => {\n        const done = () => {\n            editor._skinLoaded = true;\n            fireSkinLoaded$1(editor);\n        };\n        return () => {\n            if (editor.initialized) {\n                done();\n            }\n            else {\n                editor.on('init', done);\n            }\n        };\n    };\n    const fireSkinLoadError = (editor, err) => () => fireSkinLoadError$1(editor, { message: err });\n\n    const getSkinResourceIdentifier = (editor) => {\n        const skin = getSkin(editor);\n        // Use falsy check to cover false, undefined/null and empty string\n        if (!skin) {\n            return Optional.none();\n        }\n        else {\n            return Optional.from(skin);\n        }\n    };\n    const loadStylesheet = (editor, stylesheetUrl, styleSheetLoader) => {\n        // Ensure the stylesheet is cleaned up when the editor is destroyed\n        editor.on('remove', () => styleSheetLoader.unload(stylesheetUrl));\n        return styleSheetLoader.load(stylesheetUrl);\n    };\n    const loadRawCss = (editor, key, css, styleSheetLoader) => {\n        // Ensure the stylesheet is cleaned up when the editor is destroyed\n        editor.on('remove', () => styleSheetLoader.unloadRawCss(key));\n        return styleSheetLoader.loadRawCss(key, css);\n    };\n    const skinIdentifierToResourceKey = (identifier, filename) => 'ui/' + identifier + '/' + filename;\n    const getResourceValue = (resourceKey) => Optional.from(tinymce.Resource.get(resourceKey)).filter(isString);\n    const determineCSSDecision = (editor, filenameBase, skinUrl = '') => {\n        const resourceKey = getSkinResourceIdentifier(editor)\n            .map((identifier) => skinIdentifierToResourceKey(identifier, `${filenameBase}.css`));\n        const resourceValue = resourceKey.bind(getResourceValue);\n        return lift2(resourceKey, resourceValue, (key, css) => {\n            return { _kind: 'load-raw', key, css };\n        }).getOrThunk(() => {\n            const suffix = editor.editorManager.suffix;\n            const skinUiCssUrl = skinUrl + `/${filenameBase}${suffix}.css`;\n            return { _kind: 'load-stylesheet', url: skinUiCssUrl };\n        });\n    };\n    const loadUiSkins = (editor, skinUrl) => {\n        const loader = editor.ui.styleSheetLoader;\n        const decision = determineCSSDecision(editor, 'skin', skinUrl);\n        switch (decision._kind) {\n            case 'load-raw':\n                const { key, css } = decision;\n                loadRawCss(editor, key, css, loader);\n                return Promise.resolve();\n            case 'load-stylesheet':\n                const { url } = decision;\n                return loadStylesheet(editor, url, loader);\n            default:\n                return Promise.resolve();\n        }\n    };\n    const loadShadowDomUiSkins = (editor, skinUrl) => {\n        const isInShadowRoot$1 = isInShadowRoot(SugarElement.fromDom(editor.getElement()));\n        if (!isInShadowRoot$1) {\n            return Promise.resolve();\n        }\n        else {\n            const loader = global$9.DOM.styleSheetLoader;\n            const decision = determineCSSDecision(editor, 'skin.shadowdom', skinUrl);\n            switch (decision._kind) {\n                case 'load-raw':\n                    const { key, css } = decision;\n                    loadRawCss(editor, key, css, loader);\n                    return Promise.resolve();\n                case 'load-stylesheet':\n                    const { url } = decision;\n                    return loadStylesheet(editor, url, loader);\n                default:\n                    return Promise.resolve();\n            }\n        }\n    };\n    const loadUiContentCSS = (editor, isInline, skinUrl) => {\n        const filenameBase = isInline ? 'content.inline' : 'content';\n        const decision = determineCSSDecision(editor, filenameBase, skinUrl);\n        if (!skinUrl) {\n            return Promise.resolve();\n        }\n        switch (decision._kind) {\n            case 'load-raw':\n                const { key } = decision;\n                editor.contentCSS.push(key);\n                return Promise.resolve();\n            case 'load-stylesheet':\n                const { url } = decision;\n                editor.contentCSS.push(url);\n                return Promise.resolve();\n            default:\n                return Promise.resolve();\n        }\n    };\n    const loadUrlSkin = async (isInline, editor) => {\n        const skinUrl = getSkinUrl(editor);\n        await loadUiContentCSS(editor, isInline, skinUrl);\n        // In Modern Inline, this is explicitly called in editor.on('focus', ...) as well as in render().\n        // Seems to work without, but adding a note in case things break later\n        if (!isSkinDisabled(editor) && isString(skinUrl)) {\n            return Promise.all([\n                loadUiSkins(editor, skinUrl),\n                loadShadowDomUiSkins(editor, skinUrl)\n            ]).then();\n        }\n    };\n    const loadSkin = (isInline, editor) => {\n        return loadUrlSkin(isInline, editor).then(fireSkinLoaded(editor), fireSkinLoadError(editor, 'Skin could not be loaded'));\n    };\n    const iframe = curry(loadSkin, false);\n    const inline = curry(loadSkin, true);\n\n    const getButtonApi = (component) => ({\n        isEnabled: () => !Disabling.isDisabled(component),\n        setEnabled: (state) => Disabling.set(component, !state),\n        setText: (text) => emitWith(component, updateMenuText, {\n            text\n        }),\n        setIcon: (icon) => emitWith(component, updateMenuIcon, {\n            icon\n        })\n    });\n    const getToggleApi = (component) => ({\n        setActive: (state) => {\n            Toggling.set(component, state);\n        },\n        isActive: () => Toggling.isOn(component),\n        isEnabled: () => !Disabling.isDisabled(component),\n        setEnabled: (state) => Disabling.set(component, !state),\n        setText: (text) => emitWith(component, updateMenuText, {\n            text\n        }),\n        setIcon: (icon) => emitWith(component, updateMenuIcon, {\n            icon\n        })\n    });\n    const getTooltipAttributes = (tooltip, providersBackstage) => tooltip.map((tooltip) => ({\n        'aria-label': providersBackstage.translate(tooltip),\n    })).getOr({});\n    const focusButtonEvent = generate$6('focus-button');\n    const renderCommonStructure = (optIcon, optText, tooltip, behaviours, providersBackstage, context, btnName) => {\n        const optMemDisplayText = optText.map((text) => record(renderLabel$1(text, \"tox-tbtn\" /* ToolbarButtonClasses.Button */, providersBackstage)));\n        const optMemDisplayIcon = optIcon.map((icon) => record(renderReplaceableIconFromPack(icon, providersBackstage.icons)));\n        return {\n            dom: {\n                tag: 'button',\n                classes: [\"tox-tbtn\" /* ToolbarButtonClasses.Button */].concat(optText.isSome() ? [\"tox-tbtn--select\" /* ToolbarButtonClasses.MatchWidth */] : []),\n                attributes: {\n                    ...getTooltipAttributes(tooltip, providersBackstage),\n                    ...(isNonNullable(btnName) ? { 'data-mce-name': btnName } : {})\n                }\n            },\n            components: componentRenderPipeline([\n                optMemDisplayIcon.map((mem) => mem.asSpec()),\n                optMemDisplayText.map((mem) => mem.asSpec()),\n            ]),\n            eventOrder: {\n                [mousedown()]: [\n                    'focusing',\n                    'alloy.base.behaviour',\n                    commonButtonDisplayEvent\n                ],\n                [attachedToDom()]: [commonButtonDisplayEvent, 'toolbar-group-button-events'],\n                [detachedFromDom()]: [commonButtonDisplayEvent, 'toolbar-group-button-events', 'tooltipping']\n            },\n            buttonBehaviours: derive$1([\n                DisablingConfigs.toolbarButton(() => providersBackstage.checkUiComponentContext(context).shouldDisable),\n                toggleOnReceive(() => providersBackstage.checkUiComponentContext(context)),\n                config(commonButtonDisplayEvent, [\n                    runOnAttached((comp, _se) => forceInitialSize(comp)),\n                    run$1(updateMenuText, (comp, se) => {\n                        optMemDisplayText.bind((mem) => mem.getOpt(comp)).each((displayText) => {\n                            Replacing.set(displayText, [text$2(providersBackstage.translate(se.event.text))]);\n                        });\n                    }),\n                    run$1(updateMenuIcon, (comp, se) => {\n                        optMemDisplayIcon.bind((mem) => mem.getOpt(comp)).each((displayIcon) => {\n                            Replacing.set(displayIcon, [renderReplaceableIconFromPack(se.event.icon, providersBackstage.icons)]);\n                        });\n                    }),\n                    run$1(mousedown(), (button, se) => {\n                        se.event.prevent();\n                        emit(button, focusButtonEvent);\n                    })\n                ])\n            ].concat(behaviours.getOr([])))\n        };\n    };\n    const renderFloatingToolbarButton = (spec, backstage, identifyButtons, attributes, btnName) => {\n        const sharedBackstage = backstage.shared;\n        const editorOffCell = Cell(noop);\n        const specialisation = {\n            toolbarButtonBehaviours: [],\n            getApi: getButtonApi,\n            onSetup: spec.onSetup\n        };\n        const behaviours = [\n            config('toolbar-group-button-events', [\n                onControlAttached(specialisation, editorOffCell),\n                onControlDetached(specialisation, editorOffCell)\n            ]),\n            ...(spec.tooltip.map((t) => Tooltipping.config(backstage.shared.providers.tooltips.getConfig({\n                tooltipText: backstage.shared.providers.translate(t),\n            })))).toArray()\n        ];\n        return FloatingToolbarButton.sketch({\n            lazySink: sharedBackstage.getSink,\n            fetch: () => Future.nu((resolve) => {\n                resolve(map$2(identifyButtons(spec.items), renderToolbarGroup));\n            }),\n            markers: {\n                toggledClass: \"tox-tbtn--enabled\" /* ToolbarButtonClasses.Ticked */\n            },\n            parts: {\n                button: renderCommonStructure(spec.icon, spec.text, spec.tooltip, Optional.some(behaviours), sharedBackstage.providers, spec.context, btnName),\n                toolbar: {\n                    dom: {\n                        tag: 'div',\n                        classes: ['tox-toolbar__overflow'],\n                        attributes\n                    }\n                }\n            }\n        });\n    };\n    const renderCommonToolbarButton = (spec, specialisation, providersBackstage, btnName) => {\n        const editorOffCell = Cell(noop);\n        const structure = renderCommonStructure(spec.icon, spec.text, spec.tooltip, Optional.none(), providersBackstage, spec.context, btnName);\n        return Button.sketch({\n            dom: structure.dom,\n            components: structure.components,\n            eventOrder: toolbarButtonEventOrder,\n            buttonBehaviours: {\n                ...derive$1([\n                    config('toolbar-button-events', [\n                        onToolbarButtonExecute({\n                            onAction: spec.onAction,\n                            getApi: specialisation.getApi\n                        }),\n                        onControlAttached(specialisation, editorOffCell),\n                        onControlDetached(specialisation, editorOffCell)\n                    ]),\n                    ...(spec.tooltip.map((t) => Tooltipping.config(providersBackstage.tooltips.getConfig({\n                        tooltipText: providersBackstage.translate(t) + spec.shortcut.map((shortcut) => ` (${convertText(shortcut)})`).getOr(''),\n                    })))).toArray(),\n                    // Enable toolbar buttons by default\n                    DisablingConfigs.toolbarButton(() => !spec.enabled || providersBackstage.checkUiComponentContext(spec.context).shouldDisable),\n                    toggleOnReceive(() => providersBackstage.checkUiComponentContext(spec.context))\n                ].concat(specialisation.toolbarButtonBehaviours)),\n                // Here we add the commonButtonDisplayEvent behaviour from the structure so we can listen\n                // to updateMenuIcon and updateMenuText events and run the defined callbacks as they are\n                // defined in the renderCommonStructure function and fix the size of the button onAttached.\n                [commonButtonDisplayEvent]: structure.buttonBehaviours?.[commonButtonDisplayEvent],\n            }\n        });\n    };\n    const renderToolbarButton = (spec, providersBackstage, btnName) => renderToolbarButtonWith(spec, providersBackstage, [], btnName);\n    const renderToolbarButtonWith = (spec, providersBackstage, bonusEvents, btnName) => renderCommonToolbarButton(spec, {\n        toolbarButtonBehaviours: (bonusEvents.length > 0 ? [\n            // TODO: May have to pass through eventOrder if events start clashing\n            config('toolbarButtonWith', bonusEvents)\n        ] : []),\n        getApi: getButtonApi,\n        onSetup: spec.onSetup\n    }, providersBackstage, btnName);\n    const renderToolbarToggleButton = (spec, providersBackstage, btnName) => renderToolbarToggleButtonWith(spec, providersBackstage, [], btnName);\n    const renderToolbarToggleButtonWith = (spec, providersBackstage, bonusEvents, btnName) => renderCommonToolbarButton(spec, {\n        toolbarButtonBehaviours: [\n            Replacing.config({}),\n            Toggling.config({ toggleClass: \"tox-tbtn--enabled\" /* ToolbarButtonClasses.Ticked */, aria: { mode: 'pressed' }, toggleOnExecute: false })\n        ].concat(bonusEvents.length > 0 ? [\n            // TODO: May have to pass through eventOrder if events start clashing\n            config('toolbarToggleButtonWith', bonusEvents)\n        ] : []),\n        getApi: getToggleApi,\n        onSetup: spec.onSetup\n    }, providersBackstage, btnName);\n    const fetchChoices = (getApi, spec, providersBackstage) => (comp) => Future.nu((callback) => spec.fetch(callback))\n        .map((items) => Optional.from(createTieredDataFrom(deepMerge(createPartialChoiceMenu(generate$6('menu-value'), items, (value) => {\n        spec.onItemAction(getApi(comp), value);\n    }, spec.columns, spec.presets, ItemResponse$1.CLOSE_ON_EXECUTE, spec.select.getOr(never), providersBackstage), {\n        movement: deriveMenuMovement(spec.columns, spec.presets),\n        menuBehaviours: SimpleBehaviours.unnamedEvents(spec.columns !== 'auto' ? [] : [\n            runOnAttached((comp, _se) => {\n                detectSize(comp, 4, classForPreset(spec.presets)).each(({ numRows, numColumns }) => {\n                    Keying.setGridSize(comp, numRows, numColumns);\n                });\n            })\n        ])\n    }))));\n    const makeSplitButtonApi = (tooltipString, sharedBackstage, spec) => (component) => {\n        const system = component.getSystem();\n        const element = component.element;\n        const getComponents = () => {\n            const isChevron = has(element, 'tox-split-button__chevron');\n            const mainOpt = isChevron ?\n                prevSibling(element).bind((el) => system.getByDom(el).toOptional()) :\n                Optional.some(component);\n            const chevronOpt = isChevron ?\n                Optional.some(component) :\n                nextSibling(element).bind((el) => system.getByDom(el).toOptional().filter((comp) => has(comp.element, 'tox-split-button__chevron')));\n            return { mainOpt, chevronOpt };\n        };\n        const applyBoth = (f) => {\n            const { mainOpt, chevronOpt } = getComponents();\n            mainOpt.each(f);\n            chevronOpt.each(f);\n        };\n        return {\n            isEnabled: () => {\n                const { mainOpt } = getComponents();\n                return mainOpt.exists((c) => !Disabling.isDisabled(c));\n            },\n            setEnabled: (state) => applyBoth((c) => Disabling.set(c, !state)),\n            setText: (text) => {\n                const { mainOpt } = getComponents();\n                mainOpt.each((c) => emitWith(c, updateMenuText, { text }));\n            },\n            setIcon: (icon) => {\n                const { mainOpt } = getComponents();\n                mainOpt.each((c) => emitWith(c, updateMenuIcon, { icon }));\n            },\n            setIconFill: (id, value) => applyBoth((c) => {\n                descendant(c.element, `svg path[class=\"${id}\"], rect[class=\"${id}\"]`).each((underlinePath) => {\n                    set$9(underlinePath, 'fill', value);\n                });\n            }),\n            isActive: () => {\n                const { mainOpt } = getComponents();\n                return mainOpt.exists((c) => Toggling.isOn(c));\n            },\n            setActive: (state) => {\n                const { mainOpt } = getComponents();\n                mainOpt.each((c) => Toggling.set(c, state));\n            },\n            setTooltip: (tooltip) => {\n                tooltipString.set(tooltip);\n                const { mainOpt, chevronOpt } = getComponents();\n                mainOpt.each((c) => set$9(c.element, 'aria-label', sharedBackstage.providers.translate(tooltip)));\n                // For chevron, use the explicit chevronTooltip if provided, otherwise fall back to default behavior\n                const chevronTooltipText = spec.chevronTooltip\n                    .map((chevronTooltip) => sharedBackstage.providers.translate(chevronTooltip))\n                    .getOr(sharedBackstage.providers.translate(tooltip));\n                chevronOpt.each((c) => set$9(c.element, 'aria-label', chevronTooltipText));\n            }\n        };\n    };\n    const renderSplitButton = (spec, sharedBackstage, btnName) => {\n        const editorOffCell = Cell(noop);\n        const tooltipString = Cell(spec.tooltip.getOr(''));\n        const getApi = makeSplitButtonApi(tooltipString, sharedBackstage, spec);\n        const menuId = generate$6('tox-split-menu');\n        const expandedCell = Cell(false);\n        const getAriaAttributes = () => ({\n            'aria-haspopup': 'menu',\n            'aria-expanded': String(expandedCell.get()),\n            'aria-controls': menuId\n        });\n        // Helper to get ARIA label for the main button\n        const getMainButtonAriaLabel = () => {\n            return spec.tooltip.map((tooltip) => sharedBackstage.providers.translate(tooltip))\n                .getOr(sharedBackstage.providers.translate('Text color'));\n        };\n        // Helper to get ARIA label and tooltip for the chevron/dropdown button\n        const getChevronTooltip = () => {\n            return spec.chevronTooltip\n                .map((tooltip) => sharedBackstage.providers.translate(tooltip))\n                .getOrThunk(() => {\n                const mainLabel = getMainButtonAriaLabel();\n                return sharedBackstage.providers.translate(['{0} menu', mainLabel]);\n            });\n        };\n        const updateAriaExpanded = (expanded, comp) => {\n            expandedCell.set(expanded);\n            set$9(comp.element, 'aria-expanded', String(expanded));\n        };\n        const arrow = Dropdown.sketch({\n            dom: {\n                tag: 'button',\n                classes: [\"tox-tbtn\" /* ToolbarButtonClasses.Button */, 'tox-split-button__chevron'],\n                innerHtml: get('chevron-down', sharedBackstage.providers.icons),\n                attributes: {\n                    'aria-label': getChevronTooltip(),\n                    ...(isNonNullable(btnName) ? { 'data-mce-name': btnName + '-chevron' } : {}),\n                    ...getAriaAttributes()\n                }\n            },\n            components: [],\n            toggleClass: \"tox-tbtn--enabled\" /* ToolbarButtonClasses.Ticked */,\n            dropdownBehaviours: derive$1([\n                config('split-dropdown-events', [\n                    runOnAttached((comp, _se) => forceInitialSize(comp)),\n                    onControlAttached({ getApi, onSetup: spec.onSetup }, editorOffCell),\n                    run$1('alloy-dropdown-open', (comp) => updateAriaExpanded(true, comp)),\n                    run$1('alloy-dropdown-close', (comp) => updateAriaExpanded(false, comp)),\n                ]),\n                DisablingConfigs.toolbarButton(() => sharedBackstage.providers.checkUiComponentContext(spec.context).shouldDisable),\n                toggleOnReceive(() => sharedBackstage.providers.checkUiComponentContext(spec.context)),\n                Unselecting.config({}),\n                Tooltipping.config(sharedBackstage.providers.tooltips.getConfig({\n                    tooltipText: getChevronTooltip(),\n                    onShow: (comp) => {\n                        if (tooltipString.get() !== spec.tooltip.getOr('')) {\n                            const chevronTooltipText = spec.chevronTooltip\n                                .map((chevronTooltip) => sharedBackstage.providers.translate(chevronTooltip))\n                                .getOr(`${sharedBackstage.providers.translate(tooltipString.get())} menu`);\n                            Tooltipping.setComponents(comp, sharedBackstage.providers.tooltips.getComponents({ tooltipText: chevronTooltipText }));\n                        }\n                    }\n                }))\n            ]),\n            lazySink: sharedBackstage.getSink,\n            fetch: fetchChoices(getApi, spec, sharedBackstage.providers),\n            getHotspot: (comp) => prevSibling(comp.element).bind((el) => comp.getSystem().getByDom(el).toOptional()),\n            onOpen: (_anchor, _comp, menu) => {\n                Highlighting.highlightBy(menu, (item) => has(item.element, 'tox-collection__item--active'));\n                Highlighting.getHighlighted(menu).each(Keying.focusIn);\n            },\n            parts: {\n                menu: {\n                    ...part(false, spec.columns, spec.presets),\n                    dom: {\n                        ...part(false, spec.columns, spec.presets).dom,\n                        tag: 'div',\n                        attributes: {\n                            id: menuId\n                        }\n                    }\n                }\n            }\n        });\n        const structure = renderCommonStructure(spec.icon, spec.text, Optional.none(), Optional.some([\n            Toggling.config({\n                toggleClass: \"tox-tbtn--enabled\" /* ToolbarButtonClasses.Ticked */,\n                aria: spec.presets === 'color' ? { mode: 'none' } : { mode: 'pressed' },\n                toggleOnExecute: false\n            }),\n            ...(spec.tooltip.isSome() ? [\n                Tooltipping.config(sharedBackstage.providers.tooltips.getConfig({\n                    tooltipText: sharedBackstage.providers.translate(spec.tooltip.getOr('')),\n                    onShow: (comp) => {\n                        if (tooltipString.get() !== spec.tooltip.getOr('')) {\n                            const translated = sharedBackstage.providers.translate(tooltipString.get());\n                            Tooltipping.setComponents(comp, sharedBackstage.providers.tooltips.getComponents({ tooltipText: translated }));\n                        }\n                    }\n                }))\n            ] : [])\n        ]), sharedBackstage.providers, spec.context, btnName);\n        const mainButton = Button.sketch({\n            dom: {\n                ...structure.dom,\n                classes: [\n                    \"tox-tbtn\" /* ToolbarButtonClasses.Button */,\n                    'tox-split-button__main'\n                ].concat(spec.text.isSome() ? [\"tox-tbtn--select\" /* ToolbarButtonClasses.MatchWidth */] : []),\n                attributes: {\n                    'aria-label': getMainButtonAriaLabel(),\n                    ...(isNonNullable(btnName) ? { 'data-mce-name': btnName } : {})\n                }\n            },\n            components: structure.components,\n            eventOrder: structure.eventOrder,\n            buttonBehaviours: structure.buttonBehaviours,\n            action: (button) => {\n                if (spec.onAction) {\n                    const api = getApi(button);\n                    if (api.isEnabled()) {\n                        spec.onAction(api);\n                    }\n                }\n            }\n        });\n        return [mainButton, arrow];\n    };\n\n    const contextFormInputSelector = '.tox-toolbar-slider__input,.tox-toolbar-textfield';\n    const focusIn = (contextbar) => {\n        InlineView.getContent(contextbar).each((comp) => {\n            descendant(comp.element, contextFormInputSelector).fold(() => Keying.focusIn(comp), focus$4);\n        });\n    };\n    // TODO: Is this really the best way to move focus out of the input when it gets disabled #TINY-11527\n    const focusParent = (comp) => search(comp.element).each((focus) => {\n        ancestor$1(focus, '[tabindex=\"-1\"]').each((parent) => {\n            focus$4(parent);\n        });\n    });\n\n    const forwardSlideEvent = generate$6('forward-slide');\n    const backSlideEvent = generate$6('backward-slide');\n    const changeSlideEvent = generate$6('change-slide-event');\n    const resizingClass = 'tox-pop--resizing';\n    const renderContextToolbar = (spec) => {\n        const stack = Cell([]);\n        const sketch = InlineView.sketch({\n            dom: {\n                tag: 'div',\n                classes: ['tox-pop']\n            },\n            fireDismissalEventInstead: {\n                event: 'doNotDismissYet'\n            },\n            onShow: (comp) => {\n                stack.set([]);\n                InlineView.getContent(comp).each((c) => {\n                    remove$6(c.element, 'visibility');\n                });\n                remove$3(comp.element, resizingClass);\n                remove$6(comp.element, 'width');\n            },\n            onHide: () => {\n                stack.set([]);\n                spec.onHide();\n            },\n            inlineBehaviours: derive$1([\n                config('context-toolbar-events', [\n                    runOnSource(transitionend(), (comp, se) => {\n                        if (se.event.raw.propertyName === 'width') {\n                            remove$3(comp.element, resizingClass);\n                            remove$6(comp.element, 'width');\n                        }\n                    }),\n                    run$1(changeSlideEvent, (comp, se) => {\n                        const elem = comp.element;\n                        // If it was partially through a slide, clear that and measure afresh\n                        remove$6(elem, 'width');\n                        const currentWidth = get$c(elem);\n                        const hadFocus = search(comp.element).isSome();\n                        // Remove these so that we can property measure the width of the context form content\n                        remove$6(elem, 'left');\n                        remove$6(elem, 'right');\n                        remove$6(elem, 'max-width');\n                        InlineView.setContent(comp, se.event.contents);\n                        add$2(elem, resizingClass);\n                        const newWidth = get$c(elem);\n                        // Reposition without transition to avoid it from being animated from previous position\n                        set$7(elem, 'transition', 'none');\n                        InlineView.reposition(comp);\n                        remove$6(elem, 'transition');\n                        set$7(elem, 'width', currentWidth + 'px');\n                        se.event.focus.fold(() => {\n                            if (hadFocus) {\n                                focusIn(comp);\n                            }\n                        }, (f) => {\n                            active$1(getRootNode(comp.element)).fold(() => focus$4(f), (active) => {\n                                // We need this extra check since if the focus is aleady on the iframe we don't want to call focus on it again since that closes the context toolbar\n                                if (!eq(active, f)) {\n                                    spec.focusElement(f);\n                                }\n                            });\n                        });\n                        setTimeout(() => {\n                            set$7(comp.element, 'width', newWidth + 'px');\n                        }, 0);\n                    }),\n                    run$1(forwardSlideEvent, (comp, se) => {\n                        InlineView.getContent(comp).each((oldContents) => {\n                            stack.set(stack.get().concat([\n                                {\n                                    bar: oldContents,\n                                    focus: active$1(getRootNode(comp.element))\n                                }\n                            ]));\n                        });\n                        emitWith(comp, changeSlideEvent, {\n                            contents: se.event.forwardContents,\n                            focus: Optional.none()\n                        });\n                    }),\n                    run$1(backSlideEvent, (comp, _se) => {\n                        spec.onBack();\n                        last$1(stack.get()).each((last) => {\n                            stack.set(stack.get().slice(0, stack.get().length - 1));\n                            emitWith(comp, changeSlideEvent, {\n                                // Because we are using premade, we should have access to the same element\n                                // to give focus (although it isn't working)\n                                contents: premade(last.bar),\n                                focus: last.focus\n                            });\n                        });\n                    })\n                ]),\n                Keying.config({\n                    mode: 'special',\n                    onEscape: (comp) => last$1(stack.get()).fold(() => \n                    // Escape just focuses the content. It no longer closes the toolbar.\n                    spec.onEscape(), (_) => {\n                        emit(comp, backSlideEvent);\n                        return Optional.some(true);\n                    })\n                })\n            ]),\n            lazySink: () => Result.value(spec.sink)\n        });\n        return {\n            sketch,\n            inSubtoolbar: () => stack.get().length > 0\n        };\n    };\n\n    const createNavigateBackButton = (editor, backstage) => {\n        const bridged = getOrDie(createToolbarButton({\n            type: 'button',\n            icon: 'chevron-left',\n            tooltip: 'Back',\n            onAction: noop\n        }));\n        return renderToolbarButtonWith(bridged, backstage.shared.providers, [\n            run$1(internalToolbarButtonExecute, (comp) => {\n                emit(comp, backSlideEvent);\n            })\n        ]);\n    };\n\n    const makeTooltipText = (editor, labelWithPlaceholder, value) => isEmpty(value) ? editor.translate(labelWithPlaceholder) : editor.translate([labelWithPlaceholder, editor.translate(value)]);\n\n    const generateSelectItems = (backstage, spec) => {\n        const generateItem = (rawItem, response, invalid, value) => {\n            const translatedText = backstage.shared.providers.translate(rawItem.title);\n            if (rawItem.type === 'separator') {\n                return Optional.some({\n                    type: 'separator',\n                    text: translatedText\n                });\n            }\n            else if (rawItem.type === 'submenu') {\n                const items = bind$3(rawItem.getStyleItems(), (si) => validate(si, response, value));\n                if (response === 0 /* IrrelevantStyleItemResponse.Hide */ && items.length <= 0) {\n                    return Optional.none();\n                }\n                else {\n                    return Optional.some({\n                        type: 'nestedmenuitem',\n                        text: translatedText,\n                        enabled: items.length > 0,\n                        getSubmenuItems: () => bind$3(rawItem.getStyleItems(), (si) => validate(si, response, value))\n                    });\n                }\n            }\n            else {\n                return Optional.some({\n                    // ONLY TOGGLEMENUITEMS HANDLE STYLE META.\n                    // See ToggleMenuItem and ItemStructure for how it's handled.\n                    // If this type ever changes, we'll need to change that too\n                    type: 'togglemenuitem',\n                    text: translatedText,\n                    icon: rawItem.icon,\n                    active: rawItem.isSelected(value),\n                    enabled: !invalid,\n                    onAction: spec.onAction(rawItem),\n                    ...rawItem.getStylePreview().fold(() => ({}), (preview) => ({ meta: { style: preview } }))\n                });\n            }\n        };\n        const validate = (item, response, value) => {\n            const invalid = item.type === 'formatter' && spec.isInvalid(item);\n            // If we are making them disappear based on some setting\n            if (response === 0 /* IrrelevantStyleItemResponse.Hide */) {\n                return invalid ? [] : generateItem(item, response, false, value).toArray();\n            }\n            else {\n                return generateItem(item, response, invalid, value).toArray();\n            }\n        };\n        const validateItems = (preItems) => {\n            const value = spec.getCurrentValue();\n            const response = spec.shouldHide ? 0 /* IrrelevantStyleItemResponse.Hide */ : 1 /* IrrelevantStyleItemResponse.Disable */;\n            return bind$3(preItems, (item) => validate(item, response, value));\n        };\n        const getFetch = (backstage, getStyleItems) => (comp, callback) => {\n            const preItems = getStyleItems();\n            const items = validateItems(preItems);\n            const menu = build(items, ItemResponse$1.CLOSE_ON_EXECUTE, backstage, {\n                isHorizontalMenu: false,\n                search: Optional.none()\n            });\n            callback(menu);\n        };\n        return {\n            validateItems,\n            getFetch\n        };\n    };\n    const createMenuItems = (backstage, spec) => {\n        const dataset = spec.dataset; // needs to be a var for tsc to understand the ternary\n        const getStyleItems = dataset.type === 'basic' ?\n            () => map$2(dataset.data, (d) => processBasic(d, spec.isSelectedFor, spec.getPreviewFor)) :\n            dataset.getData;\n        return {\n            items: generateSelectItems(backstage, spec),\n            getStyleItems\n        };\n    };\n    const createSelectButton = (editor, backstage, spec, getTooltip, textUpdateEventName, btnName) => {\n        const { items, getStyleItems } = createMenuItems(backstage, spec);\n        const tooltipString = Cell(spec.tooltip);\n        const getApi = (comp) => ({\n            getComponent: constant$1(comp),\n            setTooltip: (tooltip) => {\n                const translatedTooltip = backstage.shared.providers.translate(tooltip);\n                set$9(comp.element, 'aria-label', translatedTooltip);\n                tooltipString.set(tooltip);\n            }\n        });\n        // Set the initial text when the component is attached and then update on node changes\n        const onSetup = (api) => {\n            const handler = (e) => api.setTooltip(makeTooltipText(editor, getTooltip(e.value), e.value));\n            editor.on(textUpdateEventName, handler);\n            return composeUnbinders(onSetupEvent(editor, 'NodeChange', (api) => {\n                const comp = api.getComponent();\n                spec.updateText(comp);\n                Disabling.set(api.getComponent(), (!editor.selection.isEditable() || getStyleItems().length === 0));\n            })(api), () => editor.off(textUpdateEventName, handler));\n        };\n        return renderCommonDropdown({\n            context: 'mode:design',\n            text: spec.icon.isSome() ? Optional.none() : spec.text,\n            icon: spec.icon,\n            ariaLabel: Optional.some(spec.tooltip),\n            tooltip: Optional.none(), // TINY-10474 - Using own tooltip config\n            role: Optional.none(),\n            fetch: items.getFetch(backstage, getStyleItems),\n            onSetup,\n            getApi,\n            columns: 1,\n            presets: 'normal',\n            classes: spec.icon.isSome() ? [] : ['bespoke'],\n            dropdownBehaviours: [\n                Tooltipping.config({\n                    ...backstage.shared.providers.tooltips.getConfig({\n                        tooltipText: backstage.shared.providers.translate(spec.tooltip),\n                        onShow: (comp) => {\n                            if (spec.tooltip !== tooltipString.get()) {\n                                const translatedTooltip = backstage.shared.providers.translate(tooltipString.get());\n                                Tooltipping.setComponents(comp, backstage.shared.providers.tooltips.getComponents({ tooltipText: translatedTooltip }));\n                            }\n                        }\n                    }),\n                })\n            ]\n        }, \"tox-tbtn\" /* ToolbarButtonClasses.Button */, backstage.shared, btnName);\n    };\n\n    const process = (rawFormats) => map$2(rawFormats, (item) => {\n        let title = item, format = item;\n        // Allow text=value block formats\n        const values = item.split('=');\n        if (values.length > 1) {\n            title = values[0];\n            format = values[1];\n        }\n        return { title, format };\n    });\n    const buildBasicStaticDataset = (data) => ({\n        type: 'basic',\n        data\n    });\n    var Delimiter;\n    (function (Delimiter) {\n        Delimiter[Delimiter[\"SemiColon\"] = 0] = \"SemiColon\";\n        Delimiter[Delimiter[\"Space\"] = 1] = \"Space\";\n    })(Delimiter || (Delimiter = {}));\n    const split = (rawFormats, delimiter) => {\n        if (delimiter === Delimiter.SemiColon) {\n            return rawFormats.replace(/;$/, '').split(';');\n        }\n        else {\n            return rawFormats.split(' ');\n        }\n    };\n    const buildBasicSettingsDataset = (editor, settingName, delimiter) => {\n        // eslint-disable-next-line @tinymce/no-direct-editor-options\n        const rawFormats = editor.options.get(settingName);\n        const data = process(split(rawFormats, delimiter));\n        return {\n            type: 'basic',\n            data\n        };\n    };\n\n    const menuTitle$4 = 'Align';\n    const getTooltipPlaceholder$4 = constant$1('Alignment {0}');\n    const fallbackAlignment = 'left';\n    const alignMenuItems = [\n        { title: 'Left', icon: 'align-left', format: 'alignleft', command: 'JustifyLeft' },\n        { title: 'Center', icon: 'align-center', format: 'aligncenter', command: 'JustifyCenter' },\n        { title: 'Right', icon: 'align-right', format: 'alignright', command: 'JustifyRight' },\n        { title: 'Justify', icon: 'align-justify', format: 'alignjustify', command: 'JustifyFull' }\n    ];\n    const getSpec$4 = (editor) => {\n        const getMatchingValue = () => find$5(alignMenuItems, (item) => editor.formatter.match(item.format));\n        const isSelectedFor = (format) => () => editor.formatter.match(format);\n        const getPreviewFor = (_format) => Optional.none;\n        const updateSelectMenuIcon = (comp) => {\n            const match = getMatchingValue();\n            const alignment = match.fold(constant$1(fallbackAlignment), (item) => item.title.toLowerCase());\n            emitWith(comp, updateMenuIcon, {\n                icon: `align-${alignment}`\n            });\n            fireAlignTextUpdate(editor, { value: alignment });\n        };\n        const dataset = buildBasicStaticDataset(alignMenuItems);\n        const onAction = (rawItem) => () => find$5(alignMenuItems, (item) => item.format === rawItem.format)\n            .each((item) => editor.execCommand(item.command));\n        return {\n            tooltip: makeTooltipText(editor, getTooltipPlaceholder$4(), fallbackAlignment),\n            text: Optional.none(),\n            icon: Optional.some('align-left'),\n            isSelectedFor,\n            getCurrentValue: Optional.none,\n            getPreviewFor,\n            onAction,\n            updateText: updateSelectMenuIcon,\n            dataset,\n            shouldHide: false,\n            isInvalid: (item) => !editor.formatter.canApply(item.format)\n        };\n    };\n    const createAlignButton = (editor, backstage) => createSelectButton(editor, backstage, getSpec$4(editor), getTooltipPlaceholder$4, 'AlignTextUpdate', 'align');\n    const createAlignMenu = (editor, backstage) => {\n        const menuItems = createMenuItems(backstage, getSpec$4(editor));\n        editor.ui.registry.addNestedMenuItem('align', {\n            text: backstage.shared.providers.translate(menuTitle$4),\n            onSetup: onSetupEditableToggle(editor),\n            getSubmenuItems: () => menuItems.items.validateItems(menuItems.getStyleItems())\n        });\n    };\n\n    const findNearest = (editor, getStyles) => {\n        const styles = getStyles();\n        const formats = map$2(styles, (style) => style.format);\n        return Optional.from(editor.formatter.closest(formats)).bind((fmt) => find$5(styles, (data) => data.format === fmt));\n    };\n\n    const menuTitle$3 = 'Blocks';\n    const getTooltipPlaceholder$3 = constant$1('Block {0}');\n    const fallbackFormat = 'Paragraph';\n    const getSpec$3 = (editor) => {\n        const isSelectedFor = (format) => () => editor.formatter.match(format);\n        const getPreviewFor = (format) => () => {\n            const fmt = editor.formatter.get(format);\n            if (fmt) {\n                return Optional.some({\n                    tag: fmt.length > 0 ? fmt[0].inline || fmt[0].block || 'div' : 'div',\n                    styles: editor.dom.parseStyle(editor.formatter.getCssText(format))\n                });\n            }\n            else {\n                return Optional.none();\n            }\n        };\n        const updateSelectMenuText = (comp) => {\n            const detectedFormat = findNearest(editor, () => dataset.data);\n            const text = detectedFormat.fold(constant$1(fallbackFormat), (fmt) => fmt.title);\n            emitWith(comp, updateMenuText, {\n                text\n            });\n            fireBlocksTextUpdate(editor, { value: text });\n        };\n        const dataset = buildBasicSettingsDataset(editor, 'block_formats', Delimiter.SemiColon);\n        return {\n            tooltip: makeTooltipText(editor, getTooltipPlaceholder$3(), fallbackFormat),\n            text: Optional.some(fallbackFormat),\n            icon: Optional.none(),\n            isSelectedFor,\n            getCurrentValue: Optional.none,\n            getPreviewFor,\n            onAction: onActionToggleFormat$1(editor),\n            updateText: updateSelectMenuText,\n            dataset,\n            shouldHide: false,\n            isInvalid: (item) => !editor.formatter.canApply(item.format)\n        };\n    };\n    const createBlocksButton = (editor, backstage) => createSelectButton(editor, backstage, getSpec$3(editor), getTooltipPlaceholder$3, 'BlocksTextUpdate', 'blocks');\n    // FIX: Test this!\n    const createBlocksMenu = (editor, backstage) => {\n        const menuItems = createMenuItems(backstage, getSpec$3(editor));\n        editor.ui.registry.addNestedMenuItem('blocks', {\n            text: menuTitle$3,\n            onSetup: onSetupEditableToggle(editor),\n            getSubmenuItems: () => menuItems.items.validateItems(menuItems.getStyleItems())\n        });\n    };\n\n    const menuTitle$2 = 'Fonts';\n    const getTooltipPlaceholder$2 = constant$1('Font {0}');\n    const systemFont = 'System Font';\n    // A list of fonts that must be in a font family for the font to be recognised as the system stack\n    // Note: Don't include 'BlinkMacSystemFont', as Chrome on Mac converts it to different names\n    // The system font stack will be similar to the following. (Note: each has minor variants)\n    // Oxide: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;\n    // Bootstrap: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";\n    // Wordpress: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Oxygen-Sans, Ubuntu, Cantarell, \"Helvetica Neue\", sans-serif;\n    const systemStackFonts = ['-apple-system', 'Segoe UI', 'Roboto', 'Helvetica Neue', 'sans-serif'];\n    // Split the fonts into an array and strip away any start/end quotes\n    const splitFonts = (fontFamily) => {\n        const fonts = fontFamily.split(/\\s*,\\s*/);\n        return map$2(fonts, (font) => font.replace(/^['\"]+|['\"]+$/g, ''));\n    };\n    const matchesStack = (fonts, stack) => stack.length > 0 && forall(stack, (font) => fonts.indexOf(font.toLowerCase()) > -1);\n    const isSystemFontStack = (fontFamily, userStack) => {\n        if (fontFamily.indexOf('-apple-system') === 0 || userStack.length > 0) {\n            const fonts = splitFonts(fontFamily.toLowerCase());\n            return matchesStack(fonts, systemStackFonts) || matchesStack(fonts, userStack);\n        }\n        else {\n            return false;\n        }\n    };\n    const getSpec$2 = (editor) => {\n        const getMatchingValue = () => {\n            const getFirstFont = (fontFamily) => fontFamily ? splitFonts(fontFamily)[0] : '';\n            const fontFamily = editor.queryCommandValue('FontName');\n            const items = dataset.data;\n            const font = fontFamily ? fontFamily.toLowerCase() : '';\n            const userStack = getDefaultFontStack(editor);\n            const matchOpt = find$5(items, (item) => {\n                const format = item.format;\n                return (format.toLowerCase() === font) || (getFirstFont(format).toLowerCase() === getFirstFont(font).toLowerCase());\n            }).orThunk(() => {\n                return someIf(isSystemFontStack(font, userStack), {\n                    title: systemFont,\n                    format: font\n                });\n            });\n            return { matchOpt, font: fontFamily };\n        };\n        const isSelectedFor = (item) => (valueOpt) => valueOpt.exists((value) => value.format === item);\n        const getCurrentValue = () => {\n            const { matchOpt } = getMatchingValue();\n            return matchOpt;\n        };\n        const getPreviewFor = (item) => () => Optional.some({\n            tag: 'div',\n            styles: item.indexOf('dings') === -1 ? { 'font-family': item } : {}\n        });\n        const onAction = (rawItem) => () => {\n            editor.undoManager.transact(() => {\n                editor.focus();\n                editor.execCommand('FontName', false, rawItem.format);\n            });\n        };\n        const updateSelectMenuText = (comp) => {\n            const { matchOpt, font } = getMatchingValue();\n            const text = matchOpt.fold(constant$1(font), (item) => item.title);\n            emitWith(comp, updateMenuText, {\n                text\n            });\n            fireFontFamilyTextUpdate(editor, { value: text });\n        };\n        const dataset = buildBasicSettingsDataset(editor, 'font_family_formats', Delimiter.SemiColon);\n        return {\n            tooltip: makeTooltipText(editor, getTooltipPlaceholder$2(), systemFont),\n            text: Optional.some(systemFont),\n            icon: Optional.none(),\n            isSelectedFor,\n            getCurrentValue,\n            getPreviewFor,\n            onAction,\n            updateText: updateSelectMenuText,\n            dataset,\n            shouldHide: false,\n            isInvalid: never\n        };\n    };\n    const createFontFamilyButton = (editor, backstage) => createSelectButton(editor, backstage, getSpec$2(editor), getTooltipPlaceholder$2, 'FontFamilyTextUpdate', 'fontfamily');\n    // TODO: Test this!\n    const createFontFamilyMenu = (editor, backstage) => {\n        const menuItems = createMenuItems(backstage, getSpec$2(editor));\n        editor.ui.registry.addNestedMenuItem('fontfamily', {\n            text: backstage.shared.providers.translate(menuTitle$2),\n            onSetup: onSetupEditableToggle(editor),\n            getSubmenuItems: () => menuItems.items.validateItems(menuItems.getStyleItems())\n        });\n    };\n\n    var global$1 = tinymce.util.Tools.resolve('tinymce.util.VK');\n\n    const createBespokeNumberInput = (editor, backstage, spec, btnName) => {\n        let currentComp = Optional.none();\n        const getValueFromCurrentComp = (comp) => comp.map((alloyComp) => Representing.getValue(alloyComp)).getOr('');\n        const onSetup = onSetupEvent(editor, 'NodeChange SwitchMode DisabledStateChange', (api) => {\n            const comp = api.getComponent();\n            currentComp = Optional.some(comp);\n            spec.updateInputValue(comp);\n            Disabling.set(comp, !editor.selection.isEditable() || isDisabled(editor));\n        });\n        const getApi = (comp) => ({ getComponent: constant$1(comp) });\n        const editorOffCell = Cell(noop);\n        const customEvents = generate$6('custom-number-input-events');\n        const changeValue = (f, fromInput, focusBack) => {\n            const text = getValueFromCurrentComp(currentComp);\n            const newValue = spec.getNewValue(text, f);\n            const lenghtDelta = text.length - `${newValue}`.length;\n            const oldStart = currentComp.map((comp) => comp.element.dom.selectionStart - lenghtDelta);\n            const oldEnd = currentComp.map((comp) => comp.element.dom.selectionEnd - lenghtDelta);\n            spec.onAction(newValue, focusBack);\n            currentComp.each((comp) => {\n                Representing.setValue(comp, newValue);\n                if (fromInput) {\n                    oldStart.each((oldStart) => comp.element.dom.selectionStart = oldStart);\n                    oldEnd.each((oldEnd) => comp.element.dom.selectionEnd = oldEnd);\n                }\n            });\n        };\n        const decrease = (fromInput, focusBack) => changeValue((n, s) => n - s, fromInput, focusBack);\n        const increase = (fromInput, focusBack) => changeValue((n, s) => n + s, fromInput, focusBack);\n        const goToParent = (comp) => parentElement(comp.element).fold(Optional.none, (parent) => {\n            focus$4(parent);\n            return Optional.some(true);\n        });\n        const focusInput = (comp) => {\n            if (hasFocus(comp.element)) {\n                firstChild(comp.element).each((input) => focus$4(input));\n                return Optional.some(true);\n            }\n            else {\n                return Optional.none();\n            }\n        };\n        const makeStepperButton = (action, title, tooltip, classes) => {\n            const editorOffCellStepButton = Cell(noop);\n            const translatedTooltip = backstage.shared.providers.translate(tooltip);\n            const altExecuting = generate$6('altExecuting');\n            const onSetup = onSetupEvent(editor, 'NodeChange SwitchMode DisabledStateChange', (api) => {\n                Disabling.set(api.getComponent(), !editor.selection.isEditable() || isDisabled(editor));\n            });\n            const onClick = (comp) => {\n                if (!Disabling.isDisabled(comp)) {\n                    action(true);\n                }\n            };\n            return Button.sketch({\n                dom: {\n                    tag: 'button',\n                    attributes: {\n                        'aria-label': translatedTooltip,\n                        'data-mce-name': title\n                    },\n                    classes: classes.concat(title)\n                },\n                components: [\n                    renderIconFromPack$1(title, backstage.shared.providers.icons)\n                ],\n                buttonBehaviours: derive$1([\n                    Disabling.config({}),\n                    Tooltipping.config(backstage.shared.providers.tooltips.getConfig({\n                        tooltipText: translatedTooltip\n                    })),\n                    config(altExecuting, [\n                        onControlAttached({ onSetup, getApi }, editorOffCellStepButton),\n                        onControlDetached({ getApi }, editorOffCellStepButton),\n                        run$1(keydown(), (comp, se) => {\n                            if (se.event.raw.keyCode === global$1.SPACEBAR || se.event.raw.keyCode === global$1.ENTER) {\n                                if (!Disabling.isDisabled(comp)) {\n                                    action(false);\n                                }\n                            }\n                        }),\n                        run$1(click(), onClick),\n                        run$1(touchend(), onClick)\n                    ])\n                ]),\n                eventOrder: {\n                    [keydown()]: [altExecuting, 'keying'],\n                    [click()]: [altExecuting, 'alloy.base.behaviour'],\n                    [touchend()]: [altExecuting, 'alloy.base.behaviour'],\n                    [attachedToDom()]: ['alloy.base.behaviour', altExecuting, 'tooltipping'],\n                    [detachedFromDom()]: [altExecuting, 'tooltipping']\n                }\n            });\n        };\n        const memMinus = record(makeStepperButton((focusBack) => decrease(false, focusBack), 'minus', 'Decrease font size', []));\n        const memPlus = record(makeStepperButton((focusBack) => increase(false, focusBack), 'plus', 'Increase font size', []));\n        const memInput = record({\n            dom: {\n                tag: 'div',\n                classes: ['tox-input-wrapper']\n            },\n            components: [\n                Input.sketch({\n                    inputBehaviours: derive$1([\n                        Disabling.config({}),\n                        config(customEvents, [\n                            onControlAttached({ onSetup, getApi }, editorOffCell),\n                            onControlDetached({ getApi }, editorOffCell)\n                        ]),\n                        config('input-update-display-text', [\n                            run$1(updateMenuText, (comp, se) => {\n                                Representing.setValue(comp, se.event.text);\n                            }),\n                            run$1(focusout(), (comp) => {\n                                spec.onAction(Representing.getValue(comp));\n                            }),\n                            run$1(change(), (comp) => {\n                                spec.onAction(Representing.getValue(comp));\n                            })\n                        ]),\n                        Keying.config({\n                            mode: 'special',\n                            onEnter: (_comp) => {\n                                changeValue(identity, true, true);\n                                return Optional.some(true);\n                            },\n                            onEscape: goToParent,\n                            onUp: (_comp) => {\n                                increase(true, false);\n                                return Optional.some(true);\n                            },\n                            onDown: (_comp) => {\n                                decrease(true, false);\n                                return Optional.some(true);\n                            },\n                            onLeft: (_comp, se) => {\n                                se.cut();\n                                return Optional.none();\n                            },\n                            onRight: (_comp, se) => {\n                                se.cut();\n                                return Optional.none();\n                            }\n                        })\n                    ])\n                })\n            ],\n            behaviours: derive$1([\n                Focusing.config({}),\n                Keying.config({\n                    mode: 'special',\n                    onEnter: focusInput,\n                    onSpace: focusInput,\n                    onEscape: goToParent\n                }),\n                config('input-wrapper-events', [\n                    run$1(mouseover(), (comp) => {\n                        each$1([memMinus, memPlus], (button) => {\n                            const buttonNode = SugarElement.fromDom(button.get(comp).element.dom);\n                            if (hasFocus(buttonNode)) {\n                                blur$1(buttonNode);\n                            }\n                        });\n                    })\n                ])\n            ])\n        });\n        return {\n            dom: {\n                tag: 'div',\n                classes: ['tox-number-input'],\n                attributes: {\n                    ...(isNonNullable(btnName) ? { 'data-mce-name': btnName } : {})\n                }\n            },\n            components: [\n                memMinus.asSpec(),\n                memInput.asSpec(),\n                memPlus.asSpec()\n            ],\n            behaviours: derive$1([\n                Focusing.config({}),\n                Keying.config({\n                    mode: 'flow',\n                    focusInside: FocusInsideModes.OnEnterOrSpaceMode,\n                    cycles: false,\n                    selector: 'button, .tox-input-wrapper',\n                    onEscape: (wrapperComp) => {\n                        if (hasFocus(wrapperComp.element)) {\n                            return Optional.none();\n                        }\n                        else {\n                            focus$4(wrapperComp.element);\n                            return Optional.some(true);\n                        }\n                    },\n                })\n            ])\n        };\n    };\n\n    const menuTitle$1 = 'Font sizes';\n    const getTooltipPlaceholder$1 = constant$1('Font size {0}');\n    const fallbackFontSize = '12pt';\n    // See https://websemantics.uk/articles/font-size-conversion/ for conversions\n    const legacyFontSizes = {\n        '8pt': '1',\n        '10pt': '2',\n        '12pt': '3',\n        '14pt': '4',\n        '18pt': '5',\n        '24pt': '6',\n        '36pt': '7'\n    };\n    // Note: 'xx-small', 'x-small' and 'large' are rounded up to nearest whole pt\n    const keywordFontSizes = {\n        'xx-small': '7pt',\n        'x-small': '8pt',\n        'small': '10pt',\n        'medium': '12pt',\n        'large': '14pt',\n        'x-large': '18pt',\n        'xx-large': '24pt'\n    };\n    const round = (number, precision) => {\n        const factor = Math.pow(10, precision);\n        return Math.round(number * factor) / factor;\n    };\n    const toPt = (fontSize, precision) => {\n        if (/[0-9.]+px$/.test(fontSize)) {\n            // Round to the nearest 0.5\n            return round(parseInt(fontSize, 10) * 72 / 96, precision || 0) + 'pt';\n        }\n        else {\n            return get$h(keywordFontSizes, fontSize).getOr(fontSize);\n        }\n    };\n    const toLegacy = (fontSize) => get$h(legacyFontSizes, fontSize).getOr('');\n    const getSpec$1 = (editor) => {\n        const getMatchingValue = () => {\n            let matchOpt = Optional.none();\n            const items = dataset.data;\n            const fontSize = editor.queryCommandValue('FontSize');\n            if (fontSize) {\n                // checking for three digits after decimal point, should be precise enough\n                for (let precision = 3; matchOpt.isNone() && precision >= 0; precision--) {\n                    const pt = toPt(fontSize, precision);\n                    const legacy = toLegacy(pt);\n                    matchOpt = find$5(items, (item) => item.format === fontSize || item.format === pt || item.format === legacy);\n                }\n            }\n            return { matchOpt, size: fontSize };\n        };\n        const isSelectedFor = (item) => (valueOpt) => valueOpt.exists((value) => value.format === item);\n        const getCurrentValue = () => {\n            const { matchOpt } = getMatchingValue();\n            return matchOpt;\n        };\n        const getPreviewFor = constant$1(Optional.none);\n        const onAction = (rawItem) => () => {\n            editor.undoManager.transact(() => {\n                editor.focus();\n                editor.execCommand('FontSize', false, rawItem.format);\n            });\n        };\n        const updateSelectMenuText = (comp) => {\n            const { matchOpt, size } = getMatchingValue();\n            const text = matchOpt.fold(constant$1(size), (match) => match.title);\n            emitWith(comp, updateMenuText, {\n                text\n            });\n            fireFontSizeTextUpdate(editor, { value: text });\n        };\n        const dataset = buildBasicSettingsDataset(editor, 'font_size_formats', Delimiter.Space);\n        return {\n            tooltip: makeTooltipText(editor, getTooltipPlaceholder$1(), fallbackFontSize),\n            text: Optional.some(fallbackFontSize),\n            icon: Optional.none(),\n            isSelectedFor,\n            getPreviewFor,\n            getCurrentValue,\n            onAction,\n            updateText: updateSelectMenuText,\n            dataset,\n            shouldHide: false,\n            isInvalid: never\n        };\n    };\n    const createFontSizeButton = (editor, backstage) => createSelectButton(editor, backstage, getSpec$1(editor), getTooltipPlaceholder$1, 'FontSizeTextUpdate', 'fontsize');\n    const getConfigFromUnit = (unit) => {\n        const baseConfig = { step: 1 };\n        const configs = {\n            em: { step: 0.1 },\n            cm: { step: 0.1 },\n            in: { step: 0.1 },\n            pc: { step: 0.1 },\n            ch: { step: 0.1 },\n            rem: { step: 0.1 }\n        };\n        return configs[unit] ?? baseConfig;\n    };\n    const defaultValue = 16;\n    const isValidValue = (value) => value >= 0;\n    const getNumberInputSpec = (editor) => {\n        const getCurrentValue = () => editor.queryCommandValue('FontSize');\n        const updateInputValue = (comp) => emitWith(comp, updateMenuText, {\n            text: getCurrentValue()\n        });\n        return {\n            updateInputValue,\n            onAction: (format, focusBack) => editor.execCommand('FontSize', false, format, { skip_focus: !focusBack }),\n            getNewValue: (text, updateFunction) => {\n                parse(text, ['unsupportedLength', 'empty']);\n                const currentValue = getCurrentValue();\n                const parsedText = parse(text, ['unsupportedLength', 'empty']).or(parse(currentValue, ['unsupportedLength', 'empty']));\n                const value = parsedText.map((res) => res.value).getOr(defaultValue);\n                const defaultUnit = getFontSizeInputDefaultUnit(editor);\n                const unit = parsedText.map((res) => res.unit).filter((u) => u !== '').getOr(defaultUnit);\n                const newValue = updateFunction(value, getConfigFromUnit(unit).step);\n                const res = `${isValidValue(newValue) ? newValue : value}${unit}`;\n                if (res !== currentValue) {\n                    fireFontSizeInputTextUpdate(editor, { value: res });\n                }\n                return res;\n            }\n        };\n    };\n    const createFontSizeInputButton = (editor, backstage) => createBespokeNumberInput(editor, backstage, getNumberInputSpec(editor), 'fontsizeinput');\n    // TODO: Test this!\n    const createFontSizeMenu = (editor, backstage) => {\n        const menuItems = createMenuItems(backstage, getSpec$1(editor));\n        editor.ui.registry.addNestedMenuItem('fontsize', {\n            text: menuTitle$1,\n            onSetup: onSetupEditableToggle(editor),\n            getSubmenuItems: () => menuItems.items.validateItems(menuItems.getStyleItems())\n        });\n    };\n\n    const menuTitle = 'Formats';\n    const getTooltipPlaceholder = (value) => isEmpty(value) ? 'Formats' : 'Format {0}';\n    const getSpec = (editor, dataset) => {\n        const fallbackFormat = 'Formats';\n        const isSelectedFor = (format) => () => editor.formatter.match(format);\n        const getPreviewFor = (format) => () => {\n            const fmt = editor.formatter.get(format);\n            return fmt !== undefined ? Optional.some({\n                tag: fmt.length > 0 ? fmt[0].inline || fmt[0].block || 'div' : 'div',\n                styles: editor.dom.parseStyle(editor.formatter.getCssText(format))\n            }) : Optional.none();\n        };\n        const updateSelectMenuText = (comp) => {\n            const getFormatItems = (fmt) => {\n                if (isNestedFormat(fmt)) {\n                    return bind$3(fmt.items, getFormatItems);\n                }\n                else if (isFormatReference(fmt)) {\n                    return [{ title: fmt.title, format: fmt.format }];\n                }\n                else {\n                    return [];\n                }\n            };\n            const flattenedItems = bind$3(getStyleFormats(editor), getFormatItems);\n            const detectedFormat = findNearest(editor, constant$1(flattenedItems));\n            const text = detectedFormat.fold(constant$1({\n                title: fallbackFormat,\n                tooltipLabel: ''\n            }), (fmt) => ({\n                title: fmt.title,\n                tooltipLabel: fmt.title\n            }));\n            emitWith(comp, updateMenuText, {\n                text: text.title\n            });\n            fireStylesTextUpdate(editor, { value: text.tooltipLabel });\n        };\n        return {\n            tooltip: makeTooltipText(editor, getTooltipPlaceholder(''), ''),\n            text: Optional.some(fallbackFormat),\n            icon: Optional.none(),\n            isSelectedFor,\n            getCurrentValue: Optional.none,\n            getPreviewFor,\n            onAction: onActionToggleFormat$1(editor),\n            updateText: updateSelectMenuText,\n            shouldHide: shouldAutoHideStyleFormats(editor),\n            isInvalid: (item) => !editor.formatter.canApply(item.format),\n            dataset\n        };\n    };\n    const createStylesButton = (editor, backstage) => {\n        const dataset = { type: 'advanced', ...backstage.styles };\n        return createSelectButton(editor, backstage, getSpec(editor, dataset), getTooltipPlaceholder, 'StylesTextUpdate', 'styles');\n    };\n    const createStylesMenu = (editor, backstage) => {\n        const dataset = { type: 'advanced', ...backstage.styles };\n        const menuItems = createMenuItems(backstage, getSpec(editor, dataset));\n        editor.ui.registry.addNestedMenuItem('styles', {\n            text: menuTitle,\n            onSetup: onSetupEditableToggle(editor, () => menuItems.getStyleItems().length > 0),\n            getSubmenuItems: () => menuItems.items.validateItems(menuItems.getStyleItems())\n        });\n    };\n\n    const defaultToolbar = [\n        {\n            name: 'history', items: ['undo', 'redo']\n        },\n        {\n            name: 'ai', items: ['tinymceai-chat', 'tinymceai-review', 'tinymceai-quickactions', 'aidialog', 'aishortcuts']\n        },\n        {\n            name: 'styles', items: ['styles']\n        },\n        {\n            name: 'formatting', items: ['bold', 'italic']\n        },\n        {\n            name: 'alignment', items: ['alignleft', 'aligncenter', 'alignright', 'alignjustify']\n        },\n        {\n            name: 'indentation', items: ['outdent', 'indent']\n        },\n        {\n            name: 'permanent pen', items: ['permanentpen']\n        },\n        {\n            name: 'comments', items: ['addcomment']\n        }\n    ];\n    const renderFromBridge = (bridgeBuilder, render) => (spec, backstage, editor, btnName) => {\n        const internal = bridgeBuilder(spec).mapError((errInfo) => formatError(errInfo)).getOrDie();\n        return render(internal, backstage, editor, btnName);\n    };\n    const types = {\n        button: renderFromBridge(createToolbarButton, (s, backstage, _, btnName) => renderToolbarButton(s, backstage.shared.providers, btnName)),\n        togglebutton: renderFromBridge(createToggleButton, (s, backstage, _, btnName) => renderToolbarToggleButton(s, backstage.shared.providers, btnName)),\n        menubutton: renderFromBridge(createMenuButton, (s, backstage, _, btnName) => renderMenuButton(s, \"tox-tbtn\" /* ToolbarButtonClasses.Button */, backstage, Optional.none(), false, btnName)),\n        splitbutton: renderFromBridge(createSplitButton, (s, backstage, _, btnName) => renderSplitButton(s, backstage.shared, btnName)),\n        grouptoolbarbutton: renderFromBridge(createGroupToolbarButton, (s, backstage, editor, btnName) => {\n            const buttons = editor.ui.registry.getAll().buttons;\n            const identify = (toolbar) => identifyButtons(editor, { buttons, toolbar, allowToolbarGroups: false }, backstage, Optional.none());\n            const attributes = {\n                [Attribute]: backstage.shared.header.isPositionedAtTop() ? AttributeValue.TopToBottom : AttributeValue.BottomToTop\n            };\n            switch (getToolbarMode(editor)) {\n                case ToolbarMode$1.floating:\n                    return renderFloatingToolbarButton(s, backstage, identify, attributes, btnName);\n                default:\n                    // TODO change this message and add a case when sliding is available\n                    throw new Error('Toolbar groups are only supported when using floating toolbar mode');\n            }\n        })\n    };\n    const extractFrom = (spec, backstage, editor, btnName) => get$h(types, spec.type).fold(() => {\n        // eslint-disable-next-line no-console\n        console.error('skipping button defined by', spec);\n        return Optional.none();\n    }, (render) => Optional.some(render(spec, backstage, editor, btnName)));\n    const bespokeButtons = {\n        styles: createStylesButton,\n        fontsize: createFontSizeButton,\n        fontsizeinput: createFontSizeInputButton,\n        fontfamily: createFontFamilyButton,\n        blocks: createBlocksButton,\n        align: createAlignButton,\n        navigateback: createNavigateBackButton\n    };\n    const removeUnusedDefaults = (buttons) => {\n        const filteredItemGroups = map$2(defaultToolbar, (group) => {\n            const items = filter$2(group.items, (subItem) => has$2(buttons, subItem) || has$2(bespokeButtons, subItem));\n            return {\n                name: group.name,\n                items\n            };\n        });\n        return filter$2(filteredItemGroups, (group) => group.items.length > 0);\n    };\n    const convertStringToolbar = (strToolbar) => {\n        const groupsStrings = strToolbar.split('|');\n        return map$2(groupsStrings, (g) => ({\n            items: g.trim().split(' ')\n        }));\n    };\n    const isToolbarGroupSettingArray = (toolbar) => isArrayOf(toolbar, (t) => (has$2(t, 'name') || has$2(t, 'label')) && has$2(t, 'items'));\n    // Toolbar settings\n    // false = disabled\n    // undefined or true = default\n    // string = enabled with specified buttons and groups\n    // string array = enabled with specified buttons and groups\n    // object array = enabled with specified buttons, groups and group titles\n    const createToolbar = (toolbarConfig) => {\n        const toolbar = toolbarConfig.toolbar;\n        const buttons = toolbarConfig.buttons;\n        if (toolbar === false) {\n            return [];\n        }\n        else if (toolbar === undefined || toolbar === true) {\n            return removeUnusedDefaults(buttons);\n        }\n        else if (isString(toolbar)) {\n            return convertStringToolbar(toolbar);\n        }\n        else if (isToolbarGroupSettingArray(toolbar)) {\n            return toolbar;\n        }\n        else {\n            // eslint-disable-next-line no-console\n            console.error('Toolbar type should be string, string[], boolean or ToolbarGroup[]');\n            return [];\n        }\n    };\n    const lookupButton = (editor, buttons, toolbarItem, allowToolbarGroups, backstage, prefixes) => get$h(buttons, toolbarItem.toLowerCase())\n        .orThunk(() => prefixes.bind((ps) => findMap(ps, (prefix) => get$h(buttons, prefix + toolbarItem.toLowerCase()))))\n        .fold(() => get$h(bespokeButtons, toolbarItem.toLowerCase()).map((r) => r(editor, backstage)), \n    // TODO: Add back after TINY-3232 is implemented\n    // .orThunk(() => {\n    //   console.error('No representation for toolbarItem: ' + toolbarItem);\n    //   return Optional.none();\n    // ),\n    (spec) => {\n        if (spec.type === 'grouptoolbarbutton' && !allowToolbarGroups) {\n            // TODO change this message when sliding is available\n            // eslint-disable-next-line no-console\n            console.warn(`Ignoring the '${toolbarItem}' toolbar button. Group toolbar buttons are only supported when using floating toolbar mode and cannot be nested.`);\n            return Optional.none();\n        }\n        else {\n            return extractFrom(spec, backstage, editor, toolbarItem.toLowerCase());\n        }\n    });\n    const identifyButtons = (editor, toolbarConfig, backstage, prefixes) => {\n        const toolbarGroups = createToolbar(toolbarConfig);\n        const groups = map$2(toolbarGroups, (group) => {\n            const items = bind$3(group.items, (toolbarItem) => {\n                if (toolbarItem.trim().length === 0) {\n                    return [];\n                }\n                return lookupButton(editor, toolbarConfig.buttons, toolbarItem, toolbarConfig.allowToolbarGroups, backstage, prefixes)\n                    .map((spec) => Array.isArray(spec) ? spec : [spec])\n                    .getOr([]);\n            });\n            return {\n                title: Optional.from(editor.translate(group.name)),\n                label: someIf(group.label !== undefined, editor.translate(group.label)),\n                items\n            };\n        });\n        return filter$2(groups, (group) => group.items.length > 0);\n    };\n\n    // Set toolbar(s) depending on if multiple toolbars is configured or not\n    const setToolbar = (editor, uiRefs, rawUiConfig, backstage) => {\n        const outerContainer = uiRefs.mainUi.outerContainer;\n        const toolbarConfig = rawUiConfig.toolbar;\n        const toolbarButtonsConfig = rawUiConfig.buttons;\n        // Check if toolbar type is a non-empty string array\n        if (isArrayOf(toolbarConfig, isString)) {\n            const toolbars = toolbarConfig.map((t) => {\n                const config = { toolbar: t, buttons: toolbarButtonsConfig, allowToolbarGroups: rawUiConfig.allowToolbarGroups };\n                return identifyButtons(editor, config, backstage, Optional.none());\n            });\n            OuterContainer.setToolbars(outerContainer, toolbars);\n        }\n        else {\n            OuterContainer.setToolbar(outerContainer, identifyButtons(editor, rawUiConfig, backstage, Optional.none()));\n        }\n    };\n\n    const detection = detect$1();\n    const isiOS12 = detection.os.isiOS() && detection.os.version.major <= 12;\n    const setupEvents$1 = (editor, uiRefs) => {\n        const { uiMotherships } = uiRefs;\n        const dom = editor.dom;\n        let contentWindow = editor.getWin();\n        const initialDocEle = editor.getDoc().documentElement;\n        const lastWindowDimensions = Cell(SugarPosition(contentWindow.innerWidth, contentWindow.innerHeight));\n        const lastDocumentDimensions = Cell(SugarPosition(initialDocEle.offsetWidth, initialDocEle.offsetHeight));\n        const resizeWindow = () => {\n            // Check if the window dimensions have changed and if so then trigger a content resize event\n            const outer = lastWindowDimensions.get();\n            if (outer.left !== contentWindow.innerWidth || outer.top !== contentWindow.innerHeight) {\n                lastWindowDimensions.set(SugarPosition(contentWindow.innerWidth, contentWindow.innerHeight));\n                fireResizeContent(editor);\n            }\n        };\n        const resizeDocument = () => {\n            // Don't use the initial doc ele, as there's a small chance it may have changed\n            const docEle = editor.getDoc().documentElement;\n            // Check if the document dimensions have changed and if so then trigger a content resize event\n            const inner = lastDocumentDimensions.get();\n            if (inner.left !== docEle.offsetWidth || inner.top !== docEle.offsetHeight) {\n                lastDocumentDimensions.set(SugarPosition(docEle.offsetWidth, docEle.offsetHeight));\n                fireResizeContent(editor);\n            }\n        };\n        const scroll = (e) => {\n            fireScrollContent(editor, e);\n        };\n        dom.bind(contentWindow, 'resize', resizeWindow);\n        dom.bind(contentWindow, 'scroll', scroll);\n        // Bind to async load events and trigger a content resize event if the size has changed\n        const elementLoad = capture(SugarElement.fromDom(editor.getBody()), 'load', resizeDocument);\n        // We want to hide ALL UI motherships here.\n        editor.on('hide', () => {\n            each$1(uiMotherships, (m) => {\n                set$7(m.element, 'display', 'none');\n            });\n        });\n        editor.on('show', () => {\n            each$1(uiMotherships, (m) => {\n                remove$6(m.element, 'display');\n            });\n        });\n        editor.on('NodeChange', resizeDocument);\n        editor.on('remove', () => {\n            elementLoad.unbind();\n            dom.unbind(contentWindow, 'resize', resizeWindow);\n            dom.unbind(contentWindow, 'scroll', scroll);\n            // Clean memory for IE\n            contentWindow = null;\n        });\n    };\n    // TINY-9226: When set, the `ui_mode: split` option will create two different sinks (one for popups and one for sinks)\n    // and the popup sink will be placed adjacent to the editor. This will make it having the same scrolling ancestry.\n    const attachUiMotherships = (editor, uiRoot, uiRefs) => {\n        if (isSplitUiMode(editor)) {\n            attachSystemAfter(uiRefs.mainUi.mothership.element, uiRefs.popupUi.mothership);\n        }\n        // In UiRefs, dialogUi and popupUi refer to the same thing if ui_mode: combined\n        attachSystem(uiRoot, uiRefs.dialogUi.mothership);\n    };\n    const render$1 = (editor, uiRefs, rawUiConfig, backstage, args) => {\n        const { mainUi, uiMotherships } = uiRefs;\n        const lastToolbarWidth = Cell(0);\n        const outerContainer = mainUi.outerContainer;\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\n        iframe(editor);\n        const eTargetNode = SugarElement.fromDom(args.targetNode);\n        const uiRoot = getContentContainer(getRootNode(eTargetNode));\n        attachSystemAfter(eTargetNode, mainUi.mothership);\n        attachUiMotherships(editor, uiRoot, uiRefs);\n        editor.on('PostRender', () => {\n            OuterContainer.setSidebar(outerContainer, rawUiConfig.sidebar, getSidebarShow(editor), {\n                minWidth: getSidebarMinWidth(editor),\n                maxWidth: getSidebarMaxWidth(editor)\n            }, editor);\n            OuterContainer.setViews(outerContainer, rawUiConfig.views, getViewShow(editor));\n        }, true);\n        // TINY-10343: Using `SkinLoaded` instead of `PostRender` because if the skin loading takes too long you run in to rendering problems since things are measured before the CSS is being applied\n        editor.on('SkinLoaded', () => {\n            // Set the sidebar before the toolbar and menubar\n            // - each sidebar has an associated toggle toolbar button that needs to check the\n            //   sidebar that is set to determine its active state on setup\n            setToolbar(editor, uiRefs, rawUiConfig, backstage);\n            lastToolbarWidth.set(editor.getWin().innerWidth);\n            OuterContainer.setMenubar(outerContainer, identifyMenus(editor, rawUiConfig));\n            setupEvents$1(editor, uiRefs);\n        });\n        const socket = OuterContainer.getSocket(outerContainer).getOrDie('Could not find expected socket element');\n        if (isiOS12) {\n            setAll(socket.element, {\n                'overflow': 'scroll',\n                '-webkit-overflow-scrolling': 'touch' // required for ios < 13 content scrolling\n            });\n            const limit = first$1(() => {\n                editor.dispatch('ScrollContent');\n            }, 20);\n            const unbinder = bind$1(socket.element, 'scroll', limit.throttle);\n            editor.on('remove', unbinder.unbind);\n        }\n        setupEventsForUi(editor, uiRefs);\n        editor.addCommand('ToggleSidebar', (_ui, value) => {\n            OuterContainer.toggleSidebar(outerContainer, value);\n            fireToggleSidebar(editor);\n        });\n        editor.addQueryValueHandler('ToggleSidebar', () => OuterContainer.whichSidebar(outerContainer) ?? '');\n        editor.addCommand('ToggleView', (_ui, value) => {\n            const sidebarBefore = OuterContainer.whichSidebar(outerContainer);\n            if (OuterContainer.toggleView(outerContainer, value)) {\n                const target = outerContainer.element;\n                mainUi.mothership.broadcastOn([dismissPopups()], { target });\n                each$1(uiMotherships, (m) => {\n                    m.broadcastOn([dismissPopups()], { target });\n                });\n                // Switching back to main view should focus the editor and update any UIs\n                if (isNull(OuterContainer.whichView(outerContainer))) {\n                    editor.focus({ scrollToSelection: false });\n                    editor.nodeChanged();\n                    OuterContainer.refreshToolbar(outerContainer);\n                }\n                if (sidebarBefore !== OuterContainer.whichSidebar(outerContainer)) {\n                    fireToggleSidebar(editor);\n                }\n                fireToggleView(editor);\n            }\n        });\n        editor.addQueryValueHandler('ToggleView', () => OuterContainer.whichView(outerContainer) ?? '');\n        const toolbarMode = getToolbarMode(editor);\n        const refreshDrawer = () => {\n            OuterContainer.refreshToolbar(uiRefs.mainUi.outerContainer);\n        };\n        if (toolbarMode === ToolbarMode$1.sliding || toolbarMode === ToolbarMode$1.floating) {\n            editor.on('ResizeWindow ResizeEditor ResizeContent', () => {\n                // Check if the width has changed, if so then refresh the toolbar drawer. We don't care if height changes.\n                const width = editor.getWin().innerWidth;\n                if (width !== lastToolbarWidth.get()) {\n                    refreshDrawer();\n                    lastToolbarWidth.set(width);\n                }\n            });\n        }\n        const api = {\n            setEnabled: (state) => {\n                const eventType = state ? 'setEnabled' : 'setDisabled';\n                broadcastEvents(uiRefs, eventType);\n            },\n            isEnabled: () => !Disabling.isDisabled(outerContainer)\n        };\n        return {\n            iframeContainer: socket.element.dom,\n            editorContainer: outerContainer.element.dom,\n            api\n        };\n    };\n\n    var Iframe = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        render: render$1\n    });\n\n    const getHeight = (editor) => {\n        const baseHeight = convertValueToPx(SugarElement.fromDom(editor.targetElm), getHeightOption(editor));\n        const minHeight = getMinHeightOption(editor);\n        const maxHeight = getMaxHeightOption(editor);\n        return baseHeight.map((height) => calcCappedSize(height, minHeight, maxHeight));\n    };\n    const getHeightWithFallback = (editor) => {\n        return getHeight(editor).getOr(getHeightOption(editor)); // If we can't parse, set the height while ignoring min/max values.\n    };\n    const getWidth = (editor) => {\n        const baseWidth = getWidthOption(editor);\n        const minWidth = getMinWidthOption(editor);\n        const maxWidth = getMaxWidthOption(editor);\n        return parseToInt(baseWidth).map((width) => calcCappedSize(width, minWidth, maxWidth));\n    };\n    const getWidthWithFallback = (editor) => {\n        const width = getWidth(editor);\n        return width.getOr(getWidthOption(editor));\n    };\n\n    const { ToolbarLocation, ToolbarMode } = Options;\n    const maximumDistanceToEdge = 40;\n    const InlineHeader = (editor, targetElm, uiRefs, backstage, floatContainer) => {\n        const { mainUi, uiMotherships } = uiRefs;\n        const DOM = global$9.DOM;\n        const useFixedToolbarContainer = useFixedContainer(editor);\n        const isSticky = isStickyToolbar(editor);\n        const editorMaxWidthOpt = getMaxWidthOption(editor).or(getWidth(editor));\n        const headerBackstage = backstage.shared.header;\n        const isPositionedAtTop = headerBackstage.isPositionedAtTop;\n        const minimumToolbarWidth = 150; // Value is arbitrary.\n        const toolbarMode = getToolbarMode(editor);\n        const isSplitToolbar = toolbarMode === ToolbarMode.sliding || toolbarMode === ToolbarMode.floating;\n        const visible = Cell(false);\n        const isVisible = () => visible.get() && !editor.removed;\n        // Calculate the toolbar offset when using a split toolbar drawer\n        const calcToolbarOffset = (toolbar) => isSplitToolbar ?\n            toolbar.fold(constant$1(0), (tbar) => \n            // If we have an overflow toolbar, we need to offset the positioning by the height of the overflow toolbar\n            tbar.components().length > 1 ? get$d(tbar.components()[1].element) : 0) : 0;\n        const calcMode = (container) => {\n            switch (getToolbarLocation(editor)) {\n                case ToolbarLocation.auto:\n                    const toolbar = OuterContainer.getToolbar(mainUi.outerContainer);\n                    const offset = calcToolbarOffset(toolbar);\n                    const toolbarHeight = get$d(container.element) - offset;\n                    const targetBounds = box$1(targetElm);\n                    // Determine if the toolbar has room to render at the top/bottom of the document\n                    const roomAtTop = targetBounds.y > toolbarHeight;\n                    if (roomAtTop) {\n                        return 'top';\n                    }\n                    else {\n                        const doc = documentElement(targetElm);\n                        const docHeight = Math.max(doc.dom.scrollHeight, get$d(doc));\n                        const roomAtBottom = targetBounds.bottom < docHeight - toolbarHeight;\n                        // If there isn't ever room to add the toolbar above the target element, then place the toolbar at the bottom.\n                        // Likewise if there's no room at the bottom, then we should show at the top. If there's no room at the bottom\n                        // or top, then prefer the bottom except when it'll prevent accessing the content at the bottom.\n                        // Make sure to exclude scroll position, as we want to still show at the top if the user can scroll up to undock\n                        if (roomAtBottom) {\n                            return 'bottom';\n                        }\n                        else {\n                            const winBounds = win();\n                            const isRoomAtBottomViewport = winBounds.bottom < targetBounds.bottom - toolbarHeight;\n                            return isRoomAtBottomViewport ? 'bottom' : 'top';\n                        }\n                    }\n                case ToolbarLocation.bottom:\n                    return 'bottom';\n                case ToolbarLocation.top:\n                default:\n                    return 'top';\n            }\n        };\n        const setupMode = (mode) => {\n            // Update the docking mode\n            floatContainer.on((container) => {\n                Docking.setModes(container, [mode]);\n                headerBackstage.setDockingMode(mode);\n                // Update the vertical menu direction\n                const verticalDir = isPositionedAtTop() ? AttributeValue.TopToBottom : AttributeValue.BottomToTop;\n                set$9(container.element, Attribute, verticalDir);\n            });\n        };\n        const updateChromeWidth = () => {\n            floatContainer.on((container) => {\n                // Update the max width of the inline toolbar\n                const maxWidth = editorMaxWidthOpt.getOrThunk(() => {\n                    // Adding 10px of margin so that the toolbar won't try to wrap\n                    return getBounds$1().width - viewport$1(targetElm).left - 10;\n                });\n                set$7(container.element, 'max-width', maxWidth + 'px');\n            });\n        };\n        const updateChromePosition = (isOuterContainerWidthRestored, prevScroll) => {\n            floatContainer.on((container) => {\n                const toolbar = OuterContainer.getToolbar(mainUi.outerContainer);\n                const offset = calcToolbarOffset(toolbar);\n                // The float container/editor may not have been rendered yet, which will cause it to have a non integer based positions\n                // so we need to round this to account for that.\n                const targetBounds = box$1(targetElm);\n                const offsetParent = getOffsetParent$1(editor, mainUi.outerContainer.element);\n                const getLeft = () => offsetParent.fold(() => targetBounds.x, (offsetParent) => {\n                    // Because for ui_mode: split, the main mothership (which includes the toolbar) is moved and added as a sibling\n                    // If there's any relative position div set as the parent and the offsetParent is no longer the body,\n                    // the absolute top/left positions would no longer be correct\n                    // When there's a relative div and the position is the same as the toolbar container\n                    // then it would produce a negative top as it needs to be positioned on top of the offsetParent\n                    const offsetBox = box$1(offsetParent);\n                    const isOffsetParentBody = eq(offsetParent, body());\n                    return isOffsetParentBody\n                        ? targetBounds.x\n                        : targetBounds.x - offsetBox.x;\n                });\n                const getTop = () => offsetParent.fold(() => isPositionedAtTop()\n                    ? Math.max(targetBounds.y - get$d(container.element) + offset, 0)\n                    : targetBounds.bottom, (offsetParent) => {\n                    // Because for ui_mode: split, the main mothership (which includes the toolbar) is moved and added as a sibling\n                    // If there's any relative position div set as the parent and the offsetParent is no longer the body,\n                    // the absolute top/left positions would no longer be correct\n                    // When there's a relative div and the position is the same as the toolbar container\n                    // then it would produce a negative top as it needs to be positioned on top of the offsetParent\n                    const offsetBox = box$1(offsetParent);\n                    const scrollDelta = offsetParent.dom.scrollTop ?? 0;\n                    const isOffsetParentBody = eq(offsetParent, body());\n                    const topValue = isOffsetParentBody\n                        ? Math.max(targetBounds.y - get$d(container.element) + offset, 0)\n                        : targetBounds.y - offsetBox.y + scrollDelta - get$d(container.element) + offset;\n                    return isPositionedAtTop()\n                        ? topValue\n                        : targetBounds.bottom;\n                });\n                const left = getLeft();\n                const widthProperties = someIf(isOuterContainerWidthRestored, \n                // This width can be used for calculating the \"width\" when resolving issues with flex-wrapping being triggered at the window width, despite scroll space being available to the right.\n                Math.ceil(mainUi.outerContainer.element.dom.getBoundingClientRect().width))\n                    // this check is needed because if the toolbar is rendered outside of the `outerContainer` because the toolbar have `position: \"fixed\"`\n                    // the calculate width isn't correct\n                    .filter((w) => w > minimumToolbarWidth).map((toolbarWidth) => {\n                    const scroll = prevScroll.getOr(get$b());\n                    /*\n                  As the editor container can wrap its elements (due to flex-wrap), the width of the container impacts also its height. Adding a minimum width works around two problems:\n        \n                  a) The docking behaviour (e.g. lazyContext) does not handle the situation of a very thin component near the edge of the screen very well, and actually has no concept of horizontal scroll - it only checks y values.\n        \n                  b) A very small toolbar is essentially unusable. On scrolling of X, we keep updating the width of the toolbar so that it can grow to fit the available space.\n        \n                  Note: this is entirely determined on the number of items in the menu and the toolbar, because when they wrap, that's what causes the height. Also, having multiple toolbars can also make it higher.\n                  */\n                    const availableWidth = window.innerWidth - (left - scroll.left);\n                    const width = Math.max(Math.min(toolbarWidth, availableWidth), minimumToolbarWidth);\n                    if (availableWidth < toolbarWidth) {\n                        set$7(mainUi.outerContainer.element, 'width', width + 'px');\n                    }\n                    return {\n                        width: width + 'px'\n                    };\n                }).getOr({ width: 'max-content' });\n                const baseProperties = {\n                    position: 'absolute',\n                    left: Math.round(left) + 'px',\n                    top: getTop() + 'px'\n                };\n                setAll(mainUi.outerContainer.element, {\n                    ...baseProperties,\n                    ...widthProperties\n                });\n            });\n        };\n        // This would return Optional.none, for ui_mode: combined, which will fallback to the default code block\n        // For ui_mode: split, the offsetParent would be the body if there were no relative div set as parent\n        const getOffsetParent$1 = (editor, element) => isSplitUiMode(editor) ? getOffsetParent(element) : Optional.none();\n        const repositionPopups$1 = () => {\n            each$1(uiMotherships, (m) => {\n                m.broadcastOn([repositionPopups()], {});\n            });\n        };\n        const restoreOuterContainerWidth = () => {\n            /*\n            Editors can be placed so far to the right that their left position is beyond the window width. This causes problems with flex-wrap. To solve this, set a width style on the container.\n            Natural width of the container needs to be calculated first.\n            */\n            if (!useFixedToolbarContainer) {\n                const toolbarCurrentRightsidePosition = absolute$3(mainUi.outerContainer.element).left + getOuter(mainUi.outerContainer.element);\n                /*\n                Check the width if we are within X number of pixels to the edge ( or above ). Also check if we have the width-value set.\n                This helps handling the issue where it goes from having a width set ( because it's too wide ) to going so far from the edge it no longer triggers the problem. Common when the width is changed by test.\n                */\n                if (toolbarCurrentRightsidePosition >= window.innerWidth - maximumDistanceToEdge || getRaw(mainUi.outerContainer.element, 'width').isSome()) {\n                    set$7(mainUi.outerContainer.element, 'position', 'absolute');\n                    set$7(mainUi.outerContainer.element, 'left', '0px');\n                    remove$6(mainUi.outerContainer.element, 'width');\n                    return true;\n                }\n            }\n            return false;\n        };\n        const update = (stickyAction) => {\n            // Skip updating the ui if it's hidden\n            if (!isVisible()) {\n                return;\n            }\n            // Handles positioning, docking and SplitToolbar (more drawer) behaviour. Modes:\n            // 1. Basic inline: does positioning and docking\n            // 2. Inline + more drawer: does positioning, docking and SplitToolbar\n            // 3. Inline + fixed_toolbar_container: does nothing\n            // 4. Inline + fixed_toolbar_container + more drawer: does SplitToolbar\n            // Update the max width, as the body width may have changed\n            if (!useFixedToolbarContainer) {\n                updateChromeWidth();\n            }\n            const prevScroll = get$b();\n            const isOuterContainerWidthRestored = useFixedToolbarContainer ? false : restoreOuterContainerWidth();\n            /*\n              Refresh split toolbar. Before calling refresh, we need to make sure that we have the full width (through restoreOuterContainerWidth above), otherwise too much will be put in the overflow drawer.\n              A split toolbar requires a calculation to see what ends up in the \"more drawer\". When we don't have a split toolbar, then there is no reason to refresh the toolbar when the size changes.\n            */\n            if (isSplitToolbar) {\n                OuterContainer.refreshToolbar(mainUi.outerContainer);\n            }\n            // Positioning\n            if (!useFixedToolbarContainer) {\n                // Getting the current scroll as the previous step may have reset the scroll,\n                // We also want calculation based on the previous scroll, then restoring the scroll when everything is set.\n                const currentScroll = get$b();\n                const optScroll = someIf(prevScroll.left !== currentScroll.left, prevScroll);\n                // This will position the container in the right spot.\n                updateChromePosition(isOuterContainerWidthRestored, optScroll);\n                // Restore scroll left position only if they are different, keeping the current scroll top, that shouldn't be changed\n                optScroll.each((scroll) => {\n                    to(scroll.left, currentScroll.top);\n                });\n            }\n            // Docking\n            if (isSticky) {\n                floatContainer.on(stickyAction);\n            }\n            // Floating toolbar\n            repositionPopups$1();\n        };\n        const doUpdateMode = () => {\n            // Skip updating the mode if the toolbar is hidden, is\n            // using a fixed container or has sticky toolbars disabled\n            if (useFixedToolbarContainer || !isSticky || !isVisible()) {\n                return false;\n            }\n            return floatContainer.get().exists((fc) => {\n                const currentMode = headerBackstage.getDockingMode();\n                const newMode = calcMode(fc);\n                // Note: the docking mode will only be able to change when the `toolbar_location`\n                // is set to \"auto\".\n                if (newMode !== currentMode) {\n                    setupMode(newMode);\n                    return true;\n                }\n                else {\n                    return false;\n                }\n            });\n        };\n        const show = () => {\n            visible.set(true);\n            set$7(mainUi.outerContainer.element, 'display', 'flex');\n            DOM.addClass(editor.getBody(), 'mce-edit-focus');\n            each$1(uiMotherships, (m) => {\n                // We remove the display style when showing, because when hiding, we set it to \"none\"\n                remove$6(m.element, 'display');\n            });\n            doUpdateMode();\n            if (isSplitUiMode(editor)) {\n                // When the toolbar is shown, then hidden and when the page is then scrolled,\n                // the toolbar is set to docked, which shouldn't be as it should be static position\n                // calling reset here, to reset the state.\n                // Another case would be when the toolbar is shown initially (with location_bottom)\n                // we don't want to dock the toolbar, calling Docking.refresh\n                update((elem) => Docking.isDocked(elem) ? Docking.reset(elem) : Docking.refresh(elem));\n            }\n            else {\n                // Even if we aren't updating the docking mode, we still want to reposition\n                // the Ui. NOTE: We are using Docking.refresh here, rather than Docking.reset. This\n                // means it should keep whatever its \"previous\" coordinates were, and will just\n                // behave like the window was scrolled again, and Docking needs to work out if it\n                // is going to dock / undock\n                update(Docking.refresh);\n            }\n        };\n        const hide = () => {\n            visible.set(false);\n            set$7(mainUi.outerContainer.element, 'display', 'none');\n            DOM.removeClass(editor.getBody(), 'mce-edit-focus');\n            each$1(uiMotherships, (m) => {\n                set$7(m.element, 'display', 'none');\n            });\n        };\n        const updateMode = () => {\n            const changedMode = doUpdateMode();\n            // If the docking mode has changed due to the update, we want to reset\n            // docking. This will clear any prior stored positions\n            if (changedMode) {\n                update(Docking.reset);\n            }\n        };\n        return {\n            isVisible,\n            isPositionedAtTop,\n            show,\n            hide,\n            update,\n            updateMode,\n            repositionPopups: repositionPopups$1\n        };\n    };\n\n    const getTargetPosAndBounds = (targetElm, isToolbarTop) => {\n        const bounds = box$1(targetElm);\n        return {\n            pos: isToolbarTop ? bounds.y : bounds.bottom,\n            bounds\n        };\n    };\n    const setupEvents = (editor, targetElm, ui, toolbarPersist) => {\n        const prevPosAndBounds = Cell(getTargetPosAndBounds(targetElm, ui.isPositionedAtTop()));\n        const resizeContent = (e) => {\n            const { pos, bounds } = getTargetPosAndBounds(targetElm, ui.isPositionedAtTop());\n            const { pos: prevPos, bounds: prevBounds } = prevPosAndBounds.get();\n            const hasResized = bounds.height !== prevBounds.height || bounds.width !== prevBounds.width;\n            prevPosAndBounds.set({ pos, bounds });\n            if (hasResized) {\n                fireResizeContent(editor, e);\n            }\n            if (ui.isVisible()) {\n                if (prevPos !== pos) {\n                    // The proposed toolbar location has moved, so we need to reposition the Ui. This might\n                    // include things like refreshing any Docking / stickiness for the toolbars\n                    ui.update(Docking.reset);\n                }\n                else if (hasResized) {\n                    // The proposed toolbar location hasn't moved, but the dimensions of the editor have changed.\n                    // We use \"updateMode\" here instead of \"update\". The primary reason is that \"updateMode\"\n                    // only repositions the Ui if it has detected that the docking mode needs to change, which\n                    // will only happen with `toolbar_location` is set to `auto`.\n                    ui.updateMode();\n                    // NOTE: This repositionPopups call is going to be a duplicate if \"updateMode\" identifies\n                    // that the mode has changed. We probably need to make it a bit more granular .. so\n                    // that we can just query if the mode has changed. Otherwise, we're going to end up with\n                    // situations like this where we are doing a potentially expensive operation\n                    // (repositionPopups) more than once.\n                    ui.repositionPopups();\n                }\n            }\n        };\n        if (!toolbarPersist) {\n            editor.on('activate', ui.show);\n            editor.on('deactivate', ui.hide);\n        }\n        // For both the initial load (SkinLoaded) and any resizes (ResizeWindow), we want to\n        // update the positions of the Ui elements (and reset Docking / stickiness)\n        editor.on('SkinLoaded ResizeWindow', () => ui.update(Docking.reset));\n        editor.on('NodeChange keydown', (e) => {\n            requestAnimationFrame(() => resizeContent(e));\n        });\n        // When the page has been scrolled, we need to update any docking positions. We also\n        // want to reposition all the Ui elements if required.\n        let lastScrollX = 0;\n        const updateUi = last(() => ui.update(Docking.refresh), 33);\n        editor.on('ScrollWindow', () => {\n            const newScrollX = get$b().left;\n            if (newScrollX !== lastScrollX) {\n                lastScrollX = newScrollX;\n                updateUi.throttle();\n            }\n            ui.updateMode();\n        });\n        if (isSplitUiMode(editor)) {\n            editor.on('ElementScroll', (_args) => {\n                // When the scroller containing the editor scrolls, update the Ui positions\n                ui.update(Docking.refresh);\n            });\n        }\n        // Bind to async load events and trigger a content resize event if the size has changed\n        // This is handling resizing based on anything loading inside the content (e.g. img tags)\n        const elementLoad = unbindable();\n        elementLoad.set(capture(SugarElement.fromDom(editor.getBody()), 'load', (e) => resizeContent(e.raw)));\n        editor.on('remove', () => {\n            elementLoad.clear();\n        });\n    };\n    const render = (editor, uiRefs, rawUiConfig, backstage, args) => {\n        const { mainUi } = uiRefs;\n        // This is used to store the reference to the header part of OuterContainer, which is\n        // *not* created by this module. This reference is used to make sure that we only bind\n        // events for an inline container *once* ... because our show function is just the\n        // InlineHeader's show function if this reference is already set. We pass it through to\n        // InlineHeader because InlineHeader will depend on it.\n        const floatContainer = value$2();\n        const targetElm = SugarElement.fromDom(args.targetNode);\n        const ui = InlineHeader(editor, targetElm, uiRefs, backstage, floatContainer);\n        const toolbarPersist = isToolbarPersist(editor);\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\n        inline(editor);\n        const render = () => {\n            // Because we set the floatContainer immediately afterwards, this is just telling us\n            // if we have already called this code (e.g. show, hide, show) - then don't do anything\n            // more than show. It's a pretty messy way of ensuring that all the code that follows\n            // this `if` block is only executed once (setting up events etc.). So the first call\n            // to `render` will execute it, but the second call won't. This `render` function is\n            // used for most of the \"show\" handlers here, so the function can be invoked either\n            // for the first time, or or just because something is being show again, after being\n            // toggled to hidden earlier.\n            if (floatContainer.isSet()) {\n                ui.show();\n                return;\n            }\n            // Set up the header part of OuterContainer. Once configured, the `InlineHeader` code\n            // will use it when setting up and updating the Ui. This module uses it mainly just to\n            // allow us to call `render` multiple times, but only have it execute the setup code once.\n            floatContainer.set(OuterContainer.getHeader(mainUi.outerContainer).getOrDie());\n            // `uiContainer` handles *where* the motherhips get added by default. Currently, uiContainer\n            // will mostly be the <body> of the document (unless it's a ShadowRoot). When using ui_mode: split,\n            // the main mothership (which includes the toolbar) and popup sinks will be added as siblings of\n            // the target element, so that they have the same scrolling context / environment\n            const uiContainer = getUiContainer(editor);\n            // Position the motherships based on the editor Ui options.\n            if (isSplitUiMode(editor)) {\n                attachSystemAfter(targetElm, mainUi.mothership);\n                // Only in ui_mode: split, do we have a separate popup sink\n                attachSystemAfter(targetElm, uiRefs.popupUi.mothership);\n            }\n            else {\n                attachSystem(uiContainer, mainUi.mothership);\n            }\n            // NOTE: In UiRefs, dialogUi and popupUi refer to the same thing if ui_mode: combined\n            attachSystem(uiContainer, uiRefs.dialogUi.mothership);\n            const setup = () => {\n                // Unlike menubar below which uses OuterContainer directly, this level of abstraction is\n                // required because of the different types of toolbars available (e.g. multiple vs single)\n                setToolbar(editor, uiRefs, rawUiConfig, backstage);\n                OuterContainer.setMenubar(mainUi.outerContainer, identifyMenus(editor, rawUiConfig));\n                // Initialise the toolbar - set initial positioning then show\n                ui.show();\n                setupEvents(editor, targetElm, ui, toolbarPersist);\n                editor.nodeChanged();\n            };\n            if (toolbarPersist) {\n                // TINY-10482: for `toolbar_persist: true` we need to wait for the skin to be loaded before showing the toolbar/menubar.\n                // Without this, there's the occasional chance that the toolbar/menubar could be set/shown before the skin has finished\n                // loading, which causes CSS issues.\n                editor.once('SkinLoaded', setup);\n            }\n            else {\n                setup();\n            }\n        };\n        editor.on('show', render);\n        editor.on('hide', ui.hide);\n        if (!toolbarPersist) {\n            editor.on('focus', render);\n            editor.on('blur', ui.hide);\n        }\n        editor.on('init', () => {\n            if (editor.hasFocus() || toolbarPersist) {\n                render();\n            }\n        });\n        setupEventsForUi(editor, uiRefs);\n        const api = {\n            show: render,\n            hide: ui.hide,\n            setEnabled: (state) => {\n                const eventType = state ? 'setEnabled' : 'setDisabled';\n                broadcastEvents(uiRefs, eventType);\n            },\n            isEnabled: () => !Disabling.isDisabled(mainUi.outerContainer)\n        };\n        return {\n            editorContainer: mainUi.outerContainer.element.dom,\n            api\n        };\n    };\n\n    var Inline = /*#__PURE__*/Object.freeze({\n        __proto__: null,\n        render: render\n    });\n\n    const LazyUiReferences = () => {\n        const dialogUi = value$2();\n        const popupUi = value$2();\n        const mainUi = value$2();\n        const lazyGetInOuterOrDie = (label, f) => () => mainUi.get().bind((oc) => f(oc.outerContainer)).getOrDie(`Could not find ${label} element in OuterContainer`);\n        // TINY-9226: If the motherships are the same, return just the dialog Ui of them (ui_mode: combined mode)\n        const getUiMotherships = () => {\n            const optDialogMothership = dialogUi.get().map((ui) => ui.mothership);\n            const optPopupMothership = popupUi.get().map((ui) => ui.mothership);\n            return optDialogMothership.fold(() => optPopupMothership.toArray(), (dm) => optPopupMothership.fold(() => [dm], (pm) => eq(dm.element, pm.element) ? [dm] : [dm, pm]));\n        };\n        return {\n            dialogUi,\n            popupUi,\n            mainUi,\n            getUiMotherships,\n            lazyGetInOuterOrDie\n        };\n    };\n\n    // TODO: Find a better way of doing this. We probably don't want to just listen to\n    // editor events. Having an API available like WindowManager would be the best option\n    const showContextToolbarEvent = 'contexttoolbar-show';\n    const hideContextToolbarEvent = 'contexttoolbar-hide';\n\n    const getFormApi = (input, valueState, focusfallbackElement) => {\n        return ({\n            setInputEnabled: (state) => {\n                if (!state && focusfallbackElement) {\n                    focus$4(focusfallbackElement);\n                }\n                Disabling.set(input, !state);\n            },\n            isInputEnabled: () => !Disabling.isDisabled(input),\n            hide: () => {\n                emit(input, sandboxClose());\n            },\n            back: () => {\n                emit(input, backSlideEvent);\n            },\n            getValue: () => {\n                return valueState.get().getOrThunk(() => Representing.getValue(input));\n            },\n            setValue: (value) => {\n                if (input.getSystem().isConnected()) {\n                    Representing.setValue(input, value);\n                }\n                else {\n                    valueState.set(value);\n                }\n            }\n        });\n    };\n    const getFormParentApi = (comp, valueState, focusfallbackElement) => {\n        const parent$1 = parent(comp.element);\n        const parentCompOpt = parent$1.bind((parent) => comp.getSystem().getByDom(parent).toOptional());\n        return getFormApi(parentCompOpt.getOr(comp), valueState, focusfallbackElement);\n    };\n\n    const runOnExecute = (memInput, original, valueState) => run$1(internalToolbarButtonExecute, (comp, se) => {\n        const input = memInput.get(comp);\n        const formApi = getFormApi(input, valueState, comp.element);\n        original.onAction(formApi, se.event.buttonApi);\n    });\n    const renderContextButton = (memInput, button, providers, valueState) => {\n        const { primary, ...rest } = button.original;\n        const bridged = getOrDie(createToolbarButton({\n            ...rest,\n            type: 'button',\n            onAction: noop\n        }));\n        return renderToolbarButtonWith(bridged, providers, [\n            runOnExecute(memInput, button, valueState)\n        ]);\n    };\n    const renderContextToggleButton = (memInput, button, providers, valueState) => {\n        const { primary, ...rest } = button.original;\n        const bridged = getOrDie(createToggleButton({\n            ...rest,\n            type: 'togglebutton',\n            onAction: noop\n        }));\n        return renderToolbarToggleButtonWith(bridged, providers, [\n            runOnExecute(memInput, button, valueState)\n        ]);\n    };\n    const isToggleButton = (button) => button.type === 'contextformtogglebutton';\n    const generateOne = (memInput, button, providersBackstage, valueState) => {\n        if (isToggleButton(button)) {\n            return renderContextToggleButton(memInput, button, providersBackstage, valueState);\n        }\n        else {\n            return renderContextButton(memInput, button, providersBackstage, valueState);\n        }\n    };\n    const generate = (memInput, buttons, providersBackstage, valueState) => {\n        const mementos = map$2(buttons, (button) => record(generateOne(memInput, button, providersBackstage, valueState)));\n        const asSpecs = () => map$2(mementos, (mem) => mem.asSpec());\n        const findPrimary = (compInSystem) => findMap(buttons, (button, i) => {\n            if (button.primary) {\n                return Optional.from(mementos[i]).bind((mem) => mem.getOpt(compInSystem)).filter(not(Disabling.isDisabled));\n            }\n            else {\n                return Optional.none();\n            }\n        });\n        return {\n            asSpecs,\n            findPrimary\n        };\n    };\n\n    const renderContextFormSizeInput = (ctx, providersBackstage, onEnter, valueState) => {\n        const { width, height } = ctx.initValue();\n        let converter = noSizeConversion;\n        const enabled = true;\n        const ratioEvent = generate$6('ratio-event');\n        const getApi = (comp) => getFormApi(comp, valueState);\n        const makeIcon = (iconName) => render$4(iconName, { tag: 'span', classes: ['tox-icon', 'tox-lock-icon__' + iconName] }, providersBackstage.icons);\n        const disabled = () => !enabled;\n        const label = ctx.label.getOr('Constrain proportions');\n        const translatedLabel = providersBackstage.translate(label);\n        const pLock = FormCoupledInputs.parts.lock({\n            dom: {\n                tag: 'button',\n                classes: ['tox-lock', 'tox-lock-context-form-size-input', 'tox-button', 'tox-button--naked', 'tox-button--icon'],\n                attributes: {\n                    'aria-label': translatedLabel,\n                    'data-mce-name': label\n                }\n            },\n            components: [\n                makeIcon('lock'),\n                makeIcon('unlock')\n            ],\n            buttonBehaviours: derive$1([\n                Disabling.config({ disabled }),\n                Tabstopping.config({}),\n                Tooltipping.config(providersBackstage.tooltips.getConfig({\n                    tooltipText: translatedLabel\n                }))\n            ])\n        });\n        const formGroup = (components) => ({\n            dom: {\n                tag: 'div',\n                classes: ['tox-context-form__group']\n            },\n            components\n        });\n        const goToParent = (comp) => {\n            const focussableWrapperOpt = ancestor$1(comp.element, 'div.tox-focusable-wrapper');\n            return focussableWrapperOpt.fold(Optional.none, (focussableWrapper) => {\n                focus$4(focussableWrapper);\n                return Optional.some(true);\n            });\n        };\n        const getFieldPart = (isField1) => FormField.parts.field({\n            factory: Input,\n            inputClasses: ['tox-textfield', 'tox-toolbar-textfield', 'tox-textfield-size'],\n            data: isField1 ? width : height,\n            inputBehaviours: derive$1([\n                Disabling.config({ disabled }),\n                Tabstopping.config({}),\n                config('size-input-toolbar-events', [\n                    run$1(focusin(), (component, _simulatedEvent) => {\n                        emitWith(component, ratioEvent, { isField1 });\n                    })\n                ]),\n                Keying.config({ mode: 'special', onEnter, onEscape: goToParent })\n            ]),\n            selectOnFocus: false\n        });\n        const getLabel = (label) => ({\n            dom: {\n                tag: 'label',\n                classes: ['tox-label']\n            },\n            components: [\n                text$2(providersBackstage.translate(label))\n            ]\n        });\n        const focusableWrapper = (field) => ({\n            dom: {\n                tag: 'div',\n                classes: ['tox-focusable-wrapper', 'tox-toolbar-nav-item'],\n            },\n            components: [field],\n            behaviours: derive$1([\n                Tabstopping.config({}),\n                Focusing.config({}),\n                Keying.config({\n                    mode: 'special',\n                    onEnter: (comp) => {\n                        const focussableInputOpt = descendant(comp.element, 'input');\n                        return focussableInputOpt.fold(Optional.none, (focussableInput) => {\n                            focus$4(focussableInput);\n                            return Optional.some(true);\n                        });\n                    }\n                })\n            ])\n        });\n        const widthField = focusableWrapper(FormCoupledInputs.parts.field1(formGroup([FormField.parts.label(getLabel('Width:')), getFieldPart(true)])));\n        const heightField = focusableWrapper(FormCoupledInputs.parts.field2(formGroup([FormField.parts.label(getLabel('Height:')), getFieldPart(false)])));\n        const editorOffCell = Cell(noop);\n        const controlLifecycleHandlers = [\n            onControlAttached({\n                onBeforeSetup: (comp) => descendant(comp.element, 'input').each(focus$4),\n                onSetup: ctx.onSetup,\n                getApi\n            }, editorOffCell),\n            onContextFormControlDetached({ getApi }, editorOffCell, valueState),\n        ];\n        return FormCoupledInputs.sketch({\n            dom: {\n                tag: 'div',\n                classes: ['tox-context-form__group']\n            },\n            components: [\n                // NOTE: Form coupled inputs to the FormField.sketch themselves.\n                widthField,\n                formGroup([\n                    pLock\n                ]),\n                heightField\n            ],\n            field1Name: 'width',\n            field2Name: 'height',\n            locked: true,\n            markers: {\n                lockClass: 'tox-locked'\n            },\n            onLockedChange: (current, other, _lock) => {\n                parseSize(Representing.getValue(current)).each((size) => {\n                    converter(size).each((newSize) => {\n                        Representing.setValue(other, formatSize(newSize));\n                    });\n                });\n            },\n            onInput: (current) => emit(current, formInputEvent),\n            coupledFieldBehaviours: derive$1([\n                Focusing.config({}),\n                Keying.config({\n                    mode: 'flow',\n                    focusInside: FocusInsideModes.OnEnterOrSpaceMode,\n                    cycles: false,\n                    selector: 'button, .tox-focusable-wrapper',\n                }),\n                Disabling.config({\n                    disabled,\n                    onDisabled: (comp) => {\n                        FormCoupledInputs.getField1(comp).bind(FormField.getField).each(Disabling.disable);\n                        FormCoupledInputs.getField2(comp).bind(FormField.getField).each(Disabling.disable);\n                        FormCoupledInputs.getLock(comp).each(Disabling.disable);\n                    },\n                    onEnabled: (comp) => {\n                        FormCoupledInputs.getField1(comp).bind(FormField.getField).each(Disabling.enable);\n                        FormCoupledInputs.getField2(comp).bind(FormField.getField).each(Disabling.enable);\n                        FormCoupledInputs.getLock(comp).each(Disabling.enable);\n                    }\n                }),\n                toggleOnReceive(() => providersBackstage.checkUiComponentContext('mode:design')),\n                config('size-input-toolbar-events2', [\n                    run$1(ratioEvent, (component, simulatedEvent) => {\n                        const isField1 = simulatedEvent.event.isField1;\n                        const optCurrent = isField1 ? FormCoupledInputs.getField1(component) : FormCoupledInputs.getField2(component);\n                        const optOther = isField1 ? FormCoupledInputs.getField2(component) : FormCoupledInputs.getField1(component);\n                        const value1 = optCurrent.map(Representing.getValue).getOr('');\n                        const value2 = optOther.map(Representing.getValue).getOr('');\n                        converter = makeRatioConverter(value1, value2);\n                    }),\n                    run$1(formInputEvent, (input) => ctx.onInput(getApi(input))),\n                    ...controlLifecycleHandlers,\n                ])\n            ])\n        });\n    };\n\n    const createContextFormFieldFromParts = (pLabel, pField, providers) => FormField.sketch({\n        dom: {\n            tag: 'div',\n            classes: ['tox-context-form__group']\n        },\n        components: [...pLabel.toArray(), pField],\n        fieldBehaviours: derive$1([\n            Disabling.config({\n                disabled: () => providers.checkUiComponentContext('mode:design').shouldDisable,\n                onDisabled: (comp) => {\n                    focusParent(comp);\n                    FormField.getField(comp).each(Disabling.disable);\n                },\n                onEnabled: (comp) => {\n                    FormField.getField(comp).each(Disabling.enable);\n                }\n            }),\n        ])\n    });\n\n    const renderContextFormSliderInput = (ctx, providers, onEnter, valueState) => {\n        const editorOffCell = Cell(noop);\n        const getApi = (comp) => getFormParentApi(comp, valueState);\n        const pLabel = ctx.label.map((label) => FormField.parts.label({\n            dom: { tag: 'label', classes: ['tox-label'] },\n            components: [text$2(providers.translate(label))]\n        }));\n        const pField = FormField.parts.field({\n            factory: Input,\n            type: 'range',\n            inputClasses: ['tox-toolbar-slider__input', 'tox-toolbar-nav-item'],\n            inputAttributes: {\n                min: String(ctx.min()),\n                max: String(ctx.max())\n            },\n            data: ctx.initValue().toString(),\n            fromInputValue: (value) => toFloat(value).getOr(ctx.min()),\n            toInputValue: (value) => String(value),\n            inputBehaviours: derive$1([\n                Disabling.config({\n                    disabled: () => providers.checkUiComponentContext('mode:design').shouldDisable\n                }),\n                toggleOnReceive(() => providers.checkUiComponentContext('mode:design')),\n                Keying.config({\n                    mode: 'special',\n                    onEnter,\n                    // These two lines need to be tested. They are about left and right bypassing\n                    // any keyboard handling, and allowing left and right to be processed by the input\n                    // Maybe this should go in an alloy sketch for Input?\n                    onLeft: (comp, se) => {\n                        se.cut();\n                        return Optional.none();\n                    },\n                    onRight: (comp, se) => {\n                        se.cut();\n                        return Optional.none();\n                    }\n                }),\n                config('slider-events', [\n                    onControlAttached({\n                        onSetup: ctx.onSetup,\n                        getApi,\n                        onBeforeSetup: Keying.focusIn\n                    }, editorOffCell),\n                    onContextFormControlDetached({ getApi }, editorOffCell, valueState),\n                    run$1(input(), (comp) => {\n                        ctx.onInput(getApi(comp));\n                    })\n                ])\n            ])\n        });\n        return createContextFormFieldFromParts(pLabel, pField, providers);\n    };\n\n    const renderContextFormTextInput = (ctx, providers, onEnter, valueState) => {\n        const editorOffCell = Cell(noop);\n        const getFormApi = (comp) => getFormParentApi(comp, valueState);\n        const pLabel = ctx.label.map((label) => FormField.parts.label({\n            dom: { tag: 'label', classes: ['tox-label'] },\n            components: [text$2(providers.translate(label))]\n        }));\n        const placeholder = ctx.placeholder.map((p) => ({ placeholder: providers.translate(p) })).getOr({});\n        const inputAttributes = {\n            ...placeholder,\n        };\n        const pField = FormField.parts.field({\n            factory: Input,\n            inputClasses: ['tox-toolbar-textfield', 'tox-toolbar-nav-item'],\n            inputAttributes,\n            data: ctx.initValue(),\n            selectOnFocus: true,\n            inputBehaviours: derive$1([\n                Disabling.config({\n                    disabled: () => providers.checkUiComponentContext('mode:design').shouldDisable\n                }),\n                toggleOnReceive(() => providers.checkUiComponentContext('mode:design')),\n                Keying.config({\n                    mode: 'special',\n                    onEnter,\n                    // These two lines need to be tested. They are about left and right bypassing\n                    // any keyboard handling, and allowing left and right to be processed by the input\n                    // Maybe this should go in an alloy sketch for Input?\n                    onLeft: (comp, se) => {\n                        se.cut();\n                        return Optional.none();\n                    },\n                    onRight: (comp, se) => {\n                        se.cut();\n                        return Optional.none();\n                    }\n                }),\n                config('input-events', [\n                    onControlAttached({\n                        onSetup: ctx.onSetup,\n                        getApi: (comp) => {\n                            const closestFocussableOpt = ancestor$1(comp.element, '.tox-toolbar').bind((toolbar) => descendant(toolbar, 'button:enabled'));\n                            return closestFocussableOpt.fold(() => getFormParentApi(comp, valueState), (closestFocussable) => getFormParentApi(comp, valueState, closestFocussable));\n                        },\n                        onBeforeSetup: Keying.focusIn\n                    }, editorOffCell),\n                    onContextFormControlDetached({ getApi: getFormApi }, editorOffCell, valueState),\n                    run$1(input(), (comp) => {\n                        ctx.onInput(getFormApi(comp));\n                    })\n                ])\n            ])\n        });\n        return createContextFormFieldFromParts(pLabel, pField, providers);\n    };\n\n    const buildInitGroup = (f, ctx, providers) => {\n        const valueState = value$2();\n        const onEnter = (input) => {\n            return startCommands.findPrimary(input).orThunk(() => endCommands.findPrimary(input)).map((primary) => {\n                emitExecute(primary);\n                return true;\n            });\n        };\n        const memInput = record(f(providers, onEnter, valueState));\n        const commandParts = partition$3(ctx.commands, (command) => command.align === 'start');\n        const startCommands = generate(memInput, commandParts.pass, providers, valueState);\n        const endCommands = generate(memInput, commandParts.fail, providers, valueState);\n        return filter$2([\n            {\n                title: Optional.none(),\n                label: Optional.none(),\n                items: startCommands.asSpecs()\n            },\n            {\n                title: Optional.none(),\n                label: Optional.none(),\n                items: [memInput.asSpec()]\n            },\n            {\n                title: Optional.none(),\n                label: Optional.none(),\n                items: endCommands.asSpecs()\n            }\n        ], (group) => group.items.length > 0);\n    };\n    const buildInitGroups = (ctx, providers) => {\n        switch (ctx.type) {\n            case 'contextform': return buildInitGroup(curry(renderContextFormTextInput, ctx), ctx, providers);\n            case 'contextsliderform': return buildInitGroup(curry(renderContextFormSliderInput, ctx), ctx, providers);\n            case 'contextsizeinputform': return buildInitGroup(curry(renderContextFormSizeInput, ctx), ctx, providers);\n        }\n    };\n    const renderContextForm = (toolbarType, ctx, providers) => renderToolbar({\n        type: toolbarType,\n        uid: generate$6('context-toolbar'),\n        initGroups: buildInitGroups(ctx, providers),\n        onEscape: Optional.none,\n        cyclicKeying: true,\n        providers\n    });\n    const ContextForm = {\n        renderContextForm,\n        buildInitGroups\n    };\n\n    // The \"threshold\" here is the amount of overlap. To make the overlap check\n    // be more permissive (return true for 'almost' an overlap), use a negative\n    // threshold value\n    const isVerticalOverlap = (a, b, threshold) => b.bottom - a.y >= threshold && a.bottom - b.y >= threshold;\n    const getRangeRect = (rng) => {\n        const rect = rng.getBoundingClientRect();\n        // Some ranges (eg <td><br></td>) will return a 0x0 rect, so we'll need to calculate it from the leaf instead\n        if (rect.height <= 0 && rect.width <= 0) {\n            const leaf$1 = leaf(SugarElement.fromDom(rng.startContainer), rng.startOffset).element;\n            const elm = isText(leaf$1) ? parent(leaf$1) : Optional.some(leaf$1);\n            return elm.filter(isElement$1)\n                .map((e) => e.dom.getBoundingClientRect())\n                // We have nothing valid, so just fallback to the original rect\n                .getOr(rect);\n        }\n        else {\n            return rect;\n        }\n    };\n    const getSelectionBounds = (editor) => {\n        const rng = editor.selection.getRng();\n        const rect = getRangeRect(rng);\n        if (editor.inline) {\n            const scroll = get$b();\n            return bounds(scroll.left + rect.left, scroll.top + rect.top, rect.width, rect.height);\n        }\n        else {\n            // Translate to the top level document, as rect is relative to the iframe viewport\n            const bodyPos = absolute$2(SugarElement.fromDom(editor.getBody()));\n            return bounds(bodyPos.x + rect.left, bodyPos.y + rect.top, rect.width, rect.height);\n        }\n    };\n    const getAnchorElementBounds = (editor, lastElement) => lastElement\n        .filter((elem) => inBody(elem) && isHTMLElement(elem))\n        .map(absolute$2)\n        .getOrThunk(() => getSelectionBounds(editor));\n    const getHorizontalBounds = (contentAreaBox, viewportBounds, margin) => {\n        const x = Math.max(contentAreaBox.x + margin, viewportBounds.x);\n        const right = Math.min(contentAreaBox.right - margin, viewportBounds.right);\n        return { x, width: right - x };\n    };\n    const getVerticalBounds = (editor, contentAreaBox, viewportBounds, isToolbarLocationTop, toolbarType, margin) => {\n        const container = SugarElement.fromDom(editor.getContainer());\n        const header = descendant(container, '.tox-editor-header').getOr(container);\n        const headerBox = box$1(header);\n        const isToolbarBelowContentArea = headerBox.y >= contentAreaBox.bottom;\n        const isToolbarAbove = isToolbarLocationTop && !isToolbarBelowContentArea;\n        // Scenario toolbar top & inline: Bottom of the header -> Bottom of the viewport\n        if (editor.inline && isToolbarAbove) {\n            return {\n                y: Math.max(headerBox.bottom + margin, viewportBounds.y),\n                bottom: viewportBounds.bottom\n            };\n        }\n        // Scenario toolbar top & inline: Top of the viewport -> Top of the header\n        if (editor.inline && !isToolbarAbove) {\n            return {\n                y: viewportBounds.y,\n                bottom: Math.min(headerBox.y - margin, viewportBounds.bottom)\n            };\n        }\n        // Allow line based context toolbar to overlap the statusbar\n        const containerBounds = toolbarType === 'line' ? box$1(container) : contentAreaBox;\n        // Scenario toolbar bottom & Iframe: Bottom of the header -> Bottom of the editor container\n        if (isToolbarAbove) {\n            return {\n                y: Math.max(headerBox.bottom + margin, viewportBounds.y),\n                bottom: Math.min(containerBounds.bottom - margin, viewportBounds.bottom)\n            };\n        }\n        // Scenario toolbar bottom & Iframe: Top of the editor container -> Top of the header\n        return {\n            y: Math.max(containerBounds.y + margin, viewportBounds.y),\n            bottom: Math.min(headerBox.y - margin, viewportBounds.bottom)\n        };\n    };\n    const getContextToolbarBounds = (editor, sharedBackstage, toolbarType, margin = 0) => {\n        const viewportBounds = getBounds$1(window);\n        const contentAreaBox = box$1(SugarElement.fromDom(editor.getContentAreaContainer()));\n        const toolbarOrMenubarEnabled = isMenubarEnabled(editor) || isToolbarEnabled(editor) || isMultipleToolbars(editor);\n        const { x, width } = getHorizontalBounds(contentAreaBox, viewportBounds, margin);\n        // Create bounds that lets the context toolbar overflow outside the content area, but remains in the viewport\n        if (editor.inline && !toolbarOrMenubarEnabled) {\n            return bounds(x, viewportBounds.y, width, viewportBounds.height);\n        }\n        else {\n            const isToolbarTop = sharedBackstage.header.isPositionedAtTop();\n            const { y, bottom } = getVerticalBounds(editor, contentAreaBox, viewportBounds, isToolbarTop, toolbarType, margin);\n            return bounds(x, y, width, bottom - y);\n        }\n    };\n\n    const bubbleSize$1 = 12;\n    const bubbleAlignments$1 = {\n        valignCentre: [],\n        alignCentre: [],\n        alignLeft: ['tox-pop--align-left'],\n        alignRight: ['tox-pop--align-right'],\n        right: ['tox-pop--right'],\n        left: ['tox-pop--left'],\n        bottom: ['tox-pop--bottom'],\n        top: ['tox-pop--top'],\n        inset: ['tox-pop--inset']\n    };\n    const anchorOverrides = {\n        maxHeightFunction: expandable$1(),\n        maxWidthFunction: expandable()\n    };\n    const isEntireElementSelected = (editor, elem) => {\n        const rng = editor.selection.getRng();\n        const leaf$1 = leaf(SugarElement.fromDom(rng.startContainer), rng.startOffset);\n        return rng.startContainer === rng.endContainer && rng.startOffset === rng.endOffset - 1 && eq(leaf$1.element, elem);\n    };\n    const preservePosition = (elem, position, f) => {\n        const currentPosition = getRaw(elem, 'position');\n        set$7(elem, 'position', position);\n        const result = f(elem);\n        currentPosition.each((pos) => set$7(elem, 'position', pos));\n        return result;\n    };\n    // Don't use an inset layout when using a selection/line based anchors as it'll cover the content and can't be moved out the way\n    const shouldUseInsetLayouts = (position) => position === 'node';\n    /**\n     * This function is designed to attempt to intelligently detect where the contextbar should be anchored when using an inside\n     * layout. It will attempt to preserve the previous outside placement when anchoring to the same element. However, when the\n     * placement is re-triggered (e.g. not triggered by a reposition) and the current editor selection overlaps with the contextbar,\n     * then the anchoring should flip from the previous position to avoid conflicting with the selection.\n     */\n    const determineInsetLayout = (editor, contextbar, elem, data, bounds) => {\n        const selectionBounds = getSelectionBounds(editor);\n        const isSameAnchorElement = data.lastElement().exists((prev) => eq(elem, prev));\n        if (isEntireElementSelected(editor, elem)) {\n            // The entire anchor element is selected so it'll always overlap with the selection, in which case just\n            // preserve or show at the top for a new anchor element.\n            return isSameAnchorElement ? preserve$1 : north$1;\n        }\n        else if (isSameAnchorElement) {\n            // Preserve the position, get the bounds and then see if we have an overlap.\n            // If overlapping and this wasn't triggered by a reposition then flip the placement\n            return preservePosition(contextbar, data.getMode(), () => {\n                // TINY-8890: The negative 20px threshold here was arrived at by considering the use\n                // case of a table with default heights for the rows. The threshold had to be\n                // large enough so that the context toolbar would not prevent the user selecting\n                // in the row containing the context toolbar.\n                const isOverlapping = isVerticalOverlap(selectionBounds, box$1(contextbar), -20);\n                return isOverlapping && !data.isReposition() ? flip : preserve$1;\n            });\n        }\n        else {\n            // Attempt to find the best layout to use that won't cause an overlap for the new anchor element\n            // Note: In fixed positioning mode we need to translate by adding the scroll pos to get the absolute position\n            const yBounds = data.getMode() === 'fixed' ? bounds.y + get$b().top : bounds.y;\n            const contextbarHeight = get$d(contextbar) + bubbleSize$1;\n            return yBounds + contextbarHeight <= selectionBounds.y ? north$1 : south$1;\n        }\n    };\n    const getAnchorSpec$2 = (editor, mobile, data, position) => {\n        // IMPORTANT: We lazily determine the layout here so that we only do the calculations if absolutely necessary\n        const smartInsetLayout = (elem) => (anchor, element, bubbles, placee, bounds) => {\n            const layout = determineInsetLayout(editor, placee, elem, data, bounds);\n            // Adjust the anchor box to use the passed y bound coords so that we simulate a \"docking\" type of behaviour\n            const newAnchor = {\n                ...anchor,\n                y: bounds.y,\n                height: bounds.height\n            };\n            return {\n                ...layout(newAnchor, element, bubbles, placee, bounds),\n                // Ensure this is always the preferred option if no outside layouts fit\n                alwaysFit: true\n            };\n        };\n        const getInsetLayouts = (elem) => shouldUseInsetLayouts(position) ? [smartInsetLayout(elem)] : [];\n        // On desktop we prioritise north-then-south because it's cleaner, but on mobile we prioritise south to try to avoid overlapping with native context toolbars\n        const desktopAnchorSpecLayouts = {\n            onLtr: (elem) => [north$2, south$2, northeast$2, southeast$2, northwest$2, southwest$2].concat(getInsetLayouts(elem)),\n            onRtl: (elem) => [north$2, south$2, northwest$2, southwest$2, northeast$2, southeast$2].concat(getInsetLayouts(elem))\n        };\n        const mobileAnchorSpecLayouts = {\n            onLtr: (elem) => [south$2, southeast$2, southwest$2, northeast$2, northwest$2, north$2].concat(getInsetLayouts(elem)),\n            onRtl: (elem) => [south$2, southwest$2, southeast$2, northwest$2, northeast$2, north$2].concat(getInsetLayouts(elem))\n        };\n        return mobile ? mobileAnchorSpecLayouts : desktopAnchorSpecLayouts;\n    };\n    const getAnchorLayout = (editor, position, isTouch, data) => {\n        if (position === 'line') {\n            return {\n                bubble: nu$6(bubbleSize$1, 0, bubbleAlignments$1),\n                layouts: {\n                    onLtr: () => [east$2, west$2],\n                    onRtl: () => [west$2, east$2]\n                },\n                overrides: anchorOverrides\n            };\n        }\n        else {\n            return {\n                // Ensure that inset layouts use a 1px bubble since we're hiding the bubble arrow\n                bubble: nu$6(0, bubbleSize$1, bubbleAlignments$1, 1 / bubbleSize$1),\n                layouts: getAnchorSpec$2(editor, isTouch, data, position),\n                overrides: anchorOverrides\n            };\n        }\n    };\n\n    const matchTargetWith = (elem, candidates) => {\n        const ctxs = filter$2(candidates, (toolbarApi) => toolbarApi.predicate(elem.dom));\n        // TODO: somehow type this properly (Arr.partition can't)\n        // e.g. here pass is Toolbar.ContextToolbar and fail is Toolbar.ContextForm\n        const { pass, fail } = partition$3(ctxs, (t) => t.type === 'contexttoolbar');\n        return {\n            contextToolbars: pass,\n            contextForms: fail\n        };\n    };\n    const filterByPositionForStartNode = (toolbars) => {\n        if (toolbars.length <= 1) {\n            return toolbars;\n        }\n        else {\n            const doesPositionExist = (value) => exists(toolbars, (t) => t.position === value);\n            const filterToolbarsByPosition = (value) => filter$2(toolbars, (t) => t.position === value);\n            const hasSelectionToolbars = doesPositionExist('selection');\n            const hasNodeToolbars = doesPositionExist('node');\n            if (hasSelectionToolbars || hasNodeToolbars) {\n                if (hasNodeToolbars && hasSelectionToolbars) {\n                    // if there's a mix, change the 'selection' toolbars to 'node' so there's no positioning confusion\n                    const nodeToolbars = filterToolbarsByPosition('node');\n                    const selectionToolbars = map$2(filterToolbarsByPosition('selection'), (t) => ({ ...t, position: 'node' }));\n                    return nodeToolbars.concat(selectionToolbars);\n                }\n                else {\n                    return hasSelectionToolbars ? filterToolbarsByPosition('selection') : filterToolbarsByPosition('node');\n                }\n            }\n            else {\n                return filterToolbarsByPosition('line');\n            }\n        }\n    };\n    const filterByPositionForAncestorNode = (toolbars) => {\n        if (toolbars.length <= 1) {\n            return toolbars;\n        }\n        else {\n            const findPosition = (value) => find$5(toolbars, (t) => t.position === value);\n            // prioritise position by 'selection' -> 'node' -> 'line'\n            const basePosition = findPosition('selection')\n                .orThunk(() => findPosition('node'))\n                .orThunk(() => findPosition('line'))\n                .map((t) => t.position);\n            return basePosition.fold(() => [], (pos) => filter$2(toolbars, (t) => t.position === pos));\n        }\n    };\n    const matchStartNode = (elem, nodeCandidates, editorCandidates) => {\n        // requirements:\n        // 1. prioritise context forms over context menus\n        // 2. prioritise node scoped over editor scoped context forms\n        // 3. only show max 1 context form\n        // 4. concatenate all available context toolbars if no context form\n        const nodeMatches = matchTargetWith(elem, nodeCandidates);\n        if (nodeMatches.contextForms.length > 0) {\n            return Optional.some({ elem, toolbars: [nodeMatches.contextForms[0]] });\n        }\n        else {\n            const editorMatches = matchTargetWith(elem, editorCandidates);\n            if (editorMatches.contextForms.length > 0) {\n                return Optional.some({ elem, toolbars: [editorMatches.contextForms[0]] });\n            }\n            else if (nodeMatches.contextToolbars.length > 0 || editorMatches.contextToolbars.length > 0) {\n                const toolbars = filterByPositionForStartNode(nodeMatches.contextToolbars.concat(editorMatches.contextToolbars));\n                return Optional.some({ elem, toolbars });\n            }\n            else {\n                return Optional.none();\n            }\n        }\n    };\n    const matchAncestor = (isRoot, startNode, scopes) => {\n        // Don't continue to traverse if the start node is the root node\n        if (isRoot(startNode)) {\n            return Optional.none();\n        }\n        else {\n            return ancestor(startNode, (ancestorElem) => {\n                if (isElement$1(ancestorElem)) {\n                    const { contextToolbars, contextForms } = matchTargetWith(ancestorElem, scopes.inNodeScope);\n                    const toolbars = contextForms.length > 0 ? contextForms : filterByPositionForAncestorNode(contextToolbars);\n                    return toolbars.length > 0 ? Optional.some({ elem: ancestorElem, toolbars }) : Optional.none();\n                }\n                else {\n                    return Optional.none();\n                }\n            }, isRoot);\n        }\n    };\n    const lookup$1 = (scopes, editor) => {\n        const rootElem = SugarElement.fromDom(editor.getBody());\n        const isRoot = (elem) => eq(elem, rootElem);\n        const isOutsideRoot = (startNode) => !isRoot(startNode) && !contains(rootElem, startNode);\n        const startNode = SugarElement.fromDom(editor.selection.getNode());\n        // Ensure the lookup doesn't start on a parent or sibling element of the root node\n        if (isOutsideRoot(startNode)) {\n            return Optional.none();\n        }\n        return matchStartNode(startNode, scopes.inNodeScope, scopes.inEditorScope).orThunk(() => matchAncestor(isRoot, startNode, scopes));\n    };\n\n    const categorise = (contextToolbars, navigate) => {\n        // TODO: Use foldl/foldr and avoid as much mutation.\n        const forms = {};\n        const inNodeScope = [];\n        const inEditorScope = [];\n        const formNavigators = {};\n        const lookupTable = {};\n        const registerForm = (key, toolbarSpec) => {\n            const contextForm = getOrDie(createContextForm(toolbarSpec));\n            forms[key] = contextForm;\n            contextForm.launch.map((launch) => {\n                // Use the original here (pre-boulder), because using as a the spec for toolbar buttons\n                formNavigators['form:' + key + ''] = {\n                    ...toolbarSpec.launch,\n                    type: (launch.type === 'contextformtogglebutton' ? 'togglebutton' : 'button'),\n                    onAction: () => {\n                        navigate(contextForm);\n                    }\n                };\n            });\n            if (contextForm.scope === 'editor') {\n                inEditorScope.push(contextForm);\n            }\n            else {\n                inNodeScope.push(contextForm);\n            }\n            lookupTable[key] = contextForm;\n        };\n        const registerToolbar = (key, toolbarSpec) => {\n            createContextToolbar(toolbarSpec).each((contextToolbar) => {\n                if (contextToolbar.launch.isSome()) {\n                    formNavigators['toolbar:' + key + ''] = {\n                        ...toolbarSpec.launch,\n                        type: 'button',\n                        onAction: () => {\n                            navigate(contextToolbar);\n                        }\n                    };\n                }\n                if (toolbarSpec.scope === 'editor') {\n                    inEditorScope.push(contextToolbar);\n                }\n                else {\n                    inNodeScope.push(contextToolbar);\n                }\n                lookupTable[key] = contextToolbar;\n            });\n        };\n        const keys$1 = keys(contextToolbars);\n        each$1(keys$1, (key) => {\n            const toolbarApi = contextToolbars[key];\n            if (toolbarApi.type === 'contextform' || toolbarApi.type === 'contextsliderform' || toolbarApi.type === 'contextsizeinputform') {\n                registerForm(key, toolbarApi);\n            }\n            else if (toolbarApi.type === 'contexttoolbar') {\n                registerToolbar(key, toolbarApi);\n            }\n        });\n        return {\n            forms,\n            inNodeScope,\n            inEditorScope,\n            lookupTable,\n            formNavigators\n        };\n    };\n\n    const transitionClass = 'tox-pop--transition';\n    const isToolbarActionKey = (keyCode) => keyCode === global$1.ENTER || keyCode === global$1.SPACEBAR;\n    const register$a = (editor, registryContextToolbars, sink, extras) => {\n        const backstage = extras.backstage;\n        const sharedBackstage = backstage.shared;\n        const isTouch = detect$1().deviceType.isTouch;\n        const lastElement = value$2();\n        const lastTrigger = value$2();\n        const lastContextPosition = value$2();\n        const contextToolbarResult = renderContextToolbar({\n            sink,\n            onEscape: () => {\n                editor.focus();\n                fireContextToolbarClose(editor);\n                return Optional.some(true);\n            },\n            onHide: () => {\n                fireContextToolbarClose(editor);\n            },\n            onBack: () => {\n                fireContextFormSlideBack(editor);\n            },\n            focusElement: (el) => {\n                if (editor.getBody().contains(el.dom)) {\n                    editor.focus();\n                }\n                else {\n                    focus$4(el);\n                }\n            }\n        });\n        const contextbar = build$1(contextToolbarResult.sketch);\n        const getBounds = () => {\n            const position = lastContextPosition.get().getOr('node');\n            // Use a 1px margin for the bounds to keep the context toolbar from butting directly against\n            // the header, etc... when switching to inset layouts\n            const margin = shouldUseInsetLayouts(position) ? 1 : 0;\n            return getContextToolbarBounds(editor, sharedBackstage, position, margin);\n        };\n        const canLaunchToolbar = () => {\n            // If a mobile context menu is open, don't launch else they'll probably overlap. For android, specifically.\n            return !editor.removed && !(isTouch() && backstage.isContextMenuOpen());\n        };\n        const isSameLaunchElement = (elem) => is$1(lift2(elem, lastElement.get(), eq), true);\n        const shouldContextToolbarHide = () => {\n            if (!canLaunchToolbar()) {\n                return true;\n            }\n            else {\n                const contextToolbarBounds = getBounds();\n                // Get the anchor bounds. For node anchors we should always try to use the last element bounds\n                const anchorBounds = is$1(lastContextPosition.get(), 'node') ?\n                    getAnchorElementBounds(editor, lastElement.get()) :\n                    getSelectionBounds(editor);\n                // If the anchor bounds aren't overlapping with the context toolbar bounds, then the context toolbar\n                // should hide. We want the threshold to require some overlap here (+.01), so that as soon as the\n                // anchor is off-screen, the context toolbar disappers.\n                return contextToolbarBounds.height <= 0 || !isVerticalOverlap(anchorBounds, contextToolbarBounds, 0.01);\n            }\n        };\n        const close = () => {\n            lastElement.clear();\n            lastTrigger.clear();\n            lastContextPosition.clear();\n            InlineView.hide(contextbar);\n        };\n        const hideOrRepositionIfNecessary = () => {\n            if (InlineView.isOpen(contextbar)) {\n                const contextBarEle = contextbar.element;\n                remove$6(contextBarEle, 'display');\n                if (shouldContextToolbarHide()) {\n                    set$7(contextBarEle, 'display', 'none');\n                }\n                else {\n                    lastTrigger.set(0 /* TriggerCause.Reposition */);\n                    InlineView.reposition(contextbar);\n                }\n            }\n        };\n        const wrapInPopDialog = (toolbarSpec) => ({\n            dom: {\n                tag: 'div',\n                classes: ['tox-pop__dialog']\n            },\n            components: [toolbarSpec],\n            behaviours: derive$1([\n                Keying.config({\n                    mode: 'acyclic'\n                }),\n                config('pop-dialog-wrap-events', [\n                    runOnAttached((comp) => {\n                        editor.shortcuts.add('ctrl+F9', 'focus statusbar', () => Keying.focusIn(comp));\n                    }),\n                    runOnDetached((_comp) => {\n                        editor.shortcuts.remove('ctrl+F9');\n                    })\n                ])\n            ])\n        });\n        const navigate = (toolbarApi) => {\n            // ASSUMPTION: This should only ever show one context toolbar since it's used for context forms hence [toolbarApi]\n            const alloySpec = buildToolbar([toolbarApi]);\n            emitWith(contextbar, forwardSlideEvent, {\n                forwardContents: wrapInPopDialog(alloySpec)\n            });\n        };\n        const getScopes = cached(() => categorise(registryContextToolbars, navigate));\n        const buildContextToolbarGroups = (allButtons, ctx) => {\n            return identifyButtons(editor, { buttons: allButtons, toolbar: ctx.items, allowToolbarGroups: false }, extras.backstage, Optional.some(['form:', 'toolbar:']));\n        };\n        const buildContextFormGroups = (ctx, providers) => ContextForm.buildInitGroups(ctx, providers);\n        const buildToolbar = (toolbars) => {\n            const { buttons } = editor.ui.registry.getAll();\n            const scopes = getScopes();\n            const allButtons = { ...buttons, ...scopes.formNavigators };\n            // For context toolbars we don't want to use floating or sliding, so just restrict this\n            // to scrolling or wrapping (default)\n            const toolbarType = getToolbarMode(editor) === ToolbarMode$1.scrolling ? ToolbarMode$1.scrolling : ToolbarMode$1.default;\n            const initGroups = flatten(map$2(toolbars, (ctx) => ctx.type === 'contexttoolbar' ? buildContextToolbarGroups(allButtons, contextToolbarToSpec(ctx)) : buildContextFormGroups(ctx, sharedBackstage.providers)));\n            return renderToolbar({\n                type: toolbarType,\n                uid: generate$6('context-toolbar'),\n                initGroups,\n                onEscape: Optional.none,\n                cyclicKeying: true,\n                providers: sharedBackstage.providers\n            });\n        };\n        const getAnchor = (position, element) => {\n            const anchorage = position === 'node' ? sharedBackstage.anchors.node(element) : sharedBackstage.anchors.cursor();\n            const anchorLayout = getAnchorLayout(editor, position, isTouch(), {\n                lastElement: lastElement.get,\n                isReposition: () => is$1(lastTrigger.get(), 0 /* TriggerCause.Reposition */),\n                getMode: () => Positioning.getMode(sink)\n            });\n            return deepMerge(anchorage, anchorLayout);\n        };\n        const launchContext = (toolbarApi, elem) => {\n            launchContextToolbar.cancel();\n            // Don't launch if the editor has something else open that would conflict\n            if (!canLaunchToolbar()) {\n                return;\n            }\n            const toolbarSpec = buildToolbar(toolbarApi);\n            // TINY-4495 ASSUMPTION: Can only do toolbarApi[0].position because ContextToolbarLookup.filterToolbarsByPosition\n            // ensures all toolbars returned by ContextToolbarLookup have the same position.\n            // And everything else that gets toolbars from elsewhere only returns maximum 1 toolbar\n            const position = toolbarApi[0].position;\n            const anchor = getAnchor(position, elem);\n            lastContextPosition.set(position);\n            lastTrigger.set(1 /* TriggerCause.NewAnchor */);\n            const contextBarEle = contextbar.element;\n            remove$6(contextBarEle, 'display');\n            // Reset placement and transitions when moving to different elements\n            if (!isSameLaunchElement(elem)) {\n                remove$3(contextBarEle, transitionClass);\n                Positioning.reset(sink, contextbar);\n            }\n            // Place the element\n            InlineView.showWithinBounds(contextbar, wrapInPopDialog(toolbarSpec), {\n                anchor,\n                transition: {\n                    classes: [transitionClass],\n                    mode: 'placement'\n                }\n            }, () => Optional.some(getBounds()));\n            // IMPORTANT: This must be stored after the initial render, otherwise the lookup of the last element in the\n            // anchor placement will be incorrect as it'll reuse the new element as the anchor point.\n            elem.fold(lastElement.clear, lastElement.set);\n            // It's possible we may have launched offscreen, if so then hide\n            if (shouldContextToolbarHide()) {\n                set$7(contextBarEle, 'display', 'none');\n            }\n        };\n        const instantReposition = () => {\n            // Sometimes when we reposition the toolbar it might be in a transitioning state and\n            // if we try to reposition while that happens the computed position/width will be incorrect.\n            set$7(contextbar.element, 'transition', 'none');\n            hideOrRepositionIfNecessary();\n            remove$6(contextbar.element, 'transition');\n        };\n        let isDragging = false;\n        const launchContextToolbar = last(() => {\n            // Don't launch if the editor doesn't have focus or has been destroyed\n            if (!editor.hasFocus() || editor.removed || isDragging) {\n                return;\n            }\n            // If currently transitioning then throttle again so we don't interrupt the transition\n            if (has(contextbar.element, transitionClass)) {\n                launchContextToolbar.throttle();\n            }\n            else {\n                const scopes = getScopes();\n                lookup$1(scopes, editor).fold(close, (info) => {\n                    launchContext(info.toolbars, Optional.some(info.elem));\n                });\n            }\n        }, 17); // 17ms is used as that's about 1 frame at 60fps\n        editor.on('init', () => {\n            editor.on('remove', close);\n            editor.on('ScrollContent ScrollWindow ObjectResized ResizeEditor longpress', hideOrRepositionIfNecessary);\n            // FIX: Make it go away when the action makes it go away. E.g. deleting a column deletes the table.\n            editor.on('click focus SetContent', launchContextToolbar.throttle);\n            editor.on('keyup', (e) => {\n                // If you use keyboard to press a button in a subtoolbar then the keyup will happen inside the editor and that should not re-render the toolbar\n                if (!isToolbarActionKey(e.keyCode) || !contextToolbarResult.inSubtoolbar()) {\n                    launchContextToolbar.throttle();\n                }\n            });\n            editor.on(hideContextToolbarEvent, close);\n            editor.on(showContextToolbarEvent, (e) => {\n                const scopes = getScopes();\n                // TODO: Have this stored in a better structure\n                get$h(scopes.lookupTable, e.toolbarKey).each((ctx) => {\n                    // ASSUMPTION: this is only used to open one specific toolbar at a time, hence [ctx]\n                    launchContext([ctx], someIf(e.target !== editor, e.target));\n                    focusIn(contextbar);\n                });\n            });\n            editor.on('focusout', (_e) => {\n                global$a.setEditorTimeout(editor, () => {\n                    if (search(sink.element).isNone() && search(contextbar.element).isNone() && !editor.hasFocus()) {\n                        close();\n                    }\n                }, 0);\n            });\n            editor.on('SwitchMode', () => {\n                if (editor.mode.isReadOnly()) {\n                    close();\n                }\n            });\n            editor.on('DisabledStateChange', (e) => {\n                if (e.state) {\n                    close();\n                }\n            });\n            // TINY-10640: Firefox was flaking in tests and was not properly dismissing the toolbar could not reproduce it manually but adding this seems to resolve it.\n            editor.on('ExecCommand', ({ command }) => {\n                if (command.toLowerCase() === 'toggleview') {\n                    close();\n                }\n            });\n            editor.on('AfterProgressState', (event) => {\n                if (event.state) {\n                    close();\n                }\n                else if (editor.hasFocus()) {\n                    launchContextToolbar.throttle();\n                }\n            });\n            editor.on('dragstart', () => {\n                isDragging = true;\n            });\n            editor.on('dragend drop', () => {\n                isDragging = false;\n            });\n            editor.on('NodeChange', (_e) => {\n                if (!contextToolbarResult.inSubtoolbar()) {\n                    search(contextbar.element).fold(launchContextToolbar.throttle, noop);\n                }\n                else {\n                    instantReposition();\n                }\n            });\n        });\n    };\n\n    const register$9 = (editor) => {\n        const alignToolbarButtons = [\n            { name: 'alignleft', text: 'Align left', cmd: 'JustifyLeft', icon: 'align-left' },\n            { name: 'aligncenter', text: 'Align center', cmd: 'JustifyCenter', icon: 'align-center' },\n            { name: 'alignright', text: 'Align right', cmd: 'JustifyRight', icon: 'align-right' },\n            { name: 'alignjustify', text: 'Justify', cmd: 'JustifyFull', icon: 'align-justify' }\n        ];\n        each$1(alignToolbarButtons, (item) => {\n            editor.ui.registry.addToggleButton(item.name, {\n                tooltip: item.text,\n                icon: item.icon,\n                onAction: onActionExecCommand(editor, item.cmd),\n                onSetup: onSetupStateToggle(editor, item.name)\n            });\n        });\n        editor.ui.registry.addButton('alignnone', {\n            tooltip: 'No alignment',\n            icon: 'align-none',\n            onSetup: onSetupEditableToggle(editor),\n            onAction: onActionExecCommand(editor, 'JustifyNone')\n        });\n    };\n\n    const registerController = (editor, spec) => {\n        const getMenuItems = () => {\n            const options = spec.getOptions(editor);\n            const initial = spec.getCurrent(editor).map(spec.hash);\n            const current = value$2();\n            return map$2(options, (value) => ({\n                type: 'togglemenuitem',\n                text: spec.display(value),\n                onSetup: (api) => {\n                    const setActive = (active) => {\n                        if (active) {\n                            current.on((oldApi) => oldApi.setActive(false));\n                            current.set(api);\n                        }\n                        api.setActive(active);\n                    };\n                    setActive(is$1(initial, spec.hash(value)));\n                    const unbindWatcher = spec.watcher(editor, value, setActive);\n                    return () => {\n                        current.clear();\n                        unbindWatcher();\n                    };\n                },\n                onAction: () => spec.setCurrent(editor, value)\n            }));\n        };\n        editor.ui.registry.addMenuButton(spec.name, {\n            tooltip: spec.text,\n            icon: spec.icon,\n            fetch: (callback) => callback(getMenuItems()),\n            onSetup: spec.onToolbarSetup\n        });\n        editor.ui.registry.addNestedMenuItem(spec.name, {\n            type: 'nestedmenuitem',\n            text: spec.text,\n            getSubmenuItems: getMenuItems,\n            onSetup: spec.onMenuSetup\n        });\n    };\n    const lineHeightSpec = (editor) => ({\n        name: 'lineheight',\n        text: 'Line height',\n        icon: 'line-height',\n        getOptions: getLineHeightFormats,\n        hash: (input) => normalise(input, ['fixed', 'relative', 'empty']).getOr(input),\n        display: identity,\n        watcher: (editor, value, callback) => editor.formatter.formatChanged('lineheight', callback, false, { value }).unbind,\n        getCurrent: (editor) => Optional.from(editor.queryCommandValue('LineHeight')),\n        setCurrent: (editor, value) => editor.execCommand('LineHeight', false, value),\n        onToolbarSetup: onSetupEditableToggle(editor),\n        onMenuSetup: onSetupEditableToggle(editor)\n    });\n    const languageSpec = (editor) => {\n        const settingsOpt = Optional.from(getContentLanguages(editor));\n        return settingsOpt.map((settings) => ({\n            name: 'language',\n            text: 'Language',\n            icon: 'language',\n            getOptions: constant$1(settings),\n            hash: (input) => isUndefined(input.customCode) ? input.code : `${input.code}/${input.customCode}`,\n            display: (input) => input.title,\n            watcher: (editor, value, callback) => editor.formatter.formatChanged('lang', callback, false, { value: value.code, customValue: value.customCode ?? null }).unbind,\n            getCurrent: (editor) => {\n                const node = SugarElement.fromDom(editor.selection.getNode());\n                return closest(node, (n) => Optional.some(n)\n                    .filter(isElement$1)\n                    .bind((ele) => {\n                    const codeOpt = getOpt(ele, 'lang');\n                    return codeOpt.map((code) => {\n                        const customCode = getOpt(ele, 'data-mce-lang').getOrUndefined();\n                        return { code, customCode, title: '' };\n                    });\n                }));\n            },\n            setCurrent: (editor, lang) => editor.execCommand('Lang', false, lang),\n            onToolbarSetup: (api) => {\n                const unbinder = unbindable();\n                api.setActive(editor.formatter.match('lang', {}, undefined, true));\n                unbinder.set(editor.formatter.formatChanged('lang', api.setActive, true));\n                return composeUnbinders(unbinder.clear, onSetupEditableToggle(editor)(api));\n            },\n            onMenuSetup: onSetupEditableToggle(editor)\n        }));\n    };\n    const register$8 = (editor) => {\n        registerController(editor, lineHeightSpec(editor));\n        languageSpec(editor).each((spec) => registerController(editor, spec));\n    };\n\n    const register$7 = (editor, backstage) => {\n        createAlignMenu(editor, backstage);\n        createFontFamilyMenu(editor, backstage);\n        createStylesMenu(editor, backstage);\n        createBlocksMenu(editor, backstage);\n        createFontSizeMenu(editor, backstage);\n    };\n\n    const register$6 = (editor) => {\n        editor.ui.registry.addContext('editable', () => {\n            return editor.selection.isEditable();\n        });\n        editor.ui.registry.addContext('mode', (mode) => {\n            return editor.mode.get() === mode;\n        });\n        editor.ui.registry.addContext('any', always);\n        editor.ui.registry.addContext('formatting', (format) => {\n            return editor.formatter.canApply(format);\n        });\n        editor.ui.registry.addContext('insert', (child) => {\n            return editor.schema.isValidChild(editor.selection.getNode().tagName, child);\n        });\n    };\n\n    const onSetupOutdentState = (editor) => onSetupEvent(editor, 'NodeChange', (api) => {\n        api.setEnabled(editor.queryCommandState('outdent') && editor.selection.isEditable());\n    });\n    const registerButtons$2 = (editor) => {\n        editor.ui.registry.addButton('outdent', {\n            tooltip: 'Decrease indent',\n            icon: 'outdent',\n            onSetup: onSetupOutdentState(editor),\n            onAction: onActionExecCommand(editor, 'outdent')\n        });\n        editor.ui.registry.addButton('indent', {\n            tooltip: 'Increase indent',\n            icon: 'indent',\n            onSetup: onSetupEditableToggle(editor, () => editor.queryCommandState('indent')),\n            onAction: onActionExecCommand(editor, 'indent')\n        });\n    };\n    const register$5 = (editor) => {\n        registerButtons$2(editor);\n    };\n\n    const makeSetupHandler = (editor, pasteAsText) => (api) => {\n        api.setActive(pasteAsText.get());\n        const pastePlainTextToggleHandler = (e) => {\n            pasteAsText.set(e.state);\n            api.setActive(e.state);\n        };\n        editor.on('PastePlainTextToggle', pastePlainTextToggleHandler);\n        return composeUnbinders(() => editor.off('PastePlainTextToggle', pastePlainTextToggleHandler), onSetupEditableToggle(editor)(api));\n    };\n    const register$4 = (editor) => {\n        const pasteAsText = Cell(getPasteAsText(editor));\n        const onAction = () => editor.execCommand('mceTogglePlainTextPaste');\n        editor.ui.registry.addToggleButton('pastetext', {\n            active: false,\n            icon: 'paste-text',\n            tooltip: 'Paste as text',\n            onAction,\n            onSetup: makeSetupHandler(editor, pasteAsText)\n        });\n        editor.ui.registry.addToggleMenuItem('pastetext', {\n            text: 'Paste as text',\n            icon: 'paste-text',\n            onAction,\n            onSetup: makeSetupHandler(editor, pasteAsText)\n        });\n    };\n\n    const onActionToggleFormat = (editor, fmt) => () => {\n        editor.execCommand('mceToggleFormat', false, fmt);\n    };\n    const registerFormatButtons = (editor) => {\n        global$2.each([\n            { name: 'bold', text: 'Bold', icon: 'bold', shortcut: 'Meta+B' },\n            { name: 'italic', text: 'Italic', icon: 'italic', shortcut: 'Meta+I' },\n            { name: 'underline', text: 'Underline', icon: 'underline', shortcut: 'Meta+U' },\n            { name: 'strikethrough', text: 'Strikethrough', icon: 'strike-through' },\n            { name: 'subscript', text: 'Subscript', icon: 'subscript' },\n            { name: 'superscript', text: 'Superscript', icon: 'superscript' }\n        ], (btn, _idx) => {\n            editor.ui.registry.addToggleButton(btn.name, {\n                tooltip: btn.text,\n                icon: btn.icon,\n                onSetup: onSetupStateToggle(editor, btn.name),\n                onAction: onActionToggleFormat(editor, btn.name),\n                shortcut: btn.shortcut\n            });\n        });\n        for (let i = 1; i <= 6; i++) {\n            const name = 'h' + i;\n            const shortcut = `Access+${i}`;\n            editor.ui.registry.addToggleButton(name, {\n                text: name.toUpperCase(),\n                tooltip: 'Heading ' + i,\n                onSetup: onSetupStateToggle(editor, name),\n                onAction: onActionToggleFormat(editor, name),\n                shortcut\n            });\n        }\n    };\n    const registerCommandButtons = (editor) => {\n        global$2.each([\n            { name: 'copy', text: 'Copy', action: 'Copy', icon: 'copy', context: 'any' },\n            { name: 'help', text: 'Help', action: 'mceHelp', icon: 'help', shortcut: 'Alt+0', context: 'any' },\n            { name: 'selectall', text: 'Select all', action: 'SelectAll', icon: 'select-all', shortcut: 'Meta+A', context: 'any' },\n            { name: 'newdocument', text: 'New document', action: 'mceNewDocument', icon: 'new-document' },\n            { name: 'print', text: 'Print', action: 'mcePrint', icon: 'print', shortcut: 'Meta+P', context: 'any' },\n        ], (btn) => {\n            editor.ui.registry.addButton(btn.name, {\n                tooltip: btn.text,\n                icon: btn.icon,\n                onAction: onActionExecCommand(editor, btn.action),\n                shortcut: btn.shortcut,\n                context: btn.context\n            });\n        });\n        global$2.each([\n            { name: 'cut', text: 'Cut', action: 'Cut', icon: 'cut' },\n            { name: 'paste', text: 'Paste', action: 'Paste', icon: 'paste' },\n            // visualaid was here but also exists in VisualAid.ts?\n            { name: 'removeformat', text: 'Clear formatting', action: 'RemoveFormat', icon: 'remove-formatting' },\n            { name: 'remove', text: 'Remove', action: 'Delete', icon: 'remove' },\n            { name: 'hr', text: 'Horizontal line', action: 'InsertHorizontalRule', icon: 'horizontal-rule' }\n        ], (btn) => {\n            editor.ui.registry.addButton(btn.name, {\n                tooltip: btn.text,\n                icon: btn.icon,\n                onSetup: onSetupEditableToggle(editor),\n                onAction: onActionExecCommand(editor, btn.action)\n            });\n        });\n    };\n    const registerCommandToggleButtons = (editor) => {\n        global$2.each([\n            { name: 'blockquote', text: 'Blockquote', action: 'mceBlockQuote', icon: 'quote' }\n        ], (btn) => {\n            editor.ui.registry.addToggleButton(btn.name, {\n                tooltip: btn.text,\n                icon: btn.icon,\n                onAction: onActionExecCommand(editor, btn.action),\n                onSetup: onSetupStateToggle(editor, btn.name)\n            });\n        });\n    };\n    const registerButtons$1 = (editor) => {\n        registerFormatButtons(editor);\n        registerCommandButtons(editor);\n        registerCommandToggleButtons(editor);\n    };\n    const registerMenuItems$2 = (editor) => {\n        global$2.each([\n            { name: 'newdocument', text: 'New document', action: 'mceNewDocument', icon: 'new-document' },\n            { name: 'copy', text: 'Copy', action: 'Copy', icon: 'copy', shortcut: 'Meta+C', context: 'any' },\n            { name: 'selectall', text: 'Select all', action: 'SelectAll', icon: 'select-all', shortcut: 'Meta+A', context: 'any' },\n            { name: 'print', text: 'Print...', action: 'mcePrint', icon: 'print', shortcut: 'Meta+P', context: 'any' }\n        ], (menuitem) => {\n            editor.ui.registry.addMenuItem(menuitem.name, {\n                text: menuitem.text,\n                icon: menuitem.icon,\n                shortcut: menuitem.shortcut,\n                onAction: onActionExecCommand(editor, menuitem.action),\n                context: menuitem.context\n            });\n        });\n        global$2.each([\n            { name: 'bold', text: 'Bold', action: 'Bold', icon: 'bold', shortcut: 'Meta+B' },\n            { name: 'italic', text: 'Italic', action: 'Italic', icon: 'italic', shortcut: 'Meta+I' },\n            { name: 'underline', text: 'Underline', action: 'Underline', icon: 'underline', shortcut: 'Meta+U' },\n            { name: 'strikethrough', text: 'Strikethrough', action: 'Strikethrough', icon: 'strike-through' },\n            { name: 'subscript', text: 'Subscript', action: 'Subscript', icon: 'subscript' },\n            { name: 'superscript', text: 'Superscript', action: 'Superscript', icon: 'superscript' },\n            { name: 'removeformat', text: 'Clear formatting', action: 'RemoveFormat', icon: 'remove-formatting' },\n            { name: 'cut', text: 'Cut', action: 'Cut', icon: 'cut', shortcut: 'Meta+X' },\n            { name: 'paste', text: 'Paste', action: 'Paste', icon: 'paste', shortcut: 'Meta+V' },\n            { name: 'hr', text: 'Horizontal line', action: 'InsertHorizontalRule', icon: 'horizontal-rule' }\n        ], (menuitem) => {\n            editor.ui.registry.addMenuItem(menuitem.name, {\n                text: menuitem.text,\n                icon: menuitem.icon,\n                shortcut: menuitem.shortcut,\n                onSetup: onSetupEditableToggle(editor),\n                onAction: onActionExecCommand(editor, menuitem.action)\n            });\n        });\n        editor.ui.registry.addMenuItem('codeformat', {\n            text: 'Code',\n            icon: 'sourcecode',\n            onSetup: onSetupEditableToggle(editor),\n            onAction: onActionToggleFormat(editor, 'code')\n        });\n    };\n    const register$3 = (editor) => {\n        registerButtons$1(editor);\n        registerMenuItems$2(editor);\n    };\n\n    const onSetupUndoRedoState = (editor, type) => onSetupEvent(editor, 'Undo Redo AddUndo TypingUndo ClearUndos SwitchMode', (api) => {\n        api.setEnabled(!editor.mode.isReadOnly() && editor.undoManager[type]());\n    });\n    const registerMenuItems$1 = (editor) => {\n        editor.ui.registry.addMenuItem('undo', {\n            text: 'Undo',\n            icon: 'undo',\n            shortcut: 'Meta+Z',\n            onSetup: onSetupUndoRedoState(editor, 'hasUndo'),\n            onAction: onActionExecCommand(editor, 'undo')\n        });\n        editor.ui.registry.addMenuItem('redo', {\n            text: 'Redo',\n            icon: 'redo',\n            shortcut: 'Meta+Y',\n            onSetup: onSetupUndoRedoState(editor, 'hasRedo'),\n            onAction: onActionExecCommand(editor, 'redo')\n        });\n    };\n    // Note: The undo/redo buttons are disabled by default here, as they'll be rendered\n    // on init generally and it won't have any undo levels at that stage.\n    const registerButtons = (editor) => {\n        editor.ui.registry.addButton('undo', {\n            tooltip: 'Undo',\n            icon: 'undo',\n            enabled: false,\n            onSetup: onSetupUndoRedoState(editor, 'hasUndo'),\n            onAction: onActionExecCommand(editor, 'undo'),\n            shortcut: 'Meta+Z'\n        });\n        editor.ui.registry.addButton('redo', {\n            tooltip: 'Redo',\n            icon: 'redo',\n            enabled: false,\n            onSetup: onSetupUndoRedoState(editor, 'hasRedo'),\n            onAction: onActionExecCommand(editor, 'redo'),\n            shortcut: 'Meta+Y'\n        });\n    };\n    const register$2 = (editor) => {\n        registerMenuItems$1(editor);\n        registerButtons(editor);\n    };\n\n    const onSetupVisualAidState = (editor) => onSetupEvent(editor, 'VisualAid', (api) => {\n        api.setActive(editor.hasVisual);\n    });\n    const registerMenuItems = (editor) => {\n        editor.ui.registry.addToggleMenuItem('visualaid', {\n            text: 'Visual aids',\n            onSetup: onSetupVisualAidState(editor),\n            onAction: onActionExecCommand(editor, 'mceToggleVisualAid'),\n            context: 'any'\n        });\n    };\n    const registerToolbarButton = (editor) => {\n        editor.ui.registry.addButton('visualaid', {\n            tooltip: 'Visual aids',\n            text: 'Visual aids',\n            onAction: onActionExecCommand(editor, 'mceToggleVisualAid'),\n            context: 'any'\n        });\n    };\n    const register$1 = (editor) => {\n        registerToolbarButton(editor);\n        registerMenuItems(editor);\n    };\n\n    const setup$6 = (editor, backstage) => {\n        register$9(editor);\n        register$3(editor);\n        register$7(editor, backstage);\n        register$2(editor);\n        register$d(editor);\n        register$1(editor);\n        register$5(editor);\n        register$8(editor);\n        register$4(editor);\n        register$6(editor);\n    };\n\n    const patchPipeConfig = (config) => isString(config) ? config.split(/[ ,]/) : config;\n    const option = (name) => (editor) => editor.options.get(name);\n    const register = (editor) => {\n        const registerOption = editor.options.register;\n        registerOption('contextmenu_avoid_overlap', {\n            processor: 'string',\n            default: ''\n        });\n        registerOption('contextmenu_never_use_native', {\n            processor: 'boolean',\n            default: false\n        });\n        registerOption('contextmenu', {\n            processor: (value) => {\n                if (value === false) {\n                    return { value: [], valid: true };\n                }\n                else if (isString(value) || isArrayOf(value, isString)) {\n                    return { value: patchPipeConfig(value), valid: true };\n                }\n                else {\n                    return { valid: false, message: 'Must be false or a string.' };\n                }\n            },\n            default: 'link linkchecker image editimage table spellchecker configurepermanentpen'\n        });\n    };\n    const shouldNeverUseNative = option('contextmenu_never_use_native');\n    const getAvoidOverlapSelector = option('contextmenu_avoid_overlap');\n    const isContextMenuDisabled = (editor) => getContextMenu(editor).length === 0;\n    const getContextMenu = (editor) => {\n        const contextMenus = editor.ui.registry.getAll().contextMenus;\n        const contextMenu = editor.options.get('contextmenu');\n        if (editor.options.isSet('contextmenu')) {\n            return contextMenu;\n        }\n        else {\n            // Filter default context menu items when they are not in the registry (e.g. when the plugin is not loaded)\n            return filter$2(contextMenu, (item) => has$2(contextMenus, item));\n        }\n    };\n\n    const nu = (x, y) => ({\n        type: 'makeshift',\n        x,\n        y\n    });\n    const transpose = (pos, dx, dy) => {\n        return nu(pos.x + dx, pos.y + dy);\n    };\n    const isTouchEvent$1 = (e) => e.type === 'longpress' || e.type.indexOf('touch') === 0;\n    const fromPageXY = (e) => {\n        if (isTouchEvent$1(e)) {\n            const touch = e.touches[0];\n            return nu(touch.pageX, touch.pageY);\n        }\n        else {\n            return nu(e.pageX, e.pageY);\n        }\n    };\n    const fromClientXY = (e) => {\n        if (isTouchEvent$1(e)) {\n            const touch = e.touches[0];\n            return nu(touch.clientX, touch.clientY);\n        }\n        else {\n            return nu(e.clientX, e.clientY);\n        }\n    };\n    const transposeContentAreaContainer = (element, pos) => {\n        const containerPos = global$9.DOM.getPos(element);\n        return transpose(pos, containerPos.x, containerPos.y);\n    };\n    const getPointAnchor = (editor, e) => {\n        // If the contextmenu event is fired via the editor.dispatch() API or some other means, fall back to selection anchor\n        if (e.type === 'contextmenu' || e.type === 'longpress') {\n            if (editor.inline) {\n                return fromPageXY(e);\n            }\n            else {\n                return transposeContentAreaContainer(editor.getContentAreaContainer(), fromClientXY(e));\n            }\n        }\n        else {\n            return getSelectionAnchor(editor);\n        }\n    };\n    const getSelectionAnchor = (editor) => {\n        return {\n            type: 'selection',\n            root: SugarElement.fromDom(editor.selection.getNode())\n        };\n    };\n    const getNodeAnchor = (editor) => ({\n        type: 'node',\n        node: Optional.some(SugarElement.fromDom(editor.selection.getNode())),\n        root: SugarElement.fromDom(editor.getBody())\n    });\n    const getAnchorSpec$1 = (editor, e, anchorType) => {\n        switch (anchorType) {\n            case 'node':\n                return getNodeAnchor(editor);\n            case 'point':\n                return getPointAnchor(editor, e);\n            case 'selection':\n                return getSelectionAnchor(editor);\n        }\n    };\n\n    const initAndShow$1 = (editor, e, buildMenu, backstage, contextmenu, anchorType) => {\n        const items = buildMenu();\n        const anchorSpec = getAnchorSpec$1(editor, e, anchorType);\n        build(items, ItemResponse$1.CLOSE_ON_EXECUTE, backstage, {\n            isHorizontalMenu: false,\n            search: Optional.none()\n        }).map((menuData) => {\n            e.preventDefault();\n            // show the context menu, with items set to close on click\n            InlineView.showMenuAt(contextmenu, { anchor: anchorSpec }, {\n                menu: {\n                    markers: markers('normal')\n                },\n                data: menuData\n            });\n        });\n    };\n\n    const layouts = {\n        onLtr: () => [south$2, southeast$2, southwest$2, northeast$2, northwest$2, north$2,\n            north$1, south$1, northeast$1, southeast$1, northwest$1, southwest$1],\n        onRtl: () => [south$2, southwest$2, southeast$2, northwest$2, northeast$2, north$2,\n            north$1, south$1, northwest$1, southwest$1, northeast$1, southeast$1]\n    };\n    const bubbleSize = 12;\n    const bubbleAlignments = {\n        valignCentre: [],\n        alignCentre: [],\n        alignLeft: ['tox-pop--align-left'],\n        alignRight: ['tox-pop--align-right'],\n        right: ['tox-pop--right'],\n        left: ['tox-pop--left'],\n        bottom: ['tox-pop--bottom'],\n        top: ['tox-pop--top']\n    };\n    const isTouchWithinSelection = (editor, e) => {\n        const selection = editor.selection;\n        if (selection.isCollapsed() || e.touches.length < 1) {\n            return false;\n        }\n        else {\n            const touch = e.touches[0];\n            const rng = selection.getRng();\n            const rngRectOpt = getFirstRect(editor.getWin(), SimSelection.domRange(rng));\n            return rngRectOpt.exists((rngRect) => rngRect.left <= touch.clientX &&\n                rngRect.right >= touch.clientX &&\n                rngRect.top <= touch.clientY &&\n                rngRect.bottom >= touch.clientY);\n        }\n    };\n    const setupiOSOverrides = (editor) => {\n        // iOS will change the selection due to longpress also being a range selection gesture. As such we\n        // need to reset the selection back to the original selection after the touchend event has fired\n        const originalSelection = editor.selection.getRng();\n        const selectionReset = () => {\n            global$a.setEditorTimeout(editor, () => {\n                editor.selection.setRng(originalSelection);\n            }, 10);\n            unbindEventListeners();\n        };\n        editor.once('touchend', selectionReset);\n        // iPadOS will trigger a mousedown after the longpress which will close open context menus\n        // so we want to prevent that from running\n        const preventMousedown = (e) => {\n            e.preventDefault();\n            e.stopImmediatePropagation();\n        };\n        editor.on('mousedown', preventMousedown, true);\n        // If a longpresscancel is fired, then a touchmove has occurred so we shouldn't do any overrides\n        const clearSelectionReset = () => unbindEventListeners();\n        editor.once('longpresscancel', clearSelectionReset);\n        const unbindEventListeners = () => {\n            editor.off('touchend', selectionReset);\n            editor.off('longpresscancel', clearSelectionReset);\n            editor.off('mousedown', preventMousedown);\n        };\n    };\n    const getAnchorSpec = (editor, e, anchorType) => {\n        const anchorSpec = getAnchorSpec$1(editor, e, anchorType);\n        const bubbleYOffset = anchorType === 'point' ? bubbleSize : 0;\n        return {\n            bubble: nu$6(0, bubbleYOffset, bubbleAlignments),\n            layouts,\n            overrides: {\n                maxWidthFunction: expandable(),\n                maxHeightFunction: expandable$1()\n            },\n            ...anchorSpec\n        };\n    };\n    const show = (editor, e, items, backstage, contextmenu, anchorType, highlightImmediately) => {\n        const anchorSpec = getAnchorSpec(editor, e, anchorType);\n        build(items, ItemResponse$1.CLOSE_ON_EXECUTE, backstage, {\n            // MobileContextMenus are the *only* horizontal menus currently (2022-08-16)\n            isHorizontalMenu: true,\n            search: Optional.none()\n        }).map((menuData) => {\n            e.preventDefault();\n            // If we are highlighting immediately, then we want to highlight the menu\n            // and the item. Otherwise, we don't want to highlight anything.\n            const highlightOnOpen = highlightImmediately\n                ? HighlightOnOpen.HighlightMenuAndItem\n                : HighlightOnOpen.HighlightNone;\n            // Show the context menu, with items set to close on click\n            InlineView.showMenuWithinBounds(contextmenu, { anchor: anchorSpec }, {\n                menu: {\n                    markers: markers('normal'),\n                    highlightOnOpen\n                },\n                data: menuData,\n                type: 'horizontal'\n            }, () => Optional.some(getContextToolbarBounds(editor, backstage.shared, anchorType === 'node' ? 'node' : 'selection')));\n            // Ensure the context toolbar is hidden\n            editor.dispatch(hideContextToolbarEvent);\n        });\n    };\n    const initAndShow = (editor, e, buildMenu, backstage, contextmenu, anchorType) => {\n        const detection = detect$1();\n        const isiOS = detection.os.isiOS();\n        const isMacOS = detection.os.isMacOS();\n        const isAndroid = detection.os.isAndroid();\n        const isTouch = detection.deviceType.isTouch();\n        const shouldHighlightImmediately = () => !(isAndroid || isiOS || (isMacOS && isTouch));\n        const open = () => {\n            const items = buildMenu();\n            show(editor, e, items, backstage, contextmenu, anchorType, shouldHighlightImmediately());\n        };\n        // On iOS/iPadOS if we've long pressed on a ranged selection then we've already selected the content\n        // and just need to open the menu. Otherwise we need to wait for a selection change to occur as long\n        // press triggers a ranged selection on iOS.\n        if ((isMacOS || isiOS) && anchorType !== 'node') {\n            const openiOS = () => {\n                setupiOSOverrides(editor);\n                open();\n            };\n            if (isTouchWithinSelection(editor, e)) {\n                openiOS();\n            }\n            else {\n                editor.once('selectionchange', openiOS);\n                editor.once('touchend', () => editor.off('selectionchange', openiOS));\n            }\n        }\n        else {\n            open();\n        }\n    };\n\n    const isSeparator = (item) => isString(item) ? item === '|' : item.type === 'separator';\n    const separator = {\n        type: 'separator'\n    };\n    const makeContextItem = (item) => {\n        const commonMenuItem = (item) => ({\n            text: item.text,\n            icon: item.icon,\n            enabled: item.enabled,\n            shortcut: item.shortcut,\n        });\n        if (isString(item)) {\n            return item;\n        }\n        else {\n            switch (item.type) {\n                case 'separator':\n                    return separator;\n                case 'submenu':\n                    return {\n                        type: 'nestedmenuitem',\n                        ...commonMenuItem(item),\n                        getSubmenuItems: () => {\n                            const items = item.getSubmenuItems();\n                            if (isString(items)) {\n                                return items;\n                            }\n                            else {\n                                return map$2(items, makeContextItem);\n                            }\n                        }\n                    };\n                default:\n                    // case 'item', or anything else really\n                    const commonItem = item;\n                    return {\n                        type: 'menuitem',\n                        ...commonMenuItem(commonItem),\n                        // disconnect the function from the menu item API bridge defines\n                        onAction: noarg(commonItem.onAction)\n                    };\n            }\n        }\n    };\n    const addContextMenuGroup = (xs, groupItems) => {\n        // Skip if there are no items\n        if (groupItems.length === 0) {\n            return xs;\n        }\n        // Only add a separator at the beginning if the last item isn't a separator\n        const lastMenuItem = last$1(xs).filter((item) => !isSeparator(item));\n        const before = lastMenuItem.fold(() => [], (_) => [separator]);\n        return xs.concat(before).concat(groupItems).concat([separator]);\n    };\n    const generateContextMenu = (contextMenus, menuConfig, selectedElement) => {\n        const sections = foldl(menuConfig, (acc, name) => {\n            // Either read and convert the list of items out of the plugin, or assume it's a standard menu item reference\n            return get$h(contextMenus, name.toLowerCase()).map((menu) => {\n                const items = menu.update(selectedElement);\n                if (isString(items) && isNotEmpty(trim$1(items))) {\n                    return addContextMenuGroup(acc, items.split(' '));\n                }\n                else if (isArray(items) && items.length > 0) {\n                    // TODO: Should we add a StructureSchema check here?\n                    const allItems = map$2(items, makeContextItem);\n                    return addContextMenuGroup(acc, allItems);\n                }\n                else {\n                    return acc;\n                }\n            }).getOrThunk(() => acc.concat([name]));\n        }, []);\n        // Strip off any trailing separator\n        if (sections.length > 0 && isSeparator(sections[sections.length - 1])) {\n            sections.pop();\n        }\n        return sections;\n    };\n    const isNativeOverrideKeyEvent = (editor, e) => e.ctrlKey && !shouldNeverUseNative(editor);\n    const isTouchEvent = (e) => e.type === 'longpress' || has$2(e, 'touches');\n    const isTriggeredByKeyboard = (editor, e) => \n    // Different browsers trigger the context menu from keyboards differently, so need to check various different things here.\n    // If a longpress touch event, always treat it as a pointer event\n    // Chrome: button = 0, pointerType = undefined & target = the selection range node\n    // Firefox: button = 0, pointerType = undefined & target = body\n    // Safari: N/A (Mac's don't expose a contextmenu keyboard shortcut)\n    !isTouchEvent(e) && (e.button !== 2 || e.target === editor.getBody() && e.pointerType === '');\n    const getSelectedElement = (editor, e) => isTriggeredByKeyboard(editor, e) ? editor.selection.getStart(true) : e.target;\n    const getAnchorType = (editor, e) => {\n        const selector = getAvoidOverlapSelector(editor);\n        const anchorType = isTriggeredByKeyboard(editor, e) ? 'selection' : 'point';\n        if (isNotEmpty(selector)) {\n            const target = getSelectedElement(editor, e);\n            const selectorExists = closest$1(SugarElement.fromDom(target), selector);\n            return selectorExists ? 'node' : anchorType;\n        }\n        else {\n            return anchorType;\n        }\n    };\n    const setup$5 = (editor, lazySink, backstage) => {\n        const detection = detect$1();\n        const isTouch = detection.deviceType.isTouch;\n        const contextmenu = build$1(InlineView.sketch({\n            dom: {\n                tag: 'div'\n            },\n            lazySink,\n            onEscape: () => editor.focus(),\n            onShow: () => backstage.setContextMenuState(true),\n            onHide: () => backstage.setContextMenuState(false),\n            fireDismissalEventInstead: {},\n            inlineBehaviours: derive$1([\n                config('dismissContextMenu', [\n                    run$1(dismissRequested(), (comp, _se) => {\n                        Sandboxing.close(comp);\n                        editor.focus();\n                    })\n                ])\n            ])\n        }));\n        const hideContextMenu = () => InlineView.hide(contextmenu);\n        const showContextMenu = (e) => {\n            // Prevent the default if we should never use native\n            if (shouldNeverUseNative(editor)) {\n                e.preventDefault();\n            }\n            if (isNativeOverrideKeyEvent(editor, e) || isContextMenuDisabled(editor)) {\n                return;\n            }\n            const anchorType = getAnchorType(editor, e);\n            const buildMenu = () => {\n                // Use the event target element for touch events, otherwise fallback to the current selection\n                const selectedElement = getSelectedElement(editor, e);\n                const registry = editor.ui.registry.getAll();\n                const menuConfig = getContextMenu(editor);\n                return generateContextMenu(registry.contextMenus, menuConfig, selectedElement);\n            };\n            const initAndShow$2 = isTouch() ? initAndShow : initAndShow$1;\n            initAndShow$2(editor, e, buildMenu, backstage, contextmenu, anchorType);\n        };\n        editor.on('init', () => {\n            // Hide the context menu when scrolling or resizing\n            // Except ResizeWindow on mobile which fires when the keyboard appears/disappears\n            const hideEvents = 'ResizeEditor ScrollContent ScrollWindow longpresscancel' + (isTouch() ? '' : ' ResizeWindow');\n            editor.on(hideEvents, hideContextMenu);\n            editor.on('longpress contextmenu', showContextMenu);\n        });\n    };\n\n    const snapWidth = 40;\n    const snapOffset = snapWidth / 2;\n    // const insertDebugDiv = (left, top, width, height, color, clazz) => {\n    //   const debugArea = SugarElement.fromHtml(`<div class=\"${clazz}\"></div>`);\n    //   Css.setAll(debugArea, {\n    //     'left': left.toString() + 'px',\n    //     'top': top.toString() + 'px',\n    //     'background-color': color,\n    //     'position': 'absolute',\n    //     'width': width.toString() + 'px',\n    //     'height': height.toString() + 'px',\n    //     'opacity': '0.2'\n    //   });\n    //   Insert.append(SugarBody.body(), debugArea);\n    // };\n    const calcSnap = (selectorOpt, td, x, y, width, height) => selectorOpt.fold(() => Dragging.snap({\n        sensor: absolute$1(x - snapOffset, y - snapOffset),\n        range: SugarPosition(width, height),\n        output: absolute$1(Optional.some(x), Optional.some(y)),\n        extra: {\n            td\n        }\n    }), (selectorHandle) => {\n        const sensorLeft = x - snapOffset;\n        const sensorTop = y - snapOffset;\n        const sensorWidth = snapWidth; // box.width();\n        const sensorHeight = snapWidth; // box.height();\n        const rect = selectorHandle.element.dom.getBoundingClientRect();\n        // insertDebugDiv(sensorLeft, sensorTop, sensorWidth, sensorHeight, 'green', 'top-left-snap-debug');\n        return Dragging.snap({\n            sensor: absolute$1(sensorLeft, sensorTop),\n            range: SugarPosition(sensorWidth, sensorHeight),\n            output: absolute$1(Optional.some(x - (rect.width / 2)), Optional.some(y - (rect.height / 2))),\n            extra: {\n                td\n            }\n        });\n    });\n    const getSnapsConfig = (getSnapPoints, cell, onChange) => {\n        // Can't use Optional.is() here since we need to do a dom compare, not an equality compare\n        const isSameCell = (cellOpt, td) => cellOpt.exists((currentTd) => eq(currentTd, td));\n        return {\n            getSnapPoints,\n            leftAttr: 'data-drag-left',\n            topAttr: 'data-drag-top',\n            onSensor: (component, extra) => {\n                const td = extra.td;\n                if (!isSameCell(cell.get(), td)) {\n                    cell.set(td);\n                    onChange(td);\n                }\n            },\n            mustSnap: true\n        };\n    };\n    const createSelector = (snaps) => record(Button.sketch({\n        dom: {\n            tag: 'div',\n            classes: ['tox-selector']\n        },\n        buttonBehaviours: derive$1([\n            Dragging.config({\n                mode: 'mouseOrTouch',\n                blockerClass: 'blocker',\n                snaps\n            }),\n            Unselecting.config({})\n        ]),\n        eventOrder: {\n            // Because this is a button, allow dragging. It will stop clicking.\n            mousedown: ['dragging', 'alloy.base.behaviour'],\n            touchstart: ['dragging', 'alloy.base.behaviour']\n        }\n    }));\n    const setup$4 = (editor, sink) => {\n        const tlTds = Cell([]);\n        const brTds = Cell([]);\n        const isVisible = Cell(false);\n        const startCell = value$2();\n        const finishCell = value$2();\n        const getTopLeftSnap = (td) => {\n            const box = absolute$2(td);\n            return calcSnap(memTopLeft.getOpt(sink), td, box.x, box.y, box.width, box.height);\n        };\n        const getTopLeftSnaps = () => \n        // const body = SugarBody.body();\n        // const debugs = SelectorFilter.descendants(body, '.top-left-snap-debug');\n        // Arr.each(debugs, (debugArea) => {\n        //   Remove.remove(debugArea);\n        // });\n        map$2(tlTds.get(), (td) => getTopLeftSnap(td));\n        const getBottomRightSnap = (td) => {\n            const box = absolute$2(td);\n            return calcSnap(memBottomRight.getOpt(sink), td, box.right, box.bottom, box.width, box.height);\n        };\n        const getBottomRightSnaps = () => \n        // const body = SugarBody.body();\n        // const debugs = SelectorFilter.descendants(body, '.bottom-right-snap-debug');\n        // Arr.each(debugs, (debugArea) => {\n        //   Remove.remove(debugArea);\n        // });\n        map$2(brTds.get(), (td) => getBottomRightSnap(td));\n        const topLeftSnaps = getSnapsConfig(getTopLeftSnaps, startCell, (start) => {\n            finishCell.get().each((finish) => {\n                editor.dispatch('TableSelectorChange', { start, finish });\n            });\n        });\n        const bottomRightSnaps = getSnapsConfig(getBottomRightSnaps, finishCell, (finish) => {\n            startCell.get().each((start) => {\n                editor.dispatch('TableSelectorChange', { start, finish });\n            });\n        });\n        const memTopLeft = createSelector(topLeftSnaps);\n        const memBottomRight = createSelector(bottomRightSnaps);\n        const topLeft = build$1(memTopLeft.asSpec());\n        const bottomRight = build$1(memBottomRight.asSpec());\n        const showOrHideHandle = (selector, cell, isAbove, isBelow) => {\n            const cellRect = cell.dom.getBoundingClientRect();\n            remove$6(selector.element, 'display');\n            const viewportHeight = defaultView(SugarElement.fromDom(editor.getBody())).dom.innerHeight;\n            const aboveViewport = isAbove(cellRect);\n            const belowViewport = isBelow(cellRect, viewportHeight);\n            if (aboveViewport || belowViewport) {\n                set$7(selector.element, 'display', 'none');\n            }\n        };\n        const snapTo = (selector, cell, getSnapConfig, pos) => {\n            const snap = getSnapConfig(cell);\n            Dragging.snapTo(selector, snap);\n            const isAbove = (rect) => rect[pos] < 0;\n            const isBelow = (rect, viewportHeight) => rect[pos] > viewportHeight;\n            showOrHideHandle(selector, cell, isAbove, isBelow);\n        };\n        const snapTopLeft = (cell) => snapTo(topLeft, cell, getTopLeftSnap, 'top');\n        const snapLastTopLeft = () => startCell.get().each(snapTopLeft);\n        const snapBottomRight = (cell) => snapTo(bottomRight, cell, getBottomRightSnap, 'bottom');\n        const snapLastBottomRight = () => finishCell.get().each(snapBottomRight);\n        // TODO: Make this work for desktop maybe?\n        if (detect$1().deviceType.isTouch()) {\n            const domToSugar = (arr) => map$2(arr, SugarElement.fromDom);\n            editor.on('TableSelectionChange', (e) => {\n                if (!isVisible.get()) {\n                    attach(sink, topLeft);\n                    attach(sink, bottomRight);\n                    isVisible.set(true);\n                }\n                const start = SugarElement.fromDom(e.start);\n                const finish = SugarElement.fromDom(e.finish);\n                startCell.set(start);\n                finishCell.set(finish);\n                Optional.from(e.otherCells).each((otherCells) => {\n                    tlTds.set(domToSugar(otherCells.upOrLeftCells));\n                    brTds.set(domToSugar(otherCells.downOrRightCells));\n                    snapTopLeft(start);\n                    snapBottomRight(finish);\n                });\n            });\n            editor.on('ResizeEditor ResizeWindow ScrollContent', () => {\n                snapLastTopLeft();\n                snapLastBottomRight();\n            });\n            editor.on('TableSelectionClear', () => {\n                if (isVisible.get()) {\n                    detach(topLeft);\n                    detach(bottomRight);\n                    isVisible.set(false);\n                }\n                startCell.clear();\n                finishCell.clear();\n            });\n        }\n    };\n\n    var Logo = \"<svg height=\\\"16\\\" viewBox=\\\"0 0 80 16\\\" width=\\\"80\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><g opacity=\\\".8\\\"><path d=\\\"m80 3.537v-2.202h-7.976v11.585h7.976v-2.25h-5.474v-2.621h4.812v-2.069h-4.812v-2.443zm-10.647 6.929c-.493.217-1.13.337-1.864.337s-1.276-.156-1.805-.47a3.732 3.732 0 0 1 -1.3-1.298c-.324-.554-.48-1.191-.48-1.877s.156-1.335.48-1.877a3.635 3.635 0 0 1 1.3-1.299 3.466 3.466 0 0 1 1.805-.481c.65 0 .914.06 1.263.18.36.12.698.277.986.47.289.192.578.384.842.6l.12.085v-2.586l-.023-.024c-.385-.35-.855-.614-1.384-.818-.53-.205-1.155-.313-1.877-.313-.721 0-1.6.144-2.333.445a5.773 5.773 0 0 0 -1.937 1.251 5.929 5.929 0 0 0 -1.324 1.9c-.324.735-.48 1.565-.48 2.455s.156 1.72.48 2.454c.325.734.758 1.383 1.324 1.913.553.53 1.215.938 1.937 1.25a6.286 6.286 0 0 0 2.333.434c.819 0 1.384-.108 1.961-.313.59-.216 1.083-.505 1.468-.866l.024-.024v-2.49l-.12.096c-.41.337-.878.626-1.396.866zm-14.869-4.15-4.8-5.04-.024-.025h-.902v11.67h2.502v-6.847l2.827 3.08.385.409.397-.41 2.791-3.067v6.845h2.502v-11.679h-.902l-4.788 5.052z\\\"/><path clip-rule=\\\"evenodd\\\" d=\\\"m15.543 5.137c0-3.032-2.466-5.113-4.957-5.137-.36 0-.745.024-1.094.096-.157.024-3.85.758-3.85.758-3.032.602-4.62 2.466-4.704 4.788-.024.89-.024 4.27-.024 4.27.036 3.165 2.406 5.138 5.017 5.126.337 0 1.119-.109 1.287-.145.144-.024.385-.084.746-.144.661-.12 1.684-.325 3.067-.602 2.37-.409 4.103-2.009 4.44-4.33.156-1.023.084-4.692.084-4.692zm-3.213 3.308-2.346.457v2.31l-5.859 1.143v-5.75l2.346-.458v3.441l3.513-.686v-3.44l-3.513.685v-2.297l5.859-1.143v5.75zm20.09-3.296-.083-1.023h-2.13v8.794h2.346v-4.884c0-1.107.95-1.985 2.057-1.997 1.095 0 1.901.89 1.901 1.997v4.884h2.346v-5.245c-.012-2.105-1.588-3.777-3.67-3.765a3.764 3.764 0 0 0 -2.778 1.25l.012-.011zm-6.014-4.102 2.346-.458v2.298l-2.346.457z\\\" fill-rule=\\\"evenodd\\\"/><path d=\\\"m28.752 4.126h-2.346v8.794h2.346z\\\"/><path clip-rule=\\\"evenodd\\\" d=\\\"m43.777 15.483 4.043-11.357h-2.418l-1.54 4.355-.445 1.324-.36-1.324-1.54-4.355h-2.418l3.151 8.794-1.083 3.08zm-21.028-5.51c0 .722.541 1.034.878 1.034s.638-.048.95-.144l.518 1.708c-.217.145-.879.518-2.13.518a2.565 2.565 0 0 1 -2.562-2.587c-.024-1.082-.024-2.49 0-4.21h-1.54v-2.142h1.54v-1.912l2.346-.458v2.37h2.201v2.142h-2.2v3.693-.012z\\\" fill-rule=\\\"evenodd\\\"/></g></svg>\\n\";\n\n    const isHidden = (elm) => elm.nodeName === 'BR' || !!elm.getAttribute('data-mce-bogus') || elm.getAttribute('data-mce-type') === 'bookmark';\n    const renderElementPath = (editor, settings, providersBackstage) => {\n        const delimiter = settings.delimiter ?? '\\u203A';\n        const isViewOpen = () => editor.queryCommandValue('ToggleView') !== '';\n        const isDisabled = () => providersBackstage.isDisabled() || isViewOpen();\n        const getContext = () => {\n            const context = providersBackstage.checkUiComponentContext('any');\n            return { contextType: context.contextType, shouldDisable: context.shouldDisable || isViewOpen() };\n        };\n        const renderElement = (name, element, index) => Button.sketch({\n            dom: {\n                tag: 'div',\n                classes: ['tox-statusbar__path-item'],\n                attributes: {\n                    'data-index': index,\n                }\n            },\n            components: [\n                text$2(name)\n            ],\n            action: (_btn) => {\n                editor.focus();\n                editor.selection.select(element);\n                editor.nodeChanged();\n            },\n            buttonBehaviours: derive$1([\n                Tooltipping.config({\n                    ...providersBackstage.tooltips.getConfig({\n                        tooltipText: providersBackstage.translate(['Select the {0} element', element.nodeName.toLowerCase()]),\n                        onShow: (comp, tooltip) => {\n                            describedBy(comp.element, tooltip.element);\n                        },\n                        onHide: (comp) => {\n                            remove$1(comp.element);\n                        }\n                    }),\n                }),\n                DisablingConfigs.button(isDisabled),\n                toggleOnReceive(getContext)\n            ])\n        });\n        const renderDivider = () => ({\n            dom: {\n                tag: 'div',\n                classes: ['tox-statusbar__path-divider'],\n                attributes: {\n                    'aria-hidden': true\n                }\n            },\n            components: [\n                text$2(` ${delimiter} `)\n            ]\n        });\n        const renderPathData = (data) => foldl(data, (acc, path, index) => {\n            const element = renderElement(path.name, path.element, index);\n            if (index === 0) {\n                return acc.concat([element]);\n            }\n            else {\n                return acc.concat([renderDivider(), element]);\n            }\n        }, []);\n        const updatePath = (parents) => {\n            const newPath = [];\n            let i = parents.length;\n            while (i-- > 0) {\n                const parent = parents[i];\n                if (parent.nodeType === 1 && !isHidden(parent)) {\n                    const args = fireResolveName(editor, parent);\n                    if (!args.isDefaultPrevented()) {\n                        newPath.push({ name: args.name, element: parent });\n                    }\n                    if (args.isPropagationStopped()) {\n                        break;\n                    }\n                }\n            }\n            return newPath;\n        };\n        return {\n            dom: {\n                tag: 'div',\n                classes: ['tox-statusbar__path'],\n                attributes: {\n                    'role': 'group',\n                    'aria-label': providersBackstage.translate('Element Path')\n                }\n            },\n            behaviours: derive$1([\n                Keying.config({\n                    mode: 'flow',\n                    selector: 'div[role=button]'\n                }),\n                Disabling.config({\n                    disabled: isDisabled\n                }),\n                toggleOnReceive(getContext),\n                Tabstopping.config({}),\n                Replacing.config({}),\n                config('elementPathEvents', [\n                    runOnAttached((comp, _e) => {\n                        // NOTE: If statusbar ever gets re-rendered, we will need to free this.\n                        editor.shortcuts.add('alt+F11', 'focus statusbar elementpath', () => Keying.focusIn(comp));\n                        editor.on('NodeChange', (e) => {\n                            const newPath = updatePath(e.parents);\n                            const newChildren = newPath.length > 0 ? renderPathData(newPath) : [];\n                            Replacing.set(comp, newChildren);\n                        });\n                        editor.on('ToggleView', () => {\n                            const disabled = isDisabled();\n                            Disabling.set(comp, disabled);\n                            each$1(Replacing.contents(comp), (child) => {\n                                if (child.hasConfigured(Disabling)) {\n                                    Disabling.set(child, disabled);\n                                }\n                            });\n                        });\n                    })\n                ])\n            ]),\n            components: []\n        };\n    };\n\n    var ResizeTypes;\n    (function (ResizeTypes) {\n        ResizeTypes[ResizeTypes[\"None\"] = 0] = \"None\";\n        ResizeTypes[ResizeTypes[\"Both\"] = 1] = \"Both\";\n        ResizeTypes[ResizeTypes[\"Vertical\"] = 2] = \"Vertical\";\n    })(ResizeTypes || (ResizeTypes = {}));\n    const getOriginalDimensions = (editor) => {\n        const container = SugarElement.fromDom(editor.getContainer());\n        const originalHeight = get$d(container);\n        const originalWidth = get$c(container);\n        return {\n            height: originalHeight,\n            width: originalWidth,\n        };\n    };\n    const getDimensions = (editor, deltas, resizeType, originalDimentions) => {\n        const height = calcCappedSize(originalDimentions.height + deltas.top, getMinHeightOption(editor), getMaxHeightOption(editor));\n        if (resizeType === ResizeTypes.Both) {\n            return {\n                height,\n                width: calcCappedSize(originalDimentions.width + deltas.left, getMinWidthOption(editor), getMaxWidthOption(editor))\n            };\n        }\n        return { height };\n    };\n    const resize = (editor, deltas, resizeType) => {\n        const container = SugarElement.fromDom(editor.getContainer());\n        const originalDimensions = getOriginalDimensions(editor);\n        const dimensions = getDimensions(editor, deltas, resizeType, originalDimensions);\n        each(dimensions, (val, dim) => {\n            if (isNumber(val)) {\n                set$7(container, dim, numToPx(val));\n            }\n        });\n        fireResizeEditor(editor);\n        return dimensions;\n    };\n\n    const keyboardResizeStepInPx = 20;\n    const getResizeType = (editor) => {\n        const resize = getResize(editor);\n        if (resize === false) {\n            return ResizeTypes.None;\n        }\n        else if (resize === 'both') {\n            return ResizeTypes.Both;\n        }\n        else {\n            return ResizeTypes.Vertical;\n        }\n    };\n    const getAriaValuetext = (dimensions, resizeType) => {\n        return resizeType === ResizeTypes.Both\n            ? global$6.translate([`Editor's height: {0} pixels, Editor's width: {1} pixels`, dimensions.height, dimensions.width])\n            : global$6.translate([`Editor's height: {0} pixels`, dimensions.height]);\n    };\n    const setAriaDimensions = (comp, dimensions, resizeType, minHeight, maxHeight) => {\n        set$9(comp.element, 'aria-valuetext', getAriaValuetext(dimensions, resizeType));\n        // aria-valuenow/valuemin/valuemax are single numeric values, so they can only\n        // meaningfully represent one dimension. In 'both' mode the handle resizes both\n        // width and height, which has no sensible single-value representation, so we only\n        // set these attributes for vertical resizing and rely on aria-valuetext otherwise.\n        if (resizeType === ResizeTypes.Vertical) {\n            set$9(comp.element, 'aria-valuenow', dimensions.height);\n            set$9(comp.element, 'aria-valuemin', minHeight.getOr(0));\n            set$9(comp.element, 'aria-valuemax', maxHeight.getOr(dimensions.height + keyboardResizeStepInPx));\n        }\n    };\n    const keyboardHandler = (editor, comp, resizeType, x, y, minHeight, maxHeight) => {\n        const delta = SugarPosition(x * keyboardResizeStepInPx, y * keyboardResizeStepInPx);\n        const newDimentions = resize(editor, delta, resizeType);\n        setAriaDimensions(comp, newDimentions, resizeType, minHeight, maxHeight);\n        return Optional.some(true);\n    };\n    const renderResizeHandler = (editor, providersBackstage) => {\n        const resizeType = getResizeType(editor);\n        if (resizeType === ResizeTypes.None) {\n            return Optional.none();\n        }\n        const minHeight = getMinHeightOption(editor);\n        const maxHeight = getMaxHeightOption(editor);\n        const resizeLabel = resizeType === ResizeTypes.Both\n            ? global$6.translate('Press the arrow keys to resize the editor.')\n            : global$6.translate('Press the Up and Down arrow keys to resize the editor.');\n        const cursorClass = resizeType === ResizeTypes.Both\n            ? 'tox-statusbar__resize-cursor-both'\n            : 'tox-statusbar__resize-cursor-default';\n        return Optional.some(render$4('resize-handle', {\n            tag: 'div',\n            classes: ['tox-statusbar__resize-handle', cursorClass],\n            attributes: {\n                'aria-label': providersBackstage.translate(resizeLabel),\n                'data-mce-name': 'resize-handle',\n                'role': 'separator'\n            },\n            behaviours: [\n                Dragging.config({\n                    mode: 'pointer',\n                    repositionTarget: false,\n                    onDragStart: (comp) => {\n                        Tooltipping.immediateOpenClose(comp, false);\n                        Tooltipping.setEnabled(comp, false);\n                    },\n                    onDrag: (comp, _target, delta) => {\n                        const newDimentions = resize(editor, delta, resizeType);\n                        setAriaDimensions(comp, newDimentions, resizeType, minHeight, maxHeight);\n                    },\n                    onDrop: (comp) => {\n                        Tooltipping.setEnabled(comp, true);\n                    },\n                }),\n                Keying.config({\n                    mode: 'special',\n                    onLeft: (comp) => keyboardHandler(editor, comp, resizeType, -1, 0, minHeight, maxHeight),\n                    onRight: (comp) => keyboardHandler(editor, comp, resizeType, 1, 0, minHeight, maxHeight),\n                    onUp: (comp) => keyboardHandler(editor, comp, resizeType, 0, -1, minHeight, maxHeight),\n                    onDown: (comp) => keyboardHandler(editor, comp, resizeType, 0, 1, minHeight, maxHeight),\n                }),\n                Tabstopping.config({}),\n                Focusing.config({}),\n                Tooltipping.config(providersBackstage.tooltips.getConfig({\n                    tooltipText: providersBackstage.translate('Resize')\n                })),\n                config('set-aria-valuetext', [\n                    runOnAttached((comp) => {\n                        const setInitialValuetext = () => {\n                            setAriaDimensions(comp, getOriginalDimensions(editor), resizeType, minHeight, maxHeight);\n                        };\n                        if (editor._skinLoaded) {\n                            setInitialValuetext();\n                        }\n                        else {\n                            editor.once('SkinLoaded', setInitialValuetext);\n                        }\n                    })\n                ])\n            ],\n            eventOrder: {\n                [attachedToDom()]: ['add-focusable', 'set-aria-valuetext']\n            }\n        }, providersBackstage.icons));\n    };\n\n    const renderWordCount = (editor, providersBackstage) => {\n        const replaceCountText = (comp, count, mode) => Replacing.set(comp, [text$2(providersBackstage.translate(['{0} ' + mode, count[mode]]))]);\n        return Button.sketch({\n            dom: {\n                // The tag for word count was changed to 'button' as Jaws does not read out spans.\n                // Word count is just a toggle and changes modes between words and characters.\n                tag: 'button',\n                classes: ['tox-statusbar__wordcount']\n            },\n            components: [],\n            buttonBehaviours: derive$1([\n                DisablingConfigs.button(providersBackstage.isDisabled),\n                toggleOnReceive(() => providersBackstage.checkUiComponentContext('any')),\n                Tabstopping.config({}),\n                Replacing.config({}),\n                Representing.config({\n                    store: {\n                        mode: 'memory',\n                        initialValue: {\n                            mode: \"words\" /* WordCountMode.Words */,\n                            count: { words: 0, characters: 0 }\n                        }\n                    }\n                }),\n                config('wordcount-events', [\n                    runOnExecute$1((comp) => {\n                        const currentVal = Representing.getValue(comp);\n                        const newMode = currentVal.mode === \"words\" /* WordCountMode.Words */ ? \"characters\" /* WordCountMode.Characters */ : \"words\" /* WordCountMode.Words */;\n                        Representing.setValue(comp, { mode: newMode, count: currentVal.count });\n                        replaceCountText(comp, currentVal.count, newMode);\n                    }),\n                    runOnAttached((comp) => {\n                        editor.on('wordCountUpdate', (e) => {\n                            const { mode } = Representing.getValue(comp);\n                            Representing.setValue(comp, { mode, count: e.wordCount });\n                            replaceCountText(comp, e.wordCount, mode);\n                        });\n                    })\n                ])\n            ]),\n            eventOrder: {\n                [execute$5()]: ['disabling', 'alloy.base.behaviour', 'wordcount-events']\n            }\n        });\n    };\n\n    const renderStatusbar = (editor, providersBackstage) => {\n        const renderBranding = () => {\n            return {\n                dom: {\n                    tag: 'span',\n                    classes: ['tox-statusbar__branding'],\n                },\n                components: [\n                    {\n                        dom: {\n                            tag: 'a',\n                            attributes: {\n                                'href': 'https://www.tiny.cloud/powered-by-tiny?utm_campaign=poweredby&utm_source=tiny&utm_medium=referral&utm_content=v7',\n                                'rel': 'noopener',\n                                'target': '_blank',\n                                'aria-label': editor.translate(['Build with {0}', 'TinyMCE'])\n                            },\n                            innerHtml: editor.translate(['Build with {0}', Logo.trim()])\n                        },\n                        behaviours: derive$1([\n                            Focusing.config({})\n                        ])\n                    }\n                ]\n            };\n        };\n        const renderHelpAccessibility = () => {\n            const shortcutText = convertText('Alt+0');\n            const text = `Press {0} for help`;\n            return {\n                dom: {\n                    tag: 'div',\n                    classes: ['tox-statusbar__help-text'],\n                },\n                components: [\n                    text$2(global$6.translate([text, shortcutText]))\n                ]\n            };\n        };\n        const renderRightContainer = () => {\n            const components = [];\n            if (editor.hasPlugin('wordcount')) {\n                components.push(renderWordCount(editor, providersBackstage));\n            }\n            if (useBranding(editor)) {\n                components.push(renderBranding());\n            }\n            return {\n                dom: {\n                    tag: 'div',\n                    classes: ['tox-statusbar__right-container']\n                },\n                components\n            };\n        };\n        const getTextComponents = () => {\n            const components = [];\n            const shouldRenderHelp = useHelpAccessibility(editor);\n            const shouldRenderElementPath = useElementPath(editor);\n            const shouldRenderRightContainer = useBranding(editor) || editor.hasPlugin('wordcount');\n            const getTextComponentClasses = () => {\n                const flexStart = 'tox-statusbar__text-container--flex-start';\n                const flexEnd = 'tox-statusbar__text-container--flex-end';\n                const spaceAround = 'tox-statusbar__text-container--space-around';\n                if (shouldRenderHelp) {\n                    const container3Columns = 'tox-statusbar__text-container-3-cols';\n                    if (!shouldRenderRightContainer && !shouldRenderElementPath) {\n                        return [container3Columns, spaceAround];\n                    }\n                    if (shouldRenderRightContainer && !shouldRenderElementPath) {\n                        return [container3Columns, flexEnd];\n                    }\n                    return [container3Columns, flexStart];\n                }\n                return [shouldRenderRightContainer && !shouldRenderElementPath ? flexEnd : flexStart];\n            };\n            if (shouldRenderElementPath) {\n                components.push(renderElementPath(editor, {}, providersBackstage));\n            }\n            if (shouldRenderHelp) {\n                components.push(renderHelpAccessibility());\n            }\n            if (shouldRenderRightContainer) {\n                components.push(renderRightContainer());\n            }\n            if (components.length > 0) {\n                return [{\n                        dom: {\n                            tag: 'div',\n                            classes: ['tox-statusbar__text-container', ...getTextComponentClasses()]\n                        },\n                        components\n                    }];\n            }\n            return [];\n        };\n        const getComponents = () => {\n            const components = getTextComponents();\n            const resizeHandler = renderResizeHandler(editor, providersBackstage);\n            return components.concat(resizeHandler.toArray());\n        };\n        return {\n            dom: {\n                tag: 'div',\n                classes: ['tox-statusbar']\n            },\n            components: getComponents()\n        };\n    };\n\n    const getLazyMothership = (label, singleton) => singleton.get().getOrDie(`UI for ${label} has not been rendered`);\n    const setup$3 = (editor, setupForTheme) => {\n        const isInline = editor.inline;\n        const mode = isInline ? Inline : Iframe;\n        // We use a different component for creating the sticky toolbar behaviour. The\n        // most important difference is it needs \"Docking\" configured and all of the\n        // ripple effects that creates.\n        const header = isStickyToolbar(editor) ? StickyHeader : StaticHeader;\n        const lazyUiRefs = LazyUiReferences();\n        // Importantly, this is outside the setup function.\n        const lazyMothership = value$2();\n        const lazyDialogMothership = value$2();\n        const lazyPopupMothership = value$2();\n        const platform = detect$1();\n        const isTouch = platform.deviceType.isTouch();\n        const touchPlatformClass = 'tox-platform-touch';\n        const deviceClasses = isTouch ? [touchPlatformClass] : [];\n        const isToolbarBottom = isToolbarLocationBottom(editor);\n        const toolbarMode = getToolbarMode(editor);\n        const memAnchorBar = record({\n            dom: {\n                tag: 'div',\n                classes: ['tox-anchorbar']\n            }\n        });\n        const memBottomAnchorBar = record({\n            dom: {\n                tag: 'div',\n                classes: ['tox-bottom-anchorbar']\n            }\n        });\n        const lazyHeader = () => lazyUiRefs.mainUi.get()\n            .map((ui) => ui.outerContainer)\n            .bind(OuterContainer.getHeader);\n        const lazyDialogSinkResult = () => Result.fromOption(lazyUiRefs.dialogUi.get().map((ui) => ui.sink), 'UI has not been rendered');\n        const lazyPopupSinkResult = () => Result.fromOption(lazyUiRefs.popupUi.get().map((ui) => ui.sink), '(popup) UI has not been rendered');\n        const lazyAnchorBar = lazyUiRefs.lazyGetInOuterOrDie('anchor bar', memAnchorBar.getOpt);\n        const lazyBottomAnchorBar = lazyUiRefs.lazyGetInOuterOrDie('bottom anchor bar', memBottomAnchorBar.getOpt);\n        const lazyToolbar = lazyUiRefs.lazyGetInOuterOrDie('toolbar', OuterContainer.getToolbar);\n        const lazyThrobber = lazyUiRefs.lazyGetInOuterOrDie('throbber', OuterContainer.getThrobber);\n        // Here, we build the backstage. The backstage is going to use different sinks for dialog\n        // vs popup.\n        const backstages = init({\n            popup: lazyPopupSinkResult,\n            dialog: lazyDialogSinkResult\n        }, editor, lazyAnchorBar, lazyBottomAnchorBar);\n        const makeHeaderPart = () => {\n            const verticalDirAttributes = {\n                attributes: {\n                    [Attribute]: isToolbarBottom ?\n                        AttributeValue.BottomToTop :\n                        AttributeValue.TopToBottom\n                }\n            };\n            const partMenubar = OuterContainer.parts.menubar({\n                dom: {\n                    tag: 'div',\n                    classes: ['tox-menubar']\n                },\n                // TINY-9223: The menu bar should scroll with the editor.\n                backstage: backstages.popup,\n                onEscape: () => {\n                    editor.focus();\n                }\n            });\n            const partToolbar = OuterContainer.parts.toolbar({\n                dom: {\n                    tag: 'div',\n                    classes: ['tox-toolbar']\n                },\n                getSink: backstages.popup.shared.getSink,\n                providers: backstages.popup.shared.providers,\n                onEscape: () => {\n                    editor.focus();\n                },\n                onToolbarToggled: (state) => {\n                    fireToggleToolbarDrawer(editor, state);\n                },\n                type: toolbarMode,\n                lazyToolbar,\n                lazyHeader: () => lazyHeader().getOrDie('Could not find header element'),\n                ...verticalDirAttributes\n            });\n            const partMultipleToolbar = OuterContainer.parts['multiple-toolbar']({\n                dom: {\n                    tag: 'div',\n                    classes: ['tox-toolbar-overlord']\n                },\n                providers: backstages.popup.shared.providers,\n                onEscape: () => {\n                    editor.focus();\n                },\n                type: toolbarMode\n            });\n            // False should stop the menubar and toolbar rendering altogether\n            const hasMultipleToolbar = isMultipleToolbars(editor);\n            const hasToolbar = isToolbarEnabled(editor);\n            const hasMenubar = isMenubarEnabled(editor);\n            const shouldHavePromotionLink = promotionEnabled(editor);\n            const partPromotion = makePromotion(shouldHavePromotionLink);\n            const hasAnyContents = hasMultipleToolbar || hasToolbar || hasMenubar;\n            const getPartToolbar = () => {\n                if (hasMultipleToolbar) {\n                    return [partMultipleToolbar];\n                }\n                else if (hasToolbar) {\n                    return [partToolbar];\n                }\n                else {\n                    return [];\n                }\n            };\n            const menubarCollection = [partPromotion, partMenubar];\n            return OuterContainer.parts.header({\n                dom: {\n                    tag: 'div',\n                    classes: ['tox-editor-header']\n                        .concat(hasAnyContents ? [] : ['tox-editor-header--empty']),\n                    ...verticalDirAttributes\n                },\n                components: flatten([\n                    hasMenubar ? menubarCollection : [],\n                    getPartToolbar(),\n                    // fixed_toolbar_container anchors to the editable area, else add an anchor bar\n                    useFixedContainer(editor) ? [] : [memAnchorBar.asSpec()]\n                ]),\n                sticky: isStickyToolbar(editor),\n                editor,\n                // TINY-9223: If using a sticky toolbar, which sink should it really go in?\n                sharedBackstage: backstages.popup.shared\n            });\n        };\n        const makePromotion = (promotionLink) => {\n            return OuterContainer.parts.promotion({\n                dom: {\n                    tag: 'div',\n                    classes: ['tox-promotion'],\n                },\n                promotionLink\n            });\n        };\n        const makeSidebarDefinition = () => {\n            const partSocket = OuterContainer.parts.socket({\n                dom: {\n                    tag: 'div',\n                    classes: ['tox-edit-area']\n                }\n            });\n            const partSidebar = OuterContainer.parts.sidebar({\n                dom: {\n                    tag: 'div',\n                    classes: ['tox-sidebar']\n                },\n                configuredSidebarWidth: getSidebarWidth(editor)\n            });\n            return {\n                dom: {\n                    tag: 'div',\n                    classes: ['tox-sidebar-wrap']\n                },\n                components: [\n                    partSocket,\n                    partSidebar\n                ],\n                behaviours: SimpleBehaviours.unnamedEvents([\n                    run$1(sidebarContentChanged, (comp, se) => {\n                        const shouldBeResizable = se.event.visible && se.event.resizable;\n                        const toggle = shouldBeResizable ? add$2 : remove$3;\n                        toggle(comp.element, resizableClass);\n                    })\n                ])\n            };\n        };\n        // TINY-14384: we want to restrict the bounds to the host element, rather than the entire window when the sink is attached in a ShadowDOM (ie: webcomponent)\n        const getSinkBounds = (sinkOpt) => sinkOpt.bind(({ sink }) => {\n            const rootNode = getRootNode(sink.element);\n            if (isShadowRoot(rootNode)) {\n                return Optional.some(box$1(getShadowHost(rootNode)));\n            }\n            return Optional.none();\n        }).getOr(win());\n        const renderDialogUi = () => {\n            const uiContainer = getUiContainer(editor);\n            // TINY-3321: When the body is using a grid layout, we need to ensure the sink width is manually set\n            const isGridUiContainer = eq(body(), uiContainer) && get$e(uiContainer, 'display') === 'grid';\n            const sinkSpec = {\n                dom: {\n                    tag: 'div',\n                    classes: ['tox', 'tox-silver-sink', 'tox-tinymce-aux'].concat(deviceClasses),\n                    attributes: {\n                        ...global$6.isRtl() ? { dir: 'rtl' } : {}\n                    }\n                },\n                behaviours: derive$1([\n                    Positioning.config({\n                        useFixed: () => header.isDocked(lazyHeader),\n                        getBounds: () => getSinkBounds(lazyUiRefs.dialogUi.get())\n                    }),\n                ])\n            };\n            const reactiveWidthSpec = {\n                dom: {\n                    styles: { width: document.body.clientWidth + 'px' }\n                },\n                events: derive$2([\n                    run$1(windowResize(), (comp) => {\n                        set$7(comp.element, 'width', document.body.clientWidth + 'px');\n                    })\n                ])\n            };\n            const sink = build$1(deepMerge(sinkSpec, isGridUiContainer ? reactiveWidthSpec : {}));\n            const uiMothership = takeover(sink);\n            lazyDialogMothership.set(uiMothership);\n            return { sink, mothership: uiMothership };\n        };\n        const renderPopupUi = () => {\n            // TINY-9226: Because the popupUi is going to be placed adjacent to the editor, we aren't currently\n            // implementing the behaviour to reset widths based on window sizing. It is a workaround that\n            // is mainly targeted at Ui containers in the root. However, we may need to revisit this\n            // if the ui_mode: split setting is commonly used when the editor is at the root level, and the\n            // page has size-unfriendly CSS for sinks (like CSS grid)\n            const sinkSpec = {\n                dom: {\n                    tag: 'div',\n                    classes: ['tox', 'tox-silver-sink', 'tox-silver-popup-sink', 'tox-tinymce-aux'].concat(deviceClasses),\n                    attributes: {\n                        ...global$6.isRtl() ? { dir: 'rtl' } : {}\n                    }\n                },\n                behaviours: derive$1([\n                    Positioning.config({\n                        useFixed: () => header.isDocked(lazyHeader),\n                        // TINY-9226: We want to limit the popup sink's bounds based on its scrolling environment. We don't\n                        // want it to try to position things outside of its scrolling viewport, because they will\n                        // just appear offscreen (hidden by the current scroll values)\n                        getBounds: () => setupForTheme.getPopupSinkBounds()\n                    })\n                ])\n            };\n            const sink = build$1(sinkSpec);\n            const uiMothership = takeover(sink);\n            lazyPopupMothership.set(uiMothership);\n            return { sink, mothership: uiMothership };\n        };\n        const renderMainUi = () => {\n            const partHeader = makeHeaderPart();\n            const sidebarContainer = makeSidebarDefinition();\n            const partThrobber = OuterContainer.parts.throbber({\n                dom: {\n                    tag: 'div',\n                    classes: ['tox-throbber']\n                },\n                backstage: backstages.popup\n            });\n            const partViewWrapper = OuterContainer.parts.viewWrapper({\n                backstage: backstages.popup\n            });\n            const statusbar = useStatusBar(editor) && !isInline ? Optional.some(renderStatusbar(editor, backstages.popup.shared.providers)) : Optional.none();\n            // We need the statusbar to be separate to everything else so resizing works properly\n            const editorComponents = flatten([\n                isToolbarBottom ? [] : [partHeader],\n                // Inline mode does not have a socket/sidebar\n                isInline ? [] : [sidebarContainer],\n                isToolbarBottom ? [partHeader] : []\n            ]);\n            const editorContainer = OuterContainer.parts.editorContainer({\n                components: flatten([\n                    editorComponents,\n                    isInline ? [] : [memBottomAnchorBar.asSpec()]\n                ])\n            });\n            // Hide the outer container if using inline mode and there's no menubar or toolbar\n            const isHidden = isDistractionFree(editor);\n            const attributes = {\n                role: 'application',\n                ...global$6.isRtl() ? { dir: 'rtl' } : {},\n                ...isHidden ? { 'aria-hidden': 'true' } : {}\n            };\n            const outerContainer = build$1(OuterContainer.sketch({\n                dom: {\n                    tag: 'div',\n                    classes: ['tox', 'tox-tinymce']\n                        .concat(isInline ? ['tox-tinymce-inline'] : [])\n                        .concat(isToolbarBottom ? ['tox-tinymce--toolbar-bottom'] : [])\n                        .concat(deviceClasses),\n                    styles: {\n                        // This is overridden by the skin, it helps avoid FOUC\n                        visibility: 'hidden',\n                        // Hide the container if needed, but don't use \"display: none\" so that it still has a position\n                        ...isHidden ? { opacity: '0', border: '0' } : {}\n                    },\n                    attributes\n                },\n                components: [\n                    editorContainer,\n                    // Inline mode does not have a status bar\n                    ...isInline ? [] : [partViewWrapper, ...statusbar.toArray()],\n                    partThrobber,\n                ],\n                behaviours: derive$1([\n                    toggleOnReceive(() => backstages.popup.shared.providers.checkUiComponentContext('any')),\n                    Disabling.config({\n                        disableClass: 'tox-tinymce--disabled'\n                    }),\n                    Keying.config({\n                        mode: 'cyclic',\n                        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'\n                    })\n                ])\n            }));\n            const mothership = takeover(outerContainer);\n            lazyMothership.set(mothership);\n            return { mothership, outerContainer };\n        };\n        const setEditorSize = (outerContainer) => {\n            // Set height and width if they were given, though height only applies to iframe mode\n            const parsedHeight = numToPx(getHeightWithFallback(editor));\n            const parsedWidth = numToPx(getWidthWithFallback(editor));\n            if (!editor.inline) {\n                // Update the width\n                if (isValidValue$1('div', 'width', parsedWidth)) {\n                    set$7(outerContainer.element, 'width', parsedWidth);\n                }\n                // Update the height\n                if (isValidValue$1('div', 'height', parsedHeight)) {\n                    set$7(outerContainer.element, 'height', parsedHeight);\n                }\n                else {\n                    set$7(outerContainer.element, 'height', '400px');\n                }\n            }\n            return parsedHeight;\n        };\n        const setupShortcutsAndCommands = (outerContainer) => {\n            editor.addShortcut('alt+F9', 'focus menubar', () => {\n                OuterContainer.focusMenubar(outerContainer);\n            });\n            editor.addShortcut('alt+F10', 'focus toolbar', () => {\n                OuterContainer.focusToolbar(outerContainer);\n            });\n            editor.addCommand('ToggleToolbarDrawer', (_ui, options, args) => {\n                if (options?.skipFocus) {\n                    logFeatureDeprecationWarning('skipFocus');\n                    OuterContainer.toggleToolbarDrawerWithoutFocusing(outerContainer);\n                }\n                else if (args?.skip_focus) {\n                    OuterContainer.toggleToolbarDrawerWithoutFocusing(outerContainer);\n                }\n                else {\n                    OuterContainer.toggleToolbarDrawer(outerContainer);\n                }\n            });\n            editor.addQueryStateHandler('ToggleToolbarDrawer', () => OuterContainer.isToolbarDrawerToggled(outerContainer));\n            editor.on('blur', () => {\n                if (getToolbarMode(editor) === ToolbarMode$1.floating && OuterContainer.isToolbarDrawerToggled(outerContainer)) {\n                    OuterContainer.toggleToolbarDrawerWithoutFocusing(outerContainer);\n                }\n            });\n        };\n        const renderUIWithRefs = (uiRefs) => {\n            const { mainUi, popupUi, uiMotherships } = uiRefs;\n            map$1(getToolbarGroups(editor), (toolbarGroupButtonConfig, name) => {\n                editor.ui.registry.addGroupToolbarButton(name, toolbarGroupButtonConfig);\n            });\n            // Apply Bridge types\n            const { buttons, menuItems, contextToolbars, sidebars, views } = editor.ui.registry.getAll();\n            const toolbarOpt = getMultipleToolbarsOption(editor);\n            const rawUiConfig = {\n                menuItems,\n                menus: getMenus(editor),\n                menubar: getMenubar(editor),\n                toolbar: toolbarOpt.getOrThunk(() => getToolbar(editor)),\n                allowToolbarGroups: toolbarMode === ToolbarMode$1.floating,\n                buttons,\n                sidebar: sidebars,\n                views\n            };\n            setupShortcutsAndCommands(mainUi.outerContainer);\n            setup$b(editor, mainUi.mothership, uiMotherships);\n            // This backstage needs to kept in sync with the one passed to the Header part.\n            header.setup(editor, backstages.popup.shared, lazyHeader);\n            // This backstage is probably needed for just the bespoke dropdowns\n            setup$6(editor, backstages.popup);\n            setup$5(editor, backstages.popup.shared.getSink, backstages.popup);\n            setup$8(editor);\n            setup$7(editor, lazyThrobber, backstages.popup.shared);\n            register$a(editor, contextToolbars, popupUi.sink, { backstage: backstages.popup });\n            setup$4(editor, popupUi.sink);\n            const elm = editor.getElement();\n            const height = setEditorSize(mainUi.outerContainer);\n            const args = { targetNode: elm, height };\n            // The only components that use backstages.dialog currently are the Modal dialogs.\n            return mode.render(editor, uiRefs, rawUiConfig, backstages.popup, args);\n        };\n        const reuseDialogUiForPopuUi = (dialogUi) => {\n            lazyPopupMothership.set(dialogUi.mothership);\n            return dialogUi;\n        };\n        const renderUI = () => {\n            const mainUi = renderMainUi();\n            const dialogUi = renderDialogUi();\n            // If dialogUi and popupUi are the same, LazyUiReferences should handle deduplicating then\n            // get calling getUiMotherships\n            const popupUi = isSplitUiMode(editor) ? renderPopupUi() : reuseDialogUiForPopuUi(dialogUi);\n            lazyUiRefs.dialogUi.set(dialogUi);\n            lazyUiRefs.popupUi.set(popupUi);\n            lazyUiRefs.mainUi.set(mainUi);\n            // From this point on, we shouldn't use LazyReferences any more.\n            const uiRefs = {\n                popupUi,\n                dialogUi,\n                mainUi,\n                uiMotherships: lazyUiRefs.getUiMotherships()\n            };\n            return renderUIWithRefs(uiRefs);\n        };\n        // We don't have uiRefs here, so we have to rely on cells that are set by renderUI unfortunately.\n        return {\n            popups: {\n                backstage: backstages.popup,\n                getMothership: () => getLazyMothership('popups', lazyPopupMothership)\n            },\n            dialogs: {\n                backstage: backstages.dialog,\n                getMothership: () => getLazyMothership('dialogs', lazyDialogMothership)\n            },\n            renderUI\n        };\n    };\n\n    const toValidValues = (values) => {\n        const errors = [];\n        const result = {};\n        each(values, (value, name) => {\n            value.fold(() => {\n                errors.push(name);\n            }, (v) => {\n                result[name] = v;\n            });\n        });\n        return errors.length > 0 ? Result.error(errors) :\n            Result.value(result);\n    };\n\n    const renderBodyPanel = (spec, dialogData, backstage, getCompByName) => {\n        const memForm = record(Form.sketch((parts) => ({\n            dom: {\n                tag: 'div',\n                classes: ['tox-form'].concat(spec.classes)\n            },\n            // All of the items passed through the form need to be put through the interpreter\n            // with their form part preserved.\n            components: map$2(spec.items, (item) => interpretInForm(parts, item, dialogData, backstage, getCompByName))\n        })));\n        return {\n            dom: {\n                tag: 'div',\n                classes: ['tox-dialog__body']\n            },\n            components: [\n                {\n                    dom: {\n                        tag: 'div',\n                        classes: ['tox-dialog__body-content']\n                    },\n                    components: [\n                        memForm.asSpec()\n                    ]\n                }\n            ],\n            behaviours: derive$1([\n                Keying.config({\n                    mode: 'acyclic',\n                    useTabstopAt: not(isPseudoStop)\n                }),\n                ComposingConfigs.memento(memForm),\n                memento(memForm, {\n                    postprocess: (formValue) => toValidValues(formValue).fold((err) => {\n                        // eslint-disable-next-line no-console\n                        console.error(err);\n                        return {};\n                    }, identity)\n                }),\n                config('dialog-body-panel', [\n                    // TINY-10101: This is to cater for the case where clicks are made into the dialog instead using keyboard navigation, as FocusShifted would not be triggered in that case.\n                    run$1(focusin(), (comp, se) => {\n                        comp.getSystem().broadcastOn([dialogFocusShiftedChannel], {\n                            newFocus: Optional.some(se.event.target)\n                        });\n                    }),\n                ])\n            ])\n        };\n    };\n\n    const measureHeights = (allTabs, tabview, tabviewComp) => map$2(allTabs, (_tab, i) => {\n        Replacing.set(tabviewComp, allTabs[i].view());\n        const rect = tabview.dom.getBoundingClientRect();\n        Replacing.set(tabviewComp, []);\n        return rect.height;\n    });\n    const getMaxHeight = (heights) => head(sort(heights, (a, b) => {\n        if (a > b) {\n            return -1;\n        }\n        else if (a < b) {\n            return +1;\n        }\n        else {\n            return 0;\n        }\n    }));\n    const getMaxTabviewHeight = (dialog, tabview, tablist) => {\n        const documentElement$1 = documentElement(dialog).dom;\n        const rootElm = ancestor$1(dialog, '.tox-dialog-wrap').getOr(dialog);\n        const isFixed = get$e(rootElm, 'position') === 'fixed';\n        // Get the document or window/viewport height\n        let maxHeight;\n        if (isFixed) {\n            maxHeight = Math.max(documentElement$1.clientHeight, window.innerHeight);\n        }\n        else {\n            maxHeight = Math.max(documentElement$1.offsetHeight, documentElement$1.scrollHeight);\n        }\n        // Determine the current height taken up by the tabview panel\n        const tabviewHeight = get$d(tabview);\n        const isTabListBeside = tabview.dom.offsetLeft >= tablist.dom.offsetLeft + get$c(tablist);\n        const currentTabHeight = isTabListBeside ? Math.max(get$d(tablist), tabviewHeight) : tabviewHeight;\n        // Get the dialog height, making sure to account for any margins on the dialog\n        const dialogTopMargin = parseInt(get$e(dialog, 'margin-top'), 10) || 0;\n        const dialogBottomMargin = parseInt(get$e(dialog, 'margin-bottom'), 10) || 0;\n        const dialogHeight = get$d(dialog) + dialogTopMargin + dialogBottomMargin;\n        const chromeHeight = dialogHeight - currentTabHeight;\n        return maxHeight - chromeHeight;\n    };\n    const showTab = (allTabs, comp) => {\n        head(allTabs).each((tab) => TabSection.showTab(comp, tab.value));\n    };\n    const setTabviewHeight = (tabview, height) => {\n        // Set both height and flex-basis as some browsers don't support flex-basis.\n        set$7(tabview, 'height', height + 'px');\n        set$7(tabview, 'flex-basis', height + 'px');\n    };\n    const updateTabviewHeight = (dialogBody, tabview, maxTabHeight) => {\n        ancestor$1(dialogBody, '[role=\"dialog\"]').each((dialog) => {\n            descendant(dialog, '[role=\"tablist\"]').each((tablist) => {\n                maxTabHeight.get().map((height) => {\n                    // Set the tab view height to 0, so we can calculate the max tabview height, without worrying about overflows\n                    set$7(tabview, 'height', '0');\n                    set$7(tabview, 'flex-basis', '0');\n                    return Math.min(height, getMaxTabviewHeight(dialog, tabview, tablist));\n                }).each((height) => {\n                    setTabviewHeight(tabview, height);\n                });\n            });\n        });\n    };\n    const getTabview = (dialog) => descendant(dialog, '[role=\"tabpanel\"]');\n    const smartMode = (allTabs) => {\n        const maxTabHeight = value$2();\n        const extraEvents = [\n            runOnAttached((comp) => {\n                const dialog = comp.element;\n                getTabview(dialog).each((tabview) => {\n                    set$7(tabview, 'visibility', 'hidden');\n                    // Determine the maximum heights of each tab\n                    comp.getSystem().getByDom(tabview).toOptional().each((tabviewComp) => {\n                        const heights = measureHeights(allTabs, tabview, tabviewComp);\n                        // Calculate the maximum tab height and store it\n                        const maxTabHeightOpt = getMaxHeight(heights);\n                        maxTabHeightOpt.fold(maxTabHeight.clear, maxTabHeight.set);\n                    });\n                    // Set an initial height, based on the current size\n                    updateTabviewHeight(dialog, tabview, maxTabHeight);\n                    // Show the tabs\n                    remove$6(tabview, 'visibility');\n                    showTab(allTabs, comp);\n                    // Use a delay here and recalculate the height, as we need all the components attached\n                    // to be able to properly calculate the max height\n                    requestAnimationFrame(() => {\n                        updateTabviewHeight(dialog, tabview, maxTabHeight);\n                    });\n                });\n            }),\n            run$1(windowResize(), (comp) => {\n                const dialog = comp.element;\n                getTabview(dialog).each((tabview) => {\n                    updateTabviewHeight(dialog, tabview, maxTabHeight);\n                });\n            }),\n            run$1(formResizeEvent, (comp, _se) => {\n                const dialog = comp.element;\n                getTabview(dialog).each((tabview) => {\n                    const oldFocus = active$1(getRootNode(tabview));\n                    set$7(tabview, 'visibility', 'hidden');\n                    const oldHeight = getRaw(tabview, 'height').map((h) => parseInt(h, 10));\n                    remove$6(tabview, 'height');\n                    remove$6(tabview, 'flex-basis');\n                    const newHeight = tabview.dom.getBoundingClientRect().height;\n                    const hasGrown = oldHeight.forall((h) => newHeight > h);\n                    if (hasGrown) {\n                        maxTabHeight.set(newHeight);\n                        updateTabviewHeight(dialog, tabview, maxTabHeight);\n                    }\n                    else {\n                        oldHeight.each((h) => {\n                            setTabviewHeight(tabview, h);\n                        });\n                    }\n                    remove$6(tabview, 'visibility');\n                    oldFocus.each(focus$4);\n                });\n            })\n        ];\n        const selectFirst = false;\n        return {\n            extraEvents,\n            selectFirst\n        };\n    };\n    // Set tab heights within a dialog to vary according to their contents\n    const naiveMode = (_allTabs) => {\n        const extraEvents = [];\n        const selectFirst = true;\n        return {\n            extraEvents,\n            selectFirst\n        };\n    };\n\n    const SendDataToSectionChannel = 'send-data-to-section';\n    const SendDataToViewChannel = 'send-data-to-view';\n    const renderTabPanel = (spec, dialogData, backstage, getCompByName) => {\n        const storedValue = Cell({});\n        const updateDataWithForm = (form) => {\n            const formData = Representing.getValue(form);\n            const validData = toValidValues(formData).getOr({});\n            const currentData = storedValue.get();\n            const newData = deepMerge(currentData, validData);\n            storedValue.set(newData);\n        };\n        const setDataOnForm = (form) => {\n            const tabData = storedValue.get();\n            Representing.setValue(form, tabData);\n        };\n        const oldTab = Cell(null);\n        const allTabs = map$2(spec.tabs, (tab) => {\n            return {\n                value: tab.name,\n                dom: {\n                    tag: 'div',\n                    classes: ['tox-dialog__body-nav-item']\n                },\n                components: [\n                    text$2(backstage.shared.providers.translate(tab.title))\n                ],\n                view: () => {\n                    return [\n                        // Dupe with SilverDialog\n                        Form.sketch((parts) => ({\n                            dom: {\n                                tag: 'div',\n                                classes: ['tox-form']\n                            },\n                            components: map$2(tab.items, (item) => interpretInForm(parts, item, dialogData, backstage, getCompByName)),\n                            formBehaviours: derive$1([\n                                Keying.config({\n                                    mode: 'acyclic',\n                                    useTabstopAt: not(isPseudoStop)\n                                }),\n                                config('TabView.form.events', [\n                                    runOnAttached(setDataOnForm),\n                                    runOnDetached(updateDataWithForm)\n                                ]),\n                                Receiving.config({\n                                    channels: wrapAll([\n                                        {\n                                            key: SendDataToSectionChannel,\n                                            value: {\n                                                onReceive: updateDataWithForm\n                                            }\n                                        },\n                                        {\n                                            key: SendDataToViewChannel,\n                                            value: {\n                                                onReceive: setDataOnForm\n                                            }\n                                        }\n                                    ])\n                                })\n                            ])\n                        }))\n                    ];\n                }\n            };\n        });\n        // Assign fixed height or variable height to the tabs\n        const tabMode = spec.dynamicHeight\n            ? naiveMode() // Height is determined by the content of the tab, which may cause layout shifts when switching tabs.\n            : smartMode(allTabs); // Height is determined by the tallest tab, which prevents layout shifts but may cause excessive whitespace in shorter tabs.\n        return TabSection.sketch({\n            dom: {\n                tag: 'div',\n                classes: ['tox-dialog__body']\n            },\n            onChangeTab: (section, button, _viewItems) => {\n                const name = Representing.getValue(button);\n                emitWith(section, formTabChangeEvent, {\n                    name,\n                    oldName: oldTab.get()\n                });\n                oldTab.set(name);\n            },\n            tabs: allTabs,\n            components: [\n                TabSection.parts.tabbar({\n                    dom: {\n                        tag: 'div',\n                        classes: ['tox-dialog__body-nav']\n                    },\n                    components: [\n                        Tabbar.parts.tabs({})\n                    ],\n                    markers: {\n                        tabClass: 'tox-tab',\n                        selectedClass: 'tox-dialog__body-nav-item--active'\n                    },\n                    tabbarBehaviours: derive$1([\n                        Tabstopping.config({})\n                    ])\n                }),\n                TabSection.parts.tabview({\n                    dom: {\n                        tag: 'div',\n                        classes: ['tox-dialog__body-content']\n                    }\n                })\n            ],\n            selectFirst: tabMode.selectFirst,\n            tabSectionBehaviours: derive$1([\n                config('tabpanel', tabMode.extraEvents),\n                Keying.config({\n                    mode: 'acyclic'\n                }),\n                // INVESTIGATE: Is this necessary? Probably used by getCompByName.\n                Composing.config({\n                    // TODO: Think about this\n                    find: (comp) => head(TabSection.getViewItems(comp))\n                }),\n                withComp(Optional.none(), (tsection) => {\n                    // NOTE: Assumes synchronous updating of store.\n                    tsection.getSystem().broadcastOn([SendDataToSectionChannel], {});\n                    return storedValue.get();\n                }, (tsection, value) => {\n                    storedValue.set(value);\n                    tsection.getSystem().broadcastOn([SendDataToViewChannel], {});\n                })\n            ])\n        });\n    };\n\n    // ariaAttrs is being passed through to silver inline dialog\n    // from the WindowManager as a property of 'params'\n    const renderBody = (spec, dialogId, contentId, backstage, ariaAttrs, getCompByName) => {\n        const renderComponents = (incoming) => {\n            const body = incoming.body;\n            switch (body.type) {\n                case 'tabpanel': {\n                    return [\n                        renderTabPanel(body, incoming.initialData, backstage, getCompByName)\n                    ];\n                }\n                default: {\n                    return [\n                        renderBodyPanel(body, incoming.initialData, backstage, getCompByName)\n                    ];\n                }\n            }\n        };\n        const updateState = (_comp, incoming) => Optional.some({\n            isTabPanel: () => incoming.body.type === 'tabpanel'\n        });\n        const ariaAttributes = {\n            'aria-live': 'polite'\n        };\n        return {\n            dom: {\n                tag: 'div',\n                classes: ['tox-dialog__content-js'],\n                attributes: {\n                    ...contentId.map((x) => ({ id: x })).getOr({}),\n                    ...ariaAttrs ? ariaAttributes : {}\n                }\n            },\n            components: [],\n            behaviours: derive$1([\n                ComposingConfigs.childAt(0),\n                Reflecting.config({\n                    channel: `${bodyChannel}-${dialogId}`,\n                    updateState,\n                    renderComponents,\n                    initialData: spec\n                })\n            ])\n        };\n    };\n    const renderInlineBody = (spec, dialogId, contentId, backstage, ariaAttrs, getCompByName) => renderBody(spec, dialogId, Optional.some(contentId), backstage, ariaAttrs, getCompByName);\n    const renderModalBody = (spec, dialogId, backstage, getCompByName) => {\n        const bodySpec = renderBody(spec, dialogId, Optional.none(), backstage, false, getCompByName);\n        return ModalDialog.parts.body(bodySpec);\n    };\n    const renderIframeBody = (spec) => {\n        const bodySpec = {\n            dom: {\n                tag: 'div',\n                classes: ['tox-dialog__content-js']\n            },\n            components: [\n                {\n                    dom: {\n                        tag: 'div',\n                        classes: ['tox-dialog__body-iframe']\n                    },\n                    components: [\n                        craft(Optional.none(), {\n                            dom: {\n                                tag: 'iframe',\n                                attributes: {\n                                    src: spec.url\n                                }\n                            },\n                            behaviours: derive$1([\n                                Tabstopping.config({}),\n                                Focusing.config({})\n                            ])\n                        })\n                    ]\n                }\n            ],\n            behaviours: derive$1([\n                Keying.config({\n                    mode: 'acyclic',\n                    useTabstopAt: not(isPseudoStop)\n                })\n            ])\n        };\n        return ModalDialog.parts.body(bodySpec);\n    };\n\n    const isTouch = global$7.deviceType.isTouch();\n    const hiddenHeader = (title, close) => ({\n        dom: {\n            tag: 'div',\n            styles: { display: 'none' },\n            classes: ['tox-dialog__header']\n        },\n        components: [\n            title,\n            close\n        ]\n    });\n    const pClose = (onClose, providersBackstage) => ModalDialog.parts.close(\n    // Need to find a way to make it clear in the docs whether parts can be sketches\n    Button.sketch({\n        dom: {\n            tag: 'button',\n            classes: ['tox-button', 'tox-button--icon', 'tox-button--naked'],\n            attributes: {\n                'type': 'button',\n                'aria-label': providersBackstage.translate('Close')\n            }\n        },\n        action: onClose,\n        buttonBehaviours: derive$1([\n            Tabstopping.config({})\n        ])\n    }));\n    const pUntitled = () => ModalDialog.parts.title({\n        dom: {\n            tag: 'div',\n            classes: ['tox-dialog__title'],\n            innerHtml: '',\n            styles: {\n                display: 'none'\n            }\n        }\n    });\n    const pBodyMessage = (message, providersBackstage) => ModalDialog.parts.body({\n        dom: {\n            tag: 'div',\n            classes: ['tox-dialog__body']\n        },\n        components: [\n            {\n                dom: {\n                    tag: 'div',\n                    classes: ['tox-dialog__body-content']\n                },\n                components: [\n                    {\n                        dom: fromHtml(`<p>${sanitizeHtmlString(providersBackstage.translate(message))}</p>`)\n                    }\n                ]\n            }\n        ]\n    });\n    const pFooter = (buttons) => ModalDialog.parts.footer({\n        dom: {\n            tag: 'div',\n            classes: ['tox-dialog__footer']\n        },\n        components: buttons\n    });\n    const pFooterGroup = (startButtons, endButtons) => [\n        Container.sketch({\n            dom: {\n                tag: 'div',\n                classes: ['tox-dialog__footer-start']\n            },\n            components: startButtons\n        }),\n        Container.sketch({\n            dom: {\n                tag: 'div',\n                classes: ['tox-dialog__footer-end']\n            },\n            components: endButtons\n        })\n    ];\n    const renderDialog$1 = (spec) => {\n        const dialogClass = 'tox-dialog';\n        const blockerClass = dialogClass + '-wrap';\n        const blockerBackdropClass = blockerClass + '__backdrop';\n        const scrollLockClass = dialogClass + '__disable-scroll';\n        return ModalDialog.sketch({\n            role: spec.role,\n            lazySink: spec.lazySink,\n            onEscape: (comp) => {\n                spec.onEscape(comp);\n                // TODO: Make a strong type for Handled KeyEvent\n                return Optional.some(true);\n            },\n            useTabstopAt: (elem) => !isPseudoStop(elem),\n            firstTabstop: spec.firstTabstop,\n            dom: {\n                tag: 'div',\n                classes: [dialogClass].concat(spec.extraClasses),\n                styles: {\n                    position: 'relative',\n                    ...spec.extraStyles\n                }\n            },\n            components: [\n                spec.header,\n                spec.body,\n                ...spec.footer.toArray()\n            ],\n            parts: {\n                blocker: {\n                    dom: fromHtml(`<div class=\"${blockerClass}\"></div>`),\n                    components: [\n                        {\n                            dom: {\n                                tag: 'div',\n                                classes: (isTouch ? [blockerBackdropClass, blockerBackdropClass + '--opaque'] : [blockerBackdropClass])\n                            }\n                        }\n                    ]\n                }\n            },\n            dragBlockClass: blockerClass,\n            modalBehaviours: derive$1([\n                Focusing.config({}),\n                config('dialog-events', spec.dialogEvents.concat([\n                    // Note: `runOnSource` here will only listen to the event at the outer component level.\n                    // Using just `run` instead will cause an infinite loop as `focusIn` would fire a `focusin` which would then get responded to and so forth.\n                    runOnSource(focusin(), (comp, _se) => {\n                        Blocking.isBlocked(comp) ? noop() : Keying.focusIn(comp);\n                    }),\n                    run$1(focusShifted(), (comp, se) => {\n                        comp.getSystem().broadcastOn([dialogFocusShiftedChannel], {\n                            newFocus: se.event.newFocus\n                        });\n                    })\n                ])),\n                config('scroll-lock', [\n                    runOnAttached(() => {\n                        add$2(body(), scrollLockClass);\n                    }),\n                    runOnDetached(() => {\n                        remove$3(body(), scrollLockClass);\n                    })\n                ]),\n                ...spec.extraBehaviours\n            ]),\n            eventOrder: {\n                [execute$5()]: ['dialog-events'],\n                [attachedToDom()]: ['scroll-lock', 'dialog-events', 'alloy.base.behaviour'],\n                [detachedFromDom()]: ['alloy.base.behaviour', 'dialog-events', 'scroll-lock'],\n                ...spec.eventOrder\n            }\n        });\n    };\n\n    const renderClose = (providersBackstage) => Button.sketch({\n        dom: {\n            tag: 'button',\n            classes: ['tox-button', 'tox-button--icon', 'tox-button--naked'],\n            attributes: {\n                'type': 'button',\n                'aria-label': providersBackstage.translate('Close'),\n                'data-mce-name': 'close'\n            }\n        },\n        buttonBehaviours: derive$1([\n            Tabstopping.config({}),\n            Tooltipping.config(providersBackstage.tooltips.getConfig({\n                tooltipText: providersBackstage.translate('Close')\n            }))\n        ]),\n        components: [\n            render$4('close', { tag: 'span', classes: ['tox-icon'] }, providersBackstage.icons)\n        ],\n        action: (comp) => {\n            emit(comp, formCancelEvent);\n        },\n    });\n    const renderTitle = (spec, dialogId, titleId, providersBackstage) => {\n        const renderComponents = (data) => [text$2(providersBackstage.translate(data.title))];\n        return {\n            dom: {\n                tag: 'h1',\n                classes: ['tox-dialog__title'],\n                attributes: {\n                    ...titleId.map((x) => ({ id: x })).getOr({})\n                }\n            },\n            components: [],\n            behaviours: derive$1([\n                Reflecting.config({\n                    channel: `${titleChannel}-${dialogId}`,\n                    initialData: spec,\n                    renderComponents\n                })\n            ])\n        };\n    };\n    const renderDragHandle = () => ({\n        dom: fromHtml('<div class=\"tox-dialog__draghandle\"></div>')\n    });\n    const renderInlineHeader = (spec, dialogId, titleId, providersBackstage) => Container.sketch({\n        dom: fromHtml('<div class=\"tox-dialog__header\"></div>'),\n        components: [\n            renderTitle(spec, dialogId, Optional.some(titleId), providersBackstage),\n            renderDragHandle(),\n            renderClose(providersBackstage)\n        ],\n        containerBehaviours: derive$1([\n            Dragging.config({\n                mode: 'mouse',\n                blockerClass: 'blocker',\n                getTarget: (handle) => {\n                    return closest$3(handle, '[role=\"dialog\"]').getOrDie();\n                },\n                snaps: {\n                    getSnapPoints: () => [],\n                    leftAttr: 'data-drag-left',\n                    topAttr: 'data-drag-top'\n                },\n                onDrag: (comp, target) => {\n                    comp.getSystem().broadcastOn([repositionPopups()], { target });\n                }\n            })\n        ])\n    });\n    const renderModalHeader = (spec, dialogId, providersBackstage) => {\n        const pTitle = ModalDialog.parts.title(renderTitle(spec, dialogId, Optional.none(), providersBackstage));\n        const pHandle = ModalDialog.parts.draghandle(renderDragHandle());\n        const pClose = ModalDialog.parts.close(renderClose(providersBackstage));\n        const components = [pTitle].concat(spec.draggable ? [pHandle] : []).concat([pClose]);\n        return Container.sketch({\n            dom: fromHtml('<div class=\"tox-dialog__header\"></div>'),\n            components\n        });\n    };\n\n    const getHeader = (title, dialogId, backstage) => renderModalHeader({\n        title: backstage.shared.providers.translate(title),\n        draggable: backstage.dialog.isDraggableModal()\n    }, dialogId, backstage.shared.providers);\n    const getBusySpec = (message, bs, providers, headerHeight) => ({\n        dom: {\n            tag: 'div',\n            classes: ['tox-dialog__busy-spinner'],\n            attributes: {\n                'aria-label': providers.translate(message)\n            },\n            styles: {\n                left: '0px',\n                right: '0px',\n                bottom: '0px',\n                top: `${headerHeight.getOr(0)}px`,\n                position: 'absolute'\n            }\n        },\n        behaviours: bs,\n        components: [{\n                dom: fromHtml('<div class=\"tox-spinner\"><div></div><div></div><div></div></div>')\n            }]\n    });\n    const getEventExtras = (lazyDialog, providers, extra) => ({\n        onClose: () => extra.closeWindow(),\n        onBlock: (blockEvent) => {\n            const headerHeight = descendant(lazyDialog().element, '.tox-dialog__header').map((header) => get$d(header));\n            ModalDialog.setBusy(lazyDialog(), (_comp, bs) => getBusySpec(blockEvent.message, bs, providers, headerHeight));\n        },\n        onUnblock: () => {\n            ModalDialog.setIdle(lazyDialog());\n        }\n    });\n    const fullscreenClass = 'tox-dialog--fullscreen';\n    const largeDialogClass = 'tox-dialog--width-lg';\n    const mediumDialogClass = 'tox-dialog--width-md';\n    const getDialogSizeClass = (size) => {\n        switch (size) {\n            case 'large':\n                return Optional.some(largeDialogClass);\n            case 'medium':\n                return Optional.some(mediumDialogClass);\n            default:\n                return Optional.none();\n        }\n    };\n    const updateDialogSizeClass = (size, component) => {\n        const dialogBody = SugarElement.fromDom(component.element.dom);\n        if (!has(dialogBody, fullscreenClass)) {\n            remove$2(dialogBody, [largeDialogClass, mediumDialogClass]);\n            getDialogSizeClass(size).each((dialogSizeClass) => add$2(dialogBody, dialogSizeClass));\n        }\n    };\n    const toggleFullscreen = (comp, currentSize) => {\n        const dialogBody = SugarElement.fromDom(comp.element.dom);\n        const classes = get$7(dialogBody);\n        const currentSizeClass = find$5(classes, (c) => c === largeDialogClass || c === mediumDialogClass).or(getDialogSizeClass(currentSize));\n        toggle$2(dialogBody, [fullscreenClass, ...currentSizeClass.toArray()]);\n    };\n    const renderModalDialog = (spec, dialogEvents, backstage) => build$1(renderDialog$1({\n        ...spec,\n        firstTabstop: 1,\n        lazySink: backstage.shared.getSink,\n        extraBehaviours: [\n            memory({}),\n            ...spec.extraBehaviours\n        ],\n        onEscape: (comp) => {\n            emit(comp, formCancelEvent);\n        },\n        dialogEvents,\n        eventOrder: {\n            [receive()]: [Reflecting.name(), Receiving.name()],\n            [attachedToDom()]: ['scroll-lock', Reflecting.name(), 'messages', 'dialog-events', 'alloy.base.behaviour'],\n            [detachedFromDom()]: ['alloy.base.behaviour', 'dialog-events', 'messages', Reflecting.name(), 'scroll-lock']\n        }\n    }));\n    const mapMenuButtons = (buttons, menuItemStates = {}) => {\n        const mapItems = (button) => {\n            const items = map$2(button.items, (item) => {\n                const cell = get$h(menuItemStates, item.name).getOr(Cell(false));\n                return {\n                    ...item,\n                    storage: cell\n                };\n            });\n            return {\n                ...button,\n                items\n            };\n        };\n        return map$2(buttons, (button) => {\n            return button.type === 'menu' ? mapItems(button) : button;\n        });\n    };\n    const extractCellsToObject = (buttons) => foldl(buttons, (acc, button) => {\n        if (button.type === 'menu') {\n            const menuButton = button;\n            return foldl(menuButton.items, (innerAcc, item) => {\n                innerAcc[item.name] = item.storage;\n                return innerAcc;\n            }, acc);\n        }\n        return acc;\n    }, {});\n\n    const focusFirstTabbable = (getSink, component) => {\n        // TODO: add a test for focusIn (TINY-10125)\n        const focusIn = () => component.getSystem().isConnected() ? Keying.focusIn(component) : undefined;\n        const isDisabled = (focused) => has$1(focused, 'disabled') || getOpt(focused, 'aria-disabled').exists((val) => val === 'true');\n        const rootNode = getRootNode(component.element);\n        const current = active$1(rootNode);\n        active$1(rootNode).fold(focusIn, (focused) => {\n            // We need to check if the focused element is disabled because apparently firefox likes to leave focus on disabled elements.\n            if (isDisabled(focused)) {\n                focusIn();\n                // And we need the below check for IE, which likes to leave focus on the parent of disabled elements\n            }\n            else if (current.exists((cur) => contains(focused, cur) && isDisabled(cur))) {\n                focusIn();\n                // Lastly if something outside the sink has focus then return the focus back to the dialog\n            }\n            else {\n                getSink().toOptional()\n                    .filter((sink) => !contains(sink.element, focused))\n                    .each(focusIn);\n            }\n        });\n    };\n    const initCommonEvents = (fireApiEvent, extras, getSink) => [\n        // When focus moves onto a tab-placeholder, skip to the next thing in the tab sequence\n        runWithTarget(focusin(), onFocus),\n        // TODO: Test if disabled first.\n        fireApiEvent(formCloseEvent, (_api, spec, _event, self) => {\n            // TINY-9148: Safari scrolls down to the sink if the dialog is selected before removing,\n            // so we should blur the currently active element beforehand.\n            if (hasFocus(self.element)) {\n                active$1(getRootNode(self.element)).each(blur$1);\n            }\n            extras.onClose();\n            spec.onClose();\n        }),\n        // TODO: Test if disabled first.\n        fireApiEvent(formCancelEvent, (api, spec, _event, self) => {\n            spec.onCancel(api);\n            emit(self, formCloseEvent);\n        }),\n        run$1(formUnblockEvent, (component, _se) => {\n            extras.onUnblock();\n            focusFirstTabbable(getSink, component);\n        }),\n        run$1(formBlockEvent, (_c, se) => extras.onBlock(se.event))\n    ];\n    const initUrlDialog = (getInstanceApi, extras, getSink) => {\n        const fireApiEvent = (eventName, f) => run$1(eventName, (c, se) => {\n            withSpec(c, (spec, _c) => {\n                f(getInstanceApi(), spec, se.event, c);\n            });\n        });\n        const withSpec = (c, f) => {\n            Reflecting.getState(c).get().each((currentDialog) => {\n                f(currentDialog, c);\n            });\n        };\n        return [\n            ...initCommonEvents(fireApiEvent, extras, getSink),\n            fireApiEvent(formActionEvent, (api, spec, event) => {\n                spec.onAction(api, { name: event.name });\n            })\n        ];\n    };\n    const initDialog = (getInstanceApi, extras, getSink) => {\n        const fireApiEvent = (eventName, f) => run$1(eventName, (c, se) => {\n            withSpec(c, (spec, _c) => {\n                f(getInstanceApi(), spec, se.event, c);\n            });\n        });\n        const withSpec = (c, f) => {\n            Reflecting.getState(c).get().each((currentDialogInit) => {\n                f(currentDialogInit.internalDialog, c);\n            });\n        };\n        return [\n            ...initCommonEvents(fireApiEvent, extras, getSink),\n            fireApiEvent(formSubmitEvent, (api, spec) => spec.onSubmit(api)),\n            fireApiEvent(formChangeEvent, (api, spec, event) => {\n                spec.onChange(api, { name: event.name });\n            }),\n            fireApiEvent(formActionEvent, (api, spec, event, component) => {\n                spec.onAction(api, { name: event.name, value: event.value });\n                focusFirstTabbable(getSink, component);\n            }),\n            fireApiEvent(formTabChangeEvent, (api, spec, event) => {\n                spec.onTabChange(api, { newTabName: event.name, oldTabName: event.oldName });\n            }),\n            // When the dialog is being closed, store the current state of the form\n            runOnDetached((component) => {\n                const api = getInstanceApi();\n                Representing.setValue(component, api.getData());\n            })\n        ];\n    };\n\n    const makeButton = (button, backstage) => renderFooterButton(button, button.type, backstage);\n    const lookup = (compInSystem, footerButtons, buttonName) => find$5(footerButtons, (button) => button.name === buttonName)\n        .bind((memButton) => memButton.memento.getOpt(compInSystem));\n    const renderComponents = (_data, state) => {\n        // default group is 'end'\n        const footerButtons = state.map((s) => s.footerButtons).getOr([]);\n        const buttonGroups = partition$3(footerButtons, (button) => button.align === 'start');\n        const makeGroup = (edge, buttons) => Container.sketch({\n            dom: {\n                tag: 'div',\n                classes: [`tox-dialog__footer-${edge}`]\n            },\n            components: map$2(buttons, (button) => button.memento.asSpec())\n        });\n        const startButtons = makeGroup('start', buttonGroups.pass);\n        const endButtons = makeGroup('end', buttonGroups.fail);\n        return [startButtons, endButtons];\n    };\n    const renderFooter = (initSpec, dialogId, backstage) => {\n        const updateState = (comp, data) => {\n            const footerButtons = map$2(data.buttons, (button) => {\n                const memButton = record(makeButton(button, backstage));\n                return {\n                    name: button.name,\n                    align: button.align,\n                    memento: memButton\n                };\n            });\n            const lookupByName = (buttonName) => lookup(comp, footerButtons, buttonName);\n            return Optional.some({\n                lookupByName,\n                footerButtons\n            });\n        };\n        return {\n            dom: fromHtml('<div class=\"tox-dialog__footer\"></div>'),\n            components: [],\n            behaviours: derive$1([\n                Reflecting.config({\n                    channel: `${footerChannel}-${dialogId}`,\n                    initialData: initSpec,\n                    updateState,\n                    renderComponents\n                })\n            ])\n        };\n    };\n    const renderInlineFooter = (initSpec, dialogId, backstage) => renderFooter(initSpec, dialogId, backstage);\n    const renderModalFooter = (initSpec, dialogId, backstage) => ModalDialog.parts.footer(renderFooter(initSpec, dialogId, backstage));\n\n    const getCompByName = (access, name) => {\n        // TODO: Add API to alloy to find the inner most component of a Composing chain.\n        const root = access.getRoot();\n        // This is just to avoid throwing errors if the dialog closes before this. We should take it out\n        // while developing (probably), and put it back in for the real thing.\n        if (root.getSystem().isConnected()) {\n            const form = Composing.getCurrent(access.getFormWrapper()).getOr(access.getFormWrapper());\n            return Form.getField(form, name).orThunk(() => {\n                const footer = access.getFooter();\n                const footerState = footer.bind((f) => Reflecting.getState(f).get());\n                return footerState.bind((f) => f.lookupByName(name));\n            });\n        }\n        else {\n            return Optional.none();\n        }\n    };\n    const validateData$1 = (access, data) => {\n        const root = access.getRoot();\n        return Reflecting.getState(root).get().map((dialogState) => getOrDie(asRaw('data', dialogState.dataValidator, data))).getOr(data);\n    };\n    const getDialogApi = (access, doRedial, menuItemStates) => {\n        const withRoot = (f) => {\n            const root = access.getRoot();\n            if (root.getSystem().isConnected()) {\n                f(root);\n            }\n        };\n        const getData = () => {\n            const root = access.getRoot();\n            const valueComp = root.getSystem().isConnected() ? access.getFormWrapper() : root;\n            const representedValues = Representing.getValue(valueComp);\n            const menuItemCurrentState = map$1(menuItemStates, (cell) => cell.get());\n            return {\n                ...representedValues,\n                ...menuItemCurrentState\n            };\n        };\n        const setData = (newData) => {\n            // Currently, the decision is to ignore setData calls that fire after the dialog is closed\n            withRoot((_) => {\n                const prevData = instanceApi.getData();\n                const mergedData = deepMerge(prevData, newData);\n                const newInternalData = validateData$1(access, mergedData);\n                const form = access.getFormWrapper();\n                Representing.setValue(form, newInternalData);\n                each(menuItemStates, (v, k) => {\n                    if (has$2(mergedData, k)) {\n                        v.set(mergedData[k]);\n                    }\n                });\n            });\n        };\n        const setEnabled = (name, state) => {\n            getCompByName(access, name).each(state ? Disabling.enable : Disabling.disable);\n        };\n        const focus = (name) => {\n            getCompByName(access, name).each(Focusing.focus);\n        };\n        const block = (message) => {\n            if (!isString(message)) {\n                throw new Error('The dialogInstanceAPI.block function should be passed a blocking message of type string as an argument');\n            }\n            withRoot((root) => {\n                emitWith(root, formBlockEvent, { message });\n            });\n        };\n        const unblock = () => {\n            withRoot((root) => {\n                emit(root, formUnblockEvent);\n            });\n        };\n        const showTab = (name) => {\n            withRoot((_) => {\n                const body = access.getBody();\n                const bodyState = Reflecting.getState(body);\n                if (bodyState.get().exists((b) => b.isTabPanel())) {\n                    Composing.getCurrent(body).each((tabSection) => {\n                        TabSection.showTab(tabSection, name);\n                    });\n                }\n            });\n        };\n        const redial = (d) => {\n            withRoot((root) => {\n                const id = access.getId();\n                const dialogInit = doRedial(d);\n                const storedMenuButtons = mapMenuButtons(dialogInit.internalDialog.buttons, menuItemStates);\n                // TINY-9223: We only need to broadcast to the mothership containing the dialog\n                root.getSystem().broadcastOn([`${dialogChannel}-${id}`], dialogInit);\n                // NOTE: Reflecting does not have any smart handling of nested reflecting components,\n                // and the order of receiving a broadcast is non-deterministic. Here we use separate\n                // channels for each section (title, body, footer), and make those broadcasts *after*\n                // we've already sent the overall dialog broadcast. The overall dialog broadcast\n                // doesn't actually change the components ... its Reflecting config just stores state,\n                // but these Reflecting configs (title, body, footer) do change the components based on\n                // the received broadcasts.\n                root.getSystem().broadcastOn([`${titleChannel}-${id}`], dialogInit.internalDialog);\n                root.getSystem().broadcastOn([`${bodyChannel}-${id}`], dialogInit.internalDialog);\n                root.getSystem().broadcastOn([`${footerChannel}-${id}`], {\n                    ...dialogInit.internalDialog,\n                    buttons: storedMenuButtons\n                });\n                instanceApi.setData(dialogInit.initialData);\n            });\n        };\n        const close = () => {\n            withRoot((root) => {\n                emit(root, formCloseEvent);\n            });\n        };\n        const instanceApi = {\n            getData,\n            setData,\n            setEnabled,\n            focus,\n            block,\n            unblock,\n            showTab,\n            redial,\n            close,\n            toggleFullscreen: access.toggleFullscreen\n        };\n        return instanceApi;\n    };\n\n    const renderDialog = (dialogInit, extra, backstage) => {\n        const dialogId = generate$6('dialog');\n        const internalDialog = dialogInit.internalDialog;\n        const header = getHeader(internalDialog.title, dialogId, backstage);\n        const dialogSize = Cell(internalDialog.size);\n        const getCompByName$1 = (name) => getCompByName(modalAccess, name);\n        const dialogSizeClasses = getDialogSizeClass(dialogSize.get()).toArray();\n        const updateState = (comp, incoming) => {\n            dialogSize.set(incoming.internalDialog.size);\n            updateDialogSizeClass(incoming.internalDialog.size, comp);\n            return Optional.some(incoming);\n        };\n        const body = renderModalBody({\n            body: internalDialog.body,\n            initialData: internalDialog.initialData\n        }, dialogId, backstage, getCompByName$1);\n        const storedMenuButtons = mapMenuButtons(internalDialog.buttons);\n        const objOfCells = extractCellsToObject(storedMenuButtons);\n        const footer = someIf(storedMenuButtons.length !== 0, renderModalFooter({ buttons: storedMenuButtons }, dialogId, backstage));\n        const dialogEvents = initDialog(() => instanceApi, getEventExtras(() => dialog, backstage.shared.providers, extra), backstage.shared.getSink);\n        const spec = {\n            id: dialogId,\n            header,\n            body,\n            footer,\n            extraClasses: dialogSizeClasses,\n            extraBehaviours: [\n                Reflecting.config({\n                    channel: `${dialogChannel}-${dialogId}`,\n                    updateState,\n                    initialData: dialogInit\n                }),\n            ],\n            extraStyles: {}\n        };\n        const dialog = renderModalDialog(spec, dialogEvents, backstage);\n        const modalAccess = (() => {\n            const getForm = () => {\n                const outerForm = ModalDialog.getBody(dialog);\n                return Composing.getCurrent(outerForm).getOr(outerForm);\n            };\n            const toggleFullscreen$1 = () => {\n                toggleFullscreen(dialog, dialogSize.get());\n            };\n            return {\n                getId: constant$1(dialogId),\n                getRoot: constant$1(dialog),\n                getBody: () => ModalDialog.getBody(dialog),\n                getFooter: () => ModalDialog.getFooter(dialog),\n                getFormWrapper: getForm,\n                toggleFullscreen: toggleFullscreen$1\n            };\n        })();\n        // TODO: Get the validator from the dialog state.\n        const instanceApi = getDialogApi(modalAccess, extra.redial, objOfCells);\n        return {\n            dialog,\n            instanceApi\n        };\n    };\n\n    // DUPE with SilverDialog. Cleaning up.\n    const renderInlineDialog = (dialogInit, extra, backstage, ariaAttrs = false, refreshDocking) => {\n        const dialogId = generate$6('dialog');\n        const dialogLabelId = generate$6('dialog-label');\n        const dialogContentId = generate$6('dialog-content');\n        const internalDialog = dialogInit.internalDialog;\n        const getCompByName$1 = (name) => getCompByName(modalAccess, name);\n        const dialogSize = Cell(internalDialog.size);\n        const dialogSizeClass = getDialogSizeClass(dialogSize.get()).toArray();\n        // Reflecting behaviour broadcasts on dialog channel only on redial.\n        const updateState = (comp, incoming) => {\n            // Update dialog size and position upon redial.\n            dialogSize.set(incoming.internalDialog.size);\n            updateDialogSizeClass(incoming.internalDialog.size, comp);\n            refreshDocking();\n            return Optional.some(incoming);\n        };\n        const memHeader = record(renderInlineHeader({\n            title: internalDialog.title,\n            draggable: true\n        }, dialogId, dialogLabelId, backstage.shared.providers));\n        const memBody = record(renderInlineBody({\n            body: internalDialog.body,\n            initialData: internalDialog.initialData,\n        }, dialogId, dialogContentId, backstage, ariaAttrs, getCompByName$1));\n        const storagedMenuButtons = mapMenuButtons(internalDialog.buttons);\n        const objOfCells = extractCellsToObject(storagedMenuButtons);\n        const optMemFooter = someIf(storagedMenuButtons.length !== 0, record(renderInlineFooter({\n            buttons: storagedMenuButtons\n        }, dialogId, backstage)));\n        const dialogEvents = initDialog(() => instanceApi, {\n            onBlock: (event) => {\n                Blocking.block(dialog, (_comp, bs) => {\n                    const headerHeight = memHeader.getOpt(dialog).map((dialog) => get$d(dialog.element));\n                    return getBusySpec(event.message, bs, backstage.shared.providers, headerHeight);\n                });\n            },\n            onUnblock: () => {\n                Blocking.unblock(dialog);\n            },\n            onClose: () => extra.closeWindow()\n        }, backstage.shared.getSink);\n        const inlineClass = 'tox-dialog-inline';\n        const os = detect$1().os;\n        // TODO: Disable while validating?\n        const dialog = build$1({\n            dom: {\n                tag: 'div',\n                classes: ['tox-dialog', inlineClass, ...dialogSizeClass],\n                attributes: {\n                    role: 'dialog',\n                    // TINY-10808 - Workaround to address the dialog header not being announced on VoiceOver with aria-labelledby, ideally we should use the aria-labelledby\n                    ...os.isMacOS() ? { 'aria-label': internalDialog.title } : { 'aria-labelledby': dialogLabelId }\n                }\n            },\n            eventOrder: {\n                [receive()]: [Reflecting.name(), Receiving.name()],\n                [execute$5()]: ['execute-on-form'],\n                [attachedToDom()]: ['reflecting', 'execute-on-form']\n            },\n            // Dupe with SilverDialog.\n            behaviours: derive$1([\n                Keying.config({\n                    mode: 'cyclic',\n                    onEscape: (c) => {\n                        emit(c, formCloseEvent);\n                        return Optional.some(true);\n                    },\n                    useTabstopAt: (elem) => !isPseudoStop(elem) && (name$3(elem) !== 'button' || get$g(elem, 'disabled') !== 'disabled'),\n                    firstTabstop: 1\n                }),\n                Reflecting.config({\n                    channel: `${dialogChannel}-${dialogId}`,\n                    updateState,\n                    initialData: dialogInit\n                }),\n                Focusing.config({}),\n                config('execute-on-form', dialogEvents.concat([\n                    // Note: `runOnSource` here will only listen to the event at the outer component level.\n                    // Using just `run` instead will cause an infinite loop as `focusIn` would fire a `focusin` which would then get responded to and so forth.\n                    runOnSource(focusin(), (comp, _se) => {\n                        Keying.focusIn(comp);\n                    }),\n                    run$1(focusShifted(), (comp, se) => {\n                        comp.getSystem().broadcastOn([dialogFocusShiftedChannel], {\n                            newFocus: se.event.newFocus\n                        });\n                    })\n                ])),\n                Blocking.config({ getRoot: () => Optional.some(dialog) }),\n                Replacing.config({}),\n                memory({})\n            ]),\n            components: [\n                memHeader.asSpec(),\n                memBody.asSpec(),\n                ...optMemFooter.map((memFooter) => memFooter.asSpec()).toArray()\n            ]\n        });\n        const toggleFullscreen$1 = () => {\n            toggleFullscreen(dialog, dialogSize.get());\n        };\n        // TODO: Clean up the dupe between this (InlineDialog) and SilverDialog\n        const modalAccess = {\n            getId: constant$1(dialogId),\n            getRoot: constant$1(dialog),\n            getFooter: () => optMemFooter.map((memFooter) => memFooter.get(dialog)),\n            getBody: () => memBody.get(dialog),\n            getFormWrapper: () => {\n                const body = memBody.get(dialog);\n                return Composing.getCurrent(body).getOr(body);\n            },\n            toggleFullscreen: toggleFullscreen$1\n        };\n        const instanceApi = getDialogApi(modalAccess, extra.redial, objOfCells);\n        return {\n            dialog,\n            instanceApi\n        };\n    };\n\n    var global = tinymce.util.Tools.resolve('tinymce.util.URI');\n\n    const getUrlDialogApi = (root) => {\n        const withRoot = (f) => {\n            if (root.getSystem().isConnected()) {\n                f(root);\n            }\n        };\n        const block = (message) => {\n            if (!isString(message)) {\n                throw new Error('The urlDialogInstanceAPI.block function should be passed a blocking message of type string as an argument');\n            }\n            withRoot((root) => {\n                emitWith(root, formBlockEvent, { message });\n            });\n        };\n        const unblock = () => {\n            withRoot((root) => {\n                emit(root, formUnblockEvent);\n            });\n        };\n        const close = () => {\n            withRoot((root) => {\n                emit(root, formCloseEvent);\n            });\n        };\n        const sendMessage = (data) => {\n            withRoot((root) => {\n                root.getSystem().broadcastOn([bodySendMessageChannel], data);\n            });\n        };\n        return {\n            block,\n            unblock,\n            close,\n            sendMessage\n        };\n    };\n\n    // A list of supported message actions\n    const SUPPORTED_MESSAGE_ACTIONS = ['insertContent', 'setContent', 'execCommand', 'close', 'block', 'unblock'];\n    const isSupportedMessage = (data) => isObject(data) && SUPPORTED_MESSAGE_ACTIONS.indexOf(data.mceAction) !== -1;\n    const isCustomMessage = (data) => !isSupportedMessage(data) && isObject(data) && has$2(data, 'mceAction');\n    const handleMessage = (editor, api, data) => {\n        switch (data.mceAction) {\n            case 'insertContent':\n                editor.insertContent(data.content);\n                break;\n            case 'setContent':\n                editor.setContent(data.content);\n                break;\n            case 'execCommand':\n                const ui = isBoolean(data.ui) ? data.ui : false;\n                editor.execCommand(data.cmd, ui, data.value);\n                break;\n            case 'close':\n                api.close();\n                break;\n            case 'block':\n                api.block(data.message);\n                break;\n            case 'unblock':\n                api.unblock();\n                break;\n        }\n    };\n    const renderUrlDialog = (internalDialog, extra, editor, backstage) => {\n        const dialogId = generate$6('dialog');\n        const header = getHeader(internalDialog.title, dialogId, backstage);\n        const body = renderIframeBody(internalDialog);\n        const footer = internalDialog.buttons.bind((buttons) => {\n            // Don't render a footer if no buttons are specified\n            if (buttons.length === 0) {\n                return Optional.none();\n            }\n            else {\n                return Optional.some(renderModalFooter({ buttons }, dialogId, backstage));\n            }\n        });\n        const dialogEvents = initUrlDialog(() => instanceApi, getEventExtras(() => dialog, backstage.shared.providers, extra), backstage.shared.getSink);\n        // Add the styles for the modal width/height\n        const styles = {\n            ...internalDialog.height.fold(() => ({}), (height) => ({ 'height': height + 'px', 'max-height': height + 'px' })),\n            ...internalDialog.width.fold(() => ({}), (width) => ({ 'width': width + 'px', 'max-width': width + 'px' }))\n        };\n        // Default back to using a large sized dialog, if no dimensions are specified\n        const classes = internalDialog.width.isNone() && internalDialog.height.isNone() ? ['tox-dialog--width-lg'] : [];\n        // Determine the iframe urls domain, so we can target that specifically when sending messages\n        const iframeUri = new global(internalDialog.url, { base_uri: new global(window.location.href) });\n        const iframeDomain = `${iframeUri.protocol}://${iframeUri.host}${iframeUri.port ? ':' + iframeUri.port : ''}`;\n        const messageHandlerUnbinder = unbindable();\n        const updateState = (_comp, incoming) => Optional.some(incoming);\n        // Setup the behaviours for dealing with messages between the iframe and current window\n        const extraBehaviours = [\n            // Because this doesn't define `renderComponents`, all this does is update the state.\n            // We use the state for the initialData. The other parts (body etc.) render the\n            // components based on what reflecting receives.\n            Reflecting.config({\n                channel: `${dialogChannel}-${dialogId}`,\n                updateState,\n                initialData: internalDialog\n            }),\n            config('messages', [\n                // When the dialog is opened, bind a window message listener for the spec url\n                runOnAttached(() => {\n                    const unbind = bind$1(SugarElement.fromDom(window), 'message', (e) => {\n                        // Validate that the request came from the correct domain\n                        if (iframeUri.isSameOrigin(new global(e.raw.origin))) {\n                            const data = e.raw.data;\n                            // Handle the message if it has the 'mceAction' key, otherwise just ignore it\n                            if (isSupportedMessage(data)) {\n                                handleMessage(editor, instanceApi, data);\n                            }\n                            else if (isCustomMessage(data)) {\n                                internalDialog.onMessage(instanceApi, data);\n                            }\n                        }\n                    });\n                    messageHandlerUnbinder.set(unbind);\n                }),\n                // When the dialog is closed, unbind the window message listener\n                runOnDetached(messageHandlerUnbinder.clear)\n            ]),\n            Receiving.config({\n                channels: {\n                    [bodySendMessageChannel]: {\n                        onReceive: (comp, data) => {\n                            // Send the message to the iframe via postMessage\n                            descendant(comp.element, 'iframe').each((iframeEle) => {\n                                const iframeWin = iframeEle.dom.contentWindow;\n                                if (isNonNullable(iframeWin)) {\n                                    iframeWin.postMessage(data, iframeDomain);\n                                }\n                            });\n                        }\n                    }\n                }\n            })\n        ];\n        const spec = {\n            id: dialogId,\n            header,\n            body,\n            footer,\n            extraClasses: classes,\n            extraBehaviours,\n            extraStyles: styles\n        };\n        const dialog = renderModalDialog(spec, dialogEvents, backstage);\n        const instanceApi = getUrlDialogApi(dialog);\n        return {\n            dialog,\n            instanceApi\n        };\n    };\n\n    const setup$2 = (backstage) => {\n        const sharedBackstage = backstage.shared;\n        const open = (message, callback) => {\n            const closeDialog = () => {\n                ModalDialog.hide(alertDialog);\n                callback();\n            };\n            const memFooterClose = record(renderFooterButton({\n                context: 'any',\n                name: 'close-alert',\n                text: 'OK',\n                primary: true,\n                buttonType: Optional.some('primary'),\n                align: 'end',\n                enabled: true,\n                icon: Optional.none()\n            }, 'cancel', backstage));\n            const titleSpec = pUntitled();\n            const closeSpec = pClose(closeDialog, sharedBackstage.providers);\n            const alertDialog = build$1(renderDialog$1({\n                role: 'alertdialog',\n                lazySink: () => sharedBackstage.getSink(),\n                header: hiddenHeader(titleSpec, closeSpec),\n                body: pBodyMessage(message, sharedBackstage.providers),\n                footer: Optional.some(pFooter(pFooterGroup([], [\n                    memFooterClose.asSpec()\n                ]))),\n                onEscape: closeDialog,\n                extraClasses: ['tox-alert-dialog'],\n                extraBehaviours: [],\n                extraStyles: {},\n                dialogEvents: [\n                    run$1(formCancelEvent, closeDialog),\n                    runOnAttached((c) => {\n                        const bodyElm = ModalDialog.getBody(c);\n                        describedBy(c.element, bodyElm.element);\n                    }),\n                ],\n                eventOrder: {}\n            }));\n            ModalDialog.show(alertDialog);\n            const footerCloseButton = memFooterClose.get(alertDialog);\n            Focusing.focus(footerCloseButton);\n        };\n        return {\n            open\n        };\n    };\n\n    const setup$1 = (backstage) => {\n        const sharedBackstage = backstage.shared;\n        // FIX: Extreme dupe with Alert dialog\n        const open = (message, callback) => {\n            const closeDialog = (state) => {\n                ModalDialog.hide(confirmDialog);\n                callback(state);\n            };\n            const memFooterYes = record(renderFooterButton({\n                context: 'any',\n                name: 'yes',\n                text: 'Yes',\n                primary: true,\n                buttonType: Optional.some('primary'),\n                align: 'end',\n                enabled: true,\n                icon: Optional.none()\n            }, 'submit', backstage));\n            const footerNo = renderFooterButton({\n                context: 'any',\n                name: 'no',\n                text: 'No',\n                primary: false,\n                buttonType: Optional.some('secondary'),\n                align: 'end',\n                enabled: true,\n                icon: Optional.none()\n            }, 'cancel', backstage);\n            const titleSpec = pUntitled();\n            const closeSpec = pClose(() => closeDialog(false), sharedBackstage.providers);\n            const confirmDialog = build$1(renderDialog$1({\n                role: 'alertdialog',\n                lazySink: () => sharedBackstage.getSink(),\n                header: hiddenHeader(titleSpec, closeSpec),\n                body: pBodyMessage(message, sharedBackstage.providers),\n                footer: Optional.some(pFooter(pFooterGroup([], [\n                    footerNo,\n                    memFooterYes.asSpec()\n                ]))),\n                onEscape: () => closeDialog(false),\n                extraClasses: ['tox-confirm-dialog'],\n                extraBehaviours: [],\n                extraStyles: {},\n                dialogEvents: [\n                    run$1(formCancelEvent, () => closeDialog(false)),\n                    run$1(formSubmitEvent, () => closeDialog(true)),\n                    runOnAttached((c) => {\n                        const bodyElm = ModalDialog.getBody(c);\n                        describedBy(c.element, bodyElm.element);\n                    }),\n                ],\n                eventOrder: {}\n            }));\n            ModalDialog.show(confirmDialog);\n            const footerYesButton = memFooterYes.get(confirmDialog);\n            Focusing.focus(footerYesButton);\n        };\n        return {\n            open\n        };\n    };\n\n    const validateData = (data, validator) => getOrDie(asRaw('data', validator, data));\n    const isAlertOrConfirmDialog = (target) => closest$1(target, '.tox-alert-dialog') || closest$1(target, '.tox-confirm-dialog');\n    const inlineAdditionalBehaviours = (editor, isStickyToolbar, isToolbarLocationTop, onHide) => {\n        // When using sticky toolbars it already handles the docking behaviours so applying docking would\n        // do nothing except add additional processing when scrolling, so we don't want to include it here\n        // (Except when the toolbar is located at the bottom since the anchor will be at the top)\n        if (isStickyToolbar && isToolbarLocationTop) {\n            return [];\n        }\n        else {\n            return [\n                Docking.config({\n                    contextual: {\n                        lazyContext: () => Optional.some(box$1(SugarElement.fromDom(editor.getContentAreaContainer()))),\n                        fadeInClass: 'tox-dialog-dock-fadein',\n                        fadeOutClass: 'tox-dialog-dock-fadeout',\n                        transitionClass: 'tox-dialog-dock-transition',\n                        onHide\n                    },\n                    modes: ['top'],\n                    lazyViewport: (comp) => {\n                        // If we don't have a special scrolling environment, then just use the default\n                        // viewport of (window)\n                        const optScrollingContext = detectWhenSplitUiMode(editor, comp.element);\n                        return optScrollingContext\n                            .map((sc) => {\n                            const combinedBounds = getBoundsFrom(sc);\n                            return {\n                                bounds: combinedBounds,\n                                optScrollEnv: Optional.some({\n                                    currentScrollTop: sc.element.dom.scrollTop,\n                                    scrollElmTop: absolute$3(sc.element).top\n                                })\n                            };\n                        }).getOrThunk(() => ({\n                            bounds: win(),\n                            optScrollEnv: Optional.none()\n                        }));\n                    }\n                })\n            ];\n        }\n    };\n    const setup = (extras) => {\n        const editor = extras.editor;\n        const isStickyToolbar$1 = isStickyToolbar(editor);\n        // Alert and Confirm dialogs are Modal Dialogs\n        const alertDialog = setup$2(extras.backstages.dialog);\n        const confirmDialog = setup$1(extras.backstages.dialog);\n        const open = (config, params, closeWindow) => {\n            if (!isUndefined(params)) {\n                if (params.inline === 'toolbar') {\n                    return openInlineDialog(config, extras.backstages.popup.shared.anchors.inlineDialog(), closeWindow, params);\n                }\n                else if (params.inline === 'bottom') {\n                    return openBottomInlineDialog(config, extras.backstages.popup.shared.anchors.inlineBottomDialog(), closeWindow, params);\n                }\n                else if (params.inline === 'cursor') {\n                    return openInlineDialog(config, extras.backstages.popup.shared.anchors.cursor(), closeWindow, params);\n                }\n            }\n            return openModalDialog(config, closeWindow);\n        };\n        const openUrl = (config, closeWindow) => openModalUrlDialog(config, closeWindow);\n        const openModalUrlDialog = (config, closeWindow) => {\n            const factory = (contents) => {\n                const dialog = renderUrlDialog(contents, {\n                    closeWindow: () => {\n                        ModalDialog.hide(dialog.dialog);\n                        closeWindow(dialog.instanceApi);\n                    }\n                }, editor, extras.backstages.dialog);\n                ModalDialog.show(dialog.dialog);\n                return dialog.instanceApi;\n            };\n            return DialogManager.openUrl(factory, config);\n        };\n        const openModalDialog = (config, closeWindow) => {\n            const factory = (contents, internalInitialData, dataValidator) => {\n                // We used to validate data here, but it's done by the instanceApi.setData call below.\n                const initialData = internalInitialData;\n                const dialogInit = {\n                    dataValidator,\n                    initialData,\n                    internalDialog: contents\n                };\n                const dialog = renderDialog(dialogInit, {\n                    redial: DialogManager.redial,\n                    closeWindow: () => {\n                        ModalDialog.hide(dialog.dialog);\n                        closeWindow(dialog.instanceApi);\n                    }\n                }, extras.backstages.dialog);\n                ModalDialog.show(dialog.dialog);\n                dialog.instanceApi.setData(initialData);\n                return dialog.instanceApi;\n            };\n            return DialogManager.open(factory, config);\n        };\n        const openInlineDialog = (config$1, anchor, closeWindow, windowParams) => {\n            const factory = (contents, internalInitialData, dataValidator) => {\n                const initialData = validateData(internalInitialData, dataValidator);\n                const inlineDialog = value$2();\n                const isToolbarLocationTop = extras.backstages.popup.shared.header.isPositionedAtTop();\n                const dialogInit = {\n                    dataValidator,\n                    initialData,\n                    internalDialog: contents\n                };\n                const refreshDocking = () => inlineDialog.on((dialog) => {\n                    InlineView.reposition(dialog);\n                    if (!isStickyToolbar$1 || !isToolbarLocationTop) {\n                        Docking.refresh(dialog);\n                    }\n                });\n                const dialogUi = renderInlineDialog(dialogInit, {\n                    redial: DialogManager.redial,\n                    closeWindow: () => {\n                        inlineDialog.on(InlineView.hide);\n                        editor.off('ResizeEditor', refreshDocking);\n                        editor.off('ScrollWindow', repositionPopups$1);\n                        inlineDialog.clear();\n                        closeWindow(dialogUi.instanceApi);\n                    }\n                }, extras.backstages.popup, windowParams.ariaAttrs, refreshDocking);\n                const repositionPopups$1 = () => dialogUi.dialog.getSystem().broadcastOn([repositionPopups()], { target: dialogUi.dialog.element });\n                const dismissPopups$1 = () => dialogUi.dialog.getSystem().broadcastOn([dismissPopups()], { target: dialogUi.dialog.element });\n                const inlineDialogComp = build$1(InlineView.sketch({\n                    lazySink: extras.backstages.popup.shared.getSink,\n                    dom: {\n                        tag: 'div',\n                        classes: []\n                    },\n                    // Fires the default dismiss event.\n                    fireDismissalEventInstead: (windowParams.persistent ? { event: 'doNotDismissYet' } : {}),\n                    // TINY-9412: The docking behaviour for inline dialogs is inconsistent\n                    // for toolbar_location: bottom. We need to clarify exactly what the behaviour\n                    // should be. The intent here might have been that they shouldn't automatically\n                    // reposition at all because they aren't visually connected to the toolbar\n                    // (i.e. inline \"toolbar\" dialogs still display at the top, even when the\n                    // toolbar_location is bottom), but it's unclear.\n                    ...isToolbarLocationTop ? {} : { fireRepositionEventInstead: {} },\n                    inlineBehaviours: derive$1([\n                        config('window-manager-inline-events', [\n                            run$1(dismissRequested(), (_comp, _se) => {\n                                emit(dialogUi.dialog, formCancelEvent);\n                            })\n                        ]),\n                        ...inlineAdditionalBehaviours(editor, isStickyToolbar$1, isToolbarLocationTop, dismissPopups$1)\n                    ]),\n                    // Treat alert or confirm dialogs as part of the inline dialog\n                    isExtraPart: (_comp, target) => isAlertOrConfirmDialog(target)\n                }));\n                inlineDialog.set(inlineDialogComp);\n                const getInlineDialogBounds = () => {\n                    // At the moment the inline dialog is just put anywhere in the body, and docking is what is used to make\n                    // sure that it stays onscreen\n                    const elem = editor.inline ? body() : SugarElement.fromDom(editor.getContainer());\n                    const bounds = box$1(elem);\n                    return Optional.some(bounds);\n                };\n                // Position the inline dialog\n                InlineView.showWithinBounds(inlineDialogComp, premade(dialogUi.dialog), { anchor }, getInlineDialogBounds);\n                // Refresh the docking position if not using a sticky toolbar\n                if (!isStickyToolbar$1 || !isToolbarLocationTop) {\n                    Docking.refresh(inlineDialogComp);\n                    // Bind to the editor resize event and update docking as needed. We don't need to worry about\n                    // 'ResizeWindow` as that's handled by docking already.\n                    editor.on('ResizeEditor', refreshDocking);\n                }\n                editor.on('ScrollWindow', repositionPopups$1);\n                // Set the initial data in the dialog and focus the first focusable item\n                dialogUi.instanceApi.setData(initialData);\n                Keying.focusIn(dialogUi.dialog);\n                return dialogUi.instanceApi;\n            };\n            return DialogManager.open(factory, config$1);\n        };\n        const openBottomInlineDialog = (config$1, anchor, closeWindow, windowParams) => {\n            const factory = (contents, internalInitialData, dataValidator) => {\n                const initialData = validateData(internalInitialData, dataValidator);\n                const inlineDialog = value$2();\n                const isToolbarLocationTop = extras.backstages.popup.shared.header.isPositionedAtTop();\n                const dialogInit = {\n                    dataValidator,\n                    initialData,\n                    internalDialog: contents\n                };\n                const refreshDocking = () => inlineDialog.on((dialog) => {\n                    InlineView.reposition(dialog);\n                    Docking.refresh(dialog);\n                });\n                const dialogUi = renderInlineDialog(dialogInit, {\n                    redial: DialogManager.redial,\n                    closeWindow: () => {\n                        inlineDialog.on(InlineView.hide);\n                        editor.off('ResizeEditor ScrollWindow ElementScroll', refreshDocking);\n                        inlineDialog.clear();\n                        closeWindow(dialogUi.instanceApi);\n                    }\n                }, extras.backstages.popup, windowParams.ariaAttrs, refreshDocking);\n                const inlineDialogComp = build$1(InlineView.sketch({\n                    lazySink: extras.backstages.popup.shared.getSink,\n                    dom: {\n                        tag: 'div',\n                        classes: []\n                    },\n                    // Fires the default dismiss event.\n                    fireDismissalEventInstead: (windowParams.persistent ? { event: 'doNotDismissYet' } : {}),\n                    ...isToolbarLocationTop ? {} : { fireRepositionEventInstead: {} },\n                    inlineBehaviours: derive$1([\n                        config('window-manager-inline-events', [\n                            run$1(dismissRequested(), (_comp, _se) => {\n                                emit(dialogUi.dialog, formCancelEvent);\n                            })\n                        ]),\n                        Docking.config({\n                            contextual: {\n                                lazyContext: () => Optional.some(box$1(SugarElement.fromDom(editor.getContentAreaContainer()))),\n                                fadeInClass: 'tox-dialog-dock-fadein',\n                                fadeOutClass: 'tox-dialog-dock-fadeout',\n                                transitionClass: 'tox-dialog-dock-transition'\n                            },\n                            modes: ['top', 'bottom'],\n                            lazyViewport: (comp) => {\n                                const optScrollingContext = detectWhenSplitUiMode(editor, comp.element);\n                                return optScrollingContext.map((sc) => {\n                                    const combinedBounds = getBoundsFrom(sc);\n                                    return {\n                                        bounds: combinedBounds,\n                                        optScrollEnv: Optional.some({\n                                            currentScrollTop: sc.element.dom.scrollTop,\n                                            scrollElmTop: absolute$3(sc.element).top\n                                        })\n                                    };\n                                }).getOrThunk(() => ({\n                                    bounds: win(),\n                                    optScrollEnv: Optional.none()\n                                }));\n                            }\n                        })\n                    ]),\n                    // Treat alert or confirm dialogs as part of the inline dialog\n                    isExtraPart: (_comp, target) => isAlertOrConfirmDialog(target)\n                }));\n                inlineDialog.set(inlineDialogComp);\n                const getInlineDialogBounds = () => {\n                    return extras.backstages.popup.shared.getSink().toOptional().bind((s) => {\n                        const optScrollingContext = detectWhenSplitUiMode(editor, s.element);\n                        // Margin between element and the bottom of the screen or the editor content area container\n                        const margin = 15;\n                        const bounds$1 = optScrollingContext.map((sc) => getBoundsFrom(sc)).getOr(win());\n                        const contentAreaContainer = box$1(SugarElement.fromDom(editor.getContentAreaContainer()));\n                        const constrainedBounds = constrain(contentAreaContainer, bounds$1);\n                        return Optional.some(bounds(constrainedBounds.x, constrainedBounds.y, constrainedBounds.width, constrainedBounds.height - margin));\n                    });\n                };\n                // Position the inline dialog\n                InlineView.showWithinBounds(inlineDialogComp, premade(dialogUi.dialog), { anchor }, getInlineDialogBounds);\n                Docking.refresh(inlineDialogComp);\n                editor.on('ResizeEditor ScrollWindow ElementScroll ResizeWindow', refreshDocking);\n                // Set the initial data in the dialog and focus the first focusable item\n                dialogUi.instanceApi.setData(initialData);\n                Keying.focusIn(dialogUi.dialog);\n                return dialogUi.instanceApi;\n            };\n            return DialogManager.open(factory, config$1);\n        };\n        const confirm = (message, callback) => {\n            confirmDialog.open(message, callback);\n        };\n        const alert = (message, callback) => {\n            alertDialog.open(message, callback);\n        };\n        const close = (instanceApi) => {\n            instanceApi.close();\n        };\n        return {\n            open,\n            openUrl,\n            alert,\n            close,\n            confirm\n        };\n    };\n\n    const registerOptions = (editor) => {\n        register$f(editor);\n        register$e(editor);\n        register(editor);\n    };\n    var Theme = () => {\n        global$b.add('silver', (editor) => {\n            registerOptions(editor);\n            // When using the ui_mode: split, the popup sink is placed as a sibling to the\n            // editor, which means that it might be subject to any scrolling environments\n            // that the editor has. Therefore, we want to make the popup sink have an overall\n            // bounds that is dependent on its scrolling environment. We don't know that ahead\n            // of time, so we use a mutable variable whose value will change if there is a scrolling context.\n            let popupSinkBounds = () => win();\n            const { dialogs, popups, renderUI: renderModeUI } = setup$3(editor, {\n                // consult the mutable variable to find out the bounds for the popup sink. When renderUI is\n                // called, this mutable variable might be reassigned\n                getPopupSinkBounds: () => popupSinkBounds()\n            });\n            // We wrap the `renderModeUI` function being returned by Render so that we can update\n            // the getPopupSinkBounds mutable variable if required.\n            // DON'T define this function as `async`; otherwise, it will slow down the rendering process and cause flickering if the editor is repeatedly removed and re-initialized.\n            const renderUI = () => {\n                const renderResult = renderModeUI();\n                const optScrollingContext = detectWhenSplitUiMode(editor, popups.getMothership().element);\n                optScrollingContext.each((sc) => {\n                    popupSinkBounds = () => {\n                        // At this stage, it looks like we need to calculate the bounds each time, just in\n                        // case the scrolling context details have changed since the last time. The bounds considers\n                        // the Boxes.box sizes, which might change over time.\n                        return getBoundsFrom(sc);\n                    };\n                });\n                return renderResult;\n            };\n            Autocompleter.register(editor, popups.backstage.shared);\n            const windowMgr = setup({\n                editor,\n                backstages: {\n                    popup: popups.backstage,\n                    dialog: dialogs.backstage\n                }\n            });\n            const notificationRegion = value$2();\n            // The NotificationManager uses the popup mothership (and sink)\n            const getNotificationManagerImpl = () => NotificationManagerImpl(editor, { backstage: popups.backstage }, popups.getMothership(), notificationRegion);\n            const getPromotionElement = () => {\n                return descendant(SugarElement.fromDom(editor.getContainer()), '.tox-promotion').map((promotion) => promotion.dom).getOrNull();\n            };\n            const getSinkElement = (type) => type === 'dialog' ? dialogs.getMothership().element.dom : popups.getMothership().element.dom;\n            return {\n                renderUI,\n                getWindowManagerImpl: constant$1(windowMgr),\n                getNotificationManagerImpl,\n                getPromotionElement,\n                getSinkElement\n            };\n        });\n    };\n\n    Theme();\n    /** *****\n     * DO NOT EXPORT ANYTHING\n     *\n     * IF YOU DO ROLLUP WILL LEAVE A GLOBAL ON THE PAGE\n     *******/\n\n})();\n", "tinymce.IconManager.add('default', {\n  icons: {\n    'accessibility-check': '<svg width=\"24\" height=\"24\"><path d=\"M12 2a2 2 0 0 1 2 2 2 2 0 0 1-2 2 2 2 0 0 1-2-2c0-1.1.9-2 2-2Zm8 7h-5v12c0 .6-.4 1-1 1a1 1 0 0 1-1-1v-5c0-.6-.4-1-1-1a1 1 0 0 0-1 1v5c0 .6-.4 1-1 1a1 1 0 0 1-1-1V9H4a1 1 0 1 1 0-2h16c.6 0 1 .4 1 1s-.4 1-1 1Z\" fill-rule=\"nonzero\"/></svg>',\n    'accordion-toggle': '<svg width=\"24\" height=\"24\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M12 15c0-.6.4-1 1-1h6c.6 0 1 .4 1 1s-.4 1-1 1h-6a1 1 0 0 1-1-1Z\"/><path opacity=\".2\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M4 15c0-.6.4-1 1-1h6c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1-1-1Z\"/><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M12 19c0-.6.4-1 1-1h6c.6 0 1 .4 1 1s-.4 1-1 1h-6a1 1 0 0 1-1-1Z\"/><path opacity=\".2\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M4 19c0-.6.4-1 1-1h6c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1-1-1Z\"/><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M12.3 7.3a1 1 0 0 1 1.4 0L16 9.6l2.3-2.3a1 1 0 1 1 1.4 1.4L16 12.4l-3.7-3.7a1 1 0 0 1 0-1.4ZM4.3 11.7a1 1 0 0 1 0-1.4L6.6 8 4.3 5.7a1 1 0 0 1 1.4-1.4L9.4 8l-3.7 3.7a1 1 0 0 1-1.4 0Z\"/></svg>',\n    'accordion': '<svg width=\"24\" height=\"24\"><rect x=\"12\" y=\"7\" width=\"10\" height=\"2\" rx=\"1\"/><rect x=\"12\" y=\"11\" width=\"10\" height=\"2\" rx=\"1\"/><rect x=\"12\" y=\"15\" width=\"6\" height=\"2\" rx=\"1\"/><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M2.3 7.3a1 1 0 0 1 1.4 0L6 9.6l2.3-2.3a1 1 0 0 1 1.4 1.4L6 12.4 2.3 8.7a1 1 0 0 1 0-1.4Z\"/></svg>',\n    'action-next': '<svg width=\"24\" height=\"24\"><path fill-rule=\"nonzero\" d=\"M5.7 7.3a1 1 0 0 0-1.4 1.4l7.7 7.7 7.7-7.7a1 1 0 1 0-1.4-1.4L12 13.6 5.7 7.3Z\"/></svg>',\n    'action-prev': '<svg width=\"24\" height=\"24\"><path fill-rule=\"nonzero\" d=\"M18.3 15.7a1 1 0 0 0 1.4-1.4L12 6.6l-7.7 7.7a1 1 0 0 0 1.4 1.4L12 9.4l6.3 6.3Z\"/></svg>',\n    'add-file': '<svg height=\"24\" width=\"24\"><path d=\"M2 7h2V4h3V2H4a2 2 0 0 0-2 2zm20 0h-2V4h-3V2h3a2 2 0 0 1 2 2zm0 2h-2v6h2zm0 8h-2v3h-3v2h3a2 2 0 0 0 2-2zM2 9h2v6H2zm0 8h2v3h3v2H4a2 2 0 0 1-2-2zm7 5v-2h6v2zm6-20v2H9V2zM6 17h12l-4-5-3 3.8-2-2.6z\"/><path d=\"M2 7h2V4h3V2H4a2 2 0 0 0-2 2zm20 0h-2V4h-3V2h3a2 2 0 0 1 2 2zm0 2h-2v6h2zm0 8h-2v3h-3v2h3a2 2 0 0 0 2-2zM2 9h2v6H2zm0 8h2v3h3v2H4a2 2 0 0 1-2-2zm7 5v-2h6v2zm6-20v2H9V2zM6 17h12l-4-5-3 3.8-2-2.6z\"/><path d=\"M6 17h12l-4-5-3 3.8-2-2.6z\"/><path d=\"M6 17h12l-4-5-3 3.8-2-2.6z\"/><path d=\"M6 17h12l-4-5-3 3.8-2-2.6z\"/><path d=\"M6 17h12l-4-5-3 3.8-2-2.6z\"/></svg>',\n    'addtag': '<svg width=\"24\" height=\"24\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M15 5a2 2 0 0 1 1.6.8L21 12l-4.4 6.2a2 2 0 0 1-1.6.8h-3v-2h3l3.5-5L15 7H5v3H3V7c0-1.1.9-2 2-2h10Z\"/><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6 12a1 1 0 0 0-1 1v2H3a1 1 0 1 0 0 2h2v2a1 1 0 1 0 2 0v-2h2a1 1 0 1 0 0-2H7v-2c0-.6-.4-1-1-1Z\"/></svg>',\n    'adjust-length': '<svg width=\"24\" height=\"24\"><path d=\"M14 7c0 .9.5 1.8 1.5 2.2h.2c.5.3.9.7 1.1 1.3v.1l.1.1v.1h.1V14h-2V9h-2v5h-2V9H9v5H7V9H4v9h16v-6.2a2.3 2.3 0 0 0 1-1l.1-.1v-.2h.1c.2-.5.4-.8.8-1V18c0 .6-.2 1-.6 1.4a2 2 0 0 1-1.4.6H4a2 2 0 0 1-1.4-.6A2 2 0 0 1 2 18V9c0-.6.2-1 .6-1.4A2 2 0 0 1 4 7h10Z\"/><path d=\"M18.7 4.2a.3.3 0 0 1 .6 0 4.1 4.1 0 0 0 2.5 2.5.3.3 0 0 1 0 .6l-.2.1a4.1 4.1 0 0 0-2.3 2.4c-.1.3-.5.3-.6 0a4.1 4.1 0 0 0-.6-1 4.2 4.2 0 0 0-1.7-1.4h-.2a.3.3 0 0 1 0-.7 4.1 4.1 0 0 0 2.5-2.5Z\"/></svg>',\n    'adjustments': '<svg width=\"24\" height=\"24\"><path d=\"M16 11a3 3 0 1 1 2.8-4H21v2h-2.2a3 3 0 0 1-2.8 2Zm0-2a1 1 0 1 1 0-2 1 1 0 0 1 0 2ZM3 9h8V7H3v2Zm5 10a3 3 0 1 0-2.8-4H3v2h2.2A3 3 0 0 0 8 19Zm0-2a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm13 0h-8v-2h8v2Z\"/></svg>',\n    'ai-assistant': '<svg height=\"24\" width=\"24\"><path d=\"m15.4 2.6-1.9 1.9h-4a5.5 5.5 0 1 0 0 11H13V18c2.6-2 6.8-4 7-7.6V10l1.8-1.8.2 1.8c0 5.7-7 9-11 12v-4.5H9.5a7.5 7.5 0 0 1 0-15h6z\"/><path d=\"M8.5 8.5a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zm7 0a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zm3.2-6.3a.3.3 0 0 1 .6 0 4.1 4.1 0 0 0 2.5 2.5c.3 0 .3.5 0 .6l-.2.1a4.1 4.1 0 0 0-2.3 2.4c-.1.3-.5.3-.6 0a4.1 4.1 0 0 0-2.3-2.4h-.2a.3.3 0 0 1 0-.7 4.1 4.1 0 0 0 2.5-2.5z\"/></svg>',\n    'ai-chat-response': '<svg width=\"24\" height=\"24\"><path d=\"M9 9a7.1 7.1 0 0 0 6 6 7.1 7.1 0 0 0-6 6 7.1 7.1 0 0 0-6-6 7.1 7.1 0 0 0 6-6Zm7.5-5A4.6 4.6 0 0 0 21 8.5a4.6 4.6 0 0 0-4.5 4.5A4.6 4.6 0 0 0 12 8.5 4.6 4.6 0 0 0 16.5 4ZM6 3a5 5 0 0 0 3 3 5 5 0 0 0-3 3 5 5 0 0 0-3-3 5 5 0 0 0 3-3Z\"/></svg>',\n    'ai-model': '<svg height=\"24\" width=\"24\"><path d=\"M12.1 3c.5 0 .9.5.9 1v3h5a2 2 0 0 1 2 2v4h2v2h-2v4a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-4H2v-2h2V9c0-1.1.9-2 2-2h5V5H7.4V3H12zM6 19h12V9H6zm3-7c.6 0 1 .4 1 1v2a1 1 0 1 1-2 0v-2c0-.6.4-1 1-1zm6 0c.6 0 1 .4 1 1v2a1 1 0 1 1-2 0v-2c0-.6.4-1 1-1z\"/></svg>',\n    'ai-prompt': '<svg width=\"24\" height=\"24\"><g clip-path=\"url(#a)\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M15 6.7a1 1 0 0 0-1.4 0l-9.9 10a1 1 0 0 0 0 1.3l2.1 2.1c.4.4 1 .4 1.4 0l10-9.9c.3-.3.3-1 0-1.4l-2.2-2Zm1.4 2.8-2-2-3 2.7 2.2 2.2 2.8-2.9Z\"/><path d=\"m18.5 7.3-.7-1.5-1.5-.8 1.5-.7.7-1.5.7 1.5 1.5.7-1.5.8-.7 1.5ZM18.5 16.5l-.7-1.6-1.5-.7 1.5-.7.7-1.6.7 1.6 1.5.7-1.5.7-.7 1.6ZM9.7 7.3 9 5.8 7.5 5 9 4.3l.7-1.5.7 1.5L12 5l-1.5.8-.7 1.5Z\"/></g><defs><clipPath id=\"a\"><path d=\"M0 0h24v24H0z\"/></clipPath></defs></svg>',\n    'ai-review': '<svg height=\"24\" width=\"24\"><path d=\"M15.4 12.6zM15.3 12.6h.1l.3-.2a.5.5 0 0 0 0-.8 5.5 5.5 0 0 1-3.3-3.3.5.5 0 0 0-.8 0 5.5 5.5 0 0 1-3.3 3.3.5.5 0 0 0 0 .8l.3.1a5.5 5.5 0 0 1 2.7 2.6l.1.2.2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g>',\n    'align-justify': '<svg width=\"24\" height=\"24\"><path d=\"M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2Zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2Zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2Zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2Z\" fill-rule=\"evenodd\"/></svg>',\n    'align-left': '<svg width=\"24\" height=\"24\"><path d=\"M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2Zm0 4h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2Zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2Zm0-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2Z\" fill-rule=\"evenodd\"/></svg>',\n    'align-none': '<svg width=\"24\" height=\"24\"><path d=\"M14.2 5 13 7H5a1 1 0 1 1 0-2h9.2Zm4 0h.8a1 1 0 0 1 0 2h-2l1.2-2Zm-6.4 4-1.2 2H5a1 1 0 0 1 0-2h6.8Zm4 0H19a1 1 0 0 1 0 2h-4.4l1.2-2Zm-6.4 4-1.2 2H5a1 1 0 0 1 0-2h4.4Zm4 0H19a1 1 0 0 1 0 2h-6.8l1.2-2ZM7 17l-1.2 2H5a1 1 0 0 1 0-2h2Zm4 0h8a1 1 0 0 1 0 2H9.8l1.2-2Zm5.2-13.5 1.3.7-9.7 16.3-1.3-.7 9.7-16.3Z\" fill-rule=\"evenodd\"/></svg>',\n    'align-right': '<svg width=\"24\" height=\"24\"><path d=\"M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2Zm6 4h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm-6-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2Z\" fill-rule=\"evenodd\"/></svg>',\n    'alt-text': '<svg width=\"24\" height=\"24\"><path d=\"M3 20a2 2 0 0 1-1.4-.6A2 2 0 0 1 1 18V6c0-.6.2-1 .6-1.4A2 2 0 0 1 3 4h18c.6 0 1 .2 1.4.6.4.4.6.9.6 1.4v12c0 .6-.2 1-.6 1.4a2 2 0 0 1-1.4.6H3Zm0-2h18V6H3v12Zm1.5-3H6v-1.5h1.5V15H9v-5a1 1 0 0 0-.3-.7A1 1 0 0 0 8 9H5.5a1 1 0 0 0-.7.3 1 1 0 0 0-.3.7v5ZM6 12v-1.5h1.5V12H6Z\"/><path d=\"M11 15V9h1.3v4.5h2V15H11Zm5.8-4.5V15h1.4v-4.5h1.3V9h-4v1.5h1.3Z\"/></svg>',\n    'arrow-left': '<svg width=\"24\" height=\"24\"><path d=\"m5.6 13 12 6a1 1 0 0 0 1.4-1V6a1 1 0 0 0-1.4-.9l-12 6a1 1 0 0 0 0 1.8Z\" fill-rule=\"evenodd\"/></svg>',\n    'arrow-right': '<svg width=\"24\" height=\"24\"><path d=\"m18.5 13-12 6A1 1 0 0 1 5 18V6a1 1 0 0 1 1.4-.9l12 6a1 1 0 0 1 0 1.8Z\" fill-rule=\"evenodd\"/></svg>',\n    'attachment': '<svg height=\"24\" width=\"24\"><path d=\"M11 2c1 0 2 .5 2.8 1.3.7.8 1.1 1.9 1.1 3L15 16c0 .7-.2 1.3-.7 1.8-.4.5-1 .8-1.8.8-.6 0-1.3-.3-1.7-.8-.5-.5-.7-1.1-.7-1.8L10 6.3h2V16l.2.5.3.1.4-.1.1-.5V6.3c0-.7-.3-1.3-.7-1.7-.3-.4-.8-.6-1.3-.6s-1 .2-1.4.6c-.4.4-.6 1-.6 1.7V16c0 1 .5 2 1.1 2.8.7.7 1.6 1.1 2.4 1.1 1 0 1.8-.4 2.5-1.1.6-.7 1-1.7 1-2.8l-.1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.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>',\n    'bookmark': '<svg width=\"24\" height=\"24\"><path d=\"M6 4v17l6-4 6 4V4c0-.6-.4-1-1-1H7a1 1 0 0 0-1 1Z\" fill-rule=\"nonzero\"/></svg>',\n    '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>',\n    '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>',\n    'box': '<svg width=\"24\" height=\"24\"><path d=\"M3.8 7a1 1 0 0 0-.7.6l-.1 3V13.8a3.5 3.5 0 0 0 4 2.7c.8-.2 1.4-.5 2-1l.3-.3.3.2c.7.7 1.4 1 2.4 1.1 1.2 0 2.4-.6 3-1.6.9-1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 0 1 1-4 0 2 2 0 0 1 4 0Z\"/></svg>',\n    'browse': '<svg width=\"24\" height=\"24\"><path d=\"M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-4v-2h4V8H5v10h4v2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14Zm-8 9.4-2.3 2.3a1 1 0 1 1-1.4-1.4l4-4a1 1 0 0 1 1.4 0l4 4a1 1 0 0 1-1.4 1.4L13 13.4V20a1 1 0 0 1-2 0v-6.6Z\" fill-rule=\"nonzero\"/></svg>',\n    'camera': '<svg height=\"24\" width=\"24\"><g clip-rule=\"evenodd\" fill-rule=\"evenodd\"><path d=\"M10 5.4a1 1 0 0 1 .8-.4h4.4a1 1 0 0 1 .8.4l1.2 1.8h2.3A2.5 2.5 0 0 1 22 9.6v8a2.5 2.5 0 0 1-2.5 2.5h-13A2.5 2.5 0 0 1 4 17.6v-8a2.5 2.5 0 0 1 2.5-2.4h2.3zM11.4 7l-1.2 1.7a1 1 0 0 1-.8.5h-3a.5.5 0 0 0-.4.4v8a.5.5 0 0 0 .5.5h13a.5.5 0 0 0 .5-.5v-8a.5.5 0 0 0-.5-.4h-2.9a1 1 0 0 1-.8-.5L14.6 7z\"/><path d=\"M13 11.4a2 2 0 1 0 0 3.8 2 2 0 0 0 0-3.8zm-4 1.9a4 4 0 1 1 8 0 4 4 0 0 1-8 0z\"/></g></svg>',\n    'cancel': '<svg width=\"24\" height=\"24\"><path d=\"M12 4.6a7.4 7.4 0 1 1 0 14.8 7.4 7.4 0 0 1 0-14.8ZM12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-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>',\n    'caption': '<svg height=\"24\" width=\"24\"><path d=\"M6 16h8v-2H6zm10 0h2v-2h-2zM4 20a2 2 0 0 1-1.5-.6A2 2 0 0 1 2 18V6c0-.6.2-1 .6-1.4A2 2 0 0 1 4 4h16c.6 0 1 .2 1.4.6.4.4.6.9.6 1.4v12c0 .6-.2 1-.6 1.4a2 2 0 0 1-1.4.6zm0-2h16V6H4z\"/></svg>',\n    'cell-background-color': '<svg width=\"24\" height=\"24\"><path d=\"m15.7 2 1.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 0 1-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>',\n    'cell-border-color': '<svg width=\"24\" height=\"24\"><g fill-rule=\"evenodd\"><path fill-rule=\"nonzero\" d=\"M5 13v5h2v2H5a2 2 0 0 1-2-2v-5h2zm8-7V4h6a2 2 0 0 1 2 2h-8z\" opacity=\".2\"/><path fill-rule=\"nonzero\" d=\"M13 4v2H5v7H3V6c0-1.1.9-2 2-2h8zm-2.6 14.1.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 11-2 2H5v-2h6V6h2z\"/><path fill-rule=\"nonzero\" d=\"m18.4 8 1 1-1.8 1.9 4 4c.5.4.5 1.1 0 1.6l-4.3 4.2a1.2 1.2 0 0 1-1.6 0l-4.4-4.2c-.4-.5-.4-1.2 0-1.7l7-6.8Zm1.6 7-3-3-3 3h6Z\"/></g></svg>',\n    '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.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2 1L18 14c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 0 1 0-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 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8z\" fill-rule=\"evenodd\"/></svg>',\n    'checklist': '<svg width=\"24\" height=\"24\"><path d=\"M11 17h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm0-6h8a1 1 0 0 1 0 2h-8a1 1 0 0 1 0-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 0 1 0-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 0 1 0-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 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8Z\" fill-rule=\"evenodd\"/></svg>',\n    'checkmark-filled': '<svg width=\"24\" height=\"24\"><path fill-rule=\"evenodd\" d=\"M12 2a10 10 0 1 1 0 20 10 10 0 0 1 0-20Zm4.8 5a1 1 0 0 0-1.4.3l-5.4 8-2-2.1a1 1 0 1 0-1.5 1.4l3 3a1 1 0 0 0 1.5-.2l6-9a1 1 0 0 0-.2-1.4Z\"/></svg>',\n    'checkmark': '<svg width=\"24\" height=\"24\"><path d=\"M18.2 5.4a1 1 0 0 1 1.6 1.2l-8 12a1 1 0 0 1-1.5.1l-5-5a1 1 0 1 1 1.4-1.4l4.1 4.1 7.4-11Z\" fill-rule=\"nonzero\"/></svg>',\n    '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 0 1 0-1.2c.3-.3.8-.3 1.1 0L5 6l3.7-3.8Z\" fill-rule=\"nonzero\"/></svg>',\n    'chevron-left': '<svg width=\"10\" height=\"10\"><path d=\"M7.8 1.3 4 5l3.8 3.7c.3.3.3.8 0 1-.4.4-.9.4-1.2 0L2.2 5.7a.8.8 0 0 1 0-1.2L6.6.2C7 0 7.4 0 7.8.2c.3.3.3.8 0 1.1Z\" fill-rule=\"nonzero\"/></svg>',\n    'chevron-right': '<svg width=\"10\" height=\"10\"><path d=\"M2.2 1.3a.8.8 0 0 1 0-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 0 1 0-1.1L6 5 2.2 1.3Z\" fill-rule=\"nonzero\"/></svg>',\n    'chevron-up': '<svg width=\"10\" height=\"10\"><path d=\"M8.7 7.8 5 4 1.3 7.8c-.3.3-.8.3-1 0a.8.8 0 0 1 0-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>',\n    'close-filled': '<svg width=\"24\" height=\"24\"><path fill-rule=\"evenodd\" d=\"M12 2a10 10 0 1 1 0 20 10 10 0 0 1 0-20Zm4.7 5.3a1 1 0 0 0-1.3 0L12 10.6 8.6 7.3a1 1 0 0 0-1.3 1.3l3.3 3.4-3.3 3.4a1 1 0 0 0 1.3 1.3l3.4-3.3 3.4 3.3a1 1 0 0 0 1.3-1.3L13.4 12l3.3-3.4a1 1 0 0 0 0-1.3Z\"/></svg>',\n    'close': '<svg width=\"24\" height=\"24\"><path d=\"M17.3 8.2 13.4 12l3.9 3.8a1 1 0 0 1-1.5 1.5L12 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1.6-.5 2a3 3 0 0 1-1.1 1c-.4.3-.8.4-1.1.4a.5.5 0 0 1-.5-.5V17a3 3 0 0 0 1-.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>',\n    'collapse': '<svg width=\"24\" height=\"24\"><path d=\"M4 3a1 1 0 0 1 1 1v16a1 1 0 0 1-2 0V4a1 1 0 0 1 1-1Zm11 4.6a1 1 0 0 1 1.4 0L21 12l-4.6 4.6a1 1 0 0 1-1.4-1.4l2.2-2.2H10a1 1 0 1 1 0-2h7.2L15 9a1 1 0 0 1 0-1.4Z\"/></svg>',\n    'color-levels': '<svg width=\"24\" height=\"24\"><path d=\"M17.5 11.4A9 9 0 0 1 18 14c0 .5 0 1-.2 1.4 0 .4-.3.9-.5 1.3a6.2 6.2 0 0 1-3.7 3 5.7 5.7 0 0 1-3.2 0A5.9 5.9 0 0 1 7.6 18a6.2 6.2 0 0 1-1.4-2.6 6.7 6.7 0 0 1 0-2.8c0-.4.1-.9.3-1.3a13.6 13.6 0 0 1 2.3-4A20 20 0 0 1 12 4a26.4 26.4 0 0 1 3.2 3.4 18.2 18.2 0 0 1 2.3 4Zm-2 4.5c.4-.7.5-1.4.5-2a7.3 7.3 0 0 0-1-3.2c.2.6.2 1.2.2 1.9a4.5 4.5 0 0 1-1.3 3 5.3 5.3 0 0 1-2.3 1.5 4.9 4.9 0 0 1-2 .1 4.3 4.3 0 0 0 2.4.8 4 4 0 0 0 2-.6 4 4 0 0 0 1.5-1.5Z\" fill-rule=\"evenodd\"/></svg>',\n    'color-picker': '<svg width=\"24\" height=\"24\"><path d=\"M12 3a9 9 0 0 0 0 18 1.5 1.5 0 0 0 1.1-2.5c-.2-.3-.4-.6-.4-1 0-.8.7-1.5 1.5-1.5H16a5 5 0 0 0 5-5c0-4.4-4-8-9-8Zm-5.5 9a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3Zm3-4a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3Zm5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3Zm3 4a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3Z\" fill-rule=\"nonzero\"/></svg>',\n    'color-swatch-remove-color': '<svg width=\"24\" height=\"24\" class=\"color-swatch-remove-color\"><path stroke=\"#000\" stroke-width=\"2\" d=\"M21 3 3 21\" fill-rule=\"evenodd\"/></svg>',\n    'color-swatch': '<svg width=\"24\" height=\"24\"><rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"1\" fill-rule=\"evenodd\"/></svg>',\n    'comment-add': '<svg width=\"24\" height=\"24\"><g fill-rule=\"nonzero\"><path d=\"m9 19 3-2h7c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H5a1 1 0 0 0-1 1v10c0 .6.4 1 1 1h4v2Zm-2 4v-4H5a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h14a3 3 0 0 1 3 3v10a3 3 0 0 1-3 3h-6.4L7 23Z\"/><path d=\"M13 10h2a1 1 0 0 1 0 2h-2v2a1 1 0 0 1-2 0v-2H9a1 1 0 0 1 0-2h2V8a1 1 0 0 1 2 0v2Z\"/></g></svg>',\n    'comment': '<svg width=\"24\" height=\"24\"><path fill-rule=\"nonzero\" d=\"m9 19 3-2h7c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H5a1 1 0 0 0-1 1v10c0 .6.4 1 1 1h4v2Zm-2 4v-4H5a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h14a3 3 0 0 1 3 3v10a3 3 0 0 1-3 3h-6.4L7 23Z\"/></svg>',\n    'continue-writing': '<svg height=\"24\" width=\"24\"><path d=\"M19.6 14.1a1.5 1.5 0 0 1 1 .5l1 .9.3.5.1.5-.1.6a1.3 1.3 0 0 1-.3.5L16 23H13v-3l5.5-5.5.5-.3h.6zm-5.1 6.5v1h1l4-4-1-1z\" fill-rule=\"evenodd\"/><path d=\"M10 12.9H2v-2h8zm4-4H2V7h12zm0-4H2V3h12zm4.2-1.7c0-.3.5-.3.7 0a4.4 4.4 0 0 0 2.6 2.6.4.4 0 0 1 0 .7l-.2.1a4.4 4.4 0 0 0-2.4 2.5.4.4 0 0 1-.7 0 4.4 4.4 0 0 0-2.5-2.5h-.2a.4.4 0 0 1 0-.8 4.4 4.4 0 0 0 2.6-2.6z\"/></svg>',\n    'contrast': '<svg width=\"24\" height=\"24\"><path fill-rule=\"evenodd\" d=\"M12 4a7.8 7.8 0 0 1 5.7 2.3A8 8 0 0 1 19.4 9c.4 1 .6 2 .6 3.1s-.2 2.1-.6 3.1a8 8 0 0 1-1.7 2.6 8 8 0 0 1-2.6 1.7 7.8 7.8 0 0 1-3.1.6 7.8 7.8 0 0 1-3.1-.6 8 8 0 0 1-2.6-1.7A8 8 0 0 1 4.6 15 7.8 7.8 0 0 1 4 12c0-1.1.2-2.1.6-3.1a8 8 0 0 1 1.7-2.6A8 8 0 0 1 9 4.6 7.8 7.8 0 0 1 12 4Zm-6 8a6 6 0 0 0 1.8 4.2 6 6 0 0 0 1.9 1.3 5.8 5.8 0 0 0 2.3.5V6c-.8 0-1.6.2-2.3.5a6 6 0 0 0-2 1.3 6 6 0 0 0-1.2 1.9A5.8 5.8 0 0 0 6 12Z\"/></svg>',\n    'copy': '<svg width=\"24\" height=\"24\"><path d=\"M16 3H6a2 2 0 0 0-2 2v11h2V5h10V3Zm1 4a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2V9c0-1.2.9-2 2-2h7Zm0 12V9h-7v10h7Z\" fill-rule=\"nonzero\"/></svg>',\n    '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 0 1-1-1v-2H7V9H5a1 1 0 1 1 0-2h2V5c0-.6.4-1 1-1s1 .4 1 1v2h7l3-3 1 1-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.6v-.7l-1.2-1 1-1.6 1.5.4a4.5 4.5 0 0 1 1.2-.6L15 13h2zM16 16a2 2 0 0 0-1.5.6A1.9 1.9 0 0 0 14 18c0 .6.2 1 .6 1.4s1 .6 1.5.6 1-.2 1.5-.6.6-.8.6-1.4-.2-1-.6-1.4A2 2 0 0 0 16 16z\" fill-rule=\"evenodd\"/><path d=\"M19 7.6V12h-2V9h-4V5H7v14h3v2H7a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2h7.4z\"/></svg>',\n    'document-properties': '<svg width=\"24\" height=\"24\"><path d=\"M14.4 3H7a2 2 0 0 0-2 2v14c0 1.1.9 2 2 2h10a2 2 0 0 0 2-2V7.6L14.4 3ZM17 19H7V5h6v4h4v10Z\" fill-rule=\"nonzero\"/></svg>',\n    '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>',\n    'dropbox': '<svg height=\"24\" width=\"24\"><path clip-rule=\"evenodd\" d=\"m6.4 9.3-3-2a1 1 0 0 1 0-1.6l4-2.5a1 1 0 0 1 1 0L12 5.5l3.6-2.3a1 1 0 0 1 1 0l4 2.5a1 1 0 0 1 0 1.7l-3 1.9 3 1.9a1 1 0 0 1 0 1.6l-2.9 1.9V16c0 .3-.1.6-.4.8l-4.5 3a1 1 0 0 1-1.2 0l-4.4-3a1 1 0 0 1-.5-.9v-1l-3.2-2.2a1 1 0 0 1 0-1.6zm3 0L12 7.5l2.6 1.8L12 11zM8.9 15v.4l3.3 2.3 3.4-2.3v-.2L12 13l-3.1 2zm-1-10-2 1.4 2 1.3 2-1.3zm8.2 0-2 1.4 2 1.3 2-1.3zm-2 6.9 2-1.3 2 1.3-2 1.3-2-1.3zm-8.3 0 2-1.3L10 12l-2 1.3-2-1.3z\" fill-rule=\"evenodd\"/></svg>',\n    'duplicate-column': '<svg width=\"24\" height=\"24\"><path d=\"M17 6v16h-7V6h7Zm-2 2h-3v12h3V8Zm-2-6v2H8v15H6V2h7Z\"/></svg>',\n    'duplicate-row': '<svg width=\"24\" height=\"24\"><path d=\"M22 11v7H6v-7h16Zm-2 2H8v3h12v-3Zm-1-6v2H4v5H2V7h17Z\"/></svg>',\n    '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 0 1-2 2h-7a2 2 0 0 1-2-2V9c0-1.2.9-2 2-2h7a2 2 0 0 1 2 2v2Z\"/><path d=\"M17 14h1a1 1 0 0 1 0 2h-1v1a1 1 0 0 1-2 0v-1h-1a1 1 0 0 1 0-2h1v-1a1 1 0 0 1 2 0v1Z\"/></g></svg>',\n    'edit-block': '<svg height=\"24\" width=\"24\"><path d=\"M14.7 3.2a2 2 0 0 1 2.9 0L20.4 6c.8.8.8 2.1 0 2.9l-10 10a2 2 0 0 1-1.1.6L3 20.6l1-6.2c.2-.5.3-.8.6-1.1zM6.1 14.7 5.5 18l3.4-.6-2.8-2.9zm1.4-1.5 2.9 2.9 6.2-6.3L13.8 7zm7.7-7.6L18 8.4l1-1L16 4.7z\" fill-rule=\"evenodd\"/></svg>',\n    'edit-image': '<svg width=\"24\" height=\"24\"><path d=\"M18 16h2V7a2 2 0 0 0-2-2H7v2h11v9ZM6 17h15a1 1 0 0 1 0 2h-1v1a1 1 0 0 1-2 0v-1H6a2 2 0 0 1-2-2V7H3a1 1 0 1 1 0-2h1V4a1 1 0 1 1 2 0v13Zm3-5.3 1.3 2 3-4.7 3.7 6H7l2-3.3Z\" fill-rule=\"nonzero\"/></svg>',\n    'embed-page': '<svg width=\"24\" height=\"24\"><path d=\"M19 6V5H5v14h2A13 13 0 0 1 19 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 0 0 8 19h3ZM4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V4c0-.6.4-1 1-1Zm11.8 9c.4-1.9 1-3.4 1.8-4.5a9.2 9.2 0 0 0-4 4.5h2.2Zm-3.4 0a12 12 0 0 1 2.8-4 12 12 0 0 0-5 4h2.2Z\" fill-rule=\"nonzero\"/></svg>',\n    'embed': '<svg width=\"24\" height=\"24\"><path d=\"M4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V4c0-.6.4-1 1-1Zm1 2v14h14V5H5Zm4.8 2.6 5.6 4a.5.5 0 0 1 0 .8l-5.6 4A.5.5 0 0 1 9 16V8a.5.5 0 0 1 .8-.4Z\" fill-rule=\"nonzero\"/></svg>',\n    'emoji': '<svg width=\"24\" height=\"24\"><path d=\"M9 11c.6 0 1-.4 1-1s-.4-1-1-1a1 1 0 0 0-1 1c0 .6.4 1 1 1Zm6 0c.6 0 1-.4 1-1s-.4-1-1-1a1 1 0 0 0-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 1 0 0 16 8 8 0 0 0 0-16Zm0 14.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13Z\" fill-rule=\"nonzero\"/></svg>',\n    'evernote': '<svg width=\"24\" height=\"24\"><path fill-rule=\"evenodd\" d=\"m9.5 3-.3.1-2.6 2.6C3.8 8.5 4 8.2 4 8.7c0 1.3.3 3 .6 4.3.5 2 1.1 3.2 2 3.7l1.2.3c1 .2 1.5.2 2.2.2 1.3 0 1.7 0 2.2-.4.3-.2.3-.4.4-1a38.4 38.4 0 0 1 .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1 0-1.2 1.7l3.6 2.4 3.6-2.4a1 1 0 0 0-1.2-1.6l-1.4 1V17Z\"/></svg>',\n    'export-word': '<svg width=\"24\" height=\"24\"><path d=\"M9.5 7A1.5 1.5 0 0 1 11 8.4v7.1A1.5 1.5 0 0 1 9.6 17H2.5A1.5 1.5 0 0 1 1 15.6V8.5A1.5 1.5 0 0 1 2.4 7h7.1Zm-1 2.8-1 2.6-1-2.5v-.1a.6.6 0 0 0-1 0l-.1.1-.9 2.5-1-2.5v-.1a.6.6 0 0 0-1 .4v.1l1.5 4v.1a.6.6 0 0 0 1 0v-.1l1-2.5.9 2.5v.1a.6.6 0 0 0 1 0H8l1.6-4v-.2a.6.6 0 0 0-1.1-.4Z\"/><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7 3h7.4L19 7.6V17h-2V9h-4V5H5c0-1.1.9-2 2-2ZM15 17a1 1 0 1 0-2 0v3.1l-1.4-1a1 1 0 1 0-1.2 1.7l3.6 2.4 3.6-2.4a1 1 0 0 0-1.2-1.6l-1.4 1V17Z\"/></svg>',\n    'export': '<svg width=\"24\" height=\"24\"><g fill-rule=\"nonzero\"><path d=\"M14.4 3 18 7v1h-5V5H7v14h9a1 1 0 0 1 2 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 0 1 1.4.2l2.4 3.6-2.4 3.6a1 1 0 0 1-1.7-1v-.2l1.7-2.4-1.6-2.4a1 1 0 0 1 .2-1.4Z\"/></g></svg>',\n    'exposure': '<svg width=\"24\" height=\"24\"><path d=\"M5 21a2 2 0 0 1-1.4-.6A2 2 0 0 1 3 19V5c0-.6.2-1 .6-1.4A2 2 0 0 1 5 3h14c.6 0 1 .2 1.4.6.4.4.6.8.6 1.4v14c0 .6-.2 1-.6 1.4a2 2 0 0 1-1.4.6H5Zm0-2h14V5L5 19Zm9.5-1v-2h-2v-1.5h2v-2H16v2h2V16h-2v2h-1.5ZM6 8.5h5V7H6v1.5Z\"/></svg>',\n    'fb': '<svg width=\"24\" height=\"24\"><path fill-rule=\"evenodd\" d=\"M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-11 6.7V14H8.1v-2.5h2v-1C10 8.2 11.5 7 12.8 7H16v2.5h-2.4c-.8 0-1 .7-1 1.3v.7h3.2l-1 2.5h-2v5a7 7 0 1 0-2.8-.2Z\" clip-rule=\"evenodd\"/></svg>',\n    'feedback': '<svg width=\"24\" height=\"24\"><path fill-rule=\"evenodd\" d=\"M16 6c1 0 2 1 2 2v5c0 1-1 2-2 2h-3l-4 3v-3H8c-1 0-2-1-2-2V8c0-1 1-2 2-2h8Zm-7 5v1h4v-1H9Zm0-2v1h6V9H9Z\"/></svg>',\n    'fill': '<svg width=\"24\" height=\"26\"><path d=\"m16.6 12-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 0 0 2.2 0l5.5-5.5c.5-.6.5-1.6 0-2.2ZM5.2 13 10 8.2l4.8 4.8H5.2ZM19 14.5s-2 2.2-2 3.5c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.3-2-3.5-2-3.5Z\" fill-rule=\"nonzero\"/></svg>',\n    'fix-grammar': '<svg height=\"24\" width=\"24\"><path d=\"M22 14.5 14.4 22l-4.6-4.5 1.5-1.5 3 3 6.2-6z\"/><path d=\"M15 15.8h-2.5l-1.2-3.5H5.6l-1.2 3.5H2L7.2 2h2.6zm-8.6-5.5h4.2l-2-5.7h-.2z\" fill-rule=\"evenodd\"/><path d=\"M18.1 2.2c.2-.3.6-.3.8 0a4.4 4.4 0 0 0 2.6 2.6.4.4 0 0 1 0 .7l-.2.1a4.4 4.4 0 0 0-2.4 2.5.4.4 0 0 1-.7 0 4.4 4.4 0 0 0-2.5-2.5h-.2a.4.4 0 0 1 0-.8 4.4 4.4 0 0 0 2.6-2.6z\"/></svg>',\n    'flickr': '<svg width=\"24\" height=\"24\"><path d=\"M8.2 15.3c1.7 0 3.1-1.4 3.1-3.1A3.2 3.2 0 0 0 8.1 9 3.2 3.2 0 0 0 5 12.2c0 1.7 1.4 3 3.2 3Zm7.6 0c1.7 0 3.2-1.4 3.2-3.1a3.2 3.2 0 0 0-6.3 0c0 1.7 1.4 3 3.1 3Z\"/></svg>',\n    '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 0 0-2 2Zm14-2v2h2a2 2 0 0 0-2-2Zm-7 16h2V3h-2v18Zm7-6h2v-2h-2v2Zm-4-8h2V5h-2v2Zm4 12a2 2 0 0 0 2-2h-2v2Z\" fill-rule=\"nonzero\"/></svg>',\n    'flip-vertically': '<svg width=\"24\" height=\"24\"><path d=\"M5 14v2h2v-2H5Zm8 4v2h2v-2h-2Zm4-14H7a2 2 0 0 0-2 2v3h2V6h10v3h2V6a2 2 0 0 0-2-2Zm2 14h-2v2a2 2 0 0 0 2-2ZM3 11v2h18v-2H3Zm6 7v2h2v-2H9Zm8-4v2h2v-2h-2ZM5 18c0 1.1.9 2 2 2v-2H5Z\" fill-rule=\"nonzero\"/></svg>',\n    'folder': '<svg width=\"24\" height=\"24\"><path fill-rule=\"evenodd\" d=\"M5.6 6a.6.6 0 0 0-.6.6v11.2a.6.6 0 0 0 .6.6h12.8a.6.6 0 0 0 .6-.6V9a.6.6 0 0 0-.6-.6h-7.2a1 1 0 0 1-.8-.4L9 6H5.6ZM3.8 4.8A2.6 2.6 0 0 1 5.6 4h4a1 1 0 0 1 .8.4l1.3 2h6.7A2.6 2.6 0 0 1 21 9v8.8a2.6 2.6 0 0 1-2.6 2.6H5.6A2.6 2.6 0 0 1 3 17.8V6.6c0-.7.3-1.4.8-1.8Z\" clip-rule=\"evenodd\"/></svg>',\n    'footnote': '<svg width=\"24\" height=\"24\"><path d=\"M19 13c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2h14Z\"/><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M19 4v6h-1V5h-1.5V4h2.6Z\"/><path d=\"M12 18c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2h7ZM14 8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2h9Z\"/></svg>',\n    'format-code': '<svg width=\"24\" height=\"24\"><path d=\"m10 22 2-7H6l9-13h2l-2 8h7L12 22h-2ZM6 2h7l-1.4 2H6V2Zm4.2 4H4v2h4.8l1.4-2Zm-2.7 4H2v2h4l1.5-2Z\"/></svg>',\n    'format-painter': '<svg width=\"24\" height=\"24\"><path d=\"M18 5V4c0-.5-.4-1-1-1H5a1 1 0 0 0-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>',\n    'format': '<svg width=\"24\" height=\"24\"><path fill-rule=\"evenodd\" d=\"M17 5a1 1 0 0 1 0 2h-4v11a1 1 0 0 1-2 0V7H7a1 1 0 1 1 0-2h10Z\"/></svg>',\n    'fullscreen': '<svg width=\"24\" height=\"24\"><path d=\"m15.3 10-1.2-1.3 2.9-3h-2.3a.9.9 0 1 1 0-1.7H19c.5 0 .9.4.9.9v4.4a.9.9 0 1 1-1.8 0V7l-2.9 3Zm0 4 3 3v-2.3a.9.9 0 1 1 1.7 0V19c0 .5-.4.9-.9.9h-4.4a.9.9 0 1 1 0-1.8H17l-3-2.9 1.3-1.2ZM10 15.4l-2.9 3h2.3a.9.9 0 1 1 0 1.7H5a.9.9 0 0 1-.9-.9v-4.4a.9.9 0 1 1 1.8 0V17l2.9-3 1.2 1.3ZM8.7 10 5.7 7v2.3a.9.9 0 0 1-1.7 0V5c0-.5.4-.9.9-.9h4.4a.9.9 0 0 1 0 1.8H7l3 2.9-1.3 1.2Z\" fill-rule=\"nonzero\"/></svg>',\n    'gallery': '<svg width=\"24\" height=\"24\"><path fill-rule=\"nonzero\" d=\"m5 15.7 2.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-3-2.5-2.4-6.4 6.5H19v-4ZM4 6h16c.6 0 1 .4 1 1v13c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V7c0-.6.4-1 1-1Zm6 7a2 2 0 1 1 0-4 2 2 0 0 1 0 4ZM4.5 4h15a.5.5 0 1 1 0 1h-15a.5.5 0 0 1 0-1Zm2-2h11a.5.5 0 1 1 0 1h-11a.5.5 0 0 1 0-1Z\"/></svg>',\n    'gamma': '<svg height=\"24\" width=\"24\"><path d=\"M11.5 16.3a.7.7 0 1 0 1.4 0V14l2.7-6a.7.7 0 1 0-1.2-.6l-2.2 5-2.3-4.9C9.6 7 8.7 7 8 7.2v1.1c.8-.2.9 0 1.2 1l2.3 4.7z\"/><path d=\"M4 3h16a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zm1 2h14v14H5z\" fill-rule=\"evenodd\"/></svg>',\n    'google-drive': '<svg height=\"24\" width=\"24\"><path clip-rule=\"evenodd\" d=\"M8.7 4.5a1 1 0 0 1 .9-.5h4.8a1 1 0 0 1 .9.5l5.6 9.7a1 1 0 0 1 0 1l-2.4 4.2a1 1 0 0 1-.9.5H6.4a1 1 0 0 1-.9-.5l-2.4-4.2a1 1 0 0 1 0-1zM10.2 6l-4.5 7.7h2.5L12.7 6h-2.5zm4.2 1 4.4 7.7-1.2 2.2-4.4-7.7zM12 11.2l-1.5 2.5h3zm2.6 4.5H5.7L7 17.9h8.9l-1.3-2.2z\" fill-rule=\"evenodd\"/></svg>',\n    'google-photos': '<svg width=\"24\" height=\"24\"><path fill-rule=\"evenodd\" d=\"M12.4 3c-.8 0-1.4.7-1.4 1.4v3.2a5 5 0 0 0-8 4c0 .8.6 1.4 1.4 1.4h3.2a5 5 0 0 0-1 3 5 5 0 0 0 5 5c.8 0 1.4-.6 1.4-1.4v-3.2a5 5 0 0 0 8-4c0-.8-.7-1.4-1.4-1.4h-3.2a5 5 0 0 0-4-8Zm.6 8V5a3 3 0 0 1 2.4 3 3 3 0 0 1-2.4 3Zm-2 0H5a3 3 0 0 1 3-2.4 3 3 0 0 1 3 2.4Zm2 2a3 3 0 0 0 3 2.4 3 3 0 0 0 3-2.4h-6Zm-4.4 3a3 3 0 0 1 2.4-3v6a3 3 0 0 1-2.4-3Z\" clip-rule=\"evenodd\"/></svg>',\n    'grayscale': '<svg height=\"24\" width=\"24\"><path d=\"M3 5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2zm12.4 0H19v3.6zm-2.8 0h-2.2l8.6 8.6v-2.2zm-5 0H5l14 14v-2.6z\" fill-rule=\"evenodd\"/></svg>',\n    'help': '<svg width=\"24\" height=\"24\"><g fill-rule=\"evenodd\"><path d=\"M12 5.5a6.5 6.5 0 0 0-6 9 6.3 6.3 0 0 0 1.4 2l1 1a6.3 6.3 0 0 0 3.6 1 6.5 6.5 0 0 0 6-9 6.3 6.3 0 0 0-1.4-2l-1-1a6.3 6.3 0 0 0-3.6-1ZM12 4a7.8 7.8 0 0 1 5.7 2.3A8 8 0 1 1 12 4Z\"/><path d=\"M9.6 9.7a.7.7 0 0 1-.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 0 0-.8.8.8.8 0 0 1-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>',\n    'highlight-bg-color': '<svg width=\"24\" height=\"24\"><g fill-rule=\"evenodd\"><path class=\"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 0 1 2.6 0L18 6c.7.7.7 2 0 2.7l-2.9 2.9-1.8-1.8-.5-.6\"/></g></svg>',\n    'highlight-key-points': '<svg height=\"24\" width=\"24\"><path d=\"M12 2c1.3 0 2.6.3 3.7.7l-.2.1a2.3 2.3 0 0 0-1.4 1.5 8 8 0 1 0 5.6 5.6 2.3 2.3 0 0 0 1.3-1v-.2h.1v-.2h.1v-.2A10 10 0 0 1 22 12 10 10 0 1 1 12 2z\"/><path d=\"M12 11a1 1 0 0 1 1 1 1 1 0 0 1-1 1 1 1 0 0 1-1-1 1 1 0 0 1 1-1z\"/><path d=\"M12 6.5a5.5 5.5 0 1 1 0 11 5.5 5.5 0 0 1 0-11zm0 2a3.5 3.5 0 1 0 0 7 3.5 3.5 0 0 0 0-7z\" fill-rule=\"evenodd\"/><path d=\"M18.7 2.2a.3.3 0 0 1 .6 0 4.1 4.1 0 0 0 2.5 2.5.3.3 0 0 1 0 .6l-.2.1a4.1 4.1 0 0 0-2.3 2.4c-.1.3-.5.3-.6 0a4.1 4.1 0 0 0-2.3-2.4h-.2A.3.3 0 0 1 16 5a.4.4 0 0 1 0-.2.3.3 0 0 1 .2 0v-.1h.1a5.2 5.2 0 0 0 .2-.2h.1a4.2 4.2 0 0 0 2-2.3z\"/></svg>',\n    'home': '<svg width=\"24\" height=\"24\"><path fill-rule=\"nonzero\" d=\"M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z\"/></svg>',\n    'horizontal-rule': '<svg width=\"24\" height=\"24\"><path d=\"M4 11h16v2H4z\" fill-rule=\"evenodd\"/></svg>',\n    'huddle': '<svg height=\"24\" width=\"24\"><path d=\"M10.3 5.6V8h.8v-2l3.5 2 4.3-2.5L14.6 3l-4.3 2.6zM14.6 8v5.2l4.3-2.6V5.6L14.6 8zM6 13.3v2.5h.9v-2l3.4 2 4.3-2.5-4.3-2.6zm4.3 2.6V21l4.3-2.6v-5.1l-4.3 2.6z\"/></svg>',\n    'image-decorative': '<svg width=\"24\" height=\"24\"><path d=\"M12 10c.3 0 .5-.1.7-.3A1 1 0 0 0 13 9a1 1 0 0 0-.3-.7A1 1 0 0 0 12 8a1 1 0 0 0-.7.3 1 1 0 0 0-.3.7 1 1 0 0 0 1 1Zm0 6a3 3 0 0 1-1.8-.5A3 3 0 0 1 9.1 14a2 2 0 0 0-.2 0 3 3 0 0 1-2.5-1 3 3 0 0 1-.9-2.2A3 3 0 0 1 6.2 9a3.4 3.4 0 0 1-.5-1 3 3 0 0 1-.2-1 3 3 0 0 1 1-2.2A3 3 0 0 1 8.8 4H9a3 3 0 0 1 1.1-1.4A3 3 0 0 1 12 2a3 3 0 0 1 1.8.5c.5.4.9.9 1.1 1.5h.2a3 3 0 0 1 2.5.8 3 3 0 0 1 .9 2.3c0 .3 0 .7-.2 1a2.8 2.8 0 0 1-.5.9l.5 1 .2 1a3 3 0 0 1-1 2.2 3 3 0 0 1-2.4.9 1.8 1.8 0 0 0-.2 0 3 3 0 0 1-1.1 1.4 3 3 0 0 1-1.8.5Zm0 7a8.7 8.7 0 0 1 .7-3.5 9.2 9.2 0 0 1 2-2.8 9.2 9.2 0 0 1 2.8-2A8.6 8.6 0 0 1 21 14a8.6 8.6 0 0 1-.7 3.5 9.2 9.2 0 0 1-2 2.8 9.2 9.2 0 0 1-2.8 2 8.6 8.6 0 0 1-3.5.7Zm2.5-2.5a6.8 6.8 0 0 0 2.4-1.5 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-.4-.4 2.1 2.1 0 0 1-.3-.4 3.8 3.8 0 0 1-.2-.5 3 3 0 0 1-.1-.5l-1 .4-.4.4a1.1 1.1 0 0 0-.2.6c0 .3.2.6.4.8.2.2.4.4.7.4Z\"/></svg>',\n    'image-enhancements': '<svg height=\"24\" width=\"24\"><path d=\"M5.3 21a2 2 0 0 1-1.5-.6 2 2 0 0 1-.6-1.4V5c0-.6.2-1 .6-1.4A2 2 0 0 1 5.2 3H13v2H5.2v14h14v-8h2v8c0 .6-.1 1-.5 1.4a2 2 0 0 1-1.4.6z\"/><path d=\"M11 9a4 4 0 0 0 4 4 4 4 0 0 0-4 4 4 4 0 0 0-4-4 4 4 0 0 0 4-4zm5.5-6c.2 2.1 2.2 4.1 4.5 4.5-2.3.4-4.3 2.4-4.5 4.5A5.2 5.2 0 0 0 12 7.5 5.2 5.2 0 0 0 16.5 3z\"/></svg>',\n    'image-options': '<svg width=\"24\" height=\"24\"><path d=\"M6 10a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2Zm12 0a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2Zm-6 0a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2Z\" fill-rule=\"nonzero\"/></svg>',\n    'image': '<svg width=\"24\" height=\"24\"><path d=\"m5 15.7 3.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-3-2.5-2.4-6.4 6.5H19v-4ZM4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V4c0-.6.4-1 1-1Zm6 8a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z\" fill-rule=\"nonzero\"/></svg>',\n    'import-word': '<svg width=\"24\" height=\"24\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M7 3h7.4L19 7.6V15h-2V9h-4V5H5c0-1.1.9-2 2-2Z\"/><path d=\"M9.5 7A1.5 1.5 0 0 1 11 8.4v7.1A1.5 1.5 0 0 1 9.6 17H2.5A1.5 1.5 0 0 1 1 15.6V8.5A1.5 1.5 0 0 1 2.4 7h7.1Zm-1 2.8-1 2.6-1-2.5v-.1a.6.6 0 0 0-1 0l-.1.1-.9 2.5-1-2.5v-.1a.6.6 0 0 0-1 .4v.1l1.5 4v.1a.6.6 0 0 0 1 0v-.1l1-2.5.9 2.5v.1a.6.6 0 0 0 1 0H8l1.6-4v-.2a.6.6 0 0 0-1.1-.4Z\"/><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M11.4 18.2a1 1 0 0 0 1.2 1.6l1.4-1V22a1 1 0 1 0 2 0v-3.1l1.4 1a1 1 0 0 0 1.2-1.7L15 15.8l-3.6 2.4Z\"/></svg>',\n    'improve-writing': '<svg height=\"24\" width=\"24\"><path d=\"M14.8 4.1c-1 0-2.2.5-3 1.3L6.5 11a.8.8 0 0 0-.2.6V16l7.9-8.3.7.8.6.7-4.4 4.6h4.7l2-2.2a4.5 4.5 0 0 0 1-1.7l2 .6a6.5 6.5 0 0 1-1.6 2.5L14 18.7a2.7 2.7 0 0 1-1 .7 2.6 2.6 0 0 1-1 .2H5.8L3.4 22 2 20.5l2.4-2.4a2 2 0 0 1 0-.5v-6c0-.8.2-1.5.7-2L10.5 4A6 6 0 0 1 14.8 2v2zM7.6 17.5H12a.8.8 0 0 0 .5-.2l1.3-1.4H9.2z\" fill-rule=\"evenodd\"/><path d=\"M18.8 2.2a.3.3 0 0 1 .6 0 4 4 0 0 0 2.4 2.5c.3.1.3.5 0 .7h-.2a4.1 4.1 0 0 0-2.2 2.4.3.3 0 0 1-.6 0 4.1 4.1 0 0 0-2.2-2.4h-.2c-.3-.2-.3-.6 0-.7 1.1-.4 2-1.3 2.4-2.5z\"/></svg>',\n    'indent': '<svg width=\"24\" height=\"24\"><path d=\"M7 5h12c.6 0 1 .4 1 1s-.4 1-1 1H7a1 1 0 1 1 0-2Zm5 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 0 1 0-2Zm0 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 0 1 0-2Zm-5 4h12a1 1 0 0 1 0 2H7a1 1 0 0 1 0-2Zm-2.6-3.8L6.2 12l-1.8-1.2a1 1 0 0 1 1.2-1.6l3 2a1 1 0 0 1 0 1.6l-3 2a1 1 0 1 1-1.2-1.6Z\" fill-rule=\"evenodd\"/></svg>',\n    'info': '<svg width=\"24\" height=\"24\"><path d=\"M12 4a7.8 7.8 0 0 1 5.7 2.3A8 8 0 1 1 12 4Zm-1 3v2h2V7h-2Zm3 10v-1h-1v-5h-3v1h1v4h-1v1h4Z\" fill-rule=\"evenodd\"/></svg>',\n    'insert-character': '<svg width=\"24\" height=\"24\"><path d=\"M15 18h4l1-2v4h-6v-3.3l1.4-1a6 6 0 0 0 1.8-2.9 6.3 6.3 0 0 0-.1-4.1 5.8 5.8 0 0 0-3-3.2c-.6-.3-1.3-.5-2.1-.5a5.1 5.1 0 0 0-3.9 1.8 6.3 6.3 0 0 0-1.3 6 6.2 6.2 0 0 0 1.8 3l1.4.9V20H4v-4l1 2h4v-.5l-2-1L5.4 15A6.5 6.5 0 0 1 4 11c0-1 .2-1.9.6-2.7A7 7 0 0 1 6.3 6C7.1 5.4 8 5 9 4.5c1-.3 2-.5 3.1-.5a8.8 8.8 0 0 1 5.7 2 7 7 0 0 1 1.7 2.3 6 6 0 0 1 .2 4.8c-.2.7-.6 1.3-1 1.9a7.6 7.6 0 0 1-3.6 2.5v.5Z\" fill-rule=\"evenodd\"/></svg>',\n    'insert-time': '<svg width=\"24\" height=\"24\"><g fill-rule=\"nonzero\"><path d=\"M12 19a7 7 0 1 0 0-14 7 7 0 0 0 0 14Zm0 2a9 9 0 1 1 0-18 9 9 0 0 1 0 18Z\"/><path d=\"M16 12h-3V7c0-.6-.4-1-1-1a1 1 0 0 0-1 1v7h5c.6 0 1-.4 1-1s-.4-1-1-1Z\"/></g></svg>',\n    'instagram': '<svg height=\"24\" width=\"24\"><path clip-rule=\"evenodd\" d=\"M10.1 9a4 4 0 1 1 4.4 6.6A4 4 0 0 1 10.1 9zm2.2 1.3a2 2 0 1 0 0 4 2 2 0 0 0 0-4z\" fill-rule=\"evenodd\"/><path d=\"M16 9.3a1.3 1.3 0 1 0 0-2.6 1.3 1.3 0 0 0 0 2.6z\"/><path clip-rule=\"evenodd\" d=\"M3 6a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v12a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3zm3-1a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1z\" fill-rule=\"evenodd\"/></svg>',\n    'invert': '<svg height=\"24\" width=\"24\"><path d=\"M5 4 3.6 5.4l3.9 4C6.6 10.7 6 12.3 6 14a6 6 0 0 0 10.3 4.2l1.9 1.8 1.4-1.4z\" fill-rule=\"evenodd\"/><path d=\"M13.4 8.4c.9 1 1.6 2.1 2 3.2l2.6 2.6V14c0-5-6-10-6-10s-1 .8-2.1 2l1.4 1.5.7-.7 1.4 1.6z\"/></svg>',\n    'italic': '<svg width=\"24\" height=\"24\"><path d=\"m16.7 4.7-.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>',\n    'language': '<svg width=\"24\" height=\"24\"><path d=\"M12 3a9 9 0 1 1 0 18 9 9 0 0 1 0-18Zm4.3 13.3c-.5 1-1.2 2-2 2.9a7.5 7.5 0 0 0 3.2-2.1l-.2-.2a6 6 0 0 0-1-.6Zm-8.6 0c-.5.2-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v.1L7 20.4l-3.7-3.7a1 1 0 0 1 1.3-1.5h.1L6 16.7V7.4L4.7 8.7a1 1 0 0 1-1.3 0h-.1a1 1 0 0 1 0-1.3v-.1L7 3.6z\"/></svg>',\n    'line': '<svg width=\"24\" height=\"24\"><path d=\"m15 9-8 8H4v-3l8-8 3 3Zm1-1-3-3 1-1h1c-.2 0 0 0 0 0l2 2s0 .2 0 0v1l-1 1ZM4 18h16v2H4v-2Z\" fill-rule=\"evenodd\"/></svg>',\n    'link': '<svg width=\"24\" height=\"24\"><path d=\"M6.2 12.3a1 1 0 0 1 1.4 1.4l-2 2a2 2 0 1 0 2.6 2.8l4.8-4.8a1 1 0 0 0 0-1.4 1 1 0 1 1 1.4-1.3 2.9 2.9 0 0 1 0 4L9.6 20a3.9 3.9 0 0 1-5.5-5.5l2-2Zm11.6-.6a1 1 0 0 1-1.4-1.4l2-2a2 2 0 1 0-2.6-2.8L11 10.3a1 1 0 0 0 0 1.4A1 1 0 1 1 9.6 13a2.9 2.9 0 0 1 0-4L14.4 4a3.9 3.9 0 0 1 5.5 5.5l-2 2Z\" fill-rule=\"nonzero\"/></svg>',\n    'list-bull-circle': '<svg height=\"48\" width=\"48\"><path d=\"M8 14a3 3 0 1 0 6 0 3 3 0 0 0-6 0zm5 0a2 2 0 1 1-4 0 2 2 0 0 1 4 0zM8 24a3 3 0 1 0 6 0 3 3 0 0 0-6 0zm5 0a2 2 0 1 1-4 0 2 2 0 0 1 4 0zM8 34a3 3 0 1 0 6 0 3 3 0 0 0-6 0zm5 0a2 2 0 1 1-4 0 2 2 0 0 1 4 0z\" fill-rule=\"evenodd\"/><path d=\"M18 12h22v4H18zm0 10h22v4H18zm0 10h22v4H18z\" opacity=\".2\"/></svg>',\n    'list-bull-default': '<svg height=\"48\" width=\"48\"><path d=\"M14 14a3 3 0 1 1-6 0 3 3 0 0 1 6 0z\"/><path d=\"M12 24a3 3 0 1 0 6 0 3 3 0 0 0-6 0zm5 0a2 2 0 1 1-4 0 2 2 0 0 1 4 0z\" fill-rule=\"evenodd\"/><path d=\"M16 31h6v6h-6z\"/><path d=\"M16 31h6v6h-6z\"/><path d=\"M18 12h22v4H18zm4 10h18v4H22zm4 10h14v4H26z\" opacity=\".2\"/></svg>',\n    'list-bull-disc': '<svg height=\"48\" width=\"48\"><path d=\"M14 14a3 3 0 1 1-6 0 3 3 0 0 1 6 0zm0 10a3 3 0 1 1-6 0 3 3 0 0 1 6 0zm0 10a3 3 0 1 1-6 0 3 3 0 0 1 6 0z\"/><path d=\"M18 12h22v4H18zm0 10h22v4H18zm0 10h22v4H18z\" opacity=\".2\"/></svg>',\n    'list-bull-square': '<svg height=\"48\" width=\"48\"><path d=\"M8 21h6v6H8zm0 10h6v6H8zm0-20h6v6H8z\"/><path d=\"M18 12h22v4H18zm0 10h22v4H18zm0 10h22v4H18z\" opacity=\".2\"/></svg>',\n    '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.8h-.1l-1.5 1v-1.1l1.6-1.1h1.2v6zM33.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>',\n    '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>',\n    '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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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 0 0-.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>',\n    '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>',\n    '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>',\n    '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 17-.5-1.4h-2l-.5 1.4H35l2-6h1.6l2 6h-1.3Zm-1.6-4.7-.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>',\n    '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 17-.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>',\n    '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>',\n    '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>',\n    '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 0 1-.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 0 0-.3-.7A1 1 0 0 0 13 7h-2a1 1 0 0 0-.7.3 1 1 0 0 0-.3.7Z\" fill-rule=\"evenodd\"/></svg>',\n    'ltr': '<svg width=\"24\" height=\"24\"><path d=\"M11 5h7a1 1 0 0 1 0 2h-1v11a1 1 0 0 1-2 0V7h-2v11a1 1 0 0 1-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 0 1 7.8 10a3.3 3.3 0 0 1 0-2.8 3.4 3.4 0 0 1 1.8-1.8L11 5ZM4.4 16.2 6.2 15l-1.8-1.2a1 1 0 0 1 1.2-1.6l3 2a1 1 0 0 1 0 1.6l-3 2a1 1 0 1 1-1.2-1.6Z\" fill-rule=\"evenodd\"/></svg>',\n    'math-equation': '<svg width=\"24\" height=\"24\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M9 4.8c.1-.5.5-.8 1-.8h10a1 1 0 1 1 0 2h-9.2L8.3 19.2a1 1 0 0 1-1.7.4l-3.4-4.2a1 1 0 0 1 1.6-1.2l2 2.5L9 4.8Zm9.7 5.5c.4.4.4 1 0 1.4L17 13.5l1.8 1.8a1 1 0 1 1-1.4 1.4L15.5 15l-1.8 1.8a1 1 0 0 1-1.4-1.4l1.8-1.8-1.8-1.8a1 1 0 0 1 1.4-1.4l1.8 1.8 1.8-1.8a1 1 0 0 1 1.4 0Z\"/></svg>',\n    'mentions': '<svg height=\"24\" width=\"24\"><path d=\"M12 21a8.8 8.8 0 0 1-3.5-.7 9 9 0 0 1-2.9-2 9 9 0 0 1-1.9-2.8A8.8 8.8 0 0 1 3 12c0-1.3.2-2.4.7-3.5a9 9 0 0 1 4.8-4.8A8.8 8.8 0 0 1 12 3c1.3 0 2.4.2 3.5.7a9.1 9.1 0 0 1 4.8 4.8A8.7 8.7 0 0 1 21 12v1.4a3 3 0 0 1-.9 2.2 3 3 0 0 1-2.2.9c-.5 0-1-.1-1.5-.4a3.8 3.8 0 0 1-1.1-1 4.8 4.8 0 0 1-1.5 1 4.3 4.3 0 0 1-1.8.4c-1.2 0-2.3-.4-3.2-1.3-.9-.9-1.3-2-1.3-3.2s.4-2.3 1.3-3.2c.9-.9 2-1.3 3.2-1.3s2.3.4 3.2 1.3c.9.9 1.3 2 1.3 3.2v1.4c0 .4.1.7.4 1 .3.3.6.4 1 .4s.7-.1 1-.4c.3-.3.4-.6.4-1V12c0-2-.7-3.8-2.1-5.2S14 4.7 12 4.7s-3.8.7-5.2 2.1S4.7 10 4.7 12s.7 3.8 2.1 5.2 3.2 2.1 5.2 2.1h4.5V21zm0-6.2c.8 0 1.4-.3 2-.8a2.7 2.7 0 0 0 .8-2c0-.8-.3-1.4-.8-2a2.7 2.7 0 0 0-2-.8c-.8 0-1.4.3-2 .8a2.7 2.7 0 0 0-.8 2c0 .8.3 1.4.8 2a2.7 2.7 0 0 0 2 .8z\"/></svg>',\n    'minus': '<svg width=\"24\" height=\"24\"><path d=\"M19 11a1 1 0 0 1 .1 2H5a1 1 0 0 1-.1-2H19Z\"/></svg>',\n    'more-drawer': '<svg width=\"24\" height=\"24\"><path d=\"M6 10a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2Zm12 0a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2Zm-6 0a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2Z\" fill-rule=\"nonzero\"/></svg>',\n    'new-chat': '<svg height=\"24\" width=\"24\"><path d=\"M12 5H6v13.7h12v-7.9h2v7.9a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6z\"/><path d=\"M17 3.3a1 1 0 0 1 1.3 0l1.4 1.3a1 1 0 0 1 0 1.4l-5.2 5a1 1 0 0 1-.5.3l-3 .6.5-3a1 1 0 0 1 .3-.5L17 3.3z\"/></svg>',\n    'new-document': '<svg width=\"24\" height=\"24\"><path d=\"M14.4 3H7a2 2 0 0 0-2 2v14c0 1.1.9 2 2 2h10a2 2 0 0 0 2-2V7.6L14.4 3ZM17 19H7V5h6v4h4v10Z\" fill-rule=\"nonzero\"/></svg>',\n    'new-tab': '<svg width=\"24\" height=\"24\"><path d=\"m15 13 2-2v8H5V7h8l-2 2H7v8h8v-4Zm4-8v5.5l-2-2-5.6 5.5H10v-1.4L15.5 7l-2-2H19Z\" fill-rule=\"evenodd\"/></svg>',\n    'non-breaking': '<svg width=\"24\" height=\"24\"><path d=\"M11 11H8a1 1 0 1 1 0-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 0 1-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>',\n    'notice': '<svg width=\"24\" height=\"24\"><path d=\"M15.5 4 20 8.5v7L15.5 20h-7L4 15.5v-7L8.5 4h7ZM13 17v-2h-2v2h2Zm0-4V7h-2v6h2Z\" fill-rule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.6h-1.3a.4.4 0 1 1 0-.8h1.3a.3.3 0 0 0 0-.6h-1.2a.5.5 0 1 1 0-1H19c.6 0 1 .4 1 1Z\" fill-rule=\"evenodd\"/></svg>',\n    'ordered-list': '<svg width=\"24\" height=\"24\"><path d=\"M10 17h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 1 1 0-2ZM6 4v3.5c0 .3-.2.5-.5.5a.5.5 0 0 1-.5-.5V5h-.5a.5.5 0 0 1 0-1H6Zm-1 8.8.2.2h1.3c.3 0 .5.2.5.5s-.2.5-.5.5H4.9a1 1 0 0 1-.9-1V13c0-.4.3-.8.6-1l1.2-.4.2-.3a.2.2 0 0 0-.2-.2H4.5a.5.5 0 0 1-.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 0 1 0-1h1.2c.2 0 .3-.1.3-.3 0-.2-.1-.3-.3-.3H4.4a.4.4 0 1 1 0-.8h1.3c.2 0 .3-.1.3-.3 0-.2-.1-.3-.3-.3H4.5a.5.5 0 1 1 0-1H6c.6 0 1 .4 1 1Z\" fill-rule=\"evenodd\"/></svg>',\n    'orientation': '<svg width=\"24\" height=\"24\"><path d=\"M7.3 6.4 1 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 0 1 0-1.2L13.6.2c.3-.3.9-.3 1.2 0 .3.3.3.8 0 1.1L12 4h1a9 9 0 1 1-4.3 16.9l1.5-1.5A7 7 0 1 0 13 6h-1Z\" fill-rule=\"nonzero\"/></svg>',\n    'other-actions':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g>',\n    '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 0 1 0-2Zm3 0h1c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 0 1 0-2Zm4 0c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2Zm3 0h1c.6 0 1 .4 1 1s-.4 1-1 1h-1a1 1 0 0 1 0-2Zm4 0c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2ZM7 3v5h10V3c0-.6.4-1 1-1s1 .4 1 1v7H5V3c0-.6.4-1 1-1s1 .4 1 1ZM6 22a1 1 0 0 1-1-1v-7h14v7c0 .6-.4 1-1 1a1 1 0 0 1-1-1v-5H7v5c0 .6-.4 1-1 1Z\"/></g></svg>',\n    'paragraph': '<svg width=\"24\" height=\"24\"><path fill-rule=\"evenodd\" d=\"M10 5h7a1 1 0 0 1 0 2h-1v11a1 1 0 0 1-2 0V7h-2v11a1 1 0 0 1-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 0 1 6.8 10a3.3 3.3 0 0 1 0-2.8 3.4 3.4 0 0 1 1.8-1.8L10 5Z\"/></svg>',\n    'paste-column-after': '<svg width=\"24\" height=\"24\"><path fill-rule=\"evenodd\" d=\"M12 1a3 3 0 0 1 2.8 2H18c1 0 2 .8 2 1.9V7h-2V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 0 1-1-1V5H6v13h7v2H6c-1 0-2-.8-2-1.9V5c0-1 .8-2 1.9-2H9.2A3 3 0 0 1 12 1Zm8 7v12h-6V8h6Zm-1.5 1.5h-3v9h3v-9ZM12 3a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z\"/></svg>',\n    'paste-column-before': '<svg width=\"24\" height=\"24\"><path fill-rule=\"evenodd\" d=\"M12 1a3 3 0 0 1 2.8 2H18c1 0 2 .8 2 1.9V18c0 1-.8 2-1.9 2H11v-2h7V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 0 1-1-1V5H6v2H4V5c0-1 .8-2 1.9-2H9.2A3 3 0 0 1 12 1Zm-2 7v12H4V8h6ZM8.5 9.5h-3v9h3v-9ZM12 3a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z\"/></svg>',\n    'paste-row-after': '<svg width=\"24\" height=\"24\"><path fill-rule=\"evenodd\" d=\"M12 1a3 3 0 0 1 2.8 2H18c1 0 2 .8 2 1.9V11h-2V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 0 1-1-1V5H6v13h14c0 1-.8 2-1.9 2H6c-1 0-2-.8-2-1.9V5c0-1 .8-2 1.9-2H9.2A3 3 0 0 1 12 1Zm10 11v5H8v-5h14Zm-1.5 1.5h-11v2h11v-2ZM12 3a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z\"/></svg>',\n    'paste-row-before': '<svg width=\"24\" height=\"24\"><path fill-rule=\"evenodd\" d=\"M12 1a3 3 0 0 1 2.8 2H18c1 0 2 .8 2 1.9V7h-2V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 0 1-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 0 1 12 1Zm10 7v5H8V8h14Zm-1.5 1.5h-11v2h11v-2ZM12 3a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z\"/></svg>',\n    'paste-text': '<svg width=\"24\" height=\"24\"><path d=\"M18 9V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 0 1-1-1V5H6v13h3V9h9ZM9 20H6a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2h3.2A3 3 0 0 1 12 1a3 3 0 0 1 2.8 2H18a2 2 0 0 1 2 2v4h1v12H9v-1Zm1.5-9.5v9h9v-9h-9ZM12 3a1 1 0 0 0-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>',\n    'paste': '<svg width=\"24\" height=\"24\"><path d=\"M18 9V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 0 1-1-1V5H6v13h3V9h9ZM9 20H6a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2h3.2A3 3 0 0 1 12 1a3 3 0 0 1 2.8 2H18a2 2 0 0 1 2 2v4h1v12H9v-1Zm1.5-9.5v9h9v-9h-9ZM12 3a1 1 0 0 0-1 1c0 .5.4 1 1 1s1-.5 1-1-.4-1-1-1Z\" fill-rule=\"nonzero\"/></svg>',\n    'permanent-pen': '<svg width=\"24\" height=\"24\"><path d=\"M10.5 17.5 8 20H3v-3l3.5-3.5a2 2 0 0 1 0-3L14 3l1 1-7.3 7.3a1 1 0 0 0 0 1.4l3.6 3.6c.4.4 1 .4 1.4 0L20 9l1 1-7.6 7.6a2 2 0 0 1-2.8 0l-.1-.1Z\" fill-rule=\"nonzero\"/></svg>',\n    'photo-filter': '<svg height=\"24\" width=\"24\"><path d=\"M4.4 21c-.3 0-.6-.2-.9-.5-.3-.3-.4-.6-.5-.9L19.6 3c.3 0 .6.3.9.5l.5.9zM3 14.7v-2.8L11.9 3h2.8zM3 7V5c0-.6.2-1 .6-1.4A2 2 0 0 1 5 3h2zm14 14 4-4v2c0 .6-.2 1-.6 1.4a2 2 0 0 1-1.4.6zm-7.7 0L21 9.3v2.8L12 21z\"/></svg>',\n    'pin': '<svg width=\"24\" height=\"24\"><path fill-rule=\"evenodd\" d=\"M18 3a1 1 0 0 1 1 1v3.6a1 1 0 0 1-1 1h-1.6l2.5 6A1 1 0 0 1 18 16h-5v5h-2v-5H6a1 1 0 0 1-1-1.3l2.6-6H6a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h12ZM7 6.7h2A1 1 0 0 1 10 8l-2.6 6h9.2L14 8a1 1 0 0 1 .9-1.3h2V5H7v1.6Z\"/></svg>',\n    'plus': '<svg width=\"24\" height=\"24\"><path d=\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 4c3 0 5.8 1.4 8.1 3.8a18.2 18.2 0 0 1 2.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 0 1-2.8-3.7 1 1 0 0 1 0-1Zm12-3.3a2 2 0 1 0 2.7 2.6 4 4 0 1 1-2.6-2.6Z\" fill-rule=\"nonzero\"/></svg>',\n    'print': '<svg width=\"24\" height=\"24\"><path d=\"M18 8H6a3 3 0 0 0-3 3v6h2v3h14v-3h2v-6a3 3 0 0 0-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>',\n    '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 0 0-1 1v4c0 .6.4 1 1 1h2l-1.3 2.7a1 1 0 0 0 .8 1.3Zm8 0h.9c.4 0 .7-.2.9-.6L19 13V8c0-.6-.4-1-1-1h-4a1 1 0 0 0-1 1v4c0 .6.4 1 1 1h2l-1.3 2.7a1 1 0 0 0 .8 1.3Z\" fill-rule=\"nonzero\"/></svg>',\n    'reasoning': '<svg height=\"24\" width=\"24\"><path d=\"M14.3 22h-3.6v-2h3.6zM15.3 18.4H9.7v-2h5.6zM12.8 2c1.6 0 3.1.7 4.3 1.9C18.3 5 19 6.7 19 8.4c0 1.4-.5 2.8-1.7 3.9l-.2.2a3 3 0 0 0-.9 1.5 1 1 0 1 1-2-.4c.3-1.2 1-2 1.7-2.8.7-.6 1.1-1.5 1.1-2.4 0-1.2-.5-2.3-1.3-3.1a4.5 4.5 0 0 0-3-1.3h-.2c-1.2 0-2.3.5-3.2 1.3C8.5 6 8 7.3 8 8.4c0 .7.1 1.5 1 2.4.8.7 1.5 1.6 1.7 2.8a1 1 0 0 1-2 .4c0-.6-.4-1.2-1-1.7A5 5 0 0 1 6 8.4c0-1.7.7-3.3 2-4.5A6.6 6.6 0 0 1 12.4 2z\"/></svg>',\n    '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 1 1-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 1 1 1.4-1.4l5 5a1 1 0 0 1 0 1.4l-5 5a1 1 0 0 1-1.4-1.4l3.3-3.3Z\" fill-rule=\"nonzero\"/></svg>',\n    'reload': '<svg width=\"24\" height=\"24\"><g fill-rule=\"nonzero\"><path d=\"m5 22.1-1.2-4.7v-.2a1 1 0 0 1 1-1l5 .4a1 1 0 1 1-.2 2l-2.2-.2a7.8 7.8 0 0 0 8.4.2 7.5 7.5 0 0 0 3.5-6.4 1 1 0 1 1 2 0 9.5 9.5 0 0 1-4.5 8 9.9 9.9 0 0 1-10.2 0l.4 1.4a1 1 0 1 1-2 .5ZM13.6 7.4c0-.5.5-1 1-.9l2.8.2a8 8 0 0 0-9.5-1 7.5 7.5 0 0 0-3.6 7 1 1 0 0 1-2 0 9.5 9.5 0 0 1 4.5-8.6 10 10 0 0 1 10.9.3l-.3-1a1 1 0 0 1 2-.5l1.1 4.8a1 1 0 0 1-1 1.2l-5-.4a1 1 0 0 1-.9-1Z\"/></g></svg>',\n    'remove-formatting': '<svg width=\"24\" height=\"24\"><path d=\"M13.2 6a1 1 0 0 1 0 .2l-2.6 10a1 1 0 0 1-1 .8h-.2a.8.8 0 0 1-.8-1l2.6-10H8a1 1 0 1 1 0-2h9a1 1 0 0 1 0 2h-3.8ZM5 18h7a1 1 0 0 1 0 2H5a1 1 0 0 1 0-2Zm13 1.5L16.5 18 15 19.5a.7.7 0 0 1-1-1l1.5-1.5-1.5-1.5a.7.7 0 0 1 1-1l1.5 1.5 1.5-1.5a.7.7 0 0 1 1 1L17.5 17l1.5 1.5a.7.7 0 0 1-1 1Z\" fill-rule=\"evenodd\"/></svg>',\n    'remove': '<svg width=\"24\" height=\"24\"><path d=\"M16 7h3a1 1 0 0 1 0 2h-1v9a3 3 0 0 1-3 3H9a3 3 0 0 1-3-3V9H5a1 1 0 1 1 0-2h3V6a3 3 0 0 1 3-3h2a3 3 0 0 1 3 3v1Zm-2 0V6c0-.6-.4-1-1-1h-2a1 1 0 0 0-1 1v1h4Zm2 2H8v9c0 .6.4 1 1 1h6c.6 0 1-.4 1-1V9Zm-7 3a1 1 0 0 1 2 0v4a1 1 0 0 1-2 0v-4Zm4 0a1 1 0 0 1 2 0v4a1 1 0 0 1-2 0v-4Z\" fill-rule=\"nonzero\"/></svg>',\n    'resize-handle': '<svg width=\"10\" height=\"10\"><g fill-rule=\"nonzero\"><path d=\"M8.1 1.1A.5.5 0 1 1 9 2l-7 7A.5.5 0 1 1 1 8l7-7ZM8.1 5.1A.5.5 0 1 1 9 6l-3 3A.5.5 0 1 1 5 8l3-3Z\"/></g></svg>',\n    '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 0 1-.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 0 1-.7.3h-6a1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h3.6L6 7.4V11c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3 1 1 0 0 1-.7-.3A1 1 0 0 1 4 11V5Z\" fill-rule=\"evenodd\"/></svg>',\n    '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 0 1 0 2H3a1 1 0 0 1-1-1V5a1 1 0 1 1 2 0v3l2.5-2.4a9.2 9.2 0 0 1 10.8-1.5A9 9 0 0 1 13.4 21c-2.4.1-4.7-.7-6.5-2.2a1 1 0 1 1 1.3-1.5 7.2 7.2 0 0 0 11.6-3.7 7 7 0 0 0-3.5-7.7A7.2 7.2 0 0 0 8 7L4.7 10Z\" fill-rule=\"nonzero\"/></g></svg>',\n    'revert-all': '<svg height=\"24\" width=\"24\"><path d=\"M15.6 3.2a9.5 9.5 0 0 0-10.2 2l.3-1a1 1 0 1 0-2-.6L2.4 8.4a1 1 0 0 0 1 1.3l5.1-.5a1 1 0 1 0-.2-2L6 7.5a7.5 7.5 0 1 1-1.4 5.4 1 1 0 1 0-2 .2 9.5 9.5 0 1 0 13-9.9z\"/><path d=\"M14.7 10.7a1 1 0 0 0-1.4-1.4L12 10.6l-1.3-1.3a1 1 0 0 0-1.4 1.4l1.3 1.3-1.3 1.3a1 1 0 1 0 1.4 1.4l1.3-1.3 1.3 1.3a1 1 0 0 0 1.4-1.4L13.4 12z\"/></svg>',\n    'revert-changes': '<svg height=\"24\" width=\"24\"><path d=\"m8.9 18.8.4 3.2H13v-2h-2v-2.6a4.6 4.6 0 0 1-1.6-.6 5.9 5.9 0 0 1-1.3-1l-2.5 1-1-1.7 2.2-1.6a4 4 0 0 1-.2-.7 5.9 5.9 0 0 1 0-.8v-.8l.2-.8-2.2-1.6 1-1.7 2.5 1a6 6 0 0 1 1.2-.9l1.4-.6.4-2.6h2l.3 2.6A5.6 5.6 0 0 1 16 8.2l2.5-1 1 1.6-2.2 1.7.2.7v.8a5 5 0 0 1 0 1h2a2.6 2.6 0 0 0 0-.5V11.3l2.6-2-2.8-4.7-3 1.3a8.2 8.2 0 0 0-.5-.4 3.8 3.8 0 0 0-.6-.3L14.8 2H9.3l-.4 3.2a5 5 0 0 0-1.2.7l-3-1.3L2 9.4l2.6 2V12.6l-2.6 2 2.7 4.7 3-1.3a8 8 0 0 0 1.2.7z\"/><path d=\"m14.5 20.3 2.1-2-2.1-2.2 1.4-1.4 2.1 2.1 2.1-2 1.4 1.3-2 2.1 2 2.1-1.4 1.4-2.1-2-2.1 2zM12 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4z\"/></svg>',\n    'revision-history': '<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 0 1 0 2H3a1 1 0 0 1-1-1V5a1 1 0 1 1 2 0v3l2.5-2.4a9.2 9.2 0 0 1 10.8-1.5A9 9 0 0 1 13.4 21c-2.4.1-4.7-.7-6.5-2.2a1 1 0 1 1 1.3-1.5 7.2 7.2 0 0 0 11.6-3.7 7 7 0 0 0-3.5-7.7A7.2 7.2 0 0 0 8 7L4.7 10Z\" fill-rule=\"nonzero\"/></g></svg>',\n    'rotate-left': '<svg width=\"24\" height=\"24\"><path d=\"M4.7 10H9a1 1 0 0 1 0 2H3a1 1 0 0 1-1-1V5a1 1 0 1 1 2 0v3l2.5-2.4a9.2 9.2 0 0 1 10.8-1.5A9 9 0 0 1 13.4 21c-2.4.1-4.7-.7-6.5-2.2a1 1 0 1 1 1.3-1.5 7.2 7.2 0 0 0 11.6-3.7 7 7 0 0 0-3.5-7.7A7.2 7.2 0 0 0 8 7L4.7 10Z\" fill-rule=\"nonzero\"/></svg>',\n    'rotate-right': '<svg width=\"24\" height=\"24\"><path d=\"M20 8V5a1 1 0 0 1 2 0v6c0 .6-.4 1-1 1h-6a1 1 0 0 1 0-2h4.3L16 7A7.2 7.2 0 0 0 7.7 6a7 7 0 0 0 3 13.1c1.9.1 3.7-.5 5-1.7a1 1 0 0 1 1.4 1.5A9.2 9.2 0 0 1 2.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>',\n    '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 0 1 4.8 10a3.3 3.3 0 0 1 0-2.8 3.4 3.4 0 0 1 1.8-1.8L8 5Zm12 11.2a1 1 0 1 1-1 1.6l-3-2a1 1 0 0 1 0-1.6l3-2a1 1 0 1 1 1 1.6L18.4 15l1.8 1.2Z\" fill-rule=\"evenodd\"/></svg>',\n    'saturation': '<svg width=\"24\" height=\"24\"><path fill-rule=\"evenodd\" d=\"M12 20.5a6 6 0 1 1-5.9-10.2 6 6 0 1 1 11.8 0A6 6 0 1 1 12 20.5Zm-1.1-7.7a6 6 0 0 0-.2.3 4.3 4.3 0 0 1-2-1.3c.9.1 1.6.5 2.2 1Zm2.4.3a6 6 0 0 0-.2-.3 4.3 4.3 0 0 1 2.2-1 4.3 4.3 0 0 1-2 1.3ZM12.2 15a6.3 6.3 0 0 1-.4 0 4.3 4.3 0 0 0 .2 2.5 4.3 4.3 0 0 0 .2-2.5Zm.9 4.2a6 6 0 0 0 .8-4.5 6 6 0 0 0 3.4-2.8 4.3 4.3 0 0 1-1.3 8.4 4.3 4.3 0 0 1-2.9-1.1Zm-2.2 0a4.3 4.3 0 1 1-4.2-7.3 6 6 0 0 0 3.4 2.8 6 6 0 0 0 .8 4.5Zm-3-9.2a4.3 4.3 0 1 1 8.3 0 6 6 0 0 0-4.2 1.5A6 6 0 0 0 7.8 10Z\"/></svg>',\n    'save': '<svg width=\"24\" height=\"24\"><path d=\"M5 16h14a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-2c0-1.1.9-2 2-2Zm0 2v2h14v-2H5Zm10 0h2v2h-2v-2Zm-4-6.4L8.7 9.3a1 1 0 1 0-1.4 1.4l4 4c.4.4 1 .4 1.4 0l4-4a1 1 0 1 0-1.4-1.4L13 11.6V4a1 1 0 0 0-2 0v7.6Z\" fill-rule=\"nonzero\"/></svg>',\n    'search': '<svg width=\"24\" height=\"24\"><path d=\"M16 17.3a8 8 0 1 1 1.4-1.4l4.3 4.4a1 1 0 0 1-1.4 1.4l-4.4-4.3Zm-5-.3a6 6 0 1 0 0-12 6 6 0 0 0 0 12Z\" fill-rule=\"nonzero\"/></svg>',\n    'select-all': '<svg width=\"24\" height=\"24\"><path d=\"M3 5h2V3a2 2 0 0 0-2 2Zm0 8h2v-2H3v2Zm4 8h2v-2H7v2ZM3 9h2V7H3v2Zm10-6h-2v2h2V3Zm6 0v2h2a2 2 0 0 0-2-2ZM5 21v-2H3c0 1.1.9 2 2 2Zm-2-4h2v-2H3v2ZM9 3H7v2h2V3Zm2 18h2v-2h-2v2Zm8-8h2v-2h-2v2Zm0 8a2 2 0 0 0 2-2h-2v2Zm0-12h2V7h-2v2Zm0 8h2v-2h-2v2Zm-4 4h2v-2h-2v2Zm0-16h2V3h-2v2ZM7 17h10V7H7v10Zm2-8h6v6H9V9Z\" fill-rule=\"nonzero\"/></svg>',\n    'selected': '<svg width=\"24\" height=\"24\"><path fill-rule=\"nonzero\" d=\"M6 4h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2Zm3.6 10.9L7 12.3a.7.7 0 0 0-1 1L9.6 17 18 8.6a.7.7 0 0 0 0-1 .7.7 0 0 0-1 0l-7.4 7.3Z\"/></svg>',\n    'send': '<svg width=\"24\" height=\"24\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"m13.3 22 7-18.3-18.3 7L9 15l4.3 7ZM18 6.8l-.7-.7L9.4 14l.7.7L18 6.8Z\"/></svg>',\n    '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 0 1-.2-.6V8H5a1 1 0 1 1 0-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 0 1-.2-.6V13H5a1 1 0 0 1 0-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 0 1-.2-.6V18H5a1 1 0 0 1 0-2h2v-.3c0-.2 0-.3.2-.5l.5-.2h2.5c.3 0 .4 0 .6.2l.2.6ZM8 18h2v-2H8v2Z\" fill-rule=\"evenodd\"/></svg>',\n    'sharpen': '<svg width=\"24\" height=\"24\"><path fill-rule=\"evenodd\" d=\"m16 6 4 4-8 9-8-9 4-4h8Zm-4 10.2 5.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\"/></svg>',\n    'source-close': '<svg width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M11.8 5 9 8l3 3a.6.6 0 0 1-1 .8L8 9l-3 3a.6.6 0 0 1-.8-1L7 8l-3-3a.6.6 0 0 1 1-.8L8 7l3-3a.6.6 0 0 1 .8 1Z\"/></svg>',\n    'source-file': '<svg width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M4.3 2H10L13 5v7.7c0 .7-.6 1.3-1.3 1.3H4.3A1.3 1.3 0 0 1 3 12.7V3.3C3 2.6 3.6 2 4.3 2Zm0 10.7h7.4V6H9V3.3H4.3v9.4Z\"/></svg>',\n    'source-image': '<svg height=\"16\" width=\"16\"><path d=\"M2.7 2h10.6c.4 0 .7.3.7.7v10.6a.7.7 0 0 1-.7.7H2.7a.7.7 0 0 1-.7-.7V2.7c0-.4.3-.7.7-.7zm.6 8.5 2.2-2.2a.5.5 0 0 1 .7 0L8 10l2.8-2.7a.5.5 0 0 1 .7 0l1.3 1.3V3.3H3.3v7.2zm0 1.4v.8h2l2-2-1.4-1.3zM11 8.4l1.7 1.6v2.7h-6L11 8.4z\" fill-rule=\"evenodd\"/><path d=\"M8.7 6.3a1 1 0 1 1-2 0 1 1 0 0 1 2 0z\"/></svg>',\n    'source-link': '<svg height=\"16\" width=\"16\"><g fill-rule=\"evenodd\"><path d=\"M3.5 12.6a2.7 2.7 0 0 1 0-3.8l.5-.6a.7.7 0 1 1 1 1l-.6.5a1.3 1.3 0 1 0 1.9 2L7.9 10a2.1 2.1 0 0 0 .6-2 .7.7 0 0 1 1.3-.3 3.4 3.4 0 0 1-1 3.2l-1.6 1.6a2.7 2.7 0 0 1-3.8 0z\"/><path d=\"M12.6 3.5a2.7 2.7 0 0 1 0 3.7l-.6.6a.7.7 0 1 1-1-1l.6-.5a1.3 1.3 0 1 0-1.9-2L8.1 6a2.1 2.1 0 0 0-.6 2 .7.7 0 1 1-1.3.3 3.4 3.4 0 0 1 1-3.2l1.6-1.7a2.7 2.7 0 0 1 3.8 0z\"/></g></svg>',\n    'source-selection': '<svg width=\"16\" height=\"16\"><path d=\"M3.2 12.8h.7V14H2.6a.6.6 0 0 1-.6-.6v-1.3h1.2v.7ZM7.5 14H4.9v-1.2h2.6V14Zm5.9-4.8a.6.6 0 1 1 0 1.2h-2.2l2.6 2.6a.6.6 0 1 1-.8.8l-2.6-2.6v2.2a.6.6 0 1 1-1.2 0V9.2h4.2ZM3.2 11.1H2V8.5h1.2v2.6Zm0-3.6H2V4.9h1.2v2.6Zm10.8 0h-1.2V4.9H14v2.6ZM3.9 3.2h-.7v.7H2V2.6a.6.6 0 0 1 .6-.6h1.3v1.2ZM13.4 2a.6.6 0 0 1 .6.6v1.3h-1.2v-.7h-.7V2h1.3Zm-6 1.2H5V2h2.6v1.2Zm3.7 0H8.5V2h2.6v1.2Z\"/></svg>',\n    '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 0 1 0-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 0 0-1.2 0c-.3.3-.3.8 0 1.1L18 12l-3.8 3.7Z\"/></g></svg>',\n    '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 0 1-.7-.3 1 1 0 0 1-.3-.7V5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h3v1Zm-5 1.5-.1.7c-.1.2-.3.3-.6.3.3 0 .5.1.6.3l.1.7V10c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3h-3V4h3c.3 0 .5.1.7.3.2.2.3.4.3.7v1.5ZM13 10V8h-2v2h2Zm0-3V5h-2v2h2Zm3 5 1 1-6.5 7L7 15.5l1.3-1 2.2 2.2L16 12Z\" fill-rule=\"evenodd\"/></svg>',\n    'stop': '<svg height=\"24\" width=\"24\"><path d=\"M19 17a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z\"/></svg>',\n    '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 0 1 7 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 0 1 0 2H5a1 1 0 0 1 0-2Z\" fill-rule=\"nonzero\"/></g></svg>',\n    'subscript': '<svg width=\"24\" height=\"24\"><path d=\"m10.4 10 4.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 0 0-.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 0 1-1.3 1.3l-.6.6h2.6V19Z\" fill-rule=\"nonzero\"/></svg>',\n    'suggestededits-badge': '<svg height=\"24\" width=\"24\"><path d=\"M11 3H7a2 2 0 0 0-2 2v14c0 1.1.9 2 2 2h10a2 2 0 0 0 2-2V9.7a6 6 0 0 1-2 .3v9H7V5h4a6 6 0 0 1 0-2z\"/><path d=\"M15 13v-2h-4v2zm-3 2H9v2h3zm-1-8H9v2h2zm4 10v-2h-2v2z\"/><path d=\"M21 4a4 4 0 1 1-8 0 4 4 0 0 1 8 0z\" class=\"tox-icon--badge\"/></svg>',\n    'suggestededits-tracking': '<svg height=\"24\" width=\"24\"><path d=\"M17.5 17a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3z\"/><path d=\"M17.5 14a4.5 4.5 0 1 1 0 9 4.5 4.5 0 0 1 0-9zm0 2a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5z\" fill-rule=\"evenodd\"/><path d=\"M19 7.6v4.6a6.5 6.5 0 0 0-2-.2V9h-3V5H7v14h4a6.5 6.5 0 0 0 .5 2H7a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2h7.4z\"/><path d=\"M12 15a6.5 6.5 0 0 0-.8 2H9v-2h3zm3-2.5-1 .5h-3v-2h4zM11 9H9V7h2z\"/><path d=\"M17.5 23a4.5 4.5 0 1 0 0-9 4.5 4.5 0 0 0 0 9zM15 18.5a2.5 2.5 0 1 1 5 0 2.5 2.5 0 0 1-5 0zm2.5-1.5a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3z\" fill-rule=\"evenodd\"/></svg>',\n    'suggestededits': '<svg width=\"24\" height=\"24\"><path d=\"M7 3h7.4L19 7.6V19a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2Zm0 16h10V9h-3V5H7v14Z\" clip-rule=\"evenodd\"/><path d=\"M9 7h2v2H9V7Zm2 4h4v2h-4v-2Zm-2 4h3v2H9v-2Z\"/><path d=\"M9 7h2v2H9V7Zm4 8h2v2h-2v-2Z\"/></svg>',\n    'summarize': '<svg width=\"24\" height=\"24\"><path fill-rule=\"evenodd\" d=\"M14 3c.3 0 .6 0 .8.2-1.3 1-1 3.3.7 4h.2l.3.2A2 2 0 0 1 14 9h-4a2 2 0 0 1-2-2H6v13h12V9.8a2.4 2.4 0 0 0 2 0V21a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h3a2 2 0 0 1 2-2h4Zm-4 4h4V5h-4v2Z\"/><path d=\"M15 16a1 1 0 1 1 0 2H9a1 1 0 1 1 0-2h6Zm0-4a1 1 0 1 1 0 2H9a1 1 0 1 1 0-2h6Zm3.7-9.8a.3.3 0 0 1 .6 0 4.1 4.1 0 0 0 2.5 2.5.3.3 0 0 1 0 .6l-.2.1a4.1 4.1 0 0 0-2.1 2v.1l-.2.3V8a.3.3 0 0 1-.1 0H19a.3.3 0 0 1 0 .1.4.4 0 0 1-.2 0 .3.3 0 0 1-.1 0v-.1a.3.3 0 0 1-.1 0v-.1a4.1 4.1 0 0 0-2.3-2.4h-.2a.3.3 0 0 1 0-.7 4.1 4.1 0 0 0 2.5-2.5Z\"/></svg>',\n    'superscript': '<svg width=\"24\" height=\"24\"><path d=\"M15 9.4 10.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>',\n    '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 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-8c0-1.1.9-2 2-2h14ZM5 15v3h6v-3H5Zm14 0h-6v3h6v-3Zm0-5h-6v3h6v-3ZM5 13h6v-3H5v3Z\"/></g></svg>',\n    '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 0 1 2 2v7h-8v-2h6V6h-6V4Z\" opacity=\".2\"/><path d=\"m18 20-2.6 1.6.7-3-2.4-2 3.1-.2 1.2-2.9 1.2 2.9 3.1.2-2.4 2 .7 3z\"/><path fill-rule=\"nonzero\" d=\"M3 13v5c0 1.1.9 2 2 2h8v-7h-2v5H5v-5H3Z\" opacity=\".2\"/></g></svg>',\n    'table-cell-properties': '<svg width=\"24\" height=\"24\"><path fill-rule=\"nonzero\" d=\"M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14Zm-8 9H5v5h6v-5Zm8 0h-6v5h6v-5Zm-8-7H5v5h6V6Z\"/></svg>',\n    'table-cell-select-all': '<svg width=\"24\" height=\"24\"><g fill-rule=\"evenodd\"><path fill-rule=\"nonzero\" d=\"M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14Zm0 2H5v12h14V6Z\"/><path d=\"M13 6v5h6v2h-6v5h-2v-5H5v-2h6V6h2Z\" opacity=\".2\"/></g></svg>',\n    'table-cell-select-inner': '<svg width=\"24\" height=\"24\"><g fill-rule=\"evenodd\"><path fill-rule=\"nonzero\" d=\"M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14Zm0 2H5v12h14V6Z\" opacity=\".2\"/><path d=\"M13 6v5h6v2h-6v5h-2v-5H5v-2h6V6h2Z\"/></g></svg>',\n    'table-classes': '<svg width=\"24\" height=\"24\"><g fill-rule=\"evenodd\"><path fill-rule=\"nonzero\" d=\"M19 4a2 2 0 0 1 2 2v7h-8v7H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14Zm-8 9H5v5h6v-5Zm8-7h-6v5h6V6Zm-8 0H5v5h6V6Z\"/><path d=\"m18 20-2.6 1.6.7-3-2.4-2 3.1-.2 1.2-2.9 1.2 2.9 3.1.2-2.4 2 .7 3z\"/></g></svg>',\n    'table-delete-column': '<svg width=\"24\" height=\"24\"><path fill-rule=\"nonzero\" d=\"M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14Zm-4 4h-2V6h-2v2H9V6H5v12h4v-2h2v2h2v-2h2v2h4V6h-4v2Zm.3.5 1 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>',\n    'table-delete-row': '<svg width=\"24\" height=\"24\"><path fill-rule=\"nonzero\" d=\"M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14Zm0 2H5v3h2.5v2H5v2h2.5v2H5v3h14v-3h-2.5v-2H19v-2h-2.5V9H19V6Zm-4.7 1.8 1.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>',\n    'table-delete-table': '<svg width=\"24\" height=\"24\"><g fill-rule=\"nonzero\"><path d=\"M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14ZM5 6v12h14V6H5Z\"/><path d=\"m14.4 8.6 1.1 1-2.4 2.4 2.4 2.4-1.1 1.1-2.4-2.4-2.4 2.4-1-1.1 2.3-2.4-2.3-2.4 1-1 2.4 2.3z\"/></g></svg>',\n    'table-insert-column-after': '<svg width=\"24\" height=\"24\"><path fill-rule=\"nonzero\" d=\"M20 4c.6 0 1 .4 1 1v2a1 1 0 0 1-2 0V6h-8v12h8v-1a1 1 0 0 1 2 0v2c0 .5-.4 1-.9 1H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h15ZM9 13H5v5h4v-5Zm7-5c.5 0 1 .4 1 .9V11h2a1 1 0 0 1 .1 2H17v2a1 1 0 0 1-2 .1V13h-2a1 1 0 0 1-.1-2H15V9c0-.6.4-1 1-1ZM9 6H5v5h4V6Z\"/></svg>',\n    'table-insert-column-before': '<svg width=\"24\" height=\"24\"><path fill-rule=\"nonzero\" d=\"M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a1 1 0 0 1-1-1v-2a1 1 0 0 1 2 0v1h8V6H5v1a1 1 0 1 1-2 0V5c0-.6.4-1 1-1h15Zm0 9h-4v5h4v-5ZM8 8c.5 0 1 .4 1 .9V11h2a1 1 0 0 1 .1 2H9v2a1 1 0 0 1-2 .1V13H5a1 1 0 0 1-.1-2H7V9c0-.6.4-1 1-1Zm11-2h-4v5h4V6Z\"/></svg>',\n    'table-insert-row-above': '<svg width=\"24\" height=\"24\"><path fill-rule=\"nonzero\" d=\"M6 4a1 1 0 1 1 0 2H5v6h14V6h-1a1 1 0 0 1 0-2h2c.6 0 1 .4 1 1v13a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5c0-.6.4-1 1-1h2Zm5 10H5v4h6v-4Zm8 0h-6v4h6v-4ZM12 3c.5 0 1 .4 1 .9V6h2a1 1 0 0 1 0 2h-2v2a1 1 0 0 1-2 .1V8H9a1 1 0 0 1 0-2h2V4c0-.6.4-1 1-1Z\"/></svg>',\n    'table-insert-row-after': '<svg width=\"24\" height=\"24\"><path fill-rule=\"nonzero\" d=\"M12 13c.5 0 1 .4 1 .9V16h2a1 1 0 0 1 .1 2H13v2a1 1 0 0 1-2 .1V18H9a1 1 0 0 1-.1-2H11v-2c0-.6.4-1 1-1Zm6 7a1 1 0 0 1 0-2h1v-6H5v6h1a1 1 0 0 1 0 2H4a1 1 0 0 1-1-1V6c0-1.1.9-2 2-2h14a2 2 0 0 1 2 2v13c0 .5-.4 1-.9 1H18ZM11 6H5v4h6V6Zm8 0h-6v4h6V6Z\"/></svg>',\n    'table-left-header': '<svg width=\"24\" height=\"24\"><path d=\"M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14Zm0 9h-4v5h4v-5Zm-6 0H9v5h4v-5Zm0-7H9v5h4V6Zm6 0h-4v5h4V6Z\"/></svg>',\n    'table-merge-cells': '<svg width=\"24\" height=\"24\"><path fill-rule=\"nonzero\" d=\"M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-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>',\n    'table-row-numbering-rtl': '<svg width=\"24\" height=\"24\"><path d=\"M6 4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2h12a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2H6Zm0 12h8v3H6v-3Zm11 0c.6 0 1 .4 1 1v1a1 1 0 0 1-2 0v-1c0-.6.4-1 1-1ZM6 11h8v3H6v-3Zm11 0c.6 0 1 .4 1 1v1a1 1 0 0 1-2 0v-1c0-.6.4-1 1-1ZM6 6h8v3H6V6Zm11 0c.6 0 1 .4 1 1v1a1 1 0 1 1-2 0V7c0-.6.4-1 1-1Z\"/></svg>',\n    'table-row-numbering': '<svg width=\"24\" height=\"24\"><path d=\"M18 4a2 2 0 0 1 2 2v13a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h12Zm0 12h-8v3h8v-3ZM7 16a1 1 0 0 0-1 1v1a1 1 0 0 0 2 0v-1c0-.6-.4-1-1-1Zm11-5h-8v3h8v-3ZM7 11a1 1 0 0 0-1 1v1a1 1 0 0 0 2 0v-1c0-.6-.4-1-1-1Zm11-5h-8v3h8V6ZM7 6a1 1 0 0 0-1 1v1a1 1 0 1 0 2 0V7c0-.6-.4-1-1-1Z\"/></svg>',\n    'table-row-properties': '<svg width=\"24\" height=\"24\"><path fill-rule=\"nonzero\" d=\"M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14ZM5 15v3h6v-3H5Zm14 0h-6v3h6v-3Zm0-9h-6v3h6V6ZM5 9h6V6H5v3Z\"/></svg>',\n    'table-split-cells': '<svg width=\"24\" height=\"24\"><path fill-rule=\"nonzero\" d=\"M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14ZM8 15.5H5V18h3v-2.5Zm11-5h-9V18h9v-7.5Zm-2.5 1 1 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>',\n    'table-top-header': '<svg width=\"24\" height=\"24\"><path d=\"M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14Zm-8 11H5v3h6v-3Zm8 0h-6v3h6v-3Zm0-5h-6v3h6v-3ZM5 13h6v-3H5v3Z\"/></svg>',\n    'table': '<svg width=\"24\" height=\"24\"><path fill-rule=\"nonzero\" d=\"M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14ZM5 14v4h6v-4H5Zm14 0h-6v4h6v-4Zm0-6h-6v4h6V8ZM5 12h6V8H5v4Z\"/></svg>',\n    'template-add': '<svg width=\"24\" height=\"24\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M9 12v4H5a2 2 0 0 0-2 2v3h9.3a6 6 0 0 1-.3-2H5v-1h7a6 6 0 0 1 .8-2H11v-5l-.8-.6a3 3 0 1 1 3.6 0l-.8.6v4.7a6 6 0 0 1 2-1.9V12a5 5 0 1 0-6 0Z\"/><path d=\"M18 15c.5 0 1 .4 1 .9V18h2a1 1 0 0 1 .1 2H19v2a1 1 0 0 1-2 .1V20h-2a1 1 0 0 1-.1-2H17v-2c0-.6.4-1 1-1Z\"/></svg>',\n    'template': '<svg width=\"24\" height=\"24\"><path d=\"M19 19v-1H5v1h14ZM9 16v-4a5 5 0 1 1 6 0v4h4a2 2 0 0 1 2 2v3H3v-3c0-1.1.9-2 2-2h4Zm4 0v-5l.8-.6a3 3 0 1 0-3.6 0l.8.6v5h2Z\" fill-rule=\"nonzero\"/></svg>',\n    'temporary-placeholder': '<svg width=\"24\" height=\"24\"><g fill-rule=\"evenodd\"><path d=\"M9 7.6V6h2.5V4.5a.5.5 0 1 1 1 0V6H15v1.6a8 8 0 1 1-6 0Zm-2.6 5.3a.5.5 0 0 0 .3.6c.3 0 .6 0 .6-.3l.1-.2a5 5 0 0 1 3.3-2.8c.3-.1.4-.4.4-.6-.1-.3-.4-.5-.6-.4a6 6 0 0 0-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>',\n    'text-color': '<svg width=\"24\" height=\"24\"><g fill-rule=\"evenodd\"><path class=\"tox-icon-text-color__color\" d=\"M3 18h18v3H3z\"/><path d=\"M8.7 16h-.8a.5.5 0 0 1-.5-.6l2.7-9c.1-.3.3-.4.5-.4h2.8c.2 0 .4.1.5.4l2.7 9a.5.5 0 0 1-.5.6h-.8a.5.5 0 0 1-.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.6-.6 2a.5.5 0 0 0 .5.6h1.6a.5.5 0 0 0 .5-.6l-.6-2c0-.3-.3-.4-.5-.4h-.4c-.2 0-.4.1-.5.4Z\"/></g></svg>',\n    'text-size-decrease': '<svg width=\"24\" height=\"24\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M14 5a1 1 0 1 1 0 2h-4v11a1 1 0 1 1-2 0V7H4a1 1 0 0 1 0-2h10ZM14 12a1 1 0 1 0 0 2h6a1 1 0 1 0 0-2h-6Z\"/></svg>',\n    'text-size-increase': '<svg width=\"24\" height=\"24\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M14 5a1 1 0 1 1 0 2h-4v11a1 1 0 1 1-2 0V7H4a1 1 0 0 1 0-2h10ZM17 9a1 1 0 0 0-1 1v2h-2a1 1 0 1 0 0 2h2v2a1 1 0 1 0 2 0v-2h2a1 1 0 1 0 0-2h-2v-2c0-.6-.4-1-1-1Z\"/></svg>',\n    'toc': '<svg width=\"24\" height=\"24\"><path d=\"M5 5c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 1 1 0-2Zm3 0h11c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 1 1 0-2Zm-3 8c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2Zm3 0h11c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 0 1 0-2Zm0-4c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 1 1 0-2Zm3 0h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm-3 8c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2Zm3 0h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Z\" fill-rule=\"evenodd\"/></svg>',\n    'transform-image': '<svg height=\"24\" width=\"24\"><path d=\"M3 21v-6h2V9H3V3h6v2h6V3h6v6h-2v6h2v6h-6v-2H9v2zm6-4h6v-2h2V9h-2V7H9v2H7v6h2zM5 7h2V5H5zm12 0h2V5h-2zm0 12h2v-2h-2zM5 19h2v-2H5z\"/></svg>',\n    'translate': '<svg width=\"24\" height=\"24\"><path d=\"m12.7 14.3-.3.7-.4.7-2.2-2.2-3.1 3c-.3.4-.8.4-1 0a.7.7 0 0 1 0-1l3.1-3A12.4 12.4 0 0 1 6.7 9H8a10.1 10.1 0 0 0 1.7 2.4c.5-.5 1-1.1 1.4-1.8l.9-2H4.7a.7.7 0 1 1 0-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 0 1-1 2.4 13.5 13.5 0 0 1-1.7 2.3l1.9 1.8Zm4.3-3 2.7 7.3a.5.5 0 0 1-.4.7 1 1 0 0 1-1-.7l-.6-1.5h-3.4l-.6 1.5a1 1 0 0 1-1 .7.5.5 0 0 1-.4-.7l2.7-7.4a1 1 0 0 1 2 0Zm-2.2 4.4h2.4L16 12.5l-1.2 3.2Z\" fill-rule=\"evenodd\"/></svg>',\n    'typography': '<svg width=\"24\" height=\"24\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M17 5a1 1 0 1 1 0 2h-4v11a1 1 0 1 1-2 0V7H7a1 1 0 0 1 0-2h10Z\"/><path d=\"m17.5 14 .8-1.7 1.7-.8-1.7-.8-.8-1.7-.8 1.7-1.7.8 1.7.8.8 1.7ZM7 14l1 2 2 1-2 1-1 2-1-2-2-1 2-1 1-2Z\"/></svg>',\n    'underline': '<svg width=\"24\" height=\"24\"><path d=\"M16 5c.6 0 1 .4 1 1v5.5a4 4 0 0 1-.4 1.8l-1 1.4a5.3 5.3 0 0 1-5.5 1 5 5 0 0 1-1.6-1c-.5-.4-.8-.9-1.1-1.4a4 4 0 0 1-.4-1.8V6c0-.6.4-1 1-1s1 .4 1 1v5.5c0 .3 0 .6.2 1l.6.7a3.3 3.3 0 0 0 2.2.8 3.4 3.4 0 0 0 2.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 0 1 0-2Z\" fill-rule=\"evenodd\"/></svg>',\n    '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.8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v-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>',\n    'unordered-list': '<svg width=\"24\" height=\"24\"><path d=\"M11 5h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm0 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm0 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-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>',\n    'unpin': '<svg width=\"24\" height=\"24\"><path fill-rule=\"evenodd\" d=\"M21 19.6 19.7 21l-5-5H13v5h-2v-5H6a1 1 0 0 1-1-1.4l2.4-5.8-.1-.2H6a1 1 0 0 1-1-1V6.5l-2-2L4.4 3 21 19.6ZM7.5 14h5.1L9 10.4 7.5 14Z\"/><path d=\"M18 3a1 1 0 0 1 1 1v3.6a1 1 0 0 1-1 1h-1.5l2.4 6a1 1 0 0 1 0 .2L15.4 11l-1.2-3a1 1 0 0 1 .9-1.4h2V5H9.2l-2-2H18Z\"/></svg>',\n    'unselected': '<svg width=\"24\" height=\"24\"><path fill-rule=\"nonzero\" d=\"M6 4h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2Zm0 1a1 1 0 0 0-1 1v12c0 .6.4 1 1 1h12c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H6Z\"/></svg>',\n    'upload-from-device': '<svg width=\"24\" height=\"24\"><path d=\"M11 18.7c0 .6.4 1 1 1s1-.4 1-1v-3l1.5.8a1 1 0 0 0 1.3-.2 1 1 0 0 0-.3-1.4L12 12.6 8.5 15a1 1 0 0 0-.3 1.4c.3.4.9.5 1.3.2l1.5-.9v3.1Z\"/><path d=\"M9.6 4a1 1 0 0 1 .8.4l1.3 2h6.7A2.6 2.6 0 0 1 21 8.8v8.2a2.6 2.6 0 0 1-2.6 2.6H16v-2h2.4a.6.6 0 0 0 .6-.6V9a.6.6 0 0 0-.6-.6h-7.2a1 1 0 0 1-.8-.4L9 5.9H5.6a.6.6 0 0 0-.6.6v10.6a.6.6 0 0 0 .6.6H8v2H5.6A2.6 2.6 0 0 1 3 17.1V6.5A2.6 2.6 0 0 1 5.6 4h4Z\"/></svg>',\n    'upload-from-link': '<svg height=\"24\" width=\"24\"><path d=\"M11.9 5.1a4 4 0 0 1 5.5 5.6l-.8.8a1 1 0 0 1-1.4-1.4l.8-.8a2 2 0 0 0-2.7-2.7l-2.4 2.3a3 3 0 0 0-.8 3 1 1 0 0 1-2 .4 5 5 0 0 1 1.4-4.8zm8.7 10.5a1 1 0 0 1-1.2 1.5l-1.4-1V19a1 1 0 0 1-2 0v-3l-1.4 1.1a1 1 0 0 1-1.2-1.5l3.6-2.9 3.6 2.9z\"/><path d=\"M9.7 18.9A4 4 0 0 1 4 13.3l.8-.8A1 1 0 0 1 6.3 14l-.7.8a2 2 0 0 0 0 2.7c.7.8 2.1.9 2.9.1L11 15c.8-.8.7-1.8.5-2.8a1 1 0 0 1 1.9-.5 5 5 0 0 1-1.3 4.8z\"/></svg>',\n    'upload': '<svg width=\"24\" height=\"24\"><path d=\"M18 19v-2a1 1 0 0 1 2 0v3c0 .6-.4 1-1 1H5a1 1 0 0 1-1-1v-3a1 1 0 0 1 2 0v2h12ZM11 6.4 8.7 8.7a1 1 0 0 1-1.4-1.4l4-4a1 1 0 0 1 1.4 0l4 4a1 1 0 1 1-1.4 1.4L13 6.4V16a1 1 0 0 1-2 0V6.4Z\" fill-rule=\"nonzero\"/></svg>',\n    'user': '<svg width=\"24\" height=\"24\"><path d=\"M12 24a12 12 0 1 1 0-24 12 12 0 0 1 0 24Zm-8.7-5.3a11 11 0 0 0 17.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>',\n    '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 0 1 1.2 1.5l-.1.1-4.1 3-4-3a1 1 0 0 1 1-1.7l2 1.5V3c0-.6.4-1 1-1zm0 11.8 4 2.9a1 1 0 0 1-1 1.7l-2-1.5V21c0 .5-.4 1-.9 1H12a1 1 0 0 1-1-1v-4l-2 1.3a1 1 0 0 1-1.2-.1l-.1-.1a1 1 0 0 1 .1-1.3l.1-.1 4.1-3z\"/></g></svg>',\n    'vibrance': '<svg height=\"24\" width=\"24\"><path d=\"M12 20 22 4H2zm2.6-8 1.3-2H8l1.3 2h5.2zm-1.2 2h-2.8l1.4 2.2zm5-8L17 8H7L5.6 6h12.8z\" fill-rule=\"evenodd\"/></svg>',\n    'visualblocks': '<svg width=\"24\" height=\"24\"><path d=\"M9 19v2H7v-2h2Zm-4 0v2a2 2 0 0 1-2-2h2Zm8 0v2h-2v-2h2Zm8 0a2 2 0 0 1-2 2v-2h2Zm-4 0v2h-2v-2h2ZM15 7a1 1 0 0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8.5 0 0 1-.8 2l-1.3 2-.3.3a10.5 10.5 0 0 1 2.8 3.8h-2.6l-.8-.9a20.6 20.6 0 0 0-.3-.3Z\" clip-rule=\"evenodd\"/></svg>',\n    'warmth': '<svg height=\"24\" width=\"24\"><path d=\"M12 21.1c-1.4 0-2.6-.5-3.6-1.5s-1.5-2.1-1.5-3.5c0-.8.2-1.6.6-2.2A5 5 0 0 1 8.9 12v-6c0-.8.3-1.5 1-2.1a2.9 2.9 0 0 1 2-.9c.9 0 1.6.3 2.2.9.5.6.8 1.3.8 2.1v6a5 5 0 0 1 1.5 1.8A4.9 4.9 0 0 1 17 16c0 1.4-.5 2.6-1.4 3.5s-2.2 1.5-3.6 1.5zm-3-5h6c0-.5-.2-1-.4-1.4a3 3 0 0 0-.9-1l-.8-.6v-7a1 1 0 0 0-.3-.7A1 1 0 0 0 12 5a1 1 0 0 0-.7.3 1 1 0 0 0-.3.7v7l-.8.6a2.9 2.9 0 0 0-.9 1 3 3 0 0 0-.3 1.4z\"/></svg>',\n    '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 0 0-.3-.7 1 1 0 0 0-.7-.3 1 1 0 0 0-.7.3 1 1 0 0 0-.3.7c0 .3.1.5.3.7.2.2.4.3.7.3Zm.7-3 .3-4a1 1 0 0 0-.3-.7 1 1 0 0 0-.7-.3 1 1 0 0 0-.7.3 1 1 0 0 0-.3.7l.3 4h1.4Z\" fill-rule=\"evenodd\"/></svg>',\n    'web-search': '<svg width=\"24\" height=\"24\"><path fill-rule=\"evenodd\" d=\"M12 3a9 9 0 1 1 0 18 9 9 0 0 1 0-18ZM5 13a7 7 0 0 0 4.8 5.6l-.2-.2A13.3 13.3 0 0 1 8 13H5Zm11 0a13.3 13.3 0 0 1-1.6 5.3c0 .2-.1.2-.2.3A7 7 0 0 0 19 13h-3Zm-6 0a11.3 11.3 0 0 0 1.4 4.4l.6 1 .6-1A11.3 11.3 0 0 0 14 13h-4Zm-.2-7.6A7 7 0 0 0 5 11h3a13.3 13.3 0 0 1 1.5-5.3l.2-.3Zm2.2.2a11.3 11.3 0 0 0-2 5.4h4a11.3 11.3 0 0 0-2-5.4Zm2.4 0A13.3 13.3 0 0 1 16 11h3a7 7 0 0 0-4.8-5.6l.2.3Z\"/></svg>',\n    'welcome-action-adjust-length': '<svg width=\"16\" height=\"16\"><path d=\"M9.4 4.6a1.6 1.6 0 0 0 1 1.5h.2l.8.8v.2l.1.1v2.2h-1.4V5.9H8.7v3.5H7.3V5.9H5.9v3.5H4.5V5.9H2.4v6.2h11.2V7.8a1.6 1.6 0 0 0 .7-.6V7h.1V7a1.5 1.5 0 0 1 .6-.8v6c0 .3-.1.6-.4.9a1.4 1.4 0 0 1-1 .4H2.4a1.4 1.4 0 0 1-1-.4 1.3 1.3 0 0 1-.4-1V6c0-.3.1-.7.4-1a1.4 1.4 0 0 1 1-.3h7Z\"/><path d=\"M12.7 2.7a.2.2 0 0 1 .4 0c.3.7 1 1.4 1.7 1.6.3.1.3.4 0 .5h-.1a3 3 0 0 0-1 .8l-.6.9a.2.2 0 0 1-.4 0 2.8 2.8 0 0 0-.4-.7 2.9 2.9 0 0 0-1.2-1H11a.2.2 0 0 1 0-.5 2.9 2.9 0 0 0 1.7-1.6Z\"/></svg>',\n    'welcome-action-ai-translate': '<svg height=\"16\" width=\"16\"><path d=\"M15 15h-1.5l-.7-2.1H9.4L8.6 15H7.2l3.2-8.4h1.4zm-5.2-3.4h2.5l-1.2-3.5z\" fill-rule=\"evenodd\"/><path d=\"M5.8 2.4h3.6s-.5 1.8-1.8 4l-1.5 2 1.7 1.7-.6 1.3-2-2L2 12.5l-1-1 3.2-3.1L3 7a12.1 12.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z\"/></svg>',\n    'welcome-action-continue-writing': '<svg height=\"17\" width=\"16\"><path d=\"M13.3 10.3a1 1 0 0 1 .8.3l.6.6.2.4a1 1 0 0 1 .1.4v.4a1 1 0 0 1-.3.3l-3.8 3.8H8.7v-2.1l3.9-3.8a1 1 0 0 1 .3-.2l.4-.1zm-3.5 4.5v.7h.6l2.8-2.8-.6-.7-2.9 2.8z\" fill-rule=\"evenodd\"/><path d=\"M6.6 9.4H1V8h5.6zm2.8-2.8H1V5.3h8.4zm0-2.7H1V2.5h8.4zm2.9-1.2c0-.3.4-.3.5 0 .3.8 1 1.5 1.8 1.8a.3.3 0 0 1 0 .5h-.1a3.1 3.1 0 0 0-1.7 1.8.3.3 0 0 1-.5 0A3.1 3.1 0 0 0 10.6 5h-.1a.3.3 0 0 1 0-.5 3.1 3.1 0 0 0 1.8-1.8z\"/></svg>',\n    'welcome-action-explain': '<svg height=\"16\" width=\"16\"><path d=\"M8 1.8c1.5 0 2.7 1.2 2.7 2.7 0 .7-.3 1.3-.7 1.8a4.5 4.5 0 0 1 1.2.8c.7 0 1.4 0 2.3.2.3 0 .5.3.6.6v5.4a.7.7 0 0 1-.3.5.7.7 0 0 1-.5.2c-1-.2-1.7-.2-2.5 0-.7 0-1.4.4-2.5 1a.7.7 0 0 1-.5 0c-1.1-.6-1.9-1-2.6-1-.7-.2-1.4-.2-2.4 0a.7.7 0 0 1-.6-.2.7.7 0 0 1-.2-.5V7.9a.7.7 0 0 1 .6-.6C3.4 7 4.2 7 4.9 7A4.6 4.6 0 0 1 6 6.3a2.7 2.7 0 0 1-.7-1.8C5.4 3 6.6 1.7 8 1.7zM5.3 8.6c-.6-.2-1.2-.2-2 0v4a7.6 7.6 0 0 1 4 .6V9.4c-.7-.4-1.4-.7-2-.8zm7.4 0a5.7 5.7 0 0 0-4 .8v3.8l1.9-.6h2.1v-4zM8 7.1a3 3 0 0 0-1.4.3l1.4.7a12 12 0 0 1 1.5-.7A3 3 0 0 0 8 7.2zm0-4c-.7 0-1.3.5-1.3 1.3S7.3 5.8 8 5.8s1.4-.6 1.4-1.3C9.4 3.7 8.8 3 8 3z\" fill-rule=\"evenodd\"/><path d=\"M12.8 1.2a.2.2 0 0 1 .4 0c.3.7.9 1.3 1.6 1.6a.2.2 0 0 1 0 .5A2.8 2.8 0 0 0 13.1 5a.2.2 0 0 1-.4 0 2.8 2.8 0 0 0-1.5-1.6H11a.2.2 0 0 1 0-.5 2.8 2.8 0 0 0 1.7-1.6z\"/></svg>',\n    'welcome-action-fix-grammar': '<svg height=\"16\" width=\"16\"><path d=\"m15 10.3-5.3 5.2-3.3-3.2 1.1-1 2.2 2.1 4.2-4.2 1.1 1z\"/><path d=\"M10.1 11.2H8.4l-.9-2.5h-4l-.8 2.5H1l3.7-9.7h1.7l3.7 9.7zm-6-3.9h3l-1.5-4h-.1z\" fill-rule=\"evenodd\"/><path d=\"M12.3 1.7c0-.3.4-.3.5 0 .3.8 1 1.5 1.8 1.8a.3.3 0 0 1 0 .5h-.1a3.1 3.1 0 0 0-1.7 1.8.3.3 0 0 1-.5 0A3.1 3.1 0 0 0 10.6 4h-.1a.3.3 0 0 1 0-.5 3.1 3.1 0 0 0 1.8-1.8z\"/></svg>',\n    'welcome-action-highlight-key-points': '<svg height=\"16\" width=\"16\"><path d=\"M8 1c1 0 1.8.2 2.6.5h-.1a1.6 1.6 0 0 0-1 1.1 5.6 5.6 0 1 0 3.9 4c.4-.2.7-.4 1-.8v-.2l.1-.2A7 7 0 1 1 8 1z\"/><path d=\"M8 7.3a.7.7 0 0 1 .8.7.7.7 0 0 1-.7.8H8a.7.7 0 0 1-.7-.8.7.7 0 0 1 .7-.7z\"/><path d=\"M8 4.2a3.9 3.9 0 1 1 0 7.7 3.9 3.9 0 0 1 0-7.7zm0 1.4a2.5 2.5 0 1 0 0 4.9 2.5 2.5 0 0 0 0-5z\" fill-rule=\"evenodd\"/><path d=\"M12.7 1.2a.2.2 0 0 1 .4 0 2.9 2.9 0 0 0 1.7 1.7c.3 0 .3.3 0 .4h-.1A2.9 2.9 0 0 0 13.1 5a.2.2 0 0 1-.4 0A2.9 2.9 0 0 0 11 3.4H11a.2.2 0 0 1-.2-.3.3.3 0 0 1 0-.1.2.2 0 0 1 .1-.1h.1a3 3 0 0 0 .2-.1 3 3 0 0 0 1.5-1.6z\"/></svg>',\n    'welcome-action-improve-writing': '<svg height=\"16\" width=\"16\"><path d=\"M10 3a3 3 0 0 0-2.1 1L4 7.7a.6.6 0 0 0-.1.4v3.2l5.5-5.8.5.5.5.5-3.1 3.2h3.2l1.5-1.5c.3-.4.6-.8.7-1.2l1.3.4a4.6 4.6 0 0 1-1 1.8l-3.8 4a1.9 1.9 0 0 1-1.3.5H3.6L2 15.5l-.9-1 1.7-1.7a1.4 1.4 0 0 1 0-.4V8.3c0-.5.1-1 .5-1.4l3.7-4a4.2 4.2 0 0 1 3-1.2zm-5 9.4h3a.5.5 0 0 0 .4-.2l.9-1H6z\" fill-rule=\"evenodd\"/><path d=\"M12.8 1.7a.2.2 0 0 1 .4 0c.3.8.9 1.4 1.6 1.7.3 0 .3.4 0 .4V4a2.9 2.9 0 0 0-1.6 1.7.2.2 0 0 1-.4 0 2.9 2.9 0 0 0-1.6-1.7h-.1c-.2-.1-.2-.4 0-.5a2.9 2.9 0 0 0 1.7-1.7z\"/></svg>',\n    'welcome-action-other-actions': '<svg width=\"16\" height=\"16\"><path d=\"M4.1 15A3 3 0 0 1 2 14 3 3 0 0 1 1 12a3 3 0 0 1 1-2.2 3 3 0 0 1 2.1-1 3 3 0 0 1 2.2 1 3 3 0 0 1 1 2.2 3 3 0 0 1-1 2.2 3 3 0 0 1-2.2.9Zm0-1.6c.4 0 .8-.1 1.1-.4a1.5 1.5 0 0 0 .5-1.1 1.5 1.5 0 0 0-.5-1.1 1.5 1.5 0 0 0-1-.5c-.5 0-.9.2-1.2.5a1.5 1.5 0 0 0-.4 1c0 .5.1.9.4 1.2.3.3.7.4 1.1.4ZM12 15a3 3 0 0 1-2.2-1 3 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6-.7s.3-.7.6-.7zm0-2.8c.4 0 .7.3.7.7s-.3.7-.7.7h-5c-.3 0-.6-.3-.6-.7S5 8 5.3 8zm2.5-6.8a.2.2 0 0 1 .4 0c.3.8.9 1.4 1.7 1.7.2 0 .2.3 0 .4h-.2a2.8 2.8 0 0 0-1 1 3 3 0 0 0-.5.7v.1H13a.2.2 0 0 1 0 .1.2.2 0 0 1-.2 0 .2.2 0 0 1-.1-.1 2.8 2.8 0 0 0-1.5-1.7h-.1c-.2-.2-.2-.4 0-.5a2.8 2.8 0 0 0 1.6-1.7z\"/></svg>',\n    'zoom-in': '<svg width=\"24\" height=\"24\"><path d=\"M16 17.3a8 8 0 1 1 1.4-1.4l4.3 4.4a1 1 0 0 1-1.4 1.4l-4.4-4.3Zm-5-.3a6 6 0 1 0 0-12 6 6 0 0 0 0 12Zm-1-9a1 1 0 0 1 2 0v6a1 1 0 0 1-2 0V8Zm-2 4a1 1 0 0 1 0-2h6a1 1 0 0 1 0 2H8Z\" fill-rule=\"nonzero\"/></svg>',\n    'zoom-out': '<svg width=\"24\" height=\"24\"><path d=\"M16 17.3a8 8 0 1 1 1.4-1.4l4.3 4.4a1 1 0 0 1-1.4 1.4l-4.4-4.3Zm-5-.3a6 6 0 1 0 0-12 6 6 0 0 0 0 12Zm-3-5a1 1 0 0 1 0-2h6a1 1 0 0 1 0 2H8Z\" fill-rule=\"nonzero\"/></svg>',\n  }\n});", "/**\n * TinyMCE version 8.10.0 (2026-10-14)\n */\n\n(function () {\n    'use strict';\n\n    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');\n\n    const get = (editor) => ({\n        backspaceDelete: (isForward) => {\n            editor.execCommand('mceListBackspaceDelete', false, isForward);\n        }\n    });\n\n    /* eslint-disable @typescript-eslint/no-wrapper-object-types */\n    const isSimpleType = (type) => (value) => typeof value === type;\n    const isNullable = (a) => a === null || a === undefined;\n    const isNonNullable = (a) => !isNullable(a);\n    const isFunction = isSimpleType('function');\n\n    const constant = (value) => {\n        return () => {\n            return value;\n        };\n    };\n    const tripleEquals = (a, b) => {\n        return a === b;\n    };\n    const never = constant(false);\n\n    /**\n     * The `Optional` type represents a value (of any type) that potentially does\n     * not exist. Any `Optional<T>` can either be a `Some<T>` (in which case the\n     * value does exist) or a `None` (in which case the value does not exist). This\n     * module defines a whole lot of FP-inspired utility functions for dealing with\n     * `Optional` objects.\n     *\n     * Comparison with null or undefined:\n     * - We don't get fancy null coalescing operators with `Optional`\n     * - We do get fancy helper functions with `Optional`\n     * - `Optional` support nesting, and allow for the type to still be nullable (or\n     * another `Optional`)\n     * - There is no option to turn off strict-optional-checks like there is for\n     * strict-null-checks\n     */\n    class Optional {\n        tag;\n        value;\n        // Sneaky optimisation: every instance of Optional.none is identical, so just\n        // reuse the same object\n        static singletonNone = new Optional(false);\n        // The internal representation has a `tag` and a `value`, but both are\n        // private: able to be console.logged, but not able to be accessed by code\n        constructor(tag, value) {\n            this.tag = tag;\n            this.value = value;\n        }\n        // --- Identities ---\n        /**\n         * Creates a new `Optional<T>` that **does** contain a value.\n         */\n        static some(value) {\n            return new Optional(true, value);\n        }\n        /**\n         * Create a new `Optional<T>` that **does not** contain a value. `T` can be\n         * any type because we don't actually have a `T`.\n         */\n        static none() {\n            return Optional.singletonNone;\n        }\n        /**\n         * Perform a transform on an `Optional` type. Regardless of whether this\n         * `Optional` contains a value or not, `fold` will return a value of type `U`.\n         * If this `Optional` does not contain a value, the `U` will be created by\n         * calling `onNone`. If this `Optional` does contain a value, the `U` will be\n         * created by calling `onSome`.\n         *\n         * For the FP enthusiasts in the room, this function:\n         * 1. Could be used to implement all of the functions below\n         * 2. Forms a catamorphism\n         */\n        fold(onNone, onSome) {\n            if (this.tag) {\n                return onSome(this.value);\n            }\n            else {\n                return onNone();\n            }\n        }\n        /**\n         * Determine if this `Optional` object contains a value.\n         */\n        isSome() {\n            return this.tag;\n        }\n        /**\n         * Determine if this `Optional` object **does not** contain a value.\n         */\n        isNone() {\n            return !this.tag;\n        }\n        // --- Functor (name stolen from Haskell / maths) ---\n        /**\n         * Perform a transform on an `Optional` object, **if** there is a value. If\n         * you provide a function to turn a T into a U, this is the function you use\n         * to turn an `Optional<T>` into an `Optional<U>`. If this **does** contain\n         * a value then the output will also contain a value (that value being the\n         * output of `mapper(this.value)`), and if this **does not** contain a value\n         * then neither will the output.\n         */\n        map(mapper) {\n            if (this.tag) {\n                return Optional.some(mapper(this.value));\n            }\n            else {\n                return Optional.none();\n            }\n        }\n        // --- Monad (name stolen from Haskell / maths) ---\n        /**\n         * Perform a transform on an `Optional` object, **if** there is a value.\n         * Unlike `map`, here the transform itself also returns an `Optional`.\n         */\n        bind(binder) {\n            if (this.tag) {\n                return binder(this.value);\n            }\n            else {\n                return Optional.none();\n            }\n        }\n        // --- Traversable (name stolen from Haskell / maths) ---\n        /**\n         * For a given predicate, this function finds out if there **exists** a value\n         * inside this `Optional` object that meets the predicate. In practice, this\n         * means that for `Optional`s that do not contain a value it returns false (as\n         * no predicate-meeting value exists).\n         */\n        exists(predicate) {\n            return this.tag && predicate(this.value);\n        }\n        /**\n         * For a given predicate, this function finds out if **all** the values inside\n         * this `Optional` object meet the predicate. In practice, this means that\n         * for `Optional`s that do not contain a value it returns true (as all 0\n         * objects do meet the predicate).\n         */\n        forall(predicate) {\n            return !this.tag || predicate(this.value);\n        }\n        filter(predicate) {\n            if (!this.tag || predicate(this.value)) {\n                return this;\n            }\n            else {\n                return Optional.none();\n            }\n        }\n        // --- Getters ---\n        /**\n         * Get the value out of the inside of the `Optional` object, using a default\n         * `replacement` value if the provided `Optional` object does not contain a\n         * value.\n         */\n        getOr(replacement) {\n            return this.tag ? this.value : replacement;\n        }\n        /**\n         * Get the value out of the inside of the `Optional` object, using a default\n         * `replacement` value if the provided `Optional` object does not contain a\n         * value.  Unlike `getOr`, in this method the `replacement` object is also\n         * `Optional` - meaning that this method will always return an `Optional`.\n         */\n        or(replacement) {\n            return this.tag ? this : replacement;\n        }\n        /**\n         * Get the value out of the inside of the `Optional` object, using a default\n         * `replacement` value if the provided `Optional` object does not contain a\n         * value. Unlike `getOr`, in this method the `replacement` value is\n         * \"thunked\" - that is to say that you don't pass a value to `getOrThunk`, you\n         * pass a function which (if called) will **return** the `value` you want to\n         * use.\n         */\n        getOrThunk(thunk) {\n            return this.tag ? this.value : thunk();\n        }\n        /**\n         * Get the value out of the inside of the `Optional` object, using a default\n         * `replacement` value if the provided Optional object does not contain a\n         * value.\n         *\n         * Unlike `or`, in this method the `replacement` value is \"thunked\" - that is\n         * to say that you don't pass a value to `orThunk`, you pass a function which\n         * (if called) will **return** the `value` you want to use.\n         *\n         * Unlike `getOrThunk`, in this method the `replacement` value is also\n         * `Optional`, meaning that this method will always return an `Optional`.\n         */\n        orThunk(thunk) {\n            return this.tag ? this : thunk();\n        }\n        /**\n         * Get the value out of the inside of the `Optional` object, throwing an\n         * exception if the provided `Optional` object does not contain a value.\n         *\n         * WARNING:\n         * You should only be using this function if you know that the `Optional`\n         * object **is not** empty (otherwise you're throwing exceptions in production\n         * code, which is bad).\n         *\n         * In tests this is more acceptable.\n         *\n         * Prefer other methods to this, such as `.each`.\n         */\n        getOrDie(message) {\n            if (!this.tag) {\n                throw new Error(message ?? 'Called getOrDie on None');\n            }\n            else {\n                return this.value;\n            }\n        }\n        // --- Interop with null and undefined ---\n        /**\n         * Creates an `Optional` value from a nullable (or undefined-able) input.\n         * Null, or undefined, is converted to `None`, and anything else is converted\n         * to `Some`.\n         */\n        static from(value) {\n            return isNonNullable(value) ? Optional.some(value) : Optional.none();\n        }\n        /**\n         * Converts an `Optional` to a nullable type, by getting the value if it\n         * exists, or returning `null` if it does not.\n         */\n        getOrNull() {\n            return this.tag ? this.value : null;\n        }\n        /**\n         * Converts an `Optional` to an undefined-able type, by getting the value if\n         * it exists, or returning `undefined` if it does not.\n         */\n        getOrUndefined() {\n            return this.value;\n        }\n        // --- Utilities ---\n        /**\n         * If the `Optional` contains a value, perform an action on that value.\n         * Unlike the rest of the methods on this type, `.each` has side-effects. If\n         * you want to transform an `Optional<T>` **into** something, then this is not\n         * the method for you. If you want to use an `Optional<T>` to **do**\n         * something, then this is the method for you - provided you're okay with not\n         * doing anything in the case where the `Optional` doesn't have a value inside\n         * it. If you're not sure whether your use-case fits into transforming\n         * **into** something or **doing** something, check whether it has a return\n         * value. If it does, you should be performing a transform.\n         */\n        each(worker) {\n            if (this.tag) {\n                worker(this.value);\n            }\n        }\n        /**\n         * Turn the `Optional` object into an array that contains all of the values\n         * stored inside the `Optional`. In practice, this means the output will have\n         * either 0 or 1 elements.\n         */\n        toArray() {\n            return this.tag ? [this.value] : [];\n        }\n        /**\n         * Turn the `Optional` object into a string for debugging or printing. Not\n         * recommended for production code, but good for debugging. Also note that\n         * these days an `Optional` object can be logged to the console directly, and\n         * its inner value (if it exists) will be visible.\n         */\n        toString() {\n            return this.tag ? `some(${this.value})` : 'none()';\n        }\n    }\n\n    const nativeSlice = Array.prototype.slice;\n    const exists = (xs, pred) => {\n        for (let i = 0, len = xs.length; i < len; i++) {\n            const x = xs[i];\n            if (pred(x, i)) {\n                return true;\n            }\n        }\n        return false;\n    };\n    const map = (xs, f) => {\n        // pre-allocating array size when it's guaranteed to be known\n        // http://jsperf.com/push-allocated-vs-dynamic/22\n        const len = xs.length;\n        const r = new Array(len);\n        for (let i = 0; i < len; i++) {\n            const x = xs[i];\n            r[i] = f(x, i);\n        }\n        return r;\n    };\n    // Unwound implementing other functions in terms of each.\n    // The code size is roughly the same, and it should allow for better optimisation.\n    // const each = function<T, U>(xs: T[], f: (x: T, i?: number, xs?: T[]) => void): void {\n    const each = (xs, f) => {\n        for (let i = 0, len = xs.length; i < len; i++) {\n            const x = xs[i];\n            f(x, i);\n        }\n    };\n    const foldl = (xs, f, acc) => {\n        each(xs, (x, i) => {\n            acc = f(acc, x, i);\n        });\n        return acc;\n    };\n    const findUntil = (xs, pred, until) => {\n        for (let i = 0, len = xs.length; i < len; i++) {\n            const x = xs[i];\n            if (pred(x, i)) {\n                return Optional.some(x);\n            }\n            else if (until(x, i)) {\n                break;\n            }\n        }\n        return Optional.none();\n    };\n    const find = (xs, pred) => {\n        return findUntil(xs, pred, never);\n    };\n    const reverse = (xs) => {\n        const r = nativeSlice.call(xs, 0);\n        r.reverse();\n        return r;\n    };\n    isFunction(Array.from) ? Array.from : (x) => nativeSlice.call(x);\n\n    /**\n     * **Is** the value stored inside this Optional object equal to `rhs`?\n     */\n    const is = (lhs, rhs, comparator = tripleEquals) => lhs.exists((left) => comparator(left, rhs));\n\n    const blank = (r) => (s) => s.replace(r, '');\n    /** removes all leading and trailing spaces */\n    const trim = blank(/^\\s+|\\s+$/g);\n    const isNotEmpty = (s) => s.length > 0;\n    const isEmpty = (s) => !isNotEmpty(s);\n\n    // Example: 'AB' -> 28\n    const parseAlphabeticBase26 = (str) => {\n        const chars = reverse(trim(str).split(''));\n        const values = map(chars, (char, i) => {\n            const charValue = char.toUpperCase().charCodeAt(0) - 'A'.charCodeAt(0) + 1;\n            return Math.pow(26, i) * charValue;\n        });\n        return foldl(values, (sum, v) => sum + v, 0);\n    };\n    // Example: 28 -> 'AB'\n    const composeAlphabeticBase26 = (value) => {\n        value--;\n        if (value < 0) {\n            return '';\n        }\n        else {\n            const remainder = value % 26;\n            const quotient = Math.floor(value / 26);\n            const rest = composeAlphabeticBase26(quotient);\n            const char = String.fromCharCode('A'.charCodeAt(0) + remainder);\n            return rest + char;\n        }\n    };\n    const isUppercase = (str) => /^[A-Z]+$/.test(str);\n    const isLowercase = (str) => /^[a-z]+$/.test(str);\n    const isNumeric = (str) => /^[0-9]+$/.test(str);\n    const deduceListType = (start) => {\n        if (isNumeric(start)) {\n            return 2 /* ListType.Numeric */;\n        }\n        else if (isUppercase(start)) {\n            return 0 /* ListType.UpperAlpha */;\n        }\n        else if (isLowercase(start)) {\n            return 1 /* ListType.LowerAlpha */;\n        }\n        else if (isEmpty(start)) {\n            return 3 /* ListType.None */;\n        }\n        else {\n            return 4 /* ListType.Unknown */;\n        }\n    };\n    const parseStartValue = (start) => {\n        switch (deduceListType(start)) {\n            case 2 /* ListType.Numeric */:\n                return Optional.some({\n                    listStyleType: Optional.none(),\n                    start\n                });\n            case 0 /* ListType.UpperAlpha */:\n                return Optional.some({\n                    listStyleType: Optional.some('upper-alpha'),\n                    start: parseAlphabeticBase26(start).toString()\n                });\n            case 1 /* ListType.LowerAlpha */:\n                return Optional.some({\n                    listStyleType: Optional.some('lower-alpha'),\n                    start: parseAlphabeticBase26(start).toString()\n                });\n            case 3 /* ListType.None */:\n                return Optional.some({\n                    listStyleType: Optional.none(),\n                    start: ''\n                });\n            case 4 /* ListType.Unknown */:\n                return Optional.none();\n        }\n    };\n    const parseDetail = (detail) => {\n        const start = parseInt(detail.start, 10);\n        if (is(detail.listStyleType, 'upper-alpha')) {\n            return composeAlphabeticBase26(start);\n        }\n        else if (is(detail.listStyleType, 'lower-alpha')) {\n            return composeAlphabeticBase26(start).toLowerCase();\n        }\n        else {\n            return detail.start;\n        }\n    };\n\n    const option = (name) => (editor) => editor.options.get(name);\n    const getForcedRootBlock = option('forced_root_block');\n\n    const isCustomList = (list) => /\\btox\\-/.test(list.className);\n    const matchNodeNames = (regex) => (node) => isNonNullable(node) && regex.test(node.nodeName);\n    const matchNodeName = (name) => (node) => isNonNullable(node) && node.nodeName.toLowerCase() === name;\n    const isListNode = matchNodeNames(/^(OL|UL|DL)$/);\n    const isTableCellNode = matchNodeNames(/^(TH|TD)$/);\n    const isListItemNode = matchNodeNames(/^(LI|DT|DD)$/);\n    const inList = (parents, listName) => findUntil(parents, isListNode, isTableCellNode)\n        .exists((list) => list.nodeName === listName && !isCustomList(list));\n    const setNodeChangeHandler = (editor, nodeChangeHandler) => {\n        const initialNode = editor.selection.getNode();\n        // Set the initial state\n        nodeChangeHandler({\n            parents: editor.dom.getParents(initialNode),\n            element: initialNode\n        });\n        editor.on('NodeChange', nodeChangeHandler);\n        return () => editor.off('NodeChange', nodeChangeHandler);\n    };\n    const isWithinNonEditable = (editor, element) => element !== null && !editor.dom.isEditable(element);\n    const isWithinNonEditableList = (editor, element) => {\n        const parentList = editor.dom.getParent(element, 'ol,ul,dl');\n        return isWithinNonEditable(editor, parentList) || !editor.selection.isEditable();\n    };\n    const isOlNode = matchNodeName('ol');\n    const listNames = ['OL', 'UL', 'DL'];\n    const listSelector = listNames.join(',');\n    const getParentList = (editor, node) => {\n        const selectionStart = node || editor.selection.getStart(true);\n        return editor.dom.getParent(selectionStart, listSelector, getClosestListHost(editor, selectionStart, editor.selection.isCollapsed()));\n    };\n    const getClosestListHost = (editor, elm, isCollapsed) => {\n        const parentBlocks = editor.dom.getParents(elm, editor.dom.isBlock);\n        const isNotForcedRootBlock = (elm) => elm.nodeName.toLowerCase() !== getForcedRootBlock(editor);\n        const parentBlock = find(parentBlocks, (elm) => (!isCollapsed || isNotForcedRootBlock(elm)) && isListHost(editor.schema, elm));\n        return parentBlock.getOr(editor.getBody());\n    };\n    const isListHost = (schema, node) => !isListNode(node) && !isListItemNode(node) && exists(listNames, (listName) => schema.isValidChild(node.nodeName, listName));\n\n    const open = (editor) => {\n        // Find the current list and skip opening if the selection isn't in an ordered list\n        const currentList = getParentList(editor);\n        if (!isOlNode(currentList) || isWithinNonEditableList(editor, currentList)) {\n            return;\n        }\n        editor.windowManager.open({\n            title: 'List Properties',\n            body: {\n                type: 'panel',\n                items: [\n                    {\n                        type: 'input',\n                        name: 'start',\n                        label: 'Start list at number',\n                        inputMode: 'numeric'\n                    }\n                ]\n            },\n            initialData: {\n                start: parseDetail({\n                    start: editor.dom.getAttrib(currentList, 'start', '1'),\n                    listStyleType: Optional.from(editor.dom.getStyle(currentList, 'list-style-type'))\n                })\n            },\n            buttons: [\n                {\n                    type: 'cancel',\n                    name: 'cancel',\n                    text: 'Cancel'\n                },\n                {\n                    type: 'submit',\n                    name: 'save',\n                    text: 'Save',\n                    primary: true\n                }\n            ],\n            onSubmit: (api) => {\n                const data = api.getData();\n                parseStartValue(data.start).each((detail) => {\n                    editor.execCommand('mceListUpdate', false, {\n                        attrs: {\n                            start: detail.start === '1' ? '' : detail.start\n                        },\n                        styles: {\n                            'list-style-type': detail.listStyleType.getOr('')\n                        }\n                    });\n                });\n                api.close();\n            }\n        });\n    };\n\n    const register$2 = (editor) => {\n        editor.addCommand('mceListProps', () => {\n            open(editor);\n        });\n    };\n\n    const setupToggleButtonHandler = (editor, listName) => (api) => {\n        const toggleButtonHandler = (e) => {\n            api.setActive(inList(e.parents, listName));\n            api.setEnabled(!isWithinNonEditableList(editor, e.element) && editor.selection.isEditable());\n        };\n        api.setEnabled(editor.selection.isEditable());\n        return setNodeChangeHandler(editor, toggleButtonHandler);\n    };\n    const register$1 = (editor) => {\n        const exec = (command) => () => editor.execCommand(command);\n        if (!editor.hasPlugin('advlist')) {\n            editor.ui.registry.addToggleButton('numlist', {\n                icon: 'ordered-list',\n                active: false,\n                tooltip: 'Numbered list',\n                onAction: exec('InsertOrderedList'),\n                onSetup: setupToggleButtonHandler(editor, 'OL')\n            });\n            editor.ui.registry.addToggleButton('bullist', {\n                icon: 'unordered-list',\n                active: false,\n                tooltip: 'Bullet list',\n                onAction: exec('InsertUnorderedList'),\n                onSetup: setupToggleButtonHandler(editor, 'UL')\n            });\n        }\n    };\n\n    const setupMenuButtonHandler = (editor, listName) => (api) => {\n        const menuButtonHandler = (e) => api.setEnabled(inList(e.parents, listName) && !isWithinNonEditableList(editor, e.element));\n        return setNodeChangeHandler(editor, menuButtonHandler);\n    };\n    const register = (editor) => {\n        const listProperties = {\n            text: 'List properties...',\n            icon: 'ordered-list',\n            onAction: () => editor.execCommand('mceListProps'),\n            onSetup: setupMenuButtonHandler(editor, 'OL')\n        };\n        editor.ui.registry.addMenuItem('listprops', listProperties);\n        editor.ui.registry.addContextMenu('lists', {\n            update: (node) => {\n                const parentList = getParentList(editor, node);\n                return isOlNode(parentList) ? ['listprops'] : [];\n            }\n        });\n    };\n\n    const PLUGIN_CODE = 'lists';\n    var Plugin = () => {\n        global.add(PLUGIN_CODE, (editor) => {\n            register$2(editor);\n            register$1(editor);\n            register(editor);\n            return {\n                ...get(editor),\n                getMetadata: () => ({ name: 'Lists', type: 'opensource', slug: PLUGIN_CODE })\n            };\n        });\n    };\n\n    Plugin();\n    /** *****\n     * DO NOT EXPORT ANYTHING\n     *\n     * IF YOU DO ROLLUP WILL LEAVE A GLOBAL ON THE PAGE\n     *******/\n\n})();\n", "/**\n * TinyMCE version 8.10.0 (2026-10-14)\n */\n\n(function () {\n    'use strict';\n\n    var global$5 = tinymce.util.Tools.resolve('tinymce.PluginManager');\n\n    /* eslint-disable @typescript-eslint/no-wrapper-object-types */\n    const hasProto = (v, constructor, predicate) => {\n        if (predicate(v, constructor.prototype)) {\n            return true;\n        }\n        else {\n            // String-based fallback time\n            return v.constructor?.name === constructor.name;\n        }\n    };\n    const typeOf = (x) => {\n        const t = typeof x;\n        if (x === null) {\n            return 'null';\n        }\n        else if (t === 'object' && Array.isArray(x)) {\n            return 'array';\n        }\n        else if (t === 'object' && hasProto(x, String, (o, proto) => proto.isPrototypeOf(o))) {\n            return 'string';\n        }\n        else {\n            return t;\n        }\n    };\n    const isType = (type) => (value) => typeOf(value) === type;\n    const isSimpleType = (type) => (value) => typeof value === type;\n    const eq = (t) => (a) => t === a;\n    const isString = isType('string');\n    const isObject = isType('object');\n    const isArray = isType('array');\n    const isNull = eq(null);\n    const isBoolean = isSimpleType('boolean');\n    const isNullable = (a) => a === null || a === undefined;\n    const isNonNullable = (a) => !isNullable(a);\n    const isFunction = isSimpleType('function');\n    const isArrayOf = (value, pred) => {\n        if (isArray(value)) {\n            for (let i = 0, len = value.length; i < len; ++i) {\n                if (!(pred(value[i]))) {\n                    return false;\n                }\n            }\n            return true;\n        }\n        return false;\n    };\n\n    const noop = () => { };\n    const constant = (value) => {\n        return () => {\n            return value;\n        };\n    };\n    const identity = (x) => {\n        return x;\n    };\n    const tripleEquals = (a, b) => {\n        return a === b;\n    };\n\n    /**\n     * The `Optional` type represents a value (of any type) that potentially does\n     * not exist. Any `Optional<T>` can either be a `Some<T>` (in which case the\n     * value does exist) or a `None` (in which case the value does not exist). This\n     * module defines a whole lot of FP-inspired utility functions for dealing with\n     * `Optional` objects.\n     *\n     * Comparison with null or undefined:\n     * - We don't get fancy null coalescing operators with `Optional`\n     * - We do get fancy helper functions with `Optional`\n     * - `Optional` support nesting, and allow for the type to still be nullable (or\n     * another `Optional`)\n     * - There is no option to turn off strict-optional-checks like there is for\n     * strict-null-checks\n     */\n    class Optional {\n        tag;\n        value;\n        // Sneaky optimisation: every instance of Optional.none is identical, so just\n        // reuse the same object\n        static singletonNone = new Optional(false);\n        // The internal representation has a `tag` and a `value`, but both are\n        // private: able to be console.logged, but not able to be accessed by code\n        constructor(tag, value) {\n            this.tag = tag;\n            this.value = value;\n        }\n        // --- Identities ---\n        /**\n         * Creates a new `Optional<T>` that **does** contain a value.\n         */\n        static some(value) {\n            return new Optional(true, value);\n        }\n        /**\n         * Create a new `Optional<T>` that **does not** contain a value. `T` can be\n         * any type because we don't actually have a `T`.\n         */\n        static none() {\n            return Optional.singletonNone;\n        }\n        /**\n         * Perform a transform on an `Optional` type. Regardless of whether this\n         * `Optional` contains a value or not, `fold` will return a value of type `U`.\n         * If this `Optional` does not contain a value, the `U` will be created by\n         * calling `onNone`. If this `Optional` does contain a value, the `U` will be\n         * created by calling `onSome`.\n         *\n         * For the FP enthusiasts in the room, this function:\n         * 1. Could be used to implement all of the functions below\n         * 2. Forms a catamorphism\n         */\n        fold(onNone, onSome) {\n            if (this.tag) {\n                return onSome(this.value);\n            }\n            else {\n                return onNone();\n            }\n        }\n        /**\n         * Determine if this `Optional` object contains a value.\n         */\n        isSome() {\n            return this.tag;\n        }\n        /**\n         * Determine if this `Optional` object **does not** contain a value.\n         */\n        isNone() {\n            return !this.tag;\n        }\n        // --- Functor (name stolen from Haskell / maths) ---\n        /**\n         * Perform a transform on an `Optional` object, **if** there is a value. If\n         * you provide a function to turn a T into a U, this is the function you use\n         * to turn an `Optional<T>` into an `Optional<U>`. If this **does** contain\n         * a value then the output will also contain a value (that value being the\n         * output of `mapper(this.value)`), and if this **does not** contain a value\n         * then neither will the output.\n         */\n        map(mapper) {\n            if (this.tag) {\n                return Optional.some(mapper(this.value));\n            }\n            else {\n                return Optional.none();\n            }\n        }\n        // --- Monad (name stolen from Haskell / maths) ---\n        /**\n         * Perform a transform on an `Optional` object, **if** there is a value.\n         * Unlike `map`, here the transform itself also returns an `Optional`.\n         */\n        bind(binder) {\n            if (this.tag) {\n                return binder(this.value);\n            }\n            else {\n                return Optional.none();\n            }\n        }\n        // --- Traversable (name stolen from Haskell / maths) ---\n        /**\n         * For a given predicate, this function finds out if there **exists** a value\n         * inside this `Optional` object that meets the predicate. In practice, this\n         * means that for `Optional`s that do not contain a value it returns false (as\n         * no predicate-meeting value exists).\n         */\n        exists(predicate) {\n            return this.tag && predicate(this.value);\n        }\n        /**\n         * For a given predicate, this function finds out if **all** the values inside\n         * this `Optional` object meet the predicate. In practice, this means that\n         * for `Optional`s that do not contain a value it returns true (as all 0\n         * objects do meet the predicate).\n         */\n        forall(predicate) {\n            return !this.tag || predicate(this.value);\n        }\n        filter(predicate) {\n            if (!this.tag || predicate(this.value)) {\n                return this;\n            }\n            else {\n                return Optional.none();\n            }\n        }\n        // --- Getters ---\n        /**\n         * Get the value out of the inside of the `Optional` object, using a default\n         * `replacement` value if the provided `Optional` object does not contain a\n         * value.\n         */\n        getOr(replacement) {\n            return this.tag ? this.value : replacement;\n        }\n        /**\n         * Get the value out of the inside of the `Optional` object, using a default\n         * `replacement` value if the provided `Optional` object does not contain a\n         * value.  Unlike `getOr`, in this method the `replacement` object is also\n         * `Optional` - meaning that this method will always return an `Optional`.\n         */\n        or(replacement) {\n            return this.tag ? this : replacement;\n        }\n        /**\n         * Get the value out of the inside of the `Optional` object, using a default\n         * `replacement` value if the provided `Optional` object does not contain a\n         * value. Unlike `getOr`, in this method the `replacement` value is\n         * \"thunked\" - that is to say that you don't pass a value to `getOrThunk`, you\n         * pass a function which (if called) will **return** the `value` you want to\n         * use.\n         */\n        getOrThunk(thunk) {\n            return this.tag ? this.value : thunk();\n        }\n        /**\n         * Get the value out of the inside of the `Optional` object, using a default\n         * `replacement` value if the provided Optional object does not contain a\n         * value.\n         *\n         * Unlike `or`, in this method the `replacement` value is \"thunked\" - that is\n         * to say that you don't pass a value to `orThunk`, you pass a function which\n         * (if called) will **return** the `value` you want to use.\n         *\n         * Unlike `getOrThunk`, in this method the `replacement` value is also\n         * `Optional`, meaning that this method will always return an `Optional`.\n         */\n        orThunk(thunk) {\n            return this.tag ? this : thunk();\n        }\n        /**\n         * Get the value out of the inside of the `Optional` object, throwing an\n         * exception if the provided `Optional` object does not contain a value.\n         *\n         * WARNING:\n         * You should only be using this function if you know that the `Optional`\n         * object **is not** empty (otherwise you're throwing exceptions in production\n         * code, which is bad).\n         *\n         * In tests this is more acceptable.\n         *\n         * Prefer other methods to this, such as `.each`.\n         */\n        getOrDie(message) {\n            if (!this.tag) {\n                throw new Error(message ?? 'Called getOrDie on None');\n            }\n            else {\n                return this.value;\n            }\n        }\n        // --- Interop with null and undefined ---\n        /**\n         * Creates an `Optional` value from a nullable (or undefined-able) input.\n         * Null, or undefined, is converted to `None`, and anything else is converted\n         * to `Some`.\n         */\n        static from(value) {\n            return isNonNullable(value) ? Optional.some(value) : Optional.none();\n        }\n        /**\n         * Converts an `Optional` to a nullable type, by getting the value if it\n         * exists, or returning `null` if it does not.\n         */\n        getOrNull() {\n            return this.tag ? this.value : null;\n        }\n        /**\n         * Converts an `Optional` to an undefined-able type, by getting the value if\n         * it exists, or returning `undefined` if it does not.\n         */\n        getOrUndefined() {\n            return this.value;\n        }\n        // --- Utilities ---\n        /**\n         * If the `Optional` contains a value, perform an action on that value.\n         * Unlike the rest of the methods on this type, `.each` has side-effects. If\n         * you want to transform an `Optional<T>` **into** something, then this is not\n         * the method for you. If you want to use an `Optional<T>` to **do**\n         * something, then this is the method for you - provided you're okay with not\n         * doing anything in the case where the `Optional` doesn't have a value inside\n         * it. If you're not sure whether your use-case fits into transforming\n         * **into** something or **doing** something, check whether it has a return\n         * value. If it does, you should be performing a transform.\n         */\n        each(worker) {\n            if (this.tag) {\n                worker(this.value);\n            }\n        }\n        /**\n         * Turn the `Optional` object into an array that contains all of the values\n         * stored inside the `Optional`. In practice, this means the output will have\n         * either 0 or 1 elements.\n         */\n        toArray() {\n            return this.tag ? [this.value] : [];\n        }\n        /**\n         * Turn the `Optional` object into a string for debugging or printing. Not\n         * recommended for production code, but good for debugging. Also note that\n         * these days an `Optional` object can be logged to the console directly, and\n         * its inner value (if it exists) will be visible.\n         */\n        toString() {\n            return this.tag ? `some(${this.value})` : 'none()';\n        }\n    }\n\n    const nativeSlice = Array.prototype.slice;\n    const nativeIndexOf = Array.prototype.indexOf;\n    const nativePush = Array.prototype.push;\n    const rawIndexOf = (ts, t) => nativeIndexOf.call(ts, t);\n    const contains = (xs, x) => rawIndexOf(xs, x) > -1;\n    const map = (xs, f) => {\n        // pre-allocating array size when it's guaranteed to be known\n        // http://jsperf.com/push-allocated-vs-dynamic/22\n        const len = xs.length;\n        const r = new Array(len);\n        for (let i = 0; i < len; i++) {\n            const x = xs[i];\n            r[i] = f(x, i);\n        }\n        return r;\n    };\n    // Unwound implementing other functions in terms of each.\n    // The code size is roughly the same, and it should allow for better optimisation.\n    // const each = function<T, U>(xs: T[], f: (x: T, i?: number, xs?: T[]) => void): void {\n    const each$1 = (xs, f) => {\n        for (let i = 0, len = xs.length; i < len; i++) {\n            const x = xs[i];\n            f(x, i);\n        }\n    };\n    const foldl = (xs, f, acc) => {\n        each$1(xs, (x, i) => {\n            acc = f(acc, x, i);\n        });\n        return acc;\n    };\n    const flatten = (xs) => {\n        // Note, this is possible because push supports multiple arguments:\n        // http://jsperf.com/concat-push/6\n        // Note that in the past, concat() would silently work (very slowly) for array-like objects.\n        // With this change it will throw an error.\n        const r = [];\n        for (let i = 0, len = xs.length; i < len; ++i) {\n            // Ensure that each value is an array itself\n            if (!isArray(xs[i])) {\n                throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs);\n            }\n            nativePush.apply(r, xs[i]);\n        }\n        return r;\n    };\n    const bind = (xs, f) => flatten(map(xs, f));\n    const get = (xs, i) => i >= 0 && i < xs.length ? Optional.some(xs[i]) : Optional.none();\n    const head = (xs) => get(xs, 0);\n    isFunction(Array.from) ? Array.from : (x) => nativeSlice.call(x);\n    const findMap = (arr, f) => {\n        for (let i = 0; i < arr.length; i++) {\n            const r = f(arr[i], i);\n            if (r.isSome()) {\n                return r;\n            }\n        }\n        return Optional.none();\n    };\n\n    // There are many variations of Object iteration that are faster than the 'for-in' style:\n    // http://jsperf.com/object-keys-iteration/107\n    //\n    // Use the native keys if it is available (IE9+), otherwise fall back to manually filtering\n    const keys = Object.keys;\n    const hasOwnProperty = Object.hasOwnProperty;\n    const each = (obj, f) => {\n        const props = keys(obj);\n        for (let k = 0, len = props.length; k < len; k++) {\n            const i = props[k];\n            const x = obj[i];\n            f(x, i);\n        }\n    };\n    const objAcc = (r) => (x, i) => {\n        r[i] = x;\n    };\n    const internalFilter = (obj, pred, onTrue, onFalse) => {\n        each(obj, (x, i) => {\n            (pred(x, i) ? onTrue : onFalse)(x, i);\n        });\n    };\n    const filter = (obj, pred) => {\n        const t = {};\n        internalFilter(obj, pred, objAcc(t), noop);\n        return t;\n    };\n    const has = (obj, key) => hasOwnProperty.call(obj, key);\n    const hasNonNullableKey = (obj, key) => has(obj, key) && obj[key] !== undefined && obj[key] !== null;\n\n    const Cell = (initial) => {\n        let value = initial;\n        const get = () => {\n            return value;\n        };\n        const set = (v) => {\n            value = v;\n        };\n        return {\n            get,\n            set\n        };\n    };\n\n    /**\n     * **Is** the value stored inside this Optional object equal to `rhs`?\n     */\n    const is = (lhs, rhs, comparator = tripleEquals) => lhs.exists((left) => comparator(left, rhs));\n    const cat = (arr) => {\n        const r = [];\n        const push = (x) => {\n            r.push(x);\n        };\n        for (let i = 0; i < arr.length; i++) {\n            arr[i].each(push);\n        }\n        return r;\n    };\n    // This can help with type inference, by specifying the type param on the none case, so the caller doesn't have to.\n    const someIf = (b, a) => b ? Optional.some(a) : Optional.none();\n\n    const singleton = (doRevoke) => {\n        const subject = Cell(Optional.none());\n        const revoke = () => subject.get().each(doRevoke);\n        const clear = () => {\n            revoke();\n            subject.set(Optional.none());\n        };\n        const isSet = () => subject.get().isSome();\n        const get = () => subject.get();\n        const set = (s) => {\n            revoke();\n            subject.set(Optional.some(s));\n        };\n        return {\n            clear,\n            isSet,\n            get,\n            set\n        };\n    };\n    const value = () => {\n        const subject = singleton(noop);\n        const on = (f) => subject.get().each(f);\n        return {\n            ...subject,\n            on\n        };\n    };\n\n    const removeFromStart = (str, numChars) => {\n        return str.substring(numChars);\n    };\n\n    const checkRange = (str, substr, start) => substr === '' || str.length >= substr.length && str.substr(start, start + substr.length) === substr;\n    const removeLeading = (str, prefix) => {\n        return startsWith(str, prefix) ? removeFromStart(str, prefix.length) : str;\n    };\n    /** Does 'str' start with 'prefix'?\n     *  Note: all strings start with the empty string.\n     *        More formally, for all strings x, startsWith(x, \"\").\n     *        This is so that for all strings x and y, startsWith(y + x, y)\n     */\n    const startsWith = (str, prefix) => {\n        return checkRange(str, prefix, 0);\n    };\n\n    const option = (name) => (editor) => editor.options.get(name);\n    const register$1 = (editor) => {\n        const registerOption = editor.options.register;\n        registerOption('link_assume_external_targets', {\n            processor: (value) => {\n                const valid = isString(value) || isBoolean(value);\n                if (valid) {\n                    if (value === true) {\n                        return { value: 1 /* AssumeExternalTargets.WARN */, valid };\n                    }\n                    else if (value === \"http\" /* AssumeExternalTargets.ALWAYS_HTTP */ || value === \"https\" /* AssumeExternalTargets.ALWAYS_HTTPS */) {\n                        return { value, valid };\n                    }\n                    else {\n                        return { value: 0 /* AssumeExternalTargets.OFF */, valid };\n                    }\n                }\n                else {\n                    return { valid: false, message: 'Must be a string or a boolean.' };\n                }\n            },\n            default: false\n        });\n        registerOption('link_context_toolbar', {\n            processor: 'boolean',\n            default: false\n        });\n        registerOption('link_list', {\n            processor: (value) => isString(value) || isFunction(value) || isArrayOf(value, isObject)\n        });\n        registerOption('link_default_target', {\n            processor: 'string'\n        });\n        registerOption('link_default_protocol', {\n            processor: 'string',\n            default: 'https'\n        });\n        registerOption('link_target_list', {\n            processor: (value) => isBoolean(value) || isArrayOf(value, isObject),\n            default: true\n        });\n        registerOption('link_rel_list', {\n            processor: 'object[]',\n            default: []\n        });\n        registerOption('link_class_list', {\n            processor: 'object[]',\n            default: []\n        });\n        registerOption('link_title', {\n            processor: 'boolean',\n            default: true\n        });\n        registerOption('allow_unsafe_link_target', {\n            processor: 'boolean',\n            default: false\n        });\n        registerOption('link_quicklink', {\n            processor: 'boolean',\n            default: false\n        });\n        registerOption('link_attributes_postprocess', {\n            processor: 'function',\n        });\n        registerOption('files_upload_handler', {\n            processor: 'function'\n        });\n        registerOption('link_uploadtab', {\n            processor: 'boolean',\n            default: true\n        });\n    };\n    const assumeExternalTargets = option('link_assume_external_targets');\n    const hasContextToolbar = option('link_context_toolbar');\n    const getLinkList = option('link_list');\n    const getDefaultLinkTarget = option('link_default_target');\n    const getDefaultLinkProtocol = option('link_default_protocol');\n    const getTargetList = option('link_target_list');\n    const getRelList = option('link_rel_list');\n    const getLinkClassList = option('link_class_list');\n    const shouldShowLinkTitle = option('link_title');\n    const allowUnsafeLinkTarget = option('allow_unsafe_link_target');\n    const useQuickLink = option('link_quicklink');\n    const attributesPostProcess = option('link_attributes_postprocess');\n    const getFilesUploadHandler = option('files_upload_handler');\n    const hasLinkUploadtab = option('link_uploadtab');\n    const getDocumentsFileTypes = option('documents_file_types');\n    const hasFilesUploadHandler = (editor) => isNonNullable(editor.options.get('files_upload_handler'));\n    const hasDocumentsFileTypes = (editor) => isNonNullable(editor.options.get('documents_file_types'));\n\n    var global$4 = tinymce.util.Tools.resolve('tinymce.util.URI');\n\n    var global$3 = tinymce.util.Tools.resolve('tinymce.dom.TreeWalker');\n\n    var global$2 = tinymce.util.Tools.resolve('tinymce.util.Tools');\n\n    const isAnchor = (elm) => isNonNullable(elm) && elm.nodeName.toLowerCase() === 'a';\n    const isLink = (elm) => isAnchor(elm) && !!getHref(elm);\n    const collectNodesInRange = (rng, predicate) => {\n        if (rng.collapsed) {\n            return [];\n        }\n        else {\n            const contents = rng.cloneContents();\n            const firstChild = contents.firstChild;\n            const walker = new global$3(firstChild, contents);\n            const elements = [];\n            let current = firstChild;\n            do {\n                if (predicate(current)) {\n                    elements.push(current);\n                }\n            } while ((current = walker.next()));\n            return elements;\n        }\n    };\n    const hasProtocol = (url) => /^\\w+:/i.test(url);\n    const getHref = (elm) => {\n        // Returns the real href value not the resolved a.href value\n        return elm.getAttribute('data-mce-href') ?? elm.getAttribute('href') ?? '';\n    };\n    const applyRelTargetRules = (rel, isUnsafe) => {\n        const rules = ['noopener'];\n        const rels = rel ? rel.split(/\\s+/) : [];\n        const toString = (rels) => global$2.trim(rels.sort().join(' '));\n        const addTargetRules = (rels) => {\n            rels = removeTargetRules(rels);\n            return rels.length > 0 ? rels.concat(rules) : rules;\n        };\n        const removeTargetRules = (rels) => rels.filter((val) => global$2.inArray(rules, val) === -1);\n        const newRels = isUnsafe ? addTargetRules(rels) : removeTargetRules(rels);\n        return newRels.length > 0 ? toString(newRels) : '';\n    };\n    const trimCaretContainers = (text) => text.replace(/\\uFEFF/g, '');\n    const getAnchorElement = (editor, selectedElm) => {\n        selectedElm = selectedElm || getLinksInSelection(editor.selection.getRng())[0] || editor.selection.getNode();\n        if (isImageFigure(selectedElm)) {\n            // for an image contained in a figure we look for a link inside the selected element\n            return Optional.from(editor.dom.select('a[href]', selectedElm)[0]);\n        }\n        else {\n            return Optional.from(editor.dom.getParent(selectedElm, 'a[href]'));\n        }\n    };\n    const isInAnchor = (editor, selectedElm) => getAnchorElement(editor, selectedElm).isSome();\n    const getAnchorText = (selection, anchorElm) => {\n        const text = anchorElm.fold(() => selection.getContent({ format: 'text' }), (anchorElm) => anchorElm.innerText || anchorElm.textContent || '');\n        return trimCaretContainers(text);\n    };\n    const getLinksInSelection = (rng) => collectNodesInRange(rng, isLink);\n    const getLinks$1 = (elements) => global$2.grep(elements, isLink);\n    const hasLinks = (elements) => getLinks$1(elements).length > 0;\n    const hasLinksInSelection = (rng) => getLinksInSelection(rng).length > 0;\n    const isOnlyTextSelected = (editor) => {\n        // Allow anchor and inline text elements to be in the selection but nothing else\n        const inlineTextElements = editor.schema.getTextInlineElements();\n        const isElement = (elm) => elm.nodeType === 1 && !isAnchor(elm) && !has(inlineTextElements, elm.nodeName.toLowerCase());\n        // If selection is inside a block anchor then always treat it as non text only\n        const isInBlockAnchor = getAnchorElement(editor).exists((anchor) => anchor.hasAttribute('data-mce-block'));\n        if (isInBlockAnchor) {\n            return false;\n        }\n        const rng = editor.selection.getRng();\n        if (!rng.collapsed) {\n            // Collect all non inline text elements in the range and make sure no elements were found\n            const elements = collectNodesInRange(rng, isElement);\n            return elements.length === 0;\n        }\n        else {\n            return true;\n        }\n    };\n    const isImageFigure = (elm) => isNonNullable(elm) && elm.nodeName === 'FIGURE' && /\\bimage\\b/i.test(elm.className);\n    const blobToDataUri = (blob) => new Promise((resolve, reject) => {\n        const reader = new FileReader();\n        reader.onload = () => {\n            resolve(reader.result);\n        };\n        reader.onerror = () => {\n            reject(new Error(reader.error?.message ?? 'Failed to convert blob to a data url'));\n        };\n        reader.readAsDataURL(blob);\n    });\n\n    const getLinkAttrs = (data) => {\n        const attrs = ['title', 'rel', 'class', 'target'];\n        return foldl(attrs, (acc, key) => {\n            data[key].each((value) => {\n                // If dealing with an empty string, then treat that as being null so the attribute is removed\n                acc[key] = value.length > 0 ? value : null;\n            });\n            return acc;\n        }, {\n            href: data.href\n        });\n    };\n    const handleExternalTargets = (href, assumeExternalTargets) => {\n        if ((assumeExternalTargets === \"http\" /* AssumeExternalTargets.ALWAYS_HTTP */\n            || assumeExternalTargets === \"https\" /* AssumeExternalTargets.ALWAYS_HTTPS */)\n            && !hasProtocol(href)) {\n            return assumeExternalTargets + '://' + href;\n        }\n        return href;\n    };\n    const applyLinkOverrides = (editor, linkAttrs) => {\n        const newLinkAttrs = { ...linkAttrs };\n        if (getRelList(editor).length === 0 && !allowUnsafeLinkTarget(editor)) {\n            const newRel = applyRelTargetRules(newLinkAttrs.rel, newLinkAttrs.target === '_blank');\n            newLinkAttrs.rel = newRel ? newRel : null;\n        }\n        if (Optional.from(newLinkAttrs.target).isNone() && getTargetList(editor) === false) {\n            newLinkAttrs.target = getDefaultLinkTarget(editor);\n        }\n        newLinkAttrs.href = handleExternalTargets(newLinkAttrs.href, assumeExternalTargets(editor));\n        return newLinkAttrs;\n    };\n    const updateLink = (editor, anchorElm, text, linkAttrs) => {\n        // If we have text, then update the anchor elements text content\n        text.each((text) => {\n            if (has(anchorElm, 'innerText')) {\n                anchorElm.innerText = text;\n            }\n            else {\n                anchorElm.textContent = text;\n            }\n        });\n        editor.dom.setAttribs(anchorElm, linkAttrs);\n        // Move the cursor behind the updated link, so the user can go on typing.\n        const rng = editor.dom.createRng();\n        rng.setStartAfter(anchorElm);\n        rng.setEndAfter(anchorElm);\n        editor.selection.setRng(rng);\n    };\n    const createLink = (editor, selectedElm, text, linkAttrs) => {\n        const dom = editor.dom;\n        if (isImageFigure(selectedElm)) {\n            linkImageFigure(dom, selectedElm, linkAttrs);\n        }\n        else {\n            text.fold(() => {\n                editor.execCommand('mceInsertLink', false, linkAttrs);\n                // Now the newly inserted link is selected. Move the cursor behind the new link, so the user can go on typing.\n                const end = editor.selection.getEnd();\n                const rng = dom.createRng();\n                rng.setStartAfter(end);\n                rng.setEndAfter(end);\n                editor.selection.setRng(rng);\n            }, (text) => {\n                editor.insertContent(dom.createHTML('a', linkAttrs, dom.encode(text)));\n            });\n        }\n    };\n    const linkDomMutation = (editor, attachState, data) => {\n        const selectedElm = editor.selection.getNode();\n        const anchorElm = getAnchorElement(editor, selectedElm);\n        const linkAttrs = applyLinkOverrides(editor, getLinkAttrs(data));\n        const attributesPostProcess$1 = attributesPostProcess(editor);\n        if (isNonNullable(attributesPostProcess$1)) {\n            attributesPostProcess$1(linkAttrs);\n        }\n        editor.undoManager.transact(() => {\n            if (data.href === attachState.href) {\n                attachState.attach();\n            }\n            anchorElm.fold(() => {\n                createLink(editor, selectedElm, data.text, linkAttrs);\n            }, (elm) => {\n                editor.focus();\n                updateLink(editor, elm, data.text, linkAttrs);\n            });\n        });\n    };\n    const unlinkSelection = (editor) => {\n        const dom = editor.dom, selection = editor.selection;\n        const rng = selection.getRng().cloneRange();\n        const bookmark = selection.getBookmark();\n        // Extend the selection out to the entire anchor element\n        const startAnchorElm = dom.getParent(rng.startContainer, 'a[href]', editor.getBody());\n        const endAnchorElm = dom.getParent(rng.endContainer, 'a[href]', editor.getBody());\n        if (startAnchorElm) {\n            rng.setStartBefore(startAnchorElm);\n        }\n        if (endAnchorElm) {\n            rng.setEndAfter(endAnchorElm);\n        }\n        selection.setRng(rng);\n        // Remove the link\n        editor.execCommand('unlink');\n        selection.moveToBookmark(bookmark);\n    };\n    const unlinkDomMutation = (editor) => {\n        editor.undoManager.transact(() => {\n            const node = editor.selection.getNode();\n            if (isImageFigure(node)) {\n                unlinkImageFigure(editor, node);\n            }\n            else {\n                unlinkSelection(editor);\n            }\n            editor.focus();\n        });\n    };\n    /*\n     * RTC uses unwrapped options.\n     *\n     * To best simulate this, we unwrap to null and filter out empty values.\n     */\n    const unwrapOptions = (data) => {\n        const { class: cls, href, rel, target, text, title } = data;\n        return filter({\n            class: cls.getOrNull(),\n            href,\n            rel: rel.getOrNull(),\n            target: target.getOrNull(),\n            text: text.getOrNull(),\n            title: title.getOrNull()\n        }, (v, _k) => isNull(v) === false);\n    };\n    const sanitizeData = (editor, data) => {\n        const getOption = editor.options.get;\n        const uriOptions = {\n            allow_html_data_urls: getOption('allow_html_data_urls'),\n            allow_script_urls: getOption('allow_script_urls'),\n            allow_svg_data_urls: getOption('allow_svg_data_urls')\n        };\n        // Sanitize the URL\n        const href = data.href;\n        return {\n            ...data,\n            href: global$4.isDomSafe(href, 'a', uriOptions) ? href : ''\n        };\n    };\n    const link = (editor, attachState, data) => {\n        const sanitizedData = sanitizeData(editor, data);\n        editor.hasPlugin('rtc', true) ? editor.execCommand('createlink', false, unwrapOptions(sanitizedData)) : linkDomMutation(editor, attachState, sanitizedData);\n    };\n    const unlink = (editor) => {\n        editor.hasPlugin('rtc', true) ? editor.execCommand('unlink') : unlinkDomMutation(editor);\n    };\n    const unlinkImageFigure = (editor, fig) => {\n        const img = editor.dom.select('img', fig)[0];\n        if (img) {\n            const a = editor.dom.getParents(img, 'a[href]', fig)[0];\n            if (a) {\n                a.parentNode?.insertBefore(img, a);\n                editor.dom.remove(a);\n            }\n        }\n    };\n    const linkImageFigure = (dom, fig, attrs) => {\n        const img = dom.select('img', fig)[0];\n        if (img) {\n            const a = dom.create('a', attrs);\n            img.parentNode?.insertBefore(a, img);\n            a.appendChild(img);\n        }\n    };\n\n    const getValue = (item) => isString(item.value) ? item.value : '';\n    const getText = (item) => {\n        if (isString(item.text)) {\n            return item.text;\n        }\n        else if (isString(item.title)) {\n            return item.title;\n        }\n        else {\n            return '';\n        }\n    };\n    const sanitizeList = (list, extractValue) => {\n        const out = [];\n        global$2.each(list, (item) => {\n            const text = getText(item);\n            if (item.menu !== undefined) {\n                const items = sanitizeList(item.menu, extractValue);\n                out.push({ text, items }); // list group\n            }\n            else {\n                const value = extractValue(item);\n                out.push({ text, value }); // list value\n            }\n        });\n        return out;\n    };\n    const sanitizeWith = (extracter = getValue) => (list) => Optional.from(list).map((list) => sanitizeList(list, extracter));\n    const sanitize = (list) => sanitizeWith(getValue)(list);\n    // NOTE: May need to care about flattening.\n    const createUi = (name, label) => (items) => ({\n        name,\n        type: 'listbox',\n        label,\n        items\n    });\n    const ListOptions = {\n        sanitize,\n        sanitizeWith,\n        createUi,\n        getValue\n    };\n\n    const isListGroup = (item) => hasNonNullableKey(item, 'items');\n    const findTextByValue = (value, catalog) => findMap(catalog, (item) => {\n        if (isListGroup(item)) {\n            return findTextByValue(value, item.items);\n        }\n        else {\n            return someIf(item.value === value, item);\n        }\n    });\n    const getDelta = (persistentText, fieldName, catalog, data) => {\n        const value = data[fieldName];\n        const hasPersistentText = persistentText.length > 0;\n        return value !== undefined ? findTextByValue(value, catalog).map((i) => ({\n            url: {\n                value: i.value,\n                meta: {\n                    text: hasPersistentText ? persistentText : i.text,\n                    attach: noop\n                }\n            },\n            text: hasPersistentText ? persistentText : i.text\n        })) : Optional.none();\n    };\n    const findCatalog = (catalogs, fieldName) => {\n        if (fieldName === 'link') {\n            return catalogs.link;\n        }\n        else if (fieldName === 'anchor') {\n            return catalogs.anchor;\n        }\n        else {\n            return Optional.none();\n        }\n    };\n    const init = (initialData, linkCatalog) => {\n        const persistentData = {\n            text: initialData.text,\n            title: initialData.title\n        };\n        const getTitleFromUrlChange = (url) => someIf(persistentData.title.length <= 0, Optional.from(url.meta?.title).getOr(''));\n        const getTextFromUrlChange = (url) => someIf(persistentData.text.length <= 0, Optional.from(url.meta?.text).getOr(url.value));\n        const onUrlChange = (data) => {\n            const text = getTextFromUrlChange(data.url);\n            const title = getTitleFromUrlChange(data.url);\n            // We are going to change the text/title because it has not been manually entered by the user.\n            if (text.isSome() || title.isSome()) {\n                return Optional.some({\n                    ...text.map((text) => ({ text })).getOr({}),\n                    ...title.map((title) => ({ title })).getOr({})\n                });\n            }\n            else {\n                return Optional.none();\n            }\n        };\n        const onCatalogChange = (data, change) => {\n            const catalog = findCatalog(linkCatalog, change).getOr([]);\n            return getDelta(persistentData.text, change, catalog, data);\n        };\n        const onChange = (getData, change) => {\n            const name = change.name;\n            if (name === 'url') {\n                return onUrlChange(getData());\n            }\n            else if (contains(['anchor', 'link'], name)) {\n                return onCatalogChange(getData(), name);\n            }\n            else if (name === 'text' || name === 'title') {\n                // Update the persistent text/title state, as a user has input custom text\n                persistentData[name] = getData()[name];\n                return Optional.none();\n            }\n            else {\n                return Optional.none();\n            }\n        };\n        return {\n            onChange\n        };\n    };\n    const DialogChanges = {\n        init,\n        getDelta\n    };\n\n    var global$1 = tinymce.util.Tools.resolve('tinymce.util.Delay');\n\n    // Delay confirm since onSubmit will move focus\n    const delayedConfirm = (editor, message, callback) => {\n        const rng = editor.selection.getRng();\n        global$1.setEditorTimeout(editor, () => {\n            editor.windowManager.confirm(message, (state) => {\n                editor.selection.setRng(rng);\n                callback(state);\n            });\n        });\n    };\n    const tryEmailTransform = (data) => {\n        const url = data.href;\n        const suggestMailTo = url.indexOf('@') > 0 && url.indexOf('/') === -1 && url.indexOf('mailto:') === -1;\n        return suggestMailTo ? Optional.some({\n            message: 'The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?',\n            preprocess: (oldData) => ({ ...oldData, href: 'mailto:' + url })\n        }) : Optional.none();\n    };\n    const tryProtocolTransform = (assumeExternalTargets, defaultLinkProtocol) => (data) => {\n        const url = data.href;\n        const suggestProtocol = (assumeExternalTargets === 1 /* AssumeExternalTargets.WARN */ && !hasProtocol(url) ||\n            assumeExternalTargets === 0 /* AssumeExternalTargets.OFF */ && /^\\s*www(\\.|\\d\\.)/i.test(url));\n        return suggestProtocol ? Optional.some({\n            message: `The URL you entered seems to be an external link. Do you want to add the required ${defaultLinkProtocol}:// prefix?`,\n            preprocess: (oldData) => ({ ...oldData, href: defaultLinkProtocol + '://' + url })\n        }) : Optional.none();\n    };\n    const preprocess = (editor, data) => findMap([tryEmailTransform, tryProtocolTransform(assumeExternalTargets(editor), getDefaultLinkProtocol(editor))], (f) => f(data)).fold(() => Promise.resolve(data), (transform) => new Promise((callback) => {\n        delayedConfirm(editor, transform.message, (state) => {\n            callback(state ? transform.preprocess(data) : data);\n        });\n    }));\n    const DialogConfirms = {\n        preprocess\n    };\n\n    // NOTE: you currently need anchors in the content for this field to appear\n    const getAnchors = (editor) => {\n        const anchorNodes = editor.dom.select('a:not([href])');\n        const anchors = bind(anchorNodes, (anchor) => {\n            const id = anchor.name || anchor.id;\n            return id ? [{ text: id, value: '#' + id }] : [];\n        });\n        return anchors.length > 0 ? Optional.some([{ text: 'None', value: '' }].concat(anchors)) : Optional.none();\n    };\n    const AnchorListOptions = {\n        getAnchors\n    };\n\n    // Looks like tinymce currently renders menus, but doesn't\n    // let you choose from one.\n    const getClasses = (editor) => {\n        const list = getLinkClassList(editor);\n        if (list.length > 0) {\n            return ListOptions.sanitize(list);\n        }\n        return Optional.none();\n    };\n    const ClassListOptions = {\n        getClasses\n    };\n\n    const parseJson = (text) => {\n        // Do some proper modelling.\n        try {\n            return Optional.some(JSON.parse(text));\n        }\n        catch {\n            return Optional.none();\n        }\n    };\n    const getLinks = (editor) => {\n        const extractor = (item) => editor.convertURL(item.value || item.url || '', 'href');\n        const linkList = getLinkList(editor);\n        return new Promise((resolve) => {\n            // TODO - better handling of failure\n            if (isString(linkList)) {\n                fetch(linkList)\n                    .then((res) => res.ok ? res.text().then(parseJson) : Promise.reject())\n                    .then(resolve, () => resolve(Optional.none()));\n            }\n            else if (isFunction(linkList)) {\n                linkList((output) => resolve(Optional.some(output)));\n            }\n            else {\n                resolve(Optional.from(linkList));\n            }\n        }).then((optItems) => optItems.bind(ListOptions.sanitizeWith(extractor)).map((items) => {\n            if (items.length > 0) {\n                const noneItem = [{ text: 'None', value: '' }];\n                return noneItem.concat(items);\n            }\n            else {\n                return items;\n            }\n        }));\n    };\n    const LinkListOptions = {\n        getLinks\n    };\n\n    const getRels = (editor, initialTarget) => {\n        const list = getRelList(editor);\n        if (list.length > 0) {\n            const isTargetBlank = is(initialTarget, '_blank');\n            const enforceSafe = allowUnsafeLinkTarget(editor) === false;\n            const safeRelExtractor = (item) => applyRelTargetRules(ListOptions.getValue(item), isTargetBlank);\n            const sanitizer = enforceSafe ? ListOptions.sanitizeWith(safeRelExtractor) : ListOptions.sanitize;\n            return sanitizer(list);\n        }\n        return Optional.none();\n    };\n    const RelOptions = {\n        getRels\n    };\n\n    // In current tinymce, targets can be nested menus.\n    // Do we really want to support that?\n    const fallbacks = [\n        { text: 'Current window', value: '' },\n        { text: 'New window', value: '_blank' }\n    ];\n    const getTargets = (editor) => {\n        const list = getTargetList(editor);\n        if (isArray(list)) {\n            return ListOptions.sanitize(list).orThunk(() => Optional.some(fallbacks));\n        }\n        else if (list === false) {\n            return Optional.none();\n        }\n        return Optional.some(fallbacks);\n    };\n    const TargetOptions = {\n        getTargets\n    };\n\n    const nonEmptyAttr = (dom, elem, name) => {\n        const val = dom.getAttrib(elem, name);\n        return val !== null && val.length > 0 ? Optional.some(val) : Optional.none();\n    };\n    const extractFromAnchor = (editor, anchor) => {\n        const dom = editor.dom;\n        const onlyText = isOnlyTextSelected(editor);\n        const text = onlyText ? Optional.some(getAnchorText(editor.selection, anchor)) : Optional.none();\n        const url = anchor.bind((anchorElm) => Optional.from(dom.getAttrib(anchorElm, 'href')));\n        const target = anchor.bind((anchorElm) => Optional.from(dom.getAttrib(anchorElm, 'target')));\n        const rel = anchor.bind((anchorElm) => nonEmptyAttr(dom, anchorElm, 'rel'));\n        const linkClass = anchor.bind((anchorElm) => nonEmptyAttr(dom, anchorElm, 'class'));\n        const title = anchor.bind((anchorElm) => nonEmptyAttr(dom, anchorElm, 'title'));\n        return {\n            url,\n            text,\n            title,\n            target,\n            rel,\n            linkClass\n        };\n    };\n    const collect = (editor, linkNode) => LinkListOptions.getLinks(editor).then((links) => {\n        const hasUploadPanel = hasFilesUploadHandler(editor) && hasDocumentsFileTypes(editor) && hasLinkUploadtab(editor);\n        const anchor = extractFromAnchor(editor, linkNode);\n        return {\n            anchor,\n            catalogs: {\n                targets: TargetOptions.getTargets(editor),\n                // This should be initial target. Is anchor.target that?\n                rels: RelOptions.getRels(editor, anchor.target),\n                classes: ClassListOptions.getClasses(editor),\n                anchor: AnchorListOptions.getAnchors(editor),\n                link: links\n            },\n            hasUploadPanel,\n            optNode: linkNode,\n            flags: {\n                titleEnabled: shouldShowLinkTitle(editor)\n            }\n        };\n    });\n    const DialogInfo = {\n        collect\n    };\n\n    const makeTab = (fileTypes, onInvalidFiles) => {\n        const items = [\n            {\n                type: 'dropzone',\n                name: 'fileinput',\n                buttonLabel: 'Browse for a file',\n                dropAreaLabel: 'Drop a file here',\n                allowedFileTypes: fileTypes.map((e) => e.mimeType).join(','),\n                allowedFileExtensions: flatten(fileTypes.map((e) => e.extensions)),\n                onInvalidFiles\n            }\n        ];\n        return {\n            title: 'Upload',\n            name: 'upload',\n            items\n        };\n    };\n    const UploadTab = {\n        makeTab\n    };\n\n    const handleSubmit = (editor, info) => (api) => {\n        const data = api.getData();\n        if (!data.url.value) {\n            unlink(editor);\n            // Temporary fix. TODO: TINY-2811\n            api.close();\n            return;\n        }\n        // Check if a key is defined, meaning it was a field in the dialog. If it is,\n        // then check if it's changed and return none if nothing has changed.\n        const getChangedValue = (key) => Optional.from(data[key]).filter((value) => !is(info.anchor[key], value));\n        const changedData = {\n            href: data.url.value,\n            text: getChangedValue('text'),\n            target: getChangedValue('target'),\n            rel: getChangedValue('rel'),\n            class: getChangedValue('linkClass'),\n            title: getChangedValue('title')\n        };\n        const attachState = {\n            href: data.url.value,\n            attach: data.url.meta !== undefined && data.url.meta.attach ? data.url.meta.attach : noop\n        };\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\n        DialogConfirms.preprocess(editor, changedData).then((pData) => {\n            link(editor, attachState, pData);\n        });\n        api.close();\n    };\n    const uploadFile = (editor) => (blobInfo, progress) => {\n        const fileUploadHandler = getFilesUploadHandler(editor);\n        return fileUploadHandler(blobInfo, progress);\n    };\n    const dataUrlToBase64 = (dataUrl) => Optional.from(dataUrl.split(',')[1]).getOr('');\n    const changeFileInput = (helpers, api) => {\n        const data = api.getData();\n        api.block('Uploading file');\n        head(data.fileinput)\n            .fold(() => {\n            api.unblock();\n        }, (file) => {\n            const blobUri = URL.createObjectURL(file);\n            const updateUrlAndSwitchTab = ({ url, fileName }) => {\n                api.setData({ text: fileName, title: fileName, url: { value: url, meta: {} } });\n                api.showTab('general');\n                api.focus('url');\n            };\n            const finalize = () => {\n                api.unblock();\n                URL.revokeObjectURL(blobUri);\n            };\n            blobToDataUri(file).then((dataUrl) => {\n                const existingBlobInfo = helpers.getExistingBlobInfo(dataUrlToBase64(dataUrl), file.type);\n                const blobInfo = existingBlobInfo && existingBlobInfo.filename() === file.name ? existingBlobInfo : helpers.createBlobCache(file, blobUri, dataUrl);\n                helpers.addToBlobCache(blobInfo);\n                return helpers.uploadFile(blobInfo, identity);\n            }).then((result) => {\n                updateUrlAndSwitchTab(result);\n                finalize();\n            }).catch((err) => {\n                finalize();\n                helpers.alertErr(err, () => {\n                    api.focus('fileinput');\n                });\n            });\n        });\n    };\n    const createBlobCache = (editor) => (file, blobUri, dataUrl) => editor.editorUpload.blobCache.create({\n        blob: file,\n        blobUri,\n        name: file.name?.replace(/\\.[^\\.]+$/, ''),\n        filename: file.name,\n        base64: dataUrl.split(',')[1],\n        allowEmptyFile: true\n    });\n    const addToBlobCache = (editor) => (blobInfo) => {\n        editor.editorUpload.blobCache.add(blobInfo);\n    };\n    const getExistingBlobInfo = (editor) => (base64, type) => {\n        return editor.editorUpload.blobCache.getByData(base64, type);\n    };\n    const alertErr = (editor) => (message, callback) => {\n        editor.windowManager.alert(message, callback);\n    };\n    const collectData = (editor) => {\n        const anchorNode = getAnchorElement(editor);\n        return DialogInfo.collect(editor, anchorNode);\n    };\n    const getInitialData = (info, defaultTarget) => {\n        const anchor = info.anchor;\n        const url = anchor.url.getOr('');\n        return {\n            url: {\n                value: url,\n                meta: {\n                    original: {\n                        value: url\n                    }\n                }\n            },\n            text: anchor.text.getOr(''),\n            title: anchor.title.getOr(''),\n            anchor: url,\n            link: url,\n            rel: anchor.rel.getOr(''),\n            target: anchor.target.or(defaultTarget).getOr(''),\n            linkClass: anchor.linkClass.getOr(''),\n            fileinput: []\n        };\n    };\n    const makeDialogBody = (urlInput, displayText, titleText, catalogs, hasUploadPanel, fileTypes, onInvalidFiles) => {\n        const generalPanelItems = flatten([\n            urlInput,\n            displayText,\n            titleText,\n            cat([\n                catalogs.anchor.map(ListOptions.createUi('anchor', 'Anchors')),\n                catalogs.rels.map(ListOptions.createUi('rel', 'Rel')),\n                catalogs.targets.map(ListOptions.createUi('target', 'Open link in...')),\n                catalogs.link.map(ListOptions.createUi('link', 'Link list')),\n                catalogs.classes.map(ListOptions.createUi('linkClass', 'Class'))\n            ])\n        ]);\n        if (hasUploadPanel) {\n            const tabPanel = {\n                type: 'tabpanel',\n                tabs: flatten([\n                    [{\n                            title: 'General',\n                            name: 'general',\n                            items: generalPanelItems\n                        }],\n                    [UploadTab.makeTab(fileTypes, onInvalidFiles)]\n                ])\n            };\n            return tabPanel;\n        }\n        else {\n            return {\n                type: 'panel',\n                items: generalPanelItems\n            };\n        }\n    };\n    const makeDialog = (settings, onSubmit, editor) => {\n        const urlInput = [\n            {\n                name: 'url',\n                type: 'urlinput',\n                filetype: 'file',\n                label: 'URL',\n                picker_text: 'Browse links'\n            }\n        ];\n        const displayText = settings.anchor.text.map(() => ({\n            name: 'text',\n            type: 'input',\n            label: 'Text to display'\n        })).toArray();\n        const titleText = settings.flags.titleEnabled ? [\n            {\n                name: 'title',\n                type: 'input',\n                label: 'Title'\n            }\n        ] : [];\n        const defaultTarget = Optional.from(getDefaultLinkTarget(editor));\n        const initialData = getInitialData(settings, defaultTarget);\n        const catalogs = settings.catalogs;\n        const dialogDelta = DialogChanges.init(initialData, catalogs);\n        const helpers = {\n            addToBlobCache: addToBlobCache(editor),\n            createBlobCache: createBlobCache(editor),\n            alertErr: alertErr(editor),\n            uploadFile: uploadFile(editor),\n            getExistingBlobInfo: getExistingBlobInfo(editor)\n        };\n        const body = makeDialogBody(urlInput, displayText, titleText, catalogs, settings.hasUploadPanel, getDocumentsFileTypes(editor), () => new Promise((r) => helpers.alertErr('Selected files do not have allowed extensions', r)));\n        return {\n            title: 'Insert/Edit Link',\n            size: 'normal',\n            body,\n            buttons: [\n                {\n                    type: 'cancel',\n                    name: 'cancel',\n                    text: 'Cancel'\n                },\n                {\n                    type: 'submit',\n                    name: 'save',\n                    text: 'Save',\n                    primary: true\n                }\n            ],\n            initialData,\n            onChange: (api, { name }) => {\n                if (name === 'fileinput') {\n                    changeFileInput(helpers, api);\n                }\n                else {\n                    dialogDelta.onChange(api.getData, { name }).each((newData) => {\n                        api.setData(newData);\n                    });\n                }\n            },\n            onSubmit\n        };\n    };\n    const open = (editor) => {\n        const data = collectData(editor);\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\n        data.then((info) => {\n            const onSubmit = handleSubmit(editor, info);\n            return makeDialog(info, onSubmit, editor);\n        }).then((spec) => {\n            editor.windowManager.open(spec);\n        });\n    };\n\n    const register = (editor) => {\n        editor.addCommand('mceLink', (_ui, value) => {\n            if (value?.dialog === true || !useQuickLink(editor)) {\n                open(editor);\n            }\n            else {\n                editor.dispatch('contexttoolbar-show', {\n                    toolbarKey: 'quicklink'\n                });\n            }\n        });\n    };\n\n    const setup$2 = (editor) => {\n        editor.addShortcut('Meta+K', '', () => {\n            editor.execCommand('mceLink');\n        });\n    };\n\n    var global = tinymce.util.Tools.resolve('tinymce.util.VK');\n\n    const appendClickRemove = (link, evt) => {\n        document.body.appendChild(link);\n        link.dispatchEvent(evt);\n        document.body.removeChild(link);\n    };\n    const openLink = (url) => {\n        const link = document.createElement('a');\n        link.target = '_blank';\n        link.href = url;\n        link.rel = 'noreferrer noopener';\n        const evt = new MouseEvent('click', {\n            bubbles: true,\n            cancelable: true,\n            view: window\n        });\n        document.dispatchEvent(evt);\n        appendClickRemove(link, evt);\n    };\n    const hasOnlyAltModifier = (e) => {\n        return e.altKey === true && e.shiftKey === false && e.ctrlKey === false && e.metaKey === false;\n    };\n    const gotoLink = (editor, a) => {\n        if (a) {\n            const href = getHref(a);\n            if (/^#/.test(href)) {\n                const id = removeLeading(href, '#');\n                const targetEl = editor.dom.select(`[id=\"${id}\"],[name=\"${id}\"]`);\n                if (targetEl.length) {\n                    editor.selection.scrollIntoView(targetEl[0], true);\n                }\n            }\n            else {\n                openLink(a.href);\n            }\n        }\n    };\n    const isSelectionOnImageWithEmbeddedLink = (editor) => {\n        const rng = editor.selection.getRng();\n        const node = rng.startContainer;\n        // Handle a case where an image embedded with a link is selected\n        return isLink(node) && rng.startContainer === rng.endContainer && editor.dom.select('img', node).length === 1;\n    };\n    const getLinkFromElement = (editor, element) => {\n        const links = getLinks$1(editor.dom.getParents(element));\n        return someIf(links.length === 1, links[0]);\n    };\n    const getLinkInSelection = (editor) => {\n        const links = getLinksInSelection(editor.selection.getRng());\n        return someIf(links.length > 0, links[0]).or(getLinkFromElement(editor, editor.selection.getNode()));\n    };\n    const getLinkFromSelection = (editor) => editor.selection.isCollapsed() || isSelectionOnImageWithEmbeddedLink(editor)\n        ? getLinkFromElement(editor, editor.selection.getStart())\n        : getLinkInSelection(editor);\n    const setup$1 = (editor) => {\n        const selectedLink = value();\n        const getSelectedLink = () => selectedLink.get().or(getLinkFromSelection(editor));\n        const gotoSelectedLink = () => getSelectedLink().each((link) => gotoLink(editor, link));\n        editor.on('contextmenu', (e) => {\n            getLinkFromElement(editor, e.target).each(selectedLink.set);\n        });\n        editor.on('SelectionChange', () => {\n            if (!selectedLink.isSet()) {\n                getLinkFromSelection(editor).each(selectedLink.set);\n            }\n        });\n        editor.on('click', (e) => {\n            selectedLink.clear();\n            const links = getLinks$1(editor.dom.getParents(e.target));\n            if (links.length === 1 && global.metaKeyPressed(e)) {\n                e.preventDefault();\n                gotoLink(editor, links[0]);\n            }\n        });\n        editor.on('keydown', (e) => {\n            selectedLink.clear();\n            if (!e.isDefaultPrevented() && e.keyCode === 13 && hasOnlyAltModifier(e)) {\n                getSelectedLink().each((link) => {\n                    e.preventDefault();\n                    gotoLink(editor, link);\n                });\n            }\n        });\n        return {\n            gotoSelectedLink\n        };\n    };\n\n    const openDialog = (editor) => () => {\n        editor.execCommand('mceLink', false, { dialog: true });\n    };\n    const toggleState = (editor, toggler) => {\n        editor.on('NodeChange', toggler);\n        return () => editor.off('NodeChange', toggler);\n    };\n    const toggleLinkState = (editor) => (api) => {\n        const updateState = () => {\n            api.setActive(!editor.mode.isReadOnly() && isInAnchor(editor, editor.selection.getNode()));\n            api.setEnabled(editor.selection.isEditable());\n        };\n        updateState();\n        return toggleState(editor, updateState);\n    };\n    const toggleLinkMenuState = (editor) => (api) => {\n        const updateState = () => {\n            api.setEnabled(editor.selection.isEditable());\n        };\n        updateState();\n        return toggleState(editor, updateState);\n    };\n    const toggleRequiresLinkState = (editor) => (api) => {\n        const hasLinks$1 = (parents) => hasLinks(parents) || hasLinksInSelection(editor.selection.getRng());\n        const parents = editor.dom.getParents(editor.selection.getStart());\n        const updateEnabled = (parents) => {\n            api.setEnabled(hasLinks$1(parents) && editor.selection.isEditable());\n        };\n        updateEnabled(parents);\n        return toggleState(editor, (e) => updateEnabled(e.parents));\n    };\n    const setupButtons = (editor, openLink) => {\n        editor.ui.registry.addToggleButton('link', {\n            icon: 'link',\n            tooltip: 'Insert/edit link',\n            shortcut: 'Meta+K',\n            onAction: openDialog(editor),\n            onSetup: toggleLinkState(editor)\n        });\n        editor.ui.registry.addButton('openlink', {\n            icon: 'new-tab',\n            tooltip: 'Open link',\n            onAction: openLink.gotoSelectedLink,\n            onSetup: toggleRequiresLinkState(editor)\n        });\n        editor.ui.registry.addButton('unlink', {\n            icon: 'unlink',\n            tooltip: 'Remove link',\n            onAction: () => unlink(editor),\n            onSetup: toggleRequiresLinkState(editor)\n        });\n    };\n    const setupMenuItems = (editor, openLink) => {\n        editor.ui.registry.addMenuItem('openlink', {\n            text: 'Open link',\n            icon: 'new-tab',\n            onAction: openLink.gotoSelectedLink,\n            onSetup: toggleRequiresLinkState(editor)\n        });\n        editor.ui.registry.addMenuItem('link', {\n            icon: 'link',\n            text: 'Link...',\n            shortcut: 'Meta+K',\n            onAction: openDialog(editor),\n            onSetup: toggleLinkMenuState(editor)\n        });\n        editor.ui.registry.addMenuItem('unlink', {\n            icon: 'unlink',\n            text: 'Remove link',\n            onAction: () => unlink(editor),\n            onSetup: toggleRequiresLinkState(editor)\n        });\n    };\n    const setupContextMenu = (editor) => {\n        const inLink = 'link unlink openlink';\n        const noLink = 'link';\n        editor.ui.registry.addContextMenu('link', {\n            update: (element) => {\n                const isEditable = editor.dom.isEditable(element);\n                if (!isEditable) {\n                    return '';\n                }\n                return hasLinks(editor.dom.getParents(element, 'a')) ? inLink : noLink;\n            }\n        });\n    };\n    const setupContextToolbars = (editor, openLink) => {\n        const collapseSelectionToEnd = (editor) => {\n            editor.selection.collapse(false);\n        };\n        const onSetupLink = (buttonApi) => {\n            const node = editor.selection.getNode();\n            buttonApi.setEnabled(isInAnchor(editor, node) && editor.selection.isEditable());\n            return noop;\n        };\n        /**\n         * if we're editing a link, don't change the text.\n         * if anything other than text is selected, don't change the text.\n         * TINY-9593: If there is a text selection return `Optional.none`\n         * because `mceInsertLink` command will handle the selection.\n         */\n        const getLinkText = (value) => {\n            const anchor = getAnchorElement(editor);\n            const onlyText = isOnlyTextSelected(editor);\n            if (anchor.isNone() && onlyText) {\n                const text = getAnchorText(editor.selection, anchor);\n                return someIf(text.length === 0, value);\n            }\n            else {\n                return Optional.none();\n            }\n        };\n        editor.ui.registry.addContextForm('quicklink', {\n            launch: {\n                type: 'contextformtogglebutton',\n                icon: 'link',\n                tooltip: 'Link',\n                onSetup: toggleLinkState(editor)\n            },\n            label: 'Link',\n            predicate: (node) => hasContextToolbar(editor) && isInAnchor(editor, node),\n            initValue: () => {\n                const elm = getAnchorElement(editor);\n                return elm.fold(constant(''), getHref);\n            },\n            commands: [\n                {\n                    type: 'contextformtogglebutton',\n                    icon: 'link',\n                    tooltip: 'Link',\n                    primary: true,\n                    onSetup: (buttonApi) => {\n                        const node = editor.selection.getNode();\n                        // TODO: Make a test for this later.\n                        buttonApi.setActive(isInAnchor(editor, node));\n                        return toggleLinkState(editor)(buttonApi);\n                    },\n                    onAction: (formApi) => {\n                        const value = formApi.getValue();\n                        const text = getLinkText(value);\n                        const attachState = { href: value, attach: noop };\n                        link(editor, attachState, {\n                            href: value,\n                            text,\n                            title: Optional.none(),\n                            rel: Optional.none(),\n                            target: Optional.from(getDefaultLinkTarget(editor)),\n                            class: Optional.none()\n                        });\n                        collapseSelectionToEnd(editor);\n                        formApi.hide();\n                    }\n                },\n                {\n                    type: 'contextformbutton',\n                    icon: 'unlink',\n                    tooltip: 'Remove link',\n                    onSetup: onSetupLink,\n                    // TODO: The original inlite action was quite complex. Are we missing something with this?\n                    onAction: (formApi) => {\n                        unlink(editor);\n                        formApi.hide();\n                    }\n                },\n                {\n                    type: 'contextformbutton',\n                    icon: 'new-tab',\n                    tooltip: 'Open link',\n                    onSetup: onSetupLink,\n                    onAction: (formApi) => {\n                        openLink.gotoSelectedLink();\n                        formApi.hide();\n                    }\n                }\n            ]\n        });\n    };\n    const setup = (editor) => {\n        const openLink = setup$1(editor);\n        setupButtons(editor, openLink);\n        setupMenuItems(editor, openLink);\n        setupContextMenu(editor);\n        setupContextToolbars(editor, openLink);\n    };\n\n    const PLUGIN_CODE = 'link';\n    var Plugin = () => {\n        global$5.add(PLUGIN_CODE, (editor) => {\n            register$1(editor);\n            register(editor);\n            setup(editor);\n            setup$2(editor);\n            return {\n                getMetadata: () => ({ name: 'Link', type: 'opensource', slug: PLUGIN_CODE })\n            };\n        });\n    };\n\n    Plugin();\n    /** *****\n     * DO NOT EXPORT ANYTHING\n     *\n     * IF YOU DO ROLLUP WILL LEAVE A GLOBAL ON THE PAGE\n     *******/\n\n})();\n", "/**\n * TinyMCE version 8.10.0 (2026-10-14)\n */\n\n(function () {\n    'use strict';\n\n    var global$3 = tinymce.util.Tools.resolve('tinymce.PluginManager');\n\n    /* eslint-disable @typescript-eslint/no-wrapper-object-types */\n    const hasProto = (v, constructor, predicate) => {\n        if (predicate(v, constructor.prototype)) {\n            return true;\n        }\n        else {\n            // String-based fallback time\n            return v.constructor?.name === constructor.name;\n        }\n    };\n    const typeOf = (x) => {\n        const t = typeof x;\n        if (x === null) {\n            return 'null';\n        }\n        else if (t === 'object' && Array.isArray(x)) {\n            return 'array';\n        }\n        else if (t === 'object' && hasProto(x, String, (o, proto) => proto.isPrototypeOf(o))) {\n            return 'string';\n        }\n        else {\n            return t;\n        }\n    };\n    const isType$1 = (type) => (value) => typeOf(value) === type;\n    const isSimpleType = (type) => (value) => typeof value === type;\n    const eq$1 = (t) => (a) => t === a;\n    const isString = isType$1('string');\n    const isArray = isType$1('array');\n    const isBoolean = isSimpleType('boolean');\n    const isUndefined = eq$1(undefined);\n    const isNullable = (a) => a === null || a === undefined;\n    const isNonNullable = (a) => !isNullable(a);\n    const isFunction = isSimpleType('function');\n    const isNumber = isSimpleType('number');\n\n    const noop = () => { };\n    /** Compose two unary functions. Similar to compose, but avoids using Function.prototype.apply. */\n    const compose1 = (fbc, fab) => (a) => fbc(fab(a));\n    const constant = (value) => {\n        return () => {\n            return value;\n        };\n    };\n    const identity = (x) => {\n        return x;\n    };\n    const tripleEquals = (a, b) => {\n        return a === b;\n    };\n    function curry(fn, ...initialArgs) {\n        return (...restArgs) => {\n            const all = initialArgs.concat(restArgs);\n            return fn.apply(null, all);\n        };\n    }\n    const call = (f) => {\n        f();\n    };\n    const never = constant(false);\n    const always = constant(true);\n\n    /**\n     * The `Optional` type represents a value (of any type) that potentially does\n     * not exist. Any `Optional<T>` can either be a `Some<T>` (in which case the\n     * value does exist) or a `None` (in which case the value does not exist). This\n     * module defines a whole lot of FP-inspired utility functions for dealing with\n     * `Optional` objects.\n     *\n     * Comparison with null or undefined:\n     * - We don't get fancy null coalescing operators with `Optional`\n     * - We do get fancy helper functions with `Optional`\n     * - `Optional` support nesting, and allow for the type to still be nullable (or\n     * another `Optional`)\n     * - There is no option to turn off strict-optional-checks like there is for\n     * strict-null-checks\n     */\n    class Optional {\n        tag;\n        value;\n        // Sneaky optimisation: every instance of Optional.none is identical, so just\n        // reuse the same object\n        static singletonNone = new Optional(false);\n        // The internal representation has a `tag` and a `value`, but both are\n        // private: able to be console.logged, but not able to be accessed by code\n        constructor(tag, value) {\n            this.tag = tag;\n            this.value = value;\n        }\n        // --- Identities ---\n        /**\n         * Creates a new `Optional<T>` that **does** contain a value.\n         */\n        static some(value) {\n            return new Optional(true, value);\n        }\n        /**\n         * Create a new `Optional<T>` that **does not** contain a value. `T` can be\n         * any type because we don't actually have a `T`.\n         */\n        static none() {\n            return Optional.singletonNone;\n        }\n        /**\n         * Perform a transform on an `Optional` type. Regardless of whether this\n         * `Optional` contains a value or not, `fold` will return a value of type `U`.\n         * If this `Optional` does not contain a value, the `U` will be created by\n         * calling `onNone`. If this `Optional` does contain a value, the `U` will be\n         * created by calling `onSome`.\n         *\n         * For the FP enthusiasts in the room, this function:\n         * 1. Could be used to implement all of the functions below\n         * 2. Forms a catamorphism\n         */\n        fold(onNone, onSome) {\n            if (this.tag) {\n                return onSome(this.value);\n            }\n            else {\n                return onNone();\n            }\n        }\n        /**\n         * Determine if this `Optional` object contains a value.\n         */\n        isSome() {\n            return this.tag;\n        }\n        /**\n         * Determine if this `Optional` object **does not** contain a value.\n         */\n        isNone() {\n            return !this.tag;\n        }\n        // --- Functor (name stolen from Haskell / maths) ---\n        /**\n         * Perform a transform on an `Optional` object, **if** there is a value. If\n         * you provide a function to turn a T into a U, this is the function you use\n         * to turn an `Optional<T>` into an `Optional<U>`. If this **does** contain\n         * a value then the output will also contain a value (that value being the\n         * output of `mapper(this.value)`), and if this **does not** contain a value\n         * then neither will the output.\n         */\n        map(mapper) {\n            if (this.tag) {\n                return Optional.some(mapper(this.value));\n            }\n            else {\n                return Optional.none();\n            }\n        }\n        // --- Monad (name stolen from Haskell / maths) ---\n        /**\n         * Perform a transform on an `Optional` object, **if** there is a value.\n         * Unlike `map`, here the transform itself also returns an `Optional`.\n         */\n        bind(binder) {\n            if (this.tag) {\n                return binder(this.value);\n            }\n            else {\n                return Optional.none();\n            }\n        }\n        // --- Traversable (name stolen from Haskell / maths) ---\n        /**\n         * For a given predicate, this function finds out if there **exists** a value\n         * inside this `Optional` object that meets the predicate. In practice, this\n         * means that for `Optional`s that do not contain a value it returns false (as\n         * no predicate-meeting value exists).\n         */\n        exists(predicate) {\n            return this.tag && predicate(this.value);\n        }\n        /**\n         * For a given predicate, this function finds out if **all** the values inside\n         * this `Optional` object meet the predicate. In practice, this means that\n         * for `Optional`s that do not contain a value it returns true (as all 0\n         * objects do meet the predicate).\n         */\n        forall(predicate) {\n            return !this.tag || predicate(this.value);\n        }\n        filter(predicate) {\n            if (!this.tag || predicate(this.value)) {\n                return this;\n            }\n            else {\n                return Optional.none();\n            }\n        }\n        // --- Getters ---\n        /**\n         * Get the value out of the inside of the `Optional` object, using a default\n         * `replacement` value if the provided `Optional` object does not contain a\n         * value.\n         */\n        getOr(replacement) {\n            return this.tag ? this.value : replacement;\n        }\n        /**\n         * Get the value out of the inside of the `Optional` object, using a default\n         * `replacement` value if the provided `Optional` object does not contain a\n         * value.  Unlike `getOr`, in this method the `replacement` object is also\n         * `Optional` - meaning that this method will always return an `Optional`.\n         */\n        or(replacement) {\n            return this.tag ? this : replacement;\n        }\n        /**\n         * Get the value out of the inside of the `Optional` object, using a default\n         * `replacement` value if the provided `Optional` object does not contain a\n         * value. Unlike `getOr`, in this method the `replacement` value is\n         * \"thunked\" - that is to say that you don't pass a value to `getOrThunk`, you\n         * pass a function which (if called) will **return** the `value` you want to\n         * use.\n         */\n        getOrThunk(thunk) {\n            return this.tag ? this.value : thunk();\n        }\n        /**\n         * Get the value out of the inside of the `Optional` object, using a default\n         * `replacement` value if the provided Optional object does not contain a\n         * value.\n         *\n         * Unlike `or`, in this method the `replacement` value is \"thunked\" - that is\n         * to say that you don't pass a value to `orThunk`, you pass a function which\n         * (if called) will **return** the `value` you want to use.\n         *\n         * Unlike `getOrThunk`, in this method the `replacement` value is also\n         * `Optional`, meaning that this method will always return an `Optional`.\n         */\n        orThunk(thunk) {\n            return this.tag ? this : thunk();\n        }\n        /**\n         * Get the value out of the inside of the `Optional` object, throwing an\n         * exception if the provided `Optional` object does not contain a value.\n         *\n         * WARNING:\n         * You should only be using this function if you know that the `Optional`\n         * object **is not** empty (otherwise you're throwing exceptions in production\n         * code, which is bad).\n         *\n         * In tests this is more acceptable.\n         *\n         * Prefer other methods to this, such as `.each`.\n         */\n        getOrDie(message) {\n            if (!this.tag) {\n                throw new Error(message ?? 'Called getOrDie on None');\n            }\n            else {\n                return this.value;\n            }\n        }\n        // --- Interop with null and undefined ---\n        /**\n         * Creates an `Optional` value from a nullable (or undefined-able) input.\n         * Null, or undefined, is converted to `None`, and anything else is converted\n         * to `Some`.\n         */\n        static from(value) {\n            return isNonNullable(value) ? Optional.some(value) : Optional.none();\n        }\n        /**\n         * Converts an `Optional` to a nullable type, by getting the value if it\n         * exists, or returning `null` if it does not.\n         */\n        getOrNull() {\n            return this.tag ? this.value : null;\n        }\n        /**\n         * Converts an `Optional` to an undefined-able type, by getting the value if\n         * it exists, or returning `undefined` if it does not.\n         */\n        getOrUndefined() {\n            return this.value;\n        }\n        // --- Utilities ---\n        /**\n         * If the `Optional` contains a value, perform an action on that value.\n         * Unlike the rest of the methods on this type, `.each` has side-effects. If\n         * you want to transform an `Optional<T>` **into** something, then this is not\n         * the method for you. If you want to use an `Optional<T>` to **do**\n         * something, then this is the method for you - provided you're okay with not\n         * doing anything in the case where the `Optional` doesn't have a value inside\n         * it. If you're not sure whether your use-case fits into transforming\n         * **into** something or **doing** something, check whether it has a return\n         * value. If it does, you should be performing a transform.\n         */\n        each(worker) {\n            if (this.tag) {\n                worker(this.value);\n            }\n        }\n        /**\n         * Turn the `Optional` object into an array that contains all of the values\n         * stored inside the `Optional`. In practice, this means the output will have\n         * either 0 or 1 elements.\n         */\n        toArray() {\n            return this.tag ? [this.value] : [];\n        }\n        /**\n         * Turn the `Optional` object into a string for debugging or printing. Not\n         * recommended for production code, but good for debugging. Also note that\n         * these days an `Optional` object can be logged to the console directly, and\n         * its inner value (if it exists) will be visible.\n         */\n        toString() {\n            return this.tag ? `some(${this.value})` : 'none()';\n        }\n    }\n\n    const nativeSlice = Array.prototype.slice;\n    const nativeIndexOf = Array.prototype.indexOf;\n    const nativePush = Array.prototype.push;\n    const rawIndexOf = (ts, t) => nativeIndexOf.call(ts, t);\n    const contains = (xs, x) => rawIndexOf(xs, x) > -1;\n    const exists = (xs, pred) => {\n        for (let i = 0, len = xs.length; i < len; i++) {\n            const x = xs[i];\n            if (pred(x, i)) {\n                return true;\n            }\n        }\n        return false;\n    };\n    const range = (num, f) => {\n        const r = [];\n        for (let i = 0; i < num; i++) {\n            r.push(f(i));\n        }\n        return r;\n    };\n    const map = (xs, f) => {\n        // pre-allocating array size when it's guaranteed to be known\n        // http://jsperf.com/push-allocated-vs-dynamic/22\n        const len = xs.length;\n        const r = new Array(len);\n        for (let i = 0; i < len; i++) {\n            const x = xs[i];\n            r[i] = f(x, i);\n        }\n        return r;\n    };\n    // Unwound implementing other functions in terms of each.\n    // The code size is roughly the same, and it should allow for better optimisation.\n    // const each = function<T, U>(xs: T[], f: (x: T, i?: number, xs?: T[]) => void): void {\n    const each$1 = (xs, f) => {\n        for (let i = 0, len = xs.length; i < len; i++) {\n            const x = xs[i];\n            f(x, i);\n        }\n    };\n    const eachr = (xs, f) => {\n        for (let i = xs.length - 1; i >= 0; i--) {\n            const x = xs[i];\n            f(x, i);\n        }\n    };\n    const partition = (xs, pred) => {\n        const pass = [];\n        const fail = [];\n        for (let i = 0, len = xs.length; i < len; i++) {\n            const x = xs[i];\n            const arr = pred(x, i) ? pass : fail;\n            arr.push(x);\n        }\n        return { pass, fail };\n    };\n    const filter$1 = (xs, pred) => {\n        const r = [];\n        for (let i = 0, len = xs.length; i < len; i++) {\n            const x = xs[i];\n            if (pred(x, i)) {\n                r.push(x);\n            }\n        }\n        return r;\n    };\n    const foldr = (xs, f, acc) => {\n        eachr(xs, (x, i) => {\n            acc = f(acc, x, i);\n        });\n        return acc;\n    };\n    const foldl = (xs, f, acc) => {\n        each$1(xs, (x, i) => {\n            acc = f(acc, x, i);\n        });\n        return acc;\n    };\n    const findUntil = (xs, pred, until) => {\n        for (let i = 0, len = xs.length; i < len; i++) {\n            const x = xs[i];\n            if (pred(x, i)) {\n                return Optional.some(x);\n            }\n            else if (until(x, i)) {\n                break;\n            }\n        }\n        return Optional.none();\n    };\n    const find = (xs, pred) => {\n        return findUntil(xs, pred, never);\n    };\n    const findIndex = (xs, pred) => {\n        for (let i = 0, len = xs.length; i < len; i++) {\n            const x = xs[i];\n            if (pred(x, i)) {\n                return Optional.some(i);\n            }\n        }\n        return Optional.none();\n    };\n    const flatten$1 = (xs) => {\n        // Note, this is possible because push supports multiple arguments:\n        // http://jsperf.com/concat-push/6\n        // Note that in the past, concat() would silently work (very slowly) for array-like objects.\n        // With this change it will throw an error.\n        const r = [];\n        for (let i = 0, len = xs.length; i < len; ++i) {\n            // Ensure that each value is an array itself\n            if (!isArray(xs[i])) {\n                throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs);\n            }\n            nativePush.apply(r, xs[i]);\n        }\n        return r;\n    };\n    const bind = (xs, f) => flatten$1(map(xs, f));\n    const forall = (xs, pred) => {\n        for (let i = 0, len = xs.length; i < len; ++i) {\n            const x = xs[i];\n            if (pred(x, i) !== true) {\n                return false;\n            }\n        }\n        return true;\n    };\n    const mapToObject = (xs, f) => {\n        const r = {};\n        for (let i = 0, len = xs.length; i < len; i++) {\n            const x = xs[i];\n            r[String(x)] = f(x, i);\n        }\n        return r;\n    };\n    const get$4 = (xs, i) => i >= 0 && i < xs.length ? Optional.some(xs[i]) : Optional.none();\n    const head = (xs) => get$4(xs, 0);\n    const last = (xs) => get$4(xs, xs.length - 1);\n    isFunction(Array.from) ? Array.from : (x) => nativeSlice.call(x);\n    const findMap = (arr, f) => {\n        for (let i = 0; i < arr.length; i++) {\n            const r = f(arr[i], i);\n            if (r.isSome()) {\n                return r;\n            }\n        }\n        return Optional.none();\n    };\n\n    // There are many variations of Object iteration that are faster than the 'for-in' style:\n    // http://jsperf.com/object-keys-iteration/107\n    //\n    // Use the native keys if it is available (IE9+), otherwise fall back to manually filtering\n    const keys = Object.keys;\n    const hasOwnProperty = Object.hasOwnProperty;\n    const each = (obj, f) => {\n        const props = keys(obj);\n        for (let k = 0, len = props.length; k < len; k++) {\n            const i = props[k];\n            const x = obj[i];\n            f(x, i);\n        }\n    };\n    const objAcc = (r) => (x, i) => {\n        r[i] = x;\n    };\n    const internalFilter = (obj, pred, onTrue, onFalse) => {\n        each(obj, (x, i) => {\n            (pred(x, i) ? onTrue : onFalse)(x, i);\n        });\n    };\n    const filter = (obj, pred) => {\n        const t = {};\n        internalFilter(obj, pred, objAcc(t), noop);\n        return t;\n    };\n    const mapToArray = (obj, f) => {\n        const r = [];\n        each(obj, (value, name) => {\n            r.push(f(value, name));\n        });\n        return r;\n    };\n    const values = (obj) => {\n        return mapToArray(obj, identity);\n    };\n    const size = (obj) => {\n        return keys(obj).length;\n    };\n    const get$3 = (obj, key) => {\n        return has(obj, key) ? Optional.from(obj[key]) : Optional.none();\n    };\n    const has = (obj, key) => hasOwnProperty.call(obj, key);\n    const hasNonNullableKey = (obj, key) => has(obj, key) && obj[key] !== undefined && obj[key] !== null;\n    const isEmpty$1 = (r) => {\n        for (const x in r) {\n            if (hasOwnProperty.call(r, x)) {\n                return false;\n            }\n        }\n        return true;\n    };\n\n    const Cell = (initial) => {\n        let value = initial;\n        const get = () => {\n            return value;\n        };\n        const set = (v) => {\n            value = v;\n        };\n        return {\n            get,\n            set\n        };\n    };\n\n    /**\n     * **Is** the value stored inside this Optional object equal to `rhs`?\n     */\n    const is$2 = (lhs, rhs, comparator = tripleEquals) => lhs.exists((left) => comparator(left, rhs));\n    const cat = (arr) => {\n        const r = [];\n        const push = (x) => {\n            r.push(x);\n        };\n        for (let i = 0; i < arr.length; i++) {\n            arr[i].each(push);\n        }\n        return r;\n    };\n    /*\n    Notes on the lift functions:\n    - We used to have a generic liftN, but we were concerned about its type-safety, and the below variants were faster in microbenchmarks.\n    - The getOrDie calls are partial functions, but are checked beforehand. This is faster and more convenient (but less safe) than folds.\n    - && is used instead of a loop for simplicity and performance.\n    */\n    const lift2 = (oa, ob, f) => oa.isSome() && ob.isSome() ? Optional.some(f(oa.getOrDie(), ob.getOrDie())) : Optional.none();\n    const flatten = (oot) => oot.bind(identity);\n    // This can help with type inference, by specifying the type param on the none case, so the caller doesn't have to.\n    const someIf = (b, a) => b ? Optional.some(a) : Optional.none();\n\n    const singleton = (doRevoke) => {\n        const subject = Cell(Optional.none());\n        const revoke = () => subject.get().each(doRevoke);\n        const clear = () => {\n            revoke();\n            subject.set(Optional.none());\n        };\n        const isSet = () => subject.get().isSome();\n        const get = () => subject.get();\n        const set = (s) => {\n            revoke();\n            subject.set(Optional.some(s));\n        };\n        return {\n            clear,\n            isSet,\n            get,\n            set\n        };\n    };\n    const unbindable = () => singleton((s) => s.unbind());\n\n    const removeFromStart = (str, numChars) => {\n        return str.substring(numChars);\n    };\n\n    const checkRange = (str, substr, start) => substr === '' || str.length >= substr.length && str.substr(start, start + substr.length) === substr;\n    const removeLeading = (str, prefix) => {\n        return startsWith(str, prefix) ? removeFromStart(str, prefix.length) : str;\n    };\n    /** Does 'str' start with 'prefix'?\n     *  Note: all strings start with the empty string.\n     *        More formally, for all strings x, startsWith(x, \"\").\n     *        This is so that for all strings x and y, startsWith(y + x, y)\n     */\n    const startsWith = (str, prefix) => {\n        return checkRange(str, prefix, 0);\n    };\n    const blank = (r) => (s) => s.replace(r, '');\n    /** removes all leading and trailing spaces */\n    const trim = blank(/^\\s+|\\s+$/g);\n    const isNotEmpty = (s) => s.length > 0;\n    const isEmpty = (s) => !isNotEmpty(s);\n    const toInt = (value, radix = 10) => {\n        const num = parseInt(value, radix);\n        return isNaN(num) ? Optional.none() : Optional.some(num);\n    };\n    const toFloat = (value) => {\n        const num = parseFloat(value);\n        return isNaN(num) ? Optional.none() : Optional.some(num);\n    };\n\n    const cached = (f) => {\n        let called = false;\n        let r;\n        return (...args) => {\n            if (!called) {\n                called = true;\n                r = f.apply(null, args);\n            }\n            return r;\n        };\n    };\n\n    const fromHtml = (html, scope) => {\n        const doc = scope || document;\n        const div = doc.createElement('div');\n        div.innerHTML = html;\n        if (!div.hasChildNodes() || div.childNodes.length > 1) {\n            const message = 'HTML does not have a single root node';\n            // eslint-disable-next-line no-console\n            console.error(message, html);\n            throw new Error(message);\n        }\n        return fromDom$1(div.childNodes[0]);\n    };\n    const fromTag = (tag, scope) => {\n        const doc = scope || document;\n        const node = doc.createElement(tag);\n        return fromDom$1(node);\n    };\n    const fromText = (text, scope) => {\n        const doc = scope || document;\n        const node = doc.createTextNode(text);\n        return fromDom$1(node);\n    };\n    const fromDom$1 = (node) => {\n        // TODO: Consider removing this check, but left atm for safety\n        if (node === null || node === undefined) {\n            throw new Error('Node cannot be null or undefined');\n        }\n        return {\n            dom: node\n        };\n    };\n    const fromPoint = (docElm, x, y) => Optional.from(docElm.dom.elementFromPoint(x, y)).map(fromDom$1);\n    // tslint:disable-next-line:variable-name\n    const SugarElement = {\n        fromHtml,\n        fromTag,\n        fromText,\n        fromDom: fromDom$1,\n        fromPoint\n    };\n\n    const COMMENT = 8;\n    const DOCUMENT = 9;\n    const DOCUMENT_FRAGMENT = 11;\n    const ELEMENT = 1;\n    const TEXT = 3;\n\n    const is$1 = (element, selector) => {\n        const dom = element.dom;\n        if (dom.nodeType !== ELEMENT) {\n            return false;\n        }\n        else {\n            const elem = dom;\n            if (elem.matches !== undefined) {\n                return elem.matches(selector);\n            }\n            else if (elem.msMatchesSelector !== undefined) {\n                return elem.msMatchesSelector(selector);\n            }\n            else if (elem.webkitMatchesSelector !== undefined) {\n                return elem.webkitMatchesSelector(selector);\n            }\n            else if (elem.mozMatchesSelector !== undefined) {\n                // cast to any as mozMatchesSelector doesn't exist in TS DOM lib\n                return elem.mozMatchesSelector(selector);\n            }\n            else {\n                throw new Error('Browser lacks native selectors');\n            } // unfortunately we can't throw this on startup :(\n        }\n    };\n    const bypassSelector = (dom) => \n    // Only elements, documents and shadow roots support querySelector\n    // shadow root element type is DOCUMENT_FRAGMENT\n    dom.nodeType !== ELEMENT && dom.nodeType !== DOCUMENT && dom.nodeType !== DOCUMENT_FRAGMENT ||\n        // IE fix for complex queries on empty nodes: http://jsfiddle.net/spyder/fv9ptr5L/\n        dom.childElementCount === 0;\n    const all$1 = (selector, scope) => {\n        const base = scope === undefined ? document : scope.dom;\n        return bypassSelector(base) ? [] : map(base.querySelectorAll(selector), SugarElement.fromDom);\n    };\n    const one = (selector, scope) => {\n        const base = scope === undefined ? document : scope.dom;\n        return bypassSelector(base) ? Optional.none() : Optional.from(base.querySelector(selector)).map(SugarElement.fromDom);\n    };\n\n    const eq = (e1, e2) => e1.dom === e2.dom;\n    const is = is$1;\n\n    const name = (element) => {\n        const r = element.dom.nodeName;\n        return r.toLowerCase();\n    };\n    const type = (element) => element.dom.nodeType;\n    const isType = (t) => (element) => type(element) === t;\n    const isComment = (element) => type(element) === COMMENT || name(element) === '#comment';\n    const isElement = isType(ELEMENT);\n    const isText = isType(TEXT);\n    const isDocument = isType(DOCUMENT);\n    const isDocumentFragment = isType(DOCUMENT_FRAGMENT);\n    const isTag = (tag) => (e) => isElement(e) && name(e) === tag;\n\n    /**\n     * The document associated with the current element\n     * NOTE: this will throw if the owner is null.\n     */\n    const owner = (element) => SugarElement.fromDom(element.dom.ownerDocument);\n    /**\n     * If the element is a document, return it. Otherwise, return its ownerDocument.\n     * @param dos\n     */\n    const documentOrOwner = (dos) => isDocument(dos) ? dos : owner(dos);\n    const parent = (element) => Optional.from(element.dom.parentNode).map(SugarElement.fromDom);\n    const parents = (element, isRoot) => {\n        const stop = isFunction(isRoot) ? isRoot : never;\n        // This is used a *lot* so it needs to be performant, not recursive\n        let dom = element.dom;\n        const ret = [];\n        while (dom.parentNode !== null && dom.parentNode !== undefined) {\n            const rawParent = dom.parentNode;\n            const p = SugarElement.fromDom(rawParent);\n            ret.push(p);\n            if (stop(p) === true) {\n                break;\n            }\n            else {\n                dom = rawParent;\n            }\n        }\n        return ret;\n    };\n    const prevSibling = (element) => Optional.from(element.dom.previousSibling).map(SugarElement.fromDom);\n    const nextSibling = (element) => Optional.from(element.dom.nextSibling).map(SugarElement.fromDom);\n    const children$3 = (element) => map(element.dom.childNodes, SugarElement.fromDom);\n    const child$3 = (element, index) => {\n        const cs = element.dom.childNodes;\n        return Optional.from(cs[index]).map(SugarElement.fromDom);\n    };\n    const firstChild = (element) => child$3(element, 0);\n\n    /**\n     * Is the element a ShadowRoot?\n     *\n     * Note: this is insufficient to test if any element is a shadow root, but it is sufficient to differentiate between\n     * a Document and a ShadowRoot.\n     */\n    const isShadowRoot = (dos) => isDocumentFragment(dos) && isNonNullable(dos.dom.host);\n    const getRootNode = (e) => SugarElement.fromDom(e.dom.getRootNode());\n    /** If this element is in a ShadowRoot, return it. */\n    const getShadowRoot = (e) => {\n        const r = getRootNode(e);\n        return isShadowRoot(r) ? Optional.some(r) : Optional.none();\n    };\n    /** Return the host of a ShadowRoot.\n     *\n     * This function will throw if Shadow DOM is unsupported in the browser, or if the host is null.\n     * If you actually have a ShadowRoot, this shouldn't happen.\n     */\n    const getShadowHost = (e) => SugarElement.fromDom(e.dom.host);\n\n    const before = (marker, element) => {\n        const parent$1 = parent(marker);\n        parent$1.each((v) => {\n            v.dom.insertBefore(element.dom, marker.dom);\n        });\n    };\n    const after$1 = (marker, element) => {\n        const sibling = nextSibling(marker);\n        sibling.fold(() => {\n            const parent$1 = parent(marker);\n            parent$1.each((v) => {\n                append$1(v, element);\n            });\n        }, (v) => {\n            before(v, element);\n        });\n    };\n    const prepend = (parent, element) => {\n        const firstChild$1 = firstChild(parent);\n        firstChild$1.fold(() => {\n            append$1(parent, element);\n        }, (v) => {\n            parent.dom.insertBefore(element.dom, v.dom);\n        });\n    };\n    const append$1 = (parent, element) => {\n        parent.dom.appendChild(element.dom);\n    };\n    const wrap = (element, wrapper) => {\n        before(element, wrapper);\n        append$1(wrapper, element);\n    };\n\n    const after = (marker, elements) => {\n        each$1(elements, (x, i) => {\n            const e = i === 0 ? marker : elements[i - 1];\n            after$1(e, x);\n        });\n    };\n    const append = (parent, elements) => {\n        each$1(elements, (x) => {\n            append$1(parent, x);\n        });\n    };\n\n    const rawSet = (dom, key, value) => {\n        /*\n         * JQuery coerced everything to a string, and silently did nothing on text node/null/undefined.\n         *\n         * We fail on those invalid cases, only allowing numbers and booleans.\n         */\n        if (isString(value) || isBoolean(value) || isNumber(value)) {\n            dom.setAttribute(key, value + '');\n        }\n        else {\n            // eslint-disable-next-line no-console\n            console.error('Invalid call to Attribute.set. Key ', key, ':: Value ', value, ':: Element ', dom);\n            throw new Error('Attribute value was not simple');\n        }\n    };\n    const set$2 = (element, key, value) => {\n        rawSet(element.dom, key, value);\n    };\n    const setAll = (element, attrs) => {\n        const dom = element.dom;\n        each(attrs, (v, k) => {\n            rawSet(dom, k, v);\n        });\n    };\n    const get$2 = (element, key) => {\n        const v = element.dom.getAttribute(key);\n        // undefined is the more appropriate value for JS, and this matches JQuery\n        return v === null ? undefined : v;\n    };\n    const getOpt = (element, key) => Optional.from(get$2(element, key));\n    const remove$2 = (element, key) => {\n        element.dom.removeAttribute(key);\n    };\n    const clone = (element) => foldl(element.dom.attributes, (acc, attr) => {\n        acc[attr.name] = attr.value;\n        return acc;\n    }, {});\n\n    const remove$1 = (element) => {\n        const dom = element.dom;\n        if (dom.parentNode !== null) {\n            dom.parentNode.removeChild(dom);\n        }\n    };\n    const unwrap = (wrapper) => {\n        const children = children$3(wrapper);\n        if (children.length > 0) {\n            after(wrapper, children);\n        }\n        remove$1(wrapper);\n    };\n\n    const fromDom = (nodes) => map(nodes, SugarElement.fromDom);\n\n    // some elements, such as mathml, don't have style attributes\n    // others, such as angular elements, have style attributes that aren't a CSSStyleDeclaration\n    const isSupported = (dom) => dom.style !== undefined && isFunction(dom.style.getPropertyValue);\n\n    // Node.contains() is very, very, very good performance\n    // http://jsperf.com/closest-vs-contains/5\n    const inBody = (element) => {\n        // Technically this is only required on IE, where contains() returns false for text nodes.\n        // But it's cheap enough to run everywhere and Sugar doesn't have platform detection (yet).\n        const dom = isText(element) ? element.dom.parentNode : element.dom;\n        // use ownerDocument.body to ensure this works inside iframes.\n        // Normally contains is bad because an element \"contains\" itself, but here we want that.\n        if (dom === undefined || dom === null || dom.ownerDocument === null) {\n            return false;\n        }\n        const doc = dom.ownerDocument;\n        return getShadowRoot(SugarElement.fromDom(dom)).fold(() => doc.body.contains(dom), compose1(inBody, getShadowHost));\n    };\n\n    const internalSet = (dom, property, value) => {\n        // This is going to hurt. Apologies.\n        // JQuery coerces numbers to pixels for certain property names, and other times lets numbers through.\n        // we're going to be explicit; strings only.\n        if (!isString(value)) {\n            // eslint-disable-next-line no-console\n            console.error('Invalid call to CSS.set. Property ', property, ':: Value ', value, ':: Element ', dom);\n            throw new Error('CSS value must be a string: ' + value);\n        }\n        // removed: support for dom().style[property] where prop is camel case instead of normal property name\n        if (isSupported(dom)) {\n            dom.style.setProperty(property, value);\n        }\n    };\n    const internalRemove = (dom, property) => {\n        /*\n         * IE9 and above - MDN doesn't have details, but here's a couple of random internet claims\n         *\n         * http://help.dottoro.com/ljopsjck.php\n         * http://stackoverflow.com/a/7901886/7546\n         */\n        if (isSupported(dom)) {\n            dom.style.removeProperty(property);\n        }\n    };\n    const set$1 = (element, property, value) => {\n        const dom = element.dom;\n        internalSet(dom, property, value);\n    };\n    /*\n     * NOTE: For certain properties, this returns the \"used value\" which is subtly different to the \"computed value\" (despite calling getComputedStyle).\n     * Blame CSS 2.0.\n     *\n     * https://developer.mozilla.org/en-US/docs/Web/CSS/used_value\n     */\n    const get$1 = (element, property) => {\n        const dom = element.dom;\n        /*\n         * IE9 and above per\n         * https://developer.mozilla.org/en/docs/Web/API/window.getComputedStyle\n         *\n         * Not in numerosity, because it doesn't memoize and looking this up dynamically in performance critical code would be horrendous.\n         *\n         * JQuery has some magic here for IE popups, but we don't really need that.\n         * It also uses element.ownerDocument.defaultView to handle iframes but that hasn't been required since FF 3.6.\n         */\n        const styles = window.getComputedStyle(dom);\n        const r = styles.getPropertyValue(property);\n        // jquery-ism: If r is an empty string, check that the element is not in a document. If it isn't, return the raw value.\n        // Turns out we do this a lot.\n        return (r === '' && !inBody(element)) ? getUnsafeProperty(dom, property) : r;\n    };\n    // removed: support for dom().style[property] where prop is camel case instead of normal property name\n    // empty string is what the browsers (IE11 and Chrome) return when the propertyValue doesn't exists.\n    const getUnsafeProperty = (dom, property) => isSupported(dom) ? dom.style.getPropertyValue(property) : '';\n    /*\n     * Gets the raw value from the style attribute. Useful for retrieving \"used values\" from the DOM:\n     * https://developer.mozilla.org/en-US/docs/Web/CSS/used_value\n     *\n     * Returns NONE if the property isn't set, or the value is an empty string.\n     */\n    const getRaw$1 = (element, property) => {\n        const dom = element.dom;\n        const raw = getUnsafeProperty(dom, property);\n        return Optional.from(raw).filter((r) => r.length > 0);\n    };\n    const remove = (element, property) => {\n        const dom = element.dom;\n        internalRemove(dom, property);\n        if (is$2(getOpt(element, 'style').map(trim), '')) {\n            // No more styles left, remove the style attribute as well\n            remove$2(element, 'style');\n        }\n    };\n\n    const Dimension = (name, getOffset) => {\n        const set = (element, h) => {\n            if (!isNumber(h) && !h.match(/^[0-9]+$/)) {\n                throw new Error(name + '.set accepts only positive integer values. Value was ' + h);\n            }\n            const dom = element.dom;\n            if (isSupported(dom)) {\n                dom.style[name] = h + 'px';\n            }\n        };\n        /*\n         * jQuery supports querying width and height on the document and window objects.\n         *\n         * TBIO doesn't do this, so the code is removed to save space, but left here just in case.\n         */\n        /*\n        var getDocumentWidth = (element) => {\n          var dom = element.dom;\n          if (Node.isDocument(element)) {\n            var body = dom.body;\n            var doc = dom.documentElement;\n            return Math.max(\n              body.scrollHeight,\n              doc.scrollHeight,\n              body.offsetHeight,\n              doc.offsetHeight,\n              doc.clientHeight\n            );\n          }\n        };\n      \n        var getWindowWidth = (element) => {\n          var dom = element.dom;\n          if (dom.window === dom) {\n            // There is no offsetHeight on a window, so use the clientHeight of the document\n            return dom.document.documentElement.clientHeight;\n          }\n        };\n      */\n        const get = (element) => {\n            const r = getOffset(element);\n            // zero or null means non-standard or disconnected, fall back to CSS\n            if (r <= 0 || r === null) {\n                const css = get$1(element, name);\n                // ugh this feels dirty, but it saves cycles\n                return parseFloat(css) || 0;\n            }\n            return r;\n        };\n        // in jQuery, getOuter replicates (or uses) box-sizing: border-box calculations\n        // although these calculations only seem relevant for quirks mode, and edge cases TBIO doesn't rely on\n        const getOuter = get;\n        const aggregate = (element, properties) => foldl(properties, (acc, property) => {\n            const val = get$1(element, property);\n            const value = val === undefined ? 0 : parseInt(val, 10);\n            return isNaN(value) ? acc : acc + value;\n        }, 0);\n        const max = (element, value, properties) => {\n            const cumulativeInclusions = aggregate(element, properties);\n            // if max-height is 100px and your cumulativeInclusions is 150px, there is no way max-height can be 100px, so we return 0.\n            const absoluteMax = value > cumulativeInclusions ? value - cumulativeInclusions : 0;\n            return absoluteMax;\n        };\n        return {\n            set,\n            get,\n            getOuter,\n            aggregate,\n            max\n        };\n    };\n\n    const toNumber = (px, fallback) => toFloat(px).getOr(fallback);\n    const getProp = (element, name, fallback) => toNumber(get$1(element, name), fallback);\n    const calcContentBoxSize = (element, size, upper, lower) => {\n        const paddingUpper = getProp(element, `padding-${upper}`, 0);\n        const paddingLower = getProp(element, `padding-${lower}`, 0);\n        const borderUpper = getProp(element, `border-${upper}-width`, 0);\n        const borderLower = getProp(element, `border-${lower}-width`, 0);\n        return size - paddingUpper - paddingLower - borderUpper - borderLower;\n    };\n    const getCalculatedWidth = (element, boxSizing) => {\n        const dom = element.dom;\n        const width = dom.getBoundingClientRect().width || dom.offsetWidth;\n        return boxSizing === 'border-box' ? width : calcContentBoxSize(element, width, 'left', 'right');\n    };\n    const getInnerWidth = (element) => getCalculatedWidth(element, 'content-box');\n\n    Dimension('width', (element) => {\n        const dom = element.dom;\n        return inBody(element) ? dom.getBoundingClientRect().width : dom.offsetWidth;\n    });\n    const getInner = getInnerWidth;\n\n    const NodeValue = (is, name) => {\n        const get = (element) => {\n            if (!is(element)) {\n                throw new Error('Can only get ' + name + ' value of a ' + name + ' node');\n            }\n            return getOption(element).getOr('');\n        };\n        const getOption = (element) => is(element) ? Optional.from(element.dom.nodeValue) : Optional.none();\n        const set = (element, value) => {\n            if (!is(element)) {\n                throw new Error('Can only set raw ' + name + ' value of a ' + name + ' node');\n            }\n            element.dom.nodeValue = value;\n        };\n        return {\n            get,\n            getOption,\n            set\n        };\n    };\n\n    const api = NodeValue(isText, 'text');\n    const get = (element) => api.get(element);\n    const set = (element, value) => api.set(element, value);\n\n    var ClosestOrAncestor = (is, ancestor, scope, a, isRoot) => {\n        if (is(scope, a)) {\n            return Optional.some(scope);\n        }\n        else if (isFunction(isRoot) && isRoot(scope)) {\n            return Optional.none();\n        }\n        else {\n            return ancestor(scope, a, isRoot);\n        }\n    };\n\n    const ancestor$1 = (scope, predicate, isRoot) => {\n        let element = scope.dom;\n        const stop = isFunction(isRoot) ? isRoot : never;\n        while (element.parentNode) {\n            element = element.parentNode;\n            const el = SugarElement.fromDom(element);\n            if (predicate(el)) {\n                return Optional.some(el);\n            }\n            else if (stop(el)) {\n                break;\n            }\n        }\n        return Optional.none();\n    };\n    const closest$2 = (scope, predicate, isRoot) => {\n        // This is required to avoid ClosestOrAncestor passing the predicate to itself\n        const is = (s, test) => test(s);\n        return ClosestOrAncestor(is, ancestor$1, scope, predicate, isRoot);\n    };\n    const child$2 = (scope, predicate) => {\n        const pred = (node) => predicate(SugarElement.fromDom(node));\n        const result = find(scope.dom.childNodes, pred);\n        return result.map(SugarElement.fromDom);\n    };\n\n    const ancestor = (scope, selector, isRoot) => ancestor$1(scope, (e) => is$1(e, selector), isRoot);\n    const child$1 = (scope, selector) => child$2(scope, (e) => is$1(e, selector));\n    const descendant = (scope, selector) => one(selector, scope);\n    // Returns Some(closest ancestor element (sugared)) matching 'selector' up to isRoot, or None() otherwise\n    const closest$1 = (scope, selector, isRoot) => {\n        const is = (element, selector) => is$1(element, selector);\n        return ClosestOrAncestor(is, ancestor, scope, selector, isRoot);\n    };\n\n    const closest = (target) => closest$1(target, '[contenteditable]');\n    const isEditable = (element, assumeEditable = false) => {\n        if (inBody(element)) {\n            return element.dom.isContentEditable;\n        }\n        else {\n            // Find the closest contenteditable element and check if it's editable\n            return closest(element).fold(constant(assumeEditable), (editable) => getRaw(editable) === 'true');\n        }\n    };\n    const getRaw = (element) => element.dom.contentEditable;\n\n    const children$2 = (scope, predicate) => filter$1(children$3(scope), predicate);\n    const descendants$1 = (scope, predicate) => {\n        let result = [];\n        // Recurse.toArray() might help here\n        each$1(children$3(scope), (x) => {\n            if (predicate(x)) {\n                result = result.concat([x]);\n            }\n            result = result.concat(descendants$1(x, predicate));\n        });\n        return result;\n    };\n\n    const children$1 = (scope, selector) => \n    // It may surprise you to learn this is exactly what JQuery does\n    // TODO: Avoid all the wrapping and unwrapping\n    children$2(scope, (e) => is$1(e, selector));\n    const descendants = (scope, selector) => all$1(selector, scope);\n\n    const child = (scope, selector) => child$1(scope, selector).isSome();\n\n    /*\n     NOTE: This file is partially duplicated in the following locations:\n      - models/dom/table/core/TableUtils.ts\n      - advtable\n     Make sure that if making changes to this file, the other files are updated as well\n     */\n    const getNodeName = (elm) => elm.nodeName.toLowerCase();\n    const getBody = (editor) => SugarElement.fromDom(editor.getBody());\n    const getIsRoot = (editor) => (element) => eq(element, getBody(editor));\n    const removePxSuffix = (size) => size ? size.replace(/px$/, '') : '';\n    const addPxSuffix = (size) => /^\\d+(\\.\\d+)?$/.test(size) ? size + 'px' : size;\n    const getSelectionStart = (editor) => SugarElement.fromDom(editor.selection.getStart());\n    const getSelectionEnd = (editor) => SugarElement.fromDom(editor.selection.getEnd());\n    const isInEditableContext = (cell) => closest$2(cell, isTag('table')).forall(isEditable);\n\n    const validSectionList = ['tfoot', 'thead', 'tbody', 'colgroup'];\n    const isValidSection = (parentName) => contains(validSectionList, parentName);\n    const grid = (rows, columns) => ({\n        rows,\n        columns\n    });\n    const detail = (element, rowspan, colspan) => ({\n        element,\n        rowspan,\n        colspan\n    });\n    const extended = (element, rowspan, colspan, row, column, isLocked) => ({\n        element,\n        rowspan,\n        colspan,\n        row,\n        column,\n        isLocked\n    });\n    const rowdetail = (element, cells, section) => ({\n        element,\n        cells,\n        section\n    });\n    const bounds = (startRow, startCol, finishRow, finishCol) => ({\n        startRow,\n        startCol,\n        finishRow,\n        finishCol\n    });\n    const columnext = (element, colspan, column) => ({\n        element,\n        colspan,\n        column\n    });\n    const colgroup = (element, columns) => ({\n        element,\n        columns\n    });\n\n    const getAttrValue = (cell, name, fallback = 0) => getOpt(cell, name).map((value) => parseInt(value, 10)).getOr(fallback);\n\n    const firstLayer = (scope, selector) => {\n        return filterFirstLayer(scope, selector, always);\n    };\n    const filterFirstLayer = (scope, selector, predicate) => {\n        return bind(children$3(scope), (x) => {\n            if (is$1(x, selector)) {\n                return predicate(x) ? [x] : [];\n            }\n            else {\n                return filterFirstLayer(x, selector, predicate);\n            }\n        });\n    };\n\n    // lookup inside this table\n    const lookup = (tags, element, isRoot = never) => {\n        // If the element we're inspecting is the root, we definitely don't want it.\n        if (isRoot(element)) {\n            return Optional.none();\n        }\n        // This looks a lot like SelectorFind.closest, with one big exception - the isRoot check.\n        // The code here will look for parents if passed a table, SelectorFind.closest with that specific isRoot check won't.\n        if (contains(tags, name(element))) {\n            return Optional.some(element);\n        }\n        const isRootOrUpperTable = (elm) => is$1(elm, 'table') || isRoot(elm);\n        return ancestor(element, tags.join(','), isRootOrUpperTable);\n    };\n    /*\n     * Identify the optional cell that element represents.\n     */\n    const cell = (element, isRoot) => lookup(['td', 'th'], element, isRoot);\n    const cells = (ancestor) => firstLayer(ancestor, 'th,td');\n    const columns = (ancestor) => {\n        if (is$1(ancestor, 'colgroup')) {\n            return children$1(ancestor, 'col');\n        }\n        else {\n            return bind(columnGroups(ancestor), (columnGroup) => children$1(columnGroup, 'col'));\n        }\n    };\n    const table = (element, isRoot) => closest$1(element, 'table', isRoot);\n    const rows = (ancestor) => firstLayer(ancestor, 'tr');\n    const columnGroups = (ancestor) => table(ancestor).fold(constant([]), (table) => children$1(table, 'colgroup'));\n\n    const isHeaderCell = isTag('th');\n    const getRowHeaderType = (isHeaderRow, isHeaderCells) => {\n        if (isHeaderRow && isHeaderCells) {\n            return 'sectionCells';\n        }\n        else if (isHeaderRow) {\n            return 'section';\n        }\n        else {\n            return 'cells';\n        }\n    };\n    const getRowType$1 = (row) => {\n        // Header rows can use a combination of theads and ths - want to detect the different combinations\n        const isHeaderRow = row.section === 'thead';\n        const isHeaderCells = is$2(findCommonCellType(row.cells), 'th');\n        if (row.section === 'tfoot') {\n            return { type: 'footer' };\n        }\n        else if (isHeaderRow || isHeaderCells) {\n            return { type: 'header', subType: getRowHeaderType(isHeaderRow, isHeaderCells) };\n        }\n        else {\n            return { type: 'body' };\n        }\n    };\n    const findCommonCellType = (cells) => {\n        const headerCells = filter$1(cells, (cell) => isHeaderCell(cell.element));\n        if (headerCells.length === 0) {\n            return Optional.some('td');\n        }\n        else if (headerCells.length === cells.length) {\n            return Optional.some('th');\n        }\n        else {\n            return Optional.none();\n        }\n    };\n    const findCommonRowType = (rows) => {\n        const rowTypes = map(rows, (row) => getRowType$1(row).type);\n        const hasHeader = contains(rowTypes, 'header');\n        const hasFooter = contains(rowTypes, 'footer');\n        if (!hasHeader && !hasFooter) {\n            return Optional.some('body');\n        }\n        else {\n            const hasBody = contains(rowTypes, 'body');\n            if (hasHeader && !hasBody && !hasFooter) {\n                return Optional.some('header');\n            }\n            else if (!hasHeader && !hasBody && hasFooter) {\n                return Optional.some('footer');\n            }\n            else {\n                return Optional.none();\n            }\n        }\n    };\n\n    const fromRowsOrColGroups = (elems, getSection) => map(elems, (row) => {\n        if (name(row) === 'colgroup') {\n            const cells = map(columns(row), (column) => {\n                const colspan = getAttrValue(column, 'span', 1);\n                return detail(column, 1, colspan);\n            });\n            return rowdetail(row, cells, 'colgroup');\n        }\n        else {\n            const cells$1 = map(cells(row), (cell) => {\n                const rowspan = getAttrValue(cell, 'rowspan', 1);\n                const colspan = getAttrValue(cell, 'colspan', 1);\n                return detail(cell, rowspan, colspan);\n            });\n            return rowdetail(row, cells$1, getSection(row));\n        }\n    });\n    const getParentSection = (group) => parent(group).map((parent) => {\n        const parentName = name(parent);\n        return isValidSection(parentName) ? parentName : 'tbody';\n    }).getOr('tbody');\n    /*\n     * Takes a DOM table and returns a list of list of:\n       element: row element\n       cells: (id, rowspan, colspan) structs\n     */\n    const fromTable$1 = (table) => {\n        const rows$1 = rows(table);\n        const columnGroups$1 = columnGroups(table);\n        const elems = [...columnGroups$1, ...rows$1];\n        return fromRowsOrColGroups(elems, getParentSection);\n    };\n\n    const LOCKED_COL_ATTR = 'data-snooker-locked-cols';\n    const getLockedColumnsFromTable = (table) => getOpt(table, LOCKED_COL_ATTR)\n        .bind((lockedColStr) => Optional.from(lockedColStr.match(/\\d+/g)))\n        .map((lockedCols) => mapToObject(lockedCols, always));\n\n    const key = (row, column) => {\n        return row + ',' + column;\n    };\n    const getAt = (warehouse, row, column) => Optional.from(warehouse.access[key(row, column)]);\n    const findItem = (warehouse, item, comparator) => {\n        const filtered = filterItems(warehouse, (detail) => {\n            return comparator(item, detail.element);\n        });\n        return filtered.length > 0 ? Optional.some(filtered[0]) : Optional.none();\n    };\n    const filterItems = (warehouse, predicate) => {\n        const all = bind(warehouse.all, (r) => {\n            return r.cells;\n        });\n        return filter$1(all, predicate);\n    };\n    const generateColumns = (rowData) => {\n        const columnsGroup = {};\n        let index = 0;\n        each$1(rowData.cells, (column) => {\n            const colspan = column.colspan;\n            range(colspan, (columnIndex) => {\n                const colIndex = index + columnIndex;\n                columnsGroup[colIndex] = columnext(column.element, colspan, colIndex);\n            });\n            index += colspan;\n        });\n        return columnsGroup;\n    };\n    /*\n     * From a list of list of Detail, generate three pieces of information:\n     *  1. the grid size\n     *  2. a data structure which can efficiently identify which cell is in which row,column position\n     *  3. a list of all cells in order left-to-right, top-to-bottom\n     */\n    const generate = (list) => {\n        // list is an array of objects, made by cells and elements\n        // elements: is the TR\n        // cells: is an array of objects representing the cells in the row.\n        //        It is made of:\n        //          colspan (merge cell)\n        //          element\n        //          rowspan (merge cols)\n        const access = {};\n        const cells = [];\n        const tableOpt = head(list).map((rowData) => rowData.element).bind(table);\n        const lockedColumns = tableOpt.bind(getLockedColumnsFromTable).getOr({});\n        let maxRows = 0;\n        let maxColumns = 0;\n        let rowCount = 0;\n        const { pass: colgroupRows, fail: rows } = partition(list, (rowData) => rowData.section === 'colgroup');\n        // Handle rows first\n        each$1(rows, (rowData) => {\n            const currentRow = [];\n            each$1(rowData.cells, (rowCell) => {\n                let start = 0;\n                // If this spot has been taken by a previous rowspan, skip it.\n                while (access[key(rowCount, start)] !== undefined) {\n                    start++;\n                }\n                const isLocked = hasNonNullableKey(lockedColumns, start.toString());\n                const current = extended(rowCell.element, rowCell.rowspan, rowCell.colspan, rowCount, start, isLocked);\n                // Occupy all the (row, column) positions that this cell spans for.\n                for (let occupiedColumnPosition = 0; occupiedColumnPosition < rowCell.colspan; occupiedColumnPosition++) {\n                    for (let occupiedRowPosition = 0; occupiedRowPosition < rowCell.rowspan; occupiedRowPosition++) {\n                        const rowPosition = rowCount + occupiedRowPosition;\n                        const columnPosition = start + occupiedColumnPosition;\n                        const newpos = key(rowPosition, columnPosition);\n                        access[newpos] = current;\n                        maxColumns = Math.max(maxColumns, columnPosition + 1);\n                    }\n                }\n                currentRow.push(current);\n            });\n            maxRows++;\n            cells.push(rowdetail(rowData.element, currentRow, rowData.section));\n            rowCount++;\n        });\n        // Handle colgroups\n        // Note: Currently only a single colgroup is supported so just use the last one\n        const { columns, colgroups } = last(colgroupRows).map((rowData) => {\n            const columns = generateColumns(rowData);\n            const colgroup$1 = colgroup(rowData.element, values(columns));\n            return {\n                colgroups: [colgroup$1],\n                columns\n            };\n        }).getOrThunk(() => ({\n            colgroups: [],\n            columns: {}\n        }));\n        const grid$1 = grid(maxRows, maxColumns);\n        return {\n            grid: grid$1,\n            access,\n            all: cells,\n            columns,\n            colgroups\n        };\n    };\n    const fromTable = (table) => {\n        const list = fromTable$1(table);\n        return generate(list);\n    };\n    const justCells = (warehouse) => bind(warehouse.all, (w) => w.cells);\n    const justColumns = (warehouse) => values(warehouse.columns);\n    const hasColumns = (warehouse) => keys(warehouse.columns).length > 0;\n    const getColumnAt = (warehouse, columnIndex) => Optional.from(warehouse.columns[columnIndex]);\n    const Warehouse = {\n        fromTable,\n        generate,\n        getAt,\n        findItem,\n        filterItems,\n        justCells,\n        justColumns,\n        hasColumns,\n        getColumnAt\n    };\n\n    const findInWarehouse = (warehouse, element) => findMap(warehouse.all, (r) => find(r.cells, (e) => eq(element, e.element)));\n    const extractCells = (warehouse, target, predicate) => {\n        const details = map(target.selection, (cell$1) => {\n            return cell(cell$1)\n                .bind((lc) => findInWarehouse(warehouse, lc))\n                .filter(predicate);\n        });\n        const cells = cat(details);\n        return someIf(cells.length > 0, cells);\n    };\n    const onMergable = (_warehouse, target) => target.mergable;\n    const onUnmergable = (_warehouse, target) => target.unmergable;\n    const onCells = (warehouse, target) => extractCells(warehouse, target, always);\n    const isUnlockedTableCell = (warehouse, cell) => findInWarehouse(warehouse, cell).exists((detail) => !detail.isLocked);\n    const allUnlocked = (warehouse, cells) => forall(cells, (cell) => isUnlockedTableCell(warehouse, cell));\n    // If any locked columns are present in the selection, then don't want to be able to merge\n    const onUnlockedMergable = (warehouse, target) => onMergable(warehouse, target).filter((mergeable) => allUnlocked(warehouse, mergeable.cells));\n    // If any locked columns are present in the selection, then don't want to be able to unmerge\n    const onUnlockedUnmergable = (warehouse, target) => onUnmergable(warehouse, target).filter((cells) => allUnlocked(warehouse, cells));\n\n    const isCol = isTag('col');\n    const isColgroup = isTag('colgroup');\n    const isRow = (element) => name(element) === 'tr' || isColgroup(element);\n    const elementToData = (element) => {\n        const colspan = getAttrValue(element, 'colspan', 1);\n        const rowspan = getAttrValue(element, 'rowspan', 1);\n        return {\n            element,\n            colspan,\n            rowspan\n        };\n    };\n    // note that `toData` seems to be only for testing\n    const modification = (generators, toData = elementToData) => {\n        const nuCell = (data) => isCol(data.element) ? generators.col(data) : generators.cell(data);\n        const nuRow = (data) => isColgroup(data.element) ? generators.colgroup(data) : generators.row(data);\n        const add = (element) => {\n            if (isRow(element)) {\n                return nuRow({ element });\n            }\n            else {\n                const cell = element;\n                const replacement = nuCell(toData(cell));\n                recent = Optional.some({ item: cell, replacement });\n                return replacement;\n            }\n        };\n        let recent = Optional.none();\n        const getOrInit = (element, comparator) => {\n            return recent.fold(() => {\n                return add(element);\n            }, (p) => {\n                return comparator(element, p.item) ? p.replacement : add(element);\n            });\n        };\n        return {\n            getOrInit\n        };\n    };\n    const transform = (tag) => {\n        return (generators) => {\n            const list = [];\n            const find$1 = (element, comparator) => {\n                return find(list, (x) => {\n                    return comparator(x.item, element);\n                });\n            };\n            const makeNew = (element) => {\n                // Ensure scope is never set on a td element as it's a deprecated attribute\n                const attrs = tag === 'td' ? { scope: null } : {};\n                const cell = generators.replace(element, tag, attrs);\n                list.push({\n                    item: element,\n                    sub: cell\n                });\n                return cell;\n            };\n            const replaceOrInit = (element, comparator) => {\n                if (isRow(element) || isCol(element)) {\n                    return element;\n                }\n                else {\n                    const cell = element;\n                    return find$1(cell, comparator).fold(() => {\n                        return makeNew(cell);\n                    }, (p) => {\n                        return comparator(element, p.item) ? p.sub : makeNew(cell);\n                    });\n                }\n            };\n            return {\n                replaceOrInit\n            };\n        };\n    };\n    const getScopeAttribute = (cell) => getOpt(cell, 'scope').map(\n    // Attribute can be col, colgroup, row, and rowgroup.\n    // As col and colgroup are to be treated as if they are the same, lob off everything after the first three characters and there is no difference.\n    (attribute) => attribute.substr(0, 3));\n    const merging = (generators) => {\n        const unmerge = (cell) => {\n            const scope = getScopeAttribute(cell);\n            scope.each((attribute) => set$2(cell, 'scope', attribute));\n            return () => {\n                const raw = generators.cell({\n                    element: cell,\n                    colspan: 1,\n                    rowspan: 1\n                });\n                // Remove any width calculations because they are no longer relevant.\n                remove(raw, 'width');\n                remove(cell, 'width');\n                scope.each((attribute) => set$2(raw, 'scope', attribute));\n                return raw;\n            };\n        };\n        const merge = (cells) => {\n            const getScopeProperty = () => {\n                const stringAttributes = cat(map(cells, getScopeAttribute));\n                if (stringAttributes.length === 0) {\n                    return Optional.none();\n                }\n                else {\n                    const baseScope = stringAttributes[0];\n                    const scopes = ['row', 'col'];\n                    const isMixed = exists(stringAttributes, (attribute) => {\n                        return attribute !== baseScope && contains(scopes, attribute);\n                    });\n                    return isMixed ? Optional.none() : Optional.from(baseScope);\n                }\n            };\n            remove(cells[0], 'width');\n            getScopeProperty().fold(() => remove$2(cells[0], 'scope'), (attribute) => set$2(cells[0], 'scope', attribute + 'group'));\n            return constant(cells[0]);\n        };\n        return {\n            unmerge,\n            merge\n        };\n    };\n    const Generators = {\n        modification,\n        transform,\n        merging\n    };\n\n    var TagBoundaries = [\n        'body',\n        'p',\n        'div',\n        'article',\n        'aside',\n        'figcaption',\n        'figure',\n        'footer',\n        'header',\n        'nav',\n        'section',\n        'ol',\n        'ul',\n        'li',\n        'table',\n        'thead',\n        'tbody',\n        'tfoot',\n        'caption',\n        'tr',\n        'td',\n        'th',\n        'h1',\n        'h2',\n        'h3',\n        'h4',\n        'h5',\n        'h6',\n        'blockquote',\n        'pre',\n        'address'\n    ];\n\n    var DomUniverse = () => {\n        const clone$1 = (element) => {\n            return SugarElement.fromDom(element.dom.cloneNode(false));\n        };\n        const document = (element) => documentOrOwner(element).dom;\n        const isBoundary = (element) => {\n            if (!isElement(element)) {\n                return false;\n            }\n            if (name(element) === 'body') {\n                return true;\n            }\n            return contains(TagBoundaries, name(element));\n        };\n        const isEmptyTag = (element) => {\n            if (!isElement(element)) {\n                return false;\n            }\n            return contains(['br', 'img', 'hr', 'input'], name(element));\n        };\n        const isNonEditable = (element) => isElement(element) && get$2(element, 'contenteditable') === 'false';\n        const comparePosition = (element, other) => {\n            return element.dom.compareDocumentPosition(other.dom);\n        };\n        const copyAttributesTo = (source, destination) => {\n            const as = clone(source);\n            setAll(destination, as);\n        };\n        const isSpecial = (element) => {\n            const tag = name(element);\n            return contains([\n                'script', 'noscript', 'iframe', 'noframes', 'noembed', 'title', 'style', 'textarea', 'xmp'\n            ], tag);\n        };\n        const getLanguage = (element) => isElement(element) ? getOpt(element, 'lang') : Optional.none();\n        return {\n            up: constant({\n                selector: ancestor,\n                closest: closest$1,\n                predicate: ancestor$1,\n                all: parents\n            }),\n            down: constant({\n                selector: descendants,\n                predicate: descendants$1\n            }),\n            styles: constant({\n                get: get$1,\n                getRaw: getRaw$1,\n                set: set$1,\n                remove: remove\n            }),\n            attrs: constant({\n                get: get$2,\n                set: set$2,\n                remove: remove$2,\n                copyTo: copyAttributesTo\n            }),\n            insert: constant({\n                before: before,\n                after: after$1,\n                afterAll: after,\n                append: append$1,\n                appendAll: append,\n                prepend: prepend,\n                wrap: wrap\n            }),\n            remove: constant({\n                unwrap: unwrap,\n                remove: remove$1\n            }),\n            create: constant({\n                nu: SugarElement.fromTag,\n                clone: clone$1,\n                text: SugarElement.fromText\n            }),\n            query: constant({\n                comparePosition,\n                prevSibling: prevSibling,\n                nextSibling: nextSibling\n            }),\n            property: constant({\n                children: children$3,\n                name: name,\n                parent: parent,\n                document,\n                isText: isText,\n                isComment: isComment,\n                isElement: isElement,\n                isSpecial,\n                getLanguage,\n                getText: get,\n                setText: set,\n                isBoundary,\n                isEmptyTag,\n                isNonEditable\n            }),\n            eq: eq,\n            is: is\n        };\n    };\n\n    const leftRight = (left, right) => ({\n        left,\n        right\n    });\n    const brokenPath = (first, second, splits) => ({\n        first,\n        second,\n        splits\n    });\n    const bisect = (universe, parent, child) => {\n        const children = universe.property().children(parent);\n        const index = findIndex(children, curry(universe.eq, child));\n        return index.map((ind) => {\n            return {\n                before: children.slice(0, ind),\n                after: children.slice(ind + 1)\n            };\n        });\n    };\n    /**\n     * Clone parent to the RIGHT and move everything after child in the parent element into\n     * a clone of the parent (placed after parent).\n     */\n    const breakToRight = (universe, parent, child) => {\n        return bisect(universe, parent, child).map((parts) => {\n            const second = universe.create().clone(parent);\n            universe.insert().appendAll(second, parts.after);\n            universe.insert().after(parent, second);\n            return leftRight(parent, second);\n        });\n    };\n    /**\n     * Clone parent to the LEFT and move everything before and including child into\n     * the a clone of the parent (placed before parent)\n     */\n    const breakToLeft = (universe, parent, child) => {\n        return bisect(universe, parent, child).map((parts) => {\n            const prior = universe.create().clone(parent);\n            universe.insert().appendAll(prior, parts.before.concat([child]));\n            universe.insert().appendAll(parent, parts.after);\n            universe.insert().before(parent, prior);\n            return leftRight(prior, parent);\n        });\n    };\n    /*\n     * Using the breaker, break from the child up to the top element defined by the predicate.\n     * It returns three values:\n     *   first: the top level element that completed the break\n     *   second: the optional element representing second part of the top-level split if the breaking completed successfully to the top\n     *   splits: a list of (Element, Element) pairs that represent the splits that have occurred on the way to the top.\n     */\n    const breakPath = (universe, item, isTop, breaker) => {\n        const next = (child, group, splits) => {\n            const fallback = brokenPath(child, Optional.none(), splits);\n            // Found the top, so stop.\n            if (isTop(child)) {\n                return brokenPath(child, group, splits);\n            }\n            else {\n                // Split the child at parent, and keep going\n                return universe.property().parent(child).bind((parent) => {\n                    return breaker(universe, parent, child).map((breakage) => {\n                        const extra = [{ first: breakage.left, second: breakage.right }];\n                        // Our isTop is based on the left-side parent, so keep it regardless of split.\n                        const nextChild = isTop(parent) ? parent : breakage.left;\n                        return next(nextChild, Optional.some(breakage.right), splits.concat(extra));\n                    });\n                }).getOr(fallback);\n            }\n        };\n        return next(item, Optional.none(), []);\n    };\n\n    const all = (universe, look, elements, f) => {\n        const head = elements[0];\n        const tail = elements.slice(1);\n        return f(universe, look, head, tail);\n    };\n    /**\n     * Check if look returns the same element for all elements, and return it if it exists.\n     */\n    const oneAll = (universe, look, elements) => {\n        return elements.length > 0 ?\n            all(universe, look, elements, unsafeOne) :\n            Optional.none();\n    };\n    const unsafeOne = (universe, look, head, tail) => {\n        const start = look(universe, head);\n        return foldr(tail, (b, a) => {\n            const current = look(universe, a);\n            return commonElement(universe, b, current);\n        }, start);\n    };\n    const commonElement = (universe, start, end) => {\n        return start.bind((s) => {\n            return end.filter(curry(universe.eq, s));\n        });\n    };\n\n    const sharedOne$1 = oneAll;\n    breakToLeft;\n    breakToRight;\n    breakPath;\n\n    const universe = DomUniverse();\n    const sharedOne = (look, elements) => {\n        return sharedOne$1(universe, (_universe, element) => {\n            return look(element);\n        }, elements);\n    };\n\n    const opGetRowsType = (table, target) => {\n        const house = Warehouse.fromTable(table);\n        const details = onCells(house, target);\n        return details.bind((selectedCells) => {\n            const lastSelectedCell = selectedCells[selectedCells.length - 1];\n            const minRowRange = selectedCells[0].row;\n            const maxRowRange = lastSelectedCell.row + lastSelectedCell.rowspan;\n            const selectedRows = house.all.slice(minRowRange, maxRowRange);\n            return findCommonRowType(selectedRows);\n        }).getOr('');\n    };\n    Generators.transform('th');\n    Generators.transform('td');\n    const getRowsType = opGetRowsType;\n\n    // Note, something is *within* if it is completely contained within the bounds.\n    const isWithin = (bounds, detail) => {\n        return (detail.column >= bounds.startCol &&\n            (detail.column + detail.colspan - 1) <= bounds.finishCol &&\n            detail.row >= bounds.startRow &&\n            (detail.row + detail.rowspan - 1) <= bounds.finishRow);\n    };\n    const isRectangular = (warehouse, bounds) => {\n        let isRect = true;\n        const detailIsWithin = curry(isWithin, bounds);\n        for (let i = bounds.startRow; i <= bounds.finishRow; i++) {\n            for (let j = bounds.startCol; j <= bounds.finishCol; j++) {\n                isRect = isRect && Warehouse.getAt(warehouse, i, j).exists(detailIsWithin);\n            }\n        }\n        return isRect ? Optional.some(bounds) : Optional.none();\n    };\n\n    const getBounds = (detailA, detailB) => {\n        return bounds(Math.min(detailA.row, detailB.row), Math.min(detailA.column, detailB.column), Math.max(detailA.row + detailA.rowspan - 1, detailB.row + detailB.rowspan - 1), Math.max(detailA.column + detailA.colspan - 1, detailB.column + detailB.colspan - 1));\n    };\n    const getAnyBox = (warehouse, startCell, finishCell) => {\n        const startCoords = Warehouse.findItem(warehouse, startCell, eq);\n        const finishCoords = Warehouse.findItem(warehouse, finishCell, eq);\n        return startCoords.bind((sc) => {\n            return finishCoords.map((fc) => {\n                return getBounds(sc, fc);\n            });\n        });\n    };\n    const getBox$1 = (warehouse, startCell, finishCell) => {\n        return getAnyBox(warehouse, startCell, finishCell).bind((bounds) => {\n            return isRectangular(warehouse, bounds);\n        });\n    };\n\n    const getBox = (table, first, last) => {\n        const warehouse = getWarehouse(table);\n        return getBox$1(warehouse, first, last);\n    };\n    // Private method ... keep warehouse in snooker, please.\n    const getWarehouse = Warehouse.fromTable;\n\n    var global$2 = tinymce.util.Tools.resolve('tinymce.util.Tools');\n\n    const getTDTHOverallStyle = (dom, elm, name) => {\n        const cells = dom.select('td,th', elm);\n        let firstChildStyle;\n        for (let i = 0; i < cells.length; i++) {\n            const currentStyle = dom.getStyle(cells[i], name);\n            if (isUndefined(firstChildStyle)) {\n                firstChildStyle = currentStyle;\n            }\n            if (firstChildStyle !== currentStyle) {\n                return '';\n            }\n        }\n        return firstChildStyle;\n    };\n    const setAlign = (editor, elm, name) => {\n        // Alignment formats may not use the same styles so ensure to remove any existing horizontal alignment format first\n        global$2.each('left center right'.split(' '), (align) => {\n            if (align !== name) {\n                editor.formatter.remove('align' + align, {}, elm);\n            }\n        });\n        if (name) {\n            editor.formatter.apply('align' + name, {}, elm);\n        }\n    };\n    const setVAlign = (editor, elm, name) => {\n        // Alignment formats may not use the same styles so ensure to remove any existing vertical alignment format first\n        global$2.each('top middle bottom'.split(' '), (align) => {\n            if (align !== name) {\n                editor.formatter.remove('valign' + align, {}, elm);\n            }\n        });\n        if (name) {\n            editor.formatter.apply('valign' + name, {}, elm);\n        }\n    };\n\n    /*\n     NOTE: This file is duplicated in the following locations:\n      - core/api/TableEvents.ts\n      - models/dom/table/api/Events.ts\n      - advtable\n     Make sure that if making changes to this file, the other files are updated as well\n     */\n    const fireTableModified = (editor, table, data) => {\n        editor.dispatch('TableModified', { ...data, table });\n    };\n\n    var global$1 = tinymce.util.Tools.resolve('tinymce.Env');\n\n    const defaultTableToolbar = 'tableprops tabledelete | tableinsertrowbefore tableinsertrowafter tabledeleterow | tableinsertcolbefore tableinsertcolafter tabledeletecol';\n    const defaultCellBorderWidths = range(5, (i) => {\n        const size = `${i + 1}px`;\n        return { title: size, value: size };\n    });\n    const defaultCellBorderStyles = map(['Solid', 'Dotted', 'Dashed', 'Double', 'Groove', 'Ridge', 'Inset', 'Outset', 'None', 'Hidden'], (type) => {\n        return { title: type, value: type.toLowerCase() };\n    });\n    // Note: This is also contained in the core Options.ts file\n    const defaultWidth = '100%';\n    const getPixelForcedWidth = (editor) => {\n        // Determine the inner size of the parent block element where the table will be inserted\n        const dom = editor.dom;\n        const parentBlock = dom.getParent(editor.selection.getStart(), dom.isBlock) ?? editor.getBody();\n        return getInner(SugarElement.fromDom(parentBlock)) + 'px';\n    };\n    // Note: This is also contained in the core Options.ts file\n    const determineDefaultStyles = (editor, defaultStyles) => {\n        if (isResponsiveForced(editor) || !shouldStyleWithCss(editor)) {\n            return defaultStyles;\n        }\n        else if (isPixelsForced(editor)) {\n            return { ...defaultStyles, width: getPixelForcedWidth(editor) };\n        }\n        else {\n            return { ...defaultStyles, width: defaultWidth };\n        }\n    };\n    // Note: This is also contained in the core Options.ts file\n    const determineDefaultAttributes = (editor, defaultAttributes) => {\n        if (isResponsiveForced(editor) || shouldStyleWithCss(editor)) {\n            return defaultAttributes;\n        }\n        else if (isPixelsForced(editor)) {\n            return { ...defaultAttributes, width: getPixelForcedWidth(editor) };\n        }\n        else {\n            return { ...defaultAttributes, width: defaultWidth };\n        }\n    };\n    const option = (name) => (editor) => editor.options.get(name);\n    const register = (editor) => {\n        const registerOption = editor.options.register;\n        registerOption('table_border_widths', {\n            processor: 'object[]',\n            default: defaultCellBorderWidths\n        });\n        registerOption('table_border_styles', {\n            processor: 'object[]',\n            default: defaultCellBorderStyles\n        });\n        registerOption('table_cell_advtab', {\n            processor: 'boolean',\n            default: true\n        });\n        registerOption('table_row_advtab', {\n            processor: 'boolean',\n            default: true\n        });\n        registerOption('table_advtab', {\n            processor: 'boolean',\n            default: true\n        });\n        registerOption('table_appearance_options', {\n            processor: 'boolean',\n            default: true\n        });\n        registerOption('table_grid', {\n            processor: 'boolean',\n            // Table grid relies on hover, which isn't available on touch devices so use the dialog instead\n            default: !global$1.deviceType.isTouch()\n        });\n        registerOption('table_cell_class_list', {\n            processor: 'object[]',\n            default: []\n        });\n        registerOption('table_row_class_list', {\n            processor: 'object[]',\n            default: []\n        });\n        registerOption('table_class_list', {\n            processor: 'object[]',\n            default: []\n        });\n        registerOption('table_toolbar', {\n            processor: 'string',\n            default: defaultTableToolbar\n        });\n        registerOption('table_background_color_map', {\n            processor: 'object[]',\n            default: []\n        });\n        registerOption('table_border_color_map', {\n            processor: 'object[]',\n            default: []\n        });\n    };\n    const getTableSizingMode = option('table_sizing_mode');\n    const getTableBorderWidths = option('table_border_widths');\n    const getTableBorderStyles = option('table_border_styles');\n    const hasAdvancedCellTab = option('table_cell_advtab');\n    const hasAdvancedRowTab = option('table_row_advtab');\n    const hasAdvancedTableTab = option('table_advtab');\n    const hasAppearanceOptions = option('table_appearance_options');\n    const hasTableGrid = option('table_grid');\n    const shouldStyleWithCss = option('table_style_by_css');\n    const getCellClassList = option('table_cell_class_list');\n    const getRowClassList = option('table_row_class_list');\n    const getTableClassList = option('table_class_list');\n    const getToolbar = option('table_toolbar');\n    const getTableBackgroundColorMap = option('table_background_color_map');\n    const getTableBorderColorMap = option('table_border_color_map');\n    const isPixelsForced = (editor) => getTableSizingMode(editor) === 'fixed';\n    const isResponsiveForced = (editor) => getTableSizingMode(editor) === 'responsive';\n    const getDefaultStyles = (editor) => {\n        // Note: The we don't rely on the default here as we need to dynamically lookup the widths based on the current editor state\n        const options = editor.options;\n        const defaultStyles = options.get('table_default_styles');\n        return options.isSet('table_default_styles') ? defaultStyles : determineDefaultStyles(editor, defaultStyles);\n    };\n    const getDefaultAttributes = (editor) => {\n        // Note: The we don't rely on the default here as we need to dynamically lookup the widths based on the current editor state\n        const options = editor.options;\n        const defaultAttributes = options.get('table_default_attributes');\n        return options.isSet('table_default_attributes') ? defaultAttributes : determineDefaultAttributes(editor, defaultAttributes);\n    };\n\n    const lookupTable = (container) => {\n        return ancestor(container, 'table');\n    };\n    const retrieve$1 = (container, selector) => {\n        const sels = descendants(container, selector);\n        return sels.length > 0 ? Optional.some(sels) : Optional.none();\n    };\n    const getEdges = (container, firstSelectedSelector, lastSelectedSelector) => {\n        return descendant(container, firstSelectedSelector).bind((first) => {\n            return descendant(container, lastSelectedSelector).bind((last) => {\n                return sharedOne(lookupTable, [first, last]).map((table) => {\n                    return {\n                        first,\n                        last,\n                        table\n                    };\n                });\n            });\n        });\n    };\n\n    // Explicitly calling CellSelection.retrieve so that we can see the API signature.\n    const retrieve = (container, selector) => {\n        return retrieve$1(container, selector);\n    };\n    const retrieveBox = (container, firstSelectedSelector, lastSelectedSelector) => {\n        return getEdges(container, firstSelectedSelector, lastSelectedSelector).bind((edges) => {\n            const isRoot = (ancestor) => {\n                return eq(container, ancestor);\n            };\n            const sectionSelector = 'thead,tfoot,tbody,table';\n            const firstAncestor = ancestor(edges.first, sectionSelector, isRoot);\n            const lastAncestor = ancestor(edges.last, sectionSelector, isRoot);\n            return firstAncestor.bind((fA) => {\n                return lastAncestor.bind((lA) => {\n                    return eq(fA, lA) ? getBox(edges.table, edges.first, edges.last) : Optional.none();\n                });\n            });\n        });\n    };\n\n    const selection = identity;\n    const unmergable = (selectedCells) => {\n        const hasSpan = (elem, type) => getOpt(elem, type).exists((span) => parseInt(span, 10) > 1);\n        const hasRowOrColSpan = (elem) => hasSpan(elem, 'rowspan') || hasSpan(elem, 'colspan');\n        return selectedCells.length > 0 && forall(selectedCells, hasRowOrColSpan) ? Optional.some(selectedCells) : Optional.none();\n    };\n    const mergable = (table, selectedCells, ephemera) => {\n        if (selectedCells.length <= 1) {\n            return Optional.none();\n        }\n        else {\n            return retrieveBox(table, ephemera.firstSelectedSelector, ephemera.lastSelectedSelector)\n                .map((bounds) => ({ bounds, cells: selectedCells }));\n        }\n    };\n\n    /*\n     NOTE: This file is duplicated in the following locations:\n      - models/dom/table/selection/Ephemera.ts\n      - advtable\n     Make sure that if making changes to this file, the other files are updated as well\n     */\n    const strSelected = 'data-mce-selected';\n    const strSelectedSelector = 'td[' + strSelected + '],th[' + strSelected + ']';\n    const strFirstSelected = 'data-mce-first-selected';\n    const strFirstSelectedSelector = 'td[' + strFirstSelected + '],th[' + strFirstSelected + ']';\n    const strLastSelected = 'data-mce-last-selected';\n    const strLastSelectedSelector = 'td[' + strLastSelected + '],th[' + strLastSelected + ']';\n    const ephemera = {\n        selected: strSelected,\n        selectedSelector: strSelectedSelector,\n        firstSelected: strFirstSelected,\n        firstSelectedSelector: strFirstSelectedSelector,\n        lastSelected: strLastSelected,\n        lastSelectedSelector: strLastSelectedSelector\n    };\n\n    /*\n     NOTE: This file is partially duplicated in the following locations:\n      - models/dom/table/selection/TableSelection.ts\n      - advtable\n     Make sure that if making changes to this file, the other files are updated as well\n     */\n    const getSelectionCellFallback = (element) => table(element).bind((table) => retrieve(table, ephemera.firstSelectedSelector)).fold(constant(element), (cells) => cells[0]);\n    const getSelectionFromSelector = (selector) => (initCell, isRoot) => {\n        const cellName = name(initCell);\n        const cell = cellName === 'col' || cellName === 'colgroup' ? getSelectionCellFallback(initCell) : initCell;\n        return closest$1(cell, selector, isRoot);\n    };\n    const getSelectionCellOrCaption = getSelectionFromSelector('th,td,caption');\n    const getSelectionCell = getSelectionFromSelector('th,td');\n    const getCellsFromSelection = (editor) => fromDom(editor.model.table.getSelectedCells());\n    const getRowsFromSelection = (selected, selector) => {\n        const cellOpt = getSelectionCell(selected);\n        const rowsOpt = cellOpt.bind((cell) => table(cell))\n            .map((table) => rows(table));\n        return lift2(cellOpt, rowsOpt, (cell, rows) => filter$1(rows, (row) => exists(fromDom(row.dom.cells), (rowCell) => get$2(rowCell, selector) === '1' || eq(rowCell, cell)))).getOr([]);\n    };\n\n    const verticalAlignValues = [\n        {\n            text: 'None',\n            value: ''\n        },\n        {\n            text: 'Top',\n            value: 'top'\n        },\n        {\n            text: 'Middle',\n            value: 'middle'\n        },\n        {\n            text: 'Bottom',\n            value: 'bottom'\n        }\n    ];\n\n    const hexColour = (value) => ({\n        value: normalizeHex(value)\n    });\n    const shorthandRegex = /^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;\n    const longformRegex = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i;\n    const isHexString = (hex) => shorthandRegex.test(hex) || longformRegex.test(hex);\n    const normalizeHex = (hex) => removeLeading(hex, '#').toUpperCase();\n    const fromString$1 = (hex) => isHexString(hex) ? Optional.some({ value: normalizeHex(hex) }) : Optional.none();\n    const toHex = (component) => {\n        const hex = component.toString(16);\n        return (hex.length === 1 ? '0' + hex : hex).toUpperCase();\n    };\n    const fromRgba = (rgbaColour) => {\n        const value = toHex(rgbaColour.red) + toHex(rgbaColour.green) + toHex(rgbaColour.blue);\n        return hexColour(value);\n    };\n\n    const rgbRegex = /^\\s*rgb\\s*\\(\\s*(\\d+)\\s*[,\\s]\\s*(\\d+)\\s*[,\\s]\\s*(\\d+)\\s*\\)\\s*$/i;\n    // This regex will match rgba(0, 0, 0, 0.5) or rgba(0, 0, 0, 50%) , or without commas\n    const rgbaRegex = /^\\s*rgba\\s*\\(\\s*(\\d+)\\s*[,\\s]\\s*(\\d+)\\s*[,\\s]\\s*(\\d+)\\s*[,\\s]\\s*((?:\\d?\\.\\d+|\\d+)%?)\\s*\\)\\s*$/i;\n    const rgbaColour = (red, green, blue, alpha) => ({\n        red,\n        green,\n        blue,\n        alpha\n    });\n    const fromStringValues = (red, green, blue, alpha) => {\n        const r = parseInt(red, 10);\n        const g = parseInt(green, 10);\n        const b = parseInt(blue, 10);\n        const a = parseFloat(alpha);\n        return rgbaColour(r, g, b, a);\n    };\n    const fromString = (rgbaString) => {\n        const rgbMatch = rgbRegex.exec(rgbaString);\n        if (rgbMatch !== null) {\n            return Optional.some(fromStringValues(rgbMatch[1], rgbMatch[2], rgbMatch[3], '1'));\n        }\n        const rgbaMatch = rgbaRegex.exec(rgbaString);\n        if (rgbaMatch !== null) {\n            return Optional.some(fromStringValues(rgbaMatch[1], rgbaMatch[2], rgbaMatch[3], rgbaMatch[4]));\n        }\n        return Optional.none();\n    };\n\n    const anyToHex = (color) => fromString$1(color)\n        .orThunk(() => fromString(color).map(fromRgba))\n        .getOrThunk(() => {\n        // Not dealing with Hex or RGBA so use a canvas to parse the color\n        const canvas = document.createElement('canvas');\n        canvas.height = 1;\n        canvas.width = 1;\n        const canvasContext = canvas.getContext('2d');\n        // all valid colors after this point\n        canvasContext.clearRect(0, 0, canvas.width, canvas.height);\n        // invalid colors will be shown as white - the first assignment will pass and the second may be ignored\n        canvasContext.fillStyle = '#FFFFFF';\n        canvasContext.fillStyle = color;\n        canvasContext.fillRect(0, 0, 1, 1);\n        const rgba = canvasContext.getImageData(0, 0, 1, 1).data;\n        const r = rgba[0];\n        const g = rgba[1];\n        const b = rgba[2];\n        const a = rgba[3];\n        return fromRgba(rgbaColour(r, g, b, a));\n    });\n    const rgbaToHexString = (color) => fromString(color)\n        .map(fromRgba)\n        .map((h) => '#' + h.value)\n        .getOr(color);\n\n    const onSetupToggle = (editor, formatName, formatValue) => {\n        return (api) => {\n            const boundCallback = unbindable();\n            const isNone = isEmpty(formatValue);\n            const init = () => {\n                const selectedCells = getCellsFromSelection(editor);\n                const checkNode = (cell) => editor.formatter.match(formatName, { value: formatValue }, cell.dom, isNone);\n                // If value is empty (A None-entry in the list), check if the format is not set at all. Otherwise, check if the format is set to the correct value.\n                if (isNone) {\n                    api.setActive(!exists(selectedCells, checkNode));\n                    boundCallback.set(editor.formatter.formatChanged(formatName, (match) => api.setActive(!match), true));\n                }\n                else {\n                    api.setActive(forall(selectedCells, checkNode));\n                    boundCallback.set(editor.formatter.formatChanged(formatName, api.setActive, false, { value: formatValue }));\n                }\n            };\n            // The editor may or may not have been setup yet, so check for that\n            editor.initialized ? init() : editor.on('init', init);\n            return boundCallback.clear;\n        };\n    };\n    const isListGroup = (item) => hasNonNullableKey(item, 'menu');\n    const buildListItems = (items) => map(items, (item) => {\n        // item.text is not documented - maybe deprecated option we can delete??\n        const text = item.text || item.title || '';\n        if (isListGroup(item)) {\n            return {\n                text,\n                items: buildListItems(item.menu)\n            };\n        }\n        else {\n            return {\n                text,\n                value: item.value\n            };\n        }\n    });\n    const buildClassList = (classList) => {\n        if (!classList.length) {\n            return Optional.none();\n        }\n        return Optional.some(buildListItems([{ text: 'Select...', value: 'mce-no-match' }, ...classList]));\n    };\n    const buildMenuItems = (editor, items, format, onAction) => map(items, (item) => {\n        // item.text is not documented - maybe deprecated option we can delete??\n        const text = item.text || item.title;\n        if (isListGroup(item)) {\n            return {\n                type: 'nestedmenuitem',\n                text,\n                getSubmenuItems: () => buildMenuItems(editor, item.menu, format, onAction)\n            };\n        }\n        else {\n            return {\n                text,\n                type: 'togglemenuitem',\n                onAction: () => onAction(item.value),\n                onSetup: onSetupToggle(editor, format, item.value)\n            };\n        }\n    });\n    const applyTableCellStyle = (editor, style) => (value) => {\n        editor.execCommand('mceTableApplyCellStyle', false, { [style]: value });\n    };\n    const filterNoneItem = (list) => bind(list, (item) => {\n        if (isListGroup(item)) {\n            return [{ ...item, menu: filterNoneItem(item.menu) }];\n        }\n        else {\n            return isNotEmpty(item.value) ? [item] : [];\n        }\n    });\n    const generateMenuItemsCallback = (editor, items, format, onAction) => (callback) => callback(buildMenuItems(editor, items, format, onAction));\n    const buildColorMenu = (editor, colorList, style) => {\n        const colorMap = map(colorList, (entry) => ({\n            text: entry.title,\n            value: '#' + anyToHex(entry.value).value,\n            type: 'choiceitem'\n        }));\n        return [{\n                type: 'fancymenuitem',\n                fancytype: 'colorswatch',\n                initData: {\n                    colors: colorMap.length > 0 ? colorMap : undefined,\n                    allowCustomColors: false\n                },\n                onAction: (data) => {\n                    const value = data.value === 'remove' ? '' : data.value;\n                    editor.execCommand('mceTableApplyCellStyle', false, { [style]: value });\n                }\n            }];\n    };\n    const changeRowHeader = (editor) => () => {\n        const currentType = editor.queryCommandValue('mceTableRowType');\n        const newType = currentType === 'header' ? 'body' : 'header';\n        editor.execCommand('mceTableRowType', false, { type: newType });\n    };\n    const changeColumnHeader = (editor) => () => {\n        const currentType = editor.queryCommandValue('mceTableColType');\n        const newType = currentType === 'th' ? 'td' : 'th';\n        editor.execCommand('mceTableColType', false, { type: newType });\n    };\n\n    const getClassList$1 = (editor) => buildClassList(getCellClassList(editor))\n        .map((items) => ({\n        name: 'class',\n        type: 'listbox',\n        label: 'Class',\n        items\n    }));\n    const children = [\n        {\n            name: 'width',\n            type: 'input',\n            label: 'Width'\n        },\n        {\n            name: 'celltype',\n            type: 'listbox',\n            label: 'Cell type',\n            items: [\n                { text: 'Cell', value: 'td' },\n                { text: 'Header cell', value: 'th' }\n            ]\n        },\n        {\n            name: 'scope',\n            type: 'listbox',\n            label: 'Scope',\n            items: [\n                { text: 'None', value: '' },\n                { text: 'Row', value: 'row' },\n                { text: 'Column', value: 'col' },\n                { text: 'Row group', value: 'rowgroup' },\n                { text: 'Column group', value: 'colgroup' }\n            ]\n        },\n        {\n            name: 'halign',\n            type: 'listbox',\n            label: 'Horizontal align',\n            items: [\n                { text: 'None', value: '' },\n                { text: 'Left', value: 'left' },\n                { text: 'Center', value: 'center' },\n                { text: 'Right', value: 'right' }\n            ]\n        },\n        {\n            name: 'valign',\n            type: 'listbox',\n            label: 'Vertical align',\n            items: verticalAlignValues\n        }\n    ];\n    const getItems$2 = (editor) => children.concat(getClassList$1(editor).toArray());\n\n    const getAdvancedTab = (editor, dialogName) => {\n        const emptyBorderStyle = [{ text: 'Select...', value: '' }];\n        const advTabItems = [\n            {\n                name: 'borderstyle',\n                type: 'listbox',\n                label: 'Border style',\n                items: emptyBorderStyle.concat(buildListItems(getTableBorderStyles(editor)))\n            },\n            {\n                name: 'bordercolor',\n                type: 'colorinput',\n                label: 'Border color'\n            },\n            {\n                name: 'backgroundcolor',\n                type: 'colorinput',\n                label: 'Background color'\n            }\n        ];\n        const borderWidth = {\n            name: 'borderwidth',\n            type: 'input',\n            label: 'Border width'\n        };\n        const items = dialogName === 'cell' ? [borderWidth].concat(advTabItems) : advTabItems;\n        return {\n            title: 'Advanced',\n            name: 'advanced',\n            items\n        };\n    };\n\n    // The get node is required here because it can be transformed\n    // when switching between tags (e.g. th and td)\n    const normal = (editor, element) => {\n        const dom = editor.dom;\n        const setAttrib = (attr, value) => {\n            dom.setAttrib(element, attr, value);\n        };\n        const setStyle = (prop, value) => {\n            dom.setStyle(element, prop, value);\n        };\n        const setFormat = (formatName, value) => {\n            // Remove format if given an empty string\n            if (value === '') {\n                editor.formatter.remove(formatName, { value: null }, element, true);\n            }\n            else {\n                editor.formatter.apply(formatName, { value }, element);\n            }\n        };\n        return {\n            setAttrib,\n            setStyle,\n            setFormat\n        };\n    };\n    const DomModifier = {\n        normal\n    };\n\n    const rgbToHex = (value) => startsWith(value, 'rgb') ? rgbaToHexString(value) : value;\n    const extractAdvancedStyles = (elm) => {\n        const element = SugarElement.fromDom(elm);\n        return {\n            borderwidth: getRaw$1(element, 'border-width').getOr(''),\n            borderstyle: getRaw$1(element, 'border-style').getOr(''),\n            bordercolor: getRaw$1(element, 'border-color').map(rgbToHex).getOr(''),\n            backgroundcolor: getRaw$1(element, 'background-color').map(rgbToHex).getOr('')\n        };\n    };\n    const getSharedValues = (data) => {\n        // TODO surely there's a better way to do this??\n        // Mutates baseData to return an object that contains only the values\n        // that were the same across all objects in data\n        const baseData = data[0];\n        const comparisonData = data.slice(1);\n        each$1(comparisonData, (items) => {\n            each$1(keys(baseData), (key) => {\n                each(items, (itemValue, itemKey) => {\n                    const comparisonValue = baseData[key];\n                    if (comparisonValue !== '' && key === itemKey) {\n                        if (comparisonValue !== itemValue) {\n                            baseData[key] = key === 'class' ? 'mce-no-match' : '';\n                        }\n                    }\n                });\n            });\n        });\n        return baseData;\n    };\n    // The extractDataFrom... functions are in this file partly for code reuse and partly so we can test them,\n    // because some of these are crazy complicated\n    const getAlignment = (formats, formatName, editor, elm) => find(formats, (name) => !isUndefined(editor.formatter.matchNode(elm, formatName + name))).getOr('');\n    const getHAlignment = curry(getAlignment, ['left', 'center', 'right'], 'align');\n    const getVAlignment = curry(getAlignment, ['top', 'middle', 'bottom'], 'valign');\n    const extractDataFromSettings = (editor, hasAdvTableTab) => {\n        const style = getDefaultStyles(editor);\n        const attrs = getDefaultAttributes(editor);\n        const extractAdvancedStyleData = () => ({\n            borderstyle: get$3(style, 'border-style').getOr(''),\n            bordercolor: rgbToHex(get$3(style, 'border-color').getOr('')),\n            backgroundcolor: rgbToHex(get$3(style, 'background-color').getOr(''))\n        });\n        const defaultData = {\n            height: '',\n            width: '100%',\n            cellspacing: '',\n            cellpadding: '',\n            caption: false,\n            class: '',\n            align: '',\n            border: ''\n        };\n        const getBorder = () => {\n            const borderWidth = style['border-width'];\n            if (shouldStyleWithCss(editor) && borderWidth) {\n                return { border: borderWidth };\n            }\n            return get$3(attrs, 'border').fold(() => ({}), (border) => ({ border }));\n        };\n        const advStyle = (hasAdvTableTab ? extractAdvancedStyleData() : {});\n        const getCellPaddingCellSpacing = () => {\n            const spacing = get$3(style, 'border-spacing').or(get$3(attrs, 'cellspacing')).fold(() => ({}), (cellspacing) => ({ cellspacing }));\n            const padding = get$3(style, 'border-padding').or(get$3(attrs, 'cellpadding')).fold(() => ({}), (cellpadding) => ({ cellpadding }));\n            return {\n                ...spacing,\n                ...padding\n            };\n        };\n        const data = {\n            ...defaultData,\n            ...style,\n            ...attrs,\n            ...advStyle,\n            ...getBorder(),\n            ...getCellPaddingCellSpacing()\n        };\n        return data;\n    };\n    const getRowType = (elm) => table(SugarElement.fromDom(elm)).map((table) => {\n        const target = { selection: fromDom(elm.cells) };\n        return getRowsType(table, target);\n    }).getOr('');\n    const extractDataFromTableElement = (editor, elm, hasAdvTableTab) => {\n        const getBorder = (dom, elm) => {\n            // Cases (in order to check):\n            // 1. shouldStyleWithCss - extract border-width style if it exists\n            // 2. !shouldStyleWithCss && border attribute - set border attribute as value\n            // 3. !shouldStyleWithCss && nothing on the table - grab styles from the first th or td\n            const optBorderWidth = getRaw$1(SugarElement.fromDom(elm), 'border-width');\n            if (shouldStyleWithCss(editor) && optBorderWidth.isSome()) {\n                return optBorderWidth.getOr('');\n            }\n            return dom.getAttrib(elm, 'border') || getTDTHOverallStyle(editor.dom, elm, 'border-width')\n                || getTDTHOverallStyle(editor.dom, elm, 'border') || '';\n        };\n        const dom = editor.dom;\n        const cellspacing = shouldStyleWithCss(editor) ?\n            dom.getStyle(elm, 'border-spacing') || dom.getAttrib(elm, 'cellspacing') :\n            dom.getAttrib(elm, 'cellspacing') || dom.getStyle(elm, 'border-spacing');\n        const cellpadding = shouldStyleWithCss(editor) ?\n            getTDTHOverallStyle(dom, elm, 'padding') || dom.getAttrib(elm, 'cellpadding') :\n            dom.getAttrib(elm, 'cellpadding') || getTDTHOverallStyle(dom, elm, 'padding');\n        return {\n            width: dom.getStyle(elm, 'width') || dom.getAttrib(elm, 'width'),\n            height: dom.getStyle(elm, 'height') || dom.getAttrib(elm, 'height'),\n            cellspacing: cellspacing ?? '',\n            cellpadding: cellpadding ?? '',\n            border: getBorder(dom, elm),\n            caption: !!dom.select('caption', elm)[0],\n            class: dom.getAttrib(elm, 'class', ''),\n            align: getHAlignment(editor, elm),\n            ...(hasAdvTableTab ? extractAdvancedStyles(elm) : {})\n        };\n    };\n    const extractDataFromRowElement = (editor, elm, hasAdvancedRowTab) => {\n        const dom = editor.dom;\n        return {\n            height: dom.getStyle(elm, 'height') || dom.getAttrib(elm, 'height'),\n            class: dom.getAttrib(elm, 'class', ''),\n            type: getRowType(elm),\n            align: getHAlignment(editor, elm),\n            ...(hasAdvancedRowTab ? extractAdvancedStyles(elm) : {})\n        };\n    };\n    const extractDataFromCellElement = (editor, cell, hasAdvancedCellTab, column) => {\n        const dom = editor.dom;\n        const colElm = column.getOr(cell);\n        const getStyle = (element, style) => dom.getStyle(element, style) || dom.getAttrib(element, style);\n        return {\n            width: getStyle(colElm, 'width'),\n            scope: dom.getAttrib(cell, 'scope'),\n            celltype: getNodeName(cell),\n            class: dom.getAttrib(cell, 'class', ''),\n            halign: getHAlignment(editor, cell),\n            valign: getVAlignment(editor, cell),\n            ...(hasAdvancedCellTab ? extractAdvancedStyles(cell) : {})\n        };\n    };\n\n    const getSelectedCells = (table, cells) => {\n        const warehouse = Warehouse.fromTable(table);\n        const allCells = Warehouse.justCells(warehouse);\n        const filtered = filter$1(allCells, (cellA) => exists(cells, (cellB) => eq(cellA.element, cellB)));\n        return map(filtered, (cell) => ({\n            element: cell.element.dom,\n            column: Warehouse.getColumnAt(warehouse, cell.column).map((col) => col.element.dom)\n        }));\n    };\n    const updateSimpleProps$1 = (modifier, colModifier, data, shouldUpdate) => {\n        if (shouldUpdate('scope')) {\n            modifier.setAttrib('scope', data.scope);\n        }\n        if (shouldUpdate('class') && data.class !== 'mce-no-match') {\n            modifier.setAttrib('class', data.class);\n        }\n        if (shouldUpdate('width')) {\n            colModifier.setStyle('width', addPxSuffix(data.width));\n        }\n    };\n    const updateAdvancedProps$1 = (modifier, data, shouldUpdate) => {\n        if (shouldUpdate('backgroundcolor')) {\n            modifier.setFormat('tablecellbackgroundcolor', data.backgroundcolor);\n        }\n        if (shouldUpdate('bordercolor')) {\n            modifier.setFormat('tablecellbordercolor', data.bordercolor);\n        }\n        if (shouldUpdate('borderstyle')) {\n            modifier.setFormat('tablecellborderstyle', data.borderstyle);\n        }\n        if (shouldUpdate('borderwidth')) {\n            modifier.setFormat('tablecellborderwidth', addPxSuffix(data.borderwidth));\n        }\n    };\n    const applyStyleData$1 = (editor, cells, data, wasChanged) => {\n        const isSingleCell = cells.length === 1;\n        each$1(cells, (item) => {\n            const cellElm = item.element;\n            const shouldOverrideCurrentValue = isSingleCell ? always : wasChanged;\n            const modifier = DomModifier.normal(editor, cellElm);\n            const colModifier = item.column.map((col) => DomModifier.normal(editor, col)).getOr(modifier);\n            updateSimpleProps$1(modifier, colModifier, data, shouldOverrideCurrentValue);\n            if (hasAdvancedCellTab(editor)) {\n                updateAdvancedProps$1(modifier, data, shouldOverrideCurrentValue);\n            }\n            // Apply alignment\n            if (wasChanged('halign')) {\n                setAlign(editor, cellElm, data.halign);\n            }\n            // Apply vertical alignment\n            if (wasChanged('valign')) {\n                setVAlign(editor, cellElm, data.valign);\n            }\n        });\n    };\n    const applyStructureData$1 = (editor, data) => {\n        // Switch cell type if applicable. Note that we specifically tell the command to not fire events\n        // as we'll batch the events and fire a `TableModified` event at the end of the updates.\n        editor.execCommand('mceTableCellType', false, { type: data.celltype, no_events: true });\n    };\n    const applyCellData = (editor, cells, oldData, data) => {\n        const modifiedData = filter(data, (value, key) => oldData[key] !== value);\n        if (size(modifiedData) > 0 && cells.length >= 1) {\n            // Retrieve the table before the cells are modified as there is a case where cells\n            // are replaced and the reference will be lost when trying to fire events.\n            table(cells[0]).each((table) => {\n                const selectedCells = getSelectedCells(table, cells);\n                // style modified if there's at least one other change apart from 'celltype' and 'scope'\n                const styleModified = size(filter(modifiedData, (_value, key) => key !== 'scope' && key !== 'celltype')) > 0;\n                const structureModified = has(modifiedData, 'celltype');\n                // Update the cells styling using the dialog data\n                if (styleModified || has(modifiedData, 'scope')) {\n                    applyStyleData$1(editor, selectedCells, data, curry(has, modifiedData));\n                }\n                // Update the cells structure using the dialog data\n                if (structureModified) {\n                    applyStructureData$1(editor, data);\n                }\n                fireTableModified(editor, table.dom, {\n                    structure: structureModified,\n                    style: styleModified,\n                });\n            });\n        }\n    };\n    const onSubmitCellForm = (editor, cells, oldData, api) => {\n        const data = api.getData();\n        api.close();\n        editor.undoManager.transact(() => {\n            applyCellData(editor, cells, oldData, data);\n            editor.focus();\n        });\n    };\n    const getData$1 = (editor, cells) => {\n        const cellsData = table(cells[0]).map((table) => map(getSelectedCells(table, cells), (item) => extractDataFromCellElement(editor, item.element, hasAdvancedCellTab(editor), item.column)));\n        return getSharedValues(cellsData.getOrDie());\n    };\n    const open$2 = (editor) => {\n        const cells = getCellsFromSelection(editor);\n        // Check if there are any cells to operate on\n        if (cells.length === 0) {\n            return;\n        }\n        const data = getData$1(editor, cells);\n        const dialogTabPanel = {\n            type: 'tabpanel',\n            tabs: [\n                {\n                    title: 'General',\n                    name: 'general',\n                    items: getItems$2(editor)\n                },\n                getAdvancedTab(editor, 'cell')\n            ]\n        };\n        const dialogPanel = {\n            type: 'panel',\n            items: [\n                {\n                    type: 'grid',\n                    columns: 2,\n                    items: getItems$2(editor)\n                }\n            ]\n        };\n        editor.windowManager.open({\n            title: 'Cell Properties',\n            size: 'normal',\n            body: hasAdvancedCellTab(editor) ? dialogTabPanel : dialogPanel,\n            buttons: [\n                {\n                    type: 'cancel',\n                    name: 'cancel',\n                    text: 'Cancel'\n                },\n                {\n                    type: 'submit',\n                    name: 'save',\n                    text: 'Save',\n                    primary: true\n                }\n            ],\n            initialData: data,\n            onSubmit: curry(onSubmitCellForm, editor, cells, data)\n        });\n    };\n\n    const getClassList = (editor) => buildClassList(getRowClassList(editor))\n        .map((items) => ({\n        name: 'class',\n        type: 'listbox',\n        label: 'Class',\n        items\n    }));\n    const formChildren = [\n        {\n            type: 'listbox',\n            name: 'type',\n            label: 'Row type',\n            items: [\n                { text: 'Header', value: 'header' },\n                { text: 'Body', value: 'body' },\n                { text: 'Footer', value: 'footer' }\n            ]\n        },\n        {\n            type: 'listbox',\n            name: 'align',\n            label: 'Alignment',\n            items: [\n                { text: 'None', value: '' },\n                { text: 'Left', value: 'left' },\n                { text: 'Center', value: 'center' },\n                { text: 'Right', value: 'right' }\n            ]\n        },\n        {\n            label: 'Height',\n            name: 'height',\n            type: 'input'\n        }\n    ];\n    const getItems$1 = (editor) => formChildren.concat(getClassList(editor).toArray());\n\n    const updateSimpleProps = (modifier, data, shouldUpdate) => {\n        if (shouldUpdate('class') && data.class !== 'mce-no-match') {\n            modifier.setAttrib('class', data.class);\n        }\n        if (shouldUpdate('height')) {\n            modifier.setStyle('height', addPxSuffix(data.height));\n        }\n    };\n    const updateAdvancedProps = (modifier, data, shouldUpdate) => {\n        if (shouldUpdate('backgroundcolor')) {\n            modifier.setStyle('background-color', data.backgroundcolor);\n        }\n        if (shouldUpdate('bordercolor')) {\n            modifier.setStyle('border-color', data.bordercolor);\n        }\n        if (shouldUpdate('borderstyle')) {\n            modifier.setStyle('border-style', data.borderstyle);\n        }\n    };\n    const applyStyleData = (editor, rows, data, wasChanged) => {\n        const isSingleRow = rows.length === 1;\n        const shouldOverrideCurrentValue = isSingleRow ? always : wasChanged;\n        each$1(rows, (rowElm) => {\n            const rowCells = children$1(SugarElement.fromDom(rowElm), 'td,th');\n            const modifier = DomModifier.normal(editor, rowElm);\n            updateSimpleProps(modifier, data, shouldOverrideCurrentValue);\n            if (hasAdvancedRowTab(editor)) {\n                updateAdvancedProps(modifier, data, shouldOverrideCurrentValue);\n            }\n            // TINY-10617: Simplify number of height styles when applying height on tr\n            if (wasChanged('height')) {\n                each$1(rowCells, (cell) => {\n                    editor.dom.setStyle(cell.dom, 'height', null);\n                });\n            }\n            if (wasChanged('align')) {\n                setAlign(editor, rowElm, data.align);\n            }\n        });\n    };\n    const applyStructureData = (editor, data) => {\n        // Switch cell type if applicable. Note that we specifically tell the command to not fire events\n        // as we'll batch the events and fire a `TableModified` event at the end of the updates.\n        editor.execCommand('mceTableRowType', false, { type: data.type, no_events: true });\n    };\n    const applyRowData = (editor, rows, oldData, data) => {\n        const modifiedData = filter(data, (value, key) => oldData[key] !== value);\n        if (size(modifiedData) > 0) {\n            const typeModified = has(modifiedData, 'type');\n            // style modified if there's at least one other change apart from 'type'\n            const styleModified = typeModified ? size(modifiedData) > 1 : true;\n            // Update the rows styling using the dialog data\n            if (styleModified) {\n                applyStyleData(editor, rows, data, curry(has, modifiedData));\n            }\n            // Update the rows structure using the dialog data\n            if (typeModified) {\n                applyStructureData(editor, data);\n            }\n            table(SugarElement.fromDom(rows[0])).each((table) => fireTableModified(editor, table.dom, {\n                structure: typeModified,\n                style: styleModified\n            }));\n        }\n    };\n    const onSubmitRowForm = (editor, rows, oldData, api) => {\n        const data = api.getData();\n        api.close();\n        editor.undoManager.transact(() => {\n            applyRowData(editor, rows, oldData, data);\n            editor.focus();\n        });\n    };\n    const open$1 = (editor) => {\n        const rows = getRowsFromSelection(getSelectionStart(editor), ephemera.selected);\n        // Check if there are any rows to operate on\n        if (rows.length === 0) {\n            return;\n        }\n        // Get current data and find shared values between rows\n        const rowsData = map(rows, (rowElm) => extractDataFromRowElement(editor, rowElm.dom, hasAdvancedRowTab(editor)));\n        const data = getSharedValues(rowsData);\n        const dialogTabPanel = {\n            type: 'tabpanel',\n            tabs: [\n                {\n                    title: 'General',\n                    name: 'general',\n                    items: getItems$1(editor)\n                },\n                getAdvancedTab(editor, 'row')\n            ]\n        };\n        const dialogPanel = {\n            type: 'panel',\n            items: [\n                {\n                    type: 'grid',\n                    columns: 2,\n                    items: getItems$1(editor)\n                }\n            ]\n        };\n        editor.windowManager.open({\n            title: 'Row Properties',\n            size: 'normal',\n            body: hasAdvancedRowTab(editor) ? dialogTabPanel : dialogPanel,\n            buttons: [\n                {\n                    type: 'cancel',\n                    name: 'cancel',\n                    text: 'Cancel'\n                },\n                {\n                    type: 'submit',\n                    name: 'save',\n                    text: 'Save',\n                    primary: true\n                }\n            ],\n            initialData: data,\n            onSubmit: curry(onSubmitRowForm, editor, map(rows, (r) => r.dom), data)\n        });\n    };\n\n    const getItems = (editor, classes, insertNewTable) => {\n        const rowColCountItems = !insertNewTable ? [] : [\n            {\n                type: 'input',\n                name: 'cols',\n                label: 'Cols',\n                inputMode: 'numeric'\n            },\n            {\n                type: 'input',\n                name: 'rows',\n                label: 'Rows',\n                inputMode: 'numeric'\n            }\n        ];\n        const alwaysItems = [\n            {\n                type: 'input',\n                name: 'width',\n                label: 'Width'\n            },\n            {\n                type: 'input',\n                name: 'height',\n                label: 'Height'\n            }\n        ];\n        const appearanceItems = hasAppearanceOptions(editor) ? [\n            {\n                type: 'input',\n                name: 'cellspacing',\n                label: 'Cell spacing',\n                inputMode: 'numeric'\n            },\n            {\n                type: 'input',\n                name: 'cellpadding',\n                label: 'Cell padding',\n                inputMode: 'numeric'\n            },\n            {\n                type: 'input',\n                name: 'border',\n                label: 'Border width'\n            },\n            {\n                type: 'label',\n                label: 'Caption',\n                items: [\n                    {\n                        type: 'checkbox',\n                        name: 'caption',\n                        label: 'Show caption'\n                    }\n                ]\n            }\n        ] : [];\n        const alignmentItem = [\n            {\n                type: 'listbox',\n                name: 'align',\n                label: 'Alignment',\n                items: [\n                    { text: 'None', value: '' },\n                    { text: 'Left', value: 'left' },\n                    { text: 'Center', value: 'center' },\n                    { text: 'Right', value: 'right' }\n                ]\n            }\n        ];\n        const classListItem = classes.length > 0 ? [\n            {\n                name: 'class',\n                type: 'listbox',\n                label: 'Class',\n                items: classes\n            }\n        ] : [];\n        return rowColCountItems.concat(alwaysItems).concat(appearanceItems).concat(alignmentItem).concat(classListItem);\n    };\n\n    // Explore the layers of the table till we find the first layer of tds or ths\n    const styleTDTH = (dom, elm, name, value) => {\n        if (elm.tagName === 'TD' || elm.tagName === 'TH') {\n            if (isString(name) && isNonNullable(value)) {\n                dom.setStyle(elm, name, value);\n            }\n            else {\n                dom.setStyles(elm, name);\n            }\n        }\n        else {\n            if (elm.children) {\n                for (let i = 0; i < elm.children.length; i++) {\n                    styleTDTH(dom, elm.children[i], name, value);\n                }\n            }\n        }\n    };\n    const applyDataToElement = (editor, tableElm, data, shouldApplyOnCell) => {\n        const dom = editor.dom;\n        const attrs = {};\n        const styles = {};\n        const shouldStyleWithCss$1 = shouldStyleWithCss(editor);\n        const hasAdvancedTableTab$1 = hasAdvancedTableTab(editor);\n        const borderIsZero = parseFloat(data.border) === 0;\n        if (!isUndefined(data.class) && data.class !== 'mce-no-match') {\n            attrs.class = data.class;\n        }\n        styles.height = addPxSuffix(data.height);\n        // TINY-12797: Make sure only CSS width or attribute is applied based on `table_style_by_css` option\n        if (shouldStyleWithCss$1) {\n            styles.width = addPxSuffix(data.width);\n            attrs.width = null;\n        }\n        else {\n            attrs.width = removePxSuffix(data.width);\n            styles.width = '';\n        }\n        if (shouldStyleWithCss$1) {\n            if (borderIsZero) {\n                attrs.border = 0;\n                styles['border-width'] = '';\n            }\n            else {\n                styles['border-width'] = addPxSuffix(data.border);\n                attrs.border = 1;\n            }\n            styles['border-spacing'] = addPxSuffix(data.cellspacing);\n        }\n        else {\n            attrs.border = borderIsZero ? 0 : data.border;\n            attrs.cellpadding = data.cellpadding;\n            attrs.cellspacing = data.cellspacing;\n        }\n        // TINY-9837: Relevant data are applied on child TD/THs only if they have been modified since the previous dialog submission\n        if (shouldStyleWithCss$1 && tableElm.children) {\n            const cellStyles = {};\n            if (borderIsZero) {\n                cellStyles['border-width'] = '';\n            }\n            else if (shouldApplyOnCell.border) {\n                cellStyles['border-width'] = addPxSuffix(data.border);\n            }\n            if (shouldApplyOnCell.cellpadding) {\n                cellStyles.padding = addPxSuffix(data.cellpadding);\n            }\n            if (hasAdvancedTableTab$1 && shouldApplyOnCell.bordercolor) {\n                cellStyles['border-color'] = data.bordercolor;\n            }\n            if (!isEmpty$1(cellStyles)) {\n                for (let i = 0; i < tableElm.children.length; i++) {\n                    styleTDTH(dom, tableElm.children[i], cellStyles);\n                }\n            }\n        }\n        if (hasAdvancedTableTab$1) {\n            const advData = data;\n            styles['background-color'] = advData.backgroundcolor;\n            styles['border-color'] = advData.bordercolor;\n            styles['border-style'] = advData.borderstyle;\n        }\n        dom.setStyles(tableElm, { ...getDefaultStyles(editor), ...styles });\n        dom.setAttribs(tableElm, { ...getDefaultAttributes(editor), ...attrs });\n    };\n    const onSubmitTableForm = (editor, tableElm, oldData, api) => {\n        const dom = editor.dom;\n        const data = api.getData();\n        const modifiedData = filter(data, (value, key) => oldData[key] !== value);\n        api.close();\n        editor.undoManager.transact(() => {\n            if (!tableElm) {\n                const cols = toInt(data.cols).getOr(1);\n                const rows = toInt(data.rows).getOr(1);\n                // Cases 1 & 3 - inserting a table\n                editor.execCommand('mceInsertTable', false, { rows, columns: cols });\n                tableElm = getSelectionCell(getSelectionStart(editor), getIsRoot(editor))\n                    .bind((cell) => table(cell, getIsRoot(editor)))\n                    .map((table) => table.dom)\n                    .getOrDie();\n            }\n            if (size(modifiedData) > 0) {\n                const applicableCellProperties = {\n                    border: has(modifiedData, 'border'),\n                    bordercolor: has(modifiedData, 'bordercolor'),\n                    cellpadding: has(modifiedData, 'cellpadding')\n                };\n                applyDataToElement(editor, tableElm, data, applicableCellProperties);\n                // Toggle caption on/off\n                const captionElm = dom.select('caption', tableElm)[0];\n                if (captionElm && !data.caption || !captionElm && data.caption) {\n                    editor.execCommand('mceTableToggleCaption');\n                }\n                setAlign(editor, tableElm, data.align);\n            }\n            editor.focus();\n            editor.addVisual();\n            if (size(modifiedData) > 0) {\n                const captionModified = has(modifiedData, 'caption');\n                // style modified if there's at least one other change apart from 'caption'\n                const styleModified = captionModified ? size(modifiedData) > 1 : true;\n                fireTableModified(editor, tableElm, { structure: captionModified, style: styleModified });\n            }\n        });\n    };\n    const open = (editor, insertNewTable) => {\n        let tableElm;\n        let data = extractDataFromSettings(editor, hasAdvancedTableTab(editor));\n        // Cases for creation/update of tables:\n        // 1. isNew == true - called by mceInsertTable - we are inserting a new table so we don't care what the selection's parent is,\n        //    and we need to add cols and rows input fields to the dialog\n        // 2. isNew == false && selection parent is a table - update the table\n        // 3. isNew == false && selection parent isn't a table - open dialog with default values and insert a table\n        if (insertNewTable) {\n            // Case 1 - isNew == true. We're inserting a new table so use defaults and add cols and rows + adv properties.\n            data.cols = '1';\n            data.rows = '1';\n            if (hasAdvancedTableTab(editor)) {\n                data.borderstyle = '';\n                data.bordercolor = '';\n                data.backgroundcolor = '';\n            }\n        }\n        else {\n            tableElm = getSelectionCellOrCaption(getSelectionStart(editor), getIsRoot(editor))\n                .bind((cellOrCaption) => table(cellOrCaption, getIsRoot(editor)))\n                .map((table) => table.dom)\n                .getOrNull();\n            if (tableElm) {\n                // Case 2 - isNew == false && table parent\n                data = extractDataFromTableElement(editor, tableElm, hasAdvancedTableTab(editor));\n            }\n            else {\n                // Case 3 - isNew == false && non-table parent. data is set to basic defaults so just add the adv properties if needed\n                if (hasAdvancedTableTab(editor)) {\n                    data.borderstyle = '';\n                    data.bordercolor = '';\n                    data.backgroundcolor = '';\n                }\n            }\n        }\n        const classes = buildClassList(getTableClassList(editor));\n        if (classes.isSome()) {\n            if (data.class) {\n                data.class = data.class.replace(/\\s*mce\\-item\\-table\\s*/g, '');\n            }\n        }\n        const generalPanel = {\n            type: 'grid',\n            columns: 2,\n            items: getItems(editor, classes.getOr([]), insertNewTable)\n        };\n        const nonAdvancedForm = () => ({\n            type: 'panel',\n            items: [generalPanel]\n        });\n        const advancedForm = () => ({\n            type: 'tabpanel',\n            tabs: [\n                {\n                    title: 'General',\n                    name: 'general',\n                    items: [generalPanel]\n                },\n                getAdvancedTab(editor, 'table')\n            ]\n        });\n        const dialogBody = hasAdvancedTableTab(editor) ? advancedForm() : nonAdvancedForm();\n        editor.windowManager.open({\n            title: 'Table Properties',\n            size: 'normal',\n            body: dialogBody,\n            onSubmit: curry(onSubmitTableForm, editor, tableElm, data),\n            buttons: [\n                {\n                    type: 'cancel',\n                    name: 'cancel',\n                    text: 'Cancel'\n                },\n                {\n                    type: 'submit',\n                    name: 'save',\n                    text: 'Save',\n                    primary: true\n                }\n            ],\n            initialData: data\n        });\n    };\n\n    const registerCommands = (editor) => {\n        const runAction = (f) => {\n            if (isInEditableContext(getSelectionStart(editor))) {\n                f();\n            }\n        };\n        // Register dialog commands\n        each({\n            // AP-101 TableDialog.open renders a slightly different dialog if isNew is true\n            mceTableProps: curry(open, editor, false),\n            mceTableRowProps: curry(open$1, editor),\n            mceTableCellProps: curry(open$2, editor),\n            mceInsertTableDialog: curry(open, editor, true),\n        }, (func, name) => editor.addCommand(name, () => runAction(func)));\n    };\n\n    /*\n     NOTE: This file is partially duplicated in the following locations:\n      - models/dom/table/queries/TableTargets.ts\n      - advtable\n     Make sure that if making changes to this file, the other files are updated as well\n     */\n    const noMenu = (cell) => ({\n        element: cell,\n        mergable: Optional.none(),\n        unmergable: Optional.none(),\n        selection: [cell]\n    });\n    const forMenu = (selectedCells, table, cell) => ({\n        element: cell,\n        mergable: mergable(table, selectedCells, ephemera),\n        unmergable: unmergable(selectedCells),\n        selection: selection(selectedCells)\n    });\n\n    const getSelectionTargets = (editor) => {\n        const targets = Cell(Optional.none());\n        const changeHandlers = Cell([]);\n        let selectionDetails = Optional.none();\n        const isCaption = isTag('caption');\n        const isDisabledForSelection = (key) => selectionDetails.forall((details) => !details[key]);\n        const getStart = () => getSelectionCellOrCaption(getSelectionStart(editor), getIsRoot(editor));\n        const getEnd = () => getSelectionCellOrCaption(getSelectionEnd(editor), getIsRoot(editor));\n        const findTargets = () => getStart().bind((startCellOrCaption) => flatten(lift2(table(startCellOrCaption), getEnd().bind(table), (startTable, endTable) => {\n            if (eq(startTable, endTable)) {\n                if (isCaption(startCellOrCaption)) {\n                    return Optional.some(noMenu(startCellOrCaption));\n                }\n                else {\n                    return Optional.some(forMenu(getCellsFromSelection(editor), startTable, startCellOrCaption));\n                }\n            }\n            return Optional.none();\n        })));\n        const getExtractedDetails = (targets) => {\n            const tableOpt = table(targets.element);\n            return tableOpt.map((table) => {\n                const warehouse = Warehouse.fromTable(table);\n                const selectedCells = onCells(warehouse, targets).getOr([]);\n                const locked = foldl(selectedCells, (acc, cell) => {\n                    if (cell.isLocked) {\n                        acc.onAny = true;\n                        if (cell.column === 0) {\n                            acc.onFirst = true;\n                        }\n                        else if (cell.column + cell.colspan >= warehouse.grid.columns) {\n                            acc.onLast = true;\n                        }\n                    }\n                    return acc;\n                }, { onAny: false, onFirst: false, onLast: false });\n                return {\n                    mergeable: onUnlockedMergable(warehouse, targets).isSome(),\n                    unmergeable: onUnlockedUnmergable(warehouse, targets).isSome(),\n                    locked\n                };\n            });\n        };\n        const resetTargets = () => {\n            // Reset the targets\n            targets.set(cached(findTargets)());\n            // Reset the selection details\n            selectionDetails = targets.get().bind(getExtractedDetails);\n            // Trigger change handlers\n            each$1(changeHandlers.get(), call);\n        };\n        const setupHandler = (handler) => {\n            // Execute the handler to set the initial state\n            handler();\n            // Register the handler so we can update the state when resetting targets\n            changeHandlers.set(changeHandlers.get().concat([handler]));\n            return () => {\n                changeHandlers.set(filter$1(changeHandlers.get(), (h) => h !== handler));\n            };\n        };\n        const onSetup = (api, isDisabled) => setupHandler(() => targets.get().fold(() => {\n            api.setEnabled(false);\n        }, (targets) => {\n            api.setEnabled(!isDisabled(targets) && editor.selection.isEditable());\n        }));\n        const onSetupWithToggle = (api, isDisabled, isActive) => setupHandler(() => targets.get().fold(() => {\n            api.setEnabled(false);\n            api.setActive(false);\n        }, (targets) => {\n            api.setEnabled(!isDisabled(targets) && editor.selection.isEditable());\n            api.setActive(isActive(targets));\n        }));\n        const isDisabledFromLocked = (lockedDisable) => selectionDetails.exists((details) => details.locked[lockedDisable]);\n        const onSetupTable = (api) => onSetup(api, (_) => false);\n        const onSetupCellOrRow = (api) => onSetup(api, (targets) => isCaption(targets.element));\n        const onSetupColumn = (lockedDisable) => (api) => onSetup(api, (targets) => isCaption(targets.element) || isDisabledFromLocked(lockedDisable));\n        const onSetupPasteable = (getClipboardData) => (api) => onSetup(api, (targets) => isCaption(targets.element) || getClipboardData().isNone());\n        const onSetupPasteableColumn = (getClipboardData, lockedDisable) => (api) => onSetup(api, (targets) => isCaption(targets.element) || getClipboardData().isNone() || isDisabledFromLocked(lockedDisable));\n        const onSetupMergeable = (api) => onSetup(api, (_targets) => isDisabledForSelection('mergeable'));\n        const onSetupUnmergeable = (api) => onSetup(api, (_targets) => isDisabledForSelection('unmergeable'));\n        const onSetupTableWithCaption = (api) => {\n            return onSetupWithToggle(api, never, (targets) => {\n                const tableOpt = table(targets.element, getIsRoot(editor));\n                return tableOpt.exists((table) => child(table, 'caption'));\n            });\n        };\n        const onSetupTableHeaders = (command, headerType) => (api) => {\n            return onSetupWithToggle(api, (targets) => isCaption(targets.element), () => editor.queryCommandValue(command) === headerType);\n        };\n        const onSetupTableRowHeaders = onSetupTableHeaders('mceTableRowType', 'header');\n        const onSetupTableColumnHeaders = onSetupTableHeaders('mceTableColType', 'th');\n        editor.on('NodeChange ExecCommand TableSelectorChange', resetTargets);\n        return {\n            onSetupTable,\n            onSetupCellOrRow,\n            onSetupColumn,\n            onSetupPasteable,\n            onSetupPasteableColumn,\n            onSetupMergeable,\n            onSetupUnmergeable,\n            resetTargets,\n            onSetupTableWithCaption,\n            onSetupTableRowHeaders,\n            onSetupTableColumnHeaders,\n            targets: targets.get\n        };\n    };\n\n    var global = tinymce.util.Tools.resolve('tinymce.FakeClipboard');\n\n    /*\n     NOTE: This file is duplicated in the following locations:\n      - models/dom/table/api/Clipboard.ts\n     Make sure that if making changes to this file, the other files are updated as well\n     */\n    const tableTypeBase = 'x-tinymce/dom-table-';\n    const tableTypeRow = tableTypeBase + 'rows';\n    const tableTypeColumn = tableTypeBase + 'columns';\n    const getData = (type) => {\n        const items = global.read() ?? [];\n        return findMap(items, (item) => Optional.from(item.getType(type)));\n    };\n    const getRows = () => getData(tableTypeRow);\n    const getColumns = () => getData(tableTypeColumn);\n\n    const onSetupEditable$1 = (editor) => (api) => {\n        const nodeChanged = () => {\n            api.setEnabled(editor.selection.isEditable());\n        };\n        editor.on('NodeChange', nodeChanged);\n        nodeChanged();\n        return () => {\n            editor.off('NodeChange', nodeChanged);\n        };\n    };\n    const addButtons = (editor, selectionTargets) => {\n        editor.ui.registry.addMenuButton('table', {\n            tooltip: 'Table',\n            icon: 'table',\n            onSetup: onSetupEditable$1(editor),\n            fetch: (callback) => callback('inserttable | cell row column | advtablesort | tableprops deletetable')\n        });\n        const cmd = (command) => () => editor.execCommand(command);\n        // TODO: TINY-8172 Unwind this when an alternative solution is found\n        const addButtonIfRegistered = (name, spec) => {\n            if (editor.queryCommandSupported(spec.command)) {\n                editor.ui.registry.addButton(name, {\n                    ...spec,\n                    onAction: isFunction(spec.onAction) ? spec.onAction : cmd(spec.command)\n                });\n            }\n        };\n        // TODO: TINY-8172 Unwind this when an alternative solution is found\n        const addToggleButtonIfRegistered = (name, spec) => {\n            if (editor.queryCommandSupported(spec.command)) {\n                editor.ui.registry.addToggleButton(name, {\n                    ...spec,\n                    onAction: isFunction(spec.onAction) ? spec.onAction : cmd(spec.command)\n                });\n            }\n        };\n        addButtonIfRegistered('tableprops', {\n            tooltip: 'Table properties',\n            command: 'mceTableProps',\n            icon: 'table',\n            onSetup: selectionTargets.onSetupTable\n        });\n        addButtonIfRegistered('tabledelete', {\n            tooltip: 'Delete table',\n            command: 'mceTableDelete',\n            icon: 'table-delete-table',\n            onSetup: selectionTargets.onSetupTable\n        });\n        addButtonIfRegistered('tablecellprops', {\n            tooltip: 'Cell properties',\n            command: 'mceTableCellProps',\n            icon: 'table-cell-properties',\n            onSetup: selectionTargets.onSetupCellOrRow\n        });\n        addButtonIfRegistered('tablemergecells', {\n            tooltip: 'Merge cells',\n            command: 'mceTableMergeCells',\n            icon: 'table-merge-cells',\n            onSetup: selectionTargets.onSetupMergeable\n        });\n        addButtonIfRegistered('tablesplitcells', {\n            tooltip: 'Split cell',\n            command: 'mceTableSplitCells',\n            icon: 'table-split-cells',\n            onSetup: selectionTargets.onSetupUnmergeable\n        });\n        addButtonIfRegistered('tableinsertrowbefore', {\n            tooltip: 'Insert row before',\n            command: 'mceTableInsertRowBefore',\n            icon: 'table-insert-row-above',\n            onSetup: selectionTargets.onSetupCellOrRow\n        });\n        addButtonIfRegistered('tableinsertrowafter', {\n            tooltip: 'Insert row after',\n            command: 'mceTableInsertRowAfter',\n            icon: 'table-insert-row-after',\n            onSetup: selectionTargets.onSetupCellOrRow\n        });\n        addButtonIfRegistered('tabledeleterow', {\n            tooltip: 'Delete row',\n            command: 'mceTableDeleteRow',\n            icon: 'table-delete-row',\n            onSetup: selectionTargets.onSetupCellOrRow\n        });\n        addButtonIfRegistered('tablerowprops', {\n            tooltip: 'Row properties',\n            command: 'mceTableRowProps',\n            icon: 'table-row-properties',\n            onSetup: selectionTargets.onSetupCellOrRow\n        });\n        addButtonIfRegistered('tableinsertcolbefore', {\n            tooltip: 'Insert column before',\n            command: 'mceTableInsertColBefore',\n            icon: 'table-insert-column-before',\n            onSetup: selectionTargets.onSetupColumn(\"onFirst\" /* LockedDisable.onFirst */)\n        });\n        addButtonIfRegistered('tableinsertcolafter', {\n            tooltip: 'Insert column after',\n            command: 'mceTableInsertColAfter',\n            icon: 'table-insert-column-after',\n            onSetup: selectionTargets.onSetupColumn(\"onLast\" /* LockedDisable.onLast */)\n        });\n        addButtonIfRegistered('tabledeletecol', {\n            tooltip: 'Delete column',\n            command: 'mceTableDeleteCol',\n            icon: 'table-delete-column',\n            onSetup: selectionTargets.onSetupColumn(\"onAny\" /* LockedDisable.onAny */)\n        });\n        addButtonIfRegistered('tablecutrow', {\n            tooltip: 'Cut row',\n            command: 'mceTableCutRow',\n            icon: 'cut-row',\n            onSetup: selectionTargets.onSetupCellOrRow\n        });\n        addButtonIfRegistered('tablecopyrow', {\n            tooltip: 'Copy row',\n            command: 'mceTableCopyRow',\n            icon: 'duplicate-row',\n            onSetup: selectionTargets.onSetupCellOrRow\n        });\n        addButtonIfRegistered('tablepasterowbefore', {\n            tooltip: 'Paste row before',\n            command: 'mceTablePasteRowBefore',\n            icon: 'paste-row-before',\n            onSetup: selectionTargets.onSetupPasteable(getRows)\n        });\n        addButtonIfRegistered('tablepasterowafter', {\n            tooltip: 'Paste row after',\n            command: 'mceTablePasteRowAfter',\n            icon: 'paste-row-after',\n            onSetup: selectionTargets.onSetupPasteable(getRows)\n        });\n        addButtonIfRegistered('tablecutcol', {\n            tooltip: 'Cut column',\n            command: 'mceTableCutCol',\n            icon: 'cut-column',\n            onSetup: selectionTargets.onSetupColumn(\"onAny\" /* LockedDisable.onAny */)\n        });\n        addButtonIfRegistered('tablecopycol', {\n            tooltip: 'Copy column',\n            command: 'mceTableCopyCol',\n            icon: 'duplicate-column',\n            onSetup: selectionTargets.onSetupColumn(\"onAny\" /* LockedDisable.onAny */)\n        });\n        addButtonIfRegistered('tablepastecolbefore', {\n            tooltip: 'Paste column before',\n            command: 'mceTablePasteColBefore',\n            icon: 'paste-column-before',\n            onSetup: selectionTargets.onSetupPasteableColumn(getColumns, \"onFirst\" /* LockedDisable.onFirst */)\n        });\n        addButtonIfRegistered('tablepastecolafter', {\n            tooltip: 'Paste column after',\n            command: 'mceTablePasteColAfter',\n            icon: 'paste-column-after',\n            onSetup: selectionTargets.onSetupPasteableColumn(getColumns, \"onLast\" /* LockedDisable.onLast */)\n        });\n        addButtonIfRegistered('tableinsertdialog', {\n            tooltip: 'Insert table',\n            command: 'mceInsertTableDialog',\n            icon: 'table',\n            onSetup: onSetupEditable$1(editor)\n        });\n        const tableClassList = filterNoneItem(getTableClassList(editor));\n        if (tableClassList.length !== 0 && editor.queryCommandSupported('mceTableToggleClass')) {\n            editor.ui.registry.addMenuButton('tableclass', {\n                icon: 'table-classes',\n                tooltip: 'Table styles',\n                fetch: generateMenuItemsCallback(editor, tableClassList, 'tableclass', (value) => editor.execCommand('mceTableToggleClass', false, value)),\n                onSetup: selectionTargets.onSetupTable\n            });\n        }\n        const tableCellClassList = filterNoneItem(getCellClassList(editor));\n        if (tableCellClassList.length !== 0 && editor.queryCommandSupported('mceTableCellToggleClass')) {\n            editor.ui.registry.addMenuButton('tablecellclass', {\n                icon: 'table-cell-classes',\n                tooltip: 'Cell styles',\n                fetch: generateMenuItemsCallback(editor, tableCellClassList, 'tablecellclass', (value) => editor.execCommand('mceTableCellToggleClass', false, value)),\n                onSetup: selectionTargets.onSetupCellOrRow\n            });\n        }\n        // TODO: TINY-8172 Unwind this when an alternative solution is found\n        if (editor.queryCommandSupported('mceTableApplyCellStyle')) {\n            editor.ui.registry.addMenuButton('tablecellvalign', {\n                icon: 'vertical-align',\n                tooltip: 'Vertical align',\n                fetch: generateMenuItemsCallback(editor, verticalAlignValues, 'tablecellverticalalign', applyTableCellStyle(editor, 'vertical-align')),\n                onSetup: selectionTargets.onSetupCellOrRow\n            });\n            editor.ui.registry.addMenuButton('tablecellborderwidth', {\n                icon: 'border-width',\n                tooltip: 'Border width',\n                fetch: generateMenuItemsCallback(editor, getTableBorderWidths(editor), 'tablecellborderwidth', applyTableCellStyle(editor, 'border-width')),\n                onSetup: selectionTargets.onSetupCellOrRow\n            });\n            editor.ui.registry.addMenuButton('tablecellborderstyle', {\n                icon: 'border-style',\n                tooltip: 'Border style',\n                fetch: generateMenuItemsCallback(editor, getTableBorderStyles(editor), 'tablecellborderstyle', applyTableCellStyle(editor, 'border-style')),\n                onSetup: selectionTargets.onSetupCellOrRow\n            });\n            editor.ui.registry.addMenuButton('tablecellbackgroundcolor', {\n                icon: 'cell-background-color',\n                tooltip: 'Background color',\n                fetch: (callback) => callback(buildColorMenu(editor, getTableBackgroundColorMap(editor), 'background-color')),\n                onSetup: selectionTargets.onSetupCellOrRow\n            });\n            editor.ui.registry.addMenuButton('tablecellbordercolor', {\n                icon: 'cell-border-color',\n                tooltip: 'Border color',\n                fetch: (callback) => callback(buildColorMenu(editor, getTableBorderColorMap(editor), 'border-color')),\n                onSetup: selectionTargets.onSetupCellOrRow\n            });\n        }\n        addToggleButtonIfRegistered('tablecaption', {\n            tooltip: 'Table caption',\n            icon: 'table-caption',\n            command: 'mceTableToggleCaption',\n            onSetup: selectionTargets.onSetupTableWithCaption\n        });\n        addToggleButtonIfRegistered('tablerowheader', {\n            tooltip: 'Row header',\n            icon: 'table-top-header',\n            command: 'mceTableRowType',\n            onAction: changeRowHeader(editor),\n            onSetup: selectionTargets.onSetupTableRowHeaders\n        });\n        addToggleButtonIfRegistered('tablecolheader', {\n            tooltip: 'Column header',\n            icon: 'table-left-header',\n            command: 'mceTableColType',\n            onAction: changeColumnHeader(editor),\n            onSetup: selectionTargets.onSetupTableColumnHeaders\n        });\n    };\n    const addToolbars = (editor) => {\n        const isEditableTable = (table) => editor.dom.is(table, 'table') && editor.getBody().contains(table) && editor.dom.isEditable(table.parentNode);\n        const toolbar = getToolbar(editor);\n        if (toolbar.length > 0) {\n            editor.ui.registry.addContextToolbar('table', {\n                predicate: isEditableTable,\n                items: toolbar,\n                scope: 'node',\n                position: 'node'\n            });\n        }\n    };\n\n    const onSetupEditable = (editor) => (api) => {\n        const nodeChanged = () => {\n            api.setEnabled(editor.selection.isEditable());\n        };\n        editor.on('NodeChange', nodeChanged);\n        nodeChanged();\n        return () => {\n            editor.off('NodeChange', nodeChanged);\n        };\n    };\n    const addMenuItems = (editor, selectionTargets) => {\n        const cmd = (command) => () => editor.execCommand(command);\n        // TODO: TINY-8172 Unwind this when an alternative solution is found\n        const addMenuIfRegistered = (name, spec) => {\n            if (editor.queryCommandSupported(spec.command)) {\n                editor.ui.registry.addMenuItem(name, {\n                    ...spec,\n                    onAction: isFunction(spec.onAction) ? spec.onAction : cmd(spec.command)\n                });\n                return true;\n            }\n            else {\n                return false;\n            }\n        };\n        // TODO: TINY-8172 Unwind this when an alternative solution is found\n        const addToggleMenuIfRegistered = (name, spec) => {\n            if (editor.queryCommandSupported(spec.command)) {\n                editor.ui.registry.addToggleMenuItem(name, {\n                    ...spec,\n                    onAction: isFunction(spec.onAction) ? spec.onAction : cmd(spec.command)\n                });\n            }\n        };\n        const insertTableAction = (data) => {\n            editor.execCommand('mceInsertTable', false, {\n                rows: data.numRows,\n                columns: data.numColumns\n            });\n        };\n        const hasRowMenuItems = [\n            addMenuIfRegistered('tableinsertrowbefore', {\n                text: 'Insert row before',\n                icon: 'table-insert-row-above',\n                command: 'mceTableInsertRowBefore',\n                onSetup: selectionTargets.onSetupCellOrRow\n            }),\n            addMenuIfRegistered('tableinsertrowafter', {\n                text: 'Insert row after',\n                icon: 'table-insert-row-after',\n                command: 'mceTableInsertRowAfter',\n                onSetup: selectionTargets.onSetupCellOrRow\n            }),\n            addMenuIfRegistered('tabledeleterow', {\n                text: 'Delete row',\n                icon: 'table-delete-row',\n                command: 'mceTableDeleteRow',\n                onSetup: selectionTargets.onSetupCellOrRow\n            }),\n            addMenuIfRegistered('tablerowprops', {\n                text: 'Row properties',\n                icon: 'table-row-properties',\n                command: 'mceTableRowProps',\n                onSetup: selectionTargets.onSetupCellOrRow\n            }),\n            addMenuIfRegistered('tablecutrow', {\n                text: 'Cut row',\n                icon: 'cut-row',\n                command: 'mceTableCutRow',\n                onSetup: selectionTargets.onSetupCellOrRow\n            }),\n            addMenuIfRegistered('tablecopyrow', {\n                text: 'Copy row',\n                icon: 'duplicate-row',\n                command: 'mceTableCopyRow',\n                onSetup: selectionTargets.onSetupCellOrRow\n            }),\n            addMenuIfRegistered('tablepasterowbefore', {\n                text: 'Paste row before',\n                icon: 'paste-row-before',\n                command: 'mceTablePasteRowBefore',\n                onSetup: selectionTargets.onSetupPasteable(getRows)\n            }),\n            addMenuIfRegistered('tablepasterowafter', {\n                text: 'Paste row after',\n                icon: 'paste-row-after',\n                command: 'mceTablePasteRowAfter',\n                onSetup: selectionTargets.onSetupPasteable(getRows)\n            }),\n        ];\n        const hasColumnMenuItems = [\n            addMenuIfRegistered('tableinsertcolumnbefore', {\n                text: 'Insert column before',\n                icon: 'table-insert-column-before',\n                command: 'mceTableInsertColBefore',\n                onSetup: selectionTargets.onSetupColumn(\"onFirst\" /* LockedDisable.onFirst */)\n            }),\n            addMenuIfRegistered('tableinsertcolumnafter', {\n                text: 'Insert column after',\n                icon: 'table-insert-column-after',\n                command: 'mceTableInsertColAfter',\n                onSetup: selectionTargets.onSetupColumn(\"onLast\" /* LockedDisable.onLast */)\n            }),\n            addMenuIfRegistered('tabledeletecolumn', {\n                text: 'Delete column',\n                icon: 'table-delete-column',\n                command: 'mceTableDeleteCol',\n                onSetup: selectionTargets.onSetupColumn(\"onAny\" /* LockedDisable.onAny */)\n            }),\n            addMenuIfRegistered('tablecutcolumn', {\n                text: 'Cut column',\n                icon: 'cut-column',\n                command: 'mceTableCutCol',\n                onSetup: selectionTargets.onSetupColumn(\"onAny\" /* LockedDisable.onAny */)\n            }),\n            addMenuIfRegistered('tablecopycolumn', {\n                text: 'Copy column',\n                icon: 'duplicate-column',\n                command: 'mceTableCopyCol',\n                onSetup: selectionTargets.onSetupColumn(\"onAny\" /* LockedDisable.onAny */)\n            }),\n            addMenuIfRegistered('tablepastecolumnbefore', {\n                text: 'Paste column before',\n                icon: 'paste-column-before',\n                command: 'mceTablePasteColBefore',\n                onSetup: selectionTargets.onSetupPasteableColumn(getColumns, \"onFirst\" /* LockedDisable.onFirst */)\n            }),\n            addMenuIfRegistered('tablepastecolumnafter', {\n                text: 'Paste column after',\n                icon: 'paste-column-after',\n                command: 'mceTablePasteColAfter',\n                onSetup: selectionTargets.onSetupPasteableColumn(getColumns, \"onLast\" /* LockedDisable.onLast */)\n            }),\n        ];\n        const hasCellMenuItems = [\n            addMenuIfRegistered('tablecellprops', {\n                text: 'Cell properties',\n                icon: 'table-cell-properties',\n                command: 'mceTableCellProps',\n                onSetup: selectionTargets.onSetupCellOrRow\n            }),\n            addMenuIfRegistered('tablemergecells', {\n                text: 'Merge cells',\n                icon: 'table-merge-cells',\n                command: 'mceTableMergeCells',\n                onSetup: selectionTargets.onSetupMergeable\n            }),\n            addMenuIfRegistered('tablesplitcells', {\n                text: 'Split cell',\n                icon: 'table-split-cells',\n                command: 'mceTableSplitCells',\n                onSetup: selectionTargets.onSetupUnmergeable\n            }),\n        ];\n        if (!hasTableGrid(editor)) {\n            editor.ui.registry.addMenuItem('inserttable', {\n                text: 'Table',\n                icon: 'table',\n                onAction: cmd('mceInsertTableDialog'),\n                onSetup: onSetupEditable(editor)\n            });\n        }\n        else {\n            editor.ui.registry.addNestedMenuItem('inserttable', {\n                text: 'Table',\n                icon: 'table',\n                getSubmenuItems: () => [{ type: 'fancymenuitem', fancytype: 'inserttable', onAction: insertTableAction }],\n                onSetup: onSetupEditable(editor)\n            });\n        }\n        // TINY-3636: We want a way to use the dialog even when tablegrid true.\n        // If tablegrid false then inserttable and inserttabledialog are the same,\n        // but that's preferrable to breaking things at this point.\n        editor.ui.registry.addMenuItem('inserttabledialog', {\n            text: 'Insert table',\n            icon: 'table',\n            onAction: cmd('mceInsertTableDialog'),\n            onSetup: onSetupEditable(editor)\n        });\n        addMenuIfRegistered('tableprops', {\n            text: 'Table properties',\n            onSetup: selectionTargets.onSetupTable,\n            command: 'mceTableProps'\n        });\n        addMenuIfRegistered('deletetable', {\n            text: 'Delete table',\n            icon: 'table-delete-table',\n            onSetup: selectionTargets.onSetupTable,\n            command: 'mceTableDelete'\n        });\n        // if any of the row menu items returned true\n        if (contains(hasRowMenuItems, true)) {\n            editor.ui.registry.addNestedMenuItem('row', {\n                type: 'nestedmenuitem',\n                text: 'Row',\n                getSubmenuItems: constant('tableinsertrowbefore tableinsertrowafter tabledeleterow tablerowprops | tablecutrow tablecopyrow tablepasterowbefore tablepasterowafter')\n            });\n        }\n        if (contains(hasColumnMenuItems, true)) {\n            editor.ui.registry.addNestedMenuItem('column', {\n                type: 'nestedmenuitem',\n                text: 'Column',\n                getSubmenuItems: constant('tableinsertcolumnbefore tableinsertcolumnafter tabledeletecolumn | tablecutcolumn tablecopycolumn tablepastecolumnbefore tablepastecolumnafter')\n            });\n        }\n        if (contains(hasCellMenuItems, true)) {\n            editor.ui.registry.addNestedMenuItem('cell', {\n                type: 'nestedmenuitem',\n                text: 'Cell',\n                getSubmenuItems: constant('tablecellprops tablemergecells tablesplitcells')\n            });\n        }\n        editor.ui.registry.addContextMenu('table', {\n            update: () => {\n                // context menu fires before node change, so check the selection here first\n                selectionTargets.resetTargets();\n                // ignoring element since it's monitored elsewhere\n                return selectionTargets.targets().fold(constant(''), (targets) => {\n                    // If clicking in a caption, then we shouldn't show the cell/row/column options\n                    if (name(targets.element) === 'caption') {\n                        return 'tableprops deletetable';\n                    }\n                    else {\n                        return 'cell row column | advtablesort | tableprops deletetable';\n                    }\n                });\n            }\n        });\n        const tableClassList = filterNoneItem(getTableClassList(editor));\n        if (tableClassList.length !== 0 && editor.queryCommandSupported('mceTableToggleClass')) {\n            editor.ui.registry.addNestedMenuItem('tableclass', {\n                icon: 'table-classes',\n                text: 'Table styles',\n                getSubmenuItems: () => buildMenuItems(editor, tableClassList, 'tableclass', (value) => editor.execCommand('mceTableToggleClass', false, value)),\n                onSetup: selectionTargets.onSetupTable\n            });\n        }\n        const tableCellClassList = filterNoneItem(getCellClassList(editor));\n        if (tableCellClassList.length !== 0 && editor.queryCommandSupported('mceTableCellToggleClass')) {\n            editor.ui.registry.addNestedMenuItem('tablecellclass', {\n                icon: 'table-cell-classes',\n                text: 'Cell styles',\n                getSubmenuItems: () => buildMenuItems(editor, tableCellClassList, 'tablecellclass', (value) => editor.execCommand('mceTableCellToggleClass', false, value)),\n                onSetup: selectionTargets.onSetupCellOrRow\n            });\n        }\n        // TODO: TINY-8172 Unwind this when an alternative solution is found\n        if (editor.queryCommandSupported('mceTableApplyCellStyle')) {\n            editor.ui.registry.addNestedMenuItem('tablecellvalign', {\n                icon: 'vertical-align',\n                text: 'Vertical align',\n                getSubmenuItems: () => buildMenuItems(editor, verticalAlignValues, 'tablecellverticalalign', applyTableCellStyle(editor, 'vertical-align')),\n                onSetup: selectionTargets.onSetupCellOrRow\n            });\n            editor.ui.registry.addNestedMenuItem('tablecellborderwidth', {\n                icon: 'border-width',\n                text: 'Border width',\n                getSubmenuItems: () => buildMenuItems(editor, getTableBorderWidths(editor), 'tablecellborderwidth', applyTableCellStyle(editor, 'border-width')),\n                onSetup: selectionTargets.onSetupCellOrRow\n            });\n            editor.ui.registry.addNestedMenuItem('tablecellborderstyle', {\n                icon: 'border-style',\n                text: 'Border style',\n                getSubmenuItems: () => buildMenuItems(editor, getTableBorderStyles(editor), 'tablecellborderstyle', applyTableCellStyle(editor, 'border-style')),\n                onSetup: selectionTargets.onSetupCellOrRow\n            });\n            editor.ui.registry.addNestedMenuItem('tablecellbackgroundcolor', {\n                icon: 'cell-background-color',\n                text: 'Background color',\n                getSubmenuItems: () => buildColorMenu(editor, getTableBackgroundColorMap(editor), 'background-color'),\n                onSetup: selectionTargets.onSetupCellOrRow\n            });\n            editor.ui.registry.addNestedMenuItem('tablecellbordercolor', {\n                icon: 'cell-border-color',\n                text: 'Border color',\n                getSubmenuItems: () => buildColorMenu(editor, getTableBorderColorMap(editor), 'border-color'),\n                onSetup: selectionTargets.onSetupCellOrRow\n            });\n        }\n        addToggleMenuIfRegistered('tablecaption', {\n            icon: 'table-caption',\n            text: 'Table caption',\n            command: 'mceTableToggleCaption',\n            onSetup: selectionTargets.onSetupTableWithCaption\n        });\n        addToggleMenuIfRegistered('tablerowheader', {\n            text: 'Row header',\n            icon: 'table-top-header',\n            command: 'mceTableRowType',\n            onAction: changeRowHeader(editor),\n            onSetup: selectionTargets.onSetupTableRowHeaders\n        });\n        addToggleMenuIfRegistered('tablecolheader', {\n            text: 'Column header',\n            icon: 'table-left-header',\n            command: 'mceTableColType',\n            onAction: changeColumnHeader(editor),\n            onSetup: selectionTargets.onSetupTableRowHeaders\n        });\n    };\n\n    const PLUGIN_CODE = 'table';\n    var Plugin = () => {\n        global$3.add(PLUGIN_CODE, (editor) => {\n            const selectionTargets = getSelectionTargets(editor);\n            register(editor);\n            registerCommands(editor);\n            addMenuItems(editor, selectionTargets);\n            addButtons(editor, selectionTargets);\n            addToolbars(editor);\n            return {\n                getMetadata: () => ({ name: 'Table', type: 'opensource', slug: PLUGIN_CODE })\n            };\n        });\n    };\n\n    Plugin();\n    /** *****\n     * DO NOT EXPORT ANYTHING\n     *\n     * IF YOU DO ROLLUP WILL LEAVE A GLOBAL ON THE PAGE\n     *******/\n\n})();\n", "/**\n * TinyMCE version 8.10.0 (2026-10-14)\n */\n\n(function () {\n    'use strict';\n\n    var global = tinymce.util.Tools.resolve('tinymce.PluginManager');\n\n    const setContent = (editor, html) => {\n        // We get a lovely \"Wrong document\" error in IE 11 if we\n        // don't move the focus to the editor before creating an undo\n        // transaction since it tries to make a bookmark for the current selection\n        editor.focus();\n        editor.undoManager.transact(() => {\n            editor.setContent(html);\n        });\n        editor.selection.setCursorLocation();\n        editor.nodeChanged();\n    };\n    const getContent = (editor) => {\n        return editor.getContent({ source_view: true });\n    };\n\n    const open = (editor) => {\n        const editorContent = getContent(editor);\n        editor.windowManager.open({\n            title: 'Source Code',\n            size: 'large',\n            body: {\n                type: 'panel',\n                items: [\n                    {\n                        type: 'textarea',\n                        name: 'code',\n                        spellcheck: false,\n                    }\n                ]\n            },\n            buttons: [\n                {\n                    type: 'cancel',\n                    name: 'cancel',\n                    text: 'Cancel'\n                },\n                {\n                    type: 'submit',\n                    name: 'save',\n                    text: 'Save',\n                    primary: true\n                }\n            ],\n            initialData: {\n                code: editorContent\n            },\n            onSubmit: (api) => {\n                setContent(editor, api.getData().code);\n                api.close();\n            }\n        });\n    };\n\n    const register$1 = (editor) => {\n        editor.addCommand('mceCodeEditor', () => {\n            open(editor);\n        });\n    };\n\n    const register = (editor) => {\n        const onAction = () => editor.execCommand('mceCodeEditor');\n        editor.ui.registry.addButton('code', {\n            icon: 'sourcecode',\n            tooltip: 'Source code',\n            onAction\n        });\n        editor.ui.registry.addMenuItem('code', {\n            icon: 'sourcecode',\n            text: 'Source code',\n            onAction\n        });\n    };\n\n    const PLUGIN_CODE = 'code';\n    var Plugin = () => {\n        global.add(PLUGIN_CODE, (editor) => {\n            register$1(editor);\n            register(editor);\n            return {\n                getMetadata: () => ({ name: 'Code', type: 'opensource', slug: PLUGIN_CODE })\n            };\n        });\n    };\n\n    Plugin();\n    /** *****\n     * DO NOT EXPORT ANYTHING\n     *\n     * IF YOU DO ROLLUP WILL LEAVE A GLOBAL ON THE PAGE\n     *******/\n\n})();\n", "/**\n * TinyMCE version 8.10.0 (2026-10-14)\n */\n\n(function () {\n    'use strict';\n\n    /* eslint-disable @typescript-eslint/no-wrapper-object-types */\n    const hasProto = (v, constructor, predicate) => {\n        if (predicate(v, constructor.prototype)) {\n            return true;\n        }\n        else {\n            // String-based fallback time\n            return v.constructor?.name === constructor.name;\n        }\n    };\n    const typeOf = (x) => {\n        const t = typeof x;\n        if (x === null) {\n            return 'null';\n        }\n        else if (t === 'object' && Array.isArray(x)) {\n            return 'array';\n        }\n        else if (t === 'object' && hasProto(x, String, (o, proto) => proto.isPrototypeOf(o))) {\n            return 'string';\n        }\n        else {\n            return t;\n        }\n    };\n    const isType = (type) => (value) => typeOf(value) === type;\n    const isSimpleType = (type) => (value) => typeof value === type;\n    const isString = isType('string');\n    const isObject = isType('object');\n    const isNullable = (a) => a === null || a === undefined;\n    const isNonNullable = (a) => !isNullable(a);\n    const isFunction = isSimpleType('function');\n\n    /**\n     * The `Optional` type represents a value (of any type) that potentially does\n     * not exist. Any `Optional<T>` can either be a `Some<T>` (in which case the\n     * value does exist) or a `None` (in which case the value does not exist). This\n     * module defines a whole lot of FP-inspired utility functions for dealing with\n     * `Optional` objects.\n     *\n     * Comparison with null or undefined:\n     * - We don't get fancy null coalescing operators with `Optional`\n     * - We do get fancy helper functions with `Optional`\n     * - `Optional` support nesting, and allow for the type to still be nullable (or\n     * another `Optional`)\n     * - There is no option to turn off strict-optional-checks like there is for\n     * strict-null-checks\n     */\n    class Optional {\n        tag;\n        value;\n        // Sneaky optimisation: every instance of Optional.none is identical, so just\n        // reuse the same object\n        static singletonNone = new Optional(false);\n        // The internal representation has a `tag` and a `value`, but both are\n        // private: able to be console.logged, but not able to be accessed by code\n        constructor(tag, value) {\n            this.tag = tag;\n            this.value = value;\n        }\n        // --- Identities ---\n        /**\n         * Creates a new `Optional<T>` that **does** contain a value.\n         */\n        static some(value) {\n            return new Optional(true, value);\n        }\n        /**\n         * Create a new `Optional<T>` that **does not** contain a value. `T` can be\n         * any type because we don't actually have a `T`.\n         */\n        static none() {\n            return Optional.singletonNone;\n        }\n        /**\n         * Perform a transform on an `Optional` type. Regardless of whether this\n         * `Optional` contains a value or not, `fold` will return a value of type `U`.\n         * If this `Optional` does not contain a value, the `U` will be created by\n         * calling `onNone`. If this `Optional` does contain a value, the `U` will be\n         * created by calling `onSome`.\n         *\n         * For the FP enthusiasts in the room, this function:\n         * 1. Could be used to implement all of the functions below\n         * 2. Forms a catamorphism\n         */\n        fold(onNone, onSome) {\n            if (this.tag) {\n                return onSome(this.value);\n            }\n            else {\n                return onNone();\n            }\n        }\n        /**\n         * Determine if this `Optional` object contains a value.\n         */\n        isSome() {\n            return this.tag;\n        }\n        /**\n         * Determine if this `Optional` object **does not** contain a value.\n         */\n        isNone() {\n            return !this.tag;\n        }\n        // --- Functor (name stolen from Haskell / maths) ---\n        /**\n         * Perform a transform on an `Optional` object, **if** there is a value. If\n         * you provide a function to turn a T into a U, this is the function you use\n         * to turn an `Optional<T>` into an `Optional<U>`. If this **does** contain\n         * a value then the output will also contain a value (that value being the\n         * output of `mapper(this.value)`), and if this **does not** contain a value\n         * then neither will the output.\n         */\n        map(mapper) {\n            if (this.tag) {\n                return Optional.some(mapper(this.value));\n            }\n            else {\n                return Optional.none();\n            }\n        }\n        // --- Monad (name stolen from Haskell / maths) ---\n        /**\n         * Perform a transform on an `Optional` object, **if** there is a value.\n         * Unlike `map`, here the transform itself also returns an `Optional`.\n         */\n        bind(binder) {\n            if (this.tag) {\n                return binder(this.value);\n            }\n            else {\n                return Optional.none();\n            }\n        }\n        // --- Traversable (name stolen from Haskell / maths) ---\n        /**\n         * For a given predicate, this function finds out if there **exists** a value\n         * inside this `Optional` object that meets the predicate. In practice, this\n         * means that for `Optional`s that do not contain a value it returns false (as\n         * no predicate-meeting value exists).\n         */\n        exists(predicate) {\n            return this.tag && predicate(this.value);\n        }\n        /**\n         * For a given predicate, this function finds out if **all** the values inside\n         * this `Optional` object meet the predicate. In practice, this means that\n         * for `Optional`s that do not contain a value it returns true (as all 0\n         * objects do meet the predicate).\n         */\n        forall(predicate) {\n            return !this.tag || predicate(this.value);\n        }\n        filter(predicate) {\n            if (!this.tag || predicate(this.value)) {\n                return this;\n            }\n            else {\n                return Optional.none();\n            }\n        }\n        // --- Getters ---\n        /**\n         * Get the value out of the inside of the `Optional` object, using a default\n         * `replacement` value if the provided `Optional` object does not contain a\n         * value.\n         */\n        getOr(replacement) {\n            return this.tag ? this.value : replacement;\n        }\n        /**\n         * Get the value out of the inside of the `Optional` object, using a default\n         * `replacement` value if the provided `Optional` object does not contain a\n         * value.  Unlike `getOr`, in this method the `replacement` object is also\n         * `Optional` - meaning that this method will always return an `Optional`.\n         */\n        or(replacement) {\n            return this.tag ? this : replacement;\n        }\n        /**\n         * Get the value out of the inside of the `Optional` object, using a default\n         * `replacement` value if the provided `Optional` object does not contain a\n         * value. Unlike `getOr`, in this method the `replacement` value is\n         * \"thunked\" - that is to say that you don't pass a value to `getOrThunk`, you\n         * pass a function which (if called) will **return** the `value` you want to\n         * use.\n         */\n        getOrThunk(thunk) {\n            return this.tag ? this.value : thunk();\n        }\n        /**\n         * Get the value out of the inside of the `Optional` object, using a default\n         * `replacement` value if the provided Optional object does not contain a\n         * value.\n         *\n         * Unlike `or`, in this method the `replacement` value is \"thunked\" - that is\n         * to say that you don't pass a value to `orThunk`, you pass a function which\n         * (if called) will **return** the `value` you want to use.\n         *\n         * Unlike `getOrThunk`, in this method the `replacement` value is also\n         * `Optional`, meaning that this method will always return an `Optional`.\n         */\n        orThunk(thunk) {\n            return this.tag ? this : thunk();\n        }\n        /**\n         * Get the value out of the inside of the `Optional` object, throwing an\n         * exception if the provided `Optional` object does not contain a value.\n         *\n         * WARNING:\n         * You should only be using this function if you know that the `Optional`\n         * object **is not** empty (otherwise you're throwing exceptions in production\n         * code, which is bad).\n         *\n         * In tests this is more acceptable.\n         *\n         * Prefer other methods to this, such as `.each`.\n         */\n        getOrDie(message) {\n            if (!this.tag) {\n                throw new Error(message ?? 'Called getOrDie on None');\n            }\n            else {\n                return this.value;\n            }\n        }\n        // --- Interop with null and undefined ---\n        /**\n         * Creates an `Optional` value from a nullable (or undefined-able) input.\n         * Null, or undefined, is converted to `None`, and anything else is converted\n         * to `Some`.\n         */\n        static from(value) {\n            return isNonNullable(value) ? Optional.some(value) : Optional.none();\n        }\n        /**\n         * Converts an `Optional` to a nullable type, by getting the value if it\n         * exists, or returning `null` if it does not.\n         */\n        getOrNull() {\n            return this.tag ? this.value : null;\n        }\n        /**\n         * Converts an `Optional` to an undefined-able type, by getting the value if\n         * it exists, or returning `undefined` if it does not.\n         */\n        getOrUndefined() {\n            return this.value;\n        }\n        // --- Utilities ---\n        /**\n         * If the `Optional` contains a value, perform an action on that value.\n         * Unlike the rest of the methods on this type, `.each` has side-effects. If\n         * you want to transform an `Optional<T>` **into** something, then this is not\n         * the method for you. If you want to use an `Optional<T>` to **do**\n         * something, then this is the method for you - provided you're okay with not\n         * doing anything in the case where the `Optional` doesn't have a value inside\n         * it. If you're not sure whether your use-case fits into transforming\n         * **into** something or **doing** something, check whether it has a return\n         * value. If it does, you should be performing a transform.\n         */\n        each(worker) {\n            if (this.tag) {\n                worker(this.value);\n            }\n        }\n        /**\n         * Turn the `Optional` object into an array that contains all of the values\n         * stored inside the `Optional`. In practice, this means the output will have\n         * either 0 or 1 elements.\n         */\n        toArray() {\n            return this.tag ? [this.value] : [];\n        }\n        /**\n         * Turn the `Optional` object into a string for debugging or printing. Not\n         * recommended for production code, but good for debugging. Also note that\n         * these days an `Optional` object can be logged to the console directly, and\n         * its inner value (if it exists) will be visible.\n         */\n        toString() {\n            return this.tag ? `some(${this.value})` : 'none()';\n        }\n    }\n\n    const nativeSlice = Array.prototype.slice;\n    const nativeIndexOf = Array.prototype.indexOf;\n    const rawIndexOf = (ts, t) => nativeIndexOf.call(ts, t);\n    const contains = (xs, x) => rawIndexOf(xs, x) > -1;\n    const map = (xs, f) => {\n        // pre-allocating array size when it's guaranteed to be known\n        // http://jsperf.com/push-allocated-vs-dynamic/22\n        const len = xs.length;\n        const r = new Array(len);\n        for (let i = 0; i < len; i++) {\n            const x = xs[i];\n            r[i] = f(x, i);\n        }\n        return r;\n    };\n    const filter = (xs, pred) => {\n        const r = [];\n        for (let i = 0, len = xs.length; i < len; i++) {\n            const x = xs[i];\n            if (pred(x, i)) {\n                r.push(x);\n            }\n        }\n        return r;\n    };\n    const sort = (xs, comparator) => {\n        const copy = nativeSlice.call(xs, 0);\n        copy.sort(comparator);\n        return copy;\n    };\n    isFunction(Array.from) ? Array.from : (x) => nativeSlice.call(x);\n\n    // There are many variations of Object iteration that are faster than the 'for-in' style:\n    // http://jsperf.com/object-keys-iteration/107\n    //\n    // Use the native keys if it is available (IE9+), otherwise fall back to manually filtering\n    const keys = Object.keys;\n    const hasOwnProperty = Object.hasOwnProperty;\n    const get$1 = (obj, key) => {\n        return has(obj, key) ? Optional.from(obj[key]) : Optional.none();\n    };\n    const has = (obj, key) => hasOwnProperty.call(obj, key);\n\n    const Cell = (initial) => {\n        let value = initial;\n        const get = () => {\n            return value;\n        };\n        const set = (v) => {\n            value = v;\n        };\n        return {\n            get,\n            set\n        };\n    };\n\n    /**\n     * Adds two numbers, and wrap to a range.\n     * If the result overflows to the right, snap to the left.\n     * If the result overflows to the left, snap to the right.\n     */\n    // the division is meant to get a number between 0 and 1 for more information check this discussion: https://stackoverflow.com/questions/58285941/how-to-replace-math-random-with-crypto-getrandomvalues-and-keep-same-result\n    const random = () => window.crypto.getRandomValues(new Uint32Array(1))[0] / 4294967295;\n\n    /**\n     * Generate a unique identifier.\n     *\n     * The unique portion of the identifier only contains an underscore\n     * and digits, so that it may safely be used within HTML attributes.\n     *\n     * The chance of generating a non-unique identifier has been minimized\n     * by combining the current time, a random number and a one-up counter.\n     *\n     * generate :: String -> String\n     */\n    let unique = 0;\n    const generate = (prefix) => {\n        const date = new Date();\n        const time = date.getTime();\n        const random$1 = Math.floor(random() * 1000000000);\n        unique++;\n        return prefix + '_' + random$1 + unique + String(time);\n    };\n\n    const cat = (arr) => {\n        const r = [];\n        const push = (x) => {\n            r.push(x);\n        };\n        for (let i = 0; i < arr.length; i++) {\n            arr[i].each(push);\n        }\n        return r;\n    };\n\n    var global$4 = tinymce.util.Tools.resolve('tinymce.PluginManager');\n\n    const get = (customTabs) => {\n        const addTab = (spec) => {\n            const name = spec.name ?? generate('tab-name');\n            const currentCustomTabs = customTabs.get();\n            currentCustomTabs[name] = spec;\n            customTabs.set(currentCustomTabs);\n        };\n        return {\n            addTab\n        };\n    };\n\n    const register$2 = (editor, dialogOpener) => {\n        editor.addCommand('mceHelp', dialogOpener);\n    };\n\n    const option = (name) => (editor) => editor.options.get(name);\n    const register$1 = (editor) => {\n        const registerOption = editor.options.register;\n        registerOption('help_tabs', {\n            processor: 'array'\n        });\n    };\n    const getHelpTabs = option('help_tabs');\n    const getForcedPlugins = option('forced_plugins');\n\n    const register = (editor, dialogOpener) => {\n        editor.ui.registry.addButton('help', {\n            icon: 'help',\n            tooltip: 'Help',\n            onAction: dialogOpener,\n            context: 'any'\n        });\n        editor.ui.registry.addMenuItem('help', {\n            text: 'Help',\n            icon: 'help',\n            shortcut: 'Alt+0',\n            onAction: dialogOpener,\n            context: 'any'\n        });\n    };\n\n    var global$3 = tinymce.util.Tools.resolve('tinymce.Resource');\n\n    var global$2 = tinymce.util.Tools.resolve('tinymce.util.I18n');\n\n    const pLoadHtmlByLangCode = (baseUrl, langCode) => global$3.load(`tinymce.html-i18n.help-keynav.${langCode}`, `${baseUrl}/js/i18n/keynav/${langCode}.js`);\n    const pLoadI18nHtml = (baseUrl) => \n    // TINY-9928: Load language file for the current language, or English if the file is not available\n    pLoadHtmlByLangCode(baseUrl, global$2.getCode()).catch(() => pLoadHtmlByLangCode(baseUrl, 'en'));\n    const initI18nLoad = (editor, baseUrl) => {\n        editor.on('init', () => {\n            // eslint-disable-next-line @typescript-eslint/no-floating-promises\n            pLoadI18nHtml(baseUrl);\n        });\n    };\n\n    const pTab = async (pluginUrl) => {\n        const body = {\n            type: 'htmlpanel',\n            presets: 'document',\n            html: await pLoadI18nHtml(pluginUrl)\n        };\n        return {\n            name: 'keyboardnav',\n            title: 'Keyboard Navigation',\n            items: [body]\n        };\n    };\n\n    var global$1 = tinymce.util.Tools.resolve('tinymce.Env');\n\n    // Converts shortcut format to Mac/PC variants\n    const convertText = (source) => {\n        const isMac = global$1.os.isMacOS() || global$1.os.isiOS();\n        const mac = {\n            alt: '&#x2325;',\n            ctrl: '&#x2303;',\n            shift: '&#x21E7;',\n            meta: '&#x2318;',\n            access: '&#x2303;&#x2325;'\n        };\n        const other = {\n            meta: 'Ctrl ',\n            access: 'Shift + Alt '\n        };\n        const replace = isMac ? mac : other;\n        const shortcut = source.split('+');\n        const updated = map(shortcut, (segment) => {\n            // search lowercase, but if not found use the original\n            const search = segment.toLowerCase().trim();\n            return has(replace, search) ? replace[search] : segment;\n        });\n        return isMac ? (updated.join('')).replace(/\\s/, '') : updated.join('+');\n    };\n\n    const shortcuts = [\n        { shortcuts: ['Meta + B'], action: 'Bold' },\n        { shortcuts: ['Meta + I'], action: 'Italic' },\n        { shortcuts: ['Meta + U'], action: 'Underline' },\n        { shortcuts: ['Meta + A'], action: 'Select all' },\n        { shortcuts: ['Meta + Y', 'Meta + Shift + Z'], action: 'Redo' },\n        { shortcuts: ['Meta + Z'], action: 'Undo' },\n        { shortcuts: ['Access + 1'], action: 'Heading 1' },\n        { shortcuts: ['Access + 2'], action: 'Heading 2' },\n        { shortcuts: ['Access + 3'], action: 'Heading 3' },\n        { shortcuts: ['Access + 4'], action: 'Heading 4' },\n        { shortcuts: ['Access + 5'], action: 'Heading 5' },\n        { shortcuts: ['Access + 6'], action: 'Heading 6' },\n        { shortcuts: ['Access + 7'], action: 'Paragraph' },\n        { shortcuts: ['Access + 8'], action: 'Div' },\n        { shortcuts: ['Access + 9'], action: 'Address' },\n        { shortcuts: ['Alt + 0'], action: 'Open help dialog' },\n        { shortcuts: ['Alt + F9'], action: 'Focus to menubar' },\n        { shortcuts: ['Alt + F10'], action: 'Focus to toolbar' },\n        { shortcuts: ['Alt + F11'], action: 'Focus to element path' },\n        { shortcuts: ['Alt + F12'], action: 'Focus to notification' },\n        { shortcuts: ['Ctrl + F9'], action: 'Focus to contextual toolbar' },\n        { shortcuts: ['Shift + Enter'], action: 'Open popup menu for split buttons' },\n        { shortcuts: ['Meta + K'], action: 'Insert link (if link plugin activated)' },\n        { shortcuts: ['Meta + S'], action: 'Save (if save plugin activated)' },\n        { shortcuts: ['Meta + F'], action: 'Find (if searchreplace plugin activated)' },\n        { shortcuts: ['Meta + Shift + F'], action: 'Switch to or from fullscreen mode' }\n    ];\n\n    const tab$2 = () => {\n        const shortcutList = map(shortcuts, (shortcut) => {\n            const shortcutText = map(shortcut.shortcuts, convertText).join(' or ');\n            return [shortcut.action, shortcutText];\n        });\n        const tablePanel = {\n            type: 'table',\n            // TODO: Fix table styles #TINY-2909\n            header: ['Action', 'Shortcut'],\n            cells: shortcutList\n        };\n        return {\n            name: 'shortcuts',\n            title: 'Handy Shortcuts',\n            items: [\n                tablePanel\n            ]\n        };\n    };\n\n    const pricingUrl = 'https://www.tiny.cloud/pricing/?utm_campaign=help_dialog_plugin_tab&utm_source=tiny&utm_medium=referral&utm_term=read_more&utm_content=premium_plugin_heading';\n    const withPremiumMarker = (name) => `${name}<sup>*</sup>`;\n    const buildLink = (name, url) => `<a data-alloy-tabstop=\"true\" tabindex=\"-1\" href=\"${url}\" target=\"_blank\" rel=\"noopener\">${name}</a>`;\n    const buildDocsUrl = (slug) => `https://www.tiny.cloud/docs/tinymce/${tinymce.majorVersion}/${slug}/`;\n    const isUsableMetadata = (metadata) => isObject(metadata) && 'name' in metadata && isString(metadata.name);\n    const getUsableMetadata = (getMetadata) => {\n        try {\n            return Optional.from(getMetadata()).filter(isUsableMetadata);\n        }\n        catch {\n            return Optional.none();\n        }\n    };\n    const readPluginMetadata = (editor, key) => get$1(editor.plugins, key)\n        .bind((plugin) => Optional.from(plugin.getMetadata))\n        .filter(isFunction)\n        .bind(getUsableMetadata);\n    const isTypedMetadata = (metadata) => 'slug' in metadata &&\n        isString(metadata.slug) &&\n        (metadata.type === 'premium' || metadata.type === 'opensource');\n    const isUrlMetadata = (metadata) => 'url' in metadata && isString(metadata.url);\n    const toEntry = (metadata) => {\n        const name = metadata.name;\n        if (isTypedMetadata(metadata)) {\n            const displayName = metadata.type === 'premium' ? withPremiumMarker(name) : name;\n            return { name, html: buildLink(displayName, buildDocsUrl(metadata.slug)) };\n        }\n        else if (isUrlMetadata(metadata)) {\n            return { name, html: buildLink(name, metadata.url) };\n        }\n        else {\n            return { name, html: name };\n        }\n    };\n    const buildPluginEntry = (editor, key) => readPluginMetadata(editor, key).fold(() => Optional.some({ name: key, html: key }), (metadata) => metadata.hidden === true ? Optional.none() : Optional.some(toEntry(metadata)));\n    const getVisiblePluginKeys = (editor) => {\n        const keys$1 = keys(editor.plugins);\n        const forced = Optional.from(getForcedPlugins(editor)).getOr([]);\n        return filter(keys$1, (k) => !contains(forced, k));\n    };\n    const renderPremiumFooter = () => {\n        const learnMoreLink = `<a href=\"${pricingUrl}\" rel=\"noopener\" target=\"_blank\" data-alloy-tabstop=\"true\" tabindex=\"-1\">` +\n            global$2.translate('Learn more...') +\n            '</a>';\n        return '<p class=\"tox-help__more-link\">' +\n            global$2.translate(['* indicates a premium plugin. {0}', learnMoreLink]) +\n            '</p>';\n    };\n    const renderPluginList = (editor) => {\n        const keys = getVisiblePluginKeys(editor);\n        const entries = cat(map(keys, (k) => buildPluginEntry(editor, k)));\n        const sorted = sort(entries, (a, b) => a.name.localeCompare(b.name));\n        const pluginLis = map(sorted, (entry) => '<li>' + entry.html + '</li>').join('');\n        const heading = '<h1>' + global$2.translate(['Plugins installed ({0}):', sorted.length]) + '</h1>';\n        return heading + '<ul>' + pluginLis + '</ul>' + renderPremiumFooter();\n    };\n    const tab$1 = (editor) => {\n        const htmlPanel = {\n            type: 'htmlpanel',\n            presets: 'document',\n            html: editor == null ? '' : '<div>' + renderPluginList(editor) + '</div>'\n        };\n        return {\n            name: 'plugins',\n            title: 'Plugins',\n            items: [\n                htmlPanel\n            ]\n        };\n    };\n\n    var global = tinymce.util.Tools.resolve('tinymce.EditorManager');\n\n    const tab = () => {\n        const getVersion = (major, minor) => major.indexOf('@') === 0 ? 'X.X.X' : major + '.' + minor;\n        const version = getVersion(global.majorVersion, global.minorVersion);\n        const changeLogLink = '<a data-alloy-tabstop=\"true\" tabindex=\"-1\" href=\"https://www.tiny.cloud/docs/tinymce/8/changelog/?utm_campaign=help_dialog_version_tab&utm_source=tiny&utm_medium=referral\" rel=\"noopener\" target=\"_blank\">TinyMCE ' + version + '</a>';\n        const htmlPanel = {\n            type: 'htmlpanel',\n            html: '<p>' + global$2.translate(['You are using {0}', changeLogLink]) + '</p>',\n            presets: 'document'\n        };\n        return {\n            name: 'versions',\n            title: 'Version',\n            items: [\n                htmlPanel\n            ]\n        };\n    };\n\n    const parseHelpTabsSetting = (tabsFromSettings, tabs) => {\n        const newTabs = {};\n        const names = map(tabsFromSettings, (t) => {\n            if (isString(t)) {\n                // Code below shouldn't care if a tab name doesn't have a spec.\n                // If we find it does, we'll need to make this smarter.\n                // CustomTabsTest has a case for this.\n                if (has(tabs, t)) {\n                    newTabs[t] = tabs[t];\n                }\n                return t;\n            }\n            else {\n                const name = t.name ?? generate('tab-name');\n                newTabs[name] = t;\n                return name;\n            }\n        });\n        return { tabs: newTabs, names };\n    };\n    const getNamesFromTabs = (tabs) => {\n        const names = keys(tabs);\n        // Move the versions tab to the end if it exists\n        const idx = names.indexOf('versions');\n        if (idx !== -1) {\n            names.splice(idx, 1);\n            names.push('versions');\n        }\n        return { tabs, names };\n    };\n    const pParseCustomTabs = async (editor, customTabs, pluginUrl) => {\n        const shortcuts = tab$2();\n        const nav = await pTab(pluginUrl);\n        const plugins = tab$1(editor);\n        const versions = tab();\n        const tabs = {\n            [shortcuts.name]: shortcuts,\n            [nav.name]: nav,\n            [plugins.name]: plugins,\n            [versions.name]: versions,\n            ...customTabs.get()\n        };\n        return Optional.from(getHelpTabs(editor)).fold(() => getNamesFromTabs(tabs), (tabsFromSettings) => parseHelpTabsSetting(tabsFromSettings, tabs));\n    };\n    const init = (editor, customTabs, pluginUrl) => () => {\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\n        pParseCustomTabs(editor, customTabs, pluginUrl).then(({ tabs, names }) => {\n            const foundTabs = map(names, (name) => get$1(tabs, name));\n            const dialogTabs = cat(foundTabs);\n            const body = {\n                type: 'tabpanel',\n                tabs: dialogTabs\n            };\n            editor.windowManager.open({\n                title: 'Help',\n                size: 'medium',\n                body,\n                buttons: [\n                    {\n                        type: 'cancel',\n                        name: 'close',\n                        text: 'Close',\n                        primary: true\n                    }\n                ],\n                initialData: {}\n            });\n        });\n    };\n\n    const PLUGIN_CODE = 'help';\n    var Plugin = () => {\n        global$4.add(PLUGIN_CODE, (editor, pluginUrl) => {\n            const customTabs = Cell({});\n            const api = get(customTabs);\n            register$1(editor);\n            const dialogOpener = init(editor, customTabs, pluginUrl);\n            register(editor, dialogOpener);\n            register$2(editor, dialogOpener);\n            editor.shortcuts.add('Alt+0', 'Open help dialog', 'mceHelp');\n            initI18nLoad(editor, pluginUrl);\n            return {\n                ...api,\n                getMetadata: () => ({ name: 'Help', type: 'opensource', slug: PLUGIN_CODE })\n            };\n        });\n    };\n\n    Plugin();\n    /** *****\n     * DO NOT EXPORT ANYTHING\n     *\n     * IF YOU DO ROLLUP WILL LEAVE A GLOBAL ON THE PAGE\n     *******/\n\n})();\n", "/*!\n * Cropper.js v1.6.1\n * https://fengyuanchen.github.io/cropperjs\n *\n * Copyright 2015-present Chen Fengyuan\n * Released under the MIT license\n *\n * Date: 2023-09-17T03:44:19.860Z\n */\n\n(function (global, factory) {\n  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n  typeof define === 'function' && define.amd ? define(factory) :\n  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Cropper = factory());\n})(this, (function () { 'use strict';\n\n  function ownKeys(e, r) {\n    var t = Object.keys(e);\n    if (Object.getOwnPropertySymbols) {\n      var o = Object.getOwnPropertySymbols(e);\n      r && (o = o.filter(function (r) {\n        return Object.getOwnPropertyDescriptor(e, r).enumerable;\n      })), t.push.apply(t, o);\n    }\n    return t;\n  }\n  function _objectSpread2(e) {\n    for (var r = 1; r < arguments.length; r++) {\n      var t = null != arguments[r] ? arguments[r] : {};\n      r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {\n        _defineProperty(e, r, t[r]);\n      }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {\n        Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));\n      });\n    }\n    return e;\n  }\n  function _typeof(o) {\n    \"@babel/helpers - typeof\";\n\n    return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n      return typeof o;\n    } : function (o) {\n      return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n    }, _typeof(o);\n  }\n  function _classCallCheck(instance, Constructor) {\n    if (!(instance instanceof Constructor)) {\n      throw new TypeError(\"Cannot call a class as a function\");\n    }\n  }\n  function _defineProperties(target, props) {\n    for (var i = 0; i < props.length; i++) {\n      var descriptor = props[i];\n      descriptor.enumerable = descriptor.enumerable || false;\n      descriptor.configurable = true;\n      if (\"value\" in descriptor) descriptor.writable = true;\n      Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);\n    }\n  }\n  function _createClass(Constructor, protoProps, staticProps) {\n    if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) _defineProperties(Constructor, staticProps);\n    Object.defineProperty(Constructor, \"prototype\", {\n      writable: false\n    });\n    return Constructor;\n  }\n  function _defineProperty(obj, key, value) {\n    key = _toPropertyKey(key);\n    if (key in obj) {\n      Object.defineProperty(obj, key, {\n        value: value,\n        enumerable: true,\n        configurable: true,\n        writable: true\n      });\n    } else {\n      obj[key] = value;\n    }\n    return obj;\n  }\n  function _toConsumableArray(arr) {\n    return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n  }\n  function _arrayWithoutHoles(arr) {\n    if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n  }\n  function _iterableToArray(iter) {\n    if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n  }\n  function _unsupportedIterableToArray(o, minLen) {\n    if (!o) return;\n    if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n    var n = Object.prototype.toString.call(o).slice(8, -1);\n    if (n === \"Object\" && o.constructor) n = o.constructor.name;\n    if (n === \"Map\" || n === \"Set\") return Array.from(o);\n    if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n  }\n  function _arrayLikeToArray(arr, len) {\n    if (len == null || len > arr.length) len = arr.length;\n    for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n    return arr2;\n  }\n  function _nonIterableSpread() {\n    throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n  }\n  function _toPrimitive(input, hint) {\n    if (typeof input !== \"object\" || input === null) return input;\n    var prim = input[Symbol.toPrimitive];\n    if (prim !== undefined) {\n      var res = prim.call(input, hint || \"default\");\n      if (typeof res !== \"object\") return res;\n      throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n    }\n    return (hint === \"string\" ? String : Number)(input);\n  }\n  function _toPropertyKey(arg) {\n    var key = _toPrimitive(arg, \"string\");\n    return typeof key === \"symbol\" ? key : String(key);\n  }\n\n  var IS_BROWSER = typeof window !== 'undefined' && typeof window.document !== 'undefined';\n  var WINDOW = IS_BROWSER ? window : {};\n  var IS_TOUCH_DEVICE = IS_BROWSER && WINDOW.document.documentElement ? 'ontouchstart' in WINDOW.document.documentElement : false;\n  var HAS_POINTER_EVENT = IS_BROWSER ? 'PointerEvent' in WINDOW : false;\n  var NAMESPACE = 'cropper';\n\n  // Actions\n  var ACTION_ALL = 'all';\n  var ACTION_CROP = 'crop';\n  var ACTION_MOVE = 'move';\n  var ACTION_ZOOM = 'zoom';\n  var ACTION_EAST = 'e';\n  var ACTION_WEST = 'w';\n  var ACTION_SOUTH = 's';\n  var ACTION_NORTH = 'n';\n  var ACTION_NORTH_EAST = 'ne';\n  var ACTION_NORTH_WEST = 'nw';\n  var ACTION_SOUTH_EAST = 'se';\n  var ACTION_SOUTH_WEST = 'sw';\n\n  // Classes\n  var CLASS_CROP = \"\".concat(NAMESPACE, \"-crop\");\n  var CLASS_DISABLED = \"\".concat(NAMESPACE, \"-disabled\");\n  var CLASS_HIDDEN = \"\".concat(NAMESPACE, \"-hidden\");\n  var CLASS_HIDE = \"\".concat(NAMESPACE, \"-hide\");\n  var CLASS_INVISIBLE = \"\".concat(NAMESPACE, \"-invisible\");\n  var CLASS_MODAL = \"\".concat(NAMESPACE, \"-modal\");\n  var CLASS_MOVE = \"\".concat(NAMESPACE, \"-move\");\n\n  // Data keys\n  var DATA_ACTION = \"\".concat(NAMESPACE, \"Action\");\n  var DATA_PREVIEW = \"\".concat(NAMESPACE, \"Preview\");\n\n  // Drag modes\n  var DRAG_MODE_CROP = 'crop';\n  var DRAG_MODE_MOVE = 'move';\n  var DRAG_MODE_NONE = 'none';\n\n  // Events\n  var EVENT_CROP = 'crop';\n  var EVENT_CROP_END = 'cropend';\n  var EVENT_CROP_MOVE = 'cropmove';\n  var EVENT_CROP_START = 'cropstart';\n  var EVENT_DBLCLICK = 'dblclick';\n  var EVENT_TOUCH_START = IS_TOUCH_DEVICE ? 'touchstart' : 'mousedown';\n  var EVENT_TOUCH_MOVE = IS_TOUCH_DEVICE ? 'touchmove' : 'mousemove';\n  var EVENT_TOUCH_END = IS_TOUCH_DEVICE ? 'touchend touchcancel' : 'mouseup';\n  var EVENT_POINTER_DOWN = HAS_POINTER_EVENT ? 'pointerdown' : EVENT_TOUCH_START;\n  var EVENT_POINTER_MOVE = HAS_POINTER_EVENT ? 'pointermove' : EVENT_TOUCH_MOVE;\n  var EVENT_POINTER_UP = HAS_POINTER_EVENT ? 'pointerup pointercancel' : EVENT_TOUCH_END;\n  var EVENT_READY = 'ready';\n  var EVENT_RESIZE = 'resize';\n  var EVENT_WHEEL = 'wheel';\n  var EVENT_ZOOM = 'zoom';\n\n  // Mime types\n  var MIME_TYPE_JPEG = 'image/jpeg';\n\n  // RegExps\n  var REGEXP_ACTIONS = /^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/;\n  var REGEXP_DATA_URL = /^data:/;\n  var REGEXP_DATA_URL_JPEG = /^data:image\\/jpeg;base64,/;\n  var REGEXP_TAG_NAME = /^img|canvas$/i;\n\n  // Misc\n  // Inspired by the default width and height of a canvas element.\n  var MIN_CONTAINER_WIDTH = 200;\n  var MIN_CONTAINER_HEIGHT = 100;\n\n  var DEFAULTS = {\n    // Define the view mode of the cropper\n    viewMode: 0,\n    // 0, 1, 2, 3\n\n    // Define the dragging mode of the cropper\n    dragMode: DRAG_MODE_CROP,\n    // 'crop', 'move' or 'none'\n\n    // Define the initial aspect ratio of the crop box\n    initialAspectRatio: NaN,\n    // Define the aspect ratio of the crop box\n    aspectRatio: NaN,\n    // An object with the previous cropping result data\n    data: null,\n    // A selector for adding extra containers to preview\n    preview: '',\n    // Re-render the cropper when resize the window\n    responsive: true,\n    // Restore the cropped area after resize the window\n    restore: true,\n    // Check if the current image is a cross-origin image\n    checkCrossOrigin: true,\n    // Check the current image's Exif Orientation information\n    checkOrientation: true,\n    // Show the black modal\n    modal: true,\n    // Show the dashed lines for guiding\n    guides: true,\n    // Show the center indicator for guiding\n    center: true,\n    // Show the white modal to highlight the crop box\n    highlight: true,\n    // Show the grid background\n    background: true,\n    // Enable to crop the image automatically when initialize\n    autoCrop: true,\n    // Define the percentage of automatic cropping area when initializes\n    autoCropArea: 0.8,\n    // Enable to move the image\n    movable: true,\n    // Enable to rotate the image\n    rotatable: true,\n    // Enable to scale the image\n    scalable: true,\n    // Enable to zoom the image\n    zoomable: true,\n    // Enable to zoom the image by dragging touch\n    zoomOnTouch: true,\n    // Enable to zoom the image by wheeling mouse\n    zoomOnWheel: true,\n    // Define zoom ratio when zoom the image by wheeling mouse\n    wheelZoomRatio: 0.1,\n    // Enable to move the crop box\n    cropBoxMovable: true,\n    // Enable to resize the crop box\n    cropBoxResizable: true,\n    // Toggle drag mode between \"crop\" and \"move\" when click twice on the cropper\n    toggleDragModeOnDblclick: true,\n    // Size limitation\n    minCanvasWidth: 0,\n    minCanvasHeight: 0,\n    minCropBoxWidth: 0,\n    minCropBoxHeight: 0,\n    minContainerWidth: MIN_CONTAINER_WIDTH,\n    minContainerHeight: MIN_CONTAINER_HEIGHT,\n    // Shortcuts of events\n    ready: null,\n    cropstart: null,\n    cropmove: null,\n    cropend: null,\n    crop: null,\n    zoom: null\n  };\n\n  var TEMPLATE = '<div class=\"cropper-container\" touch-action=\"none\">' + '<div class=\"cropper-wrap-box\">' + '<div class=\"cropper-canvas\"></div>' + '</div>' + '<div class=\"cropper-drag-box\"></div>' + '<div class=\"cropper-crop-box\">' + '<span class=\"cropper-view-box\"></span>' + '<span class=\"cropper-dashed dashed-h\"></span>' + '<span class=\"cropper-dashed dashed-v\"></span>' + '<span class=\"cropper-center\"></span>' + '<span class=\"cropper-face\"></span>' + '<span class=\"cropper-line line-e\" data-cropper-action=\"e\"></span>' + '<span class=\"cropper-line line-n\" data-cropper-action=\"n\"></span>' + '<span class=\"cropper-line line-w\" data-cropper-action=\"w\"></span>' + '<span class=\"cropper-line line-s\" data-cropper-action=\"s\"></span>' + '<span class=\"cropper-point point-e\" data-cropper-action=\"e\"></span>' + '<span class=\"cropper-point point-n\" data-cropper-action=\"n\"></span>' + '<span class=\"cropper-point point-w\" data-cropper-action=\"w\"></span>' + '<span class=\"cropper-point point-s\" data-cropper-action=\"s\"></span>' + '<span class=\"cropper-point point-ne\" data-cropper-action=\"ne\"></span>' + '<span class=\"cropper-point point-nw\" data-cropper-action=\"nw\"></span>' + '<span class=\"cropper-point point-sw\" data-cropper-action=\"sw\"></span>' + '<span class=\"cropper-point point-se\" data-cropper-action=\"se\"></span>' + '</div>' + '</div>';\n\n  /**\n   * Check if the given value is not a number.\n   */\n  var isNaN = Number.isNaN || WINDOW.isNaN;\n\n  /**\n   * Check if the given value is a number.\n   * @param {*} value - The value to check.\n   * @returns {boolean} Returns `true` if the given value is a number, else `false`.\n   */\n  function isNumber(value) {\n    return typeof value === 'number' && !isNaN(value);\n  }\n\n  /**\n   * Check if the given value is a positive number.\n   * @param {*} value - The value to check.\n   * @returns {boolean} Returns `true` if the given value is a positive number, else `false`.\n   */\n  var isPositiveNumber = function isPositiveNumber(value) {\n    return value > 0 && value < Infinity;\n  };\n\n  /**\n   * Check if the given value is undefined.\n   * @param {*} value - The value to check.\n   * @returns {boolean} Returns `true` if the given value is undefined, else `false`.\n   */\n  function isUndefined(value) {\n    return typeof value === 'undefined';\n  }\n\n  /**\n   * Check if the given value is an object.\n   * @param {*} value - The value to check.\n   * @returns {boolean} Returns `true` if the given value is an object, else `false`.\n   */\n  function isObject(value) {\n    return _typeof(value) === 'object' && value !== null;\n  }\n  var hasOwnProperty = Object.prototype.hasOwnProperty;\n\n  /**\n   * Check if the given value is a plain object.\n   * @param {*} value - The value to check.\n   * @returns {boolean} Returns `true` if the given value is a plain object, else `false`.\n   */\n  function isPlainObject(value) {\n    if (!isObject(value)) {\n      return false;\n    }\n    try {\n      var _constructor = value.constructor;\n      var prototype = _constructor.prototype;\n      return _constructor && prototype && hasOwnProperty.call(prototype, 'isPrototypeOf');\n    } catch (error) {\n      return false;\n    }\n  }\n\n  /**\n   * Check if the given value is a function.\n   * @param {*} value - The value to check.\n   * @returns {boolean} Returns `true` if the given value is a function, else `false`.\n   */\n  function isFunction(value) {\n    return typeof value === 'function';\n  }\n  var slice = Array.prototype.slice;\n\n  /**\n   * Convert array-like or iterable object to an array.\n   * @param {*} value - The value to convert.\n   * @returns {Array} Returns a new array.\n   */\n  function toArray(value) {\n    return Array.from ? Array.from(value) : slice.call(value);\n  }\n\n  /**\n   * Iterate the given data.\n   * @param {*} data - The data to iterate.\n   * @param {Function} callback - The process function for each element.\n   * @returns {*} The original data.\n   */\n  function forEach(data, callback) {\n    if (data && isFunction(callback)) {\n      if (Array.isArray(data) || isNumber(data.length) /* array-like */) {\n        toArray(data).forEach(function (value, key) {\n          callback.call(data, value, key, data);\n        });\n      } else if (isObject(data)) {\n        Object.keys(data).forEach(function (key) {\n          callback.call(data, data[key], key, data);\n        });\n      }\n    }\n    return data;\n  }\n\n  /**\n   * Extend the given object.\n   * @param {*} target - The target object to extend.\n   * @param {*} args - The rest objects for merging to the target object.\n   * @returns {Object} The extended object.\n   */\n  var assign = Object.assign || function assign(target) {\n    for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n      args[_key - 1] = arguments[_key];\n    }\n    if (isObject(target) && args.length > 0) {\n      args.forEach(function (arg) {\n        if (isObject(arg)) {\n          Object.keys(arg).forEach(function (key) {\n            target[key] = arg[key];\n          });\n        }\n      });\n    }\n    return target;\n  };\n  var REGEXP_DECIMALS = /\\.\\d*(?:0|9){12}\\d*$/;\n\n  /**\n   * Normalize decimal number.\n   * Check out {@link https://0.30000000000000004.com/}\n   * @param {number} value - The value to normalize.\n   * @param {number} [times=100000000000] - The times for normalizing.\n   * @returns {number} Returns the normalized number.\n   */\n  function normalizeDecimalNumber(value) {\n    var times = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100000000000;\n    return REGEXP_DECIMALS.test(value) ? Math.round(value * times) / times : value;\n  }\n  var REGEXP_SUFFIX = /^width|height|left|top|marginLeft|marginTop$/;\n\n  /**\n   * Apply styles to the given element.\n   * @param {Element} element - The target element.\n   * @param {Object} styles - The styles for applying.\n   */\n  function setStyle(element, styles) {\n    var style = element.style;\n    forEach(styles, function (value, property) {\n      if (REGEXP_SUFFIX.test(property) && isNumber(value)) {\n        value = \"\".concat(value, \"px\");\n      }\n      style[property] = value;\n    });\n  }\n\n  /**\n   * Check if the given element has a special class.\n   * @param {Element} element - The element to check.\n   * @param {string} value - The class to search.\n   * @returns {boolean} Returns `true` if the special class was found.\n   */\n  function hasClass(element, value) {\n    return element.classList ? element.classList.contains(value) : element.className.indexOf(value) > -1;\n  }\n\n  /**\n   * Add classes to the given element.\n   * @param {Element} element - The target element.\n   * @param {string} value - The classes to be added.\n   */\n  function addClass(element, value) {\n    if (!value) {\n      return;\n    }\n    if (isNumber(element.length)) {\n      forEach(element, function (elem) {\n        addClass(elem, value);\n      });\n      return;\n    }\n    if (element.classList) {\n      element.classList.add(value);\n      return;\n    }\n    var className = element.className.trim();\n    if (!className) {\n      element.className = value;\n    } else if (className.indexOf(value) < 0) {\n      element.className = \"\".concat(className, \" \").concat(value);\n    }\n  }\n\n  /**\n   * Remove classes from the given element.\n   * @param {Element} element - The target element.\n   * @param {string} value - The classes to be removed.\n   */\n  function removeClass(element, value) {\n    if (!value) {\n      return;\n    }\n    if (isNumber(element.length)) {\n      forEach(element, function (elem) {\n        removeClass(elem, value);\n      });\n      return;\n    }\n    if (element.classList) {\n      element.classList.remove(value);\n      return;\n    }\n    if (element.className.indexOf(value) >= 0) {\n      element.className = element.className.replace(value, '');\n    }\n  }\n\n  /**\n   * Add or remove classes from the given element.\n   * @param {Element} element - The target element.\n   * @param {string} value - The classes to be toggled.\n   * @param {boolean} added - Add only.\n   */\n  function toggleClass(element, value, added) {\n    if (!value) {\n      return;\n    }\n    if (isNumber(element.length)) {\n      forEach(element, function (elem) {\n        toggleClass(elem, value, added);\n      });\n      return;\n    }\n\n    // IE10-11 doesn't support the second parameter of `classList.toggle`\n    if (added) {\n      addClass(element, value);\n    } else {\n      removeClass(element, value);\n    }\n  }\n  var REGEXP_CAMEL_CASE = /([a-z\\d])([A-Z])/g;\n\n  /**\n   * Transform the given string from camelCase to kebab-case\n   * @param {string} value - The value to transform.\n   * @returns {string} The transformed value.\n   */\n  function toParamCase(value) {\n    return value.replace(REGEXP_CAMEL_CASE, '$1-$2').toLowerCase();\n  }\n\n  /**\n   * Get data from the given element.\n   * @param {Element} element - The target element.\n   * @param {string} name - The data key to get.\n   * @returns {string} The data value.\n   */\n  function getData(element, name) {\n    if (isObject(element[name])) {\n      return element[name];\n    }\n    if (element.dataset) {\n      return element.dataset[name];\n    }\n    return element.getAttribute(\"data-\".concat(toParamCase(name)));\n  }\n\n  /**\n   * Set data to the given element.\n   * @param {Element} element - The target element.\n   * @param {string} name - The data key to set.\n   * @param {string} data - The data value.\n   */\n  function setData(element, name, data) {\n    if (isObject(data)) {\n      element[name] = data;\n    } else if (element.dataset) {\n      element.dataset[name] = data;\n    } else {\n      element.setAttribute(\"data-\".concat(toParamCase(name)), data);\n    }\n  }\n\n  /**\n   * Remove data from the given element.\n   * @param {Element} element - The target element.\n   * @param {string} name - The data key to remove.\n   */\n  function removeData(element, name) {\n    if (isObject(element[name])) {\n      try {\n        delete element[name];\n      } catch (error) {\n        element[name] = undefined;\n      }\n    } else if (element.dataset) {\n      // #128 Safari not allows to delete dataset property\n      try {\n        delete element.dataset[name];\n      } catch (error) {\n        element.dataset[name] = undefined;\n      }\n    } else {\n      element.removeAttribute(\"data-\".concat(toParamCase(name)));\n    }\n  }\n  var REGEXP_SPACES = /\\s\\s*/;\n  var onceSupported = function () {\n    var supported = false;\n    if (IS_BROWSER) {\n      var once = false;\n      var listener = function listener() {};\n      var options = Object.defineProperty({}, 'once', {\n        get: function get() {\n          supported = true;\n          return once;\n        },\n        /**\n         * This setter can fix a `TypeError` in strict mode\n         * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Getter_only}\n         * @param {boolean} value - The value to set\n         */\n        set: function set(value) {\n          once = value;\n        }\n      });\n      WINDOW.addEventListener('test', listener, options);\n      WINDOW.removeEventListener('test', listener, options);\n    }\n    return supported;\n  }();\n\n  /**\n   * Remove event listener from the target element.\n   * @param {Element} element - The event target.\n   * @param {string} type - The event type(s).\n   * @param {Function} listener - The event listener.\n   * @param {Object} options - The event options.\n   */\n  function removeListener(element, type, listener) {\n    var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n    var handler = listener;\n    type.trim().split(REGEXP_SPACES).forEach(function (event) {\n      if (!onceSupported) {\n        var listeners = element.listeners;\n        if (listeners && listeners[event] && listeners[event][listener]) {\n          handler = listeners[event][listener];\n          delete listeners[event][listener];\n          if (Object.keys(listeners[event]).length === 0) {\n            delete listeners[event];\n          }\n          if (Object.keys(listeners).length === 0) {\n            delete element.listeners;\n          }\n        }\n      }\n      element.removeEventListener(event, handler, options);\n    });\n  }\n\n  /**\n   * Add event listener to the target element.\n   * @param {Element} element - The event target.\n   * @param {string} type - The event type(s).\n   * @param {Function} listener - The event listener.\n   * @param {Object} options - The event options.\n   */\n  function addListener(element, type, listener) {\n    var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n    var _handler = listener;\n    type.trim().split(REGEXP_SPACES).forEach(function (event) {\n      if (options.once && !onceSupported) {\n        var _element$listeners = element.listeners,\n          listeners = _element$listeners === void 0 ? {} : _element$listeners;\n        _handler = function handler() {\n          delete listeners[event][listener];\n          element.removeEventListener(event, _handler, options);\n          for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n            args[_key2] = arguments[_key2];\n          }\n          listener.apply(element, args);\n        };\n        if (!listeners[event]) {\n          listeners[event] = {};\n        }\n        if (listeners[event][listener]) {\n          element.removeEventListener(event, listeners[event][listener], options);\n        }\n        listeners[event][listener] = _handler;\n        element.listeners = listeners;\n      }\n      element.addEventListener(event, _handler, options);\n    });\n  }\n\n  /**\n   * Dispatch event on the target element.\n   * @param {Element} element - The event target.\n   * @param {string} type - The event type(s).\n   * @param {Object} data - The additional event data.\n   * @returns {boolean} Indicate if the event is default prevented or not.\n   */\n  function dispatchEvent(element, type, data) {\n    var event;\n\n    // Event and CustomEvent on IE9-11 are global objects, not constructors\n    if (isFunction(Event) && isFunction(CustomEvent)) {\n      event = new CustomEvent(type, {\n        detail: data,\n        bubbles: true,\n        cancelable: true\n      });\n    } else {\n      event = document.createEvent('CustomEvent');\n      event.initCustomEvent(type, true, true, data);\n    }\n    return element.dispatchEvent(event);\n  }\n\n  /**\n   * Get the offset base on the document.\n   * @param {Element} element - The target element.\n   * @returns {Object} The offset data.\n   */\n  function getOffset(element) {\n    var box = element.getBoundingClientRect();\n    return {\n      left: box.left + (window.pageXOffset - document.documentElement.clientLeft),\n      top: box.top + (window.pageYOffset - document.documentElement.clientTop)\n    };\n  }\n  var location = WINDOW.location;\n  var REGEXP_ORIGINS = /^(\\w+:)\\/\\/([^:/?#]*):?(\\d*)/i;\n\n  /**\n   * Check if the given URL is a cross origin URL.\n   * @param {string} url - The target URL.\n   * @returns {boolean} Returns `true` if the given URL is a cross origin URL, else `false`.\n   */\n  function isCrossOriginURL(url) {\n    var parts = url.match(REGEXP_ORIGINS);\n    return parts !== null && (parts[1] !== location.protocol || parts[2] !== location.hostname || parts[3] !== location.port);\n  }\n\n  /**\n   * Add timestamp to the given URL.\n   * @param {string} url - The target URL.\n   * @returns {string} The result URL.\n   */\n  function addTimestamp(url) {\n    var timestamp = \"timestamp=\".concat(new Date().getTime());\n    return url + (url.indexOf('?') === -1 ? '?' : '&') + timestamp;\n  }\n\n  /**\n   * Get transforms base on the given object.\n   * @param {Object} obj - The target object.\n   * @returns {string} A string contains transform values.\n   */\n  function getTransforms(_ref) {\n    var rotate = _ref.rotate,\n      scaleX = _ref.scaleX,\n      scaleY = _ref.scaleY,\n      translateX = _ref.translateX,\n      translateY = _ref.translateY;\n    var values = [];\n    if (isNumber(translateX) && translateX !== 0) {\n      values.push(\"translateX(\".concat(translateX, \"px)\"));\n    }\n    if (isNumber(translateY) && translateY !== 0) {\n      values.push(\"translateY(\".concat(translateY, \"px)\"));\n    }\n\n    // Rotate should come first before scale to match orientation transform\n    if (isNumber(rotate) && rotate !== 0) {\n      values.push(\"rotate(\".concat(rotate, \"deg)\"));\n    }\n    if (isNumber(scaleX) && scaleX !== 1) {\n      values.push(\"scaleX(\".concat(scaleX, \")\"));\n    }\n    if (isNumber(scaleY) && scaleY !== 1) {\n      values.push(\"scaleY(\".concat(scaleY, \")\"));\n    }\n    var transform = values.length ? values.join(' ') : 'none';\n    return {\n      WebkitTransform: transform,\n      msTransform: transform,\n      transform: transform\n    };\n  }\n\n  /**\n   * Get the max ratio of a group of pointers.\n   * @param {string} pointers - The target pointers.\n   * @returns {number} The result ratio.\n   */\n  function getMaxZoomRatio(pointers) {\n    var pointers2 = _objectSpread2({}, pointers);\n    var maxRatio = 0;\n    forEach(pointers, function (pointer, pointerId) {\n      delete pointers2[pointerId];\n      forEach(pointers2, function (pointer2) {\n        var x1 = Math.abs(pointer.startX - pointer2.startX);\n        var y1 = Math.abs(pointer.startY - pointer2.startY);\n        var x2 = Math.abs(pointer.endX - pointer2.endX);\n        var y2 = Math.abs(pointer.endY - pointer2.endY);\n        var z1 = Math.sqrt(x1 * x1 + y1 * y1);\n        var z2 = Math.sqrt(x2 * x2 + y2 * y2);\n        var ratio = (z2 - z1) / z1;\n        if (Math.abs(ratio) > Math.abs(maxRatio)) {\n          maxRatio = ratio;\n        }\n      });\n    });\n    return maxRatio;\n  }\n\n  /**\n   * Get a pointer from an event object.\n   * @param {Object} event - The target event object.\n   * @param {boolean} endOnly - Indicates if only returns the end point coordinate or not.\n   * @returns {Object} The result pointer contains start and/or end point coordinates.\n   */\n  function getPointer(_ref2, endOnly) {\n    var pageX = _ref2.pageX,\n      pageY = _ref2.pageY;\n    var end = {\n      endX: pageX,\n      endY: pageY\n    };\n    return endOnly ? end : _objectSpread2({\n      startX: pageX,\n      startY: pageY\n    }, end);\n  }\n\n  /**\n   * Get the center point coordinate of a group of pointers.\n   * @param {Object} pointers - The target pointers.\n   * @returns {Object} The center point coordinate.\n   */\n  function getPointersCenter(pointers) {\n    var pageX = 0;\n    var pageY = 0;\n    var count = 0;\n    forEach(pointers, function (_ref3) {\n      var startX = _ref3.startX,\n        startY = _ref3.startY;\n      pageX += startX;\n      pageY += startY;\n      count += 1;\n    });\n    pageX /= count;\n    pageY /= count;\n    return {\n      pageX: pageX,\n      pageY: pageY\n    };\n  }\n\n  /**\n   * Get the max sizes in a rectangle under the given aspect ratio.\n   * @param {Object} data - The original sizes.\n   * @param {string} [type='contain'] - The adjust type.\n   * @returns {Object} The result sizes.\n   */\n  function getAdjustedSizes(_ref4) {\n    var aspectRatio = _ref4.aspectRatio,\n      height = _ref4.height,\n      width = _ref4.width;\n    var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'contain';\n    var isValidWidth = isPositiveNumber(width);\n    var isValidHeight = isPositiveNumber(height);\n    if (isValidWidth && isValidHeight) {\n      var adjustedWidth = height * aspectRatio;\n      if (type === 'contain' && adjustedWidth > width || type === 'cover' && adjustedWidth < width) {\n        height = width / aspectRatio;\n      } else {\n        width = height * aspectRatio;\n      }\n    } else if (isValidWidth) {\n      height = width / aspectRatio;\n    } else if (isValidHeight) {\n      width = height * aspectRatio;\n    }\n    return {\n      width: width,\n      height: height\n    };\n  }\n\n  /**\n   * Get the new sizes of a rectangle after rotated.\n   * @param {Object} data - The original sizes.\n   * @returns {Object} The result sizes.\n   */\n  function getRotatedSizes(_ref5) {\n    var width = _ref5.width,\n      height = _ref5.height,\n      degree = _ref5.degree;\n    degree = Math.abs(degree) % 180;\n    if (degree === 90) {\n      return {\n        width: height,\n        height: width\n      };\n    }\n    var arc = degree % 90 * Math.PI / 180;\n    var sinArc = Math.sin(arc);\n    var cosArc = Math.cos(arc);\n    var newWidth = width * cosArc + height * sinArc;\n    var newHeight = width * sinArc + height * cosArc;\n    return degree > 90 ? {\n      width: newHeight,\n      height: newWidth\n    } : {\n      width: newWidth,\n      height: newHeight\n    };\n  }\n\n  /**\n   * Get a canvas which drew the given image.\n   * @param {HTMLImageElement} image - The image for drawing.\n   * @param {Object} imageData - The image data.\n   * @param {Object} canvasData - The canvas data.\n   * @param {Object} options - The options.\n   * @returns {HTMLCanvasElement} The result canvas.\n   */\n  function getSourceCanvas(image, _ref6, _ref7, _ref8) {\n    var imageAspectRatio = _ref6.aspectRatio,\n      imageNaturalWidth = _ref6.naturalWidth,\n      imageNaturalHeight = _ref6.naturalHeight,\n      _ref6$rotate = _ref6.rotate,\n      rotate = _ref6$rotate === void 0 ? 0 : _ref6$rotate,\n      _ref6$scaleX = _ref6.scaleX,\n      scaleX = _ref6$scaleX === void 0 ? 1 : _ref6$scaleX,\n      _ref6$scaleY = _ref6.scaleY,\n      scaleY = _ref6$scaleY === void 0 ? 1 : _ref6$scaleY;\n    var aspectRatio = _ref7.aspectRatio,\n      naturalWidth = _ref7.naturalWidth,\n      naturalHeight = _ref7.naturalHeight;\n    var _ref8$fillColor = _ref8.fillColor,\n      fillColor = _ref8$fillColor === void 0 ? 'transparent' : _ref8$fillColor,\n      _ref8$imageSmoothingE = _ref8.imageSmoothingEnabled,\n      imageSmoothingEnabled = _ref8$imageSmoothingE === void 0 ? true : _ref8$imageSmoothingE,\n      _ref8$imageSmoothingQ = _ref8.imageSmoothingQuality,\n      imageSmoothingQuality = _ref8$imageSmoothingQ === void 0 ? 'low' : _ref8$imageSmoothingQ,\n      _ref8$maxWidth = _ref8.maxWidth,\n      maxWidth = _ref8$maxWidth === void 0 ? Infinity : _ref8$maxWidth,\n      _ref8$maxHeight = _ref8.maxHeight,\n      maxHeight = _ref8$maxHeight === void 0 ? Infinity : _ref8$maxHeight,\n      _ref8$minWidth = _ref8.minWidth,\n      minWidth = _ref8$minWidth === void 0 ? 0 : _ref8$minWidth,\n      _ref8$minHeight = _ref8.minHeight,\n      minHeight = _ref8$minHeight === void 0 ? 0 : _ref8$minHeight;\n    var canvas = document.createElement('canvas');\n    var context = canvas.getContext('2d');\n    var maxSizes = getAdjustedSizes({\n      aspectRatio: aspectRatio,\n      width: maxWidth,\n      height: maxHeight\n    });\n    var minSizes = getAdjustedSizes({\n      aspectRatio: aspectRatio,\n      width: minWidth,\n      height: minHeight\n    }, 'cover');\n    var width = Math.min(maxSizes.width, Math.max(minSizes.width, naturalWidth));\n    var height = Math.min(maxSizes.height, Math.max(minSizes.height, naturalHeight));\n\n    // Note: should always use image's natural sizes for drawing as\n    // imageData.naturalWidth === canvasData.naturalHeight when rotate % 180 === 90\n    var destMaxSizes = getAdjustedSizes({\n      aspectRatio: imageAspectRatio,\n      width: maxWidth,\n      height: maxHeight\n    });\n    var destMinSizes = getAdjustedSizes({\n      aspectRatio: imageAspectRatio,\n      width: minWidth,\n      height: minHeight\n    }, 'cover');\n    var destWidth = Math.min(destMaxSizes.width, Math.max(destMinSizes.width, imageNaturalWidth));\n    var destHeight = Math.min(destMaxSizes.height, Math.max(destMinSizes.height, imageNaturalHeight));\n    var params = [-destWidth / 2, -destHeight / 2, destWidth, destHeight];\n    canvas.width = normalizeDecimalNumber(width);\n    canvas.height = normalizeDecimalNumber(height);\n    context.fillStyle = fillColor;\n    context.fillRect(0, 0, width, height);\n    context.save();\n    context.translate(width / 2, height / 2);\n    context.rotate(rotate * Math.PI / 180);\n    context.scale(scaleX, scaleY);\n    context.imageSmoothingEnabled = imageSmoothingEnabled;\n    context.imageSmoothingQuality = imageSmoothingQuality;\n    context.drawImage.apply(context, [image].concat(_toConsumableArray(params.map(function (param) {\n      return Math.floor(normalizeDecimalNumber(param));\n    }))));\n    context.restore();\n    return canvas;\n  }\n  var fromCharCode = String.fromCharCode;\n\n  /**\n   * Get string from char code in data view.\n   * @param {DataView} dataView - The data view for read.\n   * @param {number} start - The start index.\n   * @param {number} length - The read length.\n   * @returns {string} The read result.\n   */\n  function getStringFromCharCode(dataView, start, length) {\n    var str = '';\n    length += start;\n    for (var i = start; i < length; i += 1) {\n      str += fromCharCode(dataView.getUint8(i));\n    }\n    return str;\n  }\n  var REGEXP_DATA_URL_HEAD = /^data:.*,/;\n\n  /**\n   * Transform Data URL to array buffer.\n   * @param {string} dataURL - The Data URL to transform.\n   * @returns {ArrayBuffer} The result array buffer.\n   */\n  function dataURLToArrayBuffer(dataURL) {\n    var base64 = dataURL.replace(REGEXP_DATA_URL_HEAD, '');\n    var binary = atob(base64);\n    var arrayBuffer = new ArrayBuffer(binary.length);\n    var uint8 = new Uint8Array(arrayBuffer);\n    forEach(uint8, function (value, i) {\n      uint8[i] = binary.charCodeAt(i);\n    });\n    return arrayBuffer;\n  }\n\n  /**\n   * Transform array buffer to Data URL.\n   * @param {ArrayBuffer} arrayBuffer - The array buffer to transform.\n   * @param {string} mimeType - The mime type of the Data URL.\n   * @returns {string} The result Data URL.\n   */\n  function arrayBufferToDataURL(arrayBuffer, mimeType) {\n    var chunks = [];\n\n    // Chunk Typed Array for better performance (#435)\n    var chunkSize = 8192;\n    var uint8 = new Uint8Array(arrayBuffer);\n    while (uint8.length > 0) {\n      // XXX: Babel's `toConsumableArray` helper will throw error in IE or Safari 9\n      // eslint-disable-next-line prefer-spread\n      chunks.push(fromCharCode.apply(null, toArray(uint8.subarray(0, chunkSize))));\n      uint8 = uint8.subarray(chunkSize);\n    }\n    return \"data:\".concat(mimeType, \";base64,\").concat(btoa(chunks.join('')));\n  }\n\n  /**\n   * Get orientation value from given array buffer.\n   * @param {ArrayBuffer} arrayBuffer - The array buffer to read.\n   * @returns {number} The read orientation value.\n   */\n  function resetAndGetOrientation(arrayBuffer) {\n    var dataView = new DataView(arrayBuffer);\n    var orientation;\n\n    // Ignores range error when the image does not have correct Exif information\n    try {\n      var littleEndian;\n      var app1Start;\n      var ifdStart;\n\n      // Only handle JPEG image (start by 0xFFD8)\n      if (dataView.getUint8(0) === 0xFF && dataView.getUint8(1) === 0xD8) {\n        var length = dataView.byteLength;\n        var offset = 2;\n        while (offset + 1 < length) {\n          if (dataView.getUint8(offset) === 0xFF && dataView.getUint8(offset + 1) === 0xE1) {\n            app1Start = offset;\n            break;\n          }\n          offset += 1;\n        }\n      }\n      if (app1Start) {\n        var exifIDCode = app1Start + 4;\n        var tiffOffset = app1Start + 10;\n        if (getStringFromCharCode(dataView, exifIDCode, 4) === 'Exif') {\n          var endianness = dataView.getUint16(tiffOffset);\n          littleEndian = endianness === 0x4949;\n          if (littleEndian || endianness === 0x4D4D /* bigEndian */) {\n            if (dataView.getUint16(tiffOffset + 2, littleEndian) === 0x002A) {\n              var firstIFDOffset = dataView.getUint32(tiffOffset + 4, littleEndian);\n              if (firstIFDOffset >= 0x00000008) {\n                ifdStart = tiffOffset + firstIFDOffset;\n              }\n            }\n          }\n        }\n      }\n      if (ifdStart) {\n        var _length = dataView.getUint16(ifdStart, littleEndian);\n        var _offset;\n        var i;\n        for (i = 0; i < _length; i += 1) {\n          _offset = ifdStart + i * 12 + 2;\n          if (dataView.getUint16(_offset, littleEndian) === 0x0112 /* Orientation */) {\n            // 8 is the offset of the current tag's value\n            _offset += 8;\n\n            // Get the original orientation value\n            orientation = dataView.getUint16(_offset, littleEndian);\n\n            // Override the orientation with its default value\n            dataView.setUint16(_offset, 1, littleEndian);\n            break;\n          }\n        }\n      }\n    } catch (error) {\n      orientation = 1;\n    }\n    return orientation;\n  }\n\n  /**\n   * Parse Exif Orientation value.\n   * @param {number} orientation - The orientation to parse.\n   * @returns {Object} The parsed result.\n   */\n  function parseOrientation(orientation) {\n    var rotate = 0;\n    var scaleX = 1;\n    var scaleY = 1;\n    switch (orientation) {\n      // Flip horizontal\n      case 2:\n        scaleX = -1;\n        break;\n\n      // Rotate left 180\u00B0\n      case 3:\n        rotate = -180;\n        break;\n\n      // Flip vertical\n      case 4:\n        scaleY = -1;\n        break;\n\n      // Flip vertical and rotate right 90\u00B0\n      case 5:\n        rotate = 90;\n        scaleY = -1;\n        break;\n\n      // Rotate right 90\u00B0\n      case 6:\n        rotate = 90;\n        break;\n\n      // Flip horizontal and rotate right 90\u00B0\n      case 7:\n        rotate = 90;\n        scaleX = -1;\n        break;\n\n      // Rotate left 90\u00B0\n      case 8:\n        rotate = -90;\n        break;\n    }\n    return {\n      rotate: rotate,\n      scaleX: scaleX,\n      scaleY: scaleY\n    };\n  }\n\n  var render = {\n    render: function render() {\n      this.initContainer();\n      this.initCanvas();\n      this.initCropBox();\n      this.renderCanvas();\n      if (this.cropped) {\n        this.renderCropBox();\n      }\n    },\n    initContainer: function initContainer() {\n      var element = this.element,\n        options = this.options,\n        container = this.container,\n        cropper = this.cropper;\n      var minWidth = Number(options.minContainerWidth);\n      var minHeight = Number(options.minContainerHeight);\n      addClass(cropper, CLASS_HIDDEN);\n      removeClass(element, CLASS_HIDDEN);\n      var containerData = {\n        width: Math.max(container.offsetWidth, minWidth >= 0 ? minWidth : MIN_CONTAINER_WIDTH),\n        height: Math.max(container.offsetHeight, minHeight >= 0 ? minHeight : MIN_CONTAINER_HEIGHT)\n      };\n      this.containerData = containerData;\n      setStyle(cropper, {\n        width: containerData.width,\n        height: containerData.height\n      });\n      addClass(element, CLASS_HIDDEN);\n      removeClass(cropper, CLASS_HIDDEN);\n    },\n    // Canvas (image wrapper)\n    initCanvas: function initCanvas() {\n      var containerData = this.containerData,\n        imageData = this.imageData;\n      var viewMode = this.options.viewMode;\n      var rotated = Math.abs(imageData.rotate) % 180 === 90;\n      var naturalWidth = rotated ? imageData.naturalHeight : imageData.naturalWidth;\n      var naturalHeight = rotated ? imageData.naturalWidth : imageData.naturalHeight;\n      var aspectRatio = naturalWidth / naturalHeight;\n      var canvasWidth = containerData.width;\n      var canvasHeight = containerData.height;\n      if (containerData.height * aspectRatio > containerData.width) {\n        if (viewMode === 3) {\n          canvasWidth = containerData.height * aspectRatio;\n        } else {\n          canvasHeight = containerData.width / aspectRatio;\n        }\n      } else if (viewMode === 3) {\n        canvasHeight = containerData.width / aspectRatio;\n      } else {\n        canvasWidth = containerData.height * aspectRatio;\n      }\n      var canvasData = {\n        aspectRatio: aspectRatio,\n        naturalWidth: naturalWidth,\n        naturalHeight: naturalHeight,\n        width: canvasWidth,\n        height: canvasHeight\n      };\n      this.canvasData = canvasData;\n      this.limited = viewMode === 1 || viewMode === 2;\n      this.limitCanvas(true, true);\n      canvasData.width = Math.min(Math.max(canvasData.width, canvasData.minWidth), canvasData.maxWidth);\n      canvasData.height = Math.min(Math.max(canvasData.height, canvasData.minHeight), canvasData.maxHeight);\n      canvasData.left = (containerData.width - canvasData.width) / 2;\n      canvasData.top = (containerData.height - canvasData.height) / 2;\n      canvasData.oldLeft = canvasData.left;\n      canvasData.oldTop = canvasData.top;\n      this.initialCanvasData = assign({}, canvasData);\n    },\n    limitCanvas: function limitCanvas(sizeLimited, positionLimited) {\n      var options = this.options,\n        containerData = this.containerData,\n        canvasData = this.canvasData,\n        cropBoxData = this.cropBoxData;\n      var viewMode = options.viewMode;\n      var aspectRatio = canvasData.aspectRatio;\n      var cropped = this.cropped && cropBoxData;\n      if (sizeLimited) {\n        var minCanvasWidth = Number(options.minCanvasWidth) || 0;\n        var minCanvasHeight = Number(options.minCanvasHeight) || 0;\n        if (viewMode > 1) {\n          minCanvasWidth = Math.max(minCanvasWidth, containerData.width);\n          minCanvasHeight = Math.max(minCanvasHeight, containerData.height);\n          if (viewMode === 3) {\n            if (minCanvasHeight * aspectRatio > minCanvasWidth) {\n              minCanvasWidth = minCanvasHeight * aspectRatio;\n            } else {\n              minCanvasHeight = minCanvasWidth / aspectRatio;\n            }\n          }\n        } else if (viewMode > 0) {\n          if (minCanvasWidth) {\n            minCanvasWidth = Math.max(minCanvasWidth, cropped ? cropBoxData.width : 0);\n          } else if (minCanvasHeight) {\n            minCanvasHeight = Math.max(minCanvasHeight, cropped ? cropBoxData.height : 0);\n          } else if (cropped) {\n            minCanvasWidth = cropBoxData.width;\n            minCanvasHeight = cropBoxData.height;\n            if (minCanvasHeight * aspectRatio > minCanvasWidth) {\n              minCanvasWidth = minCanvasHeight * aspectRatio;\n            } else {\n              minCanvasHeight = minCanvasWidth / aspectRatio;\n            }\n          }\n        }\n        var _getAdjustedSizes = getAdjustedSizes({\n          aspectRatio: aspectRatio,\n          width: minCanvasWidth,\n          height: minCanvasHeight\n        });\n        minCanvasWidth = _getAdjustedSizes.width;\n        minCanvasHeight = _getAdjustedSizes.height;\n        canvasData.minWidth = minCanvasWidth;\n        canvasData.minHeight = minCanvasHeight;\n        canvasData.maxWidth = Infinity;\n        canvasData.maxHeight = Infinity;\n      }\n      if (positionLimited) {\n        if (viewMode > (cropped ? 0 : 1)) {\n          var newCanvasLeft = containerData.width - canvasData.width;\n          var newCanvasTop = containerData.height - canvasData.height;\n          canvasData.minLeft = Math.min(0, newCanvasLeft);\n          canvasData.minTop = Math.min(0, newCanvasTop);\n          canvasData.maxLeft = Math.max(0, newCanvasLeft);\n          canvasData.maxTop = Math.max(0, newCanvasTop);\n          if (cropped && this.limited) {\n            canvasData.minLeft = Math.min(cropBoxData.left, cropBoxData.left + (cropBoxData.width - canvasData.width));\n            canvasData.minTop = Math.min(cropBoxData.top, cropBoxData.top + (cropBoxData.height - canvasData.height));\n            canvasData.maxLeft = cropBoxData.left;\n            canvasData.maxTop = cropBoxData.top;\n            if (viewMode === 2) {\n              if (canvasData.width >= containerData.width) {\n                canvasData.minLeft = Math.min(0, newCanvasLeft);\n                canvasData.maxLeft = Math.max(0, newCanvasLeft);\n              }\n              if (canvasData.height >= containerData.height) {\n                canvasData.minTop = Math.min(0, newCanvasTop);\n                canvasData.maxTop = Math.max(0, newCanvasTop);\n              }\n            }\n          }\n        } else {\n          canvasData.minLeft = -canvasData.width;\n          canvasData.minTop = -canvasData.height;\n          canvasData.maxLeft = containerData.width;\n          canvasData.maxTop = containerData.height;\n        }\n      }\n    },\n    renderCanvas: function renderCanvas(changed, transformed) {\n      var canvasData = this.canvasData,\n        imageData = this.imageData;\n      if (transformed) {\n        var _getRotatedSizes = getRotatedSizes({\n            width: imageData.naturalWidth * Math.abs(imageData.scaleX || 1),\n            height: imageData.naturalHeight * Math.abs(imageData.scaleY || 1),\n            degree: imageData.rotate || 0\n          }),\n          naturalWidth = _getRotatedSizes.width,\n          naturalHeight = _getRotatedSizes.height;\n        var width = canvasData.width * (naturalWidth / canvasData.naturalWidth);\n        var height = canvasData.height * (naturalHeight / canvasData.naturalHeight);\n        canvasData.left -= (width - canvasData.width) / 2;\n        canvasData.top -= (height - canvasData.height) / 2;\n        canvasData.width = width;\n        canvasData.height = height;\n        canvasData.aspectRatio = naturalWidth / naturalHeight;\n        canvasData.naturalWidth = naturalWidth;\n        canvasData.naturalHeight = naturalHeight;\n        this.limitCanvas(true, false);\n      }\n      if (canvasData.width > canvasData.maxWidth || canvasData.width < canvasData.minWidth) {\n        canvasData.left = canvasData.oldLeft;\n      }\n      if (canvasData.height > canvasData.maxHeight || canvasData.height < canvasData.minHeight) {\n        canvasData.top = canvasData.oldTop;\n      }\n      canvasData.width = Math.min(Math.max(canvasData.width, canvasData.minWidth), canvasData.maxWidth);\n      canvasData.height = Math.min(Math.max(canvasData.height, canvasData.minHeight), canvasData.maxHeight);\n      this.limitCanvas(false, true);\n      canvasData.left = Math.min(Math.max(canvasData.left, canvasData.minLeft), canvasData.maxLeft);\n      canvasData.top = Math.min(Math.max(canvasData.top, canvasData.minTop), canvasData.maxTop);\n      canvasData.oldLeft = canvasData.left;\n      canvasData.oldTop = canvasData.top;\n      setStyle(this.canvas, assign({\n        width: canvasData.width,\n        height: canvasData.height\n      }, getTransforms({\n        translateX: canvasData.left,\n        translateY: canvasData.top\n      })));\n      this.renderImage(changed);\n      if (this.cropped && this.limited) {\n        this.limitCropBox(true, true);\n      }\n    },\n    renderImage: function renderImage(changed) {\n      var canvasData = this.canvasData,\n        imageData = this.imageData;\n      var width = imageData.naturalWidth * (canvasData.width / canvasData.naturalWidth);\n      var height = imageData.naturalHeight * (canvasData.height / canvasData.naturalHeight);\n      assign(imageData, {\n        width: width,\n        height: height,\n        left: (canvasData.width - width) / 2,\n        top: (canvasData.height - height) / 2\n      });\n      setStyle(this.image, assign({\n        width: imageData.width,\n        height: imageData.height\n      }, getTransforms(assign({\n        translateX: imageData.left,\n        translateY: imageData.top\n      }, imageData))));\n      if (changed) {\n        this.output();\n      }\n    },\n    initCropBox: function initCropBox() {\n      var options = this.options,\n        canvasData = this.canvasData;\n      var aspectRatio = options.aspectRatio || options.initialAspectRatio;\n      var autoCropArea = Number(options.autoCropArea) || 0.8;\n      var cropBoxData = {\n        width: canvasData.width,\n        height: canvasData.height\n      };\n      if (aspectRatio) {\n        if (canvasData.height * aspectRatio > canvasData.width) {\n          cropBoxData.height = cropBoxData.width / aspectRatio;\n        } else {\n          cropBoxData.width = cropBoxData.height * aspectRatio;\n        }\n      }\n      this.cropBoxData = cropBoxData;\n      this.limitCropBox(true, true);\n\n      // Initialize auto crop area\n      cropBoxData.width = Math.min(Math.max(cropBoxData.width, cropBoxData.minWidth), cropBoxData.maxWidth);\n      cropBoxData.height = Math.min(Math.max(cropBoxData.height, cropBoxData.minHeight), cropBoxData.maxHeight);\n\n      // The width/height of auto crop area must large than \"minWidth/Height\"\n      cropBoxData.width = Math.max(cropBoxData.minWidth, cropBoxData.width * autoCropArea);\n      cropBoxData.height = Math.max(cropBoxData.minHeight, cropBoxData.height * autoCropArea);\n      cropBoxData.left = canvasData.left + (canvasData.width - cropBoxData.width) / 2;\n      cropBoxData.top = canvasData.top + (canvasData.height - cropBoxData.height) / 2;\n      cropBoxData.oldLeft = cropBoxData.left;\n      cropBoxData.oldTop = cropBoxData.top;\n      this.initialCropBoxData = assign({}, cropBoxData);\n    },\n    limitCropBox: function limitCropBox(sizeLimited, positionLimited) {\n      var options = this.options,\n        containerData = this.containerData,\n        canvasData = this.canvasData,\n        cropBoxData = this.cropBoxData,\n        limited = this.limited;\n      var aspectRatio = options.aspectRatio;\n      if (sizeLimited) {\n        var minCropBoxWidth = Number(options.minCropBoxWidth) || 0;\n        var minCropBoxHeight = Number(options.minCropBoxHeight) || 0;\n        var maxCropBoxWidth = limited ? Math.min(containerData.width, canvasData.width, canvasData.width + canvasData.left, containerData.width - canvasData.left) : containerData.width;\n        var maxCropBoxHeight = limited ? Math.min(containerData.height, canvasData.height, canvasData.height + canvasData.top, containerData.height - canvasData.top) : containerData.height;\n\n        // The min/maxCropBoxWidth/Height must be less than container's width/height\n        minCropBoxWidth = Math.min(minCropBoxWidth, containerData.width);\n        minCropBoxHeight = Math.min(minCropBoxHeight, containerData.height);\n        if (aspectRatio) {\n          if (minCropBoxWidth && minCropBoxHeight) {\n            if (minCropBoxHeight * aspectRatio > minCropBoxWidth) {\n              minCropBoxHeight = minCropBoxWidth / aspectRatio;\n            } else {\n              minCropBoxWidth = minCropBoxHeight * aspectRatio;\n            }\n          } else if (minCropBoxWidth) {\n            minCropBoxHeight = minCropBoxWidth / aspectRatio;\n          } else if (minCropBoxHeight) {\n            minCropBoxWidth = minCropBoxHeight * aspectRatio;\n          }\n          if (maxCropBoxHeight * aspectRatio > maxCropBoxWidth) {\n            maxCropBoxHeight = maxCropBoxWidth / aspectRatio;\n          } else {\n            maxCropBoxWidth = maxCropBoxHeight * aspectRatio;\n          }\n        }\n\n        // The minWidth/Height must be less than maxWidth/Height\n        cropBoxData.minWidth = Math.min(minCropBoxWidth, maxCropBoxWidth);\n        cropBoxData.minHeight = Math.min(minCropBoxHeight, maxCropBoxHeight);\n        cropBoxData.maxWidth = maxCropBoxWidth;\n        cropBoxData.maxHeight = maxCropBoxHeight;\n      }\n      if (positionLimited) {\n        if (limited) {\n          cropBoxData.minLeft = Math.max(0, canvasData.left);\n          cropBoxData.minTop = Math.max(0, canvasData.top);\n          cropBoxData.maxLeft = Math.min(containerData.width, canvasData.left + canvasData.width) - cropBoxData.width;\n          cropBoxData.maxTop = Math.min(containerData.height, canvasData.top + canvasData.height) - cropBoxData.height;\n        } else {\n          cropBoxData.minLeft = 0;\n          cropBoxData.minTop = 0;\n          cropBoxData.maxLeft = containerData.width - cropBoxData.width;\n          cropBoxData.maxTop = containerData.height - cropBoxData.height;\n        }\n      }\n    },\n    renderCropBox: function renderCropBox() {\n      var options = this.options,\n        containerData = this.containerData,\n        cropBoxData = this.cropBoxData;\n      if (cropBoxData.width > cropBoxData.maxWidth || cropBoxData.width < cropBoxData.minWidth) {\n        cropBoxData.left = cropBoxData.oldLeft;\n      }\n      if (cropBoxData.height > cropBoxData.maxHeight || cropBoxData.height < cropBoxData.minHeight) {\n        cropBoxData.top = cropBoxData.oldTop;\n      }\n      cropBoxData.width = Math.min(Math.max(cropBoxData.width, cropBoxData.minWidth), cropBoxData.maxWidth);\n      cropBoxData.height = Math.min(Math.max(cropBoxData.height, cropBoxData.minHeight), cropBoxData.maxHeight);\n      this.limitCropBox(false, true);\n      cropBoxData.left = Math.min(Math.max(cropBoxData.left, cropBoxData.minLeft), cropBoxData.maxLeft);\n      cropBoxData.top = Math.min(Math.max(cropBoxData.top, cropBoxData.minTop), cropBoxData.maxTop);\n      cropBoxData.oldLeft = cropBoxData.left;\n      cropBoxData.oldTop = cropBoxData.top;\n      if (options.movable && options.cropBoxMovable) {\n        // Turn to move the canvas when the crop box is equal to the container\n        setData(this.face, DATA_ACTION, cropBoxData.width >= containerData.width && cropBoxData.height >= containerData.height ? ACTION_MOVE : ACTION_ALL);\n      }\n      setStyle(this.cropBox, assign({\n        width: cropBoxData.width,\n        height: cropBoxData.height\n      }, getTransforms({\n        translateX: cropBoxData.left,\n        translateY: cropBoxData.top\n      })));\n      if (this.cropped && this.limited) {\n        this.limitCanvas(true, true);\n      }\n      if (!this.disabled) {\n        this.output();\n      }\n    },\n    output: function output() {\n      this.preview();\n      dispatchEvent(this.element, EVENT_CROP, this.getData());\n    }\n  };\n\n  var preview = {\n    initPreview: function initPreview() {\n      var element = this.element,\n        crossOrigin = this.crossOrigin;\n      var preview = this.options.preview;\n      var url = crossOrigin ? this.crossOriginUrl : this.url;\n      var alt = element.alt || 'The image to preview';\n      var image = document.createElement('img');\n      if (crossOrigin) {\n        image.crossOrigin = crossOrigin;\n      }\n      image.src = url;\n      image.alt = alt;\n      this.viewBox.appendChild(image);\n      this.viewBoxImage = image;\n      if (!preview) {\n        return;\n      }\n      var previews = preview;\n      if (typeof preview === 'string') {\n        previews = element.ownerDocument.querySelectorAll(preview);\n      } else if (preview.querySelector) {\n        previews = [preview];\n      }\n      this.previews = previews;\n      forEach(previews, function (el) {\n        var img = document.createElement('img');\n\n        // Save the original size for recover\n        setData(el, DATA_PREVIEW, {\n          width: el.offsetWidth,\n          height: el.offsetHeight,\n          html: el.innerHTML\n        });\n        if (crossOrigin) {\n          img.crossOrigin = crossOrigin;\n        }\n        img.src = url;\n        img.alt = alt;\n\n        /**\n         * Override img element styles\n         * Add `display:block` to avoid margin top issue\n         * Add `height:auto` to override `height` attribute on IE8\n         * (Occur only when margin-top <= -height)\n         */\n        img.style.cssText = 'display:block;' + 'width:100%;' + 'height:auto;' + 'min-width:0!important;' + 'min-height:0!important;' + 'max-width:none!important;' + 'max-height:none!important;' + 'image-orientation:0deg!important;\"';\n        el.innerHTML = '';\n        el.appendChild(img);\n      });\n    },\n    resetPreview: function resetPreview() {\n      forEach(this.previews, function (element) {\n        var data = getData(element, DATA_PREVIEW);\n        setStyle(element, {\n          width: data.width,\n          height: data.height\n        });\n        element.innerHTML = data.html;\n        removeData(element, DATA_PREVIEW);\n      });\n    },\n    preview: function preview() {\n      var imageData = this.imageData,\n        canvasData = this.canvasData,\n        cropBoxData = this.cropBoxData;\n      var cropBoxWidth = cropBoxData.width,\n        cropBoxHeight = cropBoxData.height;\n      var width = imageData.width,\n        height = imageData.height;\n      var left = cropBoxData.left - canvasData.left - imageData.left;\n      var top = cropBoxData.top - canvasData.top - imageData.top;\n      if (!this.cropped || this.disabled) {\n        return;\n      }\n      setStyle(this.viewBoxImage, assign({\n        width: width,\n        height: height\n      }, getTransforms(assign({\n        translateX: -left,\n        translateY: -top\n      }, imageData))));\n      forEach(this.previews, function (element) {\n        var data = getData(element, DATA_PREVIEW);\n        var originalWidth = data.width;\n        var originalHeight = data.height;\n        var newWidth = originalWidth;\n        var newHeight = originalHeight;\n        var ratio = 1;\n        if (cropBoxWidth) {\n          ratio = originalWidth / cropBoxWidth;\n          newHeight = cropBoxHeight * ratio;\n        }\n        if (cropBoxHeight && newHeight > originalHeight) {\n          ratio = originalHeight / cropBoxHeight;\n          newWidth = cropBoxWidth * ratio;\n          newHeight = originalHeight;\n        }\n        setStyle(element, {\n          width: newWidth,\n          height: newHeight\n        });\n        setStyle(element.getElementsByTagName('img')[0], assign({\n          width: width * ratio,\n          height: height * ratio\n        }, getTransforms(assign({\n          translateX: -left * ratio,\n          translateY: -top * ratio\n        }, imageData))));\n      });\n    }\n  };\n\n  var events = {\n    bind: function bind() {\n      var element = this.element,\n        options = this.options,\n        cropper = this.cropper;\n      if (isFunction(options.cropstart)) {\n        addListener(element, EVENT_CROP_START, options.cropstart);\n      }\n      if (isFunction(options.cropmove)) {\n        addListener(element, EVENT_CROP_MOVE, options.cropmove);\n      }\n      if (isFunction(options.cropend)) {\n        addListener(element, EVENT_CROP_END, options.cropend);\n      }\n      if (isFunction(options.crop)) {\n        addListener(element, EVENT_CROP, options.crop);\n      }\n      if (isFunction(options.zoom)) {\n        addListener(element, EVENT_ZOOM, options.zoom);\n      }\n      addListener(cropper, EVENT_POINTER_DOWN, this.onCropStart = this.cropStart.bind(this));\n      if (options.zoomable && options.zoomOnWheel) {\n        addListener(cropper, EVENT_WHEEL, this.onWheel = this.wheel.bind(this), {\n          passive: false,\n          capture: true\n        });\n      }\n      if (options.toggleDragModeOnDblclick) {\n        addListener(cropper, EVENT_DBLCLICK, this.onDblclick = this.dblclick.bind(this));\n      }\n      addListener(element.ownerDocument, EVENT_POINTER_MOVE, this.onCropMove = this.cropMove.bind(this));\n      addListener(element.ownerDocument, EVENT_POINTER_UP, this.onCropEnd = this.cropEnd.bind(this));\n      if (options.responsive) {\n        addListener(window, EVENT_RESIZE, this.onResize = this.resize.bind(this));\n      }\n    },\n    unbind: function unbind() {\n      var element = this.element,\n        options = this.options,\n        cropper = this.cropper;\n      if (isFunction(options.cropstart)) {\n        removeListener(element, EVENT_CROP_START, options.cropstart);\n      }\n      if (isFunction(options.cropmove)) {\n        removeListener(element, EVENT_CROP_MOVE, options.cropmove);\n      }\n      if (isFunction(options.cropend)) {\n        removeListener(element, EVENT_CROP_END, options.cropend);\n      }\n      if (isFunction(options.crop)) {\n        removeListener(element, EVENT_CROP, options.crop);\n      }\n      if (isFunction(options.zoom)) {\n        removeListener(element, EVENT_ZOOM, options.zoom);\n      }\n      removeListener(cropper, EVENT_POINTER_DOWN, this.onCropStart);\n      if (options.zoomable && options.zoomOnWheel) {\n        removeListener(cropper, EVENT_WHEEL, this.onWheel, {\n          passive: false,\n          capture: true\n        });\n      }\n      if (options.toggleDragModeOnDblclick) {\n        removeListener(cropper, EVENT_DBLCLICK, this.onDblclick);\n      }\n      removeListener(element.ownerDocument, EVENT_POINTER_MOVE, this.onCropMove);\n      removeListener(element.ownerDocument, EVENT_POINTER_UP, this.onCropEnd);\n      if (options.responsive) {\n        removeListener(window, EVENT_RESIZE, this.onResize);\n      }\n    }\n  };\n\n  var handlers = {\n    resize: function resize() {\n      if (this.disabled) {\n        return;\n      }\n      var options = this.options,\n        container = this.container,\n        containerData = this.containerData;\n      var ratioX = container.offsetWidth / containerData.width;\n      var ratioY = container.offsetHeight / containerData.height;\n      var ratio = Math.abs(ratioX - 1) > Math.abs(ratioY - 1) ? ratioX : ratioY;\n\n      // Resize when width changed or height changed\n      if (ratio !== 1) {\n        var canvasData;\n        var cropBoxData;\n        if (options.restore) {\n          canvasData = this.getCanvasData();\n          cropBoxData = this.getCropBoxData();\n        }\n        this.render();\n        if (options.restore) {\n          this.setCanvasData(forEach(canvasData, function (n, i) {\n            canvasData[i] = n * ratio;\n          }));\n          this.setCropBoxData(forEach(cropBoxData, function (n, i) {\n            cropBoxData[i] = n * ratio;\n          }));\n        }\n      }\n    },\n    dblclick: function dblclick() {\n      if (this.disabled || this.options.dragMode === DRAG_MODE_NONE) {\n        return;\n      }\n      this.setDragMode(hasClass(this.dragBox, CLASS_CROP) ? DRAG_MODE_MOVE : DRAG_MODE_CROP);\n    },\n    wheel: function wheel(event) {\n      var _this = this;\n      var ratio = Number(this.options.wheelZoomRatio) || 0.1;\n      var delta = 1;\n      if (this.disabled) {\n        return;\n      }\n      event.preventDefault();\n\n      // Limit wheel speed to prevent zoom too fast (#21)\n      if (this.wheeling) {\n        return;\n      }\n      this.wheeling = true;\n      setTimeout(function () {\n        _this.wheeling = false;\n      }, 50);\n      if (event.deltaY) {\n        delta = event.deltaY > 0 ? 1 : -1;\n      } else if (event.wheelDelta) {\n        delta = -event.wheelDelta / 120;\n      } else if (event.detail) {\n        delta = event.detail > 0 ? 1 : -1;\n      }\n      this.zoom(-delta * ratio, event);\n    },\n    cropStart: function cropStart(event) {\n      var buttons = event.buttons,\n        button = event.button;\n      if (this.disabled\n\n      // Handle mouse event and pointer event and ignore touch event\n      || (event.type === 'mousedown' || event.type === 'pointerdown' && event.pointerType === 'mouse') && (\n      // No primary button (Usually the left button)\n      isNumber(buttons) && buttons !== 1 || isNumber(button) && button !== 0\n\n      // Open context menu\n      || event.ctrlKey)) {\n        return;\n      }\n      var options = this.options,\n        pointers = this.pointers;\n      var action;\n      if (event.changedTouches) {\n        // Handle touch event\n        forEach(event.changedTouches, function (touch) {\n          pointers[touch.identifier] = getPointer(touch);\n        });\n      } else {\n        // Handle mouse event and pointer event\n        pointers[event.pointerId || 0] = getPointer(event);\n      }\n      if (Object.keys(pointers).length > 1 && options.zoomable && options.zoomOnTouch) {\n        action = ACTION_ZOOM;\n      } else {\n        action = getData(event.target, DATA_ACTION);\n      }\n      if (!REGEXP_ACTIONS.test(action)) {\n        return;\n      }\n      if (dispatchEvent(this.element, EVENT_CROP_START, {\n        originalEvent: event,\n        action: action\n      }) === false) {\n        return;\n      }\n\n      // This line is required for preventing page zooming in iOS browsers\n      event.preventDefault();\n      this.action = action;\n      this.cropping = false;\n      if (action === ACTION_CROP) {\n        this.cropping = true;\n        addClass(this.dragBox, CLASS_MODAL);\n      }\n    },\n    cropMove: function cropMove(event) {\n      var action = this.action;\n      if (this.disabled || !action) {\n        return;\n      }\n      var pointers = this.pointers;\n      event.preventDefault();\n      if (dispatchEvent(this.element, EVENT_CROP_MOVE, {\n        originalEvent: event,\n        action: action\n      }) === false) {\n        return;\n      }\n      if (event.changedTouches) {\n        forEach(event.changedTouches, function (touch) {\n          // The first parameter should not be undefined (#432)\n          assign(pointers[touch.identifier] || {}, getPointer(touch, true));\n        });\n      } else {\n        assign(pointers[event.pointerId || 0] || {}, getPointer(event, true));\n      }\n      this.change(event);\n    },\n    cropEnd: function cropEnd(event) {\n      if (this.disabled) {\n        return;\n      }\n      var action = this.action,\n        pointers = this.pointers;\n      if (event.changedTouches) {\n        forEach(event.changedTouches, function (touch) {\n          delete pointers[touch.identifier];\n        });\n      } else {\n        delete pointers[event.pointerId || 0];\n      }\n      if (!action) {\n        return;\n      }\n      event.preventDefault();\n      if (!Object.keys(pointers).length) {\n        this.action = '';\n      }\n      if (this.cropping) {\n        this.cropping = false;\n        toggleClass(this.dragBox, CLASS_MODAL, this.cropped && this.options.modal);\n      }\n      dispatchEvent(this.element, EVENT_CROP_END, {\n        originalEvent: event,\n        action: action\n      });\n    }\n  };\n\n  var change = {\n    change: function change(event) {\n      var options = this.options,\n        canvasData = this.canvasData,\n        containerData = this.containerData,\n        cropBoxData = this.cropBoxData,\n        pointers = this.pointers;\n      var action = this.action;\n      var aspectRatio = options.aspectRatio;\n      var left = cropBoxData.left,\n        top = cropBoxData.top,\n        width = cropBoxData.width,\n        height = cropBoxData.height;\n      var right = left + width;\n      var bottom = top + height;\n      var minLeft = 0;\n      var minTop = 0;\n      var maxWidth = containerData.width;\n      var maxHeight = containerData.height;\n      var renderable = true;\n      var offset;\n\n      // Locking aspect ratio in \"free mode\" by holding shift key\n      if (!aspectRatio && event.shiftKey) {\n        aspectRatio = width && height ? width / height : 1;\n      }\n      if (this.limited) {\n        minLeft = cropBoxData.minLeft;\n        minTop = cropBoxData.minTop;\n        maxWidth = minLeft + Math.min(containerData.width, canvasData.width, canvasData.left + canvasData.width);\n        maxHeight = minTop + Math.min(containerData.height, canvasData.height, canvasData.top + canvasData.height);\n      }\n      var pointer = pointers[Object.keys(pointers)[0]];\n      var range = {\n        x: pointer.endX - pointer.startX,\n        y: pointer.endY - pointer.startY\n      };\n      var check = function check(side) {\n        switch (side) {\n          case ACTION_EAST:\n            if (right + range.x > maxWidth) {\n              range.x = maxWidth - right;\n            }\n            break;\n          case ACTION_WEST:\n            if (left + range.x < minLeft) {\n              range.x = minLeft - left;\n            }\n            break;\n          case ACTION_NORTH:\n            if (top + range.y < minTop) {\n              range.y = minTop - top;\n            }\n            break;\n          case ACTION_SOUTH:\n            if (bottom + range.y > maxHeight) {\n              range.y = maxHeight - bottom;\n            }\n            break;\n        }\n      };\n      switch (action) {\n        // Move crop box\n        case ACTION_ALL:\n          left += range.x;\n          top += range.y;\n          break;\n\n        // Resize crop box\n        case ACTION_EAST:\n          if (range.x >= 0 && (right >= maxWidth || aspectRatio && (top <= minTop || bottom >= maxHeight))) {\n            renderable = false;\n            break;\n          }\n          check(ACTION_EAST);\n          width += range.x;\n          if (width < 0) {\n            action = ACTION_WEST;\n            width = -width;\n            left -= width;\n          }\n          if (aspectRatio) {\n            height = width / aspectRatio;\n            top += (cropBoxData.height - height) / 2;\n          }\n          break;\n        case ACTION_NORTH:\n          if (range.y <= 0 && (top <= minTop || aspectRatio && (left <= minLeft || right >= maxWidth))) {\n            renderable = false;\n            break;\n          }\n          check(ACTION_NORTH);\n          height -= range.y;\n          top += range.y;\n          if (height < 0) {\n            action = ACTION_SOUTH;\n            height = -height;\n            top -= height;\n          }\n          if (aspectRatio) {\n            width = height * aspectRatio;\n            left += (cropBoxData.width - width) / 2;\n          }\n          break;\n        case ACTION_WEST:\n          if (range.x <= 0 && (left <= minLeft || aspectRatio && (top <= minTop || bottom >= maxHeight))) {\n            renderable = false;\n            break;\n          }\n          check(ACTION_WEST);\n          width -= range.x;\n          left += range.x;\n          if (width < 0) {\n            action = ACTION_EAST;\n            width = -width;\n            left -= width;\n          }\n          if (aspectRatio) {\n            height = width / aspectRatio;\n            top += (cropBoxData.height - height) / 2;\n          }\n          break;\n        case ACTION_SOUTH:\n          if (range.y >= 0 && (bottom >= maxHeight || aspectRatio && (left <= minLeft || right >= maxWidth))) {\n            renderable = false;\n            break;\n          }\n          check(ACTION_SOUTH);\n          height += range.y;\n          if (height < 0) {\n            action = ACTION_NORTH;\n            height = -height;\n            top -= height;\n          }\n          if (aspectRatio) {\n            width = height * aspectRatio;\n            left += (cropBoxData.width - width) / 2;\n          }\n          break;\n        case ACTION_NORTH_EAST:\n          if (aspectRatio) {\n            if (range.y <= 0 && (top <= minTop || right >= maxWidth)) {\n              renderable = false;\n              break;\n            }\n            check(ACTION_NORTH);\n            height -= range.y;\n            top += range.y;\n            width = height * aspectRatio;\n          } else {\n            check(ACTION_NORTH);\n            check(ACTION_EAST);\n            if (range.x >= 0) {\n              if (right < maxWidth) {\n                width += range.x;\n              } else if (range.y <= 0 && top <= minTop) {\n                renderable = false;\n              }\n            } else {\n              width += range.x;\n            }\n            if (range.y <= 0) {\n              if (top > minTop) {\n                height -= range.y;\n                top += range.y;\n              }\n            } else {\n              height -= range.y;\n              top += range.y;\n            }\n          }\n          if (width < 0 && height < 0) {\n            action = ACTION_SOUTH_WEST;\n            height = -height;\n            width = -width;\n            top -= height;\n            left -= width;\n          } else if (width < 0) {\n            action = ACTION_NORTH_WEST;\n            width = -width;\n            left -= width;\n          } else if (height < 0) {\n            action = ACTION_SOUTH_EAST;\n            height = -height;\n            top -= height;\n          }\n          break;\n        case ACTION_NORTH_WEST:\n          if (aspectRatio) {\n            if (range.y <= 0 && (top <= minTop || left <= minLeft)) {\n              renderable = false;\n              break;\n            }\n            check(ACTION_NORTH);\n            height -= range.y;\n            top += range.y;\n            width = height * aspectRatio;\n            left += cropBoxData.width - width;\n          } else {\n            check(ACTION_NORTH);\n            check(ACTION_WEST);\n            if (range.x <= 0) {\n              if (left > minLeft) {\n                width -= range.x;\n                left += range.x;\n              } else if (range.y <= 0 && top <= minTop) {\n                renderable = false;\n              }\n            } else {\n              width -= range.x;\n              left += range.x;\n            }\n            if (range.y <= 0) {\n              if (top > minTop) {\n                height -= range.y;\n                top += range.y;\n              }\n            } else {\n              height -= range.y;\n              top += range.y;\n            }\n          }\n          if (width < 0 && height < 0) {\n            action = ACTION_SOUTH_EAST;\n            height = -height;\n            width = -width;\n            top -= height;\n            left -= width;\n          } else if (width < 0) {\n            action = ACTION_NORTH_EAST;\n            width = -width;\n            left -= width;\n          } else if (height < 0) {\n            action = ACTION_SOUTH_WEST;\n            height = -height;\n            top -= height;\n          }\n          break;\n        case ACTION_SOUTH_WEST:\n          if (aspectRatio) {\n            if (range.x <= 0 && (left <= minLeft || bottom >= maxHeight)) {\n              renderable = false;\n              break;\n            }\n            check(ACTION_WEST);\n            width -= range.x;\n            left += range.x;\n            height = width / aspectRatio;\n          } else {\n            check(ACTION_SOUTH);\n            check(ACTION_WEST);\n            if (range.x <= 0) {\n              if (left > minLeft) {\n                width -= range.x;\n                left += range.x;\n              } else if (range.y >= 0 && bottom >= maxHeight) {\n                renderable = false;\n              }\n            } else {\n              width -= range.x;\n              left += range.x;\n            }\n            if (range.y >= 0) {\n              if (bottom < maxHeight) {\n                height += range.y;\n              }\n            } else {\n              height += range.y;\n            }\n          }\n          if (width < 0 && height < 0) {\n            action = ACTION_NORTH_EAST;\n            height = -height;\n            width = -width;\n            top -= height;\n            left -= width;\n          } else if (width < 0) {\n            action = ACTION_SOUTH_EAST;\n            width = -width;\n            left -= width;\n          } else if (height < 0) {\n            action = ACTION_NORTH_WEST;\n            height = -height;\n            top -= height;\n          }\n          break;\n        case ACTION_SOUTH_EAST:\n          if (aspectRatio) {\n            if (range.x >= 0 && (right >= maxWidth || bottom >= maxHeight)) {\n              renderable = false;\n              break;\n            }\n            check(ACTION_EAST);\n            width += range.x;\n            height = width / aspectRatio;\n          } else {\n            check(ACTION_SOUTH);\n            check(ACTION_EAST);\n            if (range.x >= 0) {\n              if (right < maxWidth) {\n                width += range.x;\n              } else if (range.y >= 0 && bottom >= maxHeight) {\n                renderable = false;\n              }\n            } else {\n              width += range.x;\n            }\n            if (range.y >= 0) {\n              if (bottom < maxHeight) {\n                height += range.y;\n              }\n            } else {\n              height += range.y;\n            }\n          }\n          if (width < 0 && height < 0) {\n            action = ACTION_NORTH_WEST;\n            height = -height;\n            width = -width;\n            top -= height;\n            left -= width;\n          } else if (width < 0) {\n            action = ACTION_SOUTH_WEST;\n            width = -width;\n            left -= width;\n          } else if (height < 0) {\n            action = ACTION_NORTH_EAST;\n            height = -height;\n            top -= height;\n          }\n          break;\n\n        // Move canvas\n        case ACTION_MOVE:\n          this.move(range.x, range.y);\n          renderable = false;\n          break;\n\n        // Zoom canvas\n        case ACTION_ZOOM:\n          this.zoom(getMaxZoomRatio(pointers), event);\n          renderable = false;\n          break;\n\n        // Create crop box\n        case ACTION_CROP:\n          if (!range.x || !range.y) {\n            renderable = false;\n            break;\n          }\n          offset = getOffset(this.cropper);\n          left = pointer.startX - offset.left;\n          top = pointer.startY - offset.top;\n          width = cropBoxData.minWidth;\n          height = cropBoxData.minHeight;\n          if (range.x > 0) {\n            action = range.y > 0 ? ACTION_SOUTH_EAST : ACTION_NORTH_EAST;\n          } else if (range.x < 0) {\n            left -= width;\n            action = range.y > 0 ? ACTION_SOUTH_WEST : ACTION_NORTH_WEST;\n          }\n          if (range.y < 0) {\n            top -= height;\n          }\n\n          // Show the crop box if is hidden\n          if (!this.cropped) {\n            removeClass(this.cropBox, CLASS_HIDDEN);\n            this.cropped = true;\n            if (this.limited) {\n              this.limitCropBox(true, true);\n            }\n          }\n          break;\n      }\n      if (renderable) {\n        cropBoxData.width = width;\n        cropBoxData.height = height;\n        cropBoxData.left = left;\n        cropBoxData.top = top;\n        this.action = action;\n        this.renderCropBox();\n      }\n\n      // Override\n      forEach(pointers, function (p) {\n        p.startX = p.endX;\n        p.startY = p.endY;\n      });\n    }\n  };\n\n  var methods = {\n    // Show the crop box manually\n    crop: function crop() {\n      if (this.ready && !this.cropped && !this.disabled) {\n        this.cropped = true;\n        this.limitCropBox(true, true);\n        if (this.options.modal) {\n          addClass(this.dragBox, CLASS_MODAL);\n        }\n        removeClass(this.cropBox, CLASS_HIDDEN);\n        this.setCropBoxData(this.initialCropBoxData);\n      }\n      return this;\n    },\n    // Reset the image and crop box to their initial states\n    reset: function reset() {\n      if (this.ready && !this.disabled) {\n        this.imageData = assign({}, this.initialImageData);\n        this.canvasData = assign({}, this.initialCanvasData);\n        this.cropBoxData = assign({}, this.initialCropBoxData);\n        this.renderCanvas();\n        if (this.cropped) {\n          this.renderCropBox();\n        }\n      }\n      return this;\n    },\n    // Clear the crop box\n    clear: function clear() {\n      if (this.cropped && !this.disabled) {\n        assign(this.cropBoxData, {\n          left: 0,\n          top: 0,\n          width: 0,\n          height: 0\n        });\n        this.cropped = false;\n        this.renderCropBox();\n        this.limitCanvas(true, true);\n\n        // Render canvas after crop box rendered\n        this.renderCanvas();\n        removeClass(this.dragBox, CLASS_MODAL);\n        addClass(this.cropBox, CLASS_HIDDEN);\n      }\n      return this;\n    },\n    /**\n     * Replace the image's src and rebuild the cropper\n     * @param {string} url - The new URL.\n     * @param {boolean} [hasSameSize] - Indicate if the new image has the same size as the old one.\n     * @returns {Cropper} this\n     */\n    replace: function replace(url) {\n      var hasSameSize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n      if (!this.disabled && url) {\n        if (this.isImg) {\n          this.element.src = url;\n        }\n        if (hasSameSize) {\n          this.url = url;\n          this.image.src = url;\n          if (this.ready) {\n            this.viewBoxImage.src = url;\n            forEach(this.previews, function (element) {\n              element.getElementsByTagName('img')[0].src = url;\n            });\n          }\n        } else {\n          if (this.isImg) {\n            this.replaced = true;\n          }\n          this.options.data = null;\n          this.uncreate();\n          this.load(url);\n        }\n      }\n      return this;\n    },\n    // Enable (unfreeze) the cropper\n    enable: function enable() {\n      if (this.ready && this.disabled) {\n        this.disabled = false;\n        removeClass(this.cropper, CLASS_DISABLED);\n      }\n      return this;\n    },\n    // Disable (freeze) the cropper\n    disable: function disable() {\n      if (this.ready && !this.disabled) {\n        this.disabled = true;\n        addClass(this.cropper, CLASS_DISABLED);\n      }\n      return this;\n    },\n    /**\n     * Destroy the cropper and remove the instance from the image\n     * @returns {Cropper} this\n     */\n    destroy: function destroy() {\n      var element = this.element;\n      if (!element[NAMESPACE]) {\n        return this;\n      }\n      element[NAMESPACE] = undefined;\n      if (this.isImg && this.replaced) {\n        element.src = this.originalUrl;\n      }\n      this.uncreate();\n      return this;\n    },\n    /**\n     * Move the canvas with relative offsets\n     * @param {number} offsetX - The relative offset distance on the x-axis.\n     * @param {number} [offsetY=offsetX] - The relative offset distance on the y-axis.\n     * @returns {Cropper} this\n     */\n    move: function move(offsetX) {\n      var offsetY = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : offsetX;\n      var _this$canvasData = this.canvasData,\n        left = _this$canvasData.left,\n        top = _this$canvasData.top;\n      return this.moveTo(isUndefined(offsetX) ? offsetX : left + Number(offsetX), isUndefined(offsetY) ? offsetY : top + Number(offsetY));\n    },\n    /**\n     * Move the canvas to an absolute point\n     * @param {number} x - The x-axis coordinate.\n     * @param {number} [y=x] - The y-axis coordinate.\n     * @returns {Cropper} this\n     */\n    moveTo: function moveTo(x) {\n      var y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : x;\n      var canvasData = this.canvasData;\n      var changed = false;\n      x = Number(x);\n      y = Number(y);\n      if (this.ready && !this.disabled && this.options.movable) {\n        if (isNumber(x)) {\n          canvasData.left = x;\n          changed = true;\n        }\n        if (isNumber(y)) {\n          canvasData.top = y;\n          changed = true;\n        }\n        if (changed) {\n          this.renderCanvas(true);\n        }\n      }\n      return this;\n    },\n    /**\n     * Zoom the canvas with a relative ratio\n     * @param {number} ratio - The target ratio.\n     * @param {Event} _originalEvent - The original event if any.\n     * @returns {Cropper} this\n     */\n    zoom: function zoom(ratio, _originalEvent) {\n      var canvasData = this.canvasData;\n      ratio = Number(ratio);\n      if (ratio < 0) {\n        ratio = 1 / (1 - ratio);\n      } else {\n        ratio = 1 + ratio;\n      }\n      return this.zoomTo(canvasData.width * ratio / canvasData.naturalWidth, null, _originalEvent);\n    },\n    /**\n     * Zoom the canvas to an absolute ratio\n     * @param {number} ratio - The target ratio.\n     * @param {Object} pivot - The zoom pivot point coordinate.\n     * @param {Event} _originalEvent - The original event if any.\n     * @returns {Cropper} this\n     */\n    zoomTo: function zoomTo(ratio, pivot, _originalEvent) {\n      var options = this.options,\n        canvasData = this.canvasData;\n      var width = canvasData.width,\n        height = canvasData.height,\n        naturalWidth = canvasData.naturalWidth,\n        naturalHeight = canvasData.naturalHeight;\n      ratio = Number(ratio);\n      if (ratio >= 0 && this.ready && !this.disabled && options.zoomable) {\n        var newWidth = naturalWidth * ratio;\n        var newHeight = naturalHeight * ratio;\n        if (dispatchEvent(this.element, EVENT_ZOOM, {\n          ratio: ratio,\n          oldRatio: width / naturalWidth,\n          originalEvent: _originalEvent\n        }) === false) {\n          return this;\n        }\n        if (_originalEvent) {\n          var pointers = this.pointers;\n          var offset = getOffset(this.cropper);\n          var center = pointers && Object.keys(pointers).length ? getPointersCenter(pointers) : {\n            pageX: _originalEvent.pageX,\n            pageY: _originalEvent.pageY\n          };\n\n          // Zoom from the triggering point of the event\n          canvasData.left -= (newWidth - width) * ((center.pageX - offset.left - canvasData.left) / width);\n          canvasData.top -= (newHeight - height) * ((center.pageY - offset.top - canvasData.top) / height);\n        } else if (isPlainObject(pivot) && isNumber(pivot.x) && isNumber(pivot.y)) {\n          canvasData.left -= (newWidth - width) * ((pivot.x - canvasData.left) / width);\n          canvasData.top -= (newHeight - height) * ((pivot.y - canvasData.top) / height);\n        } else {\n          // Zoom from the center of the canvas\n          canvasData.left -= (newWidth - width) / 2;\n          canvasData.top -= (newHeight - height) / 2;\n        }\n        canvasData.width = newWidth;\n        canvasData.height = newHeight;\n        this.renderCanvas(true);\n      }\n      return this;\n    },\n    /**\n     * Rotate the canvas with a relative degree\n     * @param {number} degree - The rotate degree.\n     * @returns {Cropper} this\n     */\n    rotate: function rotate(degree) {\n      return this.rotateTo((this.imageData.rotate || 0) + Number(degree));\n    },\n    /**\n     * Rotate the canvas to an absolute degree\n     * @param {number} degree - The rotate degree.\n     * @returns {Cropper} this\n     */\n    rotateTo: function rotateTo(degree) {\n      degree = Number(degree);\n      if (isNumber(degree) && this.ready && !this.disabled && this.options.rotatable) {\n        this.imageData.rotate = degree % 360;\n        this.renderCanvas(true, true);\n      }\n      return this;\n    },\n    /**\n     * Scale the image on the x-axis.\n     * @param {number} scaleX - The scale ratio on the x-axis.\n     * @returns {Cropper} this\n     */\n    scaleX: function scaleX(_scaleX) {\n      var scaleY = this.imageData.scaleY;\n      return this.scale(_scaleX, isNumber(scaleY) ? scaleY : 1);\n    },\n    /**\n     * Scale the image on the y-axis.\n     * @param {number} scaleY - The scale ratio on the y-axis.\n     * @returns {Cropper} this\n     */\n    scaleY: function scaleY(_scaleY) {\n      var scaleX = this.imageData.scaleX;\n      return this.scale(isNumber(scaleX) ? scaleX : 1, _scaleY);\n    },\n    /**\n     * Scale the image\n     * @param {number} scaleX - The scale ratio on the x-axis.\n     * @param {number} [scaleY=scaleX] - The scale ratio on the y-axis.\n     * @returns {Cropper} this\n     */\n    scale: function scale(scaleX) {\n      var scaleY = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : scaleX;\n      var imageData = this.imageData;\n      var transformed = false;\n      scaleX = Number(scaleX);\n      scaleY = Number(scaleY);\n      if (this.ready && !this.disabled && this.options.scalable) {\n        if (isNumber(scaleX)) {\n          imageData.scaleX = scaleX;\n          transformed = true;\n        }\n        if (isNumber(scaleY)) {\n          imageData.scaleY = scaleY;\n          transformed = true;\n        }\n        if (transformed) {\n          this.renderCanvas(true, true);\n        }\n      }\n      return this;\n    },\n    /**\n     * Get the cropped area position and size data (base on the original image)\n     * @param {boolean} [rounded=false] - Indicate if round the data values or not.\n     * @returns {Object} The result cropped data.\n     */\n    getData: function getData() {\n      var rounded = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n      var options = this.options,\n        imageData = this.imageData,\n        canvasData = this.canvasData,\n        cropBoxData = this.cropBoxData;\n      var data;\n      if (this.ready && this.cropped) {\n        data = {\n          x: cropBoxData.left - canvasData.left,\n          y: cropBoxData.top - canvasData.top,\n          width: cropBoxData.width,\n          height: cropBoxData.height\n        };\n        var ratio = imageData.width / imageData.naturalWidth;\n        forEach(data, function (n, i) {\n          data[i] = n / ratio;\n        });\n        if (rounded) {\n          // In case rounding off leads to extra 1px in right or bottom border\n          // we should round the top-left corner and the dimension (#343).\n          var bottom = Math.round(data.y + data.height);\n          var right = Math.round(data.x + data.width);\n          data.x = Math.round(data.x);\n          data.y = Math.round(data.y);\n          data.width = right - data.x;\n          data.height = bottom - data.y;\n        }\n      } else {\n        data = {\n          x: 0,\n          y: 0,\n          width: 0,\n          height: 0\n        };\n      }\n      if (options.rotatable) {\n        data.rotate = imageData.rotate || 0;\n      }\n      if (options.scalable) {\n        data.scaleX = imageData.scaleX || 1;\n        data.scaleY = imageData.scaleY || 1;\n      }\n      return data;\n    },\n    /**\n     * Set the cropped area position and size with new data\n     * @param {Object} data - The new data.\n     * @returns {Cropper} this\n     */\n    setData: function setData(data) {\n      var options = this.options,\n        imageData = this.imageData,\n        canvasData = this.canvasData;\n      var cropBoxData = {};\n      if (this.ready && !this.disabled && isPlainObject(data)) {\n        var transformed = false;\n        if (options.rotatable) {\n          if (isNumber(data.rotate) && data.rotate !== imageData.rotate) {\n            imageData.rotate = data.rotate;\n            transformed = true;\n          }\n        }\n        if (options.scalable) {\n          if (isNumber(data.scaleX) && data.scaleX !== imageData.scaleX) {\n            imageData.scaleX = data.scaleX;\n            transformed = true;\n          }\n          if (isNumber(data.scaleY) && data.scaleY !== imageData.scaleY) {\n            imageData.scaleY = data.scaleY;\n            transformed = true;\n          }\n        }\n        if (transformed) {\n          this.renderCanvas(true, true);\n        }\n        var ratio = imageData.width / imageData.naturalWidth;\n        if (isNumber(data.x)) {\n          cropBoxData.left = data.x * ratio + canvasData.left;\n        }\n        if (isNumber(data.y)) {\n          cropBoxData.top = data.y * ratio + canvasData.top;\n        }\n        if (isNumber(data.width)) {\n          cropBoxData.width = data.width * ratio;\n        }\n        if (isNumber(data.height)) {\n          cropBoxData.height = data.height * ratio;\n        }\n        this.setCropBoxData(cropBoxData);\n      }\n      return this;\n    },\n    /**\n     * Get the container size data.\n     * @returns {Object} The result container data.\n     */\n    getContainerData: function getContainerData() {\n      return this.ready ? assign({}, this.containerData) : {};\n    },\n    /**\n     * Get the image position and size data.\n     * @returns {Object} The result image data.\n     */\n    getImageData: function getImageData() {\n      return this.sized ? assign({}, this.imageData) : {};\n    },\n    /**\n     * Get the canvas position and size data.\n     * @returns {Object} The result canvas data.\n     */\n    getCanvasData: function getCanvasData() {\n      var canvasData = this.canvasData;\n      var data = {};\n      if (this.ready) {\n        forEach(['left', 'top', 'width', 'height', 'naturalWidth', 'naturalHeight'], function (n) {\n          data[n] = canvasData[n];\n        });\n      }\n      return data;\n    },\n    /**\n     * Set the canvas position and size with new data.\n     * @param {Object} data - The new canvas data.\n     * @returns {Cropper} this\n     */\n    setCanvasData: function setCanvasData(data) {\n      var canvasData = this.canvasData;\n      var aspectRatio = canvasData.aspectRatio;\n      if (this.ready && !this.disabled && isPlainObject(data)) {\n        if (isNumber(data.left)) {\n          canvasData.left = data.left;\n        }\n        if (isNumber(data.top)) {\n          canvasData.top = data.top;\n        }\n        if (isNumber(data.width)) {\n          canvasData.width = data.width;\n          canvasData.height = data.width / aspectRatio;\n        } else if (isNumber(data.height)) {\n          canvasData.height = data.height;\n          canvasData.width = data.height * aspectRatio;\n        }\n        this.renderCanvas(true);\n      }\n      return this;\n    },\n    /**\n     * Get the crop box position and size data.\n     * @returns {Object} The result crop box data.\n     */\n    getCropBoxData: function getCropBoxData() {\n      var cropBoxData = this.cropBoxData;\n      var data;\n      if (this.ready && this.cropped) {\n        data = {\n          left: cropBoxData.left,\n          top: cropBoxData.top,\n          width: cropBoxData.width,\n          height: cropBoxData.height\n        };\n      }\n      return data || {};\n    },\n    /**\n     * Set the crop box position and size with new data.\n     * @param {Object} data - The new crop box data.\n     * @returns {Cropper} this\n     */\n    setCropBoxData: function setCropBoxData(data) {\n      var cropBoxData = this.cropBoxData;\n      var aspectRatio = this.options.aspectRatio;\n      var widthChanged;\n      var heightChanged;\n      if (this.ready && this.cropped && !this.disabled && isPlainObject(data)) {\n        if (isNumber(data.left)) {\n          cropBoxData.left = data.left;\n        }\n        if (isNumber(data.top)) {\n          cropBoxData.top = data.top;\n        }\n        if (isNumber(data.width) && data.width !== cropBoxData.width) {\n          widthChanged = true;\n          cropBoxData.width = data.width;\n        }\n        if (isNumber(data.height) && data.height !== cropBoxData.height) {\n          heightChanged = true;\n          cropBoxData.height = data.height;\n        }\n        if (aspectRatio) {\n          if (widthChanged) {\n            cropBoxData.height = cropBoxData.width / aspectRatio;\n          } else if (heightChanged) {\n            cropBoxData.width = cropBoxData.height * aspectRatio;\n          }\n        }\n        this.renderCropBox();\n      }\n      return this;\n    },\n    /**\n     * Get a canvas drawn the cropped image.\n     * @param {Object} [options={}] - The config options.\n     * @returns {HTMLCanvasElement} - The result canvas.\n     */\n    getCroppedCanvas: function getCroppedCanvas() {\n      var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n      if (!this.ready || !window.HTMLCanvasElement) {\n        return null;\n      }\n      var canvasData = this.canvasData;\n      var source = getSourceCanvas(this.image, this.imageData, canvasData, options);\n\n      // Returns the source canvas if it is not cropped.\n      if (!this.cropped) {\n        return source;\n      }\n      var _this$getData = this.getData(options.rounded),\n        initialX = _this$getData.x,\n        initialY = _this$getData.y,\n        initialWidth = _this$getData.width,\n        initialHeight = _this$getData.height;\n      var ratio = source.width / Math.floor(canvasData.naturalWidth);\n      if (ratio !== 1) {\n        initialX *= ratio;\n        initialY *= ratio;\n        initialWidth *= ratio;\n        initialHeight *= ratio;\n      }\n      var aspectRatio = initialWidth / initialHeight;\n      var maxSizes = getAdjustedSizes({\n        aspectRatio: aspectRatio,\n        width: options.maxWidth || Infinity,\n        height: options.maxHeight || Infinity\n      });\n      var minSizes = getAdjustedSizes({\n        aspectRatio: aspectRatio,\n        width: options.minWidth || 0,\n        height: options.minHeight || 0\n      }, 'cover');\n      var _getAdjustedSizes = getAdjustedSizes({\n          aspectRatio: aspectRatio,\n          width: options.width || (ratio !== 1 ? source.width : initialWidth),\n          height: options.height || (ratio !== 1 ? source.height : initialHeight)\n        }),\n        width = _getAdjustedSizes.width,\n        height = _getAdjustedSizes.height;\n      width = Math.min(maxSizes.width, Math.max(minSizes.width, width));\n      height = Math.min(maxSizes.height, Math.max(minSizes.height, height));\n      var canvas = document.createElement('canvas');\n      var context = canvas.getContext('2d');\n      canvas.width = normalizeDecimalNumber(width);\n      canvas.height = normalizeDecimalNumber(height);\n      context.fillStyle = options.fillColor || 'transparent';\n      context.fillRect(0, 0, width, height);\n      var _options$imageSmoothi = options.imageSmoothingEnabled,\n        imageSmoothingEnabled = _options$imageSmoothi === void 0 ? true : _options$imageSmoothi,\n        imageSmoothingQuality = options.imageSmoothingQuality;\n      context.imageSmoothingEnabled = imageSmoothingEnabled;\n      if (imageSmoothingQuality) {\n        context.imageSmoothingQuality = imageSmoothingQuality;\n      }\n\n      // https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D.drawImage\n      var sourceWidth = source.width;\n      var sourceHeight = source.height;\n\n      // Source canvas parameters\n      var srcX = initialX;\n      var srcY = initialY;\n      var srcWidth;\n      var srcHeight;\n\n      // Destination canvas parameters\n      var dstX;\n      var dstY;\n      var dstWidth;\n      var dstHeight;\n      if (srcX <= -initialWidth || srcX > sourceWidth) {\n        srcX = 0;\n        srcWidth = 0;\n        dstX = 0;\n        dstWidth = 0;\n      } else if (srcX <= 0) {\n        dstX = -srcX;\n        srcX = 0;\n        srcWidth = Math.min(sourceWidth, initialWidth + srcX);\n        dstWidth = srcWidth;\n      } else if (srcX <= sourceWidth) {\n        dstX = 0;\n        srcWidth = Math.min(initialWidth, sourceWidth - srcX);\n        dstWidth = srcWidth;\n      }\n      if (srcWidth <= 0 || srcY <= -initialHeight || srcY > sourceHeight) {\n        srcY = 0;\n        srcHeight = 0;\n        dstY = 0;\n        dstHeight = 0;\n      } else if (srcY <= 0) {\n        dstY = -srcY;\n        srcY = 0;\n        srcHeight = Math.min(sourceHeight, initialHeight + srcY);\n        dstHeight = srcHeight;\n      } else if (srcY <= sourceHeight) {\n        dstY = 0;\n        srcHeight = Math.min(initialHeight, sourceHeight - srcY);\n        dstHeight = srcHeight;\n      }\n      var params = [srcX, srcY, srcWidth, srcHeight];\n\n      // Avoid \"IndexSizeError\"\n      if (dstWidth > 0 && dstHeight > 0) {\n        var scale = width / initialWidth;\n        params.push(dstX * scale, dstY * scale, dstWidth * scale, dstHeight * scale);\n      }\n\n      // All the numerical parameters should be integer for `drawImage`\n      // https://github.com/fengyuanchen/cropper/issues/476\n      context.drawImage.apply(context, [source].concat(_toConsumableArray(params.map(function (param) {\n        return Math.floor(normalizeDecimalNumber(param));\n      }))));\n      return canvas;\n    },\n    /**\n     * Change the aspect ratio of the crop box.\n     * @param {number} aspectRatio - The new aspect ratio.\n     * @returns {Cropper} this\n     */\n    setAspectRatio: function setAspectRatio(aspectRatio) {\n      var options = this.options;\n      if (!this.disabled && !isUndefined(aspectRatio)) {\n        // 0 -> NaN\n        options.aspectRatio = Math.max(0, aspectRatio) || NaN;\n        if (this.ready) {\n          this.initCropBox();\n          if (this.cropped) {\n            this.renderCropBox();\n          }\n        }\n      }\n      return this;\n    },\n    /**\n     * Change the drag mode.\n     * @param {string} mode - The new drag mode.\n     * @returns {Cropper} this\n     */\n    setDragMode: function setDragMode(mode) {\n      var options = this.options,\n        dragBox = this.dragBox,\n        face = this.face;\n      if (this.ready && !this.disabled) {\n        var croppable = mode === DRAG_MODE_CROP;\n        var movable = options.movable && mode === DRAG_MODE_MOVE;\n        mode = croppable || movable ? mode : DRAG_MODE_NONE;\n        options.dragMode = mode;\n        setData(dragBox, DATA_ACTION, mode);\n        toggleClass(dragBox, CLASS_CROP, croppable);\n        toggleClass(dragBox, CLASS_MOVE, movable);\n        if (!options.cropBoxMovable) {\n          // Sync drag mode to crop box when it is not movable\n          setData(face, DATA_ACTION, mode);\n          toggleClass(face, CLASS_CROP, croppable);\n          toggleClass(face, CLASS_MOVE, movable);\n        }\n      }\n      return this;\n    }\n  };\n\n  var AnotherCropper = WINDOW.Cropper;\n  var Cropper = /*#__PURE__*/function () {\n    /**\n     * Create a new Cropper.\n     * @param {Element} element - The target element for cropping.\n     * @param {Object} [options={}] - The configuration options.\n     */\n    function Cropper(element) {\n      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      _classCallCheck(this, Cropper);\n      if (!element || !REGEXP_TAG_NAME.test(element.tagName)) {\n        throw new Error('The first argument is required and must be an <img> or <canvas> element.');\n      }\n      this.element = element;\n      this.options = assign({}, DEFAULTS, isPlainObject(options) && options);\n      this.cropped = false;\n      this.disabled = false;\n      this.pointers = {};\n      this.ready = false;\n      this.reloading = false;\n      this.replaced = false;\n      this.sized = false;\n      this.sizing = false;\n      this.init();\n    }\n    _createClass(Cropper, [{\n      key: \"init\",\n      value: function init() {\n        var element = this.element;\n        var tagName = element.tagName.toLowerCase();\n        var url;\n        if (element[NAMESPACE]) {\n          return;\n        }\n        element[NAMESPACE] = this;\n        if (tagName === 'img') {\n          this.isImg = true;\n\n          // e.g.: \"img/picture.jpg\"\n          url = element.getAttribute('src') || '';\n          this.originalUrl = url;\n\n          // Stop when it's a blank image\n          if (!url) {\n            return;\n          }\n\n          // e.g.: \"https://example.com/img/picture.jpg\"\n          url = element.src;\n        } else if (tagName === 'canvas' && window.HTMLCanvasElement) {\n          url = element.toDataURL();\n        }\n        this.load(url);\n      }\n    }, {\n      key: \"load\",\n      value: function load(url) {\n        var _this = this;\n        if (!url) {\n          return;\n        }\n        this.url = url;\n        this.imageData = {};\n        var element = this.element,\n          options = this.options;\n        if (!options.rotatable && !options.scalable) {\n          options.checkOrientation = false;\n        }\n\n        // Only IE10+ supports Typed Arrays\n        if (!options.checkOrientation || !window.ArrayBuffer) {\n          this.clone();\n          return;\n        }\n\n        // Detect the mime type of the image directly if it is a Data URL\n        if (REGEXP_DATA_URL.test(url)) {\n          // Read ArrayBuffer from Data URL of JPEG images directly for better performance\n          if (REGEXP_DATA_URL_JPEG.test(url)) {\n            this.read(dataURLToArrayBuffer(url));\n          } else {\n            // Only a JPEG image may contains Exif Orientation information,\n            // the rest types of Data URLs are not necessary to check orientation at all.\n            this.clone();\n          }\n          return;\n        }\n\n        // 1. Detect the mime type of the image by a XMLHttpRequest.\n        // 2. Load the image as ArrayBuffer for reading orientation if its a JPEG image.\n        var xhr = new XMLHttpRequest();\n        var clone = this.clone.bind(this);\n        this.reloading = true;\n        this.xhr = xhr;\n\n        // 1. Cross origin requests are only supported for protocol schemes:\n        // http, https, data, chrome, chrome-extension.\n        // 2. Access to XMLHttpRequest from a Data URL will be blocked by CORS policy\n        // in some browsers as IE11 and Safari.\n        xhr.onabort = clone;\n        xhr.onerror = clone;\n        xhr.ontimeout = clone;\n        xhr.onprogress = function () {\n          // Abort the request directly if it not a JPEG image for better performance\n          if (xhr.getResponseHeader('content-type') !== MIME_TYPE_JPEG) {\n            xhr.abort();\n          }\n        };\n        xhr.onload = function () {\n          _this.read(xhr.response);\n        };\n        xhr.onloadend = function () {\n          _this.reloading = false;\n          _this.xhr = null;\n        };\n\n        // Bust cache when there is a \"crossOrigin\" property to avoid browser cache error\n        if (options.checkCrossOrigin && isCrossOriginURL(url) && element.crossOrigin) {\n          url = addTimestamp(url);\n        }\n\n        // The third parameter is required for avoiding side-effect (#682)\n        xhr.open('GET', url, true);\n        xhr.responseType = 'arraybuffer';\n        xhr.withCredentials = element.crossOrigin === 'use-credentials';\n        xhr.send();\n      }\n    }, {\n      key: \"read\",\n      value: function read(arrayBuffer) {\n        var options = this.options,\n          imageData = this.imageData;\n\n        // Reset the orientation value to its default value 1\n        // as some iOS browsers will render image with its orientation\n        var orientation = resetAndGetOrientation(arrayBuffer);\n        var rotate = 0;\n        var scaleX = 1;\n        var scaleY = 1;\n        if (orientation > 1) {\n          // Generate a new URL which has the default orientation value\n          this.url = arrayBufferToDataURL(arrayBuffer, MIME_TYPE_JPEG);\n          var _parseOrientation = parseOrientation(orientation);\n          rotate = _parseOrientation.rotate;\n          scaleX = _parseOrientation.scaleX;\n          scaleY = _parseOrientation.scaleY;\n        }\n        if (options.rotatable) {\n          imageData.rotate = rotate;\n        }\n        if (options.scalable) {\n          imageData.scaleX = scaleX;\n          imageData.scaleY = scaleY;\n        }\n        this.clone();\n      }\n    }, {\n      key: \"clone\",\n      value: function clone() {\n        var element = this.element,\n          url = this.url;\n        var crossOrigin = element.crossOrigin;\n        var crossOriginUrl = url;\n        if (this.options.checkCrossOrigin && isCrossOriginURL(url)) {\n          if (!crossOrigin) {\n            crossOrigin = 'anonymous';\n          }\n\n          // Bust cache when there is not a \"crossOrigin\" property (#519)\n          crossOriginUrl = addTimestamp(url);\n        }\n        this.crossOrigin = crossOrigin;\n        this.crossOriginUrl = crossOriginUrl;\n        var image = document.createElement('img');\n        if (crossOrigin) {\n          image.crossOrigin = crossOrigin;\n        }\n        image.src = crossOriginUrl || url;\n        image.alt = element.alt || 'The image to crop';\n        this.image = image;\n        image.onload = this.start.bind(this);\n        image.onerror = this.stop.bind(this);\n        addClass(image, CLASS_HIDE);\n        element.parentNode.insertBefore(image, element.nextSibling);\n      }\n    }, {\n      key: \"start\",\n      value: function start() {\n        var _this2 = this;\n        var image = this.image;\n        image.onload = null;\n        image.onerror = null;\n        this.sizing = true;\n\n        // Match all browsers that use WebKit as the layout engine in iOS devices,\n        // such as Safari for iOS, Chrome for iOS, and in-app browsers.\n        var isIOSWebKit = WINDOW.navigator && /(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(WINDOW.navigator.userAgent);\n        var done = function done(naturalWidth, naturalHeight) {\n          assign(_this2.imageData, {\n            naturalWidth: naturalWidth,\n            naturalHeight: naturalHeight,\n            aspectRatio: naturalWidth / naturalHeight\n          });\n          _this2.initialImageData = assign({}, _this2.imageData);\n          _this2.sizing = false;\n          _this2.sized = true;\n          _this2.build();\n        };\n\n        // Most modern browsers (excepts iOS WebKit)\n        if (image.naturalWidth && !isIOSWebKit) {\n          done(image.naturalWidth, image.naturalHeight);\n          return;\n        }\n        var sizingImage = document.createElement('img');\n        var body = document.body || document.documentElement;\n        this.sizingImage = sizingImage;\n        sizingImage.onload = function () {\n          done(sizingImage.width, sizingImage.height);\n          if (!isIOSWebKit) {\n            body.removeChild(sizingImage);\n          }\n        };\n        sizingImage.src = image.src;\n\n        // iOS WebKit will convert the image automatically\n        // with its orientation once append it into DOM (#279)\n        if (!isIOSWebKit) {\n          sizingImage.style.cssText = 'left:0;' + 'max-height:none!important;' + 'max-width:none!important;' + 'min-height:0!important;' + 'min-width:0!important;' + 'opacity:0;' + 'position:absolute;' + 'top:0;' + 'z-index:-1;';\n          body.appendChild(sizingImage);\n        }\n      }\n    }, {\n      key: \"stop\",\n      value: function stop() {\n        var image = this.image;\n        image.onload = null;\n        image.onerror = null;\n        image.parentNode.removeChild(image);\n        this.image = null;\n      }\n    }, {\n      key: \"build\",\n      value: function build() {\n        if (!this.sized || this.ready) {\n          return;\n        }\n        var element = this.element,\n          options = this.options,\n          image = this.image;\n\n        // Create cropper elements\n        var container = element.parentNode;\n        var template = document.createElement('div');\n        template.innerHTML = TEMPLATE;\n        var cropper = template.querySelector(\".\".concat(NAMESPACE, \"-container\"));\n        var canvas = cropper.querySelector(\".\".concat(NAMESPACE, \"-canvas\"));\n        var dragBox = cropper.querySelector(\".\".concat(NAMESPACE, \"-drag-box\"));\n        var cropBox = cropper.querySelector(\".\".concat(NAMESPACE, \"-crop-box\"));\n        var face = cropBox.querySelector(\".\".concat(NAMESPACE, \"-face\"));\n        this.container = container;\n        this.cropper = cropper;\n        this.canvas = canvas;\n        this.dragBox = dragBox;\n        this.cropBox = cropBox;\n        this.viewBox = cropper.querySelector(\".\".concat(NAMESPACE, \"-view-box\"));\n        this.face = face;\n        canvas.appendChild(image);\n\n        // Hide the original image\n        addClass(element, CLASS_HIDDEN);\n\n        // Inserts the cropper after to the current image\n        container.insertBefore(cropper, element.nextSibling);\n\n        // Show the hidden image\n        removeClass(image, CLASS_HIDE);\n        this.initPreview();\n        this.bind();\n        options.initialAspectRatio = Math.max(0, options.initialAspectRatio) || NaN;\n        options.aspectRatio = Math.max(0, options.aspectRatio) || NaN;\n        options.viewMode = Math.max(0, Math.min(3, Math.round(options.viewMode))) || 0;\n        addClass(cropBox, CLASS_HIDDEN);\n        if (!options.guides) {\n          addClass(cropBox.getElementsByClassName(\"\".concat(NAMESPACE, \"-dashed\")), CLASS_HIDDEN);\n        }\n        if (!options.center) {\n          addClass(cropBox.getElementsByClassName(\"\".concat(NAMESPACE, \"-center\")), CLASS_HIDDEN);\n        }\n        if (options.background) {\n          addClass(cropper, \"\".concat(NAMESPACE, \"-bg\"));\n        }\n        if (!options.highlight) {\n          addClass(face, CLASS_INVISIBLE);\n        }\n        if (options.cropBoxMovable) {\n          addClass(face, CLASS_MOVE);\n          setData(face, DATA_ACTION, ACTION_ALL);\n        }\n        if (!options.cropBoxResizable) {\n          addClass(cropBox.getElementsByClassName(\"\".concat(NAMESPACE, \"-line\")), CLASS_HIDDEN);\n          addClass(cropBox.getElementsByClassName(\"\".concat(NAMESPACE, \"-point\")), CLASS_HIDDEN);\n        }\n        this.render();\n        this.ready = true;\n        this.setDragMode(options.dragMode);\n        if (options.autoCrop) {\n          this.crop();\n        }\n        this.setData(options.data);\n        if (isFunction(options.ready)) {\n          addListener(element, EVENT_READY, options.ready, {\n            once: true\n          });\n        }\n        dispatchEvent(element, EVENT_READY);\n      }\n    }, {\n      key: \"unbuild\",\n      value: function unbuild() {\n        if (!this.ready) {\n          return;\n        }\n        this.ready = false;\n        this.unbind();\n        this.resetPreview();\n        var parentNode = this.cropper.parentNode;\n        if (parentNode) {\n          parentNode.removeChild(this.cropper);\n        }\n        removeClass(this.element, CLASS_HIDDEN);\n      }\n    }, {\n      key: \"uncreate\",\n      value: function uncreate() {\n        if (this.ready) {\n          this.unbuild();\n          this.ready = false;\n          this.cropped = false;\n        } else if (this.sizing) {\n          this.sizingImage.onload = null;\n          this.sizing = false;\n          this.sized = false;\n        } else if (this.reloading) {\n          this.xhr.onabort = null;\n          this.xhr.abort();\n        } else if (this.image) {\n          this.stop();\n        }\n      }\n\n      /**\n       * Get the no conflict cropper class.\n       * @returns {Cropper} The cropper class.\n       */\n    }], [{\n      key: \"noConflict\",\n      value: function noConflict() {\n        window.Cropper = AnotherCropper;\n        return Cropper;\n      }\n\n      /**\n       * Change the default options.\n       * @param {Object} options - The new default options.\n       */\n    }, {\n      key: \"setDefaults\",\n      value: function setDefaults(options) {\n        assign(DEFAULTS, isPlainObject(options) && options);\n      }\n    }]);\n    return Cropper;\n  }();\n  assign(Cropper.prototype, render, preview, events, handlers, change, methods);\n\n  return Cropper;\n\n}));\n", "/*!\n * jQuery JavaScript Library v3.7.1\n * https://jquery.com/\n *\n * Copyright OpenJS Foundation and other contributors\n * Released under the MIT license\n * https://jquery.org/license\n *\n * Date: 2023-08-28T13:37Z\n */\n( function( global, factory ) {\n\n\t\"use strict\";\n\n\tif ( typeof module === \"object\" && typeof module.exports === \"object\" ) {\n\n\t\t// For CommonJS and CommonJS-like environments where a proper `window`\n\t\t// is present, execute the factory and get jQuery.\n\t\t// For environments that do not have a `window` with a `document`\n\t\t// (such as Node.js), expose a factory as module.exports.\n\t\t// This accentuates the need for the creation of a real `window`.\n\t\t// e.g. var jQuery = require(\"jquery\")(window);\n\t\t// See ticket trac-14549 for more info.\n\t\tmodule.exports = global.document ?\n\t\t\tfactory( global, true ) :\n\t\t\tfunction( w ) {\n\t\t\t\tif ( !w.document ) {\n\t\t\t\t\tthrow new Error( \"jQuery requires a window with a document\" );\n\t\t\t\t}\n\t\t\t\treturn factory( w );\n\t\t\t};\n\t} else {\n\t\tfactory( global );\n\t}\n\n// Pass this if window is not defined yet\n} )( typeof window !== \"undefined\" ? window : this, function( window, noGlobal ) {\n\n// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1\n// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode\n// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common\n// enough that all such attempts are guarded in a try block.\n\"use strict\";\n\nvar arr = [];\n\nvar getProto = Object.getPrototypeOf;\n\nvar slice = arr.slice;\n\nvar flat = arr.flat ? function( array ) {\n\treturn arr.flat.call( array );\n} : function( array ) {\n\treturn arr.concat.apply( [], array );\n};\n\n\nvar push = arr.push;\n\nvar indexOf = arr.indexOf;\n\nvar class2type = {};\n\nvar toString = class2type.toString;\n\nvar hasOwn = class2type.hasOwnProperty;\n\nvar fnToString = hasOwn.toString;\n\nvar ObjectFunctionString = fnToString.call( Object );\n\nvar support = {};\n\nvar isFunction = function isFunction( obj ) {\n\n\t\t// Support: Chrome <=57, Firefox <=52\n\t\t// In some browsers, typeof returns \"function\" for HTML <object> elements\n\t\t// (i.e., `typeof document.createElement( \"object\" ) === \"function\"`).\n\t\t// We don't want to classify *any* DOM node as a function.\n\t\t// Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5\n\t\t// Plus for old WebKit, typeof returns \"function\" for HTML collections\n\t\t// (e.g., `typeof document.getElementsByTagName(\"div\") === \"function\"`). (gh-4756)\n\t\treturn typeof obj === \"function\" && typeof obj.nodeType !== \"number\" &&\n\t\t\ttypeof obj.item !== \"function\";\n\t};\n\n\nvar isWindow = function isWindow( obj ) {\n\t\treturn obj != null && obj === obj.window;\n\t};\n\n\nvar document = window.document;\n\n\n\n\tvar preservedScriptAttributes = {\n\t\ttype: true,\n\t\tsrc: true,\n\t\tnonce: true,\n\t\tnoModule: true\n\t};\n\n\tfunction DOMEval( code, node, doc ) {\n\t\tdoc = doc || document;\n\n\t\tvar i, val,\n\t\t\tscript = doc.createElement( \"script\" );\n\n\t\tscript.text = code;\n\t\tif ( node ) {\n\t\t\tfor ( i in preservedScriptAttributes ) {\n\n\t\t\t\t// Support: Firefox 64+, Edge 18+\n\t\t\t\t// Some browsers don't support the \"nonce\" property on scripts.\n\t\t\t\t// On the other hand, just using `getAttribute` is not enough as\n\t\t\t\t// the `nonce` attribute is reset to an empty string whenever it\n\t\t\t\t// becomes browsing-context connected.\n\t\t\t\t// See https://github.com/whatwg/html/issues/2369\n\t\t\t\t// See https://html.spec.whatwg.org/#nonce-attributes\n\t\t\t\t// The `node.getAttribute` check was added for the sake of\n\t\t\t\t// `jQuery.globalEval` so that it can fake a nonce-containing node\n\t\t\t\t// via an object.\n\t\t\t\tval = node[ i ] || node.getAttribute && node.getAttribute( i );\n\t\t\t\tif ( val ) {\n\t\t\t\t\tscript.setAttribute( i, val );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdoc.head.appendChild( script ).parentNode.removeChild( script );\n\t}\n\n\nfunction toType( obj ) {\n\tif ( obj == null ) {\n\t\treturn obj + \"\";\n\t}\n\n\t// Support: Android <=2.3 only (functionish RegExp)\n\treturn typeof obj === \"object\" || typeof obj === \"function\" ?\n\t\tclass2type[ toString.call( obj ) ] || \"object\" :\n\t\ttypeof obj;\n}\n/* global Symbol */\n// Defining this global in .eslintrc.json would create a danger of using the global\n// unguarded in another place, it seems safer to define global only for this module\n\n\n\nvar version = \"3.7.1\",\n\n\trhtmlSuffix = /HTML$/i,\n\n\t// Define a local copy of jQuery\n\tjQuery = function( selector, context ) {\n\n\t\t// The jQuery object is actually just the init constructor 'enhanced'\n\t\t// Need init if jQuery is called (just allow error to be thrown if not included)\n\t\treturn new jQuery.fn.init( selector, context );\n\t};\n\njQuery.fn = jQuery.prototype = {\n\n\t// The current version of jQuery being used\n\tjquery: version,\n\n\tconstructor: jQuery,\n\n\t// The default length of a jQuery object is 0\n\tlength: 0,\n\n\ttoArray: function() {\n\t\treturn slice.call( this );\n\t},\n\n\t// Get the Nth element in the matched element set OR\n\t// Get the whole matched element set as a clean array\n\tget: function( num ) {\n\n\t\t// Return all the elements in a clean array\n\t\tif ( num == null ) {\n\t\t\treturn slice.call( this );\n\t\t}\n\n\t\t// Return just the one element from the set\n\t\treturn num < 0 ? this[ num + this.length ] : this[ num ];\n\t},\n\n\t// Take an array of elements and push it onto the stack\n\t// (returning the new matched element set)\n\tpushStack: function( elems ) {\n\n\t\t// Build a new jQuery matched element set\n\t\tvar ret = jQuery.merge( this.constructor(), elems );\n\n\t\t// Add the old object onto the stack (as a reference)\n\t\tret.prevObject = this;\n\n\t\t// Return the newly-formed element set\n\t\treturn ret;\n\t},\n\n\t// Execute a callback for every element in the matched set.\n\teach: function( callback ) {\n\t\treturn jQuery.each( this, callback );\n\t},\n\n\tmap: function( callback ) {\n\t\treturn this.pushStack( jQuery.map( this, function( elem, i ) {\n\t\t\treturn callback.call( elem, i, elem );\n\t\t} ) );\n\t},\n\n\tslice: function() {\n\t\treturn this.pushStack( slice.apply( this, arguments ) );\n\t},\n\n\tfirst: function() {\n\t\treturn this.eq( 0 );\n\t},\n\n\tlast: function() {\n\t\treturn this.eq( -1 );\n\t},\n\n\teven: function() {\n\t\treturn this.pushStack( jQuery.grep( this, function( _elem, i ) {\n\t\t\treturn ( i + 1 ) % 2;\n\t\t} ) );\n\t},\n\n\todd: function() {\n\t\treturn this.pushStack( jQuery.grep( this, function( _elem, i ) {\n\t\t\treturn i % 2;\n\t\t} ) );\n\t},\n\n\teq: function( i ) {\n\t\tvar len = this.length,\n\t\t\tj = +i + ( i < 0 ? len : 0 );\n\t\treturn this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );\n\t},\n\n\tend: function() {\n\t\treturn this.prevObject || this.constructor();\n\t},\n\n\t// For internal use only.\n\t// Behaves like an Array's method, not like a jQuery method.\n\tpush: push,\n\tsort: arr.sort,\n\tsplice: arr.splice\n};\n\njQuery.extend = jQuery.fn.extend = function() {\n\tvar options, name, src, copy, copyIsArray, clone,\n\t\ttarget = arguments[ 0 ] || {},\n\t\ti = 1,\n\t\tlength = arguments.length,\n\t\tdeep = false;\n\n\t// Handle a deep copy situation\n\tif ( typeof target === \"boolean\" ) {\n\t\tdeep = target;\n\n\t\t// Skip the boolean and the target\n\t\ttarget = arguments[ i ] || {};\n\t\ti++;\n\t}\n\n\t// Handle case when target is a string or something (possible in deep copy)\n\tif ( typeof target !== \"object\" && !isFunction( target ) ) {\n\t\ttarget = {};\n\t}\n\n\t// Extend jQuery itself if only one argument is passed\n\tif ( i === length ) {\n\t\ttarget = this;\n\t\ti--;\n\t}\n\n\tfor ( ; i < length; i++ ) {\n\n\t\t// Only deal with non-null/undefined values\n\t\tif ( ( options = arguments[ i ] ) != null ) {\n\n\t\t\t// Extend the base object\n\t\t\tfor ( name in options ) {\n\t\t\t\tcopy = options[ name ];\n\n\t\t\t\t// Prevent Object.prototype pollution\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif ( name === \"__proto__\" || target === copy ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\tif ( deep && copy && ( jQuery.isPlainObject( copy ) ||\n\t\t\t\t\t( copyIsArray = Array.isArray( copy ) ) ) ) {\n\t\t\t\t\tsrc = target[ name ];\n\n\t\t\t\t\t// Ensure proper type for the source value\n\t\t\t\t\tif ( copyIsArray && !Array.isArray( src ) ) {\n\t\t\t\t\t\tclone = [];\n\t\t\t\t\t} else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) {\n\t\t\t\t\t\tclone = {};\n\t\t\t\t\t} else {\n\t\t\t\t\t\tclone = src;\n\t\t\t\t\t}\n\t\t\t\t\tcopyIsArray = false;\n\n\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\ttarget[ name ] = jQuery.extend( deep, clone, copy );\n\n\t\t\t\t// Don't bring in undefined values\n\t\t\t\t} else if ( copy !== undefined ) {\n\t\t\t\t\ttarget[ name ] = copy;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\njQuery.extend( {\n\n\t// Unique for each copy of jQuery on the page\n\texpando: \"jQuery\" + ( version + Math.random() ).replace( /\\D/g, \"\" ),\n\n\t// Assume jQuery is ready without the ready module\n\tisReady: true,\n\n\terror: function( msg ) {\n\t\tthrow new Error( msg );\n\t},\n\n\tnoop: function() {},\n\n\tisPlainObject: function( obj ) {\n\t\tvar proto, Ctor;\n\n\t\t// Detect obvious negatives\n\t\t// Use toString instead of jQuery.type to catch host objects\n\t\tif ( !obj || toString.call( obj ) !== \"[object Object]\" ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tproto = getProto( obj );\n\n\t\t// Objects with no prototype (e.g., `Object.create( null )`) are plain\n\t\tif ( !proto ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Objects with prototype are plain iff they were constructed by a global Object function\n\t\tCtor = hasOwn.call( proto, \"constructor\" ) && proto.constructor;\n\t\treturn typeof Ctor === \"function\" && fnToString.call( Ctor ) === ObjectFunctionString;\n\t},\n\n\tisEmptyObject: function( obj ) {\n\t\tvar name;\n\n\t\tfor ( name in obj ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t},\n\n\t// Evaluates a script in a provided context; falls back to the global one\n\t// if not specified.\n\tglobalEval: function( code, options, doc ) {\n\t\tDOMEval( code, { nonce: options && options.nonce }, doc );\n\t},\n\n\teach: function( obj, callback ) {\n\t\tvar length, i = 0;\n\n\t\tif ( isArrayLike( obj ) ) {\n\t\t\tlength = obj.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i in obj ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn obj;\n\t},\n\n\n\t// Retrieve the text value of an array of DOM nodes\n\ttext: function( elem ) {\n\t\tvar node,\n\t\t\tret = \"\",\n\t\t\ti = 0,\n\t\t\tnodeType = elem.nodeType;\n\n\t\tif ( !nodeType ) {\n\n\t\t\t// If no nodeType, this is expected to be an array\n\t\t\twhile ( ( node = elem[ i++ ] ) ) {\n\n\t\t\t\t// Do not traverse comment nodes\n\t\t\t\tret += jQuery.text( node );\n\t\t\t}\n\t\t}\n\t\tif ( nodeType === 1 || nodeType === 11 ) {\n\t\t\treturn elem.textContent;\n\t\t}\n\t\tif ( nodeType === 9 ) {\n\t\t\treturn elem.documentElement.textContent;\n\t\t}\n\t\tif ( nodeType === 3 || nodeType === 4 ) {\n\t\t\treturn elem.nodeValue;\n\t\t}\n\n\t\t// Do not include comment or processing instruction nodes\n\n\t\treturn ret;\n\t},\n\n\t// results is for internal usage only\n\tmakeArray: function( arr, results ) {\n\t\tvar ret = results || [];\n\n\t\tif ( arr != null ) {\n\t\t\tif ( isArrayLike( Object( arr ) ) ) {\n\t\t\t\tjQuery.merge( ret,\n\t\t\t\t\ttypeof arr === \"string\" ?\n\t\t\t\t\t\t[ arr ] : arr\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tpush.call( ret, arr );\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\tinArray: function( elem, arr, i ) {\n\t\treturn arr == null ? -1 : indexOf.call( arr, elem, i );\n\t},\n\n\tisXMLDoc: function( elem ) {\n\t\tvar namespace = elem && elem.namespaceURI,\n\t\t\tdocElem = elem && ( elem.ownerDocument || elem ).documentElement;\n\n\t\t// Assume HTML when documentElement doesn't yet exist, such as inside\n\t\t// document fragments.\n\t\treturn !rhtmlSuffix.test( namespace || docElem && docElem.nodeName || \"HTML\" );\n\t},\n\n\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t// push.apply(_, arraylike) throws on ancient WebKit\n\tmerge: function( first, second ) {\n\t\tvar len = +second.length,\n\t\t\tj = 0,\n\t\t\ti = first.length;\n\n\t\tfor ( ; j < len; j++ ) {\n\t\t\tfirst[ i++ ] = second[ j ];\n\t\t}\n\n\t\tfirst.length = i;\n\n\t\treturn first;\n\t},\n\n\tgrep: function( elems, callback, invert ) {\n\t\tvar callbackInverse,\n\t\t\tmatches = [],\n\t\t\ti = 0,\n\t\t\tlength = elems.length,\n\t\t\tcallbackExpect = !invert;\n\n\t\t// Go through the array, only saving the items\n\t\t// that pass the validator function\n\t\tfor ( ; i < length; i++ ) {\n\t\t\tcallbackInverse = !callback( elems[ i ], i );\n\t\t\tif ( callbackInverse !== callbackExpect ) {\n\t\t\t\tmatches.push( elems[ i ] );\n\t\t\t}\n\t\t}\n\n\t\treturn matches;\n\t},\n\n\t// arg is for internal usage only\n\tmap: function( elems, callback, arg ) {\n\t\tvar length, value,\n\t\t\ti = 0,\n\t\t\tret = [];\n\n\t\t// Go through the array, translating each of the items to their new values\n\t\tif ( isArrayLike( elems ) ) {\n\t\t\tlength = elems.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Go through every key on the object,\n\t\t} else {\n\t\t\tfor ( i in elems ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Flatten any nested arrays\n\t\treturn flat( ret );\n\t},\n\n\t// A global GUID counter for objects\n\tguid: 1,\n\n\t// jQuery.support is not used in Core but other projects attach their\n\t// properties to it so it needs to exist.\n\tsupport: support\n} );\n\nif ( typeof Symbol === \"function\" ) {\n\tjQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];\n}\n\n// Populate the class2type map\njQuery.each( \"Boolean Number String Function Array Date RegExp Object Error Symbol\".split( \" \" ),\n\tfunction( _i, name ) {\n\t\tclass2type[ \"[object \" + name + \"]\" ] = name.toLowerCase();\n\t} );\n\nfunction isArrayLike( obj ) {\n\n\t// Support: real iOS 8.2 only (not reproducible in simulator)\n\t// `in` check used to prevent JIT error (gh-2145)\n\t// hasOwn isn't used here due to false negatives\n\t// regarding Nodelist length in IE\n\tvar length = !!obj && \"length\" in obj && obj.length,\n\t\ttype = toType( obj );\n\n\tif ( isFunction( obj ) || isWindow( obj ) ) {\n\t\treturn false;\n\t}\n\n\treturn type === \"array\" || length === 0 ||\n\t\ttypeof length === \"number\" && length > 0 && ( length - 1 ) in obj;\n}\n\n\nfunction nodeName( elem, name ) {\n\n\treturn elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();\n\n}\nvar pop = arr.pop;\n\n\nvar sort = arr.sort;\n\n\nvar splice = arr.splice;\n\n\nvar whitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\";\n\n\nvar rtrimCSS = new RegExp(\n\t\"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" + whitespace + \"+$\",\n\t\"g\"\n);\n\n\n\n\n// Note: an element does not contain itself\njQuery.contains = function( a, b ) {\n\tvar bup = b && b.parentNode;\n\n\treturn a === bup || !!( bup && bup.nodeType === 1 && (\n\n\t\t// Support: IE 9 - 11+\n\t\t// IE doesn't have `contains` on SVG.\n\t\ta.contains ?\n\t\t\ta.contains( bup ) :\n\t\t\ta.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16\n\t) );\n};\n\n\n\n\n// CSS string/identifier serialization\n// https://drafts.csswg.org/cssom/#common-serializing-idioms\nvar rcssescape = /([\\0-\\x1f\\x7f]|^-?\\d)|^-$|[^\\x80-\\uFFFF\\w-]/g;\n\nfunction fcssescape( ch, asCodePoint ) {\n\tif ( asCodePoint ) {\n\n\t\t// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER\n\t\tif ( ch === \"\\0\" ) {\n\t\t\treturn \"\\uFFFD\";\n\t\t}\n\n\t\t// Control characters and (dependent upon position) numbers get escaped as code points\n\t\treturn ch.slice( 0, -1 ) + \"\\\\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + \" \";\n\t}\n\n\t// Other potentially-special ASCII characters get backslash-escaped\n\treturn \"\\\\\" + ch;\n}\n\njQuery.escapeSelector = function( sel ) {\n\treturn ( sel + \"\" ).replace( rcssescape, fcssescape );\n};\n\n\n\n\nvar preferredDoc = document,\n\tpushNative = push;\n\n( function() {\n\nvar i,\n\tExpr,\n\toutermostContext,\n\tsortInput,\n\thasDuplicate,\n\tpush = pushNative,\n\n\t// Local document vars\n\tdocument,\n\tdocumentElement,\n\tdocumentIsHTML,\n\trbuggyQSA,\n\tmatches,\n\n\t// Instance-specific data\n\texpando = jQuery.expando,\n\tdirruns = 0,\n\tdone = 0,\n\tclassCache = createCache(),\n\ttokenCache = createCache(),\n\tcompilerCache = createCache(),\n\tnonnativeSelectorCache = createCache(),\n\tsortOrder = function( a, b ) {\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t}\n\t\treturn 0;\n\t},\n\n\tbooleans = \"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|\" +\n\t\t\"loop|multiple|open|readonly|required|scoped\",\n\n\t// Regular expressions\n\n\t// https://www.w3.org/TR/css-syntax-3/#ident-token-diagram\n\tidentifier = \"(?:\\\\\\\\[\\\\da-fA-F]{1,6}\" + whitespace +\n\t\t\"?|\\\\\\\\[^\\\\r\\\\n\\\\f]|[\\\\w-]|[^\\0-\\\\x7f])+\",\n\n\t// Attribute selectors: https://www.w3.org/TR/selectors/#attribute-selectors\n\tattributes = \"\\\\[\" + whitespace + \"*(\" + identifier + \")(?:\" + whitespace +\n\n\t\t// Operator (capture 2)\n\t\t\"*([*^$|!~]?=)\" + whitespace +\n\n\t\t// \"Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]\"\n\t\t\"*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(\" + identifier + \"))|)\" +\n\t\twhitespace + \"*\\\\]\",\n\n\tpseudos = \":(\" + identifier + \")(?:\\\\((\" +\n\n\t\t// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:\n\t\t// 1. quoted (capture 3; capture 4 or capture 5)\n\t\t\"('((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|\" +\n\n\t\t// 2. simple (capture 6)\n\t\t\"((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\" + attributes + \")*)|\" +\n\n\t\t// 3. anything else (capture 2)\n\t\t\".*\" +\n\t\t\")\\\\)|)\",\n\n\t// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\n\trwhitespace = new RegExp( whitespace + \"+\", \"g\" ),\n\n\trcomma = new RegExp( \"^\" + whitespace + \"*,\" + whitespace + \"*\" ),\n\trleadingCombinator = new RegExp( \"^\" + whitespace + \"*([>+~]|\" + whitespace + \")\" +\n\t\twhitespace + \"*\" ),\n\trdescend = new RegExp( whitespace + \"|>\" ),\n\n\trpseudo = new RegExp( pseudos ),\n\tridentifier = new RegExp( \"^\" + identifier + \"$\" ),\n\n\tmatchExpr = {\n\t\tID: new RegExp( \"^#(\" + identifier + \")\" ),\n\t\tCLASS: new RegExp( \"^\\\\.(\" + identifier + \")\" ),\n\t\tTAG: new RegExp( \"^(\" + identifier + \"|[*])\" ),\n\t\tATTR: new RegExp( \"^\" + attributes ),\n\t\tPSEUDO: new RegExp( \"^\" + pseudos ),\n\t\tCHILD: new RegExp(\n\t\t\t\"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\" +\n\t\t\t\twhitespace + \"*(even|odd|(([+-]|)(\\\\d*)n|)\" + whitespace + \"*(?:([+-]|)\" +\n\t\t\t\twhitespace + \"*(\\\\d+)|))\" + whitespace + \"*\\\\)|)\", \"i\" ),\n\t\tbool: new RegExp( \"^(?:\" + booleans + \")$\", \"i\" ),\n\n\t\t// For use in libraries implementing .is()\n\t\t// We use this for POS matching in `select`\n\t\tneedsContext: new RegExp( \"^\" + whitespace +\n\t\t\t\"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\" + whitespace +\n\t\t\t\"*((?:-\\\\d)?\\\\d*)\" + whitespace + \"*\\\\)|)(?=[^-]|$)\", \"i\" )\n\t},\n\n\trinputs = /^(?:input|select|textarea|button)$/i,\n\trheader = /^h\\d$/i,\n\n\t// Easily-parseable/retrievable ID or TAG or CLASS selectors\n\trquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\n\n\trsibling = /[+~]/,\n\n\t// CSS escapes\n\t// https://www.w3.org/TR/CSS21/syndata.html#escaped-characters\n\trunescape = new RegExp( \"\\\\\\\\[\\\\da-fA-F]{1,6}\" + whitespace +\n\t\t\"?|\\\\\\\\([^\\\\r\\\\n\\\\f])\", \"g\" ),\n\tfunescape = function( escape, nonHex ) {\n\t\tvar high = \"0x\" + escape.slice( 1 ) - 0x10000;\n\n\t\tif ( nonHex ) {\n\n\t\t\t// Strip the backslash prefix from a non-hex escape sequence\n\t\t\treturn nonHex;\n\t\t}\n\n\t\t// Replace a hexadecimal escape sequence with the encoded Unicode code point\n\t\t// Support: IE <=11+\n\t\t// For values outside the Basic Multilingual Plane (BMP), manually construct a\n\t\t// surrogate pair\n\t\treturn high < 0 ?\n\t\t\tString.fromCharCode( high + 0x10000 ) :\n\t\t\tString.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );\n\t},\n\n\t// Used for iframes; see `setDocument`.\n\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t// Removing the function wrapper causes a \"Permission Denied\"\n\t// error in IE/Edge.\n\tunloadHandler = function() {\n\t\tsetDocument();\n\t},\n\n\tinDisabledFieldset = addCombinator(\n\t\tfunction( elem ) {\n\t\t\treturn elem.disabled === true && nodeName( elem, \"fieldset\" );\n\t\t},\n\t\t{ dir: \"parentNode\", next: \"legend\" }\n\t);\n\n// Support: IE <=9 only\n// Accessing document.activeElement can throw unexpectedly\n// https://bugs.jquery.com/ticket/13393\nfunction safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}\n\n// Optimize for push.apply( _, NodeList )\ntry {\n\tpush.apply(\n\t\t( arr = slice.call( preferredDoc.childNodes ) ),\n\t\tpreferredDoc.childNodes\n\t);\n\n\t// Support: Android <=4.0\n\t// Detect silently failing push.apply\n\t// eslint-disable-next-line no-unused-expressions\n\tarr[ preferredDoc.childNodes.length ].nodeType;\n} catch ( e ) {\n\tpush = {\n\t\tapply: function( target, els ) {\n\t\t\tpushNative.apply( target, slice.call( els ) );\n\t\t},\n\t\tcall: function( target ) {\n\t\t\tpushNative.apply( target, slice.call( arguments, 1 ) );\n\t\t}\n\t};\n}\n\nfunction find( selector, context, results, seed ) {\n\tvar m, i, elem, nid, match, groups, newSelector,\n\t\tnewContext = context && context.ownerDocument,\n\n\t\t// nodeType defaults to 9, since context defaults to document\n\t\tnodeType = context ? context.nodeType : 9;\n\n\tresults = results || [];\n\n\t// Return early from calls with invalid selector or context\n\tif ( typeof selector !== \"string\" || !selector ||\n\t\tnodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {\n\n\t\treturn results;\n\t}\n\n\t// Try to shortcut find operations (as opposed to filters) in HTML documents\n\tif ( !seed ) {\n\t\tsetDocument( context );\n\t\tcontext = context || document;\n\n\t\tif ( documentIsHTML ) {\n\n\t\t\t// If the selector is sufficiently simple, try using a \"get*By*\" DOM method\n\t\t\t// (excepting DocumentFragment context, where the methods don't exist)\n\t\t\tif ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) {\n\n\t\t\t\t// ID selector\n\t\t\t\tif ( ( m = match[ 1 ] ) ) {\n\n\t\t\t\t\t// Document context\n\t\t\t\t\tif ( nodeType === 9 ) {\n\t\t\t\t\t\tif ( ( elem = context.getElementById( m ) ) ) {\n\n\t\t\t\t\t\t\t// Support: IE 9 only\n\t\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\t\tif ( elem.id === m ) {\n\t\t\t\t\t\t\t\tpush.call( results, elem );\n\t\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t// Element context\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// Support: IE 9 only\n\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\tif ( newContext && ( elem = newContext.getElementById( m ) ) &&\n\t\t\t\t\t\t\tfind.contains( context, elem ) &&\n\t\t\t\t\t\t\telem.id === m ) {\n\n\t\t\t\t\t\t\tpush.call( results, elem );\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t// Type selector\n\t\t\t\t} else if ( match[ 2 ] ) {\n\t\t\t\t\tpush.apply( results, context.getElementsByTagName( selector ) );\n\t\t\t\t\treturn results;\n\n\t\t\t\t// Class selector\n\t\t\t\t} else if ( ( m = match[ 3 ] ) && context.getElementsByClassName ) {\n\t\t\t\t\tpush.apply( results, context.getElementsByClassName( m ) );\n\t\t\t\t\treturn results;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Take advantage of querySelectorAll\n\t\t\tif ( !nonnativeSelectorCache[ selector + \" \" ] &&\n\t\t\t\t( !rbuggyQSA || !rbuggyQSA.test( selector ) ) ) {\n\n\t\t\t\tnewSelector = selector;\n\t\t\t\tnewContext = context;\n\n\t\t\t\t// qSA considers elements outside a scoping root when evaluating child or\n\t\t\t\t// descendant combinators, which is not what we want.\n\t\t\t\t// In such cases, we work around the behavior by prefixing every selector in the\n\t\t\t\t// list with an ID selector referencing the scope context.\n\t\t\t\t// The technique has to be used as well when a leading combinator is used\n\t\t\t\t// as such selectors are not recognized by querySelectorAll.\n\t\t\t\t// Thanks to Andrew Dupont for this technique.\n\t\t\t\tif ( nodeType === 1 &&\n\t\t\t\t\t( rdescend.test( selector ) || rleadingCombinator.test( selector ) ) ) {\n\n\t\t\t\t\t// Expand context for sibling selectors\n\t\t\t\t\tnewContext = rsibling.test( selector ) && testContext( context.parentNode ) ||\n\t\t\t\t\t\tcontext;\n\n\t\t\t\t\t// We can use :scope instead of the ID hack if the browser\n\t\t\t\t\t// supports it & if we're not changing the context.\n\t\t\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when\n\t\t\t\t\t// strict-comparing two documents; shallow comparisons work.\n\t\t\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\t\t\tif ( newContext != context || !support.scope ) {\n\n\t\t\t\t\t\t// Capture the context ID, setting it first if necessary\n\t\t\t\t\t\tif ( ( nid = context.getAttribute( \"id\" ) ) ) {\n\t\t\t\t\t\t\tnid = jQuery.escapeSelector( nid );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcontext.setAttribute( \"id\", ( nid = expando ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prefix every selector in the list\n\t\t\t\t\tgroups = tokenize( selector );\n\t\t\t\t\ti = groups.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tgroups[ i ] = ( nid ? \"#\" + nid : \":scope\" ) + \" \" +\n\t\t\t\t\t\t\ttoSelector( groups[ i ] );\n\t\t\t\t\t}\n\t\t\t\t\tnewSelector = groups.join( \",\" );\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tpush.apply( results,\n\t\t\t\t\t\tnewContext.querySelectorAll( newSelector )\n\t\t\t\t\t);\n\t\t\t\t\treturn results;\n\t\t\t\t} catch ( qsaError ) {\n\t\t\t\t\tnonnativeSelectorCache( selector, true );\n\t\t\t\t} finally {\n\t\t\t\t\tif ( nid === expando ) {\n\t\t\t\t\t\tcontext.removeAttribute( \"id\" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// All others\n\treturn select( selector.replace( rtrimCSS, \"$1\" ), context, results, seed );\n}\n\n/**\n * Create key-value caches of limited size\n * @returns {function(string, object)} Returns the Object data after storing it on itself with\n *\tproperty name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)\n *\tdeleting the oldest entry\n */\nfunction createCache() {\n\tvar keys = [];\n\n\tfunction cache( key, value ) {\n\n\t\t// Use (key + \" \") to avoid collision with native prototype properties\n\t\t// (see https://github.com/jquery/sizzle/issues/157)\n\t\tif ( keys.push( key + \" \" ) > Expr.cacheLength ) {\n\n\t\t\t// Only keep the most recent entries\n\t\t\tdelete cache[ keys.shift() ];\n\t\t}\n\t\treturn ( cache[ key + \" \" ] = value );\n\t}\n\treturn cache;\n}\n\n/**\n * Mark a function for special use by jQuery selector module\n * @param {Function} fn The function to mark\n */\nfunction markFunction( fn ) {\n\tfn[ expando ] = true;\n\treturn fn;\n}\n\n/**\n * Support testing using an element\n * @param {Function} fn Passed the created element and returns a boolean result\n */\nfunction assert( fn ) {\n\tvar el = document.createElement( \"fieldset\" );\n\n\ttry {\n\t\treturn !!fn( el );\n\t} catch ( e ) {\n\t\treturn false;\n\t} finally {\n\n\t\t// Remove from its parent by default\n\t\tif ( el.parentNode ) {\n\t\t\tel.parentNode.removeChild( el );\n\t\t}\n\n\t\t// release memory in IE\n\t\tel = null;\n\t}\n}\n\n/**\n * Returns a function to use in pseudos for input types\n * @param {String} type\n */\nfunction createInputPseudo( type ) {\n\treturn function( elem ) {\n\t\treturn nodeName( elem, \"input\" ) && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for buttons\n * @param {String} type\n */\nfunction createButtonPseudo( type ) {\n\treturn function( elem ) {\n\t\treturn ( nodeName( elem, \"input\" ) || nodeName( elem, \"button\" ) ) &&\n\t\t\telem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for :enabled/:disabled\n * @param {Boolean} disabled true for :disabled; false for :enabled\n */\nfunction createDisabledPseudo( disabled ) {\n\n\t// Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable\n\treturn function( elem ) {\n\n\t\t// Only certain elements can match :enabled or :disabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled\n\t\tif ( \"form\" in elem ) {\n\n\t\t\t// Check for inherited disabledness on relevant non-disabled elements:\n\t\t\t// * listed form-associated elements in a disabled fieldset\n\t\t\t//   https://html.spec.whatwg.org/multipage/forms.html#category-listed\n\t\t\t//   https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled\n\t\t\t// * option elements in a disabled optgroup\n\t\t\t//   https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled\n\t\t\t// All such elements have a \"form\" property.\n\t\t\tif ( elem.parentNode && elem.disabled === false ) {\n\n\t\t\t\t// Option elements defer to a parent optgroup if present\n\t\t\t\tif ( \"label\" in elem ) {\n\t\t\t\t\tif ( \"label\" in elem.parentNode ) {\n\t\t\t\t\t\treturn elem.parentNode.disabled === disabled;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn elem.disabled === disabled;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Support: IE 6 - 11+\n\t\t\t\t// Use the isDisabled shortcut property to check for disabled fieldset ancestors\n\t\t\t\treturn elem.isDisabled === disabled ||\n\n\t\t\t\t\t// Where there is no isDisabled, check manually\n\t\t\t\t\telem.isDisabled !== !disabled &&\n\t\t\t\t\t\tinDisabledFieldset( elem ) === disabled;\n\t\t\t}\n\n\t\t\treturn elem.disabled === disabled;\n\n\t\t// Try to winnow out elements that can't be disabled before trusting the disabled property.\n\t\t// Some victims get caught in our net (label, legend, menu, track), but it shouldn't\n\t\t// even exist on them, let alone have a boolean value.\n\t\t} else if ( \"label\" in elem ) {\n\t\t\treturn elem.disabled === disabled;\n\t\t}\n\n\t\t// Remaining elements are neither :enabled nor :disabled\n\t\treturn false;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for positionals\n * @param {Function} fn\n */\nfunction createPositionalPseudo( fn ) {\n\treturn markFunction( function( argument ) {\n\t\targument = +argument;\n\t\treturn markFunction( function( seed, matches ) {\n\t\t\tvar j,\n\t\t\t\tmatchIndexes = fn( [], seed.length, argument ),\n\t\t\t\ti = matchIndexes.length;\n\n\t\t\t// Match elements found at the specified indexes\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( seed[ ( j = matchIndexes[ i ] ) ] ) {\n\t\t\t\t\tseed[ j ] = !( matches[ j ] = seed[ j ] );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t} );\n}\n\n/**\n * Checks a node for validity as a jQuery selector context\n * @param {Element|Object=} context\n * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value\n */\nfunction testContext( context ) {\n\treturn context && typeof context.getElementsByTagName !== \"undefined\" && context;\n}\n\n/**\n * Sets document-related variables once based on the current document\n * @param {Element|Object} [node] An element or document object to use to set the document\n * @returns {Object} Returns the current document\n */\nfunction setDocument( node ) {\n\tvar subWindow,\n\t\tdoc = node ? node.ownerDocument || node : preferredDoc;\n\n\t// Return early if doc is invalid or already selected\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) {\n\t\treturn document;\n\t}\n\n\t// Update global variables\n\tdocument = doc;\n\tdocumentElement = document.documentElement;\n\tdocumentIsHTML = !jQuery.isXMLDoc( document );\n\n\t// Support: iOS 7 only, IE 9 - 11+\n\t// Older browsers didn't support unprefixed `matches`.\n\tmatches = documentElement.matches ||\n\t\tdocumentElement.webkitMatchesSelector ||\n\t\tdocumentElement.msMatchesSelector;\n\n\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t// Accessing iframe documents after unload throws \"permission denied\" errors\n\t// (see trac-13936).\n\t// Limit the fix to IE & Edge Legacy; despite Edge 15+ implementing `matches`,\n\t// all IE 9+ and Edge Legacy versions implement `msMatchesSelector` as well.\n\tif ( documentElement.msMatchesSelector &&\n\n\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t// two documents; shallow comparisons work.\n\t\t// eslint-disable-next-line eqeqeq\n\t\tpreferredDoc != document &&\n\t\t( subWindow = document.defaultView ) && subWindow.top !== subWindow ) {\n\n\t\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t\tsubWindow.addEventListener( \"unload\", unloadHandler );\n\t}\n\n\t// Support: IE <10\n\t// Check if getElementById returns elements by name\n\t// The broken getElementById methods don't pick up programmatically-set names,\n\t// so use a roundabout getElementsByName test\n\tsupport.getById = assert( function( el ) {\n\t\tdocumentElement.appendChild( el ).id = jQuery.expando;\n\t\treturn !document.getElementsByName ||\n\t\t\t!document.getElementsByName( jQuery.expando ).length;\n\t} );\n\n\t// Support: IE 9 only\n\t// Check to see if it's possible to do matchesSelector\n\t// on a disconnected node.\n\tsupport.disconnectedMatch = assert( function( el ) {\n\t\treturn matches.call( el, \"*\" );\n\t} );\n\n\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t// IE/Edge don't support the :scope pseudo-class.\n\tsupport.scope = assert( function() {\n\t\treturn document.querySelectorAll( \":scope\" );\n\t} );\n\n\t// Support: Chrome 105 - 111 only, Safari 15.4 - 16.3 only\n\t// Make sure the `:has()` argument is parsed unforgivingly.\n\t// We include `*` in the test to detect buggy implementations that are\n\t// _selectively_ forgiving (specifically when the list includes at least\n\t// one valid selector).\n\t// Note that we treat complete lack of support for `:has()` as if it were\n\t// spec-compliant support, which is fine because use of `:has()` in such\n\t// environments will fail in the qSA path and fall back to jQuery traversal\n\t// anyway.\n\tsupport.cssHas = assert( function() {\n\t\ttry {\n\t\t\tdocument.querySelector( \":has(*,:jqfake)\" );\n\t\t\treturn false;\n\t\t} catch ( e ) {\n\t\t\treturn true;\n\t\t}\n\t} );\n\n\t// ID filter and find\n\tif ( support.getById ) {\n\t\tExpr.filter.ID = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn elem.getAttribute( \"id\" ) === attrId;\n\t\t\t};\n\t\t};\n\t\tExpr.find.ID = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar elem = context.getElementById( id );\n\t\t\t\treturn elem ? [ elem ] : [];\n\t\t\t}\n\t\t};\n\t} else {\n\t\tExpr.filter.ID =  function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\tvar node = typeof elem.getAttributeNode !== \"undefined\" &&\n\t\t\t\t\telem.getAttributeNode( \"id\" );\n\t\t\t\treturn node && node.value === attrId;\n\t\t\t};\n\t\t};\n\n\t\t// Support: IE 6 - 7 only\n\t\t// getElementById is not reliable as a find shortcut\n\t\tExpr.find.ID = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar node, i, elems,\n\t\t\t\t\telem = context.getElementById( id );\n\n\t\t\t\tif ( elem ) {\n\n\t\t\t\t\t// Verify the id attribute\n\t\t\t\t\tnode = elem.getAttributeNode( \"id\" );\n\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t}\n\n\t\t\t\t\t// Fall back on getElementsByName\n\t\t\t\t\telems = context.getElementsByName( id );\n\t\t\t\t\ti = 0;\n\t\t\t\t\twhile ( ( elem = elems[ i++ ] ) ) {\n\t\t\t\t\t\tnode = elem.getAttributeNode( \"id\" );\n\t\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn [];\n\t\t\t}\n\t\t};\n\t}\n\n\t// Tag\n\tExpr.find.TAG = function( tag, context ) {\n\t\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\t\treturn context.getElementsByTagName( tag );\n\n\t\t// DocumentFragment nodes don't have gEBTN\n\t\t} else {\n\t\t\treturn context.querySelectorAll( tag );\n\t\t}\n\t};\n\n\t// Class\n\tExpr.find.CLASS = function( className, context ) {\n\t\tif ( typeof context.getElementsByClassName !== \"undefined\" && documentIsHTML ) {\n\t\t\treturn context.getElementsByClassName( className );\n\t\t}\n\t};\n\n\t/* QSA/matchesSelector\n\t---------------------------------------------------------------------- */\n\n\t// QSA and matchesSelector support\n\n\trbuggyQSA = [];\n\n\t// Build QSA regex\n\t// Regex strategy adopted from Diego Perini\n\tassert( function( el ) {\n\n\t\tvar input;\n\n\t\tdocumentElement.appendChild( el ).innerHTML =\n\t\t\t\"<a id='\" + expando + \"' href='' disabled='disabled'></a>\" +\n\t\t\t\"<select id='\" + expando + \"-\\r\\\\' disabled='disabled'>\" +\n\t\t\t\"<option selected=''></option></select>\";\n\n\t\t// Support: iOS <=7 - 8 only\n\t\t// Boolean attributes and \"value\" are not treated correctly in some XML documents\n\t\tif ( !el.querySelectorAll( \"[selected]\" ).length ) {\n\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*(?:value|\" + booleans + \")\" );\n\t\t}\n\n\t\t// Support: iOS <=7 - 8 only\n\t\tif ( !el.querySelectorAll( \"[id~=\" + expando + \"-]\" ).length ) {\n\t\t\trbuggyQSA.push( \"~=\" );\n\t\t}\n\n\t\t// Support: iOS 8 only\n\t\t// https://bugs.webkit.org/show_bug.cgi?id=136851\n\t\t// In-page `selector#id sibling-combinator selector` fails\n\t\tif ( !el.querySelectorAll( \"a#\" + expando + \"+*\" ).length ) {\n\t\t\trbuggyQSA.push( \".#.+[+~]\" );\n\t\t}\n\n\t\t// Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+\n\t\t// In some of the document kinds, these selectors wouldn't work natively.\n\t\t// This is probably OK but for backwards compatibility we want to maintain\n\t\t// handling them through jQuery traversal in jQuery 3.x.\n\t\tif ( !el.querySelectorAll( \":checked\" ).length ) {\n\t\t\trbuggyQSA.push( \":checked\" );\n\t\t}\n\n\t\t// Support: Windows 8 Native Apps\n\t\t// The type and name attributes are restricted during .innerHTML assignment\n\t\tinput = document.createElement( \"input\" );\n\t\tinput.setAttribute( \"type\", \"hidden\" );\n\t\tel.appendChild( input ).setAttribute( \"name\", \"D\" );\n\n\t\t// Support: IE 9 - 11+\n\t\t// IE's :disabled selector does not pick up the children of disabled fieldsets\n\t\t// Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+\n\t\t// In some of the document kinds, these selectors wouldn't work natively.\n\t\t// This is probably OK but for backwards compatibility we want to maintain\n\t\t// handling them through jQuery traversal in jQuery 3.x.\n\t\tdocumentElement.appendChild( el ).disabled = true;\n\t\tif ( el.querySelectorAll( \":disabled\" ).length !== 2 ) {\n\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t}\n\n\t\t// Support: IE 11+, Edge 15 - 18+\n\t\t// IE 11/Edge don't find elements on a `[name='']` query in some cases.\n\t\t// Adding a temporary attribute to the document before the selection works\n\t\t// around the issue.\n\t\t// Interestingly, IE 10 & older don't seem to have the issue.\n\t\tinput = document.createElement( \"input\" );\n\t\tinput.setAttribute( \"name\", \"\" );\n\t\tel.appendChild( input );\n\t\tif ( !el.querySelectorAll( \"[name='']\" ).length ) {\n\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*name\" + whitespace + \"*=\" +\n\t\t\t\twhitespace + \"*(?:''|\\\"\\\")\" );\n\t\t}\n\t} );\n\n\tif ( !support.cssHas ) {\n\n\t\t// Support: Chrome 105 - 110+, Safari 15.4 - 16.3+\n\t\t// Our regular `try-catch` mechanism fails to detect natively-unsupported\n\t\t// pseudo-classes inside `:has()` (such as `:has(:contains(\"Foo\"))`)\n\t\t// in browsers that parse the `:has()` argument as a forgiving selector list.\n\t\t// https://drafts.csswg.org/selectors/#relational now requires the argument\n\t\t// to be parsed unforgivingly, but browsers have not yet fully adjusted.\n\t\trbuggyQSA.push( \":has\" );\n\t}\n\n\trbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( \"|\" ) );\n\n\t/* Sorting\n\t---------------------------------------------------------------------- */\n\n\t// Document order sorting\n\tsortOrder = function( a, b ) {\n\n\t\t// Flag for duplicate removal\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\t// Sort on method existence if only one input has compareDocumentPosition\n\t\tvar compare = !a.compareDocumentPosition - !b.compareDocumentPosition;\n\t\tif ( compare ) {\n\t\t\treturn compare;\n\t\t}\n\n\t\t// Calculate position if both inputs belong to the same document\n\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t// two documents; shallow comparisons work.\n\t\t// eslint-disable-next-line eqeqeq\n\t\tcompare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ?\n\t\t\ta.compareDocumentPosition( b ) :\n\n\t\t\t// Otherwise we know they are disconnected\n\t\t\t1;\n\n\t\t// Disconnected nodes\n\t\tif ( compare & 1 ||\n\t\t\t( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) {\n\n\t\t\t// Choose the first element that is related to our preferred document\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\tif ( a === document || a.ownerDocument == preferredDoc &&\n\t\t\t\tfind.contains( preferredDoc, a ) ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\tif ( b === document || b.ownerDocument == preferredDoc &&\n\t\t\t\tfind.contains( preferredDoc, b ) ) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\t// Maintain original order\n\t\t\treturn sortInput ?\n\t\t\t\t( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :\n\t\t\t\t0;\n\t\t}\n\n\t\treturn compare & 4 ? -1 : 1;\n\t};\n\n\treturn document;\n}\n\nfind.matches = function( expr, elements ) {\n\treturn find( expr, null, null, elements );\n};\n\nfind.matchesSelector = function( elem, expr ) {\n\tsetDocument( elem );\n\n\tif ( documentIsHTML &&\n\t\t!nonnativeSelectorCache[ expr + \" \" ] &&\n\t\t( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {\n\n\t\ttry {\n\t\t\tvar ret = matches.call( elem, expr );\n\n\t\t\t// IE 9's matchesSelector returns false on disconnected nodes\n\t\t\tif ( ret || support.disconnectedMatch ||\n\n\t\t\t\t\t// As well, disconnected nodes are said to be in a document\n\t\t\t\t\t// fragment in IE 9\n\t\t\t\t\telem.document && elem.document.nodeType !== 11 ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\t\t} catch ( e ) {\n\t\t\tnonnativeSelectorCache( expr, true );\n\t\t}\n\t}\n\n\treturn find( expr, document, null, [ elem ] ).length > 0;\n};\n\nfind.contains = function( context, elem ) {\n\n\t// Set document vars if needed\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( ( context.ownerDocument || context ) != document ) {\n\t\tsetDocument( context );\n\t}\n\treturn jQuery.contains( context, elem );\n};\n\n\nfind.attr = function( elem, name ) {\n\n\t// Set document vars if needed\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( ( elem.ownerDocument || elem ) != document ) {\n\t\tsetDocument( elem );\n\t}\n\n\tvar fn = Expr.attrHandle[ name.toLowerCase() ],\n\n\t\t// Don't get fooled by Object.prototype properties (see trac-13807)\n\t\tval = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?\n\t\t\tfn( elem, name, !documentIsHTML ) :\n\t\t\tundefined;\n\n\tif ( val !== undefined ) {\n\t\treturn val;\n\t}\n\n\treturn elem.getAttribute( name );\n};\n\nfind.error = function( msg ) {\n\tthrow new Error( \"Syntax error, unrecognized expression: \" + msg );\n};\n\n/**\n * Document sorting and removing duplicates\n * @param {ArrayLike} results\n */\njQuery.uniqueSort = function( results ) {\n\tvar elem,\n\t\tduplicates = [],\n\t\tj = 0,\n\t\ti = 0;\n\n\t// Unless we *know* we can detect duplicates, assume their presence\n\t//\n\t// Support: Android <=4.0+\n\t// Testing for detecting duplicates is unpredictable so instead assume we can't\n\t// depend on duplicate detection in all browsers without a stable sort.\n\thasDuplicate = !support.sortStable;\n\tsortInput = !support.sortStable && slice.call( results, 0 );\n\tsort.call( results, sortOrder );\n\n\tif ( hasDuplicate ) {\n\t\twhile ( ( elem = results[ i++ ] ) ) {\n\t\t\tif ( elem === results[ i ] ) {\n\t\t\t\tj = duplicates.push( i );\n\t\t\t}\n\t\t}\n\t\twhile ( j-- ) {\n\t\t\tsplice.call( results, duplicates[ j ], 1 );\n\t\t}\n\t}\n\n\t// Clear input after sorting to release objects\n\t// See https://github.com/jquery/sizzle/pull/225\n\tsortInput = null;\n\n\treturn results;\n};\n\njQuery.fn.uniqueSort = function() {\n\treturn this.pushStack( jQuery.uniqueSort( slice.apply( this ) ) );\n};\n\nExpr = jQuery.expr = {\n\n\t// Can be adjusted by the user\n\tcacheLength: 50,\n\n\tcreatePseudo: markFunction,\n\n\tmatch: matchExpr,\n\n\tattrHandle: {},\n\n\tfind: {},\n\n\trelative: {\n\t\t\">\": { dir: \"parentNode\", first: true },\n\t\t\" \": { dir: \"parentNode\" },\n\t\t\"+\": { dir: \"previousSibling\", first: true },\n\t\t\"~\": { dir: \"previousSibling\" }\n\t},\n\n\tpreFilter: {\n\t\tATTR: function( match ) {\n\t\t\tmatch[ 1 ] = match[ 1 ].replace( runescape, funescape );\n\n\t\t\t// Move the given value to match[3] whether quoted or unquoted\n\t\t\tmatch[ 3 ] = ( match[ 3 ] || match[ 4 ] || match[ 5 ] || \"\" )\n\t\t\t\t.replace( runescape, funescape );\n\n\t\t\tif ( match[ 2 ] === \"~=\" ) {\n\t\t\t\tmatch[ 3 ] = \" \" + match[ 3 ] + \" \";\n\t\t\t}\n\n\t\t\treturn match.slice( 0, 4 );\n\t\t},\n\n\t\tCHILD: function( match ) {\n\n\t\t\t/* matches from matchExpr[\"CHILD\"]\n\t\t\t\t1 type (only|nth|...)\n\t\t\t\t2 what (child|of-type)\n\t\t\t\t3 argument (even|odd|\\d*|\\d*n([+-]\\d+)?|...)\n\t\t\t\t4 xn-component of xn+y argument ([+-]?\\d*n|)\n\t\t\t\t5 sign of xn-component\n\t\t\t\t6 x of xn-component\n\t\t\t\t7 sign of y-component\n\t\t\t\t8 y of y-component\n\t\t\t*/\n\t\t\tmatch[ 1 ] = match[ 1 ].toLowerCase();\n\n\t\t\tif ( match[ 1 ].slice( 0, 3 ) === \"nth\" ) {\n\n\t\t\t\t// nth-* requires argument\n\t\t\t\tif ( !match[ 3 ] ) {\n\t\t\t\t\tfind.error( match[ 0 ] );\n\t\t\t\t}\n\n\t\t\t\t// numeric x and y parameters for Expr.filter.CHILD\n\t\t\t\t// remember that false/true cast respectively to 0/1\n\t\t\t\tmatch[ 4 ] = +( match[ 4 ] ?\n\t\t\t\t\tmatch[ 5 ] + ( match[ 6 ] || 1 ) :\n\t\t\t\t\t2 * ( match[ 3 ] === \"even\" || match[ 3 ] === \"odd\" )\n\t\t\t\t);\n\t\t\t\tmatch[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === \"odd\" );\n\n\t\t\t// other types prohibit arguments\n\t\t\t} else if ( match[ 3 ] ) {\n\t\t\t\tfind.error( match[ 0 ] );\n\t\t\t}\n\n\t\t\treturn match;\n\t\t},\n\n\t\tPSEUDO: function( match ) {\n\t\t\tvar excess,\n\t\t\t\tunquoted = !match[ 6 ] && match[ 2 ];\n\n\t\t\tif ( matchExpr.CHILD.test( match[ 0 ] ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// Accept quoted arguments as-is\n\t\t\tif ( match[ 3 ] ) {\n\t\t\t\tmatch[ 2 ] = match[ 4 ] || match[ 5 ] || \"\";\n\n\t\t\t// Strip excess characters from unquoted arguments\n\t\t\t} else if ( unquoted && rpseudo.test( unquoted ) &&\n\n\t\t\t\t// Get excess from tokenize (recursively)\n\t\t\t\t( excess = tokenize( unquoted, true ) ) &&\n\n\t\t\t\t// advance to the next closing parenthesis\n\t\t\t\t( excess = unquoted.indexOf( \")\", unquoted.length - excess ) - unquoted.length ) ) {\n\n\t\t\t\t// excess is a negative index\n\t\t\t\tmatch[ 0 ] = match[ 0 ].slice( 0, excess );\n\t\t\t\tmatch[ 2 ] = unquoted.slice( 0, excess );\n\t\t\t}\n\n\t\t\t// Return only captures needed by the pseudo filter method (type and argument)\n\t\t\treturn match.slice( 0, 3 );\n\t\t}\n\t},\n\n\tfilter: {\n\n\t\tTAG: function( nodeNameSelector ) {\n\t\t\tvar expectedNodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn nodeNameSelector === \"*\" ?\n\t\t\t\tfunction() {\n\t\t\t\t\treturn true;\n\t\t\t\t} :\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn nodeName( elem, expectedNodeName );\n\t\t\t\t};\n\t\t},\n\n\t\tCLASS: function( className ) {\n\t\t\tvar pattern = classCache[ className + \" \" ];\n\n\t\t\treturn pattern ||\n\t\t\t\t( pattern = new RegExp( \"(^|\" + whitespace + \")\" + className +\n\t\t\t\t\t\"(\" + whitespace + \"|$)\" ) ) &&\n\t\t\t\tclassCache( className, function( elem ) {\n\t\t\t\t\treturn pattern.test(\n\t\t\t\t\t\ttypeof elem.className === \"string\" && elem.className ||\n\t\t\t\t\t\t\ttypeof elem.getAttribute !== \"undefined\" &&\n\t\t\t\t\t\t\t\telem.getAttribute( \"class\" ) ||\n\t\t\t\t\t\t\t\"\"\n\t\t\t\t\t);\n\t\t\t\t} );\n\t\t},\n\n\t\tATTR: function( name, operator, check ) {\n\t\t\treturn function( elem ) {\n\t\t\t\tvar result = find.attr( elem, name );\n\n\t\t\t\tif ( result == null ) {\n\t\t\t\t\treturn operator === \"!=\";\n\t\t\t\t}\n\t\t\t\tif ( !operator ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tresult += \"\";\n\n\t\t\t\tif ( operator === \"=\" ) {\n\t\t\t\t\treturn result === check;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"!=\" ) {\n\t\t\t\t\treturn result !== check;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"^=\" ) {\n\t\t\t\t\treturn check && result.indexOf( check ) === 0;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"*=\" ) {\n\t\t\t\t\treturn check && result.indexOf( check ) > -1;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"$=\" ) {\n\t\t\t\t\treturn check && result.slice( -check.length ) === check;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"~=\" ) {\n\t\t\t\t\treturn ( \" \" + result.replace( rwhitespace, \" \" ) + \" \" )\n\t\t\t\t\t\t.indexOf( check ) > -1;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"|=\" ) {\n\t\t\t\t\treturn result === check || result.slice( 0, check.length + 1 ) === check + \"-\";\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t};\n\t\t},\n\n\t\tCHILD: function( type, what, _argument, first, last ) {\n\t\t\tvar simple = type.slice( 0, 3 ) !== \"nth\",\n\t\t\t\tforward = type.slice( -4 ) !== \"last\",\n\t\t\t\tofType = what === \"of-type\";\n\n\t\t\treturn first === 1 && last === 0 ?\n\n\t\t\t\t// Shortcut for :nth-*(n)\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn !!elem.parentNode;\n\t\t\t\t} :\n\n\t\t\t\tfunction( elem, _context, xml ) {\n\t\t\t\t\tvar cache, outerCache, node, nodeIndex, start,\n\t\t\t\t\t\tdir = simple !== forward ? \"nextSibling\" : \"previousSibling\",\n\t\t\t\t\t\tparent = elem.parentNode,\n\t\t\t\t\t\tname = ofType && elem.nodeName.toLowerCase(),\n\t\t\t\t\t\tuseCache = !xml && !ofType,\n\t\t\t\t\t\tdiff = false;\n\n\t\t\t\t\tif ( parent ) {\n\n\t\t\t\t\t\t// :(first|last|only)-(child|of-type)\n\t\t\t\t\t\tif ( simple ) {\n\t\t\t\t\t\t\twhile ( dir ) {\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\twhile ( ( node = node[ dir ] ) ) {\n\t\t\t\t\t\t\t\t\tif ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnodeName( node, name ) :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) {\n\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Reverse direction for :only-* (if we haven't yet done so)\n\t\t\t\t\t\t\t\tstart = dir = type === \"only\" && !start && \"nextSibling\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tstart = [ forward ? parent.firstChild : parent.lastChild ];\n\n\t\t\t\t\t\t// non-xml :nth-child(...) stores cache data on `parent`\n\t\t\t\t\t\tif ( forward && useCache ) {\n\n\t\t\t\t\t\t\t// Seek `elem` from a previously-cached index\n\t\t\t\t\t\t\touterCache = parent[ expando ] || ( parent[ expando ] = {} );\n\t\t\t\t\t\t\tcache = outerCache[ type ] || [];\n\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\tdiff = nodeIndex && cache[ 2 ];\n\t\t\t\t\t\t\tnode = nodeIndex && parent.childNodes[ nodeIndex ];\n\n\t\t\t\t\t\t\twhile ( ( node = ++nodeIndex && node && node[ dir ] ||\n\n\t\t\t\t\t\t\t\t// Fallback to seeking `elem` from the start\n\t\t\t\t\t\t\t\t( diff = nodeIndex = 0 ) || start.pop() ) ) {\n\n\t\t\t\t\t\t\t\t// When found, cache indexes on `parent` and break\n\t\t\t\t\t\t\t\tif ( node.nodeType === 1 && ++diff && node === elem ) {\n\t\t\t\t\t\t\t\t\touterCache[ type ] = [ dirruns, nodeIndex, diff ];\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Use previously-cached element index if available\n\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\touterCache = elem[ expando ] || ( elem[ expando ] = {} );\n\t\t\t\t\t\t\t\tcache = outerCache[ type ] || [];\n\t\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\t\tdiff = nodeIndex;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// xml :nth-child(...)\n\t\t\t\t\t\t\t// or :nth-last-child(...) or :nth(-last)?-of-type(...)\n\t\t\t\t\t\t\tif ( diff === false ) {\n\n\t\t\t\t\t\t\t\t// Use the same loop as above to seek `elem` from the start\n\t\t\t\t\t\t\t\twhile ( ( node = ++nodeIndex && node && node[ dir ] ||\n\t\t\t\t\t\t\t\t\t( diff = nodeIndex = 0 ) || start.pop() ) ) {\n\n\t\t\t\t\t\t\t\t\tif ( ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnodeName( node, name ) :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) &&\n\t\t\t\t\t\t\t\t\t\t++diff ) {\n\n\t\t\t\t\t\t\t\t\t\t// Cache the index of each encountered element\n\t\t\t\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\t\t\t\touterCache = node[ expando ] ||\n\t\t\t\t\t\t\t\t\t\t\t\t( node[ expando ] = {} );\n\t\t\t\t\t\t\t\t\t\t\touterCache[ type ] = [ dirruns, diff ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tif ( node === elem ) {\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Incorporate the offset, then check against cycle size\n\t\t\t\t\t\tdiff -= last;\n\t\t\t\t\t\treturn diff === first || ( diff % first === 0 && diff / first >= 0 );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t},\n\n\t\tPSEUDO: function( pseudo, argument ) {\n\n\t\t\t// pseudo-class names are case-insensitive\n\t\t\t// https://www.w3.org/TR/selectors/#pseudo-classes\n\t\t\t// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters\n\t\t\t// Remember that setFilters inherits from pseudos\n\t\t\tvar args,\n\t\t\t\tfn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||\n\t\t\t\t\tfind.error( \"unsupported pseudo: \" + pseudo );\n\n\t\t\t// The user may use createPseudo to indicate that\n\t\t\t// arguments are needed to create the filter function\n\t\t\t// just as jQuery does\n\t\t\tif ( fn[ expando ] ) {\n\t\t\t\treturn fn( argument );\n\t\t\t}\n\n\t\t\t// But maintain support for old signatures\n\t\t\tif ( fn.length > 1 ) {\n\t\t\t\targs = [ pseudo, pseudo, \"\", argument ];\n\t\t\t\treturn Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?\n\t\t\t\t\tmarkFunction( function( seed, matches ) {\n\t\t\t\t\t\tvar idx,\n\t\t\t\t\t\t\tmatched = fn( seed, argument ),\n\t\t\t\t\t\t\ti = matched.length;\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tidx = indexOf.call( seed, matched[ i ] );\n\t\t\t\t\t\t\tseed[ idx ] = !( matches[ idx ] = matched[ i ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t} ) :\n\t\t\t\t\tfunction( elem ) {\n\t\t\t\t\t\treturn fn( elem, 0, args );\n\t\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn fn;\n\t\t}\n\t},\n\n\tpseudos: {\n\n\t\t// Potentially complex pseudos\n\t\tnot: markFunction( function( selector ) {\n\n\t\t\t// Trim the selector passed to compile\n\t\t\t// to avoid treating leading and trailing\n\t\t\t// spaces as combinators\n\t\t\tvar input = [],\n\t\t\t\tresults = [],\n\t\t\t\tmatcher = compile( selector.replace( rtrimCSS, \"$1\" ) );\n\n\t\t\treturn matcher[ expando ] ?\n\t\t\t\tmarkFunction( function( seed, matches, _context, xml ) {\n\t\t\t\t\tvar elem,\n\t\t\t\t\t\tunmatched = matcher( seed, null, xml, [] ),\n\t\t\t\t\t\ti = seed.length;\n\n\t\t\t\t\t// Match elements unmatched by `matcher`\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( ( elem = unmatched[ i ] ) ) {\n\t\t\t\t\t\t\tseed[ i ] = !( matches[ i ] = elem );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} ) :\n\t\t\t\tfunction( elem, _context, xml ) {\n\t\t\t\t\tinput[ 0 ] = elem;\n\t\t\t\t\tmatcher( input, null, xml, results );\n\n\t\t\t\t\t// Don't keep the element\n\t\t\t\t\t// (see https://github.com/jquery/sizzle/issues/299)\n\t\t\t\t\tinput[ 0 ] = null;\n\t\t\t\t\treturn !results.pop();\n\t\t\t\t};\n\t\t} ),\n\n\t\thas: markFunction( function( selector ) {\n\t\t\treturn function( elem ) {\n\t\t\t\treturn find( selector, elem ).length > 0;\n\t\t\t};\n\t\t} ),\n\n\t\tcontains: markFunction( function( text ) {\n\t\t\ttext = text.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn ( elem.textContent || jQuery.text( elem ) ).indexOf( text ) > -1;\n\t\t\t};\n\t\t} ),\n\n\t\t// \"Whether an element is represented by a :lang() selector\n\t\t// is based solely on the element's language value\n\t\t// being equal to the identifier C,\n\t\t// or beginning with the identifier C immediately followed by \"-\".\n\t\t// The matching of C against the element's language value is performed case-insensitively.\n\t\t// The identifier C does not have to be a valid language name.\"\n\t\t// https://www.w3.org/TR/selectors/#lang-pseudo\n\t\tlang: markFunction( function( lang ) {\n\n\t\t\t// lang value must be a valid identifier\n\t\t\tif ( !ridentifier.test( lang || \"\" ) ) {\n\t\t\t\tfind.error( \"unsupported lang: \" + lang );\n\t\t\t}\n\t\t\tlang = lang.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn function( elem ) {\n\t\t\t\tvar elemLang;\n\t\t\t\tdo {\n\t\t\t\t\tif ( ( elemLang = documentIsHTML ?\n\t\t\t\t\t\telem.lang :\n\t\t\t\t\t\telem.getAttribute( \"xml:lang\" ) || elem.getAttribute( \"lang\" ) ) ) {\n\n\t\t\t\t\t\telemLang = elemLang.toLowerCase();\n\t\t\t\t\t\treturn elemLang === lang || elemLang.indexOf( lang + \"-\" ) === 0;\n\t\t\t\t\t}\n\t\t\t\t} while ( ( elem = elem.parentNode ) && elem.nodeType === 1 );\n\t\t\t\treturn false;\n\t\t\t};\n\t\t} ),\n\n\t\t// Miscellaneous\n\t\ttarget: function( elem ) {\n\t\t\tvar hash = window.location && window.location.hash;\n\t\t\treturn hash && hash.slice( 1 ) === elem.id;\n\t\t},\n\n\t\troot: function( elem ) {\n\t\t\treturn elem === documentElement;\n\t\t},\n\n\t\tfocus: function( elem ) {\n\t\t\treturn elem === safeActiveElement() &&\n\t\t\t\tdocument.hasFocus() &&\n\t\t\t\t!!( elem.type || elem.href || ~elem.tabIndex );\n\t\t},\n\n\t\t// Boolean properties\n\t\tenabled: createDisabledPseudo( false ),\n\t\tdisabled: createDisabledPseudo( true ),\n\n\t\tchecked: function( elem ) {\n\n\t\t\t// In CSS3, :checked should return both checked and selected elements\n\t\t\t// https://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\treturn ( nodeName( elem, \"input\" ) && !!elem.checked ) ||\n\t\t\t\t( nodeName( elem, \"option\" ) && !!elem.selected );\n\t\t},\n\n\t\tselected: function( elem ) {\n\n\t\t\t// Support: IE <=11+\n\t\t\t// Accessing the selectedIndex property\n\t\t\t// forces the browser to treat the default option as\n\t\t\t// selected when in an optgroup.\n\t\t\tif ( elem.parentNode ) {\n\t\t\t\t// eslint-disable-next-line no-unused-expressions\n\t\t\t\telem.parentNode.selectedIndex;\n\t\t\t}\n\n\t\t\treturn elem.selected === true;\n\t\t},\n\n\t\t// Contents\n\t\tempty: function( elem ) {\n\n\t\t\t// https://www.w3.org/TR/selectors/#empty-pseudo\n\t\t\t// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),\n\t\t\t//   but not by others (comment: 8; processing instruction: 7; etc.)\n\t\t\t// nodeType < 6 works because attributes (2) do not appear as children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tif ( elem.nodeType < 6 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\n\t\tparent: function( elem ) {\n\t\t\treturn !Expr.pseudos.empty( elem );\n\t\t},\n\n\t\t// Element/input types\n\t\theader: function( elem ) {\n\t\t\treturn rheader.test( elem.nodeName );\n\t\t},\n\n\t\tinput: function( elem ) {\n\t\t\treturn rinputs.test( elem.nodeName );\n\t\t},\n\n\t\tbutton: function( elem ) {\n\t\t\treturn nodeName( elem, \"input\" ) && elem.type === \"button\" ||\n\t\t\t\tnodeName( elem, \"button\" );\n\t\t},\n\n\t\ttext: function( elem ) {\n\t\t\tvar attr;\n\t\t\treturn nodeName( elem, \"input\" ) && elem.type === \"text\" &&\n\n\t\t\t\t// Support: IE <10 only\n\t\t\t\t// New HTML5 attribute values (e.g., \"search\") appear\n\t\t\t\t// with elem.type === \"text\"\n\t\t\t\t( ( attr = elem.getAttribute( \"type\" ) ) == null ||\n\t\t\t\t\tattr.toLowerCase() === \"text\" );\n\t\t},\n\n\t\t// Position-in-collection\n\t\tfirst: createPositionalPseudo( function() {\n\t\t\treturn [ 0 ];\n\t\t} ),\n\n\t\tlast: createPositionalPseudo( function( _matchIndexes, length ) {\n\t\t\treturn [ length - 1 ];\n\t\t} ),\n\n\t\teq: createPositionalPseudo( function( _matchIndexes, length, argument ) {\n\t\t\treturn [ argument < 0 ? argument + length : argument ];\n\t\t} ),\n\n\t\teven: createPositionalPseudo( function( matchIndexes, length ) {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\todd: createPositionalPseudo( function( matchIndexes, length ) {\n\t\t\tvar i = 1;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\tlt: createPositionalPseudo( function( matchIndexes, length, argument ) {\n\t\t\tvar i;\n\n\t\t\tif ( argument < 0 ) {\n\t\t\t\ti = argument + length;\n\t\t\t} else if ( argument > length ) {\n\t\t\t\ti = length;\n\t\t\t} else {\n\t\t\t\ti = argument;\n\t\t\t}\n\n\t\t\tfor ( ; --i >= 0; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\tgt: createPositionalPseudo( function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; ++i < length; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} )\n\t}\n};\n\nExpr.pseudos.nth = Expr.pseudos.eq;\n\n// Add button/input type pseudos\nfor ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {\n\tExpr.pseudos[ i ] = createInputPseudo( i );\n}\nfor ( i in { submit: true, reset: true } ) {\n\tExpr.pseudos[ i ] = createButtonPseudo( i );\n}\n\n// Easy API for creating new setFilters\nfunction setFilters() {}\nsetFilters.prototype = Expr.filters = Expr.pseudos;\nExpr.setFilters = new setFilters();\n\nfunction tokenize( selector, parseOnly ) {\n\tvar matched, match, tokens, type,\n\t\tsoFar, groups, preFilters,\n\t\tcached = tokenCache[ selector + \" \" ];\n\n\tif ( cached ) {\n\t\treturn parseOnly ? 0 : cached.slice( 0 );\n\t}\n\n\tsoFar = selector;\n\tgroups = [];\n\tpreFilters = Expr.preFilter;\n\n\twhile ( soFar ) {\n\n\t\t// Comma and first run\n\t\tif ( !matched || ( match = rcomma.exec( soFar ) ) ) {\n\t\t\tif ( match ) {\n\n\t\t\t\t// Don't consume trailing commas as valid\n\t\t\t\tsoFar = soFar.slice( match[ 0 ].length ) || soFar;\n\t\t\t}\n\t\t\tgroups.push( ( tokens = [] ) );\n\t\t}\n\n\t\tmatched = false;\n\n\t\t// Combinators\n\t\tif ( ( match = rleadingCombinator.exec( soFar ) ) ) {\n\t\t\tmatched = match.shift();\n\t\t\ttokens.push( {\n\t\t\t\tvalue: matched,\n\n\t\t\t\t// Cast descendant combinators to space\n\t\t\t\ttype: match[ 0 ].replace( rtrimCSS, \" \" )\n\t\t\t} );\n\t\t\tsoFar = soFar.slice( matched.length );\n\t\t}\n\n\t\t// Filters\n\t\tfor ( type in Expr.filter ) {\n\t\t\tif ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] ||\n\t\t\t\t( match = preFilters[ type ]( match ) ) ) ) {\n\t\t\t\tmatched = match.shift();\n\t\t\t\ttokens.push( {\n\t\t\t\t\tvalue: matched,\n\t\t\t\t\ttype: type,\n\t\t\t\t\tmatches: match\n\t\t\t\t} );\n\t\t\t\tsoFar = soFar.slice( matched.length );\n\t\t\t}\n\t\t}\n\n\t\tif ( !matched ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t// Return the length of the invalid excess\n\t// if we're just parsing\n\t// Otherwise, throw an error or return tokens\n\tif ( parseOnly ) {\n\t\treturn soFar.length;\n\t}\n\n\treturn soFar ?\n\t\tfind.error( selector ) :\n\n\t\t// Cache the tokens\n\t\ttokenCache( selector, groups ).slice( 0 );\n}\n\nfunction toSelector( tokens ) {\n\tvar i = 0,\n\t\tlen = tokens.length,\n\t\tselector = \"\";\n\tfor ( ; i < len; i++ ) {\n\t\tselector += tokens[ i ].value;\n\t}\n\treturn selector;\n}\n\nfunction addCombinator( matcher, combinator, base ) {\n\tvar dir = combinator.dir,\n\t\tskip = combinator.next,\n\t\tkey = skip || dir,\n\t\tcheckNonElements = base && key === \"parentNode\",\n\t\tdoneName = done++;\n\n\treturn combinator.first ?\n\n\t\t// Check against closest ancestor/preceding element\n\t\tfunction( elem, context, xml ) {\n\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\treturn matcher( elem, context, xml );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t} :\n\n\t\t// Check against all ancestor/preceding elements\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar oldCache, outerCache,\n\t\t\t\tnewCache = [ dirruns, doneName ];\n\n\t\t\t// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching\n\t\t\tif ( xml ) {\n\t\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\tif ( matcher( elem, context, xml ) ) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\touterCache = elem[ expando ] || ( elem[ expando ] = {} );\n\n\t\t\t\t\t\tif ( skip && nodeName( elem, skip ) ) {\n\t\t\t\t\t\t\telem = elem[ dir ] || elem;\n\t\t\t\t\t\t} else if ( ( oldCache = outerCache[ key ] ) &&\n\t\t\t\t\t\t\toldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {\n\n\t\t\t\t\t\t\t// Assign to newCache so results back-propagate to previous elements\n\t\t\t\t\t\t\treturn ( newCache[ 2 ] = oldCache[ 2 ] );\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Reuse newcache so results back-propagate to previous elements\n\t\t\t\t\t\t\touterCache[ key ] = newCache;\n\n\t\t\t\t\t\t\t// A match means we're done; a fail means we have to keep checking\n\t\t\t\t\t\t\tif ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) {\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n}\n\nfunction elementMatcher( matchers ) {\n\treturn matchers.length > 1 ?\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar i = matchers.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( !matchers[ i ]( elem, context, xml ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} :\n\t\tmatchers[ 0 ];\n}\n\nfunction multipleContexts( selector, contexts, results ) {\n\tvar i = 0,\n\t\tlen = contexts.length;\n\tfor ( ; i < len; i++ ) {\n\t\tfind( selector, contexts[ i ], results );\n\t}\n\treturn results;\n}\n\nfunction condense( unmatched, map, filter, context, xml ) {\n\tvar elem,\n\t\tnewUnmatched = [],\n\t\ti = 0,\n\t\tlen = unmatched.length,\n\t\tmapped = map != null;\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( ( elem = unmatched[ i ] ) ) {\n\t\t\tif ( !filter || filter( elem, context, xml ) ) {\n\t\t\t\tnewUnmatched.push( elem );\n\t\t\t\tif ( mapped ) {\n\t\t\t\t\tmap.push( i );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn newUnmatched;\n}\n\nfunction setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {\n\tif ( postFilter && !postFilter[ expando ] ) {\n\t\tpostFilter = setMatcher( postFilter );\n\t}\n\tif ( postFinder && !postFinder[ expando ] ) {\n\t\tpostFinder = setMatcher( postFinder, postSelector );\n\t}\n\treturn markFunction( function( seed, results, context, xml ) {\n\t\tvar temp, i, elem, matcherOut,\n\t\t\tpreMap = [],\n\t\t\tpostMap = [],\n\t\t\tpreexisting = results.length,\n\n\t\t\t// Get initial elements from seed or context\n\t\t\telems = seed ||\n\t\t\t\tmultipleContexts( selector || \"*\",\n\t\t\t\t\tcontext.nodeType ? [ context ] : context, [] ),\n\n\t\t\t// Prefilter to get matcher input, preserving a map for seed-results synchronization\n\t\t\tmatcherIn = preFilter && ( seed || !selector ) ?\n\t\t\t\tcondense( elems, preMap, preFilter, context, xml ) :\n\t\t\t\telems;\n\n\t\tif ( matcher ) {\n\n\t\t\t// If we have a postFinder, or filtered seed, or non-seed postFilter\n\t\t\t// or preexisting results,\n\t\t\tmatcherOut = postFinder || ( seed ? preFilter : preexisting || postFilter ) ?\n\n\t\t\t\t// ...intermediate processing is necessary\n\t\t\t\t[] :\n\n\t\t\t\t// ...otherwise use results directly\n\t\t\t\tresults;\n\n\t\t\t// Find primary matches\n\t\t\tmatcher( matcherIn, matcherOut, context, xml );\n\t\t} else {\n\t\t\tmatcherOut = matcherIn;\n\t\t}\n\n\t\t// Apply postFilter\n\t\tif ( postFilter ) {\n\t\t\ttemp = condense( matcherOut, postMap );\n\t\t\tpostFilter( temp, [], context, xml );\n\n\t\t\t// Un-match failing elements by moving them back to matcherIn\n\t\t\ti = temp.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( ( elem = temp[ i ] ) ) {\n\t\t\t\t\tmatcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( seed ) {\n\t\t\tif ( postFinder || preFilter ) {\n\t\t\t\tif ( postFinder ) {\n\n\t\t\t\t\t// Get the final matcherOut by condensing this intermediate into postFinder contexts\n\t\t\t\t\ttemp = [];\n\t\t\t\t\ti = matcherOut.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( ( elem = matcherOut[ i ] ) ) {\n\n\t\t\t\t\t\t\t// Restore matcherIn since elem is not yet a final match\n\t\t\t\t\t\t\ttemp.push( ( matcherIn[ i ] = elem ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tpostFinder( null, ( matcherOut = [] ), temp, xml );\n\t\t\t\t}\n\n\t\t\t\t// Move matched elements from seed to results to keep them synchronized\n\t\t\t\ti = matcherOut.length;\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\tif ( ( elem = matcherOut[ i ] ) &&\n\t\t\t\t\t\t( temp = postFinder ? indexOf.call( seed, elem ) : preMap[ i ] ) > -1 ) {\n\n\t\t\t\t\t\tseed[ temp ] = !( results[ temp ] = elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Add elements to results, through postFinder if defined\n\t\t} else {\n\t\t\tmatcherOut = condense(\n\t\t\t\tmatcherOut === results ?\n\t\t\t\t\tmatcherOut.splice( preexisting, matcherOut.length ) :\n\t\t\t\t\tmatcherOut\n\t\t\t);\n\t\t\tif ( postFinder ) {\n\t\t\t\tpostFinder( null, results, matcherOut, xml );\n\t\t\t} else {\n\t\t\t\tpush.apply( results, matcherOut );\n\t\t\t}\n\t\t}\n\t} );\n}\n\nfunction matcherFromTokens( tokens ) {\n\tvar checkContext, matcher, j,\n\t\tlen = tokens.length,\n\t\tleadingRelative = Expr.relative[ tokens[ 0 ].type ],\n\t\timplicitRelative = leadingRelative || Expr.relative[ \" \" ],\n\t\ti = leadingRelative ? 1 : 0,\n\n\t\t// The foundational matcher ensures that elements are reachable from top-level context(s)\n\t\tmatchContext = addCombinator( function( elem ) {\n\t\t\treturn elem === checkContext;\n\t\t}, implicitRelative, true ),\n\t\tmatchAnyContext = addCombinator( function( elem ) {\n\t\t\treturn indexOf.call( checkContext, elem ) > -1;\n\t\t}, implicitRelative, true ),\n\t\tmatchers = [ function( elem, context, xml ) {\n\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\tvar ret = ( !leadingRelative && ( xml || context != outermostContext ) ) || (\n\t\t\t\t( checkContext = context ).nodeType ?\n\t\t\t\t\tmatchContext( elem, context, xml ) :\n\t\t\t\t\tmatchAnyContext( elem, context, xml ) );\n\n\t\t\t// Avoid hanging onto element\n\t\t\t// (see https://github.com/jquery/sizzle/issues/299)\n\t\t\tcheckContext = null;\n\t\t\treturn ret;\n\t\t} ];\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) {\n\t\t\tmatchers = [ addCombinator( elementMatcher( matchers ), matcher ) ];\n\t\t} else {\n\t\t\tmatcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches );\n\n\t\t\t// Return special upon seeing a positional matcher\n\t\t\tif ( matcher[ expando ] ) {\n\n\t\t\t\t// Find the next relative operator (if any) for proper handling\n\t\t\t\tj = ++i;\n\t\t\t\tfor ( ; j < len; j++ ) {\n\t\t\t\t\tif ( Expr.relative[ tokens[ j ].type ] ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn setMatcher(\n\t\t\t\t\ti > 1 && elementMatcher( matchers ),\n\t\t\t\t\ti > 1 && toSelector(\n\n\t\t\t\t\t\t// If the preceding token was a descendant combinator, insert an implicit any-element `*`\n\t\t\t\t\t\ttokens.slice( 0, i - 1 )\n\t\t\t\t\t\t\t.concat( { value: tokens[ i - 2 ].type === \" \" ? \"*\" : \"\" } )\n\t\t\t\t\t).replace( rtrimCSS, \"$1\" ),\n\t\t\t\t\tmatcher,\n\t\t\t\t\ti < j && matcherFromTokens( tokens.slice( i, j ) ),\n\t\t\t\t\tj < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ),\n\t\t\t\t\tj < len && toSelector( tokens )\n\t\t\t\t);\n\t\t\t}\n\t\t\tmatchers.push( matcher );\n\t\t}\n\t}\n\n\treturn elementMatcher( matchers );\n}\n\nfunction matcherFromGroupMatchers( elementMatchers, setMatchers ) {\n\tvar bySet = setMatchers.length > 0,\n\t\tbyElement = elementMatchers.length > 0,\n\t\tsuperMatcher = function( seed, context, xml, results, outermost ) {\n\t\t\tvar elem, j, matcher,\n\t\t\t\tmatchedCount = 0,\n\t\t\t\ti = \"0\",\n\t\t\t\tunmatched = seed && [],\n\t\t\t\tsetMatched = [],\n\t\t\t\tcontextBackup = outermostContext,\n\n\t\t\t\t// We must always have either seed elements or outermost context\n\t\t\t\telems = seed || byElement && Expr.find.TAG( \"*\", outermost ),\n\n\t\t\t\t// Use integer dirruns iff this is the outermost matcher\n\t\t\t\tdirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ),\n\t\t\t\tlen = elems.length;\n\n\t\t\tif ( outermost ) {\n\n\t\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t\t// two documents; shallow comparisons work.\n\t\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\t\toutermostContext = context == document || context || outermost;\n\t\t\t}\n\n\t\t\t// Add elements passing elementMatchers directly to results\n\t\t\t// Support: iOS <=7 - 9 only\n\t\t\t// Tolerate NodeList properties (IE: \"length\"; Safari: <number>) matching\n\t\t\t// elements by id. (see trac-14142)\n\t\t\tfor ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) {\n\t\t\t\tif ( byElement && elem ) {\n\t\t\t\t\tj = 0;\n\n\t\t\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t\t\t// two documents; shallow comparisons work.\n\t\t\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\t\t\tif ( !context && elem.ownerDocument != document ) {\n\t\t\t\t\t\tsetDocument( elem );\n\t\t\t\t\t\txml = !documentIsHTML;\n\t\t\t\t\t}\n\t\t\t\t\twhile ( ( matcher = elementMatchers[ j++ ] ) ) {\n\t\t\t\t\t\tif ( matcher( elem, context || document, xml ) ) {\n\t\t\t\t\t\t\tpush.call( results, elem );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( outermost ) {\n\t\t\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Track unmatched elements for set filters\n\t\t\t\tif ( bySet ) {\n\n\t\t\t\t\t// They will have gone through all possible matchers\n\t\t\t\t\tif ( ( elem = !matcher && elem ) ) {\n\t\t\t\t\t\tmatchedCount--;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Lengthen the array for every element, matched or not\n\t\t\t\t\tif ( seed ) {\n\t\t\t\t\t\tunmatched.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// `i` is now the count of elements visited above, and adding it to `matchedCount`\n\t\t\t// makes the latter nonnegative.\n\t\t\tmatchedCount += i;\n\n\t\t\t// Apply set filters to unmatched elements\n\t\t\t// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`\n\t\t\t// equals `i`), unless we didn't visit _any_ elements in the above loop because we have\n\t\t\t// no element matchers and no seed.\n\t\t\t// Incrementing an initially-string \"0\" `i` allows `i` to remain a string only in that\n\t\t\t// case, which will result in a \"00\" `matchedCount` that differs from `i` but is also\n\t\t\t// numerically zero.\n\t\t\tif ( bySet && i !== matchedCount ) {\n\t\t\t\tj = 0;\n\t\t\t\twhile ( ( matcher = setMatchers[ j++ ] ) ) {\n\t\t\t\t\tmatcher( unmatched, setMatched, context, xml );\n\t\t\t\t}\n\n\t\t\t\tif ( seed ) {\n\n\t\t\t\t\t// Reintegrate element matches to eliminate the need for sorting\n\t\t\t\t\tif ( matchedCount > 0 ) {\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tif ( !( unmatched[ i ] || setMatched[ i ] ) ) {\n\t\t\t\t\t\t\t\tsetMatched[ i ] = pop.call( results );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Discard index placeholder values to get only actual matches\n\t\t\t\t\tsetMatched = condense( setMatched );\n\t\t\t\t}\n\n\t\t\t\t// Add matches to results\n\t\t\t\tpush.apply( results, setMatched );\n\n\t\t\t\t// Seedless set matches succeeding multiple successful matchers stipulate sorting\n\t\t\t\tif ( outermost && !seed && setMatched.length > 0 &&\n\t\t\t\t\t( matchedCount + setMatchers.length ) > 1 ) {\n\n\t\t\t\t\tjQuery.uniqueSort( results );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Override manipulation of globals by nested matchers\n\t\t\tif ( outermost ) {\n\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\toutermostContext = contextBackup;\n\t\t\t}\n\n\t\t\treturn unmatched;\n\t\t};\n\n\treturn bySet ?\n\t\tmarkFunction( superMatcher ) :\n\t\tsuperMatcher;\n}\n\nfunction compile( selector, match /* Internal Use Only */ ) {\n\tvar i,\n\t\tsetMatchers = [],\n\t\telementMatchers = [],\n\t\tcached = compilerCache[ selector + \" \" ];\n\n\tif ( !cached ) {\n\n\t\t// Generate a function of recursive functions that can be used to check each element\n\t\tif ( !match ) {\n\t\t\tmatch = tokenize( selector );\n\t\t}\n\t\ti = match.length;\n\t\twhile ( i-- ) {\n\t\t\tcached = matcherFromTokens( match[ i ] );\n\t\t\tif ( cached[ expando ] ) {\n\t\t\t\tsetMatchers.push( cached );\n\t\t\t} else {\n\t\t\t\telementMatchers.push( cached );\n\t\t\t}\n\t\t}\n\n\t\t// Cache the compiled function\n\t\tcached = compilerCache( selector,\n\t\t\tmatcherFromGroupMatchers( elementMatchers, setMatchers ) );\n\n\t\t// Save selector and tokenization\n\t\tcached.selector = selector;\n\t}\n\treturn cached;\n}\n\n/**\n * A low-level selection function that works with jQuery's compiled\n *  selector functions\n * @param {String|Function} selector A selector or a pre-compiled\n *  selector function built with jQuery selector compile\n * @param {Element} context\n * @param {Array} [results]\n * @param {Array} [seed] A set of elements to match against\n */\nfunction select( selector, context, results, seed ) {\n\tvar i, tokens, token, type, find,\n\t\tcompiled = typeof selector === \"function\" && selector,\n\t\tmatch = !seed && tokenize( ( selector = compiled.selector || selector ) );\n\n\tresults = results || [];\n\n\t// Try to minimize operations if there is only one selector in the list and no seed\n\t// (the latter of which guarantees us context)\n\tif ( match.length === 1 ) {\n\n\t\t// Reduce context if the leading compound selector is an ID\n\t\ttokens = match[ 0 ] = match[ 0 ].slice( 0 );\n\t\tif ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === \"ID\" &&\n\t\t\t\tcontext.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) {\n\n\t\t\tcontext = ( Expr.find.ID(\n\t\t\t\ttoken.matches[ 0 ].replace( runescape, funescape ),\n\t\t\t\tcontext\n\t\t\t) || [] )[ 0 ];\n\t\t\tif ( !context ) {\n\t\t\t\treturn results;\n\n\t\t\t// Precompiled matchers will still verify ancestry, so step up a level\n\t\t\t} else if ( compiled ) {\n\t\t\t\tcontext = context.parentNode;\n\t\t\t}\n\n\t\t\tselector = selector.slice( tokens.shift().value.length );\n\t\t}\n\n\t\t// Fetch a seed set for right-to-left matching\n\t\ti = matchExpr.needsContext.test( selector ) ? 0 : tokens.length;\n\t\twhile ( i-- ) {\n\t\t\ttoken = tokens[ i ];\n\n\t\t\t// Abort if we hit a combinator\n\t\t\tif ( Expr.relative[ ( type = token.type ) ] ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( ( find = Expr.find[ type ] ) ) {\n\n\t\t\t\t// Search, expanding context for leading sibling combinators\n\t\t\t\tif ( ( seed = find(\n\t\t\t\t\ttoken.matches[ 0 ].replace( runescape, funescape ),\n\t\t\t\t\trsibling.test( tokens[ 0 ].type ) &&\n\t\t\t\t\t\ttestContext( context.parentNode ) || context\n\t\t\t\t) ) ) {\n\n\t\t\t\t\t// If seed is empty or no tokens remain, we can return early\n\t\t\t\t\ttokens.splice( i, 1 );\n\t\t\t\t\tselector = seed.length && toSelector( tokens );\n\t\t\t\t\tif ( !selector ) {\n\t\t\t\t\t\tpush.apply( results, seed );\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Compile and execute a filtering function if one is not provided\n\t// Provide `match` to avoid retokenization if we modified the selector above\n\t( compiled || compile( selector, match ) )(\n\t\tseed,\n\t\tcontext,\n\t\t!documentIsHTML,\n\t\tresults,\n\t\t!context || rsibling.test( selector ) && testContext( context.parentNode ) || context\n\t);\n\treturn results;\n}\n\n// One-time assignments\n\n// Support: Android <=4.0 - 4.1+\n// Sort stability\nsupport.sortStable = expando.split( \"\" ).sort( sortOrder ).join( \"\" ) === expando;\n\n// Initialize against the default document\nsetDocument();\n\n// Support: Android <=4.0 - 4.1+\n// Detached nodes confoundingly follow *each other*\nsupport.sortDetached = assert( function( el ) {\n\n\t// Should return 1, but returns 4 (following)\n\treturn el.compareDocumentPosition( document.createElement( \"fieldset\" ) ) & 1;\n} );\n\njQuery.find = find;\n\n// Deprecated\njQuery.expr[ \":\" ] = jQuery.expr.pseudos;\njQuery.unique = jQuery.uniqueSort;\n\n// These have always been private, but they used to be documented as part of\n// Sizzle so let's maintain them for now for backwards compatibility purposes.\nfind.compile = compile;\nfind.select = select;\nfind.setDocument = setDocument;\nfind.tokenize = tokenize;\n\nfind.escape = jQuery.escapeSelector;\nfind.getText = jQuery.text;\nfind.isXML = jQuery.isXMLDoc;\nfind.selectors = jQuery.expr;\nfind.support = jQuery.support;\nfind.uniqueSort = jQuery.uniqueSort;\n\n\t/* eslint-enable */\n\n} )();\n\n\nvar dir = function( elem, dir, until ) {\n\tvar matched = [],\n\t\ttruncate = until !== undefined;\n\n\twhile ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {\n\t\tif ( elem.nodeType === 1 ) {\n\t\t\tif ( truncate && jQuery( elem ).is( until ) ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tmatched.push( elem );\n\t\t}\n\t}\n\treturn matched;\n};\n\n\nvar siblings = function( n, elem ) {\n\tvar matched = [];\n\n\tfor ( ; n; n = n.nextSibling ) {\n\t\tif ( n.nodeType === 1 && n !== elem ) {\n\t\t\tmatched.push( n );\n\t\t}\n\t}\n\n\treturn matched;\n};\n\n\nvar rneedsContext = jQuery.expr.match.needsContext;\n\nvar rsingleTag = ( /^<([a-z][^\\/\\0>:\\x20\\t\\r\\n\\f]*)[\\x20\\t\\r\\n\\f]*\\/?>(?:<\\/\\1>|)$/i );\n\n\n\n// Implement the identical functionality for filter and not\nfunction winnow( elements, qualifier, not ) {\n\tif ( isFunction( qualifier ) ) {\n\t\treturn jQuery.grep( elements, function( elem, i ) {\n\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\n\t\t} );\n\t}\n\n\t// Single element\n\tif ( qualifier.nodeType ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( elem === qualifier ) !== not;\n\t\t} );\n\t}\n\n\t// Arraylike of elements (jQuery, arguments, Array)\n\tif ( typeof qualifier !== \"string\" ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( indexOf.call( qualifier, elem ) > -1 ) !== not;\n\t\t} );\n\t}\n\n\t// Filtered directly for both simple and complex selectors\n\treturn jQuery.filter( qualifier, elements, not );\n}\n\njQuery.filter = function( expr, elems, not ) {\n\tvar elem = elems[ 0 ];\n\n\tif ( not ) {\n\t\texpr = \":not(\" + expr + \")\";\n\t}\n\n\tif ( elems.length === 1 && elem.nodeType === 1 ) {\n\t\treturn jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];\n\t}\n\n\treturn jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {\n\t\treturn elem.nodeType === 1;\n\t} ) );\n};\n\njQuery.fn.extend( {\n\tfind: function( selector ) {\n\t\tvar i, ret,\n\t\t\tlen = this.length,\n\t\t\tself = this;\n\n\t\tif ( typeof selector !== \"string\" ) {\n\t\t\treturn this.pushStack( jQuery( selector ).filter( function() {\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tif ( jQuery.contains( self[ i ], this ) ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} ) );\n\t\t}\n\n\t\tret = this.pushStack( [] );\n\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tjQuery.find( selector, self[ i ], ret );\n\t\t}\n\n\t\treturn len > 1 ? jQuery.uniqueSort( ret ) : ret;\n\t},\n\tfilter: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], false ) );\n\t},\n\tnot: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], true ) );\n\t},\n\tis: function( selector ) {\n\t\treturn !!winnow(\n\t\t\tthis,\n\n\t\t\t// If this is a positional/relative selector, check membership in the returned set\n\t\t\t// so $(\"p:first\").is(\"p:last\") won't return true for a doc with two \"p\".\n\t\t\ttypeof selector === \"string\" && rneedsContext.test( selector ) ?\n\t\t\t\tjQuery( selector ) :\n\t\t\t\tselector || [],\n\t\t\tfalse\n\t\t).length;\n\t}\n} );\n\n\n// Initialize a jQuery object\n\n\n// A central reference to the root jQuery(document)\nvar rootjQuery,\n\n\t// A simple way to check for HTML strings\n\t// Prioritize #id over <tag> to avoid XSS via location.hash (trac-9521)\n\t// Strict HTML recognition (trac-11290: must start with <)\n\t// Shortcut simple #id case for speed\n\trquickExpr = /^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]+))$/,\n\n\tinit = jQuery.fn.init = function( selector, context, root ) {\n\t\tvar match, elem;\n\n\t\t// HANDLE: $(\"\"), $(null), $(undefined), $(false)\n\t\tif ( !selector ) {\n\t\t\treturn this;\n\t\t}\n\n\t\t// Method init() accepts an alternate rootjQuery\n\t\t// so migrate can support jQuery.sub (gh-2101)\n\t\troot = root || rootjQuery;\n\n\t\t// Handle HTML strings\n\t\tif ( typeof selector === \"string\" ) {\n\t\t\tif ( selector[ 0 ] === \"<\" &&\n\t\t\t\tselector[ selector.length - 1 ] === \">\" &&\n\t\t\t\tselector.length >= 3 ) {\n\n\t\t\t\t// Assume that strings that start and end with <> are HTML and skip the regex check\n\t\t\t\tmatch = [ null, selector, null ];\n\n\t\t\t} else {\n\t\t\t\tmatch = rquickExpr.exec( selector );\n\t\t\t}\n\n\t\t\t// Match html or make sure no context is specified for #id\n\t\t\tif ( match && ( match[ 1 ] || !context ) ) {\n\n\t\t\t\t// HANDLE: $(html) -> $(array)\n\t\t\t\tif ( match[ 1 ] ) {\n\t\t\t\t\tcontext = context instanceof jQuery ? context[ 0 ] : context;\n\n\t\t\t\t\t// Option to run scripts is true for back-compat\n\t\t\t\t\t// Intentionally let the error be thrown if parseHTML is not present\n\t\t\t\t\tjQuery.merge( this, jQuery.parseHTML(\n\t\t\t\t\t\tmatch[ 1 ],\n\t\t\t\t\t\tcontext && context.nodeType ? context.ownerDocument || context : document,\n\t\t\t\t\t\ttrue\n\t\t\t\t\t) );\n\n\t\t\t\t\t// HANDLE: $(html, props)\n\t\t\t\t\tif ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {\n\t\t\t\t\t\tfor ( match in context ) {\n\n\t\t\t\t\t\t\t// Properties of context are called as methods if possible\n\t\t\t\t\t\t\tif ( isFunction( this[ match ] ) ) {\n\t\t\t\t\t\t\t\tthis[ match ]( context[ match ] );\n\n\t\t\t\t\t\t\t// ...and otherwise set as attributes\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.attr( match, context[ match ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn this;\n\n\t\t\t\t// HANDLE: $(#id)\n\t\t\t\t} else {\n\t\t\t\t\telem = document.getElementById( match[ 2 ] );\n\n\t\t\t\t\tif ( elem ) {\n\n\t\t\t\t\t\t// Inject the element directly into the jQuery object\n\t\t\t\t\t\tthis[ 0 ] = elem;\n\t\t\t\t\t\tthis.length = 1;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\n\t\t\t// HANDLE: $(expr, $(...))\n\t\t\t} else if ( !context || context.jquery ) {\n\t\t\t\treturn ( context || root ).find( selector );\n\n\t\t\t// HANDLE: $(expr, context)\n\t\t\t// (which is just equivalent to: $(context).find(expr)\n\t\t\t} else {\n\t\t\t\treturn this.constructor( context ).find( selector );\n\t\t\t}\n\n\t\t// HANDLE: $(DOMElement)\n\t\t} else if ( selector.nodeType ) {\n\t\t\tthis[ 0 ] = selector;\n\t\t\tthis.length = 1;\n\t\t\treturn this;\n\n\t\t// HANDLE: $(function)\n\t\t// Shortcut for document ready\n\t\t} else if ( isFunction( selector ) ) {\n\t\t\treturn root.ready !== undefined ?\n\t\t\t\troot.ready( selector ) :\n\n\t\t\t\t// Execute immediately if ready is not present\n\t\t\t\tselector( jQuery );\n\t\t}\n\n\t\treturn jQuery.makeArray( selector, this );\n\t};\n\n// Give the init function the jQuery prototype for later instantiation\ninit.prototype = jQuery.fn;\n\n// Initialize central reference\nrootjQuery = jQuery( document );\n\n\nvar rparentsprev = /^(?:parents|prev(?:Until|All))/,\n\n\t// Methods guaranteed to produce a unique set when starting from a unique set\n\tguaranteedUnique = {\n\t\tchildren: true,\n\t\tcontents: true,\n\t\tnext: true,\n\t\tprev: true\n\t};\n\njQuery.fn.extend( {\n\thas: function( target ) {\n\t\tvar targets = jQuery( target, this ),\n\t\t\tl = targets.length;\n\n\t\treturn this.filter( function() {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tif ( jQuery.contains( this, targets[ i ] ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\tclosest: function( selectors, context ) {\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\tl = this.length,\n\t\t\tmatched = [],\n\t\t\ttargets = typeof selectors !== \"string\" && jQuery( selectors );\n\n\t\t// Positional selectors never match, since there's no _selection_ context\n\t\tif ( !rneedsContext.test( selectors ) ) {\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tfor ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {\n\n\t\t\t\t\t// Always skip document fragments\n\t\t\t\t\tif ( cur.nodeType < 11 && ( targets ?\n\t\t\t\t\t\ttargets.index( cur ) > -1 :\n\n\t\t\t\t\t\t// Don't pass non-elements to jQuery#find\n\t\t\t\t\t\tcur.nodeType === 1 &&\n\t\t\t\t\t\t\tjQuery.find.matchesSelector( cur, selectors ) ) ) {\n\n\t\t\t\t\t\tmatched.push( cur );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );\n\t},\n\n\t// Determine the position of an element within the set\n\tindex: function( elem ) {\n\n\t\t// No argument, return index in parent\n\t\tif ( !elem ) {\n\t\t\treturn ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;\n\t\t}\n\n\t\t// Index in selector\n\t\tif ( typeof elem === \"string\" ) {\n\t\t\treturn indexOf.call( jQuery( elem ), this[ 0 ] );\n\t\t}\n\n\t\t// Locate the position of the desired element\n\t\treturn indexOf.call( this,\n\n\t\t\t// If it receives a jQuery object, the first element is used\n\t\t\telem.jquery ? elem[ 0 ] : elem\n\t\t);\n\t},\n\n\tadd: function( selector, context ) {\n\t\treturn this.pushStack(\n\t\t\tjQuery.uniqueSort(\n\t\t\t\tjQuery.merge( this.get(), jQuery( selector, context ) )\n\t\t\t)\n\t\t);\n\t},\n\n\taddBack: function( selector ) {\n\t\treturn this.add( selector == null ?\n\t\t\tthis.prevObject : this.prevObject.filter( selector )\n\t\t);\n\t}\n} );\n\nfunction sibling( cur, dir ) {\n\twhile ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}\n\treturn cur;\n}\n\njQuery.each( {\n\tparent: function( elem ) {\n\t\tvar parent = elem.parentNode;\n\t\treturn parent && parent.nodeType !== 11 ? parent : null;\n\t},\n\tparents: function( elem ) {\n\t\treturn dir( elem, \"parentNode\" );\n\t},\n\tparentsUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"parentNode\", until );\n\t},\n\tnext: function( elem ) {\n\t\treturn sibling( elem, \"nextSibling\" );\n\t},\n\tprev: function( elem ) {\n\t\treturn sibling( elem, \"previousSibling\" );\n\t},\n\tnextAll: function( elem ) {\n\t\treturn dir( elem, \"nextSibling\" );\n\t},\n\tprevAll: function( elem ) {\n\t\treturn dir( elem, \"previousSibling\" );\n\t},\n\tnextUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"nextSibling\", until );\n\t},\n\tprevUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"previousSibling\", until );\n\t},\n\tsiblings: function( elem ) {\n\t\treturn siblings( ( elem.parentNode || {} ).firstChild, elem );\n\t},\n\tchildren: function( elem ) {\n\t\treturn siblings( elem.firstChild );\n\t},\n\tcontents: function( elem ) {\n\t\tif ( elem.contentDocument != null &&\n\n\t\t\t// Support: IE 11+\n\t\t\t// <object> elements with no `data` attribute has an object\n\t\t\t// `contentDocument` with a `null` prototype.\n\t\t\tgetProto( elem.contentDocument ) ) {\n\n\t\t\treturn elem.contentDocument;\n\t\t}\n\n\t\t// Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only\n\t\t// Treat the template element as a regular one in browsers that\n\t\t// don't support it.\n\t\tif ( nodeName( elem, \"template\" ) ) {\n\t\t\telem = elem.content || elem;\n\t\t}\n\n\t\treturn jQuery.merge( [], elem.childNodes );\n\t}\n}, function( name, fn ) {\n\tjQuery.fn[ name ] = function( until, selector ) {\n\t\tvar matched = jQuery.map( this, fn, until );\n\n\t\tif ( name.slice( -5 ) !== \"Until\" ) {\n\t\t\tselector = until;\n\t\t}\n\n\t\tif ( selector && typeof selector === \"string\" ) {\n\t\t\tmatched = jQuery.filter( selector, matched );\n\t\t}\n\n\t\tif ( this.length > 1 ) {\n\n\t\t\t// Remove duplicates\n\t\t\tif ( !guaranteedUnique[ name ] ) {\n\t\t\t\tjQuery.uniqueSort( matched );\n\t\t\t}\n\n\t\t\t// Reverse order for parents* and prev-derivatives\n\t\t\tif ( rparentsprev.test( name ) ) {\n\t\t\t\tmatched.reverse();\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched );\n\t};\n} );\nvar rnothtmlwhite = ( /[^\\x20\\t\\r\\n\\f]+/g );\n\n\n\n// Convert String-formatted options into Object-formatted ones\nfunction createOptions( options ) {\n\tvar object = {};\n\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\tobject[ flag ] = true;\n\t} );\n\treturn object;\n}\n\n/*\n * Create a callback list using the following parameters:\n *\n *\toptions: an optional list of space-separated options that will change how\n *\t\t\tthe callback list behaves or a more traditional option object\n *\n * By default a callback list will act like an event callback list and can be\n * \"fired\" multiple times.\n *\n * Possible options:\n *\n *\tonce:\t\t\twill ensure the callback list can only be fired once (like a Deferred)\n *\n *\tmemory:\t\t\twill keep track of previous values and will call any callback added\n *\t\t\t\t\tafter the list has been fired right away with the latest \"memorized\"\n *\t\t\t\t\tvalues (like a Deferred)\n *\n *\tunique:\t\t\twill ensure a callback can only be added once (no duplicate in the list)\n *\n *\tstopOnFalse:\tinterrupt callings when a callback returns false\n *\n */\njQuery.Callbacks = function( options ) {\n\n\t// Convert options from String-formatted to Object-formatted if needed\n\t// (we check in cache first)\n\toptions = typeof options === \"string\" ?\n\t\tcreateOptions( options ) :\n\t\tjQuery.extend( {}, options );\n\n\tvar // Flag to know if list is currently firing\n\t\tfiring,\n\n\t\t// Last fire value for non-forgettable lists\n\t\tmemory,\n\n\t\t// Flag to know if list was already fired\n\t\tfired,\n\n\t\t// Flag to prevent firing\n\t\tlocked,\n\n\t\t// Actual callback list\n\t\tlist = [],\n\n\t\t// Queue of execution data for repeatable lists\n\t\tqueue = [],\n\n\t\t// Index of currently firing callback (modified by add/remove as needed)\n\t\tfiringIndex = -1,\n\n\t\t// Fire callbacks\n\t\tfire = function() {\n\n\t\t\t// Enforce single-firing\n\t\t\tlocked = locked || options.once;\n\n\t\t\t// Execute callbacks for all pending executions,\n\t\t\t// respecting firingIndex overrides and runtime changes\n\t\t\tfired = firing = true;\n\t\t\tfor ( ; queue.length; firingIndex = -1 ) {\n\t\t\t\tmemory = queue.shift();\n\t\t\t\twhile ( ++firingIndex < list.length ) {\n\n\t\t\t\t\t// Run callback and check for early termination\n\t\t\t\t\tif ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&\n\t\t\t\t\t\toptions.stopOnFalse ) {\n\n\t\t\t\t\t\t// Jump to end and forget the data so .add doesn't re-fire\n\t\t\t\t\t\tfiringIndex = list.length;\n\t\t\t\t\t\tmemory = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Forget the data if we're done with it\n\t\t\tif ( !options.memory ) {\n\t\t\t\tmemory = false;\n\t\t\t}\n\n\t\t\tfiring = false;\n\n\t\t\t// Clean up if we're done firing for good\n\t\t\tif ( locked ) {\n\n\t\t\t\t// Keep an empty list if we have data for future add calls\n\t\t\t\tif ( memory ) {\n\t\t\t\t\tlist = [];\n\n\t\t\t\t// Otherwise, this object is spent\n\t\t\t\t} else {\n\t\t\t\t\tlist = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t// Actual Callbacks object\n\t\tself = {\n\n\t\t\t// Add a callback or a collection of callbacks to the list\n\t\t\tadd: function() {\n\t\t\t\tif ( list ) {\n\n\t\t\t\t\t// If we have memory from a past run, we should fire after adding\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfiringIndex = list.length - 1;\n\t\t\t\t\t\tqueue.push( memory );\n\t\t\t\t\t}\n\n\t\t\t\t\t( function add( args ) {\n\t\t\t\t\t\tjQuery.each( args, function( _, arg ) {\n\t\t\t\t\t\t\tif ( isFunction( arg ) ) {\n\t\t\t\t\t\t\t\tif ( !options.unique || !self.has( arg ) ) {\n\t\t\t\t\t\t\t\t\tlist.push( arg );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if ( arg && arg.length && toType( arg ) !== \"string\" ) {\n\n\t\t\t\t\t\t\t\t// Inspect recursively\n\t\t\t\t\t\t\t\tadd( arg );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t} )( arguments );\n\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Remove a callback from the list\n\t\t\tremove: function() {\n\t\t\t\tjQuery.each( arguments, function( _, arg ) {\n\t\t\t\t\tvar index;\n\t\t\t\t\twhile ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {\n\t\t\t\t\t\tlist.splice( index, 1 );\n\n\t\t\t\t\t\t// Handle firing indexes\n\t\t\t\t\t\tif ( index <= firingIndex ) {\n\t\t\t\t\t\t\tfiringIndex--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Check if a given callback is in the list.\n\t\t\t// If no argument is given, return whether or not list has callbacks attached.\n\t\t\thas: function( fn ) {\n\t\t\t\treturn fn ?\n\t\t\t\t\tjQuery.inArray( fn, list ) > -1 :\n\t\t\t\t\tlist.length > 0;\n\t\t\t},\n\n\t\t\t// Remove all callbacks from the list\n\t\t\tempty: function() {\n\t\t\t\tif ( list ) {\n\t\t\t\t\tlist = [];\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Disable .fire and .add\n\t\t\t// Abort any current/pending executions\n\t\t\t// Clear all callbacks and values\n\t\t\tdisable: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tlist = memory = \"\";\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tdisabled: function() {\n\t\t\t\treturn !list;\n\t\t\t},\n\n\t\t\t// Disable .fire\n\t\t\t// Also disable .add unless we have memory (since it would have no effect)\n\t\t\t// Abort any pending executions\n\t\t\tlock: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tif ( !memory && !firing ) {\n\t\t\t\t\tlist = memory = \"\";\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tlocked: function() {\n\t\t\t\treturn !!locked;\n\t\t\t},\n\n\t\t\t// Call all callbacks with the given context and arguments\n\t\t\tfireWith: function( context, args ) {\n\t\t\t\tif ( !locked ) {\n\t\t\t\t\targs = args || [];\n\t\t\t\t\targs = [ context, args.slice ? args.slice() : args ];\n\t\t\t\t\tqueue.push( args );\n\t\t\t\t\tif ( !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Call all the callbacks with the given arguments\n\t\t\tfire: function() {\n\t\t\t\tself.fireWith( this, arguments );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// To know if the callbacks have already been called at least once\n\t\t\tfired: function() {\n\t\t\t\treturn !!fired;\n\t\t\t}\n\t\t};\n\n\treturn self;\n};\n\n\nfunction Identity( v ) {\n\treturn v;\n}\nfunction Thrower( ex ) {\n\tthrow ex;\n}\n\nfunction adoptValue( value, resolve, reject, noValue ) {\n\tvar method;\n\n\ttry {\n\n\t\t// Check for promise aspect first to privilege synchronous behavior\n\t\tif ( value && isFunction( ( method = value.promise ) ) ) {\n\t\t\tmethod.call( value ).done( resolve ).fail( reject );\n\n\t\t// Other thenables\n\t\t} else if ( value && isFunction( ( method = value.then ) ) ) {\n\t\t\tmethod.call( value, resolve, reject );\n\n\t\t// Other non-thenables\n\t\t} else {\n\n\t\t\t// Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer:\n\t\t\t// * false: [ value ].slice( 0 ) => resolve( value )\n\t\t\t// * true: [ value ].slice( 1 ) => resolve()\n\t\t\tresolve.apply( undefined, [ value ].slice( noValue ) );\n\t\t}\n\n\t// For Promises/A+, convert exceptions into rejections\n\t// Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in\n\t// Deferred#then to conditionally suppress rejection.\n\t} catch ( value ) {\n\n\t\t// Support: Android 4.0 only\n\t\t// Strict mode functions invoked without .call/.apply get global-object context\n\t\treject.apply( undefined, [ value ] );\n\t}\n}\n\njQuery.extend( {\n\n\tDeferred: function( func ) {\n\t\tvar tuples = [\n\n\t\t\t\t// action, add listener, callbacks,\n\t\t\t\t// ... .then handlers, argument index, [final state]\n\t\t\t\t[ \"notify\", \"progress\", jQuery.Callbacks( \"memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"memory\" ), 2 ],\n\t\t\t\t[ \"resolve\", \"done\", jQuery.Callbacks( \"once memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"once memory\" ), 0, \"resolved\" ],\n\t\t\t\t[ \"reject\", \"fail\", jQuery.Callbacks( \"once memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"once memory\" ), 1, \"rejected\" ]\n\t\t\t],\n\t\t\tstate = \"pending\",\n\t\t\tpromise = {\n\t\t\t\tstate: function() {\n\t\t\t\t\treturn state;\n\t\t\t\t},\n\t\t\t\talways: function() {\n\t\t\t\t\tdeferred.done( arguments ).fail( arguments );\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\t\t\t\t\"catch\": function( fn ) {\n\t\t\t\t\treturn promise.then( null, fn );\n\t\t\t\t},\n\n\t\t\t\t// Keep pipe for back-compat\n\t\t\t\tpipe: function( /* fnDone, fnFail, fnProgress */ ) {\n\t\t\t\t\tvar fns = arguments;\n\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\t\t\t\t\t\tjQuery.each( tuples, function( _i, tuple ) {\n\n\t\t\t\t\t\t\t// Map tuples (progress, done, fail) to arguments (done, fail, progress)\n\t\t\t\t\t\t\tvar fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ];\n\n\t\t\t\t\t\t\t// deferred.progress(function() { bind to newDefer or newDefer.notify })\n\t\t\t\t\t\t\t// deferred.done(function() { bind to newDefer or newDefer.resolve })\n\t\t\t\t\t\t\t// deferred.fail(function() { bind to newDefer or newDefer.reject })\n\t\t\t\t\t\t\tdeferred[ tuple[ 1 ] ]( function() {\n\t\t\t\t\t\t\t\tvar returned = fn && fn.apply( this, arguments );\n\t\t\t\t\t\t\t\tif ( returned && isFunction( returned.promise ) ) {\n\t\t\t\t\t\t\t\t\treturned.promise()\n\t\t\t\t\t\t\t\t\t\t.progress( newDefer.notify )\n\t\t\t\t\t\t\t\t\t\t.done( newDefer.resolve )\n\t\t\t\t\t\t\t\t\t\t.fail( newDefer.reject );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tnewDefer[ tuple[ 0 ] + \"With\" ](\n\t\t\t\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t\t\t\tfn ? [ returned ] : arguments\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tfns = null;\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\t\t\t\tthen: function( onFulfilled, onRejected, onProgress ) {\n\t\t\t\t\tvar maxDepth = 0;\n\t\t\t\t\tfunction resolve( depth, deferred, handler, special ) {\n\t\t\t\t\t\treturn function() {\n\t\t\t\t\t\t\tvar that = this,\n\t\t\t\t\t\t\t\targs = arguments,\n\t\t\t\t\t\t\t\tmightThrow = function() {\n\t\t\t\t\t\t\t\t\tvar returned, then;\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.3\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-59\n\t\t\t\t\t\t\t\t\t// Ignore double-resolution attempts\n\t\t\t\t\t\t\t\t\tif ( depth < maxDepth ) {\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\treturned = handler.apply( that, args );\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.1\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-48\n\t\t\t\t\t\t\t\t\tif ( returned === deferred.promise() ) {\n\t\t\t\t\t\t\t\t\t\tthrow new TypeError( \"Thenable self-resolution\" );\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ sections 2.3.3.1, 3.5\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-54\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-75\n\t\t\t\t\t\t\t\t\t// Retrieve `then` only once\n\t\t\t\t\t\t\t\t\tthen = returned &&\n\n\t\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.4\n\t\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-64\n\t\t\t\t\t\t\t\t\t\t// Only check objects and functions for thenability\n\t\t\t\t\t\t\t\t\t\t( typeof returned === \"object\" ||\n\t\t\t\t\t\t\t\t\t\t\ttypeof returned === \"function\" ) &&\n\t\t\t\t\t\t\t\t\t\treturned.then;\n\n\t\t\t\t\t\t\t\t\t// Handle a returned thenable\n\t\t\t\t\t\t\t\t\tif ( isFunction( then ) ) {\n\n\t\t\t\t\t\t\t\t\t\t// Special processors (notify) just wait for resolution\n\t\t\t\t\t\t\t\t\t\tif ( special ) {\n\t\t\t\t\t\t\t\t\t\t\tthen.call(\n\t\t\t\t\t\t\t\t\t\t\t\treturned,\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Thrower, special )\n\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t// Normal processors (resolve) also hook into progress\n\t\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t\t// ...and disregard older resolution values\n\t\t\t\t\t\t\t\t\t\t\tmaxDepth++;\n\n\t\t\t\t\t\t\t\t\t\t\tthen.call(\n\t\t\t\t\t\t\t\t\t\t\t\treturned,\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Thrower, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity,\n\t\t\t\t\t\t\t\t\t\t\t\t\tdeferred.notifyWith )\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Handle all other returned values\n\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t// Only substitute handlers pass on context\n\t\t\t\t\t\t\t\t\t\t// and multiple values (non-spec behavior)\n\t\t\t\t\t\t\t\t\t\tif ( handler !== Identity ) {\n\t\t\t\t\t\t\t\t\t\t\tthat = undefined;\n\t\t\t\t\t\t\t\t\t\t\targs = [ returned ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t// Process the value(s)\n\t\t\t\t\t\t\t\t\t\t// Default process is resolve\n\t\t\t\t\t\t\t\t\t\t( special || deferred.resolveWith )( that, args );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\n\t\t\t\t\t\t\t\t// Only normal processors (resolve) catch and reject exceptions\n\t\t\t\t\t\t\t\tprocess = special ?\n\t\t\t\t\t\t\t\t\tmightThrow :\n\t\t\t\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\tmightThrow();\n\t\t\t\t\t\t\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t\t\t\t\t\t\tif ( jQuery.Deferred.exceptionHook ) {\n\t\t\t\t\t\t\t\t\t\t\t\tjQuery.Deferred.exceptionHook( e,\n\t\t\t\t\t\t\t\t\t\t\t\t\tprocess.error );\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.4.1\n\t\t\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-61\n\t\t\t\t\t\t\t\t\t\t\t// Ignore post-resolution exceptions\n\t\t\t\t\t\t\t\t\t\t\tif ( depth + 1 >= maxDepth ) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t// Only substitute handlers pass on context\n\t\t\t\t\t\t\t\t\t\t\t\t// and multiple values (non-spec behavior)\n\t\t\t\t\t\t\t\t\t\t\t\tif ( handler !== Thrower ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tthat = undefined;\n\t\t\t\t\t\t\t\t\t\t\t\t\targs = [ e ];\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\tdeferred.rejectWith( that, args );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.1\n\t\t\t\t\t\t\t// https://promisesaplus.com/#point-57\n\t\t\t\t\t\t\t// Re-resolve promises immediately to dodge false rejection from\n\t\t\t\t\t\t\t// subsequent errors\n\t\t\t\t\t\t\tif ( depth ) {\n\t\t\t\t\t\t\t\tprocess();\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t// Call an optional hook to record the error, in case of exception\n\t\t\t\t\t\t\t\t// since it's otherwise lost when execution goes async\n\t\t\t\t\t\t\t\tif ( jQuery.Deferred.getErrorHook ) {\n\t\t\t\t\t\t\t\t\tprocess.error = jQuery.Deferred.getErrorHook();\n\n\t\t\t\t\t\t\t\t// The deprecated alias of the above. While the name suggests\n\t\t\t\t\t\t\t\t// returning the stack, not an error instance, jQuery just passes\n\t\t\t\t\t\t\t\t// it directly to `console.warn` so both will work; an instance\n\t\t\t\t\t\t\t\t// just better cooperates with source maps.\n\t\t\t\t\t\t\t\t} else if ( jQuery.Deferred.getStackHook ) {\n\t\t\t\t\t\t\t\t\tprocess.error = jQuery.Deferred.getStackHook();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\twindow.setTimeout( process );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\n\t\t\t\t\t\t// progress_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 0 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onProgress ) ?\n\t\t\t\t\t\t\t\t\tonProgress :\n\t\t\t\t\t\t\t\t\tIdentity,\n\t\t\t\t\t\t\t\tnewDefer.notifyWith\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// fulfilled_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 1 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onFulfilled ) ?\n\t\t\t\t\t\t\t\t\tonFulfilled :\n\t\t\t\t\t\t\t\t\tIdentity\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// rejected_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 2 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onRejected ) ?\n\t\t\t\t\t\t\t\t\tonRejected :\n\t\t\t\t\t\t\t\t\tThrower\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\n\t\t\t\t// Get a promise for this deferred\n\t\t\t\t// If obj is provided, the promise aspect is added to the object\n\t\t\t\tpromise: function( obj ) {\n\t\t\t\t\treturn obj != null ? jQuery.extend( obj, promise ) : promise;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdeferred = {};\n\n\t\t// Add list-specific methods\n\t\tjQuery.each( tuples, function( i, tuple ) {\n\t\t\tvar list = tuple[ 2 ],\n\t\t\t\tstateString = tuple[ 5 ];\n\n\t\t\t// promise.progress = list.add\n\t\t\t// promise.done = list.add\n\t\t\t// promise.fail = list.add\n\t\t\tpromise[ tuple[ 1 ] ] = list.add;\n\n\t\t\t// Handle state\n\t\t\tif ( stateString ) {\n\t\t\t\tlist.add(\n\t\t\t\t\tfunction() {\n\n\t\t\t\t\t\t// state = \"resolved\" (i.e., fulfilled)\n\t\t\t\t\t\t// state = \"rejected\"\n\t\t\t\t\t\tstate = stateString;\n\t\t\t\t\t},\n\n\t\t\t\t\t// rejected_callbacks.disable\n\t\t\t\t\t// fulfilled_callbacks.disable\n\t\t\t\t\ttuples[ 3 - i ][ 2 ].disable,\n\n\t\t\t\t\t// rejected_handlers.disable\n\t\t\t\t\t// fulfilled_handlers.disable\n\t\t\t\t\ttuples[ 3 - i ][ 3 ].disable,\n\n\t\t\t\t\t// progress_callbacks.lock\n\t\t\t\t\ttuples[ 0 ][ 2 ].lock,\n\n\t\t\t\t\t// progress_handlers.lock\n\t\t\t\t\ttuples[ 0 ][ 3 ].lock\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// progress_handlers.fire\n\t\t\t// fulfilled_handlers.fire\n\t\t\t// rejected_handlers.fire\n\t\t\tlist.add( tuple[ 3 ].fire );\n\n\t\t\t// deferred.notify = function() { deferred.notifyWith(...) }\n\t\t\t// deferred.resolve = function() { deferred.resolveWith(...) }\n\t\t\t// deferred.reject = function() { deferred.rejectWith(...) }\n\t\t\tdeferred[ tuple[ 0 ] ] = function() {\n\t\t\t\tdeferred[ tuple[ 0 ] + \"With\" ]( this === deferred ? undefined : this, arguments );\n\t\t\t\treturn this;\n\t\t\t};\n\n\t\t\t// deferred.notifyWith = list.fireWith\n\t\t\t// deferred.resolveWith = list.fireWith\n\t\t\t// deferred.rejectWith = list.fireWith\n\t\t\tdeferred[ tuple[ 0 ] + \"With\" ] = list.fireWith;\n\t\t} );\n\n\t\t// Make the deferred a promise\n\t\tpromise.promise( deferred );\n\n\t\t// Call given func if any\n\t\tif ( func ) {\n\t\t\tfunc.call( deferred, deferred );\n\t\t}\n\n\t\t// All done!\n\t\treturn deferred;\n\t},\n\n\t// Deferred helper\n\twhen: function( singleValue ) {\n\t\tvar\n\n\t\t\t// count of uncompleted subordinates\n\t\t\tremaining = arguments.length,\n\n\t\t\t// count of unprocessed arguments\n\t\t\ti = remaining,\n\n\t\t\t// subordinate fulfillment data\n\t\t\tresolveContexts = Array( i ),\n\t\t\tresolveValues = slice.call( arguments ),\n\n\t\t\t// the primary Deferred\n\t\t\tprimary = jQuery.Deferred(),\n\n\t\t\t// subordinate callback factory\n\t\t\tupdateFunc = function( i ) {\n\t\t\t\treturn function( value ) {\n\t\t\t\t\tresolveContexts[ i ] = this;\n\t\t\t\t\tresolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;\n\t\t\t\t\tif ( !( --remaining ) ) {\n\t\t\t\t\t\tprimary.resolveWith( resolveContexts, resolveValues );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t};\n\n\t\t// Single- and empty arguments are adopted like Promise.resolve\n\t\tif ( remaining <= 1 ) {\n\t\t\tadoptValue( singleValue, primary.done( updateFunc( i ) ).resolve, primary.reject,\n\t\t\t\t!remaining );\n\n\t\t\t// Use .then() to unwrap secondary thenables (cf. gh-3000)\n\t\t\tif ( primary.state() === \"pending\" ||\n\t\t\t\tisFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {\n\n\t\t\t\treturn primary.then();\n\t\t\t}\n\t\t}\n\n\t\t// Multiple arguments are aggregated like Promise.all array elements\n\t\twhile ( i-- ) {\n\t\t\tadoptValue( resolveValues[ i ], updateFunc( i ), primary.reject );\n\t\t}\n\n\t\treturn primary.promise();\n\t}\n} );\n\n\n// These usually indicate a programmer mistake during development,\n// warn about them ASAP rather than swallowing them by default.\nvar rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;\n\n// If `jQuery.Deferred.getErrorHook` is defined, `asyncError` is an error\n// captured before the async barrier to get the original error cause\n// which may otherwise be hidden.\njQuery.Deferred.exceptionHook = function( error, asyncError ) {\n\n\t// Support: IE 8 - 9 only\n\t// Console exists when dev tools are open, which can happen at any time\n\tif ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {\n\t\twindow.console.warn( \"jQuery.Deferred exception: \" + error.message,\n\t\t\terror.stack, asyncError );\n\t}\n};\n\n\n\n\njQuery.readyException = function( error ) {\n\twindow.setTimeout( function() {\n\t\tthrow error;\n\t} );\n};\n\n\n\n\n// The deferred used on DOM ready\nvar readyList = jQuery.Deferred();\n\njQuery.fn.ready = function( fn ) {\n\n\treadyList\n\t\t.then( fn )\n\n\t\t// Wrap jQuery.readyException in a function so that the lookup\n\t\t// happens at the time of error handling instead of callback\n\t\t// registration.\n\t\t.catch( function( error ) {\n\t\t\tjQuery.readyException( error );\n\t\t} );\n\n\treturn this;\n};\n\njQuery.extend( {\n\n\t// Is the DOM ready to be used? Set to true once it occurs.\n\tisReady: false,\n\n\t// A counter to track how many items to wait for before\n\t// the ready event fires. See trac-6781\n\treadyWait: 1,\n\n\t// Handle when the DOM is ready\n\tready: function( wait ) {\n\n\t\t// Abort if there are pending holds or we're already ready\n\t\tif ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Remember that the DOM is ready\n\t\tjQuery.isReady = true;\n\n\t\t// If a normal DOM Ready event fired, decrement, and wait if need be\n\t\tif ( wait !== true && --jQuery.readyWait > 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If there are functions bound, to execute\n\t\treadyList.resolveWith( document, [ jQuery ] );\n\t}\n} );\n\njQuery.ready.then = readyList.then;\n\n// The ready event handler and self cleanup method\nfunction completed() {\n\tdocument.removeEventListener( \"DOMContentLoaded\", completed );\n\twindow.removeEventListener( \"load\", completed );\n\tjQuery.ready();\n}\n\n// Catch cases where $(document).ready() is called\n// after the browser event has already occurred.\n// Support: IE <=9 - 10 only\n// Older IE sometimes signals \"interactive\" too soon\nif ( document.readyState === \"complete\" ||\n\t( document.readyState !== \"loading\" && !document.documentElement.doScroll ) ) {\n\n\t// Handle it asynchronously to allow scripts the opportunity to delay ready\n\twindow.setTimeout( jQuery.ready );\n\n} else {\n\n\t// Use the handy event callback\n\tdocument.addEventListener( \"DOMContentLoaded\", completed );\n\n\t// A fallback to window.onload, that will always work\n\twindow.addEventListener( \"load\", completed );\n}\n\n\n\n\n// Multifunctional method to get and set values of a collection\n// The value/s can optionally be executed if it's a function\nvar access = function( elems, fn, key, value, chainable, emptyGet, raw ) {\n\tvar i = 0,\n\t\tlen = elems.length,\n\t\tbulk = key == null;\n\n\t// Sets many values\n\tif ( toType( key ) === \"object\" ) {\n\t\tchainable = true;\n\t\tfor ( i in key ) {\n\t\t\taccess( elems, fn, i, key[ i ], true, emptyGet, raw );\n\t\t}\n\n\t// Sets one value\n\t} else if ( value !== undefined ) {\n\t\tchainable = true;\n\n\t\tif ( !isFunction( value ) ) {\n\t\t\traw = true;\n\t\t}\n\n\t\tif ( bulk ) {\n\n\t\t\t// Bulk operations run against the entire set\n\t\t\tif ( raw ) {\n\t\t\t\tfn.call( elems, value );\n\t\t\t\tfn = null;\n\n\t\t\t// ...except when executing function values\n\t\t\t} else {\n\t\t\t\tbulk = fn;\n\t\t\t\tfn = function( elem, _key, value ) {\n\t\t\t\t\treturn bulk.call( jQuery( elem ), value );\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tif ( fn ) {\n\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\tfn(\n\t\t\t\t\telems[ i ], key, raw ?\n\t\t\t\t\t\tvalue :\n\t\t\t\t\t\tvalue.call( elems[ i ], i, fn( elems[ i ], key ) )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( chainable ) {\n\t\treturn elems;\n\t}\n\n\t// Gets\n\tif ( bulk ) {\n\t\treturn fn.call( elems );\n\t}\n\n\treturn len ? fn( elems[ 0 ], key ) : emptyGet;\n};\n\n\n// Matches dashed string for camelizing\nvar rmsPrefix = /^-ms-/,\n\trdashAlpha = /-([a-z])/g;\n\n// Used by camelCase as callback to replace()\nfunction fcamelCase( _all, letter ) {\n\treturn letter.toUpperCase();\n}\n\n// Convert dashed to camelCase; used by the css and data modules\n// Support: IE <=9 - 11, Edge 12 - 15\n// Microsoft forgot to hump their vendor prefix (trac-9572)\nfunction camelCase( string ) {\n\treturn string.replace( rmsPrefix, \"ms-\" ).replace( rdashAlpha, fcamelCase );\n}\nvar acceptData = function( owner ) {\n\n\t// Accepts only:\n\t//  - Node\n\t//    - Node.ELEMENT_NODE\n\t//    - Node.DOCUMENT_NODE\n\t//  - Object\n\t//    - Any\n\treturn owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );\n};\n\n\n\n\nfunction Data() {\n\tthis.expando = jQuery.expando + Data.uid++;\n}\n\nData.uid = 1;\n\nData.prototype = {\n\n\tcache: function( owner ) {\n\n\t\t// Check if the owner object already has a cache\n\t\tvar value = owner[ this.expando ];\n\n\t\t// If not, create one\n\t\tif ( !value ) {\n\t\t\tvalue = {};\n\n\t\t\t// We can accept data for non-element nodes in modern browsers,\n\t\t\t// but we should not, see trac-8335.\n\t\t\t// Always return an empty object.\n\t\t\tif ( acceptData( owner ) ) {\n\n\t\t\t\t// If it is a node unlikely to be stringify-ed or looped over\n\t\t\t\t// use plain assignment\n\t\t\t\tif ( owner.nodeType ) {\n\t\t\t\t\towner[ this.expando ] = value;\n\n\t\t\t\t// Otherwise secure it in a non-enumerable property\n\t\t\t\t// configurable must be true to allow the property to be\n\t\t\t\t// deleted when data is removed\n\t\t\t\t} else {\n\t\t\t\t\tObject.defineProperty( owner, this.expando, {\n\t\t\t\t\t\tvalue: value,\n\t\t\t\t\t\tconfigurable: true\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn value;\n\t},\n\tset: function( owner, data, value ) {\n\t\tvar prop,\n\t\t\tcache = this.cache( owner );\n\n\t\t// Handle: [ owner, key, value ] args\n\t\t// Always use camelCase key (gh-2257)\n\t\tif ( typeof data === \"string\" ) {\n\t\t\tcache[ camelCase( data ) ] = value;\n\n\t\t// Handle: [ owner, { properties } ] args\n\t\t} else {\n\n\t\t\t// Copy the properties one-by-one to the cache object\n\t\t\tfor ( prop in data ) {\n\t\t\t\tcache[ camelCase( prop ) ] = data[ prop ];\n\t\t\t}\n\t\t}\n\t\treturn cache;\n\t},\n\tget: function( owner, key ) {\n\t\treturn key === undefined ?\n\t\t\tthis.cache( owner ) :\n\n\t\t\t// Always use camelCase key (gh-2257)\n\t\t\towner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ];\n\t},\n\taccess: function( owner, key, value ) {\n\n\t\t// In cases where either:\n\t\t//\n\t\t//   1. No key was specified\n\t\t//   2. A string key was specified, but no value provided\n\t\t//\n\t\t// Take the \"read\" path and allow the get method to determine\n\t\t// which value to return, respectively either:\n\t\t//\n\t\t//   1. The entire cache object\n\t\t//   2. The data stored at the key\n\t\t//\n\t\tif ( key === undefined ||\n\t\t\t\t( ( key && typeof key === \"string\" ) && value === undefined ) ) {\n\n\t\t\treturn this.get( owner, key );\n\t\t}\n\n\t\t// When the key is not a string, or both a key and value\n\t\t// are specified, set or extend (existing objects) with either:\n\t\t//\n\t\t//   1. An object of properties\n\t\t//   2. A key and value\n\t\t//\n\t\tthis.set( owner, key, value );\n\n\t\t// Since the \"set\" path can have two possible entry points\n\t\t// return the expected data based on which path was taken[*]\n\t\treturn value !== undefined ? value : key;\n\t},\n\tremove: function( owner, key ) {\n\t\tvar i,\n\t\t\tcache = owner[ this.expando ];\n\n\t\tif ( cache === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( key !== undefined ) {\n\n\t\t\t// Support array or space separated string of keys\n\t\t\tif ( Array.isArray( key ) ) {\n\n\t\t\t\t// If key is an array of keys...\n\t\t\t\t// We always set camelCase keys, so remove that.\n\t\t\t\tkey = key.map( camelCase );\n\t\t\t} else {\n\t\t\t\tkey = camelCase( key );\n\n\t\t\t\t// If a key with the spaces exists, use it.\n\t\t\t\t// Otherwise, create an array by matching non-whitespace\n\t\t\t\tkey = key in cache ?\n\t\t\t\t\t[ key ] :\n\t\t\t\t\t( key.match( rnothtmlwhite ) || [] );\n\t\t\t}\n\n\t\t\ti = key.length;\n\n\t\t\twhile ( i-- ) {\n\t\t\t\tdelete cache[ key[ i ] ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove the expando if there's no more data\n\t\tif ( key === undefined || jQuery.isEmptyObject( cache ) ) {\n\n\t\t\t// Support: Chrome <=35 - 45\n\t\t\t// Webkit & Blink performance suffers when deleting properties\n\t\t\t// from DOM nodes, so set to undefined instead\n\t\t\t// https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)\n\t\t\tif ( owner.nodeType ) {\n\t\t\t\towner[ this.expando ] = undefined;\n\t\t\t} else {\n\t\t\t\tdelete owner[ this.expando ];\n\t\t\t}\n\t\t}\n\t},\n\thasData: function( owner ) {\n\t\tvar cache = owner[ this.expando ];\n\t\treturn cache !== undefined && !jQuery.isEmptyObject( cache );\n\t}\n};\nvar dataPriv = new Data();\n\nvar dataUser = new Data();\n\n\n\n//\tImplementation Summary\n//\n//\t1. Enforce API surface and semantic compatibility with 1.9.x branch\n//\t2. Improve the module's maintainability by reducing the storage\n//\t\tpaths to a single mechanism.\n//\t3. Use the same single mechanism to support \"private\" and \"user\" data.\n//\t4. _Never_ expose \"private\" data to user code (TODO: Drop _data, _removeData)\n//\t5. Avoid exposing implementation details on user objects (eg. expando properties)\n//\t6. Provide a clear path for implementation upgrade to WeakMap in 2014\n\nvar rbrace = /^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,\n\trmultiDash = /[A-Z]/g;\n\nfunction getData( data ) {\n\tif ( data === \"true\" ) {\n\t\treturn true;\n\t}\n\n\tif ( data === \"false\" ) {\n\t\treturn false;\n\t}\n\n\tif ( data === \"null\" ) {\n\t\treturn null;\n\t}\n\n\t// Only convert to a number if it doesn't change the string\n\tif ( data === +data + \"\" ) {\n\t\treturn +data;\n\t}\n\n\tif ( rbrace.test( data ) ) {\n\t\treturn JSON.parse( data );\n\t}\n\n\treturn data;\n}\n\nfunction dataAttr( elem, key, data ) {\n\tvar name;\n\n\t// If nothing was found internally, try to fetch any\n\t// data from the HTML5 data-* attribute\n\tif ( data === undefined && elem.nodeType === 1 ) {\n\t\tname = \"data-\" + key.replace( rmultiDash, \"-$&\" ).toLowerCase();\n\t\tdata = elem.getAttribute( name );\n\n\t\tif ( typeof data === \"string\" ) {\n\t\t\ttry {\n\t\t\t\tdata = getData( data );\n\t\t\t} catch ( e ) {}\n\n\t\t\t// Make sure we set the data so it isn't changed later\n\t\t\tdataUser.set( elem, key, data );\n\t\t} else {\n\t\t\tdata = undefined;\n\t\t}\n\t}\n\treturn data;\n}\n\njQuery.extend( {\n\thasData: function( elem ) {\n\t\treturn dataUser.hasData( elem ) || dataPriv.hasData( elem );\n\t},\n\n\tdata: function( elem, name, data ) {\n\t\treturn dataUser.access( elem, name, data );\n\t},\n\n\tremoveData: function( elem, name ) {\n\t\tdataUser.remove( elem, name );\n\t},\n\n\t// TODO: Now that all calls to _data and _removeData have been replaced\n\t// with direct calls to dataPriv methods, these can be deprecated.\n\t_data: function( elem, name, data ) {\n\t\treturn dataPriv.access( elem, name, data );\n\t},\n\n\t_removeData: function( elem, name ) {\n\t\tdataPriv.remove( elem, name );\n\t}\n} );\n\njQuery.fn.extend( {\n\tdata: function( key, value ) {\n\t\tvar i, name, data,\n\t\t\telem = this[ 0 ],\n\t\t\tattrs = elem && elem.attributes;\n\n\t\t// Gets all values\n\t\tif ( key === undefined ) {\n\t\t\tif ( this.length ) {\n\t\t\t\tdata = dataUser.get( elem );\n\n\t\t\t\tif ( elem.nodeType === 1 && !dataPriv.get( elem, \"hasDataAttrs\" ) ) {\n\t\t\t\t\ti = attrs.length;\n\t\t\t\t\twhile ( i-- ) {\n\n\t\t\t\t\t\t// Support: IE 11 only\n\t\t\t\t\t\t// The attrs elements can be null (trac-14894)\n\t\t\t\t\t\tif ( attrs[ i ] ) {\n\t\t\t\t\t\t\tname = attrs[ i ].name;\n\t\t\t\t\t\t\tif ( name.indexOf( \"data-\" ) === 0 ) {\n\t\t\t\t\t\t\t\tname = camelCase( name.slice( 5 ) );\n\t\t\t\t\t\t\t\tdataAttr( elem, name, data[ name ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tdataPriv.set( elem, \"hasDataAttrs\", true );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn data;\n\t\t}\n\n\t\t// Sets multiple values\n\t\tif ( typeof key === \"object\" ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tdataUser.set( this, key );\n\t\t\t} );\n\t\t}\n\n\t\treturn access( this, function( value ) {\n\t\t\tvar data;\n\n\t\t\t// The calling jQuery object (element matches) is not empty\n\t\t\t// (and therefore has an element appears at this[ 0 ]) and the\n\t\t\t// `value` parameter was not undefined. An empty jQuery object\n\t\t\t// will result in `undefined` for elem = this[ 0 ] which will\n\t\t\t// throw an exception if an attempt to read a data cache is made.\n\t\t\tif ( elem && value === undefined ) {\n\n\t\t\t\t// Attempt to get data from the cache\n\t\t\t\t// The key will always be camelCased in Data\n\t\t\t\tdata = dataUser.get( elem, key );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// Attempt to \"discover\" the data in\n\t\t\t\t// HTML5 custom data-* attrs\n\t\t\t\tdata = dataAttr( elem, key );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// We tried really hard, but the data doesn't exist.\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Set the data...\n\t\t\tthis.each( function() {\n\n\t\t\t\t// We always store the camelCased key\n\t\t\t\tdataUser.set( this, key, value );\n\t\t\t} );\n\t\t}, null, value, arguments.length > 1, null, true );\n\t},\n\n\tremoveData: function( key ) {\n\t\treturn this.each( function() {\n\t\t\tdataUser.remove( this, key );\n\t\t} );\n\t}\n} );\n\n\njQuery.extend( {\n\tqueue: function( elem, type, data ) {\n\t\tvar queue;\n\n\t\tif ( elem ) {\n\t\t\ttype = ( type || \"fx\" ) + \"queue\";\n\t\t\tqueue = dataPriv.get( elem, type );\n\n\t\t\t// Speed up dequeue by getting out quickly if this is just a lookup\n\t\t\tif ( data ) {\n\t\t\t\tif ( !queue || Array.isArray( data ) ) {\n\t\t\t\t\tqueue = dataPriv.access( elem, type, jQuery.makeArray( data ) );\n\t\t\t\t} else {\n\t\t\t\t\tqueue.push( data );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn queue || [];\n\t\t}\n\t},\n\n\tdequeue: function( elem, type ) {\n\t\ttype = type || \"fx\";\n\n\t\tvar queue = jQuery.queue( elem, type ),\n\t\t\tstartLength = queue.length,\n\t\t\tfn = queue.shift(),\n\t\t\thooks = jQuery._queueHooks( elem, type ),\n\t\t\tnext = function() {\n\t\t\t\tjQuery.dequeue( elem, type );\n\t\t\t};\n\n\t\t// If the fx queue is dequeued, always remove the progress sentinel\n\t\tif ( fn === \"inprogress\" ) {\n\t\t\tfn = queue.shift();\n\t\t\tstartLength--;\n\t\t}\n\n\t\tif ( fn ) {\n\n\t\t\t// Add a progress sentinel to prevent the fx queue from being\n\t\t\t// automatically dequeued\n\t\t\tif ( type === \"fx\" ) {\n\t\t\t\tqueue.unshift( \"inprogress\" );\n\t\t\t}\n\n\t\t\t// Clear up the last queue stop function\n\t\t\tdelete hooks.stop;\n\t\t\tfn.call( elem, next, hooks );\n\t\t}\n\n\t\tif ( !startLength && hooks ) {\n\t\t\thooks.empty.fire();\n\t\t}\n\t},\n\n\t// Not public - generate a queueHooks object, or return the current one\n\t_queueHooks: function( elem, type ) {\n\t\tvar key = type + \"queueHooks\";\n\t\treturn dataPriv.get( elem, key ) || dataPriv.access( elem, key, {\n\t\t\tempty: jQuery.Callbacks( \"once memory\" ).add( function() {\n\t\t\t\tdataPriv.remove( elem, [ type + \"queue\", key ] );\n\t\t\t} )\n\t\t} );\n\t}\n} );\n\njQuery.fn.extend( {\n\tqueue: function( type, data ) {\n\t\tvar setter = 2;\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tdata = type;\n\t\t\ttype = \"fx\";\n\t\t\tsetter--;\n\t\t}\n\n\t\tif ( arguments.length < setter ) {\n\t\t\treturn jQuery.queue( this[ 0 ], type );\n\t\t}\n\n\t\treturn data === undefined ?\n\t\t\tthis :\n\t\t\tthis.each( function() {\n\t\t\t\tvar queue = jQuery.queue( this, type, data );\n\n\t\t\t\t// Ensure a hooks for this queue\n\t\t\t\tjQuery._queueHooks( this, type );\n\n\t\t\t\tif ( type === \"fx\" && queue[ 0 ] !== \"inprogress\" ) {\n\t\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t\t}\n\t\t\t} );\n\t},\n\tdequeue: function( type ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.dequeue( this, type );\n\t\t} );\n\t},\n\tclearQueue: function( type ) {\n\t\treturn this.queue( type || \"fx\", [] );\n\t},\n\n\t// Get a promise resolved when queues of a certain type\n\t// are emptied (fx is the type by default)\n\tpromise: function( type, obj ) {\n\t\tvar tmp,\n\t\t\tcount = 1,\n\t\t\tdefer = jQuery.Deferred(),\n\t\t\telements = this,\n\t\t\ti = this.length,\n\t\t\tresolve = function() {\n\t\t\t\tif ( !( --count ) ) {\n\t\t\t\t\tdefer.resolveWith( elements, [ elements ] );\n\t\t\t\t}\n\t\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tobj = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\ttype = type || \"fx\";\n\n\t\twhile ( i-- ) {\n\t\t\ttmp = dataPriv.get( elements[ i ], type + \"queueHooks\" );\n\t\t\tif ( tmp && tmp.empty ) {\n\t\t\t\tcount++;\n\t\t\t\ttmp.empty.add( resolve );\n\t\t\t}\n\t\t}\n\t\tresolve();\n\t\treturn defer.promise( obj );\n\t}\n} );\nvar pnum = ( /[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/ ).source;\n\nvar rcssNum = new RegExp( \"^(?:([+-])=|)(\" + pnum + \")([a-z%]*)$\", \"i\" );\n\n\nvar cssExpand = [ \"Top\", \"Right\", \"Bottom\", \"Left\" ];\n\nvar documentElement = document.documentElement;\n\n\n\n\tvar isAttached = function( elem ) {\n\t\t\treturn jQuery.contains( elem.ownerDocument, elem );\n\t\t},\n\t\tcomposed = { composed: true };\n\n\t// Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only\n\t// Check attachment across shadow DOM boundaries when possible (gh-3504)\n\t// Support: iOS 10.0-10.2 only\n\t// Early iOS 10 versions support `attachShadow` but not `getRootNode`,\n\t// leading to errors. We need to check for `getRootNode`.\n\tif ( documentElement.getRootNode ) {\n\t\tisAttached = function( elem ) {\n\t\t\treturn jQuery.contains( elem.ownerDocument, elem ) ||\n\t\t\t\telem.getRootNode( composed ) === elem.ownerDocument;\n\t\t};\n\t}\nvar isHiddenWithinTree = function( elem, el ) {\n\n\t\t// isHiddenWithinTree might be called from jQuery#filter function;\n\t\t// in that case, element will be second argument\n\t\telem = el || elem;\n\n\t\t// Inline style trumps all\n\t\treturn elem.style.display === \"none\" ||\n\t\t\telem.style.display === \"\" &&\n\n\t\t\t// Otherwise, check computed style\n\t\t\t// Support: Firefox <=43 - 45\n\t\t\t// Disconnected elements can have computed display: none, so first confirm that elem is\n\t\t\t// in the document.\n\t\t\tisAttached( elem ) &&\n\n\t\t\tjQuery.css( elem, \"display\" ) === \"none\";\n\t};\n\n\n\nfunction adjustCSS( elem, prop, valueParts, tween ) {\n\tvar adjusted, scale,\n\t\tmaxIterations = 20,\n\t\tcurrentValue = tween ?\n\t\t\tfunction() {\n\t\t\t\treturn tween.cur();\n\t\t\t} :\n\t\t\tfunction() {\n\t\t\t\treturn jQuery.css( elem, prop, \"\" );\n\t\t\t},\n\t\tinitial = currentValue(),\n\t\tunit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" ),\n\n\t\t// Starting value computation is required for potential unit mismatches\n\t\tinitialInUnit = elem.nodeType &&\n\t\t\t( jQuery.cssNumber[ prop ] || unit !== \"px\" && +initial ) &&\n\t\t\trcssNum.exec( jQuery.css( elem, prop ) );\n\n\tif ( initialInUnit && initialInUnit[ 3 ] !== unit ) {\n\n\t\t// Support: Firefox <=54\n\t\t// Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144)\n\t\tinitial = initial / 2;\n\n\t\t// Trust units reported by jQuery.css\n\t\tunit = unit || initialInUnit[ 3 ];\n\n\t\t// Iteratively approximate from a nonzero starting point\n\t\tinitialInUnit = +initial || 1;\n\n\t\twhile ( maxIterations-- ) {\n\n\t\t\t// Evaluate and update our best guess (doubling guesses that zero out).\n\t\t\t// Finish if the scale equals or crosses 1 (making the old*new product non-positive).\n\t\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\t\t\tif ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) {\n\t\t\t\tmaxIterations = 0;\n\t\t\t}\n\t\t\tinitialInUnit = initialInUnit / scale;\n\n\t\t}\n\n\t\tinitialInUnit = initialInUnit * 2;\n\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\n\t\t// Make sure we update the tween properties later on\n\t\tvalueParts = valueParts || [];\n\t}\n\n\tif ( valueParts ) {\n\t\tinitialInUnit = +initialInUnit || +initial || 0;\n\n\t\t// Apply relative offset (+=/-=) if specified\n\t\tadjusted = valueParts[ 1 ] ?\n\t\t\tinitialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :\n\t\t\t+valueParts[ 2 ];\n\t\tif ( tween ) {\n\t\t\ttween.unit = unit;\n\t\t\ttween.start = initialInUnit;\n\t\t\ttween.end = adjusted;\n\t\t}\n\t}\n\treturn adjusted;\n}\n\n\nvar defaultDisplayMap = {};\n\nfunction getDefaultDisplay( elem ) {\n\tvar temp,\n\t\tdoc = elem.ownerDocument,\n\t\tnodeName = elem.nodeName,\n\t\tdisplay = defaultDisplayMap[ nodeName ];\n\n\tif ( display ) {\n\t\treturn display;\n\t}\n\n\ttemp = doc.body.appendChild( doc.createElement( nodeName ) );\n\tdisplay = jQuery.css( temp, \"display\" );\n\n\ttemp.parentNode.removeChild( temp );\n\n\tif ( display === \"none\" ) {\n\t\tdisplay = \"block\";\n\t}\n\tdefaultDisplayMap[ nodeName ] = display;\n\n\treturn display;\n}\n\nfunction showHide( elements, show ) {\n\tvar display, elem,\n\t\tvalues = [],\n\t\tindex = 0,\n\t\tlength = elements.length;\n\n\t// Determine new display value for elements that need to change\n\tfor ( ; index < length; index++ ) {\n\t\telem = elements[ index ];\n\t\tif ( !elem.style ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tdisplay = elem.style.display;\n\t\tif ( show ) {\n\n\t\t\t// Since we force visibility upon cascade-hidden elements, an immediate (and slow)\n\t\t\t// check is required in this first loop unless we have a nonempty display value (either\n\t\t\t// inline or about-to-be-restored)\n\t\t\tif ( display === \"none\" ) {\n\t\t\t\tvalues[ index ] = dataPriv.get( elem, \"display\" ) || null;\n\t\t\t\tif ( !values[ index ] ) {\n\t\t\t\t\telem.style.display = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( elem.style.display === \"\" && isHiddenWithinTree( elem ) ) {\n\t\t\t\tvalues[ index ] = getDefaultDisplay( elem );\n\t\t\t}\n\t\t} else {\n\t\t\tif ( display !== \"none\" ) {\n\t\t\t\tvalues[ index ] = \"none\";\n\n\t\t\t\t// Remember what we're overwriting\n\t\t\t\tdataPriv.set( elem, \"display\", display );\n\t\t\t}\n\t\t}\n\t}\n\n\t// Set the display of the elements in a second loop to avoid constant reflow\n\tfor ( index = 0; index < length; index++ ) {\n\t\tif ( values[ index ] != null ) {\n\t\t\telements[ index ].style.display = values[ index ];\n\t\t}\n\t}\n\n\treturn elements;\n}\n\njQuery.fn.extend( {\n\tshow: function() {\n\t\treturn showHide( this, true );\n\t},\n\thide: function() {\n\t\treturn showHide( this );\n\t},\n\ttoggle: function( state ) {\n\t\tif ( typeof state === \"boolean\" ) {\n\t\t\treturn state ? this.show() : this.hide();\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tif ( isHiddenWithinTree( this ) ) {\n\t\t\t\tjQuery( this ).show();\n\t\t\t} else {\n\t\t\t\tjQuery( this ).hide();\n\t\t\t}\n\t\t} );\n\t}\n} );\nvar rcheckableType = ( /^(?:checkbox|radio)$/i );\n\nvar rtagName = ( /<([a-z][^\\/\\0>\\x20\\t\\r\\n\\f]*)/i );\n\nvar rscriptType = ( /^$|^module$|\\/(?:java|ecma)script/i );\n\n\n\n( function() {\n\tvar fragment = document.createDocumentFragment(),\n\t\tdiv = fragment.appendChild( document.createElement( \"div\" ) ),\n\t\tinput = document.createElement( \"input\" );\n\n\t// Support: Android 4.0 - 4.3 only\n\t// Check state lost if the name is set (trac-11217)\n\t// Support: Windows Web Apps (WWA)\n\t// `name` and `type` must use .setAttribute for WWA (trac-14901)\n\tinput.setAttribute( \"type\", \"radio\" );\n\tinput.setAttribute( \"checked\", \"checked\" );\n\tinput.setAttribute( \"name\", \"t\" );\n\n\tdiv.appendChild( input );\n\n\t// Support: Android <=4.1 only\n\t// Older WebKit doesn't clone checked state correctly in fragments\n\tsupport.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;\n\n\t// Support: IE <=11 only\n\t// Make sure textarea (and checkbox) defaultValue is properly cloned\n\tdiv.innerHTML = \"<textarea>x</textarea>\";\n\tsupport.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;\n\n\t// Support: IE <=9 only\n\t// IE <=9 replaces <option> tags with their contents when inserted outside of\n\t// the select element.\n\tdiv.innerHTML = \"<option></option>\";\n\tsupport.option = !!div.lastChild;\n} )();\n\n\n// We have to close these tags to support XHTML (trac-13200)\nvar wrapMap = {\n\n\t// XHTML parsers do not magically insert elements in the\n\t// same way that tag soup parsers do. So we cannot shorten\n\t// this by omitting <tbody> or other required elements.\n\tthead: [ 1, \"<table>\", \"</table>\" ],\n\tcol: [ 2, \"<table><colgroup>\", \"</colgroup></table>\" ],\n\ttr: [ 2, \"<table><tbody>\", \"</tbody></table>\" ],\n\ttd: [ 3, \"<table><tbody><tr>\", \"</tr></tbody></table>\" ],\n\n\t_default: [ 0, \"\", \"\" ]\n};\n\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\nwrapMap.th = wrapMap.td;\n\n// Support: IE <=9 only\nif ( !support.option ) {\n\twrapMap.optgroup = wrapMap.option = [ 1, \"<select multiple='multiple'>\", \"</select>\" ];\n}\n\n\nfunction getAll( context, tag ) {\n\n\t// Support: IE <=9 - 11 only\n\t// Use typeof to avoid zero-argument method invocation on host objects (trac-15151)\n\tvar ret;\n\n\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\tret = context.getElementsByTagName( tag || \"*\" );\n\n\t} else if ( typeof context.querySelectorAll !== \"undefined\" ) {\n\t\tret = context.querySelectorAll( tag || \"*\" );\n\n\t} else {\n\t\tret = [];\n\t}\n\n\tif ( tag === undefined || tag && nodeName( context, tag ) ) {\n\t\treturn jQuery.merge( [ context ], ret );\n\t}\n\n\treturn ret;\n}\n\n\n// Mark scripts as having already been evaluated\nfunction setGlobalEval( elems, refElements ) {\n\tvar i = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\tdataPriv.set(\n\t\t\telems[ i ],\n\t\t\t\"globalEval\",\n\t\t\t!refElements || dataPriv.get( refElements[ i ], \"globalEval\" )\n\t\t);\n\t}\n}\n\n\nvar rhtml = /<|&#?\\w+;/;\n\nfunction buildFragment( elems, context, scripts, selection, ignored ) {\n\tvar elem, tmp, tag, wrap, attached, j,\n\t\tfragment = context.createDocumentFragment(),\n\t\tnodes = [],\n\t\ti = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\telem = elems[ i ];\n\n\t\tif ( elem || elem === 0 ) {\n\n\t\t\t// Add nodes directly\n\t\t\tif ( toType( elem ) === \"object\" ) {\n\n\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );\n\n\t\t\t// Convert non-html into a text node\n\t\t\t} else if ( !rhtml.test( elem ) ) {\n\t\t\t\tnodes.push( context.createTextNode( elem ) );\n\n\t\t\t// Convert html into DOM nodes\n\t\t\t} else {\n\t\t\t\ttmp = tmp || fragment.appendChild( context.createElement( \"div\" ) );\n\n\t\t\t\t// Deserialize a standard representation\n\t\t\t\ttag = ( rtagName.exec( elem ) || [ \"\", \"\" ] )[ 1 ].toLowerCase();\n\t\t\t\twrap = wrapMap[ tag ] || wrapMap._default;\n\t\t\t\ttmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];\n\n\t\t\t\t// Descend through wrappers to the right content\n\t\t\t\tj = wrap[ 0 ];\n\t\t\t\twhile ( j-- ) {\n\t\t\t\t\ttmp = tmp.lastChild;\n\t\t\t\t}\n\n\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, tmp.childNodes );\n\n\t\t\t\t// Remember the top-level container\n\t\t\t\ttmp = fragment.firstChild;\n\n\t\t\t\t// Ensure the created nodes are orphaned (trac-12392)\n\t\t\t\ttmp.textContent = \"\";\n\t\t\t}\n\t\t}\n\t}\n\n\t// Remove wrapper from fragment\n\tfragment.textContent = \"\";\n\n\ti = 0;\n\twhile ( ( elem = nodes[ i++ ] ) ) {\n\n\t\t// Skip elements already in the context collection (trac-4087)\n\t\tif ( selection && jQuery.inArray( elem, selection ) > -1 ) {\n\t\t\tif ( ignored ) {\n\t\t\t\tignored.push( elem );\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tattached = isAttached( elem );\n\n\t\t// Append to fragment\n\t\ttmp = getAll( fragment.appendChild( elem ), \"script\" );\n\n\t\t// Preserve script evaluation history\n\t\tif ( attached ) {\n\t\t\tsetGlobalEval( tmp );\n\t\t}\n\n\t\t// Capture executables\n\t\tif ( scripts ) {\n\t\t\tj = 0;\n\t\t\twhile ( ( elem = tmp[ j++ ] ) ) {\n\t\t\t\tif ( rscriptType.test( elem.type || \"\" ) ) {\n\t\t\t\t\tscripts.push( elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn fragment;\n}\n\n\nvar rtypenamespace = /^([^.]*)(?:\\.(.+)|)/;\n\nfunction returnTrue() {\n\treturn true;\n}\n\nfunction returnFalse() {\n\treturn false;\n}\n\nfunction on( elem, types, selector, data, fn, one ) {\n\tvar origFn, type;\n\n\t// Types can be a map of types/handlers\n\tif ( typeof types === \"object\" ) {\n\n\t\t// ( types-Object, selector, data )\n\t\tif ( typeof selector !== \"string\" ) {\n\n\t\t\t// ( types-Object, data )\n\t\t\tdata = data || selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tfor ( type in types ) {\n\t\t\ton( elem, type, selector, data, types[ type ], one );\n\t\t}\n\t\treturn elem;\n\t}\n\n\tif ( data == null && fn == null ) {\n\n\t\t// ( types, fn )\n\t\tfn = selector;\n\t\tdata = selector = undefined;\n\t} else if ( fn == null ) {\n\t\tif ( typeof selector === \"string\" ) {\n\n\t\t\t// ( types, selector, fn )\n\t\t\tfn = data;\n\t\t\tdata = undefined;\n\t\t} else {\n\n\t\t\t// ( types, data, fn )\n\t\t\tfn = data;\n\t\t\tdata = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t}\n\tif ( fn === false ) {\n\t\tfn = returnFalse;\n\t} else if ( !fn ) {\n\t\treturn elem;\n\t}\n\n\tif ( one === 1 ) {\n\t\torigFn = fn;\n\t\tfn = function( event ) {\n\n\t\t\t// Can use an empty set, since event contains the info\n\t\t\tjQuery().off( event );\n\t\t\treturn origFn.apply( this, arguments );\n\t\t};\n\n\t\t// Use same guid so caller can remove using origFn\n\t\tfn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );\n\t}\n\treturn elem.each( function() {\n\t\tjQuery.event.add( this, types, fn, data, selector );\n\t} );\n}\n\n/*\n * Helper functions for managing events -- not part of the public interface.\n * Props to Dean Edwards' addEvent library for many of the ideas.\n */\njQuery.event = {\n\n\tglobal: {},\n\n\tadd: function( elem, types, handler, data, selector ) {\n\n\t\tvar handleObjIn, eventHandle, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.get( elem );\n\n\t\t// Only attach events to objects that accept data\n\t\tif ( !acceptData( elem ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Caller can pass in an object of custom data in lieu of the handler\n\t\tif ( handler.handler ) {\n\t\t\thandleObjIn = handler;\n\t\t\thandler = handleObjIn.handler;\n\t\t\tselector = handleObjIn.selector;\n\t\t}\n\n\t\t// Ensure that invalid selectors throw exceptions at attach time\n\t\t// Evaluate against documentElement in case elem is a non-element node (e.g., document)\n\t\tif ( selector ) {\n\t\t\tjQuery.find.matchesSelector( documentElement, selector );\n\t\t}\n\n\t\t// Make sure that the handler has a unique ID, used to find/remove it later\n\t\tif ( !handler.guid ) {\n\t\t\thandler.guid = jQuery.guid++;\n\t\t}\n\n\t\t// Init the element's event structure and main handler, if this is the first\n\t\tif ( !( events = elemData.events ) ) {\n\t\t\tevents = elemData.events = Object.create( null );\n\t\t}\n\t\tif ( !( eventHandle = elemData.handle ) ) {\n\t\t\teventHandle = elemData.handle = function( e ) {\n\n\t\t\t\t// Discard the second event of a jQuery.event.trigger() and\n\t\t\t\t// when an event is called after a page has unloaded\n\t\t\t\treturn typeof jQuery !== \"undefined\" && jQuery.event.triggered !== e.type ?\n\t\t\t\t\tjQuery.event.dispatch.apply( elem, arguments ) : undefined;\n\t\t\t};\n\t\t}\n\n\t\t// Handle multiple events separated by a space\n\t\ttypes = ( types || \"\" ).match( rnothtmlwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// There *must* be a type, no attaching namespace-only handlers\n\t\t\tif ( !type ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If event changes its type, use the special event handlers for the changed type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// If selector defined, determine special event api type, otherwise given type\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\n\t\t\t// Update special based on newly reset type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// handleObj is passed to all event handlers\n\t\t\thandleObj = jQuery.extend( {\n\t\t\t\ttype: type,\n\t\t\t\torigType: origType,\n\t\t\t\tdata: data,\n\t\t\t\thandler: handler,\n\t\t\t\tguid: handler.guid,\n\t\t\t\tselector: selector,\n\t\t\t\tneedsContext: selector && jQuery.expr.match.needsContext.test( selector ),\n\t\t\t\tnamespace: namespaces.join( \".\" )\n\t\t\t}, handleObjIn );\n\n\t\t\t// Init the event handler queue if we're the first\n\t\t\tif ( !( handlers = events[ type ] ) ) {\n\t\t\t\thandlers = events[ type ] = [];\n\t\t\t\thandlers.delegateCount = 0;\n\n\t\t\t\t// Only use addEventListener if the special events handler returns false\n\t\t\t\tif ( !special.setup ||\n\t\t\t\t\tspecial.setup.call( elem, data, namespaces, eventHandle ) === false ) {\n\n\t\t\t\t\tif ( elem.addEventListener ) {\n\t\t\t\t\t\telem.addEventListener( type, eventHandle );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( special.add ) {\n\t\t\t\tspecial.add.call( elem, handleObj );\n\n\t\t\t\tif ( !handleObj.handler.guid ) {\n\t\t\t\t\thandleObj.handler.guid = handler.guid;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add to the element's handler list, delegates in front\n\t\t\tif ( selector ) {\n\t\t\t\thandlers.splice( handlers.delegateCount++, 0, handleObj );\n\t\t\t} else {\n\t\t\t\thandlers.push( handleObj );\n\t\t\t}\n\n\t\t\t// Keep track of which events have ever been used, for event optimization\n\t\t\tjQuery.event.global[ type ] = true;\n\t\t}\n\n\t},\n\n\t// Detach an event or set of events from an element\n\tremove: function( elem, types, handler, selector, mappedTypes ) {\n\n\t\tvar j, origCount, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.hasData( elem ) && dataPriv.get( elem );\n\n\t\tif ( !elemData || !( events = elemData.events ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Once for each type.namespace in types; type may be omitted\n\t\ttypes = ( types || \"\" ).match( rnothtmlwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// Unbind all events (on this namespace, if provided) for the element\n\t\t\tif ( !type ) {\n\t\t\t\tfor ( type in events ) {\n\t\t\t\t\tjQuery.event.remove( elem, type + types[ t ], handler, selector, true );\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\t\t\thandlers = events[ type ] || [];\n\t\t\ttmp = tmp[ 2 ] &&\n\t\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" );\n\n\t\t\t// Remove matching events\n\t\t\torigCount = j = handlers.length;\n\t\t\twhile ( j-- ) {\n\t\t\t\thandleObj = handlers[ j ];\n\n\t\t\t\tif ( ( mappedTypes || origType === handleObj.origType ) &&\n\t\t\t\t\t( !handler || handler.guid === handleObj.guid ) &&\n\t\t\t\t\t( !tmp || tmp.test( handleObj.namespace ) ) &&\n\t\t\t\t\t( !selector || selector === handleObj.selector ||\n\t\t\t\t\t\tselector === \"**\" && handleObj.selector ) ) {\n\t\t\t\t\thandlers.splice( j, 1 );\n\n\t\t\t\t\tif ( handleObj.selector ) {\n\t\t\t\t\t\thandlers.delegateCount--;\n\t\t\t\t\t}\n\t\t\t\t\tif ( special.remove ) {\n\t\t\t\t\t\tspecial.remove.call( elem, handleObj );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove generic event handler if we removed something and no more handlers exist\n\t\t\t// (avoids potential for endless recursion during removal of special event handlers)\n\t\t\tif ( origCount && !handlers.length ) {\n\t\t\t\tif ( !special.teardown ||\n\t\t\t\t\tspecial.teardown.call( elem, namespaces, elemData.handle ) === false ) {\n\n\t\t\t\t\tjQuery.removeEvent( elem, type, elemData.handle );\n\t\t\t\t}\n\n\t\t\t\tdelete events[ type ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove data and the expando if it's no longer used\n\t\tif ( jQuery.isEmptyObject( events ) ) {\n\t\t\tdataPriv.remove( elem, \"handle events\" );\n\t\t}\n\t},\n\n\tdispatch: function( nativeEvent ) {\n\n\t\tvar i, j, ret, matched, handleObj, handlerQueue,\n\t\t\targs = new Array( arguments.length ),\n\n\t\t\t// Make a writable jQuery.Event from the native event object\n\t\t\tevent = jQuery.event.fix( nativeEvent ),\n\n\t\t\thandlers = (\n\t\t\t\tdataPriv.get( this, \"events\" ) || Object.create( null )\n\t\t\t)[ event.type ] || [],\n\t\t\tspecial = jQuery.event.special[ event.type ] || {};\n\n\t\t// Use the fix-ed jQuery.Event rather than the (read-only) native event\n\t\targs[ 0 ] = event;\n\n\t\tfor ( i = 1; i < arguments.length; i++ ) {\n\t\t\targs[ i ] = arguments[ i ];\n\t\t}\n\n\t\tevent.delegateTarget = this;\n\n\t\t// Call the preDispatch hook for the mapped type, and let it bail if desired\n\t\tif ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine handlers\n\t\thandlerQueue = jQuery.event.handlers.call( this, event, handlers );\n\n\t\t// Run delegates first; they may want to stop propagation beneath us\n\t\ti = 0;\n\t\twhile ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tevent.currentTarget = matched.elem;\n\n\t\t\tj = 0;\n\t\t\twhile ( ( handleObj = matched.handlers[ j++ ] ) &&\n\t\t\t\t!event.isImmediatePropagationStopped() ) {\n\n\t\t\t\t// If the event is namespaced, then each handler is only invoked if it is\n\t\t\t\t// specially universal or its namespaces are a superset of the event's.\n\t\t\t\tif ( !event.rnamespace || handleObj.namespace === false ||\n\t\t\t\t\tevent.rnamespace.test( handleObj.namespace ) ) {\n\n\t\t\t\t\tevent.handleObj = handleObj;\n\t\t\t\t\tevent.data = handleObj.data;\n\n\t\t\t\t\tret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||\n\t\t\t\t\t\thandleObj.handler ).apply( matched.elem, args );\n\n\t\t\t\t\tif ( ret !== undefined ) {\n\t\t\t\t\t\tif ( ( event.result = ret ) === false ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Call the postDispatch hook for the mapped type\n\t\tif ( special.postDispatch ) {\n\t\t\tspecial.postDispatch.call( this, event );\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\thandlers: function( event, handlers ) {\n\t\tvar i, handleObj, sel, matchedHandlers, matchedSelectors,\n\t\t\thandlerQueue = [],\n\t\t\tdelegateCount = handlers.delegateCount,\n\t\t\tcur = event.target;\n\n\t\t// Find delegate handlers\n\t\tif ( delegateCount &&\n\n\t\t\t// Support: IE <=9\n\t\t\t// Black-hole SVG <use> instance trees (trac-13180)\n\t\t\tcur.nodeType &&\n\n\t\t\t// Support: Firefox <=42\n\t\t\t// Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)\n\t\t\t// https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click\n\t\t\t// Support: IE 11 only\n\t\t\t// ...but not arrow key \"clicks\" of radio inputs, which can have `button` -1 (gh-2343)\n\t\t\t!( event.type === \"click\" && event.button >= 1 ) ) {\n\n\t\t\tfor ( ; cur !== this; cur = cur.parentNode || this ) {\n\n\t\t\t\t// Don't check non-elements (trac-13208)\n\t\t\t\t// Don't process clicks on disabled elements (trac-6911, trac-8165, trac-11382, trac-11764)\n\t\t\t\tif ( cur.nodeType === 1 && !( event.type === \"click\" && cur.disabled === true ) ) {\n\t\t\t\t\tmatchedHandlers = [];\n\t\t\t\t\tmatchedSelectors = {};\n\t\t\t\t\tfor ( i = 0; i < delegateCount; i++ ) {\n\t\t\t\t\t\thandleObj = handlers[ i ];\n\n\t\t\t\t\t\t// Don't conflict with Object.prototype properties (trac-13203)\n\t\t\t\t\t\tsel = handleObj.selector + \" \";\n\n\t\t\t\t\t\tif ( matchedSelectors[ sel ] === undefined ) {\n\t\t\t\t\t\t\tmatchedSelectors[ sel ] = handleObj.needsContext ?\n\t\t\t\t\t\t\t\tjQuery( sel, this ).index( cur ) > -1 :\n\t\t\t\t\t\t\t\tjQuery.find( sel, this, null, [ cur ] ).length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( matchedSelectors[ sel ] ) {\n\t\t\t\t\t\t\tmatchedHandlers.push( handleObj );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( matchedHandlers.length ) {\n\t\t\t\t\t\thandlerQueue.push( { elem: cur, handlers: matchedHandlers } );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Add the remaining (directly-bound) handlers\n\t\tcur = this;\n\t\tif ( delegateCount < handlers.length ) {\n\t\t\thandlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } );\n\t\t}\n\n\t\treturn handlerQueue;\n\t},\n\n\taddProp: function( name, hook ) {\n\t\tObject.defineProperty( jQuery.Event.prototype, name, {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\n\t\t\tget: isFunction( hook ) ?\n\t\t\t\tfunction() {\n\t\t\t\t\tif ( this.originalEvent ) {\n\t\t\t\t\t\treturn hook( this.originalEvent );\n\t\t\t\t\t}\n\t\t\t\t} :\n\t\t\t\tfunction() {\n\t\t\t\t\tif ( this.originalEvent ) {\n\t\t\t\t\t\treturn this.originalEvent[ name ];\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\tset: function( value ) {\n\t\t\t\tObject.defineProperty( this, name, {\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tconfigurable: true,\n\t\t\t\t\twritable: true,\n\t\t\t\t\tvalue: value\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t},\n\n\tfix: function( originalEvent ) {\n\t\treturn originalEvent[ jQuery.expando ] ?\n\t\t\toriginalEvent :\n\t\t\tnew jQuery.Event( originalEvent );\n\t},\n\n\tspecial: {\n\t\tload: {\n\n\t\t\t// Prevent triggered image.load events from bubbling to window.load\n\t\t\tnoBubble: true\n\t\t},\n\t\tclick: {\n\n\t\t\t// Utilize native event to ensure correct state for checkable inputs\n\t\t\tsetup: function( data ) {\n\n\t\t\t\t// For mutual compressibility with _default, replace `this` access with a local var.\n\t\t\t\t// `|| data` is dead code meant only to preserve the variable through minification.\n\t\t\t\tvar el = this || data;\n\n\t\t\t\t// Claim the first handler\n\t\t\t\tif ( rcheckableType.test( el.type ) &&\n\t\t\t\t\tel.click && nodeName( el, \"input\" ) ) {\n\n\t\t\t\t\t// dataPriv.set( el, \"click\", ... )\n\t\t\t\t\tleverageNative( el, \"click\", true );\n\t\t\t\t}\n\n\t\t\t\t// Return false to allow normal processing in the caller\n\t\t\t\treturn false;\n\t\t\t},\n\t\t\ttrigger: function( data ) {\n\n\t\t\t\t// For mutual compressibility with _default, replace `this` access with a local var.\n\t\t\t\t// `|| data` is dead code meant only to preserve the variable through minification.\n\t\t\t\tvar el = this || data;\n\n\t\t\t\t// Force setup before triggering a click\n\t\t\t\tif ( rcheckableType.test( el.type ) &&\n\t\t\t\t\tel.click && nodeName( el, \"input\" ) ) {\n\n\t\t\t\t\tleverageNative( el, \"click\" );\n\t\t\t\t}\n\n\t\t\t\t// Return non-false to allow normal event-path propagation\n\t\t\t\treturn true;\n\t\t\t},\n\n\t\t\t// For cross-browser consistency, suppress native .click() on links\n\t\t\t// Also prevent it if we're currently inside a leveraged native-event stack\n\t\t\t_default: function( event ) {\n\t\t\t\tvar target = event.target;\n\t\t\t\treturn rcheckableType.test( target.type ) &&\n\t\t\t\t\ttarget.click && nodeName( target, \"input\" ) &&\n\t\t\t\t\tdataPriv.get( target, \"click\" ) ||\n\t\t\t\t\tnodeName( target, \"a\" );\n\t\t\t}\n\t\t},\n\n\t\tbeforeunload: {\n\t\t\tpostDispatch: function( event ) {\n\n\t\t\t\t// Support: Firefox 20+\n\t\t\t\t// Firefox doesn't alert if the returnValue field is not set.\n\t\t\t\tif ( event.result !== undefined && event.originalEvent ) {\n\t\t\t\t\tevent.originalEvent.returnValue = event.result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Ensure the presence of an event listener that handles manually-triggered\n// synthetic events by interrupting progress until reinvoked in response to\n// *native* events that it fires directly, ensuring that state changes have\n// already occurred before other listeners are invoked.\nfunction leverageNative( el, type, isSetup ) {\n\n\t// Missing `isSetup` indicates a trigger call, which must force setup through jQuery.event.add\n\tif ( !isSetup ) {\n\t\tif ( dataPriv.get( el, type ) === undefined ) {\n\t\t\tjQuery.event.add( el, type, returnTrue );\n\t\t}\n\t\treturn;\n\t}\n\n\t// Register the controller as a special universal handler for all event namespaces\n\tdataPriv.set( el, type, false );\n\tjQuery.event.add( el, type, {\n\t\tnamespace: false,\n\t\thandler: function( event ) {\n\t\t\tvar result,\n\t\t\t\tsaved = dataPriv.get( this, type );\n\n\t\t\tif ( ( event.isTrigger & 1 ) && this[ type ] ) {\n\n\t\t\t\t// Interrupt processing of the outer synthetic .trigger()ed event\n\t\t\t\tif ( !saved ) {\n\n\t\t\t\t\t// Store arguments for use when handling the inner native event\n\t\t\t\t\t// There will always be at least one argument (an event object), so this array\n\t\t\t\t\t// will not be confused with a leftover capture object.\n\t\t\t\t\tsaved = slice.call( arguments );\n\t\t\t\t\tdataPriv.set( this, type, saved );\n\n\t\t\t\t\t// Trigger the native event and capture its result\n\t\t\t\t\tthis[ type ]();\n\t\t\t\t\tresult = dataPriv.get( this, type );\n\t\t\t\t\tdataPriv.set( this, type, false );\n\n\t\t\t\t\tif ( saved !== result ) {\n\n\t\t\t\t\t\t// Cancel the outer synthetic event\n\t\t\t\t\t\tevent.stopImmediatePropagation();\n\t\t\t\t\t\tevent.preventDefault();\n\n\t\t\t\t\t\treturn result;\n\t\t\t\t\t}\n\n\t\t\t\t// If this is an inner synthetic event for an event with a bubbling surrogate\n\t\t\t\t// (focus or blur), assume that the surrogate already propagated from triggering\n\t\t\t\t// the native event and prevent that from happening again here.\n\t\t\t\t// This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the\n\t\t\t\t// bubbling surrogate propagates *after* the non-bubbling base), but that seems\n\t\t\t\t// less bad than duplication.\n\t\t\t\t} else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) {\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t}\n\n\t\t\t// If this is a native event triggered above, everything is now in order\n\t\t\t// Fire an inner synthetic event with the original arguments\n\t\t\t} else if ( saved ) {\n\n\t\t\t\t// ...and capture the result\n\t\t\t\tdataPriv.set( this, type, jQuery.event.trigger(\n\t\t\t\t\tsaved[ 0 ],\n\t\t\t\t\tsaved.slice( 1 ),\n\t\t\t\t\tthis\n\t\t\t\t) );\n\n\t\t\t\t// Abort handling of the native event by all jQuery handlers while allowing\n\t\t\t\t// native handlers on the same element to run. On target, this is achieved\n\t\t\t\t// by stopping immediate propagation just on the jQuery event. However,\n\t\t\t\t// the native event is re-wrapped by a jQuery one on each level of the\n\t\t\t\t// propagation so the only way to stop it for jQuery is to stop it for\n\t\t\t\t// everyone via native `stopPropagation()`. This is not a problem for\n\t\t\t\t// focus/blur which don't bubble, but it does also stop click on checkboxes\n\t\t\t\t// and radios. We accept this limitation.\n\t\t\t\tevent.stopPropagation();\n\t\t\t\tevent.isImmediatePropagationStopped = returnTrue;\n\t\t\t}\n\t\t}\n\t} );\n}\n\njQuery.removeEvent = function( elem, type, handle ) {\n\n\t// This \"if\" is needed for plain objects\n\tif ( elem.removeEventListener ) {\n\t\telem.removeEventListener( type, handle );\n\t}\n};\n\njQuery.Event = function( src, props ) {\n\n\t// Allow instantiation without the 'new' keyword\n\tif ( !( this instanceof jQuery.Event ) ) {\n\t\treturn new jQuery.Event( src, props );\n\t}\n\n\t// Event object\n\tif ( src && src.type ) {\n\t\tthis.originalEvent = src;\n\t\tthis.type = src.type;\n\n\t\t// Events bubbling up the document may have been marked as prevented\n\t\t// by a handler lower down the tree; reflect the correct value.\n\t\tthis.isDefaultPrevented = src.defaultPrevented ||\n\t\t\t\tsrc.defaultPrevented === undefined &&\n\n\t\t\t\t// Support: Android <=2.3 only\n\t\t\t\tsrc.returnValue === false ?\n\t\t\treturnTrue :\n\t\t\treturnFalse;\n\n\t\t// Create target properties\n\t\t// Support: Safari <=6 - 7 only\n\t\t// Target should not be a text node (trac-504, trac-13143)\n\t\tthis.target = ( src.target && src.target.nodeType === 3 ) ?\n\t\t\tsrc.target.parentNode :\n\t\t\tsrc.target;\n\n\t\tthis.currentTarget = src.currentTarget;\n\t\tthis.relatedTarget = src.relatedTarget;\n\n\t// Event type\n\t} else {\n\t\tthis.type = src;\n\t}\n\n\t// Put explicitly provided properties onto the event object\n\tif ( props ) {\n\t\tjQuery.extend( this, props );\n\t}\n\n\t// Create a timestamp if incoming event doesn't have one\n\tthis.timeStamp = src && src.timeStamp || Date.now();\n\n\t// Mark it as fixed\n\tthis[ jQuery.expando ] = true;\n};\n\n// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding\n// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\njQuery.Event.prototype = {\n\tconstructor: jQuery.Event,\n\tisDefaultPrevented: returnFalse,\n\tisPropagationStopped: returnFalse,\n\tisImmediatePropagationStopped: returnFalse,\n\tisSimulated: false,\n\n\tpreventDefault: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isDefaultPrevented = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.preventDefault();\n\t\t}\n\t},\n\tstopPropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isPropagationStopped = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.stopPropagation();\n\t\t}\n\t},\n\tstopImmediatePropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isImmediatePropagationStopped = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.stopImmediatePropagation();\n\t\t}\n\n\t\tthis.stopPropagation();\n\t}\n};\n\n// Includes all common event props including KeyEvent and MouseEvent specific props\njQuery.each( {\n\taltKey: true,\n\tbubbles: true,\n\tcancelable: true,\n\tchangedTouches: true,\n\tctrlKey: true,\n\tdetail: true,\n\teventPhase: true,\n\tmetaKey: true,\n\tpageX: true,\n\tpageY: true,\n\tshiftKey: true,\n\tview: true,\n\t\"char\": true,\n\tcode: true,\n\tcharCode: true,\n\tkey: true,\n\tkeyCode: true,\n\tbutton: true,\n\tbuttons: true,\n\tclientX: true,\n\tclientY: true,\n\toffsetX: true,\n\toffsetY: true,\n\tpointerId: true,\n\tpointerType: true,\n\tscreenX: true,\n\tscreenY: true,\n\ttargetTouches: true,\n\ttoElement: true,\n\ttouches: true,\n\twhich: true\n}, jQuery.event.addProp );\n\njQuery.each( { focus: \"focusin\", blur: \"focusout\" }, function( type, delegateType ) {\n\n\tfunction focusMappedHandler( nativeEvent ) {\n\t\tif ( document.documentMode ) {\n\n\t\t\t// Support: IE 11+\n\t\t\t// Attach a single focusin/focusout handler on the document while someone wants\n\t\t\t// focus/blur. This is because the former are synchronous in IE while the latter\n\t\t\t// are async. In other browsers, all those handlers are invoked synchronously.\n\n\t\t\t// `handle` from private data would already wrap the event, but we need\n\t\t\t// to change the `type` here.\n\t\t\tvar handle = dataPriv.get( this, \"handle\" ),\n\t\t\t\tevent = jQuery.event.fix( nativeEvent );\n\t\t\tevent.type = nativeEvent.type === \"focusin\" ? \"focus\" : \"blur\";\n\t\t\tevent.isSimulated = true;\n\n\t\t\t// First, handle focusin/focusout\n\t\t\thandle( nativeEvent );\n\n\t\t\t// ...then, handle focus/blur\n\t\t\t//\n\t\t\t// focus/blur don't bubble while focusin/focusout do; simulate the former by only\n\t\t\t// invoking the handler at the lower level.\n\t\t\tif ( event.target === event.currentTarget ) {\n\n\t\t\t\t// The setup part calls `leverageNative`, which, in turn, calls\n\t\t\t\t// `jQuery.event.add`, so event handle will already have been set\n\t\t\t\t// by this point.\n\t\t\t\thandle( event );\n\t\t\t}\n\t\t} else {\n\n\t\t\t// For non-IE browsers, attach a single capturing handler on the document\n\t\t\t// while someone wants focusin/focusout.\n\t\t\tjQuery.event.simulate( delegateType, nativeEvent.target,\n\t\t\t\tjQuery.event.fix( nativeEvent ) );\n\t\t}\n\t}\n\n\tjQuery.event.special[ type ] = {\n\n\t\t// Utilize native event if possible so blur/focus sequence is correct\n\t\tsetup: function() {\n\n\t\t\tvar attaches;\n\n\t\t\t// Claim the first handler\n\t\t\t// dataPriv.set( this, \"focus\", ... )\n\t\t\t// dataPriv.set( this, \"blur\", ... )\n\t\t\tleverageNative( this, type, true );\n\n\t\t\tif ( document.documentMode ) {\n\n\t\t\t\t// Support: IE 9 - 11+\n\t\t\t\t// We use the same native handler for focusin & focus (and focusout & blur)\n\t\t\t\t// so we need to coordinate setup & teardown parts between those events.\n\t\t\t\t// Use `delegateType` as the key as `type` is already used by `leverageNative`.\n\t\t\t\tattaches = dataPriv.get( this, delegateType );\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tthis.addEventListener( delegateType, focusMappedHandler );\n\t\t\t\t}\n\t\t\t\tdataPriv.set( this, delegateType, ( attaches || 0 ) + 1 );\n\t\t\t} else {\n\n\t\t\t\t// Return false to allow normal processing in the caller\n\t\t\t\treturn false;\n\t\t\t}\n\t\t},\n\t\ttrigger: function() {\n\n\t\t\t// Force setup before trigger\n\t\t\tleverageNative( this, type );\n\n\t\t\t// Return non-false to allow normal event-path propagation\n\t\t\treturn true;\n\t\t},\n\n\t\tteardown: function() {\n\t\t\tvar attaches;\n\n\t\t\tif ( document.documentMode ) {\n\t\t\t\tattaches = dataPriv.get( this, delegateType ) - 1;\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tthis.removeEventListener( delegateType, focusMappedHandler );\n\t\t\t\t\tdataPriv.remove( this, delegateType );\n\t\t\t\t} else {\n\t\t\t\t\tdataPriv.set( this, delegateType, attaches );\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// Return false to indicate standard teardown should be applied\n\t\t\t\treturn false;\n\t\t\t}\n\t\t},\n\n\t\t// Suppress native focus or blur if we're currently inside\n\t\t// a leveraged native-event stack\n\t\t_default: function( event ) {\n\t\t\treturn dataPriv.get( event.target, type );\n\t\t},\n\n\t\tdelegateType: delegateType\n\t};\n\n\t// Support: Firefox <=44\n\t// Firefox doesn't have focus(in | out) events\n\t// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787\n\t//\n\t// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1\n\t// focus(in | out) events fire after focus & blur events,\n\t// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order\n\t// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857\n\t//\n\t// Support: IE 9 - 11+\n\t// To preserve relative focusin/focus & focusout/blur event order guaranteed on the 3.x branch,\n\t// attach a single handler for both events in IE.\n\tjQuery.event.special[ delegateType ] = {\n\t\tsetup: function() {\n\n\t\t\t// Handle: regular nodes (via `this.ownerDocument`), window\n\t\t\t// (via `this.document`) & document (via `this`).\n\t\t\tvar doc = this.ownerDocument || this.document || this,\n\t\t\t\tdataHolder = document.documentMode ? this : doc,\n\t\t\t\tattaches = dataPriv.get( dataHolder, delegateType );\n\n\t\t\t// Support: IE 9 - 11+\n\t\t\t// We use the same native handler for focusin & focus (and focusout & blur)\n\t\t\t// so we need to coordinate setup & teardown parts between those events.\n\t\t\t// Use `delegateType` as the key as `type` is already used by `leverageNative`.\n\t\t\tif ( !attaches ) {\n\t\t\t\tif ( document.documentMode ) {\n\t\t\t\t\tthis.addEventListener( delegateType, focusMappedHandler );\n\t\t\t\t} else {\n\t\t\t\t\tdoc.addEventListener( type, focusMappedHandler, true );\n\t\t\t\t}\n\t\t\t}\n\t\t\tdataPriv.set( dataHolder, delegateType, ( attaches || 0 ) + 1 );\n\t\t},\n\t\tteardown: function() {\n\t\t\tvar doc = this.ownerDocument || this.document || this,\n\t\t\t\tdataHolder = document.documentMode ? this : doc,\n\t\t\t\tattaches = dataPriv.get( dataHolder, delegateType ) - 1;\n\n\t\t\tif ( !attaches ) {\n\t\t\t\tif ( document.documentMode ) {\n\t\t\t\t\tthis.removeEventListener( delegateType, focusMappedHandler );\n\t\t\t\t} else {\n\t\t\t\t\tdoc.removeEventListener( type, focusMappedHandler, true );\n\t\t\t\t}\n\t\t\t\tdataPriv.remove( dataHolder, delegateType );\n\t\t\t} else {\n\t\t\t\tdataPriv.set( dataHolder, delegateType, attaches );\n\t\t\t}\n\t\t}\n\t};\n} );\n\n// Create mouseenter/leave events using mouseover/out and event-time checks\n// so that event delegation works in jQuery.\n// Do the same for pointerenter/pointerleave and pointerover/pointerout\n//\n// Support: Safari 7 only\n// Safari sends mouseenter too often; see:\n// https://bugs.chromium.org/p/chromium/issues/detail?id=470258\n// for the description of the bug (it existed in older Chrome versions as well).\njQuery.each( {\n\tmouseenter: \"mouseover\",\n\tmouseleave: \"mouseout\",\n\tpointerenter: \"pointerover\",\n\tpointerleave: \"pointerout\"\n}, function( orig, fix ) {\n\tjQuery.event.special[ orig ] = {\n\t\tdelegateType: fix,\n\t\tbindType: fix,\n\n\t\thandle: function( event ) {\n\t\t\tvar ret,\n\t\t\t\ttarget = this,\n\t\t\t\trelated = event.relatedTarget,\n\t\t\t\thandleObj = event.handleObj;\n\n\t\t\t// For mouseenter/leave call the handler if related is outside the target.\n\t\t\t// NB: No relatedTarget if the mouse left/entered the browser window\n\t\t\tif ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {\n\t\t\t\tevent.type = handleObj.origType;\n\t\t\t\tret = handleObj.handler.apply( this, arguments );\n\t\t\t\tevent.type = fix;\n\t\t\t}\n\t\t\treturn ret;\n\t\t}\n\t};\n} );\n\njQuery.fn.extend( {\n\n\ton: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn );\n\t},\n\tone: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn, 1 );\n\t},\n\toff: function( types, selector, fn ) {\n\t\tvar handleObj, type;\n\t\tif ( types && types.preventDefault && types.handleObj ) {\n\n\t\t\t// ( event )  dispatched jQuery.Event\n\t\t\thandleObj = types.handleObj;\n\t\t\tjQuery( types.delegateTarget ).off(\n\t\t\t\thandleObj.namespace ?\n\t\t\t\t\thandleObj.origType + \".\" + handleObj.namespace :\n\t\t\t\t\thandleObj.origType,\n\t\t\t\thandleObj.selector,\n\t\t\t\thandleObj.handler\n\t\t\t);\n\t\t\treturn this;\n\t\t}\n\t\tif ( typeof types === \"object\" ) {\n\n\t\t\t// ( types-object [, selector] )\n\t\t\tfor ( type in types ) {\n\t\t\t\tthis.off( type, selector, types[ type ] );\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\tif ( selector === false || typeof selector === \"function\" ) {\n\n\t\t\t// ( types [, fn] )\n\t\t\tfn = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tif ( fn === false ) {\n\t\t\tfn = returnFalse;\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.remove( this, types, fn, selector );\n\t\t} );\n\t}\n} );\n\n\nvar\n\n\t// Support: IE <=10 - 11, Edge 12 - 13 only\n\t// In IE/Edge using regex groups here causes severe slowdowns.\n\t// See https://connect.microsoft.com/IE/feedback/details/1736512/\n\trnoInnerhtml = /<script|<style|<link/i,\n\n\t// checked=\"checked\" or checked\n\trchecked = /checked\\s*(?:[^=]|=\\s*.checked.)/i,\n\n\trcleanScript = /^\\s*<!\\[CDATA\\[|\\]\\]>\\s*$/g;\n\n// Prefer a tbody over its parent table for containing new rows\nfunction manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( elem ).children( \"tbody\" )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}\n\n// Replace/restore the type attribute of script elements for safe DOM manipulation\nfunction disableScript( elem ) {\n\telem.type = ( elem.getAttribute( \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}\nfunction restoreScript( elem ) {\n\tif ( ( elem.type || \"\" ).slice( 0, 5 ) === \"true/\" ) {\n\t\telem.type = elem.type.slice( 5 );\n\t} else {\n\t\telem.removeAttribute( \"type\" );\n\t}\n\n\treturn elem;\n}\n\nfunction cloneCopyEvent( src, dest ) {\n\tvar i, l, type, pdataOld, udataOld, udataCur, events;\n\n\tif ( dest.nodeType !== 1 ) {\n\t\treturn;\n\t}\n\n\t// 1. Copy private data: events, handlers, etc.\n\tif ( dataPriv.hasData( src ) ) {\n\t\tpdataOld = dataPriv.get( src );\n\t\tevents = pdataOld.events;\n\n\t\tif ( events ) {\n\t\t\tdataPriv.remove( dest, \"handle events\" );\n\n\t\t\tfor ( type in events ) {\n\t\t\t\tfor ( i = 0, l = events[ type ].length; i < l; i++ ) {\n\t\t\t\t\tjQuery.event.add( dest, type, events[ type ][ i ] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// 2. Copy user data\n\tif ( dataUser.hasData( src ) ) {\n\t\tudataOld = dataUser.access( src );\n\t\tudataCur = jQuery.extend( {}, udataOld );\n\n\t\tdataUser.set( dest, udataCur );\n\t}\n}\n\n// Fix IE bugs, see support tests\nfunction fixInput( src, dest ) {\n\tvar nodeName = dest.nodeName.toLowerCase();\n\n\t// Fails to persist the checked state of a cloned checkbox or radio button.\n\tif ( nodeName === \"input\" && rcheckableType.test( src.type ) ) {\n\t\tdest.checked = src.checked;\n\n\t// Fails to return the selected option to the default selected state when cloning options\n\t} else if ( nodeName === \"input\" || nodeName === \"textarea\" ) {\n\t\tdest.defaultValue = src.defaultValue;\n\t}\n}\n\nfunction domManip( collection, args, callback, ignored ) {\n\n\t// Flatten any nested arrays\n\targs = flat( args );\n\n\tvar fragment, first, scripts, hasScripts, node, doc,\n\t\ti = 0,\n\t\tl = collection.length,\n\t\tiNoClone = l - 1,\n\t\tvalue = args[ 0 ],\n\t\tvalueIsFunction = isFunction( value );\n\n\t// We can't cloneNode fragments that contain checked, in WebKit\n\tif ( valueIsFunction ||\n\t\t\t( l > 1 && typeof value === \"string\" &&\n\t\t\t\t!support.checkClone && rchecked.test( value ) ) ) {\n\t\treturn collection.each( function( index ) {\n\t\t\tvar self = collection.eq( index );\n\t\t\tif ( valueIsFunction ) {\n\t\t\t\targs[ 0 ] = value.call( this, index, self.html() );\n\t\t\t}\n\t\t\tdomManip( self, args, callback, ignored );\n\t\t} );\n\t}\n\n\tif ( l ) {\n\t\tfragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );\n\t\tfirst = fragment.firstChild;\n\n\t\tif ( fragment.childNodes.length === 1 ) {\n\t\t\tfragment = first;\n\t\t}\n\n\t\t// Require either new content or an interest in ignored elements to invoke the callback\n\t\tif ( first || ignored ) {\n\t\t\tscripts = jQuery.map( getAll( fragment, \"script\" ), disableScript );\n\t\t\thasScripts = scripts.length;\n\n\t\t\t// Use the original fragment for the last item\n\t\t\t// instead of the first because it can end up\n\t\t\t// being emptied incorrectly in certain situations (trac-8070).\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tnode = fragment;\n\n\t\t\t\tif ( i !== iNoClone ) {\n\t\t\t\t\tnode = jQuery.clone( node, true, true );\n\n\t\t\t\t\t// Keep references to cloned scripts for later restoration\n\t\t\t\t\tif ( hasScripts ) {\n\n\t\t\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\t\t\tjQuery.merge( scripts, getAll( node, \"script\" ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tcallback.call( collection[ i ], node, i );\n\t\t\t}\n\n\t\t\tif ( hasScripts ) {\n\t\t\t\tdoc = scripts[ scripts.length - 1 ].ownerDocument;\n\n\t\t\t\t// Re-enable scripts\n\t\t\t\tjQuery.map( scripts, restoreScript );\n\n\t\t\t\t// Evaluate executable scripts on first document insertion\n\t\t\t\tfor ( i = 0; i < hasScripts; i++ ) {\n\t\t\t\t\tnode = scripts[ i ];\n\t\t\t\t\tif ( rscriptType.test( node.type || \"\" ) &&\n\t\t\t\t\t\t!dataPriv.access( node, \"globalEval\" ) &&\n\t\t\t\t\t\tjQuery.contains( doc, node ) ) {\n\n\t\t\t\t\t\tif ( node.src && ( node.type || \"\" ).toLowerCase()  !== \"module\" ) {\n\n\t\t\t\t\t\t\t// Optional AJAX dependency, but won't run scripts if not present\n\t\t\t\t\t\t\tif ( jQuery._evalUrl && !node.noModule ) {\n\t\t\t\t\t\t\t\tjQuery._evalUrl( node.src, {\n\t\t\t\t\t\t\t\t\tnonce: node.nonce || node.getAttribute( \"nonce\" )\n\t\t\t\t\t\t\t\t}, doc );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Unwrap a CDATA section containing script contents. This shouldn't be\n\t\t\t\t\t\t\t// needed as in XML documents they're already not visible when\n\t\t\t\t\t\t\t// inspecting element contents and in HTML documents they have no\n\t\t\t\t\t\t\t// meaning but we're preserving that logic for backwards compatibility.\n\t\t\t\t\t\t\t// This will be removed completely in 4.0. See gh-4904.\n\t\t\t\t\t\t\tDOMEval( node.textContent.replace( rcleanScript, \"\" ), node, doc );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn collection;\n}\n\nfunction remove( elem, selector, keepData ) {\n\tvar node,\n\t\tnodes = selector ? jQuery.filter( selector, elem ) : elem,\n\t\ti = 0;\n\n\tfor ( ; ( node = nodes[ i ] ) != null; i++ ) {\n\t\tif ( !keepData && node.nodeType === 1 ) {\n\t\t\tjQuery.cleanData( getAll( node ) );\n\t\t}\n\n\t\tif ( node.parentNode ) {\n\t\t\tif ( keepData && isAttached( node ) ) {\n\t\t\t\tsetGlobalEval( getAll( node, \"script\" ) );\n\t\t\t}\n\t\t\tnode.parentNode.removeChild( node );\n\t\t}\n\t}\n\n\treturn elem;\n}\n\njQuery.extend( {\n\thtmlPrefilter: function( html ) {\n\t\treturn html;\n\t},\n\n\tclone: function( elem, dataAndEvents, deepDataAndEvents ) {\n\t\tvar i, l, srcElements, destElements,\n\t\t\tclone = elem.cloneNode( true ),\n\t\t\tinPage = isAttached( elem );\n\n\t\t// Fix IE cloning issues\n\t\tif ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&\n\t\t\t\t!jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// We eschew jQuery#find here for performance reasons:\n\t\t\t// https://jsperf.com/getall-vs-sizzle/2\n\t\t\tdestElements = getAll( clone );\n\t\t\tsrcElements = getAll( elem );\n\n\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\tfixInput( srcElements[ i ], destElements[ i ] );\n\t\t\t}\n\t\t}\n\n\t\t// Copy the events from the original to the clone\n\t\tif ( dataAndEvents ) {\n\t\t\tif ( deepDataAndEvents ) {\n\t\t\t\tsrcElements = srcElements || getAll( elem );\n\t\t\t\tdestElements = destElements || getAll( clone );\n\n\t\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\t\tcloneCopyEvent( srcElements[ i ], destElements[ i ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcloneCopyEvent( elem, clone );\n\t\t\t}\n\t\t}\n\n\t\t// Preserve script evaluation history\n\t\tdestElements = getAll( clone, \"script\" );\n\t\tif ( destElements.length > 0 ) {\n\t\t\tsetGlobalEval( destElements, !inPage && getAll( elem, \"script\" ) );\n\t\t}\n\n\t\t// Return the cloned set\n\t\treturn clone;\n\t},\n\n\tcleanData: function( elems ) {\n\t\tvar data, elem, type,\n\t\t\tspecial = jQuery.event.special,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {\n\t\t\tif ( acceptData( elem ) ) {\n\t\t\t\tif ( ( data = elem[ dataPriv.expando ] ) ) {\n\t\t\t\t\tif ( data.events ) {\n\t\t\t\t\t\tfor ( type in data.events ) {\n\t\t\t\t\t\t\tif ( special[ type ] ) {\n\t\t\t\t\t\t\t\tjQuery.event.remove( elem, type );\n\n\t\t\t\t\t\t\t// This is a shortcut to avoid jQuery.event.remove's overhead\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tjQuery.removeEvent( elem, type, data.handle );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Support: Chrome <=35 - 45+\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\n\t\t\t\t\telem[ dataPriv.expando ] = undefined;\n\t\t\t\t}\n\t\t\t\tif ( elem[ dataUser.expando ] ) {\n\n\t\t\t\t\t// Support: Chrome <=35 - 45+\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\n\t\t\t\t\telem[ dataUser.expando ] = undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n} );\n\njQuery.fn.extend( {\n\tdetach: function( selector ) {\n\t\treturn remove( this, selector, true );\n\t},\n\n\tremove: function( selector ) {\n\t\treturn remove( this, selector );\n\t},\n\n\ttext: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\treturn value === undefined ?\n\t\t\t\tjQuery.text( this ) :\n\t\t\t\tthis.empty().each( function() {\n\t\t\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\t\t\tthis.textContent = value;\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t}, null, value, arguments.length );\n\t},\n\n\tappend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.appendChild( elem );\n\t\t\t}\n\t\t} );\n\t},\n\n\tprepend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.insertBefore( elem, target.firstChild );\n\t\t\t}\n\t\t} );\n\t},\n\n\tbefore: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this );\n\t\t\t}\n\t\t} );\n\t},\n\n\tafter: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this.nextSibling );\n\t\t\t}\n\t\t} );\n\t},\n\n\tempty: function() {\n\t\tvar elem,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = this[ i ] ) != null; i++ ) {\n\t\t\tif ( elem.nodeType === 1 ) {\n\n\t\t\t\t// Prevent memory leaks\n\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\n\t\t\t\t// Remove any remaining nodes\n\t\t\t\telem.textContent = \"\";\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tclone: function( dataAndEvents, deepDataAndEvents ) {\n\t\tdataAndEvents = dataAndEvents == null ? false : dataAndEvents;\n\t\tdeepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;\n\n\t\treturn this.map( function() {\n\t\t\treturn jQuery.clone( this, dataAndEvents, deepDataAndEvents );\n\t\t} );\n\t},\n\n\thtml: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\tvar elem = this[ 0 ] || {},\n\t\t\t\ti = 0,\n\t\t\t\tl = this.length;\n\n\t\t\tif ( value === undefined && elem.nodeType === 1 ) {\n\t\t\t\treturn elem.innerHTML;\n\t\t\t}\n\n\t\t\t// See if we can take a shortcut and just use innerHTML\n\t\t\tif ( typeof value === \"string\" && !rnoInnerhtml.test( value ) &&\n\t\t\t\t!wrapMap[ ( rtagName.exec( value ) || [ \"\", \"\" ] )[ 1 ].toLowerCase() ] ) {\n\n\t\t\t\tvalue = jQuery.htmlPrefilter( value );\n\n\t\t\t\ttry {\n\t\t\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\t\t\telem = this[ i ] || {};\n\n\t\t\t\t\t\t// Remove element nodes and prevent memory leaks\n\t\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\t\t\t\t\t\t\telem.innerHTML = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\telem = 0;\n\n\t\t\t\t// If using innerHTML throws an exception, use the fallback method\n\t\t\t\t} catch ( e ) {}\n\t\t\t}\n\n\t\t\tif ( elem ) {\n\t\t\t\tthis.empty().append( value );\n\t\t\t}\n\t\t}, null, value, arguments.length );\n\t},\n\n\treplaceWith: function() {\n\t\tvar ignored = [];\n\n\t\t// Make the changes, replacing each non-ignored context element with the new content\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tvar parent = this.parentNode;\n\n\t\t\tif ( jQuery.inArray( this, ignored ) < 0 ) {\n\t\t\t\tjQuery.cleanData( getAll( this ) );\n\t\t\t\tif ( parent ) {\n\t\t\t\t\tparent.replaceChild( elem, this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Force callback invocation\n\t\t}, ignored );\n\t}\n} );\n\njQuery.each( {\n\tappendTo: \"append\",\n\tprependTo: \"prepend\",\n\tinsertBefore: \"before\",\n\tinsertAfter: \"after\",\n\treplaceAll: \"replaceWith\"\n}, function( name, original ) {\n\tjQuery.fn[ name ] = function( selector ) {\n\t\tvar elems,\n\t\t\tret = [],\n\t\t\tinsert = jQuery( selector ),\n\t\t\tlast = insert.length - 1,\n\t\t\ti = 0;\n\n\t\tfor ( ; i <= last; i++ ) {\n\t\t\telems = i === last ? this : this.clone( true );\n\t\t\tjQuery( insert[ i ] )[ original ]( elems );\n\n\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t// .get() because push.apply(_, arraylike) throws on ancient WebKit\n\t\t\tpush.apply( ret, elems.get() );\n\t\t}\n\n\t\treturn this.pushStack( ret );\n\t};\n} );\nvar rnumnonpx = new RegExp( \"^(\" + pnum + \")(?!px)[a-z%]+$\", \"i\" );\n\nvar rcustomProp = /^--/;\n\n\nvar getStyles = function( elem ) {\n\n\t\t// Support: IE <=11 only, Firefox <=30 (trac-15098, trac-14150)\n\t\t// IE throws on elements created in popups\n\t\t// FF meanwhile throws on frame elements through \"defaultView.getComputedStyle\"\n\t\tvar view = elem.ownerDocument.defaultView;\n\n\t\tif ( !view || !view.opener ) {\n\t\t\tview = window;\n\t\t}\n\n\t\treturn view.getComputedStyle( elem );\n\t};\n\nvar swap = function( elem, options, callback ) {\n\tvar ret, name,\n\t\told = {};\n\n\t// Remember the old values, and insert the new ones\n\tfor ( name in options ) {\n\t\told[ name ] = elem.style[ name ];\n\t\telem.style[ name ] = options[ name ];\n\t}\n\n\tret = callback.call( elem );\n\n\t// Revert the old values\n\tfor ( name in options ) {\n\t\telem.style[ name ] = old[ name ];\n\t}\n\n\treturn ret;\n};\n\n\nvar rboxStyle = new RegExp( cssExpand.join( \"|\" ), \"i\" );\n\n\n\n( function() {\n\n\t// Executing both pixelPosition & boxSizingReliable tests require only one layout\n\t// so they're executed at the same time to save the second computation.\n\tfunction computeStyleTests() {\n\n\t\t// This is a singleton, we need to execute it only once\n\t\tif ( !div ) {\n\t\t\treturn;\n\t\t}\n\n\t\tcontainer.style.cssText = \"position:absolute;left:-11111px;width:60px;\" +\n\t\t\t\"margin-top:1px;padding:0;border:0\";\n\t\tdiv.style.cssText =\n\t\t\t\"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" +\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\"width:60%;top:1%\";\n\t\tdocumentElement.appendChild( container ).appendChild( div );\n\n\t\tvar divStyle = window.getComputedStyle( div );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\treliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12;\n\n\t\t// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\tdiv.style.right = \"60%\";\n\t\tpixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36;\n\n\t\t// Support: IE 9 - 11 only\n\t\t// Detect misreporting of content dimensions for box-sizing:border-box elements\n\t\tboxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36;\n\n\t\t// Support: IE 9 only\n\t\t// Detect overflow:scroll screwiness (gh-3699)\n\t\t// Support: Chrome <=64\n\t\t// Don't get tricked when zoom affects offsetWidth (gh-4029)\n\t\tdiv.style.position = \"absolute\";\n\t\tscrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12;\n\n\t\tdocumentElement.removeChild( container );\n\n\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t// it will also be a sign that checks already performed\n\t\tdiv = null;\n\t}\n\n\tfunction roundPixelMeasures( measure ) {\n\t\treturn Math.round( parseFloat( measure ) );\n\t}\n\n\tvar pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal,\n\t\treliableTrDimensionsVal, reliableMarginLeftVal,\n\t\tcontainer = document.createElement( \"div\" ),\n\t\tdiv = document.createElement( \"div\" );\n\n\t// Finish early in limited (non-browser) environments\n\tif ( !div.style ) {\n\t\treturn;\n\t}\n\n\t// Support: IE <=9 - 11 only\n\t// Style of cloned element affects source element cloned (trac-8908)\n\tdiv.style.backgroundClip = \"content-box\";\n\tdiv.cloneNode( true ).style.backgroundClip = \"\";\n\tsupport.clearCloneStyle = div.style.backgroundClip === \"content-box\";\n\n\tjQuery.extend( support, {\n\t\tboxSizingReliable: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn boxSizingReliableVal;\n\t\t},\n\t\tpixelBoxStyles: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn pixelBoxStylesVal;\n\t\t},\n\t\tpixelPosition: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn pixelPositionVal;\n\t\t},\n\t\treliableMarginLeft: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn reliableMarginLeftVal;\n\t\t},\n\t\tscrollboxSize: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn scrollboxSizeVal;\n\t\t},\n\n\t\t// Support: IE 9 - 11+, Edge 15 - 18+\n\t\t// IE/Edge misreport `getComputedStyle` of table rows with width/height\n\t\t// set in CSS while `offset*` properties report correct values.\n\t\t// Behavior in IE 9 is more subtle than in newer versions & it passes\n\t\t// some versions of this test; make sure not to make it pass there!\n\t\t//\n\t\t// Support: Firefox 70+\n\t\t// Only Firefox includes border widths\n\t\t// in computed dimensions. (gh-4529)\n\t\treliableTrDimensions: function() {\n\t\t\tvar table, tr, trChild, trStyle;\n\t\t\tif ( reliableTrDimensionsVal == null ) {\n\t\t\t\ttable = document.createElement( \"table\" );\n\t\t\t\ttr = document.createElement( \"tr\" );\n\t\t\t\ttrChild = document.createElement( \"div\" );\n\n\t\t\t\ttable.style.cssText = \"position:absolute;left:-11111px;border-collapse:separate\";\n\t\t\t\ttr.style.cssText = \"box-sizing:content-box;border:1px solid\";\n\n\t\t\t\t// Support: Chrome 86+\n\t\t\t\t// Height set through cssText does not get applied.\n\t\t\t\t// Computed height then comes back as 0.\n\t\t\t\ttr.style.height = \"1px\";\n\t\t\t\ttrChild.style.height = \"9px\";\n\n\t\t\t\t// Support: Android 8 Chrome 86+\n\t\t\t\t// In our bodyBackground.html iframe,\n\t\t\t\t// display for all div elements is set to \"inline\",\n\t\t\t\t// which causes a problem only in Android 8 Chrome 86.\n\t\t\t\t// Ensuring the div is `display: block`\n\t\t\t\t// gets around this issue.\n\t\t\t\ttrChild.style.display = \"block\";\n\n\t\t\t\tdocumentElement\n\t\t\t\t\t.appendChild( table )\n\t\t\t\t\t.appendChild( tr )\n\t\t\t\t\t.appendChild( trChild );\n\n\t\t\t\ttrStyle = window.getComputedStyle( tr );\n\t\t\t\treliableTrDimensionsVal = ( parseInt( trStyle.height, 10 ) +\n\t\t\t\t\tparseInt( trStyle.borderTopWidth, 10 ) +\n\t\t\t\t\tparseInt( trStyle.borderBottomWidth, 10 ) ) === tr.offsetHeight;\n\n\t\t\t\tdocumentElement.removeChild( table );\n\t\t\t}\n\t\t\treturn reliableTrDimensionsVal;\n\t\t}\n\t} );\n} )();\n\n\nfunction curCSS( elem, name, computed ) {\n\tvar width, minWidth, maxWidth, ret,\n\t\tisCustomProp = rcustomProp.test( name ),\n\n\t\t// Support: Firefox 51+\n\t\t// Retrieving style before computed somehow\n\t\t// fixes an issue with getting wrong values\n\t\t// on detached elements\n\t\tstyle = elem.style;\n\n\tcomputed = computed || getStyles( elem );\n\n\t// getPropertyValue is needed for:\n\t//   .css('filter') (IE 9 only, trac-12537)\n\t//   .css('--customProperty) (gh-3144)\n\tif ( computed ) {\n\n\t\t// Support: IE <=9 - 11+\n\t\t// IE only supports `\"float\"` in `getPropertyValue`; in computed styles\n\t\t// it's only available as `\"cssFloat\"`. We no longer modify properties\n\t\t// sent to `.css()` apart from camelCasing, so we need to check both.\n\t\t// Normally, this would create difference in behavior: if\n\t\t// `getPropertyValue` returns an empty string, the value returned\n\t\t// by `.css()` would be `undefined`. This is usually the case for\n\t\t// disconnected elements. However, in IE even disconnected elements\n\t\t// with no styles return `\"none\"` for `getPropertyValue( \"float\" )`\n\t\tret = computed.getPropertyValue( name ) || computed[ name ];\n\n\t\tif ( isCustomProp && ret ) {\n\n\t\t\t// Support: Firefox 105+, Chrome <=105+\n\t\t\t// Spec requires trimming whitespace for custom properties (gh-4926).\n\t\t\t// Firefox only trims leading whitespace. Chrome just collapses\n\t\t\t// both leading & trailing whitespace to a single space.\n\t\t\t//\n\t\t\t// Fall back to `undefined` if empty string returned.\n\t\t\t// This collapses a missing definition with property defined\n\t\t\t// and set to an empty string but there's no standard API\n\t\t\t// allowing us to differentiate them without a performance penalty\n\t\t\t// and returning `undefined` aligns with older jQuery.\n\t\t\t//\n\t\t\t// rtrimCSS treats U+000D CARRIAGE RETURN and U+000C FORM FEED\n\t\t\t// as whitespace while CSS does not, but this is not a problem\n\t\t\t// because CSS preprocessing replaces them with U+000A LINE FEED\n\t\t\t// (which *is* CSS whitespace)\n\t\t\t// https://www.w3.org/TR/css-syntax-3/#input-preprocessing\n\t\t\tret = ret.replace( rtrimCSS, \"$1\" ) || undefined;\n\t\t}\n\n\t\tif ( ret === \"\" && !isAttached( elem ) ) {\n\t\t\tret = jQuery.style( elem, name );\n\t\t}\n\n\t\t// A tribute to the \"awesome hack by Dean Edwards\"\n\t\t// Android Browser returns percentage for some values,\n\t\t// but width seems to be reliably pixels.\n\t\t// This is against the CSSOM draft spec:\n\t\t// https://drafts.csswg.org/cssom/#resolved-values\n\t\tif ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) {\n\n\t\t\t// Remember the original values\n\t\t\twidth = style.width;\n\t\t\tminWidth = style.minWidth;\n\t\t\tmaxWidth = style.maxWidth;\n\n\t\t\t// Put in the new values to get a computed value out\n\t\t\tstyle.minWidth = style.maxWidth = style.width = ret;\n\t\t\tret = computed.width;\n\n\t\t\t// Revert the changed values\n\t\t\tstyle.width = width;\n\t\t\tstyle.minWidth = minWidth;\n\t\t\tstyle.maxWidth = maxWidth;\n\t\t}\n\t}\n\n\treturn ret !== undefined ?\n\n\t\t// Support: IE <=9 - 11 only\n\t\t// IE returns zIndex value as an integer.\n\t\tret + \"\" :\n\t\tret;\n}\n\n\nfunction addGetHookIf( conditionFn, hookFn ) {\n\n\t// Define the hook, we'll check on the first run if it's really needed.\n\treturn {\n\t\tget: function() {\n\t\t\tif ( conditionFn() ) {\n\n\t\t\t\t// Hook not needed (or it's not possible to use it due\n\t\t\t\t// to missing dependency), remove it.\n\t\t\t\tdelete this.get;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Hook needed; redefine it so that the support test is not executed again.\n\t\t\treturn ( this.get = hookFn ).apply( this, arguments );\n\t\t}\n\t};\n}\n\n\nvar cssPrefixes = [ \"Webkit\", \"Moz\", \"ms\" ],\n\temptyStyle = document.createElement( \"div\" ).style,\n\tvendorProps = {};\n\n// Return a vendor-prefixed property or undefined\nfunction vendorPropName( name ) {\n\n\t// Check for vendor prefixed names\n\tvar capName = name[ 0 ].toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}\n\n// Return a potentially-mapped jQuery.cssProps or vendor prefixed property\nfunction finalPropName( name ) {\n\tvar final = jQuery.cssProps[ name ] || vendorProps[ name ];\n\n\tif ( final ) {\n\t\treturn final;\n\t}\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\treturn vendorProps[ name ] = vendorPropName( name ) || name;\n}\n\n\nvar\n\n\t// Swappable if display is none or starts with table\n\t// except \"table\", \"table-cell\", or \"table-caption\"\n\t// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display\n\trdisplayswap = /^(none|table(?!-c[ea]).+)/,\n\tcssShow = { position: \"absolute\", visibility: \"hidden\", display: \"block\" },\n\tcssNormalTransform = {\n\t\tletterSpacing: \"0\",\n\t\tfontWeight: \"400\"\n\t};\n\nfunction setPositiveNumber( _elem, value, subtract ) {\n\n\t// Any relative (+/-) values have already been\n\t// normalized at this point\n\tvar matches = rcssNum.exec( value );\n\treturn matches ?\n\n\t\t// Guard against undefined \"subtract\", e.g., when used as in cssHooks\n\t\tMath.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || \"px\" ) :\n\t\tvalue;\n}\n\nfunction boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {\n\tvar i = dimension === \"width\" ? 1 : 0,\n\t\textra = 0,\n\t\tdelta = 0,\n\t\tmarginDelta = 0;\n\n\t// Adjustment may not be necessary\n\tif ( box === ( isBorderBox ? \"border\" : \"content\" ) ) {\n\t\treturn 0;\n\t}\n\n\tfor ( ; i < 4; i += 2 ) {\n\n\t\t// Both box models exclude margin\n\t\t// Count margin delta separately to only add it after scroll gutter adjustment.\n\t\t// This is needed to make negative margins work with `outerHeight( true )` (gh-3982).\n\t\tif ( box === \"margin\" ) {\n\t\t\tmarginDelta += jQuery.css( elem, box + cssExpand[ i ], true, styles );\n\t\t}\n\n\t\t// If we get here with a content-box, we're seeking \"padding\" or \"border\" or \"margin\"\n\t\tif ( !isBorderBox ) {\n\n\t\t\t// Add padding\n\t\t\tdelta += jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\n\t\t\t// For \"border\" or \"margin\", add border\n\t\t\tif ( box !== \"padding\" ) {\n\t\t\t\tdelta += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\n\t\t\t// But still keep track of it otherwise\n\t\t\t} else {\n\t\t\t\textra += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\n\t\t// If we get here with a border-box (content + padding + border), we're seeking \"content\" or\n\t\t// \"padding\" or \"margin\"\n\t\t} else {\n\n\t\t\t// For \"content\", subtract padding\n\t\t\tif ( box === \"content\" ) {\n\t\t\t\tdelta -= jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\t\t\t}\n\n\t\t\t// For \"content\" or \"padding\", subtract border\n\t\t\tif ( box !== \"margin\" ) {\n\t\t\t\tdelta -= jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\t\t}\n\t}\n\n\t// Account for positive content-box scroll gutter when requested by providing computedVal\n\tif ( !isBorderBox && computedVal >= 0 ) {\n\n\t\t// offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border\n\t\t// Assuming integer scroll gutter, subtract the rest and round down\n\t\tdelta += Math.max( 0, Math.ceil(\n\t\t\telem[ \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -\n\t\t\tcomputedVal -\n\t\t\tdelta -\n\t\t\textra -\n\t\t\t0.5\n\n\t\t// If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter\n\t\t// Use an explicit zero to avoid NaN (gh-3964)\n\t\t) ) || 0;\n\t}\n\n\treturn delta + marginDelta;\n}\n\nfunction getWidthOrHeight( elem, dimension, extra ) {\n\n\t// Start with computed style\n\tvar styles = getStyles( elem ),\n\n\t\t// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322).\n\t\t// Fake content-box until we know it's needed to know the true value.\n\t\tboxSizingNeeded = !support.boxSizingReliable() || extra,\n\t\tisBorderBox = boxSizingNeeded &&\n\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\tvalueIsBorderBox = isBorderBox,\n\n\t\tval = curCSS( elem, dimension, styles ),\n\t\toffsetProp = \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 );\n\n\t// Support: Firefox <=54\n\t// Return a confounding non-pixel value or feign ignorance, as appropriate.\n\tif ( rnumnonpx.test( val ) ) {\n\t\tif ( !extra ) {\n\t\t\treturn val;\n\t\t}\n\t\tval = \"auto\";\n\t}\n\n\n\t// Support: IE 9 - 11 only\n\t// Use offsetWidth/offsetHeight for when box sizing is unreliable.\n\t// In those cases, the computed value can be trusted to be border-box.\n\tif ( ( !support.boxSizingReliable() && isBorderBox ||\n\n\t\t// Support: IE 10 - 11+, Edge 15 - 18+\n\t\t// IE/Edge misreport `getComputedStyle` of table rows with width/height\n\t\t// set in CSS while `offset*` properties report correct values.\n\t\t// Interestingly, in some cases IE 9 doesn't suffer from this issue.\n\t\t!support.reliableTrDimensions() && nodeName( elem, \"tr\" ) ||\n\n\t\t// Fall back to offsetWidth/offsetHeight when value is \"auto\"\n\t\t// This happens for inline elements with no explicit setting (gh-3571)\n\t\tval === \"auto\" ||\n\n\t\t// Support: Android <=4.1 - 4.3 only\n\t\t// Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)\n\t\t!parseFloat( val ) && jQuery.css( elem, \"display\", false, styles ) === \"inline\" ) &&\n\n\t\t// Make sure the element is visible & connected\n\t\telem.getClientRects().length ) {\n\n\t\tisBorderBox = jQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\";\n\n\t\t// Where available, offsetWidth/offsetHeight approximate border box dimensions.\n\t\t// Where not available (e.g., SVG), assume unreliable box-sizing and interpret the\n\t\t// retrieved value as a content box dimension.\n\t\tvalueIsBorderBox = offsetProp in elem;\n\t\tif ( valueIsBorderBox ) {\n\t\t\tval = elem[ offsetProp ];\n\t\t}\n\t}\n\n\t// Normalize \"\" and auto\n\tval = parseFloat( val ) || 0;\n\n\t// Adjust for the element's box model\n\treturn ( val +\n\t\tboxModelAdjustment(\n\t\t\telem,\n\t\t\tdimension,\n\t\t\textra || ( isBorderBox ? \"border\" : \"content\" ),\n\t\t\tvalueIsBorderBox,\n\t\t\tstyles,\n\n\t\t\t// Provide the current computed size to request scroll gutter calculation (gh-3589)\n\t\t\tval\n\t\t)\n\t) + \"px\";\n}\n\njQuery.extend( {\n\n\t// Add in style property hooks for overriding the default\n\t// behavior of getting and setting a style property\n\tcssHooks: {\n\t\topacity: {\n\t\t\tget: function( elem, computed ) {\n\t\t\t\tif ( computed ) {\n\n\t\t\t\t\t// We should always get a number back from opacity\n\t\t\t\t\tvar ret = curCSS( elem, \"opacity\" );\n\t\t\t\t\treturn ret === \"\" ? \"1\" : ret;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t// Don't automatically add \"px\" to these possibly-unitless properties\n\tcssNumber: {\n\t\tanimationIterationCount: true,\n\t\taspectRatio: true,\n\t\tborderImageSlice: true,\n\t\tcolumnCount: true,\n\t\tflexGrow: true,\n\t\tflexShrink: true,\n\t\tfontWeight: true,\n\t\tgridArea: true,\n\t\tgridColumn: true,\n\t\tgridColumnEnd: true,\n\t\tgridColumnStart: true,\n\t\tgridRow: true,\n\t\tgridRowEnd: true,\n\t\tgridRowStart: true,\n\t\tlineHeight: true,\n\t\topacity: true,\n\t\torder: true,\n\t\torphans: true,\n\t\tscale: true,\n\t\twidows: true,\n\t\tzIndex: true,\n\t\tzoom: true,\n\n\t\t// SVG-related\n\t\tfillOpacity: true,\n\t\tfloodOpacity: true,\n\t\tstopOpacity: true,\n\t\tstrokeMiterlimit: true,\n\t\tstrokeOpacity: true\n\t},\n\n\t// Add in properties whose names you wish to fix before\n\t// setting or getting the value\n\tcssProps: {},\n\n\t// Get and set the style property on a DOM Node\n\tstyle: function( elem, name, value, extra ) {\n\n\t\t// Don't set styles on text and comment nodes\n\t\tif ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Make sure that we're working with the right name\n\t\tvar ret, type, hooks,\n\t\t\torigName = camelCase( name ),\n\t\t\tisCustomProp = rcustomProp.test( name ),\n\t\t\tstyle = elem.style;\n\n\t\t// Make sure that we're working with the right name. We don't\n\t\t// want to query the value if it is a CSS custom property\n\t\t// since they are user-defined.\n\t\tif ( !isCustomProp ) {\n\t\t\tname = finalPropName( origName );\n\t\t}\n\n\t\t// Gets hook for the prefixed version, then unprefixed version\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// Check if we're setting a value\n\t\tif ( value !== undefined ) {\n\t\t\ttype = typeof value;\n\n\t\t\t// Convert \"+=\" or \"-=\" to relative numbers (trac-7345)\n\t\t\tif ( type === \"string\" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {\n\t\t\t\tvalue = adjustCSS( elem, name, ret );\n\n\t\t\t\t// Fixes bug trac-9237\n\t\t\t\ttype = \"number\";\n\t\t\t}\n\n\t\t\t// Make sure that null and NaN values aren't set (trac-7116)\n\t\t\tif ( value == null || value !== value ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If a number was passed in, add the unit (except for certain CSS properties)\n\t\t\t// The isCustomProp check can be removed in jQuery 4.0 when we only auto-append\n\t\t\t// \"px\" to a few hardcoded values.\n\t\t\tif ( type === \"number\" && !isCustomProp ) {\n\t\t\t\tvalue += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? \"\" : \"px\" );\n\t\t\t}\n\n\t\t\t// background-* props affect original clone's values\n\t\t\tif ( !support.clearCloneStyle && value === \"\" && name.indexOf( \"background\" ) === 0 ) {\n\t\t\t\tstyle[ name ] = \"inherit\";\n\t\t\t}\n\n\t\t\t// If a hook was provided, use that value, otherwise just set the specified value\n\t\t\tif ( !hooks || !( \"set\" in hooks ) ||\n\t\t\t\t( value = hooks.set( elem, value, extra ) ) !== undefined ) {\n\n\t\t\t\tif ( isCustomProp ) {\n\t\t\t\t\tstyle.setProperty( name, value );\n\t\t\t\t} else {\n\t\t\t\t\tstyle[ name ] = value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// If a hook was provided get the non-computed value from there\n\t\t\tif ( hooks && \"get\" in hooks &&\n\t\t\t\t( ret = hooks.get( elem, false, extra ) ) !== undefined ) {\n\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\t// Otherwise just get the value from the style object\n\t\t\treturn style[ name ];\n\t\t}\n\t},\n\n\tcss: function( elem, name, extra, styles ) {\n\t\tvar val, num, hooks,\n\t\t\torigName = camelCase( name ),\n\t\t\tisCustomProp = rcustomProp.test( name );\n\n\t\t// Make sure that we're working with the right name. We don't\n\t\t// want to modify the value if it is a CSS custom property\n\t\t// since they are user-defined.\n\t\tif ( !isCustomProp ) {\n\t\t\tname = finalPropName( origName );\n\t\t}\n\n\t\t// Try prefixed name followed by the unprefixed name\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// If a hook was provided get the computed value from there\n\t\tif ( hooks && \"get\" in hooks ) {\n\t\t\tval = hooks.get( elem, true, extra );\n\t\t}\n\n\t\t// Otherwise, if a way to get the computed value exists, use that\n\t\tif ( val === undefined ) {\n\t\t\tval = curCSS( elem, name, styles );\n\t\t}\n\n\t\t// Convert \"normal\" to computed value\n\t\tif ( val === \"normal\" && name in cssNormalTransform ) {\n\t\t\tval = cssNormalTransform[ name ];\n\t\t}\n\n\t\t// Make numeric if forced or a qualifier was provided and val looks numeric\n\t\tif ( extra === \"\" || extra ) {\n\t\t\tnum = parseFloat( val );\n\t\t\treturn extra === true || isFinite( num ) ? num || 0 : val;\n\t\t}\n\n\t\treturn val;\n\t}\n} );\n\njQuery.each( [ \"height\", \"width\" ], function( _i, dimension ) {\n\tjQuery.cssHooks[ dimension ] = {\n\t\tget: function( elem, computed, extra ) {\n\t\t\tif ( computed ) {\n\n\t\t\t\t// Certain elements can have dimension info if we invisibly show them\n\t\t\t\t// but it must have a current display style that would benefit\n\t\t\t\treturn rdisplayswap.test( jQuery.css( elem, \"display\" ) ) &&\n\n\t\t\t\t\t// Support: Safari 8+\n\t\t\t\t\t// Table columns in Safari have non-zero offsetWidth & zero\n\t\t\t\t\t// getBoundingClientRect().width unless display is changed.\n\t\t\t\t\t// Support: IE <=11 only\n\t\t\t\t\t// Running getBoundingClientRect on a disconnected node\n\t\t\t\t\t// in IE throws an error.\n\t\t\t\t\t( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?\n\t\t\t\t\tswap( elem, cssShow, function() {\n\t\t\t\t\t\treturn getWidthOrHeight( elem, dimension, extra );\n\t\t\t\t\t} ) :\n\t\t\t\t\tgetWidthOrHeight( elem, dimension, extra );\n\t\t\t}\n\t\t},\n\n\t\tset: function( elem, value, extra ) {\n\t\t\tvar matches,\n\t\t\t\tstyles = getStyles( elem ),\n\n\t\t\t\t// Only read styles.position if the test has a chance to fail\n\t\t\t\t// to avoid forcing a reflow.\n\t\t\t\tscrollboxSizeBuggy = !support.scrollboxSize() &&\n\t\t\t\t\tstyles.position === \"absolute\",\n\n\t\t\t\t// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991)\n\t\t\t\tboxSizingNeeded = scrollboxSizeBuggy || extra,\n\t\t\t\tisBorderBox = boxSizingNeeded &&\n\t\t\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\t\t\tsubtract = extra ?\n\t\t\t\t\tboxModelAdjustment(\n\t\t\t\t\t\telem,\n\t\t\t\t\t\tdimension,\n\t\t\t\t\t\textra,\n\t\t\t\t\t\tisBorderBox,\n\t\t\t\t\t\tstyles\n\t\t\t\t\t) :\n\t\t\t\t\t0;\n\n\t\t\t// Account for unreliable border-box dimensions by comparing offset* to computed and\n\t\t\t// faking a content-box to get border and padding (gh-3699)\n\t\t\tif ( isBorderBox && scrollboxSizeBuggy ) {\n\t\t\t\tsubtract -= Math.ceil(\n\t\t\t\t\telem[ \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -\n\t\t\t\t\tparseFloat( styles[ dimension ] ) -\n\t\t\t\t\tboxModelAdjustment( elem, dimension, \"border\", false, styles ) -\n\t\t\t\t\t0.5\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Convert to pixels if value adjustment is needed\n\t\t\tif ( subtract && ( matches = rcssNum.exec( value ) ) &&\n\t\t\t\t( matches[ 3 ] || \"px\" ) !== \"px\" ) {\n\n\t\t\t\telem.style[ dimension ] = value;\n\t\t\t\tvalue = jQuery.css( elem, dimension );\n\t\t\t}\n\n\t\t\treturn setPositiveNumber( elem, value, subtract );\n\t\t}\n\t};\n} );\n\njQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,\n\tfunction( elem, computed ) {\n\t\tif ( computed ) {\n\t\t\treturn ( parseFloat( curCSS( elem, \"marginLeft\" ) ) ||\n\t\t\t\telem.getBoundingClientRect().left -\n\t\t\t\t\tswap( elem, { marginLeft: 0 }, function() {\n\t\t\t\t\t\treturn elem.getBoundingClientRect().left;\n\t\t\t\t\t} )\n\t\t\t) + \"px\";\n\t\t}\n\t}\n);\n\n// These hooks are used by animate to expand properties\njQuery.each( {\n\tmargin: \"\",\n\tpadding: \"\",\n\tborder: \"Width\"\n}, function( prefix, suffix ) {\n\tjQuery.cssHooks[ prefix + suffix ] = {\n\t\texpand: function( value ) {\n\t\t\tvar i = 0,\n\t\t\t\texpanded = {},\n\n\t\t\t\t// Assumes a single number if not a string\n\t\t\t\tparts = typeof value === \"string\" ? value.split( \" \" ) : [ value ];\n\n\t\t\tfor ( ; i < 4; i++ ) {\n\t\t\t\texpanded[ prefix + cssExpand[ i ] + suffix ] =\n\t\t\t\t\tparts[ i ] || parts[ i - 2 ] || parts[ 0 ];\n\t\t\t}\n\n\t\t\treturn expanded;\n\t\t}\n\t};\n\n\tif ( prefix !== \"margin\" ) {\n\t\tjQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;\n\t}\n} );\n\njQuery.fn.extend( {\n\tcss: function( name, value ) {\n\t\treturn access( this, function( elem, name, value ) {\n\t\t\tvar styles, len,\n\t\t\t\tmap = {},\n\t\t\t\ti = 0;\n\n\t\t\tif ( Array.isArray( name ) ) {\n\t\t\t\tstyles = getStyles( elem );\n\t\t\t\tlen = name.length;\n\n\t\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\t\tmap[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );\n\t\t\t\t}\n\n\t\t\t\treturn map;\n\t\t\t}\n\n\t\t\treturn value !== undefined ?\n\t\t\t\tjQuery.style( elem, name, value ) :\n\t\t\t\tjQuery.css( elem, name );\n\t\t}, name, value, arguments.length > 1 );\n\t}\n} );\n\n\nfunction Tween( elem, options, prop, end, easing ) {\n\treturn new Tween.prototype.init( elem, options, prop, end, easing );\n}\njQuery.Tween = Tween;\n\nTween.prototype = {\n\tconstructor: Tween,\n\tinit: function( elem, options, prop, end, easing, unit ) {\n\t\tthis.elem = elem;\n\t\tthis.prop = prop;\n\t\tthis.easing = easing || jQuery.easing._default;\n\t\tthis.options = options;\n\t\tthis.start = this.now = this.cur();\n\t\tthis.end = end;\n\t\tthis.unit = unit || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" );\n\t},\n\tcur: function() {\n\t\tvar hooks = Tween.propHooks[ this.prop ];\n\n\t\treturn hooks && hooks.get ?\n\t\t\thooks.get( this ) :\n\t\t\tTween.propHooks._default.get( this );\n\t},\n\trun: function( percent ) {\n\t\tvar eased,\n\t\t\thooks = Tween.propHooks[ this.prop ];\n\n\t\tif ( this.options.duration ) {\n\t\t\tthis.pos = eased = jQuery.easing[ this.easing ](\n\t\t\t\tpercent, this.options.duration * percent, 0, 1, this.options.duration\n\t\t\t);\n\t\t} else {\n\t\t\tthis.pos = eased = percent;\n\t\t}\n\t\tthis.now = ( this.end - this.start ) * eased + this.start;\n\n\t\tif ( this.options.step ) {\n\t\t\tthis.options.step.call( this.elem, this.now, this );\n\t\t}\n\n\t\tif ( hooks && hooks.set ) {\n\t\t\thooks.set( this );\n\t\t} else {\n\t\t\tTween.propHooks._default.set( this );\n\t\t}\n\t\treturn this;\n\t}\n};\n\nTween.prototype.init.prototype = Tween.prototype;\n\nTween.propHooks = {\n\t_default: {\n\t\tget: function( tween ) {\n\t\t\tvar result;\n\n\t\t\t// Use a property on the element directly when it is not a DOM element,\n\t\t\t// or when there is no matching style property that exists.\n\t\t\tif ( tween.elem.nodeType !== 1 ||\n\t\t\t\ttween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {\n\t\t\t\treturn tween.elem[ tween.prop ];\n\t\t\t}\n\n\t\t\t// Passing an empty string as a 3rd parameter to .css will automatically\n\t\t\t// attempt a parseFloat and fallback to a string if the parse fails.\n\t\t\t// Simple values such as \"10px\" are parsed to Float;\n\t\t\t// complex values such as \"rotate(1rad)\" are returned as-is.\n\t\t\tresult = jQuery.css( tween.elem, tween.prop, \"\" );\n\n\t\t\t// Empty strings, null, undefined and \"auto\" are converted to 0.\n\t\t\treturn !result || result === \"auto\" ? 0 : result;\n\t\t},\n\t\tset: function( tween ) {\n\n\t\t\t// Use step hook for back compat.\n\t\t\t// Use cssHook if its there.\n\t\t\t// Use .style if available and use plain properties where available.\n\t\t\tif ( jQuery.fx.step[ tween.prop ] ) {\n\t\t\t\tjQuery.fx.step[ tween.prop ]( tween );\n\t\t\t} else if ( tween.elem.nodeType === 1 && (\n\t\t\t\tjQuery.cssHooks[ tween.prop ] ||\n\t\t\t\t\ttween.elem.style[ finalPropName( tween.prop ) ] != null ) ) {\n\t\t\t\tjQuery.style( tween.elem, tween.prop, tween.now + tween.unit );\n\t\t\t} else {\n\t\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Support: IE <=9 only\n// Panic based approach to setting things on disconnected nodes\nTween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {\n\tset: function( tween ) {\n\t\tif ( tween.elem.nodeType && tween.elem.parentNode ) {\n\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t}\n\t}\n};\n\njQuery.easing = {\n\tlinear: function( p ) {\n\t\treturn p;\n\t},\n\tswing: function( p ) {\n\t\treturn 0.5 - Math.cos( p * Math.PI ) / 2;\n\t},\n\t_default: \"swing\"\n};\n\njQuery.fx = Tween.prototype.init;\n\n// Back compat <1.8 extension point\njQuery.fx.step = {};\n\n\n\n\nvar\n\tfxNow, inProgress,\n\trfxtypes = /^(?:toggle|show|hide)$/,\n\trrun = /queueHooks$/;\n\nfunction schedule() {\n\tif ( inProgress ) {\n\t\tif ( document.hidden === false && window.requestAnimationFrame ) {\n\t\t\twindow.requestAnimationFrame( schedule );\n\t\t} else {\n\t\t\twindow.setTimeout( schedule, jQuery.fx.interval );\n\t\t}\n\n\t\tjQuery.fx.tick();\n\t}\n}\n\n// Animations created synchronously will run synchronously\nfunction createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}\n\n// Generate parameters to create a standard animation\nfunction genFx( type, includeWidth ) {\n\tvar which,\n\t\ti = 0,\n\t\tattrs = { height: type };\n\n\t// If we include width, step value is 1 to do all cssExpand values,\n\t// otherwise step value is 2 to skip over Left and Right\n\tincludeWidth = includeWidth ? 1 : 0;\n\tfor ( ; i < 4; i += 2 - includeWidth ) {\n\t\twhich = cssExpand[ i ];\n\t\tattrs[ \"margin\" + which ] = attrs[ \"padding\" + which ] = type;\n\t}\n\n\tif ( includeWidth ) {\n\t\tattrs.opacity = attrs.width = type;\n\t}\n\n\treturn attrs;\n}\n\nfunction createTween( value, prop, animation ) {\n\tvar tween,\n\t\tcollection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ \"*\" ] ),\n\t\tindex = 0,\n\t\tlength = collection.length;\n\tfor ( ; index < length; index++ ) {\n\t\tif ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {\n\n\t\t\t// We're done with this property\n\t\t\treturn tween;\n\t\t}\n\t}\n}\n\nfunction defaultPrefilter( elem, props, opts ) {\n\tvar prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,\n\t\tisBox = \"width\" in props || \"height\" in props,\n\t\tanim = this,\n\t\torig = {},\n\t\tstyle = elem.style,\n\t\thidden = elem.nodeType && isHiddenWithinTree( elem ),\n\t\tdataShow = dataPriv.get( elem, \"fxshow\" );\n\n\t// Queue-skipping animations hijack the fx hooks\n\tif ( !opts.queue ) {\n\t\thooks = jQuery._queueHooks( elem, \"fx\" );\n\t\tif ( hooks.unqueued == null ) {\n\t\t\thooks.unqueued = 0;\n\t\t\toldfire = hooks.empty.fire;\n\t\t\thooks.empty.fire = function() {\n\t\t\t\tif ( !hooks.unqueued ) {\n\t\t\t\t\toldfire();\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\thooks.unqueued++;\n\n\t\tanim.always( function() {\n\n\t\t\t// Ensure the complete handler is called before this completes\n\t\t\tanim.always( function() {\n\t\t\t\thooks.unqueued--;\n\t\t\t\tif ( !jQuery.queue( elem, \"fx\" ).length ) {\n\t\t\t\t\thooks.empty.fire();\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\t}\n\n\t// Detect show/hide animations\n\tfor ( prop in props ) {\n\t\tvalue = props[ prop ];\n\t\tif ( rfxtypes.test( value ) ) {\n\t\t\tdelete props[ prop ];\n\t\t\ttoggle = toggle || value === \"toggle\";\n\t\t\tif ( value === ( hidden ? \"hide\" : \"show\" ) ) {\n\n\t\t\t\t// Pretend to be hidden if this is a \"show\" and\n\t\t\t\t// there is still data from a stopped show/hide\n\t\t\t\tif ( value === \"show\" && dataShow && dataShow[ prop ] !== undefined ) {\n\t\t\t\t\thidden = true;\n\n\t\t\t\t// Ignore all other no-op show/hide data\n\t\t\t\t} else {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\torig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );\n\t\t}\n\t}\n\n\t// Bail out if this is a no-op like .hide().hide()\n\tpropTween = !jQuery.isEmptyObject( props );\n\tif ( !propTween && jQuery.isEmptyObject( orig ) ) {\n\t\treturn;\n\t}\n\n\t// Restrict \"overflow\" and \"display\" styles during box animations\n\tif ( isBox && elem.nodeType === 1 ) {\n\n\t\t// Support: IE <=9 - 11, Edge 12 - 15\n\t\t// Record all 3 overflow attributes because IE does not infer the shorthand\n\t\t// from identically-valued overflowX and overflowY and Edge just mirrors\n\t\t// the overflowX value there.\n\t\topts.overflow = [ style.overflow, style.overflowX, style.overflowY ];\n\n\t\t// Identify a display type, preferring old show/hide data over the CSS cascade\n\t\trestoreDisplay = dataShow && dataShow.display;\n\t\tif ( restoreDisplay == null ) {\n\t\t\trestoreDisplay = dataPriv.get( elem, \"display\" );\n\t\t}\n\t\tdisplay = jQuery.css( elem, \"display\" );\n\t\tif ( display === \"none\" ) {\n\t\t\tif ( restoreDisplay ) {\n\t\t\t\tdisplay = restoreDisplay;\n\t\t\t} else {\n\n\t\t\t\t// Get nonempty value(s) by temporarily forcing visibility\n\t\t\t\tshowHide( [ elem ], true );\n\t\t\t\trestoreDisplay = elem.style.display || restoreDisplay;\n\t\t\t\tdisplay = jQuery.css( elem, \"display\" );\n\t\t\t\tshowHide( [ elem ] );\n\t\t\t}\n\t\t}\n\n\t\t// Animate inline elements as inline-block\n\t\tif ( display === \"inline\" || display === \"inline-block\" && restoreDisplay != null ) {\n\t\t\tif ( jQuery.css( elem, \"float\" ) === \"none\" ) {\n\n\t\t\t\t// Restore the original display value at the end of pure show/hide animations\n\t\t\t\tif ( !propTween ) {\n\t\t\t\t\tanim.done( function() {\n\t\t\t\t\t\tstyle.display = restoreDisplay;\n\t\t\t\t\t} );\n\t\t\t\t\tif ( restoreDisplay == null ) {\n\t\t\t\t\t\tdisplay = style.display;\n\t\t\t\t\t\trestoreDisplay = display === \"none\" ? \"\" : display;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstyle.display = \"inline-block\";\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( opts.overflow ) {\n\t\tstyle.overflow = \"hidden\";\n\t\tanim.always( function() {\n\t\t\tstyle.overflow = opts.overflow[ 0 ];\n\t\t\tstyle.overflowX = opts.overflow[ 1 ];\n\t\t\tstyle.overflowY = opts.overflow[ 2 ];\n\t\t} );\n\t}\n\n\t// Implement show/hide animations\n\tpropTween = false;\n\tfor ( prop in orig ) {\n\n\t\t// General show/hide setup for this element animation\n\t\tif ( !propTween ) {\n\t\t\tif ( dataShow ) {\n\t\t\t\tif ( \"hidden\" in dataShow ) {\n\t\t\t\t\thidden = dataShow.hidden;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdataShow = dataPriv.access( elem, \"fxshow\", { display: restoreDisplay } );\n\t\t\t}\n\n\t\t\t// Store hidden/visible for toggle so `.stop().toggle()` \"reverses\"\n\t\t\tif ( toggle ) {\n\t\t\t\tdataShow.hidden = !hidden;\n\t\t\t}\n\n\t\t\t// Show elements before animating them\n\t\t\tif ( hidden ) {\n\t\t\t\tshowHide( [ elem ], true );\n\t\t\t}\n\n\t\t\t/* eslint-disable no-loop-func */\n\n\t\t\tanim.done( function() {\n\n\t\t\t\t/* eslint-enable no-loop-func */\n\n\t\t\t\t// The final step of a \"hide\" animation is actually hiding the element\n\t\t\t\tif ( !hidden ) {\n\t\t\t\t\tshowHide( [ elem ] );\n\t\t\t\t}\n\t\t\t\tdataPriv.remove( elem, \"fxshow\" );\n\t\t\t\tfor ( prop in orig ) {\n\t\t\t\t\tjQuery.style( elem, prop, orig[ prop ] );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\t// Per-property setup\n\t\tpropTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );\n\t\tif ( !( prop in dataShow ) ) {\n\t\t\tdataShow[ prop ] = propTween.start;\n\t\t\tif ( hidden ) {\n\t\t\t\tpropTween.end = propTween.start;\n\t\t\t\tpropTween.start = 0;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction propFilter( props, specialEasing ) {\n\tvar index, name, easing, value, hooks;\n\n\t// camelCase, specialEasing and expand cssHook pass\n\tfor ( index in props ) {\n\t\tname = camelCase( index );\n\t\teasing = specialEasing[ name ];\n\t\tvalue = props[ index ];\n\t\tif ( Array.isArray( value ) ) {\n\t\t\teasing = value[ 1 ];\n\t\t\tvalue = props[ index ] = value[ 0 ];\n\t\t}\n\n\t\tif ( index !== name ) {\n\t\t\tprops[ name ] = value;\n\t\t\tdelete props[ index ];\n\t\t}\n\n\t\thooks = jQuery.cssHooks[ name ];\n\t\tif ( hooks && \"expand\" in hooks ) {\n\t\t\tvalue = hooks.expand( value );\n\t\t\tdelete props[ name ];\n\n\t\t\t// Not quite $.extend, this won't overwrite existing keys.\n\t\t\t// Reusing 'index' because we have the correct \"name\"\n\t\t\tfor ( index in value ) {\n\t\t\t\tif ( !( index in props ) ) {\n\t\t\t\t\tprops[ index ] = value[ index ];\n\t\t\t\t\tspecialEasing[ index ] = easing;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tspecialEasing[ name ] = easing;\n\t\t}\n\t}\n}\n\nfunction Animation( elem, properties, options ) {\n\tvar result,\n\t\tstopped,\n\t\tindex = 0,\n\t\tlength = Animation.prefilters.length,\n\t\tdeferred = jQuery.Deferred().always( function() {\n\n\t\t\t// Don't match elem in the :animated selector\n\t\t\tdelete tick.elem;\n\t\t} ),\n\t\ttick = function() {\n\t\t\tif ( stopped ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tvar currentTime = fxNow || createFxNow(),\n\t\t\t\tremaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),\n\n\t\t\t\t// Support: Android 2.3 only\n\t\t\t\t// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (trac-12497)\n\t\t\t\ttemp = remaining / animation.duration || 0,\n\t\t\t\tpercent = 1 - temp,\n\t\t\t\tindex = 0,\n\t\t\t\tlength = animation.tweens.length;\n\n\t\t\tfor ( ; index < length; index++ ) {\n\t\t\t\tanimation.tweens[ index ].run( percent );\n\t\t\t}\n\n\t\t\tdeferred.notifyWith( elem, [ animation, percent, remaining ] );\n\n\t\t\t// If there's more to do, yield\n\t\t\tif ( percent < 1 && length ) {\n\t\t\t\treturn remaining;\n\t\t\t}\n\n\t\t\t// If this was an empty animation, synthesize a final progress notification\n\t\t\tif ( !length ) {\n\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\n\t\t\t}\n\n\t\t\t// Resolve the animation and report its conclusion\n\t\t\tdeferred.resolveWith( elem, [ animation ] );\n\t\t\treturn false;\n\t\t},\n\t\tanimation = deferred.promise( {\n\t\t\telem: elem,\n\t\t\tprops: jQuery.extend( {}, properties ),\n\t\t\topts: jQuery.extend( true, {\n\t\t\t\tspecialEasing: {},\n\t\t\t\teasing: jQuery.easing._default\n\t\t\t}, options ),\n\t\t\toriginalProperties: properties,\n\t\t\toriginalOptions: options,\n\t\t\tstartTime: fxNow || createFxNow(),\n\t\t\tduration: options.duration,\n\t\t\ttweens: [],\n\t\t\tcreateTween: function( prop, end ) {\n\t\t\t\tvar tween = jQuery.Tween( elem, animation.opts, prop, end,\n\t\t\t\t\tanimation.opts.specialEasing[ prop ] || animation.opts.easing );\n\t\t\t\tanimation.tweens.push( tween );\n\t\t\t\treturn tween;\n\t\t\t},\n\t\t\tstop: function( gotoEnd ) {\n\t\t\t\tvar index = 0,\n\n\t\t\t\t\t// If we are going to the end, we want to run all the tweens\n\t\t\t\t\t// otherwise we skip this part\n\t\t\t\t\tlength = gotoEnd ? animation.tweens.length : 0;\n\t\t\t\tif ( stopped ) {\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t\tstopped = true;\n\t\t\t\tfor ( ; index < length; index++ ) {\n\t\t\t\t\tanimation.tweens[ index ].run( 1 );\n\t\t\t\t}\n\n\t\t\t\t// Resolve when we played the last frame; otherwise, reject\n\t\t\t\tif ( gotoEnd ) {\n\t\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\n\t\t\t\t\tdeferred.resolveWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t} else {\n\t\t\t\t\tdeferred.rejectWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t}\n\t\t} ),\n\t\tprops = animation.props;\n\n\tpropFilter( props, animation.opts.specialEasing );\n\n\tfor ( ; index < length; index++ ) {\n\t\tresult = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );\n\t\tif ( result ) {\n\t\t\tif ( isFunction( result.stop ) ) {\n\t\t\t\tjQuery._queueHooks( animation.elem, animation.opts.queue ).stop =\n\t\t\t\t\tresult.stop.bind( result );\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t}\n\n\tjQuery.map( props, createTween, animation );\n\n\tif ( isFunction( animation.opts.start ) ) {\n\t\tanimation.opts.start.call( elem, animation );\n\t}\n\n\t// Attach callbacks from options\n\tanimation\n\t\t.progress( animation.opts.progress )\n\t\t.done( animation.opts.done, animation.opts.complete )\n\t\t.fail( animation.opts.fail )\n\t\t.always( animation.opts.always );\n\n\tjQuery.fx.timer(\n\t\tjQuery.extend( tick, {\n\t\t\telem: elem,\n\t\t\tanim: animation,\n\t\t\tqueue: animation.opts.queue\n\t\t} )\n\t);\n\n\treturn animation;\n}\n\njQuery.Animation = jQuery.extend( Animation, {\n\n\ttweeners: {\n\t\t\"*\": [ function( prop, value ) {\n\t\t\tvar tween = this.createTween( prop, value );\n\t\t\tadjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );\n\t\t\treturn tween;\n\t\t} ]\n\t},\n\n\ttweener: function( props, callback ) {\n\t\tif ( isFunction( props ) ) {\n\t\t\tcallback = props;\n\t\t\tprops = [ \"*\" ];\n\t\t} else {\n\t\t\tprops = props.match( rnothtmlwhite );\n\t\t}\n\n\t\tvar prop,\n\t\t\tindex = 0,\n\t\t\tlength = props.length;\n\n\t\tfor ( ; index < length; index++ ) {\n\t\t\tprop = props[ index ];\n\t\t\tAnimation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];\n\t\t\tAnimation.tweeners[ prop ].unshift( callback );\n\t\t}\n\t},\n\n\tprefilters: [ defaultPrefilter ],\n\n\tprefilter: function( callback, prepend ) {\n\t\tif ( prepend ) {\n\t\t\tAnimation.prefilters.unshift( callback );\n\t\t} else {\n\t\t\tAnimation.prefilters.push( callback );\n\t\t}\n\t}\n} );\n\njQuery.speed = function( speed, easing, fn ) {\n\tvar opt = speed && typeof speed === \"object\" ? jQuery.extend( {}, speed ) : {\n\t\tcomplete: fn || !fn && easing ||\n\t\t\tisFunction( speed ) && speed,\n\t\tduration: speed,\n\t\teasing: fn && easing || easing && !isFunction( easing ) && easing\n\t};\n\n\t// Go to the end state if fx are off\n\tif ( jQuery.fx.off ) {\n\t\topt.duration = 0;\n\n\t} else {\n\t\tif ( typeof opt.duration !== \"number\" ) {\n\t\t\tif ( opt.duration in jQuery.fx.speeds ) {\n\t\t\t\topt.duration = jQuery.fx.speeds[ opt.duration ];\n\n\t\t\t} else {\n\t\t\t\topt.duration = jQuery.fx.speeds._default;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Normalize opt.queue - true/undefined/null -> \"fx\"\n\tif ( opt.queue == null || opt.queue === true ) {\n\t\topt.queue = \"fx\";\n\t}\n\n\t// Queueing\n\topt.old = opt.complete;\n\n\topt.complete = function() {\n\t\tif ( isFunction( opt.old ) ) {\n\t\t\topt.old.call( this );\n\t\t}\n\n\t\tif ( opt.queue ) {\n\t\t\tjQuery.dequeue( this, opt.queue );\n\t\t}\n\t};\n\n\treturn opt;\n};\n\njQuery.fn.extend( {\n\tfadeTo: function( speed, to, easing, callback ) {\n\n\t\t// Show any hidden elements after setting opacity to 0\n\t\treturn this.filter( isHiddenWithinTree ).css( \"opacity\", 0 ).show()\n\n\t\t\t// Animate to the value specified\n\t\t\t.end().animate( { opacity: to }, speed, easing, callback );\n\t},\n\tanimate: function( prop, speed, easing, callback ) {\n\t\tvar empty = jQuery.isEmptyObject( prop ),\n\t\t\toptall = jQuery.speed( speed, easing, callback ),\n\t\t\tdoAnimation = function() {\n\n\t\t\t\t// Operate on a copy of prop so per-property easing won't be lost\n\t\t\t\tvar anim = Animation( this, jQuery.extend( {}, prop ), optall );\n\n\t\t\t\t// Empty animations, or finishing resolves immediately\n\t\t\t\tif ( empty || dataPriv.get( this, \"finish\" ) ) {\n\t\t\t\t\tanim.stop( true );\n\t\t\t\t}\n\t\t\t};\n\n\t\tdoAnimation.finish = doAnimation;\n\n\t\treturn empty || optall.queue === false ?\n\t\t\tthis.each( doAnimation ) :\n\t\t\tthis.queue( optall.queue, doAnimation );\n\t},\n\tstop: function( type, clearQueue, gotoEnd ) {\n\t\tvar stopQueue = function( hooks ) {\n\t\t\tvar stop = hooks.stop;\n\t\t\tdelete hooks.stop;\n\t\t\tstop( gotoEnd );\n\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tgotoEnd = clearQueue;\n\t\t\tclearQueue = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\tif ( clearQueue ) {\n\t\t\tthis.queue( type || \"fx\", [] );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar dequeue = true,\n\t\t\t\tindex = type != null && type + \"queueHooks\",\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tdata = dataPriv.get( this );\n\n\t\t\tif ( index ) {\n\t\t\t\tif ( data[ index ] && data[ index ].stop ) {\n\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( index in data ) {\n\t\t\t\t\tif ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {\n\t\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this &&\n\t\t\t\t\t( type == null || timers[ index ].queue === type ) ) {\n\n\t\t\t\t\ttimers[ index ].anim.stop( gotoEnd );\n\t\t\t\t\tdequeue = false;\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Start the next in the queue if the last step wasn't forced.\n\t\t\t// Timers currently will call their complete callbacks, which\n\t\t\t// will dequeue but only if they were gotoEnd.\n\t\t\tif ( dequeue || !gotoEnd ) {\n\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t}\n\t\t} );\n\t},\n\tfinish: function( type ) {\n\t\tif ( type !== false ) {\n\t\t\ttype = type || \"fx\";\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tvar index,\n\t\t\t\tdata = dataPriv.get( this ),\n\t\t\t\tqueue = data[ type + \"queue\" ],\n\t\t\t\thooks = data[ type + \"queueHooks\" ],\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tlength = queue ? queue.length : 0;\n\n\t\t\t// Enable finishing flag on private data\n\t\t\tdata.finish = true;\n\n\t\t\t// Empty the queue first\n\t\t\tjQuery.queue( this, type, [] );\n\n\t\t\tif ( hooks && hooks.stop ) {\n\t\t\t\thooks.stop.call( this, true );\n\t\t\t}\n\n\t\t\t// Look for any active animations, and finish them\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this && timers[ index ].queue === type ) {\n\t\t\t\t\ttimers[ index ].anim.stop( true );\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Look for any animations in the old queue and finish them\n\t\t\tfor ( index = 0; index < length; index++ ) {\n\t\t\t\tif ( queue[ index ] && queue[ index ].finish ) {\n\t\t\t\t\tqueue[ index ].finish.call( this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Turn off finishing flag\n\t\t\tdelete data.finish;\n\t\t} );\n\t}\n} );\n\njQuery.each( [ \"toggle\", \"show\", \"hide\" ], function( _i, name ) {\n\tvar cssFn = jQuery.fn[ name ];\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn speed == null || typeof speed === \"boolean\" ?\n\t\t\tcssFn.apply( this, arguments ) :\n\t\t\tthis.animate( genFx( name, true ), speed, easing, callback );\n\t};\n} );\n\n// Generate shortcuts for custom animations\njQuery.each( {\n\tslideDown: genFx( \"show\" ),\n\tslideUp: genFx( \"hide\" ),\n\tslideToggle: genFx( \"toggle\" ),\n\tfadeIn: { opacity: \"show\" },\n\tfadeOut: { opacity: \"hide\" },\n\tfadeToggle: { opacity: \"toggle\" }\n}, function( name, props ) {\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn this.animate( props, speed, easing, callback );\n\t};\n} );\n\njQuery.timers = [];\njQuery.fx.tick = function() {\n\tvar timer,\n\t\ti = 0,\n\t\ttimers = jQuery.timers;\n\n\tfxNow = Date.now();\n\n\tfor ( ; i < timers.length; i++ ) {\n\t\ttimer = timers[ i ];\n\n\t\t// Run the timer and safely remove it when done (allowing for external removal)\n\t\tif ( !timer() && timers[ i ] === timer ) {\n\t\t\ttimers.splice( i--, 1 );\n\t\t}\n\t}\n\n\tif ( !timers.length ) {\n\t\tjQuery.fx.stop();\n\t}\n\tfxNow = undefined;\n};\n\njQuery.fx.timer = function( timer ) {\n\tjQuery.timers.push( timer );\n\tjQuery.fx.start();\n};\n\njQuery.fx.interval = 13;\njQuery.fx.start = function() {\n\tif ( inProgress ) {\n\t\treturn;\n\t}\n\n\tinProgress = true;\n\tschedule();\n};\n\njQuery.fx.stop = function() {\n\tinProgress = null;\n};\n\njQuery.fx.speeds = {\n\tslow: 600,\n\tfast: 200,\n\n\t// Default speed\n\t_default: 400\n};\n\n\n// Based off of the plugin by Clint Helfers, with permission.\njQuery.fn.delay = function( time, type ) {\n\ttime = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;\n\ttype = type || \"fx\";\n\n\treturn this.queue( type, function( next, hooks ) {\n\t\tvar timeout = window.setTimeout( next, time );\n\t\thooks.stop = function() {\n\t\t\twindow.clearTimeout( timeout );\n\t\t};\n\t} );\n};\n\n\n( function() {\n\tvar input = document.createElement( \"input\" ),\n\t\tselect = document.createElement( \"select\" ),\n\t\topt = select.appendChild( document.createElement( \"option\" ) );\n\n\tinput.type = \"checkbox\";\n\n\t// Support: Android <=4.3 only\n\t// Default value for a checkbox should be \"on\"\n\tsupport.checkOn = input.value !== \"\";\n\n\t// Support: IE <=11 only\n\t// Must access selectedIndex to make default options select\n\tsupport.optSelected = opt.selected;\n\n\t// Support: IE <=11 only\n\t// An input loses its value after becoming a radio\n\tinput = document.createElement( \"input\" );\n\tinput.value = \"t\";\n\tinput.type = \"radio\";\n\tsupport.radioValue = input.value === \"t\";\n} )();\n\n\nvar boolHook,\n\tattrHandle = jQuery.expr.attrHandle;\n\njQuery.fn.extend( {\n\tattr: function( name, value ) {\n\t\treturn access( this, jQuery.attr, name, value, arguments.length > 1 );\n\t},\n\n\tremoveAttr: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.removeAttr( this, name );\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tattr: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set attributes on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Fallback to prop when attributes are not supported\n\t\tif ( typeof elem.getAttribute === \"undefined\" ) {\n\t\t\treturn jQuery.prop( elem, name, value );\n\t\t}\n\n\t\t// Attribute hooks are determined by the lowercase version\n\t\t// Grab necessary hook if one is defined\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\t\t\thooks = jQuery.attrHooks[ name.toLowerCase() ] ||\n\t\t\t\t( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( value === null ) {\n\t\t\t\tjQuery.removeAttr( elem, name );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\telem.setAttribute( name, value + \"\" );\n\t\t\treturn value;\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\tret = jQuery.find.attr( elem, name );\n\n\t\t// Non-existent attributes return null, we normalize to undefined\n\t\treturn ret == null ? undefined : ret;\n\t},\n\n\tattrHooks: {\n\t\ttype: {\n\t\t\tset: function( elem, value ) {\n\t\t\t\tif ( !support.radioValue && value === \"radio\" &&\n\t\t\t\t\tnodeName( elem, \"input\" ) ) {\n\t\t\t\t\tvar val = elem.value;\n\t\t\t\t\telem.setAttribute( \"type\", value );\n\t\t\t\t\tif ( val ) {\n\t\t\t\t\t\telem.value = val;\n\t\t\t\t\t}\n\t\t\t\t\treturn value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\tremoveAttr: function( elem, value ) {\n\t\tvar name,\n\t\t\ti = 0,\n\n\t\t\t// Attribute names can contain non-HTML whitespace characters\n\t\t\t// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n\t\t\tattrNames = value && value.match( rnothtmlwhite );\n\n\t\tif ( attrNames && elem.nodeType === 1 ) {\n\t\t\twhile ( ( name = attrNames[ i++ ] ) ) {\n\t\t\t\telem.removeAttribute( name );\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Hooks for boolean attributes\nboolHook = {\n\tset: function( elem, value, name ) {\n\t\tif ( value === false ) {\n\n\t\t\t// Remove boolean attributes when set to false\n\t\t\tjQuery.removeAttr( elem, name );\n\t\t} else {\n\t\t\telem.setAttribute( name, name );\n\t\t}\n\t\treturn name;\n\t}\n};\n\njQuery.each( jQuery.expr.match.bool.source.match( /\\w+/g ), function( _i, name ) {\n\tvar getter = attrHandle[ name ] || jQuery.find.attr;\n\n\tattrHandle[ name ] = function( elem, name, isXML ) {\n\t\tvar ret, handle,\n\t\t\tlowercaseName = name.toLowerCase();\n\n\t\tif ( !isXML ) {\n\n\t\t\t// Avoid an infinite loop by temporarily removing this function from the getter\n\t\t\thandle = attrHandle[ lowercaseName ];\n\t\t\tattrHandle[ lowercaseName ] = ret;\n\t\t\tret = getter( elem, name, isXML ) != null ?\n\t\t\t\tlowercaseName :\n\t\t\t\tnull;\n\t\t\tattrHandle[ lowercaseName ] = handle;\n\t\t}\n\t\treturn ret;\n\t};\n} );\n\n\n\n\nvar rfocusable = /^(?:input|select|textarea|button)$/i,\n\trclickable = /^(?:a|area)$/i;\n\njQuery.fn.extend( {\n\tprop: function( name, value ) {\n\t\treturn access( this, jQuery.prop, name, value, arguments.length > 1 );\n\t},\n\n\tremoveProp: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tdelete this[ jQuery.propFix[ name ] || name ];\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tprop: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set properties on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// Fix name and attach hooks\n\t\t\tname = jQuery.propFix[ name ] || name;\n\t\t\thooks = jQuery.propHooks[ name ];\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\treturn ( elem[ name ] = value );\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\treturn elem[ name ];\n\t},\n\n\tpropHooks: {\n\t\ttabIndex: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\t// Support: IE <=9 - 11 only\n\t\t\t\t// elem.tabIndex doesn't always return the\n\t\t\t\t// correct value when it hasn't been explicitly set\n\t\t\t\t// Use proper attribute retrieval (trac-12072)\n\t\t\t\tvar tabindex = jQuery.find.attr( elem, \"tabindex\" );\n\n\t\t\t\tif ( tabindex ) {\n\t\t\t\t\treturn parseInt( tabindex, 10 );\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\trfocusable.test( elem.nodeName ) ||\n\t\t\t\t\trclickable.test( elem.nodeName ) &&\n\t\t\t\t\telem.href\n\t\t\t\t) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t},\n\n\tpropFix: {\n\t\t\"for\": \"htmlFor\",\n\t\t\"class\": \"className\"\n\t}\n} );\n\n// Support: IE <=11 only\n// Accessing the selectedIndex property\n// forces the browser to respect setting selected\n// on the option\n// The getter ensures a default option is selected\n// when in an optgroup\n// eslint rule \"no-unused-expressions\" is disabled for this code\n// since it considers such accessions noop\nif ( !support.optSelected ) {\n\tjQuery.propHooks.selected = {\n\t\tget: function( elem ) {\n\n\t\t\t/* eslint no-unused-expressions: \"off\" */\n\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent && parent.parentNode ) {\n\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\t\tset: function( elem ) {\n\n\t\t\t/* eslint no-unused-expressions: \"off\" */\n\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent ) {\n\t\t\t\tparent.selectedIndex;\n\n\t\t\t\tif ( parent.parentNode ) {\n\t\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\njQuery.each( [\n\t\"tabIndex\",\n\t\"readOnly\",\n\t\"maxLength\",\n\t\"cellSpacing\",\n\t\"cellPadding\",\n\t\"rowSpan\",\n\t\"colSpan\",\n\t\"useMap\",\n\t\"frameBorder\",\n\t\"contentEditable\"\n], function() {\n\tjQuery.propFix[ this.toLowerCase() ] = this;\n} );\n\n\n\n\n\t// Strip and collapse whitespace according to HTML spec\n\t// https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace\n\tfunction stripAndCollapse( value ) {\n\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\treturn tokens.join( \" \" );\n\t}\n\n\nfunction getClass( elem ) {\n\treturn elem.getAttribute && elem.getAttribute( \"class\" ) || \"\";\n}\n\nfunction classesToArray( value ) {\n\tif ( Array.isArray( value ) ) {\n\t\treturn value;\n\t}\n\tif ( typeof value === \"string\" ) {\n\t\treturn value.match( rnothtmlwhite ) || [];\n\t}\n\treturn [];\n}\n\njQuery.fn.extend( {\n\taddClass: function( value ) {\n\t\tvar classNames, cur, curValue, className, i, finalValue;\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).addClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tclassNames = classesToArray( value );\n\n\t\tif ( classNames.length ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tcurValue = getClass( this );\n\t\t\t\tcur = this.nodeType === 1 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\n\t\t\t\t\t\tclassName = classNames[ i ];\n\t\t\t\t\t\tif ( cur.indexOf( \" \" + className + \" \" ) < 0 ) {\n\t\t\t\t\t\t\tcur += className + \" \";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = stripAndCollapse( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\tthis.setAttribute( \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tremoveClass: function( value ) {\n\t\tvar classNames, cur, curValue, className, i, finalValue;\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tif ( !arguments.length ) {\n\t\t\treturn this.attr( \"class\", \"\" );\n\t\t}\n\n\t\tclassNames = classesToArray( value );\n\n\t\tif ( classNames.length ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tcurValue = getClass( this );\n\n\t\t\t\t// This expression is here for better compressibility (see addClass)\n\t\t\t\tcur = this.nodeType === 1 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\n\t\t\t\t\t\tclassName = classNames[ i ];\n\n\t\t\t\t\t\t// Remove *all* instances\n\t\t\t\t\t\twhile ( cur.indexOf( \" \" + className + \" \" ) > -1 ) {\n\t\t\t\t\t\t\tcur = cur.replace( \" \" + className + \" \", \" \" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = stripAndCollapse( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\tthis.setAttribute( \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\ttoggleClass: function( value, stateVal ) {\n\t\tvar classNames, className, i, self,\n\t\t\ttype = typeof value,\n\t\t\tisValidValue = type === \"string\" || Array.isArray( value );\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).toggleClass(\n\t\t\t\t\tvalue.call( this, i, getClass( this ), stateVal ),\n\t\t\t\t\tstateVal\n\t\t\t\t);\n\t\t\t} );\n\t\t}\n\n\t\tif ( typeof stateVal === \"boolean\" && isValidValue ) {\n\t\t\treturn stateVal ? this.addClass( value ) : this.removeClass( value );\n\t\t}\n\n\t\tclassNames = classesToArray( value );\n\n\t\treturn this.each( function() {\n\t\t\tif ( isValidValue ) {\n\n\t\t\t\t// Toggle individual class names\n\t\t\t\tself = jQuery( this );\n\n\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\n\t\t\t\t\tclassName = classNames[ i ];\n\n\t\t\t\t\t// Check each className given, space separated list\n\t\t\t\t\tif ( self.hasClass( className ) ) {\n\t\t\t\t\t\tself.removeClass( className );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tself.addClass( className );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// Toggle whole class name\n\t\t\t} else if ( value === undefined || type === \"boolean\" ) {\n\t\t\t\tclassName = getClass( this );\n\t\t\t\tif ( className ) {\n\n\t\t\t\t\t// Store className if set\n\t\t\t\t\tdataPriv.set( this, \"__className__\", className );\n\t\t\t\t}\n\n\t\t\t\t// If the element has a class name or if we're passed `false`,\n\t\t\t\t// then remove the whole classname (if there was one, the above saved it).\n\t\t\t\t// Otherwise bring back whatever was previously saved (if anything),\n\t\t\t\t// falling back to the empty string if nothing was stored.\n\t\t\t\tif ( this.setAttribute ) {\n\t\t\t\t\tthis.setAttribute( \"class\",\n\t\t\t\t\t\tclassName || value === false ?\n\t\t\t\t\t\t\t\"\" :\n\t\t\t\t\t\t\tdataPriv.get( this, \"__className__\" ) || \"\"\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\thasClass: function( selector ) {\n\t\tvar className, elem,\n\t\t\ti = 0;\n\n\t\tclassName = \" \" + selector + \" \";\n\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\tif ( elem.nodeType === 1 &&\n\t\t\t\t( \" \" + stripAndCollapse( getClass( elem ) ) + \" \" ).indexOf( className ) > -1 ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n} );\n\n\n\n\nvar rreturn = /\\r/g;\n\njQuery.fn.extend( {\n\tval: function( value ) {\n\t\tvar hooks, ret, valueIsFunction,\n\t\t\telem = this[ 0 ];\n\n\t\tif ( !arguments.length ) {\n\t\t\tif ( elem ) {\n\t\t\t\thooks = jQuery.valHooks[ elem.type ] ||\n\t\t\t\t\tjQuery.valHooks[ elem.nodeName.toLowerCase() ];\n\n\t\t\t\tif ( hooks &&\n\t\t\t\t\t\"get\" in hooks &&\n\t\t\t\t\t( ret = hooks.get( elem, \"value\" ) ) !== undefined\n\t\t\t\t) {\n\t\t\t\t\treturn ret;\n\t\t\t\t}\n\n\t\t\t\tret = elem.value;\n\n\t\t\t\t// Handle most common string cases\n\t\t\t\tif ( typeof ret === \"string\" ) {\n\t\t\t\t\treturn ret.replace( rreturn, \"\" );\n\t\t\t\t}\n\n\t\t\t\t// Handle cases where value is null/undef or number\n\t\t\t\treturn ret == null ? \"\" : ret;\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tvalueIsFunction = isFunction( value );\n\n\t\treturn this.each( function( i ) {\n\t\t\tvar val;\n\n\t\t\tif ( this.nodeType !== 1 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( valueIsFunction ) {\n\t\t\t\tval = value.call( this, i, jQuery( this ).val() );\n\t\t\t} else {\n\t\t\t\tval = value;\n\t\t\t}\n\n\t\t\t// Treat null/undefined as \"\"; convert numbers to string\n\t\t\tif ( val == null ) {\n\t\t\t\tval = \"\";\n\n\t\t\t} else if ( typeof val === \"number\" ) {\n\t\t\t\tval += \"\";\n\n\t\t\t} else if ( Array.isArray( val ) ) {\n\t\t\t\tval = jQuery.map( val, function( value ) {\n\t\t\t\t\treturn value == null ? \"\" : value + \"\";\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\thooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];\n\n\t\t\t// If set returns undefined, fall back to normal setting\n\t\t\tif ( !hooks || !( \"set\" in hooks ) || hooks.set( this, val, \"value\" ) === undefined ) {\n\t\t\t\tthis.value = val;\n\t\t\t}\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tvalHooks: {\n\t\toption: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\tvar val = jQuery.find.attr( elem, \"value\" );\n\t\t\t\treturn val != null ?\n\t\t\t\t\tval :\n\n\t\t\t\t\t// Support: IE <=10 - 11 only\n\t\t\t\t\t// option.text throws exceptions (trac-14686, trac-14858)\n\t\t\t\t\t// Strip and collapse whitespace\n\t\t\t\t\t// https://html.spec.whatwg.org/#strip-and-collapse-whitespace\n\t\t\t\t\tstripAndCollapse( jQuery.text( elem ) );\n\t\t\t}\n\t\t},\n\t\tselect: {\n\t\t\tget: function( elem ) {\n\t\t\t\tvar value, option, i,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tindex = elem.selectedIndex,\n\t\t\t\t\tone = elem.type === \"select-one\",\n\t\t\t\t\tvalues = one ? null : [],\n\t\t\t\t\tmax = one ? index + 1 : options.length;\n\n\t\t\t\tif ( index < 0 ) {\n\t\t\t\t\ti = max;\n\n\t\t\t\t} else {\n\t\t\t\t\ti = one ? index : 0;\n\t\t\t\t}\n\n\t\t\t\t// Loop through all the selected options\n\t\t\t\tfor ( ; i < max; i++ ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t// IE8-9 doesn't update selected after form reset (trac-2551)\n\t\t\t\t\tif ( ( option.selected || i === index ) &&\n\n\t\t\t\t\t\t\t// Don't return options that are disabled or in a disabled optgroup\n\t\t\t\t\t\t\t!option.disabled &&\n\t\t\t\t\t\t\t( !option.parentNode.disabled ||\n\t\t\t\t\t\t\t\t!nodeName( option.parentNode, \"optgroup\" ) ) ) {\n\n\t\t\t\t\t\t// Get the specific value for the option\n\t\t\t\t\t\tvalue = jQuery( option ).val();\n\n\t\t\t\t\t\t// We don't need an array for one selects\n\t\t\t\t\t\tif ( one ) {\n\t\t\t\t\t\t\treturn value;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Multi-Selects return an array\n\t\t\t\t\t\tvalues.push( value );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn values;\n\t\t\t},\n\n\t\t\tset: function( elem, value ) {\n\t\t\t\tvar optionSet, option,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tvalues = jQuery.makeArray( value ),\n\t\t\t\t\ti = options.length;\n\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t/* eslint-disable no-cond-assign */\n\n\t\t\t\t\tif ( option.selected =\n\t\t\t\t\t\tjQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1\n\t\t\t\t\t) {\n\t\t\t\t\t\toptionSet = true;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* eslint-enable no-cond-assign */\n\t\t\t\t}\n\n\t\t\t\t// Force browsers to behave consistently when non-matching value is set\n\t\t\t\tif ( !optionSet ) {\n\t\t\t\t\telem.selectedIndex = -1;\n\t\t\t\t}\n\t\t\t\treturn values;\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Radios and checkboxes getter/setter\njQuery.each( [ \"radio\", \"checkbox\" ], function() {\n\tjQuery.valHooks[ this ] = {\n\t\tset: function( elem, value ) {\n\t\t\tif ( Array.isArray( value ) ) {\n\t\t\t\treturn ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );\n\t\t\t}\n\t\t}\n\t};\n\tif ( !support.checkOn ) {\n\t\tjQuery.valHooks[ this ].get = function( elem ) {\n\t\t\treturn elem.getAttribute( \"value\" ) === null ? \"on\" : elem.value;\n\t\t};\n\t}\n} );\n\n\n\n\n// Return jQuery for attributes-only inclusion\nvar location = window.location;\n\nvar nonce = { guid: Date.now() };\n\nvar rquery = ( /\\?/ );\n\n\n\n// Cross-browser xml parsing\njQuery.parseXML = function( data ) {\n\tvar xml, parserErrorElem;\n\tif ( !data || typeof data !== \"string\" ) {\n\t\treturn null;\n\t}\n\n\t// Support: IE 9 - 11 only\n\t// IE throws on parseFromString with invalid input.\n\ttry {\n\t\txml = ( new window.DOMParser() ).parseFromString( data, \"text/xml\" );\n\t} catch ( e ) {}\n\n\tparserErrorElem = xml && xml.getElementsByTagName( \"parsererror\" )[ 0 ];\n\tif ( !xml || parserErrorElem ) {\n\t\tjQuery.error( \"Invalid XML: \" + (\n\t\t\tparserErrorElem ?\n\t\t\t\tjQuery.map( parserErrorElem.childNodes, function( el ) {\n\t\t\t\t\treturn el.textContent;\n\t\t\t\t} ).join( \"\\n\" ) :\n\t\t\t\tdata\n\t\t) );\n\t}\n\treturn xml;\n};\n\n\nvar rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,\n\tstopPropagationCallback = function( e ) {\n\t\te.stopPropagation();\n\t};\n\njQuery.extend( jQuery.event, {\n\n\ttrigger: function( event, data, elem, onlyHandlers ) {\n\n\t\tvar i, cur, tmp, bubbleType, ontype, handle, special, lastElement,\n\t\t\teventPath = [ elem || document ],\n\t\t\ttype = hasOwn.call( event, \"type\" ) ? event.type : event,\n\t\t\tnamespaces = hasOwn.call( event, \"namespace\" ) ? event.namespace.split( \".\" ) : [];\n\n\t\tcur = lastElement = tmp = elem = elem || document;\n\n\t\t// Don't do events on text and comment nodes\n\t\tif ( elem.nodeType === 3 || elem.nodeType === 8 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// focus/blur morphs to focusin/out; ensure we're not firing them right now\n\t\tif ( rfocusMorph.test( type + jQuery.event.triggered ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( type.indexOf( \".\" ) > -1 ) {\n\n\t\t\t// Namespaced trigger; create a regexp to match event type in handle()\n\t\t\tnamespaces = type.split( \".\" );\n\t\t\ttype = namespaces.shift();\n\t\t\tnamespaces.sort();\n\t\t}\n\t\tontype = type.indexOf( \":\" ) < 0 && \"on\" + type;\n\n\t\t// Caller can pass in a jQuery.Event object, Object, or just an event type string\n\t\tevent = event[ jQuery.expando ] ?\n\t\t\tevent :\n\t\t\tnew jQuery.Event( type, typeof event === \"object\" && event );\n\n\t\t// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)\n\t\tevent.isTrigger = onlyHandlers ? 2 : 3;\n\t\tevent.namespace = namespaces.join( \".\" );\n\t\tevent.rnamespace = event.namespace ?\n\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" ) :\n\t\t\tnull;\n\n\t\t// Clean up the event in case it is being reused\n\t\tevent.result = undefined;\n\t\tif ( !event.target ) {\n\t\t\tevent.target = elem;\n\t\t}\n\n\t\t// Clone any incoming data and prepend the event, creating the handler arg list\n\t\tdata = data == null ?\n\t\t\t[ event ] :\n\t\t\tjQuery.makeArray( data, [ event ] );\n\n\t\t// Allow special events to draw outside the lines\n\t\tspecial = jQuery.event.special[ type ] || {};\n\t\tif ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine event propagation path in advance, per W3C events spec (trac-9951)\n\t\t// Bubble up to document, then to window; watch for a global ownerDocument var (trac-9724)\n\t\tif ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) {\n\n\t\t\tbubbleType = special.delegateType || type;\n\t\t\tif ( !rfocusMorph.test( bubbleType + type ) ) {\n\t\t\t\tcur = cur.parentNode;\n\t\t\t}\n\t\t\tfor ( ; cur; cur = cur.parentNode ) {\n\t\t\t\teventPath.push( cur );\n\t\t\t\ttmp = cur;\n\t\t\t}\n\n\t\t\t// Only add window if we got to document (e.g., not plain obj or detached DOM)\n\t\t\tif ( tmp === ( elem.ownerDocument || document ) ) {\n\t\t\t\teventPath.push( tmp.defaultView || tmp.parentWindow || window );\n\t\t\t}\n\t\t}\n\n\t\t// Fire handlers on the event path\n\t\ti = 0;\n\t\twhile ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tlastElement = cur;\n\t\t\tevent.type = i > 1 ?\n\t\t\t\tbubbleType :\n\t\t\t\tspecial.bindType || type;\n\n\t\t\t// jQuery handler\n\t\t\thandle = ( dataPriv.get( cur, \"events\" ) || Object.create( null ) )[ event.type ] &&\n\t\t\t\tdataPriv.get( cur, \"handle\" );\n\t\t\tif ( handle ) {\n\t\t\t\thandle.apply( cur, data );\n\t\t\t}\n\n\t\t\t// Native handler\n\t\t\thandle = ontype && cur[ ontype ];\n\t\t\tif ( handle && handle.apply && acceptData( cur ) ) {\n\t\t\t\tevent.result = handle.apply( cur, data );\n\t\t\t\tif ( event.result === false ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tevent.type = type;\n\n\t\t// If nobody prevented the default action, do it now\n\t\tif ( !onlyHandlers && !event.isDefaultPrevented() ) {\n\n\t\t\tif ( ( !special._default ||\n\t\t\t\tspecial._default.apply( eventPath.pop(), data ) === false ) &&\n\t\t\t\tacceptData( elem ) ) {\n\n\t\t\t\t// Call a native DOM method on the target with the same name as the event.\n\t\t\t\t// Don't do default actions on window, that's where global variables be (trac-6170)\n\t\t\t\tif ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) {\n\n\t\t\t\t\t// Don't re-trigger an onFOO event when we call its FOO() method\n\t\t\t\t\ttmp = elem[ ontype ];\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = null;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prevent re-triggering of the same event, since we already bubbled it above\n\t\t\t\t\tjQuery.event.triggered = type;\n\n\t\t\t\t\tif ( event.isPropagationStopped() ) {\n\t\t\t\t\t\tlastElement.addEventListener( type, stopPropagationCallback );\n\t\t\t\t\t}\n\n\t\t\t\t\telem[ type ]();\n\n\t\t\t\t\tif ( event.isPropagationStopped() ) {\n\t\t\t\t\t\tlastElement.removeEventListener( type, stopPropagationCallback );\n\t\t\t\t\t}\n\n\t\t\t\t\tjQuery.event.triggered = undefined;\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = tmp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\t// Piggyback on a donor event to simulate a different one\n\t// Used only for `focus(in | out)` events\n\tsimulate: function( type, elem, event ) {\n\t\tvar e = jQuery.extend(\n\t\t\tnew jQuery.Event(),\n\t\t\tevent,\n\t\t\t{\n\t\t\t\ttype: type,\n\t\t\t\tisSimulated: true\n\t\t\t}\n\t\t);\n\n\t\tjQuery.event.trigger( e, null, elem );\n\t}\n\n} );\n\njQuery.fn.extend( {\n\n\ttrigger: function( type, data ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.trigger( type, data, this );\n\t\t} );\n\t},\n\ttriggerHandler: function( type, data ) {\n\t\tvar elem = this[ 0 ];\n\t\tif ( elem ) {\n\t\t\treturn jQuery.event.trigger( type, data, elem, true );\n\t\t}\n\t}\n} );\n\n\nvar\n\trbracket = /\\[\\]$/,\n\trCRLF = /\\r?\\n/g,\n\trsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,\n\trsubmittable = /^(?:input|select|textarea|keygen)/i;\n\nfunction buildParams( prefix, obj, traditional, add ) {\n\tvar name;\n\n\tif ( Array.isArray( obj ) ) {\n\n\t\t// Serialize array item.\n\t\tjQuery.each( obj, function( i, v ) {\n\t\t\tif ( traditional || rbracket.test( prefix ) ) {\n\n\t\t\t\t// Treat each array item as a scalar.\n\t\t\t\tadd( prefix, v );\n\n\t\t\t} else {\n\n\t\t\t\t// Item is non-scalar (array or object), encode its numeric index.\n\t\t\t\tbuildParams(\n\t\t\t\t\tprefix + \"[\" + ( typeof v === \"object\" && v != null ? i : \"\" ) + \"]\",\n\t\t\t\t\tv,\n\t\t\t\t\ttraditional,\n\t\t\t\t\tadd\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\n\t} else if ( !traditional && toType( obj ) === \"object\" ) {\n\n\t\t// Serialize object item.\n\t\tfor ( name in obj ) {\n\t\t\tbuildParams( prefix + \"[\" + name + \"]\", obj[ name ], traditional, add );\n\t\t}\n\n\t} else {\n\n\t\t// Serialize scalar item.\n\t\tadd( prefix, obj );\n\t}\n}\n\n// Serialize an array of form elements or a set of\n// key/values into a query string\njQuery.param = function( a, traditional ) {\n\tvar prefix,\n\t\ts = [],\n\t\tadd = function( key, valueOrFunction ) {\n\n\t\t\t// If value is a function, invoke it and use its return value\n\t\t\tvar value = isFunction( valueOrFunction ) ?\n\t\t\t\tvalueOrFunction() :\n\t\t\t\tvalueOrFunction;\n\n\t\t\ts[ s.length ] = encodeURIComponent( key ) + \"=\" +\n\t\t\t\tencodeURIComponent( value == null ? \"\" : value );\n\t\t};\n\n\tif ( a == null ) {\n\t\treturn \"\";\n\t}\n\n\t// If an array was passed in, assume that it is an array of form elements.\n\tif ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {\n\n\t\t// Serialize the form elements\n\t\tjQuery.each( a, function() {\n\t\t\tadd( this.name, this.value );\n\t\t} );\n\n\t} else {\n\n\t\t// If traditional, encode the \"old\" way (the way 1.3.2 or older\n\t\t// did it), otherwise encode params recursively.\n\t\tfor ( prefix in a ) {\n\t\t\tbuildParams( prefix, a[ prefix ], traditional, add );\n\t\t}\n\t}\n\n\t// Return the resulting serialization\n\treturn s.join( \"&\" );\n};\n\njQuery.fn.extend( {\n\tserialize: function() {\n\t\treturn jQuery.param( this.serializeArray() );\n\t},\n\tserializeArray: function() {\n\t\treturn this.map( function() {\n\n\t\t\t// Can add propHook for \"elements\" to filter or add form elements\n\t\t\tvar elements = jQuery.prop( this, \"elements\" );\n\t\t\treturn elements ? jQuery.makeArray( elements ) : this;\n\t\t} ).filter( function() {\n\t\t\tvar type = this.type;\n\n\t\t\t// Use .is( \":disabled\" ) so that fieldset[disabled] works\n\t\t\treturn this.name && !jQuery( this ).is( \":disabled\" ) &&\n\t\t\t\trsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&\n\t\t\t\t( this.checked || !rcheckableType.test( type ) );\n\t\t} ).map( function( _i, elem ) {\n\t\t\tvar val = jQuery( this ).val();\n\n\t\t\tif ( val == null ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif ( Array.isArray( val ) ) {\n\t\t\t\treturn jQuery.map( val, function( val ) {\n\t\t\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t} ).get();\n\t}\n} );\n\n\nvar\n\tr20 = /%20/g,\n\trhash = /#.*$/,\n\trantiCache = /([?&])_=[^&]*/,\n\trheaders = /^(.*?):[ \\t]*([^\\r\\n]*)$/mg,\n\n\t// trac-7653, trac-8125, trac-8152: local protocol detection\n\trlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,\n\trnoContent = /^(?:GET|HEAD)$/,\n\trprotocol = /^\\/\\//,\n\n\t/* Prefilters\n\t * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)\n\t * 2) These are called:\n\t *    - BEFORE asking for a transport\n\t *    - AFTER param serialization (s.data is a string if s.processData is true)\n\t * 3) key is the dataType\n\t * 4) the catchall symbol \"*\" can be used\n\t * 5) execution will start with transport dataType and THEN continue down to \"*\" if needed\n\t */\n\tprefilters = {},\n\n\t/* Transports bindings\n\t * 1) key is the dataType\n\t * 2) the catchall symbol \"*\" can be used\n\t * 3) selection will start with transport dataType and THEN go to \"*\" if needed\n\t */\n\ttransports = {},\n\n\t// Avoid comment-prolog char sequence (trac-10098); must appease lint and evade compression\n\tallTypes = \"*/\".concat( \"*\" ),\n\n\t// Anchor tag for parsing the document origin\n\toriginAnchor = document.createElement( \"a\" );\n\noriginAnchor.href = location.href;\n\n// Base \"constructor\" for jQuery.ajaxPrefilter and jQuery.ajaxTransport\nfunction addToPrefiltersOrTransports( structure ) {\n\n\t// dataTypeExpression is optional and defaults to \"*\"\n\treturn function( dataTypeExpression, func ) {\n\n\t\tif ( typeof dataTypeExpression !== \"string\" ) {\n\t\t\tfunc = dataTypeExpression;\n\t\t\tdataTypeExpression = \"*\";\n\t\t}\n\n\t\tvar dataType,\n\t\t\ti = 0,\n\t\t\tdataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || [];\n\n\t\tif ( isFunction( func ) ) {\n\n\t\t\t// For each dataType in the dataTypeExpression\n\t\t\twhile ( ( dataType = dataTypes[ i++ ] ) ) {\n\n\t\t\t\t// Prepend if requested\n\t\t\t\tif ( dataType[ 0 ] === \"+\" ) {\n\t\t\t\t\tdataType = dataType.slice( 1 ) || \"*\";\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );\n\n\t\t\t\t// Otherwise append\n\t\t\t\t} else {\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).push( func );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\n// Base inspection function for prefilters and transports\nfunction inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t} );\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}\n\n// A special extend for ajax options\n// that takes \"flat\" options (not to be deep extended)\n// Fixes trac-9887\nfunction ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}\n\n/* Handles responses to an ajax request:\n * - finds the right dataType (mediates between content-type and expected dataType)\n * - returns the corresponding response\n */\nfunction ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar ct, type, finalDataType, firstDataType,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}\n\n/* Chain conversions given the request and the original response\n * Also sets the responseXXX fields on the jqXHR instance\n */\nfunction ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s.throws ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\tstate: \"parsererror\",\n\t\t\t\t\t\t\t\terror: conv ? e : \"No conversion from \" + prev + \" to \" + current\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}\n\njQuery.extend( {\n\n\t// Counter for holding the number of active queries\n\tactive: 0,\n\n\t// Last-Modified header cache for next request\n\tlastModified: {},\n\tetag: {},\n\n\tajaxSettings: {\n\t\turl: location.href,\n\t\ttype: \"GET\",\n\t\tisLocal: rlocalProtocol.test( location.protocol ),\n\t\tglobal: true,\n\t\tprocessData: true,\n\t\tasync: true,\n\t\tcontentType: \"application/x-www-form-urlencoded; charset=UTF-8\",\n\n\t\t/*\n\t\ttimeout: 0,\n\t\tdata: null,\n\t\tdataType: null,\n\t\tusername: null,\n\t\tpassword: null,\n\t\tcache: null,\n\t\tthrows: false,\n\t\ttraditional: false,\n\t\theaders: {},\n\t\t*/\n\n\t\taccepts: {\n\t\t\t\"*\": allTypes,\n\t\t\ttext: \"text/plain\",\n\t\t\thtml: \"text/html\",\n\t\t\txml: \"application/xml, text/xml\",\n\t\t\tjson: \"application/json, text/javascript\"\n\t\t},\n\n\t\tcontents: {\n\t\t\txml: /\\bxml\\b/,\n\t\t\thtml: /\\bhtml/,\n\t\t\tjson: /\\bjson\\b/\n\t\t},\n\n\t\tresponseFields: {\n\t\t\txml: \"responseXML\",\n\t\t\ttext: \"responseText\",\n\t\t\tjson: \"responseJSON\"\n\t\t},\n\n\t\t// Data converters\n\t\t// Keys separate source (or catchall \"*\") and destination types with a single space\n\t\tconverters: {\n\n\t\t\t// Convert anything to text\n\t\t\t\"* text\": String,\n\n\t\t\t// Text to html (true = no transformation)\n\t\t\t\"text html\": true,\n\n\t\t\t// Evaluate text as a json expression\n\t\t\t\"text json\": JSON.parse,\n\n\t\t\t// Parse text as xml\n\t\t\t\"text xml\": jQuery.parseXML\n\t\t},\n\n\t\t// For options that shouldn't be deep extended:\n\t\t// you can add your own custom options here if\n\t\t// and when you create one that shouldn't be\n\t\t// deep extended (see ajaxExtend)\n\t\tflatOptions: {\n\t\t\turl: true,\n\t\t\tcontext: true\n\t\t}\n\t},\n\n\t// Creates a full fledged settings object into target\n\t// with both ajaxSettings and settings fields.\n\t// If target is omitted, writes into ajaxSettings.\n\tajaxSetup: function( target, settings ) {\n\t\treturn settings ?\n\n\t\t\t// Building a settings object\n\t\t\tajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :\n\n\t\t\t// Extending ajaxSettings\n\t\t\tajaxExtend( jQuery.ajaxSettings, target );\n\t},\n\n\tajaxPrefilter: addToPrefiltersOrTransports( prefilters ),\n\tajaxTransport: addToPrefiltersOrTransports( transports ),\n\n\t// Main method\n\tajax: function( url, options ) {\n\n\t\t// If url is an object, simulate pre-1.5 signature\n\t\tif ( typeof url === \"object\" ) {\n\t\t\toptions = url;\n\t\t\turl = undefined;\n\t\t}\n\n\t\t// Force options to be an object\n\t\toptions = options || {};\n\n\t\tvar transport,\n\n\t\t\t// URL without anti-cache param\n\t\t\tcacheURL,\n\n\t\t\t// Response headers\n\t\t\tresponseHeadersString,\n\t\t\tresponseHeaders,\n\n\t\t\t// timeout handle\n\t\t\ttimeoutTimer,\n\n\t\t\t// Url cleanup var\n\t\t\turlAnchor,\n\n\t\t\t// Request state (becomes false upon send and true upon completion)\n\t\t\tcompleted,\n\n\t\t\t// To know if global events are to be dispatched\n\t\t\tfireGlobals,\n\n\t\t\t// Loop variable\n\t\t\ti,\n\n\t\t\t// uncached part of the url\n\t\t\tuncached,\n\n\t\t\t// Create the final options object\n\t\t\ts = jQuery.ajaxSetup( {}, options ),\n\n\t\t\t// Callbacks context\n\t\t\tcallbackContext = s.context || s,\n\n\t\t\t// Context for global events is callbackContext if it is a DOM node or jQuery collection\n\t\t\tglobalEventContext = s.context &&\n\t\t\t\t( callbackContext.nodeType || callbackContext.jquery ) ?\n\t\t\t\tjQuery( callbackContext ) :\n\t\t\t\tjQuery.event,\n\n\t\t\t// Deferreds\n\t\t\tdeferred = jQuery.Deferred(),\n\t\t\tcompleteDeferred = jQuery.Callbacks( \"once memory\" ),\n\n\t\t\t// Status-dependent callbacks\n\t\t\tstatusCode = s.statusCode || {},\n\n\t\t\t// Headers (they are sent all at once)\n\t\t\trequestHeaders = {},\n\t\t\trequestHeadersNames = {},\n\n\t\t\t// Default abort message\n\t\t\tstrAbort = \"canceled\",\n\n\t\t\t// Fake xhr\n\t\t\tjqXHR = {\n\t\t\t\treadyState: 0,\n\n\t\t\t\t// Builds headers hashtable if needed\n\t\t\t\tgetResponseHeader: function( key ) {\n\t\t\t\t\tvar match;\n\t\t\t\t\tif ( completed ) {\n\t\t\t\t\t\tif ( !responseHeaders ) {\n\t\t\t\t\t\t\tresponseHeaders = {};\n\t\t\t\t\t\t\twhile ( ( match = rheaders.exec( responseHeadersString ) ) ) {\n\t\t\t\t\t\t\t\tresponseHeaders[ match[ 1 ].toLowerCase() + \" \" ] =\n\t\t\t\t\t\t\t\t\t( responseHeaders[ match[ 1 ].toLowerCase() + \" \" ] || [] )\n\t\t\t\t\t\t\t\t\t\t.concat( match[ 2 ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmatch = responseHeaders[ key.toLowerCase() + \" \" ];\n\t\t\t\t\t}\n\t\t\t\t\treturn match == null ? null : match.join( \", \" );\n\t\t\t\t},\n\n\t\t\t\t// Raw string\n\t\t\t\tgetAllResponseHeaders: function() {\n\t\t\t\t\treturn completed ? responseHeadersString : null;\n\t\t\t\t},\n\n\t\t\t\t// Caches the header\n\t\t\t\tsetRequestHeader: function( name, value ) {\n\t\t\t\t\tif ( completed == null ) {\n\t\t\t\t\t\tname = requestHeadersNames[ name.toLowerCase() ] =\n\t\t\t\t\t\t\trequestHeadersNames[ name.toLowerCase() ] || name;\n\t\t\t\t\t\trequestHeaders[ name ] = value;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Overrides response content-type header\n\t\t\t\toverrideMimeType: function( type ) {\n\t\t\t\t\tif ( completed == null ) {\n\t\t\t\t\t\ts.mimeType = type;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Status-dependent callbacks\n\t\t\t\tstatusCode: function( map ) {\n\t\t\t\t\tvar code;\n\t\t\t\t\tif ( map ) {\n\t\t\t\t\t\tif ( completed ) {\n\n\t\t\t\t\t\t\t// Execute the appropriate callbacks\n\t\t\t\t\t\t\tjqXHR.always( map[ jqXHR.status ] );\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Lazy-add the new callbacks in a way that preserves old ones\n\t\t\t\t\t\t\tfor ( code in map ) {\n\t\t\t\t\t\t\t\tstatusCode[ code ] = [ statusCode[ code ], map[ code ] ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Cancel the request\n\t\t\t\tabort: function( statusText ) {\n\t\t\t\t\tvar finalText = statusText || strAbort;\n\t\t\t\t\tif ( transport ) {\n\t\t\t\t\t\ttransport.abort( finalText );\n\t\t\t\t\t}\n\t\t\t\t\tdone( 0, finalText );\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t};\n\n\t\t// Attach deferreds\n\t\tdeferred.promise( jqXHR );\n\n\t\t// Add protocol if not provided (prefilters might expect it)\n\t\t// Handle falsy url in the settings object (trac-10093: consistency with old signature)\n\t\t// We also use the url parameter if available\n\t\ts.url = ( ( url || s.url || location.href ) + \"\" )\n\t\t\t.replace( rprotocol, location.protocol + \"//\" );\n\n\t\t// Alias method option to type as per ticket trac-12004\n\t\ts.type = options.method || options.type || s.method || s.type;\n\n\t\t// Extract dataTypes list\n\t\ts.dataTypes = ( s.dataType || \"*\" ).toLowerCase().match( rnothtmlwhite ) || [ \"\" ];\n\n\t\t// A cross-domain request is in order when the origin doesn't match the current origin.\n\t\tif ( s.crossDomain == null ) {\n\t\t\turlAnchor = document.createElement( \"a\" );\n\n\t\t\t// Support: IE <=8 - 11, Edge 12 - 15\n\t\t\t// IE throws exception on accessing the href property if url is malformed,\n\t\t\t// e.g. http://example.com:80x/\n\t\t\ttry {\n\t\t\t\turlAnchor.href = s.url;\n\n\t\t\t\t// Support: IE <=8 - 11 only\n\t\t\t\t// Anchor's host property isn't correctly set when s.url is relative\n\t\t\t\turlAnchor.href = urlAnchor.href;\n\t\t\t\ts.crossDomain = originAnchor.protocol + \"//\" + originAnchor.host !==\n\t\t\t\t\turlAnchor.protocol + \"//\" + urlAnchor.host;\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// If there is an error parsing the URL, assume it is crossDomain,\n\t\t\t\t// it can be rejected by the transport if it is invalid\n\t\t\t\ts.crossDomain = true;\n\t\t\t}\n\t\t}\n\n\t\t// Convert data if not already a string\n\t\tif ( s.data && s.processData && typeof s.data !== \"string\" ) {\n\t\t\ts.data = jQuery.param( s.data, s.traditional );\n\t\t}\n\n\t\t// Apply prefilters\n\t\tinspectPrefiltersOrTransports( prefilters, s, options, jqXHR );\n\n\t\t// If request was aborted inside a prefilter, stop there\n\t\tif ( completed ) {\n\t\t\treturn jqXHR;\n\t\t}\n\n\t\t// We can fire global events as of now if asked to\n\t\t// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (trac-15118)\n\t\tfireGlobals = jQuery.event && s.global;\n\n\t\t// Watch for a new set of requests\n\t\tif ( fireGlobals && jQuery.active++ === 0 ) {\n\t\t\tjQuery.event.trigger( \"ajaxStart\" );\n\t\t}\n\n\t\t// Uppercase the type\n\t\ts.type = s.type.toUpperCase();\n\n\t\t// Determine if request has content\n\t\ts.hasContent = !rnoContent.test( s.type );\n\n\t\t// Save the URL in case we're toying with the If-Modified-Since\n\t\t// and/or If-None-Match header later on\n\t\t// Remove hash to simplify url manipulation\n\t\tcacheURL = s.url.replace( rhash, \"\" );\n\n\t\t// More options handling for requests with no content\n\t\tif ( !s.hasContent ) {\n\n\t\t\t// Remember the hash so we can put it back\n\t\t\tuncached = s.url.slice( cacheURL.length );\n\n\t\t\t// If data is available and should be processed, append data to url\n\t\t\tif ( s.data && ( s.processData || typeof s.data === \"string\" ) ) {\n\t\t\t\tcacheURL += ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + s.data;\n\n\t\t\t\t// trac-9682: remove data so that it's not used in an eventual retry\n\t\t\t\tdelete s.data;\n\t\t\t}\n\n\t\t\t// Add or update anti-cache param if needed\n\t\t\tif ( s.cache === false ) {\n\t\t\t\tcacheURL = cacheURL.replace( rantiCache, \"$1\" );\n\t\t\t\tuncached = ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + \"_=\" + ( nonce.guid++ ) +\n\t\t\t\t\tuncached;\n\t\t\t}\n\n\t\t\t// Put hash and anti-cache on the URL that will be requested (gh-1732)\n\t\t\ts.url = cacheURL + uncached;\n\n\t\t// Change '%20' to '+' if this is encoded form body content (gh-2658)\n\t\t} else if ( s.data && s.processData &&\n\t\t\t( s.contentType || \"\" ).indexOf( \"application/x-www-form-urlencoded\" ) === 0 ) {\n\t\t\ts.data = s.data.replace( r20, \"+\" );\n\t\t}\n\n\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\tif ( s.ifModified ) {\n\t\t\tif ( jQuery.lastModified[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-Modified-Since\", jQuery.lastModified[ cacheURL ] );\n\t\t\t}\n\t\t\tif ( jQuery.etag[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-None-Match\", jQuery.etag[ cacheURL ] );\n\t\t\t}\n\t\t}\n\n\t\t// Set the correct header, if data is being sent\n\t\tif ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {\n\t\t\tjqXHR.setRequestHeader( \"Content-Type\", s.contentType );\n\t\t}\n\n\t\t// Set the Accepts header for the server, depending on the dataType\n\t\tjqXHR.setRequestHeader(\n\t\t\t\"Accept\",\n\t\t\ts.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?\n\t\t\t\ts.accepts[ s.dataTypes[ 0 ] ] +\n\t\t\t\t\t( s.dataTypes[ 0 ] !== \"*\" ? \", \" + allTypes + \"; q=0.01\" : \"\" ) :\n\t\t\t\ts.accepts[ \"*\" ]\n\t\t);\n\n\t\t// Check for headers option\n\t\tfor ( i in s.headers ) {\n\t\t\tjqXHR.setRequestHeader( i, s.headers[ i ] );\n\t\t}\n\n\t\t// Allow custom headers/mimetypes and early abort\n\t\tif ( s.beforeSend &&\n\t\t\t( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) {\n\n\t\t\t// Abort if not done already and return\n\t\t\treturn jqXHR.abort();\n\t\t}\n\n\t\t// Aborting is no longer a cancellation\n\t\tstrAbort = \"abort\";\n\n\t\t// Install callbacks on deferreds\n\t\tcompleteDeferred.add( s.complete );\n\t\tjqXHR.done( s.success );\n\t\tjqXHR.fail( s.error );\n\n\t\t// Get transport\n\t\ttransport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );\n\n\t\t// If no transport, we auto-abort\n\t\tif ( !transport ) {\n\t\t\tdone( -1, \"No Transport\" );\n\t\t} else {\n\t\t\tjqXHR.readyState = 1;\n\n\t\t\t// Send global event\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxSend\", [ jqXHR, s ] );\n\t\t\t}\n\n\t\t\t// If request was aborted inside ajaxSend, stop there\n\t\t\tif ( completed ) {\n\t\t\t\treturn jqXHR;\n\t\t\t}\n\n\t\t\t// Timeout\n\t\t\tif ( s.async && s.timeout > 0 ) {\n\t\t\t\ttimeoutTimer = window.setTimeout( function() {\n\t\t\t\t\tjqXHR.abort( \"timeout\" );\n\t\t\t\t}, s.timeout );\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tcompleted = false;\n\t\t\t\ttransport.send( requestHeaders, done );\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// Rethrow post-completion exceptions\n\t\t\t\tif ( completed ) {\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\n\t\t\t\t// Propagate others as results\n\t\t\t\tdone( -1, e );\n\t\t\t}\n\t\t}\n\n\t\t// Callback for when everything is done\n\t\tfunction done( status, nativeStatusText, responses, headers ) {\n\t\t\tvar isSuccess, success, error, response, modified,\n\t\t\t\tstatusText = nativeStatusText;\n\n\t\t\t// Ignore repeat invocations\n\t\t\tif ( completed ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tcompleted = true;\n\n\t\t\t// Clear timeout if it exists\n\t\t\tif ( timeoutTimer ) {\n\t\t\t\twindow.clearTimeout( timeoutTimer );\n\t\t\t}\n\n\t\t\t// Dereference transport for early garbage collection\n\t\t\t// (no matter how long the jqXHR object will be used)\n\t\t\ttransport = undefined;\n\n\t\t\t// Cache response headers\n\t\t\tresponseHeadersString = headers || \"\";\n\n\t\t\t// Set readyState\n\t\t\tjqXHR.readyState = status > 0 ? 4 : 0;\n\n\t\t\t// Determine if successful\n\t\t\tisSuccess = status >= 200 && status < 300 || status === 304;\n\n\t\t\t// Get response data\n\t\t\tif ( responses ) {\n\t\t\t\tresponse = ajaxHandleResponses( s, jqXHR, responses );\n\t\t\t}\n\n\t\t\t// Use a noop converter for missing script but not if jsonp\n\t\t\tif ( !isSuccess &&\n\t\t\t\tjQuery.inArray( \"script\", s.dataTypes ) > -1 &&\n\t\t\t\tjQuery.inArray( \"json\", s.dataTypes ) < 0 ) {\n\t\t\t\ts.converters[ \"text script\" ] = function() {};\n\t\t\t}\n\n\t\t\t// Convert no matter what (that way responseXXX fields are always set)\n\t\t\tresponse = ajaxConvert( s, response, jqXHR, isSuccess );\n\n\t\t\t// If successful, handle type chaining\n\t\t\tif ( isSuccess ) {\n\n\t\t\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\t\t\tif ( s.ifModified ) {\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"Last-Modified\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.lastModified[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"etag\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.etag[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// if no content\n\t\t\t\tif ( status === 204 || s.type === \"HEAD\" ) {\n\t\t\t\t\tstatusText = \"nocontent\";\n\n\t\t\t\t// if not modified\n\t\t\t\t} else if ( status === 304 ) {\n\t\t\t\t\tstatusText = \"notmodified\";\n\n\t\t\t\t// If we have data, let's convert it\n\t\t\t\t} else {\n\t\t\t\t\tstatusText = response.state;\n\t\t\t\t\tsuccess = response.data;\n\t\t\t\t\terror = response.error;\n\t\t\t\t\tisSuccess = !error;\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// Extract error from statusText and normalize for non-aborts\n\t\t\t\terror = statusText;\n\t\t\t\tif ( status || !statusText ) {\n\t\t\t\t\tstatusText = \"error\";\n\t\t\t\t\tif ( status < 0 ) {\n\t\t\t\t\t\tstatus = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set data for the fake xhr object\n\t\t\tjqXHR.status = status;\n\t\t\tjqXHR.statusText = ( nativeStatusText || statusText ) + \"\";\n\n\t\t\t// Success/Error\n\t\t\tif ( isSuccess ) {\n\t\t\t\tdeferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );\n\t\t\t} else {\n\t\t\t\tdeferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );\n\t\t\t}\n\n\t\t\t// Status-dependent callbacks\n\t\t\tjqXHR.statusCode( statusCode );\n\t\t\tstatusCode = undefined;\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( isSuccess ? \"ajaxSuccess\" : \"ajaxError\",\n\t\t\t\t\t[ jqXHR, s, isSuccess ? success : error ] );\n\t\t\t}\n\n\t\t\t// Complete\n\t\t\tcompleteDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxComplete\", [ jqXHR, s ] );\n\n\t\t\t\t// Handle the global AJAX counter\n\t\t\t\tif ( !( --jQuery.active ) ) {\n\t\t\t\t\tjQuery.event.trigger( \"ajaxStop\" );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn jqXHR;\n\t},\n\n\tgetJSON: function( url, data, callback ) {\n\t\treturn jQuery.get( url, data, callback, \"json\" );\n\t},\n\n\tgetScript: function( url, callback ) {\n\t\treturn jQuery.get( url, undefined, callback, \"script\" );\n\t}\n} );\n\njQuery.each( [ \"get\", \"post\" ], function( _i, method ) {\n\tjQuery[ method ] = function( url, data, callback, type ) {\n\n\t\t// Shift arguments if data argument was omitted\n\t\tif ( isFunction( data ) ) {\n\t\t\ttype = type || callback;\n\t\t\tcallback = data;\n\t\t\tdata = undefined;\n\t\t}\n\n\t\t// The url can be an options object (which then must have .url)\n\t\treturn jQuery.ajax( jQuery.extend( {\n\t\t\turl: url,\n\t\t\ttype: method,\n\t\t\tdataType: type,\n\t\t\tdata: data,\n\t\t\tsuccess: callback\n\t\t}, jQuery.isPlainObject( url ) && url ) );\n\t};\n} );\n\njQuery.ajaxPrefilter( function( s ) {\n\tvar i;\n\tfor ( i in s.headers ) {\n\t\tif ( i.toLowerCase() === \"content-type\" ) {\n\t\t\ts.contentType = s.headers[ i ] || \"\";\n\t\t}\n\t}\n} );\n\n\njQuery._evalUrl = function( url, options, doc ) {\n\treturn jQuery.ajax( {\n\t\turl: url,\n\n\t\t// Make this explicit, since user can override this through ajaxSetup (trac-11264)\n\t\ttype: \"GET\",\n\t\tdataType: \"script\",\n\t\tcache: true,\n\t\tasync: false,\n\t\tglobal: false,\n\n\t\t// Only evaluate the response if it is successful (gh-4126)\n\t\t// dataFilter is not invoked for failure responses, so using it instead\n\t\t// of the default converter is kludgy but it works.\n\t\tconverters: {\n\t\t\t\"text script\": function() {}\n\t\t},\n\t\tdataFilter: function( response ) {\n\t\t\tjQuery.globalEval( response, options, doc );\n\t\t}\n\t} );\n};\n\n\njQuery.fn.extend( {\n\twrapAll: function( html ) {\n\t\tvar wrap;\n\n\t\tif ( this[ 0 ] ) {\n\t\t\tif ( isFunction( html ) ) {\n\t\t\t\thtml = html.call( this[ 0 ] );\n\t\t\t}\n\n\t\t\t// The elements to wrap the target around\n\t\t\twrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );\n\n\t\t\tif ( this[ 0 ].parentNode ) {\n\t\t\t\twrap.insertBefore( this[ 0 ] );\n\t\t\t}\n\n\t\t\twrap.map( function() {\n\t\t\t\tvar elem = this;\n\n\t\t\t\twhile ( elem.firstElementChild ) {\n\t\t\t\t\telem = elem.firstElementChild;\n\t\t\t\t}\n\n\t\t\t\treturn elem;\n\t\t\t} ).append( this );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\twrapInner: function( html ) {\n\t\tif ( isFunction( html ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).wrapInner( html.call( this, i ) );\n\t\t\t} );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar self = jQuery( this ),\n\t\t\t\tcontents = self.contents();\n\n\t\t\tif ( contents.length ) {\n\t\t\t\tcontents.wrapAll( html );\n\n\t\t\t} else {\n\t\t\t\tself.append( html );\n\t\t\t}\n\t\t} );\n\t},\n\n\twrap: function( html ) {\n\t\tvar htmlIsFunction = isFunction( html );\n\n\t\treturn this.each( function( i ) {\n\t\t\tjQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html );\n\t\t} );\n\t},\n\n\tunwrap: function( selector ) {\n\t\tthis.parent( selector ).not( \"body\" ).each( function() {\n\t\t\tjQuery( this ).replaceWith( this.childNodes );\n\t\t} );\n\t\treturn this;\n\t}\n} );\n\n\njQuery.expr.pseudos.hidden = function( elem ) {\n\treturn !jQuery.expr.pseudos.visible( elem );\n};\njQuery.expr.pseudos.visible = function( elem ) {\n\treturn !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );\n};\n\n\n\n\njQuery.ajaxSettings.xhr = function() {\n\ttry {\n\t\treturn new window.XMLHttpRequest();\n\t} catch ( e ) {}\n};\n\nvar xhrSuccessStatus = {\n\n\t\t// File protocol always yields status code 0, assume 200\n\t\t0: 200,\n\n\t\t// Support: IE <=9 only\n\t\t// trac-1450: sometimes IE returns 1223 when it should be 204\n\t\t1223: 204\n\t},\n\txhrSupported = jQuery.ajaxSettings.xhr();\n\nsupport.cors = !!xhrSupported && ( \"withCredentials\" in xhrSupported );\nsupport.ajax = xhrSupported = !!xhrSupported;\n\njQuery.ajaxTransport( function( options ) {\n\tvar callback, errorCallback;\n\n\t// Cross domain only allowed if supported through XMLHttpRequest\n\tif ( support.cors || xhrSupported && !options.crossDomain ) {\n\t\treturn {\n\t\t\tsend: function( headers, complete ) {\n\t\t\t\tvar i,\n\t\t\t\t\txhr = options.xhr();\n\n\t\t\t\txhr.open(\n\t\t\t\t\toptions.type,\n\t\t\t\t\toptions.url,\n\t\t\t\t\toptions.async,\n\t\t\t\t\toptions.username,\n\t\t\t\t\toptions.password\n\t\t\t\t);\n\n\t\t\t\t// Apply custom fields if provided\n\t\t\t\tif ( options.xhrFields ) {\n\t\t\t\t\tfor ( i in options.xhrFields ) {\n\t\t\t\t\t\txhr[ i ] = options.xhrFields[ i ];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Override mime type if needed\n\t\t\t\tif ( options.mimeType && xhr.overrideMimeType ) {\n\t\t\t\t\txhr.overrideMimeType( options.mimeType );\n\t\t\t\t}\n\n\t\t\t\t// X-Requested-With header\n\t\t\t\t// For cross-domain requests, seeing as conditions for a preflight are\n\t\t\t\t// akin to a jigsaw puzzle, we simply never set it to be sure.\n\t\t\t\t// (it can always be set on a per-request basis or even using ajaxSetup)\n\t\t\t\t// For same-domain requests, won't change header if already provided.\n\t\t\t\tif ( !options.crossDomain && !headers[ \"X-Requested-With\" ] ) {\n\t\t\t\t\theaders[ \"X-Requested-With\" ] = \"XMLHttpRequest\";\n\t\t\t\t}\n\n\t\t\t\t// Set headers\n\t\t\t\tfor ( i in headers ) {\n\t\t\t\t\txhr.setRequestHeader( i, headers[ i ] );\n\t\t\t\t}\n\n\t\t\t\t// Callback\n\t\t\t\tcallback = function( type ) {\n\t\t\t\t\treturn function() {\n\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\tcallback = errorCallback = xhr.onload =\n\t\t\t\t\t\t\t\txhr.onerror = xhr.onabort = xhr.ontimeout =\n\t\t\t\t\t\t\t\t\txhr.onreadystatechange = null;\n\n\t\t\t\t\t\t\tif ( type === \"abort\" ) {\n\t\t\t\t\t\t\t\txhr.abort();\n\t\t\t\t\t\t\t} else if ( type === \"error\" ) {\n\n\t\t\t\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t\t\t\t// On a manual native abort, IE9 throws\n\t\t\t\t\t\t\t\t// errors on any property access that is not readyState\n\t\t\t\t\t\t\t\tif ( typeof xhr.status !== \"number\" ) {\n\t\t\t\t\t\t\t\t\tcomplete( 0, \"error\" );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tcomplete(\n\n\t\t\t\t\t\t\t\t\t\t// File: protocol always yields status 0; see trac-8605, trac-14207\n\t\t\t\t\t\t\t\t\t\txhr.status,\n\t\t\t\t\t\t\t\t\t\txhr.statusText\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tcomplete(\n\t\t\t\t\t\t\t\t\txhrSuccessStatus[ xhr.status ] || xhr.status,\n\t\t\t\t\t\t\t\t\txhr.statusText,\n\n\t\t\t\t\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t\t\t\t\t// IE9 has no XHR2 but throws on binary (trac-11426)\n\t\t\t\t\t\t\t\t\t// For XHR2 non-text, let the caller handle it (gh-2498)\n\t\t\t\t\t\t\t\t\t( xhr.responseType || \"text\" ) !== \"text\"  ||\n\t\t\t\t\t\t\t\t\ttypeof xhr.responseText !== \"string\" ?\n\t\t\t\t\t\t\t\t\t\t{ binary: xhr.response } :\n\t\t\t\t\t\t\t\t\t\t{ text: xhr.responseText },\n\t\t\t\t\t\t\t\t\txhr.getAllResponseHeaders()\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t};\n\n\t\t\t\t// Listen to events\n\t\t\t\txhr.onload = callback();\n\t\t\t\terrorCallback = xhr.onerror = xhr.ontimeout = callback( \"error\" );\n\n\t\t\t\t// Support: IE 9 only\n\t\t\t\t// Use onreadystatechange to replace onabort\n\t\t\t\t// to handle uncaught aborts\n\t\t\t\tif ( xhr.onabort !== undefined ) {\n\t\t\t\t\txhr.onabort = errorCallback;\n\t\t\t\t} else {\n\t\t\t\t\txhr.onreadystatechange = function() {\n\n\t\t\t\t\t\t// Check readyState before timeout as it changes\n\t\t\t\t\t\tif ( xhr.readyState === 4 ) {\n\n\t\t\t\t\t\t\t// Allow onerror to be called first,\n\t\t\t\t\t\t\t// but that will not handle a native abort\n\t\t\t\t\t\t\t// Also, save errorCallback to a variable\n\t\t\t\t\t\t\t// as xhr.onerror cannot be accessed\n\t\t\t\t\t\t\twindow.setTimeout( function() {\n\t\t\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\t\t\terrorCallback();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\t// Create the abort callback\n\t\t\t\tcallback = callback( \"abort\" );\n\n\t\t\t\ttry {\n\n\t\t\t\t\t// Do send the request (this may raise an exception)\n\t\t\t\t\txhr.send( options.hasContent && options.data || null );\n\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t// trac-14683: Only rethrow if this hasn't been notified as an error yet\n\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\tthrow e;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tabort: function() {\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n} );\n\n\n\n\n// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)\njQuery.ajaxPrefilter( function( s ) {\n\tif ( s.crossDomain ) {\n\t\ts.contents.script = false;\n\t}\n} );\n\n// Install script dataType\njQuery.ajaxSetup( {\n\taccepts: {\n\t\tscript: \"text/javascript, application/javascript, \" +\n\t\t\t\"application/ecmascript, application/x-ecmascript\"\n\t},\n\tcontents: {\n\t\tscript: /\\b(?:java|ecma)script\\b/\n\t},\n\tconverters: {\n\t\t\"text script\": function( text ) {\n\t\t\tjQuery.globalEval( text );\n\t\t\treturn text;\n\t\t}\n\t}\n} );\n\n// Handle cache's special case and crossDomain\njQuery.ajaxPrefilter( \"script\", function( s ) {\n\tif ( s.cache === undefined ) {\n\t\ts.cache = false;\n\t}\n\tif ( s.crossDomain ) {\n\t\ts.type = \"GET\";\n\t}\n} );\n\n// Bind script tag hack transport\njQuery.ajaxTransport( \"script\", function( s ) {\n\n\t// This transport only deals with cross domain or forced-by-attrs requests\n\tif ( s.crossDomain || s.scriptAttrs ) {\n\t\tvar script, callback;\n\t\treturn {\n\t\t\tsend: function( _, complete ) {\n\t\t\t\tscript = jQuery( \"<script>\" )\n\t\t\t\t\t.attr( s.scriptAttrs || {} )\n\t\t\t\t\t.prop( { charset: s.scriptCharset, src: s.url } )\n\t\t\t\t\t.on( \"load error\", callback = function( evt ) {\n\t\t\t\t\t\tscript.remove();\n\t\t\t\t\t\tcallback = null;\n\t\t\t\t\t\tif ( evt ) {\n\t\t\t\t\t\t\tcomplete( evt.type === \"error\" ? 404 : 200, evt.type );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\n\t\t\t\t// Use native DOM manipulation to avoid our domManip AJAX trickery\n\t\t\t\tdocument.head.appendChild( script[ 0 ] );\n\t\t\t},\n\t\t\tabort: function() {\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n} );\n\n\n\n\nvar oldCallbacks = [],\n\trjsonp = /(=)\\?(?=&|$)|\\?\\?/;\n\n// Default jsonp settings\njQuery.ajaxSetup( {\n\tjsonp: \"callback\",\n\tjsonpCallback: function() {\n\t\tvar callback = oldCallbacks.pop() || ( jQuery.expando + \"_\" + ( nonce.guid++ ) );\n\t\tthis[ callback ] = true;\n\t\treturn callback;\n\t}\n} );\n\n// Detect, normalize options and install callbacks for jsonp requests\njQuery.ajaxPrefilter( \"json jsonp\", function( s, originalSettings, jqXHR ) {\n\n\tvar callbackName, overwritten, responseContainer,\n\t\tjsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?\n\t\t\t\"url\" :\n\t\t\ttypeof s.data === \"string\" &&\n\t\t\t\t( s.contentType || \"\" )\n\t\t\t\t\t.indexOf( \"application/x-www-form-urlencoded\" ) === 0 &&\n\t\t\t\trjsonp.test( s.data ) && \"data\"\n\t\t);\n\n\t// Handle iff the expected data type is \"jsonp\" or we have a parameter to set\n\tif ( jsonProp || s.dataTypes[ 0 ] === \"jsonp\" ) {\n\n\t\t// Get callback name, remembering preexisting value associated with it\n\t\tcallbackName = s.jsonpCallback = isFunction( s.jsonpCallback ) ?\n\t\t\ts.jsonpCallback() :\n\t\t\ts.jsonpCallback;\n\n\t\t// Insert callback into url or form data\n\t\tif ( jsonProp ) {\n\t\t\ts[ jsonProp ] = s[ jsonProp ].replace( rjsonp, \"$1\" + callbackName );\n\t\t} else if ( s.jsonp !== false ) {\n\t\t\ts.url += ( rquery.test( s.url ) ? \"&\" : \"?\" ) + s.jsonp + \"=\" + callbackName;\n\t\t}\n\n\t\t// Use data converter to retrieve json after script execution\n\t\ts.converters[ \"script json\" ] = function() {\n\t\t\tif ( !responseContainer ) {\n\t\t\t\tjQuery.error( callbackName + \" was not called\" );\n\t\t\t}\n\t\t\treturn responseContainer[ 0 ];\n\t\t};\n\n\t\t// Force json dataType\n\t\ts.dataTypes[ 0 ] = \"json\";\n\n\t\t// Install callback\n\t\toverwritten = window[ callbackName ];\n\t\twindow[ callbackName ] = function() {\n\t\t\tresponseContainer = arguments;\n\t\t};\n\n\t\t// Clean-up function (fires after converters)\n\t\tjqXHR.always( function() {\n\n\t\t\t// If previous value didn't exist - remove it\n\t\t\tif ( overwritten === undefined ) {\n\t\t\t\tjQuery( window ).removeProp( callbackName );\n\n\t\t\t// Otherwise restore preexisting value\n\t\t\t} else {\n\t\t\t\twindow[ callbackName ] = overwritten;\n\t\t\t}\n\n\t\t\t// Save back as free\n\t\t\tif ( s[ callbackName ] ) {\n\n\t\t\t\t// Make sure that re-using the options doesn't screw things around\n\t\t\t\ts.jsonpCallback = originalSettings.jsonpCallback;\n\n\t\t\t\t// Save the callback name for future use\n\t\t\t\toldCallbacks.push( callbackName );\n\t\t\t}\n\n\t\t\t// Call if it was a function and we have a response\n\t\t\tif ( responseContainer && isFunction( overwritten ) ) {\n\t\t\t\toverwritten( responseContainer[ 0 ] );\n\t\t\t}\n\n\t\t\tresponseContainer = overwritten = undefined;\n\t\t} );\n\n\t\t// Delegate to script\n\t\treturn \"script\";\n\t}\n} );\n\n\n\n\n// Support: Safari 8 only\n// In Safari 8 documents created via document.implementation.createHTMLDocument\n// collapse sibling forms: the second one becomes a child of the first one.\n// Because of that, this security measure has to be disabled in Safari 8.\n// https://bugs.webkit.org/show_bug.cgi?id=137337\nsupport.createHTMLDocument = ( function() {\n\tvar body = document.implementation.createHTMLDocument( \"\" ).body;\n\tbody.innerHTML = \"<form></form><form></form>\";\n\treturn body.childNodes.length === 2;\n} )();\n\n\n// Argument \"data\" should be string of html\n// context (optional): If specified, the fragment will be created in this context,\n// defaults to document\n// keepScripts (optional): If true, will include scripts passed in the html string\njQuery.parseHTML = function( data, context, keepScripts ) {\n\tif ( typeof data !== \"string\" ) {\n\t\treturn [];\n\t}\n\tif ( typeof context === \"boolean\" ) {\n\t\tkeepScripts = context;\n\t\tcontext = false;\n\t}\n\n\tvar base, parsed, scripts;\n\n\tif ( !context ) {\n\n\t\t// Stop scripts or inline event handlers from being executed immediately\n\t\t// by using document.implementation\n\t\tif ( support.createHTMLDocument ) {\n\t\t\tcontext = document.implementation.createHTMLDocument( \"\" );\n\n\t\t\t// Set the base href for the created document\n\t\t\t// so any parsed elements with URLs\n\t\t\t// are based on the document's URL (gh-2965)\n\t\t\tbase = context.createElement( \"base\" );\n\t\t\tbase.href = document.location.href;\n\t\t\tcontext.head.appendChild( base );\n\t\t} else {\n\t\t\tcontext = document;\n\t\t}\n\t}\n\n\tparsed = rsingleTag.exec( data );\n\tscripts = !keepScripts && [];\n\n\t// Single tag\n\tif ( parsed ) {\n\t\treturn [ context.createElement( parsed[ 1 ] ) ];\n\t}\n\n\tparsed = buildFragment( [ data ], context, scripts );\n\n\tif ( scripts && scripts.length ) {\n\t\tjQuery( scripts ).remove();\n\t}\n\n\treturn jQuery.merge( [], parsed.childNodes );\n};\n\n\n/**\n * Load a url into a page\n */\njQuery.fn.load = function( url, params, callback ) {\n\tvar selector, type, response,\n\t\tself = this,\n\t\toff = url.indexOf( \" \" );\n\n\tif ( off > -1 ) {\n\t\tselector = stripAndCollapse( url.slice( off ) );\n\t\turl = url.slice( 0, off );\n\t}\n\n\t// If it's a function\n\tif ( isFunction( params ) ) {\n\n\t\t// We assume that it's the callback\n\t\tcallback = params;\n\t\tparams = undefined;\n\n\t// Otherwise, build a param string\n\t} else if ( params && typeof params === \"object\" ) {\n\t\ttype = \"POST\";\n\t}\n\n\t// If we have elements to modify, make the request\n\tif ( self.length > 0 ) {\n\t\tjQuery.ajax( {\n\t\t\turl: url,\n\n\t\t\t// If \"type\" variable is undefined, then \"GET\" method will be used.\n\t\t\t// Make value of this field explicit since\n\t\t\t// user can override it through ajaxSetup method\n\t\t\ttype: type || \"GET\",\n\t\t\tdataType: \"html\",\n\t\t\tdata: params\n\t\t} ).done( function( responseText ) {\n\n\t\t\t// Save response for use in complete callback\n\t\t\tresponse = arguments;\n\n\t\t\tself.html( selector ?\n\n\t\t\t\t// If a selector was specified, locate the right elements in a dummy div\n\t\t\t\t// Exclude scripts to avoid IE 'Permission Denied' errors\n\t\t\t\tjQuery( \"<div>\" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :\n\n\t\t\t\t// Otherwise use the full result\n\t\t\t\tresponseText );\n\n\t\t// If the request succeeds, this function gets \"data\", \"status\", \"jqXHR\"\n\t\t// but they are ignored because response was set above.\n\t\t// If it fails, this function gets \"jqXHR\", \"status\", \"error\"\n\t\t} ).always( callback && function( jqXHR, status ) {\n\t\t\tself.each( function() {\n\t\t\t\tcallback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );\n\t\t\t} );\n\t\t} );\n\t}\n\n\treturn this;\n};\n\n\n\n\njQuery.expr.pseudos.animated = function( elem ) {\n\treturn jQuery.grep( jQuery.timers, function( fn ) {\n\t\treturn elem === fn.elem;\n\t} ).length;\n};\n\n\n\n\njQuery.offset = {\n\tsetOffset: function( elem, options, i ) {\n\t\tvar curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,\n\t\t\tposition = jQuery.css( elem, \"position\" ),\n\t\t\tcurElem = jQuery( elem ),\n\t\t\tprops = {};\n\n\t\t// Set position first, in-case top/left are set even on static elem\n\t\tif ( position === \"static\" ) {\n\t\t\telem.style.position = \"relative\";\n\t\t}\n\n\t\tcurOffset = curElem.offset();\n\t\tcurCSSTop = jQuery.css( elem, \"top\" );\n\t\tcurCSSLeft = jQuery.css( elem, \"left\" );\n\t\tcalculatePosition = ( position === \"absolute\" || position === \"fixed\" ) &&\n\t\t\t( curCSSTop + curCSSLeft ).indexOf( \"auto\" ) > -1;\n\n\t\t// Need to be able to calculate position if either\n\t\t// top or left is auto and position is either absolute or fixed\n\t\tif ( calculatePosition ) {\n\t\t\tcurPosition = curElem.position();\n\t\t\tcurTop = curPosition.top;\n\t\t\tcurLeft = curPosition.left;\n\n\t\t} else {\n\t\t\tcurTop = parseFloat( curCSSTop ) || 0;\n\t\t\tcurLeft = parseFloat( curCSSLeft ) || 0;\n\t\t}\n\n\t\tif ( isFunction( options ) ) {\n\n\t\t\t// Use jQuery.extend here to allow modification of coordinates argument (gh-1848)\n\t\t\toptions = options.call( elem, i, jQuery.extend( {}, curOffset ) );\n\t\t}\n\n\t\tif ( options.top != null ) {\n\t\t\tprops.top = ( options.top - curOffset.top ) + curTop;\n\t\t}\n\t\tif ( options.left != null ) {\n\t\t\tprops.left = ( options.left - curOffset.left ) + curLeft;\n\t\t}\n\n\t\tif ( \"using\" in options ) {\n\t\t\toptions.using.call( elem, props );\n\n\t\t} else {\n\t\t\tcurElem.css( props );\n\t\t}\n\t}\n};\n\njQuery.fn.extend( {\n\n\t// offset() relates an element's border box to the document origin\n\toffset: function( options ) {\n\n\t\t// Preserve chaining for setter\n\t\tif ( arguments.length ) {\n\t\t\treturn options === undefined ?\n\t\t\t\tthis :\n\t\t\t\tthis.each( function( i ) {\n\t\t\t\t\tjQuery.offset.setOffset( this, options, i );\n\t\t\t\t} );\n\t\t}\n\n\t\tvar rect, win,\n\t\t\telem = this[ 0 ];\n\n\t\tif ( !elem ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Return zeros for disconnected and hidden (display: none) elements (gh-2310)\n\t\t// Support: IE <=11 only\n\t\t// Running getBoundingClientRect on a\n\t\t// disconnected node in IE throws an error\n\t\tif ( !elem.getClientRects().length ) {\n\t\t\treturn { top: 0, left: 0 };\n\t\t}\n\n\t\t// Get document-relative position by adding viewport scroll to viewport-relative gBCR\n\t\trect = elem.getBoundingClientRect();\n\t\twin = elem.ownerDocument.defaultView;\n\t\treturn {\n\t\t\ttop: rect.top + win.pageYOffset,\n\t\t\tleft: rect.left + win.pageXOffset\n\t\t};\n\t},\n\n\t// position() relates an element's margin box to its offset parent's padding box\n\t// This corresponds to the behavior of CSS absolute positioning\n\tposition: function() {\n\t\tif ( !this[ 0 ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar offsetParent, offset, doc,\n\t\t\telem = this[ 0 ],\n\t\t\tparentOffset = { top: 0, left: 0 };\n\n\t\t// position:fixed elements are offset from the viewport, which itself always has zero offset\n\t\tif ( jQuery.css( elem, \"position\" ) === \"fixed\" ) {\n\n\t\t\t// Assume position:fixed implies availability of getBoundingClientRect\n\t\t\toffset = elem.getBoundingClientRect();\n\n\t\t} else {\n\t\t\toffset = this.offset();\n\n\t\t\t// Account for the *real* offset parent, which can be the document or its root element\n\t\t\t// when a statically positioned element is identified\n\t\t\tdoc = elem.ownerDocument;\n\t\t\toffsetParent = elem.offsetParent || doc.documentElement;\n\t\t\twhile ( offsetParent &&\n\t\t\t\t( offsetParent === doc.body || offsetParent === doc.documentElement ) &&\n\t\t\t\tjQuery.css( offsetParent, \"position\" ) === \"static\" ) {\n\n\t\t\t\toffsetParent = offsetParent.parentNode;\n\t\t\t}\n\t\t\tif ( offsetParent && offsetParent !== elem && offsetParent.nodeType === 1 ) {\n\n\t\t\t\t// Incorporate borders into its offset, since they are outside its content origin\n\t\t\t\tparentOffset = jQuery( offsetParent ).offset();\n\t\t\t\tparentOffset.top += jQuery.css( offsetParent, \"borderTopWidth\", true );\n\t\t\t\tparentOffset.left += jQuery.css( offsetParent, \"borderLeftWidth\", true );\n\t\t\t}\n\t\t}\n\n\t\t// Subtract parent offsets and element margins\n\t\treturn {\n\t\t\ttop: offset.top - parentOffset.top - jQuery.css( elem, \"marginTop\", true ),\n\t\t\tleft: offset.left - parentOffset.left - jQuery.css( elem, \"marginLeft\", true )\n\t\t};\n\t},\n\n\t// This method will return documentElement in the following cases:\n\t// 1) For the element inside the iframe without offsetParent, this method will return\n\t//    documentElement of the parent window\n\t// 2) For the hidden or detached element\n\t// 3) For body or html element, i.e. in case of the html node - it will return itself\n\t//\n\t// but those exceptions were never presented as a real life use-cases\n\t// and might be considered as more preferable results.\n\t//\n\t// This logic, however, is not guaranteed and can change at any point in the future\n\toffsetParent: function() {\n\t\treturn this.map( function() {\n\t\t\tvar offsetParent = this.offsetParent;\n\n\t\t\twhile ( offsetParent && jQuery.css( offsetParent, \"position\" ) === \"static\" ) {\n\t\t\t\toffsetParent = offsetParent.offsetParent;\n\t\t\t}\n\n\t\t\treturn offsetParent || documentElement;\n\t\t} );\n\t}\n} );\n\n// Create scrollLeft and scrollTop methods\njQuery.each( { scrollLeft: \"pageXOffset\", scrollTop: \"pageYOffset\" }, function( method, prop ) {\n\tvar top = \"pageYOffset\" === prop;\n\n\tjQuery.fn[ method ] = function( val ) {\n\t\treturn access( this, function( elem, method, val ) {\n\n\t\t\t// Coalesce documents and windows\n\t\t\tvar win;\n\t\t\tif ( isWindow( elem ) ) {\n\t\t\t\twin = elem;\n\t\t\t} else if ( elem.nodeType === 9 ) {\n\t\t\t\twin = elem.defaultView;\n\t\t\t}\n\n\t\t\tif ( val === undefined ) {\n\t\t\t\treturn win ? win[ prop ] : elem[ method ];\n\t\t\t}\n\n\t\t\tif ( win ) {\n\t\t\t\twin.scrollTo(\n\t\t\t\t\t!top ? val : win.pageXOffset,\n\t\t\t\t\ttop ? val : win.pageYOffset\n\t\t\t\t);\n\n\t\t\t} else {\n\t\t\t\telem[ method ] = val;\n\t\t\t}\n\t\t}, method, val, arguments.length );\n\t};\n} );\n\n// Support: Safari <=7 - 9.1, Chrome <=37 - 49\n// Add the top/left cssHooks using jQuery.fn.position\n// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084\n// Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347\n// getComputedStyle returns percent when specified for top/left/bottom/right;\n// rather than make the css module depend on the offset module, just check for it here\njQuery.each( [ \"top\", \"left\" ], function( _i, prop ) {\n\tjQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,\n\t\tfunction( elem, computed ) {\n\t\t\tif ( computed ) {\n\t\t\t\tcomputed = curCSS( elem, prop );\n\n\t\t\t\t// If curCSS returns percentage, fallback to offset\n\t\t\t\treturn rnumnonpx.test( computed ) ?\n\t\t\t\t\tjQuery( elem ).position()[ prop ] + \"px\" :\n\t\t\t\t\tcomputed;\n\t\t\t}\n\t\t}\n\t);\n} );\n\n\n// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods\njQuery.each( { Height: \"height\", Width: \"width\" }, function( name, type ) {\n\tjQuery.each( {\n\t\tpadding: \"inner\" + name,\n\t\tcontent: type,\n\t\t\"\": \"outer\" + name\n\t}, function( defaultExtra, funcName ) {\n\n\t\t// Margin is only for outerHeight, outerWidth\n\t\tjQuery.fn[ funcName ] = function( margin, value ) {\n\t\t\tvar chainable = arguments.length && ( defaultExtra || typeof margin !== \"boolean\" ),\n\t\t\t\textra = defaultExtra || ( margin === true || value === true ? \"margin\" : \"border\" );\n\n\t\t\treturn access( this, function( elem, type, value ) {\n\t\t\t\tvar doc;\n\n\t\t\t\tif ( isWindow( elem ) ) {\n\n\t\t\t\t\t// $( window ).outerWidth/Height return w/h including scrollbars (gh-1729)\n\t\t\t\t\treturn funcName.indexOf( \"outer\" ) === 0 ?\n\t\t\t\t\t\telem[ \"inner\" + name ] :\n\t\t\t\t\t\telem.document.documentElement[ \"client\" + name ];\n\t\t\t\t}\n\n\t\t\t\t// Get document width or height\n\t\t\t\tif ( elem.nodeType === 9 ) {\n\t\t\t\t\tdoc = elem.documentElement;\n\n\t\t\t\t\t// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],\n\t\t\t\t\t// whichever is greatest\n\t\t\t\t\treturn Math.max(\n\t\t\t\t\t\telem.body[ \"scroll\" + name ], doc[ \"scroll\" + name ],\n\t\t\t\t\t\telem.body[ \"offset\" + name ], doc[ \"offset\" + name ],\n\t\t\t\t\t\tdoc[ \"client\" + name ]\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn value === undefined ?\n\n\t\t\t\t\t// Get width or height on the element, requesting but not forcing parseFloat\n\t\t\t\t\tjQuery.css( elem, type, extra ) :\n\n\t\t\t\t\t// Set width or height on the element\n\t\t\t\t\tjQuery.style( elem, type, value, extra );\n\t\t\t}, type, chainable ? margin : undefined, chainable );\n\t\t};\n\t} );\n} );\n\n\njQuery.each( [\n\t\"ajaxStart\",\n\t\"ajaxStop\",\n\t\"ajaxComplete\",\n\t\"ajaxError\",\n\t\"ajaxSuccess\",\n\t\"ajaxSend\"\n], function( _i, type ) {\n\tjQuery.fn[ type ] = function( fn ) {\n\t\treturn this.on( type, fn );\n\t};\n} );\n\n\n\n\njQuery.fn.extend( {\n\n\tbind: function( types, data, fn ) {\n\t\treturn this.on( types, null, data, fn );\n\t},\n\tunbind: function( types, fn ) {\n\t\treturn this.off( types, null, fn );\n\t},\n\n\tdelegate: function( selector, types, data, fn ) {\n\t\treturn this.on( types, selector, data, fn );\n\t},\n\tundelegate: function( selector, types, fn ) {\n\n\t\t// ( namespace ) or ( selector, types [, fn] )\n\t\treturn arguments.length === 1 ?\n\t\t\tthis.off( selector, \"**\" ) :\n\t\t\tthis.off( types, selector || \"**\", fn );\n\t},\n\n\thover: function( fnOver, fnOut ) {\n\t\treturn this\n\t\t\t.on( \"mouseenter\", fnOver )\n\t\t\t.on( \"mouseleave\", fnOut || fnOver );\n\t}\n} );\n\njQuery.each(\n\t( \"blur focus focusin focusout resize scroll click dblclick \" +\n\t\"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave \" +\n\t\"change select submit keydown keypress keyup contextmenu\" ).split( \" \" ),\n\tfunction( _i, name ) {\n\n\t\t// Handle event binding\n\t\tjQuery.fn[ name ] = function( data, fn ) {\n\t\t\treturn arguments.length > 0 ?\n\t\t\t\tthis.on( name, null, data, fn ) :\n\t\t\t\tthis.trigger( name );\n\t\t};\n\t}\n);\n\n\n\n\n// Support: Android <=4.0 only\n// Make sure we trim BOM and NBSP\n// Require that the \"whitespace run\" starts from a non-whitespace\n// to avoid O(N^2) behavior when the engine would try matching \"\\s+$\" at each space position.\nvar rtrim = /^[\\s\\uFEFF\\xA0]+|([^\\s\\uFEFF\\xA0])[\\s\\uFEFF\\xA0]+$/g;\n\n// Bind a function to a context, optionally partially applying any\n// arguments.\n// jQuery.proxy is deprecated to promote standards (specifically Function#bind)\n// However, it is not slated for removal any time soon\njQuery.proxy = function( fn, context ) {\n\tvar tmp, args, proxy;\n\n\tif ( typeof context === \"string\" ) {\n\t\ttmp = fn[ context ];\n\t\tcontext = fn;\n\t\tfn = tmp;\n\t}\n\n\t// Quick check to determine if target is callable, in the spec\n\t// this throws a TypeError, but we will just return undefined.\n\tif ( !isFunction( fn ) ) {\n\t\treturn undefined;\n\t}\n\n\t// Simulated bind\n\targs = slice.call( arguments, 2 );\n\tproxy = function() {\n\t\treturn fn.apply( context || this, args.concat( slice.call( arguments ) ) );\n\t};\n\n\t// Set the guid of unique handler to the same of original handler, so it can be removed\n\tproxy.guid = fn.guid = fn.guid || jQuery.guid++;\n\n\treturn proxy;\n};\n\njQuery.holdReady = function( hold ) {\n\tif ( hold ) {\n\t\tjQuery.readyWait++;\n\t} else {\n\t\tjQuery.ready( true );\n\t}\n};\njQuery.isArray = Array.isArray;\njQuery.parseJSON = JSON.parse;\njQuery.nodeName = nodeName;\njQuery.isFunction = isFunction;\njQuery.isWindow = isWindow;\njQuery.camelCase = camelCase;\njQuery.type = toType;\n\njQuery.now = Date.now;\n\njQuery.isNumeric = function( obj ) {\n\n\t// As of jQuery 3.0, isNumeric is limited to\n\t// strings and numbers (primitives or objects)\n\t// that can be coerced to finite numbers (gh-2662)\n\tvar type = jQuery.type( obj );\n\treturn ( type === \"number\" || type === \"string\" ) &&\n\n\t\t// parseFloat NaNs numeric-cast false positives (\"\")\n\t\t// ...but misinterprets leading-number strings, particularly hex literals (\"0x...\")\n\t\t// subtraction forces infinities to NaN\n\t\t!isNaN( obj - parseFloat( obj ) );\n};\n\njQuery.trim = function( text ) {\n\treturn text == null ?\n\t\t\"\" :\n\t\t( text + \"\" ).replace( rtrim, \"$1\" );\n};\n\n\n\n// Register as a named AMD module, since jQuery can be concatenated with other\n// files that may use define, but not via a proper concatenation script that\n// understands anonymous AMD modules. A named AMD is safest and most robust\n// way to register. Lowercase jquery is used because AMD module names are\n// derived from file names, and jQuery is normally delivered in a lowercase\n// file name. Do this after creating the global so that if an AMD module wants\n// to call noConflict to hide this version of jQuery, it will work.\n\n// Note that for maximum portability, libraries that are not jQuery should\n// declare themselves as anonymous modules, and avoid setting a global if an\n// AMD loader is present. jQuery is a special case. For more information, see\n// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon\n\nif ( typeof define === \"function\" && define.amd ) {\n\tdefine( \"jquery\", [], function() {\n\t\treturn jQuery;\n\t} );\n}\n\n\n\n\nvar\n\n\t// Map over jQuery in case of overwrite\n\t_jQuery = window.jQuery,\n\n\t// Map over the $ in case of overwrite\n\t_$ = window.$;\n\njQuery.noConflict = function( deep ) {\n\tif ( window.$ === jQuery ) {\n\t\twindow.$ = _$;\n\t}\n\n\tif ( deep && window.jQuery === jQuery ) {\n\t\twindow.jQuery = _jQuery;\n\t}\n\n\treturn jQuery;\n};\n\n// Expose jQuery and $ identifiers, even in AMD\n// (trac-7102#comment:10, https://github.com/jquery/jquery/pull/557)\n// and CommonJS for browser emulators (trac-13566)\nif ( typeof noGlobal === \"undefined\" ) {\n\twindow.jQuery = window.$ = jQuery;\n}\n\n\n\n\nreturn jQuery;\n} );\n", "(function($) {\n\n  var cocoon_element_counter = 0;\n\n  var create_new_id = function() {\n    return (new Date().getTime() + cocoon_element_counter++);\n  }\n\n  var newcontent_braced = function(id) {\n    return '[' + id + ']$1';\n  }\n\n  var newcontent_underscord = function(id) {\n    return '_' + id + '_$1';\n  }\n\n  var getInsertionNodeElem = function(insertionNode, insertionTraversal, $this){\n\n    if (!insertionNode){\n      return $this.parent();\n    }\n\n    if (typeof insertionNode == 'function'){\n      if(insertionTraversal){\n        console.warn('association-insertion-traversal is ignored, because association-insertion-node is given as a function.')\n      }\n      return insertionNode($this);\n    }\n\n    if(typeof insertionNode == 'string'){\n      if (insertionTraversal){\n        return $this[insertionTraversal](insertionNode);\n      }else{\n        return insertionNode == \"this\" ? $this : $(insertionNode);\n      }\n    }\n\n  }\n\n  $(document).on('click', '.add_fields', function(e) {\n    e.preventDefault();\n    e.stopPropagation();\n    \n    var $this                 = $(this),\n        assoc                 = $this.data('association'),\n        assocs                = $this.data('associations'),\n        content               = $this.data('association-insertion-template'),\n        insertionMethod       = $this.data('association-insertion-method') || $this.data('association-insertion-position') || 'before',\n        insertionNode         = $this.data('association-insertion-node'),\n        insertionTraversal    = $this.data('association-insertion-traversal'),\n        count                 = parseInt($this.data('count'), 10),\n        regexp_braced         = new RegExp('\\\\[new_' + assoc + '\\\\](.*?\\\\s)', 'g'),\n        regexp_underscord     = new RegExp('_new_' + assoc + '_(\\\\w*)', 'g'),\n        new_id                = create_new_id(),\n        new_content           = content.replace(regexp_braced, newcontent_braced(new_id)),\n        new_contents          = [],\n        originalEvent         = e;\n\n\n    if (new_content == content) {\n      regexp_braced     = new RegExp('\\\\[new_' + assocs + '\\\\](.*?\\\\s)', 'g');\n      regexp_underscord = new RegExp('_new_' + assocs + '_(\\\\w*)', 'g');\n      new_content       = content.replace(regexp_braced, newcontent_braced(new_id));\n    }\n\n    new_content = new_content.replace(regexp_underscord, newcontent_underscord(new_id));\n    new_contents = [new_content];\n\n    count = (isNaN(count) ? 1 : Math.max(count, 1));\n    count -= 1;\n\n    while (count) {\n      new_id      = create_new_id();\n      new_content = content.replace(regexp_braced, newcontent_braced(new_id));\n      new_content = new_content.replace(regexp_underscord, newcontent_underscord(new_id));\n      new_contents.push(new_content);\n\n      count -= 1;\n    }\n\n    var insertionNodeElem = getInsertionNodeElem(insertionNode, insertionTraversal, $this)\n\n    if( !insertionNodeElem || (insertionNodeElem.length == 0) ){\n      console.warn(\"Couldn't find the element to insert the template. Make sure your `data-association-insertion-*` on `link_to_add_association` is correct.\")\n    }\n\n    $.each(new_contents, function(i, node) {\n      var contentNode = $(node);\n\n      var before_insert = jQuery.Event('cocoon:before-insert');\n      insertionNodeElem.trigger(before_insert, [contentNode, originalEvent]);\n\n      if (!before_insert.isDefaultPrevented()) {\n        // allow any of the jquery dom manipulation methods (after, before, append, prepend, etc)\n        // to be called on the node.  allows the insertion node to be the parent of the inserted\n        // code and doesn't force it to be a sibling like after/before does. default: 'before'\n        var addedContent = insertionNodeElem[insertionMethod](contentNode);\n\n        insertionNodeElem.trigger('cocoon:after-insert', [contentNode,\n          originalEvent]);\n      }\n    });\n  });\n\n  $(document).on('click', '.remove_fields.dynamic, .remove_fields.existing', function(e) {\n    var $this = $(this),\n        wrapper_class = $this.data('wrapper-class') || 'nested-fields',\n        node_to_delete = $this.closest('.' + wrapper_class),\n        trigger_node = node_to_delete.parent(),\n        originalEvent = e;\n\n    e.preventDefault();\n    e.stopPropagation();\n\n    var before_remove = jQuery.Event('cocoon:before-remove');\n    trigger_node.trigger(before_remove, [node_to_delete, originalEvent]);\n\n    if (!before_remove.isDefaultPrevented()) {\n      var timeout = trigger_node.data('remove-timeout') || 0;\n\n      setTimeout(function() {\n        if ($this.hasClass('dynamic')) {\n            node_to_delete.detach();\n        } else {\n            $this.prev(\"input[type=hidden]\").val(\"1\");\n            node_to_delete.hide();\n        }\n        trigger_node.trigger('cocoon:after-remove', [node_to_delete,\n          originalEvent]);\n      }, timeout);\n    }\n  });\n\n\n  $(document).on(\"ready page:load turbolinks:load\", function() {\n    $('.remove_fields.existing.destroyed').each(function(i, obj) {\n      var $this = $(this),\n          wrapper_class = $this.data('wrapper-class') || 'nested-fields';\n\n      $this.closest('.' + wrapper_class).hide();\n    });\n  });\n\n})(jQuery);\n\n\n", "/*\nTurbo 7.3.0\nCopyright \u00A9 2023 37signals LLC\n */\n(function () {\n    if (window.Reflect === undefined ||\n        window.customElements === undefined ||\n        window.customElements.polyfillWrapFlushCallback) {\n        return;\n    }\n    const BuiltInHTMLElement = HTMLElement;\n    const wrapperForTheName = {\n        HTMLElement: function HTMLElement() {\n            return Reflect.construct(BuiltInHTMLElement, [], this.constructor);\n        },\n    };\n    window.HTMLElement = wrapperForTheName[\"HTMLElement\"];\n    HTMLElement.prototype = BuiltInHTMLElement.prototype;\n    HTMLElement.prototype.constructor = HTMLElement;\n    Object.setPrototypeOf(HTMLElement, BuiltInHTMLElement);\n})();\n\n/**\n * The MIT License (MIT)\n * \n * Copyright (c) 2019 Javan Makhmali\n * \n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n * \n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n * \n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n(function(prototype) {\n  if (typeof prototype.requestSubmit == \"function\") return\n\n  prototype.requestSubmit = function(submitter) {\n    if (submitter) {\n      validateSubmitter(submitter, this);\n      submitter.click();\n    } else {\n      submitter = document.createElement(\"input\");\n      submitter.type = \"submit\";\n      submitter.hidden = true;\n      this.appendChild(submitter);\n      submitter.click();\n      this.removeChild(submitter);\n    }\n  };\n\n  function validateSubmitter(submitter, form) {\n    submitter instanceof HTMLElement || raise(TypeError, \"parameter 1 is not of type 'HTMLElement'\");\n    submitter.type == \"submit\" || raise(TypeError, \"The specified element is not a submit button\");\n    submitter.form == form || raise(DOMException, \"The specified element is not owned by this form element\", \"NotFoundError\");\n  }\n\n  function raise(errorConstructor, message, name) {\n    throw new errorConstructor(\"Failed to execute 'requestSubmit' on 'HTMLFormElement': \" + message + \".\", name)\n  }\n})(HTMLFormElement.prototype);\n\nconst submittersByForm = new WeakMap();\nfunction findSubmitterFromClickTarget(target) {\n    const element = target instanceof Element ? target : target instanceof Node ? target.parentElement : null;\n    const candidate = element ? element.closest(\"input, button\") : null;\n    return (candidate === null || candidate === void 0 ? void 0 : candidate.type) == \"submit\" ? candidate : null;\n}\nfunction clickCaptured(event) {\n    const submitter = findSubmitterFromClickTarget(event.target);\n    if (submitter && submitter.form) {\n        submittersByForm.set(submitter.form, submitter);\n    }\n}\n(function () {\n    if (\"submitter\" in Event.prototype)\n        return;\n    let prototype = window.Event.prototype;\n    if (\"SubmitEvent\" in window && /Apple Computer/.test(navigator.vendor)) {\n        prototype = window.SubmitEvent.prototype;\n    }\n    else if (\"SubmitEvent\" in window) {\n        return;\n    }\n    addEventListener(\"click\", clickCaptured, true);\n    Object.defineProperty(prototype, \"submitter\", {\n        get() {\n            if (this.type == \"submit\" && this.target instanceof HTMLFormElement) {\n                return submittersByForm.get(this.target);\n            }\n        },\n    });\n})();\n\nvar FrameLoadingStyle;\n(function (FrameLoadingStyle) {\n    FrameLoadingStyle[\"eager\"] = \"eager\";\n    FrameLoadingStyle[\"lazy\"] = \"lazy\";\n})(FrameLoadingStyle || (FrameLoadingStyle = {}));\nclass FrameElement extends HTMLElement {\n    static get observedAttributes() {\n        return [\"disabled\", \"complete\", \"loading\", \"src\"];\n    }\n    constructor() {\n        super();\n        this.loaded = Promise.resolve();\n        this.delegate = new FrameElement.delegateConstructor(this);\n    }\n    connectedCallback() {\n        this.delegate.connect();\n    }\n    disconnectedCallback() {\n        this.delegate.disconnect();\n    }\n    reload() {\n        return this.delegate.sourceURLReloaded();\n    }\n    attributeChangedCallback(name) {\n        if (name == \"loading\") {\n            this.delegate.loadingStyleChanged();\n        }\n        else if (name == \"complete\") {\n            this.delegate.completeChanged();\n        }\n        else if (name == \"src\") {\n            this.delegate.sourceURLChanged();\n        }\n        else {\n            this.delegate.disabledChanged();\n        }\n    }\n    get src() {\n        return this.getAttribute(\"src\");\n    }\n    set src(value) {\n        if (value) {\n            this.setAttribute(\"src\", value);\n        }\n        else {\n            this.removeAttribute(\"src\");\n        }\n    }\n    get loading() {\n        return frameLoadingStyleFromString(this.getAttribute(\"loading\") || \"\");\n    }\n    set loading(value) {\n        if (value) {\n            this.setAttribute(\"loading\", value);\n        }\n        else {\n            this.removeAttribute(\"loading\");\n        }\n    }\n    get disabled() {\n        return this.hasAttribute(\"disabled\");\n    }\n    set disabled(value) {\n        if (value) {\n            this.setAttribute(\"disabled\", \"\");\n        }\n        else {\n            this.removeAttribute(\"disabled\");\n        }\n    }\n    get autoscroll() {\n        return this.hasAttribute(\"autoscroll\");\n    }\n    set autoscroll(value) {\n        if (value) {\n            this.setAttribute(\"autoscroll\", \"\");\n        }\n        else {\n            this.removeAttribute(\"autoscroll\");\n        }\n    }\n    get complete() {\n        return !this.delegate.isLoading;\n    }\n    get isActive() {\n        return this.ownerDocument === document && !this.isPreview;\n    }\n    get isPreview() {\n        var _a, _b;\n        return (_b = (_a = this.ownerDocument) === null || _a === void 0 ? void 0 : _a.documentElement) === null || _b === void 0 ? void 0 : _b.hasAttribute(\"data-turbo-preview\");\n    }\n}\nfunction frameLoadingStyleFromString(style) {\n    switch (style.toLowerCase()) {\n        case \"lazy\":\n            return FrameLoadingStyle.lazy;\n        default:\n            return FrameLoadingStyle.eager;\n    }\n}\n\nfunction expandURL(locatable) {\n    return new URL(locatable.toString(), document.baseURI);\n}\nfunction getAnchor(url) {\n    let anchorMatch;\n    if (url.hash) {\n        return url.hash.slice(1);\n    }\n    else if ((anchorMatch = url.href.match(/#(.*)$/))) {\n        return anchorMatch[1];\n    }\n}\nfunction getAction(form, submitter) {\n    const action = (submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"formaction\")) || form.getAttribute(\"action\") || form.action;\n    return expandURL(action);\n}\nfunction getExtension(url) {\n    return (getLastPathComponent(url).match(/\\.[^.]*$/) || [])[0] || \"\";\n}\nfunction isHTML(url) {\n    return !!getExtension(url).match(/^(?:|\\.(?:htm|html|xhtml|php))$/);\n}\nfunction isPrefixedBy(baseURL, url) {\n    const prefix = getPrefix(url);\n    return baseURL.href === expandURL(prefix).href || baseURL.href.startsWith(prefix);\n}\nfunction locationIsVisitable(location, rootLocation) {\n    return isPrefixedBy(location, rootLocation) && isHTML(location);\n}\nfunction getRequestURL(url) {\n    const anchor = getAnchor(url);\n    return anchor != null ? url.href.slice(0, -(anchor.length + 1)) : url.href;\n}\nfunction toCacheKey(url) {\n    return getRequestURL(url);\n}\nfunction urlsAreEqual(left, right) {\n    return expandURL(left).href == expandURL(right).href;\n}\nfunction getPathComponents(url) {\n    return url.pathname.split(\"/\").slice(1);\n}\nfunction getLastPathComponent(url) {\n    return getPathComponents(url).slice(-1)[0];\n}\nfunction getPrefix(url) {\n    return addTrailingSlash(url.origin + url.pathname);\n}\nfunction addTrailingSlash(value) {\n    return value.endsWith(\"/\") ? value : value + \"/\";\n}\n\nclass FetchResponse {\n    constructor(response) {\n        this.response = response;\n    }\n    get succeeded() {\n        return this.response.ok;\n    }\n    get failed() {\n        return !this.succeeded;\n    }\n    get clientError() {\n        return this.statusCode >= 400 && this.statusCode <= 499;\n    }\n    get serverError() {\n        return this.statusCode >= 500 && this.statusCode <= 599;\n    }\n    get redirected() {\n        return this.response.redirected;\n    }\n    get location() {\n        return expandURL(this.response.url);\n    }\n    get isHTML() {\n        return this.contentType && this.contentType.match(/^(?:text\\/([^\\s;,]+\\b)?html|application\\/xhtml\\+xml)\\b/);\n    }\n    get statusCode() {\n        return this.response.status;\n    }\n    get contentType() {\n        return this.header(\"Content-Type\");\n    }\n    get responseText() {\n        return this.response.clone().text();\n    }\n    get responseHTML() {\n        if (this.isHTML) {\n            return this.response.clone().text();\n        }\n        else {\n            return Promise.resolve(undefined);\n        }\n    }\n    header(name) {\n        return this.response.headers.get(name);\n    }\n}\n\nfunction activateScriptElement(element) {\n    if (element.getAttribute(\"data-turbo-eval\") == \"false\") {\n        return element;\n    }\n    else {\n        const createdScriptElement = document.createElement(\"script\");\n        const cspNonce = getMetaContent(\"csp-nonce\");\n        if (cspNonce) {\n            createdScriptElement.nonce = cspNonce;\n        }\n        createdScriptElement.textContent = element.textContent;\n        createdScriptElement.async = false;\n        copyElementAttributes(createdScriptElement, element);\n        return createdScriptElement;\n    }\n}\nfunction copyElementAttributes(destinationElement, sourceElement) {\n    for (const { name, value } of sourceElement.attributes) {\n        destinationElement.setAttribute(name, value);\n    }\n}\nfunction createDocumentFragment(html) {\n    const template = document.createElement(\"template\");\n    template.innerHTML = html;\n    return template.content;\n}\nfunction dispatch(eventName, { target, cancelable, detail } = {}) {\n    const event = new CustomEvent(eventName, {\n        cancelable,\n        bubbles: true,\n        composed: true,\n        detail,\n    });\n    if (target && target.isConnected) {\n        target.dispatchEvent(event);\n    }\n    else {\n        document.documentElement.dispatchEvent(event);\n    }\n    return event;\n}\nfunction nextAnimationFrame() {\n    return new Promise((resolve) => requestAnimationFrame(() => resolve()));\n}\nfunction nextEventLoopTick() {\n    return new Promise((resolve) => setTimeout(() => resolve(), 0));\n}\nfunction nextMicrotask() {\n    return Promise.resolve();\n}\nfunction parseHTMLDocument(html = \"\") {\n    return new DOMParser().parseFromString(html, \"text/html\");\n}\nfunction unindent(strings, ...values) {\n    const lines = interpolate(strings, values).replace(/^\\n/, \"\").split(\"\\n\");\n    const match = lines[0].match(/^\\s+/);\n    const indent = match ? match[0].length : 0;\n    return lines.map((line) => line.slice(indent)).join(\"\\n\");\n}\nfunction interpolate(strings, values) {\n    return strings.reduce((result, string, i) => {\n        const value = values[i] == undefined ? \"\" : values[i];\n        return result + string + value;\n    }, \"\");\n}\nfunction uuid() {\n    return Array.from({ length: 36 })\n        .map((_, i) => {\n        if (i == 8 || i == 13 || i == 18 || i == 23) {\n            return \"-\";\n        }\n        else if (i == 14) {\n            return \"4\";\n        }\n        else if (i == 19) {\n            return (Math.floor(Math.random() * 4) + 8).toString(16);\n        }\n        else {\n            return Math.floor(Math.random() * 15).toString(16);\n        }\n    })\n        .join(\"\");\n}\nfunction getAttribute(attributeName, ...elements) {\n    for (const value of elements.map((element) => element === null || element === void 0 ? void 0 : element.getAttribute(attributeName))) {\n        if (typeof value == \"string\")\n            return value;\n    }\n    return null;\n}\nfunction hasAttribute(attributeName, ...elements) {\n    return elements.some((element) => element && element.hasAttribute(attributeName));\n}\nfunction markAsBusy(...elements) {\n    for (const element of elements) {\n        if (element.localName == \"turbo-frame\") {\n            element.setAttribute(\"busy\", \"\");\n        }\n        element.setAttribute(\"aria-busy\", \"true\");\n    }\n}\nfunction clearBusyState(...elements) {\n    for (const element of elements) {\n        if (element.localName == \"turbo-frame\") {\n            element.removeAttribute(\"busy\");\n        }\n        element.removeAttribute(\"aria-busy\");\n    }\n}\nfunction waitForLoad(element, timeoutInMilliseconds = 2000) {\n    return new Promise((resolve) => {\n        const onComplete = () => {\n            element.removeEventListener(\"error\", onComplete);\n            element.removeEventListener(\"load\", onComplete);\n            resolve();\n        };\n        element.addEventListener(\"load\", onComplete, { once: true });\n        element.addEventListener(\"error\", onComplete, { once: true });\n        setTimeout(resolve, timeoutInMilliseconds);\n    });\n}\nfunction getHistoryMethodForAction(action) {\n    switch (action) {\n        case \"replace\":\n            return history.replaceState;\n        case \"advance\":\n        case \"restore\":\n            return history.pushState;\n    }\n}\nfunction isAction(action) {\n    return action == \"advance\" || action == \"replace\" || action == \"restore\";\n}\nfunction getVisitAction(...elements) {\n    const action = getAttribute(\"data-turbo-action\", ...elements);\n    return isAction(action) ? action : null;\n}\nfunction getMetaElement(name) {\n    return document.querySelector(`meta[name=\"${name}\"]`);\n}\nfunction getMetaContent(name) {\n    const element = getMetaElement(name);\n    return element && element.content;\n}\nfunction setMetaContent(name, content) {\n    let element = getMetaElement(name);\n    if (!element) {\n        element = document.createElement(\"meta\");\n        element.setAttribute(\"name\", name);\n        document.head.appendChild(element);\n    }\n    element.setAttribute(\"content\", content);\n    return element;\n}\nfunction findClosestRecursively(element, selector) {\n    var _a;\n    if (element instanceof Element) {\n        return (element.closest(selector) ||\n            findClosestRecursively(element.assignedSlot || ((_a = element.getRootNode()) === null || _a === void 0 ? void 0 : _a.host), selector));\n    }\n}\n\nvar FetchMethod;\n(function (FetchMethod) {\n    FetchMethod[FetchMethod[\"get\"] = 0] = \"get\";\n    FetchMethod[FetchMethod[\"post\"] = 1] = \"post\";\n    FetchMethod[FetchMethod[\"put\"] = 2] = \"put\";\n    FetchMethod[FetchMethod[\"patch\"] = 3] = \"patch\";\n    FetchMethod[FetchMethod[\"delete\"] = 4] = \"delete\";\n})(FetchMethod || (FetchMethod = {}));\nfunction fetchMethodFromString(method) {\n    switch (method.toLowerCase()) {\n        case \"get\":\n            return FetchMethod.get;\n        case \"post\":\n            return FetchMethod.post;\n        case \"put\":\n            return FetchMethod.put;\n        case \"patch\":\n            return FetchMethod.patch;\n        case \"delete\":\n            return FetchMethod.delete;\n    }\n}\nclass FetchRequest {\n    constructor(delegate, method, location, body = new URLSearchParams(), target = null) {\n        this.abortController = new AbortController();\n        this.resolveRequestPromise = (_value) => { };\n        this.delegate = delegate;\n        this.method = method;\n        this.headers = this.defaultHeaders;\n        this.body = body;\n        this.url = location;\n        this.target = target;\n    }\n    get location() {\n        return this.url;\n    }\n    get params() {\n        return this.url.searchParams;\n    }\n    get entries() {\n        return this.body ? Array.from(this.body.entries()) : [];\n    }\n    cancel() {\n        this.abortController.abort();\n    }\n    async perform() {\n        const { fetchOptions } = this;\n        this.delegate.prepareRequest(this);\n        await this.allowRequestToBeIntercepted(fetchOptions);\n        try {\n            this.delegate.requestStarted(this);\n            const response = await fetch(this.url.href, fetchOptions);\n            return await this.receive(response);\n        }\n        catch (error) {\n            if (error.name !== \"AbortError\") {\n                if (this.willDelegateErrorHandling(error)) {\n                    this.delegate.requestErrored(this, error);\n                }\n                throw error;\n            }\n        }\n        finally {\n            this.delegate.requestFinished(this);\n        }\n    }\n    async receive(response) {\n        const fetchResponse = new FetchResponse(response);\n        const event = dispatch(\"turbo:before-fetch-response\", {\n            cancelable: true,\n            detail: { fetchResponse },\n            target: this.target,\n        });\n        if (event.defaultPrevented) {\n            this.delegate.requestPreventedHandlingResponse(this, fetchResponse);\n        }\n        else if (fetchResponse.succeeded) {\n            this.delegate.requestSucceededWithResponse(this, fetchResponse);\n        }\n        else {\n            this.delegate.requestFailedWithResponse(this, fetchResponse);\n        }\n        return fetchResponse;\n    }\n    get fetchOptions() {\n        var _a;\n        return {\n            method: FetchMethod[this.method].toUpperCase(),\n            credentials: \"same-origin\",\n            headers: this.headers,\n            redirect: \"follow\",\n            body: this.isSafe ? null : this.body,\n            signal: this.abortSignal,\n            referrer: (_a = this.delegate.referrer) === null || _a === void 0 ? void 0 : _a.href,\n        };\n    }\n    get defaultHeaders() {\n        return {\n            Accept: \"text/html, application/xhtml+xml\",\n        };\n    }\n    get isSafe() {\n        return this.method === FetchMethod.get;\n    }\n    get abortSignal() {\n        return this.abortController.signal;\n    }\n    acceptResponseType(mimeType) {\n        this.headers[\"Accept\"] = [mimeType, this.headers[\"Accept\"]].join(\", \");\n    }\n    async allowRequestToBeIntercepted(fetchOptions) {\n        const requestInterception = new Promise((resolve) => (this.resolveRequestPromise = resolve));\n        const event = dispatch(\"turbo:before-fetch-request\", {\n            cancelable: true,\n            detail: {\n                fetchOptions,\n                url: this.url,\n                resume: this.resolveRequestPromise,\n            },\n            target: this.target,\n        });\n        if (event.defaultPrevented)\n            await requestInterception;\n    }\n    willDelegateErrorHandling(error) {\n        const event = dispatch(\"turbo:fetch-request-error\", {\n            target: this.target,\n            cancelable: true,\n            detail: { request: this, error: error },\n        });\n        return !event.defaultPrevented;\n    }\n}\n\nclass AppearanceObserver {\n    constructor(delegate, element) {\n        this.started = false;\n        this.intersect = (entries) => {\n            const lastEntry = entries.slice(-1)[0];\n            if (lastEntry === null || lastEntry === void 0 ? void 0 : lastEntry.isIntersecting) {\n                this.delegate.elementAppearedInViewport(this.element);\n            }\n        };\n        this.delegate = delegate;\n        this.element = element;\n        this.intersectionObserver = new IntersectionObserver(this.intersect);\n    }\n    start() {\n        if (!this.started) {\n            this.started = true;\n            this.intersectionObserver.observe(this.element);\n        }\n    }\n    stop() {\n        if (this.started) {\n            this.started = false;\n            this.intersectionObserver.unobserve(this.element);\n        }\n    }\n}\n\nclass StreamMessage {\n    static wrap(message) {\n        if (typeof message == \"string\") {\n            return new this(createDocumentFragment(message));\n        }\n        else {\n            return message;\n        }\n    }\n    constructor(fragment) {\n        this.fragment = importStreamElements(fragment);\n    }\n}\nStreamMessage.contentType = \"text/vnd.turbo-stream.html\";\nfunction importStreamElements(fragment) {\n    for (const element of fragment.querySelectorAll(\"turbo-stream\")) {\n        const streamElement = document.importNode(element, true);\n        for (const inertScriptElement of streamElement.templateElement.content.querySelectorAll(\"script\")) {\n            inertScriptElement.replaceWith(activateScriptElement(inertScriptElement));\n        }\n        element.replaceWith(streamElement);\n    }\n    return fragment;\n}\n\nvar FormSubmissionState;\n(function (FormSubmissionState) {\n    FormSubmissionState[FormSubmissionState[\"initialized\"] = 0] = \"initialized\";\n    FormSubmissionState[FormSubmissionState[\"requesting\"] = 1] = \"requesting\";\n    FormSubmissionState[FormSubmissionState[\"waiting\"] = 2] = \"waiting\";\n    FormSubmissionState[FormSubmissionState[\"receiving\"] = 3] = \"receiving\";\n    FormSubmissionState[FormSubmissionState[\"stopping\"] = 4] = \"stopping\";\n    FormSubmissionState[FormSubmissionState[\"stopped\"] = 5] = \"stopped\";\n})(FormSubmissionState || (FormSubmissionState = {}));\nvar FormEnctype;\n(function (FormEnctype) {\n    FormEnctype[\"urlEncoded\"] = \"application/x-www-form-urlencoded\";\n    FormEnctype[\"multipart\"] = \"multipart/form-data\";\n    FormEnctype[\"plain\"] = \"text/plain\";\n})(FormEnctype || (FormEnctype = {}));\nfunction formEnctypeFromString(encoding) {\n    switch (encoding.toLowerCase()) {\n        case FormEnctype.multipart:\n            return FormEnctype.multipart;\n        case FormEnctype.plain:\n            return FormEnctype.plain;\n        default:\n            return FormEnctype.urlEncoded;\n    }\n}\nclass FormSubmission {\n    static confirmMethod(message, _element, _submitter) {\n        return Promise.resolve(confirm(message));\n    }\n    constructor(delegate, formElement, submitter, mustRedirect = false) {\n        this.state = FormSubmissionState.initialized;\n        this.delegate = delegate;\n        this.formElement = formElement;\n        this.submitter = submitter;\n        this.formData = buildFormData(formElement, submitter);\n        this.location = expandURL(this.action);\n        if (this.method == FetchMethod.get) {\n            mergeFormDataEntries(this.location, [...this.body.entries()]);\n        }\n        this.fetchRequest = new FetchRequest(this, this.method, this.location, this.body, this.formElement);\n        this.mustRedirect = mustRedirect;\n    }\n    get method() {\n        var _a;\n        const method = ((_a = this.submitter) === null || _a === void 0 ? void 0 : _a.getAttribute(\"formmethod\")) || this.formElement.getAttribute(\"method\") || \"\";\n        return fetchMethodFromString(method.toLowerCase()) || FetchMethod.get;\n    }\n    get action() {\n        var _a;\n        const formElementAction = typeof this.formElement.action === \"string\" ? this.formElement.action : null;\n        if ((_a = this.submitter) === null || _a === void 0 ? void 0 : _a.hasAttribute(\"formaction\")) {\n            return this.submitter.getAttribute(\"formaction\") || \"\";\n        }\n        else {\n            return this.formElement.getAttribute(\"action\") || formElementAction || \"\";\n        }\n    }\n    get body() {\n        if (this.enctype == FormEnctype.urlEncoded || this.method == FetchMethod.get) {\n            return new URLSearchParams(this.stringFormData);\n        }\n        else {\n            return this.formData;\n        }\n    }\n    get enctype() {\n        var _a;\n        return formEnctypeFromString(((_a = this.submitter) === null || _a === void 0 ? void 0 : _a.getAttribute(\"formenctype\")) || this.formElement.enctype);\n    }\n    get isSafe() {\n        return this.fetchRequest.isSafe;\n    }\n    get stringFormData() {\n        return [...this.formData].reduce((entries, [name, value]) => {\n            return entries.concat(typeof value == \"string\" ? [[name, value]] : []);\n        }, []);\n    }\n    async start() {\n        const { initialized, requesting } = FormSubmissionState;\n        const confirmationMessage = getAttribute(\"data-turbo-confirm\", this.submitter, this.formElement);\n        if (typeof confirmationMessage === \"string\") {\n            const answer = await FormSubmission.confirmMethod(confirmationMessage, this.formElement, this.submitter);\n            if (!answer) {\n                return;\n            }\n        }\n        if (this.state == initialized) {\n            this.state = requesting;\n            return this.fetchRequest.perform();\n        }\n    }\n    stop() {\n        const { stopping, stopped } = FormSubmissionState;\n        if (this.state != stopping && this.state != stopped) {\n            this.state = stopping;\n            this.fetchRequest.cancel();\n            return true;\n        }\n    }\n    prepareRequest(request) {\n        if (!request.isSafe) {\n            const token = getCookieValue(getMetaContent(\"csrf-param\")) || getMetaContent(\"csrf-token\");\n            if (token) {\n                request.headers[\"X-CSRF-Token\"] = token;\n            }\n        }\n        if (this.requestAcceptsTurboStreamResponse(request)) {\n            request.acceptResponseType(StreamMessage.contentType);\n        }\n    }\n    requestStarted(_request) {\n        var _a;\n        this.state = FormSubmissionState.waiting;\n        (_a = this.submitter) === null || _a === void 0 ? void 0 : _a.setAttribute(\"disabled\", \"\");\n        this.setSubmitsWith();\n        dispatch(\"turbo:submit-start\", {\n            target: this.formElement,\n            detail: { formSubmission: this },\n        });\n        this.delegate.formSubmissionStarted(this);\n    }\n    requestPreventedHandlingResponse(request, response) {\n        this.result = { success: response.succeeded, fetchResponse: response };\n    }\n    requestSucceededWithResponse(request, response) {\n        if (response.clientError || response.serverError) {\n            this.delegate.formSubmissionFailedWithResponse(this, response);\n        }\n        else if (this.requestMustRedirect(request) && responseSucceededWithoutRedirect(response)) {\n            const error = new Error(\"Form responses must redirect to another location\");\n            this.delegate.formSubmissionErrored(this, error);\n        }\n        else {\n            this.state = FormSubmissionState.receiving;\n            this.result = { success: true, fetchResponse: response };\n            this.delegate.formSubmissionSucceededWithResponse(this, response);\n        }\n    }\n    requestFailedWithResponse(request, response) {\n        this.result = { success: false, fetchResponse: response };\n        this.delegate.formSubmissionFailedWithResponse(this, response);\n    }\n    requestErrored(request, error) {\n        this.result = { success: false, error };\n        this.delegate.formSubmissionErrored(this, error);\n    }\n    requestFinished(_request) {\n        var _a;\n        this.state = FormSubmissionState.stopped;\n        (_a = this.submitter) === null || _a === void 0 ? void 0 : _a.removeAttribute(\"disabled\");\n        this.resetSubmitterText();\n        dispatch(\"turbo:submit-end\", {\n            target: this.formElement,\n            detail: Object.assign({ formSubmission: this }, this.result),\n        });\n        this.delegate.formSubmissionFinished(this);\n    }\n    setSubmitsWith() {\n        if (!this.submitter || !this.submitsWith)\n            return;\n        if (this.submitter.matches(\"button\")) {\n            this.originalSubmitText = this.submitter.innerHTML;\n            this.submitter.innerHTML = this.submitsWith;\n        }\n        else if (this.submitter.matches(\"input\")) {\n            const input = this.submitter;\n            this.originalSubmitText = input.value;\n            input.value = this.submitsWith;\n        }\n    }\n    resetSubmitterText() {\n        if (!this.submitter || !this.originalSubmitText)\n            return;\n        if (this.submitter.matches(\"button\")) {\n            this.submitter.innerHTML = this.originalSubmitText;\n        }\n        else if (this.submitter.matches(\"input\")) {\n            const input = this.submitter;\n            input.value = this.originalSubmitText;\n        }\n    }\n    requestMustRedirect(request) {\n        return !request.isSafe && this.mustRedirect;\n    }\n    requestAcceptsTurboStreamResponse(request) {\n        return !request.isSafe || hasAttribute(\"data-turbo-stream\", this.submitter, this.formElement);\n    }\n    get submitsWith() {\n        var _a;\n        return (_a = this.submitter) === null || _a === void 0 ? void 0 : _a.getAttribute(\"data-turbo-submits-with\");\n    }\n}\nfunction buildFormData(formElement, submitter) {\n    const formData = new FormData(formElement);\n    const name = submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"name\");\n    const value = submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"value\");\n    if (name) {\n        formData.append(name, value || \"\");\n    }\n    return formData;\n}\nfunction getCookieValue(cookieName) {\n    if (cookieName != null) {\n        const cookies = document.cookie ? document.cookie.split(\"; \") : [];\n        const cookie = cookies.find((cookie) => cookie.startsWith(cookieName));\n        if (cookie) {\n            const value = cookie.split(\"=\").slice(1).join(\"=\");\n            return value ? decodeURIComponent(value) : undefined;\n        }\n    }\n}\nfunction responseSucceededWithoutRedirect(response) {\n    return response.statusCode == 200 && !response.redirected;\n}\nfunction mergeFormDataEntries(url, entries) {\n    const searchParams = new URLSearchParams();\n    for (const [name, value] of entries) {\n        if (value instanceof File)\n            continue;\n        searchParams.append(name, value);\n    }\n    url.search = searchParams.toString();\n    return url;\n}\n\nclass Snapshot {\n    constructor(element) {\n        this.element = element;\n    }\n    get activeElement() {\n        return this.element.ownerDocument.activeElement;\n    }\n    get children() {\n        return [...this.element.children];\n    }\n    hasAnchor(anchor) {\n        return this.getElementForAnchor(anchor) != null;\n    }\n    getElementForAnchor(anchor) {\n        return anchor ? this.element.querySelector(`[id='${anchor}'], a[name='${anchor}']`) : null;\n    }\n    get isConnected() {\n        return this.element.isConnected;\n    }\n    get firstAutofocusableElement() {\n        const inertDisabledOrHidden = \"[inert], :disabled, [hidden], details:not([open]), dialog:not([open])\";\n        for (const element of this.element.querySelectorAll(\"[autofocus]\")) {\n            if (element.closest(inertDisabledOrHidden) == null)\n                return element;\n            else\n                continue;\n        }\n        return null;\n    }\n    get permanentElements() {\n        return queryPermanentElementsAll(this.element);\n    }\n    getPermanentElementById(id) {\n        return getPermanentElementById(this.element, id);\n    }\n    getPermanentElementMapForSnapshot(snapshot) {\n        const permanentElementMap = {};\n        for (const currentPermanentElement of this.permanentElements) {\n            const { id } = currentPermanentElement;\n            const newPermanentElement = snapshot.getPermanentElementById(id);\n            if (newPermanentElement) {\n                permanentElementMap[id] = [currentPermanentElement, newPermanentElement];\n            }\n        }\n        return permanentElementMap;\n    }\n}\nfunction getPermanentElementById(node, id) {\n    return node.querySelector(`#${id}[data-turbo-permanent]`);\n}\nfunction queryPermanentElementsAll(node) {\n    return node.querySelectorAll(\"[id][data-turbo-permanent]\");\n}\n\nclass FormSubmitObserver {\n    constructor(delegate, eventTarget) {\n        this.started = false;\n        this.submitCaptured = () => {\n            this.eventTarget.removeEventListener(\"submit\", this.submitBubbled, false);\n            this.eventTarget.addEventListener(\"submit\", this.submitBubbled, false);\n        };\n        this.submitBubbled = ((event) => {\n            if (!event.defaultPrevented) {\n                const form = event.target instanceof HTMLFormElement ? event.target : undefined;\n                const submitter = event.submitter || undefined;\n                if (form &&\n                    submissionDoesNotDismissDialog(form, submitter) &&\n                    submissionDoesNotTargetIFrame(form, submitter) &&\n                    this.delegate.willSubmitForm(form, submitter)) {\n                    event.preventDefault();\n                    event.stopImmediatePropagation();\n                    this.delegate.formSubmitted(form, submitter);\n                }\n            }\n        });\n        this.delegate = delegate;\n        this.eventTarget = eventTarget;\n    }\n    start() {\n        if (!this.started) {\n            this.eventTarget.addEventListener(\"submit\", this.submitCaptured, true);\n            this.started = true;\n        }\n    }\n    stop() {\n        if (this.started) {\n            this.eventTarget.removeEventListener(\"submit\", this.submitCaptured, true);\n            this.started = false;\n        }\n    }\n}\nfunction submissionDoesNotDismissDialog(form, submitter) {\n    const method = (submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"formmethod\")) || form.getAttribute(\"method\");\n    return method != \"dialog\";\n}\nfunction submissionDoesNotTargetIFrame(form, submitter) {\n    if ((submitter === null || submitter === void 0 ? void 0 : submitter.hasAttribute(\"formtarget\")) || form.hasAttribute(\"target\")) {\n        const target = (submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"formtarget\")) || form.target;\n        for (const element of document.getElementsByName(target)) {\n            if (element instanceof HTMLIFrameElement)\n                return false;\n        }\n        return true;\n    }\n    else {\n        return true;\n    }\n}\n\nclass View {\n    constructor(delegate, element) {\n        this.resolveRenderPromise = (_value) => { };\n        this.resolveInterceptionPromise = (_value) => { };\n        this.delegate = delegate;\n        this.element = element;\n    }\n    scrollToAnchor(anchor) {\n        const element = this.snapshot.getElementForAnchor(anchor);\n        if (element) {\n            this.scrollToElement(element);\n            this.focusElement(element);\n        }\n        else {\n            this.scrollToPosition({ x: 0, y: 0 });\n        }\n    }\n    scrollToAnchorFromLocation(location) {\n        this.scrollToAnchor(getAnchor(location));\n    }\n    scrollToElement(element) {\n        element.scrollIntoView();\n    }\n    focusElement(element) {\n        if (element instanceof HTMLElement) {\n            if (element.hasAttribute(\"tabindex\")) {\n                element.focus();\n            }\n            else {\n                element.setAttribute(\"tabindex\", \"-1\");\n                element.focus();\n                element.removeAttribute(\"tabindex\");\n            }\n        }\n    }\n    scrollToPosition({ x, y }) {\n        this.scrollRoot.scrollTo(x, y);\n    }\n    scrollToTop() {\n        this.scrollToPosition({ x: 0, y: 0 });\n    }\n    get scrollRoot() {\n        return window;\n    }\n    async render(renderer) {\n        const { isPreview, shouldRender, newSnapshot: snapshot } = renderer;\n        if (shouldRender) {\n            try {\n                this.renderPromise = new Promise((resolve) => (this.resolveRenderPromise = resolve));\n                this.renderer = renderer;\n                await this.prepareToRenderSnapshot(renderer);\n                const renderInterception = new Promise((resolve) => (this.resolveInterceptionPromise = resolve));\n                const options = { resume: this.resolveInterceptionPromise, render: this.renderer.renderElement };\n                const immediateRender = this.delegate.allowsImmediateRender(snapshot, options);\n                if (!immediateRender)\n                    await renderInterception;\n                await this.renderSnapshot(renderer);\n                this.delegate.viewRenderedSnapshot(snapshot, isPreview);\n                this.delegate.preloadOnLoadLinksForView(this.element);\n                this.finishRenderingSnapshot(renderer);\n            }\n            finally {\n                delete this.renderer;\n                this.resolveRenderPromise(undefined);\n                delete this.renderPromise;\n            }\n        }\n        else {\n            this.invalidate(renderer.reloadReason);\n        }\n    }\n    invalidate(reason) {\n        this.delegate.viewInvalidated(reason);\n    }\n    async prepareToRenderSnapshot(renderer) {\n        this.markAsPreview(renderer.isPreview);\n        await renderer.prepareToRender();\n    }\n    markAsPreview(isPreview) {\n        if (isPreview) {\n            this.element.setAttribute(\"data-turbo-preview\", \"\");\n        }\n        else {\n            this.element.removeAttribute(\"data-turbo-preview\");\n        }\n    }\n    async renderSnapshot(renderer) {\n        await renderer.render();\n    }\n    finishRenderingSnapshot(renderer) {\n        renderer.finishRendering();\n    }\n}\n\nclass FrameView extends View {\n    missing() {\n        this.element.innerHTML = `<strong class=\"turbo-frame-error\">Content missing</strong>`;\n    }\n    get snapshot() {\n        return new Snapshot(this.element);\n    }\n}\n\nclass LinkInterceptor {\n    constructor(delegate, element) {\n        this.clickBubbled = (event) => {\n            if (this.respondsToEventTarget(event.target)) {\n                this.clickEvent = event;\n            }\n            else {\n                delete this.clickEvent;\n            }\n        };\n        this.linkClicked = ((event) => {\n            if (this.clickEvent && this.respondsToEventTarget(event.target) && event.target instanceof Element) {\n                if (this.delegate.shouldInterceptLinkClick(event.target, event.detail.url, event.detail.originalEvent)) {\n                    this.clickEvent.preventDefault();\n                    event.preventDefault();\n                    this.delegate.linkClickIntercepted(event.target, event.detail.url, event.detail.originalEvent);\n                }\n            }\n            delete this.clickEvent;\n        });\n        this.willVisit = ((_event) => {\n            delete this.clickEvent;\n        });\n        this.delegate = delegate;\n        this.element = element;\n    }\n    start() {\n        this.element.addEventListener(\"click\", this.clickBubbled);\n        document.addEventListener(\"turbo:click\", this.linkClicked);\n        document.addEventListener(\"turbo:before-visit\", this.willVisit);\n    }\n    stop() {\n        this.element.removeEventListener(\"click\", this.clickBubbled);\n        document.removeEventListener(\"turbo:click\", this.linkClicked);\n        document.removeEventListener(\"turbo:before-visit\", this.willVisit);\n    }\n    respondsToEventTarget(target) {\n        const element = target instanceof Element ? target : target instanceof Node ? target.parentElement : null;\n        return element && element.closest(\"turbo-frame, html\") == this.element;\n    }\n}\n\nclass LinkClickObserver {\n    constructor(delegate, eventTarget) {\n        this.started = false;\n        this.clickCaptured = () => {\n            this.eventTarget.removeEventListener(\"click\", this.clickBubbled, false);\n            this.eventTarget.addEventListener(\"click\", this.clickBubbled, false);\n        };\n        this.clickBubbled = (event) => {\n            if (event instanceof MouseEvent && this.clickEventIsSignificant(event)) {\n                const target = (event.composedPath && event.composedPath()[0]) || event.target;\n                const link = this.findLinkFromClickTarget(target);\n                if (link && doesNotTargetIFrame(link)) {\n                    const location = this.getLocationForLink(link);\n                    if (this.delegate.willFollowLinkToLocation(link, location, event)) {\n                        event.preventDefault();\n                        this.delegate.followedLinkToLocation(link, location);\n                    }\n                }\n            }\n        };\n        this.delegate = delegate;\n        this.eventTarget = eventTarget;\n    }\n    start() {\n        if (!this.started) {\n            this.eventTarget.addEventListener(\"click\", this.clickCaptured, true);\n            this.started = true;\n        }\n    }\n    stop() {\n        if (this.started) {\n            this.eventTarget.removeEventListener(\"click\", this.clickCaptured, true);\n            this.started = false;\n        }\n    }\n    clickEventIsSignificant(event) {\n        return !((event.target && event.target.isContentEditable) ||\n            event.defaultPrevented ||\n            event.which > 1 ||\n            event.altKey ||\n            event.ctrlKey ||\n            event.metaKey ||\n            event.shiftKey);\n    }\n    findLinkFromClickTarget(target) {\n        return findClosestRecursively(target, \"a[href]:not([target^=_]):not([download])\");\n    }\n    getLocationForLink(link) {\n        return expandURL(link.getAttribute(\"href\") || \"\");\n    }\n}\nfunction doesNotTargetIFrame(anchor) {\n    if (anchor.hasAttribute(\"target\")) {\n        for (const element of document.getElementsByName(anchor.target)) {\n            if (element instanceof HTMLIFrameElement)\n                return false;\n        }\n        return true;\n    }\n    else {\n        return true;\n    }\n}\n\nclass FormLinkClickObserver {\n    constructor(delegate, element) {\n        this.delegate = delegate;\n        this.linkInterceptor = new LinkClickObserver(this, element);\n    }\n    start() {\n        this.linkInterceptor.start();\n    }\n    stop() {\n        this.linkInterceptor.stop();\n    }\n    willFollowLinkToLocation(link, location, originalEvent) {\n        return (this.delegate.willSubmitFormLinkToLocation(link, location, originalEvent) &&\n            link.hasAttribute(\"data-turbo-method\"));\n    }\n    followedLinkToLocation(link, location) {\n        const form = document.createElement(\"form\");\n        const type = \"hidden\";\n        for (const [name, value] of location.searchParams) {\n            form.append(Object.assign(document.createElement(\"input\"), { type, name, value }));\n        }\n        const action = Object.assign(location, { search: \"\" });\n        form.setAttribute(\"data-turbo\", \"true\");\n        form.setAttribute(\"action\", action.href);\n        form.setAttribute(\"hidden\", \"\");\n        const method = link.getAttribute(\"data-turbo-method\");\n        if (method)\n            form.setAttribute(\"method\", method);\n        const turboFrame = link.getAttribute(\"data-turbo-frame\");\n        if (turboFrame)\n            form.setAttribute(\"data-turbo-frame\", turboFrame);\n        const turboAction = getVisitAction(link);\n        if (turboAction)\n            form.setAttribute(\"data-turbo-action\", turboAction);\n        const turboConfirm = link.getAttribute(\"data-turbo-confirm\");\n        if (turboConfirm)\n            form.setAttribute(\"data-turbo-confirm\", turboConfirm);\n        const turboStream = link.hasAttribute(\"data-turbo-stream\");\n        if (turboStream)\n            form.setAttribute(\"data-turbo-stream\", \"\");\n        this.delegate.submittedFormLinkToLocation(link, location, form);\n        document.body.appendChild(form);\n        form.addEventListener(\"turbo:submit-end\", () => form.remove(), { once: true });\n        requestAnimationFrame(() => form.requestSubmit());\n    }\n}\n\nclass Bardo {\n    static async preservingPermanentElements(delegate, permanentElementMap, callback) {\n        const bardo = new this(delegate, permanentElementMap);\n        bardo.enter();\n        await callback();\n        bardo.leave();\n    }\n    constructor(delegate, permanentElementMap) {\n        this.delegate = delegate;\n        this.permanentElementMap = permanentElementMap;\n    }\n    enter() {\n        for (const id in this.permanentElementMap) {\n            const [currentPermanentElement, newPermanentElement] = this.permanentElementMap[id];\n            this.delegate.enteringBardo(currentPermanentElement, newPermanentElement);\n            this.replaceNewPermanentElementWithPlaceholder(newPermanentElement);\n        }\n    }\n    leave() {\n        for (const id in this.permanentElementMap) {\n            const [currentPermanentElement] = this.permanentElementMap[id];\n            this.replaceCurrentPermanentElementWithClone(currentPermanentElement);\n            this.replacePlaceholderWithPermanentElement(currentPermanentElement);\n            this.delegate.leavingBardo(currentPermanentElement);\n        }\n    }\n    replaceNewPermanentElementWithPlaceholder(permanentElement) {\n        const placeholder = createPlaceholderForPermanentElement(permanentElement);\n        permanentElement.replaceWith(placeholder);\n    }\n    replaceCurrentPermanentElementWithClone(permanentElement) {\n        const clone = permanentElement.cloneNode(true);\n        permanentElement.replaceWith(clone);\n    }\n    replacePlaceholderWithPermanentElement(permanentElement) {\n        const placeholder = this.getPlaceholderById(permanentElement.id);\n        placeholder === null || placeholder === void 0 ? void 0 : placeholder.replaceWith(permanentElement);\n    }\n    getPlaceholderById(id) {\n        return this.placeholders.find((element) => element.content == id);\n    }\n    get placeholders() {\n        return [...document.querySelectorAll(\"meta[name=turbo-permanent-placeholder][content]\")];\n    }\n}\nfunction createPlaceholderForPermanentElement(permanentElement) {\n    const element = document.createElement(\"meta\");\n    element.setAttribute(\"name\", \"turbo-permanent-placeholder\");\n    element.setAttribute(\"content\", permanentElement.id);\n    return element;\n}\n\nclass Renderer {\n    constructor(currentSnapshot, newSnapshot, renderElement, isPreview, willRender = true) {\n        this.activeElement = null;\n        this.currentSnapshot = currentSnapshot;\n        this.newSnapshot = newSnapshot;\n        this.isPreview = isPreview;\n        this.willRender = willRender;\n        this.renderElement = renderElement;\n        this.promise = new Promise((resolve, reject) => (this.resolvingFunctions = { resolve, reject }));\n    }\n    get shouldRender() {\n        return true;\n    }\n    get reloadReason() {\n        return;\n    }\n    prepareToRender() {\n        return;\n    }\n    finishRendering() {\n        if (this.resolvingFunctions) {\n            this.resolvingFunctions.resolve();\n            delete this.resolvingFunctions;\n        }\n    }\n    async preservingPermanentElements(callback) {\n        await Bardo.preservingPermanentElements(this, this.permanentElementMap, callback);\n    }\n    focusFirstAutofocusableElement() {\n        const element = this.connectedSnapshot.firstAutofocusableElement;\n        if (elementIsFocusable(element)) {\n            element.focus();\n        }\n    }\n    enteringBardo(currentPermanentElement) {\n        if (this.activeElement)\n            return;\n        if (currentPermanentElement.contains(this.currentSnapshot.activeElement)) {\n            this.activeElement = this.currentSnapshot.activeElement;\n        }\n    }\n    leavingBardo(currentPermanentElement) {\n        if (currentPermanentElement.contains(this.activeElement) && this.activeElement instanceof HTMLElement) {\n            this.activeElement.focus();\n            this.activeElement = null;\n        }\n    }\n    get connectedSnapshot() {\n        return this.newSnapshot.isConnected ? this.newSnapshot : this.currentSnapshot;\n    }\n    get currentElement() {\n        return this.currentSnapshot.element;\n    }\n    get newElement() {\n        return this.newSnapshot.element;\n    }\n    get permanentElementMap() {\n        return this.currentSnapshot.getPermanentElementMapForSnapshot(this.newSnapshot);\n    }\n}\nfunction elementIsFocusable(element) {\n    return element && typeof element.focus == \"function\";\n}\n\nclass FrameRenderer extends Renderer {\n    static renderElement(currentElement, newElement) {\n        var _a;\n        const destinationRange = document.createRange();\n        destinationRange.selectNodeContents(currentElement);\n        destinationRange.deleteContents();\n        const frameElement = newElement;\n        const sourceRange = (_a = frameElement.ownerDocument) === null || _a === void 0 ? void 0 : _a.createRange();\n        if (sourceRange) {\n            sourceRange.selectNodeContents(frameElement);\n            currentElement.appendChild(sourceRange.extractContents());\n        }\n    }\n    constructor(delegate, currentSnapshot, newSnapshot, renderElement, isPreview, willRender = true) {\n        super(currentSnapshot, newSnapshot, renderElement, isPreview, willRender);\n        this.delegate = delegate;\n    }\n    get shouldRender() {\n        return true;\n    }\n    async render() {\n        await nextAnimationFrame();\n        this.preservingPermanentElements(() => {\n            this.loadFrameElement();\n        });\n        this.scrollFrameIntoView();\n        await nextAnimationFrame();\n        this.focusFirstAutofocusableElement();\n        await nextAnimationFrame();\n        this.activateScriptElements();\n    }\n    loadFrameElement() {\n        this.delegate.willRenderFrame(this.currentElement, this.newElement);\n        this.renderElement(this.currentElement, this.newElement);\n    }\n    scrollFrameIntoView() {\n        if (this.currentElement.autoscroll || this.newElement.autoscroll) {\n            const element = this.currentElement.firstElementChild;\n            const block = readScrollLogicalPosition(this.currentElement.getAttribute(\"data-autoscroll-block\"), \"end\");\n            const behavior = readScrollBehavior(this.currentElement.getAttribute(\"data-autoscroll-behavior\"), \"auto\");\n            if (element) {\n                element.scrollIntoView({ block, behavior });\n                return true;\n            }\n        }\n        return false;\n    }\n    activateScriptElements() {\n        for (const inertScriptElement of this.newScriptElements) {\n            const activatedScriptElement = activateScriptElement(inertScriptElement);\n            inertScriptElement.replaceWith(activatedScriptElement);\n        }\n    }\n    get newScriptElements() {\n        return this.currentElement.querySelectorAll(\"script\");\n    }\n}\nfunction readScrollLogicalPosition(value, defaultValue) {\n    if (value == \"end\" || value == \"start\" || value == \"center\" || value == \"nearest\") {\n        return value;\n    }\n    else {\n        return defaultValue;\n    }\n}\nfunction readScrollBehavior(value, defaultValue) {\n    if (value == \"auto\" || value == \"smooth\") {\n        return value;\n    }\n    else {\n        return defaultValue;\n    }\n}\n\nclass ProgressBar {\n    static get defaultCSS() {\n        return unindent `\n      .turbo-progress-bar {\n        position: fixed;\n        display: block;\n        top: 0;\n        left: 0;\n        height: 3px;\n        background: #0076ff;\n        z-index: 2147483647;\n        transition:\n          width ${ProgressBar.animationDuration}ms ease-out,\n          opacity ${ProgressBar.animationDuration / 2}ms ${ProgressBar.animationDuration / 2}ms ease-in;\n        transform: translate3d(0, 0, 0);\n      }\n    `;\n    }\n    constructor() {\n        this.hiding = false;\n        this.value = 0;\n        this.visible = false;\n        this.trickle = () => {\n            this.setValue(this.value + Math.random() / 100);\n        };\n        this.stylesheetElement = this.createStylesheetElement();\n        this.progressElement = this.createProgressElement();\n        this.installStylesheetElement();\n        this.setValue(0);\n    }\n    show() {\n        if (!this.visible) {\n            this.visible = true;\n            this.installProgressElement();\n            this.startTrickling();\n        }\n    }\n    hide() {\n        if (this.visible && !this.hiding) {\n            this.hiding = true;\n            this.fadeProgressElement(() => {\n                this.uninstallProgressElement();\n                this.stopTrickling();\n                this.visible = false;\n                this.hiding = false;\n            });\n        }\n    }\n    setValue(value) {\n        this.value = value;\n        this.refresh();\n    }\n    installStylesheetElement() {\n        document.head.insertBefore(this.stylesheetElement, document.head.firstChild);\n    }\n    installProgressElement() {\n        this.progressElement.style.width = \"0\";\n        this.progressElement.style.opacity = \"1\";\n        document.documentElement.insertBefore(this.progressElement, document.body);\n        this.refresh();\n    }\n    fadeProgressElement(callback) {\n        this.progressElement.style.opacity = \"0\";\n        setTimeout(callback, ProgressBar.animationDuration * 1.5);\n    }\n    uninstallProgressElement() {\n        if (this.progressElement.parentNode) {\n            document.documentElement.removeChild(this.progressElement);\n        }\n    }\n    startTrickling() {\n        if (!this.trickleInterval) {\n            this.trickleInterval = window.setInterval(this.trickle, ProgressBar.animationDuration);\n        }\n    }\n    stopTrickling() {\n        window.clearInterval(this.trickleInterval);\n        delete this.trickleInterval;\n    }\n    refresh() {\n        requestAnimationFrame(() => {\n            this.progressElement.style.width = `${10 + this.value * 90}%`;\n        });\n    }\n    createStylesheetElement() {\n        const element = document.createElement(\"style\");\n        element.type = \"text/css\";\n        element.textContent = ProgressBar.defaultCSS;\n        if (this.cspNonce) {\n            element.nonce = this.cspNonce;\n        }\n        return element;\n    }\n    createProgressElement() {\n        const element = document.createElement(\"div\");\n        element.className = \"turbo-progress-bar\";\n        return element;\n    }\n    get cspNonce() {\n        return getMetaContent(\"csp-nonce\");\n    }\n}\nProgressBar.animationDuration = 300;\n\nclass HeadSnapshot extends Snapshot {\n    constructor() {\n        super(...arguments);\n        this.detailsByOuterHTML = this.children\n            .filter((element) => !elementIsNoscript(element))\n            .map((element) => elementWithoutNonce(element))\n            .reduce((result, element) => {\n            const { outerHTML } = element;\n            const details = outerHTML in result\n                ? result[outerHTML]\n                : {\n                    type: elementType(element),\n                    tracked: elementIsTracked(element),\n                    elements: [],\n                };\n            return Object.assign(Object.assign({}, result), { [outerHTML]: Object.assign(Object.assign({}, details), { elements: [...details.elements, element] }) });\n        }, {});\n    }\n    get trackedElementSignature() {\n        return Object.keys(this.detailsByOuterHTML)\n            .filter((outerHTML) => this.detailsByOuterHTML[outerHTML].tracked)\n            .join(\"\");\n    }\n    getScriptElementsNotInSnapshot(snapshot) {\n        return this.getElementsMatchingTypeNotInSnapshot(\"script\", snapshot);\n    }\n    getStylesheetElementsNotInSnapshot(snapshot) {\n        return this.getElementsMatchingTypeNotInSnapshot(\"stylesheet\", snapshot);\n    }\n    getElementsMatchingTypeNotInSnapshot(matchedType, snapshot) {\n        return Object.keys(this.detailsByOuterHTML)\n            .filter((outerHTML) => !(outerHTML in snapshot.detailsByOuterHTML))\n            .map((outerHTML) => this.detailsByOuterHTML[outerHTML])\n            .filter(({ type }) => type == matchedType)\n            .map(({ elements: [element] }) => element);\n    }\n    get provisionalElements() {\n        return Object.keys(this.detailsByOuterHTML).reduce((result, outerHTML) => {\n            const { type, tracked, elements } = this.detailsByOuterHTML[outerHTML];\n            if (type == null && !tracked) {\n                return [...result, ...elements];\n            }\n            else if (elements.length > 1) {\n                return [...result, ...elements.slice(1)];\n            }\n            else {\n                return result;\n            }\n        }, []);\n    }\n    getMetaValue(name) {\n        const element = this.findMetaElementByName(name);\n        return element ? element.getAttribute(\"content\") : null;\n    }\n    findMetaElementByName(name) {\n        return Object.keys(this.detailsByOuterHTML).reduce((result, outerHTML) => {\n            const { elements: [element], } = this.detailsByOuterHTML[outerHTML];\n            return elementIsMetaElementWithName(element, name) ? element : result;\n        }, undefined);\n    }\n}\nfunction elementType(element) {\n    if (elementIsScript(element)) {\n        return \"script\";\n    }\n    else if (elementIsStylesheet(element)) {\n        return \"stylesheet\";\n    }\n}\nfunction elementIsTracked(element) {\n    return element.getAttribute(\"data-turbo-track\") == \"reload\";\n}\nfunction elementIsScript(element) {\n    const tagName = element.localName;\n    return tagName == \"script\";\n}\nfunction elementIsNoscript(element) {\n    const tagName = element.localName;\n    return tagName == \"noscript\";\n}\nfunction elementIsStylesheet(element) {\n    const tagName = element.localName;\n    return tagName == \"style\" || (tagName == \"link\" && element.getAttribute(\"rel\") == \"stylesheet\");\n}\nfunction elementIsMetaElementWithName(element, name) {\n    const tagName = element.localName;\n    return tagName == \"meta\" && element.getAttribute(\"name\") == name;\n}\nfunction elementWithoutNonce(element) {\n    if (element.hasAttribute(\"nonce\")) {\n        element.setAttribute(\"nonce\", \"\");\n    }\n    return element;\n}\n\nclass PageSnapshot extends Snapshot {\n    static fromHTMLString(html = \"\") {\n        return this.fromDocument(parseHTMLDocument(html));\n    }\n    static fromElement(element) {\n        return this.fromDocument(element.ownerDocument);\n    }\n    static fromDocument({ head, body }) {\n        return new this(body, new HeadSnapshot(head));\n    }\n    constructor(element, headSnapshot) {\n        super(element);\n        this.headSnapshot = headSnapshot;\n    }\n    clone() {\n        const clonedElement = this.element.cloneNode(true);\n        const selectElements = this.element.querySelectorAll(\"select\");\n        const clonedSelectElements = clonedElement.querySelectorAll(\"select\");\n        for (const [index, source] of selectElements.entries()) {\n            const clone = clonedSelectElements[index];\n            for (const option of clone.selectedOptions)\n                option.selected = false;\n            for (const option of source.selectedOptions)\n                clone.options[option.index].selected = true;\n        }\n        for (const clonedPasswordInput of clonedElement.querySelectorAll('input[type=\"password\"]')) {\n            clonedPasswordInput.value = \"\";\n        }\n        return new PageSnapshot(clonedElement, this.headSnapshot);\n    }\n    get headElement() {\n        return this.headSnapshot.element;\n    }\n    get rootLocation() {\n        var _a;\n        const root = (_a = this.getSetting(\"root\")) !== null && _a !== void 0 ? _a : \"/\";\n        return expandURL(root);\n    }\n    get cacheControlValue() {\n        return this.getSetting(\"cache-control\");\n    }\n    get isPreviewable() {\n        return this.cacheControlValue != \"no-preview\";\n    }\n    get isCacheable() {\n        return this.cacheControlValue != \"no-cache\";\n    }\n    get isVisitable() {\n        return this.getSetting(\"visit-control\") != \"reload\";\n    }\n    getSetting(name) {\n        return this.headSnapshot.getMetaValue(`turbo-${name}`);\n    }\n}\n\nvar TimingMetric;\n(function (TimingMetric) {\n    TimingMetric[\"visitStart\"] = \"visitStart\";\n    TimingMetric[\"requestStart\"] = \"requestStart\";\n    TimingMetric[\"requestEnd\"] = \"requestEnd\";\n    TimingMetric[\"visitEnd\"] = \"visitEnd\";\n})(TimingMetric || (TimingMetric = {}));\nvar VisitState;\n(function (VisitState) {\n    VisitState[\"initialized\"] = \"initialized\";\n    VisitState[\"started\"] = \"started\";\n    VisitState[\"canceled\"] = \"canceled\";\n    VisitState[\"failed\"] = \"failed\";\n    VisitState[\"completed\"] = \"completed\";\n})(VisitState || (VisitState = {}));\nconst defaultOptions = {\n    action: \"advance\",\n    historyChanged: false,\n    visitCachedSnapshot: () => { },\n    willRender: true,\n    updateHistory: true,\n    shouldCacheSnapshot: true,\n    acceptsStreamResponse: false,\n};\nvar SystemStatusCode;\n(function (SystemStatusCode) {\n    SystemStatusCode[SystemStatusCode[\"networkFailure\"] = 0] = \"networkFailure\";\n    SystemStatusCode[SystemStatusCode[\"timeoutFailure\"] = -1] = \"timeoutFailure\";\n    SystemStatusCode[SystemStatusCode[\"contentTypeMismatch\"] = -2] = \"contentTypeMismatch\";\n})(SystemStatusCode || (SystemStatusCode = {}));\nclass Visit {\n    constructor(delegate, location, restorationIdentifier, options = {}) {\n        this.identifier = uuid();\n        this.timingMetrics = {};\n        this.followedRedirect = false;\n        this.historyChanged = false;\n        this.scrolled = false;\n        this.shouldCacheSnapshot = true;\n        this.acceptsStreamResponse = false;\n        this.snapshotCached = false;\n        this.state = VisitState.initialized;\n        this.delegate = delegate;\n        this.location = location;\n        this.restorationIdentifier = restorationIdentifier || uuid();\n        const { action, historyChanged, referrer, snapshot, snapshotHTML, response, visitCachedSnapshot, willRender, updateHistory, shouldCacheSnapshot, acceptsStreamResponse, } = Object.assign(Object.assign({}, defaultOptions), options);\n        this.action = action;\n        this.historyChanged = historyChanged;\n        this.referrer = referrer;\n        this.snapshot = snapshot;\n        this.snapshotHTML = snapshotHTML;\n        this.response = response;\n        this.isSamePage = this.delegate.locationWithActionIsSamePage(this.location, this.action);\n        this.visitCachedSnapshot = visitCachedSnapshot;\n        this.willRender = willRender;\n        this.updateHistory = updateHistory;\n        this.scrolled = !willRender;\n        this.shouldCacheSnapshot = shouldCacheSnapshot;\n        this.acceptsStreamResponse = acceptsStreamResponse;\n    }\n    get adapter() {\n        return this.delegate.adapter;\n    }\n    get view() {\n        return this.delegate.view;\n    }\n    get history() {\n        return this.delegate.history;\n    }\n    get restorationData() {\n        return this.history.getRestorationDataForIdentifier(this.restorationIdentifier);\n    }\n    get silent() {\n        return this.isSamePage;\n    }\n    start() {\n        if (this.state == VisitState.initialized) {\n            this.recordTimingMetric(TimingMetric.visitStart);\n            this.state = VisitState.started;\n            this.adapter.visitStarted(this);\n            this.delegate.visitStarted(this);\n        }\n    }\n    cancel() {\n        if (this.state == VisitState.started) {\n            if (this.request) {\n                this.request.cancel();\n            }\n            this.cancelRender();\n            this.state = VisitState.canceled;\n        }\n    }\n    complete() {\n        if (this.state == VisitState.started) {\n            this.recordTimingMetric(TimingMetric.visitEnd);\n            this.state = VisitState.completed;\n            this.followRedirect();\n            if (!this.followedRedirect) {\n                this.adapter.visitCompleted(this);\n                this.delegate.visitCompleted(this);\n            }\n        }\n    }\n    fail() {\n        if (this.state == VisitState.started) {\n            this.state = VisitState.failed;\n            this.adapter.visitFailed(this);\n        }\n    }\n    changeHistory() {\n        var _a;\n        if (!this.historyChanged && this.updateHistory) {\n            const actionForHistory = this.location.href === ((_a = this.referrer) === null || _a === void 0 ? void 0 : _a.href) ? \"replace\" : this.action;\n            const method = getHistoryMethodForAction(actionForHistory);\n            this.history.update(method, this.location, this.restorationIdentifier);\n            this.historyChanged = true;\n        }\n    }\n    issueRequest() {\n        if (this.hasPreloadedResponse()) {\n            this.simulateRequest();\n        }\n        else if (this.shouldIssueRequest() && !this.request) {\n            this.request = new FetchRequest(this, FetchMethod.get, this.location);\n            this.request.perform();\n        }\n    }\n    simulateRequest() {\n        if (this.response) {\n            this.startRequest();\n            this.recordResponse();\n            this.finishRequest();\n        }\n    }\n    startRequest() {\n        this.recordTimingMetric(TimingMetric.requestStart);\n        this.adapter.visitRequestStarted(this);\n    }\n    recordResponse(response = this.response) {\n        this.response = response;\n        if (response) {\n            const { statusCode } = response;\n            if (isSuccessful(statusCode)) {\n                this.adapter.visitRequestCompleted(this);\n            }\n            else {\n                this.adapter.visitRequestFailedWithStatusCode(this, statusCode);\n            }\n        }\n    }\n    finishRequest() {\n        this.recordTimingMetric(TimingMetric.requestEnd);\n        this.adapter.visitRequestFinished(this);\n    }\n    loadResponse() {\n        if (this.response) {\n            const { statusCode, responseHTML } = this.response;\n            this.render(async () => {\n                if (this.shouldCacheSnapshot)\n                    this.cacheSnapshot();\n                if (this.view.renderPromise)\n                    await this.view.renderPromise;\n                if (isSuccessful(statusCode) && responseHTML != null) {\n                    await this.view.renderPage(PageSnapshot.fromHTMLString(responseHTML), false, this.willRender, this);\n                    this.performScroll();\n                    this.adapter.visitRendered(this);\n                    this.complete();\n                }\n                else {\n                    await this.view.renderError(PageSnapshot.fromHTMLString(responseHTML), this);\n                    this.adapter.visitRendered(this);\n                    this.fail();\n                }\n            });\n        }\n    }\n    getCachedSnapshot() {\n        const snapshot = this.view.getCachedSnapshotForLocation(this.location) || this.getPreloadedSnapshot();\n        if (snapshot && (!getAnchor(this.location) || snapshot.hasAnchor(getAnchor(this.location)))) {\n            if (this.action == \"restore\" || snapshot.isPreviewable) {\n                return snapshot;\n            }\n        }\n    }\n    getPreloadedSnapshot() {\n        if (this.snapshotHTML) {\n            return PageSnapshot.fromHTMLString(this.snapshotHTML);\n        }\n    }\n    hasCachedSnapshot() {\n        return this.getCachedSnapshot() != null;\n    }\n    loadCachedSnapshot() {\n        const snapshot = this.getCachedSnapshot();\n        if (snapshot) {\n            const isPreview = this.shouldIssueRequest();\n            this.render(async () => {\n                this.cacheSnapshot();\n                if (this.isSamePage) {\n                    this.adapter.visitRendered(this);\n                }\n                else {\n                    if (this.view.renderPromise)\n                        await this.view.renderPromise;\n                    await this.view.renderPage(snapshot, isPreview, this.willRender, this);\n                    this.performScroll();\n                    this.adapter.visitRendered(this);\n                    if (!isPreview) {\n                        this.complete();\n                    }\n                }\n            });\n        }\n    }\n    followRedirect() {\n        var _a;\n        if (this.redirectedToLocation && !this.followedRedirect && ((_a = this.response) === null || _a === void 0 ? void 0 : _a.redirected)) {\n            this.adapter.visitProposedToLocation(this.redirectedToLocation, {\n                action: \"replace\",\n                response: this.response,\n                shouldCacheSnapshot: false,\n                willRender: false,\n            });\n            this.followedRedirect = true;\n        }\n    }\n    goToSamePageAnchor() {\n        if (this.isSamePage) {\n            this.render(async () => {\n                this.cacheSnapshot();\n                this.performScroll();\n                this.changeHistory();\n                this.adapter.visitRendered(this);\n            });\n        }\n    }\n    prepareRequest(request) {\n        if (this.acceptsStreamResponse) {\n            request.acceptResponseType(StreamMessage.contentType);\n        }\n    }\n    requestStarted() {\n        this.startRequest();\n    }\n    requestPreventedHandlingResponse(_request, _response) { }\n    async requestSucceededWithResponse(request, response) {\n        const responseHTML = await response.responseHTML;\n        const { redirected, statusCode } = response;\n        if (responseHTML == undefined) {\n            this.recordResponse({\n                statusCode: SystemStatusCode.contentTypeMismatch,\n                redirected,\n            });\n        }\n        else {\n            this.redirectedToLocation = response.redirected ? response.location : undefined;\n            this.recordResponse({ statusCode: statusCode, responseHTML, redirected });\n        }\n    }\n    async requestFailedWithResponse(request, response) {\n        const responseHTML = await response.responseHTML;\n        const { redirected, statusCode } = response;\n        if (responseHTML == undefined) {\n            this.recordResponse({\n                statusCode: SystemStatusCode.contentTypeMismatch,\n                redirected,\n            });\n        }\n        else {\n            this.recordResponse({ statusCode: statusCode, responseHTML, redirected });\n        }\n    }\n    requestErrored(_request, _error) {\n        this.recordResponse({\n            statusCode: SystemStatusCode.networkFailure,\n            redirected: false,\n        });\n    }\n    requestFinished() {\n        this.finishRequest();\n    }\n    performScroll() {\n        if (!this.scrolled && !this.view.forceReloaded) {\n            if (this.action == \"restore\") {\n                this.scrollToRestoredPosition() || this.scrollToAnchor() || this.view.scrollToTop();\n            }\n            else {\n                this.scrollToAnchor() || this.view.scrollToTop();\n            }\n            if (this.isSamePage) {\n                this.delegate.visitScrolledToSamePageLocation(this.view.lastRenderedLocation, this.location);\n            }\n            this.scrolled = true;\n        }\n    }\n    scrollToRestoredPosition() {\n        const { scrollPosition } = this.restorationData;\n        if (scrollPosition) {\n            this.view.scrollToPosition(scrollPosition);\n            return true;\n        }\n    }\n    scrollToAnchor() {\n        const anchor = getAnchor(this.location);\n        if (anchor != null) {\n            this.view.scrollToAnchor(anchor);\n            return true;\n        }\n    }\n    recordTimingMetric(metric) {\n        this.timingMetrics[metric] = new Date().getTime();\n    }\n    getTimingMetrics() {\n        return Object.assign({}, this.timingMetrics);\n    }\n    getHistoryMethodForAction(action) {\n        switch (action) {\n            case \"replace\":\n                return history.replaceState;\n            case \"advance\":\n            case \"restore\":\n                return history.pushState;\n        }\n    }\n    hasPreloadedResponse() {\n        return typeof this.response == \"object\";\n    }\n    shouldIssueRequest() {\n        if (this.isSamePage) {\n            return false;\n        }\n        else if (this.action == \"restore\") {\n            return !this.hasCachedSnapshot();\n        }\n        else {\n            return this.willRender;\n        }\n    }\n    cacheSnapshot() {\n        if (!this.snapshotCached) {\n            this.view.cacheSnapshot(this.snapshot).then((snapshot) => snapshot && this.visitCachedSnapshot(snapshot));\n            this.snapshotCached = true;\n        }\n    }\n    async render(callback) {\n        this.cancelRender();\n        await new Promise((resolve) => {\n            this.frame = requestAnimationFrame(() => resolve());\n        });\n        await callback();\n        delete this.frame;\n    }\n    cancelRender() {\n        if (this.frame) {\n            cancelAnimationFrame(this.frame);\n            delete this.frame;\n        }\n    }\n}\nfunction isSuccessful(statusCode) {\n    return statusCode >= 200 && statusCode < 300;\n}\n\nclass BrowserAdapter {\n    constructor(session) {\n        this.progressBar = new ProgressBar();\n        this.showProgressBar = () => {\n            this.progressBar.show();\n        };\n        this.session = session;\n    }\n    visitProposedToLocation(location, options) {\n        this.navigator.startVisit(location, (options === null || options === void 0 ? void 0 : options.restorationIdentifier) || uuid(), options);\n    }\n    visitStarted(visit) {\n        this.location = visit.location;\n        visit.loadCachedSnapshot();\n        visit.issueRequest();\n        visit.goToSamePageAnchor();\n    }\n    visitRequestStarted(visit) {\n        this.progressBar.setValue(0);\n        if (visit.hasCachedSnapshot() || visit.action != \"restore\") {\n            this.showVisitProgressBarAfterDelay();\n        }\n        else {\n            this.showProgressBar();\n        }\n    }\n    visitRequestCompleted(visit) {\n        visit.loadResponse();\n    }\n    visitRequestFailedWithStatusCode(visit, statusCode) {\n        switch (statusCode) {\n            case SystemStatusCode.networkFailure:\n            case SystemStatusCode.timeoutFailure:\n            case SystemStatusCode.contentTypeMismatch:\n                return this.reload({\n                    reason: \"request_failed\",\n                    context: {\n                        statusCode,\n                    },\n                });\n            default:\n                return visit.loadResponse();\n        }\n    }\n    visitRequestFinished(_visit) {\n        this.progressBar.setValue(1);\n        this.hideVisitProgressBar();\n    }\n    visitCompleted(_visit) { }\n    pageInvalidated(reason) {\n        this.reload(reason);\n    }\n    visitFailed(_visit) { }\n    visitRendered(_visit) { }\n    formSubmissionStarted(_formSubmission) {\n        this.progressBar.setValue(0);\n        this.showFormProgressBarAfterDelay();\n    }\n    formSubmissionFinished(_formSubmission) {\n        this.progressBar.setValue(1);\n        this.hideFormProgressBar();\n    }\n    showVisitProgressBarAfterDelay() {\n        this.visitProgressBarTimeout = window.setTimeout(this.showProgressBar, this.session.progressBarDelay);\n    }\n    hideVisitProgressBar() {\n        this.progressBar.hide();\n        if (this.visitProgressBarTimeout != null) {\n            window.clearTimeout(this.visitProgressBarTimeout);\n            delete this.visitProgressBarTimeout;\n        }\n    }\n    showFormProgressBarAfterDelay() {\n        if (this.formProgressBarTimeout == null) {\n            this.formProgressBarTimeout = window.setTimeout(this.showProgressBar, this.session.progressBarDelay);\n        }\n    }\n    hideFormProgressBar() {\n        this.progressBar.hide();\n        if (this.formProgressBarTimeout != null) {\n            window.clearTimeout(this.formProgressBarTimeout);\n            delete this.formProgressBarTimeout;\n        }\n    }\n    reload(reason) {\n        var _a;\n        dispatch(\"turbo:reload\", { detail: reason });\n        window.location.href = ((_a = this.location) === null || _a === void 0 ? void 0 : _a.toString()) || window.location.href;\n    }\n    get navigator() {\n        return this.session.navigator;\n    }\n}\n\nclass CacheObserver {\n    constructor() {\n        this.selector = \"[data-turbo-temporary]\";\n        this.deprecatedSelector = \"[data-turbo-cache=false]\";\n        this.started = false;\n        this.removeTemporaryElements = ((_event) => {\n            for (const element of this.temporaryElements) {\n                element.remove();\n            }\n        });\n    }\n    start() {\n        if (!this.started) {\n            this.started = true;\n            addEventListener(\"turbo:before-cache\", this.removeTemporaryElements, false);\n        }\n    }\n    stop() {\n        if (this.started) {\n            this.started = false;\n            removeEventListener(\"turbo:before-cache\", this.removeTemporaryElements, false);\n        }\n    }\n    get temporaryElements() {\n        return [...document.querySelectorAll(this.selector), ...this.temporaryElementsWithDeprecation];\n    }\n    get temporaryElementsWithDeprecation() {\n        const elements = document.querySelectorAll(this.deprecatedSelector);\n        if (elements.length) {\n            console.warn(`The ${this.deprecatedSelector} selector is deprecated and will be removed in a future version. Use ${this.selector} instead.`);\n        }\n        return [...elements];\n    }\n}\n\nclass FrameRedirector {\n    constructor(session, element) {\n        this.session = session;\n        this.element = element;\n        this.linkInterceptor = new LinkInterceptor(this, element);\n        this.formSubmitObserver = new FormSubmitObserver(this, element);\n    }\n    start() {\n        this.linkInterceptor.start();\n        this.formSubmitObserver.start();\n    }\n    stop() {\n        this.linkInterceptor.stop();\n        this.formSubmitObserver.stop();\n    }\n    shouldInterceptLinkClick(element, _location, _event) {\n        return this.shouldRedirect(element);\n    }\n    linkClickIntercepted(element, url, event) {\n        const frame = this.findFrameElement(element);\n        if (frame) {\n            frame.delegate.linkClickIntercepted(element, url, event);\n        }\n    }\n    willSubmitForm(element, submitter) {\n        return (element.closest(\"turbo-frame\") == null &&\n            this.shouldSubmit(element, submitter) &&\n            this.shouldRedirect(element, submitter));\n    }\n    formSubmitted(element, submitter) {\n        const frame = this.findFrameElement(element, submitter);\n        if (frame) {\n            frame.delegate.formSubmitted(element, submitter);\n        }\n    }\n    shouldSubmit(form, submitter) {\n        var _a;\n        const action = getAction(form, submitter);\n        const meta = this.element.ownerDocument.querySelector(`meta[name=\"turbo-root\"]`);\n        const rootLocation = expandURL((_a = meta === null || meta === void 0 ? void 0 : meta.content) !== null && _a !== void 0 ? _a : \"/\");\n        return this.shouldRedirect(form, submitter) && locationIsVisitable(action, rootLocation);\n    }\n    shouldRedirect(element, submitter) {\n        const isNavigatable = element instanceof HTMLFormElement\n            ? this.session.submissionIsNavigatable(element, submitter)\n            : this.session.elementIsNavigatable(element);\n        if (isNavigatable) {\n            const frame = this.findFrameElement(element, submitter);\n            return frame ? frame != element.closest(\"turbo-frame\") : false;\n        }\n        else {\n            return false;\n        }\n    }\n    findFrameElement(element, submitter) {\n        const id = (submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"data-turbo-frame\")) || element.getAttribute(\"data-turbo-frame\");\n        if (id && id != \"_top\") {\n            const frame = this.element.querySelector(`#${id}:not([disabled])`);\n            if (frame instanceof FrameElement) {\n                return frame;\n            }\n        }\n    }\n}\n\nclass History {\n    constructor(delegate) {\n        this.restorationIdentifier = uuid();\n        this.restorationData = {};\n        this.started = false;\n        this.pageLoaded = false;\n        this.onPopState = (event) => {\n            if (this.shouldHandlePopState()) {\n                const { turbo } = event.state || {};\n                if (turbo) {\n                    this.location = new URL(window.location.href);\n                    const { restorationIdentifier } = turbo;\n                    this.restorationIdentifier = restorationIdentifier;\n                    this.delegate.historyPoppedToLocationWithRestorationIdentifier(this.location, restorationIdentifier);\n                }\n            }\n        };\n        this.onPageLoad = async (_event) => {\n            await nextMicrotask();\n            this.pageLoaded = true;\n        };\n        this.delegate = delegate;\n    }\n    start() {\n        if (!this.started) {\n            addEventListener(\"popstate\", this.onPopState, false);\n            addEventListener(\"load\", this.onPageLoad, false);\n            this.started = true;\n            this.replace(new URL(window.location.href));\n        }\n    }\n    stop() {\n        if (this.started) {\n            removeEventListener(\"popstate\", this.onPopState, false);\n            removeEventListener(\"load\", this.onPageLoad, false);\n            this.started = false;\n        }\n    }\n    push(location, restorationIdentifier) {\n        this.update(history.pushState, location, restorationIdentifier);\n    }\n    replace(location, restorationIdentifier) {\n        this.update(history.replaceState, location, restorationIdentifier);\n    }\n    update(method, location, restorationIdentifier = uuid()) {\n        const state = { turbo: { restorationIdentifier } };\n        method.call(history, state, \"\", location.href);\n        this.location = location;\n        this.restorationIdentifier = restorationIdentifier;\n    }\n    getRestorationDataForIdentifier(restorationIdentifier) {\n        return this.restorationData[restorationIdentifier] || {};\n    }\n    updateRestorationData(additionalData) {\n        const { restorationIdentifier } = this;\n        const restorationData = this.restorationData[restorationIdentifier];\n        this.restorationData[restorationIdentifier] = Object.assign(Object.assign({}, restorationData), additionalData);\n    }\n    assumeControlOfScrollRestoration() {\n        var _a;\n        if (!this.previousScrollRestoration) {\n            this.previousScrollRestoration = (_a = history.scrollRestoration) !== null && _a !== void 0 ? _a : \"auto\";\n            history.scrollRestoration = \"manual\";\n        }\n    }\n    relinquishControlOfScrollRestoration() {\n        if (this.previousScrollRestoration) {\n            history.scrollRestoration = this.previousScrollRestoration;\n            delete this.previousScrollRestoration;\n        }\n    }\n    shouldHandlePopState() {\n        return this.pageIsLoaded();\n    }\n    pageIsLoaded() {\n        return this.pageLoaded || document.readyState == \"complete\";\n    }\n}\n\nclass Navigator {\n    constructor(delegate) {\n        this.delegate = delegate;\n    }\n    proposeVisit(location, options = {}) {\n        if (this.delegate.allowsVisitingLocationWithAction(location, options.action)) {\n            if (locationIsVisitable(location, this.view.snapshot.rootLocation)) {\n                this.delegate.visitProposedToLocation(location, options);\n            }\n            else {\n                window.location.href = location.toString();\n            }\n        }\n    }\n    startVisit(locatable, restorationIdentifier, options = {}) {\n        this.stop();\n        this.currentVisit = new Visit(this, expandURL(locatable), restorationIdentifier, Object.assign({ referrer: this.location }, options));\n        this.currentVisit.start();\n    }\n    submitForm(form, submitter) {\n        this.stop();\n        this.formSubmission = new FormSubmission(this, form, submitter, true);\n        this.formSubmission.start();\n    }\n    stop() {\n        if (this.formSubmission) {\n            this.formSubmission.stop();\n            delete this.formSubmission;\n        }\n        if (this.currentVisit) {\n            this.currentVisit.cancel();\n            delete this.currentVisit;\n        }\n    }\n    get adapter() {\n        return this.delegate.adapter;\n    }\n    get view() {\n        return this.delegate.view;\n    }\n    get history() {\n        return this.delegate.history;\n    }\n    formSubmissionStarted(formSubmission) {\n        if (typeof this.adapter.formSubmissionStarted === \"function\") {\n            this.adapter.formSubmissionStarted(formSubmission);\n        }\n    }\n    async formSubmissionSucceededWithResponse(formSubmission, fetchResponse) {\n        if (formSubmission == this.formSubmission) {\n            const responseHTML = await fetchResponse.responseHTML;\n            if (responseHTML) {\n                const shouldCacheSnapshot = formSubmission.isSafe;\n                if (!shouldCacheSnapshot) {\n                    this.view.clearSnapshotCache();\n                }\n                const { statusCode, redirected } = fetchResponse;\n                const action = this.getActionForFormSubmission(formSubmission);\n                const visitOptions = {\n                    action,\n                    shouldCacheSnapshot,\n                    response: { statusCode, responseHTML, redirected },\n                };\n                this.proposeVisit(fetchResponse.location, visitOptions);\n            }\n        }\n    }\n    async formSubmissionFailedWithResponse(formSubmission, fetchResponse) {\n        const responseHTML = await fetchResponse.responseHTML;\n        if (responseHTML) {\n            const snapshot = PageSnapshot.fromHTMLString(responseHTML);\n            if (fetchResponse.serverError) {\n                await this.view.renderError(snapshot, this.currentVisit);\n            }\n            else {\n                await this.view.renderPage(snapshot, false, true, this.currentVisit);\n            }\n            this.view.scrollToTop();\n            this.view.clearSnapshotCache();\n        }\n    }\n    formSubmissionErrored(formSubmission, error) {\n        console.error(error);\n    }\n    formSubmissionFinished(formSubmission) {\n        if (typeof this.adapter.formSubmissionFinished === \"function\") {\n            this.adapter.formSubmissionFinished(formSubmission);\n        }\n    }\n    visitStarted(visit) {\n        this.delegate.visitStarted(visit);\n    }\n    visitCompleted(visit) {\n        this.delegate.visitCompleted(visit);\n    }\n    locationWithActionIsSamePage(location, action) {\n        const anchor = getAnchor(location);\n        const currentAnchor = getAnchor(this.view.lastRenderedLocation);\n        const isRestorationToTop = action === \"restore\" && typeof anchor === \"undefined\";\n        return (action !== \"replace\" &&\n            getRequestURL(location) === getRequestURL(this.view.lastRenderedLocation) &&\n            (isRestorationToTop || (anchor != null && anchor !== currentAnchor)));\n    }\n    visitScrolledToSamePageLocation(oldURL, newURL) {\n        this.delegate.visitScrolledToSamePageLocation(oldURL, newURL);\n    }\n    get location() {\n        return this.history.location;\n    }\n    get restorationIdentifier() {\n        return this.history.restorationIdentifier;\n    }\n    getActionForFormSubmission({ submitter, formElement }) {\n        return getVisitAction(submitter, formElement) || \"advance\";\n    }\n}\n\nvar PageStage;\n(function (PageStage) {\n    PageStage[PageStage[\"initial\"] = 0] = \"initial\";\n    PageStage[PageStage[\"loading\"] = 1] = \"loading\";\n    PageStage[PageStage[\"interactive\"] = 2] = \"interactive\";\n    PageStage[PageStage[\"complete\"] = 3] = \"complete\";\n})(PageStage || (PageStage = {}));\nclass PageObserver {\n    constructor(delegate) {\n        this.stage = PageStage.initial;\n        this.started = false;\n        this.interpretReadyState = () => {\n            const { readyState } = this;\n            if (readyState == \"interactive\") {\n                this.pageIsInteractive();\n            }\n            else if (readyState == \"complete\") {\n                this.pageIsComplete();\n            }\n        };\n        this.pageWillUnload = () => {\n            this.delegate.pageWillUnload();\n        };\n        this.delegate = delegate;\n    }\n    start() {\n        if (!this.started) {\n            if (this.stage == PageStage.initial) {\n                this.stage = PageStage.loading;\n            }\n            document.addEventListener(\"readystatechange\", this.interpretReadyState, false);\n            addEventListener(\"pagehide\", this.pageWillUnload, false);\n            this.started = true;\n        }\n    }\n    stop() {\n        if (this.started) {\n            document.removeEventListener(\"readystatechange\", this.interpretReadyState, false);\n            removeEventListener(\"pagehide\", this.pageWillUnload, false);\n            this.started = false;\n        }\n    }\n    pageIsInteractive() {\n        if (this.stage == PageStage.loading) {\n            this.stage = PageStage.interactive;\n            this.delegate.pageBecameInteractive();\n        }\n    }\n    pageIsComplete() {\n        this.pageIsInteractive();\n        if (this.stage == PageStage.interactive) {\n            this.stage = PageStage.complete;\n            this.delegate.pageLoaded();\n        }\n    }\n    get readyState() {\n        return document.readyState;\n    }\n}\n\nclass ScrollObserver {\n    constructor(delegate) {\n        this.started = false;\n        this.onScroll = () => {\n            this.updatePosition({ x: window.pageXOffset, y: window.pageYOffset });\n        };\n        this.delegate = delegate;\n    }\n    start() {\n        if (!this.started) {\n            addEventListener(\"scroll\", this.onScroll, false);\n            this.onScroll();\n            this.started = true;\n        }\n    }\n    stop() {\n        if (this.started) {\n            removeEventListener(\"scroll\", this.onScroll, false);\n            this.started = false;\n        }\n    }\n    updatePosition(position) {\n        this.delegate.scrollPositionChanged(position);\n    }\n}\n\nclass StreamMessageRenderer {\n    render({ fragment }) {\n        Bardo.preservingPermanentElements(this, getPermanentElementMapForFragment(fragment), () => document.documentElement.appendChild(fragment));\n    }\n    enteringBardo(currentPermanentElement, newPermanentElement) {\n        newPermanentElement.replaceWith(currentPermanentElement.cloneNode(true));\n    }\n    leavingBardo() { }\n}\nfunction getPermanentElementMapForFragment(fragment) {\n    const permanentElementsInDocument = queryPermanentElementsAll(document.documentElement);\n    const permanentElementMap = {};\n    for (const permanentElementInDocument of permanentElementsInDocument) {\n        const { id } = permanentElementInDocument;\n        for (const streamElement of fragment.querySelectorAll(\"turbo-stream\")) {\n            const elementInStream = getPermanentElementById(streamElement.templateElement.content, id);\n            if (elementInStream) {\n                permanentElementMap[id] = [permanentElementInDocument, elementInStream];\n            }\n        }\n    }\n    return permanentElementMap;\n}\n\nclass StreamObserver {\n    constructor(delegate) {\n        this.sources = new Set();\n        this.started = false;\n        this.inspectFetchResponse = ((event) => {\n            const response = fetchResponseFromEvent(event);\n            if (response && fetchResponseIsStream(response)) {\n                event.preventDefault();\n                this.receiveMessageResponse(response);\n            }\n        });\n        this.receiveMessageEvent = (event) => {\n            if (this.started && typeof event.data == \"string\") {\n                this.receiveMessageHTML(event.data);\n            }\n        };\n        this.delegate = delegate;\n    }\n    start() {\n        if (!this.started) {\n            this.started = true;\n            addEventListener(\"turbo:before-fetch-response\", this.inspectFetchResponse, false);\n        }\n    }\n    stop() {\n        if (this.started) {\n            this.started = false;\n            removeEventListener(\"turbo:before-fetch-response\", this.inspectFetchResponse, false);\n        }\n    }\n    connectStreamSource(source) {\n        if (!this.streamSourceIsConnected(source)) {\n            this.sources.add(source);\n            source.addEventListener(\"message\", this.receiveMessageEvent, false);\n        }\n    }\n    disconnectStreamSource(source) {\n        if (this.streamSourceIsConnected(source)) {\n            this.sources.delete(source);\n            source.removeEventListener(\"message\", this.receiveMessageEvent, false);\n        }\n    }\n    streamSourceIsConnected(source) {\n        return this.sources.has(source);\n    }\n    async receiveMessageResponse(response) {\n        const html = await response.responseHTML;\n        if (html) {\n            this.receiveMessageHTML(html);\n        }\n    }\n    receiveMessageHTML(html) {\n        this.delegate.receivedMessageFromStream(StreamMessage.wrap(html));\n    }\n}\nfunction fetchResponseFromEvent(event) {\n    var _a;\n    const fetchResponse = (_a = event.detail) === null || _a === void 0 ? void 0 : _a.fetchResponse;\n    if (fetchResponse instanceof FetchResponse) {\n        return fetchResponse;\n    }\n}\nfunction fetchResponseIsStream(response) {\n    var _a;\n    const contentType = (_a = response.contentType) !== null && _a !== void 0 ? _a : \"\";\n    return contentType.startsWith(StreamMessage.contentType);\n}\n\nclass ErrorRenderer extends Renderer {\n    static renderElement(currentElement, newElement) {\n        const { documentElement, body } = document;\n        documentElement.replaceChild(newElement, body);\n    }\n    async render() {\n        this.replaceHeadAndBody();\n        this.activateScriptElements();\n    }\n    replaceHeadAndBody() {\n        const { documentElement, head } = document;\n        documentElement.replaceChild(this.newHead, head);\n        this.renderElement(this.currentElement, this.newElement);\n    }\n    activateScriptElements() {\n        for (const replaceableElement of this.scriptElements) {\n            const parentNode = replaceableElement.parentNode;\n            if (parentNode) {\n                const element = activateScriptElement(replaceableElement);\n                parentNode.replaceChild(element, replaceableElement);\n            }\n        }\n    }\n    get newHead() {\n        return this.newSnapshot.headSnapshot.element;\n    }\n    get scriptElements() {\n        return document.documentElement.querySelectorAll(\"script\");\n    }\n}\n\nclass PageRenderer extends Renderer {\n    static renderElement(currentElement, newElement) {\n        if (document.body && newElement instanceof HTMLBodyElement) {\n            document.body.replaceWith(newElement);\n        }\n        else {\n            document.documentElement.appendChild(newElement);\n        }\n    }\n    get shouldRender() {\n        return this.newSnapshot.isVisitable && this.trackedElementsAreIdentical;\n    }\n    get reloadReason() {\n        if (!this.newSnapshot.isVisitable) {\n            return {\n                reason: \"turbo_visit_control_is_reload\",\n            };\n        }\n        if (!this.trackedElementsAreIdentical) {\n            return {\n                reason: \"tracked_element_mismatch\",\n            };\n        }\n    }\n    async prepareToRender() {\n        await this.mergeHead();\n    }\n    async render() {\n        if (this.willRender) {\n            await this.replaceBody();\n        }\n    }\n    finishRendering() {\n        super.finishRendering();\n        if (!this.isPreview) {\n            this.focusFirstAutofocusableElement();\n        }\n    }\n    get currentHeadSnapshot() {\n        return this.currentSnapshot.headSnapshot;\n    }\n    get newHeadSnapshot() {\n        return this.newSnapshot.headSnapshot;\n    }\n    get newElement() {\n        return this.newSnapshot.element;\n    }\n    async mergeHead() {\n        const mergedHeadElements = this.mergeProvisionalElements();\n        const newStylesheetElements = this.copyNewHeadStylesheetElements();\n        this.copyNewHeadScriptElements();\n        await mergedHeadElements;\n        await newStylesheetElements;\n    }\n    async replaceBody() {\n        await this.preservingPermanentElements(async () => {\n            this.activateNewBody();\n            await this.assignNewBody();\n        });\n    }\n    get trackedElementsAreIdentical() {\n        return this.currentHeadSnapshot.trackedElementSignature == this.newHeadSnapshot.trackedElementSignature;\n    }\n    async copyNewHeadStylesheetElements() {\n        const loadingElements = [];\n        for (const element of this.newHeadStylesheetElements) {\n            loadingElements.push(waitForLoad(element));\n            document.head.appendChild(element);\n        }\n        await Promise.all(loadingElements);\n    }\n    copyNewHeadScriptElements() {\n        for (const element of this.newHeadScriptElements) {\n            document.head.appendChild(activateScriptElement(element));\n        }\n    }\n    async mergeProvisionalElements() {\n        const newHeadElements = [...this.newHeadProvisionalElements];\n        for (const element of this.currentHeadProvisionalElements) {\n            if (!this.isCurrentElementInElementList(element, newHeadElements)) {\n                document.head.removeChild(element);\n            }\n        }\n        for (const element of newHeadElements) {\n            document.head.appendChild(element);\n        }\n    }\n    isCurrentElementInElementList(element, elementList) {\n        for (const [index, newElement] of elementList.entries()) {\n            if (element.tagName == \"TITLE\") {\n                if (newElement.tagName != \"TITLE\") {\n                    continue;\n                }\n                if (element.innerHTML == newElement.innerHTML) {\n                    elementList.splice(index, 1);\n                    return true;\n                }\n            }\n            if (newElement.isEqualNode(element)) {\n                elementList.splice(index, 1);\n                return true;\n            }\n        }\n        return false;\n    }\n    removeCurrentHeadProvisionalElements() {\n        for (const element of this.currentHeadProvisionalElements) {\n            document.head.removeChild(element);\n        }\n    }\n    copyNewHeadProvisionalElements() {\n        for (const element of this.newHeadProvisionalElements) {\n            document.head.appendChild(element);\n        }\n    }\n    activateNewBody() {\n        document.adoptNode(this.newElement);\n        this.activateNewBodyScriptElements();\n    }\n    activateNewBodyScriptElements() {\n        for (const inertScriptElement of this.newBodyScriptElements) {\n            const activatedScriptElement = activateScriptElement(inertScriptElement);\n            inertScriptElement.replaceWith(activatedScriptElement);\n        }\n    }\n    async assignNewBody() {\n        await this.renderElement(this.currentElement, this.newElement);\n    }\n    get newHeadStylesheetElements() {\n        return this.newHeadSnapshot.getStylesheetElementsNotInSnapshot(this.currentHeadSnapshot);\n    }\n    get newHeadScriptElements() {\n        return this.newHeadSnapshot.getScriptElementsNotInSnapshot(this.currentHeadSnapshot);\n    }\n    get currentHeadProvisionalElements() {\n        return this.currentHeadSnapshot.provisionalElements;\n    }\n    get newHeadProvisionalElements() {\n        return this.newHeadSnapshot.provisionalElements;\n    }\n    get newBodyScriptElements() {\n        return this.newElement.querySelectorAll(\"script\");\n    }\n}\n\nclass SnapshotCache {\n    constructor(size) {\n        this.keys = [];\n        this.snapshots = {};\n        this.size = size;\n    }\n    has(location) {\n        return toCacheKey(location) in this.snapshots;\n    }\n    get(location) {\n        if (this.has(location)) {\n            const snapshot = this.read(location);\n            this.touch(location);\n            return snapshot;\n        }\n    }\n    put(location, snapshot) {\n        this.write(location, snapshot);\n        this.touch(location);\n        return snapshot;\n    }\n    clear() {\n        this.snapshots = {};\n    }\n    read(location) {\n        return this.snapshots[toCacheKey(location)];\n    }\n    write(location, snapshot) {\n        this.snapshots[toCacheKey(location)] = snapshot;\n    }\n    touch(location) {\n        const key = toCacheKey(location);\n        const index = this.keys.indexOf(key);\n        if (index > -1)\n            this.keys.splice(index, 1);\n        this.keys.unshift(key);\n        this.trim();\n    }\n    trim() {\n        for (const key of this.keys.splice(this.size)) {\n            delete this.snapshots[key];\n        }\n    }\n}\n\nclass PageView extends View {\n    constructor() {\n        super(...arguments);\n        this.snapshotCache = new SnapshotCache(10);\n        this.lastRenderedLocation = new URL(location.href);\n        this.forceReloaded = false;\n    }\n    renderPage(snapshot, isPreview = false, willRender = true, visit) {\n        const renderer = new PageRenderer(this.snapshot, snapshot, PageRenderer.renderElement, isPreview, willRender);\n        if (!renderer.shouldRender) {\n            this.forceReloaded = true;\n        }\n        else {\n            visit === null || visit === void 0 ? void 0 : visit.changeHistory();\n        }\n        return this.render(renderer);\n    }\n    renderError(snapshot, visit) {\n        visit === null || visit === void 0 ? void 0 : visit.changeHistory();\n        const renderer = new ErrorRenderer(this.snapshot, snapshot, ErrorRenderer.renderElement, false);\n        return this.render(renderer);\n    }\n    clearSnapshotCache() {\n        this.snapshotCache.clear();\n    }\n    async cacheSnapshot(snapshot = this.snapshot) {\n        if (snapshot.isCacheable) {\n            this.delegate.viewWillCacheSnapshot();\n            const { lastRenderedLocation: location } = this;\n            await nextEventLoopTick();\n            const cachedSnapshot = snapshot.clone();\n            this.snapshotCache.put(location, cachedSnapshot);\n            return cachedSnapshot;\n        }\n    }\n    getCachedSnapshotForLocation(location) {\n        return this.snapshotCache.get(location);\n    }\n    get snapshot() {\n        return PageSnapshot.fromElement(this.element);\n    }\n}\n\nclass Preloader {\n    constructor(delegate) {\n        this.selector = \"a[data-turbo-preload]\";\n        this.delegate = delegate;\n    }\n    get snapshotCache() {\n        return this.delegate.navigator.view.snapshotCache;\n    }\n    start() {\n        if (document.readyState === \"loading\") {\n            return document.addEventListener(\"DOMContentLoaded\", () => {\n                this.preloadOnLoadLinksForView(document.body);\n            });\n        }\n        else {\n            this.preloadOnLoadLinksForView(document.body);\n        }\n    }\n    preloadOnLoadLinksForView(element) {\n        for (const link of element.querySelectorAll(this.selector)) {\n            this.preloadURL(link);\n        }\n    }\n    async preloadURL(link) {\n        const location = new URL(link.href);\n        if (this.snapshotCache.has(location)) {\n            return;\n        }\n        try {\n            const response = await fetch(location.toString(), { headers: { \"VND.PREFETCH\": \"true\", Accept: \"text/html\" } });\n            const responseText = await response.text();\n            const snapshot = PageSnapshot.fromHTMLString(responseText);\n            this.snapshotCache.put(location, snapshot);\n        }\n        catch (_) {\n        }\n    }\n}\n\nclass Session {\n    constructor() {\n        this.navigator = new Navigator(this);\n        this.history = new History(this);\n        this.preloader = new Preloader(this);\n        this.view = new PageView(this, document.documentElement);\n        this.adapter = new BrowserAdapter(this);\n        this.pageObserver = new PageObserver(this);\n        this.cacheObserver = new CacheObserver();\n        this.linkClickObserver = new LinkClickObserver(this, window);\n        this.formSubmitObserver = new FormSubmitObserver(this, document);\n        this.scrollObserver = new ScrollObserver(this);\n        this.streamObserver = new StreamObserver(this);\n        this.formLinkClickObserver = new FormLinkClickObserver(this, document.documentElement);\n        this.frameRedirector = new FrameRedirector(this, document.documentElement);\n        this.streamMessageRenderer = new StreamMessageRenderer();\n        this.drive = true;\n        this.enabled = true;\n        this.progressBarDelay = 500;\n        this.started = false;\n        this.formMode = \"on\";\n    }\n    start() {\n        if (!this.started) {\n            this.pageObserver.start();\n            this.cacheObserver.start();\n            this.formLinkClickObserver.start();\n            this.linkClickObserver.start();\n            this.formSubmitObserver.start();\n            this.scrollObserver.start();\n            this.streamObserver.start();\n            this.frameRedirector.start();\n            this.history.start();\n            this.preloader.start();\n            this.started = true;\n            this.enabled = true;\n        }\n    }\n    disable() {\n        this.enabled = false;\n    }\n    stop() {\n        if (this.started) {\n            this.pageObserver.stop();\n            this.cacheObserver.stop();\n            this.formLinkClickObserver.stop();\n            this.linkClickObserver.stop();\n            this.formSubmitObserver.stop();\n            this.scrollObserver.stop();\n            this.streamObserver.stop();\n            this.frameRedirector.stop();\n            this.history.stop();\n            this.started = false;\n        }\n    }\n    registerAdapter(adapter) {\n        this.adapter = adapter;\n    }\n    visit(location, options = {}) {\n        const frameElement = options.frame ? document.getElementById(options.frame) : null;\n        if (frameElement instanceof FrameElement) {\n            frameElement.src = location.toString();\n            frameElement.loaded;\n        }\n        else {\n            this.navigator.proposeVisit(expandURL(location), options);\n        }\n    }\n    connectStreamSource(source) {\n        this.streamObserver.connectStreamSource(source);\n    }\n    disconnectStreamSource(source) {\n        this.streamObserver.disconnectStreamSource(source);\n    }\n    renderStreamMessage(message) {\n        this.streamMessageRenderer.render(StreamMessage.wrap(message));\n    }\n    clearCache() {\n        this.view.clearSnapshotCache();\n    }\n    setProgressBarDelay(delay) {\n        this.progressBarDelay = delay;\n    }\n    setFormMode(mode) {\n        this.formMode = mode;\n    }\n    get location() {\n        return this.history.location;\n    }\n    get restorationIdentifier() {\n        return this.history.restorationIdentifier;\n    }\n    historyPoppedToLocationWithRestorationIdentifier(location, restorationIdentifier) {\n        if (this.enabled) {\n            this.navigator.startVisit(location, restorationIdentifier, {\n                action: \"restore\",\n                historyChanged: true,\n            });\n        }\n        else {\n            this.adapter.pageInvalidated({\n                reason: \"turbo_disabled\",\n            });\n        }\n    }\n    scrollPositionChanged(position) {\n        this.history.updateRestorationData({ scrollPosition: position });\n    }\n    willSubmitFormLinkToLocation(link, location) {\n        return this.elementIsNavigatable(link) && locationIsVisitable(location, this.snapshot.rootLocation);\n    }\n    submittedFormLinkToLocation() { }\n    willFollowLinkToLocation(link, location, event) {\n        return (this.elementIsNavigatable(link) &&\n            locationIsVisitable(location, this.snapshot.rootLocation) &&\n            this.applicationAllowsFollowingLinkToLocation(link, location, event));\n    }\n    followedLinkToLocation(link, location) {\n        const action = this.getActionForLink(link);\n        const acceptsStreamResponse = link.hasAttribute(\"data-turbo-stream\");\n        this.visit(location.href, { action, acceptsStreamResponse });\n    }\n    allowsVisitingLocationWithAction(location, action) {\n        return this.locationWithActionIsSamePage(location, action) || this.applicationAllowsVisitingLocation(location);\n    }\n    visitProposedToLocation(location, options) {\n        extendURLWithDeprecatedProperties(location);\n        this.adapter.visitProposedToLocation(location, options);\n    }\n    visitStarted(visit) {\n        if (!visit.acceptsStreamResponse) {\n            markAsBusy(document.documentElement);\n        }\n        extendURLWithDeprecatedProperties(visit.location);\n        if (!visit.silent) {\n            this.notifyApplicationAfterVisitingLocation(visit.location, visit.action);\n        }\n    }\n    visitCompleted(visit) {\n        clearBusyState(document.documentElement);\n        this.notifyApplicationAfterPageLoad(visit.getTimingMetrics());\n    }\n    locationWithActionIsSamePage(location, action) {\n        return this.navigator.locationWithActionIsSamePage(location, action);\n    }\n    visitScrolledToSamePageLocation(oldURL, newURL) {\n        this.notifyApplicationAfterVisitingSamePageLocation(oldURL, newURL);\n    }\n    willSubmitForm(form, submitter) {\n        const action = getAction(form, submitter);\n        return (this.submissionIsNavigatable(form, submitter) &&\n            locationIsVisitable(expandURL(action), this.snapshot.rootLocation));\n    }\n    formSubmitted(form, submitter) {\n        this.navigator.submitForm(form, submitter);\n    }\n    pageBecameInteractive() {\n        this.view.lastRenderedLocation = this.location;\n        this.notifyApplicationAfterPageLoad();\n    }\n    pageLoaded() {\n        this.history.assumeControlOfScrollRestoration();\n    }\n    pageWillUnload() {\n        this.history.relinquishControlOfScrollRestoration();\n    }\n    receivedMessageFromStream(message) {\n        this.renderStreamMessage(message);\n    }\n    viewWillCacheSnapshot() {\n        var _a;\n        if (!((_a = this.navigator.currentVisit) === null || _a === void 0 ? void 0 : _a.silent)) {\n            this.notifyApplicationBeforeCachingSnapshot();\n        }\n    }\n    allowsImmediateRender({ element }, options) {\n        const event = this.notifyApplicationBeforeRender(element, options);\n        const { defaultPrevented, detail: { render }, } = event;\n        if (this.view.renderer && render) {\n            this.view.renderer.renderElement = render;\n        }\n        return !defaultPrevented;\n    }\n    viewRenderedSnapshot(_snapshot, _isPreview) {\n        this.view.lastRenderedLocation = this.history.location;\n        this.notifyApplicationAfterRender();\n    }\n    preloadOnLoadLinksForView(element) {\n        this.preloader.preloadOnLoadLinksForView(element);\n    }\n    viewInvalidated(reason) {\n        this.adapter.pageInvalidated(reason);\n    }\n    frameLoaded(frame) {\n        this.notifyApplicationAfterFrameLoad(frame);\n    }\n    frameRendered(fetchResponse, frame) {\n        this.notifyApplicationAfterFrameRender(fetchResponse, frame);\n    }\n    applicationAllowsFollowingLinkToLocation(link, location, ev) {\n        const event = this.notifyApplicationAfterClickingLinkToLocation(link, location, ev);\n        return !event.defaultPrevented;\n    }\n    applicationAllowsVisitingLocation(location) {\n        const event = this.notifyApplicationBeforeVisitingLocation(location);\n        return !event.defaultPrevented;\n    }\n    notifyApplicationAfterClickingLinkToLocation(link, location, event) {\n        return dispatch(\"turbo:click\", {\n            target: link,\n            detail: { url: location.href, originalEvent: event },\n            cancelable: true,\n        });\n    }\n    notifyApplicationBeforeVisitingLocation(location) {\n        return dispatch(\"turbo:before-visit\", {\n            detail: { url: location.href },\n            cancelable: true,\n        });\n    }\n    notifyApplicationAfterVisitingLocation(location, action) {\n        return dispatch(\"turbo:visit\", { detail: { url: location.href, action } });\n    }\n    notifyApplicationBeforeCachingSnapshot() {\n        return dispatch(\"turbo:before-cache\");\n    }\n    notifyApplicationBeforeRender(newBody, options) {\n        return dispatch(\"turbo:before-render\", {\n            detail: Object.assign({ newBody }, options),\n            cancelable: true,\n        });\n    }\n    notifyApplicationAfterRender() {\n        return dispatch(\"turbo:render\");\n    }\n    notifyApplicationAfterPageLoad(timing = {}) {\n        return dispatch(\"turbo:load\", {\n            detail: { url: this.location.href, timing },\n        });\n    }\n    notifyApplicationAfterVisitingSamePageLocation(oldURL, newURL) {\n        dispatchEvent(new HashChangeEvent(\"hashchange\", {\n            oldURL: oldURL.toString(),\n            newURL: newURL.toString(),\n        }));\n    }\n    notifyApplicationAfterFrameLoad(frame) {\n        return dispatch(\"turbo:frame-load\", { target: frame });\n    }\n    notifyApplicationAfterFrameRender(fetchResponse, frame) {\n        return dispatch(\"turbo:frame-render\", {\n            detail: { fetchResponse },\n            target: frame,\n            cancelable: true,\n        });\n    }\n    submissionIsNavigatable(form, submitter) {\n        if (this.formMode == \"off\") {\n            return false;\n        }\n        else {\n            const submitterIsNavigatable = submitter ? this.elementIsNavigatable(submitter) : true;\n            if (this.formMode == \"optin\") {\n                return submitterIsNavigatable && form.closest('[data-turbo=\"true\"]') != null;\n            }\n            else {\n                return submitterIsNavigatable && this.elementIsNavigatable(form);\n            }\n        }\n    }\n    elementIsNavigatable(element) {\n        const container = findClosestRecursively(element, \"[data-turbo]\");\n        const withinFrame = findClosestRecursively(element, \"turbo-frame\");\n        if (this.drive || withinFrame) {\n            if (container) {\n                return container.getAttribute(\"data-turbo\") != \"false\";\n            }\n            else {\n                return true;\n            }\n        }\n        else {\n            if (container) {\n                return container.getAttribute(\"data-turbo\") == \"true\";\n            }\n            else {\n                return false;\n            }\n        }\n    }\n    getActionForLink(link) {\n        return getVisitAction(link) || \"advance\";\n    }\n    get snapshot() {\n        return this.view.snapshot;\n    }\n}\nfunction extendURLWithDeprecatedProperties(url) {\n    Object.defineProperties(url, deprecatedLocationPropertyDescriptors);\n}\nconst deprecatedLocationPropertyDescriptors = {\n    absoluteURL: {\n        get() {\n            return this.toString();\n        },\n    },\n};\n\nclass Cache {\n    constructor(session) {\n        this.session = session;\n    }\n    clear() {\n        this.session.clearCache();\n    }\n    resetCacheControl() {\n        this.setCacheControl(\"\");\n    }\n    exemptPageFromCache() {\n        this.setCacheControl(\"no-cache\");\n    }\n    exemptPageFromPreview() {\n        this.setCacheControl(\"no-preview\");\n    }\n    setCacheControl(value) {\n        setMetaContent(\"turbo-cache-control\", value);\n    }\n}\n\nconst StreamActions = {\n    after() {\n        this.targetElements.forEach((e) => { var _a; return (_a = e.parentElement) === null || _a === void 0 ? void 0 : _a.insertBefore(this.templateContent, e.nextSibling); });\n    },\n    append() {\n        this.removeDuplicateTargetChildren();\n        this.targetElements.forEach((e) => e.append(this.templateContent));\n    },\n    before() {\n        this.targetElements.forEach((e) => { var _a; return (_a = e.parentElement) === null || _a === void 0 ? void 0 : _a.insertBefore(this.templateContent, e); });\n    },\n    prepend() {\n        this.removeDuplicateTargetChildren();\n        this.targetElements.forEach((e) => e.prepend(this.templateContent));\n    },\n    remove() {\n        this.targetElements.forEach((e) => e.remove());\n    },\n    replace() {\n        this.targetElements.forEach((e) => e.replaceWith(this.templateContent));\n    },\n    update() {\n        this.targetElements.forEach((targetElement) => {\n            targetElement.innerHTML = \"\";\n            targetElement.append(this.templateContent);\n        });\n    },\n};\n\nconst session = new Session();\nconst cache = new Cache(session);\nconst { navigator: navigator$1 } = session;\nfunction start() {\n    session.start();\n}\nfunction registerAdapter(adapter) {\n    session.registerAdapter(adapter);\n}\nfunction visit(location, options) {\n    session.visit(location, options);\n}\nfunction connectStreamSource(source) {\n    session.connectStreamSource(source);\n}\nfunction disconnectStreamSource(source) {\n    session.disconnectStreamSource(source);\n}\nfunction renderStreamMessage(message) {\n    session.renderStreamMessage(message);\n}\nfunction clearCache() {\n    console.warn(\"Please replace `Turbo.clearCache()` with `Turbo.cache.clear()`. The top-level function is deprecated and will be removed in a future version of Turbo.`\");\n    session.clearCache();\n}\nfunction setProgressBarDelay(delay) {\n    session.setProgressBarDelay(delay);\n}\nfunction setConfirmMethod(confirmMethod) {\n    FormSubmission.confirmMethod = confirmMethod;\n}\nfunction setFormMode(mode) {\n    session.setFormMode(mode);\n}\n\nvar Turbo = /*#__PURE__*/Object.freeze({\n    __proto__: null,\n    navigator: navigator$1,\n    session: session,\n    cache: cache,\n    PageRenderer: PageRenderer,\n    PageSnapshot: PageSnapshot,\n    FrameRenderer: FrameRenderer,\n    start: start,\n    registerAdapter: registerAdapter,\n    visit: visit,\n    connectStreamSource: connectStreamSource,\n    disconnectStreamSource: disconnectStreamSource,\n    renderStreamMessage: renderStreamMessage,\n    clearCache: clearCache,\n    setProgressBarDelay: setProgressBarDelay,\n    setConfirmMethod: setConfirmMethod,\n    setFormMode: setFormMode,\n    StreamActions: StreamActions\n});\n\nclass TurboFrameMissingError extends Error {\n}\n\nclass FrameController {\n    constructor(element) {\n        this.fetchResponseLoaded = (_fetchResponse) => { };\n        this.currentFetchRequest = null;\n        this.resolveVisitPromise = () => { };\n        this.connected = false;\n        this.hasBeenLoaded = false;\n        this.ignoredAttributes = new Set();\n        this.action = null;\n        this.visitCachedSnapshot = ({ element }) => {\n            const frame = element.querySelector(\"#\" + this.element.id);\n            if (frame && this.previousFrameElement) {\n                frame.replaceChildren(...this.previousFrameElement.children);\n            }\n            delete this.previousFrameElement;\n        };\n        this.element = element;\n        this.view = new FrameView(this, this.element);\n        this.appearanceObserver = new AppearanceObserver(this, this.element);\n        this.formLinkClickObserver = new FormLinkClickObserver(this, this.element);\n        this.linkInterceptor = new LinkInterceptor(this, this.element);\n        this.restorationIdentifier = uuid();\n        this.formSubmitObserver = new FormSubmitObserver(this, this.element);\n    }\n    connect() {\n        if (!this.connected) {\n            this.connected = true;\n            if (this.loadingStyle == FrameLoadingStyle.lazy) {\n                this.appearanceObserver.start();\n            }\n            else {\n                this.loadSourceURL();\n            }\n            this.formLinkClickObserver.start();\n            this.linkInterceptor.start();\n            this.formSubmitObserver.start();\n        }\n    }\n    disconnect() {\n        if (this.connected) {\n            this.connected = false;\n            this.appearanceObserver.stop();\n            this.formLinkClickObserver.stop();\n            this.linkInterceptor.stop();\n            this.formSubmitObserver.stop();\n        }\n    }\n    disabledChanged() {\n        if (this.loadingStyle == FrameLoadingStyle.eager) {\n            this.loadSourceURL();\n        }\n    }\n    sourceURLChanged() {\n        if (this.isIgnoringChangesTo(\"src\"))\n            return;\n        if (this.element.isConnected) {\n            this.complete = false;\n        }\n        if (this.loadingStyle == FrameLoadingStyle.eager || this.hasBeenLoaded) {\n            this.loadSourceURL();\n        }\n    }\n    sourceURLReloaded() {\n        const { src } = this.element;\n        this.ignoringChangesToAttribute(\"complete\", () => {\n            this.element.removeAttribute(\"complete\");\n        });\n        this.element.src = null;\n        this.element.src = src;\n        return this.element.loaded;\n    }\n    completeChanged() {\n        if (this.isIgnoringChangesTo(\"complete\"))\n            return;\n        this.loadSourceURL();\n    }\n    loadingStyleChanged() {\n        if (this.loadingStyle == FrameLoadingStyle.lazy) {\n            this.appearanceObserver.start();\n        }\n        else {\n            this.appearanceObserver.stop();\n            this.loadSourceURL();\n        }\n    }\n    async loadSourceURL() {\n        if (this.enabled && this.isActive && !this.complete && this.sourceURL) {\n            this.element.loaded = this.visit(expandURL(this.sourceURL));\n            this.appearanceObserver.stop();\n            await this.element.loaded;\n            this.hasBeenLoaded = true;\n        }\n    }\n    async loadResponse(fetchResponse) {\n        if (fetchResponse.redirected || (fetchResponse.succeeded && fetchResponse.isHTML)) {\n            this.sourceURL = fetchResponse.response.url;\n        }\n        try {\n            const html = await fetchResponse.responseHTML;\n            if (html) {\n                const document = parseHTMLDocument(html);\n                const pageSnapshot = PageSnapshot.fromDocument(document);\n                if (pageSnapshot.isVisitable) {\n                    await this.loadFrameResponse(fetchResponse, document);\n                }\n                else {\n                    await this.handleUnvisitableFrameResponse(fetchResponse);\n                }\n            }\n        }\n        finally {\n            this.fetchResponseLoaded = () => { };\n        }\n    }\n    elementAppearedInViewport(element) {\n        this.proposeVisitIfNavigatedWithAction(element, element);\n        this.loadSourceURL();\n    }\n    willSubmitFormLinkToLocation(link) {\n        return this.shouldInterceptNavigation(link);\n    }\n    submittedFormLinkToLocation(link, _location, form) {\n        const frame = this.findFrameElement(link);\n        if (frame)\n            form.setAttribute(\"data-turbo-frame\", frame.id);\n    }\n    shouldInterceptLinkClick(element, _location, _event) {\n        return this.shouldInterceptNavigation(element);\n    }\n    linkClickIntercepted(element, location) {\n        this.navigateFrame(element, location);\n    }\n    willSubmitForm(element, submitter) {\n        return element.closest(\"turbo-frame\") == this.element && this.shouldInterceptNavigation(element, submitter);\n    }\n    formSubmitted(element, submitter) {\n        if (this.formSubmission) {\n            this.formSubmission.stop();\n        }\n        this.formSubmission = new FormSubmission(this, element, submitter);\n        const { fetchRequest } = this.formSubmission;\n        this.prepareRequest(fetchRequest);\n        this.formSubmission.start();\n    }\n    prepareRequest(request) {\n        var _a;\n        request.headers[\"Turbo-Frame\"] = this.id;\n        if ((_a = this.currentNavigationElement) === null || _a === void 0 ? void 0 : _a.hasAttribute(\"data-turbo-stream\")) {\n            request.acceptResponseType(StreamMessage.contentType);\n        }\n    }\n    requestStarted(_request) {\n        markAsBusy(this.element);\n    }\n    requestPreventedHandlingResponse(_request, _response) {\n        this.resolveVisitPromise();\n    }\n    async requestSucceededWithResponse(request, response) {\n        await this.loadResponse(response);\n        this.resolveVisitPromise();\n    }\n    async requestFailedWithResponse(request, response) {\n        await this.loadResponse(response);\n        this.resolveVisitPromise();\n    }\n    requestErrored(request, error) {\n        console.error(error);\n        this.resolveVisitPromise();\n    }\n    requestFinished(_request) {\n        clearBusyState(this.element);\n    }\n    formSubmissionStarted({ formElement }) {\n        markAsBusy(formElement, this.findFrameElement(formElement));\n    }\n    formSubmissionSucceededWithResponse(formSubmission, response) {\n        const frame = this.findFrameElement(formSubmission.formElement, formSubmission.submitter);\n        frame.delegate.proposeVisitIfNavigatedWithAction(frame, formSubmission.formElement, formSubmission.submitter);\n        frame.delegate.loadResponse(response);\n        if (!formSubmission.isSafe) {\n            session.clearCache();\n        }\n    }\n    formSubmissionFailedWithResponse(formSubmission, fetchResponse) {\n        this.element.delegate.loadResponse(fetchResponse);\n        session.clearCache();\n    }\n    formSubmissionErrored(formSubmission, error) {\n        console.error(error);\n    }\n    formSubmissionFinished({ formElement }) {\n        clearBusyState(formElement, this.findFrameElement(formElement));\n    }\n    allowsImmediateRender({ element: newFrame }, options) {\n        const event = dispatch(\"turbo:before-frame-render\", {\n            target: this.element,\n            detail: Object.assign({ newFrame }, options),\n            cancelable: true,\n        });\n        const { defaultPrevented, detail: { render }, } = event;\n        if (this.view.renderer && render) {\n            this.view.renderer.renderElement = render;\n        }\n        return !defaultPrevented;\n    }\n    viewRenderedSnapshot(_snapshot, _isPreview) { }\n    preloadOnLoadLinksForView(element) {\n        session.preloadOnLoadLinksForView(element);\n    }\n    viewInvalidated() { }\n    willRenderFrame(currentElement, _newElement) {\n        this.previousFrameElement = currentElement.cloneNode(true);\n    }\n    async loadFrameResponse(fetchResponse, document) {\n        const newFrameElement = await this.extractForeignFrameElement(document.body);\n        if (newFrameElement) {\n            const snapshot = new Snapshot(newFrameElement);\n            const renderer = new FrameRenderer(this, this.view.snapshot, snapshot, FrameRenderer.renderElement, false, false);\n            if (this.view.renderPromise)\n                await this.view.renderPromise;\n            this.changeHistory();\n            await this.view.render(renderer);\n            this.complete = true;\n            session.frameRendered(fetchResponse, this.element);\n            session.frameLoaded(this.element);\n            this.fetchResponseLoaded(fetchResponse);\n        }\n        else if (this.willHandleFrameMissingFromResponse(fetchResponse)) {\n            this.handleFrameMissingFromResponse(fetchResponse);\n        }\n    }\n    async visit(url) {\n        var _a;\n        const request = new FetchRequest(this, FetchMethod.get, url, new URLSearchParams(), this.element);\n        (_a = this.currentFetchRequest) === null || _a === void 0 ? void 0 : _a.cancel();\n        this.currentFetchRequest = request;\n        return new Promise((resolve) => {\n            this.resolveVisitPromise = () => {\n                this.resolveVisitPromise = () => { };\n                this.currentFetchRequest = null;\n                resolve();\n            };\n            request.perform();\n        });\n    }\n    navigateFrame(element, url, submitter) {\n        const frame = this.findFrameElement(element, submitter);\n        frame.delegate.proposeVisitIfNavigatedWithAction(frame, element, submitter);\n        this.withCurrentNavigationElement(element, () => {\n            frame.src = url;\n        });\n    }\n    proposeVisitIfNavigatedWithAction(frame, element, submitter) {\n        this.action = getVisitAction(submitter, element, frame);\n        if (this.action) {\n            const pageSnapshot = PageSnapshot.fromElement(frame).clone();\n            const { visitCachedSnapshot } = frame.delegate;\n            frame.delegate.fetchResponseLoaded = (fetchResponse) => {\n                if (frame.src) {\n                    const { statusCode, redirected } = fetchResponse;\n                    const responseHTML = frame.ownerDocument.documentElement.outerHTML;\n                    const response = { statusCode, redirected, responseHTML };\n                    const options = {\n                        response,\n                        visitCachedSnapshot,\n                        willRender: false,\n                        updateHistory: false,\n                        restorationIdentifier: this.restorationIdentifier,\n                        snapshot: pageSnapshot,\n                    };\n                    if (this.action)\n                        options.action = this.action;\n                    session.visit(frame.src, options);\n                }\n            };\n        }\n    }\n    changeHistory() {\n        if (this.action) {\n            const method = getHistoryMethodForAction(this.action);\n            session.history.update(method, expandURL(this.element.src || \"\"), this.restorationIdentifier);\n        }\n    }\n    async handleUnvisitableFrameResponse(fetchResponse) {\n        console.warn(`The response (${fetchResponse.statusCode}) from <turbo-frame id=\"${this.element.id}\"> is performing a full page visit due to turbo-visit-control.`);\n        await this.visitResponse(fetchResponse.response);\n    }\n    willHandleFrameMissingFromResponse(fetchResponse) {\n        this.element.setAttribute(\"complete\", \"\");\n        const response = fetchResponse.response;\n        const visit = async (url, options = {}) => {\n            if (url instanceof Response) {\n                this.visitResponse(url);\n            }\n            else {\n                session.visit(url, options);\n            }\n        };\n        const event = dispatch(\"turbo:frame-missing\", {\n            target: this.element,\n            detail: { response, visit },\n            cancelable: true,\n        });\n        return !event.defaultPrevented;\n    }\n    handleFrameMissingFromResponse(fetchResponse) {\n        this.view.missing();\n        this.throwFrameMissingError(fetchResponse);\n    }\n    throwFrameMissingError(fetchResponse) {\n        const message = `The response (${fetchResponse.statusCode}) did not contain the expected <turbo-frame id=\"${this.element.id}\"> and will be ignored. To perform a full page visit instead, set turbo-visit-control to reload.`;\n        throw new TurboFrameMissingError(message);\n    }\n    async visitResponse(response) {\n        const wrapped = new FetchResponse(response);\n        const responseHTML = await wrapped.responseHTML;\n        const { location, redirected, statusCode } = wrapped;\n        return session.visit(location, { response: { redirected, statusCode, responseHTML } });\n    }\n    findFrameElement(element, submitter) {\n        var _a;\n        const id = getAttribute(\"data-turbo-frame\", submitter, element) || this.element.getAttribute(\"target\");\n        return (_a = getFrameElementById(id)) !== null && _a !== void 0 ? _a : this.element;\n    }\n    async extractForeignFrameElement(container) {\n        let element;\n        const id = CSS.escape(this.id);\n        try {\n            element = activateElement(container.querySelector(`turbo-frame#${id}`), this.sourceURL);\n            if (element) {\n                return element;\n            }\n            element = activateElement(container.querySelector(`turbo-frame[src][recurse~=${id}]`), this.sourceURL);\n            if (element) {\n                await element.loaded;\n                return await this.extractForeignFrameElement(element);\n            }\n        }\n        catch (error) {\n            console.error(error);\n            return new FrameElement();\n        }\n        return null;\n    }\n    formActionIsVisitable(form, submitter) {\n        const action = getAction(form, submitter);\n        return locationIsVisitable(expandURL(action), this.rootLocation);\n    }\n    shouldInterceptNavigation(element, submitter) {\n        const id = getAttribute(\"data-turbo-frame\", submitter, element) || this.element.getAttribute(\"target\");\n        if (element instanceof HTMLFormElement && !this.formActionIsVisitable(element, submitter)) {\n            return false;\n        }\n        if (!this.enabled || id == \"_top\") {\n            return false;\n        }\n        if (id) {\n            const frameElement = getFrameElementById(id);\n            if (frameElement) {\n                return !frameElement.disabled;\n            }\n        }\n        if (!session.elementIsNavigatable(element)) {\n            return false;\n        }\n        if (submitter && !session.elementIsNavigatable(submitter)) {\n            return false;\n        }\n        return true;\n    }\n    get id() {\n        return this.element.id;\n    }\n    get enabled() {\n        return !this.element.disabled;\n    }\n    get sourceURL() {\n        if (this.element.src) {\n            return this.element.src;\n        }\n    }\n    set sourceURL(sourceURL) {\n        this.ignoringChangesToAttribute(\"src\", () => {\n            this.element.src = sourceURL !== null && sourceURL !== void 0 ? sourceURL : null;\n        });\n    }\n    get loadingStyle() {\n        return this.element.loading;\n    }\n    get isLoading() {\n        return this.formSubmission !== undefined || this.resolveVisitPromise() !== undefined;\n    }\n    get complete() {\n        return this.element.hasAttribute(\"complete\");\n    }\n    set complete(value) {\n        this.ignoringChangesToAttribute(\"complete\", () => {\n            if (value) {\n                this.element.setAttribute(\"complete\", \"\");\n            }\n            else {\n                this.element.removeAttribute(\"complete\");\n            }\n        });\n    }\n    get isActive() {\n        return this.element.isActive && this.connected;\n    }\n    get rootLocation() {\n        var _a;\n        const meta = this.element.ownerDocument.querySelector(`meta[name=\"turbo-root\"]`);\n        const root = (_a = meta === null || meta === void 0 ? void 0 : meta.content) !== null && _a !== void 0 ? _a : \"/\";\n        return expandURL(root);\n    }\n    isIgnoringChangesTo(attributeName) {\n        return this.ignoredAttributes.has(attributeName);\n    }\n    ignoringChangesToAttribute(attributeName, callback) {\n        this.ignoredAttributes.add(attributeName);\n        callback();\n        this.ignoredAttributes.delete(attributeName);\n    }\n    withCurrentNavigationElement(element, callback) {\n        this.currentNavigationElement = element;\n        callback();\n        delete this.currentNavigationElement;\n    }\n}\nfunction getFrameElementById(id) {\n    if (id != null) {\n        const element = document.getElementById(id);\n        if (element instanceof FrameElement) {\n            return element;\n        }\n    }\n}\nfunction activateElement(element, currentURL) {\n    if (element) {\n        const src = element.getAttribute(\"src\");\n        if (src != null && currentURL != null && urlsAreEqual(src, currentURL)) {\n            throw new Error(`Matching <turbo-frame id=\"${element.id}\"> element has a source URL which references itself`);\n        }\n        if (element.ownerDocument !== document) {\n            element = document.importNode(element, true);\n        }\n        if (element instanceof FrameElement) {\n            element.connectedCallback();\n            element.disconnectedCallback();\n            return element;\n        }\n    }\n}\n\nclass StreamElement extends HTMLElement {\n    static async renderElement(newElement) {\n        await newElement.performAction();\n    }\n    async connectedCallback() {\n        try {\n            await this.render();\n        }\n        catch (error) {\n            console.error(error);\n        }\n        finally {\n            this.disconnect();\n        }\n    }\n    async render() {\n        var _a;\n        return ((_a = this.renderPromise) !== null && _a !== void 0 ? _a : (this.renderPromise = (async () => {\n            const event = this.beforeRenderEvent;\n            if (this.dispatchEvent(event)) {\n                await nextAnimationFrame();\n                await event.detail.render(this);\n            }\n        })()));\n    }\n    disconnect() {\n        try {\n            this.remove();\n        }\n        catch (_a) { }\n    }\n    removeDuplicateTargetChildren() {\n        this.duplicateChildren.forEach((c) => c.remove());\n    }\n    get duplicateChildren() {\n        var _a;\n        const existingChildren = this.targetElements.flatMap((e) => [...e.children]).filter((c) => !!c.id);\n        const newChildrenIds = [...(((_a = this.templateContent) === null || _a === void 0 ? void 0 : _a.children) || [])].filter((c) => !!c.id).map((c) => c.id);\n        return existingChildren.filter((c) => newChildrenIds.includes(c.id));\n    }\n    get performAction() {\n        if (this.action) {\n            const actionFunction = StreamActions[this.action];\n            if (actionFunction) {\n                return actionFunction;\n            }\n            this.raise(\"unknown action\");\n        }\n        this.raise(\"action attribute is missing\");\n    }\n    get targetElements() {\n        if (this.target) {\n            return this.targetElementsById;\n        }\n        else if (this.targets) {\n            return this.targetElementsByQuery;\n        }\n        else {\n            this.raise(\"target or targets attribute is missing\");\n        }\n    }\n    get templateContent() {\n        return this.templateElement.content.cloneNode(true);\n    }\n    get templateElement() {\n        if (this.firstElementChild === null) {\n            const template = this.ownerDocument.createElement(\"template\");\n            this.appendChild(template);\n            return template;\n        }\n        else if (this.firstElementChild instanceof HTMLTemplateElement) {\n            return this.firstElementChild;\n        }\n        this.raise(\"first child element must be a <template> element\");\n    }\n    get action() {\n        return this.getAttribute(\"action\");\n    }\n    get target() {\n        return this.getAttribute(\"target\");\n    }\n    get targets() {\n        return this.getAttribute(\"targets\");\n    }\n    raise(message) {\n        throw new Error(`${this.description}: ${message}`);\n    }\n    get description() {\n        var _a, _b;\n        return (_b = ((_a = this.outerHTML.match(/<[^>]+>/)) !== null && _a !== void 0 ? _a : [])[0]) !== null && _b !== void 0 ? _b : \"<turbo-stream>\";\n    }\n    get beforeRenderEvent() {\n        return new CustomEvent(\"turbo:before-stream-render\", {\n            bubbles: true,\n            cancelable: true,\n            detail: { newStream: this, render: StreamElement.renderElement },\n        });\n    }\n    get targetElementsById() {\n        var _a;\n        const element = (_a = this.ownerDocument) === null || _a === void 0 ? void 0 : _a.getElementById(this.target);\n        if (element !== null) {\n            return [element];\n        }\n        else {\n            return [];\n        }\n    }\n    get targetElementsByQuery() {\n        var _a;\n        const elements = (_a = this.ownerDocument) === null || _a === void 0 ? void 0 : _a.querySelectorAll(this.targets);\n        if (elements.length !== 0) {\n            return Array.prototype.slice.call(elements);\n        }\n        else {\n            return [];\n        }\n    }\n}\n\nclass StreamSourceElement extends HTMLElement {\n    constructor() {\n        super(...arguments);\n        this.streamSource = null;\n    }\n    connectedCallback() {\n        this.streamSource = this.src.match(/^ws{1,2}:/) ? new WebSocket(this.src) : new EventSource(this.src);\n        connectStreamSource(this.streamSource);\n    }\n    disconnectedCallback() {\n        if (this.streamSource) {\n            disconnectStreamSource(this.streamSource);\n        }\n    }\n    get src() {\n        return this.getAttribute(\"src\") || \"\";\n    }\n}\n\nFrameElement.delegateConstructor = FrameController;\nif (customElements.get(\"turbo-frame\") === undefined) {\n    customElements.define(\"turbo-frame\", FrameElement);\n}\nif (customElements.get(\"turbo-stream\") === undefined) {\n    customElements.define(\"turbo-stream\", StreamElement);\n}\nif (customElements.get(\"turbo-stream-source\") === undefined) {\n    customElements.define(\"turbo-stream-source\", StreamSourceElement);\n}\n\n(() => {\n    let element = document.currentScript;\n    if (!element)\n        return;\n    if (element.hasAttribute(\"data-turbo-suppress-warning\"))\n        return;\n    element = element.parentElement;\n    while (element) {\n        if (element == document.body) {\n            return console.warn(unindent `\n        You are loading Turbo from a <script> element inside the <body> element. This is probably not what you meant to do!\n\n        Load your application\u2019s JavaScript bundle inside the <head> element instead. <script> elements in <body> are evaluated with each page change.\n\n        For more information, see: https://turbo.hotwired.dev/handbook/building#working-with-script-elements\n\n        \u2014\u2014\n        Suppress this warning by adding a \"data-turbo-suppress-warning\" attribute to: %s\n      `, element.outerHTML);\n        }\n        element = element.parentElement;\n    }\n})();\n\nwindow.Turbo = Turbo;\nstart();\n\nexport { FrameElement, FrameLoadingStyle, FrameRenderer, PageRenderer, PageSnapshot, StreamActions, StreamElement, StreamSourceElement, cache, clearCache, connectStreamSource, disconnectStreamSource, navigator$1 as navigator, registerAdapter, renderStreamMessage, session, setConfirmMethod, setFormMode, setProgressBarDelay, start, visit };\n", "let consumer\n\nexport async function getConsumer() {\n  return consumer || setConsumer(createConsumer().then(setConsumer))\n}\n\nexport function setConsumer(newConsumer) {\n  return consumer = newConsumer\n}\n\nexport async function createConsumer() {\n  const { createConsumer } = await import(/* webpackChunkName: \"actioncable\" */ \"@rails/actioncable/src\")\n  return createConsumer()\n}\n\nexport async function subscribeTo(channel, mixin) {\n  const { subscriptions } = await getConsumer()\n  return subscriptions.create(channel, mixin)\n}\n", "// Based on https://github.com/nathan7/snakeize\n//\n// This software is released under the MIT license:\n// Permission is hereby granted, free of charge, to any person obtaining a copy of\n// this software and associated documentation files (the \"Software\"), to deal in\n// the Software without restriction, including without limitation the rights to\n// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n// the Software, and to permit persons to whom the Software is furnished to do so,\n// subject to the following conditions:\n\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\nexport default function walk (obj) {\n    if (!obj || typeof obj !== 'object') return obj;\n    if (obj instanceof Date || obj instanceof RegExp) return obj;\n    if (Array.isArray(obj)) return obj.map(walk);\n    return Object.keys(obj).reduce(function (acc, key) {\n        var camel = key[0].toLowerCase() + key.slice(1).replace(/([A-Z]+)/g, function (m, x) {\n            return '_' + x.toLowerCase();\n        });\n        acc[camel] = walk(obj[key]);\n        return acc;\n    }, {});\n};", "import { connectStreamSource, disconnectStreamSource } from \"@hotwired/turbo\"\nimport { subscribeTo } from \"./cable\"\nimport snakeize from \"./snakeize\"\n\nclass TurboCableStreamSourceElement extends HTMLElement {\n  async connectedCallback() {\n    connectStreamSource(this)\n    this.subscription = await subscribeTo(this.channel, {\n      received: this.dispatchMessageEvent.bind(this),\n      connected: this.subscriptionConnected.bind(this),\n      disconnected: this.subscriptionDisconnected.bind(this)\n    })\n  }\n\n  disconnectedCallback() {\n    disconnectStreamSource(this)\n    if (this.subscription) this.subscription.unsubscribe()\n  }\n\n  dispatchMessageEvent(data) {\n    const event = new MessageEvent(\"message\", { data })\n    return this.dispatchEvent(event)\n  }\n\n  subscriptionConnected() {\n    this.setAttribute(\"connected\", \"\")\n  }\n\n  subscriptionDisconnected() {\n    this.removeAttribute(\"connected\")\n  }\n\n  get channel() {\n    const channel = this.getAttribute(\"channel\")\n    const signed_stream_name = this.getAttribute(\"signed-stream-name\")\n    return { channel, signed_stream_name, ...snakeize({ ...this.dataset }) }\n  }\n}\n\n\nif (customElements.get(\"turbo-cable-stream-source\") === undefined) {\n  customElements.define(\"turbo-cable-stream-source\", TurboCableStreamSourceElement)\n}\n", "export function encodeMethodIntoRequestBody(event) {\n  if (event.target instanceof HTMLFormElement) {\n    const { target: form, detail: { fetchOptions } } = event\n\n    form.addEventListener(\"turbo:submit-start\", ({ detail: { formSubmission: { submitter } } }) => {\n      const body = isBodyInit(fetchOptions.body) ? fetchOptions.body : new URLSearchParams()\n      const method = determineFetchMethod(submitter, body, form)\n\n      if (!/get/i.test(method)) {\n        if (/post/i.test(method)) {\n          body.delete(\"_method\")\n        } else {\n          body.set(\"_method\", method)\n        }\n\n        fetchOptions.method = \"post\"\n      }\n    }, { once: true })\n  }\n}\n\nfunction determineFetchMethod(submitter, body, form) {\n  const formMethod = determineFormMethod(submitter)\n  const overrideMethod = body.get(\"_method\")\n  const method = form.getAttribute(\"method\") || \"get\"\n\n  if (typeof formMethod == \"string\") {\n    return formMethod\n  } else if (typeof overrideMethod == \"string\") {\n    return overrideMethod\n  } else {\n    return method\n  }\n}\n\nfunction determineFormMethod(submitter) {\n  if (submitter instanceof HTMLButtonElement || submitter instanceof HTMLInputElement) {\n    if (submitter.hasAttribute(\"formmethod\")) {\n      return submitter.formMethod\n    } else {\n      return null\n    }\n  } else {\n    return null\n  }\n}\n\nfunction isBodyInit(body) {\n  return body instanceof FormData || body instanceof URLSearchParams\n}\n", "import \"./cable_stream_source_element\"\n\nimport * as Turbo from \"@hotwired/turbo\"\nexport { Turbo }\n\nimport * as cable from \"./cable\"\nexport { cable }\n\nimport { encodeMethodIntoRequestBody } from \"./fetch_requests\"\n\naddEventListener(\"turbo:before-fetch-request\", encodeMethodIntoRequestBody)\n", "/*\nStimulus 3.2.1\nCopyright \u00A9 2023 Basecamp, LLC\n */\nclass EventListener {\n    constructor(eventTarget, eventName, eventOptions) {\n        this.eventTarget = eventTarget;\n        this.eventName = eventName;\n        this.eventOptions = eventOptions;\n        this.unorderedBindings = new Set();\n    }\n    connect() {\n        this.eventTarget.addEventListener(this.eventName, this, this.eventOptions);\n    }\n    disconnect() {\n        this.eventTarget.removeEventListener(this.eventName, this, this.eventOptions);\n    }\n    bindingConnected(binding) {\n        this.unorderedBindings.add(binding);\n    }\n    bindingDisconnected(binding) {\n        this.unorderedBindings.delete(binding);\n    }\n    handleEvent(event) {\n        const extendedEvent = extendEvent(event);\n        for (const binding of this.bindings) {\n            if (extendedEvent.immediatePropagationStopped) {\n                break;\n            }\n            else {\n                binding.handleEvent(extendedEvent);\n            }\n        }\n    }\n    hasBindings() {\n        return this.unorderedBindings.size > 0;\n    }\n    get bindings() {\n        return Array.from(this.unorderedBindings).sort((left, right) => {\n            const leftIndex = left.index, rightIndex = right.index;\n            return leftIndex < rightIndex ? -1 : leftIndex > rightIndex ? 1 : 0;\n        });\n    }\n}\nfunction extendEvent(event) {\n    if (\"immediatePropagationStopped\" in event) {\n        return event;\n    }\n    else {\n        const { stopImmediatePropagation } = event;\n        return Object.assign(event, {\n            immediatePropagationStopped: false,\n            stopImmediatePropagation() {\n                this.immediatePropagationStopped = true;\n                stopImmediatePropagation.call(this);\n            },\n        });\n    }\n}\n\nclass Dispatcher {\n    constructor(application) {\n        this.application = application;\n        this.eventListenerMaps = new Map();\n        this.started = false;\n    }\n    start() {\n        if (!this.started) {\n            this.started = true;\n            this.eventListeners.forEach((eventListener) => eventListener.connect());\n        }\n    }\n    stop() {\n        if (this.started) {\n            this.started = false;\n            this.eventListeners.forEach((eventListener) => eventListener.disconnect());\n        }\n    }\n    get eventListeners() {\n        return Array.from(this.eventListenerMaps.values()).reduce((listeners, map) => listeners.concat(Array.from(map.values())), []);\n    }\n    bindingConnected(binding) {\n        this.fetchEventListenerForBinding(binding).bindingConnected(binding);\n    }\n    bindingDisconnected(binding, clearEventListeners = false) {\n        this.fetchEventListenerForBinding(binding).bindingDisconnected(binding);\n        if (clearEventListeners)\n            this.clearEventListenersForBinding(binding);\n    }\n    handleError(error, message, detail = {}) {\n        this.application.handleError(error, `Error ${message}`, detail);\n    }\n    clearEventListenersForBinding(binding) {\n        const eventListener = this.fetchEventListenerForBinding(binding);\n        if (!eventListener.hasBindings()) {\n            eventListener.disconnect();\n            this.removeMappedEventListenerFor(binding);\n        }\n    }\n    removeMappedEventListenerFor(binding) {\n        const { eventTarget, eventName, eventOptions } = binding;\n        const eventListenerMap = this.fetchEventListenerMapForEventTarget(eventTarget);\n        const cacheKey = this.cacheKey(eventName, eventOptions);\n        eventListenerMap.delete(cacheKey);\n        if (eventListenerMap.size == 0)\n            this.eventListenerMaps.delete(eventTarget);\n    }\n    fetchEventListenerForBinding(binding) {\n        const { eventTarget, eventName, eventOptions } = binding;\n        return this.fetchEventListener(eventTarget, eventName, eventOptions);\n    }\n    fetchEventListener(eventTarget, eventName, eventOptions) {\n        const eventListenerMap = this.fetchEventListenerMapForEventTarget(eventTarget);\n        const cacheKey = this.cacheKey(eventName, eventOptions);\n        let eventListener = eventListenerMap.get(cacheKey);\n        if (!eventListener) {\n            eventListener = this.createEventListener(eventTarget, eventName, eventOptions);\n            eventListenerMap.set(cacheKey, eventListener);\n        }\n        return eventListener;\n    }\n    createEventListener(eventTarget, eventName, eventOptions) {\n        const eventListener = new EventListener(eventTarget, eventName, eventOptions);\n        if (this.started) {\n            eventListener.connect();\n        }\n        return eventListener;\n    }\n    fetchEventListenerMapForEventTarget(eventTarget) {\n        let eventListenerMap = this.eventListenerMaps.get(eventTarget);\n        if (!eventListenerMap) {\n            eventListenerMap = new Map();\n            this.eventListenerMaps.set(eventTarget, eventListenerMap);\n        }\n        return eventListenerMap;\n    }\n    cacheKey(eventName, eventOptions) {\n        const parts = [eventName];\n        Object.keys(eventOptions)\n            .sort()\n            .forEach((key) => {\n            parts.push(`${eventOptions[key] ? \"\" : \"!\"}${key}`);\n        });\n        return parts.join(\":\");\n    }\n}\n\nconst defaultActionDescriptorFilters = {\n    stop({ event, value }) {\n        if (value)\n            event.stopPropagation();\n        return true;\n    },\n    prevent({ event, value }) {\n        if (value)\n            event.preventDefault();\n        return true;\n    },\n    self({ event, value, element }) {\n        if (value) {\n            return element === event.target;\n        }\n        else {\n            return true;\n        }\n    },\n};\nconst descriptorPattern = /^(?:(?:([^.]+?)\\+)?(.+?)(?:\\.(.+?))?(?:@(window|document))?->)?(.+?)(?:#([^:]+?))(?::(.+))?$/;\nfunction parseActionDescriptorString(descriptorString) {\n    const source = descriptorString.trim();\n    const matches = source.match(descriptorPattern) || [];\n    let eventName = matches[2];\n    let keyFilter = matches[3];\n    if (keyFilter && ![\"keydown\", \"keyup\", \"keypress\"].includes(eventName)) {\n        eventName += `.${keyFilter}`;\n        keyFilter = \"\";\n    }\n    return {\n        eventTarget: parseEventTarget(matches[4]),\n        eventName,\n        eventOptions: matches[7] ? parseEventOptions(matches[7]) : {},\n        identifier: matches[5],\n        methodName: matches[6],\n        keyFilter: matches[1] || keyFilter,\n    };\n}\nfunction parseEventTarget(eventTargetName) {\n    if (eventTargetName == \"window\") {\n        return window;\n    }\n    else if (eventTargetName == \"document\") {\n        return document;\n    }\n}\nfunction parseEventOptions(eventOptions) {\n    return eventOptions\n        .split(\":\")\n        .reduce((options, token) => Object.assign(options, { [token.replace(/^!/, \"\")]: !/^!/.test(token) }), {});\n}\nfunction stringifyEventTarget(eventTarget) {\n    if (eventTarget == window) {\n        return \"window\";\n    }\n    else if (eventTarget == document) {\n        return \"document\";\n    }\n}\n\nfunction camelize(value) {\n    return value.replace(/(?:[_-])([a-z0-9])/g, (_, char) => char.toUpperCase());\n}\nfunction namespaceCamelize(value) {\n    return camelize(value.replace(/--/g, \"-\").replace(/__/g, \"_\"));\n}\nfunction capitalize(value) {\n    return value.charAt(0).toUpperCase() + value.slice(1);\n}\nfunction dasherize(value) {\n    return value.replace(/([A-Z])/g, (_, char) => `-${char.toLowerCase()}`);\n}\nfunction tokenize(value) {\n    return value.match(/[^\\s]+/g) || [];\n}\n\nfunction isSomething(object) {\n    return object !== null && object !== undefined;\n}\nfunction hasProperty(object, property) {\n    return Object.prototype.hasOwnProperty.call(object, property);\n}\n\nconst allModifiers = [\"meta\", \"ctrl\", \"alt\", \"shift\"];\nclass Action {\n    constructor(element, index, descriptor, schema) {\n        this.element = element;\n        this.index = index;\n        this.eventTarget = descriptor.eventTarget || element;\n        this.eventName = descriptor.eventName || getDefaultEventNameForElement(element) || error(\"missing event name\");\n        this.eventOptions = descriptor.eventOptions || {};\n        this.identifier = descriptor.identifier || error(\"missing identifier\");\n        this.methodName = descriptor.methodName || error(\"missing method name\");\n        this.keyFilter = descriptor.keyFilter || \"\";\n        this.schema = schema;\n    }\n    static forToken(token, schema) {\n        return new this(token.element, token.index, parseActionDescriptorString(token.content), schema);\n    }\n    toString() {\n        const eventFilter = this.keyFilter ? `.${this.keyFilter}` : \"\";\n        const eventTarget = this.eventTargetName ? `@${this.eventTargetName}` : \"\";\n        return `${this.eventName}${eventFilter}${eventTarget}->${this.identifier}#${this.methodName}`;\n    }\n    shouldIgnoreKeyboardEvent(event) {\n        if (!this.keyFilter) {\n            return false;\n        }\n        const filters = this.keyFilter.split(\"+\");\n        if (this.keyFilterDissatisfied(event, filters)) {\n            return true;\n        }\n        const standardFilter = filters.filter((key) => !allModifiers.includes(key))[0];\n        if (!standardFilter) {\n            return false;\n        }\n        if (!hasProperty(this.keyMappings, standardFilter)) {\n            error(`contains unknown key filter: ${this.keyFilter}`);\n        }\n        return this.keyMappings[standardFilter].toLowerCase() !== event.key.toLowerCase();\n    }\n    shouldIgnoreMouseEvent(event) {\n        if (!this.keyFilter) {\n            return false;\n        }\n        const filters = [this.keyFilter];\n        if (this.keyFilterDissatisfied(event, filters)) {\n            return true;\n        }\n        return false;\n    }\n    get params() {\n        const params = {};\n        const pattern = new RegExp(`^data-${this.identifier}-(.+)-param$`, \"i\");\n        for (const { name, value } of Array.from(this.element.attributes)) {\n            const match = name.match(pattern);\n            const key = match && match[1];\n            if (key) {\n                params[camelize(key)] = typecast(value);\n            }\n        }\n        return params;\n    }\n    get eventTargetName() {\n        return stringifyEventTarget(this.eventTarget);\n    }\n    get keyMappings() {\n        return this.schema.keyMappings;\n    }\n    keyFilterDissatisfied(event, filters) {\n        const [meta, ctrl, alt, shift] = allModifiers.map((modifier) => filters.includes(modifier));\n        return event.metaKey !== meta || event.ctrlKey !== ctrl || event.altKey !== alt || event.shiftKey !== shift;\n    }\n}\nconst defaultEventNames = {\n    a: () => \"click\",\n    button: () => \"click\",\n    form: () => \"submit\",\n    details: () => \"toggle\",\n    input: (e) => (e.getAttribute(\"type\") == \"submit\" ? \"click\" : \"input\"),\n    select: () => \"change\",\n    textarea: () => \"input\",\n};\nfunction getDefaultEventNameForElement(element) {\n    const tagName = element.tagName.toLowerCase();\n    if (tagName in defaultEventNames) {\n        return defaultEventNames[tagName](element);\n    }\n}\nfunction error(message) {\n    throw new Error(message);\n}\nfunction typecast(value) {\n    try {\n        return JSON.parse(value);\n    }\n    catch (o_O) {\n        return value;\n    }\n}\n\nclass Binding {\n    constructor(context, action) {\n        this.context = context;\n        this.action = action;\n    }\n    get index() {\n        return this.action.index;\n    }\n    get eventTarget() {\n        return this.action.eventTarget;\n    }\n    get eventOptions() {\n        return this.action.eventOptions;\n    }\n    get identifier() {\n        return this.context.identifier;\n    }\n    handleEvent(event) {\n        const actionEvent = this.prepareActionEvent(event);\n        if (this.willBeInvokedByEvent(event) && this.applyEventModifiers(actionEvent)) {\n            this.invokeWithEvent(actionEvent);\n        }\n    }\n    get eventName() {\n        return this.action.eventName;\n    }\n    get method() {\n        const method = this.controller[this.methodName];\n        if (typeof method == \"function\") {\n            return method;\n        }\n        throw new Error(`Action \"${this.action}\" references undefined method \"${this.methodName}\"`);\n    }\n    applyEventModifiers(event) {\n        const { element } = this.action;\n        const { actionDescriptorFilters } = this.context.application;\n        const { controller } = this.context;\n        let passes = true;\n        for (const [name, value] of Object.entries(this.eventOptions)) {\n            if (name in actionDescriptorFilters) {\n                const filter = actionDescriptorFilters[name];\n                passes = passes && filter({ name, value, event, element, controller });\n            }\n            else {\n                continue;\n            }\n        }\n        return passes;\n    }\n    prepareActionEvent(event) {\n        return Object.assign(event, { params: this.action.params });\n    }\n    invokeWithEvent(event) {\n        const { target, currentTarget } = event;\n        try {\n            this.method.call(this.controller, event);\n            this.context.logDebugActivity(this.methodName, { event, target, currentTarget, action: this.methodName });\n        }\n        catch (error) {\n            const { identifier, controller, element, index } = this;\n            const detail = { identifier, controller, element, index, event };\n            this.context.handleError(error, `invoking action \"${this.action}\"`, detail);\n        }\n    }\n    willBeInvokedByEvent(event) {\n        const eventTarget = event.target;\n        if (event instanceof KeyboardEvent && this.action.shouldIgnoreKeyboardEvent(event)) {\n            return false;\n        }\n        if (event instanceof MouseEvent && this.action.shouldIgnoreMouseEvent(event)) {\n            return false;\n        }\n        if (this.element === eventTarget) {\n            return true;\n        }\n        else if (eventTarget instanceof Element && this.element.contains(eventTarget)) {\n            return this.scope.containsElement(eventTarget);\n        }\n        else {\n            return this.scope.containsElement(this.action.element);\n        }\n    }\n    get controller() {\n        return this.context.controller;\n    }\n    get methodName() {\n        return this.action.methodName;\n    }\n    get element() {\n        return this.scope.element;\n    }\n    get scope() {\n        return this.context.scope;\n    }\n}\n\nclass ElementObserver {\n    constructor(element, delegate) {\n        this.mutationObserverInit = { attributes: true, childList: true, subtree: true };\n        this.element = element;\n        this.started = false;\n        this.delegate = delegate;\n        this.elements = new Set();\n        this.mutationObserver = new MutationObserver((mutations) => this.processMutations(mutations));\n    }\n    start() {\n        if (!this.started) {\n            this.started = true;\n            this.mutationObserver.observe(this.element, this.mutationObserverInit);\n            this.refresh();\n        }\n    }\n    pause(callback) {\n        if (this.started) {\n            this.mutationObserver.disconnect();\n            this.started = false;\n        }\n        callback();\n        if (!this.started) {\n            this.mutationObserver.observe(this.element, this.mutationObserverInit);\n            this.started = true;\n        }\n    }\n    stop() {\n        if (this.started) {\n            this.mutationObserver.takeRecords();\n            this.mutationObserver.disconnect();\n            this.started = false;\n        }\n    }\n    refresh() {\n        if (this.started) {\n            const matches = new Set(this.matchElementsInTree());\n            for (const element of Array.from(this.elements)) {\n                if (!matches.has(element)) {\n                    this.removeElement(element);\n                }\n            }\n            for (const element of Array.from(matches)) {\n                this.addElement(element);\n            }\n        }\n    }\n    processMutations(mutations) {\n        if (this.started) {\n            for (const mutation of mutations) {\n                this.processMutation(mutation);\n            }\n        }\n    }\n    processMutation(mutation) {\n        if (mutation.type == \"attributes\") {\n            this.processAttributeChange(mutation.target, mutation.attributeName);\n        }\n        else if (mutation.type == \"childList\") {\n            this.processRemovedNodes(mutation.removedNodes);\n            this.processAddedNodes(mutation.addedNodes);\n        }\n    }\n    processAttributeChange(element, attributeName) {\n        if (this.elements.has(element)) {\n            if (this.delegate.elementAttributeChanged && this.matchElement(element)) {\n                this.delegate.elementAttributeChanged(element, attributeName);\n            }\n            else {\n                this.removeElement(element);\n            }\n        }\n        else if (this.matchElement(element)) {\n            this.addElement(element);\n        }\n    }\n    processRemovedNodes(nodes) {\n        for (const node of Array.from(nodes)) {\n            const element = this.elementFromNode(node);\n            if (element) {\n                this.processTree(element, this.removeElement);\n            }\n        }\n    }\n    processAddedNodes(nodes) {\n        for (const node of Array.from(nodes)) {\n            const element = this.elementFromNode(node);\n            if (element && this.elementIsActive(element)) {\n                this.processTree(element, this.addElement);\n            }\n        }\n    }\n    matchElement(element) {\n        return this.delegate.matchElement(element);\n    }\n    matchElementsInTree(tree = this.element) {\n        return this.delegate.matchElementsInTree(tree);\n    }\n    processTree(tree, processor) {\n        for (const element of this.matchElementsInTree(tree)) {\n            processor.call(this, element);\n        }\n    }\n    elementFromNode(node) {\n        if (node.nodeType == Node.ELEMENT_NODE) {\n            return node;\n        }\n    }\n    elementIsActive(element) {\n        if (element.isConnected != this.element.isConnected) {\n            return false;\n        }\n        else {\n            return this.element.contains(element);\n        }\n    }\n    addElement(element) {\n        if (!this.elements.has(element)) {\n            if (this.elementIsActive(element)) {\n                this.elements.add(element);\n                if (this.delegate.elementMatched) {\n                    this.delegate.elementMatched(element);\n                }\n            }\n        }\n    }\n    removeElement(element) {\n        if (this.elements.has(element)) {\n            this.elements.delete(element);\n            if (this.delegate.elementUnmatched) {\n                this.delegate.elementUnmatched(element);\n            }\n        }\n    }\n}\n\nclass AttributeObserver {\n    constructor(element, attributeName, delegate) {\n        this.attributeName = attributeName;\n        this.delegate = delegate;\n        this.elementObserver = new ElementObserver(element, this);\n    }\n    get element() {\n        return this.elementObserver.element;\n    }\n    get selector() {\n        return `[${this.attributeName}]`;\n    }\n    start() {\n        this.elementObserver.start();\n    }\n    pause(callback) {\n        this.elementObserver.pause(callback);\n    }\n    stop() {\n        this.elementObserver.stop();\n    }\n    refresh() {\n        this.elementObserver.refresh();\n    }\n    get started() {\n        return this.elementObserver.started;\n    }\n    matchElement(element) {\n        return element.hasAttribute(this.attributeName);\n    }\n    matchElementsInTree(tree) {\n        const match = this.matchElement(tree) ? [tree] : [];\n        const matches = Array.from(tree.querySelectorAll(this.selector));\n        return match.concat(matches);\n    }\n    elementMatched(element) {\n        if (this.delegate.elementMatchedAttribute) {\n            this.delegate.elementMatchedAttribute(element, this.attributeName);\n        }\n    }\n    elementUnmatched(element) {\n        if (this.delegate.elementUnmatchedAttribute) {\n            this.delegate.elementUnmatchedAttribute(element, this.attributeName);\n        }\n    }\n    elementAttributeChanged(element, attributeName) {\n        if (this.delegate.elementAttributeValueChanged && this.attributeName == attributeName) {\n            this.delegate.elementAttributeValueChanged(element, attributeName);\n        }\n    }\n}\n\nfunction add(map, key, value) {\n    fetch(map, key).add(value);\n}\nfunction del(map, key, value) {\n    fetch(map, key).delete(value);\n    prune(map, key);\n}\nfunction fetch(map, key) {\n    let values = map.get(key);\n    if (!values) {\n        values = new Set();\n        map.set(key, values);\n    }\n    return values;\n}\nfunction prune(map, key) {\n    const values = map.get(key);\n    if (values != null && values.size == 0) {\n        map.delete(key);\n    }\n}\n\nclass Multimap {\n    constructor() {\n        this.valuesByKey = new Map();\n    }\n    get keys() {\n        return Array.from(this.valuesByKey.keys());\n    }\n    get values() {\n        const sets = Array.from(this.valuesByKey.values());\n        return sets.reduce((values, set) => values.concat(Array.from(set)), []);\n    }\n    get size() {\n        const sets = Array.from(this.valuesByKey.values());\n        return sets.reduce((size, set) => size + set.size, 0);\n    }\n    add(key, value) {\n        add(this.valuesByKey, key, value);\n    }\n    delete(key, value) {\n        del(this.valuesByKey, key, value);\n    }\n    has(key, value) {\n        const values = this.valuesByKey.get(key);\n        return values != null && values.has(value);\n    }\n    hasKey(key) {\n        return this.valuesByKey.has(key);\n    }\n    hasValue(value) {\n        const sets = Array.from(this.valuesByKey.values());\n        return sets.some((set) => set.has(value));\n    }\n    getValuesForKey(key) {\n        const values = this.valuesByKey.get(key);\n        return values ? Array.from(values) : [];\n    }\n    getKeysForValue(value) {\n        return Array.from(this.valuesByKey)\n            .filter(([_key, values]) => values.has(value))\n            .map(([key, _values]) => key);\n    }\n}\n\nclass IndexedMultimap extends Multimap {\n    constructor() {\n        super();\n        this.keysByValue = new Map();\n    }\n    get values() {\n        return Array.from(this.keysByValue.keys());\n    }\n    add(key, value) {\n        super.add(key, value);\n        add(this.keysByValue, value, key);\n    }\n    delete(key, value) {\n        super.delete(key, value);\n        del(this.keysByValue, value, key);\n    }\n    hasValue(value) {\n        return this.keysByValue.has(value);\n    }\n    getKeysForValue(value) {\n        const set = this.keysByValue.get(value);\n        return set ? Array.from(set) : [];\n    }\n}\n\nclass SelectorObserver {\n    constructor(element, selector, delegate, details) {\n        this._selector = selector;\n        this.details = details;\n        this.elementObserver = new ElementObserver(element, this);\n        this.delegate = delegate;\n        this.matchesByElement = new Multimap();\n    }\n    get started() {\n        return this.elementObserver.started;\n    }\n    get selector() {\n        return this._selector;\n    }\n    set selector(selector) {\n        this._selector = selector;\n        this.refresh();\n    }\n    start() {\n        this.elementObserver.start();\n    }\n    pause(callback) {\n        this.elementObserver.pause(callback);\n    }\n    stop() {\n        this.elementObserver.stop();\n    }\n    refresh() {\n        this.elementObserver.refresh();\n    }\n    get element() {\n        return this.elementObserver.element;\n    }\n    matchElement(element) {\n        const { selector } = this;\n        if (selector) {\n            const matches = element.matches(selector);\n            if (this.delegate.selectorMatchElement) {\n                return matches && this.delegate.selectorMatchElement(element, this.details);\n            }\n            return matches;\n        }\n        else {\n            return false;\n        }\n    }\n    matchElementsInTree(tree) {\n        const { selector } = this;\n        if (selector) {\n            const match = this.matchElement(tree) ? [tree] : [];\n            const matches = Array.from(tree.querySelectorAll(selector)).filter((match) => this.matchElement(match));\n            return match.concat(matches);\n        }\n        else {\n            return [];\n        }\n    }\n    elementMatched(element) {\n        const { selector } = this;\n        if (selector) {\n            this.selectorMatched(element, selector);\n        }\n    }\n    elementUnmatched(element) {\n        const selectors = this.matchesByElement.getKeysForValue(element);\n        for (const selector of selectors) {\n            this.selectorUnmatched(element, selector);\n        }\n    }\n    elementAttributeChanged(element, _attributeName) {\n        const { selector } = this;\n        if (selector) {\n            const matches = this.matchElement(element);\n            const matchedBefore = this.matchesByElement.has(selector, element);\n            if (matches && !matchedBefore) {\n                this.selectorMatched(element, selector);\n            }\n            else if (!matches && matchedBefore) {\n                this.selectorUnmatched(element, selector);\n            }\n        }\n    }\n    selectorMatched(element, selector) {\n        this.delegate.selectorMatched(element, selector, this.details);\n        this.matchesByElement.add(selector, element);\n    }\n    selectorUnmatched(element, selector) {\n        this.delegate.selectorUnmatched(element, selector, this.details);\n        this.matchesByElement.delete(selector, element);\n    }\n}\n\nclass StringMapObserver {\n    constructor(element, delegate) {\n        this.element = element;\n        this.delegate = delegate;\n        this.started = false;\n        this.stringMap = new Map();\n        this.mutationObserver = new MutationObserver((mutations) => this.processMutations(mutations));\n    }\n    start() {\n        if (!this.started) {\n            this.started = true;\n            this.mutationObserver.observe(this.element, { attributes: true, attributeOldValue: true });\n            this.refresh();\n        }\n    }\n    stop() {\n        if (this.started) {\n            this.mutationObserver.takeRecords();\n            this.mutationObserver.disconnect();\n            this.started = false;\n        }\n    }\n    refresh() {\n        if (this.started) {\n            for (const attributeName of this.knownAttributeNames) {\n                this.refreshAttribute(attributeName, null);\n            }\n        }\n    }\n    processMutations(mutations) {\n        if (this.started) {\n            for (const mutation of mutations) {\n                this.processMutation(mutation);\n            }\n        }\n    }\n    processMutation(mutation) {\n        const attributeName = mutation.attributeName;\n        if (attributeName) {\n            this.refreshAttribute(attributeName, mutation.oldValue);\n        }\n    }\n    refreshAttribute(attributeName, oldValue) {\n        const key = this.delegate.getStringMapKeyForAttribute(attributeName);\n        if (key != null) {\n            if (!this.stringMap.has(attributeName)) {\n                this.stringMapKeyAdded(key, attributeName);\n            }\n            const value = this.element.getAttribute(attributeName);\n            if (this.stringMap.get(attributeName) != value) {\n                this.stringMapValueChanged(value, key, oldValue);\n            }\n            if (value == null) {\n                const oldValue = this.stringMap.get(attributeName);\n                this.stringMap.delete(attributeName);\n                if (oldValue)\n                    this.stringMapKeyRemoved(key, attributeName, oldValue);\n            }\n            else {\n                this.stringMap.set(attributeName, value);\n            }\n        }\n    }\n    stringMapKeyAdded(key, attributeName) {\n        if (this.delegate.stringMapKeyAdded) {\n            this.delegate.stringMapKeyAdded(key, attributeName);\n        }\n    }\n    stringMapValueChanged(value, key, oldValue) {\n        if (this.delegate.stringMapValueChanged) {\n            this.delegate.stringMapValueChanged(value, key, oldValue);\n        }\n    }\n    stringMapKeyRemoved(key, attributeName, oldValue) {\n        if (this.delegate.stringMapKeyRemoved) {\n            this.delegate.stringMapKeyRemoved(key, attributeName, oldValue);\n        }\n    }\n    get knownAttributeNames() {\n        return Array.from(new Set(this.currentAttributeNames.concat(this.recordedAttributeNames)));\n    }\n    get currentAttributeNames() {\n        return Array.from(this.element.attributes).map((attribute) => attribute.name);\n    }\n    get recordedAttributeNames() {\n        return Array.from(this.stringMap.keys());\n    }\n}\n\nclass TokenListObserver {\n    constructor(element, attributeName, delegate) {\n        this.attributeObserver = new AttributeObserver(element, attributeName, this);\n        this.delegate = delegate;\n        this.tokensByElement = new Multimap();\n    }\n    get started() {\n        return this.attributeObserver.started;\n    }\n    start() {\n        this.attributeObserver.start();\n    }\n    pause(callback) {\n        this.attributeObserver.pause(callback);\n    }\n    stop() {\n        this.attributeObserver.stop();\n    }\n    refresh() {\n        this.attributeObserver.refresh();\n    }\n    get element() {\n        return this.attributeObserver.element;\n    }\n    get attributeName() {\n        return this.attributeObserver.attributeName;\n    }\n    elementMatchedAttribute(element) {\n        this.tokensMatched(this.readTokensForElement(element));\n    }\n    elementAttributeValueChanged(element) {\n        const [unmatchedTokens, matchedTokens] = this.refreshTokensForElement(element);\n        this.tokensUnmatched(unmatchedTokens);\n        this.tokensMatched(matchedTokens);\n    }\n    elementUnmatchedAttribute(element) {\n        this.tokensUnmatched(this.tokensByElement.getValuesForKey(element));\n    }\n    tokensMatched(tokens) {\n        tokens.forEach((token) => this.tokenMatched(token));\n    }\n    tokensUnmatched(tokens) {\n        tokens.forEach((token) => this.tokenUnmatched(token));\n    }\n    tokenMatched(token) {\n        this.delegate.tokenMatched(token);\n        this.tokensByElement.add(token.element, token);\n    }\n    tokenUnmatched(token) {\n        this.delegate.tokenUnmatched(token);\n        this.tokensByElement.delete(token.element, token);\n    }\n    refreshTokensForElement(element) {\n        const previousTokens = this.tokensByElement.getValuesForKey(element);\n        const currentTokens = this.readTokensForElement(element);\n        const firstDifferingIndex = zip(previousTokens, currentTokens).findIndex(([previousToken, currentToken]) => !tokensAreEqual(previousToken, currentToken));\n        if (firstDifferingIndex == -1) {\n            return [[], []];\n        }\n        else {\n            return [previousTokens.slice(firstDifferingIndex), currentTokens.slice(firstDifferingIndex)];\n        }\n    }\n    readTokensForElement(element) {\n        const attributeName = this.attributeName;\n        const tokenString = element.getAttribute(attributeName) || \"\";\n        return parseTokenString(tokenString, element, attributeName);\n    }\n}\nfunction parseTokenString(tokenString, element, attributeName) {\n    return tokenString\n        .trim()\n        .split(/\\s+/)\n        .filter((content) => content.length)\n        .map((content, index) => ({ element, attributeName, content, index }));\n}\nfunction zip(left, right) {\n    const length = Math.max(left.length, right.length);\n    return Array.from({ length }, (_, index) => [left[index], right[index]]);\n}\nfunction tokensAreEqual(left, right) {\n    return left && right && left.index == right.index && left.content == right.content;\n}\n\nclass ValueListObserver {\n    constructor(element, attributeName, delegate) {\n        this.tokenListObserver = new TokenListObserver(element, attributeName, this);\n        this.delegate = delegate;\n        this.parseResultsByToken = new WeakMap();\n        this.valuesByTokenByElement = new WeakMap();\n    }\n    get started() {\n        return this.tokenListObserver.started;\n    }\n    start() {\n        this.tokenListObserver.start();\n    }\n    stop() {\n        this.tokenListObserver.stop();\n    }\n    refresh() {\n        this.tokenListObserver.refresh();\n    }\n    get element() {\n        return this.tokenListObserver.element;\n    }\n    get attributeName() {\n        return this.tokenListObserver.attributeName;\n    }\n    tokenMatched(token) {\n        const { element } = token;\n        const { value } = this.fetchParseResultForToken(token);\n        if (value) {\n            this.fetchValuesByTokenForElement(element).set(token, value);\n            this.delegate.elementMatchedValue(element, value);\n        }\n    }\n    tokenUnmatched(token) {\n        const { element } = token;\n        const { value } = this.fetchParseResultForToken(token);\n        if (value) {\n            this.fetchValuesByTokenForElement(element).delete(token);\n            this.delegate.elementUnmatchedValue(element, value);\n        }\n    }\n    fetchParseResultForToken(token) {\n        let parseResult = this.parseResultsByToken.get(token);\n        if (!parseResult) {\n            parseResult = this.parseToken(token);\n            this.parseResultsByToken.set(token, parseResult);\n        }\n        return parseResult;\n    }\n    fetchValuesByTokenForElement(element) {\n        let valuesByToken = this.valuesByTokenByElement.get(element);\n        if (!valuesByToken) {\n            valuesByToken = new Map();\n            this.valuesByTokenByElement.set(element, valuesByToken);\n        }\n        return valuesByToken;\n    }\n    parseToken(token) {\n        try {\n            const value = this.delegate.parseValueForToken(token);\n            return { value };\n        }\n        catch (error) {\n            return { error };\n        }\n    }\n}\n\nclass BindingObserver {\n    constructor(context, delegate) {\n        this.context = context;\n        this.delegate = delegate;\n        this.bindingsByAction = new Map();\n    }\n    start() {\n        if (!this.valueListObserver) {\n            this.valueListObserver = new ValueListObserver(this.element, this.actionAttribute, this);\n            this.valueListObserver.start();\n        }\n    }\n    stop() {\n        if (this.valueListObserver) {\n            this.valueListObserver.stop();\n            delete this.valueListObserver;\n            this.disconnectAllActions();\n        }\n    }\n    get element() {\n        return this.context.element;\n    }\n    get identifier() {\n        return this.context.identifier;\n    }\n    get actionAttribute() {\n        return this.schema.actionAttribute;\n    }\n    get schema() {\n        return this.context.schema;\n    }\n    get bindings() {\n        return Array.from(this.bindingsByAction.values());\n    }\n    connectAction(action) {\n        const binding = new Binding(this.context, action);\n        this.bindingsByAction.set(action, binding);\n        this.delegate.bindingConnected(binding);\n    }\n    disconnectAction(action) {\n        const binding = this.bindingsByAction.get(action);\n        if (binding) {\n            this.bindingsByAction.delete(action);\n            this.delegate.bindingDisconnected(binding);\n        }\n    }\n    disconnectAllActions() {\n        this.bindings.forEach((binding) => this.delegate.bindingDisconnected(binding, true));\n        this.bindingsByAction.clear();\n    }\n    parseValueForToken(token) {\n        const action = Action.forToken(token, this.schema);\n        if (action.identifier == this.identifier) {\n            return action;\n        }\n    }\n    elementMatchedValue(element, action) {\n        this.connectAction(action);\n    }\n    elementUnmatchedValue(element, action) {\n        this.disconnectAction(action);\n    }\n}\n\nclass ValueObserver {\n    constructor(context, receiver) {\n        this.context = context;\n        this.receiver = receiver;\n        this.stringMapObserver = new StringMapObserver(this.element, this);\n        this.valueDescriptorMap = this.controller.valueDescriptorMap;\n    }\n    start() {\n        this.stringMapObserver.start();\n        this.invokeChangedCallbacksForDefaultValues();\n    }\n    stop() {\n        this.stringMapObserver.stop();\n    }\n    get element() {\n        return this.context.element;\n    }\n    get controller() {\n        return this.context.controller;\n    }\n    getStringMapKeyForAttribute(attributeName) {\n        if (attributeName in this.valueDescriptorMap) {\n            return this.valueDescriptorMap[attributeName].name;\n        }\n    }\n    stringMapKeyAdded(key, attributeName) {\n        const descriptor = this.valueDescriptorMap[attributeName];\n        if (!this.hasValue(key)) {\n            this.invokeChangedCallback(key, descriptor.writer(this.receiver[key]), descriptor.writer(descriptor.defaultValue));\n        }\n    }\n    stringMapValueChanged(value, name, oldValue) {\n        const descriptor = this.valueDescriptorNameMap[name];\n        if (value === null)\n            return;\n        if (oldValue === null) {\n            oldValue = descriptor.writer(descriptor.defaultValue);\n        }\n        this.invokeChangedCallback(name, value, oldValue);\n    }\n    stringMapKeyRemoved(key, attributeName, oldValue) {\n        const descriptor = this.valueDescriptorNameMap[key];\n        if (this.hasValue(key)) {\n            this.invokeChangedCallback(key, descriptor.writer(this.receiver[key]), oldValue);\n        }\n        else {\n            this.invokeChangedCallback(key, descriptor.writer(descriptor.defaultValue), oldValue);\n        }\n    }\n    invokeChangedCallbacksForDefaultValues() {\n        for (const { key, name, defaultValue, writer } of this.valueDescriptors) {\n            if (defaultValue != undefined && !this.controller.data.has(key)) {\n                this.invokeChangedCallback(name, writer(defaultValue), undefined);\n            }\n        }\n    }\n    invokeChangedCallback(name, rawValue, rawOldValue) {\n        const changedMethodName = `${name}Changed`;\n        const changedMethod = this.receiver[changedMethodName];\n        if (typeof changedMethod == \"function\") {\n            const descriptor = this.valueDescriptorNameMap[name];\n            try {\n                const value = descriptor.reader(rawValue);\n                let oldValue = rawOldValue;\n                if (rawOldValue) {\n                    oldValue = descriptor.reader(rawOldValue);\n                }\n                changedMethod.call(this.receiver, value, oldValue);\n            }\n            catch (error) {\n                if (error instanceof TypeError) {\n                    error.message = `Stimulus Value \"${this.context.identifier}.${descriptor.name}\" - ${error.message}`;\n                }\n                throw error;\n            }\n        }\n    }\n    get valueDescriptors() {\n        const { valueDescriptorMap } = this;\n        return Object.keys(valueDescriptorMap).map((key) => valueDescriptorMap[key]);\n    }\n    get valueDescriptorNameMap() {\n        const descriptors = {};\n        Object.keys(this.valueDescriptorMap).forEach((key) => {\n            const descriptor = this.valueDescriptorMap[key];\n            descriptors[descriptor.name] = descriptor;\n        });\n        return descriptors;\n    }\n    hasValue(attributeName) {\n        const descriptor = this.valueDescriptorNameMap[attributeName];\n        const hasMethodName = `has${capitalize(descriptor.name)}`;\n        return this.receiver[hasMethodName];\n    }\n}\n\nclass TargetObserver {\n    constructor(context, delegate) {\n        this.context = context;\n        this.delegate = delegate;\n        this.targetsByName = new Multimap();\n    }\n    start() {\n        if (!this.tokenListObserver) {\n            this.tokenListObserver = new TokenListObserver(this.element, this.attributeName, this);\n            this.tokenListObserver.start();\n        }\n    }\n    stop() {\n        if (this.tokenListObserver) {\n            this.disconnectAllTargets();\n            this.tokenListObserver.stop();\n            delete this.tokenListObserver;\n        }\n    }\n    tokenMatched({ element, content: name }) {\n        if (this.scope.containsElement(element)) {\n            this.connectTarget(element, name);\n        }\n    }\n    tokenUnmatched({ element, content: name }) {\n        this.disconnectTarget(element, name);\n    }\n    connectTarget(element, name) {\n        var _a;\n        if (!this.targetsByName.has(name, element)) {\n            this.targetsByName.add(name, element);\n            (_a = this.tokenListObserver) === null || _a === void 0 ? void 0 : _a.pause(() => this.delegate.targetConnected(element, name));\n        }\n    }\n    disconnectTarget(element, name) {\n        var _a;\n        if (this.targetsByName.has(name, element)) {\n            this.targetsByName.delete(name, element);\n            (_a = this.tokenListObserver) === null || _a === void 0 ? void 0 : _a.pause(() => this.delegate.targetDisconnected(element, name));\n        }\n    }\n    disconnectAllTargets() {\n        for (const name of this.targetsByName.keys) {\n            for (const element of this.targetsByName.getValuesForKey(name)) {\n                this.disconnectTarget(element, name);\n            }\n        }\n    }\n    get attributeName() {\n        return `data-${this.context.identifier}-target`;\n    }\n    get element() {\n        return this.context.element;\n    }\n    get scope() {\n        return this.context.scope;\n    }\n}\n\nfunction readInheritableStaticArrayValues(constructor, propertyName) {\n    const ancestors = getAncestorsForConstructor(constructor);\n    return Array.from(ancestors.reduce((values, constructor) => {\n        getOwnStaticArrayValues(constructor, propertyName).forEach((name) => values.add(name));\n        return values;\n    }, new Set()));\n}\nfunction readInheritableStaticObjectPairs(constructor, propertyName) {\n    const ancestors = getAncestorsForConstructor(constructor);\n    return ancestors.reduce((pairs, constructor) => {\n        pairs.push(...getOwnStaticObjectPairs(constructor, propertyName));\n        return pairs;\n    }, []);\n}\nfunction getAncestorsForConstructor(constructor) {\n    const ancestors = [];\n    while (constructor) {\n        ancestors.push(constructor);\n        constructor = Object.getPrototypeOf(constructor);\n    }\n    return ancestors.reverse();\n}\nfunction getOwnStaticArrayValues(constructor, propertyName) {\n    const definition = constructor[propertyName];\n    return Array.isArray(definition) ? definition : [];\n}\nfunction getOwnStaticObjectPairs(constructor, propertyName) {\n    const definition = constructor[propertyName];\n    return definition ? Object.keys(definition).map((key) => [key, definition[key]]) : [];\n}\n\nclass OutletObserver {\n    constructor(context, delegate) {\n        this.started = false;\n        this.context = context;\n        this.delegate = delegate;\n        this.outletsByName = new Multimap();\n        this.outletElementsByName = new Multimap();\n        this.selectorObserverMap = new Map();\n        this.attributeObserverMap = new Map();\n    }\n    start() {\n        if (!this.started) {\n            this.outletDefinitions.forEach((outletName) => {\n                this.setupSelectorObserverForOutlet(outletName);\n                this.setupAttributeObserverForOutlet(outletName);\n            });\n            this.started = true;\n            this.dependentContexts.forEach((context) => context.refresh());\n        }\n    }\n    refresh() {\n        this.selectorObserverMap.forEach((observer) => observer.refresh());\n        this.attributeObserverMap.forEach((observer) => observer.refresh());\n    }\n    stop() {\n        if (this.started) {\n            this.started = false;\n            this.disconnectAllOutlets();\n            this.stopSelectorObservers();\n            this.stopAttributeObservers();\n        }\n    }\n    stopSelectorObservers() {\n        if (this.selectorObserverMap.size > 0) {\n            this.selectorObserverMap.forEach((observer) => observer.stop());\n            this.selectorObserverMap.clear();\n        }\n    }\n    stopAttributeObservers() {\n        if (this.attributeObserverMap.size > 0) {\n            this.attributeObserverMap.forEach((observer) => observer.stop());\n            this.attributeObserverMap.clear();\n        }\n    }\n    selectorMatched(element, _selector, { outletName }) {\n        const outlet = this.getOutlet(element, outletName);\n        if (outlet) {\n            this.connectOutlet(outlet, element, outletName);\n        }\n    }\n    selectorUnmatched(element, _selector, { outletName }) {\n        const outlet = this.getOutletFromMap(element, outletName);\n        if (outlet) {\n            this.disconnectOutlet(outlet, element, outletName);\n        }\n    }\n    selectorMatchElement(element, { outletName }) {\n        const selector = this.selector(outletName);\n        const hasOutlet = this.hasOutlet(element, outletName);\n        const hasOutletController = element.matches(`[${this.schema.controllerAttribute}~=${outletName}]`);\n        if (selector) {\n            return hasOutlet && hasOutletController && element.matches(selector);\n        }\n        else {\n            return false;\n        }\n    }\n    elementMatchedAttribute(_element, attributeName) {\n        const outletName = this.getOutletNameFromOutletAttributeName(attributeName);\n        if (outletName) {\n            this.updateSelectorObserverForOutlet(outletName);\n        }\n    }\n    elementAttributeValueChanged(_element, attributeName) {\n        const outletName = this.getOutletNameFromOutletAttributeName(attributeName);\n        if (outletName) {\n            this.updateSelectorObserverForOutlet(outletName);\n        }\n    }\n    elementUnmatchedAttribute(_element, attributeName) {\n        const outletName = this.getOutletNameFromOutletAttributeName(attributeName);\n        if (outletName) {\n            this.updateSelectorObserverForOutlet(outletName);\n        }\n    }\n    connectOutlet(outlet, element, outletName) {\n        var _a;\n        if (!this.outletElementsByName.has(outletName, element)) {\n            this.outletsByName.add(outletName, outlet);\n            this.outletElementsByName.add(outletName, element);\n            (_a = this.selectorObserverMap.get(outletName)) === null || _a === void 0 ? void 0 : _a.pause(() => this.delegate.outletConnected(outlet, element, outletName));\n        }\n    }\n    disconnectOutlet(outlet, element, outletName) {\n        var _a;\n        if (this.outletElementsByName.has(outletName, element)) {\n            this.outletsByName.delete(outletName, outlet);\n            this.outletElementsByName.delete(outletName, element);\n            (_a = this.selectorObserverMap\n                .get(outletName)) === null || _a === void 0 ? void 0 : _a.pause(() => this.delegate.outletDisconnected(outlet, element, outletName));\n        }\n    }\n    disconnectAllOutlets() {\n        for (const outletName of this.outletElementsByName.keys) {\n            for (const element of this.outletElementsByName.getValuesForKey(outletName)) {\n                for (const outlet of this.outletsByName.getValuesForKey(outletName)) {\n                    this.disconnectOutlet(outlet, element, outletName);\n                }\n            }\n        }\n    }\n    updateSelectorObserverForOutlet(outletName) {\n        const observer = this.selectorObserverMap.get(outletName);\n        if (observer) {\n            observer.selector = this.selector(outletName);\n        }\n    }\n    setupSelectorObserverForOutlet(outletName) {\n        const selector = this.selector(outletName);\n        const selectorObserver = new SelectorObserver(document.body, selector, this, { outletName });\n        this.selectorObserverMap.set(outletName, selectorObserver);\n        selectorObserver.start();\n    }\n    setupAttributeObserverForOutlet(outletName) {\n        const attributeName = this.attributeNameForOutletName(outletName);\n        const attributeObserver = new AttributeObserver(this.scope.element, attributeName, this);\n        this.attributeObserverMap.set(outletName, attributeObserver);\n        attributeObserver.start();\n    }\n    selector(outletName) {\n        return this.scope.outlets.getSelectorForOutletName(outletName);\n    }\n    attributeNameForOutletName(outletName) {\n        return this.scope.schema.outletAttributeForScope(this.identifier, outletName);\n    }\n    getOutletNameFromOutletAttributeName(attributeName) {\n        return this.outletDefinitions.find((outletName) => this.attributeNameForOutletName(outletName) === attributeName);\n    }\n    get outletDependencies() {\n        const dependencies = new Multimap();\n        this.router.modules.forEach((module) => {\n            const constructor = module.definition.controllerConstructor;\n            const outlets = readInheritableStaticArrayValues(constructor, \"outlets\");\n            outlets.forEach((outlet) => dependencies.add(outlet, module.identifier));\n        });\n        return dependencies;\n    }\n    get outletDefinitions() {\n        return this.outletDependencies.getKeysForValue(this.identifier);\n    }\n    get dependentControllerIdentifiers() {\n        return this.outletDependencies.getValuesForKey(this.identifier);\n    }\n    get dependentContexts() {\n        const identifiers = this.dependentControllerIdentifiers;\n        return this.router.contexts.filter((context) => identifiers.includes(context.identifier));\n    }\n    hasOutlet(element, outletName) {\n        return !!this.getOutlet(element, outletName) || !!this.getOutletFromMap(element, outletName);\n    }\n    getOutlet(element, outletName) {\n        return this.application.getControllerForElementAndIdentifier(element, outletName);\n    }\n    getOutletFromMap(element, outletName) {\n        return this.outletsByName.getValuesForKey(outletName).find((outlet) => outlet.element === element);\n    }\n    get scope() {\n        return this.context.scope;\n    }\n    get schema() {\n        return this.context.schema;\n    }\n    get identifier() {\n        return this.context.identifier;\n    }\n    get application() {\n        return this.context.application;\n    }\n    get router() {\n        return this.application.router;\n    }\n}\n\nclass Context {\n    constructor(module, scope) {\n        this.logDebugActivity = (functionName, detail = {}) => {\n            const { identifier, controller, element } = this;\n            detail = Object.assign({ identifier, controller, element }, detail);\n            this.application.logDebugActivity(this.identifier, functionName, detail);\n        };\n        this.module = module;\n        this.scope = scope;\n        this.controller = new module.controllerConstructor(this);\n        this.bindingObserver = new BindingObserver(this, this.dispatcher);\n        this.valueObserver = new ValueObserver(this, this.controller);\n        this.targetObserver = new TargetObserver(this, this);\n        this.outletObserver = new OutletObserver(this, this);\n        try {\n            this.controller.initialize();\n            this.logDebugActivity(\"initialize\");\n        }\n        catch (error) {\n            this.handleError(error, \"initializing controller\");\n        }\n    }\n    connect() {\n        this.bindingObserver.start();\n        this.valueObserver.start();\n        this.targetObserver.start();\n        this.outletObserver.start();\n        try {\n            this.controller.connect();\n            this.logDebugActivity(\"connect\");\n        }\n        catch (error) {\n            this.handleError(error, \"connecting controller\");\n        }\n    }\n    refresh() {\n        this.outletObserver.refresh();\n    }\n    disconnect() {\n        try {\n            this.controller.disconnect();\n            this.logDebugActivity(\"disconnect\");\n        }\n        catch (error) {\n            this.handleError(error, \"disconnecting controller\");\n        }\n        this.outletObserver.stop();\n        this.targetObserver.stop();\n        this.valueObserver.stop();\n        this.bindingObserver.stop();\n    }\n    get application() {\n        return this.module.application;\n    }\n    get identifier() {\n        return this.module.identifier;\n    }\n    get schema() {\n        return this.application.schema;\n    }\n    get dispatcher() {\n        return this.application.dispatcher;\n    }\n    get element() {\n        return this.scope.element;\n    }\n    get parentElement() {\n        return this.element.parentElement;\n    }\n    handleError(error, message, detail = {}) {\n        const { identifier, controller, element } = this;\n        detail = Object.assign({ identifier, controller, element }, detail);\n        this.application.handleError(error, `Error ${message}`, detail);\n    }\n    targetConnected(element, name) {\n        this.invokeControllerMethod(`${name}TargetConnected`, element);\n    }\n    targetDisconnected(element, name) {\n        this.invokeControllerMethod(`${name}TargetDisconnected`, element);\n    }\n    outletConnected(outlet, element, name) {\n        this.invokeControllerMethod(`${namespaceCamelize(name)}OutletConnected`, outlet, element);\n    }\n    outletDisconnected(outlet, element, name) {\n        this.invokeControllerMethod(`${namespaceCamelize(name)}OutletDisconnected`, outlet, element);\n    }\n    invokeControllerMethod(methodName, ...args) {\n        const controller = this.controller;\n        if (typeof controller[methodName] == \"function\") {\n            controller[methodName](...args);\n        }\n    }\n}\n\nfunction bless(constructor) {\n    return shadow(constructor, getBlessedProperties(constructor));\n}\nfunction shadow(constructor, properties) {\n    const shadowConstructor = extend(constructor);\n    const shadowProperties = getShadowProperties(constructor.prototype, properties);\n    Object.defineProperties(shadowConstructor.prototype, shadowProperties);\n    return shadowConstructor;\n}\nfunction getBlessedProperties(constructor) {\n    const blessings = readInheritableStaticArrayValues(constructor, \"blessings\");\n    return blessings.reduce((blessedProperties, blessing) => {\n        const properties = blessing(constructor);\n        for (const key in properties) {\n            const descriptor = blessedProperties[key] || {};\n            blessedProperties[key] = Object.assign(descriptor, properties[key]);\n        }\n        return blessedProperties;\n    }, {});\n}\nfunction getShadowProperties(prototype, properties) {\n    return getOwnKeys(properties).reduce((shadowProperties, key) => {\n        const descriptor = getShadowedDescriptor(prototype, properties, key);\n        if (descriptor) {\n            Object.assign(shadowProperties, { [key]: descriptor });\n        }\n        return shadowProperties;\n    }, {});\n}\nfunction getShadowedDescriptor(prototype, properties, key) {\n    const shadowingDescriptor = Object.getOwnPropertyDescriptor(prototype, key);\n    const shadowedByValue = shadowingDescriptor && \"value\" in shadowingDescriptor;\n    if (!shadowedByValue) {\n        const descriptor = Object.getOwnPropertyDescriptor(properties, key).value;\n        if (shadowingDescriptor) {\n            descriptor.get = shadowingDescriptor.get || descriptor.get;\n            descriptor.set = shadowingDescriptor.set || descriptor.set;\n        }\n        return descriptor;\n    }\n}\nconst getOwnKeys = (() => {\n    if (typeof Object.getOwnPropertySymbols == \"function\") {\n        return (object) => [...Object.getOwnPropertyNames(object), ...Object.getOwnPropertySymbols(object)];\n    }\n    else {\n        return Object.getOwnPropertyNames;\n    }\n})();\nconst extend = (() => {\n    function extendWithReflect(constructor) {\n        function extended() {\n            return Reflect.construct(constructor, arguments, new.target);\n        }\n        extended.prototype = Object.create(constructor.prototype, {\n            constructor: { value: extended },\n        });\n        Reflect.setPrototypeOf(extended, constructor);\n        return extended;\n    }\n    function testReflectExtension() {\n        const a = function () {\n            this.a.call(this);\n        };\n        const b = extendWithReflect(a);\n        b.prototype.a = function () { };\n        return new b();\n    }\n    try {\n        testReflectExtension();\n        return extendWithReflect;\n    }\n    catch (error) {\n        return (constructor) => class extended extends constructor {\n        };\n    }\n})();\n\nfunction blessDefinition(definition) {\n    return {\n        identifier: definition.identifier,\n        controllerConstructor: bless(definition.controllerConstructor),\n    };\n}\n\nclass Module {\n    constructor(application, definition) {\n        this.application = application;\n        this.definition = blessDefinition(definition);\n        this.contextsByScope = new WeakMap();\n        this.connectedContexts = new Set();\n    }\n    get identifier() {\n        return this.definition.identifier;\n    }\n    get controllerConstructor() {\n        return this.definition.controllerConstructor;\n    }\n    get contexts() {\n        return Array.from(this.connectedContexts);\n    }\n    connectContextForScope(scope) {\n        const context = this.fetchContextForScope(scope);\n        this.connectedContexts.add(context);\n        context.connect();\n    }\n    disconnectContextForScope(scope) {\n        const context = this.contextsByScope.get(scope);\n        if (context) {\n            this.connectedContexts.delete(context);\n            context.disconnect();\n        }\n    }\n    fetchContextForScope(scope) {\n        let context = this.contextsByScope.get(scope);\n        if (!context) {\n            context = new Context(this, scope);\n            this.contextsByScope.set(scope, context);\n        }\n        return context;\n    }\n}\n\nclass ClassMap {\n    constructor(scope) {\n        this.scope = scope;\n    }\n    has(name) {\n        return this.data.has(this.getDataKey(name));\n    }\n    get(name) {\n        return this.getAll(name)[0];\n    }\n    getAll(name) {\n        const tokenString = this.data.get(this.getDataKey(name)) || \"\";\n        return tokenize(tokenString);\n    }\n    getAttributeName(name) {\n        return this.data.getAttributeNameForKey(this.getDataKey(name));\n    }\n    getDataKey(name) {\n        return `${name}-class`;\n    }\n    get data() {\n        return this.scope.data;\n    }\n}\n\nclass DataMap {\n    constructor(scope) {\n        this.scope = scope;\n    }\n    get element() {\n        return this.scope.element;\n    }\n    get identifier() {\n        return this.scope.identifier;\n    }\n    get(key) {\n        const name = this.getAttributeNameForKey(key);\n        return this.element.getAttribute(name);\n    }\n    set(key, value) {\n        const name = this.getAttributeNameForKey(key);\n        this.element.setAttribute(name, value);\n        return this.get(key);\n    }\n    has(key) {\n        const name = this.getAttributeNameForKey(key);\n        return this.element.hasAttribute(name);\n    }\n    delete(key) {\n        if (this.has(key)) {\n            const name = this.getAttributeNameForKey(key);\n            this.element.removeAttribute(name);\n            return true;\n        }\n        else {\n            return false;\n        }\n    }\n    getAttributeNameForKey(key) {\n        return `data-${this.identifier}-${dasherize(key)}`;\n    }\n}\n\nclass Guide {\n    constructor(logger) {\n        this.warnedKeysByObject = new WeakMap();\n        this.logger = logger;\n    }\n    warn(object, key, message) {\n        let warnedKeys = this.warnedKeysByObject.get(object);\n        if (!warnedKeys) {\n            warnedKeys = new Set();\n            this.warnedKeysByObject.set(object, warnedKeys);\n        }\n        if (!warnedKeys.has(key)) {\n            warnedKeys.add(key);\n            this.logger.warn(message, object);\n        }\n    }\n}\n\nfunction attributeValueContainsToken(attributeName, token) {\n    return `[${attributeName}~=\"${token}\"]`;\n}\n\nclass TargetSet {\n    constructor(scope) {\n        this.scope = scope;\n    }\n    get element() {\n        return this.scope.element;\n    }\n    get identifier() {\n        return this.scope.identifier;\n    }\n    get schema() {\n        return this.scope.schema;\n    }\n    has(targetName) {\n        return this.find(targetName) != null;\n    }\n    find(...targetNames) {\n        return targetNames.reduce((target, targetName) => target || this.findTarget(targetName) || this.findLegacyTarget(targetName), undefined);\n    }\n    findAll(...targetNames) {\n        return targetNames.reduce((targets, targetName) => [\n            ...targets,\n            ...this.findAllTargets(targetName),\n            ...this.findAllLegacyTargets(targetName),\n        ], []);\n    }\n    findTarget(targetName) {\n        const selector = this.getSelectorForTargetName(targetName);\n        return this.scope.findElement(selector);\n    }\n    findAllTargets(targetName) {\n        const selector = this.getSelectorForTargetName(targetName);\n        return this.scope.findAllElements(selector);\n    }\n    getSelectorForTargetName(targetName) {\n        const attributeName = this.schema.targetAttributeForScope(this.identifier);\n        return attributeValueContainsToken(attributeName, targetName);\n    }\n    findLegacyTarget(targetName) {\n        const selector = this.getLegacySelectorForTargetName(targetName);\n        return this.deprecate(this.scope.findElement(selector), targetName);\n    }\n    findAllLegacyTargets(targetName) {\n        const selector = this.getLegacySelectorForTargetName(targetName);\n        return this.scope.findAllElements(selector).map((element) => this.deprecate(element, targetName));\n    }\n    getLegacySelectorForTargetName(targetName) {\n        const targetDescriptor = `${this.identifier}.${targetName}`;\n        return attributeValueContainsToken(this.schema.targetAttribute, targetDescriptor);\n    }\n    deprecate(element, targetName) {\n        if (element) {\n            const { identifier } = this;\n            const attributeName = this.schema.targetAttribute;\n            const revisedAttributeName = this.schema.targetAttributeForScope(identifier);\n            this.guide.warn(element, `target:${targetName}`, `Please replace ${attributeName}=\"${identifier}.${targetName}\" with ${revisedAttributeName}=\"${targetName}\". ` +\n                `The ${attributeName} attribute is deprecated and will be removed in a future version of Stimulus.`);\n        }\n        return element;\n    }\n    get guide() {\n        return this.scope.guide;\n    }\n}\n\nclass OutletSet {\n    constructor(scope, controllerElement) {\n        this.scope = scope;\n        this.controllerElement = controllerElement;\n    }\n    get element() {\n        return this.scope.element;\n    }\n    get identifier() {\n        return this.scope.identifier;\n    }\n    get schema() {\n        return this.scope.schema;\n    }\n    has(outletName) {\n        return this.find(outletName) != null;\n    }\n    find(...outletNames) {\n        return outletNames.reduce((outlet, outletName) => outlet || this.findOutlet(outletName), undefined);\n    }\n    findAll(...outletNames) {\n        return outletNames.reduce((outlets, outletName) => [...outlets, ...this.findAllOutlets(outletName)], []);\n    }\n    getSelectorForOutletName(outletName) {\n        const attributeName = this.schema.outletAttributeForScope(this.identifier, outletName);\n        return this.controllerElement.getAttribute(attributeName);\n    }\n    findOutlet(outletName) {\n        const selector = this.getSelectorForOutletName(outletName);\n        if (selector)\n            return this.findElement(selector, outletName);\n    }\n    findAllOutlets(outletName) {\n        const selector = this.getSelectorForOutletName(outletName);\n        return selector ? this.findAllElements(selector, outletName) : [];\n    }\n    findElement(selector, outletName) {\n        const elements = this.scope.queryElements(selector);\n        return elements.filter((element) => this.matchesElement(element, selector, outletName))[0];\n    }\n    findAllElements(selector, outletName) {\n        const elements = this.scope.queryElements(selector);\n        return elements.filter((element) => this.matchesElement(element, selector, outletName));\n    }\n    matchesElement(element, selector, outletName) {\n        const controllerAttribute = element.getAttribute(this.scope.schema.controllerAttribute) || \"\";\n        return element.matches(selector) && controllerAttribute.split(\" \").includes(outletName);\n    }\n}\n\nclass Scope {\n    constructor(schema, element, identifier, logger) {\n        this.targets = new TargetSet(this);\n        this.classes = new ClassMap(this);\n        this.data = new DataMap(this);\n        this.containsElement = (element) => {\n            return element.closest(this.controllerSelector) === this.element;\n        };\n        this.schema = schema;\n        this.element = element;\n        this.identifier = identifier;\n        this.guide = new Guide(logger);\n        this.outlets = new OutletSet(this.documentScope, element);\n    }\n    findElement(selector) {\n        return this.element.matches(selector) ? this.element : this.queryElements(selector).find(this.containsElement);\n    }\n    findAllElements(selector) {\n        return [\n            ...(this.element.matches(selector) ? [this.element] : []),\n            ...this.queryElements(selector).filter(this.containsElement),\n        ];\n    }\n    queryElements(selector) {\n        return Array.from(this.element.querySelectorAll(selector));\n    }\n    get controllerSelector() {\n        return attributeValueContainsToken(this.schema.controllerAttribute, this.identifier);\n    }\n    get isDocumentScope() {\n        return this.element === document.documentElement;\n    }\n    get documentScope() {\n        return this.isDocumentScope\n            ? this\n            : new Scope(this.schema, document.documentElement, this.identifier, this.guide.logger);\n    }\n}\n\nclass ScopeObserver {\n    constructor(element, schema, delegate) {\n        this.element = element;\n        this.schema = schema;\n        this.delegate = delegate;\n        this.valueListObserver = new ValueListObserver(this.element, this.controllerAttribute, this);\n        this.scopesByIdentifierByElement = new WeakMap();\n        this.scopeReferenceCounts = new WeakMap();\n    }\n    start() {\n        this.valueListObserver.start();\n    }\n    stop() {\n        this.valueListObserver.stop();\n    }\n    get controllerAttribute() {\n        return this.schema.controllerAttribute;\n    }\n    parseValueForToken(token) {\n        const { element, content: identifier } = token;\n        return this.parseValueForElementAndIdentifier(element, identifier);\n    }\n    parseValueForElementAndIdentifier(element, identifier) {\n        const scopesByIdentifier = this.fetchScopesByIdentifierForElement(element);\n        let scope = scopesByIdentifier.get(identifier);\n        if (!scope) {\n            scope = this.delegate.createScopeForElementAndIdentifier(element, identifier);\n            scopesByIdentifier.set(identifier, scope);\n        }\n        return scope;\n    }\n    elementMatchedValue(element, value) {\n        const referenceCount = (this.scopeReferenceCounts.get(value) || 0) + 1;\n        this.scopeReferenceCounts.set(value, referenceCount);\n        if (referenceCount == 1) {\n            this.delegate.scopeConnected(value);\n        }\n    }\n    elementUnmatchedValue(element, value) {\n        const referenceCount = this.scopeReferenceCounts.get(value);\n        if (referenceCount) {\n            this.scopeReferenceCounts.set(value, referenceCount - 1);\n            if (referenceCount == 1) {\n                this.delegate.scopeDisconnected(value);\n            }\n        }\n    }\n    fetchScopesByIdentifierForElement(element) {\n        let scopesByIdentifier = this.scopesByIdentifierByElement.get(element);\n        if (!scopesByIdentifier) {\n            scopesByIdentifier = new Map();\n            this.scopesByIdentifierByElement.set(element, scopesByIdentifier);\n        }\n        return scopesByIdentifier;\n    }\n}\n\nclass Router {\n    constructor(application) {\n        this.application = application;\n        this.scopeObserver = new ScopeObserver(this.element, this.schema, this);\n        this.scopesByIdentifier = new Multimap();\n        this.modulesByIdentifier = new Map();\n    }\n    get element() {\n        return this.application.element;\n    }\n    get schema() {\n        return this.application.schema;\n    }\n    get logger() {\n        return this.application.logger;\n    }\n    get controllerAttribute() {\n        return this.schema.controllerAttribute;\n    }\n    get modules() {\n        return Array.from(this.modulesByIdentifier.values());\n    }\n    get contexts() {\n        return this.modules.reduce((contexts, module) => contexts.concat(module.contexts), []);\n    }\n    start() {\n        this.scopeObserver.start();\n    }\n    stop() {\n        this.scopeObserver.stop();\n    }\n    loadDefinition(definition) {\n        this.unloadIdentifier(definition.identifier);\n        const module = new Module(this.application, definition);\n        this.connectModule(module);\n        const afterLoad = definition.controllerConstructor.afterLoad;\n        if (afterLoad) {\n            afterLoad.call(definition.controllerConstructor, definition.identifier, this.application);\n        }\n    }\n    unloadIdentifier(identifier) {\n        const module = this.modulesByIdentifier.get(identifier);\n        if (module) {\n            this.disconnectModule(module);\n        }\n    }\n    getContextForElementAndIdentifier(element, identifier) {\n        const module = this.modulesByIdentifier.get(identifier);\n        if (module) {\n            return module.contexts.find((context) => context.element == element);\n        }\n    }\n    proposeToConnectScopeForElementAndIdentifier(element, identifier) {\n        const scope = this.scopeObserver.parseValueForElementAndIdentifier(element, identifier);\n        if (scope) {\n            this.scopeObserver.elementMatchedValue(scope.element, scope);\n        }\n        else {\n            console.error(`Couldn't find or create scope for identifier: \"${identifier}\" and element:`, element);\n        }\n    }\n    handleError(error, message, detail) {\n        this.application.handleError(error, message, detail);\n    }\n    createScopeForElementAndIdentifier(element, identifier) {\n        return new Scope(this.schema, element, identifier, this.logger);\n    }\n    scopeConnected(scope) {\n        this.scopesByIdentifier.add(scope.identifier, scope);\n        const module = this.modulesByIdentifier.get(scope.identifier);\n        if (module) {\n            module.connectContextForScope(scope);\n        }\n    }\n    scopeDisconnected(scope) {\n        this.scopesByIdentifier.delete(scope.identifier, scope);\n        const module = this.modulesByIdentifier.get(scope.identifier);\n        if (module) {\n            module.disconnectContextForScope(scope);\n        }\n    }\n    connectModule(module) {\n        this.modulesByIdentifier.set(module.identifier, module);\n        const scopes = this.scopesByIdentifier.getValuesForKey(module.identifier);\n        scopes.forEach((scope) => module.connectContextForScope(scope));\n    }\n    disconnectModule(module) {\n        this.modulesByIdentifier.delete(module.identifier);\n        const scopes = this.scopesByIdentifier.getValuesForKey(module.identifier);\n        scopes.forEach((scope) => module.disconnectContextForScope(scope));\n    }\n}\n\nconst defaultSchema = {\n    controllerAttribute: \"data-controller\",\n    actionAttribute: \"data-action\",\n    targetAttribute: \"data-target\",\n    targetAttributeForScope: (identifier) => `data-${identifier}-target`,\n    outletAttributeForScope: (identifier, outlet) => `data-${identifier}-${outlet}-outlet`,\n    keyMappings: Object.assign(Object.assign({ enter: \"Enter\", tab: \"Tab\", esc: \"Escape\", space: \" \", up: \"ArrowUp\", down: \"ArrowDown\", left: \"ArrowLeft\", right: \"ArrowRight\", home: \"Home\", end: \"End\", page_up: \"PageUp\", page_down: \"PageDown\" }, objectFromEntries(\"abcdefghijklmnopqrstuvwxyz\".split(\"\").map((c) => [c, c]))), objectFromEntries(\"0123456789\".split(\"\").map((n) => [n, n]))),\n};\nfunction objectFromEntries(array) {\n    return array.reduce((memo, [k, v]) => (Object.assign(Object.assign({}, memo), { [k]: v })), {});\n}\n\nclass Application {\n    constructor(element = document.documentElement, schema = defaultSchema) {\n        this.logger = console;\n        this.debug = false;\n        this.logDebugActivity = (identifier, functionName, detail = {}) => {\n            if (this.debug) {\n                this.logFormattedMessage(identifier, functionName, detail);\n            }\n        };\n        this.element = element;\n        this.schema = schema;\n        this.dispatcher = new Dispatcher(this);\n        this.router = new Router(this);\n        this.actionDescriptorFilters = Object.assign({}, defaultActionDescriptorFilters);\n    }\n    static start(element, schema) {\n        const application = new this(element, schema);\n        application.start();\n        return application;\n    }\n    async start() {\n        await domReady();\n        this.logDebugActivity(\"application\", \"starting\");\n        this.dispatcher.start();\n        this.router.start();\n        this.logDebugActivity(\"application\", \"start\");\n    }\n    stop() {\n        this.logDebugActivity(\"application\", \"stopping\");\n        this.dispatcher.stop();\n        this.router.stop();\n        this.logDebugActivity(\"application\", \"stop\");\n    }\n    register(identifier, controllerConstructor) {\n        this.load({ identifier, controllerConstructor });\n    }\n    registerActionOption(name, filter) {\n        this.actionDescriptorFilters[name] = filter;\n    }\n    load(head, ...rest) {\n        const definitions = Array.isArray(head) ? head : [head, ...rest];\n        definitions.forEach((definition) => {\n            if (definition.controllerConstructor.shouldLoad) {\n                this.router.loadDefinition(definition);\n            }\n        });\n    }\n    unload(head, ...rest) {\n        const identifiers = Array.isArray(head) ? head : [head, ...rest];\n        identifiers.forEach((identifier) => this.router.unloadIdentifier(identifier));\n    }\n    get controllers() {\n        return this.router.contexts.map((context) => context.controller);\n    }\n    getControllerForElementAndIdentifier(element, identifier) {\n        const context = this.router.getContextForElementAndIdentifier(element, identifier);\n        return context ? context.controller : null;\n    }\n    handleError(error, message, detail) {\n        var _a;\n        this.logger.error(`%s\\n\\n%o\\n\\n%o`, message, error, detail);\n        (_a = window.onerror) === null || _a === void 0 ? void 0 : _a.call(window, message, \"\", 0, 0, error);\n    }\n    logFormattedMessage(identifier, functionName, detail = {}) {\n        detail = Object.assign({ application: this }, detail);\n        this.logger.groupCollapsed(`${identifier} #${functionName}`);\n        this.logger.log(\"details:\", Object.assign({}, detail));\n        this.logger.groupEnd();\n    }\n}\nfunction domReady() {\n    return new Promise((resolve) => {\n        if (document.readyState == \"loading\") {\n            document.addEventListener(\"DOMContentLoaded\", () => resolve());\n        }\n        else {\n            resolve();\n        }\n    });\n}\n\nfunction ClassPropertiesBlessing(constructor) {\n    const classes = readInheritableStaticArrayValues(constructor, \"classes\");\n    return classes.reduce((properties, classDefinition) => {\n        return Object.assign(properties, propertiesForClassDefinition(classDefinition));\n    }, {});\n}\nfunction propertiesForClassDefinition(key) {\n    return {\n        [`${key}Class`]: {\n            get() {\n                const { classes } = this;\n                if (classes.has(key)) {\n                    return classes.get(key);\n                }\n                else {\n                    const attribute = classes.getAttributeName(key);\n                    throw new Error(`Missing attribute \"${attribute}\"`);\n                }\n            },\n        },\n        [`${key}Classes`]: {\n            get() {\n                return this.classes.getAll(key);\n            },\n        },\n        [`has${capitalize(key)}Class`]: {\n            get() {\n                return this.classes.has(key);\n            },\n        },\n    };\n}\n\nfunction OutletPropertiesBlessing(constructor) {\n    const outlets = readInheritableStaticArrayValues(constructor, \"outlets\");\n    return outlets.reduce((properties, outletDefinition) => {\n        return Object.assign(properties, propertiesForOutletDefinition(outletDefinition));\n    }, {});\n}\nfunction getOutletController(controller, element, identifier) {\n    return controller.application.getControllerForElementAndIdentifier(element, identifier);\n}\nfunction getControllerAndEnsureConnectedScope(controller, element, outletName) {\n    let outletController = getOutletController(controller, element, outletName);\n    if (outletController)\n        return outletController;\n    controller.application.router.proposeToConnectScopeForElementAndIdentifier(element, outletName);\n    outletController = getOutletController(controller, element, outletName);\n    if (outletController)\n        return outletController;\n}\nfunction propertiesForOutletDefinition(name) {\n    const camelizedName = namespaceCamelize(name);\n    return {\n        [`${camelizedName}Outlet`]: {\n            get() {\n                const outletElement = this.outlets.find(name);\n                const selector = this.outlets.getSelectorForOutletName(name);\n                if (outletElement) {\n                    const outletController = getControllerAndEnsureConnectedScope(this, outletElement, name);\n                    if (outletController)\n                        return outletController;\n                    throw new Error(`The provided outlet element is missing an outlet controller \"${name}\" instance for host controller \"${this.identifier}\"`);\n                }\n                throw new Error(`Missing outlet element \"${name}\" for host controller \"${this.identifier}\". Stimulus couldn't find a matching outlet element using selector \"${selector}\".`);\n            },\n        },\n        [`${camelizedName}Outlets`]: {\n            get() {\n                const outlets = this.outlets.findAll(name);\n                if (outlets.length > 0) {\n                    return outlets\n                        .map((outletElement) => {\n                        const outletController = getControllerAndEnsureConnectedScope(this, outletElement, name);\n                        if (outletController)\n                            return outletController;\n                        console.warn(`The provided outlet element is missing an outlet controller \"${name}\" instance for host controller \"${this.identifier}\"`, outletElement);\n                    })\n                        .filter((controller) => controller);\n                }\n                return [];\n            },\n        },\n        [`${camelizedName}OutletElement`]: {\n            get() {\n                const outletElement = this.outlets.find(name);\n                const selector = this.outlets.getSelectorForOutletName(name);\n                if (outletElement) {\n                    return outletElement;\n                }\n                else {\n                    throw new Error(`Missing outlet element \"${name}\" for host controller \"${this.identifier}\". Stimulus couldn't find a matching outlet element using selector \"${selector}\".`);\n                }\n            },\n        },\n        [`${camelizedName}OutletElements`]: {\n            get() {\n                return this.outlets.findAll(name);\n            },\n        },\n        [`has${capitalize(camelizedName)}Outlet`]: {\n            get() {\n                return this.outlets.has(name);\n            },\n        },\n    };\n}\n\nfunction TargetPropertiesBlessing(constructor) {\n    const targets = readInheritableStaticArrayValues(constructor, \"targets\");\n    return targets.reduce((properties, targetDefinition) => {\n        return Object.assign(properties, propertiesForTargetDefinition(targetDefinition));\n    }, {});\n}\nfunction propertiesForTargetDefinition(name) {\n    return {\n        [`${name}Target`]: {\n            get() {\n                const target = this.targets.find(name);\n                if (target) {\n                    return target;\n                }\n                else {\n                    throw new Error(`Missing target element \"${name}\" for \"${this.identifier}\" controller`);\n                }\n            },\n        },\n        [`${name}Targets`]: {\n            get() {\n                return this.targets.findAll(name);\n            },\n        },\n        [`has${capitalize(name)}Target`]: {\n            get() {\n                return this.targets.has(name);\n            },\n        },\n    };\n}\n\nfunction ValuePropertiesBlessing(constructor) {\n    const valueDefinitionPairs = readInheritableStaticObjectPairs(constructor, \"values\");\n    const propertyDescriptorMap = {\n        valueDescriptorMap: {\n            get() {\n                return valueDefinitionPairs.reduce((result, valueDefinitionPair) => {\n                    const valueDescriptor = parseValueDefinitionPair(valueDefinitionPair, this.identifier);\n                    const attributeName = this.data.getAttributeNameForKey(valueDescriptor.key);\n                    return Object.assign(result, { [attributeName]: valueDescriptor });\n                }, {});\n            },\n        },\n    };\n    return valueDefinitionPairs.reduce((properties, valueDefinitionPair) => {\n        return Object.assign(properties, propertiesForValueDefinitionPair(valueDefinitionPair));\n    }, propertyDescriptorMap);\n}\nfunction propertiesForValueDefinitionPair(valueDefinitionPair, controller) {\n    const definition = parseValueDefinitionPair(valueDefinitionPair, controller);\n    const { key, name, reader: read, writer: write } = definition;\n    return {\n        [name]: {\n            get() {\n                const value = this.data.get(key);\n                if (value !== null) {\n                    return read(value);\n                }\n                else {\n                    return definition.defaultValue;\n                }\n            },\n            set(value) {\n                if (value === undefined) {\n                    this.data.delete(key);\n                }\n                else {\n                    this.data.set(key, write(value));\n                }\n            },\n        },\n        [`has${capitalize(name)}`]: {\n            get() {\n                return this.data.has(key) || definition.hasCustomDefaultValue;\n            },\n        },\n    };\n}\nfunction parseValueDefinitionPair([token, typeDefinition], controller) {\n    return valueDescriptorForTokenAndTypeDefinition({\n        controller,\n        token,\n        typeDefinition,\n    });\n}\nfunction parseValueTypeConstant(constant) {\n    switch (constant) {\n        case Array:\n            return \"array\";\n        case Boolean:\n            return \"boolean\";\n        case Number:\n            return \"number\";\n        case Object:\n            return \"object\";\n        case String:\n            return \"string\";\n    }\n}\nfunction parseValueTypeDefault(defaultValue) {\n    switch (typeof defaultValue) {\n        case \"boolean\":\n            return \"boolean\";\n        case \"number\":\n            return \"number\";\n        case \"string\":\n            return \"string\";\n    }\n    if (Array.isArray(defaultValue))\n        return \"array\";\n    if (Object.prototype.toString.call(defaultValue) === \"[object Object]\")\n        return \"object\";\n}\nfunction parseValueTypeObject(payload) {\n    const { controller, token, typeObject } = payload;\n    const hasType = isSomething(typeObject.type);\n    const hasDefault = isSomething(typeObject.default);\n    const fullObject = hasType && hasDefault;\n    const onlyType = hasType && !hasDefault;\n    const onlyDefault = !hasType && hasDefault;\n    const typeFromObject = parseValueTypeConstant(typeObject.type);\n    const typeFromDefaultValue = parseValueTypeDefault(payload.typeObject.default);\n    if (onlyType)\n        return typeFromObject;\n    if (onlyDefault)\n        return typeFromDefaultValue;\n    if (typeFromObject !== typeFromDefaultValue) {\n        const propertyPath = controller ? `${controller}.${token}` : token;\n        throw new Error(`The specified default value for the Stimulus Value \"${propertyPath}\" must match the defined type \"${typeFromObject}\". The provided default value of \"${typeObject.default}\" is of type \"${typeFromDefaultValue}\".`);\n    }\n    if (fullObject)\n        return typeFromObject;\n}\nfunction parseValueTypeDefinition(payload) {\n    const { controller, token, typeDefinition } = payload;\n    const typeObject = { controller, token, typeObject: typeDefinition };\n    const typeFromObject = parseValueTypeObject(typeObject);\n    const typeFromDefaultValue = parseValueTypeDefault(typeDefinition);\n    const typeFromConstant = parseValueTypeConstant(typeDefinition);\n    const type = typeFromObject || typeFromDefaultValue || typeFromConstant;\n    if (type)\n        return type;\n    const propertyPath = controller ? `${controller}.${typeDefinition}` : token;\n    throw new Error(`Unknown value type \"${propertyPath}\" for \"${token}\" value`);\n}\nfunction defaultValueForDefinition(typeDefinition) {\n    const constant = parseValueTypeConstant(typeDefinition);\n    if (constant)\n        return defaultValuesByType[constant];\n    const hasDefault = hasProperty(typeDefinition, \"default\");\n    const hasType = hasProperty(typeDefinition, \"type\");\n    const typeObject = typeDefinition;\n    if (hasDefault)\n        return typeObject.default;\n    if (hasType) {\n        const { type } = typeObject;\n        const constantFromType = parseValueTypeConstant(type);\n        if (constantFromType)\n            return defaultValuesByType[constantFromType];\n    }\n    return typeDefinition;\n}\nfunction valueDescriptorForTokenAndTypeDefinition(payload) {\n    const { token, typeDefinition } = payload;\n    const key = `${dasherize(token)}-value`;\n    const type = parseValueTypeDefinition(payload);\n    return {\n        type,\n        key,\n        name: camelize(key),\n        get defaultValue() {\n            return defaultValueForDefinition(typeDefinition);\n        },\n        get hasCustomDefaultValue() {\n            return parseValueTypeDefault(typeDefinition) !== undefined;\n        },\n        reader: readers[type],\n        writer: writers[type] || writers.default,\n    };\n}\nconst defaultValuesByType = {\n    get array() {\n        return [];\n    },\n    boolean: false,\n    number: 0,\n    get object() {\n        return {};\n    },\n    string: \"\",\n};\nconst readers = {\n    array(value) {\n        const array = JSON.parse(value);\n        if (!Array.isArray(array)) {\n            throw new TypeError(`expected value of type \"array\" but instead got value \"${value}\" of type \"${parseValueTypeDefault(array)}\"`);\n        }\n        return array;\n    },\n    boolean(value) {\n        return !(value == \"0\" || String(value).toLowerCase() == \"false\");\n    },\n    number(value) {\n        return Number(value.replace(/_/g, \"\"));\n    },\n    object(value) {\n        const object = JSON.parse(value);\n        if (object === null || typeof object != \"object\" || Array.isArray(object)) {\n            throw new TypeError(`expected value of type \"object\" but instead got value \"${value}\" of type \"${parseValueTypeDefault(object)}\"`);\n        }\n        return object;\n    },\n    string(value) {\n        return value;\n    },\n};\nconst writers = {\n    default: writeString,\n    array: writeJSON,\n    object: writeJSON,\n};\nfunction writeJSON(value) {\n    return JSON.stringify(value);\n}\nfunction writeString(value) {\n    return `${value}`;\n}\n\nclass Controller {\n    constructor(context) {\n        this.context = context;\n    }\n    static get shouldLoad() {\n        return true;\n    }\n    static afterLoad(_identifier, _application) {\n        return;\n    }\n    get application() {\n        return this.context.application;\n    }\n    get scope() {\n        return this.context.scope;\n    }\n    get element() {\n        return this.scope.element;\n    }\n    get identifier() {\n        return this.scope.identifier;\n    }\n    get targets() {\n        return this.scope.targets;\n    }\n    get outlets() {\n        return this.scope.outlets;\n    }\n    get classes() {\n        return this.scope.classes;\n    }\n    get data() {\n        return this.scope.data;\n    }\n    initialize() {\n    }\n    connect() {\n    }\n    disconnect() {\n    }\n    dispatch(eventName, { target = this.element, detail = {}, prefix = this.identifier, bubbles = true, cancelable = true, } = {}) {\n        const type = prefix ? `${prefix}:${eventName}` : eventName;\n        const event = new CustomEvent(type, { detail, bubbles, cancelable });\n        target.dispatchEvent(event);\n        return event;\n    }\n}\nController.blessings = [\n    ClassPropertiesBlessing,\n    TargetPropertiesBlessing,\n    ValuePropertiesBlessing,\n    OutletPropertiesBlessing,\n];\nController.targets = [];\nController.outlets = [];\nController.values = {};\n\nexport { Application, AttributeObserver, Context, Controller, ElementObserver, IndexedMultimap, Multimap, SelectorObserver, StringMapObserver, TokenListObserver, ValueListObserver, add, defaultSchema, del, fetch, prune };\n", "import { Application } from \"@hotwired/stimulus\"\n\nconst application = Application.start()\n\n// Configure Stimulus development experience\napplication.debug = false\nwindow.Stimulus   = application\n\nexport { application }\n", "import { Controller } from '@hotwired/stimulus'\n\n// Import TinyMCE\nimport tinymce from 'tinymce/tinymce'\nimport 'tinymce-i18n/langs8/de' // TinyMCE 8 deutsch (Arwed E1 15.10.2026)\n// TinyMCE 8 self-hosted gebuendelt statt Tiny-Cloud-CDN (no-api-key) im Admin-Layout (EOL 2026)\nimport 'tinymce/models/dom'\nimport 'tinymce/themes/silver'\nimport 'tinymce/icons/default'\nimport 'tinymce/skins/ui/oxide/skin'\nimport 'tinymce/skins/ui/oxide/content'\nimport 'tinymce/skins/content/default/content'\nimport 'tinymce/plugins/lists'\nimport 'tinymce/plugins/link'\nimport 'tinymce/plugins/table'\nimport 'tinymce/plugins/code'\nimport 'tinymce/plugins/help'\nimport 'tinymce/plugins/help/js/i18n/keynav/de'\n\n\nexport default class extends Controller {\n    static targets = ['input']\n    static values = { contentCss: String }\n\n    initialize() {\n        this.defaults = {\n            selector: '.tinymce',\n            license_key: 'gpl', // TinyMCE 7+ (GPL), EOL 2026: -> 8.10 (XSS-Advisories < 7.9.3)\n            language: 'de',\n            menubar: false,\n            toolbar: [\n                'bold italic underline | link | bullist | styles | code | removeformat'\n            ],\n            plugins: 'lists link table code help',\n            height: 300,\n            removeformat : [\n                { selector : '*', attributes : ['style', 'class'], split : false, expand : false, deep : true }\n            ],\n            style_formats: [\n                { title: '\u00DCberschriften', items: [\n                        { title: '\u00DCberschrift mit Haken', block: 'p', classes: 'check-heading' },\n                        { title: '\u00DCberschrift mit Haken (klein)', block: 'p', classes: 'check-heading-small' },\n                        { title: '\u00DCberschrift 2 (klein)', block: 'p', classes: 'heading-size-2' },\n                        { title: '\u00DCberschrift 1 (normal)', block: 'p', classes: 'heading-size-1' },\n                        { title: '\u00DCberschrift 3 (mittel)', block: 'p', classes: 'heading-size-3' },\n                        { title: '\u00DCberschrift 4 (gro\u00DF)', block: 'p', classes: 'heading-size-4' },\n                        { title: '\u00DCberschrift 5 (sehr gro\u00DF)', block: 'p', classes: 'heading-size-5' }\n                    ]}\n            ]\n        }\n    }\n\n    connect() {\n        let config = Object.assign({ target: this.inputTarget }, this.defaults)\n        // Frontend-CSS im Editor-iframe, damit style_formats gestylt angezeigt werden\n        if (this.hasContentCssValue) config.content_css = this.contentCssValue\n        tinymce.init(config)\n    }\n\n    disconnect () {\n        if (!this.preview) tinymce.remove()\n    }\n\n    get preview () {\n        return (\n            document.documentElement.hasAttribute('data-turbolinks-preview') ||\n            document.documentElement.hasAttribute('data-turbo-preview')\n        )\n    }\n}\n", "tinymce.addI18n(\"de\", {\n    \"#\": \"#\",\n    \"Accessibility\": \"Barrierefreiheit\",\n    \"Accordion\": \"\",\n    \"Accordion body...\": \"Accordion-Textk\\xf6rper\\xa0...\",\n    \"Accordion summary...\": \"Accordion-Zusammenfassung\\xa0...\",\n    \"Action\": \"Aktion\",\n    \"Activity\": \"Aktivit\\xe4t\",\n    \"Address\": \"Adresse\",\n    \"Advanced\": \"Erweitert\",\n    \"Align\": \"Ausrichtung\",\n    \"Align center\": \"Zentrieren\",\n    \"Align left\": \"Linksb\\xfcndig ausrichten\",\n    \"Align right\": \"Rechtsb\\xfcndig ausrichten\",\n    \"Alignment\": \"Ausrichtung\",\n    \"Alignment {0}\": \"Ausrichtung {0}\",\n    \"All\": \"Alle\",\n    \"Alternative description\": \"Alternative Beschreibung\",\n    \"Alternative source\": \"Alternative Quelle\",\n    \"Alternative source URL\": \"URL der alternativen Quelle\",\n    \"Anchor\": \"Anker\",\n    \"Anchor...\": \"Textmarke ...\",\n    \"Anchors\": \"Anker\",\n    \"Animals and Nature\": \"Tiere und Natur\",\n    \"Arrows\": \"Pfeile\",\n    \"B\": \"B\",\n    \"Background color\": \"Hintergrundfarbe\",\n    \"Background color menu\": \"Hintergrundfarben-Men\\xfc\",\n    \"Background color {0}\": \"Hintergrundfarbe {0}\",\n    \"Black\": \"Schwarz\",\n    \"Block\": \"Blocksatz\",\n    \"Block {0}\": \"Block {0}\",\n    \"Blockquote\": \"Blockzitat\",\n    \"Blocks\": \"Bl\\xf6cke\",\n    \"Blue\": \"Blau\",\n    \"Blue channel\": \"Blaukanal\",\n    \"Body\": \"Inhalt\",\n    \"Bold\": \"Fett\",\n    \"Border\": \"Rahmen\",\n    \"Border color\": \"Rahmenfarbe\",\n    \"Border style\": \"Rahmenstil\",\n    \"Border width\": \"Rahmenbreite\",\n    \"Bottom\": \"Unten\",\n    \"Browse files\": \"Dateien durchsuchen\",\n    \"Browse for an image\": \"Bild suchen\",\n    \"Browse links\": \"Links durchsuchen\",\n    \"Build with {0}\": \"\",\n    \"Bullet list\": \"Aufz\\xe4hlung\",\n    \"Cancel\": \"Abbrechen\",\n    \"Caption\": \"Beschriftung\",\n    \"Cell\": \"Zelle\",\n    \"Cell padding\": \"Zelleninnenabstand\",\n    \"Cell properties\": \"Zelleigenschaften\",\n    \"Cell spacing\": \"Zellenabstand\",\n    \"Cell styles\": \"Zellstil\",\n    \"Cell type\": \"Zelltyp\",\n    \"Center\": \"Zentriert\",\n    \"Characters\": \"Zeichen\",\n    \"Characters (no spaces)\": \"Zeichen (ohne Leerzeichen)\",\n    \"Circle\": \"Kreis\",\n    \"Class\": \"Klasse\",\n    \"Clear formatting\": \"Formatierung entfernen\",\n    \"Close\": \"Schlie\\xdfen\",\n    \"Code\": \"Code\",\n    \"Code sample...\": \"Codebeispiel...\",\n    \"Code view\": \"Code Ansicht\",\n    \"Color Picker\": \"Farbwahl\",\n    \"Color swatch\": \"Farbpalette\",\n    \"Cols\": \"Spalten\",\n    \"Column\": \"Spalte\",\n    \"Column clipboard actions\": \"Spalten-Zwischenablage-Aktionen\",\n    \"Column group\": \"Spaltengruppe\",\n    \"Column header\": \"Spaltenkopf\",\n    \"Constrain proportions\": \"Seitenverh\\xe4ltnis beibehalten\",\n    \"Copy\": \"Kopieren\",\n    \"Copy column\": \"Spalte kopieren\",\n    \"Copy row\": \"Zeile kopieren\",\n    \"Could not find the specified string.\": \"Die angegebene Zeichenfolge wurde nicht gefunden.\",\n    \"Could not load emojis\": \"Emojis konnten nicht geladen werden\",\n    \"Count\": \"Anzahl\",\n    \"Currency\": \"W\\xe4hrung\",\n    \"Current window\": \"Aktuelles Fenster\",\n    \"Custom color\": \"Benutzerdefinierte Farbe\",\n    \"Custom...\": \"Benutzerdefiniert...\",\n    \"Cut\": \"Ausschneiden\",\n    \"Cut column\": \"Spalte ausschneiden\",\n    \"Cut row\": \"Zeile ausschneiden\",\n    \"Dark Blue\": \"Dunkelblau\",\n    \"Dark Gray\": \"Dunkelgrau\",\n    \"Dark Green\": \"Dunkelgr\\xfcn\",\n    \"Dark Orange\": \"Dunkelorange\",\n    \"Dark Purple\": \"Dunkellila\",\n    \"Dark Red\": \"Dunkelrot\",\n    \"Dark Turquoise\": \"Dunkelt\\xfcrkis\",\n    \"Dark Yellow\": \"Dunkelgelb\",\n    \"Dashed\": \"Gestrichelt\",\n    \"Date/time\": \"Datum/Uhrzeit\",\n    \"Decrease indent\": \"Einzug verkleinern\",\n    \"Default\": \"Standard\",\n    \"Delete accordion\": \"Accordion l\\xf6schen\",\n    \"Delete column\": \"Spalte l\\xf6schen\",\n    \"Delete row\": \"Zeile l\\xf6schen\",\n    \"Delete table\": \"Tabelle l\\xf6schen\",\n    \"Dimensions\": \"Abmessungen\",\n    \"Disc\": \"Scheibe\",\n    \"Div\": \"Div\",\n    \"Document\": \"Dokument\",\n    \"Dotted\": \"Gepunktet\",\n    \"Double\": \"Doppelt\",\n    \"Drop an image here\": \"Bild hier ablegen\",\n    \"Dropped file type is not supported\": \"Hereingezogener Dateityp wird nicht unterst\\xfctzt\",\n    \"Edit\": \"Bearbeiten\",\n    \"Editor's height: {0} pixels\": \"\",\n    \"Editor's height: {0} pixels, Editor's width: {1} pixels\": \"\",\n    \"Embed\": \"Einbettung\",\n    \"Emojis\": \"Emojis\",\n    \"Emojis...\": \"Emojis\\xa0...\",\n    \"Error\": \"Fehler\",\n    \"Error: Form submit field collision.\": \"Fehler: Kollision der Formularbest\\xe4tigungsfelder.\",\n    \"Error: No form element found.\": \"Fehler: Kein Formularelement gefunden.\",\n    \"Extended Latin\": \"Erweitertes Latein\",\n    \"Failed to initialize plugin: {0}\": \"Plugin konnte nicht initialisiert werden: {0}\",\n    \"Failed to load plugin url: {0}\": \"Plugin-URL konnte nicht geladen werden: {0}\",\n    \"Failed to load plugin: {0} from url {1}\": \"Plugin konnte nicht geladen werden: {0} von URL {1}\",\n    \"Failed to upload image: {0}\": \"Bild konnte nicht hochgeladen werden: {0}\",\n    \"File\": \"Datei\",\n    \"Find\": \"Suchen\",\n    \"Find (if searchreplace plugin activated)\": \"Suchen (wenn Suchen/Ersetzen-Plugin aktiviert ist)\",\n    \"Find and Replace\": \"Suchen und Ersetzen\",\n    \"Find and replace...\": \"Suchen und ersetzen...\",\n    \"Find in selection\": \"In Auswahl suchen\",\n    \"Find whole words only\": \"Nur ganze W\\xf6rter suchen\",\n    \"Flags\": \"Flaggen\",\n    \"Focus to contextual toolbar\": \"Fokus auf kontextbezogene Symbolleiste\",\n    \"Focus to element path\": \"Fokus auf Elementpfad\",\n    \"Focus to menubar\": \"Fokus auf Men\\xfcleiste\",\n    \"Focus to notification\": \"Fokus auf Benachrichtigung\",\n    \"Focus to toolbar\": \"Fokus auf Symbolleiste\",\n    \"Font\": \"Schriftart\",\n    \"Font size {0}\": \"Schriftgr\\xf6\\xdfe {0}\",\n    \"Font sizes\": \"Schriftgr\\xf6\\xdfen\",\n    \"Font {0}\": \"Schriftart {0}\",\n    \"Fonts\": \"Schriftarten\",\n    \"Food and Drink\": \"Essen und Trinken\",\n    \"Footer\": \"Fu\\xdfzeile\",\n    \"Format\": \"Format\",\n    \"Format {0}\": \"Format {0}\",\n    \"Formats\": \"Formate\",\n    \"Fullscreen\": \"Vollbild\",\n    \"G\": \"G\",\n    \"General\": \"Allgemein\",\n    \"Gray\": \"Grau\",\n    \"Green\": \"Gr\\xfcn\",\n    \"Green channel\": \"Gr\\xfcnkanal\",\n    \"Groove\": \"Gekantet\",\n    \"Handy Shortcuts\": \"Praktische Tastenkombinationen\",\n    \"Header\": \"Kopfzeile\",\n    \"Header cell\": \"Kopfzelle\",\n    \"Heading 1\": \"\\xdcberschrift 1\",\n    \"Heading 2\": \"\\xdcberschrift 2\",\n    \"Heading 3\": \"\\xdcberschrift 3\",\n    \"Heading 4\": \"\\xdcberschrift 4\",\n    \"Heading 5\": \"\\xdcberschrift 5\",\n    \"Heading 6\": \"\\xdcberschrift 6\",\n    \"Headings\": \"\\xdcberschriften\",\n    \"Height\": \"H\\xf6he\",\n    \"Height:\": \"H\\xf6he:\",\n    \"Help\": \"Hilfe\",\n    \"Hex color code\": \"Hexadezimal-Farbwert\",\n    \"Hexadecimal only, 000000 to FFFFFF\": \"Nur Hexadezimalwerte, 000000 bis FFFFFF\",\n    \"Hidden\": \"Unsichtbar\",\n    \"Horizontal align\": \"Horizontal ausrichten\",\n    \"Horizontal line\": \"Horizontale Linie\",\n    \"Horizontal space\": \"Horizontaler Raum\",\n    \"ID\": \"ID\",\n    \"ID should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.\": \"Die ID muss mit einem Buchstaben beginnen gefolgt von Buchstaben, Zahlen, Bindestrichen, Punkten, Doppelpunkten oder Unterstrichen.\",\n    \"Image is decorative\": \"Bild ist dekorativ\",\n    \"Image list\": \"Bildliste\",\n    \"Image title\": \"Bildtitel\",\n    \"Image...\": \"Bild...\",\n    \"ImageProxy HTTP error: Could not find Image Proxy\": \"Image Proxy HTTP Fehler: Kann Image Proxy nicht finden\",\n    \"ImageProxy HTTP error: Incorrect Image Proxy URL\": \"Image Proxy HTTP Fehler: Falsche Image Proxy URL\",\n    \"ImageProxy HTTP error: Rejected request\": \"Image Proxy HTTP Fehler: Abgewiesene Anfrage\",\n    \"ImageProxy HTTP error: Unknown ImageProxy error\": \"Image Proxy HTTP Fehler: Unbekannter Image Proxy Fehler\",\n    \"Increase indent\": \"Einzug vergr\\xf6\\xdfern\",\n    \"Inline\": \"Zeichenformate\",\n    \"Insert\": \"Einf\\xfcgen\",\n    \"Insert Template\": \"Vorlage einf\\xfcgen\",\n    \"Insert accordion\": \"Accordion einf\\xfcgen\",\n    \"Insert column after\": \"Neue Spalte danach einf\\xfcgen\",\n    \"Insert column before\": \"Neue Spalte davor einf\\xfcgen\",\n    \"Insert date/time\": \"Datum/Uhrzeit einf\\xfcgen\",\n    \"Insert date/time menu\": \"Datum/Uhrzeit einf\\xfcgen\",\n    \"Insert image\": \"Bild einf\\xfcgen\",\n    \"Insert link (if link plugin activated)\": \"Link einf\\xfcgen (wenn Link-Plugin aktiviert ist)\",\n    \"Insert row after\": \"Neue Zeile danach einf\\xfcgen\",\n    \"Insert row before\": \"Neue Zeile davor einf\\xfcgen\",\n    \"Insert table\": \"Tabelle einf\\xfcgen\",\n    \"Insert template...\": \"Vorlage einf\\xfcgen...\",\n    \"Insert video\": \"Video einf\\xfcgen\",\n    \"Insert/Edit code sample\": \"Codebeispiel einf\\xfcgen/bearbeiten\",\n    \"Insert/edit image\": \"Bild einf\\xfcgen/bearbeiten\",\n    \"Insert/edit link\": \"Link einf\\xfcgen/bearbeiten\",\n    \"Insert/edit media\": \"Medien einf\\xfcgen/bearbeiten\",\n    \"Insert/edit video\": \"Video einf\\xfcgen/bearbeiten\",\n    \"Inset\": \"Eingelassen\",\n    \"Invalid hex color code: {0}\": \"Ung\\xfcltiger Hexadezimal-Farbwert: {0}\",\n    \"Invalid input\": \"Ung\\xfcltige Eingabe\",\n    \"Italic\": \"Kursiv\",\n    \"Justify\": \"Blocksatz\",\n    \"Keyboard Navigation\": \"Tastaturnavigation\",\n    \"Language\": \"Sprache\",\n    \"Learn more...\": \"Erfahren Sie mehr dazu...\",\n    \"Left\": \"Links\",\n    \"Left to right\": \"Von links nach rechts\",\n    \"Light Blue\": \"Hellblau\",\n    \"Light Gray\": \"Hellgrau\",\n    \"Light Green\": \"Hellgr\\xfcn\",\n    \"Light Purple\": \"Helllila\",\n    \"Light Red\": \"Hellrot\",\n    \"Light Yellow\": \"Hellgelb\",\n    \"Line height\": \"Liniendicke\",\n    \"Link\": \"Link\",\n    \"Link list\": \"Linkliste\",\n    \"Link...\": \"Link ...\",\n    \"List Properties\": \"Liste Eigenschaften\",\n    \"List properties...\": \"Liste Eigenschaften\",\n    \"Loading emojis...\": \"Lade Emojis...\",\n    \"Loading...\": \"Wird geladen...\",\n    \"Lower Alpha\": \"Lateinisches Alphabet in Kleinbuchstaben\",\n    \"Lower Greek\": \"Griechische Kleinbuchstaben\",\n    \"Lower Roman\": \"Kleiner r\\xf6mischer Buchstabe\",\n    \"Match case\": \"Gro\\xdf-/Kleinschreibung beachten\",\n    \"Mathematical\": \"Mathematisch\",\n    \"Media poster (Image URL)\": \"Medienposter (Bild-URL)\",\n    \"Media...\": \"Medien...\",\n    \"Medium Blue\": \"Mittleres Blau\",\n    \"Medium Gray\": \"Mittelgrau\",\n    \"Medium Purple\": \"Mittelviolett\",\n    \"Merge cells\": \"Zellen verbinden\",\n    \"Middle\": \"Mitte\",\n    \"Midnight Blue\": \"Mitternachtsblau\",\n    \"More...\": \"Mehr...\",\n    \"Name\": \"Name\",\n    \"Navy Blue\": \"Marineblau\",\n    \"New document\": \"Neues Dokument\",\n    \"New window\": \"Neues Fenster\",\n    \"Next\": \"N\\xe4chste\",\n    \"No\": \"Nein\",\n    \"No alignment\": \"Keine Ausrichtung\",\n    \"No color\": \"Keine Farbe\",\n    \"Nonbreaking space\": \"Gesch\\xfctztes Leerzeichen\",\n    \"None\": \"Keine\",\n    \"Numbered list\": \"Nummerierte Liste\",\n    \"Numbers only, 0 to 255\": \"Nur Zahlen, von 0 bis 255\",\n    \"OR\": \"ODER\",\n    \"Objects\": \"Objekte\",\n    \"Ok\": \"Ok\",\n    \"Open help dialog\": \"Hilfe-Dialog \\xf6ffnen\",\n    \"Open link\": \"Link \\xf6ffnen\",\n    \"Open link in...\": \"Link \\xf6ffnen in...\",\n    \"Open popup menu for split buttons\": \"\\xd6ffne Popup Menge um Buttons zu trennen\",\n    \"Orange\": \"Orange\",\n    \"Outset\": \"Hervorstehend\",\n    \"Page break\": \"Seitenumbruch\",\n    \"Paragraph\": \"Absatz\",\n    \"Paste\": \"Einf\\xfcgen\",\n    \"Paste as text\": \"Als Text einf\\xfcgen\",\n    \"Paste column after\": \"Spalte danach einf\\xfcgen\",\n    \"Paste column before\": \"Spalte davor einf\\xfcgen\",\n    \"Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.\": \"Einf\\xfcgen ist nun im unformatierten Textmodus. Inhalte werden ab jetzt als unformatierter Text eingef\\xfcgt, bis Sie diese Einstellung wieder deaktivieren.\",\n    \"Paste or type a link\": \"Link einf\\xfcgen oder eingeben\",\n    \"Paste row after\": \"Zeile danach einf\\xfcgen\",\n    \"Paste row before\": \"Zeile davor einf\\xfcgen\",\n    \"Paste your embed code below:\": \"F\\xfcgen Sie Ihren Einbettungscode unten ein:\",\n    \"People\": \"Menschen\",\n    \"Plugins\": \"Plugins\",\n    \"Plugins installed ({0}):\": \"Installierte Plugins ({0}):\",\n    \"Powered by {0}\": \"Betrieben von {0}\",\n    \"Pre\": \"Pre\",\n    \"Preferences\": \"Einstellungen\",\n    \"Preformatted\": \"Vorformatiert\",\n    \"Premium plugins:\": \"Premium-Plugins:\",\n    \"Press the Up and Down arrow keys to resize the editor.\": \"\\xc4ndern Sie die Gr\\xf6\\xdfe des Editors, indem Sie die Pfeiltasten \\u201eAbw\\xe4rts\\u201c und \\u201eAufw\\xe4rts\\u201c dr\\xfccken.\",\n    \"Press the arrow keys to resize the editor.\": \"\\xc4ndern Sie die Gr\\xf6\\xdfe des Editors, indem Sie die Pfeiltasten dr\\xfccken.\",\n    \"Press {0} for help\": \"F\\xfcr Hilfe {0} dr\\xfccken\",\n    \"Preview\": \"Vorschau\",\n    \"Previous\": \"Vorherige\",\n    \"Print\": \"Drucken\",\n    \"Print...\": \"Drucken...\",\n    \"Purple\": \"Violett\",\n    \"Quotations\": \"Anf\\xfchrungszeichen\",\n    \"R\": \"R\",\n    \"Range 0 to 255\": \"Spanne 0 bis 255\",\n    \"Red\": \"Rot\",\n    \"Red channel\": \"Rotkanal\",\n    \"Redo\": \"Wiederholen\",\n    \"Remove\": \"Entfernen\",\n    \"Remove color\": \"Farbauswahl aufheben\",\n    \"Remove link\": \"Link entfernen\",\n    \"Replace\": \"Ersetzen\",\n    \"Replace all\": \"Alle ersetzen\",\n    \"Replace with\": \"Ersetzen durch\",\n    \"Resize\": \"Skalieren\",\n    \"Restore last draft\": \"Letzten Entwurf wiederherstellen\",\n    \"Reveal or hide additional toolbar items\": \"Zus\\xe4tzliche Elemente auf der Symbolleiste ein- oder ausblenden\",\n    \"Rich Text Area\": \"Rich-Text-Area\",\n    \"Rich Text Area. Press ALT-0 for help.\": \"Rich-Text-Bereich. Dr\\xfccken Sie Alt+0 f\\xfcr Hilfe.\",\n    \"Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help\": \"Rich-Text-Bereich. Dr\\xfccken Sie Alt+F9 f\\xfcr das Men\\xfc. Dr\\xfccken Sie Alt+F10 f\\xfcr die Symbolleiste. Dr\\xfccken Sie Alt+0 f\\xfcr Hilfe.\",\n    \"Ridge\": \"Eingeritzt\",\n    \"Right\": \"Rechts\",\n    \"Right to left\": \"Von rechts nach links\",\n    \"Row\": \"Zeile\",\n    \"Row clipboard actions\": \"Zeilen-Zwischenablage-Aktionen\",\n    \"Row group\": \"Zeilengruppe\",\n    \"Row header\": \"Zeilenkopf\",\n    \"Row properties\": \"Zeileneigenschaften\",\n    \"Row type\": \"Zeilentyp\",\n    \"Rows\": \"Zeilen\",\n    \"Save\": \"Speichern\",\n    \"Save (if save plugin activated)\": 'Speichern (wenn \"Speichern -Plugin\" aktiviert ist)',\n    \"Scope\": \"Bereich\",\n    \"Search\": \"Suchen\",\n    \"Select all\": \"Alles ausw\\xe4hlen\",\n    \"Select the {0} element\": \"\",\n    \"Select...\": \"Auswahl...\",\n    \"Selection\": \"Auswahl\",\n    \"Shortcut\": \"Tastenkombination\",\n    \"Show blocks\": \"Bl\\xf6cke anzeigen\",\n    \"Show caption\": \"Beschriftung anzeigen\",\n    \"Show invisible characters\": \"Unsichtbare Zeichen anzeigen\",\n    \"Size\": \"Schriftgr\\xf6\\xdfe\",\n    \"Solid\": \"Durchgezogen\",\n    \"Source\": \"Quelle\",\n    \"Source code\": \"Quellcode\",\n    \"Special Character\": \"Sonderzeichen\",\n    \"Special character...\": \"Sonderzeichen...\",\n    \"Split cell\": \"Zelle aufteilen\",\n    \"Square\": \"Rechteck\",\n    \"Start list at number\": \"Beginne Liste mit Nummer\",\n    \"Strikethrough\": \"Durchgestrichen\",\n    \"Style\": \"Formatvorlage\",\n    \"Subscript\": \"Tiefgestellt\",\n    \"Superscript\": \"Hochgestellt\",\n    \"Switch to or from fullscreen mode\": \"Vollbildmodus umschalten\",\n    \"Symbols\": \"Symbole\",\n    \"System Font\": \"Betriebssystemschriftart\",\n    \"Table\": \"Tabelle\",\n    \"Table caption\": \"Tabellenbeschriftung\",\n    \"Table properties\": \"Tabelleneigenschaften\",\n    \"Table styles\": \"Tabellenstil\",\n    \"Template\": \"Vorlage\",\n    \"Templates\": \"Vorlagen\",\n    \"Text\": \"Text\",\n    \"Text color\": \"Textfarbe\",\n    \"Text color menu\": \"Textfarben-Men\\xfc\",\n    \"Text color {0}\": \"Textfarbe {0}\",\n    \"Text to display\": \"Anzuzeigender Text\",\n    \"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?\": \"Diese URL scheint eine E-Mail-Adresse zu sein. M\\xf6chten Sie das dazu ben\\xf6tigte mailto: voranstellen?\",\n    \"The URL you entered seems to be an external link. Do you want to add the required http:// prefix?\": \"Diese URL scheint ein externer Link zu sein. M\\xf6chten Sie das dazu ben\\xf6tigte http:// voranstellen?\",\n    \"The URL you entered seems to be an external link. Do you want to add the required https:// prefix?\": \"Die eingegebene URL scheint ein externer Link zu sein. Soll das fehlende https:// davor erg\\xe4nzt werden?\",\n    \"Title\": \"Titel\",\n    \"To open the popup, press Shift+Enter\": \"Dr\\xfccken Sie Umschalt+Eingabe, um das Popup-Fenster zu \\xf6ffnen.\",\n    \"Toggle accordion\": \"Accordion umschalten\",\n    \"Tools\": \"Werkzeuge\",\n    \"Top\": \"Oben\",\n    \"Travel and Places\": \"Reisen und Orte\",\n    \"Turquoise\": \"T\\xfcrkis\",\n    \"Underline\": \"Unterstrichen\",\n    \"Undo\": \"R\\xfcckg\\xe4ngig machen\",\n    \"Upload\": \"Hochladen\",\n    \"Uploading image\": \"Bild wird hochgeladen\",\n    \"Upper Alpha\": \"Lateinisches Alphabet in Gro\\xdfbuchstaben\",\n    \"Upper Roman\": \"Gro\\xdfer r\\xf6mischer Buchstabe\",\n    \"Url\": \"URL\",\n    \"Use arrow keys to navigate.\": \"Benutze die Pfeiltasten zum Navigieren.\",\n    \"User Defined\": \"Benutzerdefiniert\",\n    \"Valid\": \"G\\xfcltig\",\n    \"Version\": \"Version\",\n    \"Vertical align\": \"Vertikal ausrichten\",\n    \"Vertical space\": \"Vertikaler Raum\",\n    \"View\": \"Ansicht\",\n    \"Visual aids\": \"Visuelle Hilfen\",\n    \"Warn\": \"Warnung\",\n    \"White\": \"Wei\\xdf\",\n    \"Width\": \"Breite\",\n    \"Width:\": \"Breite:\",\n    \"Word count\": \"Anzahl der W\\xf6rter\",\n    \"Words\": \"W\\xf6rter\",\n    \"Words: {0}\": \"Wortzahl: {0}\",\n    \"Yellow\": \"Gelb\",\n    \"Yes\": \"Ja\",\n    \"You are using {0}\": \"Sie verwenden {0}\",\n    \"You have unsaved changes are you sure you want to navigate away?\": \"Die \\xc4nderungen wurden noch nicht gespeichert. Sind Sie sicher, dass Sie diese Seite verlassen wollen?\",\n    \"Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.\": \"Ihr Browser unterst\\xfctzt leider keinen direkten Zugriff auf die Zwischenablage. Bitte benutzen Sie die Tastenkombinationen Strg+X/C/V.\",\n    \"alignment\": \"Ausrichtung\",\n    \"austral sign\": \"Australzeichen\",\n    \"cedi sign\": \"Cedizeichen\",\n    \"colon sign\": \"Doppelpunkt\",\n    \"cruzeiro sign\": \"Cruzeirozeichen\",\n    \"currency sign\": \"W\\xe4hrungssymbol\",\n    \"dollar sign\": \"Dollarzeichen\",\n    \"dong sign\": \"Dongzeichen\",\n    \"drachma sign\": \"Drachmezeichen\",\n    \"euro-currency sign\": \"Eurozeichen\",\n    \"example\": \"Beispiel\",\n    \"formatting\": \"Formatierung\",\n    \"french franc sign\": \"Franczeichen\",\n    \"german penny symbol\": \"Pfennigzeichen\",\n    \"guarani sign\": \"Guaranizeichen\",\n    \"history\": \"Historie\",\n    \"hryvnia sign\": \"Hrywnjazeichen\",\n    \"indentation\": \"Einr\\xfcckungen\",\n    \"indian rupee sign\": \"Indisches Rupiezeichen\",\n    \"kip sign\": \"Kipzeichen\",\n    \"lira sign\": \"Lirezeichen\",\n    \"livre tournois sign\": \"Livrezeichen\",\n    \"manat sign\": \"Manatzeichen\",\n    \"mill sign\": \"Millzeichen\",\n    \"naira sign\": \"Nairazeichen\",\n    \"new sheqel sign\": \"Schekelzeichen\",\n    \"nordic mark sign\": \"Zeichen nordische Mark\",\n    \"peseta sign\": \"Pesetazeichen\",\n    \"peso sign\": \"Pesozeichen\",\n    \"ruble sign\": \"Rubelzeichen\",\n    \"rupee sign\": \"Rupiezeichen\",\n    \"spesmilo sign\": \"Spesmilozeichen\",\n    \"styles\": \"Stile\",\n    \"tenge sign\": \"Tengezeichen\",\n    \"tugrik sign\": \"Tugrikzeichen\",\n    \"turkish lira sign\": \"T\\xfcrkisches Lirazeichen\",\n    \"won sign\": \"Wonzeichen\",\n    \"yen character\": \"Yenzeichen\",\n    \"yen/yuan character variant one\": \"Yen-/Yuanzeichen Variante 1\",\n    \"yuan character\": \"Yuanzeichen\",\n    \"yuan character, in hong kong and taiwan\": \"Yuanzeichen in Hongkong und Taiwan\",\n    \"{0} characters\": \"{0}\\xa0Zeichen\",\n    \"{0} columns, {1} rows\": \"{0} Spalten, {1} Zeilen\",\n    \"{0} words\": \"{0} W\\xf6rter\"\n});", "// Exports the \"dom\" model for usage with module loaders\n// Usage:\n//   CommonJS:\n//     require('tinymce/models/dom')\n//   ES2015:\n//     import 'tinymce/models/dom'\nrequire('./model.js');", "// Exports the \"silver\" theme for usage with module loaders\n// Usage:\n//   CommonJS:\n//     require('tinymce/themes/silver')\n//   ES2015:\n//     import 'tinymce/themes/silver'\nrequire('./theme.js');", "// Exports the \"default\" icons for usage with module loaders\n// Usage:\n//   CommonJS:\n//     require('tinymce/icons/default')\n//   ES2015:\n//     import 'tinymce/icons/default'\nrequire('./icons.js');", "tinymce.Resource.add('ui/oxide/skin.css', `.tox{box-shadow:none;box-sizing:content-box;cursor:auto;font-style:normal;font-weight:400;line-height:normal;-webkit-tap-highlight-color:transparent;-webkit-text-decoration:none;text-decoration:none;text-shadow:none;text-transform:none;vertical-align:initial;white-space:normal}.tox :not(svg):not(rect){box-sizing:inherit;color:inherit;cursor:inherit;direction:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;line-height:inherit;-webkit-tap-highlight-color:inherit;text-align:inherit;text-decoration:inherit;text-shadow:inherit;text-transform:inherit;vertical-align:inherit;white-space:inherit}.tox :not(svg):not(rect){background:0 0;border:0;box-shadow:none;float:none;height:auto;margin:0;max-width:none;outline:0;padding:0;position:static;width:auto}.tox:not([dir=rtl]){direction:ltr;text-align:left}.tox[dir=rtl]{direction:rtl;text-align:right}.tox-tinymce :focus,.tox-tinymce-aux :focus{outline:0}button::-moz-focus-inner{border:0}@keyframes tox-rotation{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes tox-bouncing-dots{0%,100%,80%{transform:scale(0)}40%{transform:scale(1)}}.tox{color:var(--tox-private-color-black,#222f3e);font-family:var(--tox-private-font-stack, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Oxygen-Sans, Ubuntu, Cantarell, \"Helvetica Neue\", sans-serif);font-size:var(--tox-private-font-size-base, 16px)}.tox-tinymce{border:2px solid #eee;border-radius:10px;box-shadow:none;box-sizing:border-box;display:flex;flex-direction:column;font-family:var(--tox-private-font-stack, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Oxygen-Sans, Ubuntu, Cantarell, \"Helvetica Neue\", sans-serif);overflow:hidden;position:relative;visibility:inherit!important}.tox.tox-tinymce-inline{border:none;box-shadow:none;overflow:initial}.tox.tox-tinymce-inline .tox-editor-container{overflow:initial}.tox.tox-tinymce-inline .tox-editor-header{background-color:#fff;border:2px solid #eee;border-radius:10px;box-shadow:none;overflow:hidden}.tox-tinymce-aux{font-family:var(--tox-private-font-stack, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Oxygen-Sans, Ubuntu, Cantarell, \"Helvetica Neue\", sans-serif);z-index:var(--tox-private-z-index-sink,1300)}.tox[dir=rtl] .tox-icon--flip svg{transform:rotateY(180deg)}.tox .tox-editor-container{display:flex;flex:1 1 auto;flex-direction:column;overflow:hidden}.tox .tox-editor-container--keep-toolbar{flex:0 0 auto;overflow:visible}.tox .tox-editor-header{display:grid;grid-template-columns:1fr min-content;z-index:2}.tox:not(.tox-tinymce-inline) .tox-editor-header{background-color:#fff;border-bottom:none;box-shadow:0 2px 2px -2px rgba(34,47,62,.1),0 8px 8px -4px rgba(34,47,62,.07);padding:4px 0}.tox:not(.tox-tinymce-inline) .tox-editor-header:not(.tox-editor-dock-transition){transition:box-shadow .5s}.tox:not(.tox-tinymce-inline).tox-tinymce--toolbar-bottom .tox-editor-header{border-top:1px solid #e3e3e3;box-shadow:none}.tox:not(.tox-tinymce-inline).tox-tinymce--toolbar-sticky-on .tox-editor-header{background-color:#fff;box-shadow:0 2px 2px -2px rgba(34,47,62,.2),0 8px 8px -4px rgba(34,47,62,.15);padding:4px 0}.tox:not(.tox-tinymce-inline).tox-tinymce--toolbar-sticky-on.tox-tinymce--toolbar-bottom .tox-editor-header{box-shadow:0 2px 2px -2px rgba(34,47,62,.2),0 8px 8px -4px rgba(34,47,62,.15)}.tox.tox:not(.tox-tinymce-inline) .tox-editor-header.tox-editor-header--empty{background:0 0;border:none;box-shadow:none;padding:0}.tox-editor-dock-fadeout{opacity:0;visibility:hidden}.tox-editor-dock-fadein{opacity:1;visibility:visible}.tox-editor-dock-transition{transition:visibility 0s linear .25s,opacity .25s ease}.tox-editor-dock-transition.tox-editor-dock-fadein{transition-delay:0s}.tox .accessibility-issue__header{align-items:center;display:flex;margin-bottom:4px}.tox #accessibility-issue__subheader{font-size:16px;color:#222f3e}.tox .accessbility-sr-only{position:absolute;clip:rect(1px,1px,1px,1px);clip-path:inset(0 0 99.9% 99.9%);overflow:hidden;height:1px;width:1px;padding:0;border:0}.tox .accessibility-issue__description{align-items:stretch;border-radius:6px;justify-content:space-between}.tox .accessibility-issue__description>div{padding-bottom:4px}.tox .accessibility-issue__description>div>div{align-items:center;display:flex;margin-bottom:4px}.tox .accessibility-issue__description>div>div .tox-icon svg{display:block}.tox #accessibility-issue__contentID{margin-top:8px;margin-bottom:8px}.tox #accessibility-issue__contentID span:first-child{font-weight:700}.tox #accessibility-issue__document{padding-bottom:8px}.tox .accessibility-issue__repair{margin-top:8px}.tox .accessibility-issue__repair .tox-form__group .tox-form__group--error{color:#c00}.tox .tox-dialog__body-content .accessibility-issue--info .accessibility-issue__description{background-color:#e6f0fd;color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--info .tox-form__group h2{font-size:14px;color:#006ce7}.tox .tox-dialog__body-content .accessibility-issue--info .tox-icon.accessibility-issue__icon svg{fill:#006ce7}.tox .tox-dialog__body-content .accessibility-issue--info a.tox-button--naked.tox-button--icon{background-color:#006ce7;color:#fff}.tox .tox-dialog__body-content .accessibility-issue--info a.tox-button--naked.tox-button--icon:focus,.tox .tox-dialog__body-content .accessibility-issue--info a.tox-button--naked.tox-button--icon:hover{background-color:#0060ce}.tox .tox-dialog__body-content .accessibility-issue--info a.tox-button--naked.tox-button--icon:active{background-color:#0054b4}.tox .tox-dialog__body-content .accessibility-issue--warn .accessibility-issue__description{background-color:#fffae6;color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--warn .tox-form__group h2{font-size:14px;color:#7a6e25}.tox .tox-dialog__body-content .accessibility-issue--warn .tox-icon.accessibility-issue__icon svg{fill:#7a6e25}.tox .tox-dialog__body-content .accessibility-issue--warn a.tox-button--naked.tox-button--icon{background-color:#ffe89d;color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--warn a.tox-button--naked.tox-button--icon:focus,.tox .tox-dialog__body-content .accessibility-issue--warn a.tox-button--naked.tox-button--icon:hover{background-color:#f2d574;color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--warn a.tox-button--naked.tox-button--icon:active{background-color:#e8c657;color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--error .accessibility-issue__description{background-color:#fae6e6;color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--error .tox-form__group h2{font-size:14px;color:#c00}.tox .tox-dialog__body-content .accessibility-issue--error .tox-icon.accessibility-issue__icon svg{fill:#c00}.tox .tox-dialog__body-content .accessibility-issue--error a.tox-button--naked.tox-button--icon{background-color:#f2bfbf;color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--error a.tox-button--naked.tox-button--icon:focus,.tox .tox-dialog__body-content .accessibility-issue--error a.tox-button--naked.tox-button--icon:hover{background-color:#e9a4a4;color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--error a.tox-button--naked.tox-button--icon:active{background-color:#ee9494;color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--success .accessibility-issue__description{background-color:rgba(120,171,70,.1);color:#222f3e}.tox .tox-dialog__body-content .accessibility-issue--success .accessibility-issue__description>:last-child{display:none}.tox .tox-dialog__body-content .accessibility-issue--success .tox-form__group h2{color:#527530}.tox .tox-dialog__body-content .accessibility-issue--success .tox-icon.accessibility-issue__icon svg{fill:#527530}.tox .tox-dialog__body-content .accessibility-issue__header .tox-form__group h1,.tox .tox-dialog__body-content .tox-form__group .accessibility-issue__description h2{margin-top:0}.tox:not([dir=rtl]) .tox-dialog__body-content .accessibility-issue__header .tox-button{margin-left:4px}.tox:not([dir=rtl]) .tox-dialog__body-content .accessibility-issue__header>:nth-last-child(2){margin-left:auto}.tox:not([dir=rtl]) .tox-dialog__body-content .accessibility-issue__description{padding:8px}.tox[dir=rtl] .tox-dialog__body-content .accessibility-issue__header .tox-button{margin-right:4px}.tox[dir=rtl] .tox-dialog__body-content .accessibility-issue__header>:nth-last-child(2){margin-right:auto}.tox[dir=rtl] .tox-dialog__body-content .accessibility-issue__description{padding:4px 8px 4px 4px}.tox .mce-codemirror{background:#fff;bottom:0;font-size:13px;left:0;position:absolute;right:0;top:0;z-index:1}.tox .mce-codemirror.tox-inline-codemirror{margin:8px;position:absolute}.tox .tox-advtemplate .tox-form__grid{flex:1}.tox .tox-advtemplate .tox-form__grid>div:first-child{display:flex;flex-direction:column;width:30%}.tox .tox-advtemplate .tox-form__grid>div:first-child>div:nth-child(2){flex-basis:0;flex-grow:1;overflow:auto}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox .tox-advtemplate .tox-form__grid>div:first-child{width:100%}}.tox .tox-advtemplate iframe{border-color:#eee;border-radius:10px;border-style:solid;border-width:1px;margin:0 10px}.tox .tox-accordion{display:flex;flex-direction:column;gap:var(--tox-private-pad-sm,8px)}.tox .tox-accordion__item{background-color:var(--tox-private-background-color,#fff);color:var(--tox-private-text-color,#222f3e);border-radius:var(--tox-private-control-border-radius,6px);position:relative}.tox .tox-accordion__item.tox-accordion__item--expanded{background-color:var(--tox-private-background-secondary,#f0f0f0)}.tox .tox-accordion__item.tox-accordion__item--expanded .tox-accordion__content--expanded .tox-accordion__content-inner{padding-top:0}.tox .tox-accordion__item::after{border-radius:var(--tox-private-control-border-radius,6px);box-shadow:0 0 0 var(--tox-private-keyboard-focus-outline-width,2px) var(--tox-private-keyboard-focus-outline-color,#006ce7);content:'';inset:0;opacity:0;pointer-events:none;position:absolute}@media (forced-colors:active){.tox .tox-accordion__item::after{border:2px solid highlight}}.tox .tox-accordion__item:focus{outline:0;z-index:1}.tox .tox-accordion__item:focus::after{opacity:1}.tox .tox-accordion__heading{margin:0;width:100%}.tox .tox-accordion__heading:focus{outline:0}.tox .tox-accordion__header{align-items:center;border:none;border-radius:var(--tox-private-control-border-radius,6px);box-sizing:border-box;color:var(--tox-private-text-color,#222f3e);cursor:pointer;display:flex;font-family:var(--tox-private-font-stack, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Oxygen-Sans, Ubuntu, Cantarell, \"Helvetica Neue\", sans-serif);font-size:var(--tox-private-font-size-md, 16px);font-weight:var(--tox-private-font-weight-bold,bold);line-height:var(--tox-private-line-height-base, 1.3);outline:0;padding:calc(var(--tox-private-pad-sm,8px) + var(--tox-private-pad-xs,4px));text-align:left;width:100%}.tox .tox-accordion__header::after{border-radius:var(--tox-private-control-border-radius,6px);bottom:0;box-shadow:0 0 0 var(--tox-private-keyboard-focus-outline-width,2px) var(--tox-private-keyboard-focus-outline-color,#006ce7);content:'';left:0;opacity:0;pointer-events:none;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-accordion__header::after{border:2px solid highlight}}.tox .tox-accordion__header:hover:not(.tox-accordion__header--disabled){background-color:var(--tox-private-background-secondary,#f0f0f0)}.tox .tox-accordion__header:focus:not(.tox-accordion__header--disabled){position:relative;z-index:1}.tox .tox-accordion__header:focus:not(.tox-accordion__header--disabled)::after{opacity:1}.tox .tox-accordion__header.tox-accordion__header--disabled{cursor:not-allowed;opacity:.5}.tox .tox-accordion__header.tox-accordion__header--icon-end{padding-right:calc(var(--tox-private-pad-sm,8px) + var(--tox-private-pad-xs,4px))}.tox .tox-accordion__header-icon{align-items:center;color:var(--tox-private-text-color,#222f3e);display:flex;flex-shrink:0;height:calc(var(--tox-private-base-value,16px) * 1.5);justify-content:center;width:calc(var(--tox-private-base-value,16px) * 1.5)}.tox .tox-accordion__header-icon svg{display:block;fill:currentColor;height:100%;width:100%;max-height:calc(var(--tox-private-base-value,16px) * 1.5);max-width:calc(var(--tox-private-base-value,16px) * 1.5)}.tox .tox-accordion__header:not(.tox-accordion__header--icon-end) .tox-accordion__header-icon{margin-right:var(--tox-private-pad-sm,8px);margin-left:0}.tox .tox-accordion__header--icon-end .tox-accordion__header-icon{margin-left:auto}.tox .tox-accordion__header-text{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tox .tox-accordion__header--icon-end .tox-accordion__header-text{flex:0 1 auto;margin-right:var(--tox-private-pad-sm,8px)}.tox .tox-accordion__content{border-radius:var(--tox-private-control-border-radius,6px)}.tox .tox-accordion__content.tox-accordion__content--collapsed{display:none}.tox .tox-accordion__content.tox-accordion__content--expanded{display:block}.tox .tox-accordion__content-inner{padding:var(--tox-private-pad-sm,8px) calc(var(--tox-private-pad-sm,8px) + var(--tox-private-pad-xs,4px)) calc(var(--tox-private-pad-sm,8px) + var(--tox-private-pad-xs,4px))}.tox .tox-accordion__content-inner .tox-form__group:last-child{margin-bottom:0}.tox .tox-accordion__content-inner .tox-form__group>:not(:first-child){margin-top:calc(var(--tox-private-pad-sm,8px) + var(--tox-private-pad-xs,4px))}.tox .tox-accordion__content-inner .tox-form__group>.tox-dropdown-content{margin-top:0}.tox .tox-accordion__content-inner .tox-button-group{display:flex;gap:var(--tox-private-pad-sm,8px)}.tox .tox-accordion__content-inner .tox-accordion__model-button{border-radius:var(--tox-private-control-border-radius,6px);align-items:center;appearance:none;background:0 0;border:none;color:inherit;cursor:pointer;display:flex;font-family:inherit;font-size:inherit;gap:var(--tox-private-pad-xs,4px);margin:0;outline:0;padding:6px calc(var(--tox-private-pad-sm,8px) + var(--tox-private-pad-xs,4px));position:relative}.tox .tox-accordion__content-inner .tox-accordion__model-button::after{border-radius:var(--tox-private-control-border-radius,6px);bottom:0;box-shadow:0 0 0 var(--tox-private-keyboard-focus-outline-width,2px) var(--tox-private-keyboard-focus-outline-color,#006ce7);content:'';left:0;opacity:0;pointer-events:none;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-accordion__content-inner .tox-accordion__model-button::after{border:2px solid highlight}}.tox .tox-accordion__content-inner .tox-accordion__model-button:focus{z-index:1}.tox .tox-accordion__content-inner .tox-accordion__model-button:focus::after{opacity:1}.tox .tox-accordion .tox-selectfield{align-items:center;background-color:var(--tox-private-background-color,#fff);border:1px solid var(--tox-private-border-color,#eee);border-radius:var(--tox-private-control-border-radius,6px);box-sizing:border-box;display:flex;height:34px;padding:0 6px;position:relative;width:100%}.tox .tox-accordion .tox-selectfield:focus-within{box-shadow:0 0 0 var(--tox-private-keyboard-focus-outline-width,2px) var(--tox-private-keyboard-focus-outline-color,#006ce7);z-index:1}@media (forced-colors:active){.tox .tox-accordion .tox-selectfield:focus-within{border-color:highlight;box-shadow:0 0 0 2px highlight}}.tox .tox-accordion .tox-selectfield button{appearance:none;background:0 0;border:none;color:inherit;cursor:pointer;flex:1;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;outline:0;padding:5px 0;text-align:left}.tox .tox-accordion .tox-selectfield .tox-icon{display:flex;flex-shrink:0;padding:9px 0;pointer-events:none}.tox .tox-accordion .tox-selectfield .tox-icon svg{height:var(--tox-private-base-value,16px);width:var(--tox-private-base-value,16px)}.tox[dir=rtl] .tox-accordion__header{text-align:right}.tox[dir=rtl] .tox-accordion__header:not(.tox-accordion__header--icon-end) .tox-accordion__header-icon{margin-left:var(--tox-private-pad-sm,8px);margin-right:0}.tox[dir=rtl] .tox-accordion__header--icon-end .tox-accordion__header-icon{margin-right:auto;margin-left:0}.tox[dir=rtl] .tox-accordion__header--icon-end .tox-accordion__header-text{margin-left:var(--tox-private-pad-sm,8px);margin-right:0}.tox .tox-alert{align-items:flex-start;align-self:stretch;border-radius:var(--tox-private-panel-border-radius,6px);border-style:solid;border-width:1px;box-sizing:border-box;color:var(--tox-private-text-color,#222f3e);display:flex;font-size:var(--tox-private-font-size-sm, 14px);font-weight:var(--tox-private-font-weight-normal,normal);gap:var(--tox-private-pad-xs,4px);line-height:var(--tox-private-line-height-base, 1.3);padding:var(--tox-private-pad-xs,4px) var(--tox-private-pad-sm,8px);width:100%}.tox .tox-alert--error{background:linear-gradient(0deg,rgba(from var(--tox-private-background-color,#fff) r g b / .8) 0,rgba(from var(--tox-private-background-color,#fff) r g b / .8) 100%),var(--tox-private-color-error,#c00);border-color:var(--tox-private-color-error,#c00)}.tox .tox-alert--warning{background:linear-gradient(0deg,rgba(from var(--tox-private-background-color,#fff) r g b / .8) 0,rgba(from var(--tox-private-background-color,#fff) r g b / .8) 100%),var(--tox-private-color-warning,#fc0);border-color:var(--tox-private-color-warning,#fc0)}.tox .tox-alert__body{display:flex;flex:1 0 0;flex-direction:column;min-width:0}.tox .tox-alert__content{align-items:center;display:flex;flex:1 0 0;gap:var(--tox-private-pad-sm,8px);padding:var(--tox-private-pad-sm,8px) 0}.tox .tox-alert__message{margin:0;text-align:left}.tox .tox-alert__actions{align-items:center;display:flex;flex-wrap:wrap;gap:var(--tox-private-pad-xs,4px);justify-content:flex-start}.tox .tox-anchorbar{display:flex;flex:0 0 auto}.tox .tox-bottom-anchorbar{display:flex;flex:0 0 auto}.tox .tox-bar{display:flex;flex:0 0 auto}.tox .tox-button{border-width:var(--tox-private-button-border-width,1px);border-style:var(--tox-private-button-border-style,solid);border-radius:var(--tox-private-control-border-radius,6px);font-family:var(--tox-private-font-stack, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Oxygen-Sans, Ubuntu, Cantarell, \"Helvetica Neue\", sans-serif);font-size:var(--tox-private-button-font-size, 14px);font-style:var(--tox-private-button-font-style,normal);font-weight:var(--tox-private-button-font-weight,bold);line-height:var(--tox-private-control-line-height, 24px);padding:var(--tox-private-button-padding-y,4px) var(--tox-private-button-padding-x,16px);text-align:center;-webkit-text-decoration:none;text-decoration:none;text-transform:none;letter-spacing:normal;box-shadow:none;box-sizing:border-box;cursor:pointer;outline:0;position:relative;white-space:nowrap;display:inline-flex;justify-content:center;align-items:center;gap:var(--tox-private-pad-xs,4px)}.tox .tox-button::before{border-radius:var(--tox-private-control-border-radius,6px);bottom:calc(-1 * var(--tox-private-button-border-width,1px));box-shadow:var(--tox-private-button-focus-outline,inset 0 0 0 1px #fff,0 0 0 2px #006ce7);content:'';left:calc(-1 * var(--tox-private-button-border-width,1px));opacity:0;pointer-events:none;position:absolute;right:calc(-1 * var(--tox-private-button-border-width,1px));top:calc(-1 * var(--tox-private-button-border-width,1px))}.tox .tox-button:focus:not(:disabled){background-color:var(--tox-private-button-focus-background-color,#0060ce);background-image:none;border-color:var(--tox-private-button-focus-border-color,#0060ce);box-shadow:var(--tox-private-button-focus-box-shadow,none);color:var(--tox-private-button-focus-text-color,#fff)}.tox .tox-button:focus:not(:disabled)::before{opacity:1}.tox .tox-button.tox-button--icon,.tox .tox-button:has(.tox-icon:only-child){padding:4px}.tox .tox-button .tox-icon svg{display:block;fill:currentColor}.tox .tox-button .tox-icon.tox-icon--success svg{fill:var(--tox-private-color-success,#78AB46)}.tox .tox-button .tox-icon.tox-icon--error svg{fill:var(--tox-private-color-error,#c00)}.tox .tox-button--stretch{width:100%}.tox-context-form__group .tox-button--icon,.tox-context-form__group .tox-button.tox-button--icon{margin:6px 1px 5px 0;padding:0}.tox .tox-button{background-color:var(--tox-private-button-primary-background-color,#006ce7);background-image:none;background-position:0 0;background-repeat:repeat;color:var(--tox-private-button-primary-text-color,#fff);border-color:var(--tox-private-button-primary-border-color,#006ce7)}.tox .tox-button[disabled]{background-color:var(--tox-private-button-primary-disabled-background-color,#006ce7);background-image:none;border-color:var(--tox-private-button-primary-disabled-border-color,#006ce7);color:var(--tox-private-button-primary-disabled-text-color,rgba(255,255,255,.5));cursor:not-allowed}.tox .tox-button:focus:not(:disabled){background-color:var(--tox-private-button-primary-focus-background-color,#0060ce);border-color:var(--tox-private-button-primary-focus-border-color,#0060ce);color:var(--tox-private-button-primary-focus-text-color,#fff);background-image:none;box-shadow:none}.tox .tox-button:hover:not(:disabled){background-color:var(--tox-private-button-primary-hover-background-color,#0060ce);border-color:var(--tox-private-button-primary-hover-border-color,#0060ce);color:var(--tox-private-button-primary-hover-text-color,#fff);background-image:none;box-shadow:none}.tox .tox-button:active:not(:disabled){background-color:var(--tox-private-button-primary-active-background-color,#0054b4);border-color:var(--tox-private-button-primary-active-border-color,#0054b4);color:var(--tox-private-button-primary-active-text-color,#fff);background-image:none;box-shadow:none}.tox .tox-button.tox-button--enabled{background-color:var(--tox-private-button-primary-enabled-background-color,#0054b4);border-color:var(--tox-private-button-primary-enabled-border-color,#0054b4);color:var(--tox-private-button-primary-enabled-text-color,#fff);background-image:none;box-shadow:none}.tox .tox-button.tox-button--enabled[disabled]{color:var(--tox-private-button-primary-disabled-text-color,rgba(255,255,255,.5));cursor:not-allowed}.tox .tox-button.tox-button--enabled:focus:not(:disabled){background-color:var(--tox-private-button-primary-enabled-focus-background-color,#00489b);border-color:var(--tox-private-button-primary-enabled-focus-border-color,#00489b);color:var(--tox-private-button-primary-enabled-focus-text-color,#fff);background-image:none;box-shadow:none}.tox .tox-button.tox-button--enabled:hover:not(:disabled){background-color:var(--tox-private-button-primary-enabled-hover-background-color,#00489b);border-color:var(--tox-private-button-primary-enabled-hover-border-color,#00489b);color:var(--tox-private-button-primary-enabled-hover-text-color,#fff);background-image:none;box-shadow:none}.tox .tox-button.tox-button--enabled:active:not(:disabled){background-color:var(--tox-private-button-primary-enabled-active-background-color,#003c81);border-color:var(--tox-private-button-primary-enabled-active-border-color,#003c81);color:var(--tox-private-button-primary-enabled-active-text-color,#fff);background-image:none;box-shadow:none}.tox .tox-button--secondary{background-color:var(--tox-private-button-secondary-background-color,#f0f0f0);border-color:var(--tox-private-button-secondary-border-color,#f0f0f0);color:var(--tox-private-button-secondary-text-color,#222f3e);border-style:solid;border-width:1px;background-image:none;background-position:0 0;background-repeat:repeat;border-radius:6px;box-shadow:none;font-size:14px;font-style:normal;font-weight:700;letter-spacing:normal;outline:0;padding:4px 16px;-webkit-text-decoration:none;text-decoration:none;text-transform:none}.tox .tox-button--secondary[disabled]{background-color:var(--tox-private-button-secondary-disabled-background-color,#f0f0f0);background-image:none;border-color:var(--tox-private-button-secondary-disabled-border-color,#f0f0f0);color:var(--tox-private-button-secondary-disabled-text-color,rgba(34,47,62,.5));cursor:not-allowed}.tox .tox-button--secondary:focus:not(:disabled){background-color:var(--tox-private-button-secondary-focus-background-color,#e3e3e3);border-color:var(--tox-private-button-secondary-focus-border-color,#e3e3e3);color:var(--tox-private-button-secondary-focus-text-color,#222f3e);background-image:none;box-shadow:none}.tox .tox-button--secondary:hover:not(:disabled){background-color:var(--tox-private-button-secondary-hover-background-color,#e3e3e3);border-color:var(--tox-private-button-secondary-hover-border-color,#e3e3e3);color:var(--tox-private-button-secondary-hover-text-color,#222f3e);background-image:none;box-shadow:none}.tox .tox-button--secondary:active:not(:disabled){background-color:var(--tox-private-button-secondary-active-background-color,#d6d6d6);border-color:var(--tox-private-button-secondary-active-border-color,#d6d6d6);color:var(--tox-private-button-secondary-active-text-color,#222f3e);background-image:none;box-shadow:none}.tox .tox-button--secondary.tox-button--enabled{background-color:var(--tox-private-button-secondary-enabled-background-color,#a6ccf7);border-color:var(--tox-private-button-secondary-enabled-border-color,#a6ccf7);color:var(--tox-private-button-secondary-enabled-text-color,#222f3e);background-image:none;box-shadow:none}.tox .tox-button--secondary.tox-button--enabled[disabled]{color:var(--tox-private-button-secondary-disabled-text-color,rgba(34,47,62,.5));cursor:not-allowed}.tox .tox-button--secondary.tox-button--enabled:focus:not(:disabled){background-color:var(--tox-private-button-secondary-enabled-focus-background-color,#8ebef4);border-color:var(--tox-private-button-secondary-enabled-focus-border-color,#8ebef4);color:var(--tox-private-button-secondary-enabled-focus-text-color,#222f3e);background-image:none;box-shadow:none}.tox .tox-button--secondary.tox-button--enabled:hover:not(:disabled){background-color:var(--tox-private-button-secondary-enabled-hover-background-color,#8ebef4);border-color:var(--tox-private-button-secondary-enabled-hover-border-color,#8ebef4);color:var(--tox-private-button-secondary-enabled-hover-text-color,#222f3e);background-image:none;box-shadow:none}.tox .tox-button--secondary.tox-button--enabled:active:not(:disabled){background-color:var(--tox-private-button-secondary-enabled-active-background-color,#77b1f2);border-color:var(--tox-private-button-secondary-enabled-active-border-color,#77b1f2);color:var(--tox-private-button-secondary-enabled-active-text-color,#222f3e);background-image:none;box-shadow:none}.tox .tox-button--naked{background-color:transparent;border-color:transparent;box-shadow:unset;color:var(--tox-private-button-naked-text-color,#222f3e)}.tox .tox-button--naked[disabled]{background-color:transparent;border-color:transparent;color:var(--tox-private-button-naked-disabled-text-color,rgba(34,47,62,.5));cursor:not-allowed}.tox .tox-button--naked:focus:not(:disabled){background-color:var(--tox-private-button-naked-focus-background-color,rgba(34,47,62,.12));border-color:var(--tox-private-button-naked-focus-border-color,transparent);color:var(--tox-private-button-naked-focus-text-color,#222f3e);box-shadow:unset}.tox .tox-button--naked:hover:not(:disabled){background-color:var(--tox-private-button-naked-hover-background-color,rgba(34,47,62,.12));border-color:var(--tox-private-button-naked-hover-background-color,transparent);color:var(--tox-private-button-naked-hover-text-color,#222f3e);box-shadow:unset}.tox .tox-button--naked:active:not(:disabled){background-color:var(--tox-private-button-naked-active-background-color,rgba(34,47,62,.18));border-color:var(--tox-private-button-naked-active-border-color,transparent);color:var(--tox-private-button-naked-active-text-color,#222f3e);box-shadow:unset}.tox .tox-button--naked.tox-button--enabled{background-color:var(--tox-private-button-naked-enabled-background-color,#a8c8ed);border-color:var(--tox-private-button-naked-enabled-border-color,#a8c8ed);color:var(--tox-private-button-naked-enabled-text-color,#222f3e);box-shadow:unset}.tox .tox-button--naked.tox-button--enabled[disabled]{color:var(--tox-private-button-naked-disabled-text-color,rgba(34,47,62,.5));cursor:not-allowed}.tox .tox-button--naked.tox-button--enabled:focus:not(:disabled){background-color:var(--tox-private-button-naked-enabled-focus-background-color,#93bbe9);border-color:var(--tox-private-button-naked-enabled-focus-border-color,#93bbe9);color:var(--tox-private-button-naked-enabled-focus-text-color,#222f3e);box-shadow:unset}.tox .tox-button--naked.tox-button--enabled:hover:not(:disabled){background-color:var(--tox-private-button-naked-enabled-hover-background-color,#93bbe9);border-color:var(--tox-private-button-naked-enabled-hover-border-color,#93bbe9);color:var(--tox-private-button-naked-enabled-hover-text-color,#222f3e);box-shadow:unset}.tox .tox-button--naked.tox-button--enabled:active:not(:disabled){background-color:var(--tox-private-button-naked-enabled-active-background-color,#7daee4);border-color:var(--tox-private-button-naked-enabled-active-border-color,#7daee4);color:var(--tox-private-button-naked-enabled-active-text-color,#222f3e);box-shadow:unset}.tox .tox-button--secondary--outline{background-color:transparent;border-color:var(--tox-private-button-secondary-outline-border-color,#f0f0f0);color:var(--tox-private-button-secondary-outline-text-color,#222f3e)}.tox .tox-button--secondary--outline:focus:not(:disabled){background-color:var(--tox-private-button-secondary-outline-focus-background-color,#e3e3e3);border-color:var(--tox-private-button-secondary-outline-focus-border-color,#e3e3e3);color:var(--tox-private-button-secondary-outline-focus-text-color,#222f3e)}.tox .tox-button--secondary--outline:hover:not(:disabled){background-color:var(--tox-private-button-secondary-outline-hover-background-color,#f0f0f0);border-color:var(--tox-private-button-secondary-outline-hover-border-color,#e3e3e3);color:var(--tox-private-button-secondary-outline-hover-text-color,#222f3e)}.tox .tox-button--secondary--outline:active:not(:disabled){background-color:var(--tox-private-button-secondary-outline-active-background-color,#e3e3e3);border-color:var(--tox-private-button-secondary-outline-active-border-color,#e3e3e3);color:var(--tox-private-button-secondary-outline-active-text-color,#222f3e)}.tox .tox-button--secondary--outline[disabled]{background-color:var(--tox-private-button-secondary-outline-disabled-background-color,transparent);border-color:var(--tox-private-button-secondary-outline-disabled-border-color,#f0f0f0);color:var(--tox-private-button-secondary-outline-disabled-text-color,rgba(34,47,62,.5))}.tox .tox-checkbox{align-items:center;border-radius:var(--tox-private-checkbox-border-radius,6px);cursor:pointer;display:flex;height:var(--tox-private-control-height,36px);min-width:var(--tox-private-control-height,36px)}.tox .tox-checkbox__input{height:1px;overflow:hidden;position:absolute;top:auto;width:1px}.tox .tox-checkbox__icons{display:flex;align-items:center;justify-content:center;box-sizing:content-box;padding:var(--tox-private-pad-xs,calc(4px - 1px));border-radius:var(--tox-private-checkbox-border-radius,6px);box-shadow:0 0 0 2px transparent;height:var(--tox-private-control-line-height,24px);aspect-ratio:1/1}.tox .tox-checkbox__icons .tox-checkbox-icon__unchecked svg{display:block;fill:var(--tox-private-checkbox-unselected-color,rgba(34,47,62,0.3))}@media (forced-colors:active){.tox .tox-checkbox__icons .tox-checkbox-icon__unchecked svg{fill:currentColor!important}}.tox .tox-checkbox__icons .tox-checkbox-icon__indeterminate svg{display:none;fill:var(--tox-private-checkbox-indeterminate-color,#006ce7)}.tox .tox-checkbox__icons .tox-checkbox-icon__checked svg{display:none;fill:var(--tox-private-checkbox-selected-color,#006ce7)}.tox .tox-checkbox--disabled{color:var(--tox-private-checkbox-disabled-text-color,rgba(34,47,62,.5));cursor:not-allowed}.tox .tox-checkbox--disabled .tox-checkbox__icons .tox-checkbox-icon__checked svg{fill:var(--tox-private-checkbox-disabled-text-color,rgba(34,47,62,0.5))}.tox .tox-checkbox--disabled .tox-checkbox__icons .tox-checkbox-icon__unchecked svg{fill:var(--tox-private-checkbox-disabled-text-color,rgba(34,47,62,0.5))}.tox .tox-checkbox--disabled .tox-checkbox__icons .tox-checkbox-icon__indeterminate svg{fill:var(--tox-private-checkbox-disabled-text-color,rgba(34,47,62,0.5))}.tox input.tox-checkbox__input:checked+.tox-checkbox__icons .tox-checkbox-icon__unchecked svg{display:none}.tox input.tox-checkbox__input:checked+.tox-checkbox__icons .tox-checkbox-icon__checked svg{display:block}.tox input.tox-checkbox__input:indeterminate+.tox-checkbox__icons .tox-checkbox-icon__unchecked svg{display:none}.tox input.tox-checkbox__input:indeterminate+.tox-checkbox__icons .tox-checkbox-icon__indeterminate svg{display:block}.tox input.tox-checkbox__input:focus+.tox-checkbox__icons{box-shadow:var(--tox-private-checkbox-focus-box-shadow,inset 0 0 0 1px #006ce7)}.tox:not([dir=rtl]) .tox-checkbox__label{margin-left:var(--tox-private-pad-xs,4px)}.tox:not([dir=rtl]) .tox-checkbox__input{left:-10000px}.tox:not([dir=rtl]) .tox-bar .tox-checkbox{margin-left:var(--tox-private-pad-xs,4px)}.tox[dir=rtl] .tox-checkbox__label{margin-right:var(--tox-private-pad-xs,4px)}.tox[dir=rtl] .tox-checkbox__input{right:-10000px}.tox[dir=rtl] .tox-bar .tox-checkbox{margin-right:var(--tox-private-pad-xs,4px)}.tox .tox-collection--toolbar .tox-collection__group{display:flex;padding:0}.tox .tox-collection--grid .tox-collection__group{display:flex;flex-wrap:wrap;max-height:208px;overflow-x:hidden;overflow-y:auto;padding:0}.tox .tox-collection--list .tox-collection__group{border-bottom-width:0;border-color:#e3e3e3;border-left-width:0;border-right-width:0;border-style:solid;border-top-width:1px;padding:4px 0;display:flex;flex-direction:column}.tox .tox-collection--list .tox-collection__group:first-child{border-top-width:0}.tox .tox-collection__group-heading{background-color:#fcfcfc;color:rgba(34,47,62,.7);cursor:default;font-size:12px;font-style:normal;font-weight:400;margin-bottom:4px;margin-top:-4px;padding:4px 8px;text-transform:none;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.tox .tox-collection__item{align-items:center;border-radius:3px;color:#222f3e;display:flex;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.tox .tox-image-selector-menu .tox-collection__item,.tox .tox-image-selector-menu .tox-collection__item-image-selector{flex-direction:column}.tox .tox-image-selector-menu .tox-collection__item .tox-collection__item-checkmark,.tox .tox-image-selector-menu .tox-collection__item .tox-collection__item-icon,.tox .tox-image-selector-menu .tox-collection__item .tox-collection__item-image,.tox .tox-image-selector-menu .tox-collection__item-image-selector .tox-collection__item-checkmark,.tox .tox-image-selector-menu .tox-collection__item-image-selector .tox-collection__item-icon,.tox .tox-image-selector-menu .tox-collection__item-image-selector .tox-collection__item-image{flex-grow:1}.tox .tox-image-selector-menu .tox-collection__item label,.tox .tox-image-selector-menu .tox-collection__item-image-selector label{width:48px;white-space:nowrap;overflow:hidden;font-size:12px;color:#222f3e;text-align:center;align-self:flex-end}.tox .tox-image-selector-menu .tox-collection__item-checkmark{height:24px;width:24px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.tox .tox-image-selector-menu .tox-collection__item-checkmark svg path{fill:#006ce7;stroke:#006ce7}.tox .tox-image-selector-menu .tox-image-selector__row .tox-collection__item-image-selector.tox-collection__item--active:not(.tox-collection__item--state-disabled){background-color:#fff}.tox .tox-image-selector-menu .tox-image-selector__row .tox-collection__item-image-selector.tox-collection__item--enabled:not(.tox-collection__item--state-disabled){z-index:2;background-color:#fff;opacity:.8;background-clip:content-box}.tox .tox-collection--list .tox-collection__item{padding:4px 8px}.tox .tox-collection--toolbar .tox-collection__item{border-radius:3px;padding:4px}.tox .tox-collection--grid .tox-collection__item{border-radius:3px;padding:4px}.tox .tox-collection--list .tox-collection__item--enabled:not(.tox-collection__item--state-disabled){background-color:#fff;color:#222f3e}.tox .tox-collection--list .tox-collection__item--active:not(.tox-collection__item--state-disabled){background-color:#006ce7;color:#fff}@media (forced-colors:active){.tox .tox-collection--list .tox-collection__item--active:not(.tox-collection__item--state-disabled){border:solid 1px}}.tox .tox-collection--grid .tox-collection__item--enabled:not(.tox-collection__item--state-disabled){background-color:#a6ccf7;color:#222f3e}.tox .tox-collection--grid .tox-collection__item--active:not(.tox-collection__item--state-disabled){background-color:#f0f0f0;color:#222f3e;position:relative;z-index:1}.tox .tox-collection--grid .tox-collection__item--active:not(.tox-collection__item--state-disabled):focus::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7 inset;content:'';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-collection--grid .tox-collection__item--active:not(.tox-collection__item--state-disabled):focus::after{border:2px solid highlight}}.tox .tox-collection--toolbar .tox-collection__item--enabled:not(.tox-collection__item--state-disabled){background-color:#a6ccf7;color:#222f3e}@media (forced-colors:active){.tox .tox-collection--toolbar .tox-collection__item--enabled:not(.tox-collection__item--state-disabled){border-radius:3px;outline:solid 1px}}.tox .tox-collection--toolbar .tox-collection__item--active:not(.tox-collection__item--state-disabled){color:#222f3e;background-color:#fff;position:relative}.tox .tox-collection--toolbar .tox-collection__item--active:not(.tox-collection__item--state-disabled):hover{background-color:#f0f0f0;color:#222f3e}.tox .tox-collection--toolbar .tox-collection__item--active:not(.tox-collection__item--state-disabled):focus{background-color:#f0f0f0;color:#222f3e}.tox .tox-collection--toolbar .tox-collection__item--active:not(.tox-collection__item--state-disabled):focus::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:'';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-collection--toolbar .tox-collection__item--active:not(.tox-collection__item--state-disabled):focus::after{border:2px solid highlight}}@media (forced-colors:active){.tox .tox-collection--toolbar .tox-collection__item--active:not(.tox-collection__item--state-disabled):hover{border-radius:3px;outline:solid 1px}}.tox .tox-collection__item-image{border:1px solid #eee;border-radius:6px;display:flex;flex-direction:column;justify-content:center;margin-bottom:4px;position:relative}.tox .tox-collection__item-checkmark,.tox .tox-collection__item-icon{align-items:center;display:flex;height:24px;justify-content:center;width:24px}.tox .tox-collection__item-checkmark svg,.tox .tox-collection__item-icon svg{fill:currentColor}.tox .tox-collection--toolbar-lg .tox-collection__item-icon{height:48px;width:48px}.tox .tox-collection__item-label{color:currentColor;display:inline-block;flex:1;font-size:14px;font-style:normal;font-weight:400;line-height:24px;max-width:100%;text-transform:none;word-break:break-all}.tox .tox-collection__item-separator{border-bottom:1px solid #e3e3e3;height:0;margin:4px 0}.tox .tox-collection__item-accessory{color:currentColor;display:inline-block;font-size:14px;height:24px;line-height:24px;text-transform:none}.tox .tox-collection__item-caret{align-items:center;display:flex;min-height:24px}.tox .tox-collection__item-caret::after{content:'';font-size:0;min-height:inherit}.tox .tox-collection__item-caret svg{fill:currentColor}.tox .tox-collection__item--state-disabled{background-color:transparent;color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-collection__item--state-disabled .tox-collection__item-caret svg{fill:rgba(34,47,62,0.5)}.tox .tox-collection--list .tox-collection__item:not(.tox-collection__item--enabled) .tox-collection__item-checkmark svg{display:none}.tox .tox-collection--list .tox-collection__item:not(.tox-collection__item--enabled) .tox-collection__item-accessory+.tox-collection__item-checkmark{display:none}.tox .tox-collection--horizontal{background-color:#fff;border:1px solid #e3e3e3;border-radius:6px;box-shadow:0 0 2px 0 rgba(34,47,62,.2),0 4px 8px 0 rgba(34,47,62,.15);display:flex;flex:0 0 auto;flex-shrink:0;flex-wrap:nowrap;margin-bottom:0;overflow-x:auto;padding:0}.tox .tox-collection--horizontal .tox-collection__group{align-items:center;display:flex;flex-wrap:nowrap;margin:0;padding:0 4px}.tox .tox-collection--horizontal .tox-collection__item{height:28px;margin:6px 1px 5px 0;padding:0 4px}.tox .tox-collection--horizontal .tox-collection__item-label{white-space:nowrap}.tox .tox-collection--horizontal .tox-collection__item-caret{margin-left:4px}.tox .tox-collection__item-container{display:flex}.tox .tox-collection__item-container--row{align-items:center;flex:1 1 auto;flex-direction:row}.tox .tox-collection__item-container--row.tox-collection__item-container--align-left{margin-right:auto}.tox .tox-collection__item-container--row.tox-collection__item-container--align-right{justify-content:flex-end;margin-left:auto}.tox .tox-collection__item-container--row.tox-collection__item-container--valign-top{align-items:flex-start;margin-bottom:auto}.tox .tox-collection__item-container--row.tox-collection__item-container--valign-middle{align-items:center}.tox .tox-collection__item-container--row.tox-collection__item-container--valign-bottom{align-items:flex-end;margin-top:auto}.tox .tox-collection__item-container--column{align-self:center;flex:1 1 auto;flex-direction:column}.tox .tox-collection__item-container--column.tox-collection__item-container--align-left{align-items:flex-start}.tox .tox-collection__item-container--column.tox-collection__item-container--align-right{align-items:flex-end}.tox .tox-collection__item-container--column.tox-collection__item-container--valign-top{align-self:flex-start}.tox .tox-collection__item-container--column.tox-collection__item-container--valign-middle{align-self:center}.tox .tox-collection__item-container--column.tox-collection__item-container--valign-bottom{align-self:flex-end}.tox:not([dir=rtl]) .tox-collection--horizontal .tox-collection__group:not(:last-of-type){border-right:1px solid transparent}.tox:not([dir=rtl]) .tox-collection--list .tox-collection__item>:not(:first-child){margin-left:8px}.tox:not([dir=rtl]) .tox-collection--list .tox-collection__item>.tox-collection__item-label:first-child{margin-left:4px}.tox:not([dir=rtl]) .tox-collection__item-accessory{margin-left:16px;text-align:right}.tox:not([dir=rtl]) .tox-collection .tox-collection__item-caret{margin-left:16px}.tox[dir=rtl] .tox-collection--horizontal .tox-collection__group:not(:last-of-type){border-left:1px solid transparent}.tox[dir=rtl] .tox-collection--list .tox-collection__item>:not(:first-child){margin-right:8px}.tox[dir=rtl] .tox-collection--list .tox-collection__item>.tox-collection__item-label:first-child{margin-right:4px}.tox[dir=rtl] .tox-collection__item-accessory{margin-right:16px;text-align:left}.tox[dir=rtl] .tox-collection .tox-collection__item-caret{margin-right:16px;transform:rotateY(180deg)}.tox[dir=rtl] .tox-collection--horizontal .tox-collection__item-caret{margin-right:4px}@media (forced-colors:active){.tox .tox-hue-slider,.tox .tox-rgb-form .tox-rgba-preview{background-color:currentColor!important;border:1px solid highlight!important;forced-color-adjust:none}}.tox .tox-color-picker-container{display:flex;flex-direction:row;height:225px;margin:0}.tox .tox-sv-palette{box-sizing:border-box;display:flex;height:100%}.tox .tox-sv-palette-spectrum{height:100%}.tox .tox-sv-palette,.tox .tox-sv-palette-spectrum{width:225px}.tox .tox-sv-palette-thumb{background:0 0;border:1px solid #000;border-radius:50%;box-sizing:content-box;height:12px;position:absolute;width:12px}.tox .tox-sv-palette-inner-thumb{border:1px solid #fff;border-radius:50%;height:10px;position:absolute;width:10px}.tox .tox-hue-slider{box-sizing:border-box;height:100%;width:25px}.tox .tox-hue-slider-spectrum{background:linear-gradient(to bottom,red,#ff0080,#f0f,#8000ff,#00f,#0080ff,#0ff,#00ff80,#0f0,#80ff00,#ff0,#ff8000,red);height:100%;width:100%}.tox .tox-hue-slider,.tox .tox-hue-slider-spectrum{width:20px}.tox .tox-hue-slider-spectrum:focus,.tox .tox-sv-palette-spectrum:focus{outline:#08f solid}.tox .tox-hue-slider-thumb{background:#fff;border:1px solid #000;box-sizing:content-box;height:4px;width:100%}.tox .tox-rgb-form{display:flex;flex-direction:column;justify-content:space-between}.tox .tox-rgb-form div{align-items:center;display:flex;justify-content:space-between;margin-bottom:5px;width:inherit}.tox .tox-rgb-form input{min-width:6em}.tox .tox-rgb-form input.tox-invalid{border:1px solid red!important;box-shadow:0 0 0 1px red}.tox .tox-rgb-container{position:relative}.tox .tox-rgb-form .tox-invalid-icon{align-content:center;align-items:center;display:none;height:100%;position:absolute;right:0;top:0}.tox .tox-rgb-form .tox-invalid-icon .tox-control-wrap__status-icon-invalid{margin:0}.tox .tox-rgb-warning-note{background-color:#f5cccc;border:1px solid #f0b3b3;border-radius:3px;color:#77181f;padding:3px}.tox input.tox-invalid+.tox-invalid-icon{display:flex}.tox .tox-rgb-form .tox-rgba-preview{border:1px solid #000;flex-grow:2;margin-bottom:0}.tox:not([dir=rtl]) .tox-sv-palette{margin-right:15px}.tox:not([dir=rtl]) .tox-hue-slider{margin-right:15px}.tox:not([dir=rtl]) .tox-hue-slider-thumb{margin-left:-1px}.tox:not([dir=rtl]) .tox-rgb-form label{margin-right:.5em}.tox[dir=rtl] .tox-sv-palette{margin-left:15px}.tox[dir=rtl] .tox-hue-slider{margin-left:15px}.tox[dir=rtl] .tox-hue-slider-thumb{margin-right:-1px}.tox[dir=rtl] .tox-rgb-form label{margin-left:.5em}.tox .tox-toolbar .tox-swatches,.tox .tox-toolbar__overflow .tox-swatches,.tox .tox-toolbar__primary .tox-swatches{margin:5px 0 6px 11px}.tox .tox-collection--list .tox-collection__group .tox-swatches-menu{border:0;margin:-4px -4px}.tox .tox-swatches__row{display:flex}@media (forced-colors:active){.tox .tox-swatches__row{forced-color-adjust:none}}.tox .tox-swatch{height:30px;transition:transform .15s,box-shadow .15s;width:30px}.tox .tox-swatch:focus,.tox .tox-swatch:hover{box-shadow:0 0 0 1px rgba(127,127,127,.3) inset;transform:scale(.8)}.tox .tox-swatch--remove{align-items:center;display:flex;justify-content:center}.tox .tox-swatch--remove svg path{stroke:#e74c3c}.tox .tox-swatches__picker-btn{align-items:center;background-color:transparent;border:0;cursor:pointer;display:flex;height:30px;justify-content:center;outline:0;padding:0;width:30px}.tox .tox-swatches__picker-btn svg{fill:#222f3e;height:24px;width:24px}.tox .tox-swatches__picker-btn:hover{background:#f0f0f0}.tox div.tox-swatch:not(.tox-swatch--remove) svg{display:none;fill:#222f3e;height:24px;margin:calc((30px - 24px)/ 2) calc((30px - 24px)/ 2);width:24px}.tox div.tox-swatch:not(.tox-swatch--remove) svg path{fill:#fff;paint-order:stroke;stroke:#222f3e;stroke-width:2px}.tox div.tox-swatch:not(.tox-swatch--remove).tox-collection__item--enabled svg{display:block}.tox:not([dir=rtl]) .tox-swatches__picker-btn{margin-left:auto}.tox[dir=rtl] .tox-swatches__picker-btn{margin-right:auto}.tox .tox-comment{background:#fff;border:1px solid #fff;border-radius:6px;padding:8px;padding-bottom:16px;position:relative}.tox .tox-comment:hover{box-shadow:0 4px 8px 0 rgba(34,47,62,.1)}.tox .tox-comment.tox-comment--selected{background-color:#fff2c9;border:1px solid #ffcf30;box-shadow:0 4px 8px 0 rgba(34,47,62,.1)}.tox .tox-comment.tox-comment--selected:focus{border:2px solid #006ce7;margin:-1px}.tox .tox-comment.tox-comment--selected:focus:not(:first-child){margin-top:7px}.tox .tox-comment.tox-comment--selected .tox-comment__single{margin-bottom:12px}.tox .tox-comment.tox-comment--selected .tox-comment__single:focus{position:relative}.tox .tox-comment.tox-comment--selected .tox-comment__single:focus::after{top:-9px;pointer-events:none;position:absolute;content:\"\";display:block;bottom:-9px;left:-9px;right:-9px;border-radius:6px;border:2px solid #006ce7}.tox .tox-comment.tox-comment--selected .tox-comment__single:focus:last-of-type:has(textarea):after{bottom:calc((12px + 16px + 1px) * -1)}.tox .tox-comment__header{align-items:center;color:#222f3e;display:flex;justify-content:space-between}.tox .tox-comment__date{color:#222f3e;font-size:12px;line-height:18px}.tox .tox-comment__body{color:#222f3e;font-size:16px;font-style:normal;font-weight:400;line-height:1.3;margin-top:8px;position:relative;text-transform:initial;transition:max-height .5s cubic-bezier(0, 1, 0, 1);white-space:pre-wrap}.tox .tox-comment__body.tox-comment__body--expanded{max-height:100em;transition:max-height 1s ease-in-out}.tox .tox-comment__body.tox-comment__body--pending{transition:max-height 0s}.tox .tox-comment__body p{margin:0}.tox .tox-comment__body textarea{resize:none;white-space:normal;width:100%;font-size:16px}.tox .tox-comment__loading-text{align-items:center;color:#222f3e;display:flex;flex-direction:column;position:relative}.tox .tox-comment__loading-text>div{padding-bottom:16px}.tox .tox-comment__overlaytext{bottom:0;flex-direction:column;font-size:14px;left:0;padding:1em;position:absolute;right:0;top:0;z-index:10}.tox .tox-comment__overlaytext p{background-color:#fff;box-shadow:0 0 8px 8px #fff;color:#222f3e;text-align:center}.tox .tox-comment__overlaytext div:nth-of-type(2){font-size:.8em}.tox .tox-comment__expander{padding-top:8px}.tox .tox-comment__expander p{color:rgba(34,47,62,.7);font-size:14px;font-style:normal}.tox .tox-comment__expander p:focus{font-weight:700}.tox .tox-comment__buttonspacing{padding-top:16px;text-align:center}.tox .tox-tbtn.tox-comment__mention-btn{display:flex;width:34px;height:34px;padding:5px;justify-content:center;align-items:center;margin:0;background-color:transparent}.tox .tox-comment-thread{background:#fff;position:relative;border-radius:6px;background-color:transparent}.tox .tox-comment-thread>:not(:first-child){margin-top:8px}.tox .tox-comment-thread__overlay::after{background:#fff;bottom:0;content:\"\";display:flex;left:0;opacity:.9;position:absolute;right:0;top:0;z-index:5}.tox .tox-comment__reply{display:flex;flex-shrink:0;flex-wrap:wrap;justify-content:flex-end;margin-top:8px}.tox .tox-comment__reply>:first-child{margin-bottom:8px;width:100%}.tox .tox-comment__edit{display:flex;flex-wrap:wrap;justify-content:flex-end;margin-top:8px}.tox .tox-comment__gradient::after{background:linear-gradient(rgba(255,255,255,0),#fff);bottom:0;content:\"\";display:block;height:5em;margin-top:-40px;position:absolute;width:100%}.tox .tox-comment__overlay{background:#fff;bottom:0;display:flex;flex-direction:column;flex-grow:1;left:0;opacity:.9;position:absolute;right:0;text-align:center;top:0;z-index:5}.tox .tox-comment__busy-spinner{align-items:center;background-color:#fff;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;z-index:20}.tox .tox-comment__scroll{display:flex;flex-direction:column;flex-shrink:1;overflow:auto;padding:12px;scroll-behavior:smooth}.tox .tox-comment__scroll:has(textarea:focus){scroll-behavior:auto}.tox .tox-comment--disappearing{transition:opacity .5s ease}.tox .tox-comment[data-transitioning-destination=deleting]{opacity:0}.tox .tox-ring-loader{width:10px;height:10px;border:1px solid #fff;border-bottom-color:transparent;border-radius:50%;display:inline-block;box-sizing:border-box;animation:tox-rotation 1s linear infinite}.tox:not([dir=rtl]) .tox-comment__edit{margin-left:8px}.tox:not([dir=rtl]) .tox-comment__buttonspacing>:last-child,.tox:not([dir=rtl]) .tox-comment__edit>:last-child,.tox:not([dir=rtl]) .tox-comment__reply>:last-child{margin-left:8px}.tox[dir=rtl] .tox-comment__edit{margin-right:8px}.tox[dir=rtl] .tox-comment__buttonspacing>:last-child,.tox[dir=rtl] .tox-comment__edit>:last-child,.tox[dir=rtl] .tox-comment__reply>:last-child{margin-right:8px}.tox .tox-user{align-items:center;display:flex}.tox .tox-user__avatar svg{fill:rgba(34,47,62,0.7)}.tox .tox-user__avatar img{border-radius:50%;height:36px;object-fit:cover;vertical-align:middle;width:36px}.tox .tox-user__name{color:#222f3e;font-size:14px;font-style:normal;font-weight:700;line-height:18px;text-transform:none}.tox:not([dir=rtl]) .tox-user__avatar img,.tox:not([dir=rtl]) .tox-user__avatar svg{margin-right:8px}.tox:not([dir=rtl]) .tox-user__avatar+.tox-user__name{margin-left:8px}.tox[dir=rtl] .tox-user__avatar img,.tox[dir=rtl] .tox-user__avatar svg{margin-left:8px}.tox[dir=rtl] .tox-user__avatar+.tox-user__name{margin-right:8px}.tox .tox-dialog-wrap{align-items:center;display:flex;justify-content:center;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1100}.tox .tox-dialog-wrap__backdrop{background-color:rgba(255,255,255,.75);bottom:0;left:0;position:absolute;right:0;top:0;z-index:1}.tox .tox-dialog-wrap__backdrop--opaque{background-color:#fff}.tox .tox-dialog{background-color:#fff;border-color:#eee;border-radius:10px;border-style:solid;border-width:0;box-shadow:0 16px 16px -10px rgba(34,47,62,.15),0 0 40px 1px rgba(34,47,62,.15);display:flex;flex-direction:column;max-height:100%;max-width:480px;overflow:hidden;position:relative;width:95vw;z-index:2}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox .tox-dialog{align-self:flex-start;margin:8px auto;max-height:calc(100vh - 8px * 2);width:calc(100vw - 16px)}}.tox .tox-dialog-inline{z-index:1100}.tox .tox-dialog__header{align-items:center;background-color:#fff;border-bottom:none;color:#222f3e;display:flex;font-size:16px;justify-content:space-between;padding:8px 16px 0 16px;position:relative}.tox .tox-dialog__header .tox-button{z-index:1}.tox .tox-dialog__draghandle{cursor:grab;height:100%;left:0;position:absolute;top:0;width:100%}.tox .tox-dialog__draghandle:active{cursor:grabbing}.tox .tox-dialog__dismiss{margin-left:auto}.tox .tox-dialog__title{font-family:-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen-Sans,Ubuntu,Cantarell,\"Helvetica Neue\",sans-serif;font-size:20px;font-style:normal;font-weight:400;line-height:1.3;margin:0;text-transform:none}.tox .tox-dialog__body{color:#222f3e;display:flex;flex:1;font-size:16px;font-style:normal;font-weight:400;line-height:1.3;min-width:0;text-align:left;text-transform:none}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox .tox-dialog__body{flex-direction:column}}.tox .tox-dialog__body-nav{align-items:flex-start;display:flex;flex-direction:column;flex-shrink:0;padding:16px 16px}@media only screen and (min-width:768px){.tox .tox-dialog__body-nav{max-width:11em}}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox .tox-dialog__body-nav{flex-direction:row;-webkit-overflow-scrolling:touch;overflow-x:auto;padding-bottom:0}}.tox .tox-dialog__body-nav-item{border-bottom:2px solid transparent;color:rgba(34,47,62,.7);display:inline-block;flex-shrink:0;font-size:14px;line-height:1.3;margin-bottom:8px;max-width:13em;-webkit-text-decoration:none;text-decoration:none}.tox .tox-dialog__body-nav-item:focus{background-color:rgba(0,108,231,.1)}.tox .tox-dialog__body-nav-item--active{border-bottom:2px solid #144782;color:#144782}@media (forced-colors:active){.tox .tox-dialog__body-nav-item--active{border-bottom:2px solid highlight;color:highlight}}.tox .tox-dialog__body-content{box-sizing:border-box;display:flex;flex:1;flex-direction:column;max-height:min(650px,calc(100vh - 110px));overflow:auto;-webkit-overflow-scrolling:touch;padding:16px 16px}.tox .tox-dialog__body-content>*{margin-bottom:0;margin-top:16px}.tox .tox-dialog__body-content>:first-child{margin-top:0}.tox .tox-dialog__body-content>:last-child{margin-bottom:0}.tox .tox-dialog__body-content>:only-child{margin-bottom:0;margin-top:0}.tox .tox-dialog__body-content a{color:#144782;cursor:pointer;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-dialog__body-content a:focus,.tox .tox-dialog__body-content a:hover{color:#071729;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-dialog__body-content a:focus-visible{border-radius:1px;outline:2px solid #144782;outline-offset:2px}.tox .tox-dialog__body-content a:active{color:#000;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-dialog__body-content svg{fill:#222f3e}.tox .tox-dialog__body-content strong{font-weight:700}.tox .tox-dialog__body-content ul{list-style-type:disc}.tox .tox-dialog__body-content dd,.tox .tox-dialog__body-content ol,.tox .tox-dialog__body-content ul{padding-inline-start:2.5rem}.tox .tox-dialog__body-content dl,.tox .tox-dialog__body-content ol,.tox .tox-dialog__body-content ul{margin-bottom:16px}.tox .tox-dialog__body-content dd,.tox .tox-dialog__body-content dl,.tox .tox-dialog__body-content dt,.tox .tox-dialog__body-content ol,.tox .tox-dialog__body-content ul{display:block;margin-inline-end:0;margin-inline-start:0}.tox .tox-dialog__body-content .tox-form__group h1{color:#222f3e;font-size:20px;font-style:normal;font-weight:700;letter-spacing:normal;margin-bottom:16px;margin-top:2rem;text-transform:none}.tox .tox-dialog__body-content .tox-form__group h2{color:#222f3e;font-size:16px;font-style:normal;font-weight:700;letter-spacing:normal;margin-bottom:16px;margin-top:2rem;text-transform:none}.tox .tox-dialog__body-content .tox-form__group p{margin-bottom:16px}.tox .tox-dialog__body-content .tox-form__group h1:first-child,.tox .tox-dialog__body-content .tox-form__group h2:first-child,.tox .tox-dialog__body-content .tox-form__group p:first-child{margin-top:0}.tox .tox-dialog__body-content .tox-form__group h1:last-child,.tox .tox-dialog__body-content .tox-form__group h2:last-child,.tox .tox-dialog__body-content .tox-form__group p:last-child{margin-bottom:0}.tox .tox-dialog__body-content .tox-form__group h1:only-child,.tox .tox-dialog__body-content .tox-form__group h2:only-child,.tox .tox-dialog__body-content .tox-form__group p:only-child{margin-bottom:0;margin-top:0}.tox .tox-dialog__body-content .tox-form__group .tox-label.tox-label--center{text-align:center}.tox .tox-dialog__body-content .tox-form__group .tox-label.tox-label--end{text-align:end}.tox .tox-dialog--width-lg{height:650px;max-width:1200px}.tox .tox-dialog--fullscreen{height:100%;max-width:100%}.tox .tox-dialog--fullscreen .tox-dialog__body-content{max-height:100%}.tox .tox-dialog--width-md{max-width:800px}.tox .tox-dialog--width-md .tox-dialog__body-content{overflow:auto}.tox .tox-dialog__body-content--centered{text-align:center}.tox .tox-dialog__footer{align-items:center;background-color:#fff;border-top:none;display:flex;justify-content:space-between;padding:8px 16px}.tox .tox-dialog__footer-end,.tox .tox-dialog__footer-start{display:flex}.tox .tox-dialog__busy-spinner{align-items:center;background-color:rgba(255,255,255,.75);bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0;z-index:3}.tox .tox-dialog__table{border-collapse:collapse;width:100%}.tox .tox-dialog__table thead th{font-weight:700;padding-bottom:8px}.tox .tox-dialog__table thead th:first-child{padding-right:8px}.tox .tox-dialog__table tbody tr{border-bottom:1px solid #626262}.tox .tox-dialog__table tbody tr:last-child{border-bottom:none}.tox .tox-dialog__table td{padding-bottom:8px;padding-top:8px}.tox .tox-dialog__table td:first-child{padding-right:8px}.tox .tox-dialog__iframe{min-height:200px}.tox .tox-dialog__iframe.tox-dialog__iframe--opaque{background:#fff}.tox .tox-navobj-bordered{position:relative}.tox .tox-navobj-bordered::before{border:1px solid #eee;border-radius:6px;content:'';inset:0;opacity:1;pointer-events:none;position:absolute;z-index:1}.tox .tox-navobj-bordered iframe{border-radius:6px}.tox .tox-navobj-bordered-focus.tox-navobj-bordered::before{border-color:#006ce7;box-shadow:0 0 0 1px #006ce7;outline:0}.tox .tox-dialog__popups{position:absolute;width:100%;z-index:1100}.tox .tox-dialog__body-iframe{display:flex;flex:1;flex-direction:column}.tox .tox-dialog__body-iframe .tox-navobj{display:flex;flex:1}.tox .tox-dialog__body-iframe .tox-navobj :nth-child(2){flex:1;height:100%}.tox .tox-dialog-dock-fadeout{opacity:0;visibility:hidden}.tox .tox-dialog-dock-fadein{opacity:1;visibility:visible}.tox .tox-dialog-dock-transition{transition:visibility 0s linear .3s,opacity .3s ease}.tox .tox-dialog-dock-transition.tox-dialog-dock-fadein{transition-delay:0s}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox:not([dir=rtl]) .tox-dialog__body-nav{margin-right:0}}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox:not([dir=rtl]) .tox-dialog__body-nav-item:not(:first-child){margin-left:8px}}.tox:not([dir=rtl]) .tox-dialog__footer .tox-dialog__footer-end>*,.tox:not([dir=rtl]) .tox-dialog__footer .tox-dialog__footer-start>*{margin-left:8px}.tox[dir=rtl] .tox-dialog__body{text-align:right}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox[dir=rtl] .tox-dialog__body-nav{margin-left:0}}@media only screen and (max-width:767px){body:not(.tox-force-desktop) .tox[dir=rtl] .tox-dialog__body-nav-item:not(:first-child){margin-right:8px}}.tox[dir=rtl] .tox-dialog__footer .tox-dialog__footer-end>*,.tox[dir=rtl] .tox-dialog__footer .tox-dialog__footer-start>*{margin-right:8px}.tox .tox-dropdown-content{box-shadow:0 0 2px 0 rgba(34,47,62,.2),0 4px 8px 0 rgba(34,47,62,.15);position:fixed;position-try-fallbacks:flip-block,flip-inline,flip-block flip-inline;overflow:auto;height:fit-content;width:fit-content;border-radius:var(--tox-private-panel-border-radius,6px);background-color:var(--tox-private-background-color,#fff);max-height:50vh}.tox .tox-dropdown-content .tox-menu{width:100%;box-shadow:none}body.tox-dialog__disable-scroll{overflow:hidden}.tox .tox-dropzone-container{display:flex;flex:1}.tox .tox-dropzone{align-items:center;background:#fff;border:2px dashed #eee;box-sizing:border-box;display:flex;flex-direction:column;flex-grow:1;justify-content:center;min-height:100px;padding:10px}.tox .tox-dropzone p{color:rgba(34,47,62,.7);margin:0 0 16px 0}.tox .tox-edit-area{display:flex;flex:1;overflow:hidden;position:relative}.tox .tox-edit-area::before{border:2px solid #006ce7;border-radius:4px;content:'';inset:0;opacity:0;pointer-events:none;position:absolute;transition:opacity .15s;z-index:1}@media (forced-colors:active){.tox .tox-edit-area::before{border:2px solid highlight}}.tox .tox-edit-area__iframe{background-color:#fff;border:0;box-sizing:border-box;flex:1;height:100%;position:absolute;width:100%}.tox.tox-edit-focus .tox-edit-area::before{opacity:1}.tox.tox-inline-edit-area{border:1px dotted #eee}.tox .tox-expandable-box{background:var(--tox-private-background-color,#fff);border-radius:var(--tox-private-control-border-radius,6px);border:1px solid var(--tox-private-border-color,#eee);display:flex;flex-direction:column;justify-content:stretch;overflow:hidden}.tox .tox-expandable-box>.tox-button{margin:0 var(--tox-private-pad-md,16px) var(--tox-private-pad-md,16px)}.tox .tox-expandable-box__title{align-items:center;background:hsl(from var(--tox-private-color-tint,#006ce7) h s l / 10%);border-bottom:1px solid var(--tox-private-border-color,#eee);color:var(--tox-private-text-color,#222f3e);display:flex;font-size:var(--tox-private-font-size-sm, 14px);font-weight:var(--tox-private-font-weight-bold,bold);gap:var(--tox-private-pad-sm,8px);min-width:0;padding:var(--tox-private-pad-sm,8px) var(--tox-private-pad-md,16px)}.tox .tox-expandable-box__title .tox-icon{flex-shrink:0;height:var(--tox-private-base-value,16px);fill:var(--tox-private-text-color,#222f3e)}.tox .tox-expandable-box__title-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tox .tox-expandable-box__content{margin:var(--tox-private-pad-md,16px);overflow:auto}.tox .tox-expandable-box__content--overflowing{position:relative;overflow:hidden}.tox .tox-expandable-box__content--overflowing::after{content:'';position:absolute;bottom:0;left:0;right:0;height:min(100px,100%);pointer-events:none;background:linear-gradient(to bottom,transparent 50%,var(--tox-private-background-color,#fff))}.tox .tox-expandable-box__content--expanded{max-height:fit-content}.tox .tox-control-wrap{flex:1;position:relative}.tox .tox-control-wrap:not(.tox-control-wrap--status-invalid) .tox-control-wrap__status-icon-invalid,.tox .tox-control-wrap:not(.tox-control-wrap--status-unknown) .tox-control-wrap__status-icon-unknown,.tox .tox-control-wrap:not(.tox-control-wrap--status-valid) .tox-control-wrap__status-icon-valid{display:none}.tox .tox-control-wrap svg{display:block}.tox .tox-control-wrap__status-icon-wrap{position:absolute;top:50%;transform:translateY(-50%)}.tox .tox-control-wrap__status-icon-invalid svg{fill:#c00}.tox .tox-control-wrap__status-icon-unknown svg{fill:orange}.tox .tox-control-wrap__status-icon-valid svg{fill:green}.tox:not([dir=rtl]) .tox-control-wrap--status-invalid .tox-textfield,.tox:not([dir=rtl]) .tox-control-wrap--status-unknown .tox-textfield,.tox:not([dir=rtl]) .tox-control-wrap--status-valid .tox-textfield{padding-right:32px}.tox:not([dir=rtl]) .tox-control-wrap__status-icon-wrap{right:4px}.tox[dir=rtl] .tox-control-wrap--status-invalid .tox-textfield,.tox[dir=rtl] .tox-control-wrap--status-unknown .tox-textfield,.tox[dir=rtl] .tox-control-wrap--status-valid .tox-textfield{padding-left:32px}.tox[dir=rtl] .tox-control-wrap__status-icon-wrap{left:4px}.tox .tox-custom-preview{border-color:#eee;border-radius:6px;border-style:solid;border-width:1px;flex:1;padding:8px}.tox .tox-autocompleter{max-width:25em}.tox .tox-autocompleter .tox-menu{box-sizing:border-box;max-width:25em}.tox .tox-autocompleter .tox-autocompleter-highlight{font-weight:700}.tox .tox-color-input{display:flex;position:relative;z-index:1}.tox .tox-color-input .tox-textfield{z-index:-1}.tox .tox-color-input span{border-color:rgba(34 47 62 / 20%);border-radius:6px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;height:24px;position:absolute;top:6px;width:24px}@media (forced-colors:active){.tox .tox-color-input span{border-color:currentColor;border-width:2px!important;forced-color-adjust:none}}.tox .tox-color-input span:focus:not([aria-disabled=true]),.tox .tox-color-input span:hover:not([aria-disabled=true]){border-color:#006ce7;cursor:pointer}.tox .tox-color-input span::before{background-image:linear-gradient(45deg,rgba(0,0,0,.25) 25%,transparent 25%),linear-gradient(-45deg,rgba(0,0,0,.25) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,rgba(0,0,0,.25) 75%),linear-gradient(-45deg,transparent 75%,rgba(0,0,0,.25) 75%);background-position:0 0,0 6px,6px -6px,-6px 0;background-size:12px 12px;border:1px solid #fff;border-radius:6px;box-sizing:border-box;content:'';height:24px;left:-1px;position:absolute;top:-1px;width:24px;z-index:-1}@media (forced-colors:active){.tox .tox-color-input span::before{border:none}}.tox .tox-color-input span[aria-disabled=true]{cursor:not-allowed}.tox:not([dir=rtl]) .tox-color-input .tox-textfield{padding-left:36px}.tox:not([dir=rtl]) .tox-color-input span{left:6px}.tox[dir=rtl] .tox-color-input .tox-textfield{padding-right:36px}.tox[dir=rtl] .tox-color-input span{right:6px}.tox .tox-label,.tox .tox-toolbar-label{color:rgba(34,47,62,.7);display:block;font-size:14px;font-style:normal;font-weight:400;line-height:1.3;padding:0 8px 0 0;text-transform:none;white-space:nowrap}.tox .tox-toolbar-label{padding:0 8px}.tox[dir=rtl] .tox-label{padding:0 0 0 8px}.tox .tox-form{display:flex;flex:1;flex-direction:column}.tox .tox-form__group{box-sizing:border-box;margin-bottom:4px}.tox .tox-form-group--maximize{flex:1}.tox .tox-form__group--error{color:#c00}.tox .tox-form__group--collection{display:flex}.tox .tox-form__grid{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between}.tox .tox-form__grid--2col>.tox-form__group{width:calc(50% - (8px / 2))}.tox .tox-form__grid--3col>.tox-form__group{width:calc(100% / 3 - (8px / 2))}.tox .tox-form__grid--4col>.tox-form__group{width:calc(25% - (8px / 2))}.tox .tox-form__controls-h-stack{align-items:center;display:flex}.tox .tox-form__group--inline{align-items:center;display:flex}.tox .tox-form__group--stretched{display:flex;flex:1;flex-direction:column}.tox .tox-form__group--stretched .tox-textarea{flex:1}.tox .tox-form__group--stretched .tox-navobj{display:flex;flex:1}.tox .tox-form__group--stretched .tox-navobj :nth-child(2){flex:1;height:100%}.tox:not([dir=rtl]) .tox-form__controls-h-stack>:not(:first-child){margin-left:4px}.tox[dir=rtl] .tox-form__controls-h-stack>:not(:first-child){margin-right:4px}.tox .tox-lock.tox-locked .tox-lock-icon__unlock,.tox .tox-lock:not(.tox-locked) .tox-lock-icon__lock{display:none}.tox .tox-context-form__group .tox-button--icon.tox-lock-context-form-size-input{margin-left:8px;margin-right:8px}.tox .tox-listboxfield .tox-listbox--select,.tox .tox-textarea,.tox .tox-textarea-wrap .tox-textarea:focus,.tox .tox-textfield,.tox .tox-toolbar-textfield{appearance:none;background-color:#fff;border-color:#eee;border-radius:6px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;color:#222f3e;font-family:-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen-Sans,Ubuntu,Cantarell,\"Helvetica Neue\",sans-serif;font-size:16px;line-height:24px;margin:0;min-height:34px;outline:0;padding:5px 5.5px;resize:none;width:100%}.tox .tox-textarea[disabled],.tox .tox-textfield[disabled],.tox .tox-toolbar-textfield[disabled]{background-color:#f2f2f2;color:rgba(34,47,62,.85);cursor:not-allowed}.tox .tox-custom-editor:focus-within,.tox .tox-focusable-wrapper:focus,.tox .tox-listboxfield .tox-listbox--select:focus,.tox .tox-textarea-wrap:focus-within,.tox .tox-textarea:focus,.tox .tox-textfield:focus,.tox .tox-toolbar-textfield:focus{background-color:#fff;border-color:#006ce7;box-shadow:0 0 0 1px #006ce7;outline:0}.tox .tox-toolbar-textfield{max-width:250px;min-height:unset;height:28px;margin:5px 0 6px 0}.tox .tox-naked-btn{background-color:transparent;border:0;border-color:transparent;box-shadow:unset;color:#006ce7;cursor:pointer;display:block;margin:0;padding:0}.tox .tox-naked-btn svg{display:block;fill:#222f3e}.tox .tox-textfield-size{width:80px}.tox:not([dir=rtl]) .tox-toolbar-textfield+*{margin-left:4px}.tox[dir=rtl] .tox-toolbar-textfield+*{margin-right:4px}.tox .tox-listboxfield{cursor:pointer;position:relative}.tox .tox-listboxfield .tox-listbox--select[disabled]{background-color:#f2f2f2;color:rgba(34,47,62,.85);cursor:not-allowed}.tox .tox-listbox__select-label{cursor:default;flex:1;margin:0 4px}.tox .tox-listbox__select-chevron{align-items:center;display:flex;justify-content:center;width:16px}.tox .tox-listbox__select-chevron svg{fill:#222f3e}@media (forced-colors:active){.tox .tox-listbox__select-chevron svg{fill:currentColor!important}}.tox .tox-listboxfield .tox-listbox--select{align-items:center;display:flex}.tox:not([dir=rtl]) .tox-listboxfield svg{right:8px}.tox[dir=rtl] .tox-listboxfield svg{left:8px}.tox .tox-selectfield{cursor:pointer;position:relative}.tox .tox-selectfield select{appearance:none;background-color:#fff;border-color:#eee;border-radius:6px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;color:#222f3e;font-family:-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen-Sans,Ubuntu,Cantarell,\"Helvetica Neue\",sans-serif;font-size:16px;line-height:24px;margin:0;min-height:34px;outline:0;padding:5px 5.5px;resize:none;width:100%}.tox .tox-selectfield select[disabled]{background-color:#f2f2f2;color:rgba(34,47,62,.85);cursor:not-allowed}.tox .tox-selectfield select::-ms-expand{display:none}.tox .tox-selectfield select:focus{background-color:#fff;border-color:#006ce7;box-shadow:0 0 0 1px #006ce7;outline:0}.tox .tox-selectfield svg{pointer-events:none;position:absolute;top:50%;transform:translateY(-50%)}.tox .tox-selectfield select option:checked{background-color:revert;color:revert}.tox:not([dir=rtl]) .tox-selectfield select[size=\"0\"],.tox:not([dir=rtl]) .tox-selectfield select[size=\"1\"]{padding-right:24px}.tox:not([dir=rtl]) .tox-selectfield svg{right:8px}.tox[dir=rtl] .tox-selectfield select[size=\"0\"],.tox[dir=rtl] .tox-selectfield select[size=\"1\"]{padding-left:24px}.tox[dir=rtl] .tox-selectfield svg{left:8px}.tox .tox-textarea-wrap{border-color:#eee;border-radius:6px;border-style:solid;border-width:1px;display:flex;flex:1;overflow:hidden}.tox .tox-textarea{appearance:textarea;white-space:pre-wrap}.tox .tox-textarea-wrap .tox-textarea{border:none}.tox .tox-textarea-wrap .tox-textarea:focus{border:none}.tox-fullscreen{border:0;height:100%;margin:0;overflow:hidden;overscroll-behavior:none;padding:0;touch-action:pinch-zoom;width:100%}.tox.tox-tinymce.tox-fullscreen .tox-statusbar__resize-handle{display:none}.tox-shadowhost.tox-fullscreen,.tox.tox-tinymce.tox-fullscreen{left:0;position:fixed;top:0;z-index:1200}.tox.tox-tinymce.tox-fullscreen{background-color:transparent}.tox-fullscreen .tox.tox-tinymce-aux,.tox-fullscreen~.tox.tox-tinymce-aux{z-index:1201}.tox .tox-help__more-link{list-style:none;margin-top:1em}.tox .tox-imagepreview{background-color:#666;height:380px;overflow:hidden;position:relative;width:100%}.tox .tox-imagepreview.tox-imagepreview__loaded{overflow:auto}.tox .tox-imagepreview__container{display:flex;left:100vw;position:absolute;top:100vw}.tox .tox-imagepreview__image{background:url(data:image/gif;base64,R0lGODdhDAAMAIABAMzMzP///ywAAAAADAAMAAACFoQfqYeabNyDMkBQb81Uat85nxguUAEAOw==)}.tox .tox-image-tools .tox-spacer{flex:1}.tox .tox-image-tools .tox-bar{align-items:center;display:flex;height:60px;justify-content:center}.tox .tox-image-tools .tox-imagepreview,.tox .tox-image-tools .tox-imagepreview+.tox-bar{margin-top:8px}.tox .tox-image-tools .tox-croprect-block{background:#000;opacity:.5;position:absolute;zoom:1}.tox .tox-image-tools .tox-croprect-handle{border:2px solid #fff;height:20px;left:0;position:absolute;top:0;width:20px}.tox .tox-image-tools .tox-croprect-handle-move{border:0;cursor:move;position:absolute}.tox .tox-image-tools .tox-croprect-handle-nw{border-width:2px 0 0 2px;cursor:nw-resize;left:100px;margin:-2px 0 0 -2px;top:100px}.tox .tox-image-tools .tox-croprect-handle-ne{border-width:2px 2px 0 0;cursor:ne-resize;left:200px;margin:-2px 0 0 -20px;top:100px}.tox .tox-image-tools .tox-croprect-handle-sw{border-width:0 0 2px 2px;cursor:sw-resize;left:100px;margin:-20px 2px 0 -2px;top:200px}.tox .tox-image-tools .tox-croprect-handle-se{border-width:0 2px 2px 0;cursor:se-resize;left:200px;margin:-20px 0 0 -20px;top:200px}.tox .tox-image-selector-loading-spinner-wrapper{display:flex;justify-content:center;align-items:center}.tox .tox-image-selector-loading-spinner{position:absolute;width:min(24px,30%);aspect-ratio:1/1;border-radius:50%;border:3px solid #006ce7;border-bottom-color:transparent;animation:tox-rotation 1s linear infinite}.tox .tox-toolbar .tox-image-selector,.tox .tox-toolbar__overflow .tox-image-selector,.tox .tox-toolbar__primary .tox-image-selector{margin:5px 0 6px 11px}.tox .tox-image-selector-menu{border:0;border-radius:3px;margin:-4px -4px;padding:4px}.tox .tox-image-selector-menu .tox-collection--list .tox-collection__group{border:0;padding:0;margin:-4px -4px}.tox .tox-image-selector-menu .tox-collection__item{max-width:48px}.tox .tox-image-selector-menu .tox-collection__item-icon{border:1px solid #eee;border-radius:3px;margin-bottom:4px;width:100%}.tox .tox-image-selector-menu .tox-collection__item-icon svg path{stroke:#c00}.tox .tox-image-selector__row{display:flex}.tox .tox-image-selector--remove{align-items:center;display:flex;justify-content:center}.tox .tox-image-selector--remove svg path{stroke:#c00}.tox .tox-image-selector-image-wrapper{width:46px;height:46px;display:flex;align-items:center;justify-content:center}.tox .tox-image-selector-image-img{max-width:100%;max-height:100%}.tox .tox-image-selector__picker-btn{align-items:center;background-color:transparent;border:0;cursor:pointer;display:flex;height:30px;justify-content:center;outline:0;padding:0;width:30px}.tox .tox-image-selector__picker-btn svg{fill:#222f3e;height:24px;width:24px}.tox .tox-image-selector__picker-btn:hover{background:#f0f0f0}.tox .tox-context-toolbar{position:absolute;position-try-fallbacks:flip-block,flip-inline,flip-block flip-inline;z-index:1150;background-color:var(--tox-private-background-color,#fff);color:var(--tox-private-text-color,#222f3e);border:1px solid #e3e3e3;border-radius:6px;box-shadow:0 2px 8px rgba(0,0,0,.08);padding:8px}.tox .tox-context-toolbar[popover]{inset:auto;margin:0}.tox .tox-context-toolbar .tox-toolbar{display:flex;flex-wrap:nowrap;gap:8px}.tox .tox-context-toolbar .tox-toolbar__group{display:flex;flex-wrap:nowrap;flex-shrink:0;gap:8px;align-items:center;padding:0}.tox .tox-insert-table-picker{background-color:#fff;display:flex;flex-wrap:wrap;width:170px}.tox .tox-insert-table-picker>div{border-color:#eee;border-style:solid;border-width:0 1px 1px 0;box-sizing:border-box;height:17px;width:17px}.tox .tox-collection--list .tox-collection__group .tox-insert-table-picker{margin:-4px -4px}.tox .tox-insert-table-picker .tox-insert-table-picker__selected{background-color:#006ce7;border-color:#eee}@media (forced-colors:active){.tox .tox-insert-table-picker .tox-insert-table-picker__selected{border-color:Highlight;filter:contrast(50%)}}.tox .tox-insert-table-picker__label{color:rgba(34,47,62,.7);display:block;font-size:14px;padding:4px;text-align:center;width:100%}.tox:not([dir=rtl]) .tox-insert-table-picker>div:nth-child(10n){border-right:0}.tox[dir=rtl] .tox-insert-table-picker>div:nth-child(10n+1){border-right:0}.tox-mentions__card-common{z-index:1200}.tox.tox-mentions__card{background:#fff;border:1px solid #eee;display:flex;padding:4px 8px}.tox.tox-mentions__card .tox-mentions__container{display:flex;flex-direction:column;align-self:center;margin:0 4px}.tox .tox-mentions__avatar{width:42px;height:42px;border-radius:50%;margin-right:4px}.tox .tox-mentions__username{font-size:14px;line-height:21px;color:#222f3e}.tox .tox-mentions__description{font-size:12px;line-height:21px;color:rgba(34,47,62,.7)}.tox .tox-collection__item--active .tox-mentions__description,.tox .tox-collection__item--active .tox-mentions__username{color:inherit}.tox .tox-menu{background-color:#fff;border:1px solid transparent;border-radius:6px;box-shadow:0 0 2px 0 rgba(34,47,62,.2),0 4px 8px 0 rgba(34,47,62,.15);display:inline-block;overflow:hidden;vertical-align:top;z-index:1150}.tox .tox-menu.tox-collection.tox-collection--list{padding:0 4px}.tox .tox-menu.tox-collection.tox-collection--toolbar{padding:8px}.tox .tox-menu.tox-collection.tox-collection--grid{padding:8px}@media only screen and (min-width:768px){.tox .tox-menu .tox-collection__item-label{overflow-wrap:break-word;word-break:normal}.tox .tox-dialog__popups .tox-menu .tox-collection__item-label{word-break:break-all}}.tox .tox-menu__label blockquote,.tox .tox-menu__label code,.tox .tox-menu__label h1,.tox .tox-menu__label h2,.tox .tox-menu__label h3,.tox .tox-menu__label h4,.tox .tox-menu__label h5,.tox .tox-menu__label h6,.tox .tox-menu__label p{margin:0}.tox .tox-menubar{background:repeating-linear-gradient(transparent 0 1px,transparent 1px 39px) center top 39px/100% calc(100% - 39px) no-repeat;background-color:#fff;display:flex;flex:0 0 auto;flex-shrink:0;flex-wrap:wrap;grid-column:1/-1;grid-row:1;padding:0 11px 0 12px}.tox .tox-promotion+.tox-menubar{grid-column:1}@media (max-width:480px){.tox:not(.tox-tinymce-inline) .tox-menubar{flex-wrap:nowrap;min-width:0;min-height:39px;overflow-x:auto;overflow-y:hidden}}.tox .tox-promotion{background:repeating-linear-gradient(transparent 0 1px,transparent 1px 39px) center top 39px/100% calc(100% - 39px) no-repeat;background-color:#fff;grid-column:2;grid-row:1;padding-inline-end:8px;padding-inline-start:4px;padding-top:5px}.tox .tox-promotion-link{align-items:unsafe center;background-color:#e8f1f8;border-radius:5px;color:#086be6;cursor:pointer;display:flex;font-size:14px;height:26.6px;padding:4px 8px;white-space:nowrap}.tox .tox-promotion-link:hover{background-color:#b4d7ff}.tox .tox-promotion-link:focus{background-color:#d9edf7}.tox .tox-mbtn{align-items:center;background:#fff;border:0;border-radius:3px;box-shadow:none;color:#222f3e;display:flex;flex:0 0 auto;font-size:14px;font-style:normal;font-weight:400;height:28px;justify-content:center;margin:5px 1px 6px 0;outline:0;padding:0 4px;text-transform:none;width:auto}.tox .tox-mbtn[disabled]{background-color:#fff;border:0;box-shadow:none;color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-mbtn:focus:not(:disabled){background:#fff;border:0;box-shadow:none;color:#222f3e;position:relative;z-index:1}.tox .tox-mbtn:focus:not(:disabled)::after{pointer-events:none;border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:'';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-mbtn:focus:not(:disabled)::after{border:2px solid highlight}}.tox .tox-mbtn--active,.tox .tox-mbtn:not(:disabled).tox-mbtn--active:focus{background:#a6ccf7;border:0;box-shadow:none;color:#222f3e}.tox .tox-mbtn:hover:not(:disabled):not(.tox-mbtn--active){background:#f0f0f0;border:0;box-shadow:none;color:#222f3e}.tox .tox-mbtn__select-label{cursor:default;font-weight:400;margin:0 4px}.tox .tox-mbtn[disabled] .tox-mbtn__select-label{cursor:not-allowed}.tox .tox-mbtn__select-chevron{align-items:center;display:flex;justify-content:center;width:16px;display:none}.tox .tox-notification{border-radius:6px;border-style:solid;border-width:1px;box-shadow:none;box-sizing:border-box;display:grid;font-size:14px;font-weight:400;grid-template-columns:minmax(40px,1fr) auto minmax(40px,1fr);margin-left:auto;margin-right:auto;margin-top:4px;opacity:0;padding:4px;transition:transform .1s ease-in,opacity 150ms ease-in;width:max-content}.tox .tox-notification a{cursor:pointer;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-notification p{font-size:14px;font-weight:400}.tox .tox-notification:focus{border-color:#006ce7;box-shadow:0 0 0 1px #006ce7}.tox .tox-notification--in{opacity:1}.tox .tox-notification--success{background-color:#e4eeda;border-color:#d7e6c8;color:#222f3e}.tox .tox-notification--success p{color:#222f3e}.tox .tox-notification--success a{color:#517342}.tox .tox-notification--success a:focus,.tox .tox-notification--success a:hover{color:#24321d;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-notification--success a:focus-visible{border-radius:1px;outline:2px solid #517342;outline-offset:2px}.tox .tox-notification--success a:active{color:#0d120a;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-notification--success svg{fill:#222f3e}.tox .tox-notification--error{background-color:#f5cccc;border-color:#f0b3b3;color:#222f3e}.tox .tox-notification--error p{color:#222f3e}.tox .tox-notification--error a{color:#77181f}.tox .tox-notification--error a:focus,.tox .tox-notification--error a:hover{color:#220709;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-notification--error a:focus-visible{border-radius:1px;outline:2px solid #77181f;outline-offset:2px}.tox .tox-notification--error a:active{color:#000;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-notification--error svg{fill:#222f3e}.tox .tox-notification--warn,.tox .tox-notification--warning{background-color:#fff5cc;border-color:#fff0b3;color:#222f3e}.tox .tox-notification--warn p,.tox .tox-notification--warning p{color:#222f3e}.tox .tox-notification--warn a,.tox .tox-notification--warning a{color:#7a6e25}.tox .tox-notification--warn a:focus,.tox .tox-notification--warn a:hover,.tox .tox-notification--warning a:focus,.tox .tox-notification--warning a:hover{color:#2c280d;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-notification--warn a:focus-visible,.tox .tox-notification--warning a:focus-visible{border-radius:1px;outline:2px solid #7a6e25;outline-offset:2px}.tox .tox-notification--warn a:active,.tox .tox-notification--warning a:active{color:#050502;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-notification--warn svg,.tox .tox-notification--warning svg{fill:#222f3e}.tox .tox-notification--info{background-color:#d6e7fb;border-color:#c1dbf9;color:#222f3e}.tox .tox-notification--info p{color:#222f3e}.tox .tox-notification--info a{color:#2a64a6}.tox .tox-notification--info a:focus,.tox .tox-notification--info a:hover{color:#163355;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-notification--info a:focus-visible{border-radius:1px;outline:2px solid #2a64a6;outline-offset:2px}.tox .tox-notification--info a:active{color:#0b1a2c;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-notification--info svg{fill:#222f3e}.tox .tox-notification__body{align-self:center;color:#222f3e;font-size:14px;grid-column-end:3;grid-column-start:2;grid-row-end:2;grid-row-start:1;text-align:center;white-space:normal;word-break:break-all;word-break:break-word}.tox .tox-notification__body>*{margin:0}.tox .tox-notification__body>*+*{margin-top:1rem}.tox .tox-notification__icon{align-self:center;grid-column-end:2;grid-column-start:1;grid-row-end:2;grid-row-start:1;justify-self:end}.tox .tox-notification__icon svg{display:block}.tox .tox-notification__dismiss{align-self:start;grid-column-end:4;grid-column-start:3;grid-row-end:2;grid-row-start:1;justify-self:end}.tox .tox-notification .tox-progress-bar{grid-column-end:4;grid-column-start:1;grid-row-end:3;grid-row-start:2;justify-self:center}.tox .tox-notification-container-dock-fadeout{opacity:0;visibility:hidden}.tox .tox-notification-container-dock-fadein{opacity:1;visibility:visible}.tox .tox-notification-container-dock-transition{transition:visibility 0s linear .3s,opacity .3s ease}.tox .tox-notification-container-dock-transition.tox-notification-container-dock-fadein{transition-delay:0s}.tox .tox-onboarding-overlay{height:100%;background-color:#f0f0f0;position:absolute;top:0;left:0;right:0;z-index:1302;overflow:auto;display:grid;justify-content:center;align-items:center}.tox .tox-onboarding-dialog{max-width:512px;background-color:#fff;display:flex;flex-direction:column;box-shadow:0 16px 16px -10px rgba(34,47,62,.15),0 0 40px 1px rgba(34,47,62,.15);border-radius:12px;margin:8px}.tox .tox-onboarding-dialog .tox-onboarding-header{color:#222f3e;display:flex;justify-content:center;align-items:center;font-size:20px;margin:24px 0 8px}.tox .tox-onboarding-dialog .tox-onboarding-step{display:grid;grid-template-columns:min-content 1fr min-content;align-items:center;margin:0 24px}.tox .tox-onboarding-dialog .tox-onboarding-step:not(:last-child){border-bottom:1px solid #e3e3e3}.tox .tox-onboarding-dialog .tox-onboarding-step--number{width:24px;aspect-ratio:1/1;border-radius:50%;border:1px solid #00ad0e;display:flex;justify-content:center;align-items:center;font-size:12px;font-weight:700;color:#00ad0e}.tox .tox-onboarding-dialog .tox-onboarding-step--body{padding:24px 0 24px 16px}.tox .tox-onboarding-dialog .tox-onboarding-step--body-header{color:#222f3e;font-size:14px;font-weight:700;margin-bottom:4px}.tox .tox-onboarding-dialog .tox-onboarding-step--body-details{color:rgba(34,47,62,.7);font-size:14px}.tox .tox-onboarding-dialog .tox-onboarding-step--action{padding-left:24px}.tox .tox-onboarding-dialog .tox-onboarding-footer{background-color:#f0f0f0;display:flex;justify-content:space-between;align-items:center;padding:16px 24px;border-bottom-left-radius:12px;border-bottom-right-radius:12px}.tox .tox-onboarding-dialog .tox-onboarding-footer p{display:flex;align-items:center;justify-content:center;gap:4px;font-size:14px;color:rgba(34,47,62,.7)}.tox .tox-onboarding-dialog svg{width:24px;fill:rgba(34,47,62,0.7)}.tox .tox-promotion-dialog .tox-promotion-dialog-plugin{display:grid;align-items:center;grid-template-columns:min-content 1fr min-content;border-bottom:1px solid #e3e3e3;padding:24px 0;margin:0 16px}.tox .tox-promotion-dialog .tox-promotion-dialog-plugin--body{margin:0 16px}.tox .tox-promotion-dialog .tox-promotion-dialog-plugin--body .tox-promotion-dialog-plugin-header{color:#222f3e;font-size:14px;font-weight:700;margin-bottom:4px}.tox .tox-promotion-dialog .tox-promotion-dialog-plugin--body .tox-promotion-dialog-plugin-details{color:rgba(34,47,62,.7);font-size:14px}.tox .tox-promotion-dialog .tox-promotion-dialog-plugin--icon{display:grid;place-content:center;width:56px;height:56px;line-height:24px;font-size:24px;border-radius:12px;background:linear-gradient(180deg,#fff 24%,#f0f0f0 100%);box-shadow:0 1px 1px 0 #222f3e12,0 3px 6px 0 #222f3e06;color:#006ce7}.tox .tox-promotion-dialog--subtitle{margin:16px;color:rgba(34,47,62,.7);font-size:14px}.tox .tox-promotion-dialog--explore{text-align:center;margin:16px;color:rgba(34,47,62,.7);font-size:14px}.tox .tox-promotion-dialog--explore a{color:#006ce7}.tox .tox-promotion-dialog--footer{background-color:#f0f0f0;color:rgba(34,47,62,.7);font-size:12px;text-align:center;padding:16px}.tox .tox-promotion-button{display:flex;align-items:center;height:26.6px;line-height:26.6px;font-size:14px;font-weight:700;background-color:#f1ebf9;color:#851aff;padding:8px 16px;cursor:pointer;white-space:nowrap;border-radius:5px}.tox .tox-promotion-button:focus{outline:1px solid #851AFF}.tox .tox-onboarding-dialog a,.tox .tox-promotion-dialog--footer a{color:rgba(34,47,62,.7);cursor:pointer;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-onboarding-dialog a:focus,.tox .tox-onboarding-dialog a:hover,.tox .tox-promotion-dialog--footer a:focus,.tox .tox-promotion-dialog--footer a:hover{color:#071729;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-onboarding-dialog a:focus-visible,.tox .tox-promotion-dialog--footer a:focus-visible{border-radius:1px;outline:2px solid #144782;outline-offset:2px}.tox .tox-onboarding-dialog a:active,.tox .tox-promotion-dialog--footer a:active{color:#000;-webkit-text-decoration:underline;text-decoration:underline}.tox .tox-pop{display:inline-block;position:relative}.tox .tox-pop--resizing{transition:width .1s ease}.tox .tox-pop--resizing .tox-toolbar,.tox .tox-pop--resizing .tox-toolbar__group{flex-wrap:nowrap}.tox .tox-pop--transition{transition:.15s ease;transition-property:left,right,top,bottom}.tox .tox-pop--transition::after,.tox .tox-pop--transition::before{transition:all .15s,visibility 0s,opacity 75ms ease 75ms}.tox .tox-pop__dialog{background-color:#fff;border:1px solid #eee;border-radius:6px;box-shadow:0 0 2px 0 rgba(34,47,62,.2),0 4px 8px 0 rgba(34,47,62,.15);min-width:0;overflow:hidden}.tox .tox-pop__dialog>:not(.tox-toolbar){margin:4px 4px 4px 8px}.tox .tox-pop__dialog .tox-toolbar{background-color:transparent;margin-bottom:-1px}.tox .tox-pop::after,.tox .tox-pop::before{border-style:solid;content:'';display:block;height:0;opacity:1;position:absolute;width:0}@media (forced-colors:active){.tox .tox-pop::after,.tox .tox-pop::before{content:none}}.tox .tox-pop.tox-pop--inset::after,.tox .tox-pop.tox-pop--inset::before{opacity:0;transition:all 0s .15s,visibility 0s,opacity 75ms ease}.tox .tox-pop.tox-pop--bottom::after,.tox .tox-pop.tox-pop--bottom::before{left:50%;top:100%}.tox .tox-pop.tox-pop--bottom::after{border-color:#fff transparent transparent transparent;border-width:8px;margin-left:-8px;margin-top:-1px}.tox .tox-pop.tox-pop--bottom::before{border-color:#eee transparent transparent transparent;border-width:9px;margin-left:-9px}.tox .tox-pop.tox-pop--top::after,.tox .tox-pop.tox-pop--top::before{left:50%;top:0;transform:translateY(-100%)}.tox .tox-pop.tox-pop--top::after{border-color:transparent transparent #fff transparent;border-width:8px;margin-left:-8px;margin-top:1px}.tox .tox-pop.tox-pop--top::before{border-color:transparent transparent #eee transparent;border-width:9px;margin-left:-9px}.tox .tox-pop.tox-pop--left::after,.tox .tox-pop.tox-pop--left::before{left:0;top:calc(50% - 1px);transform:translateY(-50%)}.tox .tox-pop.tox-pop--left::after{border-color:transparent #fff transparent transparent;border-width:8px;margin-left:-15px}.tox .tox-pop.tox-pop--left::before{border-color:transparent #eee transparent transparent;border-width:10px;margin-left:-19px}.tox .tox-pop.tox-pop--right::after,.tox .tox-pop.tox-pop--right::before{left:100%;top:calc(50% + 1px);transform:translateY(-50%)}.tox .tox-pop.tox-pop--right::after{border-color:transparent transparent transparent #fff;border-width:8px;margin-left:-1px}.tox .tox-pop.tox-pop--right::before{border-color:transparent transparent transparent #eee;border-width:10px;margin-left:-1px}.tox .tox-pop.tox-pop--align-left::after,.tox .tox-pop.tox-pop--align-left::before{left:20px}.tox .tox-pop.tox-pop--align-right::after,.tox .tox-pop.tox-pop--align-right::before{left:calc(100% - 20px)}.tox.tox-edit-focus .tox-sidebar__resize-handle:hover::before{border-left:0 solid transparent}.tox .tox-sidebar-wrap{--tox-private-min-editing-area-width:280px;flex-grow:1;min-height:0}.tox .tox-sidebar-wrap:not(.tox .tox-sidebar-wrap--resizable){display:flex;flex-direction:row}.tox .tox-sidebar-wrap--resizable{display:grid;grid-template-columns:minmax(var(--tox-private-min-editing-area-width),1fr) minmax(0,max-content);grid-template-rows:minmax(0,1fr)}.tox .tox-sidebar{background-color:var(--tox-private-sidebar-background-color,#f0f0f0);display:flex;flex-direction:row;justify-content:flex-end}.tox .tox-sidebar__slider{display:flex;overflow:hidden}.tox .tox-sidebar-wrap--resizable .tox-sidebar__pane-container{width:var(--tox-private-requested-sidebar-width)}.tox .tox-sidebar-wrap--resizable .tox-sidebar--sliding-growing .tox-sidebar__pane-container,.tox .tox-sidebar-wrap--resizable .tox-sidebar--sliding-shrinking .tox-sidebar__pane-container{width:var(--tox-private-resolved-sidebar-width);min-width:var(--tox-private-resolved-sidebar-width)}.tox .tox-sidebar__pane-container{display:flex}.tox .tox-sidebar-wrap--resizable .tox-sidebar__resize-handle{display:block}.tox .tox-sidebar__resize-handle{display:none;position:relative;width:var(--tox-private-sidebar-resize-handle-width,1px);height:100%;cursor:col-resize;background-color:var(--tox-private-separator-color,#e3e3e3);z-index:1}.tox .tox-sidebar__resize-handle::before{content:'';position:absolute;top:0;bottom:0;width:8px;box-sizing:border-box;border-left:0 solid transparent;transition:border-left-width .15s ease,border-left-color .15s ease}.tox .tox-sidebar__resize-handle:hover::before{border-left:3px solid #006ce7}.tox .tox-sidebar-wrap--resizable .tox-sidebar__pane{width:calc(100% - var(--tox-private-sidebar-resize-handle-width,1px))}.tox .tox-sidebar__pane{display:flex}.tox .tox-sidebar--sliding-closed{opacity:0}.tox .tox-sidebar--sliding-open{opacity:1}.tox .tox-sidebar--sliding-growing,.tox .tox-sidebar--sliding-shrinking{transition:width .5s ease,opacity .5s ease}.tox .tox-sidebar-content{display:flex;flex-direction:column;position:relative;width:100%;height:100%}.tox .tox-sidebar-content__header{align-items:center;display:flex;justify-content:space-between;border-bottom:var(--tox-private-tinymceai-border-width,1px) solid var(--tox-private-neutral-20,#e3e3e3);padding:var(--tox-private-pad-sm,8px) 12px;background:var(--tox-private-background-color,#fff)}.tox .tox-sidebar-content__header .tox-sidebar-content__header-close-button{margin-left:auto}.tox .tox-sidebar-content__actions{display:flex;gap:var(--tox-private-pad-sm,8px)}.tox .tox-sidebar-content__title{font-size:var(--tox-private-font-size-lg, 20px);font-weight:var(--tox-private-font-weight-normal,normal);padding:var(--tox-private-pad-sm,8px) 0 var(--tox-private-pad-sm,8px) 0;color:var(--tox-private-text-color,#222f3e);line-height:28px}.tox .tox-floating-sidebar{--tox-private-floating-sidebar-width:min(380px, 90vw);--tox-private-floating-sidebar-height:80vh;position:fixed;z-index:var(--tox-private-z-index-floatingsidebar,1050);box-shadow:var(--tox-private-floating-sidebar-box-shadow,0 0 40px 1px rgba(34,47,62,.15),0 16px 16px -10px rgba(34,47,62,.15),0 0 0 1px rgba(34,47,62,.15));width:var(--tox-private-floating-sidebar-width);height:var(--tox-private-floating-sidebar-height);background-color:var(--tox-private-floating-sidebar-background-color,#f0f0f0);border-radius:var(--tox-private-panel-border-radius,6px);overflow:hidden}.tox .tox-floating-sidebar:not(.tox .tox-floating-sidebar--open){display:none}.tox .tox-floating-sidebar--open{display:block}.tox .tox-floating-sidebar__content-wrapper{width:100%;height:100%;display:flex;flex-direction:column}.tox .tox-floating-sidebar__header{position:relative}.tox .tox-floating-sidebar .tox-ai__scroll:has(.tox-card-list){background-color:inherit}.tox .tox-ai .tox-expandable-box{margin-bottom:calc(var(--tox-private-pad-md,16px) * .75)}.tox .tox-ai .tox-expandable-box .tox-expandable-box__content{margin:var(--tox-private-pad-sm,8px) calc(var(--tox-private-pad-md,16px) * .75)}.tox .tox-ai .tox-expandable-box>.tox-button{margin:0 calc(var(--tox-private-pad-md,16px) * .75) var(--tox-private-pad-sm,8px)}.tox .tox-ai .tox-expandable-box:focus-visible:not(:disabled){outline:2px solid var(--tox-private-color-tint,#006ce7);outline-offset:var(--tox-private-tinymceai-border-width,1px);box-shadow:0 0 0 1px var(--tox-private-color-white,#fff);border-radius:var(--tox-private-control-border-radius,6px)}.tox .tox-ai .tox-sidebar-content__header{border:var(--tox-private-tinymceai-focus-border-width,2px) solid var(--tox-private-background-color,#fff);padding:calc(var(--tox-private-pad-sm,8px) - var(--tox-private-tinymceai-focus-border-width,2px)) calc(12px - var(--tox-private-tinymceai-focus-border-width,2px));border-bottom:1px solid var(--tox-private-separator-color,#e3e3e3)}.tox .tox-ai .tox-sidebar-content__header:focus-visible:not(:disabled){border:var(--tox-private-tinymceai-focus-border-width,2px) solid var(--tox-private-color-tint,#006ce7);border-radius:var(--tox-private-control-border-radius,6px)}.tox .tox-ai .tox-sidebar-content__loader{align-items:center;display:flex;height:100%;justify-content:center;width:100%;z-index:1000}.tox .tox-ai .tox-sidebar-content__title{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;margin-right:auto}.tox .tox-ai .tox-sidebar-content__title:focus-visible:not(:disabled){outline:2px solid var(--tox-private-color-tint,#006ce7);outline-offset:var(--tox-private-tinymceai-border-width,1px);box-shadow:0 0 0 1px var(--tox-private-color-white,#fff);border-radius:var(--tox-private-control-border-radius,6px)}.tox .tox-ai .tox-sidebar-content__actions .tox-ai__complete-review{display:flex;align-items:center;gap:6px;padding-top:var(--tox-private-pad-xs,4px);padding-bottom:var(--tox-private-pad-xs,4px);padding-left:var(--tox-private-pad-md,16px);padding-right:var(--tox-private-pad-md,16px)}.tox .tox-ai .tox-menu{width:-webkit-fill-available;width:-moz-available;width:stretch;overflow:visible}.tox .tox-ai .tox-ai__user-prompt{display:flex;flex-direction:column;margin-left:auto;gap:inherit;width:100%}.tox .tox-ai .tox-ai__user-prompt__context{margin-left:auto;display:flex;flex-direction:column;gap:inherit;align-items:end;width:100%}.tox .tox-ai .tox-ai__user-prompt__context .tox-tag{max-width:100%}.tox .tox-ai .tox-ai__user-prompt__text{background-color:var(--tox-private-background-secondary,#f0f0f0);padding:var(--tox-private-pad-sm,8px) calc(var(--tox-private-pad-md,16px) * .75);border-radius:var(--tox-private-control-border-radius,6px);max-width:80%;align-self:flex-end;color:var(--tox-private-text-color,#222f3e);white-space:pre-wrap}.tox .tox-ai .tox-ai__user-prompt__text:focus-visible:not(:disabled){outline:2px solid var(--tox-private-color-tint,#006ce7);outline-offset:var(--tox-private-tinymceai-border-width,1px);box-shadow:0 0 0 1px var(--tox-private-color-white,#fff);border-radius:var(--tox-private-control-border-radius,6px)}.tox .tox-ai .tox-ai__scroll{overflow-y:auto;overflow-x:hidden;background-color:var(--tox-private-background-color,#fff);display:flex;padding:12px;flex-direction:column;align-items:flex-start;gap:12px;flex:1 0 0;align-self:stretch}.tox .tox-ai .tox-ai__scroll:focus-visible:not(:disabled){outline:var(--tox-private-tinymceai-focus-border-width,2px) solid var(--tox-private-color-tint,#006ce7);outline-offset:calc(-1 * var(--tox-private-tinymceai-focus-border-width,2px));border-radius:var(--tox-private-control-border-radius,6px)}.tox .tox-ai .tox-ai__scroll--review:not(:has(.tox-sidebar-content__message-text)){background-color:var(--tox-private-background-secondary,#f0f0f0)}.tox .tox-ai .tox-ai__spinner svg{fill:var(--tox-private-color-tint,#006ce7)}.tox .tox-ai .tox-ai__response{width:100%;min-width:100%;max-width:100%}.tox .tox-ai .tox-ai__response__header{display:flex;align-items:center;gap:var(--tox-private-pad-sm,8px)}.tox .tox-ai .tox-ai__response__header .tox-icon svg{fill:var(--tox-private-color-tint,#006ce7)}.tox .tox-ai .tox-ai__response-status{display:flex;color:var(--tox-private-text-color-muted,rgba(34,47,62,.7));font-size:var(--tox-private-font-size-sm, 14px);gap:var(--tox-private-pad-xs,4px);line-height:var(--tox-private-tinymceai-response-status-icon-height, max(24px, calc(14px + 4px)));padding-top:var(--tox-private-pad-sm,8px)}.tox .tox-ai .tox-ai__response-status svg{fill:var(--tox-private-text-color-muted,rgba(34,47,62,0.7))}.tox .tox-ai .tox-ai__response-status-icon{border-radius:999px;border:1px solid var(--tox-private-neutral-20,#e3e3e3);background-color:var(--tox-private-background-color,#fff);height:var(--tox-private-tinymceai-response-status-icon-height,max(24px,calc(14px + 4px)));flex:0 0 24px;display:flex;align-items:center;justify-content:center}.tox .tox-ai .tox-ai__response-status-icon .tox-icon{display:contents}.tox .tox-ai .tox-ai__response-status-icon+.tox-ai__response-status-icon{margin-left:calc((var(--tox-private-pad-sm,8px) + var(--tox-private-pad-xs,4px)) * -1)}.tox .tox-ai .tox-ai__icon{display:flex;align-items:center;justify-content:center}.tox .tox-ai .tox-ai__response-sources{display:flex;flex-direction:column;gap:var(--tox-private-pad-sm,8px)}.tox .tox-ai .tox-ai__response-sources-header{display:block}.tox .tox-ai .tox-ai__response-sources-list{display:flex;align-items:center;gap:var(--tox-private-pad-sm,8px);align-self:stretch;flex-wrap:wrap}.tox .tox-ai .tox-ai__response-sources-list .tox-tag{border:1px solid var(--tox-private-separator-color,#e3e3e3);background-color:transparent;max-width:32%;max-height:24px;cursor:pointer}.tox .tox-ai .tox-ai__response-sources-list .tox-tag img,.tox .tox-ai .tox-ai__response-sources-list .tox-tag svg{width:16px;height:16px;min-width:16px;min-height:16px;max-width:16px;max-height:16px}.tox .tox-ai .tox-ai__response-content{padding:var(--tox-private-pad-sm,8px) 0;color:var(--tox-private-text-color,#222f3e);font-feature-settings:'liga' off,'clig' off;font-size:var(--tox-private-font-size-sm, 14px);font-style:normal;font-weight:var(--tox-private-font-weight-normal,normal);line-height:var(--tox-private-line-height, 18px);display:flex;flex-direction:column}.tox .tox-ai .tox-ai__response.tox-ai__response-streaming{position:relative}.tox .tox-ai .tox-ai__response.tox-ai__response-streaming .tox-ai__response-status{color:var(--tox-private-text-color,#222f3e);font-size:var(--tox-private-font-size-md, 16px);line-height:calc(var(--tox-private-font-size-md, 16px) + 4px)}.tox .tox-ai .tox-ai__response.tox-ai__response-streaming::after{content:'';position:absolute;bottom:0;left:0;right:0;height:min(100px,100%);pointer-events:none;background:linear-gradient(to bottom,transparent 60px,transparent 60px,var(--tox-private-background-color,#fff))}.tox .tox-ai .tox-ai-error{border-radius:var(--tox-private-panel-border-radius,6px);border:1px solid var(--tox-private-color-error,#c00);background:linear-gradient(0deg,rgba(from var(--tox-private-background-color,#fff) r g b / .9) 0,rgba(from var(--tox-private-background-color,#fff) r g b / .9) 100%),var(--tox-private-color-error,#c00);padding:var(--tox-private-pad-sm,8px);width:100%;display:flex;gap:var(--tox-private-pad-sm,8px);align-items:center}.tox .tox-ai .tox-ai-error__message{flex:1 0 0}.tox .tox-ai .tox-ai-error__icon{flex:0 0 auto;align-self:flex-start}.tox .tox-ai .tox-ai__footer{padding:calc(12px - var(--tox-private-tinymceai-focus-border-width,2px));gap:var(--tox-private-pad-sm,8px);background-color:var(--tox-private-background-color,#fff);display:flex;flex-direction:column;border:var(--tox-private-tinymceai-focus-border-width,2px) solid var(--tox-private-background-color,#fff);border-top:1px solid var(--tox-private-separator-color,#e3e3e3)}.tox .tox-ai .tox-ai__footer:focus-visible:not(:disabled){border:var(--tox-private-tinymceai-focus-border-width,2px) solid var(--tox-private-color-tint,#006ce7);border-radius:var(--tox-private-control-border-radius,6px)}.tox .tox-ai .tox-ai__context{display:flex;gap:var(--tox-private-pad-sm,8px);flex-wrap:wrap;max-height:calc((2 * (2 * var(--tox-private-pad-xs,4px) + var(--tox-private-base-value,16px))) + var(--tox-private-pad-sm,8px))}.tox .tox-ai .tox-ai__context .tox-tag{max-width:calc((100% - var(--tox-private-pad-sm,8px))/ 2)}.tox .tox-ai .tox-ai__context-more{display:flex;flex-direction:column;gap:var(--tox-private-pad-sm,8px);padding:var(--tox-private-pad-sm,8px);overflow:auto;max-width:var(--tox-private-tinymceai-context-more-max-width,320px)}.tox .tox-ai .tox-ai__context-more .tox-tag{max-width:100%}.tox .tox-ai .tox-ai__stop-generating{display:flex;align-items:center;gap:6px}.tox .tox-ai .tox-ai__footer-actions{display:flex;gap:var(--tox-private-pad-sm,8px)}.tox .tox-ai .tox-ai-model-selection-button{display:flex;gap:var(--tox-private-pad-xs,4px)}.tox .tox-ai .tox-ai__footer-note{align-items:center;color:var(--tox-private-text-color-muted,rgba(34,47,62,.7));display:flex;font-size:var(--tox-private-font-size-xs, 12px);height:24px;justify-content:center;letter-spacing:0;padding-top:var(--tox-private-pad-sm,8px);width:100%}.tox .tox-ai .tox-ai__models-menu{max-width:350px}.tox .tox-ai .tox-ai__models-menu .tox-menu{max-height:inherit;padding:var(--tox-private-pad-xs,4px)}.tox .tox-ai .tox-ai__models-menu__item__description{display:flex;flex-direction:column;align-items:start}.tox .tox-ai .tox-ai__models-menu__item__description__title{font-weight:var(--tox-private-font-weight-bold,bold);font-size:var(--tox-private-font-size-sm, 14px);line-height:calc(var(--tox-private-font-size-sm, 14px) * 1.28572);padding-bottom:4px}.tox .tox-ai .tox-ai__models-menu__item__description__content{color:var(--tox-private-text-color-muted,rgba(34,47,62,.7));font-size:var(--tox-private-font-size-xs, 12px);line-height:calc(var(--tox-private-font-size-xs, 12px) * 1.33333)}.tox .tox-ai .tox-collection__item--active:not(.tox-collection__item--state-disabled) .tox-ai__models-menu__item__description__content{color:inherit}.tox .tox-ai .tox-collection__item--active:not(.tox-collection__item--state-disabled) .tox-ai__models-menu__item__description__content .tox-ai__models-menu__item__description__ability{color:var(--tox-private-color-white,#fff)}.tox .tox-ai .tox-collection__item--active:not(.tox-collection__item--state-disabled) .tox-ai__models-menu__item__description__content .tox-ai__models-menu__item__description__content_body{color:rgba(from var(--tox-private-color-white,#fff) r g b / .7)}.tox .tox-ai .tox-ai__models-menu__item__description__ability{color:var(--tox-private-text-color,#222f3e);padding-bottom:4px}.tox .tox-ai .tox-ai__models-menu__item__description__ability__enabled{font-weight:var(--tox-private-font-weight-bold,bold)}.tox .tox-ai .tox-ai-chat-history-list{display:flex;flex-direction:column;gap:var(--tox-private-pad-sm,8px);padding-top:var(--tox-private-pad-xs,4px);width:100%}.tox .tox-ai .tox-ai-chat-history-list .tox-collection__group{gap:var(--tox-private-pad-sm,8px)}.tox .tox-ai .tox-ai-chat-history-list__title{color:var(--tox-private-text-color-muted,rgba(34,47,62,.7));font-size:var(--tox-private-font-size-sm, 14px);font-weight:var(--tox-private-font-weight-bold,bold);line-height:18px;letter-spacing:1px}.tox .tox-ai .tox-ai-chat-history-list__item{display:flex;padding:12px;gap:var(--tox-private-pad-sm,8px);border-radius:var(--tox-private-control-border-radius,6px);cursor:pointer}.tox .tox-ai .tox-ai-chat-history-list__item.tox-ai-chat-history-list__item--active{background-color:var(--tox-private-background-secondary,#f0f0f0)}.tox .tox-ai .tox-ai-chat-history-list__item:focus,.tox .tox-ai .tox-ai-chat-history-list__item:focus-visible{background-color:var(--tox-private-background-secondary,#f0f0f0)}.tox .tox-ai .tox-ai-chat-history-list__item.tox-ai-chat-history-list__item-edit-title{background-color:var(--tox-private-background-secondary,#f0f0f0);flex-direction:column}.tox .tox-ai .tox-ai-chat-history-list__item-edit-actions{display:flex;justify-content:flex-end;width:100%;gap:var(--tox-private-pad-sm,8px)}.tox .tox-ai .tox-ai-chat-history-list__item-edit-actions .tox-ai__spinner svg{fill:rgba(from var(--tox-private-color-white,#fff) r g b / 0.5)}.tox .tox-ai .tox-ai-chat-history-list__item-content{display:flex;flex-direction:column;margin-right:auto;overflow:hidden}.tox .tox-ai .tox-ai-chat-history-list__item-actions{display:flex;align-items:center;min-width:calc(24px + (var(--tox-private-pad-xs,4px) + 1px)*2)}.tox .tox-ai .tox-ai-chat-history-list__item-content-title{color:var(--tox-private-text-color,#222f3e);font-size:var(--tox-private-font-size-base, 16px);font-weight:var(--tox-private-font-weight-bold,bold);line-height:var(--tox-private-font-size-lg, 20px);overflow:hidden;text-overflow:ellipsis}.tox .tox-ai .tox-ai-chat-history-list__item-content-date{color:var(--tox-private-text-color,#222f3e);font-size:var(--tox-private-font-size-xs, 12px);line-height:var(--tox-private-line-height-base, 1.3)}.tox .tox-ai .tox-sidebar-content__message{align-items:center;display:flex;flex-direction:column;height:100%;justify-content:center;gap:var(--tox-private-pad-md,16px);width:100%}.tox .tox-ai .tox-sidebar-content__message-text{text-align:center;color:var(--tox-private-text-color,#222f3e);font-size:var(--tox-private-font-size-md, 16px);font-weight:var(--tox-private-font-weight-normal,normal);line-height:20px}.tox .tox-ai .tox-sidebar-content__message-action{display:flex;justify-content:center;align-items:center;align-self:stretch}.tox .tox-ai .tox-ai-chat-action-button{line-height:var(--tox-private-base-value, 16px);font-size:var(--tox-private-font-size-xs, 12px);padding:6px var(--tox-private-pad-sm,8px);margin:var(--tox-private-pad-xs,4px) 0;font-weight:var(--tox-private-font-weight-normal,normal);width:min-content}.tox .tox-ai .tox-ai-chat-action-button .tox-icon{display:inline-flex;align-items:center;justify-content:center;height:16px;width:16px;overflow:hidden}.tox .tox-ai .tox-ai-chat-action-button .tox-icon svg{display:block;flex:none;fill:var(--tox-private-tinymceai-chat-action-button-icon-color,#006ce7)}.tox .tox-ai .tox-ai-chat-action-button .tox-icon svg[width='24'],.tox .tox-ai .tox-ai-chat-action-button .tox-icon svg[width='24px']{transform:scale(calc(16 / 24))}.tox .tox-ai .tox-ai-chat-action-button .tox-icon svg[width='20'],.tox .tox-ai .tox-ai-chat-action-button .tox-icon svg[width='20px']{transform:scale(calc(16 / 20))}.tox .tox-ai .tox-ai-chat-action-button .tox-icon svg[width='18'],.tox .tox-ai .tox-ai-chat-action-button .tox-icon svg[width='18px']{transform:scale(calc(16 / 18))}.tox .tox-ai .tox-ai-chat-action-button:not(:has(+ .tox-ai-chat-action-button)){margin-bottom:var(--tox-private-pad-sm,8px)}.tox .tox-ai-removed-content{font-style:italic;font-family:var(--tox-private-font-stack, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Oxygen-Sans, Ubuntu, Cantarell, \"Helvetica Neue\", sans-serif);background-color:var(--tox-private-background-color,#fff);color:var(--tox-private-text-color-muted,rgba(34,47,62,.7));line-height:var(--tox-private-line-height-base, 1.3);margin:0 1em}.tox .tox-ai-removed-content::before{content:\"\u2298 \";font-style:normal;font-size:calc(var(--tox-private-line-height-base, 1.3) * 1em)}.tox .tox-ai-html-content{font-size:var(--tox-private-font-size-md, 16px);font-family:var(--tox-private-font-stack, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Oxygen-Sans, Ubuntu, Cantarell, \"Helvetica Neue\", sans-serif);background-color:var(--tox-private-background-color,#fff);color:var(--tox-private-text-color,#222f3e);line-height:var(--tox-private-line-height-base, 1.3);overflow-x:auto}.tox .tox-ai-html-content:focus-visible:not(:disabled){outline:2px solid var(--tox-private-color-tint,#006ce7);outline-offset:var(--tox-private-tinymceai-html-content-border-width,1px);box-shadow:0 0 0 1px var(--tox-private-color-white,#fff);border-radius:var(--tox-private-control-border-radius,6px)}.tox .tox-ai-html-content h1{font-size:1.6em;font-weight:var(--tox-private-font-weight-bold,bold);margin:.67em 0}.tox .tox-ai-html-content h2{font-size:1.4em;font-weight:var(--tox-private-font-weight-bold,bold);margin:.83em 0}.tox .tox-ai-html-content h3{font-size:1.2em;font-weight:var(--tox-private-font-weight-bold,bold);margin:1em 0}.tox .tox-ai-html-content h4,.tox .tox-ai-html-content h5,.tox .tox-ai-html-content h6{font-size:1em;font-weight:var(--tox-private-font-weight-bold,bold);margin:.33em 0}.tox .tox-ai-html-content p{margin:var(--tox-private-pad-sm,8px) 0}.tox .tox-ai-html-content ol,.tox .tox-ai-html-content ul{padding-left:2em;margin:1em 0}.tox .tox-ai-html-content li:has(input:first-child){list-style-type:none}.tox .tox-ai-html-content a{color:var(--tox-private-color-tint,#006ce7);-webkit-text-decoration:underline;text-decoration:underline;cursor:pointer}.tox .tox-ai-html-content a:link:active,.tox .tox-ai-html-content a:visited:active{color:#8864ad}.tox .tox-ai-html-content blockquote{border-left:2px solid var(--tox-private-separator-color,#e3e3e3);margin-left:1.5rem;padding-left:1rem;font-style:italic}.tox .tox-ai-html-content code{font-family:ui-monospace,monospace;background:var(--tox-private-separator-color,#e3e3e3);padding:.1em .2em;border-radius:4px}.tox .tox-ai-html-content pre code{display:block;font-family:ui-monospace,monospace;background:var(--tox-private-separator-color,#e3e3e3);border-radius:4px;white-space:pre-wrap;margin:1em 0;overflow-wrap:break-word}.tox .tox-ai-html-content hr{border:none;border-top:1px solid var(--tox-private-border-color,#eee)}.tox .tox-ai-html-content table{width:100%;border-collapse:collapse;margin:.5em 0;font-size:.95em;line-height:1.45}.tox .tox-ai-html-content table:not([cellpadding]) td,.tox .tox-ai-html-content table:not([cellpadding]) th{padding:.4rem}.tox .tox-ai-html-content td,.tox .tox-ai-html-content th{border:1px solid var(--tox-private-border-color,#eee)}.tox .tox-ai-html-content th{font-weight:var(--tox-private-font-weight-bold,bold);text-align:left;white-space:nowrap}.tox .tox-ai-html-content b,.tox .tox-ai-html-content strong{font-weight:var(--tox-private-font-weight-bold,bold)}.tox .tox-ai-html-content em,.tox .tox-ai-html-content i{font-style:italic}.tox .tox-ai-html-content del{-webkit-text-decoration:line-through;text-decoration:line-through}.tox .tox-ai-html-content sub,.tox .tox-ai-html-content sup{font-size:.75em;line-height:0;vertical-align:baseline}.tox .tox-ai-html-content sup{vertical-align:super}.tox .tox-ai-html-content sub{vertical-align:sub}.tox .tox-ai-html-content mark{background:hsl(from var(--tox-private-color-active,#ffcf30) h s l / 30%);padding:.05em .2em;border-radius:2px}.tox .tox-ai-html-content small{font-size:.85em}.tox .tox-ai-html-content kbd{font-family:ui-monospace,monospace;font-size:.85em;padding:.15em .4em;border-radius:4px;border:1px solid var(--tox-private-border-color,#eee);background:var(--tox-private-separator-color,#e3e3e3);box-shadow:inset 0 -1px 0 var(--tox-private-border-color,#eee)}.tox .tox-ai-html-content img{max-width:100%;height:auto;vertical-align:middle;border-radius:4px}.tox .tox-expandable-box__content .tox-ai-html-content+.tox-ai-html-content::before,.tox .tox-expandable-box__content .tox-ai-html-content:has(+ .tox-ai-removed-content)::after,.tox .tox-expandable-box__content .tox-ai-removed-content+.tox-ai-html-content::before{content:\"\u3030\u3030\";color:var(--tox-private-text-color-muted,rgba(34,47,62,.7));text-align:center;width:100%;display:block}.tox .tox-diff-preview{display:contents}.tox .tox-diff-preview__host{height:100%;position:relative;flex:1 1 0}.tox .tox-diff-preview__host:empty{pointer-events:none}.tox .tox-diff-preview__layer{display:flex;flex-direction:column;inset:0;position:absolute}.tox .tox-diff-preview__layer--loading .tox-diff-preview__frame{pointer-events:none;visibility:hidden}.tox .tox-diff-preview__viewport{flex:1 1 auto;min-height:0;position:relative}.tox .tox-diff-preview__frame{background-color:#fff;border:0;height:100%;min-height:0;position:relative;width:100%}.tox .tox-diff-preview__footer{background-color:var(--tox-private-background-color,#fff);border-top:1px solid #e3e3e3;flex:0 0 auto}.tox .tox-diff-preview__toolbar{display:flex;gap:8px;justify-content:flex-end;padding:12px 16px}.tox .tox-ai__preview-overlay{position:absolute;inset:0;width:100%;height:100%;font-size:14px}.tox .tox-ai__preview-overlay--hidden{visibility:hidden}.tox .tox-ai__preview-overlay--pass-through{pointer-events:none}.tox .tox-ai__preview-overlay--dim{background:rgba(34,47,62,.2)}.tox .tox-ai__preview-overlay--centered{display:flex;align-items:center;justify-content:center}.tox .tox-ai__preview-overlay--clipped{overflow:clip}.tox .tox-tinymceai-previewloader{display:flex;align-items:center;gap:var(--tox-private-pad-md,16px);padding:var(--tox-private-pad-sm,8px);border-radius:var(--tox-private-panel-border-radius,6px);box-shadow:var(--tox-private-ai-preview-loader-box-shadow,0 0 40px 1px rgba(34,47,62,.15),0 16px 16px -10px rgba(34,47,62,.15));background-color:var(--tox-private-background-color,#fff);color:var(--tox-private-text-color,#222f3e);pointer-events:auto}.tox .tox-tinymceai-previewloader__content{display:flex;align-items:center;justify-content:center;padding:0 var(--tox-private-pad-xs,4px);gap:var(--tox-private-pad-sm,8px)}.tox .tox-selector{background-color:#4099ff;border-color:#4099ff;border-style:solid;border-width:1px;box-sizing:border-box;display:inline-block;height:10px;position:absolute;width:10px}.tox.tox-platform-touch .tox-selector{height:12px;width:12px}.tox .tox-skeleton .tox-skeleton__line{height:16px;width:100%;background:linear-gradient(to right,rgba(240,240,240,.5) 8%,rgba(240,240,240,.7) 18%,rgba(240,240,240,.5) 33%);animation:wave 2s infinite ease-out}.tox .tox-skeleton .tox-skeleton__circle{height:36px;width:36px;margin-right:8px;border-radius:100%;background:linear-gradient(to right,rgba(240,240,240,.5) 8%,rgba(240,240,240,.7) 18%,rgba(240,240,240,.5) 33%);animation:wave 2s infinite ease-out}@keyframes wave{0%{background-position:-268px 0}100%{background-position:268px 0}}.tox .tox-slider{align-items:center;display:flex;flex:1;height:24px;justify-content:center;position:relative}.tox .tox-slider__rail{background-color:transparent;border:1px solid #eee;border-radius:6px;height:10px;min-width:120px;width:100%}.tox .tox-slider__handle{background-color:#006ce7;border:2px solid #0054b4;border-radius:6px;box-shadow:none;height:24px;left:50%;position:absolute;top:50%;transform:translateX(-50%) translateY(-50%);width:14px}.tox .tox-form__controls-h-stack>.tox-slider:not(:first-of-type){margin-inline-start:8px}.tox .tox-form__controls-h-stack>.tox-form__group+.tox-slider{margin-inline-start:32px}.tox .tox-form__controls-h-stack>.tox-slider+.tox-form__group{margin-inline-start:32px}.tox .tox-toolbar-slider{align-items:center;display:inline-flex;height:16px}.tox .tox-toolbar-slider__input{appearance:none;background:#eee;border-radius:16px;width:130px;height:2px}.tox .tox-toolbar-slider__input::-webkit-slider-runnable-track{background-color:transparent;height:16px}.tox .tox-toolbar-slider__input::-moz-range-track{background-color:transparent;height:16px}.tox .tox-toolbar-slider__input::-webkit-slider-thumb{-webkit-appearance:none;background-color:#006ce7;border-radius:16px;border:none;height:16px;width:16px}.tox .tox-toolbar-slider__input::-moz-range-thumb{appearance:none;background-color:#006ce7;border-radius:16px;border:none;height:16px;width:16px}.tox .tox-toolbar-slider__input:focus-visible{outline:0}.tox .tox-toolbar-slider__input:focus::-webkit-slider-thumb{background-color:#0060ce;box-shadow:inset 0 0 0 1px #fff,0 0 0 2px #006ce7}.tox .tox-toolbar-slider__input:focus::-moz-range-thumb{background-color:#0060ce;box-shadow:inset 0 0 0 1px #fff,0 0 0 2px #006ce7}.tox .tox-toolbar-slider__input:hover::-webkit-slider-thumb{background-color:#0060ce}.tox .tox-toolbar-slider__input:hover::-moz-range-thumb{background-color:#0060ce}.tox .tox-toolbar-slider__input:active::-webkit-slider-thumb{background-color:#0054b4}.tox .tox-toolbar-slider__input:active::-moz-range-thumb{background-color:#0054b4}.tox .tox-toolbar-slider__input[disabled]::-webkit-slider-thumb{background-color:rgba(255,255,255,.5)}.tox .tox-toolbar-slider__input[disabled]::-moz-range-thumb{background-color:rgba(255,255,255,.5)}.tox .tox-source-code{overflow:auto}.tox .tox-spinner{display:flex}.tox .tox-spinner>div{animation:tam-bouncing-dots 1.5s ease-in-out 0s infinite both;background-color:rgba(34,47,62,.7);border-radius:100%;height:8px;width:8px}.tox .tox-spinner>div:first-child{animation-delay:-.32s}.tox .tox-spinner>div:nth-child(2){animation-delay:-.16s}@keyframes tam-bouncing-dots{0%,100%,80%{transform:scale(0)}40%{transform:scale(1)}}.tox:not([dir=rtl]) .tox-spinner>div:not(:first-child){margin-left:4px}.tox[dir=rtl] .tox-spinner>div:not(:first-child){margin-right:4px}.tox .tox-ai__spinner{--tox-private-spinner-color:var(--tox-private-color-tint, #006ce7);--tox-private-spinner-size:24px;--tox-private-spinner-circle-width:3px;--tox-private-spinner-dot-size:6px;width:var(--tox-private-spinner-size);aspect-ratio:1/1}.tox .tox-ai__spinner--small{--tox-private-spinner-size:16px;--tox-private-spinner-circle-width:2px;--tox-private-spinner-dot-size:4px}.tox .tox-ai__spinner--circle{animation:tox-rotation 1s linear infinite;border-radius:50%;background:conic-gradient(var(--tox-private-spinner-color) 0 calc(360deg - 30deg),transparent calc(360deg - 30deg) 100%);mask:radial-gradient(calc((var(--tox-private-spinner-size) - var(--tox-private-spinner-circle-width) * 2)/ 2),#0000 98%,#000)}.tox .tox-ai__spinner--dots{display:flex;align-items:center;justify-content:center;gap:1px}.tox .tox-ai__spinner--dots>div{animation:tox-bouncing-dots 1.5s ease-in-out 0s infinite both;aspect-ratio:1/1;width:var(--tox-private-spinner-dot-size);background-color:var(--tox-private-spinner-color);border-radius:100%}.tox .tox-ai__spinner--dots>div:first-child{animation-delay:-.32s}.tox .tox-ai__spinner--dots>div:nth-child(2){animation-delay:-.16s}.tox .tox-tinymceai__annotation--added,.tox .tox-tinymceai__annotation--modified,.tox .tox-tinymceai__annotation--removed{padding-block:calc((1lh - 1.1em)/ 2);-webkit-text-decoration:none;text-decoration:none;background-repeat:no-repeat;text-decoration-thickness:max(1px,0.07em)}.tox .tox-tinymceai__annotation--added__highlight{background-position:bottom;background-image:linear-gradient(rgba(120,171,70,.2) calc(100% - 2px),#78ab46 calc(100% - 2px))}.tox .tox-tinymceai__annotation--added__selected{background-image:none;background-color:rgba(120,171,70,.2);box-shadow:0 2px 0 0 #006ce7,0 -2px 0 0 #006ce7}.tox .tox-tinymceai__annotation--modified__highlight{background-position:bottom;background-image:linear-gradient(rgba(0,108,231,.2) calc(100% - 2px),#006ce7 calc(100% - 2px))}.tox .tox-tinymceai__annotation--modified__selected{background-image:none;background-color:rgba(0,108,231,.2);box-shadow:0 2px 0 0 #006ce7,0 -2px 0 0 #006ce7}.tox .tox-tinymceai__annotation--removed__highlight{-webkit-text-decoration:line-through;text-decoration:line-through;background-position:bottom;background-image:linear-gradient(rgba(204,0,0,.2) calc(100% - 2px),#c00 calc(100% - 2px))}.tox .tox-tinymceai__annotation--removed__selected{-webkit-text-decoration:line-through;text-decoration:line-through;background-image:none;background-color:rgba(204,0,0,.2);box-shadow:0 2px 0 0 #006ce7,0 -2px 0 0 #006ce7}.tox .mce-object.tox-tinymceai__annotation--added,.tox .mce-object.tox-tinymceai__annotation--modified,.tox .mce-object.tox-tinymceai__annotation--removed,.tox .mce-preview-object.tox-tinymceai__annotation--added,.tox .mce-preview-object.tox-tinymceai__annotation--modified,.tox .mce-preview-object.tox-tinymceai__annotation--removed,.tox iframe.tox-tinymceai__annotation--added,.tox iframe.tox-tinymceai__annotation--modified,.tox iframe.tox-tinymceai__annotation--removed,.tox img.tox-tinymceai__annotation--added,.tox img.tox-tinymceai__annotation--modified,.tox img.tox-tinymceai__annotation--removed,.tox video.tox-tinymceai__annotation--added,.tox video.tox-tinymceai__annotation--modified,.tox video.tox-tinymceai__annotation--removed{padding-block:0;vertical-align:top}.tox .tox-tinymceai__annotation--added:has(img,video,iframe,.mce-object,.mce-preview-object),.tox .tox-tinymceai__annotation--modified:has(img,video,iframe,.mce-object,.mce-preview-object),.tox .tox-tinymceai__annotation--removed:has(img,video,iframe,.mce-object,.mce-preview-object){padding-block:0}.tox .tox-tinymceai__annotation--added:has(img,video,iframe,.mce-object,.mce-preview-object) .mce-object,.tox .tox-tinymceai__annotation--added:has(img,video,iframe,.mce-object,.mce-preview-object) .mce-preview-object,.tox .tox-tinymceai__annotation--added:has(img,video,iframe,.mce-object,.mce-preview-object) iframe,.tox .tox-tinymceai__annotation--added:has(img,video,iframe,.mce-object,.mce-preview-object) img,.tox .tox-tinymceai__annotation--added:has(img,video,iframe,.mce-object,.mce-preview-object) video,.tox .tox-tinymceai__annotation--modified:has(img,video,iframe,.mce-object,.mce-preview-object) .mce-object,.tox .tox-tinymceai__annotation--modified:has(img,video,iframe,.mce-object,.mce-preview-object) .mce-preview-object,.tox .tox-tinymceai__annotation--modified:has(img,video,iframe,.mce-object,.mce-preview-object) iframe,.tox .tox-tinymceai__annotation--modified:has(img,video,iframe,.mce-object,.mce-preview-object) img,.tox .tox-tinymceai__annotation--modified:has(img,video,iframe,.mce-object,.mce-preview-object) video,.tox .tox-tinymceai__annotation--removed:has(img,video,iframe,.mce-object,.mce-preview-object) .mce-object,.tox .tox-tinymceai__annotation--removed:has(img,video,iframe,.mce-object,.mce-preview-object) .mce-preview-object,.tox .tox-tinymceai__annotation--removed:has(img,video,iframe,.mce-object,.mce-preview-object) iframe,.tox .tox-tinymceai__annotation--removed:has(img,video,iframe,.mce-object,.mce-preview-object) img,.tox .tox-tinymceai__annotation--removed:has(img,video,iframe,.mce-object,.mce-preview-object) video{vertical-align:top}.tox del.tox-tinymceai__annotation--added__selected,.tox ins.tox-tinymceai__annotation--added__selected{background-color:transparent;box-shadow:none;background-position:center;background-size:100% calc(1lh + 3px);background-image:linear-gradient(#006ce7 3px,rgba(120,171,70,.2) 3px,rgba(120,171,70,.2) calc(100% - 3px),#006ce7 calc(100% - 3px))}.tox del.tox-tinymceai__annotation--modified__selected,.tox ins.tox-tinymceai__annotation--modified__selected{background-color:transparent;box-shadow:none;background-position:center;background-size:100% calc(1lh + 3px);background-image:linear-gradient(#006ce7 3px,rgba(0,108,231,.2) 3px,rgba(0,108,231,.2) calc(100% - 3px),#006ce7 calc(100% - 3px))}.tox del.tox-tinymceai__annotation--removed__selected,.tox ins.tox-tinymceai__annotation--removed__selected{background-color:transparent;box-shadow:none;background-position:center;background-size:100% calc(1lh + 3px);background-image:linear-gradient(#006ce7 3px,rgba(204,0,0,.2) 3px,rgba(204,0,0,.2) calc(100% - 3px),#006ce7 calc(100% - 3px))}.tox .tox-tinymceai__annotation--added.tox-tinymceai__annotation--added__hidden,.tox .tox-tinymceai__annotation--modified.tox-tinymceai__annotation--modified__hidden,.tox .tox-tinymceai__annotation--removed.tox-tinymceai__annotation--removed__hidden{display:none;-webkit-text-decoration:none;text-decoration:none}.tox :has(> div > iframe).tox-tinymceai__annotation--added,.tox :has(> div > iframe).tox-tinymceai__annotation--modified,.tox :has(> div > iframe).tox-tinymceai__annotation--removed{padding:7px;margin:5px}.tox iframe.tox-tinymceai__annotation--added__highlight,.tox img.tox-tinymceai__annotation--added__highlight,.tox video.tox-tinymceai__annotation--added__highlight{background-color:#e4eeda;background-image:none;border:2px solid #78ab46;padding:0;vertical-align:top}.tox iframe.tox-tinymceai__annotation--added__selected,.tox img.tox-tinymceai__annotation--added__selected,.tox video.tox-tinymceai__annotation--added__selected{background-color:#e4eeda;background-image:none;border:2px solid #78ab46;padding:0;vertical-align:top;border-color:#e4eeda;outline:2px solid #006ce7}.tox iframe.tox-tinymceai__annotation--modified__highlight,.tox img.tox-tinymceai__annotation--modified__highlight,.tox video.tox-tinymceai__annotation--modified__highlight{background-color:#cce2fa;background-image:none;border:2px solid #006ce7;padding:0;vertical-align:top}.tox iframe.tox-tinymceai__annotation--modified__selected,.tox img.tox-tinymceai__annotation--modified__selected,.tox video.tox-tinymceai__annotation--modified__selected{background-color:#cce2fa;background-image:none;border:2px solid #006ce7;padding:0;vertical-align:top;border-color:#cce2fa;outline:2px solid #006ce7}.tox iframe.tox-tinymceai__annotation--removed__highlight,.tox img.tox-tinymceai__annotation--removed__highlight,.tox video.tox-tinymceai__annotation--removed__highlight{background-color:#f5cccc;background-image:none;border:2px solid #c00;padding:0;vertical-align:top}.tox iframe.tox-tinymceai__annotation--removed__selected,.tox img.tox-tinymceai__annotation--removed__selected,.tox video.tox-tinymceai__annotation--removed__selected{background-color:#f5cccc;background-image:none;border:2px solid #c00;padding:0;vertical-align:top;border-color:#f5cccc;outline:2px solid #006ce7}.tox .tox-tinymceai__annotation--removed__highlight iframe,.tox .tox-tinymceai__annotation--removed__highlight img,.tox .tox-tinymceai__annotation--removed__highlight video,.tox .tox-tinymceai__annotation--removed__selected iframe,.tox .tox-tinymceai__annotation--removed__selected img,.tox .tox-tinymceai__annotation--removed__selected video{background-color:#f5cccc;background-image:none;border:2px solid #c00;padding:0;vertical-align:top}.tox .tox-tinymceai__annotation--removed__selected iframe,.tox .tox-tinymceai__annotation--removed__selected img,.tox .tox-tinymceai__annotation--removed__selected video{border-color:#f5cccc;outline:2px solid #006ce7}.tox div.tox-tinymceai__annotation:has(> hr){background-size:auto;padding:.25em}.tox div.tox-tinymceai__annotation--removed__highlight>hr{border-color:rgba(0,0,0,.2)}.tox div.tox-tinymceai__annotation--added__highlight>hr{border-color:rgba(0,0,0,.2)}.tox .tox-tinymceai__deleted-media-overlay{inset:0;overflow:hidden;pointer-events:none;position:absolute;z-index:11}.tox .tox-tinymceai__deleted-media-wash{fill:#fff;fill-opacity:0.4}.tox .tox-tinymceai__deleted-media-mark{stroke:#c00}.tox .tox-tinymceai__deleted-media-halo{stroke:#fff}.tox .mce-pagebreak.tox-tinymceai__annotation--added__selected,.tox .mce-pagebreak.tox-tinymceai__annotation--modified__selected,.tox .mce-pagebreak.tox-tinymceai__annotation--removed__selected{border:1px dashed #aaa;box-shadow:none;background-image:none}.tox .mce-pagebreak.tox-tinymceai__annotation--added__highlight,.tox .mce-pagebreak.tox-tinymceai__annotation--modified__highlight,.tox .mce-pagebreak.tox-tinymceai__annotation--removed__highlight{padding:0}.tox .tox-tinymceai__diff-focus-overlay{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:10}.tox .tox-tinymceai__diff-focus-overlay-dim{fill:rgba(34,47,62,0.2)}.tox .tox-ai__scroll:has(.tox-card-group){padding-top:0}.tox .tox-ai__scroll:has(.tox-card-group) .tox-ai__review-sidebar-container .tox-card-list{gap:0}.tox .tox-ai__scroll .tox-ai__review-sidebar-container{scrollbar-gutter:stable;width:100%;height:100%;display:flex;flex-direction:column;gap:12px}.tox .tox-ai__scroll .tox-ai__review-sidebar-container .tox-card-list{gap:8px}.tox .tox-ai__scroll .tox-ai__review-sidebar-container .tox-card-group__title{margin-inline:-12px}.tox .tox-ai__scroll .tox-ai__review-sidebar-container .tox-ai__review-initializing{padding:var(--tox-private-pad-md,16px)}.tox .tox-ai__scroll .tox-ai__review-sidebar-container .tox-ai__review-description{padding-bottom:calc(var(--tox-private-pad-sm,8px) + var(--tox-private-pad-xs,4px));font-size:var(--tox-private-font-size-sm, 14px)}.tox .tox-ai__scroll .tox-ai__review-sidebar-container .tox-ai__review-choose-container{padding-bottom:12px}.tox .tox-ai__scroll .tox-ai__review-sidebar-container .tox-ai__review-custom-input{margin-bottom:12px}.tox .tox-ai__scroll .tox-ai__review-sidebar-container .tox-ai__review-custom-actions{display:flex;gap:8px}.tox .tox-ai__scroll .tox-ai__review-sidebar-container .tox-ai__review-input-container{margin-bottom:12px}.tox .tox-ai__scroll .tox-ai__review-sidebar-container .tox-ai__review-input-container button.tox-ai__review-input-button{width:100%;background-color:var(--tox-private-background-color,#fff);display:flex;justify-content:space-between;align-items:center;border:1px solid #eee;border-radius:6px;box-sizing:border-box}.tox .tox-ai__scroll .tox-ai__review-sidebar-container .tox-ai__review-input-container .tox-ai__review-dropdown-content{width:anchor-size(width)}.tox .tox-statusbar{align-items:center;background-color:#fff;border-top:1px solid #e3e3e3;color:rgba(34,47,62,.7);display:flex;flex:0 0 auto;font-size:14px;font-weight:400;height:25px;overflow:hidden;padding:0 8px;position:relative;text-transform:none}.tox .tox-statusbar__path{display:flex;flex:1 1 auto;text-overflow:ellipsis;white-space:nowrap}.tox .tox-statusbar__right-container{display:flex;justify-content:flex-end;white-space:nowrap}.tox .tox-statusbar__help-text{text-align:center}.tox .tox-statusbar__text-container{align-items:flex-start;display:flex;flex:1 1 auto;height:16px;justify-content:space-between}@media only screen and (min-width:768px){.tox .tox-statusbar__text-container.tox-statusbar__text-container-3-cols>.tox-statusbar__help-text,.tox .tox-statusbar__text-container.tox-statusbar__text-container-3-cols>.tox-statusbar__path,.tox .tox-statusbar__text-container.tox-statusbar__text-container-3-cols>.tox-statusbar__right-container{flex:0 0 calc(100% / 3)}}.tox .tox-statusbar__text-container.tox-statusbar__text-container--flex-end{justify-content:flex-end}.tox .tox-statusbar__text-container.tox-statusbar__text-container--flex-start{justify-content:flex-start}.tox .tox-statusbar__text-container.tox-statusbar__text-container--space-around{justify-content:space-around}.tox .tox-statusbar__path>*{display:inline;white-space:nowrap}.tox .tox-statusbar__wordcount{flex:0 0 auto;margin-left:1ch}@media only screen and (max-width:767px){.tox .tox-statusbar__text-container .tox-statusbar__help-text{display:none}.tox .tox-statusbar__text-container .tox-statusbar__help-text:only-child{display:block}}.tox .tox-statusbar a,.tox .tox-statusbar__path-item,.tox .tox-statusbar__wordcount{color:rgba(34,47,62,.7);position:relative;-webkit-text-decoration:none;text-decoration:none}.tox .tox-statusbar a:focus:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar a:hover:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar__path-item:focus:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar__path-item:hover:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar__wordcount:focus:not(:disabled):not([aria-disabled=true]),.tox .tox-statusbar__wordcount:hover:not(:disabled):not([aria-disabled=true]){color:#222f3e;cursor:pointer}.tox .tox-statusbar a:focus-visible::after,.tox .tox-statusbar__path-item:focus-visible::after,.tox .tox-statusbar__wordcount:focus-visible::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:'';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-statusbar a:focus-visible::after,.tox .tox-statusbar__path-item:focus-visible::after,.tox .tox-statusbar__wordcount:focus-visible::after{border:2px solid highlight}}.tox .tox-statusbar__branding svg{fill:rgba(34,47,62,0.8);height:1em;margin-left:.3em;width:auto}@media (forced-colors:active){.tox .tox-statusbar__branding svg{fill:currentColor}}.tox .tox-statusbar__branding a{align-items:center;display:inline-flex}.tox .tox-statusbar__branding a:focus:not(:disabled):not([aria-disabled=true]) svg,.tox .tox-statusbar__branding a:hover:not(:disabled):not([aria-disabled=true]) svg{fill:#222f3e}.tox .tox-statusbar__resize-cursor-default{cursor:ns-resize}.tox .tox-statusbar__resize-cursor-both{cursor:nwse-resize}.tox .tox-statusbar__resize-handle{align-items:flex-end;align-self:stretch;display:flex;flex:0 0 auto;justify-content:flex-end;margin-bottom:3px;margin-left:4px;margin-right:calc(3px - 8px);margin-top:3px;padding-bottom:0;padding-left:0;padding-right:0;position:relative}.tox .tox-statusbar__resize-handle svg{display:block;fill:rgba(34,47,62,0.5)}.tox .tox-statusbar__resize-handle:focus svg,.tox .tox-statusbar__resize-handle:hover svg{fill:#222f3e}.tox .tox-statusbar__resize-handle:focus-visible{background-color:transparent;border-radius:1px 1px 5px 1px;box-shadow:0 0 0 2px transparent}.tox .tox-statusbar__resize-handle:focus-visible::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:'';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-statusbar__resize-handle:focus-visible::after{border:2px solid highlight}}.tox .tox-statusbar__resize-handle:only-child{margin-left:auto}.tox:not([dir=rtl]) .tox-statusbar__path>*{margin-right:4px}.tox:not([dir=rtl]) .tox-statusbar__branding{margin-left:2ch}.tox[dir=rtl] .tox-statusbar{flex-direction:row-reverse}.tox[dir=rtl] .tox-statusbar__path>*{margin-left:4px}.tox[dir=rtl] .tox-statusbar__branding svg{margin-left:0;margin-right:.3em}.tox a.tox-tag{cursor:pointer}.tox .tox-tag{width:fit-content;box-sizing:border-box;display:flex;padding:var(--tox-private-pad-xs,4px) 6px;position:relative;align-items:center;gap:var(--tox-private-pad-xs,4px);border-radius:3px;background:hsl(from var(--tox-private-color-tint,#006ce7) h s l / 10%);line-height:var(--tox-private-base-value, 16px);font-size:var(--tox-private-font-size-xs, 12px)}.tox .tox-tag::before{border-radius:var(--tox-private-control-border-radius,6px);bottom:calc(-1 * var(--tox-private-tag-border-width,1px));box-shadow:var(--tox-private-tag-focus-outline,inset 0 0 0 1px #fff,0 0 0 2px #006ce7);content:'';left:calc(-1 * var(--tox-private-tag-border-width,1px));opacity:0;pointer-events:none;position:absolute;right:calc(-1 * var(--tox-private-tag-border-width,1px));top:calc(-1 * var(--tox-private-tag-border-width,1px))}.tox .tox-tag:focus:not(:disabled)::before{opacity:1}.tox .tox-tag>*{flex-shrink:0}.tox .tox-tag .tox-icon{height:var(--tox-private-base-value,16px);fill:var(--tox-private-text-color,#222f3e)}.tox .tox-tag .tox-tag__label{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;flex-shrink:1;color:var(--tox-private-text-color,#222f3e)}.tox .tox-tag .tox-tag__close{height:var(--tox-private-base-value,16px)}.tox .tox-tag .tox-tag__close .tox-button.tox-button--icon{border:0;padding:0;color:var(--tox-private-text-color-muted,rgba(34,47,62,.7))}.tox .tox-tag .tox-tag__close .tox-button.tox-button--icon::before{box-shadow:none}.tox .tox-throbber{z-index:1299}.tox .tox-throbber__busy-spinner{align-items:center;background-color:rgba(255,255,255,.6);bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}.tox .tox-segmented-control{display:inline-flex;position:relative;border:none;border-radius:var(--tox-private-control-border-radius,6px);box-shadow:inset 0 0 0 1px var(--tox-private-segmented-control-border-color,#e3e3e3);overflow:hidden;padding:var(--tox-private-pad-xs,4px);background-color:var(--tox-private-background-color,#fff)}.tox .tox-segmented-control__segment{flex:1;padding:var(--tox-private-pad-xs,4px) var(--tox-private-pad-sm,8px);cursor:pointer;background:0 0;font-size:var(--tox-private-font-size-sm, 14px);font-weight:var(--tox-private-font-weight-normal,normal);line-height:16px;border:1px solid transparent;border-radius:calc(var(--tox-private-control-border-radius,6px) - 1px);text-align:center;white-space:nowrap;display:inline-block;vertical-align:middle;color:var(--tox-private-segmented-control-text-color,#222f3e)}.tox .tox-segmented-control__segment--active{border-color:var(--tox-private-segmented-control-active-border-color,#006ce7);color:var(--tox-private-segmented-control-active-text-color,#006ce7);background-color:var(--tox-private-segmented-control-active-bg-color,rgba(0,108,231,.1))}.tox .tox-segmented-control:not(.tox-segmented-control--disabled) .tox-segmented-control__segment{transition:all .2s}.tox .tox-segmented-control.tox-segmented-control--disabled .tox-segmented-control__segment{opacity:.5;cursor:not-allowed;pointer-events:none}.tox .tox-segmented-control__segment:focus{outline:2px solid var(--tox-private-color-tint,#006ce7);outline-offset:2px}.tox .tox-segmented-control__segment:focus:not(:focus-visible){outline:0}.tox .tox-toggle{display:flex;align-items:center;gap:var(--tox-private-pad-xs,4px);padding:var(--tox-private-pad-xs,4px);font-weight:var(--tox-private-font-weight-normal,normal);line-height:var(--tox-private-control-line-height, 24px);white-space:nowrap;background-color:var(--tox-private-background-color,#fff);color:var(--tox-private-text-color,#222f3e)}.tox .tox-toggle input{position:absolute;opacity:0;width:0;height:0}.tox .tox-toggle__slider{position:relative;cursor:pointer;box-sizing:border-box;transition:.4s;border-radius:34px;width:28px;height:16px;background-color:var(--tox-private-slider-background-color,#fff);border:1px solid var(--tox-private-slider-border-color,#e3e3e3)}.tox .tox-toggle__slider::before{position:absolute;content:\"\";height:12px;width:12px;left:1px;bottom:1px;transition:.4s;border-radius:50%;background-color:var(--tox-private-slider-handle-background-color,#222f3e)}.tox input:checked+.tox-toggle__slider{background-color:var(--tox-private-slider-checked-background-color,#006ce7);border:1px solid var(--tox-private-slider-checked-border-color,#006ce7)}.tox input:focus+.tox-toggle__slider{box-shadow:0 0 0 1px var(--tox-private-color-white,#fff),0 0 0 2px var(--tox-private-color-tint,#006ce7)}.tox input:checked+.tox-toggle__slider::before{transform:translateX(12px);background-color:var(--tox-private-slider-checked-handle-background-color,#fff)}.tox input:disabled+.tox-toggle__slider::before{opacity:50%}.tox .tox-tbtn{align-items:center;background:#fff;border:0;border-radius:3px;box-shadow:none;color:#222f3e;display:flex;flex:0 0 auto;font-size:14px;font-style:normal;font-weight:400;height:28px;justify-content:center;margin:6px 1px 5px 0;outline:0;padding:0;text-transform:none;width:34px}.tox .tox-tbtn .tox-tbtn__icon-wrap{pointer-events:none}@media (forced-colors:active){.tox .tox-tbtn.tox-tbtn:hover,.tox .tox-tbtn:hover{outline:1px dashed currentColor}.tox .tox-tbtn.tox-tbtn--active,.tox .tox-tbtn.tox-tbtn--enabled,.tox .tox-tbtn.tox-tbtn--enabled:focus,.tox .tox-tbtn.tox-tbtn--enabled:hover,.tox .tox-tbtn:focus:not(.tox-tbtn--disabled){outline:1px solid currentColor;position:relative}}.tox .tox-tbtn svg{display:block;fill:#222f3e}@media (forced-colors:active){.tox .tox-tbtn svg{fill:currentColor!important}.tox .tox-tbtn svg.tox-tbtn--enabled,.tox .tox-tbtn svg:focus:not(.tox-tbtn--disabled){fill:currentColor!important}.tox .tox-tbtn svg .tox-tbtn:disabled,.tox .tox-tbtn svg .tox-tbtn:disabled:hover,.tox .tox-tbtn svg.tox-tbtn--disabled,.tox .tox-tbtn svg.tox-tbtn--disabled:hover{filter:contrast(0%)}}.tox .tox-tbtn.tox-tbtn-more{padding-left:5px;padding-right:5px;width:inherit}.tox .tox-tbtn:focus{background:#fff;border:0;box-shadow:none;position:relative;z-index:1}.tox .tox-tbtn:focus::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:'';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-tbtn:focus::after{border:2px solid highlight}}.tox .tox-tbtn:hover{background:#f0f0f0;border:0;box-shadow:none;color:#222f3e}.tox .tox-tbtn:hover svg{fill:#222f3e}.tox .tox-tbtn:active{background:#a6ccf7;border:0;box-shadow:none;color:#222f3e}.tox .tox-tbtn:active svg{fill:#222f3e}.tox .tox-tbtn--disabled .tox-tbtn--enabled svg{fill:rgba(34,47,62,0.5)}.tox .tox-tbtn--disabled,.tox .tox-tbtn--disabled:hover,.tox .tox-tbtn:disabled,.tox .tox-tbtn:disabled:hover{background:#fff;border:0;box-shadow:none;color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-tbtn--disabled svg,.tox .tox-tbtn--disabled:hover svg,.tox .tox-tbtn:disabled svg,.tox .tox-tbtn:disabled:hover svg{fill:rgba(34,47,62,0.5)}.tox .tox-tbtn--active,.tox .tox-tbtn--enabled,.tox .tox-tbtn--enabled:focus,.tox .tox-tbtn--enabled:hover{background:#a6ccf7;border:0;box-shadow:none;color:#222f3e;position:relative}.tox .tox-tbtn--active>*,.tox .tox-tbtn--enabled:focus>*,.tox .tox-tbtn--enabled:hover>*,.tox .tox-tbtn--enabled>*{transform:none}.tox .tox-tbtn--active svg,.tox .tox-tbtn--enabled svg,.tox .tox-tbtn--enabled:focus svg,.tox .tox-tbtn--enabled:hover svg{fill:#222f3e}.tox .tox-tbtn--active.tox-tbtn--disabled svg,.tox .tox-tbtn--enabled.tox-tbtn--disabled svg,.tox .tox-tbtn--enabled:focus.tox-tbtn--disabled svg,.tox .tox-tbtn--enabled:hover.tox-tbtn--disabled svg{fill:rgba(34,47,62,0.5)}.tox .tox-tbtn--enabled:focus::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:'';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-tbtn--enabled:focus::after{border:2px solid highlight}}.tox .tox-tbtn:focus:not(.tox-tbtn--disabled){color:#222f3e}.tox .tox-tbtn:focus:not(.tox-tbtn--disabled) svg{fill:#222f3e}.tox .tox-tbtn:active>*{transform:none}.tox .tox-tbtn--md{height:42px;width:51px}.tox .tox-tbtn--lg{flex-direction:column;height:56px;width:68px}.tox .tox-tbtn--return{align-self:stretch;height:unset;width:16px}.tox .tox-tbtn--labeled{padding:0 4px;width:unset}.tox .tox-tbtn__vlabel{display:block;font-size:10px;font-weight:400;letter-spacing:-.025em;margin-bottom:4px;white-space:nowrap}.tox .tox-label--context-toolbar{margin:6px 1px 5px 0;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.tox .tox-number-input{background:#f7f7f7;border-radius:3px;display:flex;margin:6px 1px 5px 0;position:relative;width:auto}.tox .tox-number-input:focus{background:#f7f7f7}.tox .tox-number-input:focus::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:'';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-number-input:focus::after{border:2px solid highlight}}.tox .tox-number-input .tox-input-wrapper{display:flex;pointer-events:none;position:relative;text-align:center}.tox .tox-number-input .tox-input-wrapper:focus{background-color:#f7f7f7;z-index:1}.tox .tox-number-input .tox-input-wrapper:focus::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:'';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-number-input .tox-input-wrapper:focus::after{border:2px solid highlight}}.tox .tox-number-input .tox-input-wrapper:has(input:focus)::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:'';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-number-input .tox-input-wrapper:has(input:focus)::after{border:2px solid highlight}}.tox .tox-number-input input{border-radius:3px;color:#222f3e;font-size:14px;margin:2px 0;pointer-events:all;position:relative;width:60px}.tox .tox-number-input input:hover{background:#f0f0f0;color:#222f3e}.tox .tox-number-input input:focus{background-color:#f7f7f7}.tox .tox-number-input input:disabled{background:#fff;border:0;box-shadow:none;color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-number-input button{color:#222f3e;height:28px;position:relative;text-align:center;width:24px}@media (forced-colors:active){.tox .tox-number-input button:active,.tox .tox-number-input button:focus,.tox .tox-number-input button:hover{outline:1px solid currentColor!important}}.tox .tox-number-input button svg{display:block;fill:#222f3e;margin:0 auto;transform:scale(.67)}@media (forced-colors:active){.tox .tox-number-input button svg,.tox .tox-number-input button svg:active,.tox .tox-number-input button svg:hover{fill:currentColor!important}.tox .tox-number-input button svg:disabled{filter:contrast(0)}}.tox .tox-number-input button:focus{background:#f7f7f7;z-index:1}.tox .tox-number-input button:focus::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:'';left:0;position:absolute;right:0;top:0}@media (forced-colors:active){.tox .tox-number-input button:focus::after{border:2px solid highlight}}.tox .tox-number-input button:hover{background:#f0f0f0;border:0;box-shadow:none;color:#222f3e}.tox .tox-number-input button:hover svg{fill:#222f3e}.tox .tox-number-input button:active{background:#a6ccf7;border:0;box-shadow:none;color:#222f3e}.tox .tox-number-input button:active svg{fill:#222f3e}.tox .tox-number-input button:disabled{background:#fff;border:0;box-shadow:none;color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-number-input button:disabled svg{fill:rgba(34,47,62,0.5)}.tox .tox-number-input button.minus{border-radius:3px 0 0 3px}.tox .tox-number-input button.plus{border-radius:0 3px 3px 0}.tox .tox-number-input:focus:not(:active)>.tox-input-wrapper,.tox .tox-number-input:focus:not(:active)>button{background:#f7f7f7}.tox .tox-tbtn--select{margin:6px 1px 5px 0;padding:0 4px;width:auto}.tox .tox-tbtn--bordered,.tox .tox-tbtn--bordered:focus,.tox .tox-tbtn--bordered:hover{border:1px solid #eee}.tox .tox-tbtn__select-label{cursor:default;font-weight:400;height:initial;margin:0 4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tox .tox-tbtn__select-chevron{align-items:center;display:flex;justify-content:center;width:16px}.tox .tox-tbtn__select-chevron svg{fill:rgba(34,47,62,0.5)}@media (forced-colors:active){.tox .tox-tbtn__select-chevron svg{fill:currentColor}}.tox .tox-tbtn--bespoke{background:#f7f7f7}.tox .tox-tbtn--bespoke:focus{background:#f7f7f7}.tox .tox-tbtn--bespoke+.tox-tbtn--bespoke{margin-inline-start:4px}.tox .tox-tbtn--bespoke .tox-tbtn__select-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:7em}.tox .tox-tbtn--disabled .tox-tbtn__select-label,.tox .tox-tbtn--select:disabled .tox-tbtn__select-label{cursor:not-allowed}.tox .tox-split-button__main{border-radius:3px 0 0 3px;margin-right:0}.tox .tox-split-button__main:focus{border:0;box-shadow:none;background:#fff;color:#222f3e;position:relative;z-index:1}.tox .tox-split-button__main:focus::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:'';left:0;position:absolute;right:0;top:0;border-radius:3px 0 0 3px}@media (forced-colors:active){.tox .tox-split-button__main:focus::after{border:2px solid highlight}}.tox .tox-split-button__chevron{width:16px;border-radius:0 3px 3px 0;margin-left:0}.tox .tox-split-button__chevron:focus{border:0;box-shadow:none;background:#fff;color:#222f3e;position:relative;z-index:1}.tox .tox-split-button__chevron:focus::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:'';left:0;position:absolute;right:0;top:0;border-radius:0 3px 3px 0}@media (forced-colors:active){.tox .tox-split-button__chevron:focus::after{border:2px solid highlight}}.tox .tox-split-button__chevron svg{fill:rgba(34,47,62,0.5)}@media (forced-colors:active){.tox .tox-split-button__chevron svg{fill:currentColor}}.tox.tox-platform-touch .tox-split-button__main{width:30px}.tox.tox-platform-touch .tox-split-button__chevron{width:20px}.tox .tox-split-button__chevron.tox-tbtn--disabled,.tox .tox-split-button__main.tox-tbtn--disabled{background:#fff;box-shadow:none;color:rgba(34,47,62,.5)}.tox .tox-split-button__chevron.tox-tbtn--disabled:hover,.tox .tox-split-button__main.tox-tbtn--disabled:hover{background:#fff;box-shadow:none;color:rgba(34,47,62,.5)}.tox .tox-split-button__chevron.tox-tbtn--disabled:focus,.tox .tox-split-button__main.tox-tbtn--disabled:focus{background:#fff;box-shadow:none;color:rgba(34,47,62,.5)}.tox .tox-split-button__main.tox-tbtn--disabled svg .tox-icon-highlight-bg-color__color,.tox .tox-split-button__main.tox-tbtn--disabled svg .tox-icon-text-color__color{opacity:.3}.tox .tox-toolbar-overlord{background-color:#fff}.tox .tox-toolbar,.tox .tox-toolbar__overflow,.tox .tox-toolbar__primary{background-attachment:local;background-color:#fff;background-image:repeating-linear-gradient(#e3e3e3 0 1px,transparent 1px 39px);background-position:center top 40px;background-repeat:no-repeat;background-size:calc(100% - 11px * 2) calc(100% - 41px);display:flex;flex:0 0 auto;flex-shrink:0;flex-wrap:wrap;padding:0 0;transform:perspective(1px)}.tox .tox-toolbar-overlord>.tox-toolbar,.tox .tox-toolbar-overlord>.tox-toolbar__overflow,.tox .tox-toolbar-overlord>.tox-toolbar__primary{background-position:center top 0;background-size:calc(100% - 11px * 2) calc(100% - 0px)}.tox .tox-toolbar__overflow.tox-toolbar__overflow--closed{height:0;opacity:0;padding-bottom:0;padding-top:0;visibility:hidden}.tox .tox-toolbar__overflow--growing{transition:height .3s ease,opacity .2s linear .1s}.tox .tox-toolbar__overflow--shrinking{transition:opacity .3s ease,height .2s linear .1s,visibility 0s linear .3s}.tox .tox-anchorbar,.tox .tox-toolbar-overlord{grid-column:1/-1}.tox .tox-menubar+.tox-toolbar,.tox .tox-menubar+.tox-toolbar-overlord{border-top:1px solid transparent;margin-top:-1px;padding-bottom:1px;padding-top:1px}@media (forced-colors:active){.tox .tox-menubar+.tox-toolbar,.tox .tox-menubar+.tox-toolbar-overlord{outline:1px solid currentColor}}.tox .tox-toolbar--scrolling{flex-wrap:nowrap;overflow-x:auto}.tox .tox-pop .tox-toolbar{border-width:0}.tox .tox-toolbar--no-divider{background-image:none}.tox .tox-toolbar-overlord .tox-toolbar:not(.tox-toolbar--scrolling):first-child,.tox .tox-toolbar-overlord .tox-toolbar__primary{background-position:center top 39px}.tox .tox-editor-header>.tox-toolbar--scrolling,.tox .tox-toolbar-overlord .tox-toolbar--scrolling:first-child{background-image:none}.tox .tox-focusable-wrapper{border:1px solid transparent;margin-right:2px;pointer-events:none}.tox .tox-focusable-wrapper .tox-textfield-size{pointer-events:all}.tox .tox-focusable-wrapper:focus{background-color:#f7f7f7;border-radius:6px;border-style:solid;border-width:1px}.tox.tox-tinymce-aux .tox-toolbar__overflow{background-color:#fff;background-position:center top 43px;background-size:calc(100% - 8px * 2) calc(100% - 51px);border:none;border-radius:6px;box-shadow:0 0 2px 0 rgba(34,47,62,.2),0 4px 8px 0 rgba(34,47,62,.15);overscroll-behavior:none;padding:4px 0}@media (forced-colors:active){.tox.tox-tinymce-aux .tox-toolbar__overflow{border:solid}}.tox-pop .tox-pop__dialog .tox-toolbar{background-position:center top 43px;background-size:calc(100% - 11px * 2) calc(100% - 51px);padding:4px 0}.tox-context-form__group{display:flex;align-items:center}.tox .tox-toolbar__group{align-items:center;display:flex;flex-wrap:wrap;margin:0 0;padding:0 11px 0 12px}.tox .tox-toolbar__group--pull-right{margin-left:auto}.tox .tox-toolbar--scrolling .tox-toolbar__group{flex-shrink:0;flex-wrap:nowrap}.tox:not([dir=rtl]) .tox-toolbar__group:not(:last-of-type){border-right:1px solid transparent}.tox[dir=rtl] .tox-toolbar__group:not(:last-of-type){border-left:1px solid transparent}.tox .tox-toolbar-input-form{display:flex;align-items:center;background-color:var(--tox-private-background-color,#fff);padding:0 var(--tox-private-pad-sm,8px)}.tox .tox-tooltip{display:inline-block;max-width:min(80%,15em);padding:8px 0 0 0;position:relative;width:max-content;z-index:1150}.tox .tox-tooltip.tox-tooltip--anchor{display:none;padding:var(--tox-private-pad-xs,4px) 0 0;position:fixed;position-try-fallbacks:flip-block,flip-inline,flip-block flip-inline;height:fit-content}.tox .tox-tooltip.tox-tooltip--anchor.tox-tooltip--up{position-area:block-end}.tox .tox-tooltip.tox-tooltip--anchor.tox-tooltip--down{position-area:block-start}.tox .tox-tooltip.tox-tooltip--anchor.tox-tooltip--left{position-area:inline-start}.tox .tox-tooltip.tox-tooltip--anchor.tox-tooltip--right{position-area:inline-end}.tox .tox-tooltip__body{background-color:#222f3e;border-radius:6px;box-shadow:none;color:#fff;font-size:12px;font-style:normal;font-weight:600;overflow-wrap:break-word;padding:4px 6px;text-transform:none}@media (forced-colors:active){.tox .tox-tooltip__body{outline:outset 1px}}.tox .tox-tooltip__arrow{position:absolute}.tox .tox-tooltip--down .tox-tooltip__arrow{border-left:8px solid transparent;border-right:8px solid transparent;border-top:8px solid #222f3e;bottom:0;left:50%;position:absolute;transform:translateX(-50%)}.tox .tox-tooltip--up .tox-tooltip__arrow{border-bottom:8px solid #222f3e;border-left:8px solid transparent;border-right:8px solid transparent;left:50%;position:absolute;top:0;transform:translateX(-50%)}.tox .tox-tooltip--right .tox-tooltip__arrow{border-bottom:8px solid transparent;border-left:8px solid #222f3e;border-top:8px solid transparent;position:absolute;right:0;top:50%;transform:translateY(-50%)}.tox .tox-tooltip--left .tox-tooltip__arrow{border-bottom:8px solid transparent;border-right:8px solid #222f3e;border-top:8px solid transparent;left:0;position:absolute;top:50%;transform:translateY(-50%)}.tox .tox-tree{display:flex;flex-direction:column}.tox .tox-tree .tox-trbtn{align-items:center;background:0 0;border:0;border-radius:4px;box-shadow:none;color:#222f3e;display:flex;flex:0 0 auto;font-size:14px;font-style:normal;font-weight:400;height:28px;margin-bottom:4px;margin-top:4px;outline:0;overflow:hidden;padding:0;padding-left:8px;text-transform:none}.tox .tox-tree .tox-trbtn .tox-tree__label{cursor:default;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tox .tox-tree .tox-trbtn svg{display:block;fill:#222f3e}.tox .tox-tree .tox-trbtn:focus{background:#f0f0f0;border:0;box-shadow:none}.tox .tox-tree .tox-trbtn:hover{background:#f0f0f0;border:0;box-shadow:none;color:#222f3e}.tox .tox-tree .tox-trbtn:hover svg{fill:#222f3e}.tox .tox-tree .tox-trbtn:active{background:#a6ccf7;border:0;box-shadow:none;color:#222f3e}.tox .tox-tree .tox-trbtn:active svg{fill:#222f3e}.tox .tox-tree .tox-trbtn--disabled,.tox .tox-tree .tox-trbtn--disabled:hover,.tox .tox-tree .tox-trbtn:disabled,.tox .tox-tree .tox-trbtn:disabled:hover{background:0 0;border:0;box-shadow:none;color:rgba(34,47,62,.5);cursor:not-allowed}.tox .tox-tree .tox-trbtn--disabled svg,.tox .tox-tree .tox-trbtn--disabled:hover svg,.tox .tox-tree .tox-trbtn:disabled svg,.tox .tox-tree .tox-trbtn:disabled:hover svg{fill:rgba(34,47,62,0.5)}.tox .tox-tree .tox-trbtn--enabled,.tox .tox-tree .tox-trbtn--enabled:hover{background:#a6ccf7;border:0;box-shadow:none;color:#222f3e}.tox .tox-tree .tox-trbtn--enabled:hover>*,.tox .tox-tree .tox-trbtn--enabled>*{transform:none}.tox .tox-tree .tox-trbtn--enabled svg,.tox .tox-tree .tox-trbtn--enabled:hover svg{fill:#222f3e}.tox .tox-tree .tox-trbtn:focus:not(.tox-trbtn--disabled){color:#222f3e}.tox .tox-tree .tox-trbtn:focus:not(.tox-trbtn--disabled) svg{fill:#222f3e}.tox .tox-tree .tox-trbtn:active>*{transform:none}.tox .tox-tree .tox-trbtn--return{align-self:stretch;height:unset;width:16px}.tox .tox-tree .tox-trbtn--labeled{padding:0 4px;width:unset}.tox .tox-tree .tox-trbtn__vlabel{display:block;font-size:10px;font-weight:400;letter-spacing:-.025em;margin-bottom:4px;white-space:nowrap}.tox .tox-tree .tox-tree--directory{display:flex;flex-direction:column}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label{font-weight:700}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label .tox-mbtn{margin-left:auto}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label .tox-mbtn svg{fill:transparent}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label .tox-mbtn.tox-mbtn--active svg,.tox .tox-tree .tox-tree--directory .tox-tree--directory__label .tox-mbtn:focus svg{fill:#222f3e}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label:focus .tox-mbtn svg,.tox .tox-tree .tox-tree--directory .tox-tree--directory__label:hover .tox-mbtn svg{fill:#222f3e}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label:hover:has(.tox-mbtn:hover){background-color:transparent;color:#222f3e}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label:hover:has(.tox-mbtn:hover) .tox-chevron svg{fill:#222f3e}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label .tox-chevron{margin-right:6px}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label:has(+ .tox-tree--directory__children--growing) .tox-chevron,.tox .tox-tree .tox-tree--directory .tox-tree--directory__label:has(+ .tox-tree--directory__children--shrinking) .tox-chevron{transition:transform .5s ease-in-out}.tox .tox-tree .tox-tree--directory .tox-tree--directory__label:has(+ .tox-tree--directory__children--growing) .tox-chevron,.tox .tox-tree .tox-tree--directory .tox-tree--directory__label:has(+ .tox-tree--directory__children--open) .tox-chevron{transform:rotate(90deg)}.tox .tox-tree .tox-tree--leaf__label{font-weight:400}.tox .tox-tree .tox-tree--leaf__label .tox-mbtn{margin-left:auto}.tox .tox-tree .tox-tree--leaf__label .tox-mbtn svg{fill:transparent}.tox .tox-tree .tox-tree--leaf__label .tox-mbtn.tox-mbtn--active svg,.tox .tox-tree .tox-tree--leaf__label .tox-mbtn:focus svg{fill:#222f3e}.tox .tox-tree .tox-tree--leaf__label:hover .tox-mbtn svg{fill:#222f3e}.tox .tox-tree .tox-tree--leaf__label:hover:has(.tox-mbtn:hover){background-color:transparent;color:#222f3e}.tox .tox-tree .tox-tree--leaf__label:hover:has(.tox-mbtn:hover) .tox-chevron svg{fill:#222f3e}.tox .tox-tree .tox-icon-custom-state{flex-grow:1;display:flex;justify-content:flex-end}.tox .tox-tree .tox-tree--directory__children{overflow:hidden;padding-left:16px}.tox .tox-tree .tox-tree--directory__children.tox-tree--directory__children--growing,.tox .tox-tree .tox-tree--directory__children.tox-tree--directory__children--shrinking{transition:height .5s ease-in-out}.tox .tox-tree .tox-trbtn.tox-tree--leaf__label{display:flex;justify-content:space-between}[data-mce-name=uploadcare-enhance-filter] .color-swatch-remove-color path{fill:#c00;stroke:#c00}.tox .tox-view-wrap,.tox .tox-view-wrap__slot-container{background-color:#fff;display:flex;flex:1;flex-direction:column;height:100%;min-height:0}.tox .tox-view{display:flex;flex:1 1 auto;flex-direction:column;overflow:hidden;background-color:#fff}.tox .tox-view__header{align-items:center;display:flex;font-size:16px;justify-content:space-between;padding:10px;position:relative}.tox .tox-view__label{color:#222f3e;font-weight:700;line-height:24px;padding:4px 16px;text-align:center;white-space:nowrap}.tox .tox-view__label--normal{font-size:16px}.tox .tox-view__label--large{font-size:20px}.tox .tox-view--mobile.tox-view__header,.tox .tox-view--mobile.tox-view__toolbar{padding:8px}.tox .tox-view--scrolling{flex-wrap:nowrap;overflow-x:auto}.tox .tox-view__align-right{margin-left:auto}.tox .tox-view__toolbar{display:flex;flex-direction:row;gap:8px;justify-content:space-between;overflow-x:auto;padding:10px}.tox .tox-view__toolbar__group{display:flex;flex-direction:row;gap:12px}.tox .tox-view__header-end,.tox .tox-view__header-start{display:flex}.tox .tox-view__pane{height:100%;padding:8px;position:relative;width:100%}.tox .tox-view__pane_panel{border:1px solid #eee;border-radius:6px}.tox:not([dir=rtl]) .tox-view__header .tox-view__header-end>*,.tox:not([dir=rtl]) .tox-view__header .tox-view__header-start>*{margin-left:8px}.tox[dir=rtl] .tox-view__header .tox-view__header-end>*,.tox[dir=rtl] .tox-view__header .tox-view__header-start>*{margin-right:8px}.tox .tox-well{border:1px solid #eee;border-radius:6px;padding:8px;width:100%}.tox .tox-well>:first-child{margin-top:0}.tox .tox-well>:last-child{margin-bottom:0}.tox .tox-well>:only-child{margin:0}.tox .tox-custom-editor{border:1px solid #eee;border-radius:6px;display:flex;flex:1;overflow:hidden;position:relative}.tox .tox-view .tox-revisionhistory__pane{padding:0}.tox .tox-revisionhistory__container{display:flex;flex-direction:column;height:100%}.tox .tox-revisionhistory{background-color:#fff;border-top:1px solid #f0f0f0;display:flex;flex:1;height:100%;overflow-x:auto;overflow-y:hidden;position:relative;width:100%}.tox .tox-revisionhistory__iframe{flex:1}.tox .tox-revisionhistory__sidebar{display:flex;flex-direction:column;height:100%;min-width:248px;width:316px}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__sidebar-title{background-color:#fff;box-shadow:0 4px 8px 0 rgba(34,47,62,.1);color:#222f3e;font-size:20px;font-weight:400;line-height:28px;padding:12px;z-index:1}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions{background-color:#f0f0f0;display:flex;flex:1;flex-direction:column;gap:12px;overflow-y:auto;padding:10px 12px}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions:focus{height:100%;position:relative;z-index:1}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions:focus::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7;content:'';left:0;position:absolute;right:0;top:0;border-radius:6px;bottom:1px;left:1px;right:1px;top:1px}@media (forced-colors:active){.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions:focus::after{border:2px solid highlight}}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card{background-color:#fff;border:1px solid #f0f0f0;border-radius:6px;color:#222f3e;cursor:pointer;display:flex;flex-direction:column;font-size:14px;padding:12px;width:100%}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card:hover{box-shadow:0 4px 8px 0 rgba(34,47,62,.1)}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card:focus{position:relative;z-index:1}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card:focus::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7 #006ce7;content:'';left:0;position:absolute;right:0;top:0;border-radius:6px;box-shadow:0 0 0 2px #006ce7;box-shadow:0 0 0 2px #006ce7!important}@media (forced-colors:active){.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card:focus::after{border:2px solid highlight}}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card.tox-revisionhistory__card--selected{background-color:#fff5cc;box-shadow:0 4px 8px 0 rgba(34,47,62,.1);position:relative}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card.tox-revisionhistory__card--selected::after{border-radius:3px;bottom:0;box-shadow:0 0 0 2px #006ce7 #e3b82a;content:'';left:0;position:absolute;right:0;top:0;border-radius:6px;box-shadow:0 0 0 2px #e3b82a}@media (forced-colors:active){.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card.tox-revisionhistory__card--selected::after{border:2px solid highlight}}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card-tags{display:flex;align-items:flex-start;flex-direction:row;gap:8px;overflow-x:auto}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card-label{display:block;max-width:min-content;padding:4px 8px;margin-bottom:8px;font-size:12px;font-weight:700;border-radius:4px;background:#d3d5d8;text-wrap:balance;flex:0 1 auto}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card-content{display:flex;flex-direction:row;gap:8px;align-items:center}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card-attribution{align-items:center;display:flex}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card-attribution .tox-revisionhistory__avatar{position:relative;z-index:1}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card-attribution .tox-revisionhistory__avatar+.tox-revisionhistory__card-ai-icon{margin-left:-4px}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card-info{display:flex;flex-direction:column;flex:1}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card-date-label{font-size:14px;font-weight:700;line-height:18px}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card-author-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:400}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__avatar{border-radius:50%;height:36px;object-fit:cover;vertical-align:middle;width:36px}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card-ai-icon{display:flex;height:36px;width:36px}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__norevision{color:rgba(34,47,62,.7);font-size:16px;line-height:24px;padding:5px 5.5px}.tox .tox-revisionhistory__sidebar .tox-revisionhistory__revisions .tox-revisionhistory__card-check-icon{color:#222f3e;height:24px}.tox .tox-card{background-color:#fff;border-radius:6px;display:flex;flex-direction:column;gap:12px;padding:10px;cursor:pointer;transition:box-shadow .15s ease-in-out,border .15s ease-in-out;border:2px solid transparent}.tox .tox-card:hover{box-shadow:0 4px 8px 0 rgba(34,47,62,.1)}.tox .tox-card--selected{border-color:#006ce7}.tox .tox-card:focus-visible{outline:2px solid #006ce7;border-color:transparent}.tox .tox-card--has-decision{background-color:#f0f0f0}.tox .tox-card--has-decision:not(.tox-card--selected){border-width:1px;border-color:rgba(34,47,62,.7);padding:11px}.tox .tox-card--has-decision .tox-card__header{font-size:12px}.tox .tox-card--has-decision .tox-card__body{color:rgba(34,47,62,.7)}.tox .tox-card--has-decision .tox-card__actions .tox-button--secondary--outline{border-color:#e0e0e0}.tox .tox-card--has-decision .tox-card__actions .tox-button--secondary--outline:focus:not(:disabled),.tox .tox-card--has-decision .tox-card__actions .tox-button--secondary--outline:hover:not(:disabled){background-color:#e0e0e0;border-color:#d1d1d1}.tox .tox-card--has-decision .tox-card__actions .tox-button--secondary--outline:active:not(:disabled){background-color:#d1d1d1;border-color:#d1d1d1}.tox .tox-card__header{padding-bottom:0;color:#222f3e;font-size:16px;font-weight:700;text-transform:uppercase;display:flex;flex-direction:column;gap:12px}.tox .tox-card__header-label{font-size:12px;font-weight:700;text-transform:uppercase;color:#222f3e}.tox .tox-card__header-content{flex:1;min-width:0;font-weight:400;text-transform:none}.tox .tox-card__header-actions{display:flex;align-items:center;gap:4px;flex-shrink:0;opacity:1;pointer-events:auto;transition:opacity .15s ease-in-out}.tox .tox-card__header-actions--hover-visible,.tox .tox-card__header-actions--on-focus{opacity:0;pointer-events:none}.tox .tox-card__header-actions--always-visible{opacity:1;pointer-events:auto}.tox .tox-card__header:has(.tox-card__header-actions),.tox .tox-card__header:has(.tox-card__header-content){flex-direction:row;align-items:center}.tox .tox-card__header:has(.tox-card__header-content){justify-content:space-between}.tox .tox-card__header:has(.tox-card__header-actions):not(:has(.tox-card__header-content)){justify-content:flex-end}.tox .tox-card:focus-within .tox-card__header-actions--hover-visible,.tox .tox-card:focus-within .tox-card__header-actions--on-focus,.tox .tox-card:hover .tox-card__header-actions--hover-visible{opacity:1;pointer-events:auto}.tox .tox-card__body{color:#222f3e;font-size:14px}.tox .tox-card__body .tox-expandable-box{background:0 0;border:none;gap:12px}.tox .tox-card__body .tox-expandable-box .tox-expandable-box__content,.tox .tox-card__body .tox-expandable-box>.tox-button{margin:0}.tox .tox-card__highlight{padding:4px 6px;border-bottom:2px solid #006ce7}.tox .tox-card__highlight--added{background-color:#e4eeda}.tox .tox-card__highlight--deleted{background-color:#f5cccc}.tox .tox-card__highlight--modified{background-color:#cce2fa}.tox .tox-card__actions{display:flex;gap:8px}.tox .tox-card__actions--space-between{justify-content:space-between}.tox .tox-card__actions--flex-start{justify-content:flex-start}.tox .tox-card__actions .tox-button,.tox .tox-card__actions .tox-button--icon,.tox .tox-card__actions .tox-button:has(.tox-icon:only-child){padding:4px 16px}.tox .tox-card__divider{margin:12px 0;border:none;border-top:1px solid #eee}.tox .tox-card__expansion{display:flex;flex-direction:column;gap:12px;width:100%}.tox .tox-card__expansion:has(> .tox-card__expansion-content--collapsed:only-child){margin-block-start:-12px}.tox .tox-card__expansion-content{display:grid;font-size:14px;grid-template-rows:0fr;transition:grid-template-rows .2s ease-in-out}.tox .tox-card__expansion-content--expanded{grid-template-rows:1fr}.tox .tox-card__expansion-content--expanded>.tox-card__expansion-content-inner{min-height:auto;overflow:visible}.tox .tox-card__expansion-content--collapsed{grid-template-rows:0fr}.tox .tox-card__expansion-content-inner{min-height:0;overflow:hidden;display:flex;flex-direction:column;gap:12px}.tox .tox-card.tox-skeleton{cursor:default;pointer-events:none;box-shadow:none}.tox .tox-card.tox-skeleton:hover{box-shadow:none}.tox .tox-card.tox-skeleton .tox-skeleton__line{border-radius:6px;margin:0}.tox .tox-card.tox-skeleton .tox-card__body{display:flex;flex-direction:column;gap:4px}.tox .tox-card-list{display:flex;flex-direction:column;gap:12px}.tox .tox-card-list:has(.tox-card-group){gap:0}.tox .tox-card-list:focus{outline:0}.tox .tox-card-group{background-color:#f0f0f0;display:flex;flex-direction:column}.tox .tox-card-group .tox-card{scroll-margin-top:53px}.tox .tox-card-group__title{align-items:center;background-color:#fff;border-bottom:1px solid #eee;color:#222f3e;display:flex;font-size:14px;font-weight:700;gap:8px;line-height:16px;overflow:hidden;padding:12px;position:sticky;top:0;z-index:1}.tox .tox-card-group__title-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tox .tox-card-group__status{color:rgba(34,47,62,.7);flex:0 0 auto;font-size:12px;font-weight:400;margin-inline-start:auto}.tox .tox-card-group__content{display:flex;flex-direction:column;gap:12px;padding-block:12px}.tox .tox-profile{align-items:center;display:flex;gap:8px}.tox .tox-profile__image{align-items:center;display:flex;flex-shrink:0}.tox .tox-profile__badge{display:flex;flex-shrink:0;height:36px;margin-inline-start:-4px;width:36px}.tox .tox-profile__badge svg{display:block;height:100%;width:100%}.tox .tox-user-avatar{width:36px;height:36px;border-radius:50%;overflow:hidden;display:flex;align-items:center;justify-content:center}.tox .tox-user-avatar img{width:100%;height:100%;object-fit:cover}.tox .tox-profile__body{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;flex:1}.tox .tox-profile__heading{color:#222f3e;font-size:14px;font-weight:700;line-height:18px;text-transform:none}.tox .tox-profile__subheading{color:#222f3e;font-size:12px;font-weight:400;line-height:16px;padding-block:4px;text-transform:none}.tox .tox-profile__subheading .tox-icon svg{fill:rgba(34,47,62,0.5);margin-block:-4px;vertical-align:top}.tox [data-mce-name=suggestededits] .tox-icon .tox-icon--badge{fill:#006ce7}.tox .tox-view .tox-suggestededits__pane{padding:0}.tox .tox-suggestededits__sink{position:relative;z-index:1000}.tox .tox-suggestededits__sink .tox-tiered-menu .tox-collection--list{position:absolute}.tox .tox-suggestededits__container{height:100%;display:flex;flex-direction:column}.tox .tox-suggestededits__container .tox-suggestededits{background-color:#fff;display:flex;flex:1;height:inherit;overflow-x:auto;overflow-y:hidden;position:relative}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__content{flex:1}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__model{height:100%;position:relative}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__model .tox-suggestededits__iframe{height:100%;width:100%;overflow:scroll;background-color:#fff}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar{background-color:#f0f0f0;border-left:1px solid #e3e3e3;display:flex;flex-direction:column;flex:0 1 auto;min-width:248px;width:441px}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__announcer{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;margin:-1px;padding:0;border:0}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-toolbar{padding:4px 12px}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-toolbar:not(:empty){padding:12px 12px 6px}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-toolbar .tox-button:has(.tox-icon:only-child){gap:0;padding:var(--tox-private-pad-xs,4px) var(--tox-private-pad-md,16px)}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-toolbar .tox-button:has(.tox-icon:only-child) .tox-icon{align-items:center;display:flex;flex:0 0 auto;height:24px;justify-content:center;width:24px}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-toolbar .tox-button--secondary--outline{border-color:#e3e3e3}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-toolbar .tox-button--secondary--outline:focus:not(:disabled),.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-toolbar .tox-button--secondary--outline:hover:not(:disabled){background-color:rgba(34,47,62,.12);border-color:rgba(34,47,62,.12)}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-toolbar .tox-button--secondary--outline.tox-button--enabled:not(:disabled),.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-toolbar .tox-button--secondary--outline:active:not(:disabled){background-color:rgba(34,47,62,.18);border-color:rgba(34,47,62,.18);color:#222f3e}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-toolbar .tox-button--secondary--outline[disabled]{border-color:#e3e3e3}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content{display:flex;flex:1;flex-direction:column;gap:12px;overflow:auto;padding:6px 12px 12px 12px;position:relative;scroll-padding-block:6px 12px}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card.tox-card--selected:has(textarea:focus){border-color:transparent}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-card__divider,.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--divider{background-color:#f0f0f0;height:1px;width:100%}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--editor,.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--single{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;gap:12px}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--editor{padding:6px}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-card__header,.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--header{display:flex;flex:auto;justify-content:space-between;align-items:center;gap:8px;width:100%}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-card__header .tox-suggestededits__card--timestamp,.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--header .tox-suggestededits__card--timestamp{color:#222f3e}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-card__header .tox-suggestededits__card--timestamp .tox-icon svg,.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--header .tox-suggestededits__card--timestamp .tox-icon svg{fill:rgba(34,47,62,0.5)}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-card__header .tox-suggestededits__resolution,.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--header .tox-suggestededits__resolution{align-items:center;border:0;border-radius:20px;color:rgba(34,47,62,.7);height:20px;width:20px;display:flex;flex:0 0 auto;justify-content:center;text-align:center}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-card__header .tox-suggestededits__resolution--button,.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--header .tox-suggestededits__resolution--button{padding:var(--tox-private-button-padding-y,4px) var(--tox-private-button-padding-x,16px)}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-card__header .tox-suggestededits__resolution--button .tox-suggestededits__resolution--label,.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--header .tox-suggestededits__resolution--button .tox-suggestededits__resolution--label{display:none}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-card__header .tox-suggestededits__resolution--button:not(:hover):not(:focus-visible),.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--header .tox-suggestededits__resolution--button:not(:hover):not(:focus-visible){border-color:transparent}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-card__header .tox-suggestededits__resolution--button:focus-visible .tox-suggestededits__resolution,.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-card__header .tox-suggestededits__resolution--button:hover .tox-suggestededits__resolution,.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--header .tox-suggestededits__resolution--button:focus-visible .tox-suggestededits__resolution,.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--header .tox-suggestededits__resolution--button:hover .tox-suggestededits__resolution{display:none}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-card__header .tox-suggestededits__resolution--button:focus-visible .tox-suggestededits__resolution--label,.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-card__header .tox-suggestededits__resolution--button:hover .tox-suggestededits__resolution--label,.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--header .tox-suggestededits__resolution--button:focus-visible .tox-suggestededits__resolution--label,.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--header .tox-suggestededits__resolution--button:hover .tox-suggestededits__resolution--label{display:inline}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-card__body,.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--content{display:flex;flex-direction:column;align-self:stretch;flex:auto;gap:6px;width:100%}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-card__body .tox-suggestededits__operations,.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--content .tox-suggestededits__operations{display:flex;gap:8px}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-card__body .tox-suggestededits__operations .tox-suggestededits__operations-details,.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--content .tox-suggestededits__operations .tox-suggestededits__operations-details{display:flex;flex:1;flex-direction:column;gap:4px;min-width:0}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-card__body .tox-suggestededits__operations .tox-suggestededits__operations-text,.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--content .tox-suggestededits__operations .tox-suggestededits__operations-text{color:#222f3e;font-size:var(--tox-private-font-size-sm, 14px);font-weight:var(--tox-private-font-weight-bold,bold);line-height:18px}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-card__body .tox-suggestededits__operations .tox-suggestededits__operations-content-text,.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--content .tox-suggestededits__operations .tox-suggestededits__operations-content-text{font-size:var(--tox-private-font-size-md, 16px);font-weight:var(--tox-private-font-weight-normal,normal);line-height:20px;overflow-wrap:break-word}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-card__body .tox-suggestededits__operations .tox-suggestededits__operations-content-text-joiner,.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--content .tox-suggestededits__operations .tox-suggestededits__operations-content-text-joiner{font-weight:var(--tox-private-font-weight-bold,bold)}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-card__body .tox-suggestededits__card--feedback,.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--content .tox-suggestededits__card--feedback{color:#222f3e;overflow-wrap:anywhere;width:100%}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-card__actions,.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--buttons{display:flex;align-items:center;gap:8px;width:100%}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-card__actions.tox-suggestededits__card--feedback-buttons,.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card .tox-suggestededits__card--buttons.tox-suggestededits__card--feedback-buttons{justify-content:flex-end}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card.tox-suggestededits__card--active .tox-suggestededits__card--single{border-radius:6px}.tox .tox-suggestededits__container .tox-suggestededits .tox-suggestededits__sidebar-content .tox-suggestededits__card.tox-suggestededits__card--active .tox-suggestededits__card--single:focus-visible{outline:2px solid #006ce7}.tox .tox-dialog-loading::before{background-color:rgba(0,0,0,.5);content:\"\";height:100%;position:absolute;width:100%;z-index:1000}.tox .tox-tab{cursor:pointer}.tox .tox-dialog__content-js{display:flex;flex:1}.tox .tox-dialog__body-content .tox-collection{display:flex;flex:1}`)", "/* This file is bundled with the code from the following third party libraries */\n\n/**\n * http://prismjs.com/\n * Dracula Theme originally by Zeno Rocha [@zenorocha]\n * https://draculatheme.com/\n *\n * Ported for PrismJS by Albert Vallverdu [@byverdu]\n */\ntinymce.Resource.add('ui/oxide/content.css', `@keyframes tox-rotation{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes tox-bouncing-dots{0%,100%,80%{transform:scale(0)}40%{transform:scale(1)}}.tox-tinymceai__annotation--added,.tox-tinymceai__annotation--modified,.tox-tinymceai__annotation--removed{padding-block:calc((1lh - 1.1em)/ 2);-webkit-text-decoration:none;text-decoration:none;background-repeat:no-repeat;text-decoration-thickness:max(1px,0.07em)}.tox-tinymceai__annotation--added__highlight{background-position:bottom;background-image:linear-gradient(rgba(120,171,70,.2) calc(100% - 2px),#78ab46 calc(100% - 2px))}.tox-tinymceai__annotation--added__selected{background-image:none;background-color:rgba(120,171,70,.2);box-shadow:0 2px 0 0 #006ce7,0 -2px 0 0 #006ce7}.tox-tinymceai__annotation--modified__highlight{background-position:bottom;background-image:linear-gradient(rgba(0,108,231,.2) calc(100% - 2px),#006ce7 calc(100% - 2px))}.tox-tinymceai__annotation--modified__selected{background-image:none;background-color:rgba(0,108,231,.2);box-shadow:0 2px 0 0 #006ce7,0 -2px 0 0 #006ce7}.tox-tinymceai__annotation--removed__highlight{-webkit-text-decoration:line-through;text-decoration:line-through;background-position:bottom;background-image:linear-gradient(rgba(204,0,0,.2) calc(100% - 2px),#c00 calc(100% - 2px))}.tox-tinymceai__annotation--removed__selected{-webkit-text-decoration:line-through;text-decoration:line-through;background-image:none;background-color:rgba(204,0,0,.2);box-shadow:0 2px 0 0 #006ce7,0 -2px 0 0 #006ce7}.mce-object.tox-tinymceai__annotation--added,.mce-object.tox-tinymceai__annotation--modified,.mce-object.tox-tinymceai__annotation--removed,.mce-preview-object.tox-tinymceai__annotation--added,.mce-preview-object.tox-tinymceai__annotation--modified,.mce-preview-object.tox-tinymceai__annotation--removed,iframe.tox-tinymceai__annotation--added,iframe.tox-tinymceai__annotation--modified,iframe.tox-tinymceai__annotation--removed,img.tox-tinymceai__annotation--added,img.tox-tinymceai__annotation--modified,img.tox-tinymceai__annotation--removed,video.tox-tinymceai__annotation--added,video.tox-tinymceai__annotation--modified,video.tox-tinymceai__annotation--removed{padding-block:0;vertical-align:top}.tox-tinymceai__annotation--added:has(img,video,iframe,.mce-object,.mce-preview-object),.tox-tinymceai__annotation--modified:has(img,video,iframe,.mce-object,.mce-preview-object),.tox-tinymceai__annotation--removed:has(img,video,iframe,.mce-object,.mce-preview-object){padding-block:0}.tox-tinymceai__annotation--added:has(img,video,iframe,.mce-object,.mce-preview-object) .mce-object,.tox-tinymceai__annotation--added:has(img,video,iframe,.mce-object,.mce-preview-object) .mce-preview-object,.tox-tinymceai__annotation--added:has(img,video,iframe,.mce-object,.mce-preview-object) iframe,.tox-tinymceai__annotation--added:has(img,video,iframe,.mce-object,.mce-preview-object) img,.tox-tinymceai__annotation--added:has(img,video,iframe,.mce-object,.mce-preview-object) video,.tox-tinymceai__annotation--modified:has(img,video,iframe,.mce-object,.mce-preview-object) .mce-object,.tox-tinymceai__annotation--modified:has(img,video,iframe,.mce-object,.mce-preview-object) .mce-preview-object,.tox-tinymceai__annotation--modified:has(img,video,iframe,.mce-object,.mce-preview-object) iframe,.tox-tinymceai__annotation--modified:has(img,video,iframe,.mce-object,.mce-preview-object) img,.tox-tinymceai__annotation--modified:has(img,video,iframe,.mce-object,.mce-preview-object) video,.tox-tinymceai__annotation--removed:has(img,video,iframe,.mce-object,.mce-preview-object) .mce-object,.tox-tinymceai__annotation--removed:has(img,video,iframe,.mce-object,.mce-preview-object) .mce-preview-object,.tox-tinymceai__annotation--removed:has(img,video,iframe,.mce-object,.mce-preview-object) iframe,.tox-tinymceai__annotation--removed:has(img,video,iframe,.mce-object,.mce-preview-object) img,.tox-tinymceai__annotation--removed:has(img,video,iframe,.mce-object,.mce-preview-object) video{vertical-align:top}del.tox-tinymceai__annotation--added__selected,ins.tox-tinymceai__annotation--added__selected{background-color:transparent;box-shadow:none;background-position:center;background-size:100% calc(1lh + 3px);background-image:linear-gradient(#006ce7 3px,rgba(120,171,70,.2) 3px,rgba(120,171,70,.2) calc(100% - 3px),#006ce7 calc(100% - 3px))}del.tox-tinymceai__annotation--modified__selected,ins.tox-tinymceai__annotation--modified__selected{background-color:transparent;box-shadow:none;background-position:center;background-size:100% calc(1lh + 3px);background-image:linear-gradient(#006ce7 3px,rgba(0,108,231,.2) 3px,rgba(0,108,231,.2) calc(100% - 3px),#006ce7 calc(100% - 3px))}del.tox-tinymceai__annotation--removed__selected,ins.tox-tinymceai__annotation--removed__selected{background-color:transparent;box-shadow:none;background-position:center;background-size:100% calc(1lh + 3px);background-image:linear-gradient(#006ce7 3px,rgba(204,0,0,.2) 3px,rgba(204,0,0,.2) calc(100% - 3px),#006ce7 calc(100% - 3px))}.tox-tinymceai__annotation--added.tox-tinymceai__annotation--added__hidden,.tox-tinymceai__annotation--modified.tox-tinymceai__annotation--modified__hidden,.tox-tinymceai__annotation--removed.tox-tinymceai__annotation--removed__hidden{display:none;-webkit-text-decoration:none;text-decoration:none}:has(> div > iframe).tox-tinymceai__annotation--added,:has(> div > iframe).tox-tinymceai__annotation--modified,:has(> div > iframe).tox-tinymceai__annotation--removed{padding:7px;margin:5px}iframe.tox-tinymceai__annotation--added__highlight,img.tox-tinymceai__annotation--added__highlight,video.tox-tinymceai__annotation--added__highlight{background-color:#e4eeda;background-image:none;border:2px solid #78ab46;padding:0;vertical-align:top}iframe.tox-tinymceai__annotation--added__selected,img.tox-tinymceai__annotation--added__selected,video.tox-tinymceai__annotation--added__selected{background-color:#e4eeda;background-image:none;border:2px solid #78ab46;padding:0;vertical-align:top;border-color:#e4eeda;outline:2px solid #006ce7}iframe.tox-tinymceai__annotation--modified__highlight,img.tox-tinymceai__annotation--modified__highlight,video.tox-tinymceai__annotation--modified__highlight{background-color:#cce2fa;background-image:none;border:2px solid #006ce7;padding:0;vertical-align:top}iframe.tox-tinymceai__annotation--modified__selected,img.tox-tinymceai__annotation--modified__selected,video.tox-tinymceai__annotation--modified__selected{background-color:#cce2fa;background-image:none;border:2px solid #006ce7;padding:0;vertical-align:top;border-color:#cce2fa;outline:2px solid #006ce7}iframe.tox-tinymceai__annotation--removed__highlight,img.tox-tinymceai__annotation--removed__highlight,video.tox-tinymceai__annotation--removed__highlight{background-color:#f5cccc;background-image:none;border:2px solid #c00;padding:0;vertical-align:top}iframe.tox-tinymceai__annotation--removed__selected,img.tox-tinymceai__annotation--removed__selected,video.tox-tinymceai__annotation--removed__selected{background-color:#f5cccc;background-image:none;border:2px solid #c00;padding:0;vertical-align:top;border-color:#f5cccc;outline:2px solid #006ce7}.tox-tinymceai__annotation--removed__highlight iframe,.tox-tinymceai__annotation--removed__highlight img,.tox-tinymceai__annotation--removed__highlight video,.tox-tinymceai__annotation--removed__selected iframe,.tox-tinymceai__annotation--removed__selected img,.tox-tinymceai__annotation--removed__selected video{background-color:#f5cccc;background-image:none;border:2px solid #c00;padding:0;vertical-align:top}.tox-tinymceai__annotation--removed__selected iframe,.tox-tinymceai__annotation--removed__selected img,.tox-tinymceai__annotation--removed__selected video{border-color:#f5cccc;outline:2px solid #006ce7}div.tox-tinymceai__annotation:has(> hr){background-size:auto;padding:.25em}div.tox-tinymceai__annotation--removed__highlight>hr{border-color:rgba(0,0,0,.2)}div.tox-tinymceai__annotation--added__highlight>hr{border-color:rgba(0,0,0,.2)}.tox-tinymceai__deleted-media-overlay{inset:0;overflow:hidden;pointer-events:none;position:absolute;z-index:11}.tox-tinymceai__deleted-media-wash{fill:#fff;fill-opacity:0.4}.tox-tinymceai__deleted-media-mark{stroke:#c00}.tox-tinymceai__deleted-media-halo{stroke:#fff}.mce-pagebreak.tox-tinymceai__annotation--added__selected,.mce-pagebreak.tox-tinymceai__annotation--modified__selected,.mce-pagebreak.tox-tinymceai__annotation--removed__selected{border:1px dashed #aaa;box-shadow:none;background-image:none}.mce-pagebreak.tox-tinymceai__annotation--added__highlight,.mce-pagebreak.tox-tinymceai__annotation--modified__highlight,.mce-pagebreak.tox-tinymceai__annotation--removed__highlight{padding:0}.tox-tinymceai__diff-focus-overlay{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:10}.tox-tinymceai__diff-focus-overlay-dim{fill:rgba(34,47,62,0.2)}.tox-tinymceai__annotation{display:revert}.tox-tinymceai-preview{display:block}.tox-tinymceai__annotation--added__highlight,.tox-tinymceai__annotation--modified__highlight,.tox-tinymceai__annotation--removed__highlight{cursor:pointer}.tox-tinymceai__annotation--added.tox-tinymceai__annotation--preview-highlight,.tox-tinymceai__annotation--modified.tox-tinymceai__annotation--preview-highlight{background-position:bottom;background-image:linear-gradient(transparent calc(100% - 2px),#006ce7 calc(100% - 2px))}iframe.tox-tinymceai__annotation--added.tox-tinymceai__annotation--preview-highlight,img.tox-tinymceai__annotation--added.tox-tinymceai__annotation--preview-highlight,video.tox-tinymceai__annotation--added.tox-tinymceai__annotation--preview-highlight{background-color:#e4eeda;background-image:none;border:2px solid #78ab46;padding:0;vertical-align:top}iframe.tox-tinymceai__annotation--modified.tox-tinymceai__annotation--preview-highlight,img.tox-tinymceai__annotation--modified.tox-tinymceai__annotation--preview-highlight,video.tox-tinymceai__annotation--modified.tox-tinymceai__annotation--preview-highlight{background-color:#cce2fa;background-image:none;border:2px solid #006ce7;padding:0;vertical-align:top}body.tox-tinymceai-preview--selectable .tox-tinymceai__annotation--added.tox-tinymceai__annotation--preview-highlight,body.tox-tinymceai-preview--selectable .tox-tinymceai__annotation--modified.tox-tinymceai__annotation--preview-highlight{cursor:pointer}body.tox-tinymceai-preview--selectable .tox-tinymceai__annotation--preview-highlight.tox-tinymceai__annotation--added__selected,body.tox-tinymceai-preview--selectable .tox-tinymceai__annotation--preview-highlight.tox-tinymceai__annotation--modified__selected{background-image:none;background-color:rgba(0,108,231,.2);box-shadow:0 2px 0 0 #006ce7,0 -2px 0 0 #006ce7}body.tox-tinymceai-preview--selectable .tox-tinymceai__annotation--preview-highlight.tox-tinymceai__annotation--removed__selected{display:revert;-webkit-text-decoration:line-through;text-decoration:line-through;background-image:none;background-color:rgba(204,0,0,.2);box-shadow:0 2px 0 0 #006ce7,0 -2px 0 0 #006ce7}body.tox-tinymceai-preview--selectable .tox-tinymceai__annotation--preview-highlight.tox-tinymceai__annotation--removed__selected iframe,body.tox-tinymceai-preview--selectable .tox-tinymceai__annotation--preview-highlight.tox-tinymceai__annotation--removed__selected img,body.tox-tinymceai-preview--selectable .tox-tinymceai__annotation--preview-highlight.tox-tinymceai__annotation--removed__selected video{background-color:#f5cccc;background-image:none;border:2px solid #c00;padding:0;vertical-align:top;border-color:#f5cccc;outline:2px solid #006ce7}body.tox-tinymceai-preview--selectable del.tox-tinymceai__annotation--preview-highlight.tox-tinymceai__annotation--added__selected,body.tox-tinymceai-preview--selectable del.tox-tinymceai__annotation--preview-highlight.tox-tinymceai__annotation--modified__selected,body.tox-tinymceai-preview--selectable ins.tox-tinymceai__annotation--preview-highlight.tox-tinymceai__annotation--added__selected,body.tox-tinymceai-preview--selectable ins.tox-tinymceai__annotation--preview-highlight.tox-tinymceai__annotation--modified__selected{background-color:transparent;box-shadow:none;background-position:center;background-size:100% calc(1lh + 3px);background-image:linear-gradient(#006ce7 3px,rgba(0,108,231,.2) 3px,rgba(0,108,231,.2) calc(100% - 3px),#006ce7 calc(100% - 3px))}body.tox-tinymceai-preview--selectable del.tox-tinymceai__annotation--preview-highlight.tox-tinymceai__annotation--removed__selected,body.tox-tinymceai-preview--selectable ins.tox-tinymceai__annotation--preview-highlight.tox-tinymceai__annotation--removed__selected{background-color:transparent;box-shadow:none;background-position:center;background-size:100% calc(1lh + 3px);background-image:linear-gradient(#c00 3px,rgba(204,0,0,.2) 3px,rgba(204,0,0,.2) calc(100% - 3px),#c00 calc(100% - 3px))}body.tox-tinymceai-preview--selectable iframe.tox-tinymceai__annotation--preview-highlight.tox-tinymceai__annotation--added__selected,body.tox-tinymceai-preview--selectable img.tox-tinymceai__annotation--preview-highlight.tox-tinymceai__annotation--added__selected,body.tox-tinymceai-preview--selectable video.tox-tinymceai__annotation--preview-highlight.tox-tinymceai__annotation--added__selected{background-color:#e4eeda;background-image:none;border:2px solid #78ab46;padding:0;vertical-align:top;border-color:#e4eeda;outline:2px solid #006ce7}body.tox-tinymceai-preview--selectable iframe.tox-tinymceai__annotation--preview-highlight.tox-tinymceai__annotation--modified__selected,body.tox-tinymceai-preview--selectable img.tox-tinymceai__annotation--preview-highlight.tox-tinymceai__annotation--modified__selected,body.tox-tinymceai-preview--selectable video.tox-tinymceai__annotation--preview-highlight.tox-tinymceai__annotation--modified__selected{background-color:#cce2fa;background-image:none;border:2px solid #006ce7;padding:0;vertical-align:top;border-color:#cce2fa;outline:2px solid #006ce7}body.tox-tinymceai-preview--selectable iframe.tox-tinymceai__annotation--preview-highlight.tox-tinymceai__annotation--removed__selected,body.tox-tinymceai-preview--selectable img.tox-tinymceai__annotation--preview-highlight.tox-tinymceai__annotation--removed__selected,body.tox-tinymceai-preview--selectable video.tox-tinymceai__annotation--preview-highlight.tox-tinymceai__annotation--removed__selected{background-color:#f5cccc;background-image:none;border:2px solid #c00;padding:0;vertical-align:top;border-color:#f5cccc;display:inline-block;outline:2px solid #006ce7}.tox-tinymceai__annotation--preview-highlight.tox-tinymceai__annotation--added__selected,.tox-tinymceai__annotation--preview-highlight.tox-tinymceai__annotation--modified__selected,.tox-tinymceai__annotation--preview-highlight.tox-tinymceai__annotation--removed__selected{background-color:transparent;box-shadow:none;border:0}.tox-tinymceai{display:contents}.mce-content-body .mce-item-anchor{background:transparent url(\"data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'8'%20height%3D'12'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'M0%200L8%200%208%2012%204.09117821%209%200%2012z'%2F%3E%3C%2Fsvg%3E%0A\") no-repeat center}.mce-content-body .mce-item-anchor:empty{cursor:default;display:inline-block;height:12px!important;padding:0 2px;-webkit-user-modify:read-only;-moz-user-modify:read-only;-webkit-user-select:all;user-select:all;width:8px!important}.mce-content-body .mce-item-anchor:not(:empty){background-position-x:2px;display:inline-block;padding-left:12px}.mce-content-body .mce-item-anchor[data-mce-selected]{outline-offset:1px}.tox-comments-visible .tox-comment[contenteditable=false]:not([data-mce-selected]),.tox-comments-visible span.tox-comment img:not([data-mce-selected]),.tox-comments-visible span.tox-comment span.mce-preview-object:not([data-mce-selected]),.tox-comments-visible span.tox-comment>audio:not([data-mce-selected]),.tox-comments-visible span.tox-comment>video:not([data-mce-selected]){outline:3px solid #ffe796}.tox-comments-visible .tox-comment[contenteditable=false][data-mce-annotation-active=true]:not([data-mce-selected]){outline:3px solid #ffcf30}.tox-comments-visible span.tox-comment:not([data-mce-selected]){background-color:#ffe796;outline:0}.tox-comments-visible span.tox-comment[data-mce-annotation-active=true]:not([data-mce-selected=inline-boundary]){background-color:#ffcf30}.tox-comments-visible span.tox-comment[data-mce-selected]{background-color:#ffcf30;border-radius:3px;box-shadow:0 0 0 2px #006ce7}.tox-comments-visible span.tox-comment[data-mce-selected]:has(img[data-mce-selected],> audio[data-mce-selected],> video[data-mce-selected],span.mce-preview-object[data-mce-selected]){box-shadow:none}.tox-comments-visible span.tox-comment[data-mce-selected] img:not([data-mce-selected]),.tox-comments-visible span.tox-comment[data-mce-selected] span.mce-preview-object:not([data-mce-selected]),.tox-comments-visible span.tox-comment[data-mce-selected]>audio:not([data-mce-selected]),.tox-comments-visible span.tox-comment[data-mce-selected]>video:not([data-mce-selected]){box-shadow:0 0 0 5px #006ce7}.tox-comments-visible span.tox-comment[data-mce-annotation-active=true] img:not([data-mce-selected]),.tox-comments-visible span.tox-comment[data-mce-annotation-active=true] span.mce-preview-object:not([data-mce-selected]),.tox-comments-visible span.tox-comment[data-mce-annotation-active=true]>audio:not([data-mce-selected]),.tox-comments-visible span.tox-comment[data-mce-annotation-active=true]>video:not([data-mce-selected]){outline:3px solid #ffcf30}.tox-checklist>li:not(.tox-checklist--hidden){list-style:none;margin:.25em 0}.tox-checklist>li:not(.tox-checklist--hidden)::before{content:url(\"data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-unchecked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2215%22%20height%3D%2215%22%20x%3D%22.5%22%20y%3D%22.5%22%20fill-rule%3D%22nonzero%22%20stroke%3D%22%234C4C4C%22%20rx%3D%222%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A\");cursor:pointer;height:1em;margin-left:-1.5em;margin-top:.125em;position:absolute;width:1em}.tox-checklist li:not(.tox-checklist--hidden).tox-checklist--checked::before{content:url(\"data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%3E%3Cg%20id%3D%22checklist-checked%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Crect%20id%3D%22Rectangle%22%20width%3D%2216%22%20height%3D%2216%22%20fill%3D%22%234099FF%22%20fill-rule%3D%22nonzero%22%20rx%3D%222%22%2F%3E%3Cpath%20id%3D%22Path%22%20fill%3D%22%23FFF%22%20fill-rule%3D%22nonzero%22%20d%3D%22M11.5703186%2C3.14417309%20C11.8516238%2C2.73724603%2012.4164781%2C2.62829933%2012.83558%2C2.89774797%20C13.260121%2C3.17069355%2013.3759736%2C3.72932262%2013.0909105%2C4.14168582%20L7.7580587%2C11.8560195%20C7.43776896%2C12.3193404%206.76483983%2C12.3852142%206.35607322%2C11.9948725%20L3.02491697%2C8.8138662%20C2.66090143%2C8.46625845%202.65798871%2C7.89594698%203.01850234%2C7.54483354%20C3.373942%2C7.19866177%203.94940006%2C7.19592841%204.30829608%2C7.5386474%20L6.85276923%2C9.9684299%20L11.5703186%2C3.14417309%20Z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%0A\")}[dir=rtl] .tox-checklist>li:not(.tox-checklist--hidden)::before{margin-left:0;margin-right:-1.5em}code[class*=language-],pre[class*=language-]{color:#000;background:0 0;text-shadow:0 1px #fff;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;tab-size:4;hyphens:none}code[class*=language-] ::selection,code[class*=language-]::selection,pre[class*=language-] ::selection,pre[class*=language-]::selection{text-shadow:none;background:#b3d4fc}@media print{code[class*=language-],pre[class*=language-]{text-shadow:none}}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#f5f2f0}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#708090}.token.punctuation{color:#999}.token.namespace{opacity:.7}.token.boolean,.token.constant,.token.deleted,.token.number,.token.property,.token.symbol,.token.tag{color:#905}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color:#690}.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url{color:#9a6e3a;background:hsla(0,0%,100%,.5)}.token.atrule,.token.attr-value,.token.keyword{color:#07a}.token.class-name,.token.function{color:#dd4a68}.token.important,.token.regex,.token.variable{color:#e90}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}.mce-content-body{overflow-wrap:break-word;word-wrap:break-word}.mce-content-body .mce-visual-caret{background-color:#000;background-color:currentColor;position:absolute}.mce-content-body .mce-visual-caret-hidden{display:none}.mce-content-body [data-mce-caret]{left:-1000px;margin:0;padding:0;position:absolute;right:auto;top:0}.mce-content-body .mce-offscreen-selection{left:-2000000px;max-width:1000000px;position:absolute}.mce-content-body [contentEditable=false]{cursor:default}.mce-content-body [contentEditable=true]{cursor:text}.tox-cursor-format-painter{cursor:url(\"data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%0A%20%20%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M15%2C6%20C15%2C5.45%2014.55%2C5%2014%2C5%20L6%2C5%20C5.45%2C5%205%2C5.45%205%2C6%20L5%2C10%20C5%2C10.55%205.45%2C11%206%2C11%20L14%2C11%20C14.55%2C11%2015%2C10.55%2015%2C10%20L15%2C9%20L16%2C9%20L16%2C12%20L9%2C12%20L9%2C19%20C9%2C19.55%209.45%2C20%2010%2C20%20L11%2C20%20C11.55%2C20%2012%2C19.55%2012%2C19%20L12%2C14%20L18%2C14%20L18%2C7%20L15%2C7%20L15%2C6%20Z%22%2F%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M1%2C1%20L8.25%2C1%20C8.66421356%2C1%209%2C1.33578644%209%2C1.75%20L9%2C1.75%20C9%2C2.16421356%208.66421356%2C2.5%208.25%2C2.5%20L2.5%2C2.5%20L2.5%2C8.25%20C2.5%2C8.66421356%202.16421356%2C9%201.75%2C9%20L1.75%2C9%20C1.33578644%2C9%201%2C8.66421356%201%2C8.25%20L1%2C1%20Z%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A\"),default}div.mce-footnotes hr{margin-inline:0 auto;width:25%}div.mce-footnotes li>a.mce-footnotes-backlink{-webkit-text-decoration:none;text-decoration:none}@media print{sup.mce-footnote a{color:#000;-webkit-text-decoration:none;text-decoration:none}div.mce-footnotes{page-break-inside:avoid;break-inside:avoid;width:100%}div.mce-footnotes li>a.mce-footnotes-backlink{display:none}}tiny-math-block{display:flex;justify-content:center;margin:16px 0 16px 0}tiny-math-inline{display:inline-block}.mce-content-body figure.align-left{float:left}.mce-content-body figure.align-right{float:right}.mce-content-body figure.image.align-center{display:table;margin-left:auto;margin-right:auto}.mce-preview-object{border:1px solid gray;display:inline-block;line-height:0;margin:0 2px;position:relative}.mce-preview-object .mce-shim{background:url(\"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\");height:100%;left:0;position:absolute;top:0;width:100%}.mce-preview-object[data-mce-selected=\"2\"] .mce-shim{display:none}.mce-content-body .mce-mergetag{cursor:default!important;-webkit-user-select:none;user-select:none}.mce-content-body .mce-mergetag:hover{background-color:rgba(0,108,231,.1)}.mce-content-body .mce-mergetag-affix{background-color:rgba(0,108,231,.1);color:#006ce7}.mce-object{background:transparent url(\"data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M4%203h16a1%201%200%200%201%201%201v16a1%201%200%200%201-1%201H4a1%201%200%200%201-1-1V4a1%201%200%200%201%201-1zm1%202v14h14V5H5zm4.79%202.565l5.64%204.028a.5.5%200%200%201%200%20.814l-5.64%204.028a.5.5%200%200%201-.79-.407V7.972a.5.5%200%200%201%20.79-.407z%22%2F%3E%3C%2Fsvg%3E%0A\") no-repeat center;border:1px dashed #aaa}.mce-pagebreak{border:1px dashed #aaa;cursor:default;display:block;height:5px;margin-top:15px;page-break-before:always;width:100%}@media print{.mce-pagebreak{border:0}}.tiny-pageembed .mce-shim{background:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);height:100%;left:0;position:absolute;top:0;width:100%}.tiny-pageembed[data-mce-selected=\"2\"] .mce-shim{display:none}.tiny-pageembed{display:inline-block;position:relative}.tiny-pageembed--16by9,.tiny-pageembed--1by1,.tiny-pageembed--21by9,.tiny-pageembed--4by3{display:block;overflow:hidden;padding:0;position:relative;width:100%}.tiny-pageembed--21by9{padding-top:42.857143%}.tiny-pageembed--16by9{padding-top:56.25%}.tiny-pageembed--4by3{padding-top:75%}.tiny-pageembed--1by1{padding-top:100%}.tiny-pageembed--16by9 iframe,.tiny-pageembed--1by1 iframe,.tiny-pageembed--21by9 iframe,.tiny-pageembed--4by3 iframe{border:0;height:100%;left:0;position:absolute;top:0;width:100%}.mce-content-body[data-mce-placeholder]{position:relative}.mce-content-body[data-mce-placeholder]:not(.mce-visualblocks)::before{color:rgba(34,47,62,.7);content:attr(data-mce-placeholder);position:absolute}@media (forced-colors:active){.mce-content-body[data-mce-placeholder]:not(.mce-visualblocks)::before{color:highlight;filter:brightness(30%);z-index:-1}}.mce-content-body:not([dir=rtl])[data-mce-placeholder]:not(.mce-visualblocks)::before{left:1px}.mce-content-body[dir=rtl][data-mce-placeholder]:not(.mce-visualblocks)::before{right:1px}@media print{.mce-content-body .mce-placeholder,.mce-content-body [data-mce-bogus=all]{display:none!important}.mce-content-body [data-mce-bogus]:not([data-mce-bogus=all]){display:contents!important}.mce-content-body .mce-visual-caret{display:none!important}.mce-content-body .mce-edit-focus,.mce-content-body :focus,.mce-content-body [data-mce-selected]{outline:0!important}}.mce-content-body div.mce-resizehandle{background-color:#4099ff;border-color:#4099ff;border-style:solid;border-width:1px;box-sizing:border-box;height:10px;position:absolute;width:10px;z-index:1298}.mce-content-body div.mce-resizehandle:hover{background-color:#4099ff}.mce-content-body div.mce-resizehandle:first-of-type{cursor:nwse-resize}.mce-content-body div.mce-resizehandle:nth-of-type(2){cursor:nesw-resize}.mce-content-body div.mce-resizehandle:nth-of-type(3){cursor:nwse-resize}.mce-content-body div.mce-resizehandle:nth-of-type(4){cursor:nesw-resize}.mce-content-body .mce-resize-backdrop{z-index:10000}.mce-content-body .mce-clonedresizable{cursor:default;opacity:.5;outline:1px dashed black;position:absolute;z-index:10001}.mce-content-body .mce-clonedresizable.mce-resizetable-columns td,.mce-content-body .mce-clonedresizable.mce-resizetable-columns th{border:0}.mce-content-body .mce-resize-helper{background:#555;background:rgba(0 0 0 / 75%);border:1px;border-radius:3px;color:#fff;display:none;font-family:sans-serif;font-size:12px;line-height:14px;margin:5px 10px;padding:5px;position:absolute;white-space:nowrap;z-index:10002}.tox-rtc-user-selection{position:relative}.tox-rtc-user-cursor{bottom:0;cursor:default;position:absolute;top:0;width:2px}.tox-rtc-user-cursor::before{background-color:inherit;border-radius:50%;content:'';display:block;height:8px;position:absolute;right:-3px;top:-3px;width:8px}.tox-rtc-user-cursor:hover::after{background-color:inherit;border-radius:100px;box-sizing:border-box;color:#fff;content:attr(data-user);display:block;font-size:12px;font-weight:700;left:-5px;min-height:8px;min-width:8px;padding:0 12px;position:absolute;top:-11px;white-space:nowrap;z-index:1000}.tox-rtc-user-selection--1 .tox-rtc-user-cursor{background-color:#2dc26b}.tox-rtc-user-selection--2 .tox-rtc-user-cursor{background-color:#e03e2d}.tox-rtc-user-selection--3 .tox-rtc-user-cursor{background-color:#f1c40f}.tox-rtc-user-selection--4 .tox-rtc-user-cursor{background-color:#3598db}.tox-rtc-user-selection--5 .tox-rtc-user-cursor{background-color:#b96ad9}.tox-rtc-user-selection--6 .tox-rtc-user-cursor{background-color:#e67e23}.tox-rtc-user-selection--7 .tox-rtc-user-cursor{background-color:#aaa69d}.tox-rtc-user-selection--8 .tox-rtc-user-cursor{background-color:#f368e0}.tox-rtc-remote-image{background:#eaeaea url(\"data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2236%22%20height%3D%2212%22%20viewBox%3D%220%200%2036%2012%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%3Ccircle%20cx%3D%226%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%20%20%3Ccircle%20cx%3D%2218%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20begin%3D%22.33s%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%20%20%3Ccircle%20cx%3D%2230%22%20cy%3D%226%22%20r%3D%223%22%20fill%3D%22rgba(0%2C%200%2C%200%2C%20.2)%22%3E%0A%20%20%20%20%3Canimate%20attributeName%3D%22r%22%20values%3D%223%3B5%3B3%22%20calcMode%3D%22linear%22%20begin%3D%22.66s%22%20dur%3D%221s%22%20repeatCount%3D%22indefinite%22%20%2F%3E%0A%20%20%3C%2Fcircle%3E%0A%3C%2Fsvg%3E%0A\") no-repeat center center;border:1px solid #ccc;min-height:240px;min-width:320px}.mce-match-marker{background:#aaa;color:#fff}.mce-match-marker-selected{background:#39f;color:#fff}.mce-match-marker-selected::selection{background:#39f;color:#fff}.mce-content-body audio[data-mce-selected],.mce-content-body details[data-mce-selected],.mce-content-body embed[data-mce-selected],.mce-content-body img[data-mce-selected],.mce-content-body object[data-mce-selected],.mce-content-body table[data-mce-selected],.mce-content-body video[data-mce-selected]{outline:3px solid #b4d7ff}.mce-content-body hr[data-mce-selected]{outline:3px solid #b4d7ff;outline-offset:1px}.mce-content-body [contentEditable=false] [contentEditable=true]:focus{outline:3px solid #b4d7ff}.mce-content-body [contentEditable=false] [contentEditable=true]:hover{outline:3px solid #b4d7ff}.mce-content-body [contentEditable=false][data-mce-selected]{cursor:not-allowed;outline:3px solid #b4d7ff}.mce-content-body [data-mce-selected=inline-boundary]{background-color:#b4d7ff}.mce-content-body .mce-edit-focus{outline:3px solid #b4d7ff}.mce-content-body td[data-mce-selected],.mce-content-body th[data-mce-selected]{position:relative}.mce-content-body td[data-mce-selected]::selection,.mce-content-body th[data-mce-selected]::selection{background:0 0}.mce-content-body td[data-mce-selected] *,.mce-content-body th[data-mce-selected] *{outline:0;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.mce-content-body td[data-mce-selected]::after,.mce-content-body th[data-mce-selected]::after{background-color:rgba(180,215,255,.7);border:1px solid rgba(180,215,255,.7);bottom:-1px;content:'';left:-1px;mix-blend-mode:multiply;position:absolute;right:-1px;top:-1px}.mce-content-body img[data-mce-selected]::selection{background:0 0}.ephox-snooker-resizer-bar{background-color:#b4d7ff;opacity:0;-webkit-user-select:none;user-select:none}.ephox-snooker-resizer-cols{cursor:col-resize}.ephox-snooker-resizer-rows{cursor:row-resize}.ephox-snooker-resizer-bar.ephox-snooker-resizer-bar-dragging{opacity:1}.mce-spellchecker-word{background-image:url(\"data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%23ff0000'%20fill%3D'none'%20stroke-linecap%3D'round'%20stroke-opacity%3D'.75'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A\");background-position:0 calc(100% + 1px);background-repeat:repeat-x;background-size:auto 6px;cursor:default;height:2rem}.mce-spellchecker-grammar{background-image:url(\"data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D'4'%20height%3D'4'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20stroke%3D'%2300A835'%20fill%3D'none'%20stroke-linecap%3D'round'%20d%3D'M0%203L2%201%204%203'%2F%3E%3C%2Fsvg%3E%0A\");background-position:0 calc(100% + 1px);background-repeat:repeat-x;background-size:auto 6px;cursor:default}.tox-suggestededits__annotation--added,.tox-suggestededits__annotation--modified,.tox-suggestededits__annotation--removed{padding-block:calc((1lh - 1.1em)/ 2);-webkit-text-decoration:none;text-decoration:none;background-repeat:no-repeat;text-decoration-thickness:max(1px,0.07em)}.tox-suggestededits__annotation--added__highlight{background-position:bottom;background-image:linear-gradient(rgba(120,171,70,.2) calc(100% - 2px),#78ab46 calc(100% - 2px))}.tox-suggestededits__annotation--added__selected{background-image:none;background-color:rgba(120,171,70,.2);box-shadow:0 2px 0 0 #006ce7,0 -2px 0 0 #006ce7}.tox-suggestededits__annotation--modified__highlight{background-position:bottom;background-image:linear-gradient(rgba(0,108,231,.2) calc(100% - 2px),#006ce7 calc(100% - 2px))}.tox-suggestededits__annotation--modified__selected{background-image:none;background-color:rgba(0,108,231,.2);box-shadow:0 2px 0 0 #006ce7,0 -2px 0 0 #006ce7}.tox-suggestededits__annotation--removed__highlight{-webkit-text-decoration:line-through;text-decoration:line-through;background-position:bottom;background-image:linear-gradient(rgba(204,0,0,.2) calc(100% - 2px),#c00 calc(100% - 2px))}.tox-suggestededits__annotation--removed__selected{-webkit-text-decoration:line-through;text-decoration:line-through;background-image:none;background-color:rgba(204,0,0,.2);box-shadow:0 2px 0 0 #006ce7,0 -2px 0 0 #006ce7}.mce-object.tox-suggestededits__annotation--added,.mce-object.tox-suggestededits__annotation--modified,.mce-object.tox-suggestededits__annotation--removed,.mce-preview-object.tox-suggestededits__annotation--added,.mce-preview-object.tox-suggestededits__annotation--modified,.mce-preview-object.tox-suggestededits__annotation--removed,iframe.tox-suggestededits__annotation--added,iframe.tox-suggestededits__annotation--modified,iframe.tox-suggestededits__annotation--removed,img.tox-suggestededits__annotation--added,img.tox-suggestededits__annotation--modified,img.tox-suggestededits__annotation--removed,video.tox-suggestededits__annotation--added,video.tox-suggestededits__annotation--modified,video.tox-suggestededits__annotation--removed{padding-block:0;vertical-align:top}.tox-suggestededits__annotation--added:has(img,video,iframe,.mce-object,.mce-preview-object),.tox-suggestededits__annotation--modified:has(img,video,iframe,.mce-object,.mce-preview-object),.tox-suggestededits__annotation--removed:has(img,video,iframe,.mce-object,.mce-preview-object){padding-block:0}.tox-suggestededits__annotation--added:has(img,video,iframe,.mce-object,.mce-preview-object) .mce-object,.tox-suggestededits__annotation--added:has(img,video,iframe,.mce-object,.mce-preview-object) .mce-preview-object,.tox-suggestededits__annotation--added:has(img,video,iframe,.mce-object,.mce-preview-object) iframe,.tox-suggestededits__annotation--added:has(img,video,iframe,.mce-object,.mce-preview-object) img,.tox-suggestededits__annotation--added:has(img,video,iframe,.mce-object,.mce-preview-object) video,.tox-suggestededits__annotation--modified:has(img,video,iframe,.mce-object,.mce-preview-object) .mce-object,.tox-suggestededits__annotation--modified:has(img,video,iframe,.mce-object,.mce-preview-object) .mce-preview-object,.tox-suggestededits__annotation--modified:has(img,video,iframe,.mce-object,.mce-preview-object) iframe,.tox-suggestededits__annotation--modified:has(img,video,iframe,.mce-object,.mce-preview-object) img,.tox-suggestededits__annotation--modified:has(img,video,iframe,.mce-object,.mce-preview-object) video,.tox-suggestededits__annotation--removed:has(img,video,iframe,.mce-object,.mce-preview-object) .mce-object,.tox-suggestededits__annotation--removed:has(img,video,iframe,.mce-object,.mce-preview-object) .mce-preview-object,.tox-suggestededits__annotation--removed:has(img,video,iframe,.mce-object,.mce-preview-object) iframe,.tox-suggestededits__annotation--removed:has(img,video,iframe,.mce-object,.mce-preview-object) img,.tox-suggestededits__annotation--removed:has(img,video,iframe,.mce-object,.mce-preview-object) video{vertical-align:top}del.tox-suggestededits__annotation--added__selected,ins.tox-suggestededits__annotation--added__selected{background-color:transparent;box-shadow:none;background-position:center;background-size:100% calc(1lh + 3px);background-image:linear-gradient(#006ce7 3px,rgba(120,171,70,.2) 3px,rgba(120,171,70,.2) calc(100% - 3px),#006ce7 calc(100% - 3px))}del.tox-suggestededits__annotation--modified__selected,ins.tox-suggestededits__annotation--modified__selected{background-color:transparent;box-shadow:none;background-position:center;background-size:100% calc(1lh + 3px);background-image:linear-gradient(#006ce7 3px,rgba(0,108,231,.2) 3px,rgba(0,108,231,.2) calc(100% - 3px),#006ce7 calc(100% - 3px))}del.tox-suggestededits__annotation--removed__selected,ins.tox-suggestededits__annotation--removed__selected{background-color:transparent;box-shadow:none;background-position:center;background-size:100% calc(1lh + 3px);background-image:linear-gradient(#006ce7 3px,rgba(204,0,0,.2) 3px,rgba(204,0,0,.2) calc(100% - 3px),#006ce7 calc(100% - 3px))}.tox-suggestededits__annotation--added.tox-suggestededits__annotation--added__hidden,.tox-suggestededits__annotation--modified.tox-suggestededits__annotation--modified__hidden,.tox-suggestededits__annotation--removed.tox-suggestededits__annotation--removed__hidden{display:none;-webkit-text-decoration:none;text-decoration:none}:has(> div > iframe).tox-suggestededits__annotation--added,:has(> div > iframe).tox-suggestededits__annotation--modified,:has(> div > iframe).tox-suggestededits__annotation--removed{padding:7px;margin:5px}iframe.tox-suggestededits__annotation--added__highlight,img.tox-suggestededits__annotation--added__highlight,video.tox-suggestededits__annotation--added__highlight{background-color:#e4eeda;background-image:none;border:2px solid #78ab46;padding:0;vertical-align:top}iframe.tox-suggestededits__annotation--added__selected,img.tox-suggestededits__annotation--added__selected,video.tox-suggestededits__annotation--added__selected{background-color:#e4eeda;background-image:none;border:2px solid #78ab46;padding:0;vertical-align:top;border-color:#e4eeda;outline:2px solid #006ce7}iframe.tox-suggestededits__annotation--modified__highlight,img.tox-suggestededits__annotation--modified__highlight,video.tox-suggestededits__annotation--modified__highlight{background-color:#cce2fa;background-image:none;border:2px solid #006ce7;padding:0;vertical-align:top}iframe.tox-suggestededits__annotation--modified__selected,img.tox-suggestededits__annotation--modified__selected,video.tox-suggestededits__annotation--modified__selected{background-color:#cce2fa;background-image:none;border:2px solid #006ce7;padding:0;vertical-align:top;border-color:#cce2fa;outline:2px solid #006ce7}iframe.tox-suggestededits__annotation--removed__highlight,img.tox-suggestededits__annotation--removed__highlight,video.tox-suggestededits__annotation--removed__highlight{background-color:#f5cccc;background-image:none;border:2px solid #c00;padding:0;vertical-align:top}iframe.tox-suggestededits__annotation--removed__selected,img.tox-suggestededits__annotation--removed__selected,video.tox-suggestededits__annotation--removed__selected{background-color:#f5cccc;background-image:none;border:2px solid #c00;padding:0;vertical-align:top;border-color:#f5cccc;outline:2px solid #006ce7}.tox-suggestededits__annotation--removed__highlight iframe,.tox-suggestededits__annotation--removed__highlight img,.tox-suggestededits__annotation--removed__highlight video,.tox-suggestededits__annotation--removed__selected iframe,.tox-suggestededits__annotation--removed__selected img,.tox-suggestededits__annotation--removed__selected video{background-color:#f5cccc;background-image:none;border:2px solid #c00;padding:0;vertical-align:top}.tox-suggestededits__annotation--removed__selected iframe,.tox-suggestededits__annotation--removed__selected img,.tox-suggestededits__annotation--removed__selected video{border-color:#f5cccc;outline:2px solid #006ce7}div.tox-suggestededits__annotation:has(> hr){background-size:auto;padding:.25em}div.tox-suggestededits__annotation--removed__highlight>hr{border-color:rgba(0,0,0,.2)}div.tox-suggestededits__annotation--added__highlight>hr{border-color:rgba(0,0,0,.2)}.tox-suggestededits__deleted-media-overlay{inset:0;overflow:hidden;pointer-events:none;position:absolute;z-index:11}.tox-suggestededits__deleted-media-wash{fill:#fff;fill-opacity:0.4}.tox-suggestededits__deleted-media-mark{stroke:#c00}.tox-suggestededits__deleted-media-halo{stroke:#fff}.mce-pagebreak.tox-suggestededits__annotation--added__selected,.mce-pagebreak.tox-suggestededits__annotation--modified__selected,.mce-pagebreak.tox-suggestededits__annotation--removed__selected{border:1px dashed #aaa;box-shadow:none;background-image:none}.mce-pagebreak.tox-suggestededits__annotation--added__highlight,.mce-pagebreak.tox-suggestededits__annotation--modified__highlight,.mce-pagebreak.tox-suggestededits__annotation--removed__highlight{padding:0}.tox-suggestededits__diff-focus-overlay{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:10}.tox-suggestededits__diff-focus-overlay-dim{fill:rgba(34,47,62,0.2)}.tox-suggestededits__annotation{display:revert}.tox-suggestededits-preview{display:block}.tox-suggestededits__annotation--added__highlight,.tox-suggestededits__annotation--modified__highlight,.tox-suggestededits__annotation--removed__highlight{cursor:pointer}.tox-suggestededits__annotation--added.tox-suggestededits__annotation--preview-highlight,.tox-suggestededits__annotation--modified.tox-suggestededits__annotation--preview-highlight{background-position:bottom;background-image:linear-gradient(transparent calc(100% - 2px),#006ce7 calc(100% - 2px))}iframe.tox-suggestededits__annotation--added.tox-suggestededits__annotation--preview-highlight,img.tox-suggestededits__annotation--added.tox-suggestededits__annotation--preview-highlight,video.tox-suggestededits__annotation--added.tox-suggestededits__annotation--preview-highlight{background-color:#e4eeda;background-image:none;border:2px solid #78ab46;padding:0;vertical-align:top}iframe.tox-suggestededits__annotation--modified.tox-suggestededits__annotation--preview-highlight,img.tox-suggestededits__annotation--modified.tox-suggestededits__annotation--preview-highlight,video.tox-suggestededits__annotation--modified.tox-suggestededits__annotation--preview-highlight{background-color:#cce2fa;background-image:none;border:2px solid #006ce7;padding:0;vertical-align:top}body.tox-suggestededits-preview--selectable .tox-suggestededits__annotation--added.tox-suggestededits__annotation--preview-highlight,body.tox-suggestededits-preview--selectable .tox-suggestededits__annotation--modified.tox-suggestededits__annotation--preview-highlight{cursor:pointer}body.tox-suggestededits-preview--selectable .tox-suggestededits__annotation--preview-highlight.tox-suggestededits__annotation--added__selected,body.tox-suggestededits-preview--selectable .tox-suggestededits__annotation--preview-highlight.tox-suggestededits__annotation--modified__selected{background-image:none;background-color:rgba(0,108,231,.2);box-shadow:0 2px 0 0 #006ce7,0 -2px 0 0 #006ce7}body.tox-suggestededits-preview--selectable .tox-suggestededits__annotation--preview-highlight.tox-suggestededits__annotation--removed__selected{display:revert;-webkit-text-decoration:line-through;text-decoration:line-through;background-image:none;background-color:rgba(204,0,0,.2);box-shadow:0 2px 0 0 #006ce7,0 -2px 0 0 #006ce7}body.tox-suggestededits-preview--selectable .tox-suggestededits__annotation--preview-highlight.tox-suggestededits__annotation--removed__selected iframe,body.tox-suggestededits-preview--selectable .tox-suggestededits__annotation--preview-highlight.tox-suggestededits__annotation--removed__selected img,body.tox-suggestededits-preview--selectable .tox-suggestededits__annotation--preview-highlight.tox-suggestededits__annotation--removed__selected video{background-color:#f5cccc;background-image:none;border:2px solid #c00;padding:0;vertical-align:top;border-color:#f5cccc;outline:2px solid #006ce7}body.tox-suggestededits-preview--selectable del.tox-suggestededits__annotation--preview-highlight.tox-suggestededits__annotation--added__selected,body.tox-suggestededits-preview--selectable del.tox-suggestededits__annotation--preview-highlight.tox-suggestededits__annotation--modified__selected,body.tox-suggestededits-preview--selectable ins.tox-suggestededits__annotation--preview-highlight.tox-suggestededits__annotation--added__selected,body.tox-suggestededits-preview--selectable ins.tox-suggestededits__annotation--preview-highlight.tox-suggestededits__annotation--modified__selected{background-color:transparent;box-shadow:none;background-position:center;background-size:100% calc(1lh + 3px);background-image:linear-gradient(#006ce7 3px,rgba(0,108,231,.2) 3px,rgba(0,108,231,.2) calc(100% - 3px),#006ce7 calc(100% - 3px))}body.tox-suggestededits-preview--selectable del.tox-suggestededits__annotation--preview-highlight.tox-suggestededits__annotation--removed__selected,body.tox-suggestededits-preview--selectable ins.tox-suggestededits__annotation--preview-highlight.tox-suggestededits__annotation--removed__selected{background-color:transparent;box-shadow:none;background-position:center;background-size:100% calc(1lh + 3px);background-image:linear-gradient(#c00 3px,rgba(204,0,0,.2) 3px,rgba(204,0,0,.2) calc(100% - 3px),#c00 calc(100% - 3px))}body.tox-suggestededits-preview--selectable iframe.tox-suggestededits__annotation--preview-highlight.tox-suggestededits__annotation--added__selected,body.tox-suggestededits-preview--selectable img.tox-suggestededits__annotation--preview-highlight.tox-suggestededits__annotation--added__selected,body.tox-suggestededits-preview--selectable video.tox-suggestededits__annotation--preview-highlight.tox-suggestededits__annotation--added__selected{background-color:#e4eeda;background-image:none;border:2px solid #78ab46;padding:0;vertical-align:top;border-color:#e4eeda;outline:2px solid #006ce7}body.tox-suggestededits-preview--selectable iframe.tox-suggestededits__annotation--preview-highlight.tox-suggestededits__annotation--modified__selected,body.tox-suggestededits-preview--selectable img.tox-suggestededits__annotation--preview-highlight.tox-suggestededits__annotation--modified__selected,body.tox-suggestededits-preview--selectable video.tox-suggestededits__annotation--preview-highlight.tox-suggestededits__annotation--modified__selected{background-color:#cce2fa;background-image:none;border:2px solid #006ce7;padding:0;vertical-align:top;border-color:#cce2fa;outline:2px solid #006ce7}body.tox-suggestededits-preview--selectable iframe.tox-suggestededits__annotation--preview-highlight.tox-suggestededits__annotation--removed__selected,body.tox-suggestededits-preview--selectable img.tox-suggestededits__annotation--preview-highlight.tox-suggestededits__annotation--removed__selected,body.tox-suggestededits-preview--selectable video.tox-suggestededits__annotation--preview-highlight.tox-suggestededits__annotation--removed__selected{background-color:#f5cccc;background-image:none;border:2px solid #c00;padding:0;vertical-align:top;border-color:#f5cccc;display:inline-block;outline:2px solid #006ce7}.tox-suggestededits__annotation--preview-highlight.tox-suggestededits__annotation--added__selected,.tox-suggestededits__annotation--preview-highlight.tox-suggestededits__annotation--modified__selected,.tox-suggestededits__annotation--preview-highlight.tox-suggestededits__annotation--removed__selected{background-color:transparent;box-shadow:none;border:0}.tox-suggestededits{display:contents}.mce-toc{border:1px solid gray}.mce-toc h2{margin:4px}.mce-toc ul>li{list-style-type:none}[data-mce-block]{display:block}.mce-item-table:not([border]),.mce-item-table:not([border]) caption,.mce-item-table:not([border]) td,.mce-item-table:not([border]) th,.mce-item-table[border=\"0\"],.mce-item-table[border=\"0\"] caption,.mce-item-table[border=\"0\"] td,.mce-item-table[border=\"0\"] th,table[style*=\"border-width: 0px\"],table[style*=\"border-width: 0px\"] caption,table[style*=\"border-width: 0px\"] td,table[style*=\"border-width: 0px\"] th{border:1px dashed #bbb}.tox-uc-loading-background{width:100%;height:100%;background:rgba(255,255,255,.5)}.tox-uc-loading-spinner-wrapper{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.tox-uc-loading-spinner{width:min(24px,30%);aspect-ratio:1/1;border-radius:50%;border:3px solid #006ce7;border-bottom-color:transparent;animation:tox-rotation 1s linear infinite}.tox-uc-video{display:block;position:relative;margin:16px 0 16px 0}.tox-uc-video:not([data-mce-selected]):after{content:\"\";position:absolute;top:0;left:0;width:100%;height:100%}.tox-uploadcare-placeholder{all:initial;display:inline-block;position:relative;width:min(100%,600px);height:80px;--tox-uploadcare-placeholder--content-cursor:auto!important;--tox-uploadcare-placeholder--content-color:rgba(34, 47, 62, 0.7);--tox-uploadcare-placeholder--content-background-color:#fff;--tox-uploadcare-placeholder--content-border:2px solid #e3e3e3;--tox-uploadcare-placeholder--content-font-family:monospace,sans-serif;--tox-uploadcare-placeholder--content-height:100%;--tox-uploadcare-placeholder--content-width:100%;--tox-uploadcare-placeholder--content-display:inline-flex;--tox-uploadcare-placeholder--content-align-items:center;--tox-uploadcare-placeholder--content-justify-content:center;--tox-uploadcare-placeholder--content-gap:8px;--tox-uploadcare-placeholder--icon-fill:rgba(34, 47, 62, 0.7);--tox-uploadcare-placeholder--icon-min-width:24px;--tox-uc-loading-spinner-wrapper-display-none:none;--tox-uc-loading-spinner-wrapper-display:flex;--tox-uc-loading-spinner-wrapper-position:absolute;--tox-uc-loading-spinner-wrapper-top:0;--tox-uc-loading-spinner-wrapper-left:0;--tox-uc-loading-spinner-wrapper-width:100%;--tox-uc-loading-spinner-wrapper-height:100%;--tox-uc-loading-spinner-wrapper-justify-content:center;--tox-uc-loading-spinner-wrapper-align-items:center;--tox-uc-loading-spinner-aspect-ratio:1/1;--tox-uc-loading-spinner-width:min(24px, 30%);--tox-uc-loading-spinner-border-radius:50%;--tox-uc-loading-spinner-border:3px solid #006ce7;--tox-uc-loading-spinner-border-bottom-color:transparent;--tox-uc-loading-spinner-animation:tox-rotation 1s linear infinite}@media print{tiny-uploadcare-placeholder{display:none!important}}.mce-visualblocks address,.mce-visualblocks article,.mce-visualblocks aside,.mce-visualblocks blockquote,.mce-visualblocks div:not([data-mce-bogus]),.mce-visualblocks dl,.mce-visualblocks figcaption,.mce-visualblocks figure,.mce-visualblocks h1,.mce-visualblocks h2,.mce-visualblocks h3,.mce-visualblocks h4,.mce-visualblocks h5,.mce-visualblocks h6,.mce-visualblocks hgroup,.mce-visualblocks ol,.mce-visualblocks p,.mce-visualblocks pre,.mce-visualblocks section,.mce-visualblocks ul{background-repeat:no-repeat;border:1px dashed #bbb;margin-left:3px;padding-top:10px}.mce-visualblocks p{background-image:url(data:image/gif;base64,R0lGODlhCQAJAJEAAAAAAP///7u7u////yH5BAEAAAMALAAAAAAJAAkAAAIQnG+CqCN/mlyvsRUpThG6AgA7)}.mce-visualblocks h1{background-image:url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGu1JuxHoAfRNRW3TWXyF2YiRUAOw==)}.mce-visualblocks h2{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8Hybbx4oOuqgTynJd6bGlWg3DkJzoaUAAAOw==)}.mce-visualblocks h3{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIZjI8Hybbx4oOuqgTynJf2Ln2NOHpQpmhAAQA7)}.mce-visualblocks h4{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxInR0zqeAdhtJlXwV1oCll2HaWgAAOw==)}.mce-visualblocks h5{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjane4iq5GlW05GgIkIZUAAAOw==)}.mce-visualblocks h6{background-image:url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjan04jep1iZ1XRlAo5bVgAAOw==)}.mce-visualblocks div:not([data-mce-bogus]){background-image:url(data:image/gif;base64,R0lGODlhEgAKAIABALu7u////yH5BAEAAAEALAAAAAASAAoAAAIfjI9poI0cgDywrhuxfbrzDEbQM2Ei5aRjmoySW4pAAQA7)}.mce-visualblocks section{background-image:url(data:image/gif;base64,R0lGODlhKAAKAIABALu7u////yH5BAEAAAEALAAAAAAoAAoAAAI5jI+pywcNY3sBWHdNrplytD2ellDeSVbp+GmWqaDqDMepc8t17Y4vBsK5hDyJMcI6KkuYU+jpjLoKADs=)}.mce-visualblocks article{background-image:url(data:image/gif;base64,R0lGODlhKgAKAIABALu7u////yH5BAEAAAEALAAAAAAqAAoAAAI6jI+pywkNY3wG0GBvrsd2tXGYSGnfiF7ikpXemTpOiJScasYoDJJrjsG9gkCJ0ag6KhmaIe3pjDYBBQA7)}.mce-visualblocks blockquote{background-image:url(data:image/gif;base64,R0lGODlhPgAKAIABALu7u////yH5BAEAAAEALAAAAAA+AAoAAAJPjI+py+0Knpz0xQDyuUhvfoGgIX5iSKZYgq5uNL5q69asZ8s5rrf0yZmpNkJZzFesBTu8TOlDVAabUyatguVhWduud3EyiUk45xhTTgMBBQA7)}.mce-visualblocks address{background-image:url(data:image/gif;base64,R0lGODlhLQAKAIABALu7u////yH5BAEAAAEALAAAAAAtAAoAAAI/jI+pywwNozSP1gDyyZcjb3UaRpXkWaXmZW4OqKLhBmLs+K263DkJK7OJeifh7FicKD9A1/IpGdKkyFpNmCkAADs=)}.mce-visualblocks pre{background-image:url(data:image/gif;base64,R0lGODlhFQAKAIABALu7uwAAACH5BAEAAAEALAAAAAAVAAoAAAIjjI+ZoN0cgDwSmnpz1NCueYERhnibZVKLNnbOq8IvKpJtVQAAOw==)}.mce-visualblocks figure{background-image:url(data:image/gif;base64,R0lGODlhJAAKAIAAALu7u////yH5BAEAAAEALAAAAAAkAAoAAAI0jI+py+2fwAHUSFvD3RlvG4HIp4nX5JFSpnZUJ6LlrM52OE7uSWosBHScgkSZj7dDKnWAAgA7)}.mce-visualblocks figcaption{border:1px dashed #bbb}.mce-visualblocks hgroup{background-image:url(data:image/gif;base64,R0lGODlhJwAKAIABALu7uwAAACH5BAEAAAEALAAAAAAnAAoAAAI3jI+pywYNI3uB0gpsRtt5fFnfNZaVSYJil4Wo03Hv6Z62uOCgiXH1kZIIJ8NiIxRrAZNMZAtQAAA7)}.mce-visualblocks aside{background-image:url(data:image/gif;base64,R0lGODlhHgAKAIABAKqqqv///yH5BAEAAAEALAAAAAAeAAoAAAItjI+pG8APjZOTzgtqy7I3f1yehmQcFY4WKZbqByutmW4aHUd6vfcVbgudgpYCADs=)}.mce-visualblocks ul{background-image:url(data:image/gif;base64,R0lGODlhDQAKAIAAALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGuYnqUVSjvw26DzzXiqIDlVwAAOw==)}.mce-visualblocks ol{background-image:url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybH6HHt0qourxC6CvzXieHyeWQAAOw==)}.mce-visualblocks dl{background-image:url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybEOnmOvUoWznTqeuEjNSCqeGRUAOw==)}.mce-visualblocks:not([dir=rtl]) address,.mce-visualblocks:not([dir=rtl]) article,.mce-visualblocks:not([dir=rtl]) aside,.mce-visualblocks:not([dir=rtl]) blockquote,.mce-visualblocks:not([dir=rtl]) div:not([data-mce-bogus]),.mce-visualblocks:not([dir=rtl]) dl,.mce-visualblocks:not([dir=rtl]) figcaption,.mce-visualblocks:not([dir=rtl]) figure,.mce-visualblocks:not([dir=rtl]) h1,.mce-visualblocks:not([dir=rtl]) h2,.mce-visualblocks:not([dir=rtl]) h3,.mce-visualblocks:not([dir=rtl]) h4,.mce-visualblocks:not([dir=rtl]) h5,.mce-visualblocks:not([dir=rtl]) h6,.mce-visualblocks:not([dir=rtl]) hgroup,.mce-visualblocks:not([dir=rtl]) ol,.mce-visualblocks:not([dir=rtl]) p,.mce-visualblocks:not([dir=rtl]) pre,.mce-visualblocks:not([dir=rtl]) section,.mce-visualblocks:not([dir=rtl]) ul{margin-left:3px}.mce-visualblocks[dir=rtl] address,.mce-visualblocks[dir=rtl] article,.mce-visualblocks[dir=rtl] aside,.mce-visualblocks[dir=rtl] blockquote,.mce-visualblocks[dir=rtl] div:not([data-mce-bogus]),.mce-visualblocks[dir=rtl] dl,.mce-visualblocks[dir=rtl] figcaption,.mce-visualblocks[dir=rtl] figure,.mce-visualblocks[dir=rtl] h1,.mce-visualblocks[dir=rtl] h2,.mce-visualblocks[dir=rtl] h3,.mce-visualblocks[dir=rtl] h4,.mce-visualblocks[dir=rtl] h5,.mce-visualblocks[dir=rtl] h6,.mce-visualblocks[dir=rtl] hgroup,.mce-visualblocks[dir=rtl] ol,.mce-visualblocks[dir=rtl] p,.mce-visualblocks[dir=rtl] pre,.mce-visualblocks[dir=rtl] section,.mce-visualblocks[dir=rtl] ul{background-position-x:right;margin-right:3px}.mce-nbsp,.mce-shy{background:#aaa}.mce-shy::after{content:'-'}[data-ephox-foam-a11y-violation]{outline:2px solid;position:relative}[data-ephox-foam-a11y-violation][data-ephox-foam-a11y-current-violation]{outline-width:4px;transition:outline-width .1s ease-in-out,background-color .1s ease-in-out}[data-ephox-foam-a11y-violation][data-ephox-foam-a11y-severity-info]{outline-color:#006ce7}[data-ephox-foam-a11y-violation][data-ephox-foam-a11y-severity-warn]{outline-color:#fc0}[data-ephox-foam-a11y-violation][data-ephox-foam-a11y-severity-error]{outline-color:#c00}[data-ephox-foam-a11y-violation][data-ephox-foam-a11y-current-violation=info]{outline-color:#006ce7;background-color:#e6f0fd}[data-ephox-foam-a11y-violation][data-ephox-foam-a11y-current-violation=warning]{outline-color:#fc0;background-color:#fffae6}[data-ephox-foam-a11y-violation][data-ephox-foam-a11y-current-violation=error]{outline-color:#c00;background-color:#fae6e6}[data-ephox-foam-a11y-violation][data-ephox-foam-a11y-current-violation]:is(td,th,tr){position:static}body{font-family:sans-serif}table{border-collapse:collapse}`)", "/* This file is bundled with the code from the following third party libraries */\n\n/**\n * http://prismjs.com/\n * Dracula Theme originally by Zeno Rocha [@zenorocha]\n * https://draculatheme.com/\n *\n * Ported for PrismJS by Albert Vallverdu [@byverdu]\n */\ntinymce.Resource.add('content/default/content.css', `body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Open Sans','Helvetica Neue',sans-serif;line-height:1.4;margin:1rem}table{border-collapse:collapse}table:not([cellpadding]) td,table:not([cellpadding]) th{padding:.4rem}table[border]:not([border=\"0\"]):not([style*=border-width]) td,table[border]:not([border=\"0\"]):not([style*=border-width]) th{border-width:1px}table[border]:not([border=\"0\"]):not([style*=border-style]) td,table[border]:not([border=\"0\"]):not([style*=border-style]) th{border-style:solid}table[border]:not([border=\"0\"]):not([style*=border-color]) td,table[border]:not([border=\"0\"]):not([style*=border-color]) th{border-color:#ccc}figure{display:table;margin:1rem auto}figure figcaption{color:#999;display:block;margin-top:.25rem;text-align:center}hr{border-color:#ccc;border-style:solid;border-width:1px 0 0 0}code{background-color:#e8e8e8;border-radius:3px;padding:.1rem .2rem}.mce-content-body:not([dir=rtl]) blockquote{border-left:2px solid #ccc;margin-left:1.5rem;padding-left:1rem}.mce-content-body[dir=rtl] blockquote{border-right:2px solid #ccc;margin-right:1.5rem;padding-right:1rem}`)", "// Exports the \"lists\" plugin for usage with module loaders\n// Usage:\n//   CommonJS:\n//     require('tinymce/plugins/lists')\n//   ES2015:\n//     import 'tinymce/plugins/lists'\nrequire('./plugin.js');", "// Exports the \"link\" plugin for usage with module loaders\n// Usage:\n//   CommonJS:\n//     require('tinymce/plugins/link')\n//   ES2015:\n//     import 'tinymce/plugins/link'\nrequire('./plugin.js');", "// Exports the \"table\" plugin for usage with module loaders\n// Usage:\n//   CommonJS:\n//     require('tinymce/plugins/table')\n//   ES2015:\n//     import 'tinymce/plugins/table'\nrequire('./plugin.js');", "// Exports the \"code\" plugin for usage with module loaders\n// Usage:\n//   CommonJS:\n//     require('tinymce/plugins/code')\n//   ES2015:\n//     import 'tinymce/plugins/code'\nrequire('./plugin.js');", "// Exports the \"help\" plugin for usage with module loaders\n// Usage:\n//   CommonJS:\n//     require('tinymce/plugins/help')\n//   ES2015:\n//     import 'tinymce/plugins/help'\nrequire('./plugin.js');", "tinymce.Resource.add('tinymce.html-i18n.help-keynav.de',\n'<h1>Grundlagen der Tastaturnavigation</h1>\\n' +\n  '\\n' +\n  '<dl>\\n' +\n  '  <dt>Fokus auf Men\u00FCleiste</dt>\\n' +\n  '  <dd>Windows oder Linux: ALT+F9</dd>\\n' +\n  '  <dd>macOS: &#x2325;F9</dd>\\n' +\n  '  <dt>Fokus auf Symbolleiste</dt>\\n' +\n  '  <dd>Windows oder Linux: ALT+F10</dd>\\n' +\n  '  <dd>macOS: &#x2325;F10</dd>\\n' +\n  '  <dt>Fokus auf Fu\u00DFzeile</dt>\\n' +\n  '  <dd>Windows oder Linux: ALT+F11</dd>\\n' +\n  '  <dd>macOS: &#x2325;F11</dd>\\n' +\n  '  <dt>Benachrichtigung fokussieren</dt>\\n' +\n  '  <dd>Windows oder Linux: ALT+F12</dd>\\n' +\n  '  <dd>macOS: &#x2325;F12</dd>\\n' +\n  '  <dt>Fokus auf kontextbezogene Symbolleiste</dt>\\n' +\n  '  <dd>Windows, Linux oder macOS: STRG+F9</dd>\\n' +\n  '</dl>\\n' +\n  '\\n' +\n  '<p>Die Navigation beginnt beim ersten Benutzeroberfl\u00E4chenelement, welches hervorgehoben ist. Falls sich das erste Element im Pfad der Fu\u00DFzeile befindet,\\n' +\n  '  ist es unterstrichen.</p>\\n' +\n  '\\n' +\n  '<h1>Zwischen Abschnitten der Benutzeroberfl\u00E4che navigieren</h1>\\n' +\n  '\\n' +\n  '<p>Um von einem Abschnitt der Benutzeroberfl\u00E4che zum n\u00E4chsten zu wechseln, dr\u00FCcken Sie <strong>TAB</strong>.</p>\\n' +\n  '\\n' +\n  '<p>Um von einem Abschnitt der Benutzeroberfl\u00E4che zum vorherigen zu wechseln, dr\u00FCcken Sie <strong>UMSCHALT+TAB</strong>.</p>\\n' +\n  '\\n' +\n  '<p>Die Abschnitte der Benutzeroberfl\u00E4che haben folgende <strong>TAB</strong>-Reihenfolge:</p>\\n' +\n  '\\n' +\n  '<ol>\\n' +\n  '  <li>Men\u00FCleiste</li>\\n' +\n  '  <li>Einzelne Gruppen der Symbolleiste</li>\\n' +\n  '  <li>Randleiste</li>\\n' +\n  '  <li>Elementpfad in der Fu\u00DFzeile</li>\\n' +\n  '  <li>Umschaltfl\u00E4che \u201EW\u00F6rter z\u00E4hlen\u201C in der Fu\u00DFzeile</li>\\n' +\n  '  <li>Branding-Link in der Fu\u00DFzeile</li>\\n' +\n  '  <li>Editor-Ziehpunkt zur Gr\u00F6\u00DFen\u00E4nderung in der Fu\u00DFzeile</li>\\n' +\n  '</ol>\\n' +\n  '\\n' +\n  '<p>Falls ein Abschnitt der Benutzeroberfl\u00E4chen nicht vorhanden ist, wird er \u00FCbersprungen.</p>\\n' +\n  '\\n' +\n  '<p>Wenn in der Fu\u00DFzeile die Tastaturnavigation fokussiert ist und keine Randleiste angezeigt wird, wechselt der Fokus durch Dr\u00FCcken von <strong>UMSCHALT+TAB</strong>\\n' +\n  '  zur ersten Gruppe der Symbolleiste, nicht zur letzten.</p>\\n' +\n  '\\n' +\n  '<h1>Innerhalb von Abschnitten der Benutzeroberfl\u00E4che navigieren</h1>\\n' +\n  '\\n' +\n  '<p>Um von einem Element der Benutzeroberfl\u00E4che zum n\u00E4chsten zu wechseln, dr\u00FCcken Sie die entsprechende <strong>Pfeiltaste</strong>.</p>\\n' +\n  '\\n' +\n  '<p>Die Pfeiltasten <strong>Links</strong> und <strong>Rechts</strong></p>\\n' +\n  '\\n' +\n  '<ul>\\n' +\n  '  <li>wechseln zwischen Men\u00FCs in der Men\u00FCleiste.</li>\\n' +\n  '  <li>\u00F6ffnen das Untermen\u00FC eines Men\u00FCs.</li>\\n' +\n  '  <li>wechseln zwischen Schaltfl\u00E4chen in einer Gruppe der Symbolleiste.</li>\\n' +\n  '  <li>wechseln zwischen Elementen im Elementpfad der Fu\u00DFzeile.</li>\\n' +\n  '</ul>\\n' +\n  '\\n' +\n  '<p>Die Pfeiltasten <strong>Abw\u00E4rts</strong> und <strong>Aufw\u00E4rts</strong></p>\\n' +\n  '\\n' +\n  '<ul>\\n' +\n  '  <li>wechseln zwischen Men\u00FCelementen in einem Men\u00FC.</li>\\n' +\n  '  <li>wechseln zwischen Elementen in einem Popupmen\u00FC der Symbolleiste.</li>\\n' +\n  '</ul>\\n' +\n  '\\n' +\n  '<p>Die <strong>Pfeiltasten</strong> rotieren innerhalb des fokussierten Abschnitts der Benutzeroberfl\u00E4che.</p>\\n' +\n  '\\n' +\n  '<p>Um ein ge\u00F6ffnetes Men\u00FC, ein ge\u00F6ffnetes Untermen\u00FC oder ein ge\u00F6ffnetes Popupmen\u00FC zu schlie\u00DFen, dr\u00FCcken Sie die <strong>ESC</strong>-Taste.</p>\\n' +\n  '\\n' +\n  '<p>Wenn sich der aktuelle Fokus ganz oben in einem bestimmten Abschnitt der Benutzeroberfl\u00E4che befindet, wird durch Dr\u00FCcken der <strong>ESC</strong>-Taste auch\\n' +\n  '  die Tastaturnavigation beendet.</p>\\n' +\n  '\\n' +\n  '<h1>Ein Men\u00FCelement oder eine Symbolleistenschaltfl\u00E4che ausf\u00FChren</h1>\\n' +\n  '\\n' +\n  '<p>Wenn das gew\u00FCnschte Men\u00FCelement oder die gew\u00FCnschte Symbolleistenschaltfl\u00E4che hervorgehoben ist, dr\u00FCcken Sie <strong>Zur\u00FCck</strong>, <strong>Eingabe</strong>\\n' +\n  '  oder die <strong>Leertaste</strong>, um das Element auszuf\u00FChren.</p>\\n' +\n  '\\n' +\n  '<h1>In Dialogfeldern ohne Registerkarten navigieren</h1>\\n' +\n  '\\n' +\n  '<p>In Dialogfeldern ohne Registerkarten ist beim \u00D6ffnen eines Dialogfelds die erste interaktive Komponente fokussiert.</p>\\n' +\n  '\\n' +\n  '<p>Navigieren Sie zwischen den interaktiven Komponenten eines Dialogfelds, indem Sie <strong>TAB</strong> oder <strong>UMSCHALT+TAB</strong> dr\u00FCcken.</p>\\n' +\n  '\\n' +\n  '<h1>In Dialogfeldern mit Registerkarten navigieren</h1>\\n' +\n  '\\n' +\n  '<p>In Dialogfeldern mit Registerkarten ist beim \u00D6ffnen eines Dialogfelds die erste Schaltfl\u00E4che eines Registerkartenmen\u00FCs fokussiert.</p>\\n' +\n  '\\n' +\n  '<p>Navigieren Sie zwischen den interaktiven Komponenten auf dieser Registerkarte des Dialogfelds, indem Sie <strong>TAB</strong> oder\\n' +\n  '  <strong>UMSCHALT+TAB</strong> dr\u00FCcken.</p>\\n' +\n  '\\n' +\n  '<p>Wechseln Sie zu einer anderen Registerkarte des Dialogfelds, indem Sie den Fokus auf das Registerkartenmen\u00FC legen und dann die entsprechende <strong>Pfeiltaste</strong>\\n' +\n  '  dr\u00FCcken, um durch die verf\u00FCgbaren Registerkarten zu rotieren.</p>\\n');", "/**!\n * Sortable 1.15.0\n * @author\tRubaXa   <trash@rubaxa.org>\n * @author\towenm    <owen23355@gmail.com>\n * @license MIT\n */\nfunction ownKeys(object, enumerableOnly) {\n  var keys = Object.keys(object);\n\n  if (Object.getOwnPropertySymbols) {\n    var symbols = Object.getOwnPropertySymbols(object);\n\n    if (enumerableOnly) {\n      symbols = symbols.filter(function (sym) {\n        return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n      });\n    }\n\n    keys.push.apply(keys, symbols);\n  }\n\n  return keys;\n}\n\nfunction _objectSpread2(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i] != null ? arguments[i] : {};\n\n    if (i % 2) {\n      ownKeys(Object(source), true).forEach(function (key) {\n        _defineProperty(target, key, source[key]);\n      });\n    } else if (Object.getOwnPropertyDescriptors) {\n      Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n    } else {\n      ownKeys(Object(source)).forEach(function (key) {\n        Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n      });\n    }\n  }\n\n  return target;\n}\n\nfunction _typeof(obj) {\n  \"@babel/helpers - typeof\";\n\n  if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n    _typeof = function (obj) {\n      return typeof obj;\n    };\n  } else {\n    _typeof = function (obj) {\n      return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n    };\n  }\n\n  return _typeof(obj);\n}\n\nfunction _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nfunction _extends() {\n  _extends = Object.assign || function (target) {\n    for (var i = 1; i < arguments.length; i++) {\n      var source = arguments[i];\n\n      for (var key in source) {\n        if (Object.prototype.hasOwnProperty.call(source, key)) {\n          target[key] = source[key];\n        }\n      }\n    }\n\n    return target;\n  };\n\n  return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n  if (source == null) return {};\n  var target = {};\n  var sourceKeys = Object.keys(source);\n  var key, i;\n\n  for (i = 0; i < sourceKeys.length; i++) {\n    key = sourceKeys[i];\n    if (excluded.indexOf(key) >= 0) continue;\n    target[key] = source[key];\n  }\n\n  return target;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n  if (source == null) return {};\n\n  var target = _objectWithoutPropertiesLoose(source, excluded);\n\n  var key, i;\n\n  if (Object.getOwnPropertySymbols) {\n    var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n    for (i = 0; i < sourceSymbolKeys.length; i++) {\n      key = sourceSymbolKeys[i];\n      if (excluded.indexOf(key) >= 0) continue;\n      if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n      target[key] = source[key];\n    }\n  }\n\n  return target;\n}\n\nfunction _toConsumableArray(arr) {\n  return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n  if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _iterableToArray(iter) {\n  if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n  if (!o) return;\n  if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n  var n = Object.prototype.toString.call(o).slice(8, -1);\n  if (n === \"Object\" && o.constructor) n = o.constructor.name;\n  if (n === \"Map\" || n === \"Set\") return Array.from(o);\n  if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n  if (len == null || len > arr.length) len = arr.length;\n\n  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n  return arr2;\n}\n\nfunction _nonIterableSpread() {\n  throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nvar version = \"1.15.0\";\n\nfunction userAgent(pattern) {\n  if (typeof window !== 'undefined' && window.navigator) {\n    return !! /*@__PURE__*/navigator.userAgent.match(pattern);\n  }\n}\n\nvar IE11OrLess = userAgent(/(?:Trident.*rv[ :]?11\\.|msie|iemobile|Windows Phone)/i);\nvar Edge = userAgent(/Edge/i);\nvar FireFox = userAgent(/firefox/i);\nvar Safari = userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i);\nvar IOS = userAgent(/iP(ad|od|hone)/i);\nvar ChromeForAndroid = userAgent(/chrome/i) && userAgent(/android/i);\n\nvar captureMode = {\n  capture: false,\n  passive: false\n};\n\nfunction on(el, event, fn) {\n  el.addEventListener(event, fn, !IE11OrLess && captureMode);\n}\n\nfunction off(el, event, fn) {\n  el.removeEventListener(event, fn, !IE11OrLess && captureMode);\n}\n\nfunction matches(\n/**HTMLElement*/\nel,\n/**String*/\nselector) {\n  if (!selector) return;\n  selector[0] === '>' && (selector = selector.substring(1));\n\n  if (el) {\n    try {\n      if (el.matches) {\n        return el.matches(selector);\n      } else if (el.msMatchesSelector) {\n        return el.msMatchesSelector(selector);\n      } else if (el.webkitMatchesSelector) {\n        return el.webkitMatchesSelector(selector);\n      }\n    } catch (_) {\n      return false;\n    }\n  }\n\n  return false;\n}\n\nfunction getParentOrHost(el) {\n  return el.host && el !== document && el.host.nodeType ? el.host : el.parentNode;\n}\n\nfunction closest(\n/**HTMLElement*/\nel,\n/**String*/\nselector,\n/**HTMLElement*/\nctx, includeCTX) {\n  if (el) {\n    ctx = ctx || document;\n\n    do {\n      if (selector != null && (selector[0] === '>' ? el.parentNode === ctx && matches(el, selector) : matches(el, selector)) || includeCTX && el === ctx) {\n        return el;\n      }\n\n      if (el === ctx) break;\n      /* jshint boss:true */\n    } while (el = getParentOrHost(el));\n  }\n\n  return null;\n}\n\nvar R_SPACE = /\\s+/g;\n\nfunction toggleClass(el, name, state) {\n  if (el && name) {\n    if (el.classList) {\n      el.classList[state ? 'add' : 'remove'](name);\n    } else {\n      var className = (' ' + el.className + ' ').replace(R_SPACE, ' ').replace(' ' + name + ' ', ' ');\n      el.className = (className + (state ? ' ' + name : '')).replace(R_SPACE, ' ');\n    }\n  }\n}\n\nfunction css(el, prop, val) {\n  var style = el && el.style;\n\n  if (style) {\n    if (val === void 0) {\n      if (document.defaultView && document.defaultView.getComputedStyle) {\n        val = document.defaultView.getComputedStyle(el, '');\n      } else if (el.currentStyle) {\n        val = el.currentStyle;\n      }\n\n      return prop === void 0 ? val : val[prop];\n    } else {\n      if (!(prop in style) && prop.indexOf('webkit') === -1) {\n        prop = '-webkit-' + prop;\n      }\n\n      style[prop] = val + (typeof val === 'string' ? '' : 'px');\n    }\n  }\n}\n\nfunction matrix(el, selfOnly) {\n  var appliedTransforms = '';\n\n  if (typeof el === 'string') {\n    appliedTransforms = el;\n  } else {\n    do {\n      var transform = css(el, 'transform');\n\n      if (transform && transform !== 'none') {\n        appliedTransforms = transform + ' ' + appliedTransforms;\n      }\n      /* jshint boss:true */\n\n    } while (!selfOnly && (el = el.parentNode));\n  }\n\n  var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;\n  /*jshint -W056 */\n\n  return matrixFn && new matrixFn(appliedTransforms);\n}\n\nfunction find(ctx, tagName, iterator) {\n  if (ctx) {\n    var list = ctx.getElementsByTagName(tagName),\n        i = 0,\n        n = list.length;\n\n    if (iterator) {\n      for (; i < n; i++) {\n        iterator(list[i], i);\n      }\n    }\n\n    return list;\n  }\n\n  return [];\n}\n\nfunction getWindowScrollingElement() {\n  var scrollingElement = document.scrollingElement;\n\n  if (scrollingElement) {\n    return scrollingElement;\n  } else {\n    return document.documentElement;\n  }\n}\n/**\n * Returns the \"bounding client rect\" of given element\n * @param  {HTMLElement} el                       The element whose boundingClientRect is wanted\n * @param  {[Boolean]} relativeToContainingBlock  Whether the rect should be relative to the containing block of (including) the container\n * @param  {[Boolean]} relativeToNonStaticParent  Whether the rect should be relative to the relative parent of (including) the contaienr\n * @param  {[Boolean]} undoScale                  Whether the container's scale() should be undone\n * @param  {[HTMLElement]} container              The parent the element will be placed in\n * @return {Object}                               The boundingClientRect of el, with specified adjustments\n */\n\n\nfunction getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoScale, container) {\n  if (!el.getBoundingClientRect && el !== window) return;\n  var elRect, top, left, bottom, right, height, width;\n\n  if (el !== window && el.parentNode && el !== getWindowScrollingElement()) {\n    elRect = el.getBoundingClientRect();\n    top = elRect.top;\n    left = elRect.left;\n    bottom = elRect.bottom;\n    right = elRect.right;\n    height = elRect.height;\n    width = elRect.width;\n  } else {\n    top = 0;\n    left = 0;\n    bottom = window.innerHeight;\n    right = window.innerWidth;\n    height = window.innerHeight;\n    width = window.innerWidth;\n  }\n\n  if ((relativeToContainingBlock || relativeToNonStaticParent) && el !== window) {\n    // Adjust for translate()\n    container = container || el.parentNode; // solves #1123 (see: https://stackoverflow.com/a/37953806/6088312)\n    // Not needed on <= IE11\n\n    if (!IE11OrLess) {\n      do {\n        if (container && container.getBoundingClientRect && (css(container, 'transform') !== 'none' || relativeToNonStaticParent && css(container, 'position') !== 'static')) {\n          var containerRect = container.getBoundingClientRect(); // Set relative to edges of padding box of container\n\n          top -= containerRect.top + parseInt(css(container, 'border-top-width'));\n          left -= containerRect.left + parseInt(css(container, 'border-left-width'));\n          bottom = top + elRect.height;\n          right = left + elRect.width;\n          break;\n        }\n        /* jshint boss:true */\n\n      } while (container = container.parentNode);\n    }\n  }\n\n  if (undoScale && el !== window) {\n    // Adjust for scale()\n    var elMatrix = matrix(container || el),\n        scaleX = elMatrix && elMatrix.a,\n        scaleY = elMatrix && elMatrix.d;\n\n    if (elMatrix) {\n      top /= scaleY;\n      left /= scaleX;\n      width /= scaleX;\n      height /= scaleY;\n      bottom = top + height;\n      right = left + width;\n    }\n  }\n\n  return {\n    top: top,\n    left: left,\n    bottom: bottom,\n    right: right,\n    width: width,\n    height: height\n  };\n}\n/**\n * Checks if a side of an element is scrolled past a side of its parents\n * @param  {HTMLElement}  el           The element who's side being scrolled out of view is in question\n * @param  {String}       elSide       Side of the element in question ('top', 'left', 'right', 'bottom')\n * @param  {String}       parentSide   Side of the parent in question ('top', 'left', 'right', 'bottom')\n * @return {HTMLElement}               The parent scroll element that the el's side is scrolled past, or null if there is no such element\n */\n\n\nfunction isScrolledPast(el, elSide, parentSide) {\n  var parent = getParentAutoScrollElement(el, true),\n      elSideVal = getRect(el)[elSide];\n  /* jshint boss:true */\n\n  while (parent) {\n    var parentSideVal = getRect(parent)[parentSide],\n        visible = void 0;\n\n    if (parentSide === 'top' || parentSide === 'left') {\n      visible = elSideVal >= parentSideVal;\n    } else {\n      visible = elSideVal <= parentSideVal;\n    }\n\n    if (!visible) return parent;\n    if (parent === getWindowScrollingElement()) break;\n    parent = getParentAutoScrollElement(parent, false);\n  }\n\n  return false;\n}\n/**\n * Gets nth child of el, ignoring hidden children, sortable's elements (does not ignore clone if it's visible)\n * and non-draggable elements\n * @param  {HTMLElement} el       The parent element\n * @param  {Number} childNum      The index of the child\n * @param  {Object} options       Parent Sortable's options\n * @return {HTMLElement}          The child at index childNum, or null if not found\n */\n\n\nfunction getChild(el, childNum, options, includeDragEl) {\n  var currentChild = 0,\n      i = 0,\n      children = el.children;\n\n  while (i < children.length) {\n    if (children[i].style.display !== 'none' && children[i] !== Sortable.ghost && (includeDragEl || children[i] !== Sortable.dragged) && closest(children[i], options.draggable, el, false)) {\n      if (currentChild === childNum) {\n        return children[i];\n      }\n\n      currentChild++;\n    }\n\n    i++;\n  }\n\n  return null;\n}\n/**\n * Gets the last child in the el, ignoring ghostEl or invisible elements (clones)\n * @param  {HTMLElement} el       Parent element\n * @param  {selector} selector    Any other elements that should be ignored\n * @return {HTMLElement}          The last child, ignoring ghostEl\n */\n\n\nfunction lastChild(el, selector) {\n  var last = el.lastElementChild;\n\n  while (last && (last === Sortable.ghost || css(last, 'display') === 'none' || selector && !matches(last, selector))) {\n    last = last.previousElementSibling;\n  }\n\n  return last || null;\n}\n/**\n * Returns the index of an element within its parent for a selected set of\n * elements\n * @param  {HTMLElement} el\n * @param  {selector} selector\n * @return {number}\n */\n\n\nfunction index(el, selector) {\n  var index = 0;\n\n  if (!el || !el.parentNode) {\n    return -1;\n  }\n  /* jshint boss:true */\n\n\n  while (el = el.previousElementSibling) {\n    if (el.nodeName.toUpperCase() !== 'TEMPLATE' && el !== Sortable.clone && (!selector || matches(el, selector))) {\n      index++;\n    }\n  }\n\n  return index;\n}\n/**\n * Returns the scroll offset of the given element, added with all the scroll offsets of parent elements.\n * The value is returned in real pixels.\n * @param  {HTMLElement} el\n * @return {Array}             Offsets in the format of [left, top]\n */\n\n\nfunction getRelativeScrollOffset(el) {\n  var offsetLeft = 0,\n      offsetTop = 0,\n      winScroller = getWindowScrollingElement();\n\n  if (el) {\n    do {\n      var elMatrix = matrix(el),\n          scaleX = elMatrix.a,\n          scaleY = elMatrix.d;\n      offsetLeft += el.scrollLeft * scaleX;\n      offsetTop += el.scrollTop * scaleY;\n    } while (el !== winScroller && (el = el.parentNode));\n  }\n\n  return [offsetLeft, offsetTop];\n}\n/**\n * Returns the index of the object within the given array\n * @param  {Array} arr   Array that may or may not hold the object\n * @param  {Object} obj  An object that has a key-value pair unique to and identical to a key-value pair in the object you want to find\n * @return {Number}      The index of the object in the array, or -1\n */\n\n\nfunction indexOfObject(arr, obj) {\n  for (var i in arr) {\n    if (!arr.hasOwnProperty(i)) continue;\n\n    for (var key in obj) {\n      if (obj.hasOwnProperty(key) && obj[key] === arr[i][key]) return Number(i);\n    }\n  }\n\n  return -1;\n}\n\nfunction getParentAutoScrollElement(el, includeSelf) {\n  // skip to window\n  if (!el || !el.getBoundingClientRect) return getWindowScrollingElement();\n  var elem = el;\n  var gotSelf = false;\n\n  do {\n    // we don't need to get elem css if it isn't even overflowing in the first place (performance)\n    if (elem.clientWidth < elem.scrollWidth || elem.clientHeight < elem.scrollHeight) {\n      var elemCSS = css(elem);\n\n      if (elem.clientWidth < elem.scrollWidth && (elemCSS.overflowX == 'auto' || elemCSS.overflowX == 'scroll') || elem.clientHeight < elem.scrollHeight && (elemCSS.overflowY == 'auto' || elemCSS.overflowY == 'scroll')) {\n        if (!elem.getBoundingClientRect || elem === document.body) return getWindowScrollingElement();\n        if (gotSelf || includeSelf) return elem;\n        gotSelf = true;\n      }\n    }\n    /* jshint boss:true */\n\n  } while (elem = elem.parentNode);\n\n  return getWindowScrollingElement();\n}\n\nfunction extend(dst, src) {\n  if (dst && src) {\n    for (var key in src) {\n      if (src.hasOwnProperty(key)) {\n        dst[key] = src[key];\n      }\n    }\n  }\n\n  return dst;\n}\n\nfunction isRectEqual(rect1, rect2) {\n  return Math.round(rect1.top) === Math.round(rect2.top) && Math.round(rect1.left) === Math.round(rect2.left) && Math.round(rect1.height) === Math.round(rect2.height) && Math.round(rect1.width) === Math.round(rect2.width);\n}\n\nvar _throttleTimeout;\n\nfunction throttle(callback, ms) {\n  return function () {\n    if (!_throttleTimeout) {\n      var args = arguments,\n          _this = this;\n\n      if (args.length === 1) {\n        callback.call(_this, args[0]);\n      } else {\n        callback.apply(_this, args);\n      }\n\n      _throttleTimeout = setTimeout(function () {\n        _throttleTimeout = void 0;\n      }, ms);\n    }\n  };\n}\n\nfunction cancelThrottle() {\n  clearTimeout(_throttleTimeout);\n  _throttleTimeout = void 0;\n}\n\nfunction scrollBy(el, x, y) {\n  el.scrollLeft += x;\n  el.scrollTop += y;\n}\n\nfunction clone(el) {\n  var Polymer = window.Polymer;\n  var $ = window.jQuery || window.Zepto;\n\n  if (Polymer && Polymer.dom) {\n    return Polymer.dom(el).cloneNode(true);\n  } else if ($) {\n    return $(el).clone(true)[0];\n  } else {\n    return el.cloneNode(true);\n  }\n}\n\nfunction setRect(el, rect) {\n  css(el, 'position', 'absolute');\n  css(el, 'top', rect.top);\n  css(el, 'left', rect.left);\n  css(el, 'width', rect.width);\n  css(el, 'height', rect.height);\n}\n\nfunction unsetRect(el) {\n  css(el, 'position', '');\n  css(el, 'top', '');\n  css(el, 'left', '');\n  css(el, 'width', '');\n  css(el, 'height', '');\n}\n\nvar expando = 'Sortable' + new Date().getTime();\n\nfunction AnimationStateManager() {\n  var animationStates = [],\n      animationCallbackId;\n  return {\n    captureAnimationState: function captureAnimationState() {\n      animationStates = [];\n      if (!this.options.animation) return;\n      var children = [].slice.call(this.el.children);\n      children.forEach(function (child) {\n        if (css(child, 'display') === 'none' || child === Sortable.ghost) return;\n        animationStates.push({\n          target: child,\n          rect: getRect(child)\n        });\n\n        var fromRect = _objectSpread2({}, animationStates[animationStates.length - 1].rect); // If animating: compensate for current animation\n\n\n        if (child.thisAnimationDuration) {\n          var childMatrix = matrix(child, true);\n\n          if (childMatrix) {\n            fromRect.top -= childMatrix.f;\n            fromRect.left -= childMatrix.e;\n          }\n        }\n\n        child.fromRect = fromRect;\n      });\n    },\n    addAnimationState: function addAnimationState(state) {\n      animationStates.push(state);\n    },\n    removeAnimationState: function removeAnimationState(target) {\n      animationStates.splice(indexOfObject(animationStates, {\n        target: target\n      }), 1);\n    },\n    animateAll: function animateAll(callback) {\n      var _this = this;\n\n      if (!this.options.animation) {\n        clearTimeout(animationCallbackId);\n        if (typeof callback === 'function') callback();\n        return;\n      }\n\n      var animating = false,\n          animationTime = 0;\n      animationStates.forEach(function (state) {\n        var time = 0,\n            target = state.target,\n            fromRect = target.fromRect,\n            toRect = getRect(target),\n            prevFromRect = target.prevFromRect,\n            prevToRect = target.prevToRect,\n            animatingRect = state.rect,\n            targetMatrix = matrix(target, true);\n\n        if (targetMatrix) {\n          // Compensate for current animation\n          toRect.top -= targetMatrix.f;\n          toRect.left -= targetMatrix.e;\n        }\n\n        target.toRect = toRect;\n\n        if (target.thisAnimationDuration) {\n          // Could also check if animatingRect is between fromRect and toRect\n          if (isRectEqual(prevFromRect, toRect) && !isRectEqual(fromRect, toRect) && // Make sure animatingRect is on line between toRect & fromRect\n          (animatingRect.top - toRect.top) / (animatingRect.left - toRect.left) === (fromRect.top - toRect.top) / (fromRect.left - toRect.left)) {\n            // If returning to same place as started from animation and on same axis\n            time = calculateRealTime(animatingRect, prevFromRect, prevToRect, _this.options);\n          }\n        } // if fromRect != toRect: animate\n\n\n        if (!isRectEqual(toRect, fromRect)) {\n          target.prevFromRect = fromRect;\n          target.prevToRect = toRect;\n\n          if (!time) {\n            time = _this.options.animation;\n          }\n\n          _this.animate(target, animatingRect, toRect, time);\n        }\n\n        if (time) {\n          animating = true;\n          animationTime = Math.max(animationTime, time);\n          clearTimeout(target.animationResetTimer);\n          target.animationResetTimer = setTimeout(function () {\n            target.animationTime = 0;\n            target.prevFromRect = null;\n            target.fromRect = null;\n            target.prevToRect = null;\n            target.thisAnimationDuration = null;\n          }, time);\n          target.thisAnimationDuration = time;\n        }\n      });\n      clearTimeout(animationCallbackId);\n\n      if (!animating) {\n        if (typeof callback === 'function') callback();\n      } else {\n        animationCallbackId = setTimeout(function () {\n          if (typeof callback === 'function') callback();\n        }, animationTime);\n      }\n\n      animationStates = [];\n    },\n    animate: function animate(target, currentRect, toRect, duration) {\n      if (duration) {\n        css(target, 'transition', '');\n        css(target, 'transform', '');\n        var elMatrix = matrix(this.el),\n            scaleX = elMatrix && elMatrix.a,\n            scaleY = elMatrix && elMatrix.d,\n            translateX = (currentRect.left - toRect.left) / (scaleX || 1),\n            translateY = (currentRect.top - toRect.top) / (scaleY || 1);\n        target.animatingX = !!translateX;\n        target.animatingY = !!translateY;\n        css(target, 'transform', 'translate3d(' + translateX + 'px,' + translateY + 'px,0)');\n        this.forRepaintDummy = repaint(target); // repaint\n\n        css(target, 'transition', 'transform ' + duration + 'ms' + (this.options.easing ? ' ' + this.options.easing : ''));\n        css(target, 'transform', 'translate3d(0,0,0)');\n        typeof target.animated === 'number' && clearTimeout(target.animated);\n        target.animated = setTimeout(function () {\n          css(target, 'transition', '');\n          css(target, 'transform', '');\n          target.animated = false;\n          target.animatingX = false;\n          target.animatingY = false;\n        }, duration);\n      }\n    }\n  };\n}\n\nfunction repaint(target) {\n  return target.offsetWidth;\n}\n\nfunction calculateRealTime(animatingRect, fromRect, toRect, options) {\n  return Math.sqrt(Math.pow(fromRect.top - animatingRect.top, 2) + Math.pow(fromRect.left - animatingRect.left, 2)) / Math.sqrt(Math.pow(fromRect.top - toRect.top, 2) + Math.pow(fromRect.left - toRect.left, 2)) * options.animation;\n}\n\nvar plugins = [];\nvar defaults = {\n  initializeByDefault: true\n};\nvar PluginManager = {\n  mount: function mount(plugin) {\n    // Set default static properties\n    for (var option in defaults) {\n      if (defaults.hasOwnProperty(option) && !(option in plugin)) {\n        plugin[option] = defaults[option];\n      }\n    }\n\n    plugins.forEach(function (p) {\n      if (p.pluginName === plugin.pluginName) {\n        throw \"Sortable: Cannot mount plugin \".concat(plugin.pluginName, \" more than once\");\n      }\n    });\n    plugins.push(plugin);\n  },\n  pluginEvent: function pluginEvent(eventName, sortable, evt) {\n    var _this = this;\n\n    this.eventCanceled = false;\n\n    evt.cancel = function () {\n      _this.eventCanceled = true;\n    };\n\n    var eventNameGlobal = eventName + 'Global';\n    plugins.forEach(function (plugin) {\n      if (!sortable[plugin.pluginName]) return; // Fire global events if it exists in this sortable\n\n      if (sortable[plugin.pluginName][eventNameGlobal]) {\n        sortable[plugin.pluginName][eventNameGlobal](_objectSpread2({\n          sortable: sortable\n        }, evt));\n      } // Only fire plugin event if plugin is enabled in this sortable,\n      // and plugin has event defined\n\n\n      if (sortable.options[plugin.pluginName] && sortable[plugin.pluginName][eventName]) {\n        sortable[plugin.pluginName][eventName](_objectSpread2({\n          sortable: sortable\n        }, evt));\n      }\n    });\n  },\n  initializePlugins: function initializePlugins(sortable, el, defaults, options) {\n    plugins.forEach(function (plugin) {\n      var pluginName = plugin.pluginName;\n      if (!sortable.options[pluginName] && !plugin.initializeByDefault) return;\n      var initialized = new plugin(sortable, el, sortable.options);\n      initialized.sortable = sortable;\n      initialized.options = sortable.options;\n      sortable[pluginName] = initialized; // Add default options from plugin\n\n      _extends(defaults, initialized.defaults);\n    });\n\n    for (var option in sortable.options) {\n      if (!sortable.options.hasOwnProperty(option)) continue;\n      var modified = this.modifyOption(sortable, option, sortable.options[option]);\n\n      if (typeof modified !== 'undefined') {\n        sortable.options[option] = modified;\n      }\n    }\n  },\n  getEventProperties: function getEventProperties(name, sortable) {\n    var eventProperties = {};\n    plugins.forEach(function (plugin) {\n      if (typeof plugin.eventProperties !== 'function') return;\n\n      _extends(eventProperties, plugin.eventProperties.call(sortable[plugin.pluginName], name));\n    });\n    return eventProperties;\n  },\n  modifyOption: function modifyOption(sortable, name, value) {\n    var modifiedValue;\n    plugins.forEach(function (plugin) {\n      // Plugin must exist on the Sortable\n      if (!sortable[plugin.pluginName]) return; // If static option listener exists for this option, call in the context of the Sortable's instance of this plugin\n\n      if (plugin.optionListeners && typeof plugin.optionListeners[name] === 'function') {\n        modifiedValue = plugin.optionListeners[name].call(sortable[plugin.pluginName], value);\n      }\n    });\n    return modifiedValue;\n  }\n};\n\nfunction dispatchEvent(_ref) {\n  var sortable = _ref.sortable,\n      rootEl = _ref.rootEl,\n      name = _ref.name,\n      targetEl = _ref.targetEl,\n      cloneEl = _ref.cloneEl,\n      toEl = _ref.toEl,\n      fromEl = _ref.fromEl,\n      oldIndex = _ref.oldIndex,\n      newIndex = _ref.newIndex,\n      oldDraggableIndex = _ref.oldDraggableIndex,\n      newDraggableIndex = _ref.newDraggableIndex,\n      originalEvent = _ref.originalEvent,\n      putSortable = _ref.putSortable,\n      extraEventProperties = _ref.extraEventProperties;\n  sortable = sortable || rootEl && rootEl[expando];\n  if (!sortable) return;\n  var evt,\n      options = sortable.options,\n      onName = 'on' + name.charAt(0).toUpperCase() + name.substr(1); // Support for new CustomEvent feature\n\n  if (window.CustomEvent && !IE11OrLess && !Edge) {\n    evt = new CustomEvent(name, {\n      bubbles: true,\n      cancelable: true\n    });\n  } else {\n    evt = document.createEvent('Event');\n    evt.initEvent(name, true, true);\n  }\n\n  evt.to = toEl || rootEl;\n  evt.from = fromEl || rootEl;\n  evt.item = targetEl || rootEl;\n  evt.clone = cloneEl;\n  evt.oldIndex = oldIndex;\n  evt.newIndex = newIndex;\n  evt.oldDraggableIndex = oldDraggableIndex;\n  evt.newDraggableIndex = newDraggableIndex;\n  evt.originalEvent = originalEvent;\n  evt.pullMode = putSortable ? putSortable.lastPutMode : undefined;\n\n  var allEventProperties = _objectSpread2(_objectSpread2({}, extraEventProperties), PluginManager.getEventProperties(name, sortable));\n\n  for (var option in allEventProperties) {\n    evt[option] = allEventProperties[option];\n  }\n\n  if (rootEl) {\n    rootEl.dispatchEvent(evt);\n  }\n\n  if (options[onName]) {\n    options[onName].call(sortable, evt);\n  }\n}\n\nvar _excluded = [\"evt\"];\n\nvar pluginEvent = function pluginEvent(eventName, sortable) {\n  var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n      originalEvent = _ref.evt,\n      data = _objectWithoutProperties(_ref, _excluded);\n\n  PluginManager.pluginEvent.bind(Sortable)(eventName, sortable, _objectSpread2({\n    dragEl: dragEl,\n    parentEl: parentEl,\n    ghostEl: ghostEl,\n    rootEl: rootEl,\n    nextEl: nextEl,\n    lastDownEl: lastDownEl,\n    cloneEl: cloneEl,\n    cloneHidden: cloneHidden,\n    dragStarted: moved,\n    putSortable: putSortable,\n    activeSortable: Sortable.active,\n    originalEvent: originalEvent,\n    oldIndex: oldIndex,\n    oldDraggableIndex: oldDraggableIndex,\n    newIndex: newIndex,\n    newDraggableIndex: newDraggableIndex,\n    hideGhostForTarget: _hideGhostForTarget,\n    unhideGhostForTarget: _unhideGhostForTarget,\n    cloneNowHidden: function cloneNowHidden() {\n      cloneHidden = true;\n    },\n    cloneNowShown: function cloneNowShown() {\n      cloneHidden = false;\n    },\n    dispatchSortableEvent: function dispatchSortableEvent(name) {\n      _dispatchEvent({\n        sortable: sortable,\n        name: name,\n        originalEvent: originalEvent\n      });\n    }\n  }, data));\n};\n\nfunction _dispatchEvent(info) {\n  dispatchEvent(_objectSpread2({\n    putSortable: putSortable,\n    cloneEl: cloneEl,\n    targetEl: dragEl,\n    rootEl: rootEl,\n    oldIndex: oldIndex,\n    oldDraggableIndex: oldDraggableIndex,\n    newIndex: newIndex,\n    newDraggableIndex: newDraggableIndex\n  }, info));\n}\n\nvar dragEl,\n    parentEl,\n    ghostEl,\n    rootEl,\n    nextEl,\n    lastDownEl,\n    cloneEl,\n    cloneHidden,\n    oldIndex,\n    newIndex,\n    oldDraggableIndex,\n    newDraggableIndex,\n    activeGroup,\n    putSortable,\n    awaitingDragStarted = false,\n    ignoreNextClick = false,\n    sortables = [],\n    tapEvt,\n    touchEvt,\n    lastDx,\n    lastDy,\n    tapDistanceLeft,\n    tapDistanceTop,\n    moved,\n    lastTarget,\n    lastDirection,\n    pastFirstInvertThresh = false,\n    isCircumstantialInvert = false,\n    targetMoveDistance,\n    // For positioning ghost absolutely\nghostRelativeParent,\n    ghostRelativeParentInitialScroll = [],\n    // (left, top)\n_silent = false,\n    savedInputChecked = [];\n/** @const */\n\nvar documentExists = typeof document !== 'undefined',\n    PositionGhostAbsolutely = IOS,\n    CSSFloatProperty = Edge || IE11OrLess ? 'cssFloat' : 'float',\n    // This will not pass for IE9, because IE9 DnD only works on anchors\nsupportDraggable = documentExists && !ChromeForAndroid && !IOS && 'draggable' in document.createElement('div'),\n    supportCssPointerEvents = function () {\n  if (!documentExists) return; // false when <= IE11\n\n  if (IE11OrLess) {\n    return false;\n  }\n\n  var el = document.createElement('x');\n  el.style.cssText = 'pointer-events:auto';\n  return el.style.pointerEvents === 'auto';\n}(),\n    _detectDirection = function _detectDirection(el, options) {\n  var elCSS = css(el),\n      elWidth = parseInt(elCSS.width) - parseInt(elCSS.paddingLeft) - parseInt(elCSS.paddingRight) - parseInt(elCSS.borderLeftWidth) - parseInt(elCSS.borderRightWidth),\n      child1 = getChild(el, 0, options),\n      child2 = getChild(el, 1, options),\n      firstChildCSS = child1 && css(child1),\n      secondChildCSS = child2 && css(child2),\n      firstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + getRect(child1).width,\n      secondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + getRect(child2).width;\n\n  if (elCSS.display === 'flex') {\n    return elCSS.flexDirection === 'column' || elCSS.flexDirection === 'column-reverse' ? 'vertical' : 'horizontal';\n  }\n\n  if (elCSS.display === 'grid') {\n    return elCSS.gridTemplateColumns.split(' ').length <= 1 ? 'vertical' : 'horizontal';\n  }\n\n  if (child1 && firstChildCSS[\"float\"] && firstChildCSS[\"float\"] !== 'none') {\n    var touchingSideChild2 = firstChildCSS[\"float\"] === 'left' ? 'left' : 'right';\n    return child2 && (secondChildCSS.clear === 'both' || secondChildCSS.clear === touchingSideChild2) ? 'vertical' : 'horizontal';\n  }\n\n  return child1 && (firstChildCSS.display === 'block' || firstChildCSS.display === 'flex' || firstChildCSS.display === 'table' || firstChildCSS.display === 'grid' || firstChildWidth >= elWidth && elCSS[CSSFloatProperty] === 'none' || child2 && elCSS[CSSFloatProperty] === 'none' && firstChildWidth + secondChildWidth > elWidth) ? 'vertical' : 'horizontal';\n},\n    _dragElInRowColumn = function _dragElInRowColumn(dragRect, targetRect, vertical) {\n  var dragElS1Opp = vertical ? dragRect.left : dragRect.top,\n      dragElS2Opp = vertical ? dragRect.right : dragRect.bottom,\n      dragElOppLength = vertical ? dragRect.width : dragRect.height,\n      targetS1Opp = vertical ? targetRect.left : targetRect.top,\n      targetS2Opp = vertical ? targetRect.right : targetRect.bottom,\n      targetOppLength = vertical ? targetRect.width : targetRect.height;\n  return dragElS1Opp === targetS1Opp || dragElS2Opp === targetS2Opp || dragElS1Opp + dragElOppLength / 2 === targetS1Opp + targetOppLength / 2;\n},\n\n/**\r\n * Detects first nearest empty sortable to X and Y position using emptyInsertThreshold.\r\n * @param  {Number} x      X position\r\n * @param  {Number} y      Y position\r\n * @return {HTMLElement}   Element of the first found nearest Sortable\r\n */\n_detectNearestEmptySortable = function _detectNearestEmptySortable(x, y) {\n  var ret;\n  sortables.some(function (sortable) {\n    var threshold = sortable[expando].options.emptyInsertThreshold;\n    if (!threshold || lastChild(sortable)) return;\n    var rect = getRect(sortable),\n        insideHorizontally = x >= rect.left - threshold && x <= rect.right + threshold,\n        insideVertically = y >= rect.top - threshold && y <= rect.bottom + threshold;\n\n    if (insideHorizontally && insideVertically) {\n      return ret = sortable;\n    }\n  });\n  return ret;\n},\n    _prepareGroup = function _prepareGroup(options) {\n  function toFn(value, pull) {\n    return function (to, from, dragEl, evt) {\n      var sameGroup = to.options.group.name && from.options.group.name && to.options.group.name === from.options.group.name;\n\n      if (value == null && (pull || sameGroup)) {\n        // Default pull value\n        // Default pull and put value if same group\n        return true;\n      } else if (value == null || value === false) {\n        return false;\n      } else if (pull && value === 'clone') {\n        return value;\n      } else if (typeof value === 'function') {\n        return toFn(value(to, from, dragEl, evt), pull)(to, from, dragEl, evt);\n      } else {\n        var otherGroup = (pull ? to : from).options.group.name;\n        return value === true || typeof value === 'string' && value === otherGroup || value.join && value.indexOf(otherGroup) > -1;\n      }\n    };\n  }\n\n  var group = {};\n  var originalGroup = options.group;\n\n  if (!originalGroup || _typeof(originalGroup) != 'object') {\n    originalGroup = {\n      name: originalGroup\n    };\n  }\n\n  group.name = originalGroup.name;\n  group.checkPull = toFn(originalGroup.pull, true);\n  group.checkPut = toFn(originalGroup.put);\n  group.revertClone = originalGroup.revertClone;\n  options.group = group;\n},\n    _hideGhostForTarget = function _hideGhostForTarget() {\n  if (!supportCssPointerEvents && ghostEl) {\n    css(ghostEl, 'display', 'none');\n  }\n},\n    _unhideGhostForTarget = function _unhideGhostForTarget() {\n  if (!supportCssPointerEvents && ghostEl) {\n    css(ghostEl, 'display', '');\n  }\n}; // #1184 fix - Prevent click event on fallback if dragged but item not changed position\n\n\nif (documentExists && !ChromeForAndroid) {\n  document.addEventListener('click', function (evt) {\n    if (ignoreNextClick) {\n      evt.preventDefault();\n      evt.stopPropagation && evt.stopPropagation();\n      evt.stopImmediatePropagation && evt.stopImmediatePropagation();\n      ignoreNextClick = false;\n      return false;\n    }\n  }, true);\n}\n\nvar nearestEmptyInsertDetectEvent = function nearestEmptyInsertDetectEvent(evt) {\n  if (dragEl) {\n    evt = evt.touches ? evt.touches[0] : evt;\n\n    var nearest = _detectNearestEmptySortable(evt.clientX, evt.clientY);\n\n    if (nearest) {\n      // Create imitation event\n      var event = {};\n\n      for (var i in evt) {\n        if (evt.hasOwnProperty(i)) {\n          event[i] = evt[i];\n        }\n      }\n\n      event.target = event.rootEl = nearest;\n      event.preventDefault = void 0;\n      event.stopPropagation = void 0;\n\n      nearest[expando]._onDragOver(event);\n    }\n  }\n};\n\nvar _checkOutsideTargetEl = function _checkOutsideTargetEl(evt) {\n  if (dragEl) {\n    dragEl.parentNode[expando]._isOutsideThisEl(evt.target);\n  }\n};\n/**\r\n * @class  Sortable\r\n * @param  {HTMLElement}  el\r\n * @param  {Object}       [options]\r\n */\n\n\nfunction Sortable(el, options) {\n  if (!(el && el.nodeType && el.nodeType === 1)) {\n    throw \"Sortable: `el` must be an HTMLElement, not \".concat({}.toString.call(el));\n  }\n\n  this.el = el; // root element\n\n  this.options = options = _extends({}, options); // Export instance\n\n  el[expando] = this;\n  var defaults = {\n    group: null,\n    sort: true,\n    disabled: false,\n    store: null,\n    handle: null,\n    draggable: /^[uo]l$/i.test(el.nodeName) ? '>li' : '>*',\n    swapThreshold: 1,\n    // percentage; 0 <= x <= 1\n    invertSwap: false,\n    // invert always\n    invertedSwapThreshold: null,\n    // will be set to same as swapThreshold if default\n    removeCloneOnHide: true,\n    direction: function direction() {\n      return _detectDirection(el, this.options);\n    },\n    ghostClass: 'sortable-ghost',\n    chosenClass: 'sortable-chosen',\n    dragClass: 'sortable-drag',\n    ignore: 'a, img',\n    filter: null,\n    preventOnFilter: true,\n    animation: 0,\n    easing: null,\n    setData: function setData(dataTransfer, dragEl) {\n      dataTransfer.setData('Text', dragEl.textContent);\n    },\n    dropBubble: false,\n    dragoverBubble: false,\n    dataIdAttr: 'data-id',\n    delay: 0,\n    delayOnTouchOnly: false,\n    touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,\n    forceFallback: false,\n    fallbackClass: 'sortable-fallback',\n    fallbackOnBody: false,\n    fallbackTolerance: 0,\n    fallbackOffset: {\n      x: 0,\n      y: 0\n    },\n    supportPointer: Sortable.supportPointer !== false && 'PointerEvent' in window && !Safari,\n    emptyInsertThreshold: 5\n  };\n  PluginManager.initializePlugins(this, el, defaults); // Set default options\n\n  for (var name in defaults) {\n    !(name in options) && (options[name] = defaults[name]);\n  }\n\n  _prepareGroup(options); // Bind all private methods\n\n\n  for (var fn in this) {\n    if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n      this[fn] = this[fn].bind(this);\n    }\n  } // Setup drag mode\n\n\n  this.nativeDraggable = options.forceFallback ? false : supportDraggable;\n\n  if (this.nativeDraggable) {\n    // Touch start threshold cannot be greater than the native dragstart threshold\n    this.options.touchStartThreshold = 1;\n  } // Bind events\n\n\n  if (options.supportPointer) {\n    on(el, 'pointerdown', this._onTapStart);\n  } else {\n    on(el, 'mousedown', this._onTapStart);\n    on(el, 'touchstart', this._onTapStart);\n  }\n\n  if (this.nativeDraggable) {\n    on(el, 'dragover', this);\n    on(el, 'dragenter', this);\n  }\n\n  sortables.push(this.el); // Restore sorting\n\n  options.store && options.store.get && this.sort(options.store.get(this) || []); // Add animation state manager\n\n  _extends(this, AnimationStateManager());\n}\n\nSortable.prototype =\n/** @lends Sortable.prototype */\n{\n  constructor: Sortable,\n  _isOutsideThisEl: function _isOutsideThisEl(target) {\n    if (!this.el.contains(target) && target !== this.el) {\n      lastTarget = null;\n    }\n  },\n  _getDirection: function _getDirection(evt, target) {\n    return typeof this.options.direction === 'function' ? this.options.direction.call(this, evt, target, dragEl) : this.options.direction;\n  },\n  _onTapStart: function _onTapStart(\n  /** Event|TouchEvent */\n  evt) {\n    if (!evt.cancelable) return;\n\n    var _this = this,\n        el = this.el,\n        options = this.options,\n        preventOnFilter = options.preventOnFilter,\n        type = evt.type,\n        touch = evt.touches && evt.touches[0] || evt.pointerType && evt.pointerType === 'touch' && evt,\n        target = (touch || evt).target,\n        originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target,\n        filter = options.filter;\n\n    _saveInputCheckedState(el); // Don't trigger start event when an element is been dragged, otherwise the evt.oldindex always wrong when set option.group.\n\n\n    if (dragEl) {\n      return;\n    }\n\n    if (/mousedown|pointerdown/.test(type) && evt.button !== 0 || options.disabled) {\n      return; // only left button and enabled\n    } // cancel dnd if original target is content editable\n\n\n    if (originalTarget.isContentEditable) {\n      return;\n    } // Safari ignores further event handling after mousedown\n\n\n    if (!this.nativeDraggable && Safari && target && target.tagName.toUpperCase() === 'SELECT') {\n      return;\n    }\n\n    target = closest(target, options.draggable, el, false);\n\n    if (target && target.animated) {\n      return;\n    }\n\n    if (lastDownEl === target) {\n      // Ignoring duplicate `down`\n      return;\n    } // Get the index of the dragged element within its parent\n\n\n    oldIndex = index(target);\n    oldDraggableIndex = index(target, options.draggable); // Check filter\n\n    if (typeof filter === 'function') {\n      if (filter.call(this, evt, target, this)) {\n        _dispatchEvent({\n          sortable: _this,\n          rootEl: originalTarget,\n          name: 'filter',\n          targetEl: target,\n          toEl: el,\n          fromEl: el\n        });\n\n        pluginEvent('filter', _this, {\n          evt: evt\n        });\n        preventOnFilter && evt.cancelable && evt.preventDefault();\n        return; // cancel dnd\n      }\n    } else if (filter) {\n      filter = filter.split(',').some(function (criteria) {\n        criteria = closest(originalTarget, criteria.trim(), el, false);\n\n        if (criteria) {\n          _dispatchEvent({\n            sortable: _this,\n            rootEl: criteria,\n            name: 'filter',\n            targetEl: target,\n            fromEl: el,\n            toEl: el\n          });\n\n          pluginEvent('filter', _this, {\n            evt: evt\n          });\n          return true;\n        }\n      });\n\n      if (filter) {\n        preventOnFilter && evt.cancelable && evt.preventDefault();\n        return; // cancel dnd\n      }\n    }\n\n    if (options.handle && !closest(originalTarget, options.handle, el, false)) {\n      return;\n    } // Prepare `dragstart`\n\n\n    this._prepareDragStart(evt, touch, target);\n  },\n  _prepareDragStart: function _prepareDragStart(\n  /** Event */\n  evt,\n  /** Touch */\n  touch,\n  /** HTMLElement */\n  target) {\n    var _this = this,\n        el = _this.el,\n        options = _this.options,\n        ownerDocument = el.ownerDocument,\n        dragStartFn;\n\n    if (target && !dragEl && target.parentNode === el) {\n      var dragRect = getRect(target);\n      rootEl = el;\n      dragEl = target;\n      parentEl = dragEl.parentNode;\n      nextEl = dragEl.nextSibling;\n      lastDownEl = target;\n      activeGroup = options.group;\n      Sortable.dragged = dragEl;\n      tapEvt = {\n        target: dragEl,\n        clientX: (touch || evt).clientX,\n        clientY: (touch || evt).clientY\n      };\n      tapDistanceLeft = tapEvt.clientX - dragRect.left;\n      tapDistanceTop = tapEvt.clientY - dragRect.top;\n      this._lastX = (touch || evt).clientX;\n      this._lastY = (touch || evt).clientY;\n      dragEl.style['will-change'] = 'all';\n\n      dragStartFn = function dragStartFn() {\n        pluginEvent('delayEnded', _this, {\n          evt: evt\n        });\n\n        if (Sortable.eventCanceled) {\n          _this._onDrop();\n\n          return;\n        } // Delayed drag has been triggered\n        // we can re-enable the events: touchmove/mousemove\n\n\n        _this._disableDelayedDragEvents();\n\n        if (!FireFox && _this.nativeDraggable) {\n          dragEl.draggable = true;\n        } // Bind the events: dragstart/dragend\n\n\n        _this._triggerDragStart(evt, touch); // Drag start event\n\n\n        _dispatchEvent({\n          sortable: _this,\n          name: 'choose',\n          originalEvent: evt\n        }); // Chosen item\n\n\n        toggleClass(dragEl, options.chosenClass, true);\n      }; // Disable \"draggable\"\n\n\n      options.ignore.split(',').forEach(function (criteria) {\n        find(dragEl, criteria.trim(), _disableDraggable);\n      });\n      on(ownerDocument, 'dragover', nearestEmptyInsertDetectEvent);\n      on(ownerDocument, 'mousemove', nearestEmptyInsertDetectEvent);\n      on(ownerDocument, 'touchmove', nearestEmptyInsertDetectEvent);\n      on(ownerDocument, 'mouseup', _this._onDrop);\n      on(ownerDocument, 'touchend', _this._onDrop);\n      on(ownerDocument, 'touchcancel', _this._onDrop); // Make dragEl draggable (must be before delay for FireFox)\n\n      if (FireFox && this.nativeDraggable) {\n        this.options.touchStartThreshold = 4;\n        dragEl.draggable = true;\n      }\n\n      pluginEvent('delayStart', this, {\n        evt: evt\n      }); // Delay is impossible for native DnD in Edge or IE\n\n      if (options.delay && (!options.delayOnTouchOnly || touch) && (!this.nativeDraggable || !(Edge || IE11OrLess))) {\n        if (Sortable.eventCanceled) {\n          this._onDrop();\n\n          return;\n        } // If the user moves the pointer or let go the click or touch\n        // before the delay has been reached:\n        // disable the delayed drag\n\n\n        on(ownerDocument, 'mouseup', _this._disableDelayedDrag);\n        on(ownerDocument, 'touchend', _this._disableDelayedDrag);\n        on(ownerDocument, 'touchcancel', _this._disableDelayedDrag);\n        on(ownerDocument, 'mousemove', _this._delayedDragTouchMoveHandler);\n        on(ownerDocument, 'touchmove', _this._delayedDragTouchMoveHandler);\n        options.supportPointer && on(ownerDocument, 'pointermove', _this._delayedDragTouchMoveHandler);\n        _this._dragStartTimer = setTimeout(dragStartFn, options.delay);\n      } else {\n        dragStartFn();\n      }\n    }\n  },\n  _delayedDragTouchMoveHandler: function _delayedDragTouchMoveHandler(\n  /** TouchEvent|PointerEvent **/\n  e) {\n    var touch = e.touches ? e.touches[0] : e;\n\n    if (Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1))) {\n      this._disableDelayedDrag();\n    }\n  },\n  _disableDelayedDrag: function _disableDelayedDrag() {\n    dragEl && _disableDraggable(dragEl);\n    clearTimeout(this._dragStartTimer);\n\n    this._disableDelayedDragEvents();\n  },\n  _disableDelayedDragEvents: function _disableDelayedDragEvents() {\n    var ownerDocument = this.el.ownerDocument;\n    off(ownerDocument, 'mouseup', this._disableDelayedDrag);\n    off(ownerDocument, 'touchend', this._disableDelayedDrag);\n    off(ownerDocument, 'touchcancel', this._disableDelayedDrag);\n    off(ownerDocument, 'mousemove', this._delayedDragTouchMoveHandler);\n    off(ownerDocument, 'touchmove', this._delayedDragTouchMoveHandler);\n    off(ownerDocument, 'pointermove', this._delayedDragTouchMoveHandler);\n  },\n  _triggerDragStart: function _triggerDragStart(\n  /** Event */\n  evt,\n  /** Touch */\n  touch) {\n    touch = touch || evt.pointerType == 'touch' && evt;\n\n    if (!this.nativeDraggable || touch) {\n      if (this.options.supportPointer) {\n        on(document, 'pointermove', this._onTouchMove);\n      } else if (touch) {\n        on(document, 'touchmove', this._onTouchMove);\n      } else {\n        on(document, 'mousemove', this._onTouchMove);\n      }\n    } else {\n      on(dragEl, 'dragend', this);\n      on(rootEl, 'dragstart', this._onDragStart);\n    }\n\n    try {\n      if (document.selection) {\n        // Timeout neccessary for IE9\n        _nextTick(function () {\n          document.selection.empty();\n        });\n      } else {\n        window.getSelection().removeAllRanges();\n      }\n    } catch (err) {}\n  },\n  _dragStarted: function _dragStarted(fallback, evt) {\n\n    awaitingDragStarted = false;\n\n    if (rootEl && dragEl) {\n      pluginEvent('dragStarted', this, {\n        evt: evt\n      });\n\n      if (this.nativeDraggable) {\n        on(document, 'dragover', _checkOutsideTargetEl);\n      }\n\n      var options = this.options; // Apply effect\n\n      !fallback && toggleClass(dragEl, options.dragClass, false);\n      toggleClass(dragEl, options.ghostClass, true);\n      Sortable.active = this;\n      fallback && this._appendGhost(); // Drag start event\n\n      _dispatchEvent({\n        sortable: this,\n        name: 'start',\n        originalEvent: evt\n      });\n    } else {\n      this._nulling();\n    }\n  },\n  _emulateDragOver: function _emulateDragOver() {\n    if (touchEvt) {\n      this._lastX = touchEvt.clientX;\n      this._lastY = touchEvt.clientY;\n\n      _hideGhostForTarget();\n\n      var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY);\n      var parent = target;\n\n      while (target && target.shadowRoot) {\n        target = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY);\n        if (target === parent) break;\n        parent = target;\n      }\n\n      dragEl.parentNode[expando]._isOutsideThisEl(target);\n\n      if (parent) {\n        do {\n          if (parent[expando]) {\n            var inserted = void 0;\n            inserted = parent[expando]._onDragOver({\n              clientX: touchEvt.clientX,\n              clientY: touchEvt.clientY,\n              target: target,\n              rootEl: parent\n            });\n\n            if (inserted && !this.options.dragoverBubble) {\n              break;\n            }\n          }\n\n          target = parent; // store last element\n        }\n        /* jshint boss:true */\n        while (parent = parent.parentNode);\n      }\n\n      _unhideGhostForTarget();\n    }\n  },\n  _onTouchMove: function _onTouchMove(\n  /**TouchEvent*/\n  evt) {\n    if (tapEvt) {\n      var options = this.options,\n          fallbackTolerance = options.fallbackTolerance,\n          fallbackOffset = options.fallbackOffset,\n          touch = evt.touches ? evt.touches[0] : evt,\n          ghostMatrix = ghostEl && matrix(ghostEl, true),\n          scaleX = ghostEl && ghostMatrix && ghostMatrix.a,\n          scaleY = ghostEl && ghostMatrix && ghostMatrix.d,\n          relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent),\n          dx = (touch.clientX - tapEvt.clientX + fallbackOffset.x) / (scaleX || 1) + (relativeScrollOffset ? relativeScrollOffset[0] - ghostRelativeParentInitialScroll[0] : 0) / (scaleX || 1),\n          dy = (touch.clientY - tapEvt.clientY + fallbackOffset.y) / (scaleY || 1) + (relativeScrollOffset ? relativeScrollOffset[1] - ghostRelativeParentInitialScroll[1] : 0) / (scaleY || 1); // only set the status to dragging, when we are actually dragging\n\n      if (!Sortable.active && !awaitingDragStarted) {\n        if (fallbackTolerance && Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) < fallbackTolerance) {\n          return;\n        }\n\n        this._onDragStart(evt, true);\n      }\n\n      if (ghostEl) {\n        if (ghostMatrix) {\n          ghostMatrix.e += dx - (lastDx || 0);\n          ghostMatrix.f += dy - (lastDy || 0);\n        } else {\n          ghostMatrix = {\n            a: 1,\n            b: 0,\n            c: 0,\n            d: 1,\n            e: dx,\n            f: dy\n          };\n        }\n\n        var cssMatrix = \"matrix(\".concat(ghostMatrix.a, \",\").concat(ghostMatrix.b, \",\").concat(ghostMatrix.c, \",\").concat(ghostMatrix.d, \",\").concat(ghostMatrix.e, \",\").concat(ghostMatrix.f, \")\");\n        css(ghostEl, 'webkitTransform', cssMatrix);\n        css(ghostEl, 'mozTransform', cssMatrix);\n        css(ghostEl, 'msTransform', cssMatrix);\n        css(ghostEl, 'transform', cssMatrix);\n        lastDx = dx;\n        lastDy = dy;\n        touchEvt = touch;\n      }\n\n      evt.cancelable && evt.preventDefault();\n    }\n  },\n  _appendGhost: function _appendGhost() {\n    // Bug if using scale(): https://stackoverflow.com/questions/2637058\n    // Not being adjusted for\n    if (!ghostEl) {\n      var container = this.options.fallbackOnBody ? document.body : rootEl,\n          rect = getRect(dragEl, true, PositionGhostAbsolutely, true, container),\n          options = this.options; // Position absolutely\n\n      if (PositionGhostAbsolutely) {\n        // Get relatively positioned parent\n        ghostRelativeParent = container;\n\n        while (css(ghostRelativeParent, 'position') === 'static' && css(ghostRelativeParent, 'transform') === 'none' && ghostRelativeParent !== document) {\n          ghostRelativeParent = ghostRelativeParent.parentNode;\n        }\n\n        if (ghostRelativeParent !== document.body && ghostRelativeParent !== document.documentElement) {\n          if (ghostRelativeParent === document) ghostRelativeParent = getWindowScrollingElement();\n          rect.top += ghostRelativeParent.scrollTop;\n          rect.left += ghostRelativeParent.scrollLeft;\n        } else {\n          ghostRelativeParent = getWindowScrollingElement();\n        }\n\n        ghostRelativeParentInitialScroll = getRelativeScrollOffset(ghostRelativeParent);\n      }\n\n      ghostEl = dragEl.cloneNode(true);\n      toggleClass(ghostEl, options.ghostClass, false);\n      toggleClass(ghostEl, options.fallbackClass, true);\n      toggleClass(ghostEl, options.dragClass, true);\n      css(ghostEl, 'transition', '');\n      css(ghostEl, 'transform', '');\n      css(ghostEl, 'box-sizing', 'border-box');\n      css(ghostEl, 'margin', 0);\n      css(ghostEl, 'top', rect.top);\n      css(ghostEl, 'left', rect.left);\n      css(ghostEl, 'width', rect.width);\n      css(ghostEl, 'height', rect.height);\n      css(ghostEl, 'opacity', '0.8');\n      css(ghostEl, 'position', PositionGhostAbsolutely ? 'absolute' : 'fixed');\n      css(ghostEl, 'zIndex', '100000');\n      css(ghostEl, 'pointerEvents', 'none');\n      Sortable.ghost = ghostEl;\n      container.appendChild(ghostEl); // Set transform-origin\n\n      css(ghostEl, 'transform-origin', tapDistanceLeft / parseInt(ghostEl.style.width) * 100 + '% ' + tapDistanceTop / parseInt(ghostEl.style.height) * 100 + '%');\n    }\n  },\n  _onDragStart: function _onDragStart(\n  /**Event*/\n  evt,\n  /**boolean*/\n  fallback) {\n    var _this = this;\n\n    var dataTransfer = evt.dataTransfer;\n    var options = _this.options;\n    pluginEvent('dragStart', this, {\n      evt: evt\n    });\n\n    if (Sortable.eventCanceled) {\n      this._onDrop();\n\n      return;\n    }\n\n    pluginEvent('setupClone', this);\n\n    if (!Sortable.eventCanceled) {\n      cloneEl = clone(dragEl);\n      cloneEl.removeAttribute(\"id\");\n      cloneEl.draggable = false;\n      cloneEl.style['will-change'] = '';\n\n      this._hideClone();\n\n      toggleClass(cloneEl, this.options.chosenClass, false);\n      Sortable.clone = cloneEl;\n    } // #1143: IFrame support workaround\n\n\n    _this.cloneId = _nextTick(function () {\n      pluginEvent('clone', _this);\n      if (Sortable.eventCanceled) return;\n\n      if (!_this.options.removeCloneOnHide) {\n        rootEl.insertBefore(cloneEl, dragEl);\n      }\n\n      _this._hideClone();\n\n      _dispatchEvent({\n        sortable: _this,\n        name: 'clone'\n      });\n    });\n    !fallback && toggleClass(dragEl, options.dragClass, true); // Set proper drop events\n\n    if (fallback) {\n      ignoreNextClick = true;\n      _this._loopId = setInterval(_this._emulateDragOver, 50);\n    } else {\n      // Undo what was set in _prepareDragStart before drag started\n      off(document, 'mouseup', _this._onDrop);\n      off(document, 'touchend', _this._onDrop);\n      off(document, 'touchcancel', _this._onDrop);\n\n      if (dataTransfer) {\n        dataTransfer.effectAllowed = 'move';\n        options.setData && options.setData.call(_this, dataTransfer, dragEl);\n      }\n\n      on(document, 'drop', _this); // #1276 fix:\n\n      css(dragEl, 'transform', 'translateZ(0)');\n    }\n\n    awaitingDragStarted = true;\n    _this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt));\n    on(document, 'selectstart', _this);\n    moved = true;\n\n    if (Safari) {\n      css(document.body, 'user-select', 'none');\n    }\n  },\n  // Returns true - if no further action is needed (either inserted or another condition)\n  _onDragOver: function _onDragOver(\n  /**Event*/\n  evt) {\n    var el = this.el,\n        target = evt.target,\n        dragRect,\n        targetRect,\n        revert,\n        options = this.options,\n        group = options.group,\n        activeSortable = Sortable.active,\n        isOwner = activeGroup === group,\n        canSort = options.sort,\n        fromSortable = putSortable || activeSortable,\n        vertical,\n        _this = this,\n        completedFired = false;\n\n    if (_silent) return;\n\n    function dragOverEvent(name, extra) {\n      pluginEvent(name, _this, _objectSpread2({\n        evt: evt,\n        isOwner: isOwner,\n        axis: vertical ? 'vertical' : 'horizontal',\n        revert: revert,\n        dragRect: dragRect,\n        targetRect: targetRect,\n        canSort: canSort,\n        fromSortable: fromSortable,\n        target: target,\n        completed: completed,\n        onMove: function onMove(target, after) {\n          return _onMove(rootEl, el, dragEl, dragRect, target, getRect(target), evt, after);\n        },\n        changed: changed\n      }, extra));\n    } // Capture animation state\n\n\n    function capture() {\n      dragOverEvent('dragOverAnimationCapture');\n\n      _this.captureAnimationState();\n\n      if (_this !== fromSortable) {\n        fromSortable.captureAnimationState();\n      }\n    } // Return invocation when dragEl is inserted (or completed)\n\n\n    function completed(insertion) {\n      dragOverEvent('dragOverCompleted', {\n        insertion: insertion\n      });\n\n      if (insertion) {\n        // Clones must be hidden before folding animation to capture dragRectAbsolute properly\n        if (isOwner) {\n          activeSortable._hideClone();\n        } else {\n          activeSortable._showClone(_this);\n        }\n\n        if (_this !== fromSortable) {\n          // Set ghost class to new sortable's ghost class\n          toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : activeSortable.options.ghostClass, false);\n          toggleClass(dragEl, options.ghostClass, true);\n        }\n\n        if (putSortable !== _this && _this !== Sortable.active) {\n          putSortable = _this;\n        } else if (_this === Sortable.active && putSortable) {\n          putSortable = null;\n        } // Animation\n\n\n        if (fromSortable === _this) {\n          _this._ignoreWhileAnimating = target;\n        }\n\n        _this.animateAll(function () {\n          dragOverEvent('dragOverAnimationComplete');\n          _this._ignoreWhileAnimating = null;\n        });\n\n        if (_this !== fromSortable) {\n          fromSortable.animateAll();\n          fromSortable._ignoreWhileAnimating = null;\n        }\n      } // Null lastTarget if it is not inside a previously swapped element\n\n\n      if (target === dragEl && !dragEl.animated || target === el && !target.animated) {\n        lastTarget = null;\n      } // no bubbling and not fallback\n\n\n      if (!options.dragoverBubble && !evt.rootEl && target !== document) {\n        dragEl.parentNode[expando]._isOutsideThisEl(evt.target); // Do not detect for empty insert if already inserted\n\n\n        !insertion && nearestEmptyInsertDetectEvent(evt);\n      }\n\n      !options.dragoverBubble && evt.stopPropagation && evt.stopPropagation();\n      return completedFired = true;\n    } // Call when dragEl has been inserted\n\n\n    function changed() {\n      newIndex = index(dragEl);\n      newDraggableIndex = index(dragEl, options.draggable);\n\n      _dispatchEvent({\n        sortable: _this,\n        name: 'change',\n        toEl: el,\n        newIndex: newIndex,\n        newDraggableIndex: newDraggableIndex,\n        originalEvent: evt\n      });\n    }\n\n    if (evt.preventDefault !== void 0) {\n      evt.cancelable && evt.preventDefault();\n    }\n\n    target = closest(target, options.draggable, el, true);\n    dragOverEvent('dragOver');\n    if (Sortable.eventCanceled) return completedFired;\n\n    if (dragEl.contains(evt.target) || target.animated && target.animatingX && target.animatingY || _this._ignoreWhileAnimating === target) {\n      return completed(false);\n    }\n\n    ignoreNextClick = false;\n\n    if (activeSortable && !options.disabled && (isOwner ? canSort || (revert = parentEl !== rootEl) // Reverting item into the original list\n    : putSortable === this || (this.lastPutMode = activeGroup.checkPull(this, activeSortable, dragEl, evt)) && group.checkPut(this, activeSortable, dragEl, evt))) {\n      vertical = this._getDirection(evt, target) === 'vertical';\n      dragRect = getRect(dragEl);\n      dragOverEvent('dragOverValid');\n      if (Sortable.eventCanceled) return completedFired;\n\n      if (revert) {\n        parentEl = rootEl; // actualization\n\n        capture();\n\n        this._hideClone();\n\n        dragOverEvent('revert');\n\n        if (!Sortable.eventCanceled) {\n          if (nextEl) {\n            rootEl.insertBefore(dragEl, nextEl);\n          } else {\n            rootEl.appendChild(dragEl);\n          }\n        }\n\n        return completed(true);\n      }\n\n      var elLastChild = lastChild(el, options.draggable);\n\n      if (!elLastChild || _ghostIsLast(evt, vertical, this) && !elLastChild.animated) {\n        // Insert to end of list\n        // If already at end of list: Do not insert\n        if (elLastChild === dragEl) {\n          return completed(false);\n        } // if there is a last element, it is the target\n\n\n        if (elLastChild && el === evt.target) {\n          target = elLastChild;\n        }\n\n        if (target) {\n          targetRect = getRect(target);\n        }\n\n        if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) {\n          capture();\n\n          if (elLastChild && elLastChild.nextSibling) {\n            // the last draggable element is not the last node\n            el.insertBefore(dragEl, elLastChild.nextSibling);\n          } else {\n            el.appendChild(dragEl);\n          }\n\n          parentEl = el; // actualization\n\n          changed();\n          return completed(true);\n        }\n      } else if (elLastChild && _ghostIsFirst(evt, vertical, this)) {\n        // Insert to start of list\n        var firstChild = getChild(el, 0, options, true);\n\n        if (firstChild === dragEl) {\n          return completed(false);\n        }\n\n        target = firstChild;\n        targetRect = getRect(target);\n\n        if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, false) !== false) {\n          capture();\n          el.insertBefore(dragEl, firstChild);\n          parentEl = el; // actualization\n\n          changed();\n          return completed(true);\n        }\n      } else if (target.parentNode === el) {\n        targetRect = getRect(target);\n        var direction = 0,\n            targetBeforeFirstSwap,\n            differentLevel = dragEl.parentNode !== el,\n            differentRowCol = !_dragElInRowColumn(dragEl.animated && dragEl.toRect || dragRect, target.animated && target.toRect || targetRect, vertical),\n            side1 = vertical ? 'top' : 'left',\n            scrolledPastTop = isScrolledPast(target, 'top', 'top') || isScrolledPast(dragEl, 'top', 'top'),\n            scrollBefore = scrolledPastTop ? scrolledPastTop.scrollTop : void 0;\n\n        if (lastTarget !== target) {\n          targetBeforeFirstSwap = targetRect[side1];\n          pastFirstInvertThresh = false;\n          isCircumstantialInvert = !differentRowCol && options.invertSwap || differentLevel;\n        }\n\n        direction = _getSwapDirection(evt, target, targetRect, vertical, differentRowCol ? 1 : options.swapThreshold, options.invertedSwapThreshold == null ? options.swapThreshold : options.invertedSwapThreshold, isCircumstantialInvert, lastTarget === target);\n        var sibling;\n\n        if (direction !== 0) {\n          // Check if target is beside dragEl in respective direction (ignoring hidden elements)\n          var dragIndex = index(dragEl);\n\n          do {\n            dragIndex -= direction;\n            sibling = parentEl.children[dragIndex];\n          } while (sibling && (css(sibling, 'display') === 'none' || sibling === ghostEl));\n        } // If dragEl is already beside target: Do not insert\n\n\n        if (direction === 0 || sibling === target) {\n          return completed(false);\n        }\n\n        lastTarget = target;\n        lastDirection = direction;\n        var nextSibling = target.nextElementSibling,\n            after = false;\n        after = direction === 1;\n\n        var moveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, after);\n\n        if (moveVector !== false) {\n          if (moveVector === 1 || moveVector === -1) {\n            after = moveVector === 1;\n          }\n\n          _silent = true;\n          setTimeout(_unsilent, 30);\n          capture();\n\n          if (after && !nextSibling) {\n            el.appendChild(dragEl);\n          } else {\n            target.parentNode.insertBefore(dragEl, after ? nextSibling : target);\n          } // Undo chrome's scroll adjustment (has no effect on other browsers)\n\n\n          if (scrolledPastTop) {\n            scrollBy(scrolledPastTop, 0, scrollBefore - scrolledPastTop.scrollTop);\n          }\n\n          parentEl = dragEl.parentNode; // actualization\n          // must be done before animation\n\n          if (targetBeforeFirstSwap !== undefined && !isCircumstantialInvert) {\n            targetMoveDistance = Math.abs(targetBeforeFirstSwap - getRect(target)[side1]);\n          }\n\n          changed();\n          return completed(true);\n        }\n      }\n\n      if (el.contains(dragEl)) {\n        return completed(false);\n      }\n    }\n\n    return false;\n  },\n  _ignoreWhileAnimating: null,\n  _offMoveEvents: function _offMoveEvents() {\n    off(document, 'mousemove', this._onTouchMove);\n    off(document, 'touchmove', this._onTouchMove);\n    off(document, 'pointermove', this._onTouchMove);\n    off(document, 'dragover', nearestEmptyInsertDetectEvent);\n    off(document, 'mousemove', nearestEmptyInsertDetectEvent);\n    off(document, 'touchmove', nearestEmptyInsertDetectEvent);\n  },\n  _offUpEvents: function _offUpEvents() {\n    var ownerDocument = this.el.ownerDocument;\n    off(ownerDocument, 'mouseup', this._onDrop);\n    off(ownerDocument, 'touchend', this._onDrop);\n    off(ownerDocument, 'pointerup', this._onDrop);\n    off(ownerDocument, 'touchcancel', this._onDrop);\n    off(document, 'selectstart', this);\n  },\n  _onDrop: function _onDrop(\n  /**Event*/\n  evt) {\n    var el = this.el,\n        options = this.options; // Get the index of the dragged element within its parent\n\n    newIndex = index(dragEl);\n    newDraggableIndex = index(dragEl, options.draggable);\n    pluginEvent('drop', this, {\n      evt: evt\n    });\n    parentEl = dragEl && dragEl.parentNode; // Get again after plugin event\n\n    newIndex = index(dragEl);\n    newDraggableIndex = index(dragEl, options.draggable);\n\n    if (Sortable.eventCanceled) {\n      this._nulling();\n\n      return;\n    }\n\n    awaitingDragStarted = false;\n    isCircumstantialInvert = false;\n    pastFirstInvertThresh = false;\n    clearInterval(this._loopId);\n    clearTimeout(this._dragStartTimer);\n\n    _cancelNextTick(this.cloneId);\n\n    _cancelNextTick(this._dragStartId); // Unbind events\n\n\n    if (this.nativeDraggable) {\n      off(document, 'drop', this);\n      off(el, 'dragstart', this._onDragStart);\n    }\n\n    this._offMoveEvents();\n\n    this._offUpEvents();\n\n    if (Safari) {\n      css(document.body, 'user-select', '');\n    }\n\n    css(dragEl, 'transform', '');\n\n    if (evt) {\n      if (moved) {\n        evt.cancelable && evt.preventDefault();\n        !options.dropBubble && evt.stopPropagation();\n      }\n\n      ghostEl && ghostEl.parentNode && ghostEl.parentNode.removeChild(ghostEl);\n\n      if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {\n        // Remove clone(s)\n        cloneEl && cloneEl.parentNode && cloneEl.parentNode.removeChild(cloneEl);\n      }\n\n      if (dragEl) {\n        if (this.nativeDraggable) {\n          off(dragEl, 'dragend', this);\n        }\n\n        _disableDraggable(dragEl);\n\n        dragEl.style['will-change'] = ''; // Remove classes\n        // ghostClass is added in dragStarted\n\n        if (moved && !awaitingDragStarted) {\n          toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : this.options.ghostClass, false);\n        }\n\n        toggleClass(dragEl, this.options.chosenClass, false); // Drag stop event\n\n        _dispatchEvent({\n          sortable: this,\n          name: 'unchoose',\n          toEl: parentEl,\n          newIndex: null,\n          newDraggableIndex: null,\n          originalEvent: evt\n        });\n\n        if (rootEl !== parentEl) {\n          if (newIndex >= 0) {\n            // Add event\n            _dispatchEvent({\n              rootEl: parentEl,\n              name: 'add',\n              toEl: parentEl,\n              fromEl: rootEl,\n              originalEvent: evt\n            }); // Remove event\n\n\n            _dispatchEvent({\n              sortable: this,\n              name: 'remove',\n              toEl: parentEl,\n              originalEvent: evt\n            }); // drag from one list and drop into another\n\n\n            _dispatchEvent({\n              rootEl: parentEl,\n              name: 'sort',\n              toEl: parentEl,\n              fromEl: rootEl,\n              originalEvent: evt\n            });\n\n            _dispatchEvent({\n              sortable: this,\n              name: 'sort',\n              toEl: parentEl,\n              originalEvent: evt\n            });\n          }\n\n          putSortable && putSortable.save();\n        } else {\n          if (newIndex !== oldIndex) {\n            if (newIndex >= 0) {\n              // drag & drop within the same list\n              _dispatchEvent({\n                sortable: this,\n                name: 'update',\n                toEl: parentEl,\n                originalEvent: evt\n              });\n\n              _dispatchEvent({\n                sortable: this,\n                name: 'sort',\n                toEl: parentEl,\n                originalEvent: evt\n              });\n            }\n          }\n        }\n\n        if (Sortable.active) {\n          /* jshint eqnull:true */\n          if (newIndex == null || newIndex === -1) {\n            newIndex = oldIndex;\n            newDraggableIndex = oldDraggableIndex;\n          }\n\n          _dispatchEvent({\n            sortable: this,\n            name: 'end',\n            toEl: parentEl,\n            originalEvent: evt\n          }); // Save sorting\n\n\n          this.save();\n        }\n      }\n    }\n\n    this._nulling();\n  },\n  _nulling: function _nulling() {\n    pluginEvent('nulling', this);\n    rootEl = dragEl = parentEl = ghostEl = nextEl = cloneEl = lastDownEl = cloneHidden = tapEvt = touchEvt = moved = newIndex = newDraggableIndex = oldIndex = oldDraggableIndex = lastTarget = lastDirection = putSortable = activeGroup = Sortable.dragged = Sortable.ghost = Sortable.clone = Sortable.active = null;\n    savedInputChecked.forEach(function (el) {\n      el.checked = true;\n    });\n    savedInputChecked.length = lastDx = lastDy = 0;\n  },\n  handleEvent: function handleEvent(\n  /**Event*/\n  evt) {\n    switch (evt.type) {\n      case 'drop':\n      case 'dragend':\n        this._onDrop(evt);\n\n        break;\n\n      case 'dragenter':\n      case 'dragover':\n        if (dragEl) {\n          this._onDragOver(evt);\n\n          _globalDragOver(evt);\n        }\n\n        break;\n\n      case 'selectstart':\n        evt.preventDefault();\n        break;\n    }\n  },\n\n  /**\r\n   * Serializes the item into an array of string.\r\n   * @returns {String[]}\r\n   */\n  toArray: function toArray() {\n    var order = [],\n        el,\n        children = this.el.children,\n        i = 0,\n        n = children.length,\n        options = this.options;\n\n    for (; i < n; i++) {\n      el = children[i];\n\n      if (closest(el, options.draggable, this.el, false)) {\n        order.push(el.getAttribute(options.dataIdAttr) || _generateId(el));\n      }\n    }\n\n    return order;\n  },\n\n  /**\r\n   * Sorts the elements according to the array.\r\n   * @param  {String[]}  order  order of the items\r\n   */\n  sort: function sort(order, useAnimation) {\n    var items = {},\n        rootEl = this.el;\n    this.toArray().forEach(function (id, i) {\n      var el = rootEl.children[i];\n\n      if (closest(el, this.options.draggable, rootEl, false)) {\n        items[id] = el;\n      }\n    }, this);\n    useAnimation && this.captureAnimationState();\n    order.forEach(function (id) {\n      if (items[id]) {\n        rootEl.removeChild(items[id]);\n        rootEl.appendChild(items[id]);\n      }\n    });\n    useAnimation && this.animateAll();\n  },\n\n  /**\r\n   * Save the current sorting\r\n   */\n  save: function save() {\n    var store = this.options.store;\n    store && store.set && store.set(this);\n  },\n\n  /**\r\n   * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.\r\n   * @param   {HTMLElement}  el\r\n   * @param   {String}       [selector]  default: `options.draggable`\r\n   * @returns {HTMLElement|null}\r\n   */\n  closest: function closest$1(el, selector) {\n    return closest(el, selector || this.options.draggable, this.el, false);\n  },\n\n  /**\r\n   * Set/get option\r\n   * @param   {string} name\r\n   * @param   {*}      [value]\r\n   * @returns {*}\r\n   */\n  option: function option(name, value) {\n    var options = this.options;\n\n    if (value === void 0) {\n      return options[name];\n    } else {\n      var modifiedValue = PluginManager.modifyOption(this, name, value);\n\n      if (typeof modifiedValue !== 'undefined') {\n        options[name] = modifiedValue;\n      } else {\n        options[name] = value;\n      }\n\n      if (name === 'group') {\n        _prepareGroup(options);\n      }\n    }\n  },\n\n  /**\r\n   * Destroy\r\n   */\n  destroy: function destroy() {\n    pluginEvent('destroy', this);\n    var el = this.el;\n    el[expando] = null;\n    off(el, 'mousedown', this._onTapStart);\n    off(el, 'touchstart', this._onTapStart);\n    off(el, 'pointerdown', this._onTapStart);\n\n    if (this.nativeDraggable) {\n      off(el, 'dragover', this);\n      off(el, 'dragenter', this);\n    } // Remove draggable attributes\n\n\n    Array.prototype.forEach.call(el.querySelectorAll('[draggable]'), function (el) {\n      el.removeAttribute('draggable');\n    });\n\n    this._onDrop();\n\n    this._disableDelayedDragEvents();\n\n    sortables.splice(sortables.indexOf(this.el), 1);\n    this.el = el = null;\n  },\n  _hideClone: function _hideClone() {\n    if (!cloneHidden) {\n      pluginEvent('hideClone', this);\n      if (Sortable.eventCanceled) return;\n      css(cloneEl, 'display', 'none');\n\n      if (this.options.removeCloneOnHide && cloneEl.parentNode) {\n        cloneEl.parentNode.removeChild(cloneEl);\n      }\n\n      cloneHidden = true;\n    }\n  },\n  _showClone: function _showClone(putSortable) {\n    if (putSortable.lastPutMode !== 'clone') {\n      this._hideClone();\n\n      return;\n    }\n\n    if (cloneHidden) {\n      pluginEvent('showClone', this);\n      if (Sortable.eventCanceled) return; // show clone at dragEl or original position\n\n      if (dragEl.parentNode == rootEl && !this.options.group.revertClone) {\n        rootEl.insertBefore(cloneEl, dragEl);\n      } else if (nextEl) {\n        rootEl.insertBefore(cloneEl, nextEl);\n      } else {\n        rootEl.appendChild(cloneEl);\n      }\n\n      if (this.options.group.revertClone) {\n        this.animate(dragEl, cloneEl);\n      }\n\n      css(cloneEl, 'display', '');\n      cloneHidden = false;\n    }\n  }\n};\n\nfunction _globalDragOver(\n/**Event*/\nevt) {\n  if (evt.dataTransfer) {\n    evt.dataTransfer.dropEffect = 'move';\n  }\n\n  evt.cancelable && evt.preventDefault();\n}\n\nfunction _onMove(fromEl, toEl, dragEl, dragRect, targetEl, targetRect, originalEvent, willInsertAfter) {\n  var evt,\n      sortable = fromEl[expando],\n      onMoveFn = sortable.options.onMove,\n      retVal; // Support for new CustomEvent feature\n\n  if (window.CustomEvent && !IE11OrLess && !Edge) {\n    evt = new CustomEvent('move', {\n      bubbles: true,\n      cancelable: true\n    });\n  } else {\n    evt = document.createEvent('Event');\n    evt.initEvent('move', true, true);\n  }\n\n  evt.to = toEl;\n  evt.from = fromEl;\n  evt.dragged = dragEl;\n  evt.draggedRect = dragRect;\n  evt.related = targetEl || toEl;\n  evt.relatedRect = targetRect || getRect(toEl);\n  evt.willInsertAfter = willInsertAfter;\n  evt.originalEvent = originalEvent;\n  fromEl.dispatchEvent(evt);\n\n  if (onMoveFn) {\n    retVal = onMoveFn.call(sortable, evt, originalEvent);\n  }\n\n  return retVal;\n}\n\nfunction _disableDraggable(el) {\n  el.draggable = false;\n}\n\nfunction _unsilent() {\n  _silent = false;\n}\n\nfunction _ghostIsFirst(evt, vertical, sortable) {\n  var rect = getRect(getChild(sortable.el, 0, sortable.options, true));\n  var spacer = 10;\n  return vertical ? evt.clientX < rect.left - spacer || evt.clientY < rect.top && evt.clientX < rect.right : evt.clientY < rect.top - spacer || evt.clientY < rect.bottom && evt.clientX < rect.left;\n}\n\nfunction _ghostIsLast(evt, vertical, sortable) {\n  var rect = getRect(lastChild(sortable.el, sortable.options.draggable));\n  var spacer = 10;\n  return vertical ? evt.clientX > rect.right + spacer || evt.clientX <= rect.right && evt.clientY > rect.bottom && evt.clientX >= rect.left : evt.clientX > rect.right && evt.clientY > rect.top || evt.clientX <= rect.right && evt.clientY > rect.bottom + spacer;\n}\n\nfunction _getSwapDirection(evt, target, targetRect, vertical, swapThreshold, invertedSwapThreshold, invertSwap, isLastTarget) {\n  var mouseOnAxis = vertical ? evt.clientY : evt.clientX,\n      targetLength = vertical ? targetRect.height : targetRect.width,\n      targetS1 = vertical ? targetRect.top : targetRect.left,\n      targetS2 = vertical ? targetRect.bottom : targetRect.right,\n      invert = false;\n\n  if (!invertSwap) {\n    // Never invert or create dragEl shadow when target movemenet causes mouse to move past the end of regular swapThreshold\n    if (isLastTarget && targetMoveDistance < targetLength * swapThreshold) {\n      // multiplied only by swapThreshold because mouse will already be inside target by (1 - threshold) * targetLength / 2\n      // check if past first invert threshold on side opposite of lastDirection\n      if (!pastFirstInvertThresh && (lastDirection === 1 ? mouseOnAxis > targetS1 + targetLength * invertedSwapThreshold / 2 : mouseOnAxis < targetS2 - targetLength * invertedSwapThreshold / 2)) {\n        // past first invert threshold, do not restrict inverted threshold to dragEl shadow\n        pastFirstInvertThresh = true;\n      }\n\n      if (!pastFirstInvertThresh) {\n        // dragEl shadow (target move distance shadow)\n        if (lastDirection === 1 ? mouseOnAxis < targetS1 + targetMoveDistance // over dragEl shadow\n        : mouseOnAxis > targetS2 - targetMoveDistance) {\n          return -lastDirection;\n        }\n      } else {\n        invert = true;\n      }\n    } else {\n      // Regular\n      if (mouseOnAxis > targetS1 + targetLength * (1 - swapThreshold) / 2 && mouseOnAxis < targetS2 - targetLength * (1 - swapThreshold) / 2) {\n        return _getInsertDirection(target);\n      }\n    }\n  }\n\n  invert = invert || invertSwap;\n\n  if (invert) {\n    // Invert of regular\n    if (mouseOnAxis < targetS1 + targetLength * invertedSwapThreshold / 2 || mouseOnAxis > targetS2 - targetLength * invertedSwapThreshold / 2) {\n      return mouseOnAxis > targetS1 + targetLength / 2 ? 1 : -1;\n    }\n  }\n\n  return 0;\n}\n/**\r\n * Gets the direction dragEl must be swapped relative to target in order to make it\r\n * seem that dragEl has been \"inserted\" into that element's position\r\n * @param  {HTMLElement} target       The target whose position dragEl is being inserted at\r\n * @return {Number}                   Direction dragEl must be swapped\r\n */\n\n\nfunction _getInsertDirection(target) {\n  if (index(dragEl) < index(target)) {\n    return 1;\n  } else {\n    return -1;\n  }\n}\n/**\r\n * Generate id\r\n * @param   {HTMLElement} el\r\n * @returns {String}\r\n * @private\r\n */\n\n\nfunction _generateId(el) {\n  var str = el.tagName + el.className + el.src + el.href + el.textContent,\n      i = str.length,\n      sum = 0;\n\n  while (i--) {\n    sum += str.charCodeAt(i);\n  }\n\n  return sum.toString(36);\n}\n\nfunction _saveInputCheckedState(root) {\n  savedInputChecked.length = 0;\n  var inputs = root.getElementsByTagName('input');\n  var idx = inputs.length;\n\n  while (idx--) {\n    var el = inputs[idx];\n    el.checked && savedInputChecked.push(el);\n  }\n}\n\nfunction _nextTick(fn) {\n  return setTimeout(fn, 0);\n}\n\nfunction _cancelNextTick(id) {\n  return clearTimeout(id);\n} // Fixed #973:\n\n\nif (documentExists) {\n  on(document, 'touchmove', function (evt) {\n    if ((Sortable.active || awaitingDragStarted) && evt.cancelable) {\n      evt.preventDefault();\n    }\n  });\n} // Export utils\n\n\nSortable.utils = {\n  on: on,\n  off: off,\n  css: css,\n  find: find,\n  is: function is(el, selector) {\n    return !!closest(el, selector, el, false);\n  },\n  extend: extend,\n  throttle: throttle,\n  closest: closest,\n  toggleClass: toggleClass,\n  clone: clone,\n  index: index,\n  nextTick: _nextTick,\n  cancelNextTick: _cancelNextTick,\n  detectDirection: _detectDirection,\n  getChild: getChild\n};\n/**\r\n * Get the Sortable instance of an element\r\n * @param  {HTMLElement} element The element\r\n * @return {Sortable|undefined}         The instance of Sortable\r\n */\n\nSortable.get = function (element) {\n  return element[expando];\n};\n/**\r\n * Mount a plugin to Sortable\r\n * @param  {...SortablePlugin|SortablePlugin[]} plugins       Plugins being mounted\r\n */\n\n\nSortable.mount = function () {\n  for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) {\n    plugins[_key] = arguments[_key];\n  }\n\n  if (plugins[0].constructor === Array) plugins = plugins[0];\n  plugins.forEach(function (plugin) {\n    if (!plugin.prototype || !plugin.prototype.constructor) {\n      throw \"Sortable: Mounted plugin must be a constructor function, not \".concat({}.toString.call(plugin));\n    }\n\n    if (plugin.utils) Sortable.utils = _objectSpread2(_objectSpread2({}, Sortable.utils), plugin.utils);\n    PluginManager.mount(plugin);\n  });\n};\n/**\r\n * Create sortable instance\r\n * @param {HTMLElement}  el\r\n * @param {Object}      [options]\r\n */\n\n\nSortable.create = function (el, options) {\n  return new Sortable(el, options);\n}; // Export\n\n\nSortable.version = version;\n\nvar autoScrolls = [],\n    scrollEl,\n    scrollRootEl,\n    scrolling = false,\n    lastAutoScrollX,\n    lastAutoScrollY,\n    touchEvt$1,\n    pointerElemChangedInterval;\n\nfunction AutoScrollPlugin() {\n  function AutoScroll() {\n    this.defaults = {\n      scroll: true,\n      forceAutoScrollFallback: false,\n      scrollSensitivity: 30,\n      scrollSpeed: 10,\n      bubbleScroll: true\n    }; // Bind all private methods\n\n    for (var fn in this) {\n      if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n        this[fn] = this[fn].bind(this);\n      }\n    }\n  }\n\n  AutoScroll.prototype = {\n    dragStarted: function dragStarted(_ref) {\n      var originalEvent = _ref.originalEvent;\n\n      if (this.sortable.nativeDraggable) {\n        on(document, 'dragover', this._handleAutoScroll);\n      } else {\n        if (this.options.supportPointer) {\n          on(document, 'pointermove', this._handleFallbackAutoScroll);\n        } else if (originalEvent.touches) {\n          on(document, 'touchmove', this._handleFallbackAutoScroll);\n        } else {\n          on(document, 'mousemove', this._handleFallbackAutoScroll);\n        }\n      }\n    },\n    dragOverCompleted: function dragOverCompleted(_ref2) {\n      var originalEvent = _ref2.originalEvent;\n\n      // For when bubbling is canceled and using fallback (fallback 'touchmove' always reached)\n      if (!this.options.dragOverBubble && !originalEvent.rootEl) {\n        this._handleAutoScroll(originalEvent);\n      }\n    },\n    drop: function drop() {\n      if (this.sortable.nativeDraggable) {\n        off(document, 'dragover', this._handleAutoScroll);\n      } else {\n        off(document, 'pointermove', this._handleFallbackAutoScroll);\n        off(document, 'touchmove', this._handleFallbackAutoScroll);\n        off(document, 'mousemove', this._handleFallbackAutoScroll);\n      }\n\n      clearPointerElemChangedInterval();\n      clearAutoScrolls();\n      cancelThrottle();\n    },\n    nulling: function nulling() {\n      touchEvt$1 = scrollRootEl = scrollEl = scrolling = pointerElemChangedInterval = lastAutoScrollX = lastAutoScrollY = null;\n      autoScrolls.length = 0;\n    },\n    _handleFallbackAutoScroll: function _handleFallbackAutoScroll(evt) {\n      this._handleAutoScroll(evt, true);\n    },\n    _handleAutoScroll: function _handleAutoScroll(evt, fallback) {\n      var _this = this;\n\n      var x = (evt.touches ? evt.touches[0] : evt).clientX,\n          y = (evt.touches ? evt.touches[0] : evt).clientY,\n          elem = document.elementFromPoint(x, y);\n      touchEvt$1 = evt; // IE does not seem to have native autoscroll,\n      // Edge's autoscroll seems too conditional,\n      // MACOS Safari does not have autoscroll,\n      // Firefox and Chrome are good\n\n      if (fallback || this.options.forceAutoScrollFallback || Edge || IE11OrLess || Safari) {\n        autoScroll(evt, this.options, elem, fallback); // Listener for pointer element change\n\n        var ogElemScroller = getParentAutoScrollElement(elem, true);\n\n        if (scrolling && (!pointerElemChangedInterval || x !== lastAutoScrollX || y !== lastAutoScrollY)) {\n          pointerElemChangedInterval && clearPointerElemChangedInterval(); // Detect for pointer elem change, emulating native DnD behaviour\n\n          pointerElemChangedInterval = setInterval(function () {\n            var newElem = getParentAutoScrollElement(document.elementFromPoint(x, y), true);\n\n            if (newElem !== ogElemScroller) {\n              ogElemScroller = newElem;\n              clearAutoScrolls();\n            }\n\n            autoScroll(evt, _this.options, newElem, fallback);\n          }, 10);\n          lastAutoScrollX = x;\n          lastAutoScrollY = y;\n        }\n      } else {\n        // if DnD is enabled (and browser has good autoscrolling), first autoscroll will already scroll, so get parent autoscroll of first autoscroll\n        if (!this.options.bubbleScroll || getParentAutoScrollElement(elem, true) === getWindowScrollingElement()) {\n          clearAutoScrolls();\n          return;\n        }\n\n        autoScroll(evt, this.options, getParentAutoScrollElement(elem, false), false);\n      }\n    }\n  };\n  return _extends(AutoScroll, {\n    pluginName: 'scroll',\n    initializeByDefault: true\n  });\n}\n\nfunction clearAutoScrolls() {\n  autoScrolls.forEach(function (autoScroll) {\n    clearInterval(autoScroll.pid);\n  });\n  autoScrolls = [];\n}\n\nfunction clearPointerElemChangedInterval() {\n  clearInterval(pointerElemChangedInterval);\n}\n\nvar autoScroll = throttle(function (evt, options, rootEl, isFallback) {\n  // Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=505521\n  if (!options.scroll) return;\n  var x = (evt.touches ? evt.touches[0] : evt).clientX,\n      y = (evt.touches ? evt.touches[0] : evt).clientY,\n      sens = options.scrollSensitivity,\n      speed = options.scrollSpeed,\n      winScroller = getWindowScrollingElement();\n  var scrollThisInstance = false,\n      scrollCustomFn; // New scroll root, set scrollEl\n\n  if (scrollRootEl !== rootEl) {\n    scrollRootEl = rootEl;\n    clearAutoScrolls();\n    scrollEl = options.scroll;\n    scrollCustomFn = options.scrollFn;\n\n    if (scrollEl === true) {\n      scrollEl = getParentAutoScrollElement(rootEl, true);\n    }\n  }\n\n  var layersOut = 0;\n  var currentParent = scrollEl;\n\n  do {\n    var el = currentParent,\n        rect = getRect(el),\n        top = rect.top,\n        bottom = rect.bottom,\n        left = rect.left,\n        right = rect.right,\n        width = rect.width,\n        height = rect.height,\n        canScrollX = void 0,\n        canScrollY = void 0,\n        scrollWidth = el.scrollWidth,\n        scrollHeight = el.scrollHeight,\n        elCSS = css(el),\n        scrollPosX = el.scrollLeft,\n        scrollPosY = el.scrollTop;\n\n    if (el === winScroller) {\n      canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll' || elCSS.overflowX === 'visible');\n      canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll' || elCSS.overflowY === 'visible');\n    } else {\n      canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll');\n      canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll');\n    }\n\n    var vx = canScrollX && (Math.abs(right - x) <= sens && scrollPosX + width < scrollWidth) - (Math.abs(left - x) <= sens && !!scrollPosX);\n    var vy = canScrollY && (Math.abs(bottom - y) <= sens && scrollPosY + height < scrollHeight) - (Math.abs(top - y) <= sens && !!scrollPosY);\n\n    if (!autoScrolls[layersOut]) {\n      for (var i = 0; i <= layersOut; i++) {\n        if (!autoScrolls[i]) {\n          autoScrolls[i] = {};\n        }\n      }\n    }\n\n    if (autoScrolls[layersOut].vx != vx || autoScrolls[layersOut].vy != vy || autoScrolls[layersOut].el !== el) {\n      autoScrolls[layersOut].el = el;\n      autoScrolls[layersOut].vx = vx;\n      autoScrolls[layersOut].vy = vy;\n      clearInterval(autoScrolls[layersOut].pid);\n\n      if (vx != 0 || vy != 0) {\n        scrollThisInstance = true;\n        /* jshint loopfunc:true */\n\n        autoScrolls[layersOut].pid = setInterval(function () {\n          // emulate drag over during autoscroll (fallback), emulating native DnD behaviour\n          if (isFallback && this.layer === 0) {\n            Sortable.active._onTouchMove(touchEvt$1); // To move ghost if it is positioned absolutely\n\n          }\n\n          var scrollOffsetY = autoScrolls[this.layer].vy ? autoScrolls[this.layer].vy * speed : 0;\n          var scrollOffsetX = autoScrolls[this.layer].vx ? autoScrolls[this.layer].vx * speed : 0;\n\n          if (typeof scrollCustomFn === 'function') {\n            if (scrollCustomFn.call(Sortable.dragged.parentNode[expando], scrollOffsetX, scrollOffsetY, evt, touchEvt$1, autoScrolls[this.layer].el) !== 'continue') {\n              return;\n            }\n          }\n\n          scrollBy(autoScrolls[this.layer].el, scrollOffsetX, scrollOffsetY);\n        }.bind({\n          layer: layersOut\n        }), 24);\n      }\n    }\n\n    layersOut++;\n  } while (options.bubbleScroll && currentParent !== winScroller && (currentParent = getParentAutoScrollElement(currentParent, false)));\n\n  scrolling = scrollThisInstance; // in case another function catches scrolling as false in between when it is not\n}, 30);\n\nvar drop = function drop(_ref) {\n  var originalEvent = _ref.originalEvent,\n      putSortable = _ref.putSortable,\n      dragEl = _ref.dragEl,\n      activeSortable = _ref.activeSortable,\n      dispatchSortableEvent = _ref.dispatchSortableEvent,\n      hideGhostForTarget = _ref.hideGhostForTarget,\n      unhideGhostForTarget = _ref.unhideGhostForTarget;\n  if (!originalEvent) return;\n  var toSortable = putSortable || activeSortable;\n  hideGhostForTarget();\n  var touch = originalEvent.changedTouches && originalEvent.changedTouches.length ? originalEvent.changedTouches[0] : originalEvent;\n  var target = document.elementFromPoint(touch.clientX, touch.clientY);\n  unhideGhostForTarget();\n\n  if (toSortable && !toSortable.el.contains(target)) {\n    dispatchSortableEvent('spill');\n    this.onSpill({\n      dragEl: dragEl,\n      putSortable: putSortable\n    });\n  }\n};\n\nfunction Revert() {}\n\nRevert.prototype = {\n  startIndex: null,\n  dragStart: function dragStart(_ref2) {\n    var oldDraggableIndex = _ref2.oldDraggableIndex;\n    this.startIndex = oldDraggableIndex;\n  },\n  onSpill: function onSpill(_ref3) {\n    var dragEl = _ref3.dragEl,\n        putSortable = _ref3.putSortable;\n    this.sortable.captureAnimationState();\n\n    if (putSortable) {\n      putSortable.captureAnimationState();\n    }\n\n    var nextSibling = getChild(this.sortable.el, this.startIndex, this.options);\n\n    if (nextSibling) {\n      this.sortable.el.insertBefore(dragEl, nextSibling);\n    } else {\n      this.sortable.el.appendChild(dragEl);\n    }\n\n    this.sortable.animateAll();\n\n    if (putSortable) {\n      putSortable.animateAll();\n    }\n  },\n  drop: drop\n};\n\n_extends(Revert, {\n  pluginName: 'revertOnSpill'\n});\n\nfunction Remove() {}\n\nRemove.prototype = {\n  onSpill: function onSpill(_ref4) {\n    var dragEl = _ref4.dragEl,\n        putSortable = _ref4.putSortable;\n    var parentSortable = putSortable || this.sortable;\n    parentSortable.captureAnimationState();\n    dragEl.parentNode && dragEl.parentNode.removeChild(dragEl);\n    parentSortable.animateAll();\n  },\n  drop: drop\n};\n\n_extends(Remove, {\n  pluginName: 'removeOnSpill'\n});\n\nvar lastSwapEl;\n\nfunction SwapPlugin() {\n  function Swap() {\n    this.defaults = {\n      swapClass: 'sortable-swap-highlight'\n    };\n  }\n\n  Swap.prototype = {\n    dragStart: function dragStart(_ref) {\n      var dragEl = _ref.dragEl;\n      lastSwapEl = dragEl;\n    },\n    dragOverValid: function dragOverValid(_ref2) {\n      var completed = _ref2.completed,\n          target = _ref2.target,\n          onMove = _ref2.onMove,\n          activeSortable = _ref2.activeSortable,\n          changed = _ref2.changed,\n          cancel = _ref2.cancel;\n      if (!activeSortable.options.swap) return;\n      var el = this.sortable.el,\n          options = this.options;\n\n      if (target && target !== el) {\n        var prevSwapEl = lastSwapEl;\n\n        if (onMove(target) !== false) {\n          toggleClass(target, options.swapClass, true);\n          lastSwapEl = target;\n        } else {\n          lastSwapEl = null;\n        }\n\n        if (prevSwapEl && prevSwapEl !== lastSwapEl) {\n          toggleClass(prevSwapEl, options.swapClass, false);\n        }\n      }\n\n      changed();\n      completed(true);\n      cancel();\n    },\n    drop: function drop(_ref3) {\n      var activeSortable = _ref3.activeSortable,\n          putSortable = _ref3.putSortable,\n          dragEl = _ref3.dragEl;\n      var toSortable = putSortable || this.sortable;\n      var options = this.options;\n      lastSwapEl && toggleClass(lastSwapEl, options.swapClass, false);\n\n      if (lastSwapEl && (options.swap || putSortable && putSortable.options.swap)) {\n        if (dragEl !== lastSwapEl) {\n          toSortable.captureAnimationState();\n          if (toSortable !== activeSortable) activeSortable.captureAnimationState();\n          swapNodes(dragEl, lastSwapEl);\n          toSortable.animateAll();\n          if (toSortable !== activeSortable) activeSortable.animateAll();\n        }\n      }\n    },\n    nulling: function nulling() {\n      lastSwapEl = null;\n    }\n  };\n  return _extends(Swap, {\n    pluginName: 'swap',\n    eventProperties: function eventProperties() {\n      return {\n        swapItem: lastSwapEl\n      };\n    }\n  });\n}\n\nfunction swapNodes(n1, n2) {\n  var p1 = n1.parentNode,\n      p2 = n2.parentNode,\n      i1,\n      i2;\n  if (!p1 || !p2 || p1.isEqualNode(n2) || p2.isEqualNode(n1)) return;\n  i1 = index(n1);\n  i2 = index(n2);\n\n  if (p1.isEqualNode(p2) && i1 < i2) {\n    i2++;\n  }\n\n  p1.insertBefore(n2, p1.children[i1]);\n  p2.insertBefore(n1, p2.children[i2]);\n}\n\nvar multiDragElements = [],\n    multiDragClones = [],\n    lastMultiDragSelect,\n    // for selection with modifier key down (SHIFT)\nmultiDragSortable,\n    initialFolding = false,\n    // Initial multi-drag fold when drag started\nfolding = false,\n    // Folding any other time\ndragStarted = false,\n    dragEl$1,\n    clonesFromRect,\n    clonesHidden;\n\nfunction MultiDragPlugin() {\n  function MultiDrag(sortable) {\n    // Bind all private methods\n    for (var fn in this) {\n      if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n        this[fn] = this[fn].bind(this);\n      }\n    }\n\n    if (!sortable.options.avoidImplicitDeselect) {\n      if (sortable.options.supportPointer) {\n        on(document, 'pointerup', this._deselectMultiDrag);\n      } else {\n        on(document, 'mouseup', this._deselectMultiDrag);\n        on(document, 'touchend', this._deselectMultiDrag);\n      }\n    }\n\n    on(document, 'keydown', this._checkKeyDown);\n    on(document, 'keyup', this._checkKeyUp);\n    this.defaults = {\n      selectedClass: 'sortable-selected',\n      multiDragKey: null,\n      avoidImplicitDeselect: false,\n      setData: function setData(dataTransfer, dragEl) {\n        var data = '';\n\n        if (multiDragElements.length && multiDragSortable === sortable) {\n          multiDragElements.forEach(function (multiDragElement, i) {\n            data += (!i ? '' : ', ') + multiDragElement.textContent;\n          });\n        } else {\n          data = dragEl.textContent;\n        }\n\n        dataTransfer.setData('Text', data);\n      }\n    };\n  }\n\n  MultiDrag.prototype = {\n    multiDragKeyDown: false,\n    isMultiDrag: false,\n    delayStartGlobal: function delayStartGlobal(_ref) {\n      var dragged = _ref.dragEl;\n      dragEl$1 = dragged;\n    },\n    delayEnded: function delayEnded() {\n      this.isMultiDrag = ~multiDragElements.indexOf(dragEl$1);\n    },\n    setupClone: function setupClone(_ref2) {\n      var sortable = _ref2.sortable,\n          cancel = _ref2.cancel;\n      if (!this.isMultiDrag) return;\n\n      for (var i = 0; i < multiDragElements.length; i++) {\n        multiDragClones.push(clone(multiDragElements[i]));\n        multiDragClones[i].sortableIndex = multiDragElements[i].sortableIndex;\n        multiDragClones[i].draggable = false;\n        multiDragClones[i].style['will-change'] = '';\n        toggleClass(multiDragClones[i], this.options.selectedClass, false);\n        multiDragElements[i] === dragEl$1 && toggleClass(multiDragClones[i], this.options.chosenClass, false);\n      }\n\n      sortable._hideClone();\n\n      cancel();\n    },\n    clone: function clone(_ref3) {\n      var sortable = _ref3.sortable,\n          rootEl = _ref3.rootEl,\n          dispatchSortableEvent = _ref3.dispatchSortableEvent,\n          cancel = _ref3.cancel;\n      if (!this.isMultiDrag) return;\n\n      if (!this.options.removeCloneOnHide) {\n        if (multiDragElements.length && multiDragSortable === sortable) {\n          insertMultiDragClones(true, rootEl);\n          dispatchSortableEvent('clone');\n          cancel();\n        }\n      }\n    },\n    showClone: function showClone(_ref4) {\n      var cloneNowShown = _ref4.cloneNowShown,\n          rootEl = _ref4.rootEl,\n          cancel = _ref4.cancel;\n      if (!this.isMultiDrag) return;\n      insertMultiDragClones(false, rootEl);\n      multiDragClones.forEach(function (clone) {\n        css(clone, 'display', '');\n      });\n      cloneNowShown();\n      clonesHidden = false;\n      cancel();\n    },\n    hideClone: function hideClone(_ref5) {\n      var _this = this;\n\n      var sortable = _ref5.sortable,\n          cloneNowHidden = _ref5.cloneNowHidden,\n          cancel = _ref5.cancel;\n      if (!this.isMultiDrag) return;\n      multiDragClones.forEach(function (clone) {\n        css(clone, 'display', 'none');\n\n        if (_this.options.removeCloneOnHide && clone.parentNode) {\n          clone.parentNode.removeChild(clone);\n        }\n      });\n      cloneNowHidden();\n      clonesHidden = true;\n      cancel();\n    },\n    dragStartGlobal: function dragStartGlobal(_ref6) {\n      var sortable = _ref6.sortable;\n\n      if (!this.isMultiDrag && multiDragSortable) {\n        multiDragSortable.multiDrag._deselectMultiDrag();\n      }\n\n      multiDragElements.forEach(function (multiDragElement) {\n        multiDragElement.sortableIndex = index(multiDragElement);\n      }); // Sort multi-drag elements\n\n      multiDragElements = multiDragElements.sort(function (a, b) {\n        return a.sortableIndex - b.sortableIndex;\n      });\n      dragStarted = true;\n    },\n    dragStarted: function dragStarted(_ref7) {\n      var _this2 = this;\n\n      var sortable = _ref7.sortable;\n      if (!this.isMultiDrag) return;\n\n      if (this.options.sort) {\n        // Capture rects,\n        // hide multi drag elements (by positioning them absolute),\n        // set multi drag elements rects to dragRect,\n        // show multi drag elements,\n        // animate to rects,\n        // unset rects & remove from DOM\n        sortable.captureAnimationState();\n\n        if (this.options.animation) {\n          multiDragElements.forEach(function (multiDragElement) {\n            if (multiDragElement === dragEl$1) return;\n            css(multiDragElement, 'position', 'absolute');\n          });\n          var dragRect = getRect(dragEl$1, false, true, true);\n          multiDragElements.forEach(function (multiDragElement) {\n            if (multiDragElement === dragEl$1) return;\n            setRect(multiDragElement, dragRect);\n          });\n          folding = true;\n          initialFolding = true;\n        }\n      }\n\n      sortable.animateAll(function () {\n        folding = false;\n        initialFolding = false;\n\n        if (_this2.options.animation) {\n          multiDragElements.forEach(function (multiDragElement) {\n            unsetRect(multiDragElement);\n          });\n        } // Remove all auxiliary multidrag items from el, if sorting enabled\n\n\n        if (_this2.options.sort) {\n          removeMultiDragElements();\n        }\n      });\n    },\n    dragOver: function dragOver(_ref8) {\n      var target = _ref8.target,\n          completed = _ref8.completed,\n          cancel = _ref8.cancel;\n\n      if (folding && ~multiDragElements.indexOf(target)) {\n        completed(false);\n        cancel();\n      }\n    },\n    revert: function revert(_ref9) {\n      var fromSortable = _ref9.fromSortable,\n          rootEl = _ref9.rootEl,\n          sortable = _ref9.sortable,\n          dragRect = _ref9.dragRect;\n\n      if (multiDragElements.length > 1) {\n        // Setup unfold animation\n        multiDragElements.forEach(function (multiDragElement) {\n          sortable.addAnimationState({\n            target: multiDragElement,\n            rect: folding ? getRect(multiDragElement) : dragRect\n          });\n          unsetRect(multiDragElement);\n          multiDragElement.fromRect = dragRect;\n          fromSortable.removeAnimationState(multiDragElement);\n        });\n        folding = false;\n        insertMultiDragElements(!this.options.removeCloneOnHide, rootEl);\n      }\n    },\n    dragOverCompleted: function dragOverCompleted(_ref10) {\n      var sortable = _ref10.sortable,\n          isOwner = _ref10.isOwner,\n          insertion = _ref10.insertion,\n          activeSortable = _ref10.activeSortable,\n          parentEl = _ref10.parentEl,\n          putSortable = _ref10.putSortable;\n      var options = this.options;\n\n      if (insertion) {\n        // Clones must be hidden before folding animation to capture dragRectAbsolute properly\n        if (isOwner) {\n          activeSortable._hideClone();\n        }\n\n        initialFolding = false; // If leaving sort:false root, or already folding - Fold to new location\n\n        if (options.animation && multiDragElements.length > 1 && (folding || !isOwner && !activeSortable.options.sort && !putSortable)) {\n          // Fold: Set all multi drag elements's rects to dragEl's rect when multi-drag elements are invisible\n          var dragRectAbsolute = getRect(dragEl$1, false, true, true);\n          multiDragElements.forEach(function (multiDragElement) {\n            if (multiDragElement === dragEl$1) return;\n            setRect(multiDragElement, dragRectAbsolute); // Move element(s) to end of parentEl so that it does not interfere with multi-drag clones insertion if they are inserted\n            // while folding, and so that we can capture them again because old sortable will no longer be fromSortable\n\n            parentEl.appendChild(multiDragElement);\n          });\n          folding = true;\n        } // Clones must be shown (and check to remove multi drags) after folding when interfering multiDragElements are moved out\n\n\n        if (!isOwner) {\n          // Only remove if not folding (folding will remove them anyways)\n          if (!folding) {\n            removeMultiDragElements();\n          }\n\n          if (multiDragElements.length > 1) {\n            var clonesHiddenBefore = clonesHidden;\n\n            activeSortable._showClone(sortable); // Unfold animation for clones if showing from hidden\n\n\n            if (activeSortable.options.animation && !clonesHidden && clonesHiddenBefore) {\n              multiDragClones.forEach(function (clone) {\n                activeSortable.addAnimationState({\n                  target: clone,\n                  rect: clonesFromRect\n                });\n                clone.fromRect = clonesFromRect;\n                clone.thisAnimationDuration = null;\n              });\n            }\n          } else {\n            activeSortable._showClone(sortable);\n          }\n        }\n      }\n    },\n    dragOverAnimationCapture: function dragOverAnimationCapture(_ref11) {\n      var dragRect = _ref11.dragRect,\n          isOwner = _ref11.isOwner,\n          activeSortable = _ref11.activeSortable;\n      multiDragElements.forEach(function (multiDragElement) {\n        multiDragElement.thisAnimationDuration = null;\n      });\n\n      if (activeSortable.options.animation && !isOwner && activeSortable.multiDrag.isMultiDrag) {\n        clonesFromRect = _extends({}, dragRect);\n        var dragMatrix = matrix(dragEl$1, true);\n        clonesFromRect.top -= dragMatrix.f;\n        clonesFromRect.left -= dragMatrix.e;\n      }\n    },\n    dragOverAnimationComplete: function dragOverAnimationComplete() {\n      if (folding) {\n        folding = false;\n        removeMultiDragElements();\n      }\n    },\n    drop: function drop(_ref12) {\n      var evt = _ref12.originalEvent,\n          rootEl = _ref12.rootEl,\n          parentEl = _ref12.parentEl,\n          sortable = _ref12.sortable,\n          dispatchSortableEvent = _ref12.dispatchSortableEvent,\n          oldIndex = _ref12.oldIndex,\n          putSortable = _ref12.putSortable;\n      var toSortable = putSortable || this.sortable;\n      if (!evt) return;\n      var options = this.options,\n          children = parentEl.children; // Multi-drag selection\n\n      if (!dragStarted) {\n        if (options.multiDragKey && !this.multiDragKeyDown) {\n          this._deselectMultiDrag();\n        }\n\n        toggleClass(dragEl$1, options.selectedClass, !~multiDragElements.indexOf(dragEl$1));\n\n        if (!~multiDragElements.indexOf(dragEl$1)) {\n          multiDragElements.push(dragEl$1);\n          dispatchEvent({\n            sortable: sortable,\n            rootEl: rootEl,\n            name: 'select',\n            targetEl: dragEl$1,\n            originalEvent: evt\n          }); // Modifier activated, select from last to dragEl\n\n          if (evt.shiftKey && lastMultiDragSelect && sortable.el.contains(lastMultiDragSelect)) {\n            var lastIndex = index(lastMultiDragSelect),\n                currentIndex = index(dragEl$1);\n\n            if (~lastIndex && ~currentIndex && lastIndex !== currentIndex) {\n              // Must include lastMultiDragSelect (select it), in case modified selection from no selection\n              // (but previous selection existed)\n              var n, i;\n\n              if (currentIndex > lastIndex) {\n                i = lastIndex;\n                n = currentIndex;\n              } else {\n                i = currentIndex;\n                n = lastIndex + 1;\n              }\n\n              for (; i < n; i++) {\n                if (~multiDragElements.indexOf(children[i])) continue;\n                toggleClass(children[i], options.selectedClass, true);\n                multiDragElements.push(children[i]);\n                dispatchEvent({\n                  sortable: sortable,\n                  rootEl: rootEl,\n                  name: 'select',\n                  targetEl: children[i],\n                  originalEvent: evt\n                });\n              }\n            }\n          } else {\n            lastMultiDragSelect = dragEl$1;\n          }\n\n          multiDragSortable = toSortable;\n        } else {\n          multiDragElements.splice(multiDragElements.indexOf(dragEl$1), 1);\n          lastMultiDragSelect = null;\n          dispatchEvent({\n            sortable: sortable,\n            rootEl: rootEl,\n            name: 'deselect',\n            targetEl: dragEl$1,\n            originalEvent: evt\n          });\n        }\n      } // Multi-drag drop\n\n\n      if (dragStarted && this.isMultiDrag) {\n        folding = false; // Do not \"unfold\" after around dragEl if reverted\n\n        if ((parentEl[expando].options.sort || parentEl !== rootEl) && multiDragElements.length > 1) {\n          var dragRect = getRect(dragEl$1),\n              multiDragIndex = index(dragEl$1, ':not(.' + this.options.selectedClass + ')');\n          if (!initialFolding && options.animation) dragEl$1.thisAnimationDuration = null;\n          toSortable.captureAnimationState();\n\n          if (!initialFolding) {\n            if (options.animation) {\n              dragEl$1.fromRect = dragRect;\n              multiDragElements.forEach(function (multiDragElement) {\n                multiDragElement.thisAnimationDuration = null;\n\n                if (multiDragElement !== dragEl$1) {\n                  var rect = folding ? getRect(multiDragElement) : dragRect;\n                  multiDragElement.fromRect = rect; // Prepare unfold animation\n\n                  toSortable.addAnimationState({\n                    target: multiDragElement,\n                    rect: rect\n                  });\n                }\n              });\n            } // Multi drag elements are not necessarily removed from the DOM on drop, so to reinsert\n            // properly they must all be removed\n\n\n            removeMultiDragElements();\n            multiDragElements.forEach(function (multiDragElement) {\n              if (children[multiDragIndex]) {\n                parentEl.insertBefore(multiDragElement, children[multiDragIndex]);\n              } else {\n                parentEl.appendChild(multiDragElement);\n              }\n\n              multiDragIndex++;\n            }); // If initial folding is done, the elements may have changed position because they are now\n            // unfolding around dragEl, even though dragEl may not have his index changed, so update event\n            // must be fired here as Sortable will not.\n\n            if (oldIndex === index(dragEl$1)) {\n              var update = false;\n              multiDragElements.forEach(function (multiDragElement) {\n                if (multiDragElement.sortableIndex !== index(multiDragElement)) {\n                  update = true;\n                  return;\n                }\n              });\n\n              if (update) {\n                dispatchSortableEvent('update');\n              }\n            }\n          } // Must be done after capturing individual rects (scroll bar)\n\n\n          multiDragElements.forEach(function (multiDragElement) {\n            unsetRect(multiDragElement);\n          });\n          toSortable.animateAll();\n        }\n\n        multiDragSortable = toSortable;\n      } // Remove clones if necessary\n\n\n      if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {\n        multiDragClones.forEach(function (clone) {\n          clone.parentNode && clone.parentNode.removeChild(clone);\n        });\n      }\n    },\n    nullingGlobal: function nullingGlobal() {\n      this.isMultiDrag = dragStarted = false;\n      multiDragClones.length = 0;\n    },\n    destroyGlobal: function destroyGlobal() {\n      this._deselectMultiDrag();\n\n      off(document, 'pointerup', this._deselectMultiDrag);\n      off(document, 'mouseup', this._deselectMultiDrag);\n      off(document, 'touchend', this._deselectMultiDrag);\n      off(document, 'keydown', this._checkKeyDown);\n      off(document, 'keyup', this._checkKeyUp);\n    },\n    _deselectMultiDrag: function _deselectMultiDrag(evt) {\n      if (typeof dragStarted !== \"undefined\" && dragStarted) return; // Only deselect if selection is in this sortable\n\n      if (multiDragSortable !== this.sortable) return; // Only deselect if target is not item in this sortable\n\n      if (evt && closest(evt.target, this.options.draggable, this.sortable.el, false)) return; // Only deselect if left click\n\n      if (evt && evt.button !== 0) return;\n\n      while (multiDragElements.length) {\n        var el = multiDragElements[0];\n        toggleClass(el, this.options.selectedClass, false);\n        multiDragElements.shift();\n        dispatchEvent({\n          sortable: this.sortable,\n          rootEl: this.sortable.el,\n          name: 'deselect',\n          targetEl: el,\n          originalEvent: evt\n        });\n      }\n    },\n    _checkKeyDown: function _checkKeyDown(evt) {\n      if (evt.key === this.options.multiDragKey) {\n        this.multiDragKeyDown = true;\n      }\n    },\n    _checkKeyUp: function _checkKeyUp(evt) {\n      if (evt.key === this.options.multiDragKey) {\n        this.multiDragKeyDown = false;\n      }\n    }\n  };\n  return _extends(MultiDrag, {\n    // Static methods & properties\n    pluginName: 'multiDrag',\n    utils: {\n      /**\r\n       * Selects the provided multi-drag item\r\n       * @param  {HTMLElement} el    The element to be selected\r\n       */\n      select: function select(el) {\n        var sortable = el.parentNode[expando];\n        if (!sortable || !sortable.options.multiDrag || ~multiDragElements.indexOf(el)) return;\n\n        if (multiDragSortable && multiDragSortable !== sortable) {\n          multiDragSortable.multiDrag._deselectMultiDrag();\n\n          multiDragSortable = sortable;\n        }\n\n        toggleClass(el, sortable.options.selectedClass, true);\n        multiDragElements.push(el);\n      },\n\n      /**\r\n       * Deselects the provided multi-drag item\r\n       * @param  {HTMLElement} el    The element to be deselected\r\n       */\n      deselect: function deselect(el) {\n        var sortable = el.parentNode[expando],\n            index = multiDragElements.indexOf(el);\n        if (!sortable || !sortable.options.multiDrag || !~index) return;\n        toggleClass(el, sortable.options.selectedClass, false);\n        multiDragElements.splice(index, 1);\n      }\n    },\n    eventProperties: function eventProperties() {\n      var _this3 = this;\n\n      var oldIndicies = [],\n          newIndicies = [];\n      multiDragElements.forEach(function (multiDragElement) {\n        oldIndicies.push({\n          multiDragElement: multiDragElement,\n          index: multiDragElement.sortableIndex\n        }); // multiDragElements will already be sorted if folding\n\n        var newIndex;\n\n        if (folding && multiDragElement !== dragEl$1) {\n          newIndex = -1;\n        } else if (folding) {\n          newIndex = index(multiDragElement, ':not(.' + _this3.options.selectedClass + ')');\n        } else {\n          newIndex = index(multiDragElement);\n        }\n\n        newIndicies.push({\n          multiDragElement: multiDragElement,\n          index: newIndex\n        });\n      });\n      return {\n        items: _toConsumableArray(multiDragElements),\n        clones: [].concat(multiDragClones),\n        oldIndicies: oldIndicies,\n        newIndicies: newIndicies\n      };\n    },\n    optionListeners: {\n      multiDragKey: function multiDragKey(key) {\n        key = key.toLowerCase();\n\n        if (key === 'ctrl') {\n          key = 'Control';\n        } else if (key.length > 1) {\n          key = key.charAt(0).toUpperCase() + key.substr(1);\n        }\n\n        return key;\n      }\n    }\n  });\n}\n\nfunction insertMultiDragElements(clonesInserted, rootEl) {\n  multiDragElements.forEach(function (multiDragElement, i) {\n    var target = rootEl.children[multiDragElement.sortableIndex + (clonesInserted ? Number(i) : 0)];\n\n    if (target) {\n      rootEl.insertBefore(multiDragElement, target);\n    } else {\n      rootEl.appendChild(multiDragElement);\n    }\n  });\n}\n/**\r\n * Insert multi-drag clones\r\n * @param  {[Boolean]} elementsInserted  Whether the multi-drag elements are inserted\r\n * @param  {HTMLElement} rootEl\r\n */\n\n\nfunction insertMultiDragClones(elementsInserted, rootEl) {\n  multiDragClones.forEach(function (clone, i) {\n    var target = rootEl.children[clone.sortableIndex + (elementsInserted ? Number(i) : 0)];\n\n    if (target) {\n      rootEl.insertBefore(clone, target);\n    } else {\n      rootEl.appendChild(clone);\n    }\n  });\n}\n\nfunction removeMultiDragElements() {\n  multiDragElements.forEach(function (multiDragElement) {\n    if (multiDragElement === dragEl$1) return;\n    multiDragElement.parentNode && multiDragElement.parentNode.removeChild(multiDragElement);\n  });\n}\n\nSortable.mount(new AutoScrollPlugin());\nSortable.mount(Remove, Revert);\n\nexport default Sortable;\nexport { MultiDragPlugin as MultiDrag, Sortable, SwapPlugin as Swap };\n", "import { Controller } from \"@hotwired/stimulus\"\nimport Sortable from \"sortablejs\"\n\n// Connects to data-controller=\"sortable\"\nexport default class extends Controller {\n  connect() {\n    this.sortable = Sortable.create(this.element, {\n      handle: \".handle\",\n      animation: 150,\n      onEnd: this.end.bind(this)\n    })\n  }\n\n  end(event) {\n    let data = new FormData()\n    data.append('items', this.sortable.toArray())\n\n    const MyHeaders = new Headers();\n    MyHeaders.append('X-CSRF-Token', document.querySelector('meta[name=\"csrf-token\"]').getAttribute('content'))\n\n    fetch(this.data.get(\"url\"), {\n      headers: MyHeaders,\n      credentials: 'same-origin',\n      method: 'POST',\n      body: data\n    })\n  }\n}\n", "import { Controller } from \"@hotwired/stimulus\"\nimport Cropper from 'cropperjs';\n\n// Connects to data-controller=\"cropper\"\nexport default class extends Controller {\n  static targets = [\"image\"]\n  static values = { model: String,\n                    width: Number,\n                    height: Number\n                  }\n\n\n  connect() {\n    let _this = this\n\n    const cropper = new Cropper(_this.imageTarget, {\n      aspectRatio: _this.widthValue / _this.heightValue,\n      zoomable: false,\n      crop: function(e) {\n        document.getElementById(_this.modelValue+'_crop_x').value = e.detail.x\n        document.getElementById(_this.modelValue+'_crop_y').value = e.detail.y\n        document.getElementById(_this.modelValue+'_crop_w').value = e.detail.width\n        document.getElementById(_this.modelValue+'_crop_h').value = e.detail.height\n      }\n    });\n  }\n}\n", "import { application } from \"./application\"\n\nimport TinymceController from \"./tinymce_controller.js\"\napplication.register(\"tinymce\", TinymceController)\n\nimport SortableController from \"./sortable_controller.js\"\napplication.register(\"sortable\", SortableController)\n\nimport CropperController from \"./cropper_controller.js\"\napplication.register(\"cropper\", CropperController)", "// Entry point for the build script in your package.json\nimport \"@hotwired/turbo-rails\"\nimport \"./backend_controllers\"\n\n//== JQUERY\nimport jQuery from \"jquery\";\n// NOTE: make jQuery global if needed\nwindow.$ = window.jQuery = jQuery;\n\n//== BOOTSTRAP\n  import * as bootstrap from 'bootstrap'\n\n//== COCOON Nested fields\nrequire(\"@nathanvda/cocoon\")\n\n  document.addEventListener(\"turbo:load\", function() {\n    let tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle=\"tooltip\"]'))\n    tooltipTriggerList.map(function (tooltipTriggerEl) {\n      return new bootstrap.Tooltip(tooltipTriggerEl, {\n        container: 'body'\n      })\n    })\n  });\n\n\n//== NAVIGATION\n$(document).on(\"turbo:load\", () => {\n  // SET NAVIGATION ACTIVE\n  let url = window.location;\n  let element = $('ul.navbar-nav a').filter(function() {\n    return this.href === url || url.href.indexOf(this.href) === 0;\n  }).parent().addClass('active').parent().addClass('show').parent();\n  if (element.is('li')) {\n    element.addClass('active');\n  }\n});\n\n\n//== SCROLL TOP\n  window.addEventListener(\"scroll\", function(){\n    let scroll = document.querySelector('.scroll-to-top');\n    scroll.classList.toggle(\"active\", window.scrollY > 500)\n  })\n", "export * from \"./enums.js\";\nexport * from \"./modifiers/index.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport { popperGenerator, detectOverflow, createPopper as createPopperBase } from \"./createPopper.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper } from \"./popper.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\";", "export var top = 'top';\nexport var bottom = 'bottom';\nexport var right = 'right';\nexport var left = 'left';\nexport var auto = 'auto';\nexport var basePlacements = [top, bottom, right, left];\nexport var start = 'start';\nexport var end = 'end';\nexport var clippingParents = 'clippingParents';\nexport var viewport = 'viewport';\nexport var popper = 'popper';\nexport var reference = 'reference';\nexport var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {\n  return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n}, []);\nexport var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n  return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n}, []); // modifiers that need to read the DOM\n\nexport var beforeRead = 'beforeRead';\nexport var read = 'read';\nexport var afterRead = 'afterRead'; // pure-logic modifiers\n\nexport var beforeMain = 'beforeMain';\nexport var main = 'main';\nexport var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\nexport var beforeWrite = 'beforeWrite';\nexport var write = 'write';\nexport var afterWrite = 'afterWrite';\nexport var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];", "export default function getNodeName(element) {\n  return element ? (element.nodeName || '').toLowerCase() : null;\n}", "export default function getWindow(node) {\n  if (node == null) {\n    return window;\n  }\n\n  if (node.toString() !== '[object Window]') {\n    var ownerDocument = node.ownerDocument;\n    return ownerDocument ? ownerDocument.defaultView || window : window;\n  }\n\n  return node;\n}", "import getWindow from \"./getWindow.js\";\n\nfunction isElement(node) {\n  var OwnElement = getWindow(node).Element;\n  return node instanceof OwnElement || node instanceof Element;\n}\n\nfunction isHTMLElement(node) {\n  var OwnElement = getWindow(node).HTMLElement;\n  return node instanceof OwnElement || node instanceof HTMLElement;\n}\n\nfunction isShadowRoot(node) {\n  // IE 11 has no ShadowRoot\n  if (typeof ShadowRoot === 'undefined') {\n    return false;\n  }\n\n  var OwnElement = getWindow(node).ShadowRoot;\n  return node instanceof OwnElement || node instanceof ShadowRoot;\n}\n\nexport { isElement, isHTMLElement, isShadowRoot };", "import getNodeName from \"../dom-utils/getNodeName.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // This modifier takes the styles prepared by the `computeStyles` modifier\n// and applies them to the HTMLElements such as popper and arrow\n\nfunction applyStyles(_ref) {\n  var state = _ref.state;\n  Object.keys(state.elements).forEach(function (name) {\n    var style = state.styles[name] || {};\n    var attributes = state.attributes[name] || {};\n    var element = state.elements[name]; // arrow is optional + virtual elements\n\n    if (!isHTMLElement(element) || !getNodeName(element)) {\n      return;\n    } // Flow doesn't support to extend this property, but it's the most\n    // effective way to apply styles to an HTMLElement\n    // $FlowFixMe[cannot-write]\n\n\n    Object.assign(element.style, style);\n    Object.keys(attributes).forEach(function (name) {\n      var value = attributes[name];\n\n      if (value === false) {\n        element.removeAttribute(name);\n      } else {\n        element.setAttribute(name, value === true ? '' : value);\n      }\n    });\n  });\n}\n\nfunction effect(_ref2) {\n  var state = _ref2.state;\n  var initialStyles = {\n    popper: {\n      position: state.options.strategy,\n      left: '0',\n      top: '0',\n      margin: '0'\n    },\n    arrow: {\n      position: 'absolute'\n    },\n    reference: {}\n  };\n  Object.assign(state.elements.popper.style, initialStyles.popper);\n  state.styles = initialStyles;\n\n  if (state.elements.arrow) {\n    Object.assign(state.elements.arrow.style, initialStyles.arrow);\n  }\n\n  return function () {\n    Object.keys(state.elements).forEach(function (name) {\n      var element = state.elements[name];\n      var attributes = state.attributes[name] || {};\n      var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them\n\n      var style = styleProperties.reduce(function (style, property) {\n        style[property] = '';\n        return style;\n      }, {}); // arrow is optional + virtual elements\n\n      if (!isHTMLElement(element) || !getNodeName(element)) {\n        return;\n      }\n\n      Object.assign(element.style, style);\n      Object.keys(attributes).forEach(function (attribute) {\n        element.removeAttribute(attribute);\n      });\n    });\n  };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'applyStyles',\n  enabled: true,\n  phase: 'write',\n  fn: applyStyles,\n  effect: effect,\n  requires: ['computeStyles']\n};", "import { auto } from \"../enums.js\";\nexport default function getBasePlacement(placement) {\n  return placement.split('-')[0];\n}", "export var max = Math.max;\nexport var min = Math.min;\nexport var round = Math.round;", "export default function getUAString() {\n  var uaData = navigator.userAgentData;\n\n  if (uaData != null && uaData.brands && Array.isArray(uaData.brands)) {\n    return uaData.brands.map(function (item) {\n      return item.brand + \"/\" + item.version;\n    }).join(' ');\n  }\n\n  return navigator.userAgent;\n}", "import getUAString from \"../utils/userAgent.js\";\nexport default function isLayoutViewport() {\n  return !/^((?!chrome|android).)*safari/i.test(getUAString());\n}", "import { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport { round } from \"../utils/math.js\";\nimport getWindow from \"./getWindow.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getBoundingClientRect(element, includeScale, isFixedStrategy) {\n  if (includeScale === void 0) {\n    includeScale = false;\n  }\n\n  if (isFixedStrategy === void 0) {\n    isFixedStrategy = false;\n  }\n\n  var clientRect = element.getBoundingClientRect();\n  var scaleX = 1;\n  var scaleY = 1;\n\n  if (includeScale && isHTMLElement(element)) {\n    scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;\n    scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;\n  }\n\n  var _ref = isElement(element) ? getWindow(element) : window,\n      visualViewport = _ref.visualViewport;\n\n  var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;\n  var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;\n  var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;\n  var width = clientRect.width / scaleX;\n  var height = clientRect.height / scaleY;\n  return {\n    width: width,\n    height: height,\n    top: y,\n    right: x + width,\n    bottom: y + height,\n    left: x,\n    x: x,\n    y: y\n  };\n}", "import getBoundingClientRect from \"./getBoundingClientRect.js\"; // Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\n\nexport default function getLayoutRect(element) {\n  var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n  // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n  var width = element.offsetWidth;\n  var height = element.offsetHeight;\n\n  if (Math.abs(clientRect.width - width) <= 1) {\n    width = clientRect.width;\n  }\n\n  if (Math.abs(clientRect.height - height) <= 1) {\n    height = clientRect.height;\n  }\n\n  return {\n    x: element.offsetLeft,\n    y: element.offsetTop,\n    width: width,\n    height: height\n  };\n}", "import { isShadowRoot } from \"./instanceOf.js\";\nexport default function contains(parent, child) {\n  var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n  if (parent.contains(child)) {\n    return true;\n  } // then fallback to custom implementation with Shadow DOM support\n  else if (rootNode && isShadowRoot(rootNode)) {\n      var next = child;\n\n      do {\n        if (next && parent.isSameNode(next)) {\n          return true;\n        } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n        next = next.parentNode || next.host;\n      } while (next);\n    } // Give up, the result is false\n\n\n  return false;\n}", "import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n  return getWindow(element).getComputedStyle(element);\n}", "import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n  return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}", "import { isElement } from \"./instanceOf.js\";\nexport default function getDocumentElement(element) {\n  // $FlowFixMe[incompatible-return]: assume body is always available\n  return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n  element.document) || window.document).documentElement;\n}", "import getNodeName from \"./getNodeName.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport { isShadowRoot } from \"./instanceOf.js\";\nexport default function getParentNode(element) {\n  if (getNodeName(element) === 'html') {\n    return element;\n  }\n\n  return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n    // $FlowFixMe[incompatible-return]\n    // $FlowFixMe[prop-missing]\n    element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n    element.parentNode || ( // DOM Element detected\n    isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n    // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n    getDocumentElement(element) // fallback\n\n  );\n}", "import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement, isShadowRoot } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getUAString from \"../utils/userAgent.js\";\n\nfunction getTrueOffsetParent(element) {\n  if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n  getComputedStyle(element).position === 'fixed') {\n    return null;\n  }\n\n  return element.offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\n\n\nfunction getContainingBlock(element) {\n  var isFirefox = /firefox/i.test(getUAString());\n  var isIE = /Trident/i.test(getUAString());\n\n  if (isIE && isHTMLElement(element)) {\n    // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n    var elementCss = getComputedStyle(element);\n\n    if (elementCss.position === 'fixed') {\n      return null;\n    }\n  }\n\n  var currentNode = getParentNode(element);\n\n  if (isShadowRoot(currentNode)) {\n    currentNode = currentNode.host;\n  }\n\n  while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n    var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n    // create a containing block.\n    // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n    if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n      return currentNode;\n    } else {\n      currentNode = currentNode.parentNode;\n    }\n  }\n\n  return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nexport default function getOffsetParent(element) {\n  var window = getWindow(element);\n  var offsetParent = getTrueOffsetParent(element);\n\n  while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n    offsetParent = getTrueOffsetParent(offsetParent);\n  }\n\n  if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {\n    return window;\n  }\n\n  return offsetParent || getContainingBlock(element) || window;\n}", "export default function getMainAxisFromPlacement(placement) {\n  return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}", "import { max as mathMax, min as mathMin } from \"./math.js\";\nexport function within(min, value, max) {\n  return mathMax(min, mathMin(value, max));\n}\nexport function withinMaxClamp(min, value, max) {\n  var v = within(min, value, max);\n  return v > max ? max : v;\n}", "export default function getFreshSideObject() {\n  return {\n    top: 0,\n    right: 0,\n    bottom: 0,\n    left: 0\n  };\n}", "import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n  return Object.assign({}, getFreshSideObject(), paddingObject);\n}", "export default function expandToHashMap(value, keys) {\n  return keys.reduce(function (hashMap, key) {\n    hashMap[key] = value;\n    return hashMap;\n  }, {});\n}", "import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport { within } from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar toPaddingObject = function toPaddingObject(padding, state) {\n  padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n    placement: state.placement\n  })) : padding;\n  return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n};\n\nfunction arrow(_ref) {\n  var _state$modifiersData$;\n\n  var state = _ref.state,\n      name = _ref.name,\n      options = _ref.options;\n  var arrowElement = state.elements.arrow;\n  var popperOffsets = state.modifiersData.popperOffsets;\n  var basePlacement = getBasePlacement(state.placement);\n  var axis = getMainAxisFromPlacement(basePlacement);\n  var isVertical = [left, right].indexOf(basePlacement) >= 0;\n  var len = isVertical ? 'height' : 'width';\n\n  if (!arrowElement || !popperOffsets) {\n    return;\n  }\n\n  var paddingObject = toPaddingObject(options.padding, state);\n  var arrowRect = getLayoutRect(arrowElement);\n  var minProp = axis === 'y' ? top : left;\n  var maxProp = axis === 'y' ? bottom : right;\n  var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n  var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n  var arrowOffsetParent = getOffsetParent(arrowElement);\n  var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n  var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n  // outside of the popper bounds\n\n  var min = paddingObject[minProp];\n  var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n  var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n  var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n  var axisProp = axis;\n  state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n  var state = _ref2.state,\n      options = _ref2.options;\n  var _options$element = options.element,\n      arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n  if (arrowElement == null) {\n    return;\n  } // CSS selector\n\n\n  if (typeof arrowElement === 'string') {\n    arrowElement = state.elements.popper.querySelector(arrowElement);\n\n    if (!arrowElement) {\n      return;\n    }\n  }\n\n  if (!contains(state.elements.popper, arrowElement)) {\n    return;\n  }\n\n  state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'arrow',\n  enabled: true,\n  phase: 'main',\n  fn: arrow,\n  effect: effect,\n  requires: ['popperOffsets'],\n  requiresIfExists: ['preventOverflow']\n};", "export default function getVariation(placement) {\n  return placement.split('-')[1];\n}", "import { top, left, right, bottom, end } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getComputedStyle from \"../dom-utils/getComputedStyle.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport { round } from \"../utils/math.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar unsetSides = {\n  top: 'auto',\n  right: 'auto',\n  bottom: 'auto',\n  left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsetsByDPR(_ref, win) {\n  var x = _ref.x,\n      y = _ref.y;\n  var dpr = win.devicePixelRatio || 1;\n  return {\n    x: round(x * dpr) / dpr || 0,\n    y: round(y * dpr) / dpr || 0\n  };\n}\n\nexport function mapToStyles(_ref2) {\n  var _Object$assign2;\n\n  var popper = _ref2.popper,\n      popperRect = _ref2.popperRect,\n      placement = _ref2.placement,\n      variation = _ref2.variation,\n      offsets = _ref2.offsets,\n      position = _ref2.position,\n      gpuAcceleration = _ref2.gpuAcceleration,\n      adaptive = _ref2.adaptive,\n      roundOffsets = _ref2.roundOffsets,\n      isFixed = _ref2.isFixed;\n  var _offsets$x = offsets.x,\n      x = _offsets$x === void 0 ? 0 : _offsets$x,\n      _offsets$y = offsets.y,\n      y = _offsets$y === void 0 ? 0 : _offsets$y;\n\n  var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({\n    x: x,\n    y: y\n  }) : {\n    x: x,\n    y: y\n  };\n\n  x = _ref3.x;\n  y = _ref3.y;\n  var hasX = offsets.hasOwnProperty('x');\n  var hasY = offsets.hasOwnProperty('y');\n  var sideX = left;\n  var sideY = top;\n  var win = window;\n\n  if (adaptive) {\n    var offsetParent = getOffsetParent(popper);\n    var heightProp = 'clientHeight';\n    var widthProp = 'clientWidth';\n\n    if (offsetParent === getWindow(popper)) {\n      offsetParent = getDocumentElement(popper);\n\n      if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {\n        heightProp = 'scrollHeight';\n        widthProp = 'scrollWidth';\n      }\n    } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n    offsetParent = offsetParent;\n\n    if (placement === top || (placement === left || placement === right) && variation === end) {\n      sideY = bottom;\n      var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]\n      offsetParent[heightProp];\n      y -= offsetY - popperRect.height;\n      y *= gpuAcceleration ? 1 : -1;\n    }\n\n    if (placement === left || (placement === top || placement === bottom) && variation === end) {\n      sideX = right;\n      var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]\n      offsetParent[widthProp];\n      x -= offsetX - popperRect.width;\n      x *= gpuAcceleration ? 1 : -1;\n    }\n  }\n\n  var commonStyles = Object.assign({\n    position: position\n  }, adaptive && unsetSides);\n\n  var _ref4 = roundOffsets === true ? roundOffsetsByDPR({\n    x: x,\n    y: y\n  }, getWindow(popper)) : {\n    x: x,\n    y: y\n  };\n\n  x = _ref4.x;\n  y = _ref4.y;\n\n  if (gpuAcceleration) {\n    var _Object$assign;\n\n    return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n  }\n\n  return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref5) {\n  var state = _ref5.state,\n      options = _ref5.options;\n  var _options$gpuAccelerat = options.gpuAcceleration,\n      gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n      _options$adaptive = options.adaptive,\n      adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n      _options$roundOffsets = options.roundOffsets,\n      roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n  var commonStyles = {\n    placement: getBasePlacement(state.placement),\n    variation: getVariation(state.placement),\n    popper: state.elements.popper,\n    popperRect: state.rects.popper,\n    gpuAcceleration: gpuAcceleration,\n    isFixed: state.options.strategy === 'fixed'\n  };\n\n  if (state.modifiersData.popperOffsets != null) {\n    state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n      offsets: state.modifiersData.popperOffsets,\n      position: state.options.strategy,\n      adaptive: adaptive,\n      roundOffsets: roundOffsets\n    })));\n  }\n\n  if (state.modifiersData.arrow != null) {\n    state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n      offsets: state.modifiersData.arrow,\n      position: 'absolute',\n      adaptive: false,\n      roundOffsets: roundOffsets\n    })));\n  }\n\n  state.attributes.popper = Object.assign({}, state.attributes.popper, {\n    'data-popper-placement': state.placement\n  });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'computeStyles',\n  enabled: true,\n  phase: 'beforeWrite',\n  fn: computeStyles,\n  data: {}\n};", "import getWindow from \"../dom-utils/getWindow.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar passive = {\n  passive: true\n};\n\nfunction effect(_ref) {\n  var state = _ref.state,\n      instance = _ref.instance,\n      options = _ref.options;\n  var _options$scroll = options.scroll,\n      scroll = _options$scroll === void 0 ? true : _options$scroll,\n      _options$resize = options.resize,\n      resize = _options$resize === void 0 ? true : _options$resize;\n  var window = getWindow(state.elements.popper);\n  var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n  if (scroll) {\n    scrollParents.forEach(function (scrollParent) {\n      scrollParent.addEventListener('scroll', instance.update, passive);\n    });\n  }\n\n  if (resize) {\n    window.addEventListener('resize', instance.update, passive);\n  }\n\n  return function () {\n    if (scroll) {\n      scrollParents.forEach(function (scrollParent) {\n        scrollParent.removeEventListener('scroll', instance.update, passive);\n      });\n    }\n\n    if (resize) {\n      window.removeEventListener('resize', instance.update, passive);\n    }\n  };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'eventListeners',\n  enabled: true,\n  phase: 'write',\n  fn: function fn() {},\n  effect: effect,\n  data: {}\n};", "var hash = {\n  left: 'right',\n  right: 'left',\n  bottom: 'top',\n  top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n  return placement.replace(/left|right|bottom|top/g, function (matched) {\n    return hash[matched];\n  });\n}", "var hash = {\n  start: 'end',\n  end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n  return placement.replace(/start|end/g, function (matched) {\n    return hash[matched];\n  });\n}", "import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n  var win = getWindow(node);\n  var scrollLeft = win.pageXOffset;\n  var scrollTop = win.pageYOffset;\n  return {\n    scrollLeft: scrollLeft,\n    scrollTop: scrollTop\n  };\n}", "import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getWindowScrollBarX(element) {\n  // If <html> has a CSS width greater than the viewport, then this will be\n  // incorrect for RTL.\n  // Popper 1 is broken in this case and never had a bug report so let's assume\n  // it's not an issue. I don't think anyone ever specifies width on <html>\n  // anyway.\n  // Browsers where the left scrollbar doesn't cause an issue report `0` for\n  // this (e.g. Edge 2019, IE11, Safari)\n  return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}", "import getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getViewportRect(element, strategy) {\n  var win = getWindow(element);\n  var html = getDocumentElement(element);\n  var visualViewport = win.visualViewport;\n  var width = html.clientWidth;\n  var height = html.clientHeight;\n  var x = 0;\n  var y = 0;\n\n  if (visualViewport) {\n    width = visualViewport.width;\n    height = visualViewport.height;\n    var layoutViewport = isLayoutViewport();\n\n    if (layoutViewport || !layoutViewport && strategy === 'fixed') {\n      x = visualViewport.offsetLeft;\n      y = visualViewport.offsetTop;\n    }\n  }\n\n  return {\n    width: width,\n    height: height,\n    x: x + getWindowScrollBarX(element),\n    y: y\n  };\n}", "import getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nimport { max } from \"../utils/math.js\"; // Gets the entire size of the scrollable document area, even extending outside\n// of the `<html>` and `<body>` rect bounds if horizontally scrollable\n\nexport default function getDocumentRect(element) {\n  var _element$ownerDocumen;\n\n  var html = getDocumentElement(element);\n  var winScroll = getWindowScroll(element);\n  var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n  var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n  var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n  var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n  var y = -winScroll.scrollTop;\n\n  if (getComputedStyle(body || html).direction === 'rtl') {\n    x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n  }\n\n  return {\n    width: width,\n    height: height,\n    x: x,\n    y: y\n  };\n}", "import getComputedStyle from \"./getComputedStyle.js\";\nexport default function isScrollParent(element) {\n  // Firefox wants us to check `-x` and `-y` variations as well\n  var _getComputedStyle = getComputedStyle(element),\n      overflow = _getComputedStyle.overflow,\n      overflowX = _getComputedStyle.overflowX,\n      overflowY = _getComputedStyle.overflowY;\n\n  return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}", "import getParentNode from \"./getParentNode.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n  if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n    // $FlowFixMe[incompatible-return]: assume body is always available\n    return node.ownerDocument.body;\n  }\n\n  if (isHTMLElement(node) && isScrollParent(node)) {\n    return node;\n  }\n\n  return getScrollParent(getParentNode(node));\n}", "import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getWindow from \"./getWindow.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the\nreference element's position.\n*/\n\nexport default function listScrollParents(element, list) {\n  var _element$ownerDocumen;\n\n  if (list === void 0) {\n    list = [];\n  }\n\n  var scrollParent = getScrollParent(element);\n  var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n  var win = getWindow(scrollParent);\n  var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n  var updatedList = list.concat(target);\n  return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n  updatedList.concat(listScrollParents(getParentNode(target)));\n}", "export default function rectToClientRect(rect) {\n  return Object.assign({}, rect, {\n    left: rect.x,\n    top: rect.y,\n    right: rect.x + rect.width,\n    bottom: rect.y + rect.height\n  });\n}", "import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport contains from \"./contains.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\nimport { max, min } from \"../utils/math.js\";\n\nfunction getInnerBoundingClientRect(element, strategy) {\n  var rect = getBoundingClientRect(element, false, strategy === 'fixed');\n  rect.top = rect.top + element.clientTop;\n  rect.left = rect.left + element.clientLeft;\n  rect.bottom = rect.top + element.clientHeight;\n  rect.right = rect.left + element.clientWidth;\n  rect.width = element.clientWidth;\n  rect.height = element.clientHeight;\n  rect.x = rect.left;\n  rect.y = rect.top;\n  return rect;\n}\n\nfunction getClientRectFromMixedType(element, clippingParent, strategy) {\n  return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n  var clippingParents = listScrollParents(getParentNode(element));\n  var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n  var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n  if (!isElement(clipperElement)) {\n    return [];\n  } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n  return clippingParents.filter(function (clippingParent) {\n    return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n  });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary, strategy) {\n  var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n  var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n  var firstClippingParent = clippingParents[0];\n  var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n    var rect = getClientRectFromMixedType(element, clippingParent, strategy);\n    accRect.top = max(rect.top, accRect.top);\n    accRect.right = min(rect.right, accRect.right);\n    accRect.bottom = min(rect.bottom, accRect.bottom);\n    accRect.left = max(rect.left, accRect.left);\n    return accRect;\n  }, getClientRectFromMixedType(element, firstClippingParent, strategy));\n  clippingRect.width = clippingRect.right - clippingRect.left;\n  clippingRect.height = clippingRect.bottom - clippingRect.top;\n  clippingRect.x = clippingRect.left;\n  clippingRect.y = clippingRect.top;\n  return clippingRect;\n}", "import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n  var reference = _ref.reference,\n      element = _ref.element,\n      placement = _ref.placement;\n  var basePlacement = placement ? getBasePlacement(placement) : null;\n  var variation = placement ? getVariation(placement) : null;\n  var commonX = reference.x + reference.width / 2 - element.width / 2;\n  var commonY = reference.y + reference.height / 2 - element.height / 2;\n  var offsets;\n\n  switch (basePlacement) {\n    case top:\n      offsets = {\n        x: commonX,\n        y: reference.y - element.height\n      };\n      break;\n\n    case bottom:\n      offsets = {\n        x: commonX,\n        y: reference.y + reference.height\n      };\n      break;\n\n    case right:\n      offsets = {\n        x: reference.x + reference.width,\n        y: commonY\n      };\n      break;\n\n    case left:\n      offsets = {\n        x: reference.x - element.width,\n        y: commonY\n      };\n      break;\n\n    default:\n      offsets = {\n        x: reference.x,\n        y: reference.y\n      };\n  }\n\n  var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n  if (mainAxis != null) {\n    var len = mainAxis === 'y' ? 'height' : 'width';\n\n    switch (variation) {\n      case start:\n        offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n        break;\n\n      case end:\n        offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n        break;\n\n      default:\n    }\n  }\n\n  return offsets;\n}", "import getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport default function detectOverflow(state, options) {\n  if (options === void 0) {\n    options = {};\n  }\n\n  var _options = options,\n      _options$placement = _options.placement,\n      placement = _options$placement === void 0 ? state.placement : _options$placement,\n      _options$strategy = _options.strategy,\n      strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,\n      _options$boundary = _options.boundary,\n      boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n      _options$rootBoundary = _options.rootBoundary,\n      rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n      _options$elementConte = _options.elementContext,\n      elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n      _options$altBoundary = _options.altBoundary,\n      altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n      _options$padding = _options.padding,\n      padding = _options$padding === void 0 ? 0 : _options$padding;\n  var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n  var altContext = elementContext === popper ? reference : popper;\n  var popperRect = state.rects.popper;\n  var element = state.elements[altBoundary ? altContext : elementContext];\n  var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);\n  var referenceClientRect = getBoundingClientRect(state.elements.reference);\n  var popperOffsets = computeOffsets({\n    reference: referenceClientRect,\n    element: popperRect,\n    strategy: 'absolute',\n    placement: placement\n  });\n  var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n  var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n  // 0 or negative = within the clipping rect\n\n  var overflowOffsets = {\n    top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n    bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n    left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n    right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n  };\n  var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n  if (elementContext === popper && offsetData) {\n    var offset = offsetData[placement];\n    Object.keys(overflowOffsets).forEach(function (key) {\n      var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n      var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n      overflowOffsets[key] += offset[axis] * multiply;\n    });\n  }\n\n  return overflowOffsets;\n}", "import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements, placements as allPlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\nexport default function computeAutoPlacement(state, options) {\n  if (options === void 0) {\n    options = {};\n  }\n\n  var _options = options,\n      placement = _options.placement,\n      boundary = _options.boundary,\n      rootBoundary = _options.rootBoundary,\n      padding = _options.padding,\n      flipVariations = _options.flipVariations,\n      _options$allowedAutoP = _options.allowedAutoPlacements,\n      allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;\n  var variation = getVariation(placement);\n  var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n    return getVariation(placement) === variation;\n  }) : basePlacements;\n  var allowedPlacements = placements.filter(function (placement) {\n    return allowedAutoPlacements.indexOf(placement) >= 0;\n  });\n\n  if (allowedPlacements.length === 0) {\n    allowedPlacements = placements;\n  } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n  var overflows = allowedPlacements.reduce(function (acc, placement) {\n    acc[placement] = detectOverflow(state, {\n      placement: placement,\n      boundary: boundary,\n      rootBoundary: rootBoundary,\n      padding: padding\n    })[getBasePlacement(placement)];\n    return acc;\n  }, {});\n  return Object.keys(overflows).sort(function (a, b) {\n    return overflows[a] - overflows[b];\n  });\n}", "import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction getExpandedFallbackPlacements(placement) {\n  if (getBasePlacement(placement) === auto) {\n    return [];\n  }\n\n  var oppositePlacement = getOppositePlacement(placement);\n  return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n  var state = _ref.state,\n      options = _ref.options,\n      name = _ref.name;\n\n  if (state.modifiersData[name]._skip) {\n    return;\n  }\n\n  var _options$mainAxis = options.mainAxis,\n      checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n      _options$altAxis = options.altAxis,\n      checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n      specifiedFallbackPlacements = options.fallbackPlacements,\n      padding = options.padding,\n      boundary = options.boundary,\n      rootBoundary = options.rootBoundary,\n      altBoundary = options.altBoundary,\n      _options$flipVariatio = options.flipVariations,\n      flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n      allowedAutoPlacements = options.allowedAutoPlacements;\n  var preferredPlacement = state.options.placement;\n  var basePlacement = getBasePlacement(preferredPlacement);\n  var isBasePlacement = basePlacement === preferredPlacement;\n  var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n  var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n    return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n      placement: placement,\n      boundary: boundary,\n      rootBoundary: rootBoundary,\n      padding: padding,\n      flipVariations: flipVariations,\n      allowedAutoPlacements: allowedAutoPlacements\n    }) : placement);\n  }, []);\n  var referenceRect = state.rects.reference;\n  var popperRect = state.rects.popper;\n  var checksMap = new Map();\n  var makeFallbackChecks = true;\n  var firstFittingPlacement = placements[0];\n\n  for (var i = 0; i < placements.length; i++) {\n    var placement = placements[i];\n\n    var _basePlacement = getBasePlacement(placement);\n\n    var isStartVariation = getVariation(placement) === start;\n    var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n    var len = isVertical ? 'width' : 'height';\n    var overflow = detectOverflow(state, {\n      placement: placement,\n      boundary: boundary,\n      rootBoundary: rootBoundary,\n      altBoundary: altBoundary,\n      padding: padding\n    });\n    var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n    if (referenceRect[len] > popperRect[len]) {\n      mainVariationSide = getOppositePlacement(mainVariationSide);\n    }\n\n    var altVariationSide = getOppositePlacement(mainVariationSide);\n    var checks = [];\n\n    if (checkMainAxis) {\n      checks.push(overflow[_basePlacement] <= 0);\n    }\n\n    if (checkAltAxis) {\n      checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n    }\n\n    if (checks.every(function (check) {\n      return check;\n    })) {\n      firstFittingPlacement = placement;\n      makeFallbackChecks = false;\n      break;\n    }\n\n    checksMap.set(placement, checks);\n  }\n\n  if (makeFallbackChecks) {\n    // `2` may be desired in some cases \u2013 research later\n    var numberOfChecks = flipVariations ? 3 : 1;\n\n    var _loop = function _loop(_i) {\n      var fittingPlacement = placements.find(function (placement) {\n        var checks = checksMap.get(placement);\n\n        if (checks) {\n          return checks.slice(0, _i).every(function (check) {\n            return check;\n          });\n        }\n      });\n\n      if (fittingPlacement) {\n        firstFittingPlacement = fittingPlacement;\n        return \"break\";\n      }\n    };\n\n    for (var _i = numberOfChecks; _i > 0; _i--) {\n      var _ret = _loop(_i);\n\n      if (_ret === \"break\") break;\n    }\n  }\n\n  if (state.placement !== firstFittingPlacement) {\n    state.modifiersData[name]._skip = true;\n    state.placement = firstFittingPlacement;\n    state.reset = true;\n  }\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'flip',\n  enabled: true,\n  phase: 'main',\n  fn: flip,\n  requiresIfExists: ['offset'],\n  data: {\n    _skip: false\n  }\n};", "import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n  if (preventedOffsets === void 0) {\n    preventedOffsets = {\n      x: 0,\n      y: 0\n    };\n  }\n\n  return {\n    top: overflow.top - rect.height - preventedOffsets.y,\n    right: overflow.right - rect.width + preventedOffsets.x,\n    bottom: overflow.bottom - rect.height + preventedOffsets.y,\n    left: overflow.left - rect.width - preventedOffsets.x\n  };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n  return [top, right, bottom, left].some(function (side) {\n    return overflow[side] >= 0;\n  });\n}\n\nfunction hide(_ref) {\n  var state = _ref.state,\n      name = _ref.name;\n  var referenceRect = state.rects.reference;\n  var popperRect = state.rects.popper;\n  var preventedOffsets = state.modifiersData.preventOverflow;\n  var referenceOverflow = detectOverflow(state, {\n    elementContext: 'reference'\n  });\n  var popperAltOverflow = detectOverflow(state, {\n    altBoundary: true\n  });\n  var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n  var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n  var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n  var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n  state.modifiersData[name] = {\n    referenceClippingOffsets: referenceClippingOffsets,\n    popperEscapeOffsets: popperEscapeOffsets,\n    isReferenceHidden: isReferenceHidden,\n    hasPopperEscaped: hasPopperEscaped\n  };\n  state.attributes.popper = Object.assign({}, state.attributes.popper, {\n    'data-popper-reference-hidden': isReferenceHidden,\n    'data-popper-escaped': hasPopperEscaped\n  });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'hide',\n  enabled: true,\n  phase: 'main',\n  requiresIfExists: ['preventOverflow'],\n  fn: hide\n};", "import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n  var basePlacement = getBasePlacement(placement);\n  var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n  var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n    placement: placement\n  })) : offset,\n      skidding = _ref[0],\n      distance = _ref[1];\n\n  skidding = skidding || 0;\n  distance = (distance || 0) * invertDistance;\n  return [left, right].indexOf(basePlacement) >= 0 ? {\n    x: distance,\n    y: skidding\n  } : {\n    x: skidding,\n    y: distance\n  };\n}\n\nfunction offset(_ref2) {\n  var state = _ref2.state,\n      options = _ref2.options,\n      name = _ref2.name;\n  var _options$offset = options.offset,\n      offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n  var data = placements.reduce(function (acc, placement) {\n    acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n    return acc;\n  }, {});\n  var _data$state$placement = data[state.placement],\n      x = _data$state$placement.x,\n      y = _data$state$placement.y;\n\n  if (state.modifiersData.popperOffsets != null) {\n    state.modifiersData.popperOffsets.x += x;\n    state.modifiersData.popperOffsets.y += y;\n  }\n\n  state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'offset',\n  enabled: true,\n  phase: 'main',\n  requires: ['popperOffsets'],\n  fn: offset\n};", "import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n  var state = _ref.state,\n      name = _ref.name;\n  // Offsets are the actual position the popper needs to have to be\n  // properly positioned near its reference element\n  // This is the most basic placement, and will be adjusted by\n  // the modifiers in the next step\n  state.modifiersData[name] = computeOffsets({\n    reference: state.rects.reference,\n    element: state.rects.popper,\n    strategy: 'absolute',\n    placement: state.placement\n  });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'popperOffsets',\n  enabled: true,\n  phase: 'read',\n  fn: popperOffsets,\n  data: {}\n};", "export default function getAltAxis(axis) {\n  return axis === 'x' ? 'y' : 'x';\n}", "import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport { within, withinMaxClamp } from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\nimport { min as mathMin, max as mathMax } from \"../utils/math.js\";\n\nfunction preventOverflow(_ref) {\n  var state = _ref.state,\n      options = _ref.options,\n      name = _ref.name;\n  var _options$mainAxis = options.mainAxis,\n      checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n      _options$altAxis = options.altAxis,\n      checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n      boundary = options.boundary,\n      rootBoundary = options.rootBoundary,\n      altBoundary = options.altBoundary,\n      padding = options.padding,\n      _options$tether = options.tether,\n      tether = _options$tether === void 0 ? true : _options$tether,\n      _options$tetherOffset = options.tetherOffset,\n      tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n  var overflow = detectOverflow(state, {\n    boundary: boundary,\n    rootBoundary: rootBoundary,\n    padding: padding,\n    altBoundary: altBoundary\n  });\n  var basePlacement = getBasePlacement(state.placement);\n  var variation = getVariation(state.placement);\n  var isBasePlacement = !variation;\n  var mainAxis = getMainAxisFromPlacement(basePlacement);\n  var altAxis = getAltAxis(mainAxis);\n  var popperOffsets = state.modifiersData.popperOffsets;\n  var referenceRect = state.rects.reference;\n  var popperRect = state.rects.popper;\n  var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n    placement: state.placement\n  })) : tetherOffset;\n  var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {\n    mainAxis: tetherOffsetValue,\n    altAxis: tetherOffsetValue\n  } : Object.assign({\n    mainAxis: 0,\n    altAxis: 0\n  }, tetherOffsetValue);\n  var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;\n  var data = {\n    x: 0,\n    y: 0\n  };\n\n  if (!popperOffsets) {\n    return;\n  }\n\n  if (checkMainAxis) {\n    var _offsetModifierState$;\n\n    var mainSide = mainAxis === 'y' ? top : left;\n    var altSide = mainAxis === 'y' ? bottom : right;\n    var len = mainAxis === 'y' ? 'height' : 'width';\n    var offset = popperOffsets[mainAxis];\n    var min = offset + overflow[mainSide];\n    var max = offset - overflow[altSide];\n    var additive = tether ? -popperRect[len] / 2 : 0;\n    var minLen = variation === start ? referenceRect[len] : popperRect[len];\n    var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n    // outside the reference bounds\n\n    var arrowElement = state.elements.arrow;\n    var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n      width: 0,\n      height: 0\n    };\n    var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n    var arrowPaddingMin = arrowPaddingObject[mainSide];\n    var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n    // to include its full size in the calculation. If the reference is small\n    // and near the edge of a boundary, the popper can overflow even if the\n    // reference is not overflowing as well (e.g. virtual elements with no\n    // width or height)\n\n    var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n    var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;\n    var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;\n    var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n    var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n    var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;\n    var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;\n    var tetherMax = offset + maxOffset - offsetModifierValue;\n    var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max);\n    popperOffsets[mainAxis] = preventedOffset;\n    data[mainAxis] = preventedOffset - offset;\n  }\n\n  if (checkAltAxis) {\n    var _offsetModifierState$2;\n\n    var _mainSide = mainAxis === 'x' ? top : left;\n\n    var _altSide = mainAxis === 'x' ? bottom : right;\n\n    var _offset = popperOffsets[altAxis];\n\n    var _len = altAxis === 'y' ? 'height' : 'width';\n\n    var _min = _offset + overflow[_mainSide];\n\n    var _max = _offset - overflow[_altSide];\n\n    var isOriginSide = [top, left].indexOf(basePlacement) !== -1;\n\n    var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;\n\n    var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;\n\n    var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;\n\n    var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);\n\n    popperOffsets[altAxis] = _preventedOffset;\n    data[altAxis] = _preventedOffset - _offset;\n  }\n\n  state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'preventOverflow',\n  enabled: true,\n  phase: 'main',\n  fn: preventOverflow,\n  requiresIfExists: ['offset']\n};", "export default function getHTMLElementScroll(element) {\n  return {\n    scrollLeft: element.scrollLeft,\n    scrollTop: element.scrollTop\n  };\n}", "import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n  if (node === getWindow(node) || !isHTMLElement(node)) {\n    return getWindowScroll(node);\n  } else {\n    return getHTMLElementScroll(node);\n  }\n}", "import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport { round } from \"../utils/math.js\";\n\nfunction isElementScaled(element) {\n  var rect = element.getBoundingClientRect();\n  var scaleX = round(rect.width) / element.offsetWidth || 1;\n  var scaleY = round(rect.height) / element.offsetHeight || 1;\n  return scaleX !== 1 || scaleY !== 1;\n} // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n  if (isFixed === void 0) {\n    isFixed = false;\n  }\n\n  var isOffsetParentAnElement = isHTMLElement(offsetParent);\n  var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n  var documentElement = getDocumentElement(offsetParent);\n  var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n  var scroll = {\n    scrollLeft: 0,\n    scrollTop: 0\n  };\n  var offsets = {\n    x: 0,\n    y: 0\n  };\n\n  if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n    if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n    isScrollParent(documentElement)) {\n      scroll = getNodeScroll(offsetParent);\n    }\n\n    if (isHTMLElement(offsetParent)) {\n      offsets = getBoundingClientRect(offsetParent, true);\n      offsets.x += offsetParent.clientLeft;\n      offsets.y += offsetParent.clientTop;\n    } else if (documentElement) {\n      offsets.x = getWindowScrollBarX(documentElement);\n    }\n  }\n\n  return {\n    x: rect.left + scroll.scrollLeft - offsets.x,\n    y: rect.top + scroll.scrollTop - offsets.y,\n    width: rect.width,\n    height: rect.height\n  };\n}", "import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n  var map = new Map();\n  var visited = new Set();\n  var result = [];\n  modifiers.forEach(function (modifier) {\n    map.set(modifier.name, modifier);\n  }); // On visiting object, check for its dependencies and visit them recursively\n\n  function sort(modifier) {\n    visited.add(modifier.name);\n    var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n    requires.forEach(function (dep) {\n      if (!visited.has(dep)) {\n        var depModifier = map.get(dep);\n\n        if (depModifier) {\n          sort(depModifier);\n        }\n      }\n    });\n    result.push(modifier);\n  }\n\n  modifiers.forEach(function (modifier) {\n    if (!visited.has(modifier.name)) {\n      // check for visited object\n      sort(modifier);\n    }\n  });\n  return result;\n}\n\nexport default function orderModifiers(modifiers) {\n  // order based on dependencies\n  var orderedModifiers = order(modifiers); // order based on phase\n\n  return modifierPhases.reduce(function (acc, phase) {\n    return acc.concat(orderedModifiers.filter(function (modifier) {\n      return modifier.phase === phase;\n    }));\n  }, []);\n}", "export default function debounce(fn) {\n  var pending;\n  return function () {\n    if (!pending) {\n      pending = new Promise(function (resolve) {\n        Promise.resolve().then(function () {\n          pending = undefined;\n          resolve(fn());\n        });\n      });\n    }\n\n    return pending;\n  };\n}", "export default function mergeByName(modifiers) {\n  var merged = modifiers.reduce(function (merged, current) {\n    var existing = merged[current.name];\n    merged[current.name] = existing ? Object.assign({}, existing, current, {\n      options: Object.assign({}, existing.options, current.options),\n      data: Object.assign({}, existing.data, current.data)\n    }) : current;\n    return merged;\n  }, {}); // IE11 does not support Object.values\n\n  return Object.keys(merged).map(function (key) {\n    return merged[key];\n  });\n}", "import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport mergeByName from \"./utils/mergeByName.js\";\nimport detectOverflow from \"./utils/detectOverflow.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nvar DEFAULT_OPTIONS = {\n  placement: 'bottom',\n  modifiers: [],\n  strategy: 'absolute'\n};\n\nfunction areValidElements() {\n  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n    args[_key] = arguments[_key];\n  }\n\n  return !args.some(function (element) {\n    return !(element && typeof element.getBoundingClientRect === 'function');\n  });\n}\n\nexport function popperGenerator(generatorOptions) {\n  if (generatorOptions === void 0) {\n    generatorOptions = {};\n  }\n\n  var _generatorOptions = generatorOptions,\n      _generatorOptions$def = _generatorOptions.defaultModifiers,\n      defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n      _generatorOptions$def2 = _generatorOptions.defaultOptions,\n      defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n  return function createPopper(reference, popper, options) {\n    if (options === void 0) {\n      options = defaultOptions;\n    }\n\n    var state = {\n      placement: 'bottom',\n      orderedModifiers: [],\n      options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n      modifiersData: {},\n      elements: {\n        reference: reference,\n        popper: popper\n      },\n      attributes: {},\n      styles: {}\n    };\n    var effectCleanupFns = [];\n    var isDestroyed = false;\n    var instance = {\n      state: state,\n      setOptions: function setOptions(setOptionsAction) {\n        var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n        cleanupModifierEffects();\n        state.options = Object.assign({}, defaultOptions, state.options, options);\n        state.scrollParents = {\n          reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n          popper: listScrollParents(popper)\n        }; // Orders the modifiers based on their dependencies and `phase`\n        // properties\n\n        var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n        state.orderedModifiers = orderedModifiers.filter(function (m) {\n          return m.enabled;\n        });\n        runModifierEffects();\n        return instance.update();\n      },\n      // Sync update \u2013 it will always be executed, even if not necessary. This\n      // is useful for low frequency updates where sync behavior simplifies the\n      // logic.\n      // For high frequency updates (e.g. `resize` and `scroll` events), always\n      // prefer the async Popper#update method\n      forceUpdate: function forceUpdate() {\n        if (isDestroyed) {\n          return;\n        }\n\n        var _state$elements = state.elements,\n            reference = _state$elements.reference,\n            popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n        // anymore\n\n        if (!areValidElements(reference, popper)) {\n          return;\n        } // Store the reference and popper rects to be read by modifiers\n\n\n        state.rects = {\n          reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n          popper: getLayoutRect(popper)\n        }; // Modifiers have the ability to reset the current update cycle. The\n        // most common use case for this is the `flip` modifier changing the\n        // placement, which then needs to re-run all the modifiers, because the\n        // logic was previously ran for the previous placement and is therefore\n        // stale/incorrect\n\n        state.reset = false;\n        state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n        // is filled with the initial data specified by the modifier. This means\n        // it doesn't persist and is fresh on each update.\n        // To ensure persistent data, use `${name}#persistent`\n\n        state.orderedModifiers.forEach(function (modifier) {\n          return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n        });\n\n        for (var index = 0; index < state.orderedModifiers.length; index++) {\n          if (state.reset === true) {\n            state.reset = false;\n            index = -1;\n            continue;\n          }\n\n          var _state$orderedModifie = state.orderedModifiers[index],\n              fn = _state$orderedModifie.fn,\n              _state$orderedModifie2 = _state$orderedModifie.options,\n              _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n              name = _state$orderedModifie.name;\n\n          if (typeof fn === 'function') {\n            state = fn({\n              state: state,\n              options: _options,\n              name: name,\n              instance: instance\n            }) || state;\n          }\n        }\n      },\n      // Async and optimistically optimized update \u2013 it will not be executed if\n      // not necessary (debounced to run at most once-per-tick)\n      update: debounce(function () {\n        return new Promise(function (resolve) {\n          instance.forceUpdate();\n          resolve(state);\n        });\n      }),\n      destroy: function destroy() {\n        cleanupModifierEffects();\n        isDestroyed = true;\n      }\n    };\n\n    if (!areValidElements(reference, popper)) {\n      return instance;\n    }\n\n    instance.setOptions(options).then(function (state) {\n      if (!isDestroyed && options.onFirstUpdate) {\n        options.onFirstUpdate(state);\n      }\n    }); // Modifiers have the ability to execute arbitrary code before the first\n    // update cycle runs. They will be executed in the same order as the update\n    // cycle. This is useful when a modifier adds some persistent data that\n    // other modifiers need to use, but the modifier is run after the dependent\n    // one.\n\n    function runModifierEffects() {\n      state.orderedModifiers.forEach(function (_ref) {\n        var name = _ref.name,\n            _ref$options = _ref.options,\n            options = _ref$options === void 0 ? {} : _ref$options,\n            effect = _ref.effect;\n\n        if (typeof effect === 'function') {\n          var cleanupFn = effect({\n            state: state,\n            name: name,\n            instance: instance,\n            options: options\n          });\n\n          var noopFn = function noopFn() {};\n\n          effectCleanupFns.push(cleanupFn || noopFn);\n        }\n      });\n    }\n\n    function cleanupModifierEffects() {\n      effectCleanupFns.forEach(function (fn) {\n        return fn();\n      });\n      effectCleanupFns = [];\n    }\n\n    return instance;\n  };\n}\nexport var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\nexport { detectOverflow };", "import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles];\nvar createPopper = /*#__PURE__*/popperGenerator({\n  defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow };", "import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nimport offset from \"./modifiers/offset.js\";\nimport flip from \"./modifiers/flip.js\";\nimport preventOverflow from \"./modifiers/preventOverflow.js\";\nimport arrow from \"./modifiers/arrow.js\";\nimport hide from \"./modifiers/hide.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles, offset, flip, preventOverflow, arrow, hide];\nvar createPopper = /*#__PURE__*/popperGenerator({\n  defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow }; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport * from \"./modifiers/index.js\";", "/**\n * --------------------------------------------------------------------------\n * Bootstrap dom/data.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n/**\n * Constants\n */\n\nconst elementMap = new Map()\n\nexport default {\n  set(element, key, instance) {\n    if (!elementMap.has(element)) {\n      elementMap.set(element, new Map())\n    }\n\n    const instanceMap = elementMap.get(element)\n\n    // make it clear we only want one instance per element\n    // can be removed later when multiple key/instances are fine to be used\n    if (!instanceMap.has(key) && instanceMap.size !== 0) {\n      // eslint-disable-next-line no-console\n      console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`)\n      return\n    }\n\n    instanceMap.set(key, instance)\n  },\n\n  get(element, key) {\n    if (elementMap.has(element)) {\n      return elementMap.get(element).get(key) || null\n    }\n\n    return null\n  },\n\n  remove(element, key) {\n    if (!elementMap.has(element)) {\n      return\n    }\n\n    const instanceMap = elementMap.get(element)\n\n    instanceMap.delete(key)\n\n    // free up element references if there are no instances left for an element\n    if (instanceMap.size === 0) {\n      elementMap.delete(element)\n    }\n  }\n}\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst MAX_UID = 1_000_000\nconst MILLISECONDS_MULTIPLIER = 1000\nconst TRANSITION_END = 'transitionend'\n\n/**\n * Properly escape IDs selectors to handle weird IDs\n * @param {string} selector\n * @returns {string}\n */\nconst parseSelector = selector => {\n  if (selector && window.CSS && window.CSS.escape) {\n    // document.querySelector needs escaping to handle IDs (html5+) containing for instance /\n    selector = selector.replace(/#([^\\s\"#']+)/g, (match, id) => `#${CSS.escape(id)}`)\n  }\n\n  return selector\n}\n\n// Shout-out Angus Croll (https://goo.gl/pxwQGp)\nconst toType = object => {\n  if (object === null || object === undefined) {\n    return `${object}`\n  }\n\n  return Object.prototype.toString.call(object).match(/\\s([a-z]+)/i)[1].toLowerCase()\n}\n\n/**\n * Public Util API\n */\n\nconst getUID = prefix => {\n  do {\n    prefix += Math.floor(Math.random() * MAX_UID)\n  } while (document.getElementById(prefix))\n\n  return prefix\n}\n\nconst getTransitionDurationFromElement = element => {\n  if (!element) {\n    return 0\n  }\n\n  // Get transition-duration of the element\n  let { transitionDuration, transitionDelay } = window.getComputedStyle(element)\n\n  const floatTransitionDuration = Number.parseFloat(transitionDuration)\n  const floatTransitionDelay = Number.parseFloat(transitionDelay)\n\n  // Return 0 if element or transition duration is not found\n  if (!floatTransitionDuration && !floatTransitionDelay) {\n    return 0\n  }\n\n  // If multiple durations are defined, take the first\n  transitionDuration = transitionDuration.split(',')[0]\n  transitionDelay = transitionDelay.split(',')[0]\n\n  return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER\n}\n\nconst triggerTransitionEnd = element => {\n  element.dispatchEvent(new Event(TRANSITION_END))\n}\n\nconst isElement = object => {\n  if (!object || typeof object !== 'object') {\n    return false\n  }\n\n  if (typeof object.jquery !== 'undefined') {\n    object = object[0]\n  }\n\n  return typeof object.nodeType !== 'undefined'\n}\n\nconst getElement = object => {\n  // it's a jQuery object or a node element\n  if (isElement(object)) {\n    return object.jquery ? object[0] : object\n  }\n\n  if (typeof object === 'string' && object.length > 0) {\n    return document.querySelector(parseSelector(object))\n  }\n\n  return null\n}\n\nconst isVisible = element => {\n  if (!isElement(element) || element.getClientRects().length === 0) {\n    return false\n  }\n\n  const elementIsVisible = getComputedStyle(element).getPropertyValue('visibility') === 'visible'\n  // Handle `details` element as its content may falsie appear visible when it is closed\n  const closedDetails = element.closest('details:not([open])')\n\n  if (!closedDetails) {\n    return elementIsVisible\n  }\n\n  if (closedDetails !== element) {\n    const summary = element.closest('summary')\n    if (summary && summary.parentNode !== closedDetails) {\n      return false\n    }\n\n    if (summary === null) {\n      return false\n    }\n  }\n\n  return elementIsVisible\n}\n\nconst isDisabled = element => {\n  if (!element || element.nodeType !== Node.ELEMENT_NODE) {\n    return true\n  }\n\n  if (element.classList.contains('disabled')) {\n    return true\n  }\n\n  if (typeof element.disabled !== 'undefined') {\n    return element.disabled\n  }\n\n  return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false'\n}\n\nconst findShadowRoot = element => {\n  if (!document.documentElement.attachShadow) {\n    return null\n  }\n\n  // Can find the shadow root otherwise it'll return the document\n  if (typeof element.getRootNode === 'function') {\n    const root = element.getRootNode()\n    return root instanceof ShadowRoot ? root : null\n  }\n\n  if (element instanceof ShadowRoot) {\n    return element\n  }\n\n  // when we don't find a shadow root\n  if (!element.parentNode) {\n    return null\n  }\n\n  return findShadowRoot(element.parentNode)\n}\n\nconst noop = () => {}\n\n/**\n * Trick to restart an element's animation\n *\n * @param {HTMLElement} element\n * @return void\n *\n * @see https://www.charistheo.io/blog/2021/02/restart-a-css-animation-with-javascript/#restarting-a-css-animation\n */\nconst reflow = element => {\n  element.offsetHeight // eslint-disable-line no-unused-expressions\n}\n\nconst getjQuery = () => {\n  if (window.jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n    return window.jQuery\n  }\n\n  return null\n}\n\nconst DOMContentLoadedCallbacks = []\n\nconst onDOMContentLoaded = callback => {\n  if (document.readyState === 'loading') {\n    // add listener on the first call when the document is in loading state\n    if (!DOMContentLoadedCallbacks.length) {\n      document.addEventListener('DOMContentLoaded', () => {\n        for (const callback of DOMContentLoadedCallbacks) {\n          callback()\n        }\n      })\n    }\n\n    DOMContentLoadedCallbacks.push(callback)\n  } else {\n    callback()\n  }\n}\n\nconst isRTL = () => document.documentElement.dir === 'rtl'\n\nconst defineJQueryPlugin = plugin => {\n  onDOMContentLoaded(() => {\n    const $ = getjQuery()\n    /* istanbul ignore if */\n    if ($) {\n      const name = plugin.NAME\n      const JQUERY_NO_CONFLICT = $.fn[name]\n      $.fn[name] = plugin.jQueryInterface\n      $.fn[name].Constructor = plugin\n      $.fn[name].noConflict = () => {\n        $.fn[name] = JQUERY_NO_CONFLICT\n        return plugin.jQueryInterface\n      }\n    }\n  })\n}\n\nconst execute = (possibleCallback, args = [], defaultValue = possibleCallback) => {\n  return typeof possibleCallback === 'function' ? possibleCallback(...args) : defaultValue\n}\n\nconst executeAfterTransition = (callback, transitionElement, waitForTransition = true) => {\n  if (!waitForTransition) {\n    execute(callback)\n    return\n  }\n\n  const durationPadding = 5\n  const emulatedDuration = getTransitionDurationFromElement(transitionElement) + durationPadding\n\n  let called = false\n\n  const handler = ({ target }) => {\n    if (target !== transitionElement) {\n      return\n    }\n\n    called = true\n    transitionElement.removeEventListener(TRANSITION_END, handler)\n    execute(callback)\n  }\n\n  transitionElement.addEventListener(TRANSITION_END, handler)\n  setTimeout(() => {\n    if (!called) {\n      triggerTransitionEnd(transitionElement)\n    }\n  }, emulatedDuration)\n}\n\n/**\n * Return the previous/next element of a list.\n *\n * @param {array} list    The list of elements\n * @param activeElement   The active element\n * @param shouldGetNext   Choose to get next or previous element\n * @param isCycleAllowed\n * @return {Element|elem} The proper element\n */\nconst getNextActiveElement = (list, activeElement, shouldGetNext, isCycleAllowed) => {\n  const listLength = list.length\n  let index = list.indexOf(activeElement)\n\n  // if the element does not exist in the list return an element\n  // depending on the direction and if cycle is allowed\n  if (index === -1) {\n    return !shouldGetNext && isCycleAllowed ? list[listLength - 1] : list[0]\n  }\n\n  index += shouldGetNext ? 1 : -1\n\n  if (isCycleAllowed) {\n    index = (index + listLength) % listLength\n  }\n\n  return list[Math.max(0, Math.min(index, listLength - 1))]\n}\n\nexport {\n  defineJQueryPlugin,\n  execute,\n  executeAfterTransition,\n  findShadowRoot,\n  getElement,\n  getjQuery,\n  getNextActiveElement,\n  getTransitionDurationFromElement,\n  getUID,\n  isDisabled,\n  isElement,\n  isRTL,\n  isVisible,\n  noop,\n  onDOMContentLoaded,\n  parseSelector,\n  reflow,\n  triggerTransitionEnd,\n  toType\n}\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap dom/event-handler.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport { getjQuery } from '../util/index.js'\n\n/**\n * Constants\n */\n\nconst namespaceRegex = /[^.]*(?=\\..*)\\.|.*/\nconst stripNameRegex = /\\..*/\nconst stripUidRegex = /::\\d+$/\nconst eventRegistry = {} // Events storage\nlet uidEvent = 1\nconst customEvents = {\n  mouseenter: 'mouseover',\n  mouseleave: 'mouseout'\n}\n\nconst nativeEvents = new Set([\n  'click',\n  'dblclick',\n  'mouseup',\n  'mousedown',\n  'contextmenu',\n  'mousewheel',\n  'DOMMouseScroll',\n  'mouseover',\n  'mouseout',\n  'mousemove',\n  'selectstart',\n  'selectend',\n  'keydown',\n  'keypress',\n  'keyup',\n  'orientationchange',\n  'touchstart',\n  'touchmove',\n  'touchend',\n  'touchcancel',\n  'pointerdown',\n  'pointermove',\n  'pointerup',\n  'pointerleave',\n  'pointercancel',\n  'gesturestart',\n  'gesturechange',\n  'gestureend',\n  'focus',\n  'blur',\n  'change',\n  'reset',\n  'select',\n  'submit',\n  'focusin',\n  'focusout',\n  'load',\n  'unload',\n  'beforeunload',\n  'resize',\n  'move',\n  'DOMContentLoaded',\n  'readystatechange',\n  'error',\n  'abort',\n  'scroll'\n])\n\n/**\n * Private methods\n */\n\nfunction makeEventUid(element, uid) {\n  return (uid && `${uid}::${uidEvent++}`) || element.uidEvent || uidEvent++\n}\n\nfunction getElementEvents(element) {\n  const uid = makeEventUid(element)\n\n  element.uidEvent = uid\n  eventRegistry[uid] = eventRegistry[uid] || {}\n\n  return eventRegistry[uid]\n}\n\nfunction bootstrapHandler(element, fn) {\n  return function handler(event) {\n    hydrateObj(event, { delegateTarget: element })\n\n    if (handler.oneOff) {\n      EventHandler.off(element, event.type, fn)\n    }\n\n    return fn.apply(element, [event])\n  }\n}\n\nfunction bootstrapDelegationHandler(element, selector, fn) {\n  return function handler(event) {\n    const domElements = element.querySelectorAll(selector)\n\n    for (let { target } = event; target && target !== this; target = target.parentNode) {\n      for (const domElement of domElements) {\n        if (domElement !== target) {\n          continue\n        }\n\n        hydrateObj(event, { delegateTarget: target })\n\n        if (handler.oneOff) {\n          EventHandler.off(element, event.type, selector, fn)\n        }\n\n        return fn.apply(target, [event])\n      }\n    }\n  }\n}\n\nfunction findHandler(events, callable, delegationSelector = null) {\n  return Object.values(events)\n    .find(event => event.callable === callable && event.delegationSelector === delegationSelector)\n}\n\nfunction normalizeParameters(originalTypeEvent, handler, delegationFunction) {\n  const isDelegated = typeof handler === 'string'\n  // TODO: tooltip passes `false` instead of selector, so we need to check\n  const callable = isDelegated ? delegationFunction : (handler || delegationFunction)\n  let typeEvent = getTypeEvent(originalTypeEvent)\n\n  if (!nativeEvents.has(typeEvent)) {\n    typeEvent = originalTypeEvent\n  }\n\n  return [isDelegated, callable, typeEvent]\n}\n\nfunction addHandler(element, originalTypeEvent, handler, delegationFunction, oneOff) {\n  if (typeof originalTypeEvent !== 'string' || !element) {\n    return\n  }\n\n  let [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction)\n\n  // in case of mouseenter or mouseleave wrap the handler within a function that checks for its DOM position\n  // this prevents the handler from being dispatched the same way as mouseover or mouseout does\n  if (originalTypeEvent in customEvents) {\n    const wrapFunction = fn => {\n      return function (event) {\n        if (!event.relatedTarget || (event.relatedTarget !== event.delegateTarget && !event.delegateTarget.contains(event.relatedTarget))) {\n          return fn.call(this, event)\n        }\n      }\n    }\n\n    callable = wrapFunction(callable)\n  }\n\n  const events = getElementEvents(element)\n  const handlers = events[typeEvent] || (events[typeEvent] = {})\n  const previousFunction = findHandler(handlers, callable, isDelegated ? handler : null)\n\n  if (previousFunction) {\n    previousFunction.oneOff = previousFunction.oneOff && oneOff\n\n    return\n  }\n\n  const uid = makeEventUid(callable, originalTypeEvent.replace(namespaceRegex, ''))\n  const fn = isDelegated ?\n    bootstrapDelegationHandler(element, handler, callable) :\n    bootstrapHandler(element, callable)\n\n  fn.delegationSelector = isDelegated ? handler : null\n  fn.callable = callable\n  fn.oneOff = oneOff\n  fn.uidEvent = uid\n  handlers[uid] = fn\n\n  element.addEventListener(typeEvent, fn, isDelegated)\n}\n\nfunction removeHandler(element, events, typeEvent, handler, delegationSelector) {\n  const fn = findHandler(events[typeEvent], handler, delegationSelector)\n\n  if (!fn) {\n    return\n  }\n\n  element.removeEventListener(typeEvent, fn, Boolean(delegationSelector))\n  delete events[typeEvent][fn.uidEvent]\n}\n\nfunction removeNamespacedHandlers(element, events, typeEvent, namespace) {\n  const storeElementEvent = events[typeEvent] || {}\n\n  for (const [handlerKey, event] of Object.entries(storeElementEvent)) {\n    if (handlerKey.includes(namespace)) {\n      removeHandler(element, events, typeEvent, event.callable, event.delegationSelector)\n    }\n  }\n}\n\nfunction getTypeEvent(event) {\n  // allow to get the native events from namespaced events ('click.bs.button' --> 'click')\n  event = event.replace(stripNameRegex, '')\n  return customEvents[event] || event\n}\n\nconst EventHandler = {\n  on(element, event, handler, delegationFunction) {\n    addHandler(element, event, handler, delegationFunction, false)\n  },\n\n  one(element, event, handler, delegationFunction) {\n    addHandler(element, event, handler, delegationFunction, true)\n  },\n\n  off(element, originalTypeEvent, handler, delegationFunction) {\n    if (typeof originalTypeEvent !== 'string' || !element) {\n      return\n    }\n\n    const [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction)\n    const inNamespace = typeEvent !== originalTypeEvent\n    const events = getElementEvents(element)\n    const storeElementEvent = events[typeEvent] || {}\n    const isNamespace = originalTypeEvent.startsWith('.')\n\n    if (typeof callable !== 'undefined') {\n      // Simplest case: handler is passed, remove that listener ONLY.\n      if (!Object.keys(storeElementEvent).length) {\n        return\n      }\n\n      removeHandler(element, events, typeEvent, callable, isDelegated ? handler : null)\n      return\n    }\n\n    if (isNamespace) {\n      for (const elementEvent of Object.keys(events)) {\n        removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1))\n      }\n    }\n\n    for (const [keyHandlers, event] of Object.entries(storeElementEvent)) {\n      const handlerKey = keyHandlers.replace(stripUidRegex, '')\n\n      if (!inNamespace || originalTypeEvent.includes(handlerKey)) {\n        removeHandler(element, events, typeEvent, event.callable, event.delegationSelector)\n      }\n    }\n  },\n\n  trigger(element, event, args) {\n    if (typeof event !== 'string' || !element) {\n      return null\n    }\n\n    const $ = getjQuery()\n    const typeEvent = getTypeEvent(event)\n    const inNamespace = event !== typeEvent\n\n    let jQueryEvent = null\n    let bubbles = true\n    let nativeDispatch = true\n    let defaultPrevented = false\n\n    if (inNamespace && $) {\n      jQueryEvent = $.Event(event, args)\n\n      $(element).trigger(jQueryEvent)\n      bubbles = !jQueryEvent.isPropagationStopped()\n      nativeDispatch = !jQueryEvent.isImmediatePropagationStopped()\n      defaultPrevented = jQueryEvent.isDefaultPrevented()\n    }\n\n    const evt = hydrateObj(new Event(event, { bubbles, cancelable: true }), args)\n\n    if (defaultPrevented) {\n      evt.preventDefault()\n    }\n\n    if (nativeDispatch) {\n      element.dispatchEvent(evt)\n    }\n\n    if (evt.defaultPrevented && jQueryEvent) {\n      jQueryEvent.preventDefault()\n    }\n\n    return evt\n  }\n}\n\nfunction hydrateObj(obj, meta = {}) {\n  for (const [key, value] of Object.entries(meta)) {\n    try {\n      obj[key] = value\n    } catch {\n      Object.defineProperty(obj, key, {\n        configurable: true,\n        get() {\n          return value\n        }\n      })\n    }\n  }\n\n  return obj\n}\n\nexport default EventHandler\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap dom/manipulator.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nfunction normalizeData(value) {\n  if (value === 'true') {\n    return true\n  }\n\n  if (value === 'false') {\n    return false\n  }\n\n  if (value === Number(value).toString()) {\n    return Number(value)\n  }\n\n  if (value === '' || value === 'null') {\n    return null\n  }\n\n  if (typeof value !== 'string') {\n    return value\n  }\n\n  try {\n    return JSON.parse(decodeURIComponent(value))\n  } catch {\n    return value\n  }\n}\n\nfunction normalizeDataKey(key) {\n  return key.replace(/[A-Z]/g, chr => `-${chr.toLowerCase()}`)\n}\n\nconst Manipulator = {\n  setDataAttribute(element, key, value) {\n    element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value)\n  },\n\n  removeDataAttribute(element, key) {\n    element.removeAttribute(`data-bs-${normalizeDataKey(key)}`)\n  },\n\n  getDataAttributes(element) {\n    if (!element) {\n      return {}\n    }\n\n    const attributes = {}\n    const bsKeys = Object.keys(element.dataset).filter(key => key.startsWith('bs') && !key.startsWith('bsConfig'))\n\n    for (const key of bsKeys) {\n      let pureKey = key.replace(/^bs/, '')\n      pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1, pureKey.length)\n      attributes[pureKey] = normalizeData(element.dataset[key])\n    }\n\n    return attributes\n  },\n\n  getDataAttribute(element, key) {\n    return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`))\n  }\n}\n\nexport default Manipulator\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap util/config.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport Manipulator from '../dom/manipulator.js'\nimport { isElement, toType } from './index.js'\n\n/**\n * Class definition\n */\n\nclass Config {\n  // Getters\n  static get Default() {\n    return {}\n  }\n\n  static get DefaultType() {\n    return {}\n  }\n\n  static get NAME() {\n    throw new Error('You have to implement the static method \"NAME\", for each component!')\n  }\n\n  _getConfig(config) {\n    config = this._mergeConfigObj(config)\n    config = this._configAfterMerge(config)\n    this._typeCheckConfig(config)\n    return config\n  }\n\n  _configAfterMerge(config) {\n    return config\n  }\n\n  _mergeConfigObj(config, element) {\n    const jsonConfig = isElement(element) ? Manipulator.getDataAttribute(element, 'config') : {} // try to parse\n\n    return {\n      ...this.constructor.Default,\n      ...(typeof jsonConfig === 'object' ? jsonConfig : {}),\n      ...(isElement(element) ? Manipulator.getDataAttributes(element) : {}),\n      ...(typeof config === 'object' ? config : {})\n    }\n  }\n\n  _typeCheckConfig(config, configTypes = this.constructor.DefaultType) {\n    for (const [property, expectedTypes] of Object.entries(configTypes)) {\n      const value = config[property]\n      const valueType = isElement(value) ? 'element' : toType(value)\n\n      if (!new RegExp(expectedTypes).test(valueType)) {\n        throw new TypeError(\n          `${this.constructor.NAME.toUpperCase()}: Option \"${property}\" provided type \"${valueType}\" but expected type \"${expectedTypes}\".`\n        )\n      }\n    }\n  }\n}\n\nexport default Config\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap base-component.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport Data from './dom/data.js'\nimport EventHandler from './dom/event-handler.js'\nimport Config from './util/config.js'\nimport { executeAfterTransition, getElement } from './util/index.js'\n\n/**\n * Constants\n */\n\nconst VERSION = '5.3.2'\n\n/**\n * Class definition\n */\n\nclass BaseComponent extends Config {\n  constructor(element, config) {\n    super()\n\n    element = getElement(element)\n    if (!element) {\n      return\n    }\n\n    this._element = element\n    this._config = this._getConfig(config)\n\n    Data.set(this._element, this.constructor.DATA_KEY, this)\n  }\n\n  // Public\n  dispose() {\n    Data.remove(this._element, this.constructor.DATA_KEY)\n    EventHandler.off(this._element, this.constructor.EVENT_KEY)\n\n    for (const propertyName of Object.getOwnPropertyNames(this)) {\n      this[propertyName] = null\n    }\n  }\n\n  _queueCallback(callback, element, isAnimated = true) {\n    executeAfterTransition(callback, element, isAnimated)\n  }\n\n  _getConfig(config) {\n    config = this._mergeConfigObj(config, this._element)\n    config = this._configAfterMerge(config)\n    this._typeCheckConfig(config)\n    return config\n  }\n\n  // Static\n  static getInstance(element) {\n    return Data.get(getElement(element), this.DATA_KEY)\n  }\n\n  static getOrCreateInstance(element, config = {}) {\n    return this.getInstance(element) || new this(element, typeof config === 'object' ? config : null)\n  }\n\n  static get VERSION() {\n    return VERSION\n  }\n\n  static get DATA_KEY() {\n    return `bs.${this.NAME}`\n  }\n\n  static get EVENT_KEY() {\n    return `.${this.DATA_KEY}`\n  }\n\n  static eventName(name) {\n    return `${name}${this.EVENT_KEY}`\n  }\n}\n\nexport default BaseComponent\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap dom/selector-engine.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport { isDisabled, isVisible, parseSelector } from '../util/index.js'\n\nconst getSelector = element => {\n  let selector = element.getAttribute('data-bs-target')\n\n  if (!selector || selector === '#') {\n    let hrefAttribute = element.getAttribute('href')\n\n    // The only valid content that could double as a selector are IDs or classes,\n    // so everything starting with `#` or `.`. If a \"real\" URL is used as the selector,\n    // `document.querySelector` will rightfully complain it is invalid.\n    // See https://github.com/twbs/bootstrap/issues/32273\n    if (!hrefAttribute || (!hrefAttribute.includes('#') && !hrefAttribute.startsWith('.'))) {\n      return null\n    }\n\n    // Just in case some CMS puts out a full URL with the anchor appended\n    if (hrefAttribute.includes('#') && !hrefAttribute.startsWith('#')) {\n      hrefAttribute = `#${hrefAttribute.split('#')[1]}`\n    }\n\n    selector = hrefAttribute && hrefAttribute !== '#' ? parseSelector(hrefAttribute.trim()) : null\n  }\n\n  return selector\n}\n\nconst SelectorEngine = {\n  find(selector, element = document.documentElement) {\n    return [].concat(...Element.prototype.querySelectorAll.call(element, selector))\n  },\n\n  findOne(selector, element = document.documentElement) {\n    return Element.prototype.querySelector.call(element, selector)\n  },\n\n  children(element, selector) {\n    return [].concat(...element.children).filter(child => child.matches(selector))\n  },\n\n  parents(element, selector) {\n    const parents = []\n    let ancestor = element.parentNode.closest(selector)\n\n    while (ancestor) {\n      parents.push(ancestor)\n      ancestor = ancestor.parentNode.closest(selector)\n    }\n\n    return parents\n  },\n\n  prev(element, selector) {\n    let previous = element.previousElementSibling\n\n    while (previous) {\n      if (previous.matches(selector)) {\n        return [previous]\n      }\n\n      previous = previous.previousElementSibling\n    }\n\n    return []\n  },\n  // TODO: this is now unused; remove later along with prev()\n  next(element, selector) {\n    let next = element.nextElementSibling\n\n    while (next) {\n      if (next.matches(selector)) {\n        return [next]\n      }\n\n      next = next.nextElementSibling\n    }\n\n    return []\n  },\n\n  focusableChildren(element) {\n    const focusables = [\n      'a',\n      'button',\n      'input',\n      'textarea',\n      'select',\n      'details',\n      '[tabindex]',\n      '[contenteditable=\"true\"]'\n    ].map(selector => `${selector}:not([tabindex^=\"-\"])`).join(',')\n\n    return this.find(focusables, element).filter(el => !isDisabled(el) && isVisible(el))\n  },\n\n  getSelectorFromElement(element) {\n    const selector = getSelector(element)\n\n    if (selector) {\n      return SelectorEngine.findOne(selector) ? selector : null\n    }\n\n    return null\n  },\n\n  getElementFromSelector(element) {\n    const selector = getSelector(element)\n\n    return selector ? SelectorEngine.findOne(selector) : null\n  },\n\n  getMultipleElementsFromSelector(element) {\n    const selector = getSelector(element)\n\n    return selector ? SelectorEngine.find(selector) : []\n  }\n}\n\nexport default SelectorEngine\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap util/component-functions.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport EventHandler from '../dom/event-handler.js'\nimport SelectorEngine from '../dom/selector-engine.js'\nimport { isDisabled } from './index.js'\n\nconst enableDismissTrigger = (component, method = 'hide') => {\n  const clickEvent = `click.dismiss${component.EVENT_KEY}`\n  const name = component.NAME\n\n  EventHandler.on(document, clickEvent, `[data-bs-dismiss=\"${name}\"]`, function (event) {\n    if (['A', 'AREA'].includes(this.tagName)) {\n      event.preventDefault()\n    }\n\n    if (isDisabled(this)) {\n      return\n    }\n\n    const target = SelectorEngine.getElementFromSelector(this) || this.closest(`.${name}`)\n    const instance = component.getOrCreateInstance(target)\n\n    // Method argument is left, for Alert and only, as it doesn't implement the 'hide' method\n    instance[method]()\n  })\n}\n\nexport {\n  enableDismissTrigger\n}\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap alert.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport BaseComponent from './base-component.js'\nimport EventHandler from './dom/event-handler.js'\nimport { enableDismissTrigger } from './util/component-functions.js'\nimport { defineJQueryPlugin } from './util/index.js'\n\n/**\n * Constants\n */\n\nconst NAME = 'alert'\nconst DATA_KEY = 'bs.alert'\nconst EVENT_KEY = `.${DATA_KEY}`\n\nconst EVENT_CLOSE = `close${EVENT_KEY}`\nconst EVENT_CLOSED = `closed${EVENT_KEY}`\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_SHOW = 'show'\n\n/**\n * Class definition\n */\n\nclass Alert extends BaseComponent {\n  // Getters\n  static get NAME() {\n    return NAME\n  }\n\n  // Public\n  close() {\n    const closeEvent = EventHandler.trigger(this._element, EVENT_CLOSE)\n\n    if (closeEvent.defaultPrevented) {\n      return\n    }\n\n    this._element.classList.remove(CLASS_NAME_SHOW)\n\n    const isAnimated = this._element.classList.contains(CLASS_NAME_FADE)\n    this._queueCallback(() => this._destroyElement(), this._element, isAnimated)\n  }\n\n  // Private\n  _destroyElement() {\n    this._element.remove()\n    EventHandler.trigger(this._element, EVENT_CLOSED)\n    this.dispose()\n  }\n\n  // Static\n  static jQueryInterface(config) {\n    return this.each(function () {\n      const data = Alert.getOrCreateInstance(this)\n\n      if (typeof config !== 'string') {\n        return\n      }\n\n      if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {\n        throw new TypeError(`No method named \"${config}\"`)\n      }\n\n      data[config](this)\n    })\n  }\n}\n\n/**\n * Data API implementation\n */\n\nenableDismissTrigger(Alert, 'close')\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Alert)\n\nexport default Alert\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap button.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport BaseComponent from './base-component.js'\nimport EventHandler from './dom/event-handler.js'\nimport { defineJQueryPlugin } from './util/index.js'\n\n/**\n * Constants\n */\n\nconst NAME = 'button'\nconst DATA_KEY = 'bs.button'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst CLASS_NAME_ACTIVE = 'active'\nconst SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"button\"]'\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\n/**\n * Class definition\n */\n\nclass Button extends BaseComponent {\n  // Getters\n  static get NAME() {\n    return NAME\n  }\n\n  // Public\n  toggle() {\n    // Toggle class and sync the `aria-pressed` attribute with the return value of the `.toggle()` method\n    this._element.setAttribute('aria-pressed', this._element.classList.toggle(CLASS_NAME_ACTIVE))\n  }\n\n  // Static\n  static jQueryInterface(config) {\n    return this.each(function () {\n      const data = Button.getOrCreateInstance(this)\n\n      if (config === 'toggle') {\n        data[config]()\n      }\n    })\n  }\n}\n\n/**\n * Data API implementation\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, event => {\n  event.preventDefault()\n\n  const button = event.target.closest(SELECTOR_DATA_TOGGLE)\n  const data = Button.getOrCreateInstance(button)\n\n  data.toggle()\n})\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Button)\n\nexport default Button\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap util/swipe.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport EventHandler from '../dom/event-handler.js'\nimport Config from './config.js'\nimport { execute } from './index.js'\n\n/**\n * Constants\n */\n\nconst NAME = 'swipe'\nconst EVENT_KEY = '.bs.swipe'\nconst EVENT_TOUCHSTART = `touchstart${EVENT_KEY}`\nconst EVENT_TOUCHMOVE = `touchmove${EVENT_KEY}`\nconst EVENT_TOUCHEND = `touchend${EVENT_KEY}`\nconst EVENT_POINTERDOWN = `pointerdown${EVENT_KEY}`\nconst EVENT_POINTERUP = `pointerup${EVENT_KEY}`\nconst POINTER_TYPE_TOUCH = 'touch'\nconst POINTER_TYPE_PEN = 'pen'\nconst CLASS_NAME_POINTER_EVENT = 'pointer-event'\nconst SWIPE_THRESHOLD = 40\n\nconst Default = {\n  endCallback: null,\n  leftCallback: null,\n  rightCallback: null\n}\n\nconst DefaultType = {\n  endCallback: '(function|null)',\n  leftCallback: '(function|null)',\n  rightCallback: '(function|null)'\n}\n\n/**\n * Class definition\n */\n\nclass Swipe extends Config {\n  constructor(element, config) {\n    super()\n    this._element = element\n\n    if (!element || !Swipe.isSupported()) {\n      return\n    }\n\n    this._config = this._getConfig(config)\n    this._deltaX = 0\n    this._supportPointerEvents = Boolean(window.PointerEvent)\n    this._initEvents()\n  }\n\n  // Getters\n  static get Default() {\n    return Default\n  }\n\n  static get DefaultType() {\n    return DefaultType\n  }\n\n  static get NAME() {\n    return NAME\n  }\n\n  // Public\n  dispose() {\n    EventHandler.off(this._element, EVENT_KEY)\n  }\n\n  // Private\n  _start(event) {\n    if (!this._supportPointerEvents) {\n      this._deltaX = event.touches[0].clientX\n\n      return\n    }\n\n    if (this._eventIsPointerPenTouch(event)) {\n      this._deltaX = event.clientX\n    }\n  }\n\n  _end(event) {\n    if (this._eventIsPointerPenTouch(event)) {\n      this._deltaX = event.clientX - this._deltaX\n    }\n\n    this._handleSwipe()\n    execute(this._config.endCallback)\n  }\n\n  _move(event) {\n    this._deltaX = event.touches && event.touches.length > 1 ?\n      0 :\n      event.touches[0].clientX - this._deltaX\n  }\n\n  _handleSwipe() {\n    const absDeltaX = Math.abs(this._deltaX)\n\n    if (absDeltaX <= SWIPE_THRESHOLD) {\n      return\n    }\n\n    const direction = absDeltaX / this._deltaX\n\n    this._deltaX = 0\n\n    if (!direction) {\n      return\n    }\n\n    execute(direction > 0 ? this._config.rightCallback : this._config.leftCallback)\n  }\n\n  _initEvents() {\n    if (this._supportPointerEvents) {\n      EventHandler.on(this._element, EVENT_POINTERDOWN, event => this._start(event))\n      EventHandler.on(this._element, EVENT_POINTERUP, event => this._end(event))\n\n      this._element.classList.add(CLASS_NAME_POINTER_EVENT)\n    } else {\n      EventHandler.on(this._element, EVENT_TOUCHSTART, event => this._start(event))\n      EventHandler.on(this._element, EVENT_TOUCHMOVE, event => this._move(event))\n      EventHandler.on(this._element, EVENT_TOUCHEND, event => this._end(event))\n    }\n  }\n\n  _eventIsPointerPenTouch(event) {\n    return this._supportPointerEvents && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH)\n  }\n\n  // Static\n  static isSupported() {\n    return 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0\n  }\n}\n\nexport default Swipe\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap carousel.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport BaseComponent from './base-component.js'\nimport EventHandler from './dom/event-handler.js'\nimport Manipulator from './dom/manipulator.js'\nimport SelectorEngine from './dom/selector-engine.js'\nimport {\n  defineJQueryPlugin,\n  getNextActiveElement,\n  isRTL,\n  isVisible,\n  reflow,\n  triggerTransitionEnd\n} from './util/index.js'\nimport Swipe from './util/swipe.js'\n\n/**\n * Constants\n */\n\nconst NAME = 'carousel'\nconst DATA_KEY = 'bs.carousel'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst ARROW_LEFT_KEY = 'ArrowLeft'\nconst ARROW_RIGHT_KEY = 'ArrowRight'\nconst TOUCHEVENT_COMPAT_WAIT = 500 // Time for mouse compat events to fire after touch\n\nconst ORDER_NEXT = 'next'\nconst ORDER_PREV = 'prev'\nconst DIRECTION_LEFT = 'left'\nconst DIRECTION_RIGHT = 'right'\n\nconst EVENT_SLIDE = `slide${EVENT_KEY}`\nconst EVENT_SLID = `slid${EVENT_KEY}`\nconst EVENT_KEYDOWN = `keydown${EVENT_KEY}`\nconst EVENT_MOUSEENTER = `mouseenter${EVENT_KEY}`\nconst EVENT_MOUSELEAVE = `mouseleave${EVENT_KEY}`\nconst EVENT_DRAG_START = `dragstart${EVENT_KEY}`\nconst EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_CAROUSEL = 'carousel'\nconst CLASS_NAME_ACTIVE = 'active'\nconst CLASS_NAME_SLIDE = 'slide'\nconst CLASS_NAME_END = 'carousel-item-end'\nconst CLASS_NAME_START = 'carousel-item-start'\nconst CLASS_NAME_NEXT = 'carousel-item-next'\nconst CLASS_NAME_PREV = 'carousel-item-prev'\n\nconst SELECTOR_ACTIVE = '.active'\nconst SELECTOR_ITEM = '.carousel-item'\nconst SELECTOR_ACTIVE_ITEM = SELECTOR_ACTIVE + SELECTOR_ITEM\nconst SELECTOR_ITEM_IMG = '.carousel-item img'\nconst SELECTOR_INDICATORS = '.carousel-indicators'\nconst SELECTOR_DATA_SLIDE = '[data-bs-slide], [data-bs-slide-to]'\nconst SELECTOR_DATA_RIDE = '[data-bs-ride=\"carousel\"]'\n\nconst KEY_TO_DIRECTION = {\n  [ARROW_LEFT_KEY]: DIRECTION_RIGHT,\n  [ARROW_RIGHT_KEY]: DIRECTION_LEFT\n}\n\nconst Default = {\n  interval: 5000,\n  keyboard: true,\n  pause: 'hover',\n  ride: false,\n  touch: true,\n  wrap: true\n}\n\nconst DefaultType = {\n  interval: '(number|boolean)', // TODO:v6 remove boolean support\n  keyboard: 'boolean',\n  pause: '(string|boolean)',\n  ride: '(boolean|string)',\n  touch: 'boolean',\n  wrap: 'boolean'\n}\n\n/**\n * Class definition\n */\n\nclass Carousel extends BaseComponent {\n  constructor(element, config) {\n    super(element, config)\n\n    this._interval = null\n    this._activeElement = null\n    this._isSliding = false\n    this.touchTimeout = null\n    this._swipeHelper = null\n\n    this._indicatorsElement = SelectorEngine.findOne(SELECTOR_INDICATORS, this._element)\n    this._addEventListeners()\n\n    if (this._config.ride === CLASS_NAME_CAROUSEL) {\n      this.cycle()\n    }\n  }\n\n  // Getters\n  static get Default() {\n    return Default\n  }\n\n  static get DefaultType() {\n    return DefaultType\n  }\n\n  static get NAME() {\n    return NAME\n  }\n\n  // Public\n  next() {\n    this._slide(ORDER_NEXT)\n  }\n\n  nextWhenVisible() {\n    // FIXME TODO use `document.visibilityState`\n    // Don't call next when the page isn't visible\n    // or the carousel or its parent isn't visible\n    if (!document.hidden && isVisible(this._element)) {\n      this.next()\n    }\n  }\n\n  prev() {\n    this._slide(ORDER_PREV)\n  }\n\n  pause() {\n    if (this._isSliding) {\n      triggerTransitionEnd(this._element)\n    }\n\n    this._clearInterval()\n  }\n\n  cycle() {\n    this._clearInterval()\n    this._updateInterval()\n\n    this._interval = setInterval(() => this.nextWhenVisible(), this._config.interval)\n  }\n\n  _maybeEnableCycle() {\n    if (!this._config.ride) {\n      return\n    }\n\n    if (this._isSliding) {\n      EventHandler.one(this._element, EVENT_SLID, () => this.cycle())\n      return\n    }\n\n    this.cycle()\n  }\n\n  to(index) {\n    const items = this._getItems()\n    if (index > items.length - 1 || index < 0) {\n      return\n    }\n\n    if (this._isSliding) {\n      EventHandler.one(this._element, EVENT_SLID, () => this.to(index))\n      return\n    }\n\n    const activeIndex = this._getItemIndex(this._getActive())\n    if (activeIndex === index) {\n      return\n    }\n\n    const order = index > activeIndex ? ORDER_NEXT : ORDER_PREV\n\n    this._slide(order, items[index])\n  }\n\n  dispose() {\n    if (this._swipeHelper) {\n      this._swipeHelper.dispose()\n    }\n\n    super.dispose()\n  }\n\n  // Private\n  _configAfterMerge(config) {\n    config.defaultInterval = config.interval\n    return config\n  }\n\n  _addEventListeners() {\n    if (this._config.keyboard) {\n      EventHandler.on(this._element, EVENT_KEYDOWN, event => this._keydown(event))\n    }\n\n    if (this._config.pause === 'hover') {\n      EventHandler.on(this._element, EVENT_MOUSEENTER, () => this.pause())\n      EventHandler.on(this._element, EVENT_MOUSELEAVE, () => this._maybeEnableCycle())\n    }\n\n    if (this._config.touch && Swipe.isSupported()) {\n      this._addTouchEventListeners()\n    }\n  }\n\n  _addTouchEventListeners() {\n    for (const img of SelectorEngine.find(SELECTOR_ITEM_IMG, this._element)) {\n      EventHandler.on(img, EVENT_DRAG_START, event => event.preventDefault())\n    }\n\n    const endCallBack = () => {\n      if (this._config.pause !== 'hover') {\n        return\n      }\n\n      // If it's a touch-enabled device, mouseenter/leave are fired as\n      // part of the mouse compatibility events on first tap - the carousel\n      // would stop cycling until user tapped out of it;\n      // here, we listen for touchend, explicitly pause the carousel\n      // (as if it's the second time we tap on it, mouseenter compat event\n      // is NOT fired) and after a timeout (to allow for mouse compatibility\n      // events to fire) we explicitly restart cycling\n\n      this.pause()\n      if (this.touchTimeout) {\n        clearTimeout(this.touchTimeout)\n      }\n\n      this.touchTimeout = setTimeout(() => this._maybeEnableCycle(), TOUCHEVENT_COMPAT_WAIT + this._config.interval)\n    }\n\n    const swipeConfig = {\n      leftCallback: () => this._slide(this._directionToOrder(DIRECTION_LEFT)),\n      rightCallback: () => this._slide(this._directionToOrder(DIRECTION_RIGHT)),\n      endCallback: endCallBack\n    }\n\n    this._swipeHelper = new Swipe(this._element, swipeConfig)\n  }\n\n  _keydown(event) {\n    if (/input|textarea/i.test(event.target.tagName)) {\n      return\n    }\n\n    const direction = KEY_TO_DIRECTION[event.key]\n    if (direction) {\n      event.preventDefault()\n      this._slide(this._directionToOrder(direction))\n    }\n  }\n\n  _getItemIndex(element) {\n    return this._getItems().indexOf(element)\n  }\n\n  _setActiveIndicatorElement(index) {\n    if (!this._indicatorsElement) {\n      return\n    }\n\n    const activeIndicator = SelectorEngine.findOne(SELECTOR_ACTIVE, this._indicatorsElement)\n\n    activeIndicator.classList.remove(CLASS_NAME_ACTIVE)\n    activeIndicator.removeAttribute('aria-current')\n\n    const newActiveIndicator = SelectorEngine.findOne(`[data-bs-slide-to=\"${index}\"]`, this._indicatorsElement)\n\n    if (newActiveIndicator) {\n      newActiveIndicator.classList.add(CLASS_NAME_ACTIVE)\n      newActiveIndicator.setAttribute('aria-current', 'true')\n    }\n  }\n\n  _updateInterval() {\n    const element = this._activeElement || this._getActive()\n\n    if (!element) {\n      return\n    }\n\n    const elementInterval = Number.parseInt(element.getAttribute('data-bs-interval'), 10)\n\n    this._config.interval = elementInterval || this._config.defaultInterval\n  }\n\n  _slide(order, element = null) {\n    if (this._isSliding) {\n      return\n    }\n\n    const activeElement = this._getActive()\n    const isNext = order === ORDER_NEXT\n    const nextElement = element || getNextActiveElement(this._getItems(), activeElement, isNext, this._config.wrap)\n\n    if (nextElement === activeElement) {\n      return\n    }\n\n    const nextElementIndex = this._getItemIndex(nextElement)\n\n    const triggerEvent = eventName => {\n      return EventHandler.trigger(this._element, eventName, {\n        relatedTarget: nextElement,\n        direction: this._orderToDirection(order),\n        from: this._getItemIndex(activeElement),\n        to: nextElementIndex\n      })\n    }\n\n    const slideEvent = triggerEvent(EVENT_SLIDE)\n\n    if (slideEvent.defaultPrevented) {\n      return\n    }\n\n    if (!activeElement || !nextElement) {\n      // Some weirdness is happening, so we bail\n      // TODO: change tests that use empty divs to avoid this check\n      return\n    }\n\n    const isCycling = Boolean(this._interval)\n    this.pause()\n\n    this._isSliding = true\n\n    this._setActiveIndicatorElement(nextElementIndex)\n    this._activeElement = nextElement\n\n    const directionalClassName = isNext ? CLASS_NAME_START : CLASS_NAME_END\n    const orderClassName = isNext ? CLASS_NAME_NEXT : CLASS_NAME_PREV\n\n    nextElement.classList.add(orderClassName)\n\n    reflow(nextElement)\n\n    activeElement.classList.add(directionalClassName)\n    nextElement.classList.add(directionalClassName)\n\n    const completeCallBack = () => {\n      nextElement.classList.remove(directionalClassName, orderClassName)\n      nextElement.classList.add(CLASS_NAME_ACTIVE)\n\n      activeElement.classList.remove(CLASS_NAME_ACTIVE, orderClassName, directionalClassName)\n\n      this._isSliding = false\n\n      triggerEvent(EVENT_SLID)\n    }\n\n    this._queueCallback(completeCallBack, activeElement, this._isAnimated())\n\n    if (isCycling) {\n      this.cycle()\n    }\n  }\n\n  _isAnimated() {\n    return this._element.classList.contains(CLASS_NAME_SLIDE)\n  }\n\n  _getActive() {\n    return SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element)\n  }\n\n  _getItems() {\n    return SelectorEngine.find(SELECTOR_ITEM, this._element)\n  }\n\n  _clearInterval() {\n    if (this._interval) {\n      clearInterval(this._interval)\n      this._interval = null\n    }\n  }\n\n  _directionToOrder(direction) {\n    if (isRTL()) {\n      return direction === DIRECTION_LEFT ? ORDER_PREV : ORDER_NEXT\n    }\n\n    return direction === DIRECTION_LEFT ? ORDER_NEXT : ORDER_PREV\n  }\n\n  _orderToDirection(order) {\n    if (isRTL()) {\n      return order === ORDER_PREV ? DIRECTION_LEFT : DIRECTION_RIGHT\n    }\n\n    return order === ORDER_PREV ? DIRECTION_RIGHT : DIRECTION_LEFT\n  }\n\n  // Static\n  static jQueryInterface(config) {\n    return this.each(function () {\n      const data = Carousel.getOrCreateInstance(this, config)\n\n      if (typeof config === 'number') {\n        data.to(config)\n        return\n      }\n\n      if (typeof config === 'string') {\n        if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {\n          throw new TypeError(`No method named \"${config}\"`)\n        }\n\n        data[config]()\n      }\n    })\n  }\n}\n\n/**\n * Data API implementation\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_SLIDE, function (event) {\n  const target = SelectorEngine.getElementFromSelector(this)\n\n  if (!target || !target.classList.contains(CLASS_NAME_CAROUSEL)) {\n    return\n  }\n\n  event.preventDefault()\n\n  const carousel = Carousel.getOrCreateInstance(target)\n  const slideIndex = this.getAttribute('data-bs-slide-to')\n\n  if (slideIndex) {\n    carousel.to(slideIndex)\n    carousel._maybeEnableCycle()\n    return\n  }\n\n  if (Manipulator.getDataAttribute(this, 'slide') === 'next') {\n    carousel.next()\n    carousel._maybeEnableCycle()\n    return\n  }\n\n  carousel.prev()\n  carousel._maybeEnableCycle()\n})\n\nEventHandler.on(window, EVENT_LOAD_DATA_API, () => {\n  const carousels = SelectorEngine.find(SELECTOR_DATA_RIDE)\n\n  for (const carousel of carousels) {\n    Carousel.getOrCreateInstance(carousel)\n  }\n})\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Carousel)\n\nexport default Carousel\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap collapse.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport BaseComponent from './base-component.js'\nimport EventHandler from './dom/event-handler.js'\nimport SelectorEngine from './dom/selector-engine.js'\nimport {\n  defineJQueryPlugin,\n  getElement,\n  reflow\n} from './util/index.js'\n\n/**\n * Constants\n */\n\nconst NAME = 'collapse'\nconst DATA_KEY = 'bs.collapse'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst EVENT_SHOW = `show${EVENT_KEY}`\nconst EVENT_SHOWN = `shown${EVENT_KEY}`\nconst EVENT_HIDE = `hide${EVENT_KEY}`\nconst EVENT_HIDDEN = `hidden${EVENT_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_SHOW = 'show'\nconst CLASS_NAME_COLLAPSE = 'collapse'\nconst CLASS_NAME_COLLAPSING = 'collapsing'\nconst CLASS_NAME_COLLAPSED = 'collapsed'\nconst CLASS_NAME_DEEPER_CHILDREN = `:scope .${CLASS_NAME_COLLAPSE} .${CLASS_NAME_COLLAPSE}`\nconst CLASS_NAME_HORIZONTAL = 'collapse-horizontal'\n\nconst WIDTH = 'width'\nconst HEIGHT = 'height'\n\nconst SELECTOR_ACTIVES = '.collapse.show, .collapse.collapsing'\nconst SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"collapse\"]'\n\nconst Default = {\n  parent: null,\n  toggle: true\n}\n\nconst DefaultType = {\n  parent: '(null|element)',\n  toggle: 'boolean'\n}\n\n/**\n * Class definition\n */\n\nclass Collapse extends BaseComponent {\n  constructor(element, config) {\n    super(element, config)\n\n    this._isTransitioning = false\n    this._triggerArray = []\n\n    const toggleList = SelectorEngine.find(SELECTOR_DATA_TOGGLE)\n\n    for (const elem of toggleList) {\n      const selector = SelectorEngine.getSelectorFromElement(elem)\n      const filterElement = SelectorEngine.find(selector)\n        .filter(foundElement => foundElement === this._element)\n\n      if (selector !== null && filterElement.length) {\n        this._triggerArray.push(elem)\n      }\n    }\n\n    this._initializeChildren()\n\n    if (!this._config.parent) {\n      this._addAriaAndCollapsedClass(this._triggerArray, this._isShown())\n    }\n\n    if (this._config.toggle) {\n      this.toggle()\n    }\n  }\n\n  // Getters\n  static get Default() {\n    return Default\n  }\n\n  static get DefaultType() {\n    return DefaultType\n  }\n\n  static get NAME() {\n    return NAME\n  }\n\n  // Public\n  toggle() {\n    if (this._isShown()) {\n      this.hide()\n    } else {\n      this.show()\n    }\n  }\n\n  show() {\n    if (this._isTransitioning || this._isShown()) {\n      return\n    }\n\n    let activeChildren = []\n\n    // find active children\n    if (this._config.parent) {\n      activeChildren = this._getFirstLevelChildren(SELECTOR_ACTIVES)\n        .filter(element => element !== this._element)\n        .map(element => Collapse.getOrCreateInstance(element, { toggle: false }))\n    }\n\n    if (activeChildren.length && activeChildren[0]._isTransitioning) {\n      return\n    }\n\n    const startEvent = EventHandler.trigger(this._element, EVENT_SHOW)\n    if (startEvent.defaultPrevented) {\n      return\n    }\n\n    for (const activeInstance of activeChildren) {\n      activeInstance.hide()\n    }\n\n    const dimension = this._getDimension()\n\n    this._element.classList.remove(CLASS_NAME_COLLAPSE)\n    this._element.classList.add(CLASS_NAME_COLLAPSING)\n\n    this._element.style[dimension] = 0\n\n    this._addAriaAndCollapsedClass(this._triggerArray, true)\n    this._isTransitioning = true\n\n    const complete = () => {\n      this._isTransitioning = false\n\n      this._element.classList.remove(CLASS_NAME_COLLAPSING)\n      this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW)\n\n      this._element.style[dimension] = ''\n\n      EventHandler.trigger(this._element, EVENT_SHOWN)\n    }\n\n    const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1)\n    const scrollSize = `scroll${capitalizedDimension}`\n\n    this._queueCallback(complete, this._element, true)\n    this._element.style[dimension] = `${this._element[scrollSize]}px`\n  }\n\n  hide() {\n    if (this._isTransitioning || !this._isShown()) {\n      return\n    }\n\n    const startEvent = EventHandler.trigger(this._element, EVENT_HIDE)\n    if (startEvent.defaultPrevented) {\n      return\n    }\n\n    const dimension = this._getDimension()\n\n    this._element.style[dimension] = `${this._element.getBoundingClientRect()[dimension]}px`\n\n    reflow(this._element)\n\n    this._element.classList.add(CLASS_NAME_COLLAPSING)\n    this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW)\n\n    for (const trigger of this._triggerArray) {\n      const element = SelectorEngine.getElementFromSelector(trigger)\n\n      if (element && !this._isShown(element)) {\n        this._addAriaAndCollapsedClass([trigger], false)\n      }\n    }\n\n    this._isTransitioning = true\n\n    const complete = () => {\n      this._isTransitioning = false\n      this._element.classList.remove(CLASS_NAME_COLLAPSING)\n      this._element.classList.add(CLASS_NAME_COLLAPSE)\n      EventHandler.trigger(this._element, EVENT_HIDDEN)\n    }\n\n    this._element.style[dimension] = ''\n\n    this._queueCallback(complete, this._element, true)\n  }\n\n  _isShown(element = this._element) {\n    return element.classList.contains(CLASS_NAME_SHOW)\n  }\n\n  // Private\n  _configAfterMerge(config) {\n    config.toggle = Boolean(config.toggle) // Coerce string values\n    config.parent = getElement(config.parent)\n    return config\n  }\n\n  _getDimension() {\n    return this._element.classList.contains(CLASS_NAME_HORIZONTAL) ? WIDTH : HEIGHT\n  }\n\n  _initializeChildren() {\n    if (!this._config.parent) {\n      return\n    }\n\n    const children = this._getFirstLevelChildren(SELECTOR_DATA_TOGGLE)\n\n    for (const element of children) {\n      const selected = SelectorEngine.getElementFromSelector(element)\n\n      if (selected) {\n        this._addAriaAndCollapsedClass([element], this._isShown(selected))\n      }\n    }\n  }\n\n  _getFirstLevelChildren(selector) {\n    const children = SelectorEngine.find(CLASS_NAME_DEEPER_CHILDREN, this._config.parent)\n    // remove children if greater depth\n    return SelectorEngine.find(selector, this._config.parent).filter(element => !children.includes(element))\n  }\n\n  _addAriaAndCollapsedClass(triggerArray, isOpen) {\n    if (!triggerArray.length) {\n      return\n    }\n\n    for (const element of triggerArray) {\n      element.classList.toggle(CLASS_NAME_COLLAPSED, !isOpen)\n      element.setAttribute('aria-expanded', isOpen)\n    }\n  }\n\n  // Static\n  static jQueryInterface(config) {\n    const _config = {}\n    if (typeof config === 'string' && /show|hide/.test(config)) {\n      _config.toggle = false\n    }\n\n    return this.each(function () {\n      const data = Collapse.getOrCreateInstance(this, _config)\n\n      if (typeof config === 'string') {\n        if (typeof data[config] === 'undefined') {\n          throw new TypeError(`No method named \"${config}\"`)\n        }\n\n        data[config]()\n      }\n    })\n  }\n}\n\n/**\n * Data API implementation\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {\n  // preventDefault only for <a> elements (which change the URL) not inside the collapsible element\n  if (event.target.tagName === 'A' || (event.delegateTarget && event.delegateTarget.tagName === 'A')) {\n    event.preventDefault()\n  }\n\n  for (const element of SelectorEngine.getMultipleElementsFromSelector(this)) {\n    Collapse.getOrCreateInstance(element, { toggle: false }).toggle()\n  }\n})\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Collapse)\n\nexport default Collapse\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap dropdown.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport * as Popper from '@popperjs/core'\nimport BaseComponent from './base-component.js'\nimport EventHandler from './dom/event-handler.js'\nimport Manipulator from './dom/manipulator.js'\nimport SelectorEngine from './dom/selector-engine.js'\nimport {\n  defineJQueryPlugin,\n  execute,\n  getElement,\n  getNextActiveElement,\n  isDisabled,\n  isElement,\n  isRTL,\n  isVisible,\n  noop\n} from './util/index.js'\n\n/**\n * Constants\n */\n\nconst NAME = 'dropdown'\nconst DATA_KEY = 'bs.dropdown'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst ESCAPE_KEY = 'Escape'\nconst TAB_KEY = 'Tab'\nconst ARROW_UP_KEY = 'ArrowUp'\nconst ARROW_DOWN_KEY = 'ArrowDown'\nconst RIGHT_MOUSE_BUTTON = 2 // MouseEvent.button value for the secondary button, usually the right button\n\nconst EVENT_HIDE = `hide${EVENT_KEY}`\nconst EVENT_HIDDEN = `hidden${EVENT_KEY}`\nconst EVENT_SHOW = `show${EVENT_KEY}`\nconst EVENT_SHOWN = `shown${EVENT_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\nconst EVENT_KEYDOWN_DATA_API = `keydown${EVENT_KEY}${DATA_API_KEY}`\nconst EVENT_KEYUP_DATA_API = `keyup${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_SHOW = 'show'\nconst CLASS_NAME_DROPUP = 'dropup'\nconst CLASS_NAME_DROPEND = 'dropend'\nconst CLASS_NAME_DROPSTART = 'dropstart'\nconst CLASS_NAME_DROPUP_CENTER = 'dropup-center'\nconst CLASS_NAME_DROPDOWN_CENTER = 'dropdown-center'\n\nconst SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"dropdown\"]:not(.disabled):not(:disabled)'\nconst SELECTOR_DATA_TOGGLE_SHOWN = `${SELECTOR_DATA_TOGGLE}.${CLASS_NAME_SHOW}`\nconst SELECTOR_MENU = '.dropdown-menu'\nconst SELECTOR_NAVBAR = '.navbar'\nconst SELECTOR_NAVBAR_NAV = '.navbar-nav'\nconst SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)'\n\nconst PLACEMENT_TOP = isRTL() ? 'top-end' : 'top-start'\nconst PLACEMENT_TOPEND = isRTL() ? 'top-start' : 'top-end'\nconst PLACEMENT_BOTTOM = isRTL() ? 'bottom-end' : 'bottom-start'\nconst PLACEMENT_BOTTOMEND = isRTL() ? 'bottom-start' : 'bottom-end'\nconst PLACEMENT_RIGHT = isRTL() ? 'left-start' : 'right-start'\nconst PLACEMENT_LEFT = isRTL() ? 'right-start' : 'left-start'\nconst PLACEMENT_TOPCENTER = 'top'\nconst PLACEMENT_BOTTOMCENTER = 'bottom'\n\nconst Default = {\n  autoClose: true,\n  boundary: 'clippingParents',\n  display: 'dynamic',\n  offset: [0, 2],\n  popperConfig: null,\n  reference: 'toggle'\n}\n\nconst DefaultType = {\n  autoClose: '(boolean|string)',\n  boundary: '(string|element)',\n  display: 'string',\n  offset: '(array|string|function)',\n  popperConfig: '(null|object|function)',\n  reference: '(string|element|object)'\n}\n\n/**\n * Class definition\n */\n\nclass Dropdown extends BaseComponent {\n  constructor(element, config) {\n    super(element, config)\n\n    this._popper = null\n    this._parent = this._element.parentNode // dropdown wrapper\n    // TODO: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.3/forms/input-group/\n    this._menu = SelectorEngine.next(this._element, SELECTOR_MENU)[0] ||\n      SelectorEngine.prev(this._element, SELECTOR_MENU)[0] ||\n      SelectorEngine.findOne(SELECTOR_MENU, this._parent)\n    this._inNavbar = this._detectNavbar()\n  }\n\n  // Getters\n  static get Default() {\n    return Default\n  }\n\n  static get DefaultType() {\n    return DefaultType\n  }\n\n  static get NAME() {\n    return NAME\n  }\n\n  // Public\n  toggle() {\n    return this._isShown() ? this.hide() : this.show()\n  }\n\n  show() {\n    if (isDisabled(this._element) || this._isShown()) {\n      return\n    }\n\n    const relatedTarget = {\n      relatedTarget: this._element\n    }\n\n    const showEvent = EventHandler.trigger(this._element, EVENT_SHOW, relatedTarget)\n\n    if (showEvent.defaultPrevented) {\n      return\n    }\n\n    this._createPopper()\n\n    // If this is a touch-enabled device we add extra\n    // empty mouseover listeners to the body's immediate children;\n    // only needed because of broken event delegation on iOS\n    // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html\n    if ('ontouchstart' in document.documentElement && !this._parent.closest(SELECTOR_NAVBAR_NAV)) {\n      for (const element of [].concat(...document.body.children)) {\n        EventHandler.on(element, 'mouseover', noop)\n      }\n    }\n\n    this._element.focus()\n    this._element.setAttribute('aria-expanded', true)\n\n    this._menu.classList.add(CLASS_NAME_SHOW)\n    this._element.classList.add(CLASS_NAME_SHOW)\n    EventHandler.trigger(this._element, EVENT_SHOWN, relatedTarget)\n  }\n\n  hide() {\n    if (isDisabled(this._element) || !this._isShown()) {\n      return\n    }\n\n    const relatedTarget = {\n      relatedTarget: this._element\n    }\n\n    this._completeHide(relatedTarget)\n  }\n\n  dispose() {\n    if (this._popper) {\n      this._popper.destroy()\n    }\n\n    super.dispose()\n  }\n\n  update() {\n    this._inNavbar = this._detectNavbar()\n    if (this._popper) {\n      this._popper.update()\n    }\n  }\n\n  // Private\n  _completeHide(relatedTarget) {\n    const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE, relatedTarget)\n    if (hideEvent.defaultPrevented) {\n      return\n    }\n\n    // If this is a touch-enabled device we remove the extra\n    // empty mouseover listeners we added for iOS support\n    if ('ontouchstart' in document.documentElement) {\n      for (const element of [].concat(...document.body.children)) {\n        EventHandler.off(element, 'mouseover', noop)\n      }\n    }\n\n    if (this._popper) {\n      this._popper.destroy()\n    }\n\n    this._menu.classList.remove(CLASS_NAME_SHOW)\n    this._element.classList.remove(CLASS_NAME_SHOW)\n    this._element.setAttribute('aria-expanded', 'false')\n    Manipulator.removeDataAttribute(this._menu, 'popper')\n    EventHandler.trigger(this._element, EVENT_HIDDEN, relatedTarget)\n  }\n\n  _getConfig(config) {\n    config = super._getConfig(config)\n\n    if (typeof config.reference === 'object' && !isElement(config.reference) &&\n      typeof config.reference.getBoundingClientRect !== 'function'\n    ) {\n      // Popper virtual elements require a getBoundingClientRect method\n      throw new TypeError(`${NAME.toUpperCase()}: Option \"reference\" provided type \"object\" without a required \"getBoundingClientRect\" method.`)\n    }\n\n    return config\n  }\n\n  _createPopper() {\n    if (typeof Popper === 'undefined') {\n      throw new TypeError('Bootstrap\\'s dropdowns require Popper (https://popper.js.org)')\n    }\n\n    let referenceElement = this._element\n\n    if (this._config.reference === 'parent') {\n      referenceElement = this._parent\n    } else if (isElement(this._config.reference)) {\n      referenceElement = getElement(this._config.reference)\n    } else if (typeof this._config.reference === 'object') {\n      referenceElement = this._config.reference\n    }\n\n    const popperConfig = this._getPopperConfig()\n    this._popper = Popper.createPopper(referenceElement, this._menu, popperConfig)\n  }\n\n  _isShown() {\n    return this._menu.classList.contains(CLASS_NAME_SHOW)\n  }\n\n  _getPlacement() {\n    const parentDropdown = this._parent\n\n    if (parentDropdown.classList.contains(CLASS_NAME_DROPEND)) {\n      return PLACEMENT_RIGHT\n    }\n\n    if (parentDropdown.classList.contains(CLASS_NAME_DROPSTART)) {\n      return PLACEMENT_LEFT\n    }\n\n    if (parentDropdown.classList.contains(CLASS_NAME_DROPUP_CENTER)) {\n      return PLACEMENT_TOPCENTER\n    }\n\n    if (parentDropdown.classList.contains(CLASS_NAME_DROPDOWN_CENTER)) {\n      return PLACEMENT_BOTTOMCENTER\n    }\n\n    // We need to trim the value because custom properties can also include spaces\n    const isEnd = getComputedStyle(this._menu).getPropertyValue('--bs-position').trim() === 'end'\n\n    if (parentDropdown.classList.contains(CLASS_NAME_DROPUP)) {\n      return isEnd ? PLACEMENT_TOPEND : PLACEMENT_TOP\n    }\n\n    return isEnd ? PLACEMENT_BOTTOMEND : PLACEMENT_BOTTOM\n  }\n\n  _detectNavbar() {\n    return this._element.closest(SELECTOR_NAVBAR) !== null\n  }\n\n  _getOffset() {\n    const { offset } = this._config\n\n    if (typeof offset === 'string') {\n      return offset.split(',').map(value => Number.parseInt(value, 10))\n    }\n\n    if (typeof offset === 'function') {\n      return popperData => offset(popperData, this._element)\n    }\n\n    return offset\n  }\n\n  _getPopperConfig() {\n    const defaultBsPopperConfig = {\n      placement: this._getPlacement(),\n      modifiers: [{\n        name: 'preventOverflow',\n        options: {\n          boundary: this._config.boundary\n        }\n      },\n      {\n        name: 'offset',\n        options: {\n          offset: this._getOffset()\n        }\n      }]\n    }\n\n    // Disable Popper if we have a static display or Dropdown is in Navbar\n    if (this._inNavbar || this._config.display === 'static') {\n      Manipulator.setDataAttribute(this._menu, 'popper', 'static') // TODO: v6 remove\n      defaultBsPopperConfig.modifiers = [{\n        name: 'applyStyles',\n        enabled: false\n      }]\n    }\n\n    return {\n      ...defaultBsPopperConfig,\n      ...execute(this._config.popperConfig, [defaultBsPopperConfig])\n    }\n  }\n\n  _selectMenuItem({ key, target }) {\n    const items = SelectorEngine.find(SELECTOR_VISIBLE_ITEMS, this._menu).filter(element => isVisible(element))\n\n    if (!items.length) {\n      return\n    }\n\n    // if target isn't included in items (e.g. when expanding the dropdown)\n    // allow cycling to get the last item in case key equals ARROW_UP_KEY\n    getNextActiveElement(items, target, key === ARROW_DOWN_KEY, !items.includes(target)).focus()\n  }\n\n  // Static\n  static jQueryInterface(config) {\n    return this.each(function () {\n      const data = Dropdown.getOrCreateInstance(this, config)\n\n      if (typeof config !== 'string') {\n        return\n      }\n\n      if (typeof data[config] === 'undefined') {\n        throw new TypeError(`No method named \"${config}\"`)\n      }\n\n      data[config]()\n    })\n  }\n\n  static clearMenus(event) {\n    if (event.button === RIGHT_MOUSE_BUTTON || (event.type === 'keyup' && event.key !== TAB_KEY)) {\n      return\n    }\n\n    const openToggles = SelectorEngine.find(SELECTOR_DATA_TOGGLE_SHOWN)\n\n    for (const toggle of openToggles) {\n      const context = Dropdown.getInstance(toggle)\n      if (!context || context._config.autoClose === false) {\n        continue\n      }\n\n      const composedPath = event.composedPath()\n      const isMenuTarget = composedPath.includes(context._menu)\n      if (\n        composedPath.includes(context._element) ||\n        (context._config.autoClose === 'inside' && !isMenuTarget) ||\n        (context._config.autoClose === 'outside' && isMenuTarget)\n      ) {\n        continue\n      }\n\n      // Tab navigation through the dropdown menu or events from contained inputs shouldn't close the menu\n      if (context._menu.contains(event.target) && ((event.type === 'keyup' && event.key === TAB_KEY) || /input|select|option|textarea|form/i.test(event.target.tagName))) {\n        continue\n      }\n\n      const relatedTarget = { relatedTarget: context._element }\n\n      if (event.type === 'click') {\n        relatedTarget.clickEvent = event\n      }\n\n      context._completeHide(relatedTarget)\n    }\n  }\n\n  static dataApiKeydownHandler(event) {\n    // If not an UP | DOWN | ESCAPE key => not a dropdown command\n    // If input/textarea && if key is other than ESCAPE => not a dropdown command\n\n    const isInput = /input|textarea/i.test(event.target.tagName)\n    const isEscapeEvent = event.key === ESCAPE_KEY\n    const isUpOrDownEvent = [ARROW_UP_KEY, ARROW_DOWN_KEY].includes(event.key)\n\n    if (!isUpOrDownEvent && !isEscapeEvent) {\n      return\n    }\n\n    if (isInput && !isEscapeEvent) {\n      return\n    }\n\n    event.preventDefault()\n\n    // TODO: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.3/forms/input-group/\n    const getToggleButton = this.matches(SELECTOR_DATA_TOGGLE) ?\n      this :\n      (SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE)[0] ||\n        SelectorEngine.next(this, SELECTOR_DATA_TOGGLE)[0] ||\n        SelectorEngine.findOne(SELECTOR_DATA_TOGGLE, event.delegateTarget.parentNode))\n\n    const instance = Dropdown.getOrCreateInstance(getToggleButton)\n\n    if (isUpOrDownEvent) {\n      event.stopPropagation()\n      instance.show()\n      instance._selectMenuItem(event)\n      return\n    }\n\n    if (instance._isShown()) { // else is escape and we check if it is shown\n      event.stopPropagation()\n      instance.hide()\n      getToggleButton.focus()\n    }\n  }\n}\n\n/**\n * Data API implementation\n */\n\nEventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE, Dropdown.dataApiKeydownHandler)\nEventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown.dataApiKeydownHandler)\nEventHandler.on(document, EVENT_CLICK_DATA_API, Dropdown.clearMenus)\nEventHandler.on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus)\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {\n  event.preventDefault()\n  Dropdown.getOrCreateInstance(this).toggle()\n})\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Dropdown)\n\nexport default Dropdown\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap util/backdrop.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport EventHandler from '../dom/event-handler.js'\nimport Config from './config.js'\nimport { execute, executeAfterTransition, getElement, reflow } from './index.js'\n\n/**\n * Constants\n */\n\nconst NAME = 'backdrop'\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_SHOW = 'show'\nconst EVENT_MOUSEDOWN = `mousedown.bs.${NAME}`\n\nconst Default = {\n  className: 'modal-backdrop',\n  clickCallback: null,\n  isAnimated: false,\n  isVisible: true, // if false, we use the backdrop helper without adding any element to the dom\n  rootElement: 'body' // give the choice to place backdrop under different elements\n}\n\nconst DefaultType = {\n  className: 'string',\n  clickCallback: '(function|null)',\n  isAnimated: 'boolean',\n  isVisible: 'boolean',\n  rootElement: '(element|string)'\n}\n\n/**\n * Class definition\n */\n\nclass Backdrop extends Config {\n  constructor(config) {\n    super()\n    this._config = this._getConfig(config)\n    this._isAppended = false\n    this._element = null\n  }\n\n  // Getters\n  static get Default() {\n    return Default\n  }\n\n  static get DefaultType() {\n    return DefaultType\n  }\n\n  static get NAME() {\n    return NAME\n  }\n\n  // Public\n  show(callback) {\n    if (!this._config.isVisible) {\n      execute(callback)\n      return\n    }\n\n    this._append()\n\n    const element = this._getElement()\n    if (this._config.isAnimated) {\n      reflow(element)\n    }\n\n    element.classList.add(CLASS_NAME_SHOW)\n\n    this._emulateAnimation(() => {\n      execute(callback)\n    })\n  }\n\n  hide(callback) {\n    if (!this._config.isVisible) {\n      execute(callback)\n      return\n    }\n\n    this._getElement().classList.remove(CLASS_NAME_SHOW)\n\n    this._emulateAnimation(() => {\n      this.dispose()\n      execute(callback)\n    })\n  }\n\n  dispose() {\n    if (!this._isAppended) {\n      return\n    }\n\n    EventHandler.off(this._element, EVENT_MOUSEDOWN)\n\n    this._element.remove()\n    this._isAppended = false\n  }\n\n  // Private\n  _getElement() {\n    if (!this._element) {\n      const backdrop = document.createElement('div')\n      backdrop.className = this._config.className\n      if (this._config.isAnimated) {\n        backdrop.classList.add(CLASS_NAME_FADE)\n      }\n\n      this._element = backdrop\n    }\n\n    return this._element\n  }\n\n  _configAfterMerge(config) {\n    // use getElement() with the default \"body\" to get a fresh Element on each instantiation\n    config.rootElement = getElement(config.rootElement)\n    return config\n  }\n\n  _append() {\n    if (this._isAppended) {\n      return\n    }\n\n    const element = this._getElement()\n    this._config.rootElement.append(element)\n\n    EventHandler.on(element, EVENT_MOUSEDOWN, () => {\n      execute(this._config.clickCallback)\n    })\n\n    this._isAppended = true\n  }\n\n  _emulateAnimation(callback) {\n    executeAfterTransition(callback, this._getElement(), this._config.isAnimated)\n  }\n}\n\nexport default Backdrop\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap util/focustrap.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport EventHandler from '../dom/event-handler.js'\nimport SelectorEngine from '../dom/selector-engine.js'\nimport Config from './config.js'\n\n/**\n * Constants\n */\n\nconst NAME = 'focustrap'\nconst DATA_KEY = 'bs.focustrap'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst EVENT_FOCUSIN = `focusin${EVENT_KEY}`\nconst EVENT_KEYDOWN_TAB = `keydown.tab${EVENT_KEY}`\n\nconst TAB_KEY = 'Tab'\nconst TAB_NAV_FORWARD = 'forward'\nconst TAB_NAV_BACKWARD = 'backward'\n\nconst Default = {\n  autofocus: true,\n  trapElement: null // The element to trap focus inside of\n}\n\nconst DefaultType = {\n  autofocus: 'boolean',\n  trapElement: 'element'\n}\n\n/**\n * Class definition\n */\n\nclass FocusTrap extends Config {\n  constructor(config) {\n    super()\n    this._config = this._getConfig(config)\n    this._isActive = false\n    this._lastTabNavDirection = null\n  }\n\n  // Getters\n  static get Default() {\n    return Default\n  }\n\n  static get DefaultType() {\n    return DefaultType\n  }\n\n  static get NAME() {\n    return NAME\n  }\n\n  // Public\n  activate() {\n    if (this._isActive) {\n      return\n    }\n\n    if (this._config.autofocus) {\n      this._config.trapElement.focus()\n    }\n\n    EventHandler.off(document, EVENT_KEY) // guard against infinite focus loop\n    EventHandler.on(document, EVENT_FOCUSIN, event => this._handleFocusin(event))\n    EventHandler.on(document, EVENT_KEYDOWN_TAB, event => this._handleKeydown(event))\n\n    this._isActive = true\n  }\n\n  deactivate() {\n    if (!this._isActive) {\n      return\n    }\n\n    this._isActive = false\n    EventHandler.off(document, EVENT_KEY)\n  }\n\n  // Private\n  _handleFocusin(event) {\n    const { trapElement } = this._config\n\n    if (event.target === document || event.target === trapElement || trapElement.contains(event.target)) {\n      return\n    }\n\n    const elements = SelectorEngine.focusableChildren(trapElement)\n\n    if (elements.length === 0) {\n      trapElement.focus()\n    } else if (this._lastTabNavDirection === TAB_NAV_BACKWARD) {\n      elements[elements.length - 1].focus()\n    } else {\n      elements[0].focus()\n    }\n  }\n\n  _handleKeydown(event) {\n    if (event.key !== TAB_KEY) {\n      return\n    }\n\n    this._lastTabNavDirection = event.shiftKey ? TAB_NAV_BACKWARD : TAB_NAV_FORWARD\n  }\n}\n\nexport default FocusTrap\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap util/scrollBar.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport Manipulator from '../dom/manipulator.js'\nimport SelectorEngine from '../dom/selector-engine.js'\nimport { isElement } from './index.js'\n\n/**\n * Constants\n */\n\nconst SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top'\nconst SELECTOR_STICKY_CONTENT = '.sticky-top'\nconst PROPERTY_PADDING = 'padding-right'\nconst PROPERTY_MARGIN = 'margin-right'\n\n/**\n * Class definition\n */\n\nclass ScrollBarHelper {\n  constructor() {\n    this._element = document.body\n  }\n\n  // Public\n  getWidth() {\n    // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes\n    const documentWidth = document.documentElement.clientWidth\n    return Math.abs(window.innerWidth - documentWidth)\n  }\n\n  hide() {\n    const width = this.getWidth()\n    this._disableOverFlow()\n    // give padding to element to balance the hidden scrollbar width\n    this._setElementAttributes(this._element, PROPERTY_PADDING, calculatedValue => calculatedValue + width)\n    // trick: We adjust positive paddingRight and negative marginRight to sticky-top elements to keep showing fullwidth\n    this._setElementAttributes(SELECTOR_FIXED_CONTENT, PROPERTY_PADDING, calculatedValue => calculatedValue + width)\n    this._setElementAttributes(SELECTOR_STICKY_CONTENT, PROPERTY_MARGIN, calculatedValue => calculatedValue - width)\n  }\n\n  reset() {\n    this._resetElementAttributes(this._element, 'overflow')\n    this._resetElementAttributes(this._element, PROPERTY_PADDING)\n    this._resetElementAttributes(SELECTOR_FIXED_CONTENT, PROPERTY_PADDING)\n    this._resetElementAttributes(SELECTOR_STICKY_CONTENT, PROPERTY_MARGIN)\n  }\n\n  isOverflowing() {\n    return this.getWidth() > 0\n  }\n\n  // Private\n  _disableOverFlow() {\n    this._saveInitialAttribute(this._element, 'overflow')\n    this._element.style.overflow = 'hidden'\n  }\n\n  _setElementAttributes(selector, styleProperty, callback) {\n    const scrollbarWidth = this.getWidth()\n    const manipulationCallBack = element => {\n      if (element !== this._element && window.innerWidth > element.clientWidth + scrollbarWidth) {\n        return\n      }\n\n      this._saveInitialAttribute(element, styleProperty)\n      const calculatedValue = window.getComputedStyle(element).getPropertyValue(styleProperty)\n      element.style.setProperty(styleProperty, `${callback(Number.parseFloat(calculatedValue))}px`)\n    }\n\n    this._applyManipulationCallback(selector, manipulationCallBack)\n  }\n\n  _saveInitialAttribute(element, styleProperty) {\n    const actualValue = element.style.getPropertyValue(styleProperty)\n    if (actualValue) {\n      Manipulator.setDataAttribute(element, styleProperty, actualValue)\n    }\n  }\n\n  _resetElementAttributes(selector, styleProperty) {\n    const manipulationCallBack = element => {\n      const value = Manipulator.getDataAttribute(element, styleProperty)\n      // We only want to remove the property if the value is `null`; the value can also be zero\n      if (value === null) {\n        element.style.removeProperty(styleProperty)\n        return\n      }\n\n      Manipulator.removeDataAttribute(element, styleProperty)\n      element.style.setProperty(styleProperty, value)\n    }\n\n    this._applyManipulationCallback(selector, manipulationCallBack)\n  }\n\n  _applyManipulationCallback(selector, callBack) {\n    if (isElement(selector)) {\n      callBack(selector)\n      return\n    }\n\n    for (const sel of SelectorEngine.find(selector, this._element)) {\n      callBack(sel)\n    }\n  }\n}\n\nexport default ScrollBarHelper\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap modal.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport BaseComponent from './base-component.js'\nimport EventHandler from './dom/event-handler.js'\nimport SelectorEngine from './dom/selector-engine.js'\nimport Backdrop from './util/backdrop.js'\nimport { enableDismissTrigger } from './util/component-functions.js'\nimport FocusTrap from './util/focustrap.js'\nimport { defineJQueryPlugin, isRTL, isVisible, reflow } from './util/index.js'\nimport ScrollBarHelper from './util/scrollbar.js'\n\n/**\n * Constants\n */\n\nconst NAME = 'modal'\nconst DATA_KEY = 'bs.modal'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\nconst ESCAPE_KEY = 'Escape'\n\nconst EVENT_HIDE = `hide${EVENT_KEY}`\nconst EVENT_HIDE_PREVENTED = `hidePrevented${EVENT_KEY}`\nconst EVENT_HIDDEN = `hidden${EVENT_KEY}`\nconst EVENT_SHOW = `show${EVENT_KEY}`\nconst EVENT_SHOWN = `shown${EVENT_KEY}`\nconst EVENT_RESIZE = `resize${EVENT_KEY}`\nconst EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`\nconst EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY}`\nconst EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_OPEN = 'modal-open'\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_SHOW = 'show'\nconst CLASS_NAME_STATIC = 'modal-static'\n\nconst OPEN_SELECTOR = '.modal.show'\nconst SELECTOR_DIALOG = '.modal-dialog'\nconst SELECTOR_MODAL_BODY = '.modal-body'\nconst SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"modal\"]'\n\nconst Default = {\n  backdrop: true,\n  focus: true,\n  keyboard: true\n}\n\nconst DefaultType = {\n  backdrop: '(boolean|string)',\n  focus: 'boolean',\n  keyboard: 'boolean'\n}\n\n/**\n * Class definition\n */\n\nclass Modal extends BaseComponent {\n  constructor(element, config) {\n    super(element, config)\n\n    this._dialog = SelectorEngine.findOne(SELECTOR_DIALOG, this._element)\n    this._backdrop = this._initializeBackDrop()\n    this._focustrap = this._initializeFocusTrap()\n    this._isShown = false\n    this._isTransitioning = false\n    this._scrollBar = new ScrollBarHelper()\n\n    this._addEventListeners()\n  }\n\n  // Getters\n  static get Default() {\n    return Default\n  }\n\n  static get DefaultType() {\n    return DefaultType\n  }\n\n  static get NAME() {\n    return NAME\n  }\n\n  // Public\n  toggle(relatedTarget) {\n    return this._isShown ? this.hide() : this.show(relatedTarget)\n  }\n\n  show(relatedTarget) {\n    if (this._isShown || this._isTransitioning) {\n      return\n    }\n\n    const showEvent = EventHandler.trigger(this._element, EVENT_SHOW, {\n      relatedTarget\n    })\n\n    if (showEvent.defaultPrevented) {\n      return\n    }\n\n    this._isShown = true\n    this._isTransitioning = true\n\n    this._scrollBar.hide()\n\n    document.body.classList.add(CLASS_NAME_OPEN)\n\n    this._adjustDialog()\n\n    this._backdrop.show(() => this._showElement(relatedTarget))\n  }\n\n  hide() {\n    if (!this._isShown || this._isTransitioning) {\n      return\n    }\n\n    const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE)\n\n    if (hideEvent.defaultPrevented) {\n      return\n    }\n\n    this._isShown = false\n    this._isTransitioning = true\n    this._focustrap.deactivate()\n\n    this._element.classList.remove(CLASS_NAME_SHOW)\n\n    this._queueCallback(() => this._hideModal(), this._element, this._isAnimated())\n  }\n\n  dispose() {\n    EventHandler.off(window, EVENT_KEY)\n    EventHandler.off(this._dialog, EVENT_KEY)\n\n    this._backdrop.dispose()\n    this._focustrap.deactivate()\n\n    super.dispose()\n  }\n\n  handleUpdate() {\n    this._adjustDialog()\n  }\n\n  // Private\n  _initializeBackDrop() {\n    return new Backdrop({\n      isVisible: Boolean(this._config.backdrop), // 'static' option will be translated to true, and booleans will keep their value,\n      isAnimated: this._isAnimated()\n    })\n  }\n\n  _initializeFocusTrap() {\n    return new FocusTrap({\n      trapElement: this._element\n    })\n  }\n\n  _showElement(relatedTarget) {\n    // try to append dynamic modal\n    if (!document.body.contains(this._element)) {\n      document.body.append(this._element)\n    }\n\n    this._element.style.display = 'block'\n    this._element.removeAttribute('aria-hidden')\n    this._element.setAttribute('aria-modal', true)\n    this._element.setAttribute('role', 'dialog')\n    this._element.scrollTop = 0\n\n    const modalBody = SelectorEngine.findOne(SELECTOR_MODAL_BODY, this._dialog)\n    if (modalBody) {\n      modalBody.scrollTop = 0\n    }\n\n    reflow(this._element)\n\n    this._element.classList.add(CLASS_NAME_SHOW)\n\n    const transitionComplete = () => {\n      if (this._config.focus) {\n        this._focustrap.activate()\n      }\n\n      this._isTransitioning = false\n      EventHandler.trigger(this._element, EVENT_SHOWN, {\n        relatedTarget\n      })\n    }\n\n    this._queueCallback(transitionComplete, this._dialog, this._isAnimated())\n  }\n\n  _addEventListeners() {\n    EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, event => {\n      if (event.key !== ESCAPE_KEY) {\n        return\n      }\n\n      if (this._config.keyboard) {\n        this.hide()\n        return\n      }\n\n      this._triggerBackdropTransition()\n    })\n\n    EventHandler.on(window, EVENT_RESIZE, () => {\n      if (this._isShown && !this._isTransitioning) {\n        this._adjustDialog()\n      }\n    })\n\n    EventHandler.on(this._element, EVENT_MOUSEDOWN_DISMISS, event => {\n      // a bad trick to segregate clicks that may start inside dialog but end outside, and avoid listen to scrollbar clicks\n      EventHandler.one(this._element, EVENT_CLICK_DISMISS, event2 => {\n        if (this._element !== event.target || this._element !== event2.target) {\n          return\n        }\n\n        if (this._config.backdrop === 'static') {\n          this._triggerBackdropTransition()\n          return\n        }\n\n        if (this._config.backdrop) {\n          this.hide()\n        }\n      })\n    })\n  }\n\n  _hideModal() {\n    this._element.style.display = 'none'\n    this._element.setAttribute('aria-hidden', true)\n    this._element.removeAttribute('aria-modal')\n    this._element.removeAttribute('role')\n    this._isTransitioning = false\n\n    this._backdrop.hide(() => {\n      document.body.classList.remove(CLASS_NAME_OPEN)\n      this._resetAdjustments()\n      this._scrollBar.reset()\n      EventHandler.trigger(this._element, EVENT_HIDDEN)\n    })\n  }\n\n  _isAnimated() {\n    return this._element.classList.contains(CLASS_NAME_FADE)\n  }\n\n  _triggerBackdropTransition() {\n    const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED)\n    if (hideEvent.defaultPrevented) {\n      return\n    }\n\n    const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight\n    const initialOverflowY = this._element.style.overflowY\n    // return if the following background transition hasn't yet completed\n    if (initialOverflowY === 'hidden' || this._element.classList.contains(CLASS_NAME_STATIC)) {\n      return\n    }\n\n    if (!isModalOverflowing) {\n      this._element.style.overflowY = 'hidden'\n    }\n\n    this._element.classList.add(CLASS_NAME_STATIC)\n    this._queueCallback(() => {\n      this._element.classList.remove(CLASS_NAME_STATIC)\n      this._queueCallback(() => {\n        this._element.style.overflowY = initialOverflowY\n      }, this._dialog)\n    }, this._dialog)\n\n    this._element.focus()\n  }\n\n  /**\n   * The following methods are used to handle overflowing modals\n   */\n\n  _adjustDialog() {\n    const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight\n    const scrollbarWidth = this._scrollBar.getWidth()\n    const isBodyOverflowing = scrollbarWidth > 0\n\n    if (isBodyOverflowing && !isModalOverflowing) {\n      const property = isRTL() ? 'paddingLeft' : 'paddingRight'\n      this._element.style[property] = `${scrollbarWidth}px`\n    }\n\n    if (!isBodyOverflowing && isModalOverflowing) {\n      const property = isRTL() ? 'paddingRight' : 'paddingLeft'\n      this._element.style[property] = `${scrollbarWidth}px`\n    }\n  }\n\n  _resetAdjustments() {\n    this._element.style.paddingLeft = ''\n    this._element.style.paddingRight = ''\n  }\n\n  // Static\n  static jQueryInterface(config, relatedTarget) {\n    return this.each(function () {\n      const data = Modal.getOrCreateInstance(this, config)\n\n      if (typeof config !== 'string') {\n        return\n      }\n\n      if (typeof data[config] === 'undefined') {\n        throw new TypeError(`No method named \"${config}\"`)\n      }\n\n      data[config](relatedTarget)\n    })\n  }\n}\n\n/**\n * Data API implementation\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {\n  const target = SelectorEngine.getElementFromSelector(this)\n\n  if (['A', 'AREA'].includes(this.tagName)) {\n    event.preventDefault()\n  }\n\n  EventHandler.one(target, EVENT_SHOW, showEvent => {\n    if (showEvent.defaultPrevented) {\n      // only register focus restorer if modal will actually get shown\n      return\n    }\n\n    EventHandler.one(target, EVENT_HIDDEN, () => {\n      if (isVisible(this)) {\n        this.focus()\n      }\n    })\n  })\n\n  // avoid conflict when clicking modal toggler while another one is open\n  const alreadyOpen = SelectorEngine.findOne(OPEN_SELECTOR)\n  if (alreadyOpen) {\n    Modal.getInstance(alreadyOpen).hide()\n  }\n\n  const data = Modal.getOrCreateInstance(target)\n\n  data.toggle(this)\n})\n\nenableDismissTrigger(Modal)\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Modal)\n\nexport default Modal\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap offcanvas.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport BaseComponent from './base-component.js'\nimport EventHandler from './dom/event-handler.js'\nimport SelectorEngine from './dom/selector-engine.js'\nimport Backdrop from './util/backdrop.js'\nimport { enableDismissTrigger } from './util/component-functions.js'\nimport FocusTrap from './util/focustrap.js'\nimport {\n  defineJQueryPlugin,\n  isDisabled,\n  isVisible\n} from './util/index.js'\nimport ScrollBarHelper from './util/scrollbar.js'\n\n/**\n * Constants\n */\n\nconst NAME = 'offcanvas'\nconst DATA_KEY = 'bs.offcanvas'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\nconst EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}`\nconst ESCAPE_KEY = 'Escape'\n\nconst CLASS_NAME_SHOW = 'show'\nconst CLASS_NAME_SHOWING = 'showing'\nconst CLASS_NAME_HIDING = 'hiding'\nconst CLASS_NAME_BACKDROP = 'offcanvas-backdrop'\nconst OPEN_SELECTOR = '.offcanvas.show'\n\nconst EVENT_SHOW = `show${EVENT_KEY}`\nconst EVENT_SHOWN = `shown${EVENT_KEY}`\nconst EVENT_HIDE = `hide${EVENT_KEY}`\nconst EVENT_HIDE_PREVENTED = `hidePrevented${EVENT_KEY}`\nconst EVENT_HIDDEN = `hidden${EVENT_KEY}`\nconst EVENT_RESIZE = `resize${EVENT_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\nconst EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY}`\n\nconst SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"offcanvas\"]'\n\nconst Default = {\n  backdrop: true,\n  keyboard: true,\n  scroll: false\n}\n\nconst DefaultType = {\n  backdrop: '(boolean|string)',\n  keyboard: 'boolean',\n  scroll: 'boolean'\n}\n\n/**\n * Class definition\n */\n\nclass Offcanvas extends BaseComponent {\n  constructor(element, config) {\n    super(element, config)\n\n    this._isShown = false\n    this._backdrop = this._initializeBackDrop()\n    this._focustrap = this._initializeFocusTrap()\n    this._addEventListeners()\n  }\n\n  // Getters\n  static get Default() {\n    return Default\n  }\n\n  static get DefaultType() {\n    return DefaultType\n  }\n\n  static get NAME() {\n    return NAME\n  }\n\n  // Public\n  toggle(relatedTarget) {\n    return this._isShown ? this.hide() : this.show(relatedTarget)\n  }\n\n  show(relatedTarget) {\n    if (this._isShown) {\n      return\n    }\n\n    const showEvent = EventHandler.trigger(this._element, EVENT_SHOW, { relatedTarget })\n\n    if (showEvent.defaultPrevented) {\n      return\n    }\n\n    this._isShown = true\n    this._backdrop.show()\n\n    if (!this._config.scroll) {\n      new ScrollBarHelper().hide()\n    }\n\n    this._element.setAttribute('aria-modal', true)\n    this._element.setAttribute('role', 'dialog')\n    this._element.classList.add(CLASS_NAME_SHOWING)\n\n    const completeCallBack = () => {\n      if (!this._config.scroll || this._config.backdrop) {\n        this._focustrap.activate()\n      }\n\n      this._element.classList.add(CLASS_NAME_SHOW)\n      this._element.classList.remove(CLASS_NAME_SHOWING)\n      EventHandler.trigger(this._element, EVENT_SHOWN, { relatedTarget })\n    }\n\n    this._queueCallback(completeCallBack, this._element, true)\n  }\n\n  hide() {\n    if (!this._isShown) {\n      return\n    }\n\n    const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE)\n\n    if (hideEvent.defaultPrevented) {\n      return\n    }\n\n    this._focustrap.deactivate()\n    this._element.blur()\n    this._isShown = false\n    this._element.classList.add(CLASS_NAME_HIDING)\n    this._backdrop.hide()\n\n    const completeCallback = () => {\n      this._element.classList.remove(CLASS_NAME_SHOW, CLASS_NAME_HIDING)\n      this._element.removeAttribute('aria-modal')\n      this._element.removeAttribute('role')\n\n      if (!this._config.scroll) {\n        new ScrollBarHelper().reset()\n      }\n\n      EventHandler.trigger(this._element, EVENT_HIDDEN)\n    }\n\n    this._queueCallback(completeCallback, this._element, true)\n  }\n\n  dispose() {\n    this._backdrop.dispose()\n    this._focustrap.deactivate()\n    super.dispose()\n  }\n\n  // Private\n  _initializeBackDrop() {\n    const clickCallback = () => {\n      if (this._config.backdrop === 'static') {\n        EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED)\n        return\n      }\n\n      this.hide()\n    }\n\n    // 'static' option will be translated to true, and booleans will keep their value\n    const isVisible = Boolean(this._config.backdrop)\n\n    return new Backdrop({\n      className: CLASS_NAME_BACKDROP,\n      isVisible,\n      isAnimated: true,\n      rootElement: this._element.parentNode,\n      clickCallback: isVisible ? clickCallback : null\n    })\n  }\n\n  _initializeFocusTrap() {\n    return new FocusTrap({\n      trapElement: this._element\n    })\n  }\n\n  _addEventListeners() {\n    EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, event => {\n      if (event.key !== ESCAPE_KEY) {\n        return\n      }\n\n      if (this._config.keyboard) {\n        this.hide()\n        return\n      }\n\n      EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED)\n    })\n  }\n\n  // Static\n  static jQueryInterface(config) {\n    return this.each(function () {\n      const data = Offcanvas.getOrCreateInstance(this, config)\n\n      if (typeof config !== 'string') {\n        return\n      }\n\n      if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {\n        throw new TypeError(`No method named \"${config}\"`)\n      }\n\n      data[config](this)\n    })\n  }\n}\n\n/**\n * Data API implementation\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {\n  const target = SelectorEngine.getElementFromSelector(this)\n\n  if (['A', 'AREA'].includes(this.tagName)) {\n    event.preventDefault()\n  }\n\n  if (isDisabled(this)) {\n    return\n  }\n\n  EventHandler.one(target, EVENT_HIDDEN, () => {\n    // focus on trigger when it is closed\n    if (isVisible(this)) {\n      this.focus()\n    }\n  })\n\n  // avoid conflict when clicking a toggler of an offcanvas, while another is open\n  const alreadyOpen = SelectorEngine.findOne(OPEN_SELECTOR)\n  if (alreadyOpen && alreadyOpen !== target) {\n    Offcanvas.getInstance(alreadyOpen).hide()\n  }\n\n  const data = Offcanvas.getOrCreateInstance(target)\n  data.toggle(this)\n})\n\nEventHandler.on(window, EVENT_LOAD_DATA_API, () => {\n  for (const selector of SelectorEngine.find(OPEN_SELECTOR)) {\n    Offcanvas.getOrCreateInstance(selector).show()\n  }\n})\n\nEventHandler.on(window, EVENT_RESIZE, () => {\n  for (const element of SelectorEngine.find('[aria-modal][class*=show][class*=offcanvas-]')) {\n    if (getComputedStyle(element).position !== 'fixed') {\n      Offcanvas.getOrCreateInstance(element).hide()\n    }\n  }\n})\n\nenableDismissTrigger(Offcanvas)\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Offcanvas)\n\nexport default Offcanvas\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap util/sanitizer.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n// js-docs-start allow-list\nconst ARIA_ATTRIBUTE_PATTERN = /^aria-[\\w-]*$/i\n\nexport const DefaultAllowlist = {\n  // Global attributes allowed on any supplied element below.\n  '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],\n  a: ['target', 'href', 'title', 'rel'],\n  area: [],\n  b: [],\n  br: [],\n  col: [],\n  code: [],\n  div: [],\n  em: [],\n  hr: [],\n  h1: [],\n  h2: [],\n  h3: [],\n  h4: [],\n  h5: [],\n  h6: [],\n  i: [],\n  img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],\n  li: [],\n  ol: [],\n  p: [],\n  pre: [],\n  s: [],\n  small: [],\n  span: [],\n  sub: [],\n  sup: [],\n  strong: [],\n  u: [],\n  ul: []\n}\n// js-docs-end allow-list\n\nconst uriAttributes = new Set([\n  'background',\n  'cite',\n  'href',\n  'itemtype',\n  'longdesc',\n  'poster',\n  'src',\n  'xlink:href'\n])\n\n/**\n * A pattern that recognizes URLs that are safe wrt. XSS in URL navigation\n * contexts.\n *\n * Shout-out to Angular https://github.com/angular/angular/blob/15.2.8/packages/core/src/sanitization/url_sanitizer.ts#L38\n */\n// eslint-disable-next-line unicorn/better-regex\nconst SAFE_URL_PATTERN = /^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i\n\nconst allowedAttribute = (attribute, allowedAttributeList) => {\n  const attributeName = attribute.nodeName.toLowerCase()\n\n  if (allowedAttributeList.includes(attributeName)) {\n    if (uriAttributes.has(attributeName)) {\n      return Boolean(SAFE_URL_PATTERN.test(attribute.nodeValue))\n    }\n\n    return true\n  }\n\n  // Check if a regular expression validates the attribute.\n  return allowedAttributeList.filter(attributeRegex => attributeRegex instanceof RegExp)\n    .some(regex => regex.test(attributeName))\n}\n\nexport function sanitizeHtml(unsafeHtml, allowList, sanitizeFunction) {\n  if (!unsafeHtml.length) {\n    return unsafeHtml\n  }\n\n  if (sanitizeFunction && typeof sanitizeFunction === 'function') {\n    return sanitizeFunction(unsafeHtml)\n  }\n\n  const domParser = new window.DOMParser()\n  const createdDocument = domParser.parseFromString(unsafeHtml, 'text/html')\n  const elements = [].concat(...createdDocument.body.querySelectorAll('*'))\n\n  for (const element of elements) {\n    const elementName = element.nodeName.toLowerCase()\n\n    if (!Object.keys(allowList).includes(elementName)) {\n      element.remove()\n      continue\n    }\n\n    const attributeList = [].concat(...element.attributes)\n    const allowedAttributes = [].concat(allowList['*'] || [], allowList[elementName] || [])\n\n    for (const attribute of attributeList) {\n      if (!allowedAttribute(attribute, allowedAttributes)) {\n        element.removeAttribute(attribute.nodeName)\n      }\n    }\n  }\n\n  return createdDocument.body.innerHTML\n}\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap util/template-factory.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport SelectorEngine from '../dom/selector-engine.js'\nimport Config from './config.js'\nimport { DefaultAllowlist, sanitizeHtml } from './sanitizer.js'\nimport { execute, getElement, isElement } from './index.js'\n\n/**\n * Constants\n */\n\nconst NAME = 'TemplateFactory'\n\nconst Default = {\n  allowList: DefaultAllowlist,\n  content: {}, // { selector : text ,  selector2 : text2 , }\n  extraClass: '',\n  html: false,\n  sanitize: true,\n  sanitizeFn: null,\n  template: '<div></div>'\n}\n\nconst DefaultType = {\n  allowList: 'object',\n  content: 'object',\n  extraClass: '(string|function)',\n  html: 'boolean',\n  sanitize: 'boolean',\n  sanitizeFn: '(null|function)',\n  template: 'string'\n}\n\nconst DefaultContentType = {\n  entry: '(string|element|function|null)',\n  selector: '(string|element)'\n}\n\n/**\n * Class definition\n */\n\nclass TemplateFactory extends Config {\n  constructor(config) {\n    super()\n    this._config = this._getConfig(config)\n  }\n\n  // Getters\n  static get Default() {\n    return Default\n  }\n\n  static get DefaultType() {\n    return DefaultType\n  }\n\n  static get NAME() {\n    return NAME\n  }\n\n  // Public\n  getContent() {\n    return Object.values(this._config.content)\n      .map(config => this._resolvePossibleFunction(config))\n      .filter(Boolean)\n  }\n\n  hasContent() {\n    return this.getContent().length > 0\n  }\n\n  changeContent(content) {\n    this._checkContent(content)\n    this._config.content = { ...this._config.content, ...content }\n    return this\n  }\n\n  toHtml() {\n    const templateWrapper = document.createElement('div')\n    templateWrapper.innerHTML = this._maybeSanitize(this._config.template)\n\n    for (const [selector, text] of Object.entries(this._config.content)) {\n      this._setContent(templateWrapper, text, selector)\n    }\n\n    const template = templateWrapper.children[0]\n    const extraClass = this._resolvePossibleFunction(this._config.extraClass)\n\n    if (extraClass) {\n      template.classList.add(...extraClass.split(' '))\n    }\n\n    return template\n  }\n\n  // Private\n  _typeCheckConfig(config) {\n    super._typeCheckConfig(config)\n    this._checkContent(config.content)\n  }\n\n  _checkContent(arg) {\n    for (const [selector, content] of Object.entries(arg)) {\n      super._typeCheckConfig({ selector, entry: content }, DefaultContentType)\n    }\n  }\n\n  _setContent(template, content, selector) {\n    const templateElement = SelectorEngine.findOne(selector, template)\n\n    if (!templateElement) {\n      return\n    }\n\n    content = this._resolvePossibleFunction(content)\n\n    if (!content) {\n      templateElement.remove()\n      return\n    }\n\n    if (isElement(content)) {\n      this._putElementInTemplate(getElement(content), templateElement)\n      return\n    }\n\n    if (this._config.html) {\n      templateElement.innerHTML = this._maybeSanitize(content)\n      return\n    }\n\n    templateElement.textContent = content\n  }\n\n  _maybeSanitize(arg) {\n    return this._config.sanitize ? sanitizeHtml(arg, this._config.allowList, this._config.sanitizeFn) : arg\n  }\n\n  _resolvePossibleFunction(arg) {\n    return execute(arg, [this])\n  }\n\n  _putElementInTemplate(element, templateElement) {\n    if (this._config.html) {\n      templateElement.innerHTML = ''\n      templateElement.append(element)\n      return\n    }\n\n    templateElement.textContent = element.textContent\n  }\n}\n\nexport default TemplateFactory\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap tooltip.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport * as Popper from '@popperjs/core'\nimport BaseComponent from './base-component.js'\nimport EventHandler from './dom/event-handler.js'\nimport Manipulator from './dom/manipulator.js'\nimport { defineJQueryPlugin, execute, findShadowRoot, getElement, getUID, isRTL, noop } from './util/index.js'\nimport { DefaultAllowlist } from './util/sanitizer.js'\nimport TemplateFactory from './util/template-factory.js'\n\n/**\n * Constants\n */\n\nconst NAME = 'tooltip'\nconst DISALLOWED_ATTRIBUTES = new Set(['sanitize', 'allowList', 'sanitizeFn'])\n\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_MODAL = 'modal'\nconst CLASS_NAME_SHOW = 'show'\n\nconst SELECTOR_TOOLTIP_INNER = '.tooltip-inner'\nconst SELECTOR_MODAL = `.${CLASS_NAME_MODAL}`\n\nconst EVENT_MODAL_HIDE = 'hide.bs.modal'\n\nconst TRIGGER_HOVER = 'hover'\nconst TRIGGER_FOCUS = 'focus'\nconst TRIGGER_CLICK = 'click'\nconst TRIGGER_MANUAL = 'manual'\n\nconst EVENT_HIDE = 'hide'\nconst EVENT_HIDDEN = 'hidden'\nconst EVENT_SHOW = 'show'\nconst EVENT_SHOWN = 'shown'\nconst EVENT_INSERTED = 'inserted'\nconst EVENT_CLICK = 'click'\nconst EVENT_FOCUSIN = 'focusin'\nconst EVENT_FOCUSOUT = 'focusout'\nconst EVENT_MOUSEENTER = 'mouseenter'\nconst EVENT_MOUSELEAVE = 'mouseleave'\n\nconst AttachmentMap = {\n  AUTO: 'auto',\n  TOP: 'top',\n  RIGHT: isRTL() ? 'left' : 'right',\n  BOTTOM: 'bottom',\n  LEFT: isRTL() ? 'right' : 'left'\n}\n\nconst Default = {\n  allowList: DefaultAllowlist,\n  animation: true,\n  boundary: 'clippingParents',\n  container: false,\n  customClass: '',\n  delay: 0,\n  fallbackPlacements: ['top', 'right', 'bottom', 'left'],\n  html: false,\n  offset: [0, 6],\n  placement: 'top',\n  popperConfig: null,\n  sanitize: true,\n  sanitizeFn: null,\n  selector: false,\n  template: '<div class=\"tooltip\" role=\"tooltip\">' +\n            '<div class=\"tooltip-arrow\"></div>' +\n            '<div class=\"tooltip-inner\"></div>' +\n            '</div>',\n  title: '',\n  trigger: 'hover focus'\n}\n\nconst DefaultType = {\n  allowList: 'object',\n  animation: 'boolean',\n  boundary: '(string|element)',\n  container: '(string|element|boolean)',\n  customClass: '(string|function)',\n  delay: '(number|object)',\n  fallbackPlacements: 'array',\n  html: 'boolean',\n  offset: '(array|string|function)',\n  placement: '(string|function)',\n  popperConfig: '(null|object|function)',\n  sanitize: 'boolean',\n  sanitizeFn: '(null|function)',\n  selector: '(string|boolean)',\n  template: 'string',\n  title: '(string|element|function)',\n  trigger: 'string'\n}\n\n/**\n * Class definition\n */\n\nclass Tooltip extends BaseComponent {\n  constructor(element, config) {\n    if (typeof Popper === 'undefined') {\n      throw new TypeError('Bootstrap\\'s tooltips require Popper (https://popper.js.org)')\n    }\n\n    super(element, config)\n\n    // Private\n    this._isEnabled = true\n    this._timeout = 0\n    this._isHovered = null\n    this._activeTrigger = {}\n    this._popper = null\n    this._templateFactory = null\n    this._newContent = null\n\n    // Protected\n    this.tip = null\n\n    this._setListeners()\n\n    if (!this._config.selector) {\n      this._fixTitle()\n    }\n  }\n\n  // Getters\n  static get Default() {\n    return Default\n  }\n\n  static get DefaultType() {\n    return DefaultType\n  }\n\n  static get NAME() {\n    return NAME\n  }\n\n  // Public\n  enable() {\n    this._isEnabled = true\n  }\n\n  disable() {\n    this._isEnabled = false\n  }\n\n  toggleEnabled() {\n    this._isEnabled = !this._isEnabled\n  }\n\n  toggle() {\n    if (!this._isEnabled) {\n      return\n    }\n\n    this._activeTrigger.click = !this._activeTrigger.click\n    if (this._isShown()) {\n      this._leave()\n      return\n    }\n\n    this._enter()\n  }\n\n  dispose() {\n    clearTimeout(this._timeout)\n\n    EventHandler.off(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler)\n\n    if (this._element.getAttribute('data-bs-original-title')) {\n      this._element.setAttribute('title', this._element.getAttribute('data-bs-original-title'))\n    }\n\n    this._disposePopper()\n    super.dispose()\n  }\n\n  show() {\n    if (this._element.style.display === 'none') {\n      throw new Error('Please use show on visible elements')\n    }\n\n    if (!(this._isWithContent() && this._isEnabled)) {\n      return\n    }\n\n    const showEvent = EventHandler.trigger(this._element, this.constructor.eventName(EVENT_SHOW))\n    const shadowRoot = findShadowRoot(this._element)\n    const isInTheDom = (shadowRoot || this._element.ownerDocument.documentElement).contains(this._element)\n\n    if (showEvent.defaultPrevented || !isInTheDom) {\n      return\n    }\n\n    // TODO: v6 remove this or make it optional\n    this._disposePopper()\n\n    const tip = this._getTipElement()\n\n    this._element.setAttribute('aria-describedby', tip.getAttribute('id'))\n\n    const { container } = this._config\n\n    if (!this._element.ownerDocument.documentElement.contains(this.tip)) {\n      container.append(tip)\n      EventHandler.trigger(this._element, this.constructor.eventName(EVENT_INSERTED))\n    }\n\n    this._popper = this._createPopper(tip)\n\n    tip.classList.add(CLASS_NAME_SHOW)\n\n    // If this is a touch-enabled device we add extra\n    // empty mouseover listeners to the body's immediate children;\n    // only needed because of broken event delegation on iOS\n    // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html\n    if ('ontouchstart' in document.documentElement) {\n      for (const element of [].concat(...document.body.children)) {\n        EventHandler.on(element, 'mouseover', noop)\n      }\n    }\n\n    const complete = () => {\n      EventHandler.trigger(this._element, this.constructor.eventName(EVENT_SHOWN))\n\n      if (this._isHovered === false) {\n        this._leave()\n      }\n\n      this._isHovered = false\n    }\n\n    this._queueCallback(complete, this.tip, this._isAnimated())\n  }\n\n  hide() {\n    if (!this._isShown()) {\n      return\n    }\n\n    const hideEvent = EventHandler.trigger(this._element, this.constructor.eventName(EVENT_HIDE))\n    if (hideEvent.defaultPrevented) {\n      return\n    }\n\n    const tip = this._getTipElement()\n    tip.classList.remove(CLASS_NAME_SHOW)\n\n    // If this is a touch-enabled device we remove the extra\n    // empty mouseover listeners we added for iOS support\n    if ('ontouchstart' in document.documentElement) {\n      for (const element of [].concat(...document.body.children)) {\n        EventHandler.off(element, 'mouseover', noop)\n      }\n    }\n\n    this._activeTrigger[TRIGGER_CLICK] = false\n    this._activeTrigger[TRIGGER_FOCUS] = false\n    this._activeTrigger[TRIGGER_HOVER] = false\n    this._isHovered = null // it is a trick to support manual triggering\n\n    const complete = () => {\n      if (this._isWithActiveTrigger()) {\n        return\n      }\n\n      if (!this._isHovered) {\n        this._disposePopper()\n      }\n\n      this._element.removeAttribute('aria-describedby')\n      EventHandler.trigger(this._element, this.constructor.eventName(EVENT_HIDDEN))\n    }\n\n    this._queueCallback(complete, this.tip, this._isAnimated())\n  }\n\n  update() {\n    if (this._popper) {\n      this._popper.update()\n    }\n  }\n\n  // Protected\n  _isWithContent() {\n    return Boolean(this._getTitle())\n  }\n\n  _getTipElement() {\n    if (!this.tip) {\n      this.tip = this._createTipElement(this._newContent || this._getContentForTemplate())\n    }\n\n    return this.tip\n  }\n\n  _createTipElement(content) {\n    const tip = this._getTemplateFactory(content).toHtml()\n\n    // TODO: remove this check in v6\n    if (!tip) {\n      return null\n    }\n\n    tip.classList.remove(CLASS_NAME_FADE, CLASS_NAME_SHOW)\n    // TODO: v6 the following can be achieved with CSS only\n    tip.classList.add(`bs-${this.constructor.NAME}-auto`)\n\n    const tipId = getUID(this.constructor.NAME).toString()\n\n    tip.setAttribute('id', tipId)\n\n    if (this._isAnimated()) {\n      tip.classList.add(CLASS_NAME_FADE)\n    }\n\n    return tip\n  }\n\n  setContent(content) {\n    this._newContent = content\n    if (this._isShown()) {\n      this._disposePopper()\n      this.show()\n    }\n  }\n\n  _getTemplateFactory(content) {\n    if (this._templateFactory) {\n      this._templateFactory.changeContent(content)\n    } else {\n      this._templateFactory = new TemplateFactory({\n        ...this._config,\n        // the `content` var has to be after `this._config`\n        // to override config.content in case of popover\n        content,\n        extraClass: this._resolvePossibleFunction(this._config.customClass)\n      })\n    }\n\n    return this._templateFactory\n  }\n\n  _getContentForTemplate() {\n    return {\n      [SELECTOR_TOOLTIP_INNER]: this._getTitle()\n    }\n  }\n\n  _getTitle() {\n    return this._resolvePossibleFunction(this._config.title) || this._element.getAttribute('data-bs-original-title')\n  }\n\n  // Private\n  _initializeOnDelegatedTarget(event) {\n    return this.constructor.getOrCreateInstance(event.delegateTarget, this._getDelegateConfig())\n  }\n\n  _isAnimated() {\n    return this._config.animation || (this.tip && this.tip.classList.contains(CLASS_NAME_FADE))\n  }\n\n  _isShown() {\n    return this.tip && this.tip.classList.contains(CLASS_NAME_SHOW)\n  }\n\n  _createPopper(tip) {\n    const placement = execute(this._config.placement, [this, tip, this._element])\n    const attachment = AttachmentMap[placement.toUpperCase()]\n    return Popper.createPopper(this._element, tip, this._getPopperConfig(attachment))\n  }\n\n  _getOffset() {\n    const { offset } = this._config\n\n    if (typeof offset === 'string') {\n      return offset.split(',').map(value => Number.parseInt(value, 10))\n    }\n\n    if (typeof offset === 'function') {\n      return popperData => offset(popperData, this._element)\n    }\n\n    return offset\n  }\n\n  _resolvePossibleFunction(arg) {\n    return execute(arg, [this._element])\n  }\n\n  _getPopperConfig(attachment) {\n    const defaultBsPopperConfig = {\n      placement: attachment,\n      modifiers: [\n        {\n          name: 'flip',\n          options: {\n            fallbackPlacements: this._config.fallbackPlacements\n          }\n        },\n        {\n          name: 'offset',\n          options: {\n            offset: this._getOffset()\n          }\n        },\n        {\n          name: 'preventOverflow',\n          options: {\n            boundary: this._config.boundary\n          }\n        },\n        {\n          name: 'arrow',\n          options: {\n            element: `.${this.constructor.NAME}-arrow`\n          }\n        },\n        {\n          name: 'preSetPlacement',\n          enabled: true,\n          phase: 'beforeMain',\n          fn: data => {\n            // Pre-set Popper's placement attribute in order to read the arrow sizes properly.\n            // Otherwise, Popper mixes up the width and height dimensions since the initial arrow style is for top placement\n            this._getTipElement().setAttribute('data-popper-placement', data.state.placement)\n          }\n        }\n      ]\n    }\n\n    return {\n      ...defaultBsPopperConfig,\n      ...execute(this._config.popperConfig, [defaultBsPopperConfig])\n    }\n  }\n\n  _setListeners() {\n    const triggers = this._config.trigger.split(' ')\n\n    for (const trigger of triggers) {\n      if (trigger === 'click') {\n        EventHandler.on(this._element, this.constructor.eventName(EVENT_CLICK), this._config.selector, event => {\n          const context = this._initializeOnDelegatedTarget(event)\n          context.toggle()\n        })\n      } else if (trigger !== TRIGGER_MANUAL) {\n        const eventIn = trigger === TRIGGER_HOVER ?\n          this.constructor.eventName(EVENT_MOUSEENTER) :\n          this.constructor.eventName(EVENT_FOCUSIN)\n        const eventOut = trigger === TRIGGER_HOVER ?\n          this.constructor.eventName(EVENT_MOUSELEAVE) :\n          this.constructor.eventName(EVENT_FOCUSOUT)\n\n        EventHandler.on(this._element, eventIn, this._config.selector, event => {\n          const context = this._initializeOnDelegatedTarget(event)\n          context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true\n          context._enter()\n        })\n        EventHandler.on(this._element, eventOut, this._config.selector, event => {\n          const context = this._initializeOnDelegatedTarget(event)\n          context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] =\n            context._element.contains(event.relatedTarget)\n\n          context._leave()\n        })\n      }\n    }\n\n    this._hideModalHandler = () => {\n      if (this._element) {\n        this.hide()\n      }\n    }\n\n    EventHandler.on(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler)\n  }\n\n  _fixTitle() {\n    const title = this._element.getAttribute('title')\n\n    if (!title) {\n      return\n    }\n\n    if (!this._element.getAttribute('aria-label') && !this._element.textContent.trim()) {\n      this._element.setAttribute('aria-label', title)\n    }\n\n    this._element.setAttribute('data-bs-original-title', title) // DO NOT USE IT. Is only for backwards compatibility\n    this._element.removeAttribute('title')\n  }\n\n  _enter() {\n    if (this._isShown() || this._isHovered) {\n      this._isHovered = true\n      return\n    }\n\n    this._isHovered = true\n\n    this._setTimeout(() => {\n      if (this._isHovered) {\n        this.show()\n      }\n    }, this._config.delay.show)\n  }\n\n  _leave() {\n    if (this._isWithActiveTrigger()) {\n      return\n    }\n\n    this._isHovered = false\n\n    this._setTimeout(() => {\n      if (!this._isHovered) {\n        this.hide()\n      }\n    }, this._config.delay.hide)\n  }\n\n  _setTimeout(handler, timeout) {\n    clearTimeout(this._timeout)\n    this._timeout = setTimeout(handler, timeout)\n  }\n\n  _isWithActiveTrigger() {\n    return Object.values(this._activeTrigger).includes(true)\n  }\n\n  _getConfig(config) {\n    const dataAttributes = Manipulator.getDataAttributes(this._element)\n\n    for (const dataAttribute of Object.keys(dataAttributes)) {\n      if (DISALLOWED_ATTRIBUTES.has(dataAttribute)) {\n        delete dataAttributes[dataAttribute]\n      }\n    }\n\n    config = {\n      ...dataAttributes,\n      ...(typeof config === 'object' && config ? config : {})\n    }\n    config = this._mergeConfigObj(config)\n    config = this._configAfterMerge(config)\n    this._typeCheckConfig(config)\n    return config\n  }\n\n  _configAfterMerge(config) {\n    config.container = config.container === false ? document.body : getElement(config.container)\n\n    if (typeof config.delay === 'number') {\n      config.delay = {\n        show: config.delay,\n        hide: config.delay\n      }\n    }\n\n    if (typeof config.title === 'number') {\n      config.title = config.title.toString()\n    }\n\n    if (typeof config.content === 'number') {\n      config.content = config.content.toString()\n    }\n\n    return config\n  }\n\n  _getDelegateConfig() {\n    const config = {}\n\n    for (const [key, value] of Object.entries(this._config)) {\n      if (this.constructor.Default[key] !== value) {\n        config[key] = value\n      }\n    }\n\n    config.selector = false\n    config.trigger = 'manual'\n\n    // In the future can be replaced with:\n    // const keysWithDifferentValues = Object.entries(this._config).filter(entry => this.constructor.Default[entry[0]] !== this._config[entry[0]])\n    // `Object.fromEntries(keysWithDifferentValues)`\n    return config\n  }\n\n  _disposePopper() {\n    if (this._popper) {\n      this._popper.destroy()\n      this._popper = null\n    }\n\n    if (this.tip) {\n      this.tip.remove()\n      this.tip = null\n    }\n  }\n\n  // Static\n  static jQueryInterface(config) {\n    return this.each(function () {\n      const data = Tooltip.getOrCreateInstance(this, config)\n\n      if (typeof config !== 'string') {\n        return\n      }\n\n      if (typeof data[config] === 'undefined') {\n        throw new TypeError(`No method named \"${config}\"`)\n      }\n\n      data[config]()\n    })\n  }\n}\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Tooltip)\n\nexport default Tooltip\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap popover.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport Tooltip from './tooltip.js'\nimport { defineJQueryPlugin } from './util/index.js'\n\n/**\n * Constants\n */\n\nconst NAME = 'popover'\n\nconst SELECTOR_TITLE = '.popover-header'\nconst SELECTOR_CONTENT = '.popover-body'\n\nconst Default = {\n  ...Tooltip.Default,\n  content: '',\n  offset: [0, 8],\n  placement: 'right',\n  template: '<div class=\"popover\" role=\"tooltip\">' +\n    '<div class=\"popover-arrow\"></div>' +\n    '<h3 class=\"popover-header\"></h3>' +\n    '<div class=\"popover-body\"></div>' +\n    '</div>',\n  trigger: 'click'\n}\n\nconst DefaultType = {\n  ...Tooltip.DefaultType,\n  content: '(null|string|element|function)'\n}\n\n/**\n * Class definition\n */\n\nclass Popover extends Tooltip {\n  // Getters\n  static get Default() {\n    return Default\n  }\n\n  static get DefaultType() {\n    return DefaultType\n  }\n\n  static get NAME() {\n    return NAME\n  }\n\n  // Overrides\n  _isWithContent() {\n    return this._getTitle() || this._getContent()\n  }\n\n  // Private\n  _getContentForTemplate() {\n    return {\n      [SELECTOR_TITLE]: this._getTitle(),\n      [SELECTOR_CONTENT]: this._getContent()\n    }\n  }\n\n  _getContent() {\n    return this._resolvePossibleFunction(this._config.content)\n  }\n\n  // Static\n  static jQueryInterface(config) {\n    return this.each(function () {\n      const data = Popover.getOrCreateInstance(this, config)\n\n      if (typeof config !== 'string') {\n        return\n      }\n\n      if (typeof data[config] === 'undefined') {\n        throw new TypeError(`No method named \"${config}\"`)\n      }\n\n      data[config]()\n    })\n  }\n}\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Popover)\n\nexport default Popover\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap scrollspy.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport BaseComponent from './base-component.js'\nimport EventHandler from './dom/event-handler.js'\nimport SelectorEngine from './dom/selector-engine.js'\nimport { defineJQueryPlugin, getElement, isDisabled, isVisible } from './util/index.js'\n\n/**\n * Constants\n */\n\nconst NAME = 'scrollspy'\nconst DATA_KEY = 'bs.scrollspy'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst EVENT_ACTIVATE = `activate${EVENT_KEY}`\nconst EVENT_CLICK = `click${EVENT_KEY}`\nconst EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item'\nconst CLASS_NAME_ACTIVE = 'active'\n\nconst SELECTOR_DATA_SPY = '[data-bs-spy=\"scroll\"]'\nconst SELECTOR_TARGET_LINKS = '[href]'\nconst SELECTOR_NAV_LIST_GROUP = '.nav, .list-group'\nconst SELECTOR_NAV_LINKS = '.nav-link'\nconst SELECTOR_NAV_ITEMS = '.nav-item'\nconst SELECTOR_LIST_ITEMS = '.list-group-item'\nconst SELECTOR_LINK_ITEMS = `${SELECTOR_NAV_LINKS}, ${SELECTOR_NAV_ITEMS} > ${SELECTOR_NAV_LINKS}, ${SELECTOR_LIST_ITEMS}`\nconst SELECTOR_DROPDOWN = '.dropdown'\nconst SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle'\n\nconst Default = {\n  offset: null, // TODO: v6 @deprecated, keep it for backwards compatibility reasons\n  rootMargin: '0px 0px -25%',\n  smoothScroll: false,\n  target: null,\n  threshold: [0.1, 0.5, 1]\n}\n\nconst DefaultType = {\n  offset: '(number|null)', // TODO v6 @deprecated, keep it for backwards compatibility reasons\n  rootMargin: 'string',\n  smoothScroll: 'boolean',\n  target: 'element',\n  threshold: 'array'\n}\n\n/**\n * Class definition\n */\n\nclass ScrollSpy extends BaseComponent {\n  constructor(element, config) {\n    super(element, config)\n\n    // this._element is the observablesContainer and config.target the menu links wrapper\n    this._targetLinks = new Map()\n    this._observableSections = new Map()\n    this._rootElement = getComputedStyle(this._element).overflowY === 'visible' ? null : this._element\n    this._activeTarget = null\n    this._observer = null\n    this._previousScrollData = {\n      visibleEntryTop: 0,\n      parentScrollTop: 0\n    }\n    this.refresh() // initialize\n  }\n\n  // Getters\n  static get Default() {\n    return Default\n  }\n\n  static get DefaultType() {\n    return DefaultType\n  }\n\n  static get NAME() {\n    return NAME\n  }\n\n  // Public\n  refresh() {\n    this._initializeTargetsAndObservables()\n    this._maybeEnableSmoothScroll()\n\n    if (this._observer) {\n      this._observer.disconnect()\n    } else {\n      this._observer = this._getNewObserver()\n    }\n\n    for (const section of this._observableSections.values()) {\n      this._observer.observe(section)\n    }\n  }\n\n  dispose() {\n    this._observer.disconnect()\n    super.dispose()\n  }\n\n  // Private\n  _configAfterMerge(config) {\n    // TODO: on v6 target should be given explicitly & remove the {target: 'ss-target'} case\n    config.target = getElement(config.target) || document.body\n\n    // TODO: v6 Only for backwards compatibility reasons. Use rootMargin only\n    config.rootMargin = config.offset ? `${config.offset}px 0px -30%` : config.rootMargin\n\n    if (typeof config.threshold === 'string') {\n      config.threshold = config.threshold.split(',').map(value => Number.parseFloat(value))\n    }\n\n    return config\n  }\n\n  _maybeEnableSmoothScroll() {\n    if (!this._config.smoothScroll) {\n      return\n    }\n\n    // unregister any previous listeners\n    EventHandler.off(this._config.target, EVENT_CLICK)\n\n    EventHandler.on(this._config.target, EVENT_CLICK, SELECTOR_TARGET_LINKS, event => {\n      const observableSection = this._observableSections.get(event.target.hash)\n      if (observableSection) {\n        event.preventDefault()\n        const root = this._rootElement || window\n        const height = observableSection.offsetTop - this._element.offsetTop\n        if (root.scrollTo) {\n          root.scrollTo({ top: height, behavior: 'smooth' })\n          return\n        }\n\n        // Chrome 60 doesn't support `scrollTo`\n        root.scrollTop = height\n      }\n    })\n  }\n\n  _getNewObserver() {\n    const options = {\n      root: this._rootElement,\n      threshold: this._config.threshold,\n      rootMargin: this._config.rootMargin\n    }\n\n    return new IntersectionObserver(entries => this._observerCallback(entries), options)\n  }\n\n  // The logic of selection\n  _observerCallback(entries) {\n    const targetElement = entry => this._targetLinks.get(`#${entry.target.id}`)\n    const activate = entry => {\n      this._previousScrollData.visibleEntryTop = entry.target.offsetTop\n      this._process(targetElement(entry))\n    }\n\n    const parentScrollTop = (this._rootElement || document.documentElement).scrollTop\n    const userScrollsDown = parentScrollTop >= this._previousScrollData.parentScrollTop\n    this._previousScrollData.parentScrollTop = parentScrollTop\n\n    for (const entry of entries) {\n      if (!entry.isIntersecting) {\n        this._activeTarget = null\n        this._clearActiveClass(targetElement(entry))\n\n        continue\n      }\n\n      const entryIsLowerThanPrevious = entry.target.offsetTop >= this._previousScrollData.visibleEntryTop\n      // if we are scrolling down, pick the bigger offsetTop\n      if (userScrollsDown && entryIsLowerThanPrevious) {\n        activate(entry)\n        // if parent isn't scrolled, let's keep the first visible item, breaking the iteration\n        if (!parentScrollTop) {\n          return\n        }\n\n        continue\n      }\n\n      // if we are scrolling up, pick the smallest offsetTop\n      if (!userScrollsDown && !entryIsLowerThanPrevious) {\n        activate(entry)\n      }\n    }\n  }\n\n  _initializeTargetsAndObservables() {\n    this._targetLinks = new Map()\n    this._observableSections = new Map()\n\n    const targetLinks = SelectorEngine.find(SELECTOR_TARGET_LINKS, this._config.target)\n\n    for (const anchor of targetLinks) {\n      // ensure that the anchor has an id and is not disabled\n      if (!anchor.hash || isDisabled(anchor)) {\n        continue\n      }\n\n      const observableSection = SelectorEngine.findOne(decodeURI(anchor.hash), this._element)\n\n      // ensure that the observableSection exists & is visible\n      if (isVisible(observableSection)) {\n        this._targetLinks.set(decodeURI(anchor.hash), anchor)\n        this._observableSections.set(anchor.hash, observableSection)\n      }\n    }\n  }\n\n  _process(target) {\n    if (this._activeTarget === target) {\n      return\n    }\n\n    this._clearActiveClass(this._config.target)\n    this._activeTarget = target\n    target.classList.add(CLASS_NAME_ACTIVE)\n    this._activateParents(target)\n\n    EventHandler.trigger(this._element, EVENT_ACTIVATE, { relatedTarget: target })\n  }\n\n  _activateParents(target) {\n    // Activate dropdown parents\n    if (target.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) {\n      SelectorEngine.findOne(SELECTOR_DROPDOWN_TOGGLE, target.closest(SELECTOR_DROPDOWN))\n        .classList.add(CLASS_NAME_ACTIVE)\n      return\n    }\n\n    for (const listGroup of SelectorEngine.parents(target, SELECTOR_NAV_LIST_GROUP)) {\n      // Set triggered links parents as active\n      // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor\n      for (const item of SelectorEngine.prev(listGroup, SELECTOR_LINK_ITEMS)) {\n        item.classList.add(CLASS_NAME_ACTIVE)\n      }\n    }\n  }\n\n  _clearActiveClass(parent) {\n    parent.classList.remove(CLASS_NAME_ACTIVE)\n\n    const activeNodes = SelectorEngine.find(`${SELECTOR_TARGET_LINKS}.${CLASS_NAME_ACTIVE}`, parent)\n    for (const node of activeNodes) {\n      node.classList.remove(CLASS_NAME_ACTIVE)\n    }\n  }\n\n  // Static\n  static jQueryInterface(config) {\n    return this.each(function () {\n      const data = ScrollSpy.getOrCreateInstance(this, config)\n\n      if (typeof config !== 'string') {\n        return\n      }\n\n      if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {\n        throw new TypeError(`No method named \"${config}\"`)\n      }\n\n      data[config]()\n    })\n  }\n}\n\n/**\n * Data API implementation\n */\n\nEventHandler.on(window, EVENT_LOAD_DATA_API, () => {\n  for (const spy of SelectorEngine.find(SELECTOR_DATA_SPY)) {\n    ScrollSpy.getOrCreateInstance(spy)\n  }\n})\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(ScrollSpy)\n\nexport default ScrollSpy\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap tab.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport BaseComponent from './base-component.js'\nimport EventHandler from './dom/event-handler.js'\nimport SelectorEngine from './dom/selector-engine.js'\nimport { defineJQueryPlugin, getNextActiveElement, isDisabled } from './util/index.js'\n\n/**\n * Constants\n */\n\nconst NAME = 'tab'\nconst DATA_KEY = 'bs.tab'\nconst EVENT_KEY = `.${DATA_KEY}`\n\nconst EVENT_HIDE = `hide${EVENT_KEY}`\nconst EVENT_HIDDEN = `hidden${EVENT_KEY}`\nconst EVENT_SHOW = `show${EVENT_KEY}`\nconst EVENT_SHOWN = `shown${EVENT_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}`\nconst EVENT_KEYDOWN = `keydown${EVENT_KEY}`\nconst EVENT_LOAD_DATA_API = `load${EVENT_KEY}`\n\nconst ARROW_LEFT_KEY = 'ArrowLeft'\nconst ARROW_RIGHT_KEY = 'ArrowRight'\nconst ARROW_UP_KEY = 'ArrowUp'\nconst ARROW_DOWN_KEY = 'ArrowDown'\nconst HOME_KEY = 'Home'\nconst END_KEY = 'End'\n\nconst CLASS_NAME_ACTIVE = 'active'\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_SHOW = 'show'\nconst CLASS_DROPDOWN = 'dropdown'\n\nconst SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle'\nconst SELECTOR_DROPDOWN_MENU = '.dropdown-menu'\nconst NOT_SELECTOR_DROPDOWN_TOGGLE = `:not(${SELECTOR_DROPDOWN_TOGGLE})`\n\nconst SELECTOR_TAB_PANEL = '.list-group, .nav, [role=\"tablist\"]'\nconst SELECTOR_OUTER = '.nav-item, .list-group-item'\nconst SELECTOR_INNER = `.nav-link${NOT_SELECTOR_DROPDOWN_TOGGLE}, .list-group-item${NOT_SELECTOR_DROPDOWN_TOGGLE}, [role=\"tab\"]${NOT_SELECTOR_DROPDOWN_TOGGLE}`\nconst SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"tab\"], [data-bs-toggle=\"pill\"], [data-bs-toggle=\"list\"]' // TODO: could only be `tab` in v6\nconst SELECTOR_INNER_ELEM = `${SELECTOR_INNER}, ${SELECTOR_DATA_TOGGLE}`\n\nconst SELECTOR_DATA_TOGGLE_ACTIVE = `.${CLASS_NAME_ACTIVE}[data-bs-toggle=\"tab\"], .${CLASS_NAME_ACTIVE}[data-bs-toggle=\"pill\"], .${CLASS_NAME_ACTIVE}[data-bs-toggle=\"list\"]`\n\n/**\n * Class definition\n */\n\nclass Tab extends BaseComponent {\n  constructor(element) {\n    super(element)\n    this._parent = this._element.closest(SELECTOR_TAB_PANEL)\n\n    if (!this._parent) {\n      return\n      // TODO: should throw exception in v6\n      // throw new TypeError(`${element.outerHTML} has not a valid parent ${SELECTOR_INNER_ELEM}`)\n    }\n\n    // Set up initial aria attributes\n    this._setInitialAttributes(this._parent, this._getChildren())\n\n    EventHandler.on(this._element, EVENT_KEYDOWN, event => this._keydown(event))\n  }\n\n  // Getters\n  static get NAME() {\n    return NAME\n  }\n\n  // Public\n  show() { // Shows this elem and deactivate the active sibling if exists\n    const innerElem = this._element\n    if (this._elemIsActive(innerElem)) {\n      return\n    }\n\n    // Search for active tab on same parent to deactivate it\n    const active = this._getActiveElem()\n\n    const hideEvent = active ?\n      EventHandler.trigger(active, EVENT_HIDE, { relatedTarget: innerElem }) :\n      null\n\n    const showEvent = EventHandler.trigger(innerElem, EVENT_SHOW, { relatedTarget: active })\n\n    if (showEvent.defaultPrevented || (hideEvent && hideEvent.defaultPrevented)) {\n      return\n    }\n\n    this._deactivate(active, innerElem)\n    this._activate(innerElem, active)\n  }\n\n  // Private\n  _activate(element, relatedElem) {\n    if (!element) {\n      return\n    }\n\n    element.classList.add(CLASS_NAME_ACTIVE)\n\n    this._activate(SelectorEngine.getElementFromSelector(element)) // Search and activate/show the proper section\n\n    const complete = () => {\n      if (element.getAttribute('role') !== 'tab') {\n        element.classList.add(CLASS_NAME_SHOW)\n        return\n      }\n\n      element.removeAttribute('tabindex')\n      element.setAttribute('aria-selected', true)\n      this._toggleDropDown(element, true)\n      EventHandler.trigger(element, EVENT_SHOWN, {\n        relatedTarget: relatedElem\n      })\n    }\n\n    this._queueCallback(complete, element, element.classList.contains(CLASS_NAME_FADE))\n  }\n\n  _deactivate(element, relatedElem) {\n    if (!element) {\n      return\n    }\n\n    element.classList.remove(CLASS_NAME_ACTIVE)\n    element.blur()\n\n    this._deactivate(SelectorEngine.getElementFromSelector(element)) // Search and deactivate the shown section too\n\n    const complete = () => {\n      if (element.getAttribute('role') !== 'tab') {\n        element.classList.remove(CLASS_NAME_SHOW)\n        return\n      }\n\n      element.setAttribute('aria-selected', false)\n      element.setAttribute('tabindex', '-1')\n      this._toggleDropDown(element, false)\n      EventHandler.trigger(element, EVENT_HIDDEN, { relatedTarget: relatedElem })\n    }\n\n    this._queueCallback(complete, element, element.classList.contains(CLASS_NAME_FADE))\n  }\n\n  _keydown(event) {\n    if (!([ARROW_LEFT_KEY, ARROW_RIGHT_KEY, ARROW_UP_KEY, ARROW_DOWN_KEY, HOME_KEY, END_KEY].includes(event.key))) {\n      return\n    }\n\n    event.stopPropagation()// stopPropagation/preventDefault both added to support up/down keys without scrolling the page\n    event.preventDefault()\n\n    const children = this._getChildren().filter(element => !isDisabled(element))\n    let nextActiveElement\n\n    if ([HOME_KEY, END_KEY].includes(event.key)) {\n      nextActiveElement = children[event.key === HOME_KEY ? 0 : children.length - 1]\n    } else {\n      const isNext = [ARROW_RIGHT_KEY, ARROW_DOWN_KEY].includes(event.key)\n      nextActiveElement = getNextActiveElement(children, event.target, isNext, true)\n    }\n\n    if (nextActiveElement) {\n      nextActiveElement.focus({ preventScroll: true })\n      Tab.getOrCreateInstance(nextActiveElement).show()\n    }\n  }\n\n  _getChildren() { // collection of inner elements\n    return SelectorEngine.find(SELECTOR_INNER_ELEM, this._parent)\n  }\n\n  _getActiveElem() {\n    return this._getChildren().find(child => this._elemIsActive(child)) || null\n  }\n\n  _setInitialAttributes(parent, children) {\n    this._setAttributeIfNotExists(parent, 'role', 'tablist')\n\n    for (const child of children) {\n      this._setInitialAttributesOnChild(child)\n    }\n  }\n\n  _setInitialAttributesOnChild(child) {\n    child = this._getInnerElement(child)\n    const isActive = this._elemIsActive(child)\n    const outerElem = this._getOuterElement(child)\n    child.setAttribute('aria-selected', isActive)\n\n    if (outerElem !== child) {\n      this._setAttributeIfNotExists(outerElem, 'role', 'presentation')\n    }\n\n    if (!isActive) {\n      child.setAttribute('tabindex', '-1')\n    }\n\n    this._setAttributeIfNotExists(child, 'role', 'tab')\n\n    // set attributes to the related panel too\n    this._setInitialAttributesOnTargetPanel(child)\n  }\n\n  _setInitialAttributesOnTargetPanel(child) {\n    const target = SelectorEngine.getElementFromSelector(child)\n\n    if (!target) {\n      return\n    }\n\n    this._setAttributeIfNotExists(target, 'role', 'tabpanel')\n\n    if (child.id) {\n      this._setAttributeIfNotExists(target, 'aria-labelledby', `${child.id}`)\n    }\n  }\n\n  _toggleDropDown(element, open) {\n    const outerElem = this._getOuterElement(element)\n    if (!outerElem.classList.contains(CLASS_DROPDOWN)) {\n      return\n    }\n\n    const toggle = (selector, className) => {\n      const element = SelectorEngine.findOne(selector, outerElem)\n      if (element) {\n        element.classList.toggle(className, open)\n      }\n    }\n\n    toggle(SELECTOR_DROPDOWN_TOGGLE, CLASS_NAME_ACTIVE)\n    toggle(SELECTOR_DROPDOWN_MENU, CLASS_NAME_SHOW)\n    outerElem.setAttribute('aria-expanded', open)\n  }\n\n  _setAttributeIfNotExists(element, attribute, value) {\n    if (!element.hasAttribute(attribute)) {\n      element.setAttribute(attribute, value)\n    }\n  }\n\n  _elemIsActive(elem) {\n    return elem.classList.contains(CLASS_NAME_ACTIVE)\n  }\n\n  // Try to get the inner element (usually the .nav-link)\n  _getInnerElement(elem) {\n    return elem.matches(SELECTOR_INNER_ELEM) ? elem : SelectorEngine.findOne(SELECTOR_INNER_ELEM, elem)\n  }\n\n  // Try to get the outer element (usually the .nav-item)\n  _getOuterElement(elem) {\n    return elem.closest(SELECTOR_OUTER) || elem\n  }\n\n  // Static\n  static jQueryInterface(config) {\n    return this.each(function () {\n      const data = Tab.getOrCreateInstance(this)\n\n      if (typeof config !== 'string') {\n        return\n      }\n\n      if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {\n        throw new TypeError(`No method named \"${config}\"`)\n      }\n\n      data[config]()\n    })\n  }\n}\n\n/**\n * Data API implementation\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {\n  if (['A', 'AREA'].includes(this.tagName)) {\n    event.preventDefault()\n  }\n\n  if (isDisabled(this)) {\n    return\n  }\n\n  Tab.getOrCreateInstance(this).show()\n})\n\n/**\n * Initialize on focus\n */\nEventHandler.on(window, EVENT_LOAD_DATA_API, () => {\n  for (const element of SelectorEngine.find(SELECTOR_DATA_TOGGLE_ACTIVE)) {\n    Tab.getOrCreateInstance(element)\n  }\n})\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Tab)\n\nexport default Tab\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap toast.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport BaseComponent from './base-component.js'\nimport EventHandler from './dom/event-handler.js'\nimport { enableDismissTrigger } from './util/component-functions.js'\nimport { defineJQueryPlugin, reflow } from './util/index.js'\n\n/**\n * Constants\n */\n\nconst NAME = 'toast'\nconst DATA_KEY = 'bs.toast'\nconst EVENT_KEY = `.${DATA_KEY}`\n\nconst EVENT_MOUSEOVER = `mouseover${EVENT_KEY}`\nconst EVENT_MOUSEOUT = `mouseout${EVENT_KEY}`\nconst EVENT_FOCUSIN = `focusin${EVENT_KEY}`\nconst EVENT_FOCUSOUT = `focusout${EVENT_KEY}`\nconst EVENT_HIDE = `hide${EVENT_KEY}`\nconst EVENT_HIDDEN = `hidden${EVENT_KEY}`\nconst EVENT_SHOW = `show${EVENT_KEY}`\nconst EVENT_SHOWN = `shown${EVENT_KEY}`\n\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_HIDE = 'hide' // @deprecated - kept here only for backwards compatibility\nconst CLASS_NAME_SHOW = 'show'\nconst CLASS_NAME_SHOWING = 'showing'\n\nconst DefaultType = {\n  animation: 'boolean',\n  autohide: 'boolean',\n  delay: 'number'\n}\n\nconst Default = {\n  animation: true,\n  autohide: true,\n  delay: 5000\n}\n\n/**\n * Class definition\n */\n\nclass Toast extends BaseComponent {\n  constructor(element, config) {\n    super(element, config)\n\n    this._timeout = null\n    this._hasMouseInteraction = false\n    this._hasKeyboardInteraction = false\n    this._setListeners()\n  }\n\n  // Getters\n  static get Default() {\n    return Default\n  }\n\n  static get DefaultType() {\n    return DefaultType\n  }\n\n  static get NAME() {\n    return NAME\n  }\n\n  // Public\n  show() {\n    const showEvent = EventHandler.trigger(this._element, EVENT_SHOW)\n\n    if (showEvent.defaultPrevented) {\n      return\n    }\n\n    this._clearTimeout()\n\n    if (this._config.animation) {\n      this._element.classList.add(CLASS_NAME_FADE)\n    }\n\n    const complete = () => {\n      this._element.classList.remove(CLASS_NAME_SHOWING)\n      EventHandler.trigger(this._element, EVENT_SHOWN)\n\n      this._maybeScheduleHide()\n    }\n\n    this._element.classList.remove(CLASS_NAME_HIDE) // @deprecated\n    reflow(this._element)\n    this._element.classList.add(CLASS_NAME_SHOW, CLASS_NAME_SHOWING)\n\n    this._queueCallback(complete, this._element, this._config.animation)\n  }\n\n  hide() {\n    if (!this.isShown()) {\n      return\n    }\n\n    const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE)\n\n    if (hideEvent.defaultPrevented) {\n      return\n    }\n\n    const complete = () => {\n      this._element.classList.add(CLASS_NAME_HIDE) // @deprecated\n      this._element.classList.remove(CLASS_NAME_SHOWING, CLASS_NAME_SHOW)\n      EventHandler.trigger(this._element, EVENT_HIDDEN)\n    }\n\n    this._element.classList.add(CLASS_NAME_SHOWING)\n    this._queueCallback(complete, this._element, this._config.animation)\n  }\n\n  dispose() {\n    this._clearTimeout()\n\n    if (this.isShown()) {\n      this._element.classList.remove(CLASS_NAME_SHOW)\n    }\n\n    super.dispose()\n  }\n\n  isShown() {\n    return this._element.classList.contains(CLASS_NAME_SHOW)\n  }\n\n  // Private\n\n  _maybeScheduleHide() {\n    if (!this._config.autohide) {\n      return\n    }\n\n    if (this._hasMouseInteraction || this._hasKeyboardInteraction) {\n      return\n    }\n\n    this._timeout = setTimeout(() => {\n      this.hide()\n    }, this._config.delay)\n  }\n\n  _onInteraction(event, isInteracting) {\n    switch (event.type) {\n      case 'mouseover':\n      case 'mouseout': {\n        this._hasMouseInteraction = isInteracting\n        break\n      }\n\n      case 'focusin':\n      case 'focusout': {\n        this._hasKeyboardInteraction = isInteracting\n        break\n      }\n\n      default: {\n        break\n      }\n    }\n\n    if (isInteracting) {\n      this._clearTimeout()\n      return\n    }\n\n    const nextElement = event.relatedTarget\n    if (this._element === nextElement || this._element.contains(nextElement)) {\n      return\n    }\n\n    this._maybeScheduleHide()\n  }\n\n  _setListeners() {\n    EventHandler.on(this._element, EVENT_MOUSEOVER, event => this._onInteraction(event, true))\n    EventHandler.on(this._element, EVENT_MOUSEOUT, event => this._onInteraction(event, false))\n    EventHandler.on(this._element, EVENT_FOCUSIN, event => this._onInteraction(event, true))\n    EventHandler.on(this._element, EVENT_FOCUSOUT, event => this._onInteraction(event, false))\n  }\n\n  _clearTimeout() {\n    clearTimeout(this._timeout)\n    this._timeout = null\n  }\n\n  // Static\n  static jQueryInterface(config) {\n    return this.each(function () {\n      const data = Toast.getOrCreateInstance(this, config)\n\n      if (typeof config === 'string') {\n        if (typeof data[config] === 'undefined') {\n          throw new TypeError(`No method named \"${config}\"`)\n        }\n\n        data[config](this)\n      }\n    })\n  }\n}\n\n/**\n * Data API implementation\n */\n\nenableDismissTrigger(Toast)\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Toast)\n\nexport default Toast\n"],
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAO;AAAP;AAAA;AAAA,MAAO,mBAAQ;AAAA,QACb,QAAQ,KAAK;AAAA,QACb,WAAW,KAAK;AAAA,MAClB;AAAA;AAAA;;;ACHA,MAcO;AAdP;AAAA;AAAA;AAcA,MAAO,iBAAQ;AAAA,QACb,OAAO,UAAU;AACf,cAAI,KAAK,SAAS;AAChB,qBAAS,KAAK,KAAK,IAAI,CAAC;AACxB,6BAAS,OAAO,IAAI,iBAAiB,GAAG,QAAQ;AAAA,UAClD;AAAA,QACF;AAAA,MACF;AAAA;AAAA;;;ACrBA,MAKM,KAEA,cAEA,mBAmHC;AA5HP;AAAA;AAAA;AAKA,MAAM,MAAM,OAAM,oBAAI,KAAK,GAAE,QAAQ;AAErC,MAAM,eAAe,WAAS,IAAI,IAAI,QAAQ;AAE9C,MAAM,oBAAN,MAAwB;AAAA,QACtB,YAAY,YAAY;AACtB,eAAK,sBAAsB,KAAK,oBAAoB,KAAK,IAAI;AAC7D,eAAK,aAAa;AAClB,eAAK,oBAAoB;AAAA,QAC3B;AAAA,QAEA,QAAQ;AACN,cAAI,CAAC,KAAK,UAAU,GAAG;AACrB,iBAAK,YAAY,IAAI;AACrB,mBAAO,KAAK;AACZ,iBAAK,aAAa;AAClB,6BAAiB,oBAAoB,KAAK,mBAAmB;AAC7D,2BAAO,IAAI,gDAAgD,KAAK,YAAY,cAAc,I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,EAAE,IAAI;QACnB;MACF,CAAC;IACH;EACF;AAMAsD,uBAAqBqkB,KAAK;AAM1BjwB,qBAAmBiwB,KAAK;;;AlFvNxB,SAAO,IAAI,OAAO,SAAS,cAAAQ;AAM3B;AAEE,WAAS,iBAAiB,cAAc,WAAW;AACjD,QAAI,qBAAqB,CAAC,EAAE,MAAM,KAAK,SAAS,iBAAiB,4BAA4B,CAAC;AAC9F,uBAAmB,IAAI,SAAU,kBAAkB;AACjD,aAAO,IAAc,QAAQ,kBAAkB;AAAA,QAC7C,WAAW;AAAA,MACb,CAAC;AAAA,IACH,CAAC;AAAA,EACH,CAAC;AAIH,IAAE,QAAQ,EAAE,GAAG,cAAc,MAAM;AAEjC,QAAI,MAAM,OAAO;AACjB,QAAI,UAAU,EAAE,iBAAiB,EAAE,OAAO,WAAW;AACnD,aAAO,KAAK,SAAS,OAAO,IAAI,KAAK,QAAQ,KAAK,IAAI,MAAM;AAAA,IAC9D,CAAC,EAAE,OAAO,EAAE,SAAS,QAAQ,EAAE,OAAO,EAAE,SAAS,MAAM,EAAE,OAAO;AAChE,QAAI,QAAQ,GAAG,IAAI,GAAG;AACpB,cAAQ,SAAS,QAAQ;AAAA,IAC3B;AAAA,EACF,CAAC;AAIC,SAAO,iBAAiB,UAAU,WAAU;AAC1C,QAAI,SAAS,SAAS,cAAc,gBAAgB;AACpD,WAAO,UAAU,OAAO,UAAU,OAAO,UAAU,GAAG;AAAA,EACxD,CAAC;",
  "names": ["consumer", "error", "consumer", "consumer", "subscription", "clone", "type", "value", "noop", "fn", "all", "binder", "r", "sort", "copy", "isDuplicated", "name", "eq", "adt", "count", "match", "get", "set", "error", "uuid", "min", "max", "nu", "left", "values", "clear", "on", "start", "end", "throttle", "index", "indexOf", "os", "browser", "userAgent", "mediaMatch", "isTouch", "isTablet", "isPhone", "browsers", "version", "oses", "deviceType", "map", "o", "path", "html", "text", "range", "dom", "contains", "toArray", "isRoot", "stop", "lastChild", "isShadowRoot", "filter", "sibling", "parent", "children", "owner", "css", "reflow", "getOuter", "top", "translate", "body", "scrollLeft", "viewport", "isSafari", "is", "getOption", "ancestor", "descend", "child", "selector", "closest$1", "offset", "resolve", "shallow", "isHTMLElement", "hasAttribute", "node", "reset", "isBlock", "parentBlock", "scope", "parents", "elm", "prev", "next", "lookup", "matches", "add", "from", "to", "option", "customElements", "validChildren", "setup", "isValid", "isInline", "rgbaColour", "self", "right", "bottom", "decode", "str", "data", "getContext", "deep", "getStyle", "getRect", "getParents", "select", "context", "setAttribs", "create", "parentElm", "createFragment", "remove", "e", "head", "toggleClass", "hasClass", "hide", "uniqueId", "insertAfter", "reference", "nextSibling", "isEmpty", "isContent", "split", "bind", "unbind", "dispatch", "isEditable", "destroy", "toString", "closest", "uid", "descendants$1", "descendant", "registry", "removeDirectAnnotation", "register", "isBoundary", "walk", "process", "before", "container", "getClientRects", "isVisible", "isEqual", "getNode", "firstChild", "trim", "point", "after", "SimpleResultType", "fallback", "partition", "field", "hasFocus", "reposition", "isTarget", "leanRight", "location", "cell", "action", "siblings", "isSpan", "now", "editor", "isImage", "isMedia", "cells", "width", "height", "handle", "split$1", "normalize", "find", "last", "isNamedAnchor", "indent", "empty", "validate", "removeNode", "pos", "moveCaret", "isInlineTarget", "moveSelection", "table", "tableSelection", "emptyBlock", "first", "createMarker", "nodeIndex", "applyStyles", "listItems", "prevSibling", "unwrap", "hasFormat", "shouldSandboxIframes", "freeze", "seal", "apply", "construct", "getGlobal", "_createTrustedTypesPolicy", "_createHooksMap", "_resolveSetOption", "window", "document", "HTMLTemplateElement", "Node", "Element", "NodeFilter", "DOMParser", "getChildNodes", "getParentNode", "getShadowRoot", "getNodeName", "_assertNotInTrustedTypesPolicy", "_createTrustedHTML", "_createTrustedScriptURL", "_getDefaultTrustedTypesPolicy", "createDocumentFragment", "importNode", "isRegexOrFunction", "_parseConfig", "_checkSvgNamespace", "_checkMathMlNamespace", "_checkHtmlNamespace", "_checkValidNamespace", "_forceRemove", "_neutralizeRoot", "_removeAttribute", "_stripDisallowedAttributes", "_neutralizeSubtree", "_neutralizePatchLinkage", "_initDocument", "_createNodeIterator", "_stripTemplateExpressions", "_isClobbered", "_isDocumentFragment", "_isNode", "hooks", "_isUnsafeNode", "_sanitizeDisallowedNode", "_sanitizeElements", "_isValidAttribute", "_isBasicCustomElement", "_applyTrustedTypesToAttribute", "_setAttributeValue", "_sanitizeAttributes", "_sanitizeAttachedShadowRoots", "isElement", "i", "purify", "preprocess", "addNodeFilter", "isInlineElement", "addRootBlocks", "exports", "fireEvent", "content", "plugins", "removedOptions", "removedPlugins", "deprecatedOptions", "deprecatedPlugins", "isContentEditable", "merge", "rng", "parentNode", "formatList", "format", "isZwsp$1", "hasContentEditableState", "start2", "end2", "script", "diff", "trimZwsp", "write", "cls", "init", "collapse", "getContent", "setContent", "getStart$1", "getBookmark", "moveToBookmark", "getNode$1", "normRng", "placeCaretAt", "getBoundingClientRect", "isBr", "x", "has", "registerEvents", "PluginManager", "confirm", "console", "isDisabled", "findAll", "cache", "openNotification", "search", "get$2", "ancestors", "parseSelector", "getComputedStyle", "formats", "firstElement", "lists", "isSelected", "entries", "cast", "textBlocks", "contains$1", "blockBoundary", "blockPosition", "blockPos", "el", "deleteRange", "deleteAction", "read", "getElement", "fromLocation", "BreakType", "flip", "VDirection", "caretPosition", "forward", "insertBlock", "nextPosition", "execute", "newIndex", "universe", "effect", "getPositionsUntil", "isFirefox", "api", "isTextBlock", "createNewBlock", "newBlock", "getAction", "currentNode", "preProcess", "postProcess", "FakeCaretPosition", "prevScope", "state", "drop", "elementSelectionAttr", "showCaret", "showBlockCaretContainer", "isPasteBin", "spot", "stripPattern", "findPattern", "event", "each", "DELETE", "setEditorCommandState", "selection", "focusBody", "applyAttributes", "normalizeSelection", "autoFocus", "focusEditor", "loadIcons", "render", "initEditor", "hash", "userId", "store", "keys", "sectionResult", "defaults", "defaultOptions", "toggleFormat", "font", "command", "nativeEvents", "prepend", "extra", "editors", "pattern", "extend", "DOM", "preInit", "options", "round", "tinymce", "type", "value", "noop", "fn", "all", "binder", "r", "copy", "name", "key", "adt", "get", "set", "sort", "keys", "error", "css", "resolve", "left", "clear", "on", "start", "end", "throttle", "rows", "columns", "row", "cells", "section", "index", "before", "after", "cell", "grid", "cloneRow", "range", "selection", "base", "contains", "is", "userAgent", "mediaMatch", "find", "browsers", "version", "oses", "isHTMLElement", "isElement", "isShadowRoot", "filter", "parent", "children", "clone", "nu", "styles", "getOuter", "max", "fallback", "width", "top", "translate", "body", "viewport", "getOption", "read", "ancestor", "child", "closest$1", "selector", "closest", "indexOf", "offset", "relative", "resizeTable", "table", "isHeaderCells", "detail", "col", "total", "getWidth", "columns$1", "getHeight", "rows$1", "zero", "sync", "first", "colgroup", "extract", "resize", "main", "add", "unmerge", "merge", "isResizable", "values", "scan", "document", "isEmptyTag", "universe", "right", "head", "prune", "path", "isBr", "parents", "last", "mutate", "bounds", "mergable", "unmergable", "Event", "bind", "unbind", "update", "off", "drop", "sink", "go", "destroy", "create", "hide", "option", "getIsRoot", "ephemera", "Response", "getStart", "moved", "getRect", "exact", "selectNode", "scrollBy", "isTable", "height", "editor", "cloneFormats", "getTableSectionType", "execute", "effect", "getRows", "getAction", "dragStart", "_e", "lastTarget", "location", "refresh", "show", "t", "type", "value", "noop", "f", "b", "fn", "all", "binder", "thunk", "indexOf", "r", "sort", "name", "adt", "label", "get", "set", "map", "data", "run", "bind", "cache", "output", "error", "optional", "mapError", "min", "max", "prefix", "nu", "left", "escape", "text", "parts", "values", "revoke", "clear", "on", "suffix", "start", "end", "throttle", "html", "win", "range", "rect", "is", "element", "dom", "base", "contains", "browser", "userAgent", "mediaMatch", "isTouch", "isTablet", "isPhone", "group", "browsers", "version", "oses", "query", "isHTMLElement", "stop", "index", "offset", "isShadowRoot", "filter", "sibling", "parent", "original", "owner", "clone", "image", "resolve", "destroy", "l", "css", "reflow", "getOffset", "getOuter", "properties", "isVisible", "top", "translate", "box", "body", "ancestor", "child", "is$1", "selector", "classes", "item", "closest$1", "transform", "closest", "relative", "anchor", "focus", "input", "width", "height", "path", "point", "position", "right", "bottom", "getOffsetParent", "offsetParent$1", "SimpleResultType", "extract", "toString", "fallback", "partition", "field", "keys", "schema", "EventConfiguration", "sequence", "required", "touch", "handlers", "FocusInsideModes", "valueThunk", "components", "replace", "part", "detail", "units", "config", "uids", "getClasses", "make", "placement", "boundsRestriction", "labelPrefix", "southeast", "southwest", "northeast", "northwest", "south", "north", "east", "west", "bounds$1", "bounds", "layout", "flip", "AttributeValue", "HighlightOnOpen", "can", "abort", "dispatch", "dispatchEvent", "active", "rest", "getConfig", "getEvents", "events", "init", "before", "after", "matches", "last", "getKeydownRules", "getKeyupRules", "rule", "toEvents", "focusIn", "findCurrent", "go", "execute", "move", "moveLeft", "moveRight", "newIndex", "first", "matrix", "children", "subs", "build", "hasFocus", "replacer", "write", "read", "behaviours", "order", "getBusySpec", "builder", "viewport", "offsetParent", "location", "isDocked", "change", "add", "xRange", "yRange", "fixed", "snap", "factory", "sketch", "reset", "lookup", "store", "maxX", "maxY", "reposition", "round", "parse", "layouts", "renderComponents", "getBounds", "contents", "toggleClass", "off", "enabled", "open", "hide", "show", "getOpt", "stopper", "cutter", "pointerEvents", "unbind", "eventHandler", "findHandler", "find", "register", "remove", "events$1", "Button", "menu", "primary", "expand", "refresh", "getMenus", "setup", "ExpandHighlightDecision", "onRight", "onLeft", "repositionMenus", "getAnchor", "primaryMenu", "Dropdown", "record", "setGroups", "button", "option", "select", "setContent", "handle", "title", "setValueFrom", "edge", "step", "snapStart", "rounded", "setValue", "choose", "within", "overflow", "currentValue", "sandbox", "isDisabled", "isStickyToolbar", "freeze", "seal", "apply", "construct", "getGlobal", "_createTrustedTypesPolicy", "_createHooksMap", "_resolveSetOption", "window", "document", "HTMLTemplateElement", "Node", "Element", "NodeFilter", "DOMParser", "getParentNode", "getShadowRoot", "getNodeName", "_assertNotInTrustedTypesPolicy", "_createTrustedHTML", "_createTrustedScriptURL", "_getDefaultTrustedTypesPolicy", "createDocumentFragment", "isRegexOrFunction", "_parseConfig", "_checkSvgNamespace", "_checkMathMlNamespace", "_checkHtmlNamespace", "_checkValidNamespace", "_forceRemove", "_neutralizeRoot", "snapshot", "attribute", "_removeAttribute", "_stripDisallowedAttributes", "_neutralizeSubtree", "_neutralizePatchLinkage", "_initDocument", "_createNodeIterator", "_stripTemplateExpressions", "_isClobbered", "_isDocumentFragment", "_isNode", "hooks", "_isUnsafeNode", "_sanitizeDisallowedNode", "parentNode", "_sanitizeElements", "_isValidAttribute", "_isBasicCustomElement", "_applyTrustedTypesToAttribute", "_setAttributeValue", "_sanitizeAttributes", "_sanitizeAttachedShadowRoots", "isElement", "svg", "close", "anchorOverrides", "api", "ItemResponse", "placeholder", "isSeparator", "fetch", "getApi", "search", "icon", "renderIcon", "rgbaColour", "red", "hexColour", "handleEvent", "prune", "defaultCols", "custom", "onAction", "emitExecute", "render", "FocusMode", "menuHasIcons", "renderText", "onItemAction", "self", "renderTextField", "errorId", "spectrumPart", "thumbPart", "pattern", "iframe", "img", "getCompByName", "role", "listRole", "labelPart", "thumb", "renderHeader", "leaf", "toggle", "childrenVisible", "expandedIds", "action", "getAction", "url", "history", "initialData", "bubbleSize", "inline", "getData", "getSink", "attach", "types", "meta", "elm", "getBehaviours$2", "wrap", "isToggleButton", "View", "view", "exists", "toolbar", "toggleWithoutFocusing", "isOpen", "tooltip", "identifyButtons", "comp", "arrow", "getFetch", "backstage", "dataset", "onSetup", "Delimiter", "fontFamily", "customEvents", "oldStart", "oldEnd", "number", "res", "fallbackFormat", "editor", "getFormApi", "startNode", "detection", "snapTo", "parents", "ResizeTypes", "resize", "singleton", "platform", "partMenubar", "partToolbar", "partMultipleToolbar", "partPromotion", "promotionLink", "partSocket", "partSidebar", "partHeader", "partThrobber", "partViewWrapper", "isHidden", "hasGrown", "pClose", "setEnabled", "block", "unblock", "showTab", "dialog", "root", "confirm", "find", "is", "left", "start", "option", "elm", "require_plugin", "value", "noop", "contains", "get", "is", "left", "on", "start", "option", "rels", "anchorElm", "isElement", "assumeExternalTargets", "text", "end", "list", "title", "link", "parents", "openLink", "editor", "require_plugin", "type", "noop", "fn", "all", "contains", "find", "name", "key", "get", "set", "left", "start", "is", "isElement", "index", "isShadowRoot", "parent", "clone", "children", "css", "max", "size", "ancestor", "closest$1", "selector", "closest", "getNodeName", "cell", "rows", "columns", "cells", "table", "detail", "add", "document", "right", "universe", "child", "head", "end", "bounds", "last", "option", "ephemera", "rgbaColour", "api", "dom", "elm", "hasAdvancedRowTab", "hasAdvancedCellTab", "targets", "isDisabled", "require_plugin", "require_plugin", "contains", "sort", "get", "option", "keys", "version", "shortcuts", "plugins", "ownKeys", "r", "_objectSpread2", "_defineProperty", "_typeof", "o", "EVENT_RESIZE", "isNaN", "isPositiveNumber", "error", "toArray", "assign", "toggleClass", "listener", "dispatchEvent", "location", "end", "start", "offset", "render", "preview", "left", "top", "change", "right", "bottom", "check", "destroy", "getData", "setData", "Cropper", "clone", "read", "done", "window", "indexOf", "isFunction", "isWindow", "document", "toType", "version", "jQuery", "clone", "arr", "matches", "sort", "push", "documentElement", "expando", "rquickExpr", "escape", "find", "i", "tokenize", "cache", "fn", "node", "start", "dir", "hash", "elem", "self", "add", "index", "value", "deferred", "error", "Data", "data", "nodeName", "on", "name", "end", "length", "option", "max", "location", "val", "completed", "off", "offset", "top", "method", "type", "$", "HTMLElement", "FrameLoadingStyle", "location", "left", "right", "FetchMethod", "error", "FormSubmissionState", "FormEnctype", "cookie", "clone", "index", "option", "TimingMetric", "VisitState", "SystemStatusCode", "session", "visit", "PageStage", "element", "document", "createConsumer", "left", "right", "application", "error", "matches", "index", "fetch", "matches", "match", "oldValue", "index", "left", "right", "error", "constructor", "extend", "application", "element", "read", "write", "tinymce", "obj", "fn", "top", "left", "bottom", "right", "index", "extend", "$", "option", "defaults", "dispatchEvent", "rootEl", "cloneEl", "oldIndex", "newIndex", "oldDraggableIndex", "newDraggableIndex", "putSortable", "pluginEvent", "_detectDirection", "_dragElInRowColumn", "_detectNearestEmptySortable", "_prepareGroup", "dragEl", "_hideGhostForTarget", "_unhideGhostForTarget", "nearestEmptyInsertDetectEvent", "_checkOutsideTargetEl", "fn", "dragStartFn", "target", "after", "order", "el", "extend", "plugins", "drop", "autoScroll", "top", "bottom", "left", "right", "onSpill", "Cropper", "createPopper", "start", "start", "name", "style", "getComputedStyle", "getComputedStyle", "css", "window", "min", "max", "toPaddingObject", "popperOffsets", "min", "max", "offset", "effect", "popper", "getComputedStyle", "effect", "window", "hash", "getComputedStyle", "getComputedStyle", "clippingParents", "getComputedStyle", "reference", "start", "popperOffsets", "offset", "placements", "placement", "placements", "placement", "start", "_loop", "_i", "checks", "offset", "popperOffsets", "offset", "min", "max", "start", "sort", "fn", "merged", "defaultModifiers", "defaultOptions", "createPopper", "reference", "popper", "options", "index", "fn", "destroy", "state", "effect", "noopFn", "createPopper", "defaultModifiers", "createPopper", "elementMap", "Map", "set", "element", "key", "instance", "has", "instanceMap", "get", "size", "console", "error", "Array", "from", "keys", "remove", "delete", "MAX_UID", "MILLISECONDS_MULTIPLIER", "TRANSITION_END", "parseSelector", "selector", "window", "CSS", "escape", "replace", "match", "id", "toType", "object", "undefined", "Object", "prototype", "toString", "call", "toLowerCase", "getUID", "prefix", "Math", "floor", "random", "document", "getElementById", "getTransitionDurationFromElement", "transitionDuration", "transitionDelay", "getComputedStyle", "floatTransitionDuration", "Number", "parseFloat", "floatTransitionDelay", "split", "triggerTransitionEnd", "dispatchEvent", "Event", "isElement", "jquery", "nodeType", "getElement", "length", "querySelector", "isVisible", "getClientRects", "elementIsVisible", "getPropertyValue", "closedDetails", "closest", "summary", "parentNode", "isDisabled", "Node", "ELEMENT_NODE", "classList", "contains", "disabled", "hasAttribute", "getAttribute", "findShadowRoot", "documentElement", "attachShadow", "getRootNode", "root", "ShadowRoot", "noop", "reflow", "offsetHeight", "getjQuery", "jQuery", "body", "DOMContentLoadedCallbacks", "onDOMContentLoaded", "callback", "readyState", "addEventListener", "push", "isRTL", "dir", "defineJQueryPlugin", "plugin", "$", "name", "NAME", "JQUERY_NO_CONFLICT", "fn", "jQueryInterface", "Constructor", "noConflict", "execute", "possibleCallback", "args", "defaultValue", "executeAfterTransition", "transitionElement", "waitForTransition", "durationPadding", "emulatedDuration", "called", "handler", "target", "removeEventListener", "setTimeout", "getNextActiveElement", "list", "activeElement", "shouldGetNext", "isCycleAllowed", "listLength", "index", "indexOf", "max", "min", "namespaceRegex", "stripNameRegex", "stripUidRegex", "eventRegistry", "uidEvent", "customEvents", "mouseenter", "mouseleave", "nativeEvents", "Set", "makeEventUid", "uid", "getElementEvents", "bootstrapHandler", "event", "hydrateObj", "delegateTarget", "oneOff", "EventHandler", "off", "type", "apply", "bootstrapDelegationHandler", "domElements", "querySelectorAll", "domElement", "findHandler", "events", "callable", "delegationSelector", "values", "find", "normalizeParameters", "originalTypeEvent", "delegationFunction", "isDelegated", "typeEvent", "getTypeEvent", "addHandler", "wrapFunction", "relatedTarget", "handlers", "previousFunction", "removeHandler", "Boolean", "removeNamespacedHandlers", "namespace", "storeElementEvent", "handlerKey", "entries", "includes", "on", "one", "inNamespace", "isNamespace", "startsWith", "elementEvent", "slice", "keyHandlers", "trigger", "jQueryEvent", "bubbles", "nativeDispatch", "defaultPrevented", "isPropagationStopped", "isImmediatePropagationStopped", "isDefaultPrevented", "evt", "cancelable", "preventDefault", "obj", "meta", "value", "_unused", "defineProperty", "configurable", "normalizeData", "JSON", "parse", "decodeURIComponent", "normalizeDataKey", "chr", "Manipulator", "setDataAttribute", "setAttribute", "removeDataAttribute", "removeAttribute", "getDataAttributes", "attributes", "bsKeys", "dataset", "filter", "pureKey", "charAt", "getDataAttribute", "Config", "Default", "DefaultType", "Error", "_getConfig", "config", "_mergeConfigObj", "_configAfterMerge", "_typeCheckConfig", "jsonConfig", "constructor", "configTypes", "property", "expectedTypes", "valueType", "RegExp", "test", "TypeError", "toUpperCase", "VERSION", "BaseComponent", "_element", "_config", "Data", "DATA_KEY", "dispose", "EVENT_KEY", "propertyName", "getOwnPropertyNames", "_queueCallback", "isAnimated", "getInstance", "getOrCreateInstance", "eventName", "getSelector", "hrefAttribute", "trim", "SelectorEngine", "concat", "Element", "findOne", "children", "child", "matches", "parents", "ancestor", "prev", "previous", "previousElementSibling", "next", "nextElementSibling", "focusableChildren", "focusables", "map", "join", "el", "getSelectorFromElement", "getElementFromSelector", "getMultipleElementsFromSelector", "enableDismissTrigger", "component", "method", "clickEvent", "tagName", "EVENT_CLOSE", "EVENT_CLOSED", "CLASS_NAME_FADE", "CLASS_NAME_SHOW", "Alert", "close", "closeEvent", "_destroyElement", "each", "data", "DATA_API_KEY", "CLASS_NAME_ACTIVE", "SELECTOR_DATA_TOGGLE", "EVENT_CLICK_DATA_API", "Button", "toggle", "button", "EVENT_TOUCHSTART", "EVENT_TOUCHMOVE", "EVENT_TOUCHEND", "EVENT_POINTERDOWN", "EVENT_POINTERUP", "POINTER_TYPE_TOUCH", "POINTER_TYPE_PEN", "CLASS_NAME_POINTER_EVENT", "SWIPE_THRESHOLD", "endCallback", "leftCallback", "rightCallback", "Swipe", "isSupported", "_deltaX", "_supportPointerEvents", "PointerEvent", "_initEvents", "_start", "touches", "clientX", "_eventIsPointerPenTouch", "_end", "_handleSwipe", "_move", "absDeltaX", "abs", "direction", "add", "pointerType", "navigator", "maxTouchPoints", "ARROW_LEFT_KEY", "ARROW_RIGHT_KEY", "TOUCHEVENT_COMPAT_WAIT", "ORDER_NEXT", "ORDER_PREV", "DIRECTION_LEFT", "DIRECTION_RIGHT", "EVENT_SLIDE", "EVENT_SLID", "EVENT_KEYDOWN", "EVENT_MOUSEENTER", "EVENT_MOUSELEAVE", "EVENT_DRAG_START", "EVENT_LOAD_DATA_API", "CLASS_NAME_CAROUSEL", "CLASS_NAME_SLIDE", "CLASS_NAME_END", "CLASS_NAME_START", "CLASS_NAME_NEXT", "CLASS_NAME_PREV", "SELECTOR_ACTIVE", "SELECTOR_ITEM", "SELECTOR_ACTIVE_ITEM", "SELECTOR_ITEM_IMG", "SELECTOR_INDICATORS", "SELECTOR_DATA_SLIDE", "SELECTOR_DATA_RIDE", "KEY_TO_DIRECTION", "interval", "keyboard", "pause", "ride", "touch", "wrap", "Carousel", "_interval", "_activeElement", "_isSliding", "touchTimeout", "_swipeHelper", "_indicatorsElement", "_addEventListeners", "cycle", "_slide", "nextWhenVisible", "hidden", "_clearInterval", "_updateInterval", "setInterval", "_maybeEnableCycle", "to", "items", "_getItems", "activeIndex", "_getItemIndex", "_getActive", "order", "defaultInterval", "_keydown", "_addTouchEventListeners", "img", "endCallBack", "clearTimeout", "swipeConfig", "_directionToOrder", "_setActiveIndicatorElement", "activeIndicator", "newActiveIndicator", "elementInterval", "parseInt", "isNext", "nextElement", "nextElementIndex", "triggerEvent", "_orderToDirection", "slideEvent", "isCycling", "directionalClassName", "orderClassName", "completeCallBack", "_isAnimated", "clearInterval", "carousel", "slideIndex", "carousels", "EVENT_SHOW", "EVENT_SHOWN", "EVENT_HIDE", "EVENT_HIDDEN", "CLASS_NAME_COLLAPSE", "CLASS_NAME_COLLAPSING", "CLASS_NAME_COLLAPSED", "CLASS_NAME_DEEPER_CHILDREN", "CLASS_NAME_HORIZONTAL", "WIDTH", "HEIGHT", "SELECTOR_ACTIVES", "parent", "Collapse", "_isTransitioning", "_triggerArray", "toggleList", "elem", "filterElement", "foundElement", "_initializeChildren", "_addAriaAndCollapsedClass", "_isShown", "hide", "show", "activeChildren", "_getFirstLevelChildren", "startEvent", "activeInstance", "dimension", "_getDimension", "style", "complete", "capitalizedDimension", "scrollSize", "getBoundingClientRect", "selected", "triggerArray", "isOpen", "ESCAPE_KEY", "TAB_KEY", "ARROW_UP_KEY", "ARROW_DOWN_KEY", "RIGHT_MOUSE_BUTTON", "EVENT_KEYDOWN_DATA_API", "EVENT_KEYUP_DATA_API", "CLASS_NAME_DROPUP", "CLASS_NAME_DROPEND", "CLASS_NAME_DROPSTART", "CLASS_NAME_DROPUP_CENTER", "CLASS_NAME_DROPDOWN_CENTER", "SELECTOR_DATA_TOGGLE_SHOWN", "SELECTOR_MENU", "SELECTOR_NAVBAR", "SELECTOR_NAVBAR_NAV", "SELECTOR_VISIBLE_ITEMS", "PLACEMENT_TOP", "PLACEMENT_TOPEND", "PLACEMENT_BOTTOM", "PLACEMENT_BOTTOMEND", "PLACEMENT_RIGHT", "PLACEMENT_LEFT", "PLACEMENT_TOPCENTER", "PLACEMENT_BOTTOMCENTER", "autoClose", "boundary", "display", "offset", "popperConfig", "reference", "Dropdown", "_popper", "_parent", "_menu", "_inNavbar", "_detectNavbar", "showEvent", "_createPopper", "focus", "_completeHide", "destroy", "update", "hideEvent", "Popper", "referenceElement", "_getPopperConfig", "createPopper", "_getPlacement", "parentDropdown", "isEnd", "_getOffset", "popperData", "defaultBsPopperConfig", "placement", "modifiers", "options", "enabled", "_selectMenuItem", "clearMenus", "openToggles", "context", "composedPath", "isMenuTarget", "dataApiKeydownHandler", "isInput", "isEscapeEvent", "isUpOrDownEvent", "getToggleButton", "stopPropagation", "EVENT_MOUSEDOWN", "className", "clickCallback", "rootElement", "Backdrop", "_isAppended", "_append", "_getElement", "_emulateAnimation", "backdrop", "createElement", "append", "EVENT_FOCUSIN", "EVENT_KEYDOWN_TAB", "TAB_NAV_FORWARD", "TAB_NAV_BACKWARD", "autofocus", "trapElement", "FocusTrap", "_isActive", "_lastTabNavDirection", "activate", "_handleFocusin", "_handleKeydown", "deactivate", "elements", "shiftKey", "SELECTOR_FIXED_CONTENT", "SELECTOR_STICKY_CONTENT", "PROPERTY_PADDING", "PROPERTY_MARGIN", "ScrollBarHelper", "getWidth", "documentWidth", "clientWidth", "innerWidth", "width", "_disableOverFlow", "_setElementAttributes", "calculatedValue", "reset", "_resetElementAttributes", "isOverflowing", "_saveInitialAttribute", "overflow", "styleProperty", "scrollbarWidth", "manipulationCallBack", "setProperty", "_applyManipulationCallback", "actualValue", "removeProperty", "callBack", "sel", "EVENT_HIDE_PREVENTED", "EVENT_RESIZE", "EVENT_CLICK_DISMISS", "EVENT_MOUSEDOWN_DISMISS", "EVENT_KEYDOWN_DISMISS", "CLASS_NAME_OPEN", "CLASS_NAME_STATIC", "OPEN_SELECTOR", "SELECTOR_DIALOG", "SELECTOR_MODAL_BODY", "Modal", "_dialog", "_backdrop", "_initializeBackDrop", "_focustrap", "_initializeFocusTrap", "_scrollBar", "_adjustDialog", "_showElement", "_hideModal", "handleUpdate", "scrollTop", "modalBody", "transitionComplete", "_triggerBackdropTransition", "event2", "_resetAdjustments", "isModalOverflowing", "scrollHeight", "clientHeight", "initialOverflowY", "overflowY", "isBodyOverflowing", "paddingLeft", "paddingRight", "alreadyOpen", "CLASS_NAME_SHOWING", "CLASS_NAME_HIDING", "CLASS_NAME_BACKDROP", "scroll", "Offcanvas", "blur", "completeCallback", "position", "ARIA_ATTRIBUTE_PATTERN", "DefaultAllowlist", "a", "area", "b", "br", "col", "code", "div", "em", "hr", "h1", "h2", "h3", "h4", "h5", "h6", "i", "li", "ol", "p", "pre", "s", "small", "span", "sub", "sup", "strong", "u", "ul", "uriAttributes", "SAFE_URL_PATTERN", "allowedAttribute", "attribute", "allowedAttributeList", "attributeName", "nodeName", "nodeValue", "attributeRegex", "some", "regex", "sanitizeHtml", "unsafeHtml", "allowList", "sanitizeFunction", "domParser", "DOMParser", "createdDocument", "parseFromString", "elementName", "attributeList", "allowedAttributes", "innerHTML", "content", "extraClass", "html", "sanitize", "sanitizeFn", "template", "DefaultContentType", "entry", "TemplateFactory", "getContent", "_resolvePossibleFunction", "hasContent", "changeContent", "_checkContent", "toHtml", "templateWrapper", "_maybeSanitize", "text", "_setContent", "arg", "templateElement", "_putElementInTemplate", "textContent", "DISALLOWED_ATTRIBUTES", "CLASS_NAME_MODAL", "SELECTOR_TOOLTIP_INNER", "SELECTOR_MODAL", "EVENT_MODAL_HIDE", "TRIGGER_HOVER", "TRIGGER_FOCUS", "TRIGGER_CLICK", "TRIGGER_MANUAL", "EVENT_INSERTED", "EVENT_CLICK", "EVENT_FOCUSOUT", "AttachmentMap", "AUTO", "TOP", "RIGHT", "BOTTOM", "LEFT", "animation", "container", "customClass", "delay", "fallbackPlacements", "title", "Tooltip", "_isEnabled", "_timeout", "_isHovered", "_activeTrigger", "_templateFactory", "_newContent", "tip", "_setListeners", "_fixTitle", "enable", "disable", "toggleEnabled", "click", "_leave", "_enter", "_hideModalHandler", "_disposePopper", "_isWithContent", "shadowRoot", "isInTheDom", "ownerDocument", "_getTipElement", "_isWithActiveTrigger", "_getTitle", "_createTipElement", "_getContentForTemplate", "_getTemplateFactory", "tipId", "setContent", "_initializeOnDelegatedTarget", "_getDelegateConfig", "attachment", "phase", "state", "triggers", "eventIn", "eventOut", "_setTimeout", "timeout", "dataAttributes", "dataAttribute", "SELECTOR_TITLE", "SELECTOR_CONTENT", "Popover", "_getContent", "EVENT_ACTIVATE", "CLASS_NAME_DROPDOWN_ITEM", "SELECTOR_DATA_SPY", "SELECTOR_TARGET_LINKS", "SELECTOR_NAV_LIST_GROUP", "SELECTOR_NAV_LINKS", "SELECTOR_NAV_ITEMS", "SELECTOR_LIST_ITEMS", "SELECTOR_LINK_ITEMS", "SELECTOR_DROPDOWN", "SELECTOR_DROPDOWN_TOGGLE", "rootMargin", "smoothScroll", "threshold", "ScrollSpy", "_targetLinks", "_observableSections", "_rootElement", "_activeTarget", "_observer", "_previousScrollData", "visibleEntryTop", "parentScrollTop", "refresh", "_initializeTargetsAndObservables", "_maybeEnableSmoothScroll", "disconnect", "_getNewObserver", "section", "observe", "observableSection", "hash", "height", "offsetTop", "scrollTo", "top", "behavior", "IntersectionObserver", "_observerCallback", "targetElement", "_process", "userScrollsDown", "isIntersecting", "_clearActiveClass", "entryIsLowerThanPrevious", "targetLinks", "anchor", "decodeURI", "_activateParents", "listGroup", "item", "activeNodes", "node", "spy", "HOME_KEY", "END_KEY", "CLASS_DROPDOWN", "SELECTOR_DROPDOWN_MENU", "NOT_SELECTOR_DROPDOWN_TOGGLE", "SELECTOR_TAB_PANEL", "SELECTOR_OUTER", "SELECTOR_INNER", "SELECTOR_INNER_ELEM", "SELECTOR_DATA_TOGGLE_ACTIVE", "Tab", "_setInitialAttributes", "_getChildren", "innerElem", "_elemIsActive", "active", "_getActiveElem", "_deactivate", "_activate", "relatedElem", "_toggleDropDown", "nextActiveElement", "preventScroll", "_setAttributeIfNotExists", "_setInitialAttributesOnChild", "_getInnerElement", "isActive", "outerElem", "_getOuterElement", "_setInitialAttributesOnTargetPanel", "open", "EVENT_MOUSEOVER", "EVENT_MOUSEOUT", "CLASS_NAME_HIDE", "autohide", "Toast", "_hasMouseInteraction", "_hasKeyboardInteraction", "_clearTimeout", "_maybeScheduleHide", "isShown", "_onInteraction", "isInteracting", "jQuery"]
}
