PageSourceSearch

https://www.mykeeper.com/_next/static/chunks/0jz.sb77u_lmh.js

js mykeeper.com collected 2026-09-24 09:37:44 UTC 58,983 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,893930,e=>{"use strict";var t=e.i(273340),r=e.i(122967);e.s(["useQuery",0,function(e,i){return(0,r.useBaseQuery)(e,t.QueryObserver,i)}])},325016,(e,t,r)=>{var i=0/0,n=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,u=parseInt,l=e.g&&e.g.Object===Object&&e.g,c="object"==typeof self&&self&&self.Object===Object&&self,d=l||c||Function("return this")(),h=Object.prototype.toString,f=Math.max,g=Math.min,p=function(){return d.Date.now()};function y(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(e){if("number"==typeof e)return e;if("symbol"==typeof(t=e)||t&&"object"==typeof t&&"[object Symbol]"==h.call(t))return i;if(y(e)){var t,r="function"==typeof e.valueOf?e.valueOf():e;e=y(r)?r+"":r}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var l=a.test(e);return l||o.test(e)?u(e.slice(2),l?2:8):s.test(e)?i:+e}t.exports=function(e,t,r){var i,n,s,a,o,u,l=0,c=!1,d=!1,h=!0;if("function"!=typeof e)throw TypeError("Expected a function");function b(t){var r=i,s=n;return i=n=void 0,l=t,a=e.apply(s,r)}function S(e){var r=e-u,i=e-l;return void 0===u||r>=t||r<0||d&&i>=s}function O(){var e,r,i,n=p();if(S(n))return v(n);o=setTimeout(O,(e=n-u,r=n-l,i=t-e,d?g(i,s-r):i))}function v(e){return(o=void 0,h&&i)?b(e):(i=n=void 0,a)}function E(){var e,r=p(),s=S(r);if(i=arguments,n=this,u=r,s){if(void 0===o)return l=e=u,o=setTimeout(O,t),c?b(e):a;if(d)return o=setTimeout(O,t),b(u)}return void 0===o&&(o=setTimeout(O,t)),a}return t=m(t)||0,y(r)&&(c=!!r.leading,s=(d="maxWait"in r)?f(m(r.maxWait)||0,t):s,h="trailing"in r?!!r.trailing:h),E.cancel=function(){void 0!==o&&clearTimeout(o),l=0,i=u=n=o=void 0},E.flush=function(){return void 0===o?a:v(p())},E}},866353,e=>{"use strict";var t=e.i(191788);e.i(325016);var r="u">typeof window?t.useLayoutEffect:t.useEffect;function i(e,i,n,s){let a=(0,t.useRef)(i);r(()=>{a.current=i},[i]),(0,t.useEffect)(()=>{let t=(null==n?void 0:n.current)??window;if(!(t&&t.addEventListener))return;let r=e=>{a.current(e)};return t.addEventListener(e,r,s),()=>{t.removeEventListener(e,r,s)}},[e,n,s])}function n(e){let i=(0,t.useRef)(()=>{throw Error("Cannot call an event handler while rendering.")});return r(()=>{i.current=e},[e]),(0,t.useCallback)((...e)=>{var t;return null==(t=i.current)?void 0:t.call(i,...e)},[i])}var s="u"<typeof window;e.s(["useCopyToClipboard",0,function(){let[e,r]=(0,t.useState)(null);return[e,(0,t.useCallback)(async e=>{if(!(null==navigator?void 0:navigator.clipboard))return console.warn("Clipboard not supported"),!1;try{return await navigator.clipboard.writeText(e),r(e),!0}catch(e){return console.warn("Copy failed",e),r(null),!1}},[])]},"useLocalStorage",0,function(e,r,a={}){let{initializeWithValue:o=!0}=a,u=(0,t.useCallback)(e=>a.serializer?a.serializer(e):JSON.stringify(e),[a]),l=(0,t.useCallback)(e=>{let t;if(a.deserializer)return a.deserializer(e);if("undefined"===e)return;let i=r instanceof Function?r():r;try{t=JSON.parse(e)}catch(e){return console.error("Error parsing JSON:",e),i}return t},[a,r]),c=(0,t.useCallback)(()=>{let t=r instanceof Function?r():r;if(s)return t;try{let r=window.localStorage.getItem(e);return r?l(r):t}catch(r){return console.warn(`Error reading localStorage key \u201C${e}\u201D:`,r),t}},[r,e,l]),[d,h]=(0,t.useState)(()=>o?c():r instanceof Function?r():r),f=n(t=>{s&&console.warn(`Tried setting localStorage key \u201C${e}\u201D even though environment is not a client`);try{let r=t instanceof Function?t(c()):t;window.localStorage.setItem(e,u(r)),h(r),window.dispatchEvent(new StorageEvent("local-storage",{key:e}))}catch(t){console.warn(`Error setting localStorage key \u201C${e}\u201D:`,t)}}),g=n(()=>{s&&console.warn(`Tried removing localStorage key \u201C${e}\u201D even though environment is not a client`);let t=r instanceof Function?r():r;window.localStorage.removeItem(e),h(t),window.dispatchEvent(new StorageEvent("local-storage",{key:e}))});(0,t.useEffect)(()=>{h(c())},[e]);let p=(0,t.useCallback)(t=>{t.key&&t.key!==e||h(c())},[e,c]);return i("storage",p),i("local-storage",p),[d,f,g]}])},206665,e=>{"use strict";
1e.s(["ProviderException",0,class extends Error{constructor(e){super(`Component must be wrapped with ${e}`),this.name="ProviderException"}}])},948123,e=>{"use strict";var t=e.i(465235),r=e.i(271585),i=e.i(451415),n=class extends r.Removable{#e;#t;#r;#i;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#r=e.mutationCache,this.#t=[],this.state=e.state||s(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#r.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||("pending"===this.state.status?this.scheduleGc():this.#r.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#n({type:"continue"})},r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=(0,i.createRetryer)({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(Error("No mutationFn found")),onFail:(e,t)=>{this.#n({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#n({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#r.canRun(this)});let n="pending"===this.state.status,s=!this.#i.canStart();try{if(n)t();else{this.#n({type:"pending",variables:e,isPaused:s}),this.#r.config.onMutate&&await this.#r.config.onMutate(e,this,r);let t=await this.options.onMutate?.(e,r);t!==this.state.context&&this.#n({type:"pending",context:t,variables:e,isPaused:s})}let i=await this.#i.start();return await this.#r.config.onSuccess?.(i,e,this.state.context,this,r),await this.options.onSuccess?.(i,e,this.state.context,r),await this.#r.config.onSettled?.(i,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(i,null,e,this.state.context,r),this.#n({type:"success",data:i}),i}catch(t){try{await this.#r.config.onError?.(t,e,this.state.context,this,r)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,r)}catch(e){Promise.reject(e)}try{await this.#r.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,r)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,r)}catch(e){Promise.reject(e)}throw this.#n({type:"error",error:t}),t}finally{this.#r.runNext(this)}}#n(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),t.notifyManager.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#r.notify({mutation:this,type:"updated",action:e})})}};function s(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}e.s(["Mutation",0,n,"getDefaultState",0,s])},945222,e=>{"use strict";var t=e.i(456298),r=e.i(84813),i=e.i(465235),n=e.i(895564),s=class extends n.Subscribable{constructor(e={}){super(),this.config=e,this.#s=new Map}#s;build(e,i,n){let s=i.queryKey,a=i.queryHash??(0,t.hashQueryKeyByOptions)(s,i),o=this.get(a);return o||(o=new r.Query({client:e,queryKey:s,queryHash:a,options:e.defaultQueryOptions(i),state:n,defaultOptions:e.getQueryDefaults(s)}),this.add(o)),o}add(e){this.#s.has(e.queryHash)||(this.#s.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=this.#s.get(e.queryHash);t&&(e.destroy(),t===e&&this.#s.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){i.notifyManager.batch(()=>
1{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#s.get(e)}getAll(){return[...this.#s.values()]}find(e){let r={exact:!0,...e};return this.getAll().find(e=>(0,t.matchQuery)(r,e))}findAll(e={}){let r=this.getAll();return Object.keys(e).length>0?r.filter(r=>(0,t.matchQuery)(e,r)):r}notify(e){i.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){i.notifyManager.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){i.notifyManager.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}};e.s(["QueryCache",0,s])},650828,e=>{"use strict";var t=e.i(465235),r=e.i(948123),i=e.i(456298),n=e.i(895564),s=class extends n.Subscribable{constructor(e={}){super(),this.config=e,this.#a=new Set,this.#o=new Map,this.#u=0}#a;#o;#u;build(e,t,i){let n=new r.Mutation({client:e,mutationCache:this,mutationId:++this.#u,options:e.defaultMutationOptions(t),state:i});return this.add(n),n}add(e){this.#a.add(e);let t=a(e);if("string"==typeof t){let r=this.#o.get(t);r?r.push(e):this.#o.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#a.delete(e)){let t=a(e);if("string"==typeof t){let r=this.#o.get(t);if(r)if(r.length>1){let t=r.indexOf(e);-1!==t&&r.splice(t,1)}else r[0]===e&&this.#o.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){let t=a(e);if("string"!=typeof t)return!0;{let r=this.#o.get(t),i=r?.find(e=>"pending"===e.state.status);return!i||i===e}}runNext(e){let t=a(e);if("string"!=typeof t)return Promise.resolve();{let r=this.#o.get(t)?.find(t=>
1t!==e&&t.state.isPaused);return r?.continue()??Promise.resolve()}}clear(){t.notifyManager.batch(()=>{this.#a.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#a.clear(),this.#o.clear()})}getAll(){return Array.from(this.#a)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,i.matchMutation)(t,e))}findAll(e={}){return this.getAll().filter(t=>(0,i.matchMutation)(e,t))}notify(e){t.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return t.notifyManager.batch(()=>Promise.all(e.map(e=>e.continue().catch(i.noop))))}};function a(e){return e.options.scope?.id}e.s(["MutationCache",0,s])},351773,e=>{"use strict";var t=e.i(456298);function r(e,{pages:t,pageParams:i}){let n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,i[n],i):void 0}function i(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}e.s(["hasNextPage",0,function(e,t){return!!t&&null!=r(e,t)},"hasPreviousPage",0,function(e,t){return!!t&&!!e.getPreviousPageParam&&null!=i(e,t)},"infiniteQueryBehavior",0,function(e){return{onFetch:(n,s)=>{let a=n.options,o=n.fetchOptions?.meta?.fetchMore?.direction,u=n.state.data?.pages||[],l=n.state.data?.pageParams||[],c={pages:[],pageParams:[]},d=0,h=async()=>{let s=!1,h=(0,t.ensureQueryFn)(n.options,n.fetchOptions),f=async(e,r,i)=>{let a;if(s)return Promise.reject();if(null==r&&e.pages.length)return Promise.resolve(e);let o=(a={client:n.client,queryKey:n.queryKey,pageParam:r,direction:i?"backward":"forward",meta:n.options.meta},(0,t.addConsumeAwareSignal)(a,()=>n.signal,()=>s=!0),a),u=await h(o),{maxPages:l}=n.options,c=i?t.addToStart:t.addToEnd;return{pages:c(e.pages,u,l),pageParams:c(e.pageParams,r,l)}};if(o&&u.length){let e="backward"===o,t={pages:u,pageParams:l},n=(e?i:r)(a,t);c=await f(t,n,e)}else{let t=e??u.length;do{let e=0===d?l[0]??a.initialPageParam:r(a,c);if(d>0&&null==e)break;c=await f(c,e),d++}while(d<t)}return c};n.options.persister?n.fetchFn=()=>n.options.persister?.(h,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},s):n.fetchFn=h}}}])},907642,339113,e=>{"use strict";var t=e.i(456298),r=e.i(945222),i=e.i(650828),n=e.i(879971),s=e.i(490140),a=e.i(465235),o=e.i(351773),u=class{#l;#r;#c;#d;#h;#f;#g;#p;constructor(e={}){this.#l=e.queryCache||new r.QueryCache,this.#r=e.mutationCache||new i.MutationCache,this.#c=e.defaultOptions||{},this.#d=new Map,this.#h=new Map,this.#f=0}mount(){this.#f++,1===this.#f&&(this.#g=n.focusManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#l.onFocus())}),this.#p=s.onlineManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#l.onOnline())}))}unmount(){this.#f--,0===this.#f&&(this.#g?.(),this.#g=void 0,this.#p?.(),this.#p=void 0)}isFetching(e){return this.#l.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#r.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#l.get(t.queryHash)?.state.data}ensureQueryData(e){let r=this.defaultQueryOptions(e),i=this.#l.build(this,r),n=i.state.data;return void 0===n?this.fetchQuery(e):(e.revalidateIfStale&&i.isStaleByTime((0,t.resolveStaleTime)(r.staleTime,i))&&this.prefetchQuery(r),Promise.resolve(n))}getQueriesData(e){return this.#l.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,r,i){let n=this.defaultQueryOptions({queryKey:e}),s=this.#l.get(n.queryHash),a=s?.state.data,o=(0,t.functionalUpdate)(r,a);if(void 0!==o)return this.#l.build(this,n).setData(o,{...i,manual:!0})}setQueriesData(e,t,r){return a.notifyManager.batch(()=>this.#l.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,r)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#l.get(t.queryHash)?.state}removeQueries(e){let t=this.#l;a.notifyManager.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let r=this.#l;return a.notifyManager.batch(()=>(r.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,r={}){let i={revert:!0,...r};return Promise.all(a.notifyManager.batch(()=>this.#l.findAll(e).map(e=>e.cancel(i)))).then(t.noop).catch(t.noop)}invalidateQueries(e,t={}){return a.notifyManager.batch(()=>
1(this.#l.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType==="none")?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t))}refetchQueries(e,r={}){let i={...r,cancelRefetch:r.cancelRefetch??!0};return Promise.all(a.notifyManager.batch(()=>this.#l.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let r=e.fetch(void 0,i);return i.throwOnError||(r=r.catch(t.noop)),"paused"===e.state.fetchStatus?Promise.resolve():r}))).then(t.noop)}fetchQuery(e){let r=this.defaultQueryOptions(e);void 0===r.retry&&(r.retry=!1);let i=this.#l.build(this,r);return i.isStaleByTime((0,t.resolveStaleTime)(r.staleTime,i))?i.fetch(r):Promise.resolve(i.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(t.noop).catch(t.noop)}fetchInfiniteQuery(e){return e.behavior=(0,o.infiniteQueryBehavior)(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(t.noop).catch(t.noop)}ensureInfiniteQueryData(e){return e.behavior=(0,o.infiniteQueryBehavior)(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return s.onlineManager.isOnline()?this.#r.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#l}getMutationCache(){return this.#r}getDefaultOptions(){return this.#c}setDefaultOptions(e){this.#c=e}setQueryDefaults(e,r){this.#d.set((0,t.hashKey)(e),{queryKey:e,defaultOptions:r})}getQueryDefaults(e){let r=[...this.#d.values()],i={};return r.forEach(r=>{(0,t.partialMatchKey)(e,r.queryKey)&&Object.assign(i,r.defaultOptions)}),i}setMutationDefaults(e,r){this.#h.set((0,t.hashKey)(e),{mutationKey:e,defaultOptions:r})}getMutationDefaults(e){let r=[...this.#h.values()],i={};return r.forEach(r=>{(0,t.partialMatchKey)(e,r.mutationKey)&&Object.assign(i,r.defaultOptions)}),i}defaultQueryOptions(e){if(e._defaulted)return e;let r={...this.#c.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return r.queryHash||(r.queryHash=(0,t.hashQueryKeyByOptions)(r.queryKey,r)),void 0===r.refetchOnReconnect&&(r.refetchOnReconnect="always"!==r.networkMode),void 0===r.throwOnError&&(r.throwOnError=!!r.suspense),!r.networkMode&&r.persister&&(r.networkMode="offlineFirst"),r.queryFn===t.skipToken&&(r.enabled=!1),r}defaultMutationOptions(e){return e?._defaulted?e:{...this.#c.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#l.clear(),this.#r.clear()}};e.s(["QueryClient",0,u],339113);let l=new u({defaultOptions:{queries:{refetchOnWindowFocus:!1,staleTime:6e5,refetchOnMount:!1,retry:!1}}});e.s(["getAppQueryClient",0,()=>l,"queryClient",0,l],907642)},17431,(e,t,r)=>{"use strict";var i=e.r(191788);function n(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var a={d:{f:s,r:function(){throw Error(n(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},o=Symbol.for("react.portal"),u=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){return"font"===e?"":"string"==typeof t?"use-credentials"===t?t:"":void 0}r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,r.createPortal=function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType)throw Error(n(299));return function(e,t,r){var i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:o,key:null==i?null:""+i,children:e,containerInfo:t,implementation:r}}(e,t,null,r)},r.flushSync=function(e){var t=u.T,r=a.p;try{if(u.T=null,a.p=2,e)return e()}finally{u.T=t,a.p=r,a.d.f()}},r.preconnect=function(e,t){"string"==typeof e&&(t=t?"string"==typeof(t=t.crossOrigin)?"use-credentials"===t?t:"":void 0:null,a.d.C(e,t))},r.prefetchDNS=function(e){"string"==typeof e&&a.d.D(e)},r.preinit=function(e,t){if("string"==typeof e&&t&&"string"==typeof t.as){var r=t.as,i=l(r,t.crossOrigin),n="string"==typeof t.integrity?t.integrity:void 0,s="string"==typeof t.fetchPriority?t.fetchPriority:void 0;"style"===r?a.d.S(e,"string"==typeof t.precedence?t.precedence:void 0,{crossOrigin:i,integrity:n,fetchPriority:s}):"script"===r&&a.d.X(e,{crossOrigin:i,integrity:n,fetchPriority:s,nonce:"string"==typeof t.nonce?t.nonce:void 0})}},r.preinitModule=function(e,t){if("string"==typeof e)if("object"==typeof t&&null!==t){if(null==t.as||"script"===t.as){var r=l(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:r,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0})}}else null==t&&a.d.M(e)},r.preload=function(e,t){if("string"==typeof e&&"object"==typeof t&&null!==t&&"string"==typeof t.as){var r=t.as,i=l(r,t.crossOrigin);a.d.L(e,r,{crossOrigin:i,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0,type:"string"==typeof t.type?t.type:void 0,fetchPriority:"string"==typeof t.fetchPriority?t.fetchPriority:void 0,referrerPolicy:"str
1ing"==typeof t.referrerPolicy?t.referrerPolicy:void 0,imageSrcSet:"string"==typeof t.imageSrcSet?t.imageSrcSet:void 0,imageSizes:"string"==typeof t.imageSizes?t.imageSizes:void 0,media:"string"==typeof t.media?t.media:void 0})}},r.preloadModule=function(e,t){if("string"==typeof e)if(t){var r=l(t.as,t.crossOrigin);a.d.m(e,{as:"string"==typeof t.as&&"script"!==t.as?t.as:void 0,crossOrigin:r,integrity:"string"==typeof t.integrity?t.integrity:void 0})}else a.d.m(e)},r.requestFormReset=function(e){a.d.r(e)},r.unstable_batchedUpdates=function(e,t){return e(t)},r.useFormState=function(e,t,r){return u.H.useFormState(e,t,r)},r.useFormStatus=function(){return u.H.useHostTransitionStatus()},r.version="19.2.5"},730943,(e,t,r)=>{"use strict";!function e(){if("u">typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),t.exports=e.r(17431)},731640,(e,t,r)=>{"use strict";r._=function(e){return e&&e.__esModule?e:{default:e}}},713584,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"HeadManagerContext",{enumerable:!0,get:function(){return i}});let i=e.r(731640)._(e.r(191788)).default.createContext({})},894470,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"warnOnce",{enumerable:!0,get:function(){return i}});let i=e=>{}},871650,(e,t,r)=>{"use strict";function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}r._=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var o=s?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,r&&r.set(e,n),n}},889129,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i={DecodeError:function(){return m},MiddlewareNotFoundError:function(){return v},MissingStaticPage:function(){return O},NormalizeError:function(){return b},PageNotFoundError:function(){return S},SP:function(){return p},ST:function(){return y},WEB_VITALS:function(){return s},execOnce:function(){return a},getDisplayName:function(){return d},getLocationOrigin:function(){return l},getURL:function(){return c},isAbsoluteUrl:function(){return u},isResSent:function(){return h},loadGetInitialProps:function(){return g},normalizeRepeatedSlashes:function(){return f},stringifyError:function(){return E}};for(var n in i)Object.defineProperty(r,n,{enumerable:!0,get:i[n]});let s=["CLS","FCP","FID","INP","LCP","TTFB"];function a(e){let t,r=!1;return(...i)=>(r||(r=!0,t=e(...i)),t)}let o=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,u=e=>o.test(e);function l(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function c(){let{href:e}=window.location,t=l();return e.substring(t.length)}function d(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function h(e){return e.finished||e.headersSent}function f(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function g(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await g(t.Component,t.ctx)}:{};let i=await e.getInitialProps(t);if(r&&h(r))return i;if(!i)throw Object.defineProperty(Error(`"${d(e)}.getInitialProps()" should resolve to an object. But found "${i}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});return i}let p="u">typeof performance,y=p&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class m extends Error{}class b extends Error{}class S extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}
1class O extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class v extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function E(e){return JSON.stringify({message:e.message,stack:e.stack})}},561722,e=>{"use strict";e.s(["ORG_UUID_COOKIE_NAME",0,"currentEnterpriseWhitelabelOrgUuid","SHOPIFY_CART_TOKEN_COOKIE_NAME",0,"shopify-cart-token","SHOPIFY_GUEST_CHECKOUT_EMAIL_COOKIE_NAME",0,"shopify-purchaser-guest-email"])},57487,e=>{"use strict";var t,r,i=((t={}).SUPER_ADMIN="org-super-a",t.ADMIN="org-a",t.EDITOR="org-e",t.MEMBER="org-m",t.GUEST="org-g",t),n=((r={}).FREE_SINGLE_ORG="b",r.PLUS_SINGLE_ORG="p",r.FREE_MULTI_ORG="flcb",r.PLUS_MULTI_ORG="flcp",r);e.s(["EnterpriseOrgType",()=>n,"GENERAL_ENTERPRISE_FAQ_URL",0,{BASE:"https://onlinememorials.zendesk.com/",LIVING_MEMORIAL:"https://onlinememorials.zendesk.com/hc/en-us/articles/15907341036562-What-is-a-Living-Memorial-Page",K1:"https://onlinememorials.zendesk.com/hc/en-us/articles/19414115782546-Important-Information-about-our-Redesigned-Online-Memorials"},"KeeperGTMConfig",0,{default:{containerId:"GTM-PQLHFXL",auth:"",preview:"",cookiesWin:""}},"OrgRole",()=>i])},3609,e=>{"use strict";var t=e.i(768285),r=e.i(57487);let i={[r.EnterpriseOrgType.PLUS_MULTI_ORG]:!0,[r.EnterpriseOrgType.PLUS_SINGLE_ORG]:!0,[r.EnterpriseOrgType.FREE_MULTI_ORG]:!1,[r.EnterpriseOrgType.FREE_SINGLE_ORG]:!1},n=(e,t=null)=>{if(0===e.length)return null;let i=t?e.find(e=>e.orgUuid===t):null;return i||(1===e.length?e[0]:e.find(e=>{let t;return(t=e?.permissions?.role)===r.OrgRole.EDITOR||t===r.OrgRole.ADMIN||t===r.OrgRole.SUPER_ADMIN})??e[0])},s=e=>e.isBranded&&null!==e.brands,a=e=>s(e)?n(e.brands??[],e.selectedBrandOrgUuid):null,o=[r.OrgRole.ADMIN,r.OrgRole.SUPER_ADMIN,r.OrgRole.EDITOR];e.s(["deriveAccountType",0,e=>{if(!e.currentUser)return"guest";if(s(e)){let[t]=e.brands??[];return t?.enterpriseMultiOrg||t?.parentOrgUuid?"enterpriseMultiOrg":"enterpriseSingleOrg"}return"keeper"},"deriveHasMultipleOrgs",0,e=>s(e)&&!!e.currentUser&&(e.brands?.length??0)>1,"deriveIsPlus",0,e=>!!e.currentUser&&(s(e)?i[e.brands?.[0]?.orgType]??!1:e.profile?.profileType===t.PROFILE_TYPE.PLUS),"derivePermissions",0,(e,t)=>({editAccess:e===r.OrgRole.EDITOR||e===r.OrgRole.ADMIN||e===r.OrgRole.SUPER_ADMIN||t,fullAdminAccess:e===r.OrgRole.ADMIN||e===r.OrgRole.SUPER_ADMIN||t}),"deriveRole",0,e=>e.currentUser?s(e)?a(e)?.permissions?.role??"keeperUser":e.profile?.isOrgProfile?"keeperBusinessUser":"keeperUser":"guest","deriveSelectedBrand",0,a,"getDefaultSelectedBrand",0,n,"resolveCurrentAccountUuid",0,e=>{let{brands:t,profileUuid:i,selectedBrandOrgUuid:n}=e;if(t&&t.length>0&&n){let e=t.find(e=>e.orgUuid===n),s=e?.permissions?.role;if(s===r.OrgRole.MEMBER)return i;if(o.includes(s))return n}return i},"resolveInUseAccountUuid",0,(e,t)=>o.includes(t)?e.selectedBrandOrgUuid:e.profileUuid,"resolveMicrositeOrgUuid",0,(e,t)=>e?.orgUuid||t||null,"resolveSessionOrgRefresh",0,e=>{let t=e.currentUser?.profileUuid;if(!t||!e.isBranded||null===e.brands)return null;let r=n(e.brands,e.selectedBrandOrgUuid);return r?.orgUuid?{profileUuid:t,selectedBrandOrgUuid:r.orgUuid,currentUserOrgRole:r.permissions?.role}:null}])},203828,(e,t,r)=>{t.exports=e.r(926990)},634167,e=>{"use strict";var t=e.i(699871),r=e.i(812817);let i=async e=>{try{if(!e)return null;let r=await t.backend.get(`/v1/user/${e}/orgs?exclude_members=0`);return r?.data}catch(e){return(0,r.handleApiException)(e)}},n=async({currentUserProfileUuid:e,orgUuid:i})=>{try{let{data:r}=await t.backend.put(`/v1/user/${e}/orgs/selected`,{org_uuid:i});return r}catch(e){return(0,r.handleApiException)(e)}},s=async({invitationToken:e})=>{try{let{data:r}=await t.backend.patch(`/v1/profile/keeper/invitations/${e}`);return r}catch(e){return(0,r.handleApiException)(e)}};e.s(["getCurrentUserBrands",0,i,"patchMemorialKeeperInvitationToken",0,s,"setCurrentSelectedOrgBrand",0,n])},820424,e=>{"use strict";var t=e.i(893930),r=e.i(634167),i=e.i(14191);e.s(["useCurrentUserBrands",0,e=>{let{data:n,isLoading:s,isFetching:a,isError:o,refetch:u}=(0,t.useQuery)({queryKey:[i.default.ORG_BRAND_SELECTED,e],queryFn:async()=>(0,r.getCurrentUserBrands)(e),enabled:!!e,retry:1,refetchOnMount:!1,refetchOnWindowFocus:!1});return{brands:n?.data,isLoading:s||a,isError:o,refetch:u}}])},859057,e=>{"use strict";let t=[{code:"floral_nature",labelKey:"label.components.iconSettings.iconCategoriesOptions.floralAndNature"},{code:"military",labelKey:"label.components.iconSettings.iconCategoriesOptions.military"},{code:"miscellaneous",labelKey:"label.components.iconSettings.iconCategoriesOptions.miscellaneous"},{code:"music",labelKey:"label.components.iconSettings.iconCategoriesOptions.music"},{code:"occupations_hobbies",labelKey:"label.components.iconSettings.iconCategoriesOptions.occupationsAndHobbies"},{code:"religious_cultural",labelKey:"label.components.iconSettings.iconCategoriesOptions.religiousAndCultural"},{code:"sports",labelKey:"label.components.iconSettings.iconCategoriesOptions.sports"}],r=[{code:"animals",labelKey:"label.components.themeSettings.themeCategories.animals"},{code:"flags_and_veteran",labelKey:"label.components.themeSettings.themeCategories.flagsAndVeteran"},{code:"music",labelKey:"label.components.themeSettings.themeCategories.music"},{code:"nature_flowers",labelKey:"label.components.themeSettings.themeCategories.natureAndFlowers"},{code:"religious_cultural",labelKey:"label.components.themeSettings.themeCategories.religiousAndCultural"},{code:"space",labelKey:"label.components.themeSettings.themeCategories.space"},{code:"misc",labelKey:"label.components.themeSettings.themeCategories.misc"}],i=e=>{let t=e?.assets?.theme;return t?.uuid&&t?.url?{uuid:t.uuid,url:t.url,xOffset:t.xOffset,yOffset:t.yOffset}:null},n=e=>{if(!e)return!1;if("boolean"==typeof e.colorable)return e.colorable;let t=e.url||e.assetUrl;return!!t&&/\.svg(?:[?#].*)?$/i.test(t)},s=(e,t)=>{let r=e?.url||e?.assetUrl||t?.imageUrl,i=e?.uuid||e?.userAssetUuid||t?.themeUuid;return r&&i?{cssClass:t?.cssClass||"",imageUrl:r,name:e?.name??t?.name??"",photographerName:t?.photographerName??"",photographerUrl:t?.photographerUrl??"",provider:e?.provider??t?.provider??"",providerImageId:t?.providerImageId??"",themeUuid:i,themeXOffset:e?.xOffset??t?.themeXOffset??0,themeYOffset:e?.yOffset??t?.themeYOffset??0}:null};e.s(["getProfileIconCategoryOptions",0,(e=[],r=e=>e)=>t.flatMap(t=>{let i=e.find(e=>e.code===t.code&&(e.tagUuid||e.tag_uuid)),n=i?.tagUuid||i?.tag_uuid;return n?[{value:n,label:r(t.labelKey)}]:[]}),"getSelectedEventThemeAsset",0,i,"getSelectedProfileIconAsset",0,e=>{let t=e?.assets?.icon;return t?.uuid&&t?.url?{uuid:t.uuid,url:t.url}:null},"getSelectedProfileThemeAsset",0,e=>{let t=e?.assets?.theme;return t?.uuid&&t?.url?{uuid:t.uuid,url:t.url,xOffset:t.xOffset,yOffset:t.yOffset}:null},"getThemeCategoryOptions",0,(e=[],t=e=>e)=>r.flatMap(r=>{let i=e.find(e=>e.code===r.code&&(e.tagUuid||e.tag_uuid)),n=i?.tagUuid||i?.tag_uuid;return n?[{value:n,label:t(r.labelKey)}]:[]}),"isColorableProfileIconAsset",0,n,"normalizeEventTheme",0,e=>{let t=s(i(e),e.theme)||e.theme;return{...e,theme:t??null}},"toProfileIconSelection",0,e=>{if(!e)return null;let t=e.url||e.assetUrl,r=e.uuid||e.userAssetUuid;return t&&r?{uuid:r,url:t,name:e.name||void 0,colorable:n(e)}:null},"toThemeSelection",0,s])},534012,e=>{"use strict";var t=e.i(859057),r=e.i(699871),i=e.i(812817);let n=e=>e?{...e,theme:(0,t.toThemeSelection)((0,t.getSelectedProfileThemeAsset)(e),e.theme)||e.theme||null}:e;async function s(e){try{let{data:t}=await r.backend.get(`v1.2/profile/username/${e}/settings`);return t}catch(e){return(0,i.handleApiException)({...e,response:null})}}async function a(e,t){try{let{data:i}=await r.backend.get(`/v1.1/profile/username/${encodeURIComponent(e)}`,t?{headers:{memorial_password:t}}:void 0);return{...i,data:n(i.data)}}catch(e){return(0,i.handleApiException)(e)}}async function o(e){if(!e)return null;try{let t=await r.backend.get(`/v1.1/profile/${e}`);return{...t.data,data:n(t.data.data||null)}}catch(e){return(0,i.handleApiException)(e)}}async function u({profileUuid:e}){if(!e)return null;try{let{data:t}=await r.backend.get(`/v1/profile/${e}/memento-have-sections`);return t}catch(e){return(0,i.handleApiException)(e)}}let l=async({query:e,isDead:t,isNaturalLanguage:n,excludeOrganization:s,includedOrgUuid:a,keeperOrgOnly:o,excludeBasicProfile:u,excludeLoggedUser:l,excludeAdminRole:c,includeBiography:d,orderBy:h="relevance",limit:f=100,page:g=1})=>{try{let i=new URLSearchParams({query:e,is_dead:t?.toString()||"",is_natural_language_search:n?.toString()||"",exclude_organization:s?.toString()||"",included_org_uuid:a||"",keeper_org_only:o?.toString()||"",exclude_basic_profile:u?.toString()||"",exclude_logged_user:l?.toString()||"",exclude_admin_role:c?.toString()||"",include_biography:d?.toString()||"",limit:f?.toString()||"100",page:g?.toString()||"1",order_by:h||"relevance"}),{data:p}=await r.backend.get(`/v1.2/profiles?${i.toString()}`);return p||null}catch(e){return(0,i.handleApiException)(e)}},c=async({query:e="",sort:t="most_recent",sortOrder:n,limit:s=16,page:a=1,categories:o,types:u})=>{try{let i={query:e,sort:t,limit:s,page:a};o?.length&&(i.categories=o),n&&(i.sortOrder=n),u?.length&&(i.types=u);let{data:l}=await r.backend.post("/v1.3/public/search/memorials",i);return l||null}catch(e){return(0,i.handleApiException)(e)}};
1e.s(["fetchMemorialsProfilesByQuery",0,c,"fetchProfile",0,o,"fetchProfileByQuery",0,l,"fetchProfileByUsername",0,a,"fetchProfileSectionContent",0,u,"fetchProfileSettingsByUsername",0,s])},238712,e=>{"use strict";var t=e.i(893930),r=e.i(534012),i=e.i(14191);e.s(["default",0,function(e,n){let{data:s,refetch:a,isLoading:o,isFetching:u,error:l}=(0,t.useQuery)({queryKey:[i.default.USER_BASIC_INFO,e],queryFn:()=>(0,r.fetchProfile)(e),enabled:!!e,retry:1,refetchOnMount:!0,refetchOnWindowFocus:!1,...!!n&&{initialData:n}});return{profile:s?.data,code:s?.code,isSuccess:s?.status==="success",refetchProfile:a,isLoading:o||u,error:l}}])},505888,e=>{"use strict";var t=e.i(191788),r=e.i(747748);let i=e=>e;function n(e,r=i){let s=t.default.useSyncExternalStore(e.subscribe,t.default.useCallback(()=>r(e.getState()),[e,r]),t.default.useCallback(()=>r(e.getInitialState()),[e,r]));return t.default.useDebugValue(s),s}let s=e=>{let t=(0,r.createStore)(e),i=e=>n(t,e);return Object.assign(i,t),i};e.s(["create",0,e=>e?s(e):s,"useStore",0,n])},949047,e=>{"use strict";var t=e.i(391398),r=e.i(203828),i=e.i(191788),n=e.i(820424),s=e.i(238712),a=e.i(505888),o=e.i(264221);let u=(0,i.createContext)(null);e.s(["SessionDataProvider",0,({children:e})=>{let{pathname:l}=(0,r.useRouter)(),c=(0,a.useStore)(o.sessionStore,e=>e.currentUser),d=(0,a.useStore)(o.sessionStore,e=>e.selectedBrandOrgUuid),h=(0,a.useStore)(o.sessionStore,e=>e.isBranded),{brands:f,isError:g,refetch:p}=(0,n.useCurrentUserBrands)(c?.profileUuid),{profile:y,error:m,refetchProfile:b}=(0,s.default)(c?.profileUuid),S=!!m;(0,i.useEffect)(()=>{c&&(g&&p(),S&&b())},[l,c,g,S,p,b]);let O=(0,i.useMemo)(()=>({input:{currentUser:c,isBranded:h,selectedBrandOrgUuid:d,brands:f??null,profile:y??null},brandsErrored:g,profileErrored:S,profile:y??null,refetchBrands:p}),[c,h,d,f,y,g,S,p]);return(0,t.jsx)(u.Provider,{value:O,children:e})},"useSessionData",0,()=>{let e=(0,i.useContext)(u);if(!e)throw Error("useSessionData must be used inside SessionDataProvider");return e}])},561733,292905,640494,230177,363278,e=>{"use strict";var t=e.i(191788),r=e.i(948123),i=e.i(465235),n=e.i(895564),s=e.i(456298),a=class extends n.Subscribable{#e;#y=void 0;#m;#b;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#S()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,s.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#m,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,s.hashKey)(t.mutationKey)!==(0,s.hashKey)(this.options.mutationKey)?this.reset():this.#m?.state.status==="pending"&&this.#m.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#m?.removeObserver(this)}onMutationUpdate(e){this.#S(),this.#O(e)}getCurrentResult(){return this.#y}reset(){this.#m?.removeObserver(this),this.#m=void 0,this.#S(),this.#O()}mutate(e,t){return this.#b=t,this.#m?.removeObserver(this),this.#m=this.#e.getMutationCache().build(this.#e,this.options),this.#m.addObserver(this),this.#m.execute(e)}#S(){let e=this.#m?.state??(0,r.getDefaultState)();this.#y={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#O(e){i.notifyManager.batch(()=>{if(this.#b&&this.hasListeners()){let t=this.#y.variables,r=this.#y.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#b.onSuccess?.(e.data,t,r,i)}catch(e){Promise.reject(e)}try{this.#b.onSettled?.(e.data,null,t,r,i)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#b.onError?.(e.error,t,r,i)}catch(e){Promise.reject(e)}try{this.#b.onSettled?.(void 0,e.error,t,r,i)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#y)})})}},o=e.i(285700);function u(e,r){let n=(0,o.useQueryClient)(r),[u]=t.useState(()=>new a(n,e));t.useEffect(()=>{u.setOptions(e)},[u,e]);let l=t.useSyncExternalStore(t.useCallback(e=>u.subscribe(i.notifyManager.batchCalls(e)),[u]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),c=t.useCallback((e,t)=>{u.mutate(e,t).catch(s.noop)},[u]);if(l.error&&(0,s.shouldThrowError)(u.options.throwOnError,[l.error]))throw l.error;return{...l,mutate:c,mutateAsync:l.mutate}}e.s(["useMutation",0,u],292905);var l=e.i(893930),c=e.i(699871),d=e.i(812817);let h=async({orgUuid:e})=>{try{let{data:t}=await c.backend.get(`/v1.2/org/${e}/setting`);return t}catch(e){return(0,d.handleApiException)(e)}};e.s(["fetchOrgSettings",0,h],640494),e.s([],230177);let f=async(e,t)=>{try{let{data:r}=await c.backend.patch(`/v1.2/org/${e}/setting`,t);return r}catch(e){return(0,d.handleApiException)(e)}},g=async(e,t)=>{try{let{data:r}=await c.backend.patch(`/v1/org/${e}`,t);return r}catch(e){return(0,d.handleApiException)(e)}};e.s(["updateOrgProfileBasicInfo",0,g,"updateOrgProfileSettings",0,f],363278);var p=e.i(14191);e.s(["default",0,function(e){let t=(0,o.useQueryClient)(),{data:r,isLoading:i,refetch:n}=(0,l.useQuery)({queryKey:[p.default.ORG_SETTINGS,e],queryFn:()=>h({orgUuid:e}),enabled:!!e&&""!==e}),{mutateAsync:s,isPending:a}=u({mutationKey:[p.REACT_MUTATIONS.ORG_SETTINGS,e],mutationFn:async t=>{await f(e,t)},onSuccess:async()=>{await t.invalidateQueries({queryKey:[p.default.ORG_SETTINGS,e]})}});return{orgSettingsData:r?.data,orgMerchandiseSettings:{tributeBtnEnabled:r?.data?.tributeBtnEnabled,tributeTreeEnabled:r?.data?.tributeTreeEnabled,tributeFlowerEnabled:r?.data?.tributeFlowerEnabled,tributeTreeUrl:r?.data?.tributeTreeUrl,tributeUrlType:r?.data?.tributeUrlType,bannerEnabled:r?.data?.bannerEnabled,bannerDonationLinkEnabled:r?.data?.bannerDonationLinkEnabled,bannerSendGiftBasketEnabled:r?.data?.bannerSendGiftBasketEnabled,bannerSendGiftBasketUrl:r?.data?.bannerSendGiftBasketUrl,bannerSendFlowersEnabled:r?.data?.bannerSendFlowersEnabled,bannerSendFlowersUrl:r?.data?.bannerSendFlowersUrl,bannerTreeEnabled:r?.data?.bannerTreeEnabled,bannerTreeUrl:r?.data?.bannerTreeUrl,bannerEcomEnabled:r?.data?.bannerEcomEnabled,bannerEcomUrl:r?.data?.bannerEcomUrl,bannerEcomBtnText:r?.data?.bannerEcomBtnText,remembranceStoreEnabled:r?.data?.remembranceStoreEnabled,keeperQrEnabled:r?.data?.keeperQrEnabled,sympathyGiftEnabled:r?.data?.sympathyGiftEnabled,sympathyGiftBasketEnabled:r?.data?.sympathyGiftBasketEnabled,sympathyGiftBasketUrl:r?.data?.sympathyGiftBasketUrl,sympathyGiftFlowersEnabled:r?.data?.sympathyGiftFlowersEnabled,sympathyGiftFlowersUrl:r?.data?.sympathyGiftFlowersUrl,sympathyGiftKeepsakesEnabled:r?.data?.sympathyGiftKeepsakesEnabled,sympathyGiftKeepsakesUrl:r?.data?.sympathyGiftKeepsakesUrl,sympathyGiftTreesEnabled:r?.data?.sympathyGiftTreesEnabled,sympathyGiftTreesUrl:r?.data?.sympathyGiftTreesUrl,sympathyGiftKeeperQrEnabled:r?.data?.sympathyGiftKeeperQrEnabled,sympathyGiftKeeperQrUrl:r?.data?.sympathyGiftKeeperQrUrl},fetchOrgProfileSettings:n,onOrgProfileSettingsUpdate:s,isFetching:i,isUpdating:a}}],561733)},701197,e=>{"use strict";e.s(["default",()=>y]);var t=e.i(768285),r=e.i(54440),i=e.i(869395),n=e.i(561722),s=e.i(456298),a=e.i(465235),o=e.i(285700),u=e.i(191788),l=e.i(14191);e.i(358460);var c=e.i(172681),d=e.i(3609),h=e.i(949047),f=e.i(438212),g=e.i(561733),p=e.i(866353);let y=({initialOrgBrandSettings:e,initialCurrentDomain:y,initialDefaultLanguage:m})=>
1{let b,S=(0,d.resolveMicrositeOrgUuid)(y,(0,i.getCookie)({name:n.ORG_UUID_COOKIE_NAME})),[O,v]=(0,p.useLocalStorage)(r.WHITELABEL_BRAND_ORG_UUID,S),E=(0,c.useSelectedBrandOrgUuid)(),[C,w]=(0,p.useLocalStorage)(r.SHALLOW_BRAND_OVERRIDE_URL,y?.customMemorialPath||""),R=(0,c.useSelectedBrand)(),U=(0,c.usePermissions)(),_=(0,c.useIsLoggedIn)(),{refetchBrands:M}=(0,h.useSessionData)(),B=(0,o.useQueryClient)(),{orgSettingsData:A,orgMerchandiseSettings:P}=(0,g.default)(S),T=(0,u.useMemo)(()=>[l.default.ORG_BRAND_SETTING,S],[S]),k=(0,u.useMemo)(()=>(0,s.hashKey)(T),[T]),I=(0,u.useCallback)(()=>B.getQueryData(T),[B,T]),L=(0,u.useCallback)(e=>{let t=a.notifyManager.batchCalls(e);return B.getQueryCache().subscribe(({query:e})=>{e.queryHash===k&&t()})},[B,k]),D=(0,u.useSyncExternalStore)(L,I,I),N=(0,u.useMemo)(()=>D?.data?{...e,...D.data}:e,[D?.data,e]),x=O?R:null,q=x?.permissions?.role??null,K=(0,u.useMemo)(()=>O&&y?.orgName?y.orgName:O?t.KEEPER_BRAND.OTHER:t.KEEPER_BRAND.KEEPER,[O,y?.orgName]),F=y?.orgNameShort||null,Q=F||K,G=y?.copyrightText||null,$=U.editAccess,j=(b=U.fullAdminAccess,q?b:_);return(0,u.useEffect)(()=>{S&&"null"!==S&&(v(S),(0,i.setCookie)({key:n.ORG_UUID_COOKIE_NAME,value:S,domain:window.location.host}))},[S]),(0,u.useEffect)(()=>{let e=(0,f.readShallowBrandOverrideUrl)(),{customMemorialPath:t}=y??{};S&&(""===t?null:t)!==e&&w(y?.customMemorialPath)},[S,y]),(0,u.useMemo)(()=>({mainOrgSettingInfo:A,orgMerchandiseSettings:P,orgDefaultLanguage:m??null,whiteLabeledBrandOrgUuid:O,whiteLabeledBrandSettingInfo:N,currentBrandName:K,currentBrandShortName:F,currentBrandDisplayName:Q,currentCopyrightText:G,shallowWhiteLabelBrandUrl:C,currentBrandOrgRole:q,selectedBrandOrgUuid:E,selectedBrandOrgData:x,isMountSinai:K.toLowerCase().includes("mount sinai")||"28abcdda-ebe3-11ee-a078-32289f50fe02"===O,isHMD:"40be45b7-29dc-11ef-9e60-02857839a3a9"===O,isBTSADV:"d023c041-29db-11ef-981c-02857839a3a9"===O,hasBrandOrgAdminRight:!!j,hasBrandOrgEditRight:!!$,onBrandsRolesRefetch:M}),[A,P,m,O,N,K,F,Q,G,C,q,E,x,j,$,M])}},736344,e=>{"use strict";let t=e.i(191788).useLayoutEffect;e.s(["default",0,t])},571890,944649,e=>{"use strict";e.s([],571890),e.s(["BrandContextProvider",()=>p,"useBrandActions",()=>k,"useCurrentBrandDisplayName",()=>O,"useCurrentBrandName",()=>S,"useCurrentBrandOrgRole",()=>E,"useCurrentCopyrightText",()=>v,"useHasBrandOrgAdminRight",()=>R,"useHasBrandOrgEditRight",()=>w,"useIsBTSADV",()=>T,"useIsHMD",()=>P,"useIsMountSinai",()=>A,"useMainOrgSettingInfo",()=>_,"useOrgDefaultLanguage",()=>B,"useOrgMerchandiseSettings",()=>M,"useSelectedBrandOrgData",()=>C,"useShallowWhiteLabelBrandUrl",()=>b,"useWhiteLabeledBrandOrgUuid",()=>m,"useWhiteLabeledBrandSettingInfo",()=>U],944649);var t=e.i(391398),r=e.i(191788),i=e.i(701197),n=e.i(736344),s=e.i(505888),a=e.i(206665),o=e.i(768285),u=e.i(747748);let l={mainOrgSettingInfo:null,orgMerchandiseSettings:null,orgDefaultLanguage:null,whiteLabeledBrandOrgUuid:null,whiteLabeledBrandSettingInfo:null,currentBrandName:o.KEEPER_BRAND.KEEPER,currentBrandShortName:null,currentBrandDisplayName:o.KEEPER_BRAND.KEEPER,currentCopyrightText:null,shallowWhiteLabelBrandUrl:"",currentBrandOrgRole:null,selectedBrandOrgData:null,isMountSinai:!1,isHMD:!1,isBTSADV:!1,hasBrandOrgAdminRight:!1,hasBrandOrgEditRight:!1},c={onBrandsRolesRefetch:async()=>null},d=e=>({mainOrgSettingInfo:e.mainOrgSettingInfo??null,orgMerchandiseSettings:e.orgMerchandiseSettings??null,orgDefaultLanguage:e.orgDefaultLanguage??null,whiteLabeledBrandOrgUuid:e.whiteLabeledBrandOrgUuid??null,whiteLabeledBrandSettingInfo:e.whiteLabeledBrandSettingInfo??null,currentBrandName:e.currentBrandName,currentBrandShortName:e.currentBrandShortName??null,currentBrandDisplayName:e.currentBrandDisplayName,currentCopyrightText:e.currentCopyrightText??null,shallowWhiteLabelBrandUrl:e.shallowWhiteLabelBrandUrl??"",currentBrandOrgRole:e.currentBrandOrgRole??null,selectedBrandOrgData:e.selectedBrandOrgData??null,isMountSinai:!!e.isMountSinai,isHMD:!!e.isHMD,isBTSADV:!!e.isBTSADV,hasBrandOrgAdminRight:!!e.hasBrandOrgAdminRight,hasBrandOrgEditRight:!!e.hasBrandOrgEditRight}),h=e=>({onBrandsRolesRefetch:e.onBrandsRolesRefetch}),f=Object.keys(l);e.i(358460);let g=(0,r.createContext)(void 0),p=({children:e,initialOrgBrandSettings:s,initialCurrentDomain:a,initialDefaultLanguage:o})=>{let p,y,m=(0,i.default)({initialOrgBrandSettings:s,initialCurrentDomain:a,initialDefaultLanguage:o}),b=(0,r.useRef)(void 0);b.current||(p=m?h(m):c,y={onBrandsRolesRefetch:()=>p.onBrandsRolesRefetch()},b.current=(0,u.createStore)(e=>({data:m?d(m):l,actions:y,setSnapshot:t=>{p=h(t);let r=d(t);e(e=>{let t;return(t=e.data,f.every(e=>t[e]===r[e]))?e:{data:r}})},reset:()=>{p=c,e({data:l})}})));let S=b.current;return(0,n.default)(()=>{S.getState().setSnapshot(m)},[S,m]),(0,n.default)(()=>()=>{S.getState().reset()},[S]),(0,t.jsx)(g.Provider,{value:S,children:e})},y=e=>
1(0,s.useStore)((()=>{let e=(0,r.useContext)(g);if(void 0===e)throw new a.ProviderException("BrandProvider");return e})(),e),m=()=>y(e=>e.data.whiteLabeledBrandOrgUuid),b=()=>y(e=>e.data.shallowWhiteLabelBrandUrl),S=()=>y(e=>e.data.currentBrandName),O=()=>y(e=>e.data.currentBrandDisplayName),v=()=>y(e=>e.data.currentCopyrightText),E=()=>y(e=>e.data.currentBrandOrgRole),C=()=>y(e=>e.data.selectedBrandOrgData),w=()=>y(e=>e.data.hasBrandOrgEditRight),R=()=>y(e=>e.data.hasBrandOrgAdminRight),U=()=>y(e=>e.data.whiteLabeledBrandSettingInfo),_=()=>y(e=>e.data.mainOrgSettingInfo),M=()=>y(e=>e.data.orgMerchandiseSettings),B=()=>y(e=>e.data.orgDefaultLanguage),A=()=>y(e=>e.data.isMountSinai),P=()=>y(e=>e.data.isHMD),T=()=>y(e=>e.data.isBTSADV),k=()=>y(e=>e.actions)},69652,e=>{"use strict";e.s(["useLocale",()=>n]),e.i(571890);var t=e.i(944649),r=e.i(203828),i=e.i(561733);let n=()=>{let{locale:e}=(0,r.useRouter)(),n=(0,t.useWhiteLabeledBrandOrgUuid)(),s=(0,t.useOrgDefaultLanguage)(),{orgSettingsData:a}=(0,i.default)(n),o=a?.defaultLanguage||s||"en-US";return{defaultLocale:o,locale:"default"===e?o:e,urlLocale:"default"===e?"":e}}},647858,e=>{"use strict";let t="NEXT_LOCALE",r="PREFERRED_LOCALE",i=()=>"https:"===window.location.protocol?"; secure":"",n=({cookieName:e,locale:t})=>{"u">typeof document&&t&&(document.cookie=`${e}=${encodeURIComponent(t)}; max-age=7776000; path=/; samesite=strict${i()}`)},s="en-US",a=/^[a-z]{2}-[A-Z]{2}$/,o=e=>{if(!e||"string"!=typeof e)return null;let t=e.trim();if(!t||"default"===t.toLowerCase())return null;let r=t.replace(/_/g,"-").split("-").filter(Boolean);return 0===r.length?null:1===r.length?r[0].toLowerCase():`${r[0].toLowerCase()}-${r[r.length-1].toUpperCase()}`},u=e=>Array.isArray(e)?[...new Set(e.map(e=>o(e)).filter(Boolean))]:[],l=(e,t)=>{let r=o(e);return r&&t.includes(r)?r:null};e.s(["NEXT_LOCALE_COOKIE",0,t,"PREFERRED_LOCALE_COOKIE",0,r,"getSupportedLocales",0,e=>u(e),"normalizeLocale",0,o,"resolveRequestLocale",0,({cookieLocale:e,userSavedLocale:t,acceptLanguageHeader:r,orgDefaultLocale:i,supportedLocales:n})=>{let c=u(n),d=c.filter(e=>a.test(e)),h=l(e,c);if(h)return h;let f=l(t,c);if(f)return f;let g=(({acceptLanguageHeader:e,supportedLocales:t})=>{if(!t.length)return null;let r=(!e?[]:e.split(",").map((e,t)=>{let[r,...i]=e.trim().split(";"),n=o(r);if(!n)return null;let s=i.find(e=>e.trim().startsWith("q=")),a=s?Number.parseFloat(s.trim().slice(2)):1;return{locale:n,quality:Number.isFinite(a)?a:0,index:t}}).filter(Boolean).sort((e,t)=>t.quality!==e.quality?t.quality-e.quality:e.index-t.index)).find(({locale:e})=>t.includes(e));return r?.locale||null})({acceptLanguageHeader:r,supportedLocales:d});if(g)return g;let p=l(i,c);if(p)return p;let y=l(s,c);return y||s},"setNextLocaleCookie",0,e=>{(()=>{if("u"<typeof document)return;let e=`${t}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; max-age=0; path=/; samesite=strict${i()}`,r=window.location.hostname.split(".").filter(Boolean),n=new Set;for(let e=0;e<=r.length-2;e+=1){let t=r.slice(e).join(".");t.includes(".")&&n.add(t)}document.cookie=e,n.forEach(t=>{document.cookie=`${e}; domain=${t}`,document.cookie=`${e}; domain=.${t}`})})(),n({cookieName:t,locale:e})},"setPreferredLocaleCookie",0,e=>{n({cookieName:r,locale:e})}])},14296,e=>{"use strict";e.i(634167),e.s([])},585758,e=>{"use strict";e.s(["useBrandedRouter",()=>n]);var t=e.i(203828),r=e.i(191788);e.i(571890);var i=e.i(944649);let n=()=>{let e=(0,i.useShallowWhiteLabelBrandUrl)(),n=(0,t.useRouter)(),s=(0,r.useCallback)((t,r)=>{let i="string"==typeof t&&/^https?:\/\//i.test(t);return{finalUrl:"string"!=typeof t||i?t:`${e}${t}`,finalAs:void 0!==r?"string"!=typeof r||i?r:`${e}${r}`:void 0}},[e]),a=(0,r.useCallback)((e,t,r)=>{let{finalUrl:i,finalAs:a}=s(e,t);return n.push(i,a,r)},[n,s]),o=(0,r.useCallback)((e,t,r)=>{let{finalUrl:i,finalAs:a}=s(e,t);return n.replace(i,a,r)},[n,s]);return{...n,push:a,replace:o}}},529794,e=>{"use strict";var t=e.i(699871),r=e.i(812817);let i=async(e,i)=>{try{if(!e||!i)throw Error("Email and password are required");let{data:r}=await t.backend.post("/v1/auth/user/login",{username:e,password:i},{timeout:15e3});return r}catch(e){return(0,r.handleApiException)(e)}},n=async({username:e,password:i,emailToImpersonate:n})=>{try{let{data:r}=await t.backend.post("/v1.3/auth/admin/login/masquerade",{username:e,password:i,email_to_impersonate:n});return r}catch(e){return(0,r.handleApiException)(e)}};e.s(["loginUser",0,i,"masqueradeUser",0,n])},183846,988457,700445,e=>{"use strict";var t=e.i(3609);e.s(["createLoginFlow",0,e=>async({email:r,password:i,navigateTo:n})=>{let{response:s,user:a,authRecord:o}=await e.withSessionMutationLock(async()=>{let t=await e.loginRequest(r,i);if(t?.code!==200)return{response:t};let n={email:r,...t.data},s={sessionId:e.createSessionId(),authEpoch:0,token:t.sessionToken,user:n,email:r};return await e.prepareSession(n),await e.clearQueryCache(),e.persistAuthRecord(s),e.publishSession(n),{response:t,user:n,authRecord:s}});if(!a||!o)return s;let u=()=>{let t=e.getAuthRecord();return t?.sessionId===o.sessionId&&t.user.profileUuid===a.profileUuid},l=!1;if(e.isBranded())try{let r=await e.ensureBrands(a.profileUuid),i=(0,t.getDefaultSelectedBrand)(r,e.getStoredSelectedBrandOrg());if(i){let t=!1;try{await e.updateSessionToken({profileUuid:a.profileUuid,selectedBrandOrgUuid:i.orgUuid,currentUserOrgRole:i.permissions?.role}),t=!0}catch{}t&&u()&&e.setSelectedBrandOrg(i.orgUuid)}l=r.length>1}catch{}else await e.prefetchProfile(a.profileUuid).catch(()=>{});return u()&&("workspace"===n?e.navigateToWorkspace({multiOrg:l,userLocale:a.language}):n&&"object"==typeof n&&e.navigateToUrl(n.url,a.language)),s}],183846),e.s(["createMasqueradeFlow",0,e=>async({staffEmail:t,password:r,emailToImpersonate:i,onPersisted:n})=>{let s=e.getAuthRecord();if(!s?.user.isStaffUser)throw Error("Cannot masquerade without an active staff session");
1let a=await e.masqueradeRequest({username:t,password:r,emailToImpersonate:i});if("success"!==a.status)return a;let o={...a.data,email:i};return await e.withSessionMutationLock(async()=>{let t=e.getAuthRecord();if(!t?.user.isStaffUser||t.sessionId!==s.sessionId)throw Error("Cannot masquerade because the staff session changed");await e.prepareSession(o),e.setAuthRecord({...t,sessionId:e.createSessionId(),authEpoch:0,email:i,user:o,selectedBrandProfileUuid:void 0,selectedBrandOrgUuid:void 0,selectedBrandOrgRole:void 0}),e.publishSession(o)}),n?.(),e.reload(),a}],988457),e.s(["createSelectBrandFlow",0,e=>async({profileUuid:t,orgUuid:r,role:i})=>{await e.updateSessionToken({profileUuid:t,selectedBrandOrgUuid:r,currentUserOrgRole:i}),e.setSelectedBrandOrg(r),e.navigateToDashboard()}],700445)},812941,e=>{"use strict";let t,r;var i,n=e.i(869395),s=e.i(561722),a=e.i(203828),o=e.i(907642),u=e.i(128633),l=e.i(438212);let{prepareSession:c,publishSession:d,persistSession:h,logout:f,adoptRemoteLogout:g}=(i={store:e.i(264221).sessionStore,clearSessionStorage:l.clearSessionStorage,purgeLegacySessionMirrors:l.purgeLegacySessionMirrors,readShallowBrandOverrideUrl:l.readShallowBrandOverrideUrl,setLoggedUserAuthCookie:n.setLoggedUserAuthCookie,deleteLoggedUserAuthCookie:n.deleteLoggedUserAuthCookieOnInvalidAuth,reportCookieDeletionError:e=>console.error("Failed to delete the logged-user auth cookie",e),clearShopifyCartCookies:()=>{let e=window.location.host;(0,n.setCookie)({key:s.SHOPIFY_CART_TOKEN_COOKIE_NAME,value:"",domain:e,maxAge:0}),(0,n.setCookie)({key:`${s.SHOPIFY_CART_TOKEN_COOKIE_NAME}-${e}`,value:"",domain:e,maxAge:0})},clearQueryCache:()=>o.queryClient.clear(),navigate:e=>a.default.push(e),withSessionMutationLock:u.withSessionMutationLock},t=async e=>{await i.setLoggedUserAuthCookie({uuid:e.profileUuid})},{prepareSession:t,publishSession:r=e=>{i.store.getState().actions.setCurrentUser(e)},persistSession:e=>i.withSessionMutationLock(async()=>{await t(e),r(e)}),logout:()=>i.withSessionMutationLock(async()=>{try{await i.deleteLoggedUserAuthCookie()}catch(e){i.reportCookieDeletionError(e);return}i.clearSessionStorage(),i.store.getState().actions.syncFromStorage(),i.clearShopifyCartCookies(),await i.clearQueryCache(),await i.navigate(`${i.readShallowBrandOverrideUrl()??""}/login`)}),adoptRemoteLogout:()=>i.withSessionMutationLock(async()=>{i.purgeLegacySessionMirrors(),i.store.getState().actions.syncFromStorage(),i.clearShopifyCartCookies(),await i.clearQueryCache(),await i.navigate(`${i.readShallowBrandOverrideUrl()??""}/login`)})});e.s(["adoptRemoteLogout",0,g,"logout",0,f,"persistSession",0,h,"prepareSession",0,c,"publishSession",0,d])},486908,e=>{"use strict";e.i(14296);var t=e.i(634167),r=e.i(128633),i=e.i(438212);let n=async({profileUuid:e,selectedBrandOrgUuid:n,currentUserOrgRole:s})=>(0,r.withSessionMutationLock)(async()=>{let r=(0,i.getAuthRecord)();if(!e||!n||!s||!r?.user||r.user.profileUuid!==e||r.selectedBrandProfileUuid===e&&r.selectedBrandOrgUuid===n&&r.selectedBrandOrgRole===s)return;if(r.user.isStaffUser||"org-m"===s||"org-g"===s)return void(0,i.setAuthRecord)({...r,authEpoch:(r.authEpoch??0)+1,selectedBrandProfileUuid:e,selectedBrandOrgUuid:n,selectedBrandOrgRole:s});let a=await (0,t.setCurrentSelectedOrgBrand)({currentUserProfileUuid:e,orgUuid:n}),o=(0,i.getAuthRecord)()??r;o.user.profileUuid===e&&(0,i.setAuthRecord)({...o,authEpoch:(o.authEpoch??0)+1,token:a.sessionToken,selectedBrandProfileUuid:e,selectedBrandOrgUuid:n,selectedBrandOrgRole:s})});e.s(["updateCurrentUserSessionToken",0,n])},358460,172681,e=>{"use strict";e.s([],358460),e.s(["useAccountType",()=>P,"useAssociatedOrgUuid",()=>x,"useAuthActions",()=>F,"useAuthToken",()=>U,"useCurrentAccountUuid",()=>q,"useCurrentUser",()=>C,"useHasMultipleOrgs",()=>k,"useInUseAccountUuid",()=>K,"useIsBranded",()=>M,"useIsGuestMode",()=>R,"useIsLoggedIn",()=>w,"useIsPlus",()=>T,"usePermissions",()=>L,"useProfileDetails",()=>N,"useRole",()=>A,"useSelectedBrand",()=>I,"useSelectedBrandOrgUuid",()=>_,"useSessionStatus",()=>D],172681);var t=e.i(69652),r=e.i(647858),i=e.i(203828),n=e.i(191788);e.i(14296);var s=e.i(634167),a=e.i(534012),o=e.i(14191);e.i(571890);var u=e.i(944649),l=e.i(585758),c=e.i(907642),d=e.i(505888),h=e.i(529794),f=e.i(128633),g=e.i(3609),p=e.i(183846),y=e.i(988457),m=e.i(700445),b=e.i(812941),S=e.i(949047),O=e.i(486908),v=e.i(438212),E=e.i(264221);let C=()=>(0,d.useStore)(E.sessionStore,e=>e.currentUser),w=()=>(0,d.useStore)(E.sessionStore,e=>null!==e.currentUser),R=()=>{let{query:e}=(0,i.useRouter)();return Object.keys(e).includes("view-as-guest")},U=()=>(w(),(0,v.getAuthRecord)()?.token??null),_=()=>(0,d.useStore)(E.sessionStore,e=>e.selectedBrandOrgUuid),M=()=>(0,d.useStore)(E.sessionStore,e=>e.isBranded),B=()=>(0,S.useSessionData)().input,A=()=>(0,g.deriveRole)(B()),P=()=>(0,g.deriveAccountType)(B()),T=()=>(0,g.deriveIsPlus)(B()),k=()=>(0,g.deriveHasMultipleOrgs)(B()),I=()=>(0,g.deriveSelectedBrand)(B()),L=()=>{let e=B();return(0,g.derivePermissions)((0,g.deriveRole)(e),!!e.currentUser?.isStaffUser)},D=()=>
1{let{input:e,brandsErrored:t,profileErrored:r}=(0,S.useSessionData)();return e.currentUser?(e.isBranded?null!==e.brands||t:null!==e.profile||r)?"ready":"resolving":"guest"},N=()=>(0,S.useSessionData)().profile,x=()=>{let e=N();return e?.associatedOrg?.orgUuid||e?.associatedOrg?.parentOrgUuid||null},q=()=>{let e=B();return(0,g.resolveCurrentAccountUuid)({brands:e.brands,profileUuid:e.currentUser?.profileUuid??null,selectedBrandOrgUuid:e.selectedBrandOrgUuid})},K=e=>{let t=C(),r=_();return(0,g.resolveInUseAccountUuid)({profileUuid:t?.profileUuid??null,selectedBrandOrgUuid:r},e)},F=()=>{let{push:e}=(0,l.useBrandedRouter)(),{push:d}=(0,i.useRouter)(),g=(0,u.useShallowWhiteLabelBrandUrl)(),{defaultLocale:S}=(0,t.useLocale)(),C=(0,n.useCallback)(t=>(0,p.createLoginFlow)({loginRequest:h.loginUser,createSessionId:v.createSessionId,getAuthRecord:v.getAuthRecord,persistAuthRecord:v.setAuthRecord,clearQueryCache:()=>c.queryClient.clear(),prepareSession:b.prepareSession,publishSession:b.publishSession,withSessionMutationLock:f.withSessionMutationLock,isBranded:()=>E.sessionStore.getState().isBranded,getStoredSelectedBrandOrg:()=>E.sessionStore.getState().selectedBrandOrgUuid,ensureBrands:async e=>{let{data:t}=await c.queryClient.ensureQueryData({queryKey:[o.default.ORG_BRAND_SELECTED,e],queryFn:()=>(0,s.getCurrentUserBrands)(e),revalidateIfStale:!0});return t??[]},updateSessionToken:O.updateCurrentUserSessionToken,setSelectedBrandOrg:e=>E.sessionStore.getState().actions.setSelectedBrandOrg(e),prefetchProfile:async e=>{await c.queryClient.ensureQueryData({queryKey:[o.default.USER_BASIC_INFO,e],queryFn:()=>(0,a.fetchProfile)(e),revalidateIfStale:!0})},navigateToWorkspace:({multiOrg:t,userLocale:i})=>{let n=i===S?"default":i;t?((0,r.setNextLocaleCookie)(`${i}`),(0,r.setPreferredLocaleCookie)(`${i}`),e({pathname:`${g}/brands`},void 0,{locale:n,shallow:!1})):e({pathname:`${g??""}/dashboard`},void 0,{locale:n,shallow:!1})},navigateToUrl:e=>{e?.includes("https")?d(e):e&&d({pathname:`${g}${e.replace("/obituaries","")}`})}})(t),[S,e,d,g]),w=(0,n.useCallback)(t=>(0,m.createSelectBrandFlow)({setSelectedBrandOrg:e=>E.sessionStore.getState().actions.setSelectedBrandOrg(e),updateSessionToken:O.updateCurrentUserSessionToken,navigateToDashboard:()=>e("/dashboard")})(t),[e]),R=(0,n.useCallback)(e=>(0,y.createMasqueradeFlow)({masqueradeRequest:h.masqueradeUser,createSessionId:v.createSessionId,getAuthRecord:v.getAuthRecord,setAuthRecord:v.setAuthRecord,prepareSession:b.prepareSession,publishSession:b.publishSession,withSessionMutationLock:f.withSessionMutationLock,reload:()=>window.location.reload()})(e),[]);return(0,n.useMemo)(()=>({login:C,logout:b.logout,selectBrand:w,masquerade:R,persistLogin:b.persistSession}),[C,b.logout,w,R,b.persistSession])}}]);

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.