// ==UserScript== // @name MES(Mobile Element Selector) // @author 삼플 // @version 2.2.4 // @description 작은 화면에서도 깔끔하게 요소를 선택하고 차단 규칙을 관리하는 고급 모바일 요소 선택기 // @match *://*/* // @license Apache-2.0 // @grant GM_setClipboard // @grant GM_setValue // @grant GM_getValue // @grant GM_registerMenuCommand // @grant GM.setClipboard // @grant GM.setValue // @grant GM.getValue // @namespace https://adguard.com // @downloadURL https://raw.githubusercontent.com/sampple-korea/MES/refs/heads/main/MES.min.js // @updateURL https://raw.githubusercontent.com/sampple-korea/MES/refs/heads/main/MES.min.js // ==/UserScript== !async function(){"use strict";const e="[MES v2.2.4]",t="mes-selected-element",o="selected-element",n="mes-selector-candidate-match",r="mes-isolate-active",i="mes-isolate-path",a="mes-isolate-target",s="mes-isolate-host",l="mes-ui-root",c="data-mes-owner",d="ui-root",p=function(){try{return window.self!==window.top}catch(e){return!0}}(),u={panelTitle:"요소 차단",settingsTitle:"설정",settingsCredit:"MES by 삼플",listTitle:"저장된 차단 규칙",selectedElementLabel:"선택된 요소 (CSS 선택자)",parentLevelLabel:"요소 탐색",navRoot:"원본",navParent:"상위",navChild:"하위",copy:"복사",extractAction:"추출",copyCss:"CSS",copyRule:"규칙",similarRule:"유사",preview:"미리보기",restorePreview:"복원",saveRule:"저장",extractUrl:"URL",inspect:"검사",more:"더",parent:"상위",child:"하위",list:"목록",settings:"설정",cancel:"취소",close:"닫기",sectionBasic:"기본",sectionBlocking:"차단",sectionAdvanced:"고급",sectionUi:"UI",sectionBackup:"백업",uiLanguageLabel:"언어",languageKo:"한국어",languageEn:"English",languageZh:"中文",languageJa:"日本語",languageSavedReloadNotice:"언어 설정 저장됨. 새로 연 페이지부터 전체 UI에 적용됩니다.",inspectorTitle:"요소 정보",inspectorTabElement:"요소",inspectorTabCode:"코드",inspectorTabPage:"페이지",inspectorTabCookies:"쿠키",inspectorTabDiagnostics:"진단",inspectorTabResources:"리소스",copyInfo:"정보 복사",includeSiteNameLabel:"규칙에 사이트명 포함",useShieldIconLabel:"토글 버튼 방패 스타일",panelOpacityLabel:"패널 투명도",toggleSizeLabel:"토글 버튼 크기",toggleOpacityLabel:"토글 버튼 투명도",tempDisableLabel:"모든 규칙 임시 비활성화",observeDomChangesLabel:"동적 페이지 자동 재적용",lowPowerModeLabel:"저사양 모드",lowPowerModeNotice:"동적 감시를 줄입니다. 차단 성능이 저하될 수 있습니다.",shadowDomSupportLabel:"Shadow DOM 탐색",selectorHintModeLabel:"강화 선택자 힌트",privacyModeLabel:"민감 정보 보호",autoCloseAfterCopyLabel:"복사 후 선택 모드 종료",compactPickerModeLabel:"선택 후 패널 자동 축소",launcherModeLabel:"열기 방식",launcherButton:"버튼",launcherGesture:"제스처",launcherGestureReady:e=>`제스처 열기: ${e}`,gestureFingerCountLabel:"손가락",gestureTapCountLabel:"탭 횟수",gestureTwoFingers:"두 손가락",gestureThreeFingers:"세 손가락",gestureTwoTaps:"두 번",gestureThreeTaps:"세 번",minimizePanel:"패널 축소",expandPanel:"패널 펼치기",hideStrategyLabel:"숨김 방식",hideStrategyDisplay:"제거",hideStrategyVisibility:"공간",hideStrategyOpacity:"투명",hideStrategyStylesheet:"CSS",hideStrategyDisplayNotice:"장점: 요소를 완전히 제거하듯 숨겨 빈 공간이 거의 없습니다. 단점: 레이아웃이 크게 재계산될 수 있고, 사이트가 display를 되돌리면 재적용이 필요합니다.",hideStrategyVisibilityNotice:"장점: 레이아웃 공간을 유지해 화면 흔들림이 적습니다. 단점: 빈 공간이 남고, 클릭 차단은 pointer-events에 의존합니다.",hideStrategyOpacityNotice:"장점: 레이아웃 변화가 가장 적고 부드럽습니다. 단점: 투명해질 뿐 공간은 남으며 일부 흔적이 남을 수 있습니다.",hideStrategyStylesheetNotice:"장점: CSS 규칙으로 여러 요소를 빠르게 숨겨 동적 페이지에 효율적입니다. 단점: 복잡한 선택자는 직접 숨김으로 보정되고, 사이트가 스타일을 건드리면 복구 감시가 필요합니다.",backupLabel:"규칙 백업 (JSON)",restoreLabel:"규칙 복원 (JSON)",togglePositionLabel:"토글 버튼 위치",toggleSelectorAria:"요소 선택기 열기",panelOpacityAria:"패널 투명도",toggleSizeAria:"토글 버튼 크기",toggleOpacityAria:"토글 버튼 투명도",posTopLeft:"좌상",posTopRight:"우상",posBottomLeft:"좌하",posBottomRight:"우하",on:"ON",off:"OFF",noRules:"저장된 규칙이 없습니다.",noElementSelected:"선택된 요소가 없습니다.",cannotGenerateSelector:"유효한 선택자를 생성할 수 없습니다.",isolateFocus:"집중 보기",restoreFocus:"집중 해제",focusModeOn:"선택 요소만 표시 중",focusModeOff:"집중 보기 해제됨",selectorCopied:"선택자가 복사되었습니다.",ruleCopied:"규칙 복사됨",urlCopied:"URL 복사됨",infoCopied:"요소 정보 복사됨",sensitiveCopyConfirm:"민감 정보가 포함될 수 있습니다. 복사할까요?",urlNotFound:"URL을 찾을 수 없습니다.",clipboardError:"클립보드 복사 실패",similarSelectorCopied:"유사 선택자 복사됨",similarRuleReady:e=>`유사 규칙 ${e}개 대상`,selectorCandidateCopied:"선택자 후보 복사됨",selectorCandidatePreview:e=>`후보 ${e}개 요소 표시 중`,selectorCandidateSaved:e=>`후보 규칙 저장됨 · ${e}개 대상`,selectorRiskStable:"안정",selectorRiskPrecise:"정밀",selectorRiskPositional:"위치 의존",selectorRiskBroad:"넓음",selectorRiskAdvanced:"고급 패턴",selectorRiskComplex:"복잡",selectorRiskError:"확인 필요",undoAction:"되돌리기",ruleUndoComplete:"규칙 저장 취소됨",ruleUndoUnavailable:"되돌릴 규칙이 없습니다.",ruleUndoFailed:"규칙 저장 취소 실패",noChildElements:"하위 요소가 없습니다.",inspectorUnavailable:"선택된 요소 정보가 없습니다.",noCookies:"표시할 쿠키가 없습니다.",cookieReadOnly:"보호 모드에서는 쿠키 이름과 마스킹된 값만 표시합니다.",cookieScopeNotice:"브라우저가 공개한 쿠키만 표시됩니다. 수정/삭제는 현재 사이트에서 가능한 범위로 처리됩니다.",cookieValuesMasked:"쿠키 값은 보호됨",cookieCopy:"복사",cookieEdit:"수정",cookieDelete:"삭제",cookieEditPrompt:e=>`${e} 쿠키의 새 값을 입력하세요. 현재 사이트 path=/ 값으로 저장됩니다.`,cookieDeleteConfirm:e=>`${e} 쿠키를 삭제할까요?`,cookieUpdated:"쿠키 수정됨",cookieDeleted:"쿠키 삭제됨",cookieActionFailed:"쿠키 작업 실패",resourceMetadataLabel:"리소스 메타데이터",resourceTypeLabel:"유형",resourceTimeLabel:"시간",resourceSizeLabel:"크기",resourceStartLabel:"시작",resourceOriginalUrlLabel:"원본 URL",webglNoInfo:"WebGL 정보 없음",webglAvailable:"WebGL 사용 가능",diagnosticLanguage:"언어",diagnosticTimezone:"시간대",diagnosticScreen:"화면",diagnosticViewport:"뷰포트",diagnosticCpuThreads:"CPU 스레드",diagnosticMemory:"메모리",diagnosticResourceCount:"리소스 수",inspectorSummaryTitle:"요약",inspectorActionsTitle:"동작",selectorCandidatesTitle:"선택자 후보",similarSelectorLabel:"유사 선택자",extractAttributeLabel:"속성 값 추출",focusSelectedRangeLabel:"선택 범위 집중",selectParentElementLabel:"상위 요소 선택",childElementsLabel:e=>`하위 요소 ${e}개`,viewAction:"보기",computedStyleTitle:"계산된 스타일",scriptHintsTitle:"스크립트 단서",browserScreenTitle:"브라우저 및 화면",recentResourcesTitle:"최근 리소스",selectorSnapshotTitle:"선택자 후보",selectorCandidatePrecise:"정밀",selectorCandidatePattern:"패턴",selectorCandidateAttribute:"속성",selectorCandidateHint:"힌트",selectorCandidateClass:"클래스",selectorCandidateResource:"리소스",selectorIntentPrecise:"단일 요소 저장에 적합",selectorIntentPattern:"반복되는 카드나 광고 묶음에 적합",selectorIntentAttribute:"안정적인 속성 기반",selectorIntentHint:"광고성 이름 패턴 기반",selectorIntentAdvanced:"동적 광고/배너 패턴 기반",selectorIntentClass:"레이아웃 클래스 기반",selectorIntentResource:"URL 또는 미디어 속성 기반",selectorQualityError:"선택자 오류",selectorQualityUnique:"고유",selectorQualityMatch:e=>`${e}개 일치`,selectorQualityNoMatch:"일치 없음",selectorRiskReasonBroadImpact:e=>`${e}개 요소 영향. 저장 전 미리보기 권장`,selectorRiskReasonBroadMatch:e=>`${e}개 요소를 함께 차단`,selectorRiskReasonAdvanced:"동적 광고 패턴 기반. 저장 전 미리보기 권장",selectorRiskReasonPositional:"페이지 구조 변경에 약할 수 있음",selectorRiskReasonComplex:"긴 경로 기반이라 유지보수 주의",selectorRiskReasonStable:"고정 속성 기반 단일 매칭",selectorRiskReasonPrecise:"현재 요소 단일 매칭",navParentDepth:e=>`${g.navParent} ${e}단계`,navChildDepth:e=>`${g.navChild} ${e}단계`,menuRecoverButtonMode:"MES 버튼 모드로 복구",urlAvailableChip:"URL 있음",hostnameUnavailable:"호스트 이름을 가져올 수 없습니다.",ruleCopyTitle:"규칙 복사",ruleDeleteTitle:"규칙 삭제",tagSummaryLabel:"태그",selectorSummaryLabel:"선택자",selectorNone:"없음",matchSummaryLabel:"매칭",qualitySummaryLabel:"품질",attributesSummaryLabel:"속성",noInlineEvents:"인라인 이벤트 없음",accessibleStylesheetNotice:"접근 가능한 스타일시트만 표시됩니다.",stylesheetInaccessible:"접근 불가",noScripts:"스크립트 없음",characterCountLabel:e=>`${e}자`,noResources:"리소스 없음",childElementsTitle:"하위 요소",selectAction:"선택",attributePrompt:"추출할 속성 이름을 입력하세요.",attributeCopied:"속성 값 복사됨",attributeNotFound:"속성을 찾을 수 없습니다.",promptCopy:"선택자를 직접 복사하세요:",alreadyHidden:"이미 숨겨진 요소입니다.",previewDifferentElement:"다른 요소가 미리보기 중입니다.",ruleSavedReloading:"규칙 저장됨. 적용 중...",ruleSavedApplyFailed:"규칙은 저장했으나 즉시 적용 실패.",ruleAddError:"규칙 추가 중 오류:",ruleExists:"이미 저장된 규칙입니다.",confirmBroadSelector:e=>`이 선택자는 ${e}개 요소와 일치합니다. 그대로 저장할까요?`,confirmRiskSelector:(e,t)=>`선택자 품질: ${e}\n${t}\n그대로 저장할까요?`,listShowError:"목록 표시 중 오류 발생",ruleDeleted:"규칙 삭제됨",ruleDisabled:"규칙 비활성화됨",ruleEnabled:"규칙 활성화됨",ruleDeleteError:"규칙 삭제 실패",noMatchingRules:"검색 결과가 없습니다.",blocklistSearchPlaceholder:"규칙 검색",blocklistDisable:"중지",blocklistEnable:"사용",blocklistCopySite:"적용 규칙 복사",blocklistCopyAll:"전체 복사",blocklistDeleteSite:"현재 사이트 삭제",blocklistPruneStale:"무매칭 정리",blocklistSummary:(e,t,o=0)=>`전체 ${e}개 · 현재 사이트 적용 ${t}개${o?` · 비활성 ${o}개`:""}`,blocklistScopeCurrent:"현재 사이트",blocklistScopeGlobal:"전체",blocklistScopeOther:"다른 사이트",blocklistMatches:e=>`${e}개 매칭`,blocklistNoMatch:"매칭 없음",blocklistDisabledChip:"꺼짐",rulePreviewApplied:e=>`규칙 영향 ${e}개 표시 중`,rulePreviewUnavailable:"현재 사이트에서 미리보기 불가",clearPreviewAction:"해제",rulesCopied:e=>`${e}개 규칙 복사됨`,confirmDeleteSiteRules:(e,t)=>`${e}에 저장된 규칙 ${t}개를 삭제할까요?`,confirmPruneStaleRules:e=>`현재 사이트에서 매칭되지 않는 규칙 ${e}개를 정리할까요?`,siteRulesDeleted:e=>`현재 사이트 규칙 ${e}개 삭제됨`,staleRulesDeleted:e=>`무매칭 규칙 ${e}개 정리됨`,settingsSaved:"설정 저장됨",settingsSaveError:"설정 저장 실패",backupStarting:"규칙 백업 파일 다운로드를 시작합니다.",backupNoRules:"백업할 규칙이 없습니다.",backupError:"규칙 백업 실패",restorePrompt:"복원할 JSON 파일을 선택하세요.",restoreSuccess:"규칙 복원 완료. 적용 중...",restoreSuccessDeduped:e=>`규칙 복원 완료. 중복 ${e}개 제거됨`,restoreErrorInvalidFile:"잘못된 파일 형식 또는 내용입니다.",restoreErrorGeneral:"규칙 복원 실패",blockingApplied:e=>`${e}개의 규칙 적용됨`,blockingApplyError:"규칙 적용 중 오류 발생",tempBlockingOn:"모든 규칙 임시 비활성화됨",tempBlockingOff:"규칙 다시 활성화됨"};function m(e){return{...u,...e}}const b={ko:u,en:m({panelTitle:"Element Blocker",settingsTitle:"Settings",listTitle:"Saved Block Rules",selectedElementLabel:"Selected Element (CSS selector)",parentLevelLabel:"Element Path",navRoot:"Original",navParent:"Parent",navChild:"Child",copy:"Copy",extractAction:"Extract",copyRule:"Rule",similarRule:"Similar",preview:"Preview",restorePreview:"Restore",saveRule:"Save",extractUrl:"URL",inspect:"Inspect",more:"More",parent:"Parent",child:"Child",list:"List",settings:"Settings",cancel:"Cancel",close:"Close",sectionBasic:"Basic",sectionBlocking:"Blocking",sectionAdvanced:"Advanced",sectionBackup:"Backup",uiLanguageLabel:"Language",languageSavedReloadNotice:"Language saved. The full UI applies on newly opened pages.",inspectorTitle:"Element Info",inspectorTabElement:"Element",inspectorTabCode:"Code",inspectorTabPage:"Page",inspectorTabCookies:"Cookies",inspectorTabDiagnostics:"Diagnostics",inspectorTabResources:"Resources",copyInfo:"Copy Info",includeSiteNameLabel:"Include site name in rules",useShieldIconLabel:"Shield style launcher",panelOpacityLabel:"Panel opacity",toggleSizeLabel:"Launcher size",toggleOpacityLabel:"Launcher opacity",tempDisableLabel:"Temporarily disable all rules",observeDomChangesLabel:"Auto reapply on dynamic pages",lowPowerModeLabel:"Low-power mode",lowPowerModeNotice:"Reduces dynamic monitoring. Blocking performance may decrease.",shadowDomSupportLabel:"Shadow DOM traversal",selectorHintModeLabel:"Enhanced selector hints",privacyModeLabel:"Protect sensitive data",autoCloseAfterCopyLabel:"Exit selection after copy",compactPickerModeLabel:"Auto compact after selection",launcherModeLabel:"Open method",launcherButton:"Button",launcherGesture:"Gesture",launcherGestureReady:e=>`Gesture open: ${e}`,gestureFingerCountLabel:"Fingers",gestureTapCountLabel:"Taps",gestureTwoFingers:"Two fingers",gestureThreeFingers:"Three fingers",gestureTwoTaps:"Twice",gestureThreeTaps:"Three times",minimizePanel:"Minimize panel",expandPanel:"Expand panel",hideStrategyLabel:"Hide method",hideStrategyDisplay:"Remove",hideStrategyVisibility:"Space",hideStrategyOpacity:"Transparent",hideStrategyDisplayNotice:"Pros: removes the element visually with little empty space. Cons: can trigger larger layout recalculation, and restored display styles need reapplication.",hideStrategyVisibilityNotice:"Pros: keeps layout space, reducing screen jumps. Cons: leaves blank space, and click blocking relies on pointer-events.",hideStrategyOpacityNotice:"Pros: changes layout the least and feels smooth. Cons: the space remains, and some visual or accessibility traces may remain.",hideStrategyStylesheetNotice:"Pros: hides many elements quickly through CSS rules, which is efficient on dynamic pages. Cons: complex selectors fall back to direct hiding, and style tampering needs recovery monitoring.",backupLabel:"Backup rules (JSON)",restoreLabel:"Restore rules (JSON)",togglePositionLabel:"Launcher position",toggleSelectorAria:"Open element selector",panelOpacityAria:"Panel opacity",toggleSizeAria:"Launcher size",toggleOpacityAria:"Launcher opacity",posTopLeft:"Top L",posTopRight:"Top R",posBottomLeft:"Bottom L",posBottomRight:"Bottom R",noRules:"No saved rules.",noElementSelected:"No element selected.",cannotGenerateSelector:"Could not generate a valid selector.",isolateFocus:"Focus view",restoreFocus:"Clear focus",focusModeOn:"Showing selected element only",focusModeOff:"Focus view cleared",selectorCopied:"Selector copied.",ruleCopied:"Rule copied",urlCopied:"URL copied",infoCopied:"Element info copied",sensitiveCopyConfirm:"This may contain sensitive data. Copy anyway?",urlNotFound:"No URL found.",clipboardError:"Clipboard copy failed",similarSelectorCopied:"Similar selector copied",similarRuleReady:e=>`Similar rule targets ${e}`,selectorCandidateCopied:"Selector candidate copied",selectorCandidatePreview:e=>`Showing ${e} candidate matches`,selectorCandidateSaved:e=>`Candidate rule saved · ${e} targets`,selectorRiskStable:"Stable",selectorRiskPrecise:"Precise",selectorRiskPositional:"Positional",selectorRiskBroad:"Broad",selectorRiskAdvanced:"Advanced",selectorRiskComplex:"Complex",selectorRiskError:"Check",undoAction:"Undo",ruleUndoComplete:"Rule save undone",ruleUndoUnavailable:"No rule to undo.",ruleUndoFailed:"Undo failed",noChildElements:"No child elements.",inspectorUnavailable:"No selected element info.",noCookies:"No cookies to show.",cookieReadOnly:"Privacy mode shows cookie names and masked values only.",cookieScopeNotice:"Only cookies exposed by the browser are shown. Edits/deletes run within the current site scope.",cookieValuesMasked:"Cookie value protected",cookieCopy:"Copy",cookieEdit:"Edit",cookieDelete:"Delete",cookieEditPrompt:e=>`Enter a new value for the ${e} cookie. It will be saved on the current site with path=/.`,cookieDeleteConfirm:e=>`Delete the ${e} cookie?`,cookieUpdated:"Cookie updated",cookieDeleted:"Cookie deleted",cookieActionFailed:"Cookie action failed",resourceMetadataLabel:"Resource Metadata",resourceTypeLabel:"Type",resourceTimeLabel:"Time",resourceSizeLabel:"Size",resourceStartLabel:"Start",resourceOriginalUrlLabel:"Original URL",webglNoInfo:"No WebGL info",webglAvailable:"WebGL available",diagnosticLanguage:"Language",diagnosticTimezone:"Timezone",diagnosticScreen:"Screen",diagnosticViewport:"Viewport",diagnosticCpuThreads:"CPU threads",diagnosticMemory:"Memory",diagnosticResourceCount:"Resource count",inspectorSummaryTitle:"Summary",inspectorActionsTitle:"Actions",selectorCandidatesTitle:"Selector Candidates",similarSelectorLabel:"Similar selector",extractAttributeLabel:"Extract attribute value",focusSelectedRangeLabel:"Focus selected range",selectParentElementLabel:"Select parent element",childElementsLabel:e=>`${e} child elements`,viewAction:"View",computedStyleTitle:"Computed Style",scriptHintsTitle:"Script Hints",browserScreenTitle:"Browser and Screen",recentResourcesTitle:"Recent Resources",selectorSnapshotTitle:"Selector Candidates",selectorCandidatePrecise:"Precise",selectorCandidatePattern:"Pattern",selectorCandidateAttribute:"Attribute",selectorCandidateHint:"Hint",selectorCandidateClass:"Class",selectorCandidateResource:"Resource",selectorIntentPrecise:"Best for saving a single element",selectorIntentPattern:"Best for repeated cards or ad groups",selectorIntentAttribute:"Stable attribute based",selectorIntentHint:"Ad-like naming pattern based",selectorIntentAdvanced:"Dynamic ad/banner pattern based",selectorIntentClass:"Layout class based",selectorIntentResource:"URL or media attribute based",selectorQualityError:"Selector error",selectorQualityUnique:"Unique",selectorQualityMatch:e=>`${e} matches`,selectorQualityNoMatch:"No match",selectorRiskReasonBroadImpact:e=>`${e} elements affected. Preview before saving`,selectorRiskReasonBroadMatch:e=>`Blocks ${e} elements together`,selectorRiskReasonAdvanced:"Dynamic ad pattern based. Preview before saving",selectorRiskReasonPositional:"May break if page structure changes",selectorRiskReasonComplex:"Long path based. Maintain with care",selectorRiskReasonStable:"Fixed attribute based single match",selectorRiskReasonPrecise:"Single match for the current element",navParentDepth:e=>`${g.navParent} ${e}`,navChildDepth:e=>`${g.navChild} ${e}`,menuRecoverButtonMode:"Recover MES button mode",urlAvailableChip:"URL found",hostnameUnavailable:"Could not read the host name.",ruleCopyTitle:"Copy rule",ruleDeleteTitle:"Delete rule",tagSummaryLabel:"Tag",selectorSummaryLabel:"Selector",selectorNone:"None",matchSummaryLabel:"Matches",qualitySummaryLabel:"Quality",attributesSummaryLabel:"Attributes",noInlineEvents:"No inline events",accessibleStylesheetNotice:"Only accessible stylesheets are shown.",stylesheetInaccessible:"Inaccessible",noScripts:"No scripts",characterCountLabel:e=>`${e} chars`,noResources:"No resources",childElementsTitle:"Child Elements",selectAction:"Select",attributePrompt:"Enter the attribute name to extract.",attributeCopied:"Attribute value copied",attributeNotFound:"Attribute not found.",promptCopy:"Copy the selector manually:",alreadyHidden:"Element is already hidden.",previewDifferentElement:"Another element is being previewed.",ruleSavedReloading:"Rule saved. Applying...",ruleSavedApplyFailed:"Rule saved, but immediate apply failed.",ruleAddError:"Error adding rule:",ruleExists:"Rule already exists.",confirmBroadSelector:e=>`This selector matches ${e} elements. Save it anyway?`,confirmRiskSelector:(e,t)=>`Selector quality: ${e}\n${t}\nSave it anyway?`,listShowError:"Error while showing list",ruleDeleted:"Rule deleted",ruleDisabled:"Rule disabled",ruleEnabled:"Rule enabled",ruleDeleteError:"Failed to delete rule",noMatchingRules:"No search results.",blocklistSearchPlaceholder:"Search rules",blocklistDisable:"Disable",blocklistEnable:"Enable",blocklistCopySite:"Copy applied rules",blocklistCopyAll:"Copy all",blocklistDeleteSite:"Delete current site",blocklistPruneStale:"Clean no-match",blocklistSummary:(e,t,o=0)=>`Total ${e} · Current site ${t}${o?` · Disabled ${o}`:""}`,blocklistScopeCurrent:"Current site",blocklistScopeGlobal:"Global",blocklistScopeOther:"Other site",blocklistMatches:e=>`${e} matches`,blocklistNoMatch:"No match",blocklistDisabledChip:"Off",rulePreviewApplied:e=>`Showing ${e} affected elements`,rulePreviewUnavailable:"Preview unavailable on this site",clearPreviewAction:"Clear",rulesCopied:e=>`${e} rules copied`,confirmDeleteSiteRules:(e,t)=>`Delete ${t} saved rules for ${e}?`,confirmPruneStaleRules:e=>`Clean ${e} rules that no longer match this site?`,siteRulesDeleted:e=>`${e} current site rules deleted`,staleRulesDeleted:e=>`${e} no-match rules cleaned`,settingsSaved:"Settings saved",settingsSaveError:"Failed to save settings",backupStarting:"Starting rule backup download.",backupNoRules:"No rules to back up.",backupError:"Rule backup failed",restorePrompt:"Choose a JSON file to restore.",restoreSuccess:"Rules restored. Applying...",restoreSuccessDeduped:e=>`Rules restored. Removed ${e} duplicates`,restoreErrorInvalidFile:"Invalid file format or content.",restoreErrorGeneral:"Rule restore failed",blockingApplied:e=>`${e} rules applied`,blockingApplyError:"Error while applying rules",tempBlockingOn:"All rules temporarily disabled",tempBlockingOff:"Rules re-enabled"}),zh:m({panelTitle:"元素屏蔽",settingsTitle:"设置",listTitle:"已保存的屏蔽规则",selectedElementLabel:"已选元素(CSS 选择器)",parentLevelLabel:"元素路径",navRoot:"原始",navParent:"上级",navChild:"下级",copy:"复制",extractAction:"提取",copyRule:"规则",similarRule:"相似",preview:"预览",restorePreview:"恢复",saveRule:"保存",extractUrl:"URL",inspect:"检查",more:"更多",parent:"上级",child:"下级",list:"列表",settings:"设置",cancel:"取消",close:"关闭",sectionBasic:"基础",sectionBlocking:"屏蔽",sectionAdvanced:"高级",sectionBackup:"备份",uiLanguageLabel:"语言",languageSavedReloadNotice:"语言已保存。新打开的页面会应用完整界面语言。",inspectorTitle:"元素信息",inspectorTabElement:"元素",inspectorTabCode:"代码",inspectorTabPage:"页面",inspectorTabCookies:"Cookie",inspectorTabDiagnostics:"诊断",inspectorTabResources:"资源",copyInfo:"复制信息",includeSiteNameLabel:"规则包含站点名",useShieldIconLabel:"盾牌样式启动按钮",panelOpacityLabel:"面板透明度",toggleSizeLabel:"启动按钮大小",toggleOpacityLabel:"启动按钮透明度",tempDisableLabel:"临时停用全部规则",observeDomChangesLabel:"动态页面自动重新应用",lowPowerModeLabel:"低功耗模式",lowPowerModeNotice:"减少动态监控。屏蔽性能可能下降。",shadowDomSupportLabel:"Shadow DOM 遍历",selectorHintModeLabel:"增强选择器提示",privacyModeLabel:"保护敏感信息",autoCloseAfterCopyLabel:"复制后退出选择模式",compactPickerModeLabel:"选择后自动紧凑",launcherModeLabel:"打开方式",launcherButton:"按钮",launcherGesture:"手势",launcherGestureReady:e=>`手势打开:${e}`,gestureFingerCountLabel:"手指",gestureTapCountLabel:"点击",gestureTwoFingers:"双指",gestureThreeFingers:"三指",gestureTwoTaps:"两次",gestureThreeTaps:"三次",minimizePanel:"收起面板",expandPanel:"展开面板",hideStrategyLabel:"隐藏方式",hideStrategyDisplay:"移除",hideStrategyVisibility:"占位",hideStrategyOpacity:"透明",hideStrategyDisplayNotice:"优点:像移除元素一样隐藏,几乎不留下空白。缺点:可能触发布局重新计算,站点恢复 display 时需要重新应用。",hideStrategyVisibilityNotice:"优点:保留布局空间,减少页面跳动。缺点:会留下空白,点击屏蔽依赖 pointer-events。",hideStrategyOpacityNotice:"优点:对布局影响最小,过渡更平滑。缺点:空间仍会保留,可能留下视觉或辅助功能痕迹。",hideStrategyStylesheetNotice:"优点:通过 CSS 规则快速隐藏多个元素,适合动态页面。缺点:复杂选择器会回退为直接隐藏,样式被篡改时需要恢复监控。",backupLabel:"备份规则 (JSON)",restoreLabel:"恢复规则 (JSON)",togglePositionLabel:"启动按钮位置",toggleSelectorAria:"打开元素选择器",panelOpacityAria:"面板透明度",toggleSizeAria:"启动按钮大小",toggleOpacityAria:"启动按钮透明度",posTopLeft:"左上",posTopRight:"右上",posBottomLeft:"左下",posBottomRight:"右下",noRules:"没有已保存的规则。",noElementSelected:"尚未选择元素。",cannotGenerateSelector:"无法生成有效选择器。",isolateFocus:"聚焦查看",restoreFocus:"取消聚焦",focusModeOn:"仅显示已选元素",focusModeOff:"已取消聚焦查看",selectorCopied:"选择器已复制。",ruleCopied:"规则已复制",urlCopied:"URL 已复制",infoCopied:"元素信息已复制",sensitiveCopyConfirm:"可能包含敏感信息。仍要复制吗?",urlNotFound:"未找到 URL。",clipboardError:"复制到剪贴板失败",similarSelectorCopied:"相似选择器已复制",similarRuleReady:e=>`相似规则目标 ${e} 个`,selectorCandidateCopied:"选择器候选已复制",selectorCandidatePreview:e=>`正在显示 ${e} 个候选匹配`,selectorCandidateSaved:e=>`候选规则已保存 · ${e} 个目标`,selectorRiskStable:"稳定",selectorRiskPrecise:"精确",selectorRiskPositional:"依赖位置",selectorRiskBroad:"范围较宽",selectorRiskAdvanced:"高级模式",selectorRiskComplex:"复杂",selectorRiskError:"需确认",undoAction:"撤销",ruleUndoComplete:"已撤销规则保存",ruleUndoUnavailable:"没有可撤销的规则。",ruleUndoFailed:"撤销规则保存失败",noChildElements:"没有下级元素。",inspectorUnavailable:"没有已选元素信息。",noCookies:"没有可显示的 Cookie。",cookieReadOnly:"隐私模式仅显示 Cookie 名称和脱敏值。",cookieScopeNotice:"仅显示浏览器公开的 Cookie。编辑/删除会在当前站点允许的范围内执行。",cookieValuesMasked:"Cookie 值已保护",cookieCopy:"复制",cookieEdit:"编辑",cookieDelete:"删除",cookieEditPrompt:e=>`请输入 ${e} Cookie 的新值。将以当前站点 path=/ 保存。`,cookieDeleteConfirm:e=>`删除 ${e} Cookie 吗?`,cookieUpdated:"Cookie 已更新",cookieDeleted:"Cookie 已删除",cookieActionFailed:"Cookie 操作失败",resourceMetadataLabel:"资源元数据",resourceTypeLabel:"类型",resourceTimeLabel:"时间",resourceSizeLabel:"大小",resourceStartLabel:"开始",resourceOriginalUrlLabel:"原始 URL",webglNoInfo:"无 WebGL 信息",webglAvailable:"WebGL 可用",diagnosticLanguage:"语言",diagnosticTimezone:"时区",diagnosticScreen:"屏幕",diagnosticViewport:"视口",diagnosticCpuThreads:"CPU 线程",diagnosticMemory:"内存",diagnosticResourceCount:"资源数",inspectorSummaryTitle:"摘要",inspectorActionsTitle:"操作",selectorCandidatesTitle:"选择器候选",similarSelectorLabel:"相似选择器",extractAttributeLabel:"提取属性值",focusSelectedRangeLabel:"聚焦选择范围",selectParentElementLabel:"选择上级元素",childElementsLabel:e=>`${e} 个下级元素`,viewAction:"查看",computedStyleTitle:"计算样式",scriptHintsTitle:"脚本线索",browserScreenTitle:"浏览器与屏幕",recentResourcesTitle:"最近资源",selectorSnapshotTitle:"选择器候选",selectorCandidatePrecise:"精确",selectorCandidatePattern:"模式",selectorCandidateAttribute:"属性",selectorCandidateHint:"提示",selectorCandidateClass:"类",selectorCandidateResource:"资源",selectorIntentPrecise:"适合保存单个元素",selectorIntentPattern:"适合重复卡片或广告组",selectorIntentAttribute:"基于稳定属性",selectorIntentHint:"基于广告命名模式",selectorIntentAdvanced:"基于动态广告/横幅模式",selectorIntentClass:"基于布局类名",selectorIntentResource:"基于 URL 或媒体属性",selectorQualityError:"选择器错误",selectorQualityUnique:"唯一",selectorQualityMatch:e=>`${e} 个匹配`,selectorQualityNoMatch:"无匹配",selectorRiskReasonBroadImpact:e=>`影响 ${e} 个元素。建议保存前预览`,selectorRiskReasonBroadMatch:e=>`会同时屏蔽 ${e} 个元素`,selectorRiskReasonAdvanced:"基于动态广告模式。建议保存前预览",selectorRiskReasonPositional:"页面结构变化时可能失效",selectorRiskReasonComplex:"基于较长路径,维护时需注意",selectorRiskReasonStable:"基于固定属性的单一匹配",selectorRiskReasonPrecise:"当前元素的单一匹配",navParentDepth:e=>`${g.navParent} ${e}级`,navChildDepth:e=>`${g.navChild} ${e}级`,menuRecoverButtonMode:"恢复 MES 按钮模式",urlAvailableChip:"有 URL",hostnameUnavailable:"无法获取主机名。",ruleCopyTitle:"复制规则",ruleDeleteTitle:"删除规则",tagSummaryLabel:"标签",selectorSummaryLabel:"选择器",selectorNone:"无",matchSummaryLabel:"匹配",qualitySummaryLabel:"质量",attributesSummaryLabel:"属性",noInlineEvents:"没有内联事件",accessibleStylesheetNotice:"仅显示可访问的样式表。",stylesheetInaccessible:"无法访问",noScripts:"没有脚本",characterCountLabel:e=>`${e} 字`,noResources:"没有资源",childElementsTitle:"下级元素",selectAction:"选择",attributePrompt:"请输入要提取的属性名。",attributeCopied:"属性值已复制",attributeNotFound:"未找到属性。",promptCopy:"请手动复制选择器:",alreadyHidden:"该元素已隐藏。",previewDifferentElement:"另一个元素正在预览。",ruleSavedReloading:"规则已保存。正在应用...",ruleSavedApplyFailed:"规则已保存,但立即应用失败。",ruleAddError:"添加规则时出错:",ruleExists:"规则已存在。",confirmBroadSelector:e=>`该选择器匹配 ${e} 个元素。仍要保存吗?`,confirmRiskSelector:(e,t)=>`选择器质量:${e}\n${t}\n仍要保存吗?`,listShowError:"显示列表时出错",ruleDeleted:"规则已删除",ruleDisabled:"规则已停用",ruleEnabled:"规则已启用",ruleDeleteError:"规则删除失败",noMatchingRules:"没有搜索结果。",blocklistSearchPlaceholder:"搜索规则",blocklistDisable:"停用",blocklistEnable:"启用",blocklistCopySite:"复制适用规则",blocklistCopyAll:"复制全部",blocklistDeleteSite:"删除当前站点",blocklistPruneStale:"清理无匹配",blocklistSummary:(e,t,o=0)=>`全部 ${e} · 当前站点 ${t}${o?` · 已停用 ${o}`:""}`,blocklistScopeCurrent:"当前站点",blocklistScopeGlobal:"全局",blocklistScopeOther:"其他站点",blocklistMatches:e=>`${e} 个匹配`,blocklistNoMatch:"无匹配",blocklistDisabledChip:"关",rulePreviewApplied:e=>`正在显示 ${e} 个受影响元素`,rulePreviewUnavailable:"当前站点无法预览",clearPreviewAction:"清除",rulesCopied:e=>`${e} 条规则已复制`,confirmDeleteSiteRules:(e,t)=>`删除 ${e} 已保存的 ${t} 条规则吗?`,confirmPruneStaleRules:e=>`清理当前站点不再匹配的 ${e} 条规则吗?`,siteRulesDeleted:e=>`已删除当前站点 ${e} 条规则`,staleRulesDeleted:e=>`已清理 ${e} 条无匹配规则`,settingsSaved:"设置已保存",settingsSaveError:"设置保存失败",backupStarting:"开始下载规则备份文件。",backupNoRules:"没有可备份的规则。",backupError:"规则备份失败",restorePrompt:"请选择要恢复的 JSON 文件。",restoreSuccess:"规则恢复完成。正在应用...",restoreSuccessDeduped:e=>`规则恢复完成。已移除 ${e} 条重复规则`,restoreErrorInvalidFile:"文件格式或内容无效。",restoreErrorGeneral:"规则恢复失败",blockingApplied:e=>`已应用 ${e} 条规则`,blockingApplyError:"应用规则时出错",tempBlockingOn:"已临时停用全部规则",tempBlockingOff:"规则已重新启用"}),ja:m({panelTitle:"要素ブロック",settingsTitle:"設定",listTitle:"保存済みブロックルール",selectedElementLabel:"選択した要素(CSS セレクタ)",parentLevelLabel:"要素パス",navRoot:"元",navParent:"親",navChild:"子",copy:"コピー",extractAction:"抽出",copyRule:"ルール",similarRule:"類似",preview:"プレビュー",restorePreview:"復元",saveRule:"保存",extractUrl:"URL",inspect:"検査",more:"その他",parent:"親",child:"子",list:"一覧",settings:"設定",cancel:"取消",close:"閉じる",sectionBasic:"基本",sectionBlocking:"ブロック",sectionAdvanced:"詳細",sectionBackup:"バックアップ",uiLanguageLabel:"言語",languageSavedReloadNotice:"言語設定を保存しました。新しく開くページから全体の UI に適用されます。",inspectorTitle:"要素情報",inspectorTabElement:"要素",inspectorTabCode:"コード",inspectorTabPage:"ページ",inspectorTabCookies:"Cookie",inspectorTabDiagnostics:"診断",inspectorTabResources:"リソース",copyInfo:"情報をコピー",includeSiteNameLabel:"ルールにサイト名を含める",useShieldIconLabel:"シールド風ランチャー",panelOpacityLabel:"パネル透明度",toggleSizeLabel:"ランチャーサイズ",toggleOpacityLabel:"ランチャー透明度",tempDisableLabel:"すべてのルールを一時停止",observeDomChangesLabel:"動的ページで自動再適用",lowPowerModeLabel:"低負荷モード",lowPowerModeNotice:"動的監視を減らします。ブロック性能が低下する場合があります。",shadowDomSupportLabel:"Shadow DOM 探索",selectorHintModeLabel:"強化セレクタヒント",privacyModeLabel:"機密情報を保護",autoCloseAfterCopyLabel:"コピー後に選択モード終了",compactPickerModeLabel:"選択後に自動縮小",launcherModeLabel:"開き方",launcherButton:"ボタン",launcherGesture:"ジェスチャー",launcherGestureReady:e=>`ジェスチャーで開く: ${e}`,gestureFingerCountLabel:"指",gestureTapCountLabel:"タップ",gestureTwoFingers:"2本指",gestureThreeFingers:"3本指",gestureTwoTaps:"2回",gestureThreeTaps:"3回",minimizePanel:"パネルを縮小",expandPanel:"パネルを展開",hideStrategyLabel:"非表示方式",hideStrategyDisplay:"除去",hideStrategyVisibility:"空間",hideStrategyOpacity:"透明",hideStrategyDisplayNotice:"長所: 要素を取り除くように隠すため、空白がほとんど残りません。短所: レイアウト再計算が大きくなり、display を戻された場合は再適用が必要です。",hideStrategyVisibilityNotice:"長所: レイアウト空間を保つため画面の揺れが少なくなります。短所: 空白が残り、クリック遮断は pointer-events に依存します。",hideStrategyOpacityNotice:"長所: レイアウト変化が最も少なく滑らかです。短所: 空間は残り、見た目やアクセシビリティ上の痕跡が残る場合があります。",hideStrategyStylesheetNotice:"長所: CSS ルールで複数要素をすばやく隠せるため、動的ページに効率的です。短所: 複雑なセレクタは直接非表示に戻り、スタイル改変には復旧監視が必要です。",backupLabel:"ルールをバックアップ (JSON)",restoreLabel:"ルールを復元 (JSON)",togglePositionLabel:"ランチャー位置",toggleSelectorAria:"要素セレクタを開く",panelOpacityAria:"パネル透明度",toggleSizeAria:"ランチャーサイズ",toggleOpacityAria:"ランチャー透明度",posTopLeft:"左上",posTopRight:"右上",posBottomLeft:"左下",posBottomRight:"右下",noRules:"保存済みルールはありません。",noElementSelected:"要素が選択されていません。",cannotGenerateSelector:"有効なセレクタを生成できません。",isolateFocus:"集中表示",restoreFocus:"集中解除",focusModeOn:"選択要素のみ表示中",focusModeOff:"集中表示を解除しました",selectorCopied:"セレクタをコピーしました。",ruleCopied:"ルールをコピーしました",urlCopied:"URL をコピーしました",infoCopied:"要素情報をコピーしました",sensitiveCopyConfirm:"機密情報が含まれる可能性があります。コピーしますか?",urlNotFound:"URL が見つかりません。",clipboardError:"クリップボードへのコピーに失敗しました",similarSelectorCopied:"類似セレクタをコピーしました",similarRuleReady:e=>`類似ルールの対象 ${e} 件`,selectorCandidateCopied:"セレクタ候補をコピーしました",selectorCandidatePreview:e=>`${e} 件の候補一致を表示中`,selectorCandidateSaved:e=>`候補ルールを保存しました · ${e} 件対象`,selectorRiskStable:"安定",selectorRiskPrecise:"精密",selectorRiskPositional:"位置依存",selectorRiskBroad:"広範囲",selectorRiskAdvanced:"高度パターン",selectorRiskComplex:"複雑",selectorRiskError:"確認必要",undoAction:"元に戻す",ruleUndoComplete:"ルール保存を取り消しました",ruleUndoUnavailable:"元に戻すルールがありません。",ruleUndoFailed:"ルール保存の取り消しに失敗しました",noChildElements:"子要素はありません。",inspectorUnavailable:"選択要素の情報がありません。",noCookies:"表示できる Cookie はありません。",cookieReadOnly:"プライバシーモードでは Cookie 名とマスク済みの値のみ表示します。",cookieScopeNotice:"ブラウザが公開した Cookie のみ表示されます。編集/削除は現在のサイト範囲で実行されます。",cookieValuesMasked:"Cookie 値は保護されています",cookieCopy:"コピー",cookieEdit:"編集",cookieDelete:"削除",cookieEditPrompt:e=>`${e} Cookie の新しい値を入力してください。現在のサイトの path=/ として保存されます。`,cookieDeleteConfirm:e=>`${e} Cookie を削除しますか?`,cookieUpdated:"Cookie を更新しました",cookieDeleted:"Cookie を削除しました",cookieActionFailed:"Cookie 操作に失敗しました",resourceMetadataLabel:"リソースメタデータ",resourceTypeLabel:"種類",resourceTimeLabel:"時間",resourceSizeLabel:"サイズ",resourceStartLabel:"開始",resourceOriginalUrlLabel:"元 URL",webglNoInfo:"WebGL 情報なし",webglAvailable:"WebGL 利用可能",diagnosticLanguage:"言語",diagnosticTimezone:"タイムゾーン",diagnosticScreen:"画面",diagnosticViewport:"ビューポート",diagnosticCpuThreads:"CPU スレッド",diagnosticMemory:"メモリ",diagnosticResourceCount:"リソース数",inspectorSummaryTitle:"概要",inspectorActionsTitle:"操作",selectorCandidatesTitle:"セレクタ候補",similarSelectorLabel:"類似セレクタ",extractAttributeLabel:"属性値を抽出",focusSelectedRangeLabel:"選択範囲を集中表示",selectParentElementLabel:"親要素を選択",childElementsLabel:e=>`子要素 ${e} 件`,viewAction:"表示",computedStyleTitle:"計算済みスタイル",scriptHintsTitle:"スクリプト手がかり",browserScreenTitle:"ブラウザと画面",recentResourcesTitle:"最近のリソース",selectorSnapshotTitle:"セレクタ候補",selectorCandidatePrecise:"精密",selectorCandidatePattern:"パターン",selectorCandidateAttribute:"属性",selectorCandidateHint:"ヒント",selectorCandidateClass:"クラス",selectorCandidateResource:"リソース",selectorIntentPrecise:"単一要素の保存に適しています",selectorIntentPattern:"繰り返しカードや広告グループに適しています",selectorIntentAttribute:"安定した属性ベース",selectorIntentHint:"広告らしい命名パターンベース",selectorIntentAdvanced:"動的広告/バナーパターンベース",selectorIntentClass:"レイアウトクラスベース",selectorIntentResource:"URL またはメディア属性ベース",selectorQualityError:"セレクタエラー",selectorQualityUnique:"一意",selectorQualityMatch:e=>`${e} 件一致`,selectorQualityNoMatch:"一致なし",selectorRiskReasonBroadImpact:e=>`${e} 個の要素に影響します。保存前のプレビューを推奨`,selectorRiskReasonBroadMatch:e=>`${e} 個の要素をまとめてブロック`,selectorRiskReasonAdvanced:"動的広告パターンベース。保存前のプレビューを推奨",selectorRiskReasonPositional:"ページ構造の変更に弱い場合があります",selectorRiskReasonComplex:"長いパスベースのため保守に注意",selectorRiskReasonStable:"固定属性ベースの単一一致",selectorRiskReasonPrecise:"現在の要素への単一一致",navParentDepth:e=>`${g.navParent} ${e}階層`,navChildDepth:e=>`${g.navChild} ${e}階層`,menuRecoverButtonMode:"MES ボタンモードを復旧",urlAvailableChip:"URL あり",hostnameUnavailable:"ホスト名を取得できません。",ruleCopyTitle:"ルールをコピー",ruleDeleteTitle:"ルールを削除",tagSummaryLabel:"タグ",selectorSummaryLabel:"セレクタ",selectorNone:"なし",matchSummaryLabel:"一致",qualitySummaryLabel:"品質",attributesSummaryLabel:"属性",noInlineEvents:"インラインイベントなし",accessibleStylesheetNotice:"アクセス可能なスタイルシートのみ表示します。",stylesheetInaccessible:"アクセス不可",noScripts:"スクリプトなし",characterCountLabel:e=>`${e} 文字`,noResources:"リソースなし",childElementsTitle:"子要素",selectAction:"選択",attributePrompt:"抽出する属性名を入力してください。",attributeCopied:"属性値をコピーしました",attributeNotFound:"属性が見つかりません。",promptCopy:"セレクタを手動でコピーしてください:",alreadyHidden:"この要素はすでに非表示です。",previewDifferentElement:"別の要素をプレビュー中です。",ruleSavedReloading:"ルールを保存しました。適用中...",ruleSavedApplyFailed:"ルールは保存しましたが、即時適用に失敗しました。",ruleAddError:"ルール追加中にエラー:",ruleExists:"すでに保存済みのルールです。",confirmBroadSelector:e=>`このセレクタは ${e} 個の要素に一致します。このまま保存しますか?`,confirmRiskSelector:(e,t)=>`セレクタ品質: ${e}\n${t}\nこのまま保存しますか?`,listShowError:"一覧表示中にエラーが発生しました",ruleDeleted:"ルールを削除しました",ruleDisabled:"ルールを無効化しました",ruleEnabled:"ルールを有効化しました",ruleDeleteError:"ルール削除に失敗しました",noMatchingRules:"検索結果はありません。",blocklistSearchPlaceholder:"ルール検索",blocklistDisable:"停止",blocklistEnable:"使用",blocklistCopySite:"適用ルールをコピー",blocklistCopyAll:"すべてコピー",blocklistDeleteSite:"現在のサイトを削除",blocklistPruneStale:"未一致を整理",blocklistSummary:(e,t,o=0)=>`全体 ${e} · 現在のサイト ${t}${o?` · 無効 ${o}`:""}`,blocklistScopeCurrent:"現在のサイト",blocklistScopeGlobal:"全体",blocklistScopeOther:"他のサイト",blocklistMatches:e=>`${e} 件一致`,blocklistNoMatch:"一致なし",blocklistDisabledChip:"オフ",rulePreviewApplied:e=>`影響する要素 ${e} 件を表示中`,rulePreviewUnavailable:"現在のサイトではプレビューできません",clearPreviewAction:"解除",rulesCopied:e=>`${e} 件のルールをコピーしました`,confirmDeleteSiteRules:(e,t)=>`${e} に保存された ${t} 件のルールを削除しますか?`,confirmPruneStaleRules:e=>`現在のサイトで一致しない ${e} 件のルールを整理しますか?`,siteRulesDeleted:e=>`現在のサイトのルール ${e} 件を削除しました`,staleRulesDeleted:e=>`未一致ルール ${e} 件を整理しました`,settingsSaved:"設定を保存しました",settingsSaveError:"設定の保存に失敗しました",backupStarting:"ルールバックアップのダウンロードを開始します。",backupNoRules:"バックアップするルールがありません。",backupError:"ルールバックアップに失敗しました",restorePrompt:"復元する JSON ファイルを選択してください。",restoreSuccess:"ルールの復元が完了しました。適用中...",restoreSuccessDeduped:e=>`ルールの復元が完了しました。重複 ${e} 件を削除しました`,restoreErrorInvalidFile:"ファイル形式または内容が正しくありません。",restoreErrorGeneral:"ルール復元に失敗しました",blockingApplied:e=>`${e} 件のルールを適用しました`,blockingApplyError:"ルール適用中にエラーが発生しました",tempBlockingOn:"すべてのルールを一時停止しました",tempBlockingOff:"ルールを再有効化しました"})};let g=u;function h(e){return Object.keys(b).includes(e)?e:"ko"}function y(e=v.uiLanguage){g=b[h(e)]||u}const f={uiLanguage:"ko",includeSiteName:!0,panelOpacity:.94,toggleSizeScale:1,toggleOpacity:.62,showShieldIcon:!1,tempBlockingDisabled:!1,observeDomChanges:!0,lowPowerMode:!1,shadowDomSupport:!0,selectorHintMode:!0,privacyMode:!0,autoCloseAfterCopy:!1,compactPickerMode:!0,hideToggleButton:!1,twoFingerGesture:!1,gestureFingerCount:2,gestureTapCount:2,hideStrategy:"stylesheet",toggleBtnCorner:"bottom-right",debugLogging:!1};let v={};const k="mobileElementSelectorSettings_v1_2",w="mobileBlockedSelectors_v2",x="mobileDisabledSelectors_v1";function S(...e){!0===v.debugLogging&&console.log(...e)}function $(e){try{if("object"==typeof GM&&GM&&"function"==typeof GM[e])return GM[e].bind(GM)}catch(t){}return"function"==typeof globalThis.GM?.[e]?globalThis.GM[e].bind(globalThis.GM):null}function C(e){try{if("getValue"===e&&"function"==typeof GM_getValue)return GM_getValue;if("setValue"===e&&"function"==typeof GM_setValue)return GM_setValue;if("setClipboard"===e&&"function"==typeof GM_setClipboard)return GM_setClipboard}catch(t){}return"getValue"===e&&"function"==typeof globalThis.GM_getValue?globalThis.GM_getValue:"setValue"===e&&"function"==typeof globalThis.GM_setValue?globalThis.GM_setValue:"setClipboard"===e&&"function"==typeof globalThis.GM_setClipboard?globalThis.GM_setClipboard:null}function L(){return!(!C("getValue")&&!$("getValue")||!C("setValue")&&!$("setValue"))}function E(e){try{return localStorage.getItem(e)}catch(t){return null}}function R(e){try{localStorage.removeItem(e)}catch(t){}}function A(e){if(!e)return[];try{const t=JSON.parse(e);return Array.isArray(t)?t:[]}catch(t){return[]}}async function T(e,t){const o=C("getValue");if(o)return o(e,t);const n=$("getValue");if(n)return n(e,t);try{const o=localStorage.getItem(e);return null===o?t:o}catch(r){}return t}async function M(e,t){const o=C("setValue");if(o)return o(e,t);const n=$("setValue");if(n)return n(e,t);try{localStorage.setItem(e,t)}catch(r){}}async function P(){let t={};try{let e=await T(k,null);if(!e&&L()){const t=E(k);t&&(e=t,await M(k,t),R(k))}e||(e=JSON.stringify(f)),t=JSON.parse(e||"{}")}catch(n){console.error(e,`Error loading settings from storage key '${k}', using defaults.`,n),t={...f}}v={...f,...t},v.panelOpacity=parseFloat(v.panelOpacity),(isNaN(v.panelOpacity)||v.panelOpacity<.1||v.panelOpacity>1)&&(v.panelOpacity=f.panelOpacity),v.toggleSizeScale=parseFloat(v.toggleSizeScale),(isNaN(v.toggleSizeScale)||v.toggleSizeScale<.75||v.toggleSizeScale>2)&&(v.toggleSizeScale=f.toggleSizeScale),v.toggleOpacity=parseFloat(v.toggleOpacity),(isNaN(v.toggleOpacity)||v.toggleOpacity<.1||v.toggleOpacity>1)&&(v.toggleOpacity=f.toggleOpacity),v.includeSiteName="boolean"==typeof v.includeSiteName?v.includeSiteName:f.includeSiteName;const o="showAdguardLogo";v.showShieldIcon="boolean"==typeof v.showShieldIcon?v.showShieldIcon:"boolean"==typeof v[o]?v[o]:f.showShieldIcon,delete v[o],v.tempBlockingDisabled="boolean"==typeof v.tempBlockingDisabled?v.tempBlockingDisabled:f.tempBlockingDisabled,v.observeDomChanges="boolean"==typeof v.observeDomChanges?v.observeDomChanges:f.observeDomChanges,v.lowPowerMode="boolean"==typeof v.lowPowerMode?v.lowPowerMode:f.lowPowerMode,v.shadowDomSupport="boolean"==typeof v.shadowDomSupport?v.shadowDomSupport:f.shadowDomSupport,v.selectorHintMode="boolean"==typeof v.selectorHintMode?v.selectorHintMode:f.selectorHintMode,v.privacyMode="boolean"==typeof v.privacyMode?v.privacyMode:f.privacyMode,v.autoCloseAfterCopy="boolean"==typeof v.autoCloseAfterCopy?v.autoCloseAfterCopy:f.autoCloseAfterCopy,v.compactPickerMode="boolean"==typeof v.compactPickerMode?v.compactPickerMode:f.compactPickerMode,v.hideToggleButton="boolean"==typeof v.hideToggleButton?v.hideToggleButton:f.hideToggleButton,v.twoFingerGesture="boolean"==typeof v.twoFingerGesture?v.twoFingerGesture:f.twoFingerGesture,v.twoFingerGesture=!!v.hideToggleButton,v.gestureFingerCount=parseInt(v.gestureFingerCount,10),[2,3].includes(v.gestureFingerCount)||(v.gestureFingerCount=f.gestureFingerCount),v.gestureTapCount=parseInt(v.gestureTapCount,10),[2,3].includes(v.gestureTapCount)||(v.gestureTapCount=f.gestureTapCount),["stylesheet","display","visibility","opacity"].includes(v.hideStrategy)||(v.hideStrategy=f.hideStrategy),["top-left","top-right","bottom-left","bottom-right"].includes(v.toggleBtnCorner)||(v.toggleBtnCorner=f.toggleBtnCorner),v.debugLogging=!0===v.debugLogging,v.uiLanguage=h(v.uiLanguage),y(v.uiLanguage),S(e,"Settings loaded:",v)}async function N(){try{return await M(k,JSON.stringify(v)),S(e,"Settings saved:",v),!0}catch(t){return console.error(e,`Error saving settings to storage key '${k}'`,t),wt(g.settingsSaveError,"error"),!1}}const D=["data-testid","data-cy","data-test-id","data-test","name","aria-label","alt","title","placeholder","type"],z=["href","src","data-src","data-original","poster","action"],B=["srcset","data-srcset"],I=/active|select|selected|focus|hover|disabled|checked|open|closed|visible|hidden|loading|transition|animate|animating|enter|leave|js-|ui-|css-|style-/i,O=/(?:^|[-_])(?:ember|react|vue|ng|svelte|random|hash|uuid|nonce|temp|tmp)(?:[-_]|$)|[a-f0-9]{7,}|[_-]?\d{3,}/i,F=/(ad|ads|advert|banner|sponsor|promoted|promotion|popup|pop|modal|overlay|interstitial|notice|recommend|related|widget|slot|wing)/i,q=["ad","ads","advert","advertise","advertisement","banner","sponsor","sponsored","promoted","promotion","popup","pop","modal","overlay","interstitial","recommend","related","widget","slot","wing","click"],U=/^(?:address|admin|adapter|badge|header|reader|ready|shadow|download|upload|load|lead)$/i,H=/^:mes-shadow\("([^"]+)"\)\s*>>>\s*(.+)$/,G="mes-rule-style",j="data-mes-style-owner",Z="blocking",V="mes-ui-style",_="picky_blocked_rules";function W(e){return String(e).replace(/\\/g,"\\\\").replace(/"/g,'\\"').trim()}function J(e){const t=String(e??"");return"function"==typeof globalThis.CSS?.escape?globalThis.CSS.escape(t):t.replace(/^(-?\d)/,e=>Array.from(e).map(e=>`\\${e.charCodeAt(0).toString(16)} `).join("")).replace(/[^a-zA-Z0-9_-]/g,"\\$&")}function Q(e){return"undefined"!=typeof ShadowRoot&&e instanceof ShadowRoot}function Y(e){if(!e)return!1;const t=String(e).trim();return t.length>0&&t.length<=120&&!/[\n\r]/.test(t)}function X(e){const t=e?.ownerDocument||document;if(!v.shadowDomSupport||!e||"function"!=typeof e.getRootNode)return t;const o=e.getRootNode();return Q(o)?o:t}function K(e,t,o,n=0){if(!e||n>4)return null;let r=null;try{r=e.elementFromPoint(t,o)}catch(i){return null}if(!r)return null;if(v.shadowDomSupport)for(;r&&r.shadowRoot&&"function"==typeof r.shadowRoot.elementFromPoint;){const e=r.shadowRoot.elementFromPoint(t,o);if(!e||e===r)break;r=e}if("IFRAME"===r?.tagName){const e=function(e){try{return e?.contentDocument||e?.contentWindow?.document||null}catch(i){return null}}(r);if(e){const i=r.getBoundingClientRect(),a=K(e,t-i.left,o-i.top,n+1);if(a)return a}}return r}function ee(e,t){const o=Ve?.isConnected&&"none"!==getComputedStyle(Ve).pointerEvents,n=o?Ve.style.pointerEvents:"";o&&Ve.style.setProperty("pointer-events","none","important");try{return K(document,e,t)}finally{o&&(n?Ve.style.pointerEvents=n:Ve.style.removeProperty("pointer-events"))}}function te(e){if(!e)return null;if(e.parentElement)return e.parentElement;const t=v.shadowDomSupport&&"function"==typeof e.getRootNode?e.getRootNode():null;return Q(t)?t.host:null}function oe(e,t){return e?e.parentElement?e.parentElement:Q(t)?null:te(e):null}function ne(e){return e?v.shadowDomSupport&&e.shadowRoot?Array.from(e.shadowRoot.children).filter(e=>!so(e)):Array.from(e.children||[]).filter(e=>!so(e)):[]}function re(e=document,t=[]){return(e.querySelectorAll?e.querySelectorAll("*"):[]).forEach(e=>{t.length>=80||e.shadowRoot&&(t.push(e.shadowRoot),re(e.shadowRoot,t))}),t}function ie(e=document,t=null){if(t&&e===document)return t;const o=[e];return v.shadowDomSupport&&e?.querySelectorAll&&o.push(...re(e)),o}function ae(e){const t="string"==typeof e?e.match(H):null;if(!t)return null;const o=t[1].split("|").map(e=>{try{return decodeURIComponent(e)}catch(t){return""}}).filter(Boolean),n=t[2]?.trim();return o.length&&n?{hostSelectors:o,localSelector:n}:null}function se(e,t){const o=function(e){if(!v.shadowDomSupport||!e||"function"!=typeof e.getRootNode)return[];const t=[];let o=e.getRootNode();for(;Q(o)&&o.host;)t.unshift(o.host),o="function"==typeof o.host.getRootNode?o.host.getRootNode():o.host.ownerDocument||document;return t}(e);if(!o.length||!t)return t;const n=o.map(e=>ko(e,7,!0)).filter(Boolean);return n.length!==o.length?t:`:mes-shadow("${function(e){return e.map(e=>encodeURIComponent(e)).join("|")}(n)}") >>> ${t}`}function le(e,t=document){if(!e)return[];let o=[t||document];return e.hostSelectors.forEach(e=>{const t=[];o.forEach(o=>{try{o.querySelectorAll(e).forEach(e=>{e.shadowRoot&&!e.closest?.(".mobile-block-ui")&&t.push(e.shadowRoot)})}catch(n){}}),o=t}),o.filter(e=>Q(e))}function ce(e,t=document,o=null){if(ae(e))return function(e,t=document){const o=ae(e);if(!o)return[];const n=le(o,t),r=[],i=new Set;return n.forEach(e=>{try{e.querySelectorAll(o.localSelector).forEach(e=>{i.has(e)||e.closest?.(".mobile-block-ui")||(i.add(e),r.push(e))})}catch(t){}}),r}(e,t);const n=[],r=new Set;return ie(t,o).forEach(t=>{if(!(n.length>=600))try{t.querySelectorAll(e).forEach(e=>{n.length>=600||!r.has(e)&&lo(e)&&(r.add(e),n.push(e))})}catch(o){}}),n}function de(e,t=document){if(!e)return 0;try{return ce(e,t).length}catch(o){return-1}}function pe(e,t,o=""){const n=e.getAttribute(t);return Y(n)?`${o||e.tagName.toLowerCase()}[${t}="${W(n)}"]`:""}function ue(e,t,o,n){for(const r of D){if(!e.hasAttribute(r))continue;const i=pe(e,r,t);if(i){if(!n)return i;if(1===de(i,o))return i}}return""}function me(e,t,o){if(!v.selectorHintMode)return"";const n=[],r=e.id||"";if(F.test(r)){const e=r.replace(O,"").slice(0,32);e.length>=3&&n.push(`${t}[id^="${W(e)}"]`);const o=r.match(F);o?.[0]?.length>=2&&n.push(`${t}[id*="${W(o[0])}"]`)}Array.from(e.classList||[]).forEach(e=>{F.test(e)&&!O.test(e)&&n.push(`${t}.${J(e)}`)}),["src","href"].forEach(o=>{const r=e.getAttribute?.(o);if(r&&F.test(r))try{const e=new URL(r,location.href).pathname.split("/").pop();e&&e.length>=4&&n.push(`${t}[${o}*="${W(e)}"]`)}catch(i){}});for(const i of n){const t=ce(i,o);if(t.length>0&&t.length<=20&&t.includes(e))return i}return""}function be(e){const t=String(e||"").toLowerCase();if(!t)return[];const o=t.split(/[^a-z0-9]+/i).map(e=>e.trim()).filter(e=>e.length>=2&&e.length<=48&&!U.test(e)),n=[],r=e=>{e&&!n.includes(e)&&n.push(e)};o.forEach(e=>{(q.includes(e)||/^(?:ad|ads|advert|banner|sponsor|sponsored|promot|popup|modal|overlay|interstitial|recommend|related|widget|slot|wing|click)/i.test(e)||/(?:ad|ads|advert|banner|sponsor|sponsored|promot|popup|overlay|interstitial|recommend|related|widget|slot|wing|click)$/i.test(e))&&r(e)});const i=t.match(/(?:advertisement|advertise|sponsored|sponsor|promoted|promotion|banner|popup|overlay|interstitial|recommend|related|widget|slot|wing|click)/i);return i&&!U.test(i[0])&&r(i[0].toLowerCase()),n.slice(0,3)}function ge(e){const t=String(e||"").trim();if(!t)return"";const o=t.search(/(?:[-_])?(?:random|hash|uuid|nonce|temp|tmp|[a-f0-9]{7,}|\d{3,})/i),n=o>0?t.slice(0,o).replace(/[-_]+$/g,""):"";return n.length>=2&&be(n).length?n.slice(0,48):be(t).find(e=>e.length>=2)||""}function he(e,t){for(const n of z){const r=e.getAttribute?.(n);if(!r||r.length>360)continue;const i=be(r);if(i.length)try{const e=new URL(r,location.href).pathname.toLowerCase().split("/").filter(Boolean).find(e=>be(e).length)||i.find(e=>e.length>=3)||i[0];if(e&&e.length>=2)return`${t}[${n}*="${W(e)}"]`}catch(o){const e=i.find(e=>e.length>=3)||i[0];if(e)return`${t}[${n}*="${W(e)}"]`}}return""}function ye(e){return Array.from(e.classList||[]).filter(e=>e&&e.length>2&&!/^[a-z]{1,2}$/i.test(e)&&!I.test(e)&&!O.test(e)&&!/^[A-Z0-9]{4,}$/.test(e)&&!e.includes("--")&&!e.includes("__")&&![t,o,n,i,a,s,"mobile-block-ui"].some(t=>e.includes(t))).slice(0,2)}function fe(e){if("string"!=typeof e)return null;const t=e.indexOf("##");return t<0?null:{domain:e.slice(0,t).trim(),selector:e.slice(t+2).trim()}}function ve(e,t=location.hostname){const o=fe(e);return!(!o||!o.selector)&&(!o.domain||"*"===o.domain||t===o.domain||t.endsWith(`.${o.domain}`))}function ke(e,t=location.hostname){const o=fe(e);return!!o?.domain&&"*"!==o.domain&&(t===o.domain||t.endsWith(`.${o.domain}`))}function we(e){const t=new Set,o=[];let n=0,r=0;return(Array.isArray(e)?e:[]).forEach(e=>{const i=fe("string"==typeof e?e.trim():"");if(!i||!i.selector)return void n++;const a=`${i.domain}##${i.selector}`;t.has(a)?r++:(t.add(a),o.push(a))}),{rules:o,invalidCount:n,duplicateCount:r}}function xe(e){if(!e)return{};if("string"==typeof e)try{const t=JSON.parse(e);return t&&"object"==typeof t&&!Array.isArray(t)?t:{}}catch(t){return{}}return e&&"object"==typeof e&&!Array.isArray(e)?e:{}}const Se=new Set(["version","exportedAt","settings","rules","disabledRules"]);function $e(e){const t=xe(e),o=[];let n=0;Object.entries(t).forEach(([e,t])=>{const r="string"==typeof e?e.trim():"";(function(e){const t="string"==typeof e?e.trim():"";return!!t&&!/[\s#{}]/.test(t)})(r)&&Array.isArray(t)?t.map(e=>"string"==typeof e?e.trim():"").forEach(e=>{!function(e){const t="string"==typeof e?e.trim():"";return!!t&&!/[\n\r{}]/.test(t)}(e)?n++:o.push(`${r}##${e}`)}):n++});const r=we(o);return{rules:r.rules,invalidCount:n+r.invalidCount,duplicateCount:r.duplicateCount}}function Ce(t,o=g.promptCopy){try{if(!function(t){const o=C("setClipboard");if(o)return o(t),!0;const n=$("setClipboard");return n?(n(t),!0):!(!navigator.clipboard?.writeText||!window.isSecureContext||(navigator.clipboard.writeText(t).catch(t=>console.warn(e,"Clipboard API write failed:",t)),0))}(t))throw new Error("No clipboard API available");return!0}catch(n){console.error(e,"Clipboard write failed:",n);try{prompt(o,t)}catch(r){}return!1}}function Le(e){const t=String(e||"").trim();if(!t)return"";const o=t.split(",").map(e=>e.trim()).find(Boolean);return o?(o.match(/^(\S+)/)?.[1]||"").replace(/^['"]|['"]$/g,""):""}function Ee(e){let t=e;for(let n=0;t&&n<6;n++){for(const e of z){const n=t.getAttribute?.(e);if(Y(n))try{return new URL(n,location.href).href}catch(o){return n}}for(const e of B){const n=t.getAttribute?.(e),r=Le(n);if(r)try{return new URL(r,location.href).href}catch(o){return r}}try{const e=window.getComputedStyle(t).backgroundImage,o=e&&e.match(/url\(["']?([^"')]+)["']?\)/);if(o?.[1])return new URL(o[1],location.href).href}catch(o){}t=te(t)}return""}function Re(){return`\n.${t} {\n outline: 3px solid #ffb4ab !important;\n outline-offset: 2px;\n box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45) !important;\n background-color: rgba(255, 82, 82, 0.15) !important;\n transition: background-color 0.1s ease, outline 0.1s ease, box-shadow 0.1s ease;\n pointer-events: none;\n}\n.${n} {\n outline: 3px solid #34c759 !important;\n outline-offset: 2px;\n box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.22) !important;\n background-color: rgba(52, 199, 89, 0.12) !important;\n transition: background-color 0.12s ease, outline 0.12s ease, box-shadow 0.12s ease;\n}`}function Ae(e){const t=e?.ownerDocument||document;if(t!==document&&function(e=document){if(!e?.head||e.getElementById?.("mes-selection-highlight-style"))return;const t=e.createElement("style");t.id="mes-selection-highlight-style",t.textContent=Re(),e.head.appendChild(t)}(t),!v.shadowDomSupport||!e||"function"!=typeof e.getRootNode)return;const o=e.getRootNode();if(!Q(o)||o.getElementById("mes-shadow-highlight-style"))return;const n=(o.host?.ownerDocument||t).createElement("style");n.id="mes-shadow-highlight-style",n.textContent=Re(),o.appendChild(n)}function Te(e){e&&(Ae(e),e.classList.add(t))}function Me(e){e&&e.classList.remove(t)}function Pe(e=document){const t="mes-isolation-style";if(e.getElementById?.(t))return;const o=document.createElement("style");o.id=t,o.textContent=Q(e)?`\n:host(.${s}) * {\n visibility: hidden !important;\n}\n:host(.${s}) .${i},\n:host(.${s}) .${a},\n:host(.${s}) .${a} * {\n visibility: visible !important;\n}`:`\nhtml.${r} body * {\n visibility: hidden !important;\n}\nhtml.${r} .${i},\nhtml.${r} .${a},\nhtml.${r} .${a} *,\nhtml.${r} .mobile-block-ui,\nhtml.${r} .mobile-block-ui * {\n visibility: visible !important;\n}`,(e.head||e).appendChild(o)}function Ne(){document.documentElement.classList.remove(r),Lt.forEach(e=>{e?.classList?.remove(i,a)}),Et.forEach(e=>{e?.classList?.remove(s)}),Lt.clear(),Et.clear(),Ct=!1}function De(e,t){let o=e;for(;o&&1===o.nodeType&&(o.classList.add(i),Lt.add(o),o!==t?.body&&null!==o.parentElement);)o=o.parentElement}const ze=document.createElement("style");function Be(){document.documentElement.style.setProperty("--panel-opacity",v.panelOpacity),document.documentElement.style.setProperty("--toggle-size",28*v.toggleSizeScale+"px"),document.documentElement.style.setProperty("--toggle-hitbox-size","44px"),document.documentElement.style.setProperty("--toggle-opacity",v.toggleOpacity),document.documentElement.style.setProperty("--mes-empty-label",JSON.stringify(g.selectorNone)),document.querySelectorAll("#mobile-block-panel, #mobile-settings-panel, #mobile-blocklist-panel, #mobile-inspector-panel").forEach(e=>{e.style.setProperty("background-color",`rgba(248, 248, 250, ${v.panelOpacity})`,"important")}),He&&(He.style.setProperty("width","var(--toggle-hitbox-size)","important"),He.style.setProperty("height","var(--toggle-hitbox-size)","important"),He.style.setProperty("opacity","var(--toggle-opacity)","important"),He.classList.toggle("hidden-toggle",v.hideToggleButton))}function Ie(){if(!He)return;He.style.top="auto",He.style.left="auto",He.style.bottom="auto",He.style.right="auto",He.style.transform="";const t="16px",o=`calc(env(safe-area-inset-top, 0px) + ${t})`,n=`calc(env(safe-area-inset-right, 0px) + ${t})`,r=`calc(env(safe-area-inset-bottom, 0px) + ${t})`,i=`calc(env(safe-area-inset-left, 0px) + ${t})`;switch(v.toggleBtnCorner){case"top-left":He.style.top=o,He.style.left=i;break;case"top-right":He.style.top=o,He.style.right=n;break;case"bottom-left":He.style.bottom=r,He.style.left=i;break;default:He.style.bottom=r,He.style.right=n}S(e,"Applied toggle button corner:",v.toggleBtnCorner)}ze.id=V,ze.setAttribute(j,"ui"),ze.textContent=`\n:root {\n --md-sys-color-primary: #007aff; --md-sys-color-on-primary: #ffffff;\n --md-sys-color-primary-container: rgba(255, 255, 255, 0.94); --md-sys-color-on-primary-container: #0f172a;\n --md-sys-color-secondary: #1d1d1f; --md-sys-color-on-secondary: #ffffff;\n --md-sys-color-secondary-container: rgba(118, 118, 128, 0.12); --md-sys-color-on-secondary-container: #1d1d1f;\n --md-sys-color-tertiary: #0a84ff; --md-sys-color-on-tertiary: #ffffff;\n --md-sys-color-tertiary-container: rgba(0, 122, 255, 0.10); --md-sys-color-on-tertiary-container: #005ecb;\n --md-sys-color-error: #ff3b30; --md-sys-color-on-error: #ffffff;\n --md-sys-color-error-container: rgba(255, 59, 48, 0.12); --md-sys-color-on-error-container: #b42318;\n --md-sys-color-background: #f5f5f7; --md-sys-color-on-background: #1d1d1f;\n --md-sys-color-surface: #f8f8fa; --md-sys-color-on-surface: #1d1d1f;\n --md-sys-color-surface-variant: #f2f2f7; --md-sys-color-on-surface-variant: #6e6e73;\n --md-sys-color-outline: rgba(60, 60, 67, 0.18); --md-sys-color-shadow: #000000;\n --md-sys-color-inverse-surface: rgba(28, 28, 30, 0.92); --md-sys-color-inverse-on-surface: #ffffff;\n --md-sys-color-surface-container-high: rgba(255, 255, 255, 0.76);\n --md-sys-color-success: #34c759; --md-sys-color-success-container: rgba(52, 199, 89, 0.12);\n --md-sys-color-warning: #ff9500;\n --panel-opacity: ${f.panelOpacity};\n --toggle-size: ${28*f.toggleSizeScale}px;\n --toggle-hitbox-size: 44px;\n --toggle-opacity: ${f.toggleOpacity};\n --md-ref-typeface-plain: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;\n --md-sys-typescale-body-large-font-family: var(--md-ref-typeface-plain);\n --md-sys-typescale-body-large-font-size: 13px;\n --md-sys-typescale-label-large-font-size: 12.5px;\n --md-sys-typescale-label-medium-font-size: 11.5px;\n --md-sys-typescale-label-small-font-size: 10px;\n --md-sys-typescale-title-medium-font-size: 15px;\n}\n\n.scrollable-container {\n position: relative;\n overflow-y: auto;\n max-height: min(56vh, 480px);\n padding: 4px 2px 8px;\n -webkit-mask-image: linear-gradient(to bottom, black 0%, black 92%, transparent 100%);\n mask-image: linear-gradient(to bottom, black 0%, black 92%, transparent 100%);\n\n scrollbar-width: thin;\n scrollbar-color: rgba(60,60,67,0.24) transparent;\n -ms-overflow-style: none;\n}\n.scrollable-container::-webkit-scrollbar {\n width: 4px;\n}\n.scrollable-container::-webkit-scrollbar-thumb {\n background: rgba(60,60,67,0.20);\n border-radius: 999px;\n}\n\n#mes-ui-root {\n all: initial !important;\n position: fixed !important;\n display: block !important;\n top: 0 !important;\n left: 0 !important;\n width: 0 !important;\n height: 0 !important;\n min-width: 0 !important;\n min-height: 0 !important;\n max-width: none !important;\n max-height: none !important;\n margin: 0 !important;\n padding: 0 !important;\n border: 0 !important;\n overflow: visible !important;\n visibility: visible !important;\n opacity: 1 !important;\n transform: none !important;\n filter: none !important;\n contain: none !important;\n pointer-events: none !important;\n z-index: 2147483647 !important;\n isolation: isolate !important;\n -webkit-tap-highlight-color: transparent !important;\n}\n#mes-ui-root[hidden],\n#mes-ui-root[aria-hidden="true"] {\n display: block !important;\n visibility: visible !important;\n}\n#mes-ui-root::backdrop {\n background: transparent !important;\n pointer-events: none !important;\n}\n\n.mobile-block-ui { z-index: 2147483647 !important; isolation: isolate !important; touch-action: manipulation !important; font-family: var(--md-sys-typescale-body-large-font-family); box-sizing: border-box; position: fixed !important; visibility: visible !important; color: var(--md-sys-color-on-surface); pointer-events: auto !important; -webkit-tap-highlight-color: transparent !important; }\n\n#mes-selection-capture-layer {\n position: fixed !important;\n inset: 0 !important;\n z-index: 2147483647 !important;\n display: none !important;\n width: 100vw !important;\n height: 100vh !important;\n background: transparent !important;\n pointer-events: none !important;\n touch-action: none !important;\n cursor: crosshair !important;\n -webkit-tap-highlight-color: transparent !important;\n}\n#mes-selection-capture-layer.active {\n display: block !important;\n pointer-events: auto !important;\n}\n\n#mobile-block-panel, #mobile-settings-panel, #mobile-blocklist-panel, #mobile-inspector-panel {\n background-color: rgba(248, 248, 250, var(--panel-opacity)) !important; backdrop-filter: saturate(1.45) blur(20px); -webkit-backdrop-filter: saturate(1.45) blur(20px);\n color: var(--md-sys-color-on-surface); border-radius: 18px !important;\n box-shadow: 0 20px 55px rgba(0, 0, 0, 0.20), 0 2px 8px rgba(0, 0, 0, 0.08) !important;\n border: 1px solid rgba(255, 255, 255, 0.70); padding: 10px 11px; width: calc(100% - 56px); max-width: 310px;\n display: none;\n opacity: 0;\n backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden;\n transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s ease-out, width 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), max-width 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), padding 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), border-radius 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);\n will-change: transform, opacity, width;\n cursor: grab;\n}\n\n#mobile-block-panel { bottom: calc(env(safe-area-inset-bottom, 0px) + 16px); left: 50%; transform: translateX(-50%) translateY(22px) scale(0.985); z-index: 2147483647 !important; }\n#mobile-block-panel.dock-bottom { top: auto; bottom: calc(env(safe-area-inset-bottom, 0px) + 16px); transform: translateX(-50%) translateY(22px) scale(0.985); }\n#mobile-block-panel.dock-top { top: calc(env(safe-area-inset-top, 0px) + 16px); bottom: auto; transform: translateX(-50%) translateY(-22px) scale(0.985); }\n#mobile-settings-panel, #mobile-blocklist-panel, #mobile-inspector-panel { top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.98); z-index: 2147483647 !important; max-width: 310px; max-height: 76vh; overflow-y: auto; }\n#mobile-settings-panel { flex-direction: column; overflow: hidden; max-height: min(70vh, 560px); }\n\n#mobile-block-panel.visible {\n opacity: 1;\n transform: translateX(-50%) translateY(0) scale(1);\n}\n#mobile-settings-panel.visible, #mobile-blocklist-panel.visible, #mobile-inspector-panel.visible {\n opacity: 1;\n transform: translate(-50%, -50%) scale(1);\n}\n\n/* Overrides for dragged panels: transform should only handle scale */\n#mobile-block-panel[data-was-dragged="true"] {\n transform: scale(0.985); /* Closed state */\n}\n#mobile-block-panel[data-was-dragged="true"].visible {\n transform: scale(1); /* Open state */\n}\n#mobile-settings-panel[data-was-dragged="true"],\n#mobile-blocklist-panel[data-was-dragged="true"],\n#mobile-inspector-panel[data-was-dragged="true"] {\n transform: scale(0.98); /* Closed state */\n}\n#mobile-settings-panel[data-was-dragged="true"].visible,\n#mobile-blocklist-panel[data-was-dragged="true"].visible,\n#mobile-inspector-panel[data-was-dragged="true"].visible {\n transform: scale(1); /* Open state */\n}\n\n.mb-panel-title { font-size: var(--md-sys-typescale-title-medium-font-size); font-weight: 700; color: var(--md-sys-color-on-surface); text-align: center; margin: 2px 0 12px 0; letter-spacing: 0; }\n\n.mb-slider { width: 100%; margin: 10px 0; -webkit-appearance: none; appearance: none; background: rgba(120, 120, 128, 0.22); height: 4px; border-radius: 999px; outline: none; cursor: pointer; transition: background 0.2s ease; }\n.mb-slider:hover { background: rgba(120, 120, 128, 0.32); }\n.mb-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; background: #ffffff; border-radius: 50%; cursor: pointer; border: 0.5px solid rgba(60,60,67,0.18); box-shadow: 0 2px 8px rgba(0,0,0,0.20); transition: transform 0.2s ease, box-shadow 0.2s ease; }\n.mb-slider::-moz-range-thumb { width: 18px; height: 18px; background: #ffffff; border-radius: 50%; cursor: pointer; border: 0.5px solid rgba(60,60,67,0.18); box-shadow: 0 2px 8px rgba(0,0,0,0.20); transition: transform 0.2s ease, box-shadow 0.2s ease; }\n.mb-slider:active::-webkit-slider-thumb { box-shadow: 0 0 0 10px rgba(var(--md-sys-color-primary-rgb, 160, 201, 255), 0.25); }\n.mb-slider:active::-moz-range-thumb { box-shadow: 0 0 0 10px rgba(var(--md-sys-color-primary-rgb, 160, 201, 255), 0.25); }\n\n.mes-selected-element {\n outline: 2px solid var(--md-sys-color-primary) !important;\n outline-offset: 2px;\n box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.28) !important;\n background-color: rgba(0, 122, 255, 0.10) !important;\n z-index: 2147483644 !important;\n transition: background-color 0.1s ease, outline 0.1s ease, box-shadow 0.1s ease;\n pointer-events: none;\n}\n.${n} {\n outline: 3px solid #34c759 !important;\n outline-offset: 2px;\n box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.22) !important;\n background-color: rgba(52, 199, 89, 0.12) !important;\n transition: background-color 0.12s ease, outline 0.12s ease, box-shadow 0.12s ease;\n}\n\n#mobile-block-toggleBtn {\n z-index: 2147483647 !important; background-color: transparent !important; color: rgba(60, 60, 67, 0.34) !important;\n opacity: var(--toggle-opacity) !important; width: var(--toggle-hitbox-size) !important; height: var(--toggle-hitbox-size) !important; border-radius: 999px !important; border: none !important; cursor: pointer !important;\n box-shadow: none !important;\n transition: background-color 0.2s ease, transform 0.16s ease, box-shadow 0.2s ease, opacity 0.2s ease, border 0.2s ease, top 0.2s ease, left 0.2s ease, bottom 0.2s ease, right 0.2s ease;\n display: flex !important; align-items: center !important; justify-content: center !important; overflow: hidden !important; backface-visibility: hidden; -webkit-backface-visibility: hidden; position: fixed !important; -webkit-tap-highlight-color: transparent !important;\n}\n#mobile-block-toggleBtn::before { content: ''; position: absolute; width: var(--toggle-size); height: var(--toggle-size); border-radius: 999px; background-color: rgba(255, 255, 255, 0.54); border: 0.5px solid rgba(60, 60, 67, 0.12); box-shadow: 0 3px 8px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.05); transition: background-color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, width 0.2s ease, height 0.2s ease; }\n#mobile-block-toggleBtn:active { transform: scale(0.94); box-shadow: none !important; }\n#mobile-block-toggleBtn.selecting {\n background-color: transparent !important;\n color: rgba(60, 60, 67, 0.48) !important;\n}\n#mobile-block-toggleBtn.selecting::before {\n background-color: rgba(255, 255, 255, 0.70);\n border-color: rgba(60, 60, 67, 0.18);\n box-shadow: 0 5px 12px rgba(0,0,0,0.09), 0 0 0 2px rgba(60, 60, 67, 0.06);\n}\n#mobile-block-toggleBtn.hidden-toggle { display: none !important; }\n#mobile-block-toggleBtn .toggle-icon { position: relative; z-index: 1; width: calc(var(--toggle-size) * 0.46); height: calc(var(--toggle-size) * 0.46); display: block; margin: auto; background-color: currentColor; mask-size: contain; mask-repeat: no-repeat; mask-position: center; -webkit-mask-size: contain; -webkit-mask-repeat: no-repeat; -webkit-mask-position: center; }\n#mobile-block-toggleBtn .toggle-icon-plus { mask-image: url('data:image/svg+xml,'); -webkit-mask-image: url('data:image/svg+xml,'); }\n#mobile-block-toggleBtn.selecting .toggle-icon-plus { mask-image: url('data:image/svg+xml,'); -webkit-mask-image: url('data:image/svg+xml,'); }\n#mobile-block-toggleBtn .toggle-icon-shield { background-image: url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 64 64%22%3E%3Cpath fill=%22%23a0c9ff%22 d=%22M32 5 52 13v15c0 13.9-8.1 25.9-20 31C20.1 53.9 12 41.9 12 28V13l20-8Z%22/%3E%3Cpath fill=%22%2300325a%22 d=%22M22 25h20v6H22v-6Zm0 10h14v6H22v-6Z%22/%3E%3C/svg%3E'); background-size: contain; background-repeat: no-repeat; background-position: center; background-color: transparent !important; mask-image: none; -webkit-mask-image: none; width: 60%; height: 60%; }\n\n.mb-btn { padding: 7px 12px; border: 0.5px solid transparent; border-radius: 10px !important; font-size: var(--md-sys-typescale-label-large-font-size); font-weight: 600; cursor: pointer; transition: background-color 0.16s ease, transform 0.12s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.16s ease, border-color 0.16s ease, color 0.16s ease; text-align: center; box-shadow: none; min-width: 0; min-height: 34px; overflow: hidden; white-space: normal; overflow-wrap: anywhere; word-break: keep-all; text-overflow: clip; opacity: 1 !important; -webkit-tap-highlight-color: transparent !important; line-height: 1.16; display: inline-flex; align-items: center; justify-content: center; letter-spacing: 0; }\n.mb-btn:hover { box-shadow: 0 1px 5px rgba(0,0,0,0.08); }\n.mb-btn:active { transform: scale(0.97); box-shadow: none; }\n.mb-btn:disabled { opacity: 0.36 !important; cursor: default; pointer-events: none; box-shadow: none !important; }\n.mb-btn.primary { background-color: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); }\n.mb-btn.primary:hover { background-color: #b0d3ff; } .mb-btn.primary:active { background-color: #c0daff; }\n.mb-btn.secondary { background-color: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); }\n.mb-btn.secondary:hover { background-color: rgba(118,118,128,0.18); } .mb-btn.secondary:active { background-color: rgba(118,118,128,0.24); }\n.mb-btn.tertiary { background-color: var(--md-sys-color-tertiary-container); color: var(--md-sys-color-on-tertiary-container); }\n.mb-btn.tertiary:hover { background-color: rgba(0,122,255,0.16); } .mb-btn.tertiary:active { background-color: rgba(0,122,255,0.22); }\n.mb-btn.error { background-color: var(--md-sys-color-error-container); color: var(--md-sys-color-on-error-container); }\n.mb-btn.error:hover { background-color: rgba(255,59,48,0.18); } .mb-btn.error:active { background-color: rgba(255,59,48,0.22); }\n.mb-btn.surface { background-color: var(--md-sys-color-surface-variant); color: var(--md-sys-color-on-surface-variant); }\n.mb-btn.surface:hover { background-color: rgba(118,118,128,0.18); } .mb-btn.surface:active { background-color: rgba(118,118,128,0.24); }\n.mb-btn.outline { background-color: transparent; color: var(--md-sys-color-primary); border: 1px solid var(--md-sys-color-outline); box-shadow: none; }\n.mb-btn.outline:hover { background-color: rgba(var(--md-sys-color-primary-rgb, 160, 201, 255), 0.08); }\n.mb-btn.outline:active { background-color: rgba(var(--md-sys-color-primary-rgb, 160, 201, 255), 0.12); }\n.mes-icon { display: inline-block; width: 14px; height: 14px; flex: 0 0 auto; background-color: currentColor; opacity: 0.78; mask-size: contain; mask-position: center; mask-repeat: no-repeat; -webkit-mask-size: contain; -webkit-mask-position: center; -webkit-mask-repeat: no-repeat; }\n.btn-label { display: block; min-width: 0; max-width: 100%; overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; word-break: keep-all; line-height: 1.12; }\n.icon-minimize { mask-image: url('data:image/svg+xml,'); -webkit-mask-image: url('data:image/svg+xml,'); }\n.icon-expand { mask-image: url('data:image/svg+xml,'); -webkit-mask-image: url('data:image/svg+xml,'); }\n.icon-preview { mask-image: url('data:image/svg+xml,'); -webkit-mask-image: url('data:image/svg+xml,'); }\n.icon-save { mask-image: url('data:image/svg+xml,'); -webkit-mask-image: url('data:image/svg+xml,'); }\n.icon-more { mask-image: url('data:image/svg+xml,'); -webkit-mask-image: url('data:image/svg+xml,'); }\n.icon-close { mask-image: url('data:image/svg+xml,'); -webkit-mask-image: url('data:image/svg+xml,'); }\n.icon-parent { mask-image: url('data:image/svg+xml,'); -webkit-mask-image: url('data:image/svg+xml,'); }\n.icon-child { mask-image: url('data:image/svg+xml,'); -webkit-mask-image: url('data:image/svg+xml,'); }\n\n.button-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(82px, 1fr)); gap: 8px; margin-top: 14px; }\n.picker-topbar { display: grid; grid-template-columns: minmax(0, 1fr) 32px; gap: 8px; align-items: center; margin-bottom: 8px; }\n#blocker-compact-summary { min-width: 0; color: var(--md-sys-color-on-surface-variant); font-size: var(--md-sys-typescale-label-small-font-size); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n#mobile-block-panel:not(.compact-picker) #blocker-compact-summary { opacity: 0; }\n.picker-compact-btn { width: 32px; min-width: 32px; height: 30px; min-height: 30px; padding: 0 !important; border-radius: 999px !important; background-color: rgba(118,118,128,0.12); color: var(--md-sys-color-on-surface-variant); }\n.picker-compact-btn .mes-icon { width: 15px; height: 15px; opacity: 0.72; }\n.primary-action-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }\n.primary-action-grid .mb-btn { gap: 5px; min-height: 34px; padding: 6px 8px; font-size: var(--md-sys-typescale-label-small-font-size); }\n.secondary-action-grid { display: none; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 0.5px solid rgba(60,60,67,0.12); }\n.secondary-action-grid.visible { display: grid; }\n.secondary-action-grid .mb-btn { padding: 6px 8px; min-width: 0; min-height: 30px; font-size: var(--md-sys-typescale-label-medium-font-size); }\n#blocker-info-wrapper { margin-bottom: 8px; padding: 8px 9px; background-color: rgba(118,118,128,0.10); border-radius: 12px; border: 0.5px solid rgba(60,60,67,0.08); }\n#blocker-info-label { display: block; font-size: var(--md-sys-typescale-label-small-font-size); color: var(--md-sys-color-on-surface-variant); margin-bottom: 4px; font-weight: 600; }\n#blocker-info { display: block; color: var(--md-sys-color-on-surface); font-size: var(--md-sys-typescale-label-medium-font-size); line-height: 1.4; word-break: break-all; min-height: 1.4em; font-family: ui-monospace, SFMono-Regular, 'SF Mono', Consolas, monospace; max-height: 4.2em; overflow-y: auto; }\n#blocker-info:empty::after { content: var(--mes-empty-label, '없음'); color: var(--md-sys-color-on-surface-variant); font-style: italic; }\n#blocker-nav-label { min-height: 1.25em; margin-top: -3px; color: var(--md-sys-color-on-surface-variant); font-size: var(--md-sys-typescale-label-small-font-size); text-align: center; padding: 3px 8px; border-radius: 999px; background: rgba(118,118,128,0.08); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.element-nav-row { display: grid; grid-template-columns: 44px 1fr 44px; gap: 6px; align-items: center; margin-top: 6px; }\n.element-nav-row .mb-slider { margin: 0; background: linear-gradient(to right, rgba(0,122,255,0.32) 0%, rgba(0,122,255,0.32) var(--nav-progress, 50%), rgba(120,120,128,0.20) var(--nav-progress, 50%), rgba(120,120,128,0.20) 100%); }\n.element-nav-row .mb-slider:disabled { opacity: 0.45; }\n.nav-step-btn { min-width: 0; min-height: 30px; padding: 5px 7px; font-size: 0; gap: 0; }\n.nav-step-btn .btn-label { display: none; }\n.nav-step-btn .mes-icon { width: 15px; height: 15px; opacity: 0.72; }\n#blocker-selector-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; font-size: var(--md-sys-typescale-label-small-font-size); color: var(--md-sys-color-on-surface-variant); }\n.selector-chip { display: inline-flex; align-items: center; min-height: 20px; padding: 1px 7px; border-radius: 999px; background-color: rgba(118,118,128,0.10); border: 0.5px solid rgba(60,60,67,0.08); }\n.selector-chip.unique { color: var(--md-sys-color-success); border-color: rgba(144, 238, 144, 0.35); }\n.selector-chip.warning { color: var(--md-sys-color-warning); border-color: rgba(255, 204, 128, 0.35); }\n.selector-chip.error { color: var(--md-sys-color-error); border-color: rgba(255, 180, 171, 0.35); }\n.selector-chip.safe { color: var(--md-sys-color-success); border-color: rgba(52,199,89,0.32); }\n.selector-chip.caution { color: var(--md-sys-color-warning); border-color: rgba(255,149,0,0.32); }\n.selector-chip.broad { color: var(--md-sys-color-error); border-color: rgba(255,59,48,0.30); }\nlabel[for="blocker-slider"] { display: block; font-size: var(--md-sys-typescale-label-small-font-size); color: var(--md-sys-color-on-surface-variant); margin-bottom: 4px; margin-top: 8px; font-weight: 600; }\n\n#mobile-block-panel.compact-picker { width: min(304px, calc(100% - 56px)); max-width: 304px; padding: 7px 8px; border-radius: 22px !important; }\n#mobile-block-panel.compact-picker #blocker-info-wrapper,\n#mobile-block-panel.compact-picker label[for="blocker-slider"],\n#mobile-block-panel.compact-picker #blocker-nav-label,\n#mobile-block-panel.compact-picker #blocker-secondary-actions { display: none !important; }\n#mobile-block-panel.compact-picker .picker-topbar { margin-bottom: 5px; grid-template-columns: minmax(0, 1fr) 30px; }\n#mobile-block-panel.compact-picker #blocker-compact-summary { opacity: 1; padding-left: 4px; }\n#mobile-block-panel.compact-picker .picker-compact-btn { width: 30px; min-width: 30px; height: 28px; min-height: 28px; background-color: rgba(118,118,128,0.10); }\n#mobile-block-panel.compact-picker .element-nav-row { display: grid; grid-template-columns: 30px minmax(88px, 1fr) 30px; gap: 6px; margin: 2px 0 6px; }\n#mobile-block-panel.compact-picker .element-nav-row .mb-slider { height: 28px; background-size: 100% 3px; background-repeat: no-repeat; background-position: center; }\n#mobile-block-panel.compact-picker #blocker-slider { touch-action: pan-x !important; }\n#mobile-block-panel.compact-picker .nav-step-btn,\n#mobile-block-panel.compact-picker .primary-action-grid .mb-btn { width: 30px; min-width: 30px; height: 28px; min-height: 28px; padding: 0 !important; border-radius: 999px !important; }\n#mobile-block-panel.compact-picker .primary-action-grid .btn-label { display: none; }\n#mobile-block-panel.compact-picker .nav-step-btn .mes-icon,\n#mobile-block-panel.compact-picker .primary-action-grid .mes-icon { display: inline-block; width: 14px; height: 14px; opacity: 0.78; }\n#mobile-block-panel.compact-picker .primary-action-grid { margin-top: 0; display: flex; justify-content: center; gap: 8px; }\n#mobile-block-panel.compact-picker .mb-slider::-webkit-slider-thumb { width: 16px; height: 16px; }\n#mobile-block-panel.compact-picker .mb-slider::-moz-range-thumb { width: 16px; height: 16px; }\n\n.settings-layout { display: block; }\n.settings-scroll { flex: 1; min-height: 0; max-height: none; overflow-y: auto; }\n.settings-item { margin: 0; padding: 6px 0; display: flex; flex-direction: column; gap: 5px; border-bottom: 0.5px solid rgba(60,60,67,0.10); }\n.settings-section-title { margin: 13px 0 3px; padding-top: 1px; color: var(--md-sys-color-on-surface-variant); font-size: var(--md-sys-typescale-label-small-font-size); font-weight: 700; letter-spacing: 0; }\n.settings-section-title:first-child { margin-top: 0; }\n.settings-credit { margin-top: 8px; color: var(--md-sys-color-outline); font-size: 9px; font-weight: 500; text-align: center; letter-spacing: 0; opacity: 0.72; }\n.settings-item label { display: flex; justify-content: space-between; align-items: center; font-size: var(--md-sys-typescale-label-large-font-size); color: var(--md-sys-color-on-surface); min-height: 28px; }\n.settings-item label .settings-label-text { flex-grow: 1; margin-right: 10px; }\n.settings-value { color: var(--md-sys-color-on-surface); font-weight: 500; font-size: var(--md-sys-typescale-label-medium-font-size); padding-left: 10px; }\n.settings-note { color: var(--md-sys-color-on-surface-variant); font-size: var(--md-sys-typescale-label-small-font-size); line-height: 1.35; padding-right: 4px; }\n.mes-switch { width: 42px; min-width: 42px; height: 26px; min-height: 26px; padding: 2px !important; border-radius: 999px !important; background-color: rgba(118,118,128,0.18); border: 0.5px solid rgba(60,60,67,0.10); box-shadow: inset 0 0 0 0.5px rgba(60,60,67,0.06); flex-shrink: 0; justify-content: flex-start; font-size: 0; }\n.mes-switch .switch-knob { width: 22px; height: 22px; border-radius: 50%; background: #ffffff; box-shadow: 0 1px 4px rgba(0,0,0,0.22); transform: translateX(0); transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1); }\n.mes-switch.active { background-color: var(--md-sys-color-primary); border-color: transparent; }\n.mes-switch.active .switch-knob { transform: translateX(16px); }\n.mes-switch.error.active { background-color: var(--md-sys-color-error); }\n#settings-close, #settings-backup, #settings-restore { width: 100%; margin-top: 8px; }\n#settings-restore-input { display: none; }\n\n.launcher-settings-item { padding-top: 2px; }\n.language-option-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; margin-top: 2px; padding: 2px; border-radius: 12px; background: rgba(118,118,128,0.12); }\n.language-option-btn { padding: 6px 4px; min-width: 0; min-height: 30px; font-size: 10px; border-radius: 10px !important; background: transparent; color: var(--md-sys-color-on-surface-variant); white-space: nowrap; }\n.language-option-btn.active { background-color: #ffffff; color: var(--md-sys-color-primary); box-shadow: 0 1px 4px rgba(0,0,0,0.10); }\n.launcher-mode-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; margin-top: 2px; padding: 2px; border-radius: 12px; background: rgba(118,118,128,0.12); }\n.launcher-mode-btn { padding: 6px 8px; min-width: 0; min-height: 30px; font-size: var(--md-sys-typescale-label-small-font-size); border-radius: 10px !important; background: transparent; color: var(--md-sys-color-on-surface-variant); }\n.launcher-mode-btn.active { background-color: #ffffff; color: var(--md-sys-color-primary); box-shadow: 0 1px 4px rgba(0,0,0,0.10); }\n.gesture-detail-panel { display: none; margin-top: 8px; gap: 6px; }\n.gesture-detail-panel.visible { display: grid; }\n.gesture-detail-row { display: grid; grid-template-columns: minmax(58px, 0.54fr) minmax(0, 1fr); align-items: center; gap: 8px; }\n.gesture-detail-label { font-size: var(--md-sys-typescale-label-small-font-size); color: var(--md-sys-color-on-surface-variant); font-weight: 600; white-space: nowrap; }\n.gesture-option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; padding: 2px; border-radius: 12px; background: rgba(118,118,128,0.12); min-width: 0; }\n.gesture-option-btn { padding: 6px 6px; min-width: 0; min-height: 30px; font-size: var(--md-sys-typescale-label-small-font-size); border-radius: 10px !important; background-color: transparent; color: var(--md-sys-color-on-surface-variant); }\n.gesture-option-btn.active { background-color: #ffffff; color: var(--md-sys-color-primary); box-shadow: 0 1px 4px rgba(0,0,0,0.10); }\n.corner-selector-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; margin-top: 2px; padding: 2px; border-radius: 12px; background: rgba(118,118,128,0.12); }\n.corner-btn { padding: 6px 8px; min-width: 0; min-height: 30px; font-size: var(--md-sys-typescale-label-small-font-size); border-radius: 10px !important; }\n.corner-btn.active { background-color: #ffffff; color: var(--md-sys-color-primary); box-shadow: 0 1px 4px rgba(0,0,0,0.10); }\n.corner-btn:not(.active) { background-color: transparent; color: var(--md-sys-color-on-surface-variant); }\n.hide-strategy-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; margin-top: 2px; padding: 2px; border-radius: 12px; background: rgba(118,118,128,0.12); }\n.hide-strategy-btn { padding: 6px 8px; min-width: 0; min-height: 30px; font-size: var(--md-sys-typescale-label-small-font-size); border-radius: 10px !important; }\n.hide-strategy-btn.active { background-color: #ffffff; color: var(--md-sys-color-primary); box-shadow: 0 1px 4px rgba(0,0,0,0.10); }\n.hide-strategy-btn:not(.active) { background-color: transparent; color: var(--md-sys-color-on-surface-variant); }\n#settings-toggle-position-item[hidden] { display: none !important; }\n\n@media (prefers-reduced-motion: reduce) {\n #mobile-block-panel, #mobile-settings-panel, #mobile-blocklist-panel, #mobile-inspector-panel,\n #mobile-block-toggleBtn, .mb-btn, .mes-switch .switch-knob {\n transition-duration: 0.01ms !important;\n animation-duration: 0.01ms !important;\n }\n}\n\n#blocklist-container { max-height: calc(70vh - 135px); overflow-y: auto; margin: 12px 0; padding-right: 4px; display: flex; flex-direction: column; gap: 8px; }\n#blocklist-summary { color: var(--md-sys-color-on-surface-variant); font-size: var(--md-sys-typescale-label-small-font-size); text-align: center; margin-top: -4px; margin-bottom: 8px; }\n#blocklist-search { width: 100%; min-height: 34px; border: 0.5px solid rgba(60,60,67,0.12); border-radius: 10px; background-color: rgba(118,118,128,0.10); color: var(--md-sys-color-on-surface); padding: 6px 10px; box-sizing: border-box; font-size: var(--md-sys-typescale-label-large-font-size); outline: none; }\n#blocklist-search::placeholder { color: var(--md-sys-color-on-surface-variant); }\n.blocklist-item { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; padding: 9px 10px; background-color: rgba(118,118,128,0.08); border-radius: 10px; border: 0.5px solid rgba(60,60,67,0.08); transition: background-color 0.2s, border-color 0.2s, opacity 0.3s ease, transform 0.3s ease; }\n.blocklist-item:hover { background-color: rgba(118,118,128,0.12); border-color: var(--md-sys-color-outline); }\n.blocklist-item.disabled-rule { background-color: rgba(118,118,128,0.05); }\n.blocklist-item.disabled-rule .blocklist-rule-selector { opacity: 0.58; text-decoration: line-through; text-decoration-thickness: 1px; }\n.blocklist-rule { flex: 1; min-width: 0; border-radius: 9px; cursor: pointer; -webkit-tap-highlight-color: transparent; }\n.blocklist-rule:active { opacity: 0.72; }\n.blocklist-rule-selector { word-break: break-all; font-size: var(--md-sys-typescale-label-medium-font-size); color: var(--md-sys-color-on-surface-variant); font-family: ui-monospace, SFMono-Regular, 'SF Mono', Consolas, monospace; line-height: 1.35; }\n.blocklist-rule-meta { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }\n.blocklist-chip { display: inline-flex; align-items: center; min-height: 18px; padding: 1px 6px; border-radius: 999px; background: rgba(118,118,128,0.10); color: var(--md-sys-color-on-surface-variant); font-size: 10px; font-weight: 700; letter-spacing: 0; }\n.blocklist-chip.current { color: var(--md-sys-color-primary); background: rgba(0,122,255,0.10); }\n.blocklist-chip.match { color: var(--md-sys-color-success); background: rgba(52,199,89,0.10); }\n.blocklist-chip.nomatch { color: var(--md-sys-color-warning); background: rgba(255,149,0,0.10); }\n.blocklist-chip.disabled { color: var(--md-sys-color-error); background: rgba(255,59,48,0.10); }\n.blocklist-controls { display: flex; gap: 6px; flex-shrink: 0; }\n.blocklist-btn { padding: 5px 8px; min-width: auto; min-height: 28px; font-size: var(--md-sys-typescale-label-small-font-size); border-radius: 9px !important; }\n.blocklist-btn-delete { background-color: var(--md-sys-color-error-container); color: var(--md-sys-color-on-error-container); }\n.blocklist-btn-copy { background-color: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); }\n.blocklist-btn-toggle { background-color: rgba(0,122,255,0.10); color: var(--md-sys-color-primary); }\n#blocklist-empty { text-align:center; color: var(--md-sys-color-on-surface-variant); padding: 20px 0; }\n\n.inspector-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; margin-bottom: 10px; padding: 2px; border-radius: 12px; background: rgba(118,118,128,0.12); }\n.inspector-tab { min-width: 0; min-height: 30px; padding: 6px 4px; font-size: var(--md-sys-typescale-label-small-font-size); border-radius: 10px !important; color: var(--md-sys-color-on-surface-variant); background: transparent; }\n.inspector-tab.active { background-color: #ffffff; color: var(--md-sys-color-primary); box-shadow: 0 1px 4px rgba(0,0,0,0.10); }\n#inspector-content { max-height: 54vh; overflow-y: auto; padding-right: 2px; color: var(--md-sys-color-on-surface); font-size: var(--md-sys-typescale-label-medium-font-size); line-height: 1.45; }\n.inspector-section { margin-bottom: 10px; padding: 9px 10px; background-color: rgba(118,118,128,0.08); border: 0.5px solid rgba(60,60,67,0.08); border-radius: 10px; }\n.inspector-section-title { margin: 0 0 7px 0; color: var(--md-sys-color-primary); font-size: var(--md-sys-typescale-label-medium-font-size); font-weight: 700; }\n.inspector-pre { margin: 0; white-space: pre-wrap; word-break: break-word; font-family: ui-monospace, SFMono-Regular, 'SF Mono', Consolas, monospace; font-size: var(--md-sys-typescale-label-small-font-size); color: var(--md-sys-color-on-surface-variant); max-height: 32vh; overflow-y: auto; }\n.inspector-list { display: flex; flex-direction: column; gap: 8px; }\n.inspector-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 0.5px solid rgba(60,60,67,0.10); }\n.inspector-row:last-child { border-bottom: none; }\n.inspector-row span { word-break: break-word; }\n.inspector-row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; flex-shrink: 0; max-width: 46%; }\n.inspector-mini-btn { padding: 4px 8px; min-height: 26px; min-width: auto; font-size: var(--md-sys-typescale-label-small-font-size); border-radius: 8px !important; }\n.selector-candidate-list { display: flex; flex-direction: column; gap: 8px; }\n.selector-candidate-row { display: grid; gap: 6px; padding: 8px; border-radius: 10px; background: rgba(255,255,255,0.54); border: 0.5px solid rgba(60,60,67,0.08); }\n.selector-candidate-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }\n.selector-candidate-title { font-weight: 700; color: var(--md-sys-color-on-surface); font-size: var(--md-sys-typescale-label-medium-font-size); }\n.selector-candidate-meta { color: var(--md-sys-color-on-surface-variant); font-size: var(--md-sys-typescale-label-small-font-size); text-align: right; }\n.selector-candidate-selector { margin: 0; padding: 7px 8px; border-radius: 8px; background: rgba(118,118,128,0.08); color: var(--md-sys-color-on-surface-variant); font-family: ui-monospace, SFMono-Regular, 'SF Mono', Consolas, monospace; font-size: var(--md-sys-typescale-label-small-font-size); line-height: 1.35; white-space: pre-wrap; word-break: break-all; }\n.selector-candidate-analysis { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; color: var(--md-sys-color-on-surface-variant); font-size: var(--md-sys-typescale-label-small-font-size); line-height: 1.25; }\n.selector-risk { display: inline-flex; align-items: center; min-height: 18px; padding: 1px 6px; border-radius: 999px; font-size: 10px; font-weight: 700; background: rgba(118,118,128,0.10); color: var(--md-sys-color-on-surface-variant); }\n.selector-risk.safe { color: var(--md-sys-color-success); background: rgba(52,199,89,0.10); }\n.selector-risk.caution { color: var(--md-sys-color-warning); background: rgba(255,149,0,0.10); }\n.selector-risk.broad, .selector-risk.error { color: var(--md-sys-color-error); background: rgba(255,59,48,0.10); }\n.selector-risk-reason { min-width: 0; flex: 1 1 120px; }\n.selector-candidate-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }\n.selector-candidate-actions .mb-btn { min-height: 28px; padding: 5px 8px; font-size: var(--md-sys-typescale-label-small-font-size); }\n\n#mes-toast-container { position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%); z-index: 2147483647 !important; display: flex; flex-direction: column-reverse; align-items: center; gap: 10px; pointer-events: none !important; width: max-content; max-width: 90%; }\n.mes-toast { background-color: var(--md-sys-color-inverse-surface); color: var(--md-sys-color-inverse-on-surface); padding: 9px 10px 9px 14px; border-radius: 12px; box-shadow: 0 10px 28px rgba(0,0,0,0.18); font-size: var(--md-sys-typescale-label-large-font-size); opacity: 0; transform: translateY(14px); transition: opacity 0.24s ease, transform 0.24s ease, background-color 0.24s ease; pointer-events: all !important; max-width: 100%; text-align: center; display: flex; align-items: center; justify-content: center; gap: 10px; }\n.mes-toast-message { min-width: 0; overflow-wrap: anywhere; word-break: keep-all; line-height: 1.25; }\n.mes-toast-action { border: 0; border-radius: 999px; padding: 5px 9px; min-height: 28px; background: rgba(255,255,255,0.16); color: inherit; font: inherit; font-size: var(--md-sys-typescale-label-small-font-size); font-weight: 700; cursor: pointer; white-space: nowrap; -webkit-tap-highlight-color: transparent; }\n.mes-toast-action:active { transform: scale(0.97); }\n.mes-toast.show { opacity: 1; transform: translateY(0); }\n.mes-toast.info { background-color: rgba(28,28,30,0.92); color: white; }\n.mes-toast.success { background-color: rgba(28,28,30,0.92); color: #ffffff; }\n.mes-toast.success .mes-toast-action { background: rgba(52,199,89,0.18); color: #b8f7c2; }\n.mes-toast.error { background-color: var(--md-sys-color-error-container); color: var(--md-sys-color-on-error-container); }\n.mes-toast.warning { background-color: rgba(255,149,0,0.14); color: #9a5a00; }\n\n@media (min-width: 700px) {\n #mobile-block-panel { max-width: 424px; padding: 11px 12px; }\n #mobile-settings-panel, #mobile-blocklist-panel, #mobile-inspector-panel { max-width: 500px; width: min(500px, calc(100% - 160px)); }\n #mobile-inspector-panel { max-width: 560px; }\n .button-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }\n .primary-action-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }\n .secondary-action-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }\n .inspector-tabs { grid-template-columns: repeat(6, 1fr); }\n #inspector-content { max-height: 62vh; }\n .settings-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; align-items: start; }\n .settings-layout .settings-section-title, .settings-layout .button-grid, .settings-layout .launcher-settings-item, .settings-layout .language-settings-item { grid-column: 1 / -1; }\n .settings-layout .settings-item { margin-bottom: 14px; }\n .settings-item label { font-size: var(--md-sys-typescale-body-large-font-size); }\n}\n\n@media (max-width: 380px) {\n #mobile-block-panel, #mobile-settings-panel, #mobile-blocklist-panel, #mobile-inspector-panel { width: calc(100% - 24px); padding: 11px 12px; border-radius: 16px !important; }\n .button-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }\n .mb-btn { padding: 9px 12px; min-width: 0; }\n #mobile-settings-panel .language-option-btn { padding: 6px 4px; font-size: 10px; }\n .inspector-row { align-items: flex-start; }\n .inspector-row-actions { max-width: 44%; gap: 4px; }\n .inspector-row-actions .inspector-mini-btn, .inspector-mini-btn { padding: 4px 7px; min-height: 26px; font-size: var(--md-sys-typescale-label-small-font-size); }\n .inspector-tabs { grid-template-columns: repeat(3, 1fr); gap: 6px; }\n .primary-action-grid .mb-btn { min-height: 36px; }\n .selector-candidate-actions { gap: 4px; }\n .selector-candidate-actions .mb-btn { padding: 5px 4px; }\n\t}\n `;const Oe=ze.textContent;let Fe,qe,Ue,He,Ge,je,Ze,Ve;!p&&document.head&&document.head.appendChild(ze);let _e=null,We=!1,Je=null,Qe=!1,Ye=null;function Xe(){return[Ve,qe,Ge,je,Ue,He,Ze].filter(Boolean)}function Ke(e){return!!e&&(e===ze||3===e.nodeType&&e.parentNode===ze||!(!Fe||e!==Fe&&!Fe.contains?.(e))||!(!Fe||e===document.documentElement||e===document.body||!e.contains?.(Fe))||Xe().some(t=>e===t||e.contains?.(t)))}function et(){return document.documentElement||document.body}function tt(){const e=et();return e?(Fe&&1===Fe.nodeType||(Fe=Array.from(document.querySelectorAll?.(`#${l}`)||[]).find(e=>e.getAttribute?.(c)===d&&"DIALOG"===e.tagName)||document.createElement("dialog")),Fe&&(Fe.id!==l&&(Fe.id=l),Fe.classList.add("mes-ui-root"),Fe.classList.remove("mobile-block-ui"),Fe.setAttribute(c,d),Fe.setAttribute("popover","manual"),Fe.hidden=!1,Fe.removeAttribute("aria-hidden"),Fe.removeAttribute("inert"),Object.entries({all:"initial",position:"fixed",display:"block",top:"0",left:"0",width:"0",height:"0",minWidth:"0",minHeight:"0",maxWidth:"none",maxHeight:"none",margin:"0",padding:"0",border:"0",overflow:"visible",visibility:"visible",opacity:"1",transform:"none",filter:"none",contain:"none",pointerEvents:"none",zIndex:"2147483647",isolation:"isolate"}).forEach(([e,t])=>{Fe.style.setProperty(e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`),t,"important")})),Fe.isConnected&&Fe.parentNode===e&&e.lastElementChild===Fe||e.appendChild(Fe),at(lt()),Fe):null}function ot(){if(!Fe?.matches)return!1;try{return Fe.matches(":popover-open")}catch(e){return!1}}function nt(){return st(Fe)}function rt(){return[...[qe,Ue,Ge,je].filter(e=>e?.classList?.contains("visible")),...v.hideToggleButton?[]:[He]].find(e=>{if(!e?.isConnected)return!1;try{const t=window.getComputedStyle(e),o=e.getBoundingClientRect();return"none"!==t.display&&"hidden"!==t.visibility&&"none"!==t.pointerEvents&&o.width>1&&o.height>1}catch(t){return!1}})||null}function it(){const e=rt();if(!e)return!0;try{const t=e.getBoundingClientRect(),o=Math.max(0,Math.min(window.innerWidth-1,t.left+t.width/2)),n=Math.max(0,Math.min(window.innerHeight-1,t.top+t.height/2)),r=document.elementFromPoint(o,n);return!(!r||r!==e&&!e.contains(r)&&!so(r))}catch(t){return!0}}function at(e="normal"){if(!Fe)return!1;if("modal"===e&&"function"==typeof Fe.showModal)try{return rt()?(nt()&&it()||(ot()&&"function"==typeof Fe.hidePopover&&Fe.hidePopover(),Fe.open&&"function"==typeof Fe.close&&Fe.close(),Fe.showModal()),!0):(nt()&&"function"==typeof Fe.close&&Fe.close(),!1)}catch(t){return!1}if(Fe.open&&"function"==typeof Fe.close)try{Fe.close()}catch(t){}if("function"!=typeof Fe.showPopover)return!1;try{return Fe.setAttribute("popover","manual"),!(!ot()||!it())||("popover"===e&&ot()&&"function"==typeof Fe.hidePopover&&Fe.hidePopover(),ot()||Fe.showPopover(),ot())}catch(t){return!1}}function st(e){if(!e||"DIALOG"!==e.tagName||!e.open)return!1;try{return e.matches(":modal")}catch(t){return!1}}function lt(){try{let e=!1;return function(){const e=[document];try{e.push(...re(document))}catch(t){}return e.flatMap(e=>{try{return Array.from(e.querySelectorAll?.("dialog[open], [popover]")||[])}catch(t){return[]}})}().some(t=>!(Ke(t)||!st(t)&&(function(e){if(!e?.matches)return!1;try{return e.matches(":popover-open")}catch(t){return!1}}(t)&&(e=!0),1)))?"modal":e?"popover":"normal"}catch(e){return"normal"}}function ct(e,t=""){if(!e||1!==e.nodeType||Ke(e))return!1;const o=e.tagName||"";if("STYLE"===o||"LINK"===o)return!0;if("DIALOG"===o||"IFRAME"===o||e.matches?.("[popover]"))return!0;const n=`${e.id||""} ${"string"==typeof e.className?e.className:""}`,r=e.parentElement===document.documentElement||e.parentElement===document.body;if(!("style"===t||e.shadowRoot||r||/(?:modal|overlay|popup|floating|float|fixed|sticky|toast|banner|ad|widget|launcher|selector|toolbar|dock|sheet)/i.test(n)))return!1;try{const t=window.getComputedStyle(e),o=t.position;if(!["fixed","sticky","absolute"].includes(o))return!1;const n=parseInt(t.zIndex,10);return!Number.isNaN(n)&&n>=1e3||"fixed"===o&&("auto"!==t.inset||"auto"!==t.top||"auto"!==t.right||"auto"!==t.bottom||"auto"!==t.left)}catch(i){return!1}}function dt(e,t=""){if(ct(e,t))return!0;if(t||!e||1!==e.nodeType||!e.querySelectorAll)return!1;let o=[];try{o=Array.from(e.querySelectorAll("dialog, iframe, [popover], [style], [id], [class]")).slice(0,40)}catch(n){return!1}return o.some(e=>ct(e,"style"))}function pt(e,t){e&&(e.id!==t&&(e.id=t),e.hidden=!1,e.removeAttribute("aria-hidden"),e.removeAttribute("inert"),e!==ze&&(e.classList.add("mobile-block-ui"),["display","opacity"].forEach(t=>e.style.removeProperty(t)),e.style.setProperty("position","fixed","important"),e.style.setProperty("visibility","visible","important"),e.style.setProperty("z-index","2147483647","important"),e!==Ze?e.style.setProperty("pointer-events","auto","important"):e.style.setProperty("pointer-events","none","important"),e===He?e.style.setProperty("display",v.hideToggleButton?"none":"flex","important"):e===Ze&&e.style.setProperty("display","flex","important")))}function ut(){Ve&&("mes-selection-capture-layer"!==Ve.id&&(Ve.id="mes-selection-capture-layer"),Ve.className="mes-selection-capture-layer",Ve.hidden=!1,Ve.setAttribute("aria-hidden","true"),Ve.removeAttribute("inert"),Ve.classList.toggle("active",xt),Ve.style.setProperty("position","fixed","important"),Ve.style.setProperty("visibility","visible","important"),Ve.style.setProperty("z-index","2147483647","important"),Ve.style.setProperty("display",xt?"block":"none","important"),Ve.style.setProperty("pointer-events",xt?"auto":"none","important"))}function mt(){const e=document.head||document.documentElement;pt(ze,V),pt(Ze,"mes-toast-container"),ut(),pt(qe,"mobile-block-panel"),pt(Ue,"mobile-settings-panel"),pt(Ge,"mobile-blocklist-panel"),pt(je,"mobile-inspector-panel"),pt(He,"mobile-block-toggleBtn"),Ye?.isConnected&&(Ye.classList.add("visible"),Ye.style.setProperty("display",Ye===Ue?"flex":"block","important")),ze&&e&&(ze.isConnected&&ze.parentNode===e&&!ze.nextElementSibling||e.appendChild(ze),ze.textContent!==Oe&&(ze.textContent=Oe));const t=et(),o=tt();if(t&&o){const e=Xe();(t.lastElementChild!==o||e.some(e=>!e.isConnected||e.parentNode!==o)||!function(e,t=Xe()){if(!e||!t.length)return!1;let o=e.lastElementChild;for(let n=t.length-1;n>=0;n--){if(o!==t[n])return!1;o=o?.previousElementSibling||null}return!0}(o,e))&&(t.lastElementChild!==o&&t.appendChild(o),e.forEach(e=>{o.appendChild(e)}))}at(lt()),Be(),vo(),Ie()}function bt(){We||(We=!0,setTimeout(()=>{We=!1,mt()},80))}function gt(){_e&&_e.disconnect(),Qe||(Qe=!0,document.addEventListener("toggle",e=>{const t=e.target;t&&!Ke(t)&&("DIALOG"===t.tagName||t.matches?.("[popover]"))&&bt()},!0)),_e=new MutationObserver(e=>{e.some(e=>!(!Ke(e.target)&&!Array.from(e.removedNodes||[]).some(Ke))||("childList"===e.type?Array.from(e.addedNodes||[]).some(e=>dt(e)):"attributes"===e.type&&dt(e.target,e.attributeName)))&&bt()});try{const e=v.lowPowerMode?{childList:!0,subtree:!0}:{childList:!0,subtree:!0,attributes:!0,attributeFilter:["id","class","style","hidden","aria-hidden","inert"],characterData:!0};_e.observe(document.documentElement,e)}catch(e){}Je&&clearInterval(Je),Je=setInterval(mt,v.lowPowerMode?1800:900)}let ht=null,yt=null,ft=null,vt=new WeakSet;function kt(){const o=tt()||document.body||document.documentElement;Ve=document.createElement("div"),Ve.id="mes-selection-capture-layer",Ve.className="mes-selection-capture-layer",Ve.setAttribute("aria-hidden","true"),o.appendChild(Ve),Ze=document.createElement("div"),Ze.id="mes-toast-container",Ze.className="mobile-block-ui",o.appendChild(Ze),qe=document.createElement("div"),qe.id="mobile-block-panel",qe.className="mobile-block-ui",qe.innerHTML=`\n
\n
\n \n
\n
\n ${g.selectedElementLabel}\n
\n
\n
\n \n
\n \n \n \n
\n
\n
\n \n \n \n \n
\n
\n \n \n \n \n \n \n \n
`,o.appendChild(qe),Ge=document.createElement("div"),Ge.id="mobile-blocklist-panel",Ge.className="mobile-block-ui",Ge.innerHTML=`\n

