1"use strict";(globalThis.rspackChunknotion_next=globalThis.rspackChunknotion_next||[]).push([[21928],{13717(e,t,a){function r(e){let{spaceStore:t,groupId:r}=e;return a(398652).C.createChildStore(t,(0,a(659341).S4)({spacePermissionGroupId:r,spaceId:t.id}))}function i(e){let{spaceStore:t,groupId:r,userId:i}=e;return a(291886).m.createChildStore(t,(0,a(867863).BZ)({spacePermissionGroupId:r,spaceId:t.id,userId:i}))}a.d(t,{A:()=>i,E:()=>r})},517215(e,t,a){let r=new(a(246382)).R({key:"spacedScopedUserChatPreference",namespace:a(274919).Bq,important:!0,trackingType:"necessary"});function i(e,t){let a=r.getState();r.setState({...a,[e]:{...null==a?void 0:a[e],...t}})}a.d(t,{O:()=>i},{C:r})},158131(e,t,a){function r(e){(0,a(104310).u)({event:{eventName:"agent_chat_history_item_clicked",eventProperties:{ai_session_id:e.threadId,from:e.from,model:e.model,chat_mode:a(562733).zI.state.chatPanelMode}}})}a.d(t,{T:()=>r})},318329(e,t,a){var r=()=>a(546605);function i(){return{currentScreen:"none",status:"not_started",isBackendConnected:!1,externalSourceName:void 0,emailAddresses:[],sessionId:a(92513).JW(),analyticsFrom:"unknown",isConnected:!1,isPersonalAuthComplete:!1,isDisconnecting:!1,isLoaded:!1,isNotionMailProhibited:!1}}class n extends r().Store{getInitialState(){return i()}startNewSetupSession(){this.setState({...this.state,sessionId:a(92513).JW()})}}let s=new n;(0,a(202146).exposeDebugValue)("notionMailAIConnectorStore",s),a.d(t,{K_:()=>i},{Lf:s})},930577(e,t,a){a.r(t),a.d(t,{DailyBriefDebugPanel:()=>c,dailyBriefDebugPanelStyles:()=>l});var r=a(635790),i=a(440302);let n={viewBox:"0 0 16 16",fittedViewBox:"2.57 0.97 10.86 13.25",svg:(0,i.jsx)("path",{d:"M7.285 1.077a.626.626 0 0 1 .863.868l-.08.098L6.73 3.375H8A5.425 5.425 0 1 1 2.575 8.8a.625.625 0 0 1 1.25 0A4.175 4.175 0 1 0 8 4.625H6.73L8.058 5.96l.08.097a.626.626 0 0 1-.966.784L4.778 4.435l-.077-.095a.625.625 0 0 1 .08-.788l2.406-2.395z"})},s=(0,a(104509).wt)("arrowCircleSpinCounterClockwiseSmall",n,"small"),o=(0,a(327219).YK)({resetPregeneration:{id:"dailyBriefDebugPanel.resetPregeneration",defaultMessage:"Reset pregeneration for daily brief"},updateTemplate:{id:"dailyBriefDebugPanel.updateTemplate",defaultMessage:"Update Now"},deleteTemplate:{id:"dailyBriefDebugPanel.deleteTemplate",defaultMessage:"Delete template page"},replaceTemplateWithLatest:{id:"dailyBriefDebugPanel.replaceTemplateWithLatest",defaultMessage:"Replace template with latest"},clearSuppression:{id:"dailyBriefDebugPanel.clearSuppression",defaultMessage:"Clear suppression"}}),l={debugPanel:{backgroundColor:a(632079).Tj.background.secondary,borderRadius:8,padding:12,marginTop:8,fontSize:11,fontFamily:"monospace",whiteSpace:"pre-wrap",wordBreak:"break-all",border:`1px solid ${a(632079).Tj.border.primary}`},debugPanelHeader:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:8,paddingBottom:8,borderBottom:`1px solid ${a(632079).Tj.border.primary}`},debugPanelHeaderTitle:{fontWeight:a(699422).Wy.semibold,fontSize:12},debugPanelTitle:{fontWeight:a(699422).Wy.semibold,marginBottom:4,color:a(632079).Tj.text.primary},debugPanelSection:{marginBottom:8},marginTop8:{marginTop:8},warningText:{marginTop:4,color:a(632079).Tj.yellow.text.primary,fontSize:10},tertiaryText:{color:a(632079).Tj.text.tertiary},errorText:{color:a(632079).Tj.red.text.primary},linkText:{color:a(632079).Tj.blue.text.primary,cursor:"pointer",textDecoration:"underline"}};function d(){let e=(0,a(327219).tz)(),t=(0,a(533992).v3)(),n=(0,a(579993).O$)(a(192314).AppStoreSidebarSpaceViewStore),s=(0,a(579993).O$)(a(192314).AppStoreSidebarSpaceStore),[d,c]=(0,r.useState)(!1),[u,p]=(0,r.useState)(!1),{updateAvailable:h,isChecking:g,checkForUpdate:f,userHasModifiedPage:m,templateLastEditedTime:_,lastUpdatedFromTemplate:b}=(0,a(227817).d)(),y=(0,a(579993).K8)(()=>{var e;return null==n||null==(e=n.getSettingsStore().getKeyValue("agent_personalization_settings"))||null==(e=e.daily_brief_prompt)?void 0:e.page_id},[n]),v=(0,r.useCallback)(async()=>{if(n){c(!0);try{let{maybeUpdateDailyBriefPageIfTemplateUpdated:e}=await a.e(8948).then(a.bind(a,736937));
1await e({environment:t,spaceViewStore:n,force:!0}),await f(!0)}finally{c(!1)}}},[t,n,f]),w=(0,r.useCallback)(()=>{if(!n||!s||!y)return;p(!0);let e=n.getSettings();(0,a(323517).createAndCommit)({environment:t,userAction:"DailyBriefDebugPanel.deleteTemplate",cellTarget:{spaceWithId:s.id},canUndo:!1,perform:r=>{var i;let o=a(970831).B.createChildStore(s,{table:"block",id:y,spaceId:s.id});o.isDefined()&&a(281466).oD({environment:t,blocks:[o],transaction:r,permanentlyDelete:!0}),a(214252).AG(n,r,{agent_personalization_settings:{...(null==e?void 0:e.agent_personalization_settings)||{},daily_brief_prompt:{...(null==e||null==(i=e.agent_personalization_settings)?void 0:i.daily_brief_prompt)||{},page_id:null,last_updated_from_template:null}}})}}),p(!1)},[t,n,s,y]);return(0,i.jsxs)("div",{style:l.debugPanelSection,children:[(0,i.jsxs)(a(4458).fI,{justifyContent:"space-between",alignItems:"center",marginBottom:4,children:[(0,i.jsx)("div",{style:l.debugPanelTitle,children:"Template Update:"}),(0,i.jsxs)(a(4458).fI,{gap:2,children:[y&&h?(0,i.jsx)(a(51831).m_,{content:()=>d?"Updating...":e.formatMessage(o.replaceTemplateWithLatest),children:t=>(0,i.jsx)(a(374533).K,{...t,icon:a(641863).F,ariaLabel:e.formatMessage(o.replaceTemplateWithLatest),onClick:v,disabled:d,variant:"plain",colorVariant:"tertiary",style:d?{opacity:.5}:void 0})}):void 0,y?(0,i.jsx)(a(51831).m_,{content:()=>u?"Deleting...":e.formatMessage(o.deleteTemplate),children:t=>(0,i.jsx)(a(374533).K,{...t,icon:a(822973).trashSmallIcon,ariaLabel:e.formatMessage(o.deleteTemplate),onClick:w,disabled:u,variant:"plain",colorVariant:"tertiary",style:u?{opacity:.5}:void 0})}):void 0]})]}),(0,i.jsxs)("div",{children:["template_page_id: ",y??"Not set"]}),(0,i.jsxs)("div",{children:["updateAvailable: ",g?"checking...":String(h)]}),(0,i.jsxs)("div",{children:["userHasModifiedPage: ",String(m??!1)]}),_?(0,i.jsxs)("div",{children:["templateLastEditedTime: ",new Date(_).toLocaleString()]}):void 0,b?(0,i.jsxs)("div",{children:["lastUpdatedFromTemplate: ",new Date(b).toLocaleString()]}):void 0,h&&m?(0,i.jsxs)("div",{style:l.marginTop8,children:[(0,i.jsx)(a(64960).Ay,{onClick:v,disabled:d,style:{fontSize:11,padding:"4px 8px",opacity:d?.5:1},children:d?"Updating...":e.formatMessage(o.updateTemplate)}),(0,i.jsx)("div",{style:l.warningText,children:"â ï¸ User has modified page - auto-sync skipped"})]}):void 0]})}function c(){let{navigate:e}=(0,r.useContext)(a(44894).E),t=(0,a(533992).v3)(),n=(0,a(327219).tz)(),c=(0,a(579993).O$)(a(192314).AppStoreSidebarSpaceViewStore),u=(0,a(579993).K8)(()=>{var e,t;
1let r=null==c||null==(e=c.getSettingsStore().getKeyValue("agent_personalization_settings"))?void 0:e.daily_brief_prompt,i="not_set",n=null==r?void 0:r.latest_daily_brief_thread_id;if(n&&c){let e=a(174148).E.createChildStore(c,{table:"thread",id:n,spaceId:c.getSpaceId()});i=e.isDefined()&&e.getAlive()?"exists":"does_not_exist"}return{dailyBriefPageInfo:r,threadStatus:i,skillPageId:null==c||null==(t=c.getSettingsStore().getKeyValue("ai_prompts"))||null==(t=t.default_skill_pages_by_type)?void 0:t.create_daily_brief}},[c]),[p,h]=(0,r.useState)(!1),g=(0,r.useCallback)(()=>{if(!c)return;let e=c.getSpaceId();h(!0);let r=c.getSettings(),{serverCommitResult:i}=(0,a(323517).createAndCommit)({environment:t,userAction:"DailyBriefDebugPanel.resetPregeneration",cellTarget:{spaceWithId:e},canUndo:!1,perform:e=>{var t;let i=null==r?void 0:r.ai_prompts,{create_daily_brief:n,...s}=(null==i?void 0:i.default_skill_pages_by_type)??{};a(214252).AG(c,e,{agent_personalization_settings:{...(null==r?void 0:r.agent_personalization_settings)||{},daily_brief_prompt:{...(null==r||null==(t=r.agent_personalization_settings)?void 0:t.daily_brief_prompt)||{},latest_daily_brief_thread_id:null,generated_for_date:null,status:null,suppressed_until:null,page_id:null,tooltip_dismissed_at:null,sidebar_daily_brief_dismissed_at:null}},ai_prompts:{...i??{},default_skill_pages_by_type:s}})}});i.then(()=>{h(!1)})},[t,c]),[f,m]=(0,r.useState)(!1),_=(0,r.useCallback)(()=>{if(!c)return;let e=c.getSpaceId();m(!0);let r=c.getSettings(),{serverCommitResult:i}=(0,a(323517).createAndCommit)({environment:t,userAction:"DailyBriefDebugPanel.simulateNewDay",cellTarget:{spaceWithId:e},canUndo:!1,perform:e=>{var t;a(214252).AG(c,e,{agent_personalization_settings:{...(null==r?void 0:r.agent_personalization_settings)||{},daily_brief_prompt:{...(null==r||null==(t=r.agent_personalization_settings)?void 0:t.daily_brief_prompt)||{},latest_daily_brief_thread_id:null,generated_for_date:null,status:null,suppressed_until:null}}})}});i.then(()=>{m(!1)})},[t,c]),b=(0,r.useCallback)(r=>{e({environment:t,url:(0,a(392096).Gm)({url:a(168962).JZ.chat,query:{t:(0,a(83388).Xw)(r)}})})},[t,e]);return(0,i.jsxs)("div",{style:l.debugPanel,children:[(0,i.jsxs)("div",{style:l.debugPanelHeader,children:[(0,i.jsx)("div",{style:l.debugPanelHeaderTitle,children:"Debug Panel"}),(0,i.jsxs)(a(4458).fI,{gap:4,children:[(0,i.jsx)(a(64960).Ay,{onClick:_,disabled:f,style:{fontSize:10,padding:"2px 6px",opacity:f?.5:1},children:f?"...":"New Day"}),(0,i.jsx)(a(51831).m_,{content:()=>p?"Saving...":n.formatMessage(o.resetPregeneration),children:e=>(0,i.jsx)(a(374533).K,{...e,icon:s,ariaLabel:n.formatMessage(o.resetPregeneration),onClick:g,disabled:p,variant:"plain",colorVariant:"tertiary",style:p?{opacity:.5}:void 0})})]})]}),u?(0,i.jsx)("div",{children:(0,i.jsxs)("div",{style:l.debugPanelSection,children:[(0,i.jsx)("div",{style:l.debugPanelTitle,children:"Daily Brief State (SpaceView):"}),u.dailyBriefPageInfo?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(a(4458).fI,{alignItems:"center",gap:4,children:["status: ",(0,i.jsxs)("select",{value:u.dailyBriefPageInfo.status??"",onChange:e=>{let r=e.target.value,i="idle"===r||"generating"===r||"ready"===r||"viewed"===r||"attempt_failed"===r?r:void 0,n=null==c?void 0:c.getSettings(),s=null==c?void 0:c.getSpaceId();(0,a(323517).createAndCommit)({environment:t,userAction:"DailyBriefDebugPanel.setStatus",cellTarget:s?{spaceWithId:s}:void 0,canUndo:!1,perform:e=>{var t;c&&a(214252).AG(c,e,{agent_personalization_settings:{...(null==n?void 0:n.agent_personalization_settings)||{},daily_brief_prompt:{...(null==n||null==(t=n.agent_personalization_settings)?void 0:t.daily_brief_prompt)||{},status:i}}})}})},style:{backgroundColor:a(632079).Tj.background.secondary,color:a(632079).Tj.text.primary,border:`1px solid ${a(632079).Tj.border.primary}`,borderRadius:4,padding:"2px 4px",fontSize:11},children:[(0,i.jsx)("option",{value:"",children:"not set"}),(0,i.jsx)("option",{value:"idle",children:"idle"}),(0,i.jsx)("option",{value:"generating",children:"generating"}),(0,i.jsx)("option",{value:"ready",children:"ready"}),(0,i.jsx)("option",{value:"viewed",children:"viewed"}),(0,i.jsx)("option",{value:"attempt_failed",children:"attempt_failed"})]})]}),(0,i.jsxs)(a(4458).fI,{alignItems:"center",gap:4,children:["suppressed_until: ",void 0!==u.dailyBriefPageInfo.suppressed_until&&null!==u.dailyBriefPageInfo.suppressed_until?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{children:-1===u.dailyBriefPageInfo.suppressed_until?"indefinitely":new Date(u.dailyBriefPageInfo.suppressed_until).toLocaleStr
1ing()}),(0,i.jsx)(a(374533).K,{icon:a(25094).xMarkSmallIcon,ariaLabel:n.formatMessage(o.clearSuppression),onClick:()=>{(0,a(376608).G)({environment:t})},variant:"plain",colorVariant:"tertiary",size:"sm"})]}):(0,i.jsx)("span",{style:l.tertiaryText,children:"not set"})]}),(0,i.jsxs)("div",{children:["latest_thread_id: ","not_set"===u.threadStatus?(0,i.jsx)("span",{style:l.tertiaryText,children:"Not set"}):"does_not_exist"===u.threadStatus?(0,i.jsx)("span",{style:l.errorText,children:`Does not exist (${u.dailyBriefPageInfo.latest_daily_brief_thread_id})`}):(0,i.jsx)("span",{role:"button",tabIndex:0,style:l.linkText,onClick:()=>{var e;let t=null==(e=u.dailyBriefPageInfo)?void 0:e.latest_daily_brief_thread_id;t&&b(t)},onKeyDown:e=>{if("Enter"===e.key||" "===e.key){var t;e.preventDefault();let a=null==(t=u.dailyBriefPageInfo)?void 0:t.latest_daily_brief_thread_id;a&&b(a)}},children:u.dailyBriefPageInfo.latest_daily_brief_thread_id})]}),(0,i.jsxs)("div",{children:["skill_page_id: ",u.skillPageId??(0,i.jsx)("span",{style:l.tertiaryText,children:"not set (using hardcoded prompt)"})]}),(0,i.jsxs)("div",{children:["page_id (legacy): ",u.dailyBriefPageInfo.page_id??(0,i.jsx)("span",{style:l.tertiaryText,children:"not set"})]}),(0,i.jsxs)("div",{children:["generated_for_date: ",u.dailyBriefPageInfo.generated_for_date??"not set"]}),(0,i.jsxs)("div",{children:["prompt_clicked_at: ",u.dailyBriefPageInfo.prompt_clicked_at?new Date(u.dailyBriefPageInfo.prompt_clicked_at).toLocaleString():"not set"]}),(0,i.jsxs)("div",{children:["sidebar_dismissed_at: ",u.dailyBriefPageInfo.sidebar_daily_brief_dismissed_at?new Date(u.dailyBriefPageInfo.sidebar_daily_brief_dismissed_at).toLocaleString():"not set"]}),(0,i.jsxs)("div",{children:["tooltip_dismissed_at: ",u.dailyBriefPageInfo.tooltip_dismissed_at?new Date(u.dailyBriefPageInfo.tooltip_dismissed_at).toLocaleString():"not set"]}),(0,i.jsxs)("div",{children:["last_updated_from_template: ",u.dailyBriefPageInfo.last_updated_from_template?new Date(u.dailyBriefPageInfo.last_updated_from_template).toLocaleString():"not set"]})]}):(0,i.jsx)("div",{children:"Not set"})]})}):void 0,(0,i.jsx)(d,{})]})}},227817(e,t,a){var r=a(635790);let i={};function n(){i.result=void 0,i.fetchedAt=void 0,i.pageId=void 0}function s(){let e=(0,a(533992).v3)(),[t,n]=(0,r.useState)(!1),[s,o]=(0,r.useState)({updateAvailable:!1}),{dailyBriefPageId:l,lastUpdatedFromTemplate:d}=(0,a(579993).K8)(()=>{var e;let t=a(192314).AppStoreSidebarSpaceViewStore.state,r=null==t||null==(e=t.getSettingsStore().getKeyValue("agent_personalization_settings"))?void 0:e.daily_brief_prompt;return{dailyBriefPageId:null==r?void 0:r.page_id,lastUpdatedFromTemplate:null==r?void 0:r.last_updated_from_template}},[]),c=(0,r.useCallback)(async(t=!1)=>{if(!l)return void o({updateAvailable:!1});let r=d;if(t){var s;let e=a(192314).AppStoreSidebarSpaceViewStore.state;r=null==e||null==(s=e.getSettings())||null==(s=s.agent_personalization_settings)||null==(s=s.daily_brief_prompt)?void 0:s.last_updated_from_template}let c=Date.now();if(!t&&i.pageId===l&&i.fetchedAt&&c-i.fetchedAt<3e5&&i.result)return void o(i.result);n(!0);try{let{checkIfDailyBriefTemplateUpdateAvailable:t}=await a.e(8948).then(a.bind(a,736937)),n=await t({environment:e,userPageId:l,lastUpdatedFromTemplate:r??void 0});i.result=n,i.fetchedAt=c,i.pageId=l,o(n)}finally{n(!1)}},[l,e,d]);return(0,r.useEffect)(()=>{c()},[c]),{updateAvailable:s.updateAvailable,isChecking:t,checkForUpdate:c,templateLastEditedTime:s.templateLastEditedTime,lastUpdatedFromTemplate:s.lastUpdatedFromTemplate,userHasModifiedPage:s.userHasModifiedPage}}a.d(t,{d:()=>s,invalidateDailyBriefUpdateCache:()=>n})},753833(e,t,a){function r(e){let{environment:t,spaceStore:r}=e,i=t.currentUser.id;if(!r||!i||!(0,a(551408).R)())return!1;let n=(0,a(367890).x)(t,{name:"ai_database_agents",spaceId:r.id,userId:i,amount:"unknown"});return void 0!==n&&!!(0,a(747609).e2)(n)&&(0,a(994709).v)({currentUserId:i,spaceStore:r,isOwnersOnlyDefaultEnabled:a(218744).default.checkGate({gateName:"agent_creation_default_owners_only"})}).canCreate}a.d(t,{m:()=>r})}
1,821915(e,t,a){function r(e){let{config:t}=e,r=(0,a(83208).X)("filesystem_sandbox")&&"workflow"===t.type&&!0!==t.isHipaa,i="workflow"===t.type&&!0===t.isCustomAgent,n=(0,a(83208).X)("computer_custom_agent");return(!i||!!n)&&r}function i(e){return!!a(218744).default.checkGate({gateName:"filesystem_sandbox"})&&!e.isHipaa&&(!e.isCustomAgent||!!a(218744).default.checkGate({gateName:"computer_custom_agent"}))}a.d(t,{Y:()=>i,p:()=>r})},828294(e,t,a){function r(){return(0,a(275750).co)()}function i(e){return(0,a(275750).bO)(e)}function n(){return a(218744).default.checkGate({gateName:"agent_writer_client_rendered_pages"})}a.d(t,{Qm:()=>i,__:()=>n,dI:()=>r})},61314(e,t,a){function r(e){if(!e)return null;let t=e.getSpaceStore();if(!t)return null;let r=t.userId;if(!r)return null;let i=a(678703).VF.createChildStore(t,a(729052).i1({userId:r,spaceId:t.id}));return i?!!i.isMember():null}a.d(t,{j:()=>r})},214062(e,t,a){function r(e){if(!e)return[];let t=e.getSetting("workspace_default_skills")??[];if(!a(218744).default.checkGate({gateName:"enable_group_default_skills"}))return t;let r=e.getSetting("group_default_skills")??[];return 0===r.length?t:(0,a(543858).hC)({workspaceDefaultSkills:t,groupDefaultSkills:r,currentUserGroupIds:a(660472).f.getSpacePermissionGroupIds({spaceId:e.id})})}function i(e){let t=new Map;if(!e)return{skills:[],sourceBySkillPageId:t};let r=e.getSetting("workspace_default_skills")??[];if(!a(218744).default.checkGate({gateName:"enable_group_default_skills"})){for(let e of r)t.set(e.skill_page_id,{type:"workspace"});return{skills:r,sourceBySkillPageId:t}}let i=e.getSetting("group_default_skills")??[];if(0===i.length){for(let e of r)t.set(e.skill_page_id,{type:"workspace"});return{skills:r,sourceBySkillPageId:t}}let n=a(660472).f.getSpacePermissionGroupIds({spaceId:e.id}),s=(0,a(543858).hC)({workspaceDefaultSkills:r,groupDefaultSkills:i,currentUserGroupIds:n}),o=new Set(s.map(e=>e.skill_page_id));for(let e of r)o.has(e.skill_page_id)&&t.set(e.skill_page_id,{type:"workspace"});for(let e of i)if(n.has(e.group_id))for(let a of e.skills){if(!o.has(a.skill_page_id))continue;let r=t.get(a.skill_page_id);if((null==r?void 0:r.type)==="workspace")continue;let i=(null==r?void 0:r.groupIds)??[];i.includes(e.group_id)||t.set(a.skill_page_id,{type:"group",groupIds:[...i,e.group_id]})}return{skills:s,sourceBySkillPageId:t}}a(499468),a(586042),a(169187),a(726090),a(132457),a(219390),a(73168),a(159952),a.d(t,{O:()=>i,g:()=>r})},630131(e,t,a){function r(e,t){return(0,a(893004).z)(e,a(328659).L,t)}a.d(t,{Y:()=>r})},188465(e,t,a){a.d(t,{B:()=>s});var r=()=>a(129499),i=()=>a(955630);function n(e){for(let t of e){let e=function(e){let t=e.getTitleStore();if(t&&a(521595).n.findNodeFromStore(t))return t}(t);if(e&&t.getType()!==i().xd.code)return{blockStore:t,titleStore:e}}}function s(e){let t,i=n(e);if(!i)return;let s=n([...e].reverse());if(!s)return;let o=(0,a(787926).Ag)({includeNonSelectableListContainer:!1,rootStore:i.blockStore.getHighestContentBlockUIAnce
1stor()});if(!o)return;let l=(0,a(787926).mP)(s.blockStore,o);if(l){for(let e of(0,a(827049).Y_)(l)){let a=e.value.store.getTitleStore();if(a){let e=(0,r().s)(a);e&&(t={store:a,index:e.endIndex})}}if(t)return{start:{store:i.titleStore,index:0},end:t}}}},250943(e,t,a){function r(e){let{multiSelection:t}=e;return(0,a(356264).$)(t).map(({store:e,selection:t})=>{let r=(0,a(247438).RQ)(e.getValue()),i=(0,a(247438).xbM)(r,t),{tokensInsideRange:n}=(0,a(247438).AI5)(r,i.startIndex,i.endIndex);return(0,a(536614).r4)(n,e)}).join("\n\n")}a(159952),a.d(t,{E:()=>r})},225900(e,t,a){function r(e){var t;let{environment:r,spaceStore:i,transcript:n,parentPointer:s,aiChatType:o,threadId:l,workflowId:d,createdSource:c,agentMessageKey:u,debugOverrides:p}=e,h=l??(0,a(295447).Z1)({environment:r,table:"thread",spaceId:i.id});return(0,a(826635).runFromStep)({environment:r,clientStore:a(41709).defaultClientAIChatStore,threadStore:void 0,aiChatType:o,createThreadArgs:{id:h,transcript:n,workflowId:d,parentPointer:s||{table:"space",id:i.id,spaceId:i.id},createdSource:c,agentMessageKey:u},additionalDebugOverrides:p,sendPatchResponse:!0,submittedUserStepId:null==(t=n.findLast(e=>"user"===e.type))?void 0:t.id}),a(174148).E.createChildStore(i,{id:h,spaceId:i.id,table:"thread"})}a(63224),a.d(t,{N:()=>r})},646440(e,t,a){a(533958);var r=()=>a(150410),i=()=>a(223753);function n(e){return e.table===a(832375).C0E?e:void 0}function s(e){let{workflowPointer:t,threadPointer:a}=e,r=t??a;if(!r)throw Error("No workflow definition pointer found");return r}function o(e){switch(e.table){case"workflow":return e.id;case"workflow_artifact":return e.getParentId();case"thread":{var t;let r=null==(t=e.getData())?void 0:t.workflow_id;if(r)return r;let i=e.getConfig();if((null==i?void 0:i.type)==="workflow")return i.workflowId;return e.getParentTable()===a(832375).C0E?e.getParentId():void 0}default:(0,a(48697).HB)(e)}}function l(e){var t,a,r,i;let n=e.getData(),s=e.getDraftData(),o=(null==n||null==(t=n.runtime_actor_pointer)?void 0:t.id)??(null==s||null==(a=s.runtime_actor_pointer)?void 0:a.id),l=(null==n||null==(r=n.draft_runtime_actor_pointer)?void 0:r.id)??(null==s||null==(i=s.draft_runtime_actor_pointer)?void 0:i.id);return[...void 0!==o?[o]:[],...void 0!==l?[l]:[]]}function d(e){let{spaceStore:t,workflowStore:i}=e,n=(0,r().getBotIdFromStore)(i);if(n)return a(447003).v.createChildStore(t,{table:"bot",id:n,spaceId:t.id})}function c(e){let{botId:t,environment:n,spaceId:s}=e,o=(0,i().rL)({spaceId:s,botId:t});if(o)return o;if(!n)return;let l=(0,a(203462).zf)(n).getData(n,{spaceId:s});if(l){for(let e of l.agents)if((0,r().getBotIdFromStore)(e)===t)return(0,i().wv)({spaceId:s,botId:t,workflowId:e.id}),e.id}}function u(e){return e.table!==a(832375).U6v?e.getDraftDataStore():e.getDataStore()}a.d(t,{Cq:()=>s,Lq:()=>c,NB:()=>n,VN:()=>l,_A:()=>d,d$:()=>u,i4:()=>o})},150410(e,t,a){function r(e){var t,r;let i;switch(e.table){case a(832375).U6v:i=null==(t=e.getData())?void 0:t.runtime_actor_pointer;break;case a(832375).C0E:i=(0,a(713569).d)(e).runtime_actor_pointer??(null==(r=e.getPublishedArtifactStore())||null==(r=r.getData())?void 0:r.runtime_actor_pointer);break;default:(0,a(48697).HB)(e)}if(i&&"bot"===i.table)return i.id}a.r(t),a.d(t,{getBotIdFromStore:()=>r})},994709(e,t,a){function r(e){let{currentUserId:t,spaceStore:r,isOwnersOnlyDefaultEnabled:i}=e,n=null==r?void 0:r.getModel(),s=null==n?void 0:n.getSettings();if(!r||!t||!n||!s)return{canCreate:!1,reason:"feature_disabled"};let o=(0,a(993077).dp)(r,t),l=o.getMembershipTypeAsRoleOrNone();if(!1!==o.isPageGuest()||!1!==o.isRestrictedMember()||"none"===l)return{canCreate:!1,reason:"policy_restriction"};let d=a(660472).f.getSpacePermissionGroupIds({spaceId:r.id}),c=(0,a(960408).oE)(Array.from(d).map(e=>{let t=(0,a(13717).E)({spaceStore:r,groupId:e});if(!t)return;let i=t.getSettings();return{settings:i?{can_create_custom_agents:i.can_create_custom_agents}:void 0}})),u={policy:s.custom_agent_creation_policy,userRole:l,userPermissionGroups:c,isOwnersOnlyDefaultEnabled:i};return(0,a(322450).K)(u)}a(159952),a.d(t,{v:()=>r})},713569(e,t,a){function r(e){var t;
1return(null==(t=e.getModel())?void 0:t.getData())||(0,a(425749).bZ)()}a.d(t,{d:()=>r})},541933(e,t,a){function r(){return a(218744).default.getConfig({configName:"custom_agent_sub_features"}).stuck_run_threshold_seconds??3600}function i(e,t=3600){var a;let r=null==(a=e.getData())?void 0:a.agent_provider;if((null==r?void 0:r.providerId)==="agent_service")return!1;let n=e.getUpdatedTime()??e.getCreatedTime();return!!n&&Date.now()-n>1e3*t}a.d(t,{N:()=>r,_:()=>i})},86089(e,t,a){a.d(t,{s:()=>s,getWorkflowAgentConfig:()=>i,a:()=>n}),a(730330),a(765324);let r=new(a(246382)).R({key:"agent_memory_database_page",namespace:a(274919).Bq,important:!0,trackingType:"preference"});function i(e){let{isOnboardingAgent:t,searchScopes:i,searchSessionId:n,useWebSearch:s,internetAccess:l,manageWorkers:d,useReadOnlyMode:c,agentMemorySettings:u,model:p,externalAgentModel:h,externalAgentReasoningEffort:g,isCustomAgent:f,isCustomAgentBuilder:m,isCustomAgentCreate:_,workflowId:b,modelFromUser:y,reasoningEffort:v,writerMode:w,useRulePrioritization:k,useCustomAgentDraft:x,databaseAgentConfigMode:S,isAgentResearchRequest:I,environment:j,spaceId:T,spaceStore:P}=e,R=a(886556).z.isZeroRetentionEnabled(),C=(0,a(612608).MI)((0,a(612608).VD)("ai_agent_large_tool_result_computer_offload"),o),M=(0,a(612608).MI)((0,a(612608).VD)("agent_script_agent_runscript_only"),o),A=o("agent_gtm_entity_tools"),D=o("software_factory_page"),B=(0,a(16712).p1)({checkGate:o,enableScriptAgent:!0,isCustomAgent:!!f}),z=(0,a(612608).MI)((0,a(612608).VD)("agent_user_session_context"),o),q=o("agent_crdt_operations"),Q=(0,a(612608).MI)((0,a(612608).VD)("agent_card_customization"),o),E=(0,a(612608).MI)((0,a(612608).VD)("agent_system_prompt_as_page"),o),L=(0,a(328765).S)(),F=P??(void 0===T||(null==L?void 0:L.id)===T?L:void 0),O=o("sams_specials"),V=o("elons_specials"),N=o("ai_image_generation")&&!O&&!V&&((null==F?void 0:F.isAiImageGenerationEnabledOnSpace())??!0),U=(0,a(753833).m)({environment:j,spaceStore:F}),G="work_with_core_dbs"===e.onboardingAgentVersion,W=o("agent_markdown_vnext"),H=o("agent_suggested_edits_tools"),K=o("enable_skills_in_custom_agents"),$=o("agent_update_page_order_updates"),X=o("agent_support_property_reorder"),Y=o("agent_stale_view_edit_guard_enabled"),Z=a(218744).default.getConfig({configName:"agent_writer_model_config"}).defaultModel,J=r.getState(),ee=null==J?void 0:J.pageId,et=(0,a(876688).wd)(),ea=et.some(e=>(0,a(281708).yY)(e)),er=o("mail_notification_preferences_tools"),ei=o("outlook_custom_agent_email_connector"),en=o("notion_mail_deprecated"),es=o("agent_web_research"),eo=o("agent_query_calendar_tool")&&ea,el=et.some(e=>(0,a(281708).Xs)(e)&&"outlook"!==e),ed=o("agent_query_mail_tool")&&el,ec=a(218744).default.checkGate({gateName:"agent_rule_priority_hierarchy"}),eu=(0,a(48697).Xk)(a(388021).UX,e.agentMessageKey),ep=!w&&!R&&(void 0===s||s),eh=(0,a(821915).Y)({isHipaa:R,isCustomAgent:!!f});return{type:"workflow",...B,enableAgentDiffs:!G,enableCsvAttachmentSupport:!0,showDatabaseAgentsDiscoverability:U,enableAgentThreadTools:e.enableAgentThreadTools??!1,enableCrdtOperations:q,enableAgentCardCustomization:Q,enableSystemPromptAsPage:E,enableUserSessionContext:z,enableLargeToolResultComputerOffload:C,...M?{enableScriptAgentRunScriptOnly:!0}:{},enableScriptAgentGtm:A,enableComputer:eh,enableSoftwareFactoryPage:D,...f?{}:{enableAgentGenerateImage:N},enableQueryCalendar:eo,enableQueryMail:ed,enableMailNotificationPreferences:er,enableMailAgentMultiProviderSupport:ei,enableNotionMailDeprecated:en,enableWebResearch:es,useRulePrioritization:k??ec,memoryDatabasePageId:ee,workflowId:b,availableConnectors:et,searchScopes:w?[]:i??a(425749).R2,useWebSearch:ep,isHipaa:R,internetAccess:l??!1,manageWorkers:d??!1,useReadOnlyMode:!b&&(c??!1),agentMemorySettings:u,writerMode:!!w,model:w?Z:p,externalAgentModel:h,externalAgentReasoningEffort:g,reasoningEffort:v,searchSessionId:n,modelFromUser:!w&&(y??void 0!==p),isCustomAgent:!!f,isCustomAgentBuilder:!!m,isCustomAgentCreate:!!_,isAgentResearchRequest:!!I,useCustomAgentDraft:!!x,enableMarkdownVNext:W,enableSuggestedEditsTools:H,enableSkillsInCustomAgents:K,updatePageStaleViewGuardEnabled:Y,enableUpdatePageOrderUpdates:$,enableAgentSupportPropertyReorder:X,...w||(t||"onboarding"===e.oracleThreadType)&&!eu?{}:{enableAgentAskSurvey:!0},...t||"onboarding"===e.oracleThreadType||void 0!==e.onboardingAgentVersion?{disableTodos:!0}
1:{},databaseAgentConfigMode:!!S,isOnboardingAgent:!!t,onboardingAgentVersion:e.onboardingAgentVersion,agentMessageKey:e.agentMessageKey,isMobile:a(139424).A.isMobile}}function n(){return o("ai_research_mode_script_agent")}function s(e){let{environment:t,searchScope:a,spaceId:r,useWebSearch:n}=e;return{...i({environment:t,spaceId:r,searchScopes:a?[a]:void 0,useWebSearch:n}),enableScriptAgent:!0,isAgentResearchRequest:!0}}function o(e){return a(218744).default.checkGate({gateName:e})}},909212(e,t,a){function r(){return a(139424).A.isAdminMode||a(218744).default.checkGate({gateName:"workflows_debug_tools"})}function i(e){let t=(0,a(83208).X)("workflows_debug_tools",e);return a(139424).A.isAdminMode||t}function n(){return a(218744).default.checkGate({gateName:"agent_template"})}function s(e){let t=(null==e?void 0:e.spaceStore)??(0,a(328765).S)();return(null==t?void 0:t.isAiEnabledOnSpace())??!1}function o(){let e=(0,a(67499).S)();return(0,a(579993).K8)(()=>s(e),[e])}function l(){return(0,a(83208).X)("ai_custom_agent_beta")}a.d(t,{Ke:()=>r,Mm:()=>l,NA:()=>i,Xr:()=>n,i7:()=>o,re:()=>s})},223753(e,t,a){let r=new Map;function i(e){return`${e.spaceId}:${e.botId}`}function n(e){r.set(i(e),e.workflowId)}function s(e){return r.get(i(e))}a.d(t,{rL:()=>s,wv:()=>n})},346596(e,t,a){var r=a(635790);function i(e){let{workflowIdFromRoute:t,spaceStore:i}=(0,a(579993).K8)(()=>({workflowIdFromRoute:"agent"===e.RouterStore.state.route.name?e.RouterStore.state.route.workflowId:void 0,spaceStore:a(192314).AppStoreSidebarSpaceStore.state}),[e]);return(0,r.useMemo)(()=>{if(t&&i)return a(360851).N.createChildStore(i,{table:a(832375).C0E,id:t,spaceId:i.id})},[t,i])}function n(e){let t="agent"===e.RouterStore.state.route.name?e.RouterStore.state.route.workflowId:void 0,r=a(192314).AppStoreSidebarSpaceStore.state;if(t&&r)return a(360851).N.createChildStore(r,{table:a(832375).C0E,id:t,spaceId:r.id})}a.d(t,{L:()=>i,k:()=>n})},681008(e,t,a){a(635790);var r=a(440302);let i={viewBox:"0 0 20 20",fittedViewBox:"1.64 1.23 16.72 17.53",svg:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("path",{d:"M8.833 7.26a2.522 2.522 0 0 1 4.34.022.551.551 0 0 1-.95.555 1.422 1.422 0 0 0-2.446-.012L6.676 13l2.255.366a.55.55 0 0 1-.176 1.085L5.7 13.956a.55.55 0 0 1-.384-.825z"}),(0,r.jsx)("path",{d:"M10.518 8.605a.705.705 0 1 1-.225 1.393.705.705 0 0 1 .225-1.393m-3.719-.602a.706.706 0 1 1-.227 1.393.706.706 0 0 1 .227-1.393M5.146 5.999a2.524 2.524 0 0 1 3.586.23.55.55 0 0 1-.83.72 1.426 1.426 0 0 0-2.023-.13.55.55 0 1 1-.733-.82"}),(0,r.jsx)("path",{d:"M11.258 1.236c4.03 0 7.097 4.047 7.098 8.764s-3.069 8.762-7.098 8.763H8.743l-.375-.012C4.524 18.509 1.645 14.569 1.645 10c0-4.717 3.068-8.763 7.097-8.764zm-2.516 1.1c-3.202 0-5.998 3.31-5.998 7.664 0 4.355 2.796 7.663 5.998 7.663S14.74 14.355 14.74 10s-2.795-7.664-5.998-7.664m6.846 5.354c.164.74.253 1.516.253 2.31 0 3.134-1.356 5.97-3.446 7.522 2.699-.674 4.86-3.693 4.86-7.522a9.7 9.7 0 0 0-.275-2.31zm-.979-2.622q.396.718.672 1.523h1.35a8 8 0 0 0-.784-1.523zm-2.215-2.591a7.6 7.6 0 0 1 1.499 1.492h1.054c-.74-.738-1.614-1.258-2.553-1.492"})]})},n=(0,a(104509).wt)("aiCoin",i,"default");a.d(t,{},{f:n})},920976(e,t,a){a(635790);var r=a(440302);let i={viewBox:"0 0 20 20",fittedViewBox:"3.26 1.98 16.24 17.02",svg:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("path",{d:"M16 12c.345 0 .625.28.625.625v2.25h2.25a.625.625 0 0 1 0 1.25h-2.25v2.25a.625.625 0 1 1-1.25 0v-2.25h-2.25a.625.625 0 0 1 0-1.25h2.25v-2.25c0-.345.28-.625.624-.625M9.702 5.022a3.918 3.918 0 0 1 6.742.036.626.626 0 0 1-1.08.63 2.668 2.668 0 0 0-4.59-.023L5.376 14.68l4.19.68a.625.625 0 0 1-.2 1.233l-5.1-.827a.625.625 0 0 1-.437-.938z"}),(0,r.jsx)("path",{d:"M10.912 8.094a1.178 1.178 0 1 1 2.326.377 1.178 1.178 0 0 1-2.326-.377M4.7 7.086a1.179 1.179 0 1 1 2.328.378A1.179 1.179 0 0 1 4.7 7.086M3.488 2.985a3.92 3.92 0 0 1 5.572.357.625.625 0 0 1-.944.818 2.67 2.67 0 0 0-3.796-.243.625.625 0 1 1-.832-.932"})]})},n=(0,a(104509).wt)("aiFacePlus",i,"default");a.d(t,{},{F:n})},937776(e,t,a){a(635790);var r=a(440302);let i={viewBox:"0 0 20 20",fittedViewBox:"3.12 3.12 13.75 13.76",svg:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("path",{d:"M8 9.875a.625.625 0 1 0 0 1.25h4a.625.625 0 1 0 0-1.25z"}
1),(0,r.jsx)("path",{d:"M3.125 4.75c0-.897.728-1.625 1.625-1.625h10.5c.898 0 1.625.728 1.625 1.625v1.57c0 .676-.413 1.256-1 1.5v7.43c0 .898-.727 1.625-1.625 1.625h-8.5a1.625 1.625 0 0 1-1.625-1.625V7.82c-.587-.244-1-.824-1-1.5zm11.5 3.195h-9.25v7.305c0 .207.168.375.375.375h8.5a.375.375 0 0 0 .375-.375zm1-1.625V4.75a.375.375 0 0 0-.375-.375H4.75a.375.375 0 0 0-.375.375v1.57c0 .205.164.372.369.375h10.512a.375.375 0 0 0 .369-.375"})]})},n=(0,a(104509).wt)("archiveBox",i,"default");a.d(t,{},{B:n})},71282(e,t,a){a(635790);var r=a(440302);let i={viewBox:"0 0 20 20",fittedViewBox:"1 0.12 17.94 19.75",svg:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("path",{d:"M7.733.203a.626.626 0 0 1 .87.286l2.567 5.583 1.41.777 1.722-2.257a.55.55 0 0 1 .874.668l-1.624 2.125 3.87 2.135c.198.11.322.32.322.547v5.648a.63.63 0 0 1-.323.547l-6.408 3.535a.63.63 0 0 1-.604 0l-6.407-3.535a.63.63 0 0 1-.323-.547V10.58L1.054 4.534a.625.625 0 0 1 .271-.795zM4.929 15.346l5.232 2.887v-4.307L4.93 11.04zm6.332-1.42v4.307l5.233-2.887v-4.307zM5.519 10.11l5.192 2.864 5.192-2.864-3.117-1.72-1.75 2.295a.55.55 0 0 1-.875-.668l1.652-2.164-1.102-.608zM2.426 4.557l2.042 4.705 5.419-2.99-2.14-4.65zm14.706.177 1.364.314a.55.55 0 1 1-.248 1.071l-1.364-.314a.55.55 0 0 1 .248-1.071"}),(0,r.jsx)("path",{d:"M12.873 1.548a.55.55 0 0 1 .753.192l.684 1.15a.55.55 0 0 1-.946.561l-.683-1.149a.55.55 0 0 1 .192-.754m3.802-.041a.55.55 0 0 1 .889.649l-.871 1.193a.55.55 0 0 1-.89-.649z"})]})},n=(0,a(104509).wt)("boxOpenSparkle",i,"default");a.d(t,{},{R:n})},853160(e,t,a){a.r(t),a(635790);var r=a(440302);let i={viewBox:"0 0 20 20",fittedViewBox:"2.37 2.37 15.25 15.26",svg:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("path",{d:"M12.876 7.982a.625.625 0 1 0-1.072-.644L9.25 11.595 7.815 9.92a.625.625 0 0 0-.95.813l2 2.334a.625.625 0 0 0 1.01-.085z"}),(0,r.jsx)("path",{d:"M10 2.375a7.625 7.625 0 1 0 0 15.25 7.625 7.625 0 0 0 0-15.25M3.625 10a6.375 6.375 0 1 1 12.75 0 6.375 6.375 0 0 1-12.75 0"})]})},n=(0,a(104509).wt)("checkmarkCircle",i,"default");a.d(t,{},{checkmarkCircleIcon:n,iconDefinition:i})},641863(e,t,a){a(635790);var r=a(440302);let i={viewBox:"0 0 16 16",fittedViewBox:"1.07 2.82 13.83 10.36",svg:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("path",{d:"M8.18 5.25a.5.5 0 0 1 .5.5v3.623l1.127-1.127a.5.5 0 0 1 .707.707l-2 2a.5.5 0 0 1-.63.065l-.077-.065-2-2a.5.5 0 0 1 .707-.707L7.68 9.412V5.75a.5.5 0 0 1 .5-.5"}),(0,r.jsx)("path",{d:"M8.35 2.825a5.173 5.173 0 0 1 5.172 5.051 2.856 2.856 0 0 1-1.477 5.299l-.032-.001H4.018a.8.8 0 0 1-.189-.025 3.134 3.134 0 0 1-.566-6.098A5.176 5.176 0 0 1 8.35 2.826m3.85 10.318.005-.001.012-.005zm-.379-1.19-.039.012.031-.01.034-.01zm-3.47-7.878a3.926 3.926 0 0 0-3.908 3.543l-.047.484-.478.074a1.886 1.886 0 0 0 .1 3.739l.086.009h7.88l.018-.001h.05a1.605 1.605 0 0 0 1.59-1.44l.008-.164c0-.67-.41-1.245-.995-1.486l-.41-.169.024-.443q.006-.115.006-.221c0-2.1-1.649-3.814-3.722-3.92z"})]})},n=(0,a(104509).wt)("cloudArrowDownSmall",i,"small");a.d(t,{},{F:n})},823811(e,t,a){a(635790);let r={viewBox:"0 0 20 20",fittedViewBox:"2.37 4.12 15.25 11.75",svg:(0,a(440302).jsx)("path",{d:"M2.375 6.25c0-1.174.951-2.125 2.125-2.125h11c1.174 0 2.125.951 2.125 2.125v7.5a2.125 2.125 0 0 1-2.125 2.125h-11a2.125 2.125 0 0 1-2.125-2.125zm1.25 7.49L7.366 10 3.625 6.259zm.884.885H15.49l-3.74-3.741-1.309 1.308a.625.625 0 0 1-.884 0L8.25 10.884zM12.634 10l3.741 3.741V6.26zM4.509 5.375 10 10.866l5.491-5.491z"})},i=(0,a(104509).wt)("envelope",r,"default");a.d(t,{},{o:i})},895105(e,t,a){a.r(t),a(635790);let r={viewBox:"0 0 20 20",fittedViewBox:"2.37 4.87 15.25 10.25",svg:(0,a(440302).jsx)("path",{d:"M3 4.875a.625.625 0 1 0 0 1.25h14a.625.625 0 1 0 0-1.25zm2.125 5.742h9.75a.625.625 0 0 0 0-1.25h-9.75a.625.625 0 0 0 0 1.25m1.5 3.883c0-.345.28-.625.625-.625h5.5a.625.625 0 1 1 0 1.25h-5.5a.625.625 0 0 1-.625-.625"})},i=(0,a(104509).wt)("filter",r,"default");a.d(t,{},{filterIcon:i,iconDefinition:r})},312528(e,t,a){a.r(t),a(635790);let r={viewBox:"0 0 20 20",fittedViewBox:"2.44 2.45 15.57 15.57",svg:(0,a(440302).jsx)("path",{d:"M10.55 3a.55.55 0 0 0-1.1 0v2a.55.55 0 0 0 1.1 0zM8.47 8.47a.75.75 0 0 1 1.06 0l.897.896-1.06 1.06-.897-.896a.75.75 0 0 1 0-1.06m1.603 2.664 6.647 6.646a.75.75 0 1 0 1.06-1.06l-6.646-6.647zM10.55 15a.55.55 0 0 0-1.1 0v2a.55.55 0 0 0 1.1 0zm-3.697-1.853a.55.55 0 0 1 0 .777L5.44 15.34a.55.55 0 1 1-.778-.778l1.415-1.415a.55.55 0 0 1 .777 0m8.485-8.486a.55.55 0 0 1 0 .778l-1.415 1.414a.55.55 0 1 1-.777-.777L14.56 4.66a.55.55 0 0 1 .777 0M5.55 10a.55.55 0 0 1-.55.55H3a.55.55 0 1 1 0-1.1h2a.55.55 0 0 1 .55.55m12 0a.55.55 0 0 1-.55.55h-2a.55.55 0 1 1 0-1.1h2a.55.55 0 0 1 .55.55M6.853 6.853a.55.55 0 0 1-.778
10L4.661 5.44a.55.55 0 1 1 .778-.778l1.414 1.415a.55.55 0 0 1 0 .777"})},i=(0,a(104509).wt)("magicWand",r,"default");a.d(t,{},{iconDefinition:r,magicWandIcon:i})},680983(e,t,a){a.r(t),a(635790);var r=a(440302);let i={viewBox:"0 0 20 20",fittedViewBox:"3.49 1.5 13.02 16.01",svg:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("g",{className:"logo-light-mode",children:(0,r.jsx)("path",{fill:"#000",d:"M12.927 5.37q.17 0 .525.04.364.032.825.178.46.145.938.469.476.323.881.905-.041.025-.307.219-.26.194-.59.566a3.4 3.4 0 0 0-.582.93q-.243.557-.243 1.333 0 .89.307 1.504.315.615.728.995.42.38.744.557.331.17.355.178-.008.033-.12.364a9 9 0 0 1-.357.84q-.233.51-.614 1.068-.348.493-.72.946a3.4 3.4 0 0 1-.8.736 1.7 1.7 0 0 1-.97.29q-.413 0-.704-.096a5 5 0 0 1-.558-.227 4.4 4.4 0 0 0-.573-.218 2.7 2.7 0 0 0-.785-.097q-.615 0-1.027.162-.403.17-.768.331a2.1 2.1 0 0 1-.857.162q-.75 0-1.326-.598a14 14 0 0 1-1.164-1.431 9 9 0 0 1-.84-1.528 10.5 10.5 0 0 1-.607-1.836 8.5 8.5 0 0 1-.226-1.94q0-1.552.59-2.611T5.594 5.96a3.73 3.73 0 0 1 1.916-.542q.525 0 .986.17.47.17.873.348.405.17.736.17.315 0 .744-.179.428-.186.946-.371.525-.186 1.132-.186m-.566-1.31a3.3 3.3 0 0 1-1.019.816q-.606.324-1.148.324a1 1 0 0 1-.218-.024l-.025-.114a2 2 0 0 1-.008-.178q0-.614.267-1.196t.615-.97q.428-.51 1.083-.85.663-.339 1.27-.363.023.138.024.315 0 .623-.235 1.213a3.8 3.8 0 0 1-.606 1.027"})}),(0,r.jsx)("g",{className:"logo-dark-mode",children:(0,r.jsx)("path",{fill:"#fff",d:"M12.927 5.37q.17 0 .525.04.364.032.825.178.46.145.938.469.476.323.881.905-.041.025-.307.219-.26.194-.59.566a3.4 3.4 0 0 0-.582.93q-.243.557-.243 1.333 0 .89.307 1.504.315.615.728.995.42.38.744.557.331.17.355.178-.008.033-.12.364a9 9 0 0 1-.357.84q-.233.51-.614 1.068-.348.493-.72.946a3.4 3.4 0 0 1-.8.736 1.7 1.7 0 0 1-.97.29q-.413 0-.704-.096a5 5 0 0 1-.558-.227 4.4 4.4 0 0 0-.573-.218 2.7 2.7 0 0 0-.785-.097q-.615 0-1.027.162-.403.17-.768.331a2.1 2.1 0 0 1-.857.162q-.75 0-1.326-.598a14 14 0 0 1-1.164-1.431 9 9 0 0 1-.84-1.528 10.5 10.5 0 0 1-.607-1.836 8.5 8.5 0 0 1-.226-1.94q0-1.552.59-2.611T5.594 5.96a3.73 3.73 0 0 1 1.916-.542q.525 0 .986.17.47.17.873.348.405.17.736.17.315 0 .744-.179.428-.186.946-.371.525-.186 1.132-.186m-.566-1.31a3.3 3.3 0 0 1-1.019.816q-.606.324-1.148.324a1 1 0 0 1-.218-.024l-.024-.114a2 2 0 0 1-.009-.178q0-.614.267-1.196t.615-.97q.428-.51 1.083-.85.663-.339 1.27-.363.023.138.024.315 0 .623-.235 1.213a3.8 3.8 0 0 1-.606 1.027"})})]})},n=(0,a(104509).wt)("apple",i,"default");a.d(t,{},{appleIcon:n,iconDefinition:i})},34969(e,t,a){let r={manual:"manual",resultsAdvanced:"results-advanced",yAscending:"y-ascending",yDescending:"y-descending",xAscending:"x-ascending",xDescending:"x-descending"};function i(e){switch(null==e?void 0:e.type){case"manual":return r.manual;case"descending":return r.xDescending;default:return r.xAscending}}function n(e){return!(0,a(525918).$)(e)}a.d(t,{e0:()=>n,gN:()=>i},{S0:r})},543131(e,t,a){a.d(t,{},{O:"notion://database/hide_subitems_filter",j:"notion://database/hide_parents_filter"})},581539(e,t,a){a.d(t,{},{Q:["123","accessibility","activity","add","airplane","alarm","alert","alien","alien-pixel","ambulance","anchor","apple","apron","aquarius","arch-bridge","archery","archive","aries","arrivals","arrow-circle-down","arrow-down","arrow-down-basic","arrow-down-line","arrow-left","arrow-left-basic","arrow-left-line","arrow-northeast","arrow-northwest","arrow-right","arrow-right-basic","arrow-right-line","arrow-southeast","arrow-southwest","arrow-tur
1n-left","arrow-turn-right","arrow-up","arrow-up-basic","arrow-up-line","arrows-horizontal","arrows-swap-horizontally","arrows-swap-vertically","arrows-vertical","art","asterisk","atm","attachment","avocado","baby","baby-bottle","backpack","backward","badge","bag","baggage-claim","balloon","banana","barcode","barricade","baseball","baseball-cap","basketball","bathtub","bathtub-shower","battery","battery-charged","battery-charging","bed","bee","beer","beer-bottle","bell","bell-notification","bell-off","belt","bicycle","bikini","binoculars","blood-pressure","bluetooth","boarding-pass","boat","bomb","bone","book","book-closed","bookmark","bookmark-outline","boombox","boot","bounce","bowl","bowl-food","bowling","bra","brain","branch","branch-create","branch-fork","branch-merge","bread","briefcase","brightness-high","broccoli","broom","broom-and-dustpan","browser-stop","bug","bugle","bullseye","bunk-bed","burger","burst","bus","bus-double-decker","bus-metro","butterfly","button","cactus","cafe","cake","calculator","calendar","calendar-day","calendar-month","calendar-week","camera","camera-off","camera-roll","camera-roll-portrait","camping-tent","camping-trailer","cancer","candy","capricorn","car","card","card-club","card-diamond","card-heart","card-spade","cards","carrot","cash","cash-register","cassette","castle","castle-japanese","cat","categories","cd","cellular","chair","champagne","champagne-bottle","chart","chart-alternate","chart-area","chart-donut","chart-line","chart-mixed","chart-pie","chat","chat-user","check","checklist","checkmark","checkmark-line","checkmark-square","chemistry","cherries","chess-bishop","chess-king","chess-knight","chess-pawn","chess-queen","chess-rook","chevrons-vertical","chicken","child","chili-pepper","christmas-tree","church","cigarette","circle","circle-alternate","circle-arrows-horizontal","circle-arrows-vertical","circle-dashed","circle-dot","circle-five-eighths","circle-four-eighths","circle-one-eighth","circle-remove","circle-seven-eighths","circle-six-eighths","circle-three-eighths","circle-two-eighths","city","clarinet","clear","clipping","clock","clock-alternate","close","clothes-button","clothes-iron","cloud","cloud-no","cloud-off","cloud-yes","cloudy","clover","clover-four-leaf","coaster","coat","cocktail","code","code-scan","coffee","coffee-maker","color-palette","color-picker","color-swatch","column","comb","command-line","comment","compass","compose","compressed-document","computer","computer-chip","conceal","condense","confetti-ball","confetti-party-popper","conifer-tree","connecting-flight","construction-crane","contrast","conversation","copy","corn","couch","cow","crab","crayon","create","credit-card","crop","crutch","cupcake","currency","currency-coin","cursor","cursor-button","cursor-click","customs","cut","dairy","daisy","dance","darks","dashboard","database","defibrillator","delete","delivery-truck","dental","departures","dependency","description","dialogue","die1","die2","die3","die4","die5","die6","dining","directional-sign","directional-sign-left","directional-sign-right","directions","dish-soap","dna","do-not-disturb","document","dog","donkey","download","downward","drafts","dress","drink","duck","duster","ear","ear-hearing-aid","earthquake","egg","eject","electric-guitar","electric-plug","elephant","elevator","emoji","emoji-angry","emoji-big-sad","emoji-disappointed","emoji-grinning","emoji-grinning-smiling-eyes","emoji-heart-eyes","emoji-neutral","emoji-sad","emoji-smiling-eyes","emoji-sunglasses","emoji-surprised","emoji-winking","error","escalator","exclamation-mark","exclamation-mark-double","exit","expand","extension","fabric-swatch","facial-tissues","factory","fan-deck","feather","feed","filtered","fire","fire-extinguisher","fire-truck","fireworks","first-aid","first-aid-kit","fish","flag","flag-checkered","flag-pennant","flag-swallowtail","flash","flashlight","flatware","fleur-de-lis","flood","fog","folder","follow","following","font","food-and-drink","football","forest-fire","fork","fork-and-knife","formula","forward","fragile","friends","frying-pan","fuel","game-pawn","garlic","gavel","gear","gears","gem","gemini","geography","ghost","gift","git","glasses","globe","golf","government","gradebook","graduate","grapes","grave","grid","grid-dense","grid-wide","grid-wide-six","grocery","groups","guitar","gym","hail","hair-care","hairdryer","hammer","hanafuda","hand","handbag","hanger","hare","hashtag","headphones","headset","heart","heart-box-bow","heart-outline","heart-rate","heart-rate-monitor","heartbroken","helicopter","helm","help-alternate","hexagon","hexagon-alternate","hexagon-dashed","hexagon-five-sixths","hexagon-four-sixths","hexagon-one-sixth","hexagon-three-sixths","hexagon-two-sixths","highball","history","home","hot-air-balloon","hourglass","hurricane","ice-skate","immigration","inbox","infinity","info-alternate","inline-skate","invitation","iterate","jack-o-lantern","jar","judicial-scales","junk","key","key-antique","keyboard","keyboard-alternate","keypad","kind","kite","knife","knife-kitchen","language","laptop","laundry-basket","laundry-detergent","laundry-dryer","laundry-washer","layers","leaf","leaf-monstera","lemon","leo","libra","library","light-bulb","lights","link","lipstick","list","list-indent","litter-disposal","location","lock","lock-keyhole","log-in","log-out","long-bone","long-sleeve-shirt","looped-square","lost-and-found","lounge","luggage","luggage-cart","lungs","magic-wand","magnet","mahjong","mail","makeup-brush","mandir","map","map-pin","map-pin-alternate","mathematics","meat","medication","meeting","megaphone","menorah","menstrual-pad","merge","metronome","microphone","microphone-off","microscope","microwave","midtones","mirror","mobile","monorail","moon","mop","mop-and-bucket","more","mosque","motorcycle","mountains","mouth","move","move-document","movie","movie-camera","movie-clapboard","movie-clapboard-play","mushroom","music","music-album","music-artist","navigation","necktie","network","new-alert","new-badge","new-document","new-folder","news","no","no-entry","note-eighth","note-half","note-quarter","note-sixteenth","note-sixteenth-beamed","note-whole","notification","notion","numero","nut","octagon","official-document","onion","orange","orbit","ornament","oven","package","paifang","paint-brush","paint-brush-wide","paint-bucket","paint-roller","palm-tree","pants","paper-towels","parking","parking-no","partly-cloudy-day","partly-cloudy-night","passport","paste","peace","peanut","pear","pen","pencil","pentagon","pentagon-alternate","pentagon-dashed","pentagon-four-fifths","pentagon-one-fifth","pentagon-three-fifths","pentagon-two-fifths","people","perfume","person-feminine","person-masculine","phone","phone-call","phone-end-call","phone-speaker","photo-landscape","piano","pig","pill","pin","pisces","pitcher","pizza","plate-food","playback-fast-forward","playback-next","playback-pause","playback-play","playback-play-button","playback-previous","playback-rewind","playback-stop","playlist","plus","poo","postage-stamp","postcard","pot","potted-plant","poultry","power","pram","pregnancy-test","pretzel","preview","print","priority-high","priority-low","priority-mid","private","profile","promoted","public","pull-request","pump","pump-bottle","push-pin","puzzle","question-mark","radio","rain","rainbow","receipt","redirect","redo","reference","refresh","refresh-reverse","refrigerator","remove","rename","reorder","repeat","reply","reply-all","report","ringed-planet","robot","rocket","roller-skate","row","rubber-stamp","ruler","run","safety-pin","sagittarius","sailboat","sandwich","save","scarf","school","science","scooter","scorpio","screwdriver","script","scrub-brush","search","seed","send","send-to","server","service-counter","set-square","share","sharing","sheep","shell","shield","shirt","shoe","shogi","shop","shopping-bag","shopping-basket","shopping-cart","shorts","shovel-and-pail","shower","shuffle","sign-in","sign-out","signature-document","sink","skateboard","skip-backward","skip-forward","skirt","skull","skull-profile","sleet","slide","sliders-horizontal","sliders-vertical","slideshow","slideshow-play","smoking","smoking-no","snake","snare-drum","snippet","snorkel","snowflake","soap","soccer","sock","soda-bottle","soft-serve","soy","spider","sponge","spoon","spray-bottle","square","square-alternate","square-circle","square-dashed","square-one-fourth","
1square-three-fourths","square-two-fourths","squeeze-tube","stairs","star","star-half","star-of-life","star-outline","stars","steering-wheel","stethoscope","sticker","stomach","stopwatch","storm","stovetop","strawberry","stroller","subtask","subtitles","suit","suit-club","suit-diamond","suit-heart","suit-spade","suitcase","sun","sunglasses","sunrise","sunscreen","sunset","suspension-bridge","swap-horizontally","swap-vertically","sword","symbol","synagogue","sync","sync-reverse","syringe","t-square","table","tablet","tabs","tabs-user","tag","takeout-box","tampon","target","taurus","taxi","teapot","telephone","telescope","temperature-cool","temperature-warm","temple","theatre","thinking","thought","thought-alert","thought-dialogue","throat","thumbs-down","thumbs-up","ticket","ticket-admission","timeline","toaster","toilet","toilet-paper","token","tooth","torii","tornado","tortoise","towel","traffic-cone","traffic-light","train","train-high-speed","train-light-rail","train-magnetic-levitation","train-metro","transfers","translate","tree","triangle","triangle-alternate","triangle-dashed","triangle-one-third","triangle-two-thirds","trophy","tropical-cocktail","truck","trumpet","tshirt","tulip","tulip-name-tag","tumbler","tv","umbrella","underwear","undo","unfollow","unlock","unlock-keyhole","upload","upload-document","upload-folder","upward","user","user-circle","user-circle-dashed","user-circle-filled","username","vacuum-cleaner","verified","video-camera","video-camera-off","video-game","video-game-classic","video-game-joystick","videotape","view","view-off","vinyl-record","violin","virgo","vitruvian-man","voicemail","volcano","volume-high","volume-off","walk","wall","warning","watch-analog","water","whale","wheat","wheelchair","wheelchair-access","wheelchair-motorized","whistle","wifi","wind","window","wine","wine-bottle","wrapping-paper","wrench","yin-yang","zoom-in","zoom-out"]})},322450(e,t,a){function r(e=!1){return e?"workspace_owners_only":"all_workspace_members"}function i(e){let{policy:t,userRole:i,userPermissionGroups:n,isOwnersOnlyDefaultEnabled:s}=e,o=r(s),l=i&&(0,a(642157).Km)(i);switch(t??o){case"disabled":return{canCreate:!1,reason:"policy_restriction"};case"workspace_owners_only":if(!l)return{canCreate:!1,reason:"policy_restriction"};break;case"all_workspace_members":break;case"custom":if(!(null==n?void 0:n.some(e=>{var t;return(null==(t=e.settings)?void 0:t.can_create_custom_agents)===!0}))&&!l)return{canCreate:!1,reason:"policy_restriction"}}return{canCreate:!0}}a(730330),a(765324),a.d(t,{D:()=>r,K:()=>i})},543858(e,t,a){function r(e){let{workspaceDefaultSkills:t,groupDefaultSkills:a,currentUserGroupIds:r}=e,i=new Map,n=e=>{var t,a;let r=i.get(e.skill_page_id);i.set(e.skill_page_id,r?(t=r,a=e,{skill_page_id:t.skill_page_id,...void 0!==t.disable_automatic_use||void 0!==a.disable_automatic_use?{disable_automatic_use:!!(t.disable_automatic_use&&a.disable_automatic_use)}:{},use_automatically:(t.use_automatically??!1)||(a.use_automatically??!1),show_in_editor:(t.show_in_editor??!1)||(a.show_in_editor??!1),show_during_meetings:(t.show_during_meetings??!1)||(a.show_during_meetings??!1),show_after_meetings:(t.show_after_meetings??!1)||(a.show_after_meetings??!1)}):e)};for(let e of t)n(e);for(let e of a)if(r.has(e.group_id))for(let t of e.skills)n(t);return Array.from(i.values()).slice(0,50)}function i(e){let t=(null==e?void 0:e.installed_skill_page_ids)??[],a=(null==e?void 0:e.selected_skill_page_ids)??[],r=(null==e?void 0:e.rich_text_skills)??[];return{installed:_([...t,...a,...r]),explicitlyInstalled:t,autoEnabled:a,editor:r,duringMeeting:(null==e?void 0:e.during_meeting_notes_skill_page_ids)??[],afterMeeting:(null==e?void 0:e.after_meeting_notes_skill_page_ids)??[]}}function n(e){return _((null==e?void 0:e.mcp_enabled_skill_page_ids)??[])}function s(e){let{aiPrompts:t,pageId:a,enabled:r}=e,i=n(t);return{...t,mcp_enabled_skill_page_ids:r?_([...i,a]):i.filter(e=>e!==a)}}function o(e,t){let a=i(e),r=c(e,t),n=_([...r.map(e=>e.skill_page_id),...a.installed]),s=new Set(r.filter(e=>e.disable_automatic_use).map(e=>e.skill_page_id));return{installed:n,explicitlyInstalled:a.explicitlyInstalled,autoEnabled:n.filter(t=>{var a;return!((null==e||null==(a=e.automatic_use_disabled_by_skill)?void 0:a[t])??s.has(t))}),editor:f(r,"editor",a.editor),duringMeeting:f(r,"during_meeting",a.duringMeeting),afterMeeting:f(r,"after_meeting",a.afterMeeting)}}function l(e){let{aiPrompts:t,workspaceDefaultSkills:a,pageId:r,disabled:i}=e,n=o(t,a).installed;if(!n.includes(r))return t;let s={};for(let e of n){var l;let a=null==t||null==(l=t.automatic_use_disabled_by_skill)?void 0:l[e];void 0!==a&&(s[e]=a)}return s[r]=i,{...t,automatic_use_disabled_by_skill:s}}function d(e,t){return c(e,t).map(e=>e.skill_page_id)}function c(e,t){let a=new Set((null==e?void 0:e.overridden_workspace_default_skill_page_ids)??[]);return t.filter(e=>!a.has(e.skill_page_id))}function u(e,t,a){return c(e,t).filter(e=>g(e,a)).map(e=>e.skill_page_id)}function p(e,t,a){return m(o(e,t),a)}function h(e,t){return m(i(e),t)}function g(e,t){switch(t){case"automatic_use":return e.use_automatically??!1;case"editor":return e.show_in_editor??!1;case"during_meeting":return e.show_during_meetings??!1;case"after_meeting":return e.show_after_meetings??!1}}function f(e,t,a){return _([...e.filter(e=>g(e,t)).map(e=>e.skill_page_id),...a])}function m(e,t){switch(t){case"automatic_use":return e.autoEnabled;case"editor":return e.editor;case"during_meeting":return e.duringMeeting;case"after_meeting":return e.afterMeeting}}function _(e){return Array.from(new Set(e))}a(499468),a(586042),a(169187),a(726090),a(132457),a(219390),a(73168),a(730330),a(976614),a(159952),a.d(t,{Ag:()=>p,F_:()=>d,JQ:()=>s,NP:()=>u,Wp:()=>l,cn:()=>o,hC:()=>r,nF:()=>h,pn:()=>c,tf:()=>i,wk:()=>n})},350730(e,t,a){function r(...e){return a(764657).object({required:{table:a(764657).literals(...e),id:a(764657).string(),spaceId:a(764657).string()},optional:{}})}function i(...e){return r(...e)}function n(...e){return function(...e){return a(764657).object({required:{table:a(764657).literals(...e),id:a(764657).string()},optional:{spaceId:a(764657).string()}})}(...e)}function s(...e){return r(...e)}a.d(t,{uV:()=>s,VR:()=>n,IK:()=>i})},221111(e,t,a){a.d(t,{},{p:["skills","htmlBlock","mcp","aiMeetingNotes"]})},147281(e,t,a){var r=()=>a(374985),i=class extends r().${constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:(0,a(442337).PL)()})}getOptimisticResult(e){return e.behavior=(0,a(442337).PL)(),super.getOptimisticResult(e)}
1fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){let{state:r}=e,i=super.createResult(e,t),{isFetching:n,isRefetching:s,isError:o,isRefetchError:l}=i,d=r.fetchMeta?.fetchMore?.direction,c=o&&"forward"===d,u=n&&"forward"===d,p=o&&"backward"===d,h=n&&"backward"===d;return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,a(442337).rB)(t,r.data),hasPreviousPage:(0,a(442337).RQ)(t,r.data),isFetchNextPageError:c,isFetchingNextPage:u,isFetchPreviousPageError:p,isFetchingPreviousPage:h,isRefetchError:l&&!c&&!p,isRefetching:s&&!u&&!h}}};a.d(t,{z:()=>i})},374985(e,t,a){var r=()=>a(251358),i=class extends r().Q{constructor(e,t){super(),this.options=t,this.#e=e,this.#t=null,this.#a=(0,a(312080).T)(),this.bindMethods(),this.setOptions(t)}#e;#r=void 0;#i=void 0;#n=void 0;#s;#o;#a;#t;#l;#d;#c;#u;#p;#h;#g=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#r.addObserver(this),n(this.#r,this.options)?this.#f():this.updateResult(),this.#m())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return s(this.#r,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return s(this.#r,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#_(),this.#b(),this.#r.removeObserver(this)}setOptions(e){let t=this.options,r=this.#r;if(this.options=this.#e.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,a(90694).Eh)(this.options.enabled,this.#r))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#y(),this.#r.setOptions(this.options),t._defaulted&&!(0,a(90694).f8)(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#r,observer:this});let i=this.hasListeners();i&&o(this.#r,r,this.options,t)&&this.#f(),this.updateResult(),i&&(this.#r!==r||(0,a(90694).Eh)(this.options.enabled,this.#r)!==(0,a(90694).Eh)(t.enabled,this.#r)||(0,a(90694).d2)(this.options.staleTime,this.#r)!==(0,a(90694).d2)(t.staleTime,this.#r))&&this.#v();let n=this.#w();i&&(this.#r!==r||(0,a(90694).Eh)(this.options.enabled,this.#r)!==(0,a(90694).Eh)(t.enabled,this.#r)||n!==this.#h)&&this.#k(n)}getOptimisticResult(e){var t,r;let i=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(i,e);return t=this,r=n,(0,a(90694).f8)(t.getCurrentResult(),r)||(this.#n=n,this.#o=this.options,this.#s=this.#r.state),n}getCurrentResult(){return this.#n}trackResult(e,t){return new Proxy(e,{get:(e,a)=>(this.trackProp(a),t?.(a),"promise"===a&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#a.status||this.#a.reject(Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,a))})}trackProp(e){this.#g.add(e)}getCurrentQuery(){return this.#r}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),a=this.#e.getQueryCache().build(this.#e,t);return a.fetch().then(()=>this.createResult(a,t))}fetch(e){return this.#f({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#n))}#f(e){this.#y();let t=this.#r.fetch(this.options,e);return e?.throwOnError||(t=t.catch(a(90694).lQ)),t}#v(){this.#_();let e=(0,a(90694).d2)(this.options.staleTime,this.#r);if(a(68591).H.isServer()||this.#n.isStale||!(0,a(90694).gn)(e))return;let t=(0,a(90694).j3)(this.#n.dataUpdatedAt,e);this.#u=a(670573).zs.setTimeout(()=>{this.#n.isStale||this.updateResult()},t+1)}#w(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#r):this.options.refetchInterval)??!1}#k(e){this.#b(),this.#h=e,!a(68591).H.isServer()&&!1!==(0,a(90694).Eh)(this.options.enabled,this.#r)&&(0,a(90694).gn)(this.#h)&&0!==this.#h&&(this.#p=a(670573).zs.setInterval(()=>{(this.options.refetchIntervalInBackground||a(879412).m.isFocused())&&this.#f()},this.#h))}#m(){this.#v(),this.#k(this.#w())}#_(){void 0!==this.#u&&(a(670573).zs.clearTimeout(this.#u),this.#u=void 0)}#b(){void 0!==this.#p&&(a(670573).zs.clearInterval(this.#p),this.#p=void 0)}createResult(e,t){let r,i=this.#r,s=this.options,d=this.#n,c=this.#s,u=this.#o,p=e!==i?e.state:this.#i,{state:h}=e,g={...h},f=!1;if(t._optimisticResults){let r=this.hasListeners(),l=!r&&n(e,t),d=r&&o(e,i,t,s);(l||d)&&(g={...g,...(0,a(471291).k)(h.data,e.options)}),"isRestoring"===t._optimisticResults&&(g.fetchStatus="idle")}let{error:m,errorUpdatedAt:_,status:b}=g;r=g.data;let y=!1;if(void 0!==t.placeholderData&&void 0===r&&"pending"===b){let e;d?.isPlaceholderData&&t.placeholderData===u?.placeholderData?(e=d.data,y=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#c?.state.data,this.#c):t.placeholderData,void 0!==e&&(b="success",r=(0,a(90694).pl)(d?.data,e,t),f=!0)}if(t.select&&void 0!==r&&!y)if(d&&r===c?.data&&t.select===this.#l)r=this.#d;else try{this.#l=t.select,r=t.select(r),r=(0,a(90694).pl)(d?.data,r,t),this.#d=r,this.#t=null}catch(e){this.#t=e}this.#t&&(m=this.#t,r=this.#d,_=Date.now(),b="error");let v="fetching"===g.fetchStatus,w="pending"===b,k="error"===b,x=w&&v,S=void 0!==r,I={status:b,fetchStatus:g.fetchStatus,isPending:w,isSuccess:"success"===b,isError:k,isInitialLoading:x,isLoading:x,data:r,dataUpdatedAt:g.dataUpdatedAt,error:m,errorUpdatedAt:_,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdate
1Count:g.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:g.dataUpdateCount>p.dataUpdateCount||g.errorUpdateCount>p.errorUpdateCount,isFetching:v,isRefetching:v&&!w,isLoadingError:k&&!S,isPaused:"paused"===g.fetchStatus,isPlaceholderData:f,isRefetchError:k&&S,isStale:l(e,t),refetch:this.refetch,promise:this.#a,isEnabled:!1!==(0,a(90694).Eh)(t.enabled,e)};if(this.options.experimental_prefetchInRender){let t=void 0!==I.data,r="error"===I.status&&!t,n=e=>{r?e.reject(I.error):t&&e.resolve(I.data)},s=()=>{n(this.#a=I.promise=(0,a(312080).T)())},o=this.#a;switch(o.status){case"pending":e.queryHash===i.queryHash&&n(o);break;case"fulfilled":(r||I.data!==o.value)&&s();break;case"rejected":r&&I.error===o.reason||s()}}return I}updateResult(){let e=this.#n,t=this.createResult(this.#r,this.options);if(this.#s=this.#r.state,this.#o=this.options,void 0!==this.#s.data&&(this.#c=this.#r),(0,a(90694).f8)(t,e))return;this.#n=t;let r=()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,a="function"==typeof t?t():t;if("all"===a||!a&&!this.#g.size)return!0;let r=new Set(a??this.#g);return this.options.throwOnError&&r.add("error"),Object.keys(this.#n).some(t=>this.#n[t]!==e[t]&&r.has(t))};this.#x({listeners:r()})}#y(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#r)return;let t=this.#r;this.#r=e,this.#i=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#m()}#x(e){a(767143).jG.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#n)}),this.#e.getQueryCache().notify({query:this.#r,type:"observerResultsUpdated"})})}};function n(e,t){return!1!==(0,a(90694).Eh)(t.enabled,e)&&void 0===e.state.data&&("error"!==e.state.status||!1!==t.retryOnMount)||void 0!==e.state.data&&s(e,t,t.refetchOnMount)}function s(e,t,r){if(!1!==(0,a(90694).Eh)(t.enabled,e)&&"static"!==(0,a(90694).d2)(t.staleTime,e)){let a="function"==typeof r?r(e):r;return"always"===a||!1!==a&&l(e,t)}return!1}function o(e,t,r,i){return(e!==t||!1===(0,a(90694).Eh)(i.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&l(e,r)}function l(e,t){return!1!==(0,a(90694).Eh)(t.enabled,e)&&e.isStaleByTime((0,a(90694).d2)(t.staleTime,e))}a.d(t,{$:()=>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.