@opencxh/domain 1.216.0 → 1.217.0
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 +12 -12
- package/dist/index.js +31 -30
- package/dist/platform/provider.d.ts +19 -1
- package/dist/platform/storage.d.ts +21 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const B=10,
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const B=10,I=10,b=10,M=5,Rn=new Set(["header","section","context","divider","image","list","actions","attachments"]);function P(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 Cn(e,t=()=>{}){if(!Array.isArray(e))return[];const n=[];for(const r of e){if(n.length>=B){t(`more than ${B} blocks; the rest was dropped`);break}if(!r||typeof r!="object")continue;const i=r;if(!Rn.has(i.type)){t(`unknown block type ${String(i.type)}`);continue}switch(i.type){case"header":if(!P(i.text)){t("a header without text");continue}break;case"context":if(!P(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>I&&(t(`more than ${I} fields in a section`),i.fields=i.fields.slice(0,I));break;case"list":if(!Array.isArray(i.items)||i.items.length===0){t("a list without items");continue}i.items.length>b&&(t(`more than ${b} list items`),i.items=i.items.slice(0,b));break;case"actions":{const o=Array.isArray(i.elements)?i.elements:[],a=o.filter(s=>s?.action_id&&s.invoke&&P(s.text));if(a.length!==o.length&&t("an action without action_id, invoke or text"),a.length===0)continue;a.length>M&&t(`more than ${M} actions`),i.elements=a.slice(0,M);break}}n.push(i)}return n}const wn=/(\*\*|__)(?=\S)([\s\S]*?\S)\1/g,Nn=/(\*|_)(?=\S)([^*_\n]*?\S)\1/g;function Ne(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
3
|
`),t=t.replace(wn,"$2"),t=t.replace(Nn,"$2"),t=t.replace(/~~(?=\S)([\s\S]*?\S)~~/g,"$1"),t=t.replace(/`([^`\n]+)`/g,"$1"),t.replace(/\s+/g," ").trim()}function ke(e){return e.replace(/<style[\s\S]*?<\/style>/gi," ").replace(/<script[\s\S]*?<\/script>/gi," ").replace(/<[^>]+>/g," ").replace(/ /g," ").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'").replace(/\s+/g," ").trim()}function y(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 de(e){return e?` — ${Math.floor(e/60)}m ${e%60}s`:""}function x(e){return e?.split("@")?.[0]||e||""}function T(e){return e.map(t=>t.name).join(", ")}function pe(e){return e==="meeting"?"Meeting":e==="video"?"Video call":"Audio call"}const m={VOICE_CALL_STARTED:{shape:"event",channelKind:"voice",icon:"phone",snippet:()=>"Gesprek gestart",timeline:e=>e.direction==="inbound"?`Inbound call started — ${x(e.payload.from)}`:`Outbound call started — ${x(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?` (${y(e.payload.duration)})`:""}`,timeline:e=>`Call ended${de(e.payload.duration)}`},VOICE_CALL_MISSED:{shape:"event",channelKind:"voice",icon:"phone",snippet:()=>"Gemiste oproep",timeline:e=>`Missed call — ${x(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?` (${y(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:fe},EMAIL_SENT:{shape:"message",component:"communication:EmailActivity",channelKind:"mail",icon:"mail",replyable:!0,carriesText:!0,countsAs:"outbound_message",snippet:fe},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=>`${T(e.payload.members)} toegevoegd`,timeline:e=>{const t=T(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=>`${T(e.payload.members)} verlaten`,timeline:e=>{const t=T(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=>`${pe(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?` (${y(e.payload.duration)})`:""}`,timeline:e=>`${pe(e.payload.callType)} ended${de(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?` (${y(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}`},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 fe(e){const t=e.payload,n=Ne(t.bodyText).trim()||t.bodySnippet?.trim()||ke(t.body??"");return t.subject?`${t.subject} — ${n}`:n}function u(e){return m[e]}function kn(e){return u(e)?.icon??"circle"}function vn(e){return u(e)?.channelKind}function J(e){return e==="message"||e==="note"}function Ln(e){return J(u(e)?.shape)}function Dn(e){return u(e)?.replyable===!0}function Pn(e){return u(e)?.carriesText===!0}function ve(e){return u(e)?.countsAs}function xn(e){return u(e)?.playbookAuthored===!0}function Un(e){return u(e)?.connected===!0}function $n(e){const t=u(e);return t?.shape==="artifact"&&t?.carriesText===!0}function Le(e){const t=u(e.type)?.snippet;return t?t(e):""}function Kn(e,t){const n=u(e.type)?.timeline;return n?n(e,t):e.type.replace(/_/g," ").toLowerCase()}function Bn(e){const t=u(e.type)?.joinUrl;return t?t(e):void 0}function w(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 N(e,t,n){if(e===void 0)return null;if(typeof e=="string")return e||null;if("value"in e)return w(t,e.value)||null;const r={};for(const[o,a]of Object.entries(e.params??{}))r[o]=w(t,a);const i=n(e.key,r);return i===e.key?null:i}function De(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]=w(t,i);return{key:e.key,params:n}}const me=140;function Gn(e){const t=e.trim();return t.length<=me?t:`${t.slice(0,me-1).trimEnd()}…`}function Hn(e,t){const n=De(t?.text,e),r=t?N(t.text,e,i=>i):null;return{activityId:e.id,type:e.type,snippet:Gn(r??Le(e)),authorName:e.author?.name??"",direction:e.direction,createdAt:e.createdAt??Date.now(),...n?{snippetKey:n.key,snippetParams:n.params}:{}}}const Fn=e=>e;function ge(e){const t=m[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 he(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 Pe{constructor(t=[],n=Fn){this.translate=n;for(const r of t)r?.type&&(r.type in m||this.declared.has(r.type)||this.declared.set(r.type,r))}declared=new Map;get(t){if(t in m)return ge(t);const n=this.declared.get(t);return n?he(n):void 0}triggerable(){const t=Object.keys(m).filter(r=>m[r].triggerable).map(ge),n=[...this.declared.values()].map(he).filter(r=>r.triggerable);return[...t,...n]}timelineText(t,n){const r=m[t.type];if(r?.timeline)return r.timeline(t,n);const i=this.declared.get(t.type);return N(i?.text,t,this.translate)??t.type.replace(/_/g," ").toLowerCase()}snippet(t){const n=m[t.type];if(n?.snippet)return n.snippet(t);const r=this.declared.get(t.type);return N(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 J(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 Vn=new Pe;function Wn(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 xe(e){return e.createdAt??0}function jn(e){return e.type==="EMAIL_RECEIVED"||e.type==="EMAIL_SENT"}function Xn(e){return e.type==="CHAT_MESSAGE_SENT"||e.type==="CHAT_MESSAGE_RECEIVED"}const Z=[{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 S(e){return Z.find(t=>t.id===e)}function Yn(e){return S(e)?.label??e}function zn(e,t="gpt-5-mini"){return S(e)?.defaultModel??t}function qn(e){return Z.filter(t=>t.capabilities.includes(e))}function Jn(e){const t=S(e);return!!t&&!t.baseUrl}function Zn(e,t){return t==="text"?!0:S(e)?.attachmentKinds?.includes(t)===!0}function Qn(e,t){if(!e.enabled)return"ok";const n=G(e.hardLimitNanos),r=G(e.softLimitNanos);return n!==void 0&&t>=n?"hard":r!==void 0&&t>=r?"soft":"ok"}function G(e){return typeof e=="number"?e:void 0}function Ue(e,t="month"){const n=new Date(e);return Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),1)}function er(e,t="month"){const n=new Date(Ue(e,t));return`${n.getUTCFullYear()}-${String(n.getUTCMonth()+1).padStart(2,"0")}`}function tr(e){return e?.listeningEnabled!==!1}const nr=[{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 U(e){return e<10?`0${e}`:`${e}`}function $e(e,t){const n=new Date(e),r=`${n.getUTCFullYear()}-${U(n.getUTCMonth()+1)}-${U(n.getUTCDate())}`;return t==="day"?r:`${r}T${U(n.getUTCHours())}`}function Ke(e,t){const n=new Date(e);return n.setUTCMinutes(0,0,0),t==="day"&&n.setUTCHours(0),n.getTime()}const rr=36e5,ir=864e5;function or(e,t,n){const r=n==="hour"?rr:ir,i=[];for(let o=Ke(e,n);o<=t;o+=r)i.push($e(o,n));return i}const Be=[{id:"resource",label:"Resource",labelSource:"raw"},{id:"origin",label:"Herkomst",labelSource:"raw"}],Ge=Be.map(e=>e.id);function He(e,t){return`${e}.usage.${t}`}function ar(e,t){return t.map(n=>({id:He(e,n.unit),label:n.label,category:"Verbruik",valueType:n.valueType??"count",aggregation:"sum",supportedDimensions:["provider",...Ge,...n.extraDimensions??[],"time"]}))}const Fe=new Set(["info","success","warning","destructive"]),H=200,F=100,V=200,W=12,j=4,Q=4e3,O=500,sr=256*1024,cr=new Set(["heading","paragraph","list","quote","code","divider","table","kpi","callout"]),Ve=["http:","https:","mailto:","tel:"],lr=/^[a-z][a-z0-9+.-]*:/i;function We(e){const t=e.trim().replace(/^<|>$/g,"");if(!t)return!1;const n=lr.exec(t)?.[0];return n?Ve.includes(n.toLowerCase()):!t.startsWith("//")}const ur=/^[ \t]{0,3}\[([^\]]+)\]:[ \t]*(\S+).*$/gm;function dr(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=Ee(e,i,"[","]");if(o<0||e[o+1]!=="("){t+=e[n],n+=1;continue}const a=Ee(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||!We(c)?s:e.slice(n,a+1),n=a+1}return t}function Ee(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 je(e){return dr(e).replace(ur,(t,n,r)=>We(r)?t:"")}function p(e,t=Q){return typeof e=="string"?je(e).slice(0,t):""}function pr(e,t=Q){return typeof e=="string"?e.slice(0,t):""}function fr(e,t="info"){return typeof e=="string"&&Fe.has(e)?e:t}function mr(e,t=()=>{}){if(!Array.isArray(e))return[];const n=[];for(const r of e){if(n.length>=H){t(`more than ${H} blocks; the rest was dropped`);break}if(!r||typeof r!="object")continue;const i=r;if(!cr.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=p(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=p(i.text);if(!a){t("a paragraph without text");continue}n.push({...o,type:"paragraph",text:a});break}case"quote":{const a=p(i.text);if(!a){t("a quote without text");continue}n.push({...o,type:"quote",text:a});break}case"code":{const a=pr(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>=F){t(`more than ${F} list items`);break}const f=p(l?.text);if(!f)continue;const d=p(l?.lead,200);s.push(d?{lead:d,text:f}:{text:f})}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 d of a){if(s.length>=W){t(`more than ${W} table columns`);break}const _=p(d?.label,O),D=d?.align==="right"?"right":void 0;s.push(D?{label:_,align:D}:{label:_})}if(s.length===0){t("a table without columns");continue}const c=Array.isArray(i.rows)?i.rows:[],l=[];for(const d of c){if(l.length>=V){t(`more than ${V} table rows`);break}const _=Array.isArray(d)?d:[];l.push(s.map((D,On)=>p(_[On],O)))}const f=p(i.caption,O);n.push({...o,type:"table",columns:s,rows:l,...f?{caption:f}:{}});break}case"kpi":{const a=Array.isArray(i.items)?i.items:[],s=[];for(const c of a){if(s.length>=j){t(`more than ${j} kpi items`);break}const l=p(c?.value,40),f=p(c?.label,80);if(!l||!f)continue;const d=c?.tone;s.push(typeof d=="string"&&Fe.has(d)?{value:l,label:f,tone:d}:{value:l,label:f})}if(s.length===0){t("a kpi block without usable items");continue}n.push({...o,type:"kpi",items:s});break}case"callout":{const a=p(i.text);if(!a){t("a callout without text");continue}const s=p(i.title,200);n.push({...o,type:"callout",tone:fr(i.tone),...s?{title:s}:{},text:a});break}}}return n}function gr(e){return JSON.stringify(e).length}function hr(e){return{blocks:e.length,types:e.map(t=>t.type),headings:e.flatMap(t=>t.type==="heading"?[t.text]:[])}}function Ae(e){return e.replace(/\|/g,"\\|").replace(/\r?\n/g," ").trim()}function Se(e,t,n){const r=e.map((i,o)=>n?.[o]==="right"?"---:":"---");return[`| ${e.map(Ae).join(" | ")} |`,`| ${r.join(" | ")} |`,...t.map(i=>`| ${i.map(Ae).join(" | ")} |`)]}function Er(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=Se(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 Se(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 Ar(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=Er(i);o.length>0&&n.push(o.join(`
|
|
4
4
|
`))}return`${n.join(`
|
|
5
5
|
|
|
6
6
|
`)}
|
|
7
|
-
`}const ee=e=>`user:${e}`,te=e=>`team:${e}`;function Sr(e){const t=new Set;for(const n of e??[])n?.id&&(n.kind==="user"&&t.add(ee(n.id)),n.kind==="team"&&t.add(te(n.id)));return[...t].sort()}function _r(e,t){return[ee(e),...t.map(te)]}function yr(e){const t=new Set;for(const n of e??[])n?.kind&&t.add(n.kind);return[...t]}const Xe=["done","escalated"],Tr=["open","waiting"];function
|
|
7
|
+
`}const ee=e=>`user:${e}`,te=e=>`team:${e}`;function Sr(e){const t=new Set;for(const n of e??[])n?.id&&(n.kind==="user"&&t.add(ee(n.id)),n.kind==="team"&&t.add(te(n.id)));return[...t].sort()}function _r(e,t){return[ee(e),...t.map(te)]}function yr(e){const t=new Set;for(const n of e??[])n?.kind&&t.add(n.kind);return[...t]}const Xe=["done","escalated"],Tr=["open","waiting"];function Ir(e){return Xe.includes(e)}const Ye="assignment";function br(e){return`${Ye}:${e}`}function Mr(e,t,n){if(e.direction==="inbound")return!0;if(e.author?.type==="user"&&e.author.id===t)return!1;const r=e.payload?.mentions;return Array.isArray(r)&&r.includes(t)?!0:n==="reply"}function Or(e){return e.subjectKind&&e.subjectId?{type:e.subjectKind,id:e.subjectId}:void 0}const ze=12;function Rr(e,t,n=ze){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 Cr=new Set(["mail","message"]);function qe(e,t){const n=e.settings?.signatures?.[t];return!n?.enabled||!n.body||n.body.trim()===""?null:n}function wr(e,t,n,r="html"){if(!e)return n;const i=qe(e,t);return i?`${n}${r==="text"?`
|
|
8
8
|
|
|
9
|
-
`:t==="mail"?"<br><br>-- <br>":"<br><br>"}${i.body}`:n}function Nr(e){return e.endpoints??[]}const Je=36e5,Ze=864e5,g=-1/0,kr=e=>e.score>g,A={urgent:40,high:25,normal:10,low:0};function vr(e){return Object.fromEntries(e.map(t=>[t.resourceId,t]))}const Lr=/(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|newsletter|nieuwsbrief|mailer|mailing|notifications?|bounce|postmaster|marketing)@/i,Qe=/\b(unsubscribe|afmelden|uitschrijven|opt[\s-]?out|manage (your )?preferences|geen (e-?mails?|nieuwsbrief|berichten) meer)\b/i;function et(e,t){return!!(e&&Lr.test(e)||t&&Qe.test(t))}const tt=3,nt=600;function Dr(e,t){return e>=tt||t>=nt}const rt=["list-unsubscribe","list-unsubscribe-post","list-id","precedence","auto-submitted","x-auto-response-suppress","feedback-id","x-mailer"];function Pr(e){const t={};for(const n of e){const r=n.name?.toLowerCase();r&&n.value!==void 0&&rt.includes(r)&&(t[r]=n.value)}return t}const xr=/(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|notifications?|bounce|postmaster|mailer)@/i,Ur=/(^|[._+-])(newsletter|nieuwsbrief|marketing|mailing)@/i;function $r(e){const t=e.headers??{},n=e.from?.email,r=t["auto-submitted"]?.toLowerCase();if(r&&r!=="no"||t["x-auto-response-suppress"]||n&&xr.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&&Qe.test(e.body)||n&&Ur.test(n))return"marketing"}function it(e,t){return e.lastActivityAt?!(e.seenBy??[]).includes(t):!1}const ot=["open"],at=1e3,st={urgent:1,high:4,normal:8,low:24},ct=72;function lt(e){return e.lastActivityAt??(e.createdAt?new Date(xe(e)).getTime():0)}function ut(e,t){return dt(t.remindersById?.[e.id],e,t.now)}function dt(e,t,n){return!e||e.remindAt<=n?!1:!((t.lastActivityAt??0)>e.parkedAt&&t.lastActivityPreview?.direction==="inbound")}const pt=e=>ve(e)==="outbound_message",ft=e=>ot.includes(e);function k(e,t){return Math.max(0,(t-lt(e))/Je)}function mt(e,t){const n=e.assignedInboxId?t?.[e.assignedInboxId]:void 0;return typeof n=="number"&&n>0?n:st[e.priority??"normal"]}function Kr(e){const t={};for(const n of e)typeof n.slaHours=="number"&&n.slaHours>0&&(t[n.id]=n.slaHours);return t}function Br(e,t,n){return!ft(e.status)||e.firstResponseAt?!1:k(e,t)>mt(e,n)}function gt(e,t){const n=e.lastActivityPreview;return n?.direction!=="outbound"||!pt(n.type)?!1:k(e,t)<ct}function Gr(e,t){if(!ft(e.status))return{score:g,reasons:[]};if(e.snoozedTill&&e.snoozedTill>t.now)return{score:g,reasons:[]};if(gt(e,t.now))return{score:g,reasons:[]};if(ut(e,t))return{score:g,reasons:[]};let n=0;const r=[],i=e.priority??"normal";A[i]>0&&(n+=A[i],r.push(`priority:${i}`)),it(e,t.userId)&&(n+=20,r.push("unseen")),e.assignedUserId&&e.assignedUserId===t.userId&&(n+=15,r.push("assigned-to-you"));const o=k(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"&&pt(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")||et(e.remoteParty?.resource,e.lastActivityPreview?.snippet))&&(n-=at,r.push("bulk")),{score:n,reasons:r}}const Hr=e=>!!e.assignedUserId||!!e.assignedInboxId,Fr=e=>e.status==="closed",Vr=e=>({urgent:10,high:5,normal:2,low:1})[e.priority]||0,Wr=(e,t=30)=>e.title?.length<=t?e.title:`${e.title.substring(0,t)}...`;function jr(e,t){const n=e.labels??[];return n.find(r=>r.locale===t)?.label??n[0]?.label??e.url}function Xr(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 X=[{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 ht(e){const t=(e??"").toLowerCase();return X.find(n=>n.code===t)??X.find(n=>n.code===t.split("-")[0])}function Yr(e){return ht(e)?.label??e}function zr(e){const t=ht(e);return t?t.english===t.label?`${t.english} (${t.code})`:`${t.english} — ${t.label} (${t.code})`:e}const ne=3;function Et(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>ne+1))return 1/0;i=t.get(i)?.parentId}return r}function qr(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&&At(e,t,r))return!1;const i=Et(e,r),o=t?re(t,n):1;return i+o<=ne}function At(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 re(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=>re(i.id,t,n))):1}const St="en";function _t(e){return e.defaultLocale||e.locale||St}function Jr(e){const t=new Set,n=[];for(const r of[_t(e),...e.locales??[]])!r||t.has(r)||(t.add(r),n.push(r));return n}function Zr(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 Y=["lookup","condition","parallel","for-each"];function z(e){for(const t of e){if(!Y.includes(t.type))return`staptype "${t.type}" mag niet meelezen (alleen ${Y.join(", ")})`;if(t.type==="parallel")for(const n of t.branches??[]){const r=z(n);if(r)return r}if(t.type==="for-each"){const n=z(t.body??[]);if(n)return n}}return null}function Qr(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 ei(e,t){return e.filter(n=>n.enabled&&Qr(n.ownerScope,t))}function ti(e){return e.credentialScope?e.credentialScope:(e.authMode??"header")==="header"||e.oauth?.scope==="org"?"shared":"per-user"}function ni(e){return`mcp__${e}__`}const ri=1e3,ii=2e3,oi=500,ai=12e3,si=4e3,yt=["contact","company","work_item"];function ci(e){if(!e)return!1;const t=e.slice(0,e.indexOf(":"));return yt.includes(t)}const li="onboarding-source",ui=["support","billing","availability","sales","onboarding"],di=["keep","replace"];function Tt(e){switch(e.kind){case"user":return`user:${e.userId}`;case"team":return`team:${e.teamId}`;case"org":return"org"}}function pi(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 bt(e){return Tt(e)}function It(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 Mt=It;function fi(e){return e.agentId?{kind:"user",userId:e.agentId}:Mt(e.ownerScope)}function mi(e){return bt(e)}function gi(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 hi(e,t){return e.targets.find(n=>n.activityTypes.includes(t))}function Ei(e,t){if(t)return e.targets.find(n=>n.id===t)}function Ot(e){return e?.kind==="assignment"}function Ai(e){const{trigger:t,agentId:n,target:r,activityType:i,assigneeUserId:o,authorUserId:a}=e;return Ot(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 Si(e){return(e.startsWith("tool:")?e.slice(5):e).replace(/__/g," · ").replace(/\./g," · ").replace(/_/g," ")}const _i=[{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:"assigneeUserId",type:"string"}],yi={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 Rt(e){return`${e.type}:${e.id}`}const Ct="interaction";function wt(e){return e?.type===Ct?e.id:void 0}const Nt=64,kt=8e3;function Ti(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),Nt),kt)}const bi={kind:"workflow",steps:[]};function Ii(e){return e?.kind==="workflow"?e.steps:[]}function Mi(e){return e?.kind==="procedure"?e.procedure:void 0}function vt(e){const t=e?.approved??0,n=t+(e?.rejected??0);return{total:n,rate:n?t/n:0}}const Lt=10,Dt=.9;function Oi(e){const{total:t,rate:n}=vt(e);return t>=Lt&&n>=Dt}const Pt=["done","escalated","failed","stopped"];function Ri(e){return Pt.includes(e)}function xt(e){return e==="waiting"}function Ci(e){return e==="running"||xt(e)}function ie(e){return e.subjectKind&&e.subjectId?{type:e.subjectKind,id:e.subjectId}:void 0}function wi(e){const t=ie(e);return t?Rt(t):void 0}function Ni(e){return wt(ie(e))}function ki(e,t){const n=e.accumulatedSeconds||0;return e.runningSince?n+Math.max(0,Math.floor((t-e.runningSince)/1e3)):n}function vi(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 Li(e){const t=Math.max(0,Math.round(e/60));return`${Math.floor(t/60)}:${String(t%60).padStart(2,"0")}`}function Di(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 Ut(e){return(e||"").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").slice(0,48).replace(/^-+|-+$/g,"")}function Pi(e,t){const n=Ut(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 xi(e,t){const n=e.ownerScope;return!n||n.kind==="org"?!0:t.includes(n.teamId)}function Ui(e){return e.filter(t=>!t.archived).sort($t)}function $t(e,t){const n=(e.order??0)-(t.order??0);return n!==0?n:(e.label||"").localeCompare(t.label||"")}const Kt=20,Bt=20,R=300;function h(e){return e.toLowerCase().replace(/[^\p{L}\p{N}\s]/gu," ").replace(/\s+/g," ").trim()}function Gt(e){const t=e.replace(/\s+/g," ").trim();if(t.length<=R)return t;const n=t.slice(0,R),r=Math.max(n.lastIndexOf(". "),n.lastIndexOf("! "),n.lastIndexOf("? "));return r>R*.6?n.slice(0,r+1):`${n.trimEnd()}…`}function $i(e,t){const n=Gt(t.text),r=h(n);if(!r||(e.examples??[]).some(a=>h(a)===r))return null;const i=e.exampleCandidates??[],o=i.findIndex(a=>h(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},_e(a)}return _e([{...t,text:n},...i]).slice(0,Bt)}function _e(e){return[...e].sort((t,n)=>Number(n.corrected)-Number(t.corrected)||n.addedAt-t.addedAt)}function Ki(e,t){const n=h(t),r=(e.examples??[]).filter(o=>o.trim());return{examples:r.some(o=>h(o)===n)?r:[...r,t].slice(-Kt),exampleCandidates:Ht(e,t)}}function Ht(e,t){const n=h(t);return(e.exampleCandidates??[]).filter(r=>h(r.text)!==n)}function Ft(e,t){const n=e.ownerScope;return n?n.kind==="org"?!0:n.kind==="team"?!!t&&n.teamId===t:!1:!1}function Bi(e,t){return e.filter(n=>Ft(n,t))}function Gi(e){return e.type==="agent"}const Hi="WORK_COMMENT_ADDED",Fi="WORK_ITEM_ASSIGNED",Vi="WORK_ITEM_STATUS_CHANGED";function Wi(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))/Ze)}function ji(e,t){if(e.closedAt!=null)return{score:g,reasons:[]};const n=t.remindersById?.[e.id];if(n&&n.remindAt>t.now)return{score:g,reasons:[]};let r=0;const i=[],o=e.priority??"normal";if(A[o]>0&&(r+=A[o],i.push(`priority:${o}`)),typeof e.dueDate=="number"){const a=Wi(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 Vt="work_item",Wt="work_project";function jt(e){return`${Vt}:${e}`}function oe(e){return`${Wt}:${e}`}function Xi(e,t,n){const r=`${e}-${t}`;return n?`${r}-${n}`:r}function Yi(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 zi(e){return(e||"").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toUpperCase().replace(/[^A-Z0-9]/g,"").slice(0,3)||"PRJ"}function qi(e,t=25){const n=new Set([jt(e.id)]);e.projectId&&n.add(oe(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 Ji(e){return[oe(e.id)]}const v=[{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}],ae=v.map(e=>e.key);function Xt(e){return e?.statuses?.length?e.statuses:v}function Yt(e,t){return t.find(n=>n.key===e)?.category??"todo"}function Zi(e,t){return t.find(n=>n.key===e)}function Qi(e){const t=Xt(e),n=e?.defaultStatusKey;return n&&t.some(r=>r.key===n)?n:zt(t)[0]?.key??v[0].key}function zt(e){return[...e].sort((t,n)=>{const r=(t.order??0)-(n.order??0);return r!==0?r:(t.label||"").localeCompare(n.label||"")})}function eo(e,t){return Yt(e,t)==="done"}function qt(e){return(e||"").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").slice(0,48).replace(/^-+|-+$/g,"")}function to(e,t){const n=qt(e)||"status",r=new Set([...t,...ae]);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 no(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}ae.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}const ro=new Set(["image/png","image/jpeg","image/jpg","image/gif","image/webp"]),io=new Set(["text/plain","text/markdown","text/csv","application/json","text/html","application/xml","text/xml"]);function Jt(e){const t=(e??"").trim().toLowerCase().split(";")[0];return t?ro.has(t)?"image":t==="application/pdf"?"pdf":io.has(t)?"text":t.startsWith("audio/")?"audio":"unsupported":"unsupported"}const E=1024*1024,Zt={image:5*E,pdf:20*E,text:1*E,audio:20*E},oo=25*E,ao=5;function so(e,t){const n=Jt(e);return n==="unsupported"?"unsupported":t>Zt[n]?"too-large":null}function co(e){return e.access!=="read"&&e.effect!=="internal"}function Qt(e){return`${e.kind}:${e.id||e.url||e.title}`}function lo(e,t=[]){const n=new Set(t),r=[],i=[];for(const o of e){const a=Qt(o);n.has(a)||(n.add(a),r.push(o),i.push(a))}return{sources:r,keys:i}}const uo="assist-source",po=["blocking","due","open"];function fo(e,t){const[n,r]=(e.subjectKey??"").split(":");return n===t&&r?r:void 0}const ye={blocking:0,due:1,open:2};function mo(e,t){return ye[e.band??"open"]-ye[t.band??"open"]||(t.priority??0)-(e.priority??0)||e.id.localeCompare(t.id)}function go(e){return e.sessions.filter(t=>t.id!==e.exceptSessionId&&t.state==="connected"&&e.canHold(t.providerId))}function ho(e){return e.sessions.filter(t=>t.id!==e.exceptSessionId&&t.state==="connected"&&!e.canHold(t.providerId))}function Eo(e){return e.sessions.some(n=>n.id!==e.exceptSessionId&&(n.state==="connected"||n.state==="on_hold"))?{admit:!1,reason:"busy"}:{admit:!0}}function en(e,t){const n=new Set(e.disabledIntents??[]),r=e.intentOverrides??{},i=t.intents.filter(a=>!n.has(a.intent)).map(a=>So(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 tn(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 Ao(e,t){const n=tn(e,t);return Object.entries(n).filter(([,r])=>!r).map(([r])=>r)}function So(e,t){return t?{intent:t.intent??e.intent,targetSchemes:t.targetSchemes??e.targetSchemes,transport:t.transport??e.transport}:e}function _o(e,t){const n=[];for(const r of e){if(!r.enabled)continue;const i=t[r.providerId];if(i)for(const o of en(r,i))n.push({channel:r,description:i,capability:o})}return n}function yo(e,t){return t.filter(n=>n.capability.intent===e)}function nn(e,t){return t.filter(n=>n.capability.targetSchemes.includes(e))}function To(e,t){return nn(e.scheme,t)}function bo(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 rn=(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))(rn||{});const Io={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 Mo(e){return e?Io[e]??"note":"note"}const Oo="message_window",Ro="message_templates",Co={FROM:"from",TO:"to",CC:"cc",BCC:"bcc",ORGANIZER:"organizer",PRESENTER:"presenter",ATTENDEE:"attendee",OWNER:"owner",MEMBER:"member",GUEST:"guest",HOST:"host",PARTICIPANT:"participant"},wo=(e,t)=>({intent:e,...t}),No="folder_management",ko="remote_search",vo={ok:!1,code:"UNSUPPORTED",message:"Provider does not support this op"},Lo="context.collect",Do="installation-id";function Po(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 xo="notification-source",Uo=(e,t)=>`${e}.pref.${t}`,$o={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","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"]},se=9e4,on=["out_of_office"],an=e=>on.includes(e);function Ko(e,t,n){const r=n-e<se,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&&!an(o)?{online:!1,status:"offline"}:{online:r,status:o,message:i.message}}function Bo(e,t){const n=t-e.lastSeenAt<se,r=n||an(e.status)?e.status:"offline";return n===e.online&&r===e.status?e:{...e,online:n,status:r}}function Go(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 Ho(e){return e.providerAvailable&&e.allowed}const Fo="resources.describe",Vo="resources.search",Wo="resources.resolve",jo="resources.attached";function Xo(e){const t=e.indexOf(":");return t===-1?e:e.slice(0,t)}const Yo="/provider/scope/related",zo="/provider/scope/read",ce="auth";function le(e){const t=typeof e=="string"?e.match(/apps\/([^/?#]+)/):null;return t?t[1]:null}function qo(e){const t=le(e);return t?t!==ce:typeof e=="string"&&e.startsWith("/wake")}function Jo(e){return typeof e!="string"||e===""||e==="/"?!0:le(e)===ce}function Zo(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function sn(e){const n=e.split("/").filter(Boolean).map(r=>r.startsWith(":")?r.endsWith("?")?"(?:/[^/]+)?":"/[^/]+":`/${Zo(r)}`).join("");return new RegExp(`^${n}\\/?$`)}function cn(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 ln(e){return e.publicBasePath??`/apps/${e.name}`}function Qo(e){const t=[];for(const n of e){if(!n?.name)continue;const r=ln(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 un(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 dn(e,t){if(typeof e!="string")return null;let n=null;for(const r of t)sn(r.pattern).test(e)&&(!n||un(r.pattern,n.pattern))&&(n=r);return n?{...n,params:{...n.props,...cn(n.pattern,e)}}:null}function ea(e,t){return dn(e,t)!==null}const ta="sync-source",na="sync-target",ra=20,ia={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]"]},pn=e=>{let t=e;return Object.values(ia).forEach(n=>{n.forEach(r=>{t=t.replaceAll(r,"")})}),t=t.replace(/\(.*?\)/g,""),t=t.replace(/\[.*?\]/g,""),t},fn=6e4,mn=8e3,gn=2,hn=.4,oa=3,aa=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 En(e){const t=new Set;for(const n of e.toLowerCase().split(/[^a-z0-9À-ɏ]+/))n.length<oa||aa.has(n)||t.add(n);return[...t]}function An(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 Sn(e,t=fn){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=>pn(a.text).trim()).filter(Boolean).join(" ").replace(/\s+/g," ").trim(),segmentCount:n.length}}const _n=60;function sa(e,t,n=_n){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 ca(e){const{segments:t,now:n,state:r}=e;if(r.lastTriggerAt&&n-r.lastTriggerAt<mn)return{trigger:!1,reason:"too_soon"};const i=Sn(t,e.windowMs);if(!i.text)return{trigger:!1,reason:"no_speech"};const o=i.segmentCount-(r.lastSegmentCount??0);if(r.lastQueryTerms&&o<gn)return{trigger:!1,reason:"too_few_new"};const a=En(i.text);return a.length?r.lastQueryTerms?.length&&An(a,r.lastQueryTerms)<hn?{trigger:!1,reason:"same_topic"}:{trigger:!0,text:i.text,terms:a,segmentCount:i.segmentCount}:{trigger:!1,reason:"no_speech"}}const la=["personal","workspace","connections","work","ai"],ua="navNotice",L={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}},yn="NL",da=15,pa=8,fa=Array.from(new Set(Object.values(L).map(e=>e.callingCode))).sort((e,t)=>t.length-e.length);function Te(e){if(e)return L[e.trim().toUpperCase()]}function C(e,t){return e.length>=t.nsnMin&&e.length<=t.nsnMax}function be(e){if(e.length>da)return null;for(const t of fa){if(!e.startsWith(t))continue;const n=e.slice(t.length);for(const r of Object.values(L)){if(r.callingCode!==t)continue;const i=r.trunkPrefix,o=i&&n.startsWith(i)?n.slice(i.length):n;if(C(o,r))return`+${t}${o}`}return null}return e.length<pa?null:`+${e}`}function ma(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 ga(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 q(e,t){if(!e)return null;const n=ma(e);if(!n)return null;const r=n.startsWith("+"),i=n.replace(/\D/g,"");if(!i)return null;if(r)return be(i);if(i.startsWith("00"))return be(i.slice(2));const o=Te(t)??Te(yn);if(!o)return null;const a=o.trunkPrefix;if(a&&i.startsWith(a)){const s=i.slice(a.length);return C(s,o)?`+${o.callingCode}${s}`:null}if(i.startsWith(o.callingCode)){const s=i.slice(o.callingCode.length);if(C(s,o))return`+${o.callingCode}${s}`}return!a&&C(i,o)?`+${o.callingCode}${i}`:null}function ha(e,t=9){const n=(e??"").replace(/\D/g,"");return n.length<t?null:n.slice(-t)}function ue(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 Ea(e){const t=ue(e);return t?t.slice(t.lastIndexOf("@")+1):null}const Aa=new Set(["co.uk","org.uk","gov.uk","ac.uk","com.au","co.nz","com.br","co.za"]);function Tn(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 Aa.has(n)&&t.length>=3?t.slice(-3).join("."):n}const bn=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 Sa(e){const t=Tn(e);return t?bn.has(t):!1}function _a(e){if(!e)return!1;const t=e.trim().toLowerCase();return t==="tel"||t==="sms"||t==="whatsapp"||t==="fax"}function ya(e,t,n){if(!e||!t)return null;const r=e.trim().toLowerCase();if(r==="tel"||r==="sms"||r==="whatsapp"){const o=q(t,n);return o?`tel:${o}`:null}if(r==="fax"){const o=q(t,n);return o?`fax:${o}`:null}if(r==="mailto"||r==="email"){const o=ue(t);return o?`mailto:${o}`:null}const i=t.trim().toLowerCase();return i?`${r}:${i}`:null}const Ta=[/<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],Ie=/^\s*(?:>+\s*)?(?:from|van|sent|verzonden|to|aan|cc|subject|onderwerp|date|datum)\s*:/i,ba=/^\s*(?:on|op)\b.{0,200}?\b(?:wrote|schreef|geschreven)\s*:?\s*$/i;function Ia(e){const t=e.split(`
|
|
10
|
-
`);for(let n=0;n<t.length;n++)if(ba.test(t[n])||
|
|
11
|
-
`).trim();return e}const
|
|
9
|
+
`:t==="mail"?"<br><br>-- <br>":"<br><br>"}${i.body}`:n}function Nr(e){return e.endpoints??[]}const Je=36e5,Ze=864e5,g=-1/0,kr=e=>e.score>g,A={urgent:40,high:25,normal:10,low:0};function vr(e){return Object.fromEntries(e.map(t=>[t.resourceId,t]))}const Lr=/(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|newsletter|nieuwsbrief|mailer|mailing|notifications?|bounce|postmaster|marketing)@/i,Qe=/\b(unsubscribe|afmelden|uitschrijven|opt[\s-]?out|manage (your )?preferences|geen (e-?mails?|nieuwsbrief|berichten) meer)\b/i;function et(e,t){return!!(e&&Lr.test(e)||t&&Qe.test(t))}const tt=3,nt=600;function Dr(e,t){return e>=tt||t>=nt}const rt=["list-unsubscribe","list-unsubscribe-post","list-id","precedence","auto-submitted","x-auto-response-suppress","feedback-id","x-mailer"];function Pr(e){const t={};for(const n of e){const r=n.name?.toLowerCase();r&&n.value!==void 0&&rt.includes(r)&&(t[r]=n.value)}return t}const xr=/(^|[._+-])(no-?reply|noreply|donotreply|do-not-reply|notifications?|bounce|postmaster|mailer)@/i,Ur=/(^|[._+-])(newsletter|nieuwsbrief|marketing|mailing)@/i;function $r(e){const t=e.headers??{},n=e.from?.email,r=t["auto-submitted"]?.toLowerCase();if(r&&r!=="no"||t["x-auto-response-suppress"]||n&&xr.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&&Qe.test(e.body)||n&&Ur.test(n))return"marketing"}function it(e,t){return e.lastActivityAt?!(e.seenBy??[]).includes(t):!1}const ot=["open"],at=1e3,st={urgent:1,high:4,normal:8,low:24},ct=72;function lt(e){return e.lastActivityAt??(e.createdAt?new Date(xe(e)).getTime():0)}function ut(e,t){return dt(t.remindersById?.[e.id],e,t.now)}function dt(e,t,n){return!e||e.remindAt<=n?!1:!((t.lastActivityAt??0)>e.parkedAt&&t.lastActivityPreview?.direction==="inbound")}const pt=e=>ve(e)==="outbound_message",ft=e=>ot.includes(e);function k(e,t){return Math.max(0,(t-lt(e))/Je)}function mt(e,t){const n=e.assignedInboxId?t?.[e.assignedInboxId]:void 0;return typeof n=="number"&&n>0?n:st[e.priority??"normal"]}function Kr(e){const t={};for(const n of e)typeof n.slaHours=="number"&&n.slaHours>0&&(t[n.id]=n.slaHours);return t}function Br(e,t,n){return!ft(e.status)||e.firstResponseAt?!1:k(e,t)>mt(e,n)}function gt(e,t){const n=e.lastActivityPreview;return n?.direction!=="outbound"||!pt(n.type)?!1:k(e,t)<ct}function Gr(e,t){if(!ft(e.status))return{score:g,reasons:[]};if(e.snoozedTill&&e.snoozedTill>t.now)return{score:g,reasons:[]};if(gt(e,t.now))return{score:g,reasons:[]};if(ut(e,t))return{score:g,reasons:[]};let n=0;const r=[],i=e.priority??"normal";A[i]>0&&(n+=A[i],r.push(`priority:${i}`)),it(e,t.userId)&&(n+=20,r.push("unseen")),e.assignedUserId&&e.assignedUserId===t.userId&&(n+=15,r.push("assigned-to-you"));const o=k(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"&&pt(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")||et(e.remoteParty?.resource,e.lastActivityPreview?.snippet))&&(n-=at,r.push("bulk")),{score:n,reasons:r}}const Hr=e=>!!e.assignedUserId||!!e.assignedInboxId,Fr=e=>e.status==="closed",Vr=e=>({urgent:10,high:5,normal:2,low:1})[e.priority]||0,Wr=(e,t=30)=>e.title?.length<=t?e.title:`${e.title.substring(0,t)}...`;function jr(e,t){const n=e.labels??[];return n.find(r=>r.locale===t)?.label??n[0]?.label??e.url}function Xr(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 X=[{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 ht(e){const t=(e??"").toLowerCase();return X.find(n=>n.code===t)??X.find(n=>n.code===t.split("-")[0])}function Yr(e){return ht(e)?.label??e}function zr(e){const t=ht(e);return t?t.english===t.label?`${t.english} (${t.code})`:`${t.english} — ${t.label} (${t.code})`:e}const ne=3;function Et(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>ne+1))return 1/0;i=t.get(i)?.parentId}return r}function qr(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&&At(e,t,r))return!1;const i=Et(e,r),o=t?re(t,n):1;return i+o<=ne}function At(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 re(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=>re(i.id,t,n))):1}const St="en";function _t(e){return e.defaultLocale||e.locale||St}function Jr(e){const t=new Set,n=[];for(const r of[_t(e),...e.locales??[]])!r||t.has(r)||(t.add(r),n.push(r));return n}function Zr(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 Y=["lookup","condition","parallel","for-each"];function z(e){for(const t of e){if(!Y.includes(t.type))return`staptype "${t.type}" mag niet meelezen (alleen ${Y.join(", ")})`;if(t.type==="parallel")for(const n of t.branches??[]){const r=z(n);if(r)return r}if(t.type==="for-each"){const n=z(t.body??[]);if(n)return n}}return null}function Qr(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 ei(e,t){return e.filter(n=>n.enabled&&Qr(n.ownerScope,t))}function ti(e){return e.credentialScope?e.credentialScope:(e.authMode??"header")==="header"||e.oauth?.scope==="org"?"shared":"per-user"}function ni(e){return`mcp__${e}__`}const ri=1e3,ii=2e3,oi=500,ai=12e3,si=4e3,yt=["contact","company","work_item"];function ci(e){if(!e)return!1;const t=e.slice(0,e.indexOf(":"));return yt.includes(t)}const li="onboarding-source",ui=["support","billing","availability","sales","onboarding"],di=["keep","replace"];function Tt(e){switch(e.kind){case"user":return`user:${e.userId}`;case"team":return`team:${e.teamId}`;case"org":return"org"}}function pi(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 It(e){return Tt(e)}function bt(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 Mt=bt;function fi(e){return e.agentId?{kind:"user",userId:e.agentId}:Mt(e.ownerScope)}function mi(e){return It(e)}function gi(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 hi(e,t){return e.targets.find(n=>n.activityTypes.includes(t))}function Ei(e,t){if(t)return e.targets.find(n=>n.id===t)}function Ot(e){return e?.kind==="assignment"}function Ai(e){const{trigger:t,agentId:n,target:r,activityType:i,assigneeUserId:o,authorUserId:a}=e;return Ot(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 Si(e){return(e.startsWith("tool:")?e.slice(5):e).replace(/__/g," · ").replace(/\./g," · ").replace(/_/g," ")}const _i=[{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:"assigneeUserId",type:"string"}],yi={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 Rt(e){return`${e.type}:${e.id}`}const Ct="interaction";function wt(e){return e?.type===Ct?e.id:void 0}const Nt=64,kt=8e3;function Ti(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),Nt),kt)}const Ii={kind:"workflow",steps:[]};function bi(e){return e?.kind==="workflow"?e.steps:[]}function Mi(e){return e?.kind==="procedure"?e.procedure:void 0}function vt(e){const t=e?.approved??0,n=t+(e?.rejected??0);return{total:n,rate:n?t/n:0}}const Lt=10,Dt=.9;function Oi(e){const{total:t,rate:n}=vt(e);return t>=Lt&&n>=Dt}const Pt=["done","escalated","failed","stopped"];function Ri(e){return Pt.includes(e)}function xt(e){return e==="waiting"}function Ci(e){return e==="running"||xt(e)}function ie(e){return e.subjectKind&&e.subjectId?{type:e.subjectKind,id:e.subjectId}:void 0}function wi(e){const t=ie(e);return t?Rt(t):void 0}function Ni(e){return wt(ie(e))}function ki(e,t){const n=e.accumulatedSeconds||0;return e.runningSince?n+Math.max(0,Math.floor((t-e.runningSince)/1e3)):n}function vi(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 Li(e){const t=Math.max(0,Math.round(e/60));return`${Math.floor(t/60)}:${String(t%60).padStart(2,"0")}`}function Di(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 Ut(e){return(e||"").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").slice(0,48).replace(/^-+|-+$/g,"")}function Pi(e,t){const n=Ut(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 xi(e,t){const n=e.ownerScope;return!n||n.kind==="org"?!0:t.includes(n.teamId)}function Ui(e){return e.filter(t=>!t.archived).sort($t)}function $t(e,t){const n=(e.order??0)-(t.order??0);return n!==0?n:(e.label||"").localeCompare(t.label||"")}const Kt=20,Bt=20,R=300;function h(e){return e.toLowerCase().replace(/[^\p{L}\p{N}\s]/gu," ").replace(/\s+/g," ").trim()}function Gt(e){const t=e.replace(/\s+/g," ").trim();if(t.length<=R)return t;const n=t.slice(0,R),r=Math.max(n.lastIndexOf(". "),n.lastIndexOf("! "),n.lastIndexOf("? "));return r>R*.6?n.slice(0,r+1):`${n.trimEnd()}…`}function $i(e,t){const n=Gt(t.text),r=h(n);if(!r||(e.examples??[]).some(a=>h(a)===r))return null;const i=e.exampleCandidates??[],o=i.findIndex(a=>h(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},_e(a)}return _e([{...t,text:n},...i]).slice(0,Bt)}function _e(e){return[...e].sort((t,n)=>Number(n.corrected)-Number(t.corrected)||n.addedAt-t.addedAt)}function Ki(e,t){const n=h(t),r=(e.examples??[]).filter(o=>o.trim());return{examples:r.some(o=>h(o)===n)?r:[...r,t].slice(-Kt),exampleCandidates:Ht(e,t)}}function Ht(e,t){const n=h(t);return(e.exampleCandidates??[]).filter(r=>h(r.text)!==n)}function Ft(e,t){const n=e.ownerScope;return n?n.kind==="org"?!0:n.kind==="team"?!!t&&n.teamId===t:!1:!1}function Bi(e,t){return e.filter(n=>Ft(n,t))}function Gi(e){return e.type==="agent"}const Hi="WORK_COMMENT_ADDED",Fi="WORK_ITEM_ASSIGNED",Vi="WORK_ITEM_STATUS_CHANGED";function Wi(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))/Ze)}function ji(e,t){if(e.closedAt!=null)return{score:g,reasons:[]};const n=t.remindersById?.[e.id];if(n&&n.remindAt>t.now)return{score:g,reasons:[]};let r=0;const i=[],o=e.priority??"normal";if(A[o]>0&&(r+=A[o],i.push(`priority:${o}`)),typeof e.dueDate=="number"){const a=Wi(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 Vt="work_item",Wt="work_project";function jt(e){return`${Vt}:${e}`}function oe(e){return`${Wt}:${e}`}function Xi(e,t,n){const r=`${e}-${t}`;return n?`${r}-${n}`:r}function Yi(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 zi(e){return(e||"").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toUpperCase().replace(/[^A-Z0-9]/g,"").slice(0,3)||"PRJ"}function qi(e,t=25){const n=new Set([jt(e.id)]);e.projectId&&n.add(oe(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 Ji(e){return[oe(e.id)]}const v=[{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}],ae=v.map(e=>e.key);function Xt(e){return e?.statuses?.length?e.statuses:v}function Yt(e,t){return t.find(n=>n.key===e)?.category??"todo"}function Zi(e,t){return t.find(n=>n.key===e)}function Qi(e){const t=Xt(e),n=e?.defaultStatusKey;return n&&t.some(r=>r.key===n)?n:zt(t)[0]?.key??v[0].key}function zt(e){return[...e].sort((t,n)=>{const r=(t.order??0)-(n.order??0);return r!==0?r:(t.label||"").localeCompare(n.label||"")})}function eo(e,t){return Yt(e,t)==="done"}function qt(e){return(e||"").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").slice(0,48).replace(/^-+|-+$/g,"")}function to(e,t){const n=qt(e)||"status",r=new Set([...t,...ae]);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 no(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}ae.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}const ro=new Set(["image/png","image/jpeg","image/jpg","image/gif","image/webp"]),io=new Set(["text/plain","text/markdown","text/csv","application/json","text/html","application/xml","text/xml"]);function Jt(e){const t=(e??"").trim().toLowerCase().split(";")[0];return t?ro.has(t)?"image":t==="application/pdf"?"pdf":io.has(t)?"text":t.startsWith("audio/")?"audio":"unsupported":"unsupported"}const E=1024*1024,Zt={image:5*E,pdf:20*E,text:1*E,audio:20*E},oo=25*E,ao=5;function so(e,t){const n=Jt(e);return n==="unsupported"?"unsupported":t>Zt[n]?"too-large":null}function co(e){return e.access!=="read"&&e.effect!=="internal"}function Qt(e){return`${e.kind}:${e.id||e.url||e.title}`}function lo(e,t=[]){const n=new Set(t),r=[],i=[];for(const o of e){const a=Qt(o);n.has(a)||(n.add(a),r.push(o),i.push(a))}return{sources:r,keys:i}}const uo="assist-source",po=["blocking","due","open"];function fo(e,t){const[n,r]=(e.subjectKey??"").split(":");return n===t&&r?r:void 0}const ye={blocking:0,due:1,open:2};function mo(e,t){return ye[e.band??"open"]-ye[t.band??"open"]||(t.priority??0)-(e.priority??0)||e.id.localeCompare(t.id)}function go(e){return e.sessions.filter(t=>t.id!==e.exceptSessionId&&t.state==="connected"&&e.canHold(t.providerId))}function ho(e){return e.sessions.filter(t=>t.id!==e.exceptSessionId&&t.state==="connected"&&!e.canHold(t.providerId))}function Eo(e){return e.sessions.some(n=>n.id!==e.exceptSessionId&&(n.state==="connected"||n.state==="on_hold"))?{admit:!1,reason:"busy"}:{admit:!0}}function en(e,t){const n=new Set(e.disabledIntents??[]),r=e.intentOverrides??{},i=t.intents.filter(a=>!n.has(a.intent)).map(a=>So(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 tn(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 Ao(e,t){const n=tn(e,t);return Object.entries(n).filter(([,r])=>!r).map(([r])=>r)}function So(e,t){return t?{intent:t.intent??e.intent,targetSchemes:t.targetSchemes??e.targetSchemes,transport:t.transport??e.transport}:e}function _o(e,t){const n=[];for(const r of e){if(!r.enabled)continue;const i=t[r.providerId];if(i)for(const o of en(r,i))n.push({channel:r,description:i,capability:o})}return n}function yo(e,t){return t.filter(n=>n.capability.intent===e)}function nn(e,t){return t.filter(n=>n.capability.targetSchemes.includes(e))}function To(e,t){return nn(e.scheme,t)}function Io(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 rn=(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))(rn||{});const bo={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 Mo(e){return e?bo[e]??"note":"note"}const Oo="message_window",Ro="message_templates",Co={FROM:"from",TO:"to",CC:"cc",BCC:"bcc",ORGANIZER:"organizer",PRESENTER:"presenter",ATTENDEE:"attendee",OWNER:"owner",MEMBER:"member",GUEST:"guest",HOST:"host",PARTICIPANT:"participant"},wo=(e,t)=>({intent:e,...t}),No="folder_management",ko="remote_search",vo={ok:!1,code:"UNSUPPORTED",message:"Provider does not support this op"},Lo="context.collect",Do="installation-id";function Po(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 xo="notification-source",Uo=(e,t)=>`${e}.pref.${t}`,$o={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","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"]},se=9e4,on=["out_of_office"],an=e=>on.includes(e);function Ko(e,t,n){const r=n-e<se,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&&!an(o)?{online:!1,status:"offline"}:{online:r,status:o,message:i.message}}function Bo(e,t){const n=t-e.lastSeenAt<se,r=n||an(e.status)?e.status:"offline";return n===e.online&&r===e.status?e:{...e,online:n,status:r}}function Go(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 Ho(e){return e.providerAvailable&&e.allowed}const Fo="resources.describe",Vo="resources.search",Wo="resources.resolve",jo="resources.attached";function Xo(e){const t=e.indexOf(":");return t===-1?e:e.slice(0,t)}const Yo="/provider/scope/related",zo="/provider/scope/read",ce="auth";function le(e){const t=typeof e=="string"?e.match(/apps\/([^/?#]+)/):null;return t?t[1]:null}function qo(e){const t=le(e);return t?t!==ce:typeof e=="string"&&e.startsWith("/wake")}function Jo(e){return typeof e!="string"||e===""||e==="/"?!0:le(e)===ce}function Zo(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function sn(e){const n=e.split("/").filter(Boolean).map(r=>r.startsWith(":")?r.endsWith("?")?"(?:/[^/]+)?":"/[^/]+":`/${Zo(r)}`).join("");return new RegExp(`^${n}\\/?$`)}function cn(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 ln(e){return e.publicBasePath??`/apps/${e.name}`}function Qo(e){const t=[];for(const n of e){if(!n?.name)continue;const r=ln(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 un(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 dn(e,t){if(typeof e!="string")return null;let n=null;for(const r of t)sn(r.pattern).test(e)&&(!n||un(r.pattern,n.pattern))&&(n=r);return n?{...n,params:{...n.props,...cn(n.pattern,e)}}:null}function ea(e,t){return dn(e,t)!==null}const ta=10*1024*1024,na="sync-source",ra="sync-target",ia=20,oa={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]"]},pn=e=>{let t=e;return Object.values(oa).forEach(n=>{n.forEach(r=>{t=t.replaceAll(r,"")})}),t=t.replace(/\(.*?\)/g,""),t=t.replace(/\[.*?\]/g,""),t},fn=6e4,mn=8e3,gn=2,hn=.4,aa=3,sa=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 En(e){const t=new Set;for(const n of e.toLowerCase().split(/[^a-z0-9À-ɏ]+/))n.length<aa||sa.has(n)||t.add(n);return[...t]}function An(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 Sn(e,t=fn){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=>pn(a.text).trim()).filter(Boolean).join(" ").replace(/\s+/g," ").trim(),segmentCount:n.length}}const _n=60;function ca(e,t,n=_n){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 la(e){const{segments:t,now:n,state:r}=e;if(r.lastTriggerAt&&n-r.lastTriggerAt<mn)return{trigger:!1,reason:"too_soon"};const i=Sn(t,e.windowMs);if(!i.text)return{trigger:!1,reason:"no_speech"};const o=i.segmentCount-(r.lastSegmentCount??0);if(r.lastQueryTerms&&o<gn)return{trigger:!1,reason:"too_few_new"};const a=En(i.text);return a.length?r.lastQueryTerms?.length&&An(a,r.lastQueryTerms)<hn?{trigger:!1,reason:"same_topic"}:{trigger:!0,text:i.text,terms:a,segmentCount:i.segmentCount}:{trigger:!1,reason:"no_speech"}}const ua=["personal","workspace","connections","work","ai"],da="navNotice",L={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}},yn="NL",pa=15,fa=8,ma=Array.from(new Set(Object.values(L).map(e=>e.callingCode))).sort((e,t)=>t.length-e.length);function Te(e){if(e)return L[e.trim().toUpperCase()]}function C(e,t){return e.length>=t.nsnMin&&e.length<=t.nsnMax}function Ie(e){if(e.length>pa)return null;for(const t of ma){if(!e.startsWith(t))continue;const n=e.slice(t.length);for(const r of Object.values(L)){if(r.callingCode!==t)continue;const i=r.trunkPrefix,o=i&&n.startsWith(i)?n.slice(i.length):n;if(C(o,r))return`+${t}${o}`}return null}return e.length<fa?null:`+${e}`}function ga(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 ha(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 q(e,t){if(!e)return null;const n=ga(e);if(!n)return null;const r=n.startsWith("+"),i=n.replace(/\D/g,"");if(!i)return null;if(r)return Ie(i);if(i.startsWith("00"))return Ie(i.slice(2));const o=Te(t)??Te(yn);if(!o)return null;const a=o.trunkPrefix;if(a&&i.startsWith(a)){const s=i.slice(a.length);return C(s,o)?`+${o.callingCode}${s}`:null}if(i.startsWith(o.callingCode)){const s=i.slice(o.callingCode.length);if(C(s,o))return`+${o.callingCode}${s}`}return!a&&C(i,o)?`+${o.callingCode}${i}`:null}function Ea(e,t=9){const n=(e??"").replace(/\D/g,"");return n.length<t?null:n.slice(-t)}function ue(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 Aa(e){const t=ue(e);return t?t.slice(t.lastIndexOf("@")+1):null}const Sa=new Set(["co.uk","org.uk","gov.uk","ac.uk","com.au","co.nz","com.br","co.za"]);function Tn(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 Sa.has(n)&&t.length>=3?t.slice(-3).join("."):n}const In=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 _a(e){const t=Tn(e);return t?In.has(t):!1}function ya(e){if(!e)return!1;const t=e.trim().toLowerCase();return t==="tel"||t==="sms"||t==="whatsapp"||t==="fax"}function Ta(e,t,n){if(!e||!t)return null;const r=e.trim().toLowerCase();if(r==="tel"||r==="sms"||r==="whatsapp"){const o=q(t,n);return o?`tel:${o}`:null}if(r==="fax"){const o=q(t,n);return o?`fax:${o}`:null}if(r==="mailto"||r==="email"){const o=ue(t);return o?`mailto:${o}`:null}const i=t.trim().toLowerCase();return i?`${r}:${i}`:null}const Ia=[/<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],be=/^\s*(?:>+\s*)?(?:from|van|sent|verzonden|to|aan|cc|subject|onderwerp|date|datum)\s*:/i,ba=/^\s*(?:on|op)\b.{0,200}?\b(?:wrote|schreef|geschreven)\s*:?\s*$/i;function Ma(e){const t=e.split(`
|
|
10
|
+
`);for(let n=0;n<t.length;n++)if(ba.test(t[n])||be.test(t[n])&&t.slice(n+1,n+4).some(r=>be.test(r)))return t.slice(0,n).join(`
|
|
11
|
+
`).trim();return e}const Oa=/^(?:https?:|mailto:|tel:)/i,Ra=/^(?:https?:|cid:|data:image\/)/i;function $(e,t){const n=e.match(new RegExp(`\\b${t}\\s*=\\s*(?:"([^"]*)"|'([^']*)'|([^\\s">]+))`,"i"));return(n?.[1]??n?.[2]??n?.[3]??"").trim()}const Ca=/(!\[[^\]]*\]\([^)]*\))/;function Me(e){return e.replace(/\s+/g," ").trim().split(Ca).map((t,n)=>n%2===1?t:t.replace(/[[\]]/g,"\\$&")).join("")}function K(e){return e.replace(/[()\s<>"]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0")}`)}function wa(e){return e.replace(/<img\b([^>]*?)\/?>/gi,(n,r)=>{const i=$(r,"src");return Ra.test(i)?`})`:""}).replace(/<a\b([^>]*)>([\s\S]*?)<\/a\s*>/gi,(n,r,i)=>{const o=Me(i.replace(/<[^>]*>/g,"")),a=$(r,"href");return Oa.test(a)?`[${o||K(a)}](${K(a)})`:o})}const Na=/<table\b[^>]*>((?:(?!<table\b)[\s\S])*?)<\/table\s*>/i,ka=/<tr\b[^>]*>([\s\S]*?)<\/tr\s*>/gi,va=/<(t[dh])\b([^>]*)>([\s\S]*?)<\/\1\s*>/gi;function La(e,t){return/<table\b/i.test(e)||e.includes(`
|
|
12
12
|
|
|
13
|
-
|`)||t.includes("![")||t.length>200}const
|
|
13
|
+
|`)||t.includes("![")||t.length>200}const Da=40,Pa={left:"---",center:":---:",right:"---:"};function xa(e){const t=e.match(/align\s*[=:]\s*["']?\s*(right|center)/i);return t?t[1].toLowerCase():"left"}function Ua(e){return e.replace(/<[^>]*>/g,"").replace(/\s+/g," ").trim().replace(/\|/g,"\\|")}function $a(e){const t=[];for(const a of e.matchAll(ka)){const s=[];for(const c of a[1].matchAll(va)){const l=Ua(c[3]);if(La(c[3],l))return null;s.push({text:l,align:xa(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=>Pa[a.align]).join(" | "),o=t.slice(1).map(r).join(`
|
|
14
14
|
`);return`
|
|
15
15
|
|
|
16
16
|
${r(t[0])}
|
|
17
17
|
| ${i} |
|
|
18
18
|
${o}
|
|
19
19
|
|
|
20
|
-
`}function
|
|
21
|
-
`).replace(/<(?:tbody|thead|tfoot|caption|colgroup|col|tr|t[dh])\b[^>]*>/gi,"").replace(/<\/(?:tbody|thead|tfoot|caption|colgroup)\s*>/gi,"")}function
|
|
20
|
+
`}function Ka(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 Ba(e){let t=e;for(let n=0;n<Da;n++){const r=Na.exec(t);if(!r||r.index===void 0)break;const o=$a(r[1])??`
|
|
22
22
|
|
|
23
|
-
${
|
|
23
|
+
${Ka(r[1])}
|
|
24
24
|
|
|
25
25
|
`;t=t.slice(0,r.index)+o+t.slice(r.index+r[0].length)}return t}function Oe(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=
|
|
26
|
+
`),t&&(n=Ba(wa(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 Re(e){return!Number.isInteger(e)||e<0||e>1114111?null:String.fromCodePoint(e)}const
|
|
29
|
+
`),n=n.replace(/<\/(td|th)>/gi," "),n=n.replace(/<[^>]+>/g,""),n=n.replace(/<[^>]*$/,""),n}function Re(e){return!Number.isInteger(e)||e<0||e>1114111?null:String.fromCodePoint(e)}const Ga={euro:"€",pound:"£",yen:"¥",cent:"¢",copy:"©",reg:"®",trade:"™",deg:"°",plusmn:"±",times:"×",middot:"·",bull:"•",hellip:"…",mdash:"—",ndash:"–",lsquo:"‘",rsquo:"’",ldquo:"“",rdquo:"”",apos:"'"};function Ce(e){return e.replace(/ /gi," ").replace(/&([a-z]+);/gi,(t,n)=>Ga[n.toLowerCase()]??t).replace(/</gi,"<").replace(/>/gi,">").replace(/"/gi,'"').replace(/&#(\d+);/g,(t,n)=>Re(Number(n))??t).replace(/&#x([0-9a-f]+);/gi,(t,n)=>Re(parseInt(n,16))??t).replace(/&/gi,"&")}function we(e){return e.replace(/\r/g,"").replace(/[ \t]+/g," ").replace(/ *\n */g,`
|
|
30
30
|
`).replace(/\n{3,}/g,`
|
|
31
31
|
|
|
32
|
-
`).trim()}const
|
|
32
|
+
`).trim()}const bn=/<\s*(html|body|div|p|table|br|span)\b/i;function Ha(e){return bn.test(e)}function Fa(e){return Mn(e,!1)}function Va(e){return Mn(e,!0)}function Mn(e,t){if(typeof e!="string"||!e)return"";let n=e.length;for(const a of Ia){const s=e.search(a);s>=0&&s<n&&(n=s)}const r=e.slice(0,n);let i=we(Ce(Oe(r,t)));return i||(i=we(Ce(Oe(e,t)))),Ma(i)||i}exports.ACTIVE_ASSIGNMENT_STATUSES=Tr;exports.ACTIVITY_CATALOG=m;exports.AI_ATTACHMENT_LIMITS=Zt;exports.AI_ATTACHMENT_MAX_PER_TURN=ao;exports.AI_ATTACHMENT_TURN_BUDGET=oo;exports.AI_VENDORS=Z;exports.ALLOWED_LINK_SCHEMES=Ve;exports.APP_PERMISSIONS=$o;exports.ARTIFACT_MAX_BLOCKS=H;exports.ARTIFACT_MAX_BODY_BYTES=sr;exports.ARTIFACT_MAX_CELL_LEN=O;exports.ARTIFACT_MAX_KPI_ITEMS=j;exports.ARTIFACT_MAX_LIST_ITEMS=F;exports.ARTIFACT_MAX_TABLE_COLUMNS=W;exports.ARTIFACT_MAX_TABLE_ROWS=V;exports.ARTIFACT_MAX_TEXT_LEN=Q;exports.ASSIGNMENT_SCOPE_KIND=Ye;exports.ASSIST_BANDS=po;exports.ASSIST_SOURCE_PROVIDER_GROUP=uo;exports.ATTENTION_STATUSES=ot;exports.AUTH_APP_NAME=ce;exports.AUTO_READY_MIN_PROPOSALS=Lt;exports.AUTO_READY_RATE=Dt;exports.ActivityTypeRegistry=Pe;exports.BUILT_IN_ONLY=Vn;exports.BULK_PENALTY=at;exports.CADENCE_FLOOR_MS=mn;exports.CADENCE_MIN_NEW_SEGMENTS=gn;exports.CADENCE_MIN_NOVELTY=hn;exports.CADENCE_WINDOW_MS=fn;exports.CLASSIFY_VARS=yi;exports.CONTEXT_COLLECT_SERVICE=Lo;exports.CORE_DIMENSIONS=nr;exports.CommunicationScheme=rn;exports.DAY_MS=Ze;exports.DEFAULT_MEMORY_BUDGET=si;exports.DEFAULT_PHONE_REGION=yn;exports.EMPTY_WORKFLOW=Ii;exports.FEATURE_FOLDER_MANAGEMENT=No;exports.FEATURE_REMOTE_SEARCH=ko;exports.FOLLOW_UP_HOURS=ct;exports.HOUR_MS=Je;exports.HTML_BODY_RE=bn;exports.INELIGIBLE=g;exports.INSTALLATION_HEADER=Do;exports.INTERACTION_KIND=Ct;exports.InteractionParticipantRole=Co;exports.KB_FALLBACK_LOCALE=St;exports.KB_LOCALES=X;exports.LOOSE_STATUSES=v;exports.MAIL_HINT_HEADERS=rt;exports.MAX_ACTIONS=M;exports.MAX_ASSIGNMENT_TURNS=ze;exports.MAX_BLOCKS=B;exports.MAX_COLLECTION_DEPTH=ne;exports.MAX_EDITABLE_FILE_BYTES=ta;exports.MAX_FIELDS=I;exports.MAX_LIST_ITEMS=b;exports.MAX_MEMORY_BROWSE=ri;exports.MAX_MEMORY_BUDGET=ai;exports.MAX_MEMORY_CHARS=ii;exports.MAX_SHOWN_KEYS=_n;exports.MAX_TOPIC_CANDIDATES=Bt;exports.MAX_TOPIC_EXAMPLES=Kt;exports.MAX_TOPIC_EXAMPLE_CHARS=R;exports.MIN_MEMORY_BUDGET=oi;exports.NAV_NOTICE_SLOT=da;exports.NOTIFICATION_SOURCE_PROVIDER_GROUP=xo;exports.ONBOARDING_SOURCE_PROVIDER_GROUP=li;exports.PHONE_REGIONS=L;exports.PRESENCE_ONLINE_WINDOW_MS=se;exports.PRESENCE_SURVIVES_OFFLINE=on;exports.PROFILE_TOOL_DISPOSITIONS=di;exports.PROVIDER_FEATURE_MESSAGE_TEMPLATES=Ro;exports.PROVIDER_FEATURE_MESSAGE_WINDOW=Oo;exports.PUBLIC_EMAIL_DOMAINS=In;exports.READ_STEP_TYPES=Y;exports.RELATED_SUBJECT_KINDS=yt;exports.RESERVED_STATUS_KEYS=ae;exports.RESOURCE_ATTACHED_SERVICE=jo;exports.RESOURCE_DESCRIBE_SERVICE=Fo;exports.RESOURCE_RESOLVE_SERVICE=Wo;exports.RESOURCE_SEARCH_SERVICE=Vo;exports.SCOPE_READ_ROUTE=zo;exports.SCOPE_RELATED_ROUTE=Yo;exports.SETTINGS_CATEGORIES=ua;exports.SIGNATURE_INTENTS=Cr;exports.SLA_HOURS_BY_PRIORITY=st;exports.STEP_MAX_TOKENS_MAX=kt;exports.STEP_MAX_TOKENS_MIN=Nt;exports.SUMMARY_MIN_LAST_CHARS=nt;exports.SUMMARY_MIN_MESSAGES=tt;exports.SYNC_RUN_MAX_ERRORS=ia;exports.SYNC_SOURCE_PROVIDER_GROUP=na;exports.SYNC_TARGET_PROVIDER_GROUP=ra;exports.TERMINAL_ASSIGNMENT_STATUSES=Xe;exports.TERMINAL_RUN_STATUSES=Pt;exports.TRIGGER_VARS=_i;exports.UNSUPPORTED=vo;exports.USAGE_DIMENSIONS=Be;exports.USAGE_DIMENSION_IDS=Ge;exports.WORK_AREAS=ui;exports.WORK_COMMENT_ADDED=Hi;exports.WORK_ITEM_ASSIGNED=Fi;exports.WORK_ITEM_SCOPE_KIND=Vt;exports.WORK_ITEM_STATUS_CHANGED=Vi;exports.WORK_PROJECT_SCOPE_KIND=Wt;exports.W_PRIORITY=A;exports.acceptExampleCandidate=Ki;exports.actingIdentityKey=It;exports.activeWorkTypes=Ui;exports.activityIconOf=kn;exports.activityJoinUrl=Bn;exports.activitySnippet=Le;exports.activityTextParams=De;exports.activityTimelineText=Kn;exports.activityTimestamp=xe;exports.activityTypeInfo=u;exports.actorKey=mi;exports.addExampleCandidate=$i;exports.agePresenceEntry=Bo;exports.aiAttachmentKind=Jt;exports.aiAttachmentRejection=so;exports.aiBudgetLimit=G;exports.aiBudgetPeriodKey=er;exports.aiBudgetPeriodStart=Ue;exports.aiBudgetState=Qn;exports.aiVendorAcceptsAttachment=Zn;exports.aiVendorDefaultModel=zn;exports.aiVendorLabel=Yn;exports.aiVendorNeedsBaseUrl=Jn;exports.aiVendorsWith=qn;exports.appNameFromPath=le;exports.applyRounding=vi;exports.applySignature=wr;exports.approvalRate=vt;exports.artifactBodyBytes=gr;exports.artifactOutline=hr;exports.artifactToMarkdown=Ar;exports.assignmentMismatch=Ai;exports.assignmentScopeKey=br;exports.assignmentSubject=Or;exports.buildActivityPreview=Hn;exports.buildChannelIntents=_o;exports.buildShareKeys=Sr;exports.buildWindow=Sn;exports.canNestUnder=qr;exports.carriesText=Pn;exports.categoryLabel=Zr;exports.categoryOf=Yt;exports.channelKindForScheme=Mo;exports.channelKindOf=vn;exports.clampStepMaxTokens=Ti;exports.classifyMail=$r;exports.cleanMessageMarkdown=Va;exports.cleanMessageText=Fa;exports.compareAssistRank=mo;exports.compareWorkTypes=$t;exports.decideAssignmentState=Rr;exports.decideCadence=la;exports.decideIncomingCall=Eo;exports.defaultLocaleOf=_t;exports.defaultStatusKey=Qi;exports.defineIntent=wo;exports.depthOf=Et;exports.derivePresence=Ko;exports.disabledIntentsFromCapabilities=Ao;exports.elapsedSeconds=ki;exports.emailDomain=Aa;exports.endpointKey=Ta;exports.extractParams=cn;exports.extractTerms=En;exports.filterByEndpoint=To;exports.filterByIntent=yo;exports.filterByTargetScheme=nn;exports.findAiVendor=S;exports.flattenLocales=Po;exports.floorToPeriod=Ke;exports.formatActingIdentity=Tt;exports.formatClock=Di;exports.formatHm=Li;exports.formatItemKey=Xi;exports.formatPeriod=$e;exports.freshSources=lo;exports.getActivitySeenUserIds=Wn;exports.getContactEndpoints=Nr;exports.getShortTitle=Wr;exports.getUrgencyScore=Vr;exports.heightOf=re;exports.helpCenterText=Xr;exports.humanizeAction=Si;exports.interactionIdOf=wt;exports.isAgentUser=Gi;exports.isAssigned=Hr;exports.isAssignmentTerminal=Ir;exports.isAssignmentTrigger=Ot;exports.isAutoReady=Oi;exports.isAwaitingThem=gt;exports.isChatMessageActivity=Xn;exports.isClosed=Fr;exports.isConnectedType=Un;exports.isDeepLink=qo;exports.isDescendant=At;exports.isEligible=kr;exports.isEmailActivity=jn;exports.isHtmlBody=Ha;exports.isInFlight=Ci;exports.isInteractionUnseen=it;exports.isLandingPath=Jo;exports.isLikelyBulk=et;exports.isMessageShape=J;exports.isMessageType=Ln;exports.isMoreSpecificPattern=un;exports.isOutwardTool=co;exports.isParked=ut;exports.isPaused=xt;exports.isPlaybookAuthoredType=xn;exports.isPublicEmailDomain=_a;exports.isPublicPath=ea;exports.isReminderActive=dt;exports.isReplyableType=Dn;exports.isSlaAtRisk=Br;exports.isTerminal=Ri;exports.isThreadLongEnough=Dr;exports.isTranscriptType=$n;exports.isWorkClosed=eo;exports.isWorkTypeVisible=xi;exports.itemDossierKeys=qi;exports.ladderFor=Xt;exports.linkLabel=jr;exports.listeningAllowed=tr;exports.localeInstruction=zr;exports.localeName=Yr;exports.localesOf=Jr;exports.looksLikeEmail=ha;exports.matchContactToIntents=Io;exports.matchPublicRoute=dn;exports.mcpCredentialScope=ti;exports.mcpToolPrefix=ni;exports.mergeShownKeys=ca;exports.messageCountsAs=ve;exports.needsPhoneRegion=ya;exports.normalizeArtifactBlocks=mr;exports.normalizeBlocks=Cn;exports.normalizeEmail=ue;exports.normalizeExample=h;exports.notificationPrefKey=Uo;exports.novelty=An;exports.parkMarksById=vr;exports.parseActingIdentity=pi;exports.parseItemKey=Yi;exports.pathToRegex=sn;exports.periodsInRange=or;exports.phoneSuffix=Ea;exports.pickMailHeaders=Pr;exports.plainTextFromMarkdown=Ne;exports.playbookActor=Mt;exports.procedureOf=Mi;exports.projectDossierKeys=Ji;exports.publicBasePathFor=ln;exports.publicRoutePatterns=Qo;exports.readPath=w;exports.readStepError=z;exports.recencyOf=lt;exports.refKey=Rt;exports.registrableDomain=Tn;exports.rejectExampleCandidate=Ht;exports.relatedByDefault=ci;exports.resolveAccountCapabilities=tn;exports.resolveActivityText=N;exports.resolveChannelIntents=en;exports.resolveSignature=qe;exports.resolveWorkMode=Go;exports.resourceKindOf=Xo;exports.runActor=fi;exports.runInteractionId=Ni;exports.sanitizeInline=je;exports.sanitizeTranscript=pn;exports.scoreInteraction=Gr;exports.scoreWorkItem=ji;exports.selectLenses=ei;exports.sessionsHoldCannotReach=ho;exports.sessionsToHold=go;exports.shareKeyForTeam=te;exports.shareKeyForUser=ee;exports.shareKeysForViewer=_r;exports.shouldRunAudioPipeline=Ho;exports.slaHoursByInbox=Kr;exports.slaHoursFor=mt;exports.sortStatuses=zt;exports.sourceKey=Qt;exports.statusIn=Zi;exports.stepsOf=bi;exports.stripHtml=ke;exports.subjectKeyOf=wi;exports.subjectOf=ie;exports.subjectRef=fo;exports.suggestProjectKey=zi;exports.targetById=Ei;exports.targetForActivityType=hi;exports.toActingIdentity=bt;exports.toE164=q;exports.toolSourceKinds=yr;exports.topicOfferedForTeam=Ft;exports.topicsForTeam=Bi;exports.truncateExample=Gt;exports.uniqueWorkStatusKey=to;exports.uniqueWorkTypeKey=Pi;exports.usageMetricId=He;exports.usageMetrics=ar;exports.validateStatuses=no;exports.valueAtPath=gi;exports.waitHoursOf=k;exports.wakesAssignment=Mr;exports.workItemScopeKey=jt;exports.workProjectScopeKey=oe;exports.workStatusKey=qt;exports.workTypeKey=Ut;
|
package/dist/index.js
CHANGED
|
@@ -2181,7 +2181,7 @@ function $n(e, t) {
|
|
|
2181
2181
|
function ka(e, t) {
|
|
2182
2182
|
return $n(e, t) !== null;
|
|
2183
2183
|
}
|
|
2184
|
-
const Ca = "sync-source",
|
|
2184
|
+
const Ca = 10 * 1024 * 1024, Oa = "sync-source", Na = "sync-target", va = 20, xn = {
|
|
2185
2185
|
afrikaans: [
|
|
2186
2186
|
"[Muziek]",
|
|
2187
2187
|
"(C) TV GELDERLAND 2021",
|
|
@@ -2472,13 +2472,13 @@ function Fn(e, t = Dn) {
|
|
|
2472
2472
|
return { text: n.filter((a) => (a.endedAt ?? 0) >= i).map((a) => Ln(a.text).trim()).filter(Boolean).join(" ").replace(/\s+/g, " ").trim(), segmentCount: n.length };
|
|
2473
2473
|
}
|
|
2474
2474
|
const Vn = 60;
|
|
2475
|
-
function
|
|
2475
|
+
function Ra(e, t, n = Vn) {
|
|
2476
2476
|
const r = new Set(e), i = [...e];
|
|
2477
2477
|
for (const o of t)
|
|
2478
2478
|
!o || r.has(o) || (r.add(o), i.push(o));
|
|
2479
2479
|
return i.slice(-n);
|
|
2480
2480
|
}
|
|
2481
|
-
function
|
|
2481
|
+
function $a(e) {
|
|
2482
2482
|
const { segments: t, now: n, state: r } = e;
|
|
2483
2483
|
if (r.lastTriggerAt && n - r.lastTriggerAt < Pn)
|
|
2484
2484
|
return { trigger: !1, reason: "too_soon" };
|
|
@@ -2490,13 +2490,13 @@ function Ra(e) {
|
|
|
2490
2490
|
const a = Bn(i.text);
|
|
2491
2491
|
return a.length ? r.lastQueryTerms?.length && Hn(a, r.lastQueryTerms) < Kn ? { trigger: !1, reason: "same_topic" } : { trigger: !0, text: i.text, terms: a, segmentCount: i.segmentCount } : { trigger: !1, reason: "no_speech" };
|
|
2492
2492
|
}
|
|
2493
|
-
const
|
|
2493
|
+
const xa = [
|
|
2494
2494
|
"personal",
|
|
2495
2495
|
"workspace",
|
|
2496
2496
|
"connections",
|
|
2497
2497
|
"work",
|
|
2498
2498
|
"ai"
|
|
2499
|
-
],
|
|
2499
|
+
], La = "navNotice", D = {
|
|
2500
2500
|
// The lower bounds are deliberately generous: service ranges (0800/0900) are
|
|
2501
2501
|
// shorter than geographic numbers, and a too-strict minimum silently drops them.
|
|
2502
2502
|
// An over-permissive key is harmless — it simply matches nothing.
|
|
@@ -2550,7 +2550,7 @@ function qn(e) {
|
|
|
2550
2550
|
const r = t.indexOf("@");
|
|
2551
2551
|
return r >= 0 && (t = t.slice(0, r)), t.trim();
|
|
2552
2552
|
}
|
|
2553
|
-
function
|
|
2553
|
+
function Da(e) {
|
|
2554
2554
|
if (!e) return !1;
|
|
2555
2555
|
const t = e.indexOf("@");
|
|
2556
2556
|
if (t <= 0) return !1;
|
|
@@ -2578,7 +2578,7 @@ function oe(e, t) {
|
|
|
2578
2578
|
}
|
|
2579
2579
|
return !a && S(i, o) ? `+${o.callingCode}${i}` : null;
|
|
2580
2580
|
}
|
|
2581
|
-
function
|
|
2581
|
+
function Pa(e, t = 9) {
|
|
2582
2582
|
const n = (e ?? "").replace(/\D/g, "");
|
|
2583
2583
|
return n.length < t ? null : n.slice(-t);
|
|
2584
2584
|
}
|
|
@@ -2589,7 +2589,7 @@ function Re(e) {
|
|
|
2589
2589
|
const r = t.slice(0, n).split("+")[0], i = t.slice(n + 1);
|
|
2590
2590
|
return !r || !i.includes(".") ? null : `${r}@${i}`;
|
|
2591
2591
|
}
|
|
2592
|
-
function
|
|
2592
|
+
function Ua(e) {
|
|
2593
2593
|
const t = Re(e);
|
|
2594
2594
|
return t ? t.slice(t.lastIndexOf("@") + 1) : null;
|
|
2595
2595
|
}
|
|
@@ -2655,16 +2655,16 @@ const Qn = /* @__PURE__ */ new Set([
|
|
|
2655
2655
|
"proximus.be",
|
|
2656
2656
|
"scarlet.be"
|
|
2657
2657
|
]);
|
|
2658
|
-
function
|
|
2658
|
+
function Ka(e) {
|
|
2659
2659
|
const t = Zn(e);
|
|
2660
2660
|
return t ? Qn.has(t) : !1;
|
|
2661
2661
|
}
|
|
2662
|
-
function
|
|
2662
|
+
function Ga(e) {
|
|
2663
2663
|
if (!e) return !1;
|
|
2664
2664
|
const t = e.trim().toLowerCase();
|
|
2665
2665
|
return t === "tel" || t === "sms" || t === "whatsapp" || t === "fax";
|
|
2666
2666
|
}
|
|
2667
|
-
function
|
|
2667
|
+
function ja(e, t, n) {
|
|
2668
2668
|
if (!e || !t) return null;
|
|
2669
2669
|
const r = e.trim().toLowerCase();
|
|
2670
2670
|
if (r === "tel" || r === "sms" || r === "whatsapp") {
|
|
@@ -2831,13 +2831,13 @@ function de(e) {
|
|
|
2831
2831
|
`).trim();
|
|
2832
2832
|
}
|
|
2833
2833
|
const br = /<\s*(html|body|div|p|table|br|span)\b/i;
|
|
2834
|
-
function
|
|
2834
|
+
function Ba(e) {
|
|
2835
2835
|
return br.test(e);
|
|
2836
2836
|
}
|
|
2837
|
-
function
|
|
2837
|
+
function Ha(e) {
|
|
2838
2838
|
return $e(e, !1);
|
|
2839
2839
|
}
|
|
2840
|
-
function
|
|
2840
|
+
function Fa(e) {
|
|
2841
2841
|
return $e(e, !0);
|
|
2842
2842
|
}
|
|
2843
2843
|
function $e(e, t) {
|
|
@@ -2907,6 +2907,7 @@ export {
|
|
|
2907
2907
|
pt as MAX_ASSIGNMENT_TURNS,
|
|
2908
2908
|
Er as MAX_BLOCKS,
|
|
2909
2909
|
Te as MAX_COLLECTION_DEPTH,
|
|
2910
|
+
Ca as MAX_EDITABLE_FILE_BYTES,
|
|
2910
2911
|
Sr as MAX_FIELDS,
|
|
2911
2912
|
_r as MAX_LIST_ITEMS,
|
|
2912
2913
|
Di as MAX_MEMORY_BROWSE,
|
|
@@ -2917,7 +2918,7 @@ export {
|
|
|
2917
2918
|
nn as MAX_TOPIC_EXAMPLES,
|
|
2918
2919
|
O as MAX_TOPIC_EXAMPLE_CHARS,
|
|
2919
2920
|
Ui as MIN_MEMORY_BUDGET,
|
|
2920
|
-
|
|
2921
|
+
La as NAV_NOTICE_SLOT,
|
|
2921
2922
|
ua as NOTIFICATION_SOURCE_PROVIDER_GROUP,
|
|
2922
2923
|
Bi as ONBOARDING_SOURCE_PROVIDER_GROUP,
|
|
2923
2924
|
D as PHONE_REGIONS,
|
|
@@ -2936,16 +2937,16 @@ export {
|
|
|
2936
2937
|
Aa as RESOURCE_SEARCH_SERVICE,
|
|
2937
2938
|
Ta as SCOPE_READ_ROUTE,
|
|
2938
2939
|
_a as SCOPE_RELATED_ROUTE,
|
|
2939
|
-
|
|
2940
|
+
xa as SETTINGS_CATEGORIES,
|
|
2940
2941
|
di as SIGNATURE_INTENTS,
|
|
2941
2942
|
Mt as SLA_HOURS_BY_PRIORITY,
|
|
2942
2943
|
Xt as STEP_MAX_TOKENS_MAX,
|
|
2943
2944
|
zt as STEP_MAX_TOKENS_MIN,
|
|
2944
2945
|
bt as SUMMARY_MIN_LAST_CHARS,
|
|
2945
2946
|
At as SUMMARY_MIN_MESSAGES,
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2947
|
+
va as SYNC_RUN_MAX_ERRORS,
|
|
2948
|
+
Oa as SYNC_SOURCE_PROVIDER_GROUP,
|
|
2949
|
+
Na as SYNC_TARGET_PROVIDER_GROUP,
|
|
2949
2950
|
ut as TERMINAL_ASSIGNMENT_STATUSES,
|
|
2950
2951
|
Zt as TERMINAL_RUN_STATUSES,
|
|
2951
2952
|
Qi as TRIGGER_VARS,
|
|
@@ -3005,12 +3006,12 @@ export {
|
|
|
3005
3006
|
Mr as channelKindOf,
|
|
3006
3007
|
to as clampStepMaxTokens,
|
|
3007
3008
|
Ai as classifyMail,
|
|
3008
|
-
|
|
3009
|
-
|
|
3009
|
+
Fa as cleanMessageMarkdown,
|
|
3010
|
+
Ha as cleanMessageText,
|
|
3010
3011
|
Fo as compareAssistRank,
|
|
3011
3012
|
tn as compareWorkTypes,
|
|
3012
3013
|
ui as decideAssignmentState,
|
|
3013
|
-
|
|
3014
|
+
$a as decideCadence,
|
|
3014
3015
|
zo as decideIncomingCall,
|
|
3015
3016
|
Dt as defaultLocaleOf,
|
|
3016
3017
|
Ro as defaultStatusKey,
|
|
@@ -3019,8 +3020,8 @@ export {
|
|
|
3019
3020
|
fa as derivePresence,
|
|
3020
3021
|
Xo as disabledIntentsFromCapabilities,
|
|
3021
3022
|
uo as elapsedSeconds,
|
|
3022
|
-
|
|
3023
|
-
|
|
3023
|
+
Ua as emailDomain,
|
|
3024
|
+
ja as endpointKey,
|
|
3024
3025
|
Nn as extractParams,
|
|
3025
3026
|
Bn as extractTerms,
|
|
3026
3027
|
Jo as filterByEndpoint,
|
|
@@ -3056,7 +3057,7 @@ export {
|
|
|
3056
3057
|
xt as isDescendant,
|
|
3057
3058
|
mi as isEligible,
|
|
3058
3059
|
Ur as isEmailActivity,
|
|
3059
|
-
|
|
3060
|
+
Ba as isHtmlBody,
|
|
3060
3061
|
so as isInFlight,
|
|
3061
3062
|
Tt as isInteractionUnseen,
|
|
3062
3063
|
wa as isLandingPath,
|
|
@@ -3068,7 +3069,7 @@ export {
|
|
|
3068
3069
|
Ot as isParked,
|
|
3069
3070
|
Qt as isPaused,
|
|
3070
3071
|
Nr as isPlaybookAuthoredType,
|
|
3071
|
-
|
|
3072
|
+
Ka as isPublicEmailDomain,
|
|
3072
3073
|
ka as isPublicPath,
|
|
3073
3074
|
Nt as isReminderActive,
|
|
3074
3075
|
Cr as isReplyableType,
|
|
@@ -3085,14 +3086,14 @@ export {
|
|
|
3085
3086
|
Oi as localeInstruction,
|
|
3086
3087
|
Ci as localeName,
|
|
3087
3088
|
vi as localesOf,
|
|
3088
|
-
|
|
3089
|
+
Da as looksLikeEmail,
|
|
3089
3090
|
Zo as matchContactToIntents,
|
|
3090
3091
|
$n as matchPublicRoute,
|
|
3091
3092
|
xi as mcpCredentialScope,
|
|
3092
3093
|
Li as mcpToolPrefix,
|
|
3093
|
-
|
|
3094
|
+
Ra as mergeShownKeys,
|
|
3094
3095
|
Ge as messageCountsAs,
|
|
3095
|
-
|
|
3096
|
+
Ga as needsPhoneRegion,
|
|
3096
3097
|
Zr as normalizeArtifactBlocks,
|
|
3097
3098
|
Ir as normalizeBlocks,
|
|
3098
3099
|
Re as normalizeEmail,
|
|
@@ -3104,7 +3105,7 @@ export {
|
|
|
3104
3105
|
ko as parseItemKey,
|
|
3105
3106
|
On as pathToRegex,
|
|
3106
3107
|
Yr as periodsInRange,
|
|
3107
|
-
|
|
3108
|
+
Pa as phoneSuffix,
|
|
3108
3109
|
yi as pickMailHeaders,
|
|
3109
3110
|
Ue as plainTextFromMarkdown,
|
|
3110
3111
|
Bt as playbookActor,
|
|
@@ -79,7 +79,25 @@ export interface ScheduleResult {
|
|
|
79
79
|
providerData?: Record<string, unknown>;
|
|
80
80
|
}
|
|
81
81
|
export interface FileUploadPayload {
|
|
82
|
-
|
|
82
|
+
/**
|
|
83
|
+
* The bytes, or base64 of them when `encoding` says so.
|
|
84
|
+
*
|
|
85
|
+
* Over the JSON channel a `Uint8Array` travels as an object of index -> byte:
|
|
86
|
+
* roughly four wire bytes per source byte, and a multi-million element object
|
|
87
|
+
* to materialise at both ends. Base64 costs 1.33x and one string.
|
|
88
|
+
*/
|
|
89
|
+
file: Uint8Array | string;
|
|
90
|
+
/**
|
|
91
|
+
* Set to "base64" when `file` is a base64 string.
|
|
92
|
+
*
|
|
93
|
+
* **Only on the hop into the storage app.** `apps/storage` decodes it and
|
|
94
|
+
* hands every provider real bytes, so `/provider/storage/upload` never sees
|
|
95
|
+
* this field and no provider has to understand it. That is deliberate: the
|
|
96
|
+
* two live in different apps and deploy separately, and a provider that did
|
|
97
|
+
* not yet know the flag would take `typeof file === "string"` at face value
|
|
98
|
+
* and store the base64 *text* - a corrupt file, with a 200 back.
|
|
99
|
+
*/
|
|
100
|
+
encoding?: "base64";
|
|
83
101
|
filename: string;
|
|
84
102
|
mimeType: string;
|
|
85
103
|
accountId?: string;
|
|
@@ -22,6 +22,17 @@ export interface VirtualMount {
|
|
|
22
22
|
createdAt?: number;
|
|
23
23
|
updatedAt?: number;
|
|
24
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* Ceiling on a file the browser will open for editing, and on what the save
|
|
27
|
+
* route accepts back.
|
|
28
|
+
*
|
|
29
|
+
* The bytes make three trips through memory - base64 over the invoke channel,
|
|
30
|
+
* the decoded buffer, and whatever the editor parses them into - and the
|
|
31
|
+
* channel is JSON, so there is no streaming to fall back on. Real .docx are
|
|
32
|
+
* almost all far under this; the number is here to keep the one that is not
|
|
33
|
+
* from taking the tab down.
|
|
34
|
+
*/
|
|
35
|
+
export declare const MAX_EDITABLE_FILE_BYTES: number;
|
|
25
36
|
export interface FilePointer {
|
|
26
37
|
id: string;
|
|
27
38
|
mountId: string;
|
|
@@ -34,6 +45,16 @@ export interface FilePointer {
|
|
|
34
45
|
ownerId: string;
|
|
35
46
|
createdAt?: number;
|
|
36
47
|
tags?: string[];
|
|
48
|
+
/**
|
|
49
|
+
* Bumped on every write to the file's bytes. An editor reads it when it opens
|
|
50
|
+
* the file and presents it back on save; the save is a compare-and-set on this
|
|
51
|
+
* value, so a second writer is refused instead of silently overwriting.
|
|
52
|
+
*
|
|
53
|
+
* Optional because rows written before the field existed read back undefined,
|
|
54
|
+
* and there is no `$exists` to find them. The first save on such a row is
|
|
55
|
+
* unconditional and gives it one.
|
|
56
|
+
*/
|
|
57
|
+
revision?: number;
|
|
37
58
|
}
|
|
38
59
|
/**
|
|
39
60
|
* A field a storage provider needs to connect an account. Providers declare
|