"use strict";(self.webpackChunkfont_awesome_admin=self.webpackChunkfont_awesome_admin||[]).push([[85,587],{2:(e,t,n)=>{n.d(t,{A:()=>p});var s=n(609),o=n.n(s);var r=n(119),i=n(723),a=n(790);const c=(0,a.jsx)(r.A,{title:(0,i.__)("Whoops, this is embarrassing","font-awesome"),type:"warning",children:(0,a.jsx)("p",{children:(0,i.__)("Some unexpected error has occurred. There might be some additional diagnostic information in the JavaScript console.","font-awesome")})}),l=function(){return(0,a.jsx)("div",{className:"iVV55iNB320NJJLspy7m",children:c})};var d=n(458);class u extends o().Component{constructor(e){super(e),this.state={error:null,errorInfo:null}}componentDidCatch(e,t){console.group(d.V2),console.log(e),console.log(t),console.groupEnd(),this.setState({error:e,errorInfo:t})}render(){return this.state.error?(0,a.jsx)(l,{}):this.props.children}}const p=u},85:(e,t,n)=>{n.r(t),n.d(t,{CONFLICT_DETECTION_SCANNER_DURATION_MIN:()=>u,addPendingOption:()=>x,checkPreferenceConflicts:()=>O,chooseAwayFromKitConfig:()=>v,chooseIntoKitConfig:()=>R,preprocessResponse:()=>y,queryKits:()=>j,reportDetectedConflicts:()=>k,resetOptionsFormState:()=>S,resetPendingBlocklistSubmissionStatus:()=>C,resetPendingOptions:()=>T,resetUnregisteredClientsDeletionStatus:()=>w,setActiveAdminTab:()=>U,setConflictDetectionScanner:()=>F,submitPendingBlocklist:()=>b,submitPendingOptions:()=>A,submitPendingUnregisteredClientDeletions:()=>I,updateApiToken:()=>P,updatePendingBlocklist:()=>D,updatePendingUnregisteredClientsForDeletion:()=>N,userAttemptToStopScanner:()=>M});var s=n(83),o=n(87),r=n(458),i=n(723);function a(e,t=0){let n=null,s=null;if("string"!=typeof e)return null;if(t>=e.length)return null;try{return n=JSON.parse(e.slice(t)),{start:t,parsed:n}}catch(n){const o=e.indexOf("[",t+1),r=e.indexOf("{",t+1);if(-1===o&&-1===r)return null;s=-1!==o&&-1!==r?o0,i=s?c(n):{};s&&i&&(e.data=(0,o.get)(i,"parsed"));const a=(0,o.get)(i,"trimmed",""),l=(0,o.get)(e,"data.errors",null);if(e.status>=400){if(l)e.uiMessage=(0,r.Ay)({error:e.data,confirmed:t,trimmed:a});else{const n=(0,o.get)(e,"config.method","").toUpperCase(),s=(0,o.get)(e,"config.url"),i=e.status,a=(0,o.get)(e,"statusText"),c=(0,r.b3)(e),l=(0,r.cA)((0,o.get)(e,"headers",{})),d=(0,r.cA)((0,o.get)(e,"config.headers",{})),u=(0,o.get)(e,"data");e.uiMessage=(0,r.Ay)({confirmed:t,requestData:c,requestMethod:n,requestUrl:s,responseHeaders:l,requestHeaders:d,responseStatus:i,responseStatusText:a,responseData:u}),405===i&&(e.uiMessage=h)}return e}if(e.status<400&&e.status>=300)return t&&""===a||(e.uiMessage=(0,r.Ay)({error:null,confirmed:t,trimmed:a})),e;if(l){const n=!0;return e.falsePositive=!0,e.uiMessage=(0,r.Ay)({error:e.data,confirmed:t,falsePositive:n,trimmed:a}),e}{const n=(0,o.get)(e,"data.error",null);return n?(e.uiMessage=(0,r.Ay)({error:n,ok:!0,confirmed:t,trimmed:a}),e):(t||(e.uiMessage=(0,r.Ay)({error:null,ok:!0,confirmed:t,trimmed:a})),e)}}function T(){return{type:"RESET_PENDING_OPTIONS"}}function S(){return{type:"OPTIONS_FORM_STATE_RESET"}}function x(e){return function(t,n){const{options:s}=n();for(const[n,r]of(0,o.toPairs)(e))t(s[n]===r?{type:"RESET_PENDING_OPTION",change:{[n]:r}}:{type:"ADD_PENDING_OPTION",change:{[n]:r}})}}function N(e=[]){return{type:"UPDATE_PENDING_UNREGISTERED_CLIENTS_FOR_DELETION",data:e}}function w(){return{type:"DELETE_UNREGISTERED_CLIENTS_RESET"}}function C(){return{type:"BLOCKLIST_UPDATE_RESET"}}function I(){return function(e,t){const{apiNonce:n,apiUrl:s,unregisteredClientsDeletionStatus:r}=t(),i=(0,o.get)(r,"pending",null);if(!i||0===(0,o.size)(i))return;e({type:"DELETE_UNREGISTERED_CLIENTS_START"});const a=({uiMessage:t})=>{e({type:"DELETE_UNREGISTERED_CLIENTS_END",success:!1,message:t||f})};return d.delete(`${s}/conflict-detection/conflicts`,{data:i,headers:{"X-WP-Nonce":n}}).then(t=>{const{status:n,data:s,falsePositive:o}=t;o?a(t):e({type:"DELETE_UNREGISTERED_CLIENTS_END",success:!0,data:204===n?null:s,message:""})}).catch(a)}}function D(e=[]){return{type:"UPDATE_PENDING_BLOCKLIST",data:e}}function b(){return function(e,t){const{apiNonce:n,apiUrl:s,blocklistUpdateStatus:r}=t(),i=(0,o.get)(r,"pending",null);if(!i)return;e({type:"BLOCKLIST_UPDATE_START"});const a=({uiMessage:t})=>{e({type:"BLOCKLIST_UPDATE_END",success:!1,message:t||f})};return d.post(`${s}/conflict-detection/conflicts/blocklist`,i,{headers:{"X-WP-Nonce":n}}).then(t=>{const{status:n,data:s,falsePositive:o}=t;o?a(t):e({type:"BLOCKLIST_UPDATE_END",success:!0,data:204===n?null:s,message:""})}).catch(a)}}function O(){return function(e,t){e({type:"PREFERENCE_CHECK_START"});const{apiNonce:n,apiUrl:s,options:o,pendingOptions:r}=t(),i=({uiMessage:t})=>{e({type:"PREFERENCE_CHECK_END",success:!1,message:t||g})};return d.post(`${s}/preference-check`,{...o,...r},{headers:{"X-WP-Nonce":n}}).then(t=>{const{data:n,falsePositive:s}=t;s?i(t):e({type:"PREFERENCE_CHECK_END",success:!0,message:"",detectedConflicts:n})}).catch(i)}}function v({activeKitToken:e}){return function(t,n){const{releases:s}=n();t({type:"CHOOSE_AWAY_FROM_KIT_CONFIG",activeKitToken:e,concreteVersion:(0,o.get)(s,"latest_version_7")})}}function R(){return{type:"CHOOSE_INTO_KIT_CONFIG"}}function j(){return function(e,t){const{apiNonce:n,apiUrl:s,options:r}=t(),a=(0,o.get)(r,"kitToken",null);e({type:"KITS_QUERY_START"}),function(){if(window?.localStorage&&0!==localStorage.length)for(let e=localStorage.length-1;e>=0;e--){const t=localStorage.key(e);t.startsWith(l)&&localStorage.removeItem(t)}}();const c=({uiMessage:t})=>{e({type:"KITS_QUERY_END",success:!1,message:t||(0,i.__)("Failed to fetch kits","font-awesome")})},u=({uiMessage:t})=>{e({type:"OPTIONS_FORM_SUBMIT_END",success:!1,message:t||(0,i.__)("Couldn't update latest kit settings","font-awesome")})};return d.post(`${s}/api`,"query { me { kits { name version technologySelected licenseSelected minified token shimEnabled autoAccessibilityEnabled status }}}",{headers:{"X-WP-Nonce":n}}).then(t=>{if(t.falsePositive)return c(t);const l=(0,o.get)(t,"data.data");if(!(0,o.get)(l,"me"))return e({type:"KITS_QUERY_END",success:!1,message:(0,i.__)("Failed to fetch kits. Regenerate your API Token and try again.","font-awesome")});if(e({type:"KITS_QUERY_END",data:l,success:!0}),!a)return;const p=(0,o.get)(l,"me.kits",[]),f=(0,o.find)(p,{token:a});if(!f)return;const h={};return r.usePro&&"pro"!==f.licenseSelected?h.usePro=!1:r.usePro||"pro"!==f.licenseSelected||(h.usePro=!0),"svg"===r.technology&&"svg"!==f.technologySelected?(h.technology="webfont",h.pseudoElements=!0):"svg"!==r.technology&&"svg"===f.technologySelected&&(h.technology="svg",h.pseudoElements=!1),r.version!==f.version&&(h.version=f.version),r.compat&&!f.shimEnabled?h.compat=!1:!r.compat&&f.shimEnabled&&(h.compat=!0),e({type:"OPTIONS_FORM_SUBMIT_START"}),d.post(`${s}/config`,{options:{...r,...h}},{headers:{"X-WP-Nonce":n}}).then(t=>{const{data:n,falsePositive:s}=t;if(s)return u(t);e({type:"OPTIONS_FORM_SUBMIT_END",data:n,success:!0,message:(0,i.__)("Kit changes saved","font-awesome")})}).catch(u)}).catch(c)}}function A(){return function(e,t){const{apiNonce:n,apiUrl:s,options:o,pendingOptions:r}=t();e({type:"OPTIONS_FORM_SUBMIT_START"});const a=({uiMessage:t})=>{e({type:"OPTIONS_FORM_SUBMIT_END",success:!1,message:t||f})};return d.post(`${s}/config`,{options:{...o,...r}},{headers:{"X-WP-Nonce":n}}).then(t=>{const{data:n,falsePositive:s}=t;s?a(t):e({type:"OPTIONS_FORM_SUBMIT_END",data:n,success:!0,message:(0,i.__)("Changes saved","font-awesome")})}).catch(a)}}function P({apiToken:e=!1,runQueryKits:t=!1}){return function(n,s){const{apiNonce:o,apiUrl:r,options:a}=s();n({type:"OPTIONS_FORM_SUBMIT_START"});const c=({uiMessage:e})=>{n({type:"OPTIONS_FORM_SUBMIT_END",success:!1,message:e||f})};return d.post(`${r}/config`,{options:{...a,apiToken:e}},{headers:{"X-WP-Nonce":o}}).then(e=>{const{data:s,falsePositive:o}=e;if(o)c(e);else if(n({type:"OPTIONS_FORM_SUBMIT_END",data:s,success:!0,message:(0,i.__)("API Token saved","font-awesome")}),t)return n(j())}).catch(c)}}function M(){return{type:"USER_STOP_SCANNER"}}function k({nodesTested:e={}}){return(t,n)=>{const{apiNonce:s,apiUrl:r,unregisteredClients:i,showConflictDetectionReporter:a}=n();if(a){if((0,o.size)(e.conflict)>0){const n=Object.keys(e.conflict).reduce(function(t,n){return t[n]=e.conflict[n],t},{});t({type:"CONFLICT_DETECTION_SUBMIT_START",unregisteredClientsBeforeDetection:i,recentConflictsDetected:e.conflict});const a=({uiMessage:e})=>{t({type:"CONFLICT_DETECTION_SUBMIT_END",success:!1,message:e||f})};return d.post(`${r}/conflict-detection/conflicts`,n,{headers:{"X-WP-Nonce":s}}).then(e=>{const{status:n,data:s,falsePositive:r}=e;r?a(e):t({type:"CONFLICT_DETECTION_SUBMIT_END",success:!0,data:204===n||0===(0,o.size)(s)?null:s})}).catch(a)}t({type:"CONFLICT_DETECTION_NONE_FOUND"})}}}function U(e){return{type:"SET_ACTIVE_ADMIN_TAB",tab:e}}function F({enable:e=!0}){return function(t,n){const{apiNonce:s,apiUrl:o}=n(),r=e?"ENABLE_CONFLICT_DETECTION_SCANNER_END":"DISABLE_CONFLICT_DETECTION_SCANNER_END";t({type:e?"ENABLE_CONFLICT_DETECTION_SCANNER_START":"DISABLE_CONFLICT_DETECTION_SCANNER_START"});const i=({uiMessage:e})=>{t({type:r,success:!1,message:e||E})};return d.post(`${o}/conflict-detection/until`,e?Math.floor(new Date((new Date).valueOf()+1e3*u*60)/1e3):Math.floor(new Date/1e3)-p,{headers:{"X-WP-Nonce":s}}).then(e=>{const{status:n,data:s,falsePositive:o}=e;o?i(e):t({type:r,data:204===n?null:s,success:!0})}).catch(i)}}(0,i.__)("Couldn't snooze","font-awesome"),d.interceptors.response.use(e=>y(e),e=>{if(e.response)e.response=y(e.response),e.uiMessage=(0,o.get)(e,"response.uiMessage");else if(e.request){const t="fontawesome_request_noresponse",n={errors:{[t]:[m]},error_data:{[t]:{request:e.request}}};e.uiMessage=(0,r.Ay)({error:n})}else{const t="fontawesome_request_failed",n={errors:{[t]:[_]},error_data:{[t]:{failedRequestMessage:e.message}}};e.uiMessage=(0,r.Ay)({error:n})}return Promise.reject(e)})},119:(e,t,n)=>{n.d(t,{A:()=>f}),n(609);var s=n(556),o=n.n(s);const r={alert:"lX8h3LbX6kaLN7_hLhlw","alert-icon":"nx2ZqeD9AnYnPnKHAqKJ","alert-title":"ovRzytWn5jGccLKV78T9","alert-message":"M_C6Dj_EqhO8IuY52iA6","alert-action":"liWjpcvKZkKaYPsJjQPA","alert-warning":"MLwfZfK5uVZOtIHI1cdt"};var i=n(942),a=n.n(i),c=n(784),l=n(188),d=n(790);function u(e={}){switch(e.type){case"info":return(0,d.jsx)(c.g,{icon:l.iW_,title:"info",fixedWidth:!0});case"warning":default:return(0,d.jsx)(c.g,{icon:l.zpE,title:"warning",fixedWidth:!0});case"pending":return(0,d.jsx)(c.g,{icon:l.z1G,title:"pending",spin:!0,fixedWidth:!0});case"success":return(0,d.jsx)(c.g,{icon:l.Wcv,title:"success",fixedWidth:!0})}}function p(e={}){return(0,d.jsxs)("div",{className:a()(r.alert,r[`alert-${e.type}`]),role:"alert",children:[(0,d.jsx)("div",{className:r["alert-icon"],children:u(e)}),(0,d.jsxs)("div",{className:r["alert-message"],children:[(0,d.jsx)("h2",{className:r["alert-title"],children:e.title}),(0,d.jsx)("div",{className:r["alert-copy"],children:e.children})]})]})}p.propTypes={title:o().string.isRequired,type:o().oneOf(["info","warning","success","pending"]),children:o().oneOfType([o().object,o().string,o().arrayOf(o().element)]).isRequired};const f=p},192:(e,t,n)=>{n.d(t,{A:()=>m});var s=n(609),o=n(556),r=n.n(o),i=n(896),a=n(312),c=n(87),l=n(723),d=n(790);const u=86400,p=3600,f=60;function h(e){const t=Math.floor(e/u),n=Math.floor((e-t*u)/p),s=Math.floor((e-(t*u+n*p))/f),o=e-(t*u+n*p+s*f);return(0,c.dropWhile)([t,n,s,o].reduce((e,t,n)=>(0===n&&0!==t?e.push(t.toString()):e.push((0,c.padStart)(t.toString(),2,"0")),e),[]),e=>e.match(/^[0]+$/)).join(":")}function g(e){const t=e-Math.floor(new Date/1e3);return t<0?0:t}function m({addDescription:e,children:t}){const n=(0,i.d4)(e=>e.detectConflictsUntil),[o,r]=(0,s.useState)(g(n)),c=(0,i.wA)();return(0,s.useEffect)(()=>{let e=null;return g(n)>0?e=setTimeout(()=>r(g(n)),1e3):(r(h(0)),c({type:"CONFLICT_DETECTION_TIMER_EXPIRED"})),()=>e&&clearTimeout(e)},[n,o,c]),o<=0?null:(0,d.jsxs)("span",{className:a.A["conflict-detection-timer"],children:[h(o),!!e&&(o>60?/* translators: 1: space */ /* translators: 1: space */ (0,l.sprintf)((0,l.__)("%1$sminutes left to browse your site for trouble","font-awesome")," "):/* translators: 1: space */ /* translators: 1: space */ (0,l.sprintf)((0,l.__)("%1$sseconds left to browse your site for trouble","font-awesome")," ")),t]})}m.propTypes={addDescription:r().bool}},312:(e,t,n)=>{n.d(t,{A:()=>s});const s={"wrapper-div":"xAYNgmh_FT28wOZEe4og","submit-wrapper":"W3wz4Liah2EvWxtTBXN8","submit-status":"OpLLWfmNs6BXGmnmuinK",fail:"q0fCXPnTi1vRhNmP0IEt","fail-icon-container":"A2dLn8oZtVzuXngZMDRp",explanation:"xFoMk9Jc8Ir4n5Olcce1",success:"fQeEY3YNz4yh6R7vdi7J",icon:"JPBgwk6PxfiitLxJLE54","section-title":"VklefjWwawC59yrOPe3e","section-divider":"e8Vu3y2YBkuW8N9IhY2m","table-header":"gNYVG50hxMZs8Gqbj_T0","more-less":"dpYyb_l0GWlAiVkOmmYt","scanner-actions":"WJl_9YHKGkhUvtVwgVco","scanner-runstatus":"HBCEbIhIET1XISEYneSA",faPrimary:"ZXe2iyFqFThwx_UF4CBf","conflict-detection-timer":"HgLyUkphZYd8YsLSMJAZ",warning:"Gu2u4ZSZT25Yqm8zSogj","sr-only":"WOV9bdVrpJVdQWzhBnHZ",flex:"QN_KH8sqi5QFBDqaH1rI","flex-row":"bBMVcUUJf1GW7veG1Zic","flex-column":"pIa2BGO1ABMtYZY185Bf",relative:"h0koIl1zvME7toM3jUk9",status:"kWqY7l_wn27HmdUNz7ZY",good:"q3No9l7YMUEH1xvYTNfI","success-icon":"Y7M4JHzDp7jtCt6MonbK","conflict-icon":"a6qTuZmDiKS_FHgMZawo",conflict:"PwCQsIQEdGz9b0cOj3iA","warning-icon":"rw5FUVRrrdM17WyxcRZ9","space-left":"QEoklKhbCbwOUBs0cspa","input-checkbox-custom":"oWHnpotXuoOIlJoqkkgw","checked-icon":"NzRaF0U8aKPVtS6JIaK8","input-radio-custom":"gIUwcNcpOHhTKG4sTlfg","unchecked-icon":"iemYJRvB4tzF1xnuGiAw","option-label-explanation":"BFR5diS8tiViycbuTDVS"}},458:(e,t,n)=>{n.d(t,{Ay:()=>S,V2:()=>r,b3:()=>y,cA:()=>T});var s=n(87),o=n(723);const r=(0,o.__)("Font Awesome WordPress Plugin Error Report","font-awesome"),i=(0,o.__)("D'oh! That failed big time.","font-awesome"),a=(0,o.__)("There was an error attempting to report the error.","font-awesome"),c=(0,o.__)("Oh no! Your web browser could not reach your WordPress server.","font-awesome"),l=(0,o.__)("It looks like your web browser session expired. Try logging out and log back in to WordPress admin.","font-awesome"),d=(0,o.__)("The last request was successful, but it also returned the following error(s), which might be helpful for troubleshooting.","font-awesome"),u=(0,o.__)("Error","font-awesome"),p=(0,o.__)("WARNING: The last request contained errors, though your WordPress server reported it as a success. This usually means there's a problem with your theme or one of your other plugins emitting output that is causing problems.","font-awesome"),f=(0,o.__)("WARNING: The last response from your WordPress server did not include the confirmation header that should be in all valid Font Awesome responses. This is a clue that some code from another theme or plugin is acting badly and causing the wrong headers to be sent.","font-awesome"),h=(0,o.__)("CONFIRMED: The last response from your WordPress server included the confirmation header that is expected for all valid responses from the Font Awesome plugin's code running on your WordPress server.","font-awesome"),g=(0,o.__)("WARNING: Invalid Data Trimmed from Server Response","font-awesome"),m=(0,o.__)("WARNING: We expected the last response from the server to contain no data, but it contained something unexpected.","font-awesome"),_=(0,o.__)("Your WordPress server returned an error for that last request, but there was no information about the error.","font-awesome"),E=["requestMethod","responseStatus","responseStatusText","requestUrl","requestData","responseHeaders","responseData","requestHeaders"];function y(e={}){const t=(0,s.get)(e,"config.headers.Content-Type","").toLowerCase(),n=(0,s.get)(e,"config.data","");let o="";if("application/json"===t){try{const e=JSON.parse(n);"boolean"!=typeof(0,s.get)(e,"options.apiToken")&&(0,s.set)(e,"options.apiToken","REDACTED"),o=JSON.stringify(e)}catch(e){o=`ERROR while redacting request data: ${e.toString()}`}return o}return n}function T(e={}){const t={...e};for(const e in t)"x-wp-nonce"===e.toLowerCase()&&(t[e]="REDACTED");return t}const S=function(e){const{error:t=null,ok:n=!1,falsePositive:o=!1,confirmed:y=!1,expectEmpty:T=!1,trimmed:S=""}=e;console.group(r),n&&console.info(d),o&&console.info(p),y?console.info(h):console.info(f);const x=[];for(const t of E){const n=(0,s.get)(e,t);if(void 0!==n){const e=typeof n;if("string"===e||"number"===e)x.push(`${t}: ${n}`);else if("object"===e){x.push(`${t}:`);for(const e in n)x.push(`\t${e}: ${n[e].toString()}`)}else console.info(`Unexpected report content type '${e}' for ${t}:`,n)}}(0,s.size)(x)>0&&console.info(`Extra Info:\n${x.join("\n")}`),""!==S&&(console.group(g),T&&console.info(m),console.info(S),console.groupEnd());const N=null!==t?function(e={}){const t=Object.keys(e.errors||[]).map(t=>({code:t,message:(0,s.get)(e,`errors.${t}.0`),data:(0,s.get)(e,`error_data.${t}`)}));return 0===(0,s.size)(t)&&t.push({code:"fontawesome_unknown_error",message:a}),t.reduce((e,t)=>{console.group(u);const n=function(e){if(!(0,s.get)(e,"code"))return console.info(a),i;let t=null,n="";const o=(0,s.get)(e,"message");o&&(n=n.concat(`message: ${o}\n`),t=o);const r=(0,s.get)(e,"code");if(r)switch(n=n.concat(`code: ${r}\n`),r){case"rest_no_route":t=c;break;case"rest_cookie_invalid_nonce":t=l;break;case"fontawesome_unknown_error":t=i}const d=(0,s.get)(e,"data");if("string"==typeof d)n=n.concat(`data: ${d}\n`);else{const t=(0,s.get)(e,"data.status");t&&(n=n.concat(`status: ${t}\n`));const o=(0,s.get)(e,"data.trace");o&&(n=n.concat(`trace:\n${o}\n`))}n&&""!==n?console.info(n):console.info(e);const u=(0,s.get)(e,"data.request");u&&console.info(u);const p=(0,s.get)(e,"data.failedRequestMessage");return p&&console.info(p),t}(t);return console.groupEnd(),e||"previous_exception"===t.code?e:n},null)}(t):null;return t&&""===S&&y&&console.info(_),console.groupEnd(),N}},587:(e,t,n)=>{n.r(t),n.d(t,{CONFLICT_DETECTION_SHADOW_HOST_ID:()=>N,isConflictDetectionReporterMounted:()=>C,mountConflictDetectionReporter:()=>w}),n(609);var s=n(338),o=n(896),r=n(85),i=n(784),a=n(188),c=n(442),l=n(192),d=n(87),u=n(723),p=n(2),f=n(790);const h={running:{code:"Running",display:(0,u.__)("Running","font-awesome")},done:{code:"Done",display:(0,u.__)("Done","font-awesome")},submitting:{code:"Submitting",display:(0,u.__)("Submitting","font-awesome")},none:{code:"None",display:(0,u.__)("None","font-awesome")},error:{code:"Error",display:(0,u.__)("Error","font-awesome")},expired:{code:"Expired",display:(0,u.__)("Expired","font-awesome")},ready:{code:"Ready",display:(0,u.__)("Ready","font-awesome")},stopped:{code:"Stopped",display:(0,u.__)("Stopped","font-awesome")},stopping:{code:"Stopping",display:(0,u.__)("Stopping","font-awesome")},restarting:{code:"Restarting",display:(0,u.__)("Restarting","font-awesome")}},g={container:{position:"fixed",fontFamily:'"Helvetica Neue",Helvetica,Arial,sans-serif',right:"10px",bottom:"10px",width:"450px",height:"auto",maxHeight:"60%",border:"1px solid #CDD4DB",borderRadius:"3px",boxShadow:"1px 1px 5px 0 rgba(132,142,151,.3)",background:"#008DED",zIndex:"99",overflowY:"scroll",fontSize:"14px",lineHeight:"1.4em",color:"#fff"},header:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"5px 20px",color:"#CAECFF"},content:{width:"100%",padding:"0 20px 10px 20px",boxSizing:"border-box"},adminEyesOnly:{margin:"0",fontSize:"12px"},h1:{margin:".3em 0",fontSize:"14px"},h2:{margin:".3em 0",fontSize:"18px"},p:{margin:".5em 0"},link:{color:"#fff"},tally:{display:"flex",alignItems:"center",margin:".5em 0",textAlign:"center"},count:{flexBasis:"1em",marginRight:"5px",fontWeight:"600",fontSize:"20px"},timerRow:{display:"flex",alignItems:"center",backgroundColor:"#0064B1",padding:"10px 20px",color:"#fff",fontWeight:"600"},button:{margin:"0 0 0 10px",border:"0",padding:"5px",backgroundColor:"transparent",color:"#fff",opacity:".7",cursor:"pointer"},badness:{padding:"20px 25px",backgroundColor:"#FFC100",color:"#202529"}},m=(_=function(){const e=(0,o.wA)(),t=(0,o.d4)(e=>e.settingsPageUrl),n=`${t}&tab=ts`,s=(0,o.d4)(e=>e.activeAdminTab),p=window.location.href.startsWith(t)&&s===c.HM,m=(0,o.d4)(e=>e.userAttemptedToStopScanner),_=(0,o.d4)(e=>e.unregisteredClients),E=(0,o.d4)(e=>e.unregisteredClientDetectionStatus.unregisteredClientsBeforeDetection),y=(0,o.d4)(e=>e.unregisteredClientDetectionStatus.recentConflictsDetected),T=(0,o.d4)(e=>!e.showConflictDetectionReporter),S=(0,o.d4)(e=>T&&e.conflictDetectionScannerStatus.isSubmitting),x=(0,o.d4)(e=>e.conflictDetectionScannerStatus.hasSubmitted&&e.conflictDetectionScannerStatus.success),N=(0,o.d4)(e=>m&&!e.conflictDetectionScannerStatus.hasSubmitted),w=(0,o.d4)(e=>m&&!N&&e.conflictDetectionScannerStatus.success),C=(0,o.d4)(e=>{const{isSubmitting:t,hasSubmitted:n,success:s}=e.unregisteredClientDetectionStatus;return m?N?h.stopping:w?h.stopped:h.error:S?h.restarting:T?h.expired:x?h.ready:s&&0===(0,d.size)(_)?h.none:s?h.done:t?h.submitting:n?h.error:h.running}),I=(0,o.d4)(e=>e.unregisteredClientDetectionStatus.message),D=(0,f.jsxs)("div",{children:[(0,f.jsxs)("h2",{style:g.tally,children:[(0,f.jsx)("span",{children:(0,d.size)(_)})," ",(0,f.jsxs)("span",{children:[" ",(0,u.__)("Results to Review","font-awesome")]})]}),(0,f.jsx)("p",{style:g.p,children:p?(0,u.__)("Manage results or restart the scanner here on the Troubleshoot tab.","font-awesome"):(0,f.jsxs)(f.Fragment,{children:[(0,u.__)("Manage results or restart the scanner on the Troubleshoot tab.","font-awesome")," ",(0,f.jsx)("a",{href:n,style:g.link,children:(0,u.__)("Go","font-awesome")})]})})]}),b=(0,f.jsx)("div",{children:(0,f.jsx)("div",{style:g.status,children:(0,f.jsxs)("h2",{style:g.h2,children:[(0,f.jsx)(i.g,{icon:a.dB,size:"sm",spin:!0})," ",(0,f.jsx)("span",{children:C.display})]})})});return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)("div",{style:g.header,children:[(0,f.jsx)("h1",{style:g.h1,children:(0,u.__)("Font Awesome Conflict Scanner","font-awesome")}),(0,f.jsx)("p",{style:g.adminEyesOnly,children:(0,u.__)("only admins can see this box","font-awesome")})]}),(0,f.jsx)("div",{style:g.content,children:{None:(0,f.jsx)("div",{children:(0,f.jsxs)("div",{style:g.status,children:[(0,f.jsxs)("h2",{style:g.h2,children:[(0,f.jsx)(i.g,{icon:a.y3I,size:"sm"})," ",(0,f.jsx)("span",{children:(0,u.__)("All clear!","font-awesome")})]}),(0,f.jsx)("p",{style:g.p,children:(0,u.__)("No new conflicts found on this page.","font-awesome")})]})}),Running:(0,f.jsx)("div",{children:(0,f.jsx)("div",{style:g.status,children:(0,f.jsxs)("h2",{style:g.h2,children:[(0,f.jsx)(i.g,{icon:a.dB,size:"sm",spin:!0})," ",(0,f.jsxs)("span",{children:[(0,u.__)("Scanning","font-awesome"),"..."]})]})})}),Restarting:(0,f.jsx)("div",{children:(0,f.jsx)("div",{style:g.status,children:(0,f.jsxs)("h2",{style:g.h2,children:[(0,f.jsx)(i.g,{icon:a.dB,size:"sm",spin:!0})," ",(0,f.jsxs)("span",{children:[(0,u.__)("Restarting","font-awesome"),"..."]})]})})}),Ready:(0,f.jsx)("div",{children:(0,f.jsxs)("div",{children:[(0,f.jsxs)("h2",{style:g.h2,children:[(0,f.jsx)(i.g,{icon:a.Wcv,size:"sm"})," ",(0,u.__)("Proton pack charged!","font-awesome")]}),(0,f.jsx)("p",{style:g.p,children:(0,u.__)("Wander through the pages of your web site and this scanner will track progress.","font-awesome")})]})}),Submitting:b,Stopping:b,Done:(0,f.jsxs)("div",{children:[(0,f.jsx)("div",{style:g.status,children:(0,f.jsxs)("h2",{style:g.h2,children:[(0,f.jsx)(i.g,{icon:a.SGM,size:"sm"})," ",(0,f.jsx)("span",{children:(0,u.__)("Page scan complete","font-awesome")})]})}),(0,f.jsxs)("p",{style:g.tally,children:[(0,f.jsx)("span",{style:g.count,children:(0,d.size)(Object.keys(y).filter(e=>!(0,d.has)(E,e)))})," ",(0,f.jsx)("span",{children:(0,u.__)("new conflicts found on this page","font-awesome")})]}),(0,f.jsxs)("p",{style:g.tally,children:[(0,f.jsx)("span",{style:g.count,children:(0,d.size)(_)})," ",(0,f.jsx)("span",{children:"total found"}),p?(0,f.jsxs)("span",{children:[" (",(0,u.__)("manage conflicts here on the Troubleshoot tab","font-awesome"),")"]}):(0,f.jsxs)("span",{children:[" (",(0,f.jsx)("a",{href:n,style:g.link,children:(0,u.__)("manage","font-awesome")}),")"]})]})]}),Expired:D,Stopped:D,Error:(0,f.jsxs)("div",{children:[(0,f.jsxs)("h2",{style:g.h2,children:[(0,f.jsx)(i.g,{icon:a.B0L})," ",(0,f.jsx)("span",{children:(0,u.__)("Don't cross the streams! It would be bad.","font-awesome")})]}),(0,f.jsx)("p",{style:g.p,children:I})]})}[C.code]}),(0,f.jsxs)("div",{style:g.timerRow,children:[(0,f.jsx)("span",{children:(0,f.jsx)(l.A,{addDescription:!0,children:(0,f.jsx)("button",{style:g.button,title:(0,u.__)("Stop timer","font-awesome"),onClick:()=>(e((0,r.userAttemptToStopScanner)()),void e((0,r.setConflictDetectionScanner)({enable:!1}))),children:(0,f.jsx)(i.g,{icon:a.s0Q,size:"lg"})})})}),{Expired:(0,u.__)("Timer expired","font-awesome"),Stopped:(0,u.__)("Timer stopped","font-awesome"),Restarting:null}[C.code]]})]})},class extends p.A{render(){return(0,f.jsx)("div",{style:g.container,children:this.state.error?(0,f.jsxs)("div",{style:g.badness,children:[(0,f.jsx)(i.g,{icon:a.zpE}),(0,u.__)(" Whoops, this is embarrassing! Some unexpected error has occurred. There might be some additional diagnostic information in the JavaScript console.","font-awesome")]}):(0,f.jsx)(_,{})})}});var _,E=n(107),y=n(81),T=n.n(y),S=n(490),x=n.n(S);const N="font-awesome-plugin-conflict-detection-shadow-host";function w(e){x()(()=>{const t=document.createElement("DIV");t.setAttribute("id",N),document.body.appendChild(t);const n=t.attachShadow({mode:"open"});T()(n);const r=document.createElement("STYLE"),i=E.tT.css(),a=document.createTextNode(i);r.appendChild(a);const c=document.createElement("DIV"),l=(0,s.H)(c);n.appendChild(r),n.appendChild(c),l.render((0,f.jsx)(o.Kq,{store:e,children:(0,f.jsx)(m,{})}))})}function C(){const e=document.getElementById(N);return!!e&&!!e.shadowRoot}}}]);