${g.listTitle}

\n
\n \n
\n
\n \n \n \n \n
\n `,o.appendChild(Ge),je=document.createElement("div"),je.id="mobile-inspector-panel",je.className="mobile-block-ui",je.innerHTML=`\n

${g.inspectorTitle}

\n
\n \n \n \n \n \n \n
\n
\n
\n \n \n
`,o.appendChild(je),Ue=document.createElement("div"),Ue.id="mobile-settings-panel",Ue.className="mobile-block-ui",Ue.innerHTML=`\n

${g.settingsTitle}

\n
\n
${g.sectionBasic}
\n
\n \n
\n \n \n \n \n
\n
\n
\n \n
\n \n \n
\n
\n
\n ${g.gestureFingerCountLabel}\n
\n \n \n
\n
\n
\n ${g.gestureTapCountLabel}\n
\n \n \n
\n
\n
\n
\n
\n \n
\n
\n \n
\n
${g.sectionBlocking}
\n
\n \n
\n
\n \n
\n
\n \n
${g.lowPowerModeNotice}
\n
\n
${g.sectionAdvanced}
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
${g.sectionUi}
\n
\n \n
\n \n \n \n \n
\n
\n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n \n
\n \n \n \n \n
\n
\n
${g.sectionBackup}
\n
\n \n \n \n
\n
\n \n
${g.settingsCredit}
`,o.appendChild(Ue),He=document.createElement("button"),He.id="mobile-block-toggleBtn",He.className="mobile-block-ui",He.setAttribute("aria-label",g.toggleSelectorAria),o.appendChild(He),Be(),vo(),Ie(),mt(),gt(),function(){const o=qe.querySelector("#blocker-info-label"),c=qe.querySelector("#blocker-info"),d=qe.querySelector("#blocker-selector-meta"),p=qe.querySelector("#blocker-slider"),u=qe.querySelector("#blocker-nav-label"),m=qe.querySelector("#blocker-parent"),b=qe.querySelector("#blocker-child"),k=qe.querySelector("#blocker-more"),w=qe.querySelector("#blocker-secondary-actions"),x=qe.querySelector("#blocker-copy-css"),$=qe.querySelector("#blocker-copy-rule"),C=qe.querySelector("#blocker-similar-rule"),L=qe.querySelector("#blocker-url"),E=qe.querySelector("#blocker-preview"),R=qe.querySelector("#blocker-add-block"),A=qe.querySelector("#blocker-inspect"),T=qe.querySelector("#blocker-list"),M=qe.querySelector("#blocker-settings"),D=qe.querySelector("#blocker-cancel"),B=qe.querySelector("#blocker-compact-toggle"),F=qe.querySelector("#blocker-compact-summary"),q=Ge.querySelector("#blocklist-summary"),U=Ge.querySelector("#blocklist-search"),H=Ge.querySelector("#blocklist-container"),G=Ge.querySelector("#blocklist-copy-site"),j=Ge.querySelector("#blocklist-copy-all"),Z=Ge.querySelector("#blocklist-prune-stale"),V=Ge.querySelector("#blocklist-delete-site"),Y=Ge.querySelector("#blocklist-close"),K=je.querySelector("#inspector-content"),ie=je.querySelectorAll(".inspector-tab"),ae=je.querySelector("#inspector-copy"),le=je.querySelector("#inspector-close"),de=Ue.querySelector("#settings-close"),pe=Ue.querySelector("#settings-toggle-site"),Le=Ue.querySelector("#settings-shield-icon"),Re=Ue.querySelector("#settings-temp-disable"),ze=Ue.querySelector("#settings-observe-dom"),Oe=Ue.querySelector("#settings-low-power"),Fe=Ue.querySelector("#settings-shadow-dom"),Ze=Ue.querySelector("#settings-selector-hints"),Ve=Ue.querySelector("#settings-privacy-mode"),_e=Ue.querySelector("#settings-auto-close"),We=Ue.querySelector("#settings-compact-picker"),Je=Ue.querySelectorAll(".language-option-btn"),Qe=Ue.querySelectorAll(".launcher-mode-btn"),Xe=Ue.querySelector("#gesture-detail-settings"),Ke=Ue.querySelectorAll(".gesture-finger-btn"),et=Ue.querySelectorAll(".gesture-tap-btn"),tt=Ue.querySelector("#settings-panel-opacity"),ot=Ue.querySelector("#opacity-value"),nt=Ue.querySelector("#settings-toggle-size"),rt=Ue.querySelector("#toggle-size-value"),it=Ue.querySelector("#settings-toggle-opacity"),at=Ue.querySelector("#toggle-opacity-value"),st=Ue.querySelectorAll(".corner-btn"),lt=Ue.querySelectorAll(".hide-strategy-btn"),ct=Ue.querySelector("#settings-hide-strategy-note"),dt=Ue.querySelector("#settings-backup"),pt=Ue.querySelector("#settings-restore"),mt=Ue.querySelector("#settings-restore-input"),bt=Ue.querySelector("#settings-toggle-position-item");let ht=!1,yt=null,ft=!1;const vt=new Set;let kt=null,Lt=!1;function Dt(e){ft=!!e,qe.classList.toggle("compact-picker",ft),ft&&(w?.classList.remove("visible"),k?.classList.remove("active")),B&&(B.setAttribute("aria-label",ft?g.expandPanel:g.minimizePanel),B.title=ft?g.expandPanel:g.minimizePanel,B.innerHTML=``)}function qt(e=""){if(!F)return;if(qe.classList.toggle("has-selection",!!St),!St)return void(F.textContent=g.noElementSelected);const t=St.tagName.toLowerCase(),o=St.id?`#${St.id}`:ye(St).slice(0,2).map(e=>`.${e}`).join(""),n=e&&e.includes(": ")?e.replace(": "," · "):e;F.textContent=n||`${t}${o}`}function Gt(){if(!qe||"true"===qe.dataset.wasDragged)return;const e=window.innerHeight||document.documentElement.clientHeight||0,t=St?.getBoundingClientRect?.(),o=t?t.top+t.height/2:e/2,n=!!t&&(o>.54*e||t.bottom>e-180);qe.classList.toggle("dock-top",n),qe.classList.toggle("dock-bottom",!n),qe.style.left="50%",qe.style.right="auto",qe.style.top="",qe.style.bottom="",qe.style.transform=""}function jt(){Ne(),Xt(!0),St&&Me(St),St=null,p&&(p.value=0),c&&(c.textContent=""),d&&(d.innerHTML=""),u&&(u.textContent=""),qt()}function _t(){if(Xt(!0),ht&&yt)try{(t=yt)&&(Kt(t,Ut.get(t)||{}),Ut.delete(t)),yt===St&&Te(yt)}catch(o){console.warn(e,"Error resetting preview style:",o)}var t;if(E){const e=E.querySelector(".btn-label");e?e.textContent=g.preview:E.textContent=g.preview,E.setAttribute("aria-label",g.preview),E.title=g.preview,E.classList.remove("tertiary"),E.classList.add("secondary")}ht=!1,yt=null}function Qt(){vt.forEach(e=>{e?.classList?.remove(n)}),vt.clear()}async function Xt(e=!0){kt&&(clearTimeout(kt),kt=null);const t=Lt;Lt=!1,Jt=null,Qt(),t&&e&&await yo(!1)}function eo(){if(!c)return;const e=St?wo(St,7,!1):"";if(c.textContent=e,d&&(d.innerHTML="",St&&e)){const t=Co(e,St),o=document.createElement("span");o.className=`selector-chip ${t.quality}`,o.textContent=t.text,d.appendChild(o);const n=So(e,St,t),r=document.createElement("span");r.className=`selector-chip ${n.level}`,r.textContent=n.label,r.title=n.reason,d.appendChild(r);const i=document.createElement("span");if(i.className="selector-chip",i.textContent=St.tagName.toLowerCase(),d.appendChild(i),Ee(St)){const e=document.createElement("span");e.className="selector-chip",e.textContent=g.urlAvailableChip,d.appendChild(e)}}o.style.display="block",qt()}function to(e){if(!e||1!==e.nodeType||e.closest?.(".mobile-block-ui"))return!1;try{const t=window.getComputedStyle(e);if("none"===t.display||"hidden"===t.visibility)return!1;const o=e.getBoundingClientRect();return o.width>=4&&o.height>=4}catch(t){return!0}}function oo(e){if(!e)return[];const t=[];let o=e;for(;o&&1===o.nodeType;){t.unshift(o);const e=te(o);if(!e||["body","html"].includes(e.tagName?.toLowerCase())||e.closest?.(".mobile-block-ui"))break;o=e}const n=new Set(t),r=function(e,t=3,o=12){if(!e||o<=0)return[];const n=[],r=ne(e).map(e=>({el:e,depth:1}));for(;r.length&&n.lengthr.push({el:e,depth:i+1})),to(o)&&n.push(o))}return n}(e).filter(e=>!n.has(e)&&(n.add(e),!0));return[...t,...r]}function no(e,t,o=null){if(!e)return"";const n=e.tagName.toLowerCase(),r=e.id?`#${e.id}`:ye(e).length?`.${ye(e).join(".")}`:"",i=o||oo(t),a=i.indexOf(t),s=i.indexOf(e);return s>=0&&a>=0?s===a?`${g.navRoot}: ${n}${r}`:s1?t/(e.length-1)*100:50;p.style.setProperty("--nav-progress",`${o}%`);const n=e.length?no(e[t],$t,e):"";p.setAttribute("aria-valuetext",n),m&&(m.disabled=t<=0),b&&(b.disabled=t>=e.length-1),u&&(u.textContent=e.length?`${n} · ${t+1}/${e.length}`:""),qt(n)}function ao(e){if(!$t){if(!St)return;$t=St}const t=oo($t);if(!t.length)return;const o=Math.max(0,t.indexOf(St)),n=t[Math.min(t.length-1,Math.max(0,o+e))];n&&n!==St&&lo(n,!0)}function lo(e,t=!1){e&&1===e.nodeType&&!e.closest(".mobile-block-ui")&&(jt(),_t(),St=e,t&&$t||($t=e),Te(St),Gt(),eo(),ro(),v.compactPickerMode&&!t&&Dt(!0))}let co=null;function po(e,t){if(!e)return;const o=e=>{const t=`${Date.now()}-${Math.random()}`;e.dataset.hideToken=t;const o=()=>{e.classList.contains("visible")||e.dataset.hideToken!==t||e.style.setProperty("display","none","important"),e.removeEventListener("transitionend",o)};e.addEventListener("transitionend",o),setTimeout(()=>{e.classList.contains("visible")||e.dataset.hideToken!==t||e.style.setProperty("display","none","important"),e.removeEventListener("transitionend",o)},350)};t?(delete e.dataset.hideToken,[qe,Ue,Ge,je].forEach(t=>{t&&t!==e&&t.classList.contains("visible")&&(t.classList.remove("visible"),o(t))}),co=e,Ye=e,e.style.setProperty("display",e===Ue?"flex":"block","important"),requestAnimationFrame(()=>{requestAnimationFrame(()=>{e.classList.add("visible")})})):(co===e&&(co=null),Ye===e&&(Ye=null),e.classList.remove("visible"),o(e))}async function mo(t){if(S("[addBlockRule] Attempting for selector:",t),!t)return{success:!1,message:g.cannotGenerateSelector};let o="##"+t;if(v.includeSiteName){const t=location.hostname;if(!t)return console.error(e,"Could not get location.hostname"),{success:!1,message:g.hostnameUnavailable};o=t+o}if(Pt.includes(o))return S(e,"Rule already exists:",o),{success:!1,message:g.ruleExists};const n=[...Pt,o];return await Bt(n),S(e,"Rule added:",o),{success:!0,rule:o}}function go(t,o,n,r){wt(t,o,n,r?{label:g.undoAction,onClick:()=>async function(t){if(!t)return wt(g.ruleUndoUnavailable,"info",1800),!1;try{const e=await zt();return e.includes(t)?(await Xt(!1),await Bt(e.filter(e=>e!==t)),fo(!1),await yo(!1),co===Ge&&await ko(),wt(g.ruleUndoComplete,"success",1800),!0):(wt(g.ruleUndoUnavailable,"info",1800),!1)}catch(o){return console.error(e,"Failed to undo rule:",o),wt(g.ruleUndoFailed,"error",2500),!1}}(r)}:null)}function ho(e,t=new Set){return(Array.isArray(e)?e:[]).filter(e=>{if(t.has(e)||!ke(e))return!1;const o=fe(e);if(!o?.selector)return!1;try{return 0===ce(o.selector).length}catch(n){return!1}})}async function ko(){S("[showList] Function called");try{const t=await zt();await It();const o=new Set(Nt);S(`[showList] Rendering ${t.length} rules.`),H.innerHTML="";const r=t.filter(e=>!o.has(e)).filter(e=>ve(e)),i=ho(t,o);q&&(q.textContent=g.blocklistSummary(t.length,r.length,Nt.length)),Z&&(Z.hidden=0===i.length,Z.textContent=i.length?`${g.blocklistPruneStale} ${i.length}`:g.blocklistPruneStale);const a=(U?.value||"").trim().toLowerCase(),s=a?t.filter(e=>e.toLowerCase().includes(a)):t;0===t.length?H.innerHTML=`

