@opencxh/domain 1.233.0 → 1.233.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,32 +1,32 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Se=10,V=10,j=10,Y=5,Gr=new Set(["header","section","context","divider","image","list","actions","attachments"]);function he(e){if(typeof e=="string")return e.length>0;if(!e||typeof e!="object")return!1;const t=e;return typeof t.key=="string"||typeof t.value=="string"}function Wr(e,t=()=>{}){if(!Array.isArray(e))return[];const n=[];for(const r of e){if(n.length>=Se){t(`more than ${Se} blocks; the rest was dropped`);break}if(!r||typeof r!="object")continue;const i=r;if(!Gr.has(i.type)){t(`unknown block type ${String(i.type)}`);continue}switch(i.type){case"header":if(!he(i.text)){t("a header without text");continue}break;case"context":if(!he(i.text)){t("a context block without text");continue}break;case"image":if(!i.url||!i.alt){t("an image without url or alt");continue}break;case"section":Array.isArray(i.fields)&&i.fields.length>V&&(t(`more than ${V} fields in a section`),i.fields=i.fields.slice(0,V));break;case"list":if(!Array.isArray(i.items)||i.items.length===0){t("a list without items");continue}i.items.length>j&&(t(`more than ${j} list items`),i.items=i.items.slice(0,j));break;case"actions":{const o=Array.isArray(i.elements)?i.elements:[],a=o.filter(s=>s?.action_id&&s.invoke&&he(s.text));if(a.length!==o.length&&t("an action without action_id, invoke or text"),a.length===0)continue;a.length>Y&&t(`more than ${Y} actions`),i.elements=a.slice(0,Y);break}}n.push(i)}return n}const Vr=/(\*\*|__)(?=\S)([\s\S]*?\S)\1/g,jr=/(\*|_)(?=\S)([^*_\n]*?\S)\1/g;function Ot(e){if(typeof e!="string"||!e)return"";let t=e;return t=t.replace(/```[a-z]*\n?/gi,"").replace(/~~~[a-z]*\n?/gi,""),t=t.replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1"),t=t.replace(/\[([^\]]*)\]\([^)]*\)/g,"$1"),t=t.replace(/\[([^\]]*)\]\[[^\]]*\]/g,"$1"),t=t.replace(/<((?:https?|mailto):[^>\s]+)>/gi,"$1"),t=t.split(`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Oe=10,J=10,Z=10,Q=5,ro=new Set(["header","section","context","divider","image","list","actions","attachments"]);function Se(e){if(typeof e=="string")return e.length>0;if(!e||typeof e!="object")return!1;const t=e;return typeof t.key=="string"||typeof t.value=="string"}function oo(e,t=()=>{}){if(!Array.isArray(e))return[];const n=[];for(const r of e){if(n.length>=Oe){t(`more than ${Oe} blocks; the rest was dropped`);break}if(!r||typeof r!="object")continue;const o=r;if(!ro.has(o.type)){t(`unknown block type ${String(o.type)}`);continue}switch(o.type){case"header":if(!Se(o.text)){t("a header without text");continue}break;case"context":if(!Se(o.text)){t("a context block without text");continue}break;case"image":if(!o.url||!o.alt){t("an image without url or alt");continue}break;case"section":Array.isArray(o.fields)&&o.fields.length>J&&(t(`more than ${J} fields in a section`),o.fields=o.fields.slice(0,J));break;case"list":if(!Array.isArray(o.items)||o.items.length===0){t("a list without items");continue}o.items.length>Z&&(t(`more than ${Z} list items`),o.items=o.items.slice(0,Z));break;case"actions":{const i=Array.isArray(o.elements)?o.elements:[],s=i.filter(a=>a?.action_id&&a.invoke&&Se(a.text));if(s.length!==i.length&&t("an action without action_id, invoke or text"),s.length===0)continue;s.length>Q&&t(`more than ${Q} actions`),o.elements=s.slice(0,Q);break}}n.push(o)}return n}const io=/(\*\*|__)(?=\S)([\s\S]*?\S)\1/g,so=/(\*|_)(?=\S)([^*_\n]*?\S)\1/g;function Pt(e){if(typeof e!="string"||!e)return"";let t=e;return t=t.replace(/```[a-z]*\n?/gi,"").replace(/~~~[a-z]*\n?/gi,""),t=t.replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1"),t=t.replace(/\[([^\]]*)\]\([^)]*\)/g,"$1"),t=t.replace(/\[([^\]]*)\]\[[^\]]*\]/g,"$1"),t=t.replace(/<((?:https?|mailto):[^>\s]+)>/gi,"$1"),t=t.split(`
2
2
  `).map(n=>n.replace(/^\s{0,3}#{1,6}\s+/,"").replace(/^\s{0,3}>\s?/,"").replace(/^\s*[-*+]\s+/,"").replace(/^\s*\d+[.)]\s+/,"").replace(/^\s*(?:[-*_]\s*){3,}$/,"")).join(`
3
- `),t=t.replace(Vr,"$2"),t=t.replace(jr,"$2"),t=t.replace(/~~(?=\S)([\s\S]*?\S)~~/g,"$1"),t=t.replace(/`([^`\n]+)`/g,"$1"),t.replace(/\s+/g," ").trim()}function Mt(e){return e.replace(/<style[\s\S]*?<\/style>/gi," ").replace(/<script[\s\S]*?<\/script>/gi," ").replace(/<[^>]+>/g," ").replace(/&nbsp;/g," ").replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#39;/g,"'").replace(/\s+/g," ").trim()}function G(e){if(!e||e<0)return"";const t=Math.floor(e/60),n=Math.floor(e%60);return`${t}:${n.toString().padStart(2,"0")}`}function et(e){return e?` — ${Math.floor(e/60)}m ${e%60}s`:""}function Ee(e){return e?.split("@")?.[0]||e||""}function W(e){return e.map(t=>t.name).join(", ")}function tt(e){return e==="meeting"?"Meeting":e==="video"?"Video call":"Audio call"}const R={VOICE_CALL_STARTED:{shape:"event",channelKind:"voice",icon:"phone",snippet:()=>"Gesprek gestart",timeline:e=>e.direction==="inbound"?`Inbound call started — ${Ee(e.payload.from)}`:`Outbound call started — ${Ee(e.payload.to)}`},VOICE_CALL_ANSWERED:{shape:"event",channelKind:"voice",icon:"phone",connected:!0,snippet:()=>"Gesprek aangenomen",timeline:(e,t)=>`Call answered — ${t}`},VOICE_CALL_HOLD:{shape:"event",channelKind:"voice",icon:"phone",snippet:()=>"In de wacht",timeline:(e,t)=>`Call on hold — ${t}`},VOICE_CALL_UNHOLD:{shape:"event",channelKind:"voice",icon:"phone",snippet:()=>"Hervat"},VOICE_CALL_ENDED:{shape:"event",channelKind:"voice",icon:"phone",snippet:e=>`Gesprek beëindigd${e.payload.duration?` (${G(e.payload.duration)})`:""}`,timeline:e=>`Call ended${et(e.payload.duration)}`},VOICE_CALL_MISSED:{shape:"event",channelKind:"voice",icon:"phone",snippet:()=>"Gemiste oproep",timeline:e=>`Missed call — ${Ee(e.payload.from)}`},VOICE_CALL_FAILED:{shape:"event",channelKind:"voice",icon:"phone",snippet:()=>"Gesprek mislukt",timeline:()=>"Call failed"},VOICE_CALL_VOICEMAIL:{shape:"artifact",channelKind:"voice",icon:"phone",snippet:e=>e.payload.transcription?.trim()?e.payload.transcription:"Voicemail ontvangen"},VIDEO_CALL_STARTED:{shape:"event",channelKind:"video",icon:"video",snippet:()=>"Gesprek gestart",timeline:()=>"Video call started"},VIDEO_CALL_ANSWERED:{shape:"event",channelKind:"video",icon:"video",connected:!0,snippet:()=>"Gesprek aangenomen",timeline:()=>"Video call answered"},VIDEO_CALL_HOLD:{shape:"event",channelKind:"video",icon:"video",snippet:()=>"In de wacht"},VIDEO_CALL_UNHOLD:{shape:"event",channelKind:"video",icon:"video",snippet:()=>"Hervat"},VIDEO_CALL_ENDED:{shape:"event",channelKind:"video",icon:"video",snippet:e=>`Gesprek beëindigd${e.payload.duration?` (${G(e.payload.duration)})`:""}`,timeline:()=>"Video call ended"},VIDEO_CALL_MISSED:{shape:"event",channelKind:"video",icon:"video",snippet:()=>"Gemiste oproep",timeline:()=>"Missed video call"},VIDEO_CALL_FAILED:{shape:"event",channelKind:"video",icon:"video",snippet:()=>"Gesprek mislukt",timeline:()=>"Video call failed"},EMAIL_RECEIVED:{shape:"message",triggerable:!0,displayNameKey:"communication:activity.EMAIL_RECEIVED",component:"communication:EmailActivity",channelKind:"mail",icon:"mail",replyable:!0,carriesText:!0,countsAs:"inbound_message",snippet:nt},EMAIL_SENT:{shape:"message",component:"communication:EmailActivity",channelKind:"mail",icon:"mail",replyable:!0,carriesText:!0,countsAs:"outbound_message",snippet:nt},CHAT_MESSAGE_SENT:{shape:"message",component:"communication:ChatMessage",channelKind:"chat",icon:"message-circle",replyable:!0,carriesText:!0,countsAs:"outbound_message",snippet:e=>e.payload.text??""},CHAT_MESSAGE_RECEIVED:{shape:"message",triggerable:!0,displayNameKey:"communication:activity.CHAT_MESSAGE_RECEIVED",component:"communication:ChatMessage",channelKind:"chat",icon:"message-circle",replyable:!0,carriesText:!0,countsAs:"inbound_message",snippet:e=>e.payload.text??""},CHAT_MEMBER_JOINED:{shape:"event",channelKind:"chat",icon:"message-circle",snippet:e=>`${W(e.payload.members)} toegevoegd`,timeline:e=>{const t=W(e.payload.members)||"Someone",n=e.payload.initiator?.name?` · added by ${e.payload.initiator.name}`:"";return`${t} joined the chat${n}`}},CHAT_MEMBER_LEFT:{shape:"event",channelKind:"chat",icon:"message-circle",snippet:e=>`${W(e.payload.members)} verlaten`,timeline:e=>{const t=W(e.payload.members)||"Someone",n=e.payload.initiator?.name?` · removed by ${e.payload.initiator.name}`:"";return`${t} left the chat${n}`}},CHAT_RENAMED:{shape:"event",channelKind:"chat",icon:"message-circle",snippet:e=>`Hernoemd naar "${e.payload.newName}"`,timeline:e=>`Chat renamed to "${e.payload.newName}"${e.payload.initiator?` by ${e.payload.initiator.name}`:""}`},CHAT_CALL_STARTED:{shape:"event",channelKind:"chat",icon:"message-circle",snippet:()=>"Gesprek gestart",timeline:e=>`${tt(e.payload.callType)} started${e.payload.initiator?` by ${e.payload.initiator.name}`:""}`,joinUrl:e=>e.payload.joinUrl},CHAT_CALL_ENDED:{shape:"event",channelKind:"chat",icon:"message-circle",snippet:e=>`Gesprek beëindigd${e.payload.duration?` (${G(e.payload.duration)})`:""}`,timeline:e=>`${tt(e.payload.callType)} ended${et(e.payload.duration)}`,joinUrl:e=>e.payload.joinUrl},CHAT_EVENT:{shape:"event",channelKind:"chat",icon:"message-circle",snippet:e=>e.payload.text??e.payload.eventType,timeline:e=>e.payload.text||e.payload.eventType},TRANSCRIPT_ADDED:{shape:"artifact",triggerable:!0,displayNameKey:"communication:activity.TRANSCRIPT_ADDED",component:"communication:TranscriptionActivity",icon:"captions",carriesText:!0,snippet:e=>(e.payload.segments??[]).map(t=>t.text).join(" ")},COMMENT_ADDED:{shape:"note",component:"communication:CommentActivity",icon:"sticky-note",carriesText:!0,snippet:e=>e.payload.text??""},FILE_UPLOADED:{shape:"artifact",component:"communication:FileActivity",icon:"paperclip",snippet:e=>`Bestand: ${e.payload.fileName}`},AI_MESSAGE_ADDED:{shape:"event",triggerable:!0,displayNameKey:"communication:activity.AI_MESSAGE_ADDED",icon:"circle",snippet:e=>e.payload.output?.text??e.payload.input?.text??"",timeline:()=>"AI message added"},AI_ACTION_PROPOSED:{shape:"event",component:"communication:ProposedActionCard",icon:"circle",playbookAuthored:!0,snippet:e=>`Voorstel wacht op goedkeuring (${e.payload.actions?.length??0} actie(s))`},PLAYBOOK_STARTED:{shape:"event",icon:"circle",playbookAuthored:!0,snippet:e=>`Playbook gestart${e.payload.playbookName?`: ${e.payload.playbookName}`:""}`,timeline:e=>`Playbook gestart${e.payload.playbookName?` — ${e.payload.playbookName}`:""}`},PLAYBOOK_COMPLETED:{shape:"event",icon:"circle",playbookAuthored:!0,snippet:()=>"Playbook afgerond",timeline:()=>"Playbook afgerond"},PLAYBOOK_ESCALATED:{shape:"event",icon:"circle",playbookAuthored:!0,snippet:()=>"Playbook geëscaleerd naar een mens",timeline:()=>"Playbook geëscaleerd naar een mens"},MEETING_SCHEDULED:{shape:"event",icon:"calendar",snippet:e=>`Vergadering gepland: ${e.payload.title}`,timeline:()=>"Meeting scheduled",joinUrl:e=>e.payload.joinUrl},MEETING_STARTED:{shape:"event",icon:"calendar",connected:!0,snippet:e=>`Vergadering gestart: ${e.payload.title}`,timeline:()=>"Meeting started",joinUrl:e=>e.payload.joinUrl},MEETING_ENDED:{shape:"event",icon:"calendar",snippet:e=>`Vergadering beëindigd${e.payload.duration?` (${G(e.payload.duration)})`:""}`,timeline:()=>"Meeting ended"},MEETING_PARTICIPANT_JOINED:{shape:"event",icon:"calendar",snippet:e=>`${e.payload.name} deelgenomen`,timeline:(e,t)=>`${t} joined the meeting`},MEETING_PARTICIPANT_LEFT:{shape:"event",icon:"calendar",snippet:e=>`${e.payload.name} verlaten`,timeline:(e,t)=>`${t} left the meeting`},INTERACTION_CREATED:{shape:"event",icon:"circle",snippet:()=>"Interactie aangemaakt",timeline:(e,t)=>`Interaction started by ${t}`},INTERACTION_STATUS_CHANGED:{shape:"event",triggerable:!0,displayNameKey:"communication:activity.INTERACTION_STATUS_CHANGED",icon:"circle-dot",snippet:e=>`Status: ${e.payload.fromStatus} → ${e.payload.toStatus}`,timeline:(e,t)=>`Status changed to ${e.payload.toStatus} by ${t}`},INTERACTION_ASSIGNED:{shape:"event",icon:"user",snippet:()=>"Interactie toegewezen",timeline:(e,t)=>`Assigned by ${t}`},SLA_BREACHED:{shape:"event",triggerable:!0,displayNameKey:"communication:activity.SLA_BREACHED",icon:"alarm-clock",snippet:e=>`SLA verlopen: ${e.payload.metric}`,timeline:e=>`SLA target ${e.payload.metric} passed its deadline`},WORK_COMMENT_ADDED:{shape:"note",icon:"sticky-note",carriesText:!0,snippet:()=>"Reactie"},WORK_ITEM_ASSIGNED:{shape:"event",icon:"user",snippet:()=>"Taak toegewezen",timeline:(e,t)=>`Assigned by ${t}`},WORK_ITEM_STATUS_CHANGED:{shape:"event",triggerable:!0,icon:"circle-dot",snippet:()=>"Status gewijzigd",timeline:(e,t)=>`Status changed by ${t}`}};function nt(e){const t=e.payload,n=Ot(t.bodyText).trim()||t.bodySnippet?.trim()||Mt(t.body??"");return t.subject?`${t.subject} — ${n}`:n}function A(e){return R[e]}function Yr(e){return A(e)?.icon??"circle"}function Xr(e){return A(e)?.channelKind}function Le(e){return e==="message"||e==="note"}function zr(e){return Le(A(e)?.shape)}function Pe(e){return e==="note"}function qr(e){return Pe(A(e)?.shape)}function Jr(e){return A(e)?.replyable===!0}function Zr(e){return A(e)?.carriesText===!0}function Rt(e){return A(e)?.countsAs}function Qr(e){return A(e)?.playbookAuthored===!0}function ei(e){return A(e)?.connected===!0}function ti(e){const t=A(e);return t?.shape==="artifact"&&t?.carriesText===!0}function wt(e){const t=A(e.type)?.snippet;return t?t(e):""}function ni(e,t){const n=A(e.type)?.timeline;return n?n(e,t):e.type.replace(/_/g," ").toLowerCase()}function ri(e){const t=A(e.type)?.joinUrl;return t?t(e):void 0}function Q(e,t){let n=e;for(const r of t.split(".")){if(n==null||typeof n!="object")return"";n=n[r]}return n==null?"":typeof n=="string"?n:typeof n=="number"||typeof n=="boolean"?String(n):""}function ee(e,t,n){if(e===void 0)return null;if(typeof e=="string")return e||null;if("value"in e)return Q(t,e.value)||null;const r={};for(const[o,a]of Object.entries(e.params??{}))r[o]=Q(t,a);const i=n(e.key,r);return i===e.key?null:i}function Ct(e,t){if(!e||typeof e=="string"||"value"in e)return null;const n={};for(const[r,i]of Object.entries(e.params??{}))n[r]=Q(t,i);return{key:e.key,params:n}}const rt=140;function ii(e){const t=e.trim();return t.length<=rt?t:`${t.slice(0,rt-1).trimEnd()}…`}function oi(e,t){const n=Ct(t?.text,e),r=t?ee(t.text,e,i=>i):null;return{activityId:e.id,type:e.type,snippet:ii(r??wt(e)),authorName:e.author?.name??"",direction:e.direction,createdAt:e.createdAt??Date.now(),...n?{snippetKey:n.key,snippetParams:n.params}:{}}}const ai=e=>e;function it(e){const t=R[e];return{type:e,shape:t.shape,channelKind:t.channelKind,icon:t.icon,replyable:t.replyable===!0,countsAs:t.countsAs,carriesText:t.carriesText===!0,triggerable:t.triggerable===!0,component:t.component,builtIn:!0,displayNameKey:t.displayNameKey}}function ot(e){return{type:e.type,shape:e.shape,channelKind:e.channelKind,icon:e.icon||"circle",replyable:e.replyable===!0,countsAs:e.countsAs,carriesText:e.carriesText===!0,triggerable:e.triggerable===!0,component:e.component,builtIn:!1,displayNameKey:e.displayNameKey}}class Nt{constructor(t=[],n=ai){this.translate=n;for(const r of t)r?.type&&(r.type in R||this.declared.has(r.type)||this.declared.set(r.type,r))}declared=new Map;get(t){if(t in R)return it(t);const n=this.declared.get(t);return n?ot(n):void 0}triggerable(){const t=Object.keys(R).filter(r=>R[r].triggerable).map(it),n=[...this.declared.values()].map(ot).filter(r=>r.triggerable);return[...t,...n]}timelineText(t,n){const r=R[t.type];if(r?.timeline)return r.timeline(t,n);const i=this.declared.get(t.type);return ee(i?.text,t,this.translate)??t.type.replace(/_/g," ").toLowerCase()}snippet(t){const n=R[t.type];if(n?.snippet)return n.snippet(t);const r=this.declared.get(t.type);return ee(r?.text,t,this.translate)??""}descriptor(t){return this.declared.get(t)}blocks(t){const n=this.declared.get(t)?.render;return n?.length?n:void 0}isMessage(t){return Le(this.get(t)?.shape)}nestsUnderParent(t){return Pe(this.get(t)?.shape)}isReplyable(t){return this.get(t)?.replyable===!0}carriesText(t){return this.get(t)?.carriesText===!0}countsAs(t){return this.get(t)?.countsAs}channelKind(t){return this.get(t)?.channelKind}isTranscript(t){const n=this.get(t);return n?.shape==="artifact"&&n.carriesText}get translator(){return this.translate}}const si=new Nt;function ci(e,t,n=[]){const r=e.createdAt;if(!r)return[];const i=new Set(n);return e.author.type==="user"&&e.author.id&&i.add(e.author.id),Object.entries(t).filter(([o,a])=>a>=r&&!i.has(o)).map(([o])=>o)}function kt(e){return e.createdAt??0}function li(e){return e.type==="EMAIL_RECEIVED"||e.type==="EMAIL_SENT"}function ui(e){return e.type==="CHAT_MESSAGE_SENT"||e.type==="CHAT_MESSAGE_RECEIVED"}const Ue=[{id:"openai",attachmentKinds:["image","pdf"],label:"OpenAI",capabilities:["chat","transcription","embedding"],defaultModel:"gpt-5-mini",baseUrl:"https://api.openai.com/v1"},{id:"gemini",attachmentKinds:["image","pdf"],label:"Google Gemini",capabilities:["chat","transcription","embedding"],defaultModel:"gemini-3.5-flash",baseUrl:"https://generativelanguage.googleapis.com/v1beta"},{id:"anthropic",attachmentKinds:["image","pdf"],label:"Anthropic",capabilities:["chat"],defaultModel:"claude-haiku-4-5",baseUrl:"https://api.anthropic.com/v1"},{id:"elevenlabs",label:"ElevenLabs",capabilities:["transcription"],baseUrl:"https://api.elevenlabs.io/v1"},{id:"moonshot",label:"Moonshot (Kimi)",capabilities:["chat"],defaultModel:"kimi-k3",baseUrl:"https://api.moonshot.ai/v1"},{id:"deepseek",label:"DeepSeek",capabilities:["chat"],defaultModel:"deepseek-v4-flash",baseUrl:"https://api.deepseek.com/v1"},{id:"groq",label:"Groq",capabilities:["chat"],defaultModel:"openai/gpt-oss-120b",baseUrl:"https://api.groq.com/openai/v1"},{id:"mistral",label:"Mistral",capabilities:["chat"],defaultModel:"mistral-large-latest",baseUrl:"https://api.mistral.ai/v1"},{id:"openrouter",label:"OpenRouter",capabilities:["chat"],defaultModel:"openrouter/auto",baseUrl:"https://openrouter.ai/api/v1"},{id:"ollama",label:"Ollama (self-hosted)",capabilities:["chat"],defaultModel:"llama3.3"},{id:"openai-compatible",label:"OpenAI-compatible (eigen endpoint)",capabilities:["chat"],defaultModel:"default"}];function $(e){return Ue.find(t=>t.id===e)}function di(e){return $(e)?.label??e}function pi(e,t="gpt-5-mini"){return $(e)?.defaultModel??t}function fi(e){return Ue.filter(t=>t.capabilities.includes(e))}function mi(e){const t=$(e);return!!t&&!t.baseUrl}function gi(e,t){return t==="text"?!0:$(e)?.attachmentKinds?.includes(t)===!0}function hi(e,t){if(!e.enabled)return"ok";const n=be(e.hardLimitNanos),r=be(e.softLimitNanos);return n!==void 0&&t>=n?"hard":r!==void 0&&t>=r?"soft":"ok"}function be(e){return typeof e=="number"?e:void 0}function vt(e,t="month"){const n=new Date(e);return Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),1)}function Ei(e,t="month"){const n=new Date(vt(e,t));return`${n.getUTCFullYear()}-${String(n.getUTCMonth()+1).padStart(2,"0")}`}function yi(e){return e?.listeningEnabled!==!1}const _i=[{id:"agent",label:"Agent",labelSource:"user"},{id:"team",label:"Team",labelSource:"team"},{id:"inbox",label:"Inbox",labelSource:"inbox"},{id:"channel",label:"Kanaal",labelSource:"channel"},{id:"provider",label:"Provider",labelSource:"raw"},{id:"status",label:"Status",labelSource:"raw"},{id:"handledBy",label:"Afhandelaar",labelSource:"raw"},{id:"time",label:"Tijd",labelSource:"raw"}];function ye(e){return e<10?`0${e}`:`${e}`}function N(e,t){const n=new Date(e),r=`${n.getUTCFullYear()}-${ye(n.getUTCMonth()+1)}-${ye(n.getUTCDate())}`;return t==="day"?r:`${r}T${ye(n.getUTCHours())}`}function L(e,t){const n=new Date(e);return n.setUTCMinutes(0,0,0),t==="day"&&n.setUTCHours(0),n.getTime()}const Ai=36e5,Si=864e5;function bi(e,t,n){const r=n==="hour"?Ai:Si,i=[];for(let o=L(e,n);o<=t;o+=r)i.push(N(o,n));return i}const Ti=new Set(["time"]);function Ii(e,t,n){if(!e)return[];const r=new Set(e.supportedDimensions??[]);return t.filter(i=>r.has(i.id)&&!Ti.has(i.id)).map(i=>({id:i.id,label:i.label,options:i.options?.length?i.options:n[i.id]??[]})).filter(i=>i.options.length>0)}function Oi(e,t){const n=t.find(i=>i.id===e.dimensionId),r=n?.options.find(i=>i.value===e.value);return`${n?.label??e.dimensionId} · ${r?.label??e.value}`}function Mi(e){return{value:e.id,label:`${e.category} · ${e.label}`}}const Dt=[{id:"resource",label:"Resource",labelSource:"raw"},{id:"origin",label:"Herkomst",labelSource:"raw"}],xt=Dt.map(e=>e.id);function Lt(e,t){return`${e}.usage.${t}`}function Ri(e,t){return t.map(n=>({id:Lt(e,n.unit),label:n.label,category:"Verbruik",valueType:n.valueType??"count",aggregation:"sum",supportedDimensions:["provider",...xt,...n.extraDimensions??[],"time"]}))}const Pt=new Set(["info","success","warning","destructive"]),Te=200,Ie=100,Oe=200,Me=12,Re=4,Ke=4e3,X=500,wi=256*1024,Ci=new Set(["heading","paragraph","list","quote","code","divider","table","kpi","callout"]),Ut=["http:","https:","mailto:","tel:"],Ni=/^[a-z][a-z0-9+.-]*:/i;function Kt(e){const t=e.trim().replace(/^<|>$/g,"");if(!t)return!1;const n=Ni.exec(t)?.[0];return n?Ut.includes(n.toLowerCase()):!t.startsWith("//")}const ki=/^[ \t]{0,3}\[([^\]]+)\]:[ \t]*(\S+).*$/gm;function vi(e){let t="",n=0;for(;n<e.length;){const r=e[n]==="!"&&e[n+1]==="[";if(e[n]!=="["&&!r){t+=e[n],n+=1;continue}const i=n+(r?2:1),o=at(e,i,"[","]");if(o<0||e[o+1]!=="("){t+=e[n],n+=1;continue}const a=at(e,o+2,"(",")");if(a<0){t+=e[n],n+=1;continue}const s=e.slice(i,o),c=e.slice(o+2,a).trim().split(/\s+/)[0]??"";t+=r||!Kt(c)?s:e.slice(n,a+1),n=a+1}return t}function at(e,t,n,r){let i=1;for(let o=t;o<e.length;o+=1){if(e[o]==="\\"){o+=1;continue}if(e[o]===n)i+=1;else if(e[o]===r&&(i-=1,i===0))return o}return-1}function $t(e){return vi(e).replace(ki,(t,n,r)=>Kt(r)?t:"")}function b(e,t=Ke){return typeof e=="string"?$t(e).slice(0,t):""}function Di(e,t=Ke){return typeof e=="string"?e.slice(0,t):""}function xi(e,t="info"){return typeof e=="string"&&Pt.has(e)?e:t}function Li(e,t=()=>{}){if(!Array.isArray(e))return[];const n=[];for(const r of e){if(n.length>=Te){t(`more than ${Te} blocks; the rest was dropped`);break}if(!r||typeof r!="object")continue;const i=r;if(!Ci.has(i.type)){t(`unknown block type ${String(i.type)}`);continue}const o=typeof i.block_id=="string"?{block_id:i.block_id}:{};switch(i.type){case"heading":{const a=b(i.text);if(!a){t("a heading without text");continue}const s=i.level===2||i.level===3?i.level:1;n.push({...o,type:"heading",level:s,text:a});break}case"paragraph":{const a=b(i.text);if(!a){t("a paragraph without text");continue}n.push({...o,type:"paragraph",text:a});break}case"quote":{const a=b(i.text);if(!a){t("a quote without text");continue}n.push({...o,type:"quote",text:a});break}case"code":{const a=Di(i.text);if(!a){t("a code block without text");continue}const s=typeof i.lang=="string"?{lang:i.lang.slice(0,32)}:{};n.push({...o,type:"code",...s,text:a});break}case"divider":n.push({...o,type:"divider"});break;case"list":{const a=Array.isArray(i.items)?i.items:[],s=[];for(const l of a){if(s.length>=Ie){t(`more than ${Ie} list items`);break}const d=b(l?.text);if(!d)continue;const h=b(l?.lead,200);s.push(h?{lead:h,text:d}:{text:d})}if(s.length===0){t("a list without usable items");continue}const c=i.style==="numbered"?"numbered":"bulleted";n.push({...o,type:"list",style:c,items:s});break}case"table":{const a=Array.isArray(i.columns)?i.columns:[],s=[];for(const h of a){if(s.length>=Me){t(`more than ${Me} table columns`);break}const _=b(h?.label,X),S=h?.align==="right"?"right":void 0;s.push(S?{label:_,align:S}:{label:_})}if(s.length===0){t("a table without columns");continue}const c=Array.isArray(i.rows)?i.rows:[],l=[];for(const h of c){if(l.length>=Oe){t(`more than ${Oe} table rows`);break}const _=Array.isArray(h)?h:[];l.push(s.map((S,M)=>b(_[M],X)))}const d=b(i.caption,X);n.push({...o,type:"table",columns:s,rows:l,...d?{caption:d}:{}});break}case"kpi":{const a=Array.isArray(i.items)?i.items:[],s=[];for(const c of a){if(s.length>=Re){t(`more than ${Re} kpi items`);break}const l=b(c?.value,40),d=b(c?.label,80);if(!l||!d)continue;const h=c?.tone;s.push(typeof h=="string"&&Pt.has(h)?{value:l,label:d,tone:h}:{value:l,label:d})}if(s.length===0){t("a kpi block without usable items");continue}n.push({...o,type:"kpi",items:s});break}case"callout":{const a=b(i.text);if(!a){t("a callout without text");continue}const s=b(i.title,200);n.push({...o,type:"callout",tone:xi(i.tone),...s?{title:s}:{},text:a});break}}}return n}function Pi(e){return JSON.stringify(e).length}function Ui(e){return{blocks:e.length,types:e.map(t=>t.type),headings:e.flatMap(t=>t.type==="heading"?[t.text]:[])}}function st(e){return e.replace(/\|/g,"\\|").replace(/\r?\n/g," ").trim()}function ct(e,t,n){const r=e.map((i,o)=>n?.[o]==="right"?"---:":"---");return[`| ${e.map(st).join(" | ")} |`,`| ${r.join(" | ")} |`,...t.map(i=>`| ${i.map(st).join(" | ")} |`)]}function Ki(e){switch(e.type){case"heading":return[`${"#".repeat(e.level)} ${e.text}`];case"paragraph":return[e.text];case"quote":return e.text.split(/\r?\n/).map(t=>`> ${t}`);case"code":return[`\`\`\`${e.lang??""}`,e.text,"```"];case"divider":return["---"];case"list":return e.items.map((t,n)=>{const r=e.style==="numbered"?`${n+1}.`:"-";return t.lead?`${r} **${t.lead}** ${t.text}`:`${r} ${t.text}`});case"table":{const t=ct(e.columns.map(n=>n.label),e.rows,e.columns.map(n=>n.align??"left"));return e.caption?[...t,"",`*${e.caption}*`]:t}case"kpi":return ct(e.items.map(t=>t.value),[e.items.map(t=>t.label)]);case"callout":return(e.title?`**${e.title}** ${e.text}`:e.text).split(/\r?\n/).map(n=>`> ${n}`)}}function $i(e,t){const n=[],r=e.some(i=>i.type==="heading"&&i.level===1);t&&!r&&n.push(`# ${t}`);for(const i of e){const o=Ki(i);o.length>0&&n.push(o.join(`
3
+ `),t=t.replace(io,"$2"),t=t.replace(so,"$2"),t=t.replace(/~~(?=\S)([\s\S]*?\S)~~/g,"$1"),t=t.replace(/`([^`\n]+)`/g,"$1"),t.replace(/\s+/g," ").trim()}function Ut(e){return e.replace(/<style[\s\S]*?<\/style>/gi," ").replace(/<script[\s\S]*?<\/script>/gi," ").replace(/<[^>]+>/g," ").replace(/&nbsp;/g," ").replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#39;/g,"'").replace(/\s+/g," ").trim()}function X(e){if(!e||e<0)return"";const t=Math.floor(e/60),n=Math.floor(e%60);return`${t}:${n.toString().padStart(2,"0")}`}function ct(e){return e?` — ${Math.floor(e/60)}m ${e%60}s`:""}function be(e){return e?.split("@")?.[0]||e||""}function z(e){return e.map(t=>t.name).join(", ")}function lt(e){return e==="meeting"?"Meeting":e==="video"?"Video call":"Audio call"}const N={VOICE_CALL_STARTED:{shape:"event",channelKind:"voice",icon:"phone",snippet:()=>"Gesprek gestart",timeline:e=>e.direction==="inbound"?`Inbound call started — ${be(e.payload.from)}`:`Outbound call started — ${be(e.payload.to)}`},VOICE_CALL_ANSWERED:{shape:"event",channelKind:"voice",icon:"phone",connected:!0,snippet:()=>"Gesprek aangenomen",timeline:(e,t)=>`Call answered — ${t}`},VOICE_CALL_HOLD:{shape:"event",channelKind:"voice",icon:"phone",snippet:()=>"In de wacht",timeline:(e,t)=>`Call on hold — ${t}`},VOICE_CALL_UNHOLD:{shape:"event",channelKind:"voice",icon:"phone",snippet:()=>"Hervat"},VOICE_CALL_ENDED:{shape:"event",channelKind:"voice",icon:"phone",snippet:e=>`Gesprek beëindigd${e.payload.duration?` (${X(e.payload.duration)})`:""}`,timeline:e=>`Call ended${ct(e.payload.duration)}`},VOICE_CALL_MISSED:{shape:"event",channelKind:"voice",icon:"phone",snippet:()=>"Gemiste oproep",timeline:e=>`Missed call — ${be(e.payload.from)}`},VOICE_CALL_FAILED:{shape:"event",channelKind:"voice",icon:"phone",snippet:()=>"Gesprek mislukt",timeline:()=>"Call failed"},VOICE_CALL_VOICEMAIL:{shape:"artifact",channelKind:"voice",icon:"phone",snippet:e=>e.payload.transcription?.trim()?e.payload.transcription:"Voicemail ontvangen"},VIDEO_CALL_STARTED:{shape:"event",channelKind:"video",icon:"video",snippet:()=>"Gesprek gestart",timeline:()=>"Video call started"},VIDEO_CALL_ANSWERED:{shape:"event",channelKind:"video",icon:"video",connected:!0,snippet:()=>"Gesprek aangenomen",timeline:()=>"Video call answered"},VIDEO_CALL_HOLD:{shape:"event",channelKind:"video",icon:"video",snippet:()=>"In de wacht"},VIDEO_CALL_UNHOLD:{shape:"event",channelKind:"video",icon:"video",snippet:()=>"Hervat"},VIDEO_CALL_ENDED:{shape:"event",channelKind:"video",icon:"video",snippet:e=>`Gesprek beëindigd${e.payload.duration?` (${X(e.payload.duration)})`:""}`,timeline:()=>"Video call ended"},VIDEO_CALL_MISSED:{shape:"event",channelKind:"video",icon:"video",snippet:()=>"Gemiste oproep",timeline:()=>"Missed video call"},VIDEO_CALL_FAILED:{shape:"event",channelKind:"video",icon:"video",snippet:()=>"Gesprek mislukt",timeline:()=>"Video call failed"},EMAIL_RECEIVED:{shape:"message",triggerable:!0,displayNameKey:"communication:activity.EMAIL_RECEIVED",component:"communication:EmailActivity",channelKind:"mail",icon:"mail",replyable:!0,carriesText:!0,countsAs:"inbound_message",snippet:ut},EMAIL_SENT:{shape:"message",component:"communication:EmailActivity",channelKind:"mail",icon:"mail",replyable:!0,carriesText:!0,countsAs:"outbound_message",snippet:ut},CHAT_MESSAGE_SENT:{shape:"message",component:"communication:ChatMessage",channelKind:"chat",icon:"message-circle",replyable:!0,carriesText:!0,countsAs:"outbound_message",snippet:e=>e.payload.text??""},CHAT_MESSAGE_RECEIVED:{shape:"message",triggerable:!0,displayNameKey:"communication:activity.CHAT_MESSAGE_RECEIVED",component:"communication:ChatMessage",channelKind:"chat",icon:"message-circle",replyable:!0,carriesText:!0,countsAs:"inbound_message",snippet:e=>e.payload.text??""},CHAT_MEMBER_JOINED:{shape:"event",channelKind:"chat",icon:"message-circle",snippet:e=>`${z(e.payload.members)} toegevoegd`,timeline:e=>{const t=z(e.payload.members)||"Someone",n=e.payload.initiator?.name?` · added by ${e.payload.initiator.name}`:"";return`${t} joined the chat${n}`}},CHAT_MEMBER_LEFT:{shape:"event",channelKind:"chat",icon:"message-circle",snippet:e=>`${z(e.payload.members)} verlaten`,timeline:e=>{const t=z(e.payload.members)||"Someone",n=e.payload.initiator?.name?` · removed by ${e.payload.initiator.name}`:"";return`${t} left the chat${n}`}},CHAT_RENAMED:{shape:"event",channelKind:"chat",icon:"message-circle",snippet:e=>`Hernoemd naar "${e.payload.newName}"`,timeline:e=>`Chat renamed to "${e.payload.newName}"${e.payload.initiator?` by ${e.payload.initiator.name}`:""}`},CHAT_CALL_STARTED:{shape:"event",channelKind:"chat",icon:"message-circle",snippet:()=>"Gesprek gestart",timeline:e=>`${lt(e.payload.callType)} started${e.payload.initiator?` by ${e.payload.initiator.name}`:""}`,joinUrl:e=>e.payload.joinUrl},CHAT_CALL_ENDED:{shape:"event",channelKind:"chat",icon:"message-circle",snippet:e=>`Gesprek beëindigd${e.payload.duration?` (${X(e.payload.duration)})`:""}`,timeline:e=>`${lt(e.payload.callType)} ended${ct(e.payload.duration)}`,joinUrl:e=>e.payload.joinUrl},CHAT_EVENT:{shape:"event",channelKind:"chat",icon:"message-circle",snippet:e=>e.payload.text??e.payload.eventType,timeline:e=>e.payload.text||e.payload.eventType},TRANSCRIPT_ADDED:{shape:"artifact",triggerable:!0,displayNameKey:"communication:activity.TRANSCRIPT_ADDED",component:"communication:TranscriptionActivity",icon:"captions",carriesText:!0,snippet:e=>(e.payload.segments??[]).map(t=>t.text).join(" ")},COMMENT_ADDED:{shape:"note",component:"communication:CommentActivity",icon:"sticky-note",carriesText:!0,snippet:e=>e.payload.text??""},FILE_UPLOADED:{shape:"artifact",component:"communication:FileActivity",icon:"paperclip",snippet:e=>`Bestand: ${e.payload.fileName}`},AI_MESSAGE_ADDED:{shape:"event",triggerable:!0,displayNameKey:"communication:activity.AI_MESSAGE_ADDED",icon:"circle",snippet:e=>e.payload.output?.text??e.payload.input?.text??"",timeline:()=>"AI message added"},AI_ACTION_PROPOSED:{shape:"event",component:"communication:ProposedActionCard",icon:"circle",playbookAuthored:!0,snippet:e=>`Voorstel wacht op goedkeuring (${e.payload.actions?.length??0} actie(s))`},PLAYBOOK_STARTED:{shape:"event",icon:"circle",playbookAuthored:!0,snippet:e=>`Playbook gestart${e.payload.playbookName?`: ${e.payload.playbookName}`:""}`,timeline:e=>`Playbook gestart${e.payload.playbookName?` — ${e.payload.playbookName}`:""}`},PLAYBOOK_COMPLETED:{shape:"event",icon:"circle",playbookAuthored:!0,snippet:()=>"Playbook afgerond",timeline:()=>"Playbook afgerond"},PLAYBOOK_ESCALATED:{shape:"event",icon:"circle",playbookAuthored:!0,snippet:()=>"Playbook geëscaleerd naar een mens",timeline:()=>"Playbook geëscaleerd naar een mens"},MEETING_SCHEDULED:{shape:"event",icon:"calendar",snippet:e=>`Vergadering gepland: ${e.payload.title}`,timeline:()=>"Meeting scheduled",joinUrl:e=>e.payload.joinUrl},MEETING_STARTED:{shape:"event",icon:"calendar",connected:!0,snippet:e=>`Vergadering gestart: ${e.payload.title}`,timeline:()=>"Meeting started",joinUrl:e=>e.payload.joinUrl},MEETING_ENDED:{shape:"event",icon:"calendar",snippet:e=>`Vergadering beëindigd${e.payload.duration?` (${X(e.payload.duration)})`:""}`,timeline:()=>"Meeting ended"},MEETING_PARTICIPANT_JOINED:{shape:"event",icon:"calendar",snippet:e=>`${e.payload.name} deelgenomen`,timeline:(e,t)=>`${t} joined the meeting`},MEETING_PARTICIPANT_LEFT:{shape:"event",icon:"calendar",snippet:e=>`${e.payload.name} verlaten`,timeline:(e,t)=>`${t} left the meeting`},INTERACTION_CREATED:{shape:"event",icon:"circle",snippet:()=>"Interactie aangemaakt",timeline:(e,t)=>`Interaction started by ${t}`},INTERACTION_STATUS_CHANGED:{shape:"event",triggerable:!0,displayNameKey:"communication:activity.INTERACTION_STATUS_CHANGED",icon:"circle-dot",snippet:e=>`Status: ${e.payload.fromStatus} → ${e.payload.toStatus}`,timeline:(e,t)=>`Status changed to ${e.payload.toStatus} by ${t}`},INTERACTION_ASSIGNED:{shape:"event",icon:"user",snippet:()=>"Interactie toegewezen",timeline:(e,t)=>`Assigned by ${t}`},SLA_BREACHED:{shape:"event",triggerable:!0,displayNameKey:"communication:activity.SLA_BREACHED",icon:"alarm-clock",snippet:e=>`SLA verlopen: ${e.payload.metric}`,timeline:e=>`SLA target ${e.payload.metric} passed its deadline`},WORK_COMMENT_ADDED:{shape:"note",icon:"sticky-note",carriesText:!0,snippet:()=>"Reactie"},WORK_ITEM_ASSIGNED:{shape:"event",icon:"user",snippet:()=>"Taak toegewezen",timeline:(e,t)=>`Assigned by ${t}`},WORK_ITEM_STATUS_CHANGED:{shape:"event",triggerable:!0,icon:"circle-dot",snippet:()=>"Status gewijzigd",timeline:(e,t)=>`Status changed by ${t}`}};function ut(e){const t=e.payload,n=Pt(t.bodyText).trim()||t.bodySnippet?.trim()||Ut(t.body??"");return t.subject?`${t.subject} — ${n}`:n}function O(e){return N[e]}function ao(e){return O(e)?.icon??"circle"}function co(e){return O(e)?.channelKind}function Be(e){return e==="message"||e==="note"}function lo(e){return Be(O(e)?.shape)}function He(e){return e==="note"}function uo(e){return He(O(e)?.shape)}function po(e){return O(e)?.replyable===!0}function fo(e){return O(e)?.carriesText===!0}function Kt(e){return O(e)?.countsAs}function mo(e){return O(e)?.playbookAuthored===!0}function go(e){return O(e)?.connected===!0}function ho(e){const t=O(e);return t?.shape==="artifact"&&t?.carriesText===!0}function $t(e){const t=O(e.type)?.snippet;return t?t(e):""}function Eo(e,t){const n=O(e.type)?.timeline;return n?n(e,t):e.type.replace(/_/g," ").toLowerCase()}function yo(e){const t=O(e.type)?.joinUrl;return t?t(e):void 0}function ie(e,t){let n=e;for(const r of t.split(".")){if(n==null||typeof n!="object")return"";n=n[r]}return n==null?"":typeof n=="string"?n:typeof n=="number"||typeof n=="boolean"?String(n):""}function se(e,t,n){if(e===void 0)return null;if(typeof e=="string")return e||null;if("value"in e)return ie(t,e.value)||null;const r={};for(const[i,s]of Object.entries(e.params??{}))r[i]=ie(t,s);const o=n(e.key,r);return o===e.key?null:o}function Ft(e,t){if(!e||typeof e=="string"||"value"in e)return null;const n={};for(const[r,o]of Object.entries(e.params??{}))n[r]=ie(t,o);return{key:e.key,params:n}}const dt=140;function Ao(e){const t=e.trim();return t.length<=dt?t:`${t.slice(0,dt-1).trimEnd()}…`}function _o(e,t){const n=Ft(t?.text,e),r=t?se(t.text,e,o=>o):null;return{activityId:e.id,type:e.type,snippet:Ao(r??$t(e)),authorName:e.author?.name??"",direction:e.direction,createdAt:e.createdAt??Date.now(),...n?{snippetKey:n.key,snippetParams:n.params}:{}}}const So=e=>e;function pt(e){const t=N[e];return{type:e,shape:t.shape,channelKind:t.channelKind,icon:t.icon,replyable:t.replyable===!0,countsAs:t.countsAs,carriesText:t.carriesText===!0,triggerable:t.triggerable===!0,component:t.component,builtIn:!0,displayNameKey:t.displayNameKey}}function ft(e){return{type:e.type,shape:e.shape,channelKind:e.channelKind,icon:e.icon||"circle",replyable:e.replyable===!0,countsAs:e.countsAs,carriesText:e.carriesText===!0,triggerable:e.triggerable===!0,component:e.component,builtIn:!1,displayNameKey:e.displayNameKey}}class Bt{constructor(t=[],n=So){this.translate=n;for(const r of t)r?.type&&(r.type in N||this.declared.has(r.type)||this.declared.set(r.type,r))}declared=new Map;get(t){if(t in N)return pt(t);const n=this.declared.get(t);return n?ft(n):void 0}triggerable(){const t=Object.keys(N).filter(r=>N[r].triggerable).map(pt),n=[...this.declared.values()].map(ft).filter(r=>r.triggerable);return[...t,...n]}timelineText(t,n){const r=N[t.type];if(r?.timeline)return r.timeline(t,n);const o=this.declared.get(t.type);return se(o?.text,t,this.translate)??t.type.replace(/_/g," ").toLowerCase()}snippet(t){const n=N[t.type];if(n?.snippet)return n.snippet(t);const r=this.declared.get(t.type);return se(r?.text,t,this.translate)??""}descriptor(t){return this.declared.get(t)}blocks(t){const n=this.declared.get(t)?.render;return n?.length?n:void 0}isMessage(t){return Be(this.get(t)?.shape)}nestsUnderParent(t){return He(this.get(t)?.shape)}isReplyable(t){return this.get(t)?.replyable===!0}carriesText(t){return this.get(t)?.carriesText===!0}countsAs(t){return this.get(t)?.countsAs}channelKind(t){return this.get(t)?.channelKind}isTranscript(t){const n=this.get(t);return n?.shape==="artifact"&&n.carriesText}get translator(){return this.translate}}const bo=new Bt;function To(e,t,n=[]){const r=e.createdAt;if(!r)return[];const o=new Set(n);return e.author.type==="user"&&e.author.id&&o.add(e.author.id),Object.entries(t).filter(([i,s])=>s>=r&&!o.has(i)).map(([i])=>i)}function Ht(e){return e.createdAt??0}function Io(e){return e.type==="EMAIL_RECEIVED"||e.type==="EMAIL_SENT"}function Mo(e){return e.type==="CHAT_MESSAGE_SENT"||e.type==="CHAT_MESSAGE_RECEIVED"}const We=[{id:"openai",attachmentKinds:["image","pdf"],label:"OpenAI",capabilities:["chat","transcription","embedding"],defaultModel:"gpt-5-mini",baseUrl:"https://api.openai.com/v1"},{id:"gemini",attachmentKinds:["image","pdf"],label:"Google Gemini",capabilities:["chat","transcription","embedding"],defaultModel:"gemini-3.5-flash",baseUrl:"https://generativelanguage.googleapis.com/v1beta"},{id:"anthropic",attachmentKinds:["image","pdf"],label:"Anthropic",capabilities:["chat"],defaultModel:"claude-haiku-4-5",baseUrl:"https://api.anthropic.com/v1"},{id:"elevenlabs",label:"ElevenLabs",capabilities:["transcription"],baseUrl:"https://api.elevenlabs.io/v1"},{id:"moonshot",label:"Moonshot (Kimi)",capabilities:["chat"],defaultModel:"kimi-k3",baseUrl:"https://api.moonshot.ai/v1"},{id:"deepseek",label:"DeepSeek",capabilities:["chat"],defaultModel:"deepseek-v4-flash",baseUrl:"https://api.deepseek.com/v1"},{id:"groq",label:"Groq",capabilities:["chat"],defaultModel:"openai/gpt-oss-120b",baseUrl:"https://api.groq.com/openai/v1"},{id:"mistral",label:"Mistral",capabilities:["chat"],defaultModel:"mistral-large-latest",baseUrl:"https://api.mistral.ai/v1"},{id:"openrouter",label:"OpenRouter",capabilities:["chat"],defaultModel:"openrouter/auto",baseUrl:"https://openrouter.ai/api/v1"},{id:"ollama",label:"Ollama (self-hosted)",capabilities:["chat"],defaultModel:"llama3.3"},{id:"openai-compatible",label:"OpenAI-compatible (eigen endpoint)",capabilities:["chat"],defaultModel:"default"}];function V(e){return We.find(t=>t.id===e)}function Oo(e){return V(e)?.label??e}function wo(e,t="gpt-5-mini"){return V(e)?.defaultModel??t}function Ro(e){return We.filter(t=>t.capabilities.includes(e))}function Co(e){const t=V(e);return!!t&&!t.baseUrl}function ko(e,t){return t==="text"?!0:V(e)?.attachmentKinds?.includes(t)===!0}function No(e,t){if(!e.enabled)return"ok";const n=we(e.hardLimitNanos),r=we(e.softLimitNanos);return n!==void 0&&t>=n?"hard":r!==void 0&&t>=r?"soft":"ok"}function we(e){return typeof e=="number"?e:void 0}function Wt(e,t="month"){const n=new Date(e);return Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),1)}function vo(e,t="month"){const n=new Date(Wt(e,t));return`${n.getUTCFullYear()}-${String(n.getUTCMonth()+1).padStart(2,"0")}`}function Do(e){return e?.listeningEnabled!==!1}const xo=[{id:"agent",label:"Agent",labelSource:"user"},{id:"team",label:"Team",labelSource:"team"},{id:"inbox",label:"Inbox",labelSource:"inbox"},{id:"channel",label:"Kanaal",labelSource:"channel"},{id:"provider",label:"Provider",labelSource:"raw"},{id:"status",label:"Status",labelSource:"raw"},{id:"handledBy",label:"Afhandelaar",labelSource:"raw"},{id:"time",label:"Tijd",labelSource:"raw"}];function Te(e){return e<10?`0${e}`:`${e}`}function P(e,t){const n=new Date(e),r=`${n.getUTCFullYear()}-${Te(n.getUTCMonth()+1)}-${Te(n.getUTCDate())}`;return t==="day"?r:`${r}T${Te(n.getUTCHours())}`}function U(e,t){const n=new Date(e);return n.setUTCMinutes(0,0,0),t==="day"&&n.setUTCHours(0),n.getTime()}const Lo=36e5,Po=864e5;function Uo(e,t,n){const r=n==="hour"?Lo:Po,o=[];for(let i=U(e,n);i<=t;i+=r)o.push(P(i,n));return o}const Ko=new Set(["time"]);function $o(e,t,n){if(!e)return[];const r=new Set(e.supportedDimensions??[]);return t.filter(o=>r.has(o.id)&&!Ko.has(o.id)).map(o=>({id:o.id,label:o.label,options:o.options?.length?o.options:n[o.id]??[]})).filter(o=>o.options.length>0)}function Fo(e,t){const n=t.find(o=>o.id===e.dimensionId),r=n?.options.find(o=>o.value===e.value);return`${n?.label??e.dimensionId} · ${r?.label??e.value}`}function Bo(e){return{value:e.id,label:`${e.category} · ${e.label}`}}const Gt=[{id:"resource",label:"Resource",labelSource:"raw"},{id:"origin",label:"Herkomst",labelSource:"raw"}],Vt=Gt.map(e=>e.id);function jt(e,t){return`${e}.usage.${t}`}function Ho(e,t){return t.map(n=>({id:jt(e,n.unit),label:n.label,category:"Verbruik",valueType:n.valueType??"count",aggregation:"sum",supportedDimensions:["provider",...Vt,...n.extraDimensions??[],"time"]}))}const Yt=new Set(["info","success","warning","destructive"]),Re=200,Ce=100,ke=200,Ne=12,ve=4,Ge=4e3,ee=500,Wo=256*1024,Go=new Set(["heading","paragraph","list","quote","code","divider","table","kpi","callout"]),Xt=["http:","https:","mailto:","tel:"],Vo=/^[a-z][a-z0-9+.-]*:/i;function zt(e){const t=e.trim().replace(/^<|>$/g,"");if(!t)return!1;const n=Vo.exec(t)?.[0];return n?Xt.includes(n.toLowerCase()):!t.startsWith("//")}const jo=/^[ \t]{0,3}\[([^\]]+)\]:[ \t]*(\S+).*$/gm;function Yo(e){let t="",n=0;for(;n<e.length;){const r=e[n]==="!"&&e[n+1]==="[";if(e[n]!=="["&&!r){t+=e[n],n+=1;continue}const o=n+(r?2:1),i=mt(e,o,"[","]");if(i<0||e[i+1]!=="("){t+=e[n],n+=1;continue}const s=mt(e,i+2,"(",")");if(s<0){t+=e[n],n+=1;continue}const a=e.slice(o,i),l=e.slice(i+2,s).trim().split(/\s+/)[0]??"";t+=r||!zt(l)?a:e.slice(n,s+1),n=s+1}return t}function mt(e,t,n,r){let o=1;for(let i=t;i<e.length;i+=1){if(e[i]==="\\"){i+=1;continue}if(e[i]===n)o+=1;else if(e[i]===r&&(o-=1,o===0))return i}return-1}function qt(e){return Yo(e).replace(jo,(t,n,r)=>zt(r)?t:"")}function R(e,t=Ge){return typeof e=="string"?qt(e).slice(0,t):""}function Xo(e,t=Ge){return typeof e=="string"?e.slice(0,t):""}function zo(e,t="info"){return typeof e=="string"&&Yt.has(e)?e:t}function qo(e,t=()=>{}){if(!Array.isArray(e))return[];const n=[];for(const r of e){if(n.length>=Re){t(`more than ${Re} blocks; the rest was dropped`);break}if(!r||typeof r!="object")continue;const o=r;if(!Go.has(o.type)){t(`unknown block type ${String(o.type)}`);continue}const i=typeof o.block_id=="string"?{block_id:o.block_id}:{};switch(o.type){case"heading":{const s=R(o.text);if(!s){t("a heading without text");continue}const a=o.level===2||o.level===3?o.level:1;n.push({...i,type:"heading",level:a,text:s});break}case"paragraph":{const s=R(o.text);if(!s){t("a paragraph without text");continue}n.push({...i,type:"paragraph",text:s});break}case"quote":{const s=R(o.text);if(!s){t("a quote without text");continue}n.push({...i,type:"quote",text:s});break}case"code":{const s=Xo(o.text);if(!s){t("a code block without text");continue}const a=typeof o.lang=="string"?{lang:o.lang.slice(0,32)}:{};n.push({...i,type:"code",...a,text:s});break}case"divider":n.push({...i,type:"divider"});break;case"list":{const s=Array.isArray(o.items)?o.items:[],a=[];for(const d of s){if(a.length>=Ce){t(`more than ${Ce} list items`);break}const f=R(d?.text);if(!f)continue;const c=R(d?.lead,200);a.push(c?{lead:c,text:f}:{text:f})}if(a.length===0){t("a list without usable items");continue}const l=o.style==="numbered"?"numbered":"bulleted";n.push({...i,type:"list",style:l,items:a});break}case"table":{const s=Array.isArray(o.columns)?o.columns:[],a=[];for(const c of s){if(a.length>=Ne){t(`more than ${Ne} table columns`);break}const h=R(c?.label,ee),A=c?.align==="right"?"right":void 0;a.push(A?{label:h,align:A}:{label:h})}if(a.length===0){t("a table without columns");continue}const l=Array.isArray(o.rows)?o.rows:[],d=[];for(const c of l){if(d.length>=ke){t(`more than ${ke} table rows`);break}const h=Array.isArray(c)?c:[];d.push(a.map((A,_)=>R(h[_],ee)))}const f=R(o.caption,ee);n.push({...i,type:"table",columns:a,rows:d,...f?{caption:f}:{}});break}case"kpi":{const s=Array.isArray(o.items)?o.items:[],a=[];for(const l of s){if(a.length>=ve){t(`more than ${ve} kpi items`);break}const d=R(l?.value,40),f=R(l?.label,80);if(!d||!f)continue;const c=l?.tone;a.push(typeof c=="string"&&Yt.has(c)?{value:d,label:f,tone:c}:{value:d,label:f})}if(a.length===0){t("a kpi block without usable items");continue}n.push({...i,type:"kpi",items:a});break}case"callout":{const s=R(o.text);if(!s){t("a callout without text");continue}const a=R(o.title,200);n.push({...i,type:"callout",tone:zo(o.tone),...a?{title:a}:{},text:s});break}}}return n}function Jo(e){return JSON.stringify(e).length}function Zo(e){return{blocks:e.length,types:e.map(t=>t.type),headings:e.flatMap(t=>t.type==="heading"?[t.text]:[])}}function gt(e){return e.replace(/\|/g,"\\|").replace(/\r?\n/g," ").trim()}function ht(e,t,n){const r=e.map((o,i)=>n?.[i]==="right"?"---:":"---");return[`| ${e.map(gt).join(" | ")} |`,`| ${r.join(" | ")} |`,...t.map(o=>`| ${o.map(gt).join(" | ")} |`)]}function Qo(e){switch(e.type){case"heading":return[`${"#".repeat(e.level)} ${e.text}`];case"paragraph":return[e.text];case"quote":return e.text.split(/\r?\n/).map(t=>`> ${t}`);case"code":return[`\`\`\`${e.lang??""}`,e.text,"```"];case"divider":return["---"];case"list":return e.items.map((t,n)=>{const r=e.style==="numbered"?`${n+1}.`:"-";return t.lead?`${r} **${t.lead}** ${t.text}`:`${r} ${t.text}`});case"table":{const t=ht(e.columns.map(n=>n.label),e.rows,e.columns.map(n=>n.align??"left"));return e.caption?[...t,"",`*${e.caption}*`]:t}case"kpi":return ht(e.items.map(t=>t.value),[e.items.map(t=>t.label)]);case"callout":return(e.title?`**${e.title}** ${e.text}`:e.text).split(/\r?\n/).map(n=>`> ${n}`)}}function ei(e,t){const n=[],r=e.some(o=>o.type==="heading"&&o.level===1);t&&!r&&n.push(`# ${t}`);for(const o of e){const i=Qo(o);i.length>0&&n.push(i.join(`
4
4
  `))}return`${n.join(`
5
5
 
6
6
  `)}
7
- `}const $e=e=>`user:${e}`,Fe=e=>`team:${e}`;function Fi(e){const t=new Set;for(const n of e??[])n?.id&&(n.kind==="user"&&t.add($e(n.id)),n.kind==="team"&&t.add(Fe(n.id)));return[...t].sort()}function Bi(e,t){return[$e(e),...t.map(Fe)]}function Hi(e){const t=new Set;for(const n of e??[])n?.kind&&t.add(n.kind);return[...t]}const Ft=["done","escalated"],Gi=["open","waiting"];function Wi(e){return Ft.includes(e)}const Bt="assignment";function Vi(e){return`${Bt}:${e}`}function ji(e,t,n,r){if(e.direction==="inbound")return!0;if(e.author?.type==="user"&&e.author.id===t)return!1;const i=e.payload?.mentions;return Array.isArray(i)&&i.includes(t)||r&&r===t?!0:n==="reply"}function Yi(e){const{targetAuthorId:t,reactorId:n,agentId:r,on:i}=e;return!i||!t||t!==r?!1:n!==r}function Xi(e){return e.subjectKind&&e.subjectId?{type:e.subjectKind,id:e.subjectId}:void 0}const Ht=12;function zi(e,t,n=Ht){const r=t+1;return e?e.kind==="done"?{status:"done",waitingOn:null,turns:r,reason:e.note}:e.kind==="escalate"?{status:"escalated",waitingOn:null,turns:r,reason:e.reason}:r>=n?{status:"escalated",waitingOn:null,turns:r,reason:`na ${n} beurten nog niet afgerond, dus een mens neemt het over`}:{status:"waiting",waitingOn:e.on,turns:r}:{status:"escalated",waitingOn:null,turns:r,reason:"de agent rondde zijn beurt af zonder te zeggen wat er moet gebeuren (wachten, afronden of overdragen)"}}const qi=new Set(["mail","message"]);function Gt(e,t){const n=e.settings?.signatures?.[t];return!n?.enabled||!n.body||n.body.trim()===""?null:n}function Ji(e,t,n,r="html"){if(!e)return n;const i=Gt(e,t);return i?`${n}${r==="text"?`
7
+ `}const Ve=e=>`user:${e}`,je=e=>`team:${e}`;function ti(e){const t=new Set;for(const n of e??[])n?.id&&(n.kind==="user"&&t.add(Ve(n.id)),n.kind==="team"&&t.add(je(n.id)));return[...t].sort()}function ni(e,t){return[Ve(e),...t.map(je)]}function ri(e){const t=new Set;for(const n of e??[])n?.kind&&t.add(n.kind);return[...t]}const Jt=["done","escalated"],oi=["open","waiting"];function ii(e){return Jt.includes(e)}const Zt="assignment";function si(e){return`${Zt}:${e}`}function ai(e,t,n,r){if(e.direction==="inbound")return!0;if(e.author?.type==="user"&&e.author.id===t)return!1;const o=e.payload?.mentions;return Array.isArray(o)&&o.includes(t)||r&&r===t?!0:n==="reply"}function ci(e){const{targetAuthorId:t,reactorId:n,agentId:r,on:o}=e;return!o||!t||t!==r?!1:n!==r}function li(e){return e.subjectKind&&e.subjectId?{type:e.subjectKind,id:e.subjectId}:void 0}const Qt=12;function ui(e,t,n=Qt){const r=t+1;return e?e.kind==="done"?{status:"done",waitingOn:null,turns:r,reason:e.note}:e.kind==="escalate"?{status:"escalated",waitingOn:null,turns:r,reason:e.reason}:r>=n?{status:"escalated",waitingOn:null,turns:r,reason:`na ${n} beurten nog niet afgerond, dus een mens neemt het over`}:{status:"waiting",waitingOn:e.on,turns:r}:{status:"escalated",waitingOn:null,turns:r,reason:"de agent rondde zijn beurt af zonder te zeggen wat er moet gebeuren (wachten, afronden of overdragen)"}}const di=new Set(["mail","message"]);function en(e,t){const n=e.settings?.signatures?.[t];return!n?.enabled||!n.body||n.body.trim()===""?null:n}function pi(e,t,n,r="html"){if(!e)return n;const o=en(e,t);return o?`${n}${r==="text"?`
8
8
 
9
- `:t==="mail"?"<br><br>-- <br>":"<br><br>"}${i.body}`:n}function Zi(e){return e.endpoints??[]}const Wt=36e5,Vt=864e5,w=-1/0,Qi=e=>e.score>w,P={urgent:40,high:25,normal:10,low:0};function eo(e){return Object.fromEntries(e.map(t=>[t.resourceId,t]))}const to=/(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|newsletter|nieuwsbrief|mailer|mailing|notifications?|bounce|postmaster|marketing)@/i,jt=/\b(unsubscribe|afmelden|uitschrijven|opt[\s-]?out|manage (your )?preferences|geen (e-?mails?|nieuwsbrief|berichten) meer)\b/i;function Yt(e,t){return!!(e&&to.test(e)||t&&jt.test(t))}const Xt=3,zt=600;function no(e,t){return e>=Xt||t>=zt}const qt=["list-unsubscribe","list-unsubscribe-post","list-id","precedence","auto-submitted","x-auto-response-suppress","feedback-id","x-mailer"];function ro(e){const t={};for(const n of e){const r=n.name?.toLowerCase();r&&n.value!==void 0&&qt.includes(r)&&(t[r]=n.value)}return t}const io=/(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|notifications?|bounce|postmaster|mailer)@/i,oo=/(^|[._+-])(newsletter|nieuwsbrief|marketing|mailing)@/i;function ao(e){const t=e.headers??{},n=e.from?.email,r=t["auto-submitted"]?.toLowerCase();if(r&&r!=="no"||t["x-auto-response-suppress"]||n&&io.test(n))return"automated";const i=t.precedence?.toLowerCase();if(t["list-unsubscribe"]||t["list-unsubscribe-post"]||t["list-id"]||i==="bulk"||i==="list"||e.body&&jt.test(e.body)||n&&oo.test(n))return"marketing"}function Jt(e,t){return e.lastActivityAt?!(e.seenBy??[]).includes(t):!1}const Zt=["open"],Qt=1e3,en={urgent:1,high:4,normal:8,low:24},tn=72;function nn(e){return e.lastActivityAt??(e.createdAt?new Date(kt(e)).getTime():0)}function rn(e,t){return on(t.remindersById?.[e.id],e,t.now)}function on(e,t,n){return!e||e.remindAt<=n?!1:!((t.lastActivityAt??0)>e.parkedAt&&t.lastActivityPreview?.direction==="inbound")}const an=e=>Rt(e)==="outbound_message",sn=e=>Zt.includes(e);function se(e,t){return Math.max(0,(t-nn(e))/Wt)}function cn(e,t){const n=e.assignedInboxId?t?.[e.assignedInboxId]:void 0;return typeof n=="number"&&n>0?n:en[e.priority??"normal"]}function so(e){const t={};for(const n of e)typeof n.slaHours=="number"&&n.slaHours>0&&(t[n.id]=n.slaHours);return t}function co(e,t,n){return!sn(e.status)||e.firstResponseAt?!1:se(e,t)>cn(e,n)}function ln(e,t){const n=e.lastActivityPreview;return n?.direction!=="outbound"||!an(n.type)?!1:se(e,t)<tn}function lo(e,t){if(!sn(e.status))return{score:w,reasons:[]};if(e.snoozedTill&&e.snoozedTill>t.now)return{score:w,reasons:[]};if(ln(e,t.now))return{score:w,reasons:[]};if(rn(e,t))return{score:w,reasons:[]};let n=0;const r=[],i=e.priority??"normal";P[i]>0&&(n+=P[i],r.push(`priority:${i}`)),Jt(e,t.userId)&&(n+=20,r.push("unseen")),e.assignedUserId&&e.assignedUserId===t.userId&&(n+=15,r.push("assigned-to-you"));const o=se(e,t.now);if(o>0){const c=Math.min(o*2,30);n+=c,o>=1&&r.push(`waiting:${Math.round(o)}h`)}const a=e.lastActivityPreview;return a?.type==="AI_ACTION_PROPOSED"&&(n+=30,r.push("awaiting-approval")),a?.direction==="outbound"&&an(a.type)&&(n+=10,r.push("no-reply")),!e.firstResponseAt&&e.lastActivityPreview?.direction==="inbound"&&(n+=10,r.push("awaiting-reply")),(e.tags?.some(c=>c==="marketing"||c==="automated")||Yt(e.remoteParty?.resource,e.lastActivityPreview?.snippet))&&(n-=Qt,r.push("bulk")),{score:n,reasons:r}}const uo=e=>!!e.assignedUserId||!!e.assignedInboxId,po=e=>e.status==="closed",fo=e=>({urgent:10,high:5,normal:2,low:1})[e.priority]||0,mo=(e,t=30)=>e.title?.length<=t?e.title:`${e.title.substring(0,t)}...`;function go(e,t){const n=e.labels??[];return n.find(r=>r.locale===t)?.label??n[0]?.label??e.url}function ho(e,t,n){const r=e.translations??[];return r.find(i=>i.locale===t)??(n?r.find(i=>i.locale===n):void 0)??{locale:t}}const we=[{code:"nl",label:"Nederlands",english:"Dutch"},{code:"en",label:"English",english:"English"},{code:"de",label:"Deutsch",english:"German"},{code:"fr",label:"Français",english:"French"},{code:"es",label:"Español",english:"Spanish"},{code:"it",label:"Italiano",english:"Italian"},{code:"pt",label:"Português",english:"Portuguese"},{code:"pl",label:"Polski",english:"Polish"},{code:"sv",label:"Svenska",english:"Swedish"},{code:"da",label:"Dansk",english:"Danish"},{code:"nb",label:"Norsk bokmål",english:"Norwegian Bokmål"},{code:"fi",label:"Suomi",english:"Finnish"},{code:"tr",label:"Türkçe",english:"Turkish"}];function un(e){const t=(e??"").toLowerCase();return we.find(n=>n.code===t)??we.find(n=>n.code===t.split("-")[0])}function Eo(e){return un(e)?.label??e}function yo(e){const t=un(e);return t?t.english===t.label?`${t.english} (${t.code})`:`${t.english} — ${t.label} (${t.code})`:e}const Be=3;function dn(e,t){const n=new Set;let r=1,i=t.get(e)?.parentId;for(;i;){if(n.has(i)||(n.add(i),r++,r>Be+1))return 1/0;i=t.get(i)?.parentId}return r}function _o(e,t,n){if(!e)return!0;if(e===t)return!1;const r=new Map(n.map(a=>[a.id,a]));if(!r.has(e)||t&&pn(e,t,r))return!1;const i=dn(e,r),o=t?He(t,n):1;return i+o<=Be}function pn(e,t,n){const r=new Set;let i=n.get(e)?.parentId;for(;i;){if(i===t)return!0;if(r.has(i))return!1;r.add(i),i=n.get(i)?.parentId}return!1}function He(e,t,n=new Set){if(n.has(e))return 1;n.add(e);const r=t.filter(i=>i.parentId===e);return r.length?1+Math.max(...r.map(i=>He(i.id,t,n))):1}const fn="en";function mn(e){return e.defaultLocale||e.locale||fn}function Ao(e){const t=new Set,n=[];for(const r of[mn(e),...e.locales??[]])!r||t.has(r)||(t.add(r),n.push(r));return n}function So(e,t,n){const r=e.translations??[];return r.find(i=>i.locale===t)?.name??(n?r.find(i=>i.locale===n)?.name:void 0)??e.name}const Ce=["lookup","condition","parallel","for-each"];function Ne(e){for(const t of e){if(!Ce.includes(t.type))return`staptype "${t.type}" mag niet meelezen (alleen ${Ce.join(", ")})`;if(t.type==="parallel")for(const n of t.branches??[]){const r=Ne(n);if(r)return r}if(t.type==="for-each"){const n=Ne(t.body??[]);if(n)return n}}return null}function bo(e,t){switch(e.kind){case"org":return!0;case"team":return!!t.teamId&&e.teamId===t.teamId;case"personal":return e.userId===t.userId}}function To(e,t){return e.filter(n=>n.enabled&&bo(n.ownerScope,t))}function Io(e){return e.credentialScope?e.credentialScope:(e.authMode??"header")==="header"||e.oauth?.scope==="org"?"shared":"per-user"}function Oo(e){return`mcp__${e}__`}const Mo=1e3,Ro=2e3,wo=500,Co=12e3,No=4e3,gn=["contact","company","work_item"];function ko(e){if(!e)return!1;const t=e.slice(0,e.indexOf(":"));return gn.includes(t)}const vo="onboarding-source",Do=["support","billing","availability","sales","onboarding"],xo=["keep","replace"],Lo="demand-source",Po=36e5,lt=864e5;function Uo(e,t,n,r="hour"){if(e<=0||n<=t)return[];const i=r==="day"?lt:Po,o=[];for(let c=Ko(t);c<n;c+=lt){const l=new Date(c).getUTCDay();l!==0&&l!==6&&o.push(c)}if(!o.length)return[];const a=e/o.length,s=[];for(const c of o){if(r==="day"){s.push({period:N(c,"day"),seconds:a});continue}const l=a/8;for(let d=9;d<17;d++){const h=c+d*i;if(h>=n)break;s.push({period:N(h,"hour"),seconds:l})}}return s}function Ko(e){const t=new Date(e);return t.setUTCHours(0,0,0,0),t.getTime()}const ut=1e3;function $o(e,t){let n=1;for(let r=1;r<=e;r++)n=t*n/(r+t*n);return n}function hn(e,t){if(e<=0)return 1;if(t<=0)return 0;if(e<=t)return 1;const n=$o(e,t),r=t/e;return n/(1-r*(1-n))}function En(e,t,n,r){return r<=0?1:e<=t?0:1-hn(e,t)*Math.exp(-(e-t)*n/r)}function yn(e,t,n){return n<=0?0:e*t/n}function _n(e,t,n,r){if(e<=0||t<=0)return 0;const i=yn(e,t,n);if(i<=0)return 0;const o=r.serviceLevelPercent/100,a=r.maxOccupancyPercent?r.maxOccupancyPercent/100:void 0;for(let s=Math.max(1,Math.ceil(i));s<=ut;s++)if(!(s<=i)&&!(En(s,i,r.targetSeconds,t)<o)&&!(a&&i/s>a))return s;return ut}const ce=[{key:"shift",label:"kind_shift",capacity:!0,productive:!1,absent:!1,icon:"calendar-clock"},{key:"allocation",label:"kind_allocation",capacity:!1,productive:!0,absent:!1,icon:"briefcase"},{key:"meeting",label:"kind_meeting",capacity:!1,productive:!1,absent:!1,icon:"users"},{key:"travel",label:"kind_travel",capacity:!1,productive:!1,absent:!1,icon:"car"},{key:"training",label:"kind_training",capacity:!1,productive:!1,absent:!1,icon:"graduation-cap"},{key:"break",label:"kind_break",capacity:!1,productive:!1,absent:!1,icon:"coffee"},{key:"absence",label:"kind_absence",capacity:!1,productive:!1,absent:!0,approvable:!0,icon:"palmtree"},{key:"sick",label:"kind_sick",capacity:!1,productive:!1,absent:!0,icon:"thermometer"},{key:"holiday",label:"kind_holiday",capacity:!1,productive:!1,absent:!0,icon:"party-popper"}],An={key:"unknown",label:"kind_unknown",capacity:!1,productive:!1,absent:!1};function U(e,t=ce){return t.find(n=>n.key===e)??{...An,key:e}}function Ge(e){return e==="published"||e==="approved"}function Sn(e,t,n=ce){if(e.workstreamId!==t)return!1;const r=U(e.kindKey,n);return r.absent?!1:r.productive||r.capacity}function Fo(e,t=ce){if(!e.userId||!Ge(e.status))return!1;const n=U(e.kindKey,t);return n.capacity||n.productive||n.absent}const Bo=36e5,Ho=864e5;function Go(e){return e==="day"?Ho:Bo}function Wo(e,t){return e.start<t.end&&t.start<e.end}function z(e,t,n){const r=Math.min(e.end,n)-Math.max(e.start,t);return r>0?r/1e3:0}function bn(e,t,n){const r=e.handleSeconds??0,i=e.seconds??(e.volume!==void 0?e.volume*r:0);if(i<=0&&!e.volume)return{seconds:0,headcount:0};const o=(t.unplannedLossPercent??0)/100,a=o>0&&o<1?1/(1-o):1;if(t.model==="queue"&&e.volume!==void 0&&r>0){const s=_n(e.volume,r,n,t);return{seconds:i,headcount:s*a}}return{seconds:i,headcount:i/n*a}}function Vo(e){const{entries:t,workstreamId:n,staffing:r,demand:i,range:o}=e,a=e.grain??"hour",s=Go(a),c=s/1e3,l=e.kinds,d=t.filter(E=>Ge(E.status)),h=d.filter(E=>Sn(E,n,l)),_=d.filter(E=>U(E.kindKey,l).capacity),S=d.filter(E=>U(E.kindKey,l).absent),M=[];for(let E=L(o.from,a);E<o.to;E+=s){const T=E+s,u=N(E,a);let p=0;for(const v of h)p+=z(v,E,T);let I=0;for(const v of _)I+=z(v,E,T);let k=0;for(const v of S)k+=z(v,E,T);const H=i?.[u]??{},ge=bn(H,r,c),Qe=p/c;M.push({period:u,forecastVolume:H.volume,requiredSeconds:ge.seconds,requiredHeadcount:ge.headcount,scheduledSeconds:p,scheduledHeadcount:Qe,netHeadcount:Qe-ge.headcount,capacitySeconds:I,absentSeconds:k})}return M}function Tn(e,t){return e.workTypeKey??t?.defaultWorkTypeKey}function jo(e,t,n){const r=Tn(e,t);return r?n.find(i=>i.key===r)?.defaultBillable??!1:!1}function Yo(e){return e.filter(t=>t.netHeadcount<0&&t.requiredHeadcount>0)}const Xo=36e5,ke=6048e5,In=8,zo=.5,qo=2;function Jo(e){const t=Number(e.slice(0,4)),n=Number(e.slice(5,7)),r=Number(e.slice(8,10)),i=e.length>10?Number(e.slice(11,13)):0;return Date.UTC(t,n-1,r,i)}function Zo(e,t,n){const r=[];for(let o=0;o<n;o++){const a=t-o*ke,s=a-ke;let c=0,l=!1;for(const[d,h]of e)d>=s&&d<a&&(c+=h,l=!0);l&&r.push(c)}if(r.length<2)return 1;const i=r.reduce((o,a)=>o+a,0)/r.length;return i<=0?1:Math.min(qo,Math.max(zo,r[0]/i))}function Qo(e,t){if(!e?.length)return;let n;for(const r of e)t>=r.from&&t<r.to&&(n=r);return n}function ea(e,t,n){const r=Math.max(1,n?.weeks??In),i=new Map,o=new Set;for(const c of e)i.set(Jo(c.period),c.value),o.add(c.period.slice(0,10));const a=Zo(i,L(t.from,"hour"),r),s=[];for(let c=L(t.from,"hour");c<t.to;c+=Xo){let l=0,d=0;for(let S=1;S<=r;S++){const M=c-S*ke,T=i.get(M)??(o.has(N(M,"day"))?0:void 0);if(T===void 0)continue;const u=r-S+1;l+=T*u,d+=u}let h=d>0?l/d*a:0;const _=Qo(n?.adjustments,c);_?.absoluteVolume!==void 0?h=_.absoluteVolume:_?.factor!==void 0&&(h*=_.factor),s.push({period:N(c,"hour"),volume:h})}return s}const On="schedule_entry",Mn="workstream";function ta(e){return`${On}:${e}`}function na(e){return`${Mn}:${e}`}function Rn(e){switch(e.kind){case"user":return`user:${e.userId}`;case"team":return`team:${e.teamId}`;case"org":return"org"}}function ra(e){if(typeof e!="string")return;const t=e.trim();if(t==="org")return{kind:"org"};const n=t.indexOf(":");if(n<=0)return;const r=t.slice(0,n),i=t.slice(n+1).trim();if(i){if(r==="user")return{kind:"user",userId:i};if(r==="team")return{kind:"team",teamId:i}}}function wn(e){return Rn(e)}function Cn(e){switch(e.kind){case"personal":return{kind:"user",userId:e.userId};case"team":return{kind:"team",teamId:e.teamId};case"org":return{kind:"org"}}}const Nn=Cn;function ia(e){return e.agentId?{kind:"user",userId:e.agentId}:Nn(e.ownerScope)}function oa(e){return wn(e)}function aa(e,t){if(!t)return;let n=e;for(const r of t.split(".")){if(n===null||typeof n!="object")return;n=n[r]}return n}function sa(e,t){return e.targets.find(n=>n.activityTypes.includes(t))}function ca(e,t){if(t)return e.targets.find(n=>n.id===t)}function kn(e){return e?.kind==="assignment"}function la(e){const{trigger:t,agentId:n,target:r,activityType:i,assigneeUserId:o,authorUserId:a}=e;return kn(t)?n?r?r.activityTypes.includes(i)?o?o!==n?"assigned to someone else":a&&a===n?"the agent assigned this to itself, which would restart its own run":null:`no assignee found at ${r.assigneePath}`:`activity type ${i} does not announce an assignment for ${r.id}`:`assignment target kind "${t.targetKind}" is not declared by any installed app`:"this playbook has no agent, so an assignment can never be for it":"trigger is not an assignment trigger"}function ua(e){return(e.startsWith("tool:")?e.slice(5):e).replace(/__/g," · ").replace(/\./g," · ").replace(/_/g," ")}const da=[{name:"text",type:"string"},{name:"subject",type:"string"},{name:"from",type:"string"},{name:"type",type:"string"},{name:"direction",type:"string"},{name:"channelId",type:"string"},{name:"interactionId",type:"string"},{name:"itemId",type:"string"},{name:"activityId",type:"string"},{name:"authorType",type:"string"},{name:"authorName",type:"string"},{name:"textRaw",type:"string"},{name:"fromStatus",type:"string"},{name:"toStatus",type:"string"},{name:"toCategory",type:"string"},{name:"contactId",type:"string"},{name:"companyId",type:"string"},{name:"priority",type:"string"},{name:"inboxId",type:"string"},{name:"topicId",type:"string"},{name:"assigneeUserId",type:"string"}],pa={topics:[{name:"topicId",type:"string"},{name:"topic",type:"string"},{name:"confidence",type:"number"},{name:"reasoning",type:"string"}],question:[{name:"answer",type:"boolean"},{name:"reasoning",type:"string"}],extract:[]};function vn(e){return`${e.type}:${e.id}`}const Dn="interaction";function xn(e){return e?.type===Dn?e.id:void 0}const Ln=64,Pn=8e3;function fa(e){const t=typeof e=="number"?e:Number(String(e??"").trim());if(!(!Number.isFinite(t)||t<=0))return Math.min(Math.max(Math.round(t),Ln),Pn)}const ma={kind:"workflow",steps:[]};function ga(e){return e?.kind==="workflow"?e.steps:[]}function ha(e){return e?.kind==="procedure"?e.procedure:void 0}function Un(e){const t=e?.approved??0,n=t+(e?.rejected??0);return{total:n,rate:n?t/n:0}}const Kn=10,$n=.9;function Ea(e){const{total:t,rate:n}=Un(e);return t>=Kn&&n>=$n}const Fn=["done","escalated","failed","stopped"];function ya(e){return Fn.includes(e)}function Bn(e){return e==="waiting"}function _a(e){return e==="running"||Bn(e)}function We(e){return e.subjectKind&&e.subjectId?{type:e.subjectKind,id:e.subjectId}:void 0}function Aa(e){const t=We(e);return t?vn(t):void 0}function Sa(e){return xn(We(e))}function ba(e){const t=[],n=new Map;for(const r of[...e].sort(Ta)){const i=n.get(r.emoji);if(i){i.push(r.actor);continue}t.push(r.emoji),n.set(r.emoji,[r.actor])}return t.map(r=>{const i=n.get(r);return{emoji:r,count:i.length,actors:i}}).sort((r,i)=>i.count-r.count||t.indexOf(r.emoji)-t.indexOf(i.emoji))}const Ta=(e,t)=>(e.createdAt??0)-(t.createdAt??0);function Ia(e,t){return t?e.actors.some(n=>n.type==="user"&&n.id===t):!1}const ve=6e4,Oa=36e5,K=864e5,Hn=800;function dt(e,t){const n=Date.UTC(e,t+1,0);return n-new Date(n).getUTCDay()*K+Oa}function Ma(e){const t=new Date(e).getUTCFullYear();return e>=dt(t,2)&&e<dt(t,9)}function Gn(e,t){const n=t.dst==="eu"&&Ma(e)?60:0;return(t.utcOffsetMinutes+n)*ve}function Ra(e){return(e+3)%7+1}function Wn(e,t){const n=Gn(e,t),r=e+n,i=Math.floor(r/K);if(!t.days.includes(Ra(i)))return null;const o=i*K;return{open:o+t.fromMinutes*ve-n,close:o+t.toMinutes*ve-n}}function Vn(e,t){const n=Gn(e,t),r=e+n;return(Math.floor(r/K)+1)*K-n}function te(e,t,n){if(t<=e)return 0;if(!n)return t-e;let r=0,i=e;for(let o=0;o<Hn&&i<t;o++){const a=Wn(i,n);if(a){const s=Math.max(i,a.open),c=Math.min(t,a.close);c>s&&(r+=c-s)}i=Vn(i,n)}return r}function le(e,t,n){if(!n)return e+t;let r=t,i=e;for(let o=0;o<Hn;o++){const a=Wn(i,n);if(a){const s=Math.max(i,a.open);if(a.close>s){const c=a.close-s;if(r<=c)return s+r;r-=c}}i=Vn(i,n)}return e+t}function wa(e){const t=/^([01]\d|2[0-3]):([0-5]\d)$/.exec(e);return t?Number(t[1])*60+Number(t[2]):null}const ne=1,re=2;function Ca(e){return e==="snoozed"?ne:re}function ue(e){const t=e.calendar;return t&&Array.isArray(t.days)?t:null}const Na=["speed_of_answer","first_response","next_response","resolution","close"],ka=["snoozed","waiting_for_customer"],va=6e4,jn=["speed_of_answer","first_response","next_response"],Da=[...jn,"resolution","close"];function F(e){return e.state==="running"||e.state==="paused"}function xa(e,t){return F(e)?{state:(e.state==="paused"?e.remainingMs>0:t<=e.dueAt)?"hit":"missed",settledAt:Math.max(t,e.startedAt)}:null}function pt(e){return F(e)?{state:"void"}:null}function La(e,t,n,r){if(!F(e)||(e.pauseBits&t)!==0)return null;const i=e.pauseBits|t;return e.state==="paused"?{pauseBits:i}:{pauseBits:i,state:"paused",remainingMs:te(n,e.dueAt,r)}}function Pa(e,t,n,r){if(!F(e)||(e.pauseBits&t)===0)return null;const i=e.pauseBits&~t;return i!==0?{pauseBits:i}:{pauseBits:i,state:"running",dueAt:le(n,e.remainingMs,r)}}function Ua({event:e,at:t,now:n,clocks:r,profile:i}){const o=ue(i),a=Math.min(t,n),s=r.map(u=>({...u})),c=[],l=(u,p)=>{p&&(c.push({op:"patch",clockId:u.id,patch:p}),Object.assign(u,p))},d=u=>{for(const p of s)p.metric===u&&l(p,xa(p,a))},h=u=>{for(const p of s)u.includes(p.metric)&&l(p,pt(p))},_=u=>{for(const p of s)l(p,La(p,u,a,o))},S=u=>{for(const p of s)l(p,Pa(p,u,a,o))},M=u=>s.reduce((p,I)=>I.metric===u?Math.max(p,I.attempt):p,0)+1,E=u=>s.some(p=>p.metric===u&&F(p)),T=(u,p)=>{const I=i.targets.find(H=>H.metric===u);if(!I)return;const k=I.minutes*va;c.push({op:"start",metric:u,attempt:M(u),startedAt:p,targetMs:k,dueAt:le(p,k,o)})};switch(e){case"apply":{for(const u of s)u.profileId!==i.id&&l(u,pt(u));for(const u of i.targets){if(u.metric==="next_response")continue;s.some(I=>I.metric===u.metric&&I.profileId===i.id)||T(u.metric,a)}break}case"answered":d("speed_of_answer");break;case"outbound":{d("first_response"),d("next_response"),i.pauseOn.includes("waiting_for_customer")&&_(re);break}case"inbound":{S(re),!E("first_response")&&!E("next_response")&&T("next_response",a);break}case"resolved":d("resolution");break;case"closed":d("close"),d("resolution"),h(jn);break;case"reopened":E("resolution")||T("resolution",a),E("close")||T("close",a);break;case"snoozed":i.pauseOn.includes("snoozed")&&_(ne);break;case"unsnoozed":S(ne);break;case"discarded":h(Da);break}return c}function Yn(e){return e.state==="running"||e.state==="paused"}function ie(e,t){const n=ue(e);return e.state==="paused"?e.remainingMs:t>=e.dueAt?-te(e.dueAt,t,n):te(t,e.dueAt,n)}function Ka(e,t){return e.state==="paused"?le(t,e.remainingMs,ue(e)):e.dueAt}function $a(e,t){const n=e.filter(Yn);if(!n.length)return;const r=n.filter(o=>o.state==="running");return(r.length?r:n).reduce((o,a)=>ie(a,t)<ie(o,t)?a:o)}function Fa(e,t){if(e.state==="missed")return"breached";if(e.state==="hit")return"met";if(e.state==="paused")return"paused";if(e.state==="void")return"met";const n=ie(e,t);return n<=0?"breached":n<=e.targetMs/5?"urgent":"running"}function Ba(e){const t=Math.floor(Math.abs(e)/1e3),n=Math.floor(t/86400),r=Math.floor(t%86400/3600),i=Math.floor(t%3600/60);return n?r?`${n}d ${r}u`:`${n}d`:r?i?`${r}u ${i}m`:`${r}u`:i?`${i}m`:`${t%60}s`}const Xn="strategy_item";function Ve(e){return`${Xn}:${e}`}function Ha(e,t=25){const n=new Set([Ve(e.id)]);for(const r of e.ancestorKeys??[])n.add(r);return Array.from(n).slice(0,t)}function Ga(e){return e?[...e.ancestorKeys??[],Ve(e.id)]:[]}const B=[{key:"area",label:"level_area",order:10,measurable:!1,icon:"compass"},{key:"objective",label:"level_objective",order:20,measurable:!0,icon:"target"},{key:"key_result",label:"level_key_result",order:30,measurable:!0,icon:"gauge"}],zn=999,qn=7;function Jn(e,t=B){return t.find(n=>n.key===e)}function oe(e,t=B){return Jn(e,t)?.order??zn}function Wa(e,t,n=B){return oe(t,n)<=oe(e,n)}function Va(e,t=B){const n=oe(e,t);return t.filter(i=>i.order>n).sort((i,o)=>i.order-o.order)[0]?.key??e}function ja(e){const t=e.trim().toLowerCase();return t?t.includes("key result")||t.includes("keyresult")||t==="kr"?"key_result":t.includes("objective")||t.includes("goal")||t.includes("doel")?"objective":t.includes("focus")||t.includes("area")||t.includes("theme")?"area":null:null}const De={pending:"open",on_track:"open",at_risk:"open",off_track:"open",paused:"paused",achieved:"closed",missed:"closed"};function Ya(e){return De[e]??"open"}function Xa(e){return Object.keys(De).filter(t=>e.includes(De[t]))}const za=864e5,de=e=>e<=0?0:e>1?1:e;function qa(e,t){const{direction:n}=e,r=e.startValue??0,i=e.targetValue??0;if(!Number.isFinite(t))return 0;const o=n==="down"?t<=i:t>=i,a=i-r;return(n==="down"?a<0:a>0)?de((t-r)/a):o?1:0}function Ja(e,t){const{startDate:n,targetDate:r}=e;if(!(typeof n!="number"||typeof r!="number")&&!(r<=n))return de((t-n)/(r-n))}const Zn=.1,Qn=.25;function Za(e,t){if(typeof e!="number"||typeof t!="number")return;if(e>=1)return"achieved";const n=t-e;return n>=Qn?"off_track":n>=Zn?"at_risk":"on_track"}function Qa(e,t){if(t)return de(e/t)}function es(e){const t=e.map(n=>n.progress?.ratio).filter(n=>typeof n=="number"&&Number.isFinite(n));if(t.length)return de(t.reduce((n,r)=>n+r,0)/t.length)}function ts(e,t){const n=e.lastCheckInAt??e.createdAt;if(typeof n!="number")return 0;const r=(e.checkInEveryDays??qn)*za,i=t-n-r;return i>0?i:0}function ns(e){return e.targetDate??Number.MAX_SAFE_INTEGER}function rs(e,t){const n=e.accumulatedSeconds||0;return e.runningSince?n+Math.max(0,Math.floor((t-e.runningSince)/1e3)):n}function is(e,t){const n=Math.max(1,Math.ceil(Math.max(0,e)/60));if(!t||t==="exact")return n*60;const r=Number(t);return!Number.isFinite(r)||r<=0?n*60:Math.ceil(n/r)*r*60}function os(e){const t=Math.max(0,Math.round(e/60));return`${Math.floor(t/60)}:${String(t%60).padStart(2,"0")}`}function as(e){const t=Math.max(0,Math.floor(e)),n=o=>String(o).padStart(2,"0"),r=Math.floor(t/60)%60,i=Math.floor(t/3600);return i>0?`${i}:${n(r)}:${n(t%60)}`:`${n(r)}:${n(t%60)}`}function er(e){return(e||"").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").slice(0,48).replace(/^-+|-+$/g,"")}function ss(e,t){const n=er(e)||"werksoort",r=new Set(t);if(!r.has(n))return n;for(let i=2;i<500;i++){const o=`${n}-${i}`;if(!r.has(o))return o}return`${n}-${r.size+1}`}function cs(e,t){const n=e.ownerScope;return!n||n.kind==="org"?!0:t.includes(n.teamId)}function ls(e){return e.filter(t=>!t.archived).sort(tr)}function tr(e,t){const n=(e.order??0)-(t.order??0);return n!==0?n:(e.label||"").localeCompare(t.label||"")}const nr=20,rr=20,q=300;function C(e){return e.toLowerCase().replace(/[^\p{L}\p{N}\s]/gu," ").replace(/\s+/g," ").trim()}function ir(e){const t=e.replace(/\s+/g," ").trim();if(t.length<=q)return t;const n=t.slice(0,q),r=Math.max(n.lastIndexOf(". "),n.lastIndexOf("! "),n.lastIndexOf("? "));return r>q*.6?n.slice(0,r+1):`${n.trimEnd()}…`}function us(e,t){const n=ir(t.text),r=C(n);if(!r||(e.examples??[]).some(a=>C(a)===r))return null;const i=e.exampleCandidates??[],o=i.findIndex(a=>C(a.text)===r);if(o>=0){if(i[o].corrected||!t.corrected)return null;const a=[...i];return a[o]={...a[o],corrected:!0,addedAt:t.addedAt},ft(a)}return ft([{...t,text:n},...i]).slice(0,rr)}function ft(e){return[...e].sort((t,n)=>Number(n.corrected)-Number(t.corrected)||n.addedAt-t.addedAt)}function ds(e,t){const n=C(t),r=(e.examples??[]).filter(o=>o.trim());return{examples:r.some(o=>C(o)===n)?r:[...r,t].slice(-nr),exampleCandidates:or(e,t)}}function or(e,t){const n=C(t);return(e.exampleCandidates??[]).filter(r=>C(r.text)!==n)}function ar(e,t){const n=e.ownerScope;return n?n.kind==="org"?!0:n.kind==="team"?!!t&&n.teamId===t:!1:!1}function ps(e,t){return e.filter(n=>ar(n,t))}function fs(e){return e.type==="agent"}const ms="WORK_COMMENT_ADDED",gs="WORK_ITEM_ASSIGNED",hs="WORK_ITEM_STATUS_CHANGED";function Es(e,t){const n=r=>{const i=new Date(r);return i.setHours(0,0,0,0),i.getTime()};return Math.round((n(e)-n(t))/Vt)}function ys(e,t){if(e.closedAt!=null)return{score:w,reasons:[]};const n=t.remindersById?.[e.id];if(n&&n.remindAt>t.now)return{score:w,reasons:[]};let r=0;const i=[],o=e.priority??"normal";if(P[o]>0&&(r+=P[o],i.push(`priority:${o}`)),typeof e.dueDate=="number"){const a=Es(e.dueDate,t.now);a<0?(r+=35,i.push("overdue")):a===0&&(r+=20,i.push("due-today"))}return e.source?.initiator==="system"&&e.source.systemReason&&(r+=15,i.push(`auto:${e.source.systemReason}`)),{score:r,reasons:i}}const pe=[{key:"task",label:"type_task"},{key:"bug",label:"type_bug"},{key:"story",label:"type_story"},{key:"epic",label:"type_epic"},{key:"subtask",label:"type_subtask"},{key:"case",label:"type_case"},{key:"deal",label:"type_deal"}],_s=pe.map(e=>e.key);function As(e){return e?.types?.length?e.types:pe}function Ss(e,t){return t.find(n=>n.key===e)}function bs(e){const t=e.trim().toLowerCase();return t?t.includes("sub-task")||t.includes("subtask")||t.includes("sub task")?"subtask":t.includes("bug")||t.includes("defect")?"bug":t.includes("epic")?"epic":t.includes("story")?"story":t.includes("incident")||t.includes("problem")||t.includes("service request")||t.includes("change")?"case":t.includes("task")?"task":null:null}function Ts(...e){return e.map(t=>pe.find(n=>n.key===t)).filter(t=>!!t)}const sr="work_item",cr="work_project",lr="work_activity",Is="work_cycle";function ur(e){return`${sr}:${e}`}function je(e){return`${cr}:${e}`}function Os(e){return`${lr}:${e}`}function Ms(e,t,n){const r=`${e}-${t}`;return n?`${r}-${n}`:r}function Rs(e){const t=/^([A-Za-z0-9]{2,8})-(\d+)(?:-(\d+))?$/.exec((e||"").trim());return t?{projectKey:t[1].toUpperCase(),sequenceNumber:Number(t[2]),...t[3]?{subSequence:Number(t[3])}:{}}:null}function ws(e){return(e||"").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toUpperCase().replace(/[^A-Z0-9]/g,"").slice(0,3)||"PRJ"}function Cs(e,t=25){const n=new Set([ur(e.id)]);e.projectId&&n.add(je(e.projectId));for(const r of e.ancestorKeys??[])n.add(r);for(const r of e.partyKeys??[])n.add(r);return Array.from(n).slice(0,t)}function Ns(e){return[je(e.id)]}const fe=[{key:"open",label:"status_open",category:"todo",order:0},{key:"in_progress",label:"status_in_progress",category:"in_progress",order:1},{key:"done",label:"status_done",category:"done",order:2},{key:"cancelled",label:"status_cancelled",category:"done",order:3}],Ye=fe.map(e=>e.key);function dr(e){return e?.statuses?.length?e.statuses:fe}function pr(e,t){return t.find(n=>n.key===e)?.category??"todo"}function ks(e,t){return t.find(n=>n.key===e)}function vs(e){const t=dr(e),n=e?.defaultStatusKey;return n&&t.some(r=>r.key===n)?n:fr(t)[0]?.key??fe[0].key}function fr(e){return[...e].sort((t,n)=>{const r=(t.order??0)-(n.order??0);return r!==0?r:(t.label||"").localeCompare(n.label||"")})}function Ds(e,t){return pr(e,t)==="done"}function mr(e){return(e||"").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").slice(0,48).replace(/^-+|-+$/g,"")}function xs(e,t){const n=mr(e)||"status",r=new Set([...t,...Ye]);if(!r.has(n))return n;for(let i=2;i<500;i++){const o=`${n}-${i}`;if(!r.has(o))return o}return`${n}-${r.size+1}`}function Ls(e){const t=[];if(!e.length)return[{index:-1,reason:"empty"}];const n=new Set;return e.forEach((r,i)=>{if(!r.key){t.push({index:i,reason:"missing_key"});return}Ye.includes(r.key)&&t.push({index:i,reason:"reserved_key",key:r.key}),n.has(r.key)&&t.push({index:i,reason:"duplicate_key",key:r.key}),n.add(r.key)}),e.some(r=>r.category==="todo"||r.category==="in_progress")||t.push({index:-1,reason:"no_open"}),e.some(r=>r.category==="done")||t.push({index:-1,reason:"no_done"}),t}function Ps(e){return e.startDate??Number.MAX_SAFE_INTEGER}function Us(e){return e.completedAt?"completed":e.startedAt?"active":"planned"}const Ks=new Set(["image/png","image/jpeg","image/jpg","image/gif","image/webp"]),$s=new Set(["text/plain","text/markdown","text/csv","application/json","text/html","application/xml","text/xml"]);function gr(e){const t=(e??"").trim().toLowerCase().split(";")[0];return t?Ks.has(t)?"image":t==="application/pdf"?"pdf":$s.has(t)?"text":t.startsWith("audio/")?"audio":"unsupported":"unsupported"}const D=1024*1024,hr={image:5*D,pdf:20*D,text:1*D,audio:20*D},Fs=25*D,Bs=5;function Hs(e,t){const n=gr(e);return n==="unsupported"?"unsupported":t>hr[n]?"too-large":null}function Gs(e){return e.access!=="read"&&e.effect!=="internal"}function Er(e){return`${e.kind}:${e.id||e.url||e.title}`}function Ws(e,t=[]){const n=new Set(t),r=[],i=[];for(const o of e){const a=Er(o);n.has(a)||(n.add(a),r.push(o),i.push(a))}return{sources:r,keys:i}}const Vs="assist-source",js=["blocking","due","open"];function Ys(e,t){const[n,r]=(e.subjectKey??"").split(":");return n===t&&r?r:void 0}const mt={blocking:0,due:1,open:2};function Xs(e,t){return mt[e.band??"open"]-mt[t.band??"open"]||(t.priority??0)-(e.priority??0)||e.id.localeCompare(t.id)}function zs(e){return e.sessions.filter(t=>t.id!==e.exceptSessionId&&t.state==="connected"&&e.canHold(t.providerId))}function qs(e){return e.sessions.filter(t=>t.id!==e.exceptSessionId&&t.state==="connected"&&!e.canHold(t.providerId))}function Js(e){return e.sessions.some(n=>n.id!==e.exceptSessionId&&(n.state==="connected"||n.state==="on_hold"))?{admit:!1,reason:"busy"}:{admit:!0}}function yr(e,t){const n=new Set(e.disabledIntents??[]),r=e.intentOverrides??{},i=t.intents.filter(a=>!n.has(a.intent)).map(a=>Qs(a,r[a.intent]));if(!e.extraIntents||e.extraIntents.length===0)return i;const o=new Set(i.map(a=>a.intent));for(const a of e.extraIntents)o.has(a.intent)||(i.push(a),o.add(a.intent));return i}function _r(e,t){const n={};for(const r of e.intents){if(!r.togglable)continue;const i=t?.[r.intent];n[r.intent]=i??r.defaultEnabled??!0}return n}function Zs(e,t){const n=_r(e,t);return Object.entries(n).filter(([,r])=>!r).map(([r])=>r)}function Qs(e,t){return t?{intent:t.intent??e.intent,targetSchemes:t.targetSchemes??e.targetSchemes,transport:t.transport??e.transport}:e}function ec(e,t){const n=[];for(const r of e){if(!r.enabled)continue;const i=t[r.providerId];if(i)for(const o of yr(r,i))n.push({channel:r,description:i,capability:o})}return n}function tc(e,t){return t.filter(n=>n.capability.intent===e)}function Ar(e,t){return t.filter(n=>n.capability.targetSchemes.includes(e))}function nc(e,t){return Ar(e.scheme,t)}function rc(e,t,n){const r=[];for(const i of e)for(const o of n)o.capability.intent===t&&o.capability.targetSchemes.includes(i.scheme)&&r.push({channelIntent:o,endpoint:i});return r}var Sr=(e=>(e.MAILTO="mailto",e.SIP="sip",e.TEL="tel",e.WEBHOOK="webhook",e.USERNAME="username",e.ID="id",e.CUSTOM="custom",e.URL="url",e.TELEGRAM="telegram",e.WHATSAPP="whatsapp",e.MESSENGER="messenger",e.INSTAGRAM="instagram",e.VIBER="viber",e.SMS="sms",e.FAX="fax",e.TEAMS="teams",e.CALENDAR="calendar",e))(Sr||{});const ic={mailto:"mail",sip:"tel",tel:"tel",fax:"tel",sms:"chat",teams:"chat",telegram:"chat",messenger:"chat",instagram:"chat",viber:"chat",whatsapp:"wa",webhook:"note",url:"note",calendar:"note",username:"note",id:"note",custom:"note"};function oc(e){return e?ic[e]??"note":"note"}const ac="message_window",sc="message_templates",cc={FROM:"from",TO:"to",CC:"cc",BCC:"bcc",ORGANIZER:"organizer",PRESENTER:"presenter",ATTENDEE:"attendee",OWNER:"owner",MEMBER:"member",GUEST:"guest",HOST:"host",PARTICIPANT:"participant"},lc=(e,t)=>({intent:e,...t}),uc="folder_management",dc="remote_search",pc="message_reactions",fc={ok:!1,code:"UNSUPPORTED",message:"Provider does not support this op"},mc="connector",gc="context.collect",g=e=>({type:"string",description:e}),m=e=>({type:"number",description:e}),J=e=>({type:"boolean",description:e}),O=g("Sheet name. Omit for the sheet the user is looking at."),gt=g("Slide id, as `inspect` reports it.");function f(e,t,n,r,i,o){return{op:e,kinds:t,summary:n,parameters:{type:"object",properties:r,required:i},undoable:o.undoable,visible:o.visible}}const x={undoable:!1,visible:!0},y={undoable:!0,visible:!0},ht={undoable:!1,visible:!0},ae={undoable:!1,visible:!1},hc=[f("pdf.goToPage",["pdf"],"Scroll the viewer to a page.",{page:m("1-based page number.")},["page"],x),f("pdf.search",["pdf"],"Search the document and highlight the matches, as the find bar does.",{query:g("Text to find."),next:J("Jump to the next match instead of the first.")},["query"],x),f("pdf.setTool",["pdf"],"Select a markup tool for the user, so their next click draws it.",{tool:{type:"string",enum:["highlight","text","draw","image","signature","none"],description:"Which tool to arm. `none` puts the tool row back to reading."}},["tool"],x),f("pdf.fillField",["pdf"],"Fill one form field of a fillable PDF.",{field:g("Field name, exactly as `inspect` reports it under `fields`."),value:{type:["string","boolean"],description:"Text for a text field, true/false for a checkbox or radio."}},["field","value"],y),f("pdf.reorderPages",["pdf"],"Put the pages in a different order. Pages left out are deleted.",{order:{type:"array",items:{type:"number"},description:"1-based source page numbers, in the order they should end up in."}},["order"],ht),f("pdf.deletePages",["pdf"],"Remove pages, keeping the rest in order.",{pages:{type:"array",items:{type:"number"},description:"1-based page numbers."}},["pages"],ht),f("pdf.addNote",["pdf"],"Place a text note on a page. Written on save; not visible before that.",{page:m("1-based page number."),text:g("The note's text."),left:m("Distance from the left edge, in PDF points (72 per inch)."),top:m("Distance from the top edge, in PDF points."),width:m("Box width in points. Omit for a sensible default."),height:m("Box height in points. Omit for a sensible default."),fontSize:m("Font size in points. Omit for 12.")},["page","text","left","top"],ae),f("pdf.highlightText",["pdf"],"Highlight a phrase on a page. Written on save; not visible before that.",{page:m("1-based page number."),text:g("The exact phrase to highlight, as it appears in the page's text."),occurrence:m("Which occurrence on that page, 1-based. Omit for the first.")},["page","text"],ae)],Ec=[f("sheet.setValues",["sheet"],"Write a block of values. The block's shape must match the range.",{sheet:O,range:g("A1 notation, e.g. `B2:D5` or a single `A1`."),values:{type:"array",items:{type:"array",items:{type:["string","number","boolean","null"]}},description:"Rows of cells, top-left first. `null` clears a cell."}},["range","values"],y),f("sheet.setFormula",["sheet"],"Put a formula in every cell of a range.",{sheet:O,range:g("A1 notation."),formula:g("Including the leading `=`.")},["range","formula"],y),f("sheet.setStyle",["sheet"],"Change the look of a range. Only the properties you pass are touched.",{sheet:O,range:g("A1 notation."),bold:J("Bold on or off."),italic:J("Italic on or off."),fontSize:m("Point size."),fontColor:g("CSS colour, e.g. `#b91c1c`."),background:g("CSS colour for the cell fill."),horizontalAlignment:{type:"string",enum:["left","center","right"],description:"Horizontal alignment."},numberFormat:g("Number format pattern, e.g. `#,##0.00` or `0%`.")},["range"],y),f("sheet.insertRows",["sheet"],"Insert empty rows, pushing the rest down.",{sheet:O,at:m("1-based row number to insert before."),count:m("How many. Omit for 1.")},["at"],y),f("sheet.deleteRows",["sheet"],"Delete rows, pulling the rest up.",{sheet:O,at:m("1-based first row to delete."),count:m("How many. Omit for 1.")},["at"],y),f("sheet.insertColumns",["sheet"],"Insert empty columns, pushing the rest right.",{sheet:O,at:m("1-based column number to insert before."),count:m("How many. Omit for 1.")},["at"],y),f("sheet.deleteColumns",["sheet"],"Delete columns, pulling the rest left.",{sheet:O,at:m("1-based first column to delete."),count:m("How many. Omit for 1.")},["at"],y),f("sheet.merge",["sheet"],"Merge a range into one cell.",{sheet:O,range:g("A1 notation.")},["range"],y),f("sheet.unmerge",["sheet"],"Break merged cells in a range apart.",{sheet:O,range:g("A1 notation.")},["range"],y),f("sheet.sort",["sheet"],"Sort a range on one of its columns.",{sheet:O,range:g("A1 notation covering the rows to sort, header excluded."),column:m("1-based column *within the range*, not within the sheet."),ascending:J("Ascending. Omit for ascending.")},["range","column"],y),f("sheet.insertSheet",["sheet"],"Add a new sheet.",{name:g("Name for the new sheet.")},["name"],y),f("sheet.renameSheet",["sheet"],"Rename a sheet.",{sheet:g("Current name."),name:g("New name.")},["sheet","name"],y),f("sheet.deleteSheet",["sheet"],"Remove a sheet and everything on it.",{sheet:g("Name of the sheet to delete.")},["sheet"],y),f("sheet.activate",["sheet"],"Show the user a sheet and select a range on it.",{sheet:O,range:g("A1 notation to select. Omit to only switch sheets.")},[],x)],yc=[f("word.replaceParagraph",["word"],"Rewrite one whole paragraph, keeping its style. This is the verb for shortening or rephrasing something; call it once per paragraph.",{at:m("The offset the paragraph starts at, exactly as `inspect` prints it."),text:g("The new text for that paragraph. A newline starts a further paragraph.")},["at","text"],y),f("word.replaceRange",["word"],"Replace a stretch of text inside a paragraph - a sentence, a phrase. To rewrite whole paragraphs use word.replaceParagraph: a range covering several paragraph styles is refused, because a replacement carries one style and would set the whole span in the first.",{start:m("Character offset where the replaced text starts, as `inspect` reports offsets."),end:m("Character offset just past the last character to replace."),text:g("The replacement text. A newline starts a new paragraph.")},["start","end","text"],y),f("word.insertText",["word"],"Insert text at a character offset, without removing anything.",{index:m("Character offset, as `inspect` reports offsets."),text:g("The text to insert.")},["index","text"],y),f("word.appendText",["word"],"Add text at the end of the document.",{text:g("The text to append.")},["text"],y),f("word.insertParagraph",["word"],"Start a new paragraph, optionally with text in it.",{text:g("Paragraph text. Newlines start further paragraphs."),index:m("Character offset to insert at. Omit for the end of the document.")},[],y),f("word.setSelection",["word"],"Put the user's cursor on a stretch of text, and move the reading window there: the page context carries one window of a long document, and the text around this offset arrives in the next turn.",{start:m("Start character offset."),end:m("End character offset. Omit for a caret.")},["start"],x)],_c=[f("slides.setText",["slides"],"Replace the text of one shape. Written on save; not visible before that, and not undoable.",{slide:gt,element:g("Element id, as `inspect` reports it."),text:g("The new text.")},["slide","element","text"],ae),f("slides.setTransform",["slides"],"Move or resize one shape. Only the values you pass change. Written on save; not visible before that, and not undoable.",{slide:gt,element:g("Element id."),left:m("Distance from the left edge, in pixels."),top:m("Distance from the top edge, in pixels."),width:m("Width in pixels."),height:m("Height in pixels.")},["slide","element"],ae)],Xe=[...hc,...Ec,...yc,..._c];function Ac(e){return Xe.filter(t=>t.kinds.includes(e))}function Sc(e){return Xe.find(t=>t.op===e)}const bc="documents.describe",Tc="documents.inspect",Ic="documents.apply";function Oc(e){const t=e.indexOf(":");if(t!==-1)return e.slice(0,t);const n=e.indexOf(".");return n===-1?e:e.slice(0,n)}const Mc="installation-id";function Rc(e){const t=[];for(const n of Object.keys(e))for(const r of Object.keys(e[n]))t.push({lang:n,key:r,value:e[n][r]});return t}const wc="notification-source",Cc=(e,t)=>`${e}.pref.${t}`,Nc={ai:["account.read","account.write","agent.read","agent.write","assignment.read","assignment.write","budget.read","budget.write","connector.read","connector.write","context.read","context.write","conversation.read","conversation.write","lens.read","lens.write","message.read","message.write","playbook.read","playbook.write","profile.read","profile.write","run.read","run.write","settings.read","settings.write","tool.read","transcript.write","usage.read"],analytics:["report.read"],"app-store":["app.publish","app.read","app.write","setting.read","setting.write"],assist:["board.read"],automations:["sync.read","sync.write","webhook.read","webhook.write"],communication:["account.read","account.write","activity-type.read","activity.read","activity.write","attachment.read","attribute.read","attribute.write","calendar.read","calendar.write","channel.read","channel.write","custom-field.read","custom-field.write","folder.read","folder.write","inbox.read","inbox.write","interaction.read","interaction.write","reaction.read","reaction.write","reminder.read","template.read","template.write","topic.read","topic.write"],context:["kind.read","kind.write","memory.read","memory.write"],crm:["company.read","company.write","contact.read","contact.write"],"eylo-voip":["account.read","account.write","callflow.read","callflow.write","channel.read","channel.write","contact.read","contact.write","device.read","device.write","group.read","group.write","interaction.read","interaction.write","media.read","media.write","menu.read","menu.write","phone-number.read","phone-number.write","recording.read","recording.write","sip.read","temporal-rule.read","temporal-rule.write","user.read","user.write","vmbox.read","vmbox.write","webhook.read","webhook.write"],google:["account.read","account.write","contact.read"],kb:["article.read","article.write","category.read","category.write","help-center.read","help-center.write","kb.read","kb.write"],mail:["account.write"],meta:["account.read","account.write"],microsoft:["account.read","account.write","contact.read","sync.write"],organization:["billing.read","billing.write","settings.read","settings.write","team.read","team.write"],shopify:["account.read","account.write","order.read"],slack:["thread.read","thread.write"],storage:["artifact.read","artifact.write","file.read","file.write","mount.read","mount.write"],time:["entry.read","entry.write","work-type.read","work-type.write"],user:["user.read","user.write"],work:["item.read","item.write","project.read","project.write"]},ze=9e4,br=["out_of_office"],Tr=e=>br.includes(e);function kc(e,t,n){const r=n-e<ze,i=t?.status&&(!t.expiresAt||t.expiresAt>n)?t:void 0;if(!i?.status)return{online:r,status:r?"available":"offline"};const o=i.status;return!r&&!Tr(o)?{online:!1,status:"offline"}:{online:r,status:o,message:i.message}}function vc(e,t){const n=t-e.lastSeenAt<ze,r=n||Tr(e.status)?e.status:"offline";return n===e.online&&r===e.status?e:{...e,online:n,status:r}}function Dc(e,t){return e?.teamId&&t.includes(e.teamId)?{teamId:e.teamId,mustChoose:!1}:t.length===1?{teamId:t[0],mustChoose:!1}:{teamId:void 0,mustChoose:t.length>1}}function xc(e){return e.providerAvailable&&e.allowed}const Lc="resources.describe",Pc="resources.search",Uc="resources.resolve",Kc="resources.attached";function $c(e){const t=e.indexOf(":");return t===-1?e:e.slice(0,t)}const Fc="/provider/scope/related",Bc="/provider/scope/read",qe="auth";function Je(e){const t=typeof e=="string"?e.match(/apps\/([^/?#]+)/):null;return t?t[1]:null}function Hc(e){const t=Je(e);return t?t!==qe:typeof e=="string"&&e.startsWith("/wake")}function Gc(e){return typeof e!="string"||e===""||e==="/"?!0:Je(e)===qe}function Wc(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ir(e){const n=e.split("/").filter(Boolean).map(r=>r.startsWith(":")?r.endsWith("?")?"(?:/[^/]+)?":"/[^/]+":`/${Wc(r)}`).join("");return new RegExp(`^${n}\\/?$`)}function Or(e,t){const n=e.split("/").filter(Boolean),r=t.split("/").filter(Boolean),i={};return n.forEach((o,a)=>{if(o.startsWith(":")){const s=o.endsWith("?")?o.slice(1,-1):o.slice(1),c=r[a];c&&(i[s]=c)}}),i}function Mr(e){return e.publicBasePath??`/apps/${e.name}`}function Vc(e){const t=[];for(const n of e){if(!n?.name)continue;const r=Mr(n);for(const i of n.routes??[]){if(!i.public)continue;const o=i.path==="/"?"":i.path;t.push({appName:n.name,resource:i.resource,pattern:`${r}${o}`,props:i.props})}}return t}function Rr(e,t){const n=e.split("/").filter(Boolean),r=t.split("/").filter(Boolean);for(let i=0;i<Math.min(n.length,r.length);i++){const o=n[i].startsWith(":"),a=r[i].startsWith(":");if(o!==a)return a}return n.length>r.length}function wr(e,t){if(typeof e!="string")return null;let n=null;for(const r of t)Ir(r.pattern).test(e)&&(!n||Rr(r.pattern,n.pattern))&&(n=r);return n?{...n,params:{...n.props,...Or(n.pattern,e)}}:null}function jc(e,t){return wr(e,t)!==null}const Yc=10*1024*1024,Xc=25*1024*1024,zc="sync-target",qc=20,Jc={afrikaans:["[Muziek]","(C) TV GELDERLAND 2021","*Thomp thomp thomp*","www.youtube.com","ä n wood s","!.."],english:["[applause]","[APPLAUSE]","(claps)","(clapping)","(audience applauds)","(keyboard clicking)","(keyboard clacking)","(clicking)","[CLICK]","[BLANK_AUDIO]","(upbeat music)","(dramatic music)","[music playing]","(electronic music)","(audience cheering)","(audience cheers)","[MUSIC]","( ( ( ( ) ( ) ( ) ( )","(laughs)","(air whooshing)","<u>Transcribed</u> by https://otter.ai","All new tonight at 6... coming up. A new look at your forecast is A new look at your forecast is","www.mooji.org","KATHRYN A new forecast is coming up... A new forecast is coming up...","KATHRYN pandemic started. increasing since the The pandemic has been","A new look at your forecast this morning... A new look at your","We'll be right back.","We'll see you next week.","Thanks for watching!","❤️ Translated by Amara.org Communit"],flemish:["*clap*","TV GELDERLAND 2020","TV Gelderland 2021","(C) TV GELDERLAND 2021","[Muziek]","Kuman","Ondertitels ingediend door de Amara.org gemeenschap","Ondertiteld door de Amara.org gemeenschap","Dank u wel voor het kijken.","Ondertiteling door de Amara.org gemeenschap","GELUID VAN MAHIH U similarly"],french:["(applaudissements)","[Applaudissements]","Sous-titres réalisés par la communauté d'Amara.org","- Bonne journée. - Bonjour.","POP POP הי","Merci d'avoir regardé cette vidéo.","Merci d'avoir regardé cette vidéo!","Merci d'avoir regardé la vidéo.","J'espère que vous avez apprécié la vidéo.","Je vous remercie de vous abonner","Merci d'avoir regardé!","❤️ par SousTitreur.com","— Sous-titrage ST'501 —","Thanks for watching!","Sous-titres réalisés par l'Amara.org","Sous-titres réalisés para la communauté d'Amara.org","Sous-titres réalisés par la communauté d'Amara.org","Sous-titres fait par Sous-titres par Amara.org","Sous-titres réalisés par les SousTitres d'Amara.org","Sous-titres par Amara.org","Sous-titres par la communauté d'Amara.org","Sous-titres réalisés pour la communauté d'Amara.org","Sous-titres réalisés par la communauté de l'Amara.org","Sous-Titres faits par la communauté d'Amara.org","Sous-titres par l'Amara.org","Sous-titres fait par la communauté d'Amara.org","Sous-titrage ST' 501","Sous-titrage ST'501","Cliquez-vous sur les sous-titres et abonnez-vous à la chaîne d'Amara.org","❤️ par SousTitreur.com"],german:["[Klicken]","(Jubel)","*lacht*","[Anhaltender Beifall]","[Applaus]","(Applaus)","* Applaus *","[MUSIK]","* mustard ml Drumglöck und knack in einem Handbewerb *","Untertitelung aufgrund der Amara.org-Community","Untertitel im Auftrag des ZDF für funk, 2017","Untertitel von Stephanie Geiges","Untertitel der Amara.org-Community","Untertitel im Auftrag des ZDF, 2017","Untertitel im Auftrag des ZDF, 2020","Untertitel im Auftrag des ZDF, 2018","Untertitel im Auftrag des ZDF, 2021","Untertitelung im Auftrag des ZDF, 2021","Copyright WDR 2021","Copyright WDR 2020","Copyright WDR 2019","SWR 2021","SWR 2020"],italian:["Alla prossima!","*applauso*","[Musica]","[Musica]","[Applausi]","*Bip bip bip bip*","(musica del NS shore)","D' 1962 alle tribunte del Gulf","Sottotitoli creati dalla comunità Amara.org","Sottotitoli di Sottotitoli di Amara.org","Sottotitoli e revisione al canale di Amara.org","Sottotitoli e revisione a cura di Amara.org","Sottotitoli e revisione a cura di QTSS","Sottotitoli e revisione a cura di QTSS.","Sottotitoli a cura di QTSS","Sottotitoli a cura di Sottotitoli"],spanish:["[música]","[Música de cierre]","[Aplausos]","(Aplausos)","www.alimmenta.com","¡Gracias por ver el vídeo!","(sonidos del celular) (Inudible distorsión)","¡Suscríbete!","Subtítulos realizados por la comunidad de Amara.org","Subtitulado por la comunidad de Amara.org","Subtítulos por la comunidad de Amara.org","Subtítulos creados por la comunidad de Amara.org","Subtítulos en español de Amara.org","Subtítulos hechos por la comunidad de Amara.org","Subtitulos por la comunidad de Amara.org","Más información www.alimmenta.com","www.mooji.org","[MÚSICA]","[Music cuts in British]"]},Cr=e=>{let t=e;return Object.values(Jc).forEach(n=>{n.forEach(r=>{t=t.replaceAll(r,"")})}),t=t.replace(/\(.*?\)/g,""),t=t.replace(/\[.*?\]/g,""),t},Nr=6e4,kr=8e3,vr=2,Dr=.4,Zc=3,Qc=new Set(["aan","als","ben","bent","bij","dan","dat","deze","die","dit","doen","door","dus","echt","een","eens","even","gaan","gaat","geen","geweest","goed","graag","had","heb","hebben","hebt","heeft","het","hier","hoe","hoor","iets","inderdaad","kan","klopt","kunnen","kunt","maar","mag","mee","meer","met","mij","mijn","misschien","moet","moeten","naar","net","niet","nog","nou","oke","ook","over","prima","toch","uhm","uit","van","veel","voor","wat","weer","weet","wel","wij","wil","wilt","worden","wordt","zeg","zeggen","zijn","zou","zult","about","and","are","been","but","can","does","for","have","just","know","like","not","okay","right","she","that","the","them","then","there","they","this","want","was","well","were","what","will","with","would","yeah","you","your"]);function xr(e){const t=new Set;for(const n of e.toLowerCase().split(/[^a-z0-9À-ɏ]+/))n.length<Zc||Qc.has(n)||t.add(n);return[...t]}function Lr(e,t){if(!e.length)return 0;if(!t.length)return 1;const n=new Set(t),r=new Set(e);let i=0;for(const o of r)n.has(o)||(i+=1);return i/r.size}function Pr(e,t=Nr){const n=e.filter(a=>!a.partial&&typeof a.text=="string");if(!n.length)return{text:"",segmentCount:0};const i=n.reduce((a,s)=>Math.max(a,s.endedAt??0),0)-t;return{text:n.filter(a=>(a.endedAt??0)>=i).map(a=>Cr(a.text).trim()).filter(Boolean).join(" ").replace(/\s+/g," ").trim(),segmentCount:n.length}}const Ur=60;function el(e,t,n=Ur){const r=new Set(e),i=[...e];for(const o of t)!o||r.has(o)||(r.add(o),i.push(o));return i.slice(-n)}function tl(e){const{segments:t,now:n,state:r}=e;if(r.lastTriggerAt&&n-r.lastTriggerAt<kr)return{trigger:!1,reason:"too_soon"};const i=Pr(t,e.windowMs);if(!i.text)return{trigger:!1,reason:"no_speech"};const o=i.segmentCount-(r.lastSegmentCount??0);if(r.lastQueryTerms&&o<vr)return{trigger:!1,reason:"too_few_new"};const a=xr(i.text);return a.length?r.lastQueryTerms?.length&&Lr(a,r.lastQueryTerms)<Dr?{trigger:!1,reason:"same_topic"}:{trigger:!0,text:i.text,terms:a,segmentCount:i.segmentCount}:{trigger:!1,reason:"no_speech"}}const nl=["personal","workspace","connections","work","ai"],rl="navNotice",me={NL:{callingCode:"31",trunkPrefix:"0",nsnMin:7,nsnMax:9},BE:{callingCode:"32",trunkPrefix:"0",nsnMin:8,nsnMax:9},LU:{callingCode:"352",nsnMin:6,nsnMax:9},DE:{callingCode:"49",trunkPrefix:"0",nsnMin:6,nsnMax:13},FR:{callingCode:"33",trunkPrefix:"0",nsnMin:9,nsnMax:9},GB:{callingCode:"44",trunkPrefix:"0",nsnMin:9,nsnMax:10},IE:{callingCode:"353",trunkPrefix:"0",nsnMin:7,nsnMax:9},ES:{callingCode:"34",nsnMin:9,nsnMax:9},PT:{callingCode:"351",nsnMin:9,nsnMax:9},IT:{callingCode:"39",nsnMin:6,nsnMax:11},AT:{callingCode:"43",trunkPrefix:"0",nsnMin:7,nsnMax:13},CH:{callingCode:"41",trunkPrefix:"0",nsnMin:9,nsnMax:9},DK:{callingCode:"45",nsnMin:8,nsnMax:8},SE:{callingCode:"46",trunkPrefix:"0",nsnMin:7,nsnMax:13},NO:{callingCode:"47",nsnMin:8,nsnMax:8},FI:{callingCode:"358",trunkPrefix:"0",nsnMin:5,nsnMax:12},PL:{callingCode:"48",nsnMin:9,nsnMax:9},US:{callingCode:"1",nsnMin:10,nsnMax:10},CA:{callingCode:"1",nsnMin:10,nsnMax:10}},Kr="NL",il=15,ol=8,al=Array.from(new Set(Object.values(me).map(e=>e.callingCode))).sort((e,t)=>t.length-e.length);function Et(e){if(e)return me[e.trim().toUpperCase()]}function Z(e,t){return e.length>=t.nsnMin&&e.length<=t.nsnMax}function yt(e){if(e.length>il)return null;for(const t of al){if(!e.startsWith(t))continue;const n=e.slice(t.length);for(const r of Object.values(me)){if(r.callingCode!==t)continue;const i=r.trunkPrefix,o=i&&n.startsWith(i)?n.slice(i.length):n;if(Z(o,r))return`+${t}${o}`}return null}return e.length<ol?null:`+${e}`}function sl(e){let t=e.trim();const n=t.match(/^(sips?|tel|whatsapp):/i);n&&(t=t.slice(n[0].length));const r=t.indexOf("@");return r>=0&&(t=t.slice(0,r)),t.trim()}function cl(e){if(!e)return!1;const t=e.indexOf("@");if(t<=0)return!1;const n=e.slice(0,t).trim();return!/^[+\d\s().-]+$/.test(n)}function xe(e,t){if(!e)return null;const n=sl(e);if(!n)return null;const r=n.startsWith("+"),i=n.replace(/\D/g,"");if(!i)return null;if(r)return yt(i);if(i.startsWith("00"))return yt(i.slice(2));const o=Et(t)??Et(Kr);if(!o)return null;const a=o.trunkPrefix;if(a&&i.startsWith(a)){const s=i.slice(a.length);return Z(s,o)?`+${o.callingCode}${s}`:null}if(i.startsWith(o.callingCode)){const s=i.slice(o.callingCode.length);if(Z(s,o))return`+${o.callingCode}${s}`}return!a&&Z(i,o)?`+${o.callingCode}${i}`:null}function ll(e,t=9){const n=(e??"").replace(/\D/g,"");return n.length<t?null:n.slice(-t)}function Ze(e){if(!e)return null;const t=e.trim().toLowerCase(),n=t.lastIndexOf("@");if(n<=0||n===t.length-1)return null;const r=t.slice(0,n).split("+")[0],i=t.slice(n+1);return!r||!i.includes(".")?null:`${r}@${i}`}function ul(e){const t=Ze(e);return t?t.slice(t.lastIndexOf("@")+1):null}const dl=new Set(["co.uk","org.uk","gov.uk","ac.uk","com.au","co.nz","com.br","co.za"]);function $r(e){if(!e)return null;const t=e.trim().toLowerCase().replace(/\.$/,"").split(".").filter(Boolean);if(t.length<2)return null;const n=t.slice(-2).join(".");return dl.has(n)&&t.length>=3?t.slice(-3).join("."):n}const Fr=new Set(["gmail.com","googlemail.com","outlook.com","hotmail.com","hotmail.nl","hotmail.be","hotmail.co.uk","live.com","live.nl","live.be","msn.com","yahoo.com","yahoo.co.uk","ymail.com","icloud.com","me.com","mac.com","aol.com","gmx.net","gmx.de","web.de","protonmail.com","proton.me","pm.me","tutanota.com","zoho.com","mail.com","ziggo.nl","kpnmail.nl","planet.nl","home.nl","casema.nl","chello.nl","xs4all.nl","telfort.nl","hetnet.nl","zonnet.nl","upcmail.nl","quicknet.nl","telenet.be","skynet.be","proximus.be","scarlet.be"]);function pl(e){const t=$r(e);return t?Fr.has(t):!1}function fl(e){if(!e)return!1;const t=e.trim().toLowerCase();return t==="tel"||t==="sms"||t==="whatsapp"||t==="fax"}function ml(e,t,n){if(!e||!t)return null;const r=e.trim().toLowerCase();if(r==="tel"||r==="sms"||r==="whatsapp"){const o=xe(t,n);return o?`tel:${o}`:null}if(r==="fax"){const o=xe(t,n);return o?`fax:${o}`:null}if(r==="mailto"||r==="email"){const o=Ze(t);return o?`mailto:${o}`:null}const i=t.trim().toLowerCase();return i?`${r}:${i}`:null}const gl=[/<blockquote/i,/class="?gmail_quote/i,/id="?[^"]*divRplyFwdMsg/i,/id="?[^"]*mail-editor-reference-message-container/i,/-{3,}\s*Original Message\s*-{3,}/i,/\n_{5,}\s*\n/,/\bOn\b[\s\S]{0,200}?\bwrote:/i],_t=/^\s*(?:>+\s*)?(?:from|van|sent|verzonden|to|aan|cc|subject|onderwerp|date|datum)\s*:/i,hl=/^\s*(?:on|op)\b.{0,200}?\b(?:wrote|schreef|geschreven)\s*:?\s*$/i;function El(e){const t=e.split(`
10
- `);for(let n=0;n<t.length;n++)if(hl.test(t[n])||_t.test(t[n])&&t.slice(n+1,n+4).some(r=>_t.test(r)))return t.slice(0,n).join(`
11
- `).trim();return e}const yl=/^(?:https?:|mailto:|tel:)/i,_l=/^(?:https?:|cid:|data:image\/)/i;function _e(e,t){const n=e.match(new RegExp(`\\b${t}\\s*=\\s*(?:"([^"]*)"|'([^']*)'|([^\\s">]+))`,"i"));return(n?.[1]??n?.[2]??n?.[3]??"").trim()}const Al=/(!\[[^\]]*\]\([^)]*\))/;function At(e){return e.replace(/\s+/g," ").trim().split(Al).map((t,n)=>n%2===1?t:t.replace(/[[\]]/g,"\\$&")).join("")}function Ae(e){return e.replace(/[()\s<>"]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0")}`)}function Sl(e){return e.replace(/<img\b([^>]*?)\/?>/gi,(n,r)=>{const i=_e(r,"src");return _l.test(i)?`![${At(_e(r,"alt"))}](${Ae(i)})`:""}).replace(/<a\b([^>]*)>([\s\S]*?)<\/a\s*>/gi,(n,r,i)=>{const o=At(i.replace(/<[^>]*>/g,"")),a=_e(r,"href");return yl.test(a)?`[${o||Ae(a)}](${Ae(a)})`:o})}const bl=/<table\b[^>]*>((?:(?!<table\b)[\s\S])*?)<\/table\s*>/i,Tl=/<tr\b[^>]*>([\s\S]*?)<\/tr\s*>/gi,Il=/<(t[dh])\b([^>]*)>([\s\S]*?)<\/\1\s*>/gi;function Ol(e,t){return/<table\b/i.test(e)||e.includes(`
9
+ `:t==="mail"?"<br><br>-- <br>":"<br><br>"}${o.body}`:n}function fi(e){return e.endpoints??[]}const tn=36e5,nn=864e5,v=-1/0,mi=e=>e.score>v,H={urgent:40,high:25,normal:10,low:0};function gi(e){return Object.fromEntries(e.map(t=>[t.resourceId,t]))}const hi=/(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|newsletter|nieuwsbrief|mailer|mailing|notifications?|bounce|postmaster|marketing)@/i,rn=/\b(unsubscribe|afmelden|uitschrijven|opt[\s-]?out|manage (your )?preferences|geen (e-?mails?|nieuwsbrief|berichten) meer)\b/i;function on(e,t){return!!(e&&hi.test(e)||t&&rn.test(t))}const sn=3,an=600;function Ei(e,t){return e>=sn||t>=an}const cn=["list-unsubscribe","list-unsubscribe-post","list-id","precedence","auto-submitted","x-auto-response-suppress","feedback-id","x-mailer"];function yi(e){const t={};for(const n of e){const r=n.name?.toLowerCase();r&&n.value!==void 0&&cn.includes(r)&&(t[r]=n.value)}return t}const Ai=/(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|notifications?|bounce|postmaster|mailer)@/i,_i=/(^|[._+-])(newsletter|nieuwsbrief|marketing|mailing)@/i;function Si(e){const t=e.headers??{},n=e.from?.email,r=t["auto-submitted"]?.toLowerCase();if(r&&r!=="no"||t["x-auto-response-suppress"]||n&&Ai.test(n))return"automated";const o=t.precedence?.toLowerCase();if(t["list-unsubscribe"]||t["list-unsubscribe-post"]||t["list-id"]||o==="bulk"||o==="list"||e.body&&rn.test(e.body)||n&&_i.test(n))return"marketing"}function ln(e,t){return e.lastActivityAt?!(e.seenBy??[]).includes(t):!1}const un=["open"],dn=1e3,pn={urgent:1,high:4,normal:8,low:24},fn=72;function mn(e){return e.lastActivityAt??(e.createdAt?new Date(Ht(e)).getTime():0)}function gn(e,t){return hn(t.remindersById?.[e.id],e,t.now)}function hn(e,t,n){return!e||e.remindAt<=n?!1:!((t.lastActivityAt??0)>e.parkedAt&&t.lastActivityPreview?.direction==="inbound")}const En=e=>Kt(e)==="outbound_message",yn=e=>un.includes(e);function fe(e,t){return Math.max(0,(t-mn(e))/tn)}function An(e,t){const n=e.assignedInboxId?t?.[e.assignedInboxId]:void 0;return typeof n=="number"&&n>0?n:pn[e.priority??"normal"]}function bi(e){const t={};for(const n of e)typeof n.slaHours=="number"&&n.slaHours>0&&(t[n.id]=n.slaHours);return t}function Ti(e,t,n){return!yn(e.status)||e.firstResponseAt?!1:fe(e,t)>An(e,n)}function _n(e,t){const n=e.lastActivityPreview;return n?.direction!=="outbound"||!En(n.type)?!1:fe(e,t)<fn}function Ii(e,t){if(!yn(e.status))return{score:v,reasons:[]};if(e.snoozedTill&&e.snoozedTill>t.now)return{score:v,reasons:[]};if(_n(e,t.now))return{score:v,reasons:[]};if(gn(e,t))return{score:v,reasons:[]};let n=0;const r=[],o=e.priority??"normal";H[o]>0&&(n+=H[o],r.push(`priority:${o}`)),ln(e,t.userId)&&(n+=20,r.push("unseen")),e.assignedUserId&&e.assignedUserId===t.userId&&(n+=15,r.push("assigned-to-you"));const i=fe(e,t.now);if(i>0){const l=Math.min(i*2,30);n+=l,i>=1&&r.push(`waiting:${Math.round(i)}h`)}const s=e.lastActivityPreview;return s?.type==="AI_ACTION_PROPOSED"&&(n+=30,r.push("awaiting-approval")),s?.direction==="outbound"&&En(s.type)&&(n+=10,r.push("no-reply")),!e.firstResponseAt&&e.lastActivityPreview?.direction==="inbound"&&(n+=10,r.push("awaiting-reply")),(e.tags?.some(l=>l==="marketing"||l==="automated")||on(e.remoteParty?.resource,e.lastActivityPreview?.snippet))&&(n-=dn,r.push("bulk")),{score:n,reasons:r}}const Mi=e=>!!e.assignedUserId||!!e.assignedInboxId,Oi=e=>e.status==="closed",wi=e=>({urgent:10,high:5,normal:2,low:1})[e.priority]||0,Ri=(e,t=30)=>e.title?.length<=t?e.title:`${e.title.substring(0,t)}...`;function Ci(e,t){const n=e.labels??[];return n.find(r=>r.locale===t)?.label??n[0]?.label??e.url}function ki(e,t,n){const r=e.translations??[];return r.find(o=>o.locale===t)??(n?r.find(o=>o.locale===n):void 0)??{locale:t}}const De=[{code:"nl",label:"Nederlands",english:"Dutch"},{code:"en",label:"English",english:"English"},{code:"de",label:"Deutsch",english:"German"},{code:"fr",label:"Français",english:"French"},{code:"es",label:"Español",english:"Spanish"},{code:"it",label:"Italiano",english:"Italian"},{code:"pt",label:"Português",english:"Portuguese"},{code:"pl",label:"Polski",english:"Polish"},{code:"sv",label:"Svenska",english:"Swedish"},{code:"da",label:"Dansk",english:"Danish"},{code:"nb",label:"Norsk bokmål",english:"Norwegian Bokmål"},{code:"fi",label:"Suomi",english:"Finnish"},{code:"tr",label:"Türkçe",english:"Turkish"}];function Sn(e){const t=(e??"").toLowerCase();return De.find(n=>n.code===t)??De.find(n=>n.code===t.split("-")[0])}function Ni(e){return Sn(e)?.label??e}function vi(e){const t=Sn(e);return t?t.english===t.label?`${t.english} (${t.code})`:`${t.english} — ${t.label} (${t.code})`:e}const Ye=3;function bn(e,t){const n=new Set;let r=1,o=t.get(e)?.parentId;for(;o;){if(n.has(o)||(n.add(o),r++,r>Ye+1))return 1/0;o=t.get(o)?.parentId}return r}function Di(e,t,n){if(!e)return!0;if(e===t)return!1;const r=new Map(n.map(s=>[s.id,s]));if(!r.has(e)||t&&Tn(e,t,r))return!1;const o=bn(e,r),i=t?Xe(t,n):1;return o+i<=Ye}function Tn(e,t,n){const r=new Set;let o=n.get(e)?.parentId;for(;o;){if(o===t)return!0;if(r.has(o))return!1;r.add(o),o=n.get(o)?.parentId}return!1}function Xe(e,t,n=new Set){if(n.has(e))return 1;n.add(e);const r=t.filter(o=>o.parentId===e);return r.length?1+Math.max(...r.map(o=>Xe(o.id,t,n))):1}const In="en";function Mn(e){return e.defaultLocale||e.locale||In}function xi(e){const t=new Set,n=[];for(const r of[Mn(e),...e.locales??[]])!r||t.has(r)||(t.add(r),n.push(r));return n}function Li(e,t,n){const r=e.translations??[];return r.find(o=>o.locale===t)?.name??(n?r.find(o=>o.locale===n)?.name:void 0)??e.name}const xe=["lookup","condition","parallel","for-each"];function Le(e){for(const t of e){if(!xe.includes(t.type))return`staptype "${t.type}" mag niet meelezen (alleen ${xe.join(", ")})`;if(t.type==="parallel")for(const n of t.branches??[]){const r=Le(n);if(r)return r}if(t.type==="for-each"){const n=Le(t.body??[]);if(n)return n}}return null}function Pi(e,t){switch(e.kind){case"org":return!0;case"team":return!!t.teamId&&e.teamId===t.teamId;case"personal":return e.userId===t.userId}}function Ui(e,t){return e.filter(n=>n.enabled&&Pi(n.ownerScope,t))}function Ki(e){return e.credentialScope?e.credentialScope:(e.authMode??"header")==="header"||e.oauth?.scope==="org"?"shared":"per-user"}function $i(e){return`mcp__${e}__`}const Fi=1e3,Bi=2e3,Hi=500,Wi=12e3,Gi=4e3,On=["contact","company","work_item"];function Vi(e){if(!e)return!1;const t=e.slice(0,e.indexOf(":"));return On.includes(t)}const ji="onboarding-source",Yi=["support","billing","availability","sales","onboarding"],Xi=["keep","replace"],me=[{key:"shift",label:"kind_shift",capacity:!0,productive:!1,absent:!1,icon:"calendar-clock"},{key:"allocation",label:"kind_allocation",capacity:!1,productive:!0,absent:!1,icon:"briefcase"},{key:"meeting",label:"kind_meeting",capacity:!1,productive:!1,absent:!1,icon:"users"},{key:"travel",label:"kind_travel",capacity:!1,productive:!1,absent:!1,icon:"car"},{key:"training",label:"kind_training",capacity:!1,productive:!1,absent:!1,icon:"graduation-cap"},{key:"break",label:"kind_break",capacity:!1,productive:!1,absent:!1,icon:"coffee"},{key:"absence",label:"kind_absence",capacity:!1,productive:!1,absent:!0,approvable:!0,icon:"palmtree"},{key:"sick",label:"kind_sick",capacity:!1,productive:!1,absent:!0,icon:"thermometer"},{key:"holiday",label:"kind_holiday",capacity:!1,productive:!1,absent:!0,icon:"party-popper"}],wn={key:"unknown",label:"kind_unknown",capacity:!1,productive:!1,absent:!1};function x(e,t=me){return t.find(n=>n.key===e)??{...wn,key:e}}function W(e){return e==="published"||e==="approved"}function Rn(e,t,n=me){if(e.workstreamId!==t)return!1;const r=x(e.kindKey,n);return r.absent?!1:r.productive||r.capacity}function zi(e,t=me){if(!e.userId||!W(e.status))return!1;const n=x(e.kindKey,t);return n.capacity||n.productive||n.absent}const qi=864e5;function Cn(e,t){const n=new Date(e),r=new Date(t);return n.setHours(12,0,0,0),r.setHours(12,0,0,0),Math.round((r.getTime()-n.getTime())/qi)}function ze(e,t){const n=e.cycleMinutes.length;return n===0?0:(Cn(e.anchor,t)%n+n)%n}function qe(e,t){return e.effectiveFrom!==void 0&&t<e.effectiveFrom?0:e.cycleMinutes[ze(e,t)]??0}function Je(e,t){return e.startTimes?.[ze(e,t)]}function Ze(e,t,n,r){const o=e.filter(a=>a.effectiveFrom===void 0||a.effectiveFrom<=r),i=a=>a.sort((l,d)=>(d.effectiveFrom??0)-(l.effectiveFrom??0))[0],s=i(o.filter(a=>a.userId===t));return s||i(o.filter(a=>!a.userId&&a.teamId&&n.includes(a.teamId)))}function kn(e,t,n){return e.filter(r=>r.userId===t&&(r.effectiveFrom===void 0||r.effectiveFrom<=n)).sort((r,o)=>(o.effectiveFrom??0)-(r.effectiveFrom??0))[0]}const Et=864e5;function Ji(e){const t=new Date(e);return t.setHours(0,0,0,0),t.getTime()}function yt(e,t,n,r){const o=Math.min(t,r)-Math.max(e,n);return o>0?o/1e3:0}const At={interval:0,day:1,week:2};function Zi(e,t){const{entries:n,patterns:r=[],terms:o=[]}=t,i=n.filter(c=>c.userId&&W(c.status)&&x(c.kindKey).capacity),s=n.filter(c=>c.userId&&W(c.status)&&x(c.kindKey).absent),a=t.userIds??[...new Set([...i.map(c=>c.userId),...r.map(c=>c.userId),...o.map(c=>c.userId)])].filter(c=>!!c),l={};let d="interval";const f=c=>{At[c]>At[d]&&(d=c)};for(const c of a){const h=t.teamIdsOf?.(c)??[];let A=0,_=0,y=0;for(let u=Ji(e.from);u<e.to;u+=Et){const b=Math.max(u,e.from),I=Math.min(u+Et,e.to);y++;const k=i.filter(M=>M.userId===c).reduce((M,K)=>M+yt(K.start,K.end,b,I),0);if(k>0){A+=k;continue}const w=Ze(r,c,h,u),L=w?qe(w,u):0;if(w&&L>0){A+=L*60,f(Je(w,u)?"interval":"day");continue}w||_++}if(_>0){const u=kn(o,c,e.from);u&&(A+=u.weeklyMinutes*60*(_/7),f("week"))}const T=s.filter(u=>u.userId===c).reduce((u,b)=>u+yt(b.start,b.end,e.from,e.to),0),p=Math.max(0,A-T);(p>0||y>0)&&(l[c]=p)}return{seconds:Object.values(l).reduce((c,h)=>c+h,0),precision:d,byUser:l}}function Qi(e,t){const n=new Map;for(const s of e){const a=s.userId??null;n.set(a,(n.get(a)??0)+s.seconds)}const o=[...new Set([...Object.keys(t.byUser),...[...n.keys()].filter(s=>s!==null)])].map(s=>{const a=n.get(s)??0,l=t.byUser[s]??0;return{userId:s,requiredSeconds:a,capacitySeconds:l,netSeconds:l-a}});o.sort((s,a)=>s.netSeconds-a.netSeconds);const i=n.get(null)??0;return i>0&&o.push({userId:null,requiredSeconds:i,capacitySeconds:0,netSeconds:-i}),o}const es="demand-source",_t=1e3;function ts(e,t){let n=1;for(let r=1;r<=e;r++)n=t*n/(r+t*n);return n}function Nn(e,t){if(e<=0)return 1;if(t<=0)return 0;if(e<=t)return 1;const n=ts(e,t),r=t/e;return n/(1-r*(1-n))}function vn(e,t,n,r){return r<=0?1:e<=t?0:1-Nn(e,t)*Math.exp(-(e-t)*n/r)}function Dn(e,t,n){return n<=0?0:e*t/n}function xn(e,t,n,r){if(e<=0||t<=0)return 0;const o=Dn(e,t,n);if(o<=0)return 0;const i=r.serviceLevelPercent/100,s=r.maxOccupancyPercent?r.maxOccupancyPercent/100:void 0;for(let a=Math.max(1,Math.ceil(o));a<=_t;a++)if(!(a<=o)&&!(vn(a,o,r.targetSeconds,t)<i)&&!(s&&o/a>s))return a;return _t}const ns=36e5,rs=864e5;function os(e){return e==="day"?rs:ns}function is(e,t){return e.start<t.end&&t.start<e.end}function te(e,t,n){const r=Math.min(e.end,n)-Math.max(e.start,t);return r>0?r/1e3:0}function Ln(e,t,n){const r=e.handleSeconds??0,o=e.seconds??(e.volume!==void 0?e.volume*r:0);if(o<=0&&!e.volume)return{seconds:0,headcount:0};const i=(t.unplannedLossPercent??0)/100,s=i>0&&i<1?1/(1-i):1;if(t.model==="queue"&&e.volume!==void 0&&r>0){const a=xn(e.volume,r,n,t);return{seconds:o,headcount:a*s}}return{seconds:o,headcount:o/n*s}}function ss(e){const{entries:t,workstreamId:n,staffing:r,demand:o,range:i}=e,s=e.grain??"hour",a=os(s),l=a/1e3,d=e.kinds,f=t.filter(y=>W(y.status)),c=f.filter(y=>Rn(y,n,d)),h=f.filter(y=>x(y.kindKey,d).capacity),A=f.filter(y=>x(y.kindKey,d).absent),_=[];for(let y=U(i.from,s);y<i.to;y+=a){const T=y+a,p=P(y,s);let u=0;for(const M of c)u+=te(M,y,T);let b=0;for(const M of h)b+=te(M,y,T);let I=0;for(const M of A)I+=te(M,y,T);const k=o?.[p]??{},w=Ln(k,r,l),L=u/l;_.push({period:p,forecastVolume:k.volume,requiredSeconds:w.seconds,requiredHeadcount:w.headcount,scheduledSeconds:u,scheduledHeadcount:L,netHeadcount:L-w.headcount,capacitySeconds:b,absentSeconds:I})}return _}function Pn(e,t){return e.workTypeKey??t?.defaultWorkTypeKey}function as(e,t,n){const r=Pn(e,t);return r?n.find(o=>o.key===r)?.defaultBillable??!1:!1}function cs(e){return e.filter(t=>t.netHeadcount<0&&t.requiredHeadcount>0)}const ls=36e5,Pe=6048e5,Un=8,us=.5,ds=2;function ps(e){const t=Number(e.slice(0,4)),n=Number(e.slice(5,7)),r=Number(e.slice(8,10)),o=e.length>10?Number(e.slice(11,13)):0;return Date.UTC(t,n-1,r,o)}function fs(e,t,n){const r=[];for(let i=0;i<n;i++){const s=t-i*Pe,a=s-Pe;let l=0,d=!1;for(const[f,c]of e)f>=a&&f<s&&(l+=c,d=!0);d&&r.push(l)}if(r.length<2)return 1;const o=r.reduce((i,s)=>i+s,0)/r.length;return o<=0?1:Math.min(ds,Math.max(us,r[0]/o))}function ms(e,t){if(!e?.length)return;let n;for(const r of e)t>=r.from&&t<r.to&&(n=r);return n}function gs(e,t,n){const r=Math.max(1,n?.weeks??Un),o=new Map,i=new Set;for(const l of e)o.set(ps(l.period),l.value),i.add(l.period.slice(0,10));const s=fs(o,U(t.from,"hour"),r),a=[];for(let l=U(t.from,"hour");l<t.to;l+=ls){let d=0,f=0;for(let A=1;A<=r;A++){const _=l-A*Pe,T=o.get(_)??(i.has(P(_,"day"))?0:void 0);if(T===void 0)continue;const p=r-A+1;d+=T*p,f+=p}let c=f>0?d/f*s:0;const h=ms(n?.adjustments,l);h?.absoluteVolume!==void 0?c=h.absoluteVolume:h?.factor!==void 0&&(c*=h.factor),a.push({period:P(l,"hour"),volume:c})}return a}const Kn="schedule_entry",$n="workstream";function hs(e){return`${Kn}:${e}`}function Es(e){return`${$n}:${e}`}const Ue=36e5,$=864e5;function ys(e,t){const n=t==="day"?$:Ue,r=[];for(let o=U(e.from,t);o<e.to;o+=n)r.push(o);return r}function St(e,t,n,r){const o=Math.min(t,r)-Math.max(e,n);return o>0?o/1e3:0}function As(e,t,n={}){const r=n.grain??"hour",o=ys(t,r),i=r==="day"?$:Ue,s=new Map(o.map(c=>[c,0])),a=e.filter(c=>c.userId&&x(c.kindKey).capacity),l=n.userIds?.length?new Set(n.userIds):null,d=new Set;for(const c of a)if(!(l&&c.userId&&!l.has(c.userId))){for(const h of o){const A=St(c.start,c.end,h,h+i);A>0&&s.set(h,(s.get(h)??0)+A)}for(let h=q(c.start);h<c.end;h+=$)d.add(`${c.userId}:${q(h)}`)}const f=n.userIds??[...new Set(a.map(c=>c.userId).filter(Boolean))];if(n.patterns?.length)for(const c of f){const h=n.teamIdsOf?.(c)??[];for(let A=q(t.from);A<t.to;A+=$){const _=q(A);if(d.has(`${c}:${_}`))continue;const y=Ze(n.patterns,c,h,_);if(!y)continue;const T=qe(y,_);if(T<=0)continue;const p=Je(y,_);if(p){const[I,k]=p.split(":").map(Number),w=_+I*Ue+(k??0)*6e4,L=w+T*6e4;for(const M of o){const K=St(w,L,M,M+i);K>0&&s.set(M,(s.get(M)??0)+K)}continue}const u=o.filter(I=>I>=_&&I<_+$);if(!u.length)continue;const b=T*60/u.length;for(const I of u)s.set(I,(s.get(I)??0)+b)}}return o.map(c=>({period:P(c,r),weight:s.get(c)??0}))}function q(e){const t=new Date(e);return t.setHours(0,0,0,0),t.getTime()}function Fn(e,t){if(e<=0||!t.length)return[];const n=t.reduce((r,o)=>r+Math.max(0,o.weight),0);if(n<=0){const r=e/t.length;return t.map(o=>({period:o.period,seconds:r}))}return t.filter(r=>r.weight>0).map(r=>({period:r.period,seconds:e*r.weight/n}))}function _s(e,t,n){const r=new Map;for(const o of e){const i=o.by?t.filter(a=>n(a.period)<o.by):t,s=i.length?i:t;for(const a of Fn(o.seconds,s)){const l=`${a.period}|${o.userId??""}`,d=r.get(l);d?d.seconds+=a.seconds:r.set(l,{...a,userId:o.userId})}}return[...r.values()].sort((o,i)=>o.period.localeCompare(i.period)||(o.userId??"").localeCompare(i.userId??""))}function Bn(e){switch(e.kind){case"user":return`user:${e.userId}`;case"team":return`team:${e.teamId}`;case"org":return"org"}}function Ss(e){if(typeof e!="string")return;const t=e.trim();if(t==="org")return{kind:"org"};const n=t.indexOf(":");if(n<=0)return;const r=t.slice(0,n),o=t.slice(n+1).trim();if(o){if(r==="user")return{kind:"user",userId:o};if(r==="team")return{kind:"team",teamId:o}}}function Hn(e){return Bn(e)}function Wn(e){switch(e.kind){case"personal":return{kind:"user",userId:e.userId};case"team":return{kind:"team",teamId:e.teamId};case"org":return{kind:"org"}}}const Gn=Wn;function bs(e){return e.agentId?{kind:"user",userId:e.agentId}:Gn(e.ownerScope)}function Ts(e){return Hn(e)}function Is(e,t){if(!t)return;let n=e;for(const r of t.split(".")){if(n===null||typeof n!="object")return;n=n[r]}return n}function Ms(e,t){return e.targets.find(n=>n.activityTypes.includes(t))}function Os(e,t){if(t)return e.targets.find(n=>n.id===t)}function Vn(e){return e?.kind==="assignment"}function ws(e){const{trigger:t,agentId:n,target:r,activityType:o,assigneeUserId:i,authorUserId:s}=e;return Vn(t)?n?r?r.activityTypes.includes(o)?i?i!==n?"assigned to someone else":s&&s===n?"the agent assigned this to itself, which would restart its own run":null:`no assignee found at ${r.assigneePath}`:`activity type ${o} does not announce an assignment for ${r.id}`:`assignment target kind "${t.targetKind}" is not declared by any installed app`:"this playbook has no agent, so an assignment can never be for it":"trigger is not an assignment trigger"}function Rs(e){return(e.startsWith("tool:")?e.slice(5):e).replace(/__/g," · ").replace(/\./g," · ").replace(/_/g," ")}const Cs=[{name:"text",type:"string"},{name:"subject",type:"string"},{name:"from",type:"string"},{name:"type",type:"string"},{name:"direction",type:"string"},{name:"channelId",type:"string"},{name:"interactionId",type:"string"},{name:"itemId",type:"string"},{name:"activityId",type:"string"},{name:"authorType",type:"string"},{name:"authorName",type:"string"},{name:"textRaw",type:"string"},{name:"fromStatus",type:"string"},{name:"toStatus",type:"string"},{name:"toCategory",type:"string"},{name:"contactId",type:"string"},{name:"companyId",type:"string"},{name:"priority",type:"string"},{name:"inboxId",type:"string"},{name:"topicId",type:"string"},{name:"assigneeUserId",type:"string"}],ks={topics:[{name:"topicId",type:"string"},{name:"topic",type:"string"},{name:"confidence",type:"number"},{name:"reasoning",type:"string"}],question:[{name:"answer",type:"boolean"},{name:"reasoning",type:"string"}],extract:[]};function jn(e){return`${e.type}:${e.id}`}const Yn="interaction";function Xn(e){return e?.type===Yn?e.id:void 0}const zn=64,qn=8e3;function Ns(e){const t=typeof e=="number"?e:Number(String(e??"").trim());if(!(!Number.isFinite(t)||t<=0))return Math.min(Math.max(Math.round(t),zn),qn)}const vs={kind:"workflow",steps:[]};function Ds(e){return e?.kind==="workflow"?e.steps:[]}function xs(e){return e?.kind==="procedure"?e.procedure:void 0}function Jn(e){const t=e?.approved??0,n=t+(e?.rejected??0);return{total:n,rate:n?t/n:0}}const Zn=10,Qn=.9;function Ls(e){const{total:t,rate:n}=Jn(e);return t>=Zn&&n>=Qn}const er=["done","escalated","failed","stopped"];function Ps(e){return er.includes(e)}function tr(e){return e==="waiting"}function Us(e){return e==="running"||tr(e)}function Qe(e){return e.subjectKind&&e.subjectId?{type:e.subjectKind,id:e.subjectId}:void 0}function Ks(e){const t=Qe(e);return t?jn(t):void 0}function $s(e){return Xn(Qe(e))}function Fs(e){const t=[],n=new Map;for(const r of[...e].sort(Bs)){const o=n.get(r.emoji);if(o){o.push(r.actor);continue}t.push(r.emoji),n.set(r.emoji,[r.actor])}return t.map(r=>{const o=n.get(r);return{emoji:r,count:o.length,actors:o}}).sort((r,o)=>o.count-r.count||t.indexOf(r.emoji)-t.indexOf(o.emoji))}const Bs=(e,t)=>(e.createdAt??0)-(t.createdAt??0);function Hs(e,t){return t?e.actors.some(n=>n.type==="user"&&n.id===t):!1}const Ke=6e4,Ws=36e5,G=864e5,nr=800;function bt(e,t){const n=Date.UTC(e,t+1,0);return n-new Date(n).getUTCDay()*G+Ws}function Gs(e){const t=new Date(e).getUTCFullYear();return e>=bt(t,2)&&e<bt(t,9)}function rr(e,t){const n=t.dst==="eu"&&Gs(e)?60:0;return(t.utcOffsetMinutes+n)*Ke}function Vs(e){return(e+3)%7+1}function or(e,t){const n=rr(e,t),r=e+n,o=Math.floor(r/G);if(!t.days.includes(Vs(o)))return null;const i=o*G;return{open:i+t.fromMinutes*Ke-n,close:i+t.toMinutes*Ke-n}}function ir(e,t){const n=rr(e,t),r=e+n;return(Math.floor(r/G)+1)*G-n}function ae(e,t,n){if(t<=e)return 0;if(!n)return t-e;let r=0,o=e;for(let i=0;i<nr&&o<t;i++){const s=or(o,n);if(s){const a=Math.max(o,s.open),l=Math.min(t,s.close);l>a&&(r+=l-a)}o=ir(o,n)}return r}function ge(e,t,n){if(!n)return e+t;let r=t,o=e;for(let i=0;i<nr;i++){const s=or(o,n);if(s){const a=Math.max(o,s.open);if(s.close>a){const l=s.close-a;if(r<=l)return a+r;r-=l}}o=ir(o,n)}return e+t}function js(e){const t=/^([01]\d|2[0-3]):([0-5]\d)$/.exec(e);return t?Number(t[1])*60+Number(t[2]):null}const ce=1,le=2;function Ys(e){return e==="snoozed"?ce:le}function he(e){const t=e.calendar;return t&&Array.isArray(t.days)?t:null}const Xs=["speed_of_answer","first_response","next_response","resolution","close"],zs=["snoozed","waiting_for_customer"],qs=6e4,sr=["speed_of_answer","first_response","next_response"],Js=[...sr,"resolution","close"];function j(e){return e.state==="running"||e.state==="paused"}function Zs(e,t){return j(e)?{state:(e.state==="paused"?e.remainingMs>0:t<=e.dueAt)?"hit":"missed",settledAt:Math.max(t,e.startedAt)}:null}function Tt(e){return j(e)?{state:"void"}:null}function Qs(e,t,n,r){if(!j(e)||(e.pauseBits&t)!==0)return null;const o=e.pauseBits|t;return e.state==="paused"?{pauseBits:o}:{pauseBits:o,state:"paused",remainingMs:ae(n,e.dueAt,r)}}function ea(e,t,n,r){if(!j(e)||(e.pauseBits&t)===0)return null;const o=e.pauseBits&~t;return o!==0?{pauseBits:o}:{pauseBits:o,state:"running",dueAt:ge(n,e.remainingMs,r)}}function ta({event:e,at:t,now:n,clocks:r,profile:o}){const i=he(o),s=Math.min(t,n),a=r.map(p=>({...p})),l=[],d=(p,u)=>{u&&(l.push({op:"patch",clockId:p.id,patch:u}),Object.assign(p,u))},f=p=>{for(const u of a)u.metric===p&&d(u,Zs(u,s))},c=p=>{for(const u of a)p.includes(u.metric)&&d(u,Tt(u))},h=p=>{for(const u of a)d(u,Qs(u,p,s,i))},A=p=>{for(const u of a)d(u,ea(u,p,s,i))},_=p=>a.reduce((u,b)=>b.metric===p?Math.max(u,b.attempt):u,0)+1,y=p=>a.some(u=>u.metric===p&&j(u)),T=(p,u)=>{const b=o.targets.find(k=>k.metric===p);if(!b)return;const I=b.minutes*qs;l.push({op:"start",metric:p,attempt:_(p),startedAt:u,targetMs:I,dueAt:ge(u,I,i)})};switch(e){case"apply":{for(const p of a)p.profileId!==o.id&&d(p,Tt(p));for(const p of o.targets){if(p.metric==="next_response")continue;a.some(b=>b.metric===p.metric&&b.profileId===o.id)||T(p.metric,s)}break}case"answered":f("speed_of_answer");break;case"outbound":{f("first_response"),f("next_response"),o.pauseOn.includes("waiting_for_customer")&&h(le);break}case"inbound":{A(le),!y("first_response")&&!y("next_response")&&T("next_response",s);break}case"resolved":f("resolution");break;case"closed":f("close"),f("resolution"),c(sr);break;case"reopened":y("resolution")||T("resolution",s),y("close")||T("close",s);break;case"snoozed":o.pauseOn.includes("snoozed")&&h(ce);break;case"unsnoozed":A(ce);break;case"discarded":c(Js);break}return l}function ar(e){return e.state==="running"||e.state==="paused"}function ue(e,t){const n=he(e);return e.state==="paused"?e.remainingMs:t>=e.dueAt?-ae(e.dueAt,t,n):ae(t,e.dueAt,n)}function na(e,t){return e.state==="paused"?ge(t,e.remainingMs,he(e)):e.dueAt}function ra(e,t){const n=e.filter(ar);if(!n.length)return;const r=n.filter(i=>i.state==="running");return(r.length?r:n).reduce((i,s)=>ue(s,t)<ue(i,t)?s:i)}function oa(e,t){if(e.state==="missed")return"breached";if(e.state==="hit")return"met";if(e.state==="paused")return"paused";if(e.state==="void")return"met";const n=ue(e,t);return n<=0?"breached":n<=e.targetMs/5?"urgent":"running"}function ia(e){const t=Math.floor(Math.abs(e)/1e3),n=Math.floor(t/86400),r=Math.floor(t%86400/3600),o=Math.floor(t%3600/60);return n?r?`${n}d ${r}u`:`${n}d`:r?o?`${r}u ${o}m`:`${r}u`:o?`${o}m`:`${t%60}s`}const cr="strategy_item";function et(e){return`${cr}:${e}`}function sa(e,t=25){const n=new Set([et(e.id)]);for(const r of e.ancestorKeys??[])n.add(r);return Array.from(n).slice(0,t)}function aa(e){return e?[...e.ancestorKeys??[],et(e.id)]:[]}const Y=[{key:"area",label:"level_area",order:10,measurable:!1,icon:"compass"},{key:"objective",label:"level_objective",order:20,measurable:!0,icon:"target"},{key:"key_result",label:"level_key_result",order:30,measurable:!0,icon:"gauge"}],lr=999,ur=7;function dr(e,t=Y){return t.find(n=>n.key===e)}function de(e,t=Y){return dr(e,t)?.order??lr}function ca(e,t,n=Y){return de(t,n)<=de(e,n)}function la(e,t=Y){const n=de(e,t);return t.filter(o=>o.order>n).sort((o,i)=>o.order-i.order)[0]?.key??e}function ua(e){const t=e.trim().toLowerCase();return t?t.includes("key result")||t.includes("keyresult")||t==="kr"?"key_result":t.includes("objective")||t.includes("goal")||t.includes("doel")?"objective":t.includes("focus")||t.includes("area")||t.includes("theme")?"area":null:null}const $e={pending:"open",on_track:"open",at_risk:"open",off_track:"open",paused:"paused",achieved:"closed",missed:"closed"};function da(e){return $e[e]??"open"}function pa(e){return Object.keys($e).filter(t=>e.includes($e[t]))}const fa=864e5,Ee=e=>e<=0?0:e>1?1:e;function ma(e,t){const{direction:n}=e,r=e.startValue??0,o=e.targetValue??0;if(!Number.isFinite(t))return 0;const i=n==="down"?t<=o:t>=o,s=o-r;return(n==="down"?s<0:s>0)?Ee((t-r)/s):i?1:0}function ga(e,t){const{startDate:n,targetDate:r}=e;if(!(typeof n!="number"||typeof r!="number")&&!(r<=n))return Ee((t-n)/(r-n))}const pr=.1,fr=.25;function ha(e,t){if(typeof e!="number"||typeof t!="number")return;if(e>=1)return"achieved";const n=t-e;return n>=fr?"off_track":n>=pr?"at_risk":"on_track"}function Ea(e,t){if(t)return Ee(e/t)}function ya(e){const t=e.map(n=>n.progress?.ratio).filter(n=>typeof n=="number"&&Number.isFinite(n));if(t.length)return Ee(t.reduce((n,r)=>n+r,0)/t.length)}function Aa(e,t){const n=e.lastCheckInAt??e.createdAt;if(typeof n!="number")return 0;const r=(e.checkInEveryDays??ur)*fa,o=t-n-r;return o>0?o:0}function _a(e){return e.targetDate??Number.MAX_SAFE_INTEGER}function Sa(e,t){const n=e.accumulatedSeconds||0;return e.runningSince?n+Math.max(0,Math.floor((t-e.runningSince)/1e3)):n}function ba(e,t){const n=Math.max(1,Math.ceil(Math.max(0,e)/60));if(!t||t==="exact")return n*60;const r=Number(t);return!Number.isFinite(r)||r<=0?n*60:Math.ceil(n/r)*r*60}function Ta(e){const t=Math.max(0,Math.round(e/60));return`${Math.floor(t/60)}:${String(t%60).padStart(2,"0")}`}function Ia(e){const t=Math.max(0,Math.floor(e)),n=i=>String(i).padStart(2,"0"),r=Math.floor(t/60)%60,o=Math.floor(t/3600);return o>0?`${o}:${n(r)}:${n(t%60)}`:`${n(r)}:${n(t%60)}`}function mr(e){return(e||"").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").slice(0,48).replace(/^-+|-+$/g,"")}function Ma(e,t){const n=mr(e)||"werksoort",r=new Set(t);if(!r.has(n))return n;for(let o=2;o<500;o++){const i=`${n}-${o}`;if(!r.has(i))return i}return`${n}-${r.size+1}`}function Oa(e,t){const n=e.ownerScope;return!n||n.kind==="org"?!0:t.includes(n.teamId)}function wa(e){return e.filter(t=>!t.archived).sort(gr)}function gr(e,t){const n=(e.order??0)-(t.order??0);return n!==0?n:(e.label||"").localeCompare(t.label||"")}const hr=20,Er=20,ne=300;function D(e){return e.toLowerCase().replace(/[^\p{L}\p{N}\s]/gu," ").replace(/\s+/g," ").trim()}function yr(e){const t=e.replace(/\s+/g," ").trim();if(t.length<=ne)return t;const n=t.slice(0,ne),r=Math.max(n.lastIndexOf(". "),n.lastIndexOf("! "),n.lastIndexOf("? "));return r>ne*.6?n.slice(0,r+1):`${n.trimEnd()}…`}function Ra(e,t){const n=yr(t.text),r=D(n);if(!r||(e.examples??[]).some(s=>D(s)===r))return null;const o=e.exampleCandidates??[],i=o.findIndex(s=>D(s.text)===r);if(i>=0){if(o[i].corrected||!t.corrected)return null;const s=[...o];return s[i]={...s[i],corrected:!0,addedAt:t.addedAt},It(s)}return It([{...t,text:n},...o]).slice(0,Er)}function It(e){return[...e].sort((t,n)=>Number(n.corrected)-Number(t.corrected)||n.addedAt-t.addedAt)}function Ca(e,t){const n=D(t),r=(e.examples??[]).filter(i=>i.trim());return{examples:r.some(i=>D(i)===n)?r:[...r,t].slice(-hr),exampleCandidates:Ar(e,t)}}function Ar(e,t){const n=D(t);return(e.exampleCandidates??[]).filter(r=>D(r.text)!==n)}function _r(e,t){const n=e.ownerScope;return n?n.kind==="org"?!0:n.kind==="team"?!!t&&n.teamId===t:!1:!1}function ka(e,t){return e.filter(n=>_r(n,t))}function Na(e){return e.type==="agent"}const va="WORK_COMMENT_ADDED",Da="WORK_ITEM_ASSIGNED",xa="WORK_ITEM_STATUS_CHANGED";function La(e,t){const n=r=>{const o=new Date(r);return o.setHours(0,0,0,0),o.getTime()};return Math.round((n(e)-n(t))/nn)}function Pa(e,t){if(e.closedAt!=null)return{score:v,reasons:[]};const n=t.remindersById?.[e.id];if(n&&n.remindAt>t.now)return{score:v,reasons:[]};let r=0;const o=[],i=e.priority??"normal";if(H[i]>0&&(r+=H[i],o.push(`priority:${i}`)),typeof e.dueDate=="number"){const s=La(e.dueDate,t.now);s<0?(r+=35,o.push("overdue")):s===0&&(r+=20,o.push("due-today"))}return e.source?.initiator==="system"&&e.source.systemReason&&(r+=15,o.push(`auto:${e.source.systemReason}`)),{score:r,reasons:o}}const ye=[{key:"task",label:"type_task"},{key:"bug",label:"type_bug"},{key:"story",label:"type_story"},{key:"epic",label:"type_epic"},{key:"subtask",label:"type_subtask"},{key:"case",label:"type_case"},{key:"deal",label:"type_deal"}],Ua=ye.map(e=>e.key);function Ka(e){return e?.types?.length?e.types:ye}function $a(e,t){return t.find(n=>n.key===e)}function Fa(e){const t=e.trim().toLowerCase();return t?t.includes("sub-task")||t.includes("subtask")||t.includes("sub task")?"subtask":t.includes("bug")||t.includes("defect")?"bug":t.includes("epic")?"epic":t.includes("story")?"story":t.includes("incident")||t.includes("problem")||t.includes("service request")||t.includes("change")?"case":t.includes("task")?"task":null:null}function Ba(...e){return e.map(t=>ye.find(n=>n.key===t)).filter(t=>!!t)}const Sr="work_item",br="work_project",Tr="work_activity",Ha="work_cycle";function Ir(e){return`${Sr}:${e}`}function tt(e){return`${br}:${e}`}function Wa(e){return`${Tr}:${e}`}function Ga(e,t,n){const r=`${e}-${t}`;return n?`${r}-${n}`:r}function Va(e){const t=/^([A-Za-z0-9]{2,8})-(\d+)(?:-(\d+))?$/.exec((e||"").trim());return t?{projectKey:t[1].toUpperCase(),sequenceNumber:Number(t[2]),...t[3]?{subSequence:Number(t[3])}:{}}:null}function ja(e){return(e||"").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toUpperCase().replace(/[^A-Z0-9]/g,"").slice(0,3)||"PRJ"}function Ya(e,t=25){const n=new Set([Ir(e.id)]);e.projectId&&n.add(tt(e.projectId));for(const r of e.ancestorKeys??[])n.add(r);for(const r of e.partyKeys??[])n.add(r);return Array.from(n).slice(0,t)}function Xa(e){return[tt(e.id)]}const Ae=[{key:"open",label:"status_open",category:"todo",order:0},{key:"in_progress",label:"status_in_progress",category:"in_progress",order:1},{key:"done",label:"status_done",category:"done",order:2},{key:"cancelled",label:"status_cancelled",category:"done",order:3}],nt=Ae.map(e=>e.key);function Mr(e){return e?.statuses?.length?e.statuses:Ae}function Or(e,t){return t.find(n=>n.key===e)?.category??"todo"}function za(e,t){return t.find(n=>n.key===e)}function qa(e){const t=Mr(e),n=e?.defaultStatusKey;return n&&t.some(r=>r.key===n)?n:wr(t)[0]?.key??Ae[0].key}function wr(e){return[...e].sort((t,n)=>{const r=(t.order??0)-(n.order??0);return r!==0?r:(t.label||"").localeCompare(n.label||"")})}function Ja(e,t){return Or(e,t)==="done"}function Rr(e){return(e||"").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").slice(0,48).replace(/^-+|-+$/g,"")}function Za(e,t){const n=Rr(e)||"status",r=new Set([...t,...nt]);if(!r.has(n))return n;for(let o=2;o<500;o++){const i=`${n}-${o}`;if(!r.has(i))return i}return`${n}-${r.size+1}`}function Qa(e){const t=[];if(!e.length)return[{index:-1,reason:"empty"}];const n=new Set;return e.forEach((r,o)=>{if(!r.key){t.push({index:o,reason:"missing_key"});return}nt.includes(r.key)&&t.push({index:o,reason:"reserved_key",key:r.key}),n.has(r.key)&&t.push({index:o,reason:"duplicate_key",key:r.key}),n.add(r.key)}),e.some(r=>r.category==="todo"||r.category==="in_progress")||t.push({index:-1,reason:"no_open"}),e.some(r=>r.category==="done")||t.push({index:-1,reason:"no_done"}),t}function ec(e){return e.startDate??Number.MAX_SAFE_INTEGER}function tc(e){return e.completedAt?"completed":e.startedAt?"active":"planned"}const nc=new Set(["image/png","image/jpeg","image/jpg","image/gif","image/webp"]),rc=new Set(["text/plain","text/markdown","text/csv","application/json","text/html","application/xml","text/xml"]);function Cr(e){const t=(e??"").trim().toLowerCase().split(";")[0];return t?nc.has(t)?"image":t==="application/pdf"?"pdf":rc.has(t)?"text":t.startsWith("audio/")?"audio":"unsupported":"unsupported"}const F=1024*1024,kr={image:5*F,pdf:20*F,text:1*F,audio:20*F},oc=25*F,ic=5;function sc(e,t){const n=Cr(e);return n==="unsupported"?"unsupported":t>kr[n]?"too-large":null}function ac(e){return e.access!=="read"&&e.effect!=="internal"}function Nr(e){return`${e.kind}:${e.id||e.url||e.title}`}function cc(e,t=[]){const n=new Set(t),r=[],o=[];for(const i of e){const s=Nr(i);n.has(s)||(n.add(s),r.push(i),o.push(s))}return{sources:r,keys:o}}const lc="assist-source",uc=["blocking","due","open"];function dc(e,t){const[n,r]=(e.subjectKey??"").split(":");return n===t&&r?r:void 0}const Mt={blocking:0,due:1,open:2};function pc(e,t){return Mt[e.band??"open"]-Mt[t.band??"open"]||(t.priority??0)-(e.priority??0)||e.id.localeCompare(t.id)}function fc(e){return e.sessions.filter(t=>t.id!==e.exceptSessionId&&t.state==="connected"&&e.canHold(t.providerId))}function mc(e){return e.sessions.filter(t=>t.id!==e.exceptSessionId&&t.state==="connected"&&!e.canHold(t.providerId))}function gc(e){return e.sessions.some(n=>n.id!==e.exceptSessionId&&(n.state==="connected"||n.state==="on_hold"))?{admit:!1,reason:"busy"}:{admit:!0}}function vr(e,t){const n=new Set(e.disabledIntents??[]),r=e.intentOverrides??{},o=t.intents.filter(s=>!n.has(s.intent)).map(s=>Ec(s,r[s.intent]));if(!e.extraIntents||e.extraIntents.length===0)return o;const i=new Set(o.map(s=>s.intent));for(const s of e.extraIntents)i.has(s.intent)||(o.push(s),i.add(s.intent));return o}function Dr(e,t){const n={};for(const r of e.intents){if(!r.togglable)continue;const o=t?.[r.intent];n[r.intent]=o??r.defaultEnabled??!0}return n}function hc(e,t){const n=Dr(e,t);return Object.entries(n).filter(([,r])=>!r).map(([r])=>r)}function Ec(e,t){return t?{intent:t.intent??e.intent,targetSchemes:t.targetSchemes??e.targetSchemes,transport:t.transport??e.transport}:e}function yc(e,t){const n=[];for(const r of e){if(!r.enabled)continue;const o=t[r.providerId];if(o)for(const i of vr(r,o))n.push({channel:r,description:o,capability:i})}return n}function Ac(e,t){return t.filter(n=>n.capability.intent===e)}function xr(e,t){return t.filter(n=>n.capability.targetSchemes.includes(e))}function _c(e,t){return xr(e.scheme,t)}function Sc(e,t,n){const r=[];for(const o of e)for(const i of n)i.capability.intent===t&&i.capability.targetSchemes.includes(o.scheme)&&r.push({channelIntent:i,endpoint:o});return r}var Lr=(e=>(e.MAILTO="mailto",e.SIP="sip",e.TEL="tel",e.WEBHOOK="webhook",e.USERNAME="username",e.ID="id",e.CUSTOM="custom",e.URL="url",e.TELEGRAM="telegram",e.WHATSAPP="whatsapp",e.MESSENGER="messenger",e.INSTAGRAM="instagram",e.VIBER="viber",e.SMS="sms",e.FAX="fax",e.TEAMS="teams",e.CALENDAR="calendar",e))(Lr||{});const bc={mailto:"mail",sip:"tel",tel:"tel",fax:"tel",sms:"chat",teams:"chat",telegram:"chat",messenger:"chat",instagram:"chat",viber:"chat",whatsapp:"wa",webhook:"note",url:"note",calendar:"note",username:"note",id:"note",custom:"note"};function Tc(e){return e?bc[e]??"note":"note"}const Ic="message_window",Mc="message_templates",Oc={FROM:"from",TO:"to",CC:"cc",BCC:"bcc",ORGANIZER:"organizer",PRESENTER:"presenter",ATTENDEE:"attendee",OWNER:"owner",MEMBER:"member",GUEST:"guest",HOST:"host",PARTICIPANT:"participant"},wc=(e,t)=>({intent:e,...t}),Rc="folder_management",Cc="remote_search",kc="message_reactions",Nc={ok:!1,code:"UNSUPPORTED",message:"Provider does not support this op"},vc="connector",Dc="context.collect",E=e=>({type:"string",description:e}),g=e=>({type:"number",description:e}),re=e=>({type:"boolean",description:e}),C=E("Sheet name. Omit for the sheet the user is looking at."),Ot=E("Slide id, as `inspect` reports it.");function m(e,t,n,r,o,i){return{op:e,kinds:t,summary:n,parameters:{type:"object",properties:r,required:o},undoable:i.undoable,visible:i.visible}}const B={undoable:!1,visible:!0},S={undoable:!0,visible:!0},wt={undoable:!1,visible:!0},pe={undoable:!1,visible:!1},xc=[m("pdf.goToPage",["pdf"],"Scroll the viewer to a page.",{page:g("1-based page number.")},["page"],B),m("pdf.search",["pdf"],"Search the document and highlight the matches, as the find bar does.",{query:E("Text to find."),next:re("Jump to the next match instead of the first.")},["query"],B),m("pdf.setTool",["pdf"],"Select a markup tool for the user, so their next click draws it.",{tool:{type:"string",enum:["highlight","text","draw","image","signature","none"],description:"Which tool to arm. `none` puts the tool row back to reading."}},["tool"],B),m("pdf.fillField",["pdf"],"Fill one form field of a fillable PDF.",{field:E("Field name, exactly as `inspect` reports it under `fields`."),value:{type:["string","boolean"],description:"Text for a text field, true/false for a checkbox or radio."}},["field","value"],S),m("pdf.reorderPages",["pdf"],"Put the pages in a different order. Pages left out are deleted.",{order:{type:"array",items:{type:"number"},description:"1-based source page numbers, in the order they should end up in."}},["order"],wt),m("pdf.deletePages",["pdf"],"Remove pages, keeping the rest in order.",{pages:{type:"array",items:{type:"number"},description:"1-based page numbers."}},["pages"],wt),m("pdf.addNote",["pdf"],"Place a text note on a page. Written on save; not visible before that.",{page:g("1-based page number."),text:E("The note's text."),left:g("Distance from the left edge, in PDF points (72 per inch)."),top:g("Distance from the top edge, in PDF points."),width:g("Box width in points. Omit for a sensible default."),height:g("Box height in points. Omit for a sensible default."),fontSize:g("Font size in points. Omit for 12.")},["page","text","left","top"],pe),m("pdf.highlightText",["pdf"],"Highlight a phrase on a page. Written on save; not visible before that.",{page:g("1-based page number."),text:E("The exact phrase to highlight, as it appears in the page's text."),occurrence:g("Which occurrence on that page, 1-based. Omit for the first.")},["page","text"],pe)],Lc=[m("sheet.setValues",["sheet"],"Write a block of values. The block's shape must match the range.",{sheet:C,range:E("A1 notation, e.g. `B2:D5` or a single `A1`."),values:{type:"array",items:{type:"array",items:{type:["string","number","boolean","null"]}},description:"Rows of cells, top-left first. `null` clears a cell."}},["range","values"],S),m("sheet.setFormula",["sheet"],"Put a formula in every cell of a range.",{sheet:C,range:E("A1 notation."),formula:E("Including the leading `=`.")},["range","formula"],S),m("sheet.setStyle",["sheet"],"Change the look of a range. Only the properties you pass are touched.",{sheet:C,range:E("A1 notation."),bold:re("Bold on or off."),italic:re("Italic on or off."),fontSize:g("Point size."),fontColor:E("CSS colour, e.g. `#b91c1c`."),background:E("CSS colour for the cell fill."),horizontalAlignment:{type:"string",enum:["left","center","right"],description:"Horizontal alignment."},numberFormat:E("Number format pattern, e.g. `#,##0.00` or `0%`.")},["range"],S),m("sheet.insertRows",["sheet"],"Insert empty rows, pushing the rest down.",{sheet:C,at:g("1-based row number to insert before."),count:g("How many. Omit for 1.")},["at"],S),m("sheet.deleteRows",["sheet"],"Delete rows, pulling the rest up.",{sheet:C,at:g("1-based first row to delete."),count:g("How many. Omit for 1.")},["at"],S),m("sheet.insertColumns",["sheet"],"Insert empty columns, pushing the rest right.",{sheet:C,at:g("1-based column number to insert before."),count:g("How many. Omit for 1.")},["at"],S),m("sheet.deleteColumns",["sheet"],"Delete columns, pulling the rest left.",{sheet:C,at:g("1-based first column to delete."),count:g("How many. Omit for 1.")},["at"],S),m("sheet.merge",["sheet"],"Merge a range into one cell.",{sheet:C,range:E("A1 notation.")},["range"],S),m("sheet.unmerge",["sheet"],"Break merged cells in a range apart.",{sheet:C,range:E("A1 notation.")},["range"],S),m("sheet.sort",["sheet"],"Sort a range on one of its columns.",{sheet:C,range:E("A1 notation covering the rows to sort, header excluded."),column:g("1-based column *within the range*, not within the sheet."),ascending:re("Ascending. Omit for ascending.")},["range","column"],S),m("sheet.insertSheet",["sheet"],"Add a new sheet.",{name:E("Name for the new sheet.")},["name"],S),m("sheet.renameSheet",["sheet"],"Rename a sheet.",{sheet:E("Current name."),name:E("New name.")},["sheet","name"],S),m("sheet.deleteSheet",["sheet"],"Remove a sheet and everything on it.",{sheet:E("Name of the sheet to delete.")},["sheet"],S),m("sheet.activate",["sheet"],"Show the user a sheet and select a range on it.",{sheet:C,range:E("A1 notation to select. Omit to only switch sheets.")},[],B)],Pc=[m("word.replaceParagraph",["word"],"Rewrite one whole paragraph, keeping its style. This is the verb for shortening or rephrasing something; call it once per paragraph.",{at:g("The offset the paragraph starts at, exactly as `inspect` prints it."),text:E("The new text for that paragraph. A newline starts a further paragraph.")},["at","text"],S),m("word.replaceRange",["word"],"Replace a stretch of text inside a paragraph - a sentence, a phrase. To rewrite whole paragraphs use word.replaceParagraph: a range covering several paragraph styles is refused, because a replacement carries one style and would set the whole span in the first.",{start:g("Character offset where the replaced text starts, as `inspect` reports offsets."),end:g("Character offset just past the last character to replace."),text:E("The replacement text. A newline starts a new paragraph.")},["start","end","text"],S),m("word.insertText",["word"],"Insert text at a character offset, without removing anything.",{index:g("Character offset, as `inspect` reports offsets."),text:E("The text to insert.")},["index","text"],S),m("word.appendText",["word"],"Add text at the end of the document.",{text:E("The text to append.")},["text"],S),m("word.insertParagraph",["word"],"Start a new paragraph, optionally with text in it.",{text:E("Paragraph text. Newlines start further paragraphs."),index:g("Character offset to insert at. Omit for the end of the document.")},[],S),m("word.setSelection",["word"],"Put the user's cursor on a stretch of text, and move the reading window there: the page context carries one window of a long document, and the text around this offset arrives in the next turn.",{start:g("Start character offset."),end:g("End character offset. Omit for a caret.")},["start"],B)],Uc=[m("slides.setText",["slides"],"Replace the text of one shape. Written on save; not visible before that, and not undoable.",{slide:Ot,element:E("Element id, as `inspect` reports it."),text:E("The new text.")},["slide","element","text"],pe),m("slides.setTransform",["slides"],"Move or resize one shape. Only the values you pass change. Written on save; not visible before that, and not undoable.",{slide:Ot,element:E("Element id."),left:g("Distance from the left edge, in pixels."),top:g("Distance from the top edge, in pixels."),width:g("Width in pixels."),height:g("Height in pixels.")},["slide","element"],pe)],rt=[...xc,...Lc,...Pc,...Uc];function Kc(e){return rt.filter(t=>t.kinds.includes(e))}function $c(e){return rt.find(t=>t.op===e)}const Fc="documents.describe",Bc="documents.inspect",Hc="documents.apply";function Wc(e){const t=e.indexOf(":");if(t!==-1)return e.slice(0,t);const n=e.indexOf(".");return n===-1?e:e.slice(0,n)}const Gc="installation-id";function Vc(e){const t=[];for(const n of Object.keys(e))for(const r of Object.keys(e[n]))t.push({lang:n,key:r,value:e[n][r]});return t}const jc="notification-source",Yc=(e,t)=>`${e}.pref.${t}`,Xc={ai:["account.read","account.write","agent.read","agent.write","assignment.read","assignment.write","budget.read","budget.write","connector.read","connector.write","context.read","context.write","conversation.read","conversation.write","lens.read","lens.write","message.read","message.write","playbook.read","playbook.write","profile.read","profile.write","run.read","run.write","settings.read","settings.write","tool.read","transcript.write","usage.read"],analytics:["report.read"],"app-store":["app.publish","app.read","app.write","setting.read","setting.write"],assist:["board.read"],automations:["sync.read","sync.write","webhook.read","webhook.write"],communication:["account.read","account.write","activity-type.read","activity.read","activity.write","attachment.read","attribute.read","attribute.write","calendar.read","calendar.write","channel.read","channel.write","custom-field.read","custom-field.write","folder.read","folder.write","inbox.read","inbox.write","interaction.read","interaction.write","reaction.read","reaction.write","reminder.read","template.read","template.write","topic.read","topic.write"],context:["kind.read","kind.write","memory.read","memory.write"],crm:["company.read","company.write","contact.read","contact.write"],"eylo-voip":["account.read","account.write","callflow.read","callflow.write","channel.read","channel.write","contact.read","contact.write","device.read","device.write","group.read","group.write","interaction.read","interaction.write","media.read","media.write","menu.read","menu.write","phone-number.read","phone-number.write","recording.read","recording.write","sip.read","temporal-rule.read","temporal-rule.write","user.read","user.write","vmbox.read","vmbox.write","webhook.read","webhook.write"],google:["account.read","account.write","contact.read"],kb:["article.read","article.write","category.read","category.write","help-center.read","help-center.write","kb.read","kb.write"],mail:["account.write"],meta:["account.read","account.write"],microsoft:["account.read","account.write","contact.read","sync.write"],organization:["billing.read","billing.write","settings.read","settings.write","team.read","team.write"],shopify:["account.read","account.write","order.read"],slack:["thread.read","thread.write"],storage:["artifact.read","artifact.write","file.read","file.write","mount.read","mount.write"],time:["entry.read","entry.write","work-type.read","work-type.write"],user:["user.read","user.write"],work:["item.read","item.write","project.read","project.write"]},ot=9e4,Pr=["out_of_office"],Ur=e=>Pr.includes(e);function zc(e,t,n){const r=n-e<ot,o=t?.status&&(!t.expiresAt||t.expiresAt>n)?t:void 0;if(!o?.status)return{online:r,status:r?"available":"offline"};const i=o.status;return!r&&!Ur(i)?{online:!1,status:"offline"}:{online:r,status:i,message:o.message}}function qc(e,t){const n=t-e.lastSeenAt<ot,r=n||Ur(e.status)?e.status:"offline";return n===e.online&&r===e.status?e:{...e,online:n,status:r}}function Jc(e,t){return e?.teamId&&t.includes(e.teamId)?{teamId:e.teamId,mustChoose:!1}:t.length===1?{teamId:t[0],mustChoose:!1}:{teamId:void 0,mustChoose:t.length>1}}function Zc(e){return e.providerAvailable&&e.allowed}const Qc="resources.describe",el="resources.search",tl="resources.resolve",nl="resources.attached";function rl(e){const t=e.indexOf(":");return t===-1?e:e.slice(0,t)}const ol="/provider/scope/related",il="/provider/scope/read",it="auth";function st(e){const t=typeof e=="string"?e.match(/apps\/([^/?#]+)/):null;return t?t[1]:null}function sl(e){const t=st(e);return t?t!==it:typeof e=="string"&&e.startsWith("/wake")}function al(e){return typeof e!="string"||e===""||e==="/"?!0:st(e)===it}function cl(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Kr(e){const n=e.split("/").filter(Boolean).map(r=>r.startsWith(":")?r.endsWith("?")?"(?:/[^/]+)?":"/[^/]+":`/${cl(r)}`).join("");return new RegExp(`^${n}\\/?$`)}function $r(e,t){const n=e.split("/").filter(Boolean),r=t.split("/").filter(Boolean),o={};return n.forEach((i,s)=>{if(i.startsWith(":")){const a=i.endsWith("?")?i.slice(1,-1):i.slice(1),l=r[s];l&&(o[a]=l)}}),o}function Fr(e){return e.publicBasePath??`/apps/${e.name}`}function ll(e){const t=[];for(const n of e){if(!n?.name)continue;const r=Fr(n);for(const o of n.routes??[]){if(!o.public)continue;const i=o.path==="/"?"":o.path;t.push({appName:n.name,resource:o.resource,pattern:`${r}${i}`,props:o.props})}}return t}function Br(e,t){const n=e.split("/").filter(Boolean),r=t.split("/").filter(Boolean);for(let o=0;o<Math.min(n.length,r.length);o++){const i=n[o].startsWith(":"),s=r[o].startsWith(":");if(i!==s)return s}return n.length>r.length}function Hr(e,t){if(typeof e!="string")return null;let n=null;for(const r of t)Kr(r.pattern).test(e)&&(!n||Br(r.pattern,n.pattern))&&(n=r);return n?{...n,params:{...n.props,...$r(n.pattern,e)}}:null}function ul(e,t){return Hr(e,t)!==null}const dl=10*1024*1024,pl=25*1024*1024,fl="sync-target",ml=20,gl={afrikaans:["[Muziek]","(C) TV GELDERLAND 2021","*Thomp thomp thomp*","www.youtube.com","ä n wood s","!.."],english:["[applause]","[APPLAUSE]","(claps)","(clapping)","(audience applauds)","(keyboard clicking)","(keyboard clacking)","(clicking)","[CLICK]","[BLANK_AUDIO]","(upbeat music)","(dramatic music)","[music playing]","(electronic music)","(audience cheering)","(audience cheers)","[MUSIC]","( ( ( ( ) ( ) ( ) ( )","(laughs)","(air whooshing)","<u>Transcribed</u> by https://otter.ai","All new tonight at 6... coming up. A new look at your forecast is A new look at your forecast is","www.mooji.org","KATHRYN A new forecast is coming up... A new forecast is coming up...","KATHRYN pandemic started. increasing since the The pandemic has been","A new look at your forecast this morning... A new look at your","We'll be right back.","We'll see you next week.","Thanks for watching!","❤️ Translated by Amara.org Communit"],flemish:["*clap*","TV GELDERLAND 2020","TV Gelderland 2021","(C) TV GELDERLAND 2021","[Muziek]","Kuman","Ondertitels ingediend door de Amara.org gemeenschap","Ondertiteld door de Amara.org gemeenschap","Dank u wel voor het kijken.","Ondertiteling door de Amara.org gemeenschap","GELUID VAN MAHIH U similarly"],french:["(applaudissements)","[Applaudissements]","Sous-titres réalisés par la communauté d'Amara.org","- Bonne journée. - Bonjour.","POP POP הי","Merci d'avoir regardé cette vidéo.","Merci d'avoir regardé cette vidéo!","Merci d'avoir regardé la vidéo.","J'espère que vous avez apprécié la vidéo.","Je vous remercie de vous abonner","Merci d'avoir regardé!","❤️ par SousTitreur.com","— Sous-titrage ST'501 —","Thanks for watching!","Sous-titres réalisés par l'Amara.org","Sous-titres réalisés para la communauté d'Amara.org","Sous-titres réalisés par la communauté d'Amara.org","Sous-titres fait par Sous-titres par Amara.org","Sous-titres réalisés par les SousTitres d'Amara.org","Sous-titres par Amara.org","Sous-titres par la communauté d'Amara.org","Sous-titres réalisés pour la communauté d'Amara.org","Sous-titres réalisés par la communauté de l'Amara.org","Sous-Titres faits par la communauté d'Amara.org","Sous-titres par l'Amara.org","Sous-titres fait par la communauté d'Amara.org","Sous-titrage ST' 501","Sous-titrage ST'501","Cliquez-vous sur les sous-titres et abonnez-vous à la chaîne d'Amara.org","❤️ par SousTitreur.com"],german:["[Klicken]","(Jubel)","*lacht*","[Anhaltender Beifall]","[Applaus]","(Applaus)","* Applaus *","[MUSIK]","* mustard ml Drumglöck und knack in einem Handbewerb *","Untertitelung aufgrund der Amara.org-Community","Untertitel im Auftrag des ZDF für funk, 2017","Untertitel von Stephanie Geiges","Untertitel der Amara.org-Community","Untertitel im Auftrag des ZDF, 2017","Untertitel im Auftrag des ZDF, 2020","Untertitel im Auftrag des ZDF, 2018","Untertitel im Auftrag des ZDF, 2021","Untertitelung im Auftrag des ZDF, 2021","Copyright WDR 2021","Copyright WDR 2020","Copyright WDR 2019","SWR 2021","SWR 2020"],italian:["Alla prossima!","*applauso*","[Musica]","[Musica]","[Applausi]","*Bip bip bip bip*","(musica del NS shore)","D' 1962 alle tribunte del Gulf","Sottotitoli creati dalla comunità Amara.org","Sottotitoli di Sottotitoli di Amara.org","Sottotitoli e revisione al canale di Amara.org","Sottotitoli e revisione a cura di Amara.org","Sottotitoli e revisione a cura di QTSS","Sottotitoli e revisione a cura di QTSS.","Sottotitoli a cura di QTSS","Sottotitoli a cura di Sottotitoli"],spanish:["[música]","[Música de cierre]","[Aplausos]","(Aplausos)","www.alimmenta.com","¡Gracias por ver el vídeo!","(sonidos del celular) (Inudible distorsión)","¡Suscríbete!","Subtítulos realizados por la comunidad de Amara.org","Subtitulado por la comunidad de Amara.org","Subtítulos por la comunidad de Amara.org","Subtítulos creados por la comunidad de Amara.org","Subtítulos en español de Amara.org","Subtítulos hechos por la comunidad de Amara.org","Subtitulos por la comunidad de Amara.org","Más información www.alimmenta.com","www.mooji.org","[MÚSICA]","[Music cuts in British]"]},Wr=e=>{let t=e;return Object.values(gl).forEach(n=>{n.forEach(r=>{t=t.replaceAll(r,"")})}),t=t.replace(/\(.*?\)/g,""),t=t.replace(/\[.*?\]/g,""),t},Gr=6e4,Vr=8e3,jr=2,Yr=.4,hl=3,El=new Set(["aan","als","ben","bent","bij","dan","dat","deze","die","dit","doen","door","dus","echt","een","eens","even","gaan","gaat","geen","geweest","goed","graag","had","heb","hebben","hebt","heeft","het","hier","hoe","hoor","iets","inderdaad","kan","klopt","kunnen","kunt","maar","mag","mee","meer","met","mij","mijn","misschien","moet","moeten","naar","net","niet","nog","nou","oke","ook","over","prima","toch","uhm","uit","van","veel","voor","wat","weer","weet","wel","wij","wil","wilt","worden","wordt","zeg","zeggen","zijn","zou","zult","about","and","are","been","but","can","does","for","have","just","know","like","not","okay","right","she","that","the","them","then","there","they","this","want","was","well","were","what","will","with","would","yeah","you","your"]);function Xr(e){const t=new Set;for(const n of e.toLowerCase().split(/[^a-z0-9À-ɏ]+/))n.length<hl||El.has(n)||t.add(n);return[...t]}function zr(e,t){if(!e.length)return 0;if(!t.length)return 1;const n=new Set(t),r=new Set(e);let o=0;for(const i of r)n.has(i)||(o+=1);return o/r.size}function qr(e,t=Gr){const n=e.filter(s=>!s.partial&&typeof s.text=="string");if(!n.length)return{text:"",segmentCount:0};const o=n.reduce((s,a)=>Math.max(s,a.endedAt??0),0)-t;return{text:n.filter(s=>(s.endedAt??0)>=o).map(s=>Wr(s.text).trim()).filter(Boolean).join(" ").replace(/\s+/g," ").trim(),segmentCount:n.length}}const Jr=60;function yl(e,t,n=Jr){const r=new Set(e),o=[...e];for(const i of t)!i||r.has(i)||(r.add(i),o.push(i));return o.slice(-n)}function Al(e){const{segments:t,now:n,state:r}=e;if(r.lastTriggerAt&&n-r.lastTriggerAt<Vr)return{trigger:!1,reason:"too_soon"};const o=qr(t,e.windowMs);if(!o.text)return{trigger:!1,reason:"no_speech"};const i=o.segmentCount-(r.lastSegmentCount??0);if(r.lastQueryTerms&&i<jr)return{trigger:!1,reason:"too_few_new"};const s=Xr(o.text);return s.length?r.lastQueryTerms?.length&&zr(s,r.lastQueryTerms)<Yr?{trigger:!1,reason:"same_topic"}:{trigger:!0,text:o.text,terms:s,segmentCount:o.segmentCount}:{trigger:!1,reason:"no_speech"}}const _l=["personal","workspace","connections","work","ai"],Sl="navNotice",_e={NL:{callingCode:"31",trunkPrefix:"0",nsnMin:7,nsnMax:9},BE:{callingCode:"32",trunkPrefix:"0",nsnMin:8,nsnMax:9},LU:{callingCode:"352",nsnMin:6,nsnMax:9},DE:{callingCode:"49",trunkPrefix:"0",nsnMin:6,nsnMax:13},FR:{callingCode:"33",trunkPrefix:"0",nsnMin:9,nsnMax:9},GB:{callingCode:"44",trunkPrefix:"0",nsnMin:9,nsnMax:10},IE:{callingCode:"353",trunkPrefix:"0",nsnMin:7,nsnMax:9},ES:{callingCode:"34",nsnMin:9,nsnMax:9},PT:{callingCode:"351",nsnMin:9,nsnMax:9},IT:{callingCode:"39",nsnMin:6,nsnMax:11},AT:{callingCode:"43",trunkPrefix:"0",nsnMin:7,nsnMax:13},CH:{callingCode:"41",trunkPrefix:"0",nsnMin:9,nsnMax:9},DK:{callingCode:"45",nsnMin:8,nsnMax:8},SE:{callingCode:"46",trunkPrefix:"0",nsnMin:7,nsnMax:13},NO:{callingCode:"47",nsnMin:8,nsnMax:8},FI:{callingCode:"358",trunkPrefix:"0",nsnMin:5,nsnMax:12},PL:{callingCode:"48",nsnMin:9,nsnMax:9},US:{callingCode:"1",nsnMin:10,nsnMax:10},CA:{callingCode:"1",nsnMin:10,nsnMax:10}},Zr="NL",bl=15,Tl=8,Il=Array.from(new Set(Object.values(_e).map(e=>e.callingCode))).sort((e,t)=>t.length-e.length);function Rt(e){if(e)return _e[e.trim().toUpperCase()]}function oe(e,t){return e.length>=t.nsnMin&&e.length<=t.nsnMax}function Ct(e){if(e.length>bl)return null;for(const t of Il){if(!e.startsWith(t))continue;const n=e.slice(t.length);for(const r of Object.values(_e)){if(r.callingCode!==t)continue;const o=r.trunkPrefix,i=o&&n.startsWith(o)?n.slice(o.length):n;if(oe(i,r))return`+${t}${i}`}return null}return e.length<Tl?null:`+${e}`}function Ml(e){let t=e.trim();const n=t.match(/^(sips?|tel|whatsapp):/i);n&&(t=t.slice(n[0].length));const r=t.indexOf("@");return r>=0&&(t=t.slice(0,r)),t.trim()}function Ol(e){if(!e)return!1;const t=e.indexOf("@");if(t<=0)return!1;const n=e.slice(0,t).trim();return!/^[+\d\s().-]+$/.test(n)}function Fe(e,t){if(!e)return null;const n=Ml(e);if(!n)return null;const r=n.startsWith("+"),o=n.replace(/\D/g,"");if(!o)return null;if(r)return Ct(o);if(o.startsWith("00"))return Ct(o.slice(2));const i=Rt(t)??Rt(Zr);if(!i)return null;const s=i.trunkPrefix;if(s&&o.startsWith(s)){const a=o.slice(s.length);return oe(a,i)?`+${i.callingCode}${a}`:null}if(o.startsWith(i.callingCode)){const a=o.slice(i.callingCode.length);if(oe(a,i))return`+${i.callingCode}${a}`}return!s&&oe(o,i)?`+${i.callingCode}${o}`:null}function wl(e,t=9){const n=(e??"").replace(/\D/g,"");return n.length<t?null:n.slice(-t)}function at(e){if(!e)return null;const t=e.trim().toLowerCase(),n=t.lastIndexOf("@");if(n<=0||n===t.length-1)return null;const r=t.slice(0,n).split("+")[0],o=t.slice(n+1);return!r||!o.includes(".")?null:`${r}@${o}`}function Rl(e){const t=at(e);return t?t.slice(t.lastIndexOf("@")+1):null}const Cl=new Set(["co.uk","org.uk","gov.uk","ac.uk","com.au","co.nz","com.br","co.za"]);function Qr(e){if(!e)return null;const t=e.trim().toLowerCase().replace(/\.$/,"").split(".").filter(Boolean);if(t.length<2)return null;const n=t.slice(-2).join(".");return Cl.has(n)&&t.length>=3?t.slice(-3).join("."):n}const eo=new Set(["gmail.com","googlemail.com","outlook.com","hotmail.com","hotmail.nl","hotmail.be","hotmail.co.uk","live.com","live.nl","live.be","msn.com","yahoo.com","yahoo.co.uk","ymail.com","icloud.com","me.com","mac.com","aol.com","gmx.net","gmx.de","web.de","protonmail.com","proton.me","pm.me","tutanota.com","zoho.com","mail.com","ziggo.nl","kpnmail.nl","planet.nl","home.nl","casema.nl","chello.nl","xs4all.nl","telfort.nl","hetnet.nl","zonnet.nl","upcmail.nl","quicknet.nl","telenet.be","skynet.be","proximus.be","scarlet.be"]);function kl(e){const t=Qr(e);return t?eo.has(t):!1}function Nl(e){if(!e)return!1;const t=e.trim().toLowerCase();return t==="tel"||t==="sms"||t==="whatsapp"||t==="fax"}function vl(e,t,n){if(!e||!t)return null;const r=e.trim().toLowerCase();if(r==="tel"||r==="sms"||r==="whatsapp"){const i=Fe(t,n);return i?`tel:${i}`:null}if(r==="fax"){const i=Fe(t,n);return i?`fax:${i}`:null}if(r==="mailto"||r==="email"){const i=at(t);return i?`mailto:${i}`:null}const o=t.trim().toLowerCase();return o?`${r}:${o}`:null}const Dl=[/<blockquote/i,/class="?gmail_quote/i,/id="?[^"]*divRplyFwdMsg/i,/id="?[^"]*mail-editor-reference-message-container/i,/-{3,}\s*Original Message\s*-{3,}/i,/\n_{5,}\s*\n/,/\bOn\b[\s\S]{0,200}?\bwrote:/i],kt=/^\s*(?:>+\s*)?(?:from|van|sent|verzonden|to|aan|cc|subject|onderwerp|date|datum)\s*:/i,xl=/^\s*(?:on|op)\b.{0,200}?\b(?:wrote|schreef|geschreven)\s*:?\s*$/i;function Ll(e){const t=e.split(`
10
+ `);for(let n=0;n<t.length;n++)if(xl.test(t[n])||kt.test(t[n])&&t.slice(n+1,n+4).some(r=>kt.test(r)))return t.slice(0,n).join(`
11
+ `).trim();return e}const Pl=/^(?:https?:|mailto:|tel:)/i,Ul=/^(?:https?:|cid:|data:image\/)/i;function Ie(e,t){const n=e.match(new RegExp(`\\b${t}\\s*=\\s*(?:"([^"]*)"|'([^']*)'|([^\\s">]+))`,"i"));return(n?.[1]??n?.[2]??n?.[3]??"").trim()}const Kl=/(!\[[^\]]*\]\([^)]*\))/;function Nt(e){return e.replace(/\s+/g," ").trim().split(Kl).map((t,n)=>n%2===1?t:t.replace(/[[\]]/g,"\\$&")).join("")}function Me(e){return e.replace(/[()\s<>"]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0")}`)}function $l(e){return e.replace(/<img\b([^>]*?)\/?>/gi,(n,r)=>{const o=Ie(r,"src");return Ul.test(o)?`![${Nt(Ie(r,"alt"))}](${Me(o)})`:""}).replace(/<a\b([^>]*)>([\s\S]*?)<\/a\s*>/gi,(n,r,o)=>{const i=Nt(o.replace(/<[^>]*>/g,"")),s=Ie(r,"href");return Pl.test(s)?`[${i||Me(s)}](${Me(s)})`:i})}const Fl=/<table\b[^>]*>((?:(?!<table\b)[\s\S])*?)<\/table\s*>/i,Bl=/<tr\b[^>]*>([\s\S]*?)<\/tr\s*>/gi,Hl=/<(t[dh])\b([^>]*)>([\s\S]*?)<\/\1\s*>/gi;function Wl(e,t){return/<table\b/i.test(e)||e.includes(`
12
12
 
13
- |`)||t.includes("![")||t.length>200}const Ml=40,Rl={left:"---",center:":---:",right:"---:"};function wl(e){const t=e.match(/align\s*[=:]\s*["']?\s*(right|center)/i);return t?t[1].toLowerCase():"left"}function Cl(e){return e.replace(/<[^>]*>/g,"").replace(/\s+/g," ").trim().replace(/\|/g,"\\|")}function Nl(e){const t=[];for(const a of e.matchAll(Tl)){const s=[];for(const c of a[1].matchAll(Il)){const l=Cl(c[3]);if(Ol(c[3],l))return null;s.push({text:l,align:wl(c[2])})}if(s.length===0)return null;s.some(c=>c.text!=="")&&t.push(s)}const n=t[0]?.length??0;if(t.length<2||n<2||t.some(a=>a.length!==n))return null;const r=a=>`| ${a.map(s=>s.text).join(" | ")} |`,i=t[1].map(a=>Rl[a.align]).join(" | "),o=t.slice(1).map(r).join(`
13
+ |`)||t.includes("![")||t.length>200}const Gl=40,Vl={left:"---",center:":---:",right:"---:"};function jl(e){const t=e.match(/align\s*[=:]\s*["']?\s*(right|center)/i);return t?t[1].toLowerCase():"left"}function Yl(e){return e.replace(/<[^>]*>/g,"").replace(/\s+/g," ").trim().replace(/\|/g,"\\|")}function Xl(e){const t=[];for(const s of e.matchAll(Bl)){const a=[];for(const l of s[1].matchAll(Hl)){const d=Yl(l[3]);if(Wl(l[3],d))return null;a.push({text:d,align:jl(l[2])})}if(a.length===0)return null;a.some(l=>l.text!=="")&&t.push(a)}const n=t[0]?.length??0;if(t.length<2||n<2||t.some(s=>s.length!==n))return null;const r=s=>`| ${s.map(a=>a.text).join(" | ")} |`,o=t[1].map(s=>Vl[s.align]).join(" | "),i=t.slice(1).map(r).join(`
14
14
  `);return`
15
15
 
16
16
  ${r(t[0])}
17
- | ${i} |
18
- ${o}
17
+ | ${o} |
18
+ ${i}
19
19
 
20
- `}function kl(e){return e.replace(/<\/(t[dh])\s*>/gi," ").replace(/<\/tr\s*>/gi,`
21
- `).replace(/<(?:tbody|thead|tfoot|caption|colgroup|col|tr|t[dh])\b[^>]*>/gi,"").replace(/<\/(?:tbody|thead|tfoot|caption|colgroup)\s*>/gi,"")}function vl(e){let t=e;for(let n=0;n<Ml;n++){const r=bl.exec(t);if(!r||r.index===void 0)break;const o=Nl(r[1])??`
20
+ `}function zl(e){return e.replace(/<\/(t[dh])\s*>/gi," ").replace(/<\/tr\s*>/gi,`
21
+ `).replace(/<(?:tbody|thead|tfoot|caption|colgroup|col|tr|t[dh])\b[^>]*>/gi,"").replace(/<\/(?:tbody|thead|tfoot|caption|colgroup)\s*>/gi,"")}function ql(e){let t=e;for(let n=0;n<Gl;n++){const r=Fl.exec(t);if(!r||r.index===void 0)break;const i=Xl(r[1])??`
22
22
 
23
- ${kl(r[1])}
23
+ ${zl(r[1])}
24
24
 
25
- `;t=t.slice(0,r.index)+o+t.slice(r.index+r[0].length)}return t}function St(e,t){let n=e;return n=n.replace(/<(script|style)[\s\S]*?<\/\1>/gi,""),n=n.replace(/<!--[\s\S]*?-->/g,""),n=n.replace(/<br\s*\/?>/gi,`
26
- `),t&&(n=vl(Sl(n))),n=n.replace(/<\/(p|h[1-6]|ul|ol|table|blockquote)>/gi,`
25
+ `;t=t.slice(0,r.index)+i+t.slice(r.index+r[0].length)}return t}function vt(e,t){let n=e;return n=n.replace(/<(script|style)[\s\S]*?<\/\1>/gi,""),n=n.replace(/<!--[\s\S]*?-->/g,""),n=n.replace(/<br\s*\/?>/gi,`
26
+ `),t&&(n=ql($l(n))),n=n.replace(/<\/(p|h[1-6]|ul|ol|table|blockquote)>/gi,`
27
27
 
28
28
  `),n=n.replace(/<\/(div|li|tr)>/gi,`
29
- `),n=n.replace(/<\/(td|th)>/gi," "),n=n.replace(/<[^>]+>/g,""),n=n.replace(/<[^>]*$/,""),n}function bt(e){return!Number.isInteger(e)||e<0||e>1114111?null:String.fromCodePoint(e)}const Dl={euro:"€",pound:"£",yen:"¥",cent:"¢",copy:"©",reg:"®",trade:"™",deg:"°",plusmn:"±",times:"×",middot:"·",bull:"•",hellip:"…",mdash:"—",ndash:"–",lsquo:"‘",rsquo:"’",ldquo:"“",rdquo:"”",apos:"'"};function Tt(e){return e.replace(/&nbsp;/gi," ").replace(/&([a-z]+);/gi,(t,n)=>Dl[n.toLowerCase()]??t).replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/&quot;/gi,'"').replace(/&#(\d+);/g,(t,n)=>bt(Number(n))??t).replace(/&#x([0-9a-f]+);/gi,(t,n)=>bt(parseInt(n,16))??t).replace(/&amp;/gi,"&")}function It(e){return e.replace(/\r/g,"").replace(/[ \t]+/g," ").replace(/ *\n */g,`
29
+ `),n=n.replace(/<\/(td|th)>/gi," "),n=n.replace(/<[^>]+>/g,""),n=n.replace(/<[^>]*$/,""),n}function Dt(e){return!Number.isInteger(e)||e<0||e>1114111?null:String.fromCodePoint(e)}const Jl={euro:"€",pound:"£",yen:"¥",cent:"¢",copy:"©",reg:"®",trade:"™",deg:"°",plusmn:"±",times:"×",middot:"·",bull:"•",hellip:"…",mdash:"—",ndash:"–",lsquo:"‘",rsquo:"’",ldquo:"“",rdquo:"”",apos:"'"};function xt(e){return e.replace(/&nbsp;/gi," ").replace(/&([a-z]+);/gi,(t,n)=>Jl[n.toLowerCase()]??t).replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/&quot;/gi,'"').replace(/&#(\d+);/g,(t,n)=>Dt(Number(n))??t).replace(/&#x([0-9a-f]+);/gi,(t,n)=>Dt(parseInt(n,16))??t).replace(/&amp;/gi,"&")}function Lt(e){return e.replace(/\r/g,"").replace(/[ \t]+/g," ").replace(/ *\n */g,`
30
30
  `).replace(/\n{3,}/g,`
31
31
 
32
- `).trim()}const Br=/<\s*(html|body|div|p|table|br|span)\b/i;function xl(e){return Br.test(e)}function Ll(e){return Hr(e,!1)}function Pl(e){return Hr(e,!0)}function Hr(e,t){if(typeof e!="string"||!e)return"";let n=e.length;for(const a of gl){const s=e.search(a);s>=0&&s<n&&(n=s)}const r=e.slice(0,n);let i=It(Tt(St(r,t)));return i||(i=It(Tt(St(e,t)))),El(i)||i}exports.ACTIVE_ASSIGNMENT_STATUSES=Gi;exports.ACTIVITY_CATALOG=R;exports.AI_ATTACHMENT_LIMITS=hr;exports.AI_ATTACHMENT_MAX_PER_TURN=Bs;exports.AI_ATTACHMENT_TURN_BUDGET=Fs;exports.AI_VENDORS=Ue;exports.ALLOWED_LINK_SCHEMES=Ut;exports.APP_PERMISSIONS=Nc;exports.ARTIFACT_MAX_BLOCKS=Te;exports.ARTIFACT_MAX_BODY_BYTES=wi;exports.ARTIFACT_MAX_CELL_LEN=X;exports.ARTIFACT_MAX_KPI_ITEMS=Re;exports.ARTIFACT_MAX_LIST_ITEMS=Ie;exports.ARTIFACT_MAX_TABLE_COLUMNS=Me;exports.ARTIFACT_MAX_TABLE_ROWS=Oe;exports.ARTIFACT_MAX_TEXT_LEN=Ke;exports.ASSIGNMENT_SCOPE_KIND=Bt;exports.ASSIST_BANDS=js;exports.ASSIST_SOURCE_PROVIDER_GROUP=Vs;exports.ATTENTION_STATUSES=Zt;exports.AT_RISK_GAP=Zn;exports.AUTH_APP_NAME=qe;exports.AUTO_READY_MIN_PROPOSALS=Kn;exports.AUTO_READY_RATE=$n;exports.ActivityTypeRegistry=Nt;exports.BUILT_IN_ONLY=si;exports.BULK_PENALTY=Qt;exports.CADENCE_FLOOR_MS=kr;exports.CADENCE_MIN_NEW_SEGMENTS=vr;exports.CADENCE_MIN_NOVELTY=Dr;exports.CADENCE_WINDOW_MS=Nr;exports.CLASSIFY_VARS=pa;exports.CONNECTOR_PROVIDER_GROUP=mc;exports.CONTEXT_COLLECT_SERVICE=gc;exports.CORE_DIMENSIONS=_i;exports.CommunicationScheme=Sr;exports.DAY_MS=Vt;exports.DEFAULT_CHECK_IN_DAYS=qn;exports.DEFAULT_FORECAST_WEEKS=In;exports.DEFAULT_MEMORY_BUDGET=No;exports.DEFAULT_PHONE_REGION=Kr;exports.DEMAND_SOURCE_PROVIDER_GROUP=Lo;exports.DOCUMENT_APPLY_SERVICE=Ic;exports.DOCUMENT_DESCRIBE_SERVICE=bc;exports.DOCUMENT_INSPECT_SERVICE=Tc;exports.DOCUMENT_OPERATIONS=Xe;exports.EMPTY_WORKFLOW=ma;exports.FEATURE_FOLDER_MANAGEMENT=uc;exports.FEATURE_MESSAGE_REACTIONS=pc;exports.FEATURE_REMOTE_SEARCH=dc;exports.FIXED_KINDS=ce;exports.FIXED_LEVELS=B;exports.FIXED_TYPES=pe;exports.FOLLOW_UP_HOURS=tn;exports.HOUR_MS=Wt;exports.HTML_BODY_RE=Br;exports.INELIGIBLE=w;exports.INSTALLATION_HEADER=Mc;exports.INTERACTION_KIND=Dn;exports.InteractionParticipantRole=cc;exports.KB_FALLBACK_LOCALE=fn;exports.KB_LOCALES=we;exports.LOOSE_STATUSES=fe;exports.MAIL_HINT_HEADERS=qt;exports.MAX_ACTIONS=Y;exports.MAX_ASSIGNMENT_TURNS=Ht;exports.MAX_BLOCKS=Se;exports.MAX_COLLECTION_DEPTH=Be;exports.MAX_EDITABLE_FILE_BYTES=Yc;exports.MAX_FIELDS=V;exports.MAX_LIST_ITEMS=j;exports.MAX_MEMORY_BROWSE=Mo;exports.MAX_MEMORY_BUDGET=Co;exports.MAX_MEMORY_CHARS=Ro;exports.MAX_SHOWN_KEYS=Ur;exports.MAX_TOPIC_CANDIDATES=rr;exports.MAX_TOPIC_EXAMPLES=nr;exports.MAX_TOPIC_EXAMPLE_CHARS=q;exports.MAX_VIEWABLE_FILE_BYTES=Xc;exports.MIN_MEMORY_BUDGET=wo;exports.NAV_NOTICE_SLOT=rl;exports.NOTIFICATION_SOURCE_PROVIDER_GROUP=wc;exports.OFF_TRACK_GAP=Qn;exports.ONBOARDING_SOURCE_PROVIDER_GROUP=vo;exports.PAUSE_SNOOZED=ne;exports.PAUSE_WAITING_FOR_CUSTOMER=re;exports.PHONE_REGIONS=me;exports.PRESENCE_ONLINE_WINDOW_MS=ze;exports.PRESENCE_SURVIVES_OFFLINE=br;exports.PROFILE_TOOL_DISPOSITIONS=xo;exports.PROVIDER_FEATURE_MESSAGE_TEMPLATES=sc;exports.PROVIDER_FEATURE_MESSAGE_WINDOW=ac;exports.PUBLIC_EMAIL_DOMAINS=Fr;exports.READ_STEP_TYPES=Ce;exports.RELATED_SUBJECT_KINDS=gn;exports.RESERVED_STATUS_KEYS=Ye;exports.RESERVED_TYPE_KEYS=_s;exports.RESOURCE_ATTACHED_SERVICE=Kc;exports.RESOURCE_DESCRIBE_SERVICE=Lc;exports.RESOURCE_RESOLVE_SERVICE=Uc;exports.RESOURCE_SEARCH_SERVICE=Pc;exports.SCHEDULE_ENTRY_SCOPE_KIND=On;exports.SCOPE_READ_ROUTE=Bc;exports.SCOPE_RELATED_ROUTE=Fc;exports.SETTINGS_CATEGORIES=nl;exports.SIGNATURE_INTENTS=qi;exports.SLA_HOURS_BY_PRIORITY=en;exports.SLA_METRICS=Na;exports.SLA_PAUSE_REASONS=ka;exports.STEP_MAX_TOKENS_MAX=Pn;exports.STEP_MAX_TOKENS_MIN=Ln;exports.STRATEGY_ITEM_SCOPE_KIND=Xn;exports.SUMMARY_MIN_LAST_CHARS=zt;exports.SUMMARY_MIN_MESSAGES=Xt;exports.SYNC_RUN_MAX_ERRORS=qc;exports.SYNC_TARGET_PROVIDER_GROUP=zc;exports.TERMINAL_ASSIGNMENT_STATUSES=Ft;exports.TERMINAL_RUN_STATUSES=Fn;exports.TRIGGER_VARS=da;exports.UNKNOWN_KIND=An;exports.UNKNOWN_LEVEL_ORDER=zn;exports.UNSUPPORTED=fc;exports.USAGE_DIMENSIONS=Dt;exports.USAGE_DIMENSION_IDS=xt;exports.WORKSTREAM_SCOPE_KIND=Mn;exports.WORK_ACTIVITY_SCOPE_KIND=lr;exports.WORK_AREAS=Do;exports.WORK_COMMENT_ADDED=ms;exports.WORK_CYCLE_SYNC_KIND=Is;exports.WORK_ITEM_ASSIGNED=gs;exports.WORK_ITEM_SCOPE_KIND=sr;exports.WORK_ITEM_STATUS_CHANGED=hs;exports.WORK_PROJECT_SCOPE_KIND=cr;exports.W_PRIORITY=P;exports.acceptExampleCandidate=ds;exports.actingIdentityKey=wn;exports.activeWorkTypes=ls;exports.activityIconOf=Yr;exports.activityJoinUrl=ri;exports.activitySnippet=wt;exports.activityTextParams=Ct;exports.activityTimelineText=ni;exports.activityTimestamp=kt;exports.activityTypeInfo=A;exports.actorKey=oa;exports.addExampleCandidate=us;exports.addWorkingMs=le;exports.agePresenceEntry=vc;exports.aiAttachmentKind=gr;exports.aiAttachmentRejection=Hs;exports.aiBudgetLimit=be;exports.aiBudgetPeriodKey=Ei;exports.aiBudgetPeriodStart=vt;exports.aiBudgetState=hi;exports.aiVendorAcceptsAttachment=gi;exports.aiVendorDefaultModel=pi;exports.aiVendorLabel=di;exports.aiVendorNeedsBaseUrl=mi;exports.aiVendorsWith=fi;exports.appNameFromPath=Je;exports.applyRounding=is;exports.applySignature=Ji;exports.approvalRate=Un;exports.artifactBodyBytes=Pi;exports.artifactOutline=Ui;exports.artifactToMarkdown=$i;exports.assignmentMismatch=la;exports.assignmentScopeKey=Vi;exports.assignmentSubject=Xi;exports.belongsOnCalendar=Fo;exports.buildActivityPreview=oi;exports.buildChannelIntents=ec;exports.buildShareKeys=Fi;exports.buildWindow=Pr;exports.calendarOf=ue;exports.canNestUnder=_o;exports.canParent=Wa;exports.carriesText=Zr;exports.categoryLabel=So;exports.categoryOf=pr;exports.channelKindForScheme=oc;exports.channelKindOf=Xr;exports.checkInOverdueMs=ts;exports.clampStepMaxTokens=fa;exports.classifyMail=ao;exports.cleanMessageMarkdown=Pl;exports.cleanMessageText=Ll;exports.compareAssistRank=Xs;exports.compareWorkTypes=tr;exports.countsAsPlanned=Ge;exports.coverageFor=Vo;exports.coversWorkstream=Sn;exports.cycleOrder=Ps;exports.cycleState=Us;exports.decideAssignmentState=zi;exports.decideCadence=tl;exports.decideIncomingCall=Js;exports.defaultLocaleOf=mn;exports.defaultStatusKey=vs;exports.defineIntent=lc;exports.depthOf=dn;exports.derivePresence=kc;exports.describeClause=Oi;exports.disabledIntentsFromCapabilities=Zs;exports.documentKindOf=Oc;exports.dueAtOf=Ka;exports.elapsedSeconds=rs;exports.emailDomain=ul;exports.endpointKey=ml;exports.erlangC=hn;exports.extractParams=Or;exports.extractTerms=xr;exports.filterByEndpoint=nc;exports.filterByIntent=tc;exports.filterByTargetScheme=Ar;exports.filterableDimensions=Ii;exports.findAiVendor=$;exports.fixedLevelForName=ja;exports.fixedTypeForName=bs;exports.fixedTypes=Ts;exports.flattenLocales=Rc;exports.floorToPeriod=L;exports.forecastIntervals=ea;exports.formatActingIdentity=Rn;exports.formatClock=as;exports.formatHm=os;exports.formatItemKey=Ms;exports.formatPeriod=N;exports.formatSlaDuration=Ba;exports.freshSources=Ws;exports.getActivitySeenUserIds=ci;exports.getContactEndpoints=Zi;exports.getShortTitle=mo;exports.getUrgencyScore=fo;exports.hasReacted=Ia;exports.healthCategory=Ya;exports.healthsInCategory=Xa;exports.heightOf=He;exports.helpCenterText=ho;exports.humanizeAction=ua;exports.interactionIdOf=xn;exports.isAgentUser=fs;exports.isAssigned=uo;exports.isAssignmentTerminal=Wi;exports.isAssignmentTrigger=kn;exports.isAutoReady=Ea;exports.isAwaitingThem=ln;exports.isChatMessageActivity=ui;exports.isClosed=po;exports.isConnectedType=ei;exports.isDeepLink=Hc;exports.isDescendant=pn;exports.isEligible=Qi;exports.isEmailActivity=li;exports.isHtmlBody=xl;exports.isInFlight=_a;exports.isInteractionUnseen=Jt;exports.isLandingPath=Gc;exports.isLikelyBulk=Yt;exports.isMessageShape=Le;exports.isMessageType=zr;exports.isMoreSpecificPattern=Rr;exports.isNoteShape=Pe;exports.isOpenClock=Yn;exports.isOutwardTool=Gs;exports.isParked=rn;exports.isPaused=Bn;exports.isPlaybookAuthoredType=Qr;exports.isPublicEmailDomain=pl;exports.isPublicPath=jc;exports.isReminderActive=on;exports.isReplyableType=Jr;exports.isSlaAtRisk=co;exports.isTerminal=ya;exports.isThreadLongEnough=no;exports.isTranscriptType=ti;exports.isWorkClosed=Ds;exports.isWorkTypeVisible=cs;exports.itemDossierKeys=Cs;exports.kindFor=U;exports.ladderFor=dr;exports.levelIn=Jn;exports.levelOrder=oe;exports.linkLabel=go;exports.listeningAllowed=yi;exports.localeInstruction=yo;exports.localeName=Eo;exports.localesOf=Ao;exports.looksLikeEmail=cl;exports.matchContactToIntents=rc;exports.matchPublicRoute=wr;exports.mcpCredentialScope=Io;exports.mcpToolPrefix=Oo;exports.measureRatio=qa;exports.mergeShownKeys=el;exports.messageCountsAs=Rt;exports.metricOption=Mi;exports.needsPhoneRegion=fl;exports.nestsUnderParent=qr;exports.nextLevelBelow=Va;exports.nextSlaClock=$a;exports.normalizeArtifactBlocks=Li;exports.normalizeBlocks=Wr;exports.normalizeEmail=Ze;exports.normalizeExample=C;exports.notificationPrefKey=Cc;exports.novelty=Lr;exports.operationDescriptor=Sc;exports.operationsForKind=Ac;exports.overlapSeconds=z;exports.overlaps=Wo;exports.paceRatio=Ja;exports.parkMarksById=eo;exports.parseActingIdentity=ra;exports.parseClockMinutes=wa;exports.parseItemKey=Rs;exports.pathToRegex=Ir;exports.pauseBitFor=Ca;exports.periodsInRange=bi;exports.phoneSuffix=ll;exports.pickMailHeaders=ro;exports.plainTextFromMarkdown=Ot;exports.planSlaEvent=Ua;exports.plannedBillable=jo;exports.plannedWorkTypeKey=Tn;exports.playbookActor=Nn;exports.procedureOf=ha;exports.projectDossierKeys=Ns;exports.publicBasePathFor=Mr;exports.publicRoutePatterns=Vc;exports.reactionWakesAssignment=Yi;exports.readPath=Q;exports.readStepError=Ne;exports.recencyOf=nn;exports.refKey=vn;exports.registrableDomain=$r;exports.rejectExampleCandidate=or;exports.relatedByDefault=ko;exports.remainingMsOf=ie;exports.requiredAgents=_n;exports.requirementFor=bn;exports.resolveAccountCapabilities=_r;exports.resolveActivityText=ee;exports.resolveChannelIntents=yr;exports.resolveSignature=Gt;exports.resolveWorkMode=Dc;exports.resourceKindOf=$c;exports.rollupChildren=es;exports.runActor=ia;exports.runInteractionId=Sa;exports.sanitizeInline=$t;exports.sanitizeTranscript=Cr;exports.scheduleEntryScopeKey=ta;exports.scoreInteraction=lo;exports.scoreWorkItem=ys;exports.selectLenses=To;exports.serviceLevel=En;exports.sessionsHoldCannotReach=qs;exports.sessionsToHold=zs;exports.shareKeyForTeam=Fe;exports.shareKeyForUser=$e;exports.shareKeysForViewer=Bi;exports.shortfalls=Yo;exports.shouldRunAudioPipeline=xc;exports.slaBadgeTone=Fa;exports.slaHoursByInbox=so;exports.slaHoursFor=cn;exports.sortStatuses=fr;exports.sourceKey=Er;exports.spreadSeconds=Uo;exports.statusIn=ks;exports.stepsOf=ga;exports.strategyAncestorKeysFor=Ga;exports.strategyDossierKeys=Ha;exports.strategyItemScopeKey=Ve;exports.stripHtml=Mt;exports.subjectKeyOf=Aa;exports.subjectOf=We;exports.subjectRef=Ys;exports.suggestProjectKey=ws;exports.suggestedHealth=Za;exports.summarizeReactions=ba;exports.targetById=ca;exports.targetForActivityType=sa;exports.targetOrder=ns;exports.toActingIdentity=Cn;exports.toE164=xe;exports.toolSourceKinds=Hi;exports.topicOfferedForTeam=ar;exports.topicsForTeam=ps;exports.trafficIntensity=yn;exports.truncateExample=ir;exports.typeIn=Ss;exports.typesFor=As;exports.uniqueWorkStatusKey=xs;exports.uniqueWorkTypeKey=ss;exports.usageMetricId=Lt;exports.usageMetrics=Ri;exports.validateStatuses=Ls;exports.valueAtPath=aa;exports.waitHoursOf=se;exports.wakesAssignment=ji;exports.workActivityScopeKey=Os;exports.workItemScopeKey=ur;exports.workProjectScopeKey=je;exports.workRatio=Qa;exports.workStatusKey=mr;exports.workTypeKey=er;exports.workingMsBetween=te;exports.workstreamScopeKey=na;
32
+ `).trim()}const to=/<\s*(html|body|div|p|table|br|span)\b/i;function Zl(e){return to.test(e)}function Ql(e){return no(e,!1)}function eu(e){return no(e,!0)}function no(e,t){if(typeof e!="string"||!e)return"";let n=e.length;for(const s of Dl){const a=e.search(s);a>=0&&a<n&&(n=a)}const r=e.slice(0,n);let o=Lt(xt(vt(r,t)));return o||(o=Lt(xt(vt(e,t)))),Ll(o)||o}exports.ACTIVE_ASSIGNMENT_STATUSES=oi;exports.ACTIVITY_CATALOG=N;exports.AI_ATTACHMENT_LIMITS=kr;exports.AI_ATTACHMENT_MAX_PER_TURN=ic;exports.AI_ATTACHMENT_TURN_BUDGET=oc;exports.AI_VENDORS=We;exports.ALLOWED_LINK_SCHEMES=Xt;exports.APP_PERMISSIONS=Xc;exports.ARTIFACT_MAX_BLOCKS=Re;exports.ARTIFACT_MAX_BODY_BYTES=Wo;exports.ARTIFACT_MAX_CELL_LEN=ee;exports.ARTIFACT_MAX_KPI_ITEMS=ve;exports.ARTIFACT_MAX_LIST_ITEMS=Ce;exports.ARTIFACT_MAX_TABLE_COLUMNS=Ne;exports.ARTIFACT_MAX_TABLE_ROWS=ke;exports.ARTIFACT_MAX_TEXT_LEN=Ge;exports.ASSIGNMENT_SCOPE_KIND=Zt;exports.ASSIST_BANDS=uc;exports.ASSIST_SOURCE_PROVIDER_GROUP=lc;exports.ATTENTION_STATUSES=un;exports.AT_RISK_GAP=pr;exports.AUTH_APP_NAME=it;exports.AUTO_READY_MIN_PROPOSALS=Zn;exports.AUTO_READY_RATE=Qn;exports.ActivityTypeRegistry=Bt;exports.BUILT_IN_ONLY=bo;exports.BULK_PENALTY=dn;exports.CADENCE_FLOOR_MS=Vr;exports.CADENCE_MIN_NEW_SEGMENTS=jr;exports.CADENCE_MIN_NOVELTY=Yr;exports.CADENCE_WINDOW_MS=Gr;exports.CLASSIFY_VARS=ks;exports.CONNECTOR_PROVIDER_GROUP=vc;exports.CONTEXT_COLLECT_SERVICE=Dc;exports.CORE_DIMENSIONS=xo;exports.CommunicationScheme=Lr;exports.DAY_MS=nn;exports.DEFAULT_CHECK_IN_DAYS=ur;exports.DEFAULT_FORECAST_WEEKS=Un;exports.DEFAULT_MEMORY_BUDGET=Gi;exports.DEFAULT_PHONE_REGION=Zr;exports.DEMAND_SOURCE_PROVIDER_GROUP=es;exports.DOCUMENT_APPLY_SERVICE=Hc;exports.DOCUMENT_DESCRIBE_SERVICE=Fc;exports.DOCUMENT_INSPECT_SERVICE=Bc;exports.DOCUMENT_OPERATIONS=rt;exports.EMPTY_WORKFLOW=vs;exports.FEATURE_FOLDER_MANAGEMENT=Rc;exports.FEATURE_MESSAGE_REACTIONS=kc;exports.FEATURE_REMOTE_SEARCH=Cc;exports.FIXED_KINDS=me;exports.FIXED_LEVELS=Y;exports.FIXED_TYPES=ye;exports.FOLLOW_UP_HOURS=fn;exports.HOUR_MS=tn;exports.HTML_BODY_RE=to;exports.INELIGIBLE=v;exports.INSTALLATION_HEADER=Gc;exports.INTERACTION_KIND=Yn;exports.InteractionParticipantRole=Oc;exports.KB_FALLBACK_LOCALE=In;exports.KB_LOCALES=De;exports.LOOSE_STATUSES=Ae;exports.MAIL_HINT_HEADERS=cn;exports.MAX_ACTIONS=Q;exports.MAX_ASSIGNMENT_TURNS=Qt;exports.MAX_BLOCKS=Oe;exports.MAX_COLLECTION_DEPTH=Ye;exports.MAX_EDITABLE_FILE_BYTES=dl;exports.MAX_FIELDS=J;exports.MAX_LIST_ITEMS=Z;exports.MAX_MEMORY_BROWSE=Fi;exports.MAX_MEMORY_BUDGET=Wi;exports.MAX_MEMORY_CHARS=Bi;exports.MAX_SHOWN_KEYS=Jr;exports.MAX_TOPIC_CANDIDATES=Er;exports.MAX_TOPIC_EXAMPLES=hr;exports.MAX_TOPIC_EXAMPLE_CHARS=ne;exports.MAX_VIEWABLE_FILE_BYTES=pl;exports.MIN_MEMORY_BUDGET=Hi;exports.NAV_NOTICE_SLOT=Sl;exports.NOTIFICATION_SOURCE_PROVIDER_GROUP=jc;exports.OFF_TRACK_GAP=fr;exports.ONBOARDING_SOURCE_PROVIDER_GROUP=ji;exports.PAUSE_SNOOZED=ce;exports.PAUSE_WAITING_FOR_CUSTOMER=le;exports.PHONE_REGIONS=_e;exports.PRESENCE_ONLINE_WINDOW_MS=ot;exports.PRESENCE_SURVIVES_OFFLINE=Pr;exports.PROFILE_TOOL_DISPOSITIONS=Xi;exports.PROVIDER_FEATURE_MESSAGE_TEMPLATES=Mc;exports.PROVIDER_FEATURE_MESSAGE_WINDOW=Ic;exports.PUBLIC_EMAIL_DOMAINS=eo;exports.READ_STEP_TYPES=xe;exports.RELATED_SUBJECT_KINDS=On;exports.RESERVED_STATUS_KEYS=nt;exports.RESERVED_TYPE_KEYS=Ua;exports.RESOURCE_ATTACHED_SERVICE=nl;exports.RESOURCE_DESCRIBE_SERVICE=Qc;exports.RESOURCE_RESOLVE_SERVICE=tl;exports.RESOURCE_SEARCH_SERVICE=el;exports.SCHEDULE_ENTRY_SCOPE_KIND=Kn;exports.SCOPE_READ_ROUTE=il;exports.SCOPE_RELATED_ROUTE=ol;exports.SETTINGS_CATEGORIES=_l;exports.SIGNATURE_INTENTS=di;exports.SLA_HOURS_BY_PRIORITY=pn;exports.SLA_METRICS=Xs;exports.SLA_PAUSE_REASONS=zs;exports.STEP_MAX_TOKENS_MAX=qn;exports.STEP_MAX_TOKENS_MIN=zn;exports.STRATEGY_ITEM_SCOPE_KIND=cr;exports.SUMMARY_MIN_LAST_CHARS=an;exports.SUMMARY_MIN_MESSAGES=sn;exports.SYNC_RUN_MAX_ERRORS=ml;exports.SYNC_TARGET_PROVIDER_GROUP=fl;exports.TERMINAL_ASSIGNMENT_STATUSES=Jt;exports.TERMINAL_RUN_STATUSES=er;exports.TRIGGER_VARS=Cs;exports.UNKNOWN_KIND=wn;exports.UNKNOWN_LEVEL_ORDER=lr;exports.UNSUPPORTED=Nc;exports.USAGE_DIMENSIONS=Gt;exports.USAGE_DIMENSION_IDS=Vt;exports.WORKSTREAM_SCOPE_KIND=$n;exports.WORK_ACTIVITY_SCOPE_KIND=Tr;exports.WORK_AREAS=Yi;exports.WORK_COMMENT_ADDED=va;exports.WORK_CYCLE_SYNC_KIND=Ha;exports.WORK_ITEM_ASSIGNED=Da;exports.WORK_ITEM_SCOPE_KIND=Sr;exports.WORK_ITEM_STATUS_CHANGED=xa;exports.WORK_PROJECT_SCOPE_KIND=br;exports.W_PRIORITY=H;exports.acceptExampleCandidate=Ca;exports.actingIdentityKey=Hn;exports.activeWorkTypes=wa;exports.activityIconOf=ao;exports.activityJoinUrl=yo;exports.activitySnippet=$t;exports.activityTextParams=Ft;exports.activityTimelineText=Eo;exports.activityTimestamp=Ht;exports.activityTypeInfo=O;exports.actorKey=Ts;exports.addExampleCandidate=Ra;exports.addWorkingMs=ge;exports.agePresenceEntry=qc;exports.aiAttachmentKind=Cr;exports.aiAttachmentRejection=sc;exports.aiBudgetLimit=we;exports.aiBudgetPeriodKey=vo;exports.aiBudgetPeriodStart=Wt;exports.aiBudgetState=No;exports.aiVendorAcceptsAttachment=ko;exports.aiVendorDefaultModel=wo;exports.aiVendorLabel=Oo;exports.aiVendorNeedsBaseUrl=Co;exports.aiVendorsWith=Ro;exports.appNameFromPath=st;exports.applyRounding=ba;exports.applySignature=pi;exports.approvalRate=Jn;exports.artifactBodyBytes=Jo;exports.artifactOutline=Zo;exports.artifactToMarkdown=ei;exports.assignmentMismatch=ws;exports.assignmentScopeKey=si;exports.assignmentSubject=li;exports.belongsOnCalendar=zi;exports.buildActivityPreview=_o;exports.buildChannelIntents=yc;exports.buildShareKeys=ti;exports.buildWindow=qr;exports.calendarDaysBetween=Cn;exports.calendarOf=he;exports.canNestUnder=Di;exports.canParent=ca;exports.capacityTotal=Zi;exports.capacityWeights=As;exports.carriesText=fo;exports.categoryLabel=Li;exports.categoryOf=Or;exports.channelKindForScheme=Tc;exports.channelKindOf=co;exports.checkInOverdueMs=Aa;exports.clampStepMaxTokens=Ns;exports.classifyMail=Si;exports.cleanMessageMarkdown=eu;exports.cleanMessageText=Ql;exports.compareAssistRank=pc;exports.compareWorkTypes=gr;exports.countsAsPlanned=W;exports.coverageByPerson=Qi;exports.coverageFor=ss;exports.coversWorkstream=Rn;exports.cycleDayIndex=ze;exports.cycleOrder=ec;exports.cycleState=tc;exports.decideAssignmentState=ui;exports.decideCadence=Al;exports.decideIncomingCall=gc;exports.defaultLocaleOf=Mn;exports.defaultStatusKey=qa;exports.defineIntent=wc;exports.depthOf=bn;exports.derivePresence=zc;exports.describeClause=Fo;exports.disabledIntentsFromCapabilities=hc;exports.documentKindOf=Wc;exports.dueAtOf=na;exports.elapsedSeconds=Sa;exports.emailDomain=Rl;exports.endpointKey=vl;exports.erlangC=Nn;exports.extractParams=$r;exports.extractTerms=Xr;exports.filterByEndpoint=_c;exports.filterByIntent=Ac;exports.filterByTargetScheme=xr;exports.filterableDimensions=$o;exports.findAiVendor=V;exports.fixedLevelForName=ua;exports.fixedTypeForName=Fa;exports.fixedTypes=Ba;exports.flattenLocales=Vc;exports.floorToPeriod=U;exports.forecastIntervals=gs;exports.formatActingIdentity=Bn;exports.formatClock=Ia;exports.formatHm=Ta;exports.formatItemKey=Ga;exports.formatPeriod=P;exports.formatSlaDuration=ia;exports.freshSources=cc;exports.getActivitySeenUserIds=To;exports.getContactEndpoints=fi;exports.getShortTitle=Ri;exports.getUrgencyScore=wi;exports.hasReacted=Hs;exports.healthCategory=da;exports.healthsInCategory=pa;exports.heightOf=Xe;exports.helpCenterText=ki;exports.humanizeAction=Rs;exports.interactionIdOf=Xn;exports.isAgentUser=Na;exports.isAssigned=Mi;exports.isAssignmentTerminal=ii;exports.isAssignmentTrigger=Vn;exports.isAutoReady=Ls;exports.isAwaitingThem=_n;exports.isChatMessageActivity=Mo;exports.isClosed=Oi;exports.isConnectedType=go;exports.isDeepLink=sl;exports.isDescendant=Tn;exports.isEligible=mi;exports.isEmailActivity=Io;exports.isHtmlBody=Zl;exports.isInFlight=Us;exports.isInteractionUnseen=ln;exports.isLandingPath=al;exports.isLikelyBulk=on;exports.isMessageShape=Be;exports.isMessageType=lo;exports.isMoreSpecificPattern=Br;exports.isNoteShape=He;exports.isOpenClock=ar;exports.isOutwardTool=ac;exports.isParked=gn;exports.isPaused=tr;exports.isPlaybookAuthoredType=mo;exports.isPublicEmailDomain=kl;exports.isPublicPath=ul;exports.isReminderActive=hn;exports.isReplyableType=po;exports.isSlaAtRisk=Ti;exports.isTerminal=Ps;exports.isThreadLongEnough=Ei;exports.isTranscriptType=ho;exports.isWorkClosed=Ja;exports.isWorkTypeVisible=Oa;exports.itemDossierKeys=Ya;exports.kindFor=x;exports.ladderFor=Mr;exports.levelIn=dr;exports.levelOrder=de;exports.linkLabel=Ci;exports.listeningAllowed=Do;exports.localeInstruction=vi;exports.localeName=Ni;exports.localesOf=xi;exports.looksLikeEmail=Ol;exports.matchContactToIntents=Sc;exports.matchPublicRoute=Hr;exports.mcpCredentialScope=Ki;exports.mcpToolPrefix=$i;exports.measureRatio=ma;exports.mergeShownKeys=yl;exports.messageCountsAs=Kt;exports.metricOption=Bo;exports.minutesOn=qe;exports.needsPhoneRegion=Nl;exports.nestsUnderParent=uo;exports.nextLevelBelow=la;exports.nextSlaClock=ra;exports.normalizeArtifactBlocks=qo;exports.normalizeBlocks=oo;exports.normalizeEmail=at;exports.normalizeExample=D;exports.notificationPrefKey=Yc;exports.novelty=zr;exports.operationDescriptor=$c;exports.operationsForKind=Kc;exports.overlapSeconds=te;exports.overlaps=is;exports.paceRatio=ga;exports.parkMarksById=gi;exports.parseActingIdentity=Ss;exports.parseClockMinutes=js;exports.parseItemKey=Va;exports.pathToRegex=Kr;exports.patternFor=Ze;exports.patternStartTime=Je;exports.pauseBitFor=Ys;exports.periodsInRange=Uo;exports.phoneSuffix=wl;exports.pickMailHeaders=yi;exports.placeLumps=_s;exports.plainTextFromMarkdown=Pt;exports.planSlaEvent=ta;exports.plannedBillable=as;exports.plannedWorkTypeKey=Pn;exports.playbookActor=Gn;exports.procedureOf=xs;exports.projectDossierKeys=Xa;exports.publicBasePathFor=Fr;exports.publicRoutePatterns=ll;exports.reactionWakesAssignment=ci;exports.readPath=ie;exports.readStepError=Le;exports.recencyOf=mn;exports.refKey=jn;exports.registrableDomain=Qr;exports.rejectExampleCandidate=Ar;exports.relatedByDefault=Vi;exports.remainingMsOf=ue;exports.requiredAgents=xn;exports.requirementFor=Ln;exports.resolveAccountCapabilities=Dr;exports.resolveActivityText=se;exports.resolveChannelIntents=vr;exports.resolveSignature=en;exports.resolveWorkMode=Jc;exports.resourceKindOf=rl;exports.rollupChildren=ya;exports.runActor=bs;exports.runInteractionId=$s;exports.sanitizeInline=qt;exports.sanitizeTranscript=Wr;exports.scheduleEntryScopeKey=hs;exports.scoreInteraction=Ii;exports.scoreWorkItem=Pa;exports.selectLenses=Ui;exports.serviceLevel=vn;exports.sessionsHoldCannotReach=mc;exports.sessionsToHold=fc;exports.shareKeyForTeam=je;exports.shareKeyForUser=Ve;exports.shareKeysForViewer=ni;exports.shortfalls=cs;exports.shouldRunAudioPipeline=Zc;exports.slaBadgeTone=oa;exports.slaHoursByInbox=bi;exports.slaHoursFor=An;exports.sortStatuses=wr;exports.sourceKey=Nr;exports.spreadOverWeights=Fn;exports.statusIn=za;exports.stepsOf=Ds;exports.strategyAncestorKeysFor=aa;exports.strategyDossierKeys=sa;exports.strategyItemScopeKey=et;exports.stripHtml=Ut;exports.subjectKeyOf=Ks;exports.subjectOf=Qe;exports.subjectRef=dc;exports.suggestProjectKey=ja;exports.suggestedHealth=ha;exports.summarizeReactions=Fs;exports.targetById=Os;exports.targetForActivityType=Ms;exports.targetOrder=_a;exports.termsFor=kn;exports.toActingIdentity=Wn;exports.toE164=Fe;exports.toolSourceKinds=ri;exports.topicOfferedForTeam=_r;exports.topicsForTeam=ka;exports.trafficIntensity=Dn;exports.truncateExample=yr;exports.typeIn=$a;exports.typesFor=Ka;exports.uniqueWorkStatusKey=Za;exports.uniqueWorkTypeKey=Ma;exports.usageMetricId=jt;exports.usageMetrics=Ho;exports.validateStatuses=Qa;exports.valueAtPath=Is;exports.waitHoursOf=fe;exports.wakesAssignment=ai;exports.workActivityScopeKey=Wa;exports.workItemScopeKey=Ir;exports.workProjectScopeKey=tt;exports.workRatio=Ea;exports.workStatusKey=Rr;exports.workTypeKey=mr;exports.workingMsBetween=ae;exports.workstreamScopeKey=Es;