1"use strict";(self.webpackChunkwww=self.webpackChunkwww||[]).push([[339],{63179:(yn,$,d)=>{d.r($),d.d($,{AdminEcomModule:()=>xn});var p=d(36895),I=d(74931),g=d(24006),k=d(80529),G=d(43826),w=d(64036),N=d(41825),S=d(95111),K=d(6882),e=d(94650),u=d(28015),H=d(65412),m=d(73546),q=d(44850),A=d(71948),U=d(10266),Z=d(241);let V=(()=>{class i{constructor(t){this.logger=t,this.save=new e.vpe,this.close=new e.vpe,this.editorOptions={theme:"vs-dark",language:"json"},this.code="",this.logger.debug("Received json: ",this.jsonData)}ngOnChanges(){this.code=JSON.stringify(this.jsonData,null,2)}onSave(){this.save.emit(JSON.parse(this.code))}onClose(){this.close.emit()}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(u.Kf))},i.\u0275cmp=e.Xpm({type:i,selectors:[["app-json-editor"]],inputs:{jsonData:"jsonData"},outputs:{save:"save",close:"close"},features:[e.TTD],decls:10,vars:2,consts:[[1,"modal"],[1,"modal-content"],[3,"ngModel","options","ngModelChange"],[1,"modal-footer"],[3,"click"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"mat-card"),e._uU(3," If changes done, make sure to save and then close "),e.qZA(),e.TgZ(4,"ngx-monaco-editor",2),e.NdJ("ngModelChange",function(r){return n.code=r}),e.qZA(),e.TgZ(5,"div",3)(6,"button",4),e.NdJ("click",function(){return n.onSave()}),e._uU(7,"Save"),e.qZA(),e.TgZ(8,"button",4),e.NdJ("click",function(){return n.onClose()}),e._uU(9,"Close"),e.qZA()()()()),2&t&&(e.xp6(4),e.Q6J("ngModel",n.code)("options",n.editorOptions))},dependencies:[g.JJ,g.On,m.a8,Z.PG],styles:[".modal[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;width:100%;height:100%;background-color:#00000080}.modal-content[_ngcontent-%COMP%]{background-color:#fff;padding:20px;border-radius:4px;width:80%;max-width:800px;display:flex;flex-direction:column}.modal-footer[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;margin-top:10px}ngx-monaco-editor[_ngcontent-%COMP%]{height:40vh}"]}),i})(),W=(()=>
1{class i{constructor(){this.code="",this.save=new e.vpe,this.close=new e.vpe,this.editorOptions={theme:"vs-dark",language:"python"}}onSave(){this.save.emit(this.code)}onClose(){this.close.emit()}}return i.\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.Xpm({type:i,selectors:[["app-python-editor"]],inputs:{code:"code"},outputs:{save:"save",close:"close"},decls:9,vars:2,consts:[[1,"modal"],[1,"modal-content"],[3,"ngModel","options","ngModelChange"],[1,"modal-footer"],[3,"click"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1),e._uU(2," Update function to test "),e.TgZ(3,"ngx-monaco-editor",2),e.NdJ("ngModelChange",function(r){return n.code=r}),e.qZA(),e.TgZ(4,"div",3)(5,"button",4),e.NdJ("click",function(){return n.onSave()}),e._uU(6,"Save"),e.qZA(),e.TgZ(7,"button",4),e.NdJ("click",function(){return n.onClose()}),e._uU(8,"Close"),e.qZA()()()()),2&t&&(e.xp6(3),e.Q6J("ngModel",n.code)("options",n.editorOptions))},dependencies:[g.JJ,g.On,Z.PG],styles:[".modal[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;width:100%;height:100%;background-color:#00000080}.modal-content[_ngcontent-%COMP%]{background-color:#fff;padding:20px;border-radius:4px;width:80%;max-width:800px;display:flex;flex-direction:column}.modal-footer[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;margin-top:10px}ngx-monaco-editor[_ngcontent-%COMP%]{height:40vh}"]}),i})();function B(i,s){1&i&&(e.TgZ(0,"div",2),e._UZ(1,"div",3)(2,"div",4),e.qZA())}function X(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"div"),e._uU(1," As docs input selected, "),e.TgZ(2,"button",19),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.openJsonEditor())}),e._uU(3," Edit JSON docs "),e.qZA(),e._uU(4," to test for python code. "),e._UZ(5,"hr"),e.qZA()}}const ee=function(){return["/ecom/admin/feed-files"]};function te(i,s){if(1&i&&(e.TgZ(0,"div")(1,"p"),e._uU(2,"Make sure l2's output is present in "),e.TgZ(3,"a",20),e._uU(4,"Feed Files"),e.qZA(),e._uU(5),e.qZA(),e.TgZ(6,"p"),e._uU(7,"Further on this can be checked in "),e.TgZ(8,"a",21),e._uU(9,"Client Files"),e.qZA()(),e._UZ(10,"hr"),e.qZA()),2&i){const t=e.oxw(2);e.xp6(3),e.Q6J("href",t.feed_files_location,e.LSH),e.xp6(2),e.hij(" i.e. ",t.l2_output_file," "),e.xp6(3),e.Q6J("routerLink",e.DdM(3,ee))}}function ne(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"app-json-editor",22),e.NdJ("save",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.saveJsonEditor(o))})("close",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.closJsonEditor(o))}),e._uU(1," This is my json editor "),e.qZA()}if(2&i){const t=e.oxw(2);e.Q6J("jsonData",t.docs)}}function oe(i,s){1&i&&(e.TgZ(0,"div"),e._uU(1," No Custom funtions added. Click on add to initiate one. "),e.qZA())}function ie(i,s){1&i&&(e.TgZ(0,"div"),e._uU(1," L3 custom functions editor. "),e.qZA())}function re(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"div")(1,"label",23),e._uU(2),e.qZA(),e.TgZ(3,"div",13)(4,"button",24),e.NdJ("click",function(){const r=e.CHM(t).index,a=e.oxw(2);return e.KtG(a.openPythonEditor(r))}),e._uU(5,"Edit/View Code"),e.qZA(),e.TgZ(6,"button",24),e.NdJ("click",function(){const r=e.CHM(t).index,a=e.oxw(2);return e.KtG(a.deletePythonEditor(r))}),e._uU(7,"Delete Code"),e.qZA(),e.TgZ(8,"button",24),e.NdJ("click",function(){const r=e.CHM(t).index,a=e.oxw(2);return e.KtG(a.testOne(r))}),e._uU(9,"Test Code"),e.qZA()(),e._UZ(10,"mat-divider"),e.qZA()}if(2&i){const t=s.index,n=e.oxw(2);e.xp6(2),e.hij(" Code secion ",t+1,""),e.xp6(2),e.MGl("matTooltip","Edit/View this ",n.getNumbertoOrdinal(t+1)," block"),e.xp6(2),e.MGl("matTooltip","Delete this ",n.getNumbertoOrdinal(t+1)," block"),e.xp6(2),e.MGl("matTooltip","Test this ",n.getNumbertoOrdinal(t+1)," block")}}function se(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"app-python-editor",25),e.NdJ("save",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.savePythonEditor(o))})("close",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.closePythonEditor(o))}),e.qZA()}if(2&i){const t=e.oxw(2);e.Q6J("code",t.selectedCode)}}function ae(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"button",26),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.addNewPythonEditor())}),e._uU(1," Add "),e.qZA()}}
1function ce(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"button",24),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.testAll())}),e._uU(1," Test All "),e.qZA()}if(2&i){const t=e.oxw(2);e.MGl("matTooltip","Test All ",t.feed_config.custom.length," code block(s) so far")}}function de(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"app-json-editor",22),e.NdJ("save",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.saveRawL3Editor(o))})("close",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.closeRawL3Editor(o))}),e._uU(1," Raw L3 editor. "),e.qZA()}if(2&i){const t=e.oxw(2);e.Q6J("jsonData",t.feed_config)}}function le(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"mat-card",5)(1,"mat-card-content")(2,"section")(3,"label"),e._uU(4,"Take Sample Docs from:"),e.qZA(),e.TgZ(5,"mat-radio-group",6),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.docsfrom=o)}),e.TgZ(6,"mat-radio-button",7),e._uU(7,"Docs"),e.qZA(),e.TgZ(8,"mat-radio-button",8),e._uU(9,"L2 Output"),e.qZA()()(),e._UZ(10,"mat-divider"),e.YNc(11,X,6,0,"div",9),e.YNc(12,te,11,4,"div",9),e.YNc(13,ne,2,1,"app-json-editor",10),e.YNc(14,oe,2,0,"div",9),e.YNc(15,ie,2,0,"div",9),e.YNc(16,re,11,4,"div",11),e.YNc(17,se,1,1,"app-python-editor",12),e.TgZ(18,"div",13),e.YNc(19,ae,2,0,"button",14),e.YNc(20,ce,2,1,"button",15),e.qZA(),e._UZ(21,"mat-divider"),e.TgZ(22,"div",13)(23,"button",16),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.openRawL3Editor())}),e._uU(24," Manual L3 Editor "),e.qZA()(),e._uU(25," * Other l3 options like rename, split etc can be easily editted from this. "),e.YNc(26,de,2,1,"app-json-editor",10),e._UZ(27,"mat-divider"),e.TgZ(28,"div",13)(29,"button",17),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.fetchL3Config())}),e._uU(30),e.qZA(),e.TgZ(31,"button",18),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.saveL3Config())}),e._uU(32),e.qZA()()()()}if(2&i){const t=e.oxw();e.xp6(5),e.Q6J("ngModel",t.docsfrom),e.xp6(6),e.Q6J("ngIf","docs"==t.docsfrom),e.xp6(1),e.Q6J("ngIf","l2"==t.docsfrom),e.xp6(1),e.Q6J("ngIf",t.jsonDocsEdit),e.xp6(1),e.Q6J("ngIf",!t.feed_config.custom.length),e.xp6(1),e.Q6J("ngIf",t.feed_config.custom.length>0),e.xp6(1),e.Q6J("ngForOf",t.feed_config.custom),e.xp6(1),e.Q6J("ngIf",null!==t.selectedCode),e.xp6(2),e.Q6J("ngIf",t.docs),e.xp6(1),e.Q6J("ngIf",t.docsfrom&&t.feed_config.custom.length>0),e.xp6(3),e.Q6J("disabled",t.isFetchingFromDB),e.xp6(3),e.Q6J("ngIf",t.rawL3Edit),e.xp6(3),e.Q6J("disabled",t.isFetchingFromDB),e.xp6(1),e.hij(" ",t.isFetchingFromDB?"Fetching...":"Re-Fetch L3 Config"," "),e.xp6(1),e.Q6J("disabled",t.isSavingtoDB||t.isFetchingFromDB),e.xp6(1),e.hij(" ",t.isSavingtoDB?"Saving...":"Save L3 Config"," ")}}var v=(()=>((v||(v={})).feed='[ "feed"]["l3"]',v))();let ge=(()=>{class i{constructor(t,n,o,r,a,c,l,h){var C;this.partialConfService=t,this.logger=n,this.updatePartialConf=o,this.searchDomain=r,this.ls=a,this.http=c,this.commonSvc=l,this.dialog=h,this.docPath="",this.isActive=!1,this.orgId="",this.Domain="",this.feed_config_endpoint="",this.suffixes=["th","st","nd","rd"],this.collectionSyncInitiated=!1,this.configLoaded=!1,this.selectedCode=null,this.selectedIndex=null,this.rawL3Edit=!1,this.jsonDocsEdit=!1,this.isSavingtoDB=!1,this.isFetchingFromDB=!1,this.pythonTemplate=null,this.docs=[{Product_id:1,title:'sample test 10"'},{Product_id:2,title:"Pull Down Fireplace TV Mount - For TVs from 65 inch"}],this.docsfrom="docs",this.feed_files_location="",this.l2_output_file="",this.orgId=this.commonSvc.getCurrentOrgId(),this.orgType=null===(C=this.ls.currentSelectedOrg)||void 0===C?void 0:C.type,this.logger.debug("org type",this.orgType),this.searchDomain.getDataObserver().subscribe(T=>{T&&(this.logger.debug("domain",T.search_domain),this.Domain=T.search_domain,this.feed_files_location=this.getFeedFilesURL(),this.l2_output_file=this.getL2FileName())})}ngOnInit(){this.fetchL3Config(),this.loadResourcePythonTemplate()}getL2FileName(){return`${this.orgId}_line_object.json`}getFeedFilesURL(){return`https://${encodeURIComponent("feed_files")}:${encodeURIComponent("Expertrec@2023")}@${this.Domain}/4ea7a509772658671857e9372c1880ba/files/${this.orgId}/`}fetchL3Config(){this.isFetchingFromDB=!0,this.logger.debug("Getting l3 config"),this.partialConfService.initiateService(v.feed).then(t=>{this.logger.debug("config received:",t),this.initiate_l3_config(t),this.configLoaded=!0,this.isFetchingFromDB=!1})}saveL3Config(){this.isSavingtoDB=!0,this.logger.debug("Saving l3 config"),this.updatePartialConf.updatePartialData(v.feed,this.feed_config).then(t=>{this.logger.debug("Save resp: ",t),this.isSavingtoDB=!1})}initiate_l3_config(t){t?t.custom||(t.custom=[]):t={custom:[]},this.feed_config=t}openPythonEditor(t){this.selectedCode=this.feed_config.custom[t],this.selectedIndex=t}savePythonEditor(t){null!==this.selectedIndex&&(this.feed_config.custom[this.selectedIndex]=t)}deletePythonEditor(t){this.feed_config.custom.splice(t,1)}closePythonEditor(t){this.selectedCode=null,this.selectedIndex=null}addNewPythonEditor(){this.feed_config.custom.push(this.pythonTemplate)}loadResourcePythonTemplate(){this.http.get("assets/resources/l3_sample.py",{responseType:"text"}).subscribe(n=>{this.logger.debug("received: ",n),this.pythonTemplate=n},n=>{this.logger.error(n),this.pythonTemplate=""})}openJsonEditor(){this.jsonDocsEdit=!0}openRawL3Editor(){this.rawL3Edit=!0}closJsonEditor(t){this.jsonDocsEdit=!1}closeRawL3Editor(t){this.rawL3Edit=!1}saveJsonEditor(t){this.docs=t}
1saveRawL3Editor(t){this.initiate_l3_config(t)}testAll(){let t={l3:{custom:this.feed_config.custom},docsfrom:this.docsfrom};"docs"==this.docsfrom&&(t.docs=this.docs),this.l3Test(t)}testOne(t){let n={l3:{custom:[this.feed_config.custom[t]]},docsfrom:this.docsfrom};"docs"==this.docsfrom&&(n.docs=this.docs),this.l3Test(n)}displayResult(t){this.dialog.open(K.Y,{data:{message:t,title:"Test Result",cancelBtnText:"Close",proceedBtnText:"Back"}}).afterClosed().subscribe(o=>{this.logger.debug("The dialog was closed:",o)})}l3Test(t){this.logger.debug("testing config: ",t),this.ls.postRequestWithoutAuth(`https://${this.Domain}/bd3c3d80fe71bc6ba03d2610b1f3c2df/l3/${this.orgId}`,t).then(o=>{this.logger.debug("l3 test resp:",o),this.displayResult(o)}).catch(o=>{this.logger.debug(o)})}getNumbertoOrdinal(t){const n=t%100;return t+(this.suffixes[(n-20)%10]||this.suffixes[n]||this.suffixes[0])}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(w.o),e.Y36(u.Kf),e.Y36(N.AX),e.Y36(N.p0),e.Y36(S.I),e.Y36(k.eN),e.Y36(w.P),e.Y36(H.uw))},i.\u0275cmp=e.Xpm({type:i,selectors:[["app-feed-editor"]],decls:2,vars:2,consts:[["class","spinner",4,"ngIf"],["class","l3",4,"ngIf"],[1,"spinner"],[1,"double-bounce1"],[1,"double-bounce2"],[1,"l3"],[3,"ngModel","ngModelChange"],["value","docs"],["value","l2"],[4,"ngIf"],[3,"jsonData","save","close",4,"ngIf"],[4,"ngFor","ngForOf"],[3,"code","save","close",4,"ngIf"],[1,"button-row"],["mat-raised-button","","matTooltip","Add one more code block",3,"click",4,"ngIf"],["mat-raised-button","",3,"matTooltip","click",4,"ngIf"],["mat-raised-button","","color","warn","matTooltip","View/Edit L3 Config manually.",3,"disabled","click"],["mat-raised-button","","color","warn","matTooltip","Refetching will lose code changes if any",3,"disabled","click"],["mat-raised-button","","color","primary","matTooltip","Save all codes to DB ",3,"disabled","click"],["mat-raised-button","",3,"click"],["target","_blank",3,"href"],[3,"routerLink"],[3,"jsonData","save","close"],[1,"button-label"],["mat-raised-button","",3,"matTooltip","click"],[3,"code","save","close"],["mat-raised-button","","matTooltip","Add one more code block",3,"click"]],template:function(t,n){1&t&&(e.YNc(0,B,3,0,"div",0),e.YNc(1,le,33,16,"mat-card",1)),2&t&&(e.Q6J("ngIf",!n.configLoaded),e.xp6(1),e.Q6J("ngIf",n.configLoaded))},dependencies:[p.sg,p.O5,I.rH,g.JJ,g.On,m.a8,m.dn,q.d,A.VQ,A.U0,U.gM,V,W],styles:[".l3[_ngcontent-%COMP%] .button-label[_ngcontent-%COMP%]{align-content:center;align-items:center;text-align:center;display:table-cell;font-size:14px;margin-left:8px;min-width:120px}.l3[_ngcontent-%COMP%] .button-row[_ngcontent-%COMP%]{align-content:center;align-items:center;text-align:center;display:table-cell;max-width:600px}.l3[_ngcontent-%COMP%] .button-row[_ngcontent-%COMP%] .mat-mdc-button-base[_ngcontent-%COMP%]{margin:8px 8px 8px 0}.btn-container-width[_ngcontent-%COMP%]{width:90px}.main-container[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{font-size:25px;padding:16px;color:#666;border-bottom:2px solid limegreen}.main-container[_ngcontent-%COMP%] .container[_ngcontent-%COMP%]{margin:20px}.main-container[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{max-height:300px}@media screen and (max-width: 576px){.main-container[_ngcontent-%COMP%]{padding:10px;margin:12px}.main-container[_ngcontent-%COMP%] .container[_ngcontent-%COMP%]{margin:20px 0;padding:20px 0}}"]}),i})();var pe=d(36505),D=d(97582),J=d(9258),M=d(97185);class _e{constructor(s,t){this._document=t;const n=this._textarea=this._document.createElement("textarea"),o=n.style;o.position="fixed",o.top=o.opacity="0",o.left="-999em",n.setAttribute("aria-hidden","true"),n.value=s,n.readOnly=!0,this._document.body.appendChild(n)}copy(){const s=this._textarea;let t=!1;try{if(s){const n=this._document.activeElement;s.select(),s.setSelectionRange(0,s.value.length),t=this._document.execCommand("copy"),n&&n.focus()}}catch{}return t}destroy(){const s=this._textarea;s&&(s.remove(),this._textarea=void 0)}}let fe=(()=>{class i{constructor(t){this._document=t}copy(t){const n=this.beginCopy(t),o=n.copy();return n.destroy(),o}beginCopy(t){return new _e(t,this._document)}}return i.\u0275fac=function(t){return new(t||i)(e.LFG(p.K0))},i.\u0275prov=e.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();var L=d(56709),O=d(59549),j=d(97392),E=d(284),z=d(51572);function ue(i,s){1&i&&(e.TgZ(0,"div",7),e._UZ(1,"mat-spinner",8),e.TgZ(2,"p"),e._uU(3,"Checking platform compatibility..."),e.qZA()())}function he(i,s){1&i&&(e.TgZ(0,"mat-card",9)(1,"mat-card-content")(2,"div",10)(3,"mat-icon",11),e._uU(4,"warning"),e.qZA(),e.TgZ(5,"div",12)(6,"h3"),e._uU(7,"Feature Not Supported"),e.qZA(),e.TgZ(8,"p"),e._uU(9,"This feature is currently only available for Shopify integrations. Please contact support if you need assistance."),e.qZA()()()()())}function me(i,s){1&i&&(e.TgZ(0,"div",13)(1,"h2"),e._uU(2,"Test One Product"),e.qZA(),e.TgZ(3,"p",14),e._uU(4,"Test and examine individual products in your Shopify store before indexing them to Solr."),e.qZA()())}function Ce(i,s){1&i&&(e.TgZ(0,"mat-hint",26),e._uU(1," Please enter a valid product ID (numbers only) "),e.qZA())}function be(i,s){1&i&&(e.TgZ(0,"mat-hint"),e._uU(1," Enter the numeric ID of the product you want to test "),e.qZA())}function xe(i,s){1&i&&(e.TgZ(0,"mat-icon"),e._uU(1,"search"),e.qZA())}function ye(i,s){1&i&&e._UZ(0,"mat-spinner",27)}function Me(i,s){1&i&&(e.TgZ(0,"mat-icon"),e._uU(1,"cloud_upload"),e.qZA())}function Oe(i,s){1&i&&e._UZ(0,"mat-spinner",27)}
1function Pe(i,s){if(1&i&&(e.TgZ(0,"div",37)(1,"div",38)(2,"pre"),e._uU(3),e.qZA()()()),2&i){const t=s.$implicit,n=e.oxw(5);e.xp6(3),e.Oqu(n.formatErrorAsJson(t))}}function ve(i,s){if(1&i&&(e.TgZ(0,"div"),e.YNc(1,Pe,4,1,"div",36),e.qZA()),2&i){const t=e.oxw(4);e.xp6(1),e.Q6J("ngForOf",t.result.solr_errors)}}const Te=function(i){return{status:i,message:"Non-success status"}};function we(i,s){if(1&i&&(e.TgZ(0,"div")(1,"div",37)(2,"div",38)(3,"pre"),e._uU(4),e.qZA()()()()),2&i){const t=e.oxw(4);e.xp6(4),e.Oqu(t.formatErrorAsJson(e.VKq(1,Te,t.result.status)))}}function Se(i,s){if(1&i&&(e.TgZ(0,"div",35)(1,"h3"),e._uU(2,"Solr Indexing Errors"),e.qZA(),e.YNc(3,ve,2,1,"div",5),e.YNc(4,we,5,3,"div",5),e.qZA()),2&i){const t=e.oxw(3);e.xp6(3),e.Q6J("ngIf",t.result.solr_errors&&t.isArray(t.result.solr_errors)&&t.result.solr_errors.length>0),e.xp6(1),e.Q6J("ngIf",!t.result.solr_errors||!t.isArray(t.result.solr_errors)||0===t.result.solr_errors.length)}}function Ze(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"div",39)(1,"button",40),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(o.enableEditMode())}),e.TgZ(2,"mat-icon"),e._uU(3,"edit"),e.qZA(),e._uU(4," Edit Product and Index "),e.qZA()()}}const Fe=function(i,s){return{success:i,warning:s}};function ke(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"mat-card",28)(1,"mat-card-header")(2,"mat-card-title")(3,"span",29)(4,"mat-icon"),e._uU(5),e.qZA(),e._uU(6),e.qZA()(),e.TgZ(7,"button",30),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.copyResultToClipboard())}),e.TgZ(8,"mat-icon"),e._uU(9,"content_copy"),e.qZA()(),e.TgZ(10,"button",31),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.clearResults())}),e.TgZ(11,"mat-icon"),e._uU(12,"clear"),e.qZA()()(),e.TgZ(13,"mat-card-content"),e.YNc(14,Se,5,2,"div",32),e.TgZ(15,"div",33)(16,"pre"),e._uU(17),e.ALo(18,"json"),e.qZA()(),e.YNc(19,Ze,5,0,"div",34),e.qZA()()}if(2&i){const t=e.oxw(2);e.xp6(3),e.Q6J("ngClass",e.WLB(8,Fe,!t.hasSolrErrors(),t.hasSolrErrors())),e.xp6(2),e.Oqu(t.hasSolrErrors()?"warning":"check_circle"),e.xp6(1),e.hij(" Product Data ",t.result.status?"[Status: "+t.result.status+"]":""," "),e.xp6(8),e.Q6J("ngIf",t.hasSolrErrors()),e.xp6(3),e.Oqu(e.lcZ(18,6,t.result)),e.xp6(2),e.Q6J("ngIf",t.result)}}function Ae(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"mat-card",41)(1,"mat-card-header")(2,"mat-card-title")(3,"span",42)(4,"mat-icon"),e._uU(5,"error"),e.qZA(),e._uU(6," Error "),e.qZA()(),e.TgZ(7,"button",43),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.clearResults())}),e.TgZ(8,"mat-icon"),e._uU(9,"clear"),e.qZA()()(),e.TgZ(10,"mat-card-content")(11,"div",44),e._uU(12),e.qZA()()()}if(2&i){const t=e.oxw(2);e.xp6(12),e.hij(" ",t.errorMessage," ")}}function Ue(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"div")(1,"mat-card",15)(2,"mat-card-content")(3,"mat-form-field",16)(4,"mat-label"),e._uU(5,"Product ID"),e.qZA(),e.TgZ(6,"input",17),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.productId=o)}),e.qZA(),e.YNc(7,Ce,2,0,"mat-hint",18),e.YNc(8,be,2,0,"mat-hint",5),e.qZA()()(),e.TgZ(9,"div",19)(10,"button",20),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.fetchOnly())}),e.TgZ(11,"div",21),e.YNc(12,xe,2,0,"mat-icon",5),e.YNc(13,ye,1,0,"mat-spinner",22),e.TgZ(14,"span"),e._uU(15),e.qZA()()(),e.TgZ(16,"button",23),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.fetchAndIndex())}),e.TgZ(17,"div",21),e.YNc(18,Me,2,0,"mat-icon",5),e.YNc(19,Oe,1,0,"mat-spinner",22),e.TgZ(20,"span"),e._uU(21),e.qZA()()()(),e.YNc(22,ke,20,11,"mat-card",24),e.YNc(23,Ae,13,1,"mat-card",25),e.qZA()}if(2&i){const t=e.oxw();e.xp6(6),e.ekj("error",!t.productIdRegex.test(t.productId)&&t.productId)("success",t.productIdRegex.test(t.productId)&&t.productId),e.Q6J("ngModel",t.productId),e.xp6(1),e.Q6J("ngIf",!t.productIdRegex.test(t.productId)&&t.productId),e.xp6(1),e.Q6J("ngIf",!t.productId),e.xp6(2),e.Q6J("disabled",!t.validateProductId()||t.showSpinner),e.xp6(2),e.Q6J("ngIf",!t.showSpinner),e.xp6(1),e.Q6J("ngIf",t.showSpinner),e.xp6(2),e.Oqu(t.showSpinner?"Processing...":"Fetch Only"),e.xp6(1),e.Q6J("disabled",!t.validateProductId()||t.showSpinner),e.xp6(2),e.Q6J("ngIf",!t.showSpinner),e.xp6(1),e.Q6J("ngIf",t.showSpinner),e.xp6(2),e.Oqu(t.showSpinner?"Processing...":"Fetch & Index"),e.xp6(1),e.Q6J("ngIf",t.result),e.xp6(1),e.Q6J("ngIf",t.errorMessage)}}
1function Je(i,s){if(1&i&&(e.TgZ(0,"div",55),e._uU(1),e.qZA()),2&i){const t=e.oxw(2);e.xp6(1),e.hij(" ",t.processedProductError," ")}}function Ee(i,s){1&i&&(e.TgZ(0,"mat-icon"),e._uU(1,"save"),e.qZA())}function $e(i,s){1&i&&e._UZ(0,"mat-spinner",27)}function Ie(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"div")(1,"mat-card",45)(2,"mat-card-header")(3,"mat-card-title"),e._uU(4,"Edit Processed Product"),e.qZA()(),e.TgZ(5,"mat-card-content")(6,"p",46)(7,"strong"),e._uU(8,"Product:"),e.qZA(),e._uU(9),e.qZA(),e.TgZ(10,"p",47),e._uU(11," Edit the JSON below to modify how the product will be processed before indexing to Solr. This allows you to test custom product processing logic. "),e.qZA(),e.TgZ(12,"div",48)(13,"ngx-monaco-editor",49),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.processedProductJson=o)})("ngModelChange",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.onProcessedProductChange())}),e.qZA(),e.YNc(14,Je,2,1,"div",50),e.qZA(),e.TgZ(15,"div",51)(16,"mat-checkbox",52),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.indexProcessedProduct=o)}),e._uU(17," Index the edited product to Solr "),e.qZA()()(),e.TgZ(18,"mat-card-actions")(19,"button",53),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.cancelEdit())}),e.TgZ(20,"mat-icon"),e._uU(21,"cancel"),e.qZA(),e._uU(22," Cancel "),e.qZA(),e.TgZ(23,"button",54),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.testProduct())}),e.TgZ(24,"div",21),e.YNc(25,Ee,2,0,"mat-icon",5),e.YNc(26,$e,1,0,"mat-spinner",22),e.TgZ(27,"span"),e._uU(28),e.qZA()()()()()()}if(2&i){const t=e.oxw();e.xp6(9),e.hij(" #",t.productId," "),e.xp6(4),e.Q6J("options",t.editorOptions)("ngModel",t.processedProductJson),e.xp6(1),e.Q6J("ngIf",!t.processedProductValid),e.xp6(2),e.Q6J("ngModel",t.indexProcessedProduct),e.xp6(7),e.Q6J("disabled",!t.processedProductValid||t.showSpinner),e.xp6(2),e.Q6J("ngIf",!t.showSpinner),e.xp6(1),e.Q6J("ngIf",t.showSpinner),e.xp6(2),e.Oqu(t.showSpinner?"Processing...":"Apply Changes & Re-Index")}}function Ne(i,s){1&i&&(e.TgZ(0,"div",56)(1,"div",57),e._UZ(2,"mat-progress-spinner",58),e.TgZ(3,"p",59),e._uU(4,"Processing product..."),e.qZA()()())}var F=(()=>((F||(F={})).indexChecker='["config"]["mdomain"]',F))(),x=(()=>{return(i=x||(x={})).VIEW="view",i.INDEX="index",x;var i})();let qe=(()=>{class i{constructor(t,n,o,r,a,c){this.logger=t,this.ls=n,this.toastr=o,this.partialConfService=r,this.clipboard=a,this.platformService=c,this.productId="",this.status="active",this.testMode=x.VIEW,this.showSpinner=!1,this.showPreview=!1,this.previewData=null,this.result=null,this.errorMessage=null,this.productIdRegex=/^\d+$/,this.isShopifyPlatform=null,this.platformLoading=!0,this.showEditMode=!1,this.processedProductJson="",this.processedProductValid=!0,this.processedProductError="",this.indexProcessedProduct=!0,this.editorOptions={theme:"vs-light",language:"json",automaticLayout:!0,minimap:{enabled:!1}},this.orgId=this.ls.orgSelectedECOM(),this.orgData=this.ls.getOrgDataById(this.orgId),this.logger.debug("Org ID for test-one-product component:",this.orgId)}ngOnInit(){return(0,D.mG)(this,void 0,void 0,function*(){this.logger.debug("TestOneProductComponent initialized");try{this.platformLoading=!0;const t=yield this.platformService.getPlatform();if(this.isShopifyPlatform="shopify"===t,this.platformLoading=!1,!this.isShopifyPlatform)return void this.toastr.warning("This feature is only supported for Shopify integrations","Platform Not Supported",{timeOut:8e3,closeButton:!0});this.initializeShopifyComponent()}catch(t){this.platformLoading=!1,this.logger.error("Error determining platform:",t),this.errorMessage="Could not determine platform type"}})}initializeShopifyComponent(){this.partialConfService.initiateService(F.indexChecker).then(t=>{t?(this.domain=t,this.logger.debug("Domain for API calls:",this.domain),this.apiUrl=this.getTestOneProductEndpoint(),this.logger.debug("API URL:",this.apiUrl)):this.errorMessage="Could not retrieve domain configuration"})}getTestOneProductEndpoint(){return`https://${this.domain}
1/bd3c3d80fe71bc6ba03d2610b1f3c2df/searchdata/api/shopify/${this.orgId}/products/test_one_product`}validateProductId(){return this.productIdRegex.test(this.productId)}validateProcessedProductJson(){if(!this.processedProductJson||""===this.processedProductJson.trim())return this.processedProductValid=!1,this.processedProductError="JSON cannot be empty",!1;try{return JSON.parse(this.processedProductJson),this.processedProductValid=!0,this.processedProductError="",!0}catch{return this.processedProductValid=!1,this.processedProductError="Invalid JSON format",!1}}validateForm(){return!(!this.validateProductId()||this.showEditMode&&!this.validateProcessedProductJson())}buildPayload(t=!1){const n={id:this.productId,status:this.status,index_to_solr:t};if(this.showEditMode&&this.processedProductJson)try{n.processed_product=JSON.parse(this.processedProductJson),n.index_to_solr=this.indexProcessedProduct}catch(o){throw this.logger.error("Error parsing processed product JSON:",o),new Error("Invalid JSON format")}return n}fetchOnly(){this.testMode=x.VIEW,this.testProduct(!1)}fetchAndIndex(){this.testMode=x.INDEX,this.testProduct(!0)}previewPayload(){if(this.validateForm())try{this.previewData=this.buildPayload(this.testMode===x.INDEX),this.showPreview=!0}catch(t){this.toastr.error(t.message||"Error generating preview")}}closePreview(){this.showPreview=!1}testProduct(t=!1){if(this.showPreview=!1,!this.validateForm())return;if(!this.apiUrl)return void this.toastr.error("API configuration not available. Please try again later.");let n;this.showSpinner=!0,this.result=null,this.errorMessage=null;try{n=this.buildPayload(t)}catch(o){return this.showSpinner=!1,void this.toastr.error(o.message||"Error preparing request")}this.logger.debug("Testing product with payload:",n),this.logger.debug("API URL for testing product:",this.apiUrl),this.ls.postRequestWithAuth(this.apiUrl,n).then(o=>{this.showSpinner=!1,this.result=o,o?.processed_product?(this.processedProductJson=JSON.stringify(o.processed_product,null,2),this.logger.debug("Processed product data extracted:",this.processedProductJson)):(this.processedProductJson="",this.logger.debug("No processed product data in response")),this.logger.debug("Test product response:",o),this.toastr.success("Product test completed successfully"),this.showEditMode=!1}).catch(o=>{this.showSpinner=!1,this.errorMessage=o.message||"An error occurred while testing the product",this.logger.error("Error testing product:",o),this.toastr.error(this.errorMessage)})}enableEditMode(){if(this.result){if(!this.processedProductJson||""===this.processedProductJson.trim()){if(!this.result)return void this.toastr.error("No product data available to edit");try{this.processedProductJson=JSON.stringify(this.result.product||this.result.data||this.result,null,2),this.logger.debug("Created processed product from result:",this.processedProductJson)}catch(t){return this.logger.error("Error creating processed product JSON:",t),void this.toastr.error("Could not prepare product data for editing")}}this.showEditMode=!0}else this.toastr.error("No product data available to edit")}cancelEdit(){this.showEditMode=!1}clearResults(){this.result=null,this.errorMessage=null,this.showPreview=!1,this.showEditMode=!1}onProcessedProductChange(){this.validateProcessedProductJson()}copyResultToClipboard(){if(this.result){const t=JSON.stringify(this.result,null,2);this.clipboard.copy(t),this.toastr.success("Results copied to clipboard")}}hasSolrErrors(){return this.result&&("success"!==this.result.status||this.result.solr_errors&&this.result.solr_errors.length>0)}formatErrorAsJson(t){try{if("string"==typeof t)try{const n=JSON.parse(t);return JSON.stringify(n,null,2)}catch{return t}if(t.message&&"string"==typeof t.message){const n=Object.assign({},t);return JSON.stringify(n,null,2)}return JSON.stringify(t,null,2)}catch{return String(t)}}isArray(t){return Array.isArray(t)}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(u.Kf),e.Y36(S.I),e.Y36(M._W),e.Y36(w.o),e.Y36(fe),e.Y36(J.m))},i.\u0275cmp=e.Xpm({type:i,selectors:[["app-test-one-product"]],decls:8,vars:6,consts:[[1,"inner-container-max-height"],[1,"main-container"],["class","platform-loading",4,"ngIf"],["class","section-card platform-notice",4,"ngIf"],["class","section-header",4,"ngIf"],[4,"ngIf"],["class","spinner-background",4,"ngIf"],[1,"platform-loading"],["diameter","40"],[1,"section-card","platform-notice"],[1,"notice-content"],[1,"warning-icon"],[1,"n
1otice-text"],[1,"section-header"],[1,"description"],[1,"section-card"],[1,"full-width"],["matInput","","placeholder","Enter Shopify product ID",3,"ngModel","ngModelChange"],["class","error-hint",4,"ngIf"],[1,"action-buttons-container"],["mat-raised-button","","color","primary",1,"action-button",3,"disabled","click"],[1,"button-content"],["diameter","20","class","spinner-button",4,"ngIf"],["mat-raised-button","","color","accent",1,"action-button",3,"disabled","click"],["class","section-card results-card",4,"ngIf"],["class","section-card error-card",4,"ngIf"],[1,"error-hint"],["diameter","20",1,"spinner-button"],[1,"section-card","results-card"],[1,"status-indicator",3,"ngClass"],["mat-icon-button","","matTooltip","Copy to clipboard",1,"copy-button",3,"click"],["mat-icon-button","","matTooltip","Clear results",1,"clear-button",3,"click"],["class","solr-errors",4,"ngIf"],[1,"result-content"],["class","edit-action",4,"ngIf"],[1,"solr-errors"],["class","solr-error-item",4,"ngFor","ngForOf"],[1,"solr-error-item"],[1,"error-json-block"],[1,"edit-action"],["mat-raised-button","","color","primary",1,"edit-button",3,"click"],[1,"section-card","error-card"],[1,"status-indicator","error"],["mat-icon-button","","matTooltip","Clear",1,"clear-button",3,"click"],[1,"error-content"],[1,"section-card","edit-card"],[1,"product-id-display"],[1,"editor-description"],[1,"json-editor"],[1,"monaco-editor",3,"options","ngModel","ngModelChange"],["class","error-message",4,"ngIf"],[1,"index-option"],["color","primary",3,"ngModel","ngModelChange"],["mat-button","",3,"click"],["mat-raised-button","","color","primary",3,"disabled","click"],[1,"error-message"],[1,"spinner-background"],[1,"spinner-container"],["mode","indeterminate","color","primary"],[1,"spinner-text"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1),e.YNc(2,ue,4,0,"div",2),e.YNc(3,he,10,0,"mat-card",3),e.YNc(4,me,5,0,"div",4),e.YNc(5,Ue,24,17,"div",5),e.YNc(6,Ie,29,9,"div",5),e.YNc(7,Ne,5,0,"div",6),e.qZA()()),2&t&&(e.xp6(2),e.Q6J("ngIf",n.platformLoading),e.xp6(1),e.Q6J("ngIf",!n.platformLoading&&!1===n.isShopifyPlatform),e.xp6(1),e.Q6J("ngIf",!n.platformLoading),e.xp6(1),e.Q6J("ngIf",!n.showEditMode&&n.isShopifyPlatform&&!n.platformLoading),e.xp6(1),e.Q6J("ngIf",n.showEditMode&&n.isShopifyPlatform&&!n.platformLoading),e.xp6(1),e.Q6J("ngIf",n.showSpinner))},dependencies:[p.mk,p.sg,p.O5,g.Fj,g.JJ,g.On,m.a8,m.hq,m.dn,m.dk,m.n5,L.oG,O.KE,O.hX,O.bx,j.Hw,E.Nt,z.Ou,U.gM,Z.PG,p.Ts],styles:[".inner-container-max-height[_ngcontent-%COMP%]{height:100%;overflow-y:auto;background-color:#f5f5f5}.main-container[_ngcontent-%COMP%]{padding:20px;margin:0 auto}.section-header[_ngcontent-%COMP%]{margin-bottom:30px;text-align:center}.section-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:28px;margin-bottom:10px;color:#333}.section-header[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{color:#666;font-size:16px;margin-bottom:0}.platform-loading[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:50px 0}.platform-loading[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-top:16px;color:#666;font-size:16px}.platform-notice[_ngcontent-%COMP%]{margin-bottom:30px;background-color:#fff8e1;border-left:5px solid #ffc107}.notice-content[_ngcontent-%COMP%]{display:flex;align-items:flex-start}.notice-content[_ngcontent-%COMP%] .warning-icon[_ngcontent-%COMP%]{color:#ff9800;font-size:30px;margin-right:16px;margin-top:3px}.notice-content[_ngcontent-%COMP%] .notice-text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0 0 8px;color:#e65100;font-size:18px}.notice-content[_ngcontent-%COMP%] .notice-text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;color:#555;font-size:15px;line-height:1.5}.section-card[_ngcontent-%COMP%]{margin:0 auto 24px;border-radius:8px;overflow:hidden;max-width:900px;box-shadow:0 2px 8px #0000001a}.section-card[_ngcontent-%COMP%] mat-card-header[_ngcontent-%COMP%]{background-color:#fafafa;padding:16px;border-bottom:1px solid #eee}.section-card[_ngcontent-%COMP%] mat-card-header[_ngcontent-%COMP%] mat-card-title[_ngcontent-%COMP%]{margin:0;font-size:18px;font-weight:500}.section-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%]{padding:20px}.section-card[_ngcontent-%COMP%] mat-card-actions[_ngcontent-%COMP%]{padding:8px 16px;border-top:1px solid #eee;display:flex;justify-content:flex-end;
1gap:12px}.full-width[_ngcontent-%COMP%]{width:100%}.action-buttons-container[_ngcontent-%COMP%]{display:flex;justify-content:center;gap:20px;margin-bottom:30px}.action-button[_ngcontent-%COMP%]{min-width:160px;padding:8px 16px;font-size:16px}.action-button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{margin-right:8px}.json-editor[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:4px;overflow:hidden;margin-bottom:16px}.editor-description[_ngcontent-%COMP%]{color:#666;margin-bottom:16px}.monaco-editor[_ngcontent-%COMP%]{height:300px;width:100%}.error-message[_ngcontent-%COMP%]{color:#f44336;padding:8px 10px;font-size:13px;background-color:#ffebee}.index-option[_ngcontent-%COMP%]{margin-top:16px}.spinner-button[_ngcontent-%COMP%]{margin-right:8px}.button-content[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.button-content[_ngcontent-%COMP%] mat-spinner[_ngcontent-%COMP%]{margin-right:8px}.button-content[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin-left:4px}.product-id-display[_ngcontent-%COMP%]{font-size:16px;margin-bottom:16px;color:#555}.product-id-display[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-weight:500}.edit-action[_ngcontent-%COMP%]{margin-top:24px;display:flex;justify-content:center}.edit-button[_ngcontent-%COMP%]{padding:8px 16px;font-size:15px;min-width:220px}.edit-button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{margin-right:8px}.edit-card[_ngcontent-%COMP%]{max-width:900px;margin:0 auto}.results-card[_ngcontent-%COMP%], .error-card[_ngcontent-%COMP%]{margin-top:24px;position:relative}.results-card[_ngcontent-%COMP%] .status-indicator[_ngcontent-%COMP%], .error-card[_ngcontent-%COMP%] .status-indicator[_ngcontent-%COMP%]{display:flex;align-items:center}.results-card[_ngcontent-%COMP%] .status-indicator[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%], .error-card[_ngcontent-%COMP%] .status-indicator[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{margin-right:8px}.results-card[_ngcontent-%COMP%] .status-indicator.success[_ngcontent-%COMP%], .error-card[_ngcontent-%COMP%] .status-indicator.success[_ngcontent-%COMP%]{color:#4caf50}.results-card[_ngcontent-%COMP%] .status-indicator.error[_ngcontent-%COMP%], .error-card[_ngcontent-%COMP%] .status-indicator.error[_ngcontent-%COMP%]{color:#f44336}.results-card[_ngcontent-%COMP%] .status-indicator.warning[_ngcontent-%COMP%], .error-card[_ngcontent-%COMP%] .status-indicator.warning[_ngcontent-%COMP%]{color:#ff9800}.results-card[_ngcontent-%COMP%] .result-content[_ngcontent-%COMP%], .results-card[_ngcontent-%COMP%] .error-content[_ngcontent-%COMP%], .error-card[_ngcontent-%COMP%] .result-content[_ngcontent-%COMP%], .error-card[_ngcontent-%COMP%] .error-content[_ngcontent-%COMP%]{background-color:#fafafa;padding:16px;border-radius:4px;font-family:Courier New,monospace;max-height:400px;overflow:auto}.results-card[_ngcontent-%COMP%] .result-content[_ngcontent-%COMP%] pre[_ngcontent-%COMP%], .results-card[_ngcontent-%COMP%] .error-content[_ngcontent-%COMP%] pre[_ngcontent-%COMP%], .error-card[_ngcontent-%COMP%] .result-content[_ngcontent-%COMP%] pre[_ngcontent-%COMP%], .error-card[_ngcontent-%COMP%] .error-content[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{margin:0;white-space:pre-wrap;word-break:break-word}.results-card[_ngcontent-%COMP%] .solr-errors[_ngcontent-%COMP%], .error-card[_ngcontent-%COMP%] .solr-errors[_ngcontent-%COMP%]{margin-bottom:20px;padding:16px;background-color:#fff3e0;border-radius:4px;border-left:4px solid #ff9800}.results-card[_ngcontent-%COMP%] .solr-errors[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .error-card[_ngcontent-%COMP%] .solr-errors[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin-top:0;color:#e65100;font-size:16px;font-weight:500}.results-card[_ngcontent-%COMP%] .solr-errors[_ngcontent-%COMP%] .solr-error-item[_ngcontent-%COMP%], .error-card[_ngcontent-%COMP%] .solr-errors[_ngcontent-%COMP%] .solr-error-item[_ngcontent-%COMP%]{margin-bottom:12px;padding-bottom:12px;border-bottom:1px solid rgba(0,0,0,.08)}.results-card[_ngcontent-%COMP%] .solr-errors[_ngcontent-%COMP%] .solr-error-item[_ngcontent-%COMP%]:last-child, .error-card[_ngcontent-%COMP%] .solr-errors[_ngcontent-%COMP%] .solr-error-item[_ngcontent-%COMP%]:last-child{margin-bottom:0;padding-bottom:0;border-bottom:none}.results-card[_ngcontent-%COMP%] .solr-errors[_ngcontent-%COMP%] .solr-error-item[_ngcontent-%COMP%] .error-json-block[_ngcontent-%COMP%], .error-card[_ngcontent-%COMP%] .solr-errors[_ngcontent-%COMP%] .solr-error-item[_ngcontent-%COMP%] .error-json-block[_ngcontent-%COMP%]{background-color:#ff980014;border-radius:4px;border-left:4px solid #ff9800;padding:12px;overflow-x:auto}.results-card[_ngcontent-%COMP%] .solr-errors[_ngcontent-%COMP%] .solr-error-item[_ngcontent-%COMP%] .error-json-block[_ngcontent-%COMP%] pre[_ngcontent-%COMP%], .error-card[_ngcontent-%COMP%] .solr-errors[_ngcontent-%COMP%] .solr-error-item[_ngcontent-%COMP%] .error-json-block[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{margin:0;font-family:Courier New,monospace;font-size:13px;white-space:pre-wrap;color:#d84315}.results-card[_ngcontent-%COMP%] .copy-button[_ngcontent-%COMP%], .error-card[_ngcontent-%COMP%] .copy-button[_ngcontent-%COMP%]{position:absolute;top:12px;right:48px}.results-card[_ngcontent-%COMP%] .clear-button[_ngcontent-%COMP%], .error-card[_ngcontent-%COMP%] .clear-button[_ngcontent-%COMP%]{position:absolute;top:12px;right:12px}.spinner-background[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#00000080;z-index:1000;display:flex;justify-content:center;align-items:center}.spinner-container[_ngcontent-%COMP%]{background-color:#fff;padding:24px;border-radius:8px;display:flex;flex-direction:column;align-items:center;box-shadow:0 4px 20px #00000026}.spinner-container[_ngcontent-%COMP%] .spinner-text[_ngcontent-%COMP%]{margin-top:16px;color:#333;font-weight:500}.error-hint[_ngcontent-%COMP%]{color:#f44336}@media (max-width: 768px){.section-card[_ngcontent-%COMP%]{margin-bottom:16px}.action-buttons-container[_ngcontent-%COMP%]{flex-direction:column;gap:12px}.action-buttons-container[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%], .edit-action[_ngcontent-%COMP%] .edit-button[_ngcontent-%COMP%]{width:100%}mat-card-actions[_ngcontent-%COMP%]{flex-direction:column-reverse}mat-card-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}}"]}),i})();var _=d(50457),De=d(69751);let Le=(()=>{class i{constructor(t,n,o){this.http=t,this.commonServices=n,this.loginStatus=o,this.baseUrl=this.commonServices.getBasePath()}getOrgAndService(){return{orgId:this.commonServices.getCurrentOrgId(),service:this.commonServices.getCurentOrgType()}}getSchema(){const{orgId:t,service:n}=this.getOrgAndService();return(0,_.D)(this.loginStatus.getRequestWithAuth(`${this.baseUrl}organisation/${t}/${n}/solr_schema/`))}getManagedSchema(){const{orgId:t,service:n}=this.getOrgAndService();return(0,_.D)(this.loginStatus.getRequestWithAuth(`${this.baseUrl}organisation/${t}/${n}/solr_schema/managed-schema`))}addField(t){const{orgId:n,service:o}=this.getOrgAndService();return(0,_.D)(this.loginStatus.postRequestWithAuth(`${this.baseUrl}organisation/${n}/${o}/solr_schema/fields`,{"add-field":t}))}updateField(t,n){const{orgId:o,service:r}=this.getOrgAndService(),a=`${this.baseUrl}organisation/${o}/${r}/solr_schema/fields/${t}`,c={"replace-field":Object.assign({name:t},n)};
1return(0,_.D)(this.loginStatus.putRequestWithAuth(a,c))}deleteField(t){const{orgId:n,service:o}=this.getOrgAndService();return(0,_.D)(this.loginStatus.deleteRequestWithAuth(`${this.baseUrl}organisation/${n}/${o}/solr_schema/fields/${t}`,{"delete-field":{name:t}}))}addFieldType(t){const{orgId:n,service:o}=this.getOrgAndService();return(0,_.D)(this.loginStatus.postRequestWithAuth(`${this.baseUrl}organisation/${n}/${o}/solr_schema/fieldtypes`,{"add-field-type":{name:t.name,class:t.class}}))}deleteFieldType(t){const{orgId:n,service:o}=this.getOrgAndService();return(0,_.D)(this.loginStatus.deleteRequestWithAuth(`${this.baseUrl}organisation/${n}/${o}/solr_schema/fieldtypes/${t}`))}deleteDynamicField(t){const{orgId:n,service:o}=this.getOrgAndService();return(0,_.D)(this.loginStatus.deleteRequestWithAuth(`${this.baseUrl}organisation/${n}/${o}/solr_schema/dynamicfields/${t}`,{"delete-dynamic-field":{name:t}}))}addCopyField(t,n){const{orgId:o,service:r}=this.getOrgAndService();return(0,_.D)(this.loginStatus.postRequestWithAuth(`${this.baseUrl}organisation/${o}/${r}/solr_schema/copyfields`,{"add-copy-field":{source:t,dest:n}}))}deleteCopyField(t,n){const{orgId:o,service:r}=this.getOrgAndService();return(0,_.D)(this.loginStatus.deleteRequestWithAuth(`${this.baseUrl}organisation/${o}/${r}/solr_schema/copyfields`,{"delete-copy-field":{source:t,dest:n}}))}reloadCore(){const{orgId:t,service:n}=this.getOrgAndService();return(0,_.D)(this.loginStatus.postRequestWithAuth(`${this.baseUrl}organisation/${t}/${n}/solr_schema/reload`,{}))}getSchemaInfo(){return new De.y(t=>{this.getSchema().subscribe({next:n=>{t.next({name:n.schema.name,version:n.schema.version,uniqueKey:n.schema.uniqueKey,totalFields:n.schema.fields.length,totalFieldTypes:n.schema.fieldTypes.length,totalCopyFields:n.schema.copyFields.length,totalDynamicFields:n.schema.dynamicFields.length}),t.complete()},error:n=>t.error(n)})})}getFieldTypeLibrary(t){let n=`${this.baseUrl}ftl/fieldtype-library`;const o=new URLSearchParams;return t&&o.append("name",t),o.toString()&&(n+=`?${o.toString()}`),(0,_.D)(this.loginStatus.getRequestWithAuth(n))}addFieldTypeFromLibrary(t){const{orgId:n,service:o}=this.getOrgAndService();return(0,_.D)(this.loginStatus.postRequestWithAuth(`${this.baseUrl}organisation/${n}/${o}/solr_schema/fieldtype-library/${t}/add`,{}))}saveFieldTypeToLibrary(t,n){const{service:o}=this.getOrgAndService();return(0,_.D)(this.loginStatus.postRequestWithAuth(`${this.baseUrl}ftl/fieldtype-library`,{name:t.name,class_name:t.class,definition:t,service:o,description:n||""}))}getFieldTypeLibraryStats(){return(0,_.D)(this.loginStatus.getRequestWithAuth(`${this.baseUrl}ftl/fieldtype-library/stats`))}getIndexFields(){const{orgId:t,service:n}=this.getOrgAndService();return(0,_.D)(this.loginStatus.getRequestWithAuth(`${this.baseUrl}organisation/${t}/${n}/solr_schema/index-fields`))}getFieldSamples(t){const{orgId:n,service:o}=this.getOrgAndService();return(0,_.D)(this.loginStatus.getRequestWithAuth(`${this.baseUrl}organisation/${n}/${o}/solr_schema/field-samples/${t}`))}getIndexFieldsWithSamples(){const{orgId:t,service:n}=this.getOrgAndService();return(0,_.D)(this.loginStatus.getRequestWithAuth(`${this.baseUrl}organisation/${t}/${n}/solr_schema/index-fields`))}getLukeInfo(){const{orgId:t,service:n}=this.getOrgAndService();return(0,_.D)(this.loginStatus.getRequestWithAuth(`${this.baseUrl}organisation/${t}/${n}/solr_schema/luke`))}getFieldStatistics(){const{orgId:t,service:n}=this.getOrgAndService();return(0,_.D)(this.loginStatus.getRequestWithAuth(`${this.baseUrl}organisation/${t}/${n}/solr_schema/field-stats`))}}return i.\u0275fac=function(t){return new(t||i)(e.LFG(k.eN),e.LFG(w.P),e.LFG(S.I))},i.\u0275prov=e.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();var je=d(4707),f=d(61135),Y=d(39646),y=d(39841),Q=d(18505),R=d(63900),ze=d(70262),Ye=d(34782),b=d(54004);function Re(i,s){if(1&i&&(e.TgZ(0,"span",20),e._uU(1,"indexed"),e.qZA()),2&i){const t=e.oxw().$implicit;e.ekj("true",t.indexed)("false",!t.indexed)}}function Ge(i,s){if(1&i&&(e.TgZ(0,"span",20),e._uU(1,"stored"),e.qZA()),2&i){const t=e.oxw().$implicit;e.ekj("true",t.stored)("false",!t.stored)}}
1function Ke(i,s){if(1&i&&(e.TgZ(0,"span",20),e._uU(1,"multiValued"),e.qZA()),2&i){const t=e.oxw().$implicit;e.ekj("true",t.multiValued)("false",!t.multiValued)}}function He(i,s){if(1&i&&(e.TgZ(0,"span",20),e._uU(1,"docValues"),e.qZA()),2&i){const t=e.oxw().$implicit;e.ekj("true",t.docValues)("false",!t.docValues)}}function Ve(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"tr")(1,"td")(2,"code",7),e._uU(3),e.qZA(),e.TgZ(4,"div",8)(5,"small",9),e._UZ(6,"i",10),e._uU(7),e.qZA()()(),e.TgZ(8,"td")(9,"span",11),e._uU(10),e.qZA()(),e.TgZ(11,"td")(12,"div",12),e.YNc(13,Re,2,4,"span",13),e.YNc(14,Ge,2,4,"span",13),e.YNc(15,Ke,2,4,"span",13),e.YNc(16,He,2,4,"span",13),e.qZA()(),e.TgZ(17,"td")(18,"button",14),e.NdJ("click",function(){const r=e.CHM(t).$implicit,a=e.oxw();return e.KtG(a.onViewDetails(r))}),e._UZ(19,"i",15),e.qZA(),e.TgZ(20,"button",16),e.NdJ("click",function(){const r=e.CHM(t).$implicit,a=e.oxw();return e.KtG(a.onCopyJson(r))}),e._UZ(21,"i",17),e.qZA(),e.TgZ(22,"button",18),e.NdJ("click",function(){const r=e.CHM(t).$implicit,a=e.oxw();return e.KtG(a.onDeleteField(r))}),e._UZ(23,"i",19),e.qZA()()()}if(2&i){const t=s.$implicit,n=e.oxw();e.xp6(3),e.Oqu(t.name),e.xp6(4),e.hij(" ",n.getPatternDescription(t.name)," "),e.xp6(3),e.Oqu(t.type),e.xp6(3),e.Q6J("ngIf",void 0!==t.indexed),e.xp6(1),e.Q6J("ngIf",void 0!==t.stored),e.xp6(1),e.Q6J("ngIf",void 0!==t.multiValued),e.xp6(1),e.Q6J("ngIf",void 0!==t.docValues)}}function We(i,s){1&i&&(e.TgZ(0,"div",21)(1,"p"),e._uU(2,"No dynamic fields found"),e.qZA()())}let Be=(()=>{class i{constructor(t,n){this.logger=t,this.toastr=n,this.searchTerm="",this.searchTermChange=new e.vpe,this.viewDetails=new e.vpe,this.copyJson=new e.vpe,this.deleteField=new e.vpe,this.errorToastConfig={closeButton:!0,disableTimeOut:!0,timeOut:0,tapToDismiss:!1,preventDuplicates:!0}}onSearchTermChange(t){this.searchTermChange.emit(t)}onViewDetails(t){this.viewDetails.emit(t)}onCopyJson(t){this.copyJson.emit(t)}onDeleteField(t){this.deleteField.emit(t)}getPatternDescription(t){return t.startsWith("*")?`Matches fields ending with "${t.substring(1)}"`:t.endsWith("*")?`Matches fields starting with "${t.substring(0,t.length-1)}"`:`Matches pattern "${t}"`}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(u.Kf),e.Y36(M._W))},i.\u0275cmp=e.Xpm({type:i,selectors:[["app-dynamic-fields"]],inputs:{dynamicFields$:"dynamicFields$",searchTerm:"searchTerm"},outputs:{searchTermChange:"searchTermChange",viewDetails:"viewDetails",copyJson:"copyJson",deleteField:"deleteField"},decls:20,vars:7,consts:[[1,"dynamic-fields-tab"],[1,"tab-header"],["type","text","placeholder","Search dynamic fields by name pattern or type",1,"search-input",3,"ngModel","ngModelChange"],[1,"table-container"],[1,"data-table"],[4,"ngFor","ngForOf"],["class","no-data",4,"ngIf"],[1,"field-name"],[1,"pattern-info"],[1,"text-muted"],[1,"fas","fa-info-circle"],[1,"field-type"],[1,"field-properties"],["class","property",3,"true","false",4,"ngIf"],["title","View Details",1,"btn","btn-outline-primary","btn-sm",3,"click"],[1,"fas","fa-eye"],["title","Copy JSON",1,"btn","btn-outline-info","btn-sm",3,"click"],[1,"fas","fa-copy"],["title","Delete Dynamic Field",1,"btn","btn-outline-danger","btn-sm",3,"click"],[1,"fas","fa-trash"],[1,"property"],[1,"no-data"]],template:function(t,n){if(1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"input",2),e.NdJ("ngModelChange",function(r){return n.onSearchTermChange(r)}),e.qZA()(),e.TgZ(3,"div",3)(4,"table",4)(5,"thead")(6,"tr")(7,"th"),e._uU(8,"Name Pattern"),e.qZA(),e.TgZ(9,"th"),e._uU(10,"Type"),e.qZA(),e.TgZ(11,"th"),e._uU(12,"Properties"),e.qZA(),e.TgZ(13,"th"),e._uU(14,"Actions"),e.qZA()()(),e.TgZ(15,"tbody"),e.YNc(16,Ve,24,7,"tr",5),e.ALo(17,"async"),e.qZA()(),e.YNc(18,We,3,0,"div",6),e.ALo(19,"async"),e.qZA()()),2&t){let o;e.xp6(2),e.Q6J("ngModel",n.searchTerm),e.xp6(14),e.Q6J("ngForOf",e.lcZ(17,3,n.dynamicFields$)),e.xp6(2),e.Q6J("ngIf",0===(null==(o=e.lcZ(19,5,n.dynamicFields$))?null:o.length))}},dependencies:[p.sg,p.O5,g.Fj,g.JJ,g.On,p.Ov],styles:[".dynamic-fields-tab[_ngcontent-%COMP%] .tab-header[_ngcontent-%COMP%]{margin-bottom:20px}.dynamic-fields-tab[_ngcontent-%COMP%] .tab-header[_ngcontent-%COMP%] .search-input[_ngcontent-%COMP%]{width:100%;max-width:400px;padding:8px 12px;border:1px solid #ddd;border-radius:4px;font-size:14px}.dynamic-fields-tab[_ngcontent-%COMP%] .tab-header[_ngcontent-%COMP%] .search-input[_ngcontent-%COMP%]:focus{outline:none;border-color:#007bff;box-shadow:0 0 0 2px #007bff40}.dynamic-fields-tab[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%]{background:white;border-radius:8px;box-shadow:0 2px 4px #0000001a;overflow:hidden}.dynamic-fields-tab[_ngcontent-%COMP%] .data-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse}.dynamic-fields-tab[_ngcontent-%COMP%] .data-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .dynamic-fields-tab[_ngcontent-%COMP%] .data-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:12px;text-align:left;border-bottom:1px solid #e9ecef}.dynamic-fields-tab[_ngcontent-%COMP%] .data-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background:#f8f9fa;font-weight:600;color:#495057;font-size:14px}.dynamic-fields-tab[_ngcontent-%COMP%] .data-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{vertical-align:top}
1.dynamic-fields-tab[_ngcontent-%COMP%] .field-name[_ngcontent-%COMP%]{font-family:Monaco,Menlo,Ubuntu Mono,monospace;background:#f8f9fa;padding:2px 6px;border-radius:4px;font-size:13px;color:#495057;border:1px solid #e9ecef}.dynamic-fields-tab[_ngcontent-%COMP%] .pattern-info[_ngcontent-%COMP%]{margin-top:4px}.dynamic-fields-tab[_ngcontent-%COMP%] .pattern-info[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:11px;color:#6c757d}.dynamic-fields-tab[_ngcontent-%COMP%] .pattern-info[_ngcontent-%COMP%] small[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{margin-right:4px;color:#007bff}.dynamic-fields-tab[_ngcontent-%COMP%] .field-type[_ngcontent-%COMP%]{font-weight:500;color:#495057}.dynamic-fields-tab[_ngcontent-%COMP%] .field-properties[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:4px}.dynamic-fields-tab[_ngcontent-%COMP%] .field-properties[_ngcontent-%COMP%] .property[_ngcontent-%COMP%]{padding:2px 6px;border-radius:3px;font-size:11px;font-weight:500;text-transform:uppercase}.dynamic-fields-tab[_ngcontent-%COMP%] .field-properties[_ngcontent-%COMP%] .property.true[_ngcontent-%COMP%]{background:#d4edda;color:#155724}.dynamic-fields-tab[_ngcontent-%COMP%] .field-properties[_ngcontent-%COMP%] .property.false[_ngcontent-%COMP%]{background:#f8d7da;color:#721c24}.dynamic-fields-tab[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{padding:4px 8px;border:1px solid;border-radius:4px;font-size:12px;cursor:pointer;transition:all .2s ease;margin-right:4px}.dynamic-fields-tab[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]:hover{transform:translateY(-1px)}.dynamic-fields-tab[_ngcontent-%COMP%] .btn.btn-outline-primary[_ngcontent-%COMP%]{color:#007bff;border-color:#007bff;background:transparent}.dynamic-fields-tab[_ngcontent-%COMP%] .btn.btn-outline-primary[_ngcontent-%COMP%]:hover{background:#007bff;color:#fff}.dynamic-fields-tab[_ngcontent-%COMP%] .btn.btn-outline-info[_ngcontent-%COMP%]{color:#17a2b8;border-color:#17a2b8;background:transparent}.dynamic-fields-tab[_ngcontent-%COMP%] .btn.btn-outline-info[_ngcontent-%COMP%]:hover{background:#17a2b8;color:#fff}.dynamic-fields-tab[_ngcontent-%COMP%] .btn.btn-outline-danger[_ngcontent-%COMP%]{color:#dc3545;border-color:#dc3545;background:transparent}.dynamic-fields-tab[_ngcontent-%COMP%] .btn.btn-outline-danger[_ngcontent-%COMP%]:hover{background:#dc3545;color:#fff}.dynamic-fields-tab[_ngcontent-%COMP%] .no-data[_ngcontent-%COMP%]{padding:40px;text-align:center;color:#6c757d}.dynamic-fields-tab[_ngcontent-%COMP%] .no-data[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:16px}"],changeDetection:0}),i})();function Xe(i,s){1&i&&(e.TgZ(0,"span"),e._uU(1,"..."),e.qZA())}function et(i,s){if(1&i&&(e.TgZ(0,"div",28)(1,"small",29),e._uU(2),e.YNc(3,Xe,2,0,"span",30),e.qZA()()),2&i){const t=e.oxw().$implicit,n=e.oxw();e.xp6(2),e.hij(" Used by: ",n.getFieldTypeUsageDetails(t).fieldNames.slice(0,3).join(", ")," "),e.xp6(1),e.Q6J("ngIf",n.getFieldTypeUsageDetails(t).fieldNames.length>3)}}function tt(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"tr")(1,"td")(2,"code",13),e._uU(3),e.qZA()(),e.TgZ(4,"td")(5,"span",14),e._uU(6),e.qZA()(),e.TgZ(7,"td")(8,"div",15)(9,"span",16),e._uU(10),e.qZA(),e.YNc(11,et,4,2,"div",17),e.qZA()(),e.TgZ(12,"td")(13,"div",18),e._UZ(14,"i"),e.TgZ(15,"span"),e._uU(16),e.qZA()()(),e.TgZ(17,"td")(18,"button",19),e.NdJ("click",function(){const r=e.CHM(t).$implicit,a=e.oxw();return e.KtG(a.onViewDetails(r))}),e._UZ(19,"i",20),e.qZA(),e.TgZ(20,"button",21),e.NdJ("click",function(){const r=e.CHM(t).$implicit,a=e.oxw();return e.KtG(a.onCopyJson(r))}),e._UZ(21,"i",22),e.qZA(),e.TgZ(22,"button",23),e.NdJ("click",function(){const r=e.CHM(t).$implicit,a=e.oxw();return e.KtG(a.onSaveToLibrary(r))}),e._UZ(23,"i",24),e.qZA(),e.TgZ(24,"button",25),e.NdJ("click",function(){const r=e.CHM(t).$implicit,a=e.oxw();return e.KtG(a.onSaveAs(r))}),e._UZ(25,"i",24),e.qZA(),e.TgZ(26,"button",26),e.NdJ("click",function(){const r=e.CHM(t).$implicit,a=e.oxw();return e.KtG(a.onDeleteFieldType(r))}),e._UZ(27,"i",27),e.qZA()()()}if(2&i){const t=s.$implicit,n=e.oxw();e.xp6(3),e.Oqu(t.name),e.xp6(3),e.Oqu(t.class),e.xp6(3),e.ekj("unused",0===n.getFieldTypeUsage(t)),e.xp6(1),e.hij(" ",n.getFieldTypeUsage(t)," fields "),e.xp6(1),e.Q6J("ngIf",n.getFieldTypeUsage(t)>0),e.xp6(2),e.Tol(n.getLibraryStatusClass(t)),e.xp6(1),e.Tol(n.getLibraryStatusIcon(t)),e.xp6(2),e.Oqu(n.getLibraryStatusText(t)),e.xp6(10),e.Q6J("disabled",n.getFieldTypeUsage(t)>0)}}function nt(i,s){1&i&&(e.TgZ(0,"div",31)(1,"p"),e._uU(2,"No field types found"),e.qZA()())}let ot=(()=>{class i{constructor(t,n){this.logger=t,this.toastr=n,this.searchTerm="",this.showOnlyUnused=!1,this.showOnlyUsed=!1,this.searchTermChange=new e.vpe,this.showOnlyUnusedChange=new e.vpe,this.showOnlyUsedChange=new e.vpe,this.viewDetails=new e.vpe,this.copyJson=new e.vpe,this.saveToLibrary=new e.vpe,this.deleteFieldType=new e.vpe,this.checkLibrary=new e.vpe,this.saveAs=new e.vpe}onSearchTermChange(t){this.searchTermChange.emit(t)}onShowOnlyUnusedChange(t){this.showOnlyUnusedChange.emit(t)}onShowOnlyUsedChange(t){this.showOnlyUsedChange.emit(t)}onViewDetails(t){this.viewDetails.emit(t)}onCopyJson(t){this.copyJson.emit(t)}onSaveToLibrary(t){this.saveToLibrary.emit(t)}onDeleteFieldType(t){this.deleteFieldType.emit(t)}onCheckLibrary(){this.checkLibrary.emit()}onSaveAs(t){this.saveAs.emit(t)}getFieldTypeUsage(t){return t.usageCount||0}getFieldTypeUsageDetails(t){return t.usageDetails||{count:0,fieldNames:[]}}getLibraryStatus(t){return t.libraryStatus||null}getLibraryStatusClass(t){switch(this.getLibraryStatus(t)){case"same":return"status-same";case"different":return"status-different";case"not_found":return"status-not-found";default:return"status-unknown"}}getLibraryStatusIcon(t){switch(this.getLibraryStatus(t)){case"same":return"fas fa-check-circle text-success";case"different":return"fas fa-exclamation-triangle text-warning";case"not_found":return"fas fa-times-circle text-danger";default:return"fas fa-question-circle text-muted"}}getLibraryStatusText(t){switch(this.getLibraryStatus(t)){case"same":return"Same as library";case"different":return"Different from library";case"not_found":return"Not in library";default:return"Not checked"}}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(u.Kf),e.Y36(M._W))},i.\u0275cmp=e.Xpm({type:i,selectors:[["app-field-types"]],inputs:{fieldTypes$:"fieldTypes$",searchTerm:"searchTerm",showOnlyUnused:"showOnlyUnused",showOnlyUsed:"showOnlyUsed"},outputs:{searchTermChange:"searchTermChange",showOnlyUnusedChange:"showOnlyUnusedChange",showOnlyUsedChange:"showOnlyUsedChange",viewDetails:"viewDetails",copyJson:"copyJson",saveToLibrary:"saveToLibrary",deleteFieldType:"deleteFieldType",checkLibrary:"checkLibrary",saveAs:"saveAs"},decls:33,vars:9,consts:[[1,"field-types-tab"],[1,"tab-header"],[1,"search-section"],["type","text","placeholder","Search f
1ield types by name or class",1,"search-input",3,"ngModel","ngModelChange"],[1,"filter-section"],[1,"filter-checkbox"],["type","checkbox",3,"checked","change"],["title","Check Library Status",1,"btn","btn-outline-secondary","btn-sm",3,"click"],[1,"fas","fa-sync-alt"],[1,"table-container"],[1,"data-table"],[4,"ngFor","ngForOf"],["class","no-data",4,"ngIf"],[1,"field-name"],[1,"field-class"],[1,"usage-info"],[1,"usage-count"],["class","usage-details",4,"ngIf"],[1,"library-status"],["title","View Details",1,"btn","btn-outline-primary","btn-sm",3,"click"],[1,"fas","fa-eye"],["title","Copy JSON",1,"btn","btn-outline-info","btn-sm",3,"click"],[1,"fas","fa-copy"],["title","Save to Library",1,"btn","btn-outline-success","btn-sm",3,"click"],[1,"fas","fa-save"],["title","Save As",1,"btn","btn-outline-warning","btn-sm",3,"click"],["title","Delete Field Type",1,"btn","btn-outline-danger","btn-sm",3,"disabled","click"],[1,"fas","fa-trash"],[1,"usage-details"],[1,"text-muted"],[4,"ngIf"],[1,"no-data"]],template:function(t,n){if(1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"input",3),e.NdJ("ngModelChange",function(r){return n.onSearchTermChange(r)}),e.qZA()(),e.TgZ(4,"div",4)(5,"label",5)(6,"input",6),e.NdJ("change",function(r){return n.onShowOnlyUnusedChange(r.target.checked)}),e.qZA(),e._uU(7," Show only unused "),e.qZA(),e.TgZ(8,"label",5)(9,"input",6),e.NdJ("change",function(r){return n.onShowOnlyUsedChange(r.target.checked)}),e.qZA(),e._uU(10," Show only used "),e.qZA(),e.TgZ(11,"button",7),e.NdJ("click",function(){return n.onCheckLibrary()}),e._UZ(12,"i",8),e._uU(13," Check Library "),e.qZA()()(),e.TgZ(14,"div",9)(15,"table",10)(16,"thead")(17,"tr")(18,"th"),e._uU(19,"Name"),e.qZA(),e.TgZ(20,"th"),e._uU(21,"Class"),e.qZA(),e.TgZ(22,"th"),e._uU(23,"Usage"),e.qZA(),e.TgZ(24,"th"),e._uU(25,"Library Status"),e.qZA(),e.TgZ(26,"th"),e._uU(27,"Actions"),e.qZA()()(),e.TgZ(28,"tbody"),e.YNc(29,tt,28,12,"tr",11),e.ALo(30,"async"),e.qZA()(),e.YNc(31,nt,3,0,"div",12),e.ALo(32,"async"),e.qZA()()),2&t){let o;e.xp6(3),e.Q6J("ngModel",n.searchTerm),e.xp6(3),e.Q6J("checked",n.showOnlyUnused),e.xp6(3),e.Q6J("checked",n.showOnlyUsed),e.xp6(20),e.Q6J("ngForOf",e.lcZ(30,5,n.fieldTypes$)),e.xp6(2),e.Q6J("ngIf",0===(null==(o=e.lcZ(32,7,n.fieldTypes$))?null:o.length))}},dependencies:[p.sg,p.O5,g.Fj,g.JJ,g.On,p.Ov],styles:[".field-types-tab[_ngcontent-%COMP%] .tab-header[_ngcontent-%COMP%]{margin-bottom:20px;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:16px}.field-types-tab[_ngcontent-%COMP%] .tab-header[_ngcontent-%COMP%] .search-section[_ngcontent-%COMP%]{flex:1;min-width:300px}.field-types-tab[_ngcontent-%COMP%] .tab-header[_ngcontent-%COMP%] .search-section[_ngcontent-%COMP%] .search-input[_ngcontent-%COMP%]{width:100%;padding:8px 12px;border:1px solid #ddd;border-radius:4px;font-size:14px}.field-types-tab[_ngcontent-%COMP%] .tab-header[_ngcontent-%COMP%] .search-section[_ngcontent-%COMP%] .search-input[_ngcontent-%COMP%]:focus{outline:none;border-color:#007bff;box-shadow:0 0 0 2px #007bff40}.field-types-tab[_ngcontent-%COMP%] .tab-header[_ngcontent-%COMP%] .filter-section[_ngcontent-%COMP%]{display:flex;align-items:center;gap:16px;flex-wrap:wrap}.field-types-tab[_ngcontent-%COMP%] .tab-header[_ngcontent-%COMP%] .filter-section[_ngcontent-%COMP%] .filter-checkbox[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;font-size:14px;color:#495057;cursor:pointer}.field-types-tab[_ngcontent-%COMP%] .tab-header[_ngcontent-%COMP%] .filter-section[_ngcontent-%COMP%] .filter-checkbox[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{margin:0}.field-types-tab[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%]{background:white;border-radius:8px;box-shadow:0 2px 4px #0000001a;overflow:hidden}.field-types-tab[_ngcontent-%COMP%] .data-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse}.field-types-tab[_ngcontent-%COMP%] .data-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .field-types-tab[_ngcontent-%COMP%] .data-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:12px;text-align:left;border-bottom:1px solid #e9ecef}.field-types-tab[_ngcontent-%COMP%] .data-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background:#f8f9fa;font-weight:600;color:#495057;font-size:14px}.field-types-tab[_ngcontent-%COMP%] .data-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{vertical-align:top}
1.field-types-tab[_ngcontent-%COMP%] .field-name[_ngcontent-%COMP%]{font-family:Monaco,Menlo,Ubuntu Mono,monospace;background:#f8f9fa;padding:2px 6px;border-radius:4px;font-size:13px;color:#495057;border:1px solid #e9ecef}.field-types-tab[_ngcontent-%COMP%] .field-class[_ngcontent-%COMP%]{font-family:Monaco,Menlo,Ubuntu Mono,monospace;color:#6c757d;font-size:13px}.field-types-tab[_ngcontent-%COMP%] .usage-info[_ngcontent-%COMP%] .usage-count[_ngcontent-%COMP%]{font-weight:500;color:#495057}.field-types-tab[_ngcontent-%COMP%] .usage-info[_ngcontent-%COMP%] .usage-count.unused[_ngcontent-%COMP%]{color:#6c757d;font-style:italic}.field-types-tab[_ngcontent-%COMP%] .usage-info[_ngcontent-%COMP%] .usage-details[_ngcontent-%COMP%]{margin-top:4px}.field-types-tab[_ngcontent-%COMP%] .usage-info[_ngcontent-%COMP%] .usage-details[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:11px;color:#6c757d}.field-types-tab[_ngcontent-%COMP%] .library-status[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;font-size:12px}.field-types-tab[_ngcontent-%COMP%] .library-status[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:14px}.field-types-tab[_ngcontent-%COMP%] .library-status.status-same[_ngcontent-%COMP%]{color:#28a745}.field-types-tab[_ngcontent-%COMP%] .library-status.status-different[_ngcontent-%COMP%]{color:#ffc107}.field-types-tab[_ngcontent-%COMP%] .library-status.status-not-found[_ngcontent-%COMP%]{color:#dc3545}.field-types-tab[_ngcontent-%COMP%] .library-status.status-unknown[_ngcontent-%COMP%]{color:#6c757d}.field-types-tab[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{padding:4px 8px;border:1px solid;border-radius:4px;font-size:12px;cursor:pointer;transition:all .2s ease;margin-right:4px}.field-types-tab[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]:hover:not(:disabled){transform:translateY(-1px)}.field-types-tab[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.field-types-tab[_ngcontent-%COMP%] .btn.btn-outline-primary[_ngcontent-%COMP%]{color:#007bff;border-color:#007bff;background:transparent}.field-types-tab[_ngcontent-%COMP%] .btn.btn-outline-primary[_ngcontent-%COMP%]:hover:not(:disabled){background:#007bff;color:#fff}.field-types-tab[_ngcontent-%COMP%] .btn.btn-outline-info[_ngcontent-%COMP%]{color:#17a2b8;border-color:#17a2b8;background:transparent}.field-types-tab[_ngcontent-%COMP%] .btn.btn-outline-info[_ngcontent-%COMP%]:hover:not(:disabled){background:#17a2b8;color:#fff}.field-types-tab[_ngcontent-%COMP%] .btn.btn-outline-success[_ngcontent-%COMP%]{color:#28a745;border-color:#28a745;background:transparent}.field-types-tab[_ngcontent-%COMP%] .btn.btn-outline-success[_ngcontent-%COMP%]:hover:not(:disabled){background:#28a745;color:#fff}.field-types-tab[_ngcontent-%COMP%] .btn.btn-outline-warning[_ngcontent-%COMP%]{color:#ffc107;border-color:#ffc107;background:transparent}.field-types-tab[_ngcontent-%COMP%] .btn.btn-outline-warning[_ngcontent-%COMP%]:hover:not(:disabled){background:#ffc107;color:#fff}.field-types-tab[_ngcontent-%COMP%] .btn.btn-outline-danger[_ngcontent-%COMP%]{color:#dc3545;border-color:#dc3545;background:transparent}.field-types-tab[_ngcontent-%COMP%] .btn.btn-outline-danger[_ngcontent-%COMP%]:hover:not(:disabled){background:#dc3545;color:#fff}.field-types-tab[_ngcontent-%COMP%] .btn.btn-outline-secondary[_ngcontent-%COMP%]{color:#6c757d;border-color:#6c757d;background:transparent}.field-types-tab[_ngcontent-%COMP%] .btn.btn-outline-secondary[_ngcontent-%COMP%]:hover:not(:disabled){background:#6c757d;color:#fff}.field-types-tab[_ngcontent-%COMP%] .no-data[_ngcontent-%COMP%]{padding:40px;text-align:center;color:#6c757d}.field-types-tab[_ngcontent-%COMP%] .no-data[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:16px}"],changeDetection:0}),i})();function it(i,s){if(1&i&&(e.TgZ(0,"span",19),e._uU(1),e.qZA()),2&i){const t=e.oxw().$implicit;e.xp6(1),e.Oqu(t.maxChars)}}function rt(i,s){1&i&&(e.TgZ(0,"span",20),e._uU(1,"No limit"),e.qZA())}function st(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"tr")(1,"td")(2,"code",7),e._uU(3),e.qZA(),e.TgZ(4,"div",8)(5,"small",9),e._UZ(6,"i",10),e._uU(7),e.qZA()()(),e.TgZ(8,"td")(9,"code",7),e._uU(10),e.qZA(),e.TgZ(11,"div",8)(12,"small",9),e._UZ(13,"i",10),e._uU(14),e.qZA()()(),e.TgZ(15,"td"),e.YNc(16,it,2,1,"span",11),e.YNc(17,rt,2,0,"span",12),e.qZA(),e.TgZ(18,"td")(19,"button",13),e.NdJ("click",function(){const r=e.CHM(t).$implicit,a=e.oxw();return e.KtG(a.onViewDetails(r))}),e._UZ(20,"i",14),e.qZA(),e.TgZ(21,"button",15),e.NdJ("click",function(){const r=e.CHM(t).$implicit,a=e.oxw();return e.KtG(a.onCopyJson(r))}),e._UZ(22,"i",16),e.qZA(),e.TgZ(23,"button",17),e.NdJ("click",function(){const r=e.CHM(t).$implicit,a=e.oxw();return e.KtG(a.onDeleteCopyField(r))}),e._UZ(24,"i",18),e.qZA()()()}if(2&i){const t=s.$implicit,n=e.oxw();e.xp6(3),e.Oqu(t.source),e.xp6(4),e.hij(" ",n.getSourceDescription(t.source)," "),e.xp6(3),e.Oqu(t.de
1st),e.xp6(4),e.hij(" ",n.getDestDescription(t.dest)," "),e.xp6(2),e.Q6J("ngIf",t.maxChars),e.xp6(1),e.Q6J("ngIf",!t.maxChars)}}function at(i,s){1&i&&(e.TgZ(0,"div",21)(1,"p"),e._uU(2,"No copy rules found"),e.qZA()())}let ct=(()=>{class i{constructor(t,n){this.logger=t,this.toastr=n,this.searchTerm="",this.searchTermChange=new e.vpe,this.viewDetails=new e.vpe,this.copyJson=new e.vpe,this.deleteCopyField=new e.vpe}onSearchTermChange(t){this.searchTermChange.emit(t)}onViewDetails(t){this.viewDetails.emit(t)}onCopyJson(t){this.copyJson.emit(t)}onDeleteCopyField(t){this.deleteCopyField.emit(t)}getSourceDescription(t){return t.includes("*")?`Dynamic field pattern: ${t}`:`Field: ${t}`}getDestDescription(t){return t.includes("*")?`Dynamic field pattern: ${t}`:`Field: ${t}`}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(u.Kf),e.Y36(M._W))},i.\u0275cmp=e.Xpm({type:i,selectors:[["app-copy-rules"]],inputs:{copyFields$:"copyFields$",searchTerm:"searchTerm"},outputs:{searchTermChange:"searchTermChange",viewDetails:"viewDetails",copyJson:"copyJson",deleteCopyField:"deleteCopyField"},decls:20,vars:7,consts:[[1,"copy-rules-tab"],[1,"tab-header"],["type","text","placeholder","Search copy rules by source or destination",1,"search-input",3,"ngModel","ngModelChange"],[1,"table-container"],[1,"data-table"],[4,"ngFor","ngForOf"],["class","no-data",4,"ngIf"],[1,"field-name"],[1,"field-info"],[1,"text-muted"],[1,"fas","fa-info-circle"],["class","max-chars",4,"ngIf"],["class","no-limit",4,"ngIf"],["title","View Details",1,"btn","btn-outline-primary","btn-sm",3,"click"],[1,"fas","fa-eye"],["title","Copy JSON",1,"btn","btn-outline-info","btn-sm",3,"click"],[1,"fas","fa-copy"],["title","Delete Copy Rule",1,"btn","btn-outline-danger","btn-sm",3,"click"],[1,"fas","fa-trash"],[1,"max-chars"],[1,"no-limit"],[1,"no-data"]],template:function(t,n){if(1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"input",2),e.NdJ("ngModelChange",function(r){return n.onSearchTermChange(r)}),e.qZA()(),e.TgZ(3,"div",3)(4,"table",4)(5,"thead")(6,"tr")(7,"th"),e._uU(8,"Source"),e.qZA(),e.TgZ(9,"th"),e._uU(10,"Destination"),e.qZA(),e.TgZ(11,"th"),e._uU(12,"Max Chars"),e.qZA(),e.TgZ(13,"th"),e._uU(14,"Actions"),e.qZA()()(),e.TgZ(15,"tbody"),e.YNc(16,st,25,6,"tr",5),e.ALo(17,"async"),e.qZA()(),e.YNc(18,at,3,0,"div",6),e.ALo(19,"async"),e.qZA()()),2&t){let o;e.xp6(2),e.Q6J("ngModel",n.searchTerm),e.xp6(14),e.Q6J("ngForOf",e.lcZ(17,3,n.copyFields$)),e.xp6(2),e.Q6J("ngIf",0===(null==(o=e.lcZ(19,5,n.copyFields$))?null:o.length))}},dependencies:[p.sg,p.O5,g.Fj,g.JJ,g.On,p.Ov],styles:[".copy-rules-tab[_ngcontent-%COMP%] .tab-header[_ngcontent-%COMP%]{margin-bottom:20px}.copy-rules-tab[_ngcontent-%COMP%] .tab-header[_ngcontent-%COMP%] .search-input[_ngcontent-%COMP%]{width:100%;max-width:400px;padding:8px 12px;border:1px solid #ddd;border-radius:4px;font-size:14px}.copy-rules-tab[_ngcontent-%COMP%] .tab-header[_ngcontent-%COMP%] .search-input[_ngcontent-%COMP%]:focus{outline:none;border-color:#007bff;box-shadow:0 0 0 2px #007bff40}.copy-rules-tab[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%]{background:white;border-radius:8px;box-shadow:0 2px 4px #0000001a;overflow:hidden}.copy-rules-tab[_ngcontent-%COMP%] .data-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse}.copy-rules-tab[_ngcontent-%COMP%] .data-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .copy-rules-tab[_ngcontent-%COMP%] .data-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:12px;text-align:left;border-bottom:1px solid #e9ecef}.copy-rules-tab[_ngcontent-%COMP%] .data-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background:#f8f9fa;font-weight:600;color:#495057;font-size:14px}.copy-rules-tab[_ngcontent-%COMP%] .data-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{vertical-align:top}.copy-rules-tab[_ngcontent-%COMP%] .field-name[_ngcontent-%COMP%]{font-family:Monaco,Menlo,Ubuntu Mono,monospace;background:#f8f9fa;padding:2px 6px;border-radius:4px;font-size:13px;color:#495057;border:1px solid #e9ecef}.copy-rules-tab[_ngcontent-%COMP%] .field-info[_ngcontent-%COMP%]{margin-top:4px}.copy-rules-tab[_ngcontent-%COMP%] .field-info[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:11px;color:#6c757d}.copy-rules-tab[_ngcontent-%COMP%] .field-info[_ngcontent-%COMP%] small[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{margin-right:4px;color:#007bff}.copy-rules-tab[_ngcontent-%COMP%] .max-chars[_ngcontent-%COMP%]{font-weight:500;color:#495057;background:#e9ecef;padding:2px 6px;border-radius:3px;font-size:12px}.copy-rules-tab[_ngcontent-%COMP%] .no-limit[_ngcontent-%COMP%]{color:#6c757d;font-style:italic;font-size:12px}.copy-rules-tab[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{padding:4px 8px;border:1px solid;border-radius:4px;font-size:12px;cursor:pointer;transition:all .2s ease;margin-right:4px}.copy-rules-tab[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]:hover{transform:translateY(-1px)}.copy-rules-tab[_ngcontent-%COMP%] .btn.btn-outline-primary[_ngcontent-%COMP%]{color:#007bff;border-color:#007bff;background:transparent}.copy-rules-tab[_ngcontent-%COMP%] .btn.btn-outline-primary[_ngcontent-%COMP%]:hover{background:#007bff;color:#fff}.copy-rules-tab[_ngcontent-%COMP%] .btn.btn-outline-info[_ngcontent-%COMP%]{color:#17a2b8;border-color:#17a2b8;background:transparent}.copy-rules-tab[_ngcontent-%COMP%] .btn.btn-outline-info[_ngcontent-%COMP%]:hover{background:#17a2b8;color:#fff}.copy-rules-tab[_ngcontent-%COMP%] .btn.btn-outline-danger[_ngcontent-%COMP%]{color:#dc3545;border-color:#dc3545;background:transparent}.copy-rules-tab[_ngcontent-%COMP%] .btn.btn-outline-danger[_ngcontent-%COMP%]:hover{background:#dc3545;color:#fff}.copy-rules-tab[_ngcontent-%COMP%] .no-data[_ngcontent-%COMP%]{padding:40px;text-align:center;color:#6c757d}.copy-rules-tab[_ngcontent-%COMP%] .no-data[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:16px}"],changeDetection:0}),i})();function dt(i,s){1&i&&(e.TgZ(0,"div",18)(1,"div",19)(2,"span",20),e._uU(3,"Loading..."),e.qZA()(),e.TgZ(4,"p"),e._uU(5,"Loading index fields..."),e.qZA()())}
1function lt(i,s){if(1&i&&(e.TgZ(0,"div"),e._uU(1),e.qZA()),2&i){const t=e.oxw().$implicit,n=e.oxw(2);e.xp6(1),e.hij(" ",n.formatSampleValues(t.sample_values)," ")}}function gt(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"button",44),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2).$implicit,r=e.oxw(2);return e.KtG(r.onFetchSamples(o))}),e._UZ(1,"i",45),e._uU(2," Fetch Samples "),e.qZA()}}function pt(i,s){1&i&&(e.TgZ(0,"span",46),e._UZ(1,"i",47),e._uU(2," Loading... "),e.qZA())}function _t(i,s){if(1&i&&(e.TgZ(0,"div")(1,"span",41),e._uU(2,"No samples loaded"),e.qZA(),e.YNc(3,gt,3,0,"button",42),e.YNc(4,pt,3,0,"span",43),e.qZA()),2&i){const t=e.oxw().$implicit,n=e.oxw(2);e.xp6(3),e.Q6J("ngIf",t.has_data&&!n.isSampleLoading(t.name)),e.xp6(1),e.Q6J("ngIf",n.isSampleLoading(t.name))}}function ft(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"tr")(1,"td")(2,"div",25)(3,"code",26),e._uU(4),e.qZA(),e._UZ(5,"i",27),e.qZA()(),e.TgZ(6,"td")(7,"span",28),e._uU(8),e.qZA()(),e.TgZ(9,"td")(10,"div",29)(11,"div",30),e._UZ(12,"div",31),e.qZA(),e.TgZ(13,"div",32)(14,"span",33),e._uU(15),e.qZA(),e.TgZ(16,"span",34),e._uU(17),e.qZA()()()(),e.TgZ(18,"td")(19,"div",35),e.YNc(20,lt,2,1,"div",36),e.YNc(21,_t,5,2,"div",36),e.qZA()(),e.TgZ(22,"td")(23,"button",37),e.NdJ("click",function(){const r=e.CHM(t).$implicit,a=e.oxw(2);return e.KtG(a.onViewDetails(r))}),e._UZ(24,"i",38),e.qZA(),e.TgZ(25,"button",39),e.NdJ("click",function(){const r=e.CHM(t).$implicit,a=e.oxw(2);return e.KtG(a.onCopyJson(r))}),e._UZ(26,"i",40),e.qZA()()()}if(2&i){const t=s.$implicit,n=e.oxw(2);e.xp6(4),e.Oqu(t.name),e.xp6(1),e.Tol(n.getFieldTypeIcon(t)),e.xp6(3),e.Oqu(t.type),e.xp6(4),e.Tol(n.getUsageClass(t)),e.Udp("width",n.getUsagePercentage(t),"%"),e.xp6(3),e.hij("",t.doc_frequency||0," docs"),e.xp6(2),e.hij("(",n.getUsagePercentage(t),"%)"),e.xp6(2),e.Q6J("title",n.formatSampleValues(t.sample_values)),e.xp6(1),e.Q6J("ngIf",t.sample_values&&t.sample_values.length>0),e.xp6(1),e.Q6J("ngIf",!t.sample_values||0===t.sample_values.length)}}function ut(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"div",48)(1,"p"),e._uU(2,"No index fields found"),e.qZA(),e.TgZ(3,"button",49),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.onLoadIndexFields())}),e._UZ(4,"i",11),e._uU(5," Load Index Fields "),e.qZA()()}}function ht(i,s){if(1&i&&(e.TgZ(0,"div",21)(1,"table",22)(2,"thead")(3,"tr")(4,"th"),e._uU(5,"Field Name"),e.qZA(),e.TgZ(6,"th"),e._uU(7,"Type"),e.qZA(),e.TgZ(8,"th"),e._uU(9,"Usage"),e.qZA(),e.TgZ(10,"th"),e._uU(11,"Sample Values"),e.qZA(),e.TgZ(12,"th"),e._uU(13,"Actions"),e.qZA()()(),e.TgZ(14,"tbody"),e.YNc(15,ft,27,13,"tr",23),e.ALo(16,"async"),e.qZA()(),e.YNc(17,ut,6,0,"div",24),e.ALo(18,"async"),e.qZA()),2&i){const t=e.oxw();let n;e.xp6(15),e.Q6J("ngForOf",e.lcZ(16,2,t.indexFields$)),e.xp6(2),e.Q6J("ngIf",0===(null==(n=e.lcZ(18,4,t.indexFields$))?null:n.length))}}let mt=(()=>{class i{constructor(t,n){this.logger=t,this.toastr=n,this.searchTerm="",this.loading=!1,this.totalFields=0,this.fieldsWithData=0,this.searchTermChange=new e.vpe,this.loadIndexFields=new e.vpe,this.loadLukeInfo=new e.vpe,this.loadFieldStats=new e.vpe,this.viewDetails=new e.vpe,this.copyJson=new e.vpe,this.fetchSamples=new e.vpe,this.loadingSamples=new Set}onSearchTermChange(t){this.searchTermChange.emit(t)}onLoadIndexFields(){this.loadIndexFields.emit()}onLoadLukeInfo(){this.loadLukeInfo.emit()}onLoadFieldStats(){this.loadFieldStats.emit()}onViewDetails(t){this.viewDetails.emit(t)}onCopyJson(t){this.copyJson.emit(t)}onFetchSamples(t){this.loadingSamples.has(t.name)||(this.loadingSamples.add(t.name),this.fetchSamples.emit(t.name))}isSampleLoading(t){return this.loadingSamples.has(t)}getUsagePercentage(t){return t.doc_frequency&&this.totalFields?Math.round(t.doc_frequency/this.totalFields*100):0}getUsageClass(t){const n=this.getUsagePercentage(t);return n>=80?"usage-high":n>=50?"usage-medium":n>=20?"usage-low":"usage-very-low"}formatSampleValues(t){return t&&0!==t.length?t.slice(0,3).join(", ")+(t.length>3?"...":""):"No data"}getFieldTypeIcon(t){var n;const o=(null===(n=t.type)||void 0===n?void 0:n.toLowerCase())||"";return o.includes("text")?"fas fa-font":o.includes("int")||o.includes("long")?"fas fa-hashtag":o.includes("float")||o.includes("double")?"fas fa-percentage":o.includes("date")?"fas fa-calendar":o.includes("bool")?"fas fa-toggle-on":"fas fa-tag"}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(u.Kf),e.Y36(M._W))},i.\u0275cmp=e.Xpm({type:i,selectors:[["app-index-fields"]],inputs:{indexFields$:"indexFields$",searchTerm:"searchTerm",loading:"loading",totalFields:"totalFields",fieldsWithData:"fieldsWithData"},outputs:{searchTermChange:"searchTermChange",loadIndexFields:"loadIndexFields",loadLukeInfo:"loadLukeInfo",loadFieldStats:"loadFieldStats",viewDetails:"viewDetails",copyJson:"copyJson",fetchSamples:"fetchSamples"},decls:24,vars:5,consts:[[1,"index-fields-tab"],[1,"tab-header"],[1,"search-section"],["type","text","placeholder","Search index fields by name or type",1,"search-input",3,"ngModel","ngModelChange"],[1,"stats-section"],[1,"stats-info"],[1,"stat-item"],[1,"fas","fa-list"],[1,"fas","fa-database"],[1,"action-buttons"],["title","Load Index Fields",1,"btn","btn-outline-primary","btn-sm",3,"click"],[1,"fas","fa-sync-alt"],["t
1itle","Load Luke Info",1,"btn","btn-outline-info","btn-sm",3,"click"],[1,"fas","fa-chart-bar"],["title","Load Field Stats",1,"btn","btn-outline-secondary","btn-sm",3,"click"],[1,"fas","fa-chart-line"],["class","loading-indicator",4,"ngIf"],["class","table-container",4,"ngIf"],[1,"loading-indicator"],["role","status",1,"spinner-border","text-primary"],[1,"sr-only"],[1,"table-container"],[1,"data-table"],[4,"ngFor","ngForOf"],["class","no-data",4,"ngIf"],[1,"field-info"],[1,"field-name"],[1,"field-type-icon"],[1,"field-type"],[1,"usage-info"],[1,"usage-bar"],[1,"usage-fill"],[1,"usage-text"],[1,"doc-count"],[1,"percentage"],[1,"sample-values",3,"title"],[4,"ngIf"],["title","View Details",1,"btn","btn-outline-primary","btn-sm",3,"click"],[1,"fas","fa-eye"],["title","Copy JSON",1,"btn","btn-outline-info","btn-sm",3,"click"],[1,"fas","fa-copy"],[1,"no-samples"],["class","btn btn-outline-secondary btn-xs","title","Fetch Sample Values",3,"click",4,"ngIf"],["class","loading-samples",4,"ngIf"],["title","Fetch Sample Values",1,"btn","btn-outline-secondary","btn-xs",3,"click"],[1,"fas","fa-download"],[1,"loading-samples"],[1,"fas","fa-spinner","fa-spin"],[1,"n
1o-data"],[1,"btn","btn-primary",3,"click"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"input",3),e.NdJ("ngModelChange",function(r){return n.onSearchTermChange(r)}),e.qZA()(),e.TgZ(4,"div",4)(5,"div",5)(6,"span",6),e._UZ(7,"i",7),e._uU(8),e.qZA(),e.TgZ(9,"span",6),e._UZ(10,"i",8),e._uU(11),e.qZA()(),e.TgZ(12,"div",9)(13,"button",10),e.NdJ("click",function(){return n.onLoadIndexFields()}),e._UZ(14,"i",11),e._uU(15," Load Fields "),e.qZA(),e.TgZ(16,"button",12),e.NdJ("click",function(){return n.onLoadLukeInfo()}),e._UZ(17,"i",13),e._uU(18," Luke Info "),e.qZA(),e.TgZ(19,"button",14),e.NdJ("click",function(){return n.onLoadFieldStats()}),e._UZ(20,"i",15),e._uU(21," Field Stats "),e.qZA()()()(),e.YNc(22,dt,6,0,"div",16),e.YNc(23,ht,19,6,"div",17),e.qZA()),2&t&&(e.xp6(3),e.Q6J("ngModel",n.searchTerm),e.xp6(5),e.hij(" Total Fields: ",n.totalFields," "),e.xp6(3),e.hij(" With Data: ",n.fieldsWithData," "),e.xp6(11),e.Q6J("ngIf",n.loading),e.xp6(1),e.Q6J("ngIf",!n.loading))},dependencies:[p.sg,p.O5,g.Fj,g.JJ,g.On,p.Ov],styles:[".index-fields-tab[_ngcontent-%COMP%] .tab-header[_ngcontent-%COMP%]{margin-bottom:20px;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:16px}.index-fields-tab[_ngcontent-%COMP%] .tab-header[_ngcontent-%COMP%] .search-section[_ngcontent-%COMP%]{flex:1;min-width:300px}.index-fields-tab[_ngcontent-%COMP%] .tab-header[_ngcontent-%COMP%] .search-section[_ngcontent-%COMP%] .search-input[_ngcontent-%COMP%]{width:100%;padding:8px 12px;border:1px solid #ddd;border-radius:4px;font-size:14px}.index-fields-tab[_ngcontent-%COMP%] .tab-header[_ngcontent-%COMP%] .search-section[_ngcontent-%COMP%] .search-input[_ngcontent-%COMP%]:focus{outline:none;border-color:#007bff;box-shadow:0 0 0 2px #007bff40}.index-fields-tab[_ngcontent-%COMP%] .tab-header[_ngcontent-%COMP%] .stats-section[_ngcontent-%COMP%]{display:flex;align-items:center;gap:16px;flex-wrap:wrap}.index-fields-tab[_ngcontent-%COMP%] .tab-header[_ngcontent-%COMP%] .stats-section[_ngcontent-%COMP%] .stats-info[_ngcontent-%COMP%]{display:flex;gap:16px}.index-fields-tab[_ngcontent-%COMP%] .tab-header[_ngcontent-%COMP%] .stats-section[_ngcontent-%COMP%] .stats-info[_ngcontent-%COMP%] .stat-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;font-size:14px;color:#495057}.index-fields-tab[_ngcontent-%COMP%] .tab-header[_ngcontent-%COMP%] .stats-section[_ngcontent-%COMP%] .stats-info[_ngcontent-%COMP%] .stat-item[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#007bff}.index-fields-tab[_ngcontent-%COMP%] .tab-header[_ngcontent-%COMP%] .stats-section[_ngcontent-%COMP%] .action-buttons[_ngcontent-%COMP%]{display:flex;gap:8px}.index-fields-tab[_ngcontent-%COMP%] .loading-indicator[_ngcontent-%COMP%]{text-align:center;padding:40px}.index-fields-tab[_ngcontent-%COMP%] .loading-indicator[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-top:16px;color:#6c757d}.index-fields-tab[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%]{background:white;border-radius:8px;box-shadow:0 2px 4px #0000001a;overflow:hidden}.index-fields-tab[_ngcontent-%COMP%] .data-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse}.index-fields-tab[_ngcontent-%COMP%] .data-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .index-fields-tab[_ngcontent-%COMP%] .data-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:12px;text-align:left;border-bottom:1px solid #e9ecef}.index-fields-tab[_ngcontent-%COMP%] .data-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background:#f8f9fa;font-weight:600;color:#495057;font-size:14px}.index-fields-tab[_ngcontent-%COMP%] .data-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{vertical-align:top}.index-fields-tab[_ngcontent-%COMP%] .field-info[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.index-fields-tab[_ngcontent-%COMP%] .field-info[_ngcontent-%COMP%] .field-name[_ngcontent-%COMP%]{font-family:Monaco,Menlo,Ubuntu Mono,monospace;background:#f8f9fa;padding:2px 6px;border-radius:4px;font-size:13px;color:#495057;border:1px solid #e9ecef}.index-fields-tab[_ngcontent-%COMP%] .field-info[_ngcontent-%COMP%] .field-type-icon[_ngcontent-%COMP%]{color:#6c757d;font-size:12px}.index-fields-tab[_ngcontent-%COMP%] .field-type[_ngcontent-%COMP%]{font-weight:500;color:#495057}.index-fields-tab[_ngcontent-%COMP%] .usage-info[_ngcontent-%COMP%] .usage-bar[_ngcontent-%COMP%]{width:100%;height:8px;background:#e9ecef;border-radius:4px;overflow:hidden;margin-bottom:4px}.index-fields-tab[_ngcontent-%COMP%] .usage-info[_ngcontent-%COMP%] .usage-bar[_ngcontent-%COMP%] .usage-fill[_ngcontent-%COMP%]{height:100%;transition:width .3s ease}.index-fields-tab[_ngcontent-%COMP%] .usage-info[_ngcontent-%COMP%] .usage-bar[_ngcontent-%COMP%] .usage-fill.usage-high[_ngcontent-%COMP%]{background:#28a745}.index-fields-tab[_ngcontent-%COMP%] .usage-info[_ngcontent-%COMP%] .usage-bar[_ngcontent-%COMP%] .usage-fill.usage-medium[_ng
1content-%COMP%]{background:#ffc107}.index-fields-tab[_ngcontent-%COMP%] .usage-info[_ngcontent-%COMP%] .usage-bar[_ngcontent-%COMP%] .usage-fill.usage-low[_ngcontent-%COMP%]{background:#fd7e14}.index-fields-tab[_ngcontent-%COMP%] .usage-info[_ngcontent-%COMP%] .usage-bar[_ngcontent-%COMP%] .usage-fill.usage-very-low[_ngcontent-%COMP%]{background:#dc3545}.index-fields-tab[_ngcontent-%COMP%] .usage-info[_ngcontent-%COMP%] .usage-text[_ngcontent-%COMP%]{display:flex;justify-content:space-between;font-size:12px}.index-fields-tab[_ngcontent-%COMP%] .usage-info[_ngcontent-%COMP%] .usage-text[_ngcontent-%COMP%] .doc-count[_ngcontent-%COMP%]{font-weight:500;color:#495057}.index-fields-tab[_ngcontent-%COMP%] .usage-info[_ngcontent-%COMP%] .usage-text[_ngcontent-%COMP%] .percentage[_ngcontent-%COMP%]{color:#6c757d}.index-fields-tab[_ngcontent-%COMP%] .sample-values[_ngcontent-%COMP%]{max-width:200px;font-size:12px;color:#6c757d;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:help}.index-fields-tab[_ngcontent-%COMP%] .sample-values[_ngcontent-%COMP%] .no-samples[_ngcontent-%COMP%]{color:#6c757d;font-style:italic}.index-fields-tab[_ngcontent-%COMP%] .sample-values[_ngcontent-%COMP%] .loading-samples[_ngcontent-%COMP%]{color:#007bff;font-size:11px}.index-fields-tab[_ngcontent-%COMP%] .sample-values[_ngcontent-%COMP%] .loading-samples[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{margin-right:4px}.index-fields-tab[_ngcontent-%COMP%] .sample-values[_ngcontent-%COMP%] .btn-xs[_ngcontent-%COMP%]{padding:2px 6px;font-size:10px;margin-left:8px}.index-fields-tab[_ngcontent-%COMP%] .sample-values[_ngcontent-%COMP%] .btn-xs[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{margin-right:2px}.index-fields-tab[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{padding:4px 8px;border:1px solid;border-radius:4px;font-size:12px;cursor:pointer;transition:all .2s ease;margin-right:4px}.index-fields-tab[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]:hover{transform:translateY(-1px)}.index-fields-tab[_ngcontent-%COMP%] .btn.btn-outline-primary[_ngcontent-%COMP%]{color:#007bff;border-color:#007bff;background:transparent}.index-fields-tab[_ngcontent-%COMP%] .btn.btn-outline-primary[_ngcontent-%COMP%]:hover{background:#007bff;color:#fff}.index-fields-tab[_ngcontent-%COMP%] .btn.btn-outline-info[_ngcontent-%COMP%]{color:#17a2b8;border-color:#17a2b8;background:transparent}.index-fields-tab[_ngcontent-%COMP%] .btn.btn-outline-info[_ngcontent-%COMP%]:hover{background:#17a2b8;color:#fff}.index-fields-tab[_ngcontent-%COMP%] .btn.btn-outline-secondary[_ngcontent-%COMP%]{color:#6c757d;border-color:#6c757d;background:transparent}.index-fields-tab[_ngcontent-%COMP%] .btn.btn-outline-secondary[_ngcontent-%COMP%]:hover{background:#6c757d;color:#fff}.index-fields-tab[_ngcontent-%COMP%] .btn.btn-primary[_ngcontent-%COMP%]{color:#fff;background:#007bff;border-color:#007bff}.index-fields-tab[_ngcontent-%COMP%] .btn.btn-primary[_ngcontent-%COMP%]:hover{background:#0056b3;border-color:#0056b3}.index-fields-tab[_ngcontent-%COMP%] .no-data[_ngcontent-%COMP%]{padding:40px;text-align:center;color:#6c757d}.index-fields-tab[_ngcontent-%COMP%] .no-data[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 16px;font-size:16px}"],changeDetection:0}),i})();function Ct(i,s){if(1&i&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&i){const t=e.oxw(2);e.xp6(1),e.hij("(",t.fieldTypeLibraryCount,")")}}function bt(i,s){1&i&&(e.TgZ(0,"span",22),e._uU(1,"(loading...)"),e.qZA())}function xt(i,s){1&i&&(e.TgZ(0,"div",32),e._uU(1,"Required"),e.qZA())}function yt(i,s){if(1&i&&(e.TgZ(0,"span",33),e._uU(1,"indexed"),e.qZA()),2&i){const t=e.oxw().$implicit;e.ekj("true",t.indexed)("false",!t.indexed)}}function Mt(i,s){if(1&i&&(e.TgZ(0,"span",33),e._uU(1,"stored"),e.qZA()),2&i){const t=e.oxw().$implicit;e.ekj("true",t.stored)("false",!t.stored)}}function Ot(i,s){if(1&i&&(e.TgZ(0,"span",33),e._uU(1,"multiValued"),e.qZA()),2&i){const t=e.oxw().$implicit;e.ekj("true",t.multiValued)("false",!t.multiValued)}}function Pt(i,s){if(1&i&&(e.TgZ(0,"span",33),e._uU(1,"docValues"),e.qZA()),2&i){const t=e.oxw().$implicit;e.ekj("true",t.docValues)("false",!t.docValues)}}
1function vt(i,s){if(1&i&&(e.TgZ(0,"tr")(1,"td")(2,"code",28),e._uU(3),e.qZA(),e.YNc(4,xt,2,0,"div",29),e.qZA(),e.TgZ(5,"td"),e._uU(6),e.qZA(),e.TgZ(7,"td")(8,"div",30),e.YNc(9,yt,2,4,"span",31),e.YNc(10,Mt,2,4,"span",31),e.YNc(11,Ot,2,4,"span",31),e.YNc(12,Pt,2,4,"span",31),e.qZA()()()),2&i){const t=s.$implicit;e.xp6(3),e.Oqu(t.name),e.xp6(1),e.Q6J("ngIf",t.required),e.xp6(2),e.Oqu(t.type),e.xp6(3),e.Q6J("ngIf",void 0!==t.indexed),e.xp6(1),e.Q6J("ngIf",void 0!==t.stored),e.xp6(1),e.Q6J("ngIf",void 0!==t.multiValued),e.xp6(1),e.Q6J("ngIf",void 0!==t.docValues)}}function Tt(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"div")(1,"div",23)(2,"input",24),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.searchTerm=o)}),e.qZA()(),e.TgZ(3,"div",25)(4,"table",26)(5,"thead")(6,"tr")(7,"th"),e._uU(8,"Name"),e.qZA(),e.TgZ(9,"th"),e._uU(10,"Type"),e.qZA(),e.TgZ(11,"th"),e._uU(12,"Properties"),e.qZA()()(),e.TgZ(13,"tbody"),e.YNc(14,vt,13,7,"tr",27),e.ALo(15,"async"),e.qZA()()()()}if(2&i){const t=e.oxw(2);e.xp6(2),e.Q6J("ngModel",t.searchTerm),e.xp6(12),e.Q6J("ngForOf",e.lcZ(15,2,t.filteredFields$))}}function wt(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"div")(1,"app-copy-rules",34),e.NdJ("searchTermChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.copyRulesSearchTerm=o)})("viewDetails",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.viewCopyFieldDetails(o))})("copyJson",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.copyCopyFieldJson(o))})("deleteCopyField",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.deleteCopyRule(o))}),e.qZA()()}if(2&i){const t=e.oxw(2);e.xp6(1),e.Q6J("copyFields$",t.filteredCopyFields$)("searchTerm",t.copyRulesSearchTerm)}}function St(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"i",50),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit,r=e.oxw(3);return e.KtG(r.toggleFieldExpansion(o))}),e.qZA()}}function Zt(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"i",51),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit,r=e.oxw(3);return e.KtG(r.toggleFieldExpansion(o))}),e.qZA()}}
1function Ft(i,s){if(1&i&&(e.TgZ(0,"span",33),e._uU(1,"indexed"),e.qZA()),2&i){const t=e.oxw().$implicit;e.ekj("true",t.field.indexed)("false",!t.field.indexed)}}function kt(i,s){if(1&i&&(e.TgZ(0,"span",33),e._uU(1,"stored"),e.qZA()),2&i){const t=e.oxw().$implicit;e.ekj("true",t.field.stored)("false",!t.field.stored)}}function At(i,s){if(1&i&&(e.TgZ(0,"span",33),e._uU(1,"multiValued"),e.qZA()),2&i){const t=e.oxw().$implicit;e.ekj("true",t.field.multiValued)("false",!t.field.multiValued)}}function Ut(i,s){if(1&i&&(e.TgZ(0,"span",52),e._uU(1),e.qZA()),2&i){const t=e.oxw().$implicit;e.xp6(1),e.hij("(",t.copyRules.length," copy rules)")}}function Jt(i,s){1&i&&e._UZ(0,"i",53)}function Et(i,s){if(1&i&&(e.TgZ(0,"span",62),e._uU(1),e.qZA()),2&i){const t=e.oxw().$implicit;e.xp6(1),e.hij("(max: ",t.maxChars,")")}}function $t(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"div",56)(1,"div",57),e._UZ(2,"i",58),e.TgZ(3,"code",28),e._uU(4),e.qZA(),e.YNc(5,Et,2,1,"span",59),e.TgZ(6,"button",60),e.NdJ("click",function(){const r=e.CHM(t).$implicit,a=e.oxw(5);return e.KtG(a.deleteCopyRule(r))}),e._UZ(7,"i",61),e.qZA()()()}if(2&i){const t=s.$implicit;e.xp6(4),e.Oqu(t.dest),e.xp6(1),e.Q6J("ngIf",t.maxChars)}}function It(i,s){if(1&i&&(e.TgZ(0,"div",54),e.YNc(1,$t,8,2,"div",55),e.qZA()),2&i){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("ngForOf",t.copyRules)}}function Nt(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"div",39)(1,"div",40)(2,"div",41),e.YNc(3,St,1,0,"i",42),e.YNc(4,Zt,1,0,"i",43),e.TgZ(5,"code",28),e._uU(6),e.qZA(),e.TgZ(7,"span",44),e._uU(8),e.qZA(),e.TgZ(9,"div",30),e.YNc(10,Ft,2,4,"span",31),e.YNc(11,kt,2,4,"span",31),e.YNc(12,At,2,4,"span",31),e.qZA(),e.YNc(13,Ut,2,1,"span",45),e.YNc(14,Jt,1,0,"i",46),e.TgZ(15,"button",47),e.NdJ("click",function(){const r=e.CHM(t).$implicit,a=e.oxw(3);return e.KtG(a.deleteField(r.field))}),e._UZ(16,"i",48),e.qZA()()(),e.YNc(17,It,2,1,"div",49),e.qZA()}if(2&i){const t=s.$implicit;e.xp6(1),e.ekj("has-copy-rules",t.copyRules.length>0),e.xp6(2),e.Q6J("ngIf",t.copyRules.length>0),e.xp6(1),e.Q6J("ngIf",t.copyRules.length>0&&!t.expanded),e.xp6(2),e.Oqu(t.field.name),e.xp6(2),e.Oqu(t.field.type),e.xp6(2),e.Q6J("ngIf",void 0!==t.field.indexed),e.xp6(1),e.Q6J("ngIf",void 0!==t.field.stored),e.xp6(1),e.Q6J("ngIf",void 0!==t.field.multiValued),e.xp6(1),e.Q6J("ngIf",t.copyRules.length>0),e.xp6(1),e.Q6J("ngIf",t.copyRules.length>0),e.xp6(3),e.Q6J("ngIf",t.expanded&&t.copyRules.length>0)}}function qt(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"div")(1,"div",23)(2,"input",35),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.fieldTreeSearchTerm=o)}),e.qZA()(),e.TgZ(3,"div",36)(4,"div",37),e.YNc(5,Nt,18,12,"div",38),e.ALo(6,"async"),e.qZA()()()}if(2&i){const t=e.oxw(2);e.xp6(2),e.Q6J("ngModel",t.fieldTreeSearchTerm),e.xp6(3),e.Q6J("ngForOf",e.lcZ(6,2,t.filteredFieldTree$))}}function Dt(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"div")(1,"app-field-types",63),e.NdJ("searchTermChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.fieldTypesSearchTerm=o)})("showOnlyUnusedChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.showOnlyUnusedFieldTypes=o)})("showOnlyUsedChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.showOnlyUsedFieldTypes=o)})("viewDetails",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.viewFieldTypeDetails(o))})("copyJson",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.copyFieldTypeJson(o))})("saveToLibrary",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.saveFieldTypeToLibrary(o))})("deleteFieldType",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.deleteFieldType(o))})("checkLibrary",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.checkFieldTypesAgainstLibrary())})("saveAs",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.saveFieldTypeAs(o))}),e.qZA()()}if(2&i){const t=e.oxw(2);e.xp6(1),e.Q6J("fieldTypes$",t.filteredFieldTypes$)("searchTerm",t.fieldTypesSearchTerm)("showOnlyUnused",t.showOnlyUnusedFieldTypes)("showOnlyUsed",t.showOnlyUsedFieldTypes)}}function Lt(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"div")(1,"app-dynamic-fields",64),e.NdJ("searchTermChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.dynamicFieldsSearchTerm=o)})("viewDetails",function(o){e.CHM(t);const r=e.oxw(2);
1return e.KtG(r.viewDynamicFieldDetails(o))})("copyJson",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.copyDynamicFieldJson(o))})("deleteField",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.deleteDynamicField(o))}),e.qZA()()}if(2&i){const t=e.oxw(2);e.xp6(1),e.Q6J("dynamicFields$",t.filteredDynamicFields$)("searchTerm",t.dynamicFieldsSearchTerm)}}function jt(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"tr")(1,"td")(2,"code",28),e._uU(3),e.qZA()(),e.TgZ(4,"td")(5,"span",76),e._uU(6),e.qZA()(),e.TgZ(7,"td")(8,"span",77),e._uU(9),e.qZA()(),e.TgZ(10,"td")(11,"div",78),e._uU(12),e.qZA()(),e.TgZ(13,"td")(14,"button",79),e.NdJ("click",function(){const r=e.CHM(t).$implicit,a=e.oxw(3);return e.KtG(a.viewLibraryEntryDetails(r))}),e._UZ(15,"i",80),e.qZA(),e.TgZ(16,"button",81),e.NdJ("click",function(){const r=e.CHM(t).$implicit,a=e.oxw(3);return e.KtG(a.addFieldTypeFromLibrary(r))}),e._UZ(17,"i",82),e.qZA(),e.TgZ(18,"button",83),e.NdJ("click",function(){const r=e.CHM(t).$implicit,a=e.oxw(3);return e.KtG(a.copyFieldTypeDefinition(r))}),e._UZ(19,"i",12),e.qZA()()()}if(2&i){const t=s.$implicit;e.xp6(3),e.Oqu(t.name),e.xp6(3),e.Oqu(t.class_name),e.xp6(3),e.Oqu(t.service),e.xp6(3),e.hij(" ",t.description||"No description"," ")}}function zt(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"div",84)(1,"p"),e._uU(2,"No field type library entries found"),e.qZA(),e.TgZ(3,"button",5),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(3);return e.KtG(o.loadFieldTypeLibrary())}),e._UZ(4,"i",6),e._uU(5," Load Field Type Library "),e.qZA()()}}function Yt(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"div")(1,"div",23)(2,"div",65)(3,"input",66),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.fieldTypeLibrarySearchTerm=o)}),e.qZA()(),e.TgZ(4,"div",67)(5,"select",68),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.fieldTypeLibraryServiceFilter=o)}),e.TgZ(6,"option",69),e._uU(7,"All Services"),e.qZA(),e.TgZ(8,"option",70),e._uU(9,"Shopify"),e.qZA(),e.TgZ(10,"option",71),e._uU(11,"BigCommerce"),e.qZA(),e.TgZ(12,"option",72),e._uU(13,"Magento"),e.qZA(),e.TgZ(14,"option",73),e._uU(15,"WooCommerce"),e.qZA()(),e.TgZ(16,"button",74),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.loadFieldTypeLibrary())}),e._UZ(17,"i",6),e._uU(18," Refresh "),e.qZA()()(),e.TgZ(19,"div",25)(20,"table",26)(21,"thead")(22,"tr")(23,"th"),e._uU(24,"Name"),e.qZA(),e.TgZ(25,"th"),e._uU(26,"Class"),e.qZA(),e.TgZ(27,"th"),e._uU(28,"Service"),e.qZA(),e.TgZ(29,"th"),e._uU(30,"Description"),e.qZA(),e.TgZ(31,"th"),e._uU(32,"Actions"),e.qZA()()(),e.TgZ(33,"tbody"),e.YNc(34,jt,20,4,"tr",27),e.ALo(35,"async"),e.qZA()(),e.YNc(36,zt,6,0,"div",75),e.ALo(37,"async"),e.qZA()()}if(2&i){const t=e.oxw(2);let n;e.xp6(3),e.Q6J("ngModel",t.fieldTypeLibrarySearchTerm),e.xp6(2),e.Q6J("ngModel",t.fieldTypeLibraryServiceFilter),e.xp6(29),e.Q6J("ngForOf",e.lcZ(35,4,t.filteredFieldTypeLibrary$)),e.xp6(2),e.Q6J("ngIf",0===(null==(n=e.lcZ(37,6,t.filteredFieldTypeLibrary$))?null:n.length))}}
1function Qt(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"div")(1,"app-index-fields",85),e.NdJ("searchTermChange",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.indexFieldsSearchTerm=o)})("loadIndexFields",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.loadIndexFields())})("loadLukeInfo",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.getLukeInfo())})("loadFieldStats",function(){e.CHM(t);const o=e.oxw(2);return e.KtG(o.getFieldStatistics())})("viewDetails",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.viewIndexFieldDetails(o))})("copyJson",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.copyIndexFieldJson(o))})("fetchSamples",function(o){e.CHM(t);const r=e.oxw(2);return e.KtG(r.fetchFieldSamples(o))}),e.qZA()()}if(2&i){const t=e.oxw(2);e.xp6(1),e.Q6J("indexFields$",t.filteredIndexFields$)("searchTerm",t.indexFieldsSearchTerm)("loading",t.indexFieldsLoading)("totalFields",t.indexFieldsCount)("fieldsWithData",t.fieldsWithData)}}function Rt(i,s){if(1&i&&(e.TgZ(0,"div")(1,"div",86)(2,"pre"),e._uU(3),e.ALo(4,"json"),e.qZA()()()),2&i){const t=e.oxw().ngIf;e.xp6(3),e.Oqu(e.lcZ(4,1,t))}}function Gt(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"div")(1,"nav",9)(2,"button",10),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.setActiveTab("fields"))}),e._UZ(3,"i",11),e._uU(4),e.qZA(),e.TgZ(5,"button",10),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.setActiveTab("copyRules"))}),e._UZ(6,"i",12),e._uU(7),e.qZA(),e.TgZ(8,"button",10),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.setActiveTab("fieldTree"))}),e._UZ(9,"i",13),e._uU(10," Field Tree "),e.qZA(),e.TgZ(11,"button",10),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.setActiveTab("fieldTypes"))}),e._UZ(12,"i",14),e._uU(13),e.qZA(),e.TgZ(14,"button",10),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.setActiveTab("dynamicFields"))}),e._UZ(15,"i",15),e._uU(16),e.qZA(),e.TgZ(17,"button",10),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.setActiveTab("fieldTypeLibrary"))}),e._UZ(18,"i",16),e._uU(19," Field Type Library "),e.YNc(20,Ct,2,1,"span",17),e.YNc(21,bt,2,0,"span",18),e.qZA(),e.TgZ(22,"button",10),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.setActiveTab("indexFields"))}),e._UZ(23,"i",19),e._uU(24," Index Fields "),e.qZA(),e.TgZ(25,"button",10),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return e.KtG(o.setActiveTab("raw"))}),e._UZ(26,"i",20),e._uU(27," Raw "),e.qZA()(),e.TgZ(28,"div",21),e.YNc(29,Tt,16,4,"div",17),e.YNc(30,wt,2,2,"div",17),e.YNc(31,qt,7,4,"div",17),e.YNc(32,Dt,2,4,"div",17),e.YNc(33,Lt,2,2,"div",17),e.YNc(34,Yt,38,8,"div",17),e.YNc(35,Qt,2,5,"div",17),e.YNc(36,Rt,5,3,"div",17),e.qZA()()}if(2&i){const t=s.ngIf,n=e.oxw();e.xp6(2),e.ekj("active","fields"===n.activeTab),e.xp6(2),e.hij(" Fields (",t.schema.fields.length,") "),e.xp6(1),e.ekj("active","copyRules"===n.activeTab),e.xp6(2),e.hij(" Copy Rules (",t.sc
1hema.copyFields.length,") "),e.xp6(1),e.ekj("active","fieldTree"===n.activeTab),e.xp6(3),e.ekj("active","fieldTypes"===n.activeTab),e.xp6(2),e.hij(" Field Types (",t.schema.fieldTypes.length,") "),e.xp6(1),e.ekj("active","dynamicFields"===n.activeTab),e.xp6(2),e.hij(" Dynamic Fields (",t.schema.dynamicFields.length,") "),e.xp6(1),e.ekj("active","fieldTypeLibrary"===n.activeTab),e.xp6(3),e.Q6J("ngIf",!n.fieldTypeLibraryLoading&&n.fieldTypeLibraryCount>0),e.xp6(1),e.Q6J("ngIf",n.fieldTypeLibraryLoading),e.xp6(1),e.ekj("active","indexFields"===n.activeTab),e.xp6(3),e.ekj("active","raw"===n.activeTab),e.xp6(4),e.Q6J("ngIf","fields"===n.activeTab),e.xp6(1),e.Q6J("ngIf","copyRules"===n.activeTab),e.xp6(1),e.Q6J("ngIf","fieldTree"===n.activeTab),e.xp6(1),e.Q6J("ngIf","fieldTypes"===n.activeTab),e.xp6(1),e.Q6J("ngIf","dynamicFields"===n.activeTab),e.xp6(1),e.Q6J("ngIf","fieldTypeLibrary"===n.activeTab),e.xp6(1),e.Q6J("ngIf","indexFields"===n.activeTab),e.xp6(1),e.Q6J("ngIf","raw"===n.activeTab)}}function Kt(i,s){if(1&i&&(e.TgZ(0,"div",89)(1,"div",90),e._UZ(2,"i",91),e._uU(3),e.qZA()()),2&i){const t=e.oxw(2);e.xp6(3),e.hij(" ",t.error," ")}}function Ht(i,s){1&i&&(e.TgZ(0,"div",92),e._UZ(1,"div",93),e.TgZ(2,"p"),e._uU(3,"Loading schema definition..."),e.qZA()())}function Vt(i,s){if(1&i&&(e.YNc(0,Kt,4,1,"div",87),e.YNc(1,Ht,4,0,"ng-template",null,88,e.W1O)),2&i){const t=e.MAs(2),n=e.oxw();e.Q6J("ngIf",n.error)("ngIfElse",t)}}let Wt=(()=>{class i{get searchTerm(){return this.searchTerm$.getValue()}set searchTerm(t){this.searchTerm$.next(t)}get copyRulesSearchTerm(){return this.copyRulesSearchTerm$.getValue()}set copyRulesSearchTerm(t){this.copyRulesSearchTerm$.next(t)}get fieldTreeSearchTerm(){return this.fieldTreeSearchTerm$.getValue()}set fieldTreeSearchTerm(t){this.fieldTreeSearchTerm$.next(t)}get fieldTypesSearchTerm(){return this.fieldTypesSearchTerm$.getValue()}set fieldTypesSearchTerm(t){this.fieldTypesSearchTerm$.next(t)}get dynamicFieldsSearchTerm(){return this.dynamicFieldsSearchTerm$.getValue()}set dynamicFieldsSearchTerm(t){this.dynamicFieldsSearchTerm$.next(t)}get fieldTypeLibrarySearchTerm(){return this.fieldTypeLibrarySearchTerm$.getValue()}set fieldTypeLibrarySearchTerm(t){this.fieldTypeLibrarySearchTerm$.next(t)}get fieldTypeLibraryServiceFilter(){return this.fieldTypeLibraryServiceFilter$.getValue()}set fieldTypeLibraryServiceFilter(t){this.fieldTypeLibraryServiceFilter$.next(t)}get indexFieldsSearchTerm(){return this.indexFieldsSearchTerm$.getValue()}set indexFieldsSearchTerm(t){this.indexFieldsSearchTerm$.next(t)}constructor(t,n,o,r){this.logger=t,this.solrSchemaService=n,this.toastr=o,this.changeDetectorRef=r,this.refresh$=new je.t(1),this.schema$=new f.X(null),this.error=null,this.activeTab="fields",this.searchTerm$=new f.X(""),this.copyRulesSearchTerm$=new f.X(""),this.fieldTreeSearchTerm$=new f.X(""),this.fieldTypesSearchTerm$=new f.X(""),this.dynamicFieldsSearchTerm$=new f.X(""),this.showOnlyUnusedFieldTypes=!1,this.showOnlyUsedFieldTypes=!1,this.fieldTypeLibraryCount=0,this.fieldTypeLibraryLoading=!1,this.fieldTypeLibrarySearchTerm$=new f.X(""),this.fieldTypeLibraryServiceFilter$=new f.X(""),this.fieldTypeLibraryData$=new f.X([]),this.fieldTypeComparisonMap$=new f.X(new Map),this.fieldTypeFilterOptions$=new f.X({showOnlyUnused:!1,showOnlyUsed:!1}),this.indexFieldsSearchTerm$=new f.X(""),this.indexFieldsData$=new f.X([]),this.indexFieldsLoading=!1,this.indexFieldsCount=0,this.fieldsWithData=0,this.errorToastConfig={closeButton:!0,disableTimeOut:!0,timeOut:0,tapToDismiss:!1,preventDuplicates:!0}}extractSolrErrorMessage(t){var n,o;try{if(this.logger.debug("Extracting Solr error message from:",t),this.logger.debug("Full error object:",JSON.stringify(t,null,2)),400===t?.status||404===t?.status||500===t?.status){if(t?.error){const a=t.error;if(this.logger.debug("Error data:",a),a.error&&a.error.details&&Array.isArray(a.error.details)&&a.error.details.length>0){const c=a.error.details[0];if(c&&c.errorMessages&&Array.isArray(c.errorMessages)){const l=c.errorMessages.join("\n");return this.logger.debug("Found Solr error messages in error.details:",l),l}}if(a.details&&Array.isArray(a.details)&&a.details.length>0){const c=a.details[0];if(c&&c.errorMessages&&Array.isArray(c.errorMessages)){const l=c.errorMessages.join("\n");return this.logger.debug("Found error messages in details:",l),l}}if(a.errorMessages&&Array.isArray(a.errorMessages)){const c=a.errorMessages.join("\n");return this.logger.debug("Found error messages at root:",c),c}if(a.error&&a.error.msg)return this.logger.debug("Found Solr error message:",a.error.msg),a.error.msg;if(a.message)return this.logger.debug("Found direct message:",a.message),a.message;if(a.comment)return this.logger.debug("Found comment:",a.comment),a.comment;if("string"==typeof a)return this.logger.debug("Error data is string:",a),a;try{const c=JSON.stringify(a);if(c&&"{}"!==c)return this.logger.debug("Stringified error data:",c),c}catch{}}if(t?.message){if(this.logger.debug("HTTP error message:",t.message),t.message.includes("errorMessages")||t.message.includes("details"))try{const a=t.message.match(/\{.*\}/);if(a){const c=JSON.parse(a[0]);if(c.errorMessages&&Array.isArray(c.errorMessages)){const l=c.errorMessages.join("\n");return this.logger.debug("Parsed error messages from string:",l),l}if(c.details&&Array.isArray(c.details)){const l=c.details[0];if(l&&l.errorMessages&&Array.isArray(l.errorMessages)){const h=l.errorMessages.join("\n");return this.logger.debug("Parsed error messages from details:",h),h}}}}catch(a){this.logger.debug("Failed to parse JSON from error message:",a)}return t.message}}const r=(null===(n=t?.error)||void 0===n?void 0:n.message)||t?.message||"Unknown error occurred";return this.logger.debug("Using fallback message:",r),r}catch(r){return this.logger.error("Error extracting Solr error message:",r),(null===(o=t?.error)||void 0===o?void 0:o.message)||t?.message||"Unknown error occurred"}}ngOnInit(){this.logger.debug("SolrSchemaEditorComponent initializing..."),this.refresh$.pipe((0,Q.b)(()=>{this.logger.info("Refreshing schema data..."),this.error=null}),(0,R.w)(()=>
1this.solrSchemaService.getSchema().pipe((0,ze.K)(n=>(this.logger.error("Error loading schema:",n),this.error="Failed to load schema. Please check your connection and try again.",this.toastr.error(this.error,"Error"),(0,Y.of)(null))))),(0,Q.b)(n=>{n&&this.logger.info("Successfully fetched schema data.")}),(0,Ye.d)(1)).subscribe(n=>{this.schema$.next(n)}),this.filteredFields$=(0,y.a)([this.schema$,this.searchTerm$]).pipe((0,b.U)(([n,o])=>function Qe(i,s){if(!i)return[];if(!s)return i.schema.fields;const t=["indexed","stored","multiValued","docValues","required","omitNorms"],n=s.toLowerCase().split(/\s+/).filter(Boolean),o=n.filter(c=>!c.startsWith("-")),r=n.filter(c=>c.startsWith("-")).map(c=>c.slice(1));function a(c,l){const h=c.name.toLowerCase(),C=c.type.toLowerCase(),T=t.some(P=>void 0!==c[P]&&(P.includes(l)&&"boolean"==typeof c[P]?!0===c[P]:`${P}:${c[P]}`.includes(l)));return h.includes(l)||C.includes(l)||T}return i.schema.fields.filter(c=>{const l=o.every(C=>a(c,C)),h=r.some(C=>a(c,C));return l&&!h})}(n,o))),this.filteredCopyFields$=(0,y.a)([this.schema$,this.copyRulesSearchTerm$]).pipe((0,b.U)(([n,o])=>this.filterCopyFields(n,o))),this.filteredFieldTree$=(0,y.a)([this.schema$,this.fieldTreeSearchTerm$]).pipe((0,b.U)(([n,o])=>this.filterFieldTree(n,o))),this.filteredFieldTypes$=(0,y.a)([this.schema$,this.fieldTypesSearchTerm$,this.fieldTypeFilterOptions$,this.fieldTypeComparisonMap$]).pipe((0,b.U)(([n,o,r,a])=>{let c=this.filterFieldTypes(n,o);return r.showOnlyUnused?c=c.filter(l=>0===this.getFieldTypeUsage(l.name)):r.showOnlyUsed&&(c=c.filter(l=>this.getFieldTypeUsage(l.name)>0)),c})),this.filteredFieldTypeLibrary$=(0,y.a)([this.fieldTypeLibraryData$,this.fieldTypeLibrarySearchTerm$,this.fieldTypeLibraryServiceFilter$]).pipe((0,b.U)(([n,o,r])=>this.filterFieldTypeLibrary(n,o,r))),this.filteredDynamicFields$=(0,y.a)([this.schema$,this.dynamicFieldsSearchTerm$]).pipe((0,b.U)(([n,o])=>this.filterDynamicFields(n,o))),this.filteredIndexFields$=(0,y.a)([this.indexFieldsData$,this.indexFieldsSearchTerm$]).pipe((0,b.U)(([n,o])=>this.filterIndexFields(n,o))),this.refreshSchema()}updateFieldTypeFilters(){this.showOnlyUnusedFieldTypes&&this.showOnlyUsedFieldTypes&&(this.showOnlyUsedFieldTypes=!1),this.fieldTypeFilterOptions$.next({showOnlyUnused:this.showOnlyUnusedFieldTypes,showOnlyUsed:this.showOnlyUsedFieldTypes})}refreshSchema(){this.refresh$.next()}setActiveTab(t){this.activeTab=t,this.logger.info(`Switched to tab: ${t}`),"fieldTypeLibrary"===t&&this.loadFieldTypeLibrary()}filterCopyFields(t,n){if(!t||!t.schema.copyFields)return[];if(!n||""===n.trim())return t.schema.copyFields;const o=n.toLowerCase().trim();return t.schema.copyFields.filter(r=>r.source.toLowerCase().includes(o)||r.dest.toLowerCase().includes(o))}buildFieldTree(t){if(!t||!t.schema.fields)return[];const n=[],o={};return t.schema.fields.forEach(r=>{const a={field:r,copyRules:[],expanded:!1};n.push(a),o[r.name]=a}),t.schema.copyFields&&t.schema.copyFields.forEach(r=>{const a=o[r.source];a&&a.copyRules.push(r)}),n}filterFieldTree(t,n){if(!t||!t.schema.fields)return[];const o=this.buildFieldTree(t),r=[];return o.forEach(a=>{a.field.name.toLowerCase().includes(n.toLowerCase())&&r.push(a)}),r}toggleFieldExpansion(t){t.expanded=!t.expanded,this.logger.debug(`Toggled expansion for field: ${t.field.name}`)}filterFieldTypes(t,n){if(!t||!t.schema.fieldTypes)return[];if(!n||""===n.trim())return t.schema.fieldTypes;const o=n.toLowerCase().trim();return t.schema.fieldTypes.filter(r=>r.name.toLowerCase().includes(o)||r.class.toLowerCase().includes(o))}getFieldTypeUsage(t){const n=this.schema$.getValue();return n&&n.schema.fields?n.schema.fields.filter(o=>o.type===t).length:0}getFieldTypeUsageDetails(t){const n=this.schema$.getValue();if(!n||!n.schema.fields)return{count:0,fieldNames:[]};const o=n.schema.fields.filter(r=>r.type===t);return{count:o.length,fieldNames:o.map(r=>r.name)}}viewFieldTypeDetails(t){this.logger.info(`Viewing details for field type: ${t.name}`);const n=JSON.stringify(t,null,2),o=`\nField Type: ${t.name}\nClass: ${t.class||"N/A"}\nUsage Count: ${this.getFieldTypeUsage(t.name)}\n\nJSON Definition:\n${n}\n `.trim();alert(o)}deleteFieldType(t){const n=t.name,o=this.getFieldTypeUsage(n);let r=`Are you sure you want to delete the field type "${n}"?`;o>0&&(r+=`\n\nThis field type is used by ${o} field(s). Deleting it may break those fields.`),r+="\n\nThis action cannot be undone.",confirm(r)&&(this.logger.info(`Deleting field type: ${n}`),this.toastr.info(`Deleting field type "${n}
1"...`,"Please wait"),this.solrSchemaService.deleteFieldType(n).subscribe({next:()=>{this.toastr.success(`Field type "${n}" deleted successfully`,"Success"),this.refreshSchema()},error:a=>{this.logger.error(`Error deleting field type ${n}:`,a),this.logger.debug("Full error object:",JSON.stringify(a,null,2));const c=this.extractSolrErrorMessage(a);this.logger.debug("Extracted error message:",c),this.toastr.error(`Failed to delete field type "${n}": ${c}`,"Error",this.errorToastConfig)}}))}deleteField(t){const n=t.name;this.schema$.pipe((0,b.U)(o=>o&&o.schema.copyFields?o.schema.copyFields.filter(r=>r.source===n||r.dest===n):[]),(0,R.w)(o=>{let a=`Are you sure you want to delete the field "${n}"?`;if(o.length>0&&(a+=`\n\nThis will also delete ${o.length} associated copy rule(s).`),a+="\n\nThis action cannot be undone.",confirm(a)){this.logger.info(`Deleting field: ${n}`),this.toastr.info(`Deleting field "${n}"...`,"Please wait");const c=o.map(l=>this.solrSchemaService.deleteCopyField(l.source,l.dest).toPromise());return Promise.all(c).then(()=>this.solrSchemaService.deleteField(n).toPromise()).then(()=>{this.toastr.success(`Field "${n}" and ${o.length} copy rule(s) deleted successfully`,"Success"),this.refreshSchema()}).catch(l=>{this.logger.error(`Error deleting field ${n}:`,l);const h=this.extractSolrErrorMessage(l);this.toastr.error(`Failed to delete field "${n}": ${h}`,"Error",this.errorToastConfig)})}return(0,Y.of)(null)})).subscribe()}deleteCopyRule(t){confirm(`Are you sure you want to delete the copy rule from "${t.source}" to "${t.dest}"?\n\nThis action cannot be undone.`)&&(this.logger.info(`Deleting copy rule: ${t.source} -> ${t.dest}`),this.toastr.info("Deleting copy rule...","Please wait"),this.solrSchemaService.deleteCopyField(t.source,t.dest).subscribe({next:()=>{this.toastr.success(`Copy rule from "${t.source}" to "${t.dest}" deleted successfully`,"Success"),this.refreshSchema()},error:o=>{this.logger.error("Error deleting copy rule:",o);const r=this.extractSolrErrorMessage(o);this.toastr.error(`Failed to delete copy rule: ${r}`,"Error",this.errorToastConfig)}}))}viewCopyFieldDetails(t){this.logger.info(`Viewing details for copy field: ${t.source} -> ${t.dest}`);const n=`\nCopy Rule Details:\nSource: ${t.source}\nDestination: ${t.dest}\n\nJSON Definition:\n${JSON.stringify(t,null,2)}\n `.trim();alert(n)}copyCopyFieldJson(t){try{const n=JSON.stringify(t,null,2);navigator.clipboard.writeText(n).then(()=>{this.toastr.success("Copy field JSON copied to clipboard","Success")}).catch(()=>{this.toastr.error("Failed to copy to clipboard","Error",this.errorToastConfig)})}catch(n){this.logger.error("Error copying copy field JSON:",n),this.toastr.error("Failed to copy copy field JSON","Error",this.errorToastConfig)}}filterFieldTypeLibrary(t,n,o){if(!t||0===t.length)return[];let r=t;if(o&&""!==o.trim()&&(r=r.filter(a=>a.service===o)),n&&""!==n.trim()){const a=n.toLowerCase().trim();r=r.filter(c=>c.name.toLowerCase().includes(a)||c.class_name.toLowerCase().includes(a)||c.description&&c.description.toLowerCase().includes(a))}return r}loadFieldTypeLibrary(){this.fieldTypeLibraryLoading=!0,this.fieldTypeLibraryCount=0,this.logger.debug("Starting to load field type library, loading state:",this.fieldTypeLibraryLoading),this.changeDetectorRef.detectChanges(),this.solrSchemaService.getFieldTypeLibrary().subscribe({next:t=>{const n=t.data||[];this.fieldTypeLibraryData$.next(n),this.fieldTypeLibraryCount=n.length,this.fieldTypeLibraryLoading=!1,this.logger.info(`Loaded ${n.length} field type library entries`),this.logger.debug("Finished loading field type library, loading state:",this.fieldTypeLibraryLoading),this.changeDetectorRef.detectChanges()},error:t=>{this.logger.error("Error loading field type library:",t);const n=this.extractSolrErrorMessage(t);this.toastr.error(`Failed to load field type library: ${n}`,"Error",this.errorToastConfig),this.fieldTypeLibraryData$.next([]),this.fieldTypeLibraryCount=0,this.fieldTypeLibraryLoading=!1,this.logger.debug("Error loading field type library, loading state:",this.fieldTypeLibraryLoading),this.changeDetectorRef.detectChanges()}})}viewLibraryEntryDetails(t){this.logger.info(`Viewing details for library entry: ${t.name}`);const n=JSON.stringify(t.definition,null,2),o=`\nField Type: ${t.name}\nClass: ${t.class_name}\nService: ${t.service}\nDescription: ${t.description||"No description"}\nUsage Notes: ${t.usage_notes||"No usage notes"}\nTags: ${t.tags||"No tags"}\n\nJSON Definition:\n${n}\n `.trim();alert(o)}addFieldTypeFromLibrary(t){confirm(`Are you sure you want to add the field type "${t.name}" to the current schema?\n\nThis will add the field type to your Solr schema.`)&&(this.logger.info(`Adding field type from library: ${t.name}`),this.toastr.info(`Adding field type "${t.name}
1"...`,"Please wait"),this.solrSchemaService.addFieldTypeFromLibrary(t.id).subscribe({next:o=>{this.toastr.success(`Field type "${t.name}" added successfully`,"Success"),this.logger.info("Field type added successfully:",o),this.refreshSchema()},error:o=>{this.logger.error("Error adding field type:",o);const r=this.extractSolrErrorMessage(o);this.toastr.error(`Failed to add field type: ${r}`,"Error",this.errorToastConfig)}}))}saveFieldTypeToLibrary(t){const n=prompt("Enter a description for this field type (optional):");this.logger.info(`Saving field type to library: ${t.name}`),this.toastr.info(`Saving field type "${t.name}" to library...`,"Please wait"),this.solrSchemaService.saveFieldTypeToLibrary(t,n).subscribe({next:o=>{this.toastr.success(`Field type "${t.name}" saved to library successfully`,"Success"),this.logger.info("Field type saved to library successfully:",o),"fieldTypeLibrary"===this.activeTab&&this.loadFieldTypeLibrary()},error:o=>{this.logger.error("Error saving field type to library:",o);const r=this.extractSolrErrorMessage(o);this.toastr.error(`Failed to save field type to library: ${r}`,"Error",this.errorToastConfig)}})}copyFieldTypeDefinition(t){try{const n=JSON.stringify(t.definition,null,2);navigator.clipboard.writeText(n).then(()=>{this.toastr.success("Field type definition copied to clipboard","Success")}).catch(()=>{this.toastr.error("Failed to copy to clipboard","Error",this.errorToastConfig)})}catch(n){this.logger.error("Error copying field type definition:",n),this.toastr.error("Failed to copy field type definition","Error",this.errorToastConfig)}}copyFieldTypeJson(t){try{const n=JSON.stringify(t,null,2);navigator.clipboard.writeText(n).then(()=>{this.toastr.success("Field type JSON copied to clipboard","Success")}).catch(()=>{this.toastr.error("Failed to copy to clipboard","Error",this.errorToastConfig)})}catch(n){this.logger.error("Error copying field type JSON:",n),this.toastr.error("Failed to copy field type JSON","Error",this.errorToastConfig)}}checkFieldTypesAgainstLibrary(){this.logger.info("Checking field types against library..."),this.toastr.info("Checking field types against library...","Please wait"),this.solrSchemaService.getFieldTypeLibrary().subscribe({next:t=>{const n=t.data||[];this.fieldTypeLibraryData$.next(n),this.performFieldTypeComparison(n),this.toastr.success("Field type comparison completed","Success")},error:t=>{this.logger.error("Error loading library data for comparison:",t);const n=this.extractSolrErrorMessage(t);this.toastr.error(`Failed to load library data for comparison: ${n}`,"Error",this.errorToastConfig)}})}performFieldTypeComparison(t){const n=new Map;this.schema$.subscribe(o=>{o&&o.schema.fieldTypes&&(o.schema.fieldTypes.forEach(r=>{const a=t.find(c=>c.name===r.name);if(a){const c=JSON.stringify(r,Object.keys(r).sort()),l=JSON.stringify(a.definition,Object.keys(a.definition).sort());n.set(r.name,c===l?"same":"different")}else n.set(r.name,"not_found")}),this.fieldTypeComparisonMap$.next(n),this.logger.info(`Field type comparison completed for ${n.size} field types`))})}getLibraryStatus(t){return this.fieldTypeComparisonMap$.getValue().get(t.name)||null}getLibraryStatusClass(t){switch(this.getLibraryStatus(t)){case"same":return"status-same";case"different":return"status-different";case"not_found":return"status-not-found";default:return"status-unknown"}}getLibraryStatusIcon(t){switch(this.getLibraryStatus(t)){case"same":return"fas fa-check-circle text-success";case"different":return"fas fa-exclamation-triangle text-warning";case"not_found":return"fas fa-times-circle text-danger";default:return"fas fa-question-circle text-muted"}}getLibraryStatusText(t){switch(this.getLibraryStatus(t)){case"same":return"Same as library";case"different":return"Different from library";case"not_found":return"Not in library";default:return"Not checked"}}saveFieldTypeAs(t){const n=prompt(`Enter a new name for "${t.name}":`);if(n&&n.trim()){const o=prompt("Enter a description for this field type (optional):"),r=Object.assign(Object.assign({},t),{name:n.trim()});this.logger.info(`Saving field type as "${n}" to library`),this.toastr.info(`Saving field type as "${n}
1" to library...`,"Please wait"),this.solrSchemaService.saveFieldTypeToLibrary(r,o).subscribe({next:a=>{this.toastr.success(`Field type "${n}" saved to library successfully`,"Success"),this.logger.info("Field type saved to library successfully:",a),this.loadFieldTypeLibrary(),this.checkFieldTypesAgainstLibrary()},error:a=>{this.logger.error("Error saving field type to library:",a);const c=this.extractSolrErrorMessage(a);this.toastr.error(`Failed to save field type to library: ${c}`,"Error",this.errorToastConfig)}})}}viewDynamicFieldDetails(t){this.logger.info(`Viewing details for dynamic field: ${t.name}`);const n=JSON.stringify(t,null,2),o=`\nDynamic Field: ${t.name}\nType: ${t.type}\nPattern: Matches fields ending with "${t.name.replace("*","")}"\n\nProperties:\n- indexed: ${t.indexed}\n- stored: ${t.stored}\n- multiValued: ${t.multiValued||!1}\n- docValues: ${t.docValues||!1}\n\nJSON Definition:\n${n}\n `.trim();alert(o)}copyDynamicFieldJson(t){try{const n=JSON.stringify(t,null,2);navigator.clipboard.writeText(n).then(()=>{this.toastr.success("Dynamic field JSON copied to clipboard","Success")}).catch(()=>{this.toastr.error("Failed to copy to clipboard","Error",this.errorToastConfig)})}catch(n){this.logger.error("Error copying dynamic field JSON:",n),this.toastr.error("Failed to copy dynamic field JSON","Error",this.errorToastConfig)}}deleteDynamicField(t){const n=t.name;confirm(`Are you sure you want to delete the dynamic field "${n}"?\n\nThis will prevent new fields matching this pattern from being automatically created.\n\nThis action cannot be undone.`)&&(this.logger.info(`Deleting dynamic field: ${n}`),this.toastr.info(`Deleting dynamic field "${n}"...`,"Please wait"),this.solrSchemaService.deleteDynamicField(n).subscribe({next:()=>{this.toastr.success(`Dynamic field "${n}" deleted successfully`,"Success"),this.refreshSchema()},error:r=>{this.logger.error(`Error deleting dynamic field ${n}:`,r),this.logger.debug("Full error object:",JSON.stringify(r,null,2));const a=this.extractSolrErrorMessage(r);this.logger.debug("Extracted error message:",a),this.toastr.error(`Failed to delete dynamic field "${n}": ${a}`,"Error",this.errorToastConfig)}}))}filterDynamicFields(t,n){if(!t||!t.schema.dynamicFields)return[];if(!n||""===n.trim())return t.schema.dynamicFields;const o=n.toLowerCase().trim();return t.schema.dynamicFields.filter(r=>r.name.toLowerCase().includes(o)||r.type.toLowerCase().includes(o))}filterIndexFields(t,n){if(!t||0===t.length)return[];if(!n||""===n.trim())return t;const o=n.toLowerCase().trim();return t.filter(r=>r.name.toLowerCase().includes(o)||r.type.toLowerCase().includes(o))}loadIndexFields(){this.indexFieldsLoading=!0,this.indexFieldsCount=0,this.fieldsWithData=0,this.logger.debug("Starting to load index fields, loading state:",this.indexFieldsLoading),this.changeDetectorRef.detectChanges(),this.solrSchemaService.getIndexFields().subscribe({next:t=>{const n=t.fields||[];this.indexFieldsData$.next(n),this.indexFieldsCount=t.total_fields||n.length,this.fieldsWithData=t.fields_with_data||n.filter(o=>o.has_data).length,this.indexFieldsLoading=!1,this.logger.info(`Loaded ${n.length} index fields`),this.logger.debug("Finished loading index fields, loading state:",this.indexFieldsLoading),this.changeDetectorRef.detectChanges()},error:t=>{this.logger.error("Error loading index fields:",t);const n=this.extractSolrErrorMessage(t);this.toastr.error(`Failed to load index fields: ${n}`,"Error",this.errorToastConfig),this.indexFieldsData$.next([]),this.indexFieldsCount=0,this.fieldsWithData=0,this.indexFieldsLoading=!1,this.logger.debug("Error loading index fields, loading state:",this.indexFieldsLoading),this.changeDetectorRef.detectChanges()}})}getLukeInfo(){this.logger.info("Loading Luke information..."),this.toastr.info("Loading Luke information...","Please wait"),this.solrSchemaService.getLukeInfo().subscribe({next:t=>{if(this.logger.info("Luke information loaded successfully:",t),this.toastr.success("Luke information loaded successfully","Success"),t.fields){const n=Object.keys(t.fields).map(o=>Object.assign({name:o},t.fields[o]));this.indexFieldsData$.next(n),this.indexFieldsCount=n.length}},error:t=>{this.logger.error("Error loading Luke information:",t);const n=this.extractSolrErrorMessage(t);this.toastr.error(`Failed to load Luke information: ${n}`,"Error",this.errorToastConfig)}})}getFieldStatistics(){this.logger.info("Loading field statistics..."),this.toastr.info("Loading field statistics...","Please wait"),this.solr
1SchemaService.getFieldStatistics().subscribe({next:t=>{if(this.logger.info("Field statistics loaded successfully:",t),this.toastr.success("Field statistics loaded successfully","Success"),t.facet_counts&&t.facet_counts.facet_fields){const n=Object.keys(t.facet_counts.facet_fields).map(o=>({name:o,count:t.facet_counts.facet_fields[o]}));this.indexFieldsData$.next(n),this.indexFieldsCount=n.length}},error:t=>{this.logger.error("Error loading field statistics:",t);const n=this.extractSolrErrorMessage(t);this.toastr.error(`Failed to load field statistics: ${n}`,"Error",this.errorToastConfig)}})}viewIndexFieldDetails(t){this.logger.info(`Viewing details for index field: ${t.name}`);const n=`\nIndex Field Details:\nName: ${t.name}\nType: ${t.type||"Unknown"}\nDocument Frequency: ${t.doc_frequency||0}\nHas Data: ${t.has_data?"Yes":"No"}\nSample Values: ${t.sample_values?t.sample_values.join(", "):"None"}\n\nFull Field Data:\n${JSON.stringify(t,null,2)}\n `.trim();alert(n)}copyIndexFieldJson(t){try{const n=JSON.stringify(t,null,2);navigator.clipboard.writeText(n).then(()=>{this.toastr.success("Index field JSON copied to clipboard","Success")}).catch(()=>{this.toastr.error("Failed to copy to clipboard","Error",this.errorToastConfig)})}catch(n){this.logger.error("Error copying index field JSON:",n),this.toastr.error("Failed to copy index field JSON","Error",this.errorToastConfig)}}fetchFieldSamples(t){this.logger.info(`Fetching samples for field: ${t}`),this.toastr.info(`Fetching samples for "${t}"...`,"Please wait"),this.solrSchemaService.getFieldSamples(t).subscribe({next:n=>{this.logger.info(`Samples loaded for field ${t}:`,n),this.toastr.success(`Samples loaded for "${t}"`,"Success");const r=this.indexFieldsData$.getValue().map(a=>a.name===t?Object.assign(Object.assign({},a),{sample_values:n.sample_values}):a);this.indexFieldsData$.next(r)},error:n=>{this.logger.error(`Error fetching samples for field ${t}:`,n);const o=this.extractSolrErrorMessage(n);this.toastr.error(`Failed to fetch samples for "${t}": ${o}`,"Error",this.errorToastConfig)}})}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(u.Kf),e.Y36(Le),e.Y36(M._W),e.Y36(e.sBO))},i.\u0275cmp=e.Xpm({type:i,selectors:[["app-solr-schema-editor"]],decls:14,vars:4,consts:[[1,"solr-schema-editor"],[1,"header"],[1,"logo-title"],["src","assets/images/solr.svg","alt","Solr Logo","height","36"],[1,"header-actions"],[1,"btn","btn-primary",3,"click"],[1,"fas","fa-sync-alt"],[4,"ngIf","ngIfElse"],["loadingOrError",""],[1,"nav-tabs"],[1,"nav-tab",3,"click"],[1,"fas","fa-list"],[1,"fas","fa-copy"],[1,"fas","fa-sitemap"],[1,"fas","fa-cogs"],[1,"fas","fa-asterisk"],[1,"fas","fa-book"],[4,"ngIf"],["class","loading-indicator",4,"ngIf"],[1,"fas","fa-database"],[1,"fas","fa-code"],[1,"tab-content"],[1,"loading-indicator"],[1,"tab-header"],["type","text","placeholder","Search by name, type, or property (e.g., 'indexed:true')",1,"search-input",3,"ngModel","ngModelChange"],[1,"table-container"],[1,"data-table"],[4,"ngFor","ngForOf"],[1,"field-name"],["class","required-badge",4,"ngIf"],[1,"field-properties"],["class","property",3,"true","false",4,"ngIf"],[1,"required-badge"],[1,"property"],[3,"copyFields$","searchTerm","searchTermChange","viewDetails","copyJson","deleteCopyField"],["type","text","placeholder","Search fields or copy rules",1,"search-input",3,"ngModel","ngModelChange"],[1,"field-tree-container"],[1,"field-tree"],["class","field-node",4,"ngFor","ngForOf"],[1,"field-node"],[1,"source-field"],[1,"field-header"],["class","fas fa-chevron-down",3,"click",4,"ngIf"],["class","fas fa-chevron-right",3,"click",4,"ngIf"],[1,"field-type"],["class","copy-rules-count",4,"ngIf"],["class","fas fa-exclamation-triangle text-warning","title","This field has copy rules that will also be deleted",4,"ngIf"],["title","Delete field",1,"btn","btn-outline-danger","btn-sm",3,"click"],[1,"fas","fa-trash"],["class","copy-rules-list",4,"ngIf"],[1,"fas","fa-chevron-down",3,"click"],[1,"fas","fa-chevron-right",3,"click"],[1,"copy-rules-count"],["title","This field has copy rules that will also be deleted",1,"fas","fa-exclamation-triangle","text-warning"],[1,"copy-rules-list"],["class","copy-rule",4,"ngFor","ngForOf"],[1,"copy-rule"],[1,"copy-rule-content"],[1,"fas","fa-arrow-right"],["class","max-chars",4,"ngIf"],["title","Delete copy rule",1,"btn","btn-outline-danger","btn-sm",3,"click"],[1,"fas","fa-times"],[1,"max-chars"],[3,"fieldTypes$","searchTerm","showOnlyUnused","showOnlyUsed","searchTermChange","showOnlyUnusedChange","showOnlyUsedChange","viewDetails","copyJson","
1saveToLibrary","deleteFieldType","checkLibrary","saveAs"],[3,"dynamicFields$","searchTerm","searchTermChange","viewDetails","copyJson","deleteField"],[1,"search-section"],["type","text","placeholder","Search field type library by name or class",1,"search-input",3,"ngModel","ngModelChange"],[1,"filter-section"],[1,"service-filter",3,"ngModel","ngModelChange"],["value",""],["value","shopify"],["value","bigcommerce"],["value","magento"],["value","woocommerce"],["title","Refresh Library",1,"btn","btn-outline-info","btn-sm",3,"click"],["class","no-data",4,"ngIf"],[1,"field-class"],[1,"service-badge"],[1,"description"],["title","View Details",1,"btn","btn-outline-primary","btn-sm",3,"click"],[1,"fas","fa-eye"],["title","Add to Schema",1,"btn","btn-outline-success","btn-sm",3,"click"],[1,"fas","fa-plus"],["title","Copy Definition",1,"btn","btn-outline-info","btn-sm",3,"click"],[1,"no-data"],[3,"indexFields$","searchTerm","loading","totalFields","fieldsWithData","searchTermChange","loadIndexFields","loadLukeInfo","loadFieldStats","viewDetails","copyJson","fetchSamples"],[1,"raw-json-container"],["class","error-container",4,"ngIf","ngIfElse"],["loading",""],[1,"error-container"],[1,"alert","alert-danger"],[1,"fas","fa-exclamation-triangle"],[1,"loading-container"],[1,"spinner"]],template:function(t,n){if(1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2),e._UZ(3,"img",3),e.TgZ(4,"h2"),e._uU(5,"Solr Schema Editor"),e.qZA()(),e.TgZ(6,"div",4)(7,"button",5),e.NdJ("click",function(){return n.refreshSchema()}),e._UZ(8,"i",6),e._uU(9," Refresh "),e.qZA()()(),e.YNc(10,Gt,37,30,"div",7),e.ALo(11,"async"),e.YNc(12,Vt,3,2,"ng-template",null,8,e.W1O),e.qZA()),2&t){const o=e.MAs(13);e.xp6(10),e.Q6J("ngIf",e.lcZ(11,2,n.schema$))("ngIfElse",o)}},dependencies:[p.sg,p.O5,g.YN,g.Kr,g.Fj,g.EJ,g.JJ,g.On,Be,ot,ct,mt,p.Ov,p.Ts],styles:[".solr-schema-editor[_ngcontent-%COMP%]{padding:20px;background:#f8f9fa;min-height:100vh;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:30px;padding:20px;background:white;border-radius:8px;box-shadow:0 2px 4px #0000001a}.logo-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.logo-title[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;color:#2c3e50;font-weight:600}.header-actions[_ngcontent-%COMP%]{display:flex;gap:12px}.header-actions[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{padding:8px 16px;border:none;border-radius:6px;font-weight:500;cursor:pointer;transition:all .2s ease;display:flex;align-items:center;gap:8px}.header-actions[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]:hover{transform:translateY(-1px);box-shadow:0 4px 8px #00000026}.header-actions[_ngcontent-%COMP%] .btn.btn-primary[_ngcontent-%COMP%]{background:#007bff;color:#fff}.header-actions[_ngcontent-%COMP%] .btn.btn-primary[_ngcontent-%COMP%]:hover{background:#0056b3}.header-actions[_ngcontent-%COMP%] .btn.btn-primary[_ngcontent-%COMP%]:disabled{background:#6c757d;cursor:not-allowed;transform:none;box-shadow:none}.header-actions[_ngcontent-%COMP%] .btn.btn-success[_ngcontent-%COMP%]{background:#28a745;color:#fff}.header-actions[_ngcontent-%COMP%] .btn.btn-success[_ngcontent-%COMP%]:hover{background:#1e7e34}.loading-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 20px;background:white;border-radius:8px;box-shadow:0 2px 4px #0000001a}.loading-container[_ngcontent-%COMP%] .spinner[_ngcontent-%COMP%]{width:40px;height:40px;border:4px solid #f3f3f3;border-top:4px solid #007bff;border-radius:50%;animation:_ngcontent-%COMP%_spin 1s linear infinite;margin-bottom:16px}.loading-container[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#6c757d;font-size:16px;margin:0}@keyframes _ngcontent-%COMP%_spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.error-container[_ngcontent-%COMP%]{margin-bottom:20px}.error-container[_ngcontent-%COMP%] .alert[_ngcontent-%COMP%]{padding:16px;border-radius:6px;display:flex;align-items:center;gap:12px}.error-container[_ngcontent-%COMP%] .alert.alert-danger[_ngcontent-%COMP%]{background:#f8d7da;color:#721c24;border:1px solid #f5c6cb}.main-content[_ngcontent-%COMP%]{background:white;border-radius:8px;box-shadow:0 2px 4px #0000001a;overflow:hidden}.nav-tabs[_ngcontent-%COMP%]{display:flex;background:#f8f9fa;border-bottom:1px solid #dee2e6}.nav-tabs[_ngcontent-%COMP%] .nav-tab[_ngcontent-%COMP%]{padding:16px 24px;background:none;border:none;cursor:pointer;font-weight:500;color:#6c757d;transition:all .2s ease;display:flex;align-items:center;gap:8px;border-bottom:3px solid transparent}.nav-tabs[_ngcontent-%COMP%] .nav-tab[_ngcontent-%COMP%]:hover{color:#007bff;background:#e9ecef}.nav-tabs[_ngcontent-%COMP%] .nav-tab.active[_ngcontent-%COMP%]{color:#007bff;background:white;border-bottom-color:#007bff}.nav-tabs[_ngcontent-%COMP%] .nav-tab[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:14px}.nav-tabs[_ngcontent-%COMP%] .nav-tab[_ngcontent-%COMP%] .loading-indicator[_ngcontent-%COMP%]{color:#6c757d;font-size:12px;font-style:italic}.tab-content[_ngcontent-%COMP%]{padding:24px}.tab-pane[_ngcontent-%COMP%]{min-height:400px}.overview-grid[_ngcontent-%COMP%]{display:grid;gap:20px;margin-bottom:30px}.info-card[_ngcontent-%COMP%]{background:white;padding:20px;border-radius:8px;box-shadow:0 2px 4px #0000001a}.info-card[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0 0 16px;color:#2c3e50;font-weight:600}.info-card[_ngcontent-%COMP%] .info-item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:8px 0;border-bottom:1px solid #f1f3f4}.info-card[_ngcontent-%COMP%] .info-item[_ngcontent-%COMP%]:last-child{border-bottom:none}.info-card[_ngcontent-%COMP%] .info-item[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-weight:500;color:#495057}.info-card[_ngcontent-%COMP%] .info-item[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#2c3e50;font-weight:600}.stats-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:16px}.stat-card[_ngcontent-%COMP%]{background:white;padding:24px;border-radius:8px;box-shadow:0 2px 4px #0000001a;text-align:center;transition:transform .2s ease,box-shadow .2s ease}.stat-card[_ngcontent-%COMP%]:hover{transform:translateY(-2px);box-shadow:0 4px 8px #00000026}.stat-card[_ngcontent-%COMP%] .stat-number[_ngcontent-%COMP%]{font-size:32px;font-weight:700;color:#007bff;margin-bottom:8px}.stat-card[_ngcontent-%COMP%] .stat-label[_ngcontent-%COMP%]{font-size:14px;color:#6c757d;font-weight:500}.tab-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px;padding:0 0 10px}.tab-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;color:#2c3e50;font-weight:600}.search-filters[_ngcontent-%COMP%]{display:flex;gap:12px;align-items:center}.search-filters[_ngcontent-%COMP%] .search-input[_ngcontent-%COMP%]{width:100%;padding:10px 15px;font-size:14px;border-radius:6px;border:1px solid #dee2e6;margin-bottom:20px;box-sizing:border-box;transition:border-color .2s ease,box-shadow .2s ease}.search-filters[_ngcontent-%COMP%] .search-input[_ngcontent-%COMP%]:focus{outline:none;border-color:#007bff;box-shadow:0 0 0 2px #007bff40}.search-filters[_ngcontent-%COMP%] .filter-select[_ngcontent-%COMP%]{padding:8px 12px;border:1px solid #dee2e6;border-radius:6px;font-size:14px;background:white}.search-filters[_ngcontent-%COMP%] .filter-select[_ngcontent-%COMP%]:focus{outline:none;border-color:#007bff}.form-overlay[_ngcontent-%COMP%]{position:fixed;inset:0;background:rgba(0,0,0,.5);display:flex;align-items:center;justify-content:center;z-index:1000}.form-card[_ngcontent-%COMP%]{background:white;padding:32px;border-radius:8px;box-shadow:0 8px 32px #0003;min-width:400px;max-width:500px}.form-card[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0 0 24px;color:#2c3e50;font-weight:600}.form-card[_ngcontent-%COMP%] .form-group[_ngcontent-%COMP%]{margin-bottom:20px}.form-card[_ngcontent-%COMP%] .form-group[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:block;margin-bottom:8px;font-weight:500;color:#2c3e50}.form-card[_ngcontent-%COMP%] .form-group[_ngcontent-%COMP%] input[type=text][_ngcontent-%COMP%], .form-card[_ngcontent-%COMP%] .form-group[_ngcontent-%COMP%] input[type=number][_ngcontent-%COMP%], .form-card[_ngcontent-%COMP%] .form-group[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{width:100%;padding:10px 12px;border:1px solid #dee2e6;border-radius:6px;font-size:14px}.form-card[_ngcontent-%COMP%] .form-group[_ngcontent-%COMP%] input[type=text][_ngcontent-%COMP%]:focus, .form-card[_ngcontent-%COMP%] .form-group[_ngcontent-%COMP%] input[type=number][_ngcontent-%COMP%]:focus, .form-card[_ngcontent-%COMP%] .form-group[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:focus{outline:none;border-color:#007bff;box-shadow:0 0 0 3px #007bff1a}.form-card[_ngcontent-%COMP%] .form-group[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{margin-right:8px}.form-card[_ngcontent-%COMP%] .form-actions[_ngcontent-%COMP%]{display:flex;gap:12px;justify-content:flex-end;margin-top:24px}.form-card[_ngcontent-%COMP%] .form-actions[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{padding:10px 20px;border:none;border-radius:6px;font-weight:500;cursor:pointer;transition:all .2s ease}.form-card[_ngcontent-%COMP%] .form-actions[_ngcontent-%COMP%] .btn.btn-primary[_ngcontent-%COMP%]{background:#007bff;color:#fff}.form-card[_ngcontent-%COMP%] .form-actions[_ngcontent-%COMP%] .btn.btn-primary[_ngcontent-%COMP%]:hover{background:#0056b3}.form-card[_ngcontent-%COMP%] .form-actions[_ngcontent-%COMP%] .btn.btn-secondary[_ngcontent-%COMP%]{background:#6c757d;color:#fff}.form-card[_ngcontent-%COMP%] .form-actions[_ngcontent-%COMP%] .btn.btn-secondary[_ngcontent-%COMP%]:hover{background:#545b62}.table-container[_ngcontent-%COMP%]{overflow-x:auto;border:1px solid #dee2e6;border-radius:8px}.data-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse}.data-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .data-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:12px 8px;text-align:left;border-bottom:1px solid #dee2e6}.data-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background:#f8f9fa;font-weight:600;color:#495057;position:sticky;top:0}.data-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background:#f8f9fa}.data-table[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{padding:6px 12px;border:none;border-radius:4px;font-size:12px;cursor:pointer;transition:all .2s ease;margin-right:4px}.data-table[_ngcontent-%COMP%] .btn.btn-sm[_ngcontent-%COMP%]{padding:4px 8px;font-size:11px}.data-table[_ngcontent-%COMP%] .btn.btn-outline-primary[_ngcontent-%COMP%]{background:transparent;color:#007bff;border:1px solid #007bff}.data-table[_ngcontent-%COMP%] .btn.btn-outline-primary[_ngcontent-%COMP%]:hover{background:#007bff;color:#fff}.data-table[_ngcontent-%COMP%] .btn.btn-outline-danger[_ngcontent-%COMP%]{background:transparent;color:#dc3545;border:1px solid #dc3545}.data-table[_ngcontent-%COMP%] .btn.btn-outline-danger[_ngcontent-%COMP%]:hover{background:#dc3545;color:#fff}.data-table[_ngcontent-%COMP%] .btn.btn-success[_ngcontent-%COMP%]{background:#28a745;color:#fff}.data-table[_ngcontent-%COMP%] .btn.btn-success[_ngcontent-%COMP%]:hover{background:#1e7e34}.data-table[_ngcontent-%COMP%] .fas.fa-check[_ngcontent-%COMP%]{color:#28a745}.data-table[_ngcontent-%COMP%] .fas.fa-times[_ngcontent-%COMP%]{color:#dc3545}.properties[_ngcontent-%COMP%]{background:#e9ecef;padding:4px 8px;border-radius:4px;font-size:12px;color:#495057}.no-properties[_ngcontent-%COMP%]{color:#6c757d;font-style:italic;font-size:12px}.field-properties[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:4px}.field-properties[_ngcontent-%COMP%] .property[_ngcontent-%COMP%]{background:#e9ecef;padding:2px 6px;border-radius:4px;font-size:12px;color:#495057;white-space:nowrap}.field-properties[_ngcontent-%COMP%] .property.true[_ngcontent-%COMP%]{background:#d4edda;color:#155724}
1.field-properties[_ngcontent-%COMP%] .property.false[_ngcontent-%COMP%]{background:#f8d7da;color:#721c24}.required-badge[_ngcontent-%COMP%]{background:#dc3545;color:#fff;font-size:10px;padding:2px 6px;border-radius:12px;margin-top:4px;display:inline-block}.default-value[_ngcontent-%COMP%]{background:#e7f3ff;color:#06c;padding:2px 6px;border-radius:4px;font-size:12px;font-weight:500}.no-default[_ngcontent-%COMP%]{color:#6c757d;font-style:italic;font-size:12px}.edit-properties[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.edit-properties[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;font-size:12px;color:#495057}.edit-properties[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{margin:0}.analyzer-info[_ngcontent-%COMP%] .analyzer-section[_ngcontent-%COMP%]{margin-bottom:8px}.analyzer-info[_ngcontent-%COMP%] .analyzer-section[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:#495057;font-size:12px;display:block;margin-bottom:4px}.analyzer-info[_ngcontent-%COMP%] .analyzer-section[_ngcontent-%COMP%] .analyzer-details[_ngcontent-%COMP%]{font-size:11px;color:#6c757d}.analyzer-info[_ngcontent-%COMP%] .analyzer-section[_ngcontent-%COMP%] .analyzer-details[_ngcontent-%COMP%] .tokenizer[_ngcontent-%COMP%], .analyzer-info[_ngcontent-%COMP%] .analyzer-section[_ngcontent-%COMP%] .analyzer-details[_ngcontent-%COMP%] .filters[_ngcontent-%COMP%], .analyzer-info[_ngcontent-%COMP%] .analyzer-section[_ngcontent-%COMP%] .analyzer-details[_ngcontent-%COMP%] .char-filters[_ngcontent-%COMP%]{margin-bottom:2px}.analyzer-info[_ngcontent-%COMP%] .analyzer-section[_ngcontent-%COMP%] .analyzer-details[_ngcontent-%COMP%] .tokenizer[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .analyzer-info[_ngcontent-%COMP%] .analyzer-section[_ngcontent-%COMP%] .analyzer-details[_ngcontent-%COMP%] .filters[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .analyzer-info[_ngcontent-%COMP%] .analyzer-section[_ngcontent-%COMP%] .analyzer-details[_ngcontent-%COMP%] .char-filters[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-weight:500;color:#495057}.analyzer-info[_ngcontent-%COMP%] .no-analyzer[_ngcontent-%COMP%]{font-size:11px;color:#6c757d;font-style:italic}@media (max-width: 768px){.solr-schema-editor[_ngcontent-%COMP%]{padding:10px}.header[_ngcontent-%COMP%]{flex-direction:column;gap:16px;text-align:center}.nav-tabs[_ngcontent-%COMP%]{flex-wrap:wrap}.nav-tabs[_ngcontent-%COMP%] .nav-tab[_ngcontent-%COMP%]{flex:1;min-width:120px;padding:12px 16px;font-size:14px}.overview-grid[_ngcontent-%COMP%]{grid-template-columns:1fr}.stats-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr)}.tab-header[_ngcontent-%COMP%]{flex-direction:column;gap:16px;align-items:stretch}.search-filters[_ngcontent-%COMP%]{flex-direction:column}.search-filters[_ngcontent-%COMP%] .search-input[_ngcontent-%COMP%], .search-filters[_ngcontent-%COMP%] .filter-select[_ngcontent-%COMP%]{width:100%}.form-card[_ngcontent-%COMP%]{margin:20px;min-width:auto}}.field-name[_ngcontent-%COMP%]{font-family:Monaco,Menlo,Ubuntu Mono,monospace;background:#f8f9fa;padding:2px 6px;border-radius:4px;font-size:13px;color:#495057;border:1px solid #e9ecef}.max-chars[_ngcontent-%COMP%]{background:#e7f3ff;color:#06c;padding:2px 6px;border-radius:4px;font-size:12px;font-weight:500}.no-limit[_ngcontent-%COMP%], .text-muted[_ngcontent-%COMP%]{color:#6c757d;font-style:italic;font-size:12px}.raw-json-container[_ngcontent-%COMP%]{background:#f8f9fa;color:#212529;border-radius:8px;border:1px solid #dee2e6;padding:20px;max-height:70vh;overflow-y:auto}.raw-json-container[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{white-space:pre-wrap;word-break:break-all;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace;font-size:13px;margin:0}.field-tree-container[_ngcontent-%COMP%]{max-height:70vh;overflow-y:auto}.field-tree[_ngcontent-%COMP%] .field-node[_ngcontent-%COMP%]{margin-bottom:8px}.field-tree[_ngcontent-%COMP%] .field-node[_ngcontent-%COMP%] .source-field[_ngcontent-%COMP%]{background:white;border:1px solid #dee2e6;border-radius:6px;padding:12px;transition:all .2s ease}.field-tree[_ngcontent-%COMP%] .field-node[_ngcontent-%COMP%] .source-field.has-copy-rules[_ngcontent-%COMP%]{border-left:4px solid #007bff}.field-tree[_ngcontent-%COMP%] .field-node[_ngcontent-%COMP%] .source-field[_ngcontent-%COMP%] .field-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;cursor:pointer}.field-tree[_ngcontent-%COMP%] .field-node[_ngcontent-%COMP%] .source-field[_ngcontent-%COMP%] .field-header[_ngcontent-%COMP%] i.fas[_ngcontent-%COMP%]{color:#6c757d;font-size:12px;cursor:pointer;transition:color .2s ease}.field-tree[_ngcontent-%COMP%] .field-node[_ngcontent-%COMP%] .source-field[_ngcontent-%COMP%] .field-header[_ngcontent-%COMP%] i.fas[_ngcontent-%COMP%]:hover{color:#007bff}.field-tree[_ngcontent-%COMP%] .field-node[_ngcontent-%COMP%] .source-field[_ngcontent-%COMP%] .field-header[_ngcontent-%COMP%] .field-name[_ng
1content-%COMP%]{font-weight:600;color:#2c3e50}.field-tree[_ngcontent-%COMP%] .field-node[_ngcontent-%COMP%] .source-field[_ngcontent-%COMP%] .field-header[_ngcontent-%COMP%] .field-type[_ngcontent-%COMP%]{background:#e9ecef;color:#495057;padding:2px 6px;border-radius:4px;font-size:12px;font-weight:500}.field-tree[_ngcontent-%COMP%] .field-node[_ngcontent-%COMP%] .source-field[_ngcontent-%COMP%] .field-header[_ngcontent-%COMP%] .field-properties[_ngcontent-%COMP%]{display:flex;gap:4px;flex-wrap:wrap}.field-tree[_ngcontent-%COMP%] .field-node[_ngcontent-%COMP%] .source-field[_ngcontent-%COMP%] .field-header[_ngcontent-%COMP%] .copy-rules-count[_ngcontent-%COMP%]{color:#007bff;font-size:12px;font-weight:500;margin-left:auto}.field-tree[_ngcontent-%COMP%] .field-node[_ngcontent-%COMP%] .source-field[_ngcontent-%COMP%] .field-header[_ngcontent-%COMP%] .text-warning[_ngcontent-%COMP%]{color:#ffc107;margin-left:8px;font-size:14px}.field-tree[_ngcontent-%COMP%] .field-node[_ngcontent-%COMP%] .source-field[_ngcontent-%COMP%] .field-header[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{margin-left:8px;opacity:.7;transition:opacity .2s ease}.field-tree[_ngcontent-%COMP%] .field-node[_ngcontent-%COMP%] .source-field[_ngcontent-%COMP%] .field-header[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]:hover{opacity:1}.field-tree[_ngcontent-%COMP%] .field-node[_ngcontent-%COMP%] .copy-rules-list[_ngcontent-%COMP%]{margin-left:24px;margin-top:8px}.field-tree[_ngcontent-%COMP%] .field-node[_ngcontent-%COMP%] .copy-rules-list[_ngcontent-%COMP%] .copy-rule[_ngcontent-%COMP%]{background:#f8f9fa;border:1px solid #e9ecef;border-radius:4px;padding:8px 12px;margin-bottom:4px}.field-tree[_ngcontent-%COMP%] .field-node[_ngcontent-%COMP%] .copy-rules-list[_ngcontent-%COMP%] .copy-rule[_ngcontent-%COMP%] .copy-rule-content[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.field-tree[_ngcontent-%COMP%] .field-node[_ngcontent-%COMP%] .copy-rules-list[_ngcontent-%COMP%] .copy-rule[_ngcontent-%COMP%] .copy-rule-content[_ngcontent-%COMP%] i.fas[_ngcontent-%COMP%]{color:#6c757d;font-size:10px}.field-tree[_ngcontent-%COMP%] .field-node[_ngcontent-%COMP%] .copy-rules-list[_ngcontent-%COMP%] .copy-rule[_ngcontent-%COMP%] .copy-rule-content[_ngcontent-%COMP%] .field-name[_ngcontent-%COMP%]{font-weight:500;color:#495057}.field-tree[_ngcontent-%COMP%] .field-node[_ngcontent-%COMP%] .copy-rules-list[_ngcontent-%COMP%] .copy-rule[_ngcontent-%COMP%] .copy-rule-content[_ngcontent-%COMP%] .max-chars[_ngcontent-%COMP%]{color:#6c757d;font-size:11px}.field-tree[_ngcontent-%COMP%] .field-node[_ngcontent-%COMP%] .copy-rules-list[_ngcontent-%COMP%] .copy-rule[_ngcontent-%COMP%] .copy-rule-content[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{margin-left:auto;opacity:.7;transition:opacity .2s ease}.field-tree[_ngcontent-%COMP%] .field-node[_ngcontent-%COMP%] .copy-rules-list[_ngcontent-%COMP%] .copy-rule[_ngcontent-%COMP%] .copy-rule-content[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]:hover{opacity:1}.pattern-info[_ngcontent-%COMP%]{margin-top:4px}.pattern-info[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:11px;color:#6c757d}.pattern-info[_ngcontent-%COMP%] small[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{margin-right:4px;color:#007bff}"],changeDetection:0}),i})();var Bt=d(15824),Xt=d(62006),en=d(3034),tn=d(79814),nn=d(15666),on=d(35626),rn=d(94111),sn=d(91147);function an(i,s){if(1&i&&(e.TgZ(0,"span",20),e._uU(1),e.qZA()),2&i){const t=e.oxw(2);e.xp6(1),e.AsE(" ",t.rows.length," ",1===t.rows.length?"item":"items"," ")}}function cn(i,s){1&i&&e._UZ(0,"status-banner",21),2&i&&e.Q6J("compact",!0)}function dn(i,s){1&i&&e._UZ(0,"status-banner",22),2&i&&e.Q6J("compact",!0)}function ln(i,s){1&i&&e._UZ(0,"status-banner",23),2&i&&e.Q6J("compact",!0)}function gn(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"div",26)(1,"div",27),e._UZ(2,"i",28),e.TgZ(3,"span",29),e._uU(4),e.qZA()(),e.TgZ(5,"segmented-control",30),e.NdJ("selectionChange",function(o){const a=e.CHM(t).$implicit,c=e.oxw(3);return e.KtG(c.onStateChange(a,o))}),e.qZA()()}if(2&i){const t=s.$implicit,n=e.oxw(3);e.xp6(1),e.Udp("padding-left",18*t.depth,"px"),e.xp6(2),e.Q6J("title",t.title),e.xp6(1),e.Oqu(t.title),e.xp6(1),e.Q6J("responsive",!1)("options",n.stateOptions)("ngModel",t.state)}}function pn(i,s){if(1&i&&(e.TgZ(0,"div",24),e.YNc(1,gn,6,7,"div",25),e.qZA()),2&i){const t=e.oxw(2);e.xp6(1),e.Q6J("ngForOf",t.filteredRows)}}function _n(i,s){if(1&i){const t=e.EpF();e.TgZ(0,"div",7)(1,"div",8)(2,"div",9)(3,"div")(4,"h2",10),e._uU(5,"Menu items"),e.qZA(),e.TgZ(6,"p",11),e._uU(7,"Changes apply to this account on the next dashboard reload."),e.qZA()(),e.YNc(8,an,2,2,"span",12),e.qZA(),e.YNc(9,cn,1,1,"status-banner",13),e.TgZ(10,"div",14)(11,"mat-form-field",15)(12,"mat-label"),e._uU(13,"Search menu items"),e.qZA(),e.TgZ(14,"input",16),e.NdJ("ngModelChange",function(o){e.CHM(t);const r=e.oxw();return e.KtG(r.searchTerm=o)}),e.qZA()()(),e.YNc(15,dn,1,1,"status-banner",17),e.YNc(16,ln,1,1,"status-banner",18),e.YNc(17,pn,2,1,"div",19),e.qZA()()}if(2&i){const t=e.oxw();e.xp6(8),e.Q6J("ngIf",t.rows.length),e.xp6(1),e.Q6J("ngIf",t.hasUnsavedChanges),e.xp6(
15),e.Q6J("ngModel",t.searchTerm),e.xp6(1),e.Q6J("ngIf",!t.rows.length),e.xp6(1),e.Q6J("ngIf",t.rows.length&&!t.filteredRows.length),e.xp6(1),e.Q6J("ngIf",t.filteredRows.length)}}const un=[{path:"",redirectTo:"settings",pathMatch:"full"},{path:"settings",component:G.L},{path:"l3",component:ge},{path:"feed-files",component:pe.D},{path:"test-one-product",component:qe},{path:"solr-schema-editor",component:Wt},{path:"sidebar-control",component:(()=>{class i{constructor(t,n,o,r,a,c){this.menuFacade=t,this.platformService=n,this.ecomEndpoints=o,this.ls=r,this.toast=a,this.logger=c,this.rows=[],this.loading=!0,this.saving=!1,this.searchTerm="",this.initialStates={},this.stateOptions=[{value:"visible",label:"Visible",icon:"fas fa-eye"},{value:"locked",label:"Locked",icon:"fas fa-lock"},{value:"hidden",label:"Hidden",icon:"fas fa-eye-slash"}]}ngOnInit(){return(0,D.mG)(this,void 0,void 0,function*(){let t=this.menuFacade.listAllItems();if(!t.length)try{const o=yield this.platformService.getPlatform();t=this.menuFacade.listItemsForPlatform(o)}catch(o){this.logger.debug("failed to resolve platform for sidebar control",o)}const n=this.ecomEndpoints.getECOMPartialConfig().replace("PATH",i.CONFIG_PATH);this.ls.getRequestWithAuth(n).then(o=>{this.buildRows(t,o&&"object"==typeof o?o:{})}).catch(o=>{this.logger.debug("failed to load sidebar_menu_states",o),this.buildRows(t,{})}).finally(()=>{this.loading=!1})})}buildRows(t,n){this.rows=t.filter(o=>!o.hidden||o.id in n).map(o=>({id:o.id,title:o.title,depth:o.depth,state:this.normalizeState(n[o.id])})),this.initialStates={},this.rows.forEach(o=>{this.initialStates[o.id]=o.state})}get filteredRows(){const t=this.searchTerm.trim().toLowerCase();return t?this.rows.filter(n=>n.title.toLowerCase().includes(t)):this.rows}get hasUnsavedChanges(){return this.rows.some(t=>{var n;return t.state!==(null!==(n=this.initialStates[t.id])&&void 0!==n?n:"visible")})}onStateChange(t,n){t.state=this.normalizeState(n)}save(){this.saving=!0;const t={};this.rows.forEach(o=>{t[o.id]=o.state});const n=this.ecomEndpoints.getECOMPartialConfig().replace("PATH","['cpanel']");this.ls.postRequestWithAuth(n,{sidebar_menu_states:t},!0).then(()=>{this.menuFacade.applyMenuStates(t),this.initialStates=Object.assign({},t),this.toast.showSuccess("Sidebar states saved. Reload to see the updated menu.","Saved")}).catch(o=>{this.logger.debug("failed to save sidebar_menu_states",o),this.toast.showError("Could not save sidebar states.","Error")}).finally(()=>{this.saving=!1})}normalizeState(t){return"locked"===t||"hidden"===t?t:"visible"}}return i.CONFIG_PATH="['cpanel']['sidebar_menu_states']",i.\u0275fac=function(t){return new(t||i)(e.Y36(Bt.m),e.Y36(J.m),e.Y36(Xt.t),e.Y36(S.I),e.Y36(en.k),e.Y36(u.Kf))},i.\u0275cmp=e.Xpm({type:i,selectors:[["app-sidebar-control"]],features:[e._Bn([J.m])],decls:7,vars:11,consts:[[1,"sidebar-control-container"],["icon","fas fa-bars","title","Sidebar Control","subtitle","Set the state of each sidebar menu item for this account. Locked items show a padlock and are not clickable; hidden items are removed from the menu.","marginBottom","16px",3,"gradient","applyPadding","sticky","showActions","fullWidthSubtitle"],["slot","actions",1,"header-actions"],["variant","filled","size","small","icon","fas fa-save","loadingText","Saving...",3,"severity","text","loading","disabled","onClick"],[1,"sidebar-control-content"],["loadingText","Loading sidebar items...",3,"show"],["class","sidebar-control-main",4,"ngIf"],[1,"sidebar-control-main"],[1,"table-card","card-padding"],[1,"sidebar-control-card__header"],[1,"section-title"],[1,"section-subtitle"],["class","item-count",4,"ngIf"],["class","unsaved-changes-banner","variant","warning","title","Unsaved changes","message","Click Save in the header to apply your sidebar updates.",3,"compact",4,"ngIf"],[1,"search-row"],["appearance","outline",1,"search-input"],["matInput","","placeholder","Search by name",3,"ngModel","ngModelChange"],["variant","info","title","No configurable items","message","There are no sidebar items available to configure for this account.",3,"compact",4,"ngIf"],["variant","info","title","No matches","message","No menu items match your search.",3,"compact",4,"ngIf"],["class","items-list",4,"ngIf"],[1,"item-count"],["variant","warning","title","Unsaved changes","message","Click Save in the header to apply your sidebar updates.",1,"unsaved-changes-banner",3,"compact"],["variant","info","title","No configurable items","message","There are no sidebar items available to configure for this account.",3,"compact"],["variant","info","title","No matches","message","No menu items match your search.",3,"compact"],[1,"items-list"],["class","item-row",4,"ngFor","ngForOf"],[1,"item-row"],[1,"item-info"],["aria-hidden","true",1,"fas","fa-grip-lines","item-icon"],[1,"item-title",3,"title"],["ariaLabel","Menu item state",1,"item-states",3,"responsive","options","ngModel","selectionChange"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"app-page-header",1)(2,"div",2)(3,"common-button",3),e.NdJ("onClick",function(){return n.save()}),e.qZA()()(),e.TgZ(4,"div",4),e._UZ(5,"app-loading-card",5),e.YNc(6,_n,18,6,"div",6),e.qZA()()),2&t&&(e.xp6(1),e.Q6J("gradient",!0)("applyPadding",!1)("sticky",!0)("showActions",!n.loading)("fullWidthSubtitle",!0),e.xp6(2),e.Q6J("severity",n.hasUnsavedChanges?"success":"secondary")("text",n.hasUnsavedChanges?"Save changes":"Saved")("loading",n.saving)("disabled",!n.hasUnsavedChanges||n.saving),e.xp6(2),e.Q6J("show",n.loading),e.xp6(1),e.Q6J("ngIf",!n.loading))},dependencies:[p.sg,p.O5,g.Fj,g.JJ,g.On,O.KE,O.hX,E.Nt,tn.D,nn.q,on.o,rn.N,sn.d],styles:[".header-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--header-actions-gap, 4px);flex-wrap:wrap}.config-card[_ngcontent-%COMP%]{background:#ffffff;border-radius:12px;border:1px solid #e8eaed;box-shadow:0 1px 3px #0000000a;
1transition:box-shadow .2s ease}.config-card[_ngcontent-%COMP%]:hover{box-shadow:0 2px 8px #00000014}.card-padding[_ngcontent-%COMP%]{padding:24px}.section-title[_ngcontent-%COMP%]{font-size:16px;font-weight:600;color:#1f2937;margin:0 0 4px}.section-subtitle[_ngcontent-%COMP%]{font-size:12px;color:#5f6368;margin:0 0 20px}.table-card[_ngcontent-%COMP%]{background:#ffffff;border-radius:20px;padding:24px;box-shadow:0 12px 35px #0f172a14;border:1px solid #eef2ff}.table-card__actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px;margin-bottom:24px}.table-card__toolbar[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:16px;flex-wrap:wrap}.table-card__search[_ngcontent-%COMP%]{flex:1;min-width:220px}.modern-search[_ngcontent-%COMP%]{width:100%;border-radius:9999px;border:1px solid #dbe2f1;padding:12px 20px;font-size:14px;transition:border .2s ease,box-shadow .2s ease;background:#f8f9ff}.modern-search[_ngcontent-%COMP%]:focus{outline:none;border-color:#4285f4;box-shadow:0 0 0 3px #4285f426;background:#ffffff}.empty-state-card[_ngcontent-%COMP%]{border-radius:20px;border:1px dashed #c7d2fe;padding:48px 32px;text-align:center;background:linear-gradient(180deg,#f8f9ff 0%,#ffffff 100%);color:#64748b;display:flex;flex-direction:column;align-items:center;gap:16px}.empty-state-card__icon[_ngcontent-%COMP%]{width:64px;height:64px;border-radius:50%;background:rgba(66,133,244,.1);display:flex;align-items:center;justify-content:center;color:#4285f4;font-size:24px}.empty-state-card__title[_ngcontent-%COMP%]{font-size:20px;font-weight:600;margin:0}.empty-state-card__description[_ngcontent-%COMP%]{max-width:420px;margin:0;color:#64748b;line-height:1.6;font-size:14px}.draggable-row[_ngcontent-%COMP%]{background:#f9fafb;border:1px solid #e8eaed;border-radius:10px;padding:16px;transition:all .2s ease;cursor:move}.draggable-row[_ngcontent-%COMP%]:hover{border-color:#d1d5db;box-shadow:0 2px 6px #0000000a}.draggable-row.cdk-drag-preview[_ngcontent-%COMP%]{box-shadow:0 4px 16px #00000029;opacity:.9}.draggable-row.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:.3}.drag-handle[_ngcontent-%COMP%]{color:#9ca3af;cursor:grab;padding:4px;flex-shrink:0}.drag-handle[_ngcontent-%COMP%]:active{cursor:grabbing}.sticky-update-button[_ngcontent-%COMP%]{position:sticky;bottom:0;background:rgba(255,255,255,.95);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);border-top:1px solid #e8eaed;padding:16px 24px;z-index:1020} .modern-table .p-datatable-header{border:none;padding:0} .modern-table .p-datatable-thead>tr>th{font-size:14px;font-weight:600;color:#475569;border:none;border-bottom:1px solid #e2e8f0;background:#f8f9ff} .modern-table .p-datatable-tbody>tr{transition:background-color .15s ease} .modern-table .p-datatable-tbody>tr:hover>td{background:#fafbff} .modern-table .p-datatable-tbody>tr:last-child>td{border-bottom:none} .modern-table .p-datatable-tbody>tr>td{border:none;border-bottom:1px solid #eef2ff;padding:12px 16px;font-size:14px;color:#1f2937;vertical-align:middle} .modern-table .p-datatable-tbody>tr>td.actions-cell, .modern-table .p-datatable-tbody>tr>td.status-toggle-cell{vertical-align:middle} .modern-table .p-paginator{border:none;background:transparent}.actions-cell[_ngcontent-%COMP%]{min-width:220px;white-space:nowrap;vertical-align:middle}.actions-cell--overflow[_ngcontent-%COMP%]{min-width:170px}.actions-container[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;gap:8px;flex-wrap:nowrap;white-space:nowrap}.status-toggle-cell[_ngcontent-%COMP%]{text-align:center;vertical-align:middle}.status-toggle-cell[_ngcontent-%COMP%] modern-toggle[_ngcontent-%COMP%]{display:inline-flex;vertical-align:middle}@media (max-width: 768px){.table-card[_ngcontent-%COMP%]{padding:16px}}.admin-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;flex-shrink:0;padding:2px 8px;background:linear-gradient(135deg,#ff9800 0%,#cc7a00 100%);color:#fff;font-size:10px;font-weight:700;letter-spacing:.5px;border-radius:10px;text-transform:uppercase;vertical-align:middle;line-height:1.2}.admin-setting-note[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:12px;padding:12px 20px;background:rgba(66,133,244,.04);border:1px solid rgba(66,133,244,.12);border-radius:16px}.admin-setting-note__icon[_ngcontent-%COMP%]{flex-shrink:0;margin-top:2px;color:#4285f4;font-size:16px}.admin-setting-note__content[_ngcontent-%COMP%]{flex:1;min-width:0}.admin-setting-note__title[_ngcontent-%COMP%]{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-bottom:6px}.admin-setting-note__title[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-size:12px;font-weight:600;color:#1f2937}.admin-setting-note__text[_ngcontent-%COMP%]{margin:0;font-size:12px;color:#5f6368;line-height:1.5}.admin-setting-note__text[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{font-weight:600;color:#2563eb;text-decoration:none}.admin-setting-note__text[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}.sidebar-control-content[_ngcontent-%COMP%]{position:relative;min-height:320px}[_nghost-%COMP%] .sidebar-control-content app-loading-card{position:absolute;inset:0;z-index:2;display:flex;align-items:center;justify-content:center;pointer-events:none}[_nghost-%COMP%] .sidebar-control-content app-loading-card .loading-container{min-height:0;pointer-events:auto}.sidebar-control-main[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px;padding-bottom:24px}.sidebar-control-card__header[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:16px}.sidebar-control-card__header[_ngcontent-%COMP%] .section-subtitle[_ngcontent-%COMP%]{margin-bottom:0}.item-count[_ngcontent-%COMP%]{flex-shrink:0;padding:4px 12px;border-radius:999px;background:#eef2ff;color:#4338ca;font-size:.8rem;font-weight:600;white-space:nowrap}.unsaved-changes-banner[_ngcontent-%COMP%]{display:block;margin-bottom:12px}.search-row[_ngcontent-%COMP%]{display:flex;margin-bottom:16px;padding-bottom:16px;border-bottom:1px solid #e5e7eb}.search-input[_ngcontent-%COMP%]{flex:1;min-width:220px}.items-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.item-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:12px 14px;border:1px solid #e5e7eb;border-radius:12px;background:#fff;transition:border-color .15s ease,background-color .15s ease}.item-row[_ngcontent-%COMP%]:hover{border-color:#c7d2fe;background:#fafaff}.item-info[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;min-width:0;flex:1}.item-icon[_ngcontent-%COMP%]{color:#4f46e5;font-size:.85rem;flex-shrink:0}.item-title[_ngcontent-%COMP%]{font-size:.9rem;font-weight:500;color:#1f2937;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.item-states[_ngcontent-%COMP%]{flex-shrink:0}"]}),i})()}];var hn=d(47957),mn=d(11145),Cn=d(25373),bn=d(33331);let xn=(()=>{class i{constructor(t){this.logger=t,console.log("AdminEcomModule loaded successfully!")}}
1return i.\u0275fac=function(t){return new(t||i)(e.LFG(u.Kf))},i.\u0275mod=e.oAB({type:i}),i.\u0275inj=e.cJS({imports:[p.ez,I.Bz.forChild(un),g.u5,g.UX,k.JF,hn.Bb,m.QW,L.p9,q.t,O.lN,j.Ps,E.c,A.Fk,z.Cq,U.AV,Z.nm,mn.E0,Cn.e,bn.y]}),i})()}}]);
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.