${g.noRules}

`:0===s.length?H.innerHTML=`

${g.noMatchingRules}

`:s.forEach((t,r)=>{const i=o.has(t),a=document.createElement("div");a.className="blocklist-item",a.classList.toggle("disabled-rule",i);const s=function(e,t){const o=fe(e),n=o?.selector||e,r=!!o&&ve(e),i=!(!o||o.domain&&"*"!==o.domain);let a=null;if(!t&&r&&o?.selector)try{a=ce(o.selector).length}catch(s){a=0}return{selector:n,scopeText:i?g.blocklistScopeGlobal:r?g.blocklistScopeCurrent:g.blocklistScopeOther,scopeClass:r?"current":"",matchText:t?g.blocklistDisabledChip:null===a?"":a?g.blocklistMatches(a):g.blocklistNoMatch,matchClass:t?"disabled":a>0?"match":0===a?"nomatch":""}}(t,i),l=document.createElement("div");l.className="blocklist-rule",l.title=t,l.role="button",l.tabIndex=0,l.setAttribute("aria-label",`${g.preview} ${t}`);const c=()=>{!async function(e){const t=fe(e);if(!t?.selector||!ve(e))return wt(g.rulePreviewUnavailable,"info",1800),0;await Xt(!1),await It();const o=Ft().filter(t=>t!==e);Lt=!0,Jt=o,await yo(!1,o);const r=ce(t.selector).filter(e=>e&&!e.closest?.(".mobile-block-ui"));r.slice(0,80).forEach(e=>{Ae(e),e.classList.add(n),vt.add(e)}),r.length?(kt=setTimeout(()=>{Xt(!0)},4500),wt(g.rulePreviewApplied(r.length),"info",4500,{label:g.clearPreviewAction,onClick:()=>Xt(!0)}),r.length):(await Xt(!0),wt(g.blocklistNoMatch,"info",1800))}(t)};l.addEventListener("click",c),l.addEventListener("keydown",e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),c())});const d=document.createElement("div");d.className="blocklist-rule-selector",d.textContent=s.selector;const p=document.createElement("div");p.className="blocklist-rule-meta";const u=document.createElement("span");if(u.className=`blocklist-chip ${s.scopeClass}`.trim(),u.textContent=s.scopeText,p.appendChild(u),s.matchText){const e=document.createElement("span");e.className=`blocklist-chip ${s.matchClass}`.trim(),e.textContent=s.matchText,p.appendChild(e)}l.append(d,p);const m=document.createElement("div");m.className="blocklist-controls";const b=document.createElement("button");b.className="mb-btn blocklist-btn blocklist-btn-copy",b.textContent=g.copy,b.title=g.ruleCopyTitle,b.addEventListener("click",()=>{Ce(t)?wt(g.ruleCopied,"success",2e3):wt(g.clipboardError,"error")});const h=document.createElement("button");h.className="mb-btn blocklist-btn blocklist-btn-toggle",h.textContent=i?g.blocklistEnable:g.blocklistDisable,h.title=i?g.ruleEnabled:g.ruleDisabled,h.addEventListener("click",async()=>{const e=o.has(t)?Nt.filter(e=>e!==t):[...Nt,t];await Xt(!1),await Ot(e),fo(!1),await yo(!1),await ko(),wt(o.has(t)?g.ruleEnabled:g.ruleDisabled,"info",1600)});const y=document.createElement("button");y.className="mb-btn blocklist-btn blocklist-btn-delete",y.textContent=g.cookieDelete,y.title=g.ruleDeleteTitle,y.addEventListener("click",async()=>{S("[showList] Delete button clicked for rule:",t);try{const e=Pt.indexOf(t);e>-1?(Pt.splice(e,1),await Xt(!1),await Bt(Pt),a.style.opacity="0",a.style.transform="translateX(20px) scale(0.95)",setTimeout(async()=>{fo(!1),await yo(!1),await ko(),wt(g.ruleDeleted,"info",2e3)},300)):(console.warn("Rule not found in cache for deletion:",t),wt(g.ruleDeleteError,"error"),await ko())}catch(o){console.error(e,"Error deleting rule:",o),wt(g.ruleDeleteError,"error")}}),m.append(b,h,y),a.append(l,m),H.append(a)}),S("[showList] Rendering list panel."),po(Ge,!0)}catch(t){console.error(e,"Error in showList:",t),wt(g.listShowError,"error"),po(Ge,!1)}}function Lo(e){return String(e??"").replace(/[&<>"']/g,e=>({"&":"&","<":"<",">":">",'"':""","'":"'"}[e]))}function Eo(e){if("css"===e){let e=`${g.accessibleStylesheetNotice}\n\n`;return Array.from(document.styleSheets).slice(0,30).forEach(t=>{try{e+=`/* ${t.href||"inline"} */\n`,Array.from(t.cssRules||[]).slice(0,80).forEach(t=>{e+=`${t.cssText}\n`}),e+="\n"}catch(o){e+=`/* ${g.stylesheetInaccessible}: ${t.href||"inline"} */\n\n`}}),e.trim()}if("js"===e)return Array.from(document.scripts).slice(0,80).map((e,t)=>e.src?`${t+1}. ${e.src}`:`${t+1}. inline script (${g.characterCountLabel((e.textContent||"").length)})`).join("\n")||g.noScripts;const t=document.documentElement.cloneNode(!0);return t.querySelectorAll(`#${l}, .mobile-block-ui, #mes-shadow-highlight-style`).forEach(e=>e.remove()),t.querySelectorAll("style").forEach(e=>{(e.textContent||"").includes("--md-sys-color-primary")&&(e.textContent||"").includes("#mobile-block-toggleBtn")&&e.remove()}),t.outerHTML.slice(0,6e4)}function Ro(e){try{return decodeURIComponent(e)}catch(t){return e}}function Ao(e){const t=String(e??"");return v.privacyMode?t?t.length<=8?g.cookieValuesMasked:`${t.slice(0,4)}...${t.slice(-3)} (${g.characterCountLabel(t.length)})`:"":t}function To(e){if(!v.privacyMode)return e;try{const t=new URL(e,location.href),o=t.pathname.split("/").map(e=>{if(!e)return e;const t=Ro(e);return/@|%40/.test(e)||/[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}/i.test(t)||/^[a-f0-9]{12,}$/i.test(t)||/^[A-Za-z0-9_-]{18,}$/.test(t)||/^\d{6,}$/.test(t)?":redacted":e.slice(0,48)});t.pathname=o.join("/");const n=!!t.search;return t.search=n?"?redacted":"",t.hash="",t.href}catch(t){return String(e||"").replace(/\?.*$/,"?redacted").replace(/#.*$/,"")}}function Mo(){return document.cookie.split(";").map(e=>e.trim()).filter(Boolean).map(e=>{const[t="",...o]=e.split("="),n=Ro(o.join("="));return{name:t,value:n,displayValue:Ao(n)}})}function Po(e){return"string"==typeof e&&!!e&&!/[=;,\s]/.test(e)}function No(e){if(!Po(e))return!1;const t="Thu, 01 Jan 1970 00:00:00 GMT";return document.cookie=`${e}=; expires=${t}; max-age=0`,function(){const e=location.hostname;if(!e||"localhost"===e||/^[\d.]+$/.test(e)||e.includes(":"))return[""];const t=e.split("."),o=new Set(["",e]);for(let n=1;n{(function(){const e=new Set(["/"]),t=location.pathname.split("/").filter(Boolean);let o="";return t.slice(0,-1).forEach(t=>{o+=`/${t}`,e.add(o||"/")}),e.add(location.pathname||"/"),Array.from(e)})().forEach(n=>{const r=o?`; domain=${o}`:"";document.cookie=`${e}=; path=${n}${r}; expires=${t}; max-age=0`})}),!0}let Do="element",zo="";function Bo(e=Do){if(Qt(),Do=e,ie.forEach(t=>t.classList.toggle("active",t.dataset.tab===e)),K){if(!St&&["element","code"].includes(e))return K.innerHTML=`
${g.inspectorUnavailable}
`,void(zo=g.inspectorUnavailable);if("element"===e){const e=St?wo(St,7,!0):"",t=St?xo(St):"",o=St?function(e){if(!e||1!==e.nodeType)return[];const t=[],o=new Set,n=X(e),r=e.tagName.toLowerCase(),i=(n,r,i)=>{const a="string"==typeof r?r.trim():"";if(!a||o.has(a))return;const s=Co(a,e);if(s.matchCount<=0)return;const l=So(a,e,s);o.add(a),t.push({label:n,selector:a,intent:i,matchCount:s.matchCount,quality:s.quality,qualityText:s.text,risk:l})},a=wo(e,7,!0);if(i(g.selectorCandidatePrecise,a,g.selectorIntentPrecise),i(g.selectorCandidatePattern,xo(e),g.selectorIntentPattern),v.selectorHintMode){const t=ue(e,r,n,!1);t&&i(g.selectorCandidateAttribute,se(e,t),g.selectorIntentAttribute);const o=me(e,r,n);o&&i(g.selectorCandidateHint,se(e,o),g.selectorIntentHint),function(e){if(!v.selectorHintMode||!e||1!==e.nodeType)return[];const t=X(e),o=function(){try{return"undefined"!=typeof CSS&&"function"==typeof CSS.supports&&CSS.supports("selector(:has(*))")||document.querySelector(":has(*)"),!0}catch(e){return!1}}(),n=[],r=new Set,i=(o,i,a)=>{const s=se(i,a);if(!s||r.has(s))return;const l=ce(s,t);!l.length||l.length>80||l.some(t=>t===e||t===i||t.contains?.(e))&&(r.add(s),n.push({label:o,selector:s}))};let a=e;for(let s=0;a&&1===a.nodeType&&s<4&&!a.closest?.(".mobile-block-ui");s++){const e=a.tagName.toLowerCase(),n=a.id||"";if(be(n).length){const t=ge(n);t&&i(g.selectorRiskAdvanced,a,`${e}[id^="${W(t)}"]`),be(n).forEach(t=>{(t.length>=3||"ad"===t||"ads"===t)&&i(g.selectorRiskAdvanced,a,`${e}[id*="${W(t)}"]`)})}Array.from(a.classList||[]).forEach(t=>{if(!be(t).length)return;O.test(t)||i(g.selectorRiskAdvanced,a,`${e}.${J(t)}`);const o=ge(t);o&&i(g.selectorRiskAdvanced,a,`${e}[class*="${W(o)}"]`)});const r=he(a,e);if(r&&i(g.selectorRiskAdvanced,a,r),o&&a.querySelector){const t=a.querySelector("a[href], iframe[src], img[src], script[src], source[src]");if(t){const o=t.tagName.toLowerCase(),n=t.getAttribute("href")?"href":"src",r=be(t.getAttribute(n)||"").find(e=>e.length>=3);r&&i(g.selectorRiskAdvanced,a,`${e}:has(${o}[${n}*="${W(r)}"])`)}}a=oe(a,t)}return n.slice(0,4)}(e).forEach(e=>{i(e.label,e.selector,g.selectorIntentAdvanced)})}const s=ye(e);return s.length&&i(g.selectorCandidateClass,se(e,`${r}.${s.map(J).join(".")}`),g.selectorIntentClass),i(g.selectorCandidateResource,function(e){let t=e;for(let n=0;n<5&&t&&1===t.nodeType;n++){const e=t.tagName.toLowerCase();for(const n of z){const r=t.getAttribute?.(n);if(r&&!(r.length>260))try{const o=new URL(r,location.href),i=o.pathname.split("/").filter(Boolean).pop()||o.hostname;if(i&&i.length>=4&&!O.test(i))return se(t,`${e}[${n}*="${W(i)}"]`)}catch(o){if(r.length>=4&&!O.test(r))return se(t,`${e}[${n}*="${W(r.slice(0,80))}"]`)}}t=te(t)}return""}(e),g.selectorIntentResource),t.slice(0,8)}(St):[],n=St?ne(St):[],r=function(e){if(!e)return"";const t=wo(e,7,!1),o=t?Co(t,e):null,n=t?So(t,e,o):null,r=xo(e),i=Ee(e),a=Array.from(e.attributes||[]).filter(e=>!e.name.startsWith("data-mes")&&e.value.length<=200).slice(0,20).map(e=>`${e.name}="${e.value}"`).join("\n");return[`${g.tagSummaryLabel}: ${e.tagName.toLowerCase()}`,t?`${g.selectorSummaryLabel}: ${t}`:`${g.selectorSummaryLabel}: ${g.selectorNone}`,o?`${g.matchSummaryLabel}: ${o.text}`:"",n?`${g.qualitySummaryLabel}: ${n.label} - ${n.reason}`:"",r&&r!==t?`${g.similarSelectorLabel}: ${r}`:"",i?`URL: ${i}`:"",a?`${g.attributesSummaryLabel}:\n${a}`:""].filter(Boolean).join("\n")}(St);zo=r,o.length&&(zo+=`\n\n${g.selectorSnapshotTitle}\n${o.map(e=>`[${e.label}] ${e.selector} (${e.qualityText} · ${e.risk.label} - ${e.risk.reason})`).join("\n")}`),K.innerHTML=`\n
\n
${g.inspectorSummaryTitle}
\n
${Lo(r)}
\n
\n
\n
${g.inspectorActionsTitle}
\n
\n
${g.similarSelectorLabel}
\n
${g.extractAttributeLabel}
\n
${g.focusSelectedRangeLabel}
\n
${g.selectParentElementLabel}
\n
${g.childElementsLabel(n.length)}
\n
\n
\n
\n
${g.selectorCandidatesTitle}
\n
\n ${o.map((e,t)=>`\n
\n
\n ${Lo(e.label)}\n ${Lo(e.qualityText)}\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
${Lo(e.selector)}
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t${Lo(e.risk.label)}\n\t\t\t\t\t\t\t\t\t\t${Lo(e.risk.reason)}\n\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\t\t\n \n \n
\n
`).join("")||`
${Lo([e,t&&t!==e?t:""].filter(Boolean).join("\n"))}
`}\n
\n
`,K._mesSelectorCandidates=o}else if("code"===e){const e=function(e){if(!e)return"";const o=e.cloneNode(!0);o.classList?.remove(t,n,i,a,s),o.querySelectorAll?.(`#${l}, .${t}, .${n}, .${i}, .${a}, .${s}, .mobile-block-ui`).forEach(e=>{e.id===l||e.classList?.contains("mobile-block-ui")?e.remove():e.classList?.remove(t,n,i,a,s)});const r=o.outerHTML||"";let c=0,d="";return r.split(/(?=<)/).forEach(e=>{const t=e.trim();t&&(t.startsWith("]*[^/]>\s*$/.test(t)&&!/^<(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)\b/i.test(t)&&c++)}),d.trim()}(St),o=function(e){if(!e)return"";try{const t=window.getComputedStyle(e);return["display","position","z-index","width","height","margin","padding","background-color","color","font-size","line-height","overflow","opacity","visibility","pointer-events"].map(e=>`${e}: ${t.getPropertyValue(e)||"(empty)"};`).join("\n")}catch(t){return""}}(St),r=function(e){if(!e)return g.noInlineEvents;const t=[];Array.from(e.attributes||[]).forEach(e=>{e.name.startsWith("on")&&t.push(`${e.name}="${e.value}"`)});const o=[e.id,...Array.from(e.classList||[])].filter(e=>e&&e.length>2&&!I.test(e)).slice(0,5);if(o.length){const e=new RegExp(o.map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),"i");Array.from(document.scripts).forEach((o,n)=>{!o.src&&e.test(o.textContent||"")&&t.push(`inline script #${n+1}: ${(o.textContent||"").trim().slice(0,600)}`)})}return t.length?t.join("\n\n"):g.noInlineEvents}(St);zo=`HTML\n${e}\n\nCSS\n${o}\n\nJS\n${r}`,K.innerHTML=`\n
HTML
${Lo(e)}
\n
${g.computedStyleTitle}
${Lo(o)}
\n
${g.scriptHintsTitle}
${Lo(r)}
`}else if("page"===e){const e=Eo("html"),t=Eo("css"),o=Eo("js");zo=`HTML\n${e}\n\nCSS\n${t}\n\nJS\n${o}`,K.innerHTML=`\n
HTML
${Lo(e)}
\n
CSS
${Lo(t)}
\n
JS
${Lo(o)}
`}else if("cookies"===e){const e=Mo();zo=e.map(e=>`${e.name}=${e.displayValue}`).join("\n")||g.noCookies,K.innerHTML=e.length?`
${g.inspectorTabCookies}
${Lo(`${g.cookieReadOnly}\n${g.cookieScopeNotice}`)}
${e.map(e=>`\n
\n ${Lo(e.name)}
${Lo(e.displayValue)}
\n
\n \n \n \n
\n
`).join("")}
`:`
${g.noCookies}
`}else if("diagnostics"===e)zo=function(){let e=g.webglNoInfo;try{const t=document.createElement("canvas"),o=t.getContext("webgl")||t.getContext("experimental-webgl");if(o){const t=o.getExtension("WEBGL_debug_renderer_info");e=t?`${o.getParameter(t.UNMASKED_VENDOR_WEBGL)} / ${o.getParameter(t.UNMASKED_RENDERER_WEBGL)}`:g.webglAvailable}}catch(t){}return[`User Agent: ${navigator.userAgent}`,`${g.diagnosticLanguage}: ${navigator.language}`,`${g.diagnosticTimezone}: ${Intl.DateTimeFormat().resolvedOptions().timeZone}`,`${g.diagnosticScreen}: ${screen.width}x${screen.height} / DPR ${devicePixelRatio}`,`${g.diagnosticViewport}: ${innerWidth}x${innerHeight}`,`${g.diagnosticCpuThreads}: ${navigator.hardwareConcurrency||"N/A"}`,`${g.diagnosticMemory}: ${navigator.deviceMemory||"N/A"} GB`,`WebGL: ${e}`,`${g.diagnosticResourceCount}: ${performance.getEntriesByType("resource").length}`].join("\n")}(),K.innerHTML=`
${g.browserScreenTitle}
${Lo(zo)}
`;else if("resources"===e){const e=performance.getEntriesByType("resource").slice(-120).reverse();zo=e.map(e=>`[${e.initiatorType||"unknown"}] ${Math.round(e.duration)}ms ${To(e.name)}`).join("\n"),K.innerHTML=`
${g.recentResourcesTitle}
${e.map((e,t)=>`\n
\n ${Lo(e.initiatorType||"unknown")} ${Math.round(e.duration)}ms
${Lo(To(e.name))}
\n \n
`).join("")||g.noResources}
`}}}function Io(t){He&&qe&&(xt=t,He.classList.toggle("selecting",t),ut(),vo(),t?(Gt(),po(qe,!0),Dt(!1),St&&Te(St),ro(),eo()):(po(qe,!1),co===Ge&&po(Ge,!1),co===Ue&&po(Ue,!1),co===je&&po(je,!1),jt(),_t(),Dt(!1),$t=null),S(e,"Selection mode:",t?"ON":"OFF"))}let Oo=null,Fo=null,qo=new WeakSet;function Uo(){if(Oo&&(Oo.disconnect(),Oo=null),Wt&&(clearInterval(Wt),Wt=null),qo=new WeakSet,!v.observeDomChanges||v.tempBlockingDisabled)return;const e=e=>{if(!e||qo.has(e))return!1;try{const t=v.lowPowerMode?{childList:!0,subtree:!0}:{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style","class","id","hidden"],characterData:!0};return Oo.observe(e,t),qo.add(e),!0}catch(t){}return!1},t=(t=document)=>{if(!v.shadowDomSupport)return!1;let o=!1;return re(t).forEach(t=>{e(t)&&(o=!0)}),o};Oo=new MutationObserver(e=>{if(Zt)return void(Vt=!0);let o=!1;const n=v.lowPowerMode?e.some(e=>Array.from(e.removedNodes||[]).some(uo)):e.some(e=>!("attributes"!==e.type||!Ht.has(e.target))||!!uo(e.target)||Array.from(e.removedNodes||[]).some(uo)),r=!v.lowPowerMode&&e.some(e=>"attributes"===e.type&&["class","id","hidden"].includes(e.attributeName)&&1===e.target?.nodeType&&!bo(e.target)),i=e.some(e=>{const t=e.target;return!(!t||bo(t))&&Array.from(e.addedNodes||[]).some(e=>1===e.nodeType&&!bo(e))});n&&io(60),(i||r)&&(i&&(e.forEach(e=>{Array.from(e.addedNodes||[]).forEach(e=>{1!==e.nodeType||bo(e)||!e.shadowRoot&&!e.querySelector?.("*")||(o=!0)})}),o&&t(document)),clearTimeout(Fo),Fo=setTimeout(()=>{"function"==typeof requestIdleCallback?requestIdleCallback(()=>yo(!1),{timeout:v.lowPowerMode?1400:500}):yo(!1)},v.lowPowerMode?420:120))}),e(document.documentElement),t(document),Wt=setInterval(()=>{t(document)?yo(!1):v.lowPowerMode||io(0)},v.lowPowerMode?1e4:2500)}function Ho(e,t){e&&(e.classList.toggle("active",t),e.setAttribute("aria-checked",t?"true":"false"))}function Go(){Je.forEach(e=>{const t=e.dataset.uiLanguage===v.uiLanguage;e.classList.toggle("active",t),e.setAttribute("aria-checked",t?"true":"false"),e.setAttribute("aria-pressed",t?"true":"false")})}function jo(){const e=v.hideToggleButton?"gesture":"button";Qe.forEach(t=>{const o=t.dataset.launcherMode===e;t.classList.toggle("active",o),t.setAttribute("aria-checked",o?"true":"false"),t.setAttribute("aria-pressed",o?"true":"false")}),He&&He.classList.toggle("hidden-toggle",v.hideToggleButton),bt&&(bt.hidden=v.hideToggleButton),Zo()}function Zo(){Xe?.classList.toggle("visible",v.hideToggleButton),Ke.forEach(e=>{const t=Number(e.dataset.gestureFingers)===v.gestureFingerCount;e.classList.toggle("active",t),e.setAttribute("aria-checked",t?"true":"false"),e.setAttribute("aria-pressed",t?"true":"false")}),et.forEach(e=>{const t=Number(e.dataset.gestureTaps)===v.gestureTapCount;e.classList.toggle("active",t),e.setAttribute("aria-checked",t?"true":"false"),e.setAttribute("aria-pressed",t?"true":"false")})}function Vo(e,t,o){e.addEventListener("click",async()=>{v[t]=!v[t],Ho(e,v[t]),"function"==typeof o&&await o(v[t]),await N(),wt(g.settingsSaved,"info",1500)})}S(e,"Attaching event listeners..."),He.addEventListener("click",()=>{Io(!xt)}),B.addEventListener("click",()=>{Dt(!ft)}),m.addEventListener("click",()=>ao(-1)),b.addEventListener("click",()=>ao(1)),k.addEventListener("click",()=>{ft&&Dt(!1),w.classList.toggle("visible"),k.classList.toggle("active",w.classList.contains("visible"))}),x.addEventListener("click",()=>{if(!St)return void wt(g.noElementSelected,"warning");const e=wo(St,7,!0);e?Ce(e)?(wt(g.selectorCopied,"success"),v.autoCloseAfterCopy&&Io(!1)):wt(g.clipboardError,"error"):wt(g.cannotGenerateSelector,"error")}),$.addEventListener("click",()=>{if(!St)return void wt(g.noElementSelected,"warning");const e=wo(St,7,!0);if(!e)return void wt(g.cannotGenerateSelector,"error");const t=function(e){return e?v.includeSiteName?`${location.hostname}##${e}`:`##${e}`:""}(e);Ce(t)?(wt(g.ruleCopied,"success"),v.autoCloseAfterCopy&&Io(!1)):wt(g.clipboardError,"error")}),C.addEventListener("click",async()=>{if(!St)return void wt(g.noElementSelected,"warning");const e=xo(St);if(!e)return void wt(g.cannotGenerateSelector,"error");const t=Co(e,St),o=Math.max(t.matchCount,0);if(o>1&&!confirm(g.confirmBroadSelector(o)))return;const n=await mo(e);n.success?(go(g.similarRuleReady(o||1),"success",3200,n.rule),_t(),await yo(!1),Io(!1)):wt(n.message||g.ruleAddError,n.success?"success":"info")}),L.addEventListener("click",()=>{if(!St)return void wt(g.noElementSelected,"warning");const e=Ee(St);e?Ce(e)?wt(g.urlCopied,"success"):wt(g.clipboardError,"error"):wt(g.urlNotFound,"info")}),A.addEventListener("click",()=>{Dt(!1),Bo("element"),po(qe,!1),po(je,!0)}),E.addEventListener("click",()=>{if(St)if(ht){if(yt&&yt!==St)return void wt(g.previewDifferentElement,"warning");_t(),S(e,"Restored preview for:",yt)}else{if("none"===window.getComputedStyle(St).display)return void wt(g.alreadyHidden,"info");!function(e,t=v.hideStrategy){e&&(function(e){e&&!Ut.has(e)&&Ut.set(e,{display:e.style.display||"",visibility:e.style.visibility||"",opacity:e.style.opacity||"",pointerEvents:e.style.pointerEvents||""})}(e),Yt(e,t))}(St);const t=E.querySelector(".btn-label");t?t.textContent=g.restorePreview:E.textContent=g.restorePreview,E.setAttribute("aria-label",g.restorePreview),E.title=g.restorePreview,E.classList.remove("secondary"),E.classList.add("tertiary"),ht=!0,yt=St,Me(St),S(e,"Previewing hide for:",St)}else wt(g.noElementSelected,"warning")}),R.addEventListener("click",async()=>{if(S("[addBtn] Clicked"),St)try{const o=wo(St,7,!0);if(S("[addBtn] Generated selector for saving:",o),!o)return void wt(g.cannotGenerateSelector,"error");const n=Co(o,St),r=So(o,St,n),i=n.matchCount>1;if(i&&!confirm(g.confirmBroadSelector(n.matchCount)))return;if(!$o(r,i))return;const a=await mo(o);if(S("[addBtn] addBlockRule result:",a),a.success){go(g.ruleSavedReloading,"success",3200,a.rule),_t();try{await yo(!1)}catch(t){console.error(e,"Error applying rule immediately after save:",t),wt(g.ruleSavedApplyFailed,"warning",3e3)}Io(!1)}else wt(a.message||g.ruleAddError,a.success?"success":"info")}catch(o){console.error(e,"Error during Save Rule click:",o),wt(`${g.ruleAddError} ${o.message}`,"error")}else wt(g.noElementSelected,"warning")}),T.addEventListener("click",()=>{S("[listBtn] Clicked"),Dt(!1),po(qe,!1),ko()}),M.addEventListener("click",()=>{S("[settingsBtn] Clicked"),Dt(!1),po(qe,!1),po(Ue,!0)}),D.addEventListener("click",()=>{Io(!1)}),Y.addEventListener("click",()=>{S("[listClose] Clicked"),Xt(!0),po(Ge,!1),xt&&(S("[listClose] Restoring main panel"),po(qe,!0))}),U.addEventListener("input",()=>{ko()}),G.addEventListener("click",async()=>{await It();const e=new Set(Nt),t=(await zt()).filter(t=>ve(t)&&!e.has(t));t.length?Ce(t.join("\n"))?wt(g.rulesCopied(t.length),"success"):wt(g.clipboardError,"error"):wt(g.noRules,"info")}),j.addEventListener("click",async()=>{const e=await zt();e.length?Ce(e.join("\n"))?wt(g.rulesCopied(e.length),"success"):wt(g.clipboardError,"error"):wt(g.noRules,"info")}),Z.addEventListener("click",async()=>{const e=await zt();await It();const t=ho(e,new Set(Nt));if(!t.length)return wt(g.blocklistNoMatch,"info"),void await ko();if(!confirm(g.confirmPruneStaleRules(t.length)))return;const o=new Set(t);await Xt(!1),await Bt(e.filter(e=>!o.has(e))),fo(!1),await yo(!1),await ko(),wt(g.staleRulesDeleted(t.length),"info")}),V.addEventListener("click",async()=>{const e=await zt(),t=e.filter(e=>ke(e));t.length?confirm(g.confirmDeleteSiteRules(location.hostname,t.length))&&(await Xt(!1),await Bt(e.filter(e=>!ke(e))),fo(!1),await yo(!1),await ko(),wt(g.siteRulesDeleted(t.length),"info")):wt(g.noRules,"info")}),ie.forEach(e=>{e.addEventListener("click",()=>{Bo(e.dataset.tab)})}),ae.addEventListener("click",()=>{new Set(["page","cookies","diagnostics","resources"]).has(Do)&&!confirm(g.sensitiveCopyConfirm)||(Ce(zo||"")?wt(g.infoCopied,"success"):wt(g.clipboardError,"error"))}),le.addEventListener("click",()=>{Qt(),po(je,!1),xt&&po(qe,!0)}),K.addEventListener("click",async e=>{const t=e.target.closest("[data-inspector-action]");if(t){const e=t.dataset.inspectorAction;if("copy-similar"===e){const e=St?xo(St):"";e&&Ce(e)?wt(g.similarSelectorCopied,"success"):wt(g.cannotGenerateSelector,"error")}else if("copy-candidate"===e||"preview-candidate"===e||"save-candidate"===e){const o=parseInt(t.dataset.candidateIndex,10),r=K._mesSelectorCandidates?.[o];if(!r?.selector)return void wt(g.cannotGenerateSelector,"error");if("copy-candidate"===e)return void(Ce(r.selector)?wt(g.selectorCandidateCopied,"success"):wt(g.clipboardError,"error"));if("preview-candidate"===e){const e=function(e){if(Qt(),!e)return 0;const t=ce(e).filter(e=>e&&!e.closest?.(".mobile-block-ui"));return t.slice(0,80).forEach(e=>{Ae(e),e.classList.add(n),vt.add(e)}),t.length}(r.selector);return void wt(e?g.selectorCandidatePreview(e):g.cannotGenerateSelector,e?"info":"error")}const i=r.matchCount>1;if(i&&!confirm(g.confirmBroadSelector(r.matchCount)))return;if(!$o(r.risk,i))return;Qt();const a=await mo(r.selector);a.success?(_t(),fo(!1),await yo(!1),go(g.selectorCandidateSaved(r.matchCount||1),"success",3200,a.rule),Bo("element")):wt(a.message,a.message===g.ruleExists?"info":"error")}else if("extract-attribute"===e){const e=prompt(g.attributePrompt,"data-testid");if(!e)return;const t=St?.getAttribute(e.trim());if(null==t)return void wt(g.attributeNotFound,"info");if(function(e,t){if(!v.privacyMode)return!1;const o=String(e||"").toLowerCase();return new Set(["href","src","data-src","data-original","poster","action"]).has(o)||/(token|secret|session|auth|cookie|password|passwd|credential|key)/i.test(o)||function(e){const t=String(e||"");return/token|secret|session|auth|bearer|password|passwd|credential|api[-_]?key/i.test(t)||/[A-Za-z0-9_-]{24,}/.test(t)||/[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}/i.test(t)}(t)}(e,t)&&!confirm(g.sensitiveCopyConfirm))return;Ce(t)?wt(g.attributeCopied,"success"):wt(g.clipboardError,"error")}else if("toggle-isolation"===e)Ct?(Ne(),wt(g.focusModeOff,"info",1400)):St&&function(e){if(!e||so(e))return!1;Ne(),Pe(document),document.documentElement.classList.add(r);let t=e,o=!0;for(;t&&1===t.nodeType;){const e="function"==typeof t.getRootNode?t.getRootNode():document;if(!Q(e)){o&&(t.classList.add(a),o=!1),De(t,document);break}Pe(e),o&&(t.classList.add(a),o=!1),De(t,e),e.host.classList.add(s),Et.add(e.host),t=e.host}return Ct=!0,!0}(St)?wt(g.focusModeOn,"info",1400):wt(g.noElementSelected,"warning"),Bo("element");else if("parent"===e){const e=te(St);e&&!["body","html"].includes(e.tagName.toLowerCase())&&(lo(e,!0),Bo("element"))}else if("children"===e){const e=ne(St);zo=e.map((e,t)=>`${t+1}. ${no(e,St)}`).join("\n")||g.noChildElements,K.innerHTML=`
${g.childElementsTitle}
${e.map((e,t)=>`\n
\n ${Lo(no(e,St))}\n \n
`).join("")||g.noChildElements}
`,K._mesChildList=e}return}const o=e.target.closest("[data-child-index]");if(o&&K._mesChildList){const e=K._mesChildList[parseInt(o.dataset.childIndex,10)];return void(e&&(lo(e,!0),Bo("element")))}const i=e.target.closest("[data-cookie-action]");if(i){let e="";try{e=decodeURIComponent(i.dataset.cookieName||"")}catch(c){}const t=Mo().find(t=>t.name===e),o=i.dataset.cookieAction;if(!e||"delete"!==o&&!t)return void wt(g.cookieActionFailed,"error");if("copy"===o){if(v.privacyMode&&!confirm(g.sensitiveCopyConfirm))return;return void(Ce(t.value)?wt(g.infoCopied,"success"):wt(g.clipboardError,"error"))}if("edit"===o){const o=prompt(g.cookieEditPrompt(e),v.privacyMode?"":t.value);if(null===o)return;return void(function(e,t){if(!Po(e))return!1;const o="https:"===location.protocol?"; Secure":"";return No(e),document.cookie=`${e}=${encodeURIComponent(t)}; path=/; max-age=31536000; SameSite=Lax${o}`,!0}(e,o)?(wt(g.cookieUpdated,"success"),Bo("cookies")):wt(g.cookieActionFailed,"error"))}if("delete"===o){if(!confirm(g.cookieDeleteConfirm(e)))return;return void(No(e)?(wt(g.cookieDeleted,"info"),Bo("cookies")):wt(g.cookieActionFailed,"error"))}}const l=e.target.closest("[data-resource-index]");if(l){const e=performance.getEntriesByType("resource").slice(-120).reverse()[parseInt(l.dataset.resourceIndex,10)];if(!e)return;const t=function(e){if(!e)return"";const t=[`URL: ${To(e.name)}`,`${g.resourceTypeLabel}: ${e.initiatorType||"unknown"}`,`${g.resourceTimeLabel}: ${Math.round(e.duration)}ms`,`${g.resourceSizeLabel}: ${Math.round(e.transferSize||0)} bytes`,`${g.resourceStartLabel}: ${Math.round(e.startTime)}ms`];return v.privacyMode||t.push(`${g.resourceOriginalUrlLabel}: ${e.name}`),t.join("\n")}(e);zo=t,K.innerHTML=`
${g.resourceMetadataLabel}
${Lo(t)}
`}}),de.addEventListener("click",()=>{S("[settingsClose] Clicked"),po(Ue,!1),xt&&(S("[settingsClose] Restoring main panel"),po(qe,!0))}),Je.forEach(e=>{e.addEventListener("click",async()=>{const t=h(e.dataset.uiLanguage);v.uiLanguage!==t&&(v.uiLanguage=t,y(v.uiLanguage),Be(),Go(),await N()&&wt(g.languageSavedReloadNotice,"info",2600))})}),Go(),pe.addEventListener("click",async()=>{v.includeSiteName=!v.includeSiteName,Ho(pe,v.includeSiteName),await N(),wt(g.settingsSaved,"info",1500)}),Le.addEventListener("click",async()=>{v.showShieldIcon=!v.showShieldIcon,Ho(Le,v.showShieldIcon),vo(),await N(),wt(g.settingsSaved,"info",1500)}),Re.addEventListener("click",async()=>{v.tempBlockingDisabled=!v.tempBlockingDisabled,Ho(Re,v.tempBlockingDisabled),Re.classList.toggle("error",v.tempBlockingDisabled),v.tempBlockingDisabled?fo():await async function(t=!0){S(e,"Re-enabling blocking rules...");const o=await yo(!1);t&&o>0?wt(g.tempBlockingOff,"success",2e3):t&&wt(g.tempBlockingOff,"info",1500)}(),Uo(),await N()}),Vo(ze,"observeDomChanges",()=>{Uo()}),Vo(Oe,"lowPowerMode",()=>{Uo(),gt()}),Vo(Fe,"shadowDomSupport",()=>{St&&(eo(),ro())}),Vo(Ze,"selectorHintMode",()=>{St&&eo()}),Vo(Ve,"privacyMode",()=>{Bo(Do)}),Vo(_e,"autoCloseAfterCopy"),Vo(We,"compactPickerMode",e=>{e?xt&&St&&Dt(!0):Dt(!1)}),Qe.forEach(e=>{e.addEventListener("click",async()=>{const t="gesture"===e.dataset.launcherMode;v.hideToggleButton=t,v.twoFingerGesture=t,jo(),await N(),wt(t?g.launcherGestureReady(`${3===v.gestureFingerCount?g.gestureThreeFingers:g.gestureTwoFingers} ${3===v.gestureTapCount?g.gestureThreeTaps:g.gestureTwoTaps}`):g.settingsSaved,"info",1800)})}),jo(),Ke.forEach(e=>{e.addEventListener("click",async()=>{const t=Number(e.dataset.gestureFingers);[2,3].includes(t)&&v.gestureFingerCount!==t&&(v.gestureFingerCount=t,Zo(),await N(),wt(g.settingsSaved,"info",1500))})}),et.forEach(e=>{e.addEventListener("click",async()=>{const t=Number(e.dataset.gestureTaps);[2,3].includes(t)&&v.gestureTapCount!==t&&(v.gestureTapCount=t,Zo(),await N(),wt(g.settingsSaved,"info",1500))})});const _o=e=>{st.forEach(t=>{t.classList.toggle("active",t.dataset.corner===e)})};st.forEach(e=>{e.addEventListener("click",async()=>{const t=e.dataset.corner;v.toggleBtnCorner!==t&&(v.toggleBtnCorner=t,_o(t),Ie(),await N(),wt(g.settingsSaved,"info",1500))})}),_o(v.toggleBtnCorner);const Wo=e=>{lt.forEach(t=>{t.classList.toggle("active",t.dataset.hideStrategy===e)}),ct&&(ct.textContent=function(e=v.hideStrategy){const t={stylesheet:g.hideStrategyStylesheetNotice,display:g.hideStrategyDisplayNotice,visibility:g.hideStrategyVisibilityNotice,opacity:g.hideStrategyOpacityNotice};return t[e]||t.stylesheet}(e))};let Jo;lt.forEach(e=>{e.addEventListener("click",async()=>{const t=e.dataset.hideStrategy;v.hideStrategy!==t&&(v.hideStrategy=t,Wo(t),fo(!1),await yo(!1),await N(),wt(g.settingsSaved,"info",1500))})}),Wo(v.hideStrategy);const Qo=()=>{clearTimeout(Jo),Jo=setTimeout(async()=>{await N(),S(e,"Settings saved via debounce")},500)};function Yo(e){if(xt&&!function(e){const t=e.target;return!(!t?.closest?.(".mobile-block-ui")&&t!==He&&!He?.contains?.(t))}(e))try{e.preventDefault(),e.stopImmediatePropagation()}catch(t){}}tt.addEventListener("input",e=>{const t=parseFloat(e.target.value);v.panelOpacity=t,ot.textContent=t.toFixed(2),document.documentElement.style.setProperty("--panel-opacity",t),document.querySelectorAll("#mobile-block-panel, #mobile-settings-panel, #mobile-blocklist-panel, #mobile-inspector-panel").forEach(e=>{e.style.setProperty("background-color",`rgba(248, 248, 250, ${t})`,"important")}),Qo()}),nt.addEventListener("input",e=>{const t=parseFloat(e.target.value);v.toggleSizeScale=t,rt.textContent=t.toFixed(1)+"x",document.documentElement.style.setProperty("--toggle-size",28*t+"px"),He&&(He.style.setProperty("width","var(--toggle-hitbox-size)","important"),He.style.setProperty("height","var(--toggle-hitbox-size)","important")),Qo()}),it.addEventListener("input",e=>{const t=parseFloat(e.target.value);v.toggleOpacity=t,at.textContent=t.toFixed(2),document.documentElement.style.setProperty("--toggle-opacity",t),He&&He.style.setProperty("opacity",t,"important"),Qo()}),dt.addEventListener("click",async()=>{try{const e=await zt(),t=await It();if(0===e.length)return void wt(g.backupNoRules,"info");const o=JSON.stringify({version:"2.2.4",exportedAt:(new Date).toISOString(),settings:v,rules:e,disabledRules:t},null,2),n=new Blob([o],{type:"application/json"}),r=URL.createObjectURL(n),i=document.createElement("a"),a=(new Date).toISOString().slice(0,19).replace(/:/g,"-");i.href=r,i.download=`mobile_element_selector_backup_${a}.json`,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(r),wt(g.backupStarting,"success")}catch(t){console.error(e,"Backup failed:",t),wt(g.backupError,"error")}}),pt.addEventListener("click",()=>{mt.click()}),mt.addEventListener("change",async t=>{const o=t.target.files[0];if(!o)return;const n=new FileReader;n.onload=async t=>{try{const o=t.target.result,n=function(e){if(Array.isArray(e))return{...we(e),disabledRules:[],settings:null};if(!e||"object"!=typeof e)throw new Error("Invalid restore payload.");const t=xe(e);if(!t||"object"!=typeof t||Array.isArray(t))throw new Error("Invalid restore payload.");if(Array.isArray(t.rules)){const e=we(t.rules),o=Array.isArray(t.disabledRules)?we(t.disabledRules).rules.filter(t=>e.rules.includes(t)):[];return{...e,disabledRules:o,settings:t.settings&&"object"==typeof t.settings?t.settings:null}}const o=xe(t[_]),n=Object.keys(o).length||_ in t?o:t;if(!function(e){const t=Object.entries(xe(e));return!t.length||t.every(([e,t])=>!Se.has(e)&&Array.isArray(t))}(n))throw new Error("Invalid restore payload.");return{...$e(n),disabledRules:[],settings:null}}(JSON.parse(o));n.invalidCount>0&&console.warn(e,`Skipped ${n.invalidCount} invalid restored rules.`),await Xt(!1),await Bt(n.rules),await Ot(n.disabledRules),n.settings&&(v={...f,...v,...n.settings},await N(),await P(),await N(),Be(),vo(),Ie(),Wo(v.hideStrategy),Uo(),gt()),fo(!1),await yo(!0),wt(n.duplicateCount>0?g.restoreSuccessDeduped(n.duplicateCount):g.restoreSuccess,"success",2500),Ge.classList.contains("visible")&&await ko(),Ue.classList.contains("visible")&&([[pe,v.includeSiteName],[Le,v.showShieldIcon],[ze,v.observeDomChanges],[Oe,v.lowPowerMode],[Fe,v.shadowDomSupport],[Ze,v.selectorHintMode],[Ve,v.privacyMode],[_e,v.autoCloseAfterCopy],[We,v.compactPickerMode]].forEach(([e,t])=>{Ho(e,t)}),Ho(Re,v.tempBlockingDisabled),Re.classList.toggle("error",v.tempBlockingDisabled),Go(),jo(),tt.value=v.panelOpacity,ot.textContent=v.panelOpacity.toFixed(2),nt.value=v.toggleSizeScale,rt.textContent=v.toggleSizeScale.toFixed(1)+"x",it.value=v.toggleOpacity,at.textContent=v.toggleOpacity.toFixed(2),_o(v.toggleBtnCorner))}catch(o){console.error(e,"Restore failed:",o),o instanceof SyntaxError||/Invalid (file content|restore payload)/.test(o.message)?wt(g.restoreErrorInvalidFile,"error"):wt(g.restoreErrorGeneral,"error")}finally{mt.value=""}},n.onerror=t=>{console.error(e,"File reading error:",t),wt(g.restoreErrorGeneral,"error"),mt.value=""},n.readAsText(o)}),["click","auxclick","dblclick","mousedown","mouseup","pointerdown","pointerup","pointercancel"].forEach(e=>{document.addEventListener(e,Yo,{capture:!0,passive:!1})}),document.addEventListener("touchstart",e=>{if(!xt)return;if(e.target.closest(".mobile-block-ui"))return;try{e.preventDefault(),e.stopImmediatePropagation()}catch(n){}const t=e.touches[0];Rt=t.clientX,At=t.clientY,Tt=!1;const o=ee(Rt,At);$t=o&&!o.closest(".mobile-block-ui")&&"BODY"!==o.tagName&&"HTML"!==o.tagName?o:null},{capture:!0,passive:!1}),document.addEventListener("touchmove",e=>{if(!xt||Tt||!e.touches[0])return;if(e.target.closest(".mobile-block-ui"))return;const t=e.touches[0],o=t.clientX-Rt,n=t.clientY-At;if(Math.sqrt(o*o+n*n)>Mt){Tt=!0;try{e.preventDefault(),e.stopImmediatePropagation()}catch(r){}St&&Me(St),$t=null}},{capture:!0,passive:!1});let Xo=0,Ko=0,en=0;function tn(e){if(!e)return;let t,o,n,r,i,a,s,l=!1,c=!1;function d(e,t,o){return o=700?20:16,r=function(){const e=document.createElement("div");e.style.cssText="position:fixed;top:env(safe-area-inset-top,0px);right:env(safe-area-inset-right,0px);bottom:env(safe-area-inset-bottom,0px);left:env(safe-area-inset-left,0px);width:0;height:0;visibility:hidden;pointer-events:none;",document.documentElement.appendChild(e);const t=getComputedStyle(e),o={top:p(t.top),right:p(t.right),bottom:p(t.bottom),left:p(t.left)};return e.remove(),o}(),i=Math.min(e.offsetWidth||e.getBoundingClientRect().width||t,t-2*n),a=Math.min(e.offsetHeight||e.getBoundingClientRect().height||o,o-2*n),s=n+r.left,l=Math.max(s,t-i-n-r.right),c=n+r.top;return{viewportWidth:t,viewportHeight:o,width:i,height:a,minLeft:s,maxLeft:l,minTop:c,maxTop:Math.max(c,o-a-n-r.bottom)}}function m(t=!0,o=""){const n=function(){const{viewportWidth:t,viewportHeight:o,width:n,height:r,minLeft:i,maxLeft:a,minTop:s,maxTop:l}=u(),c=d((t-n)/2,i,a),p=d((o-r)/2,s,l),m=d((o-r)/2,s,l),b=[{name:"top-center",left:c,top:s},{name:"bottom-center",left:c,top:l}];return e!==qe&&b.push({name:"center",left:c,top:p},{name:"left-center",left:i,top:m},{name:"right-center",left:a,top:m}),b}();!function(t,o=!0){t&&(e.dataset.wasDragged="true",e.dataset.snapAnchor=t.name,e===qe&&(qe.classList.toggle("dock-top","top-center"===t.name),qe.classList.toggle("dock-bottom","bottom-center"===t.name)),e.style.transition=o?"left 220ms cubic-bezier(0.22, 1, 0.36, 1), top 220ms cubic-bezier(0.22, 1, 0.36, 1), transform 220ms cubic-bezier(0.22, 1, 0.36, 1)":"none",e.style.left=`${Math.round(t.left)}px`,e.style.top=`${Math.round(t.top)}px`,e.style.right="auto",e.style.bottom="auto",e.style.transform="",window.setTimeout(()=>{l||e.dataset.snapAnchor!==t.name||(e.style.transition="")},o?220:0))}(o&&n.find(e=>e.name===o)||function(t){if(!t.length)return null;const o=Math.abs(i||0),n=Math.abs(a||0);let r="";e===qe?n>48&&(r=a<0?"top-center":"bottom-center"):o>64&&o>1.12*n?r=i<0?"left-center":"right-center":n>64&&(r=a<0?"top-center":"bottom-center");const s=r&&t.find(e=>e.name===r);if(s)return s;const l=e.getBoundingClientRect(),c=l.left+l.width/2,d=l.top+l.height/2;return t.reduce((e,t)=>{const o=t.left+l.width/2,n=t.top+l.height/2,r=Math.hypot(c-o,d-n);return!e||r{if(d.target.closest(".scrollable-container"))return void(l=!1);const p=d.target.closest("button, input, select, textarea, .blocklist-item, .mb-slider, #blocker-info, #blocklist-container, #inspector-content, .inspector-pre, .inspector-row");if(p&&e.contains(p))return;if(d.touches.length>1)return;l=!0,c=!1;const m=d.touches[0];t=m.clientX,o=m.clientY,i=0,a=0;const b=e.getBoundingClientRect();e.style.transition="none",e.style.transform="none",e.style.left=`${b.left}px`,e.style.top=`${b.top}px`,e.style.right="auto",e.style.bottom="auto",n=b.left,r=b.top,s=u(),e.style.cursor="grabbing"},{passive:!0}),e.addEventListener("touchmove",p=>{if(!l||p.touches.length>1)return;const m=p.touches[0],b=m.clientX-t,g=m.clientY-o;if(i=b,a=g,!c&&Math.sqrt(b*b+g*g)>5&&(c=!0),c){p.preventDefault();const t=s||u(),o=d(n+b,t.minLeft,t.maxLeft),i=d(r+g,t.minTop,t.maxTop);e.style.left=`${o}px`,e.style.top=`${i}px`}},{passive:!1}),e.addEventListener("touchend",()=>{l&&c&&m(),l=!1,c=!1,s=null,e.style.cursor="grab"}),e.addEventListener("touchcancel",()=>{l=!1,c=!1,s=null,e.style.cursor="grab"}),window.addEventListener("resize",()=>{"true"===e.dataset.wasDragged&&e.dataset.snapAnchor&&"none"!==getComputedStyle(e).display&&m(!1,e.dataset.snapAnchor)},{passive:!0})}document.addEventListener("touchstart",e=>{const t=v.gestureFingerCount||2,o=v.gestureTapCount||2;if(!v.twoFingerGesture||e.touches.length!==t)return;if(e.target.closest(".mobile-block-ui"))return;const n=Date.now();if(n-Xo>560&&(Ko=0),Xo=n,Ko+=1,Ko>=o){try{e.preventDefault(),e.stopImmediatePropagation()}catch(r){}Xo=0,Ko=0,en=n+260,Tt=!0,$t=null,Io(!xt)}},{capture:!0,passive:!1}),document.addEventListener("touchend",t=>{if(Date.now(){if(!$t){if(!St)return;$t=St}_t();const t=oo($t)[parseInt(e.target.value,10)];t&&St!==t&&lo(t,!0)}),tn(qe),tn(Ue),tn(Ge),tn(je);const on=Ue.querySelector(".scrollable-container");on&&function(e){if(!e)return;const t=()=>{const{scrollTop:t,scrollHeight:o,clientHeight:n}=e,r=t<=0,i=t+n>=o-1;r&&i?(e.style.webkitMaskImage="none",e.style.maskImage="none"):r?(e.style.webkitMaskImage="linear-gradient(to bottom, black 0%, black 90%, transparent 100%)",e.style.maskImage=e.style.webkitMaskImage):i?(e.style.webkitMaskImage="linear-gradient(to bottom, transparent 0%, black 10%, black 100%)",e.style.maskImage=e.style.webkitMaskImage):(e.style.webkitMaskImage="linear-gradient(to bottom, transparent 0%, black 10%, black 90%, transparent 100%)",e.style.maskImage=e.style.webkitMaskImage)};e.addEventListener("scroll",t),requestAnimationFrame(t)}(on),Uo(),S(e,"Initialization complete.")}(),yo()}function wt(t,o="info",n=3e3,r=null){if(!Ze)return void console.warn(e,"Toast container not ready for message:",t);const i=document.createElement("div");i.className=`mes-toast ${o}`;const a=document.createElement("span");a.className="mes-toast-message",a.textContent=t,i.appendChild(a);let s=!1;const l=()=>{s||(s=!0,i.classList.remove("show"),i.addEventListener("transitionend",()=>{try{i.remove()}catch(e){}},{once:!0}),setTimeout(()=>{try{i.remove()}catch(e){}},500))};if(r?.label&&"function"==typeof r.onClick){const e=document.createElement("button");e.type="button",e.className="mes-toast-action",e.textContent=r.label,e.addEventListener("click",async t=>{t.preventDefault(),t.stopPropagation(),e.disabled=!0;try{await r.onClick()}finally{l()}}),i.appendChild(e)}Ze.appendChild(i),i.offsetWidth,requestAnimationFrame(()=>{i.classList.add("show")}),setTimeout(l,n)}let xt=!1,St=null,$t=null,Ct=!1;const Lt=new Set,Et=new Set;let Rt=0,At=0,Tt=!1;const Mt=15;let Pt=[],Nt=[],Dt=!1;async function zt(){let t=null;try{t=await T(w,null);let o=A(t).filter(e=>"string"==typeof e);if(L()){const t=A(E(w)).filter(e=>"string"==typeof e);if(t.length){const n=Array.from(new Set([...o,...t]));await M(w,JSON.stringify(n)),R(w),n.length>o.length&&S(e,`Migrated ${n.length-o.length} fallback rules to GM storage.`),o=n}}return Pt=o,S(e,`Loaded ${Pt.length} rules from storage.`),Pt}catch(o){console.error(e,`Error parsing blocked selectors from key '${w}', resetting. Stored value:`,t,o);try{await M(w,"[]")}catch(n){console.error(e,"Failed to reset storage after parse error",n)}return Pt=[],[]}}async function Bt(t){const o=Array.isArray(t)?t:[];try{await M(w,JSON.stringify(o)),Pt=[...o];const t=Nt.filter(e=>o.includes(e));t.length!==Nt.length&&await Ot(t),S(e,`Saved ${o.length} rules.`)}catch(n){console.error(e,"Error saving blocked selectors to GM:",n),wt(g.settingsSaveError,"error")}}async function It(){let t=null;try{t=await T(x,null);let e=A(t).filter(e=>"string"==typeof e);if(L()){const t=A(E(x)).filter(e=>"string"==typeof e);if(t.length){const o=new Set(Pt),n=Array.from(new Set([...e,...t])).filter(e=>!o.size||o.has(e));await M(x,JSON.stringify(n)),R(x),e=n}}return Nt=e,Dt=!0,Nt}catch(o){console.error(e,`Error parsing disabled selectors from key '${x}', resetting. Stored value:`,t,o);try{await M(x,"[]")}catch(n){console.error(e,"Failed to reset disabled storage after parse error",n)}return Nt=[],Dt=!0,[]}}async function Ot(t){const o=Array.from(new Set((Array.isArray(t)?t:[]).filter(e=>"string"==typeof e&&Pt.includes(e))));try{await M(x,JSON.stringify(o)),Nt=o,Dt=!0}catch(n){console.error(e,"Error saving disabled selectors to GM:",n),wt(g.settingsSaveError,"error")}}function Ft(){const e=new Set(Nt);return Pt.filter(t=>!e.has(t))}const qt=new Map,Ut=new Map,Ht=new Set,Gt=new Set,jt=[];let Zt=!1,Vt=!1,_t=null,Wt=null,Jt=null;function Qt(e){e&&!qt.has(e)&&qt.set(e,{display:e.style.display||"",visibility:e.style.visibility||"",opacity:e.style.opacity||"",pointerEvents:e.style.pointerEvents||""})}function Yt(e,t=v.hideStrategy){if(!e)return;const o="stylesheet"===t?"display":t;"visibility"===o?(e.style.removeProperty("display"),e.style.setProperty("visibility","hidden","important"),e.style.setProperty("pointer-events","none","important")):"opacity"===o?(e.style.removeProperty("display"),e.style.setProperty("opacity","0","important"),e.style.setProperty("pointer-events","none","important")):e.style.setProperty("display","none","important")}function Xt(e,t=v.hideStrategy){e&&(Qt(e),Yt(e,t),Ht.add(e))}function Kt(e,t={}){e&&["display","visibility","opacity","pointerEvents"].forEach(o=>{const n="pointerEvents"===o?"pointer-events":o,r=t[o];r?e.style.setProperty(n,r,""):e.style.removeProperty(n)})}function eo(e){e&&(Kt(e,qt.get(e)||{}),e.removeAttribute("data-mes-hidden"),e.removeAttribute("data-mes-hide-strategy"),Ht.delete(e),qt.delete(e))}function to(){Array.from(Ht).forEach(e=>{e?.isConnected||Ht.delete(e)}),Array.from(qt.keys()).forEach(e=>{e?.isConnected||qt.delete(e)})}function oo(e){try{return Array.from(e?.cssRules||[]).map(e=>e.cssText).join("\n")}catch(t){return""}}function no(e){return e?.isConnected?oo(e.sheet)||e.textContent.trim():""}function ro(e){if(!e?.isConnected)return!0;try{const t=window.getComputedStyle(e);return"visibility"===v.hideStrategy?"hidden"===t.visibility:"opacity"===v.hideStrategy?parseFloat(t.opacity||"1")<=.01:"none"===t.display}catch(t){return!0}}function io(e=90){_t||v.tempBlockingDisabled||(_t=setTimeout(()=>{_t=null,function(){if(v.tempBlockingDisabled||Zt)return!1;if(!(Pt.length||Ht.size||Gt.size||jt.length))return!1;if("stylesheet"===v.hideStrategy){if(jt.length&&!jt.every(({root:e,sheet:t,signature:o})=>{try{return Array.from(e?.adoptedStyleSheets||[]).includes(t)&&oo(t)===o}catch(n){return!1}}))return!0;if(Gt.size&&!Array.from(Gt).every(e=>e?.isConnected&&e.textContent.trim()&&no(e)===e.dataset.mesStyleSignature))return!0}return to(),Array.from(Ht).some(e=>!ro(e))}()&&yo(!1)},e))}function ao(e){return 1===e?.nodeType&&"STYLE"===e.tagName&&e.id===G&&e.getAttribute(j)===Z}function so(e){return!(1!==e?.nodeType||!(e===Fe||e===Ve||e.id===l&&e.getAttribute?.(c)===d||e.classList?.contains("mobile-block-ui")||e.closest?.(".mobile-block-ui")||e.closest?.(`#${l}[${c}="${d}"]`)))}function lo(e){return!(!e||1!==e.nodeType||e===document.documentElement||e===document.body||so(e)||[qe,Ue,Ge,je,He].some(t=>t&&t!==e&&e.contains?.(t)))}function co(e){const t=function(e){return String(e||"").trim()}(e);return!t||function(e){if(!v.privacyMode)return!1;const t=String(e||"");return/\[(?:[^\]=~|^$*]+\|)?(?:token|secret|session|auth|cookie|password|passwd|credential|api[-_]?key)[^\]]*=/i.test(t)||/[A-Za-z0-9_-]{32,}/.test(t)||/[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}/i.test(t)}(t)?"":`:where(${t}):not(html):not(body):not(#${l}):not(#${l} *):not(.mobile-block-ui):not(.mobile-block-ui *)`}function po(e=document){try{return Array.from(e.querySelectorAll?.(`style#${G}[${j}="${Z}"]`)||[])}catch(t){return[]}}function uo(e){return!!e&&(!!ao(e)||(e.nodeType===Node.TEXT_NODE?ao(e.parentNode):1===e.nodeType&&!!e.querySelector?.(`style#${G}[${j}="${Z}"]`)))}function mo(){jt.forEach(({root:e,sheet:t})=>{try{e.adoptedStyleSheets=Array.from(e.adoptedStyleSheets||[]).filter(e=>e!==t)}catch(o){}}),jt.length=0,Gt.forEach(e=>{try{e.textContent="",e.remove()}catch(t){}}),Gt.clear(),po(document).forEach(e=>e.remove()),re(document).forEach(e=>po(e).forEach(e=>e.remove()))}function bo(e){return!(!e||1!==e.nodeType)&&(ao(e)||e.id===V||"mes-isolation-style"===e.id||"mes-selection-highlight-style"===e.id||"mes-shadow-highlight-style"===e.id||so(e))}function go(e,t){if(!e||!t)return!1;if("function"==typeof CSSStyleSheet)try{const o=Array.from(e.adoptedStyleSheets||[]),n=new CSSStyleSheet;return n.replaceSync(t),e.adoptedStyleSheets=[...o,n],jt.push({root:e,sheet:n,signature:oo(n)}),!0}catch(n){}const o=function(e=document){if(!e)return null;let t=po(e)[0]||null;return t||(t=document.createElement("style"),t.id=G,t.setAttribute(j,Z),(Q(e)?e:document.head||document.documentElement).appendChild(t)),Gt.add(t),t}(e);return!!o&&(o.textContent=t,o.dataset.mesStyleSignature=no(o)||t.trim(),!0)}function ho(){to(),Array.from(Ht).forEach(e=>eo(e))}async function yo(t=!1,o=null){if(v.tempBlockingDisabled)return S(e,"Blocking temporarily disabled. Skipping application."),fo(!1),0;if(Zt)return Vt=!0,0;Zt=!0;try{S(e,"Applying block rules..."),to(),0===Pt.length&&await zt(),Dt||await It();const n=location.hostname,r=Array.isArray(o)||Array.isArray(Jt),i=Array.isArray(o)?o:Array.isArray(Jt)?Jt:Ft();if("stylesheet"===v.hideStrategy){const o=function(e,t=location.hostname){mo(),ho();const o=function(e=v.hideStrategy){return"visibility"===e?"visibility: hidden !important; pointer-events: none !important;":"opacity"===e?"opacity: 0 !important; pointer-events: none !important;":"display: none !important;"}(v.hideStrategy),n=function(e,t=location.hostname){const o=[],n=new Map,r=[];return e.forEach(e=>{if(!ve(e,t))return;const i=fe(e);if(!i?.selector)return;const a=ae(i.selector);if(a)return void new Set(le(a)).forEach(e=>{const t=co(a.localSelector);try{if(!t)throw new Error("Fallback selector required");e.querySelector(t)}catch(o){return void r.push(i.selector)}n.has(e)||n.set(e,new Set),n.get(e).add(t)});const s=co(i.selector);try{if(!s)throw new Error("Fallback selector required");document.querySelector(s),o.push(s)}catch(l){r.push(i.selector)}}),{globalSelectors:Array.from(new Set(o)),shadowBuckets:n,fallbackSelectors:Array.from(new Set(r))}}(e,t),r=new Map(n.shadowBuckets);let i=0;return n.globalSelectors.length&&(go(document,`${n.globalSelectors.join(",\n")} { ${o} }`)&&(i+=n.globalSelectors.length),v.shadowDomSupport&&re(document).forEach(e=>{r.has(e)||r.set(e,new Set);const t=r.get(e);n.globalSelectors.forEach(e=>t.add(e))})),r.forEach((e,t)=>{const n=Array.from(e).filter(Boolean);n.length&&go(t,`${n.join(",\n")} { ${o} }`)&&(i+=n.length)}),n.fallbackSelectors.forEach(e=>{try{const t=ce(e);let o=!1;t.forEach(e=>{if(!lo(e))return;const t=Ht.has(e),n="none"===window.getComputedStyle(e).display;t||n||(Xt(e,"display"),o=!0)}),o&&i++}catch(t){}}),i}(i,n);return S(e,`Applied ${o} stylesheet rules.`),t&&o>0&&!v.tempBlockingDisabled&&wt(g.blockingApplied(o),"success",2e3),o}mo(),r&&ho();let a=0,s=0;const l=ie(document);return i.forEach(t=>{const o=fe(t);if(!o)return void console.warn(e,"Skipping invalid block rule format:",t);const r=o.selector;if(r){if(ve(t,n))try{const e=ce(r,document,l);e.forEach(e=>{const t=Ht.has(e)||e.hasAttribute("data-mes-hidden"),o="none"===window.getComputedStyle(e).display;t||o?t&&(ro(e)?Qt(e):(Xt(e),a++)):(Xt(e),a++)}),e.length>0&&s++}catch(i){}}else console.warn(e,"Skipping rule with empty selector:",t)}),S(e,a>0?`Applied ${s} rules, hid ${a} new elements.`:`Applied ${s} rules, no new elements needed hiding.`),t&&s>0&&!v.tempBlockingDisabled&&wt(g.blockingApplied(s),"success",2e3),s}finally{Zt=!1,Vt&&!v.tempBlockingDisabled&&(Vt=!1,setTimeout(()=>yo(!1),80))}}function fo(t=!0){S(e,"Disabling all blocking rules temporarily..."),mo(),to();let o=0;new Set([...Ht,...ce('[data-mes-hidden="true"]')]).forEach(e=>{eo(e),o++}),S(e,`Restored display for ${o} elements.`),t&&wt(g.tempBlockingOn,"warning",2500)}function vo(){He&&(v.showShieldIcon?He.innerHTML='':He.innerHTML='',He.classList.toggle("selecting",xt))}function ko(t,o=7,n=!0){if(!t||1!==t.nodeType||t.closest(".mobile-block-ui"))return"";const r=X(t),i=t.tagName.toLowerCase();if(t.id){const e=t.id,o=J(e);if(!/^\d+$/.test(e)&&e.length>2&&!O.test(e)&&!e.includes(":"))try{if(1===de(`#${o}`,r))return`#${o}`}catch(d){}}if(v.selectorHintMode){const e=ue(t,i,r,n);if(e)return e;const o=me(t,i,r);if(o&&(!n||1===de(o,r)))return o}const a=[];let s=t,l=0;for(;s&&s.tagName&&l0&&(o+="."+c.map(e=>J(e)).join("."),i=!0);const p=oe(s,r);if(!i||p&&!p.closest(".mobile-block-ui")){const e=(p?ne(p):[]).filter(e=>e.tagName===s.tagName&&!e.closest(".mobile-block-ui"));if(e.length>1){const t=e.indexOf(s)+1;t>0&&(o+=`:nth-of-type(${t})`,i=!0)}}if(a.unshift(o),n&&a.length>0&&l>0){const t=a.join(" > ");try{if(1===de(t,r))return S(e,`Unique selector found early: ${t}`),t}catch(d){}}s=oe(s,r),l++}let c=a.join(" > ");if(n&&c)try{const n=de(c,r);if(1!==n){console.warn(e,`Generated selector "${c}" matches ${n} elements. Trying parent recursively.`);const i=oe(t,r);if(i&&!i.closest(".mobile-block-ui")&&o>0){const t=ko(i,o-1,!1);if(t){const o=t+" > "+c;try{if(1===de(o,r))return S(e,`Using combined unique selector: ${o}`),o;console.warn(e,`Combined selector "${o}" still not unique.`)}catch(d){}}}return console.warn(e,`Could not guarantee uniqueness for: ${c}`),c}}catch(d){return console.error(e,`Error validating selector "${c}":`,d),""}return c&&"body"!==c&&"html"!==c?c:""}function wo(e,t=7,o=!0){const n=ko(e,t,o);return n?se(e,n):""}function xo(e){const t=wo(e,7,!1);return t?t.replace(/:nth-of-type\(\d+\)/g,"").replace(/\s+>\s+/g," > ").trim()||t:""}function So(e,t,o=null){const n="string"==typeof e?e.trim():"",r=o||(n&&t?Co(n,t):null),i=r?.matchCount??0,a=/#[A-Za-z0-9_-]+|\[(?:data-testid|data-test|data-cy|aria-label|role|alt|title|href|src)[\^\$\*~|]?=/i.test(n),s=/:has\(|\[(?:id|class|href|src|data-src|data-original|poster|action)[\^\$\*]=/i.test(n),l=/:nth-(?:of-type|child)\(/i.test(n),c=(n.match(/>/g)||[]).length,d=n.length>180||c>=5;return n&&0!==i&&"error"!==r?.quality?i>=8?{level:"broad",label:g.selectorRiskBroad,reason:g.selectorRiskReasonBroadImpact(i)}:i>1?{level:"caution",label:g.selectorRiskBroad,reason:g.selectorRiskReasonBroadMatch(i)}:s?{level:"caution",label:g.selectorRiskAdvanced,reason:g.selectorRiskReasonAdvanced}:l?{level:"caution",label:g.selectorRiskPositional,reason:g.selectorRiskReasonPositional}:d?{level:"caution",label:g.selectorRiskComplex,reason:g.selectorRiskReasonComplex}:a?{level:"safe",label:g.selectorRiskStable,reason:g.selectorRiskReasonStable}:{level:"safe",label:g.selectorRiskPrecise,reason:g.selectorRiskReasonPrecise}:{level:"error",label:g.selectorRiskError,reason:r?.text||g.cannotGenerateSelector}}function $o(e,t=!1){return!e||"safe"===e.level||!(!t||"broad"!==e.level)||confirm(g.confirmRiskSelector(e.label,e.reason))}function Co(e,t){const o=X(t),n=de(e,o);let r="error",i=g.selectorQualityError;return 1===n?(r="unique",i=g.selectorQualityUnique):n>1?(r="warning",i=g.selectorQualityMatch(n)):0===n&&(i=g.selectorQualityNoMatch),Q(o)&&(i+=" · Shadow DOM"),{matchCount:n,quality:r,text:i}}(async function(){await P(),p?await async function(){"loading"===document.readyState&&await new Promise(e=>document.addEventListener("DOMContentLoaded",e,{once:!0})),await yo(!1),function(){if(ht&&(ht.disconnect(),ht=null),ft&&(clearInterval(ft),ft=null),vt=new WeakSet,!v.observeDomChanges||v.tempBlockingDisabled)return;const e=e=>{if(!e||vt.has(e))return!1;try{const t=v.lowPowerMode?{childList:!0,subtree:!0}:{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style","class","id","hidden"],characterData:!0};return ht.observe(e,t),vt.add(e),!0}catch(t){}return!1},t=(t=document)=>{if(!v.shadowDomSupport)return!1;let o=!1;return re(t).forEach(t=>{e(t)&&(o=!0)}),o};ht=new MutationObserver(e=>{if(Zt)return void(Vt=!0);let o=!1;const n=v.lowPowerMode?e.some(e=>Array.from(e.removedNodes||[]).some(uo)):e.some(e=>!("attributes"!==e.type||!Ht.has(e.target))||!!uo(e.target)||Array.from(e.removedNodes||[]).some(uo)),r=!v.lowPowerMode&&e.some(e=>"attributes"===e.type&&["class","id","hidden"].includes(e.attributeName)&&1===e.target?.nodeType&&!bo(e.target)),i=e.some(e=>{const t=e.target;return!(!t||bo(t))&&Array.from(e.addedNodes||[]).some(e=>1===e.nodeType&&!bo(e))});n&&io(60),(i||r)&&(i&&(e.forEach(e=>{Array.from(e.addedNodes||[]).forEach(e=>{1!==e.nodeType||bo(e)||!e.shadowRoot&&!e.querySelector?.("*")||(o=!0)})}),o&&t(document)),clearTimeout(yt),yt=setTimeout(()=>{"function"==typeof requestIdleCallback?requestIdleCallback(()=>yo(!1),{timeout:v.lowPowerMode?1400:500}):yo(!1)},v.lowPowerMode?420:120))}),e(document.documentElement),t(document),ft=setInterval(()=>{t(document)?yo(!1):v.lowPowerMode||io(0)},v.lowPowerMode?1e4:2500)}(),S(e,"Frame worker initialized without UI.")}():(function(){const t=globalThis.GM_registerMenuCommand||globalThis.GM?.registerMenuCommand;if("function"==typeof t)try{t(g.menuRecoverButtonMode,async()=>{v.hideToggleButton=!1,v.twoFingerGesture=!1,await N(),Be(),vo(),Ie(),"function"==typeof updateLauncherModeButtons&&updateLauncherModeButtons(),wt(g.settingsSaved,"info",1500)})}catch(o){console.warn(e,"Menu command registration failed:",o)}}(),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",kt):kt())})().catch(t=>{console.error(e,"Unhandled error during script initialization:",t)})}();