1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="f653dc31-2075-5622-8881-5e448fd4a057")}catch(e){}}(); 3import{a as H}from"./chunk-T2W4342Q.js";import"./chunk-JRHQOV6G.js";import{a as V,b as q}from"./chunk-XBHOMARE.js";import{c as z}from"./chunk-CN4EGA4I.js";import{a as W}from"./chunk-5K5PYV5V.js";import"./chunk-KS3Q7H57.js";import"./chunk-MJXNRHWH.js";import"./chunk-BUOPWRDV.js";import{d as A,e as L}from"./chunk-UQU3EU23.js";import"./chunk-346ISJSG.js";import{b as G,d as P}from"./chunk-CNRKNNWP.js";import{d as R}from"./chunk-L6Z7ZO7O.js";import"./chunk-TLCCWCNW.js";import{a as j}from"./chunk-5SJALNJN.js";import{a as D,c as I,i as O}from"./chunk-XEY266ER.js";import"./chunk-SEDEP525.js";import"./chunk-SECBI6OV.js";import"./chunk-LXBG4CPT.js";import"./chunk-56KVT3OQ.js";import{G as w,I as N,b as F,d as p,g as T,h as x,o as B,r as E,u as U}from"./chunk-MF7VZYLI.js";import{b as S,e as M}from"./chunk-NFMDOWTR.js";import"./chunk-QE6DXY66.js";import"./chunk-HCSN2NMS.js";import"./chunk-FDIRDMLL.js";import"./chunk-XQLUXGKM.js";import"./chunk-3JHJJCIF.js";import"./chunk-J4X36CU5.js";import"./chunk-X3ZU2Z3D.js";import"./chunk-QZXCI4ZV.js";import"./chunk-VO633UWN.js";import"./chunk-WAPZ5LEW.js";import"./chunk-746D4QTP.js";import{Ac as d,Ib as h,Sc as a,Tc as g,Uc as C,Yc as y,Zc as k,_c as _,fc as f,gc as v,hc as b,ic as l,jc as e,kc as t,qa as c,qb as n}from"./chunk-BZJI6Z2X.js";import"./chunk-CS7K6LXP.js";function $(s,J){if(s&1&&(e(0,"mat-option",19),a(1),t()),s&2){let i=J.$implicit;l("value",i.value),n(),C(" ",i.label," ")}}var fe=(()=>{class s{fb=c(w);adminService=c(H);snackBar=c(z);spinner={utilities:!1,clearCache:!1};cacheTypes=[{value:"all_cache",label:"All Brand Cache",description:"Refreshes all brand cache data including subdomain lookups, keys, and API data caches (immediate)"},{value:"org_configs",label:"Organization Configs",description:"Refreshes organization configuration cache for all active brands (background job)"},{value:"search_configs",label:"Search Configs",description:"Refreshes search configuration cache for all active brands (background job)"},{value:"brand_api_data_caches",label:"Brand API Data Caches",description:"Refreshes serialized JSON, search config, and org config caches for all active brands (background job)"}];selectedCacheType="all_cache";utilitiesForm=this.fb.group({urns:["",p.compose([p.required])],recacheFacebook:[!1],recalculateMetrics:[!1],reindexUrns:[!1]});submitTask(){if(this.utilitiesForm.invalid)return;if(!this.utilitiesForm.get("recacheFacebook").value&&!this.utilitiesForm.get("recalculateMetrics").value&&!this.utilitiesForm.get("reindexUrns").value){this.snackBar.open("Please select an option from the checkbox","Ok");return}let i={urns:this.utilitiesForm.get("urns").value,recache_facebook:this.utilitiesForm.get("recacheFacebook").value,recalculate_metrics:this.utilitiesForm.get("recalculateMetrics").value,reindex_urns:this.utilitiesForm.get("reindexUrns").value};this.spinner.utilities=!0,this.adminService.processUtilitiesTask(i).subscribe({next:r=>{this.spinner.utilities=!1,r.invalid_urns&&this.snackBar.open(`Task processed for valid urns, the following urns were invalid: ${r.invalid_urns}`,"Ok")},error:r=>{this.spinner.utilities=!1}})}clearCache(){this.spinner.clearCache=!0,this.adminService.clearCache(this.selectedCacheType).subscribe({next:i=>{this.spinner.clearCache=!1,this.snackBar.open(i.message||"Cache refreshed successfully","Ok")},error:i=>{this.spinner.clearCache=!1;let r=i.error?.message||i.error?.error||"Unknown error";this.snackBar.open(`Failed to refresh cache: ${r}`,"Ok")}})}getCacheTypeDescription(){let i=this.cacheTypes.find(r=>r.value===this.selectedCacheType);return i?i.description:""}static \u0275fac=function(r){return new(r||s)};static \u0275cmp=h({type:s,selectors:[["app-utilities"]],decls:47,vars:5,consts:[[1,"min-vh-100"],[1,"dashboard-container-fluid"],[1,"row"],[1,"col-12"],[1,"dashboard-heading","mb-2"],[3,"ngSubmit","formGroup"],[1,"col-12","col-md-6","offset-md-3"],["appearance","outline"],["matInput","","rows","5","formControlName","urns"],[1,"col-12","col-md-6","offset-md-3","ps-4"],["color","primary","formControlName","recacheFacebook"],["color","primary","formControlName","recalculateMetrics"],["color","primary","formControlName","reindexUrns"],[1,"row","my-4","justify-content-center"],[1,"col-12","col-md-3"],["type","submit","mat-raised-button","","color","primary","appLoadingBtn","",1,"custom",3,"active"],[1,"row","mt-3"],[1,"mb-3"],[3,"valueChange","value"],[3,"value"],[1,"col-12","col-md-6","offset-md-3","mb-3"],[1,"sm"],[1,"col-12","col-md-3","offset-md-3"],["mat-raised-button","","type","button","color","primary","appLoadingBtn","",1,"custom",3,"click","active"]],template:function(r,o){r&1&&(e(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"h1",4),a(5,"Website Utilities"),t()()(),e(6,"section")(7,"form",5),d("ngSubmit",function(){return o.submitTask()}),e(8,"div",2)(9,"div",6)(10,"mat-form-field",7)(11,"mat-label"),a(12,"Urns"),t(),e(13,"textarea",8),a(14," "),t(),e(15,"mat-hint"),a(16,"Enter urns separated by new line"),t()()(),e(17,"div",9)(18,"mat-checkbox",10),a(19,"Recache facebook"),t()(),e(20,"div",6)(21,"mat-checkbox",11),a(22,"Recalculate metrics"),t()(),e(23,"div",6)(24,"mat-checkbox",12),a(25,"Reindex urns"),t()()(),e(26,"div",13)(27,"div",14)(28,"button",15),a(29," Submit "),t()()()()(),e(30,"div",16)(31,"div",3)(32,"h2",17),a(33,"Cache Management"),t()(),e(34,"div",6)(35,"mat-form-field",7)(36,"mat-label"),a(37,"Cache Type"),t(),e(38,"mat-select",18),_("valueChange",function(m){return k(o.selectedCacheType,m)||(o.selectedCacheType=m),m}),v(39,$,2,2,"mat-option",19,f),t()()(),e(41,"div",20)(42,"p",21),a(43),t()(),e(44,"div",22)(45,"button",23),d("click",function(){return o.clearCache()}),a(46," Refresh Cache "),t()()()()()),r&2&&(n(7),l("formGroup",o.utilitiesForm),n(21),l("active",o.spinner.utilities),n(10),y("value",o.selectedCacheType),n(),b(o.cacheTypes),n(4),g(o.getCacheTypeDescription()),n(2),l("active",o.spinner.clearCache))},dependencies:[N,B,F,T,x,E,U,j,O,D,I,L,A,q,V,P,G,R,M,S,W],encapsulation:2})}return s})();export{fe as UtilitiesComponent}; 4 5//# debugId=f653dc31-2075-5622-8881-5e448fd4a057
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.