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C1C,uCAAe,CACf,CAAC;QACH,CAAC;QAED,IAAI,OAAO,MAAM,CAAC,0BAA0B,CAAC,KAAK,WAAW,EAAE;YAC9D,sBAAsB,CAAC,MAAM,CAAC,0BAA0B,CAAC,CAAC,CAAC;SAC3D;aAAM;YACN,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,gCAAgC,EAAE,CAAC,KAAK,EAAE,cAAc,EAAE,EAAE;gBAC1E,sBAAsB,CAAC,cAAc,CAAC,CAAC;YACxC,CAAC,CAAC,CAAC;SACH;IACF,CAAC;IAED,4FAA4F;IAC5F,8FAA8F;IAC9F,8DAA8D;IAE9D,CAAC,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,8BAA8B,EAAE,sBAAsB,CAAC,CAAC;IACxE,CAAC,CAAC,sBAAsB,CAAC,CAAC;IAE1B,oDAAoD;IACpD,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,CACb,sCAAsC,EACtC,UAAU,OAAO,EAAE,EAAY;QAC9B,IAAI,CAAC,EAAE,EAAE;YACR,OAAO;SACP;QACD,sBAAsB,EAAE,CAAC;QAEzB,IAAI,6CAAqB,EAAE;YAC1B,EAAE,CAAC,sBAAsB,CAAC,6CAAqB,CAAC,wBAAwB,EAAE,EAAE,6CAAqB,CAAC,CAAC;SACnG;QACD,IAAI,uCAAe,EAAE;YACpB,EAAE,CAAC,sBAAsB,CAAC,uCAAe,CAAC,wBAAwB,EAAE,EAAE,uCAAe,CAAC,CAAC;SACvF;IACF,CAAC,CACD,CAAC;AACH,CAAC,EAnfgB,uBAAuB,KAAvB,uBAAuB,QAmfvC","sources":["webpack:///./extras/modules/menu-styler/menu-styler-features.ts"],"sourcesContent":["'use strict';\n\nimport {AmeCustomizable, AmeCustomizableViewModel} from '../../pro-customizables/assets/customizable.js';\n\ndeclare const ameMenuStylerFeatureConfig: AmeMenuStylerJsFeatures.FeatureScriptConfig;\n\nexport namespace AmeMenuStylerJsFeatures {\n\timport PreviewUpdater = AmeCustomizable.PreviewUpdater;\n\timport SimpleVm = AmeCustomizableViewModel.SimpleVm;\n\tconst $ = jQuery;\n\n\tinterface FeatureConfig<T extends FeatureSettings> {\n\t\tsettings: T;\n\t\tsettingMap: SettingMap<T>;\n\t}\n\n\tinterface FeatureSettings {\n\t}\n\n\tinterface SettingMap<T extends FeatureSettings> {\n\t\t[settingId: string]: keyof T;\n\t}\n\n\tabstract class StylerJsFeature<S extends FeatureSettings> implements PreviewUpdater {\n\t\tprotected readonly initialSettings: S;\n\t\tprotected readonly settingMap: SettingMap<S>;\n\n\t\tprotected activeSettings: S;\n\n\t\tprotected constructor(config: FeatureConfig<S>) {\n\t\t\tthis.initialSettings = config.settings;\n\t\t\tthis.activeSettings = this.initialSettings;\n\t\t\tthis.settingMap = config.settingMap;\n\t\t\t//Note: Subclasses should call `this.update(this.initialSettings)` in their constructor.\n\t\t\t//It is not done here because the subclass constructor may need to do some setup first.\n\t\t}\n\n\t\tclearPreview(): void {\n\t\t\tthis.update(this.initialSettings);\n\t\t};\n\n\t\tpreview(settingId: string, value: any, getSettingValue: AmeCustomizable.SettingValueReader): void {\n\t\t\tconst localKey = this.settingMap[settingId];\n\t\t\tif (typeof localKey === 'undefined') {\n\t\t\t\tif (console.warn) {\n\t\t\t\t\tconsole.warn(\n\t\t\t\t\t\t'Preview failed: The feature \"' + this.getFeatureId()\n\t\t\t\t\t\t+ '\" does not use the setting \"' + settingId + '\".'\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet newSettings: S = {...this.activeSettings};\n\t\t\tnewSettings[localKey] = value;\n\n\t\t\t//Get any known but missing settings using the callback.\n\t\t\tfor (const settingId in this.settingMap) {\n\t\t\t\tif (this.settingMap.hasOwnProperty(settingId)) {\n\t\t\t\t\tconst localKey = this.settingMap[settingId];\n\t\t\t\t\tif (!newSettings.hasOwnProperty(localKey)) {\n\t\t\t\t\t\tnewSettings[localKey] = getSettingValue(settingId, null);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.update(newSettings);\n\t\t}\n\n\t\tprotected update(settings: S): void {\n\t\t\tthis.activeSettings = settings;\n\t\t}\n\n\t\t/**\n\t\t * Get the setting IDs that this feature uses. The feature can preview any of these settings.\n\t\t */\n\t\tgetPreviewableSettingIds(): string[] {\n\t\t\treturn Object.keys(this.settingMap);\n\t\t}\n\n\t\tabstract getFeatureId(): string;\n\t}\n\n\tinterface CollapseButtonTextSettings extends FeatureSettings {\n\t\tlabel: string;\n\t}\n\n\texport class CollapseButtonTextFeature extends StylerJsFeature<CollapseButtonTextSettings> {\n\t\tprotected originalLabel: string | null = null;\n\n\t\tconstructor(config: FeatureConfig<CollapseButtonTextSettings>) {\n\t\t\tsuper(config);\n\t\t\tthis.update(this.initialSettings);\n\t\t}\n\n\t\tprotected update(settings: CollapseButtonTextSettings): void {\n\t\t\tsuper.update(settings);\n\n\t\t\tconst $label = $('#adminmenu #collapse-button .collapse-button-label');\n\t\t\tif (this.originalLabel === null) {\n\t\t\t\tthis.originalLabel = $label.text();\n\t\t\t}\n\n\t\t\tif ((typeof settings['label'] === 'undefined') || (settings.label === '') || (settings.label === null)) {\n\t\t\t\t$label.text(this.originalLabel);\n\t\t\t} else {\n\t\t\t\t$label.text(settings.label);\n\t\t\t}\n\t\t}\n\n\t\tgetFeatureId(): string {\n\t\t\treturn 'CollapseButtonTextFeature';\n\t\t}\n\t}\n\n\tinterface ImageSettingValue {\n\t\tattachmentId: number | null;\n\t\tattachmentSiteId: number | null;\n\t\tattachmentUrl: string;\n\t\texternalUrl: string | null;\n\t\twidth: number | null;\n\t\theight: number | null;\n\t}\n\n\tinterface MenuLogoSettings extends FeatureSettings {\n\t\tbaseImage: ImageSettingValue | null;\n\t\tcollapsedImage: ImageSettingValue | null;\n\t\tlinkUrl: string | null;\n\t\topenInNewTab: boolean;\n\t\tbackgroundColor: string | null;\n\t\tbaseHeight: number | null;\n\t\tcollapsedHeight: number | null;\n\t}\n\n\texport class MenuLogoFeature extends StylerJsFeature<MenuLogoSettings> {\n\t\tprotected $container: JQuery | null = null;\n\t\tprotected $link: JQuery | null = null;\n\t\tprotected $styleElement: JQuery | null = null;\n\n\t\tprivate readonly logoId = 'ame_ms_admin_menu_logo';\n\t\tprivate readonly linkId = 'ame_ms_menu_logo_link';\n\n\t\t/*\n\t\t * Note: The logo container is set up so that the logo image is inside the content\n\t\t * box (i.e. it does not overlap the padding or the margin), but the logo link covers\n\t\t * the padding area. This way the user can control the clickable (padding) area and\n\t\t * the unclickable (margin) area separately.\n\t\t */\n\n\t\tprivate readonly staticLogoStyles = [\n\t\t\t'background-size: contain;',\n\t\t\t'background-repeat: no-repeat;',\n\t\t\t'background-position: 0;',\n\t\t\t'background-origin: content-box;',\n\t\t\t'min-height: 10px;',\n\t\t\t'position: relative;',\n\t\t\t'display: block;',\n\t\t\t'box-sizing: content-box;',\n\t\t];\n\n\t\tprivate readonly staticLinkCss = `#adminmenu #${this.linkId} {\n\t\t\tdisplay: block;\n\t\t\tposition: absolute;\n\t\t\ttop: 0; left: 0; right: 0; bottom: 0;\n\t\t\tmargin: 0;\n\t\t\tpadding: 0;\n\t\t\tbackground: transparent;\n\t\t\ttext-decoration: none;\n\t\t}\n\t\t#adminmenu #${this.linkId}:hover, #adminmenu #${this.linkId}:focus {\n\t\t\tbox-shadow: none;\n\t\t\ttransition: none;\n\t\t\tcolor: transparent;\n\t\t}`;\n\n\t\tprivate defaultMenuMarginTop: number | null = null;\n\t\tprivate defaultMenuMarginBottom: number | null = null;\n\n\t\tconstructor(config: FeatureConfig<MenuLogoSettings>) {\n\t\t\tsuper(config);\n\t\t\tthis.update(this.initialSettings);\n\t\t}\n\n\t\tprotected update(config: MenuLogoSettings) {\n\t\t\tsuper.update(config);\n\t\t\tthis.updateFromActiveSettings();\n\t\t}\n\n\t\tprivate updateFromActiveSettings(): void {\n\t\t\tconst config = this.activeSettings; //Local reference in case the config changes while loading images.\n\n\t\t\tconst hasBaseImage = this.settingContainsImage(config.baseImage);\n\t\t\tconst hasCollapsedImage = this.settingContainsImage(config.collapsedImage);\n\t\t\tif (!hasBaseImage && !hasCollapsedImage) {\n\t\t\t\tthis.removeLogo();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.withLogoImages(config, (baseImageUrl, collapsedImageUrl) => {\n\t\t\t\tconst [$styleElement, $link] = this.getOrCreateElements();\n\t\t\t\tlet baseLogoStyles = [];\n\t\t\t\tlet collapsedLogoStyles = [];\n\n\t\t\t\tlet hasBaseLogo = false;\n\t\t\t\tlet hasCollapsedLogo = false;\n\n\t\t\t\tif (baseImageUrl) {\n\t\t\t\t\thasBaseLogo = true;\n\t\t\t\t\tbaseLogoStyles.push(`background-image: url(\"${baseImageUrl}\");`);\n\n\t\t\t\t\tconst baseHeight = Math.max(config.baseHeight ? config.baseHeight : 10, 10);\n\t\t\t\t\tbaseLogoStyles.push(`height: ${baseHeight}px;`);\n\t\t\t\t} else {\n\t\t\t\t\tbaseLogoStyles.push('display: none;')\n\t\t\t\t}\n\t\t\t\tif (collapsedImageUrl) {\n\t\t\t\t\thasCollapsedLogo = true;\n\t\t\t\t\tcollapsedLogoStyles.push(`background-image: url(\"${collapsedImageUrl}\");`);\n\t\t\t\t\tcollapsedLogoStyles.push('display: block;');\n\n\t\t\t\t\tconst collapsedHeight = Math.max(config.collapsedHeight ? config.collapsedHeight : 10, 10);\n\t\t\t\t\tcollapsedLogoStyles.push(`height: ${collapsedHeight}px;`);\n\t\t\t\t} else {\n\t\t\t\t\tcollapsedLogoStyles.push('display: none;');\n\t\t\t\t}\n\n\t\t\t\tif (config.backgroundColor) {\n\t\t\t\t\tbaseLogoStyles.push(`background-color: ${config.backgroundColor};`);\n\t\t\t\t}\n\n\t\t\t\tconst linkUrl = (typeof config.linkUrl === 'string') ? config.linkUrl.trim() : '';\n\t\t\t\tif (linkUrl) {\n\t\t\t\t\t$link.show().attr('href', linkUrl);\n\n\t\t\t\t\tif (config.openInNewTab) {\n\t\t\t\t\t\t$link.attr('target', '_blank');\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$link.removeAttr('target');\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$link.hide().removeAttr('href');\n\t\t\t\t}\n\n\t\t\t\tbaseLogoStyles.unshift(...this.staticLogoStyles);\n\n\t\t\t\tconst baseStyle = `#adminmenu #${this.logoId} {\\n${baseLogoStyles.join('\\n')} }`;\n\t\t\t\tconst collapsedStyle = `.folded #adminmenu #${this.logoId} {\\n${collapsedLogoStyles.join('\\n')} }`;\n\n\t\t\t\t//Remove the top margin from the admin menu when the logo is visible.\n\t\t\t\t//We also need to let other AME components know that the vertical margin has changed.\n\t\t\t\t//This affects the \"Collapse button position\" setting.\n\t\t\t\tconst [, menuMarginBottom] = this.getDefaultVerticalMenuMargins();\n\t\t\t\tlet wrapperCss = `#adminmenuwrap { --ame-ms-menu-margin-bottom: ${menuMarginBottom}px; }`;\n\t\t\t\tif (hasBaseLogo) {\n\t\t\t\t\twrapperCss += `body:not(.folded) #adminmenu { margin-top: 0; }\\n`;\n\t\t\t\t\twrapperCss += `body:not(.folded) #adminmenuwrap { --ame-ms-menu-margin-top: 0px; }\\n`;\n\t\t\t\t}\n\t\t\t\tif (hasCollapsedLogo) {\n\t\t\t\t\twrapperCss += `.folded #adminmenu { margin-top: 0; }\\n`;\n\t\t\t\t\twrapperCss += `.folded #adminmenuwrap { --ame-ms-menu-margin-top: 0px; }\\n`;\n\t\t\t\t}\n\n\t\t\t\t$styleElement.text(baseStyle + \"\\n\" + collapsedStyle + \"\\n\" + this.staticLinkCss + \"\\n\" + wrapperCss);\n\t\t\t});\n\t\t}\n\n\t\tprivate settingContainsImage(setting: ImageSettingValue | null): boolean {\n\t\t\tif (setting === null) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn !!(((setting.attachmentId !== null) && (setting.attachmentId > 0)) || setting.externalUrl);\n\t\t}\n\n\t\tprivate withLogoImages(\n\t\t\tconfig: MenuLogoSettings,\n\t\t\tcallback: (baseImageUrl: string | null, collapsedImageUrl: string | null) => void\n\t\t): void {\n\t\t\tlet imageUrls = [\n\t\t\t\tthis.getImageUrl(config.baseImage),\n\t\t\t\tthis.getImageUrl(config.collapsedImage),\n\t\t\t];\n\n\t\t\t//Add the logo as quickly as possible to prevent the menu from visibly shifting.\n\t\t\t//Promises are usually asynchronous, so let's avoid them when possible and call\n\t\t\t//the callback immediately if both URLs are already known or invalid.\n\t\t\tif ((typeof imageUrls[0] === 'string') && (typeof imageUrls[1] === 'string')) {\n\t\t\t\tcallback(imageUrls[0], imageUrls[1]);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t//Assume that ES2020 is not available, so we can't use Promise.allSettled().\n\t\t\t//However, we want to wait for all promises to resolve, even if some fail.\n\t\t\tPromise.all(\n\t\t\t\timageUrls.map((p) => {\n\t\t\t\t\t//Convert known values to resolved promises.\n\t\t\t\t\tif ((typeof p === 'string') || (p === null)) {\n\t\t\t\t\t\treturn Promise.resolve(p);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn p.then(\n\t\t\t\t\t\t(value) => (typeof value === 'string') ? value : null,\n\t\t\t\t\t\t() => null //Convert errors to null.\n\t\t\t\t\t) as JQueryPromise<string | null>;\n\t\t\t\t})\n\t\t\t).then((results) => {\n\t\t\t\t//If the active config has changed, don't apply the results.\n\t\t\t\t//The URLs that we just loaded might not be relevant any more.\n\t\t\t\tif (this.activeSettings !== config) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst [baseImageUrl, collapsedImageUrl] = results;\n\t\t\t\tcallback(baseImageUrl ?? null, collapsedImageUrl ?? null);\n\t\t\t});\n\t\t}\n\n\t\tprivate getOrCreateElements(): [JQuery, JQuery] {\n\t\t\tif (!this.$container) {\n\t\t\t\tthis.$container = $(`<li id=\"${this.logoId}\"></li>`);\n\t\t\t\tthis.$link = $(`<a id=\"${this.linkId}\"></a>`).appendTo(this.$container);\n\t\t\t\tthis.$container.prependTo('#adminmenu');\n\t\t\t}\n\t\t\tif (!this.$styleElement) {\n\t\t\t\tthis.$styleElement = $('<style></style>').appendTo('head');\n\t\t\t}\n\t\t\treturn [this.$styleElement, this.$link!];\n\t\t}\n\n\t\tprivate getImageUrl(imageSetting: ImageSettingValue | null): JQueryPromise<string> | string | null {\n\t\t\tif (imageSetting === null) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tconst externalUrl = (typeof imageSetting.externalUrl === 'string') ? imageSetting.externalUrl.trim() : '';\n\t\t\tif (externalUrl) {\n\t\t\t\treturn externalUrl;\n\t\t\t}\n\n\t\t\tconst attachmentId = imageSetting.attachmentId || 0;\n\t\t\t//const attachmentSiteId = imageSetting.attachmentSiteId || 0;\n\t\t\tif (attachmentId > 0) {\n\t\t\t\t//Use the cached attachment URL if possible.\n\t\t\t\tif (imageSetting.attachmentUrl) {\n\t\t\t\t\treturn imageSetting.attachmentUrl;\n\t\t\t\t}\n\n\t\t\t\t//Load the attachment URL from the server.\n\t\t\t\tif ((typeof wp !== 'undefined') && wp.media && wp.media.attachment) {\n\t\t\t\t\t//Maybe it's already loaded?\n\t\t\t\t\tlet attachmentUrl = wp.media.attachment(attachmentId).get('url');\n\t\t\t\t\tif (attachmentUrl) {\n\t\t\t\t\t\treturn attachmentUrl;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst deferredLoader = $.Deferred<string>();\n\t\t\t\t\twp.media.attachment(attachmentId).fetch().then(\n\t\t\t\t\t\t//Success\n\t\t\t\t\t\t(attachment: any) => {\n\t\t\t\t\t\t\tif (attachment && attachment.url) {\n\t\t\t\t\t\t\t\tdeferredLoader.resolve(attachment.url);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tdeferredLoader.reject();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t//Error\n\t\t\t\t\t\t() => deferredLoader.reject()\n\t\t\t\t\t);\n\t\t\t\t\treturn deferredLoader.promise();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//No image.\n\t\t\treturn null;\n\t\t}\n\n\t\tprivate getDefaultVerticalMenuMargins(): [number, number] {\n\t\t\tif ((this.defaultMenuMarginTop === null) || (this.defaultMenuMarginBottom === null)) {\n\t\t\t\t//Get the vertical margins of the admin menu. The value includes the \"px\" suffix,\n\t\t\t\t//but parseInt() will ignore it.\n\t\t\t\tconst $adminmenu = $('#adminmenu');\n\t\t\t\tthis.defaultMenuMarginTop = parseInt($adminmenu.css('margin-top'), 10);\n\t\t\t\tthis.defaultMenuMarginBottom = parseInt($adminmenu.css('margin-bottom'), 10);\n\t\t\t\tif (isNaN(this.defaultMenuMarginTop)) {\n\t\t\t\t\tthis.defaultMenuMarginTop = 0;\n\t\t\t\t}\n\t\t\t\tif (isNaN(this.defaultMenuMarginBottom)) {\n\t\t\t\t\tthis.defaultMenuMarginBottom = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn [this.defaultMenuMarginTop, this.defaultMenuMarginBottom];\n\t\t}\n\n\t\tprivate removeLogo(): void {\n\t\t\tif (this.$container) {\n\t\t\t\tthis.$container.remove();\n\t\t\t\tthis.$container = null;\n\t\t\t\tthis.$link = null;\n\t\t\t}\n\t\t\tif (this.$styleElement) {\n\t\t\t\tthis.$styleElement.remove();\n\t\t\t\tthis.$styleElement = null;\n\t\t\t}\n\t\t}\n\n\t\tgetFeatureId(): string {\n\t\t\treturn 'MenuLogoFeature';\n\t\t}\n\t}\n\n\texport interface FeatureScriptConfig {\n\t\tcollapseButtonText?: FeatureConfig<CollapseButtonTextSettings>;\n\t\tmenuLogo?: FeatureConfig<MenuLogoSettings>;\n\t}\n\n\t//Always initialize the features if their config is available.\n\t//They work normally on most admin pages, and are used for preview on the settings page.\n\texport let collapseButtonFeature: CollapseButtonTextFeature | null = null;\n\texport let menuLogoFeature: MenuLogoFeature | null = null;\n\tconst collapseButtonFeatureKey = 'ameMenuStyler_collapseButtonTextFt';\n\tconst menuLogoFeatureKey = 'ameMenuStyler_menuLogoFt';\n\n\tlet isInitialized = false;\n\n\tfunction createFeatureInstances() {\n\t\tif (isInitialized) {\n\t\t\treturn;\n\t\t}\n\t\tisInitialized = true;\n\n\t\t//If the script is loaded multiple times, the features might already exist.\n\t\t//This can happen because the script is both enqueued normally and imported\n\t\t//as a module on the settings page.\n\t\t//We want each feature to be initialized only once, so we'll store them\n\t\t//in the window object and reuse them.\n\t\tif (ameMenuStylerFeatureConfig.collapseButtonText) {\n\t\t\tif (window[collapseButtonFeatureKey]) {\n\t\t\t\tcollapseButtonFeature = window[collapseButtonFeatureKey];\n\t\t\t} else {\n\t\t\t\tcollapseButtonFeature = new CollapseButtonTextFeature(ameMenuStylerFeatureConfig.collapseButtonText);\n\t\t\t\twindow[collapseButtonFeatureKey] = collapseButtonFeature;\n\t\t\t}\n\t\t}\n\t\tif (ameMenuStylerFeatureConfig.menuLogo) {\n\t\t\tif (window[menuLogoFeatureKey]) {\n\t\t\t\tmenuLogoFeature = window[menuLogoFeatureKey];\n\t\t\t} else {\n\t\t\t\tmenuLogoFeature = new MenuLogoFeature(ameMenuStylerFeatureConfig.menuLogo);\n\t\t\t\twindow[menuLogoFeatureKey] = menuLogoFeature;\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Register the features with the Admin Customizer preview handler, if active.\n\t\t *\n\t\t * @param {AmeAdminCustomizerPreview.PreviewHandler} previewHandler\n\t\t */\n\t\tfunction registerFeaturePreview(previewHandler: any) {\n\t\t\t//Both features should exist in the AC preview, but let's check just in case.\n\t\t\tif (!collapseButtonFeature || !menuLogoFeature) {\n\t\t\t\tconsole.warn('Menu Styler: One or more features are not initialized in AC preview.');\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tpreviewHandler.registerPreviewUpdater(\n\t\t\t\tcollapseButtonFeature.getPreviewableSettingIds(),\n\t\t\t\tcollapseButtonFeature\n\t\t\t);\n\t\t\tpreviewHandler.registerPreviewUpdater(\n\t\t\t\tmenuLogoFeature.getPreviewableSettingIds(),\n\t\t\t\tmenuLogoFeature\n\t\t\t);\n\t\t}\n\n\t\tif (typeof window['wsAdminCustomizerPreview'] !== 'undefined') {\n\t\t\tregisterFeaturePreview(window['wsAdminCustomizerPreview']);\n\t\t} else {\n\t\t\t$(document).on('adminMenuEditor:acPreviewStart', (event, previewHandler) => {\n\t\t\t\tregisterFeaturePreview(previewHandler);\n\t\t\t});\n\t\t}\n\t}\n\n\t//The #adminmenu element must be available before initialization. The DOMContentLoaded event\n\t//works, but we can better avoid a visible change/FOUC by using a custom event that the plugin\n\t//triggers immediately after WordPress outputs the admin menu.\n\n\t$(document).one('adminMenuEditor:menuDomReady', createFeatureInstances);\n\t$(createFeatureInstances);\n\n\t//Register the features with the menu styler dialog.\n\t$(document).on(\n\t\t'adminMenuEditor:menuStylerUiRegister',\n\t\tfunction (_unused, vm: SimpleVm) {\n\t\t\tif (!vm) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tcreateFeatureInstances();\n\n\t\t\tif (collapseButtonFeature) {\n\t\t\t\tvm.registerPreviewUpdater(collapseButtonFeature.getPreviewableSettingIds(), collapseButtonFeature);\n\t\t\t}\n\t\t\tif (menuLogoFeature) {\n\t\t\t\tvm.registerPreviewUpdater(menuLogoFeature.getPreviewableSettingIds(), menuLogoFeature);\n\t\t\t}\n\t\t}\n\t);\n}\n\ndeclare global {\n\tinterface Window {\n\t\tameMenuStyler_menuLogoFt?: AmeMenuStylerJsFeatures.MenuLogoFeature;\n\t\tameMenuStyler_collapseButtonTextFt?: AmeMenuStylerJsFeatures.CollapseButtonTextFeature;\n\t}\n}"],"names":[],"sourceRoot":""}